diff --git "a/data/layouts/machine_learning_engineering_andriy_burkov.json" "b/data/layouts/machine_learning_engineering_andriy_burkov.json" new file mode 100644--- /dev/null +++ "b/data/layouts/machine_learning_engineering_andriy_burkov.json" @@ -0,0 +1 @@ +{"bookId": "machine_learning_engineering_andriy_burkov", "title": "Machine Learning Engineering", "author": "Andriy Burkov", "totalPages": 296, "engine": "pymupdf", "pages": [{"page": 1, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 2, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 3, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Foreword", "words": [{"w": "Foreword", "b": [0.1312, 0.0833, 0.2529, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "Foreword by Cassie Kozyrkov, Chief Decision Scientist at Google, author of the course Making Friends with Machine Learning on Google Cloud Platform", "words": [{"w": "Foreword", "b": [0.1312, 0.13, 0.2075, 0.1451]}, {"w": "by", "b": [0.2142, 0.13, 0.2341, 0.1451]}, {"w": "Cassie", "b": [0.2409, 0.1301, 0.299, 0.145]}, {"w": "Kozyrkov,", "b": [0.3067, 0.13, 0.3998, 0.1451]}, {"w": "Chief", "b": [0.4067, 0.13, 0.4501, 0.1451]}, {"w": "Decision", "b": [0.4568, 0.13, 0.5257, 0.1451]}, {"w": "Scientist", "b": [0.5324, 0.13, 0.6021, 0.1451]}, {"w": "at", "b": [0.6089, 0.13, 0.6256, 0.1451]}, {"w": "Google,", "b": [0.6324, 0.13, 0.6947, 0.1451]}, {"w": "author", "b": [0.7016, 0.13, 0.756, 0.1451]}, {"w": "of", "b": [0.7628, 0.13, 0.7779, 0.1451]}, {"w": "the", "b": [0.7847, 0.13, 0.8108, 0.1451]}, {"w": "course", "b": [0.8176, 0.13, 0.869, 0.1451]}, {"w": "Making", "b": [0.1312, 0.148, 0.2001, 0.163]}, {"w": "Friends", "b": [0.2078, 0.148, 0.2771, 0.163]}, {"w": "with", "b": [0.2847, 0.148, 0.3235, 0.163]}, {"w": "Machine", "b": [0.3311, 0.148, 0.4109, 0.163]}, {"w": "Learning", "b": [0.4185, 0.148, 0.4996, 0.163]}, {"w": "on", "b": [0.5068, 0.1481, 0.5263, 0.163]}, {"w": "Google", "b": [0.5324, 0.1481, 0.5884, 0.163]}, {"w": "Cloud", "b": [0.5946, 0.1481, 0.6428, 0.163]}, {"w": "Platform", "b": [0.6489, 0.1481, 0.7205, 0.163]}]}, {"id": "b_2", "type": "paragraph", "text": "I’d like to let you in on a secret: when people say “machine learning” it sounds like there’s only one discipline here. Surprise! There are actually two machine learnings, and they are as different as innovating in food recipes and inventing new kitchen appliances. Both are noble callings, as long as you don’t get them confused; imagine hiring a pastry chef to build you an oven or an electrical engineer to bake bread for you!", "words": [{"w": "I’d", "b": [0.1312, 0.2175, 0.1534, 0.2325]}, {"w": "like", "b": [0.1596, 0.2175, 0.1875, 0.2325]}, {"w": "to", "b": [0.1936, 0.2175, 0.2102, 0.2325]}, {"w": "let", "b": [0.2163, 0.2175, 0.237, 0.2325]}, {"w": "you", "b": [0.2431, 0.2175, 0.272, 0.2325]}, {"w": "in", "b": [0.2782, 0.2175, 0.2937, 0.2325]}, {"w": "on", "b": [0.2999, 0.2175, 0.3195, 0.2325]}, {"w": "a", "b": [0.3256, 0.2175, 0.3349, 0.2325]}, {"w": "secret:", "b": [0.3411, 0.2175, 0.3929, 0.2325]}, {"w": "when", "b": [0.4011, 0.2175, 0.4434, 0.2325]}, {"w": "people", "b": [0.4496, 0.2175, 0.5018, 0.2325]}, {"w": "say", "b": [0.5079, 0.2175, 0.5338, 0.2325]}, {"w": "“machine", "b": [0.54, 0.2175, 0.6154, 0.2325]}, {"w": "learning”", "b": [0.6215, 0.2175, 0.6954, 0.2325]}, {"w": "it", "b": [0.7016, 0.2175, 0.714, 0.2325]}, {"w": "sounds", "b": [0.7201, 0.2175, 0.7751, 0.2325]}, {"w": "like", "b": [0.7812, 0.2175, 0.8091, 0.2325]}, {"w": "there’s", "b": [0.8153, 0.2175, 0.8691, 0.2325]}, {"w": "only", "b": [0.1312, 0.2356, 0.1649, 0.2504]}, {"w": "one", "b": [0.171, 0.2356, 0.1982, 0.2504]}, {"w": "discipline", "b": [0.2043, 0.2356, 0.2778, 0.2504]}, {"w": "here.", "b": [0.2839, 0.2356, 0.3222, 0.2504]}, {"w": "Surprise!", "b": [0.3304, 0.2356, 0.3999, 0.2504]}, {"w": "There", "b": [0.4081, 0.2356, 0.4544, 0.2504]}, {"w": "are", "b": [0.4605, 0.2356, 0.4847, 0.2504]}, {"w": "actually", "b": [0.4908, 0.2356, 0.5536, 0.2504]}, {"w": "two", "b": [0.5598, 0.2356, 0.5879, 0.2504]}, {"w": "machine", "b": [0.594, 0.2356, 0.6588, 0.2504]}, {"w": "learnings,", "b": [0.6649, 0.2356, 0.7405, 0.2504]}, {"w": "and", "b": [0.7466, 0.2356, 0.7757, 0.2504]}, {"w": "they", "b": [0.7819, 0.2356, 0.8165, 0.2504]}, {"w": "are", "b": [0.8227, 0.2356, 0.8469, 0.2504]}, {"w": "as", "b": [0.853, 0.2356, 0.8692, 0.2504]}, {"w": "different", "b": [0.1312, 0.2535, 0.1973, 0.2684]}, {"w": "as", "b": [0.2034, 0.2535, 0.2198, 0.2684]}, {"w": "innovating", "b": [0.2259, 0.2535, 0.3091, 0.2684]}, {"w": "in", "b": [0.3153, 0.2535, 0.3305, 0.2684]}, {"w": "food", "b": [0.3366, 0.2535, 0.3717, 0.2684]}, {"w": "recipes", "b": [0.3778, 0.2535, 0.4323, 0.2684]}, {"w": "and", "b": [0.4384, 0.2535, 0.4679, 0.2684]}, {"w": "inventing", "b": [0.474, 0.2535, 0.5471, 0.2684]}, {"w": "new", "b": [0.5532, 0.2535, 0.5847, 0.2684]}, {"w": "kitchen", "b": [0.5908, 0.2535, 0.6487, 0.2684]}, {"w": "appliances.", "b": [0.6549, 0.2535, 0.7423, 0.2684]}, {"w": "Both", "b": [0.7505, 0.2535, 0.7898, 0.2684]}, {"w": "are", "b": [0.7959, 0.2535, 0.8204, 0.2684]}, {"w": "noble", "b": [0.8265, 0.2535, 0.8691, 0.2684]}, {"w": "callings,", "b": [0.1312, 0.2715, 0.1947, 0.2863]}, {"w": "as", "b": [0.2006, 0.2715, 0.2168, 0.2863]}, {"w": "long", "b": [0.2228, 0.2715, 0.2559, 0.2863]}, {"w": "as", "b": [0.2619, 0.2715, 0.278, 0.2863]}, {"w": "you", "b": [0.284, 0.2715, 0.3121, 0.2863]}, {"w": "don’t", "b": [0.3181, 0.2715, 0.3593, 0.2863]}, {"w": "get", "b": [0.3652, 0.2715, 0.3893, 0.2863]}, {"w": "them", "b": [0.3953, 0.2715, 0.4355, 0.2863]}, {"w": "confused;", "b": [0.4414, 0.2715, 0.5144, 0.2863]}, {"w": "imagine", "b": [0.5204, 0.2715, 0.5817, 0.2863]}, {"w": "hiring", "b": [0.5876, 0.2715, 0.6339, 0.2863]}, {"w": "a", "b": [0.6398, 0.2715, 0.6489, 0.2863]}, {"w": "pastry", "b": [0.6548, 0.2715, 0.7047, 0.2863]}, {"w": "chef", "b": [0.7107, 0.2715, 0.7418, 0.2863]}, {"w": "to", "b": [0.7478, 0.2715, 0.7638, 0.2863]}, {"w": "build", "b": [0.7698, 0.2715, 0.81, 0.2863]}, {"w": "you", "b": [0.8159, 0.2715, 0.8441, 0.2863]}, {"w": "an", "b": [0.85, 0.2715, 0.8691, 0.2863]}, {"w": "oven", "b": [0.1312, 0.2893, 0.1676, 0.3043]}, {"w": "or", "b": [0.1738, 0.2893, 0.1903, 0.3043]}, {"w": "an", "b": [0.1964, 0.2893, 0.2159, 0.3043]}, {"w": "electrical", "b": [0.222, 0.2893, 0.2939, 0.3043]}, {"w": "engineer", "b": [0.3, 0.2893, 0.3668, 0.3043]}, {"w": "to", "b": [0.3729, 0.2893, 0.3893, 0.3043]}, {"w": "bake", "b": [0.3955, 0.2893, 0.4324, 0.3043]}, {"w": "bread", "b": [0.4385, 0.2893, 0.4837, 0.3043]}, {"w": "for", "b": [0.4898, 0.2893, 0.512, 0.3043]}, {"w": "you!", "b": [0.5181, 0.2893, 0.552, 0.3043]}]}, {"id": "b_3", "type": "paragraph", "text": "The bad news is that almost everyone does mix these two machine learnings up. No wonder so many businesses fail at machine learning as a result. What no one seems to tell beginners is that most machine learning courses and textbooks are about Machine Learning Research — how to build ovens (and microwaves, blenders, toasters, kettles. . . the kitchen sink!) from scratch, not how to cook things and innovate with recipes at enormous scale. In other words, if you’re looking for opportunities to create innovative ML-based solutions to business problems, you want the discipline called Applied Machine Learning, not Machine Learning Research, so most books won’t suit your needs.", "words": [{"w": "The", "b": [0.1306, 0.3163, 0.1621, 0.3312]}, {"w": "bad", "b": [0.1682, 0.3163, 0.1977, 0.3312]}, {"w": "news", "b": [0.2038, 0.3163, 0.2426, 0.3312]}, {"w": "is", "b": [0.2487, 0.3163, 0.261, 0.3312]}, {"w": "that", "b": [0.2672, 0.3163, 0.3007, 0.3312]}, {"w": "almost", "b": [0.3069, 0.3163, 0.3598, 0.3312]}, {"w": "everyone", "b": [0.3659, 0.3163, 0.4351, 0.3312]}, {"w": "does", "b": [0.4413, 0.3163, 0.4764, 0.3312]}, {"w": "mix", "b": [0.4826, 0.3163, 0.5126, 0.3312]}, {"w": "these", "b": [0.5187, 0.3163, 0.5595, 0.3312]}, {"w": "two", "b": [0.5656, 0.3163, 0.594, 0.3312]}, {"w": "machine", "b": [0.6002, 0.3163, 0.6658, 0.3312]}, {"w": "learnings", "b": [0.6719, 0.3163, 0.7432, 0.3312]}, {"w": "up.", "b": [0.7494, 0.3163, 0.7748, 0.3312]}, {"w": "No", "b": [0.783, 0.3163, 0.8058, 0.3312]}, {"w": "wonder", "b": [0.812, 0.3163, 0.8694, 0.3312]}, {"w": "so", "b": [0.1312, 0.3343, 0.1475, 0.3491]}, {"w": "many", "b": [0.1536, 0.3343, 0.1969, 0.3491]}, {"w": "businesses", "b": [0.2031, 0.3343, 0.2832, 0.3491]}, {"w": "fail", "b": [0.2893, 0.3343, 0.314, 0.3491]}, {"w": "at", "b": [0.3202, 0.3343, 0.3363, 0.3491]}, {"w": "machine", "b": [0.3425, 0.3343, 0.4075, 0.3491]}, {"w": "learning", "b": [0.4137, 0.3343, 0.4772, 0.3491]}, {"w": "as", "b": [0.4834, 0.3343, 0.4996, 0.3491]}, {"w": "a", "b": [0.5058, 0.3343, 0.5148, 0.3491]}, {"w": "result.", "b": [0.521, 0.3343, 0.5706, 0.3491]}, {"w": "What", "b": [0.5788, 0.3343, 0.6236, 0.3491]}, {"w": "no", "b": [0.6298, 0.3343, 0.6489, 0.3491]}, {"w": "one", "b": [0.6551, 0.3343, 0.6823, 0.3491]}, {"w": "seems", "b": [0.6885, 0.3343, 0.734, 0.3491]}, {"w": "to", "b": [0.7402, 0.3343, 0.7563, 0.3491]}, {"w": "tell", "b": [0.7625, 0.3343, 0.7877, 0.3491]}, {"w": "beginners", "b": [0.7939, 0.3343, 0.8691, 0.3491]}, {"w": "is", "b": [0.1312, 0.3523, 0.1434, 0.3671]}, {"w": "that", "b": [0.149, 0.3523, 0.1821, 0.3671]}, {"w": "most", "b": [0.1877, 0.3523, 0.226, 0.3671]}, {"w": "machine", "b": [0.2315, 0.3523, 0.2963, 0.3671]}, {"w": "learning", "b": [0.3019, 0.3523, 0.3653, 0.3671]}, {"w": "courses", "b": [0.3709, 0.3523, 0.4274, 0.3671]}, {"w": "and", "b": [0.433, 0.3523, 0.4621, 0.3671]}, {"w": "textbooks", "b": [0.4677, 0.3523, 0.5452, 0.3671]}, {"w": "are", "b": [0.5508, 0.3523, 0.5749, 0.3671]}, {"w": "about", "b": [0.5805, 0.3523, 0.6262, 0.3671]}, {"w": "Machine", "b": [0.6318, 0.3523, 0.6981, 0.3671]}, {"w": "Learning", "b": [0.7037, 0.3523, 0.7733, 0.3671]}, {"w": "Research", "b": [0.7789, 0.3523, 0.8491, 0.3671]}, {"w": "—", "b": [0.8547, 0.3523, 0.8728, 0.3671]}, {"w": "how", "b": [0.1312, 0.37, 0.1642, 0.3851]}, {"w": "to", "b": [0.1708, 0.37, 0.1875, 0.3851]}, {"w": "build", "b": [0.194, 0.37, 0.2359, 0.3851]}, {"w": "ovens", "b": [0.2424, 0.37, 0.287, 0.3851]}, {"w": "(and", "b": [0.2936, 0.37, 0.3313, 0.3851]}, {"w": "microwaves,", "b": [0.3378, 0.37, 0.4358, 0.3851]}, {"w": "blenders,", "b": [0.4425, 0.37, 0.5159, 0.3851]}, {"w": "toasters,", "b": [0.5226, 0.37, 0.5919, 0.3851]}, {"w": "kettles.", "b": [0.5985, 0.37, 0.6572, 0.3851]}, {"w": ".", "b": [0.6603, 0.37, 0.6655, 0.3851]}, {"w": ".", "b": [0.6686, 0.37, 0.6739, 0.3851]}, {"w": "the", "b": [0.6769, 0.37, 0.7031, 0.3851]}, {"w": "kitchen", "b": [0.7096, 0.37, 0.7693, 0.3851]}, {"w": "sink!)", "b": [0.7759, 0.37, 0.8215, 0.3851]}, {"w": "from", "b": [0.8309, 0.37, 0.8691, 0.3851]}, {"w": "scratch,", "b": [0.1312, 0.3879, 0.1947, 0.403]}, {"w": "not", "b": [0.2032, 0.3879, 0.2303, 0.403]}, {"w": "how", "b": [0.2383, 0.3879, 0.2713, 0.403]}, {"w": "to", "b": [0.2793, 0.3879, 0.296, 0.403]}, {"w": "cook", "b": [0.304, 0.3879, 0.3417, 0.403]}, {"w": "things", "b": [0.3497, 0.3879, 0.4, 0.403]}, {"w": "and", "b": [0.408, 0.3879, 0.4383, 0.403]}, {"w": "innovate", "b": [0.4463, 0.3879, 0.5154, 0.403]}, {"w": "with", "b": [0.5234, 0.3879, 0.56, 0.403]}, {"w": "recipes", "b": [0.568, 0.3879, 0.6241, 0.403]}, {"w": "at", "b": [0.6321, 0.3879, 0.6488, 0.403]}, {"w": "enormous", "b": [0.6568, 0.3879, 0.7354, 0.403]}, {"w": "scale.", "b": [0.7434, 0.3879, 0.7875, 0.403]}, {"w": "In", "b": [0.8013, 0.3879, 0.8185, 0.403]}, {"w": "other", "b": [0.8265, 0.3879, 0.8695, 0.403]}, {"w": "words,", "b": [0.1306, 0.4061, 0.1815, 0.4209]}, {"w": "if", "b": [0.1875, 0.4061, 0.1981, 0.4209]}, {"w": "you’re", "b": [0.2041, 0.4061, 0.2524, 0.4209]}, {"w": "looking", "b": [0.2584, 0.4061, 0.3157, 0.4209]}, {"w": "for", "b": [0.3217, 0.4061, 0.3434, 0.4209]}, {"w": "opportunities", "b": [0.3494, 0.4061, 0.4546, 0.4209]}, {"w": "to", "b": [0.4607, 0.4061, 0.4768, 0.4209]}, {"w": "create", "b": [0.4828, 0.4061, 0.5301, 0.4209]}, {"w": "innovative", "b": [0.5361, 0.4061, 0.6165, 0.4209]}, {"w": "ML-based", "b": [0.6225, 0.4061, 0.7007, 0.4209]}, {"w": "solutions", "b": [0.7068, 0.4061, 0.7763, 0.4209]}, {"w": "to", "b": [0.7824, 0.4061, 0.7985, 0.4209]}, {"w": "business", "b": [0.8045, 0.4061, 0.8691, 0.4209]}, {"w": "problems,", "b": [0.1312, 0.4239, 0.21, 0.4389]}, {"w": "you", "b": [0.2161, 0.4239, 0.245, 0.4389]}, {"w": "want", "b": [0.2512, 0.4239, 0.2905, 0.4389]}, {"w": "the", "b": [0.2966, 0.4239, 0.3225, 0.4389]}, {"w": "discipline", "b": [0.3286, 0.4239, 0.4042, 0.4389]}, {"w": "called", "b": [0.4104, 0.4239, 0.4569, 0.4389]}, {"w": "Applied", "b": [0.463, 0.4239, 0.5266, 0.4389]}, {"w": "Machine", "b": [0.5328, 0.4239, 0.601, 0.4389]}, {"w": "Learning,", "b": [0.6071, 0.4239, 0.684, 0.4389]}, {"w": "not", "b": [0.6901, 0.4239, 0.717, 0.4389]}, {"w": "Machine", "b": [0.7231, 0.4239, 0.7914, 0.4389]}, {"w": "Learning", "b": [0.7975, 0.4239, 0.8691, 0.4389]}, {"w": "Research,", "b": [0.1312, 0.4419, 0.2081, 0.4568]}, {"w": "so", "b": [0.2142, 0.4419, 0.2307, 0.4568]}, {"w": "most", "b": [0.2369, 0.4419, 0.2759, 0.4568]}, {"w": "books", "b": [0.2821, 0.4419, 0.3288, 0.4568]}, {"w": "won’t", "b": [0.335, 0.4419, 0.3796, 0.4568]}, {"w": "suit", "b": [0.3857, 0.4419, 0.4156, 0.4568]}, {"w": "your", "b": [0.4217, 0.4419, 0.4577, 0.4568]}, {"w": "needs.", "b": [0.4638, 0.4419, 0.5132, 0.4568]}]}, {"id": "b_4", "type": "paragraph", "text": "And now for the good news! You’re looking at one of the few true Applied Machine Learning books out there. That’s right, you found one! A real applied needle in the haystack of research-oriented stuff. Excellent job, dear reader. . . unless what you were actually looking for is a book to help you learn the skills to design general purpose algorithms, in which case I hope the author won’t be too upset with me for telling you to flee now and go pick up pretty much any other machine learning book. This one is different.", "words": [{"w": "And", "b": [0.1305, 0.4689, 0.1642, 0.4837]}, {"w": "now", "b": [0.1701, 0.4689, 0.2018, 0.4837]}, {"w": "for", "b": [0.2077, 0.4689, 0.2293, 0.4837]}, {"w": "the", "b": [0.2352, 0.4689, 0.2604, 0.4837]}, {"w": "good", "b": [0.2663, 0.4689, 0.3045, 0.4837]}, {"w": "news!", "b": [0.3104, 0.4689, 0.3537, 0.4837]}, {"w": "You’re", "b": [0.3618, 0.4689, 0.4131, 0.4837]}, {"w": "looking", "b": [0.419, 0.4689, 0.4763, 0.4837]}, {"w": "at", "b": [0.4822, 0.4689, 0.4983, 0.4837]}, {"w": "one", "b": [0.5042, 0.4689, 0.5313, 0.4837]}, {"w": "of", "b": [0.5373, 0.4689, 0.5518, 0.4837]}, {"w": "the", "b": [0.5578, 0.4689, 0.5829, 0.4837]}, {"w": "few", "b": [0.5888, 0.4689, 0.6154, 0.4837]}, {"w": "true", "b": [0.6213, 0.4689, 0.6536, 0.4837]}, {"w": "Applied", "b": [0.6595, 0.4689, 0.7213, 0.4837]}, {"w": "Machine", "b": [0.7272, 0.4689, 0.7935, 0.4837]}, {"w": "Learning", "b": [0.7994, 0.4689, 0.8691, 0.4837]}, {"w": "books", "b": [0.1312, 0.4866, 0.1789, 0.5017]}, {"w": "out", "b": [0.1865, 0.4866, 0.2137, 0.5017]}, {"w": "there.", "b": [0.2214, 0.4866, 0.2685, 0.5017]}, {"w": "That’s", "b": [0.2812, 0.4866, 0.3346, 0.5017]}, {"w": "right,", "b": [0.3422, 0.4866, 0.3867, 0.5017]}, {"w": "you", "b": [0.3948, 0.4866, 0.424, 0.5017]}, {"w": "found", "b": [0.4317, 0.4866, 0.4782, 0.5017]}, {"w": "one!", "b": [0.4859, 0.4866, 0.5193, 0.5017]}, {"w": "A", "b": [0.532, 0.4866, 0.5461, 0.5017]}, {"w": "real", "b": [0.5537, 0.4866, 0.5841, 0.5017]}, {"w": "applied", "b": [0.5918, 0.4866, 0.6514, 0.5017]}, {"w": "needle", "b": [0.659, 0.4866, 0.7103, 0.5017]}, {"w": "in", "b": [0.7179, 0.4866, 0.7336, 0.5017]}, {"w": "the", "b": [0.7413, 0.4866, 0.7674, 0.5017]}, {"w": "haystack", "b": [0.7751, 0.4866, 0.8463, 0.5017]}, {"w": "of", "b": [0.8539, 0.4866, 0.8691, 0.5017]}, {"w": "research-oriented", "b": [0.1312, 0.5046, 0.2693, 0.5197]}, {"w": "stuff.", "b": [0.2754, 0.5046, 0.3165, 0.5197]}, {"w": "Excellent", "b": [0.3247, 0.5046, 0.3995, 0.5197]}, {"w": "job,", "b": [0.4057, 0.5046, 0.4363, 0.5197]}, {"w": "dear", "b": [0.4424, 0.5046, 0.4777, 0.5197]}, {"w": "reader.", "b": [0.4839, 0.5046, 0.5399, 0.5197]}, {"w": ".", "b": [0.543, 0.5046, 0.5482, 0.5197]}, {"w": ".", "b": [0.5512, 0.5046, 0.5564, 0.5197]}, {"w": "unless", "b": [0.5595, 0.5046, 0.6084, 0.5197]}, {"w": "what", "b": [0.6146, 0.5046, 0.6549, 0.5197]}, {"w": "you", "b": [0.6611, 0.5046, 0.6901, 0.5197]}, {"w": "were", "b": [0.6962, 0.5046, 0.7331, 0.5197]}, {"w": "actually", "b": [0.7392, 0.5046, 0.804, 0.5197]}, {"w": "looking", "b": [0.8101, 0.5046, 0.8691, 0.5197]}, {"w": "for", "b": [0.1312, 0.5228, 0.1529, 0.5376]}, {"w": "is", "b": [0.1587, 0.5228, 0.1708, 0.5376]}, {"w": "a", "b": [0.1766, 0.5228, 0.1856, 0.5376]}, {"w": "book", "b": [0.1914, 0.5228, 0.2301, 0.5376]}, {"w": "to", "b": [0.2358, 0.5228, 0.2519, 0.5376]}, {"w": "help", "b": [0.2577, 0.5228, 0.2908, 0.5376]}, {"w": "you", "b": [0.2966, 0.5228, 0.3247, 0.5376]}, {"w": "learn", "b": [0.3305, 0.5228, 0.3697, 0.5376]}, {"w": "the", "b": [0.3755, 0.5228, 0.4006, 0.5376]}, {"w": "skills", "b": [0.4064, 0.5228, 0.4453, 0.5376]}, {"w": "to", "b": [0.4511, 0.5228, 0.4671, 0.5376]}, {"w": "design", "b": [0.4729, 0.5228, 0.5223, 0.5376]}, {"w": "general", "b": [0.528, 0.5228, 0.5843, 0.5376]}, {"w": "purpose", "b": [0.5901, 0.5228, 0.6521, 0.5376]}, {"w": "algorithms,", "b": [0.6578, 0.5228, 0.7464, 0.5376]}, {"w": "in", "b": [0.7523, 0.5228, 0.7673, 0.5376]}, {"w": "which", "b": [0.7731, 0.5228, 0.8188, 0.5376]}, {"w": "case", "b": [0.8246, 0.5228, 0.8568, 0.5376]}, {"w": "I", "b": [0.8626, 0.5228, 0.8691, 0.5376]}, {"w": "hope", "b": [0.1312, 0.5407, 0.1689, 0.5555]}, {"w": "the", "b": [0.175, 0.5407, 0.2001, 0.5555]}, {"w": "author", "b": [0.2061, 0.5407, 0.2584, 0.5555]}, {"w": "won’t", "b": [0.2644, 0.5407, 0.3081, 0.5555]}, {"w": "be", "b": [0.3141, 0.5407, 0.3327, 0.5555]}, {"w": "too", "b": [0.3387, 0.5407, 0.3644, 0.5555]}, {"w": "upset", "b": [0.3704, 0.5407, 0.4127, 0.5555]}, {"w": "with", "b": [0.4187, 0.5407, 0.4539, 0.5555]}, {"w": "me", "b": [0.4599, 0.5407, 0.483, 0.5555]}, {"w": "for", "b": [0.489, 0.5407, 0.5106, 0.5555]}, {"w": "telling", "b": [0.5167, 0.5407, 0.5659, 0.5555]}, {"w": "you", "b": [0.5719, 0.5407, 0.6, 0.5555]}, {"w": "to", "b": [0.6061, 0.5407, 0.6221, 0.5555]}, {"w": "flee", "b": [0.6281, 0.5407, 0.6543, 0.5555]}, {"w": "now", "b": [0.6603, 0.5407, 0.6919, 0.5555]}, {"w": "and", "b": [0.6979, 0.5407, 0.7271, 0.5555]}, {"w": "go", "b": [0.7331, 0.5407, 0.7512, 0.5555]}, {"w": "pick", "b": [0.7572, 0.5407, 0.7893, 0.5555]}, {"w": "up", "b": [0.7954, 0.5407, 0.8155, 0.5555]}, {"w": "pretty", "b": [0.8215, 0.5407, 0.8698, 0.5555]}, {"w": "much", "b": [0.1312, 0.5585, 0.1743, 0.5735]}, {"w": "any", "b": [0.1805, 0.5585, 0.2092, 0.5735]}, {"w": "other", "b": [0.2153, 0.5585, 0.2574, 0.5735]}, {"w": "machine", "b": [0.2636, 0.5585, 0.3297, 0.5735]}, {"w": "learning", "b": [0.3359, 0.5585, 0.4005, 0.5735]}, {"w": "book.", "b": [0.4067, 0.5585, 0.4513, 0.5735]}, {"w": "This", "b": [0.4595, 0.5585, 0.4955, 0.5735]}, {"w": "one", "b": [0.5016, 0.5585, 0.5293, 0.5735]}, {"w": "is", "b": [0.5354, 0.5585, 0.5479, 0.5735]}, {"w": "different.", "b": [0.554, 0.5585, 0.6258, 0.5735]}]}, {"id": "b_5", "type": "paragraph", "text": "When I created Making Friends with Machine Learning in 2016, Google’s Applied Machine", "words": [{"w": "When", "b": [0.1303, 0.5854, 0.1781, 0.6004]}, {"w": "I", "b": [0.1842, 0.5854, 0.1909, 0.6004]}, {"w": "created", "b": [0.1971, 0.5854, 0.2557, 0.6004]}, {"w": "Making", "b": [0.2619, 0.5854, 0.3225, 0.6004]}, {"w": "Friends", "b": [0.3287, 0.5854, 0.3877, 0.6004]}, {"w": "with", "b": [0.3938, 0.5854, 0.4298, 0.6004]}, {"w": "Machine", "b": [0.436, 0.5854, 0.5038, 0.6004]}, {"w": "Learning", "b": [0.51, 0.5854, 0.5812, 0.6004]}, {"w": "in", "b": [0.5873, 0.5854, 0.6027, 0.6004]}, {"w": "2016,", "b": [0.6089, 0.5854, 0.651, 0.6004]}, {"w": "Google’s", "b": [0.6572, 0.5854, 0.7258, 0.6004]}, {"w": "Applied", "b": [0.7319, 0.5854, 0.7951, 0.6004]}, {"w": "Machine", "b": [0.8013, 0.5854, 0.8691, 0.6004]}]}, {"id": "b_6", "type": "paragraph", "text": "Learning course loved by more than ten thousand of our engineers and leaders, I gave it a very similar structure to the one in this book. That’s because doing things in the right order is crucial in the applied space. As you use your newfound data powers, tackling certain steps before you’ve completed others can lead to anything from wasted effort to a project-demolishing kablooie. In fact, the similarity in table of contents between this book and my course is what originally convinced me to give this book a read. In a clear case of convergent evolution, I saw in the author a fellow thinker kept up at night by the lack of available resources on Applied Machine Learning, one of the most potentially-useful yet horribly-misunderstood areas of engineering, enough to want to do something about it. So, if you’re about to close this book, how about you do me a quick favor and at least ponder why the Table of Contents is arranged the way it is. You’ll learn something good just from that, I promise.", "words": [{"w": "Learning", "b": [0.1312, 0.6033, 0.2037, 0.6184]}, {"w": "course", "b": [0.2108, 0.6033, 0.2622, 0.6184]}, {"w": "loved", "b": [0.2693, 0.6033, 0.3117, 0.6184]}, {"w": "by", "b": [0.3188, 0.6033, 0.3387, 0.6184]}, {"w": "more", "b": [0.3458, 0.6033, 0.3866, 0.6184]}, {"w": "than", "b": [0.3937, 0.6033, 0.4313, 0.6184]}, {"w": "ten", "b": [0.4384, 0.6033, 0.4646, 0.6184]}, {"w": "thousand", "b": [0.4717, 0.6033, 0.5471, 0.6184]}, {"w": "of", "b": [0.5542, 0.6033, 0.5694, 0.6184]}, {"w": "our", "b": [0.5765, 0.6033, 0.6037, 0.6184]}, {"w": "engineers", "b": [0.6108, 0.6033, 0.6863, 0.6184]}, {"w": "and", "b": [0.6934, 0.6033, 0.7237, 0.6184]}, {"w": "leaders,", "b": [0.7308, 0.6033, 0.7927, 0.6184]}, {"w": "I", "b": [0.8, 0.6033, 0.8068, 0.6184]}, {"w": "gave", "b": [0.8139, 0.6033, 0.85, 0.6184]}, {"w": "it", "b": [0.8571, 0.6033, 0.8696, 0.6184]}, {"w": "a", "b": [0.1312, 0.6212, 0.1406, 0.6363]}, {"w": "very", "b": [0.1472, 0.6212, 0.1823, 0.6363]}, {"w": "similar", "b": [0.1889, 0.6212, 0.2444, 0.6363]}, {"w": "structure", "b": [0.251, 0.6212, 0.3255, 0.6363]}, {"w": "to", "b": [0.3321, 0.6212, 0.3488, 0.6363]}, {"w": "the", "b": [0.3554, 0.6212, 0.3815, 0.6363]}, {"w": "one", "b": [0.3881, 0.6212, 0.4163, 0.6363]}, {"w": "in", "b": [0.4229, 0.6212, 0.4386, 0.6363]}, {"w": "this", "b": [0.4451, 0.6212, 0.4756, 0.6363]}, {"w": "book.", "b": [0.4821, 0.6212, 0.5276, 0.6363]}, {"w": "That’s", "b": [0.537, 0.6212, 0.5905, 0.6363]}, {"w": "because", "b": [0.597, 0.6212, 0.6604, 0.6363]}, {"w": "doing", "b": [0.667, 0.6212, 0.7119, 0.6363]}, {"w": "things", "b": [0.7185, 0.6212, 0.7688, 0.6363]}, {"w": "in", "b": [0.7754, 0.6212, 0.7911, 0.6363]}, {"w": "the", "b": [0.7976, 0.6212, 0.8238, 0.6363]}, {"w": "right", "b": [0.8303, 0.6212, 0.8696, 0.6363]}, {"w": "order", "b": [0.1312, 0.6392, 0.1742, 0.6543]}, {"w": "is", "b": [0.1824, 0.6392, 0.1951, 0.6543]}, {"w": "crucial", "b": [0.2033, 0.6392, 0.2577, 0.6543]}, {"w": "in", "b": [0.266, 0.6392, 0.2816, 0.6543]}, {"w": "the", "b": [0.2898, 0.6392, 0.316, 0.6543]}, {"w": "applied", "b": [0.3242, 0.6392, 0.3838, 0.6543]}, {"w": "space.", "b": [0.392, 0.6392, 0.4413, 0.6543]}, {"w": "As", "b": [0.4557, 0.6392, 0.4772, 0.6543]}, {"w": "you", "b": [0.4854, 0.6392, 0.5147, 0.6543]}, {"w": "use", "b": [0.5229, 0.6392, 0.5492, 0.6543]}, {"w": "your", "b": [0.5574, 0.6392, 0.594, 0.6543]}, {"w": "newfound", "b": [0.6022, 0.6392, 0.6812, 0.6543]}, {"w": "data", "b": [0.6894, 0.6392, 0.726, 0.6543]}, {"w": "powers,", "b": [0.7342, 0.6392, 0.7956, 0.6543]}, {"w": "tackling", "b": [0.8043, 0.6392, 0.8691, 0.6543]}, {"w": "certain", "b": [0.1312, 0.6571, 0.1878, 0.6722]}, {"w": "steps", "b": [0.1954, 0.6571, 0.2364, 0.6722]}, {"w": "before", "b": [0.244, 0.6571, 0.2942, 0.6722]}, {"w": "you’ve", "b": [0.3018, 0.6571, 0.3541, 0.6722]}, {"w": "completed", "b": [0.3617, 0.6571, 0.4454, 0.6722]}, {"w": "others", "b": [0.453, 0.6571, 0.5033, 0.6722]}, {"w": "can", "b": [0.5109, 0.6571, 0.5392, 0.6722]}, {"w": "lead", "b": [0.5468, 0.6571, 0.5802, 0.6722]}, {"w": "to", "b": [0.5878, 0.6571, 0.6045, 0.6722]}, {"w": "anything", "b": [0.6121, 0.6571, 0.6843, 0.6722]}, {"w": "from", "b": [0.6919, 0.6571, 0.7301, 0.6722]}, {"w": "wasted", "b": [0.7377, 0.6571, 0.7938, 0.6722]}, {"w": "effort", "b": [0.8013, 0.6571, 0.8448, 0.6722]}, {"w": "to", "b": [0.8524, 0.6571, 0.8691, 0.6722]}, {"w": "a", "b": [0.1312, 0.6751, 0.1406, 0.6902]}, {"w": "project-demolishing", "b": [0.1485, 0.6751, 0.3097, 0.6902]}, {"w": "kablooie.", "b": [0.3176, 0.6751, 0.3908, 0.6902]}, {"w": "In", "b": [0.4042, 0.6751, 0.4214, 0.6902]}, {"w": "fact,", "b": [0.4293, 0.6751, 0.4654, 0.6902]}, {"w": "the", "b": [0.4737, 0.6751, 0.4998, 0.6902]}, {"w": "similarity", "b": [0.5077, 0.6751, 0.5852, 0.6902]}, {"w": "in", "b": [0.5931, 0.6751, 0.6088, 0.6902]}, {"w": "table", "b": [0.6167, 0.6751, 0.6575, 0.6902]}, {"w": "of", "b": [0.6653, 0.6751, 0.6805, 0.6902]}, {"w": "contents", "b": [0.6884, 0.6751, 0.7565, 0.6902]}, {"w": "between", "b": [0.7644, 0.6751, 0.8308, 0.6902]}, {"w": "this", "b": [0.8387, 0.6751, 0.8691, 0.6902]}, {"w": "book", "b": [0.1312, 0.693, 0.1715, 0.7081]}, {"w": "and", "b": [0.1784, 0.693, 0.2087, 0.7081]}, {"w": "my", "b": [0.2156, 0.693, 0.2407, 0.7081]}, {"w": "course", "b": [0.2476, 0.693, 0.299, 0.7081]}, {"w": "is", "b": [0.3059, 0.693, 0.3185, 0.7081]}, {"w": "what", "b": [0.3254, 0.693, 0.3662, 0.7081]}, {"w": "originally", "b": [0.3731, 0.693, 0.45, 0.7081]}, {"w": "convinced", "b": [0.4569, 0.693, 0.5375, 0.7081]}, {"w": "me", "b": [0.5444, 0.693, 0.5684, 0.7081]}, {"w": "to", "b": [0.5753, 0.693, 0.592, 0.7081]}, {"w": "give", "b": [0.5989, 0.693, 0.6313, 0.7081]}, {"w": "this", "b": [0.6382, 0.693, 0.6687, 0.7081]}, {"w": "book", "b": [0.6756, 0.693, 0.7158, 0.7081]}, {"w": "a", "b": [0.7227, 0.693, 0.7321, 0.7081]}, {"w": "read.", "b": [0.739, 0.693, 0.7798, 0.7081]}, {"w": "In", "b": [0.7902, 0.693, 0.8075, 0.7081]}, {"w": "a", "b": [0.8144, 0.693, 0.8238, 0.7081]}, {"w": "clear", "b": [0.8307, 0.693, 0.8694, 0.7081]}, {"w": "case", "b": [0.1312, 0.711, 0.1648, 0.7261]}, {"w": "of", "b": [0.1713, 0.711, 0.1865, 0.7261]}, {"w": "convergent", "b": [0.193, 0.711, 0.281, 0.7261]}, {"w": "evolution,", "b": [0.2875, 0.711, 0.368, 0.7261]}, {"w": "I", "b": [0.3746, 0.711, 0.3814, 0.7261]}, {"w": "saw", "b": [0.388, 0.711, 0.4179, 0.7261]}, {"w": "in", "b": [0.4244, 0.711, 0.4401, 0.7261]}, {"w": "the", "b": [0.4466, 0.711, 0.4727, 0.7261]}, {"w": "author", "b": [0.4793, 0.711, 0.5337, 0.7261]}, {"w": "a", "b": [0.5402, 0.711, 0.5496, 0.7261]}, {"w": "fellow", "b": [0.5561, 0.711, 0.6032, 0.7261]}, {"w": "thinker", "b": [0.6097, 0.711, 0.6684, 0.7261]}, {"w": "kept", "b": [0.6749, 0.711, 0.7105, 0.7261]}, {"w": "up", "b": [0.717, 0.711, 0.7379, 0.7261]}, {"w": "at", "b": [0.7444, 0.711, 0.7612, 0.7261]}, {"w": "night", "b": [0.7677, 0.711, 0.81, 0.7261]}, {"w": "by", "b": [0.8166, 0.711, 0.8364, 0.7261]}, {"w": "the", "b": [0.843, 0.711, 0.8691, 0.7261]}, {"w": "lack", "b": [0.1312, 0.729, 0.1631, 0.744]}, {"w": "of", "b": [0.1692, 0.729, 0.1841, 0.744]}, {"w": "available", "b": [0.1903, 0.729, 0.2602, 0.744]}, {"w": "resources", "b": [0.2663, 0.729, 0.3396, 0.744]}, {"w": "on", "b": [0.3457, 0.729, 0.3653, 0.744]}, {"w": "Applied", "b": [0.3714, 0.729, 0.4346, 0.744]}, {"w": "Machine", "b": [0.4407, 0.729, 0.5086, 0.744]}, {"w": "Learning,", "b": [0.5147, 0.729, 0.5911, 0.744]}, {"w": "one", "b": [0.5972, 0.729, 0.625, 0.744]}, {"w": "of", "b": [0.6311, 0.729, 0.646, 0.744]}, {"w": "the", "b": [0.6522, 0.729, 0.6779, 0.744]}, {"w": "most", "b": [0.684, 0.729, 0.7231, 0.744]}, {"w": "potentially-useful", "b": [0.7293, 0.729, 0.8691, 0.744]}, {"w": "yet", "b": [0.1308, 0.7469, 0.1559, 0.762]}, {"w": "horribly-misunderstood", "b": [0.1634, 0.7469, 0.3557, 0.762]}, {"w": "areas", "b": [0.3632, 0.7469, 0.4052, 0.762]}, {"w": "of", "b": [0.4127, 0.7469, 0.4278, 0.762]}, {"w": "engineering,", "b": [0.4353, 0.7469, 0.5337, 0.762]}, {"w": "enough", "b": [0.5416, 0.7469, 0.6001, 0.762]}, {"w": "to", "b": [0.6076, 0.7469, 0.6244, 0.762]}, {"w": "want", "b": [0.6319, 0.7469, 0.6716, 0.762]}, {"w": "to", "b": [0.6791, 0.7469, 0.6958, 0.762]}, {"w": "do", "b": [0.7034, 0.7469, 0.7232, 0.762]}, {"w": "something", "b": [0.7307, 0.7469, 0.8145, 0.762]}, {"w": "about", "b": [0.822, 0.7469, 0.8696, 0.762]}, {"w": "it.", "b": [0.1312, 0.7648, 0.149, 0.7799]}, {"w": "So,", "b": [0.1642, 0.7648, 0.1893, 0.7799]}, {"w": "if", "b": [0.1984, 0.7648, 0.2094, 0.7799]}, {"w": "you’re", "b": [0.2179, 0.7648, 0.2681, 0.7799]}, {"w": "about", "b": [0.2766, 0.7648, 0.3242, 0.7799]}, {"w": "to", "b": [0.3327, 0.7648, 0.3494, 0.7799]}, {"w": "close", "b": [0.3579, 0.7648, 0.3967, 0.7799]}, {"w": "this", "b": [0.4052, 0.7648, 0.4356, 0.7799]}, {"w": "book,", "b": [0.4441, 0.7648, 0.4896, 0.7799]}, {"w": "how", "b": [0.4987, 0.7648, 0.5316, 0.7799]}, {"w": "about", "b": [0.5401, 0.7648, 0.5877, 0.7799]}, {"w": "you", "b": [0.5962, 0.7648, 0.6255, 0.7799]}, {"w": "do", "b": [0.6339, 0.7648, 0.6538, 0.7799]}, {"w": "me", "b": [0.6623, 0.7648, 0.6863, 0.7799]}, {"w": "a", "b": [0.6948, 0.7648, 0.7042, 0.7799]}, {"w": "quick", "b": [0.7127, 0.7648, 0.7561, 0.7799]}, {"w": "favor", "b": [0.7646, 0.7648, 0.8055, 0.7799]}, {"w": "and", "b": [0.814, 0.7648, 0.8443, 0.7799]}, {"w": "at", "b": [0.8528, 0.7648, 0.8695, 0.7799]}, {"w": "least", "b": [0.1312, 0.7828, 0.169, 0.7979]}, {"w": "ponder", "b": [0.1757, 0.7828, 0.2327, 0.7979]}, {"w": "why", "b": [0.2394, 0.7828, 0.2729, 0.7979]}, {"w": "the", "b": [0.2795, 0.7828, 0.3057, 0.7979]}, {"w": "Table", "b": [0.3124, 0.7828, 0.3579, 0.7979]}, {"w": "of", "b": [0.3646, 0.7828, 0.3797, 0.7979]}, {"w": "Contents", "b": [0.3864, 0.7828, 0.4597, 0.7979]}, {"w": "is", "b": [0.4664, 0.7828, 0.4791, 0.7979]}, {"w": "arranged", "b": [0.4858, 0.7828, 0.558, 0.7979]}, {"w": "the", "b": [0.5647, 0.7828, 0.5909, 0.7979]}, {"w": "way", "b": [0.5975, 0.7828, 0.6294, 0.7979]}, {"w": "it", "b": [0.6361, 0.7828, 0.6486, 0.7979]}, {"w": "is.", "b": [0.6553, 0.7828, 0.6732, 0.7979]}, {"w": "You’ll", "b": [0.683, 0.7828, 0.7311, 0.7979]}, {"w": "learn", "b": [0.7378, 0.7828, 0.7786, 0.7979]}, {"w": "something", "b": [0.7853, 0.7828, 0.8691, 0.7979]}, {"w": "good", "b": [0.1312, 0.8008, 0.1702, 0.8158]}, {"w": "just", "b": [0.1763, 0.8008, 0.2067, 0.8158]}, {"w": "from", "b": [0.2129, 0.8008, 0.2503, 0.8158]}, {"w": "that,", "b": [0.2565, 0.8008, 0.2954, 0.8158]}, {"w": "I", "b": [0.3016, 0.8008, 0.3083, 0.8158]}, {"w": "promise.", "b": [0.3144, 0.8008, 0.3822, 0.8158]}]}, {"id": "b_7", "type": "paragraph", "text": "So, what’s in the rest of the book? The machine learning equivalent of a bumper guide to innovating in recipes to make food at scale. Since you haven’t read the book yet, I’ll put", "words": [{"w": "So,", "b": [0.1312, 0.8276, 0.1563, 0.8427]}, {"w": "what’s", "b": [0.1624, 0.8276, 0.2158, 0.8427]}, {"w": "in", "b": [0.2219, 0.8276, 0.2376, 0.8427]}, {"w": "the", "b": [0.2437, 0.8276, 0.2698, 0.8427]}, {"w": "rest", "b": [0.2759, 0.8276, 0.3064, 0.8427]}, {"w": "of", "b": [0.3125, 0.8276, 0.3276, 0.8427]}, {"w": "the", "b": [0.3338, 0.8276, 0.3599, 0.8427]}, {"w": "book?", "b": [0.366, 0.8276, 0.415, 0.8427]}, {"w": "The", "b": [0.4232, 0.8276, 0.4556, 0.8427]}, {"w": "machine", "b": [0.4617, 0.8276, 0.529, 0.8427]}, {"w": "learning", "b": [0.5352, 0.8276, 0.601, 0.8427]}, {"w": "equivalent", "b": [0.6071, 0.8276, 0.6902, 0.8427]}, {"w": "of", "b": [0.6963, 0.8276, 0.7114, 0.8427]}, {"w": "a", "b": [0.7175, 0.8276, 0.7269, 0.8427]}, {"w": "bumper", "b": [0.7331, 0.8276, 0.7963, 0.8427]}, {"w": "guide", "b": [0.8024, 0.8276, 0.8463, 0.8427]}, {"w": "to", "b": [0.8524, 0.8276, 0.8691, 0.8427]}, {"w": "innovating", "b": [0.1312, 0.8456, 0.217, 0.8607]}, {"w": "in", "b": [0.2236, 0.8456, 0.2393, 0.8607]}, {"w": "recipes", "b": [0.2459, 0.8456, 0.3021, 0.8607]}, {"w": "to", "b": [0.3087, 0.8456, 0.3254, 0.8607]}, {"w": "make", "b": [0.332, 0.8456, 0.3749, 0.8607]}, {"w": "food", "b": [0.3815, 0.8456, 0.4176, 0.8607]}, {"w": "at", "b": [0.4242, 0.8456, 0.4409, 0.8607]}, {"w": "scale.", "b": [0.4475, 0.8456, 0.4916, 0.8607]}, {"w": "Since", "b": [0.5012, 0.8456, 0.544, 0.8607]}, {"w": "you", "b": [0.5507, 0.8456, 0.58, 0.8607]}, {"w": "haven’t", "b": [0.5866, 0.8456, 0.6467, 0.8607]}, {"w": "read", "b": [0.6533, 0.8456, 0.689, 0.8607]}, {"w": "the", "b": [0.6956, 0.8456, 0.7217, 0.8607]}, {"w": "book", "b": [0.7283, 0.8456, 0.7686, 0.8607]}, {"w": "yet,", "b": [0.7752, 0.8456, 0.8055, 0.8607]}, {"w": "I’ll", "b": [0.8123, 0.8456, 0.8348, 0.8607]}, {"w": "put", "b": [0.8414, 0.8456, 0.8696, 0.8607]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "3", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 4, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "it in culinary terms: you’ll need to figure out what’s worth cooking / what the objectives are (decision-making and product management), understand the suppliers and the customers (domain expertise and business acumen), how to process ingredients at scale (data engineering and analysis), how to try many different ingredient-appliance combinations quickly to generate", "words": [{"w": "it", "b": [0.1312, 0.0883, 0.1438, 0.1034]}, {"w": "in", "b": [0.1502, 0.0883, 0.1659, 0.1034]}, {"w": "culinary", "b": [0.1723, 0.0883, 0.2387, 0.1034]}, {"w": "terms:", "b": [0.2451, 0.0883, 0.2966, 0.1034]}, {"w": "you’ll", "b": [0.3052, 0.0883, 0.3502, 0.1034]}, {"w": "need", "b": [0.3566, 0.0883, 0.3943, 0.1034]}, {"w": "to", "b": [0.4007, 0.0883, 0.4174, 0.1034]}, {"w": "figure", "b": [0.4238, 0.0883, 0.4699, 0.1034]}, {"w": "out", "b": [0.4763, 0.0883, 0.5035, 0.1034]}, {"w": "what’s", "b": [0.5099, 0.0883, 0.5633, 0.1034]}, {"w": "worth", "b": [0.5697, 0.0883, 0.6174, 0.1034]}, {"w": "cooking", "b": [0.6238, 0.0883, 0.6865, 0.1034]}, {"w": "/", "b": [0.6929, 0.0883, 0.7023, 0.1034]}, {"w": "what", "b": [0.7087, 0.0883, 0.7495, 0.1034]}, {"w": "the", "b": [0.7559, 0.0883, 0.782, 0.1034]}, {"w": "objectives", "b": [0.7884, 0.0883, 0.8691, 0.1034]}, {"w": "are", "b": [0.1312, 0.1064, 0.1555, 0.1213]}, {"w": "(decision-making", "b": [0.1617, 0.1064, 0.2949, 0.1213]}, {"w": "and", "b": [0.3015, 0.1064, 0.3303, 0.1213]}, {"w": "product", "b": [0.3369, 0.1064, 0.3947, 0.1213]}, {"w": "management),", "b": [0.4013, 0.1064, 0.5144, 0.1213]}, {"w": "understand", "b": [0.5206, 0.1064, 0.6095, 0.1213]}, {"w": "the", "b": [0.6157, 0.1064, 0.6409, 0.1213]}, {"w": "suppliers", "b": [0.6471, 0.1064, 0.717, 0.1213]}, {"w": "and", "b": [0.7232, 0.1064, 0.7525, 0.1213]}, {"w": "the", "b": [0.7586, 0.1064, 0.7839, 0.1213]}, {"w": "customers", "b": [0.79, 0.1064, 0.869, 0.1213]}, {"w": "(domain", "b": [0.1291, 0.1244, 0.1943, 0.1392]}, {"w": "expertise", "b": [0.2, 0.1244, 0.2683, 0.1392]}, {"w": "and", "b": [0.274, 0.1244, 0.3026, 0.1392]}, {"w": "business", "b": [0.3083, 0.1244, 0.3726, 0.1392]}, {"w": "acumen),", "b": [0.3783, 0.1244, 0.4518, 0.1392]}, {"w": "how", "b": [0.4572, 0.1244, 0.4888, 0.1392]}, {"w": "to", "b": [0.494, 0.1244, 0.5101, 0.1392]}, {"w": "process", "b": [0.5152, 0.1244, 0.5723, 0.1392]}, {"w": "ingredients", "b": [0.5775, 0.1244, 0.6636, 0.1392]}, {"w": "at", "b": [0.6688, 0.1244, 0.6848, 0.1392]}, {"w": "scale", "b": [0.69, 0.1244, 0.7273, 0.1392]}, {"w": "(data", "b": [0.7325, 0.1244, 0.7731, 0.1392]}, {"w": "engineering", "b": [0.7788, 0.1244, 0.8687, 0.1392]}, {"w": "and", "b": [0.1298, 0.1424, 0.1585, 0.1572]}, {"w": "analysis),", "b": [0.1638, 0.1424, 0.2389, 0.1572]}, {"w": "how", "b": [0.244, 0.1424, 0.2756, 0.1572]}, {"w": "to", "b": [0.2804, 0.1424, 0.2965, 0.1572]}, {"w": "try", "b": [0.3012, 0.1424, 0.3249, 0.1572]}, {"w": "many", "b": [0.3297, 0.1424, 0.3729, 0.1572]}, {"w": "different", "b": [0.3776, 0.1424, 0.443, 0.1572]}, {"w": "ingredient-appliance", "b": [0.4478, 0.1424, 0.6071, 0.1572]}, {"w": "combinations", "b": [0.6119, 0.1424, 0.716, 0.1572]}, {"w": "quickly", "b": [0.7208, 0.1424, 0.777, 0.1572]}, {"w": "to", "b": [0.7818, 0.1424, 0.7979, 0.1572]}, {"w": "generate", "b": [0.8027, 0.1424, 0.8691, 0.1572]}]}, {"id": "b_1", "type": "paragraph", "text": "potential recipes (prototype phase ML engineering), how to check that the quality of the recipe is good enough to serve (statistics), how to turn a potential recipe into millions of dishes served efficiently (production phase ML engineering), and how to ensure that your dishes stay top notch even if the delivery truck brings you a ton of potatoes instead of the rice you ordered (reliability engineering). This book is one of the few to offer perspectives on each step of the end-to-end process.", "words": [{"w": "potential", "b": [0.1312, 0.1601, 0.2045, 0.1752]}, {"w": "recipes", "b": [0.2114, 0.1601, 0.2676, 0.1752]}, {"w": "(prototype", "b": [0.2745, 0.1601, 0.3566, 0.1752]}, {"w": "phase", "b": [0.3639, 0.1601, 0.4092, 0.1752]}, {"w": "ML", "b": [0.4165, 0.1601, 0.4452, 0.1752]}, {"w": "engineering),", "b": [0.4526, 0.1601, 0.5597, 0.1752]}, {"w": "how", "b": [0.5669, 0.1601, 0.5998, 0.1752]}, {"w": "to", "b": [0.6068, 0.1601, 0.6235, 0.1752]}, {"w": "check", "b": [0.6305, 0.1601, 0.675, 0.1752]}, {"w": "that", "b": [0.682, 0.1601, 0.7165, 0.1752]}, {"w": "the", "b": [0.7235, 0.1601, 0.7496, 0.1752]}, {"w": "quality", "b": [0.7566, 0.1601, 0.8136, 0.1752]}, {"w": "of", "b": [0.8206, 0.1601, 0.8358, 0.1752]}, {"w": "the", "b": [0.8427, 0.1601, 0.8689, 0.1752]}, {"w": "recipe", "b": [0.1312, 0.178, 0.1799, 0.1931]}, {"w": "is", "b": [0.1866, 0.178, 0.1993, 0.1931]}, {"w": "good", "b": [0.206, 0.178, 0.2457, 0.1931]}, {"w": "enough", "b": [0.2524, 0.178, 0.311, 0.1931]}, {"w": "to", "b": [0.3177, 0.178, 0.3344, 0.1931]}, {"w": "serve", "b": [0.3411, 0.178, 0.3821, 0.1931]}, {"w": "(statistics),", "b": [0.3888, 0.178, 0.4809, 0.1931]}, {"w": "how", "b": [0.4877, 0.178, 0.5207, 0.1931]}, {"w": "to", "b": [0.5274, 0.178, 0.5441, 0.1931]}, {"w": "turn", "b": [0.5508, 0.178, 0.5864, 0.1931]}, {"w": "a", "b": [0.5931, 0.178, 0.6025, 0.1931]}, {"w": "potential", "b": [0.6092, 0.178, 0.6824, 0.1931]}, {"w": "recipe", "b": [0.6891, 0.178, 0.7379, 0.1931]}, {"w": "into", "b": [0.7446, 0.178, 0.7765, 0.1931]}, {"w": "millions", "b": [0.7832, 0.178, 0.8471, 0.1931]}, {"w": "of", "b": [0.8538, 0.178, 0.8689, 0.1931]}, {"w": "dishes", "b": [0.1312, 0.196, 0.1806, 0.2111]}, {"w": "served", "b": [0.1873, 0.196, 0.2387, 0.2111]}, {"w": "efficiently", "b": [0.2453, 0.196, 0.3238, 0.2111]}, {"w": "(production", "b": [0.3304, 0.196, 0.4235, 0.2111]}, {"w": "phase", "b": [0.4305, 0.196, 0.4757, 0.2111]}, {"w": "ML", "b": [0.4828, 0.196, 0.5115, 0.2111]}, {"w": "engineering),", "b": [0.5185, 0.196, 0.6256, 0.2111]}, {"w": "and", "b": [0.6324, 0.196, 0.6627, 0.2111]}, {"w": "how", "b": [0.6694, 0.196, 0.7023, 0.2111]}, {"w": "to", "b": [0.709, 0.196, 0.7257, 0.2111]}, {"w": "ensure", "b": [0.7323, 0.196, 0.7848, 0.2111]}, {"w": "that", "b": [0.7914, 0.196, 0.8259, 0.2111]}, {"w": "your", "b": [0.8326, 0.196, 0.8692, 0.2111]}, {"w": "dishes", "b": [0.1312, 0.214, 0.1802, 0.229]}, {"w": "stay", "b": [0.1864, 0.214, 0.2197, 0.229]}, {"w": "top", "b": [0.2259, 0.214, 0.2528, 0.229]}, {"w": "notch", "b": [0.259, 0.214, 0.3041, 0.229]}, {"w": "even", "b": [0.3103, 0.214, 0.3466, 0.229]}, {"w": "if", "b": [0.3528, 0.214, 0.3637, 0.229]}, {"w": "the", "b": [0.3698, 0.214, 0.3958, 0.229]}, {"w": "delivery", "b": [0.4019, 0.214, 0.4658, 0.229]}, {"w": "truck", "b": [0.472, 0.214, 0.5146, 0.229]}, {"w": "brings", "b": [0.5207, 0.214, 0.5707, 0.229]}, {"w": "you", "b": [0.5768, 0.214, 0.6059, 0.229]}, {"w": "a", "b": [0.6121, 0.214, 0.6214, 0.229]}, {"w": "ton", "b": [0.6275, 0.214, 0.6545, 0.229]}, {"w": "of", "b": [0.6607, 0.214, 0.6757, 0.229]}, {"w": "potatoes", "b": [0.6819, 0.214, 0.7515, 0.229]}, {"w": "instead", "b": [0.7576, 0.214, 0.8159, 0.229]}, {"w": "of", "b": [0.822, 0.214, 0.8371, 0.229]}, {"w": "the", "b": [0.8432, 0.214, 0.8692, 0.229]}, {"w": "rice", "b": [0.1312, 0.2321, 0.1594, 0.2469]}, {"w": "you", "b": [0.1655, 0.2321, 0.1936, 0.2469]}, {"w": "ordered", "b": [0.1997, 0.2321, 0.2591, 0.2469]}, {"w": "(reliability", "b": [0.2652, 0.2321, 0.3454, 0.2469]}, {"w": "engineering).", "b": [0.3519, 0.2321, 0.4548, 0.2469]}, {"w": "This", "b": [0.463, 0.2321, 0.4983, 0.2469]}, {"w": "book", "b": [0.5043, 0.2321, 0.543, 0.2469]}, {"w": "is", "b": [0.5491, 0.2321, 0.5613, 0.2469]}, {"w": "one", "b": [0.5673, 0.2321, 0.5945, 0.2469]}, {"w": "of", "b": [0.6006, 0.2321, 0.6151, 0.2469]}, {"w": "the", "b": [0.6212, 0.2321, 0.6463, 0.2469]}, {"w": "few", "b": [0.6524, 0.2321, 0.679, 0.2469]}, {"w": "to", "b": [0.6851, 0.2321, 0.7012, 0.2469]}, {"w": "offer", "b": [0.7073, 0.2321, 0.742, 0.2469]}, {"w": "perspectives", "b": [0.748, 0.2321, 0.8438, 0.2469]}, {"w": "on", "b": [0.8499, 0.2321, 0.869, 0.2469]}, {"w": "each", "b": [0.1312, 0.2499, 0.1666, 0.2649]}, {"w": "step", "b": [0.1728, 0.2499, 0.2057, 0.2649]}, {"w": "of", "b": [0.2119, 0.2499, 0.2267, 0.2649]}, {"w": "the", "b": [0.2329, 0.2499, 0.2585, 0.2649]}, {"w": "end-to-end", "b": [0.2647, 0.2499, 0.3508, 0.2649]}, {"w": "process.", "b": [0.3569, 0.2499, 0.4203, 0.2649]}]}, {"id": "b_2", "type": "paragraph", "text": "Now would be a good moment for me to be blunt with you, dear reader. This book is pretty good. It is. Really. But it’s not perfect. It cuts corners on occasion — just like a professional machine learning engineer is wont to do — though on the whole it gets its message right. And, since it covers an area with rapidly-evolving best practices, it doesn’t pretend to offer the last word on the subject. But even if it were terribly sloppy, it would still be worth reading. Given how few comprehensive guides to Applied Machine Learning are out there, a coherent introduction to these topics is worth its weight in gold. I’m so glad this one is here!", "words": [{"w": "Now", "b": [0.1312, 0.277, 0.1664, 0.2918]}, {"w": "would", "b": [0.1725, 0.277, 0.2192, 0.2918]}, {"w": "be", "b": [0.2254, 0.277, 0.244, 0.2918]}, {"w": "a", "b": [0.2502, 0.277, 0.2592, 0.2918]}, {"w": "good", "b": [0.2654, 0.277, 0.3036, 0.2918]}, {"w": "moment", "b": [0.3097, 0.277, 0.3735, 0.2918]}, {"w": "for", "b": [0.3797, 0.277, 0.4014, 0.2918]}, {"w": "me", "b": [0.4075, 0.277, 0.4306, 0.2918]}, {"w": "to", "b": [0.4368, 0.277, 0.4528, 0.2918]}, {"w": "be", "b": [0.459, 0.277, 0.4776, 0.2918]}, {"w": "blunt", "b": [0.4838, 0.277, 0.5255, 0.2918]}, {"w": "with", "b": [0.5317, 0.277, 0.5668, 0.2918]}, {"w": "you,", "b": [0.573, 0.277, 0.6061, 0.2918]}, {"w": "dear", "b": [0.6123, 0.277, 0.6465, 0.2918]}, {"w": "reader.", "b": [0.6527, 0.277, 0.7071, 0.2918]}, {"w": "This", "b": [0.7153, 0.277, 0.7506, 0.2918]}, {"w": "book", "b": [0.7567, 0.277, 0.7954, 0.2918]}, {"w": "is", "b": [0.8014, 0.277, 0.8143, 0.2918]}, {"w": "pretty", "b": [0.8212, 0.277, 0.8695, 0.2918]}, {"w": "good.", "b": [0.1312, 0.2949, 0.1745, 0.3097]}, {"w": "It", "b": [0.1825, 0.2949, 0.1961, 0.3097]}, {"w": "is.", "b": [0.2019, 0.2949, 0.219, 0.3097]}, {"w": "Really.", "b": [0.2271, 0.2949, 0.2806, 0.3097]}, {"w": "But", "b": [0.2887, 0.2949, 0.3185, 0.3097]}, {"w": "it’s", "b": [0.3243, 0.2949, 0.3485, 0.3097]}, {"w": "not", "b": [0.3543, 0.2949, 0.3804, 0.3097]}, {"w": "perfect.", "b": [0.3862, 0.2949, 0.4456, 0.3097]}, {"w": "It", "b": [0.4536, 0.2949, 0.4672, 0.3097]}, {"w": "cuts", "b": [0.473, 0.2949, 0.5052, 0.3097]}, {"w": "corners", "b": [0.511, 0.2949, 0.5675, 0.3097]}, {"w": "on", "b": [0.5733, 0.2949, 0.5924, 0.3097]}, {"w": "occasion", "b": [0.5981, 0.2949, 0.6641, 0.3097]}, {"w": "—", "b": [0.6698, 0.2949, 0.6879, 0.3097]}, {"w": "just", "b": [0.6937, 0.2949, 0.7234, 0.3097]}, {"w": "like", "b": [0.7292, 0.2949, 0.7563, 0.3097]}, {"w": "a", "b": [0.7621, 0.2949, 0.7711, 0.3097]}, {"w": "professional", "b": [0.7769, 0.2949, 0.8691, 0.3097]}, {"w": "machine", "b": [0.1312, 0.3126, 0.1987, 0.3277]}, {"w": "learning", "b": [0.2053, 0.3126, 0.2713, 0.3277]}, {"w": "engineer", "b": [0.2779, 0.3126, 0.3459, 0.3277]}, {"w": "is", "b": [0.3526, 0.3126, 0.3652, 0.3277]}, {"w": "wont", "b": [0.3718, 0.3126, 0.4116, 0.3277]}, {"w": "to", "b": [0.4182, 0.3126, 0.4349, 0.3277]}, {"w": "do", "b": [0.4415, 0.3126, 0.4614, 0.3277]}, {"w": "—", "b": [0.468, 0.3126, 0.4868, 0.3277]}, {"w": "though", "b": [0.4934, 0.3126, 0.551, 0.3277]}, {"w": "on", "b": [0.5576, 0.3126, 0.5775, 0.3277]}, {"w": "the", "b": [0.5841, 0.3126, 0.6102, 0.3277]}, {"w": "whole", "b": [0.6168, 0.3126, 0.6639, 0.3277]}, {"w": "it", "b": [0.6705, 0.3126, 0.6831, 0.3277]}, {"w": "gets", "b": [0.6897, 0.3126, 0.7222, 0.3277]}, {"w": "its", "b": [0.7288, 0.3126, 0.7488, 0.3277]}, {"w": "message", "b": [0.7554, 0.3126, 0.8215, 0.3277]}, {"w": "right.", "b": [0.8281, 0.3126, 0.8727, 0.3277]}, {"w": "And,", "b": [0.1305, 0.3307, 0.1701, 0.3456]}, {"w": "since", "b": [0.1762, 0.3307, 0.2154, 0.3456]}, {"w": "it", "b": [0.2216, 0.3307, 0.2339, 0.3456]}, {"w": "covers", "b": [0.24, 0.3307, 0.289, 0.3456]}, {"w": "an", "b": [0.2952, 0.3307, 0.3147, 0.3456]}, {"w": "area", "b": [0.3208, 0.3307, 0.3548, 0.3456]}, {"w": "with", "b": [0.361, 0.3307, 0.3969, 0.3456]}, {"w": "rapidly-evolving", "b": [0.4031, 0.3307, 0.5326, 0.3456]}, {"w": "best", "b": [0.5387, 0.3307, 0.5722, 0.3456]}, {"w": "practices,", "b": [0.5784, 0.3307, 0.6546, 0.3456]}, {"w": "it", "b": [0.6608, 0.3307, 0.6731, 0.3456]}, {"w": "doesn’t", "b": [0.6792, 0.3307, 0.7374, 0.3456]}, {"w": "pretend", "b": [0.7436, 0.3307, 0.8053, 0.3456]}, {"w": "to", "b": [0.8114, 0.3307, 0.8279, 0.3456]}, {"w": "offer", "b": [0.834, 0.3307, 0.8695, 0.3456]}, {"w": "the", "b": [0.1312, 0.3485, 0.1574, 0.3636]}, {"w": "last", "b": [0.1646, 0.3485, 0.194, 0.3636]}, {"w": "word", "b": [0.2013, 0.3485, 0.2416, 0.3636]}, {"w": "on", "b": [0.2488, 0.3485, 0.2687, 0.3636]}, {"w": "the", "b": [0.2759, 0.3485, 0.3021, 0.3636]}, {"w": "subject.", "b": [0.3093, 0.3485, 0.3732, 0.3636]}, {"w": "But", "b": [0.3847, 0.3485, 0.4158, 0.3636]}, {"w": "even", "b": [0.423, 0.3485, 0.4597, 0.3636]}, {"w": "if", "b": [0.4669, 0.3485, 0.4779, 0.3636]}, {"w": "it", "b": [0.4851, 0.3485, 0.4977, 0.3636]}, {"w": "were", "b": [0.5049, 0.3485, 0.5421, 0.3636]}, {"w": "terribly", "b": [0.5494, 0.3485, 0.6107, 0.3636]}, {"w": "sloppy,", "b": [0.6179, 0.3485, 0.674, 0.3636]}, {"w": "it", "b": [0.6815, 0.3485, 0.6941, 0.3636]}, {"w": "would", "b": [0.7013, 0.3485, 0.75, 0.3636]}, {"w": "still", "b": [0.7572, 0.3485, 0.7877, 0.3636]}, {"w": "be", "b": [0.7949, 0.3485, 0.8142, 0.3636]}, {"w": "worth", "b": [0.8215, 0.3485, 0.8691, 0.3636]}, {"w": "reading.", "b": [0.1312, 0.3666, 0.1951, 0.3815]}, {"w": "Given", "b": [0.2033, 0.3666, 0.2501, 0.3815]}, {"w": "how", "b": [0.2562, 0.3666, 0.2881, 0.3815]}, {"w": "few", "b": [0.2943, 0.3666, 0.3211, 0.3815]}, {"w": "comprehensive", "b": [0.3273, 0.3666, 0.4429, 0.3815]}, {"w": "guides", "b": [0.4491, 0.3666, 0.4988, 0.3815]}, {"w": "to", "b": [0.505, 0.3666, 0.5212, 0.3815]}, {"w": "Applied", "b": [0.5273, 0.3666, 0.5897, 0.3815]}, {"w": "Machine", "b": [0.5958, 0.3666, 0.6627, 0.3815]}, {"w": "Learning", "b": [0.6688, 0.3666, 0.739, 0.3815]}, {"w": "are", "b": [0.7452, 0.3666, 0.7696, 0.3815]}, {"w": "out", "b": [0.7757, 0.3666, 0.8021, 0.3815]}, {"w": "there,", "b": [0.8082, 0.3666, 0.8539, 0.3815]}, {"w": "a", "b": [0.86, 0.3666, 0.8691, 0.3815]}, {"w": "coherent", "b": [0.1312, 0.3846, 0.1981, 0.3994]}, {"w": "introduction", "b": [0.2043, 0.3846, 0.3018, 0.3994]}, {"w": "to", "b": [0.3079, 0.3846, 0.324, 0.3994]}, {"w": "these", "b": [0.3302, 0.3846, 0.3705, 0.3994]}, {"w": "topics", "b": [0.3766, 0.3846, 0.423, 0.3994]}, {"w": "is", "b": [0.4291, 0.3846, 0.4413, 0.3994]}, {"w": "worth", "b": [0.4474, 0.3846, 0.4932, 0.3994]}, {"w": "its", "b": [0.4993, 0.3846, 0.5185, 0.3994]}, {"w": "weight", "b": [0.5247, 0.3846, 0.5759, 0.3994]}, {"w": "in", "b": [0.5821, 0.3846, 0.5972, 0.3994]}, {"w": "gold.", "b": [0.6033, 0.3846, 0.6415, 0.3994]}, {"w": "I’m", "b": [0.6497, 0.3846, 0.6763, 0.3994]}, {"w": "so", "b": [0.6824, 0.3846, 0.6986, 0.3994]}, {"w": "glad", "b": [0.7048, 0.3846, 0.7379, 0.3994]}, {"w": "this", "b": [0.7441, 0.3846, 0.7733, 0.3994]}, {"w": "one", "b": [0.7795, 0.3846, 0.8066, 0.3994]}, {"w": "is", "b": [0.8128, 0.3846, 0.8249, 0.3994]}, {"w": "here!", "b": [0.8311, 0.3846, 0.8693, 0.3994]}]}, {"id": "b_3", "type": "paragraph", "text": "One of my favorite things about this book is how fully it embraces the most important thing you need to know about machine learning: mistakes are possible. . . and sometimes they hurt. As my colleagues in site reliability engineering love to say, “Hope is not a strategy.” Hoping that there will be no mistakes is the worst approach you can take. This book does so much better. It promptly shatters any false sense of security you were tempted to have about building an AI system that is more “intelligent” than you are. (Um, no. Just no.) Then it diligently takes you through a survey of all kinds of things that can go wrong in practice and how to prevent/detect/handle them. This book does a great job of outlining the importance of monitoring, how to approach model maintenance, what to do when things go wrong, how to think about fallback strategies for the kinds of mistakes you can’t anticipate, how to deal with adversaries who try to exploit your system, and how to manage the expectations of your human users (there’s also a section on what to do when your, er, users are machines). These are hugely important topics in practical machine learning, but they’re so often neglected in other books. Not here.", "words": [{"w": "One", "b": [0.1312, 0.4116, 0.1634, 0.4264]}, {"w": "of", "b": [0.1696, 0.4116, 0.1841, 0.4264]}, {"w": "my", "b": [0.1903, 0.4116, 0.2144, 0.4264]}, {"w": "favorite", "b": [0.2205, 0.4116, 0.2799, 0.4264]}, {"w": "things", "b": [0.286, 0.4116, 0.3344, 0.4264]}, {"w": "about", "b": [0.3405, 0.4116, 0.3863, 0.4264]}, {"w": "this", "b": [0.3924, 0.4116, 0.4217, 0.4264]}, {"w": "book", "b": [0.4278, 0.4116, 0.4665, 0.4264]}, {"w": "is", "b": [0.4727, 0.4116, 0.4849, 0.4264]}, {"w": "how", "b": [0.491, 0.4116, 0.5227, 0.4264]}, {"w": "fully", "b": [0.5288, 0.4116, 0.564, 0.4264]}, {"w": "it", "b": [0.5702, 0.4116, 0.5822, 0.4264]}, {"w": "embraces", "b": [0.5884, 0.4116, 0.6604, 0.4264]}, {"w": "the", "b": [0.6665, 0.4116, 0.6917, 0.4264]}, {"w": "most", "b": [0.6978, 0.4116, 0.7361, 0.4264]}, {"w": "important", "b": [0.7423, 0.4116, 0.8217, 0.4264]}, {"w": "thing", "b": [0.8278, 0.4116, 0.8691, 0.4264]}, {"w": "you", "b": [0.1308, 0.4295, 0.159, 0.4443]}, {"w": "need", "b": [0.1652, 0.4295, 0.2016, 0.4443]}, {"w": "to", "b": [0.2077, 0.4295, 0.2239, 0.4443]}, {"w": "know", "b": [0.23, 0.4295, 0.2714, 0.4443]}, {"w": "about", "b": [0.2776, 0.4295, 0.3235, 0.4443]}, {"w": "machine", "b": [0.3297, 0.4295, 0.3948, 0.4443]}, {"w": "learning:", "b": [0.401, 0.4295, 0.4697, 0.4443]}, {"w": "mistakes", "b": [0.4779, 0.4295, 0.5458, 0.4443]}, {"w": "are", "b": [0.552, 0.4295, 0.5763, 0.4443]}, {"w": "possible.", "b": [0.5824, 0.4295, 0.6498, 0.4443]}, {"w": ".", "b": [0.6529, 0.4295, 0.6579, 0.4443]}, {"w": ".", "b": [0.661, 0.4295, 0.6661, 0.4443]}, {"w": "and", "b": [0.6691, 0.4295, 0.6984, 0.4443]}, {"w": "sometimes", "b": [0.7046, 0.4295, 0.7866, 0.4443]}, {"w": "they", "b": [0.7927, 0.4295, 0.8276, 0.4443]}, {"w": "hurt.", "b": [0.8337, 0.4295, 0.8727, 0.4443]}, {"w": "As", "b": [0.1305, 0.4473, 0.1516, 0.4623]}, {"w": "my", "b": [0.1577, 0.4473, 0.1823, 0.4623]}, {"w": "colleagues", "b": [0.1884, 0.4473, 0.2683, 0.4623]}, {"w": "in", "b": [0.2744, 0.4473, 0.2898, 0.4623]}, {"w": "site", "b": [0.2959, 0.4473, 0.3236, 0.4623]}, {"w": "reliability", "b": [0.3298, 0.4473, 0.4065, 0.4623]}, {"w": "engineering", "b": [0.4126, 0.4473, 0.5037, 0.4623]}, {"w": "love", "b": [0.5098, 0.4473, 0.541, 0.4623]}, {"w": "to", "b": [0.5472, 0.4473, 0.5635, 0.4623]}, {"w": "say,", "b": [0.5697, 0.4473, 0.5989, 0.4623]}, {"w": "“Hope", "b": [0.605, 0.4473, 0.6556, 0.4623]}, {"w": "is", "b": [0.6618, 0.4473, 0.6742, 0.4623]}, {"w": "not", "b": [0.6803, 0.4473, 0.7069, 0.4623]}, {"w": "a", "b": [0.713, 0.4473, 0.7222, 0.4623]}, {"w": "strategy.”", "b": [0.7284, 0.4473, 0.8031, 0.4623]}, {"w": "Hoping", "b": [0.8113, 0.4473, 0.8691, 0.4623]}, {"w": "that", "b": [0.1312, 0.4653, 0.165, 0.4802]}, {"w": "there", "b": [0.1712, 0.4653, 0.2122, 0.4802]}, {"w": "will", "b": [0.2184, 0.4653, 0.247, 0.4802]}, {"w": "be", "b": [0.2532, 0.4653, 0.2721, 0.4802]}, {"w": "no", "b": [0.2783, 0.4653, 0.2977, 0.4802]}, {"w": "mistakes", "b": [0.3039, 0.4653, 0.3727, 0.4802]}, {"w": "is", "b": [0.3789, 0.4653, 0.3913, 0.4802]}, {"w": "the", "b": [0.3974, 0.4653, 0.423, 0.4802]}, {"w": "worst", "b": [0.4291, 0.4653, 0.4728, 0.4802]}, {"w": "approach", "b": [0.479, 0.4653, 0.5523, 0.4802]}, {"w": "you", "b": [0.5584, 0.4653, 0.5871, 0.4802]}, {"w": "can", "b": [0.5932, 0.4653, 0.6209, 0.4802]}, {"w": "take.", "b": [0.627, 0.4653, 0.666, 0.4802]}, {"w": "This", "b": [0.6742, 0.4653, 0.7101, 0.4802]}, {"w": "book", "b": [0.7163, 0.4653, 0.7557, 0.4802]}, {"w": "does", "b": [0.7618, 0.4653, 0.7973, 0.4802]}, {"w": "so", "b": [0.8034, 0.4653, 0.8199, 0.4802]}, {"w": "much", "b": [0.8261, 0.4653, 0.8691, 0.4802]}, {"w": "better.", "b": [0.1312, 0.4831, 0.1862, 0.4982]}, {"w": "It", "b": [0.1977, 0.4831, 0.2118, 0.4982]}, {"w": "promptly", "b": [0.219, 0.4831, 0.2949, 0.4982]}, {"w": "shatters", "b": [0.3022, 0.4831, 0.3673, 0.4982]}, {"w": "any", "b": [0.3745, 0.4831, 0.4038, 0.4982]}, {"w": "false", "b": [0.4111, 0.4831, 0.4473, 0.4982]}, {"w": "sense", "b": [0.4545, 0.4831, 0.4966, 0.4982]}, {"w": "of", "b": [0.5038, 0.4831, 0.519, 0.4982]}, {"w": "security", "b": [0.5262, 0.4831, 0.5902, 0.4982]}, {"w": "you", "b": [0.5975, 0.4831, 0.6268, 0.4982]}, {"w": "were", "b": [0.634, 0.4831, 0.6712, 0.4982]}, {"w": "tempted", "b": [0.6784, 0.4831, 0.7464, 0.4982]}, {"w": "to", "b": [0.7537, 0.4831, 0.7704, 0.4982]}, {"w": "have", "b": [0.7776, 0.4831, 0.8148, 0.4982]}, {"w": "about", "b": [0.8221, 0.4831, 0.8696, 0.4982]}, {"w": "building", "b": [0.1312, 0.5011, 0.1977, 0.5161]}, {"w": "an", "b": [0.2038, 0.5011, 0.2235, 0.5161]}, {"w": "AI", "b": [0.2297, 0.5011, 0.2504, 0.5161]}, {"w": "system", "b": [0.2566, 0.5011, 0.3123, 0.5161]}, {"w": "that", "b": [0.3184, 0.5011, 0.3527, 0.5161]}, {"w": "is", "b": [0.3588, 0.5011, 0.3714, 0.5161]}, {"w": "more", "b": [0.3775, 0.5011, 0.4181, 0.5161]}, {"w": "“intelligent”", "b": [0.4242, 0.5011, 0.5228, 0.5161]}, {"w": "than", "b": [0.5289, 0.5011, 0.5663, 0.5161]}, {"w": "you", "b": [0.5724, 0.5011, 0.6015, 0.5161]}, {"w": "are.", "b": [0.6077, 0.5011, 0.6378, 0.5161]}, {"w": "(Um,", "b": [0.646, 0.5011, 0.688, 0.5161]}, {"w": "no.", "b": [0.6942, 0.5011, 0.7191, 0.5161]}, {"w": "Just", "b": [0.7273, 0.5011, 0.7619, 0.5161]}, {"w": "no.)", "b": [0.768, 0.5011, 0.8002, 0.5161]}, {"w": "Then", "b": [0.8084, 0.5011, 0.8509, 0.5161]}, {"w": "it", "b": [0.8571, 0.5011, 0.8695, 0.5161]}, {"w": "diligently", "b": [0.1312, 0.5192, 0.2046, 0.534]}, {"w": "takes", "b": [0.2106, 0.5192, 0.2509, 0.534]}, {"w": "you", "b": [0.2569, 0.5192, 0.285, 0.534]}, {"w": "through", "b": [0.291, 0.5192, 0.3534, 0.534]}, {"w": "a", "b": [0.3594, 0.5192, 0.3684, 0.534]}, {"w": "survey", "b": [0.3744, 0.5192, 0.4254, 0.534]}, {"w": "of", "b": [0.4314, 0.5192, 0.4459, 0.534]}, {"w": "all", "b": [0.4519, 0.5192, 0.471, 0.534]}, {"w": "kinds", "b": [0.477, 0.5192, 0.5189, 0.534]}, {"w": "of", "b": [0.5249, 0.5192, 0.5394, 0.534]}, {"w": "things", "b": [0.5455, 0.5192, 0.5938, 0.534]}, {"w": "that", "b": [0.5998, 0.5192, 0.633, 0.534]}, {"w": "can", "b": [0.639, 0.5192, 0.6661, 0.534]}, {"w": "go", "b": [0.6721, 0.5192, 0.6902, 0.534]}, {"w": "wrong", "b": [0.6962, 0.5192, 0.7445, 0.534]}, {"w": "in", "b": [0.7505, 0.5192, 0.7656, 0.534]}, {"w": "practice", "b": [0.7716, 0.5192, 0.8339, 0.534]}, {"w": "and", "b": [0.84, 0.5192, 0.8691, 0.534]}, {"w": "how", "b": [0.1312, 0.5371, 0.1631, 0.552]}, {"w": "to", "b": [0.1692, 0.5371, 0.1854, 0.552]}, {"w": "prevent/detect/handle", "b": [0.1915, 0.5371, 0.37, 0.552]}, {"w": "them.", "b": [0.3762, 0.5371, 0.4217, 0.552]}, {"w": "This", "b": [0.4299, 0.5371, 0.4653, 0.552]}, {"w": "book", "b": [0.4715, 0.5371, 0.5104, 0.552]}, {"w": "does", "b": [0.5165, 0.5371, 0.5515, 0.552]}, {"w": "a", "b": [0.5577, 0.5371, 0.5668, 0.552]}, {"w": "great", "b": [0.5729, 0.5371, 0.6134, 0.552]}, {"w": "job", "b": [0.6195, 0.5371, 0.6443, 0.552]}, {"w": "of", "b": [0.6504, 0.5371, 0.6651, 0.552]}, {"w": "outlining", "b": [0.6712, 0.5371, 0.742, 0.552]}, {"w": "the", "b": [0.7481, 0.5371, 0.7734, 0.552]}, {"w": "importance", "b": [0.7796, 0.5371, 0.8691, 0.552]}, {"w": "of", "b": [0.1312, 0.5551, 0.146, 0.57]}, {"w": "monitoring,", "b": [0.1521, 0.5551, 0.2447, 0.57]}, {"w": "how", "b": [0.2509, 0.5551, 0.2829, 0.57]}, {"w": "to", "b": [0.2891, 0.5551, 0.3054, 0.57]}, {"w": "approach", "b": [0.3115, 0.5551, 0.3843, 0.57]}, {"w": "model", "b": [0.3905, 0.5551, 0.4388, 0.57]}, {"w": "maintenance,", "b": [0.4449, 0.5551, 0.5502, 0.57]}, {"w": "what", "b": [0.5564, 0.5551, 0.596, 0.57]}, {"w": "to", "b": [0.6022, 0.5551, 0.6185, 0.57]}, {"w": "do", "b": [0.6246, 0.5551, 0.6439, 0.57]}, {"w": "when", "b": [0.6501, 0.5551, 0.6918, 0.57]}, {"w": "things", "b": [0.698, 0.5551, 0.7469, 0.57]}, {"w": "go", "b": [0.7531, 0.5551, 0.7714, 0.57]}, {"w": "wrong,", "b": [0.7775, 0.5551, 0.8315, 0.57]}, {"w": "how", "b": [0.8376, 0.5551, 0.8697, 0.57]}, {"w": "to", "b": [0.1312, 0.573, 0.1475, 0.5879]}, {"w": "think", "b": [0.1536, 0.573, 0.1957, 0.5879]}, {"w": "about", "b": [0.2018, 0.573, 0.248, 0.5879]}, {"w": "fallback", "b": [0.2541, 0.573, 0.3155, 0.5879]}, {"w": "strategies", "b": [0.3217, 0.573, 0.397, 0.5879]}, {"w": "for", "b": [0.4031, 0.573, 0.425, 0.5879]}, {"w": "the", "b": [0.4311, 0.573, 0.4565, 0.5879]}, {"w": "kinds", "b": [0.4626, 0.573, 0.5048, 0.5879]}, {"w": "of", "b": [0.511, 0.573, 0.5257, 0.5879]}, {"w": "mistakes", "b": [0.5318, 0.573, 0.6, 0.5879]}, {"w": "you", "b": [0.6061, 0.573, 0.6345, 0.5879]}, {"w": "can’t", "b": [0.6407, 0.573, 0.6802, 0.5879]}, {"w": "anticipate,", "b": [0.6864, 0.573, 0.77, 0.5879]}, {"w": "how", "b": [0.7762, 0.573, 0.8081, 0.5879]}, {"w": "to", "b": [0.8143, 0.573, 0.8305, 0.5879]}, {"w": "deal", "b": [0.8366, 0.573, 0.8691, 0.5879]}, {"w": "with", "b": [0.1306, 0.591, 0.1657, 0.6058]}, {"w": "adversaries", "b": [0.1715, 0.591, 0.2582, 0.6058]}, {"w": "who", "b": [0.264, 0.591, 0.2961, 0.6058]}, {"w": "try", "b": [0.3019, 0.591, 0.3256, 0.6058]}, {"w": "to", "b": [0.3313, 0.591, 0.3474, 0.6058]}, {"w": "exploit", "b": [0.3532, 0.591, 0.4069, 0.6058]}, {"w": "your", "b": [0.4127, 0.591, 0.4479, 0.6058]}, {"w": "system,", "b": [0.4536, 0.591, 0.5126, 0.6058]}, {"w": "and", "b": [0.5185, 0.591, 0.5476, 0.6058]}, {"w": "how", "b": [0.5534, 0.591, 0.585, 0.6058]}, {"w": "to", "b": [0.5908, 0.591, 0.6068, 0.6058]}, {"w": "manage", "b": [0.6126, 0.591, 0.6729, 0.6058]}, {"w": "the", "b": [0.6786, 0.591, 0.7038, 0.6058]}, {"w": "expectations", "b": [0.7095, 0.591, 0.8081, 0.6058]}, {"w": "of", "b": [0.8139, 0.591, 0.8285, 0.6058]}, {"w": "your", "b": [0.8342, 0.591, 0.8694, 0.6058]}, {"w": "human", "b": [0.1312, 0.609, 0.1852, 0.6238]}, {"w": "users", "b": [0.1913, 0.609, 0.2309, 0.6238]}, {"w": "(there’s", "b": [0.237, 0.609, 0.2967, 0.6238]}, {"w": "also", "b": [0.3029, 0.609, 0.3332, 0.6238]}, {"w": "a", "b": [0.3393, 0.609, 0.3484, 0.6238]}, {"w": "section", "b": [0.3546, 0.609, 0.4091, 0.6238]}, {"w": "on", "b": [0.4153, 0.609, 0.4344, 0.6238]}, {"w": "what", "b": [0.4406, 0.609, 0.4799, 0.6238]}, {"w": "to", "b": [0.486, 0.609, 0.5022, 0.6238]}, {"w": "do", "b": [0.5083, 0.609, 0.5275, 0.6238]}, {"w": "when", "b": [0.5336, 0.609, 0.575, 0.6238]}, {"w": "your,", "b": [0.5811, 0.609, 0.6215, 0.6238]}, {"w": "er,", "b": [0.6276, 0.609, 0.6479, 0.6238]}, {"w": "users", "b": [0.654, 0.609, 0.6936, 0.6238]}, {"w": "are", "b": [0.6998, 0.609, 0.724, 0.6238]}, {"w": "machines).", "b": [0.7302, 0.609, 0.8144, 0.6238]}, {"w": "These", "b": [0.8227, 0.609, 0.8691, 0.6238]}, {"w": "are", "b": [0.1312, 0.6268, 0.1559, 0.6418]}, {"w": "hugely", "b": [0.1621, 0.6268, 0.2144, 0.6418]}, {"w": "important", "b": [0.2206, 0.6268, 0.3017, 0.6418]}, {"w": "topics", "b": [0.3079, 0.6268, 0.3552, 0.6418]}, {"w": "in", "b": [0.3613, 0.6268, 0.3767, 0.6418]}, {"w": "practical", "b": [0.3829, 0.6268, 0.4527, 0.6418]}, {"w": "machine", "b": [0.4589, 0.6268, 0.5251, 0.6418]}, {"w": "learning,", "b": [0.5312, 0.6268, 0.6011, 0.6418]}, {"w": "but", "b": [0.6072, 0.6268, 0.635, 0.6418]}, {"w": "they’re", "b": [0.6411, 0.6268, 0.6971, 0.6418]}, {"w": "so", "b": [0.7033, 0.6268, 0.7198, 0.6418]}, {"w": "often", "b": [0.7259, 0.6268, 0.7665, 0.6418]}, {"w": "neglected", "b": [0.7727, 0.6268, 0.8476, 0.6418]}, {"w": "in", "b": [0.8537, 0.6268, 0.8691, 0.6418]}, {"w": "other", "b": [0.1312, 0.6447, 0.1733, 0.6597]}, {"w": "books.", "b": [0.1795, 0.6447, 0.2314, 0.6597]}, {"w": "Not", "b": [0.2396, 0.6447, 0.2698, 0.6597]}, {"w": "here.", "b": [0.2759, 0.6447, 0.315, 0.6597]}]}, {"id": "b_4", "type": "paragraph", "text": "If you intend to use machine learning to solve business problems at scale, I’m delighted you got your hands on this book. Enjoy!", "words": [{"w": "If", "b": [0.1312, 0.6717, 0.1435, 0.6866]}, {"w": "you", "b": [0.1497, 0.6717, 0.1783, 0.6866]}, {"w": "intend", "b": [0.1844, 0.6717, 0.235, 0.6866]}, {"w": "to", "b": [0.2412, 0.6717, 0.2575, 0.6866]}, {"w": "use", "b": [0.2637, 0.6717, 0.2893, 0.6866]}, {"w": "machine", "b": [0.2955, 0.6717, 0.3614, 0.6866]}, {"w": "learning", "b": [0.3675, 0.6717, 0.4319, 0.6866]}, {"w": "to", "b": [0.4381, 0.6717, 0.4544, 0.6866]}, {"w": "solve", "b": [0.4606, 0.6717, 0.4995, 0.6866]}, {"w": "business", "b": [0.5057, 0.6717, 0.5714, 0.6866]}, {"w": "problems", "b": [0.5776, 0.6717, 0.6502, 0.6866]}, {"w": "at", "b": [0.6564, 0.6717, 0.6728, 0.6866]}, {"w": "scale,", "b": [0.6789, 0.6717, 0.7219, 0.6866]}, {"w": "I’m", "b": [0.7281, 0.6717, 0.7552, 0.6866]}, {"w": "delighted", "b": [0.7613, 0.6717, 0.8344, 0.6866]}, {"w": "you", "b": [0.8405, 0.6717, 0.8691, 0.6866]}, {"w": "got", "b": [0.1312, 0.6896, 0.1569, 0.7046]}, {"w": "your", "b": [0.163, 0.6896, 0.199, 0.7046]}, {"w": "hands", "b": [0.2051, 0.6896, 0.2524, 0.7046]}, {"w": "on", "b": [0.2585, 0.6896, 0.278, 0.7046]}, {"w": "this", "b": [0.2842, 0.6896, 0.314, 0.7046]}, {"w": "book.", "b": [0.3202, 0.6896, 0.3648, 0.7046]}, {"w": "Enjoy!", "b": [0.373, 0.6896, 0.425, 0.7046]}]}, {"id": "b_5", "type": "paragraph", "text": "Cassie Kozyrkov", "words": [{"w": "Cassie", "b": [0.7368, 0.7165, 0.7872, 0.7315]}, {"w": "Kozyrkov", "b": [0.7934, 0.7165, 0.8693, 0.7315]}]}, {"id": "b_6", "type": "paragraph", "text": "September 2020", "words": [{"w": "September", "b": [0.7411, 0.7435, 0.8262, 0.7584]}, {"w": "2020", "b": [0.8324, 0.7435, 0.8693, 0.7584]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "4", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 5, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 6, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 7, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Preface", "words": [{"w": "Preface", "b": [0.1312, 0.0833, 0.2281, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "During the past several years, machine learning (ML), for many, has become a synonym for artificial intelligence. Even though machine learning, as a field of science, has existed for several decades, only a handful of organizations in the world have fully harnessed its potential. Despite the availability of modern open-source machine learning libraries, packages and frameworks supported by the leading organizations and broad communities of scientists and software engineers, most organizations are still struggling to apply machine learning for solving practical business problems.", "words": [{"w": "During", "b": [0.1312, 0.13, 0.1886, 0.1451]}, {"w": "the", "b": [0.1956, 0.13, 0.2218, 0.1451]}, {"w": "past", "b": [0.2289, 0.13, 0.2635, 0.1451]}, {"w": "several", "b": [0.2706, 0.13, 0.3262, 0.1451]}, {"w": "years,", "b": [0.3333, 0.13, 0.3806, 0.1451]}, {"w": "machine", "b": [0.3879, 0.13, 0.4554, 0.1451]}, {"w": "learning", "b": [0.4625, 0.13, 0.5284, 0.1451]}, {"w": "(ML),", "b": [0.5355, 0.13, 0.5844, 0.1451]}, {"w": "for", "b": [0.5915, 0.13, 0.614, 0.1451]}, {"w": "many,", "b": [0.6211, 0.13, 0.6698, 0.1451]}, {"w": "has", "b": [0.6771, 0.13, 0.7044, 0.1451]}, {"w": "become", "b": [0.7115, 0.13, 0.7727, 0.1451]}, {"w": "a", "b": [0.7798, 0.13, 0.7892, 0.1451]}, {"w": "synonym", "b": [0.7963, 0.13, 0.8691, 0.1451]}, {"w": "for", "b": [0.1312, 0.148, 0.1538, 0.1631]}, {"w": "artificial", "b": [0.1605, 0.148, 0.2286, 0.1631]}, {"w": "intelligence.", "b": [0.2353, 0.148, 0.3321, 0.1631]}, {"w": "Even", "b": [0.342, 0.148, 0.3831, 0.1631]}, {"w": "though", "b": [0.3899, 0.148, 0.4474, 0.1631]}, {"w": "machine", "b": [0.4541, 0.148, 0.5216, 0.1631]}, {"w": "learning,", "b": [0.5283, 0.148, 0.5995, 0.1631]}, {"w": "as", "b": [0.6064, 0.148, 0.6232, 0.1631]}, {"w": "a", "b": [0.63, 0.148, 0.6394, 0.1631]}, {"w": "field", "b": [0.6461, 0.148, 0.6807, 0.1631]}, {"w": "of", "b": [0.6874, 0.148, 0.7026, 0.1631]}, {"w": "science,", "b": [0.7093, 0.148, 0.7711, 0.1631]}, {"w": "has", "b": [0.778, 0.148, 0.8053, 0.1631]}, {"w": "existed", "b": [0.8121, 0.148, 0.8692, 0.1631]}, {"w": "for", "b": [0.1312, 0.1659, 0.1538, 0.181]}, {"w": "several", "b": [0.1609, 0.1659, 0.2165, 0.181]}, {"w": "decades,", "b": [0.2236, 0.1659, 0.2918, 0.181]}, {"w": "only", "b": [0.2991, 0.1659, 0.3342, 0.181]}, {"w": "a", "b": [0.3413, 0.1659, 0.3507, 0.181]}, {"w": "handful", "b": [0.3578, 0.1659, 0.42, 0.181]}, {"w": "of", "b": [0.4272, 0.1659, 0.4423, 0.181]}, {"w": "organizations", "b": [0.4494, 0.1659, 0.5584, 0.181]}, {"w": "in", "b": [0.5655, 0.1659, 0.5812, 0.181]}, {"w": "the", "b": [0.5883, 0.1659, 0.6145, 0.181]}, {"w": "world", "b": [0.6216, 0.1659, 0.6671, 0.181]}, {"w": "have", "b": [0.6743, 0.1659, 0.7114, 0.181]}, {"w": "fully", "b": [0.7185, 0.1659, 0.7552, 0.181]}, {"w": "harnessed", "b": [0.7623, 0.1659, 0.8421, 0.181]}, {"w": "its", "b": [0.8492, 0.1659, 0.8692, 0.181]}, {"w": "potential.", "b": [0.1312, 0.1841, 0.2066, 0.1989]}, {"w": "Despite", "b": [0.2146, 0.1841, 0.2738, 0.1989]}, {"w": "the", "b": [0.2793, 0.1841, 0.3045, 0.1989]}, {"w": "availability", "b": [0.31, 0.1841, 0.3964, 0.1989]}, {"w": "of", "b": [0.4019, 0.1841, 0.4165, 0.1989]}, {"w": "modern", "b": [0.4221, 0.1841, 0.4819, 0.1989]}, {"w": "open-source", "b": [0.4875, 0.1841, 0.5806, 0.1989]}, {"w": "machine", "b": [0.5862, 0.1841, 0.651, 0.1989]}, {"w": "learning", "b": [0.6565, 0.1841, 0.7199, 0.1989]}, {"w": "libraries,", "b": [0.7255, 0.1841, 0.794, 0.1989]}, {"w": "packages", "b": [0.7997, 0.1841, 0.8691, 0.1989]}, {"w": "and", "b": [0.1312, 0.202, 0.1607, 0.2169]}, {"w": "frameworks", "b": [0.1669, 0.202, 0.258, 0.2169]}, {"w": "supported", "b": [0.2642, 0.202, 0.3441, 0.2169]}, {"w": "by", "b": [0.3503, 0.202, 0.3696, 0.2169]}, {"w": "the", "b": [0.3757, 0.202, 0.4011, 0.2169]}, {"w": "leading", "b": [0.4073, 0.202, 0.4642, 0.2169]}, {"w": "organizations", "b": [0.4704, 0.202, 0.5762, 0.2169]}, {"w": "and", "b": [0.5824, 0.202, 0.6118, 0.2169]}, {"w": "broad", "b": [0.618, 0.202, 0.6638, 0.2169]}, {"w": "communities", "b": [0.6699, 0.202, 0.7701, 0.2169]}, {"w": "of", "b": [0.7762, 0.202, 0.791, 0.2169]}, {"w": "scientists", "b": [0.7971, 0.202, 0.8691, 0.2169]}, {"w": "and", "b": [0.1312, 0.2199, 0.1607, 0.2348]}, {"w": "software", "b": [0.1669, 0.2199, 0.2327, 0.2348]}, {"w": "engineers,", "b": [0.2388, 0.2199, 0.3173, 0.2348]}, {"w": "most", "b": [0.3235, 0.2199, 0.3623, 0.2348]}, {"w": "organizations", "b": [0.3684, 0.2199, 0.4744, 0.2348]}, {"w": "are", "b": [0.4805, 0.2199, 0.505, 0.2348]}, {"w": "still", "b": [0.5112, 0.2199, 0.5408, 0.2348]}, {"w": "struggling", "b": [0.5469, 0.2199, 0.6264, 0.2348]}, {"w": "to", "b": [0.6326, 0.2199, 0.6489, 0.2348]}, {"w": "apply", "b": [0.655, 0.2199, 0.6993, 0.2348]}, {"w": "machine", "b": [0.7055, 0.2199, 0.7711, 0.2348]}, {"w": "learning", "b": [0.7772, 0.2199, 0.8414, 0.2348]}, {"w": "for", "b": [0.8475, 0.2199, 0.8695, 0.2348]}, {"w": "solving", "b": [0.1312, 0.2378, 0.1872, 0.2528]}, {"w": "practical", "b": [0.1934, 0.2378, 0.2632, 0.2528]}, {"w": "business", "b": [0.2693, 0.2378, 0.3353, 0.2528]}, {"w": "problems.", "b": [0.3414, 0.2378, 0.4195, 0.2528]}]}, {"id": "b_2", "type": "paragraph", "text": "One difficulty lies in the scarcity of talent. However, even when they have access to talented machine learning engineers and data analysts, in 2020, most organizations1 still spend between 31 and 90 days deploying one model, while 18 percent of companies are taking longer than 90 days — some spending more than a year productionizing. The main challenges organizations face when developing ML capabilities, such as model version control, reproducibility, and scaling, are rather engineering than scientific.", "words": [{"w": "One", "b": [0.1312, 0.2648, 0.1637, 0.2797]}, {"w": "difficulty", "b": [0.1698, 0.2648, 0.2397, 0.2797]}, {"w": "lies", "b": [0.2458, 0.2648, 0.2713, 0.2797]}, {"w": "in", "b": [0.2774, 0.2648, 0.2926, 0.2797]}, {"w": "the", "b": [0.2987, 0.2648, 0.3241, 0.2797]}, {"w": "scarcity", "b": [0.3302, 0.2648, 0.3911, 0.2797]}, {"w": "of", "b": [0.3973, 0.2648, 0.412, 0.2797]}, {"w": "talent.", "b": [0.4181, 0.2648, 0.4693, 0.2797]}, {"w": "However,", "b": [0.4775, 0.2648, 0.5499, 0.2797]}, {"w": "even", "b": [0.5561, 0.2648, 0.5915, 0.2797]}, {"w": "when", "b": [0.5976, 0.2648, 0.6392, 0.2797]}, {"w": "they", "b": [0.6453, 0.2648, 0.6803, 0.2797]}, {"w": "have", "b": [0.6864, 0.2648, 0.7224, 0.2797]}, {"w": "access", "b": [0.7285, 0.2648, 0.7764, 0.2797]}, {"w": "to", "b": [0.7825, 0.2648, 0.7987, 0.2797]}, {"w": "talented", "b": [0.8048, 0.2648, 0.8692, 0.2797]}, {"w": "machine", "b": [0.1312, 0.2828, 0.196, 0.2976]}, {"w": "learning", "b": [0.2008, 0.2828, 0.2641, 0.2976]}, {"w": "engineers", "b": [0.2689, 0.2828, 0.3414, 0.2976]}, {"w": "and", "b": [0.3462, 0.2828, 0.3753, 0.2976]}, {"w": "data", "b": [0.38, 0.2828, 0.4152, 0.2976]}, {"w": "analysts,", "b": [0.4199, 0.2828, 0.489, 0.2976]}, {"w": "in", "b": [0.494, 0.2828, 0.5091, 0.2976]}, {"w": "2020,", "b": [0.5138, 0.2828, 0.555, 0.2976]}, {"w": "most", "b": [0.56, 0.2828, 0.5983, 0.2976]}, {"w": "organizations1", "b": [0.6031, 0.2807, 0.7148, 0.2976]}, {"w": "still", "b": [0.7205, 0.2828, 0.7497, 0.2976]}, {"w": "spend", "b": [0.7545, 0.2828, 0.8003, 0.2976]}, {"w": "between", "b": [0.8051, 0.2828, 0.8689, 0.2976]}, {"w": "31", "b": [0.1308, 0.3007, 0.1489, 0.3155]}, {"w": "and", "b": [0.1546, 0.3007, 0.1838, 0.3155]}, {"w": "90", "b": [0.1896, 0.3007, 0.2076, 0.3155]}, {"w": "days", "b": [0.2134, 0.3007, 0.2487, 0.3155]}, {"w": "deploying", "b": [0.2545, 0.3007, 0.3299, 0.3155]}, {"w": "one", "b": [0.3357, 0.3007, 0.3628, 0.3155]}, {"w": "model,", "b": [0.3686, 0.3007, 0.4213, 0.3155]}, {"w": "while", "b": [0.4272, 0.3007, 0.4684, 0.3155]}, {"w": "18", "b": [0.4741, 0.3007, 0.4922, 0.3155]}, {"w": "percent", "b": [0.498, 0.3007, 0.5563, 0.3155]}, {"w": "of", "b": [0.5621, 0.3007, 0.5767, 0.3155]}, {"w": "companies", "b": [0.5825, 0.3007, 0.664, 0.3155]}, {"w": "are", "b": [0.6698, 0.3007, 0.6939, 0.3155]}, {"w": "taking", "b": [0.6997, 0.3007, 0.7495, 0.3155]}, {"w": "longer", "b": [0.7553, 0.3007, 0.8036, 0.3155]}, {"w": "than", "b": [0.8093, 0.3007, 0.8455, 0.3155]}, {"w": "90", "b": [0.8511, 0.3007, 0.8692, 0.3155]}, {"w": "days", "b": [0.1312, 0.3187, 0.1665, 0.3335]}, {"w": "—", "b": [0.1726, 0.3187, 0.1907, 0.3335]}, {"w": "some", "b": [0.1968, 0.3187, 0.2361, 0.3335]}, {"w": "spending", "b": [0.2422, 0.3187, 0.3122, 0.3335]}, {"w": "more", "b": [0.3183, 0.3187, 0.3575, 0.3335]}, {"w": "than", "b": [0.3636, 0.3187, 0.3998, 0.3335]}, {"w": "a", "b": [0.4059, 0.3187, 0.4149, 0.3335]}, {"w": "year", "b": [0.4211, 0.3187, 0.4543, 0.3335]}, {"w": "productionizing.", "b": [0.4604, 0.3187, 0.5886, 0.3335]}, {"w": "The", "b": [0.5968, 0.3187, 0.6279, 0.3335]}, {"w": "main", "b": [0.634, 0.3187, 0.6732, 0.3335]}, {"w": "challenges", "b": [0.6793, 0.3187, 0.7583, 0.3335]}, {"w": "organizations", "b": [0.7644, 0.3187, 0.8691, 0.3335]}, {"w": "face", "b": [0.1312, 0.3364, 0.1631, 0.3515]}, {"w": "when", "b": [0.1697, 0.3364, 0.2126, 0.3515]}, {"w": "developing", "b": [0.2191, 0.3364, 0.3059, 0.3515]}, {"w": "ML", "b": [0.3125, 0.3364, 0.3415, 0.3515]}, {"w": "capabilities,", "b": [0.348, 0.3364, 0.4454, 0.3515]}, {"w": "such", "b": [0.4521, 0.3364, 0.4883, 0.3515]}, {"w": "as", "b": [0.4948, 0.3364, 0.5117, 0.3515]}, {"w": "model", "b": [0.5182, 0.3364, 0.5679, 0.3515]}, {"w": "version", "b": [0.5744, 0.3364, 0.6321, 0.3515]}, {"w": "control,", "b": [0.6386, 0.3364, 0.7009, 0.3515]}, {"w": "reproducibility,", "b": [0.7076, 0.3364, 0.8322, 0.3515]}, {"w": "and", "b": [0.8388, 0.3364, 0.8692, 0.3515]}, {"w": "scaling,", "b": [0.1312, 0.3545, 0.1908, 0.3694]}, {"w": "are", "b": [0.197, 0.3545, 0.2216, 0.3694]}, {"w": "rather", "b": [0.2278, 0.3545, 0.2771, 0.3694]}, {"w": "engineering", "b": [0.2833, 0.3545, 0.3746, 0.3694]}, {"w": "than", "b": [0.3808, 0.3545, 0.4177, 0.3694]}, {"w": "scientific.", "b": [0.4238, 0.3545, 0.4983, 0.3694]}]}, {"id": "b_3", "type": "paragraph", "text": "There are plenty of good books on machine learning, both theoretical and hands-on. From a typical machine learning book, you can learn the types of machine learning, major families of algorithms, how they work, and how to build models from data using those algorithms.", "words": [{"w": "There", "b": [0.1306, 0.3815, 0.1771, 0.3963]}, {"w": "are", "b": [0.1833, 0.3815, 0.2076, 0.3963]}, {"w": "plenty", "b": [0.2138, 0.3815, 0.2628, 0.3963]}, {"w": "of", "b": [0.2689, 0.3815, 0.2836, 0.3963]}, {"w": "good", "b": [0.2898, 0.3815, 0.3282, 0.3963]}, {"w": "books", "b": [0.3343, 0.3815, 0.3805, 0.3963]}, {"w": "on", "b": [0.3866, 0.3815, 0.4058, 0.3963]}, {"w": "machine", "b": [0.412, 0.3815, 0.4772, 0.3963]}, {"w": "learning,", "b": [0.4833, 0.3815, 0.5521, 0.3963]}, {"w": "both", "b": [0.5583, 0.3815, 0.5952, 0.3963]}, {"w": "theoretical", "b": [0.6014, 0.3815, 0.6853, 0.3963]}, {"w": "and", "b": [0.6915, 0.3815, 0.7208, 0.3963]}, {"w": "hands-on.", "b": [0.727, 0.3815, 0.8039, 0.3963]}, {"w": "From", "b": [0.8121, 0.3815, 0.8538, 0.3963]}, {"w": "a", "b": [0.86, 0.3815, 0.8691, 0.3963]}, {"w": "typical", "b": [0.1312, 0.3994, 0.1845, 0.4142]}, {"w": "machine", "b": [0.1904, 0.3994, 0.2552, 0.4142]}, {"w": "learning", "b": [0.2611, 0.3994, 0.3245, 0.4142]}, {"w": "book,", "b": [0.3304, 0.3994, 0.3741, 0.4142]}, {"w": "you", "b": [0.3801, 0.3994, 0.4082, 0.4142]}, {"w": "can", "b": [0.4141, 0.3994, 0.4412, 0.4142]}, {"w": "learn", "b": [0.4471, 0.3994, 0.4864, 0.4142]}, {"w": "the", "b": [0.4923, 0.3994, 0.5174, 0.4142]}, {"w": "types", "b": [0.5233, 0.3994, 0.5651, 0.4142]}, {"w": "of", "b": [0.571, 0.3994, 0.5856, 0.4142]}, {"w": "machine", "b": [0.5915, 0.3994, 0.6563, 0.4142]}, {"w": "learning,", "b": [0.6622, 0.3994, 0.7306, 0.4142]}, {"w": "major", "b": [0.7366, 0.3994, 0.7828, 0.4142]}, {"w": "families", "b": [0.7887, 0.3994, 0.8486, 0.4142]}, {"w": "of", "b": [0.8545, 0.3994, 0.8691, 0.4142]}, {"w": "algorithms,", "b": [0.1312, 0.4173, 0.2216, 0.4322]}, {"w": "how", "b": [0.2278, 0.4173, 0.26, 0.4322]}, {"w": "they", "b": [0.2662, 0.4173, 0.3016, 0.4322]}, {"w": "work,", "b": [0.3077, 0.4173, 0.3519, 0.4322]}, {"w": "and", "b": [0.358, 0.4173, 0.3878, 0.4322]}, {"w": "how", "b": [0.3939, 0.4173, 0.4262, 0.4322]}, {"w": "to", "b": [0.4323, 0.4173, 0.4487, 0.4322]}, {"w": "build", "b": [0.4549, 0.4173, 0.4959, 0.4322]}, {"w": "models", "b": [0.5021, 0.4173, 0.5581, 0.4322]}, {"w": "from", "b": [0.5642, 0.4173, 0.6017, 0.4322]}, {"w": "data", "b": [0.6078, 0.4173, 0.6437, 0.4322]}, {"w": "using", "b": [0.6499, 0.4173, 0.692, 0.4322]}, {"w": "those", "b": [0.6982, 0.4173, 0.7403, 0.4322]}, {"w": "algorithms.", "b": [0.7465, 0.4173, 0.8368, 0.4322]}]}, {"id": "b_4", "type": "paragraph", "text": "A typical machine learning book is less concerned with the engineering aspects of implementing machine learning projects. Such questions as data collection, storage, preprocessing, feature engineering, as well as testing and debugging of models, their deployment to and retirement from production, runtime and post-production maintenance, are often left outside the scope of machine learning books.", "words": [{"w": "A", "b": [0.1305, 0.4443, 0.1441, 0.4591]}, {"w": "typical", "b": [0.1486, 0.4443, 0.2019, 0.4591]}, {"w": "machine", "b": [0.2064, 0.4443, 0.2712, 0.4591]}, {"w": "learning", "b": [0.2757, 0.4443, 0.339, 0.4591]}, {"w": "book", "b": [0.3435, 0.4443, 0.3822, 0.4591]}, {"w": "is", "b": [0.3867, 0.4443, 0.3989, 0.4591]}, {"w": "less", "b": [0.4034, 0.4443, 0.4308, 0.4591]}, {"w": "concerned", "b": [0.4353, 0.4443, 0.5137, 0.4591]}, {"w": "with", "b": [0.5182, 0.4443, 0.5534, 0.4591]}, {"w": "the", "b": [0.5579, 0.4443, 0.583, 0.4591]}, {"w": "engineering", "b": [0.5875, 0.4443, 0.6771, 0.4591]}, {"w": "aspects", "b": [0.6816, 0.4443, 0.7386, 0.4591]}, {"w": "of", "b": [0.7431, 0.4443, 0.7576, 0.4591]}, {"w": "implementing", "b": [0.7621, 0.4443, 0.8692, 0.4591]}, {"w": "machine", "b": [0.1312, 0.4622, 0.197, 0.4771]}, {"w": "learning", "b": [0.2031, 0.4622, 0.2674, 0.4771]}, {"w": "projects.", "b": [0.2736, 0.4622, 0.342, 0.4771]}, {"w": "Such", "b": [0.3502, 0.4622, 0.3885, 0.4771]}, {"w": "questions", "b": [0.3946, 0.4622, 0.4687, 0.4771]}, {"w": "as", "b": [0.4749, 0.4622, 0.4913, 0.4771]}, {"w": "data", "b": [0.4975, 0.4622, 0.5331, 0.4771]}, {"w": "collection,", "b": [0.5393, 0.4622, 0.6198, 0.4771]}, {"w": "storage,", "b": [0.626, 0.4622, 0.6883, 0.4771]}, {"w": "preprocessing,", "b": [0.6944, 0.4622, 0.8074, 0.4771]}, {"w": "feature", "b": [0.8136, 0.4622, 0.8692, 0.4771]}, {"w": "engineering,", "b": [0.1312, 0.4801, 0.2269, 0.495]}, {"w": "as", "b": [0.2331, 0.4801, 0.2495, 0.495]}, {"w": "well", "b": [0.2556, 0.4801, 0.2867, 0.495]}, {"w": "as", "b": [0.2928, 0.4801, 0.3092, 0.495]}, {"w": "testing", "b": [0.3153, 0.4801, 0.3694, 0.495]}, {"w": "and", "b": [0.3755, 0.4801, 0.405, 0.495]}, {"w": "debugging", "b": [0.4112, 0.4801, 0.4926, 0.495]}, {"w": "of", "b": [0.4987, 0.4801, 0.5135, 0.495]}, {"w": "models,", "b": [0.5196, 0.4801, 0.5803, 0.495]}, {"w": "their", "b": [0.5865, 0.4801, 0.6242, 0.495]}, {"w": "deployment", "b": [0.6303, 0.4801, 0.7224, 0.495]}, {"w": "to", "b": [0.7285, 0.4801, 0.7448, 0.495]}, {"w": "and", "b": [0.7509, 0.4801, 0.7804, 0.495]}, {"w": "retirement", "b": [0.7866, 0.4801, 0.8696, 0.495]}, {"w": "from", "b": [0.1312, 0.4981, 0.1684, 0.513]}, {"w": "production,", "b": [0.1745, 0.4981, 0.2667, 0.513]}, {"w": "runtime", "b": [0.2728, 0.4981, 0.3354, 0.513]}, {"w": "and", "b": [0.3415, 0.4981, 0.371, 0.513]}, {"w": "post-production", "b": [0.3772, 0.4981, 0.5045, 0.513]}, {"w": "maintenance,", "b": [0.5106, 0.4981, 0.6159, 0.513]}, {"w": "are", "b": [0.622, 0.4981, 0.6465, 0.513]}, {"w": "often", "b": [0.6526, 0.4981, 0.6928, 0.513]}, {"w": "left", "b": [0.6989, 0.4981, 0.7249, 0.513]}, {"w": "outside", "b": [0.731, 0.4981, 0.7881, 0.513]}, {"w": "the", "b": [0.7942, 0.4981, 0.8197, 0.513]}, {"w": "scope", "b": [0.8258, 0.4981, 0.8691, 0.513]}, {"w": "of", "b": [0.1312, 0.516, 0.1461, 0.5309]}, {"w": "machine", "b": [0.1522, 0.516, 0.2184, 0.5309]}, {"w": "learning", "b": [0.2245, 0.516, 0.2892, 0.5309]}, {"w": "books.", "b": [0.2954, 0.516, 0.3472, 0.5309]}]}, {"id": "b_5", "type": "paragraph", "text": "This book intends to fill that gap.", "words": [{"w": "This", "b": [0.1306, 0.5429, 0.1666, 0.5579]}, {"w": "book", "b": [0.1727, 0.5429, 0.2122, 0.5579]}, {"w": "intends", "b": [0.2183, 0.5429, 0.2764, 0.5579]}, {"w": "to", "b": [0.2825, 0.5429, 0.2989, 0.5579]}, {"w": "fill", "b": [0.3051, 0.5429, 0.3256, 0.5579]}, {"w": "that", "b": [0.3318, 0.5429, 0.3656, 0.5579]}, {"w": "gap.", "b": [0.3717, 0.5429, 0.4056, 0.5579]}]}, {"id": "b_6", "type": "paragraph", "text": "Who This Book is For", "words": [{"w": "Who", "b": [0.1312, 0.5914, 0.1833, 0.6094]}, {"w": "This", "b": [0.1916, 0.5914, 0.2395, 0.6094]}, {"w": "Book", "b": [0.2478, 0.5914, 0.3043, 0.6094]}, {"w": "is", "b": [0.3126, 0.5914, 0.3293, 0.6094]}, {"w": "For", "b": [0.3376, 0.5914, 0.3739, 0.6094]}]}, {"id": "b_7", "type": "paragraph", "text": "I assume that the reader of this book understands machine learning basics and is capable of building a model, given a properly formatted dataset using a favorite programming language or a machine learning library. If you don’t feel comfortable applying machine learning algorithms to data and don’t clearly see the difference between logistic regression, support vector machine, and random forest, I recommend starting your journey with The Hundred-Page Machine Learning Book, and then move to this book.", "words": [{"w": "I", "b": [0.1312, 0.6302, 0.138, 0.6453]}, {"w": "assume", "b": [0.1443, 0.6302, 0.2031, 0.6453]}, {"w": "that", "b": [0.2094, 0.6302, 0.2439, 0.6453]}, {"w": "the", "b": [0.2502, 0.6302, 0.2764, 0.6453]}, {"w": "reader", "b": [0.2827, 0.6302, 0.3341, 0.6453]}, {"w": "of", "b": [0.3404, 0.6302, 0.3555, 0.6453]}, {"w": "this", "b": [0.3619, 0.6302, 0.3923, 0.6453]}, {"w": "book", "b": [0.3986, 0.6302, 0.4389, 0.6453]}, {"w": "understands", "b": [0.4452, 0.6302, 0.5448, 0.6453]}, {"w": "machine", "b": [0.5511, 0.6302, 0.6186, 0.6453]}, {"w": "learning", "b": [0.6249, 0.6302, 0.6909, 0.6453]}, {"w": "basics", "b": [0.6972, 0.6302, 0.7455, 0.6453]}, {"w": "and", "b": [0.7518, 0.6302, 0.7822, 0.6453]}, {"w": "is", "b": [0.7885, 0.6302, 0.8011, 0.6453]}, {"w": "capable", "b": [0.8074, 0.6302, 0.8692, 0.6453]}, {"w": "of", "b": [0.1312, 0.6481, 0.1464, 0.6633]}, {"w": "building", "b": [0.1551, 0.6481, 0.2221, 0.6633]}, {"w": "a", "b": [0.2307, 0.6481, 0.2402, 0.6633]}, {"w": "model,", "b": [0.2488, 0.6481, 0.3038, 0.6633]}, {"w": "given", "b": [0.3131, 0.6481, 0.356, 0.6633]}, {"w": "a", "b": [0.3647, 0.6481, 0.3741, 0.6633]}, {"w": "properly", "b": [0.3828, 0.6481, 0.4519, 0.6633]}, {"w": "formatted", "b": [0.4606, 0.6481, 0.5417, 0.6633]}, {"w": "dataset", "b": [0.5504, 0.6481, 0.6102, 0.6633]}, {"w": "using", "b": [0.6189, 0.6481, 0.6619, 0.6633]}, {"w": "a", "b": [0.6705, 0.6481, 0.68, 0.6633]}, {"w": "favorite", "b": [0.6886, 0.6481, 0.7504, 0.6633]}, {"w": "programming", "b": [0.7591, 0.6481, 0.869, 0.6633]}, {"w": "language", "b": [0.1312, 0.6661, 0.2034, 0.6812]}, {"w": "or", "b": [0.2113, 0.6661, 0.2281, 0.6812]}, {"w": "a", "b": [0.2359, 0.6661, 0.2453, 0.6812]}, {"w": "machine", "b": [0.2532, 0.6661, 0.3207, 0.6812]}, {"w": "learning", "b": [0.3286, 0.6661, 0.3945, 0.6812]}, {"w": "library.", "b": [0.4024, 0.6661, 0.4611, 0.6812]}, {"w": "If", "b": [0.4745, 0.6661, 0.487, 0.6812]}, {"w": "you", "b": [0.4949, 0.6661, 0.5242, 0.6812]}, {"w": "don’t", "b": [0.5321, 0.6661, 0.575, 0.6812]}, {"w": "feel", "b": [0.5829, 0.6661, 0.6106, 0.6812]}, {"w": "comfortable", "b": [0.6185, 0.6661, 0.7153, 0.6812]}, {"w": "applying", "b": [0.7231, 0.6661, 0.7937, 0.6812]}, {"w": "machine", "b": [0.8016, 0.6661, 0.8691, 0.6812]}, {"w": "learning", "b": [0.1312, 0.6841, 0.1967, 0.6991]}, {"w": "algorithms", "b": [0.2028, 0.6841, 0.2891, 0.6991]}, {"w": "to", "b": [0.2953, 0.6841, 0.3119, 0.6991]}, {"w": "data", "b": [0.318, 0.6841, 0.3543, 0.6991]}, {"w": "and", "b": [0.3605, 0.6841, 0.3906, 0.6991]}, {"w": "don’t", "b": [0.3967, 0.6841, 0.4393, 0.6991]}, {"w": "clearly", "b": [0.4454, 0.6841, 0.4989, 0.6991]}, {"w": "see", "b": [0.5051, 0.6841, 0.5291, 0.6991]}, {"w": "the", "b": [0.5352, 0.6841, 0.5612, 0.6991]}, {"w": "difference", "b": [0.5673, 0.6841, 0.6447, 0.6991]}, {"w": "between", "b": [0.6509, 0.6841, 0.7168, 0.6991]}, {"w": "logistic", "b": [0.7229, 0.6841, 0.7801, 0.6991]}, {"w": "regression,", "b": [0.7863, 0.6841, 0.8717, 0.6991]}, {"w": "support", "b": [0.1312, 0.702, 0.1947, 0.7171]}, {"w": "vector", "b": [0.2009, 0.702, 0.2512, 0.7171]}, {"w": "machine,", "b": [0.2574, 0.702, 0.3301, 0.7171]}, {"w": "and", "b": [0.3364, 0.702, 0.3667, 0.7171]}, {"w": "random", "b": [0.373, 0.702, 0.4358, 0.7171]}, {"w": "forest,", "b": [0.442, 0.702, 0.4929, 0.7171]}, {"w": "I", "b": [0.4992, 0.702, 0.506, 0.7171]}, {"w": "recommend", "b": [0.5122, 0.702, 0.6064, 0.7171]}, {"w": "starting", "b": [0.6127, 0.702, 0.6766, 0.7171]}, {"w": "your", "b": [0.6829, 0.702, 0.7195, 0.7171]}, {"w": "journey", "b": [0.7258, 0.702, 0.7876, 0.7171]}, {"w": "with", "b": [0.7938, 0.702, 0.8304, 0.7171]}, {"w": "The", "b": [0.8367, 0.702, 0.8691, 0.7171]}, {"w": "Hundred-Page", "b": [0.1312, 0.7201, 0.2464, 0.735]}, {"w": "Machine", "b": [0.2525, 0.7201, 0.3202, 0.735]}, {"w": "Learning", "b": [0.3264, 0.7201, 0.3974, 0.735]}, {"w": "Book,", "b": [0.4036, 0.7201, 0.4505, 0.735]}, {"w": "and", "b": [0.4566, 0.7201, 0.4864, 0.735]}, {"w": "then", "b": [0.4925, 0.7201, 0.5284, 0.735]}, {"w": "move", "b": [0.5346, 0.7201, 0.5761, 0.735]}, {"w": "to", "b": [0.5822, 0.7201, 0.5986, 0.735]}, {"w": "this", "b": [0.6048, 0.7201, 0.6346, 0.735]}, {"w": "book.", "b": [0.6408, 0.7201, 0.6854, 0.735]}]}, {"id": "b_8", "type": "paragraph", "text": "The target audience of this book is data analysts who lean towards a machine learning engineering role, machine learning engineers who want to bring more structure to their work, machine learning engineering students, as well as software architects who happen to deal with models provided by data analysts and machine learning engineers.", "words": [{"w": "The", "b": [0.1306, 0.7469, 0.163, 0.762]}, {"w": "target", "b": [0.1709, 0.7469, 0.2201, 0.762]}, {"w": "audience", "b": [0.228, 0.7469, 0.2991, 0.762]}, {"w": "of", "b": [0.307, 0.7469, 0.3221, 0.762]}, {"w": "this", "b": [0.33, 0.7469, 0.3605, 0.762]}, {"w": "book", "b": [0.3683, 0.7469, 0.4086, 0.762]}, {"w": "is", "b": [0.4164, 0.7469, 0.4291, 0.762]}, {"w": "data", "b": [0.437, 0.7469, 0.4736, 0.762]}, {"w": "analysts", "b": [0.4815, 0.7469, 0.5481, 0.762]}, {"w": "who", "b": [0.556, 0.7469, 0.5894, 0.762]}, {"w": "lean", "b": [0.5973, 0.7469, 0.6308, 0.762]}, {"w": "towards", "b": [0.6386, 0.7469, 0.7026, 0.762]}, {"w": "a", "b": [0.7105, 0.7469, 0.7199, 0.762]}, {"w": "machine", "b": [0.7278, 0.7469, 0.7952, 0.762]}, {"w": "learning", "b": [0.8031, 0.7469, 0.8691, 0.762]}, {"w": "engineering", "b": [0.1312, 0.765, 0.2209, 0.7798]}, {"w": "role,", "b": [0.2271, 0.765, 0.2614, 0.7798]}, {"w": "machine", "b": [0.2675, 0.765, 0.3324, 0.7798]}, {"w": "learning", "b": [0.3385, 0.765, 0.402, 0.7798]}, {"w": "engineers", "b": [0.4082, 0.765, 0.4809, 0.7798]}, {"w": "who", "b": [0.487, 0.765, 0.5192, 0.7798]}, {"w": "want", "b": [0.5253, 0.765, 0.5635, 0.7798]}, {"w": "to", "b": [0.5697, 0.765, 0.5858, 0.7798]}, {"w": "bring", "b": [0.5919, 0.765, 0.6333, 0.7798]}, {"w": "more", "b": [0.6394, 0.765, 0.6787, 0.7798]}, {"w": "structure", "b": [0.6848, 0.765, 0.7565, 0.7798]}, {"w": "to", "b": [0.7627, 0.765, 0.7788, 0.7798]}, {"w": "their", "b": [0.7849, 0.765, 0.8222, 0.7798]}, {"w": "work,", "b": [0.8283, 0.765, 0.8717, 0.7798]}, {"w": "machine", "b": [0.1312, 0.7828, 0.1987, 0.7979]}, {"w": "learning", "b": [0.2055, 0.7828, 0.2714, 0.7979]}, {"w": "engineering", "b": [0.2782, 0.7828, 0.3713, 0.7979]}, {"w": "students,", "b": [0.3781, 0.7828, 0.452, 0.7979]}, {"w": "as", "b": [0.459, 0.7828, 0.4758, 0.7979]}, {"w": "well", "b": [0.4826, 0.7828, 0.5144, 0.7979]}, {"w": "as", "b": [0.5212, 0.7828, 0.538, 0.7979]}, {"w": "software", "b": [0.5448, 0.7828, 0.6124, 0.7979]}, {"w": "architects", "b": [0.6192, 0.7828, 0.6983, 0.7979]}, {"w": "who", "b": [0.7051, 0.7828, 0.7386, 0.7979]}, {"w": "happen", "b": [0.7453, 0.7828, 0.8054, 0.7979]}, {"w": "to", "b": [0.8122, 0.7828, 0.8289, 0.7979]}, {"w": "deal", "b": [0.8357, 0.7828, 0.8692, 0.7979]}, {"w": "with", "b": [0.1306, 0.8008, 0.1665, 0.8158]}, {"w": "models", "b": [0.1726, 0.8008, 0.2286, 0.8158]}, {"w": "provided", "b": [0.2347, 0.8008, 0.3045, 0.8158]}, {"w": "by", "b": [0.3107, 0.8008, 0.3302, 0.8158]}, {"w": "data", "b": [0.3363, 0.8008, 0.3722, 0.8158]}, {"w": "analysts", "b": [0.3783, 0.8008, 0.4437, 0.8158]}, {"w": "and", "b": [0.4498, 0.8008, 0.4796, 0.8158]}, {"w": "machine", "b": [0.4857, 0.8008, 0.5519, 0.8158]}, {"w": "learning", "b": [0.558, 0.8008, 0.6227, 0.8158]}, {"w": "engineers.", "b": [0.6288, 0.8008, 0.708, 0.8158]}]}, {"id": "b_9", "type": "paragraph", "text": "1“2020 state of enterprise machine learning”, Algorithmia, 2019.", "words": [{"w": "1“2020", "b": [0.1518, 0.8276, 0.1982, 0.8414]}, {"w": "state", "b": [0.2034, 0.8295, 0.2366, 0.8414]}, {"w": "of", "b": [0.2418, 0.8295, 0.2545, 0.8414]}, {"w": "enterprise", "b": [0.2597, 0.8295, 0.3264, 0.8414]}, {"w": "machine", "b": [0.3317, 0.8295, 0.3878, 0.8414]}, {"w": "learning”,", "b": [0.3931, 0.8295, 0.4597, 0.8414]}, {"w": "Algorithmia,", "b": [0.4649, 0.8295, 0.5516, 0.8414]}, {"w": "2019.", "b": [0.5568, 0.8295, 0.5925, 0.8414]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "3", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 8, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "How to Use This Book", "words": [{"w": "How", "b": [0.1312, 0.0861, 0.1805, 0.104]}, {"w": "to", "b": [0.1888, 0.0861, 0.211, 0.104]}, {"w": "Use", "b": [0.2193, 0.0861, 0.2596, 0.104]}, {"w": "This", "b": [0.2679, 0.0861, 0.3158, 0.104]}, {"w": "Book", "b": [0.3241, 0.0861, 0.3806, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "This book is a comprehensive review of machine learning engineering best practices and design patterns. I recommend reading it from beginning to end. However, you can read chapters in any order as they cover distinct aspects of the machine learning project lifecycle and do not have direct dependencies.", "words": [{"w": "This", "b": [0.1306, 0.1249, 0.1673, 0.14]}, {"w": "book", "b": [0.1747, 0.1249, 0.2149, 0.14]}, {"w": "is", "b": [0.2223, 0.1249, 0.235, 0.14]}, {"w": "a", "b": [0.2424, 0.1249, 0.2518, 0.14]}, {"w": "comprehensive", "b": [0.2592, 0.1249, 0.3786, 0.14]}, {"w": "review", "b": [0.386, 0.1249, 0.4389, 0.14]}, {"w": "of", "b": [0.4463, 0.1249, 0.4614, 0.14]}, {"w": "machine", "b": [0.4688, 0.1249, 0.5363, 0.14]}, {"w": "learning", "b": [0.5437, 0.1249, 0.6096, 0.14]}, {"w": "engineering", "b": [0.617, 0.1249, 0.7102, 0.14]}, {"w": "best", "b": [0.7176, 0.1249, 0.7517, 0.14]}, {"w": "practices", "b": [0.7591, 0.1249, 0.8314, 0.14]}, {"w": "and", "b": [0.8388, 0.1249, 0.8691, 0.14]}, {"w": "design", "b": [0.1312, 0.1428, 0.1826, 0.1579]}, {"w": "patterns.", "b": [0.1898, 0.1428, 0.2631, 0.1579]}, {"w": "I", "b": [0.2743, 0.1428, 0.2811, 0.1579]}, {"w": "recommend", "b": [0.2883, 0.1428, 0.3825, 0.1579]}, {"w": "reading", "b": [0.3896, 0.1428, 0.4504, 0.1579]}, {"w": "it", "b": [0.4575, 0.1428, 0.4701, 0.1579]}, {"w": "from", "b": [0.4772, 0.1428, 0.5154, 0.1579]}, {"w": "beginning", "b": [0.5226, 0.1428, 0.6026, 0.1579]}, {"w": "to", "b": [0.6097, 0.1428, 0.6265, 0.1579]}, {"w": "end.", "b": [0.6336, 0.1428, 0.6682, 0.1579]}, {"w": "However,", "b": [0.6794, 0.1428, 0.7542, 0.1579]}, {"w": "you", "b": [0.7616, 0.1428, 0.7909, 0.1579]}, {"w": "can", "b": [0.7981, 0.1428, 0.8263, 0.1579]}, {"w": "read", "b": [0.8335, 0.1428, 0.8691, 0.1579]}, {"w": "chapters", "b": [0.1312, 0.1609, 0.198, 0.1758]}, {"w": "in", "b": [0.2042, 0.1609, 0.2194, 0.1758]}, {"w": "any", "b": [0.2256, 0.1609, 0.2541, 0.1758]}, {"w": "order", "b": [0.2602, 0.1609, 0.302, 0.1758]}, {"w": "as", "b": [0.3082, 0.1609, 0.3245, 0.1758]}, {"w": "they", "b": [0.3307, 0.1609, 0.3658, 0.1758]}, {"w": "cover", "b": [0.3719, 0.1609, 0.4132, 0.1758]}, {"w": "distinct", "b": [0.4193, 0.1609, 0.4794, 0.1758]}, {"w": "aspects", "b": [0.4856, 0.1609, 0.5433, 0.1758]}, {"w": "of", "b": [0.5494, 0.1609, 0.5642, 0.1758]}, {"w": "the", "b": [0.5703, 0.1609, 0.5958, 0.1758]}, {"w": "machine", "b": [0.6019, 0.1609, 0.6675, 0.1758]}, {"w": "learning", "b": [0.6737, 0.1609, 0.7378, 0.1758]}, {"w": "project", "b": [0.744, 0.1609, 0.8, 0.1758]}, {"w": "lifecycle", "b": [0.8061, 0.1609, 0.8692, 0.1758]}, {"w": "and", "b": [0.1312, 0.1788, 0.161, 0.1938]}, {"w": "do", "b": [0.1671, 0.1788, 0.1866, 0.1938]}, {"w": "not", "b": [0.1928, 0.1788, 0.2194, 0.1938]}, {"w": "have", "b": [0.2256, 0.1788, 0.262, 0.1938]}, {"w": "direct", "b": [0.2681, 0.1788, 0.3143, 0.1938]}, {"w": "dependencies.", "b": [0.3205, 0.1788, 0.4309, 0.1938]}]}, {"id": "b_2", "type": "paragraph", "text": "Should You Buy This Book?", "words": [{"w": "Should", "b": [0.1312, 0.2273, 0.206, 0.2453]}, {"w": "You", "b": [0.2143, 0.2273, 0.2573, 0.2453]}, {"w": "Buy", "b": [0.2656, 0.2273, 0.3103, 0.2453]}, {"w": "This", "b": [0.3186, 0.2273, 0.3665, 0.2453]}, {"w": "Book?", "b": [0.3748, 0.2273, 0.4431, 0.2453]}]}, {"id": "b_3", "type": "paragraph", "text": "Like its companion and precursor The Hundred-Page Machine Learning Book, this book is distributed on the “read-first, buy-later” principle. I firmly believe that readers must be able to read a book before paying for it; otherwise, they buy a pig in a poke.", "words": [{"w": "Like", "b": [0.1312, 0.2662, 0.1655, 0.2812]}, {"w": "its", "b": [0.1717, 0.2662, 0.1914, 0.2812]}, {"w": "companion", "b": [0.1975, 0.2662, 0.2852, 0.2812]}, {"w": "and", "b": [0.2914, 0.2662, 0.3213, 0.2812]}, {"w": "precursor", "b": [0.3274, 0.2662, 0.403, 0.2812]}, {"w": "The", "b": [0.4092, 0.2662, 0.4412, 0.2812]}, {"w": "Hundred-Page", "b": [0.4473, 0.2662, 0.5632, 0.2812]}, {"w": "Machine", "b": [0.5693, 0.2662, 0.6374, 0.2812]}, {"w": "Learning", "b": [0.6436, 0.2662, 0.7151, 0.2812]}, {"w": "Book,", "b": [0.7212, 0.2662, 0.7684, 0.2812]}, {"w": "this", "b": [0.7746, 0.2662, 0.8046, 0.2812]}, {"w": "book", "b": [0.8108, 0.2662, 0.8505, 0.2812]}, {"w": "is", "b": [0.8566, 0.2662, 0.8691, 0.2812]}, {"w": "distributed", "b": [0.1312, 0.2843, 0.2178, 0.2991]}, {"w": "on", "b": [0.224, 0.2843, 0.2431, 0.2991]}, {"w": "the", "b": [0.2492, 0.2843, 0.2743, 0.2991]}, {"w": "“read-first,", "b": [0.2805, 0.2843, 0.3656, 0.2991]}, {"w": "buy-later”", "b": [0.3717, 0.2843, 0.4522, 0.2991]}, {"w": "principle.", "b": [0.4583, 0.2843, 0.5317, 0.2991]}, {"w": "I", "b": [0.5399, 0.2843, 0.5464, 0.2991]}, {"w": "firmly", "b": [0.5526, 0.2843, 0.5993, 0.2991]}, {"w": "believe", "b": [0.6055, 0.2843, 0.6593, 0.2991]}, {"w": "that", "b": [0.6654, 0.2843, 0.6986, 0.2991]}, {"w": "readers", "b": [0.7047, 0.2843, 0.7612, 0.2991]}, {"w": "must", "b": [0.7673, 0.2843, 0.8061, 0.2991]}, {"w": "be", "b": [0.8122, 0.2843, 0.8309, 0.2991]}, {"w": "able", "b": [0.837, 0.2843, 0.8692, 0.2991]}, {"w": "to", "b": [0.1312, 0.3021, 0.1476, 0.3171]}, {"w": "read", "b": [0.1538, 0.3021, 0.1887, 0.3171]}, {"w": "a", "b": [0.1949, 0.3021, 0.2041, 0.3171]}, {"w": "book", "b": [0.2102, 0.3021, 0.2497, 0.3171]}, {"w": "before", "b": [0.2559, 0.3021, 0.3051, 0.3171]}, {"w": "paying", "b": [0.3113, 0.3021, 0.3646, 0.3171]}, {"w": "for", "b": [0.3708, 0.3021, 0.3929, 0.3171]}, {"w": "it;", "b": [0.399, 0.3021, 0.4164, 0.3171]}, {"w": "otherwise,", "b": [0.4226, 0.3021, 0.5038, 0.3171]}, {"w": "they", "b": [0.5099, 0.3021, 0.5453, 0.3171]}, {"w": "buy", "b": [0.5515, 0.3021, 0.5817, 0.3171]}, {"w": "a", "b": [0.5879, 0.3021, 0.5971, 0.3171]}, {"w": "pig", "b": [0.6032, 0.3021, 0.6278, 0.3171]}, {"w": "in", "b": [0.634, 0.3021, 0.6494, 0.3171]}, {"w": "a", "b": [0.6555, 0.3021, 0.6647, 0.3171]}, {"w": "poke.", "b": [0.6709, 0.3021, 0.7135, 0.3171]}]}, {"id": "b_4", "type": "paragraph", "text": "The “read-first, buy-later” principle implies that you can freely download the book, read it, and share it with your friends and colleagues. If you read and liked the book, or found it helpful or useful in your work, business, or studies, then buy it.", "words": [{"w": "The", "b": [0.1306, 0.329, 0.1624, 0.344]}, {"w": "“read-first,", "b": [0.1685, 0.329, 0.2555, 0.344]}, {"w": "buy-later”", "b": [0.2616, 0.329, 0.3438, 0.344]}, {"w": "principle", "b": [0.35, 0.329, 0.4198, 0.344]}, {"w": "implies", "b": [0.426, 0.329, 0.4826, 0.344]}, {"w": "that", "b": [0.4887, 0.329, 0.5226, 0.344]}, {"w": "you", "b": [0.5287, 0.329, 0.5575, 0.344]}, {"w": "can", "b": [0.5636, 0.329, 0.5914, 0.344]}, {"w": "freely", "b": [0.5975, 0.329, 0.6417, 0.344]}, {"w": "download", "b": [0.6479, 0.329, 0.7243, 0.344]}, {"w": "the", "b": [0.7305, 0.329, 0.7561, 0.344]}, {"w": "book,", "b": [0.7623, 0.329, 0.8069, 0.344]}, {"w": "read", "b": [0.8131, 0.329, 0.8481, 0.344]}, {"w": "it,", "b": [0.8542, 0.329, 0.8717, 0.344]}, {"w": "and", "b": [0.1312, 0.3469, 0.1616, 0.362]}, {"w": "share", "b": [0.168, 0.3469, 0.2111, 0.362]}, {"w": "it", "b": [0.2176, 0.3469, 0.2301, 0.362]}, {"w": "with", "b": [0.2366, 0.3469, 0.2732, 0.362]}, {"w": "your", "b": [0.2797, 0.3469, 0.3163, 0.362]}, {"w": "friends", "b": [0.3228, 0.3469, 0.3779, 0.362]}, {"w": "and", "b": [0.3844, 0.3469, 0.4147, 0.362]}, {"w": "colleagues.", "b": [0.4212, 0.3469, 0.5081, 0.362]}, {"w": "If", "b": [0.5173, 0.3469, 0.5298, 0.362]}, {"w": "you", "b": [0.5363, 0.3469, 0.5656, 0.362]}, {"w": "read", "b": [0.5721, 0.3469, 0.6077, 0.362]}, {"w": "and", "b": [0.6141, 0.3469, 0.6445, 0.362]}, {"w": "liked", "b": [0.651, 0.3469, 0.6897, 0.362]}, {"w": "the", "b": [0.6961, 0.3469, 0.7223, 0.362]}, {"w": "book,", "b": [0.7288, 0.3469, 0.7742, 0.362]}, {"w": "or", "b": [0.7808, 0.3469, 0.7976, 0.362]}, {"w": "found", "b": [0.804, 0.3469, 0.8506, 0.362]}, {"w": "it", "b": [0.8571, 0.3469, 0.8696, 0.362]}, {"w": "helpful", "b": [0.1312, 0.3649, 0.1861, 0.3799]}, {"w": "or", "b": [0.1923, 0.3649, 0.2087, 0.3799]}, {"w": "useful", "b": [0.2149, 0.3649, 0.2617, 0.3799]}, {"w": "in", "b": [0.2678, 0.3649, 0.2832, 0.3799]}, {"w": "your", "b": [0.2893, 0.3649, 0.3253, 0.3799]}, {"w": "work,", "b": [0.3314, 0.3649, 0.3756, 0.3799]}, {"w": "business,", "b": [0.3817, 0.3649, 0.4528, 0.3799]}, {"w": "or", "b": [0.459, 0.3649, 0.4754, 0.3799]}, {"w": "studies,", "b": [0.4816, 0.3649, 0.5423, 0.3799]}, {"w": "then", "b": [0.5484, 0.3649, 0.5843, 0.3799]}, {"w": "buy", "b": [0.5905, 0.3649, 0.6207, 0.3799]}, {"w": "it.", "b": [0.6269, 0.3649, 0.6443, 0.3799]}]}, {"id": "b_5", "type": "paragraph", "text": "Now you are all set. Enjoy your reading!", "words": [{"w": "Now", "b": [0.1312, 0.3919, 0.1671, 0.4068]}, {"w": "you", "b": [0.1733, 0.3919, 0.202, 0.4068]}, {"w": "are", "b": [0.2081, 0.3919, 0.2328, 0.4068]}, {"w": "all", "b": [0.2389, 0.3919, 0.2584, 0.4068]}, {"w": "set.", "b": [0.2646, 0.3919, 0.2924, 0.4068]}, {"w": "Enjoy", "b": [0.3006, 0.3919, 0.3475, 0.4068]}, {"w": "your", "b": [0.3536, 0.3919, 0.3896, 0.4068]}, {"w": "reading!", "b": [0.3957, 0.3919, 0.4604, 0.4068]}]}, {"id": "b_6", "type": "paragraph", "text": "Andriy Burkov", "words": [{"w": "Andriy", "b": [0.7288, 0.4187, 0.7943, 0.4337]}, {"w": "Burkov", "b": [0.8013, 0.4187, 0.8688, 0.4337]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "4", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 9, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 10, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 11, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "1 Introduction", "words": [{"w": "1", "b": [0.1312, 0.0833, 0.1462, 0.1048]}, {"w": "Introduction", "b": [0.1761, 0.0833, 0.3406, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "Though the reader of this book should have a basic understanding of machine learning, it is still important to start with definitions, so that we are sure that we have a common understanding of the terms used throughout the book.", "words": [{"w": "Though", "b": [0.1306, 0.1298, 0.1944, 0.1448]}, {"w": "the", "b": [0.2022, 0.1298, 0.2283, 0.1448]}, {"w": "reader", "b": [0.2362, 0.1298, 0.2876, 0.1448]}, {"w": "of", "b": [0.2954, 0.1298, 0.3106, 0.1448]}, {"w": "this", "b": [0.3184, 0.1298, 0.3488, 0.1448]}, {"w": "book", "b": [0.3567, 0.1298, 0.3969, 0.1448]}, {"w": "should", "b": [0.4048, 0.1298, 0.4582, 0.1448]}, {"w": "have", "b": [0.4661, 0.1298, 0.5032, 0.1448]}, {"w": "a", "b": [0.511, 0.1298, 0.5204, 0.1448]}, {"w": "basic", "b": [0.5283, 0.1298, 0.5692, 0.1448]}, {"w": "understanding", "b": [0.577, 0.1298, 0.6944, 0.1448]}, {"w": "of", "b": [0.7022, 0.1298, 0.7174, 0.1448]}, {"w": "machine", "b": [0.7252, 0.1298, 0.7927, 0.1448]}, {"w": "learning,", "b": [0.8005, 0.1298, 0.8717, 0.1448]}, {"w": "it", "b": [0.1312, 0.1478, 0.1438, 0.1627]}, {"w": "is", "b": [0.1505, 0.1478, 0.1631, 0.1627]}, {"w": "still", "b": [0.1698, 0.1478, 0.2003, 0.1627]}, {"w": "important", "b": [0.207, 0.1478, 0.2897, 0.1627]}, {"w": "to", "b": [0.2964, 0.1478, 0.3131, 0.1627]}, {"w": "start", "b": [0.3198, 0.1478, 0.3587, 0.1627]}, {"w": "with", "b": [0.3654, 0.1478, 0.402, 0.1627]}, {"w": "definitions,", "b": [0.4087, 0.1478, 0.4987, 0.1627]}, {"w": "so", "b": [0.5056, 0.1478, 0.5224, 0.1627]}, {"w": "that", "b": [0.5291, 0.1478, 0.5636, 0.1627]}, {"w": "we", "b": [0.5703, 0.1478, 0.5918, 0.1627]}, {"w": "are", "b": [0.5985, 0.1478, 0.6237, 0.1627]}, {"w": "sure", "b": [0.6303, 0.1478, 0.664, 0.1627]}, {"w": "that", "b": [0.6707, 0.1478, 0.7052, 0.1627]}, {"w": "we", "b": [0.7119, 0.1478, 0.7334, 0.1627]}, {"w": "have", "b": [0.7401, 0.1478, 0.7772, 0.1627]}, {"w": "a", "b": [0.7839, 0.1478, 0.7933, 0.1627]}, {"w": "common", "b": [0.8, 0.1478, 0.869, 0.1627]}, {"w": "understanding", "b": [0.1312, 0.1657, 0.2463, 0.1807]}, {"w": "of", "b": [0.2524, 0.1657, 0.2673, 0.1807]}, {"w": "the", "b": [0.2734, 0.1657, 0.2991, 0.1807]}, {"w": "terms", "b": [0.3052, 0.1657, 0.3505, 0.1807]}, {"w": "used", "b": [0.3566, 0.1657, 0.3927, 0.1807]}, {"w": "throughout", "b": [0.3988, 0.1657, 0.4891, 0.1807]}, {"w": "the", "b": [0.4952, 0.1657, 0.5209, 0.1807]}, {"w": "book.", "b": [0.527, 0.1657, 0.5716, 0.1807]}]}, {"id": "b_2", "type": "paragraph", "text": "Below, I repeat some of the definitions from Chapter 2 of The Hundred-Page Machine Learning Book and also give several new ones. If you read my first book, some parts of this chapter might sound familiar.", "words": [{"w": "Below,", "b": [0.1312, 0.1926, 0.1859, 0.2076]}, {"w": "I", "b": [0.1947, 0.1926, 0.2015, 0.2076]}, {"w": "repeat", "b": [0.2099, 0.1926, 0.2617, 0.2076]}, {"w": "some", "b": [0.27, 0.1926, 0.3109, 0.2076]}, {"w": "of", "b": [0.3192, 0.1926, 0.3344, 0.2076]}, {"w": "the", "b": [0.3427, 0.1926, 0.3689, 0.2076]}, {"w": "definitions", "b": [0.3772, 0.1926, 0.4621, 0.2076]}, {"w": "from", "b": [0.4704, 0.1926, 0.5086, 0.2076]}, {"w": "Chapter", "b": [0.5169, 0.1926, 0.5839, 0.2076]}, {"w": "2", "b": [0.5922, 0.1926, 0.6016, 0.2076]}, {"w": "of", "b": [0.61, 0.1926, 0.6251, 0.2076]}, {"w": "The", "b": [0.6335, 0.1926, 0.6659, 0.2076]}, {"w": "Hundred-Page", "b": [0.6742, 0.1926, 0.7917, 0.2076]}, {"w": "Machine", "b": [0.8, 0.1926, 0.8691, 0.2076]}, {"w": "Learning", "b": [0.1312, 0.2106, 0.2019, 0.2255]}, {"w": "Book", "b": [0.2081, 0.2106, 0.2496, 0.2255]}, {"w": "and", "b": [0.2558, 0.2106, 0.2854, 0.2255]}, {"w": "also", "b": [0.2915, 0.2106, 0.3222, 0.2255]}, {"w": "give", "b": [0.3283, 0.2106, 0.36, 0.2255]}, {"w": "several", "b": [0.3661, 0.2106, 0.4203, 0.2255]}, {"w": "new", "b": [0.4265, 0.2106, 0.4581, 0.2255]}, {"w": "ones.", "b": [0.4642, 0.2106, 0.5041, 0.2255]}, {"w": "If", "b": [0.5123, 0.2106, 0.5246, 0.2255]}, {"w": "you", "b": [0.5307, 0.2106, 0.5593, 0.2255]}, {"w": "read", "b": [0.5654, 0.2106, 0.6001, 0.2255]}, {"w": "my", "b": [0.6063, 0.2106, 0.6307, 0.2255]}, {"w": "first", "b": [0.6369, 0.2106, 0.6687, 0.2255]}, {"w": "book,", "b": [0.6748, 0.2106, 0.7192, 0.2255]}, {"w": "some", "b": [0.7253, 0.2106, 0.7652, 0.2255]}, {"w": "parts", "b": [0.7713, 0.2106, 0.8123, 0.2255]}, {"w": "of", "b": [0.8184, 0.2106, 0.8332, 0.2255]}, {"w": "this", "b": [0.8394, 0.2106, 0.8691, 0.2255]}, {"w": "chapter", "b": [0.1312, 0.2285, 0.1913, 0.2435]}, {"w": "might", "b": [0.1974, 0.2285, 0.2441, 0.2435]}, {"w": "sound", "b": [0.2502, 0.2285, 0.2975, 0.2435]}, {"w": "familiar.", "b": [0.3037, 0.2285, 0.3709, 0.2435]}]}, {"id": "b_3", "type": "paragraph", "text": "After reading this chapter, we will understand the same way such concepts as supervised and unsupervised learning. We will agree on the data terminology, such as data used directly and indirectly, raw and tidy data, training and holdout data.", "words": [{"w": "After", "b": [0.1305, 0.2555, 0.1718, 0.2704]}, {"w": "reading", "b": [0.1777, 0.2555, 0.2361, 0.2704]}, {"w": "this", "b": [0.242, 0.2555, 0.2713, 0.2704]}, {"w": "chapter,", "b": [0.2772, 0.2555, 0.3411, 0.2704]}, {"w": "we", "b": [0.3471, 0.2555, 0.3677, 0.2704]}, {"w": "will", "b": [0.3736, 0.2555, 0.4018, 0.2704]}, {"w": "understand", "b": [0.4077, 0.2555, 0.4963, 0.2704]}, {"w": "the", "b": [0.5022, 0.2555, 0.5274, 0.2704]}, {"w": "same", "b": [0.5333, 0.2555, 0.5726, 0.2704]}, {"w": "way", "b": [0.5786, 0.2555, 0.6092, 0.2704]}, {"w": "such", "b": [0.6151, 0.2555, 0.6499, 0.2704]}, {"w": "concepts", "b": [0.6559, 0.2555, 0.7233, 0.2704]}, {"w": "as", "b": [0.7292, 0.2555, 0.7454, 0.2704]}, {"w": "supervised", "b": [0.7514, 0.2555, 0.8341, 0.2704]}, {"w": "and", "b": [0.84, 0.2555, 0.8692, 0.2704]}, {"w": "unsupervised", "b": [0.1312, 0.2734, 0.234, 0.2884]}, {"w": "learning.", "b": [0.2399, 0.2734, 0.3083, 0.2884]}, {"w": "We", "b": [0.3164, 0.2734, 0.3415, 0.2884]}, {"w": "will", "b": [0.3475, 0.2734, 0.3756, 0.2884]}, {"w": "agree", "b": [0.3815, 0.2734, 0.4227, 0.2884]}, {"w": "on", "b": [0.4287, 0.2734, 0.4477, 0.2884]}, {"w": "the", "b": [0.4537, 0.2734, 0.4788, 0.2884]}, {"w": "data", "b": [0.4847, 0.2734, 0.5199, 0.2884]}, {"w": "terminology,", "b": [0.5258, 0.2734, 0.6232, 0.2884]}, {"w": "such", "b": [0.6292, 0.2734, 0.664, 0.2884]}, {"w": "as", "b": [0.6699, 0.2734, 0.6861, 0.2884]}, {"w": "data", "b": [0.692, 0.2734, 0.7271, 0.2884]}, {"w": "used", "b": [0.733, 0.2734, 0.7683, 0.2884]}, {"w": "directly", "b": [0.7742, 0.2734, 0.8341, 0.2884]}, {"w": "and", "b": [0.84, 0.2734, 0.8691, 0.2884]}, {"w": "indirectly,", "b": [0.1312, 0.2914, 0.2113, 0.3063]}, {"w": "raw", "b": [0.2174, 0.2914, 0.2467, 0.3063]}, {"w": "and", "b": [0.2529, 0.2914, 0.2826, 0.3063]}, {"w": "tidy", "b": [0.2887, 0.2914, 0.321, 0.3063]}, {"w": "data,", "b": [0.3272, 0.2914, 0.3682, 0.3063]}, {"w": "training", "b": [0.3744, 0.2914, 0.438, 0.3063]}, {"w": "and", "b": [0.4441, 0.2914, 0.4739, 0.3063]}, {"w": "holdout", "b": [0.48, 0.2914, 0.5415, 0.3063]}, {"w": "data.", "b": [0.5477, 0.2914, 0.5887, 0.3063]}]}, {"id": "b_4", "type": "paragraph", "text": "We will know when to use machine learning, when not to use it, and various forms of machine", "words": [{"w": "We", "b": [0.1303, 0.3183, 0.1554, 0.3332]}, {"w": "will", "b": [0.1609, 0.3183, 0.1891, 0.3332]}, {"w": "know", "b": [0.1946, 0.3183, 0.2358, 0.3332]}, {"w": "when", "b": [0.2414, 0.3183, 0.2826, 0.3332]}, {"w": "to", "b": [0.2881, 0.3183, 0.3042, 0.3332]}, {"w": "use", "b": [0.3097, 0.3183, 0.335, 0.3332]}, {"w": "machine", "b": [0.3405, 0.3183, 0.4053, 0.3332]}, {"w": "learning,", "b": [0.4109, 0.3183, 0.4793, 0.3332]}, {"w": "when", "b": [0.485, 0.3183, 0.5262, 0.3332]}, {"w": "not", "b": [0.5317, 0.3183, 0.5578, 0.3332]}, {"w": "to", "b": [0.5634, 0.3183, 0.5795, 0.3332]}, {"w": "use", "b": [0.585, 0.3183, 0.6103, 0.3332]}, {"w": "it,", "b": [0.6158, 0.3183, 0.6329, 0.3332]}, {"w": "and", "b": [0.6386, 0.3183, 0.6677, 0.3332]}, {"w": "various", "b": [0.6733, 0.3183, 0.7292, 0.3332]}, {"w": "forms", "b": [0.7347, 0.3183, 0.7786, 0.3332]}, {"w": "of", "b": [0.7841, 0.3183, 0.7987, 0.3332]}, {"w": "machine", "b": [0.8043, 0.3183, 0.8691, 0.3332]}]}, {"id": "b_5", "type": "paragraph", "text": "learning such as model- and instance-based, deep and shallow, classification and regression, and others.", "words": [{"w": "learning", "b": [0.1312, 0.3362, 0.1962, 0.3512]}, {"w": "such", "b": [0.2023, 0.3362, 0.2379, 0.3512]}, {"w": "as", "b": [0.2441, 0.3362, 0.2607, 0.3512]}, {"w": "model-", "b": [0.2668, 0.3362, 0.3219, 0.3512]}, {"w": "and", "b": [0.328, 0.3362, 0.3579, 0.3512]}, {"w": "instance-based,", "b": [0.364, 0.3362, 0.4867, 0.3512]}, {"w": "deep", "b": [0.4929, 0.3362, 0.53, 0.3512]}, {"w": "and", "b": [0.5361, 0.3362, 0.566, 0.3512]}, {"w": "shallow,", "b": [0.5721, 0.3362, 0.6365, 0.3512]}, {"w": "classification", "b": [0.6427, 0.3362, 0.7448, 0.3512]}, {"w": "and", "b": [0.751, 0.3362, 0.7808, 0.3512]}, {"w": "regression,", "b": [0.787, 0.3362, 0.8717, 0.3512]}, {"w": "and", "b": [0.1312, 0.3542, 0.161, 0.3691]}, {"w": "others.", "b": [0.1671, 0.3542, 0.2216, 0.3691]}]}, {"id": "b_6", "type": "paragraph", "text": "Finally, we will define the scope of machine learning engineering and introduce the machine learning project lifecycle.", "words": [{"w": "Finally,", "b": [0.1312, 0.3811, 0.1912, 0.396]}, {"w": "we", "b": [0.1974, 0.3811, 0.2183, 0.396]}, {"w": "will", "b": [0.2244, 0.3811, 0.253, 0.396]}, {"w": "define", "b": [0.2592, 0.3811, 0.3061, 0.396]}, {"w": "the", "b": [0.3123, 0.3811, 0.3378, 0.396]}, {"w": "scope", "b": [0.344, 0.3811, 0.3875, 0.396]}, {"w": "of", "b": [0.3936, 0.3811, 0.4084, 0.396]}, {"w": "machine", "b": [0.4146, 0.3811, 0.4804, 0.396]}, {"w": "learning", "b": [0.4866, 0.3811, 0.5509, 0.396]}, {"w": "engineering", "b": [0.5571, 0.3811, 0.648, 0.396]}, {"w": "and", "b": [0.6542, 0.3811, 0.6837, 0.396]}, {"w": "introduce", "b": [0.6899, 0.3811, 0.7655, 0.396]}, {"w": "the", "b": [0.7717, 0.3811, 0.7972, 0.396]}, {"w": "machine", "b": [0.8033, 0.3811, 0.8691, 0.396]}, {"w": "learning", "b": [0.1312, 0.399, 0.1959, 0.414]}, {"w": "project", "b": [0.202, 0.399, 0.2585, 0.414]}, {"w": "lifecycle.", "b": [0.2647, 0.399, 0.3334, 0.414]}]}, {"id": "b_7", "type": "paragraph", "text": "1.1 Notation and Definitions", "words": [{"w": "1.1", "b": [0.1312, 0.4479, 0.1631, 0.4658]}, {"w": "Notation", "b": [0.188, 0.4479, 0.2847, 0.4658]}, {"w": "and", "b": [0.293, 0.4479, 0.3328, 0.4658]}, {"w": "Definitions", "b": [0.3411, 0.4479, 0.4589, 0.4658]}]}, {"id": "b_8", "type": "paragraph", "text": "Let’s start by stating the basic mathematical notation and define the terms and notions, to which we will often have recourse in this book.", "words": [{"w": "Let’s", "b": [0.1312, 0.4864, 0.1705, 0.5014]}, {"w": "start", "b": [0.1766, 0.4864, 0.2146, 0.5014]}, {"w": "by", "b": [0.2208, 0.4864, 0.2402, 0.5014]}, {"w": "stating", "b": [0.2464, 0.4864, 0.3018, 0.5014]}, {"w": "the", "b": [0.3079, 0.4864, 0.3335, 0.5014]}, {"w": "basic", "b": [0.3396, 0.4864, 0.3796, 0.5014]}, {"w": "mathematical", "b": [0.3858, 0.4864, 0.4953, 0.5014]}, {"w": "notation", "b": [0.5014, 0.4864, 0.5689, 0.5014]}, {"w": "and", "b": [0.5751, 0.4864, 0.6048, 0.5014]}, {"w": "define", "b": [0.6109, 0.4864, 0.658, 0.5014]}, {"w": "the", "b": [0.6641, 0.4864, 0.6897, 0.5014]}, {"w": "terms", "b": [0.6959, 0.4864, 0.7411, 0.5014]}, {"w": "and", "b": [0.7472, 0.4864, 0.7769, 0.5014]}, {"w": "notions,", "b": [0.783, 0.4864, 0.8466, 0.5014]}, {"w": "to", "b": [0.8527, 0.4864, 0.8691, 0.5014]}, {"w": "which", "b": [0.1306, 0.5044, 0.1772, 0.5194]}, {"w": "we", "b": [0.1834, 0.5044, 0.2044, 0.5194]}, {"w": "will", "b": [0.2105, 0.5044, 0.2393, 0.5194]}, {"w": "often", "b": [0.2454, 0.5044, 0.2859, 0.5194]}, {"w": "have", "b": [0.2921, 0.5044, 0.3285, 0.5194]}, {"w": "recourse", "b": [0.3346, 0.5044, 0.4005, 0.5194]}, {"w": "in", "b": [0.4066, 0.5044, 0.422, 0.5194]}, {"w": "this", "b": [0.4282, 0.5044, 0.458, 0.5194]}, {"w": "book.", "b": [0.4642, 0.5044, 0.5088, 0.5194]}]}, {"id": "b_9", "type": "paragraph", "text": "1.1.1 Data Structures", "words": [{"w": "1.1.1", "b": [0.1312, 0.5525, 0.1749, 0.5675]}, {"w": "Data", "b": [0.1961, 0.5525, 0.2412, 0.5675]}, {"w": "Structures", "b": [0.2483, 0.5525, 0.3452, 0.5675]}]}, {"id": "b_10", "type": "paragraph", "text": "A scalar1 is a simple numerical value, like 15 or −3.25. Variables or constants that take scalar values are denoted by an italic letter, like x or a.", "words": [{"w": "A", "b": [0.1305, 0.5888, 0.1446, 0.6038]}, {"w": "scalar1", "b": [0.1515, 0.5872, 0.2119, 0.6041]}, {"w": "is", "b": [0.2196, 0.5888, 0.2323, 0.6038]}, {"w": "a", "b": [0.2391, 0.5888, 0.2485, 0.6038]}, {"w": "simple", "b": [0.2553, 0.5888, 0.3077, 0.6038]}, {"w": "numerical", "b": [0.3145, 0.5888, 0.3946, 0.6038]}, {"w": "value,", "b": [0.4014, 0.5888, 0.449, 0.6038]}, {"w": "like", "b": [0.456, 0.5888, 0.4842, 0.6038]}, {"w": "15", "b": [0.4909, 0.5888, 0.5097, 0.6038]}, {"w": "or", "b": [0.5165, 0.5888, 0.5333, 0.6038]}, {"w": "−3.25.", "b": [0.5401, 0.5888, 0.5931, 0.6041]}, {"w": "Variables", "b": [0.6032, 0.5888, 0.6787, 0.6038]}, {"w": "or", "b": [0.6855, 0.5888, 0.7023, 0.6038]}, {"w": "constants", "b": [0.7091, 0.5888, 0.7862, 0.6038]}, {"w": "that", "b": [0.793, 0.5888, 0.8275, 0.6038]}, {"w": "take", "b": [0.8344, 0.5888, 0.8689, 0.6038]}, {"w": "scalar", "b": [0.1312, 0.6068, 0.1775, 0.6217]}, {"w": "values", "b": [0.1837, 0.6068, 0.2325, 0.6217]}, {"w": "are", "b": [0.2387, 0.6068, 0.2633, 0.6217]}, {"w": "denoted", "b": [0.2695, 0.6068, 0.3331, 0.6217]}, {"w": "by", "b": [0.3392, 0.6068, 0.3587, 0.6217]}, {"w": "an", "b": [0.3649, 0.6068, 0.3843, 0.6217]}, {"w": "italic", "b": [0.3905, 0.6068, 0.4305, 0.6217]}, {"w": "letter,", "b": [0.4366, 0.6068, 0.4849, 0.6217]}, {"w": "like", "b": [0.491, 0.6068, 0.5187, 0.6217]}, {"w": "x", "b": [0.5247, 0.607, 0.5352, 0.622]}, {"w": "or", "b": [0.5414, 0.6068, 0.5578, 0.6217]}, {"w": "a.", "b": [0.564, 0.6068, 0.5788, 0.622]}]}, {"id": "b_11", "type": "paragraph", "text": "A vector is an ordered list of scalar values, called attributes. We denote a vector as a bold character, for example, x or w. Vectors can be visualized as arrows that point to some directions as well as points in a multi-dimensional space. Illustrations of three two-dimensional vectors, a = [2, 3], b = [−2, 5], and c = [1, 0] are given in Figure 1. We denote an attribute of a vector as an italic value with an index, like this: w(j) or x(j). The index j denotes a specific dimension of the vector, the position of an attribute in the list. For instance, in the vector a shown in red in Figure 1, a(1) = 2 and a(2) = 3.", "words": [{"w": "A", "b": [0.1305, 0.6337, 0.1444, 0.6486]}, {"w": "vector", "b": [0.1505, 0.634, 0.2079, 0.649]}, {"w": "is", "b": [0.214, 0.6337, 0.2264, 0.6486]}, {"w": "an", "b": [0.2326, 0.6337, 0.252, 0.6486]}, {"w": "ordered", "b": [0.2582, 0.6337, 0.3187, 0.6486]}, {"w": "list", "b": [0.3249, 0.6337, 0.3496, 0.6486]}, {"w": "of", "b": [0.3557, 0.6337, 0.3706, 0.6486]}, {"w": "scalar", "b": [0.3767, 0.6337, 0.423, 0.6486]}, {"w": "values,", "b": [0.4291, 0.6337, 0.483, 0.6486]}, {"w": "called", "b": [0.4892, 0.6337, 0.5353, 0.6486]}, {"w": "attributes.", "b": [0.5415, 0.6337, 0.6256, 0.6486]}, {"w": "We", "b": [0.6338, 0.6337, 0.6594, 0.6486]}, {"w": "denote", "b": [0.6656, 0.6337, 0.7189, 0.6486]}, {"w": "a", "b": [0.725, 0.6337, 0.7342, 0.6486]}, {"w": "vector", "b": [0.7404, 0.6337, 0.7896, 0.6486]}, {"w": "as", "b": [0.7958, 0.6337, 0.8123, 0.6486]}, {"w": "a", "b": [0.8184, 0.6337, 0.8276, 0.6486]}, {"w": "bold", "b": [0.8338, 0.6337, 0.8691, 0.6486]}, {"w": "character,", "b": [0.1312, 0.6516, 0.2124, 0.6666]}, {"w": "for", "b": [0.2203, 0.6516, 0.2428, 0.6666]}, {"w": "example,", "b": [0.2503, 0.6516, 0.323, 0.6666]}, {"w": "x", "b": [0.3308, 0.6519, 0.342, 0.6669]}, {"w": "or", "b": [0.3496, 0.6516, 0.3664, 0.6666]}, {"w": "w.", "b": [0.3739, 0.6516, 0.3945, 0.6669]}, {"w": "Vectors", "b": [0.4068, 0.6516, 0.4677, 0.6666]}, {"w": "can", "b": [0.4752, 0.6516, 0.5034, 0.6666]}, {"w": "be", "b": [0.5109, 0.6516, 0.5303, 0.6666]}, {"w": "visualized", "b": [0.5378, 0.6516, 0.618, 0.6666]}, {"w": "as", "b": [0.6255, 0.6516, 0.6423, 0.6666]}, {"w": "arrows", "b": [0.6498, 0.6516, 0.7039, 0.6666]}, {"w": "that", "b": [0.7114, 0.6516, 0.7459, 0.6666]}, {"w": "point", "b": [0.7534, 0.6516, 0.7963, 0.6666]}, {"w": "to", "b": [0.8038, 0.6516, 0.8206, 0.6666]}, {"w": "some", "b": [0.8281, 0.6516, 0.869, 0.6666]}, {"w": "directions", "b": [0.1312, 0.6696, 0.2078, 0.6845]}, {"w": "as", "b": [0.2125, 0.6696, 0.2287, 0.6845]}, {"w": "well", "b": [0.2334, 0.6696, 0.264, 0.6845]}, {"w": "as", "b": [0.2687, 0.6696, 0.2849, 0.6845]}, {"w": "points", "b": [0.2896, 0.6696, 0.338, 0.6845]}, {"w": "in", "b": [0.3427, 0.6696, 0.3577, 0.6845]}, {"w": "a", "b": [0.3624, 0.6696, 0.3715, 0.6845]}, {"w": "multi-dimensional", "b": [0.3762, 0.6696, 0.5175, 0.6845]}, {"w": "space.", "b": [0.5222, 0.6696, 0.5695, 0.6845]}, {"w": "Illustrations", "b": [0.5772, 0.6696, 0.6725, 0.6845]}, {"w": "of", "b": [0.6772, 0.6696, 0.6917, 0.6845]}, {"w": "three", "b": [0.6965, 0.6696, 0.7367, 0.6845]}, {"w": "two-dimensional", "b": [0.7414, 0.6696, 0.8691, 0.6845]}, {"w": "vectors,", "b": [0.1308, 0.6875, 0.193, 0.7025]}, {"w": "a", "b": [0.1991, 0.6878, 0.2094, 0.7028]}, {"w": "=", "b": [0.2149, 0.6875, 0.2294, 0.7025]}, {"w": "[2,", "b": [0.2345, 0.6875, 0.2542, 0.7028]}, {"w": "3],", "b": [0.2573, 0.6875, 0.277, 0.7025]}, {"w": "b", "b": [0.2831, 0.6878, 0.2949, 0.7028]}, {"w": "=", "b": [0.3, 0.6875, 0.3145, 0.7025]}, {"w": "[−2,", "b": [0.3196, 0.6875, 0.3537, 0.7028]}, {"w": "5],", "b": [0.3567, 0.6875, 0.3764, 0.7025]}, {"w": "and", "b": [0.3825, 0.6875, 0.4125, 0.7025]}, {"w": "c", "b": [0.4186, 0.6878, 0.428, 0.7028]}, {"w": "=", "b": [0.4332, 0.6875, 0.4477, 0.7025]}, {"w": "[1,", "b": [0.4528, 0.6875, 0.4725, 0.7028]}, {"w": "0]", "b": [0.4755, 0.6875, 0.49, 0.7025]}, {"w": "are", "b": [0.4962, 0.6875, 0.521, 0.7025]}, {"w": "given", "b": [0.5272, 0.6875, 0.5696, 0.7025]}, {"w": "in", "b": [0.5757, 0.6875, 0.5912, 0.7025]}, {"w": "Figure", "b": [0.5974, 0.6875, 0.6499, 0.7025]}, {"w": "1.", "b": [0.6561, 0.6875, 0.6705, 0.7025]}, {"w": "We", "b": [0.6787, 0.6875, 0.7046, 0.7025]}, {"w": "denote", "b": [0.7107, 0.6875, 0.7645, 0.7025]}, {"w": "an", "b": [0.7707, 0.6875, 0.7903, 0.7025]}, {"w": "attribute", "b": [0.7965, 0.6875, 0.8689, 0.7025]}, {"w": "of", "b": [0.1312, 0.7055, 0.1464, 0.7204]}, {"w": "a", "b": [0.153, 0.7055, 0.1624, 0.7204]}, {"w": "vector", "b": [0.169, 0.7055, 0.2193, 0.7204]}, {"w": "as", "b": [0.2259, 0.7055, 0.2428, 0.7204]}, {"w": "an", "b": [0.2494, 0.7055, 0.2693, 0.7204]}, {"w": "italic", "b": [0.2759, 0.7055, 0.3167, 0.7204]}, {"w": "value", "b": [0.3233, 0.7055, 0.3657, 0.7204]}, {"w": "with", "b": [0.3723, 0.7055, 0.4089, 0.7204]}, {"w": "an", "b": [0.4155, 0.7055, 0.4354, 0.7204]}, {"w": "index,", "b": [0.442, 0.7055, 0.4917, 0.7204]}, {"w": "like", "b": [0.4984, 0.7055, 0.5267, 0.7204]}, {"w": "this:", "b": [0.5333, 0.7055, 0.569, 0.7204]}, {"w": "w(j)", "b": [0.5779, 0.7038, 0.61, 0.7207]}, {"w": "or", "b": [0.6175, 0.7055, 0.6343, 0.7204]}, {"w": "x(j).", "b": [0.6409, 0.7038, 0.676, 0.7207]}, {"w": "The", "b": [0.6856, 0.7055, 0.718, 0.7204]}, {"w": "index", "b": [0.7247, 0.7055, 0.7691, 0.7204]}, {"w": "j", "b": [0.7757, 0.7058, 0.7833, 0.7207]}, {"w": "denotes", "b": [0.791, 0.7055, 0.8528, 0.7204]}, {"w": "a", "b": [0.8594, 0.7055, 0.8688, 0.7204]}, {"w": "specific", "b": [0.1312, 0.7234, 0.1882, 0.7384]}, {"w": "dimension", "b": [0.194, 0.7237, 0.2876, 0.7387]}, {"w": "of", "b": [0.2935, 0.7234, 0.3081, 0.7384]}, {"w": "the", "b": [0.314, 0.7234, 0.3391, 0.7384]}, {"w": "vector,", "b": [0.345, 0.7234, 0.3983, 0.7384]}, {"w": "the", "b": [0.4043, 0.7234, 0.4294, 0.7384]}, {"w": "position", "b": [0.4353, 0.7234, 0.4982, 0.7384]}, {"w": "of", "b": [0.5041, 0.7234, 0.5187, 0.7384]}, {"w": "an", "b": [0.5246, 0.7234, 0.5437, 0.7384]}, {"w": "attribute", "b": [0.5496, 0.7234, 0.62, 0.7384]}, {"w": "in", "b": [0.6259, 0.7234, 0.6409, 0.7384]}, {"w": "the", "b": [0.6469, 0.7234, 0.672, 0.7384]}, {"w": "list.", "b": [0.6779, 0.7234, 0.7071, 0.7384]}, {"w": "For", "b": [0.7153, 0.7234, 0.7417, 0.7384]}, {"w": "instance,", "b": [0.7476, 0.7234, 0.817, 0.7384]}, {"w": "in", "b": [0.823, 0.7234, 0.838, 0.7384]}, {"w": "the", "b": [0.8439, 0.7234, 0.8691, 0.7384]}, {"w": "vector", "b": [0.1308, 0.7414, 0.18, 0.7563]}, {"w": "a", "b": [0.1862, 0.7417, 0.1965, 0.7566]}, {"w": "shown", "b": [0.203, 0.7414, 0.2528, 0.7563]}, {"w": "in", "b": [0.259, 0.7414, 0.2744, 0.7563]}, {"w": "red", "b": [0.2805, 0.7414, 0.3062, 0.7563]}, {"w": "in", "b": [0.3124, 0.7414, 0.3278, 0.7563]}, {"w": "Figure", "b": [0.3339, 0.7414, 0.386, 0.7563]}, {"w": "1,", "b": [0.3922, 0.7414, 0.4065, 0.7563]}, {"w": "a(1)", "b": [0.4126, 0.7397, 0.4412, 0.7566]}, {"w": "=", "b": [0.4473, 0.7414, 0.4616, 0.7563]}, {"w": "2", "b": [0.4667, 0.7414, 0.476, 0.7563]}, {"w": "and", "b": [0.4821, 0.7414, 0.5118, 0.7563]}, {"w": "a(2)", "b": [0.518, 0.7397, 0.5466, 0.7566]}, {"w": "=", "b": [0.5527, 0.7414, 0.567, 0.7563]}, {"w": "3.", "b": [0.5721, 0.7414, 0.5865, 0.7563]}]}, {"id": "b_12", "type": "paragraph", "text": "1If a term is in bold, that means that the term can be found in the index at the end of the book.", "words": [{"w": "1If", "b": [0.1518, 0.7684, 0.1699, 0.7823]}, {"w": "a", "b": [0.1751, 0.7703, 0.183, 0.7823]}, {"w": "term", "b": [0.1882, 0.7703, 0.2204, 0.7823]}, {"w": "is", "b": [0.2257, 0.7703, 0.2362, 0.7823]}, {"w": "in", "b": [0.2414, 0.7703, 0.2565, 0.7822]}, {"w": "bold,", "b": [0.2625, 0.7703, 0.3015, 0.7823]}, {"w": "that", "b": [0.3068, 0.7703, 0.3355, 0.7823]}, {"w": "means", "b": [0.3407, 0.7703, 0.3835, 0.7823]}, {"w": "that", "b": [0.3887, 0.7703, 0.4175, 0.7823]}, {"w": "the", "b": [0.4227, 0.7703, 0.4445, 0.7823]}, {"w": "term", "b": [0.4497, 0.7703, 0.4819, 0.7823]}, {"w": "can", "b": [0.4871, 0.7703, 0.5107, 0.7823]}, {"w": "be", "b": [0.5159, 0.7703, 0.532, 0.7823]}, {"w": "found", "b": [0.5372, 0.7703, 0.576, 0.7823]}, {"w": "in", "b": [0.5812, 0.7703, 0.5943, 0.7823]}, {"w": "the", "b": [0.5995, 0.7703, 0.6213, 0.7823]}, {"w": "index", "b": [0.6265, 0.7703, 0.6635, 0.7823]}, {"w": "at", "b": [0.6687, 0.7703, 0.6827, 0.7823]}, {"w": "the", "b": [0.6879, 0.7703, 0.7097, 0.7823]}, {"w": "end", "b": [0.7149, 0.7703, 0.7393, 0.7823]}, {"w": "of", "b": [0.7445, 0.7703, 0.7571, 0.7823]}, {"w": "the", "b": [0.7624, 0.7703, 0.7841, 0.7823]}, {"w": "book.", "b": [0.7894, 0.7703, 0.8273, 0.7823]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "3", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 12, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 1: Three vectors visualized as directions and as points.", "words": [{"w": "Figure", "b": [0.2494, 0.3712, 0.3015, 0.3862]}, {"w": "1:", "b": [0.3076, 0.3712, 0.322, 0.3862]}, {"w": "Three", "b": [0.3302, 0.3712, 0.3774, 0.3862]}, {"w": "vectors", "b": [0.3836, 0.3712, 0.4401, 0.3862]}, {"w": "visualized", "b": [0.4463, 0.3712, 0.5248, 0.3862]}, {"w": "as", "b": [0.531, 0.3712, 0.5475, 0.3862]}, {"w": "directions", "b": [0.5536, 0.3712, 0.6317, 0.3862]}, {"w": "and", "b": [0.6379, 0.3712, 0.6676, 0.3862]}, {"w": "as", "b": [0.6738, 0.3712, 0.6903, 0.3862]}, {"w": "points.", "b": [0.6965, 0.3712, 0.7509, 0.3862]}]}, {"id": "b_1", "type": "paragraph", "text": "The notation x(j) should not be confused with the power operator, such as the 2 in x2", "words": [{"w": "The", "b": [0.1306, 0.4215, 0.163, 0.4364]}, {"w": "notation", "b": [0.1709, 0.4215, 0.2399, 0.4364]}, {"w": "x(j)", "b": [0.2478, 0.4198, 0.2767, 0.4367]}, {"w": "should", "b": [0.2856, 0.4215, 0.339, 0.4364]}, {"w": "not", "b": [0.3469, 0.4215, 0.3741, 0.4364]}, {"w": "be", "b": [0.382, 0.4215, 0.4014, 0.4364]}, {"w": "confused", "b": [0.4093, 0.4215, 0.48, 0.4364]}, {"w": "with", "b": [0.4879, 0.4215, 0.5245, 0.4364]}, {"w": "the", "b": [0.5324, 0.4215, 0.5586, 0.4364]}, {"w": "power", "b": [0.5665, 0.4215, 0.6152, 0.4364]}, {"w": "operator,", "b": [0.6231, 0.4215, 0.698, 0.4364]}, {"w": "such", "b": [0.7064, 0.4215, 0.7426, 0.4364]}, {"w": "as", "b": [0.7505, 0.4215, 0.7673, 0.4364]}, {"w": "the", "b": [0.7752, 0.4215, 0.8014, 0.4364]}, {"w": "2", "b": [0.809, 0.4215, 0.8184, 0.4364]}, {"w": "in", "b": [0.8264, 0.4215, 0.842, 0.4364]}, {"w": "x2", "b": [0.8499, 0.4199, 0.8678, 0.4367]}]}, {"id": "b_2", "type": "paragraph", "text": "(squared) or 3 in x3 (cubed). If we want to apply a power operator, say squared, to an", "words": [{"w": "(squared)", "b": [0.1291, 0.4394, 0.2072, 0.4544]}, {"w": "or", "b": [0.2146, 0.4394, 0.2314, 0.4544]}, {"w": "3", "b": [0.2388, 0.4394, 0.2482, 0.4544]}, {"w": "in", "b": [0.2557, 0.4394, 0.2714, 0.4544]}, {"w": "x3", "b": [0.2788, 0.4378, 0.2967, 0.4547]}, {"w": "(cubed).", "b": [0.3051, 0.4394, 0.3736, 0.4544]}, {"w": "If", "b": [0.3858, 0.4394, 0.3983, 0.4544]}, {"w": "we", "b": [0.4058, 0.4394, 0.4272, 0.4544]}, {"w": "want", "b": [0.4347, 0.4394, 0.4744, 0.4544]}, {"w": "to", "b": [0.4819, 0.4394, 0.4986, 0.4544]}, {"w": "apply", "b": [0.5061, 0.4394, 0.5516, 0.4544]}, {"w": "a", "b": [0.559, 0.4394, 0.5685, 0.4544]}, {"w": "power", "b": [0.5759, 0.4394, 0.6246, 0.4544]}, {"w": "operator,", "b": [0.6321, 0.4394, 0.7069, 0.4544]}, {"w": "say", "b": [0.7147, 0.4394, 0.741, 0.4544]}, {"w": "squared,", "b": [0.7484, 0.4394, 0.8171, 0.4544]}, {"w": "to", "b": [0.8249, 0.4394, 0.8417, 0.4544]}, {"w": "an", "b": [0.8491, 0.4394, 0.869, 0.4544]}]}, {"id": "b_3", "type": "paragraph", "text": "indexed attribute of a vector, we write like this: (x(j))2.", "words": [{"w": "indexed", "b": [0.1312, 0.4574, 0.1933, 0.4723]}, {"w": "attribute", "b": [0.1994, 0.4574, 0.2713, 0.4723]}, {"w": "of", "b": [0.2774, 0.4574, 0.2923, 0.4723]}, {"w": "a", "b": [0.2985, 0.4574, 0.3077, 0.4723]}, {"w": "vector,", "b": [0.3138, 0.4574, 0.3682, 0.4723]}, {"w": "we", "b": [0.3744, 0.4574, 0.3954, 0.4723]}, {"w": "write", "b": [0.4016, 0.4574, 0.4426, 0.4723]}, {"w": "like", "b": [0.4488, 0.4574, 0.4765, 0.4723]}, {"w": "this:", "b": [0.4826, 0.4574, 0.5176, 0.4723]}, {"w": "(x(j))2.", "b": [0.5256, 0.4557, 0.5832, 0.4726]}]}, {"id": "b_4", "type": "paragraph", "text": "A variable can have two or more indices, like this: x(j)", "words": [{"w": "A", "b": [0.1305, 0.4872, 0.1446, 0.5022]}, {"w": "variable", "b": [0.1516, 0.4872, 0.216, 0.5022]}, {"w": "can", "b": [0.223, 0.4872, 0.2512, 0.5022]}, {"w": "have", "b": [0.2582, 0.4872, 0.2953, 0.5022]}, {"w": "two", "b": [0.3023, 0.4872, 0.3316, 0.5022]}, {"w": "or", "b": [0.3386, 0.4872, 0.3553, 0.5022]}, {"w": "more", "b": [0.3623, 0.4872, 0.4031, 0.5022]}, {"w": "indices,", "b": [0.4101, 0.4872, 0.4709, 0.5022]}, {"w": "like", "b": [0.4781, 0.4872, 0.5063, 0.5022]}, {"w": "this:", "b": [0.5133, 0.4872, 0.549, 0.5022]}, {"w": "x(j)", "b": [0.5586, 0.4832, 0.5875, 0.5024]}]}, {"id": "b_5", "type": "paragraph", "text": "i or like this x(k)", "words": [{"w": "i", "b": [0.5692, 0.4952, 0.5744, 0.5056]}, {"w": "or", "b": [0.5954, 0.4872, 0.6122, 0.5022]}, {"w": "like", "b": [0.6192, 0.4872, 0.6474, 0.5022]}, {"w": "this", "b": [0.6544, 0.4872, 0.6848, 0.5022]}, {"w": "x(k)", "b": [0.6917, 0.4832, 0.722, 0.5024]}]}, {"id": "b_6", "type": "paragraph", "text": "i,j . For example, in", "words": [{"w": "i,j", "b": [0.7023, 0.4952, 0.718, 0.5056]}, {"w": ".", "b": [0.7229, 0.4872, 0.7281, 0.5022]}, {"w": "For", "b": [0.7388, 0.4872, 0.7663, 0.5022]}, {"w": "example,", "b": [0.7733, 0.4872, 0.846, 0.5022]}, {"w": "in", "b": [0.8531, 0.4872, 0.8688, 0.5022]}]}, {"id": "b_7", "type": "paragraph", "text": "neural networks, we denote as x(j)", "words": [{"w": "neural", "b": [0.1312, 0.5105, 0.1815, 0.5255]}, {"w": "networks,", "b": [0.1877, 0.5105, 0.2642, 0.5255]}, {"w": "we", "b": [0.2704, 0.5105, 0.2914, 0.5255]}, {"w": "denote", "b": [0.2976, 0.5105, 0.3509, 0.5255]}, {"w": "as", "b": [0.357, 0.5105, 0.3735, 0.5255]}, {"w": "x(j)", "b": [0.3796, 0.5065, 0.4085, 0.5258]}]}, {"id": "b_8", "type": "paragraph", "text": "l,u the input feature j of unit u in layer l.", "words": [{"w": "l,u", "b": [0.3901, 0.5188, 0.408, 0.5293]}, {"w": "the", "b": [0.4156, 0.5105, 0.4412, 0.5255]}, {"w": "input", "b": [0.4474, 0.5105, 0.4904, 0.5255]}, {"w": "feature", "b": [0.4966, 0.5105, 0.5525, 0.5255]}, {"w": "j", "b": [0.5586, 0.5108, 0.5662, 0.5258]}, {"w": "of", "b": [0.5734, 0.5105, 0.5883, 0.5255]}, {"w": "unit", "b": [0.5944, 0.5105, 0.6273, 0.5255]}, {"w": "u", "b": [0.6334, 0.5108, 0.6439, 0.5258]}, {"w": "in", "b": [0.6501, 0.5105, 0.6655, 0.5255]}, {"w": "layer", "b": [0.6716, 0.5105, 0.7101, 0.5255]}, {"w": "l.", "b": [0.7162, 0.5105, 0.7272, 0.5258]}]}, {"id": "b_9", "type": "paragraph", "text": "A matrix is a rectangular array of numbers arranged in rows and columns. Below is an example of a matrix with two rows and three columns,", "words": [{"w": "A", "b": [0.1305, 0.5375, 0.1446, 0.5524]}, {"w": "matrix", "b": [0.1517, 0.5378, 0.2138, 0.5527]}, {"w": "is", "b": [0.2209, 0.5375, 0.2335, 0.5524]}, {"w": "a", "b": [0.2406, 0.5375, 0.25, 0.5524]}, {"w": "rectangular", "b": [0.257, 0.5375, 0.3502, 0.5524]}, {"w": "array", "b": [0.3572, 0.5375, 0.4002, 0.5524]}, {"w": "of", "b": [0.4073, 0.5375, 0.4224, 0.5524]}, {"w": "numbers", "b": [0.4294, 0.5375, 0.4992, 0.5524]}, {"w": "arranged", "b": [0.5062, 0.5375, 0.5785, 0.5524]}, {"w": "in", "b": [0.5855, 0.5375, 0.6012, 0.5524]}, {"w": "rows", "b": [0.6082, 0.5375, 0.6455, 0.5524]}, {"w": "and", "b": [0.6526, 0.5375, 0.6829, 0.5524]}, {"w": "columns.", "b": [0.6899, 0.5375, 0.7622, 0.5524]}, {"w": "Below", "b": [0.773, 0.5375, 0.8224, 0.5524]}, {"w": "is", "b": [0.8295, 0.5375, 0.8421, 0.5524]}, {"w": "an", "b": [0.8491, 0.5375, 0.869, 0.5524]}, {"w": "example", "b": [0.1312, 0.5554, 0.1974, 0.5704]}, {"w": "of", "b": [0.2035, 0.5554, 0.2184, 0.5704]}, {"w": "a", "b": [0.2245, 0.5554, 0.2338, 0.5704]}, {"w": "matrix", "b": [0.2399, 0.5554, 0.2938, 0.5704]}, {"w": "with", "b": [0.2999, 0.5554, 0.3358, 0.5704]}, {"w": "two", "b": [0.342, 0.5554, 0.3707, 0.5704]}, {"w": "rows", "b": [0.3768, 0.5554, 0.4134, 0.5704]}, {"w": "and", "b": [0.4195, 0.5554, 0.4493, 0.5704]}, {"w": "three", "b": [0.4554, 0.5554, 0.4965, 0.5704]}, {"w": "columns,", "b": [0.5026, 0.5554, 0.5735, 0.5704]}]}, {"id": "b_10", "type": "equation", "text": "A =", "words": [{"w": "A", "b": [0.4264, 0.6058, 0.4424, 0.6208]}, {"w": "=", "b": [0.4475, 0.6055, 0.4619, 0.6205]}]}, {"id": "b_11", "type": "paragraph", "text": "2 −2 1 3 5 0", "words": [{"w": "2", "b": [0.4768, 0.5964, 0.486, 0.6113]}, {"w": "−2", "b": [0.5044, 0.5964, 0.528, 0.6114]}, {"w": "1", "b": [0.5465, 0.5964, 0.5557, 0.6113]}, {"w": "3", "b": [0.4768, 0.6143, 0.486, 0.6293]}, {"w": "5", "b": [0.5116, 0.6143, 0.5208, 0.6293]}, {"w": "0", "b": [0.5465, 0.6143, 0.5557, 0.6293]}]}, {"id": "b_14", "type": "paragraph", "text": "Matrices are denoted with bold capital letters, such as A or W. You can notice from the above example of matrix A that matrices can be seen as regular structures composed of vectors. Indeed, the columns of matrix A above are vectors a, b, and c illustrated in Figure 1.", "words": [{"w": "Matrices", "b": [0.1312, 0.6495, 0.202, 0.6644]}, {"w": "are", "b": [0.2084, 0.6495, 0.2336, 0.6644]}, {"w": "denoted", "b": [0.24, 0.6495, 0.3048, 0.6644]}, {"w": "with", "b": [0.3112, 0.6495, 0.3478, 0.6644]}, {"w": "bold", "b": [0.3542, 0.6495, 0.3903, 0.6644]}, {"w": "capital", "b": [0.3967, 0.6495, 0.4521, 0.6644]}, {"w": "letters,", "b": [0.4585, 0.6495, 0.5152, 0.6644]}, {"w": "such", "b": [0.5216, 0.6495, 0.5579, 0.6644]}, {"w": "as", "b": [0.5643, 0.6495, 0.5811, 0.6644]}, {"w": "A", "b": [0.5872, 0.6498, 0.6033, 0.6647]}, {"w": "or", "b": [0.6097, 0.6495, 0.6265, 0.6644]}, {"w": "W.", "b": [0.6329, 0.6495, 0.6601, 0.6647]}, {"w": "You", "b": [0.669, 0.6495, 0.7015, 0.6644]}, {"w": "can", "b": [0.7079, 0.6495, 0.7361, 0.6644]}, {"w": "notice", "b": [0.7425, 0.6495, 0.7917, 0.6644]}, {"w": "from", "b": [0.7981, 0.6495, 0.8363, 0.6644]}, {"w": "the", "b": [0.8427, 0.6495, 0.8689, 0.6644]}, {"w": "above", "b": [0.1312, 0.6674, 0.1783, 0.6824]}, {"w": "example", "b": [0.1854, 0.6674, 0.2529, 0.6824]}, {"w": "of", "b": [0.26, 0.6674, 0.2752, 0.6824]}, {"w": "matrix", "b": [0.2823, 0.6674, 0.3372, 0.6824]}, {"w": "A", "b": [0.3443, 0.6677, 0.3603, 0.6827]}, {"w": "that", "b": [0.3674, 0.6674, 0.4019, 0.6824]}, {"w": "matrices", "b": [0.409, 0.6674, 0.4782, 0.6824]}, {"w": "can", "b": [0.4854, 0.6674, 0.5136, 0.6824]}, {"w": "be", "b": [0.5207, 0.6674, 0.54, 0.6824]}, {"w": "seen", "b": [0.5471, 0.6674, 0.5818, 0.6824]}, {"w": "as", "b": [0.5889, 0.6674, 0.6057, 0.6824]}, {"w": "regular", "b": [0.6129, 0.6674, 0.6705, 0.6824]}, {"w": "structures", "b": [0.6776, 0.6674, 0.7595, 0.6824]}, {"w": "composed", "b": [0.7666, 0.6674, 0.8468, 0.6824]}, {"w": "of", "b": [0.8539, 0.6674, 0.869, 0.6824]}, {"w": "vectors.", "b": [0.1308, 0.6854, 0.1916, 0.7003]}, {"w": "Indeed,", "b": [0.1998, 0.6854, 0.2581, 0.7003]}, {"w": "the", "b": [0.2642, 0.6854, 0.2895, 0.7003]}, {"w": "columns", "b": [0.2956, 0.6854, 0.3605, 0.7003]}, {"w": "of", "b": [0.3667, 0.6854, 0.3813, 0.7003]}, {"w": "matrix", "b": [0.3875, 0.6854, 0.4406, 0.7003]}, {"w": "A", "b": [0.4466, 0.6857, 0.4627, 0.7006]}, {"w": "above", "b": [0.4688, 0.6854, 0.5144, 0.7003]}, {"w": "are", "b": [0.5205, 0.6854, 0.5448, 0.7003]}, {"w": "vectors", "b": [0.551, 0.6854, 0.6068, 0.7003]}, {"w": "a,", "b": [0.6129, 0.6854, 0.6287, 0.7006]}, {"w": "b,", "b": [0.6348, 0.6854, 0.6516, 0.7006]}, {"w": "and", "b": [0.6578, 0.6854, 0.6871, 0.7003]}, {"w": "c", "b": [0.6933, 0.6857, 0.7027, 0.7006]}, {"w": "illustrated", "b": [0.7088, 0.6854, 0.79, 0.7003]}, {"w": "in", "b": [0.7961, 0.6854, 0.8113, 0.7003]}, {"w": "Figure", "b": [0.8174, 0.6854, 0.8689, 0.7003]}, {"w": "1.", "b": [0.1303, 0.7033, 0.1447, 0.7183]}]}, {"id": "b_15", "type": "paragraph", "text": "A set is an unordered collection of unique elements. We denote a set as a calligraphic capital character, for example, S. A set of numbers can be finite (include a fixed amount of values). In this case, it is denoted using accolades, for example, {1, 3, 18, 23, 235} or {x1, x2, x3, x4, . . . , xn}. Alternatively, a set can be infinite and include all values in some inter- val. If a set includes all values between a and b, including a and b, it is denoted using brackets as [a, b]. If the set doesn’t include the values a and b, such a set is denoted using parentheses like this: (a, b). For example, the set [0, 1] includes such values as 0, 0.0001, 0.25, 0.784, 0.9995, and 1.0. A special set denoted R includes all numbers from minus infinity to plus infinity.", "words": [{"w": "A", "b": [0.1305, 0.7302, 0.1446, 0.7452]}, {"w": "set", "b": [0.1526, 0.7305, 0.179, 0.7455]}, {"w": "is", "b": [0.187, 0.7302, 0.1997, 0.7452]}, {"w": "an", "b": [0.2077, 0.7302, 0.2275, 0.7452]}, {"w": "unordered", "b": [0.2355, 0.7302, 0.3183, 0.7452]}, {"w": "collection", "b": [0.3263, 0.7302, 0.4037, 0.7452]}, {"w": "of", "b": [0.4117, 0.7302, 0.4269, 0.7452]}, {"w": "unique", "b": [0.4349, 0.7302, 0.4898, 0.7452]}, {"w": "elements.", "b": [0.4978, 0.7302, 0.5738, 0.7452]}, {"w": "We", "b": [0.5875, 0.7302, 0.6137, 0.7452]}, {"w": "denote", "b": [0.6217, 0.7302, 0.6761, 0.7452]}, {"w": "a", "b": [0.6841, 0.7302, 0.6935, 0.7452]}, {"w": "set", "b": [0.7015, 0.7302, 0.7247, 0.7452]}, {"w": "as", "b": [0.7327, 0.7302, 0.7495, 0.7452]}, {"w": "a", "b": [0.7575, 0.7302, 0.7669, 0.7452]}, {"w": "calligraphic", "b": [0.7749, 0.7302, 0.8691, 0.7452]}, {"w": "capital", "b": [0.1312, 0.7482, 0.1867, 0.7631]}, {"w": "character,", "b": [0.1932, 0.7482, 0.2744, 0.7631]}, {"w": "for", "b": [0.2809, 0.7482, 0.3035, 0.7631]}, {"w": "example,", "b": [0.31, 0.7482, 0.3827, 0.7631]}, {"w": "S.", "b": [0.3891, 0.7482, 0.4069, 0.7632]}, {"w": "A", "b": [0.4162, 0.7482, 0.4303, 0.7631]}, {"w": "set", "b": [0.4368, 0.7482, 0.4599, 0.7631]}, {"w": "of", "b": [0.4664, 0.7482, 0.4816, 0.7631]}, {"w": "numbers", "b": [0.4881, 0.7482, 0.5578, 0.7631]}, {"w": "can", "b": [0.5643, 0.7482, 0.5925, 0.7631]}, {"w": "be", "b": [0.599, 0.7482, 0.6184, 0.7631]}, {"w": "finite", "b": [0.6249, 0.7482, 0.6667, 0.7631]}, {"w": "(include", "b": [0.6732, 0.7482, 0.7391, 0.7631]}, {"w": "a", "b": [0.7456, 0.7482, 0.755, 0.7631]}, {"w": "fixed", "b": [0.7615, 0.7482, 0.8008, 0.7631]}, {"w": "amount", "b": [0.8073, 0.7482, 0.8695, 0.7631]}, {"w": "of", "b": [0.1312, 0.7661, 0.1464, 0.7811]}, {"w": "values).", "b": [0.1544, 0.7661, 0.2168, 0.7811]}, {"w": "In", "b": [0.2306, 0.7661, 0.2479, 0.7811]}, {"w": "this", "b": [0.2559, 0.7661, 0.2863, 0.7811]}, {"w": "case,", "b": [0.2943, 0.7661, 0.3332, 0.7811]}, {"w": "it", "b": [0.3416, 0.7661, 0.3542, 0.7811]}, {"w": "is", "b": [0.3622, 0.7661, 0.3749, 0.7811]}, {"w": "denoted", "b": [0.3829, 0.7661, 0.4477, 0.7811]}, {"w": "using", "b": [0.4558, 0.7661, 0.4988, 0.7811]}, {"w": "accolades,", "b": [0.5068, 0.7661, 0.5885, 0.7811]}, {"w": "for", "b": [0.597, 0.7661, 0.6195, 0.7811]}, {"w": "example,", "b": [0.6275, 0.7661, 0.7002, 0.7811]}, {"w": "{1,", "b": [0.7084, 0.7661, 0.7322, 0.7813]}, {"w": "3,", "b": [0.7352, 0.7661, 0.7498, 0.7813]}, {"w": "18,", "b": [0.7529, 0.7661, 0.7768, 0.7813]}, {"w": "23,", "b": [0.7799, 0.7661, 0.8038, 0.7813]}, {"w": "235}", "b": [0.8069, 0.7661, 0.8443, 0.7812]}, {"w": "or", "b": [0.8524, 0.7661, 0.8691, 0.7811]}, {"w": "{x1,", "b": [0.1312, 0.7841, 0.1644, 0.8006]}, {"w": "x2,", "b": [0.1675, 0.7843, 0.1914, 0.8006]}, {"w": "x3,", "b": [0.1945, 0.7843, 0.2184, 0.8006]}, {"w": "x4,", "b": [0.2215, 0.7843, 0.2455, 0.8006]}, {"w": ".", "b": [0.2485, 0.7843, 0.2537, 0.7993]}, {"w": ".", "b": [0.2567, 0.7843, 0.2619, 0.7993]}, {"w": ".", "b": [0.265, 0.7843, 0.2701, 0.7993]}, {"w": ",", "b": [0.2732, 0.7843, 0.2783, 0.7993]}, {"w": "xn}.", "b": [0.2814, 0.7841, 0.3162, 0.8006]}, {"w": "Alternatively,", "b": [0.324, 0.7841, 0.431, 0.799]}, {"w": "a", "b": [0.4362, 0.7841, 0.4452, 0.799]}, {"w": "set", "b": [0.4502, 0.7841, 0.4724, 0.799]}, {"w": "can", "b": [0.4773, 0.7841, 0.5044, 0.799]}, {"w": "be", "b": [0.5094, 0.7841, 0.528, 0.799]}, {"w": "infinite", "b": [0.5329, 0.7841, 0.5882, 0.799]}, {"w": "and", "b": [0.5931, 0.7841, 0.6223, 0.799]}, {"w": "include", "b": [0.6272, 0.7841, 0.6835, 0.799]}, {"w": "all", "b": [0.6884, 0.7841, 0.7075, 0.799]}, {"w": "values", "b": [0.7124, 0.7841, 0.7602, 0.799]}, {"w": "in", "b": [0.7652, 0.7841, 0.7803, 0.799]}, {"w": "some", "b": [0.7852, 0.7841, 0.8245, 0.799]}, {"w": "inter-", "b": [0.8294, 0.7841, 0.8721, 0.799]}, {"w": "val.", "b": [0.1308, 0.802, 0.1584, 0.817]}, {"w": "If", "b": [0.1663, 0.802, 0.1784, 0.817]}, {"w": "a", "b": [0.1837, 0.802, 0.1927, 0.817]}, {"w": "set", "b": [0.1981, 0.802, 0.2203, 0.817]}, {"w": "includes", "b": [0.2256, 0.802, 0.2891, 0.817]}, {"w": "all", "b": [0.2944, 0.802, 0.3135, 0.817]}, {"w": "values", "b": [0.3189, 0.802, 0.3667, 0.817]}, {"w": "between", "b": [0.372, 0.802, 0.4358, 0.817]}, {"w": "a", "b": [0.441, 0.8023, 0.4508, 0.8172]}, {"w": "and", "b": [0.4561, 0.802, 0.4853, 0.817]}, {"w": "b,", "b": [0.4906, 0.802, 0.5035, 0.8172]}, {"w": "including", "b": [0.509, 0.802, 0.5814, 0.817]}, {"w": "a", "b": [0.5867, 0.8023, 0.5965, 0.8172]}, {"w": "and", "b": [0.6018, 0.802, 0.6309, 0.817]}, {"w": "b,", "b": [0.6363, 0.802, 0.6492, 0.8172]}, {"w": "it", "b": [0.6547, 0.802, 0.6668, 0.817]}, {"w": "is", "b": [0.6721, 0.802, 0.6843, 0.817]}, {"w": "denoted", "b": [0.6896, 0.802, 0.7519, 0.817]}, {"w": "using", "b": [0.7573, 0.802, 0.7986, 0.817]}, {"w": "brackets", "b": [0.8039, 0.802, 0.8689, 0.817]}, {"w": "as", "b": [0.1312, 0.82, 0.1474, 0.8349]}, {"w": "[a,", "b": [0.1534, 0.82, 0.1734, 0.8352]}, {"w": "b].", "b": [0.1765, 0.82, 0.1944, 0.8352]}, {"w": "If", "b": [0.2026, 0.82, 0.2147, 0.8349]}, {"w": "the", "b": [0.2207, 0.82, 0.2458, 0.8349]}, {"w": "set", "b": [0.2518, 0.82, 0.274, 0.8349]}, {"w": "doesn’t", "b": [0.28, 0.82, 0.3369, 0.8349]}, {"w": "include", "b": [0.3429, 0.82, 0.3992, 0.8349]}, {"w": "the", "b": [0.4052, 0.82, 0.4304, 0.8349]}, {"w": "values", "b": [0.4364, 0.82, 0.4842, 0.8349]}, {"w": "a", "b": [0.49, 0.8202, 0.4998, 0.8352]}, {"w": "and", "b": [0.5058, 0.82, 0.5349, 0.8349]}, {"w": "b,", "b": [0.5409, 0.82, 0.5539, 0.8352]}, {"w": "such", "b": [0.5599, 0.82, 0.5947, 0.8349]}, {"w": "a", "b": [0.6007, 0.82, 0.6097, 0.8349]}, {"w": "set", "b": [0.6157, 0.82, 0.6379, 0.8349]}, {"w": "is", "b": [0.644, 0.82, 0.6561, 0.8349]}, {"w": "denoted", "b": [0.6621, 0.82, 0.7244, 0.8349]}, {"w": "using", "b": [0.7304, 0.82, 0.7718, 0.8349]}, {"w": "parentheses", "b": [0.7778, 0.82, 0.869, 0.8349]}, {"w": "like", "b": [0.1312, 0.8379, 0.1584, 0.8529]}, {"w": "this:", "b": [0.1631, 0.8379, 0.1974, 0.8529]}, {"w": "(a,", "b": [0.2049, 0.8379, 0.2268, 0.8531]}, {"w": "b).", "b": [0.2299, 0.8379, 0.2498, 0.8531]}, {"w": "For", "b": [0.2576, 0.8379, 0.284, 0.8529]}, {"w": "example,", "b": [0.2887, 0.8379, 0.3586, 0.8529]}, {"w": "the", "b": [0.3636, 0.8379, 0.3888, 0.8529]}, {"w": "set", "b": [0.3935, 0.8379, 0.4158, 0.8529]}, {"w": "[0,", "b": [0.4204, 0.8379, 0.4397, 0.8531]}, {"w": "1]", "b": [0.4428, 0.8379, 0.4569, 0.8529]}, {"w": "includes", "b": [0.4616, 0.8379, 0.5251, 0.8529]}, {"w": "such", "b": [0.5298, 0.8379, 0.5646, 0.8529]}, {"w": "values", "b": [0.5694, 0.8379, 0.6172, 0.8529]}, {"w": "as", "b": [0.622, 0.8379, 0.6382, 0.8529]}, {"w": "0,", "b": [0.6428, 0.8379, 0.6569, 0.8529]}, {"w": "0.0001,", "b": [0.6619, 0.8379, 0.7173, 0.8531]}, {"w": "0.25,", "b": [0.7223, 0.8379, 0.7596, 0.8531]}, {"w": "0.784,", "b": [0.7646, 0.8379, 0.8109, 0.8531]}, {"w": "0.9995,", "b": [0.816, 0.8379, 0.8713, 0.8531]}, {"w": "and", "b": [0.1312, 0.8558, 0.161, 0.8708]}, {"w": "1.0.", "b": [0.1671, 0.8558, 0.1958, 0.8711]}, {"w": "A", "b": [0.204, 0.8558, 0.2178, 0.8708]}, {"w": "special", "b": [0.224, 0.8558, 0.2779, 0.8708]}, {"w": "set", "b": [0.2841, 0.8558, 0.3068, 0.8708]}, {"w": "denoted", "b": [0.3129, 0.8558, 0.3765, 0.8708]}, {"w": "R", "b": [0.3826, 0.8529, 0.3959, 0.8678]}, {"w": "includes", "b": [0.402, 0.8558, 0.4668, 0.8708]}, {"w": "all", "b": [0.4729, 0.8558, 0.4924, 0.8708]}, {"w": "numbers", "b": [0.4985, 0.8558, 0.5669, 0.8708]}, {"w": "from", "b": [0.5731, 0.8558, 0.6105, 0.8708]}, {"w": "minus", "b": [0.6167, 0.8558, 0.6645, 0.8708]}, {"w": "infinity", "b": [0.6706, 0.8558, 0.728, 0.8708]}, {"w": "to", "b": [0.7342, 0.8558, 0.7506, 0.8708]}, {"w": "plus", "b": [0.7567, 0.8558, 0.7897, 0.8708]}, {"w": "infinity.", "b": [0.7958, 0.8558, 0.8568, 0.8708]}]}, {"id": "b_16", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "4", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 13, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "When an element x belongs to a set S, we write x ∈S. We can obtain a new set S3 as", "words": [{"w": "When", "b": [0.1303, 0.0881, 0.1789, 0.1031]}, {"w": "an", "b": [0.1862, 0.0881, 0.2061, 0.1031]}, {"w": "element", "b": [0.2133, 0.0881, 0.2766, 0.1031]}, {"w": "x", "b": [0.2838, 0.0884, 0.2943, 0.1033]}, {"w": "belongs", "b": [0.3016, 0.0881, 0.3629, 0.1031]}, {"w": "to", "b": [0.3701, 0.0881, 0.3868, 0.1031]}, {"w": "a", "b": [0.3941, 0.0881, 0.4035, 0.1031]}, {"w": "set", "b": [0.4107, 0.0881, 0.4339, 0.1031]}, {"w": "S,", "b": [0.441, 0.0881, 0.4588, 0.1031]}, {"w": "we", "b": [0.4664, 0.0881, 0.4878, 0.1031]}, {"w": "write", "b": [0.495, 0.0881, 0.5369, 0.1031]}, {"w": "x", "b": [0.5442, 0.0884, 0.5547, 0.1033]}, {"w": "∈S.", "b": [0.5616, 0.0881, 0.5987, 0.1031]}, {"w": "We", "b": [0.6102, 0.0881, 0.6364, 0.1031]}, {"w": "can", "b": [0.6436, 0.0881, 0.6719, 0.1031]}, {"w": "obtain", "b": [0.6791, 0.0881, 0.7314, 0.1031]}, {"w": "a", "b": [0.7386, 0.0881, 0.748, 0.1031]}, {"w": "new", "b": [0.7553, 0.0881, 0.7877, 0.1031]}, {"w": "set", "b": [0.795, 0.0881, 0.8181, 0.1031]}, {"w": "S3", "b": [0.8252, 0.0882, 0.8438, 0.1046]}, {"w": "as", "b": [0.8519, 0.0881, 0.8688, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "an intersection of two sets S1 and S2. In this case, we write S3 ←S1 ∩S2. For example {1, 3, 5, 8} ∩{1, 8, 4} gives the new set {1, 8}.", "words": [{"w": "an", "b": [0.1312, 0.106, 0.1511, 0.121]}, {"w": "intersection", "b": [0.1576, 0.1064, 0.2655, 0.1213]}, {"w": "of", "b": [0.272, 0.106, 0.2872, 0.121]}, {"w": "two", "b": [0.2936, 0.106, 0.3229, 0.121]}, {"w": "sets", "b": [0.3293, 0.106, 0.3598, 0.121]}, {"w": "S1", "b": [0.3662, 0.1061, 0.3847, 0.1226]}, {"w": "and", "b": [0.3921, 0.106, 0.4224, 0.121]}, {"w": "S2.", "b": [0.4288, 0.106, 0.4535, 0.1226]}, {"w": "In", "b": [0.4625, 0.106, 0.4797, 0.121]}, {"w": "this", "b": [0.4862, 0.106, 0.5166, 0.121]}, {"w": "case,", "b": [0.523, 0.106, 0.5618, 0.121]}, {"w": "we", "b": [0.5683, 0.106, 0.5898, 0.121]}, {"w": "write", "b": [0.5962, 0.106, 0.6381, 0.121]}, {"w": "S3", "b": [0.6444, 0.1061, 0.6629, 0.1226]}, {"w": "←S1", "b": [0.6694, 0.1061, 0.7119, 0.1226]}, {"w": "∩S2.", "b": [0.7171, 0.106, 0.7584, 0.1226]}, {"w": "For", "b": [0.7674, 0.106, 0.7949, 0.121]}, {"w": "example", "b": [0.8013, 0.106, 0.8688, 0.121]}, {"w": "{1,", "b": [0.1312, 0.124, 0.1548, 0.1392]}, {"w": "3,", "b": [0.1579, 0.124, 0.1722, 0.1392]}, {"w": "5,", "b": [0.1753, 0.124, 0.1897, 0.1392]}, {"w": "8}", "b": [0.1927, 0.124, 0.2112, 0.139]}, {"w": "∩{1,", "b": [0.2153, 0.124, 0.2553, 0.1392]}, {"w": "8,", "b": [0.2583, 0.124, 0.2727, 0.1392]}, {"w": "4}", "b": [0.2758, 0.124, 0.2942, 0.139]}, {"w": "gives", "b": [0.3004, 0.124, 0.3394, 0.1389]}, {"w": "the", "b": [0.3456, 0.124, 0.3712, 0.1389]}, {"w": "new", "b": [0.3774, 0.124, 0.4092, 0.1389]}, {"w": "set", "b": [0.4153, 0.124, 0.438, 0.1389]}, {"w": "{1,", "b": [0.4441, 0.124, 0.4676, 0.1392]}, {"w": "8}.", "b": [0.4707, 0.124, 0.4943, 0.139]}]}, {"id": "b_2", "type": "paragraph", "text": "We can obtain a new set S3 as a union of two sets S1 and S2. In this case, we write", "words": [{"w": "We", "b": [0.1303, 0.1509, 0.1565, 0.1659]}, {"w": "can", "b": [0.1646, 0.1509, 0.1929, 0.1659]}, {"w": "obtain", "b": [0.201, 0.1509, 0.2533, 0.1659]}, {"w": "a", "b": [0.2615, 0.1509, 0.2709, 0.1659]}, {"w": "new", "b": [0.2791, 0.1509, 0.3115, 0.1659]}, {"w": "set", "b": [0.3197, 0.1509, 0.3428, 0.1659]}, {"w": "S3", "b": [0.3509, 0.151, 0.3694, 0.1674]}, {"w": "as", "b": [0.3785, 0.1509, 0.3953, 0.1659]}, {"w": "a", "b": [0.4035, 0.1509, 0.4129, 0.1659]}, {"w": "union", "b": [0.4213, 0.1512, 0.4731, 0.1662]}, {"w": "of", "b": [0.4813, 0.1509, 0.4965, 0.1659]}, {"w": "two", "b": [0.5047, 0.1509, 0.534, 0.1659]}, {"w": "sets", "b": [0.5421, 0.1509, 0.5727, 0.1659]}, {"w": "S1", "b": [0.5808, 0.151, 0.5993, 0.1674]}, {"w": "and", "b": [0.6084, 0.1509, 0.6388, 0.1659]}, {"w": "S2.", "b": [0.6469, 0.1509, 0.6716, 0.1674]}, {"w": "In", "b": [0.6858, 0.1509, 0.7031, 0.1659]}, {"w": "this", "b": [0.7113, 0.1509, 0.7417, 0.1659]}, {"w": "case,", "b": [0.7499, 0.1509, 0.7887, 0.1659]}, {"w": "we", "b": [0.7974, 0.1509, 0.8188, 0.1659]}, {"w": "write", "b": [0.827, 0.1509, 0.8688, 0.1659]}]}, {"id": "b_3", "type": "paragraph", "text": "S3 ←S1 ∪S2. For example {1, 3, 5, 8} ∪{1, 8, 4} gives the new set {1, 3, 5, 8, 4}.", "words": [{"w": "S3", "b": [0.1312, 0.1689, 0.1498, 0.1854]}, {"w": "←S1", "b": [0.1558, 0.1689, 0.1979, 0.1854]}, {"w": "∪S2.", "b": [0.2029, 0.1689, 0.2439, 0.1854]}, {"w": "For", "b": [0.2521, 0.1689, 0.2791, 0.1838]}, {"w": "example", "b": [0.2852, 0.1689, 0.3514, 0.1838]}, {"w": "{1,", "b": [0.3575, 0.1689, 0.381, 0.1841]}, {"w": "3,", "b": [0.3841, 0.1689, 0.3985, 0.1841]}, {"w": "5,", "b": [0.4015, 0.1689, 0.4159, 0.1841]}, {"w": "8}", "b": [0.419, 0.1689, 0.4374, 0.1839]}, {"w": "∪{1,", "b": [0.4415, 0.1689, 0.4815, 0.1841]}, {"w": "8,", "b": [0.4846, 0.1689, 0.4989, 0.1841]}, {"w": "4}", "b": [0.502, 0.1689, 0.5204, 0.1839]}, {"w": "gives", "b": [0.5266, 0.1689, 0.5657, 0.1838]}, {"w": "the", "b": [0.5718, 0.1689, 0.5975, 0.1838]}, {"w": "new", "b": [0.6036, 0.1689, 0.6354, 0.1838]}, {"w": "set", "b": [0.6415, 0.1689, 0.6642, 0.1838]}, {"w": "{1,", "b": [0.6703, 0.1689, 0.6939, 0.1841]}, {"w": "3,", "b": [0.6969, 0.1689, 0.7113, 0.1841]}, {"w": "5,", "b": [0.7144, 0.1689, 0.7287, 0.1841]}, {"w": "8,", "b": [0.7318, 0.1689, 0.7461, 0.1841]}, {"w": "4}.", "b": [0.7492, 0.1689, 0.7728, 0.1839]}]}, {"id": "b_4", "type": "paragraph", "text": "The notation |S| means the size of set S, that is, the number of elements it contains.", "words": [{"w": "The", "b": [0.1306, 0.1958, 0.1624, 0.2107]}, {"w": "notation", "b": [0.1685, 0.1958, 0.2362, 0.2107]}, {"w": "|S|", "b": [0.2423, 0.1959, 0.2651, 0.2108]}, {"w": "means", "b": [0.2712, 0.1958, 0.3216, 0.2107]}, {"w": "the", "b": [0.3277, 0.1958, 0.3534, 0.2107]}, {"w": "size", "b": [0.3595, 0.1958, 0.3884, 0.2107]}, {"w": "of", "b": [0.3945, 0.1958, 0.4094, 0.2107]}, {"w": "set", "b": [0.4155, 0.1958, 0.4382, 0.2107]}, {"w": "S,", "b": [0.4443, 0.1958, 0.4619, 0.2108]}, {"w": "that", "b": [0.4681, 0.1958, 0.5019, 0.2107]}, {"w": "is,", "b": [0.5081, 0.1958, 0.5256, 0.2107]}, {"w": "the", "b": [0.5318, 0.1958, 0.5574, 0.2107]}, {"w": "number", "b": [0.5636, 0.1958, 0.6246, 0.2107]}, {"w": "of", "b": [0.6308, 0.1958, 0.6456, 0.2107]}, {"w": "elements", "b": [0.6518, 0.1958, 0.7211, 0.2107]}, {"w": "it", "b": [0.7273, 0.1958, 0.7396, 0.2107]}, {"w": "contains.", "b": [0.7457, 0.1958, 0.8171, 0.2107]}]}, {"id": "b_5", "type": "paragraph", "text": "1.1.2 Capital Sigma Notation", "words": [{"w": "1.1.2", "b": [0.1312, 0.2438, 0.1749, 0.2587]}, {"w": "Capital", "b": [0.1961, 0.2438, 0.2639, 0.2587]}, {"w": "Sigma", "b": [0.2709, 0.2438, 0.3272, 0.2587]}, {"w": "Notation", "b": [0.3343, 0.2438, 0.4166, 0.2587]}]}, {"id": "b_6", "type": "paragraph", "text": "The summation over a collection X = {x1, x2, . . . , xn−1, xn} or over the attributes of a vector x = [x(1), x(2), . . . , x(m−1), x(m)] is denoted like this:", "words": [{"w": "The", "b": [0.1306, 0.2801, 0.1617, 0.295]}, {"w": "summation", "b": [0.1673, 0.2801, 0.2548, 0.295]}, {"w": "over", "b": [0.2604, 0.2801, 0.2931, 0.295]}, {"w": "a", "b": [0.2986, 0.2801, 0.3077, 0.295]}, {"w": "collection", "b": [0.3133, 0.2801, 0.3876, 0.295]}, {"w": "X", "b": [0.3931, 0.2801, 0.4063, 0.2951]}, {"w": "=", "b": [0.4141, 0.2801, 0.4282, 0.295]}, {"w": "{x1,", "b": [0.4333, 0.2801, 0.4665, 0.2966]}, {"w": "x2,", "b": [0.4695, 0.2803, 0.4935, 0.2966]}, {"w": ".", "b": [0.4966, 0.2803, 0.5017, 0.2953]}, {"w": ".", "b": [0.5048, 0.2803, 0.5099, 0.2953]}, {"w": ".", "b": [0.513, 0.2803, 0.5181, 0.2953]}, {"w": ",", "b": [0.5212, 0.2803, 0.5263, 0.2953]}, {"w": "xn−1,", "b": [0.5294, 0.2803, 0.574, 0.2966]}, {"w": "xn}", "b": [0.577, 0.2801, 0.6068, 0.2966]}, {"w": "or", "b": [0.6124, 0.2801, 0.6285, 0.295]}, {"w": "over", "b": [0.6341, 0.2801, 0.6668, 0.295]}, {"w": "the", "b": [0.6724, 0.2801, 0.6975, 0.295]}, {"w": "attributes", "b": [0.7031, 0.2801, 0.7806, 0.295]}, {"w": "of", "b": [0.7862, 0.2801, 0.8008, 0.295]}, {"w": "a", "b": [0.8064, 0.2801, 0.8154, 0.295]}, {"w": "vector", "b": [0.821, 0.2801, 0.8693, 0.295]}, {"w": "x", "b": [0.1312, 0.2983, 0.1424, 0.3133]}, {"w": "=", "b": [0.1477, 0.298, 0.162, 0.313]}, {"w": "[x(1),", "b": [0.1671, 0.2964, 0.2078, 0.3132]}, {"w": "x(2),", "b": [0.2109, 0.2964, 0.2464, 0.3132]}, {"w": ".", "b": [0.2495, 0.2983, 0.2546, 0.3132]}, {"w": ".", "b": [0.2577, 0.2983, 0.2628, 0.3132]}, {"w": ".", "b": [0.2659, 0.2983, 0.271, 0.3132]}, {"w": ",", "b": [0.2741, 0.2983, 0.2792, 0.3132]}, {"w": "x(m−1),", "b": [0.2823, 0.2962, 0.3424, 0.3132]}, {"w": "x(m)]", "b": [0.3454, 0.2964, 0.3866, 0.3132]}, {"w": "is", "b": [0.3928, 0.298, 0.4052, 0.313]}, {"w": "denoted", "b": [0.4114, 0.298, 0.4749, 0.313]}, {"w": "like", "b": [0.4811, 0.298, 0.5088, 0.313]}, {"w": "this:", "b": [0.5149, 0.298, 0.5499, 0.313]}]}, {"id": "b_7", "type": "paragraph", "text": "n X", "words": [{"w": "n", "b": [0.1472, 0.3503, 0.1563, 0.3608]}, {"w": "X", "b": [0.1384, 0.3621, 0.1651, 0.377]}]}, {"id": "b_8", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.1398, 0.3867, 0.1637, 0.3971]}]}, {"id": "b_10", "type": "equation", "text": "def = x1 + x2 + . . . + xn−1 + xn, or else:", "words": [{"w": "def", "b": [0.1899, 0.3603, 0.2092, 0.3708]}, {"w": "=", "b": [0.1924, 0.3652, 0.2068, 0.3802]}, {"w": "x1", "b": [0.2144, 0.3655, 0.2322, 0.3817]}, {"w": "+", "b": [0.2373, 0.3652, 0.2516, 0.3802]}, {"w": "x2", "b": [0.2557, 0.3655, 0.2736, 0.3817]}, {"w": "+", "b": [0.2786, 0.3652, 0.293, 0.3802]}, {"w": ".", "b": [0.2971, 0.3655, 0.3022, 0.3805]}, {"w": ".", "b": [0.3053, 0.3655, 0.3104, 0.3805]}, {"w": ".", "b": [0.3135, 0.3655, 0.3186, 0.3805]}, {"w": "+", "b": [0.3227, 0.3652, 0.3371, 0.3802]}, {"w": "xn−1", "b": [0.3412, 0.3655, 0.3797, 0.3817]}, {"w": "+", "b": [0.3847, 0.3652, 0.3991, 0.3802]}, {"w": "xn,", "b": [0.4032, 0.3655, 0.4289, 0.3817]}, {"w": "or", "b": [0.4381, 0.3652, 0.4546, 0.3802]}, {"w": "else:", "b": [0.4607, 0.3652, 0.4947, 0.3802]}]}, {"id": "b_11", "type": "paragraph", "text": "m X", "words": [{"w": "m", "b": [0.5107, 0.3503, 0.5237, 0.3608]}, {"w": "X", "b": [0.5039, 0.3621, 0.5305, 0.377]}]}, {"id": "b_12", "type": "equation", "text": "j=1", "words": [{"w": "j=1", "b": [0.5044, 0.3867, 0.53, 0.3971]}]}, {"id": "b_13", "type": "equation", "text": "x(j) def = x(1) + x(2) + . . . + x(m−1) + x(m).", "words": [{"w": "x(j)", "b": [0.5336, 0.3628, 0.5625, 0.3805]}, {"w": "def", "b": [0.5686, 0.3603, 0.5879, 0.3708]}, {"w": "=", "b": [0.571, 0.3652, 0.5854, 0.3802]}, {"w": "x(1)", "b": [0.593, 0.3628, 0.6224, 0.3805]}, {"w": "+", "b": [0.6274, 0.3652, 0.6418, 0.3802]}, {"w": "x(2)", "b": [0.6459, 0.3628, 0.6753, 0.3805]}, {"w": "+", "b": [0.6803, 0.3652, 0.6947, 0.3802]}, {"w": ".", "b": [0.6988, 0.3655, 0.7039, 0.3805]}, {"w": ".", "b": [0.707, 0.3655, 0.7121, 0.3805]}, {"w": ".", "b": [0.7152, 0.3655, 0.7203, 0.3805]}, {"w": "+", "b": [0.7244, 0.3652, 0.7388, 0.3802]}, {"w": "x(m−1)", "b": [0.7429, 0.3627, 0.7969, 0.3805]}, {"w": "+", "b": [0.8019, 0.3652, 0.8163, 0.3802]}, {"w": "x(m).", "b": [0.8204, 0.3628, 0.8616, 0.3805]}]}, {"id": "b_14", "type": "paragraph", "text": "The notation", "words": [{"w": "The", "b": [0.1306, 0.4284, 0.1624, 0.4433]}, {"w": "notation", "b": [0.1685, 0.4284, 0.2362, 0.4433]}]}, {"id": "b_15", "type": "equation", "text": "def = means “is defined as”.", "words": [{"w": "def", "b": [0.2423, 0.4235, 0.2616, 0.434]}, {"w": "=", "b": [0.2448, 0.4284, 0.2591, 0.4433]}, {"w": "means", "b": [0.2677, 0.4284, 0.3181, 0.4433]}, {"w": "“is", "b": [0.3242, 0.4284, 0.3453, 0.4433]}, {"w": "defined", "b": [0.3515, 0.4284, 0.4089, 0.4433]}, {"w": "as”.", "b": [0.4151, 0.4284, 0.4429, 0.4433]}]}, {"id": "b_16", "type": "paragraph", "text": "The Euclidean norm of a vector x, denoted by ∥x∥, characterizes the “size” or the “length”", "words": [{"w": "The", "b": [0.1306, 0.4553, 0.1617, 0.4703]}, {"w": "Euclidean", "b": [0.1675, 0.4556, 0.2581, 0.4706]}, {"w": "norm", "b": [0.2647, 0.4556, 0.3135, 0.4706]}, {"w": "of", "b": [0.3194, 0.4553, 0.3339, 0.4703]}, {"w": "a", "b": [0.3397, 0.4553, 0.3488, 0.4703]}, {"w": "vector", "b": [0.3545, 0.4553, 0.4028, 0.4703]}, {"w": "x,", "b": [0.4086, 0.4553, 0.4249, 0.4706]}, {"w": "denoted", "b": [0.4308, 0.4553, 0.4931, 0.4703]}, {"w": "by", "b": [0.4988, 0.4553, 0.5179, 0.4703]}, {"w": "∥x∥,", "b": [0.5237, 0.4553, 0.5584, 0.4706]}, {"w": "characterizes", "b": [0.5643, 0.4553, 0.6655, 0.4703]}, {"w": "the", "b": [0.6713, 0.4553, 0.6964, 0.4703]}, {"w": "“size”", "b": [0.7022, 0.4553, 0.7475, 0.4703]}, {"w": "or", "b": [0.7533, 0.4553, 0.7694, 0.4703]}, {"w": "the", "b": [0.7752, 0.4553, 0.8003, 0.4703]}, {"w": "“length”", "b": [0.8061, 0.4553, 0.8724, 0.4703]}]}, {"id": "b_17", "type": "paragraph", "text": "of the vector. It’s given by", "words": [{"w": "of", "b": [0.1312, 0.4799, 0.1461, 0.4948]}, {"w": "the", "b": [0.1522, 0.4799, 0.1779, 0.4948]}, {"w": "vector.", "b": [0.1841, 0.4799, 0.2385, 0.4948]}, {"w": "It’s", "b": [0.2467, 0.4799, 0.2729, 0.4948]}, {"w": "given", "b": [0.279, 0.4799, 0.3211, 0.4948]}, {"w": "by", "b": [0.3273, 0.4799, 0.3467, 0.4948]}]}, {"id": "b_18", "type": "paragraph", "text": "qPD", "words": [{"w": "qPD", "b": [0.3528, 0.4728, 0.4028, 0.4947]}]}, {"id": "b_19", "type": "equation", "text": "j=1", "words": [{"w": "j=1", "b": [0.3907, 0.4882, 0.4162, 0.4986]}]}, {"id": "b_21", "type": "paragraph", "text": "x(j) 2.", "words": [{"w": "x(j)", "b": [0.4287, 0.4793, 0.4576, 0.4951]}, {"w": "2.", "b": [0.467, 0.4747, 0.4804, 0.4948]}]}, {"id": "b_22", "type": "paragraph", "text": "The distance between two vectors a and b is given by the Euclidean distance:", "words": [{"w": "The", "b": [0.1306, 0.509, 0.1624, 0.5239]}, {"w": "distance", "b": [0.1685, 0.509, 0.2343, 0.5239]}, {"w": "between", "b": [0.2404, 0.509, 0.3055, 0.5239]}, {"w": "two", "b": [0.3117, 0.509, 0.3404, 0.5239]}, {"w": "vectors", "b": [0.3465, 0.509, 0.4031, 0.5239]}, {"w": "a", "b": [0.4091, 0.5093, 0.4194, 0.5242]}, {"w": "and", "b": [0.426, 0.509, 0.4557, 0.5239]}, {"w": "b", "b": [0.4618, 0.5093, 0.4736, 0.5242]}, {"w": "is", "b": [0.4798, 0.509, 0.4922, 0.5239]}, {"w": "given", "b": [0.4983, 0.509, 0.5404, 0.5239]}, {"w": "by", "b": [0.5465, 0.509, 0.566, 0.5239]}, {"w": "the", "b": [0.5722, 0.509, 0.5978, 0.5239]}, {"w": "Euclidean", "b": [0.6039, 0.5093, 0.6945, 0.5242]}, {"w": "distance:", "b": [0.7016, 0.509, 0.7822, 0.5242]}]}, {"id": "b_23", "type": "paragraph", "text": "∥a −b∥", "words": [{"w": "∥a", "b": [0.3784, 0.5705, 0.3973, 0.5856]}, {"w": "−b∥", "b": [0.4014, 0.5705, 0.437, 0.5856]}]}, {"id": "b_24", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.4422, 0.5655, 0.4614, 0.576]}, {"w": "=", "b": [0.4446, 0.5704, 0.459, 0.5854]}]}, {"id": "b_25", "type": "paragraph", "text": "v u u t", "words": [{"w": "v", "b": [0.4666, 0.5496, 0.486, 0.5646]}, {"w": "u", "b": [0.4666, 0.558, 0.486, 0.573]}, {"w": "u", "b": [0.4666, 0.567, 0.486, 0.5819]}, {"w": "t", "b": [0.4666, 0.5759, 0.486, 0.5909]}]}, {"id": "b_26", "type": "paragraph", "text": "N X", "words": [{"w": "N", "b": [0.4928, 0.5555, 0.5045, 0.566]}, {"w": "X", "b": [0.486, 0.5672, 0.5127, 0.5822]}]}, {"id": "b_27", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.4874, 0.5918, 0.5113, 0.6023]}]}, {"id": "b_29", "type": "paragraph", "text": "a(i) −b(i) 2.", "words": [{"w": "a(i)", "b": [0.5242, 0.5699, 0.5507, 0.5856]}, {"w": "−b(i)", "b": [0.5557, 0.5699, 0.5989, 0.5856]}, {"w": "2.", "b": [0.6082, 0.5652, 0.6216, 0.5856]}]}, {"id": "b_30", "type": "paragraph", "text": "1.2 What is Machine Learning", "words": [{"w": "1.2", "b": [0.1312, 0.6333, 0.1631, 0.6513]}, {"w": "What", "b": [0.188, 0.6333, 0.2494, 0.6513]}, {"w": "is", "b": [0.2577, 0.6333, 0.2744, 0.6513]}, {"w": "Machine", "b": [0.2827, 0.6333, 0.3748, 0.6513]}, {"w": "Learning", "b": [0.3831, 0.6333, 0.4788, 0.6513]}]}, {"id": "b_31", "type": "paragraph", "text": "Machine learning is a subfield of computer science that is concerned with building al- gorithms that, to be useful, rely on a collection of examples of some phenomenon. These examples can come from nature, be handcrafted by humans, or generated by another algo- rithm.", "words": [{"w": "Machine", "b": [0.1312, 0.6722, 0.2097, 0.6872]}, {"w": "learning", "b": [0.2185, 0.6722, 0.2933, 0.6872]}, {"w": "is", "b": [0.301, 0.6719, 0.3137, 0.6869]}, {"w": "a", "b": [0.3213, 0.6719, 0.3307, 0.6869]}, {"w": "subfield", "b": [0.3383, 0.6719, 0.4012, 0.6869]}, {"w": "of", "b": [0.4088, 0.6719, 0.424, 0.6869]}, {"w": "computer", "b": [0.4316, 0.6719, 0.509, 0.6869]}, {"w": "science", "b": [0.5166, 0.6719, 0.5732, 0.6869]}, {"w": "that", "b": [0.5808, 0.6719, 0.6154, 0.6869]}, {"w": "is", "b": [0.623, 0.6719, 0.6356, 0.6869]}, {"w": "concerned", "b": [0.6432, 0.6719, 0.7249, 0.6869]}, {"w": "with", "b": [0.7325, 0.6719, 0.7691, 0.6869]}, {"w": "building", "b": [0.7767, 0.6719, 0.8436, 0.6869]}, {"w": "al-", "b": [0.8512, 0.6719, 0.8721, 0.6869]}, {"w": "gorithms", "b": [0.1312, 0.6899, 0.2036, 0.7048]}, {"w": "that,", "b": [0.2102, 0.6899, 0.2499, 0.7048]}, {"w": "to", "b": [0.2567, 0.6899, 0.2734, 0.7048]}, {"w": "be", "b": [0.28, 0.6899, 0.2994, 0.7048]}, {"w": "useful,", "b": [0.306, 0.6899, 0.359, 0.7048]}, {"w": "rely", "b": [0.3657, 0.6899, 0.3966, 0.7048]}, {"w": "on", "b": [0.4033, 0.6899, 0.4231, 0.7048]}, {"w": "a", "b": [0.4297, 0.6899, 0.4392, 0.7048]}, {"w": "collection", "b": [0.4458, 0.6899, 0.5232, 0.7048]}, {"w": "of", "b": [0.5298, 0.6899, 0.545, 0.7048]}, {"w": "examples", "b": [0.5516, 0.6899, 0.6265, 0.7048]}, {"w": "of", "b": [0.6331, 0.6899, 0.6483, 0.7048]}, {"w": "some", "b": [0.6549, 0.6899, 0.6958, 0.7048]}, {"w": "phenomenon.", "b": [0.7025, 0.6899, 0.8112, 0.7048]}, {"w": "These", "b": [0.8209, 0.6899, 0.8691, 0.7048]}, {"w": "examples", "b": [0.1312, 0.7078, 0.2055, 0.7228]}, {"w": "can", "b": [0.2117, 0.7078, 0.2397, 0.7228]}, {"w": "come", "b": [0.2459, 0.7078, 0.2874, 0.7228]}, {"w": "from", "b": [0.2935, 0.7078, 0.3314, 0.7228]}, {"w": "nature,", "b": [0.3376, 0.7078, 0.3957, 0.7228]}, {"w": "be", "b": [0.4019, 0.7078, 0.4211, 0.7228]}, {"w": "handcrafted", "b": [0.4272, 0.7078, 0.5243, 0.7228]}, {"w": "by", "b": [0.5305, 0.7078, 0.5502, 0.7228]}, {"w": "humans,", "b": [0.5563, 0.7078, 0.6244, 0.7228]}, {"w": "or", "b": [0.6306, 0.7078, 0.6472, 0.7228]}, {"w": "generated", "b": [0.6534, 0.7078, 0.7323, 0.7228]}, {"w": "by", "b": [0.7384, 0.7078, 0.7582, 0.7228]}, {"w": "another", "b": [0.7643, 0.7078, 0.8266, 0.7228]}, {"w": "algo-", "b": [0.8328, 0.7078, 0.8722, 0.7228]}, {"w": "rithm.", "b": [0.1312, 0.7258, 0.1815, 0.7407]}]}, {"id": "b_32", "type": "paragraph", "text": "Machine learning can also be defined as the process of solving a practical problem by,", "words": [{"w": "Machine", "b": [0.1312, 0.7527, 0.1989, 0.7677]}, {"w": "learning", "b": [0.2051, 0.7527, 0.2697, 0.7677]}, {"w": "can", "b": [0.2759, 0.7527, 0.3036, 0.7677]}, {"w": "also", "b": [0.3097, 0.7527, 0.3406, 0.7677]}, {"w": "be", "b": [0.3467, 0.7527, 0.3657, 0.7677]}, {"w": "defined", "b": [0.3719, 0.7527, 0.4293, 0.7677]}, {"w": "as", "b": [0.4355, 0.7527, 0.452, 0.7677]}, {"w": "the", "b": [0.4581, 0.7527, 0.4838, 0.7677]}, {"w": "process", "b": [0.4899, 0.7527, 0.5481, 0.7677]}, {"w": "of", "b": [0.5543, 0.7527, 0.5691, 0.7677]}, {"w": "solving", "b": [0.5753, 0.7527, 0.6313, 0.7677]}, {"w": "a", "b": [0.6374, 0.7527, 0.6467, 0.7677]}, {"w": "practical", "b": [0.6528, 0.7527, 0.7226, 0.7677]}, {"w": "problem", "b": [0.7287, 0.7527, 0.7944, 0.7677]}, {"w": "by,", "b": [0.8006, 0.7527, 0.8237, 0.7677]}]}, {"id": "b_33", "type": "paragraph", "text": "1) collecting a dataset, and 2) algorithmically training a statistical model based on that dataset.", "words": [{"w": "1)", "b": [0.1517, 0.7796, 0.1681, 0.7946]}, {"w": "collecting", "b": [0.1774, 0.7796, 0.2533, 0.7946]}, {"w": "a", "b": [0.2594, 0.7796, 0.2686, 0.7946]}, {"w": "dataset,", "b": [0.2748, 0.7796, 0.3385, 0.7946]}, {"w": "and", "b": [0.3446, 0.7796, 0.3744, 0.7946]}, {"w": "2)", "b": [0.1517, 0.7976, 0.1681, 0.8125]}, {"w": "algorithmically", "b": [0.1774, 0.7976, 0.2979, 0.8125]}, {"w": "training", "b": [0.304, 0.7976, 0.3677, 0.8125]}, {"w": "a", "b": [0.3738, 0.7976, 0.383, 0.8125]}, {"w": "statistical", "b": [0.3893, 0.7979, 0.4786, 0.8128]}, {"w": "model", "b": [0.4856, 0.7979, 0.5419, 0.8128]}, {"w": "based", "b": [0.5481, 0.7976, 0.5933, 0.8125]}, {"w": "on", "b": [0.5994, 0.7976, 0.6189, 0.8125]}, {"w": "that", "b": [0.6251, 0.7976, 0.6589, 0.8125]}, {"w": "dataset.", "b": [0.6651, 0.7976, 0.7288, 0.8125]}]}, {"id": "b_34", "type": "paragraph", "text": "That statistical model is assumed to be used somehow to solve the practical problem. To save keystrokes, I use the terms “learning” and “machine learning” interchangeably. For the same reason, I often say “model” referring to a statistical model.", "words": [{"w": "That", "b": [0.1306, 0.8245, 0.1713, 0.8394]}, {"w": "statistical", "b": [0.1777, 0.8245, 0.2575, 0.8394]}, {"w": "model", "b": [0.2639, 0.8245, 0.3135, 0.8394]}, {"w": "is", "b": [0.3199, 0.8245, 0.3326, 0.8394]}, {"w": "assumed", "b": [0.339, 0.8245, 0.4082, 0.8394]}, {"w": "to", "b": [0.4146, 0.8245, 0.4314, 0.8394]}, {"w": "be", "b": [0.4378, 0.8245, 0.4571, 0.8394]}, {"w": "used", "b": [0.4635, 0.8245, 0.5003, 0.8394]}, {"w": "somehow", "b": [0.5067, 0.8245, 0.5805, 0.8394]}, {"w": "to", "b": [0.5869, 0.8245, 0.6036, 0.8394]}, {"w": "solve", "b": [0.61, 0.8245, 0.6499, 0.8394]}, {"w": "the", "b": [0.6563, 0.8245, 0.6825, 0.8394]}, {"w": "practical", "b": [0.6888, 0.8245, 0.76, 0.8394]}, {"w": "problem.", "b": [0.7664, 0.8245, 0.8387, 0.8394]}, {"w": "To", "b": [0.8476, 0.8245, 0.8691, 0.8394]}, {"w": "save", "b": [0.1312, 0.8424, 0.1644, 0.8574]}, {"w": "keystrokes,", "b": [0.1705, 0.8424, 0.2578, 0.8574]}, {"w": "I", "b": [0.2639, 0.8424, 0.2705, 0.8574]}, {"w": "use", "b": [0.2766, 0.8424, 0.3022, 0.8574]}, {"w": "the", "b": [0.3083, 0.8424, 0.3338, 0.8574]}, {"w": "terms", "b": [0.3399, 0.8424, 0.3848, 0.8574]}, {"w": "“learning”", "b": [0.3909, 0.8424, 0.4723, 0.8574]}, {"w": "and", "b": [0.4785, 0.8424, 0.508, 0.8574]}, {"w": "“machine", "b": [0.5141, 0.8424, 0.5884, 0.8574]}, {"w": "learning”", "b": [0.5945, 0.8424, 0.6673, 0.8574]}, {"w": "interchangeably.", "b": [0.6734, 0.8424, 0.8026, 0.8574]}, {"w": "For", "b": [0.8108, 0.8424, 0.8376, 0.8574]}, {"w": "the", "b": [0.8437, 0.8424, 0.8691, 0.8574]}, {"w": "same", "b": [0.1312, 0.8604, 0.1713, 0.8753]}, {"w": "reason,", "b": [0.1775, 0.8604, 0.234, 0.8753]}, {"w": "I", "b": [0.2402, 0.8604, 0.2468, 0.8753]}, {"w": "often", "b": [0.253, 0.8604, 0.2935, 0.8753]}, {"w": "say", "b": [0.2997, 0.8604, 0.3254, 0.8753]}, {"w": "“model”", "b": [0.3315, 0.8604, 0.3977, 0.8753]}, {"w": "referring", "b": [0.4038, 0.8604, 0.4722, 0.8753]}, {"w": "to", "b": [0.4783, 0.8604, 0.4947, 0.8753]}, {"w": "a", "b": [0.5009, 0.8604, 0.5101, 0.8753]}, {"w": "statistical", "b": [0.5163, 0.8604, 0.5944, 0.8753]}, {"w": "model.", "b": [0.6005, 0.8604, 0.6544, 0.8753]}]}, {"id": "b_35", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "5", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 14, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "Learning can be supervised, semi-supervised, unsupervised, and reinforcement.", "words": [{"w": "Learning", "b": [0.1312, 0.0881, 0.2023, 0.1031]}, {"w": "can", "b": [0.2084, 0.0881, 0.2361, 0.1031]}, {"w": "be", "b": [0.2423, 0.0881, 0.2613, 0.1031]}, {"w": "supervised,", "b": [0.2674, 0.0881, 0.3569, 0.1031]}, {"w": "semi-supervised,", "b": [0.3631, 0.0881, 0.4947, 0.1031]}, {"w": "unsupervised,", "b": [0.5009, 0.0881, 0.6109, 0.1031]}, {"w": "and", "b": [0.617, 0.0881, 0.6468, 0.1031]}, {"w": "reinforcement.", "b": [0.6529, 0.0881, 0.7679, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "1.2.1 Supervised Learning", "words": [{"w": "1.2.1", "b": [0.1312, 0.1363, 0.1749, 0.1512]}, {"w": "Supervised", "b": [0.1961, 0.1363, 0.2975, 0.1512]}, {"w": "Learning", "b": [0.3046, 0.1363, 0.3862, 0.1512]}]}, {"id": "b_2", "type": "paragraph", "text": "In supervised learning, the data analyst works with a collection of labeled examples {(x1, y1), (x2, y2), . . . , (xN, yN)}. Each element xi among N is called a feature vector. In computer science, a vector is a one-dimensional array. A one-dimensional array, in turn, is an ordered and indexed sequence of values. The length of that sequence of values, D, is called the vector’s dimensionality.", "words": [{"w": "In", "b": [0.1312, 0.1725, 0.1485, 0.1875]}, {"w": "supervised", "b": [0.1553, 0.1728, 0.2533, 0.1878]}, {"w": "learning,", "b": [0.261, 0.1725, 0.3412, 0.1878]}, {"w": "the", "b": [0.348, 0.1725, 0.3741, 0.1875]}, {"w": "data", "b": [0.3808, 0.1725, 0.4174, 0.1875]}, {"w": "analyst", "b": [0.4241, 0.1725, 0.4833, 0.1875]}, {"w": "works", "b": [0.49, 0.1725, 0.5373, 0.1875]}, {"w": "with", "b": [0.544, 0.1725, 0.5806, 0.1875]}, {"w": "a", "b": [0.5873, 0.1725, 0.5967, 0.1875]}, {"w": "collection", "b": [0.6034, 0.1725, 0.6808, 0.1875]}, {"w": "of", "b": [0.6875, 0.1725, 0.7026, 0.1875]}, {"w": "labeled", "b": [0.7107, 0.1728, 0.7764, 0.1878]}, {"w": "examples", "b": [0.7841, 0.1728, 0.8688, 0.1878]}, {"w": "{(x1,", "b": [0.1312, 0.1905, 0.1723, 0.207]}, {"w": "y1),", "b": [0.1753, 0.1905, 0.205, 0.207]}, {"w": "(x2,", "b": [0.2081, 0.1905, 0.2399, 0.207]}, {"w": "y2),", "b": [0.2429, 0.1905, 0.2726, 0.207]}, {"w": ".", "b": [0.2757, 0.1907, 0.2808, 0.2057]}, {"w": ".", "b": [0.2839, 0.1907, 0.289, 0.2057]}, {"w": ".", "b": [0.2921, 0.1907, 0.2972, 0.2057]}, {"w": ",", "b": [0.3003, 0.1907, 0.3054, 0.2057]}, {"w": "(xN,", "b": [0.3085, 0.1905, 0.346, 0.207]}, {"w": "yN)}.", "b": [0.3491, 0.1905, 0.3937, 0.207]}, {"w": "Each", "b": [0.4019, 0.1905, 0.4418, 0.2054]}, {"w": "element", "b": [0.4479, 0.1905, 0.5102, 0.2054]}, {"w": "xi", "b": [0.5163, 0.1908, 0.5327, 0.207]}, {"w": "among", "b": [0.5398, 0.1905, 0.5933, 0.2054]}, {"w": "N", "b": [0.5994, 0.1907, 0.6142, 0.2057]}, {"w": "is", "b": [0.6224, 0.1905, 0.6348, 0.2054]}, {"w": "called", "b": [0.641, 0.1905, 0.6873, 0.2054]}, {"w": "a", "b": [0.6934, 0.1905, 0.7027, 0.2054]}, {"w": "feature", "b": [0.709, 0.1908, 0.774, 0.2057]}, {"w": "vector.", "b": [0.7811, 0.1905, 0.8436, 0.2057]}, {"w": "In", "b": [0.8518, 0.1905, 0.8688, 0.2054]}, {"w": "computer", "b": [0.1312, 0.2084, 0.2057, 0.2234]}, {"w": "science,", "b": [0.2114, 0.2084, 0.2708, 0.2234]}, {"w": "a", "b": [0.2767, 0.2084, 0.2857, 0.2234]}, {"w": "vector", "b": [0.2915, 0.2084, 0.3398, 0.2234]}, {"w": "is", "b": [0.3456, 0.2084, 0.3577, 0.2234]}, {"w": "a", "b": [0.3635, 0.2084, 0.3726, 0.2234]}, {"w": "one-dimensional", "b": [0.3783, 0.2084, 0.505, 0.2234]}, {"w": "array.", "b": [0.5108, 0.2084, 0.5556, 0.2234]}, {"w": "A", "b": [0.5637, 0.2084, 0.5772, 0.2234]}, {"w": "one-dimensional", "b": [0.583, 0.2084, 0.7097, 0.2234]}, {"w": "array,", "b": [0.7155, 0.2084, 0.7603, 0.2234]}, {"w": "in", "b": [0.7661, 0.2084, 0.7812, 0.2234]}, {"w": "turn,", "b": [0.787, 0.2084, 0.8262, 0.2234]}, {"w": "is", "b": [0.8321, 0.2084, 0.8442, 0.2234]}, {"w": "an", "b": [0.85, 0.2084, 0.8691, 0.2234]}, {"w": "ordered", "b": [0.1312, 0.2264, 0.1921, 0.2413]}, {"w": "and", "b": [0.1982, 0.2264, 0.2281, 0.2413]}, {"w": "indexed", "b": [0.2343, 0.2264, 0.2966, 0.2413]}, {"w": "sequence", "b": [0.3027, 0.2264, 0.3734, 0.2413]}, {"w": "of", "b": [0.3796, 0.2264, 0.3945, 0.2413]}, {"w": "values.", "b": [0.4006, 0.2264, 0.4548, 0.2413]}, {"w": "The", "b": [0.463, 0.2264, 0.4949, 0.2413]}, {"w": "length", "b": [0.5011, 0.2264, 0.5515, 0.2413]}, {"w": "of", "b": [0.5577, 0.2264, 0.5726, 0.2413]}, {"w": "that", "b": [0.5788, 0.2264, 0.6128, 0.2413]}, {"w": "sequence", "b": [0.6189, 0.2264, 0.6896, 0.2413]}, {"w": "of", "b": [0.6957, 0.2264, 0.7107, 0.2413]}, {"w": "values,", "b": [0.7168, 0.2264, 0.771, 0.2413]}, {"w": "D,", "b": [0.7768, 0.2264, 0.7977, 0.2416]}, {"w": "is", "b": [0.8038, 0.2264, 0.8163, 0.2413]}, {"w": "called", "b": [0.8225, 0.2264, 0.8688, 0.2413]}, {"w": "the", "b": [0.1312, 0.2443, 0.1569, 0.2593]}, {"w": "vector’s", "b": [0.163, 0.2443, 0.2247, 0.2593]}, {"w": "dimensionality.", "b": [0.2308, 0.2443, 0.3704, 0.2596]}]}, {"id": "b_3", "type": "paragraph", "text": "A feature vector is a vector in which each dimension j from 1 to D contains a value that describes the example. Each such value is called a feature and is denoted as x(j). For instance, if each example x in our collection represents a person, then the first feature, x(1), could contain height in cm, the second feature, x(2), could contain weight in kg, x(3) could contain gender, and so on. For all examples in the dataset, the feature at position j in the feature vector always contains the same kind of information. It means that if x(2)", "words": [{"w": "A", "b": [0.1305, 0.2712, 0.1446, 0.2862]}, {"w": "feature", "b": [0.1513, 0.2712, 0.2084, 0.2862]}, {"w": "vector", "b": [0.2151, 0.2712, 0.2654, 0.2862]}, {"w": "is", "b": [0.2721, 0.2712, 0.2847, 0.2862]}, {"w": "a", "b": [0.2914, 0.2712, 0.3008, 0.2862]}, {"w": "vector", "b": [0.3075, 0.2712, 0.3578, 0.2862]}, {"w": "in", "b": [0.3645, 0.2712, 0.3802, 0.2862]}, {"w": "which", "b": [0.3869, 0.2712, 0.4345, 0.2862]}, {"w": "each", "b": [0.4411, 0.2712, 0.4773, 0.2862]}, {"w": "dimension", "b": [0.4839, 0.2712, 0.5667, 0.2862]}, {"w": "j", "b": [0.5731, 0.2715, 0.5807, 0.2865]}, {"w": "from", "b": [0.5885, 0.2712, 0.6267, 0.2862]}, {"w": "1", "b": [0.6334, 0.2712, 0.6428, 0.2862]}, {"w": "to", "b": [0.6495, 0.2712, 0.6662, 0.2862]}, {"w": "D", "b": [0.6729, 0.2715, 0.6882, 0.2865]}, {"w": "contains", "b": [0.6954, 0.2712, 0.763, 0.2862]}, {"w": "a", "b": [0.7697, 0.2712, 0.7791, 0.2862]}, {"w": "value", "b": [0.7857, 0.2712, 0.8281, 0.2862]}, {"w": "that", "b": [0.8348, 0.2712, 0.8693, 0.2862]}, {"w": "describes", "b": [0.1312, 0.2892, 0.2053, 0.3041]}, {"w": "the", "b": [0.2129, 0.2892, 0.239, 0.3041]}, {"w": "example.", "b": [0.2467, 0.2892, 0.3194, 0.3041]}, {"w": "Each", "b": [0.332, 0.2892, 0.3726, 0.3041]}, {"w": "such", "b": [0.3802, 0.2892, 0.4164, 0.3041]}, {"w": "value", "b": [0.4241, 0.2892, 0.4664, 0.3041]}, {"w": "is", "b": [0.4741, 0.2892, 0.4867, 0.3041]}, {"w": "called", "b": [0.4944, 0.2892, 0.5415, 0.3041]}, {"w": "a", "b": [0.5491, 0.2892, 0.5585, 0.3041]}, {"w": "feature", "b": [0.5661, 0.2895, 0.6311, 0.3044]}, {"w": "and", "b": [0.6387, 0.2892, 0.6691, 0.3041]}, {"w": "is", "b": [0.6767, 0.2892, 0.6894, 0.3041]}, {"w": "denoted", "b": [0.697, 0.2892, 0.7619, 0.3041]}, {"w": "as", "b": [0.7695, 0.2892, 0.7863, 0.3041]}, {"w": "x(j).", "b": [0.7939, 0.2875, 0.829, 0.3044]}, {"w": "For", "b": [0.8416, 0.2892, 0.8691, 0.3041]}, {"w": "instance,", "b": [0.1312, 0.3071, 0.2018, 0.3221]}, {"w": "if", "b": [0.208, 0.3071, 0.2187, 0.3221]}, {"w": "each", "b": [0.2249, 0.3071, 0.2601, 0.3221]}, {"w": "example", "b": [0.2663, 0.3071, 0.3321, 0.3221]}, {"w": "x", "b": [0.3382, 0.3074, 0.3494, 0.3224]}, {"w": "in", "b": [0.3556, 0.3071, 0.3709, 0.3221]}, {"w": "our", "b": [0.3771, 0.3071, 0.4037, 0.3221]}, {"w": "collection", "b": [0.4098, 0.3071, 0.4854, 0.3221]}, {"w": "represents", "b": [0.4916, 0.3071, 0.5721, 0.3221]}, {"w": "a", "b": [0.5783, 0.3071, 0.5874, 0.3221]}, {"w": "person,", "b": [0.5936, 0.3071, 0.6515, 0.3221]}, {"w": "then", "b": [0.6576, 0.3071, 0.6934, 0.3221]}, {"w": "the", "b": [0.6995, 0.3071, 0.7251, 0.3221]}, {"w": "first", "b": [0.7312, 0.3071, 0.763, 0.3221]}, {"w": "feature,", "b": [0.7692, 0.3071, 0.83, 0.3221]}, {"w": "x(1),", "b": [0.8359, 0.3055, 0.8713, 0.3224]}, {"w": "could", "b": [0.1312, 0.3251, 0.1748, 0.34]}, {"w": "contain", "b": [0.181, 0.3251, 0.2406, 0.34]}, {"w": "height", "b": [0.2468, 0.3251, 0.2971, 0.34]}, {"w": "in", "b": [0.3033, 0.3251, 0.3189, 0.34]}, {"w": "cm,", "b": [0.325, 0.3251, 0.354, 0.34]}, {"w": "the", "b": [0.3602, 0.3251, 0.3861, 0.34]}, {"w": "second", "b": [0.3923, 0.3251, 0.4464, 0.34]}, {"w": "feature,", "b": [0.4525, 0.3251, 0.5143, 0.34]}, {"w": "x(2),", "b": [0.5202, 0.3234, 0.5558, 0.3403]}, {"w": "could", "b": [0.5619, 0.3251, 0.6055, 0.34]}, {"w": "contain", "b": [0.6117, 0.3251, 0.6713, 0.34]}, {"w": "weight", "b": [0.6775, 0.3251, 0.7304, 0.34]}, {"w": "in", "b": [0.7366, 0.3251, 0.7521, 0.34]}, {"w": "kg,", "b": [0.7583, 0.3251, 0.7827, 0.34]}, {"w": "x(3)", "b": [0.7887, 0.3234, 0.8181, 0.3403]}, {"w": "could", "b": [0.8252, 0.3251, 0.8688, 0.34]}, {"w": "contain", "b": [0.1312, 0.343, 0.1908, 0.358]}, {"w": "gender,", "b": [0.197, 0.343, 0.2561, 0.358]}, {"w": "and", "b": [0.2623, 0.343, 0.2924, 0.358]}, {"w": "so", "b": [0.2985, 0.343, 0.3152, 0.358]}, {"w": "on.", "b": [0.3213, 0.343, 0.3462, 0.358]}, {"w": "For", "b": [0.3544, 0.343, 0.3817, 0.358]}, {"w": "all", "b": [0.3878, 0.343, 0.4075, 0.358]}, {"w": "examples", "b": [0.4136, 0.343, 0.4878, 0.358]}, {"w": "in", "b": [0.494, 0.343, 0.5095, 0.358]}, {"w": "the", "b": [0.5157, 0.343, 0.5416, 0.358]}, {"w": "dataset,", "b": [0.5477, 0.343, 0.6121, 0.358]}, {"w": "the", "b": [0.6182, 0.343, 0.6442, 0.358]}, {"w": "feature", "b": [0.6503, 0.343, 0.7069, 0.358]}, {"w": "at", "b": [0.713, 0.343, 0.7296, 0.358]}, {"w": "position", "b": [0.7357, 0.343, 0.8006, 0.358]}, {"w": "j", "b": [0.8064, 0.3433, 0.814, 0.3583]}, {"w": "in", "b": [0.8212, 0.343, 0.8367, 0.358]}, {"w": "the", "b": [0.8429, 0.343, 0.8688, 0.358]}, {"w": "feature", "b": [0.1312, 0.363, 0.1876, 0.378]}, {"w": "vector", "b": [0.1938, 0.363, 0.2435, 0.378]}, {"w": "always", "b": [0.2496, 0.363, 0.3029, 0.378]}, {"w": "contains", "b": [0.3091, 0.363, 0.3759, 0.378]}, {"w": "the", "b": [0.382, 0.363, 0.4079, 0.378]}, {"w": "same", "b": [0.414, 0.363, 0.4544, 0.378]}, {"w": "kind", "b": [0.4606, 0.363, 0.4963, 0.378]}, {"w": "of", "b": [0.5024, 0.363, 0.5174, 0.378]}, {"w": "information.", "b": [0.5235, 0.363, 0.6233, 0.378]}, {"w": "It", "b": [0.6315, 0.363, 0.6455, 0.378]}, {"w": "means", "b": [0.6516, 0.363, 0.7024, 0.378]}, {"w": "that", "b": [0.7085, 0.363, 0.7426, 0.378]}, {"w": "if", "b": [0.7488, 0.363, 0.7596, 0.378]}, {"w": "x(2)", "b": [0.7655, 0.3591, 0.7949, 0.3783]}]}, {"id": "b_4", "type": "paragraph", "text": "i contains weight in kg in some example xi, then x(2)", "words": [{"w": "i", "b": [0.7761, 0.371, 0.7813, 0.3815]}, {"w": "contains", "b": [0.802, 0.363, 0.8688, 0.378]}, {"w": "weight", "b": [0.1306, 0.3843, 0.1836, 0.3993]}, {"w": "in", "b": [0.1897, 0.3843, 0.2053, 0.3993]}, {"w": "kg", "b": [0.2115, 0.3843, 0.2307, 0.3993]}, {"w": "in", "b": [0.2368, 0.3843, 0.2524, 0.3993]}, {"w": "some", "b": [0.2586, 0.3843, 0.2992, 0.3993]}, {"w": "example", "b": [0.3053, 0.3843, 0.3723, 0.3993]}, {"w": "xi,", "b": [0.3784, 0.3843, 0.4009, 0.4008]}, {"w": "then", "b": [0.4071, 0.3843, 0.4434, 0.3993]}, {"w": "x(2)", "b": [0.4496, 0.3804, 0.479, 0.3996]}]}, {"id": "b_5", "type": "paragraph", "text": "k will also contain weight in kg in every example xk, for all k from 1 to N. The label yi can be either an element belonging to a finite set of classes {1, 2, . . . , C}, or a real number, or a more complex structure, like a vector, a matrix, a tree, or a graph. Unless otherwise stated, in this book yi is either one of a finite set of classes or a real number.2 You can think of a class as a category to which an example belongs.", "words": [{"w": "k", "b": [0.4601, 0.3926, 0.4679, 0.4031]}, {"w": "will", "b": [0.4861, 0.3843, 0.5151, 0.3993]}, {"w": "also", "b": [0.5213, 0.3843, 0.5526, 0.3993]}, {"w": "contain", "b": [0.5587, 0.3843, 0.6185, 0.3993]}, {"w": "weight", "b": [0.6246, 0.3843, 0.6776, 0.3993]}, {"w": "in", "b": [0.6837, 0.3843, 0.6993, 0.3993]}, {"w": "kg", "b": [0.7055, 0.3843, 0.7247, 0.3993]}, {"w": "in", "b": [0.7309, 0.3843, 0.7464, 0.3993]}, {"w": "every", "b": [0.7526, 0.3843, 0.7958, 0.3993]}, {"w": "example", "b": [0.8019, 0.3843, 0.8689, 0.3993]}, {"w": "xk,", "b": [0.1312, 0.4023, 0.1566, 0.4188]}, {"w": "for", "b": [0.1628, 0.4023, 0.1847, 0.4172]}, {"w": "all", "b": [0.1909, 0.4023, 0.2102, 0.4172]}, {"w": "k", "b": [0.2164, 0.4026, 0.226, 0.4175]}, {"w": "from", "b": [0.2327, 0.4023, 0.27, 0.4172]}, {"w": "1", "b": [0.2761, 0.4023, 0.2853, 0.4172]}, {"w": "to", "b": [0.2914, 0.4023, 0.3077, 0.4172]}, {"w": "N.", "b": [0.3139, 0.4023, 0.3358, 0.4175]}, {"w": "The", "b": [0.3441, 0.4023, 0.3757, 0.4172]}, {"w": "label", "b": [0.3818, 0.4026, 0.426, 0.4175]}, {"w": "yi", "b": [0.4322, 0.4026, 0.4464, 0.4188]}, {"w": "can", "b": [0.4535, 0.4023, 0.481, 0.4172]}, {"w": "be", "b": [0.4872, 0.4023, 0.5061, 0.4172]}, {"w": "either", "b": [0.5122, 0.4023, 0.5582, 0.4172]}, {"w": "an", "b": [0.5643, 0.4023, 0.5837, 0.4172]}, {"w": "element", "b": [0.5898, 0.4023, 0.6515, 0.4172]}, {"w": "belonging", "b": [0.6577, 0.4023, 0.7346, 0.4172]}, {"w": "to", "b": [0.7408, 0.4023, 0.7571, 0.4172]}, {"w": "a", "b": [0.7632, 0.4023, 0.7724, 0.4172]}, {"w": "finite", "b": [0.7786, 0.4023, 0.8194, 0.4172]}, {"w": "set", "b": [0.8255, 0.4023, 0.848, 0.4172]}, {"w": "of", "b": [0.8542, 0.4023, 0.869, 0.4172]}, {"w": "classes", "b": [0.1312, 0.4205, 0.1917, 0.4355]}, {"w": "{1,", "b": [0.1978, 0.4202, 0.2213, 0.4355]}, {"w": "2,", "b": [0.2243, 0.4202, 0.2385, 0.4355]}, {"w": ".", "b": [0.2416, 0.4205, 0.2467, 0.4355]}, {"w": ".", "b": [0.2498, 0.4205, 0.2549, 0.4355]}, {"w": ".", "b": [0.258, 0.4205, 0.2631, 0.4355]}, {"w": ",", "b": [0.2662, 0.4205, 0.2713, 0.4355]}, {"w": "C},", "b": [0.2744, 0.4202, 0.3032, 0.4355]}, {"w": "or", "b": [0.3093, 0.4202, 0.3255, 0.4352]}, {"w": "a", "b": [0.3316, 0.4202, 0.3407, 0.4352]}, {"w": "real", "b": [0.3468, 0.4202, 0.3761, 0.4352]}, {"w": "number,", "b": [0.3822, 0.4202, 0.4472, 0.4352]}, {"w": "or", "b": [0.4533, 0.4202, 0.4695, 0.4352]}, {"w": "a", "b": [0.4757, 0.4202, 0.4847, 0.4352]}, {"w": "more", "b": [0.4909, 0.4202, 0.5302, 0.4352]}, {"w": "complex", "b": [0.5363, 0.4202, 0.6013, 0.4352]}, {"w": "structure,", "b": [0.6074, 0.4202, 0.6842, 0.4352]}, {"w": "like", "b": [0.6903, 0.4202, 0.7175, 0.4352]}, {"w": "a", "b": [0.7237, 0.4202, 0.7327, 0.4352]}, {"w": "vector,", "b": [0.7389, 0.4202, 0.7923, 0.4352]}, {"w": "a", "b": [0.7984, 0.4202, 0.8075, 0.4352]}, {"w": "matrix,", "b": [0.8136, 0.4202, 0.8716, 0.4352]}, {"w": "a", "b": [0.1312, 0.4382, 0.1406, 0.4531]}, {"w": "tree,", "b": [0.1474, 0.4382, 0.1841, 0.4531]}, {"w": "or", "b": [0.1911, 0.4382, 0.2079, 0.4531]}, {"w": "a", "b": [0.2147, 0.4382, 0.2241, 0.4531]}, {"w": "graph.", "b": [0.2309, 0.4382, 0.2832, 0.4531]}, {"w": "Unless", "b": [0.2933, 0.4382, 0.3464, 0.4531]}, {"w": "otherwise", "b": [0.3532, 0.4382, 0.4307, 0.4531]}, {"w": "stated,", "b": [0.4375, 0.4382, 0.4931, 0.4531]}, {"w": "in", "b": [0.5001, 0.4382, 0.5157, 0.4531]}, {"w": "this", "b": [0.5225, 0.4382, 0.553, 0.4531]}, {"w": "book", "b": [0.5598, 0.4382, 0.6, 0.4531]}, {"w": "yi", "b": [0.6066, 0.4384, 0.6209, 0.4547]}, {"w": "is", "b": [0.6286, 0.4382, 0.6412, 0.4531]}, {"w": "either", "b": [0.648, 0.4382, 0.6952, 0.4531]}, {"w": "one", "b": [0.702, 0.4382, 0.7302, 0.4531]}, {"w": "of", "b": [0.737, 0.4382, 0.7522, 0.4531]}, {"w": "a", "b": [0.759, 0.4382, 0.7684, 0.4531]}, {"w": "finite", "b": [0.7752, 0.4382, 0.817, 0.4531]}, {"w": "set", "b": [0.8238, 0.4382, 0.8469, 0.4531]}, {"w": "of", "b": [0.8537, 0.4382, 0.8689, 0.4531]}, {"w": "classes", "b": [0.1312, 0.4561, 0.1828, 0.4711]}, {"w": "or", "b": [0.1883, 0.4561, 0.2044, 0.4711]}, {"w": "a", "b": [0.2098, 0.4561, 0.2189, 0.4711]}, {"w": "real", "b": [0.2243, 0.4561, 0.2535, 0.4711]}, {"w": "number.2", "b": [0.259, 0.4545, 0.3311, 0.4711]}, {"w": "You", "b": [0.34, 0.4561, 0.3711, 0.4711]}, {"w": "can", "b": [0.3766, 0.4561, 0.4037, 0.4711]}, {"w": "think", "b": [0.4091, 0.4561, 0.4509, 0.4711]}, {"w": "of", "b": [0.4563, 0.4561, 0.4709, 0.4711]}, {"w": "a", "b": [0.4763, 0.4561, 0.4854, 0.4711]}, {"w": "class", "b": [0.4908, 0.4561, 0.5272, 0.4711]}, {"w": "as", "b": [0.5327, 0.4561, 0.5489, 0.4711]}, {"w": "a", "b": [0.5543, 0.4561, 0.5634, 0.4711]}, {"w": "category", "b": [0.5688, 0.4561, 0.6357, 0.4711]}, {"w": "to", "b": [0.6411, 0.4561, 0.6572, 0.4711]}, {"w": "which", "b": [0.6626, 0.4561, 0.7084, 0.4711]}, {"w": "an", "b": [0.7138, 0.4561, 0.7329, 0.4711]}, {"w": "example", "b": [0.7384, 0.4561, 0.8032, 0.4711]}, {"w": "belongs.", "b": [0.8086, 0.4561, 0.8726, 0.4711]}]}, {"id": "b_6", "type": "paragraph", "text": "For instance, if your examples are email messages and your problem is spam detection, then you have two classes: spam and not_spam. In supervised learning, the problem of predicting a class is called classification, while the problem of predicting a real number is called regression. The value that has to be predicted by a supervised model is called a target. An example of regression is a problem of predicting the salary of an employee given their work experience and knowledge. An example of classification is when a doctor enters the charac- teristics of a patient into a software application, and the application returns the diagnosis.", "words": [{"w": "For", "b": [0.1312, 0.483, 0.1579, 0.498]}, {"w": "instance,", "b": [0.1641, 0.483, 0.2342, 0.498]}, {"w": "if", "b": [0.2404, 0.483, 0.251, 0.498]}, {"w": "your", "b": [0.2572, 0.483, 0.2927, 0.498]}, {"w": "examples", "b": [0.2989, 0.483, 0.3716, 0.498]}, {"w": "are", "b": [0.3777, 0.483, 0.4021, 0.498]}, {"w": "email", "b": [0.4083, 0.483, 0.4509, 0.498]}, {"w": "messages", "b": [0.457, 0.483, 0.5284, 0.498]}, {"w": "and", "b": [0.5345, 0.483, 0.564, 0.498]}, {"w": "your", "b": [0.5701, 0.483, 0.6057, 0.498]}, {"w": "problem", "b": [0.6118, 0.483, 0.6768, 0.498]}, {"w": "is", "b": [0.683, 0.483, 0.6953, 0.498]}, {"w": "spam", "b": [0.7014, 0.483, 0.7431, 0.498]}, {"w": "detection,", "b": [0.7493, 0.483, 0.8274, 0.498]}, {"w": "then", "b": [0.8336, 0.483, 0.8691, 0.498]}, {"w": "you", "b": [0.1308, 0.501, 0.1589, 0.5159]}, {"w": "have", "b": [0.1647, 0.501, 0.2003, 0.5159]}, {"w": "two", "b": [0.2061, 0.501, 0.2342, 0.5159]}, {"w": "classes:", "b": [0.24, 0.501, 0.2966, 0.5159]}, {"w": "spam", "b": [0.3045, 0.501, 0.3467, 0.5159]}, {"w": "and", "b": [0.3524, 0.501, 0.3816, 0.5159]}, {"w": "not_spam.", "b": [0.3873, 0.501, 0.475, 0.5159]}, {"w": "In", "b": [0.4831, 0.501, 0.4996, 0.5159]}, {"w": "supervised", "b": [0.5054, 0.501, 0.5881, 0.5159]}, {"w": "learning,", "b": [0.5939, 0.501, 0.6623, 0.5159]}, {"w": "the", "b": [0.6681, 0.501, 0.6933, 0.5159]}, {"w": "problem", "b": [0.699, 0.501, 0.7634, 0.5159]}, {"w": "of", "b": [0.7692, 0.501, 0.7838, 0.5159]}, {"w": "predicting", "b": [0.7895, 0.501, 0.869, 0.5159]}, {"w": "a", "b": [0.1312, 0.5189, 0.1406, 0.5339]}, {"w": "class", "b": [0.1487, 0.5189, 0.1866, 0.5339]}, {"w": "is", "b": [0.1947, 0.5189, 0.2073, 0.5339]}, {"w": "called", "b": [0.2154, 0.5189, 0.2625, 0.5339]}, {"w": "classification,", "b": [0.2705, 0.5189, 0.3921, 0.5342]}, {"w": "while", "b": [0.4006, 0.5189, 0.4435, 0.5339]}, {"w": "the", "b": [0.4516, 0.5189, 0.4778, 0.5339]}, {"w": "problem", "b": [0.4858, 0.5189, 0.5528, 0.5339]}, {"w": "of", "b": [0.5609, 0.5189, 0.576, 0.5339]}, {"w": "predicting", "b": [0.5841, 0.5189, 0.6668, 0.5339]}, {"w": "a", "b": [0.6749, 0.5189, 0.6843, 0.5339]}, {"w": "real", "b": [0.6924, 0.5189, 0.7228, 0.5339]}, {"w": "number", "b": [0.7308, 0.5189, 0.7931, 0.5339]}, {"w": "is", "b": [0.8012, 0.5189, 0.8139, 0.5339]}, {"w": "called", "b": [0.8219, 0.5189, 0.869, 0.5339]}, {"w": "regression.", "b": [0.1312, 0.5369, 0.2289, 0.5521]}, {"w": "The", "b": [0.2368, 0.5369, 0.268, 0.5518]}, {"w": "value", "b": [0.2734, 0.5369, 0.314, 0.5518]}, {"w": "that", "b": [0.3194, 0.5369, 0.3526, 0.5518]}, {"w": "has", "b": [0.3579, 0.5369, 0.3842, 0.5518]}, {"w": "to", "b": [0.3896, 0.5369, 0.4056, 0.5518]}, {"w": "be", "b": [0.411, 0.5369, 0.4296, 0.5518]}, {"w": "predicted", "b": [0.435, 0.5369, 0.5084, 0.5518]}, {"w": "by", "b": [0.5138, 0.5369, 0.5329, 0.5518]}, {"w": "a", "b": [0.5382, 0.5369, 0.5473, 0.5518]}, {"w": "supervised", "b": [0.5527, 0.5369, 0.6354, 0.5518]}, {"w": "model", "b": [0.6407, 0.5369, 0.6885, 0.5518]}, {"w": "is", "b": [0.6938, 0.5369, 0.706, 0.5518]}, {"w": "called", "b": [0.7114, 0.5369, 0.7566, 0.5518]}, {"w": "a", "b": [0.762, 0.5369, 0.771, 0.5518]}, {"w": "target.", "b": [0.7763, 0.5369, 0.8372, 0.5521]}, {"w": "An", "b": [0.8452, 0.5369, 0.8688, 0.5518]}, {"w": "example", "b": [0.1312, 0.5548, 0.1976, 0.5698]}, {"w": "of", "b": [0.2038, 0.5548, 0.2187, 0.5698]}, {"w": "regression", "b": [0.2248, 0.5548, 0.3044, 0.5698]}, {"w": "is", "b": [0.3106, 0.5548, 0.323, 0.5698]}, {"w": "a", "b": [0.3292, 0.5548, 0.3384, 0.5698]}, {"w": "problem", "b": [0.3446, 0.5548, 0.4105, 0.5698]}, {"w": "of", "b": [0.4166, 0.5548, 0.4316, 0.5698]}, {"w": "predicting", "b": [0.4377, 0.5548, 0.5191, 0.5698]}, {"w": "the", "b": [0.5252, 0.5548, 0.551, 0.5698]}, {"w": "salary", "b": [0.5571, 0.5548, 0.6051, 0.5698]}, {"w": "of", "b": [0.6113, 0.5548, 0.6262, 0.5698]}, {"w": "an", "b": [0.6323, 0.5548, 0.6519, 0.5698]}, {"w": "employee", "b": [0.658, 0.5548, 0.7317, 0.5698]}, {"w": "given", "b": [0.7378, 0.5548, 0.78, 0.5698]}, {"w": "their", "b": [0.7861, 0.5548, 0.8243, 0.5698]}, {"w": "work", "b": [0.8304, 0.5548, 0.8696, 0.5698]}, {"w": "experience", "b": [0.1312, 0.5728, 0.2158, 0.5877]}, {"w": "and", "b": [0.222, 0.5728, 0.2518, 0.5877]}, {"w": "knowledge.", "b": [0.258, 0.5728, 0.3466, 0.5877]}, {"w": "An", "b": [0.3548, 0.5728, 0.379, 0.5877]}, {"w": "example", "b": [0.3851, 0.5728, 0.4516, 0.5877]}, {"w": "of", "b": [0.4577, 0.5728, 0.4727, 0.5877]}, {"w": "classification", "b": [0.4788, 0.5728, 0.5811, 0.5877]}, {"w": "is", "b": [0.5872, 0.5728, 0.5997, 0.5877]}, {"w": "when", "b": [0.6058, 0.5728, 0.6481, 0.5877]}, {"w": "a", "b": [0.6542, 0.5728, 0.6635, 0.5877]}, {"w": "doctor", "b": [0.6696, 0.5728, 0.7217, 0.5877]}, {"w": "enters", "b": [0.7278, 0.5728, 0.7759, 0.5877]}, {"w": "the", "b": [0.782, 0.5728, 0.8078, 0.5877]}, {"w": "charac-", "b": [0.814, 0.5728, 0.8722, 0.5877]}, {"w": "teristics", "b": [0.1312, 0.5907, 0.1941, 0.6057]}, {"w": "of", "b": [0.2002, 0.5907, 0.2151, 0.6057]}, {"w": "a", "b": [0.2212, 0.5907, 0.2305, 0.6057]}, {"w": "patient", "b": [0.2366, 0.5907, 0.2935, 0.6057]}, {"w": "into", "b": [0.2997, 0.5907, 0.3309, 0.6057]}, {"w": "a", "b": [0.3371, 0.5907, 0.3463, 0.6057]}, {"w": "software", "b": [0.3525, 0.5907, 0.4188, 0.6057]}, {"w": "application,", "b": [0.4249, 0.5907, 0.5193, 0.6057]}, {"w": "and", "b": [0.5254, 0.5907, 0.5552, 0.6057]}, {"w": "the", "b": [0.5613, 0.5907, 0.5869, 0.6057]}, {"w": "application", "b": [0.5931, 0.5907, 0.6823, 0.6057]}, {"w": "returns", "b": [0.6885, 0.5907, 0.7461, 0.6057]}, {"w": "the", "b": [0.7523, 0.5907, 0.7779, 0.6057]}, {"w": "diagnosis.", "b": [0.784, 0.5907, 0.8622, 0.6057]}]}, {"id": "b_7", "type": "paragraph", "text": "The difference between classification and regression is shown in Figure 2. In classification, the learning algorithm looks for a line (or, more generally, a hypersurface) that separates examples of different classes from one another. In regression, on the other hand, the learning algorithm looks to find a line or a hypersurface that closely follows the training examples.", "words": [{"w": "The", "b": [0.1306, 0.6176, 0.163, 0.6326]}, {"w": "difference", "b": [0.1692, 0.6176, 0.2471, 0.6326]}, {"w": "between", "b": [0.2533, 0.6176, 0.3198, 0.6326]}, {"w": "classification", "b": [0.3259, 0.6176, 0.4297, 0.6326]}, {"w": "and", "b": [0.4359, 0.6176, 0.4662, 0.6326]}, {"w": "regression", "b": [0.4724, 0.6176, 0.5532, 0.6326]}, {"w": "is", "b": [0.5594, 0.6176, 0.5721, 0.6326]}, {"w": "shown", "b": [0.5782, 0.6176, 0.6291, 0.6326]}, {"w": "in", "b": [0.6353, 0.6176, 0.6509, 0.6326]}, {"w": "Figure", "b": [0.6571, 0.6176, 0.7102, 0.6326]}, {"w": "2.", "b": [0.7164, 0.6176, 0.7311, 0.6326]}, {"w": "In", "b": [0.7393, 0.6176, 0.7566, 0.6326]}, {"w": "classification,", "b": [0.7627, 0.6176, 0.8717, 0.6326]}, {"w": "the", "b": [0.1312, 0.6356, 0.1574, 0.6505]}, {"w": "learning", "b": [0.1639, 0.6356, 0.2299, 0.6505]}, {"w": "algorithm", "b": [0.2364, 0.6356, 0.3159, 0.6505]}, {"w": "looks", "b": [0.3224, 0.6356, 0.3643, 0.6505]}, {"w": "for", "b": [0.3708, 0.6356, 0.3934, 0.6505]}, {"w": "a", "b": [0.3999, 0.6356, 0.4093, 0.6505]}, {"w": "line", "b": [0.4158, 0.6356, 0.4451, 0.6505]}, {"w": "(or,", "b": [0.4516, 0.6356, 0.4809, 0.6505]}, {"w": "more", "b": [0.4875, 0.6356, 0.5284, 0.6505]}, {"w": "generally,", "b": [0.5349, 0.6356, 0.6124, 0.6505]}, {"w": "a", "b": [0.619, 0.6356, 0.6284, 0.6505]}, {"w": "hypersurface)", "b": [0.6349, 0.6356, 0.746, 0.6505]}, {"w": "that", "b": [0.7525, 0.6356, 0.787, 0.6505]}, {"w": "separates", "b": [0.7935, 0.6356, 0.8691, 0.6505]}, {"w": "examples", "b": [0.1312, 0.6535, 0.2032, 0.6685]}, {"w": "of", "b": [0.2093, 0.6535, 0.2239, 0.6685]}, {"w": "different", "b": [0.23, 0.6535, 0.2954, 0.6685]}, {"w": "classes", "b": [0.3015, 0.6535, 0.3531, 0.6685]}, {"w": "from", "b": [0.3592, 0.6535, 0.3959, 0.6685]}, {"w": "one", "b": [0.402, 0.6535, 0.4291, 0.6685]}, {"w": "another.", "b": [0.4353, 0.6535, 0.5006, 0.6685]}, {"w": "In", "b": [0.5088, 0.6535, 0.5254, 0.6685]}, {"w": "regression,", "b": [0.5315, 0.6535, 0.6142, 0.6685]}, {"w": "on", "b": [0.6204, 0.6535, 0.6395, 0.6685]}, {"w": "the", "b": [0.6456, 0.6535, 0.6707, 0.6685]}, {"w": "other", "b": [0.6768, 0.6535, 0.7181, 0.6685]}, {"w": "hand,", "b": [0.7242, 0.6535, 0.7684, 0.6685]}, {"w": "the", "b": [0.7745, 0.6535, 0.7997, 0.6685]}, {"w": "learning", "b": [0.8058, 0.6535, 0.8691, 0.6685]}, {"w": "algorithm", "b": [0.1312, 0.6715, 0.2092, 0.6864]}, {"w": "looks", "b": [0.2153, 0.6715, 0.2565, 0.6864]}, {"w": "to", "b": [0.2626, 0.6715, 0.279, 0.6864]}, {"w": "find", "b": [0.2852, 0.6715, 0.3159, 0.6864]}, {"w": "a", "b": [0.3221, 0.6715, 0.3313, 0.6864]}, {"w": "line", "b": [0.3375, 0.6715, 0.3662, 0.6864]}, {"w": "or", "b": [0.3723, 0.6715, 0.3888, 0.6864]}, {"w": "a", "b": [0.3949, 0.6715, 0.4042, 0.6864]}, {"w": "hypersurface", "b": [0.4103, 0.6715, 0.5121, 0.6864]}, {"w": "that", "b": [0.5182, 0.6715, 0.5521, 0.6864]}, {"w": "closely", "b": [0.5582, 0.6715, 0.6111, 0.6864]}, {"w": "follows", "b": [0.6173, 0.6715, 0.6717, 0.6864]}, {"w": "the", "b": [0.6779, 0.6715, 0.7035, 0.6864]}, {"w": "training", "b": [0.7097, 0.6715, 0.7733, 0.6864]}, {"w": "examples.", "b": [0.7794, 0.6715, 0.858, 0.6864]}]}, {"id": "b_8", "type": "paragraph", "text": "2A real number is a quantity that can represent a distance along a line. Examples: 0, −256.34, 1000, 1000.2.", "words": [{"w": "2A", "b": [0.1518, 0.6985, 0.1714, 0.7124]}, {"w": "real", "b": [0.1773, 0.7003, 0.2031, 0.7124]}, {"w": "number", "b": [0.2089, 0.7003, 0.2618, 0.7124]}, {"w": "is", "b": [0.2676, 0.7003, 0.2784, 0.7124]}, {"w": "a", "b": [0.2842, 0.7003, 0.2922, 0.7124]}, {"w": "quantity", "b": [0.2981, 0.7003, 0.3567, 0.7124]}, {"w": "that", "b": [0.3626, 0.7003, 0.3919, 0.7124]}, {"w": "can", "b": [0.3977, 0.7003, 0.4217, 0.7124]}, {"w": "represent", "b": [0.4276, 0.7003, 0.4912, 0.7124]}, {"w": "a", "b": [0.4971, 0.7003, 0.5051, 0.7124]}, {"w": "distance", "b": [0.5109, 0.7003, 0.5678, 0.7124]}, {"w": "along", "b": [0.5737, 0.7003, 0.611, 0.7124]}, {"w": "a", "b": [0.6169, 0.7003, 0.6248, 0.7124]}, {"w": "line.", "b": [0.6307, 0.7003, 0.66, 0.7124]}, {"w": "Examples:", "b": [0.6688, 0.7003, 0.7407, 0.7124]}, {"w": "0,", "b": [0.7491, 0.7003, 0.7615, 0.7124]}, {"w": "−256.34,", "b": [0.7675, 0.7003, 0.8285, 0.7124]}, {"w": "1000,", "b": [0.8345, 0.7003, 0.8709, 0.7124]}, {"w": "1000.2.", "b": [0.1305, 0.7146, 0.1784, 0.7266]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "6", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 15, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "classification regression", "words": [{"w": "classification", "b": [0.2921, 0.0876, 0.3908, 0.1018]}, {"w": "regression", "b": [0.6395, 0.0876, 0.7208, 0.1018]}]}, {"id": "b_1", "type": "paragraph", "text": "Figure 2: Difference between classification and regression.", "words": [{"w": "Figure", "b": [0.2668, 0.397, 0.3189, 0.412]}, {"w": "2:", "b": [0.325, 0.397, 0.3394, 0.412]}, {"w": "Difference", "b": [0.3476, 0.397, 0.4279, 0.412]}, {"w": "between", "b": [0.434, 0.397, 0.4992, 0.412]}, {"w": "classification", "b": [0.5053, 0.397, 0.607, 0.412]}, {"w": "and", "b": [0.6132, 0.397, 0.6429, 0.412]}, {"w": "regression.", "b": [0.6491, 0.397, 0.7335, 0.412]}]}, {"id": "b_2", "type": "paragraph", "text": "The goal of a supervised learning algorithm is to use a dataset to produce a model that takes a feature vector x as input and outputs information that allows deducing a label for this feature vector. For instance, a model created using a dataset of patients could take as input a feature vector describing a patient and output a probability that the patient has cancer.", "words": [{"w": "The", "b": [0.1306, 0.4473, 0.1617, 0.4622]}, {"w": "goal", "b": [0.1679, 0.4473, 0.2, 0.4622]}, {"w": "of", "b": [0.2062, 0.4473, 0.2208, 0.4622]}, {"w": "a", "b": [0.2269, 0.4473, 0.236, 0.4622]}, {"w": "supervised", "b": [0.2423, 0.4476, 0.3403, 0.4625]}, {"w": "learning", "b": [0.3474, 0.4476, 0.4222, 0.4625]}, {"w": "algorithm", "b": [0.4292, 0.4476, 0.519, 0.4625]}, {"w": "is", "b": [0.5252, 0.4473, 0.5373, 0.4622]}, {"w": "to", "b": [0.5435, 0.4473, 0.5596, 0.4622]}, {"w": "use", "b": [0.5657, 0.4473, 0.591, 0.4622]}, {"w": "a", "b": [0.5971, 0.4473, 0.6062, 0.4622]}, {"w": "dataset", "b": [0.6123, 0.4473, 0.6697, 0.4622]}, {"w": "to", "b": [0.6759, 0.4473, 0.692, 0.4622]}, {"w": "produce", "b": [0.6981, 0.4473, 0.761, 0.4622]}, {"w": "a", "b": [0.7672, 0.4473, 0.7762, 0.4622]}, {"w": "model", "b": [0.7824, 0.4473, 0.8301, 0.4622]}, {"w": "that", "b": [0.8363, 0.4473, 0.8694, 0.4622]}, {"w": "takes", "b": [0.1312, 0.4652, 0.173, 0.4802]}, {"w": "a", "b": [0.1792, 0.4652, 0.1886, 0.4802]}, {"w": "feature", "b": [0.1947, 0.4652, 0.2516, 0.4802]}, {"w": "vector", "b": [0.2577, 0.4652, 0.3078, 0.4802]}, {"w": "x", "b": [0.3138, 0.4655, 0.325, 0.4805]}, {"w": "as", "b": [0.3313, 0.4652, 0.3481, 0.4802]}, {"w": "input", "b": [0.3542, 0.4652, 0.398, 0.4802]}, {"w": "and", "b": [0.4041, 0.4652, 0.4344, 0.4802]}, {"w": "outputs", "b": [0.4405, 0.4652, 0.5031, 0.4802]}, {"w": "information", "b": [0.5093, 0.4652, 0.6046, 0.4802]}, {"w": "that", "b": [0.6108, 0.4652, 0.6452, 0.4802]}, {"w": "allows", "b": [0.6513, 0.4652, 0.7009, 0.4802]}, {"w": "deducing", "b": [0.7071, 0.4652, 0.78, 0.4802]}, {"w": "a", "b": [0.7862, 0.4652, 0.7955, 0.4802]}, {"w": "label", "b": [0.8017, 0.4652, 0.8408, 0.4802]}, {"w": "for", "b": [0.8469, 0.4652, 0.8694, 0.4802]}, {"w": "this", "b": [0.1312, 0.4832, 0.1614, 0.4981]}, {"w": "feature", "b": [0.1675, 0.4832, 0.2241, 0.4981]}, {"w": "vector.", "b": [0.2302, 0.4832, 0.2852, 0.4981]}, {"w": "For", "b": [0.2934, 0.4832, 0.3207, 0.4981]}, {"w": "instance,", "b": [0.3268, 0.4832, 0.3985, 0.4981]}, {"w": "a", "b": [0.4046, 0.4832, 0.4139, 0.4981]}, {"w": "model", "b": [0.4201, 0.4832, 0.4693, 0.4981]}, {"w": "created", "b": [0.4754, 0.4832, 0.5346, 0.4981]}, {"w": "using", "b": [0.5407, 0.4832, 0.5833, 0.4981]}, {"w": "a", "b": [0.5895, 0.4832, 0.5988, 0.4981]}, {"w": "dataset", "b": [0.6049, 0.4832, 0.6641, 0.4981]}, {"w": "of", "b": [0.6702, 0.4832, 0.6853, 0.4981]}, {"w": "patients", "b": [0.6914, 0.4832, 0.7563, 0.4981]}, {"w": "could", "b": [0.7624, 0.4832, 0.806, 0.4981]}, {"w": "take", "b": [0.8121, 0.4832, 0.8463, 0.4981]}, {"w": "as", "b": [0.8524, 0.4832, 0.8691, 0.4981]}, {"w": "input", "b": [0.1312, 0.5011, 0.1752, 0.5161]}, {"w": "a", "b": [0.182, 0.5011, 0.1914, 0.5161]}, {"w": "feature", "b": [0.1982, 0.5011, 0.2553, 0.5161]}, {"w": "vector", "b": [0.2622, 0.5011, 0.3124, 0.5161]}, {"w": "describing", "b": [0.3193, 0.5011, 0.4021, 0.5161]}, {"w": "a", "b": [0.4089, 0.5011, 0.4183, 0.5161]}, {"w": "patient", "b": [0.4252, 0.5011, 0.4832, 0.5161]}, {"w": "and", "b": [0.4901, 0.5011, 0.5204, 0.5161]}, {"w": "output", "b": [0.5272, 0.5011, 0.5827, 0.5161]}, {"w": "a", "b": [0.5895, 0.5011, 0.5989, 0.5161]}, {"w": "probability", "b": [0.6057, 0.5011, 0.6958, 0.5161]}, {"w": "that", "b": [0.7026, 0.5011, 0.7371, 0.5161]}, {"w": "the", "b": [0.7439, 0.5011, 0.7701, 0.5161]}, {"w": "patient", "b": [0.7769, 0.5011, 0.835, 0.5161]}, {"w": "has", "b": [0.8418, 0.5011, 0.8691, 0.5161]}, {"w": "cancer.", "b": [0.1312, 0.5191, 0.1877, 0.534]}]}, {"id": "b_3", "type": "paragraph", "text": "Even if the model is typically a mathematical function, when thinking about what the model does with the input, it is convenient to think that the model “looks” at the values of some features in the input and, based on experience with similar examples, outputs a value. That output value is a number or a class “the most similar” to the labels seen in the past in the examples with similar values of features. It looks simplistic, but the decision tree model and the k-nearest neighbors algorithm work almost like that.", "words": [{"w": "Even", "b": [0.1312, 0.546, 0.1707, 0.5609]}, {"w": "if", "b": [0.1767, 0.546, 0.1872, 0.5609]}, {"w": "the", "b": [0.1932, 0.546, 0.2183, 0.5609]}, {"w": "model", "b": [0.2243, 0.546, 0.272, 0.5609]}, {"w": "is", "b": [0.278, 0.546, 0.2902, 0.5609]}, {"w": "typically", "b": [0.2962, 0.546, 0.364, 0.5609]}, {"w": "a", "b": [0.37, 0.546, 0.379, 0.5609]}, {"w": "mathematical", "b": [0.385, 0.546, 0.4925, 0.5609]}, {"w": "function,", "b": [0.4985, 0.546, 0.5683, 0.5609]}, {"w": "when", "b": [0.5744, 0.546, 0.6156, 0.5609]}, {"w": "thinking", "b": [0.6215, 0.546, 0.6874, 0.5609]}, {"w": "about", "b": [0.6933, 0.546, 0.7391, 0.5609]}, {"w": "what", "b": [0.7451, 0.546, 0.7842, 0.5609]}, {"w": "the", "b": [0.7902, 0.546, 0.8154, 0.5609]}, {"w": "model", "b": [0.8213, 0.546, 0.8691, 0.5609]}, {"w": "does", "b": [0.1312, 0.5639, 0.1671, 0.5789]}, {"w": "with", "b": [0.1733, 0.5639, 0.2095, 0.5789]}, {"w": "the", "b": [0.2157, 0.5639, 0.2416, 0.5789]}, {"w": "input,", "b": [0.2477, 0.5639, 0.2965, 0.5789]}, {"w": "it", "b": [0.3026, 0.5639, 0.3151, 0.5789]}, {"w": "is", "b": [0.3212, 0.5639, 0.3337, 0.5789]}, {"w": "convenient", "b": [0.3399, 0.5639, 0.426, 0.5789]}, {"w": "to", "b": [0.4321, 0.5639, 0.4487, 0.5789]}, {"w": "think", "b": [0.4548, 0.5639, 0.4979, 0.5789]}, {"w": "that", "b": [0.504, 0.5639, 0.5382, 0.5789]}, {"w": "the", "b": [0.5443, 0.5639, 0.5703, 0.5789]}, {"w": "model", "b": [0.5764, 0.5639, 0.6256, 0.5789]}, {"w": "“looks”", "b": [0.6318, 0.5639, 0.6909, 0.5789]}, {"w": "at", "b": [0.6971, 0.5639, 0.7137, 0.5789]}, {"w": "the", "b": [0.7198, 0.5639, 0.7457, 0.5789]}, {"w": "values", "b": [0.7519, 0.5639, 0.8013, 0.5789]}, {"w": "of", "b": [0.8074, 0.5639, 0.8224, 0.5789]}, {"w": "some", "b": [0.8286, 0.5639, 0.8691, 0.5789]}, {"w": "features", "b": [0.1312, 0.5819, 0.1938, 0.5968]}, {"w": "in", "b": [0.1999, 0.5819, 0.2151, 0.5968]}, {"w": "the", "b": [0.2213, 0.5819, 0.2466, 0.5968]}, {"w": "input", "b": [0.2528, 0.5819, 0.2954, 0.5968]}, {"w": "and,", "b": [0.3015, 0.5819, 0.336, 0.5968]}, {"w": "based", "b": [0.3422, 0.5819, 0.3869, 0.5968]}, {"w": "on", "b": [0.393, 0.5819, 0.4123, 0.5968]}, {"w": "experience", "b": [0.4185, 0.5819, 0.5017, 0.5968]}, {"w": "with", "b": [0.5079, 0.5819, 0.5434, 0.5968]}, {"w": "similar", "b": [0.5495, 0.5819, 0.6034, 0.5968]}, {"w": "examples,", "b": [0.6095, 0.5819, 0.6872, 0.5968]}, {"w": "outputs", "b": [0.6934, 0.5819, 0.7543, 0.5968]}, {"w": "a", "b": [0.7605, 0.5819, 0.7696, 0.5968]}, {"w": "value.", "b": [0.7758, 0.5819, 0.8219, 0.5968]}, {"w": "That", "b": [0.8301, 0.5819, 0.8696, 0.5968]}, {"w": "output", "b": [0.1312, 0.5998, 0.1861, 0.6148]}, {"w": "value", "b": [0.1922, 0.5998, 0.2341, 0.6148]}, {"w": "is", "b": [0.2403, 0.5998, 0.2528, 0.6148]}, {"w": "a", "b": [0.2589, 0.5998, 0.2682, 0.6148]}, {"w": "number", "b": [0.2744, 0.5998, 0.336, 0.6148]}, {"w": "or", "b": [0.3421, 0.5998, 0.3587, 0.6148]}, {"w": "a", "b": [0.3649, 0.5998, 0.3742, 0.6148]}, {"w": "class", "b": [0.3803, 0.5998, 0.4178, 0.6148]}, {"w": "“the", "b": [0.4239, 0.5998, 0.4586, 0.6148]}, {"w": "most", "b": [0.4647, 0.5998, 0.5041, 0.6148]}, {"w": "similar”", "b": [0.5102, 0.5998, 0.574, 0.6148]}, {"w": "to", "b": [0.5801, 0.5998, 0.5967, 0.6148]}, {"w": "the", "b": [0.6028, 0.5998, 0.6287, 0.6148]}, {"w": "labels", "b": [0.6348, 0.5998, 0.681, 0.6148]}, {"w": "seen", "b": [0.6871, 0.5998, 0.7214, 0.6148]}, {"w": "in", "b": [0.7275, 0.5998, 0.743, 0.6148]}, {"w": "the", "b": [0.7492, 0.5998, 0.7751, 0.6148]}, {"w": "past", "b": [0.7812, 0.5998, 0.8154, 0.6148]}, {"w": "in", "b": [0.8216, 0.5998, 0.8371, 0.6148]}, {"w": "the", "b": [0.8432, 0.5998, 0.8691, 0.6148]}, {"w": "examples", "b": [0.1312, 0.6178, 0.2037, 0.6327]}, {"w": "with", "b": [0.2098, 0.6178, 0.2453, 0.6327]}, {"w": "similar", "b": [0.2514, 0.6178, 0.3052, 0.6327]}, {"w": "values", "b": [0.3113, 0.6178, 0.3595, 0.6327]}, {"w": "of", "b": [0.3657, 0.6178, 0.3803, 0.6327]}, {"w": "features.", "b": [0.3865, 0.6178, 0.454, 0.6327]}, {"w": "It", "b": [0.4622, 0.6178, 0.4758, 0.6327]}, {"w": "looks", "b": [0.482, 0.6178, 0.5226, 0.6327]}, {"w": "simplistic,", "b": [0.5287, 0.6178, 0.6089, 0.6327]}, {"w": "but", "b": [0.615, 0.6178, 0.6424, 0.6327]}, {"w": "the", "b": [0.6485, 0.6178, 0.6738, 0.6327]}, {"w": "decision", "b": [0.68, 0.6178, 0.7428, 0.6327]}, {"w": "tree", "b": [0.749, 0.6178, 0.7794, 0.6327]}, {"w": "model", "b": [0.7856, 0.6178, 0.8336, 0.6327]}, {"w": "and", "b": [0.8398, 0.6178, 0.8691, 0.6327]}, {"w": "the", "b": [0.1312, 0.6357, 0.1569, 0.6507]}, {"w": "k-nearest", "b": [0.163, 0.6357, 0.2369, 0.6509]}, {"w": "neighbors", "b": [0.2431, 0.6357, 0.3202, 0.6507]}, {"w": "algorithm", "b": [0.3263, 0.6357, 0.4043, 0.6507]}, {"w": "work", "b": [0.4104, 0.6357, 0.4494, 0.6507]}, {"w": "almost", "b": [0.4556, 0.6357, 0.509, 0.6507]}, {"w": "like", "b": [0.5151, 0.6357, 0.5428, 0.6507]}, {"w": "that.", "b": [0.549, 0.6357, 0.588, 0.6507]}]}, {"id": "b_4", "type": "paragraph", "text": "1.2.2 Unsupervised Learning", "words": [{"w": "1.2.2", "b": [0.1312, 0.6839, 0.1749, 0.6988]}, {"w": "Unsupervised", "b": [0.1961, 0.6839, 0.3222, 0.6988]}, {"w": "Learning", "b": [0.3293, 0.6839, 0.4109, 0.6988]}]}, {"id": "b_5", "type": "paragraph", "text": "In unsupervised learning, the dataset is a collection of unlabeled examples {x1, x2, . . . , xN}. Again, x is a feature vector, and the goal of an unsupervised learning algorithm is to create a model that takes a feature vector x as input and either transforms it into another vector or into a value that can be used to solve a practical problem. For example, in clustering, the model returns the ID of the cluster for each feature vector in the dataset. Clustering is useful for finding groups of similar objects in a large collection of objects, such as images or text documents. By using clustering, for example, the analyst can sample a sufficiently representative yet small subset of unlabeled examples from a large", "words": [{"w": "In", "b": [0.1312, 0.7201, 0.1485, 0.7351]}, {"w": "unsupervised", "b": [0.1623, 0.7204, 0.2839, 0.7354]}, {"w": "learning,", "b": [0.2996, 0.7201, 0.3797, 0.7354]}, {"w": "the", "b": [0.3952, 0.7201, 0.4214, 0.7351]}, {"w": "dataset", "b": [0.4351, 0.7201, 0.4948, 0.7351]}, {"w": "is", "b": [0.5084, 0.7201, 0.5211, 0.7351]}, {"w": "a", "b": [0.5348, 0.7201, 0.5442, 0.7351]}, {"w": "collection", "b": [0.5578, 0.7201, 0.6353, 0.7351]}, {"w": "of", "b": [0.6489, 0.7201, 0.6641, 0.7351]}, {"w": "unlabeled", "b": [0.6791, 0.7204, 0.7684, 0.7354]}, {"w": "examples", "b": [0.7841, 0.7204, 0.8688, 0.7354]}, {"w": "{x1,", "b": [0.1312, 0.7382, 0.1651, 0.7546]}, {"w": "x2,", "b": [0.1681, 0.7384, 0.1927, 0.7546]}, {"w": ".", "b": [0.1958, 0.7384, 0.2009, 0.7533]}, {"w": ".", "b": [0.204, 0.7384, 0.2091, 0.7533]}, {"w": ".", "b": [0.2122, 0.7384, 0.2173, 0.7533]}, {"w": ",", "b": [0.2204, 0.7384, 0.2256, 0.7533]}, {"w": "xN}.", "b": [0.2286, 0.7381, 0.2682, 0.7546]}, {"w": "Again,", "b": [0.2764, 0.7381, 0.3297, 0.753]}, {"w": "x", "b": [0.3358, 0.7384, 0.347, 0.7533]}, {"w": "is", "b": [0.3533, 0.7381, 0.3658, 0.753]}, {"w": "a", "b": [0.3719, 0.7381, 0.3812, 0.753]}, {"w": "feature", "b": [0.3874, 0.7381, 0.4438, 0.753]}, {"w": "vector,", "b": [0.45, 0.7381, 0.5049, 0.753]}, {"w": "and", "b": [0.511, 0.7381, 0.541, 0.753]}, {"w": "the", "b": [0.5472, 0.7381, 0.5731, 0.753]}, {"w": "goal", "b": [0.5792, 0.7381, 0.6123, 0.753]}, {"w": "of", "b": [0.6185, 0.7381, 0.6335, 0.753]}, {"w": "an", "b": [0.6396, 0.7381, 0.6593, 0.753]}, {"w": "unsupervised", "b": [0.6654, 0.7384, 0.787, 0.7533]}, {"w": "learning", "b": [0.7941, 0.7384, 0.8688, 0.7533]}, {"w": "algorithm", "b": [0.1312, 0.7563, 0.221, 0.7713]}, {"w": "is", "b": [0.2272, 0.756, 0.2395, 0.771]}, {"w": "to", "b": [0.2456, 0.756, 0.2618, 0.771]}, {"w": "create", "b": [0.268, 0.756, 0.3155, 0.771]}, {"w": "a", "b": [0.3217, 0.756, 0.3308, 0.771]}, {"w": "model", "b": [0.3369, 0.756, 0.385, 0.771]}, {"w": "that", "b": [0.3911, 0.756, 0.4245, 0.771]}, {"w": "takes", "b": [0.4306, 0.756, 0.4712, 0.771]}, {"w": "a", "b": [0.4773, 0.756, 0.4864, 0.771]}, {"w": "feature", "b": [0.4926, 0.756, 0.5477, 0.771]}, {"w": "vector", "b": [0.5539, 0.756, 0.6025, 0.771]}, {"w": "x", "b": [0.6085, 0.7563, 0.6197, 0.7713]}, {"w": "as", "b": [0.6259, 0.756, 0.6422, 0.771]}, {"w": "input", "b": [0.6483, 0.756, 0.6908, 0.771]}, {"w": "and", "b": [0.697, 0.756, 0.7263, 0.771]}, {"w": "either", "b": [0.7324, 0.756, 0.778, 0.771]}, {"w": "transforms", "b": [0.7842, 0.756, 0.8689, 0.771]}, {"w": "it", "b": [0.1312, 0.774, 0.1438, 0.7889]}, {"w": "into", "b": [0.1509, 0.774, 0.1828, 0.7889]}, {"w": "another", "b": [0.1899, 0.774, 0.2527, 0.7889]}, {"w": "vector", "b": [0.2598, 0.774, 0.31, 0.7889]}, {"w": "or", "b": [0.3171, 0.774, 0.3339, 0.7889]}, {"w": "into", "b": [0.341, 0.774, 0.3729, 0.7889]}, {"w": "a", "b": [0.38, 0.774, 0.3894, 0.7889]}, {"w": "value", "b": [0.3965, 0.774, 0.4389, 0.7889]}, {"w": "that", "b": [0.446, 0.774, 0.4805, 0.7889]}, {"w": "can", "b": [0.4876, 0.774, 0.5158, 0.7889]}, {"w": "be", "b": [0.5229, 0.774, 0.5422, 0.7889]}, {"w": "used", "b": [0.5493, 0.774, 0.5861, 0.7889]}, {"w": "to", "b": [0.5931, 0.774, 0.6099, 0.7889]}, {"w": "solve", "b": [0.617, 0.774, 0.6568, 0.7889]}, {"w": "a", "b": [0.6639, 0.774, 0.6733, 0.7889]}, {"w": "practical", "b": [0.6804, 0.774, 0.7516, 0.7889]}, {"w": "problem.", "b": [0.7587, 0.774, 0.8309, 0.7889]}, {"w": "For", "b": [0.8419, 0.774, 0.8695, 0.7889]}, {"w": "example,", "b": [0.1312, 0.7919, 0.2039, 0.8069]}, {"w": "in", "b": [0.2102, 0.7919, 0.2259, 0.8069]}, {"w": "clustering,", "b": [0.2323, 0.7919, 0.3282, 0.8072]}, {"w": "the", "b": [0.3344, 0.7919, 0.3606, 0.8069]}, {"w": "model", "b": [0.3669, 0.7919, 0.4165, 0.8069]}, {"w": "returns", "b": [0.4228, 0.7919, 0.4816, 0.8069]}, {"w": "the", "b": [0.4878, 0.7919, 0.514, 0.8069]}, {"w": "ID", "b": [0.5203, 0.7919, 0.5414, 0.8069]}, {"w": "of", "b": [0.5477, 0.7919, 0.5628, 0.8069]}, {"w": "the", "b": [0.5691, 0.7919, 0.5953, 0.8069]}, {"w": "cluster", "b": [0.6015, 0.7919, 0.6561, 0.8069]}, {"w": "for", "b": [0.6624, 0.7919, 0.6849, 0.8069]}, {"w": "each", "b": [0.6911, 0.7919, 0.7273, 0.8069]}, {"w": "feature", "b": [0.7335, 0.7919, 0.7906, 0.8069]}, {"w": "vector", "b": [0.7968, 0.7919, 0.8471, 0.8069]}, {"w": "in", "b": [0.8534, 0.7919, 0.8691, 0.8069]}, {"w": "the", "b": [0.1312, 0.8099, 0.1569, 0.8248]}, {"w": "dataset.", "b": [0.1631, 0.8099, 0.2268, 0.8248]}, {"w": "Clustering", "b": [0.235, 0.8099, 0.3183, 0.8248]}, {"w": "is", "b": [0.3244, 0.8099, 0.3369, 0.8248]}, {"w": "useful", "b": [0.343, 0.8099, 0.3899, 0.8248]}, {"w": "for", "b": [0.396, 0.8099, 0.4181, 0.8248]}, {"w": "finding", "b": [0.4243, 0.8099, 0.4797, 0.8248]}, {"w": "groups", "b": [0.4859, 0.8099, 0.5394, 0.8248]}, {"w": "of", "b": [0.5456, 0.8099, 0.5604, 0.8248]}, {"w": "similar", "b": [0.5666, 0.8099, 0.6211, 0.8248]}, {"w": "objects", "b": [0.6273, 0.8099, 0.6839, 0.8248]}, {"w": "in", "b": [0.69, 0.8099, 0.7054, 0.8248]}, {"w": "a", "b": [0.7116, 0.8099, 0.7208, 0.8248]}, {"w": "large", "b": [0.7269, 0.8099, 0.766, 0.8248]}, {"w": "collection", "b": [0.7722, 0.8099, 0.8481, 0.8248]}, {"w": "of", "b": [0.8543, 0.8099, 0.8691, 0.8248]}, {"w": "objects,", "b": [0.1312, 0.8278, 0.1941, 0.8428]}, {"w": "such", "b": [0.2011, 0.8278, 0.2373, 0.8428]}, {"w": "as", "b": [0.2441, 0.8278, 0.2609, 0.8428]}, {"w": "images", "b": [0.2677, 0.8278, 0.3233, 0.8428]}, {"w": "or", "b": [0.3301, 0.8278, 0.3469, 0.8428]}, {"w": "text", "b": [0.3536, 0.8278, 0.3866, 0.8428]}, {"w": "documents.", "b": [0.3934, 0.8278, 0.4866, 0.8428]}, {"w": "By", "b": [0.4967, 0.8278, 0.52, 0.8428]}, {"w": "using", "b": [0.5268, 0.8278, 0.5698, 0.8428]}, {"w": "clustering,", "b": [0.5766, 0.8278, 0.6615, 0.8428]}, {"w": "for", "b": [0.6685, 0.8278, 0.691, 0.8428]}, {"w": "example,", "b": [0.6978, 0.8278, 0.7705, 0.8428]}, {"w": "the", "b": [0.7775, 0.8278, 0.8036, 0.8428]}, {"w": "analyst", "b": [0.8104, 0.8278, 0.8696, 0.8428]}, {"w": "can", "b": [0.1312, 0.8458, 0.1588, 0.8607]}, {"w": "sample", "b": [0.165, 0.8458, 0.2203, 0.8607]}, {"w": "a", "b": [0.2265, 0.8458, 0.2357, 0.8607]}, {"w": "sufficiently", "b": [0.2418, 0.8458, 0.3278, 0.8607]}, {"w": "representative", "b": [0.334, 0.8458, 0.4462, 0.8607]}, {"w": "yet", "b": [0.4523, 0.8458, 0.4768, 0.8607]}, {"w": "small", "b": [0.483, 0.8458, 0.525, 0.8607]}, {"w": "subset", "b": [0.5312, 0.8458, 0.5815, 0.8607]}, {"w": "of", "b": [0.5877, 0.8458, 0.6025, 0.8607]}, {"w": "unlabeled", "b": [0.6086, 0.8458, 0.6858, 0.8607]}, {"w": "examples", "b": [0.692, 0.8458, 0.7652, 0.8607]}, {"w": "from", "b": [0.7714, 0.8458, 0.8087, 0.8607]}, {"w": "a", "b": [0.8149, 0.8458, 0.8241, 0.8607]}, {"w": "large", "b": [0.8302, 0.8458, 0.8691, 0.8607]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "7", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 16, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "collection of examples for manual labeling: a few examples are sampled from each cluster instead of sampling directly from the large collection and risking only sampling examples very similar to one another.", "words": [{"w": "collection", "b": [0.1312, 0.0881, 0.2087, 0.1031]}, {"w": "of", "b": [0.215, 0.0881, 0.2302, 0.1031]}, {"w": "examples", "b": [0.2366, 0.0881, 0.3115, 0.1031]}, {"w": "for", "b": [0.3179, 0.0881, 0.3404, 0.1031]}, {"w": "manual", "b": [0.3468, 0.0881, 0.407, 0.1031]}, {"w": "labeling:", "b": [0.4134, 0.0881, 0.4829, 0.1031]}, {"w": "a", "b": [0.4916, 0.0881, 0.501, 0.1031]}, {"w": "few", "b": [0.5074, 0.0881, 0.5351, 0.1031]}, {"w": "examples", "b": [0.5415, 0.0881, 0.6164, 0.1031]}, {"w": "are", "b": [0.6228, 0.0881, 0.648, 0.1031]}, {"w": "sampled", "b": [0.6544, 0.0881, 0.7214, 0.1031]}, {"w": "from", "b": [0.7278, 0.0881, 0.766, 0.1031]}, {"w": "each", "b": [0.7724, 0.0881, 0.8085, 0.1031]}, {"w": "cluster", "b": [0.8149, 0.0881, 0.8695, 0.1031]}, {"w": "instead", "b": [0.1312, 0.106, 0.1899, 0.121]}, {"w": "of", "b": [0.1964, 0.106, 0.2116, 0.121]}, {"w": "sampling", "b": [0.2181, 0.106, 0.2914, 0.121]}, {"w": "directly", "b": [0.2979, 0.106, 0.3603, 0.121]}, {"w": "from", "b": [0.3668, 0.106, 0.405, 0.121]}, {"w": "the", "b": [0.4115, 0.106, 0.4377, 0.121]}, {"w": "large", "b": [0.4442, 0.106, 0.484, 0.121]}, {"w": "collection", "b": [0.4905, 0.106, 0.5679, 0.121]}, {"w": "and", "b": [0.5744, 0.106, 0.6047, 0.121]}, {"w": "risking", "b": [0.6112, 0.106, 0.6663, 0.121]}, {"w": "only", "b": [0.6728, 0.106, 0.7079, 0.121]}, {"w": "sampling", "b": [0.7144, 0.106, 0.7877, 0.121]}, {"w": "examples", "b": [0.7942, 0.106, 0.8691, 0.121]}, {"w": "very", "b": [0.1308, 0.124, 0.1652, 0.1389]}, {"w": "similar", "b": [0.1713, 0.124, 0.2258, 0.1389]}, {"w": "to", "b": [0.232, 0.124, 0.2484, 0.1389]}, {"w": "one", "b": [0.2545, 0.124, 0.2822, 0.1389]}, {"w": "another.", "b": [0.2883, 0.124, 0.3551, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "In dimensionality reduction, the model’s output is a feature vector with fewer dimensions than the input. For example, the scientist has a feature vector that is too complex to visualize (it has more than three dimensions). The dimensionality reduction model can transform that", "words": [{"w": "In", "b": [0.1312, 0.1509, 0.1478, 0.1659]}, {"w": "dimensionality", "b": [0.1535, 0.1512, 0.288, 0.1662]}, {"w": "reduction,", "b": [0.2944, 0.1509, 0.3875, 0.1662]}, {"w": "the", "b": [0.3932, 0.1509, 0.4183, 0.1659]}, {"w": "model’s", "b": [0.4239, 0.1509, 0.4838, 0.1659]}, {"w": "output", "b": [0.4894, 0.1509, 0.5426, 0.1659]}, {"w": "is", "b": [0.5482, 0.1509, 0.5604, 0.1659]}, {"w": "a", "b": [0.5659, 0.1509, 0.575, 0.1659]}, {"w": "feature", "b": [0.5806, 0.1509, 0.6354, 0.1659]}, {"w": "vector", "b": [0.641, 0.1509, 0.6892, 0.1659]}, {"w": "with", "b": [0.6948, 0.1509, 0.73, 0.1659]}, {"w": "fewer", "b": [0.7356, 0.1509, 0.7768, 0.1659]}, {"w": "dimensions", "b": [0.7824, 0.1509, 0.869, 0.1659]}, {"w": "than", "b": [0.1312, 0.1689, 0.1674, 0.1838]}, {"w": "the", "b": [0.1727, 0.1689, 0.1978, 0.1838]}, {"w": "input.", "b": [0.203, 0.1689, 0.2503, 0.1838]}, {"w": "For", "b": [0.2582, 0.1689, 0.2846, 0.1838]}, {"w": "example,", "b": [0.2898, 0.1689, 0.3597, 0.1838]}, {"w": "the", "b": [0.3651, 0.1689, 0.3902, 0.1838]}, {"w": "scientist", "b": [0.3955, 0.1689, 0.4595, 0.1838]}, {"w": "has", "b": [0.4647, 0.1689, 0.491, 0.1838]}, {"w": "a", "b": [0.4962, 0.1689, 0.5053, 0.1838]}, {"w": "feature", "b": [0.5105, 0.1689, 0.5653, 0.1838]}, {"w": "vector", "b": [0.5706, 0.1689, 0.6189, 0.1838]}, {"w": "that", "b": [0.6241, 0.1689, 0.6573, 0.1838]}, {"w": "is", "b": [0.6625, 0.1689, 0.6747, 0.1838]}, {"w": "too", "b": [0.6799, 0.1689, 0.7056, 0.1838]}, {"w": "complex", "b": [0.7108, 0.1689, 0.7756, 0.1838]}, {"w": "to", "b": [0.7809, 0.1689, 0.7969, 0.1838]}, {"w": "visualize", "b": [0.8022, 0.1689, 0.8691, 0.1838]}, {"w": "(it", "b": [0.1291, 0.1868, 0.1482, 0.2018]}, {"w": "has", "b": [0.1543, 0.1868, 0.1805, 0.2018]}, {"w": "more", "b": [0.1866, 0.1868, 0.2259, 0.2018]}, {"w": "than", "b": [0.232, 0.1868, 0.2682, 0.2018]}, {"w": "three", "b": [0.2743, 0.1868, 0.3145, 0.2018]}, {"w": "dimensions).", "b": [0.3207, 0.1868, 0.4194, 0.2018]}, {"w": "The", "b": [0.4275, 0.1868, 0.4587, 0.2018]}, {"w": "dimensionality", "b": [0.4648, 0.1868, 0.5795, 0.2018]}, {"w": "reduction", "b": [0.5856, 0.1868, 0.66, 0.2018]}, {"w": "model", "b": [0.6661, 0.1868, 0.7139, 0.2018]}, {"w": "can", "b": [0.72, 0.1868, 0.7471, 0.2018]}, {"w": "transform", "b": [0.7532, 0.1868, 0.8303, 0.2018]}, {"w": "that", "b": [0.8364, 0.1868, 0.8696, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "feature vector into a new feature vector (by preserving the information up to some extent) with only two or three dimensions. This new feature vector can be plotted on a graph.", "words": [{"w": "feature", "b": [0.1312, 0.2048, 0.1879, 0.2197]}, {"w": "vector", "b": [0.194, 0.2048, 0.2439, 0.2197]}, {"w": "into", "b": [0.25, 0.2048, 0.2817, 0.2197]}, {"w": "a", "b": [0.2878, 0.2048, 0.2972, 0.2197]}, {"w": "new", "b": [0.3033, 0.2048, 0.3355, 0.2197]}, {"w": "feature", "b": [0.3417, 0.2048, 0.3983, 0.2197]}, {"w": "vector", "b": [0.4044, 0.2048, 0.4543, 0.2197]}, {"w": "(by", "b": [0.4605, 0.2048, 0.4875, 0.2197]}, {"w": "preserving", "b": [0.4936, 0.2048, 0.5774, 0.2197]}, {"w": "the", "b": [0.5835, 0.2048, 0.6095, 0.2197]}, {"w": "information", "b": [0.6156, 0.2048, 0.7106, 0.2197]}, {"w": "up", "b": [0.7168, 0.2048, 0.7375, 0.2197]}, {"w": "to", "b": [0.7437, 0.2048, 0.7603, 0.2197]}, {"w": "some", "b": [0.7664, 0.2048, 0.807, 0.2197]}, {"w": "extent)", "b": [0.8132, 0.2048, 0.8713, 0.2197]}, {"w": "with", "b": [0.1306, 0.2227, 0.1665, 0.2377]}, {"w": "only", "b": [0.1726, 0.2227, 0.2069, 0.2377]}, {"w": "two", "b": [0.2131, 0.2227, 0.2418, 0.2377]}, {"w": "or", "b": [0.2479, 0.2227, 0.2644, 0.2377]}, {"w": "three", "b": [0.2706, 0.2227, 0.3116, 0.2377]}, {"w": "dimensions.", "b": [0.3178, 0.2227, 0.4113, 0.2377]}, {"w": "This", "b": [0.4195, 0.2227, 0.4555, 0.2377]}, {"w": "new", "b": [0.4617, 0.2227, 0.4934, 0.2377]}, {"w": "feature", "b": [0.4996, 0.2227, 0.5555, 0.2377]}, {"w": "vector", "b": [0.5617, 0.2227, 0.611, 0.2377]}, {"w": "can", "b": [0.6171, 0.2227, 0.6448, 0.2377]}, {"w": "be", "b": [0.651, 0.2227, 0.67, 0.2377]}, {"w": "plotted", "b": [0.6761, 0.2227, 0.7335, 0.2377]}, {"w": "on", "b": [0.7397, 0.2227, 0.7592, 0.2377]}, {"w": "a", "b": [0.7653, 0.2227, 0.7745, 0.2377]}, {"w": "graph.", "b": [0.7807, 0.2227, 0.832, 0.2377]}]}, {"id": "b_3", "type": "paragraph", "text": "In outlier detection, the output is a real number that indicates how the input feature vector is different from a “typical” example in the dataset. Outlier detection is useful for solving a network intrusion problem (by detecting abnormal network packets that are different from a typical packet in “normal” traffic) or detecting novelty (such as a document different from the existing documents in a collection).", "words": [{"w": "In", "b": [0.1312, 0.2496, 0.1478, 0.2646]}, {"w": "outlier", "b": [0.153, 0.2499, 0.2139, 0.2649]}, {"w": "detection,", "b": [0.2197, 0.2496, 0.3102, 0.2649]}, {"w": "the", "b": [0.3155, 0.2496, 0.3406, 0.2646]}, {"w": "output", "b": [0.3457, 0.2496, 0.3989, 0.2646]}, {"w": "is", "b": [0.404, 0.2496, 0.4162, 0.2646]}, {"w": "a", "b": [0.4212, 0.2496, 0.4303, 0.2646]}, {"w": "real", "b": [0.4353, 0.2496, 0.4645, 0.2646]}, {"w": "number", "b": [0.4695, 0.2496, 0.5294, 0.2646]}, {"w": "that", "b": [0.5344, 0.2496, 0.5676, 0.2646]}, {"w": "indicates", "b": [0.5726, 0.2496, 0.6421, 0.2646]}, {"w": "how", "b": [0.6471, 0.2496, 0.6788, 0.2646]}, {"w": "the", "b": [0.6838, 0.2496, 0.7089, 0.2646]}, {"w": "input", "b": [0.714, 0.2496, 0.7562, 0.2646]}, {"w": "feature", "b": [0.7613, 0.2496, 0.8161, 0.2646]}, {"w": "vector", "b": [0.8211, 0.2496, 0.8694, 0.2646]}, {"w": "is", "b": [0.1312, 0.2676, 0.1436, 0.2825]}, {"w": "different", "b": [0.1497, 0.2676, 0.2162, 0.2825]}, {"w": "from", "b": [0.2223, 0.2676, 0.2596, 0.2825]}, {"w": "a", "b": [0.2658, 0.2676, 0.275, 0.2825]}, {"w": "“typical”", "b": [0.2811, 0.2676, 0.3526, 0.2825]}, {"w": "example", "b": [0.3587, 0.2676, 0.4246, 0.2825]}, {"w": "in", "b": [0.4308, 0.2676, 0.4461, 0.2825]}, {"w": "the", "b": [0.4522, 0.2676, 0.4778, 0.2825]}, {"w": "dataset.", "b": [0.4839, 0.2676, 0.5473, 0.2825]}, {"w": "Outlier", "b": [0.5555, 0.2676, 0.6128, 0.2825]}, {"w": "detection", "b": [0.6189, 0.2676, 0.6925, 0.2825]}, {"w": "is", "b": [0.6986, 0.2676, 0.711, 0.2825]}, {"w": "useful", "b": [0.7171, 0.2676, 0.7637, 0.2825]}, {"w": "for", "b": [0.7699, 0.2676, 0.7919, 0.2825]}, {"w": "solving", "b": [0.798, 0.2676, 0.8538, 0.2825]}, {"w": "a", "b": [0.8599, 0.2676, 0.8691, 0.2825]}, {"w": "network", "b": [0.1312, 0.2855, 0.1945, 0.3005]}, {"w": "intrusion", "b": [0.2007, 0.2855, 0.2712, 0.3005]}, {"w": "problem", "b": [0.2773, 0.2855, 0.3422, 0.3005]}, {"w": "(by", "b": [0.3483, 0.2855, 0.3746, 0.3005]}, {"w": "detecting", "b": [0.3808, 0.2855, 0.4537, 0.3005]}, {"w": "abnormal", "b": [0.4598, 0.2855, 0.5347, 0.3005]}, {"w": "network", "b": [0.5409, 0.2855, 0.6042, 0.3005]}, {"w": "packets", "b": [0.6103, 0.2855, 0.6686, 0.3005]}, {"w": "that", "b": [0.6748, 0.2855, 0.7082, 0.3005]}, {"w": "are", "b": [0.7143, 0.2855, 0.7387, 0.3005]}, {"w": "different", "b": [0.7448, 0.2855, 0.8107, 0.3005]}, {"w": "from", "b": [0.8168, 0.2855, 0.8538, 0.3005]}, {"w": "a", "b": [0.86, 0.2855, 0.8691, 0.3005]}, {"w": "typical", "b": [0.1312, 0.3035, 0.1863, 0.3184]}, {"w": "packet", "b": [0.1924, 0.3035, 0.2449, 0.3184]}, {"w": "in", "b": [0.251, 0.3035, 0.2666, 0.3184]}, {"w": "“normal”", "b": [0.2728, 0.3035, 0.3476, 0.3184]}, {"w": "traffic)", "b": [0.3537, 0.3035, 0.4088, 0.3184]}, {"w": "or", "b": [0.415, 0.3035, 0.4316, 0.3184]}, {"w": "detecting", "b": [0.4378, 0.3035, 0.5126, 0.3184]}, {"w": "novelty", "b": [0.5187, 0.3035, 0.5774, 0.3184]}, {"w": "(such", "b": [0.5836, 0.3035, 0.6268, 0.3184]}, {"w": "as", "b": [0.6329, 0.3035, 0.6497, 0.3184]}, {"w": "a", "b": [0.6558, 0.3035, 0.6651, 0.3184]}, {"w": "document", "b": [0.6713, 0.3035, 0.7513, 0.3184]}, {"w": "different", "b": [0.7574, 0.3035, 0.825, 0.3184]}, {"w": "from", "b": [0.8311, 0.3035, 0.8691, 0.3184]}, {"w": "the", "b": [0.1312, 0.3214, 0.1569, 0.3364]}, {"w": "existing", "b": [0.163, 0.3214, 0.2252, 0.3364]}, {"w": "documents", "b": [0.2313, 0.3214, 0.3176, 0.3364]}, {"w": "in", "b": [0.3237, 0.3214, 0.3391, 0.3364]}, {"w": "a", "b": [0.3453, 0.3214, 0.3545, 0.3364]}, {"w": "collection).", "b": [0.3606, 0.3214, 0.4488, 0.3364]}]}, {"id": "b_4", "type": "equation", "text": "1.2.3 Semi-Supervised Learning", "words": [{"w": "1.2.3", "b": [0.1312, 0.3696, 0.1749, 0.3845]}, {"w": "Semi-Supervised", "b": [0.1961, 0.3696, 0.3497, 0.3845]}, {"w": "Learning", "b": [0.3567, 0.3696, 0.4384, 0.3845]}]}, {"id": "b_5", "type": "paragraph", "text": "In semi-supervised learning, the dataset contains both labeled and unlabeled examples. Usually, the quantity of unlabeled examples is much higher than the number of labeled examples. The goal of a semi-supervised learning algorithm is the same as the goal of the supervised learning algorithm. The hope here is that, by using many unlabeled examples, a learning algorithm can find (we might say “produce” or “compute”) a better model.", "words": [{"w": "In", "b": [0.1312, 0.4058, 0.1483, 0.4208]}, {"w": "semi-supervised", "b": [0.1546, 0.4061, 0.3014, 0.4211]}, {"w": "learning,", "b": [0.3084, 0.4058, 0.3885, 0.4211]}, {"w": "the", "b": [0.3947, 0.4058, 0.4206, 0.4208]}, {"w": "dataset", "b": [0.4267, 0.4058, 0.4859, 0.4208]}, {"w": "contains", "b": [0.492, 0.4058, 0.5589, 0.4208]}, {"w": "both", "b": [0.5651, 0.4058, 0.6029, 0.4208]}, {"w": "labeled", "b": [0.6091, 0.4058, 0.6666, 0.4208]}, {"w": "and", "b": [0.6727, 0.4058, 0.7027, 0.4208]}, {"w": "unlabeled", "b": [0.7089, 0.4058, 0.7871, 0.4208]}, {"w": "examples.", "b": [0.7933, 0.4058, 0.8726, 0.4208]}, {"w": "Usually,", "b": [0.1312, 0.4238, 0.1967, 0.4387]}, {"w": "the", "b": [0.2049, 0.4238, 0.231, 0.4387]}, {"w": "quantity", "b": [0.2388, 0.4238, 0.3078, 0.4387]}, {"w": "of", "b": [0.3155, 0.4238, 0.3307, 0.4387]}, {"w": "unlabeled", "b": [0.3384, 0.4238, 0.4174, 0.4387]}, {"w": "examples", "b": [0.4251, 0.4238, 0.5, 0.4387]}, {"w": "is", "b": [0.5078, 0.4238, 0.5204, 0.4387]}, {"w": "much", "b": [0.5282, 0.4238, 0.5721, 0.4387]}, {"w": "higher", "b": [0.5798, 0.4238, 0.6312, 0.4387]}, {"w": "than", "b": [0.6389, 0.4238, 0.6765, 0.4387]}, {"w": "the", "b": [0.6843, 0.4238, 0.7104, 0.4387]}, {"w": "number", "b": [0.7182, 0.4238, 0.7804, 0.4387]}, {"w": "of", "b": [0.7882, 0.4238, 0.8033, 0.4387]}, {"w": "labeled", "b": [0.8111, 0.4238, 0.8691, 0.4387]}, {"w": "examples.", "b": [0.1312, 0.4417, 0.21, 0.4567]}, {"w": "The", "b": [0.2182, 0.4417, 0.2501, 0.4567]}, {"w": "goal", "b": [0.2563, 0.4417, 0.2892, 0.4567]}, {"w": "of", "b": [0.2953, 0.4417, 0.3102, 0.4567]}, {"w": "a", "b": [0.3164, 0.4417, 0.3256, 0.4567]}, {"w": "semi-supervised", "b": [0.3319, 0.442, 0.4786, 0.457]}, {"w": "learning", "b": [0.4857, 0.442, 0.5605, 0.457]}, {"w": "algorithm", "b": [0.5675, 0.442, 0.6573, 0.457]}, {"w": "is", "b": [0.6635, 0.4417, 0.6759, 0.4567]}, {"w": "the", "b": [0.6821, 0.4417, 0.7078, 0.4567]}, {"w": "same", "b": [0.7139, 0.4417, 0.7542, 0.4567]}, {"w": "as", "b": [0.7603, 0.4417, 0.7769, 0.4567]}, {"w": "the", "b": [0.783, 0.4417, 0.8087, 0.4567]}, {"w": "goal", "b": [0.8149, 0.4417, 0.8478, 0.4567]}, {"w": "of", "b": [0.8539, 0.4417, 0.8689, 0.4567]}, {"w": "the", "b": [0.1312, 0.4597, 0.1564, 0.4746]}, {"w": "supervised", "b": [0.1623, 0.4597, 0.245, 0.4746]}, {"w": "learning", "b": [0.2509, 0.4597, 0.3142, 0.4746]}, {"w": "algorithm.", "b": [0.3201, 0.4597, 0.4016, 0.4746]}, {"w": "The", "b": [0.4097, 0.4597, 0.4408, 0.4746]}, {"w": "hope", "b": [0.4467, 0.4597, 0.4844, 0.4746]}, {"w": "here", "b": [0.4903, 0.4597, 0.5236, 0.4746]}, {"w": "is", "b": [0.5295, 0.4597, 0.5416, 0.4746]}, {"w": "that,", "b": [0.5475, 0.4597, 0.5857, 0.4746]}, {"w": "by", "b": [0.5916, 0.4597, 0.6107, 0.4746]}, {"w": "using", "b": [0.6166, 0.4597, 0.6579, 0.4746]}, {"w": "many", "b": [0.6638, 0.4597, 0.707, 0.4746]}, {"w": "unlabeled", "b": [0.7129, 0.4597, 0.7888, 0.4746]}, {"w": "examples,", "b": [0.7947, 0.4597, 0.8717, 0.4746]}, {"w": "a", "b": [0.1312, 0.4776, 0.1405, 0.4926]}, {"w": "learning", "b": [0.1466, 0.4776, 0.2113, 0.4926]}, {"w": "algorithm", "b": [0.2174, 0.4776, 0.2954, 0.4926]}, {"w": "can", "b": [0.3015, 0.4776, 0.3292, 0.4926]}, {"w": "find", "b": [0.3354, 0.4776, 0.3661, 0.4926]}, {"w": "(we", "b": [0.3723, 0.4776, 0.4005, 0.4926]}, {"w": "might", "b": [0.4066, 0.4776, 0.4533, 0.4926]}, {"w": "say", "b": [0.4594, 0.4776, 0.4852, 0.4926]}, {"w": "“produce”", "b": [0.4913, 0.4776, 0.5729, 0.4926]}, {"w": "or", "b": [0.579, 0.4776, 0.5955, 0.4926]}, {"w": "“compute”)", "b": [0.6017, 0.4776, 0.695, 0.4926]}, {"w": "a", "b": [0.7011, 0.4776, 0.7103, 0.4926]}, {"w": "better", "b": [0.7165, 0.4776, 0.7652, 0.4926]}, {"w": "model.", "b": [0.7714, 0.4776, 0.8252, 0.4926]}]}, {"id": "b_6", "type": "paragraph", "text": "1.2.4 Reinforcement Learning", "words": [{"w": "1.2.4", "b": [0.1312, 0.5258, 0.1749, 0.5407]}, {"w": "Reinforcement", "b": [0.1961, 0.5258, 0.3312, 0.5407]}, {"w": "Learning", "b": [0.3383, 0.5258, 0.4199, 0.5407]}]}, {"id": "b_7", "type": "paragraph", "text": "Reinforcement learning is a subfield of machine learning where the machine (called an agent) “lives’ ’ in an environment and is capable of perceiving the state of that environment as a vector of features. The machine can execute actions in non-terminal states. Different actions bring different rewards and could also move the machine to another state of the environment. A common goal of a reinforcement learning algorithm is to learn an optimal policy.", "words": [{"w": "Reinforcement", "b": [0.1312, 0.5624, 0.2664, 0.5773]}, {"w": "learning", "b": [0.2738, 0.5624, 0.3485, 0.5773]}, {"w": "is", "b": [0.3551, 0.562, 0.3678, 0.577]}, {"w": "a", "b": [0.3742, 0.562, 0.3836, 0.577]}, {"w": "subfield", "b": [0.3901, 0.562, 0.453, 0.577]}, {"w": "of", "b": [0.4594, 0.562, 0.4745, 0.577]}, {"w": "machine", "b": [0.481, 0.562, 0.5484, 0.577]}, {"w": "learning", "b": [0.5549, 0.562, 0.6208, 0.577]}, {"w": "where", "b": [0.6273, 0.562, 0.6754, 0.577]}, {"w": "the", "b": [0.6819, 0.562, 0.708, 0.577]}, {"w": "machine", "b": [0.7144, 0.562, 0.7819, 0.577]}, {"w": "(called", "b": [0.7883, 0.562, 0.8427, 0.577]}, {"w": "an", "b": [0.8492, 0.562, 0.869, 0.577]}, {"w": "agent)", "b": [0.1312, 0.58, 0.1817, 0.595]}, {"w": "“lives’", "b": [0.1879, 0.58, 0.2364, 0.595]}, {"w": "’", "b": [0.2395, 0.58, 0.2446, 0.595]}, {"w": "in", "b": [0.2508, 0.58, 0.2661, 0.595]}, {"w": "an", "b": [0.2722, 0.58, 0.2916, 0.595]}, {"w": "environment", "b": [0.2977, 0.58, 0.3972, 0.595]}, {"w": "and", "b": [0.4034, 0.58, 0.433, 0.595]}, {"w": "is", "b": [0.4391, 0.58, 0.4515, 0.595]}, {"w": "capable", "b": [0.4576, 0.58, 0.5178, 0.595]}, {"w": "of", "b": [0.5239, 0.58, 0.5387, 0.595]}, {"w": "perceiving", "b": [0.5449, 0.58, 0.6266, 0.595]}, {"w": "the", "b": [0.6327, 0.58, 0.6582, 0.595]}, {"w": "state", "b": [0.6644, 0.58, 0.7032, 0.595]}, {"w": "of", "b": [0.7094, 0.58, 0.7242, 0.595]}, {"w": "that", "b": [0.7303, 0.58, 0.764, 0.595]}, {"w": "environment", "b": [0.7701, 0.58, 0.8696, 0.595]}, {"w": "as", "b": [0.1312, 0.5979, 0.1481, 0.6129]}, {"w": "a", "b": [0.1542, 0.5979, 0.1636, 0.6129]}, {"w": "vector", "b": [0.1698, 0.5979, 0.2201, 0.6129]}, {"w": "of", "b": [0.2262, 0.5979, 0.2414, 0.6129]}, {"w": "features.", "b": [0.2475, 0.5979, 0.3173, 0.6129]}, {"w": "The", "b": [0.3255, 0.5979, 0.3579, 0.6129]}, {"w": "machine", "b": [0.3641, 0.5979, 0.4315, 0.6129]}, {"w": "can", "b": [0.4377, 0.5979, 0.4659, 0.6129]}, {"w": "execute", "b": [0.4721, 0.5979, 0.5333, 0.6129]}, {"w": "actions", "b": [0.5395, 0.5979, 0.5971, 0.6129]}, {"w": "in", "b": [0.6033, 0.5979, 0.6189, 0.6129]}, {"w": "non-terminal", "b": [0.6251, 0.5979, 0.7308, 0.6129]}, {"w": "states.", "b": [0.7369, 0.5979, 0.7894, 0.6129]}, {"w": "Different", "b": [0.7977, 0.5979, 0.8696, 0.6129]}, {"w": "actions", "b": [0.1312, 0.6159, 0.1889, 0.6308]}, {"w": "bring", "b": [0.1963, 0.6159, 0.2392, 0.6308]}, {"w": "different", "b": [0.2466, 0.6159, 0.3146, 0.6308]}, {"w": "rewards", "b": [0.322, 0.6159, 0.3855, 0.6308]}, {"w": "and", "b": [0.3929, 0.6159, 0.4232, 0.6308]}, {"w": "could", "b": [0.4306, 0.6159, 0.4745, 0.6308]}, {"w": "also", "b": [0.4819, 0.6159, 0.5134, 0.6308]}, {"w": "move", "b": [0.5208, 0.6159, 0.5631, 0.6308]}, {"w": "the", "b": [0.5705, 0.6159, 0.5966, 0.6308]}, {"w": "machine", "b": [0.604, 0.6159, 0.6715, 0.6308]}, {"w": "to", "b": [0.6789, 0.6159, 0.6956, 0.6308]}, {"w": "another", "b": [0.703, 0.6159, 0.7658, 0.6308]}, {"w": "state", "b": [0.7732, 0.6159, 0.813, 0.6308]}, {"w": "of", "b": [0.8204, 0.6159, 0.8356, 0.6308]}, {"w": "the", "b": [0.8429, 0.6159, 0.8691, 0.6308]}, {"w": "environment.", "b": [0.1312, 0.6338, 0.238, 0.6488]}, {"w": "A", "b": [0.2462, 0.6338, 0.2603, 0.6488]}, {"w": "common", "b": [0.2664, 0.6338, 0.3351, 0.6488]}, {"w": "goal", "b": [0.3413, 0.6338, 0.3746, 0.6488]}, {"w": "of", "b": [0.3807, 0.6338, 0.3958, 0.6488]}, {"w": "a", "b": [0.402, 0.6338, 0.4113, 0.6488]}, {"w": "reinforcement", "b": [0.4175, 0.6338, 0.529, 0.6488]}, {"w": "learning", "b": [0.5352, 0.6338, 0.6008, 0.6488]}, {"w": "algorithm", "b": [0.607, 0.6338, 0.6861, 0.6488]}, {"w": "is", "b": [0.6923, 0.6338, 0.7049, 0.6488]}, {"w": "to", "b": [0.711, 0.6338, 0.7277, 0.6488]}, {"w": "learn", "b": [0.7338, 0.6338, 0.7745, 0.6488]}, {"w": "an", "b": [0.7807, 0.6338, 0.8004, 0.6488]}, {"w": "optimal", "b": [0.8066, 0.6338, 0.869, 0.6488]}, {"w": "policy.", "b": [0.1312, 0.6518, 0.1918, 0.667]}]}, {"id": "b_8", "type": "paragraph", "text": "An optimal policy is a function (similar to the model in supervised learning) that takes the feature vector of a state as input and outputs an optimal action to execute in that state. The action is optimal if it maximizes the expected average long-term reward.", "words": [{"w": "An", "b": [0.1305, 0.6787, 0.1546, 0.6937]}, {"w": "optimal", "b": [0.1608, 0.6787, 0.2223, 0.6937]}, {"w": "policy", "b": [0.2284, 0.6787, 0.2767, 0.6937]}, {"w": "is", "b": [0.2828, 0.6787, 0.2952, 0.6937]}, {"w": "a", "b": [0.3014, 0.6787, 0.3106, 0.6937]}, {"w": "function", "b": [0.3168, 0.6787, 0.3829, 0.6937]}, {"w": "(similar", "b": [0.3891, 0.6787, 0.4507, 0.6937]}, {"w": "to", "b": [0.4569, 0.6787, 0.4733, 0.6937]}, {"w": "the", "b": [0.4795, 0.6787, 0.5051, 0.6937]}, {"w": "model", "b": [0.5113, 0.6787, 0.56, 0.6937]}, {"w": "in", "b": [0.5661, 0.6787, 0.5815, 0.6937]}, {"w": "supervised", "b": [0.5877, 0.6787, 0.672, 0.6937]}, {"w": "learning)", "b": [0.6782, 0.6787, 0.75, 0.6937]}, {"w": "that", "b": [0.7562, 0.6787, 0.79, 0.6937]}, {"w": "takes", "b": [0.7962, 0.6787, 0.8373, 0.6937]}, {"w": "the", "b": [0.8435, 0.6787, 0.8691, 0.6937]}, {"w": "feature", "b": [0.1312, 0.6967, 0.1861, 0.7116]}, {"w": "vector", "b": [0.1918, 0.6967, 0.2401, 0.7116]}, {"w": "of", "b": [0.2458, 0.6967, 0.2604, 0.7116]}, {"w": "a", "b": [0.2661, 0.6967, 0.2752, 0.7116]}, {"w": "state", "b": [0.2809, 0.6967, 0.3192, 0.7116]}, {"w": "as", "b": [0.3249, 0.6967, 0.3411, 0.7116]}, {"w": "input", "b": [0.3468, 0.6967, 0.389, 0.7116]}, {"w": "and", "b": [0.3948, 0.6967, 0.4239, 0.7116]}, {"w": "outputs", "b": [0.4296, 0.6967, 0.49, 0.7116]}, {"w": "an", "b": [0.4957, 0.6967, 0.5148, 0.7116]}, {"w": "optimal", "b": [0.5206, 0.6967, 0.5809, 0.7116]}, {"w": "action", "b": [0.5866, 0.6967, 0.6348, 0.7116]}, {"w": "to", "b": [0.6405, 0.6967, 0.6566, 0.7116]}, {"w": "execute", "b": [0.6623, 0.6967, 0.7212, 0.7116]}, {"w": "in", "b": [0.7269, 0.6967, 0.7419, 0.7116]}, {"w": "that", "b": [0.7477, 0.6967, 0.7808, 0.7116]}, {"w": "state.", "b": [0.7866, 0.6967, 0.8299, 0.7116]}, {"w": "The", "b": [0.838, 0.6967, 0.8691, 0.7116]}, {"w": "action", "b": [0.1312, 0.7146, 0.1805, 0.7296]}, {"w": "is", "b": [0.1866, 0.7146, 0.199, 0.7296]}, {"w": "optimal", "b": [0.2052, 0.7146, 0.2667, 0.7296]}, {"w": "if", "b": [0.2728, 0.7146, 0.2836, 0.7296]}, {"w": "it", "b": [0.2897, 0.7146, 0.3021, 0.7296]}, {"w": "maximizes", "b": [0.3082, 0.7146, 0.3919, 0.7296]}, {"w": "the", "b": [0.398, 0.7146, 0.4237, 0.7296]}, {"w": "expected", "b": [0.4298, 0.7146, 0.5006, 0.7296]}, {"w": "average", "b": [0.5067, 0.7146, 0.5668, 0.7296]}, {"w": "long-term", "b": [0.5729, 0.7146, 0.6509, 0.7296]}, {"w": "reward.", "b": [0.657, 0.7146, 0.7171, 0.7296]}]}, {"id": "b_9", "type": "paragraph", "text": "Reinforcement learning solves a particular problem where decision making is sequential, and the goal is long-term, such as game playing, robotics, resource management, or logistics.", "words": [{"w": "Reinforcement", "b": [0.1312, 0.7415, 0.246, 0.7565]}, {"w": "learning", "b": [0.2522, 0.7415, 0.3161, 0.7565]}, {"w": "solves", "b": [0.3222, 0.7415, 0.368, 0.7565]}, {"w": "a", "b": [0.3742, 0.7415, 0.3833, 0.7565]}, {"w": "particular", "b": [0.3894, 0.7415, 0.4675, 0.7565]}, {"w": "problem", "b": [0.4737, 0.7415, 0.5386, 0.7565]}, {"w": "where", "b": [0.5447, 0.7415, 0.5914, 0.7565]}, {"w": "decision", "b": [0.5975, 0.7415, 0.6605, 0.7565]}, {"w": "making", "b": [0.6666, 0.7415, 0.7248, 0.7565]}, {"w": "is", "b": [0.731, 0.7415, 0.7433, 0.7565]}, {"w": "sequential,", "b": [0.7494, 0.7415, 0.8336, 0.7565]}, {"w": "and", "b": [0.8398, 0.7415, 0.8691, 0.7565]}, {"w": "the", "b": [0.1312, 0.7595, 0.1569, 0.7744]}, {"w": "goal", "b": [0.163, 0.7595, 0.1958, 0.7744]}, {"w": "is", "b": [0.202, 0.7595, 0.2144, 0.7744]}, {"w": "long-term,", "b": [0.2205, 0.7595, 0.3036, 0.7744]}, {"w": "such", "b": [0.3098, 0.7595, 0.3453, 0.7744]}, {"w": "as", "b": [0.3514, 0.7595, 0.3679, 0.7744]}, {"w": "game", "b": [0.3741, 0.7595, 0.4161, 0.7744]}, {"w": "playing,", "b": [0.4223, 0.7595, 0.4858, 0.7744]}, {"w": "robotics,", "b": [0.492, 0.7595, 0.5614, 0.7744]}, {"w": "resource", "b": [0.5675, 0.7595, 0.6334, 0.7744]}, {"w": "management,", "b": [0.6395, 0.7595, 0.7467, 0.7744]}, {"w": "or", "b": [0.7528, 0.7595, 0.7693, 0.7744]}, {"w": "logistics.", "b": [0.7754, 0.7595, 0.8444, 0.7744]}]}, {"id": "b_10", "type": "paragraph", "text": "In this book, for simplicity, most explanations are limited to supervised learning. However, all the material presented in the book is applicable to other types of machine learning.", "words": [{"w": "In", "b": [0.1312, 0.7864, 0.1483, 0.8013]}, {"w": "this", "b": [0.1544, 0.7864, 0.1844, 0.8013]}, {"w": "book,", "b": [0.1906, 0.7864, 0.2355, 0.8013]}, {"w": "for", "b": [0.2416, 0.7864, 0.2639, 0.8013]}, {"w": "simplicity,", "b": [0.27, 0.7864, 0.3522, 0.8013]}, {"w": "most", "b": [0.3583, 0.7864, 0.3976, 0.8013]}, {"w": "explanations", "b": [0.4038, 0.7864, 0.5056, 0.8013]}, {"w": "are", "b": [0.5117, 0.7864, 0.5366, 0.8013]}, {"w": "limited", "b": [0.5427, 0.7864, 0.5995, 0.8013]}, {"w": "to", "b": [0.6056, 0.7864, 0.6221, 0.8013]}, {"w": "supervised", "b": [0.6282, 0.7864, 0.7132, 0.8013]}, {"w": "learning.", "b": [0.7193, 0.7864, 0.7896, 0.8013]}, {"w": "However,", "b": [0.7978, 0.7864, 0.8717, 0.8013]}, {"w": "all", "b": [0.1312, 0.8043, 0.1507, 0.8193]}, {"w": "the", "b": [0.1569, 0.8043, 0.1825, 0.8193]}, {"w": "material", "b": [0.1887, 0.8043, 0.2553, 0.8193]}, {"w": "presented", "b": [0.2615, 0.8043, 0.3381, 0.8193]}, {"w": "in", "b": [0.3442, 0.8043, 0.3596, 0.8193]}, {"w": "the", "b": [0.3658, 0.8043, 0.3914, 0.8193]}, {"w": "book", "b": [0.3975, 0.8043, 0.437, 0.8193]}, {"w": "is", "b": [0.4432, 0.8043, 0.4556, 0.8193]}, {"w": "applicable", "b": [0.4618, 0.8043, 0.5428, 0.8193]}, {"w": "to", "b": [0.5489, 0.8043, 0.5653, 0.8193]}, {"w": "other", "b": [0.5715, 0.8043, 0.6136, 0.8193]}, {"w": "types", "b": [0.6197, 0.8043, 0.6624, 0.8193]}, {"w": "of", "b": [0.6685, 0.8043, 0.6834, 0.8193]}, {"w": "machine", "b": [0.6896, 0.8043, 0.7557, 0.8193]}, {"w": "learning.", "b": [0.7618, 0.8043, 0.8316, 0.8193]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "8", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 17, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "1.3 Data and Machine Learning Terminology", "words": [{"w": "1.3", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Data", "b": [0.188, 0.0861, 0.241, 0.104]}, {"w": "and", "b": [0.2493, 0.0861, 0.2891, 0.104]}, {"w": "Machine", "b": [0.2974, 0.0861, 0.3895, 0.104]}, {"w": "Learning", "b": [0.3978, 0.0861, 0.4935, 0.104]}, {"w": "Terminology", "b": [0.5018, 0.0861, 0.6375, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "Now let’s introduce the common data terminology (such as data used directly and indirectly, raw and tidy data, training and holdout data) and the terminology related to machine learning (such as baseline, hyperparameter, pipeline, and others).", "words": [{"w": "Now", "b": [0.1312, 0.1247, 0.1665, 0.1396]}, {"w": "let’s", "b": [0.1727, 0.1247, 0.205, 0.1396]}, {"w": "introduce", "b": [0.2112, 0.1247, 0.2858, 0.1396]}, {"w": "the", "b": [0.292, 0.1247, 0.3172, 0.1396]}, {"w": "common", "b": [0.3234, 0.1247, 0.3899, 0.1396]}, {"w": "data", "b": [0.396, 0.1247, 0.4313, 0.1396]}, {"w": "terminology", "b": [0.4375, 0.1247, 0.5317, 0.1396]}, {"w": "(such", "b": [0.5379, 0.1247, 0.5799, 0.1396]}, {"w": "as", "b": [0.586, 0.1247, 0.6023, 0.1396]}, {"w": "data", "b": [0.6084, 0.1247, 0.6437, 0.1396]}, {"w": "used", "b": [0.6498, 0.1247, 0.6852, 0.1396]}, {"w": "directly", "b": [0.6914, 0.1247, 0.7514, 0.1396]}, {"w": "and", "b": [0.7576, 0.1247, 0.7868, 0.1396]}, {"w": "indirectly,", "b": [0.793, 0.1247, 0.8717, 0.1396]}, {"w": "raw", "b": [0.1312, 0.1426, 0.1611, 0.1576]}, {"w": "and", "b": [0.1692, 0.1426, 0.1995, 0.1576]}, {"w": "tidy", "b": [0.2076, 0.1426, 0.2406, 0.1576]}, {"w": "data,", "b": [0.2487, 0.1426, 0.2905, 0.1576]}, {"w": "training", "b": [0.2991, 0.1426, 0.364, 0.1576]}, {"w": "and", "b": [0.3721, 0.1426, 0.4025, 0.1576]}, {"w": "holdout", "b": [0.4106, 0.1426, 0.4733, 0.1576]}, {"w": "data)", "b": [0.4814, 0.1426, 0.5253, 0.1576]}, {"w": "and", "b": [0.5334, 0.1426, 0.5638, 0.1576]}, {"w": "the", "b": [0.5719, 0.1426, 0.598, 0.1576]}, {"w": "terminology", "b": [0.6061, 0.1426, 0.704, 0.1576]}, {"w": "related", "b": [0.7121, 0.1426, 0.7686, 0.1576]}, {"w": "to", "b": [0.7767, 0.1426, 0.7934, 0.1576]}, {"w": "machine", "b": [0.8016, 0.1426, 0.869, 0.1576]}, {"w": "learning", "b": [0.1312, 0.1606, 0.1959, 0.1755]}, {"w": "(such", "b": [0.202, 0.1606, 0.2447, 0.1755]}, {"w": "as", "b": [0.2509, 0.1606, 0.2674, 0.1755]}, {"w": "baseline,", "b": [0.2735, 0.1606, 0.3423, 0.1755]}, {"w": "hyperparameter,", "b": [0.3485, 0.1606, 0.4815, 0.1755]}, {"w": "pipeline,", "b": [0.4876, 0.1606, 0.5558, 0.1755]}, {"w": "and", "b": [0.562, 0.1606, 0.5917, 0.1755]}, {"w": "others).", "b": [0.5979, 0.1606, 0.6596, 0.1755]}]}, {"id": "b_2", "type": "paragraph", "text": "1.3.1 Data Used Directly and Indirectly", "words": [{"w": "1.3.1", "b": [0.1312, 0.2087, 0.1749, 0.2237]}, {"w": "Data", "b": [0.1961, 0.2087, 0.2412, 0.2237]}, {"w": "Used", "b": [0.2483, 0.2087, 0.2945, 0.2237]}, {"w": "Directly", "b": [0.3016, 0.2087, 0.377, 0.2237]}, {"w": "and", "b": [0.3841, 0.2087, 0.418, 0.2237]}, {"w": "Indirectly", "b": [0.425, 0.2087, 0.5158, 0.2237]}]}, {"id": "b_3", "type": "paragraph", "text": "The data you will work with in your machine learning project can be used to form the examples x directly or indirectly.", "words": [{"w": "The", "b": [0.1306, 0.245, 0.163, 0.2599]}, {"w": "data", "b": [0.1708, 0.245, 0.2074, 0.2599]}, {"w": "you", "b": [0.2153, 0.245, 0.2446, 0.2599]}, {"w": "will", "b": [0.2525, 0.245, 0.2817, 0.2599]}, {"w": "work", "b": [0.2896, 0.245, 0.3294, 0.2599]}, {"w": "with", "b": [0.3372, 0.245, 0.3739, 0.2599]}, {"w": "in", "b": [0.3817, 0.245, 0.3974, 0.2599]}, {"w": "your", "b": [0.4052, 0.245, 0.4419, 0.2599]}, {"w": "machine", "b": [0.4498, 0.245, 0.5172, 0.2599]}, {"w": "learning", "b": [0.5251, 0.245, 0.5911, 0.2599]}, {"w": "project", "b": [0.5989, 0.245, 0.6565, 0.2599]}, {"w": "can", "b": [0.6643, 0.245, 0.6926, 0.2599]}, {"w": "be", "b": [0.7005, 0.245, 0.7198, 0.2599]}, {"w": "used", "b": [0.7277, 0.245, 0.7644, 0.2599]}, {"w": "to", "b": [0.7722, 0.245, 0.789, 0.2599]}, {"w": "form", "b": [0.7968, 0.245, 0.835, 0.2599]}, {"w": "the", "b": [0.8429, 0.245, 0.8691, 0.2599]}, {"w": "examples", "b": [0.1312, 0.2629, 0.2047, 0.2779]}, {"w": "x", "b": [0.2108, 0.2632, 0.222, 0.2782]}, {"w": "directly", "b": [0.2282, 0.2632, 0.2992, 0.2782]}, {"w": "or", "b": [0.3053, 0.2629, 0.3218, 0.2779]}, {"w": "indirectly.", "b": [0.3279, 0.2629, 0.4216, 0.2782]}]}, {"id": "b_4", "type": "paragraph", "text": "Imagine that we build a named entity recognition system. The input of the model is a sequence of words; the output is the sequence of labels3 of the same length as the input. To make the data readable by a machine learning algorithm, we have to transform each natural language word into a machine-readable array of attributes, which we call a feature vector.4 Some features in the feature vector may contain the information that distinguishes that specific word from other words in the dictionary. Other features can contain additional attributes of the word in that specific sequence, such as its shape (lowercase, uppercase, capitalized, and so on). Or it can be binary attributes indicating whether this word is the first word of some human name or the last word of the name of some location or organization. To create these latter binary features, we may decide to use some dictionaries, lookup tables, gazetteers, or other machine learning models making predictions about words.", "words": [{"w": "Imagine", "b": [0.1312, 0.2898, 0.1966, 0.3048]}, {"w": "that", "b": [0.2043, 0.2898, 0.2388, 0.3048]}, {"w": "we", "b": [0.2466, 0.2898, 0.268, 0.3048]}, {"w": "build", "b": [0.2758, 0.2898, 0.3176, 0.3048]}, {"w": "a", "b": [0.3254, 0.2898, 0.3348, 0.3048]}, {"w": "named", "b": [0.3425, 0.2898, 0.3969, 0.3048]}, {"w": "entity", "b": [0.4046, 0.2898, 0.4523, 0.3048]}, {"w": "recognition", "b": [0.46, 0.2898, 0.551, 0.3048]}, {"w": "system.", "b": [0.5588, 0.2898, 0.6202, 0.3048]}, {"w": "The", "b": [0.6332, 0.2898, 0.6656, 0.3048]}, {"w": "input", "b": [0.6733, 0.2898, 0.7173, 0.3048]}, {"w": "of", "b": [0.725, 0.2898, 0.7402, 0.3048]}, {"w": "the", "b": [0.7479, 0.2898, 0.7741, 0.3048]}, {"w": "model", "b": [0.7818, 0.2898, 0.8315, 0.3048]}, {"w": "is", "b": [0.8392, 0.2898, 0.8519, 0.3048]}, {"w": "a", "b": [0.8597, 0.2898, 0.8691, 0.3048]}, {"w": "sequence", "b": [0.1312, 0.3078, 0.203, 0.3227]}, {"w": "of", "b": [0.2101, 0.3078, 0.2253, 0.3227]}, {"w": "words;", "b": [0.2323, 0.3078, 0.2853, 0.3227]}, {"w": "the", "b": [0.2929, 0.3078, 0.319, 0.3227]}, {"w": "output", "b": [0.3261, 0.3078, 0.3815, 0.3227]}, {"w": "is", "b": [0.3886, 0.3078, 0.4013, 0.3227]}, {"w": "the", "b": [0.4083, 0.3078, 0.4345, 0.3227]}, {"w": "sequence", "b": [0.4416, 0.3078, 0.5134, 0.3227]}, {"w": "of", "b": [0.5204, 0.3078, 0.5356, 0.3227]}, {"w": "labels3", "b": [0.5427, 0.3062, 0.5964, 0.3227]}, {"w": "of", "b": [0.6044, 0.3078, 0.6196, 0.3227]}, {"w": "the", "b": [0.6266, 0.3078, 0.6528, 0.3227]}, {"w": "same", "b": [0.6599, 0.3078, 0.7008, 0.3227]}, {"w": "length", "b": [0.7078, 0.3078, 0.7591, 0.3227]}, {"w": "as", "b": [0.7662, 0.3078, 0.783, 0.3227]}, {"w": "the", "b": [0.7901, 0.3078, 0.8162, 0.3227]}, {"w": "input.", "b": [0.8233, 0.3078, 0.8725, 0.3227]}, {"w": "To", "b": [0.1306, 0.3257, 0.152, 0.3407]}, {"w": "make", "b": [0.1594, 0.3257, 0.2022, 0.3407]}, {"w": "the", "b": [0.2096, 0.3257, 0.2358, 0.3407]}, {"w": "data", "b": [0.2431, 0.3257, 0.2797, 0.3407]}, {"w": "readable", "b": [0.287, 0.3257, 0.3561, 0.3407]}, {"w": "by", "b": [0.3635, 0.3257, 0.3834, 0.3407]}, {"w": "a", "b": [0.3907, 0.3257, 0.4001, 0.3407]}, {"w": "machine", "b": [0.4075, 0.3257, 0.4749, 0.3407]}, {"w": "learning", "b": [0.4823, 0.3257, 0.5482, 0.3407]}, {"w": "algorithm,", "b": [0.5556, 0.3257, 0.6404, 0.3407]}, {"w": "we", "b": [0.648, 0.3257, 0.6694, 0.3407]}, {"w": "have", "b": [0.6768, 0.3257, 0.7139, 0.3407]}, {"w": "to", "b": [0.7213, 0.3257, 0.738, 0.3407]}, {"w": "transform", "b": [0.7454, 0.3257, 0.8256, 0.3407]}, {"w": "each", "b": [0.8329, 0.3257, 0.869, 0.3407]}, {"w": "natural", "b": [0.1312, 0.3437, 0.1903, 0.3586]}, {"w": "language", "b": [0.1965, 0.3437, 0.2679, 0.3586]}, {"w": "word", "b": [0.2741, 0.3437, 0.314, 0.3586]}, {"w": "into", "b": [0.3202, 0.3437, 0.3518, 0.3586]}, {"w": "a", "b": [0.358, 0.3437, 0.3673, 0.3586]}, {"w": "machine-readable", "b": [0.3735, 0.3437, 0.5149, 0.3586]}, {"w": "array", "b": [0.5211, 0.3437, 0.5636, 0.3586]}, {"w": "of", "b": [0.5698, 0.3437, 0.5848, 0.3586]}, {"w": "attributes,", "b": [0.591, 0.3437, 0.6761, 0.3586]}, {"w": "which", "b": [0.6822, 0.3437, 0.7294, 0.3586]}, {"w": "we", "b": [0.7355, 0.3437, 0.7568, 0.3586]}, {"w": "call", "b": [0.7629, 0.3437, 0.7909, 0.3586]}, {"w": "a", "b": [0.7971, 0.3437, 0.8064, 0.3586]}, {"w": "feature", "b": [0.8126, 0.3437, 0.8691, 0.3586]}, {"w": "vector.4", "b": [0.1308, 0.36, 0.1923, 0.3766]}, {"w": "Some", "b": [0.2015, 0.3616, 0.2444, 0.3766]}, {"w": "features", "b": [0.2506, 0.3616, 0.3136, 0.3766]}, {"w": "in", "b": [0.3198, 0.3616, 0.3351, 0.3766]}, {"w": "the", "b": [0.3413, 0.3616, 0.3669, 0.3766]}, {"w": "feature", "b": [0.3731, 0.3616, 0.4288, 0.3766]}, {"w": "vector", "b": [0.435, 0.3616, 0.4841, 0.3766]}, {"w": "may", "b": [0.4903, 0.3616, 0.524, 0.3766]}, {"w": "contain", "b": [0.5302, 0.3616, 0.589, 0.3766]}, {"w": "the", "b": [0.5951, 0.3616, 0.6207, 0.3766]}, {"w": "information", "b": [0.6269, 0.3616, 0.7205, 0.3766]}, {"w": "that", "b": [0.7266, 0.3616, 0.7604, 0.3766]}, {"w": "distinguishes", "b": [0.7665, 0.3616, 0.8691, 0.3766]}, {"w": "that", "b": [0.1312, 0.3796, 0.1648, 0.3945]}, {"w": "specific", "b": [0.1709, 0.3796, 0.2284, 0.3945]}, {"w": "word", "b": [0.2346, 0.3796, 0.2737, 0.3945]}, {"w": "from", "b": [0.2799, 0.3796, 0.317, 0.3945]}, {"w": "other", "b": [0.3231, 0.3796, 0.3648, 0.3945]}, {"w": "words", "b": [0.371, 0.3796, 0.4173, 0.3945]}, {"w": "in", "b": [0.4235, 0.3796, 0.4387, 0.3945]}, {"w": "the", "b": [0.4449, 0.3796, 0.4703, 0.3945]}, {"w": "dictionary.", "b": [0.4764, 0.3796, 0.5608, 0.3945]}, {"w": "Other", "b": [0.569, 0.3796, 0.6158, 0.3945]}, {"w": "features", "b": [0.6219, 0.3796, 0.6846, 0.3945]}, {"w": "can", "b": [0.6907, 0.3796, 0.7182, 0.3945]}, {"w": "contain", "b": [0.7243, 0.3796, 0.7827, 0.3945]}, {"w": "additional", "b": [0.7888, 0.3796, 0.8691, 0.3945]}, {"w": "attributes", "b": [0.1312, 0.3975, 0.2119, 0.4125]}, {"w": "of", "b": [0.2193, 0.3975, 0.2345, 0.4125]}, {"w": "the", "b": [0.2419, 0.3975, 0.268, 0.4125]}, {"w": "word", "b": [0.2754, 0.3975, 0.3157, 0.4125]}, {"w": "in", "b": [0.3231, 0.3975, 0.3388, 0.4125]}, {"w": "that", "b": [0.3462, 0.3975, 0.3807, 0.4125]}, {"w": "specific", "b": [0.388, 0.3975, 0.4473, 0.4125]}, {"w": "sequence,", "b": [0.4546, 0.3975, 0.5316, 0.4125]}, {"w": "such", "b": [0.5393, 0.3975, 0.5756, 0.4125]}, {"w": "as", "b": [0.5829, 0.3975, 0.5998, 0.4125]}, {"w": "its", "b": [0.6071, 0.3975, 0.6271, 0.4125]}, {"w": "shape", "b": [0.6345, 0.3975, 0.6812, 0.4125]}, {"w": "(lowercase,", "b": [0.6885, 0.3975, 0.7776, 0.4125]}, {"w": "uppercase,", "b": [0.7853, 0.3975, 0.8718, 0.4125]}, {"w": "capitalized,", "b": [0.1312, 0.4155, 0.2241, 0.4304]}, {"w": "and", "b": [0.2302, 0.4155, 0.2605, 0.4304]}, {"w": "so", "b": [0.2666, 0.4155, 0.2834, 0.4304]}, {"w": "on).", "b": [0.2895, 0.4155, 0.3219, 0.4304]}, {"w": "Or", "b": [0.3301, 0.4155, 0.352, 0.4304]}, {"w": "it", "b": [0.3582, 0.4155, 0.3707, 0.4304]}, {"w": "can", "b": [0.3768, 0.4155, 0.405, 0.4304]}, {"w": "be", "b": [0.4111, 0.4155, 0.4304, 0.4304]}, {"w": "binary", "b": [0.4366, 0.4155, 0.4893, 0.4304]}, {"w": "attributes", "b": [0.4954, 0.4155, 0.5759, 0.4304]}, {"w": "indicating", "b": [0.582, 0.4155, 0.6634, 0.4304]}, {"w": "whether", "b": [0.6695, 0.4155, 0.7353, 0.4304]}, {"w": "this", "b": [0.7414, 0.4155, 0.7718, 0.4304]}, {"w": "word", "b": [0.7779, 0.4155, 0.8181, 0.4304]}, {"w": "is", "b": [0.8243, 0.4155, 0.8369, 0.4304]}, {"w": "the", "b": [0.8431, 0.4155, 0.8691, 0.4304]}, {"w": "first", "b": [0.1312, 0.4334, 0.1625, 0.4484]}, {"w": "word", "b": [0.1682, 0.4334, 0.2069, 0.4484]}, {"w": "of", "b": [0.2126, 0.4334, 0.2271, 0.4484]}, {"w": "some", "b": [0.2328, 0.4334, 0.2721, 0.4484]}, {"w": "human", "b": [0.2777, 0.4334, 0.3315, 0.4484]}, {"w": "name", "b": [0.3371, 0.4334, 0.3793, 0.4484]}, {"w": "or", "b": [0.385, 0.4334, 0.4011, 0.4484]}, {"w": "the", "b": [0.4068, 0.4334, 0.4319, 0.4484]}, {"w": "last", "b": [0.4375, 0.4334, 0.4658, 0.4484]}, {"w": "word", "b": [0.4714, 0.4334, 0.5101, 0.4484]}, {"w": "of", "b": [0.5158, 0.4334, 0.5304, 0.4484]}, {"w": "the", "b": [0.536, 0.4334, 0.5611, 0.4484]}, {"w": "name", "b": [0.5668, 0.4334, 0.609, 0.4484]}, {"w": "of", "b": [0.6146, 0.4334, 0.6292, 0.4484]}, {"w": "some", "b": [0.6349, 0.4334, 0.6742, 0.4484]}, {"w": "location", "b": [0.6798, 0.4334, 0.7426, 0.4484]}, {"w": "or", "b": [0.7483, 0.4334, 0.7644, 0.4484]}, {"w": "organization.", "b": [0.77, 0.4334, 0.8726, 0.4484]}, {"w": "To", "b": [0.1306, 0.4514, 0.1512, 0.4663]}, {"w": "create", "b": [0.1573, 0.4514, 0.2048, 0.4663]}, {"w": "these", "b": [0.2109, 0.4514, 0.2514, 0.4663]}, {"w": "latter", "b": [0.2575, 0.4514, 0.3009, 0.4663]}, {"w": "binary", "b": [0.307, 0.4514, 0.358, 0.4663]}, {"w": "features,", "b": [0.3642, 0.4514, 0.4314, 0.4663]}, {"w": "we", "b": [0.4375, 0.4514, 0.4582, 0.4663]}, {"w": "may", "b": [0.4643, 0.4514, 0.4975, 0.4663]}, {"w": "decide", "b": [0.5037, 0.4514, 0.5531, 0.4663]}, {"w": "to", "b": [0.5593, 0.4514, 0.5754, 0.4663]}, {"w": "use", "b": [0.5815, 0.4514, 0.6068, 0.4663]}, {"w": "some", "b": [0.613, 0.4514, 0.6524, 0.4663]}, {"w": "dictionaries,", "b": [0.6585, 0.4514, 0.7545, 0.4663]}, {"w": "lookup", "b": [0.7606, 0.4514, 0.814, 0.4663]}, {"w": "tables,", "b": [0.8202, 0.4514, 0.8717, 0.4663]}, {"w": "gazetteers,", "b": [0.1312, 0.4693, 0.2165, 0.4843]}, {"w": "or", "b": [0.2227, 0.4693, 0.2391, 0.4843]}, {"w": "other", "b": [0.2453, 0.4693, 0.2874, 0.4843]}, {"w": "machine", "b": [0.2935, 0.4693, 0.3597, 0.4843]}, {"w": "learning", "b": [0.3658, 0.4693, 0.4305, 0.4843]}, {"w": "models", "b": [0.4366, 0.4693, 0.4926, 0.4843]}, {"w": "making", "b": [0.4988, 0.4693, 0.5577, 0.4843]}, {"w": "predictions", "b": [0.5638, 0.4693, 0.6522, 0.4843]}, {"w": "about", "b": [0.6584, 0.4693, 0.705, 0.4843]}, {"w": "words.", "b": [0.7112, 0.4693, 0.7631, 0.4843]}]}, {"id": "b_5", "type": "paragraph", "text": "You could already have noticed that the collection of word sequences is the data used to form training examples directly, while the data contained in dictionaries, lookup tables, and gazetteers is used indirectly: we can use it to extend feature vectors with additional features, but we cannot use it to create new feature vectors.", "words": [{"w": "You", "b": [0.1305, 0.4962, 0.163, 0.5112]}, {"w": "could", "b": [0.1699, 0.4962, 0.2138, 0.5112]}, {"w": "already", "b": [0.2207, 0.4962, 0.2809, 0.5112]}, {"w": "have", "b": [0.2878, 0.4962, 0.325, 0.5112]}, {"w": "noticed", "b": [0.3319, 0.4962, 0.3915, 0.5112]}, {"w": "that", "b": [0.3984, 0.4962, 0.4329, 0.5112]}, {"w": "the", "b": [0.4398, 0.4962, 0.466, 0.5112]}, {"w": "collection", "b": [0.4729, 0.4962, 0.5503, 0.5112]}, {"w": "of", "b": [0.5572, 0.4962, 0.5724, 0.5112]}, {"w": "word", "b": [0.5793, 0.4962, 0.6196, 0.5112]}, {"w": "sequences", "b": [0.6265, 0.4962, 0.7057, 0.5112]}, {"w": "is", "b": [0.7126, 0.4962, 0.7253, 0.5112]}, {"w": "the", "b": [0.7322, 0.4962, 0.7584, 0.5112]}, {"w": "data", "b": [0.7653, 0.4962, 0.8019, 0.5112]}, {"w": "used", "b": [0.8088, 0.4962, 0.8455, 0.5112]}, {"w": "to", "b": [0.8524, 0.4962, 0.8691, 0.5112]}, {"w": "form", "b": [0.1312, 0.5142, 0.1684, 0.5291]}, {"w": "training", "b": [0.1745, 0.5142, 0.2377, 0.5291]}, {"w": "examples", "b": [0.2438, 0.5142, 0.3166, 0.5291]}, {"w": "directly,", "b": [0.3228, 0.5142, 0.3869, 0.5291]}, {"w": "while", "b": [0.393, 0.5142, 0.4347, 0.5291]}, {"w": "the", "b": [0.4409, 0.5142, 0.4663, 0.5291]}, {"w": "data", "b": [0.4724, 0.5142, 0.508, 0.5291]}, {"w": "contained", "b": [0.5142, 0.5142, 0.591, 0.5291]}, {"w": "in", "b": [0.5971, 0.5142, 0.6124, 0.5291]}, {"w": "dictionaries,", "b": [0.6185, 0.5142, 0.7153, 0.5291]}, {"w": "lookup", "b": [0.7214, 0.5142, 0.7754, 0.5291]}, {"w": "tables,", "b": [0.7815, 0.5142, 0.8335, 0.5291]}, {"w": "and", "b": [0.8396, 0.5142, 0.8691, 0.5291]}, {"w": "gazetteers", "b": [0.1312, 0.5321, 0.2099, 0.5471]}, {"w": "is", "b": [0.216, 0.5321, 0.2282, 0.5471]}, {"w": "used", "b": [0.2344, 0.5321, 0.2697, 0.5471]}, {"w": "indirectly:", "b": [0.2758, 0.5321, 0.3559, 0.5471]}, {"w": "we", "b": [0.3641, 0.5321, 0.3847, 0.5471]}, {"w": "can", "b": [0.3908, 0.5321, 0.418, 0.5471]}, {"w": "use", "b": [0.4242, 0.5321, 0.4494, 0.5471]}, {"w": "it", "b": [0.4556, 0.5321, 0.4677, 0.5471]}, {"w": "to", "b": [0.4738, 0.5321, 0.4899, 0.5471]}, {"w": "extend", "b": [0.496, 0.5321, 0.5489, 0.5471]}, {"w": "feature", "b": [0.555, 0.5321, 0.6099, 0.5471]}, {"w": "vectors", "b": [0.6161, 0.5321, 0.6716, 0.5471]}, {"w": "with", "b": [0.6777, 0.5321, 0.7129, 0.5471]}, {"w": "additional", "b": [0.7191, 0.5321, 0.7985, 0.5471]}, {"w": "features,", "b": [0.8047, 0.5321, 0.8718, 0.5471]}, {"w": "but", "b": [0.1312, 0.5501, 0.1589, 0.565]}, {"w": "we", "b": [0.1651, 0.5501, 0.1861, 0.565]}, {"w": "cannot", "b": [0.1922, 0.5501, 0.2466, 0.565]}, {"w": "use", "b": [0.2527, 0.5501, 0.2785, 0.565]}, {"w": "it", "b": [0.2846, 0.5501, 0.2969, 0.565]}, {"w": "to", "b": [0.3031, 0.5501, 0.3195, 0.565]}, {"w": "create", "b": [0.3257, 0.5501, 0.3739, 0.565]}, {"w": "new", "b": [0.3801, 0.5501, 0.4118, 0.565]}, {"w": "feature", "b": [0.418, 0.5501, 0.4739, 0.565]}, {"w": "vectors.", "b": [0.4801, 0.5501, 0.5418, 0.565]}]}, {"id": "b_6", "type": "paragraph", "text": "1.3.2 Raw and Tidy Data", "words": [{"w": "1.3.2", "b": [0.1312, 0.5982, 0.1749, 0.6131]}, {"w": "Raw", "b": [0.1961, 0.5982, 0.2371, 0.6131]}, {"w": "and", "b": [0.2441, 0.5982, 0.278, 0.6131]}, {"w": "Tidy", "b": [0.2851, 0.5982, 0.3288, 0.6131]}, {"w": "Data", "b": [0.3358, 0.5982, 0.381, 0.6131]}]}, {"id": "b_7", "type": "paragraph", "text": "As we just discussed, directly used data is a collection of entities that constitute the basis of a dataset. Each entity in that collection can be transformed into a training example. Raw data is a collection of entities in their natural form; they cannot always be directly employable for machine learning. For instance, a Word document or a JPEG file are pieces of raw data; they cannot be directly used by a machine learning algorithm.5", "words": [{"w": "As", "b": [0.1305, 0.6345, 0.1521, 0.6494]}, {"w": "we", "b": [0.1582, 0.6345, 0.1796, 0.6494]}, {"w": "just", "b": [0.1858, 0.6345, 0.2168, 0.6494]}, {"w": "discussed,", "b": [0.2229, 0.6345, 0.3038, 0.6494]}, {"w": "directly", "b": [0.3099, 0.6345, 0.3722, 0.6494]}, {"w": "used", "b": [0.3784, 0.6345, 0.4151, 0.6494]}, {"w": "data", "b": [0.4212, 0.6345, 0.4578, 0.6494]}, {"w": "is", "b": [0.4639, 0.6345, 0.4766, 0.6494]}, {"w": "a", "b": [0.4827, 0.6345, 0.4921, 0.6494]}, {"w": "collection", "b": [0.4983, 0.6345, 0.5757, 0.6494]}, {"w": "of", "b": [0.5818, 0.6345, 0.597, 0.6494]}, {"w": "entities", "b": [0.6031, 0.6345, 0.6623, 0.6494]}, {"w": "that", "b": [0.6685, 0.6345, 0.703, 0.6494]}, {"w": "constitute", "b": [0.7091, 0.6345, 0.7908, 0.6494]}, {"w": "the", "b": [0.7969, 0.6345, 0.8231, 0.6494]}, {"w": "basis", "b": [0.8292, 0.6345, 0.8692, 0.6494]}, {"w": "of", "b": [0.1312, 0.6524, 0.1464, 0.6674]}, {"w": "a", "b": [0.1539, 0.6524, 0.1634, 0.6674]}, {"w": "dataset.", "b": [0.1709, 0.6524, 0.2359, 0.6674]}, {"w": "Each", "b": [0.2483, 0.6524, 0.2888, 0.6674]}, {"w": "entity", "b": [0.2964, 0.6524, 0.344, 0.6674]}, {"w": "in", "b": [0.3515, 0.6524, 0.3672, 0.6674]}, {"w": "that", "b": [0.3748, 0.6524, 0.4093, 0.6674]}, {"w": "collection", "b": [0.4168, 0.6524, 0.4943, 0.6674]}, {"w": "can", "b": [0.5018, 0.6524, 0.53, 0.6674]}, {"w": "be", "b": [0.5376, 0.6524, 0.557, 0.6674]}, {"w": "transformed", "b": [0.5645, 0.6524, 0.6636, 0.6674]}, {"w": "into", "b": [0.6711, 0.6524, 0.703, 0.6674]}, {"w": "a", "b": [0.7106, 0.6524, 0.72, 0.6674]}, {"w": "training", "b": [0.7275, 0.6524, 0.7924, 0.6674]}, {"w": "example.", "b": [0.8, 0.6524, 0.8727, 0.6674]}, {"w": "Raw", "b": [0.1312, 0.6707, 0.1722, 0.6856]}, {"w": "data", "b": [0.1796, 0.6707, 0.2203, 0.6856]}, {"w": "is", "b": [0.2271, 0.6704, 0.2398, 0.6853]}, {"w": "a", "b": [0.2462, 0.6704, 0.2557, 0.6853]}, {"w": "collection", "b": [0.2621, 0.6704, 0.3395, 0.6853]}, {"w": "of", "b": [0.346, 0.6704, 0.3611, 0.6853]}, {"w": "entities", "b": [0.3676, 0.6704, 0.4268, 0.6853]}, {"w": "in", "b": [0.4333, 0.6704, 0.449, 0.6853]}, {"w": "their", "b": [0.4554, 0.6704, 0.4942, 0.6853]}, {"w": "natural", "b": [0.5006, 0.6704, 0.5603, 0.6853]}, {"w": "form;", "b": [0.5667, 0.6704, 0.6102, 0.6853]}, {"w": "they", "b": [0.6168, 0.6704, 0.6529, 0.6853]}, {"w": "cannot", "b": [0.6593, 0.6704, 0.7148, 0.6853]}, {"w": "always", "b": [0.7212, 0.6704, 0.7752, 0.6853]}, {"w": "be", "b": [0.7817, 0.6704, 0.801, 0.6853]}, {"w": "directly", "b": [0.8075, 0.6704, 0.8698, 0.6853]}, {"w": "employable", "b": [0.1312, 0.6883, 0.2211, 0.7033]}, {"w": "for", "b": [0.2273, 0.6883, 0.2495, 0.7033]}, {"w": "machine", "b": [0.2556, 0.6883, 0.3219, 0.7033]}, {"w": "learning.", "b": [0.328, 0.6883, 0.398, 0.7033]}, {"w": "For", "b": [0.4062, 0.6883, 0.4332, 0.7033]}, {"w": "instance,", "b": [0.4394, 0.6883, 0.5104, 0.7033]}, {"w": "a", "b": [0.5166, 0.6883, 0.5258, 0.7033]}, {"w": "Word", "b": [0.532, 0.6883, 0.5762, 0.7033]}, {"w": "document", "b": [0.5824, 0.6883, 0.6615, 0.7033]}, {"w": "or", "b": [0.6676, 0.6883, 0.6841, 0.7033]}, {"w": "a", "b": [0.6903, 0.6883, 0.6995, 0.7033]}, {"w": "JPEG", "b": [0.7057, 0.6883, 0.7549, 0.7033]}, {"w": "file", "b": [0.761, 0.6883, 0.7847, 0.7033]}, {"w": "are", "b": [0.7908, 0.6883, 0.8156, 0.7033]}, {"w": "pieces", "b": [0.8217, 0.6883, 0.8691, 0.7033]}, {"w": "of", "b": [0.1312, 0.7063, 0.1461, 0.7212]}, {"w": "raw", "b": [0.1522, 0.7063, 0.1815, 0.7212]}, {"w": "data;", "b": [0.1877, 0.7063, 0.2287, 0.7212]}, {"w": "they", "b": [0.2348, 0.7063, 0.2702, 0.7212]}, {"w": "cannot", "b": [0.2764, 0.7063, 0.3307, 0.7212]}, {"w": "be", "b": [0.3369, 0.7063, 0.3558, 0.7212]}, {"w": "directly", "b": [0.362, 0.7063, 0.4231, 0.7212]}, {"w": "used", "b": [0.4292, 0.7063, 0.4652, 0.7212]}, {"w": "by", "b": [0.4714, 0.7063, 0.4909, 0.7212]}, {"w": "a", "b": [0.497, 0.7063, 0.5062, 0.7212]}, {"w": "machine", "b": [0.5124, 0.7063, 0.5785, 0.7212]}, {"w": "learning", "b": [0.5847, 0.7063, 0.6493, 0.7212]}, {"w": "algorithm.5", "b": [0.6555, 0.7046, 0.7457, 0.7212]}]}, {"id": "b_8", "type": "paragraph", "text": "3Labels can be, for example, values from the set {“Location”, “Organization”, “Person”, “Other”}. 4The terms “attribute” and “feature” are often used interchangeably. In this book, I use the term “attribute” to describe a specific property of an example, while the term “feature” refers to value x(j) at position j in the feature vector x used by a machine learning algorithm.", "words": [{"w": "3Labels", "b": [0.1518, 0.7332, 0.2038, 0.7471]}, {"w": "can", "b": [0.209, 0.7351, 0.2325, 0.7471]}, {"w": "be,", "b": [0.2377, 0.7351, 0.2582, 0.7471]}, {"w": "for", "b": [0.2634, 0.7351, 0.2822, 0.7471]}, {"w": "example,", "b": [0.2874, 0.7351, 0.3479, 0.7471]}, {"w": "values", "b": [0.3531, 0.7351, 0.3946, 0.7471]}, {"w": "from", "b": [0.3998, 0.7351, 0.4316, 0.7471]}, {"w": "the", "b": [0.4369, 0.7351, 0.4586, 0.7471]}, {"w": "set", "b": [0.4639, 0.7351, 0.4831, 0.7471]}, {"w": "{“Location”,", "b": [0.4883, 0.7351, 0.5752, 0.7471]}, {"w": "“Organization”,", "b": [0.5804, 0.7351, 0.6884, 0.7471]}, {"w": "“Person”,", "b": [0.6937, 0.7351, 0.7589, 0.7471]}, {"w": "“Other”}.", "b": [0.7641, 0.7351, 0.8312, 0.7471]}, {"w": "4The", "b": [0.1518, 0.7475, 0.1859, 0.7613]}, {"w": "terms", "b": [0.1898, 0.7494, 0.2275, 0.7613]}, {"w": "“attribute”", "b": [0.2313, 0.7494, 0.3056, 0.7613]}, {"w": "and", "b": [0.3095, 0.7494, 0.3342, 0.7613]}, {"w": "“feature”", "b": [0.3381, 0.7494, 0.3992, 0.7613]}, {"w": "are", "b": [0.4031, 0.7494, 0.4236, 0.7613]}, {"w": "often", "b": [0.4275, 0.7494, 0.4612, 0.7613]}, {"w": "used", "b": [0.4651, 0.7494, 0.495, 0.7613]}, {"w": "interchangeably.", "b": [0.4989, 0.7494, 0.6073, 0.7613]}, {"w": "In", "b": [0.6138, 0.7494, 0.6279, 0.7613]}, {"w": "this", "b": [0.6317, 0.7494, 0.6566, 0.7613]}, {"w": "book,", "b": [0.6605, 0.7494, 0.6976, 0.7613]}, {"w": "I", "b": [0.7018, 0.7494, 0.7073, 0.7613]}, {"w": "use", "b": [0.7112, 0.7494, 0.7326, 0.7613]}, {"w": "the", "b": [0.7365, 0.7494, 0.7578, 0.7613]}, {"w": "term", "b": [0.7617, 0.7494, 0.7933, 0.7613]}, {"w": "“attribute”", "b": [0.7972, 0.7494, 0.8715, 0.7613]}, {"w": "to", "b": [0.1312, 0.7636, 0.1449, 0.7755]}, {"w": "describe", "b": [0.1498, 0.7636, 0.2041, 0.7755]}, {"w": "a", "b": [0.2091, 0.7636, 0.2168, 0.7755]}, {"w": "specific", "b": [0.2217, 0.7636, 0.27, 0.7755]}, {"w": "property", "b": [0.275, 0.7636, 0.3326, 0.7755]}, {"w": "of", "b": [0.3376, 0.7636, 0.35, 0.7755]}, {"w": "an", "b": [0.3549, 0.7636, 0.3711, 0.7755]}, {"w": "example,", "b": [0.3761, 0.7636, 0.4354, 0.7755]}, {"w": "while", "b": [0.4404, 0.7636, 0.4754, 0.7755]}, {"w": "the", "b": [0.4804, 0.7636, 0.5017, 0.7755]}, {"w": "term", "b": [0.5066, 0.7636, 0.5382, 0.7755]}, {"w": "“feature”", "b": [0.5432, 0.7636, 0.6042, 0.7755]}, {"w": "refers", "b": [0.6092, 0.7636, 0.6456, 0.7755]}, {"w": "to", "b": [0.6505, 0.7636, 0.6642, 0.7755]}, {"w": "value", "b": [0.6691, 0.7636, 0.7037, 0.7755]}, {"w": "x(j)", "b": [0.7088, 0.7616, 0.7346, 0.7755]}, {"w": "at", "b": [0.7405, 0.7636, 0.7541, 0.7755]}, {"w": "position", "b": [0.7591, 0.7636, 0.8125, 0.7755]}, {"w": "j", "b": [0.8175, 0.7635, 0.8239, 0.7755]}, {"w": "in", "b": [0.8297, 0.7636, 0.8425, 0.7755]}, {"w": "the", "b": [0.8474, 0.7636, 0.8687, 0.7755]}, {"w": "feature", "b": [0.1312, 0.7778, 0.1787, 0.7897]}, {"w": "vector", "b": [0.1839, 0.7778, 0.2258, 0.7897]}, {"w": "x", "b": [0.231, 0.7777, 0.2406, 0.7897]}, {"w": "used", "b": [0.2458, 0.7778, 0.2764, 0.7897]}, {"w": "by", "b": [0.2816, 0.7778, 0.2981, 0.7897]}, {"w": "a", "b": [0.3034, 0.7778, 0.3112, 0.7897]}, {"w": "machine", "b": [0.3164, 0.7778, 0.3726, 0.7897]}, {"w": "learning", "b": [0.3778, 0.7778, 0.4327, 0.7897]}, {"w": "algorithm.", "b": [0.4379, 0.7778, 0.5085, 0.7897]}]}, {"id": "b_9", "type": "paragraph", "text": "5The term “unstructured data” is often used to designate a data element that contains information whose type was not formally defined. Examples of unstructured data are photos, images, videos, text messages, social media posts, PDFs, text documents, and emails. The term “semi-structured data” refers to data elements whose structure helps deriving types of some information encoded in those data elements. Examples of semi-structured data include log files, comma- and tab-delimited text files, as well as documents in JSON and XML formats.", "words": [{"w": "5The", "b": [0.1518, 0.7901, 0.186, 0.8039]}, {"w": "term", "b": [0.1912, 0.792, 0.2228, 0.8039]}, {"w": "“unstructured", "b": [0.228, 0.792, 0.3218, 0.8039]}, {"w": "data”", "b": [0.327, 0.792, 0.3642, 0.8039]}, {"w": "is", "b": [0.3694, 0.792, 0.3798, 0.8039]}, {"w": "often", "b": [0.385, 0.792, 0.4188, 0.8039]}, {"w": "used", "b": [0.424, 0.792, 0.454, 0.8039]}, {"w": "to", "b": [0.4592, 0.792, 0.4729, 0.8039]}, {"w": "designate", "b": [0.4781, 0.792, 0.5406, 0.8039]}, {"w": "a", "b": [0.5459, 0.792, 0.5536, 0.8039]}, {"w": "data", "b": [0.5588, 0.792, 0.5887, 0.8039]}, {"w": "element", "b": [0.5939, 0.792, 0.6456, 0.8039]}, {"w": "that", "b": [0.6509, 0.792, 0.6791, 0.8039]}, {"w": "contains", "b": [0.6843, 0.792, 0.7395, 0.8039]}, {"w": "information", "b": [0.7447, 0.792, 0.823, 0.8039]}, {"w": "whose", "b": [0.8282, 0.792, 0.8685, 0.8039]}, {"w": "type", "b": [0.1312, 0.8061, 0.1619, 0.8182]}, {"w": "was", "b": [0.1675, 0.8061, 0.1929, 0.8182]}, {"w": "not", "b": [0.1985, 0.8061, 0.2216, 0.8182]}, {"w": "formally", "b": [0.2272, 0.8061, 0.2849, 0.8182]}, {"w": "defined.", "b": [0.2905, 0.8061, 0.3447, 0.8182]}, {"w": "Examples", "b": [0.3528, 0.8061, 0.4202, 0.8182]}, {"w": "of", "b": [0.4257, 0.8061, 0.4386, 0.8182]}, {"w": "unstructured", "b": [0.4442, 0.8061, 0.5341, 0.8182]}, {"w": "data", "b": [0.5397, 0.8061, 0.5707, 0.8182]}, {"w": "are", "b": [0.5763, 0.8061, 0.5977, 0.8182]}, {"w": "photos,", "b": [0.6032, 0.8061, 0.654, 0.8182]}, {"w": "images,", "b": [0.6597, 0.8061, 0.7113, 0.8182]}, {"w": "videos,", "b": [0.7169, 0.8061, 0.7646, 0.8182]}, {"w": "text", "b": [0.7702, 0.8061, 0.7982, 0.8182]}, {"w": "messages,", "b": [0.8038, 0.8061, 0.8707, 0.8182]}, {"w": "social", "b": [0.1312, 0.8203, 0.17, 0.8324]}, {"w": "media", "b": [0.1763, 0.8203, 0.2181, 0.8324]}, {"w": "posts,", "b": [0.2244, 0.8203, 0.265, 0.8324]}, {"w": "PDFs,", "b": [0.2717, 0.8203, 0.3146, 0.8324]}, {"w": "text", "b": [0.3213, 0.8203, 0.3493, 0.8324]}, {"w": "documents,", "b": [0.3556, 0.8203, 0.4348, 0.8324]}, {"w": "and", "b": [0.4414, 0.8203, 0.4672, 0.8324]}, {"w": "emails.", "b": [0.4735, 0.8203, 0.5216, 0.8324]}, {"w": "The", "b": [0.532, 0.8203, 0.5595, 0.8324]}, {"w": "term", "b": [0.5659, 0.8203, 0.5987, 0.8324]}, {"w": "“semi-structured", "b": [0.6051, 0.8203, 0.7212, 0.8324]}, {"w": "data”", "b": [0.7276, 0.8203, 0.7663, 0.8324]}, {"w": "refers", "b": [0.7726, 0.8203, 0.8105, 0.8324]}, {"w": "to", "b": [0.8169, 0.8203, 0.8311, 0.8324]}, {"w": "data", "b": [0.8374, 0.8203, 0.8685, 0.8324]}, {"w": "elements", "b": [0.1312, 0.8347, 0.1889, 0.8465]}, {"w": "whose", "b": [0.194, 0.8347, 0.2341, 0.8465]}, {"w": "structure", "b": [0.2392, 0.8347, 0.2999, 0.8465]}, {"w": "helps", "b": [0.3049, 0.8347, 0.3391, 0.8465]}, {"w": "deriving", "b": [0.3441, 0.8347, 0.3984, 0.8465]}, {"w": "types", "b": [0.4034, 0.8347, 0.4389, 0.8465]}, {"w": "of", "b": [0.4439, 0.8347, 0.4563, 0.8465]}, {"w": "some", "b": [0.4613, 0.8347, 0.4947, 0.8465]}, {"w": "information", "b": [0.4997, 0.8347, 0.5778, 0.8465]}, {"w": "encoded", "b": [0.5829, 0.8347, 0.6371, 0.8465]}, {"w": "in", "b": [0.6421, 0.8347, 0.6549, 0.8465]}, {"w": "those", "b": [0.6599, 0.8347, 0.695, 0.8465]}, {"w": "data", "b": [0.7, 0.8347, 0.7299, 0.8465]}, {"w": "elements.", "b": [0.7349, 0.8347, 0.7969, 0.8465]}, {"w": "Examples", "b": [0.8038, 0.8347, 0.8685, 0.8465]}, {"w": "of", "b": [0.1312, 0.8488, 0.1438, 0.8608]}, {"w": "semi-structured", "b": [0.149, 0.8488, 0.2546, 0.8608]}, {"w": "data", "b": [0.2598, 0.8488, 0.29, 0.8608]}, {"w": "include", "b": [0.2952, 0.8488, 0.3436, 0.8608]}, {"w": "log", "b": [0.3488, 0.8488, 0.3687, 0.8608]}, {"w": "files,", "b": [0.3739, 0.8488, 0.4042, 0.8608]}, {"w": "comma-", "b": [0.4094, 0.8488, 0.463, 0.8608]}, {"w": "and", "b": [0.4682, 0.8488, 0.4932, 0.8608]}, {"w": "tab-delimited", "b": [0.4984, 0.8488, 0.5891, 0.8608]}, {"w": "text", "b": [0.5943, 0.8488, 0.6216, 0.8608]}, {"w": "files,", "b": [0.6268, 0.8488, 0.6571, 0.8608]}, {"w": "as", "b": [0.6623, 0.8488, 0.6762, 0.8608]}, {"w": "well", "b": [0.6814, 0.8488, 0.7078, 0.8608]}, {"w": "as", "b": [0.713, 0.8488, 0.7269, 0.8608]}, {"w": "documents", "b": [0.7321, 0.8488, 0.8048, 0.8608]}, {"w": "in", "b": [0.8099, 0.8488, 0.8229, 0.8608]}, {"w": "JSON", "b": [0.8281, 0.8488, 0.8685, 0.8608]}, {"w": "and", "b": [0.1312, 0.863, 0.1565, 0.875]}, {"w": "XML", "b": [0.1617, 0.863, 0.1976, 0.875]}, {"w": "formats.", "b": [0.2028, 0.863, 0.2591, 0.875]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "9", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 18, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "To be employable in machine learning, a necessary (but not sufficient) condition for the data is to be tidy. Tidy data can be seen as a spreadsheet, in which each row represents one example, and columns represent various attributes of an example, as shown in Figure 3. Sometimes raw data can be tidy, e.g., provided to you in the form of a spreadsheet. However, in practice, to obtain tidy data from raw data, data analysts often resort to the procedure called feature engineering, which is applied to the direct and, optionally, indirect data with the goal to transform each raw example into a feature vector x. Chapter 4 is devoted entirely to feature engineering.", "words": [{"w": "To", "b": [0.1306, 0.0881, 0.1512, 0.1031]}, {"w": "be", "b": [0.1573, 0.0881, 0.176, 0.1031]}, {"w": "employable", "b": [0.1821, 0.0881, 0.2702, 0.1031]}, {"w": "in", "b": [0.2764, 0.0881, 0.2915, 0.1031]}, {"w": "machine", "b": [0.2976, 0.0881, 0.3626, 0.1031]}, {"w": "learning,", "b": [0.3687, 0.0881, 0.4372, 0.1031]}, {"w": "a", "b": [0.4434, 0.0881, 0.4524, 0.1031]}, {"w": "necessary", "b": [0.4586, 0.0881, 0.5329, 0.1031]}, {"w": "(but", "b": [0.539, 0.0881, 0.5733, 0.1031]}, {"w": "not", "b": [0.5794, 0.0881, 0.6056, 0.1031]}, {"w": "sufficient)", "b": [0.6117, 0.0881, 0.6889, 0.1031]}, {"w": "condition", "b": [0.695, 0.0881, 0.7685, 0.1031]}, {"w": "for", "b": [0.7747, 0.0881, 0.7964, 0.1031]}, {"w": "the", "b": [0.8025, 0.0881, 0.8277, 0.1031]}, {"w": "data", "b": [0.8339, 0.0881, 0.8691, 0.1031]}, {"w": "is", "b": [0.1312, 0.106, 0.1439, 0.121]}, {"w": "to", "b": [0.1506, 0.106, 0.1673, 0.121]}, {"w": "be", "b": [0.1741, 0.106, 0.1934, 0.121]}, {"w": "tidy.", "b": [0.2001, 0.106, 0.2368, 0.121]}, {"w": "Tidy", "b": [0.2467, 0.1064, 0.2903, 0.1213]}, {"w": "data", "b": [0.298, 0.1064, 0.3387, 0.1213]}, {"w": "can", "b": [0.3458, 0.106, 0.3741, 0.121]}, {"w": "be", "b": [0.3808, 0.106, 0.4001, 0.121]}, {"w": "seen", "b": [0.4069, 0.106, 0.4415, 0.121]}, {"w": "as", "b": [0.4482, 0.106, 0.4651, 0.121]}, {"w": "a", "b": [0.4718, 0.106, 0.4812, 0.121]}, {"w": "spreadsheet,", "b": [0.4879, 0.106, 0.5886, 0.121]}, {"w": "in", "b": [0.5955, 0.106, 0.6112, 0.121]}, {"w": "which", "b": [0.6179, 0.106, 0.6655, 0.121]}, {"w": "each", "b": [0.6722, 0.106, 0.7083, 0.121]}, {"w": "row", "b": [0.7151, 0.106, 0.7449, 0.121]}, {"w": "represents", "b": [0.7517, 0.106, 0.8341, 0.121]}, {"w": "one", "b": [0.8408, 0.106, 0.8691, 0.121]}, {"w": "example,", "b": [0.1312, 0.124, 0.2039, 0.1389]}, {"w": "and", "b": [0.2108, 0.124, 0.2411, 0.1389]}, {"w": "columns", "b": [0.2479, 0.124, 0.3149, 0.1389]}, {"w": "represent", "b": [0.3217, 0.124, 0.3967, 0.1389]}, {"w": "various", "b": [0.4034, 0.124, 0.4616, 0.1389]}, {"w": "attributes", "b": [0.4682, 0.1243, 0.5596, 0.1393]}, {"w": "of", "b": [0.5663, 0.124, 0.5815, 0.1389]}, {"w": "an", "b": [0.5882, 0.124, 0.6081, 0.1389]}, {"w": "example,", "b": [0.6148, 0.124, 0.6875, 0.1389]}, {"w": "as", "b": [0.6944, 0.124, 0.7112, 0.1389]}, {"w": "shown", "b": [0.718, 0.124, 0.7688, 0.1389]}, {"w": "in", "b": [0.7755, 0.124, 0.7912, 0.1389]}, {"w": "Figure", "b": [0.798, 0.124, 0.8511, 0.1389]}, {"w": "3.", "b": [0.8578, 0.124, 0.8725, 0.1389]}, {"w": "Sometimes", "b": [0.1312, 0.1419, 0.2157, 0.1569]}, {"w": "raw", "b": [0.2217, 0.1419, 0.2503, 0.1569]}, {"w": "data", "b": [0.2563, 0.1419, 0.2914, 0.1569]}, {"w": "can", "b": [0.2974, 0.1419, 0.3245, 0.1569]}, {"w": "be", "b": [0.3305, 0.1419, 0.3491, 0.1569]}, {"w": "tidy,", "b": [0.355, 0.1419, 0.3901, 0.1569]}, {"w": "e.g.,", "b": [0.3961, 0.1419, 0.4283, 0.1569]}, {"w": "provided", "b": [0.4343, 0.1419, 0.5027, 0.1569]}, {"w": "to", "b": [0.5086, 0.1419, 0.5247, 0.1569]}, {"w": "you", "b": [0.5306, 0.1419, 0.5587, 0.1569]}, {"w": "in", "b": [0.5647, 0.1419, 0.5798, 0.1569]}, {"w": "the", "b": [0.5857, 0.1419, 0.6108, 0.1569]}, {"w": "form", "b": [0.6167, 0.1419, 0.6535, 0.1569]}, {"w": "of", "b": [0.6594, 0.1419, 0.674, 0.1569]}, {"w": "a", "b": [0.6799, 0.1419, 0.689, 0.1569]}, {"w": "spreadsheet.", "b": [0.6949, 0.1419, 0.7917, 0.1569]}, {"w": "However,", "b": [0.7998, 0.1419, 0.8716, 0.1569]}, {"w": "in", "b": [0.1312, 0.1599, 0.1468, 0.1748]}, {"w": "practice,", "b": [0.153, 0.1599, 0.2226, 0.1748]}, {"w": "to", "b": [0.2288, 0.1599, 0.2454, 0.1748]}, {"w": "obtain", "b": [0.2515, 0.1599, 0.3035, 0.1748]}, {"w": "tidy", "b": [0.3096, 0.1599, 0.3423, 0.1748]}, {"w": "data", "b": [0.3485, 0.1599, 0.3848, 0.1748]}, {"w": "from", "b": [0.3909, 0.1599, 0.4289, 0.1748]}, {"w": "raw", "b": [0.435, 0.1599, 0.4647, 0.1748]}, {"w": "data,", "b": [0.4708, 0.1599, 0.5124, 0.1748]}, {"w": "data", "b": [0.5185, 0.1599, 0.5549, 0.1748]}, {"w": "analysts", "b": [0.561, 0.1599, 0.6272, 0.1748]}, {"w": "often", "b": [0.6333, 0.1599, 0.6744, 0.1748]}, {"w": "resort", "b": [0.6805, 0.1599, 0.7275, 0.1748]}, {"w": "to", "b": [0.7336, 0.1599, 0.7502, 0.1748]}, {"w": "the", "b": [0.7563, 0.1599, 0.7823, 0.1748]}, {"w": "procedure", "b": [0.7885, 0.1599, 0.8691, 0.1748]}, {"w": "called", "b": [0.1312, 0.1778, 0.1783, 0.1928]}, {"w": "feature", "b": [0.1851, 0.1781, 0.2501, 0.1931]}, {"w": "engineering,", "b": [0.258, 0.1778, 0.3695, 0.1931]}, {"w": "which", "b": [0.3765, 0.1778, 0.4241, 0.1928]}, {"w": "is", "b": [0.4309, 0.1778, 0.4436, 0.1928]}, {"w": "applied", "b": [0.4504, 0.1778, 0.51, 0.1928]}, {"w": "to", "b": [0.5169, 0.1778, 0.5336, 0.1928]}, {"w": "the", "b": [0.5404, 0.1778, 0.5666, 0.1928]}, {"w": "direct", "b": [0.5734, 0.1778, 0.6206, 0.1928]}, {"w": "and,", "b": [0.6274, 0.1778, 0.663, 0.1928]}, {"w": "optionally,", "b": [0.67, 0.1778, 0.7558, 0.1928]}, {"w": "indirect", "b": [0.7628, 0.1778, 0.8256, 0.1928]}, {"w": "data", "b": [0.8324, 0.1778, 0.869, 0.1928]}, {"w": "with", "b": [0.1306, 0.1958, 0.1668, 0.2107]}, {"w": "the", "b": [0.1729, 0.1958, 0.1988, 0.2107]}, {"w": "goal", "b": [0.205, 0.1958, 0.2381, 0.2107]}, {"w": "to", "b": [0.2442, 0.1958, 0.2608, 0.2107]}, {"w": "transform", "b": [0.2669, 0.1958, 0.3463, 0.2107]}, {"w": "each", "b": [0.3525, 0.1958, 0.3882, 0.2107]}, {"w": "raw", "b": [0.3943, 0.1958, 0.4239, 0.2107]}, {"w": "example", "b": [0.43, 0.1958, 0.4968, 0.2107]}, {"w": "into", "b": [0.5029, 0.1958, 0.5345, 0.2107]}, {"w": "a", "b": [0.5406, 0.1958, 0.55, 0.2107]}, {"w": "feature", "b": [0.5561, 0.1958, 0.6126, 0.2107]}, {"w": "vector", "b": [0.6187, 0.1958, 0.6685, 0.2107]}, {"w": "x.", "b": [0.6744, 0.1958, 0.6909, 0.211]}, {"w": "Chapter", "b": [0.6991, 0.1958, 0.7654, 0.2107]}, {"w": "4", "b": [0.7716, 0.1958, 0.7809, 0.2107]}, {"w": "is", "b": [0.787, 0.1958, 0.7996, 0.2107]}, {"w": "devoted", "b": [0.8057, 0.1958, 0.8689, 0.2107]}, {"w": "entirely", "b": [0.1312, 0.2137, 0.1918, 0.2287]}, {"w": "to", "b": [0.1979, 0.2137, 0.2143, 0.2287]}, {"w": "feature", "b": [0.2205, 0.2137, 0.2765, 0.2287]}, {"w": "engineering.", "b": [0.2826, 0.2137, 0.3791, 0.2287]}]}, {"id": "b_1", "type": "paragraph", "text": "Population Country GDP", "words": [{"w": "Population", "b": [0.191, 0.2948, 0.2614, 0.3069]}, {"w": "Country", "b": [0.1007, 0.2948, 0.1529, 0.3069]}, {"w": "GDP", "b": [0.4087, 0.2948, 0.441, 0.3069]}]}, {"id": "b_2", "type": "paragraph", "text": "France", "words": [{"w": "France", "b": [0.1036, 0.325, 0.15, 0.3371]}]}, {"id": "b_3", "type": "paragraph", "text": "Germany", "words": [{"w": "Germany", "b": [0.0962, 0.3552, 0.1574, 0.3673]}]}, {"id": "b_4", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.1206, 0.3854, 0.133, 0.3974]}]}, {"id": "b_5", "type": "paragraph", "text": "China", "words": [{"w": "China", "b": [0.1074, 0.4156, 0.1463, 0.4276]}]}, {"id": "b_6", "type": "paragraph", "text": "83M", "words": [{"w": "83M", "b": [0.2117, 0.3552, 0.2407, 0.3673]}]}, {"id": "b_7", "type": "paragraph", "text": "67M 2.6T", "words": [{"w": "67M", "b": [0.2117, 0.325, 0.2407, 0.3371]}, {"w": "2.6T", "b": [0.4099, 0.325, 0.4397, 0.3371]}]}, {"id": "b_8", "type": "paragraph", "text": "3.7T", "words": [{"w": "3.7T", "b": [0.4099, 0.3552, 0.4397, 0.3673]}]}, {"id": "b_9", "type": "paragraph", "text": "... ...", "words": [{"w": "...", "b": [0.2199, 0.3854, 0.2324, 0.3974]}, {"w": "...", "b": [0.4186, 0.3854, 0.431, 0.3974]}]}, {"id": "b_10", "type": "paragraph", "text": "1386M 12.2T", "words": [{"w": "1386M", "b": [0.2034, 0.4156, 0.2489, 0.4276]}, {"w": "12.2T", "b": [0.4058, 0.4156, 0.4439, 0.4276]}]}, {"id": "b_11", "type": "paragraph", "text": "Region", "words": [{"w": "Region", "b": [0.3019, 0.2948, 0.3491, 0.3069]}]}, {"id": "b_12", "type": "paragraph", "text": "Europe", "words": [{"w": "Europe", "b": [0.3015, 0.325, 0.3495, 0.3371]}]}, {"id": "b_13", "type": "paragraph", "text": "Europe", "words": [{"w": "Europe", "b": [0.3015, 0.3552, 0.3495, 0.3673]}]}, {"id": "b_14", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.3193, 0.3854, 0.3317, 0.3974]}]}, {"id": "b_15", "type": "paragraph", "text": "Aisa", "words": [{"w": "Aisa", "b": [0.311, 0.4156, 0.34, 0.4276]}]}, {"id": "b_16", "type": "paragraph", "text": "Population Country GDP", "words": [{"w": "Population", "b": [0.638, 0.2948, 0.7084, 0.3069]}, {"w": "Country", "b": [0.5477, 0.2948, 0.5999, 0.3069]}, {"w": "GDP", "b": [0.8557, 0.2948, 0.888, 0.3069]}]}, {"id": "b_17", "type": "paragraph", "text": "France", "words": [{"w": "France", "b": [0.5506, 0.325, 0.597, 0.3371]}]}, {"id": "b_18", "type": "paragraph", "text": "Germany", "words": [{"w": "Germany", "b": [0.5432, 0.3552, 0.6045, 0.3673]}]}, {"id": "b_19", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5676, 0.3854, 0.58, 0.3974]}]}, {"id": "b_20", "type": "paragraph", "text": "China", "words": [{"w": "China", "b": [0.5544, 0.4156, 0.5933, 0.4276]}]}, {"id": "b_21", "type": "paragraph", "text": "83M", "words": [{"w": "83M", "b": [0.6587, 0.3552, 0.6877, 0.3673]}]}, {"id": "b_22", "type": "paragraph", "text": "67M 2.6T", "words": [{"w": "67M", "b": [0.6587, 0.325, 0.6877, 0.3371]}, {"w": "2.6T", "b": [0.8569, 0.325, 0.8867, 0.3371]}]}, {"id": "b_23", "type": "paragraph", "text": "3.7T", "words": [{"w": "3.7T", "b": [0.8569, 0.3552, 0.8867, 0.3673]}]}, {"id": "b_24", "type": "paragraph", "text": "... ...", "words": [{"w": "...", "b": [0.667, 0.3854, 0.6794, 0.3974]}, {"w": "...", "b": [0.8656, 0.3854, 0.8781, 0.3974]}]}, {"id": "b_25", "type": "paragraph", "text": "1386M 12.2T", "words": [{"w": "1386M", "b": [0.6504, 0.4156, 0.6959, 0.4276]}, {"w": "12.2T", "b": [0.8528, 0.4156, 0.8909, 0.4276]}]}, {"id": "b_26", "type": "paragraph", "text": "Region", "words": [{"w": "Region", "b": [0.7489, 0.2948, 0.7961, 0.3069]}]}, {"id": "b_27", "type": "paragraph", "text": "Europe", "words": [{"w": "Europe", "b": [0.7485, 0.325, 0.7965, 0.3371]}]}, {"id": "b_28", "type": "paragraph", "text": "Europe", "words": [{"w": "Europe", "b": [0.7485, 0.3552, 0.7965, 0.3673]}]}, {"id": "b_29", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.7663, 0.3854, 0.7787, 0.3974]}]}, {"id": "b_30", "type": "paragraph", "text": "Asia", "words": [{"w": "Asia", "b": [0.758, 0.4156, 0.787, 0.4276]}]}, {"id": "b_31", "type": "paragraph", "text": "attributes examples", "words": [{"w": "attributes", "b": [0.2401, 0.254, 0.3116, 0.2681]}, {"w": "examples", "b": [0.6881, 0.254, 0.7625, 0.2681]}]}, {"id": "b_32", "type": "paragraph", "text": "Figure 3: Tidy data: examples are rows and attributes are columns.", "words": [{"w": "Figure", "b": [0.2248, 0.4525, 0.2769, 0.4674]}, {"w": "3:", "b": [0.2831, 0.4525, 0.2974, 0.4674]}, {"w": "Tidy", "b": [0.3057, 0.4525, 0.3441, 0.4674]}, {"w": "data:", "b": [0.3502, 0.4525, 0.3913, 0.4674]}, {"w": "examples", "b": [0.3995, 0.4525, 0.4729, 0.4674]}, {"w": "are", "b": [0.479, 0.4525, 0.5037, 0.4674]}, {"w": "rows", "b": [0.5099, 0.4525, 0.5464, 0.4674]}, {"w": "and", "b": [0.5525, 0.4525, 0.5823, 0.4674]}, {"w": "attributes", "b": [0.5884, 0.4525, 0.6676, 0.4674]}, {"w": "are", "b": [0.6737, 0.4525, 0.6984, 0.4674]}, {"w": "columns.", "b": [0.7045, 0.4525, 0.7754, 0.4674]}]}, {"id": "b_33", "type": "paragraph", "text": "It’s important to note here that for some tasks, an example used by a learning algorithm can have a form of a sequence of vectors, a matrix, or a sequence of matrices. The notion of data tidiness for such algorithms is defined similarly: you only replace “row of fixed width in a spreadsheet” by a matrix of fixed width and height, or a generalization of matrices to a higher dimension called a tensor.", "words": [{"w": "It’s", "b": [0.1312, 0.5024, 0.158, 0.5173]}, {"w": "important", "b": [0.1645, 0.5024, 0.2472, 0.5173]}, {"w": "to", "b": [0.2537, 0.5024, 0.2705, 0.5173]}, {"w": "note", "b": [0.277, 0.5024, 0.3125, 0.5173]}, {"w": "here", "b": [0.3191, 0.5024, 0.3536, 0.5173]}, {"w": "that", "b": [0.3602, 0.5024, 0.3947, 0.5173]}, {"w": "for", "b": [0.4012, 0.5024, 0.4238, 0.5173]}, {"w": "some", "b": [0.4303, 0.5024, 0.4712, 0.5173]}, {"w": "tasks,", "b": [0.4777, 0.5024, 0.5245, 0.5173]}, {"w": "an", "b": [0.5311, 0.5024, 0.551, 0.5173]}, {"w": "example", "b": [0.5575, 0.5024, 0.6249, 0.5173]}, {"w": "used", "b": [0.6315, 0.5024, 0.6682, 0.5173]}, {"w": "by", "b": [0.6747, 0.5024, 0.6946, 0.5173]}, {"w": "a", "b": [0.7011, 0.5024, 0.7105, 0.5173]}, {"w": "learning", "b": [0.717, 0.5024, 0.783, 0.5173]}, {"w": "algorithm", "b": [0.7895, 0.5024, 0.8691, 0.5173]}, {"w": "can", "b": [0.1312, 0.5203, 0.1586, 0.5353]}, {"w": "have", "b": [0.1648, 0.5203, 0.2008, 0.5353]}, {"w": "a", "b": [0.2069, 0.5203, 0.2161, 0.5353]}, {"w": "form", "b": [0.2222, 0.5203, 0.2593, 0.5353]}, {"w": "of", "b": [0.2654, 0.5203, 0.2801, 0.5353]}, {"w": "a", "b": [0.2863, 0.5203, 0.2954, 0.5353]}, {"w": "sequence", "b": [0.3016, 0.5203, 0.3712, 0.5353]}, {"w": "of", "b": [0.3774, 0.5203, 0.3921, 0.5353]}, {"w": "vectors,", "b": [0.3982, 0.5203, 0.4592, 0.5353]}, {"w": "a", "b": [0.4654, 0.5203, 0.4745, 0.5353]}, {"w": "matrix,", "b": [0.4807, 0.5203, 0.539, 0.5353]}, {"w": "or", "b": [0.5452, 0.5203, 0.5615, 0.5353]}, {"w": "a", "b": [0.5676, 0.5203, 0.5768, 0.5353]}, {"w": "sequence", "b": [0.5829, 0.5203, 0.6525, 0.5353]}, {"w": "of", "b": [0.6587, 0.5203, 0.6734, 0.5353]}, {"w": "matrices.", "b": [0.6795, 0.5203, 0.7517, 0.5353]}, {"w": "The", "b": [0.7599, 0.5203, 0.7914, 0.5353]}, {"w": "notion", "b": [0.7975, 0.5203, 0.8482, 0.5353]}, {"w": "of", "b": [0.8544, 0.5203, 0.8691, 0.5353]}, {"w": "data", "b": [0.1312, 0.5383, 0.1664, 0.5532]}, {"w": "tidiness", "b": [0.1726, 0.5383, 0.2322, 0.5532]}, {"w": "for", "b": [0.2383, 0.5383, 0.26, 0.5532]}, {"w": "such", "b": [0.2661, 0.5383, 0.3009, 0.5532]}, {"w": "algorithms", "b": [0.3071, 0.5383, 0.3907, 0.5532]}, {"w": "is", "b": [0.3969, 0.5383, 0.409, 0.5532]}, {"w": "defined", "b": [0.4152, 0.5383, 0.4715, 0.5532]}, {"w": "similarly:", "b": [0.4777, 0.5383, 0.5507, 0.5532]}, {"w": "you", "b": [0.5589, 0.5383, 0.5871, 0.5532]}, {"w": "only", "b": [0.5932, 0.5383, 0.6269, 0.5532]}, {"w": "replace", "b": [0.6331, 0.5383, 0.6885, 0.5532]}, {"w": "“row", "b": [0.6946, 0.5383, 0.7319, 0.5532]}, {"w": "of", "b": [0.738, 0.5383, 0.7526, 0.5532]}, {"w": "fixed", "b": [0.7587, 0.5383, 0.7965, 0.5532]}, {"w": "width", "b": [0.8026, 0.5383, 0.8479, 0.5532]}, {"w": "in", "b": [0.854, 0.5383, 0.8691, 0.5532]}, {"w": "a", "b": [0.1312, 0.5562, 0.1406, 0.5712]}, {"w": "spreadsheet”", "b": [0.147, 0.5562, 0.2513, 0.5712]}, {"w": "by", "b": [0.2577, 0.5562, 0.2775, 0.5712]}, {"w": "a", "b": [0.2839, 0.5562, 0.2933, 0.5712]}, {"w": "matrix", "b": [0.2996, 0.5562, 0.3545, 0.5712]}, {"w": "of", "b": [0.3609, 0.5562, 0.3761, 0.5712]}, {"w": "fixed", "b": [0.3824, 0.5562, 0.4216, 0.5712]}, {"w": "width", "b": [0.4279, 0.5562, 0.475, 0.5712]}, {"w": "and", "b": [0.4813, 0.5562, 0.5117, 0.5712]}, {"w": "height,", "b": [0.518, 0.5562, 0.574, 0.5712]}, {"w": "or", "b": [0.5803, 0.5562, 0.5971, 0.5712]}, {"w": "a", "b": [0.6035, 0.5562, 0.6129, 0.5712]}, {"w": "generalization", "b": [0.6192, 0.5562, 0.7333, 0.5712]}, {"w": "of", "b": [0.7396, 0.5562, 0.7548, 0.5712]}, {"w": "matrices", "b": [0.7611, 0.5562, 0.8303, 0.5712]}, {"w": "to", "b": [0.8366, 0.5562, 0.8533, 0.5712]}, {"w": "a", "b": [0.8597, 0.5562, 0.8691, 0.5712]}, {"w": "higher", "b": [0.1312, 0.5742, 0.1815, 0.5891]}, {"w": "dimension", "b": [0.1877, 0.5742, 0.2688, 0.5891]}, {"w": "called", "b": [0.275, 0.5742, 0.3211, 0.5891]}, {"w": "a", "b": [0.3273, 0.5742, 0.3365, 0.5891]}, {"w": "tensor.", "b": [0.3427, 0.5742, 0.4053, 0.5894]}]}, {"id": "b_34", "type": "paragraph", "text": "The term “tidy data” was coined by Hadley Wickham in his paper with the same title.6", "words": [{"w": "The", "b": [0.1306, 0.6011, 0.1624, 0.616]}, {"w": "term", "b": [0.1685, 0.6011, 0.2065, 0.616]}, {"w": "“tidy", "b": [0.2126, 0.6011, 0.2536, 0.616]}, {"w": "data”", "b": [0.2598, 0.6011, 0.3044, 0.616]}, {"w": "was", "b": [0.3105, 0.6011, 0.3399, 0.616]}, {"w": "coined", "b": [0.346, 0.6011, 0.3973, 0.616]}, {"w": "by", "b": [0.4035, 0.6011, 0.4229, 0.616]}, {"w": "Hadley", "b": [0.4291, 0.6011, 0.4855, 0.616]}, {"w": "Wickham", "b": [0.4916, 0.6011, 0.568, 0.616]}, {"w": "in", "b": [0.5742, 0.6011, 0.5895, 0.616]}, {"w": "his", "b": [0.5957, 0.6011, 0.6184, 0.616]}, {"w": "paper", "b": [0.6245, 0.6011, 0.6702, 0.616]}, {"w": "with", "b": [0.6764, 0.6011, 0.7122, 0.616]}, {"w": "the", "b": [0.7184, 0.6011, 0.744, 0.616]}, {"w": "same", "b": [0.7502, 0.6011, 0.7903, 0.616]}, {"w": "title.6", "b": [0.7964, 0.5995, 0.8414, 0.616]}]}, {"id": "b_35", "type": "paragraph", "text": "As I mentioned at the beginning of this subsection, data can be tidy, but still not usable by a particular machine learning algorithm. Most machine learning algorithms, in fact, only accept training data in the form of a collection of numerical feature vectors. Consider the data shown in Figure 3. The attribute “Region” is categorical and not numerical. The decision tree learning algorithm can work with categorical values of attributes, but most learning algorithms cannot. In Section ?? of Chapter 4, we will see how to transform a categorical attribute into a numerical feature.", "words": [{"w": "As", "b": [0.1305, 0.628, 0.1512, 0.643]}, {"w": "I", "b": [0.1571, 0.628, 0.1636, 0.643]}, {"w": "mentioned", "b": [0.1694, 0.628, 0.2513, 0.643]}, {"w": "at", "b": [0.2571, 0.628, 0.2732, 0.643]}, {"w": "the", "b": [0.279, 0.628, 0.3041, 0.643]}, {"w": "beginning", "b": [0.3099, 0.628, 0.3868, 0.643]}, {"w": "of", "b": [0.3927, 0.628, 0.4072, 0.643]}, {"w": "this", "b": [0.4131, 0.628, 0.4423, 0.643]}, {"w": "subsection,", "b": [0.4481, 0.628, 0.5348, 0.643]}, {"w": "data", "b": [0.5406, 0.628, 0.5758, 0.643]}, {"w": "can", "b": [0.5816, 0.628, 0.6088, 0.643]}, {"w": "be", "b": [0.6146, 0.628, 0.6332, 0.643]}, {"w": "tidy,", "b": [0.639, 0.628, 0.6742, 0.643]}, {"w": "but", "b": [0.68, 0.628, 0.7072, 0.643]}, {"w": "still", "b": [0.713, 0.628, 0.7423, 0.643]}, {"w": "not", "b": [0.7481, 0.628, 0.7742, 0.643]}, {"w": "usable", "b": [0.78, 0.628, 0.8294, 0.643]}, {"w": "by", "b": [0.8352, 0.628, 0.8543, 0.643]}, {"w": "a", "b": [0.8601, 0.628, 0.8691, 0.643]}, {"w": "particular", "b": [0.1312, 0.646, 0.2087, 0.6609]}, {"w": "machine", "b": [0.214, 0.646, 0.2788, 0.6609]}, {"w": "learning", "b": [0.2841, 0.646, 0.3475, 0.6609]}, {"w": "algorithm.", "b": [0.3527, 0.646, 0.4342, 0.6609]}, {"w": "Most", "b": [0.4421, 0.646, 0.4819, 0.6609]}, {"w": "machine", "b": [0.4871, 0.646, 0.552, 0.6609]}, {"w": "learning", "b": [0.5572, 0.646, 0.6206, 0.6609]}, {"w": "algorithms,", "b": [0.6259, 0.646, 0.7144, 0.6609]}, {"w": "in", "b": [0.7199, 0.646, 0.735, 0.6609]}, {"w": "fact,", "b": [0.7402, 0.646, 0.7749, 0.6609]}, {"w": "only", "b": [0.7804, 0.646, 0.8141, 0.6609]}, {"w": "accept", "b": [0.8193, 0.646, 0.8696, 0.6609]}, {"w": "training", "b": [0.1312, 0.6639, 0.1961, 0.6789]}, {"w": "data", "b": [0.2033, 0.6639, 0.2399, 0.6789]}, {"w": "in", "b": [0.247, 0.6639, 0.2627, 0.6789]}, {"w": "the", "b": [0.2698, 0.6639, 0.296, 0.6789]}, {"w": "form", "b": [0.3031, 0.6639, 0.3414, 0.6789]}, {"w": "of", "b": [0.3485, 0.6639, 0.3637, 0.6789]}, {"w": "a", "b": [0.3708, 0.6639, 0.3802, 0.6789]}, {"w": "collection", "b": [0.3873, 0.6639, 0.4648, 0.6789]}, {"w": "of", "b": [0.4719, 0.6639, 0.4871, 0.6789]}, {"w": "numerical", "b": [0.4942, 0.6639, 0.5743, 0.6789]}, {"w": "feature", "b": [0.5814, 0.6639, 0.6385, 0.6789]}, {"w": "vectors.", "b": [0.6456, 0.6639, 0.7086, 0.6789]}, {"w": "Consider", "b": [0.7197, 0.6639, 0.7921, 0.6789]}, {"w": "the", "b": [0.7992, 0.6639, 0.8254, 0.6789]}, {"w": "data", "b": [0.8325, 0.6639, 0.8691, 0.6789]}, {"w": "shown", "b": [0.1312, 0.6818, 0.182, 0.6968]}, {"w": "in", "b": [0.1881, 0.6818, 0.2038, 0.6968]}, {"w": "Figure", "b": [0.2099, 0.6818, 0.2629, 0.6968]}, {"w": "3.", "b": [0.2691, 0.6818, 0.2837, 0.6968]}, {"w": "The", "b": [0.2919, 0.6818, 0.3242, 0.6968]}, {"w": "attribute", "b": [0.3304, 0.6818, 0.4035, 0.6968]}, {"w": "“Region”", "b": [0.4096, 0.6818, 0.484, 0.6968]}, {"w": "is", "b": [0.4901, 0.6818, 0.5027, 0.6968]}, {"w": "categorical", "b": [0.5089, 0.6818, 0.5966, 0.6968]}, {"w": "and", "b": [0.6027, 0.6818, 0.633, 0.6968]}, {"w": "not", "b": [0.6392, 0.6818, 0.6663, 0.6968]}, {"w": "numerical.", "b": [0.6724, 0.6818, 0.7576, 0.6968]}, {"w": "The", "b": [0.7658, 0.6818, 0.7981, 0.6968]}, {"w": "decision", "b": [0.8042, 0.6818, 0.8691, 0.6968]}, {"w": "tree", "b": [0.1312, 0.6998, 0.1627, 0.7147]}, {"w": "learning", "b": [0.1696, 0.6998, 0.2356, 0.7147]}, {"w": "algorithm", "b": [0.2425, 0.6998, 0.322, 0.7147]}, {"w": "can", "b": [0.329, 0.6998, 0.3572, 0.7147]}, {"w": "work", "b": [0.3641, 0.6998, 0.4039, 0.7147]}, {"w": "with", "b": [0.4109, 0.6998, 0.4475, 0.7147]}, {"w": "categorical", "b": [0.4544, 0.6998, 0.5423, 0.7147]}, {"w": "values", "b": [0.5492, 0.6998, 0.5991, 0.7147]}, {"w": "of", "b": [0.606, 0.6998, 0.6212, 0.7147]}, {"w": "attributes,", "b": [0.6281, 0.6998, 0.714, 0.7147]}, {"w": "but", "b": [0.7212, 0.6998, 0.7494, 0.7147]}, {"w": "most", "b": [0.7564, 0.6998, 0.7962, 0.7147]}, {"w": "learning", "b": [0.8031, 0.6998, 0.8691, 0.7147]}, {"w": "algorithms", "b": [0.1312, 0.7177, 0.2182, 0.7327]}, {"w": "cannot.", "b": [0.2243, 0.7177, 0.285, 0.7327]}, {"w": "In", "b": [0.2932, 0.7177, 0.3105, 0.7327]}, {"w": "Section", "b": [0.3166, 0.7177, 0.3762, 0.7327]}, {"w": "??", "b": [0.3823, 0.718, 0.4023, 0.733]}, {"w": "of", "b": [0.4085, 0.7177, 0.4237, 0.7327]}, {"w": "Chapter", "b": [0.4298, 0.7177, 0.4968, 0.7327]}, {"w": "4,", "b": [0.503, 0.7177, 0.5176, 0.7327]}, {"w": "we", "b": [0.5237, 0.7177, 0.5452, 0.7327]}, {"w": "will", "b": [0.5513, 0.7177, 0.5806, 0.7327]}, {"w": "see", "b": [0.5868, 0.7177, 0.611, 0.7327]}, {"w": "how", "b": [0.6171, 0.7177, 0.65, 0.7327]}, {"w": "to", "b": [0.6562, 0.7177, 0.6729, 0.7327]}, {"w": "transform", "b": [0.6791, 0.7177, 0.7593, 0.7327]}, {"w": "a", "b": [0.7655, 0.7177, 0.7749, 0.7327]}, {"w": "categorical", "b": [0.781, 0.7177, 0.8689, 0.7327]}, {"w": "attribute", "b": [0.1312, 0.7357, 0.2031, 0.7506]}, {"w": "into", "b": [0.2092, 0.7357, 0.2405, 0.7506]}, {"w": "a", "b": [0.2467, 0.7357, 0.2559, 0.7506]}, {"w": "numerical", "b": [0.262, 0.7357, 0.3405, 0.7506]}, {"w": "feature.", "b": [0.3467, 0.7357, 0.4078, 0.7506]}]}, {"id": "b_36", "type": "paragraph", "text": "Note that in the academic machine learning literature, the word “example” typically refers to a tidy data example with an optionally assigned label. However, during the stage of data collection and labeling, which we consider in the next chapter, examples can still be in the raw form: images, texts, or rows with categorical attributes in a spreadsheet. In this book, when it’s important to highlight the difference, I will say raw example to indicate that a", "words": [{"w": "Note", "b": [0.1312, 0.7626, 0.17, 0.7776]}, {"w": "that", "b": [0.1761, 0.7626, 0.2101, 0.7776]}, {"w": "in", "b": [0.2163, 0.7626, 0.2318, 0.7776]}, {"w": "the", "b": [0.2379, 0.7626, 0.2637, 0.7776]}, {"w": "academic", "b": [0.2698, 0.7626, 0.3442, 0.7776]}, {"w": "machine", "b": [0.3503, 0.7626, 0.4169, 0.7776]}, {"w": "learning", "b": [0.423, 0.7626, 0.4881, 0.7776]}, {"w": "literature,", "b": [0.4943, 0.7626, 0.5749, 0.7776]}, {"w": "the", "b": [0.581, 0.7626, 0.6069, 0.7776]}, {"w": "word", "b": [0.613, 0.7626, 0.6528, 0.7776]}, {"w": "“example”", "b": [0.6589, 0.7626, 0.743, 0.7776]}, {"w": "typically", "b": [0.7492, 0.7626, 0.8189, 0.7776]}, {"w": "refers", "b": [0.825, 0.7626, 0.8691, 0.7776]}, {"w": "to", "b": [0.1312, 0.7806, 0.1475, 0.7955]}, {"w": "a", "b": [0.1536, 0.7806, 0.1628, 0.7955]}, {"w": "tidy", "b": [0.1689, 0.7806, 0.2009, 0.7955]}, {"w": "data", "b": [0.2071, 0.7806, 0.2426, 0.7955]}, {"w": "example", "b": [0.2488, 0.7806, 0.3143, 0.7955]}, {"w": "with", "b": [0.3204, 0.7806, 0.356, 0.7955]}, {"w": "an", "b": [0.3622, 0.7806, 0.3815, 0.7955]}, {"w": "optionally", "b": [0.3876, 0.7806, 0.4674, 0.7955]}, {"w": "assigned", "b": [0.4735, 0.7806, 0.5398, 0.7955]}, {"w": "label.", "b": [0.5459, 0.7806, 0.5891, 0.7955]}, {"w": "However,", "b": [0.5973, 0.7806, 0.67, 0.7955]}, {"w": "during", "b": [0.6761, 0.7806, 0.728, 0.7955]}, {"w": "the", "b": [0.7342, 0.7806, 0.7596, 0.7955]}, {"w": "stage", "b": [0.7657, 0.7806, 0.8065, 0.7955]}, {"w": "of", "b": [0.8126, 0.7806, 0.8273, 0.7955]}, {"w": "data", "b": [0.8335, 0.7806, 0.8691, 0.7955]}, {"w": "collection", "b": [0.1312, 0.7985, 0.2078, 0.8135]}, {"w": "and", "b": [0.214, 0.7985, 0.244, 0.8135]}, {"w": "labeling,", "b": [0.2501, 0.7985, 0.3189, 0.8135]}, {"w": "which", "b": [0.3251, 0.7985, 0.3722, 0.8135]}, {"w": "we", "b": [0.3783, 0.7985, 0.3995, 0.8135]}, {"w": "consider", "b": [0.4057, 0.7985, 0.4721, 0.8135]}, {"w": "in", "b": [0.4782, 0.7985, 0.4938, 0.8135]}, {"w": "the", "b": [0.4999, 0.7985, 0.5258, 0.8135]}, {"w": "next", "b": [0.5319, 0.7985, 0.5676, 0.8135]}, {"w": "chapter,", "b": [0.5738, 0.7985, 0.6396, 0.8135]}, {"w": "examples", "b": [0.6457, 0.7985, 0.7198, 0.8135]}, {"w": "can", "b": [0.726, 0.7985, 0.7539, 0.8135]}, {"w": "still", "b": [0.7601, 0.7985, 0.7902, 0.8135]}, {"w": "be", "b": [0.7963, 0.7985, 0.8155, 0.8135]}, {"w": "in", "b": [0.8216, 0.7985, 0.8371, 0.8135]}, {"w": "the", "b": [0.8433, 0.7985, 0.8692, 0.8135]}, {"w": "raw", "b": [0.1312, 0.8164, 0.1607, 0.8314]}, {"w": "form:", "b": [0.1669, 0.8164, 0.2098, 0.8314]}, {"w": "images,", "b": [0.218, 0.8164, 0.2781, 0.8314]}, {"w": "texts,", "b": [0.2842, 0.8164, 0.3293, 0.8314]}, {"w": "or", "b": [0.3354, 0.8164, 0.352, 0.8314]}, {"w": "rows", "b": [0.3582, 0.8164, 0.395, 0.8314]}, {"w": "with", "b": [0.4012, 0.8164, 0.4374, 0.8314]}, {"w": "categorical", "b": [0.4435, 0.8164, 0.5304, 0.8314]}, {"w": "attributes", "b": [0.5365, 0.8164, 0.6163, 0.8314]}, {"w": "in", "b": [0.6224, 0.8164, 0.6379, 0.8314]}, {"w": "a", "b": [0.6441, 0.8164, 0.6534, 0.8314]}, {"w": "spreadsheet.", "b": [0.6595, 0.8164, 0.7591, 0.8314]}, {"w": "In", "b": [0.7673, 0.8164, 0.7843, 0.8314]}, {"w": "this", "b": [0.7905, 0.8164, 0.8205, 0.8314]}, {"w": "book,", "b": [0.8267, 0.8164, 0.8716, 0.8314]}, {"w": "when", "b": [0.1306, 0.8344, 0.1732, 0.8493]}, {"w": "it’s", "b": [0.1794, 0.8344, 0.2045, 0.8493]}, {"w": "important", "b": [0.2107, 0.8344, 0.2929, 0.8493]}, {"w": "to", "b": [0.2991, 0.8344, 0.3157, 0.8493]}, {"w": "highlight", "b": [0.3219, 0.8344, 0.3942, 0.8493]}, {"w": "the", "b": [0.4004, 0.8344, 0.4264, 0.8493]}, {"w": "difference,", "b": [0.4326, 0.8344, 0.5154, 0.8493]}, {"w": "I", "b": [0.5216, 0.8344, 0.5283, 0.8493]}, {"w": "will", "b": [0.5345, 0.8344, 0.5637, 0.8493]}, {"w": "say", "b": [0.5698, 0.8344, 0.5959, 0.8493]}, {"w": "raw", "b": [0.6021, 0.8347, 0.6359, 0.8497]}, {"w": "example", "b": [0.643, 0.8347, 0.7193, 0.8497]}, {"w": "to", "b": [0.7254, 0.8344, 0.7421, 0.8493]}, {"w": "indicate", "b": [0.7482, 0.8344, 0.8128, 0.8493]}, {"w": "that", "b": [0.8189, 0.8344, 0.8533, 0.8493]}, {"w": "a", "b": [0.8595, 0.8344, 0.8688, 0.8493]}]}, {"id": "b_37", "type": "paragraph", "text": "6Wickham, Hadley. “Tidy data.” Journal of Statistical Software 59.10 (2014): 1-23.", "words": [{"w": "6Wickham,", "b": [0.1518, 0.8611, 0.2287, 0.875]}, {"w": "Hadley.", "b": [0.2339, 0.863, 0.2849, 0.875]}, {"w": "“Tidy", "b": [0.2918, 0.863, 0.3319, 0.875]}, {"w": "data.”", "b": [0.3371, 0.863, 0.3772, 0.875]}, {"w": "Journal", "b": [0.3842, 0.863, 0.4358, 0.875]}, {"w": "of", "b": [0.441, 0.863, 0.4536, 0.875]}, {"w": "Statistical", "b": [0.4589, 0.863, 0.5278, 0.875]}, {"w": "Software", "b": [0.533, 0.863, 0.5918, 0.875]}, {"w": "59.10", "b": [0.597, 0.863, 0.6327, 0.875]}, {"w": "(2014):", "b": [0.6379, 0.863, 0.6858, 0.875]}, {"w": "1-23.", "b": [0.6928, 0.863, 0.7259, 0.875]}]}, {"id": "b_38", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "10", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 19, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "piece of data was not transformed into a feature vector yet. Otherwise, assume that examples have the form of feature vectors.", "words": [{"w": "piece", "b": [0.1312, 0.0881, 0.1704, 0.1031]}, {"w": "of", "b": [0.176, 0.0881, 0.1906, 0.1031]}, {"w": "data", "b": [0.1962, 0.0881, 0.2314, 0.1031]}, {"w": "was", "b": [0.2369, 0.0881, 0.2657, 0.1031]}, {"w": "not", "b": [0.2713, 0.0881, 0.2974, 0.1031]}, {"w": "transformed", "b": [0.303, 0.0881, 0.3982, 0.1031]}, {"w": "into", "b": [0.4037, 0.0881, 0.4344, 0.1031]}, {"w": "a", "b": [0.44, 0.0881, 0.449, 0.1031]}, {"w": "feature", "b": [0.4546, 0.0881, 0.5094, 0.1031]}, {"w": "vector", "b": [0.515, 0.0881, 0.5633, 0.1031]}, {"w": "yet.", "b": [0.5689, 0.0881, 0.598, 0.1031]}, {"w": "Otherwise,", "b": [0.6061, 0.0881, 0.6906, 0.1031]}, {"w": "assume", "b": [0.6963, 0.0881, 0.7528, 0.1031]}, {"w": "that", "b": [0.7584, 0.0881, 0.7916, 0.1031]}, {"w": "examples", "b": [0.7971, 0.0881, 0.8691, 0.1031]}, {"w": "have", "b": [0.1312, 0.106, 0.1676, 0.121]}, {"w": "the", "b": [0.1738, 0.106, 0.1994, 0.121]}, {"w": "form", "b": [0.2056, 0.106, 0.2431, 0.121]}, {"w": "of", "b": [0.2492, 0.106, 0.2641, 0.121]}, {"w": "feature", "b": [0.2702, 0.106, 0.3262, 0.121]}, {"w": "vectors.", "b": [0.3323, 0.106, 0.394, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "1.3.3 Training and Holdout Sets", "words": [{"w": "1.3.3", "b": [0.1312, 0.1542, 0.1749, 0.1692]}, {"w": "Training", "b": [0.1961, 0.1542, 0.2741, 0.1692]}, {"w": "and", "b": [0.2812, 0.1542, 0.3151, 0.1692]}, {"w": "Holdout", "b": [0.3222, 0.1542, 0.3977, 0.1692]}, {"w": "Sets", "b": [0.4048, 0.1542, 0.4429, 0.1692]}]}, {"id": "b_2", "type": "paragraph", "text": "In practice, data analysts work with three distinct sets of examples:", "words": [{"w": "In", "b": [0.1312, 0.1905, 0.1482, 0.2054]}, {"w": "practice,", "b": [0.1543, 0.1905, 0.2231, 0.2054]}, {"w": "data", "b": [0.2292, 0.1905, 0.2651, 0.2054]}, {"w": "analysts", "b": [0.2713, 0.1905, 0.3366, 0.2054]}, {"w": "work", "b": [0.3427, 0.1905, 0.3817, 0.2054]}, {"w": "with", "b": [0.3879, 0.1905, 0.4238, 0.2054]}, {"w": "three", "b": [0.4299, 0.1905, 0.471, 0.2054]}, {"w": "distinct", "b": [0.4772, 0.1905, 0.5378, 0.2054]}, {"w": "sets", "b": [0.5439, 0.1905, 0.5739, 0.2054]}, {"w": "of", "b": [0.58, 0.1905, 0.5949, 0.2054]}, {"w": "examples:", "b": [0.601, 0.1905, 0.6796, 0.2054]}]}, {"id": "b_3", "type": "paragraph", "text": "1) training set, 2) validation set,7 and 3) test set.", "words": [{"w": "1)", "b": [0.1517, 0.2174, 0.1681, 0.2323]}, {"w": "training", "b": [0.1774, 0.2174, 0.241, 0.2323]}, {"w": "set,", "b": [0.2471, 0.2174, 0.2749, 0.2323]}, {"w": "2)", "b": [0.1517, 0.2353, 0.1681, 0.2503]}, {"w": "validation", "b": [0.1774, 0.2353, 0.2568, 0.2503]}, {"w": "set,7", "b": [0.263, 0.2337, 0.2981, 0.2503]}, {"w": "and", "b": [0.3051, 0.2353, 0.3349, 0.2503]}, {"w": "3)", "b": [0.1517, 0.2533, 0.1681, 0.2682]}, {"w": "test", "b": [0.1774, 0.2533, 0.2072, 0.2682]}, {"w": "set.", "b": [0.2134, 0.2533, 0.2412, 0.2682]}]}, {"id": "b_4", "type": "paragraph", "text": "Once you have got the data in the form of a collection of examples, the first thing you do in your machine learning project is shuffle the examples and split the dataset into three distinct sets: training, validation, and test. The training set is usually the biggest one; the learning algorithm uses the training set to produce the model. The validation and test sets are roughly the same size, much smaller than the size of the training set. The learning algorithm is not allowed to use examples from the validation or test sets to train the model. That is why those two sets are also called holdout sets.", "words": [{"w": "Once", "b": [0.1312, 0.2802, 0.1731, 0.2952]}, {"w": "you", "b": [0.1793, 0.2802, 0.2086, 0.2952]}, {"w": "have", "b": [0.2149, 0.2802, 0.252, 0.2952]}, {"w": "got", "b": [0.2583, 0.2802, 0.2844, 0.2952]}, {"w": "the", "b": [0.2907, 0.2802, 0.3168, 0.2952]}, {"w": "data", "b": [0.3231, 0.2802, 0.3597, 0.2952]}, {"w": "in", "b": [0.3659, 0.2802, 0.3816, 0.2952]}, {"w": "the", "b": [0.3879, 0.2802, 0.414, 0.2952]}, {"w": "form", "b": [0.4203, 0.2802, 0.4585, 0.2952]}, {"w": "of", "b": [0.4647, 0.2802, 0.4799, 0.2952]}, {"w": "a", "b": [0.4861, 0.2802, 0.4956, 0.2952]}, {"w": "collection", "b": [0.5018, 0.2802, 0.5792, 0.2952]}, {"w": "of", "b": [0.5855, 0.2802, 0.6006, 0.2952]}, {"w": "examples,", "b": [0.6069, 0.2802, 0.687, 0.2952]}, {"w": "the", "b": [0.6933, 0.2802, 0.7195, 0.2952]}, {"w": "first", "b": [0.7257, 0.2802, 0.7583, 0.2952]}, {"w": "thing", "b": [0.7645, 0.2802, 0.8074, 0.2952]}, {"w": "you", "b": [0.8137, 0.2802, 0.843, 0.2952]}, {"w": "do", "b": [0.8492, 0.2802, 0.8691, 0.2952]}, {"w": "in", "b": [0.1312, 0.2982, 0.1469, 0.3131]}, {"w": "your", "b": [0.1543, 0.2982, 0.191, 0.3131]}, {"w": "machine", "b": [0.1983, 0.2982, 0.2658, 0.3131]}, {"w": "learning", "b": [0.2732, 0.2982, 0.3391, 0.3131]}, {"w": "project", "b": [0.3465, 0.2982, 0.4041, 0.3131]}, {"w": "is", "b": [0.4115, 0.2982, 0.4241, 0.3131]}, {"w": "shuffle", "b": [0.4315, 0.2982, 0.4834, 0.3131]}, {"w": "the", "b": [0.4908, 0.2982, 0.5169, 0.3131]}, {"w": "examples", "b": [0.5243, 0.2982, 0.5992, 0.3131]}, {"w": "and", "b": [0.6066, 0.2982, 0.6369, 0.3131]}, {"w": "split", "b": [0.6443, 0.2982, 0.68, 0.3131]}, {"w": "the", "b": [0.6873, 0.2982, 0.7135, 0.3131]}, {"w": "dataset", "b": [0.7208, 0.2982, 0.7806, 0.3131]}, {"w": "into", "b": [0.788, 0.2982, 0.8199, 0.3131]}, {"w": "three", "b": [0.8272, 0.2982, 0.8691, 0.3131]}, {"w": "distinct", "b": [0.1312, 0.3161, 0.1931, 0.3311]}, {"w": "sets:", "b": [0.1995, 0.3161, 0.2353, 0.3311]}, {"w": "training,", "b": [0.2441, 0.3161, 0.3228, 0.3314]}, {"w": "validation,", "b": [0.3293, 0.3161, 0.4253, 0.3314]}, {"w": "and", "b": [0.4319, 0.3161, 0.4622, 0.3311]}, {"w": "test.", "b": [0.4687, 0.3161, 0.5085, 0.3314]}, {"w": "The", "b": [0.5177, 0.3161, 0.5501, 0.3311]}, {"w": "training", "b": [0.5566, 0.3161, 0.6215, 0.3311]}, {"w": "set", "b": [0.6279, 0.3161, 0.6511, 0.3311]}, {"w": "is", "b": [0.6575, 0.3161, 0.6702, 0.3311]}, {"w": "usually", "b": [0.6767, 0.3161, 0.7348, 0.3311]}, {"w": "the", "b": [0.7413, 0.3161, 0.7675, 0.3311]}, {"w": "biggest", "b": [0.7739, 0.3161, 0.8316, 0.3311]}, {"w": "one;", "b": [0.838, 0.3161, 0.8715, 0.3311]}, {"w": "the", "b": [0.1312, 0.334, 0.1571, 0.349]}, {"w": "learning", "b": [0.1633, 0.334, 0.2285, 0.349]}, {"w": "algorithm", "b": [0.2347, 0.334, 0.3133, 0.349]}, {"w": "uses", "b": [0.3195, 0.334, 0.3529, 0.349]}, {"w": "the", "b": [0.359, 0.334, 0.3849, 0.349]}, {"w": "training", "b": [0.3911, 0.334, 0.4553, 0.349]}, {"w": "set", "b": [0.4615, 0.334, 0.4843, 0.349]}, {"w": "to", "b": [0.4905, 0.334, 0.507, 0.349]}, {"w": "produce", "b": [0.5132, 0.334, 0.5779, 0.349]}, {"w": "the", "b": [0.5841, 0.334, 0.61, 0.349]}, {"w": "model.", "b": [0.6161, 0.334, 0.6705, 0.349]}, {"w": "The", "b": [0.6787, 0.334, 0.7108, 0.349]}, {"w": "validation", "b": [0.717, 0.334, 0.7971, 0.349]}, {"w": "and", "b": [0.8033, 0.334, 0.8333, 0.349]}, {"w": "test", "b": [0.8395, 0.334, 0.8696, 0.349]}, {"w": "sets", "b": [0.1312, 0.352, 0.1613, 0.3669]}, {"w": "are", "b": [0.1674, 0.352, 0.1922, 0.3669]}, {"w": "roughly", "b": [0.1983, 0.352, 0.2595, 0.3669]}, {"w": "the", "b": [0.2657, 0.352, 0.2914, 0.3669]}, {"w": "same", "b": [0.2975, 0.352, 0.3377, 0.3669]}, {"w": "size,", "b": [0.3439, 0.352, 0.3779, 0.3669]}, {"w": "much", "b": [0.3841, 0.352, 0.4273, 0.3669]}, {"w": "smaller", "b": [0.4334, 0.352, 0.4911, 0.3669]}, {"w": "than", "b": [0.4973, 0.352, 0.5343, 0.3669]}, {"w": "the", "b": [0.5404, 0.352, 0.5662, 0.3669]}, {"w": "size", "b": [0.5723, 0.352, 0.6012, 0.3669]}, {"w": "of", "b": [0.6073, 0.352, 0.6223, 0.3669]}, {"w": "the", "b": [0.6284, 0.352, 0.6541, 0.3669]}, {"w": "training", "b": [0.6602, 0.352, 0.7241, 0.3669]}, {"w": "set.", "b": [0.7302, 0.352, 0.7581, 0.3669]}, {"w": "The", "b": [0.7663, 0.352, 0.7982, 0.3669]}, {"w": "learning", "b": [0.8043, 0.352, 0.8691, 0.3669]}, {"w": "algorithm", "b": [0.1312, 0.3699, 0.2089, 0.3849]}, {"w": "is", "b": [0.215, 0.3699, 0.2274, 0.3849]}, {"w": "not", "b": [0.2335, 0.3699, 0.2601, 0.3849]}, {"w": "allowed", "b": [0.2662, 0.3699, 0.3254, 0.3849]}, {"w": "to", "b": [0.3316, 0.3699, 0.3479, 0.3849]}, {"w": "use", "b": [0.3541, 0.3699, 0.3797, 0.3849]}, {"w": "examples", "b": [0.3858, 0.3699, 0.459, 0.3849]}, {"w": "from", "b": [0.4651, 0.3699, 0.5024, 0.3849]}, {"w": "the", "b": [0.5086, 0.3699, 0.5341, 0.3849]}, {"w": "validation", "b": [0.5402, 0.3699, 0.6194, 0.3849]}, {"w": "or", "b": [0.6255, 0.3699, 0.6419, 0.3849]}, {"w": "test", "b": [0.648, 0.3699, 0.6778, 0.3849]}, {"w": "sets", "b": [0.6839, 0.3699, 0.7137, 0.3849]}, {"w": "to", "b": [0.7199, 0.3699, 0.7362, 0.3849]}, {"w": "train", "b": [0.7423, 0.3699, 0.7812, 0.3849]}, {"w": "the", "b": [0.7873, 0.3699, 0.8129, 0.3849]}, {"w": "model.", "b": [0.819, 0.3699, 0.8726, 0.3849]}, {"w": "That", "b": [0.1306, 0.3879, 0.1705, 0.4028]}, {"w": "is", "b": [0.1767, 0.3879, 0.1891, 0.4028]}, {"w": "why", "b": [0.1953, 0.3879, 0.2281, 0.4028]}, {"w": "those", "b": [0.2342, 0.3879, 0.2764, 0.4028]}, {"w": "two", "b": [0.2825, 0.3879, 0.3112, 0.4028]}, {"w": "sets", "b": [0.3174, 0.3879, 0.3473, 0.4028]}, {"w": "are", "b": [0.3535, 0.3879, 0.3781, 0.4028]}, {"w": "also", "b": [0.3843, 0.3879, 0.4151, 0.4028]}, {"w": "called", "b": [0.4213, 0.3879, 0.4675, 0.4028]}, {"w": "holdout", "b": [0.4735, 0.3882, 0.5442, 0.4031]}, {"w": "sets.", "b": [0.5513, 0.3879, 0.5911, 0.4031]}]}, {"id": "b_5", "type": "paragraph", "text": "The reason to have three sets, and not one, is simple: when we train a model, we don’t want the model to only do well at predicting labels of examples the learning algorithm has already seen. A trivial algorithm that simply memorizes all training examples and then uses the memory to “predict” their labels will make no mistakes when asked to predict the labels of the training examples. However, such an algorithm would be useless in practice. What we really want is a model that is good at predicting examples that the learning algorithm didn’t see. In other words, we want good performance on a holdout set.8", "words": [{"w": "The", "b": [0.1306, 0.4148, 0.1618, 0.4298]}, {"w": "reason", "b": [0.1679, 0.4148, 0.2185, 0.4298]}, {"w": "to", "b": [0.2246, 0.4148, 0.2407, 0.4298]}, {"w": "have", "b": [0.2469, 0.4148, 0.2826, 0.4298]}, {"w": "three", "b": [0.2888, 0.4148, 0.3291, 0.4298]}, {"w": "sets,", "b": [0.3353, 0.4148, 0.3698, 0.4298]}, {"w": "and", "b": [0.3759, 0.4148, 0.4051, 0.4298]}, {"w": "not", "b": [0.4113, 0.4148, 0.4375, 0.4298]}, {"w": "one,", "b": [0.4436, 0.4148, 0.4759, 0.4298]}, {"w": "is", "b": [0.482, 0.4148, 0.4942, 0.4298]}, {"w": "simple:", "b": [0.5004, 0.4148, 0.5559, 0.4298]}, {"w": "when", "b": [0.5641, 0.4148, 0.6054, 0.4298]}, {"w": "we", "b": [0.6116, 0.4148, 0.6322, 0.4298]}, {"w": "train", "b": [0.6384, 0.4148, 0.6767, 0.4298]}, {"w": "a", "b": [0.6828, 0.4148, 0.6919, 0.4298]}, {"w": "model,", "b": [0.6981, 0.4148, 0.7509, 0.4298]}, {"w": "we", "b": [0.7571, 0.4148, 0.7777, 0.4298]}, {"w": "don’t", "b": [0.7839, 0.4148, 0.8252, 0.4298]}, {"w": "want", "b": [0.8313, 0.4148, 0.8696, 0.4298]}, {"w": "the", "b": [0.1312, 0.4328, 0.1564, 0.4477]}, {"w": "model", "b": [0.1624, 0.4328, 0.2101, 0.4477]}, {"w": "to", "b": [0.2161, 0.4328, 0.2322, 0.4477]}, {"w": "only", "b": [0.2382, 0.4328, 0.2719, 0.4477]}, {"w": "do", "b": [0.2779, 0.4328, 0.297, 0.4477]}, {"w": "well", "b": [0.303, 0.4328, 0.3337, 0.4477]}, {"w": "at", "b": [0.3397, 0.4328, 0.3558, 0.4477]}, {"w": "predicting", "b": [0.3618, 0.4328, 0.4413, 0.4477]}, {"w": "labels", "b": [0.4473, 0.4328, 0.4921, 0.4477]}, {"w": "of", "b": [0.4981, 0.4328, 0.5127, 0.4477]}, {"w": "examples", "b": [0.5187, 0.4328, 0.5907, 0.4477]}, {"w": "the", "b": [0.5967, 0.4328, 0.6218, 0.4477]}, {"w": "learning", "b": [0.6279, 0.4328, 0.6912, 0.4477]}, {"w": "algorithm", "b": [0.6973, 0.4328, 0.7736, 0.4477]}, {"w": "has", "b": [0.7797, 0.4328, 0.8059, 0.4477]}, {"w": "already", "b": [0.8119, 0.4328, 0.8698, 0.4477]}, {"w": "seen.", "b": [0.1312, 0.4507, 0.1711, 0.4657]}, {"w": "A", "b": [0.1816, 0.4507, 0.1958, 0.4657]}, {"w": "trivial", "b": [0.2027, 0.4507, 0.2524, 0.4657]}, {"w": "algorithm", "b": [0.2594, 0.4507, 0.3389, 0.4657]}, {"w": "that", "b": [0.3458, 0.4507, 0.3803, 0.4657]}, {"w": "simply", "b": [0.3873, 0.4507, 0.4412, 0.4657]}, {"w": "memorizes", "b": [0.4482, 0.4507, 0.5341, 0.4657]}, {"w": "all", "b": [0.541, 0.4507, 0.5609, 0.4657]}, {"w": "training", "b": [0.5678, 0.4507, 0.6327, 0.4657]}, {"w": "examples", "b": [0.6397, 0.4507, 0.7145, 0.4657]}, {"w": "and", "b": [0.7215, 0.4507, 0.7518, 0.4657]}, {"w": "then", "b": [0.7587, 0.4507, 0.7954, 0.4657]}, {"w": "uses", "b": [0.8023, 0.4507, 0.836, 0.4657]}, {"w": "the", "b": [0.8429, 0.4507, 0.8691, 0.4657]}, {"w": "memory", "b": [0.1312, 0.4686, 0.1966, 0.4836]}, {"w": "to", "b": [0.2027, 0.4686, 0.2192, 0.4836]}, {"w": "“predict”", "b": [0.2253, 0.4686, 0.2994, 0.4836]}, {"w": "their", "b": [0.3056, 0.4686, 0.3437, 0.4836]}, {"w": "labels", "b": [0.3498, 0.4686, 0.3957, 0.4836]}, {"w": "will", "b": [0.4019, 0.4686, 0.4307, 0.4836]}, {"w": "make", "b": [0.4368, 0.4686, 0.479, 0.4836]}, {"w": "no", "b": [0.4851, 0.4686, 0.5047, 0.4836]}, {"w": "mistakes", "b": [0.5108, 0.4686, 0.5799, 0.4836]}, {"w": "when", "b": [0.5861, 0.4686, 0.6282, 0.4836]}, {"w": "asked", "b": [0.6344, 0.4686, 0.6787, 0.4836]}, {"w": "to", "b": [0.6849, 0.4686, 0.7013, 0.4836]}, {"w": "predict", "b": [0.7075, 0.4686, 0.7641, 0.4836]}, {"w": "the", "b": [0.7703, 0.4686, 0.796, 0.4836]}, {"w": "labels", "b": [0.8021, 0.4686, 0.848, 0.4836]}, {"w": "of", "b": [0.8542, 0.4686, 0.8691, 0.4836]}, {"w": "the", "b": [0.1312, 0.4866, 0.1572, 0.5016]}, {"w": "training", "b": [0.1634, 0.4866, 0.2278, 0.5016]}, {"w": "examples.", "b": [0.234, 0.4866, 0.3136, 0.5016]}, {"w": "However,", "b": [0.3218, 0.4866, 0.3961, 0.5016]}, {"w": "such", "b": [0.4023, 0.4866, 0.4383, 0.5016]}, {"w": "an", "b": [0.4444, 0.4866, 0.4641, 0.5016]}, {"w": "algorithm", "b": [0.4703, 0.4866, 0.5493, 0.5016]}, {"w": "would", "b": [0.5554, 0.4866, 0.6037, 0.5016]}, {"w": "be", "b": [0.6099, 0.4866, 0.6291, 0.5016]}, {"w": "useless", "b": [0.6353, 0.4866, 0.6896, 0.5016]}, {"w": "in", "b": [0.6958, 0.4866, 0.7114, 0.5016]}, {"w": "practice.", "b": [0.7175, 0.4866, 0.7872, 0.5016]}, {"w": "What", "b": [0.7954, 0.4866, 0.8417, 0.5016]}, {"w": "we", "b": [0.8478, 0.4866, 0.8691, 0.5016]}, {"w": "really", "b": [0.1312, 0.5045, 0.175, 0.5195]}, {"w": "want", "b": [0.1811, 0.5045, 0.2192, 0.5195]}, {"w": "is", "b": [0.2253, 0.5045, 0.2375, 0.5195]}, {"w": "a", "b": [0.2435, 0.5045, 0.2526, 0.5195]}, {"w": "model", "b": [0.2587, 0.5045, 0.3064, 0.5195]}, {"w": "that", "b": [0.3125, 0.5045, 0.3456, 0.5195]}, {"w": "is", "b": [0.3517, 0.5045, 0.3639, 0.5195]}, {"w": "good", "b": [0.37, 0.5045, 0.4082, 0.5195]}, {"w": "at", "b": [0.4142, 0.5045, 0.4303, 0.5195]}, {"w": "predicting", "b": [0.4364, 0.5045, 0.5158, 0.5195]}, {"w": "examples", "b": [0.5219, 0.5045, 0.5939, 0.5195]}, {"w": "that", "b": [0.5999, 0.5045, 0.6331, 0.5195]}, {"w": "the", "b": [0.6392, 0.5045, 0.6643, 0.5195]}, {"w": "learning", "b": [0.6704, 0.5045, 0.7338, 0.5195]}, {"w": "algorithm", "b": [0.7398, 0.5045, 0.8162, 0.5195]}, {"w": "didn’t", "b": [0.8223, 0.5045, 0.8696, 0.5195]}, {"w": "see.", "b": [0.1312, 0.5225, 0.1601, 0.5374]}, {"w": "In", "b": [0.1683, 0.5225, 0.1852, 0.5374]}, {"w": "other", "b": [0.1913, 0.5225, 0.2334, 0.5374]}, {"w": "words,", "b": [0.2396, 0.5225, 0.2915, 0.5374]}, {"w": "we", "b": [0.2977, 0.5225, 0.3187, 0.5374]}, {"w": "want", "b": [0.3248, 0.5225, 0.3638, 0.5374]}, {"w": "good", "b": [0.3699, 0.5225, 0.4089, 0.5374]}, {"w": "performance", "b": [0.415, 0.5225, 0.5146, 0.5374]}, {"w": "on", "b": [0.5208, 0.5225, 0.5403, 0.5374]}, {"w": "a", "b": [0.5464, 0.5225, 0.5556, 0.5374]}, {"w": "holdout", "b": [0.5618, 0.5225, 0.6233, 0.5374]}, {"w": "set.8", "b": [0.6295, 0.5209, 0.6644, 0.5374]}]}, {"id": "b_6", "type": "paragraph", "text": "We need two holdout sets and not one because we use the validation set to 1) choose the", "words": [{"w": "We", "b": [0.1303, 0.5494, 0.1565, 0.5644]}, {"w": "need", "b": [0.1631, 0.5494, 0.2007, 0.5644]}, {"w": "two", "b": [0.2073, 0.5494, 0.2366, 0.5644]}, {"w": "holdout", "b": [0.2432, 0.5494, 0.306, 0.5644]}, {"w": "sets", "b": [0.3126, 0.5494, 0.3431, 0.5644]}, {"w": "and", "b": [0.3497, 0.5494, 0.38, 0.5644]}, {"w": "not", "b": [0.3866, 0.5494, 0.4138, 0.5644]}, {"w": "one", "b": [0.4204, 0.5494, 0.4487, 0.5644]}, {"w": "because", "b": [0.4552, 0.5494, 0.5186, 0.5644]}, {"w": "we", "b": [0.5253, 0.5494, 0.5467, 0.5644]}, {"w": "use", "b": [0.5533, 0.5494, 0.5796, 0.5644]}, {"w": "the", "b": [0.5861, 0.5494, 0.6123, 0.5644]}, {"w": "validation", "b": [0.6189, 0.5494, 0.7, 0.5644]}, {"w": "set", "b": [0.7066, 0.5494, 0.7297, 0.5644]}, {"w": "to", "b": [0.7363, 0.5494, 0.753, 0.5644]}, {"w": "1)", "b": [0.7596, 0.5494, 0.7763, 0.5644]}, {"w": "choose", "b": [0.7829, 0.5494, 0.8364, 0.5644]}, {"w": "the", "b": [0.843, 0.5494, 0.8691, 0.5644]}]}, {"id": "b_7", "type": "paragraph", "text": "learning algorithm, and 2) find the best configuration values for that learning algorithm (known as hyperparameters). We use the test set to assess the model before delivering it", "words": [{"w": "learning", "b": [0.1312, 0.5674, 0.1972, 0.5823]}, {"w": "algorithm,", "b": [0.2045, 0.5674, 0.2893, 0.5823]}, {"w": "and", "b": [0.2969, 0.5674, 0.3272, 0.5823]}, {"w": "2)", "b": [0.3346, 0.5674, 0.3513, 0.5823]}, {"w": "find", "b": [0.3586, 0.5674, 0.39, 0.5823]}, {"w": "the", "b": [0.3973, 0.5674, 0.4235, 0.5823]}, {"w": "best", "b": [0.4308, 0.5674, 0.4649, 0.5823]}, {"w": "configuration", "b": [0.4723, 0.5674, 0.5801, 0.5823]}, {"w": "values", "b": [0.5874, 0.5674, 0.6372, 0.5823]}, {"w": "for", "b": [0.6445, 0.5674, 0.6671, 0.5823]}, {"w": "that", "b": [0.6744, 0.5674, 0.7089, 0.5823]}, {"w": "learning", "b": [0.7163, 0.5674, 0.7822, 0.5823]}, {"w": "algorithm", "b": [0.7896, 0.5674, 0.8691, 0.5823]}, {"w": "(known", "b": [0.1291, 0.5853, 0.1886, 0.6003]}, {"w": "as", "b": [0.1948, 0.5853, 0.2113, 0.6003]}, {"w": "hyperparameters).", "b": [0.2174, 0.5853, 0.3866, 0.6006]}, {"w": "We", "b": [0.3949, 0.5853, 0.4205, 0.6003]}, {"w": "use", "b": [0.4267, 0.5853, 0.4525, 0.6003]}, {"w": "the", "b": [0.4586, 0.5853, 0.4843, 0.6003]}, {"w": "test", "b": [0.4905, 0.5853, 0.5203, 0.6003]}, {"w": "set", "b": [0.5265, 0.5853, 0.5492, 0.6003]}, {"w": "to", "b": [0.5554, 0.5853, 0.5718, 0.6003]}, {"w": "assess", "b": [0.5779, 0.5853, 0.6246, 0.6003]}, {"w": "the", "b": [0.6307, 0.5853, 0.6564, 0.6003]}, {"w": "model", "b": [0.6626, 0.5853, 0.7113, 0.6003]}, {"w": "before", "b": [0.7175, 0.5853, 0.7668, 0.6003]}, {"w": "delivering", "b": [0.773, 0.5853, 0.8511, 0.6003]}, {"w": "it", "b": [0.8572, 0.5853, 0.8696, 0.6003]}]}, {"id": "b_8", "type": "paragraph", "text": "to the client or putting it in production. That is why it’s important to make sure that no information from the validation or test sets is exposed to the learning algorithm. Otherwise, the validation and test results will most likely be too optimistic. This can indeed happen due to data leakage, an important phenomenon we consider in Section ?? of Chapter 3 and subsequent chapters.", "words": [{"w": "to", "b": [0.1312, 0.6032, 0.148, 0.6182]}, {"w": "the", "b": [0.1542, 0.6032, 0.1803, 0.6182]}, {"w": "client", "b": [0.1865, 0.6032, 0.231, 0.6182]}, {"w": "or", "b": [0.2372, 0.6032, 0.254, 0.6182]}, {"w": "putting", "b": [0.2602, 0.6032, 0.3209, 0.6182]}, {"w": "it", "b": [0.3271, 0.6032, 0.3396, 0.6182]}, {"w": "in", "b": [0.3458, 0.6032, 0.3615, 0.6182]}, {"w": "production.", "b": [0.3677, 0.6032, 0.4624, 0.6182]}, {"w": "That", "b": [0.4708, 0.6032, 0.5116, 0.6182]}, {"w": "is", "b": [0.5178, 0.6032, 0.5304, 0.6182]}, {"w": "why", "b": [0.5366, 0.6032, 0.5701, 0.6182]}, {"w": "it’s", "b": [0.5763, 0.6032, 0.6015, 0.6182]}, {"w": "important", "b": [0.6077, 0.6032, 0.6904, 0.6182]}, {"w": "to", "b": [0.6966, 0.6032, 0.7133, 0.6182]}, {"w": "make", "b": [0.7195, 0.6032, 0.7624, 0.6182]}, {"w": "sure", "b": [0.7686, 0.6032, 0.8023, 0.6182]}, {"w": "that", "b": [0.8085, 0.6032, 0.843, 0.6182]}, {"w": "no", "b": [0.8492, 0.6032, 0.8691, 0.6182]}, {"w": "information", "b": [0.1312, 0.6212, 0.2242, 0.6362]}, {"w": "from", "b": [0.2303, 0.6212, 0.2674, 0.6362]}, {"w": "the", "b": [0.2736, 0.6212, 0.299, 0.6362]}, {"w": "validation", "b": [0.3051, 0.6212, 0.3838, 0.6362]}, {"w": "or", "b": [0.39, 0.6212, 0.4062, 0.6362]}, {"w": "test", "b": [0.4124, 0.6212, 0.442, 0.6362]}, {"w": "sets", "b": [0.4481, 0.6212, 0.4778, 0.6362]}, {"w": "is", "b": [0.4839, 0.6212, 0.4962, 0.6362]}, {"w": "exposed", "b": [0.5024, 0.6212, 0.5654, 0.6362]}, {"w": "to", "b": [0.5716, 0.6212, 0.5879, 0.6362]}, {"w": "the", "b": [0.594, 0.6212, 0.6194, 0.6362]}, {"w": "learning", "b": [0.6256, 0.6212, 0.6896, 0.6362]}, {"w": "algorithm.", "b": [0.6957, 0.6212, 0.778, 0.6362]}, {"w": "Otherwise,", "b": [0.7862, 0.6212, 0.8717, 0.6362]}, {"w": "the", "b": [0.1312, 0.6391, 0.1564, 0.6541]}, {"w": "validation", "b": [0.1622, 0.6391, 0.24, 0.6541]}, {"w": "and", "b": [0.2458, 0.6391, 0.275, 0.6541]}, {"w": "test", "b": [0.2808, 0.6391, 0.3101, 0.6541]}, {"w": "results", "b": [0.3159, 0.6391, 0.3674, 0.6541]}, {"w": "will", "b": [0.3732, 0.6391, 0.4014, 0.6541]}, {"w": "most", "b": [0.4072, 0.6391, 0.4454, 0.6541]}, {"w": "likely", "b": [0.4513, 0.6391, 0.493, 0.6541]}, {"w": "be", "b": [0.4988, 0.6391, 0.5174, 0.6541]}, {"w": "too", "b": [0.5232, 0.6391, 0.5488, 0.6541]}, {"w": "optimistic.", "b": [0.5546, 0.6391, 0.6382, 0.6541]}, {"w": "This", "b": [0.6462, 0.6391, 0.6815, 0.6541]}, {"w": "can", "b": [0.6873, 0.6391, 0.7145, 0.6541]}, {"w": "indeed", "b": [0.7203, 0.6391, 0.7715, 0.6541]}, {"w": "happen", "b": [0.7774, 0.6391, 0.8352, 0.6541]}, {"w": "due", "b": [0.841, 0.6391, 0.8691, 0.6541]}, {"w": "to", "b": [0.1312, 0.6571, 0.148, 0.672]}, {"w": "data", "b": [0.1547, 0.6574, 0.1954, 0.6724]}, {"w": "leakage,", "b": [0.2031, 0.6571, 0.2761, 0.6724]}, {"w": "an", "b": [0.283, 0.6571, 0.3029, 0.672]}, {"w": "important", "b": [0.3096, 0.6571, 0.3923, 0.672]}, {"w": "phenomenon", "b": [0.399, 0.6571, 0.5026, 0.672]}, {"w": "we", "b": [0.5093, 0.6571, 0.5307, 0.672]}, {"w": "consider", "b": [0.5375, 0.6571, 0.6046, 0.672]}, {"w": "in", "b": [0.6113, 0.6571, 0.627, 0.672]}, {"w": "Section", "b": [0.6338, 0.6571, 0.6934, 0.672]}, {"w": "??", "b": [0.6999, 0.6574, 0.72, 0.6724]}, {"w": "of", "b": [0.7267, 0.6571, 0.7419, 0.672]}, {"w": "Chapter", "b": [0.7486, 0.6571, 0.8156, 0.672]}, {"w": "3", "b": [0.8223, 0.6571, 0.8318, 0.672]}, {"w": "and", "b": [0.8385, 0.6571, 0.8688, 0.672]}, {"w": "subsequent", "b": [0.1312, 0.675, 0.2197, 0.69]}, {"w": "chapters.", "b": [0.2258, 0.675, 0.2983, 0.69]}]}, {"id": "b_9", "type": "paragraph", "text": "7In some literature, the validation set can also be called “development set.” Sometimes, when the labeled examples are scarce, analysts can decide to work without a validation set, as we will see in Chapter 5 in the section on cross-validation.", "words": [{"w": "7In", "b": [0.1518, 0.7021, 0.1737, 0.7159]}, {"w": "some", "b": [0.1789, 0.704, 0.2126, 0.7159]}, {"w": "literature,", "b": [0.2178, 0.704, 0.2851, 0.7159]}, {"w": "the", "b": [0.2903, 0.704, 0.3119, 0.7159]}, {"w": "validation", "b": [0.3171, 0.704, 0.3839, 0.7159]}, {"w": "set", "b": [0.3891, 0.704, 0.4082, 0.7159]}, {"w": "can", "b": [0.4134, 0.704, 0.4367, 0.7159]}, {"w": "also", "b": [0.4419, 0.704, 0.4679, 0.7159]}, {"w": "be", "b": [0.4731, 0.704, 0.489, 0.7159]}, {"w": "called", "b": [0.4943, 0.704, 0.5331, 0.7159]}, {"w": "“development", "b": [0.5383, 0.704, 0.6305, 0.7159]}, {"w": "set.”", "b": [0.6358, 0.704, 0.6643, 0.7159]}, {"w": "Sometimes,", "b": [0.6713, 0.704, 0.7481, 0.7159]}, {"w": "when", "b": [0.7533, 0.704, 0.7886, 0.7159]}, {"w": "the", "b": [0.7939, 0.704, 0.8154, 0.7159]}, {"w": "labeled", "b": [0.8206, 0.704, 0.8685, 0.7159]}, {"w": "examples", "b": [0.1312, 0.7182, 0.1932, 0.7301]}, {"w": "are", "b": [0.1984, 0.7182, 0.2192, 0.7301]}, {"w": "scarce,", "b": [0.2244, 0.7182, 0.2694, 0.7301]}, {"w": "analysts", "b": [0.2747, 0.7182, 0.3298, 0.7301]}, {"w": "can", "b": [0.335, 0.7182, 0.3583, 0.7301]}, {"w": "decide", "b": [0.3635, 0.7182, 0.4059, 0.7301]}, {"w": "to", "b": [0.4112, 0.7182, 0.425, 0.7301]}, {"w": "work", "b": [0.4302, 0.7182, 0.4631, 0.7301]}, {"w": "without", "b": [0.4683, 0.7182, 0.5211, 0.7301]}, {"w": "a", "b": [0.5263, 0.7182, 0.5341, 0.7301]}, {"w": "validation", "b": [0.5393, 0.7182, 0.6063, 0.7301]}, {"w": "set,", "b": [0.6115, 0.7182, 0.635, 0.7301]}, {"w": "as", "b": [0.6402, 0.7182, 0.6541, 0.7301]}, {"w": "we", "b": [0.6593, 0.7182, 0.6771, 0.7301]}, {"w": "will", "b": [0.6823, 0.7182, 0.7065, 0.7301]}, {"w": "see", "b": [0.7117, 0.7182, 0.7317, 0.7301]}, {"w": "in", "b": [0.7369, 0.7182, 0.7499, 0.7301]}, {"w": "Chapter", "b": [0.7551, 0.7182, 0.8105, 0.7301]}, {"w": "5", "b": [0.8157, 0.7182, 0.8235, 0.7301]}, {"w": "in", "b": [0.8287, 0.7182, 0.8417, 0.7301]}, {"w": "the", "b": [0.8469, 0.7182, 0.8685, 0.7301]}, {"w": "section", "b": [0.1312, 0.7324, 0.1783, 0.7444]}, {"w": "on", "b": [0.1836, 0.7324, 0.2001, 0.7444]}, {"w": "cross-validation.", "b": [0.2054, 0.7323, 0.3319, 0.7444]}]}, {"id": "b_10", "type": "paragraph", "text": "8To be precise, we want the model to do well on most random samples from the statistical distribution to which our data belongs. We assume that if the model demonstrates good performance on a holdout set, randomly drawn from the unknown distribution of our data, there are high chances that our model will do well on other random samples of our data.", "words": [{"w": "8To", "b": [0.1518, 0.7447, 0.1776, 0.7586]}, {"w": "be", "b": [0.1828, 0.7465, 0.1992, 0.7586]}, {"w": "precise,", "b": [0.2044, 0.7465, 0.2558, 0.7586]}, {"w": "we", "b": [0.261, 0.7465, 0.2791, 0.7586]}, {"w": "want", "b": [0.2843, 0.7465, 0.3179, 0.7586]}, {"w": "the", "b": [0.3231, 0.7465, 0.3452, 0.7586]}, {"w": "model", "b": [0.3505, 0.7465, 0.3924, 0.7586]}, {"w": "to", "b": [0.3976, 0.7465, 0.4118, 0.7586]}, {"w": "do", "b": [0.417, 0.7465, 0.4338, 0.7586]}, {"w": "well", "b": [0.439, 0.7465, 0.466, 0.7586]}, {"w": "on", "b": [0.4712, 0.7465, 0.488, 0.7586]}, {"w": "most", "b": [0.4932, 0.7465, 0.5269, 0.7586]}, {"w": "random", "b": [0.5321, 0.7465, 0.5851, 0.7586]}, {"w": "samples", "b": [0.5904, 0.7465, 0.6445, 0.7586]}, {"w": "from", "b": [0.6497, 0.7465, 0.682, 0.7586]}, {"w": "the", "b": [0.6872, 0.7465, 0.7093, 0.7586]}, {"w": "statistical", "b": [0.7145, 0.7465, 0.7819, 0.7586]}, {"w": "distribution", "b": [0.7871, 0.7465, 0.8685, 0.7586]}, {"w": "to", "b": [0.1312, 0.7608, 0.1453, 0.7728]}, {"w": "which", "b": [0.1505, 0.7608, 0.1906, 0.7728]}, {"w": "our", "b": [0.1958, 0.7608, 0.2187, 0.7728]}, {"w": "data", "b": [0.2239, 0.7608, 0.2547, 0.7728]}, {"w": "belongs.", "b": [0.2599, 0.7608, 0.3158, 0.7728]}, {"w": "We", "b": [0.3228, 0.7608, 0.3448, 0.7728]}, {"w": "assume", "b": [0.35, 0.7608, 0.3995, 0.7728]}, {"w": "that", "b": [0.4047, 0.7608, 0.4337, 0.7728]}, {"w": "if", "b": [0.4389, 0.7608, 0.4482, 0.7728]}, {"w": "the", "b": [0.4534, 0.7608, 0.4754, 0.7728]}, {"w": "model", "b": [0.4806, 0.7608, 0.5224, 0.7728]}, {"w": "demonstrates", "b": [0.5276, 0.7608, 0.6193, 0.7728]}, {"w": "good", "b": [0.6245, 0.7608, 0.6579, 0.7728]}, {"w": "performance", "b": [0.6632, 0.7608, 0.7485, 0.7728]}, {"w": "on", "b": [0.7537, 0.7608, 0.7704, 0.7728]}, {"w": "a", "b": [0.7757, 0.7608, 0.7836, 0.7728]}, {"w": "holdout", "b": [0.7888, 0.7608, 0.8416, 0.7728]}, {"w": "set,", "b": [0.8468, 0.7608, 0.8707, 0.7728]}, {"w": "randomly", "b": [0.1312, 0.775, 0.1966, 0.787]}, {"w": "drawn", "b": [0.2018, 0.775, 0.2444, 0.787]}, {"w": "from", "b": [0.2496, 0.775, 0.2816, 0.787]}, {"w": "the", "b": [0.2868, 0.775, 0.3088, 0.787]}, {"w": "unknown", "b": [0.314, 0.775, 0.3763, 0.787]}, {"w": "distribution", "b": [0.3815, 0.775, 0.4623, 0.787]}, {"w": "of", "b": [0.4675, 0.775, 0.4802, 0.787]}, {"w": "our", "b": [0.4855, 0.775, 0.5083, 0.787]}, {"w": "data,", "b": [0.5135, 0.775, 0.5486, 0.787]}, {"w": "there", "b": [0.5538, 0.775, 0.5889, 0.787]}, {"w": "are", "b": [0.5941, 0.775, 0.6152, 0.787]}, {"w": "high", "b": [0.6204, 0.775, 0.6502, 0.787]}, {"w": "chances", "b": [0.6555, 0.775, 0.7077, 0.787]}, {"w": "that", "b": [0.713, 0.775, 0.7419, 0.787]}, {"w": "our", "b": [0.7471, 0.775, 0.7699, 0.787]}, {"w": "model", "b": [0.7752, 0.775, 0.8168, 0.787]}, {"w": "will", "b": [0.822, 0.775, 0.8466, 0.787]}, {"w": "do", "b": [0.8518, 0.775, 0.8685, 0.787]}, {"w": "well", "b": [0.1307, 0.7892, 0.1572, 0.8012]}, {"w": "on", "b": [0.1625, 0.7892, 0.179, 0.8012]}, {"w": "other", "b": [0.1842, 0.7892, 0.2199, 0.8012]}, {"w": "random", "b": [0.2252, 0.7892, 0.2774, 0.8012]}, {"w": "samples", "b": [0.2827, 0.7892, 0.336, 0.8012]}, {"w": "of", "b": [0.3412, 0.7892, 0.3538, 0.8012]}, {"w": "our", "b": [0.359, 0.7892, 0.3817, 0.8012]}, {"w": "data.", "b": [0.3869, 0.7892, 0.4218, 0.8012]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "11", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 20, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "1.3.4 Baseline", "words": [{"w": "1.3.4", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Baseline", "b": [0.1961, 0.0884, 0.2729, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "In machine learning, a baseline is a simple algorithm for solving a problem, usually based on a heuristic, simple summary statistics, randomization, or very basic machine learning algorithm. For example, if your problem is classification, you can pick a baseline classifier and measure its performance. This baseline performance will then become what you compare any future model to (usually, built using a more sophisticated approach).", "words": [{"w": "In", "b": [0.1312, 0.1247, 0.1483, 0.1396]}, {"w": "machine", "b": [0.1544, 0.1247, 0.2211, 0.1396]}, {"w": "learning,", "b": [0.2273, 0.1247, 0.2976, 0.1396]}, {"w": "a", "b": [0.3038, 0.1247, 0.3131, 0.1396]}, {"w": "baseline", "b": [0.3193, 0.125, 0.3928, 0.1399]}, {"w": "is", "b": [0.399, 0.1247, 0.4115, 0.1396]}, {"w": "a", "b": [0.4176, 0.1247, 0.4269, 0.1396]}, {"w": "simple", "b": [0.4331, 0.1247, 0.4849, 0.1396]}, {"w": "algorithm", "b": [0.491, 0.1247, 0.5696, 0.1396]}, {"w": "for", "b": [0.5758, 0.1247, 0.598, 0.1396]}, {"w": "solving", "b": [0.6042, 0.1247, 0.6606, 0.1396]}, {"w": "a", "b": [0.6668, 0.1247, 0.6761, 0.1396]}, {"w": "problem,", "b": [0.6822, 0.1247, 0.7536, 0.1396]}, {"w": "usually", "b": [0.7597, 0.1247, 0.8172, 0.1396]}, {"w": "based", "b": [0.8234, 0.1247, 0.869, 0.1396]}, {"w": "on", "b": [0.1312, 0.1426, 0.1511, 0.1576]}, {"w": "a", "b": [0.1581, 0.1426, 0.1675, 0.1576]}, {"w": "heuristic,", "b": [0.1745, 0.1426, 0.25, 0.1576]}, {"w": "simple", "b": [0.2571, 0.1426, 0.3095, 0.1576]}, {"w": "summary", "b": [0.3165, 0.1426, 0.3925, 0.1576]}, {"w": "statistics,", "b": [0.3994, 0.1426, 0.4772, 0.1576]}, {"w": "randomization,", "b": [0.4844, 0.1426, 0.6078, 0.1576]}, {"w": "or", "b": [0.615, 0.1426, 0.6318, 0.1576]}, {"w": "very", "b": [0.6387, 0.1426, 0.6739, 0.1576]}, {"w": "basic", "b": [0.6808, 0.1426, 0.7217, 0.1576]}, {"w": "machine", "b": [0.7287, 0.1426, 0.7962, 0.1576]}, {"w": "learning", "b": [0.8032, 0.1426, 0.8691, 0.1576]}, {"w": "algorithm.", "b": [0.1312, 0.1606, 0.216, 0.1755]}, {"w": "For", "b": [0.2242, 0.1606, 0.2518, 0.1755]}, {"w": "example,", "b": [0.2579, 0.1606, 0.3306, 0.1755]}, {"w": "if", "b": [0.3368, 0.1606, 0.3478, 0.1755]}, {"w": "your", "b": [0.3539, 0.1606, 0.3906, 0.1755]}, {"w": "problem", "b": [0.3968, 0.1606, 0.4638, 0.1755]}, {"w": "is", "b": [0.4699, 0.1606, 0.4826, 0.1755]}, {"w": "classification,", "b": [0.4888, 0.1606, 0.5978, 0.1755]}, {"w": "you", "b": [0.6039, 0.1606, 0.6332, 0.1755]}, {"w": "can", "b": [0.6394, 0.1606, 0.6676, 0.1755]}, {"w": "pick", "b": [0.6738, 0.1606, 0.7073, 0.1755]}, {"w": "a", "b": [0.7135, 0.1606, 0.7229, 0.1755]}, {"w": "baseline", "b": [0.729, 0.1606, 0.794, 0.1755]}, {"w": "classifier", "b": [0.8002, 0.1606, 0.8695, 0.1755]}, {"w": "and", "b": [0.1312, 0.1785, 0.1604, 0.1935]}, {"w": "measure", "b": [0.1661, 0.1785, 0.2306, 0.1935]}, {"w": "its", "b": [0.2364, 0.1785, 0.2556, 0.1935]}, {"w": "performance.", "b": [0.2613, 0.1785, 0.3639, 0.1935]}, {"w": "This", "b": [0.372, 0.1785, 0.4073, 0.1935]}, {"w": "baseline", "b": [0.413, 0.1785, 0.4754, 0.1935]}, {"w": "performance", "b": [0.4812, 0.1785, 0.5788, 0.1935]}, {"w": "will", "b": [0.5846, 0.1785, 0.6127, 0.1935]}, {"w": "then", "b": [0.6184, 0.1785, 0.6536, 0.1935]}, {"w": "become", "b": [0.6594, 0.1785, 0.7182, 0.1935]}, {"w": "what", "b": [0.7239, 0.1785, 0.7631, 0.1935]}, {"w": "you", "b": [0.7689, 0.1785, 0.797, 0.1935]}, {"w": "compare", "b": [0.8027, 0.1785, 0.8691, 0.1935]}, {"w": "any", "b": [0.1312, 0.1965, 0.1599, 0.2114]}, {"w": "future", "b": [0.1661, 0.1965, 0.2149, 0.2114]}, {"w": "model", "b": [0.221, 0.1965, 0.2697, 0.2114]}, {"w": "to", "b": [0.2759, 0.1965, 0.2923, 0.2114]}, {"w": "(usually,", "b": [0.2984, 0.1965, 0.3662, 0.2114]}, {"w": "built", "b": [0.3724, 0.1965, 0.4103, 0.2114]}, {"w": "using", "b": [0.4165, 0.1965, 0.4586, 0.2114]}, {"w": "a", "b": [0.4648, 0.1965, 0.474, 0.2114]}, {"w": "more", "b": [0.4801, 0.1965, 0.5202, 0.2114]}, {"w": "sophisticated", "b": [0.5263, 0.1965, 0.6311, 0.2114]}, {"w": "approach).", "b": [0.6373, 0.1965, 0.723, 0.2114]}]}, {"id": "b_2", "type": "paragraph", "text": "1.3.5 Machine Learning Pipeline", "words": [{"w": "1.3.5", "b": [0.1312, 0.2446, 0.1749, 0.2596]}, {"w": "Machine", "b": [0.1961, 0.2446, 0.2746, 0.2596]}, {"w": "Learning", "b": [0.2817, 0.2446, 0.3633, 0.2596]}, {"w": "Pipeline", "b": [0.3704, 0.2446, 0.4462, 0.2596]}]}, {"id": "b_3", "type": "paragraph", "text": "A machine learning pipeline is a sequence of operations on the dataset that goes from its initial state to the model.", "words": [{"w": "A", "b": [0.1305, 0.2809, 0.1446, 0.2958]}, {"w": "machine", "b": [0.1507, 0.2809, 0.2179, 0.2958]}, {"w": "learning", "b": [0.2241, 0.2809, 0.2897, 0.2958]}, {"w": "pipeline", "b": [0.296, 0.2812, 0.3691, 0.2962]}, {"w": "is", "b": [0.3753, 0.2809, 0.3879, 0.2958]}, {"w": "a", "b": [0.394, 0.2809, 0.4034, 0.2958]}, {"w": "sequence", "b": [0.4095, 0.2809, 0.481, 0.2958]}, {"w": "of", "b": [0.4871, 0.2809, 0.5022, 0.2958]}, {"w": "operations", "b": [0.5084, 0.2809, 0.5934, 0.2958]}, {"w": "on", "b": [0.5996, 0.2809, 0.6193, 0.2958]}, {"w": "the", "b": [0.6255, 0.2809, 0.6515, 0.2958]}, {"w": "dataset", "b": [0.6577, 0.2809, 0.7171, 0.2958]}, {"w": "that", "b": [0.7233, 0.2809, 0.7576, 0.2958]}, {"w": "goes", "b": [0.7638, 0.2809, 0.7988, 0.2958]}, {"w": "from", "b": [0.8049, 0.2809, 0.843, 0.2958]}, {"w": "its", "b": [0.8491, 0.2809, 0.869, 0.2958]}, {"w": "initial", "b": [0.1312, 0.2988, 0.1784, 0.3138]}, {"w": "state", "b": [0.1846, 0.2988, 0.2236, 0.3138]}, {"w": "to", "b": [0.2298, 0.2988, 0.2462, 0.3138]}, {"w": "the", "b": [0.2523, 0.2988, 0.278, 0.3138]}, {"w": "model.", "b": [0.2841, 0.2988, 0.338, 0.3138]}]}, {"id": "b_4", "type": "paragraph", "text": "A pipeline can include, among others, such stages as data partitioning, missing data im- putation, feature extraction, data augmentation, class imbalance reduction, dimensionality reduction, and model training.", "words": [{"w": "A", "b": [0.1305, 0.3258, 0.1446, 0.3407]}, {"w": "pipeline", "b": [0.1519, 0.3258, 0.2162, 0.3407]}, {"w": "can", "b": [0.2235, 0.3258, 0.2517, 0.3407]}, {"w": "include,", "b": [0.2589, 0.3258, 0.3228, 0.3407]}, {"w": "among", "b": [0.3303, 0.3258, 0.3846, 0.3407]}, {"w": "others,", "b": [0.3919, 0.3258, 0.4475, 0.3407]}, {"w": "such", "b": [0.455, 0.3258, 0.4912, 0.3407]}, {"w": "stages", "b": [0.4984, 0.3258, 0.5478, 0.3407]}, {"w": "as", "b": [0.5551, 0.3258, 0.5719, 0.3407]}, {"w": "data", "b": [0.5791, 0.3258, 0.6157, 0.3407]}, {"w": "partitioning,", "b": [0.623, 0.3258, 0.7255, 0.3407]}, {"w": "missing", "b": [0.733, 0.3258, 0.7939, 0.3407]}, {"w": "data", "b": [0.8012, 0.3258, 0.8378, 0.3407]}, {"w": "im-", "b": [0.845, 0.3258, 0.8722, 0.3407]}, {"w": "putation,", "b": [0.1312, 0.3437, 0.2057, 0.3587]}, {"w": "feature", "b": [0.2119, 0.3437, 0.2683, 0.3587]}, {"w": "extraction,", "b": [0.2744, 0.3437, 0.3619, 0.3587]}, {"w": "data", "b": [0.368, 0.3437, 0.4042, 0.3587]}, {"w": "augmentation,", "b": [0.4104, 0.3437, 0.5268, 0.3587]}, {"w": "class", "b": [0.5329, 0.3437, 0.5703, 0.3587]}, {"w": "imbalance", "b": [0.5765, 0.3437, 0.6577, 0.3587]}, {"w": "reduction,", "b": [0.6638, 0.3437, 0.7456, 0.3587]}, {"w": "dimensionality", "b": [0.7517, 0.3437, 0.8698, 0.3587]}, {"w": "reduction,", "b": [0.1312, 0.3617, 0.2123, 0.3766]}, {"w": "and", "b": [0.2185, 0.3617, 0.2482, 0.3766]}, {"w": "model", "b": [0.2543, 0.3617, 0.3031, 0.3766]}, {"w": "training.", "b": [0.3092, 0.3617, 0.378, 0.3766]}]}, {"id": "b_5", "type": "paragraph", "text": "In practice, when we deploy a model in production, we usually deploy an entire pipeline. Furthermore, an entire pipeline is usually optimized when hyperparameters are tuned.", "words": [{"w": "In", "b": [0.1312, 0.3886, 0.1485, 0.4035]}, {"w": "practice,", "b": [0.1555, 0.3886, 0.2256, 0.4035]}, {"w": "when", "b": [0.2328, 0.3886, 0.2756, 0.4035]}, {"w": "we", "b": [0.2826, 0.3886, 0.3041, 0.4035]}, {"w": "deploy", "b": [0.311, 0.3886, 0.3644, 0.4035]}, {"w": "a", "b": [0.3713, 0.3886, 0.3807, 0.4035]}, {"w": "model", "b": [0.3877, 0.3886, 0.4374, 0.4035]}, {"w": "in", "b": [0.4443, 0.3886, 0.46, 0.4035]}, {"w": "production,", "b": [0.467, 0.3886, 0.5617, 0.4035]}, {"w": "we", "b": [0.5689, 0.3886, 0.5903, 0.4035]}, {"w": "usually", "b": [0.5973, 0.3886, 0.6554, 0.4035]}, {"w": "deploy", "b": [0.6624, 0.3886, 0.7158, 0.4035]}, {"w": "an", "b": [0.7227, 0.3886, 0.7426, 0.4035]}, {"w": "entire", "b": [0.7496, 0.3886, 0.7962, 0.4035]}, {"w": "pipeline.", "b": [0.8031, 0.3886, 0.8727, 0.4035]}, {"w": "Furthermore,", "b": [0.1312, 0.4065, 0.2373, 0.4215]}, {"w": "an", "b": [0.2434, 0.4065, 0.2629, 0.4215]}, {"w": "entire", "b": [0.269, 0.4065, 0.3147, 0.4215]}, {"w": "pipeline", "b": [0.3209, 0.4065, 0.384, 0.4215]}, {"w": "is", "b": [0.3901, 0.4065, 0.4025, 0.4215]}, {"w": "usually", "b": [0.4087, 0.4065, 0.4657, 0.4215]}, {"w": "optimized", "b": [0.4719, 0.4065, 0.5508, 0.4215]}, {"w": "when", "b": [0.557, 0.4065, 0.599, 0.4215]}, {"w": "hyperparameters", "b": [0.6052, 0.4065, 0.7403, 0.4215]}, {"w": "are", "b": [0.7464, 0.4065, 0.7711, 0.4215]}, {"w": "tuned.", "b": [0.7773, 0.4065, 0.8285, 0.4215]}]}, {"id": "b_6", "type": "paragraph", "text": "1.3.6 Parameters vs. Hyperparameters", "words": [{"w": "1.3.6", "b": [0.1312, 0.4547, 0.1749, 0.4696]}, {"w": "Parameters", "b": [0.1961, 0.4547, 0.3019, 0.4696]}, {"w": "vs.", "b": [0.3089, 0.4547, 0.3344, 0.4696]}, {"w": "Hyperparameters", "b": [0.3415, 0.4547, 0.5038, 0.4696]}]}, {"id": "b_7", "type": "paragraph", "text": "Hyperparameters are inputs of machine learning algorithms or pipelines that influence the performance of the model. They don’t belong to the training data and cannot be learned from it. For example, the maximum depth of the tree in the decision tree learning algorithm, the misclassification penalty in support vector machines, k in the k-nearest neighbors algorithm, the target dimensionality in dimensionality reduction, and the choice of the missing data imputation technique are all examples of hyperparameters.", "words": [{"w": "Hyperparameters", "b": [0.1312, 0.4913, 0.2935, 0.5062]}, {"w": "are", "b": [0.3003, 0.4909, 0.3255, 0.5059]}, {"w": "inputs", "b": [0.3323, 0.4909, 0.3837, 0.5059]}, {"w": "of", "b": [0.3905, 0.4909, 0.4057, 0.5059]}, {"w": "machine", "b": [0.4125, 0.4909, 0.48, 0.5059]}, {"w": "learning", "b": [0.4868, 0.4909, 0.5527, 0.5059]}, {"w": "algorithms", "b": [0.5596, 0.4909, 0.6465, 0.5059]}, {"w": "or", "b": [0.6533, 0.4909, 0.6701, 0.5059]}, {"w": "pipelines", "b": [0.6769, 0.4909, 0.7487, 0.5059]}, {"w": "that", "b": [0.7555, 0.4909, 0.79, 0.5059]}, {"w": "influence", "b": [0.7969, 0.4909, 0.8691, 0.5059]}, {"w": "the", "b": [0.1312, 0.5089, 0.1574, 0.5238]}, {"w": "performance", "b": [0.1659, 0.5089, 0.2674, 0.5238]}, {"w": "of", "b": [0.2759, 0.5089, 0.2911, 0.5238]}, {"w": "the", "b": [0.2995, 0.5089, 0.3257, 0.5238]}, {"w": "model.", "b": [0.3342, 0.5089, 0.3891, 0.5238]}, {"w": "They", "b": [0.4042, 0.5089, 0.4466, 0.5238]}, {"w": "don’t", "b": [0.4551, 0.5089, 0.4979, 0.5238]}, {"w": "belong", "b": [0.5064, 0.5089, 0.5603, 0.5238]}, {"w": "to", "b": [0.5687, 0.5089, 0.5855, 0.5238]}, {"w": "the", "b": [0.5939, 0.5089, 0.6201, 0.5238]}, {"w": "training", "b": [0.6286, 0.5089, 0.6935, 0.5238]}, {"w": "data", "b": [0.7019, 0.5089, 0.7385, 0.5238]}, {"w": "and", "b": [0.747, 0.5089, 0.7773, 0.5238]}, {"w": "cannot", "b": [0.7858, 0.5089, 0.8412, 0.5238]}, {"w": "be", "b": [0.8497, 0.5089, 0.8691, 0.5238]}, {"w": "learned", "b": [0.1312, 0.5268, 0.1906, 0.5418]}, {"w": "from", "b": [0.1967, 0.5268, 0.2347, 0.5418]}, {"w": "it.", "b": [0.2408, 0.5268, 0.2585, 0.5418]}, {"w": "For", "b": [0.2667, 0.5268, 0.2941, 0.5418]}, {"w": "example,", "b": [0.3002, 0.5268, 0.3724, 0.5418]}, {"w": "the", "b": [0.3786, 0.5268, 0.4046, 0.5418]}, {"w": "maximum", "b": [0.4107, 0.5268, 0.4918, 0.5418]}, {"w": "depth", "b": [0.4979, 0.5268, 0.5447, 0.5418]}, {"w": "of", "b": [0.5508, 0.5268, 0.5659, 0.5418]}, {"w": "the", "b": [0.5721, 0.5268, 0.5981, 0.5418]}, {"w": "tree", "b": [0.6042, 0.5268, 0.6354, 0.5418]}, {"w": "in", "b": [0.6416, 0.5268, 0.6572, 0.5418]}, {"w": "the", "b": [0.6633, 0.5268, 0.6893, 0.5418]}, {"w": "decision", "b": [0.6954, 0.5268, 0.76, 0.5418]}, {"w": "tree", "b": [0.7662, 0.5268, 0.7974, 0.5418]}, {"w": "learning", "b": [0.8035, 0.5268, 0.8691, 0.5418]}, {"w": "algorithm,", "b": [0.1312, 0.5448, 0.216, 0.5597]}, {"w": "the", "b": [0.2254, 0.5448, 0.2515, 0.5597]}, {"w": "misclassification", "b": [0.2603, 0.5448, 0.3924, 0.5597]}, {"w": "penalty", "b": [0.4011, 0.5448, 0.4623, 0.5597]}, {"w": "in", "b": [0.471, 0.5448, 0.4867, 0.5597]}, {"w": "support", "b": [0.4955, 0.5448, 0.5589, 0.5597]}, {"w": "vector", "b": [0.5676, 0.5448, 0.6179, 0.5597]}, {"w": "machines,", "b": [0.6266, 0.5448, 0.7068, 0.5597]}, {"w": "k", "b": [0.7159, 0.5451, 0.7255, 0.56]}, {"w": "in", "b": [0.7348, 0.5448, 0.7505, 0.5597]}, {"w": "the", "b": [0.7592, 0.5448, 0.7854, 0.5597]}, {"w": "k-nearest", "b": [0.7941, 0.5448, 0.8693, 0.56]}, {"w": "neighbors", "b": [0.1312, 0.5627, 0.2068, 0.5777]}, {"w": "algorithm,", "b": [0.213, 0.5627, 0.2945, 0.5777]}, {"w": "the", "b": [0.3006, 0.5627, 0.3258, 0.5777]}, {"w": "target", "b": [0.3319, 0.5627, 0.3792, 0.5777]}, {"w": "dimensionality", "b": [0.3854, 0.5627, 0.5001, 0.5777]}, {"w": "in", "b": [0.5063, 0.5627, 0.5214, 0.5777]}, {"w": "dimensionality", "b": [0.5275, 0.5627, 0.6422, 0.5777]}, {"w": "reduction,", "b": [0.6484, 0.5627, 0.7279, 0.5777]}, {"w": "and", "b": [0.734, 0.5627, 0.7632, 0.5777]}, {"w": "the", "b": [0.7693, 0.5627, 0.7945, 0.5777]}, {"w": "choice", "b": [0.8006, 0.5627, 0.8484, 0.5777]}, {"w": "of", "b": [0.8545, 0.5627, 0.8691, 0.5777]}, {"w": "the", "b": [0.1312, 0.5807, 0.1569, 0.5956]}, {"w": "missing", "b": [0.163, 0.5807, 0.2227, 0.5956]}, {"w": "data", "b": [0.2288, 0.5807, 0.2647, 0.5956]}, {"w": "imputation", "b": [0.2709, 0.5807, 0.3601, 0.5956]}, {"w": "technique", "b": [0.3662, 0.5807, 0.4432, 0.5956]}, {"w": "are", "b": [0.4493, 0.5807, 0.474, 0.5956]}, {"w": "all", "b": [0.4801, 0.5807, 0.4996, 0.5956]}, {"w": "examples", "b": [0.5058, 0.5807, 0.5792, 0.5956]}, {"w": "of", "b": [0.5853, 0.5807, 0.6002, 0.5956]}, {"w": "hyperparameters.", "b": [0.6064, 0.5807, 0.7466, 0.5956]}]}, {"id": "b_8", "type": "paragraph", "text": "Parameters, on the other hand, are variables that define the model trained by the learning algorithm. Parameters are directly modified by the learning algorithm based on the training data. The goal of learning is to find such values of parameters that make the model optimal in a certain sense. Examples of parameters are w and b in the equation of linear regression y = wx + b. In this equation, x is the input of the model, and y is its output (the prediction).", "words": [{"w": "Parameters,", "b": [0.1312, 0.6076, 0.242, 0.6229]}, {"w": "on", "b": [0.2482, 0.6076, 0.2674, 0.6226]}, {"w": "the", "b": [0.2735, 0.6076, 0.2987, 0.6226]}, {"w": "other", "b": [0.3049, 0.6076, 0.3463, 0.6226]}, {"w": "hand,", "b": [0.3524, 0.6076, 0.3968, 0.6226]}, {"w": "are", "b": [0.403, 0.6076, 0.4272, 0.6226]}, {"w": "variables", "b": [0.4334, 0.6076, 0.5026, 0.6226]}, {"w": "that", "b": [0.5088, 0.6076, 0.542, 0.6226]}, {"w": "define", "b": [0.5482, 0.6076, 0.5946, 0.6226]}, {"w": "the", "b": [0.6007, 0.6076, 0.626, 0.6226]}, {"w": "model", "b": [0.6321, 0.6076, 0.68, 0.6226]}, {"w": "trained", "b": [0.6862, 0.6076, 0.7427, 0.6226]}, {"w": "by", "b": [0.7488, 0.6076, 0.768, 0.6226]}, {"w": "the", "b": [0.7742, 0.6076, 0.7994, 0.6226]}, {"w": "learning", "b": [0.8055, 0.6076, 0.8691, 0.6226]}, {"w": "algorithm.", "b": [0.1312, 0.6255, 0.2132, 0.6405]}, {"w": "Parameters", "b": [0.2214, 0.6255, 0.3115, 0.6405]}, {"w": "are", "b": [0.3176, 0.6255, 0.3419, 0.6405]}, {"w": "directly", "b": [0.3481, 0.6255, 0.4083, 0.6405]}, {"w": "modified", "b": [0.4145, 0.6255, 0.4828, 0.6405]}, {"w": "by", "b": [0.4889, 0.6255, 0.5081, 0.6405]}, {"w": "the", "b": [0.5143, 0.6255, 0.5396, 0.6405]}, {"w": "learning", "b": [0.5457, 0.6255, 0.6095, 0.6405]}, {"w": "algorithm", "b": [0.6156, 0.6255, 0.6926, 0.6405]}, {"w": "based", "b": [0.6987, 0.6255, 0.7434, 0.6405]}, {"w": "on", "b": [0.7495, 0.6255, 0.7687, 0.6405]}, {"w": "the", "b": [0.7748, 0.6255, 0.8002, 0.6405]}, {"w": "training", "b": [0.8063, 0.6255, 0.8691, 0.6405]}, {"w": "data.", "b": [0.1312, 0.6435, 0.1718, 0.6585]}, {"w": "The", "b": [0.18, 0.6435, 0.2114, 0.6585]}, {"w": "goal", "b": [0.2175, 0.6435, 0.2499, 0.6585]}, {"w": "of", "b": [0.2561, 0.6435, 0.2708, 0.6585]}, {"w": "learning", "b": [0.2769, 0.6435, 0.3408, 0.6585]}, {"w": "is", "b": [0.347, 0.6435, 0.3592, 0.6585]}, {"w": "to", "b": [0.3654, 0.6435, 0.3816, 0.6585]}, {"w": "find", "b": [0.3878, 0.6435, 0.4182, 0.6585]}, {"w": "such", "b": [0.4243, 0.6435, 0.4594, 0.6585]}, {"w": "values", "b": [0.4655, 0.6435, 0.5138, 0.6585]}, {"w": "of", "b": [0.5199, 0.6435, 0.5346, 0.6585]}, {"w": "parameters", "b": [0.5408, 0.6435, 0.6291, 0.6585]}, {"w": "that", "b": [0.6353, 0.6435, 0.6687, 0.6585]}, {"w": "make", "b": [0.6748, 0.6435, 0.7164, 0.6585]}, {"w": "the", "b": [0.7225, 0.6435, 0.7478, 0.6585]}, {"w": "model", "b": [0.754, 0.6435, 0.8021, 0.6585]}, {"w": "optimal", "b": [0.8083, 0.6435, 0.8691, 0.6585]}, {"w": "in", "b": [0.1312, 0.6614, 0.1467, 0.6764]}, {"w": "a", "b": [0.1529, 0.6614, 0.1621, 0.6764]}, {"w": "certain", "b": [0.1683, 0.6614, 0.224, 0.6764]}, {"w": "sense.", "b": [0.2302, 0.6614, 0.2768, 0.6764]}, {"w": "Examples", "b": [0.285, 0.6614, 0.3632, 0.6764]}, {"w": "of", "b": [0.3694, 0.6614, 0.3843, 0.6764]}, {"w": "parameters", "b": [0.3905, 0.6614, 0.4804, 0.6764]}, {"w": "are", "b": [0.4865, 0.6614, 0.5113, 0.6764]}, {"w": "w", "b": [0.5173, 0.6617, 0.5305, 0.6767]}, {"w": "and", "b": [0.5371, 0.6614, 0.567, 0.6764]}, {"w": "b", "b": [0.5732, 0.6617, 0.5811, 0.6767]}, {"w": "in", "b": [0.5873, 0.6614, 0.6027, 0.6764]}, {"w": "the", "b": [0.6089, 0.6614, 0.6347, 0.6764]}, {"w": "equation", "b": [0.6408, 0.6614, 0.7104, 0.6764]}, {"w": "of", "b": [0.7166, 0.6614, 0.7315, 0.6764]}, {"w": "linear", "b": [0.7377, 0.6614, 0.7831, 0.6764]}, {"w": "regression", "b": [0.7892, 0.6614, 0.8689, 0.6764]}, {"w": "y", "b": [0.1312, 0.6797, 0.1403, 0.6946]}, {"w": "=", "b": [0.1461, 0.6794, 0.1601, 0.6943]}, {"w": "wx", "b": [0.1653, 0.6797, 0.1895, 0.6946]}, {"w": "+", "b": [0.1929, 0.6794, 0.207, 0.6943]}, {"w": "b.", "b": [0.2104, 0.6794, 0.2233, 0.6946]}, {"w": "In", "b": [0.2314, 0.6794, 0.248, 0.6943]}, {"w": "this", "b": [0.2538, 0.6794, 0.283, 0.6943]}, {"w": "equation,", "b": [0.2888, 0.6794, 0.3617, 0.6943]}, {"w": "x", "b": [0.3675, 0.6797, 0.378, 0.6946]}, {"w": "is", "b": [0.3838, 0.6794, 0.396, 0.6943]}, {"w": "the", "b": [0.4018, 0.6794, 0.4269, 0.6943]}, {"w": "input", "b": [0.4327, 0.6794, 0.4749, 0.6943]}, {"w": "of", "b": [0.4807, 0.6794, 0.4953, 0.6943]}, {"w": "the", "b": [0.5011, 0.6794, 0.5262, 0.6943]}, {"w": "model,", "b": [0.532, 0.6794, 0.5848, 0.6943]}, {"w": "and", "b": [0.5907, 0.6794, 0.6198, 0.6943]}, {"w": "y", "b": [0.6255, 0.6797, 0.6345, 0.6946]}, {"w": "is", "b": [0.641, 0.6794, 0.6531, 0.6943]}, {"w": "its", "b": [0.6589, 0.6794, 0.6782, 0.6943]}, {"w": "output", "b": [0.6839, 0.6794, 0.7372, 0.6943]}, {"w": "(the", "b": [0.743, 0.6794, 0.7752, 0.6943]}, {"w": "prediction).", "b": [0.781, 0.6794, 0.8725, 0.6943]}]}, {"id": "b_9", "type": "paragraph", "text": "1.3.7 Classification vs. Regression", "words": [{"w": "1.3.7", "b": [0.1312, 0.7275, 0.1749, 0.7425]}, {"w": "Classification", "b": [0.1961, 0.7275, 0.3184, 0.7425]}, {"w": "vs.", "b": [0.3254, 0.7275, 0.3509, 0.7425]}, {"w": "Regression", "b": [0.358, 0.7275, 0.4577, 0.7425]}]}, {"id": "b_10", "type": "paragraph", "text": "Classification is a problem of automatically assigning a label to an unlabeled example. Spam detection is a famous example of classification.", "words": [{"w": "Classification", "b": [0.1312, 0.7641, 0.2535, 0.7791]}, {"w": "is", "b": [0.2597, 0.7638, 0.272, 0.7788]}, {"w": "a", "b": [0.2782, 0.7638, 0.2874, 0.7788]}, {"w": "problem", "b": [0.2935, 0.7638, 0.3589, 0.7788]}, {"w": "of", "b": [0.365, 0.7638, 0.3798, 0.7788]}, {"w": "automatically", "b": [0.386, 0.7638, 0.4957, 0.7788]}, {"w": "assigning", "b": [0.5018, 0.7638, 0.5745, 0.7788]}, {"w": "a", "b": [0.5806, 0.7638, 0.5898, 0.7788]}, {"w": "label", "b": [0.596, 0.7641, 0.6403, 0.7791]}, {"w": "to", "b": [0.6464, 0.7638, 0.6627, 0.7788]}, {"w": "an", "b": [0.6689, 0.7638, 0.6883, 0.7788]}, {"w": "unlabeled", "b": [0.6946, 0.7641, 0.7839, 0.7791]}, {"w": "example.", "b": [0.791, 0.7638, 0.8723, 0.7791]}, {"w": "Spam", "b": [0.1312, 0.7818, 0.1763, 0.7967]}, {"w": "detection", "b": [0.1825, 0.7818, 0.2563, 0.7967]}, {"w": "is", "b": [0.2625, 0.7818, 0.2749, 0.7967]}, {"w": "a", "b": [0.2811, 0.7818, 0.2903, 0.7967]}, {"w": "famous", "b": [0.2964, 0.7818, 0.3534, 0.7967]}, {"w": "example", "b": [0.3596, 0.7818, 0.4257, 0.7967]}, {"w": "of", "b": [0.4319, 0.7818, 0.4467, 0.7967]}, {"w": "classification.", "b": [0.4529, 0.7818, 0.5598, 0.7967]}]}, {"id": "b_11", "type": "paragraph", "text": "In machine learning, the classification problem is solved by a classification learning algorithm that takes a collection of labeled examples as inputs and produces a model that can take an unlabeled example as input and either directly output a label or output a", "words": [{"w": "In", "b": [0.1312, 0.8087, 0.1485, 0.8236]}, {"w": "machine", "b": [0.1575, 0.8087, 0.225, 0.8236]}, {"w": "learning,", "b": [0.234, 0.8087, 0.3052, 0.8236]}, {"w": "the", "b": [0.315, 0.8087, 0.3411, 0.8236]}, {"w": "classification", "b": [0.3501, 0.8087, 0.4539, 0.8236]}, {"w": "problem", "b": [0.4629, 0.8087, 0.5299, 0.8236]}, {"w": "is", "b": [0.5389, 0.8087, 0.5516, 0.8236]}, {"w": "solved", "b": [0.5606, 0.8087, 0.611, 0.8236]}, {"w": "by", "b": [0.62, 0.8087, 0.6399, 0.8236]}, {"w": "a", "b": [0.6489, 0.8087, 0.6583, 0.8236]}, {"w": "classification", "b": [0.6673, 0.809, 0.7837, 0.8239]}, {"w": "learning", "b": [0.7941, 0.809, 0.8688, 0.8239]}, {"w": "algorithm", "b": [0.1312, 0.8269, 0.221, 0.8419]}, {"w": "that", "b": [0.2272, 0.8266, 0.2617, 0.8416]}, {"w": "takes", "b": [0.2679, 0.8266, 0.3097, 0.8416]}, {"w": "a", "b": [0.3159, 0.8266, 0.3253, 0.8416]}, {"w": "collection", "b": [0.3314, 0.8266, 0.4087, 0.8416]}, {"w": "of", "b": [0.4149, 0.8266, 0.43, 0.8416]}, {"w": "labeled", "b": [0.4375, 0.8269, 0.5032, 0.8419]}, {"w": "examples", "b": [0.5103, 0.8269, 0.595, 0.8419]}, {"w": "as", "b": [0.6012, 0.8266, 0.618, 0.8416]}, {"w": "inputs", "b": [0.6241, 0.8266, 0.6754, 0.8416]}, {"w": "and", "b": [0.6815, 0.8266, 0.7118, 0.8416]}, {"w": "produces", "b": [0.718, 0.8266, 0.7907, 0.8416]}, {"w": "a", "b": [0.7969, 0.8266, 0.8062, 0.8416]}, {"w": "model", "b": [0.8125, 0.8269, 0.8688, 0.8419]}, {"w": "that", "b": [0.1312, 0.8446, 0.1652, 0.8595]}, {"w": "can", "b": [0.1713, 0.8446, 0.1991, 0.8595]}, {"w": "take", "b": [0.2053, 0.8446, 0.2393, 0.8595]}, {"w": "an", "b": [0.2454, 0.8446, 0.265, 0.8595]}, {"w": "unlabeled", "b": [0.2711, 0.8446, 0.3488, 0.8595]}, {"w": "example", "b": [0.355, 0.8446, 0.4214, 0.8595]}, {"w": "as", "b": [0.4275, 0.8446, 0.4441, 0.8595]}, {"w": "input", "b": [0.4502, 0.8446, 0.4935, 0.8595]}, {"w": "and", "b": [0.4996, 0.8446, 0.5295, 0.8595]}, {"w": "either", "b": [0.5356, 0.8446, 0.582, 0.8595]}, {"w": "directly", "b": [0.5882, 0.8446, 0.6495, 0.8595]}, {"w": "output", "b": [0.6556, 0.8446, 0.7102, 0.8595]}, {"w": "a", "b": [0.7163, 0.8446, 0.7256, 0.8595]}, {"w": "label", "b": [0.7317, 0.8446, 0.7704, 0.8595]}, {"w": "or", "b": [0.7765, 0.8446, 0.793, 0.8595]}, {"w": "output", "b": [0.7992, 0.8446, 0.8537, 0.8595]}, {"w": "a", "b": [0.8599, 0.8446, 0.8691, 0.8595]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "12", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 21, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "number that can be used by the analyst to deduce the label. An example of such a number is a probability of an input data element to have a specific label.", "words": [{"w": "number", "b": [0.1312, 0.0881, 0.1922, 0.1031]}, {"w": "that", "b": [0.1983, 0.0881, 0.2321, 0.1031]}, {"w": "can", "b": [0.2383, 0.0881, 0.2659, 0.1031]}, {"w": "be", "b": [0.2721, 0.0881, 0.291, 0.1031]}, {"w": "used", "b": [0.2972, 0.0881, 0.3331, 0.1031]}, {"w": "by", "b": [0.3393, 0.0881, 0.3587, 0.1031]}, {"w": "the", "b": [0.3649, 0.0881, 0.3905, 0.1031]}, {"w": "analyst", "b": [0.3966, 0.0881, 0.4546, 0.1031]}, {"w": "to", "b": [0.4607, 0.0881, 0.4771, 0.1031]}, {"w": "deduce", "b": [0.4833, 0.0881, 0.5386, 0.1031]}, {"w": "the", "b": [0.5447, 0.0881, 0.5703, 0.1031]}, {"w": "label.", "b": [0.5765, 0.0881, 0.62, 0.1031]}, {"w": "An", "b": [0.6282, 0.0881, 0.6523, 0.1031]}, {"w": "example", "b": [0.6584, 0.0881, 0.7244, 0.1031]}, {"w": "of", "b": [0.7306, 0.0881, 0.7454, 0.1031]}, {"w": "such", "b": [0.7516, 0.0881, 0.787, 0.1031]}, {"w": "a", "b": [0.7932, 0.0881, 0.8024, 0.1031]}, {"w": "number", "b": [0.8086, 0.0881, 0.8695, 0.1031]}, {"w": "is", "b": [0.1312, 0.106, 0.1436, 0.121]}, {"w": "a", "b": [0.1498, 0.106, 0.159, 0.121]}, {"w": "probability", "b": [0.1652, 0.106, 0.2534, 0.121]}, {"w": "of", "b": [0.2596, 0.106, 0.2744, 0.121]}, {"w": "an", "b": [0.2806, 0.106, 0.3001, 0.121]}, {"w": "input", "b": [0.3062, 0.106, 0.3493, 0.121]}, {"w": "data", "b": [0.3554, 0.106, 0.3913, 0.121]}, {"w": "element", "b": [0.3975, 0.106, 0.4595, 0.121]}, {"w": "to", "b": [0.4657, 0.106, 0.4821, 0.121]}, {"w": "have", "b": [0.4882, 0.106, 0.5246, 0.121]}, {"w": "a", "b": [0.5308, 0.106, 0.54, 0.121]}, {"w": "specific", "b": [0.5462, 0.106, 0.6042, 0.121]}, {"w": "label.", "b": [0.6104, 0.106, 0.654, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "In a classification problem, a label is a member of a finite set of classes. If the size of the set of classes is two (“sick”/“healthy”, “spam”/“not_spam”), we talk about binary classification (also called binomial in some sources). Multiclass classification (also called multinomial) is a classification problem with three or more classes.9", "words": [{"w": "In", "b": [0.1312, 0.133, 0.1485, 0.1479]}, {"w": "a", "b": [0.1561, 0.133, 0.1656, 0.1479]}, {"w": "classification", "b": [0.1732, 0.133, 0.277, 0.1479]}, {"w": "problem,", "b": [0.2847, 0.133, 0.3569, 0.1479]}, {"w": "a", "b": [0.3649, 0.133, 0.3743, 0.1479]}, {"w": "label", "b": [0.382, 0.133, 0.4212, 0.1479]}, {"w": "is", "b": [0.4289, 0.133, 0.4415, 0.1479]}, {"w": "a", "b": [0.4492, 0.133, 0.4586, 0.1479]}, {"w": "member", "b": [0.4663, 0.133, 0.5322, 0.1479]}, {"w": "of", "b": [0.5399, 0.133, 0.555, 0.1479]}, {"w": "a", "b": [0.5627, 0.133, 0.5721, 0.1479]}, {"w": "finite", "b": [0.5798, 0.133, 0.6216, 0.1479]}, {"w": "set", "b": [0.6293, 0.133, 0.6524, 0.1479]}, {"w": "of", "b": [0.6601, 0.133, 0.6752, 0.1479]}, {"w": "classes.", "b": [0.6841, 0.133, 0.7498, 0.1482]}, {"w": "If", "b": [0.7626, 0.133, 0.7751, 0.1479]}, {"w": "the", "b": [0.7828, 0.133, 0.8089, 0.1479]}, {"w": "size", "b": [0.8166, 0.133, 0.846, 0.1479]}, {"w": "of", "b": [0.8537, 0.133, 0.8688, 0.1479]}, {"w": "the", "b": [0.1312, 0.1509, 0.1574, 0.1659]}, {"w": "set", "b": [0.1649, 0.1509, 0.1881, 0.1659]}, {"w": "of", "b": [0.1956, 0.1509, 0.2108, 0.1659]}, {"w": "classes", "b": [0.2183, 0.1509, 0.272, 0.1659]}, {"w": "is", "b": [0.2795, 0.1509, 0.2922, 0.1659]}, {"w": "two", "b": [0.2997, 0.1509, 0.329, 0.1659]}, {"w": "(“sick”/“healthy”,", "b": [0.3366, 0.1509, 0.4852, 0.1659]}, {"w": "“spam”/“not_spam”),", "b": [0.4931, 0.1509, 0.6778, 0.1659]}, {"w": "we", "b": [0.6857, 0.1509, 0.7072, 0.1659]}, {"w": "talk", "b": [0.7147, 0.1509, 0.7466, 0.1659]}, {"w": "about", "b": [0.7542, 0.1509, 0.8017, 0.1659]}, {"w": "binary", "b": [0.809, 0.1512, 0.8688, 0.1662]}, {"w": "classification", "b": [0.1312, 0.1692, 0.2476, 0.1841]}, {"w": "(also", "b": [0.2556, 0.1689, 0.2944, 0.1838]}, {"w": "called", "b": [0.3023, 0.1689, 0.3493, 0.1838]}, {"w": "binomial", "b": [0.3572, 0.1692, 0.4371, 0.1841]}, {"w": "in", "b": [0.445, 0.1689, 0.4607, 0.1838]}, {"w": "some", "b": [0.4686, 0.1689, 0.5095, 0.1838]}, {"w": "sources).", "b": [0.5174, 0.1689, 0.5888, 0.1838]}, {"w": "Multiclass", "b": [0.6022, 0.1692, 0.6966, 0.1841]}, {"w": "classification", "b": [0.7057, 0.1692, 0.8221, 0.1841]}, {"w": "(also", "b": [0.83, 0.1689, 0.8688, 0.1838]}, {"w": "called", "b": [0.1312, 0.1868, 0.1774, 0.2018]}, {"w": "multinomial)", "b": [0.1835, 0.1868, 0.3018, 0.2021]}, {"w": "is", "b": [0.3079, 0.1868, 0.3204, 0.2018]}, {"w": "a", "b": [0.3265, 0.1868, 0.3357, 0.2018]}, {"w": "classification", "b": [0.3419, 0.1868, 0.4436, 0.2018]}, {"w": "problem", "b": [0.4498, 0.1868, 0.5155, 0.2018]}, {"w": "with", "b": [0.5216, 0.1868, 0.5575, 0.2018]}, {"w": "three", "b": [0.5636, 0.1868, 0.6047, 0.2018]}, {"w": "or", "b": [0.6109, 0.1868, 0.6273, 0.2018]}, {"w": "more", "b": [0.6335, 0.1868, 0.6735, 0.2018]}, {"w": "classes.9", "b": [0.6797, 0.1852, 0.7446, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "While some learning algorithms naturally allow for more than two classes, others are by", "words": [{"w": "While", "b": [0.1303, 0.2137, 0.1789, 0.2287]}, {"w": "some", "b": [0.1862, 0.2137, 0.2271, 0.2287]}, {"w": "learning", "b": [0.2344, 0.2137, 0.3004, 0.2287]}, {"w": "algorithms", "b": [0.3077, 0.2137, 0.3946, 0.2287]}, {"w": "naturally", "b": [0.4019, 0.2137, 0.4768, 0.2287]}, {"w": "allow", "b": [0.4841, 0.2137, 0.5264, 0.2287]}, {"w": "for", "b": [0.5337, 0.2137, 0.5563, 0.2287]}, {"w": "more", "b": [0.5636, 0.2137, 0.6044, 0.2287]}, {"w": "than", "b": [0.6117, 0.2137, 0.6493, 0.2287]}, {"w": "two", "b": [0.6566, 0.2137, 0.6859, 0.2287]}, {"w": "classes,", "b": [0.6932, 0.2137, 0.7521, 0.2287]}, {"w": "others", "b": [0.7597, 0.2137, 0.8101, 0.2287]}, {"w": "are", "b": [0.8174, 0.2137, 0.8426, 0.2287]}, {"w": "by", "b": [0.8499, 0.2137, 0.8697, 0.2287]}]}, {"id": "b_3", "type": "paragraph", "text": "nature binary classification algorithms. There are strategies to turn a binary classification learning algorithm into a multiclass one. I talk about one of them, one-versus-rest, in Section ?? of Chapter 6.", "words": [{"w": "nature", "b": [0.1312, 0.2317, 0.1844, 0.2466]}, {"w": "binary", "b": [0.1905, 0.2317, 0.2431, 0.2466]}, {"w": "classification", "b": [0.2493, 0.2317, 0.3525, 0.2466]}, {"w": "algorithms.", "b": [0.3587, 0.2317, 0.4504, 0.2466]}, {"w": "There", "b": [0.4586, 0.2317, 0.5065, 0.2466]}, {"w": "are", "b": [0.5127, 0.2317, 0.5377, 0.2466]}, {"w": "strategies", "b": [0.5438, 0.2317, 0.6211, 0.2466]}, {"w": "to", "b": [0.6273, 0.2317, 0.6439, 0.2466]}, {"w": "turn", "b": [0.65, 0.2317, 0.6855, 0.2466]}, {"w": "a", "b": [0.6916, 0.2317, 0.701, 0.2466]}, {"w": "binary", "b": [0.7071, 0.2317, 0.7597, 0.2466]}, {"w": "classification", "b": [0.7659, 0.2317, 0.8691, 0.2466]}, {"w": "learning", "b": [0.1312, 0.2496, 0.1972, 0.2646]}, {"w": "algorithm", "b": [0.2063, 0.2496, 0.2858, 0.2646]}, {"w": "into", "b": [0.2949, 0.2496, 0.3268, 0.2646]}, {"w": "a", "b": [0.3359, 0.2496, 0.3453, 0.2646]}, {"w": "multiclass", "b": [0.3544, 0.2496, 0.4357, 0.2646]}, {"w": "one.", "b": [0.4448, 0.2496, 0.4783, 0.2646]}, {"w": "I", "b": [0.4953, 0.2496, 0.5021, 0.2646]}, {"w": "talk", "b": [0.5112, 0.2496, 0.5431, 0.2646]}, {"w": "about", "b": [0.5522, 0.2496, 0.5998, 0.2646]}, {"w": "one", "b": [0.6089, 0.2496, 0.6371, 0.2646]}, {"w": "of", "b": [0.6462, 0.2496, 0.6614, 0.2646]}, {"w": "them,", "b": [0.6705, 0.2496, 0.7175, 0.2646]}, {"w": "one-versus-rest,", "b": [0.7272, 0.2496, 0.8713, 0.2649]}, {"w": "in", "b": [0.1312, 0.2676, 0.1466, 0.2825]}, {"w": "Section", "b": [0.1528, 0.2676, 0.2112, 0.2825]}, {"w": "??", "b": [0.2173, 0.2679, 0.2374, 0.2828]}, {"w": "of", "b": [0.2435, 0.2676, 0.2584, 0.2825]}, {"w": "Chapter", "b": [0.2645, 0.2676, 0.3302, 0.2825]}, {"w": "6.", "b": [0.3364, 0.2676, 0.3507, 0.2825]}]}, {"id": "b_4", "type": "paragraph", "text": "Regression is a problem of predicting a real-valued quantity given an unlabeled example. Estimating house price valuation based on house features, such as area, number of bedrooms, location, and so on, is a famous example of regression.", "words": [{"w": "Regression", "b": [0.1312, 0.2948, 0.231, 0.3097]}, {"w": "is", "b": [0.2372, 0.2945, 0.2498, 0.3094]}, {"w": "a", "b": [0.256, 0.2945, 0.2654, 0.3094]}, {"w": "problem", "b": [0.2715, 0.2945, 0.3383, 0.3094]}, {"w": "of", "b": [0.3445, 0.2945, 0.3596, 0.3094]}, {"w": "predicting", "b": [0.3658, 0.2945, 0.4482, 0.3094]}, {"w": "a", "b": [0.4544, 0.2945, 0.4638, 0.3094]}, {"w": "real-valued", "b": [0.4699, 0.2945, 0.5592, 0.3094]}, {"w": "quantity", "b": [0.5653, 0.2945, 0.6342, 0.3094]}, {"w": "given", "b": [0.6403, 0.2945, 0.6831, 0.3094]}, {"w": "an", "b": [0.6893, 0.2945, 0.7091, 0.3094]}, {"w": "unlabeled", "b": [0.7153, 0.2945, 0.794, 0.3094]}, {"w": "example.", "b": [0.8002, 0.2945, 0.8726, 0.3094]}, {"w": "Estimating", "b": [0.1312, 0.3124, 0.218, 0.3274]}, {"w": "house", "b": [0.224, 0.3124, 0.2684, 0.3274]}, {"w": "price", "b": [0.2744, 0.3124, 0.3126, 0.3274]}, {"w": "valuation", "b": [0.3187, 0.3124, 0.3915, 0.3274]}, {"w": "based", "b": [0.3975, 0.3124, 0.4418, 0.3274]}, {"w": "on", "b": [0.4479, 0.3124, 0.467, 0.3274]}, {"w": "house", "b": [0.473, 0.3124, 0.5173, 0.3274]}, {"w": "features,", "b": [0.5233, 0.3124, 0.5903, 0.3274]}, {"w": "such", "b": [0.5964, 0.3124, 0.6312, 0.3274]}, {"w": "as", "b": [0.6372, 0.3124, 0.6534, 0.3274]}, {"w": "area,", "b": [0.6594, 0.3124, 0.6976, 0.3274]}, {"w": "number", "b": [0.7037, 0.3124, 0.7635, 0.3274]}, {"w": "of", "b": [0.7695, 0.3124, 0.7841, 0.3274]}, {"w": "bedrooms,", "b": [0.7902, 0.3124, 0.8717, 0.3274]}, {"w": "location,", "b": [0.1312, 0.3304, 0.2005, 0.3453]}, {"w": "and", "b": [0.2066, 0.3304, 0.2363, 0.3453]}, {"w": "so", "b": [0.2425, 0.3304, 0.259, 0.3453]}, {"w": "on,", "b": [0.2651, 0.3304, 0.2897, 0.3453]}, {"w": "is", "b": [0.2959, 0.3304, 0.3083, 0.3453]}, {"w": "a", "b": [0.3145, 0.3304, 0.3237, 0.3453]}, {"w": "famous", "b": [0.3298, 0.3304, 0.3868, 0.3453]}, {"w": "example", "b": [0.393, 0.3304, 0.4591, 0.3453]}, {"w": "of", "b": [0.4653, 0.3304, 0.4802, 0.3453]}, {"w": "regression.", "b": [0.4863, 0.3304, 0.5707, 0.3453]}]}, {"id": "b_5", "type": "paragraph", "text": "The regression problem is solved by a regression learning algorithm that takes a collection of labeled examples as inputs and produces a model that can take an unlabeled example as input and output a target.", "words": [{"w": "The", "b": [0.1306, 0.3573, 0.1617, 0.3723]}, {"w": "regression", "b": [0.1664, 0.3573, 0.2441, 0.3723]}, {"w": "problem", "b": [0.2488, 0.3573, 0.3132, 0.3723]}, {"w": "is", "b": [0.3178, 0.3573, 0.33, 0.3723]}, {"w": "solved", "b": [0.3347, 0.3573, 0.383, 0.3723]}, {"w": "by", "b": [0.3877, 0.3573, 0.4068, 0.3723]}, {"w": "a", "b": [0.4115, 0.3573, 0.4205, 0.3723]}, {"w": "regression", "b": [0.4253, 0.3576, 0.5179, 0.3726]}, {"w": "learning", "b": [0.5233, 0.3576, 0.598, 0.3726]}, {"w": "algorithm", "b": [0.6034, 0.3576, 0.6932, 0.3726]}, {"w": "that", "b": [0.6979, 0.3573, 0.7311, 0.3723]}, {"w": "takes", "b": [0.7358, 0.3573, 0.7761, 0.3723]}, {"w": "a", "b": [0.7807, 0.3573, 0.7898, 0.3723]}, {"w": "collection", "b": [0.7945, 0.3573, 0.8688, 0.3723]}, {"w": "of", "b": [0.1312, 0.3752, 0.1461, 0.3902]}, {"w": "labeled", "b": [0.1522, 0.3752, 0.2091, 0.3902]}, {"w": "examples", "b": [0.2153, 0.3752, 0.2886, 0.3902]}, {"w": "as", "b": [0.2948, 0.3752, 0.3113, 0.3902]}, {"w": "inputs", "b": [0.3174, 0.3752, 0.3678, 0.3902]}, {"w": "and", "b": [0.3739, 0.3752, 0.4036, 0.3902]}, {"w": "produces", "b": [0.4098, 0.3752, 0.4812, 0.3902]}, {"w": "a", "b": [0.4873, 0.3752, 0.4965, 0.3902]}, {"w": "model", "b": [0.5027, 0.3752, 0.5513, 0.3902]}, {"w": "that", "b": [0.5575, 0.3752, 0.5913, 0.3902]}, {"w": "can", "b": [0.5975, 0.3752, 0.6251, 0.3902]}, {"w": "take", "b": [0.6313, 0.3752, 0.6651, 0.3902]}, {"w": "an", "b": [0.6713, 0.3752, 0.6907, 0.3902]}, {"w": "unlabeled", "b": [0.6969, 0.3752, 0.7742, 0.3902]}, {"w": "example", "b": [0.7804, 0.3752, 0.8465, 0.3902]}, {"w": "as", "b": [0.8526, 0.3752, 0.8691, 0.3902]}, {"w": "input", "b": [0.1312, 0.3932, 0.1743, 0.4082]}, {"w": "and", "b": [0.1805, 0.3932, 0.2102, 0.4082]}, {"w": "output", "b": [0.2163, 0.3932, 0.2707, 0.4082]}, {"w": "a", "b": [0.2769, 0.3932, 0.2861, 0.4082]}, {"w": "target.", "b": [0.2922, 0.3932, 0.3456, 0.4082]}]}, {"id": "b_6", "type": "equation", "text": "1.3.8 Model-Based vs. Instance-Based Learning", "words": [{"w": "1.3.8", "b": [0.1312, 0.4413, 0.1749, 0.4563]}, {"w": "Model-Based", "b": [0.1961, 0.4413, 0.3172, 0.4563]}, {"w": "vs.", "b": [0.3243, 0.4413, 0.3497, 0.4563]}, {"w": "Instance-Based", "b": [0.3568, 0.4413, 0.4969, 0.4563]}, {"w": "Learning", "b": [0.504, 0.4413, 0.5856, 0.4563]}]}, {"id": "b_7", "type": "paragraph", "text": "Most supervised learning algorithms are model-based. A typical model is a support vector machine (SVM). Model-based learning algorithms use the training data to create a model with parameters learned from the training data. In SVM, the two parameters are w (a vector) and b (a real number). After the model is trained, it can be saved on disk while", "words": [{"w": "Most", "b": [0.1312, 0.4776, 0.1727, 0.4926]}, {"w": "supervised", "b": [0.1805, 0.4776, 0.2665, 0.4926]}, {"w": "learning", "b": [0.2744, 0.4776, 0.3403, 0.4926]}, {"w": "algorithms", "b": [0.3481, 0.4776, 0.4351, 0.4926]}, {"w": "are", "b": [0.4429, 0.4776, 0.4681, 0.4926]}, {"w": "model-based.", "b": [0.4757, 0.4776, 0.5963, 0.4929]}, {"w": "A", "b": [0.6095, 0.4776, 0.6236, 0.4926]}, {"w": "typical", "b": [0.6315, 0.4776, 0.6869, 0.4926]}, {"w": "model", "b": [0.6948, 0.4779, 0.7511, 0.4929]}, {"w": "is", "b": [0.7589, 0.4776, 0.7716, 0.4926]}, {"w": "a", "b": [0.7794, 0.4776, 0.7888, 0.4926]}, {"w": "support", "b": [0.7969, 0.4779, 0.8688, 0.4929]}, {"w": "vector", "b": [0.1312, 0.4959, 0.1886, 0.5108]}, {"w": "machine", "b": [0.1953, 0.4959, 0.2713, 0.5108]}, {"w": "(SVM).", "b": [0.2771, 0.4956, 0.3442, 0.5108]}, {"w": "Model-based", "b": [0.35, 0.4956, 0.4496, 0.5105]}, {"w": "learning", "b": [0.4554, 0.4956, 0.5187, 0.5105]}, {"w": "algorithms", "b": [0.5245, 0.4956, 0.6081, 0.5105]}, {"w": "use", "b": [0.6139, 0.4956, 0.6391, 0.5105]}, {"w": "the", "b": [0.6449, 0.4956, 0.6701, 0.5105]}, {"w": "training", "b": [0.6759, 0.4956, 0.7382, 0.5105]}, {"w": "data", "b": [0.744, 0.4956, 0.7792, 0.5105]}, {"w": "to", "b": [0.785, 0.4956, 0.8011, 0.5105]}, {"w": "create", "b": [0.8069, 0.4956, 0.8542, 0.5105]}, {"w": "a", "b": [0.86, 0.4956, 0.869, 0.5105]}, {"w": "model", "b": [0.1312, 0.5135, 0.179, 0.5285]}, {"w": "with", "b": [0.185, 0.5135, 0.2202, 0.5285]}, {"w": "parameters", "b": [0.2264, 0.5138, 0.33, 0.5288]}, {"w": "learned", "b": [0.3361, 0.5135, 0.3935, 0.5285]}, {"w": "from", "b": [0.3995, 0.5135, 0.4363, 0.5285]}, {"w": "the", "b": [0.4423, 0.5135, 0.4675, 0.5285]}, {"w": "training", "b": [0.4735, 0.5135, 0.5359, 0.5285]}, {"w": "data.", "b": [0.5419, 0.5135, 0.5821, 0.5285]}, {"w": "In", "b": [0.5903, 0.5135, 0.6069, 0.5285]}, {"w": "SVM,", "b": [0.613, 0.5135, 0.6582, 0.5285]}, {"w": "the", "b": [0.6643, 0.5135, 0.6894, 0.5285]}, {"w": "two", "b": [0.6955, 0.5135, 0.7236, 0.5285]}, {"w": "parameters", "b": [0.7297, 0.5135, 0.8173, 0.5285]}, {"w": "are", "b": [0.8234, 0.5135, 0.8475, 0.5285]}, {"w": "w", "b": [0.8534, 0.5138, 0.8687, 0.5288]}, {"w": "(a", "b": [0.1291, 0.5315, 0.1457, 0.5464]}, {"w": "vector)", "b": [0.1519, 0.5315, 0.2092, 0.5464]}, {"w": "and", "b": [0.2153, 0.5315, 0.2455, 0.5464]}, {"w": "b", "b": [0.2516, 0.5317, 0.2595, 0.5467]}, {"w": "(a", "b": [0.2657, 0.5315, 0.2823, 0.5464]}, {"w": "real", "b": [0.2885, 0.5315, 0.3187, 0.5464]}, {"w": "number).", "b": [0.3249, 0.5315, 0.3993, 0.5464]}, {"w": "After", "b": [0.4075, 0.5315, 0.4503, 0.5464]}, {"w": "the", "b": [0.4564, 0.5315, 0.4824, 0.5464]}, {"w": "model", "b": [0.4886, 0.5315, 0.538, 0.5464]}, {"w": "is", "b": [0.5442, 0.5315, 0.5568, 0.5464]}, {"w": "trained,", "b": [0.5629, 0.5315, 0.6265, 0.5464]}, {"w": "it", "b": [0.6326, 0.5315, 0.6451, 0.5464]}, {"w": "can", "b": [0.6512, 0.5315, 0.6794, 0.5464]}, {"w": "be", "b": [0.6855, 0.5315, 0.7048, 0.5464]}, {"w": "saved", "b": [0.7109, 0.5315, 0.7553, 0.5464]}, {"w": "on", "b": [0.7614, 0.5315, 0.7812, 0.5464]}, {"w": "disk", "b": [0.7873, 0.5315, 0.8202, 0.5464]}, {"w": "while", "b": [0.8264, 0.5315, 0.8691, 0.5464]}]}, {"id": "b_8", "type": "paragraph", "text": "the training data can be discarded.", "words": [{"w": "the", "b": [0.1312, 0.5494, 0.1569, 0.5644]}, {"w": "training", "b": [0.163, 0.5494, 0.2267, 0.5644]}, {"w": "data", "b": [0.2328, 0.5494, 0.2687, 0.5644]}, {"w": "can", "b": [0.2748, 0.5494, 0.3025, 0.5644]}, {"w": "be", "b": [0.3087, 0.5494, 0.3277, 0.5644]}, {"w": "discarded.", "b": [0.3338, 0.5494, 0.415, 0.5644]}]}, {"id": "b_9", "type": "paragraph", "text": "Instance-based learning algorithms use the whole dataset as the model. One instance- based algorithm frequently used in practice is k-Nearest Neighbors (kNN). In classification, to predict a label for an input example, the kNN algorithm looks at the close neighborhood of the input example in the space of feature vectors and outputs the label that it saw most often in this close neighborhood.", "words": [{"w": "Instance-based", "b": [0.1312, 0.5766, 0.268, 0.5916]}, {"w": "learning", "b": [0.2751, 0.5766, 0.3498, 0.5916]}, {"w": "algorithms", "b": [0.3569, 0.5766, 0.4551, 0.5916]}, {"w": "use", "b": [0.4612, 0.5763, 0.4871, 0.5913]}, {"w": "the", "b": [0.4933, 0.5763, 0.5191, 0.5913]}, {"w": "whole", "b": [0.5253, 0.5763, 0.5718, 0.5913]}, {"w": "dataset", "b": [0.5779, 0.5763, 0.6369, 0.5913]}, {"w": "as", "b": [0.6431, 0.5763, 0.6597, 0.5913]}, {"w": "the", "b": [0.6659, 0.5763, 0.6918, 0.5913]}, {"w": "model.", "b": [0.6979, 0.5763, 0.7522, 0.5913]}, {"w": "One", "b": [0.7604, 0.5763, 0.7934, 0.5913]}, {"w": "instance-", "b": [0.7996, 0.5763, 0.8721, 0.5913]}, {"w": "based", "b": [0.1312, 0.5943, 0.1756, 0.6092]}, {"w": "algorithm", "b": [0.1804, 0.5943, 0.2568, 0.6092]}, {"w": "frequently", "b": [0.2617, 0.5943, 0.3411, 0.6092]}, {"w": "used", "b": [0.346, 0.5943, 0.3813, 0.6092]}, {"w": "in", "b": [0.3861, 0.5943, 0.4012, 0.6092]}, {"w": "practice", "b": [0.4061, 0.5943, 0.4684, 0.6092]}, {"w": "is", "b": [0.4733, 0.5943, 0.4854, 0.6092]}, {"w": "k-Nearest", "b": [0.4901, 0.5946, 0.5801, 0.6095]}, {"w": "Neighbors", "b": [0.5857, 0.5946, 0.6798, 0.6095]}, {"w": "(kNN).", "b": [0.6846, 0.5943, 0.7404, 0.6092]}, {"w": "In", "b": [0.7452, 0.5943, 0.7618, 0.6092]}, {"w": "classification,", "b": [0.7667, 0.5943, 0.8714, 0.6092]}, {"w": "to", "b": [0.1312, 0.6122, 0.1476, 0.6272]}, {"w": "predict", "b": [0.1537, 0.6122, 0.2099, 0.6272]}, {"w": "a", "b": [0.2161, 0.6122, 0.2253, 0.6272]}, {"w": "label", "b": [0.2314, 0.6122, 0.2697, 0.6272]}, {"w": "for", "b": [0.2758, 0.6122, 0.2978, 0.6272]}, {"w": "an", "b": [0.304, 0.6122, 0.3234, 0.6272]}, {"w": "input", "b": [0.3295, 0.6122, 0.3724, 0.6272]}, {"w": "example,", "b": [0.3785, 0.6122, 0.4495, 0.6272]}, {"w": "the", "b": [0.4556, 0.6122, 0.4812, 0.6272]}, {"w": "kNN", "b": [0.4873, 0.6122, 0.5246, 0.6272]}, {"w": "algorithm", "b": [0.5307, 0.6122, 0.6084, 0.6272]}, {"w": "looks", "b": [0.6145, 0.6122, 0.6554, 0.6272]}, {"w": "at", "b": [0.6616, 0.6122, 0.6779, 0.6272]}, {"w": "the", "b": [0.684, 0.6122, 0.7096, 0.6272]}, {"w": "close", "b": [0.7157, 0.6122, 0.7536, 0.6272]}, {"w": "neighborhood", "b": [0.7597, 0.6122, 0.8691, 0.6272]}, {"w": "of", "b": [0.1312, 0.6302, 0.1462, 0.6451]}, {"w": "the", "b": [0.1523, 0.6302, 0.1781, 0.6451]}, {"w": "input", "b": [0.1842, 0.6302, 0.2275, 0.6451]}, {"w": "example", "b": [0.2336, 0.6302, 0.3, 0.6451]}, {"w": "in", "b": [0.3061, 0.6302, 0.3216, 0.6451]}, {"w": "the", "b": [0.3277, 0.6302, 0.3535, 0.6451]}, {"w": "space", "b": [0.3596, 0.6302, 0.403, 0.6451]}, {"w": "of", "b": [0.4092, 0.6302, 0.4241, 0.6451]}, {"w": "feature", "b": [0.4302, 0.6302, 0.4864, 0.6451]}, {"w": "vectors", "b": [0.4926, 0.6302, 0.5494, 0.6451]}, {"w": "and", "b": [0.5555, 0.6302, 0.5854, 0.6451]}, {"w": "outputs", "b": [0.5915, 0.6302, 0.6534, 0.6451]}, {"w": "the", "b": [0.6595, 0.6302, 0.6853, 0.6451]}, {"w": "label", "b": [0.6914, 0.6302, 0.73, 0.6451]}, {"w": "that", "b": [0.7362, 0.6302, 0.7702, 0.6451]}, {"w": "it", "b": [0.7763, 0.6302, 0.7887, 0.6451]}, {"w": "saw", "b": [0.7948, 0.6302, 0.8243, 0.6451]}, {"w": "most", "b": [0.8304, 0.6302, 0.8696, 0.6451]}, {"w": "often", "b": [0.1312, 0.6481, 0.1717, 0.6631]}, {"w": "in", "b": [0.1779, 0.6481, 0.1933, 0.6631]}, {"w": "this", "b": [0.1994, 0.6481, 0.2293, 0.6631]}, {"w": "close", "b": [0.2354, 0.6481, 0.2735, 0.6631]}, {"w": "neighborhood.", "b": [0.2796, 0.6481, 0.3945, 0.6631]}]}, {"id": "b_10", "type": "paragraph", "text": "1.3.9 Shallow vs. Deep Learning", "words": [{"w": "1.3.9", "b": [0.1312, 0.6963, 0.1749, 0.7112]}, {"w": "Shallow", "b": [0.1961, 0.6963, 0.2671, 0.7112]}, {"w": "vs.", "b": [0.2742, 0.6963, 0.2997, 0.7112]}, {"w": "Deep", "b": [0.3067, 0.6963, 0.3542, 0.7112]}, {"w": "Learning", "b": [0.3613, 0.6963, 0.443, 0.7112]}]}, {"id": "b_11", "type": "paragraph", "text": "A shallow learning algorithm learns the parameters of the model directly from the features of the training examples. Most machine learning algorithms are shallow. The notorious exceptions are neural network learning algorithms, specifically those that build neural networks with more than one layer between input and output. Such neural networks are called deep neural networks. In deep neural network learning (or, simply, deep learning),", "words": [{"w": "A", "b": [0.1305, 0.7325, 0.1441, 0.7475]}, {"w": "shallow", "b": [0.1498, 0.7328, 0.2175, 0.7478]}, {"w": "learning", "b": [0.2241, 0.7328, 0.2989, 0.7478]}, {"w": "algorithm", "b": [0.3048, 0.7325, 0.3812, 0.7475]}, {"w": "learns", "b": [0.3869, 0.7325, 0.4333, 0.7475]}, {"w": "the", "b": [0.4391, 0.7325, 0.4642, 0.7475]}, {"w": "parameters", "b": [0.47, 0.7325, 0.5576, 0.7475]}, {"w": "of", "b": [0.5634, 0.7325, 0.5779, 0.7475]}, {"w": "the", "b": [0.5837, 0.7325, 0.6088, 0.7475]}, {"w": "model", "b": [0.6146, 0.7325, 0.6623, 0.7475]}, {"w": "directly", "b": [0.6681, 0.7325, 0.7279, 0.7475]}, {"w": "from", "b": [0.7337, 0.7325, 0.7704, 0.7475]}, {"w": "the", "b": [0.7762, 0.7325, 0.8013, 0.7475]}, {"w": "features", "b": [0.8071, 0.7325, 0.869, 0.7475]}, {"w": "of", "b": [0.1312, 0.7505, 0.1464, 0.7654]}, {"w": "the", "b": [0.1538, 0.7505, 0.1799, 0.7654]}, {"w": "training", "b": [0.1873, 0.7505, 0.2522, 0.7654]}, {"w": "examples.", "b": [0.2596, 0.7505, 0.3397, 0.7654]}, {"w": "Most", "b": [0.3516, 0.7505, 0.393, 0.7654]}, {"w": "machine", "b": [0.4004, 0.7505, 0.4678, 0.7654]}, {"w": "learning", "b": [0.4752, 0.7505, 0.5412, 0.7654]}, {"w": "algorithms", "b": [0.5485, 0.7505, 0.6355, 0.7654]}, {"w": "are", "b": [0.6429, 0.7505, 0.668, 0.7654]}, {"w": "shallow.", "b": [0.6754, 0.7505, 0.7409, 0.7654]}, {"w": "The", "b": [0.7528, 0.7505, 0.7852, 0.7654]}, {"w": "notorious", "b": [0.7926, 0.7505, 0.8691, 0.7654]}, {"w": "exceptions", "b": [0.1312, 0.7684, 0.2166, 0.7834]}, {"w": "are", "b": [0.2241, 0.7684, 0.2493, 0.7834]}, {"w": "neural", "b": [0.2567, 0.7687, 0.315, 0.7837]}, {"w": "network", "b": [0.3236, 0.7687, 0.3981, 0.7837]}, {"w": "learning", "b": [0.4057, 0.7684, 0.4717, 0.7834]}, {"w": "algorithms,", "b": [0.4792, 0.7684, 0.5714, 0.7834]}, {"w": "specifically", "b": [0.5792, 0.7684, 0.6683, 0.7834]}, {"w": "those", "b": [0.6758, 0.7684, 0.7188, 0.7834]}, {"w": "that", "b": [0.7263, 0.7684, 0.7608, 0.7834]}, {"w": "build", "b": [0.7683, 0.7684, 0.8102, 0.7834]}, {"w": "neural", "b": [0.8177, 0.7684, 0.869, 0.7834]}, {"w": "networks", "b": [0.1312, 0.7864, 0.2041, 0.8013]}, {"w": "with", "b": [0.2106, 0.7864, 0.2472, 0.8013]}, {"w": "more", "b": [0.2537, 0.7864, 0.2945, 0.8013]}, {"w": "than", "b": [0.301, 0.7864, 0.3386, 0.8013]}, {"w": "one", "b": [0.3451, 0.7864, 0.3734, 0.8013]}, {"w": "layer", "b": [0.3798, 0.7867, 0.4245, 0.8016]}, {"w": "between", "b": [0.4309, 0.7864, 0.4974, 0.8013]}, {"w": "input", "b": [0.5039, 0.7864, 0.5478, 0.8013]}, {"w": "and", "b": [0.5543, 0.7864, 0.5846, 0.8013]}, {"w": "output.", "b": [0.5911, 0.7864, 0.6518, 0.8013]}, {"w": "Such", "b": [0.661, 0.7864, 0.7002, 0.8013]}, {"w": "neural", "b": [0.7067, 0.7864, 0.758, 0.8013]}, {"w": "networks", "b": [0.7645, 0.7864, 0.8374, 0.8013]}, {"w": "are", "b": [0.8438, 0.7864, 0.869, 0.8013]}, {"w": "called", "b": [0.1312, 0.8043, 0.1765, 0.8193]}, {"w": "deep", "b": [0.1813, 0.8046, 0.2243, 0.8196]}, {"w": "neural", "b": [0.2299, 0.8046, 0.2882, 0.8196]}, {"w": "networks.", "b": [0.2938, 0.8043, 0.3816, 0.8196]}, {"w": "In", "b": [0.3894, 0.8043, 0.406, 0.8193]}, {"w": "deep", "b": [0.4109, 0.8043, 0.4471, 0.8193]}, {"w": "neural", "b": [0.4519, 0.8043, 0.5012, 0.8193]}, {"w": "network", "b": [0.5061, 0.8043, 0.569, 0.8193]}, {"w": "learning", "b": [0.5738, 0.8043, 0.6372, 0.8193]}, {"w": "(or,", "b": [0.6421, 0.8043, 0.6703, 0.8193]}, {"w": "simply,", "b": [0.6754, 0.8043, 0.7307, 0.8193]}, {"w": "deep", "b": [0.7357, 0.8046, 0.7787, 0.8196]}, {"w": "learning),", "b": [0.7843, 0.8043, 0.8713, 0.8196]}]}, {"id": "b_12", "type": "paragraph", "text": "9There’s still one label per example, though.", "words": [{"w": "9There’s", "b": [0.1518, 0.8322, 0.2101, 0.8461]}, {"w": "still", "b": [0.2153, 0.8341, 0.2406, 0.8461]}, {"w": "one", "b": [0.2459, 0.8341, 0.2694, 0.8461]}, {"w": "label", "b": [0.2746, 0.8341, 0.3073, 0.8461]}, {"w": "per", "b": [0.3125, 0.8341, 0.3347, 0.8461]}, {"w": "example,", "b": [0.3399, 0.8341, 0.4005, 0.8461]}, {"w": "though.", "b": [0.4057, 0.8341, 0.4579, 0.8461]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "13", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 22, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "contrary to shallow learning, most model parameters are learned not directly from the features of the training examples, but from the outputs of the preceding layers.", "words": [{"w": "contrary", "b": [0.1312, 0.0881, 0.1977, 0.1031]}, {"w": "to", "b": [0.2026, 0.0881, 0.2186, 0.1031]}, {"w": "shallow", "b": [0.2236, 0.0881, 0.2814, 0.1031]}, {"w": "learning,", "b": [0.2863, 0.0881, 0.3547, 0.1031]}, {"w": "most", "b": [0.3599, 0.0881, 0.3982, 0.1031]}, {"w": "model", "b": [0.4031, 0.0881, 0.4508, 0.1031]}, {"w": "parameters", "b": [0.4557, 0.0881, 0.5434, 0.1031]}, {"w": "are", "b": [0.5483, 0.0881, 0.5725, 0.1031]}, {"w": "learned", "b": [0.5774, 0.0881, 0.6347, 0.1031]}, {"w": "not", "b": [0.6396, 0.0881, 0.6658, 0.1031]}, {"w": "directly", "b": [0.6707, 0.0881, 0.7305, 0.1031]}, {"w": "from", "b": [0.7354, 0.0881, 0.7722, 0.1031]}, {"w": "the", "b": [0.7771, 0.0881, 0.8022, 0.1031]}, {"w": "features", "b": [0.8071, 0.0881, 0.8691, 0.1031]}, {"w": "of", "b": [0.1312, 0.106, 0.1461, 0.121]}, {"w": "the", "b": [0.1522, 0.106, 0.1779, 0.121]}, {"w": "training", "b": [0.1841, 0.106, 0.2477, 0.121]}, {"w": "examples,", "b": [0.2538, 0.106, 0.3324, 0.121]}, {"w": "but", "b": [0.3385, 0.106, 0.3662, 0.121]}, {"w": "from", "b": [0.3724, 0.106, 0.4098, 0.121]}, {"w": "the", "b": [0.416, 0.106, 0.4416, 0.121]}, {"w": "outputs", "b": [0.4478, 0.106, 0.5094, 0.121]}, {"w": "of", "b": [0.5156, 0.106, 0.5304, 0.121]}, {"w": "the", "b": [0.5366, 0.106, 0.5622, 0.121]}, {"w": "preceding", "b": [0.5684, 0.106, 0.6454, 0.121]}, {"w": "layers.", "b": [0.6515, 0.106, 0.7024, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "1.3.10 Training vs. Scoring", "words": [{"w": "1.3.10", "b": [0.1312, 0.1542, 0.1855, 0.1692]}, {"w": "Training", "b": [0.2067, 0.1542, 0.2847, 0.1692]}, {"w": "vs.", "b": [0.2918, 0.1542, 0.3173, 0.1692]}, {"w": "Scoring", "b": [0.3244, 0.1542, 0.3932, 0.1692]}]}, {"id": "b_2", "type": "paragraph", "text": "When we apply a machine learning algorithm to a dataset in order to obtain a model, we", "words": [{"w": "When", "b": [0.1303, 0.1905, 0.1789, 0.2054]}, {"w": "we", "b": [0.1853, 0.1905, 0.2067, 0.2054]}, {"w": "apply", "b": [0.2131, 0.1905, 0.2586, 0.2054]}, {"w": "a", "b": [0.2649, 0.1905, 0.2743, 0.2054]}, {"w": "machine", "b": [0.2807, 0.1905, 0.3481, 0.2054]}, {"w": "learning", "b": [0.3545, 0.1905, 0.4204, 0.2054]}, {"w": "algorithm", "b": [0.4268, 0.1905, 0.5063, 0.2054]}, {"w": "to", "b": [0.5126, 0.1905, 0.5293, 0.2054]}, {"w": "a", "b": [0.5357, 0.1905, 0.5451, 0.2054]}, {"w": "dataset", "b": [0.5514, 0.1905, 0.6112, 0.2054]}, {"w": "in", "b": [0.6175, 0.1905, 0.6332, 0.2054]}, {"w": "order", "b": [0.6395, 0.1905, 0.6825, 0.2054]}, {"w": "to", "b": [0.6889, 0.1905, 0.7056, 0.2054]}, {"w": "obtain", "b": [0.7119, 0.1905, 0.7642, 0.2054]}, {"w": "a", "b": [0.7705, 0.1905, 0.78, 0.2054]}, {"w": "model,", "b": [0.7863, 0.1905, 0.8412, 0.2054]}, {"w": "we", "b": [0.8476, 0.1905, 0.869, 0.2054]}]}, {"id": "b_3", "type": "paragraph", "text": "talk about model training or simply training.", "words": [{"w": "talk", "b": [0.1312, 0.2084, 0.1625, 0.2234]}, {"w": "about", "b": [0.1686, 0.2084, 0.2153, 0.2234]}, {"w": "model", "b": [0.2214, 0.2087, 0.2777, 0.2237]}, {"w": "training", "b": [0.2848, 0.2087, 0.3581, 0.2237]}, {"w": "or", "b": [0.3644, 0.2084, 0.3809, 0.2234]}, {"w": "simply", "b": [0.387, 0.2084, 0.4399, 0.2234]}, {"w": "training.", "b": [0.4461, 0.2084, 0.5148, 0.2234]}]}, {"id": "b_4", "type": "paragraph", "text": "When we apply a trained model to an input example (or, sometimes, a sequence of examples)", "words": [{"w": "When", "b": [0.1303, 0.2353, 0.177, 0.2503]}, {"w": "we", "b": [0.1829, 0.2353, 0.2035, 0.2503]}, {"w": "apply", "b": [0.2094, 0.2353, 0.2531, 0.2503]}, {"w": "a", "b": [0.259, 0.2353, 0.268, 0.2503]}, {"w": "trained", "b": [0.2739, 0.2353, 0.3302, 0.2503]}, {"w": "model", "b": [0.3361, 0.2353, 0.3838, 0.2503]}, {"w": "to", "b": [0.3897, 0.2353, 0.4058, 0.2503]}, {"w": "an", "b": [0.4116, 0.2353, 0.4307, 0.2503]}, {"w": "input", "b": [0.4366, 0.2353, 0.4788, 0.2503]}, {"w": "example", "b": [0.4847, 0.2353, 0.5495, 0.2503]}, {"w": "(or,", "b": [0.5554, 0.2353, 0.5836, 0.2503]}, {"w": "sometimes,", "b": [0.5895, 0.2353, 0.6761, 0.2503]}, {"w": "a", "b": [0.682, 0.2353, 0.6911, 0.2503]}, {"w": "sequence", "b": [0.697, 0.2353, 0.7659, 0.2503]}, {"w": "of", "b": [0.7718, 0.2353, 0.7864, 0.2503]}, {"w": "examples)", "b": [0.7922, 0.2353, 0.8712, 0.2503]}]}, {"id": "b_5", "type": "paragraph", "text": "in order to obtain a prediction (or, predictions) or to somehow transform an input, we talk about scoring.", "words": [{"w": "in", "b": [0.1312, 0.2533, 0.1467, 0.2682]}, {"w": "order", "b": [0.1528, 0.2533, 0.1951, 0.2682]}, {"w": "to", "b": [0.2013, 0.2533, 0.2177, 0.2682]}, {"w": "obtain", "b": [0.2239, 0.2533, 0.2754, 0.2682]}, {"w": "a", "b": [0.2815, 0.2533, 0.2908, 0.2682]}, {"w": "prediction", "b": [0.2969, 0.2533, 0.3783, 0.2682]}, {"w": "(or,", "b": [0.3844, 0.2533, 0.4133, 0.2682]}, {"w": "predictions)", "b": [0.4195, 0.2533, 0.5154, 0.2682]}, {"w": "or", "b": [0.5215, 0.2533, 0.538, 0.2682]}, {"w": "to", "b": [0.5442, 0.2533, 0.5606, 0.2682]}, {"w": "somehow", "b": [0.5668, 0.2533, 0.6395, 0.2682]}, {"w": "transform", "b": [0.6456, 0.2533, 0.7245, 0.2682]}, {"w": "an", "b": [0.7307, 0.2533, 0.7502, 0.2682]}, {"w": "input,", "b": [0.7564, 0.2533, 0.8048, 0.2682]}, {"w": "we", "b": [0.8109, 0.2533, 0.832, 0.2682]}, {"w": "talk", "b": [0.8381, 0.2533, 0.8695, 0.2682]}, {"w": "about", "b": [0.1312, 0.2712, 0.1779, 0.2862]}, {"w": "scoring.", "b": [0.184, 0.2712, 0.2548, 0.2865]}]}, {"id": "b_6", "type": "paragraph", "text": "1.4 When to Use Machine Learning", "words": [{"w": "1.4", "b": [0.1312, 0.3201, 0.1631, 0.338]}, {"w": "When", "b": [0.188, 0.3201, 0.2528, 0.338]}, {"w": "to", "b": [0.2611, 0.3201, 0.2832, 0.338]}, {"w": "Use", "b": [0.2915, 0.3201, 0.3319, 0.338]}, {"w": "Machine", "b": [0.3402, 0.3201, 0.4322, 0.338]}, {"w": "Learning", "b": [0.4405, 0.3201, 0.5362, 0.338]}]}, {"id": "b_7", "type": "paragraph", "text": "Machine learning is a powerful tool for solving practical problems. However, like any tool, it should be used in the right context. Trying to solve all problems using machine learning would be a mistake.", "words": [{"w": "Machine", "b": [0.1312, 0.3587, 0.2002, 0.3736]}, {"w": "learning", "b": [0.2064, 0.3587, 0.2723, 0.3736]}, {"w": "is", "b": [0.2784, 0.3587, 0.2911, 0.3736]}, {"w": "a", "b": [0.2972, 0.3587, 0.3066, 0.3736]}, {"w": "powerful", "b": [0.3127, 0.3587, 0.3828, 0.3736]}, {"w": "tool", "b": [0.389, 0.3587, 0.4208, 0.3736]}, {"w": "for", "b": [0.427, 0.3587, 0.4495, 0.3736]}, {"w": "solving", "b": [0.4556, 0.3587, 0.5127, 0.3736]}, {"w": "practical", "b": [0.5188, 0.3587, 0.5899, 0.3736]}, {"w": "problems.", "b": [0.5961, 0.3587, 0.6757, 0.3736]}, {"w": "However,", "b": [0.6839, 0.3587, 0.7587, 0.3736]}, {"w": "like", "b": [0.7648, 0.3587, 0.793, 0.3736]}, {"w": "any", "b": [0.7992, 0.3587, 0.8284, 0.3736]}, {"w": "tool,", "b": [0.8346, 0.3587, 0.8717, 0.3736]}, {"w": "it", "b": [0.1312, 0.3766, 0.1436, 0.3916]}, {"w": "should", "b": [0.1498, 0.3766, 0.2027, 0.3916]}, {"w": "be", "b": [0.2088, 0.3766, 0.2279, 0.3916]}, {"w": "used", "b": [0.2341, 0.3766, 0.2704, 0.3916]}, {"w": "in", "b": [0.2765, 0.3766, 0.2921, 0.3916]}, {"w": "the", "b": [0.2982, 0.3766, 0.3241, 0.3916]}, {"w": "right", "b": [0.3302, 0.3766, 0.369, 0.3916]}, {"w": "context.", "b": [0.3752, 0.3766, 0.4404, 0.3916]}, {"w": "Trying", "b": [0.4486, 0.3766, 0.5024, 0.3916]}, {"w": "to", "b": [0.5086, 0.3766, 0.5251, 0.3916]}, {"w": "solve", "b": [0.5312, 0.3766, 0.5707, 0.3916]}, {"w": "all", "b": [0.5768, 0.3766, 0.5965, 0.3916]}, {"w": "problems", "b": [0.6026, 0.3766, 0.6762, 0.3916]}, {"w": "using", "b": [0.6824, 0.3766, 0.7249, 0.3916]}, {"w": "machine", "b": [0.731, 0.3766, 0.7978, 0.3916]}, {"w": "learning", "b": [0.8039, 0.3766, 0.8691, 0.3916]}, {"w": "would", "b": [0.1306, 0.3945, 0.1782, 0.4095]}, {"w": "be", "b": [0.1844, 0.3945, 0.2034, 0.4095]}, {"w": "a", "b": [0.2095, 0.3945, 0.2188, 0.4095]}, {"w": "mistake.", "b": [0.2249, 0.3945, 0.2916, 0.4095]}]}, {"id": "b_8", "type": "paragraph", "text": "You should consider using machine learning in one of the following situations.", "words": [{"w": "You", "b": [0.1305, 0.4215, 0.1623, 0.4364]}, {"w": "should", "b": [0.1685, 0.4215, 0.2209, 0.4364]}, {"w": "consider", "b": [0.227, 0.4215, 0.2928, 0.4364]}, {"w": "using", "b": [0.299, 0.4215, 0.3411, 0.4364]}, {"w": "machine", "b": [0.3473, 0.4215, 0.4134, 0.4364]}, {"w": "learning", "b": [0.4196, 0.4215, 0.4842, 0.4364]}, {"w": "in", "b": [0.4904, 0.4215, 0.5058, 0.4364]}, {"w": "one", "b": [0.5119, 0.4215, 0.5396, 0.4364]}, {"w": "of", "b": [0.5458, 0.4215, 0.5606, 0.4364]}, {"w": "the", "b": [0.5668, 0.4215, 0.5924, 0.4364]}, {"w": "following", "b": [0.5986, 0.4215, 0.6703, 0.4364]}, {"w": "situations.", "b": [0.6765, 0.4215, 0.7598, 0.4364]}]}, {"id": "b_9", "type": "paragraph", "text": "1.4.1 When the Problem Is Too Complex for Coding", "words": [{"w": "1.4.1", "b": [0.1312, 0.4696, 0.1749, 0.4846]}, {"w": "When", "b": [0.1961, 0.4696, 0.2513, 0.4846]}, {"w": "the", "b": [0.2584, 0.4696, 0.2881, 0.4846]}, {"w": "Problem", "b": [0.2952, 0.4696, 0.3742, 0.4846]}, {"w": "Is", "b": [0.3812, 0.4696, 0.3977, 0.4846]}, {"w": "Too", "b": [0.4047, 0.4696, 0.4395, 0.4846]}, {"w": "Complex", "b": [0.4466, 0.4696, 0.5288, 0.4846]}, {"w": "for", "b": [0.5359, 0.4696, 0.5617, 0.4846]}, {"w": "Coding", "b": [0.5688, 0.4696, 0.6354, 0.4846]}]}, {"id": "b_10", "type": "paragraph", "text": "In a situation where the problem is so complex or big that you cannot hope to write all the rules to solve it and where a partial solution is viable and interesting, you can try to solve the problem with machine learning.", "words": [{"w": "In", "b": [0.1312, 0.5059, 0.1481, 0.5208]}, {"w": "a", "b": [0.1542, 0.5059, 0.1634, 0.5208]}, {"w": "situation", "b": [0.1696, 0.5059, 0.2401, 0.5208]}, {"w": "where", "b": [0.2463, 0.5059, 0.2933, 0.5208]}, {"w": "the", "b": [0.2995, 0.5059, 0.325, 0.5208]}, {"w": "problem", "b": [0.3312, 0.5059, 0.3966, 0.5208]}, {"w": "is", "b": [0.4027, 0.5059, 0.4151, 0.5208]}, {"w": "so", "b": [0.4213, 0.5059, 0.4377, 0.5208]}, {"w": "complex", "b": [0.4439, 0.5059, 0.5097, 0.5208]}, {"w": "or", "b": [0.5159, 0.5059, 0.5323, 0.5208]}, {"w": "big", "b": [0.5384, 0.5059, 0.5629, 0.5208]}, {"w": "that", "b": [0.5691, 0.5059, 0.6028, 0.5208]}, {"w": "you", "b": [0.6089, 0.5059, 0.6375, 0.5208]}, {"w": "cannot", "b": [0.6437, 0.5059, 0.6978, 0.5208]}, {"w": "hope", "b": [0.704, 0.5059, 0.7423, 0.5208]}, {"w": "to", "b": [0.7484, 0.5059, 0.7648, 0.5208]}, {"w": "write", "b": [0.7709, 0.5059, 0.8118, 0.5208]}, {"w": "all", "b": [0.818, 0.5059, 0.8374, 0.5208]}, {"w": "the", "b": [0.8435, 0.5059, 0.8691, 0.5208]}, {"w": "rules", "b": [0.1312, 0.5238, 0.1698, 0.5388]}, {"w": "to", "b": [0.176, 0.5238, 0.1926, 0.5388]}, {"w": "solve", "b": [0.1988, 0.5238, 0.2384, 0.5388]}, {"w": "it", "b": [0.2445, 0.5238, 0.257, 0.5388]}, {"w": "and", "b": [0.2632, 0.5238, 0.2933, 0.5388]}, {"w": "where", "b": [0.2995, 0.5238, 0.3473, 0.5388]}, {"w": "a", "b": [0.3535, 0.5238, 0.3628, 0.5388]}, {"w": "partial", "b": [0.369, 0.5238, 0.423, 0.5388]}, {"w": "solution", "b": [0.4292, 0.5238, 0.4937, 0.5388]}, {"w": "is", "b": [0.4999, 0.5238, 0.5125, 0.5388]}, {"w": "viable", "b": [0.5186, 0.5238, 0.567, 0.5388]}, {"w": "and", "b": [0.5731, 0.5238, 0.6032, 0.5388]}, {"w": "interesting,", "b": [0.6094, 0.5238, 0.7005, 0.5388]}, {"w": "you", "b": [0.7067, 0.5238, 0.7357, 0.5388]}, {"w": "can", "b": [0.7419, 0.5238, 0.77, 0.5388]}, {"w": "try", "b": [0.7761, 0.5238, 0.8006, 0.5388]}, {"w": "to", "b": [0.8068, 0.5238, 0.8234, 0.5388]}, {"w": "solve", "b": [0.8295, 0.5238, 0.8691, 0.5388]}, {"w": "the", "b": [0.1312, 0.5418, 0.1569, 0.5567]}, {"w": "problem", "b": [0.163, 0.5418, 0.2287, 0.5567]}, {"w": "with", "b": [0.2348, 0.5418, 0.2707, 0.5567]}, {"w": "machine", "b": [0.2769, 0.5418, 0.343, 0.5567]}, {"w": "learning.", "b": [0.3492, 0.5418, 0.419, 0.5567]}]}, {"id": "b_11", "type": "paragraph", "text": "One example is spam detection: it’s impossible to write the code that will implement such a logic that will effectively detect spam messages and let genuine messages reach the inbox. There are just too many factors to consider. For instance, if you program your spam filter to reject all messages from people who are not in your contacts, you risk losing messages from someone who has got your business card at a conference. If you make an exception for messages containing specific keywords related to your work, you will probably miss a message from your child’s teacher, and so on.", "words": [{"w": "One", "b": [0.1312, 0.5687, 0.1636, 0.5837]}, {"w": "example", "b": [0.1697, 0.5687, 0.235, 0.5837]}, {"w": "is", "b": [0.2412, 0.5687, 0.2534, 0.5837]}, {"w": "spam", "b": [0.2595, 0.5687, 0.3011, 0.5837]}, {"w": "detection:", "b": [0.3073, 0.5687, 0.3852, 0.5837]}, {"w": "it’s", "b": [0.3934, 0.5687, 0.4178, 0.5837]}, {"w": "impossible", "b": [0.4239, 0.5687, 0.5066, 0.5837]}, {"w": "to", "b": [0.5128, 0.5687, 0.5289, 0.5837]}, {"w": "write", "b": [0.5351, 0.5687, 0.5756, 0.5837]}, {"w": "the", "b": [0.5817, 0.5687, 0.607, 0.5837]}, {"w": "code", "b": [0.6132, 0.5687, 0.6491, 0.5837]}, {"w": "that", "b": [0.6552, 0.5687, 0.6886, 0.5837]}, {"w": "will", "b": [0.6948, 0.5687, 0.7231, 0.5837]}, {"w": "implement", "b": [0.7292, 0.5687, 0.8127, 0.5837]}, {"w": "such", "b": [0.8188, 0.5687, 0.8539, 0.5837]}, {"w": "a", "b": [0.86, 0.5687, 0.8691, 0.5837]}, {"w": "logic", "b": [0.1312, 0.5867, 0.1689, 0.6016]}, {"w": "that", "b": [0.1754, 0.5867, 0.2099, 0.6016]}, {"w": "will", "b": [0.2164, 0.5867, 0.2457, 0.6016]}, {"w": "effectively", "b": [0.2522, 0.5867, 0.3338, 0.6016]}, {"w": "detect", "b": [0.3404, 0.5867, 0.3906, 0.6016]}, {"w": "spam", "b": [0.3971, 0.5867, 0.4401, 0.6016]}, {"w": "messages", "b": [0.4466, 0.5867, 0.5202, 0.6016]}, {"w": "and", "b": [0.5267, 0.5867, 0.557, 0.6016]}, {"w": "let", "b": [0.5635, 0.5867, 0.5845, 0.6016]}, {"w": "genuine", "b": [0.591, 0.5867, 0.6532, 0.6016]}, {"w": "messages", "b": [0.6598, 0.5867, 0.7333, 0.6016]}, {"w": "reach", "b": [0.7398, 0.5867, 0.7833, 0.6016]}, {"w": "the", "b": [0.7898, 0.5867, 0.816, 0.6016]}, {"w": "inbox.", "b": [0.8225, 0.5867, 0.8727, 0.6016]}, {"w": "There", "b": [0.1306, 0.6046, 0.1785, 0.6196]}, {"w": "are", "b": [0.1846, 0.6046, 0.2097, 0.6196]}, {"w": "just", "b": [0.2158, 0.6046, 0.2467, 0.6196]}, {"w": "too", "b": [0.2528, 0.6046, 0.2793, 0.6196]}, {"w": "many", "b": [0.2855, 0.6046, 0.3302, 0.6196]}, {"w": "factors", "b": [0.3364, 0.6046, 0.3912, 0.6196]}, {"w": "to", "b": [0.3974, 0.6046, 0.414, 0.6196]}, {"w": "consider.", "b": [0.4201, 0.6046, 0.4921, 0.6196]}, {"w": "For", "b": [0.5004, 0.6046, 0.5277, 0.6196]}, {"w": "instance,", "b": [0.5339, 0.6046, 0.6059, 0.6196]}, {"w": "if", "b": [0.612, 0.6046, 0.6229, 0.6196]}, {"w": "you", "b": [0.6291, 0.6046, 0.6582, 0.6196]}, {"w": "program", "b": [0.6644, 0.6046, 0.7332, 0.6196]}, {"w": "your", "b": [0.7393, 0.6046, 0.7758, 0.6196]}, {"w": "spam", "b": [0.782, 0.6046, 0.8247, 0.6196]}, {"w": "filter", "b": [0.8309, 0.6046, 0.8695, 0.6196]}, {"w": "to", "b": [0.1312, 0.6225, 0.148, 0.6375]}, {"w": "reject", "b": [0.1546, 0.6225, 0.2002, 0.6375]}, {"w": "all", "b": [0.2069, 0.6225, 0.2267, 0.6375]}, {"w": "messages", "b": [0.2334, 0.6225, 0.307, 0.6375]}, {"w": "from", "b": [0.3136, 0.6225, 0.3518, 0.6375]}, {"w": "people", "b": [0.3585, 0.6225, 0.4113, 0.6375]}, {"w": "who", "b": [0.418, 0.6225, 0.4514, 0.6375]}, {"w": "are", "b": [0.4581, 0.6225, 0.4833, 0.6375]}, {"w": "not", "b": [0.4899, 0.6225, 0.5171, 0.6375]}, {"w": "in", "b": [0.5238, 0.6225, 0.5395, 0.6375]}, {"w": "your", "b": [0.5462, 0.6225, 0.5828, 0.6375]}, {"w": "contacts,", "b": [0.5895, 0.6225, 0.6623, 0.6375]}, {"w": "you", "b": [0.6691, 0.6225, 0.6984, 0.6375]}, {"w": "risk", "b": [0.7051, 0.6225, 0.7351, 0.6375]}, {"w": "losing", "b": [0.7417, 0.6225, 0.7889, 0.6375]}, {"w": "messages", "b": [0.7956, 0.6225, 0.8691, 0.6375]}, {"w": "from", "b": [0.1312, 0.6405, 0.1684, 0.6554]}, {"w": "someone", "b": [0.1746, 0.6405, 0.2418, 0.6554]}, {"w": "who", "b": [0.248, 0.6405, 0.2805, 0.6554]}, {"w": "has", "b": [0.2867, 0.6405, 0.3132, 0.6554]}, {"w": "got", "b": [0.3194, 0.6405, 0.3448, 0.6554]}, {"w": "your", "b": [0.351, 0.6405, 0.3866, 0.6554]}, {"w": "business", "b": [0.3928, 0.6405, 0.4582, 0.6554]}, {"w": "card", "b": [0.4644, 0.6405, 0.499, 0.6554]}, {"w": "at", "b": [0.5052, 0.6405, 0.5214, 0.6554]}, {"w": "a", "b": [0.5276, 0.6405, 0.5368, 0.6554]}, {"w": "conference.", "b": [0.5429, 0.6405, 0.631, 0.6554]}, {"w": "If", "b": [0.6392, 0.6405, 0.6514, 0.6554]}, {"w": "you", "b": [0.6576, 0.6405, 0.6861, 0.6554]}, {"w": "make", "b": [0.6922, 0.6405, 0.7339, 0.6554]}, {"w": "an", "b": [0.7401, 0.6405, 0.7594, 0.6554]}, {"w": "exception", "b": [0.7656, 0.6405, 0.8414, 0.6554]}, {"w": "for", "b": [0.8475, 0.6405, 0.8695, 0.6554]}, {"w": "messages", "b": [0.1312, 0.6584, 0.2019, 0.6734]}, {"w": "containing", "b": [0.2076, 0.6584, 0.2895, 0.6734]}, {"w": "specific", "b": [0.2951, 0.6584, 0.3521, 0.6734]}, {"w": "keywords", "b": [0.3577, 0.6584, 0.4302, 0.6734]}, {"w": "related", "b": [0.4359, 0.6584, 0.4903, 0.6734]}, {"w": "to", "b": [0.4959, 0.6584, 0.512, 0.6734]}, {"w": "your", "b": [0.5177, 0.6584, 0.5529, 0.6734]}, {"w": "work,", "b": [0.5586, 0.6584, 0.6018, 0.6734]}, {"w": "you", "b": [0.6076, 0.6584, 0.6357, 0.6734]}, {"w": "will", "b": [0.6414, 0.6584, 0.6695, 0.6734]}, {"w": "probably", "b": [0.6752, 0.6584, 0.7451, 0.6734]}, {"w": "miss", "b": [0.7508, 0.6584, 0.7852, 0.6734]}, {"w": "a", "b": [0.7909, 0.6584, 0.7999, 0.6734]}, {"w": "message", "b": [0.8056, 0.6584, 0.8691, 0.6734]}, {"w": "from", "b": [0.1312, 0.6764, 0.1687, 0.6913]}, {"w": "your", "b": [0.1748, 0.6764, 0.2108, 0.6913]}, {"w": "child’s", "b": [0.2169, 0.6764, 0.2678, 0.6913]}, {"w": "teacher,", "b": [0.274, 0.6764, 0.3371, 0.6913]}, {"w": "and", "b": [0.3433, 0.6764, 0.373, 0.6913]}, {"w": "so", "b": [0.3792, 0.6764, 0.3957, 0.6913]}, {"w": "on.", "b": [0.4018, 0.6764, 0.4264, 0.6913]}]}, {"id": "b_12", "type": "paragraph", "text": "If you still decide to directly program a solution to that complex problem, with time, you will have in your programming code so many conditions and exceptions from those conditions that maintaining that code will eventually become infeasible. In this situation, training a classifier on examples “spam”/“not_spam” seems logical and the only viable choice.", "words": [{"w": "If", "b": [0.1312, 0.7033, 0.1438, 0.7183]}, {"w": "you", "b": [0.15, 0.7033, 0.1793, 0.7183]}, {"w": "still", "b": [0.1855, 0.7033, 0.2159, 0.7183]}, {"w": "decide", "b": [0.2221, 0.7033, 0.2734, 0.7183]}, {"w": "to", "b": [0.2796, 0.7033, 0.2963, 0.7183]}, {"w": "directly", "b": [0.3026, 0.7033, 0.3649, 0.7183]}, {"w": "program", "b": [0.3711, 0.7033, 0.4402, 0.7183]}, {"w": "a", "b": [0.4464, 0.7033, 0.4558, 0.7183]}, {"w": "solution", "b": [0.462, 0.7033, 0.5269, 0.7183]}, {"w": "to", "b": [0.5332, 0.7033, 0.5499, 0.7183]}, {"w": "that", "b": [0.5561, 0.7033, 0.5906, 0.7183]}, {"w": "complex", "b": [0.5968, 0.7033, 0.6643, 0.7183]}, {"w": "problem,", "b": [0.6705, 0.7033, 0.7427, 0.7183]}, {"w": "with", "b": [0.7489, 0.7033, 0.7855, 0.7183]}, {"w": "time,", "b": [0.7917, 0.7033, 0.8335, 0.7183]}, {"w": "you", "b": [0.8398, 0.7033, 0.8691, 0.7183]}, {"w": "will", "b": [0.1306, 0.7213, 0.1587, 0.7362]}, {"w": "have", "b": [0.1644, 0.7213, 0.2, 0.7362]}, {"w": "in", "b": [0.2057, 0.7213, 0.2208, 0.7362]}, {"w": "your", "b": [0.2264, 0.7213, 0.2616, 0.7362]}, {"w": "programming", "b": [0.2673, 0.7213, 0.3729, 0.7362]}, {"w": "code", "b": [0.3785, 0.7213, 0.4142, 0.7362]}, {"w": "so", "b": [0.4199, 0.7213, 0.4361, 0.7362]}, {"w": "many", "b": [0.4417, 0.7213, 0.4849, 0.7362]}, {"w": "conditions", "b": [0.4906, 0.7213, 0.5711, 0.7362]}, {"w": "and", "b": [0.5767, 0.7213, 0.6059, 0.7362]}, {"w": "exceptions", "b": [0.6115, 0.7213, 0.6936, 0.7362]}, {"w": "from", "b": [0.6992, 0.7213, 0.736, 0.7362]}, {"w": "those", "b": [0.7416, 0.7213, 0.7829, 0.7362]}, {"w": "conditions", "b": [0.7886, 0.7213, 0.8691, 0.7362]}, {"w": "that", "b": [0.1312, 0.7392, 0.1657, 0.7542]}, {"w": "maintaining", "b": [0.1721, 0.7392, 0.2699, 0.7542]}, {"w": "that", "b": [0.2763, 0.7392, 0.3108, 0.7542]}, {"w": "code", "b": [0.3172, 0.7392, 0.3543, 0.7542]}, {"w": "will", "b": [0.3607, 0.7392, 0.3899, 0.7542]}, {"w": "eventually", "b": [0.3963, 0.7392, 0.48, 0.7542]}, {"w": "become", "b": [0.4864, 0.7392, 0.5476, 0.7542]}, {"w": "infeasible.", "b": [0.554, 0.7392, 0.6351, 0.7542]}, {"w": "In", "b": [0.644, 0.7392, 0.6613, 0.7542]}, {"w": "this", "b": [0.6676, 0.7392, 0.6981, 0.7542]}, {"w": "situation,", "b": [0.7045, 0.7392, 0.782, 0.7542]}, {"w": "training", "b": [0.7884, 0.7392, 0.8533, 0.7542]}, {"w": "a", "b": [0.8597, 0.7392, 0.8691, 0.7542]}, {"w": "classifier", "b": [0.1312, 0.7571, 0.1992, 0.7721]}, {"w": "on", "b": [0.2053, 0.7571, 0.2248, 0.7721]}, {"w": "examples", "b": [0.231, 0.7571, 0.3044, 0.7721]}, {"w": "“spam”/“not_spam”", "b": [0.3105, 0.7571, 0.4794, 0.7721]}, {"w": "seems", "b": [0.4855, 0.7571, 0.5319, 0.7721]}, {"w": "logical", "b": [0.538, 0.7571, 0.5893, 0.7721]}, {"w": "and", "b": [0.5955, 0.7571, 0.6252, 0.7721]}, {"w": "the", "b": [0.6313, 0.7571, 0.657, 0.7721]}, {"w": "only", "b": [0.6631, 0.7571, 0.6975, 0.7721]}, {"w": "viable", "b": [0.7036, 0.7571, 0.7513, 0.7721]}, {"w": "choice.", "b": [0.7575, 0.7571, 0.8113, 0.7721]}]}, {"id": "b_13", "type": "paragraph", "text": "Another difficulty for writing code to solve a problem lies in the fact that humans have a hard time with prediction problems based on input that has too many parameters; it’s especially true when those parameters are correlated in unknown ways. For example, take the problem of predicting whether a borrower will repay a loan. Hundreds of numbers represent each borrower: age, salary, account balance, frequency of past payments, married or not, number", "words": [{"w": "Another", "b": [0.1305, 0.7841, 0.1954, 0.799]}, {"w": "difficulty", "b": [0.2009, 0.7841, 0.2702, 0.799]}, {"w": "for", "b": [0.2756, 0.7841, 0.2973, 0.799]}, {"w": "writing", "b": [0.3028, 0.7841, 0.3591, 0.799]}, {"w": "code", "b": [0.3645, 0.7841, 0.4003, 0.799]}, {"w": "to", "b": [0.4057, 0.7841, 0.4218, 0.799]}, {"w": "solve", "b": [0.4272, 0.7841, 0.4655, 0.799]}, {"w": "a", "b": [0.471, 0.7841, 0.48, 0.799]}, {"w": "problem", "b": [0.4855, 0.7841, 0.5499, 0.799]}, {"w": "lies", "b": [0.5553, 0.7841, 0.5806, 0.799]}, {"w": "in", "b": [0.586, 0.7841, 0.6011, 0.799]}, {"w": "the", "b": [0.6066, 0.7841, 0.6317, 0.799]}, {"w": "fact", "b": [0.6372, 0.7841, 0.6668, 0.799]}, {"w": "that", "b": [0.6723, 0.7841, 0.7054, 0.799]}, {"w": "humans", "b": [0.7109, 0.7841, 0.7718, 0.799]}, {"w": "have", "b": [0.7772, 0.7841, 0.8129, 0.799]}, {"w": "a", "b": [0.8184, 0.7841, 0.8274, 0.799]}, {"w": "hard", "b": [0.8329, 0.7841, 0.8691, 0.799]}, {"w": "time", "b": [0.1312, 0.802, 0.167, 0.817]}, {"w": "with", "b": [0.1732, 0.802, 0.2089, 0.817]}, {"w": "prediction", "b": [0.2151, 0.802, 0.2959, 0.817]}, {"w": "problems", "b": [0.302, 0.802, 0.3748, 0.817]}, {"w": "based", "b": [0.3809, 0.802, 0.426, 0.817]}, {"w": "on", "b": [0.4322, 0.802, 0.4516, 0.817]}, {"w": "input", "b": [0.4577, 0.802, 0.5007, 0.817]}, {"w": "that", "b": [0.5068, 0.802, 0.5405, 0.817]}, {"w": "has", "b": [0.5467, 0.802, 0.5734, 0.817]}, {"w": "too", "b": [0.5795, 0.802, 0.6056, 0.817]}, {"w": "many", "b": [0.6117, 0.802, 0.6556, 0.817]}, {"w": "parameters;", "b": [0.6618, 0.802, 0.7561, 0.817]}, {"w": "it’s", "b": [0.7622, 0.802, 0.7868, 0.817]}, {"w": "especially", "b": [0.793, 0.802, 0.8698, 0.817]}, {"w": "true", "b": [0.1312, 0.82, 0.1635, 0.8349]}, {"w": "when", "b": [0.1686, 0.82, 0.2098, 0.8349]}, {"w": "those", "b": [0.215, 0.82, 0.2563, 0.8349]}, {"w": "parameters", "b": [0.2614, 0.82, 0.3491, 0.8349]}, {"w": "are", "b": [0.3542, 0.82, 0.3784, 0.8349]}, {"w": "correlated", "b": [0.3834, 0.8203, 0.4767, 0.8352]}, {"w": "in", "b": [0.4818, 0.82, 0.4969, 0.8349]}, {"w": "unknown", "b": [0.502, 0.82, 0.5734, 0.8349]}, {"w": "ways.", "b": [0.5785, 0.82, 0.6213, 0.8349]}, {"w": "For", "b": [0.6292, 0.82, 0.6556, 0.8349]}, {"w": "example,", "b": [0.6608, 0.82, 0.7306, 0.8349]}, {"w": "take", "b": [0.7359, 0.82, 0.7691, 0.8349]}, {"w": "the", "b": [0.7743, 0.82, 0.7994, 0.8349]}, {"w": "problem", "b": [0.8046, 0.82, 0.8689, 0.8349]}, {"w": "of", "b": [0.1312, 0.8379, 0.1464, 0.8529]}, {"w": "predicting", "b": [0.1533, 0.8379, 0.236, 0.8529]}, {"w": "whether", "b": [0.2429, 0.8379, 0.3088, 0.8529]}, {"w": "a", "b": [0.3157, 0.8379, 0.3252, 0.8529]}, {"w": "borrower", "b": [0.332, 0.8379, 0.4049, 0.8529]}, {"w": "will", "b": [0.4118, 0.8379, 0.4411, 0.8529]}, {"w": "repay", "b": [0.448, 0.8379, 0.493, 0.8529]}, {"w": "a", "b": [0.4999, 0.8379, 0.5093, 0.8529]}, {"w": "loan.", "b": [0.5162, 0.8379, 0.5559, 0.8529]}, {"w": "Hundreds", "b": [0.5664, 0.8379, 0.6455, 0.8529]}, {"w": "of", "b": [0.6524, 0.8379, 0.6676, 0.8529]}, {"w": "numbers", "b": [0.6745, 0.8379, 0.7442, 0.8529]}, {"w": "represent", "b": [0.7511, 0.8379, 0.8261, 0.8529]}, {"w": "each", "b": [0.833, 0.8379, 0.8691, 0.8529]}, {"w": "borrower:", "b": [0.1312, 0.8559, 0.2072, 0.8708]}, {"w": "age,", "b": [0.2154, 0.8559, 0.247, 0.8708]}, {"w": "salary,", "b": [0.2531, 0.8559, 0.3042, 0.8708]}, {"w": "account", "b": [0.3103, 0.8559, 0.3719, 0.8708]}, {"w": "balance,", "b": [0.378, 0.8559, 0.4432, 0.8708]}, {"w": "frequency", "b": [0.4494, 0.8559, 0.5263, 0.8708]}, {"w": "of", "b": [0.5324, 0.8559, 0.5472, 0.8708]}, {"w": "past", "b": [0.5533, 0.8559, 0.587, 0.8708]}, {"w": "payments,", "b": [0.5932, 0.8559, 0.6742, 0.8708]}, {"w": "married", "b": [0.6803, 0.8559, 0.7426, 0.8708]}, {"w": "or", "b": [0.7487, 0.8559, 0.765, 0.8708]}, {"w": "not,", "b": [0.7712, 0.8559, 0.8027, 0.8708]}, {"w": "number", "b": [0.8088, 0.8559, 0.8695, 0.8708]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "14", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 23, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "of children, make and year of the car, mortgage balance, and so on. Some of those numbers may be important to make the decision, some may be less important alone, but become more important if considered in combination with some other numbers.", "words": [{"w": "of", "b": [0.1312, 0.0881, 0.146, 0.1031]}, {"w": "children,", "b": [0.1522, 0.0881, 0.2212, 0.1031]}, {"w": "make", "b": [0.2274, 0.0881, 0.2692, 0.1031]}, {"w": "and", "b": [0.2754, 0.0881, 0.305, 0.1031]}, {"w": "year", "b": [0.3111, 0.0881, 0.3449, 0.1031]}, {"w": "of", "b": [0.3511, 0.0881, 0.3659, 0.1031]}, {"w": "the", "b": [0.372, 0.0881, 0.3975, 0.1031]}, {"w": "car,", "b": [0.4037, 0.0881, 0.4334, 0.1031]}, {"w": "mortgage", "b": [0.4395, 0.0881, 0.5141, 0.1031]}, {"w": "balance,", "b": [0.5203, 0.0881, 0.5856, 0.1031]}, {"w": "and", "b": [0.5918, 0.0881, 0.6214, 0.1031]}, {"w": "so", "b": [0.6276, 0.0881, 0.644, 0.1031]}, {"w": "on.", "b": [0.6502, 0.0881, 0.6747, 0.1031]}, {"w": "Some", "b": [0.6829, 0.0881, 0.7258, 0.1031]}, {"w": "of", "b": [0.7319, 0.0881, 0.7467, 0.1031]}, {"w": "those", "b": [0.7529, 0.0881, 0.7949, 0.1031]}, {"w": "numbers", "b": [0.801, 0.0881, 0.8691, 0.1031]}, {"w": "may", "b": [0.1312, 0.106, 0.1644, 0.121]}, {"w": "be", "b": [0.1702, 0.106, 0.1888, 0.121]}, {"w": "important", "b": [0.1946, 0.106, 0.2741, 0.121]}, {"w": "to", "b": [0.2799, 0.106, 0.296, 0.121]}, {"w": "make", "b": [0.3018, 0.106, 0.343, 0.121]}, {"w": "the", "b": [0.3488, 0.106, 0.3739, 0.121]}, {"w": "decision,", "b": [0.3798, 0.106, 0.4472, 0.121]}, {"w": "some", "b": [0.4531, 0.106, 0.4924, 0.121]}, {"w": "may", "b": [0.4982, 0.106, 0.5314, 0.121]}, {"w": "be", "b": [0.5372, 0.106, 0.5558, 0.121]}, {"w": "less", "b": [0.5617, 0.106, 0.589, 0.121]}, {"w": "important", "b": [0.5948, 0.106, 0.6743, 0.121]}, {"w": "alone,", "b": [0.6801, 0.106, 0.7263, 0.121]}, {"w": "but", "b": [0.7322, 0.106, 0.7593, 0.121]}, {"w": "become", "b": [0.7652, 0.106, 0.824, 0.121]}, {"w": "more", "b": [0.8298, 0.106, 0.869, 0.121]}, {"w": "important", "b": [0.1312, 0.124, 0.2123, 0.1389]}, {"w": "if", "b": [0.2184, 0.124, 0.2292, 0.1389]}, {"w": "considered", "b": [0.2353, 0.124, 0.3196, 0.1389]}, {"w": "in", "b": [0.3258, 0.124, 0.3411, 0.1389]}, {"w": "combination", "b": [0.3473, 0.124, 0.4463, 0.1389]}, {"w": "with", "b": [0.4524, 0.124, 0.4883, 0.1389]}, {"w": "some", "b": [0.4944, 0.124, 0.5345, 0.1389]}, {"w": "other", "b": [0.5407, 0.124, 0.5828, 0.1389]}, {"w": "numbers.", "b": [0.5889, 0.124, 0.6624, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "Writing code that will make such decisions is hard because, even for an expert, it’s not clear", "words": [{"w": "Writing", "b": [0.1303, 0.1509, 0.191, 0.1659]}, {"w": "code", "b": [0.1972, 0.1509, 0.2332, 0.1659]}, {"w": "that", "b": [0.2393, 0.1509, 0.2727, 0.1659]}, {"w": "will", "b": [0.2789, 0.1509, 0.3072, 0.1659]}, {"w": "make", "b": [0.3134, 0.1509, 0.3549, 0.1659]}, {"w": "such", "b": [0.361, 0.1509, 0.3961, 0.1659]}, {"w": "decisions", "b": [0.4022, 0.1509, 0.4723, 0.1659]}, {"w": "is", "b": [0.4784, 0.1509, 0.4907, 0.1659]}, {"w": "hard", "b": [0.4969, 0.1509, 0.5334, 0.1659]}, {"w": "because,", "b": [0.5395, 0.1509, 0.6059, 0.1659]}, {"w": "even", "b": [0.6121, 0.1509, 0.6475, 0.1659]}, {"w": "for", "b": [0.6537, 0.1509, 0.6755, 0.1659]}, {"w": "an", "b": [0.6817, 0.1509, 0.7009, 0.1659]}, {"w": "expert,", "b": [0.7071, 0.1509, 0.7628, 0.1659]}, {"w": "it’s", "b": [0.769, 0.1509, 0.7934, 0.1659]}, {"w": "not", "b": [0.7995, 0.1509, 0.8259, 0.1659]}, {"w": "clear", "b": [0.832, 0.1509, 0.8695, 0.1659]}]}, {"id": "b_2", "type": "paragraph", "text": "how to combine, in an optimal way, all the attributes describing a person into a prediction.", "words": [{"w": "how", "b": [0.1312, 0.1689, 0.1635, 0.1838]}, {"w": "to", "b": [0.1697, 0.1689, 0.1861, 0.1838]}, {"w": "combine,", "b": [0.1922, 0.1689, 0.2635, 0.1838]}, {"w": "in", "b": [0.2696, 0.1689, 0.285, 0.1838]}, {"w": "an", "b": [0.2912, 0.1689, 0.3107, 0.1838]}, {"w": "optimal", "b": [0.3168, 0.1689, 0.3783, 0.1838]}, {"w": "way,", "b": [0.3845, 0.1689, 0.4193, 0.1838]}, {"w": "all", "b": [0.4255, 0.1689, 0.4449, 0.1838]}, {"w": "the", "b": [0.4511, 0.1689, 0.4768, 0.1838]}, {"w": "attributes", "b": [0.4829, 0.1689, 0.562, 0.1838]}, {"w": "describing", "b": [0.5682, 0.1689, 0.6494, 0.1838]}, {"w": "a", "b": [0.6555, 0.1689, 0.6647, 0.1838]}, {"w": "person", "b": [0.6709, 0.1689, 0.7239, 0.1838]}, {"w": "into", "b": [0.73, 0.1689, 0.7613, 0.1838]}, {"w": "a", "b": [0.7674, 0.1689, 0.7767, 0.1838]}, {"w": "prediction.", "b": [0.7828, 0.1689, 0.869, 0.1838]}]}, {"id": "b_3", "type": "paragraph", "text": "1.4.2 When the Problem Is Constantly Changing", "words": [{"w": "1.4.2", "b": [0.1312, 0.217, 0.1749, 0.232]}, {"w": "When", "b": [0.1961, 0.217, 0.2513, 0.232]}, {"w": "the", "b": [0.2584, 0.217, 0.2881, 0.232]}, {"w": "Problem", "b": [0.2952, 0.217, 0.3742, 0.232]}, {"w": "Is", "b": [0.3812, 0.217, 0.3977, 0.232]}, {"w": "Constantly", "b": [0.4047, 0.217, 0.5059, 0.232]}, {"w": "Changing", "b": [0.513, 0.217, 0.6011, 0.232]}]}, {"id": "b_4", "type": "paragraph", "text": "Some problems may continuously change with time so that the programming code must be regularly updated. That results in the frustration of software engineers working on the problem, an increased chance of introducing errors, difficulties of combining “previous” and “new” logic, and significant overhead of testing and deploying updated solutions.", "words": [{"w": "Some", "b": [0.1312, 0.2533, 0.1752, 0.2682]}, {"w": "problems", "b": [0.1825, 0.2533, 0.2569, 0.2682]}, {"w": "may", "b": [0.2643, 0.2533, 0.2988, 0.2682]}, {"w": "continuously", "b": [0.3061, 0.2533, 0.4093, 0.2682]}, {"w": "change", "b": [0.4166, 0.2533, 0.4726, 0.2682]}, {"w": "with", "b": [0.48, 0.2533, 0.5166, 0.2682]}, {"w": "time", "b": [0.5239, 0.2533, 0.5605, 0.2682]}, {"w": "so", "b": [0.5679, 0.2533, 0.5847, 0.2682]}, {"w": "that", "b": [0.5921, 0.2533, 0.6266, 0.2682]}, {"w": "the", "b": [0.6339, 0.2533, 0.6601, 0.2682]}, {"w": "programming", "b": [0.6674, 0.2533, 0.7773, 0.2682]}, {"w": "code", "b": [0.7847, 0.2533, 0.8218, 0.2682]}, {"w": "must", "b": [0.8291, 0.2533, 0.8695, 0.2682]}, {"w": "be", "b": [0.1312, 0.2712, 0.1505, 0.2862]}, {"w": "regularly", "b": [0.1567, 0.2712, 0.2293, 0.2862]}, {"w": "updated.", "b": [0.2354, 0.2712, 0.3079, 0.2862]}, {"w": "That", "b": [0.3161, 0.2712, 0.3567, 0.2862]}, {"w": "results", "b": [0.3629, 0.2712, 0.4164, 0.2862]}, {"w": "in", "b": [0.4225, 0.2712, 0.4382, 0.2862]}, {"w": "the", "b": [0.4443, 0.2712, 0.4704, 0.2862]}, {"w": "frustration", "b": [0.4765, 0.2712, 0.5638, 0.2862]}, {"w": "of", "b": [0.57, 0.2712, 0.5851, 0.2862]}, {"w": "software", "b": [0.5912, 0.2712, 0.6587, 0.2862]}, {"w": "engineers", "b": [0.6648, 0.2712, 0.7401, 0.2862]}, {"w": "working", "b": [0.7462, 0.2712, 0.811, 0.2862]}, {"w": "on", "b": [0.8171, 0.2712, 0.8369, 0.2862]}, {"w": "the", "b": [0.8431, 0.2712, 0.8691, 0.2862]}, {"w": "problem,", "b": [0.1312, 0.2892, 0.202, 0.3041]}, {"w": "an", "b": [0.2081, 0.2892, 0.2276, 0.3041]}, {"w": "increased", "b": [0.2337, 0.2892, 0.3077, 0.3041]}, {"w": "chance", "b": [0.3138, 0.2892, 0.3676, 0.3041]}, {"w": "of", "b": [0.3738, 0.2892, 0.3886, 0.3041]}, {"w": "introducing", "b": [0.3948, 0.2892, 0.487, 0.3041]}, {"w": "errors,", "b": [0.4932, 0.2892, 0.5447, 0.3041]}, {"w": "difficulties", "b": [0.5508, 0.2892, 0.6329, 0.3041]}, {"w": "of", "b": [0.639, 0.2892, 0.6539, 0.3041]}, {"w": "combining", "b": [0.66, 0.2892, 0.7425, 0.3041]}, {"w": "“previous”", "b": [0.7486, 0.2892, 0.8333, 0.3041]}, {"w": "and", "b": [0.8395, 0.2892, 0.8692, 0.3041]}, {"w": "“new”", "b": [0.1286, 0.3071, 0.1778, 0.3221]}, {"w": "logic,", "b": [0.184, 0.3071, 0.226, 0.3221]}, {"w": "and", "b": [0.2322, 0.3071, 0.2619, 0.3221]}, {"w": "significant", "b": [0.2681, 0.3071, 0.3497, 0.3221]}, {"w": "overhead", "b": [0.3558, 0.3071, 0.4272, 0.3221]}, {"w": "of", "b": [0.4333, 0.3071, 0.4482, 0.3221]}, {"w": "testing", "b": [0.4543, 0.3071, 0.5088, 0.3221]}, {"w": "and", "b": [0.5149, 0.3071, 0.5447, 0.3221]}, {"w": "deploying", "b": [0.5508, 0.3071, 0.6277, 0.3221]}, {"w": "updated", "b": [0.6339, 0.3071, 0.7, 0.3221]}, {"w": "solutions.", "b": [0.7062, 0.3071, 0.7823, 0.3221]}]}, {"id": "b_5", "type": "paragraph", "text": "For example, you can have a task of scraping specific data elements from a collection of webpages. Let’s say that for each webpage in that collection, you write a set of fixed data extraction rules in the following form: “pick the third

element from and then pick the data from the second

inside that

.” If a website owner changes the design of a webpage, the data you scrape may end up in the second or the fourth

element, making your extraction rule wrong. If the collection of webpages you scrape is large (thousands of URLs), every day you will have rules that become wrong; you will end up", "words": [{"w": "For", "b": [0.1312, 0.334, 0.1588, 0.349]}, {"w": "example,", "b": [0.166, 0.334, 0.2387, 0.349]}, {"w": "you", "b": [0.2463, 0.334, 0.2756, 0.349]}, {"w": "can", "b": [0.2829, 0.334, 0.3111, 0.349]}, {"w": "have", "b": [0.3184, 0.334, 0.3555, 0.349]}, {"w": "a", "b": [0.3628, 0.334, 0.3722, 0.349]}, {"w": "task", "b": [0.3795, 0.334, 0.4136, 0.349]}, {"w": "of", "b": [0.4208, 0.334, 0.436, 0.349]}, {"w": "scraping", "b": [0.4433, 0.334, 0.5114, 0.349]}, {"w": "specific", "b": [0.5187, 0.334, 0.5779, 0.349]}, {"w": "data", "b": [0.5852, 0.334, 0.6218, 0.349]}, {"w": "elements", "b": [0.6291, 0.334, 0.6998, 0.349]}, {"w": "from", "b": [0.7071, 0.334, 0.7453, 0.349]}, {"w": "a", "b": [0.7526, 0.334, 0.762, 0.349]}, {"w": "collection", "b": [0.7692, 0.334, 0.8467, 0.349]}, {"w": "of", "b": [0.8539, 0.334, 0.8691, 0.349]}, {"w": "webpages.", "b": [0.1306, 0.352, 0.2127, 0.3669]}, {"w": "Let’s", "b": [0.2209, 0.352, 0.261, 0.3669]}, {"w": "say", "b": [0.2671, 0.352, 0.2934, 0.3669]}, {"w": "that", "b": [0.2995, 0.352, 0.334, 0.3669]}, {"w": "for", "b": [0.3401, 0.352, 0.3626, 0.3669]}, {"w": "each", "b": [0.3688, 0.352, 0.4048, 0.3669]}, {"w": "webpage", "b": [0.411, 0.352, 0.4805, 0.3669]}, {"w": "in", "b": [0.4866, 0.352, 0.5023, 0.3669]}, {"w": "that", "b": [0.5084, 0.352, 0.5429, 0.3669]}, {"w": "collection,", "b": [0.5491, 0.352, 0.6316, 0.3669]}, {"w": "you", "b": [0.6377, 0.352, 0.667, 0.3669]}, {"w": "write", "b": [0.6731, 0.352, 0.715, 0.3669]}, {"w": "a", "b": [0.7211, 0.352, 0.7305, 0.3669]}, {"w": "set", "b": [0.7367, 0.352, 0.7598, 0.3669]}, {"w": "of", "b": [0.7659, 0.352, 0.7811, 0.3669]}, {"w": "fixed", "b": [0.7872, 0.352, 0.8264, 0.3669]}, {"w": "data", "b": [0.8325, 0.352, 0.8691, 0.3669]}, {"w": "extraction", "b": [0.1312, 0.3699, 0.2121, 0.3849]}, {"w": "rules", "b": [0.2182, 0.3699, 0.256, 0.3849]}, {"w": "in", "b": [0.2621, 0.3699, 0.2774, 0.3849]}, {"w": "the", "b": [0.2835, 0.3699, 0.3089, 0.3849]}, {"w": "following", "b": [0.3151, 0.3699, 0.3862, 0.3849]}, {"w": "form:", "b": [0.3924, 0.3699, 0.4346, 0.3849]}, {"w": "“pick", "b": [0.4428, 0.3699, 0.4839, 0.3849]}, {"w": "the", "b": [0.4901, 0.3699, 0.5155, 0.3849]}, {"w": "third", "b": [0.5216, 0.3699, 0.5613, 0.3849]}, {"w": "

", "b": [0.5675, 0.3699, 0.6061, 0.3849]}, {"w": "element", "b": [0.6122, 0.3699, 0.6737, 0.3849]}, {"w": "from", "b": [0.6799, 0.3699, 0.717, 0.3849]}, {"w": "", "b": [0.7232, 0.3699, 0.7918, 0.3849]}, {"w": "and", "b": [0.7979, 0.3699, 0.8274, 0.3849]}, {"w": "then", "b": [0.8335, 0.3699, 0.8691, 0.3849]}, {"w": "pick", "b": [0.1312, 0.3879, 0.1647, 0.4028]}, {"w": "the", "b": [0.1721, 0.3879, 0.1982, 0.4028]}, {"w": "data", "b": [0.2055, 0.3879, 0.2421, 0.4028]}, {"w": "from", "b": [0.2495, 0.3879, 0.2877, 0.4028]}, {"w": "the", "b": [0.295, 0.3879, 0.3212, 0.4028]}, {"w": "second", "b": [0.3285, 0.3879, 0.383, 0.4028]}, {"w": "

", "b": [0.3903, 0.3879, 0.4453, 0.4028]}, {"w": "inside", "b": [0.4526, 0.3879, 0.4998, 0.4028]}, {"w": "that", "b": [0.5071, 0.3879, 0.5416, 0.4028]}, {"w": "

.”", "b": [0.5489, 0.3879, 0.6002, 0.4028]}, {"w": "If", "b": [0.612, 0.3879, 0.6245, 0.4028]}, {"w": "a", "b": [0.6319, 0.3879, 0.6413, 0.4028]}, {"w": "website", "b": [0.6486, 0.3879, 0.7089, 0.4028]}, {"w": "owner", "b": [0.7162, 0.3879, 0.7649, 0.4028]}, {"w": "changes", "b": [0.7722, 0.3879, 0.8356, 0.4028]}, {"w": "the", "b": [0.843, 0.3879, 0.8691, 0.4028]}, {"w": "design", "b": [0.1312, 0.4058, 0.1826, 0.4208]}, {"w": "of", "b": [0.1903, 0.4058, 0.2055, 0.4208]}, {"w": "a", "b": [0.2132, 0.4058, 0.2226, 0.4208]}, {"w": "webpage,", "b": [0.2303, 0.4058, 0.3051, 0.4208]}, {"w": "the", "b": [0.3132, 0.4058, 0.3394, 0.4208]}, {"w": "data", "b": [0.3471, 0.4058, 0.3837, 0.4208]}, {"w": "you", "b": [0.3914, 0.4058, 0.4207, 0.4208]}, {"w": "scrape", "b": [0.4284, 0.4058, 0.4803, 0.4208]}, {"w": "may", "b": [0.488, 0.4058, 0.5225, 0.4208]}, {"w": "end", "b": [0.5303, 0.4058, 0.5596, 0.4208]}, {"w": "up", "b": [0.5673, 0.4058, 0.5882, 0.4208]}, {"w": "in", "b": [0.5959, 0.4058, 0.6116, 0.4208]}, {"w": "the", "b": [0.6193, 0.4058, 0.6455, 0.4208]}, {"w": "second", "b": [0.6532, 0.4058, 0.7077, 0.4208]}, {"w": "or", "b": [0.7154, 0.4058, 0.7322, 0.4208]}, {"w": "the", "b": [0.7399, 0.4058, 0.766, 0.4208]}, {"w": "fourth", "b": [0.7737, 0.4058, 0.8245, 0.4208]}, {"w": "

", "b": [0.8322, 0.4058, 0.872, 0.4208]}, {"w": "element,", "b": [0.1312, 0.4238, 0.197, 0.4387]}, {"w": "making", "b": [0.2031, 0.4238, 0.2609, 0.4387]}, {"w": "your", "b": [0.267, 0.4238, 0.3022, 0.4387]}, {"w": "extraction", "b": [0.3083, 0.4238, 0.3882, 0.4387]}, {"w": "rule", "b": [0.3943, 0.4238, 0.4245, 0.4387]}, {"w": "wrong.", "b": [0.4306, 0.4238, 0.4838, 0.4387]}, {"w": "If", "b": [0.492, 0.4238, 0.5041, 0.4387]}, {"w": "the", "b": [0.5101, 0.4238, 0.5353, 0.4387]}, {"w": "collection", "b": [0.5413, 0.4238, 0.6157, 0.4387]}, {"w": "of", "b": [0.6218, 0.4238, 0.6364, 0.4387]}, {"w": "webpages", "b": [0.6424, 0.4238, 0.7164, 0.4387]}, {"w": "you", "b": [0.7225, 0.4238, 0.7506, 0.4387]}, {"w": "scrape", "b": [0.7566, 0.4238, 0.8066, 0.4387]}, {"w": "is", "b": [0.8126, 0.4238, 0.8248, 0.4387]}, {"w": "large", "b": [0.8309, 0.4238, 0.8691, 0.4387]}, {"w": "(thousands", "b": [0.1291, 0.4417, 0.2193, 0.4567]}, {"w": "of", "b": [0.2264, 0.4417, 0.2415, 0.4567]}, {"w": "URLs),", "b": [0.2487, 0.4417, 0.3084, 0.4567]}, {"w": "every", "b": [0.3157, 0.4417, 0.3592, 0.4567]}, {"w": "day", "b": [0.3664, 0.4417, 0.3956, 0.4567]}, {"w": "you", "b": [0.4028, 0.4417, 0.4321, 0.4567]}, {"w": "will", "b": [0.4392, 0.4417, 0.4685, 0.4567]}, {"w": "have", "b": [0.4756, 0.4417, 0.5127, 0.4567]}, {"w": "rules", "b": [0.5199, 0.4417, 0.5588, 0.4567]}, {"w": "that", "b": [0.5659, 0.4417, 0.6004, 0.4567]}, {"w": "become", "b": [0.6075, 0.4417, 0.6687, 0.4567]}, {"w": "wrong;", "b": [0.6758, 0.4417, 0.7313, 0.4567]}, {"w": "you", "b": [0.7389, 0.4417, 0.7682, 0.4567]}, {"w": "will", "b": [0.7753, 0.4417, 0.8046, 0.4567]}, {"w": "end", "b": [0.8117, 0.4417, 0.841, 0.4567]}, {"w": "up", "b": [0.8481, 0.4417, 0.8691, 0.4567]}]}, {"id": "b_6", "type": "paragraph", "text": "endlessly fixing those rules. Needless to say that very few software engineers would love to do such work on a daily basis.", "words": [{"w": "endlessly", "b": [0.1312, 0.4597, 0.2035, 0.4746]}, {"w": "fixing", "b": [0.2096, 0.4597, 0.2547, 0.4746]}, {"w": "those", "b": [0.2608, 0.4597, 0.3034, 0.4746]}, {"w": "rules.", "b": [0.3096, 0.4597, 0.3532, 0.4746]}, {"w": "Needless", "b": [0.3615, 0.4597, 0.4306, 0.4746]}, {"w": "to", "b": [0.4367, 0.4597, 0.4533, 0.4746]}, {"w": "say", "b": [0.4595, 0.4597, 0.4855, 0.4746]}, {"w": "that", "b": [0.4916, 0.4597, 0.5258, 0.4746]}, {"w": "very", "b": [0.532, 0.4597, 0.5667, 0.4746]}, {"w": "few", "b": [0.5729, 0.4597, 0.6003, 0.4746]}, {"w": "software", "b": [0.6065, 0.4597, 0.6734, 0.4746]}, {"w": "engineers", "b": [0.6796, 0.4597, 0.7544, 0.4746]}, {"w": "would", "b": [0.7605, 0.4597, 0.8087, 0.4746]}, {"w": "love", "b": [0.8148, 0.4597, 0.8464, 0.4746]}, {"w": "to", "b": [0.8526, 0.4597, 0.8692, 0.4746]}, {"w": "do", "b": [0.1312, 0.4776, 0.1507, 0.4926]}, {"w": "such", "b": [0.1569, 0.4776, 0.1924, 0.4926]}, {"w": "work", "b": [0.1985, 0.4776, 0.2375, 0.4926]}, {"w": "on", "b": [0.2437, 0.4776, 0.2631, 0.4926]}, {"w": "a", "b": [0.2693, 0.4776, 0.2785, 0.4926]}, {"w": "daily", "b": [0.2847, 0.4776, 0.3242, 0.4926]}, {"w": "basis.", "b": [0.3303, 0.4776, 0.3746, 0.4926]}]}, {"id": "b_7", "type": "paragraph", "text": "1.4.3 When It Is a Perceptive Problem", "words": [{"w": "1.4.3", "b": [0.1312, 0.5258, 0.1749, 0.5407]}, {"w": "When", "b": [0.1961, 0.5258, 0.2513, 0.5407]}, {"w": "It", "b": [0.2584, 0.5258, 0.2747, 0.5407]}, {"w": "Is", "b": [0.2818, 0.5258, 0.2982, 0.5407]}, {"w": "a", "b": [0.3052, 0.5258, 0.3156, 0.5407]}, {"w": "Perceptive", "b": [0.3226, 0.5258, 0.4204, 0.5407]}, {"w": "Problem", "b": [0.4275, 0.5258, 0.5065, 0.5407]}]}, {"id": "b_8", "type": "paragraph", "text": "Today, it’s hard to imagine someone trying to solve perceptive problems such as speech, image, and video recognition without using machine learning. Consider an image. It’s represented by millions of pixels. Each pixel is given by three numbers: the intensity of red, green, and blue channels. In the past, engineers tried to solve the problem of image recognition (detecting what’s on the picture) by applying handcrafted “filters” to square patches of pixels. If one filter, for example, the one that was designed to “detect” grass, generates a high value when applied to many pixel patches, while another filter, designed to detect brown fur, also returns high values for many patches, then we can say that there are high chances that the image represents a cow in a field (I’m simplifying a bit).", "words": [{"w": "Today,", "b": [0.1306, 0.562, 0.1848, 0.577]}, {"w": "it’s", "b": [0.1909, 0.562, 0.2158, 0.577]}, {"w": "hard", "b": [0.222, 0.562, 0.2592, 0.577]}, {"w": "to", "b": [0.2653, 0.562, 0.2819, 0.577]}, {"w": "imagine", "b": [0.288, 0.562, 0.351, 0.577]}, {"w": "someone", "b": [0.3571, 0.562, 0.4254, 0.577]}, {"w": "trying", "b": [0.4315, 0.562, 0.4806, 0.577]}, {"w": "to", "b": [0.4868, 0.562, 0.5033, 0.577]}, {"w": "solve", "b": [0.5094, 0.562, 0.5488, 0.577]}, {"w": "perceptive", "b": [0.5548, 0.5624, 0.651, 0.5773]}, {"w": "problems", "b": [0.6581, 0.5624, 0.7427, 0.5773]}, {"w": "such", "b": [0.7488, 0.562, 0.7846, 0.577]}, {"w": "as", "b": [0.7907, 0.562, 0.8073, 0.577]}, {"w": "speech,", "b": [0.8135, 0.562, 0.8714, 0.577]}, {"w": "image,", "b": [0.1312, 0.58, 0.1846, 0.595]}, {"w": "and", "b": [0.1932, 0.58, 0.2235, 0.595]}, {"w": "video", "b": [0.2316, 0.58, 0.2751, 0.595]}, {"w": "recognition", "b": [0.2832, 0.58, 0.3743, 0.595]}, {"w": "without", "b": [0.3824, 0.58, 0.4462, 0.595]}, {"w": "using", "b": [0.4543, 0.58, 0.4973, 0.595]}, {"w": "machine", "b": [0.5054, 0.58, 0.5729, 0.595]}, {"w": "learning.", "b": [0.581, 0.58, 0.6522, 0.595]}, {"w": "Consider", "b": [0.6663, 0.58, 0.7387, 0.595]}, {"w": "an", "b": [0.7468, 0.58, 0.7667, 0.595]}, {"w": "image.", "b": [0.7748, 0.58, 0.8281, 0.595]}, {"w": "It’s", "b": [0.8423, 0.58, 0.8691, 0.595]}, {"w": "represented", "b": [0.1312, 0.5979, 0.2251, 0.6129]}, {"w": "by", "b": [0.2324, 0.5979, 0.2523, 0.6129]}, {"w": "millions", "b": [0.2595, 0.5979, 0.3234, 0.6129]}, {"w": "of", "b": [0.3307, 0.5979, 0.3458, 0.6129]}, {"w": "pixels.", "b": [0.3531, 0.5979, 0.405, 0.6129]}, {"w": "Each", "b": [0.4165, 0.5979, 0.4571, 0.6129]}, {"w": "pixel", "b": [0.4643, 0.5979, 0.5036, 0.6129]}, {"w": "is", "b": [0.5108, 0.5979, 0.5235, 0.6129]}, {"w": "given", "b": [0.5307, 0.5979, 0.5737, 0.6129]}, {"w": "by", "b": [0.5809, 0.5979, 0.6008, 0.6129]}, {"w": "three", "b": [0.6081, 0.5979, 0.65, 0.6129]}, {"w": "numbers:", "b": [0.6572, 0.5979, 0.7322, 0.6129]}, {"w": "the", "b": [0.7426, 0.5979, 0.7688, 0.6129]}, {"w": "intensity", "b": [0.776, 0.5979, 0.8468, 0.6129]}, {"w": "of", "b": [0.854, 0.5979, 0.8692, 0.6129]}, {"w": "red,", "b": [0.1312, 0.6159, 0.1627, 0.6308]}, {"w": "green,", "b": [0.1697, 0.6159, 0.2189, 0.6308]}, {"w": "and", "b": [0.226, 0.6159, 0.2563, 0.6308]}, {"w": "blue", "b": [0.2632, 0.6159, 0.2977, 0.6308]}, {"w": "channels.", "b": [0.3046, 0.6159, 0.3795, 0.6308]}, {"w": "In", "b": [0.3898, 0.6159, 0.4071, 0.6308]}, {"w": "the", "b": [0.4139, 0.6159, 0.4401, 0.6308]}, {"w": "past,", "b": [0.447, 0.6159, 0.4868, 0.6308]}, {"w": "engineers", "b": [0.4939, 0.6159, 0.5694, 0.6308]}, {"w": "tried", "b": [0.5762, 0.6159, 0.615, 0.6308]}, {"w": "to", "b": [0.6218, 0.6159, 0.6386, 0.6308]}, {"w": "solve", "b": [0.6454, 0.6159, 0.6853, 0.6308]}, {"w": "the", "b": [0.6922, 0.6159, 0.7183, 0.6308]}, {"w": "problem", "b": [0.7252, 0.6159, 0.7922, 0.6308]}, {"w": "of", "b": [0.799, 0.6159, 0.8142, 0.6308]}, {"w": "image", "b": [0.8211, 0.6159, 0.8692, 0.6308]}, {"w": "recognition", "b": [0.1312, 0.6338, 0.2223, 0.6488]}, {"w": "(detecting", "b": [0.2294, 0.6338, 0.312, 0.6488]}, {"w": "what’s", "b": [0.3191, 0.6338, 0.3725, 0.6488]}, {"w": "on", "b": [0.3796, 0.6338, 0.3995, 0.6488]}, {"w": "the", "b": [0.4065, 0.6338, 0.4327, 0.6488]}, {"w": "picture)", "b": [0.4398, 0.6338, 0.5047, 0.6488]}, {"w": "by", "b": [0.5118, 0.6338, 0.5316, 0.6488]}, {"w": "applying", "b": [0.5387, 0.6338, 0.6093, 0.6488]}, {"w": "handcrafted", "b": [0.6164, 0.6338, 0.7143, 0.6488]}, {"w": "“filters”", "b": [0.7213, 0.6338, 0.7853, 0.6488]}, {"w": "to", "b": [0.7924, 0.6338, 0.8091, 0.6488]}, {"w": "square", "b": [0.8162, 0.6338, 0.8692, 0.6488]}, {"w": "patches", "b": [0.1312, 0.6518, 0.1926, 0.6667]}, {"w": "of", "b": [0.1997, 0.6518, 0.2149, 0.6667]}, {"w": "pixels.", "b": [0.2221, 0.6518, 0.274, 0.6667]}, {"w": "If", "b": [0.2852, 0.6518, 0.2977, 0.6667]}, {"w": "one", "b": [0.3049, 0.6518, 0.3331, 0.6667]}, {"w": "filter,", "b": [0.3403, 0.6518, 0.3843, 0.6667]}, {"w": "for", "b": [0.3917, 0.6518, 0.4143, 0.6667]}, {"w": "example,", "b": [0.4214, 0.6518, 0.4941, 0.6667]}, {"w": "the", "b": [0.5015, 0.6518, 0.5277, 0.6667]}, {"w": "one", "b": [0.5348, 0.6518, 0.5631, 0.6667]}, {"w": "that", "b": [0.5702, 0.6518, 0.6048, 0.6667]}, {"w": "was", "b": [0.6119, 0.6518, 0.6418, 0.6667]}, {"w": "designed", "b": [0.649, 0.6518, 0.7192, 0.6667]}, {"w": "to", "b": [0.7264, 0.6518, 0.7431, 0.6667]}, {"w": "“detect”", "b": [0.7503, 0.6518, 0.8183, 0.6667]}, {"w": "grass,", "b": [0.8254, 0.6518, 0.8717, 0.6667]}, {"w": "generates", "b": [0.1312, 0.6697, 0.2057, 0.6847]}, {"w": "a", "b": [0.2118, 0.6697, 0.2209, 0.6847]}, {"w": "high", "b": [0.2271, 0.6697, 0.2617, 0.6847]}, {"w": "value", "b": [0.2678, 0.6697, 0.309, 0.6847]}, {"w": "when", "b": [0.3151, 0.6697, 0.3568, 0.6847]}, {"w": "applied", "b": [0.363, 0.6697, 0.4209, 0.6847]}, {"w": "to", "b": [0.4271, 0.6697, 0.4433, 0.6847]}, {"w": "many", "b": [0.4495, 0.6697, 0.4932, 0.6847]}, {"w": "pixel", "b": [0.4993, 0.6697, 0.5375, 0.6847]}, {"w": "patches,", "b": [0.5436, 0.6697, 0.6083, 0.6847]}, {"w": "while", "b": [0.6145, 0.6697, 0.6562, 0.6847]}, {"w": "another", "b": [0.6623, 0.6697, 0.7234, 0.6847]}, {"w": "filter,", "b": [0.7295, 0.6697, 0.7723, 0.6847]}, {"w": "designed", "b": [0.7785, 0.6697, 0.8467, 0.6847]}, {"w": "to", "b": [0.8529, 0.6697, 0.8691, 0.6847]}, {"w": "detect", "b": [0.1312, 0.6877, 0.1804, 0.7026]}, {"w": "brown", "b": [0.1865, 0.6877, 0.2362, 0.7026]}, {"w": "fur,", "b": [0.2424, 0.6877, 0.2706, 0.7026]}, {"w": "also", "b": [0.2767, 0.6877, 0.3075, 0.7026]}, {"w": "returns", "b": [0.3136, 0.6877, 0.3712, 0.7026]}, {"w": "high", "b": [0.3773, 0.6877, 0.4121, 0.7026]}, {"w": "values", "b": [0.4183, 0.6877, 0.467, 0.7026]}, {"w": "for", "b": [0.4732, 0.6877, 0.4952, 0.7026]}, {"w": "many", "b": [0.5014, 0.6877, 0.5453, 0.7026]}, {"w": "patches,", "b": [0.5515, 0.6877, 0.6166, 0.7026]}, {"w": "then", "b": [0.6228, 0.6877, 0.6586, 0.7026]}, {"w": "we", "b": [0.6647, 0.6877, 0.6857, 0.7026]}, {"w": "can", "b": [0.6918, 0.6877, 0.7195, 0.7026]}, {"w": "say", "b": [0.7256, 0.6877, 0.7513, 0.7026]}, {"w": "that", "b": [0.7575, 0.6877, 0.7912, 0.7026]}, {"w": "there", "b": [0.7974, 0.6877, 0.8384, 0.7026]}, {"w": "are", "b": [0.8445, 0.6877, 0.8691, 0.7026]}, {"w": "high", "b": [0.1312, 0.7056, 0.1661, 0.7206]}, {"w": "chances", "b": [0.1722, 0.7056, 0.2334, 0.7206]}, {"w": "that", "b": [0.2395, 0.7056, 0.2734, 0.7206]}, {"w": "the", "b": [0.2795, 0.7056, 0.3052, 0.7206]}, {"w": "image", "b": [0.3113, 0.7056, 0.3585, 0.7206]}, {"w": "represents", "b": [0.3646, 0.7056, 0.4455, 0.7206]}, {"w": "a", "b": [0.4516, 0.7056, 0.4608, 0.7206]}, {"w": "cow", "b": [0.467, 0.7056, 0.4972, 0.7206]}, {"w": "in", "b": [0.5034, 0.7056, 0.5188, 0.7206]}, {"w": "a", "b": [0.5249, 0.7056, 0.5341, 0.7206]}, {"w": "field", "b": [0.5403, 0.7056, 0.5741, 0.7206]}, {"w": "(I’m", "b": [0.5803, 0.7056, 0.6146, 0.7206]}, {"w": "simplifying", "b": [0.6208, 0.7056, 0.7091, 0.7206]}, {"w": "a", "b": [0.7152, 0.7056, 0.7244, 0.7206]}, {"w": "bit).", "b": [0.7306, 0.7056, 0.7655, 0.7206]}]}, {"id": "b_9", "type": "paragraph", "text": "Today, perceptive problems are effectively solved using machine learning models, such as neural networks. We consider the problem of training neural networks in Chapter 6.", "words": [{"w": "Today,", "b": [0.1306, 0.7325, 0.1855, 0.7475]}, {"w": "perceptive", "b": [0.1926, 0.7325, 0.2769, 0.7475]}, {"w": "problems", "b": [0.2837, 0.7325, 0.3582, 0.7475]}, {"w": "are", "b": [0.365, 0.7325, 0.3902, 0.7475]}, {"w": "effectively", "b": [0.3971, 0.7325, 0.4787, 0.7475]}, {"w": "solved", "b": [0.4856, 0.7325, 0.5359, 0.7475]}, {"w": "using", "b": [0.5428, 0.7325, 0.5858, 0.7475]}, {"w": "machine", "b": [0.5927, 0.7325, 0.6601, 0.7475]}, {"w": "learning", "b": [0.667, 0.7325, 0.733, 0.7475]}, {"w": "models,", "b": [0.7398, 0.7325, 0.8022, 0.7475]}, {"w": "such", "b": [0.8092, 0.7325, 0.8454, 0.7475]}, {"w": "as", "b": [0.8523, 0.7325, 0.8691, 0.7475]}, {"w": "neural", "b": [0.1312, 0.7505, 0.1815, 0.7654]}, {"w": "networks.", "b": [0.1877, 0.7505, 0.2642, 0.7654]}, {"w": "We", "b": [0.2724, 0.7505, 0.2981, 0.7654]}, {"w": "consider", "b": [0.3042, 0.7505, 0.37, 0.7654]}, {"w": "the", "b": [0.3762, 0.7505, 0.4018, 0.7654]}, {"w": "problem", "b": [0.408, 0.7505, 0.4737, 0.7654]}, {"w": "of", "b": [0.4798, 0.7505, 0.4947, 0.7654]}, {"w": "training", "b": [0.5008, 0.7505, 0.5644, 0.7654]}, {"w": "neural", "b": [0.5706, 0.7505, 0.6209, 0.7654]}, {"w": "networks", "b": [0.6271, 0.7505, 0.6985, 0.7654]}, {"w": "in", "b": [0.7046, 0.7505, 0.72, 0.7654]}, {"w": "Chapter", "b": [0.7262, 0.7505, 0.7918, 0.7654]}, {"w": "6.", "b": [0.798, 0.7505, 0.8123, 0.7654]}]}, {"id": "b_10", "type": "paragraph", "text": "1.4.4 When It Is an Unstudied Phenomenon", "words": [{"w": "1.4.4", "b": [0.1312, 0.7986, 0.1749, 0.8136]}, {"w": "When", "b": [0.1961, 0.7986, 0.2513, 0.8136]}, {"w": "It", "b": [0.2584, 0.7986, 0.2747, 0.8136]}, {"w": "Is", "b": [0.2818, 0.7986, 0.2982, 0.8136]}, {"w": "an", "b": [0.3052, 0.7986, 0.3273, 0.8136]}, {"w": "Unstudied", "b": [0.3344, 0.7986, 0.4301, 0.8136]}, {"w": "Phenomenon", "b": [0.4372, 0.7986, 0.5572, 0.8136]}]}, {"id": "b_11", "type": "paragraph", "text": "If we need to be able to make predictions of some phenomenon that is not well-studied scientifically, but examples of it are observable, then machine learning might be an appropriate", "words": [{"w": "If", "b": [0.1312, 0.8349, 0.1438, 0.8499]}, {"w": "we", "b": [0.1514, 0.8349, 0.1729, 0.8499]}, {"w": "need", "b": [0.1806, 0.8349, 0.2182, 0.8499]}, {"w": "to", "b": [0.2259, 0.8349, 0.2426, 0.8499]}, {"w": "be", "b": [0.2503, 0.8349, 0.2696, 0.8499]}, {"w": "able", "b": [0.2773, 0.8349, 0.3108, 0.8499]}, {"w": "to", "b": [0.3185, 0.8349, 0.3352, 0.8499]}, {"w": "make", "b": [0.3428, 0.8349, 0.3857, 0.8499]}, {"w": "predictions", "b": [0.3934, 0.8349, 0.4835, 0.8499]}, {"w": "of", "b": [0.4912, 0.8349, 0.5064, 0.8499]}, {"w": "some", "b": [0.514, 0.8349, 0.5549, 0.8499]}, {"w": "phenomenon", "b": [0.5626, 0.8349, 0.6661, 0.8499]}, {"w": "that", "b": [0.6738, 0.8349, 0.7083, 0.8499]}, {"w": "is", "b": [0.716, 0.8349, 0.7286, 0.8499]}, {"w": "not", "b": [0.7363, 0.8349, 0.7635, 0.8499]}, {"w": "well-studied", "b": [0.7712, 0.8349, 0.8691, 0.8499]}, {"w": "scientifically,", "b": [0.1312, 0.8529, 0.2313, 0.8678]}, {"w": "but", "b": [0.2364, 0.8529, 0.2635, 0.8678]}, {"w": "examples", "b": [0.2683, 0.8529, 0.3402, 0.8678]}, {"w": "of", "b": [0.345, 0.8529, 0.3596, 0.8678]}, {"w": "it", "b": [0.3643, 0.8529, 0.3764, 0.8678]}, {"w": "are", "b": [0.3812, 0.8529, 0.4053, 0.8678]}, {"w": "observable,", "b": [0.4101, 0.8529, 0.4972, 0.8678]}, {"w": "then", "b": [0.5022, 0.8529, 0.5374, 0.8678]}, {"w": "machine", "b": [0.5422, 0.8529, 0.607, 0.8678]}, {"w": "learning", "b": [0.6118, 0.8529, 0.6751, 0.8678]}, {"w": "might", "b": [0.6799, 0.8529, 0.7256, 0.8678]}, {"w": "be", "b": [0.7304, 0.8529, 0.749, 0.8678]}, {"w": "an", "b": [0.7537, 0.8529, 0.7728, 0.8678]}, {"w": "appropriate", "b": [0.7776, 0.8529, 0.8691, 0.8678]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 15", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "15", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 24, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "(and, in some cases, the only available) option. For example, machine learning can be used", "words": [{"w": "(and,", "b": [0.1291, 0.0881, 0.1714, 0.1031]}, {"w": "in", "b": [0.1775, 0.0881, 0.193, 0.1031]}, {"w": "some", "b": [0.1992, 0.0881, 0.2395, 0.1031]}, {"w": "cases,", "b": [0.2457, 0.0881, 0.2913, 0.1031]}, {"w": "the", "b": [0.2974, 0.0881, 0.3232, 0.1031]}, {"w": "only", "b": [0.3294, 0.0881, 0.3639, 0.1031]}, {"w": "available)", "b": [0.3701, 0.0881, 0.4475, 0.1031]}, {"w": "option.", "b": [0.4536, 0.0881, 0.5104, 0.1031]}, {"w": "For", "b": [0.5186, 0.0881, 0.5457, 0.1031]}, {"w": "example,", "b": [0.5519, 0.0881, 0.6236, 0.1031]}, {"w": "machine", "b": [0.6297, 0.0881, 0.6963, 0.1031]}, {"w": "learning", "b": [0.7024, 0.0881, 0.7675, 0.1031]}, {"w": "can", "b": [0.7736, 0.0881, 0.8015, 0.1031]}, {"w": "be", "b": [0.8076, 0.0881, 0.8267, 0.1031]}, {"w": "used", "b": [0.8329, 0.0881, 0.8691, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "to generate personalized mental health medication options based on the patient’s genetic and sensory data. Doctors might not necessarily be able to interpret such data to make an optimal recommendation, while a machine can discover patterns in data by analyzing thousands of patients and predicting which molecule has the highest chance to help a given patient.", "words": [{"w": "to", "b": [0.1312, 0.106, 0.148, 0.121]}, {"w": "generate", "b": [0.1547, 0.106, 0.2238, 0.121]}, {"w": "personalized", "b": [0.2304, 0.106, 0.3316, 0.121]}, {"w": "mental", "b": [0.3383, 0.106, 0.3942, 0.121]}, {"w": "health", "b": [0.4009, 0.106, 0.4522, 0.121]}, {"w": "medication", "b": [0.4589, 0.106, 0.5488, 0.121]}, {"w": "options", "b": [0.5555, 0.106, 0.6152, 0.121]}, {"w": "based", "b": [0.6219, 0.106, 0.6681, 0.121]}, {"w": "on", "b": [0.6748, 0.106, 0.6946, 0.121]}, {"w": "the", "b": [0.7013, 0.106, 0.7275, 0.121]}, {"w": "patient’s", "b": [0.7342, 0.106, 0.8049, 0.121]}, {"w": "genetic", "b": [0.8116, 0.106, 0.8692, 0.121]}, {"w": "and", "b": [0.1312, 0.124, 0.1616, 0.1389]}, {"w": "sensory", "b": [0.1688, 0.124, 0.2292, 0.1389]}, {"w": "data.", "b": [0.2364, 0.124, 0.2782, 0.1389]}, {"w": "Doctors", "b": [0.2896, 0.124, 0.3538, 0.1389]}, {"w": "might", "b": [0.361, 0.124, 0.4085, 0.1389]}, {"w": "not", "b": [0.4157, 0.124, 0.4429, 0.1389]}, {"w": "necessarily", "b": [0.4501, 0.124, 0.5378, 0.1389]}, {"w": "be", "b": [0.545, 0.124, 0.5643, 0.1389]}, {"w": "able", "b": [0.5715, 0.124, 0.605, 0.1389]}, {"w": "to", "b": [0.6122, 0.124, 0.6289, 0.1389]}, {"w": "interpret", "b": [0.6361, 0.124, 0.7079, 0.1389]}, {"w": "such", "b": [0.7151, 0.124, 0.7513, 0.1389]}, {"w": "data", "b": [0.7585, 0.124, 0.7951, 0.1389]}, {"w": "to", "b": [0.8023, 0.124, 0.819, 0.1389]}, {"w": "make", "b": [0.8262, 0.124, 0.8691, 0.1389]}, {"w": "an", "b": [0.1312, 0.1419, 0.1511, 0.1569]}, {"w": "optimal", "b": [0.1579, 0.1419, 0.2207, 0.1569]}, {"w": "recommendation,", "b": [0.2275, 0.1419, 0.3688, 0.1569]}, {"w": "while", "b": [0.3758, 0.1419, 0.4186, 0.1569]}, {"w": "a", "b": [0.4255, 0.1419, 0.4349, 0.1569]}, {"w": "machine", "b": [0.4417, 0.1419, 0.5092, 0.1569]}, {"w": "can", "b": [0.516, 0.1419, 0.5443, 0.1569]}, {"w": "discover", "b": [0.5511, 0.1419, 0.6167, 0.1569]}, {"w": "patterns", "b": [0.6235, 0.1419, 0.6916, 0.1569]}, {"w": "in", "b": [0.6985, 0.1419, 0.7142, 0.1569]}, {"w": "data", "b": [0.721, 0.1419, 0.7576, 0.1569]}, {"w": "by", "b": [0.7644, 0.1419, 0.7843, 0.1569]}, {"w": "analyzing", "b": [0.7912, 0.1419, 0.8691, 0.1569]}, {"w": "thousands", "b": [0.1312, 0.1599, 0.2123, 0.1748]}, {"w": "of", "b": [0.2185, 0.1599, 0.2333, 0.1748]}, {"w": "patients", "b": [0.2395, 0.1599, 0.3036, 0.1748]}, {"w": "and", "b": [0.3097, 0.1599, 0.3394, 0.1748]}, {"w": "predicting", "b": [0.3456, 0.1599, 0.4265, 0.1748]}, {"w": "which", "b": [0.4327, 0.1599, 0.4792, 0.1748]}, {"w": "molecule", "b": [0.4854, 0.1599, 0.555, 0.1748]}, {"w": "has", "b": [0.5612, 0.1599, 0.5879, 0.1748]}, {"w": "the", "b": [0.594, 0.1599, 0.6196, 0.1748]}, {"w": "highest", "b": [0.6258, 0.1599, 0.6832, 0.1748]}, {"w": "chance", "b": [0.6894, 0.1599, 0.7432, 0.1748]}, {"w": "to", "b": [0.7493, 0.1599, 0.7657, 0.1748]}, {"w": "help", "b": [0.7719, 0.1599, 0.8057, 0.1748]}, {"w": "a", "b": [0.8118, 0.1599, 0.821, 0.1748]}, {"w": "given", "b": [0.8272, 0.1599, 0.8692, 0.1748]}, {"w": "patient.", "b": [0.1312, 0.1778, 0.1933, 0.1928]}]}, {"id": "b_2", "type": "paragraph", "text": "Another example of observable but unstudied phenomena are logs of a complex computing system or a network. Such logs are generated by multiple independent or interdependent processes. For a human, it’s hard to make predictions about the future state of the system based on logs alone without having a model of each process and their interdependency. If the number of examples of historical log records is high enough (which is often the case), the machine can learn patterns hidden in logs and be able to make predictions without knowing anything about each process.", "words": [{"w": "Another", "b": [0.1305, 0.2048, 0.1972, 0.2197]}, {"w": "example", "b": [0.2034, 0.2048, 0.27, 0.2197]}, {"w": "of", "b": [0.2761, 0.2048, 0.2911, 0.2197]}, {"w": "observable", "b": [0.2973, 0.2048, 0.3816, 0.2197]}, {"w": "but", "b": [0.3878, 0.2048, 0.4157, 0.2197]}, {"w": "unstudied", "b": [0.4219, 0.2048, 0.5015, 0.2197]}, {"w": "phenomena", "b": [0.5077, 0.2048, 0.5996, 0.2197]}, {"w": "are", "b": [0.6058, 0.2048, 0.6306, 0.2197]}, {"w": "logs", "b": [0.6368, 0.2048, 0.6678, 0.2197]}, {"w": "of", "b": [0.674, 0.2048, 0.689, 0.2197]}, {"w": "a", "b": [0.6952, 0.2048, 0.7045, 0.2197]}, {"w": "complex", "b": [0.7106, 0.2048, 0.7772, 0.2197]}, {"w": "computing", "b": [0.7834, 0.2048, 0.8691, 0.2197]}, {"w": "system", "b": [0.1312, 0.2227, 0.1874, 0.2377]}, {"w": "or", "b": [0.194, 0.2227, 0.2108, 0.2377]}, {"w": "a", "b": [0.2174, 0.2227, 0.2268, 0.2377]}, {"w": "network.", "b": [0.2334, 0.2227, 0.3041, 0.2377]}, {"w": "Such", "b": [0.3137, 0.2227, 0.3529, 0.2377]}, {"w": "logs", "b": [0.3596, 0.2227, 0.3911, 0.2377]}, {"w": "are", "b": [0.3977, 0.2227, 0.4228, 0.2377]}, {"w": "generated", "b": [0.4294, 0.2227, 0.509, 0.2377]}, {"w": "by", "b": [0.5156, 0.2227, 0.5355, 0.2377]}, {"w": "multiple", "b": [0.5421, 0.2227, 0.6096, 0.2377]}, {"w": "independent", "b": [0.6162, 0.2227, 0.7167, 0.2377]}, {"w": "or", "b": [0.7233, 0.2227, 0.74, 0.2377]}, {"w": "interdependent", "b": [0.7467, 0.2227, 0.8697, 0.2377]}, {"w": "processes.", "b": [0.1312, 0.2406, 0.2106, 0.2556]}, {"w": "For", "b": [0.2188, 0.2406, 0.246, 0.2556]}, {"w": "a", "b": [0.2521, 0.2406, 0.2614, 0.2556]}, {"w": "human,", "b": [0.2676, 0.2406, 0.328, 0.2556]}, {"w": "it’s", "b": [0.3341, 0.2406, 0.359, 0.2556]}, {"w": "hard", "b": [0.3651, 0.2406, 0.4024, 0.2556]}, {"w": "to", "b": [0.4085, 0.2406, 0.425, 0.2556]}, {"w": "make", "b": [0.4312, 0.2406, 0.4735, 0.2556]}, {"w": "predictions", "b": [0.4796, 0.2406, 0.5686, 0.2556]}, {"w": "about", "b": [0.5748, 0.2406, 0.6217, 0.2556]}, {"w": "the", "b": [0.6279, 0.2406, 0.6537, 0.2556]}, {"w": "future", "b": [0.6598, 0.2406, 0.709, 0.2556]}, {"w": "state", "b": [0.7151, 0.2406, 0.7545, 0.2556]}, {"w": "of", "b": [0.7606, 0.2406, 0.7756, 0.2556]}, {"w": "the", "b": [0.7817, 0.2406, 0.8075, 0.2556]}, {"w": "system", "b": [0.8137, 0.2406, 0.8691, 0.2556]}, {"w": "based", "b": [0.1312, 0.2586, 0.1756, 0.2735]}, {"w": "on", "b": [0.1814, 0.2586, 0.2005, 0.2735]}, {"w": "logs", "b": [0.2064, 0.2586, 0.2366, 0.2735]}, {"w": "alone", "b": [0.2425, 0.2586, 0.2837, 0.2735]}, {"w": "without", "b": [0.2895, 0.2586, 0.3508, 0.2735]}, {"w": "having", "b": [0.3567, 0.2586, 0.4089, 0.2735]}, {"w": "a", "b": [0.4148, 0.2586, 0.4238, 0.2735]}, {"w": "model", "b": [0.4297, 0.2586, 0.4774, 0.2735]}, {"w": "of", "b": [0.4833, 0.2586, 0.4979, 0.2735]}, {"w": "each", "b": [0.5037, 0.2586, 0.5384, 0.2735]}, {"w": "process", "b": [0.5443, 0.2586, 0.6013, 0.2735]}, {"w": "and", "b": [0.6072, 0.2586, 0.6363, 0.2735]}, {"w": "their", "b": [0.6422, 0.2586, 0.6794, 0.2735]}, {"w": "interdependency.", "b": [0.6853, 0.2586, 0.818, 0.2735]}, {"w": "If", "b": [0.8261, 0.2586, 0.8382, 0.2735]}, {"w": "the", "b": [0.844, 0.2586, 0.8691, 0.2735]}, {"w": "number", "b": [0.1312, 0.2765, 0.1935, 0.2915]}, {"w": "of", "b": [0.2001, 0.2765, 0.2152, 0.2915]}, {"w": "examples", "b": [0.2217, 0.2765, 0.2966, 0.2915]}, {"w": "of", "b": [0.3032, 0.2765, 0.3183, 0.2915]}, {"w": "historical", "b": [0.3248, 0.2765, 0.4003, 0.2915]}, {"w": "log", "b": [0.4068, 0.2765, 0.4309, 0.2915]}, {"w": "records", "b": [0.4374, 0.2765, 0.4962, 0.2915]}, {"w": "is", "b": [0.5027, 0.2765, 0.5154, 0.2915]}, {"w": "high", "b": [0.5219, 0.2765, 0.5575, 0.2915]}, {"w": "enough", "b": [0.564, 0.2765, 0.6226, 0.2915]}, {"w": "(which", "b": [0.6291, 0.2765, 0.684, 0.2915]}, {"w": "is", "b": [0.6905, 0.2765, 0.7032, 0.2915]}, {"w": "often", "b": [0.7097, 0.2765, 0.7511, 0.2915]}, {"w": "the", "b": [0.7576, 0.2765, 0.7837, 0.2915]}, {"w": "case),", "b": [0.7902, 0.2765, 0.8364, 0.2915]}, {"w": "the", "b": [0.843, 0.2765, 0.8692, 0.2915]}, {"w": "machine", "b": [0.1312, 0.2945, 0.1966, 0.3094]}, {"w": "can", "b": [0.2028, 0.2945, 0.2302, 0.3094]}, {"w": "learn", "b": [0.2364, 0.2945, 0.276, 0.3094]}, {"w": "patterns", "b": [0.2821, 0.2945, 0.3482, 0.3094]}, {"w": "hidden", "b": [0.3544, 0.2945, 0.4081, 0.3094]}, {"w": "in", "b": [0.4143, 0.2945, 0.4295, 0.3094]}, {"w": "logs", "b": [0.4357, 0.2945, 0.4662, 0.3094]}, {"w": "and", "b": [0.4724, 0.2945, 0.5018, 0.3094]}, {"w": "be", "b": [0.5079, 0.2945, 0.5267, 0.3094]}, {"w": "able", "b": [0.5329, 0.2945, 0.5653, 0.3094]}, {"w": "to", "b": [0.5715, 0.2945, 0.5877, 0.3094]}, {"w": "make", "b": [0.5939, 0.2945, 0.6355, 0.3094]}, {"w": "predictions", "b": [0.6416, 0.2945, 0.729, 0.3094]}, {"w": "without", "b": [0.7352, 0.2945, 0.797, 0.3094]}, {"w": "knowing", "b": [0.8032, 0.2945, 0.8691, 0.3094]}, {"w": "anything", "b": [0.1312, 0.3124, 0.202, 0.3274]}, {"w": "about", "b": [0.2081, 0.3124, 0.2548, 0.3274]}, {"w": "each", "b": [0.2609, 0.3124, 0.2963, 0.3274]}, {"w": "process.", "b": [0.3025, 0.3124, 0.3658, 0.3274]}]}, {"id": "b_3", "type": "paragraph", "text": "Finally, making predictions about people based on their observed behavior is hard. In this problem, we obviously cannot have a model of a person’s brain, but we have readily available examples of expressions of the person’s ideas (in the form of online posts, comments, and other activities). Based on those expressions alone, a machine learning model deployed in a social network can recommend the content or other people to connect with.", "words": [{"w": "Finally,", "b": [0.1312, 0.3394, 0.1921, 0.3543]}, {"w": "making", "b": [0.1983, 0.3394, 0.2578, 0.3543]}, {"w": "predictions", "b": [0.264, 0.3394, 0.3532, 0.3543]}, {"w": "about", "b": [0.3594, 0.3394, 0.4065, 0.3543]}, {"w": "people", "b": [0.4127, 0.3394, 0.465, 0.3543]}, {"w": "based", "b": [0.4711, 0.3394, 0.5168, 0.3543]}, {"w": "on", "b": [0.523, 0.3394, 0.5427, 0.3543]}, {"w": "their", "b": [0.5488, 0.3394, 0.5872, 0.3543]}, {"w": "observed", "b": [0.5934, 0.3394, 0.664, 0.3543]}, {"w": "behavior", "b": [0.6701, 0.3394, 0.7401, 0.3543]}, {"w": "is", "b": [0.7463, 0.3394, 0.7588, 0.3543]}, {"w": "hard.", "b": [0.765, 0.3394, 0.8075, 0.3543]}, {"w": "In", "b": [0.8157, 0.3394, 0.8328, 0.3543]}, {"w": "this", "b": [0.839, 0.3394, 0.8691, 0.3543]}, {"w": "problem,", "b": [0.1312, 0.3573, 0.2006, 0.3723]}, {"w": "we", "b": [0.2066, 0.3573, 0.2272, 0.3723]}, {"w": "obviously", "b": [0.2331, 0.3573, 0.307, 0.3723]}, {"w": "cannot", "b": [0.3129, 0.3573, 0.3662, 0.3723]}, {"w": "have", "b": [0.3721, 0.3573, 0.4078, 0.3723]}, {"w": "a", "b": [0.4137, 0.3573, 0.4227, 0.3723]}, {"w": "model", "b": [0.4286, 0.3573, 0.4764, 0.3723]}, {"w": "of", "b": [0.4823, 0.3573, 0.4969, 0.3723]}, {"w": "a", "b": [0.5027, 0.3573, 0.5118, 0.3723]}, {"w": "person’s", "b": [0.5177, 0.3573, 0.5818, 0.3723]}, {"w": "brain,", "b": [0.5877, 0.3573, 0.634, 0.3723]}, {"w": "but", "b": [0.6399, 0.3573, 0.6671, 0.3723]}, {"w": "we", "b": [0.673, 0.3573, 0.6936, 0.3723]}, {"w": "have", "b": [0.6995, 0.3573, 0.7352, 0.3723]}, {"w": "readily", "b": [0.7411, 0.3573, 0.7949, 0.3723]}, {"w": "available", "b": [0.8008, 0.3573, 0.8691, 0.3723]}, {"w": "examples", "b": [0.1312, 0.3752, 0.2061, 0.3902]}, {"w": "of", "b": [0.2125, 0.3752, 0.2277, 0.3902]}, {"w": "expressions", "b": [0.2341, 0.3752, 0.326, 0.3902]}, {"w": "of", "b": [0.3324, 0.3752, 0.3476, 0.3902]}, {"w": "the", "b": [0.354, 0.3752, 0.3801, 0.3902]}, {"w": "person’s", "b": [0.3865, 0.3752, 0.4532, 0.3902]}, {"w": "ideas", "b": [0.4596, 0.3752, 0.5005, 0.3902]}, {"w": "(in", "b": [0.5069, 0.3752, 0.53, 0.3902]}, {"w": "the", "b": [0.5364, 0.3752, 0.5625, 0.3902]}, {"w": "form", "b": [0.5689, 0.3752, 0.6071, 0.3902]}, {"w": "of", "b": [0.6135, 0.3752, 0.6287, 0.3902]}, {"w": "online", "b": [0.6351, 0.3752, 0.6843, 0.3902]}, {"w": "posts,", "b": [0.6907, 0.3752, 0.7385, 0.3902]}, {"w": "comments,", "b": [0.7449, 0.3752, 0.8324, 0.3902]}, {"w": "and", "b": [0.8388, 0.3752, 0.8692, 0.3902]}, {"w": "other", "b": [0.1312, 0.3932, 0.1733, 0.4082]}, {"w": "activities).", "b": [0.1794, 0.3932, 0.2639, 0.4082]}, {"w": "Based", "b": [0.2721, 0.3932, 0.3201, 0.4082]}, {"w": "on", "b": [0.3262, 0.3932, 0.3456, 0.4082]}, {"w": "those", "b": [0.3518, 0.3932, 0.3938, 0.4082]}, {"w": "expressions", "b": [0.4, 0.3932, 0.4899, 0.4082]}, {"w": "alone,", "b": [0.4961, 0.3932, 0.5432, 0.4082]}, {"w": "a", "b": [0.5493, 0.3932, 0.5585, 0.4082]}, {"w": "machine", "b": [0.5646, 0.3932, 0.6306, 0.4082]}, {"w": "learning", "b": [0.6368, 0.3932, 0.7013, 0.4082]}, {"w": "model", "b": [0.7074, 0.3932, 0.756, 0.4082]}, {"w": "deployed", "b": [0.7622, 0.3932, 0.8323, 0.4082]}, {"w": "in", "b": [0.8384, 0.3932, 0.8538, 0.4082]}, {"w": "a", "b": [0.8599, 0.3932, 0.8691, 0.4082]}, {"w": "social", "b": [0.1312, 0.4111, 0.176, 0.4261]}, {"w": "network", "b": [0.1821, 0.4111, 0.2462, 0.4261]}, {"w": "can", "b": [0.2524, 0.4111, 0.2801, 0.4261]}, {"w": "recommend", "b": [0.2862, 0.4111, 0.3786, 0.4261]}, {"w": "the", "b": [0.3847, 0.4111, 0.4104, 0.4261]}, {"w": "content", "b": [0.4165, 0.4111, 0.476, 0.4261]}, {"w": "or", "b": [0.4821, 0.4111, 0.4986, 0.4261]}, {"w": "other", "b": [0.5047, 0.4111, 0.5468, 0.4261]}, {"w": "people", "b": [0.553, 0.4111, 0.6048, 0.4261]}, {"w": "to", "b": [0.6109, 0.4111, 0.6273, 0.4261]}, {"w": "connect", "b": [0.6335, 0.4111, 0.695, 0.4261]}, {"w": "with.", "b": [0.7012, 0.4111, 0.7422, 0.4261]}]}, {"id": "b_4", "type": "paragraph", "text": "1.4.5 When the Problem Has a Simple Objective", "words": [{"w": "1.4.5", "b": [0.1312, 0.4593, 0.1749, 0.4743]}, {"w": "When", "b": [0.1961, 0.4593, 0.2513, 0.4743]}, {"w": "the", "b": [0.2584, 0.4593, 0.2881, 0.4743]}, {"w": "Problem", "b": [0.2952, 0.4593, 0.3742, 0.4743]}, {"w": "Has", "b": [0.3812, 0.4593, 0.4165, 0.4743]}, {"w": "a", "b": [0.4236, 0.4593, 0.4339, 0.4743]}, {"w": "Simple", "b": [0.441, 0.4593, 0.5038, 0.4743]}, {"w": "Objective", "b": [0.5108, 0.4593, 0.5993, 0.4743]}]}, {"id": "b_5", "type": "paragraph", "text": "Machine learning is especially suitable for solving problems that you can formulate as a problem with a simple objective: such as yes/no decisions or a single number. In contrast, you cannot use machine learning to build a model that works as a general video game, like Mario, or a word processing software, like Word. This is due to too many different decisions to make: what to display, where and when, what should happen as a reaction to the user’s input, what to write to or read from the hard drive, and so on; getting examples that illustrate all (or even most) of those decisions is practically infeasible.", "words": [{"w": "Machine", "b": [0.1312, 0.4956, 0.2003, 0.5105]}, {"w": "learning", "b": [0.2077, 0.4956, 0.2737, 0.5105]}, {"w": "is", "b": [0.2811, 0.4956, 0.2938, 0.5105]}, {"w": "especially", "b": [0.3013, 0.4956, 0.3798, 0.5105]}, {"w": "suitable", "b": [0.3873, 0.4956, 0.4512, 0.5105]}, {"w": "for", "b": [0.4586, 0.4956, 0.4812, 0.5105]}, {"w": "solving", "b": [0.4886, 0.4956, 0.5457, 0.5105]}, {"w": "problems", "b": [0.5532, 0.4956, 0.6276, 0.5105]}, {"w": "that", "b": [0.6351, 0.4956, 0.6696, 0.5105]}, {"w": "you", "b": [0.677, 0.4956, 0.7063, 0.5105]}, {"w": "can", "b": [0.7138, 0.4956, 0.742, 0.5105]}, {"w": "formulate", "b": [0.7495, 0.4956, 0.828, 0.5105]}, {"w": "as", "b": [0.8354, 0.4956, 0.8523, 0.5105]}, {"w": "a", "b": [0.8597, 0.4956, 0.8691, 0.5105]}, {"w": "problem", "b": [0.1312, 0.5135, 0.1956, 0.5285]}, {"w": "with", "b": [0.2007, 0.5135, 0.2359, 0.5285]}, {"w": "a", "b": [0.2411, 0.5135, 0.2501, 0.5285]}, {"w": "simple", "b": [0.2552, 0.5135, 0.3056, 0.5285]}, {"w": "objective:", "b": [0.3107, 0.5135, 0.3861, 0.5285]}, {"w": "such", "b": [0.3938, 0.5135, 0.4286, 0.5285]}, {"w": "as", "b": [0.4338, 0.5135, 0.4499, 0.5285]}, {"w": "yes/no", "b": [0.4551, 0.5135, 0.5074, 0.5285]}, {"w": "decisions", "b": [0.5126, 0.5135, 0.5821, 0.5285]}, {"w": "or", "b": [0.5873, 0.5135, 0.6034, 0.5285]}, {"w": "a", "b": [0.6086, 0.5135, 0.6176, 0.5285]}, {"w": "single", "b": [0.6227, 0.5135, 0.6671, 0.5285]}, {"w": "number.", "b": [0.6722, 0.5135, 0.7371, 0.5285]}, {"w": "In", "b": [0.745, 0.5135, 0.7615, 0.5285]}, {"w": "contrast,", "b": [0.7667, 0.5135, 0.8357, 0.5285]}, {"w": "you", "b": [0.841, 0.5135, 0.8691, 0.5285]}, {"w": "cannot", "b": [0.1312, 0.5315, 0.1845, 0.5464]}, {"w": "use", "b": [0.1904, 0.5315, 0.2156, 0.5464]}, {"w": "machine", "b": [0.2214, 0.5315, 0.2863, 0.5464]}, {"w": "learning", "b": [0.2921, 0.5315, 0.3555, 0.5464]}, {"w": "to", "b": [0.3613, 0.5315, 0.3774, 0.5464]}, {"w": "build", "b": [0.3833, 0.5315, 0.4235, 0.5464]}, {"w": "a", "b": [0.4293, 0.5315, 0.4384, 0.5464]}, {"w": "model", "b": [0.4442, 0.5315, 0.492, 0.5464]}, {"w": "that", "b": [0.4978, 0.5315, 0.531, 0.5464]}, {"w": "works", "b": [0.5368, 0.5315, 0.5822, 0.5464]}, {"w": "as", "b": [0.588, 0.5315, 0.6042, 0.5464]}, {"w": "a", "b": [0.6101, 0.5315, 0.6191, 0.5464]}, {"w": "general", "b": [0.625, 0.5315, 0.6813, 0.5464]}, {"w": "video", "b": [0.6871, 0.5315, 0.7289, 0.5464]}, {"w": "game,", "b": [0.7347, 0.5315, 0.7809, 0.5464]}, {"w": "like", "b": [0.7868, 0.5315, 0.814, 0.5464]}, {"w": "Mario,", "b": [0.8198, 0.5315, 0.8716, 0.5464]}, {"w": "or", "b": [0.1312, 0.5494, 0.1474, 0.5644]}, {"w": "a", "b": [0.153, 0.5494, 0.162, 0.5644]}, {"w": "word", "b": [0.1676, 0.5494, 0.2063, 0.5644]}, {"w": "processing", "b": [0.212, 0.5494, 0.2931, 0.5644]}, {"w": "software,", "b": [0.2987, 0.5494, 0.3687, 0.5644]}, {"w": "like", "b": [0.3744, 0.5494, 0.4016, 0.5644]}, {"w": "Word.", "b": [0.4072, 0.5494, 0.4554, 0.5644]}, {"w": "This", "b": [0.4635, 0.5494, 0.4987, 0.5644]}, {"w": "is", "b": [0.5043, 0.5494, 0.5165, 0.5644]}, {"w": "due", "b": [0.5221, 0.5494, 0.5503, 0.5644]}, {"w": "to", "b": [0.5559, 0.5494, 0.572, 0.5644]}, {"w": "too", "b": [0.5776, 0.5494, 0.6032, 0.5644]}, {"w": "many", "b": [0.6088, 0.5494, 0.652, 0.5644]}, {"w": "different", "b": [0.6576, 0.5494, 0.723, 0.5644]}, {"w": "decisions", "b": [0.7286, 0.5494, 0.7981, 0.5644]}, {"w": "to", "b": [0.8037, 0.5494, 0.8198, 0.5644]}, {"w": "make:", "b": [0.8254, 0.5494, 0.8716, 0.5644]}, {"w": "what", "b": [0.1306, 0.5674, 0.1697, 0.5823]}, {"w": "to", "b": [0.1756, 0.5674, 0.1917, 0.5823]}, {"w": "display,", "b": [0.1976, 0.5674, 0.2564, 0.5823]}, {"w": "where", "b": [0.2624, 0.5674, 0.3087, 0.5823]}, {"w": "and", "b": [0.3145, 0.5674, 0.3437, 0.5823]}, {"w": "when,", "b": [0.3496, 0.5674, 0.3958, 0.5823]}, {"w": "what", "b": [0.4017, 0.5674, 0.4409, 0.5823]}, {"w": "should", "b": [0.4468, 0.5674, 0.4981, 0.5823]}, {"w": "happen", "b": [0.504, 0.5674, 0.5618, 0.5823]}, {"w": "as", "b": [0.5677, 0.5674, 0.5839, 0.5823]}, {"w": "a", "b": [0.5898, 0.5674, 0.5988, 0.5823]}, {"w": "reaction", "b": [0.6047, 0.5674, 0.668, 0.5823]}, {"w": "to", "b": [0.6739, 0.5674, 0.69, 0.5823]}, {"w": "the", "b": [0.6959, 0.5674, 0.721, 0.5823]}, {"w": "user’s", "b": [0.7269, 0.5674, 0.7714, 0.5823]}, {"w": "input,", "b": [0.7772, 0.5674, 0.8245, 0.5823]}, {"w": "what", "b": [0.8304, 0.5674, 0.8696, 0.5823]}, {"w": "to", "b": [0.1312, 0.5853, 0.148, 0.6003]}, {"w": "write", "b": [0.1542, 0.5853, 0.1961, 0.6003]}, {"w": "to", "b": [0.2023, 0.5853, 0.219, 0.6003]}, {"w": "or", "b": [0.2252, 0.5853, 0.242, 0.6003]}, {"w": "read", "b": [0.2482, 0.5853, 0.2838, 0.6003]}, {"w": "from", "b": [0.2901, 0.5853, 0.3283, 0.6003]}, {"w": "the", "b": [0.3345, 0.5853, 0.3606, 0.6003]}, {"w": "hard", "b": [0.3669, 0.5853, 0.4046, 0.6003]}, {"w": "drive,", "b": [0.4108, 0.5853, 0.4569, 0.6003]}, {"w": "and", "b": [0.4631, 0.5853, 0.4934, 0.6003]}, {"w": "so", "b": [0.4997, 0.5853, 0.5165, 0.6003]}, {"w": "on;", "b": [0.5227, 0.5853, 0.5478, 0.6003]}, {"w": "getting", "b": [0.5541, 0.5853, 0.6116, 0.6003]}, {"w": "examples", "b": [0.6178, 0.5853, 0.6927, 0.6003]}, {"w": "that", "b": [0.6989, 0.5853, 0.7334, 0.6003]}, {"w": "illustrate", "b": [0.7396, 0.5853, 0.813, 0.6003]}, {"w": "all", "b": [0.8192, 0.5853, 0.8391, 0.6003]}, {"w": "(or", "b": [0.8453, 0.5853, 0.8694, 0.6003]}, {"w": "even", "b": [0.1312, 0.6032, 0.1671, 0.6182]}, {"w": "most)", "b": [0.1733, 0.6032, 0.2195, 0.6182]}, {"w": "of", "b": [0.2257, 0.6032, 0.2405, 0.6182]}, {"w": "those", "b": [0.2467, 0.6032, 0.2888, 0.6182]}, {"w": "decisions", "b": [0.295, 0.6032, 0.366, 0.6182]}, {"w": "is", "b": [0.3721, 0.6032, 0.3845, 0.6182]}, {"w": "practically", "b": [0.3907, 0.6032, 0.4753, 0.6182]}, {"w": "infeasible.", "b": [0.4815, 0.6032, 0.5611, 0.6182]}]}, {"id": "b_6", "type": "equation", "text": "1.4.6 When It Is Cost-Effective", "words": [{"w": "1.4.6", "b": [0.1312, 0.6514, 0.1749, 0.6664]}, {"w": "When", "b": [0.1961, 0.6514, 0.2513, 0.6664]}, {"w": "It", "b": [0.2584, 0.6514, 0.2747, 0.6664]}, {"w": "Is", "b": [0.2818, 0.6514, 0.2982, 0.6664]}, {"w": "Cost-Effective", "b": [0.3052, 0.6514, 0.4348, 0.6664]}]}, {"id": "b_7", "type": "paragraph", "text": "Three major sources of cost in machine learning are:", "words": [{"w": "Three", "b": [0.1306, 0.6877, 0.1778, 0.7026]}, {"w": "major", "b": [0.1839, 0.6877, 0.2312, 0.7026]}, {"w": "sources", "b": [0.2373, 0.6877, 0.295, 0.7026]}, {"w": "of", "b": [0.3012, 0.6877, 0.316, 0.7026]}, {"w": "cost", "b": [0.3222, 0.6877, 0.3541, 0.7026]}, {"w": "in", "b": [0.3602, 0.6877, 0.3756, 0.7026]}, {"w": "machine", "b": [0.3818, 0.6877, 0.4479, 0.7026]}, {"w": "learning", "b": [0.454, 0.6877, 0.5187, 0.7026]}, {"w": "are:", "b": [0.5249, 0.6877, 0.5546, 0.7026]}]}, {"id": "b_8", "type": "paragraph", "text": "• collecting, preparing, and cleaning the data, • training the model, • building and running the infrastructure to serve and and monitor the model, as well as labor resources to maintain it.", "words": [{"w": "•", "b": [0.1538, 0.7146, 0.1681, 0.7296]}, {"w": "collecting,", "b": [0.1774, 0.7146, 0.2584, 0.7296]}, {"w": "preparing,", "b": [0.2645, 0.7146, 0.3467, 0.7296]}, {"w": "and", "b": [0.3528, 0.7146, 0.3826, 0.7296]}, {"w": "cleaning", "b": [0.3887, 0.7146, 0.4544, 0.7296]}, {"w": "the", "b": [0.4605, 0.7146, 0.4861, 0.7296]}, {"w": "data,", "b": [0.4923, 0.7146, 0.5333, 0.7296]}, {"w": "•", "b": [0.1538, 0.7325, 0.1681, 0.7475]}, {"w": "training", "b": [0.1774, 0.7325, 0.241, 0.7475]}, {"w": "the", "b": [0.2471, 0.7325, 0.2728, 0.7475]}, {"w": "model,", "b": [0.2789, 0.7325, 0.3328, 0.7475]}, {"w": "•", "b": [0.1538, 0.7505, 0.1681, 0.7654]}, {"w": "building", "b": [0.1774, 0.7505, 0.2418, 0.7654]}, {"w": "and", "b": [0.2479, 0.7505, 0.2771, 0.7654]}, {"w": "running", "b": [0.2832, 0.7505, 0.3446, 0.7654]}, {"w": "the", "b": [0.3508, 0.7505, 0.3759, 0.7654]}, {"w": "infrastructure", "b": [0.3821, 0.7505, 0.4905, 0.7654]}, {"w": "to", "b": [0.4966, 0.7505, 0.5127, 0.7654]}, {"w": "serve", "b": [0.5188, 0.7505, 0.5582, 0.7654]}, {"w": "and", "b": [0.5644, 0.7505, 0.5935, 0.7654]}, {"w": "and", "b": [0.5997, 0.7505, 0.6288, 0.7654]}, {"w": "monitor", "b": [0.635, 0.7505, 0.6974, 0.7654]}, {"w": "the", "b": [0.7035, 0.7505, 0.7287, 0.7654]}, {"w": "model,", "b": [0.7348, 0.7505, 0.7876, 0.7654]}, {"w": "as", "b": [0.7938, 0.7505, 0.81, 0.7654]}, {"w": "well", "b": [0.8161, 0.7505, 0.8468, 0.7654]}, {"w": "as", "b": [0.8529, 0.7505, 0.8691, 0.7654]}, {"w": "labor", "b": [0.1774, 0.7684, 0.2189, 0.7834]}, {"w": "resources", "b": [0.2251, 0.7684, 0.2982, 0.7834]}, {"w": "to", "b": [0.3044, 0.7684, 0.3208, 0.7834]}, {"w": "maintain", "b": [0.3269, 0.7684, 0.3982, 0.7834]}, {"w": "it.", "b": [0.4043, 0.7684, 0.4218, 0.7834]}]}, {"id": "b_9", "type": "paragraph", "text": "The cost of training the model includes human labor and, in some cases, the expensive hardware needed to train deep models. Model maintenance includes continuously monitoring the model and collecting additional data to keep the model up to date.", "words": [{"w": "The", "b": [0.1306, 0.7954, 0.163, 0.8103]}, {"w": "cost", "b": [0.1708, 0.7954, 0.2033, 0.8103]}, {"w": "of", "b": [0.2111, 0.7954, 0.2263, 0.8103]}, {"w": "training", "b": [0.2341, 0.7954, 0.299, 0.8103]}, {"w": "the", "b": [0.3068, 0.7954, 0.333, 0.8103]}, {"w": "model", "b": [0.3408, 0.7954, 0.3905, 0.8103]}, {"w": "includes", "b": [0.3983, 0.7954, 0.4643, 0.8103]}, {"w": "human", "b": [0.4721, 0.7954, 0.5281, 0.8103]}, {"w": "labor", "b": [0.5359, 0.7954, 0.5783, 0.8103]}, {"w": "and,", "b": [0.5861, 0.7954, 0.6217, 0.8103]}, {"w": "in", "b": [0.6299, 0.7954, 0.6456, 0.8103]}, {"w": "some", "b": [0.6534, 0.7954, 0.6943, 0.8103]}, {"w": "cases,", "b": [0.7021, 0.7954, 0.7484, 0.8103]}, {"w": "the", "b": [0.7566, 0.7954, 0.7827, 0.8103]}, {"w": "expensive", "b": [0.7905, 0.7954, 0.8691, 0.8103]}, {"w": "hardware", "b": [0.1312, 0.8133, 0.2042, 0.8283]}, {"w": "needed", "b": [0.2103, 0.8133, 0.2646, 0.8283]}, {"w": "to", "b": [0.2707, 0.8133, 0.2867, 0.8283]}, {"w": "train", "b": [0.2928, 0.8133, 0.3311, 0.8283]}, {"w": "deep", "b": [0.3372, 0.8133, 0.3734, 0.8283]}, {"w": "models.", "b": [0.3795, 0.8133, 0.4394, 0.8283]}, {"w": "Model", "b": [0.4475, 0.8133, 0.4968, 0.8283]}, {"w": "maintenance", "b": [0.5029, 0.8133, 0.6019, 0.8283]}, {"w": "includes", "b": [0.608, 0.8133, 0.6714, 0.8283]}, {"w": "continuously", "b": [0.6775, 0.8133, 0.7766, 0.8283]}, {"w": "monitoring", "b": [0.7827, 0.8133, 0.8691, 0.8283]}, {"w": "the", "b": [0.1312, 0.8313, 0.1569, 0.8462]}, {"w": "model", "b": [0.163, 0.8313, 0.2117, 0.8462]}, {"w": "and", "b": [0.2179, 0.8313, 0.2476, 0.8462]}, {"w": "collecting", "b": [0.2538, 0.8313, 0.3297, 0.8462]}, {"w": "additional", "b": [0.3358, 0.8313, 0.4168, 0.8462]}, {"w": "data", "b": [0.423, 0.8313, 0.4589, 0.8462]}, {"w": "to", "b": [0.465, 0.8313, 0.4814, 0.8462]}, {"w": "keep", "b": [0.4875, 0.8313, 0.5234, 0.8462]}, {"w": "the", "b": [0.5296, 0.8313, 0.5553, 0.8462]}, {"w": "model", "b": [0.5614, 0.8313, 0.6101, 0.8462]}, {"w": "up", "b": [0.6162, 0.8313, 0.6368, 0.8462]}, {"w": "to", "b": [0.6429, 0.8313, 0.6593, 0.8462]}, {"w": "date.", "b": [0.6655, 0.8313, 0.7054, 0.8462]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 16", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "16", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 25, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "1.5 When Not to Use Machine Learning", "words": [{"w": "1.5", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "When", "b": [0.188, 0.0861, 0.2528, 0.104]}, {"w": "Not", "b": [0.2611, 0.0861, 0.3027, 0.104]}, {"w": "to", "b": [0.311, 0.0861, 0.3332, 0.104]}, {"w": "Use", "b": [0.3415, 0.0861, 0.3818, 0.104]}, {"w": "Machine", "b": [0.3901, 0.0861, 0.4822, 0.104]}, {"w": "Learning", "b": [0.4905, 0.0861, 0.5862, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "There are plenty of problems that cannot be solved using machine learning; it’s hard to characterize all of them. Here we only consider several hints.", "words": [{"w": "There", "b": [0.1306, 0.1247, 0.1787, 0.1396]}, {"w": "are", "b": [0.1861, 0.1247, 0.2113, 0.1396]}, {"w": "plenty", "b": [0.2187, 0.1247, 0.2694, 0.1396]}, {"w": "of", "b": [0.2768, 0.1247, 0.292, 0.1396]}, {"w": "problems", "b": [0.2993, 0.1247, 0.3738, 0.1396]}, {"w": "that", "b": [0.3812, 0.1247, 0.4157, 0.1396]}, {"w": "cannot", "b": [0.423, 0.1247, 0.4785, 0.1396]}, {"w": "be", "b": [0.4859, 0.1247, 0.5052, 0.1396]}, {"w": "solved", "b": [0.5126, 0.1247, 0.5629, 0.1396]}, {"w": "using", "b": [0.5703, 0.1247, 0.6133, 0.1396]}, {"w": "machine", "b": [0.6207, 0.1247, 0.6882, 0.1396]}, {"w": "learning;", "b": [0.6955, 0.1247, 0.7667, 0.1396]}, {"w": "it’s", "b": [0.7747, 0.1247, 0.7999, 0.1396]}, {"w": "hard", "b": [0.8073, 0.1247, 0.845, 0.1396]}, {"w": "to", "b": [0.8524, 0.1247, 0.8691, 0.1396]}, {"w": "characterize", "b": [0.1312, 0.1426, 0.2272, 0.1576]}, {"w": "all", "b": [0.2334, 0.1426, 0.2529, 0.1576]}, {"w": "of", "b": [0.259, 0.1426, 0.2739, 0.1576]}, {"w": "them.", "b": [0.28, 0.1426, 0.3262, 0.1576]}, {"w": "Here", "b": [0.3344, 0.1426, 0.3719, 0.1576]}, {"w": "we", "b": [0.378, 0.1426, 0.399, 0.1576]}, {"w": "only", "b": [0.4052, 0.1426, 0.4395, 0.1576]}, {"w": "consider", "b": [0.4457, 0.1426, 0.5115, 0.1576]}, {"w": "several", "b": [0.5176, 0.1426, 0.5722, 0.1576]}, {"w": "hints.", "b": [0.5783, 0.1426, 0.623, 0.1576]}]}, {"id": "b_2", "type": "paragraph", "text": "You probably should not use machine learning when:", "words": [{"w": "You", "b": [0.1305, 0.1695, 0.1623, 0.1845]}, {"w": "probably", "b": [0.1685, 0.1695, 0.2398, 0.1845]}, {"w": "should", "b": [0.2459, 0.1695, 0.2983, 0.1845]}, {"w": "not", "b": [0.3045, 0.1695, 0.3312, 0.1845]}, {"w": "use", "b": [0.3373, 0.1695, 0.363, 0.1845]}, {"w": "machine", "b": [0.3692, 0.1695, 0.4354, 0.1845]}, {"w": "learning", "b": [0.4415, 0.1695, 0.5062, 0.1845]}, {"w": "when:", "b": [0.5123, 0.1695, 0.5595, 0.1845]}]}, {"id": "b_3", "type": "paragraph", "text": "• every action of the system or a decision made by it must be explainable, • every change in the system’s behavior compared to its past behavior in a similar situation must be explainable, • the cost of an error made by the system is too high, • you want to get to the market as fast as possible, • getting the right data is too hard or impossible, • you can solve the problem using traditional software development at a lower cost, • a simple heuristic would work reasonably well, • the phenomenon has too many outcomes while you cannot get a sufficient amount of examples to represent them (like in video games or word processing software), • you build a system that will not have to be improved frequently over time, • you can manually fill an exhaustive lookup table by providing the expected output for any input (that is, the number of possible input values is not too large, or getting outputs is fast and cheap).", "words": [{"w": "•", "b": [0.1538, 0.1965, 0.1681, 0.2114]}, {"w": "every", "b": [0.1774, 0.1965, 0.22, 0.2114]}, {"w": "action", "b": [0.2261, 0.1965, 0.2753, 0.2114]}, {"w": "of", "b": [0.2815, 0.1965, 0.2964, 0.2114]}, {"w": "the", "b": [0.3025, 0.1965, 0.3282, 0.2114]}, {"w": "system", "b": [0.3343, 0.1965, 0.3894, 0.2114]}, {"w": "or", "b": [0.3955, 0.1965, 0.412, 0.2114]}, {"w": "a", "b": [0.4181, 0.1965, 0.4274, 0.2114]}, {"w": "decision", "b": [0.4335, 0.1965, 0.4972, 0.2114]}, {"w": "made", "b": [0.5034, 0.1965, 0.5464, 0.2114]}, {"w": "by", "b": [0.5526, 0.1965, 0.572, 0.2114]}, {"w": "it", "b": [0.5782, 0.1965, 0.5905, 0.2114]}, {"w": "must", "b": [0.5967, 0.1965, 0.6362, 0.2114]}, {"w": "be", "b": [0.6424, 0.1965, 0.6614, 0.2114]}, {"w": "explainable,", "b": [0.6675, 0.1965, 0.7634, 0.2114]}, {"w": "•", "b": [0.1538, 0.2144, 0.1681, 0.2294]}, {"w": "every", "b": [0.1774, 0.2144, 0.2208, 0.2294]}, {"w": "change", "b": [0.2292, 0.2144, 0.2852, 0.2294]}, {"w": "in", "b": [0.2936, 0.2144, 0.3093, 0.2294]}, {"w": "the", "b": [0.3177, 0.2144, 0.3438, 0.2294]}, {"w": "system’s", "b": [0.3522, 0.2144, 0.4211, 0.2294]}, {"w": "behavior", "b": [0.4294, 0.2144, 0.5001, 0.2294]}, {"w": "compared", "b": [0.5085, 0.2144, 0.588, 0.2294]}, {"w": "to", "b": [0.5964, 0.2144, 0.6132, 0.2294]}, {"w": "its", "b": [0.6215, 0.2144, 0.6415, 0.2294]}, {"w": "past", "b": [0.6499, 0.2144, 0.6845, 0.2294]}, {"w": "behavior", "b": [0.6929, 0.2144, 0.7636, 0.2294]}, {"w": "in", "b": [0.772, 0.2144, 0.7877, 0.2294]}, {"w": "a", "b": [0.7961, 0.2144, 0.8055, 0.2294]}, {"w": "similar", "b": [0.8139, 0.2144, 0.8695, 0.2294]}, {"w": "situation", "b": [0.1774, 0.2324, 0.2482, 0.2473]}, {"w": "must", "b": [0.2544, 0.2324, 0.2939, 0.2473]}, {"w": "be", "b": [0.3001, 0.2324, 0.3191, 0.2473]}, {"w": "explainable,", "b": [0.3252, 0.2324, 0.4211, 0.2473]}, {"w": "•", "b": [0.1538, 0.2503, 0.1681, 0.2653]}, {"w": "the", "b": [0.1774, 0.2503, 0.203, 0.2653]}, {"w": "cost", "b": [0.2091, 0.2503, 0.241, 0.2653]}, {"w": "of", "b": [0.2472, 0.2503, 0.2621, 0.2653]}, {"w": "an", "b": [0.2682, 0.2503, 0.2877, 0.2653]}, {"w": "error", "b": [0.2938, 0.2503, 0.333, 0.2653]}, {"w": "made", "b": [0.3391, 0.2503, 0.3822, 0.2653]}, {"w": "by", "b": [0.3883, 0.2503, 0.4078, 0.2653]}, {"w": "the", "b": [0.414, 0.2503, 0.4396, 0.2653]}, {"w": "system", "b": [0.4458, 0.2503, 0.5008, 0.2653]}, {"w": "is", "b": [0.507, 0.2503, 0.5194, 0.2653]}, {"w": "too", "b": [0.5256, 0.2503, 0.5517, 0.2653]}, {"w": "high,", "b": [0.5578, 0.2503, 0.5978, 0.2653]}, {"w": "•", "b": [0.1538, 0.2683, 0.1681, 0.2832]}, {"w": "you", "b": [0.1774, 0.2683, 0.2061, 0.2832]}, {"w": "want", "b": [0.2122, 0.2683, 0.2512, 0.2832]}, {"w": "to", "b": [0.2573, 0.2683, 0.2737, 0.2832]}, {"w": "get", "b": [0.2799, 0.2683, 0.3045, 0.2832]}, {"w": "to", "b": [0.3106, 0.2683, 0.327, 0.2832]}, {"w": "the", "b": [0.3332, 0.2683, 0.3588, 0.2832]}, {"w": "market", "b": [0.365, 0.2683, 0.4214, 0.2832]}, {"w": "as", "b": [0.4276, 0.2683, 0.4441, 0.2832]}, {"w": "fast", "b": [0.4502, 0.2683, 0.4796, 0.2832]}, {"w": "as", "b": [0.4857, 0.2683, 0.5022, 0.2832]}, {"w": "possible,", "b": [0.5084, 0.2683, 0.5768, 0.2832]}, {"w": "•", "b": [0.1538, 0.2862, 0.1681, 0.3012]}, {"w": "getting", "b": [0.1774, 0.2862, 0.2338, 0.3012]}, {"w": "the", "b": [0.2399, 0.2862, 0.2655, 0.3012]}, {"w": "right", "b": [0.2717, 0.2862, 0.3102, 0.3012]}, {"w": "data", "b": [0.3164, 0.2862, 0.3522, 0.3012]}, {"w": "is", "b": [0.3584, 0.2862, 0.3708, 0.3012]}, {"w": "too", "b": [0.3769, 0.2862, 0.4031, 0.3012]}, {"w": "hard", "b": [0.4092, 0.2862, 0.4462, 0.3012]}, {"w": "or", "b": [0.4524, 0.2862, 0.4688, 0.3012]}, {"w": "impossible,", "b": [0.475, 0.2862, 0.5639, 0.3012]}, {"w": "•", "b": [0.1538, 0.3041, 0.1681, 0.3191]}, {"w": "you", "b": [0.1774, 0.3041, 0.2061, 0.3191]}, {"w": "can", "b": [0.2122, 0.3041, 0.2399, 0.3191]}, {"w": "solve", "b": [0.2461, 0.3041, 0.2851, 0.3191]}, {"w": "the", "b": [0.2913, 0.3041, 0.3169, 0.3191]}, {"w": "problem", "b": [0.3231, 0.3041, 0.3887, 0.3191]}, {"w": "using", "b": [0.3949, 0.3041, 0.437, 0.3191]}, {"w": "traditional", "b": [0.4432, 0.3041, 0.5284, 0.3191]}, {"w": "software", "b": [0.5345, 0.3041, 0.6008, 0.3191]}, {"w": "development", "b": [0.6069, 0.3041, 0.708, 0.3191]}, {"w": "at", "b": [0.7141, 0.3041, 0.7305, 0.3191]}, {"w": "a", "b": [0.7367, 0.3041, 0.7459, 0.3191]}, {"w": "lower", "b": [0.7521, 0.3041, 0.7941, 0.3191]}, {"w": "cost,", "b": [0.8003, 0.3041, 0.8373, 0.3191]}, {"w": "•", "b": [0.1538, 0.3221, 0.1681, 0.337]}, {"w": "a", "b": [0.1774, 0.3221, 0.1866, 0.337]}, {"w": "simple", "b": [0.1927, 0.3221, 0.2441, 0.337]}, {"w": "heuristic", "b": [0.2503, 0.3221, 0.3191, 0.337]}, {"w": "would", "b": [0.3253, 0.3221, 0.373, 0.337]}, {"w": "work", "b": [0.3791, 0.3221, 0.4181, 0.337]}, {"w": "reasonably", "b": [0.4243, 0.3221, 0.5101, 0.337]}, {"w": "well,", "b": [0.5162, 0.3221, 0.5526, 0.337]}, {"w": "•", "b": [0.1538, 0.34, 0.1681, 0.355]}, {"w": "the", "b": [0.1774, 0.34, 0.2033, 0.355]}, {"w": "phenomenon", "b": [0.2094, 0.34, 0.312, 0.355]}, {"w": "has", "b": [0.3182, 0.34, 0.3452, 0.355]}, {"w": "too", "b": [0.3514, 0.34, 0.3778, 0.355]}, {"w": "many", "b": [0.3839, 0.34, 0.4285, 0.355]}, {"w": "outcomes", "b": [0.4346, 0.34, 0.5104, 0.355]}, {"w": "while", "b": [0.5165, 0.34, 0.559, 0.355]}, {"w": "you", "b": [0.5652, 0.34, 0.5942, 0.355]}, {"w": "cannot", "b": [0.6003, 0.34, 0.6553, 0.355]}, {"w": "get", "b": [0.6614, 0.34, 0.6863, 0.355]}, {"w": "a", "b": [0.6924, 0.34, 0.7017, 0.355]}, {"w": "sufficient", "b": [0.7079, 0.34, 0.78, 0.355]}, {"w": "amount", "b": [0.7862, 0.34, 0.8479, 0.355]}, {"w": "of", "b": [0.854, 0.34, 0.869, 0.355]}, {"w": "examples", "b": [0.1774, 0.358, 0.2508, 0.3729]}, {"w": "to", "b": [0.2569, 0.358, 0.2733, 0.3729]}, {"w": "represent", "b": [0.2795, 0.358, 0.353, 0.3729]}, {"w": "them", "b": [0.3592, 0.358, 0.4002, 0.3729]}, {"w": "(like", "b": [0.4063, 0.358, 0.4412, 0.3729]}, {"w": "in", "b": [0.4474, 0.358, 0.4627, 0.3729]}, {"w": "video", "b": [0.4689, 0.358, 0.5115, 0.3729]}, {"w": "games", "b": [0.5176, 0.358, 0.5669, 0.3729]}, {"w": "or", "b": [0.5731, 0.358, 0.5895, 0.3729]}, {"w": "word", "b": [0.5957, 0.358, 0.6352, 0.3729]}, {"w": "processing", "b": [0.6414, 0.358, 0.7242, 0.3729]}, {"w": "software),", "b": [0.7303, 0.358, 0.8089, 0.3729]}, {"w": "•", "b": [0.1538, 0.3759, 0.1681, 0.3909]}, {"w": "you", "b": [0.1774, 0.3759, 0.2061, 0.3909]}, {"w": "build", "b": [0.2122, 0.3759, 0.2532, 0.3909]}, {"w": "a", "b": [0.2594, 0.3759, 0.2686, 0.3909]}, {"w": "system", "b": [0.2748, 0.3759, 0.3298, 0.3909]}, {"w": "that", "b": [0.336, 0.3759, 0.3698, 0.3909]}, {"w": "will", "b": [0.376, 0.3759, 0.4047, 0.3909]}, {"w": "not", "b": [0.4108, 0.3759, 0.4375, 0.3909]}, {"w": "have", "b": [0.4436, 0.3759, 0.48, 0.3909]}, {"w": "to", "b": [0.4862, 0.3759, 0.5026, 0.3909]}, {"w": "be", "b": [0.5087, 0.3759, 0.5277, 0.3909]}, {"w": "improved", "b": [0.5339, 0.3759, 0.6083, 0.3909]}, {"w": "frequently", "b": [0.6144, 0.3759, 0.6955, 0.3909]}, {"w": "over", "b": [0.7016, 0.3759, 0.735, 0.3909]}, {"w": "time,", "b": [0.7412, 0.3759, 0.7822, 0.3909]}, {"w": "•", "b": [0.1538, 0.3939, 0.1681, 0.4088]}, {"w": "you", "b": [0.1774, 0.3939, 0.2067, 0.4088]}, {"w": "can", "b": [0.2137, 0.3939, 0.242, 0.4088]}, {"w": "manually", "b": [0.249, 0.3939, 0.3243, 0.4088]}, {"w": "fill", "b": [0.3314, 0.3939, 0.3523, 0.4088]}, {"w": "an", "b": [0.3594, 0.3939, 0.3793, 0.4088]}, {"w": "exhaustive", "b": [0.3863, 0.3939, 0.4728, 0.4088]}, {"w": "lookup", "b": [0.4798, 0.3939, 0.5353, 0.4088]}, {"w": "table", "b": [0.5423, 0.3939, 0.5831, 0.4088]}, {"w": "by", "b": [0.5902, 0.3939, 0.6101, 0.4088]}, {"w": "providing", "b": [0.6171, 0.3939, 0.6946, 0.4088]}, {"w": "the", "b": [0.7017, 0.3939, 0.7278, 0.4088]}, {"w": "expected", "b": [0.7349, 0.3939, 0.8071, 0.4088]}, {"w": "output", "b": [0.8141, 0.3939, 0.8696, 0.4088]}, {"w": "for", "b": [0.1774, 0.4118, 0.1995, 0.4268]}, {"w": "any", "b": [0.2057, 0.4118, 0.2345, 0.4268]}, {"w": "input", "b": [0.2406, 0.4118, 0.2839, 0.4268]}, {"w": "(that", "b": [0.29, 0.4118, 0.3311, 0.4268]}, {"w": "is,", "b": [0.3373, 0.4118, 0.3549, 0.4268]}, {"w": "the", "b": [0.3611, 0.4118, 0.3868, 0.4268]}, {"w": "number", "b": [0.3929, 0.4118, 0.4542, 0.4268]}, {"w": "of", "b": [0.4603, 0.4118, 0.4753, 0.4268]}, {"w": "possible", "b": [0.4814, 0.4118, 0.5449, 0.4268]}, {"w": "input", "b": [0.551, 0.4118, 0.5942, 0.4268]}, {"w": "values", "b": [0.6004, 0.4118, 0.6494, 0.4268]}, {"w": "is", "b": [0.6555, 0.4118, 0.668, 0.4268]}, {"w": "not", "b": [0.6742, 0.4118, 0.7009, 0.4268]}, {"w": "too", "b": [0.7071, 0.4118, 0.7333, 0.4268]}, {"w": "large,", "b": [0.7394, 0.4118, 0.7837, 0.4268]}, {"w": "or", "b": [0.7899, 0.4118, 0.8064, 0.4268]}, {"w": "getting", "b": [0.8125, 0.4118, 0.8691, 0.4268]}, {"w": "outputs", "b": [0.1774, 0.4298, 0.239, 0.4447]}, {"w": "is", "b": [0.2451, 0.4298, 0.2576, 0.4447]}, {"w": "fast", "b": [0.2637, 0.4298, 0.293, 0.4447]}, {"w": "and", "b": [0.2992, 0.4298, 0.3289, 0.4447]}, {"w": "cheap).", "b": [0.3351, 0.4298, 0.393, 0.4447]}]}, {"id": "b_4", "type": "paragraph", "text": "1.6 What is Machine Learning Engineering", "words": [{"w": "1.6", "b": [0.1312, 0.4786, 0.1631, 0.4965]}, {"w": "What", "b": [0.188, 0.4786, 0.2494, 0.4965]}, {"w": "is", "b": [0.2577, 0.4786, 0.2744, 0.4965]}, {"w": "Machine", "b": [0.2827, 0.4786, 0.3748, 0.4965]}, {"w": "Learning", "b": [0.3831, 0.4786, 0.4788, 0.4965]}, {"w": "Engineering", "b": [0.4871, 0.4786, 0.6166, 0.4965]}]}, {"id": "b_5", "type": "paragraph", "text": "Machine learning engineering (MLE) is the use of scientific principles, tools, and techniques of machine learning and traditional software engineering to design and build complex computing systems. MLE encompasses all stages from data collection, to model training, to making the model available for use by the product or the customers.", "words": [{"w": "Machine", "b": [0.1312, 0.5172, 0.1976, 0.5321]}, {"w": "learning", "b": [0.2029, 0.5172, 0.2663, 0.5321]}, {"w": "engineering", "b": [0.2716, 0.5172, 0.3611, 0.5321]}, {"w": "(MLE)", "b": [0.3665, 0.5172, 0.4207, 0.5321]}, {"w": "is", "b": [0.4261, 0.5172, 0.4383, 0.5321]}, {"w": "the", "b": [0.4436, 0.5172, 0.4687, 0.5321]}, {"w": "use", "b": [0.4741, 0.5172, 0.4993, 0.5321]}, {"w": "of", "b": [0.5047, 0.5172, 0.5192, 0.5321]}, {"w": "scientific", "b": [0.5246, 0.5172, 0.5925, 0.5321]}, {"w": "principles,", "b": [0.5979, 0.5172, 0.6785, 0.5321]}, {"w": "tools,", "b": [0.684, 0.5172, 0.7268, 0.5321]}, {"w": "and", "b": [0.7323, 0.5172, 0.7614, 0.5321]}, {"w": "techniques", "b": [0.7668, 0.5172, 0.8493, 0.5321]}, {"w": "of", "b": [0.8546, 0.5172, 0.8692, 0.5321]}, {"w": "machine", "b": [0.1312, 0.5351, 0.196, 0.5501]}, {"w": "learning", "b": [0.2015, 0.5351, 0.2648, 0.5501]}, {"w": "and", "b": [0.2703, 0.5351, 0.2994, 0.5501]}, {"w": "traditional", "b": [0.3048, 0.5351, 0.3883, 0.5501]}, {"w": "software", "b": [0.3937, 0.5351, 0.4586, 0.5501]}, {"w": "engineering", "b": [0.4641, 0.5351, 0.5536, 0.5501]}, {"w": "to", "b": [0.559, 0.5351, 0.5751, 0.5501]}, {"w": "design", "b": [0.5805, 0.5351, 0.6299, 0.5501]}, {"w": "and", "b": [0.6353, 0.5351, 0.6644, 0.5501]}, {"w": "build", "b": [0.6698, 0.5351, 0.7101, 0.5501]}, {"w": "complex", "b": [0.7155, 0.5351, 0.7803, 0.5501]}, {"w": "computing", "b": [0.7857, 0.5351, 0.8691, 0.5501]}, {"w": "systems.", "b": [0.1312, 0.5531, 0.1976, 0.568]}, {"w": "MLE", "b": [0.2058, 0.5531, 0.2462, 0.568]}, {"w": "encompasses", "b": [0.2524, 0.5531, 0.3516, 0.568]}, {"w": "all", "b": [0.3577, 0.5531, 0.3769, 0.568]}, {"w": "stages", "b": [0.383, 0.5531, 0.4307, 0.568]}, {"w": "from", "b": [0.4368, 0.5531, 0.4737, 0.568]}, {"w": "data", "b": [0.4798, 0.5531, 0.5152, 0.568]}, {"w": "collection,", "b": [0.5213, 0.5531, 0.601, 0.568]}, {"w": "to", "b": [0.6072, 0.5531, 0.6233, 0.568]}, {"w": "model", "b": [0.6295, 0.5531, 0.6774, 0.568]}, {"w": "training,", "b": [0.6836, 0.5531, 0.7512, 0.568]}, {"w": "to", "b": [0.7574, 0.5531, 0.7735, 0.568]}, {"w": "making", "b": [0.7797, 0.5531, 0.8377, 0.568]}, {"w": "the", "b": [0.8438, 0.5531, 0.8691, 0.568]}, {"w": "model", "b": [0.1312, 0.571, 0.1799, 0.586]}, {"w": "available", "b": [0.1861, 0.571, 0.2558, 0.586]}, {"w": "for", "b": [0.262, 0.571, 0.2841, 0.586]}, {"w": "use", "b": [0.2902, 0.571, 0.316, 0.586]}, {"w": "by", "b": [0.3221, 0.571, 0.3416, 0.586]}, {"w": "the", "b": [0.3478, 0.571, 0.3734, 0.586]}, {"w": "product", "b": [0.3795, 0.571, 0.4427, 0.586]}, {"w": "or", "b": [0.4488, 0.571, 0.4653, 0.586]}, {"w": "the", "b": [0.4714, 0.571, 0.4971, 0.586]}, {"w": "customers.", "b": [0.5032, 0.571, 0.5886, 0.586]}]}, {"id": "b_6", "type": "paragraph", "text": "Typically, a data analyst10 is concerned with understanding the business problem, building a model to solve it, and evaluating the model in a restricted development environment. A machine learning engineer, in turn, is concerned with sourcing the data from various systems and locations and preprocessing it, programming features, training an effective model that will run in the production environment, coexist well with other production processes, be stable, maintainable, and easily accessible by different types of users with different use cases.", "words": [{"w": "Typically,", "b": [0.1306, 0.598, 0.2098, 0.6129]}, {"w": "a", "b": [0.2159, 0.598, 0.2252, 0.6129]}, {"w": "data", "b": [0.2313, 0.598, 0.2673, 0.6129]}, {"w": "analyst10", "b": [0.2734, 0.5963, 0.3462, 0.6129]}, {"w": "is", "b": [0.3533, 0.598, 0.3658, 0.6129]}, {"w": "concerned", "b": [0.3719, 0.598, 0.4522, 0.6129]}, {"w": "with", "b": [0.4583, 0.598, 0.4943, 0.6129]}, {"w": "understanding", "b": [0.5004, 0.598, 0.6158, 0.6129]}, {"w": "the", "b": [0.6219, 0.598, 0.6477, 0.6129]}, {"w": "business", "b": [0.6538, 0.598, 0.72, 0.6129]}, {"w": "problem,", "b": [0.7261, 0.598, 0.7971, 0.6129]}, {"w": "building", "b": [0.8033, 0.598, 0.8691, 0.6129]}, {"w": "a", "b": [0.1312, 0.6159, 0.1406, 0.6309]}, {"w": "model", "b": [0.1468, 0.6159, 0.1964, 0.6309]}, {"w": "to", "b": [0.2026, 0.6159, 0.2193, 0.6309]}, {"w": "solve", "b": [0.2254, 0.6159, 0.2653, 0.6309]}, {"w": "it,", "b": [0.2714, 0.6159, 0.2892, 0.6309]}, {"w": "and", "b": [0.2953, 0.6159, 0.3256, 0.6309]}, {"w": "evaluating", "b": [0.3318, 0.6159, 0.4159, 0.6309]}, {"w": "the", "b": [0.4221, 0.6159, 0.4482, 0.6309]}, {"w": "model", "b": [0.4543, 0.6159, 0.504, 0.6309]}, {"w": "in", "b": [0.5101, 0.6159, 0.5258, 0.6309]}, {"w": "a", "b": [0.5319, 0.6159, 0.5413, 0.6309]}, {"w": "restricted", "b": [0.5475, 0.6159, 0.625, 0.6309]}, {"w": "development", "b": [0.6312, 0.6159, 0.7341, 0.6309]}, {"w": "environment.", "b": [0.7403, 0.6159, 0.8475, 0.6309]}, {"w": "A", "b": [0.8557, 0.6159, 0.8698, 0.6309]}, {"w": "machine", "b": [0.1312, 0.6338, 0.196, 0.6488]}, {"w": "learning", "b": [0.2022, 0.6338, 0.2655, 0.6488]}, {"w": "engineer,", "b": [0.2717, 0.6338, 0.3421, 0.6488]}, {"w": "in", "b": [0.3482, 0.6338, 0.3633, 0.6488]}, {"w": "turn,", "b": [0.3694, 0.6338, 0.4087, 0.6488]}, {"w": "is", "b": [0.4148, 0.6338, 0.427, 0.6488]}, {"w": "concerned", "b": [0.4331, 0.6338, 0.5116, 0.6488]}, {"w": "with", "b": [0.5177, 0.6338, 0.5529, 0.6488]}, {"w": "sourcing", "b": [0.559, 0.6338, 0.6245, 0.6488]}, {"w": "the", "b": [0.6306, 0.6338, 0.6557, 0.6488]}, {"w": "data", "b": [0.6619, 0.6338, 0.697, 0.6488]}, {"w": "from", "b": [0.7031, 0.6338, 0.7399, 0.6488]}, {"w": "various", "b": [0.746, 0.6338, 0.8019, 0.6488]}, {"w": "systems", "b": [0.808, 0.6338, 0.8691, 0.6488]}, {"w": "and", "b": [0.1312, 0.6518, 0.1613, 0.6667]}, {"w": "locations", "b": [0.1674, 0.6518, 0.2396, 0.6667]}, {"w": "and", "b": [0.2457, 0.6518, 0.2758, 0.6667]}, {"w": "preprocessing", "b": [0.2819, 0.6518, 0.3916, 0.6667]}, {"w": "it,", "b": [0.3977, 0.6518, 0.4154, 0.6667]}, {"w": "programming", "b": [0.4215, 0.6518, 0.5304, 0.6667]}, {"w": "features,", "b": [0.5365, 0.6518, 0.6057, 0.6667]}, {"w": "training", "b": [0.6118, 0.6518, 0.6761, 0.6667]}, {"w": "an", "b": [0.6822, 0.6518, 0.7019, 0.6667]}, {"w": "effective", "b": [0.7081, 0.6518, 0.7739, 0.6667]}, {"w": "model", "b": [0.78, 0.6518, 0.8293, 0.6667]}, {"w": "that", "b": [0.8354, 0.6518, 0.8696, 0.6667]}, {"w": "will", "b": [0.1306, 0.6697, 0.1598, 0.6847]}, {"w": "run", "b": [0.1669, 0.6697, 0.1952, 0.6847]}, {"w": "in", "b": [0.2023, 0.6697, 0.218, 0.6847]}, {"w": "the", "b": [0.225, 0.6697, 0.2512, 0.6847]}, {"w": "production", "b": [0.2582, 0.6697, 0.3477, 0.6847]}, {"w": "environment,", "b": [0.3548, 0.6697, 0.462, 0.6847]}, {"w": "coexist", "b": [0.4693, 0.6697, 0.5259, 0.6847]}, {"w": "well", "b": [0.533, 0.6697, 0.5649, 0.6847]}, {"w": "with", "b": [0.5719, 0.6697, 0.6085, 0.6847]}, {"w": "other", "b": [0.6156, 0.6697, 0.6585, 0.6847]}, {"w": "production", "b": [0.6656, 0.6697, 0.7551, 0.6847]}, {"w": "processes,", "b": [0.7621, 0.6697, 0.8425, 0.6847]}, {"w": "be", "b": [0.8498, 0.6697, 0.8692, 0.6847]}, {"w": "stable,", "b": [0.1312, 0.6877, 0.1829, 0.7026]}, {"w": "maintainable,", "b": [0.1891, 0.6877, 0.2967, 0.7026]}, {"w": "and", "b": [0.3029, 0.6877, 0.3322, 0.7026]}, {"w": "easily", "b": [0.3383, 0.6877, 0.3824, 0.7026]}, {"w": "accessible", "b": [0.3886, 0.6877, 0.4647, 0.7026]}, {"w": "by", "b": [0.4708, 0.6877, 0.49, 0.7026]}, {"w": "different", "b": [0.4962, 0.6877, 0.5619, 0.7026]}, {"w": "types", "b": [0.5681, 0.6877, 0.6101, 0.7026]}, {"w": "of", "b": [0.6163, 0.6877, 0.631, 0.7026]}, {"w": "users", "b": [0.6371, 0.6877, 0.6768, 0.7026]}, {"w": "with", "b": [0.683, 0.6877, 0.7183, 0.7026]}, {"w": "different", "b": [0.7245, 0.6877, 0.7903, 0.7026]}, {"w": "use", "b": [0.7964, 0.6877, 0.8218, 0.7026]}, {"w": "cases.", "b": [0.828, 0.6877, 0.8727, 0.7026]}]}, {"id": "b_7", "type": "paragraph", "text": "In other words, MLE includes any activity that lets machine learning algorithms be imple- mented as a part of an effective production system.", "words": [{"w": "In", "b": [0.1312, 0.7146, 0.1484, 0.7296]}, {"w": "other", "b": [0.1545, 0.7146, 0.1971, 0.7296]}, {"w": "words,", "b": [0.2032, 0.7146, 0.2558, 0.7296]}, {"w": "MLE", "b": [0.2619, 0.7146, 0.3034, 0.7296]}, {"w": "includes", "b": [0.3096, 0.7146, 0.3751, 0.7296]}, {"w": "any", "b": [0.3812, 0.7146, 0.4103, 0.7296]}, {"w": "activity", "b": [0.4164, 0.7146, 0.4782, 0.7296]}, {"w": "that", "b": [0.4843, 0.7146, 0.5185, 0.7296]}, {"w": "lets", "b": [0.5247, 0.7146, 0.5528, 0.7296]}, {"w": "machine", "b": [0.5589, 0.7146, 0.6259, 0.7296]}, {"w": "learning", "b": [0.632, 0.7146, 0.6975, 0.7296]}, {"w": "algorithms", "b": [0.7036, 0.7146, 0.7899, 0.7296]}, {"w": "be", "b": [0.796, 0.7146, 0.8152, 0.7296]}, {"w": "imple-", "b": [0.8213, 0.7146, 0.8722, 0.7296]}, {"w": "mented", "b": [0.1312, 0.7326, 0.1902, 0.7475]}, {"w": "as", "b": [0.1963, 0.7326, 0.2129, 0.7475]}, {"w": "a", "b": [0.219, 0.7326, 0.2282, 0.7475]}, {"w": "part", "b": [0.2344, 0.7326, 0.2683, 0.7475]}, {"w": "of", "b": [0.2744, 0.7326, 0.2893, 0.7475]}, {"w": "an", "b": [0.2955, 0.7326, 0.3149, 0.7475]}, {"w": "effective", "b": [0.3211, 0.7326, 0.3862, 0.7475]}, {"w": "production", "b": [0.3923, 0.7326, 0.4801, 0.7475]}, {"w": "system.", "b": [0.4862, 0.7326, 0.5464, 0.7475]}]}, {"id": "b_8", "type": "paragraph", "text": "In practice, machine learning engineers might be employed in such activities as rewriting a", "words": [{"w": "In", "b": [0.1312, 0.7595, 0.1483, 0.7744]}, {"w": "practice,", "b": [0.1544, 0.7595, 0.2237, 0.7744]}, {"w": "machine", "b": [0.2298, 0.7595, 0.2964, 0.7744]}, {"w": "learning", "b": [0.3026, 0.7595, 0.3677, 0.7744]}, {"w": "engineers", "b": [0.3738, 0.7595, 0.4484, 0.7744]}, {"w": "might", "b": [0.4545, 0.7595, 0.5015, 0.7744]}, {"w": "be", "b": [0.5076, 0.7595, 0.5267, 0.7744]}, {"w": "employed", "b": [0.5329, 0.7595, 0.6088, 0.7744]}, {"w": "in", "b": [0.6149, 0.7595, 0.6304, 0.7744]}, {"w": "such", "b": [0.6366, 0.7595, 0.6723, 0.7744]}, {"w": "activities", "b": [0.6785, 0.7595, 0.7514, 0.7744]}, {"w": "as", "b": [0.7575, 0.7595, 0.7741, 0.7744]}, {"w": "rewriting", "b": [0.7803, 0.7595, 0.8537, 0.7744]}, {"w": "a", "b": [0.8599, 0.7595, 0.8691, 0.7744]}]}, {"id": "b_9", "type": "paragraph", "text": "10Since circa 2013, data scientist has become a popular job title. Unfortunately, companies and experts don’t have an agreement on the definition of the term. Instead, I use the term “data analyst” by referring to a person capable of applying numerical or statistical analysis to data ready for analysis.", "words": [{"w": "10Since", "b": [0.145, 0.7865, 0.1958, 0.8004]}, {"w": "circa", "b": [0.2011, 0.7883, 0.2339, 0.8004]}, {"w": "2013,", "b": [0.2391, 0.7883, 0.2755, 0.8004]}, {"w": "data", "b": [0.2808, 0.7883, 0.3118, 0.8004]}, {"w": "scientist", "b": [0.317, 0.7883, 0.3736, 0.8004]}, {"w": "has", "b": [0.3788, 0.7883, 0.402, 0.8004]}, {"w": "become", "b": [0.4072, 0.7883, 0.4591, 0.8004]}, {"w": "a", "b": [0.4643, 0.7883, 0.4723, 0.8004]}, {"w": "popular", "b": [0.4775, 0.7883, 0.5312, 0.8004]}, {"w": "job", "b": [0.5365, 0.7883, 0.5582, 0.8004]}, {"w": "title.", "b": [0.5634, 0.7883, 0.5963, 0.8004]}, {"w": "Unfortunately,", "b": [0.6032, 0.7883, 0.7044, 0.8004]}, {"w": "companies", "b": [0.7097, 0.7883, 0.7816, 0.8004]}, {"w": "and", "b": [0.7869, 0.7883, 0.8126, 0.8004]}, {"w": "experts", "b": [0.8178, 0.7883, 0.8685, 0.8004]}, {"w": "don’t", "b": [0.1312, 0.8027, 0.1664, 0.8146]}, {"w": "have", "b": [0.1716, 0.8027, 0.2021, 0.8146]}, {"w": "an", "b": [0.2073, 0.8027, 0.2236, 0.8146]}, {"w": "agreement", "b": [0.2288, 0.8027, 0.2979, 0.8146]}, {"w": "on", "b": [0.3031, 0.8027, 0.3194, 0.8146]}, {"w": "the", "b": [0.3246, 0.8027, 0.346, 0.8146]}, {"w": "definition", "b": [0.3513, 0.8027, 0.4147, 0.8146]}, {"w": "of", "b": [0.4199, 0.8027, 0.4324, 0.8146]}, {"w": "the", "b": [0.4376, 0.8027, 0.4591, 0.8146]}, {"w": "term.", "b": [0.4643, 0.8027, 0.5003, 0.8146]}, {"w": "Instead,", "b": [0.5073, 0.8027, 0.561, 0.8146]}, {"w": "I", "b": [0.5662, 0.8027, 0.5718, 0.8146]}, {"w": "use", "b": [0.577, 0.8027, 0.5985, 0.8146]}, {"w": "the", "b": [0.6037, 0.8027, 0.6252, 0.8146]}, {"w": "term", "b": [0.6304, 0.8027, 0.6621, 0.8146]}, {"w": "“data", "b": [0.6674, 0.8027, 0.7047, 0.8146]}, {"w": "analyst”", "b": [0.7099, 0.8027, 0.7658, 0.8146]}, {"w": "by", "b": [0.771, 0.8027, 0.7873, 0.8146]}, {"w": "referring", "b": [0.7925, 0.8027, 0.8496, 0.8146]}, {"w": "to", "b": [0.8548, 0.8027, 0.8685, 0.8146]}, {"w": "a", "b": [0.1312, 0.8168, 0.1391, 0.8288]}, {"w": "person", "b": [0.1443, 0.8168, 0.1893, 0.8288]}, {"w": "capable", "b": [0.1945, 0.8168, 0.2459, 0.8288]}, {"w": "of", "b": [0.2511, 0.8168, 0.2637, 0.8288]}, {"w": "applying", "b": [0.2689, 0.8168, 0.3277, 0.8288]}, {"w": "numerical", "b": [0.333, 0.8168, 0.3996, 0.8288]}, {"w": "or", "b": [0.4048, 0.8168, 0.4188, 0.8288]}, {"w": "statistical", "b": [0.424, 0.8168, 0.4903, 0.8288]}, {"w": "analysis", "b": [0.4956, 0.8168, 0.5493, 0.8288]}, {"w": "to", "b": [0.5545, 0.8168, 0.5685, 0.8288]}, {"w": "data", "b": [0.5737, 0.8168, 0.6042, 0.8288]}, {"w": "ready", "b": [0.6094, 0.8168, 0.6473, 0.8288]}, {"w": "for", "b": [0.6525, 0.8168, 0.6713, 0.8288]}, {"w": "analysis.", "b": [0.6765, 0.8168, 0.7346, 0.8288]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 17", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "17", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 26, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "data analyst’s code from rather slow R and Python11 into more efficient Java or C++, scaling this code and making it more robust, packaging the code into an easy-to-deploy versioned package, optimizing the machine learning algorithm to make sure that it generates a model compatible with, and running correctly in, the organization’s production environment.", "words": [{"w": "data", "b": [0.1312, 0.0881, 0.1664, 0.1031]}, {"w": "analyst’s", "b": [0.1718, 0.0881, 0.2409, 0.1031]}, {"w": "code", "b": [0.2463, 0.0881, 0.282, 0.1031]}, {"w": "from", "b": [0.2874, 0.0881, 0.3241, 0.1031]}, {"w": "rather", "b": [0.3295, 0.0881, 0.3778, 0.1031]}, {"w": "slow", "b": [0.3832, 0.0881, 0.417, 0.1031]}, {"w": "R", "b": [0.4224, 0.0881, 0.4357, 0.1031]}, {"w": "and", "b": [0.4411, 0.0881, 0.4702, 0.1031]}, {"w": "Python11", "b": [0.4756, 0.0865, 0.5482, 0.1031]}, {"w": "into", "b": [0.5545, 0.0881, 0.5852, 0.1031]}, {"w": "more", "b": [0.5906, 0.0881, 0.6298, 0.1031]}, {"w": "efficient", "b": [0.6352, 0.0881, 0.696, 0.1031]}, {"w": "Java", "b": [0.7014, 0.0881, 0.7368, 0.1031]}, {"w": "or", "b": [0.7422, 0.0881, 0.7583, 0.1031]}, {"w": "C++,", "b": [0.7637, 0.0881, 0.8099, 0.1031]}, {"w": "scaling", "b": [0.8154, 0.0881, 0.8688, 0.1031]}, {"w": "this", "b": [0.1312, 0.106, 0.1616, 0.121]}, {"w": "code", "b": [0.1677, 0.106, 0.2047, 0.121]}, {"w": "and", "b": [0.2109, 0.106, 0.2411, 0.121]}, {"w": "making", "b": [0.2472, 0.106, 0.3072, 0.121]}, {"w": "it", "b": [0.3133, 0.106, 0.3258, 0.121]}, {"w": "more", "b": [0.332, 0.106, 0.3727, 0.121]}, {"w": "robust,", "b": [0.3788, 0.106, 0.4363, 0.121]}, {"w": "packaging", "b": [0.4425, 0.106, 0.5238, 0.121]}, {"w": "the", "b": [0.53, 0.106, 0.556, 0.121]}, {"w": "code", "b": [0.5622, 0.106, 0.5992, 0.121]}, {"w": "into", "b": [0.6053, 0.106, 0.6371, 0.121]}, {"w": "an", "b": [0.6433, 0.106, 0.6631, 0.121]}, {"w": "easy-to-deploy", "b": [0.6692, 0.106, 0.7866, 0.121]}, {"w": "versioned", "b": [0.7928, 0.106, 0.8691, 0.121]}, {"w": "package,", "b": [0.1312, 0.124, 0.1999, 0.1389]}, {"w": "optimizing", "b": [0.206, 0.124, 0.291, 0.1389]}, {"w": "the", "b": [0.2972, 0.124, 0.3228, 0.1389]}, {"w": "machine", "b": [0.3289, 0.124, 0.395, 0.1389]}, {"w": "learning", "b": [0.4011, 0.124, 0.4657, 0.1389]}, {"w": "algorithm", "b": [0.4719, 0.124, 0.5497, 0.1389]}, {"w": "to", "b": [0.5559, 0.124, 0.5723, 0.1389]}, {"w": "make", "b": [0.5784, 0.124, 0.6204, 0.1389]}, {"w": "sure", "b": [0.6265, 0.124, 0.6595, 0.1389]}, {"w": "that", "b": [0.6656, 0.124, 0.6994, 0.1389]}, {"w": "it", "b": [0.7055, 0.124, 0.7178, 0.1389]}, {"w": "generates", "b": [0.724, 0.124, 0.7989, 0.1389]}, {"w": "a", "b": [0.8051, 0.124, 0.8143, 0.1389]}, {"w": "model", "b": [0.8204, 0.124, 0.8691, 0.1389]}, {"w": "compatible", "b": [0.1312, 0.1419, 0.2194, 0.1569]}, {"w": "with,", "b": [0.2256, 0.1419, 0.2666, 0.1569]}, {"w": "and", "b": [0.2727, 0.1419, 0.3025, 0.1569]}, {"w": "running", "b": [0.3086, 0.1419, 0.3712, 0.1569]}, {"w": "correctly", "b": [0.3774, 0.1419, 0.4477, 0.1569]}, {"w": "in,", "b": [0.4539, 0.1419, 0.4744, 0.1569]}, {"w": "the", "b": [0.4806, 0.1419, 0.5062, 0.1569]}, {"w": "organization’s", "b": [0.5123, 0.1419, 0.6243, 0.1569]}, {"w": "production", "b": [0.6304, 0.1419, 0.7182, 0.1569]}, {"w": "environment.", "b": [0.7243, 0.1419, 0.8295, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "In many organizations, data analysts execute some of the MLE tasks, such as data collection, transformation, and feature engineering. On the other hand, machine learning engineers often execute some of the data analysis tasks, including learning algorithm selection, hyperparameter tuning, and model evaluation.", "words": [{"w": "In", "b": [0.1312, 0.1689, 0.1478, 0.1838]}, {"w": "many", "b": [0.1538, 0.1689, 0.197, 0.1838]}, {"w": "organizations,", "b": [0.2029, 0.1689, 0.3126, 0.1838]}, {"w": "data", "b": [0.3186, 0.1689, 0.3537, 0.1838]}, {"w": "analysts", "b": [0.3597, 0.1689, 0.4237, 0.1838]}, {"w": "execute", "b": [0.4296, 0.1689, 0.4885, 0.1838]}, {"w": "some", "b": [0.4944, 0.1689, 0.5337, 0.1838]}, {"w": "of", "b": [0.5396, 0.1689, 0.5542, 0.1838]}, {"w": "the", "b": [0.5602, 0.1689, 0.5853, 0.1838]}, {"w": "MLE", "b": [0.5912, 0.1689, 0.6314, 0.1838]}, {"w": "tasks,", "b": [0.6374, 0.1689, 0.6823, 0.1838]}, {"w": "such", "b": [0.6883, 0.1689, 0.7231, 0.1838]}, {"w": "as", "b": [0.729, 0.1689, 0.7452, 0.1838]}, {"w": "data", "b": [0.7512, 0.1689, 0.7863, 0.1838]}, {"w": "collection,", "b": [0.7923, 0.1689, 0.8717, 0.1838]}, {"w": "transformation,", "b": [0.1312, 0.1868, 0.2535, 0.2018]}, {"w": "and", "b": [0.2591, 0.1868, 0.2882, 0.2018]}, {"w": "feature", "b": [0.2936, 0.1868, 0.3484, 0.2018]}, {"w": "engineering.", "b": [0.3538, 0.1868, 0.4483, 0.2018]}, {"w": "On", "b": [0.4562, 0.1868, 0.4804, 0.2018]}, {"w": "the", "b": [0.4858, 0.1868, 0.5109, 0.2018]}, {"w": "other", "b": [0.5163, 0.1868, 0.5575, 0.2018]}, {"w": "hand,", "b": [0.5629, 0.1868, 0.6071, 0.2018]}, {"w": "machine", "b": [0.6126, 0.1868, 0.6774, 0.2018]}, {"w": "learning", "b": [0.6828, 0.1868, 0.7462, 0.2018]}, {"w": "engineers", "b": [0.7515, 0.1868, 0.8241, 0.2018]}, {"w": "often", "b": [0.8295, 0.1868, 0.8692, 0.2018]}, {"w": "execute", "b": [0.1312, 0.2048, 0.19, 0.2197]}, {"w": "some", "b": [0.1944, 0.2048, 0.2337, 0.2197]}, {"w": "of", "b": [0.238, 0.2048, 0.2526, 0.2197]}, {"w": "the", "b": [0.2569, 0.2048, 0.2821, 0.2197]}, {"w": "data", "b": [0.2864, 0.2048, 0.3216, 0.2197]}, {"w": "analysis", "b": [0.3259, 0.2048, 0.3879, 0.2197]}, {"w": "tasks,", "b": [0.3923, 0.2048, 0.4372, 0.2197]}, {"w": "including", "b": [0.4419, 0.2048, 0.5143, 0.2197]}, {"w": "learning", "b": [0.5186, 0.2048, 0.582, 0.2197]}, {"w": "algorithm", "b": [0.5863, 0.2048, 0.6627, 0.2197]}, {"w": "selection,", "b": [0.6671, 0.2048, 0.7395, 0.2197]}, {"w": "hyperparameter", "b": [0.7442, 0.2048, 0.8695, 0.2197]}, {"w": "tuning,", "b": [0.1312, 0.2227, 0.1887, 0.2377]}, {"w": "and", "b": [0.1948, 0.2227, 0.2245, 0.2377]}, {"w": "model", "b": [0.2307, 0.2227, 0.2794, 0.2377]}, {"w": "evaluation.", "b": [0.2855, 0.2227, 0.3732, 0.2377]}]}, {"id": "b_2", "type": "paragraph", "text": "Working on a machine learning project is different from working on a typical software", "words": [{"w": "Working", "b": [0.1303, 0.2496, 0.1999, 0.2646]}, {"w": "on", "b": [0.2086, 0.2496, 0.2285, 0.2646]}, {"w": "a", "b": [0.2371, 0.2496, 0.2465, 0.2646]}, {"w": "machine", "b": [0.2552, 0.2496, 0.3227, 0.2646]}, {"w": "learning", "b": [0.3313, 0.2496, 0.3973, 0.2646]}, {"w": "project", "b": [0.406, 0.2496, 0.4635, 0.2646]}, {"w": "is", "b": [0.4722, 0.2496, 0.4849, 0.2646]}, {"w": "different", "b": [0.4935, 0.2496, 0.5616, 0.2646]}, {"w": "from", "b": [0.5702, 0.2496, 0.6085, 0.2646]}, {"w": "working", "b": [0.6171, 0.2496, 0.682, 0.2646]}, {"w": "on", "b": [0.6907, 0.2496, 0.7106, 0.2646]}, {"w": "a", "b": [0.7192, 0.2496, 0.7286, 0.2646]}, {"w": "typical", "b": [0.7373, 0.2496, 0.7928, 0.2646]}, {"w": "software", "b": [0.8014, 0.2496, 0.8691, 0.2646]}]}, {"id": "b_3", "type": "paragraph", "text": "engineering project. Unlike traditional software, where a program’s behavior usually is deterministic, machine learning applications incorporate models whose behavior may naturally degrade over time, or they can start behaving abnormally. Such abnormal behavior of the model might be explained by various reasons, including a fundamental change in the input data or an updated feature extractor that now returns a different distribution of values or values of a different type. They often say that machine learning systems “fail silently.” A machine learning engineer must be capable of preventing such failures or, when it’s impossible to prevent them entirely, know how to detect and handle them when they happen.", "words": [{"w": "engineering", "b": [0.1312, 0.2676, 0.2244, 0.2825]}, {"w": "project.", "b": [0.2326, 0.2676, 0.2954, 0.2825]}, {"w": "Unlike", "b": [0.3097, 0.2676, 0.3625, 0.2825]}, {"w": "traditional", "b": [0.3707, 0.2676, 0.4576, 0.2825]}, {"w": "software,", "b": [0.4658, 0.2676, 0.5386, 0.2825]}, {"w": "where", "b": [0.5473, 0.2676, 0.5955, 0.2825]}, {"w": "a", "b": [0.6037, 0.2676, 0.6131, 0.2825]}, {"w": "program’s", "b": [0.6213, 0.2676, 0.7031, 0.2825]}, {"w": "behavior", "b": [0.7112, 0.2676, 0.7819, 0.2825]}, {"w": "usually", "b": [0.7901, 0.2676, 0.8483, 0.2825]}, {"w": "is", "b": [0.8565, 0.2676, 0.8691, 0.2825]}, {"w": "deterministic,", "b": [0.1312, 0.2855, 0.2389, 0.3005]}, {"w": "machine", "b": [0.2439, 0.2855, 0.3088, 0.3005]}, {"w": "learning", "b": [0.3135, 0.2855, 0.3769, 0.3005]}, {"w": "applications", "b": [0.3816, 0.2855, 0.4762, 0.3005]}, {"w": "incorporate", "b": [0.4809, 0.2855, 0.571, 0.3005]}, {"w": "models", "b": [0.5757, 0.2855, 0.6306, 0.3005]}, {"w": "whose", "b": [0.6353, 0.2855, 0.6827, 0.3005]}, {"w": "behavior", "b": [0.6874, 0.2855, 0.7553, 0.3005]}, {"w": "may", "b": [0.76, 0.2855, 0.7932, 0.3005]}, {"w": "naturally", "b": [0.7979, 0.2855, 0.8698, 0.3005]}, {"w": "degrade", "b": [0.1312, 0.3035, 0.1949, 0.3184]}, {"w": "over", "b": [0.201, 0.3035, 0.2349, 0.3184]}, {"w": "time,", "b": [0.2411, 0.3035, 0.2827, 0.3184]}, {"w": "or", "b": [0.2889, 0.3035, 0.3056, 0.3184]}, {"w": "they", "b": [0.3118, 0.3035, 0.3477, 0.3184]}, {"w": "can", "b": [0.3539, 0.3035, 0.382, 0.3184]}, {"w": "start", "b": [0.3881, 0.3035, 0.4269, 0.3184]}, {"w": "behaving", "b": [0.433, 0.3035, 0.5065, 0.3184]}, {"w": "abnormally.", "b": [0.5126, 0.3035, 0.6085, 0.3184]}, {"w": "Such", "b": [0.6167, 0.3035, 0.6558, 0.3184]}, {"w": "abnormal", "b": [0.662, 0.3035, 0.7391, 0.3184]}, {"w": "behavior", "b": [0.7452, 0.3035, 0.8156, 0.3184]}, {"w": "of", "b": [0.8218, 0.3035, 0.8369, 0.3184]}, {"w": "the", "b": [0.843, 0.3035, 0.8691, 0.3184]}, {"w": "model", "b": [0.1312, 0.3214, 0.1803, 0.3364]}, {"w": "might", "b": [0.1864, 0.3214, 0.2334, 0.3364]}, {"w": "be", "b": [0.2396, 0.3214, 0.2587, 0.3364]}, {"w": "explained", "b": [0.2648, 0.3214, 0.3418, 0.3364]}, {"w": "by", "b": [0.348, 0.3214, 0.3676, 0.3364]}, {"w": "various", "b": [0.3737, 0.3214, 0.4312, 0.3364]}, {"w": "reasons,", "b": [0.4374, 0.3214, 0.5017, 0.3364]}, {"w": "including", "b": [0.5078, 0.3214, 0.5822, 0.3364]}, {"w": "a", "b": [0.5884, 0.3214, 0.5977, 0.3364]}, {"w": "fundamental", "b": [0.6038, 0.3214, 0.705, 0.3364]}, {"w": "change", "b": [0.7112, 0.3214, 0.7664, 0.3364]}, {"w": "in", "b": [0.7726, 0.3214, 0.7881, 0.3364]}, {"w": "the", "b": [0.7943, 0.3214, 0.8201, 0.3364]}, {"w": "input", "b": [0.8263, 0.3214, 0.8696, 0.3364]}, {"w": "data", "b": [0.1312, 0.3394, 0.1677, 0.3543]}, {"w": "or", "b": [0.1739, 0.3394, 0.1906, 0.3543]}, {"w": "an", "b": [0.1967, 0.3394, 0.2165, 0.3543]}, {"w": "updated", "b": [0.2227, 0.3394, 0.2899, 0.3543]}, {"w": "feature", "b": [0.2961, 0.3394, 0.3529, 0.3543]}, {"w": "extractor", "b": [0.3591, 0.3394, 0.4337, 0.3543]}, {"w": "that", "b": [0.4398, 0.3394, 0.4742, 0.3543]}, {"w": "now", "b": [0.4803, 0.3394, 0.5132, 0.3543]}, {"w": "returns", "b": [0.5193, 0.3394, 0.5779, 0.3543]}, {"w": "a", "b": [0.5841, 0.3394, 0.5934, 0.3543]}, {"w": "different", "b": [0.5996, 0.3394, 0.6674, 0.3543]}, {"w": "distribution", "b": [0.6735, 0.3394, 0.7696, 0.3543]}, {"w": "of", "b": [0.7757, 0.3394, 0.7908, 0.3543]}, {"w": "values", "b": [0.797, 0.3394, 0.8466, 0.3543]}, {"w": "or", "b": [0.8528, 0.3394, 0.8695, 0.3543]}, {"w": "values", "b": [0.1308, 0.3573, 0.1806, 0.3723]}, {"w": "of", "b": [0.1871, 0.3573, 0.2022, 0.3723]}, {"w": "a", "b": [0.2087, 0.3573, 0.2181, 0.3723]}, {"w": "different", "b": [0.2246, 0.3573, 0.2927, 0.3723]}, {"w": "type.", "b": [0.2992, 0.3573, 0.3405, 0.3723]}, {"w": "They", "b": [0.3498, 0.3573, 0.3921, 0.3723]}, {"w": "often", "b": [0.3986, 0.3573, 0.4399, 0.3723]}, {"w": "say", "b": [0.4464, 0.3573, 0.4727, 0.3723]}, {"w": "that", "b": [0.4792, 0.3573, 0.5137, 0.3723]}, {"w": "machine", "b": [0.5202, 0.3573, 0.5877, 0.3723]}, {"w": "learning", "b": [0.5942, 0.3573, 0.6601, 0.3723]}, {"w": "systems", "b": [0.6666, 0.3573, 0.7302, 0.3723]}, {"w": "“fail", "b": [0.7367, 0.3573, 0.7712, 0.3723]}, {"w": "silently.”", "b": [0.7777, 0.3573, 0.8464, 0.3723]}, {"w": "A", "b": [0.8557, 0.3573, 0.8698, 0.3723]}, {"w": "machine", "b": [0.1312, 0.3752, 0.196, 0.3902]}, {"w": "learning", "b": [0.2014, 0.3752, 0.2648, 0.3902]}, {"w": "engineer", "b": [0.2701, 0.3752, 0.3355, 0.3902]}, {"w": "must", "b": [0.3409, 0.3752, 0.3796, 0.3902]}, {"w": "be", "b": [0.385, 0.3752, 0.4036, 0.3902]}, {"w": "capable", "b": [0.4089, 0.3752, 0.4682, 0.3902]}, {"w": "of", "b": [0.4736, 0.3752, 0.4882, 0.3902]}, {"w": "preventing", "b": [0.4935, 0.3752, 0.5765, 0.3902]}, {"w": "such", "b": [0.5818, 0.3752, 0.6166, 0.3902]}, {"w": "failures", "b": [0.622, 0.3752, 0.6789, 0.3902]}, {"w": "or,", "b": [0.6843, 0.3752, 0.7054, 0.3902]}, {"w": "when", "b": [0.7109, 0.3752, 0.7521, 0.3902]}, {"w": "it’s", "b": [0.7575, 0.3752, 0.7817, 0.3902]}, {"w": "impossible", "b": [0.7871, 0.3752, 0.8692, 0.3902]}, {"w": "to", "b": [0.1312, 0.3932, 0.1476, 0.4082]}, {"w": "prevent", "b": [0.1538, 0.3932, 0.2138, 0.4082]}, {"w": "them", "b": [0.22, 0.3932, 0.261, 0.4082]}, {"w": "entirely,", "b": [0.2671, 0.3932, 0.3313, 0.4082]}, {"w": "know", "b": [0.3375, 0.3932, 0.3795, 0.4082]}, {"w": "how", "b": [0.3856, 0.3932, 0.4179, 0.4082]}, {"w": "to", "b": [0.4241, 0.3932, 0.4405, 0.4082]}, {"w": "detect", "b": [0.4466, 0.3932, 0.4959, 0.4082]}, {"w": "and", "b": [0.502, 0.3932, 0.5318, 0.4082]}, {"w": "handle", "b": [0.5379, 0.3932, 0.5912, 0.4082]}, {"w": "them", "b": [0.5974, 0.3932, 0.6384, 0.4082]}, {"w": "when", "b": [0.6445, 0.3932, 0.6866, 0.4082]}, {"w": "they", "b": [0.6927, 0.3932, 0.7281, 0.4082]}, {"w": "happen.", "b": [0.7343, 0.3932, 0.7984, 0.4082]}]}, {"id": "b_4", "type": "paragraph", "text": "1.7 Machine Learning Project Life Cycle", "words": [{"w": "1.7", "b": [0.1312, 0.442, 0.1631, 0.46]}, {"w": "Machine", "b": [0.188, 0.442, 0.2801, 0.46]}, {"w": "Learning", "b": [0.2884, 0.442, 0.3841, 0.46]}, {"w": "Project", "b": [0.3924, 0.442, 0.4725, 0.46]}, {"w": "Life", "b": [0.4808, 0.442, 0.5216, 0.46]}, {"w": "Cycle", "b": [0.5299, 0.442, 0.5904, 0.46]}]}, {"id": "b_5", "type": "paragraph", "text": "A machine learning project starts with understanding the business objective. Usually, a business analyst works with the client12 and the data analyst to transform a business problem into an engineering project. The engineering project may or may not have a machine learning part. In this book, we, of course, consider engineering projects that have some machine learning involved.", "words": [{"w": "A", "b": [0.1305, 0.4806, 0.1446, 0.4956]}, {"w": "machine", "b": [0.1521, 0.4806, 0.2195, 0.4956]}, {"w": "learning", "b": [0.227, 0.4806, 0.2929, 0.4956]}, {"w": "project", "b": [0.3003, 0.4806, 0.3579, 0.4956]}, {"w": "starts", "b": [0.3653, 0.4806, 0.4116, 0.4956]}, {"w": "with", "b": [0.419, 0.4806, 0.4556, 0.4956]}, {"w": "understanding", "b": [0.463, 0.4806, 0.5804, 0.4956]}, {"w": "the", "b": [0.5878, 0.4806, 0.6139, 0.4956]}, {"w": "business", "b": [0.6214, 0.4806, 0.6886, 0.4956]}, {"w": "objective.", "b": [0.696, 0.4806, 0.7745, 0.4956]}, {"w": "Usually,", "b": [0.7865, 0.4806, 0.852, 0.4956]}, {"w": "a", "b": [0.8598, 0.4806, 0.8692, 0.4956]}, {"w": "business", "b": [0.1312, 0.4986, 0.1985, 0.5135]}, {"w": "analyst", "b": [0.2074, 0.4986, 0.2666, 0.5135]}, {"w": "works", "b": [0.2755, 0.4986, 0.3227, 0.5135]}, {"w": "with", "b": [0.3316, 0.4986, 0.3682, 0.5135]}, {"w": "the", "b": [0.377, 0.4986, 0.4032, 0.5135]}, {"w": "client12", "b": [0.4121, 0.4969, 0.4711, 0.5135]}, {"w": "and", "b": [0.4809, 0.4986, 0.5112, 0.5135]}, {"w": "the", "b": [0.5201, 0.4986, 0.5462, 0.5135]}, {"w": "data", "b": [0.5551, 0.4986, 0.5917, 0.5135]}, {"w": "analyst", "b": [0.6006, 0.4986, 0.6598, 0.5135]}, {"w": "to", "b": [0.6687, 0.4986, 0.6854, 0.5135]}, {"w": "transform", "b": [0.6943, 0.4986, 0.7745, 0.5135]}, {"w": "a", "b": [0.7834, 0.4986, 0.7928, 0.5135]}, {"w": "business", "b": [0.8016, 0.4986, 0.8689, 0.5135]}, {"w": "problem", "b": [0.1312, 0.5165, 0.1982, 0.5315]}, {"w": "into", "b": [0.2069, 0.5165, 0.2388, 0.5315]}, {"w": "an", "b": [0.2475, 0.5165, 0.2674, 0.5315]}, {"w": "engineering", "b": [0.2761, 0.5165, 0.3693, 0.5315]}, {"w": "project.", "b": [0.378, 0.5165, 0.4408, 0.5315]}, {"w": "The", "b": [0.4567, 0.5165, 0.4891, 0.5315]}, {"w": "engineering", "b": [0.4978, 0.5165, 0.591, 0.5315]}, {"w": "project", "b": [0.5997, 0.5165, 0.6573, 0.5315]}, {"w": "may", "b": [0.666, 0.5165, 0.7005, 0.5315]}, {"w": "or", "b": [0.7092, 0.5165, 0.726, 0.5315]}, {"w": "may", "b": [0.7347, 0.5165, 0.7692, 0.5315]}, {"w": "not", "b": [0.7779, 0.5165, 0.8051, 0.5315]}, {"w": "have", "b": [0.8138, 0.5165, 0.851, 0.5315]}, {"w": "a", "b": [0.8597, 0.5165, 0.8691, 0.5315]}, {"w": "machine", "b": [0.1312, 0.5345, 0.1987, 0.5494]}, {"w": "learning", "b": [0.2074, 0.5345, 0.2734, 0.5494]}, {"w": "part.", "b": [0.2821, 0.5345, 0.3219, 0.5494]}, {"w": "In", "b": [0.3378, 0.5345, 0.355, 0.5494]}, {"w": "this", "b": [0.3638, 0.5345, 0.3942, 0.5494]}, {"w": "book,", "b": [0.4029, 0.5345, 0.4484, 0.5494]}, {"w": "we,", "b": [0.4577, 0.5345, 0.4844, 0.5494]}, {"w": "of", "b": [0.4938, 0.5345, 0.509, 0.5494]}, {"w": "course,", "b": [0.5177, 0.5345, 0.5743, 0.5494]}, {"w": "consider", "b": [0.5837, 0.5345, 0.6508, 0.5494]}, {"w": "engineering", "b": [0.6595, 0.5345, 0.7527, 0.5494]}, {"w": "projects", "b": [0.7614, 0.5345, 0.8264, 0.5494]}, {"w": "that", "b": [0.8351, 0.5345, 0.8696, 0.5494]}, {"w": "have", "b": [0.1312, 0.5524, 0.1676, 0.5674]}, {"w": "some", "b": [0.1738, 0.5524, 0.2139, 0.5674]}, {"w": "machine", "b": [0.22, 0.5524, 0.2862, 0.5674]}, {"w": "learning", "b": [0.2923, 0.5524, 0.357, 0.5674]}, {"w": "involved.", "b": [0.3631, 0.5524, 0.4344, 0.5674]}]}, {"id": "b_6", "type": "paragraph", "text": "Once an engineering project is defined, this is where the scope of the machine learning engineering starts. In the scope of a broader engineering project, machine learning must first have a well-defined goal. The goal of machine learning is a specification of what a statistical model receives as input, what it generates as output, and the criteria of acceptable (or unacceptable) behavior of the model.", "words": [{"w": "Once", "b": [0.1312, 0.5793, 0.1731, 0.5943]}, {"w": "an", "b": [0.1811, 0.5793, 0.2009, 0.5943]}, {"w": "engineering", "b": [0.2089, 0.5793, 0.3021, 0.5943]}, {"w": "project", "b": [0.3101, 0.5793, 0.3676, 0.5943]}, {"w": "is", "b": [0.3756, 0.5793, 0.3883, 0.5943]}, {"w": "defined,", "b": [0.3963, 0.5793, 0.4601, 0.5943]}, {"w": "this", "b": [0.4686, 0.5793, 0.499, 0.5943]}, {"w": "is", "b": [0.507, 0.5793, 0.5197, 0.5943]}, {"w": "where", "b": [0.5276, 0.5793, 0.5758, 0.5943]}, {"w": "the", "b": [0.5838, 0.5793, 0.61, 0.5943]}, {"w": "scope", "b": [0.6179, 0.5793, 0.6625, 0.5943]}, {"w": "of", "b": [0.6705, 0.5793, 0.6857, 0.5943]}, {"w": "the", "b": [0.6936, 0.5793, 0.7198, 0.5943]}, {"w": "machine", "b": [0.7278, 0.5793, 0.7953, 0.5943]}, {"w": "learning", "b": [0.8032, 0.5793, 0.8692, 0.5943]}, {"w": "engineering", "b": [0.1312, 0.5973, 0.2244, 0.6122]}, {"w": "starts.", "b": [0.2314, 0.5973, 0.283, 0.6122]}, {"w": "In", "b": [0.2938, 0.5973, 0.3111, 0.6122]}, {"w": "the", "b": [0.3181, 0.5973, 0.3443, 0.6122]}, {"w": "scope", "b": [0.3513, 0.5973, 0.3959, 0.6122]}, {"w": "of", "b": [0.4029, 0.5973, 0.4181, 0.6122]}, {"w": "a", "b": [0.4251, 0.5973, 0.4345, 0.6122]}, {"w": "broader", "b": [0.4416, 0.5973, 0.5045, 0.6122]}, {"w": "engineering", "b": [0.5115, 0.5973, 0.6046, 0.6122]}, {"w": "project,", "b": [0.6117, 0.5973, 0.6745, 0.6122]}, {"w": "machine", "b": [0.6818, 0.5973, 0.7492, 0.6122]}, {"w": "learning", "b": [0.7563, 0.5973, 0.8222, 0.6122]}, {"w": "must", "b": [0.8293, 0.5973, 0.8697, 0.6122]}, {"w": "first", "b": [0.1312, 0.6152, 0.1638, 0.6302]}, {"w": "have", "b": [0.1713, 0.6152, 0.2084, 0.6302]}, {"w": "a", "b": [0.2159, 0.6152, 0.2253, 0.6302]}, {"w": "well-defined", "b": [0.2327, 0.6152, 0.3295, 0.6302]}, {"w": "goal.", "b": [0.3368, 0.6152, 0.3795, 0.6305]}, {"w": "The", "b": [0.3916, 0.6152, 0.424, 0.6302]}, {"w": "goal", "b": [0.4314, 0.6152, 0.4649, 0.6302]}, {"w": "of", "b": [0.4724, 0.6152, 0.4875, 0.6302]}, {"w": "machine", "b": [0.495, 0.6152, 0.5624, 0.6302]}, {"w": "learning", "b": [0.5699, 0.6152, 0.6358, 0.6302]}, {"w": "is", "b": [0.6433, 0.6152, 0.6559, 0.6302]}, {"w": "a", "b": [0.6634, 0.6152, 0.6728, 0.6302]}, {"w": "specification", "b": [0.6802, 0.6152, 0.7813, 0.6302]}, {"w": "of", "b": [0.7887, 0.6152, 0.8039, 0.6302]}, {"w": "what", "b": [0.8113, 0.6152, 0.8521, 0.6302]}, {"w": "a", "b": [0.8595, 0.6152, 0.869, 0.6302]}, {"w": "statistical", "b": [0.1312, 0.6332, 0.2078, 0.6481]}, {"w": "model", "b": [0.2137, 0.6332, 0.2615, 0.6481]}, {"w": "receives", "b": [0.2674, 0.6332, 0.3278, 0.6481]}, {"w": "as", "b": [0.3338, 0.6332, 0.3499, 0.6481]}, {"w": "input,", "b": [0.3558, 0.6332, 0.4031, 0.6481]}, {"w": "what", "b": [0.409, 0.6332, 0.4482, 0.6481]}, {"w": "it", "b": [0.4541, 0.6332, 0.4662, 0.6481]}, {"w": "generates", "b": [0.4721, 0.6332, 0.5456, 0.6481]}, {"w": "as", "b": [0.5515, 0.6332, 0.5677, 0.6481]}, {"w": "output,", "b": [0.5736, 0.6332, 0.6319, 0.6481]}, {"w": "and", "b": [0.6379, 0.6332, 0.667, 0.6481]}, {"w": "the", "b": [0.6729, 0.6332, 0.6981, 0.6481]}, {"w": "criteria", "b": [0.704, 0.6332, 0.7603, 0.6481]}, {"w": "of", "b": [0.7662, 0.6332, 0.7808, 0.6481]}, {"w": "acceptable", "b": [0.7867, 0.6332, 0.8692, 0.6481]}, {"w": "(or", "b": [0.1291, 0.6511, 0.1527, 0.6661]}, {"w": "unacceptable)", "b": [0.1589, 0.6511, 0.2707, 0.6661]}, {"w": "behavior", "b": [0.2768, 0.6511, 0.3461, 0.6661]}, {"w": "of", "b": [0.3522, 0.6511, 0.3671, 0.6661]}, {"w": "the", "b": [0.3733, 0.6511, 0.3989, 0.6661]}, {"w": "model.", "b": [0.405, 0.6511, 0.4589, 0.6661]}]}, {"id": "b_7", "type": "paragraph", "text": "The goal of machine learning is not necessarily the same as the business objective. The business objective is what the organization wants to achieve. For example, the business objective of Google with Gmail can be to make Gmail the most-used email service in the world. Google might create multiple machine learning engineering projects to achieve that business objective. The goal of one of those machine learning projects can be to distinguish Primary emails from Promotions with accuracy above 90%.", "words": [{"w": "The", "b": [0.1306, 0.678, 0.163, 0.693]}, {"w": "goal", "b": [0.1704, 0.678, 0.2039, 0.693]}, {"w": "of", "b": [0.2113, 0.678, 0.2264, 0.693]}, {"w": "machine", "b": [0.2339, 0.678, 0.3013, 0.693]}, {"w": "learning", "b": [0.3088, 0.678, 0.3747, 0.693]}, {"w": "is", "b": [0.3821, 0.678, 0.3948, 0.693]}, {"w": "not", "b": [0.4022, 0.678, 0.4294, 0.693]}, {"w": "necessarily", "b": [0.4368, 0.678, 0.5244, 0.693]}, {"w": "the", "b": [0.5318, 0.678, 0.558, 0.693]}, {"w": "same", "b": [0.5654, 0.678, 0.6063, 0.693]}, {"w": "as", "b": [0.6137, 0.678, 0.6306, 0.693]}, {"w": "the", "b": [0.638, 0.678, 0.6641, 0.693]}, {"w": "business", "b": [0.6716, 0.678, 0.7388, 0.693]}, {"w": "objective.", "b": [0.7463, 0.678, 0.8247, 0.693]}, {"w": "The", "b": [0.8367, 0.678, 0.8691, 0.693]}, {"w": "business", "b": [0.1312, 0.696, 0.1985, 0.7109]}, {"w": "objective", "b": [0.206, 0.696, 0.2792, 0.7109]}, {"w": "is", "b": [0.2867, 0.696, 0.2993, 0.7109]}, {"w": "what", "b": [0.3068, 0.696, 0.3475, 0.7109]}, {"w": "the", "b": [0.355, 0.696, 0.3811, 0.7109]}, {"w": "organization", "b": [0.3886, 0.696, 0.4901, 0.7109]}, {"w": "wants", "b": [0.4975, 0.696, 0.5447, 0.7109]}, {"w": "to", "b": [0.5522, 0.696, 0.5689, 0.7109]}, {"w": "achieve.", "b": [0.5764, 0.696, 0.6407, 0.7109]}, {"w": "For", "b": [0.6528, 0.696, 0.6803, 0.7109]}, {"w": "example,", "b": [0.6878, 0.696, 0.7605, 0.7109]}, {"w": "the", "b": [0.7682, 0.696, 0.7944, 0.7109]}, {"w": "business", "b": [0.8019, 0.696, 0.8692, 0.7109]}, {"w": "objective", "b": [0.1312, 0.7139, 0.2045, 0.7289]}, {"w": "of", "b": [0.211, 0.7139, 0.2262, 0.7289]}, {"w": "Google", "b": [0.2327, 0.7139, 0.2898, 0.7289]}, {"w": "with", "b": [0.2964, 0.7139, 0.3329, 0.7289]}, {"w": "Gmail", "b": [0.3395, 0.7139, 0.3898, 0.7289]}, {"w": "can", "b": [0.3963, 0.7139, 0.4246, 0.7289]}, {"w": "be", "b": [0.4311, 0.7139, 0.4505, 0.7289]}, {"w": "to", "b": [0.457, 0.7139, 0.4737, 0.7289]}, {"w": "make", "b": [0.4803, 0.7139, 0.5231, 0.7289]}, {"w": "Gmail", "b": [0.5297, 0.7139, 0.58, 0.7289]}, {"w": "the", "b": [0.5865, 0.7139, 0.6127, 0.7289]}, {"w": "most-used", "b": [0.6192, 0.7139, 0.7021, 0.7289]}, {"w": "email", "b": [0.7086, 0.7139, 0.7525, 0.7289]}, {"w": "service", "b": [0.759, 0.7139, 0.8141, 0.7289]}, {"w": "in", "b": [0.8207, 0.7139, 0.8364, 0.7289]}, {"w": "the", "b": [0.8429, 0.7139, 0.8691, 0.7289]}, {"w": "world.", "b": [0.1306, 0.7319, 0.181, 0.7468]}, {"w": "Google", "b": [0.1892, 0.7319, 0.2459, 0.7468]}, {"w": "might", "b": [0.252, 0.7319, 0.2993, 0.7468]}, {"w": "create", "b": [0.3054, 0.7319, 0.3543, 0.7468]}, {"w": "multiple", "b": [0.3605, 0.7319, 0.4275, 0.7468]}, {"w": "machine", "b": [0.4336, 0.7319, 0.5006, 0.7468]}, {"w": "learning", "b": [0.5067, 0.7319, 0.5722, 0.7468]}, {"w": "engineering", "b": [0.5784, 0.7319, 0.6709, 0.7468]}, {"w": "projects", "b": [0.677, 0.7319, 0.7416, 0.7468]}, {"w": "to", "b": [0.7477, 0.7319, 0.7644, 0.7468]}, {"w": "achieve", "b": [0.7705, 0.7319, 0.8292, 0.7468]}, {"w": "that", "b": [0.8353, 0.7319, 0.8696, 0.7468]}, {"w": "business", "b": [0.1312, 0.7498, 0.1969, 0.7648]}, {"w": "objective.", "b": [0.2031, 0.7498, 0.2797, 0.7648]}, {"w": "The", "b": [0.288, 0.7498, 0.3197, 0.7648]}, {"w": "goal", "b": [0.3258, 0.7498, 0.3585, 0.7648]}, {"w": "of", "b": [0.3647, 0.7498, 0.3795, 0.7648]}, {"w": "one", "b": [0.3856, 0.7498, 0.4132, 0.7648]}, {"w": "of", "b": [0.4194, 0.7498, 0.4342, 0.7648]}, {"w": "those", "b": [0.4404, 0.7498, 0.4824, 0.7648]}, {"w": "machine", "b": [0.4885, 0.7498, 0.5544, 0.7648]}, {"w": "learning", "b": [0.5606, 0.7498, 0.625, 0.7648]}, {"w": "projects", "b": [0.6311, 0.7498, 0.6946, 0.7648]}, {"w": "can", "b": [0.7008, 0.7498, 0.7284, 0.7648]}, {"w": "be", "b": [0.7346, 0.7498, 0.7535, 0.7648]}, {"w": "to", "b": [0.7596, 0.7498, 0.776, 0.7648]}, {"w": "distinguish", "b": [0.7821, 0.7498, 0.8692, 0.7648]}, {"w": "Primary", "b": [0.1312, 0.7678, 0.1977, 0.7827]}, {"w": "emails", "b": [0.2039, 0.7678, 0.2542, 0.7827]}, {"w": "from", "b": [0.2604, 0.7678, 0.2978, 0.7827]}, {"w": "Promotions", "b": [0.304, 0.7678, 0.3967, 0.7827]}, {"w": "with", "b": [0.4028, 0.7678, 0.4387, 0.7827]}, {"w": "accuracy", "b": [0.4449, 0.7678, 0.5152, 0.7827]}, {"w": "above", "b": [0.5213, 0.7678, 0.5674, 0.7827]}, {"w": "90%.", "b": [0.5735, 0.7678, 0.6124, 0.7827]}]}, {"id": "b_8", "type": "paragraph", "text": "11Many scientific modules in Python are indeed implemented in fast C/C++; however, data analyst’s own Python code can still be slow.", "words": [{"w": "11Many", "b": [0.145, 0.7948, 0.1977, 0.8087]}, {"w": "scientific", "b": [0.2029, 0.7968, 0.261, 0.8087]}, {"w": "modules", "b": [0.2663, 0.7968, 0.3218, 0.8087]}, {"w": "in", "b": [0.327, 0.7968, 0.3399, 0.8087]}, {"w": "Python", "b": [0.3451, 0.7968, 0.3948, 0.8087]}, {"w": "are", "b": [0.4, 0.7968, 0.4207, 0.8087]}, {"w": "indeed", "b": [0.4259, 0.7968, 0.4697, 0.8087]}, {"w": "implemented", "b": [0.475, 0.7968, 0.5613, 0.8087]}, {"w": "in", "b": [0.5666, 0.7968, 0.5795, 0.8087]}, {"w": "fast", "b": [0.5847, 0.7968, 0.6093, 0.8087]}, {"w": "C/C++;", "b": [0.6145, 0.7968, 0.673, 0.8087]}, {"w": "however,", "b": [0.6782, 0.7968, 0.7366, 0.8087]}, {"w": "data", "b": [0.7419, 0.7968, 0.7719, 0.8087]}, {"w": "analyst’s", "b": [0.7772, 0.7968, 0.8362, 0.8087]}, {"w": "own", "b": [0.8415, 0.7968, 0.8685, 0.8087]}, {"w": "Python", "b": [0.1312, 0.8109, 0.1815, 0.8229]}, {"w": "code", "b": [0.1868, 0.8109, 0.2177, 0.8229]}, {"w": "can", "b": [0.2229, 0.8109, 0.2464, 0.8229]}, {"w": "still", "b": [0.2516, 0.8109, 0.277, 0.8229]}, {"w": "be", "b": [0.2822, 0.8109, 0.2983, 0.8229]}, {"w": "slow.", "b": [0.3035, 0.8109, 0.3372, 0.8229]}]}, {"id": "b_9", "type": "paragraph", "text": "12If the machine learning project supports a product developed and sold by the organization, then the business analyst works with the product owner.", "words": [{"w": "12If", "b": [0.145, 0.8232, 0.1701, 0.8371]}, {"w": "the", "b": [0.1758, 0.825, 0.198, 0.8371]}, {"w": "machine", "b": [0.2038, 0.825, 0.2611, 0.8371]}, {"w": "learning", "b": [0.2668, 0.825, 0.3228, 0.8371]}, {"w": "project", "b": [0.3285, 0.825, 0.3774, 0.8371]}, {"w": "supports", "b": [0.3831, 0.825, 0.4432, 0.8371]}, {"w": "a", "b": [0.449, 0.825, 0.457, 0.8371]}, {"w": "product", "b": [0.4627, 0.825, 0.5173, 0.8371]}, {"w": "developed", "b": [0.5231, 0.825, 0.5919, 0.8371]}, {"w": "and", "b": [0.5976, 0.825, 0.6234, 0.8371]}, {"w": "sold", "b": [0.6291, 0.825, 0.6567, 0.8371]}, {"w": "by", "b": [0.6625, 0.825, 0.6794, 0.8371]}, {"w": "the", "b": [0.6851, 0.825, 0.7073, 0.8371]}, {"w": "organization,", "b": [0.713, 0.825, 0.8036, 0.8371]}, {"w": "then", "b": [0.8095, 0.825, 0.8406, 0.8371]}, {"w": "the", "b": [0.8463, 0.825, 0.8685, 0.8371]}, {"w": "business", "b": [0.1312, 0.8393, 0.1872, 0.8513]}, {"w": "analyst", "b": [0.1925, 0.8393, 0.2418, 0.8513]}, {"w": "works", "b": [0.247, 0.8393, 0.2863, 0.8513]}, {"w": "with", "b": [0.2915, 0.8393, 0.322, 0.8513]}, {"w": "the", "b": [0.3272, 0.8393, 0.349, 0.8513]}, {"w": "product", "b": [0.3542, 0.8393, 0.4078, 0.8513]}, {"w": "owner.", "b": [0.413, 0.8393, 0.4579, 0.8513]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 18", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "18", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 27, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 4: Machine learning project life cycle.", "words": [{"w": "Figure", "b": [0.3186, 0.4817, 0.3707, 0.4967]}, {"w": "4:", "b": [0.3769, 0.4817, 0.3912, 0.4967]}, {"w": "Machine", "b": [0.3994, 0.4817, 0.4671, 0.4967]}, {"w": "learning", "b": [0.4733, 0.4817, 0.5379, 0.4967]}, {"w": "project", "b": [0.5441, 0.4817, 0.6006, 0.4967]}, {"w": "life", "b": [0.6067, 0.4817, 0.6308, 0.4967]}, {"w": "cycle.", "b": [0.637, 0.4817, 0.6816, 0.4967]}]}, {"id": "b_1", "type": "paragraph", "text": "Overall, a machine learning project life cycle, illustrated in Figure 4, consists of the following stages: 1) goal definition, 2) data collection and preparation, 3) feature engineering, 4) model training, 5) model evaluation, 6) model deployment, 7) model serving, 8) model monitoring, and 9) model maintenance.", "words": [{"w": "Overall,", "b": [0.1312, 0.532, 0.1936, 0.5469]}, {"w": "a", "b": [0.1996, 0.532, 0.2087, 0.5469]}, {"w": "machine", "b": [0.2147, 0.532, 0.2795, 0.5469]}, {"w": "learning", "b": [0.2855, 0.532, 0.3489, 0.5469]}, {"w": "project", "b": [0.3549, 0.532, 0.4102, 0.5469]}, {"w": "life", "b": [0.4162, 0.532, 0.4399, 0.5469]}, {"w": "cycle,", "b": [0.4459, 0.532, 0.4896, 0.5469]}, {"w": "illustrated", "b": [0.4956, 0.532, 0.5762, 0.5469]}, {"w": "in", "b": [0.5822, 0.532, 0.5973, 0.5469]}, {"w": "Figure", "b": [0.6033, 0.532, 0.6544, 0.5469]}, {"w": "4,", "b": [0.6604, 0.532, 0.6744, 0.5469]}, {"w": "consists", "b": [0.6805, 0.532, 0.7411, 0.5469]}, {"w": "of", "b": [0.7471, 0.532, 0.7617, 0.5469]}, {"w": "the", "b": [0.7677, 0.532, 0.7928, 0.5469]}, {"w": "following", "b": [0.7988, 0.532, 0.8692, 0.5469]}, {"w": "stages:", "b": [0.1312, 0.5499, 0.1837, 0.5649]}, {"w": "1)", "b": [0.1917, 0.5499, 0.2078, 0.5649]}, {"w": "goal", "b": [0.2135, 0.5499, 0.2457, 0.5649]}, {"w": "definition,", "b": [0.2514, 0.5499, 0.3308, 0.5649]}, {"w": "2)", "b": [0.3366, 0.5499, 0.3527, 0.5649]}, {"w": "data", "b": [0.3584, 0.5499, 0.3936, 0.5649]}, {"w": "collection", "b": [0.3994, 0.5499, 0.4737, 0.5649]}, {"w": "and", "b": [0.4795, 0.5499, 0.5086, 0.5649]}, {"w": "preparation,", "b": [0.5144, 0.5499, 0.611, 0.5649]}, {"w": "3)", "b": [0.6168, 0.5499, 0.6329, 0.5649]}, {"w": "feature", "b": [0.6386, 0.5499, 0.6934, 0.5649]}, {"w": "engineering,", "b": [0.6992, 0.5499, 0.7937, 0.5649]}, {"w": "4)", "b": [0.7996, 0.5499, 0.8156, 0.5649]}, {"w": "model", "b": [0.8214, 0.5499, 0.8691, 0.5649]}, {"w": "training,", "b": [0.1312, 0.5679, 0.1996, 0.5828]}, {"w": "5)", "b": [0.2057, 0.5679, 0.222, 0.5828]}, {"w": "model", "b": [0.2282, 0.5679, 0.2766, 0.5828]}, {"w": "evaluation,", "b": [0.2828, 0.5679, 0.3699, 0.5828]}, {"w": "6)", "b": [0.3761, 0.5679, 0.3924, 0.5828]}, {"w": "model", "b": [0.3986, 0.5679, 0.447, 0.5828]}, {"w": "deployment,", "b": [0.4532, 0.5679, 0.5505, 0.5828]}, {"w": "7)", "b": [0.5567, 0.5679, 0.573, 0.5828]}, {"w": "model", "b": [0.5792, 0.5679, 0.6276, 0.5828]}, {"w": "serving,", "b": [0.6337, 0.5679, 0.6956, 0.5828]}, {"w": "8)", "b": [0.7017, 0.5679, 0.718, 0.5828]}, {"w": "model", "b": [0.7242, 0.5679, 0.7726, 0.5828]}, {"w": "monitoring,", "b": [0.7788, 0.5679, 0.8716, 0.5828]}, {"w": "and", "b": [0.1312, 0.5858, 0.161, 0.6008]}, {"w": "9)", "b": [0.1671, 0.5858, 0.1835, 0.6008]}, {"w": "model", "b": [0.1897, 0.5858, 0.2384, 0.6008]}, {"w": "maintenance.", "b": [0.2445, 0.5858, 0.3507, 0.6008]}]}, {"id": "b_2", "type": "paragraph", "text": "In Figure 4, the scope of machine learning engineering (and the scope of this book) is limited by the blue zone. The solid arrows show a typical flow of the project stages. The dashed arrows indicate that at some stages, a decision can be made to go back in the process and either collect more data or collect different data, and revise features (by decommissioning some of them and engineering new ones).", "words": [{"w": "In", "b": [0.1312, 0.6127, 0.1478, 0.6277]}, {"w": "Figure", "b": [0.1537, 0.6127, 0.2048, 0.6277]}, {"w": "4,", "b": [0.2107, 0.6127, 0.2248, 0.6277]}, {"w": "the", "b": [0.2307, 0.6127, 0.2559, 0.6277]}, {"w": "scope", "b": [0.2618, 0.6127, 0.3046, 0.6277]}, {"w": "of", "b": [0.3106, 0.6127, 0.3251, 0.6277]}, {"w": "machine", "b": [0.3311, 0.6127, 0.3959, 0.6277]}, {"w": "learning", "b": [0.4018, 0.6127, 0.4652, 0.6277]}, {"w": "engineering", "b": [0.4711, 0.6127, 0.5606, 0.6277]}, {"w": "(and", "b": [0.5665, 0.6127, 0.6027, 0.6277]}, {"w": "the", "b": [0.6086, 0.6127, 0.6338, 0.6277]}, {"w": "scope", "b": [0.6397, 0.6127, 0.6825, 0.6277]}, {"w": "of", "b": [0.6884, 0.6127, 0.703, 0.6277]}, {"w": "this", "b": [0.7089, 0.6127, 0.7382, 0.6277]}, {"w": "book)", "b": [0.7441, 0.6127, 0.7899, 0.6277]}, {"w": "is", "b": [0.7958, 0.6127, 0.8079, 0.6277]}, {"w": "limited", "b": [0.8139, 0.6127, 0.8691, 0.6277]}, {"w": "by", "b": [0.1312, 0.6307, 0.1511, 0.6456]}, {"w": "the", "b": [0.1577, 0.6307, 0.1838, 0.6456]}, {"w": "blue", "b": [0.1904, 0.6307, 0.2249, 0.6456]}, {"w": "zone.", "b": [0.2314, 0.6307, 0.2733, 0.6456]}, {"w": "The", "b": [0.2827, 0.6307, 0.3151, 0.6456]}, {"w": "solid", "b": [0.3217, 0.6307, 0.3594, 0.6456]}, {"w": "arrows", "b": [0.366, 0.6307, 0.4201, 0.6456]}, {"w": "show", "b": [0.4266, 0.6307, 0.467, 0.6456]}, {"w": "a", "b": [0.4735, 0.6307, 0.4829, 0.6456]}, {"w": "typical", "b": [0.4895, 0.6307, 0.5449, 0.6456]}, {"w": "flow", "b": [0.5515, 0.6307, 0.5844, 0.6456]}, {"w": "of", "b": [0.591, 0.6307, 0.6061, 0.6456]}, {"w": "the", "b": [0.6127, 0.6307, 0.6389, 0.6456]}, {"w": "project", "b": [0.6454, 0.6307, 0.703, 0.6456]}, {"w": "stages.", "b": [0.7095, 0.6307, 0.7641, 0.6456]}, {"w": "The", "b": [0.7735, 0.6307, 0.806, 0.6456]}, {"w": "dashed", "b": [0.8125, 0.6307, 0.8691, 0.6456]}, {"w": "arrows", "b": [0.1312, 0.6486, 0.1851, 0.6636]}, {"w": "indicate", "b": [0.1912, 0.6486, 0.2557, 0.6636]}, {"w": "that", "b": [0.2619, 0.6486, 0.2962, 0.6636]}, {"w": "at", "b": [0.3024, 0.6486, 0.319, 0.6636]}, {"w": "some", "b": [0.3252, 0.6486, 0.3659, 0.6636]}, {"w": "stages,", "b": [0.372, 0.6486, 0.4264, 0.6636]}, {"w": "a", "b": [0.4325, 0.6486, 0.4419, 0.6636]}, {"w": "decision", "b": [0.4481, 0.6486, 0.5127, 0.6636]}, {"w": "can", "b": [0.5189, 0.6486, 0.547, 0.6636]}, {"w": "be", "b": [0.5531, 0.6486, 0.5724, 0.6636]}, {"w": "made", "b": [0.5785, 0.6486, 0.6222, 0.6636]}, {"w": "to", "b": [0.6284, 0.6486, 0.6451, 0.6636]}, {"w": "go", "b": [0.6512, 0.6486, 0.6699, 0.6636]}, {"w": "back", "b": [0.6761, 0.6486, 0.7136, 0.6636]}, {"w": "in", "b": [0.7197, 0.6486, 0.7353, 0.6636]}, {"w": "the", "b": [0.7415, 0.6486, 0.7675, 0.6636]}, {"w": "process", "b": [0.7737, 0.6486, 0.8328, 0.6636]}, {"w": "and", "b": [0.8389, 0.6486, 0.8691, 0.6636]}, {"w": "either", "b": [0.1312, 0.6666, 0.1784, 0.6815]}, {"w": "collect", "b": [0.1846, 0.6666, 0.2369, 0.6815]}, {"w": "more", "b": [0.2432, 0.6666, 0.284, 0.6815]}, {"w": "data", "b": [0.2903, 0.6666, 0.3269, 0.6815]}, {"w": "or", "b": [0.3331, 0.6666, 0.3499, 0.6815]}, {"w": "collect", "b": [0.3561, 0.6666, 0.4084, 0.6815]}, {"w": "different", "b": [0.4147, 0.6666, 0.4828, 0.6815]}, {"w": "data,", "b": [0.489, 0.6666, 0.5308, 0.6815]}, {"w": "and", "b": [0.5371, 0.6666, 0.5674, 0.6815]}, {"w": "revise", "b": [0.5737, 0.6666, 0.6204, 0.6815]}, {"w": "features", "b": [0.6267, 0.6666, 0.6912, 0.6815]}, {"w": "(by", "b": [0.6974, 0.6666, 0.7246, 0.6815]}, {"w": "decommissioning", "b": [0.7309, 0.6666, 0.8691, 0.6815]}, {"w": "some", "b": [0.1312, 0.6845, 0.1713, 0.6995]}, {"w": "of", "b": [0.1775, 0.6845, 0.1923, 0.6995]}, {"w": "them", "b": [0.1985, 0.6845, 0.2395, 0.6995]}, {"w": "and", "b": [0.2457, 0.6845, 0.2754, 0.6995]}, {"w": "engineering", "b": [0.2815, 0.6845, 0.3729, 0.6995]}, {"w": "new", "b": [0.379, 0.6845, 0.4108, 0.6995]}, {"w": "ones).", "b": [0.417, 0.6845, 0.4642, 0.6995]}]}, {"id": "b_3", "type": "paragraph", "text": "Every stage mentioned above will be considered in one of the book’s chapters. But first, let’s discuss how to prioritize machine learning projects, define the project’s goal, and structure a machine learning team. The next chapter is devoted to these three questions.", "words": [{"w": "Every", "b": [0.1312, 0.7114, 0.1773, 0.7264]}, {"w": "stage", "b": [0.1833, 0.7114, 0.2236, 0.7264]}, {"w": "mentioned", "b": [0.2297, 0.7114, 0.3115, 0.7264]}, {"w": "above", "b": [0.3176, 0.7114, 0.3628, 0.7264]}, {"w": "will", "b": [0.3689, 0.7114, 0.397, 0.7264]}, {"w": "be", "b": [0.403, 0.7114, 0.4217, 0.7264]}, {"w": "considered", "b": [0.4277, 0.7114, 0.5103, 0.7264]}, {"w": "in", "b": [0.5163, 0.7114, 0.5314, 0.7264]}, {"w": "one", "b": [0.5375, 0.7114, 0.5646, 0.7264]}, {"w": "of", "b": [0.5706, 0.7114, 0.5852, 0.7264]}, {"w": "the", "b": [0.5913, 0.7114, 0.6164, 0.7264]}, {"w": "book’s", "b": [0.6224, 0.7114, 0.6733, 0.7264]}, {"w": "chapters.", "b": [0.6794, 0.7114, 0.7504, 0.7264]}, {"w": "But", "b": [0.7585, 0.7114, 0.7884, 0.7264]}, {"w": "first,", "b": [0.7945, 0.7114, 0.8308, 0.7264]}, {"w": "let’s", "b": [0.8369, 0.7114, 0.8691, 0.7264]}, {"w": "discuss", "b": [0.1312, 0.7294, 0.1861, 0.7443]}, {"w": "how", "b": [0.1922, 0.7294, 0.224, 0.7443]}, {"w": "to", "b": [0.2301, 0.7294, 0.2463, 0.7443]}, {"w": "prioritize", "b": [0.2524, 0.7294, 0.3242, 0.7443]}, {"w": "machine", "b": [0.3303, 0.7294, 0.3954, 0.7443]}, {"w": "learning", "b": [0.4016, 0.7294, 0.4652, 0.7443]}, {"w": "projects,", "b": [0.4713, 0.7294, 0.5391, 0.7443]}, {"w": "define", "b": [0.5453, 0.7294, 0.5917, 0.7443]}, {"w": "the", "b": [0.5979, 0.7294, 0.6231, 0.7443]}, {"w": "project’s", "b": [0.6293, 0.7294, 0.697, 0.7443]}, {"w": "goal,", "b": [0.7032, 0.7294, 0.7405, 0.7443]}, {"w": "and", "b": [0.7467, 0.7294, 0.7759, 0.7443]}, {"w": "structure", "b": [0.7821, 0.7294, 0.8539, 0.7443]}, {"w": "a", "b": [0.8601, 0.7294, 0.8692, 0.7443]}, {"w": "machine", "b": [0.1312, 0.7473, 0.1974, 0.7623]}, {"w": "learning", "b": [0.2035, 0.7473, 0.2682, 0.7623]}, {"w": "team.", "b": [0.2743, 0.7473, 0.3194, 0.7623]}, {"w": "The", "b": [0.3276, 0.7473, 0.3594, 0.7623]}, {"w": "next", "b": [0.3656, 0.7473, 0.401, 0.7623]}, {"w": "chapter", "b": [0.4071, 0.7473, 0.4672, 0.7623]}, {"w": "is", "b": [0.4733, 0.7473, 0.4857, 0.7623]}, {"w": "devoted", "b": [0.4919, 0.7473, 0.5544, 0.7623]}, {"w": "to", "b": [0.5606, 0.7473, 0.577, 0.7623]}, {"w": "these", "b": [0.5831, 0.7473, 0.6243, 0.7623]}, {"w": "three", "b": [0.6304, 0.7473, 0.6715, 0.7623]}, {"w": "questions.", "b": [0.6777, 0.7473, 0.7574, 0.7623]}]}, {"id": "b_4", "type": "paragraph", "text": "1.8 Summary", "words": [{"w": "1.8", "b": [0.1312, 0.7962, 0.1631, 0.8141]}, {"w": "Summary", "b": [0.188, 0.7962, 0.2927, 0.8141]}]}, {"id": "b_5", "type": "paragraph", "text": "A model-based machine learning algorithm takes a collection of training examples as input and outputs a model. An instance-based machine learning algorithm uses the entire training", "words": [{"w": "A", "b": [0.1305, 0.8347, 0.1445, 0.8497]}, {"w": "model-based", "b": [0.1506, 0.8347, 0.2514, 0.8497]}, {"w": "machine", "b": [0.2576, 0.8347, 0.3242, 0.8497]}, {"w": "learning", "b": [0.3303, 0.8347, 0.3955, 0.8497]}, {"w": "algorithm", "b": [0.4016, 0.8347, 0.4801, 0.8497]}, {"w": "takes", "b": [0.4863, 0.8347, 0.5277, 0.8497]}, {"w": "a", "b": [0.5339, 0.8347, 0.5432, 0.8497]}, {"w": "collection", "b": [0.5493, 0.8347, 0.6258, 0.8497]}, {"w": "of", "b": [0.6319, 0.8347, 0.6469, 0.8497]}, {"w": "training", "b": [0.6531, 0.8347, 0.7171, 0.8497]}, {"w": "examples", "b": [0.7233, 0.8347, 0.7972, 0.8497]}, {"w": "as", "b": [0.8034, 0.8347, 0.82, 0.8497]}, {"w": "input", "b": [0.8262, 0.8347, 0.8696, 0.8497]}, {"w": "and", "b": [0.1312, 0.8527, 0.1605, 0.8677]}, {"w": "outputs", "b": [0.1667, 0.8527, 0.2274, 0.8677]}, {"w": "a", "b": [0.2335, 0.8527, 0.2426, 0.8677]}, {"w": "model.", "b": [0.2487, 0.8527, 0.3017, 0.8677]}, {"w": "An", "b": [0.3099, 0.8527, 0.3337, 0.8677]}, {"w": "instance-based", "b": [0.3398, 0.8527, 0.4551, 0.8677]}, {"w": "machine", "b": [0.4613, 0.8527, 0.5264, 0.8677]}, {"w": "learning", "b": [0.5325, 0.8527, 0.5962, 0.8677]}, {"w": "algorithm", "b": [0.6023, 0.8527, 0.6791, 0.8677]}, {"w": "uses", "b": [0.6853, 0.8527, 0.7178, 0.8677]}, {"w": "the", "b": [0.7239, 0.8527, 0.7492, 0.8677]}, {"w": "entire", "b": [0.7553, 0.8527, 0.8003, 0.8677]}, {"w": "training", "b": [0.8065, 0.8527, 0.8691, 0.8677]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 19", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "19", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 28, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "dataset as a model. The training data is exposed to the machine learning algorithm, while holdout data isn’t.", "words": [{"w": "dataset", "b": [0.1312, 0.0881, 0.1904, 0.1031]}, {"w": "as", "b": [0.1965, 0.0881, 0.2132, 0.1031]}, {"w": "a", "b": [0.2193, 0.0881, 0.2286, 0.1031]}, {"w": "model.", "b": [0.2348, 0.0881, 0.2891, 0.1031]}, {"w": "The", "b": [0.2973, 0.0881, 0.3294, 0.1031]}, {"w": "training", "b": [0.3356, 0.0881, 0.3998, 0.1031]}, {"w": "data", "b": [0.406, 0.0881, 0.4422, 0.1031]}, {"w": "is", "b": [0.4483, 0.0881, 0.4608, 0.1031]}, {"w": "exposed", "b": [0.467, 0.0881, 0.5313, 0.1031]}, {"w": "to", "b": [0.5374, 0.0881, 0.554, 0.1031]}, {"w": "the", "b": [0.5601, 0.0881, 0.586, 0.1031]}, {"w": "machine", "b": [0.5922, 0.0881, 0.659, 0.1031]}, {"w": "learning", "b": [0.6651, 0.0881, 0.7304, 0.1031]}, {"w": "algorithm,", "b": [0.7366, 0.0881, 0.8205, 0.1031]}, {"w": "while", "b": [0.8266, 0.0881, 0.8691, 0.1031]}, {"w": "holdout", "b": [0.1312, 0.106, 0.1928, 0.121]}, {"w": "data", "b": [0.1989, 0.106, 0.2348, 0.121]}, {"w": "isn’t.", "b": [0.2409, 0.106, 0.281, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "A supervised learning algorithm builds a model that takes a feature vector and outputs a prediction about that feature vector. An unsupervised learning algorithm builds a model that takes a feature vector as input and transforms it into something useful.", "words": [{"w": "A", "b": [0.1305, 0.133, 0.1446, 0.1479]}, {"w": "supervised", "b": [0.151, 0.133, 0.237, 0.1479]}, {"w": "learning", "b": [0.2434, 0.133, 0.3093, 0.1479]}, {"w": "algorithm", "b": [0.3157, 0.133, 0.3952, 0.1479]}, {"w": "builds", "b": [0.4015, 0.133, 0.4508, 0.1479]}, {"w": "a", "b": [0.4571, 0.133, 0.4666, 0.1479]}, {"w": "model", "b": [0.4729, 0.133, 0.5226, 0.1479]}, {"w": "that", "b": [0.5289, 0.133, 0.5634, 0.1479]}, {"w": "takes", "b": [0.5698, 0.133, 0.6117, 0.1479]}, {"w": "a", "b": [0.618, 0.133, 0.6274, 0.1479]}, {"w": "feature", "b": [0.6338, 0.133, 0.6909, 0.1479]}, {"w": "vector", "b": [0.6972, 0.133, 0.7475, 0.1479]}, {"w": "and", "b": [0.7538, 0.133, 0.7841, 0.1479]}, {"w": "outputs", "b": [0.7905, 0.133, 0.8534, 0.1479]}, {"w": "a", "b": [0.8597, 0.133, 0.8691, 0.1479]}, {"w": "prediction", "b": [0.1312, 0.1509, 0.2139, 0.1659]}, {"w": "about", "b": [0.2205, 0.1509, 0.2681, 0.1659]}, {"w": "that", "b": [0.2746, 0.1509, 0.3092, 0.1659]}, {"w": "feature", "b": [0.3157, 0.1509, 0.3728, 0.1659]}, {"w": "vector.", "b": [0.3794, 0.1509, 0.4349, 0.1659]}, {"w": "An", "b": [0.4443, 0.1509, 0.4689, 0.1659]}, {"w": "unsupervised", "b": [0.4755, 0.1509, 0.5825, 0.1659]}, {"w": "learning", "b": [0.589, 0.1509, 0.655, 0.1659]}, {"w": "algorithm", "b": [0.6616, 0.1509, 0.7411, 0.1659]}, {"w": "builds", "b": [0.7476, 0.1509, 0.7969, 0.1659]}, {"w": "a", "b": [0.8035, 0.1509, 0.8129, 0.1659]}, {"w": "model", "b": [0.8195, 0.1509, 0.8691, 0.1659]}, {"w": "that", "b": [0.1312, 0.1689, 0.1651, 0.1838]}, {"w": "takes", "b": [0.1712, 0.1689, 0.2123, 0.1838]}, {"w": "a", "b": [0.2185, 0.1689, 0.2277, 0.1838]}, {"w": "feature", "b": [0.2339, 0.1689, 0.2898, 0.1838]}, {"w": "vector", "b": [0.296, 0.1689, 0.3452, 0.1838]}, {"w": "as", "b": [0.3514, 0.1689, 0.3679, 0.1838]}, {"w": "input", "b": [0.3741, 0.1689, 0.4171, 0.1838]}, {"w": "and", "b": [0.4233, 0.1689, 0.453, 0.1838]}, {"w": "transforms", "b": [0.4592, 0.1689, 0.5451, 0.1838]}, {"w": "it", "b": [0.5512, 0.1689, 0.5636, 0.1838]}, {"w": "into", "b": [0.5697, 0.1689, 0.601, 0.1838]}, {"w": "something", "b": [0.6071, 0.1689, 0.6893, 0.1838]}, {"w": "useful.", "b": [0.6954, 0.1689, 0.7473, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "Classification is the problem of predicting, for an input example, one of a finite set of classes. Regression, in turn, is a problem of predicting a numerical target.", "words": [{"w": "Classification", "b": [0.1312, 0.1958, 0.2361, 0.2107]}, {"w": "is", "b": [0.2422, 0.1958, 0.2544, 0.2107]}, {"w": "the", "b": [0.2605, 0.1958, 0.2857, 0.2107]}, {"w": "problem", "b": [0.2918, 0.1958, 0.3562, 0.2107]}, {"w": "of", "b": [0.3624, 0.1958, 0.377, 0.2107]}, {"w": "predicting,", "b": [0.3831, 0.1958, 0.4677, 0.2107]}, {"w": "for", "b": [0.4738, 0.1958, 0.4955, 0.2107]}, {"w": "an", "b": [0.5016, 0.1958, 0.5208, 0.2107]}, {"w": "input", "b": [0.5269, 0.1958, 0.5692, 0.2107]}, {"w": "example,", "b": [0.5753, 0.1958, 0.6452, 0.2107]}, {"w": "one", "b": [0.6514, 0.1958, 0.6785, 0.2107]}, {"w": "of", "b": [0.6847, 0.1958, 0.6992, 0.2107]}, {"w": "a", "b": [0.7054, 0.1958, 0.7144, 0.2107]}, {"w": "finite", "b": [0.7206, 0.1958, 0.7608, 0.2107]}, {"w": "set", "b": [0.767, 0.1958, 0.7892, 0.2107]}, {"w": "of", "b": [0.7953, 0.1958, 0.8099, 0.2107]}, {"w": "classes.", "b": [0.8161, 0.1958, 0.8727, 0.2107]}, {"w": "Regression,", "b": [0.1312, 0.2137, 0.222, 0.2287]}, {"w": "in", "b": [0.2281, 0.2137, 0.2435, 0.2287]}, {"w": "turn,", "b": [0.2497, 0.2137, 0.2897, 0.2287]}, {"w": "is", "b": [0.2959, 0.2137, 0.3083, 0.2287]}, {"w": "a", "b": [0.3145, 0.2137, 0.3237, 0.2287]}, {"w": "problem", "b": [0.3298, 0.2137, 0.3955, 0.2287]}, {"w": "of", "b": [0.4016, 0.2137, 0.4165, 0.2287]}, {"w": "predicting", "b": [0.4227, 0.2137, 0.5037, 0.2287]}, {"w": "a", "b": [0.5099, 0.2137, 0.5191, 0.2287]}, {"w": "numerical", "b": [0.5253, 0.2137, 0.6038, 0.2287]}, {"w": "target.", "b": [0.6099, 0.2137, 0.6633, 0.2287]}]}, {"id": "b_3", "type": "paragraph", "text": "Data can be used directly or indirectly. Directly-used data is a basis for forming a dataset of examples. Indirectly-used data is used to enrich those examples.", "words": [{"w": "Data", "b": [0.1312, 0.2406, 0.1702, 0.2556]}, {"w": "can", "b": [0.1763, 0.2406, 0.2034, 0.2556]}, {"w": "be", "b": [0.2096, 0.2406, 0.2282, 0.2556]}, {"w": "used", "b": [0.2343, 0.2406, 0.2696, 0.2556]}, {"w": "directly", "b": [0.2758, 0.2406, 0.3356, 0.2556]}, {"w": "or", "b": [0.3418, 0.2406, 0.3579, 0.2556]}, {"w": "indirectly.", "b": [0.364, 0.2406, 0.4424, 0.2556]}, {"w": "Directly-used", "b": [0.4507, 0.2406, 0.5556, 0.2556]}, {"w": "data", "b": [0.5617, 0.2406, 0.5969, 0.2556]}, {"w": "is", "b": [0.603, 0.2406, 0.6152, 0.2556]}, {"w": "a", "b": [0.6213, 0.2406, 0.6304, 0.2556]}, {"w": "basis", "b": [0.6365, 0.2406, 0.6749, 0.2556]}, {"w": "for", "b": [0.6811, 0.2406, 0.7027, 0.2556]}, {"w": "forming", "b": [0.7089, 0.2406, 0.7697, 0.2556]}, {"w": "a", "b": [0.7759, 0.2406, 0.7849, 0.2556]}, {"w": "dataset", "b": [0.791, 0.2406, 0.8484, 0.2556]}, {"w": "of", "b": [0.8546, 0.2406, 0.8691, 0.2556]}, {"w": "examples.", "b": [0.1312, 0.2586, 0.2098, 0.2735]}, {"w": "Indirectly-used", "b": [0.218, 0.2586, 0.3381, 0.2735]}, {"w": "data", "b": [0.3443, 0.2586, 0.3802, 0.2735]}, {"w": "is", "b": [0.3863, 0.2586, 0.3987, 0.2735]}, {"w": "used", "b": [0.4049, 0.2586, 0.4409, 0.2735]}, {"w": "to", "b": [0.447, 0.2586, 0.4634, 0.2735]}, {"w": "enrich", "b": [0.4696, 0.2586, 0.5184, 0.2735]}, {"w": "those", "b": [0.5245, 0.2586, 0.5667, 0.2735]}, {"w": "examples.", "b": [0.5728, 0.2586, 0.6514, 0.2735]}]}, {"id": "b_4", "type": "paragraph", "text": "The data for machine learning must be tidy. A tidy dataset can be seen as a spreadsheet where each row is an example, and each column is one of the properties of an example. In addition to being tidy, most machine learning algorithms require numerical data, as opposed to categorical. Feature engineering is the process of transforming data into a form that machine learning algorithms can use.", "words": [{"w": "The", "b": [0.1306, 0.2855, 0.163, 0.3005]}, {"w": "data", "b": [0.1695, 0.2855, 0.2061, 0.3005]}, {"w": "for", "b": [0.2126, 0.2855, 0.2352, 0.3005]}, {"w": "machine", "b": [0.2417, 0.2855, 0.3091, 0.3005]}, {"w": "learning", "b": [0.3156, 0.2855, 0.3816, 0.3005]}, {"w": "must", "b": [0.3881, 0.2855, 0.4285, 0.3005]}, {"w": "be", "b": [0.435, 0.2855, 0.4544, 0.3005]}, {"w": "tidy.", "b": [0.4609, 0.2855, 0.4975, 0.3005]}, {"w": "A", "b": [0.5068, 0.2855, 0.5209, 0.3005]}, {"w": "tidy", "b": [0.5274, 0.2855, 0.5604, 0.3005]}, {"w": "dataset", "b": [0.5669, 0.2855, 0.6266, 0.3005]}, {"w": "can", "b": [0.6331, 0.2855, 0.6614, 0.3005]}, {"w": "be", "b": [0.6679, 0.2855, 0.6872, 0.3005]}, {"w": "seen", "b": [0.6937, 0.2855, 0.7284, 0.3005]}, {"w": "as", "b": [0.7349, 0.2855, 0.7517, 0.3005]}, {"w": "a", "b": [0.7582, 0.2855, 0.7676, 0.3005]}, {"w": "spreadsheet", "b": [0.7742, 0.2855, 0.8696, 0.3005]}, {"w": "where", "b": [0.1306, 0.3035, 0.1785, 0.3184]}, {"w": "each", "b": [0.1847, 0.3035, 0.2206, 0.3184]}, {"w": "row", "b": [0.2267, 0.3035, 0.2564, 0.3184]}, {"w": "is", "b": [0.2626, 0.3035, 0.2752, 0.3184]}, {"w": "an", "b": [0.2814, 0.3035, 0.3011, 0.3184]}, {"w": "example,", "b": [0.3073, 0.3035, 0.3796, 0.3184]}, {"w": "and", "b": [0.3858, 0.3035, 0.416, 0.3184]}, {"w": "each", "b": [0.4221, 0.3035, 0.458, 0.3184]}, {"w": "column", "b": [0.4642, 0.3035, 0.5235, 0.3184]}, {"w": "is", "b": [0.5297, 0.3035, 0.5423, 0.3184]}, {"w": "one", "b": [0.5484, 0.3035, 0.5765, 0.3184]}, {"w": "of", "b": [0.5827, 0.3035, 0.5978, 0.3184]}, {"w": "the", "b": [0.6039, 0.3035, 0.63, 0.3184]}, {"w": "properties", "b": [0.6361, 0.3035, 0.7181, 0.3184]}, {"w": "of", "b": [0.7242, 0.3035, 0.7393, 0.3184]}, {"w": "an", "b": [0.7455, 0.3035, 0.7652, 0.3184]}, {"w": "example.", "b": [0.7714, 0.3035, 0.8437, 0.3184]}, {"w": "In", "b": [0.8519, 0.3035, 0.8691, 0.3184]}, {"w": "addition", "b": [0.1312, 0.3214, 0.1968, 0.3364]}, {"w": "to", "b": [0.203, 0.3214, 0.2191, 0.3364]}, {"w": "being", "b": [0.2253, 0.3214, 0.2682, 0.3364]}, {"w": "tidy,", "b": [0.2743, 0.3214, 0.3096, 0.3364]}, {"w": "most", "b": [0.3158, 0.3214, 0.3542, 0.3364]}, {"w": "machine", "b": [0.3603, 0.3214, 0.4254, 0.3364]}, {"w": "learning", "b": [0.4315, 0.3214, 0.4952, 0.3364]}, {"w": "algorithms", "b": [0.5013, 0.3214, 0.5852, 0.3364]}, {"w": "require", "b": [0.5913, 0.3214, 0.6465, 0.3364]}, {"w": "numerical", "b": [0.6526, 0.3214, 0.7298, 0.3364]}, {"w": "data,", "b": [0.736, 0.3214, 0.7764, 0.3364]}, {"w": "as", "b": [0.7825, 0.3214, 0.7988, 0.3364]}, {"w": "opposed", "b": [0.8049, 0.3214, 0.8691, 0.3364]}, {"w": "to", "b": [0.1312, 0.3394, 0.148, 0.3543]}, {"w": "categorical.", "b": [0.1556, 0.3394, 0.2487, 0.3543]}, {"w": "Feature", "b": [0.2613, 0.3394, 0.3234, 0.3543]}, {"w": "engineering", "b": [0.331, 0.3394, 0.4241, 0.3543]}, {"w": "is", "b": [0.4318, 0.3394, 0.4444, 0.3543]}, {"w": "the", "b": [0.452, 0.3394, 0.4782, 0.3543]}, {"w": "process", "b": [0.4858, 0.3394, 0.5452, 0.3543]}, {"w": "of", "b": [0.5528, 0.3394, 0.5679, 0.3543]}, {"w": "transforming", "b": [0.5756, 0.3394, 0.6809, 0.3543]}, {"w": "data", "b": [0.6885, 0.3394, 0.7251, 0.3543]}, {"w": "into", "b": [0.7327, 0.3394, 0.7646, 0.3543]}, {"w": "a", "b": [0.7722, 0.3394, 0.7816, 0.3543]}, {"w": "form", "b": [0.7893, 0.3394, 0.8275, 0.3543]}, {"w": "that", "b": [0.8351, 0.3394, 0.8696, 0.3543]}, {"w": "machine", "b": [0.1312, 0.3573, 0.1974, 0.3723]}, {"w": "learning", "b": [0.2035, 0.3573, 0.2682, 0.3723]}, {"w": "algorithms", "b": [0.2743, 0.3573, 0.3596, 0.3723]}, {"w": "can", "b": [0.3657, 0.3573, 0.3934, 0.3723]}, {"w": "use.", "b": [0.3996, 0.3573, 0.4305, 0.3723]}]}, {"id": "b_5", "type": "paragraph", "text": "A baseline is essential to make sure that the model works better than a simple heuristic.", "words": [{"w": "A", "b": [0.1305, 0.3842, 0.1444, 0.3992]}, {"w": "baseline", "b": [0.1505, 0.3842, 0.2142, 0.3992]}, {"w": "is", "b": [0.2204, 0.3842, 0.2328, 0.3992]}, {"w": "essential", "b": [0.2389, 0.3842, 0.3063, 0.3992]}, {"w": "to", "b": [0.3125, 0.3842, 0.3289, 0.3992]}, {"w": "make", "b": [0.335, 0.3842, 0.3771, 0.3992]}, {"w": "sure", "b": [0.3832, 0.3842, 0.4162, 0.3992]}, {"w": "that", "b": [0.4223, 0.3842, 0.4562, 0.3992]}, {"w": "the", "b": [0.4623, 0.3842, 0.488, 0.3992]}, {"w": "model", "b": [0.4941, 0.3842, 0.5428, 0.3992]}, {"w": "works", "b": [0.549, 0.3842, 0.5953, 0.3992]}, {"w": "better", "b": [0.6014, 0.3842, 0.6502, 0.3992]}, {"w": "than", "b": [0.6563, 0.3842, 0.6933, 0.3992]}, {"w": "a", "b": [0.6994, 0.3842, 0.7086, 0.3992]}, {"w": "simple", "b": [0.7148, 0.3842, 0.7661, 0.3992]}, {"w": "heuristic.", "b": [0.7723, 0.3842, 0.8463, 0.3992]}]}, {"id": "b_6", "type": "paragraph", "text": "In practice, machine learning is implemented as a pipeline that contains chained stages of data transformation, from data partitioning to missing-data imputation, to class imbalance and dimensionality reduction, to model training. The hyperparameters of the entire pipeline are usually optimized; the entire pipeline can be deployed and used for predictions.", "words": [{"w": "In", "b": [0.1312, 0.4111, 0.1485, 0.4261]}, {"w": "practice,", "b": [0.1546, 0.4111, 0.2248, 0.4261]}, {"w": "machine", "b": [0.2309, 0.4111, 0.2984, 0.4261]}, {"w": "learning", "b": [0.3045, 0.4111, 0.3705, 0.4261]}, {"w": "is", "b": [0.3766, 0.4111, 0.3893, 0.4261]}, {"w": "implemented", "b": [0.3954, 0.4111, 0.5006, 0.4261]}, {"w": "as", "b": [0.5067, 0.4111, 0.5235, 0.4261]}, {"w": "a", "b": [0.5297, 0.4111, 0.5391, 0.4261]}, {"w": "pipeline", "b": [0.5452, 0.4111, 0.6096, 0.4261]}, {"w": "that", "b": [0.6157, 0.4111, 0.6502, 0.4261]}, {"w": "contains", "b": [0.6563, 0.4111, 0.7239, 0.4261]}, {"w": "chained", "b": [0.7301, 0.4111, 0.7923, 0.4261]}, {"w": "stages", "b": [0.7985, 0.4111, 0.8479, 0.4261]}, {"w": "of", "b": [0.854, 0.4111, 0.8692, 0.4261]}, {"w": "data", "b": [0.1312, 0.4291, 0.1672, 0.444]}, {"w": "transformation,", "b": [0.1733, 0.4291, 0.2982, 0.444]}, {"w": "from", "b": [0.3043, 0.4291, 0.3418, 0.444]}, {"w": "data", "b": [0.3479, 0.4291, 0.3839, 0.444]}, {"w": "partitioning", "b": [0.39, 0.4291, 0.4855, 0.444]}, {"w": "to", "b": [0.4916, 0.4291, 0.508, 0.444]}, {"w": "missing-data", "b": [0.5141, 0.4291, 0.6159, 0.444]}, {"w": "imputation,", "b": [0.6221, 0.4291, 0.7165, 0.444]}, {"w": "to", "b": [0.7226, 0.4291, 0.739, 0.444]}, {"w": "class", "b": [0.7452, 0.4291, 0.7823, 0.444]}, {"w": "imbalance", "b": [0.7884, 0.4291, 0.869, 0.444]}, {"w": "and", "b": [0.1312, 0.447, 0.1606, 0.462]}, {"w": "dimensionality", "b": [0.1667, 0.447, 0.2821, 0.462]}, {"w": "reduction,", "b": [0.2882, 0.447, 0.3681, 0.462]}, {"w": "to", "b": [0.3743, 0.447, 0.3904, 0.462]}, {"w": "model", "b": [0.3966, 0.447, 0.4446, 0.462]}, {"w": "training.", "b": [0.4507, 0.447, 0.5185, 0.462]}, {"w": "The", "b": [0.5267, 0.447, 0.558, 0.462]}, {"w": "hyperparameters", "b": [0.5642, 0.447, 0.6974, 0.462]}, {"w": "of", "b": [0.7035, 0.447, 0.7182, 0.462]}, {"w": "the", "b": [0.7243, 0.447, 0.7496, 0.462]}, {"w": "entire", "b": [0.7557, 0.447, 0.8008, 0.462]}, {"w": "pipeline", "b": [0.8069, 0.447, 0.8691, 0.462]}, {"w": "are", "b": [0.1312, 0.465, 0.1559, 0.4799]}, {"w": "usually", "b": [0.162, 0.465, 0.2191, 0.4799]}, {"w": "optimized;", "b": [0.2252, 0.465, 0.3093, 0.4799]}, {"w": "the", "b": [0.3154, 0.465, 0.3411, 0.4799]}, {"w": "entire", "b": [0.3473, 0.465, 0.393, 0.4799]}, {"w": "pipeline", "b": [0.3991, 0.465, 0.4622, 0.4799]}, {"w": "can", "b": [0.4683, 0.465, 0.496, 0.4799]}, {"w": "be", "b": [0.5022, 0.465, 0.5212, 0.4799]}, {"w": "deployed", "b": [0.5273, 0.465, 0.5976, 0.4799]}, {"w": "and", "b": [0.6037, 0.465, 0.6335, 0.4799]}, {"w": "used", "b": [0.6396, 0.465, 0.6756, 0.4799]}, {"w": "for", "b": [0.6818, 0.465, 0.7039, 0.4799]}, {"w": "predictions.", "b": [0.71, 0.465, 0.8035, 0.4799]}]}, {"id": "b_7", "type": "paragraph", "text": "Parameters of the model are optimized by the learning algorithm based on the training data. The values of hyperparameters cannot be learned by the learning algorithm and are, in turn, tuned by using the validation dataset. The test set is only used to assess the model’s performance and report it to the client or product owner.", "words": [{"w": "Parameters", "b": [0.1312, 0.4919, 0.2243, 0.5069]}, {"w": "of", "b": [0.2319, 0.4919, 0.2471, 0.5069]}, {"w": "the", "b": [0.2548, 0.4919, 0.2809, 0.5069]}, {"w": "model", "b": [0.2886, 0.4919, 0.3382, 0.5069]}, {"w": "are", "b": [0.3459, 0.4919, 0.3711, 0.5069]}, {"w": "optimized", "b": [0.3787, 0.4919, 0.4592, 0.5069]}, {"w": "by", "b": [0.4669, 0.4919, 0.4868, 0.5069]}, {"w": "the", "b": [0.4944, 0.4919, 0.5206, 0.5069]}, {"w": "learning", "b": [0.5283, 0.4919, 0.5942, 0.5069]}, {"w": "algorithm", "b": [0.6019, 0.4919, 0.6814, 0.5069]}, {"w": "based", "b": [0.689, 0.4919, 0.7352, 0.5069]}, {"w": "on", "b": [0.7428, 0.4919, 0.7627, 0.5069]}, {"w": "the", "b": [0.7704, 0.4919, 0.7965, 0.5069]}, {"w": "training", "b": [0.8042, 0.4919, 0.8691, 0.5069]}, {"w": "data.", "b": [0.1312, 0.5098, 0.1714, 0.5248]}, {"w": "The", "b": [0.1795, 0.5098, 0.2107, 0.5248]}, {"w": "values", "b": [0.2166, 0.5098, 0.2644, 0.5248]}, {"w": "of", "b": [0.2704, 0.5098, 0.2849, 0.5248]}, {"w": "hyperparameters", "b": [0.2908, 0.5098, 0.4233, 0.5248]}, {"w": "cannot", "b": [0.4292, 0.5098, 0.4824, 0.5248]}, {"w": "be", "b": [0.4884, 0.5098, 0.507, 0.5248]}, {"w": "learned", "b": [0.5129, 0.5098, 0.5702, 0.5248]}, {"w": "by", "b": [0.5762, 0.5098, 0.5952, 0.5248]}, {"w": "the", "b": [0.6012, 0.5098, 0.6263, 0.5248]}, {"w": "learning", "b": [0.6322, 0.5098, 0.6956, 0.5248]}, {"w": "algorithm", "b": [0.7015, 0.5098, 0.7779, 0.5248]}, {"w": "and", "b": [0.7838, 0.5098, 0.813, 0.5248]}, {"w": "are,", "b": [0.8189, 0.5098, 0.8481, 0.5248]}, {"w": "in", "b": [0.854, 0.5098, 0.8691, 0.5248]}, {"w": "turn,", "b": [0.1312, 0.5278, 0.1715, 0.5428]}, {"w": "tuned", "b": [0.1777, 0.5278, 0.2241, 0.5428]}, {"w": "by", "b": [0.2303, 0.5278, 0.2499, 0.5428]}, {"w": "using", "b": [0.256, 0.5278, 0.2985, 0.5428]}, {"w": "the", "b": [0.3046, 0.5278, 0.3304, 0.5428]}, {"w": "validation", "b": [0.3366, 0.5278, 0.4165, 0.5428]}, {"w": "dataset.", "b": [0.4227, 0.5278, 0.4867, 0.5428]}, {"w": "The", "b": [0.495, 0.5278, 0.527, 0.5428]}, {"w": "test", "b": [0.5331, 0.5278, 0.5632, 0.5428]}, {"w": "set", "b": [0.5693, 0.5278, 0.5921, 0.5428]}, {"w": "is", "b": [0.5983, 0.5278, 0.6108, 0.5428]}, {"w": "only", "b": [0.6169, 0.5278, 0.6515, 0.5428]}, {"w": "used", "b": [0.6576, 0.5278, 0.6939, 0.5428]}, {"w": "to", "b": [0.7, 0.5278, 0.7165, 0.5428]}, {"w": "assess", "b": [0.7227, 0.5278, 0.7696, 0.5428]}, {"w": "the", "b": [0.7757, 0.5278, 0.8015, 0.5428]}, {"w": "model’s", "b": [0.8077, 0.5278, 0.8692, 0.5428]}, {"w": "performance", "b": [0.1312, 0.5457, 0.2308, 0.5607]}, {"w": "and", "b": [0.237, 0.5457, 0.2667, 0.5607]}, {"w": "report", "b": [0.2728, 0.5457, 0.3227, 0.5607]}, {"w": "it", "b": [0.3288, 0.5457, 0.3411, 0.5607]}, {"w": "to", "b": [0.3473, 0.5457, 0.3637, 0.5607]}, {"w": "the", "b": [0.3699, 0.5457, 0.3955, 0.5607]}, {"w": "client", "b": [0.4016, 0.5457, 0.4452, 0.5607]}, {"w": "or", "b": [0.4514, 0.5457, 0.4678, 0.5607]}, {"w": "product", "b": [0.474, 0.5457, 0.5371, 0.5607]}, {"w": "owner.", "b": [0.5433, 0.5457, 0.5961, 0.5607]}]}, {"id": "b_8", "type": "paragraph", "text": "A shallow learning algorithm trains a model that makes predictions directly from the input features. A deep learning algorithm trains a layered model, in which each layer generates outputs by taking the outputs of the preceding layer as inputs.", "words": [{"w": "A", "b": [0.1305, 0.5727, 0.1444, 0.5876]}, {"w": "shallow", "b": [0.1505, 0.5727, 0.2096, 0.5876]}, {"w": "learning", "b": [0.2158, 0.5727, 0.2805, 0.5876]}, {"w": "algorithm", "b": [0.2867, 0.5727, 0.3647, 0.5876]}, {"w": "trains", "b": [0.3708, 0.5727, 0.4172, 0.5876]}, {"w": "a", "b": [0.4233, 0.5727, 0.4326, 0.5876]}, {"w": "model", "b": [0.4387, 0.5727, 0.4875, 0.5876]}, {"w": "that", "b": [0.4936, 0.5727, 0.5275, 0.5876]}, {"w": "makes", "b": [0.5336, 0.5727, 0.583, 0.5876]}, {"w": "predictions", "b": [0.5891, 0.5727, 0.6776, 0.5876]}, {"w": "directly", "b": [0.6837, 0.5727, 0.7448, 0.5876]}, {"w": "from", "b": [0.751, 0.5727, 0.7885, 0.5876]}, {"w": "the", "b": [0.7946, 0.5727, 0.8203, 0.5876]}, {"w": "input", "b": [0.8265, 0.5727, 0.8696, 0.5876]}, {"w": "features.", "b": [0.1312, 0.5906, 0.201, 0.6056]}, {"w": "A", "b": [0.21, 0.5906, 0.2241, 0.6056]}, {"w": "deep", "b": [0.2305, 0.5906, 0.2682, 0.6056]}, {"w": "learning", "b": [0.2746, 0.5906, 0.3405, 0.6056]}, {"w": "algorithm", "b": [0.3469, 0.5906, 0.4265, 0.6056]}, {"w": "trains", "b": [0.4329, 0.5906, 0.4801, 0.6056]}, {"w": "a", "b": [0.4865, 0.5906, 0.4959, 0.6056]}, {"w": "layered", "b": [0.5023, 0.5906, 0.5605, 0.6056]}, {"w": "model,", "b": [0.5669, 0.5906, 0.6218, 0.6056]}, {"w": "in", "b": [0.6283, 0.5906, 0.644, 0.6056]}, {"w": "which", "b": [0.6504, 0.5906, 0.698, 0.6056]}, {"w": "each", "b": [0.7044, 0.5906, 0.7405, 0.6056]}, {"w": "layer", "b": [0.7469, 0.5906, 0.7862, 0.6056]}, {"w": "generates", "b": [0.7926, 0.5906, 0.8691, 0.6056]}, {"w": "outputs", "b": [0.1312, 0.6086, 0.1929, 0.6235]}, {"w": "by", "b": [0.199, 0.6086, 0.2185, 0.6235]}, {"w": "taking", "b": [0.2247, 0.6086, 0.2754, 0.6235]}, {"w": "the", "b": [0.2816, 0.6086, 0.3072, 0.6235]}, {"w": "outputs", "b": [0.3133, 0.6086, 0.375, 0.6235]}, {"w": "of", "b": [0.3811, 0.6086, 0.396, 0.6235]}, {"w": "the", "b": [0.4022, 0.6086, 0.4278, 0.6235]}, {"w": "preceding", "b": [0.4339, 0.6086, 0.5109, 0.6235]}, {"w": "layer", "b": [0.5171, 0.6086, 0.5556, 0.6235]}, {"w": "as", "b": [0.5617, 0.6086, 0.5783, 0.6235]}, {"w": "inputs.", "b": [0.5844, 0.6086, 0.6399, 0.6235]}]}, {"id": "b_9", "type": "paragraph", "text": "You should consider using machine learning to solve a business problem when the problem is too complex for coding, the problem is constantly changing, it is a perceptive problem, it is an unstudied phenomenon, the problem has a simple objective, and it is cost-effective.", "words": [{"w": "You", "b": [0.1305, 0.6355, 0.1617, 0.6504]}, {"w": "should", "b": [0.1678, 0.6355, 0.2193, 0.6504]}, {"w": "consider", "b": [0.2254, 0.6355, 0.29, 0.6504]}, {"w": "using", "b": [0.2961, 0.6355, 0.3375, 0.6504]}, {"w": "machine", "b": [0.3436, 0.6355, 0.4085, 0.6504]}, {"w": "learning", "b": [0.4147, 0.6355, 0.4781, 0.6504]}, {"w": "to", "b": [0.4843, 0.6355, 0.5003, 0.6504]}, {"w": "solve", "b": [0.5065, 0.6355, 0.5448, 0.6504]}, {"w": "a", "b": [0.551, 0.6355, 0.56, 0.6504]}, {"w": "business", "b": [0.5662, 0.6355, 0.6309, 0.6504]}, {"w": "problem", "b": [0.6371, 0.6355, 0.7015, 0.6504]}, {"w": "when", "b": [0.7077, 0.6355, 0.7489, 0.6504]}, {"w": "the", "b": [0.7551, 0.6355, 0.7802, 0.6504]}, {"w": "problem", "b": [0.7864, 0.6355, 0.8508, 0.6504]}, {"w": "is", "b": [0.857, 0.6355, 0.8691, 0.6504]}, {"w": "too", "b": [0.1312, 0.6534, 0.1573, 0.6684]}, {"w": "complex", "b": [0.1634, 0.6534, 0.2294, 0.6684]}, {"w": "for", "b": [0.2355, 0.6534, 0.2575, 0.6684]}, {"w": "coding,", "b": [0.2637, 0.6534, 0.3215, 0.6684]}, {"w": "the", "b": [0.3276, 0.6534, 0.3532, 0.6684]}, {"w": "problem", "b": [0.3593, 0.6534, 0.4248, 0.6684]}, {"w": "is", "b": [0.4309, 0.6534, 0.4433, 0.6684]}, {"w": "constantly", "b": [0.4494, 0.6534, 0.5324, 0.6684]}, {"w": "changing,", "b": [0.5385, 0.6534, 0.6147, 0.6684]}, {"w": "it", "b": [0.6208, 0.6534, 0.6331, 0.6684]}, {"w": "is", "b": [0.6392, 0.6534, 0.6516, 0.6684]}, {"w": "a", "b": [0.6577, 0.6534, 0.6669, 0.6684]}, {"w": "perceptive", "b": [0.6731, 0.6534, 0.7554, 0.6684]}, {"w": "problem,", "b": [0.7616, 0.6534, 0.8322, 0.6684]}, {"w": "it", "b": [0.8383, 0.6534, 0.8506, 0.6684]}, {"w": "is", "b": [0.8567, 0.6534, 0.8691, 0.6684]}, {"w": "an", "b": [0.1312, 0.6714, 0.1507, 0.6863]}, {"w": "unstudied", "b": [0.1569, 0.6714, 0.236, 0.6863]}, {"w": "phenomenon,", "b": [0.2421, 0.6714, 0.3487, 0.6863]}, {"w": "the", "b": [0.3549, 0.6714, 0.3805, 0.6863]}, {"w": "problem", "b": [0.3867, 0.6714, 0.4524, 0.6863]}, {"w": "has", "b": [0.4585, 0.6714, 0.4853, 0.6863]}, {"w": "a", "b": [0.4914, 0.6714, 0.5007, 0.6863]}, {"w": "simple", "b": [0.5068, 0.6714, 0.5582, 0.6863]}, {"w": "objective,", "b": [0.5643, 0.6714, 0.6413, 0.6863]}, {"w": "and", "b": [0.6474, 0.6714, 0.6771, 0.6863]}, {"w": "it", "b": [0.6833, 0.6714, 0.6956, 0.6863]}, {"w": "is", "b": [0.7018, 0.6714, 0.7142, 0.6863]}, {"w": "cost-effective.", "b": [0.7203, 0.6714, 0.8286, 0.6863]}]}, {"id": "b_10", "type": "paragraph", "text": "There are many situations when machine learning should, probably, not be used: when explainability is needed, when errors are intolerable, when traditional software engineering is a less expensive option, when all inputs and outputs can be enumerated and saved in a database, and when data is hard to get or too expensive.", "words": [{"w": "There", "b": [0.1306, 0.6983, 0.1787, 0.7132]}, {"w": "are", "b": [0.1865, 0.6983, 0.2117, 0.7132]}, {"w": "many", "b": [0.2194, 0.6983, 0.2644, 0.7132]}, {"w": "situations", "b": [0.2722, 0.6983, 0.3519, 0.7132]}, {"w": "when", "b": [0.3597, 0.6983, 0.4025, 0.7132]}, {"w": "machine", "b": [0.4103, 0.6983, 0.4778, 0.7132]}, {"w": "learning", "b": [0.4856, 0.6983, 0.5515, 0.7132]}, {"w": "should,", "b": [0.5593, 0.6983, 0.618, 0.7132]}, {"w": "probably,", "b": [0.6261, 0.6983, 0.7026, 0.7132]}, {"w": "not", "b": [0.7108, 0.6983, 0.7379, 0.7132]}, {"w": "be", "b": [0.7457, 0.6983, 0.7651, 0.7132]}, {"w": "used:", "b": [0.7728, 0.6983, 0.8148, 0.7132]}, {"w": "when", "b": [0.8262, 0.6983, 0.8691, 0.7132]}, {"w": "explainability", "b": [0.1312, 0.7162, 0.2415, 0.7312]}, {"w": "is", "b": [0.2477, 0.7162, 0.2602, 0.7312]}, {"w": "needed,", "b": [0.2663, 0.7162, 0.3275, 0.7312]}, {"w": "when", "b": [0.3336, 0.7162, 0.3761, 0.7312]}, {"w": "errors", "b": [0.3822, 0.7162, 0.4291, 0.7312]}, {"w": "are", "b": [0.4352, 0.7162, 0.4601, 0.7312]}, {"w": "intolerable,", "b": [0.4663, 0.7162, 0.557, 0.7312]}, {"w": "when", "b": [0.5631, 0.7162, 0.6056, 0.7312]}, {"w": "traditional", "b": [0.6117, 0.7162, 0.6977, 0.7312]}, {"w": "software", "b": [0.7038, 0.7162, 0.7708, 0.7312]}, {"w": "engineering", "b": [0.7769, 0.7162, 0.8692, 0.7312]}, {"w": "is", "b": [0.1312, 0.7342, 0.1439, 0.7491]}, {"w": "a", "b": [0.1502, 0.7342, 0.1596, 0.7491]}, {"w": "less", "b": [0.1659, 0.7342, 0.1943, 0.7491]}, {"w": "expensive", "b": [0.2006, 0.7342, 0.2792, 0.7491]}, {"w": "option,", "b": [0.2855, 0.7342, 0.343, 0.7491]}, {"w": "when", "b": [0.3493, 0.7342, 0.3922, 0.7491]}, {"w": "all", "b": [0.3985, 0.7342, 0.4184, 0.7491]}, {"w": "inputs", "b": [0.4246, 0.7342, 0.476, 0.7491]}, {"w": "and", "b": [0.4823, 0.7342, 0.5126, 0.7491]}, {"w": "outputs", "b": [0.5189, 0.7342, 0.5818, 0.7491]}, {"w": "can", "b": [0.5881, 0.7342, 0.6163, 0.7491]}, {"w": "be", "b": [0.6226, 0.7342, 0.6419, 0.7491]}, {"w": "enumerated", "b": [0.6482, 0.7342, 0.744, 0.7491]}, {"w": "and", "b": [0.7503, 0.7342, 0.7806, 0.7491]}, {"w": "saved", "b": [0.7869, 0.7342, 0.8315, 0.7491]}, {"w": "in", "b": [0.8378, 0.7342, 0.8535, 0.7491]}, {"w": "a", "b": [0.8597, 0.7342, 0.8692, 0.7491]}, {"w": "database,", "b": [0.1312, 0.7521, 0.2072, 0.7671]}, {"w": "and", "b": [0.2134, 0.7521, 0.2431, 0.7671]}, {"w": "when", "b": [0.2493, 0.7521, 0.2913, 0.7671]}, {"w": "data", "b": [0.2975, 0.7521, 0.3333, 0.7671]}, {"w": "is", "b": [0.3395, 0.7521, 0.3519, 0.7671]}, {"w": "hard", "b": [0.358, 0.7521, 0.395, 0.7671]}, {"w": "to", "b": [0.4012, 0.7521, 0.4176, 0.7671]}, {"w": "get", "b": [0.4237, 0.7521, 0.4483, 0.7671]}, {"w": "or", "b": [0.4545, 0.7521, 0.4709, 0.7671]}, {"w": "too", "b": [0.4771, 0.7521, 0.5032, 0.7671]}, {"w": "expensive.", "b": [0.5094, 0.7521, 0.5915, 0.7671]}]}, {"id": "b_11", "type": "paragraph", "text": "Machine learning engineering (MLE) is the use of scientific principles, tools, and techniques of machine learning and traditional software engineering to design and build complex computing systems. MLE encompasses all stages from data collection, to model training, to making the model available for use by the product or the consumers.", "words": [{"w": "Machine", "b": [0.1312, 0.7791, 0.1976, 0.794]}, {"w": "learning", "b": [0.2029, 0.7791, 0.2663, 0.794]}, {"w": "engineering", "b": [0.2716, 0.7791, 0.3611, 0.794]}, {"w": "(MLE)", "b": [0.3665, 0.7791, 0.4207, 0.794]}, {"w": "is", "b": [0.4261, 0.7791, 0.4383, 0.794]}, {"w": "the", "b": [0.4436, 0.7791, 0.4687, 0.794]}, {"w": "use", "b": [0.4741, 0.7791, 0.4993, 0.794]}, {"w": "of", "b": [0.5047, 0.7791, 0.5192, 0.794]}, {"w": "scientific", "b": [0.5246, 0.7791, 0.5925, 0.794]}, {"w": "principles,", "b": [0.5979, 0.7791, 0.6785, 0.794]}, {"w": "tools,", "b": [0.684, 0.7791, 0.7268, 0.794]}, {"w": "and", "b": [0.7323, 0.7791, 0.7614, 0.794]}, {"w": "techniques", "b": [0.7668, 0.7791, 0.8493, 0.794]}, {"w": "of", "b": [0.8546, 0.7791, 0.8692, 0.794]}, {"w": "machine", "b": [0.1312, 0.797, 0.196, 0.812]}, {"w": "learning", "b": [0.2015, 0.797, 0.2648, 0.812]}, {"w": "and", "b": [0.2703, 0.797, 0.2994, 0.812]}, {"w": "traditional", "b": [0.3048, 0.797, 0.3883, 0.812]}, {"w": "software", "b": [0.3937, 0.797, 0.4586, 0.812]}, {"w": "engineering", "b": [0.4641, 0.797, 0.5536, 0.812]}, {"w": "to", "b": [0.559, 0.797, 0.5751, 0.812]}, {"w": "design", "b": [0.5805, 0.797, 0.6299, 0.812]}, {"w": "and", "b": [0.6353, 0.797, 0.6644, 0.812]}, {"w": "build", "b": [0.6698, 0.797, 0.7101, 0.812]}, {"w": "complex", "b": [0.7155, 0.797, 0.7803, 0.812]}, {"w": "computing", "b": [0.7857, 0.797, 0.8691, 0.812]}, {"w": "systems.", "b": [0.1312, 0.8149, 0.1976, 0.8299]}, {"w": "MLE", "b": [0.2058, 0.8149, 0.2462, 0.8299]}, {"w": "encompasses", "b": [0.2524, 0.8149, 0.3516, 0.8299]}, {"w": "all", "b": [0.3577, 0.8149, 0.3769, 0.8299]}, {"w": "stages", "b": [0.383, 0.8149, 0.4307, 0.8299]}, {"w": "from", "b": [0.4368, 0.8149, 0.4737, 0.8299]}, {"w": "data", "b": [0.4798, 0.8149, 0.5152, 0.8299]}, {"w": "collection,", "b": [0.5213, 0.8149, 0.601, 0.8299]}, {"w": "to", "b": [0.6072, 0.8149, 0.6233, 0.8299]}, {"w": "model", "b": [0.6295, 0.8149, 0.6774, 0.8299]}, {"w": "training,", "b": [0.6836, 0.8149, 0.7512, 0.8299]}, {"w": "to", "b": [0.7574, 0.8149, 0.7735, 0.8299]}, {"w": "making", "b": [0.7797, 0.8149, 0.8377, 0.8299]}, {"w": "the", "b": [0.8438, 0.8149, 0.8691, 0.8299]}, {"w": "model", "b": [0.1312, 0.8329, 0.1799, 0.8478]}, {"w": "available", "b": [0.1861, 0.8329, 0.2558, 0.8478]}, {"w": "for", "b": [0.262, 0.8329, 0.2841, 0.8478]}, {"w": "use", "b": [0.2902, 0.8329, 0.316, 0.8478]}, {"w": "by", "b": [0.3221, 0.8329, 0.3416, 0.8478]}, {"w": "the", "b": [0.3478, 0.8329, 0.3734, 0.8478]}, {"w": "product", "b": [0.3795, 0.8329, 0.4427, 0.8478]}, {"w": "or", "b": [0.4488, 0.8329, 0.4653, 0.8478]}, {"w": "the", "b": [0.4714, 0.8329, 0.4971, 0.8478]}, {"w": "consumers.", "b": [0.5032, 0.8329, 0.5917, 0.8478]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 20", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "20", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 29, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "A machine learning project life cycle consists of the following stages: 1) goal definition, 2) data collection and preparation, 3) feature engineering, 4) model training, 5) model evaluation, 6) model deployment, 7) model serving, 8) model monitoring, and 9) model maintenance.", "words": [{"w": "A", "b": [0.1305, 0.0881, 0.1441, 0.1031]}, {"w": "machine", "b": [0.149, 0.0881, 0.2138, 0.1031]}, {"w": "learning", "b": [0.2188, 0.0881, 0.2822, 0.1031]}, {"w": "project", "b": [0.2871, 0.0881, 0.3425, 0.1031]}, {"w": "life", "b": [0.3474, 0.0881, 0.3711, 0.1031]}, {"w": "cycle", "b": [0.376, 0.0881, 0.4147, 0.1031]}, {"w": "consists", "b": [0.4197, 0.0881, 0.4803, 0.1031]}, {"w": "of", "b": [0.4853, 0.0881, 0.4998, 0.1031]}, {"w": "the", "b": [0.5048, 0.0881, 0.5299, 0.1031]}, {"w": "following", "b": [0.5349, 0.0881, 0.6052, 0.1031]}, {"w": "stages:", "b": [0.6101, 0.0881, 0.6626, 0.1031]}, {"w": "1)", "b": [0.6702, 0.0881, 0.6863, 0.1031]}, {"w": "goal", "b": [0.6912, 0.0881, 0.7234, 0.1031]}, {"w": "definition,", "b": [0.7283, 0.0881, 0.8077, 0.1031]}, {"w": "2)", "b": [0.8129, 0.0881, 0.829, 0.1031]}, {"w": "data", "b": [0.834, 0.0881, 0.8691, 0.1031]}, {"w": "collection", "b": [0.1312, 0.106, 0.2087, 0.121]}, {"w": "and", "b": [0.2148, 0.106, 0.2451, 0.121]}, {"w": "preparation,", "b": [0.2513, 0.106, 0.3518, 0.121]}, {"w": "3)", "b": [0.3579, 0.106, 0.3747, 0.121]}, {"w": "feature", "b": [0.3808, 0.106, 0.4379, 0.121]}, {"w": "engineering,", "b": [0.444, 0.106, 0.5424, 0.121]}, {"w": "4)", "b": [0.5486, 0.106, 0.5653, 0.121]}, {"w": "model", "b": [0.5714, 0.106, 0.6211, 0.121]}, {"w": "training,", "b": [0.6273, 0.106, 0.6974, 0.121]}, {"w": "5)", "b": [0.7035, 0.106, 0.7203, 0.121]}, {"w": "model", "b": [0.7264, 0.106, 0.7761, 0.121]}, {"w": "evaluation,", "b": [0.7822, 0.106, 0.8717, 0.121]}, {"w": "6)", "b": [0.1312, 0.124, 0.1476, 0.1389]}, {"w": "model", "b": [0.1538, 0.124, 0.2025, 0.1389]}, {"w": "deployment,", "b": [0.2086, 0.124, 0.3066, 0.1389]}, {"w": "7)", "b": [0.3127, 0.124, 0.3291, 0.1389]}, {"w": "model", "b": [0.3353, 0.124, 0.384, 0.1389]}, {"w": "serving,", "b": [0.3901, 0.124, 0.4523, 0.1389]}, {"w": "8)", "b": [0.4585, 0.124, 0.4749, 0.1389]}, {"w": "model", "b": [0.481, 0.124, 0.5297, 0.1389]}, {"w": "monitoring,", "b": [0.5359, 0.124, 0.6292, 0.1389]}, {"w": "and", "b": [0.6354, 0.124, 0.6651, 0.1389]}, {"w": "9)", "b": [0.6713, 0.124, 0.6877, 0.1389]}, {"w": "model", "b": [0.6938, 0.124, 0.7425, 0.1389]}, {"w": "maintenance.", "b": [0.7487, 0.124, 0.8548, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "Every stage will be considered in one of the book’s chapters.", "words": [{"w": "Every", "b": [0.1312, 0.1509, 0.1782, 0.1659]}, {"w": "stage", "b": [0.1843, 0.1509, 0.2255, 0.1659]}, {"w": "will", "b": [0.2316, 0.1509, 0.2603, 0.1659]}, {"w": "be", "b": [0.2665, 0.1509, 0.2855, 0.1659]}, {"w": "considered", "b": [0.2916, 0.1509, 0.3759, 0.1659]}, {"w": "in", "b": [0.382, 0.1509, 0.3974, 0.1659]}, {"w": "one", "b": [0.4036, 0.1509, 0.4313, 0.1659]}, {"w": "of", "b": [0.4374, 0.1509, 0.4523, 0.1659]}, {"w": "the", "b": [0.4584, 0.1509, 0.4841, 0.1659]}, {"w": "book’s", "b": [0.4902, 0.1509, 0.5421, 0.1659]}, {"w": "chapters.", "b": [0.5483, 0.1509, 0.6207, 0.1659]}]}, {"id": "b_2", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 21", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "21", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 30, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 31, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 32, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2 Before the Project Starts", "words": [{"w": "2", "b": [0.1312, 0.0833, 0.1462, 0.1048]}, {"w": "Before", "b": [0.1761, 0.0833, 0.2609, 0.1048]}, {"w": "the", "b": [0.2709, 0.0833, 0.3127, 0.1048]}, {"w": "Project", "b": [0.3227, 0.0833, 0.4188, 0.1048]}, {"w": "Starts", "b": [0.4288, 0.0833, 0.5072, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "Before a machine learning project starts, it must be prioritized. Prioritization is inevitable: the team and equipment capacity is limited, while the organization’s backlog of projects could be very long.", "words": [{"w": "Before", "b": [0.1312, 0.1301, 0.183, 0.1451]}, {"w": "a", "b": [0.1892, 0.1301, 0.1985, 0.1451]}, {"w": "machine", "b": [0.2046, 0.1301, 0.271, 0.1451]}, {"w": "learning", "b": [0.2772, 0.1301, 0.3421, 0.1451]}, {"w": "project", "b": [0.3483, 0.1301, 0.4049, 0.1451]}, {"w": "starts,", "b": [0.4111, 0.1301, 0.4618, 0.1451]}, {"w": "it", "b": [0.468, 0.1301, 0.4804, 0.1451]}, {"w": "must", "b": [0.4865, 0.1301, 0.5263, 0.1451]}, {"w": "be", "b": [0.5324, 0.1301, 0.5515, 0.1451]}, {"w": "prioritized.", "b": [0.5576, 0.1301, 0.6463, 0.1451]}, {"w": "Prioritization", "b": [0.6545, 0.1301, 0.763, 0.1451]}, {"w": "is", "b": [0.7692, 0.1301, 0.7816, 0.1451]}, {"w": "inevitable:", "b": [0.7878, 0.1301, 0.8717, 0.1451]}, {"w": "the", "b": [0.1312, 0.148, 0.1574, 0.1631]}, {"w": "team", "b": [0.1646, 0.148, 0.2053, 0.1631]}, {"w": "and", "b": [0.2125, 0.148, 0.2428, 0.1631]}, {"w": "equipment", "b": [0.25, 0.148, 0.3358, 0.1631]}, {"w": "capacity", "b": [0.343, 0.148, 0.411, 0.1631]}, {"w": "is", "b": [0.4181, 0.148, 0.4308, 0.1631]}, {"w": "limited,", "b": [0.438, 0.148, 0.5007, 0.1631]}, {"w": "while", "b": [0.5081, 0.148, 0.551, 0.1631]}, {"w": "the", "b": [0.5582, 0.148, 0.5844, 0.1631]}, {"w": "organization’s", "b": [0.5915, 0.148, 0.7057, 0.1631]}, {"w": "backlog", "b": [0.7129, 0.148, 0.7746, 0.1631]}, {"w": "of", "b": [0.7817, 0.148, 0.7969, 0.1631]}, {"w": "projects", "b": [0.8041, 0.148, 0.8691, 0.1631]}, {"w": "could", "b": [0.1312, 0.166, 0.1743, 0.181]}, {"w": "be", "b": [0.1805, 0.166, 0.1994, 0.181]}, {"w": "very", "b": [0.2056, 0.166, 0.24, 0.181]}, {"w": "long.", "b": [0.2462, 0.166, 0.2851, 0.181]}]}, {"id": "b_2", "type": "paragraph", "text": "To prioritize a project, one has to estimate its complexity. With machine learning, accurate complexity estimation is rarely possible because of major unknowns, such as whether the required model quality is attainable in practice, how much data is needed, and what, and how many features are necessary.", "words": [{"w": "To", "b": [0.1306, 0.193, 0.1515, 0.2079]}, {"w": "prioritize", "b": [0.1576, 0.193, 0.2303, 0.2079]}, {"w": "a", "b": [0.2364, 0.193, 0.2456, 0.2079]}, {"w": "project,", "b": [0.2517, 0.193, 0.313, 0.2079]}, {"w": "one", "b": [0.3192, 0.193, 0.3468, 0.2079]}, {"w": "has", "b": [0.3529, 0.193, 0.3795, 0.2079]}, {"w": "to", "b": [0.3857, 0.193, 0.402, 0.2079]}, {"w": "estimate", "b": [0.4081, 0.193, 0.4756, 0.2079]}, {"w": "its", "b": [0.4818, 0.193, 0.5013, 0.2079]}, {"w": "complexity.", "b": [0.5074, 0.193, 0.5983, 0.2079]}, {"w": "With", "b": [0.6065, 0.193, 0.6479, 0.2079]}, {"w": "machine", "b": [0.654, 0.193, 0.7199, 0.2079]}, {"w": "learning,", "b": [0.726, 0.193, 0.7955, 0.2079]}, {"w": "accurate", "b": [0.8016, 0.193, 0.8691, 0.2079]}, {"w": "complexity", "b": [0.1312, 0.2108, 0.2207, 0.2259]}, {"w": "estimation", "b": [0.2272, 0.2108, 0.3131, 0.2259]}, {"w": "is", "b": [0.3197, 0.2108, 0.3323, 0.2259]}, {"w": "rarely", "b": [0.3389, 0.2108, 0.3866, 0.2259]}, {"w": "possible", "b": [0.3932, 0.2108, 0.4577, 0.2259]}, {"w": "because", "b": [0.4643, 0.2108, 0.5277, 0.2259]}, {"w": "of", "b": [0.5342, 0.2108, 0.5494, 0.2259]}, {"w": "major", "b": [0.556, 0.2108, 0.6041, 0.2259]}, {"w": "unknowns,", "b": [0.6107, 0.2108, 0.6976, 0.2259]}, {"w": "such", "b": [0.7043, 0.2108, 0.7405, 0.2259]}, {"w": "as", "b": [0.7471, 0.2108, 0.7639, 0.2259]}, {"w": "whether", "b": [0.7705, 0.2108, 0.8364, 0.2259]}, {"w": "the", "b": [0.843, 0.2108, 0.8691, 0.2259]}, {"w": "required", "b": [0.1312, 0.2287, 0.1988, 0.2438]}, {"w": "model", "b": [0.2051, 0.2287, 0.2548, 0.2438]}, {"w": "quality", "b": [0.261, 0.2287, 0.318, 0.2438]}, {"w": "is", "b": [0.3243, 0.2287, 0.337, 0.2438]}, {"w": "attainable", "b": [0.3433, 0.2287, 0.4259, 0.2438]}, {"w": "in", "b": [0.4322, 0.2287, 0.4479, 0.2438]}, {"w": "practice,", "b": [0.4541, 0.2287, 0.5243, 0.2438]}, {"w": "how", "b": [0.5306, 0.2287, 0.5635, 0.2438]}, {"w": "much", "b": [0.5698, 0.2287, 0.6137, 0.2438]}, {"w": "data", "b": [0.62, 0.2287, 0.6566, 0.2438]}, {"w": "is", "b": [0.6629, 0.2287, 0.6756, 0.2438]}, {"w": "needed,", "b": [0.6818, 0.2287, 0.7436, 0.2438]}, {"w": "and", "b": [0.7499, 0.2287, 0.7802, 0.2438]}, {"w": "what,", "b": [0.7865, 0.2287, 0.8325, 0.2438]}, {"w": "and", "b": [0.8388, 0.2287, 0.8691, 0.2438]}, {"w": "how", "b": [0.1312, 0.2468, 0.1635, 0.2617]}, {"w": "many", "b": [0.1697, 0.2468, 0.2138, 0.2617]}, {"w": "features", "b": [0.2199, 0.2468, 0.2831, 0.2617]}, {"w": "are", "b": [0.2893, 0.2468, 0.314, 0.2617]}, {"w": "necessary.", "b": [0.3201, 0.2468, 0.3994, 0.2617]}]}, {"id": "b_3", "type": "paragraph", "text": "Furthermore, a machine learning project must have a well-defined goal. Based on the goal of the project, the team could be adequately adjusted and resources provisioned.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.2738, 0.2353, 0.2886]}, {"w": "a", "b": [0.2415, 0.2738, 0.2506, 0.2886]}, {"w": "machine", "b": [0.2567, 0.2738, 0.3217, 0.2886]}, {"w": "learning", "b": [0.3278, 0.2738, 0.3913, 0.2886]}, {"w": "project", "b": [0.3975, 0.2738, 0.453, 0.2886]}, {"w": "must", "b": [0.4591, 0.2738, 0.498, 0.2886]}, {"w": "have", "b": [0.5042, 0.2738, 0.5399, 0.2886]}, {"w": "a", "b": [0.5461, 0.2738, 0.5551, 0.2886]}, {"w": "well-defined", "b": [0.5613, 0.2738, 0.6544, 0.2886]}, {"w": "goal.", "b": [0.6606, 0.2738, 0.6978, 0.2886]}, {"w": "Based", "b": [0.7061, 0.2738, 0.7533, 0.2886]}, {"w": "on", "b": [0.7594, 0.2738, 0.7786, 0.2886]}, {"w": "the", "b": [0.7847, 0.2738, 0.8099, 0.2886]}, {"w": "goal", "b": [0.8161, 0.2738, 0.8483, 0.2886]}, {"w": "of", "b": [0.8545, 0.2738, 0.8691, 0.2886]}, {"w": "the", "b": [0.1312, 0.2916, 0.1569, 0.3066]}, {"w": "project,", "b": [0.163, 0.2916, 0.2246, 0.3066]}, {"w": "the", "b": [0.2308, 0.2916, 0.2564, 0.3066]}, {"w": "team", "b": [0.2626, 0.2916, 0.3025, 0.3066]}, {"w": "could", "b": [0.3087, 0.2916, 0.3518, 0.3066]}, {"w": "be", "b": [0.3579, 0.2916, 0.3769, 0.3066]}, {"w": "adequately", "b": [0.383, 0.2916, 0.4702, 0.3066]}, {"w": "adjusted", "b": [0.4764, 0.2916, 0.5447, 0.3066]}, {"w": "and", "b": [0.5508, 0.2916, 0.5806, 0.3066]}, {"w": "resources", "b": [0.5867, 0.2916, 0.6599, 0.3066]}, {"w": "provisioned.", "b": [0.666, 0.2916, 0.7626, 0.3066]}]}, {"id": "b_4", "type": "paragraph", "text": "In this chapter, we consider these and related activities that must be taken care of before a machine learning project starts.", "words": [{"w": "In", "b": [0.1312, 0.3186, 0.1481, 0.3335]}, {"w": "this", "b": [0.1543, 0.3186, 0.1841, 0.3335]}, {"w": "chapter,", "b": [0.1902, 0.3186, 0.2554, 0.3335]}, {"w": "we", "b": [0.2615, 0.3186, 0.2825, 0.3335]}, {"w": "consider", "b": [0.2887, 0.3186, 0.3544, 0.3335]}, {"w": "these", "b": [0.3605, 0.3186, 0.4016, 0.3335]}, {"w": "and", "b": [0.4078, 0.3186, 0.4375, 0.3335]}, {"w": "related", "b": [0.4436, 0.3186, 0.499, 0.3335]}, {"w": "activities", "b": [0.5052, 0.3186, 0.5775, 0.3335]}, {"w": "that", "b": [0.5836, 0.3186, 0.6174, 0.3335]}, {"w": "must", "b": [0.6236, 0.3186, 0.6631, 0.3335]}, {"w": "be", "b": [0.6693, 0.3186, 0.6882, 0.3335]}, {"w": "taken", "b": [0.6944, 0.3186, 0.7384, 0.3335]}, {"w": "care", "b": [0.7446, 0.3186, 0.7774, 0.3335]}, {"w": "of", "b": [0.7836, 0.3186, 0.7984, 0.3335]}, {"w": "before", "b": [0.8046, 0.3186, 0.8538, 0.3335]}, {"w": "a", "b": [0.86, 0.3186, 0.8692, 0.3335]}, {"w": "machine", "b": [0.1312, 0.3365, 0.1974, 0.3515]}, {"w": "learning", "b": [0.2035, 0.3365, 0.2682, 0.3515]}, {"w": "project", "b": [0.2743, 0.3365, 0.3308, 0.3515]}, {"w": "starts.", "b": [0.3369, 0.3365, 0.3875, 0.3515]}]}, {"id": "b_5", "type": "paragraph", "text": "2.1 Prioritization of Machine Learning Projects", "words": [{"w": "2.1", "b": [0.1312, 0.385, 0.1631, 0.403]}, {"w": "Prioritization", "b": [0.188, 0.385, 0.3344, 0.403]}, {"w": "of", "b": [0.3428, 0.385, 0.3628, 0.403]}, {"w": "Machine", "b": [0.3711, 0.385, 0.4632, 0.403]}, {"w": "Learning", "b": [0.4715, 0.385, 0.5672, 0.403]}, {"w": "Projects", "b": [0.5755, 0.385, 0.6654, 0.403]}]}, {"id": "b_6", "type": "paragraph", "text": "The key considerations in the prioritization of a machine learning project, are impact and cost.", "words": [{"w": "The", "b": [0.1306, 0.424, 0.1617, 0.4389]}, {"w": "key", "b": [0.1669, 0.424, 0.1935, 0.4389]}, {"w": "considerations", "b": [0.1987, 0.424, 0.3105, 0.4389]}, {"w": "in", "b": [0.3157, 0.424, 0.3308, 0.4389]}, {"w": "the", "b": [0.336, 0.424, 0.3611, 0.4389]}, {"w": "prioritization", "b": [0.3663, 0.424, 0.4699, 0.4389]}, {"w": "of", "b": [0.4751, 0.424, 0.4896, 0.4389]}, {"w": "a", "b": [0.4948, 0.424, 0.5039, 0.4389]}, {"w": "machine", "b": [0.509, 0.424, 0.5738, 0.4389]}, {"w": "learning", "b": [0.579, 0.424, 0.6424, 0.4389]}, {"w": "project,", "b": [0.6476, 0.424, 0.7079, 0.4389]}, {"w": "are", "b": [0.7133, 0.424, 0.7375, 0.4389]}, {"w": "impact", "b": [0.7427, 0.424, 0.7969, 0.4389]}, {"w": "and", "b": [0.8021, 0.424, 0.8313, 0.4389]}, {"w": "cost.", "b": [0.8364, 0.424, 0.8727, 0.4389]}]}, {"id": "b_7", "type": "paragraph", "text": "2.1.1 Impact of Machine Learning", "words": [{"w": "2.1.1", "b": [0.1312, 0.4717, 0.1749, 0.4867]}, {"w": "Impact", "b": [0.1961, 0.4717, 0.2616, 0.4867]}, {"w": "of", "b": [0.2686, 0.4717, 0.2857, 0.4867]}, {"w": "Machine", "b": [0.2928, 0.4717, 0.3713, 0.4867]}, {"w": "Learning", "b": [0.3784, 0.4717, 0.46, 0.4867]}]}, {"id": "b_8", "type": "paragraph", "text": "The impact of using machine learning in a broader engineering project is high when, 1) machine learning can replace a complex part in your engineering project or 2) there’s a great benefit in getting inexpensive (but probably imperfect) predictions.", "words": [{"w": "The", "b": [0.1306, 0.5085, 0.1617, 0.5233]}, {"w": "impact", "b": [0.1661, 0.5085, 0.2204, 0.5233]}, {"w": "of", "b": [0.2248, 0.5085, 0.2393, 0.5233]}, {"w": "using", "b": [0.2437, 0.5085, 0.285, 0.5233]}, {"w": "machine", "b": [0.2894, 0.5085, 0.3542, 0.5233]}, {"w": "learning", "b": [0.3586, 0.5085, 0.422, 0.5233]}, {"w": "in", "b": [0.4264, 0.5085, 0.4415, 0.5233]}, {"w": "a", "b": [0.4459, 0.5085, 0.4549, 0.5233]}, {"w": "broader", "b": [0.4593, 0.5085, 0.5197, 0.5233]}, {"w": "engineering", "b": [0.5241, 0.5085, 0.6136, 0.5233]}, {"w": "project", "b": [0.618, 0.5085, 0.6734, 0.5233]}, {"w": "is", "b": [0.6778, 0.5085, 0.6899, 0.5233]}, {"w": "high", "b": [0.6943, 0.5085, 0.7285, 0.5233]}, {"w": "when,", "b": [0.7329, 0.5085, 0.7791, 0.5233]}, {"w": "1)", "b": [0.7838, 0.5085, 0.7999, 0.5233]}, {"w": "machine", "b": [0.8043, 0.5085, 0.8691, 0.5233]}, {"w": "learning", "b": [0.1312, 0.5263, 0.1956, 0.5413]}, {"w": "can", "b": [0.2018, 0.5263, 0.2294, 0.5413]}, {"w": "replace", "b": [0.2355, 0.5263, 0.2918, 0.5413]}, {"w": "a", "b": [0.2979, 0.5263, 0.3071, 0.5413]}, {"w": "complex", "b": [0.3133, 0.5263, 0.3791, 0.5413]}, {"w": "part", "b": [0.3853, 0.5263, 0.419, 0.5413]}, {"w": "in", "b": [0.4252, 0.5263, 0.4405, 0.5413]}, {"w": "your", "b": [0.4467, 0.5263, 0.4825, 0.5413]}, {"w": "engineering", "b": [0.4886, 0.5263, 0.5796, 0.5413]}, {"w": "project", "b": [0.5857, 0.5263, 0.642, 0.5413]}, {"w": "or", "b": [0.6481, 0.5263, 0.6645, 0.5413]}, {"w": "2)", "b": [0.6707, 0.5263, 0.687, 0.5413]}, {"w": "there’s", "b": [0.6932, 0.5263, 0.7464, 0.5413]}, {"w": "a", "b": [0.7526, 0.5263, 0.7618, 0.5413]}, {"w": "great", "b": [0.7679, 0.5263, 0.8088, 0.5413]}, {"w": "benefit", "b": [0.815, 0.5263, 0.8697, 0.5413]}, {"w": "in", "b": [0.1312, 0.5443, 0.1466, 0.5592]}, {"w": "getting", "b": [0.1528, 0.5443, 0.2092, 0.5592]}, {"w": "inexpensive", "b": [0.2153, 0.5443, 0.3077, 0.5592]}, {"w": "(but", "b": [0.3139, 0.5443, 0.3488, 0.5592]}, {"w": "probably", "b": [0.3549, 0.5443, 0.4262, 0.5592]}, {"w": "imperfect)", "b": [0.4324, 0.5443, 0.5155, 0.5592]}, {"w": "predictions.", "b": [0.5217, 0.5443, 0.6151, 0.5592]}]}, {"id": "b_9", "type": "paragraph", "text": "For example, a complex part of an existing system can be rule-based, with many nested rules and exceptions. Building and maintaining such a system can be extremely difficult, time-consuming, and error-prone. It can also be a source of significant frustration for software engineers when they are asked to maintain that part of the system. Can the rules be learned instead of programming them? Can an existing system be used to generate labeled data easily? If yes, such a machine learning project would have a high impact and low cost.", "words": [{"w": "For", "b": [0.1312, 0.5711, 0.1588, 0.5862]}, {"w": "example,", "b": [0.1659, 0.5711, 0.2386, 0.5862]}, {"w": "a", "b": [0.2461, 0.5711, 0.2555, 0.5862]}, {"w": "complex", "b": [0.2626, 0.5711, 0.3301, 0.5862]}, {"w": "part", "b": [0.3373, 0.5711, 0.3718, 0.5862]}, {"w": "of", "b": [0.379, 0.5711, 0.3942, 0.5862]}, {"w": "an", "b": [0.4014, 0.5711, 0.4212, 0.5862]}, {"w": "existing", "b": [0.4284, 0.5711, 0.4918, 0.5862]}, {"w": "system", "b": [0.499, 0.5711, 0.5551, 0.5862]}, {"w": "can", "b": [0.5623, 0.5711, 0.5905, 0.5862]}, {"w": "be", "b": [0.5977, 0.5711, 0.6171, 0.5862]}, {"w": "rule-based,", "b": [0.6242, 0.5711, 0.7133, 0.5862]}, {"w": "with", "b": [0.7208, 0.5711, 0.7574, 0.5862]}, {"w": "many", "b": [0.7645, 0.5711, 0.8095, 0.5862]}, {"w": "nested", "b": [0.8167, 0.5711, 0.8691, 0.5862]}, {"w": "rules", "b": [0.1312, 0.589, 0.1701, 0.6041]}, {"w": "and", "b": [0.1769, 0.589, 0.2072, 0.6041]}, {"w": "exceptions.", "b": [0.214, 0.589, 0.3046, 0.6041]}, {"w": "Building", "b": [0.3147, 0.589, 0.3845, 0.6041]}, {"w": "and", "b": [0.3913, 0.589, 0.4217, 0.6041]}, {"w": "maintaining", "b": [0.4284, 0.589, 0.5262, 0.6041]}, {"w": "such", "b": [0.533, 0.589, 0.5692, 0.6041]}, {"w": "a", "b": [0.576, 0.589, 0.5854, 0.6041]}, {"w": "system", "b": [0.5922, 0.589, 0.6484, 0.6041]}, {"w": "can", "b": [0.6552, 0.589, 0.6834, 0.6041]}, {"w": "be", "b": [0.6902, 0.589, 0.7095, 0.6041]}, {"w": "extremely", "b": [0.7163, 0.589, 0.7969, 0.6041]}, {"w": "difficult,", "b": [0.8037, 0.589, 0.8717, 0.6041]}, {"w": "time-consuming,", "b": [0.1312, 0.6072, 0.261, 0.622]}, {"w": "and", "b": [0.2665, 0.6072, 0.2956, 0.622]}, {"w": "error-prone.", "b": [0.3009, 0.6072, 0.3946, 0.622]}, {"w": "It", "b": [0.4025, 0.6072, 0.4161, 0.622]}, {"w": "can", "b": [0.4214, 0.6072, 0.4485, 0.622]}, {"w": "also", "b": [0.4539, 0.6072, 0.4841, 0.622]}, {"w": "be", "b": [0.4894, 0.6072, 0.5081, 0.622]}, {"w": "a", "b": [0.5134, 0.6072, 0.5224, 0.622]}, {"w": "source", "b": [0.5278, 0.6072, 0.5772, 0.622]}, {"w": "of", "b": [0.5825, 0.6072, 0.5971, 0.622]}, {"w": "significant", "b": [0.6024, 0.6072, 0.6824, 0.622]}, {"w": "frustration", "b": [0.6877, 0.6072, 0.7719, 0.622]}, {"w": "for", "b": [0.7772, 0.6072, 0.7988, 0.622]}, {"w": "software", "b": [0.8042, 0.6072, 0.8691, 0.622]}, {"w": "engineers", "b": [0.1312, 0.6251, 0.2038, 0.6399]}, {"w": "when", "b": [0.2099, 0.6251, 0.2511, 0.6399]}, {"w": "they", "b": [0.2573, 0.6251, 0.2919, 0.6399]}, {"w": "are", "b": [0.2981, 0.6251, 0.3223, 0.6399]}, {"w": "asked", "b": [0.3284, 0.6251, 0.3717, 0.6399]}, {"w": "to", "b": [0.3779, 0.6251, 0.394, 0.6399]}, {"w": "maintain", "b": [0.4001, 0.6251, 0.4699, 0.6399]}, {"w": "that", "b": [0.4761, 0.6251, 0.5092, 0.6399]}, {"w": "part", "b": [0.5154, 0.6251, 0.5486, 0.6399]}, {"w": "of", "b": [0.5547, 0.6251, 0.5693, 0.6399]}, {"w": "the", "b": [0.5755, 0.6251, 0.6006, 0.6399]}, {"w": "system.", "b": [0.6067, 0.6251, 0.6657, 0.6399]}, {"w": "Can", "b": [0.6739, 0.6251, 0.7061, 0.6399]}, {"w": "the", "b": [0.7122, 0.6251, 0.7374, 0.6399]}, {"w": "rules", "b": [0.7435, 0.6251, 0.7809, 0.6399]}, {"w": "be", "b": [0.787, 0.6251, 0.8056, 0.6399]}, {"w": "learned", "b": [0.8118, 0.6251, 0.8691, 0.6399]}, {"w": "instead", "b": [0.1312, 0.6428, 0.1899, 0.6579]}, {"w": "of", "b": [0.1969, 0.6428, 0.212, 0.6579]}, {"w": "programming", "b": [0.219, 0.6428, 0.3289, 0.6579]}, {"w": "them?", "b": [0.3358, 0.6428, 0.3865, 0.6579]}, {"w": "Can", "b": [0.3971, 0.6428, 0.4306, 0.6579]}, {"w": "an", "b": [0.4375, 0.6428, 0.4574, 0.6579]}, {"w": "existing", "b": [0.4643, 0.6428, 0.5277, 0.6579]}, {"w": "system", "b": [0.5347, 0.6428, 0.5909, 0.6579]}, {"w": "be", "b": [0.5978, 0.6428, 0.6171, 0.6579]}, {"w": "used", "b": [0.6241, 0.6428, 0.6608, 0.6579]}, {"w": "to", "b": [0.6678, 0.6428, 0.6845, 0.6579]}, {"w": "generate", "b": [0.6914, 0.6428, 0.7605, 0.6579]}, {"w": "labeled", "b": [0.7675, 0.6428, 0.8255, 0.6579]}, {"w": "data", "b": [0.8325, 0.6428, 0.8691, 0.6579]}, {"w": "easily?", "b": [0.1312, 0.6609, 0.1847, 0.6759]}, {"w": "If", "b": [0.1929, 0.6609, 0.2052, 0.6759]}, {"w": "yes,", "b": [0.2113, 0.6609, 0.2412, 0.6759]}, {"w": "such", "b": [0.2473, 0.6609, 0.2828, 0.6759]}, {"w": "a", "b": [0.289, 0.6609, 0.2982, 0.6759]}, {"w": "machine", "b": [0.3043, 0.6609, 0.3705, 0.6759]}, {"w": "learning", "b": [0.3766, 0.6609, 0.4413, 0.6759]}, {"w": "project", "b": [0.4474, 0.6609, 0.5039, 0.6759]}, {"w": "would", "b": [0.5101, 0.6609, 0.5577, 0.6759]}, {"w": "have", "b": [0.5639, 0.6609, 0.6003, 0.6759]}, {"w": "a", "b": [0.6064, 0.6609, 0.6157, 0.6759]}, {"w": "high", "b": [0.6218, 0.6609, 0.6567, 0.6759]}, {"w": "impact", "b": [0.6628, 0.6609, 0.7182, 0.6759]}, {"w": "and", "b": [0.7243, 0.6609, 0.7541, 0.6759]}, {"w": "low", "b": [0.7602, 0.6609, 0.7874, 0.6759]}, {"w": "cost.", "b": [0.7935, 0.6609, 0.8306, 0.6759]}]}, {"id": "b_10", "type": "paragraph", "text": "Inexpensive and imperfect predictions can be valuable, for example, in a system that dispatches a large number of requests. Let’s say many such requests are “easy” and can be solved quickly using some existing automation. The remaining requests are considered “difficult” and must be addressed manually.", "words": [{"w": "Inexpensive", "b": [0.1312, 0.6879, 0.2233, 0.7027]}, {"w": "and", "b": [0.2276, 0.6879, 0.2567, 0.7027]}, {"w": "imperfect", "b": [0.261, 0.6879, 0.3354, 0.7027]}, {"w": "predictions", "b": [0.3397, 0.6879, 0.4263, 0.7027]}, {"w": "can", "b": [0.4306, 0.6879, 0.4577, 0.7027]}, {"w": "be", "b": [0.462, 0.6879, 0.4806, 0.7027]}, {"w": "valuable,", "b": [0.4848, 0.6879, 0.5547, 0.7027]}, {"w": "for", "b": [0.5593, 0.6879, 0.581, 0.7027]}, {"w": "example,", "b": [0.5853, 0.6879, 0.6551, 0.7027]}, {"w": "in", "b": [0.6597, 0.6879, 0.6748, 0.7027]}, {"w": "a", "b": [0.6791, 0.6879, 0.6881, 0.7027]}, {"w": "system", "b": [0.6924, 0.6879, 0.7464, 0.7027]}, {"w": "that", "b": [0.7506, 0.6879, 0.7838, 0.7027]}, {"w": "dispatches", "b": [0.7881, 0.6879, 0.8692, 0.7027]}, {"w": "a", "b": [0.1312, 0.7059, 0.1403, 0.7207]}, {"w": "large", "b": [0.1456, 0.7059, 0.1838, 0.7207]}, {"w": "number", "b": [0.1891, 0.7059, 0.249, 0.7207]}, {"w": "of", "b": [0.2543, 0.7059, 0.2688, 0.7207]}, {"w": "requests.", "b": [0.2741, 0.7059, 0.3432, 0.7207]}, {"w": "Let’s", "b": [0.3512, 0.7059, 0.3897, 0.7207]}, {"w": "say", "b": [0.395, 0.7059, 0.4202, 0.7207]}, {"w": "many", "b": [0.4255, 0.7059, 0.4687, 0.7207]}, {"w": "such", "b": [0.474, 0.7059, 0.5088, 0.7207]}, {"w": "requests", "b": [0.5141, 0.7059, 0.5782, 0.7207]}, {"w": "are", "b": [0.5835, 0.7059, 0.6077, 0.7207]}, {"w": "“easy”", "b": [0.613, 0.7059, 0.6638, 0.7207]}, {"w": "and", "b": [0.6691, 0.7059, 0.6983, 0.7207]}, {"w": "can", "b": [0.7036, 0.7059, 0.7307, 0.7207]}, {"w": "be", "b": [0.736, 0.7059, 0.7546, 0.7207]}, {"w": "solved", "b": [0.7599, 0.7059, 0.8083, 0.7207]}, {"w": "quickly", "b": [0.8136, 0.7059, 0.8698, 0.7207]}, {"w": "using", "b": [0.1312, 0.7238, 0.1729, 0.7387]}, {"w": "some", "b": [0.1791, 0.7238, 0.2187, 0.7387]}, {"w": "existing", "b": [0.2249, 0.7238, 0.2863, 0.7387]}, {"w": "automation.", "b": [0.2925, 0.7238, 0.3888, 0.7387]}, {"w": "The", "b": [0.397, 0.7238, 0.4284, 0.7387]}, {"w": "remaining", "b": [0.4346, 0.7238, 0.5137, 0.7387]}, {"w": "requests", "b": [0.5199, 0.7238, 0.5845, 0.7387]}, {"w": "are", "b": [0.5907, 0.7238, 0.6151, 0.7387]}, {"w": "considered", "b": [0.6212, 0.7238, 0.7046, 0.7387]}, {"w": "“difficult”", "b": [0.7107, 0.7238, 0.7888, 0.7387]}, {"w": "and", "b": [0.7949, 0.7238, 0.8243, 0.7387]}, {"w": "must", "b": [0.8305, 0.7238, 0.8696, 0.7387]}, {"w": "be", "b": [0.1312, 0.7417, 0.1502, 0.7566]}, {"w": "addressed", "b": [0.1564, 0.7417, 0.2346, 0.7566]}, {"w": "manually.", "b": [0.2407, 0.7417, 0.3181, 0.7566]}]}, {"id": "b_11", "type": "paragraph", "text": "A machine learning-based system that recognizes “easy” tasks and dispatches them to the automation will save a lot of time for humans who will only concentrate their effort and time on difficult requests. Even if the dispatcher makes an error in prediction, the difficult request will reach the automation, the automation will fail on it, and the human will eventually receive that request. If the human gets an easy request by mistake, there’s no problem either: that easy request can still be sent to the automation or processed by the human.", "words": [{"w": "A", "b": [0.1305, 0.7685, 0.1446, 0.7836]}, {"w": "machine", "b": [0.1507, 0.7685, 0.218, 0.7836]}, {"w": "learning-based", "b": [0.2241, 0.7685, 0.342, 0.7836]}, {"w": "system", "b": [0.3482, 0.7685, 0.4041, 0.7836]}, {"w": "that", "b": [0.4103, 0.7685, 0.4446, 0.7836]}, {"w": "recognizes", "b": [0.4508, 0.7685, 0.5333, 0.7836]}, {"w": "“easy”", "b": [0.5394, 0.7685, 0.5921, 0.7836]}, {"w": "tasks", "b": [0.5983, 0.7685, 0.6397, 0.7836]}, {"w": "and", "b": [0.6458, 0.7685, 0.676, 0.7836]}, {"w": "dispatches", "b": [0.6822, 0.7685, 0.7663, 0.7836]}, {"w": "them", "b": [0.7724, 0.7685, 0.8141, 0.7836]}, {"w": "to", "b": [0.8203, 0.7685, 0.8369, 0.7836]}, {"w": "the", "b": [0.8431, 0.7685, 0.8691, 0.7836]}, {"w": "automation", "b": [0.1312, 0.7867, 0.2217, 0.8015]}, {"w": "will", "b": [0.2276, 0.7867, 0.2558, 0.8015]}, {"w": "save", "b": [0.2618, 0.7867, 0.2945, 0.8015]}, {"w": "a", "b": [0.3005, 0.7867, 0.3095, 0.8015]}, {"w": "lot", "b": [0.3155, 0.7867, 0.3366, 0.8015]}, {"w": "of", "b": [0.3426, 0.7867, 0.3572, 0.8015]}, {"w": "time", "b": [0.3632, 0.7867, 0.3983, 0.8015]}, {"w": "for", "b": [0.4043, 0.7867, 0.426, 0.8015]}, {"w": "humans", "b": [0.432, 0.7867, 0.4929, 0.8015]}, {"w": "who", "b": [0.4989, 0.7867, 0.531, 0.8015]}, {"w": "will", "b": [0.537, 0.7867, 0.5651, 0.8015]}, {"w": "only", "b": [0.5711, 0.7867, 0.6048, 0.8015]}, {"w": "concentrate", "b": [0.6108, 0.7867, 0.7018, 0.8015]}, {"w": "their", "b": [0.7078, 0.7867, 0.745, 0.8015]}, {"w": "effort", "b": [0.751, 0.7867, 0.7927, 0.8015]}, {"w": "and", "b": [0.7987, 0.7867, 0.8279, 0.8015]}, {"w": "time", "b": [0.8339, 0.7867, 0.869, 0.8015]}, {"w": "on", "b": [0.1312, 0.8046, 0.1503, 0.8194]}, {"w": "difficult", "b": [0.1563, 0.8046, 0.2166, 0.8194]}, {"w": "requests.", "b": [0.2226, 0.8046, 0.2917, 0.8194]}, {"w": "Even", "b": [0.2999, 0.8046, 0.3393, 0.8194]}, {"w": "if", "b": [0.3453, 0.8046, 0.3559, 0.8194]}, {"w": "the", "b": [0.3618, 0.8046, 0.387, 0.8194]}, {"w": "dispatcher", "b": [0.393, 0.8046, 0.474, 0.8194]}, {"w": "makes", "b": [0.48, 0.8046, 0.5283, 0.8194]}, {"w": "an", "b": [0.5343, 0.8046, 0.5534, 0.8194]}, {"w": "error", "b": [0.5594, 0.8046, 0.5978, 0.8194]}, {"w": "in", "b": [0.6037, 0.8046, 0.6188, 0.8194]}, {"w": "prediction,", "b": [0.6248, 0.8046, 0.7093, 0.8194]}, {"w": "the", "b": [0.7153, 0.8046, 0.7404, 0.8194]}, {"w": "difficult", "b": [0.7465, 0.8046, 0.8067, 0.8194]}, {"w": "request", "b": [0.8127, 0.8046, 0.8697, 0.8194]}, {"w": "will", "b": [0.1306, 0.8223, 0.1598, 0.8374]}, {"w": "reach", "b": [0.1671, 0.8223, 0.2106, 0.8374]}, {"w": "the", "b": [0.2179, 0.8223, 0.2441, 0.8374]}, {"w": "automation,", "b": [0.2514, 0.8223, 0.3507, 0.8374]}, {"w": "the", "b": [0.3583, 0.8223, 0.3844, 0.8374]}, {"w": "automation", "b": [0.3917, 0.8223, 0.4858, 0.8374]}, {"w": "will", "b": [0.4931, 0.8223, 0.5224, 0.8374]}, {"w": "fail", "b": [0.5297, 0.8223, 0.5553, 0.8374]}, {"w": "on", "b": [0.5626, 0.8223, 0.5825, 0.8374]}, {"w": "it,", "b": [0.5898, 0.8223, 0.6075, 0.8374]}, {"w": "and", "b": [0.6151, 0.8223, 0.6455, 0.8374]}, {"w": "the", "b": [0.6527, 0.8223, 0.6789, 0.8374]}, {"w": "human", "b": [0.6862, 0.8223, 0.7421, 0.8374]}, {"w": "will", "b": [0.7494, 0.8223, 0.7787, 0.8374]}, {"w": "eventually", "b": [0.786, 0.8223, 0.8697, 0.8374]}, {"w": "receive", "b": [0.1312, 0.8405, 0.1846, 0.8553]}, {"w": "that", "b": [0.1904, 0.8405, 0.2235, 0.8553]}, {"w": "request.", "b": [0.2293, 0.8405, 0.2913, 0.8553]}, {"w": "If", "b": [0.2994, 0.8405, 0.3114, 0.8553]}, {"w": "the", "b": [0.3172, 0.8405, 0.3424, 0.8553]}, {"w": "human", "b": [0.3482, 0.8405, 0.4019, 0.8553]}, {"w": "gets", "b": [0.4077, 0.8405, 0.439, 0.8553]}, {"w": "an", "b": [0.4448, 0.8405, 0.4639, 0.8553]}, {"w": "easy", "b": [0.4697, 0.8405, 0.5034, 0.8553]}, {"w": "request", "b": [0.5092, 0.8405, 0.5662, 0.8553]}, {"w": "by", "b": [0.572, 0.8405, 0.5911, 0.8553]}, {"w": "mistake,", "b": [0.5969, 0.8405, 0.6623, 0.8553]}, {"w": "there’s", "b": [0.6681, 0.8405, 0.7206, 0.8553]}, {"w": "no", "b": [0.7264, 0.8405, 0.7455, 0.8553]}, {"w": "problem", "b": [0.7513, 0.8405, 0.8156, 0.8553]}, {"w": "either:", "b": [0.8214, 0.8405, 0.8717, 0.8553]}, {"w": "that", "b": [0.1312, 0.8583, 0.1651, 0.8733]}, {"w": "easy", "b": [0.1712, 0.8583, 0.2057, 0.8733]}, {"w": "request", "b": [0.2118, 0.8583, 0.2699, 0.8733]}, {"w": "can", "b": [0.2761, 0.8583, 0.3038, 0.8733]}, {"w": "still", "b": [0.3099, 0.8583, 0.3398, 0.8733]}, {"w": "be", "b": [0.3459, 0.8583, 0.3649, 0.8733]}, {"w": "sent", "b": [0.3711, 0.8583, 0.4035, 0.8733]}, {"w": "to", "b": [0.4096, 0.8583, 0.426, 0.8733]}, {"w": "the", "b": [0.4322, 0.8583, 0.4578, 0.8733]}, {"w": "automation", "b": [0.464, 0.8583, 0.5562, 0.8733]}, {"w": "or", "b": [0.5624, 0.8583, 0.5788, 0.8733]}, {"w": "processed", "b": [0.585, 0.8583, 0.6617, 0.8733]}, {"w": "by", "b": [0.6678, 0.8583, 0.6873, 0.8733]}, {"w": "the", "b": [0.6935, 0.8583, 0.7191, 0.8733]}, {"w": "human.", "b": [0.7252, 0.8583, 0.7852, 0.8733]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "3", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 33, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2.1.2 Cost of Machine Learning", "words": [{"w": "2.1.2", "b": [0.1312, 0.0884, 0.1749, 0.1033]}, {"w": "Cost", "b": [0.1961, 0.0884, 0.2386, 0.1033]}, {"w": "of", "b": [0.2457, 0.0884, 0.2628, 0.1033]}, {"w": "Machine", "b": [0.2699, 0.0884, 0.3484, 0.1033]}, {"w": "Learning", "b": [0.3554, 0.0884, 0.4371, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "Three factors highly influence the cost of a machine learning project:", "words": [{"w": "Three", "b": [0.1306, 0.125, 0.1778, 0.1399]}, {"w": "factors", "b": [0.1839, 0.125, 0.2379, 0.1399]}, {"w": "highly", "b": [0.2441, 0.125, 0.2938, 0.1399]}, {"w": "influence", "b": [0.3, 0.125, 0.3708, 0.1399]}, {"w": "the", "b": [0.3769, 0.125, 0.4025, 0.1399]}, {"w": "cost", "b": [0.4087, 0.125, 0.4406, 0.1399]}, {"w": "of", "b": [0.4468, 0.125, 0.4616, 0.1399]}, {"w": "a", "b": [0.4678, 0.125, 0.477, 0.1399]}, {"w": "machine", "b": [0.4832, 0.125, 0.5493, 0.1399]}, {"w": "learning", "b": [0.5554, 0.125, 0.6201, 0.1399]}, {"w": "project:", "b": [0.6262, 0.125, 0.6878, 0.1399]}]}, {"id": "b_2", "type": "paragraph", "text": "• the difficulty of the problem, • the cost of data, and • the need for accuracy.", "words": [{"w": "•", "b": [0.1538, 0.1519, 0.1681, 0.1668]}, {"w": "the", "b": [0.1774, 0.1519, 0.203, 0.1668]}, {"w": "difficulty", "b": [0.2091, 0.1519, 0.2799, 0.1668]}, {"w": "of", "b": [0.2861, 0.1519, 0.3009, 0.1668]}, {"w": "the", "b": [0.3071, 0.1519, 0.3327, 0.1668]}, {"w": "problem,", "b": [0.3389, 0.1519, 0.4097, 0.1668]}, {"w": "•", "b": [0.1538, 0.1698, 0.1681, 0.1848]}, {"w": "the", "b": [0.1774, 0.1698, 0.203, 0.1848]}, {"w": "cost", "b": [0.2091, 0.1698, 0.241, 0.1848]}, {"w": "of", "b": [0.2472, 0.1698, 0.2621, 0.1848]}, {"w": "data,", "b": [0.2682, 0.1698, 0.3092, 0.1848]}, {"w": "and", "b": [0.3154, 0.1698, 0.3451, 0.1848]}, {"w": "•", "b": [0.1538, 0.1878, 0.1681, 0.2027]}, {"w": "the", "b": [0.1774, 0.1878, 0.203, 0.2027]}, {"w": "need", "b": [0.2091, 0.1878, 0.2461, 0.2027]}, {"w": "for", "b": [0.2522, 0.1878, 0.2743, 0.2027]}, {"w": "accuracy.", "b": [0.2805, 0.1878, 0.3544, 0.2027]}]}, {"id": "b_3", "type": "paragraph", "text": "Getting the right data in the right amount can be very costly, especially if manual labeling is involved. The need for high accuracy can translate into the requirement of getting more data or training a more complex model, such as a unique architecture of a deep neural network or a nontrivial ensembling architecture.", "words": [{"w": "Getting", "b": [0.1312, 0.2148, 0.1917, 0.2296]}, {"w": "the", "b": [0.1976, 0.2148, 0.2227, 0.2296]}, {"w": "right", "b": [0.2287, 0.2148, 0.2664, 0.2296]}, {"w": "data", "b": [0.2723, 0.2148, 0.3075, 0.2296]}, {"w": "in", "b": [0.3134, 0.2148, 0.3285, 0.2296]}, {"w": "the", "b": [0.3345, 0.2148, 0.3596, 0.2296]}, {"w": "right", "b": [0.3656, 0.2148, 0.4033, 0.2296]}, {"w": "amount", "b": [0.4092, 0.2148, 0.469, 0.2296]}, {"w": "can", "b": [0.4749, 0.2148, 0.5021, 0.2296]}, {"w": "be", "b": [0.508, 0.2148, 0.5266, 0.2296]}, {"w": "very", "b": [0.5326, 0.2148, 0.5663, 0.2296]}, {"w": "costly,", "b": [0.5722, 0.2148, 0.6215, 0.2296]}, {"w": "especially", "b": [0.6275, 0.2148, 0.703, 0.2296]}, {"w": "if", "b": [0.709, 0.2148, 0.7195, 0.2296]}, {"w": "manual", "b": [0.7255, 0.2148, 0.7832, 0.2296]}, {"w": "labeling", "b": [0.7892, 0.2148, 0.851, 0.2296]}, {"w": "is", "b": [0.8569, 0.2148, 0.8691, 0.2296]}, {"w": "involved.", "b": [0.1312, 0.2328, 0.2011, 0.2476]}, {"w": "The", "b": [0.2092, 0.2328, 0.2403, 0.2476]}, {"w": "need", "b": [0.2462, 0.2328, 0.2824, 0.2476]}, {"w": "for", "b": [0.2883, 0.2328, 0.31, 0.2476]}, {"w": "high", "b": [0.3159, 0.2328, 0.35, 0.2476]}, {"w": "accuracy", "b": [0.3559, 0.2328, 0.4248, 0.2476]}, {"w": "can", "b": [0.4307, 0.2328, 0.4579, 0.2476]}, {"w": "translate", "b": [0.4638, 0.2328, 0.5333, 0.2476]}, {"w": "into", "b": [0.5392, 0.2328, 0.5698, 0.2476]}, {"w": "the", "b": [0.5757, 0.2328, 0.6008, 0.2476]}, {"w": "requirement", "b": [0.6067, 0.2328, 0.7013, 0.2476]}, {"w": "of", "b": [0.7072, 0.2328, 0.7218, 0.2476]}, {"w": "getting", "b": [0.7276, 0.2328, 0.7829, 0.2476]}, {"w": "more", "b": [0.7888, 0.2328, 0.828, 0.2476]}, {"w": "data", "b": [0.834, 0.2328, 0.8691, 0.2476]}, {"w": "or", "b": [0.1312, 0.2507, 0.1475, 0.2655]}, {"w": "training", "b": [0.1537, 0.2507, 0.2167, 0.2655]}, {"w": "a", "b": [0.2228, 0.2507, 0.232, 0.2655]}, {"w": "more", "b": [0.2381, 0.2507, 0.2778, 0.2655]}, {"w": "complex", "b": [0.2839, 0.2507, 0.3494, 0.2655]}, {"w": "model,", "b": [0.3555, 0.2507, 0.4088, 0.2655]}, {"w": "such", "b": [0.415, 0.2507, 0.4501, 0.2655]}, {"w": "as", "b": [0.4563, 0.2507, 0.4726, 0.2655]}, {"w": "a", "b": [0.4788, 0.2507, 0.4879, 0.2655]}, {"w": "unique", "b": [0.4941, 0.2507, 0.5474, 0.2655]}, {"w": "architecture", "b": [0.5534, 0.2506, 0.6649, 0.2655]}, {"w": "of", "b": [0.671, 0.2507, 0.6857, 0.2655]}, {"w": "a", "b": [0.6919, 0.2507, 0.701, 0.2655]}, {"w": "deep", "b": [0.7072, 0.2507, 0.7437, 0.2655]}, {"w": "neural", "b": [0.7499, 0.2507, 0.7997, 0.2655]}, {"w": "network", "b": [0.8059, 0.2507, 0.8694, 0.2655]}, {"w": "or", "b": [0.1312, 0.2685, 0.1477, 0.2835]}, {"w": "a", "b": [0.1538, 0.2685, 0.1631, 0.2835]}, {"w": "nontrivial", "b": [0.1692, 0.2685, 0.2472, 0.2835]}, {"w": "ensembling", "b": [0.2534, 0.2685, 0.3561, 0.2835]}, {"w": "architecture.", "b": [0.3624, 0.2685, 0.4636, 0.2835]}]}, {"id": "b_4", "type": "paragraph", "text": "When you think about the problem’s difficulty, the primary considerations are:", "words": [{"w": "When", "b": [0.1303, 0.2955, 0.178, 0.3104]}, {"w": "you", "b": [0.1841, 0.2955, 0.2128, 0.3104]}, {"w": "think", "b": [0.219, 0.2955, 0.2616, 0.3104]}, {"w": "about", "b": [0.2677, 0.2955, 0.3144, 0.3104]}, {"w": "the", "b": [0.3205, 0.2955, 0.3461, 0.3104]}, {"w": "problem’s", "b": [0.3523, 0.2955, 0.4304, 0.3104]}, {"w": "difficulty,", "b": [0.4365, 0.2955, 0.5109, 0.3104]}, {"w": "the", "b": [0.517, 0.2955, 0.5427, 0.3104]}, {"w": "primary", "b": [0.5488, 0.2955, 0.613, 0.3104]}, {"w": "considerations", "b": [0.6192, 0.2955, 0.7333, 0.3104]}, {"w": "are:", "b": [0.7394, 0.2955, 0.7692, 0.3104]}]}, {"id": "b_5", "type": "paragraph", "text": "• whether an implemented algorithm or a software library capable of solving the problem is available (if yes, the problem is greatly simplified), • whether significant computation power is needed to build the model or to run it in the production environment.", "words": [{"w": "•", "b": [0.1538, 0.3224, 0.1681, 0.3373]}, {"w": "whether", "b": [0.1774, 0.3225, 0.2407, 0.3373]}, {"w": "an", "b": [0.2466, 0.3225, 0.2657, 0.3373]}, {"w": "implemented", "b": [0.2716, 0.3225, 0.3726, 0.3373]}, {"w": "algorithm", "b": [0.3785, 0.3225, 0.4549, 0.3373]}, {"w": "or", "b": [0.4607, 0.3225, 0.4769, 0.3373]}, {"w": "a", "b": [0.4828, 0.3225, 0.4918, 0.3373]}, {"w": "software", "b": [0.4977, 0.3225, 0.5626, 0.3373]}, {"w": "library", "b": [0.5685, 0.3225, 0.6214, 0.3373]}, {"w": "capable", "b": [0.6273, 0.3225, 0.6866, 0.3373]}, {"w": "of", "b": [0.6925, 0.3225, 0.707, 0.3373]}, {"w": "solving", "b": [0.7129, 0.3225, 0.7678, 0.3373]}, {"w": "the", "b": [0.7737, 0.3225, 0.7988, 0.3373]}, {"w": "problem", "b": [0.8047, 0.3225, 0.8691, 0.3373]}, {"w": "is", "b": [0.1774, 0.3403, 0.1898, 0.3553]}, {"w": "available", "b": [0.1959, 0.3403, 0.2657, 0.3553]}, {"w": "(if", "b": [0.2718, 0.3403, 0.2898, 0.3553]}, {"w": "yes,", "b": [0.2959, 0.3403, 0.3257, 0.3553]}, {"w": "the", "b": [0.3319, 0.3403, 0.3576, 0.3553]}, {"w": "problem", "b": [0.3637, 0.3403, 0.4294, 0.3553]}, {"w": "is", "b": [0.4355, 0.3403, 0.4479, 0.3553]}, {"w": "greatly", "b": [0.4541, 0.3403, 0.51, 0.3553]}, {"w": "simplified),", "b": [0.5162, 0.3403, 0.6055, 0.3553]}, {"w": "•", "b": [0.1538, 0.3583, 0.1681, 0.3732]}, {"w": "whether", "b": [0.1774, 0.3584, 0.241, 0.3732]}, {"w": "significant", "b": [0.2471, 0.3584, 0.3275, 0.3732]}, {"w": "computation", "b": [0.3336, 0.3584, 0.4335, 0.3732]}, {"w": "power", "b": [0.4397, 0.3584, 0.4866, 0.3732]}, {"w": "is", "b": [0.4928, 0.3584, 0.505, 0.3732]}, {"w": "needed", "b": [0.5112, 0.3584, 0.5657, 0.3732]}, {"w": "to", "b": [0.5718, 0.3584, 0.588, 0.3732]}, {"w": "build", "b": [0.5941, 0.3584, 0.6345, 0.3732]}, {"w": "the", "b": [0.6407, 0.3584, 0.6659, 0.3732]}, {"w": "model", "b": [0.6721, 0.3584, 0.72, 0.3732]}, {"w": "or", "b": [0.7262, 0.3584, 0.7424, 0.3732]}, {"w": "to", "b": [0.7485, 0.3584, 0.7647, 0.3732]}, {"w": "run", "b": [0.7708, 0.3584, 0.7981, 0.3732]}, {"w": "it", "b": [0.8043, 0.3584, 0.8164, 0.3732]}, {"w": "in", "b": [0.8226, 0.3584, 0.8377, 0.3732]}, {"w": "the", "b": [0.8438, 0.3584, 0.8691, 0.3732]}, {"w": "production", "b": [0.1774, 0.3762, 0.2651, 0.3912]}, {"w": "environment.", "b": [0.2712, 0.3762, 0.3764, 0.3912]}]}, {"id": "b_6", "type": "paragraph", "text": "The second driver of the cost is data. The following considerations have to be made:", "words": [{"w": "The", "b": [0.1306, 0.4031, 0.1624, 0.4181]}, {"w": "second", "b": [0.1685, 0.4031, 0.2219, 0.4181]}, {"w": "driver", "b": [0.2281, 0.4031, 0.2754, 0.4181]}, {"w": "of", "b": [0.2815, 0.4031, 0.2964, 0.4181]}, {"w": "the", "b": [0.3026, 0.4031, 0.3282, 0.4181]}, {"w": "cost", "b": [0.3343, 0.4031, 0.3662, 0.4181]}, {"w": "is", "b": [0.3724, 0.4031, 0.3848, 0.4181]}, {"w": "data.", "b": [0.391, 0.4031, 0.432, 0.4181]}, {"w": "The", "b": [0.4402, 0.4031, 0.472, 0.4181]}, {"w": "following", "b": [0.4781, 0.4031, 0.5499, 0.4181]}, {"w": "considerations", "b": [0.556, 0.4031, 0.6701, 0.4181]}, {"w": "have", "b": [0.6763, 0.4031, 0.7127, 0.4181]}, {"w": "to", "b": [0.7188, 0.4031, 0.7352, 0.4181]}, {"w": "be", "b": [0.7414, 0.4031, 0.7604, 0.4181]}, {"w": "made:", "b": [0.7665, 0.4031, 0.8147, 0.4181]}]}, {"id": "b_7", "type": "paragraph", "text": "• can data be generated automatically (if yes, the problem is greatly simplified), • what is the cost of manual annotation of the data (i.e., assigning labels to unlabeled examples), • how many examples are needed (usually, that cannot be known in advance, but can be estimated from known published results or the organization’s own experience).", "words": [{"w": "•", "b": [0.1538, 0.4301, 0.1681, 0.445]}, {"w": "can", "b": [0.1774, 0.4301, 0.205, 0.445]}, {"w": "data", "b": [0.2112, 0.4301, 0.2471, 0.445]}, {"w": "be", "b": [0.2532, 0.4301, 0.2722, 0.445]}, {"w": "generated", "b": [0.2784, 0.4301, 0.3564, 0.445]}, {"w": "automatically", "b": [0.3625, 0.4301, 0.4727, 0.445]}, {"w": "(if", "b": [0.4789, 0.4301, 0.4968, 0.445]}, {"w": "yes,", "b": [0.503, 0.4301, 0.5328, 0.445]}, {"w": "the", "b": [0.539, 0.4301, 0.5646, 0.445]}, {"w": "problem", "b": [0.5708, 0.4301, 0.6364, 0.445]}, {"w": "is", "b": [0.6426, 0.4301, 0.655, 0.445]}, {"w": "greatly", "b": [0.6612, 0.4301, 0.7171, 0.445]}, {"w": "simplified),", "b": [0.7232, 0.4301, 0.8126, 0.445]}, {"w": "•", "b": [0.1538, 0.448, 0.1681, 0.463]}, {"w": "what", "b": [0.1774, 0.4481, 0.2171, 0.463]}, {"w": "is", "b": [0.2233, 0.4481, 0.2356, 0.463]}, {"w": "the", "b": [0.2418, 0.4481, 0.2673, 0.463]}, {"w": "cost", "b": [0.2734, 0.4481, 0.3051, 0.463]}, {"w": "of", "b": [0.3113, 0.4481, 0.3261, 0.463]}, {"w": "manual", "b": [0.3322, 0.4481, 0.3908, 0.463]}, {"w": "annotation", "b": [0.397, 0.448, 0.4966, 0.4629]}, {"w": "of", "b": [0.5028, 0.4481, 0.5176, 0.463]}, {"w": "the", "b": [0.5238, 0.4481, 0.5493, 0.463]}, {"w": "data", "b": [0.5554, 0.4481, 0.5911, 0.463]}, {"w": "(i.e.,", "b": [0.5973, 0.4481, 0.633, 0.463]}, {"w": "assigning", "b": [0.6391, 0.4481, 0.7117, 0.463]}, {"w": "labels", "b": [0.7179, 0.4481, 0.7633, 0.463]}, {"w": "to", "b": [0.7695, 0.4481, 0.7858, 0.463]}, {"w": "unlabeled", "b": [0.792, 0.4481, 0.869, 0.463]}, {"w": "examples),", "b": [0.1774, 0.466, 0.2631, 0.4809]}, {"w": "•", "b": [0.1538, 0.4839, 0.1681, 0.4989]}, {"w": "how", "b": [0.1774, 0.484, 0.2091, 0.4988]}, {"w": "many", "b": [0.2152, 0.484, 0.2586, 0.4988]}, {"w": "examples", "b": [0.2647, 0.484, 0.3369, 0.4988]}, {"w": "are", "b": [0.343, 0.484, 0.3673, 0.4988]}, {"w": "needed", "b": [0.3735, 0.484, 0.4279, 0.4988]}, {"w": "(usually,", "b": [0.4341, 0.484, 0.5007, 0.4988]}, {"w": "that", "b": [0.5068, 0.484, 0.5401, 0.4988]}, {"w": "cannot", "b": [0.5463, 0.484, 0.5997, 0.4988]}, {"w": "be", "b": [0.6058, 0.484, 0.6245, 0.4988]}, {"w": "known", "b": [0.6307, 0.484, 0.682, 0.4988]}, {"w": "in", "b": [0.6882, 0.484, 0.7033, 0.4988]}, {"w": "advance,", "b": [0.7095, 0.484, 0.7775, 0.4988]}, {"w": "but", "b": [0.7837, 0.484, 0.8109, 0.4988]}, {"w": "can", "b": [0.817, 0.484, 0.8443, 0.4988]}, {"w": "be", "b": [0.8504, 0.484, 0.8691, 0.4988]}, {"w": "estimated", "b": [0.1774, 0.5019, 0.2554, 0.5168]}, {"w": "from", "b": [0.2615, 0.5019, 0.299, 0.5168]}, {"w": "known", "b": [0.3052, 0.5019, 0.3575, 0.5168]}, {"w": "published", "b": [0.3636, 0.5019, 0.4406, 0.5168]}, {"w": "results", "b": [0.4468, 0.5019, 0.4994, 0.5168]}, {"w": "or", "b": [0.5055, 0.5019, 0.522, 0.5168]}, {"w": "the", "b": [0.5281, 0.5019, 0.5538, 0.5168]}, {"w": "organization’s", "b": [0.5599, 0.5019, 0.6718, 0.5168]}, {"w": "own", "b": [0.678, 0.5019, 0.7103, 0.5168]}, {"w": "experience).", "b": [0.7164, 0.5019, 0.8129, 0.5168]}]}, {"id": "b_8", "type": "paragraph", "text": "Finally, one of the most influential cost factors is the desired accuracy of the model. The machine learning project’s cost grows superlinearly with the accuracy requirement, as illus- trated in Figure 1. Low accuracy can also be a source of significant loss when the model is deployed in the production environment. The considerations to make:", "words": [{"w": "Finally,", "b": [0.1312, 0.5287, 0.1927, 0.5438]}, {"w": "one", "b": [0.1993, 0.5287, 0.2275, 0.5438]}, {"w": "of", "b": [0.2341, 0.5287, 0.2492, 0.5438]}, {"w": "the", "b": [0.2557, 0.5287, 0.2819, 0.5438]}, {"w": "most", "b": [0.2884, 0.5287, 0.3282, 0.5438]}, {"w": "influential", "b": [0.3347, 0.5287, 0.4169, 0.5438]}, {"w": "cost", "b": [0.4234, 0.5287, 0.4559, 0.5438]}, {"w": "factors", "b": [0.4624, 0.5287, 0.5175, 0.5438]}, {"w": "is", "b": [0.524, 0.5287, 0.5366, 0.5438]}, {"w": "the", "b": [0.5431, 0.5287, 0.5693, 0.5438]}, {"w": "desired", "b": [0.5758, 0.5287, 0.6335, 0.5438]}, {"w": "accuracy", "b": [0.64, 0.5287, 0.7117, 0.5438]}, {"w": "of", "b": [0.7182, 0.5287, 0.7334, 0.5438]}, {"w": "the", "b": [0.7399, 0.5287, 0.7661, 0.5438]}, {"w": "model.", "b": [0.7726, 0.5287, 0.8275, 0.5438]}, {"w": "The", "b": [0.8367, 0.5287, 0.8691, 0.5438]}, {"w": "machine", "b": [0.1312, 0.5467, 0.1977, 0.5617]}, {"w": "learning", "b": [0.2038, 0.5467, 0.2688, 0.5617]}, {"w": "project’s", "b": [0.2749, 0.5467, 0.3442, 0.5617]}, {"w": "cost", "b": [0.3503, 0.5467, 0.3824, 0.5617]}, {"w": "grows", "b": [0.3885, 0.5467, 0.4345, 0.5617]}, {"w": "superlinearly", "b": [0.4406, 0.5467, 0.5449, 0.5617]}, {"w": "with", "b": [0.5511, 0.5467, 0.5872, 0.5617]}, {"w": "the", "b": [0.5933, 0.5467, 0.619, 0.5617]}, {"w": "accuracy", "b": [0.6252, 0.5467, 0.6958, 0.5617]}, {"w": "requirement,", "b": [0.702, 0.5467, 0.8041, 0.5617]}, {"w": "as", "b": [0.8102, 0.5467, 0.8268, 0.5617]}, {"w": "illus-", "b": [0.833, 0.5467, 0.8722, 0.5617]}, {"w": "trated", "b": [0.1312, 0.5646, 0.1809, 0.5796]}, {"w": "in", "b": [0.187, 0.5646, 0.2026, 0.5796]}, {"w": "Figure", "b": [0.2087, 0.5646, 0.2612, 0.5796]}, {"w": "1.", "b": [0.2674, 0.5646, 0.2818, 0.5796]}, {"w": "Low", "b": [0.29, 0.5646, 0.3239, 0.5796]}, {"w": "accuracy", "b": [0.33, 0.5646, 0.4009, 0.5796]}, {"w": "can", "b": [0.407, 0.5646, 0.4349, 0.5796]}, {"w": "also", "b": [0.4411, 0.5646, 0.4722, 0.5796]}, {"w": "be", "b": [0.4783, 0.5646, 0.4974, 0.5796]}, {"w": "a", "b": [0.5036, 0.5646, 0.5129, 0.5796]}, {"w": "source", "b": [0.519, 0.5646, 0.5698, 0.5796]}, {"w": "of", "b": [0.576, 0.5646, 0.591, 0.5796]}, {"w": "significant", "b": [0.5971, 0.5646, 0.6794, 0.5796]}, {"w": "loss", "b": [0.6855, 0.5646, 0.7147, 0.5796]}, {"w": "when", "b": [0.7209, 0.5646, 0.7632, 0.5796]}, {"w": "the", "b": [0.7694, 0.5646, 0.7952, 0.5796]}, {"w": "model", "b": [0.8014, 0.5646, 0.8504, 0.5796]}, {"w": "is", "b": [0.8566, 0.5646, 0.8691, 0.5796]}, {"w": "deployed", "b": [0.1312, 0.5826, 0.2015, 0.5976]}, {"w": "in", "b": [0.2077, 0.5826, 0.223, 0.5976]}, {"w": "the", "b": [0.2292, 0.5826, 0.2548, 0.5976]}, {"w": "production", "b": [0.261, 0.5826, 0.3487, 0.5976]}, {"w": "environment.", "b": [0.3549, 0.5826, 0.46, 0.5976]}, {"w": "The", "b": [0.4682, 0.5826, 0.5, 0.5976]}, {"w": "considerations", "b": [0.5062, 0.5826, 0.6202, 0.5976]}, {"w": "to", "b": [0.6264, 0.5826, 0.6428, 0.5976]}, {"w": "make:", "b": [0.649, 0.5826, 0.6961, 0.5976]}]}, {"id": "b_9", "type": "paragraph", "text": "• how costly is each wrong prediction, and • what is the lowest accuracy level below which the model becomes impractical.", "words": [{"w": "•", "b": [0.1538, 0.6095, 0.1681, 0.6245]}, {"w": "how", "b": [0.1774, 0.6095, 0.2096, 0.6245]}, {"w": "costly", "b": [0.2158, 0.6095, 0.2626, 0.6245]}, {"w": "is", "b": [0.2687, 0.6095, 0.2811, 0.6245]}, {"w": "each", "b": [0.2873, 0.6095, 0.3227, 0.6245]}, {"w": "wrong", "b": [0.3288, 0.6095, 0.3781, 0.6245]}, {"w": "prediction,", "b": [0.3842, 0.6095, 0.4704, 0.6245]}, {"w": "and", "b": [0.4766, 0.6095, 0.5063, 0.6245]}, {"w": "•", "b": [0.1538, 0.6275, 0.1681, 0.6424]}, {"w": "what", "b": [0.1774, 0.6275, 0.2173, 0.6424]}, {"w": "is", "b": [0.2235, 0.6275, 0.2359, 0.6424]}, {"w": "the", "b": [0.2421, 0.6275, 0.2677, 0.6424]}, {"w": "lowest", "b": [0.2738, 0.6275, 0.3232, 0.6424]}, {"w": "accuracy", "b": [0.3293, 0.6275, 0.3996, 0.6424]}, {"w": "level", "b": [0.4058, 0.6275, 0.4417, 0.6424]}, {"w": "below", "b": [0.4478, 0.6275, 0.494, 0.6424]}, {"w": "which", "b": [0.5001, 0.6275, 0.5468, 0.6424]}, {"w": "the", "b": [0.5529, 0.6275, 0.5786, 0.6424]}, {"w": "model", "b": [0.5847, 0.6275, 0.6334, 0.6424]}, {"w": "becomes", "b": [0.6396, 0.6275, 0.7068, 0.6424]}, {"w": "impractical.", "b": [0.713, 0.6275, 0.8084, 0.6424]}]}, {"id": "b_10", "type": "paragraph", "text": "2.2 Estimating Complexity of a Machine Learning Project", "words": [{"w": "2.2", "b": [0.1312, 0.676, 0.1631, 0.694]}, {"w": "Estimating", "b": [0.188, 0.676, 0.3066, 0.694]}, {"w": "Complexity", "b": [0.3149, 0.676, 0.4405, 0.694]}, {"w": "of", "b": [0.4488, 0.676, 0.4689, 0.694]}, {"w": "a", "b": [0.4772, 0.676, 0.4893, 0.694]}, {"w": "Machine", "b": [0.4976, 0.676, 0.5897, 0.694]}, {"w": "Learning", "b": [0.598, 0.676, 0.6937, 0.694]}, {"w": "Project", "b": [0.702, 0.676, 0.7821, 0.694]}]}, {"id": "b_11", "type": "paragraph", "text": "There is no standard complexity estimation method for a machine learning project, other than by comparison with other projects executed by the organization or reported in the literature.", "words": [{"w": "There", "b": [0.1306, 0.7148, 0.1787, 0.7299]}, {"w": "is", "b": [0.1852, 0.7148, 0.1978, 0.7299]}, {"w": "no", "b": [0.2043, 0.7148, 0.2241, 0.7299]}, {"w": "standard", "b": [0.2306, 0.7148, 0.3029, 0.7299]}, {"w": "complexity", "b": [0.3093, 0.7148, 0.3987, 0.7299]}, {"w": "estimation", "b": [0.4052, 0.7148, 0.4911, 0.7299]}, {"w": "method", "b": [0.4975, 0.7148, 0.5597, 0.7299]}, {"w": "for", "b": [0.5661, 0.7148, 0.5887, 0.7299]}, {"w": "a", "b": [0.5951, 0.7148, 0.6045, 0.7299]}, {"w": "machine", "b": [0.6109, 0.7148, 0.6784, 0.7299]}, {"w": "learning", "b": [0.6848, 0.7148, 0.7508, 0.7299]}, {"w": "project,", "b": [0.7572, 0.7148, 0.82, 0.7299]}, {"w": "other", "b": [0.8265, 0.7148, 0.8695, 0.7299]}, {"w": "than", "b": [0.1312, 0.7327, 0.1689, 0.7478]}, {"w": "by", "b": [0.1762, 0.7327, 0.1961, 0.7478]}, {"w": "comparison", "b": [0.2034, 0.7327, 0.2966, 0.7478]}, {"w": "with", "b": [0.3039, 0.7327, 0.3405, 0.7478]}, {"w": "other", "b": [0.3479, 0.7327, 0.3908, 0.7478]}, {"w": "projects", "b": [0.3981, 0.7327, 0.4631, 0.7478]}, {"w": "executed", "b": [0.4704, 0.7327, 0.5421, 0.7478]}, {"w": "by", "b": [0.5494, 0.7327, 0.5693, 0.7478]}, {"w": "the", "b": [0.5766, 0.7327, 0.6028, 0.7478]}, {"w": "organization", "b": [0.6101, 0.7327, 0.7116, 0.7478]}, {"w": "or", "b": [0.7189, 0.7327, 0.7357, 0.7478]}, {"w": "reported", "b": [0.743, 0.7327, 0.8127, 0.7478]}, {"w": "in", "b": [0.82, 0.7327, 0.8357, 0.7478]}, {"w": "the", "b": [0.843, 0.7327, 0.8691, 0.7478]}, {"w": "literature.", "b": [0.1312, 0.7508, 0.2113, 0.7658]}]}, {"id": "b_12", "type": "paragraph", "text": "2.2.1 The Unknowns", "words": [{"w": "2.2.1", "b": [0.1312, 0.7986, 0.1749, 0.8136]}, {"w": "The", "b": [0.1961, 0.7986, 0.2324, 0.8136]}, {"w": "Unknowns", "b": [0.2394, 0.7986, 0.336, 0.8136]}]}, {"id": "b_13", "type": "paragraph", "text": "There are several major unknowns that are almost impossible to guess with confidence unless you worked on a similar project in the past or read about such a project. The unknowns are:", "words": [{"w": "There", "b": [0.1306, 0.8353, 0.1769, 0.8501]}, {"w": "are", "b": [0.1827, 0.8353, 0.2069, 0.8501]}, {"w": "several", "b": [0.2128, 0.8353, 0.2662, 0.8501]}, {"w": "major", "b": [0.2721, 0.8353, 0.3184, 0.8501]}, {"w": "unknowns", "b": [0.3243, 0.8353, 0.4028, 0.8501]}, {"w": "that", "b": [0.4087, 0.8353, 0.4418, 0.8501]}, {"w": "are", "b": [0.4477, 0.8353, 0.4719, 0.8501]}, {"w": "almost", "b": [0.4778, 0.8353, 0.5301, 0.8501]}, {"w": "impossible", "b": [0.536, 0.8353, 0.6181, 0.8501]}, {"w": "to", "b": [0.624, 0.8353, 0.6401, 0.8501]}, {"w": "guess", "b": [0.646, 0.8353, 0.6874, 0.8501]}, {"w": "with", "b": [0.6933, 0.8353, 0.7285, 0.8501]}, {"w": "confidence", "b": [0.7344, 0.8353, 0.8158, 0.8501]}, {"w": "unless", "b": [0.8217, 0.8353, 0.8691, 0.8501]}, {"w": "you", "b": [0.1308, 0.8533, 0.1589, 0.8681]}, {"w": "worked", "b": [0.1651, 0.8533, 0.2209, 0.8681]}, {"w": "on", "b": [0.2271, 0.8533, 0.2462, 0.8681]}, {"w": "a", "b": [0.2523, 0.8533, 0.2614, 0.8681]}, {"w": "similar", "b": [0.2675, 0.8533, 0.321, 0.8681]}, {"w": "project", "b": [0.3271, 0.8533, 0.3825, 0.8681]}, {"w": "in", "b": [0.3887, 0.8533, 0.4038, 0.8681]}, {"w": "the", "b": [0.4099, 0.8533, 0.4351, 0.8681]}, {"w": "past", "b": [0.4412, 0.8533, 0.4745, 0.8681]}, {"w": "or", "b": [0.4807, 0.8533, 0.4968, 0.8681]}, {"w": "read", "b": [0.503, 0.8533, 0.5372, 0.8681]}, {"w": "about", "b": [0.5434, 0.8533, 0.5892, 0.8681]}, {"w": "such", "b": [0.5953, 0.8533, 0.6301, 0.8681]}, {"w": "a", "b": [0.6363, 0.8533, 0.6453, 0.8681]}, {"w": "project.", "b": [0.6515, 0.8533, 0.7119, 0.8681]}, {"w": "The", "b": [0.7201, 0.8533, 0.7513, 0.8681]}, {"w": "unknowns", "b": [0.7574, 0.8533, 0.836, 0.8681]}, {"w": "are:", "b": [0.8421, 0.8533, 0.8714, 0.8681]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "4", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 34, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Accuracy", "words": [{"w": "Accuracy", "b": [0.4805, 0.4025, 0.5519, 0.4193]}]}, {"id": "b_1", "type": "paragraph", "text": "Cost", "words": [{"w": "Cost", "b": [0.2803, 0.2045, 0.3009, 0.2322]}]}, {"id": "b_2", "type": "paragraph", "text": "80% 90% 99% 99.9%", "words": [{"w": "80%", "b": [0.3519, 0.3707, 0.3861, 0.3875]}, {"w": "90%", "b": [0.4599, 0.3707, 0.494, 0.3875]}, {"w": "99%", "b": [0.5482, 0.3707, 0.5823, 0.3875]}, {"w": "99.9%", "b": [0.5991, 0.3707, 0.6472, 0.3875]}]}, {"id": "b_3", "type": "paragraph", "text": "Figure 1: Superlinear growth of the cost as a function of accuracy requirement.", "words": [{"w": "Figure", "b": [0.1795, 0.4352, 0.2316, 0.4502]}, {"w": "1:", "b": [0.2378, 0.4352, 0.2521, 0.4502]}, {"w": "Superlinear", "b": [0.2604, 0.4352, 0.3522, 0.4502]}, {"w": "growth", "b": [0.3584, 0.4352, 0.4143, 0.4502]}, {"w": "of", "b": [0.4205, 0.4352, 0.4353, 0.4502]}, {"w": "the", "b": [0.4415, 0.4352, 0.4671, 0.4502]}, {"w": "cost", "b": [0.4733, 0.4352, 0.5052, 0.4502]}, {"w": "as", "b": [0.5113, 0.4352, 0.5278, 0.4502]}, {"w": "a", "b": [0.534, 0.4352, 0.5432, 0.4502]}, {"w": "function", "b": [0.5494, 0.4352, 0.6155, 0.4502]}, {"w": "of", "b": [0.6217, 0.4352, 0.6365, 0.4502]}, {"w": "accuracy", "b": [0.6427, 0.4352, 0.713, 0.4502]}, {"w": "requirement.", "b": [0.7191, 0.4352, 0.8208, 0.4502]}]}, {"id": "b_4", "type": "paragraph", "text": "• whether the required quality is attainable in practice, • how much data you will need to reach the required quality, • what features and how many features are necessary so that the model can learn and generalize sufficiently, • how large the model should be (especially relevant for neural networks and ensemble architectures), and • how long will it take to train one model (in other words, how much time is needed to run one experiment) and how many experiments will be required to reach the desired level of performance.", "words": [{"w": "•", "b": [0.1538, 0.4855, 0.1681, 0.5005]}, {"w": "whether", "b": [0.1774, 0.4855, 0.242, 0.5005]}, {"w": "the", "b": [0.2482, 0.4855, 0.2738, 0.5005]}, {"w": "required", "b": [0.28, 0.4855, 0.3462, 0.5005]}, {"w": "quality", "b": [0.3524, 0.4855, 0.4083, 0.5005]}, {"w": "is", "b": [0.4144, 0.4855, 0.4268, 0.5005]}, {"w": "attainable", "b": [0.433, 0.4855, 0.514, 0.5005]}, {"w": "in", "b": [0.5201, 0.4855, 0.5355, 0.5005]}, {"w": "practice,", "b": [0.5417, 0.4855, 0.6104, 0.5005]}, {"w": "•", "b": [0.1538, 0.5034, 0.1681, 0.5184]}, {"w": "how", "b": [0.1774, 0.5034, 0.2096, 0.5184]}, {"w": "much", "b": [0.2158, 0.5034, 0.2589, 0.5184]}, {"w": "data", "b": [0.265, 0.5034, 0.3009, 0.5184]}, {"w": "you", "b": [0.307, 0.5034, 0.3358, 0.5184]}, {"w": "will", "b": [0.3419, 0.5034, 0.3706, 0.5184]}, {"w": "need", "b": [0.3768, 0.5034, 0.4137, 0.5184]}, {"w": "to", "b": [0.4198, 0.5034, 0.4362, 0.5184]}, {"w": "reach", "b": [0.4424, 0.5034, 0.485, 0.5184]}, {"w": "the", "b": [0.4912, 0.5034, 0.5168, 0.5184]}, {"w": "required", "b": [0.5229, 0.5034, 0.5892, 0.5184]}, {"w": "quality,", "b": [0.5954, 0.5034, 0.6548, 0.5184]}, {"w": "•", "b": [0.1538, 0.5214, 0.1681, 0.5363]}, {"w": "what", "b": [0.1774, 0.5213, 0.2181, 0.5364]}, {"w": "features", "b": [0.2242, 0.5213, 0.2886, 0.5364]}, {"w": "and", "b": [0.2947, 0.5213, 0.325, 0.5364]}, {"w": "how", "b": [0.3311, 0.5213, 0.364, 0.5364]}, {"w": "many", "b": [0.3701, 0.5213, 0.415, 0.5364]}, {"w": "features", "b": [0.4212, 0.5213, 0.4855, 0.5364]}, {"w": "are", "b": [0.4917, 0.5213, 0.5168, 0.5364]}, {"w": "necessary", "b": [0.5229, 0.5213, 0.6, 0.5364]}, {"w": "so", "b": [0.6061, 0.5213, 0.6229, 0.5364]}, {"w": "that", "b": [0.629, 0.5213, 0.6635, 0.5364]}, {"w": "the", "b": [0.6696, 0.5213, 0.6957, 0.5364]}, {"w": "model", "b": [0.7019, 0.5213, 0.7514, 0.5364]}, {"w": "can", "b": [0.7576, 0.5213, 0.7858, 0.5364]}, {"w": "learn", "b": [0.7919, 0.5213, 0.8327, 0.5364]}, {"w": "and", "b": [0.8388, 0.5213, 0.8691, 0.5364]}, {"w": "generalize", "b": [0.1774, 0.5393, 0.2564, 0.5543]}, {"w": "sufficiently,", "b": [0.2625, 0.5393, 0.3524, 0.5543]}, {"w": "•", "b": [0.1538, 0.5573, 0.1681, 0.5722]}, {"w": "how", "b": [0.1774, 0.5572, 0.21, 0.5723]}, {"w": "large", "b": [0.2162, 0.5572, 0.2557, 0.5723]}, {"w": "the", "b": [0.2618, 0.5572, 0.2877, 0.5723]}, {"w": "model", "b": [0.2939, 0.5572, 0.3431, 0.5723]}, {"w": "should", "b": [0.3493, 0.5572, 0.4023, 0.5723]}, {"w": "be", "b": [0.4084, 0.5572, 0.4276, 0.5723]}, {"w": "(especially", "b": [0.4338, 0.5572, 0.519, 0.5723]}, {"w": "relevant", "b": [0.5251, 0.5572, 0.5895, 0.5723]}, {"w": "for", "b": [0.5957, 0.5572, 0.618, 0.5723]}, {"w": "neural", "b": [0.6241, 0.5572, 0.6751, 0.5723]}, {"w": "networks", "b": [0.6812, 0.5572, 0.7535, 0.5723]}, {"w": "and", "b": [0.7596, 0.5572, 0.7897, 0.5723]}, {"w": "ensemble", "b": [0.7958, 0.5572, 0.8691, 0.5723]}, {"w": "architectures),", "b": [0.1774, 0.5752, 0.293, 0.5902]}, {"w": "and", "b": [0.2991, 0.5752, 0.3288, 0.5902]}, {"w": "•", "b": [0.1538, 0.5932, 0.1681, 0.6081]}, {"w": "how", "b": [0.1774, 0.5932, 0.2098, 0.6081]}, {"w": "long", "b": [0.2159, 0.5932, 0.2499, 0.6081]}, {"w": "will", "b": [0.256, 0.5932, 0.2849, 0.6081]}, {"w": "it", "b": [0.291, 0.5932, 0.3034, 0.6081]}, {"w": "take", "b": [0.3095, 0.5932, 0.3435, 0.6081]}, {"w": "to", "b": [0.3496, 0.5932, 0.3661, 0.6081]}, {"w": "train", "b": [0.3722, 0.5932, 0.4114, 0.6081]}, {"w": "one", "b": [0.4176, 0.5932, 0.4454, 0.6081]}, {"w": "model", "b": [0.4515, 0.5932, 0.5004, 0.6081]}, {"w": "(in", "b": [0.5065, 0.5932, 0.5292, 0.6081]}, {"w": "other", "b": [0.5353, 0.5932, 0.5776, 0.6081]}, {"w": "words,", "b": [0.5838, 0.5932, 0.6359, 0.6081]}, {"w": "how", "b": [0.642, 0.5932, 0.6745, 0.6081]}, {"w": "much", "b": [0.6806, 0.5932, 0.7239, 0.6081]}, {"w": "time", "b": [0.73, 0.5932, 0.766, 0.6081]}, {"w": "is", "b": [0.7722, 0.5932, 0.7846, 0.6081]}, {"w": "needed", "b": [0.7908, 0.5932, 0.8464, 0.6081]}, {"w": "to", "b": [0.8525, 0.5932, 0.869, 0.6081]}, {"w": "run", "b": [0.1774, 0.6112, 0.2046, 0.626]}, {"w": "one", "b": [0.2104, 0.6112, 0.2376, 0.626]}, {"w": "experiment)", "b": [0.2434, 0.6111, 0.355, 0.626]}, {"w": "and", "b": [0.3609, 0.6112, 0.39, 0.626]}, {"w": "how", "b": [0.3959, 0.6112, 0.4276, 0.626]}, {"w": "many", "b": [0.4335, 0.6112, 0.4766, 0.626]}, {"w": "experiments", "b": [0.4825, 0.6112, 0.5777, 0.626]}, {"w": "will", "b": [0.5836, 0.6112, 0.6117, 0.626]}, {"w": "be", "b": [0.6176, 0.6112, 0.6362, 0.626]}, {"w": "required", "b": [0.6421, 0.6112, 0.707, 0.626]}, {"w": "to", "b": [0.7129, 0.6112, 0.729, 0.626]}, {"w": "reach", "b": [0.7349, 0.6112, 0.7767, 0.626]}, {"w": "the", "b": [0.7825, 0.6112, 0.8077, 0.626]}, {"w": "desired", "b": [0.8136, 0.6112, 0.869, 0.626]}, {"w": "level", "b": [0.1774, 0.6291, 0.2133, 0.644]}, {"w": "of", "b": [0.2194, 0.6291, 0.2343, 0.644]}, {"w": "performance.", "b": [0.2404, 0.6291, 0.3451, 0.644]}]}, {"id": "b_5", "type": "paragraph", "text": "One thing you can almost be sure of: if the required level of model accuracy (one of the popular model quality metrics we consider in Section ?? of Chapter 5) is above 99%, you can expect complications related to an insufficient quantity of labeled data. In some problems, even 95% accuracy is considered very hard to reach. (Here we assume, of course, that the data is balanced, that is, there’s no class imbalance. We will discuss class imbalance in Section ?? of the next chapter.)", "words": [{"w": "One", "b": [0.1312, 0.6559, 0.1647, 0.671]}, {"w": "thing", "b": [0.1712, 0.6559, 0.2141, 0.671]}, {"w": "you", "b": [0.2205, 0.6559, 0.2498, 0.671]}, {"w": "can", "b": [0.2563, 0.6559, 0.2845, 0.671]}, {"w": "almost", "b": [0.291, 0.6559, 0.3455, 0.671]}, {"w": "be", "b": [0.3519, 0.6559, 0.3713, 0.671]}, {"w": "sure", "b": [0.3778, 0.6559, 0.4114, 0.671]}, {"w": "of:", "b": [0.4179, 0.6559, 0.4383, 0.671]}, {"w": "if", "b": [0.4471, 0.6559, 0.4581, 0.671]}, {"w": "the", "b": [0.4645, 0.6559, 0.4907, 0.671]}, {"w": "required", "b": [0.4972, 0.6559, 0.5647, 0.671]}, {"w": "level", "b": [0.5712, 0.6559, 0.6078, 0.671]}, {"w": "of", "b": [0.6143, 0.6559, 0.6295, 0.671]}, {"w": "model", "b": [0.6359, 0.6559, 0.6856, 0.671]}, {"w": "accuracy", "b": [0.6919, 0.656, 0.7725, 0.6709]}, {"w": "(one", "b": [0.779, 0.6559, 0.8146, 0.671]}, {"w": "of", "b": [0.821, 0.6559, 0.8362, 0.671]}, {"w": "the", "b": [0.8427, 0.6559, 0.8688, 0.671]}, {"w": "popular", "b": [0.1312, 0.6741, 0.1921, 0.6889]}, {"w": "model", "b": [0.1979, 0.6741, 0.2457, 0.6889]}, {"w": "quality", "b": [0.2515, 0.6741, 0.3063, 0.6889]}, {"w": "metrics", "b": [0.3122, 0.6741, 0.3696, 0.6889]}, {"w": "we", "b": [0.3754, 0.6741, 0.396, 0.6889]}, {"w": "consider", "b": [0.4019, 0.6741, 0.4664, 0.6889]}, {"w": "in", "b": [0.4722, 0.6741, 0.4873, 0.6889]}, {"w": "Section", "b": [0.4932, 0.6741, 0.5505, 0.6889]}, {"w": "??", "b": [0.5561, 0.6739, 0.5761, 0.6889]}, {"w": "of", "b": [0.582, 0.6741, 0.5966, 0.6889]}, {"w": "Chapter", "b": [0.6024, 0.6741, 0.6668, 0.6889]}, {"w": "5)", "b": [0.6727, 0.6741, 0.6887, 0.6889]}, {"w": "is", "b": [0.6946, 0.6741, 0.7067, 0.6889]}, {"w": "above", "b": [0.7126, 0.6741, 0.7578, 0.6889]}, {"w": "99%,", "b": [0.7636, 0.6741, 0.8018, 0.6889]}, {"w": "you", "b": [0.8077, 0.6741, 0.8358, 0.6889]}, {"w": "can", "b": [0.8417, 0.6741, 0.8688, 0.6889]}, {"w": "expect", "b": [0.1312, 0.6918, 0.1842, 0.7069]}, {"w": "complications", "b": [0.1904, 0.6918, 0.3016, 0.7069]}, {"w": "related", "b": [0.3078, 0.6918, 0.364, 0.7069]}, {"w": "to", "b": [0.3701, 0.6918, 0.3868, 0.7069]}, {"w": "an", "b": [0.3929, 0.6918, 0.4127, 0.7069]}, {"w": "insufficient", "b": [0.4188, 0.6918, 0.5067, 0.7069]}, {"w": "quantity", "b": [0.5129, 0.6918, 0.5815, 0.7069]}, {"w": "of", "b": [0.5876, 0.6918, 0.6027, 0.7069]}, {"w": "labeled", "b": [0.6089, 0.6918, 0.6665, 0.7069]}, {"w": "data.", "b": [0.6727, 0.6918, 0.7142, 0.7069]}, {"w": "In", "b": [0.7225, 0.6918, 0.7396, 0.7069]}, {"w": "some", "b": [0.7458, 0.6918, 0.7864, 0.7069]}, {"w": "problems,", "b": [0.7926, 0.6918, 0.8717, 0.7069]}, {"w": "even", "b": [0.1312, 0.7097, 0.1679, 0.7248]}, {"w": "95%", "b": [0.174, 0.7097, 0.2085, 0.7248]}, {"w": "accuracy", "b": [0.2147, 0.7097, 0.2864, 0.7248]}, {"w": "is", "b": [0.2926, 0.7097, 0.3052, 0.7248]}, {"w": "considered", "b": [0.3114, 0.7097, 0.3973, 0.7248]}, {"w": "very", "b": [0.4035, 0.7097, 0.4386, 0.7248]}, {"w": "hard", "b": [0.4448, 0.7097, 0.4825, 0.7248]}, {"w": "to", "b": [0.4887, 0.7097, 0.5054, 0.7248]}, {"w": "reach.", "b": [0.5116, 0.7097, 0.5603, 0.7248]}, {"w": "(Here", "b": [0.5686, 0.7097, 0.6141, 0.7248]}, {"w": "we", "b": [0.6203, 0.7097, 0.6417, 0.7248]}, {"w": "assume,", "b": [0.6479, 0.7097, 0.7119, 0.7248]}, {"w": "of", "b": [0.7181, 0.7097, 0.7333, 0.7248]}, {"w": "course,", "b": [0.7394, 0.7097, 0.7961, 0.7248]}, {"w": "that", "b": [0.8023, 0.7097, 0.8368, 0.7248]}, {"w": "the", "b": [0.843, 0.7097, 0.8691, 0.7248]}, {"w": "data", "b": [0.1312, 0.7277, 0.1678, 0.7428]}, {"w": "is", "b": [0.1744, 0.7277, 0.1871, 0.7428]}, {"w": "balanced,", "b": [0.1937, 0.7277, 0.2711, 0.7428]}, {"w": "that", "b": [0.2778, 0.7277, 0.3123, 0.7428]}, {"w": "is,", "b": [0.3189, 0.7277, 0.3368, 0.7428]}, {"w": "there’s", "b": [0.3435, 0.7277, 0.3981, 0.7428]}, {"w": "no", "b": [0.4047, 0.7277, 0.4246, 0.7428]}, {"w": "class", "b": [0.431, 0.7277, 0.4734, 0.7427]}, {"w": "imbalance.", "b": [0.481, 0.7277, 0.5784, 0.7428]}, {"w": "We", "b": [0.588, 0.7277, 0.6141, 0.7428]}, {"w": "will", "b": [0.6208, 0.7277, 0.65, 0.7428]}, {"w": "discuss", "b": [0.6566, 0.7277, 0.7135, 0.7428]}, {"w": "class", "b": [0.7201, 0.7277, 0.7579, 0.7428]}, {"w": "imbalance", "b": [0.7645, 0.7277, 0.8466, 0.7428]}, {"w": "in", "b": [0.8532, 0.7277, 0.8689, 0.7428]}, {"w": "Section", "b": [0.1312, 0.7457, 0.1897, 0.7607]}, {"w": "??", "b": [0.1958, 0.7457, 0.2158, 0.7606]}, {"w": "of", "b": [0.222, 0.7457, 0.2369, 0.7607]}, {"w": "the", "b": [0.243, 0.7457, 0.2687, 0.7607]}, {"w": "next", "b": [0.2748, 0.7457, 0.3102, 0.7607]}, {"w": "chapter.)", "b": [0.3163, 0.7457, 0.3887, 0.7607]}]}, {"id": "b_6", "type": "paragraph", "text": "Another useful reference is the human performance on the task. This is typically a hard problem if you want your model to perform as well as a human.", "words": [{"w": "Another", "b": [0.1305, 0.7725, 0.1981, 0.7876]}, {"w": "useful", "b": [0.2051, 0.7725, 0.2528, 0.7876]}, {"w": "reference", "b": [0.2598, 0.7725, 0.3326, 0.7876]}, {"w": "is", "b": [0.3396, 0.7725, 0.3523, 0.7876]}, {"w": "the", "b": [0.3593, 0.7725, 0.3854, 0.7876]}, {"w": "human", "b": [0.3924, 0.7725, 0.4484, 0.7876]}, {"w": "performance", "b": [0.4554, 0.7725, 0.5569, 0.7876]}, {"w": "on", "b": [0.5639, 0.7725, 0.5838, 0.7876]}, {"w": "the", "b": [0.5908, 0.7725, 0.617, 0.7876]}, {"w": "task.", "b": [0.624, 0.7725, 0.6633, 0.7876]}, {"w": "This", "b": [0.674, 0.7725, 0.7108, 0.7876]}, {"w": "is", "b": [0.7178, 0.7725, 0.7304, 0.7876]}, {"w": "typically", "b": [0.7374, 0.7725, 0.808, 0.7876]}, {"w": "a", "b": [0.815, 0.7725, 0.8244, 0.7876]}, {"w": "hard", "b": [0.8314, 0.7725, 0.8691, 0.7876]}, {"w": "problem", "b": [0.1312, 0.7906, 0.1969, 0.8056]}, {"w": "if", "b": [0.2031, 0.7906, 0.2138, 0.8056]}, {"w": "you", "b": [0.22, 0.7906, 0.2487, 0.8056]}, {"w": "want", "b": [0.2548, 0.7906, 0.2938, 0.8056]}, {"w": "your", "b": [0.3, 0.7906, 0.3359, 0.8056]}, {"w": "model", "b": [0.342, 0.7906, 0.3907, 0.8056]}, {"w": "to", "b": [0.3969, 0.7906, 0.4133, 0.8056]}, {"w": "perform", "b": [0.4194, 0.7906, 0.4831, 0.8056]}, {"w": "as", "b": [0.4893, 0.7906, 0.5058, 0.8056]}, {"w": "well", "b": [0.5119, 0.7906, 0.5432, 0.8056]}, {"w": "as", "b": [0.5493, 0.7906, 0.5659, 0.8056]}, {"w": "a", "b": [0.572, 0.7906, 0.5812, 0.8056]}, {"w": "human.", "b": [0.5874, 0.7906, 0.6474, 0.8056]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "5", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 35, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2.2.2 Simplifying the Problem", "words": [{"w": "2.2.2", "b": [0.1312, 0.0884, 0.1749, 0.1033]}, {"w": "Simplifying", "b": [0.1961, 0.0884, 0.301, 0.1033]}, {"w": "the", "b": [0.3081, 0.0884, 0.3378, 0.1033]}, {"w": "Problem", "b": [0.3449, 0.0884, 0.4239, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "One way to make a more educated guess is to simplify the problem and solve a simpler problem first. For example, assume that the problem is that of classifying a set of documents into 1000 topics. Run a pilot project by focusing on 10 topics first, by considering documents belonging to other 990 topics as “Other.”1 Manually label the data for these 11 classes (10 real topics, plus “Other”). The logic here is that it’s much simpler for a human to keep in mind the definitions of only 10 topics compared to memorizing the difference between 1000 topics2.", "words": [{"w": "One", "b": [0.1312, 0.1249, 0.1647, 0.14]}, {"w": "way", "b": [0.1722, 0.1249, 0.2041, 0.14]}, {"w": "to", "b": [0.2116, 0.1249, 0.2283, 0.14]}, {"w": "make", "b": [0.2358, 0.1249, 0.2787, 0.14]}, {"w": "a", "b": [0.2862, 0.1249, 0.2956, 0.14]}, {"w": "more", "b": [0.303, 0.1249, 0.3439, 0.14]}, {"w": "educated", "b": [0.3514, 0.1249, 0.4246, 0.14]}, {"w": "guess", "b": [0.4321, 0.1249, 0.4752, 0.14]}, {"w": "is", "b": [0.4827, 0.1249, 0.4953, 0.14]}, {"w": "to", "b": [0.5028, 0.1249, 0.5195, 0.14]}, {"w": "simplify", "b": [0.527, 0.1249, 0.592, 0.14]}, {"w": "the", "b": [0.5995, 0.1249, 0.6256, 0.14]}, {"w": "problem", "b": [0.6331, 0.1249, 0.7001, 0.14]}, {"w": "and", "b": [0.7076, 0.1249, 0.7379, 0.14]}, {"w": "solve", "b": [0.7454, 0.1249, 0.7853, 0.14]}, {"w": "a", "b": [0.7928, 0.1249, 0.8022, 0.14]}, {"w": "simpler", "b": [0.8096, 0.1249, 0.8694, 0.14]}, {"w": "problem", "b": [0.1312, 0.143, 0.1956, 0.1578]}, {"w": "first.", "b": [0.2015, 0.143, 0.2379, 0.1578]}, {"w": "For", "b": [0.246, 0.143, 0.2724, 0.1578]}, {"w": "example,", "b": [0.2783, 0.143, 0.3481, 0.1578]}, {"w": "assume", "b": [0.3541, 0.143, 0.4106, 0.1578]}, {"w": "that", "b": [0.4165, 0.143, 0.4496, 0.1578]}, {"w": "the", "b": [0.4555, 0.143, 0.4807, 0.1578]}, {"w": "problem", "b": [0.4866, 0.143, 0.5509, 0.1578]}, {"w": "is", "b": [0.5569, 0.143, 0.569, 0.1578]}, {"w": "that", "b": [0.5749, 0.143, 0.6081, 0.1578]}, {"w": "of", "b": [0.614, 0.143, 0.6286, 0.1578]}, {"w": "classifying", "b": [0.6345, 0.143, 0.7151, 0.1578]}, {"w": "a", "b": [0.721, 0.143, 0.7301, 0.1578]}, {"w": "set", "b": [0.736, 0.143, 0.7582, 0.1578]}, {"w": "of", "b": [0.7641, 0.143, 0.7787, 0.1578]}, {"w": "documents", "b": [0.7846, 0.143, 0.8691, 0.1578]}, {"w": "into", "b": [0.1312, 0.161, 0.1619, 0.1758]}, {"w": "1000", "b": [0.1678, 0.161, 0.2039, 0.1758]}, {"w": "topics.", "b": [0.2098, 0.161, 0.2612, 0.1758]}, {"w": "Run", "b": [0.2693, 0.161, 0.3022, 0.1758]}, {"w": "a", "b": [0.3081, 0.161, 0.3171, 0.1758]}, {"w": "pilot", "b": [0.323, 0.161, 0.3592, 0.1758]}, {"w": "project", "b": [0.3651, 0.161, 0.4204, 0.1758]}, {"w": "by", "b": [0.4263, 0.161, 0.4454, 0.1758]}, {"w": "focusing", "b": [0.4513, 0.161, 0.5157, 0.1758]}, {"w": "on", "b": [0.5216, 0.161, 0.5407, 0.1758]}, {"w": "10", "b": [0.5465, 0.161, 0.5645, 0.1758]}, {"w": "topics", "b": [0.5704, 0.161, 0.6168, 0.1758]}, {"w": "first,", "b": [0.6227, 0.161, 0.659, 0.1758]}, {"w": "by", "b": [0.6649, 0.161, 0.684, 0.1758]}, {"w": "considering", "b": [0.6899, 0.161, 0.7785, 0.1758]}, {"w": "documents", "b": [0.7844, 0.161, 0.8689, 0.1758]}, {"w": "belonging", "b": [0.1312, 0.1788, 0.2093, 0.1938]}, {"w": "to", "b": [0.2155, 0.1788, 0.2321, 0.1938]}, {"w": "other", "b": [0.2382, 0.1788, 0.2807, 0.1938]}, {"w": "990", "b": [0.2868, 0.1788, 0.3147, 0.1938]}, {"w": "topics", "b": [0.3209, 0.1788, 0.3686, 0.1938]}, {"w": "as", "b": [0.3747, 0.1788, 0.3914, 0.1938]}, {"w": "“Other.”1", "b": [0.3975, 0.1769, 0.4727, 0.1938]}, {"w": "Manually", "b": [0.4818, 0.1788, 0.5579, 0.1938]}, {"w": "label", "b": [0.564, 0.1788, 0.6028, 0.1938]}, {"w": "the", "b": [0.609, 0.1788, 0.6349, 0.1938]}, {"w": "data", "b": [0.641, 0.1788, 0.6772, 0.1938]}, {"w": "for", "b": [0.6834, 0.1788, 0.7057, 0.1938]}, {"w": "these", "b": [0.7119, 0.1788, 0.7534, 0.1938]}, {"w": "11", "b": [0.7594, 0.1788, 0.778, 0.1938]}, {"w": "classes", "b": [0.7842, 0.1788, 0.8373, 0.1938]}, {"w": "(10", "b": [0.8434, 0.1788, 0.8692, 0.1938]}, {"w": "real", "b": [0.1312, 0.1966, 0.1616, 0.2117]}, {"w": "topics,", "b": [0.1688, 0.1966, 0.2223, 0.2117]}, {"w": "plus", "b": [0.2298, 0.1966, 0.2634, 0.2117]}, {"w": "“Other”).", "b": [0.2706, 0.1966, 0.3491, 0.2117]}, {"w": "The", "b": [0.3605, 0.1966, 0.3929, 0.2117]}, {"w": "logic", "b": [0.4001, 0.1966, 0.4378, 0.2117]}, {"w": "here", "b": [0.445, 0.1966, 0.4796, 0.2117]}, {"w": "is", "b": [0.4868, 0.1966, 0.4994, 0.2117]}, {"w": "that", "b": [0.5067, 0.1966, 0.5412, 0.2117]}, {"w": "it’s", "b": [0.5484, 0.1966, 0.5736, 0.2117]}, {"w": "much", "b": [0.5808, 0.1966, 0.6248, 0.2117]}, {"w": "simpler", "b": [0.632, 0.1966, 0.6918, 0.2117]}, {"w": "for", "b": [0.699, 0.1966, 0.7215, 0.2117]}, {"w": "a", "b": [0.7287, 0.1966, 0.7381, 0.2117]}, {"w": "human", "b": [0.7453, 0.1966, 0.8013, 0.2117]}, {"w": "to", "b": [0.8085, 0.1966, 0.8253, 0.2117]}, {"w": "keep", "b": [0.8325, 0.1966, 0.8691, 0.2117]}, {"w": "in", "b": [0.1312, 0.2146, 0.1469, 0.2297]}, {"w": "mind", "b": [0.1539, 0.2146, 0.1957, 0.2297]}, {"w": "the", "b": [0.2026, 0.2146, 0.2288, 0.2297]}, {"w": "definitions", "b": [0.2357, 0.2146, 0.3205, 0.2297]}, {"w": "of", "b": [0.3275, 0.2146, 0.3426, 0.2297]}, {"w": "only", "b": [0.3495, 0.2146, 0.3846, 0.2297]}, {"w": "10", "b": [0.3914, 0.2146, 0.4102, 0.2297]}, {"w": "topics", "b": [0.4171, 0.2146, 0.4654, 0.2297]}, {"w": "compared", "b": [0.4723, 0.2146, 0.5518, 0.2297]}, {"w": "to", "b": [0.5588, 0.2146, 0.5755, 0.2297]}, {"w": "memorizing", "b": [0.5824, 0.2146, 0.6776, 0.2297]}, {"w": "the", "b": [0.6845, 0.2146, 0.7107, 0.2297]}, {"w": "difference", "b": [0.7176, 0.2146, 0.7956, 0.2297]}, {"w": "between", "b": [0.8025, 0.2146, 0.869, 0.2297]}, {"w": "1000", "b": [0.1303, 0.2327, 0.1672, 0.2476]}, {"w": "topics2.", "b": [0.1734, 0.2307, 0.234, 0.2476]}]}, {"id": "b_2", "type": "paragraph", "text": "Once you have simplified your problem to 11 classes, solve it, and measure time on every stage. Once you see that the problem for 11 classes is solvable, you can reasonably hope that it will be solvable for 1000 classes as well. Your saved measurements can then be used to estimate the time required to solve the full problem, though you cannot simply multiply this time by 100 to get an accurate estimate. The quantity of data needed to learn to distinguish between more classes usually grows superlinearly with the number of classes.", "words": [{"w": "Once", "b": [0.1312, 0.2595, 0.1731, 0.2746]}, {"w": "you", "b": [0.1796, 0.2595, 0.2089, 0.2746]}, {"w": "have", "b": [0.2155, 0.2595, 0.2526, 0.2746]}, {"w": "simplified", "b": [0.2592, 0.2595, 0.3378, 0.2746]}, {"w": "your", "b": [0.3443, 0.2595, 0.381, 0.2746]}, {"w": "problem", "b": [0.3875, 0.2595, 0.4545, 0.2746]}, {"w": "to", "b": [0.4611, 0.2595, 0.4778, 0.2746]}, {"w": "11", "b": [0.4842, 0.2595, 0.503, 0.2746]}, {"w": "classes,", "b": [0.5096, 0.2595, 0.5685, 0.2746]}, {"w": "solve", "b": [0.5752, 0.2595, 0.615, 0.2746]}, {"w": "it,", "b": [0.6216, 0.2595, 0.6394, 0.2746]}, {"w": "and", "b": [0.646, 0.2595, 0.6764, 0.2746]}, {"w": "measure", "b": [0.6829, 0.2595, 0.75, 0.2746]}, {"w": "time", "b": [0.7566, 0.2595, 0.7932, 0.2746]}, {"w": "on", "b": [0.7997, 0.2595, 0.8196, 0.2746]}, {"w": "every", "b": [0.8262, 0.2595, 0.8696, 0.2746]}, {"w": "stage.", "b": [0.1312, 0.2776, 0.1766, 0.2924]}, {"w": "Once", "b": [0.1847, 0.2776, 0.2249, 0.2924]}, {"w": "you", "b": [0.2309, 0.2776, 0.259, 0.2924]}, {"w": "see", "b": [0.2651, 0.2776, 0.2883, 0.2924]}, {"w": "that", "b": [0.2943, 0.2776, 0.3275, 0.2924]}, {"w": "the", "b": [0.3335, 0.2776, 0.3586, 0.2924]}, {"w": "problem", "b": [0.3646, 0.2776, 0.429, 0.2924]}, {"w": "for", "b": [0.435, 0.2776, 0.4566, 0.2924]}, {"w": "11", "b": [0.4625, 0.2776, 0.4805, 0.2924]}, {"w": "classes", "b": [0.4866, 0.2776, 0.5381, 0.2924]}, {"w": "is", "b": [0.5441, 0.2776, 0.5563, 0.2924]}, {"w": "solvable,", "b": [0.5623, 0.2776, 0.6292, 0.2924]}, {"w": "you", "b": [0.6353, 0.2776, 0.6634, 0.2924]}, {"w": "can", "b": [0.6694, 0.2776, 0.6965, 0.2924]}, {"w": "reasonably", "b": [0.7025, 0.2776, 0.7866, 0.2924]}, {"w": "hope", "b": [0.7926, 0.2776, 0.8303, 0.2924]}, {"w": "that", "b": [0.8363, 0.2776, 0.8695, 0.2924]}, {"w": "it", "b": [0.1312, 0.2954, 0.1438, 0.3105]}, {"w": "will", "b": [0.1503, 0.2954, 0.1796, 0.3105]}, {"w": "be", "b": [0.186, 0.2954, 0.2054, 0.3105]}, {"w": "solvable", "b": [0.2119, 0.2954, 0.2763, 0.3105]}, {"w": "for", "b": [0.2828, 0.2954, 0.3054, 0.3105]}, {"w": "1000", "b": [0.3118, 0.2954, 0.3494, 0.3105]}, {"w": "classes", "b": [0.3559, 0.2954, 0.4096, 0.3105]}, {"w": "as", "b": [0.416, 0.2954, 0.4329, 0.3105]}, {"w": "well.", "b": [0.4394, 0.2954, 0.4765, 0.3105]}, {"w": "Your", "b": [0.4857, 0.2954, 0.5255, 0.3105]}, {"w": "saved", "b": [0.532, 0.2954, 0.5766, 0.3105]}, {"w": "measurements", "b": [0.5831, 0.2954, 0.699, 0.3105]}, {"w": "can", "b": [0.7054, 0.2954, 0.7337, 0.3105]}, {"w": "then", "b": [0.7402, 0.2954, 0.7768, 0.3105]}, {"w": "be", "b": [0.7833, 0.2954, 0.8026, 0.3105]}, {"w": "used", "b": [0.8091, 0.2954, 0.8458, 0.3105]}, {"w": "to", "b": [0.8523, 0.2954, 0.869, 0.3105]}, {"w": "estimate", "b": [0.1312, 0.3135, 0.1978, 0.3283]}, {"w": "the", "b": [0.204, 0.3135, 0.2291, 0.3283]}, {"w": "time", "b": [0.2353, 0.3135, 0.2705, 0.3283]}, {"w": "required", "b": [0.2767, 0.3135, 0.3418, 0.3283]}, {"w": "to", "b": [0.3479, 0.3135, 0.364, 0.3283]}, {"w": "solve", "b": [0.3702, 0.3135, 0.4086, 0.3283]}, {"w": "the", "b": [0.4147, 0.3135, 0.4399, 0.3283]}, {"w": "full", "b": [0.4461, 0.3135, 0.4718, 0.3283]}, {"w": "problem,", "b": [0.4779, 0.3135, 0.5475, 0.3283]}, {"w": "though", "b": [0.5536, 0.3135, 0.609, 0.3283]}, {"w": "you", "b": [0.6152, 0.3135, 0.6434, 0.3283]}, {"w": "cannot", "b": [0.6495, 0.3135, 0.7029, 0.3283]}, {"w": "simply", "b": [0.7091, 0.3135, 0.761, 0.3283]}, {"w": "multiply", "b": [0.7672, 0.3135, 0.8336, 0.3283]}, {"w": "this", "b": [0.8398, 0.3135, 0.8691, 0.3283]}, {"w": "time", "b": [0.1312, 0.3315, 0.1664, 0.3463]}, {"w": "by", "b": [0.1726, 0.3315, 0.1917, 0.3463]}, {"w": "100", "b": [0.1978, 0.3315, 0.2249, 0.3463]}, {"w": "to", "b": [0.2311, 0.3315, 0.2472, 0.3463]}, {"w": "get", "b": [0.2533, 0.3315, 0.2774, 0.3463]}, {"w": "an", "b": [0.2836, 0.3315, 0.3027, 0.3463]}, {"w": "accurate", "b": [0.3088, 0.3315, 0.3753, 0.3463]}, {"w": "estimate.", "b": [0.3814, 0.3315, 0.4529, 0.3463]}, {"w": "The", "b": [0.4611, 0.3315, 0.4923, 0.3463]}, {"w": "quantity", "b": [0.4984, 0.3315, 0.5648, 0.3463]}, {"w": "of", "b": [0.5709, 0.3315, 0.5855, 0.3463]}, {"w": "data", "b": [0.5916, 0.3315, 0.6268, 0.3463]}, {"w": "needed", "b": [0.633, 0.3315, 0.6873, 0.3463]}, {"w": "to", "b": [0.6935, 0.3315, 0.7095, 0.3463]}, {"w": "learn", "b": [0.7157, 0.3315, 0.755, 0.3463]}, {"w": "to", "b": [0.7611, 0.3315, 0.7772, 0.3463]}, {"w": "distinguish", "b": [0.7833, 0.3315, 0.8691, 0.3463]}, {"w": "between", "b": [0.1312, 0.3493, 0.1964, 0.3643]}, {"w": "more", "b": [0.2025, 0.3493, 0.2425, 0.3643]}, {"w": "classes", "b": [0.2487, 0.3493, 0.3013, 0.3643]}, {"w": "usually", "b": [0.3075, 0.3493, 0.3645, 0.3643]}, {"w": "grows", "b": [0.3706, 0.3493, 0.4164, 0.3643]}, {"w": "superlinearly", "b": [0.4226, 0.3493, 0.5264, 0.3643]}, {"w": "with", "b": [0.5325, 0.3493, 0.5684, 0.3643]}, {"w": "the", "b": [0.5746, 0.3493, 0.6002, 0.3643]}, {"w": "number", "b": [0.6063, 0.3493, 0.6674, 0.3643]}, {"w": "of", "b": [0.6736, 0.3493, 0.6884, 0.3643]}, {"w": "classes.", "b": [0.6946, 0.3493, 0.7523, 0.3643]}]}, {"id": "b_3", "type": "paragraph", "text": "An alternative way of obtaining a simpler problem from a potentially complex one is to split the problem into several simple ones by using the natural slices in the available data. For example, let an organization have customers in multiple locations. If we want to train a model that predicts something about the customers, we can try to solve that problem only for one location, or for customers in a specific age range.", "words": [{"w": "An", "b": [0.1305, 0.3763, 0.1543, 0.3912]}, {"w": "alternative", "b": [0.1604, 0.3763, 0.2453, 0.3912]}, {"w": "way", "b": [0.2514, 0.3763, 0.2822, 0.3912]}, {"w": "of", "b": [0.2884, 0.3763, 0.303, 0.3912]}, {"w": "obtaining", "b": [0.3092, 0.3763, 0.3839, 0.3912]}, {"w": "a", "b": [0.39, 0.3763, 0.3991, 0.3912]}, {"w": "simpler", "b": [0.4052, 0.3763, 0.463, 0.3912]}, {"w": "problem", "b": [0.4691, 0.3763, 0.5338, 0.3912]}, {"w": "from", "b": [0.54, 0.3763, 0.5769, 0.3912]}, {"w": "a", "b": [0.583, 0.3763, 0.5921, 0.3912]}, {"w": "potentially", "b": [0.5982, 0.3763, 0.6836, 0.3912]}, {"w": "complex", "b": [0.6897, 0.3763, 0.7549, 0.3912]}, {"w": "one", "b": [0.761, 0.3763, 0.7883, 0.3912]}, {"w": "is", "b": [0.7944, 0.3763, 0.8067, 0.3912]}, {"w": "to", "b": [0.8128, 0.3763, 0.829, 0.3912]}, {"w": "split", "b": [0.8351, 0.3763, 0.8696, 0.3912]}, {"w": "the", "b": [0.1312, 0.3941, 0.1574, 0.4092]}, {"w": "problem", "b": [0.1637, 0.3941, 0.2307, 0.4092]}, {"w": "into", "b": [0.2369, 0.3941, 0.2688, 0.4092]}, {"w": "several", "b": [0.2751, 0.3941, 0.3307, 0.4092]}, {"w": "simple", "b": [0.337, 0.3941, 0.3894, 0.4092]}, {"w": "ones", "b": [0.3957, 0.3941, 0.4313, 0.4092]}, {"w": "by", "b": [0.4376, 0.3941, 0.4575, 0.4092]}, {"w": "using", "b": [0.4638, 0.3941, 0.5068, 0.4092]}, {"w": "the", "b": [0.513, 0.3941, 0.5392, 0.4092]}, {"w": "natural", "b": [0.5455, 0.3941, 0.6051, 0.4092]}, {"w": "slices", "b": [0.6114, 0.3941, 0.6535, 0.4092]}, {"w": "in", "b": [0.6598, 0.3941, 0.6755, 0.4092]}, {"w": "the", "b": [0.6817, 0.3941, 0.7079, 0.4092]}, {"w": "available", "b": [0.7141, 0.3941, 0.7853, 0.4092]}, {"w": "data.", "b": [0.7916, 0.3941, 0.8334, 0.4092]}, {"w": "For", "b": [0.842, 0.3941, 0.8695, 0.4092]}, {"w": "example,", "b": [0.1312, 0.412, 0.2039, 0.4271]}, {"w": "let", "b": [0.2112, 0.412, 0.2321, 0.4271]}, {"w": "an", "b": [0.2392, 0.412, 0.2591, 0.4271]}, {"w": "organization", "b": [0.2661, 0.412, 0.3676, 0.4271]}, {"w": "have", "b": [0.3747, 0.412, 0.4119, 0.4271]}, {"w": "customers", "b": [0.4189, 0.412, 0.5008, 0.4271]}, {"w": "in", "b": [0.5078, 0.412, 0.5235, 0.4271]}, {"w": "multiple", "b": [0.5306, 0.412, 0.5981, 0.4271]}, {"w": "locations.", "b": [0.6051, 0.412, 0.6831, 0.4271]}, {"w": "If", "b": [0.6941, 0.412, 0.7066, 0.4271]}, {"w": "we", "b": [0.7137, 0.412, 0.7351, 0.4271]}, {"w": "want", "b": [0.7422, 0.412, 0.7819, 0.4271]}, {"w": "to", "b": [0.789, 0.412, 0.8057, 0.4271]}, {"w": "train", "b": [0.8128, 0.412, 0.8526, 0.4271]}, {"w": "a", "b": [0.8596, 0.412, 0.869, 0.4271]}, {"w": "model", "b": [0.1312, 0.43, 0.1802, 0.445]}, {"w": "that", "b": [0.1864, 0.43, 0.2204, 0.445]}, {"w": "predicts", "b": [0.2266, 0.43, 0.2907, 0.445]}, {"w": "something", "b": [0.2969, 0.43, 0.3795, 0.445]}, {"w": "about", "b": [0.3857, 0.43, 0.4326, 0.445]}, {"w": "the", "b": [0.4388, 0.43, 0.4646, 0.445]}, {"w": "customers,", "b": [0.4708, 0.43, 0.5566, 0.445]}, {"w": "we", "b": [0.5628, 0.43, 0.584, 0.445]}, {"w": "can", "b": [0.5901, 0.43, 0.618, 0.445]}, {"w": "try", "b": [0.6241, 0.43, 0.6484, 0.445]}, {"w": "to", "b": [0.6546, 0.43, 0.6711, 0.445]}, {"w": "solve", "b": [0.6773, 0.43, 0.7166, 0.445]}, {"w": "that", "b": [0.7228, 0.43, 0.7568, 0.445]}, {"w": "problem", "b": [0.763, 0.43, 0.829, 0.445]}, {"w": "only", "b": [0.8352, 0.43, 0.8698, 0.445]}, {"w": "for", "b": [0.1312, 0.448, 0.1533, 0.463]}, {"w": "one", "b": [0.1595, 0.448, 0.1872, 0.463]}, {"w": "location,", "b": [0.1933, 0.448, 0.2625, 0.463]}, {"w": "or", "b": [0.2687, 0.448, 0.2851, 0.463]}, {"w": "for", "b": [0.2913, 0.448, 0.3134, 0.463]}, {"w": "customers", "b": [0.3195, 0.448, 0.3998, 0.463]}, {"w": "in", "b": [0.4059, 0.448, 0.4213, 0.463]}, {"w": "a", "b": [0.4275, 0.448, 0.4367, 0.463]}, {"w": "specific", "b": [0.4429, 0.448, 0.5009, 0.463]}, {"w": "age", "b": [0.5071, 0.448, 0.5337, 0.463]}, {"w": "range.", "b": [0.5399, 0.448, 0.5892, 0.463]}]}, {"id": "b_4", "type": "paragraph", "text": "2.2.3 Nonlinear Progress", "words": [{"w": "2.2.3", "b": [0.1312, 0.4958, 0.1749, 0.5108]}, {"w": "Nonlinear", "b": [0.1961, 0.4958, 0.2875, 0.5108]}, {"w": "Progress", "b": [0.2945, 0.4958, 0.3742, 0.5108]}]}, {"id": "b_5", "type": "paragraph", "text": "The progress of a machine learning project is nonlinear. The prediction error usually decreases fast in the beginning, but then the progress gradually slows down.3 Sometimes you see no progress and decide to add additional features that could potentially depend on external databases or knowledge bases. While you are working on a new feature or labeling more data (or outsourcing this task), no progress in model performance is happening.", "words": [{"w": "The", "b": [0.1306, 0.5326, 0.1617, 0.5474]}, {"w": "progress", "b": [0.1667, 0.5326, 0.2313, 0.5474]}, {"w": "of", "b": [0.2363, 0.5326, 0.2509, 0.5474]}, {"w": "a", "b": [0.2559, 0.5326, 0.2649, 0.5474]}, {"w": "machine", "b": [0.2699, 0.5326, 0.3347, 0.5474]}, {"w": "learning", "b": [0.3397, 0.5326, 0.4031, 0.5474]}, {"w": "project", "b": [0.408, 0.5326, 0.4634, 0.5474]}, {"w": "is", "b": [0.4684, 0.5326, 0.4805, 0.5474]}, {"w": "nonlinear.", "b": [0.4855, 0.5326, 0.564, 0.5474]}, {"w": "The", "b": [0.5718, 0.5326, 0.6029, 0.5474]}, {"w": "prediction", "b": [0.6079, 0.5326, 0.6874, 0.5474]}, {"w": "error", "b": [0.6924, 0.5326, 0.7307, 0.5474]}, {"w": "usually", "b": [0.7357, 0.5326, 0.7916, 0.5474]}, {"w": "decreases", "b": [0.7966, 0.5326, 0.8692, 0.5474]}, {"w": "fast", "b": [0.1312, 0.5503, 0.161, 0.5654]}, {"w": "in", "b": [0.1671, 0.5503, 0.1828, 0.5654]}, {"w": "the", "b": [0.1889, 0.5503, 0.2149, 0.5654]}, {"w": "beginning,", "b": [0.2211, 0.5503, 0.3059, 0.5654]}, {"w": "but", "b": [0.3121, 0.5503, 0.3402, 0.5654]}, {"w": "then", "b": [0.3463, 0.5503, 0.3827, 0.5654]}, {"w": "the", "b": [0.3889, 0.5503, 0.4149, 0.5654]}, {"w": "progress", "b": [0.421, 0.5503, 0.488, 0.5654]}, {"w": "gradually", "b": [0.4941, 0.5503, 0.5707, 0.5654]}, {"w": "slows", "b": [0.5768, 0.5503, 0.6192, 0.5654]}, {"w": "down.3", "b": [0.6253, 0.5485, 0.6808, 0.5654]}, {"w": "Sometimes", "b": [0.6899, 0.5503, 0.7774, 0.5654]}, {"w": "you", "b": [0.7836, 0.5503, 0.8127, 0.5654]}, {"w": "see", "b": [0.8189, 0.5503, 0.8429, 0.5654]}, {"w": "no", "b": [0.8491, 0.5503, 0.8688, 0.5654]}, {"w": "progress", "b": [0.1312, 0.5682, 0.1985, 0.5833]}, {"w": "and", "b": [0.2054, 0.5682, 0.2357, 0.5833]}, {"w": "decide", "b": [0.2426, 0.5682, 0.2939, 0.5833]}, {"w": "to", "b": [0.3007, 0.5682, 0.3175, 0.5833]}, {"w": "add", "b": [0.3244, 0.5682, 0.3547, 0.5833]}, {"w": "additional", "b": [0.3616, 0.5682, 0.4442, 0.5833]}, {"w": "features", "b": [0.4511, 0.5682, 0.5156, 0.5833]}, {"w": "that", "b": [0.5225, 0.5682, 0.557, 0.5833]}, {"w": "could", "b": [0.5639, 0.5682, 0.6078, 0.5833]}, {"w": "potentially", "b": [0.6147, 0.5682, 0.7031, 0.5833]}, {"w": "depend", "b": [0.7099, 0.5682, 0.769, 0.5833]}, {"w": "on", "b": [0.7759, 0.5682, 0.7958, 0.5833]}, {"w": "external", "b": [0.8027, 0.5682, 0.8692, 0.5833]}, {"w": "databases", "b": [0.1312, 0.5864, 0.2078, 0.6012]}, {"w": "or", "b": [0.2136, 0.5864, 0.2298, 0.6012]}, {"w": "knowledge", "b": [0.2356, 0.5864, 0.317, 0.6012]}, {"w": "bases.", "b": [0.3228, 0.5864, 0.3692, 0.6012]}, {"w": "While", "b": [0.3773, 0.5864, 0.424, 0.6012]}, {"w": "you", "b": [0.4298, 0.5864, 0.458, 0.6012]}, {"w": "are", "b": [0.4638, 0.5864, 0.488, 0.6012]}, {"w": "working", "b": [0.4938, 0.5864, 0.5561, 0.6012]}, {"w": "on", "b": [0.5619, 0.5864, 0.581, 0.6012]}, {"w": "a", "b": [0.5868, 0.5864, 0.5959, 0.6012]}, {"w": "new", "b": [0.6017, 0.5864, 0.6328, 0.6012]}, {"w": "feature", "b": [0.6386, 0.5864, 0.6935, 0.6012]}, {"w": "or", "b": [0.6993, 0.5864, 0.7154, 0.6012]}, {"w": "labeling", "b": [0.7212, 0.5864, 0.783, 0.6012]}, {"w": "more", "b": [0.7889, 0.5864, 0.8281, 0.6012]}, {"w": "data", "b": [0.8339, 0.5864, 0.8691, 0.6012]}, {"w": "(or", "b": [0.1291, 0.6042, 0.1527, 0.6192]}, {"w": "outsourcing", "b": [0.1589, 0.6042, 0.2523, 0.6192]}, {"w": "this", "b": [0.2585, 0.6042, 0.2883, 0.6192]}, {"w": "task),", "b": [0.2945, 0.6042, 0.3402, 0.6192]}, {"w": "no", "b": [0.3464, 0.6042, 0.3659, 0.6192]}, {"w": "progress", "b": [0.372, 0.6042, 0.438, 0.6192]}, {"w": "in", "b": [0.4441, 0.6042, 0.4595, 0.6192]}, {"w": "model", "b": [0.4656, 0.6042, 0.5143, 0.6192]}, {"w": "performance", "b": [0.5205, 0.6042, 0.6201, 0.6192]}, {"w": "is", "b": [0.6262, 0.6042, 0.6386, 0.6192]}, {"w": "happening.", "b": [0.6448, 0.6042, 0.7335, 0.6192]}]}, {"id": "b_6", "type": "paragraph", "text": "Because of this nonlinearity of progress, you should make sure that the product owner (or the client) understands the constraints and risks. Carefully log every activity and track the time it took. This will help not only in reporting, but also in the estimation of the complexity of similar projects in the future.", "words": [{"w": "Because", "b": [0.1312, 0.6313, 0.1944, 0.6461]}, {"w": "of", "b": [0.2, 0.6313, 0.2146, 0.6461]}, {"w": "this", "b": [0.2202, 0.6313, 0.2494, 0.6461]}, {"w": "nonlinearity", "b": [0.255, 0.6313, 0.3495, 0.6461]}, {"w": "of", "b": [0.3551, 0.6313, 0.3697, 0.6461]}, {"w": "progress,", "b": [0.3753, 0.6313, 0.4449, 0.6461]}, {"w": "you", "b": [0.4506, 0.6313, 0.4787, 0.6461]}, {"w": "should", "b": [0.4843, 0.6313, 0.5357, 0.6461]}, {"w": "make", "b": [0.5413, 0.6313, 0.5825, 0.6461]}, {"w": "sure", "b": [0.588, 0.6313, 0.6204, 0.6461]}, {"w": "that", "b": [0.626, 0.6313, 0.6591, 0.6461]}, {"w": "the", "b": [0.6647, 0.6313, 0.6898, 0.6461]}, {"w": "product", "b": [0.6954, 0.6313, 0.7573, 0.6461]}, {"w": "owner", "b": [0.7629, 0.6313, 0.8097, 0.6461]}, {"w": "(or", "b": [0.8152, 0.6313, 0.8384, 0.6461]}, {"w": "the", "b": [0.844, 0.6313, 0.8691, 0.6461]}, {"w": "client)", "b": [0.1312, 0.6492, 0.1811, 0.664]}, {"w": "understands", "b": [0.1873, 0.6492, 0.2833, 0.664]}, {"w": "the", "b": [0.2895, 0.6492, 0.3147, 0.664]}, {"w": "constraints", "b": [0.3209, 0.6492, 0.4073, 0.664]}, {"w": "and", "b": [0.4135, 0.6492, 0.4427, 0.664]}, {"w": "risks.", "b": [0.4489, 0.6492, 0.49, 0.664]}, {"w": "Carefully", "b": [0.4982, 0.6492, 0.5709, 0.664]}, {"w": "log", "b": [0.577, 0.6492, 0.6002, 0.664]}, {"w": "every", "b": [0.6064, 0.6492, 0.6483, 0.664]}, {"w": "activity", "b": [0.6544, 0.6492, 0.7144, 0.664]}, {"w": "and", "b": [0.7206, 0.6492, 0.7498, 0.664]}, {"w": "track", "b": [0.756, 0.6492, 0.7963, 0.664]}, {"w": "the", "b": [0.8025, 0.6492, 0.8277, 0.664]}, {"w": "time", "b": [0.8339, 0.6492, 0.8692, 0.664]}, {"w": "it", "b": [0.1312, 0.6671, 0.1435, 0.682]}, {"w": "took.", "b": [0.1496, 0.6671, 0.1904, 0.682]}, {"w": "This", "b": [0.1986, 0.6671, 0.2344, 0.682]}, {"w": "will", "b": [0.2406, 0.6671, 0.2691, 0.682]}, {"w": "help", "b": [0.2753, 0.6671, 0.3089, 0.682]}, {"w": "not", "b": [0.3151, 0.6671, 0.3416, 0.682]}, {"w": "only", "b": [0.3477, 0.6671, 0.3819, 0.682]}, {"w": "in", "b": [0.388, 0.6671, 0.4034, 0.682]}, {"w": "reporting,", "b": [0.4095, 0.6671, 0.4887, 0.682]}, {"w": "but", "b": [0.4948, 0.6671, 0.5224, 0.682]}, {"w": "also", "b": [0.5285, 0.6671, 0.5592, 0.682]}, {"w": "in", "b": [0.5653, 0.6671, 0.5806, 0.682]}, {"w": "the", "b": [0.5868, 0.6671, 0.6123, 0.682]}, {"w": "estimation", "b": [0.6184, 0.6671, 0.7022, 0.682]}, {"w": "of", "b": [0.7083, 0.6671, 0.7231, 0.682]}, {"w": "the", "b": [0.7293, 0.6671, 0.7548, 0.682]}, {"w": "complexity", "b": [0.7609, 0.6671, 0.8481, 0.682]}, {"w": "of", "b": [0.8543, 0.6671, 0.8691, 0.682]}, {"w": "similar", "b": [0.1312, 0.685, 0.1857, 0.6999]}, {"w": "projects", "b": [0.1919, 0.685, 0.2556, 0.6999]}, {"w": "in", "b": [0.2618, 0.685, 0.2772, 0.6999]}, {"w": "the", "b": [0.2833, 0.685, 0.309, 0.6999]}, {"w": "future.", "b": [0.3151, 0.685, 0.369, 0.6999]}]}, {"id": "b_7", "type": "paragraph", "text": "1Putting examples belonging to 990 classes in one class will likely create a highly imbalanced dataset. If it’s the case, you would prefer to undersample the data in the class “Other.” We consider data undersampling in Section ?? of the next chapter.", "words": [{"w": "1Putting", "b": [0.1518, 0.7118, 0.2109, 0.7256]}, {"w": "examples", "b": [0.2153, 0.7137, 0.2764, 0.7256]}, {"w": "belonging", "b": [0.2808, 0.7137, 0.3452, 0.7256]}, {"w": "to", "b": [0.3496, 0.7137, 0.3633, 0.7256]}, {"w": "990", "b": [0.3677, 0.7137, 0.3908, 0.7256]}, {"w": "classes", "b": [0.3952, 0.7137, 0.439, 0.7256]}, {"w": "in", "b": [0.4434, 0.7137, 0.4562, 0.7256]}, {"w": "one", "b": [0.4606, 0.7137, 0.4836, 0.7256]}, {"w": "class", "b": [0.488, 0.7137, 0.5189, 0.7256]}, {"w": "will", "b": [0.5233, 0.7137, 0.5472, 0.7256]}, {"w": "likely", "b": [0.5516, 0.7137, 0.587, 0.7256]}, {"w": "create", "b": [0.5914, 0.7137, 0.6315, 0.7256]}, {"w": "a", "b": [0.6359, 0.7137, 0.6436, 0.7256]}, {"w": "highly", "b": [0.648, 0.7137, 0.6894, 0.7256]}, {"w": "imbalanced", "b": [0.6938, 0.7137, 0.7693, 0.7256]}, {"w": "dataset.", "b": [0.7737, 0.7137, 0.8267, 0.7256]}, {"w": "If", "b": [0.8334, 0.7137, 0.8437, 0.7256]}, {"w": "it’s", "b": [0.8481, 0.7137, 0.8686, 0.7256]}, {"w": "the", "b": [0.1312, 0.7279, 0.1528, 0.7398]}, {"w": "case,", "b": [0.158, 0.7279, 0.1901, 0.7398]}, {"w": "you", "b": [0.1953, 0.7279, 0.2195, 0.7398]}, {"w": "would", "b": [0.2247, 0.7279, 0.2648, 0.7398]}, {"w": "prefer", "b": [0.2701, 0.7279, 0.3094, 0.7398]}, {"w": "to", "b": [0.3146, 0.7279, 0.3284, 0.7398]}, {"w": "undersample", "b": [0.3337, 0.7278, 0.434, 0.7398]}, {"w": "the", "b": [0.4392, 0.7279, 0.4608, 0.7398]}, {"w": "data", "b": [0.466, 0.7279, 0.4962, 0.7398]}, {"w": "in", "b": [0.5014, 0.7279, 0.5144, 0.7398]}, {"w": "the", "b": [0.5196, 0.7279, 0.5412, 0.7398]}, {"w": "class", "b": [0.5464, 0.7279, 0.5777, 0.7398]}, {"w": "“Other.”", "b": [0.5829, 0.7279, 0.6395, 0.7398]}, {"w": "We", "b": [0.6464, 0.7279, 0.668, 0.7398]}, {"w": "consider", "b": [0.6732, 0.7279, 0.7286, 0.7398]}, {"w": "data", "b": [0.7338, 0.7279, 0.764, 0.7398]}, {"w": "undersampling", "b": [0.7692, 0.7279, 0.8686, 0.7398]}, {"w": "in", "b": [0.1312, 0.7421, 0.1443, 0.754]}, {"w": "Section", "b": [0.1495, 0.7421, 0.1992, 0.754]}, {"w": "??", "b": [0.2044, 0.742, 0.2215, 0.754]}, {"w": "of", "b": [0.2267, 0.7421, 0.2394, 0.754]}, {"w": "the", "b": [0.2446, 0.7421, 0.2664, 0.754]}, {"w": "next", "b": [0.2716, 0.7421, 0.3016, 0.754]}, {"w": "chapter.", "b": [0.3069, 0.7421, 0.3622, 0.754]}]}, {"id": "b_8", "type": "paragraph", "text": "2To save even more time, apply clustering to the whole collection of unlabeled documents and only manually label documents belonging to one or a few clusters.", "words": [{"w": "2To", "b": [0.1518, 0.7544, 0.1777, 0.7683]}, {"w": "save", "b": [0.1845, 0.7562, 0.2135, 0.7683]}, {"w": "even", "b": [0.2203, 0.7562, 0.2514, 0.7683]}, {"w": "more", "b": [0.2582, 0.7562, 0.2929, 0.7683]}, {"w": "time,", "b": [0.2997, 0.7562, 0.3352, 0.7683]}, {"w": "apply", "b": [0.3424, 0.7562, 0.3811, 0.7683]}, {"w": "clustering", "b": [0.3879, 0.7562, 0.4555, 0.7683]}, {"w": "to", "b": [0.4623, 0.7562, 0.4765, 0.7683]}, {"w": "the", "b": [0.4833, 0.7562, 0.5056, 0.7683]}, {"w": "whole", "b": [0.5124, 0.7562, 0.5523, 0.7683]}, {"w": "collection", "b": [0.5591, 0.7562, 0.6249, 0.7683]}, {"w": "of", "b": [0.6317, 0.7562, 0.6446, 0.7683]}, {"w": "unlabeled", "b": [0.6514, 0.7562, 0.7184, 0.7683]}, {"w": "documents", "b": [0.7253, 0.7562, 0.8, 0.7683]}, {"w": "and", "b": [0.8068, 0.7562, 0.8325, 0.7683]}, {"w": "only", "b": [0.8393, 0.7562, 0.8691, 0.7683]}, {"w": "manually", "b": [0.1312, 0.7705, 0.1939, 0.7824]}, {"w": "label", "b": [0.1992, 0.7705, 0.2318, 0.7824]}, {"w": "documents", "b": [0.237, 0.7705, 0.3103, 0.7824]}, {"w": "belonging", "b": [0.3155, 0.7705, 0.3813, 0.7824]}, {"w": "to", "b": [0.3865, 0.7705, 0.4004, 0.7824]}, {"w": "one", "b": [0.4057, 0.7705, 0.4292, 0.7824]}, {"w": "or", "b": [0.4344, 0.7705, 0.4483, 0.7824]}, {"w": "a", "b": [0.4536, 0.7705, 0.4614, 0.7824]}, {"w": "few", "b": [0.4666, 0.7705, 0.4897, 0.7824]}, {"w": "clusters.", "b": [0.4949, 0.7705, 0.5509, 0.7824]}]}, {"id": "b_9", "type": "paragraph", "text": "3The 80/20 rule of thumb often applies: 80% of progress is made using the first 20% of resources.", "words": [{"w": "3The", "b": [0.1518, 0.7828, 0.1865, 0.7966]}, {"w": "80/20", "b": [0.1917, 0.7847, 0.2309, 0.7966]}, {"w": "rule", "b": [0.2361, 0.7847, 0.2623, 0.7966]}, {"w": "of", "b": [0.2675, 0.7847, 0.2801, 0.7966]}, {"w": "thumb", "b": [0.2854, 0.7847, 0.3298, 0.7966]}, {"w": "often", "b": [0.335, 0.7847, 0.3694, 0.7966]}, {"w": "applies:", "b": [0.3746, 0.7847, 0.4261, 0.7966]}, {"w": "80%", "b": [0.4331, 0.7847, 0.4619, 0.7966]}, {"w": "of", "b": [0.4671, 0.7847, 0.4797, 0.7966]}, {"w": "progress", "b": [0.485, 0.7847, 0.5409, 0.7966]}, {"w": "is", "b": [0.5461, 0.7847, 0.5567, 0.7966]}, {"w": "made", "b": [0.5619, 0.7847, 0.5985, 0.7966]}, {"w": "using", "b": [0.6037, 0.7847, 0.6395, 0.7966]}, {"w": "the", "b": [0.6447, 0.7847, 0.6665, 0.7966]}, {"w": "first", "b": [0.6717, 0.7847, 0.6988, 0.7966]}, {"w": "20%", "b": [0.7041, 0.7847, 0.7329, 0.7966]}, {"w": "of", "b": [0.7381, 0.7847, 0.7507, 0.7966]}, {"w": "resources.", "b": [0.756, 0.7847, 0.8223, 0.7966]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "6", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 36, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2.3 Defining the Goal of a Machine Learning Project", "words": [{"w": "2.3", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Defining", "b": [0.188, 0.0861, 0.2793, 0.104]}, {"w": "the", "b": [0.2876, 0.0861, 0.3225, 0.104]}, {"w": "Goal", "b": [0.3308, 0.0861, 0.3819, 0.104]}, {"w": "of", "b": [0.3902, 0.0861, 0.4103, 0.104]}, {"w": "a", "b": [0.4186, 0.0861, 0.4307, 0.104]}, {"w": "Machine", "b": [0.439, 0.0861, 0.5311, 0.104]}, {"w": "Learning", "b": [0.5394, 0.0861, 0.6351, 0.104]}, {"w": "Project", "b": [0.6434, 0.0861, 0.7235, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "The goal of a machine learning project is to build a model that solves, or helps solve, a business problem. Within a project, the model is often seen as a black box described by the structure of its input (or inputs) and output (or outputs), and the minimum acceptable level of performance (as measured by accuracy of prediction or another performance metric).", "words": [{"w": "The", "b": [0.1306, 0.1249, 0.163, 0.14]}, {"w": "goal", "b": [0.1701, 0.1249, 0.2076, 0.1399]}, {"w": "of", "b": [0.2148, 0.1249, 0.2299, 0.14]}, {"w": "a", "b": [0.2371, 0.1249, 0.2465, 0.14]}, {"w": "machine", "b": [0.2537, 0.1249, 0.3212, 0.14]}, {"w": "learning", "b": [0.3283, 0.1249, 0.3943, 0.14]}, {"w": "project", "b": [0.4015, 0.1249, 0.4591, 0.14]}, {"w": "is", "b": [0.4662, 0.1249, 0.4789, 0.14]}, {"w": "to", "b": [0.4861, 0.1249, 0.5028, 0.14]}, {"w": "build", "b": [0.51, 0.1249, 0.5518, 0.14]}, {"w": "a", "b": [0.559, 0.1249, 0.5684, 0.14]}, {"w": "model", "b": [0.5756, 0.1249, 0.6252, 0.14]}, {"w": "that", "b": [0.6324, 0.1249, 0.6669, 0.14]}, {"w": "solves,", "b": [0.6741, 0.1249, 0.7266, 0.14]}, {"w": "or", "b": [0.734, 0.1249, 0.7508, 0.14]}, {"w": "helps", "b": [0.758, 0.1249, 0.8, 0.14]}, {"w": "solve,", "b": [0.8071, 0.1249, 0.8522, 0.14]}, {"w": "a", "b": [0.8597, 0.1249, 0.8691, 0.14]}, {"w": "business", "b": [0.1312, 0.143, 0.1966, 0.1579]}, {"w": "problem.", "b": [0.2027, 0.143, 0.2729, 0.1579]}, {"w": "Within", "b": [0.2811, 0.143, 0.3375, 0.1579]}, {"w": "a", "b": [0.3436, 0.143, 0.3528, 0.1579]}, {"w": "project,", "b": [0.3589, 0.143, 0.42, 0.1579]}, {"w": "the", "b": [0.4261, 0.143, 0.4515, 0.1579]}, {"w": "model", "b": [0.4577, 0.143, 0.5059, 0.1579]}, {"w": "is", "b": [0.5121, 0.143, 0.5244, 0.1579]}, {"w": "often", "b": [0.5305, 0.143, 0.5707, 0.1579]}, {"w": "seen", "b": [0.5768, 0.143, 0.6105, 0.1579]}, {"w": "as", "b": [0.6166, 0.143, 0.633, 0.1579]}, {"w": "a", "b": [0.6391, 0.143, 0.6482, 0.1579]}, {"w": "black", "b": [0.6544, 0.143, 0.6961, 0.1579]}, {"w": "box", "b": [0.7022, 0.143, 0.7312, 0.1579]}, {"w": "described", "b": [0.7373, 0.143, 0.8122, 0.1579]}, {"w": "by", "b": [0.8183, 0.143, 0.8376, 0.1579]}, {"w": "the", "b": [0.8438, 0.143, 0.8692, 0.1579]}, {"w": "structure", "b": [0.1312, 0.161, 0.2028, 0.1758]}, {"w": "of", "b": [0.209, 0.161, 0.2235, 0.1758]}, {"w": "its", "b": [0.2297, 0.161, 0.2489, 0.1758]}, {"w": "input", "b": [0.255, 0.161, 0.2972, 0.1758]}, {"w": "(or", "b": [0.3034, 0.161, 0.3265, 0.1758]}, {"w": "inputs)", "b": [0.3327, 0.161, 0.3891, 0.1758]}, {"w": "and", "b": [0.3952, 0.161, 0.4244, 0.1758]}, {"w": "output", "b": [0.4305, 0.161, 0.4838, 0.1758]}, {"w": "(or", "b": [0.4899, 0.161, 0.5131, 0.1758]}, {"w": "outputs),", "b": [0.5192, 0.161, 0.5917, 0.1758]}, {"w": "and", "b": [0.5978, 0.161, 0.627, 0.1758]}, {"w": "the", "b": [0.6331, 0.161, 0.6583, 0.1758]}, {"w": "minimum", "b": [0.6644, 0.161, 0.7392, 0.1758]}, {"w": "acceptable", "b": [0.7454, 0.161, 0.8278, 0.1758]}, {"w": "level", "b": [0.8339, 0.161, 0.8691, 0.1758]}, {"w": "of", "b": [0.1312, 0.1788, 0.1461, 0.1938]}, {"w": "performance", "b": [0.1522, 0.1788, 0.2518, 0.1938]}, {"w": "(as", "b": [0.258, 0.1788, 0.2817, 0.1938]}, {"w": "measured", "b": [0.2878, 0.1788, 0.3639, 0.1938]}, {"w": "by", "b": [0.37, 0.1788, 0.3895, 0.1938]}, {"w": "accuracy", "b": [0.3956, 0.1788, 0.466, 0.1938]}, {"w": "of", "b": [0.4721, 0.1788, 0.487, 0.1938]}, {"w": "prediction", "b": [0.4931, 0.1788, 0.5742, 0.1938]}, {"w": "or", "b": [0.5803, 0.1788, 0.5968, 0.1938]}, {"w": "another", "b": [0.603, 0.1788, 0.6645, 0.1938]}, {"w": "performance", "b": [0.6704, 0.1788, 0.786, 0.1937]}, {"w": "metric).", "b": [0.7931, 0.1788, 0.8651, 0.1938]}]}, {"id": "b_2", "type": "paragraph", "text": "2.3.1 What a Model Can Do", "words": [{"w": "2.3.1", "b": [0.1312, 0.2266, 0.1749, 0.2416]}, {"w": "What", "b": [0.1961, 0.2266, 0.2484, 0.2416]}, {"w": "a", "b": [0.2554, 0.2266, 0.2657, 0.2416]}, {"w": "Model", "b": [0.2728, 0.2266, 0.3316, 0.2416]}, {"w": "Can", "b": [0.3387, 0.2266, 0.3761, 0.2416]}, {"w": "Do", "b": [0.3832, 0.2266, 0.41, 0.2416]}]}, {"id": "b_3", "type": "paragraph", "text": "The model is typically used as a part of a system that serves some purpose. In particular, the model can be used within a broader system to:", "words": [{"w": "The", "b": [0.1306, 0.2631, 0.163, 0.2782]}, {"w": "model", "b": [0.1692, 0.2631, 0.2188, 0.2782]}, {"w": "is", "b": [0.225, 0.2631, 0.2377, 0.2782]}, {"w": "typically", "b": [0.2438, 0.2631, 0.3144, 0.2782]}, {"w": "used", "b": [0.3206, 0.2631, 0.3573, 0.2782]}, {"w": "as", "b": [0.3635, 0.2631, 0.3803, 0.2782]}, {"w": "a", "b": [0.3865, 0.2631, 0.3959, 0.2782]}, {"w": "part", "b": [0.4021, 0.2631, 0.4367, 0.2782]}, {"w": "of", "b": [0.4428, 0.2631, 0.458, 0.2782]}, {"w": "a", "b": [0.4642, 0.2631, 0.4736, 0.2782]}, {"w": "system", "b": [0.4797, 0.2631, 0.5359, 0.2782]}, {"w": "that", "b": [0.5421, 0.2631, 0.5766, 0.2782]}, {"w": "serves", "b": [0.5828, 0.2631, 0.6312, 0.2782]}, {"w": "some", "b": [0.6373, 0.2631, 0.6782, 0.2782]}, {"w": "purpose.", "b": [0.6844, 0.2631, 0.7541, 0.2782]}, {"w": "In", "b": [0.7624, 0.2631, 0.7796, 0.2782]}, {"w": "particular,", "b": [0.7858, 0.2631, 0.8717, 0.2782]}, {"w": "the", "b": [0.1312, 0.2812, 0.1569, 0.2961]}, {"w": "model", "b": [0.163, 0.2812, 0.2117, 0.2961]}, {"w": "can", "b": [0.2179, 0.2812, 0.2456, 0.2961]}, {"w": "be", "b": [0.2517, 0.2812, 0.2707, 0.2961]}, {"w": "used", "b": [0.2769, 0.2812, 0.3128, 0.2961]}, {"w": "within", "b": [0.319, 0.2812, 0.3703, 0.2961]}, {"w": "a", "b": [0.3764, 0.2812, 0.3856, 0.2961]}, {"w": "broader", "b": [0.3918, 0.2812, 0.4534, 0.2961]}, {"w": "system", "b": [0.4596, 0.2812, 0.5146, 0.2961]}, {"w": "to:", "b": [0.5208, 0.2812, 0.5423, 0.2961]}]}, {"id": "b_4", "type": "paragraph", "text": "• automate (for example, by taking action on the user’s behalf or by starting or stopping a specific activity on a server), • alert or prompt (for example, by asking the user if an action should be taken or by asking a system administrator if the traffic seems suspicious), • organize, by presenting a set of items in an order that might be useful for a user (for example, by sorting pictures or documents in the order of similarity to a query or according to the user’s preferences), • annotate (for instance, by adding contextual annotations to displayed information, or by highlighting, in a text, phrases relevant to the user’s task), • extract (for example, by detecting smaller pieces of relevant information in a larger input, such as named entities in the text: proper names, companies, or locations), • recommend (for example, by detecting and showing to a user highly relevant items in a large collection based on item’s content or user’s reaction to the past recommendations), • classify (for example, by dispatching input examples into one, or several, of a predefined set of distinctly-named groups), • quantify (for example, by assigning a number, such as a price, to an object, such as a house), • synthesize (for example, by generating new text, image, sound, or another object similar to the objects in a collection), • answer an explicit question (for example, “Does this text describe that image?” or “Are these two images similar?”), • transform its input (for example, by reducing its dimensionality for visualization purposes, paraphrasing a long text as a short abstract, translating a sentence into another language, or augmenting an image by applying a filter to it), • detect a novelty or an anomaly.", "words": [{"w": "•", "b": [0.1538, 0.3081, 0.1681, 0.3231]}, {"w": "automate", "b": [0.1774, 0.3082, 0.2517, 0.323]}, {"w": "(for", "b": [0.2577, 0.3082, 0.2864, 0.323]}, {"w": "example,", "b": [0.2925, 0.3082, 0.3623, 0.323]}, {"w": "by", "b": [0.3684, 0.3082, 0.3875, 0.323]}, {"w": "taking", "b": [0.3935, 0.3082, 0.4432, 0.323]}, {"w": "action", "b": [0.4493, 0.3082, 0.4975, 0.323]}, {"w": "on", "b": [0.5035, 0.3082, 0.5226, 0.323]}, {"w": "the", "b": [0.5287, 0.3082, 0.5538, 0.323]}, {"w": "user’s", "b": [0.5598, 0.3082, 0.6043, 0.323]}, {"w": "behalf", "b": [0.6104, 0.3082, 0.6586, 0.323]}, {"w": "or", "b": [0.6647, 0.3082, 0.6808, 0.323]}, {"w": "by", "b": [0.6868, 0.3082, 0.7059, 0.323]}, {"w": "starting", "b": [0.712, 0.3082, 0.7734, 0.323]}, {"w": "or", "b": [0.7795, 0.3082, 0.7956, 0.323]}, {"w": "stopping", "b": [0.8016, 0.3082, 0.8691, 0.323]}, {"w": "a", "b": [0.1774, 0.3261, 0.1866, 0.341]}, {"w": "specific", "b": [0.1927, 0.3261, 0.2508, 0.341]}, {"w": "activity", "b": [0.2569, 0.3261, 0.318, 0.341]}, {"w": "on", "b": [0.3241, 0.3261, 0.3436, 0.341]}, {"w": "a", "b": [0.3497, 0.3261, 0.359, 0.341]}, {"w": "server),", "b": [0.3651, 0.3261, 0.4248, 0.341]}, {"w": "•", "b": [0.1538, 0.344, 0.1681, 0.359]}, {"w": "alert", "b": [0.1774, 0.3439, 0.2151, 0.359]}, {"w": "or", "b": [0.2218, 0.3439, 0.2386, 0.359]}, {"w": "prompt", "b": [0.2453, 0.3439, 0.306, 0.359]}, {"w": "(for", "b": [0.3127, 0.3439, 0.3426, 0.359]}, {"w": "example,", "b": [0.3493, 0.3439, 0.422, 0.359]}, {"w": "by", "b": [0.4288, 0.3439, 0.4487, 0.359]}, {"w": "asking", "b": [0.4554, 0.3439, 0.5073, 0.359]}, {"w": "the", "b": [0.514, 0.3439, 0.5402, 0.359]}, {"w": "user", "b": [0.5469, 0.3439, 0.5805, 0.359]}, {"w": "if", "b": [0.5872, 0.3439, 0.5982, 0.359]}, {"w": "an", "b": [0.6049, 0.3439, 0.6248, 0.359]}, {"w": "action", "b": [0.6315, 0.3439, 0.6817, 0.359]}, {"w": "should", "b": [0.6884, 0.3439, 0.7419, 0.359]}, {"w": "be", "b": [0.7486, 0.3439, 0.768, 0.359]}, {"w": "taken", "b": [0.7747, 0.3439, 0.8197, 0.359]}, {"w": "or", "b": [0.8264, 0.3439, 0.8432, 0.359]}, {"w": "by", "b": [0.8499, 0.3439, 0.8698, 0.359]}, {"w": "asking", "b": [0.1774, 0.3619, 0.2282, 0.3769]}, {"w": "a", "b": [0.2344, 0.3619, 0.2436, 0.3769]}, {"w": "system", "b": [0.2498, 0.3619, 0.3048, 0.3769]}, {"w": "administrator", "b": [0.311, 0.3619, 0.4209, 0.3769]}, {"w": "if", "b": [0.427, 0.3619, 0.4378, 0.3769]}, {"w": "the", "b": [0.4439, 0.3619, 0.4696, 0.3769]}, {"w": "traffic", "b": [0.4757, 0.3619, 0.5229, 0.3769]}, {"w": "seems", "b": [0.5291, 0.3619, 0.5755, 0.3769]}, {"w": "suspicious),", "b": [0.5816, 0.3619, 0.6742, 0.3769]}, {"w": "•", "b": [0.1538, 0.3799, 0.1681, 0.3948]}, {"w": "organize,", "b": [0.1774, 0.3798, 0.2501, 0.3949]}, {"w": "by", "b": [0.2562, 0.3798, 0.2759, 0.3949]}, {"w": "presenting", "b": [0.2821, 0.3798, 0.3658, 0.3949]}, {"w": "a", "b": [0.3719, 0.3798, 0.3813, 0.3949]}, {"w": "set", "b": [0.3874, 0.3798, 0.4103, 0.3949]}, {"w": "of", "b": [0.4165, 0.3798, 0.4315, 0.3949]}, {"w": "items", "b": [0.4376, 0.3798, 0.4813, 0.3949]}, {"w": "in", "b": [0.4875, 0.3798, 0.503, 0.3949]}, {"w": "an", "b": [0.5092, 0.3798, 0.5289, 0.3949]}, {"w": "order", "b": [0.535, 0.3798, 0.5777, 0.3949]}, {"w": "that", "b": [0.5838, 0.3798, 0.6181, 0.3949]}, {"w": "might", "b": [0.6242, 0.3798, 0.6714, 0.3949]}, {"w": "be", "b": [0.6775, 0.3798, 0.6968, 0.3949]}, {"w": "useful", "b": [0.7029, 0.3798, 0.7502, 0.3949]}, {"w": "for", "b": [0.7564, 0.3798, 0.7787, 0.3949]}, {"w": "a", "b": [0.7849, 0.3798, 0.7942, 0.3949]}, {"w": "user", "b": [0.8003, 0.3798, 0.8337, 0.3949]}, {"w": "(for", "b": [0.8398, 0.3798, 0.8695, 0.3949]}, {"w": "example,", "b": [0.1774, 0.3977, 0.2501, 0.4128]}, {"w": "by", "b": [0.258, 0.3977, 0.2779, 0.4128]}, {"w": "sorting", "b": [0.2854, 0.3977, 0.3421, 0.4128]}, {"w": "pictures", "b": [0.3497, 0.3977, 0.4147, 0.4128]}, {"w": "or", "b": [0.4223, 0.3977, 0.4391, 0.4128]}, {"w": "documents", "b": [0.4467, 0.3977, 0.5346, 0.4128]}, {"w": "in", "b": [0.5422, 0.3977, 0.5579, 0.4128]}, {"w": "the", "b": [0.5655, 0.3977, 0.5916, 0.4128]}, {"w": "order", "b": [0.5992, 0.3977, 0.6422, 0.4128]}, {"w": "of", "b": [0.6498, 0.3977, 0.665, 0.4128]}, {"w": "similarity", "b": [0.6726, 0.3977, 0.7501, 0.4128]}, {"w": "to", "b": [0.7577, 0.3977, 0.7744, 0.4128]}, {"w": "a", "b": [0.782, 0.3977, 0.7914, 0.4128]}, {"w": "query", "b": [0.799, 0.3977, 0.8451, 0.4128]}, {"w": "or", "b": [0.8527, 0.3977, 0.8695, 0.4128]}, {"w": "according", "b": [0.1774, 0.4158, 0.2543, 0.4307]}, {"w": "to", "b": [0.2605, 0.4158, 0.2769, 0.4307]}, {"w": "the", "b": [0.283, 0.4158, 0.3087, 0.4307]}, {"w": "user’s", "b": [0.3148, 0.4158, 0.3602, 0.4307]}, {"w": "preferences),", "b": [0.3664, 0.4158, 0.4676, 0.4307]}, {"w": "•", "b": [0.1538, 0.4337, 0.1681, 0.4487]}, {"w": "annotate", "b": [0.1774, 0.4337, 0.2483, 0.4487]}, {"w": "(for", "b": [0.2544, 0.4337, 0.2837, 0.4487]}, {"w": "instance,", "b": [0.2898, 0.4337, 0.3609, 0.4487]}, {"w": "by", "b": [0.367, 0.4337, 0.3865, 0.4487]}, {"w": "adding", "b": [0.3926, 0.4337, 0.4471, 0.4487]}, {"w": "contextual", "b": [0.4532, 0.4337, 0.5375, 0.4487]}, {"w": "annotations", "b": [0.5436, 0.4337, 0.6382, 0.4487]}, {"w": "to", "b": [0.6443, 0.4337, 0.6608, 0.4487]}, {"w": "displayed", "b": [0.6669, 0.4337, 0.7415, 0.4487]}, {"w": "information,", "b": [0.7476, 0.4337, 0.8468, 0.4487]}, {"w": "or", "b": [0.853, 0.4337, 0.8694, 0.4487]}, {"w": "by", "b": [0.1774, 0.4517, 0.1968, 0.4666]}, {"w": "highlighting,", "b": [0.203, 0.4517, 0.304, 0.4666]}, {"w": "in", "b": [0.3102, 0.4517, 0.3255, 0.4666]}, {"w": "a", "b": [0.3317, 0.4517, 0.3409, 0.4666]}, {"w": "text,", "b": [0.3471, 0.4517, 0.3845, 0.4666]}, {"w": "phrases", "b": [0.3906, 0.4517, 0.4504, 0.4666]}, {"w": "relevant", "b": [0.4566, 0.4517, 0.5202, 0.4666]}, {"w": "to", "b": [0.5263, 0.4517, 0.5427, 0.4666]}, {"w": "the", "b": [0.5489, 0.4517, 0.5745, 0.4666]}, {"w": "user’s", "b": [0.5807, 0.4517, 0.6261, 0.4666]}, {"w": "task),", "b": [0.6322, 0.4517, 0.678, 0.4666]}, {"w": "•", "b": [0.1538, 0.4696, 0.1681, 0.4846]}, {"w": "extract", "b": [0.1774, 0.4695, 0.2355, 0.4846]}, {"w": "(for", "b": [0.2422, 0.4695, 0.2721, 0.4846]}, {"w": "example,", "b": [0.2788, 0.4695, 0.3515, 0.4846]}, {"w": "by", "b": [0.3584, 0.4695, 0.3783, 0.4846]}, {"w": "detecting", "b": [0.3851, 0.4695, 0.4604, 0.4846]}, {"w": "smaller", "b": [0.4671, 0.4695, 0.5259, 0.4846]}, {"w": "pieces", "b": [0.5326, 0.4695, 0.5808, 0.4846]}, {"w": "of", "b": [0.5876, 0.4695, 0.6028, 0.4846]}, {"w": "relevant", "b": [0.6095, 0.4695, 0.6745, 0.4846]}, {"w": "information", "b": [0.6812, 0.4695, 0.7769, 0.4846]}, {"w": "in", "b": [0.7837, 0.4695, 0.7994, 0.4846]}, {"w": "a", "b": [0.8061, 0.4695, 0.8155, 0.4846]}, {"w": "larger", "b": [0.8223, 0.4695, 0.8695, 0.4846]}, {"w": "input,", "b": [0.1774, 0.4876, 0.2256, 0.5025]}, {"w": "such", "b": [0.2317, 0.4876, 0.2672, 0.5025]}, {"w": "as", "b": [0.2733, 0.4876, 0.2899, 0.5025]}, {"w": "named", "b": [0.296, 0.4876, 0.3493, 0.5025]}, {"w": "entities", "b": [0.3555, 0.4876, 0.4135, 0.5025]}, {"w": "in", "b": [0.4197, 0.4876, 0.4351, 0.5025]}, {"w": "the", "b": [0.4412, 0.4876, 0.4669, 0.5025]}, {"w": "text:", "b": [0.473, 0.4876, 0.5105, 0.5025]}, {"w": "proper", "b": [0.5187, 0.4876, 0.5716, 0.5025]}, {"w": "names,", "b": [0.5777, 0.4876, 0.6332, 0.5025]}, {"w": "companies,", "b": [0.6393, 0.4876, 0.7276, 0.5025]}, {"w": "or", "b": [0.7338, 0.4876, 0.7502, 0.5025]}, {"w": "locations),", "b": [0.7564, 0.4876, 0.8401, 0.5025]}, {"w": "•", "b": [0.1538, 0.5055, 0.1681, 0.5205]}, {"w": "recommend", "b": [0.1774, 0.5056, 0.2678, 0.5204]}, {"w": "(for", "b": [0.2739, 0.5056, 0.3025, 0.5204]}, {"w": "example,", "b": [0.3086, 0.5056, 0.3784, 0.5204]}, {"w": "by", "b": [0.3844, 0.5056, 0.4035, 0.5204]}, {"w": "detecting", "b": [0.4096, 0.5056, 0.4819, 0.5204]}, {"w": "and", "b": [0.4879, 0.5056, 0.5171, 0.5204]}, {"w": "showing", "b": [0.5231, 0.5056, 0.586, 0.5204]}, {"w": "to", "b": [0.592, 0.5056, 0.6081, 0.5204]}, {"w": "a", "b": [0.6141, 0.5056, 0.6231, 0.5204]}, {"w": "user", "b": [0.6292, 0.5056, 0.6615, 0.5204]}, {"w": "highly", "b": [0.6675, 0.5056, 0.7162, 0.5204]}, {"w": "relevant", "b": [0.7223, 0.5056, 0.7846, 0.5204]}, {"w": "items", "b": [0.7906, 0.5056, 0.8329, 0.5204]}, {"w": "in", "b": [0.8389, 0.5056, 0.854, 0.5204]}, {"w": "a", "b": [0.86, 0.5056, 0.8691, 0.5204]}, {"w": "large", "b": [0.1774, 0.5236, 0.2156, 0.5384]}, {"w": "collection", "b": [0.2209, 0.5236, 0.2953, 0.5384]}, {"w": "based", "b": [0.3007, 0.5236, 0.345, 0.5384]}, {"w": "on", "b": [0.3504, 0.5236, 0.3695, 0.5384]}, {"w": "item’s", "b": [0.3748, 0.5236, 0.4222, 0.5384]}, {"w": "content", "b": [0.4275, 0.5236, 0.4858, 0.5384]}, {"w": "or", "b": [0.4912, 0.5236, 0.5073, 0.5384]}, {"w": "user’s", "b": [0.5127, 0.5236, 0.5572, 0.5384]}, {"w": "reaction", "b": [0.5625, 0.5236, 0.6259, 0.5384]}, {"w": "to", "b": [0.6312, 0.5236, 0.6473, 0.5384]}, {"w": "the", "b": [0.6527, 0.5236, 0.6778, 0.5384]}, {"w": "past", "b": [0.6832, 0.5236, 0.7164, 0.5384]}, {"w": "recommendations),", "b": [0.7218, 0.5236, 0.8717, 0.5384]}, {"w": "•", "b": [0.1538, 0.5414, 0.1681, 0.5564]}, {"w": "classify", "b": [0.1774, 0.5415, 0.2339, 0.5563]}, {"w": "(for", "b": [0.2393, 0.5415, 0.268, 0.5563]}, {"w": "example,", "b": [0.2734, 0.5415, 0.3432, 0.5563]}, {"w": "by", "b": [0.3488, 0.5415, 0.3679, 0.5563]}, {"w": "dispatching", "b": [0.3733, 0.5415, 0.4634, 0.5563]}, {"w": "input", "b": [0.4688, 0.5415, 0.511, 0.5563]}, {"w": "examples", "b": [0.5164, 0.5415, 0.5884, 0.5563]}, {"w": "into", "b": [0.5938, 0.5415, 0.6245, 0.5563]}, {"w": "one,", "b": [0.6299, 0.5415, 0.6621, 0.5563]}, {"w": "or", "b": [0.6676, 0.5415, 0.6838, 0.5563]}, {"w": "several,", "b": [0.6892, 0.5415, 0.7476, 0.5563]}, {"w": "of", "b": [0.7532, 0.5415, 0.7678, 0.5563]}, {"w": "a", "b": [0.7732, 0.5415, 0.7822, 0.5563]}, {"w": "predefined", "b": [0.7877, 0.5415, 0.8691, 0.5563]}, {"w": "set", "b": [0.1774, 0.5594, 0.2, 0.5743]}, {"w": "of", "b": [0.2062, 0.5594, 0.221, 0.5743]}, {"w": "distinctly-named", "b": [0.2272, 0.5594, 0.3621, 0.5743]}, {"w": "groups),", "b": [0.3683, 0.5594, 0.4341, 0.5743]}, {"w": "•", "b": [0.1538, 0.5773, 0.1681, 0.5923]}, {"w": "quantify", "b": [0.1774, 0.5772, 0.2454, 0.5923]}, {"w": "(for", "b": [0.2534, 0.5772, 0.2832, 0.5923]}, {"w": "example,", "b": [0.2913, 0.5772, 0.3639, 0.5923]}, {"w": "by", "b": [0.3724, 0.5772, 0.3923, 0.5923]}, {"w": "assigning", "b": [0.4003, 0.5772, 0.4748, 0.5923]}, {"w": "a", "b": [0.4828, 0.5772, 0.4922, 0.5923]}, {"w": "number,", "b": [0.5003, 0.5772, 0.5678, 0.5923]}, {"w": "such", "b": [0.5763, 0.5772, 0.6125, 0.5923]}, {"w": "as", "b": [0.6205, 0.5772, 0.6374, 0.5923]}, {"w": "a", "b": [0.6454, 0.5772, 0.6548, 0.5923]}, {"w": "price,", "b": [0.6628, 0.5772, 0.7078, 0.5923]}, {"w": "to", "b": [0.7163, 0.5772, 0.7331, 0.5923]}, {"w": "an", "b": [0.7411, 0.5772, 0.7609, 0.5923]}, {"w": "object,", "b": [0.769, 0.5772, 0.8244, 0.5923]}, {"w": "such", "b": [0.8329, 0.5772, 0.8691, 0.5923]}, {"w": "as", "b": [0.1774, 0.5953, 0.1939, 0.6102]}, {"w": "a", "b": [0.2, 0.5953, 0.2092, 0.6102]}, {"w": "house),", "b": [0.2154, 0.5953, 0.2729, 0.6102]}, {"w": "•", "b": [0.1538, 0.6132, 0.1681, 0.6282]}, {"w": "synthesize", "b": [0.1774, 0.6133, 0.257, 0.6281]}, {"w": "(for", "b": [0.2622, 0.6133, 0.2909, 0.6281]}, {"w": "example,", "b": [0.2962, 0.6133, 0.366, 0.6281]}, {"w": "by", "b": [0.3715, 0.6133, 0.3905, 0.6281]}, {"w": "generating", "b": [0.3958, 0.6133, 0.4783, 0.6281]}, {"w": "new", "b": [0.4835, 0.6133, 0.5147, 0.6281]}, {"w": "text,", "b": [0.5199, 0.6133, 0.5566, 0.6281]}, {"w": "image,", "b": [0.5621, 0.6133, 0.6133, 0.6281]}, {"w": "sound,", "b": [0.6188, 0.6133, 0.6701, 0.6281]}, {"w": "or", "b": [0.6755, 0.6133, 0.6917, 0.6281]}, {"w": "another", "b": [0.6969, 0.6133, 0.7573, 0.6281]}, {"w": "object", "b": [0.7625, 0.6133, 0.8108, 0.6281]}, {"w": "similar", "b": [0.8161, 0.6133, 0.8695, 0.6281]}, {"w": "to", "b": [0.1774, 0.6311, 0.1938, 0.6461]}, {"w": "the", "b": [0.1999, 0.6311, 0.2255, 0.6461]}, {"w": "objects", "b": [0.2317, 0.6311, 0.2882, 0.6461]}, {"w": "in", "b": [0.2944, 0.6311, 0.3097, 0.6461]}, {"w": "a", "b": [0.3159, 0.6311, 0.3251, 0.6461]}, {"w": "collection),", "b": [0.3313, 0.6311, 0.4195, 0.6461]}, {"w": "•", "b": [0.1538, 0.6491, 0.1681, 0.6641]}, {"w": "answer", "b": [0.1774, 0.649, 0.2335, 0.6641]}, {"w": "an", "b": [0.2405, 0.649, 0.2604, 0.6641]}, {"w": "explicit", "b": [0.2674, 0.649, 0.3276, 0.6641]}, {"w": "question", "b": [0.3347, 0.649, 0.4033, 0.6641]}, {"w": "(for", "b": [0.4103, 0.649, 0.4402, 0.6641]}, {"w": "example,", "b": [0.4472, 0.649, 0.5199, 0.6641]}, {"w": "“Does", "b": [0.5272, 0.649, 0.5762, 0.6641]}, {"w": "this", "b": [0.5832, 0.649, 0.6137, 0.6641]}, {"w": "text", "b": [0.6207, 0.649, 0.6537, 0.6641]}, {"w": "describe", "b": [0.6607, 0.649, 0.7273, 0.6641]}, {"w": "that", "b": [0.7344, 0.649, 0.7689, 0.6641]}, {"w": "image?”", "b": [0.7759, 0.649, 0.8418, 0.6641]}, {"w": "or", "b": [0.8527, 0.649, 0.8695, 0.6641]}, {"w": "“Are", "b": [0.1747, 0.667, 0.2127, 0.682]}, {"w": "these", "b": [0.2189, 0.667, 0.26, 0.682]}, {"w": "two", "b": [0.2662, 0.667, 0.2949, 0.682]}, {"w": "images", "b": [0.301, 0.667, 0.3554, 0.682]}, {"w": "similar?”),", "b": [0.3616, 0.667, 0.4458, 0.682]}, {"w": "•", "b": [0.1538, 0.685, 0.1681, 0.6999]}, {"w": "transform", "b": [0.1774, 0.6849, 0.2576, 0.7]}, {"w": "its", "b": [0.2665, 0.6849, 0.2865, 0.7]}, {"w": "input", "b": [0.2954, 0.6849, 0.3394, 0.7]}, {"w": "(for", "b": [0.3483, 0.6849, 0.3781, 0.7]}, {"w": "example,", "b": [0.3871, 0.6849, 0.4598, 0.7]}, {"w": "by", "b": [0.4694, 0.6849, 0.4893, 0.7]}, {"w": "reducing", "b": [0.4982, 0.6849, 0.5684, 0.7]}, {"w": "its", "b": [0.5773, 0.6849, 0.5973, 0.7]}, {"w": "dimensionality", "b": [0.6062, 0.6849, 0.7256, 0.7]}, {"w": "for", "b": [0.7345, 0.6849, 0.757, 0.7]}, {"w": "visualization", "b": [0.766, 0.6849, 0.8691, 0.7]}, {"w": "purposes,", "b": [0.1774, 0.7028, 0.2545, 0.7179]}, {"w": "paraphrasing", "b": [0.2624, 0.7028, 0.3693, 0.7179]}, {"w": "a", "b": [0.3768, 0.7028, 0.3863, 0.7179]}, {"w": "long", "b": [0.3938, 0.7028, 0.4283, 0.7179]}, {"w": "text", "b": [0.4358, 0.7028, 0.4688, 0.7179]}, {"w": "as", "b": [0.4763, 0.7028, 0.4932, 0.7179]}, {"w": "a", "b": [0.5007, 0.7028, 0.5101, 0.7179]}, {"w": "short", "b": [0.5177, 0.7028, 0.5597, 0.7179]}, {"w": "abstract,", "b": [0.5672, 0.7028, 0.6396, 0.7179]}, {"w": "translating", "b": [0.6474, 0.7028, 0.7365, 0.7179]}, {"w": "a", "b": [0.7441, 0.7028, 0.7535, 0.7179]}, {"w": "sentence", "b": [0.761, 0.7028, 0.8297, 0.7179]}, {"w": "into", "b": [0.8372, 0.7028, 0.8691, 0.7179]}, {"w": "another", "b": [0.1774, 0.7209, 0.2389, 0.7358]}, {"w": "language,", "b": [0.2451, 0.7209, 0.321, 0.7358]}, {"w": "or", "b": [0.3271, 0.7209, 0.3436, 0.7358]}, {"w": "augmenting", "b": [0.3497, 0.7209, 0.4435, 0.7358]}, {"w": "an", "b": [0.4497, 0.7209, 0.4692, 0.7358]}, {"w": "image", "b": [0.4753, 0.7209, 0.5225, 0.7358]}, {"w": "by", "b": [0.5286, 0.7209, 0.5481, 0.7358]}, {"w": "applying", "b": [0.5543, 0.7209, 0.6235, 0.7358]}, {"w": "a", "b": [0.6296, 0.7209, 0.6388, 0.7358]}, {"w": "filter", "b": [0.645, 0.7209, 0.683, 0.7358]}, {"w": "to", "b": [0.6892, 0.7209, 0.7056, 0.7358]}, {"w": "it),", "b": [0.7117, 0.7209, 0.7363, 0.7358]}, {"w": "•", "b": [0.1538, 0.7388, 0.1681, 0.7538]}, {"w": "detect", "b": [0.1774, 0.7388, 0.2266, 0.7538]}, {"w": "a", "b": [0.2327, 0.7388, 0.242, 0.7538]}, {"w": "novelty", "b": [0.2481, 0.7388, 0.3061, 0.7538]}, {"w": "or", "b": [0.3122, 0.7388, 0.3287, 0.7538]}, {"w": "an", "b": [0.3348, 0.7388, 0.3543, 0.7538]}, {"w": "anomaly.", "b": [0.3604, 0.7388, 0.4322, 0.7538]}]}, {"id": "b_5", "type": "paragraph", "text": "Almost any business problem solvable with machine learning can be defined in a form similar to one from the above list. If you cannot define your business problem in such a form, likely, machine learning is not the best solution in your case.", "words": [{"w": "Almost", "b": [0.1305, 0.7659, 0.1874, 0.7807]}, {"w": "any", "b": [0.1933, 0.7659, 0.2215, 0.7807]}, {"w": "business", "b": [0.2274, 0.7659, 0.2921, 0.7807]}, {"w": "problem", "b": [0.298, 0.7659, 0.3624, 0.7807]}, {"w": "solvable", "b": [0.3684, 0.7659, 0.4303, 0.7807]}, {"w": "with", "b": [0.4362, 0.7659, 0.4714, 0.7807]}, {"w": "machine", "b": [0.4773, 0.7659, 0.5421, 0.7807]}, {"w": "learning", "b": [0.5481, 0.7659, 0.6115, 0.7807]}, {"w": "can", "b": [0.6174, 0.7659, 0.6446, 0.7807]}, {"w": "be", "b": [0.6505, 0.7659, 0.6691, 0.7807]}, {"w": "defined", "b": [0.6751, 0.7659, 0.7314, 0.7807]}, {"w": "in", "b": [0.7373, 0.7659, 0.7524, 0.7807]}, {"w": "a", "b": [0.7584, 0.7659, 0.7674, 0.7807]}, {"w": "form", "b": [0.7734, 0.7659, 0.8101, 0.7807]}, {"w": "similar", "b": [0.8161, 0.7659, 0.8695, 0.7807]}, {"w": "to", "b": [0.1312, 0.7838, 0.1474, 0.7986]}, {"w": "one", "b": [0.1536, 0.7838, 0.1809, 0.7986]}, {"w": "from", "b": [0.1871, 0.7838, 0.224, 0.7986]}, {"w": "the", "b": [0.2302, 0.7838, 0.2555, 0.7986]}, {"w": "above", "b": [0.2616, 0.7838, 0.3072, 0.7986]}, {"w": "list.", "b": [0.3133, 0.7838, 0.3428, 0.7986]}, {"w": "If", "b": [0.351, 0.7838, 0.3632, 0.7986]}, {"w": "you", "b": [0.3693, 0.7838, 0.3977, 0.7986]}, {"w": "cannot", "b": [0.4038, 0.7838, 0.4574, 0.7986]}, {"w": "define", "b": [0.4636, 0.7838, 0.5102, 0.7986]}, {"w": "your", "b": [0.5163, 0.7838, 0.5518, 0.7986]}, {"w": "business", "b": [0.558, 0.7838, 0.6231, 0.7986]}, {"w": "problem", "b": [0.6292, 0.7838, 0.694, 0.7986]}, {"w": "in", "b": [0.7002, 0.7838, 0.7154, 0.7986]}, {"w": "such", "b": [0.7215, 0.7838, 0.7565, 0.7986]}, {"w": "a", "b": [0.7627, 0.7838, 0.7718, 0.7986]}, {"w": "form,", "b": [0.778, 0.7838, 0.82, 0.7986]}, {"w": "likely,", "b": [0.8262, 0.7838, 0.8717, 0.7986]}, {"w": "machine", "b": [0.1312, 0.8016, 0.1974, 0.8166]}, {"w": "learning", "b": [0.2035, 0.8016, 0.2682, 0.8166]}, {"w": "is", "b": [0.2743, 0.8016, 0.2867, 0.8166]}, {"w": "not", "b": [0.2929, 0.8016, 0.3196, 0.8166]}, {"w": "the", "b": [0.3257, 0.8016, 0.3514, 0.8166]}, {"w": "best", "b": [0.3575, 0.8016, 0.3909, 0.8166]}, {"w": "solution", "b": [0.3971, 0.8016, 0.4608, 0.8166]}, {"w": "in", "b": [0.4669, 0.8016, 0.4823, 0.8166]}, {"w": "your", "b": [0.4885, 0.8016, 0.5244, 0.8166]}, {"w": "case.", "b": [0.5305, 0.8016, 0.5686, 0.8166]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "7", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 37, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2.3.2 Properties of a Successful Model", "words": [{"w": "2.3.2", "b": [0.1312, 0.0884, 0.1749, 0.1033]}, {"w": "Properties", "b": [0.1961, 0.0884, 0.293, 0.1033]}, {"w": "of", "b": [0.3001, 0.0884, 0.3172, 0.1033]}, {"w": "a", "b": [0.3242, 0.0884, 0.3346, 0.1033]}, {"w": "Successful", "b": [0.3416, 0.0884, 0.4347, 0.1033]}, {"w": "Model", "b": [0.4418, 0.0884, 0.5006, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "A successful model has the following four properties:", "words": [{"w": "A", "b": [0.1305, 0.125, 0.1444, 0.1399]}, {"w": "successful", "b": [0.1505, 0.125, 0.2283, 0.1399]}, {"w": "model", "b": [0.2344, 0.125, 0.2831, 0.1399]}, {"w": "has", "b": [0.2893, 0.125, 0.3161, 0.1399]}, {"w": "the", "b": [0.3222, 0.125, 0.3478, 0.1399]}, {"w": "following", "b": [0.354, 0.125, 0.4258, 0.1399]}, {"w": "four", "b": [0.4319, 0.125, 0.4643, 0.1399]}, {"w": "properties:", "b": [0.4704, 0.125, 0.5563, 0.1399]}]}, {"id": "b_2", "type": "paragraph", "text": "• it respects the input and output specifications and the performance requirement, • it benefits the organization (measured via cost reduction, increased sales or profit), • it helps the user (measured via productivity, engagement, and sentiment), • it is scientifically rigorous.", "words": [{"w": "���", "b": [0.1538, 0.1519, 0.1681, 0.1668]}, {"w": "it", "b": [0.1774, 0.1519, 0.1897, 0.1668]}, {"w": "respects", "b": [0.1958, 0.1519, 0.2602, 0.1668]}, {"w": "the", "b": [0.2663, 0.1519, 0.292, 0.1668]}, {"w": "input", "b": [0.2981, 0.1519, 0.3412, 0.1668]}, {"w": "and", "b": [0.3473, 0.1519, 0.3771, 0.1668]}, {"w": "output", "b": [0.3833, 0.1519, 0.4376, 0.1668]}, {"w": "specifications", "b": [0.4437, 0.1519, 0.5501, 0.1668]}, {"w": "and", "b": [0.5563, 0.1519, 0.586, 0.1668]}, {"w": "the", "b": [0.5922, 0.1519, 0.6178, 0.1668]}, {"w": "performance", "b": [0.6239, 0.1519, 0.7235, 0.1668]}, {"w": "requirement,", "b": [0.7297, 0.1519, 0.8313, 0.1668]}, {"w": "•", "b": [0.1538, 0.1698, 0.1681, 0.1848]}, {"w": "it", "b": [0.1774, 0.1698, 0.1897, 0.1848]}, {"w": "benefits", "b": [0.1958, 0.1698, 0.258, 0.1848]}, {"w": "the", "b": [0.2641, 0.1698, 0.2898, 0.1848]}, {"w": "organization", "b": [0.2959, 0.1698, 0.3954, 0.1848]}, {"w": "(measured", "b": [0.4016, 0.1698, 0.4848, 0.1848]}, {"w": "via", "b": [0.491, 0.1698, 0.5151, 0.1848]}, {"w": "cost", "b": [0.5212, 0.1698, 0.5531, 0.1848]}, {"w": "reduction,", "b": [0.5592, 0.1698, 0.6403, 0.1848]}, {"w": "increased", "b": [0.6465, 0.1698, 0.7205, 0.1848]}, {"w": "sales", "b": [0.7266, 0.1698, 0.7638, 0.1848]}, {"w": "or", "b": [0.7699, 0.1698, 0.7864, 0.1848]}, {"w": "profit),", "b": [0.7925, 0.1698, 0.849, 0.1848]}, {"w": "•", "b": [0.1538, 0.1878, 0.1681, 0.2027]}, {"w": "it", "b": [0.1774, 0.1878, 0.1897, 0.2027]}, {"w": "helps", "b": [0.1958, 0.1878, 0.2369, 0.2027]}, {"w": "the", "b": [0.2431, 0.1878, 0.2687, 0.2027]}, {"w": "user", "b": [0.2749, 0.1878, 0.3079, 0.2027]}, {"w": "(measured", "b": [0.314, 0.1878, 0.3973, 0.2027]}, {"w": "via", "b": [0.4034, 0.1878, 0.4275, 0.2027]}, {"w": "productivity,", "b": [0.4336, 0.1878, 0.5368, 0.2027]}, {"w": "engagement,", "b": [0.5429, 0.1878, 0.6429, 0.2027]}, {"w": "and", "b": [0.649, 0.1878, 0.6788, 0.2027]}, {"w": "sentiment),", "b": [0.6849, 0.1878, 0.7753, 0.2027]}, {"w": "•", "b": [0.1538, 0.2057, 0.1681, 0.2207]}, {"w": "it", "b": [0.1774, 0.2057, 0.1897, 0.2207]}, {"w": "is", "b": [0.1958, 0.2057, 0.2082, 0.2207]}, {"w": "scientifically", "b": [0.2144, 0.2057, 0.3129, 0.2207]}, {"w": "rigorous.", "b": [0.3191, 0.2057, 0.389, 0.2207]}]}, {"id": "b_3", "type": "paragraph", "text": "A scientifically rigorous model is characterized by a predictable behavior (for the input examples that are similar to the examples that were used for training) and is reproducible. The former property (predictability) means that if input feature vectors come from the same distribution of values as the training data, then the model, on average, has to make the same percentage of errors as observed on the holdout data when the model was trained. The latter property (reproducibility) means that a model with similar properties can be easily built once again from the same training data using the same algorithm and values of hyperparameters. The word “easily” means that no additional analysis, labeling, or coding is necessary to rebuild the model, only the compute power.", "words": [{"w": "A", "b": [0.1305, 0.2325, 0.1446, 0.2476]}, {"w": "scientifically", "b": [0.1527, 0.2325, 0.2532, 0.2476]}, {"w": "rigorous", "b": [0.2613, 0.2325, 0.3274, 0.2476]}, {"w": "model", "b": [0.3355, 0.2325, 0.3851, 0.2476]}, {"w": "is", "b": [0.3932, 0.2325, 0.4058, 0.2476]}, {"w": "characterized", "b": [0.4139, 0.2325, 0.5223, 0.2476]}, {"w": "by", "b": [0.5303, 0.2325, 0.5502, 0.2476]}, {"w": "a", "b": [0.5583, 0.2325, 0.5677, 0.2476]}, {"w": "predictable", "b": [0.5758, 0.2325, 0.6668, 0.2476]}, {"w": "behavior", "b": [0.6749, 0.2325, 0.7455, 0.2476]}, {"w": "(for", "b": [0.7536, 0.2325, 0.7835, 0.2476]}, {"w": "the", "b": [0.7915, 0.2325, 0.8177, 0.2476]}, {"w": "input", "b": [0.8257, 0.2325, 0.8697, 0.2476]}, {"w": "examples", "b": [0.1312, 0.2505, 0.2055, 0.2656]}, {"w": "that", "b": [0.2116, 0.2505, 0.2458, 0.2656]}, {"w": "are", "b": [0.2519, 0.2505, 0.2769, 0.2656]}, {"w": "similar", "b": [0.283, 0.2505, 0.3381, 0.2656]}, {"w": "to", "b": [0.3442, 0.2505, 0.3608, 0.2656]}, {"w": "the", "b": [0.3669, 0.2505, 0.3929, 0.2656]}, {"w": "examples", "b": [0.399, 0.2505, 0.4732, 0.2656]}, {"w": "that", "b": [0.4794, 0.2505, 0.5136, 0.2656]}, {"w": "were", "b": [0.5197, 0.2505, 0.5566, 0.2656]}, {"w": "used", "b": [0.5627, 0.2505, 0.5991, 0.2656]}, {"w": "for", "b": [0.6052, 0.2505, 0.6276, 0.2656]}, {"w": "training)", "b": [0.6337, 0.2505, 0.7053, 0.2656]}, {"w": "and", "b": [0.7114, 0.2505, 0.7415, 0.2656]}, {"w": "is", "b": [0.7476, 0.2505, 0.7602, 0.2656]}, {"w": "reproducible.", "b": [0.7663, 0.2505, 0.8727, 0.2656]}, {"w": "The", "b": [0.1306, 0.2687, 0.1618, 0.2835]}, {"w": "former", "b": [0.1679, 0.2687, 0.2199, 0.2835]}, {"w": "property", "b": [0.226, 0.2687, 0.2941, 0.2835]}, {"w": "(predictability)", "b": [0.3002, 0.2687, 0.4201, 0.2835]}, {"w": "means", "b": [0.4262, 0.2687, 0.4757, 0.2835]}, {"w": "that", "b": [0.4818, 0.2687, 0.5151, 0.2835]}, {"w": "if", "b": [0.5212, 0.2687, 0.5318, 0.2835]}, {"w": "input", "b": [0.5379, 0.2687, 0.5802, 0.2835]}, {"w": "feature", "b": [0.5863, 0.2687, 0.6413, 0.2835]}, {"w": "vectors", "b": [0.6474, 0.2687, 0.703, 0.2835]}, {"w": "come", "b": [0.7091, 0.2687, 0.7494, 0.2835]}, {"w": "from", "b": [0.7555, 0.2687, 0.7923, 0.2835]}, {"w": "the", "b": [0.7984, 0.2687, 0.8236, 0.2835]}, {"w": "same", "b": [0.8297, 0.2687, 0.8691, 0.2835]}, {"w": "distribution", "b": [0.1312, 0.2866, 0.2239, 0.3014]}, {"w": "of", "b": [0.2298, 0.2866, 0.2444, 0.3014]}, {"w": "values", "b": [0.2503, 0.2866, 0.2981, 0.3014]}, {"w": "as", "b": [0.304, 0.2866, 0.3202, 0.3014]}, {"w": "the", "b": [0.3262, 0.2866, 0.3513, 0.3014]}, {"w": "training", "b": [0.3572, 0.2866, 0.4196, 0.3014]}, {"w": "data,", "b": [0.4255, 0.2866, 0.4657, 0.3014]}, {"w": "then", "b": [0.4717, 0.2866, 0.5069, 0.3014]}, {"w": "the", "b": [0.5128, 0.2866, 0.5379, 0.3014]}, {"w": "model,", "b": [0.5439, 0.2866, 0.5966, 0.3014]}, {"w": "on", "b": [0.6026, 0.2866, 0.6217, 0.3014]}, {"w": "average,", "b": [0.6276, 0.2866, 0.6915, 0.3014]}, {"w": "has", "b": [0.6975, 0.2866, 0.7237, 0.3014]}, {"w": "to", "b": [0.7296, 0.2866, 0.7457, 0.3014]}, {"w": "make", "b": [0.7516, 0.2866, 0.7928, 0.3014]}, {"w": "the", "b": [0.7987, 0.2866, 0.8239, 0.3014]}, {"w": "same", "b": [0.8298, 0.2866, 0.8691, 0.3014]}, {"w": "percentage", "b": [0.1312, 0.3046, 0.2157, 0.3194]}, {"w": "of", "b": [0.2216, 0.3046, 0.2362, 0.3194]}, {"w": "errors", "b": [0.2421, 0.3046, 0.2876, 0.3194]}, {"w": "as", "b": [0.2935, 0.3046, 0.3097, 0.3194]}, {"w": "observed", "b": [0.3156, 0.3046, 0.3841, 0.3194]}, {"w": "on", "b": [0.39, 0.3046, 0.4091, 0.3194]}, {"w": "the", "b": [0.415, 0.3046, 0.4401, 0.3194]}, {"w": "holdout", "b": [0.446, 0.3046, 0.5063, 0.3194]}, {"w": "data", "b": [0.5122, 0.3046, 0.5474, 0.3194]}, {"w": "when", "b": [0.5533, 0.3046, 0.5945, 0.3194]}, {"w": "the", "b": [0.6004, 0.3046, 0.6255, 0.3194]}, {"w": "model", "b": [0.6314, 0.3046, 0.6792, 0.3194]}, {"w": "was", "b": [0.6851, 0.3046, 0.7138, 0.3194]}, {"w": "trained.", "b": [0.7197, 0.3046, 0.7811, 0.3194]}, {"w": "The", "b": [0.7892, 0.3046, 0.8203, 0.3194]}, {"w": "latter", "b": [0.8262, 0.3046, 0.8695, 0.3194]}, {"w": "property", "b": [0.1312, 0.3225, 0.1992, 0.3373]}, {"w": "(reproducibility)", "b": [0.2046, 0.3225, 0.3349, 0.3373]}, {"w": "means", "b": [0.3403, 0.3225, 0.3897, 0.3373]}, {"w": "that", "b": [0.3951, 0.3225, 0.4283, 0.3373]}, {"w": "a", "b": [0.4337, 0.3225, 0.4428, 0.3373]}, {"w": "model", "b": [0.4482, 0.3225, 0.4959, 0.3373]}, {"w": "with", "b": [0.5014, 0.3225, 0.5365, 0.3373]}, {"w": "similar", "b": [0.542, 0.3225, 0.5954, 0.3373]}, {"w": "properties", "b": [0.6009, 0.3225, 0.68, 0.3373]}, {"w": "can", "b": [0.6854, 0.3225, 0.7126, 0.3373]}, {"w": "be", "b": [0.718, 0.3225, 0.7366, 0.3373]}, {"w": "easily", "b": [0.742, 0.3225, 0.7859, 0.3373]}, {"w": "built", "b": [0.7913, 0.3225, 0.8285, 0.3373]}, {"w": "once", "b": [0.8339, 0.3225, 0.8691, 0.3373]}, {"w": "again", "b": [0.1312, 0.3404, 0.174, 0.3553]}, {"w": "from", "b": [0.1802, 0.3404, 0.2174, 0.3553]}, {"w": "the", "b": [0.2236, 0.3404, 0.2491, 0.3553]}, {"w": "same", "b": [0.2553, 0.3404, 0.2951, 0.3553]}, {"w": "training", "b": [0.3013, 0.3404, 0.3645, 0.3553]}, {"w": "data", "b": [0.3707, 0.3404, 0.4063, 0.3553]}, {"w": "using", "b": [0.4125, 0.3404, 0.4544, 0.3553]}, {"w": "the", "b": [0.4606, 0.3404, 0.4861, 0.3553]}, {"w": "same", "b": [0.4922, 0.3404, 0.5321, 0.3553]}, {"w": "algorithm", "b": [0.5382, 0.3404, 0.6157, 0.3553]}, {"w": "and", "b": [0.6219, 0.3404, 0.6514, 0.3553]}, {"w": "values", "b": [0.6576, 0.3404, 0.7061, 0.3553]}, {"w": "of", "b": [0.7123, 0.3404, 0.7271, 0.3553]}, {"w": "hyperparameters.", "b": [0.7332, 0.3404, 0.8726, 0.3553]}, {"w": "The", "b": [0.1306, 0.3582, 0.163, 0.3733]}, {"w": "word", "b": [0.1704, 0.3582, 0.2108, 0.3733]}, {"w": "“easily”", "b": [0.2182, 0.3582, 0.2816, 0.3733]}, {"w": "means", "b": [0.289, 0.3582, 0.3404, 0.3733]}, {"w": "that", "b": [0.3478, 0.3582, 0.3824, 0.3733]}, {"w": "no", "b": [0.3898, 0.3582, 0.4097, 0.3733]}, {"w": "additional", "b": [0.4171, 0.3582, 0.4998, 0.3733]}, {"w": "analysis,", "b": [0.5072, 0.3582, 0.577, 0.3733]}, {"w": "labeling,", "b": [0.5847, 0.3582, 0.6543, 0.3733]}, {"w": "or", "b": [0.6621, 0.3582, 0.6789, 0.3733]}, {"w": "coding", "b": [0.6863, 0.3582, 0.7402, 0.3733]}, {"w": "is", "b": [0.7476, 0.3582, 0.7603, 0.3733]}, {"w": "necessary", "b": [0.7677, 0.3582, 0.8449, 0.3733]}, {"w": "to", "b": [0.8524, 0.3582, 0.8691, 0.3733]}, {"w": "rebuild", "b": [0.1312, 0.3762, 0.1877, 0.3912]}, {"w": "the", "b": [0.1939, 0.3762, 0.2195, 0.3912]}, {"w": "model,", "b": [0.2256, 0.3762, 0.2795, 0.3912]}, {"w": "only", "b": [0.2856, 0.3762, 0.32, 0.3912]}, {"w": "the", "b": [0.3261, 0.3762, 0.3518, 0.3912]}, {"w": "compute", "b": [0.3579, 0.3762, 0.4266, 0.3912]}, {"w": "power.", "b": [0.4328, 0.3762, 0.4856, 0.3912]}]}, {"id": "b_4", "type": "paragraph", "text": "When defining the goal of machine learning, make sure you solve the right problem. To", "words": [{"w": "When", "b": [0.1303, 0.403, 0.1789, 0.4181]}, {"w": "defining", "b": [0.1862, 0.403, 0.2511, 0.4181]}, {"w": "the", "b": [0.2584, 0.403, 0.2846, 0.4181]}, {"w": "goal", "b": [0.2919, 0.403, 0.3253, 0.4181]}, {"w": "of", "b": [0.3327, 0.403, 0.3478, 0.4181]}, {"w": "machine", "b": [0.3551, 0.403, 0.4226, 0.4181]}, {"w": "learning,", "b": [0.4299, 0.403, 0.5011, 0.4181]}, {"w": "make", "b": [0.5087, 0.403, 0.5516, 0.4181]}, {"w": "sure", "b": [0.5589, 0.403, 0.5925, 0.4181]}, {"w": "you", "b": [0.5999, 0.403, 0.6292, 0.4181]}, {"w": "solve", "b": [0.6365, 0.403, 0.6763, 0.4181]}, {"w": "the", "b": [0.6836, 0.403, 0.7098, 0.4181]}, {"w": "right", "b": [0.7171, 0.403, 0.7564, 0.4181]}, {"w": "problem.", "b": [0.7637, 0.403, 0.8359, 0.4181]}, {"w": "To", "b": [0.8476, 0.403, 0.8691, 0.4181]}]}, {"id": "b_5", "type": "paragraph", "text": "give an example of an incorrectly defined goal, imagine your client has a cat and a dog and needs a system that lets their cat in the house but keeps their dog out. You might decide to train the model to distinguish cats from dogs. However, this model will also let any cat in and not just their cat. Alternatively, you may decide that because the client only has two animals, you will train a model that distinguishes between those two. In this case, because your classification model is binary, a raccoon will be classified as either the dog or the cat. If it’s classified as the cat, it will be let in the house.4", "words": [{"w": "give", "b": [0.1312, 0.4211, 0.1631, 0.4361]}, {"w": "an", "b": [0.1692, 0.4211, 0.1887, 0.4361]}, {"w": "example", "b": [0.1948, 0.4211, 0.261, 0.4361]}, {"w": "of", "b": [0.2672, 0.4211, 0.282, 0.4361]}, {"w": "an", "b": [0.2882, 0.4211, 0.3077, 0.4361]}, {"w": "incorrectly", "b": [0.3138, 0.4211, 0.3996, 0.4361]}, {"w": "defined", "b": [0.4058, 0.4211, 0.4633, 0.4361]}, {"w": "goal,", "b": [0.4694, 0.4211, 0.5074, 0.4361]}, {"w": "imagine", "b": [0.5135, 0.4211, 0.5761, 0.4361]}, {"w": "your", "b": [0.5822, 0.4211, 0.6182, 0.4361]}, {"w": "client", "b": [0.6244, 0.4211, 0.668, 0.4361]}, {"w": "has", "b": [0.6741, 0.4211, 0.7009, 0.4361]}, {"w": "a", "b": [0.7071, 0.4211, 0.7163, 0.4361]}, {"w": "cat", "b": [0.7224, 0.4211, 0.7471, 0.4361]}, {"w": "and", "b": [0.7532, 0.4211, 0.783, 0.4361]}, {"w": "a", "b": [0.7891, 0.4211, 0.7983, 0.4361]}, {"w": "dog", "b": [0.8045, 0.4211, 0.8332, 0.4361]}, {"w": "and", "b": [0.8393, 0.4211, 0.8691, 0.4361]}, {"w": "needs", "b": [0.1312, 0.4391, 0.1749, 0.454]}, {"w": "a", "b": [0.181, 0.4391, 0.1901, 0.454]}, {"w": "system", "b": [0.1963, 0.4391, 0.2506, 0.454]}, {"w": "that", "b": [0.2568, 0.4391, 0.2902, 0.454]}, {"w": "lets", "b": [0.2963, 0.4391, 0.3238, 0.454]}, {"w": "their", "b": [0.3299, 0.4391, 0.3674, 0.454]}, {"w": "cat", "b": [0.3735, 0.4391, 0.3978, 0.454]}, {"w": "in", "b": [0.404, 0.4391, 0.4192, 0.454]}, {"w": "the", "b": [0.4253, 0.4391, 0.4506, 0.454]}, {"w": "house", "b": [0.4568, 0.4391, 0.5014, 0.454]}, {"w": "but", "b": [0.5076, 0.4391, 0.5349, 0.454]}, {"w": "keeps", "b": [0.541, 0.4391, 0.5837, 0.454]}, {"w": "their", "b": [0.5898, 0.4391, 0.6273, 0.454]}, {"w": "dog", "b": [0.6335, 0.4391, 0.6618, 0.454]}, {"w": "out.", "b": [0.6679, 0.4391, 0.6993, 0.454]}, {"w": "You", "b": [0.7075, 0.4391, 0.7389, 0.454]}, {"w": "might", "b": [0.745, 0.4391, 0.791, 0.454]}, {"w": "decide", "b": [0.7972, 0.4391, 0.8468, 0.454]}, {"w": "to", "b": [0.8529, 0.4391, 0.8691, 0.454]}, {"w": "train", "b": [0.1312, 0.4569, 0.1708, 0.472]}, {"w": "the", "b": [0.177, 0.4569, 0.2029, 0.472]}, {"w": "model", "b": [0.2091, 0.4569, 0.2585, 0.472]}, {"w": "to", "b": [0.2646, 0.4569, 0.2812, 0.472]}, {"w": "distinguish", "b": [0.2874, 0.4569, 0.376, 0.472]}, {"w": "cats", "b": [0.3822, 0.4569, 0.4145, 0.472]}, {"w": "from", "b": [0.4206, 0.4569, 0.4586, 0.472]}, {"w": "dogs.", "b": [0.4648, 0.4569, 0.5065, 0.472]}, {"w": "However,", "b": [0.5147, 0.4569, 0.5891, 0.472]}, {"w": "this", "b": [0.5952, 0.4569, 0.6255, 0.472]}, {"w": "model", "b": [0.6317, 0.4569, 0.681, 0.472]}, {"w": "will", "b": [0.6872, 0.4569, 0.7163, 0.472]}, {"w": "also", "b": [0.7224, 0.4569, 0.7537, 0.472]}, {"w": "let", "b": [0.7599, 0.4569, 0.7807, 0.472]}, {"w": "any", "b": [0.7866, 0.4569, 0.8157, 0.472]}, {"w": "cat", "b": [0.8223, 0.4569, 0.8458, 0.472]}, {"w": "in", "b": [0.8532, 0.4569, 0.8688, 0.472]}, {"w": "and", "b": [0.1312, 0.4748, 0.1615, 0.4899]}, {"w": "not", "b": [0.1676, 0.4748, 0.1947, 0.4899]}, {"w": "just", "b": [0.2009, 0.4748, 0.2317, 0.4899]}, {"w": "their", "b": [0.2378, 0.4748, 0.276, 0.4899]}, {"w": "cat.", "b": [0.2839, 0.4748, 0.3141, 0.4899]}, {"w": "Alternatively,", "b": [0.3223, 0.4748, 0.4335, 0.4899]}, {"w": "you", "b": [0.4396, 0.4748, 0.4688, 0.4899]}, {"w": "may", "b": [0.475, 0.4748, 0.5094, 0.4899]}, {"w": "decide", "b": [0.5155, 0.4748, 0.5666, 0.4899]}, {"w": "that", "b": [0.5728, 0.4748, 0.6072, 0.4899]}, {"w": "because", "b": [0.6133, 0.4748, 0.6765, 0.4899]}, {"w": "the", "b": [0.6827, 0.4748, 0.7088, 0.4899]}, {"w": "client", "b": [0.7149, 0.4748, 0.7592, 0.4899]}, {"w": "only", "b": [0.7654, 0.4748, 0.8003, 0.4899]}, {"w": "has", "b": [0.8065, 0.4748, 0.8337, 0.4899]}, {"w": "two", "b": [0.8398, 0.4748, 0.869, 0.4899]}, {"w": "animals,", "b": [0.1312, 0.4928, 0.1984, 0.5078]}, {"w": "you", "b": [0.2045, 0.4928, 0.2334, 0.5078]}, {"w": "will", "b": [0.2395, 0.4928, 0.2684, 0.5078]}, {"w": "train", "b": [0.2746, 0.4928, 0.3138, 0.5078]}, {"w": "a", "b": [0.32, 0.4928, 0.3292, 0.5078]}, {"w": "model", "b": [0.3354, 0.4928, 0.3844, 0.5078]}, {"w": "that", "b": [0.3905, 0.4928, 0.4246, 0.5078]}, {"w": "distinguishes", "b": [0.4307, 0.4928, 0.5342, 0.5078]}, {"w": "between", "b": [0.5404, 0.4928, 0.6059, 0.5078]}, {"w": "those", "b": [0.612, 0.4928, 0.6544, 0.5078]}, {"w": "two.", "b": [0.6606, 0.4928, 0.6946, 0.5078]}, {"w": "In", "b": [0.7028, 0.4928, 0.7198, 0.5078]}, {"w": "this", "b": [0.726, 0.4928, 0.756, 0.5078]}, {"w": "case,", "b": [0.7621, 0.4928, 0.8004, 0.5078]}, {"w": "because", "b": [0.8066, 0.4928, 0.8691, 0.5078]}, {"w": "your", "b": [0.1308, 0.5109, 0.166, 0.5258]}, {"w": "classification", "b": [0.1721, 0.5109, 0.2718, 0.5258]}, {"w": "model", "b": [0.2779, 0.5109, 0.3256, 0.5258]}, {"w": "is", "b": [0.3317, 0.5109, 0.3439, 0.5258]}, {"w": "binary,", "b": [0.35, 0.5109, 0.4043, 0.5258]}, {"w": "a", "b": [0.4104, 0.5109, 0.4194, 0.5258]}, {"w": "raccoon", "b": [0.4255, 0.5109, 0.4864, 0.5258]}, {"w": "will", "b": [0.4925, 0.5109, 0.5206, 0.5258]}, {"w": "be", "b": [0.5267, 0.5109, 0.5454, 0.5258]}, {"w": "classified", "b": [0.5515, 0.5109, 0.621, 0.5258]}, {"w": "as", "b": [0.6271, 0.5109, 0.6433, 0.5258]}, {"w": "either", "b": [0.6494, 0.5109, 0.6947, 0.5258]}, {"w": "the", "b": [0.7008, 0.5109, 0.7259, 0.5258]}, {"w": "dog", "b": [0.732, 0.5109, 0.7602, 0.5258]}, {"w": "or", "b": [0.7663, 0.5109, 0.7824, 0.5258]}, {"w": "the", "b": [0.7885, 0.5109, 0.8136, 0.5258]}, {"w": "cat.", "b": [0.8197, 0.5109, 0.8489, 0.5258]}, {"w": "If", "b": [0.8571, 0.5109, 0.8691, 0.5258]}, {"w": "it’s", "b": [0.1312, 0.5288, 0.156, 0.5437]}, {"w": "classified", "b": [0.1621, 0.5288, 0.2331, 0.5437]}, {"w": "as", "b": [0.2392, 0.5288, 0.2557, 0.5437]}, {"w": "the", "b": [0.2619, 0.5288, 0.2875, 0.5437]}, {"w": "cat,", "b": [0.2937, 0.5288, 0.3234, 0.5437]}, {"w": "it", "b": [0.3296, 0.5288, 0.3419, 0.5437]}, {"w": "will", "b": [0.348, 0.5288, 0.3767, 0.5437]}, {"w": "be", "b": [0.3829, 0.5288, 0.4019, 0.5437]}, {"w": "let", "b": [0.408, 0.5288, 0.4285, 0.5437]}, {"w": "in", "b": [0.4347, 0.5288, 0.4501, 0.5437]}, {"w": "the", "b": [0.4562, 0.5288, 0.4819, 0.5437]}, {"w": "house.4", "b": [0.488, 0.5269, 0.5455, 0.5437]}]}, {"id": "b_6", "type": "paragraph", "text": "Defining a single goal for a machine learning project could be challenging. Usually, within an organization, there will be multiple stakeholders having interest towards your project. An obvious stakeholder is the product owner. Let their objective be to increase the time the user spends on an online platform by at least 15%. At the same time, the executive VP would like to increase the revenue from advertisements by 20%. Furthermore, the finance team would like to reduce the monthly cloud bill by 10%. When defining the goal of your machine learning project, you should find the right balance between those possibly conflicting requirements and translate them into the choice of the model’s input and output, cost function, and performance metric.", "words": [{"w": "Defining", "b": [0.1312, 0.5558, 0.1973, 0.5706]}, {"w": "a", "b": [0.2033, 0.5558, 0.2123, 0.5706]}, {"w": "single", "b": [0.2183, 0.5558, 0.2627, 0.5706]}, {"w": "goal", "b": [0.2687, 0.5558, 0.3008, 0.5706]}, {"w": "for", "b": [0.3068, 0.5558, 0.3285, 0.5706]}, {"w": "a", "b": [0.3344, 0.5558, 0.3435, 0.5706]}, {"w": "machine", "b": [0.3495, 0.5558, 0.4143, 0.5706]}, {"w": "learning", "b": [0.4203, 0.5558, 0.4836, 0.5706]}, {"w": "project", "b": [0.4896, 0.5558, 0.545, 0.5706]}, {"w": "could", "b": [0.551, 0.5558, 0.5932, 0.5706]}, {"w": "be", "b": [0.5992, 0.5558, 0.6178, 0.5706]}, {"w": "challenging.", "b": [0.6238, 0.5558, 0.7167, 0.5706]}, {"w": "Usually,", "b": [0.7249, 0.5558, 0.7878, 0.5706]}, {"w": "within", "b": [0.7938, 0.5558, 0.844, 0.5706]}, {"w": "an", "b": [0.85, 0.5558, 0.8691, 0.5706]}, {"w": "organization,", "b": [0.1312, 0.5735, 0.2378, 0.5886]}, {"w": "there", "b": [0.2439, 0.5735, 0.2857, 0.5886]}, {"w": "will", "b": [0.2919, 0.5735, 0.3212, 0.5886]}, {"w": "be", "b": [0.3273, 0.5735, 0.3466, 0.5886]}, {"w": "multiple", "b": [0.3528, 0.5735, 0.4201, 0.5886]}, {"w": "stakeholders", "b": [0.4263, 0.5735, 0.5268, 0.5886]}, {"w": "having", "b": [0.533, 0.5735, 0.5873, 0.5886]}, {"w": "interest", "b": [0.5934, 0.5735, 0.6547, 0.5886]}, {"w": "towards", "b": [0.6609, 0.5735, 0.7247, 0.5886]}, {"w": "your", "b": [0.7309, 0.5735, 0.7675, 0.5886]}, {"w": "project.", "b": [0.7736, 0.5735, 0.8363, 0.5886]}, {"w": "An", "b": [0.8446, 0.5735, 0.8691, 0.5886]}, {"w": "obvious", "b": [0.1312, 0.5917, 0.1906, 0.6065]}, {"w": "stakeholder", "b": [0.1964, 0.5917, 0.286, 0.6065]}, {"w": "is", "b": [0.2918, 0.5917, 0.304, 0.6065]}, {"w": "the", "b": [0.3098, 0.5917, 0.3349, 0.6065]}, {"w": "product", "b": [0.3408, 0.5917, 0.4026, 0.6065]}, {"w": "owner.", "b": [0.4085, 0.5917, 0.4602, 0.6065]}, {"w": "Let", "b": [0.4683, 0.5917, 0.4947, 0.6065]}, {"w": "their", "b": [0.5005, 0.5917, 0.5378, 0.6065]}, {"w": "objective", "b": [0.5436, 0.5917, 0.6139, 0.6065]}, {"w": "be", "b": [0.6198, 0.5917, 0.6384, 0.6065]}, {"w": "to", "b": [0.6442, 0.5917, 0.6602, 0.6065]}, {"w": "increase", "b": [0.6661, 0.5917, 0.7286, 0.6065]}, {"w": "the", "b": [0.7344, 0.5917, 0.7595, 0.6065]}, {"w": "time", "b": [0.7653, 0.5917, 0.8005, 0.6065]}, {"w": "the", "b": [0.8063, 0.5917, 0.8314, 0.6065]}, {"w": "user", "b": [0.8372, 0.5917, 0.8695, 0.6065]}, {"w": "spends", "b": [0.1312, 0.6097, 0.1842, 0.6245]}, {"w": "on", "b": [0.1899, 0.6097, 0.209, 0.6245]}, {"w": "an", "b": [0.2147, 0.6097, 0.2338, 0.6245]}, {"w": "online", "b": [0.2396, 0.6097, 0.2868, 0.6245]}, {"w": "platform", "b": [0.2925, 0.6097, 0.3604, 0.6245]}, {"w": "by", "b": [0.3661, 0.6097, 0.3852, 0.6245]}, {"w": "at", "b": [0.3909, 0.6097, 0.407, 0.6245]}, {"w": "least", "b": [0.4127, 0.6097, 0.449, 0.6245]}, {"w": "15%.", "b": [0.4545, 0.6097, 0.4927, 0.6245]}, {"w": "At", "b": [0.5007, 0.6097, 0.5208, 0.6245]}, {"w": "the", "b": [0.5265, 0.6097, 0.5517, 0.6245]}, {"w": "same", "b": [0.5574, 0.6097, 0.5967, 0.6245]}, {"w": "time,", "b": [0.6024, 0.6097, 0.6426, 0.6245]}, {"w": "the", "b": [0.6484, 0.6097, 0.6735, 0.6245]}, {"w": "executive", "b": [0.6792, 0.6097, 0.7521, 0.6245]}, {"w": "VP", "b": [0.7578, 0.6097, 0.7837, 0.6245]}, {"w": "would", "b": [0.7894, 0.6097, 0.8361, 0.6245]}, {"w": "like", "b": [0.8418, 0.6097, 0.8689, 0.6245]}, {"w": "to", "b": [0.1312, 0.6274, 0.1477, 0.6424]}, {"w": "increase", "b": [0.1539, 0.6274, 0.218, 0.6424]}, {"w": "the", "b": [0.2241, 0.6274, 0.2499, 0.6424]}, {"w": "revenue", "b": [0.2561, 0.6274, 0.3175, 0.6424]}, {"w": "from", "b": [0.3236, 0.6274, 0.3613, 0.6424]}, {"w": "advertisements", "b": [0.3675, 0.6274, 0.4879, 0.6424]}, {"w": "by", "b": [0.4941, 0.6274, 0.5137, 0.6424]}, {"w": "20%.", "b": [0.5196, 0.6274, 0.5588, 0.6424]}, {"w": "Furthermore,", "b": [0.567, 0.6274, 0.6736, 0.6424]}, {"w": "the", "b": [0.6798, 0.6274, 0.7056, 0.6424]}, {"w": "finance", "b": [0.7117, 0.6274, 0.7685, 0.6424]}, {"w": "team", "b": [0.7746, 0.6274, 0.8148, 0.6424]}, {"w": "would", "b": [0.8209, 0.6274, 0.8689, 0.6424]}, {"w": "like", "b": [0.1312, 0.6455, 0.1584, 0.6604]}, {"w": "to", "b": [0.1634, 0.6455, 0.1795, 0.6604]}, {"w": "reduce", "b": [0.1846, 0.6455, 0.2359, 0.6604]}, {"w": "the", "b": [0.241, 0.6455, 0.2661, 0.6604]}, {"w": "monthly", "b": [0.2712, 0.6455, 0.3365, 0.6604]}, {"w": "cloud", "b": [0.3416, 0.6455, 0.3838, 0.6604]}, {"w": "bill", "b": [0.3889, 0.6455, 0.414, 0.6604]}, {"w": "by", "b": [0.4191, 0.6455, 0.4382, 0.6604]}, {"w": "10%.", "b": [0.4431, 0.6455, 0.4813, 0.6604]}, {"w": "When", "b": [0.4891, 0.6455, 0.5358, 0.6604]}, {"w": "defining", "b": [0.5409, 0.6455, 0.6032, 0.6604]}, {"w": "the", "b": [0.6083, 0.6455, 0.6334, 0.6604]}, {"w": "goal", "b": [0.6385, 0.6455, 0.6707, 0.6604]}, {"w": "of", "b": [0.6758, 0.6455, 0.6903, 0.6604]}, {"w": "your", "b": [0.6954, 0.6455, 0.7306, 0.6604]}, {"w": "machine", "b": [0.7357, 0.6455, 0.8005, 0.6604]}, {"w": "learning", "b": [0.8056, 0.6455, 0.8689, 0.6604]}, {"w": "project,", "b": [0.1312, 0.6633, 0.194, 0.6784]}, {"w": "you", "b": [0.2002, 0.6633, 0.2295, 0.6784]}, {"w": "should", "b": [0.2357, 0.6633, 0.2891, 0.6784]}, {"w": "find", "b": [0.2953, 0.6633, 0.3266, 0.6784]}, {"w": "the", "b": [0.3328, 0.6633, 0.359, 0.6784]}, {"w": "right", "b": [0.3651, 0.6633, 0.4044, 0.6784]}, {"w": "balance", "b": [0.4106, 0.6633, 0.4723, 0.6784]}, {"w": "between", "b": [0.4784, 0.6633, 0.5449, 0.6784]}, {"w": "those", "b": [0.551, 0.6633, 0.594, 0.6784]}, {"w": "possibly", "b": [0.6002, 0.6633, 0.6663, 0.6784]}, {"w": "conflicting", "b": [0.6724, 0.6633, 0.7572, 0.6784]}, {"w": "requirements", "b": [0.7633, 0.6633, 0.8692, 0.6784]}, {"w": "and", "b": [0.1312, 0.6812, 0.1616, 0.6963]}, {"w": "translate", "b": [0.1685, 0.6812, 0.2408, 0.6963]}, {"w": "them", "b": [0.2478, 0.6812, 0.2896, 0.6963]}, {"w": "into", "b": [0.2966, 0.6812, 0.3285, 0.6963]}, {"w": "the", "b": [0.3354, 0.6812, 0.3616, 0.6963]}, {"w": "choice", "b": [0.3685, 0.6812, 0.4182, 0.6963]}, {"w": "of", "b": [0.4252, 0.6812, 0.4404, 0.6963]}, {"w": "the", "b": [0.4473, 0.6812, 0.4735, 0.6963]}, {"w": "model’s", "b": [0.4804, 0.6812, 0.5427, 0.6963]}, {"w": "input", "b": [0.5497, 0.6812, 0.5936, 0.6963]}, {"w": "and", "b": [0.6006, 0.6812, 0.6309, 0.6963]}, {"w": "output,", "b": [0.6379, 0.6812, 0.6985, 0.6963]}, {"w": "cost", "b": [0.7054, 0.6813, 0.7421, 0.6962]}, {"w": "function,", "b": [0.75, 0.6812, 0.8313, 0.6963]}, {"w": "and", "b": [0.8385, 0.6812, 0.8688, 0.6963]}, {"w": "performance", "b": [0.1312, 0.6992, 0.2468, 0.7142]}, {"w": "metric.", "b": [0.2539, 0.6992, 0.3188, 0.7142]}]}, {"id": "b_7", "type": "paragraph", "text": "2.4 Structuring a Machine Learning Team", "words": [{"w": "2.4", "b": [0.1312, 0.7478, 0.1631, 0.7657]}, {"w": "Structuring", "b": [0.188, 0.7478, 0.3136, 0.7657]}, {"w": "a", "b": [0.3219, 0.7478, 0.334, 0.7657]}, {"w": "Machine", "b": [0.3423, 0.7478, 0.4344, 0.7657]}, {"w": "Learning", "b": [0.4427, 0.7478, 0.5384, 0.7657]}, {"w": "Team", "b": [0.5467, 0.7478, 0.6061, 0.7657]}]}, {"id": "b_8", "type": "paragraph", "text": "There are two cultures of structuring a machine learning team, depending on the organization.", "words": [{"w": "There", "b": [0.1306, 0.7868, 0.1769, 0.8016]}, {"w": "are", "b": [0.1822, 0.7868, 0.2064, 0.8016]}, {"w": "two", "b": [0.2117, 0.7868, 0.2398, 0.8016]}, {"w": "cultures", "b": [0.2452, 0.7868, 0.3077, 0.8016]}, {"w": "of", "b": [0.313, 0.7868, 0.3276, 0.8016]}, {"w": "structuring", "b": [0.3329, 0.7868, 0.4206, 0.8016]}, {"w": "a", "b": [0.4259, 0.7868, 0.435, 0.8016]}, {"w": "machine", "b": [0.4403, 0.7868, 0.5052, 0.8016]}, {"w": "learning", "b": [0.5105, 0.7868, 0.5739, 0.8016]}, {"w": "team,", "b": [0.5792, 0.7868, 0.6234, 0.8016]}, {"w": "depending", "b": [0.629, 0.7868, 0.7099, 0.8016]}, {"w": "on", "b": [0.7152, 0.7868, 0.7343, 0.8016]}, {"w": "the", "b": [0.7397, 0.7868, 0.7648, 0.8016]}, {"w": "organization.", "b": [0.7702, 0.7868, 0.8727, 0.8016]}]}, {"id": "b_9", "type": "paragraph", "text": "4This is why having the class “Other” your classification problems is almost always a good idea.", "words": [{"w": "4This", "b": [0.1518, 0.8134, 0.19, 0.8273]}, {"w": "is", "b": [0.1953, 0.8153, 0.2058, 0.8273]}, {"w": "why", "b": [0.211, 0.8153, 0.2389, 0.8273]}, {"w": "having", "b": [0.2441, 0.8153, 0.2894, 0.8273]}, {"w": "the", "b": [0.2946, 0.8153, 0.3164, 0.8273]}, {"w": "class", "b": [0.3216, 0.8153, 0.3532, 0.8273]}, {"w": "“Other”", "b": [0.3584, 0.8153, 0.4133, 0.8273]}, {"w": "your", "b": [0.4185, 0.8153, 0.449, 0.8273]}, {"w": "classification", "b": [0.4542, 0.8153, 0.5406, 0.8273]}, {"w": "problems", "b": [0.5458, 0.8153, 0.6078, 0.8273]}, {"w": "is", "b": [0.613, 0.8153, 0.6235, 0.8273]}, {"w": "almost", "b": [0.6288, 0.8153, 0.6742, 0.8273]}, {"w": "always", "b": [0.6794, 0.8153, 0.7243, 0.8273]}, {"w": "a", "b": [0.7295, 0.8153, 0.7374, 0.8273]}, {"w": "good", "b": [0.7426, 0.8153, 0.7757, 0.8273]}, {"w": "idea.", "b": [0.7809, 0.8153, 0.8131, 0.8273]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "8", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 38, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2.4.1 Two Cultures", "words": [{"w": "2.4.1", "b": [0.1312, 0.0884, 0.1749, 0.1033]}, {"w": "Two", "b": [0.1961, 0.0884, 0.2344, 0.1033]}, {"w": "Cultures", "b": [0.2415, 0.0884, 0.3214, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "One culture says that a machine learning team has to be composed of data analysts who collaborate closely with software engineers. In such a culture, a software engineer doesn’t need to have deep expertise in machine learning, but has to understand the vocabulary of their fellow data analysts.", "words": [{"w": "One", "b": [0.1312, 0.1249, 0.1647, 0.14]}, {"w": "culture", "b": [0.1714, 0.1249, 0.229, 0.14]}, {"w": "says", "b": [0.2356, 0.1249, 0.2693, 0.14]}, {"w": "that", "b": [0.2759, 0.1249, 0.3104, 0.14]}, {"w": "a", "b": [0.3171, 0.1249, 0.3265, 0.14]}, {"w": "machine", "b": [0.3331, 0.1249, 0.4006, 0.14]}, {"w": "learning", "b": [0.4072, 0.1249, 0.4732, 0.14]}, {"w": "team", "b": [0.4798, 0.1249, 0.5206, 0.14]}, {"w": "has", "b": [0.5272, 0.1249, 0.5545, 0.14]}, {"w": "to", "b": [0.5612, 0.1249, 0.5779, 0.14]}, {"w": "be", "b": [0.5846, 0.1249, 0.6039, 0.14]}, {"w": "composed", "b": [0.6106, 0.1249, 0.6907, 0.14]}, {"w": "of", "b": [0.6973, 0.1249, 0.7125, 0.14]}, {"w": "data", "b": [0.7191, 0.1249, 0.7557, 0.14]}, {"w": "analysts", "b": [0.7623, 0.1249, 0.829, 0.14]}, {"w": "who", "b": [0.8356, 0.1249, 0.8691, 0.14]}, {"w": "collaborate", "b": [0.1312, 0.1428, 0.2217, 0.1579]}, {"w": "closely", "b": [0.2281, 0.1428, 0.2821, 0.1579]}, {"w": "with", "b": [0.2885, 0.1428, 0.3251, 0.1579]}, {"w": "software", "b": [0.3314, 0.1428, 0.3991, 0.1579]}, {"w": "engineers.", "b": [0.4054, 0.1428, 0.4862, 0.1579]}, {"w": "In", "b": [0.495, 0.1428, 0.5123, 0.1579]}, {"w": "such", "b": [0.5186, 0.1428, 0.5549, 0.1579]}, {"w": "a", "b": [0.5612, 0.1428, 0.5706, 0.1579]}, {"w": "culture,", "b": [0.577, 0.1428, 0.6398, 0.1579]}, {"w": "a", "b": [0.6463, 0.1428, 0.6557, 0.1579]}, {"w": "software", "b": [0.662, 0.1428, 0.7297, 0.1579]}, {"w": "engineer", "b": [0.736, 0.1428, 0.8041, 0.1579]}, {"w": "doesn’t", "b": [0.8105, 0.1428, 0.8697, 0.1579]}, {"w": "need", "b": [0.1312, 0.1608, 0.1689, 0.1759]}, {"w": "to", "b": [0.175, 0.1608, 0.1917, 0.1759]}, {"w": "have", "b": [0.1978, 0.1608, 0.235, 0.1759]}, {"w": "deep", "b": [0.2411, 0.1608, 0.2787, 0.1759]}, {"w": "expertise", "b": [0.2848, 0.1608, 0.3582, 0.1759]}, {"w": "in", "b": [0.3643, 0.1608, 0.38, 0.1759]}, {"w": "machine", "b": [0.3861, 0.1608, 0.4535, 0.1759]}, {"w": "learning,", "b": [0.4596, 0.1608, 0.5307, 0.1759]}, {"w": "but", "b": [0.5369, 0.1608, 0.5651, 0.1759]}, {"w": "has", "b": [0.5712, 0.1608, 0.5985, 0.1759]}, {"w": "to", "b": [0.6046, 0.1608, 0.6213, 0.1759]}, {"w": "understand", "b": [0.6275, 0.1608, 0.7196, 0.1759]}, {"w": "the", "b": [0.7257, 0.1608, 0.7519, 0.1759]}, {"w": "vocabulary", "b": [0.758, 0.1608, 0.8479, 0.1759]}, {"w": "of", "b": [0.854, 0.1608, 0.8692, 0.1759]}, {"w": "their", "b": [0.1312, 0.1788, 0.1692, 0.1938]}, {"w": "fellow", "b": [0.1754, 0.1788, 0.2215, 0.1938]}, {"w": "data", "b": [0.2277, 0.1788, 0.2636, 0.1938]}, {"w": "analysts.", "b": [0.2697, 0.1788, 0.3402, 0.1938]}]}, {"id": "b_2", "type": "paragraph", "text": "According to other culture, all engineers in a machine learning team must have a combination of machine learning and software engineering skills.", "words": [{"w": "According", "b": [0.1305, 0.2059, 0.21, 0.2207]}, {"w": "to", "b": [0.2155, 0.2059, 0.2316, 0.2207]}, {"w": "other", "b": [0.2372, 0.2059, 0.2784, 0.2207]}, {"w": "culture,", "b": [0.284, 0.2059, 0.3443, 0.2207]}, {"w": "all", "b": [0.35, 0.2059, 0.3691, 0.2207]}, {"w": "engineers", "b": [0.3747, 0.2059, 0.4472, 0.2207]}, {"w": "in", "b": [0.4527, 0.2059, 0.4678, 0.2207]}, {"w": "a", "b": [0.4734, 0.2059, 0.4824, 0.2207]}, {"w": "machine", "b": [0.488, 0.2059, 0.5528, 0.2207]}, {"w": "learning", "b": [0.5583, 0.2059, 0.6217, 0.2207]}, {"w": "team", "b": [0.6273, 0.2059, 0.6665, 0.2207]}, {"w": "must", "b": [0.672, 0.2059, 0.7108, 0.2207]}, {"w": "have", "b": [0.7163, 0.2059, 0.752, 0.2207]}, {"w": "a", "b": [0.7575, 0.2059, 0.7666, 0.2207]}, {"w": "combination", "b": [0.7721, 0.2059, 0.8691, 0.2207]}, {"w": "of", "b": [0.1312, 0.2237, 0.1461, 0.2386]}, {"w": "machine", "b": [0.1522, 0.2237, 0.2184, 0.2386]}, {"w": "learning", "b": [0.2245, 0.2237, 0.2892, 0.2386]}, {"w": "and", "b": [0.2954, 0.2237, 0.3251, 0.2386]}, {"w": "software", "b": [0.3312, 0.2237, 0.3975, 0.2386]}, {"w": "engineering", "b": [0.4037, 0.2237, 0.495, 0.2386]}, {"w": "skills.", "b": [0.5012, 0.2237, 0.546, 0.2386]}]}, {"id": "b_3", "type": "paragraph", "text": "There are pros and cons in each culture. The proponents of the former say that each team member must be the best in what they do. A data analyst must be an expert in many machine learning techniques and have a deep understanding of the theory to come up with an effective solution to most problems, fast and with minimal effort. Similarly, a software engineer must have a deep understanding of various computing frameworks and be capable of writing efficient and maintainable code.", "words": [{"w": "There", "b": [0.1306, 0.2505, 0.1782, 0.2656]}, {"w": "are", "b": [0.1844, 0.2505, 0.2093, 0.2656]}, {"w": "pros", "b": [0.2154, 0.2505, 0.2497, 0.2656]}, {"w": "and", "b": [0.2558, 0.2505, 0.2859, 0.2656]}, {"w": "cons", "b": [0.292, 0.2505, 0.3273, 0.2656]}, {"w": "in", "b": [0.3334, 0.2505, 0.3489, 0.2656]}, {"w": "each", "b": [0.3551, 0.2505, 0.3908, 0.2656]}, {"w": "culture.", "b": [0.397, 0.2505, 0.4591, 0.2656]}, {"w": "The", "b": [0.4673, 0.2505, 0.4994, 0.2656]}, {"w": "proponents", "b": [0.5055, 0.2505, 0.5957, 0.2656]}, {"w": "of", "b": [0.6019, 0.2505, 0.6169, 0.2656]}, {"w": "the", "b": [0.623, 0.2505, 0.6489, 0.2656]}, {"w": "former", "b": [0.655, 0.2505, 0.7084, 0.2656]}, {"w": "say", "b": [0.7145, 0.2505, 0.7405, 0.2656]}, {"w": "that", "b": [0.7467, 0.2505, 0.7808, 0.2656]}, {"w": "each", "b": [0.7869, 0.2505, 0.8226, 0.2656]}, {"w": "team", "b": [0.8288, 0.2505, 0.8691, 0.2656]}, {"w": "member", "b": [0.1312, 0.2684, 0.1972, 0.2835]}, {"w": "must", "b": [0.2047, 0.2684, 0.245, 0.2835]}, {"w": "be", "b": [0.2526, 0.2684, 0.2719, 0.2835]}, {"w": "the", "b": [0.2794, 0.2684, 0.3056, 0.2835]}, {"w": "best", "b": [0.3131, 0.2684, 0.3472, 0.2835]}, {"w": "in", "b": [0.3547, 0.2684, 0.3704, 0.2835]}, {"w": "what", "b": [0.3779, 0.2684, 0.4187, 0.2835]}, {"w": "they", "b": [0.4262, 0.2684, 0.4623, 0.2835]}, {"w": "do.", "b": [0.4698, 0.2684, 0.4949, 0.2835]}, {"w": "A", "b": [0.5071, 0.2684, 0.5213, 0.2835]}, {"w": "data", "b": [0.5288, 0.2684, 0.5654, 0.2835]}, {"w": "analyst", "b": [0.5729, 0.2684, 0.6321, 0.2835]}, {"w": "must", "b": [0.6396, 0.2684, 0.68, 0.2835]}, {"w": "be", "b": [0.6875, 0.2684, 0.7068, 0.2835]}, {"w": "an", "b": [0.7143, 0.2684, 0.7342, 0.2835]}, {"w": "expert", "b": [0.7417, 0.2684, 0.794, 0.2835]}, {"w": "in", "b": [0.8016, 0.2684, 0.8173, 0.2835]}, {"w": "many", "b": [0.8248, 0.2684, 0.8697, 0.2835]}, {"w": "machine", "b": [0.1312, 0.2865, 0.1977, 0.3015]}, {"w": "learning", "b": [0.2039, 0.2865, 0.2688, 0.3015]}, {"w": "techniques", "b": [0.275, 0.2865, 0.3596, 0.3015]}, {"w": "and", "b": [0.3658, 0.2865, 0.3957, 0.3015]}, {"w": "have", "b": [0.4018, 0.2865, 0.4384, 0.3015]}, {"w": "a", "b": [0.4446, 0.2865, 0.4539, 0.3015]}, {"w": "deep", "b": [0.46, 0.2865, 0.4971, 0.3015]}, {"w": "understanding", "b": [0.5033, 0.2865, 0.6189, 0.3015]}, {"w": "of", "b": [0.625, 0.2865, 0.64, 0.3015]}, {"w": "the", "b": [0.6461, 0.2865, 0.6719, 0.3015]}, {"w": "theory", "b": [0.678, 0.2865, 0.7301, 0.3015]}, {"w": "to", "b": [0.7363, 0.2865, 0.7528, 0.3015]}, {"w": "come", "b": [0.7589, 0.2865, 0.8002, 0.3015]}, {"w": "up", "b": [0.8063, 0.2865, 0.8269, 0.3015]}, {"w": "with", "b": [0.8331, 0.2865, 0.8691, 0.3015]}, {"w": "an", "b": [0.1312, 0.3043, 0.1511, 0.3194]}, {"w": "effective", "b": [0.1573, 0.3043, 0.2238, 0.3194]}, {"w": "solution", "b": [0.23, 0.3043, 0.295, 0.3194]}, {"w": "to", "b": [0.3012, 0.3043, 0.3179, 0.3194]}, {"w": "most", "b": [0.3242, 0.3043, 0.364, 0.3194]}, {"w": "problems,", "b": [0.3702, 0.3043, 0.4499, 0.3194]}, {"w": "fast", "b": [0.4561, 0.3043, 0.4861, 0.3194]}, {"w": "and", "b": [0.4923, 0.3043, 0.5227, 0.3194]}, {"w": "with", "b": [0.5289, 0.3043, 0.5655, 0.3194]}, {"w": "minimal", "b": [0.5717, 0.3043, 0.6386, 0.3194]}, {"w": "effort.", "b": [0.6449, 0.3043, 0.6935, 0.3194]}, {"w": "Similarly,", "b": [0.702, 0.3043, 0.7795, 0.3194]}, {"w": "a", "b": [0.7857, 0.3043, 0.7951, 0.3194]}, {"w": "software", "b": [0.8014, 0.3043, 0.869, 0.3194]}, {"w": "engineer", "b": [0.1312, 0.3224, 0.1982, 0.3373]}, {"w": "must", "b": [0.2043, 0.3224, 0.244, 0.3373]}, {"w": "have", "b": [0.2501, 0.3224, 0.2867, 0.3373]}, {"w": "a", "b": [0.2928, 0.3224, 0.3021, 0.3373]}, {"w": "deep", "b": [0.3082, 0.3224, 0.3453, 0.3373]}, {"w": "understanding", "b": [0.3514, 0.3224, 0.4668, 0.3373]}, {"w": "of", "b": [0.4729, 0.3224, 0.4878, 0.3373]}, {"w": "various", "b": [0.494, 0.3224, 0.5512, 0.3373]}, {"w": "computing", "b": [0.5574, 0.3224, 0.6427, 0.3373]}, {"w": "frameworks", "b": [0.6489, 0.3224, 0.7411, 0.3373]}, {"w": "and", "b": [0.7473, 0.3224, 0.7771, 0.3373]}, {"w": "be", "b": [0.7833, 0.3224, 0.8023, 0.3373]}, {"w": "capable", "b": [0.8084, 0.3224, 0.8691, 0.3373]}, {"w": "of", "b": [0.1312, 0.3403, 0.1461, 0.3553]}, {"w": "writing", "b": [0.1522, 0.3403, 0.2097, 0.3553]}, {"w": "efficient", "b": [0.2159, 0.3403, 0.2779, 0.3553]}, {"w": "and", "b": [0.2841, 0.3403, 0.3138, 0.3553]}, {"w": "maintainable", "b": [0.32, 0.3403, 0.424, 0.3553]}, {"w": "code.", "b": [0.4302, 0.3403, 0.4717, 0.3553]}]}, {"id": "b_4", "type": "paragraph", "text": "The proponents of the latter say that scientists are hard to integrate with software engi- neering teams. Scientists care more about how accurate their solution is and often come up with solutions that are impractical and cannot be effectively executed in the production environment. Also, because scientists don’t usually write efficient, well-structured code, the latter has to be rewritten into production code by a software engineer; depending on the project, that can turn out to be a daunting task.", "words": [{"w": "The", "b": [0.1306, 0.3671, 0.163, 0.3822]}, {"w": "proponents", "b": [0.1702, 0.3671, 0.2613, 0.3822]}, {"w": "of", "b": [0.2685, 0.3671, 0.2837, 0.3822]}, {"w": "the", "b": [0.2909, 0.3671, 0.317, 0.3822]}, {"w": "latter", "b": [0.3242, 0.3671, 0.3692, 0.3822]}, {"w": "say", "b": [0.3764, 0.3671, 0.4027, 0.3822]}, {"w": "that", "b": [0.4098, 0.3671, 0.4443, 0.3822]}, {"w": "scientists", "b": [0.4515, 0.3671, 0.5256, 0.3822]}, {"w": "are", "b": [0.5328, 0.3671, 0.5579, 0.3822]}, {"w": "hard", "b": [0.5651, 0.3671, 0.6028, 0.3822]}, {"w": "to", "b": [0.61, 0.3671, 0.6267, 0.3822]}, {"w": "integrate", "b": [0.6339, 0.3671, 0.7067, 0.3822]}, {"w": "with", "b": [0.7139, 0.3671, 0.7505, 0.3822]}, {"w": "software", "b": [0.7576, 0.3671, 0.8253, 0.3822]}, {"w": "engi-", "b": [0.8325, 0.3671, 0.8722, 0.3822]}, {"w": "neering", "b": [0.1312, 0.3851, 0.1909, 0.4002]}, {"w": "teams.", "b": [0.1978, 0.3851, 0.2513, 0.4002]}, {"w": "Scientists", "b": [0.2619, 0.3851, 0.339, 0.4002]}, {"w": "care", "b": [0.3459, 0.3851, 0.3794, 0.4002]}, {"w": "more", "b": [0.3864, 0.3851, 0.4272, 0.4002]}, {"w": "about", "b": [0.4342, 0.3851, 0.4817, 0.4002]}, {"w": "how", "b": [0.4887, 0.3851, 0.5216, 0.4002]}, {"w": "accurate", "b": [0.5285, 0.3851, 0.5976, 0.4002]}, {"w": "their", "b": [0.6046, 0.3851, 0.6433, 0.4002]}, {"w": "solution", "b": [0.6503, 0.3851, 0.7152, 0.4002]}, {"w": "is", "b": [0.7222, 0.3851, 0.7348, 0.4002]}, {"w": "and", "b": [0.7418, 0.3851, 0.7721, 0.4002]}, {"w": "often", "b": [0.779, 0.3851, 0.8204, 0.4002]}, {"w": "come", "b": [0.8273, 0.3851, 0.8691, 0.4002]}, {"w": "up", "b": [0.1312, 0.4031, 0.1517, 0.4181]}, {"w": "with", "b": [0.1579, 0.4031, 0.1938, 0.4181]}, {"w": "solutions", "b": [0.1999, 0.4031, 0.2709, 0.4181]}, {"w": "that", "b": [0.277, 0.4031, 0.3108, 0.4181]}, {"w": "are", "b": [0.3169, 0.4031, 0.3416, 0.4181]}, {"w": "impractical", "b": [0.3477, 0.4031, 0.438, 0.4181]}, {"w": "and", "b": [0.4442, 0.4031, 0.4739, 0.4181]}, {"w": "cannot", "b": [0.48, 0.4031, 0.5344, 0.4181]}, {"w": "be", "b": [0.5405, 0.4031, 0.5595, 0.4181]}, {"w": "effectively", "b": [0.5656, 0.4031, 0.6456, 0.4181]}, {"w": "executed", "b": [0.6517, 0.4031, 0.722, 0.4181]}, {"w": "in", "b": [0.7281, 0.4031, 0.7435, 0.4181]}, {"w": "the", "b": [0.7496, 0.4031, 0.7753, 0.4181]}, {"w": "production", "b": [0.7814, 0.4031, 0.8691, 0.4181]}, {"w": "environment.", "b": [0.1312, 0.4211, 0.2362, 0.436]}, {"w": "Also,", "b": [0.2444, 0.4211, 0.2849, 0.436]}, {"w": "because", "b": [0.2911, 0.4211, 0.3531, 0.436]}, {"w": "scientists", "b": [0.3593, 0.4211, 0.4317, 0.436]}, {"w": "don’t", "b": [0.4379, 0.4211, 0.4798, 0.436]}, {"w": "usually", "b": [0.486, 0.4211, 0.5429, 0.436]}, {"w": "write", "b": [0.549, 0.4211, 0.59, 0.436]}, {"w": "efficient,", "b": [0.5962, 0.4211, 0.6632, 0.436]}, {"w": "well-structured", "b": [0.6694, 0.4211, 0.7898, 0.436]}, {"w": "code,", "b": [0.796, 0.4211, 0.8374, 0.436]}, {"w": "the", "b": [0.8436, 0.4211, 0.8692, 0.436]}, {"w": "latter", "b": [0.1312, 0.4389, 0.1763, 0.454]}, {"w": "has", "b": [0.183, 0.4389, 0.2103, 0.454]}, {"w": "to", "b": [0.2171, 0.4389, 0.2338, 0.454]}, {"w": "be", "b": [0.2406, 0.4389, 0.26, 0.454]}, {"w": "rewritten", "b": [0.2667, 0.4389, 0.3421, 0.454]}, {"w": "into", "b": [0.3489, 0.4389, 0.3808, 0.454]}, {"w": "production", "b": [0.3876, 0.4389, 0.4771, 0.454]}, {"w": "code", "b": [0.4838, 0.4389, 0.521, 0.454]}, {"w": "by", "b": [0.5278, 0.4389, 0.5476, 0.454]}, {"w": "a", "b": [0.5544, 0.4389, 0.5638, 0.454]}, {"w": "software", "b": [0.5706, 0.4389, 0.6382, 0.454]}, {"w": "engineer;", "b": [0.645, 0.4389, 0.7183, 0.454]}, {"w": "depending", "b": [0.7254, 0.4389, 0.8096, 0.454]}, {"w": "on", "b": [0.8163, 0.4389, 0.8362, 0.454]}, {"w": "the", "b": [0.843, 0.4389, 0.8691, 0.454]}, {"w": "project,", "b": [0.1312, 0.457, 0.1928, 0.4719]}, {"w": "that", "b": [0.199, 0.457, 0.2328, 0.4719]}, {"w": "can", "b": [0.239, 0.457, 0.2667, 0.4719]}, {"w": "turn", "b": [0.2728, 0.457, 0.3077, 0.4719]}, {"w": "out", "b": [0.3139, 0.457, 0.3405, 0.4719]}, {"w": "to", "b": [0.3467, 0.457, 0.3631, 0.4719]}, {"w": "be", "b": [0.3692, 0.457, 0.3882, 0.4719]}, {"w": "a", "b": [0.3944, 0.457, 0.4036, 0.4719]}, {"w": "daunting", "b": [0.4097, 0.457, 0.481, 0.4719]}, {"w": "task.", "b": [0.4872, 0.457, 0.5257, 0.4719]}]}, {"id": "b_5", "type": "paragraph", "text": "2.4.2 Members of a Machine Learning Team", "words": [{"w": "2.4.2", "b": [0.1312, 0.5048, 0.1749, 0.5198]}, {"w": "Members", "b": [0.1961, 0.5048, 0.2823, 0.5198]}, {"w": "of", "b": [0.2893, 0.5048, 0.3064, 0.5198]}, {"w": "a", "b": [0.3135, 0.5048, 0.3238, 0.5198]}, {"w": "Machine", "b": [0.3309, 0.5048, 0.4094, 0.5198]}, {"w": "Learning", "b": [0.4164, 0.5048, 0.4981, 0.5198]}, {"w": "Team", "b": [0.5052, 0.5048, 0.5559, 0.5198]}]}, {"id": "b_6", "type": "paragraph", "text": "Besides machine learning and software engineering skills, a machine learning team may include experts in data engineering (also known as data engineers) and experts in data labeling.", "words": [{"w": "Besides", "b": [0.1312, 0.5415, 0.1895, 0.5563]}, {"w": "machine", "b": [0.1943, 0.5415, 0.2591, 0.5563]}, {"w": "learning", "b": [0.2639, 0.5415, 0.3273, 0.5563]}, {"w": "and", "b": [0.3321, 0.5415, 0.3613, 0.5563]}, {"w": "software", "b": [0.3661, 0.5415, 0.431, 0.5563]}, {"w": "engineering", "b": [0.4358, 0.5415, 0.5254, 0.5563]}, {"w": "skills,", "b": [0.5302, 0.5415, 0.5741, 0.5563]}, {"w": "a", "b": [0.5792, 0.5415, 0.5882, 0.5563]}, {"w": "machine", "b": [0.5931, 0.5415, 0.6579, 0.5563]}, {"w": "learning", "b": [0.6627, 0.5415, 0.7261, 0.5563]}, {"w": "team", "b": [0.7309, 0.5415, 0.7701, 0.5563]}, {"w": "may", "b": [0.7749, 0.5415, 0.808, 0.5563]}, {"w": "include", "b": [0.8128, 0.5415, 0.8691, 0.5563]}, {"w": "experts", "b": [0.1312, 0.5594, 0.1899, 0.5743]}, {"w": "in", "b": [0.196, 0.5594, 0.2114, 0.5743]}, {"w": "data", "b": [0.2175, 0.5594, 0.2534, 0.5743]}, {"w": "engineering", "b": [0.2596, 0.5594, 0.3509, 0.5743]}, {"w": "(also", "b": [0.3571, 0.5594, 0.3951, 0.5743]}, {"w": "known", "b": [0.4013, 0.5594, 0.4535, 0.5743]}, {"w": "as", "b": [0.4597, 0.5594, 0.4762, 0.5743]}, {"w": "data", "b": [0.4823, 0.5594, 0.5182, 0.5743]}, {"w": "engineers)", "b": [0.5244, 0.5594, 0.6056, 0.5743]}, {"w": "and", "b": [0.6117, 0.5594, 0.6415, 0.5743]}, {"w": "experts", "b": [0.6476, 0.5594, 0.7062, 0.5743]}, {"w": "in", "b": [0.7124, 0.5594, 0.7278, 0.5743]}, {"w": "data", "b": [0.7339, 0.5594, 0.7698, 0.5743]}, {"w": "labeling.", "b": [0.7759, 0.5594, 0.8441, 0.5743]}]}, {"id": "b_7", "type": "paragraph", "text": "Data engineers are software engineers responsible for ETL (for Extract, Transform, Load). These three conceptual steps are part of a typical data pipeline. Data engineers use ETL techniques and create an automated pipeline, in which raw data is transformed into analysis- ready data. Data engineers design how to structure the data and how to integrate it from various resources. They write on-demand queries on that data, or wrap the most frequent queries into fast application programming interfaces (APIs) to make sure that the data is easily accessible by analysts and other data consumers. Typically, data engineers are not expected to know any machine learning.", "words": [{"w": "Data", "b": [0.1312, 0.5862, 0.1716, 0.6013]}, {"w": "engineers", "b": [0.1777, 0.5862, 0.2528, 0.6013]}, {"w": "are", "b": [0.259, 0.5862, 0.284, 0.6013]}, {"w": "software", "b": [0.2901, 0.5862, 0.3575, 0.6013]}, {"w": "engineers", "b": [0.3636, 0.5862, 0.4387, 0.6013]}, {"w": "responsible", "b": [0.4449, 0.5862, 0.5352, 0.6013]}, {"w": "for", "b": [0.5413, 0.5862, 0.5638, 0.6013]}, {"w": "ETL", "b": [0.5699, 0.5862, 0.6079, 0.6013]}, {"w": "(for", "b": [0.614, 0.5862, 0.6437, 0.6013]}, {"w": "Extract,", "b": [0.6499, 0.5862, 0.7173, 0.6013]}, {"w": "Transform,", "b": [0.7235, 0.5862, 0.8132, 0.6013]}, {"w": "Load).", "b": [0.8194, 0.5862, 0.8727, 0.6013]}, {"w": "These", "b": [0.1306, 0.6041, 0.1788, 0.6192]}, {"w": "three", "b": [0.1853, 0.6041, 0.2272, 0.6192]}, {"w": "conceptual", "b": [0.2337, 0.6041, 0.3216, 0.6192]}, {"w": "steps", "b": [0.3281, 0.6041, 0.3691, 0.6192]}, {"w": "are", "b": [0.3756, 0.6041, 0.4008, 0.6192]}, {"w": "part", "b": [0.4073, 0.6041, 0.4418, 0.6192]}, {"w": "of", "b": [0.4483, 0.6041, 0.4635, 0.6192]}, {"w": "a", "b": [0.47, 0.6041, 0.4794, 0.6192]}, {"w": "typical", "b": [0.4859, 0.6041, 0.5414, 0.6192]}, {"w": "data", "b": [0.5479, 0.6041, 0.5845, 0.6192]}, {"w": "pipeline.", "b": [0.591, 0.6041, 0.6605, 0.6192]}, {"w": "Data", "b": [0.6698, 0.6041, 0.7103, 0.6192]}, {"w": "engineers", "b": [0.7168, 0.6041, 0.7923, 0.6192]}, {"w": "use", "b": [0.7988, 0.6041, 0.8251, 0.6192]}, {"w": "ETL", "b": [0.8316, 0.6041, 0.8697, 0.6192]}, {"w": "techniques", "b": [0.1312, 0.6223, 0.2139, 0.6371]}, {"w": "and", "b": [0.2201, 0.6223, 0.2493, 0.6371]}, {"w": "create", "b": [0.2554, 0.6223, 0.3028, 0.6371]}, {"w": "an", "b": [0.3089, 0.6223, 0.328, 0.6371]}, {"w": "automated", "b": [0.3342, 0.6223, 0.4187, 0.6371]}, {"w": "pipeline,", "b": [0.4249, 0.6223, 0.4919, 0.6371]}, {"w": "in", "b": [0.498, 0.6223, 0.5131, 0.6371]}, {"w": "which", "b": [0.5192, 0.6223, 0.565, 0.6371]}, {"w": "raw", "b": [0.5712, 0.6223, 0.5999, 0.6371]}, {"w": "data", "b": [0.606, 0.6223, 0.6412, 0.6371]}, {"w": "is", "b": [0.6474, 0.6223, 0.6596, 0.6371]}, {"w": "transformed", "b": [0.6657, 0.6223, 0.7611, 0.6371]}, {"w": "into", "b": [0.7672, 0.6223, 0.7979, 0.6371]}, {"w": "analysis-", "b": [0.804, 0.6223, 0.8722, 0.6371]}, {"w": "ready", "b": [0.1312, 0.64, 0.1767, 0.6551]}, {"w": "data.", "b": [0.1828, 0.64, 0.2245, 0.6551]}, {"w": "Data", "b": [0.2328, 0.64, 0.2732, 0.6551]}, {"w": "engineers", "b": [0.2793, 0.64, 0.3546, 0.6551]}, {"w": "design", "b": [0.3608, 0.64, 0.412, 0.6551]}, {"w": "how", "b": [0.4181, 0.64, 0.451, 0.6551]}, {"w": "to", "b": [0.4571, 0.64, 0.4738, 0.6551]}, {"w": "structure", "b": [0.48, 0.64, 0.5543, 0.6551]}, {"w": "the", "b": [0.5604, 0.64, 0.5865, 0.6551]}, {"w": "data", "b": [0.5927, 0.64, 0.6292, 0.6551]}, {"w": "and", "b": [0.6353, 0.64, 0.6656, 0.6551]}, {"w": "how", "b": [0.6717, 0.64, 0.7046, 0.6551]}, {"w": "to", "b": [0.7107, 0.64, 0.7274, 0.6551]}, {"w": "integrate", "b": [0.7336, 0.64, 0.8061, 0.6551]}, {"w": "it", "b": [0.8123, 0.64, 0.8248, 0.6551]}, {"w": "from", "b": [0.831, 0.64, 0.8691, 0.6551]}, {"w": "various", "b": [0.1308, 0.658, 0.1889, 0.6731]}, {"w": "resources.", "b": [0.195, 0.658, 0.2747, 0.6731]}, {"w": "They", "b": [0.283, 0.658, 0.3253, 0.6731]}, {"w": "write", "b": [0.3314, 0.658, 0.3732, 0.6731]}, {"w": "on-demand", "b": [0.3794, 0.658, 0.4702, 0.6731]}, {"w": "queries", "b": [0.4764, 0.658, 0.5334, 0.6731]}, {"w": "on", "b": [0.5396, 0.658, 0.5594, 0.6731]}, {"w": "that", "b": [0.5656, 0.658, 0.6, 0.6731]}, {"w": "data,", "b": [0.6062, 0.658, 0.648, 0.6731]}, {"w": "or", "b": [0.6541, 0.658, 0.6709, 0.6731]}, {"w": "wrap", "b": [0.6771, 0.658, 0.7178, 0.6731]}, {"w": "the", "b": [0.724, 0.658, 0.7501, 0.6731]}, {"w": "most", "b": [0.7562, 0.658, 0.796, 0.6731]}, {"w": "frequent", "b": [0.8022, 0.658, 0.8696, 0.6731]}, {"w": "queries", "b": [0.1312, 0.6759, 0.1884, 0.691]}, {"w": "into", "b": [0.1947, 0.6759, 0.2266, 0.691]}, {"w": "fast", "b": [0.2329, 0.6759, 0.2628, 0.691]}, {"w": "application", "b": [0.269, 0.6759, 0.36, 0.691]}, {"w": "programming", "b": [0.3663, 0.6759, 0.4762, 0.691]}, {"w": "interfaces", "b": [0.4824, 0.6759, 0.56, 0.691]}, {"w": "(APIs)", "b": [0.5663, 0.6759, 0.6221, 0.691]}, {"w": "to", "b": [0.6284, 0.6759, 0.6451, 0.691]}, {"w": "make", "b": [0.6513, 0.6759, 0.6942, 0.691]}, {"w": "sure", "b": [0.7005, 0.6759, 0.7341, 0.691]}, {"w": "that", "b": [0.7404, 0.6759, 0.7749, 0.691]}, {"w": "the", "b": [0.7811, 0.6759, 0.8073, 0.691]}, {"w": "data", "b": [0.8136, 0.6759, 0.8502, 0.691]}, {"w": "is", "b": [0.8564, 0.6759, 0.8691, 0.691]}, {"w": "easily", "b": [0.1312, 0.6938, 0.1768, 0.709]}, {"w": "accessible", "b": [0.1835, 0.6938, 0.2622, 0.709]}, {"w": "by", "b": [0.2688, 0.6938, 0.2886, 0.709]}, {"w": "analysts", "b": [0.2953, 0.6938, 0.3619, 0.709]}, {"w": "and", "b": [0.3685, 0.6938, 0.3988, 0.709]}, {"w": "other", "b": [0.4055, 0.6938, 0.4484, 0.709]}, {"w": "data", "b": [0.455, 0.6938, 0.4916, 0.709]}, {"w": "consumers.", "b": [0.4982, 0.6938, 0.5885, 0.709]}, {"w": "Typically,", "b": [0.5981, 0.6938, 0.6786, 0.709]}, {"w": "data", "b": [0.6854, 0.6938, 0.722, 0.709]}, {"w": "engineers", "b": [0.7286, 0.6938, 0.8041, 0.709]}, {"w": "are", "b": [0.8107, 0.6938, 0.8358, 0.709]}, {"w": "not", "b": [0.8425, 0.6938, 0.8696, 0.709]}, {"w": "expected", "b": [0.1312, 0.7119, 0.202, 0.7269]}, {"w": "to", "b": [0.2082, 0.7119, 0.2246, 0.7269]}, {"w": "know", "b": [0.2307, 0.7119, 0.2727, 0.7269]}, {"w": "any", "b": [0.2789, 0.7119, 0.3076, 0.7269]}, {"w": "machine", "b": [0.3138, 0.7119, 0.3799, 0.7269]}, {"w": "learning.", "b": [0.3861, 0.7119, 0.4558, 0.7269]}]}, {"id": "b_8", "type": "paragraph", "text": "In most big companies, data engineers work separately from machine learning engineers in a data engineering team.", "words": [{"w": "In", "b": [0.1312, 0.7389, 0.1479, 0.7538]}, {"w": "most", "b": [0.1541, 0.7389, 0.1927, 0.7538]}, {"w": "big", "b": [0.1988, 0.7389, 0.2231, 0.7538]}, {"w": "companies,", "b": [0.2293, 0.7389, 0.3164, 0.7538]}, {"w": "data", "b": [0.3226, 0.7389, 0.358, 0.7538]}, {"w": "engineers", "b": [0.3642, 0.7389, 0.4372, 0.7538]}, {"w": "work", "b": [0.4434, 0.7389, 0.4819, 0.7538]}, {"w": "separately", "b": [0.488, 0.7389, 0.5687, 0.7538]}, {"w": "from", "b": [0.5749, 0.7389, 0.6118, 0.7538]}, {"w": "machine", "b": [0.618, 0.7389, 0.6833, 0.7538]}, {"w": "learning", "b": [0.6894, 0.7389, 0.7532, 0.7538]}, {"w": "engineers", "b": [0.7594, 0.7389, 0.8325, 0.7538]}, {"w": "in", "b": [0.8387, 0.7389, 0.8538, 0.7538]}, {"w": "a", "b": [0.86, 0.7389, 0.8691, 0.7538]}, {"w": "data", "b": [0.1312, 0.7568, 0.1671, 0.7717]}, {"w": "engineering", "b": [0.1733, 0.7568, 0.2646, 0.7717]}, {"w": "team.", "b": [0.2707, 0.7568, 0.3159, 0.7717]}]}, {"id": "b_9", "type": "paragraph", "text": "Experts in data labeling are responsible for four activities:", "words": [{"w": "Experts", "b": [0.1312, 0.7837, 0.1942, 0.7987]}, {"w": "in", "b": [0.2004, 0.7837, 0.2157, 0.7987]}, {"w": "data", "b": [0.2219, 0.7837, 0.2578, 0.7987]}, {"w": "labeling", "b": [0.2639, 0.7837, 0.327, 0.7987]}, {"w": "are", "b": [0.3331, 0.7837, 0.3578, 0.7987]}, {"w": "responsible", "b": [0.364, 0.7837, 0.453, 0.7987]}, {"w": "for", "b": [0.4591, 0.7837, 0.4812, 0.7987]}, {"w": "four", "b": [0.4874, 0.7837, 0.5197, 0.7987]}, {"w": "activities:", "b": [0.5259, 0.7837, 0.6034, 0.7987]}]}, {"id": "b_10", "type": "paragraph", "text": "• manually or semi-automatically assign labels to unlabeled examples according to the specification provided by data analysts, • build labeling tools,", "words": [{"w": "•", "b": [0.1538, 0.8106, 0.1681, 0.8256]}, {"w": "manually", "b": [0.1774, 0.8106, 0.252, 0.8256]}, {"w": "or", "b": [0.2582, 0.8106, 0.2748, 0.8256]}, {"w": "semi-automatically", "b": [0.281, 0.8106, 0.435, 0.8256]}, {"w": "assign", "b": [0.4412, 0.8106, 0.4901, 0.8256]}, {"w": "labels", "b": [0.4963, 0.8106, 0.5426, 0.8256]}, {"w": "to", "b": [0.5487, 0.8106, 0.5653, 0.8256]}, {"w": "unlabeled", "b": [0.5715, 0.8106, 0.6498, 0.8256]}, {"w": "examples", "b": [0.656, 0.8106, 0.7302, 0.8256]}, {"w": "according", "b": [0.7364, 0.8106, 0.8142, 0.8256]}, {"w": "to", "b": [0.8204, 0.8106, 0.837, 0.8256]}, {"w": "the", "b": [0.8431, 0.8106, 0.8691, 0.8256]}, {"w": "specification", "b": [0.1774, 0.8286, 0.2764, 0.8435]}, {"w": "provided", "b": [0.2826, 0.8286, 0.3524, 0.8435]}, {"w": "by", "b": [0.3585, 0.8286, 0.378, 0.8435]}, {"w": "data", "b": [0.3842, 0.8286, 0.42, 0.8435]}, {"w": "analysts,", "b": [0.4262, 0.8286, 0.4967, 0.8435]}, {"w": "•", "b": [0.1538, 0.8465, 0.1681, 0.8615]}, {"w": "build", "b": [0.1774, 0.8465, 0.2184, 0.8615]}, {"w": "labeling", "b": [0.2245, 0.8465, 0.2876, 0.8615]}, {"w": "tools,", "b": [0.2938, 0.8465, 0.3374, 0.8615]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "9", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 39, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• manage outsourced labelers, and • validate labeled examples for quality.", "words": [{"w": "•", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "manage", "b": [0.1774, 0.0884, 0.2389, 0.1033]}, {"w": "outsourced", "b": [0.245, 0.0884, 0.3323, 0.1033]}, {"w": "labelers,", "b": [0.3385, 0.0884, 0.4048, 0.1033]}, {"w": "and", "b": [0.411, 0.0884, 0.4407, 0.1033]}, {"w": "•", "b": [0.1538, 0.1063, 0.1681, 0.1213]}, {"w": "validate", "b": [0.1774, 0.1063, 0.2404, 0.1213]}, {"w": "labeled", "b": [0.2466, 0.1063, 0.3035, 0.1213]}, {"w": "examples", "b": [0.3097, 0.1063, 0.3831, 0.1213]}, {"w": "for", "b": [0.3892, 0.1063, 0.4113, 0.1213]}, {"w": "quality.", "b": [0.4175, 0.1063, 0.477, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "A labeler is person responsible for assigning labels to unlabeled examples. Again, in big companies, data labeling experts may be organized in two or three different teams: one or two teams of labelers (for example, one local and one outsourced) and a team of software engineers, plus a user experience (UX) specialist, responsible for building labeling tools.", "words": [{"w": "A", "b": [0.1305, 0.1331, 0.1446, 0.1482]}, {"w": "labeler", "b": [0.1513, 0.1332, 0.214, 0.1482]}, {"w": "is", "b": [0.2207, 0.1331, 0.2333, 0.1482]}, {"w": "person", "b": [0.24, 0.1331, 0.2941, 0.1482]}, {"w": "responsible", "b": [0.3008, 0.1331, 0.3915, 0.1482]}, {"w": "for", "b": [0.3982, 0.1331, 0.4207, 0.1482]}, {"w": "assigning", "b": [0.4274, 0.1331, 0.5019, 0.1482]}, {"w": "labels", "b": [0.5086, 0.1331, 0.5553, 0.1482]}, {"w": "to", "b": [0.5619, 0.1331, 0.5787, 0.1482]}, {"w": "unlabeled", "b": [0.5853, 0.1331, 0.6643, 0.1482]}, {"w": "examples.", "b": [0.671, 0.1331, 0.7511, 0.1482]}, {"w": "Again,", "b": [0.761, 0.1331, 0.8148, 0.1482]}, {"w": "in", "b": [0.8216, 0.1331, 0.8373, 0.1482]}, {"w": "big", "b": [0.844, 0.1331, 0.8691, 0.1482]}, {"w": "companies,", "b": [0.1312, 0.1511, 0.2209, 0.1662]}, {"w": "data", "b": [0.227, 0.1511, 0.2634, 0.1662]}, {"w": "labeling", "b": [0.2696, 0.1511, 0.3336, 0.1662]}, {"w": "experts", "b": [0.3397, 0.1511, 0.3992, 0.1662]}, {"w": "may", "b": [0.4054, 0.1511, 0.4397, 0.1662]}, {"w": "be", "b": [0.4458, 0.1511, 0.4651, 0.1662]}, {"w": "organized", "b": [0.4712, 0.1511, 0.5494, 0.1662]}, {"w": "in", "b": [0.5555, 0.1511, 0.5711, 0.1662]}, {"w": "two", "b": [0.5773, 0.1511, 0.6064, 0.1662]}, {"w": "or", "b": [0.6126, 0.1511, 0.6293, 0.1662]}, {"w": "three", "b": [0.6354, 0.1511, 0.6771, 0.1662]}, {"w": "different", "b": [0.6833, 0.1511, 0.751, 0.1662]}, {"w": "teams:", "b": [0.7571, 0.1511, 0.8103, 0.1662]}, {"w": "one", "b": [0.8185, 0.1511, 0.8466, 0.1662]}, {"w": "or", "b": [0.8528, 0.1511, 0.8695, 0.1662]}, {"w": "two", "b": [0.1312, 0.169, 0.1605, 0.1841]}, {"w": "teams", "b": [0.1669, 0.169, 0.2151, 0.1841]}, {"w": "of", "b": [0.2215, 0.169, 0.2366, 0.1841]}, {"w": "labelers", "b": [0.243, 0.169, 0.3054, 0.1841]}, {"w": "(for", "b": [0.3118, 0.169, 0.3416, 0.1841]}, {"w": "example,", "b": [0.348, 0.169, 0.4207, 0.1841]}, {"w": "one", "b": [0.4271, 0.169, 0.4553, 0.1841]}, {"w": "local", "b": [0.4617, 0.169, 0.4999, 0.1841]}, {"w": "and", "b": [0.5062, 0.169, 0.5366, 0.1841]}, {"w": "one", "b": [0.5429, 0.169, 0.5712, 0.1841]}, {"w": "outsourced)", "b": [0.5775, 0.169, 0.6739, 0.1841]}, {"w": "and", "b": [0.6803, 0.169, 0.7106, 0.1841]}, {"w": "a", "b": [0.717, 0.169, 0.7264, 0.1841]}, {"w": "team", "b": [0.7328, 0.169, 0.7735, 0.1841]}, {"w": "of", "b": [0.7799, 0.169, 0.7951, 0.1841]}, {"w": "software", "b": [0.8014, 0.169, 0.8691, 0.1841]}, {"w": "engineers,", "b": [0.1312, 0.1871, 0.2104, 0.2021]}, {"w": "plus", "b": [0.2165, 0.1871, 0.2495, 0.2021]}, {"w": "a", "b": [0.2556, 0.1871, 0.2648, 0.2021]}, {"w": "user", "b": [0.271, 0.1871, 0.304, 0.2021]}, {"w": "experience", "b": [0.3101, 0.1871, 0.3943, 0.2021]}, {"w": "(UX)", "b": [0.4004, 0.1871, 0.4425, 0.2021]}, {"w": "specialist,", "b": [0.4486, 0.1871, 0.5273, 0.2021]}, {"w": "responsible", "b": [0.5334, 0.1871, 0.6224, 0.2021]}, {"w": "for", "b": [0.6286, 0.1871, 0.6507, 0.2021]}, {"w": "building", "b": [0.6568, 0.1871, 0.7225, 0.2021]}, {"w": "labeling", "b": [0.7286, 0.1871, 0.7917, 0.2021]}, {"w": "tools.", "b": [0.7978, 0.1871, 0.8415, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "When possible, invite domain experts to work closely with scientists and engineers. Employ", "words": [{"w": "When", "b": [0.1303, 0.2141, 0.1777, 0.229]}, {"w": "possible,", "b": [0.1839, 0.2141, 0.252, 0.229]}, {"w": "invite", "b": [0.2581, 0.2141, 0.3031, 0.229]}, {"w": "domain", "b": [0.3092, 0.2141, 0.3684, 0.229]}, {"w": "experts", "b": [0.3746, 0.2141, 0.4329, 0.229]}, {"w": "to", "b": [0.439, 0.2141, 0.4554, 0.229]}, {"w": "work", "b": [0.4615, 0.2141, 0.5003, 0.229]}, {"w": "closely", "b": [0.5065, 0.2141, 0.5592, 0.229]}, {"w": "with", "b": [0.5653, 0.2141, 0.601, 0.229]}, {"w": "scientists", "b": [0.6072, 0.2141, 0.6795, 0.229]}, {"w": "and", "b": [0.6856, 0.2141, 0.7152, 0.229]}, {"w": "engineers.", "b": [0.7214, 0.2141, 0.8001, 0.229]}, {"w": "Employ", "b": [0.8084, 0.2141, 0.8698, 0.229]}]}, {"id": "b_3", "type": "paragraph", "text": "domain experts in your decision making about the inputs, outputs, and features of your model. Ask them what they think your model should predict. Just the fact that the data you can get access to can allow you to predict some quantity doesn’t mean the model will be useful for the business.", "words": [{"w": "domain", "b": [0.1312, 0.2319, 0.1919, 0.247]}, {"w": "experts", "b": [0.1992, 0.2319, 0.259, 0.247]}, {"w": "in", "b": [0.2662, 0.2319, 0.2819, 0.247]}, {"w": "your", "b": [0.2892, 0.2319, 0.3259, 0.247]}, {"w": "decision", "b": [0.3332, 0.2319, 0.3982, 0.247]}, {"w": "making", "b": [0.4054, 0.2319, 0.4655, 0.247]}, {"w": "about", "b": [0.4728, 0.2319, 0.5204, 0.247]}, {"w": "the", "b": [0.5277, 0.2319, 0.5539, 0.247]}, {"w": "inputs,", "b": [0.5611, 0.2319, 0.6177, 0.247]}, {"w": "outputs,", "b": [0.6253, 0.2319, 0.6934, 0.247]}, {"w": "and", "b": [0.701, 0.2319, 0.7313, 0.247]}, {"w": "features", "b": [0.7386, 0.2319, 0.8031, 0.247]}, {"w": "of", "b": [0.8104, 0.2319, 0.8255, 0.247]}, {"w": "your", "b": [0.8328, 0.2319, 0.8695, 0.247]}, {"w": "model.", "b": [0.1312, 0.2498, 0.1861, 0.2649]}, {"w": "Ask", "b": [0.1945, 0.2498, 0.226, 0.2649]}, {"w": "them", "b": [0.2322, 0.2498, 0.274, 0.2649]}, {"w": "what", "b": [0.2803, 0.2498, 0.321, 0.2649]}, {"w": "they", "b": [0.3272, 0.2498, 0.3633, 0.2649]}, {"w": "think", "b": [0.3696, 0.2498, 0.413, 0.2649]}, {"w": "your", "b": [0.4192, 0.2498, 0.4558, 0.2649]}, {"w": "model", "b": [0.4621, 0.2498, 0.5117, 0.2649]}, {"w": "should", "b": [0.5179, 0.2498, 0.5714, 0.2649]}, {"w": "predict.", "b": [0.5776, 0.2498, 0.6405, 0.2649]}, {"w": "Just", "b": [0.6488, 0.2498, 0.6837, 0.2649]}, {"w": "the", "b": [0.6899, 0.2498, 0.7161, 0.2649]}, {"w": "fact", "b": [0.7223, 0.2498, 0.7532, 0.2649]}, {"w": "that", "b": [0.7594, 0.2498, 0.7939, 0.2649]}, {"w": "the", "b": [0.8001, 0.2498, 0.8263, 0.2649]}, {"w": "data", "b": [0.8325, 0.2498, 0.8691, 0.2649]}, {"w": "you", "b": [0.1308, 0.268, 0.1589, 0.2828]}, {"w": "can", "b": [0.165, 0.268, 0.1921, 0.2828]}, {"w": "get", "b": [0.1982, 0.268, 0.2223, 0.2828]}, {"w": "access", "b": [0.2284, 0.268, 0.2759, 0.2828]}, {"w": "to", "b": [0.282, 0.268, 0.2981, 0.2828]}, {"w": "can", "b": [0.3042, 0.268, 0.3313, 0.2828]}, {"w": "allow", "b": [0.3374, 0.268, 0.3781, 0.2828]}, {"w": "you", "b": [0.3842, 0.268, 0.4123, 0.2828]}, {"w": "to", "b": [0.4184, 0.268, 0.4345, 0.2828]}, {"w": "predict", "b": [0.4406, 0.268, 0.4959, 0.2828]}, {"w": "some", "b": [0.5021, 0.268, 0.5413, 0.2828]}, {"w": "quantity", "b": [0.5474, 0.268, 0.6138, 0.2828]}, {"w": "doesn’t", "b": [0.6198, 0.268, 0.6767, 0.2828]}, {"w": "mean", "b": [0.6829, 0.268, 0.7251, 0.2828]}, {"w": "the", "b": [0.7312, 0.268, 0.7563, 0.2828]}, {"w": "model", "b": [0.7624, 0.268, 0.8101, 0.2828]}, {"w": "will", "b": [0.8162, 0.268, 0.8444, 0.2828]}, {"w": "be", "b": [0.8505, 0.268, 0.8691, 0.2828]}, {"w": "useful", "b": [0.1312, 0.2858, 0.178, 0.3008]}, {"w": "for", "b": [0.1842, 0.2858, 0.2063, 0.3008]}, {"w": "the", "b": [0.2124, 0.2858, 0.2381, 0.3008]}, {"w": "business.", "b": [0.2442, 0.2858, 0.3153, 0.3008]}]}, {"id": "b_4", "type": "paragraph", "text": "Discuss with the domain experts what they look for in the data to make a specific business decision; that will help you with feature engineering. Discuss also what clients pay for and what is a deal-breaker for them; that will help you to translate a business problem into a machine learning problem.", "words": [{"w": "Discuss", "b": [0.1312, 0.3127, 0.1908, 0.3277]}, {"w": "with", "b": [0.197, 0.3127, 0.2329, 0.3277]}, {"w": "the", "b": [0.239, 0.3127, 0.2647, 0.3277]}, {"w": "domain", "b": [0.2708, 0.3127, 0.3304, 0.3277]}, {"w": "experts", "b": [0.3365, 0.3127, 0.3952, 0.3277]}, {"w": "what", "b": [0.4013, 0.3127, 0.4413, 0.3277]}, {"w": "they", "b": [0.4475, 0.3127, 0.4829, 0.3277]}, {"w": "look", "b": [0.489, 0.3127, 0.5229, 0.3277]}, {"w": "for", "b": [0.529, 0.3127, 0.5512, 0.3277]}, {"w": "in", "b": [0.5573, 0.3127, 0.5727, 0.3277]}, {"w": "the", "b": [0.5788, 0.3127, 0.6045, 0.3277]}, {"w": "data", "b": [0.6106, 0.3127, 0.6466, 0.3277]}, {"w": "to", "b": [0.6527, 0.3127, 0.6691, 0.3277]}, {"w": "make", "b": [0.6752, 0.3127, 0.7173, 0.3277]}, {"w": "a", "b": [0.7235, 0.3127, 0.7327, 0.3277]}, {"w": "specific", "b": [0.7388, 0.3127, 0.7969, 0.3277]}, {"w": "business", "b": [0.8031, 0.3127, 0.8691, 0.3277]}, {"w": "decision;", "b": [0.1312, 0.3306, 0.2007, 0.3456]}, {"w": "that", "b": [0.2068, 0.3306, 0.241, 0.3456]}, {"w": "will", "b": [0.2471, 0.3306, 0.2761, 0.3456]}, {"w": "help", "b": [0.2822, 0.3306, 0.3164, 0.3456]}, {"w": "you", "b": [0.3225, 0.3306, 0.3515, 0.3456]}, {"w": "with", "b": [0.3576, 0.3306, 0.3938, 0.3456]}, {"w": "feature", "b": [0.4, 0.3306, 0.4564, 0.3456]}, {"w": "engineering.", "b": [0.4626, 0.3306, 0.5599, 0.3456]}, {"w": "Discuss", "b": [0.5681, 0.3306, 0.6282, 0.3456]}, {"w": "also", "b": [0.6343, 0.3306, 0.6655, 0.3456]}, {"w": "what", "b": [0.6716, 0.3306, 0.712, 0.3456]}, {"w": "clients", "b": [0.7181, 0.3306, 0.7694, 0.3456]}, {"w": "pay", "b": [0.7756, 0.3306, 0.8045, 0.3456]}, {"w": "for", "b": [0.8107, 0.3306, 0.833, 0.3456]}, {"w": "and", "b": [0.8391, 0.3306, 0.8691, 0.3456]}, {"w": "what", "b": [0.1306, 0.3485, 0.1713, 0.3636]}, {"w": "is", "b": [0.1778, 0.3485, 0.1905, 0.3636]}, {"w": "a", "b": [0.197, 0.3485, 0.2064, 0.3636]}, {"w": "deal-breaker", "b": [0.2129, 0.3485, 0.3134, 0.3636]}, {"w": "for", "b": [0.3199, 0.3485, 0.3424, 0.3636]}, {"w": "them;", "b": [0.3489, 0.3485, 0.396, 0.3636]}, {"w": "that", "b": [0.4026, 0.3485, 0.4371, 0.3636]}, {"w": "will", "b": [0.4436, 0.3485, 0.4729, 0.3636]}, {"w": "help", "b": [0.4793, 0.3485, 0.5139, 0.3636]}, {"w": "you", "b": [0.5204, 0.3485, 0.5497, 0.3636]}, {"w": "to", "b": [0.5561, 0.3485, 0.5729, 0.3636]}, {"w": "translate", "b": [0.5793, 0.3485, 0.6517, 0.3636]}, {"w": "a", "b": [0.6582, 0.3485, 0.6676, 0.3636]}, {"w": "business", "b": [0.674, 0.3485, 0.7413, 0.3636]}, {"w": "problem", "b": [0.7478, 0.3485, 0.8148, 0.3636]}, {"w": "into", "b": [0.8213, 0.3485, 0.8532, 0.3636]}, {"w": "a", "b": [0.8597, 0.3485, 0.8691, 0.3636]}, {"w": "machine", "b": [0.1312, 0.3666, 0.1974, 0.3815]}, {"w": "learning", "b": [0.2035, 0.3666, 0.2682, 0.3815]}, {"w": "problem.", "b": [0.2743, 0.3666, 0.3451, 0.3815]}]}, {"id": "b_5", "type": "paragraph", "text": "Finally, there are DevOps engineers. They work closely with machine learning engineers to automate model deployment, loading, monitoring, and occasional or regular model mainte- nance. In smaller companies and startups, a DevOps engineer may be part of the machine learning team, or a machine learning engineer could be responsible for the DevOps activities. In big companies, DevOps engineers employed in machine learning projects usually work in a larger DevOps team. Some companies introduced the MLOps role, whose responsibility is to deploy machine learning models in production, upgrade those models, and build data processing pipelines involving machine learning models.", "words": [{"w": "Finally,", "b": [0.1312, 0.3935, 0.1917, 0.4085]}, {"w": "there", "b": [0.1979, 0.3935, 0.2391, 0.4085]}, {"w": "are", "b": [0.2452, 0.3935, 0.27, 0.4085]}, {"w": "DevOps", "b": [0.2761, 0.3935, 0.3403, 0.4085]}, {"w": "engineers.", "b": [0.3465, 0.3935, 0.4259, 0.4085]}, {"w": "They", "b": [0.4341, 0.3935, 0.4758, 0.4085]}, {"w": "work", "b": [0.4819, 0.3935, 0.5211, 0.4085]}, {"w": "closely", "b": [0.5272, 0.3935, 0.5804, 0.4085]}, {"w": "with", "b": [0.5865, 0.3935, 0.6225, 0.4085]}, {"w": "machine", "b": [0.6287, 0.3935, 0.6951, 0.4085]}, {"w": "learning", "b": [0.7012, 0.3935, 0.7661, 0.4085]}, {"w": "engineers", "b": [0.7722, 0.3935, 0.8466, 0.4085]}, {"w": "to", "b": [0.8527, 0.3935, 0.8692, 0.4085]}, {"w": "automate", "b": [0.1312, 0.4114, 0.2078, 0.4264]}, {"w": "model", "b": [0.2139, 0.4114, 0.263, 0.4264]}, {"w": "deployment,", "b": [0.2692, 0.4114, 0.368, 0.4264]}, {"w": "loading,", "b": [0.3741, 0.4114, 0.4383, 0.4264]}, {"w": "monitoring,", "b": [0.4444, 0.4114, 0.5386, 0.4264]}, {"w": "and", "b": [0.5448, 0.4114, 0.5748, 0.4264]}, {"w": "occasional", "b": [0.5809, 0.4114, 0.6633, 0.4264]}, {"w": "or", "b": [0.6694, 0.4114, 0.686, 0.4264]}, {"w": "regular", "b": [0.6921, 0.4114, 0.7491, 0.4264]}, {"w": "model", "b": [0.7553, 0.4114, 0.8044, 0.4264]}, {"w": "mainte-", "b": [0.8105, 0.4114, 0.8721, 0.4264]}, {"w": "nance.", "b": [0.1312, 0.4293, 0.1831, 0.4444]}, {"w": "In", "b": [0.1913, 0.4293, 0.2084, 0.4444]}, {"w": "smaller", "b": [0.2145, 0.4293, 0.2727, 0.4444]}, {"w": "companies", "b": [0.2788, 0.4293, 0.3629, 0.4444]}, {"w": "and", "b": [0.369, 0.4293, 0.3991, 0.4444]}, {"w": "startups,", "b": [0.4053, 0.4293, 0.477, 0.4444]}, {"w": "a", "b": [0.4832, 0.4293, 0.4925, 0.4444]}, {"w": "DevOps", "b": [0.4986, 0.4293, 0.5633, 0.4444]}, {"w": "engineer", "b": [0.5694, 0.4293, 0.6369, 0.4444]}, {"w": "may", "b": [0.643, 0.4293, 0.6772, 0.4444]}, {"w": "be", "b": [0.6833, 0.4293, 0.7025, 0.4444]}, {"w": "part", "b": [0.7086, 0.4293, 0.7429, 0.4444]}, {"w": "of", "b": [0.749, 0.4293, 0.7641, 0.4444]}, {"w": "the", "b": [0.7702, 0.4293, 0.7961, 0.4444]}, {"w": "machine", "b": [0.8022, 0.4293, 0.8691, 0.4444]}, {"w": "learning", "b": [0.1312, 0.4474, 0.1948, 0.4623]}, {"w": "team,", "b": [0.2009, 0.4474, 0.2453, 0.4623]}, {"w": "or", "b": [0.2514, 0.4474, 0.2676, 0.4623]}, {"w": "a", "b": [0.2737, 0.4474, 0.2828, 0.4623]}, {"w": "machine", "b": [0.2889, 0.4474, 0.3539, 0.4623]}, {"w": "learning", "b": [0.3601, 0.4474, 0.4236, 0.4623]}, {"w": "engineer", "b": [0.4297, 0.4474, 0.4953, 0.4623]}, {"w": "could", "b": [0.5015, 0.4474, 0.5438, 0.4623]}, {"w": "be", "b": [0.5499, 0.4474, 0.5686, 0.4623]}, {"w": "responsible", "b": [0.5747, 0.4474, 0.6622, 0.4623]}, {"w": "for", "b": [0.6683, 0.4474, 0.6901, 0.4623]}, {"w": "the", "b": [0.6962, 0.4474, 0.7214, 0.4623]}, {"w": "DevOps", "b": [0.7275, 0.4474, 0.7904, 0.4623]}, {"w": "activities.", "b": [0.7965, 0.4474, 0.8727, 0.4623]}, {"w": "In", "b": [0.1312, 0.4653, 0.1481, 0.4802]}, {"w": "big", "b": [0.1543, 0.4653, 0.1789, 0.4802]}, {"w": "companies,", "b": [0.1851, 0.4653, 0.2733, 0.4802]}, {"w": "DevOps", "b": [0.2795, 0.4653, 0.3433, 0.4802]}, {"w": "engineers", "b": [0.3495, 0.4653, 0.4234, 0.4802]}, {"w": "employed", "b": [0.4296, 0.4653, 0.5049, 0.4802]}, {"w": "in", "b": [0.5111, 0.4653, 0.5264, 0.4802]}, {"w": "machine", "b": [0.5326, 0.4653, 0.5987, 0.4802]}, {"w": "learning", "b": [0.6049, 0.4653, 0.6694, 0.4802]}, {"w": "projects", "b": [0.6756, 0.4653, 0.7393, 0.4802]}, {"w": "usually", "b": [0.7455, 0.4653, 0.8025, 0.4802]}, {"w": "work", "b": [0.8086, 0.4653, 0.8476, 0.4802]}, {"w": "in", "b": [0.8538, 0.4653, 0.8691, 0.4802]}, {"w": "a", "b": [0.1312, 0.4831, 0.1406, 0.4982]}, {"w": "larger", "b": [0.147, 0.4831, 0.1941, 0.4982]}, {"w": "DevOps", "b": [0.2004, 0.4831, 0.2657, 0.4982]}, {"w": "team.", "b": [0.272, 0.4831, 0.318, 0.4982]}, {"w": "Some", "b": [0.3267, 0.4831, 0.3706, 0.4982]}, {"w": "companies", "b": [0.3769, 0.4831, 0.4618, 0.4982]}, {"w": "introduced", "b": [0.4681, 0.4831, 0.556, 0.4982]}, {"w": "the", "b": [0.5623, 0.4831, 0.5885, 0.4982]}, {"w": "MLOps", "b": [0.5948, 0.4831, 0.6563, 0.4982]}, {"w": "role,", "b": [0.6627, 0.4831, 0.6983, 0.4982]}, {"w": "whose", "b": [0.7046, 0.4831, 0.7539, 0.4982]}, {"w": "responsibility", "b": [0.7602, 0.4831, 0.8698, 0.4982]}, {"w": "is", "b": [0.1312, 0.5011, 0.1438, 0.5161]}, {"w": "to", "b": [0.1499, 0.5011, 0.1665, 0.5161]}, {"w": "deploy", "b": [0.1727, 0.5011, 0.2256, 0.5161]}, {"w": "machine", "b": [0.2317, 0.5011, 0.2986, 0.5161]}, {"w": "learning", "b": [0.3047, 0.5011, 0.3701, 0.5161]}, {"w": "models", "b": [0.3763, 0.5011, 0.4329, 0.5161]}, {"w": "in", "b": [0.439, 0.5011, 0.4546, 0.5161]}, {"w": "production,", "b": [0.4607, 0.5011, 0.5546, 0.5161]}, {"w": "upgrade", "b": [0.5608, 0.5011, 0.6261, 0.5161]}, {"w": "those", "b": [0.6323, 0.5011, 0.6749, 0.5161]}, {"w": "models,", "b": [0.6811, 0.5011, 0.7428, 0.5161]}, {"w": "and", "b": [0.749, 0.5011, 0.7791, 0.5161]}, {"w": "build", "b": [0.7852, 0.5011, 0.8267, 0.5161]}, {"w": "data", "b": [0.8328, 0.5011, 0.8691, 0.5161]}, {"w": "processing", "b": [0.1312, 0.5191, 0.2141, 0.5341]}, {"w": "pipelines", "b": [0.2202, 0.5191, 0.2906, 0.5341]}, {"w": "involving", "b": [0.2967, 0.5191, 0.3695, 0.5341]}, {"w": "machine", "b": [0.3757, 0.5191, 0.4418, 0.5341]}, {"w": "learning", "b": [0.448, 0.5191, 0.5126, 0.5341]}, {"w": "models.", "b": [0.5188, 0.5191, 0.5799, 0.5341]}]}, {"id": "b_6", "type": "paragraph", "text": "2.5 Why Machine Learning Projects Fail", "words": [{"w": "2.5", "b": [0.1312, 0.5676, 0.1631, 0.5856]}, {"w": "Why", "b": [0.188, 0.5676, 0.24, 0.5856]}, {"w": "Machine", "b": [0.2483, 0.5676, 0.3404, 0.5856]}, {"w": "Learning", "b": [0.3487, 0.5676, 0.4444, 0.5856]}, {"w": "Projects", "b": [0.4527, 0.5676, 0.5426, 0.5856]}, {"w": "Fail", "b": [0.5509, 0.5676, 0.5905, 0.5856]}]}, {"id": "b_7", "type": "paragraph", "text": "According to various estimates made between 2017 and 2020, from 74% to 87% of machine learning and advanced analytics projects fail or don’t reach production. The reasons for a failure range from organizational to engineering. In this section, we consider the most impactful of them.", "words": [{"w": "According", "b": [0.1305, 0.6065, 0.212, 0.6215]}, {"w": "to", "b": [0.2182, 0.6065, 0.2346, 0.6215]}, {"w": "various", "b": [0.2408, 0.6065, 0.2982, 0.6215]}, {"w": "estimates", "b": [0.3043, 0.6065, 0.3798, 0.6215]}, {"w": "made", "b": [0.3859, 0.6065, 0.4292, 0.6215]}, {"w": "between", "b": [0.4354, 0.6065, 0.5008, 0.6215]}, {"w": "2017", "b": [0.507, 0.6065, 0.5441, 0.6215]}, {"w": "and", "b": [0.5502, 0.6065, 0.5801, 0.6215]}, {"w": "2020,", "b": [0.5863, 0.6065, 0.6285, 0.6215]}, {"w": "from", "b": [0.6347, 0.6065, 0.6723, 0.6215]}, {"w": "74%", "b": [0.6783, 0.6065, 0.7123, 0.6215]}, {"w": "to", "b": [0.7184, 0.6065, 0.7349, 0.6215]}, {"w": "87%", "b": [0.7411, 0.6065, 0.7751, 0.6215]}, {"w": "of", "b": [0.7812, 0.6065, 0.7962, 0.6215]}, {"w": "machine", "b": [0.8023, 0.6065, 0.8688, 0.6215]}, {"w": "learning", "b": [0.1312, 0.6244, 0.1972, 0.6395]}, {"w": "and", "b": [0.2043, 0.6244, 0.2347, 0.6395]}, {"w": "advanced", "b": [0.2418, 0.6244, 0.3177, 0.6395]}, {"w": "analytics", "b": [0.3249, 0.6244, 0.3977, 0.6395]}, {"w": "projects", "b": [0.4048, 0.6244, 0.4698, 0.6395]}, {"w": "fail", "b": [0.477, 0.6244, 0.5026, 0.6395]}, {"w": "or", "b": [0.5098, 0.6244, 0.5266, 0.6395]}, {"w": "don’t", "b": [0.5337, 0.6244, 0.5766, 0.6395]}, {"w": "reach", "b": [0.5838, 0.6244, 0.6272, 0.6395]}, {"w": "production.", "b": [0.6344, 0.6244, 0.7291, 0.6395]}, {"w": "The", "b": [0.7403, 0.6244, 0.7728, 0.6395]}, {"w": "reasons", "b": [0.7799, 0.6244, 0.8398, 0.6395]}, {"w": "for", "b": [0.847, 0.6244, 0.8695, 0.6395]}, {"w": "a", "b": [0.1312, 0.6423, 0.1406, 0.6574]}, {"w": "failure", "b": [0.1479, 0.6423, 0.1997, 0.6574]}, {"w": "range", "b": [0.2069, 0.6423, 0.252, 0.6574]}, {"w": "from", "b": [0.2592, 0.6423, 0.2974, 0.6574]}, {"w": "organizational", "b": [0.3047, 0.6423, 0.4208, 0.6574]}, {"w": "to", "b": [0.428, 0.6423, 0.4448, 0.6574]}, {"w": "engineering.", "b": [0.452, 0.6423, 0.5504, 0.6574]}, {"w": "In", "b": [0.5618, 0.6423, 0.5791, 0.6574]}, {"w": "this", "b": [0.5863, 0.6423, 0.6168, 0.6574]}, {"w": "section,", "b": [0.624, 0.6423, 0.6858, 0.6574]}, {"w": "we", "b": [0.6933, 0.6423, 0.7148, 0.6574]}, {"w": "consider", "b": [0.722, 0.6423, 0.7891, 0.6574]}, {"w": "the", "b": [0.7964, 0.6423, 0.8225, 0.6574]}, {"w": "most", "b": [0.8298, 0.6423, 0.8696, 0.6574]}, {"w": "impactful", "b": [0.1312, 0.6604, 0.2076, 0.6753]}, {"w": "of", "b": [0.2138, 0.6604, 0.2286, 0.6753]}, {"w": "them.", "b": [0.2348, 0.6604, 0.2809, 0.6753]}]}, {"id": "b_8", "type": "paragraph", "text": "2.5.1 Lack of Experienced Talent", "words": [{"w": "2.5.1", "b": [0.1312, 0.7082, 0.1749, 0.7231]}, {"w": "Lack", "b": [0.1961, 0.7082, 0.2392, 0.7231]}, {"w": "of", "b": [0.2463, 0.7082, 0.2633, 0.7231]}, {"w": "Experienced", "b": [0.2704, 0.7082, 0.3848, 0.7231]}, {"w": "Talent", "b": [0.3918, 0.7082, 0.4502, 0.7231]}]}, {"id": "b_9", "type": "paragraph", "text": "As of 2020, both data science and machine learning engineering are relatively new disciplines. There’s still no standard way to teach them. Most organizations don’t know how to hire experts in machine learning and how to compare them. Most of the available talent on the market are people who completed one or several online courses and who don’t possess significant practical experience. A significant fraction of the workforce has superficial expertise in machine learning obtained on toy datasets in a classroom context. Many don’t have experience with the entire machine learning project life cycle. On the other hand, experienced software engineers that", "words": [{"w": "As", "b": [0.1305, 0.7449, 0.1512, 0.7597]}, {"w": "of", "b": [0.1573, 0.7449, 0.1719, 0.7597]}, {"w": "2020,", "b": [0.1779, 0.7449, 0.2191, 0.7597]}, {"w": "both", "b": [0.2252, 0.7449, 0.2619, 0.7597]}, {"w": "data", "b": [0.2679, 0.7449, 0.3031, 0.7597]}, {"w": "science", "b": [0.3091, 0.7449, 0.3636, 0.7597]}, {"w": "and", "b": [0.3696, 0.7449, 0.3988, 0.7597]}, {"w": "machine", "b": [0.4048, 0.7449, 0.4696, 0.7597]}, {"w": "learning", "b": [0.4757, 0.7449, 0.5391, 0.7597]}, {"w": "engineering", "b": [0.5451, 0.7449, 0.6346, 0.7597]}, {"w": "are", "b": [0.6407, 0.7449, 0.6648, 0.7597]}, {"w": "relatively", "b": [0.6709, 0.7449, 0.7438, 0.7597]}, {"w": "new", "b": [0.7499, 0.7449, 0.781, 0.7597]}, {"w": "disciplines.", "b": [0.7871, 0.7449, 0.8727, 0.7597]}, {"w": "There’s", "b": [0.1306, 0.7629, 0.189, 0.7777]}, {"w": "still", "b": [0.1932, 0.7629, 0.2225, 0.7777]}, {"w": "no", "b": [0.2267, 0.7629, 0.2458, 0.7777]}, {"w": "standard", "b": [0.25, 0.7629, 0.3195, 0.7777]}, {"w": "way", "b": [0.3237, 0.7629, 0.3543, 0.7777]}, {"w": "to", "b": [0.3585, 0.7629, 0.3746, 0.7777]}, {"w": "teach", "b": [0.3788, 0.7629, 0.4205, 0.7777]}, {"w": "them.", "b": [0.4247, 0.7629, 0.4699, 0.7777]}, {"w": "Most", "b": [0.4774, 0.7629, 0.5172, 0.7777]}, {"w": "organizations", "b": [0.5214, 0.7629, 0.6261, 0.7777]}, {"w": "don’t", "b": [0.6303, 0.7629, 0.6715, 0.7777]}, {"w": "know", "b": [0.6757, 0.7629, 0.7169, 0.7777]}, {"w": "how", "b": [0.7211, 0.7629, 0.7527, 0.7777]}, {"w": "to", "b": [0.7569, 0.7629, 0.773, 0.7777]}, {"w": "hire", "b": [0.7772, 0.7629, 0.8074, 0.7777]}, {"w": "experts", "b": [0.8116, 0.7629, 0.8691, 0.7777]}, {"w": "in", "b": [0.1312, 0.7808, 0.1463, 0.7956]}, {"w": "machine", "b": [0.1517, 0.7808, 0.2165, 0.7956]}, {"w": "learning", "b": [0.2219, 0.7808, 0.2853, 0.7956]}, {"w": "and", "b": [0.2907, 0.7808, 0.3198, 0.7956]}, {"w": "how", "b": [0.3252, 0.7808, 0.3569, 0.7956]}, {"w": "to", "b": [0.3623, 0.7808, 0.3783, 0.7956]}, {"w": "compare", "b": [0.3837, 0.7808, 0.4501, 0.7956]}, {"w": "them.", "b": [0.4555, 0.7808, 0.5007, 0.7956]}, {"w": "Most", "b": [0.5087, 0.7808, 0.5485, 0.7956]}, {"w": "of", "b": [0.5539, 0.7808, 0.5684, 0.7956]}, {"w": "the", "b": [0.5738, 0.7808, 0.599, 0.7956]}, {"w": "available", "b": [0.6044, 0.7808, 0.6726, 0.7956]}, {"w": "talent", "b": [0.6781, 0.7808, 0.7238, 0.7956]}, {"w": "on", "b": [0.7292, 0.7808, 0.7483, 0.7956]}, {"w": "the", "b": [0.7537, 0.7808, 0.7788, 0.7956]}, {"w": "market", "b": [0.7842, 0.7808, 0.8395, 0.7956]}, {"w": "are", "b": [0.8449, 0.7808, 0.8691, 0.7956]}, {"w": "people", "b": [0.1312, 0.7988, 0.182, 0.8136]}, {"w": "who", "b": [0.1872, 0.7988, 0.2193, 0.8136]}, {"w": "completed", "b": [0.2245, 0.7988, 0.3049, 0.8136]}, {"w": "one", "b": [0.31, 0.7988, 0.3372, 0.8136]}, {"w": "or", "b": [0.3423, 0.7988, 0.3584, 0.8136]}, {"w": "several", "b": [0.3636, 0.7988, 0.417, 0.8136]}, {"w": "online", "b": [0.4222, 0.7988, 0.4694, 0.8136]}, {"w": "courses", "b": [0.4746, 0.7988, 0.5311, 0.8136]}, {"w": "and", "b": [0.5363, 0.7988, 0.5654, 0.8136]}, {"w": "who", "b": [0.5706, 0.7988, 0.6027, 0.8136]}, {"w": "don’t", "b": [0.6079, 0.7988, 0.6491, 0.8136]}, {"w": "possess", "b": [0.6543, 0.7988, 0.7105, 0.8136]}, {"w": "significant", "b": [0.7156, 0.7988, 0.7956, 0.8136]}, {"w": "practical", "b": [0.8008, 0.7988, 0.8692, 0.8136]}, {"w": "experience.", "b": [0.1312, 0.8167, 0.2188, 0.8315]}, {"w": "A", "b": [0.2265, 0.8167, 0.2401, 0.8315]}, {"w": "significant", "b": [0.2448, 0.8167, 0.3248, 0.8315]}, {"w": "fraction", "b": [0.3296, 0.8167, 0.3905, 0.8315]}, {"w": "of", "b": [0.3952, 0.8167, 0.4098, 0.8315]}, {"w": "the", "b": [0.4146, 0.8167, 0.4397, 0.8315]}, {"w": "workforce", "b": [0.4445, 0.8167, 0.5204, 0.8315]}, {"w": "has", "b": [0.5252, 0.8167, 0.5515, 0.8315]}, {"w": "superficial", "b": [0.5562, 0.8167, 0.6363, 0.8315]}, {"w": "expertise", "b": [0.6411, 0.8167, 0.7116, 0.8315]}, {"w": "in", "b": [0.7164, 0.8167, 0.7315, 0.8315]}, {"w": "machine", "b": [0.7363, 0.8167, 0.8011, 0.8315]}, {"w": "learning", "b": [0.8058, 0.8167, 0.8692, 0.8315]}, {"w": "obtained", "b": [0.1312, 0.8347, 0.1996, 0.8495]}, {"w": "on", "b": [0.2057, 0.8347, 0.2247, 0.8495]}, {"w": "toy", "b": [0.2308, 0.8347, 0.2559, 0.8495]}, {"w": "datasets", "b": [0.262, 0.8347, 0.3265, 0.8495]}, {"w": "in", "b": [0.3326, 0.8347, 0.3477, 0.8495]}, {"w": "a", "b": [0.3537, 0.8347, 0.3628, 0.8495]}, {"w": "classroom", "b": [0.3689, 0.8347, 0.446, 0.8495]}, {"w": "context.", "b": [0.4521, 0.8347, 0.5154, 0.8495]}, {"w": "Many", "b": [0.5235, 0.8347, 0.5683, 0.8495]}, {"w": "don’t", "b": [0.5743, 0.8347, 0.6155, 0.8495]}, {"w": "have", "b": [0.6216, 0.8347, 0.6573, 0.8495]}, {"w": "experience", "b": [0.6633, 0.8347, 0.7458, 0.8495]}, {"w": "with", "b": [0.7519, 0.8347, 0.7871, 0.8495]}, {"w": "the", "b": [0.7932, 0.8347, 0.8183, 0.8495]}, {"w": "entire", "b": [0.8243, 0.8347, 0.8691, 0.8495]}, {"w": "machine", "b": [0.1312, 0.8525, 0.1974, 0.8674]}, {"w": "learning", "b": [0.2036, 0.8525, 0.2683, 0.8674]}, {"w": "project", "b": [0.2745, 0.8525, 0.331, 0.8674]}, {"w": "life", "b": [0.3371, 0.8525, 0.3612, 0.8674]}, {"w": "cycle.", "b": [0.3674, 0.8525, 0.4121, 0.8674]}, {"w": "On", "b": [0.4203, 0.8525, 0.4449, 0.8674]}, {"w": "the", "b": [0.451, 0.8525, 0.4767, 0.8674]}, {"w": "other", "b": [0.4828, 0.8525, 0.525, 0.8674]}, {"w": "hand,", "b": [0.5311, 0.8525, 0.5763, 0.8674]}, {"w": "experienced", "b": [0.5824, 0.8525, 0.677, 0.8674]}, {"w": "software", "b": [0.6831, 0.8525, 0.7495, 0.8674]}, {"w": "engineers", "b": [0.7556, 0.8525, 0.8297, 0.8674]}, {"w": "that", "b": [0.8358, 0.8525, 0.8697, 0.8674]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "10", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 40, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "might exist in an organization don’t have expertise in handling data and machine learning models appropriately.", "words": [{"w": "might", "b": [0.1312, 0.0883, 0.1784, 0.1034]}, {"w": "exist", "b": [0.1846, 0.0883, 0.2225, 0.1034]}, {"w": "in", "b": [0.2287, 0.0883, 0.2442, 0.1034]}, {"w": "an", "b": [0.2504, 0.0883, 0.2701, 0.1034]}, {"w": "organization", "b": [0.2763, 0.0883, 0.3769, 0.1034]}, {"w": "don’t", "b": [0.383, 0.0883, 0.4255, 0.1034]}, {"w": "have", "b": [0.4317, 0.0883, 0.4685, 0.1034]}, {"w": "expertise", "b": [0.4747, 0.0883, 0.5475, 0.1034]}, {"w": "in", "b": [0.5536, 0.0883, 0.5692, 0.1034]}, {"w": "handling", "b": [0.5753, 0.0883, 0.6458, 0.1034]}, {"w": "data", "b": [0.652, 0.0883, 0.6883, 0.1034]}, {"w": "and", "b": [0.6945, 0.0883, 0.7245, 0.1034]}, {"w": "machine", "b": [0.7307, 0.0883, 0.7976, 0.1034]}, {"w": "learning", "b": [0.8037, 0.0883, 0.8691, 0.1034]}, {"w": "models", "b": [0.1312, 0.1063, 0.1872, 0.1213]}, {"w": "appropriately.", "b": [0.1934, 0.1063, 0.3052, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "2.5.2 Lack of Support by the Leadership", "words": [{"w": "2.5.2", "b": [0.1312, 0.1541, 0.1749, 0.1691]}, {"w": "Lack", "b": [0.1961, 0.1541, 0.2392, 0.1691]}, {"w": "of", "b": [0.2463, 0.1541, 0.2633, 0.1691]}, {"w": "Support", "b": [0.2704, 0.1541, 0.3458, 0.1691]}, {"w": "by", "b": [0.3528, 0.1541, 0.3752, 0.1691]}, {"w": "the", "b": [0.3823, 0.1541, 0.4121, 0.1691]}, {"w": "Leadership", "b": [0.4192, 0.1541, 0.5201, 0.1691]}]}, {"id": "b_2", "type": "paragraph", "text": "As discussed in the previous section on the two cultures, scientists and software engineers often have different goals, motivations, and success criteria. They also work very differently. In a typical Agile organization, software engineering teams work in sprints with clearly defined expected deliverables and little uncertainty.", "words": [{"w": "As", "b": [0.1305, 0.1906, 0.1521, 0.2058]}, {"w": "discussed", "b": [0.1583, 0.1906, 0.234, 0.2058]}, {"w": "in", "b": [0.2402, 0.1906, 0.2559, 0.2058]}, {"w": "the", "b": [0.2622, 0.1906, 0.2883, 0.2058]}, {"w": "previous", "b": [0.2946, 0.1906, 0.3633, 0.2058]}, {"w": "section", "b": [0.3695, 0.1906, 0.4261, 0.2058]}, {"w": "on", "b": [0.4323, 0.1906, 0.4522, 0.2058]}, {"w": "the", "b": [0.4585, 0.1906, 0.4846, 0.2058]}, {"w": "two", "b": [0.4909, 0.1906, 0.5201, 0.2058]}, {"w": "cultures,", "b": [0.5264, 0.1906, 0.5967, 0.2058]}, {"w": "scientists", "b": [0.6029, 0.1906, 0.677, 0.2058]}, {"w": "and", "b": [0.6833, 0.1906, 0.7136, 0.2058]}, {"w": "software", "b": [0.7198, 0.1906, 0.7875, 0.2058]}, {"w": "engineers", "b": [0.7937, 0.1906, 0.8692, 0.2058]}, {"w": "often", "b": [0.1312, 0.2087, 0.1716, 0.2237]}, {"w": "have", "b": [0.1778, 0.2087, 0.214, 0.2237]}, {"w": "different", "b": [0.2202, 0.2087, 0.2866, 0.2237]}, {"w": "goals,", "b": [0.2928, 0.2087, 0.3378, 0.2237]}, {"w": "motivations,", "b": [0.344, 0.2087, 0.4426, 0.2237]}, {"w": "and", "b": [0.4488, 0.2087, 0.4784, 0.2237]}, {"w": "success", "b": [0.4846, 0.2087, 0.5411, 0.2237]}, {"w": "criteria.", "b": [0.5473, 0.2087, 0.6097, 0.2237]}, {"w": "They", "b": [0.618, 0.2087, 0.6593, 0.2237]}, {"w": "also", "b": [0.6655, 0.2087, 0.6962, 0.2237]}, {"w": "work", "b": [0.7024, 0.2087, 0.7413, 0.2237]}, {"w": "very", "b": [0.7474, 0.2087, 0.7817, 0.2237]}, {"w": "differently.", "b": [0.7879, 0.2087, 0.8727, 0.2237]}, {"w": "In", "b": [0.1312, 0.2268, 0.1478, 0.2416]}, {"w": "a", "b": [0.1528, 0.2268, 0.1619, 0.2416]}, {"w": "typical", "b": [0.1669, 0.2268, 0.2201, 0.2416]}, {"w": "Agile", "b": [0.2251, 0.2268, 0.2658, 0.2416]}, {"w": "organization,", "b": [0.2708, 0.2268, 0.3734, 0.2416]}, {"w": "software", "b": [0.3786, 0.2268, 0.4436, 0.2416]}, {"w": "engineering", "b": [0.4486, 0.2268, 0.5381, 0.2416]}, {"w": "teams", "b": [0.5431, 0.2268, 0.5894, 0.2416]}, {"w": "work", "b": [0.5945, 0.2268, 0.6327, 0.2416]}, {"w": "in", "b": [0.6377, 0.2268, 0.6528, 0.2416]}, {"w": "sprints", "b": [0.6578, 0.2268, 0.7108, 0.2416]}, {"w": "with", "b": [0.7158, 0.2268, 0.751, 0.2416]}, {"w": "clearly", "b": [0.756, 0.2268, 0.8078, 0.2416]}, {"w": "defined", "b": [0.8128, 0.2268, 0.8691, 0.2416]}, {"w": "expected", "b": [0.1312, 0.2446, 0.202, 0.2596]}, {"w": "deliverables", "b": [0.2082, 0.2446, 0.3017, 0.2596]}, {"w": "and", "b": [0.3078, 0.2446, 0.3376, 0.2596]}, {"w": "little", "b": [0.3437, 0.2446, 0.3816, 0.2596]}, {"w": "uncertainty.", "b": [0.3878, 0.2446, 0.4832, 0.2596]}]}, {"id": "b_3", "type": "paragraph", "text": "Scientists, on the other hand, work in high uncertainty and move ahead with multiple experiments. Most of such experiments don’t result in any deliverable and, thus, can be seen by inexperienced leaders as no progress. Sometimes, after the model is built and deployed, the entire process has to start over because the model doesn’t result in the expected increase of the metric the business cares about. Again, this can lead to the perception of the scientist’s work by the leadership as wasted time and resources.", "words": [{"w": "Scientists,", "b": [0.1312, 0.2714, 0.2136, 0.2865]}, {"w": "on", "b": [0.2226, 0.2714, 0.2425, 0.2865]}, {"w": "the", "b": [0.2509, 0.2714, 0.2771, 0.2865]}, {"w": "other", "b": [0.2855, 0.2714, 0.3284, 0.2865]}, {"w": "hand,", "b": [0.3369, 0.2714, 0.3829, 0.2865]}, {"w": "work", "b": [0.3919, 0.2714, 0.4317, 0.2865]}, {"w": "in", "b": [0.4402, 0.2714, 0.4559, 0.2865]}, {"w": "high", "b": [0.4643, 0.2714, 0.4999, 0.2865]}, {"w": "uncertainty", "b": [0.5083, 0.2714, 0.602, 0.2865]}, {"w": "and", "b": [0.6104, 0.2714, 0.6408, 0.2865]}, {"w": "move", "b": [0.6492, 0.2714, 0.6916, 0.2865]}, {"w": "ahead", "b": [0.7, 0.2714, 0.7481, 0.2865]}, {"w": "with", "b": [0.7566, 0.2714, 0.7932, 0.2865]}, {"w": "multiple", "b": [0.8016, 0.2714, 0.8691, 0.2865]}, {"w": "experiments.", "b": [0.1312, 0.2896, 0.2314, 0.3044]}, {"w": "Most", "b": [0.2396, 0.2896, 0.2794, 0.3044]}, {"w": "of", "b": [0.2856, 0.2896, 0.3001, 0.3044]}, {"w": "such", "b": [0.3063, 0.2896, 0.3411, 0.3044]}, {"w": "experiments", "b": [0.3472, 0.2896, 0.4424, 0.3044]}, {"w": "don’t", "b": [0.4485, 0.2896, 0.4897, 0.3044]}, {"w": "result", "b": [0.4959, 0.2896, 0.5403, 0.3044]}, {"w": "in", "b": [0.5464, 0.2896, 0.5615, 0.3044]}, {"w": "any", "b": [0.5677, 0.2896, 0.5958, 0.3044]}, {"w": "deliverable", "b": [0.6019, 0.2896, 0.6864, 0.3044]}, {"w": "and,", "b": [0.6926, 0.2896, 0.7267, 0.3044]}, {"w": "thus,", "b": [0.7329, 0.2896, 0.7717, 0.3044]}, {"w": "can", "b": [0.7779, 0.2896, 0.805, 0.3044]}, {"w": "be", "b": [0.8111, 0.2896, 0.8298, 0.3044]}, {"w": "seen", "b": [0.8359, 0.2896, 0.8692, 0.3044]}, {"w": "by", "b": [0.1312, 0.3074, 0.151, 0.3224]}, {"w": "inexperienced", "b": [0.1571, 0.3074, 0.2682, 0.3224]}, {"w": "leaders", "b": [0.2744, 0.3074, 0.3306, 0.3224]}, {"w": "as", "b": [0.3368, 0.3074, 0.3535, 0.3224]}, {"w": "no", "b": [0.3596, 0.3074, 0.3793, 0.3224]}, {"w": "progress.", "b": [0.3855, 0.3074, 0.4574, 0.3224]}, {"w": "Sometimes,", "b": [0.4657, 0.3074, 0.5581, 0.3224]}, {"w": "after", "b": [0.5643, 0.3074, 0.6022, 0.3224]}, {"w": "the", "b": [0.6084, 0.3074, 0.6343, 0.3224]}, {"w": "model", "b": [0.6405, 0.3074, 0.6897, 0.3224]}, {"w": "is", "b": [0.6959, 0.3074, 0.7085, 0.3224]}, {"w": "built", "b": [0.7146, 0.3074, 0.753, 0.3224]}, {"w": "and", "b": [0.7592, 0.3074, 0.7893, 0.3224]}, {"w": "deployed,", "b": [0.7954, 0.3074, 0.8717, 0.3224]}, {"w": "the", "b": [0.1312, 0.3255, 0.1564, 0.3403]}, {"w": "entire", "b": [0.1625, 0.3255, 0.2072, 0.3403]}, {"w": "process", "b": [0.2133, 0.3255, 0.2704, 0.3403]}, {"w": "has", "b": [0.2765, 0.3255, 0.3027, 0.3403]}, {"w": "to", "b": [0.3088, 0.3255, 0.3249, 0.3403]}, {"w": "start", "b": [0.331, 0.3255, 0.3684, 0.3403]}, {"w": "over", "b": [0.3744, 0.3255, 0.4072, 0.3403]}, {"w": "because", "b": [0.4132, 0.3255, 0.4742, 0.3403]}, {"w": "the", "b": [0.4803, 0.3255, 0.5054, 0.3403]}, {"w": "model", "b": [0.5115, 0.3255, 0.5592, 0.3403]}, {"w": "doesn’t", "b": [0.5654, 0.3255, 0.6223, 0.3403]}, {"w": "result", "b": [0.6284, 0.3255, 0.6727, 0.3403]}, {"w": "in", "b": [0.6788, 0.3255, 0.6939, 0.3403]}, {"w": "the", "b": [0.7, 0.3255, 0.7252, 0.3403]}, {"w": "expected", "b": [0.7313, 0.3255, 0.8006, 0.3403]}, {"w": "increase", "b": [0.8067, 0.3255, 0.8692, 0.3403]}, {"w": "of", "b": [0.1312, 0.3434, 0.1458, 0.3582]}, {"w": "the", "b": [0.1511, 0.3434, 0.1762, 0.3582]}, {"w": "metric", "b": [0.1816, 0.3434, 0.2319, 0.3582]}, {"w": "the", "b": [0.2371, 0.3434, 0.2623, 0.3582]}, {"w": "business", "b": [0.2676, 0.3434, 0.3322, 0.3582]}, {"w": "cares", "b": [0.3375, 0.3434, 0.3769, 0.3582]}, {"w": "about.", "b": [0.3822, 0.3434, 0.433, 0.3582]}, {"w": "Again,", "b": [0.4409, 0.3434, 0.4926, 0.3582]}, {"w": "this", "b": [0.4981, 0.3434, 0.5274, 0.3582]}, {"w": "can", "b": [0.5327, 0.3434, 0.5598, 0.3582]}, {"w": "lead", "b": [0.5651, 0.3434, 0.5973, 0.3582]}, {"w": "to", "b": [0.6026, 0.3434, 0.6186, 0.3582]}, {"w": "the", "b": [0.624, 0.3434, 0.6491, 0.3582]}, {"w": "perception", "b": [0.6544, 0.3434, 0.7374, 0.3582]}, {"w": "of", "b": [0.7427, 0.3434, 0.7572, 0.3582]}, {"w": "the", "b": [0.7626, 0.3434, 0.7877, 0.3582]}, {"w": "scientist’s", "b": [0.793, 0.3434, 0.8692, 0.3582]}, {"w": "work", "b": [0.1306, 0.3613, 0.1696, 0.3762]}, {"w": "by", "b": [0.1757, 0.3613, 0.1952, 0.3762]}, {"w": "the", "b": [0.2014, 0.3613, 0.227, 0.3762]}, {"w": "leadership", "b": [0.2331, 0.3613, 0.3143, 0.3762]}, {"w": "as", "b": [0.3205, 0.3613, 0.337, 0.3762]}, {"w": "wasted", "b": [0.3432, 0.3613, 0.3981, 0.3762]}, {"w": "time", "b": [0.4043, 0.3613, 0.4401, 0.3762]}, {"w": "and", "b": [0.4463, 0.3613, 0.476, 0.3762]}, {"w": "resources.", "b": [0.4822, 0.3613, 0.5605, 0.3762]}]}, {"id": "b_4", "type": "paragraph", "text": "Furthermore, in many organizations, leaders responsible for data science and artificial intelligence (AI), especially at the vice-president level, have a non-scientific or even non- engineering background. They don’t know how AI works, or have a very superficial or overly optimistic understanding of it drawn from popular sources. They might have such a mindset that with enough resources, technical and human, AI can solve any problem in a short amount of time. When fast progress doesn’t happen, they easily blame scientists or entirely lose interest in AI as an ineffective tool with hard-to-predict and uncertain results.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.3881, 0.2394, 0.4032]}, {"w": "in", "b": [0.2494, 0.3881, 0.265, 0.4032]}, {"w": "many", "b": [0.2742, 0.3881, 0.3192, 0.4032]}, {"w": "organizations,", "b": [0.3284, 0.3881, 0.4426, 0.4032]}, {"w": "leaders", "b": [0.4525, 0.3881, 0.5092, 0.4032]}, {"w": "responsible", "b": [0.5183, 0.3881, 0.6091, 0.4032]}, {"w": "for", "b": [0.6183, 0.3881, 0.6408, 0.4032]}, {"w": "data", "b": [0.65, 0.3881, 0.6866, 0.4032]}, {"w": "science", "b": [0.6958, 0.3881, 0.7524, 0.4032]}, {"w": "and", "b": [0.7616, 0.3881, 0.7919, 0.4032]}, {"w": "artificial", "b": [0.8011, 0.3881, 0.8691, 0.4032]}, {"w": "intelligence", "b": [0.1312, 0.406, 0.2228, 0.4211]}, {"w": "(AI),", "b": [0.2301, 0.406, 0.2709, 0.4211]}, {"w": "especially", "b": [0.2782, 0.406, 0.3568, 0.4211]}, {"w": "at", "b": [0.3641, 0.406, 0.3809, 0.4211]}, {"w": "the", "b": [0.3882, 0.406, 0.4144, 0.4211]}, {"w": "vice-president", "b": [0.4217, 0.406, 0.5348, 0.4211]}, {"w": "level,", "b": [0.5422, 0.406, 0.584, 0.4211]}, {"w": "have", "b": [0.5917, 0.406, 0.6288, 0.4211]}, {"w": "a", "b": [0.6361, 0.406, 0.6456, 0.4211]}, {"w": "non-scientific", "b": [0.6529, 0.406, 0.7603, 0.4211]}, {"w": "or", "b": [0.7676, 0.406, 0.7844, 0.4211]}, {"w": "even", "b": [0.7917, 0.406, 0.8283, 0.4211]}, {"w": "non-", "b": [0.8357, 0.406, 0.8723, 0.4211]}, {"w": "engineering", "b": [0.1312, 0.4242, 0.2209, 0.439]}, {"w": "background.", "b": [0.2271, 0.4242, 0.3238, 0.439]}, {"w": "They", "b": [0.332, 0.4242, 0.3728, 0.439]}, {"w": "don’t", "b": [0.3789, 0.4242, 0.4202, 0.439]}, {"w": "know", "b": [0.4263, 0.4242, 0.4676, 0.439]}, {"w": "how", "b": [0.4737, 0.4242, 0.5054, 0.439]}, {"w": "AI", "b": [0.5115, 0.4242, 0.5317, 0.439]}, {"w": "works,", "b": [0.5378, 0.4242, 0.5883, 0.439]}, {"w": "or", "b": [0.5944, 0.4242, 0.6106, 0.439]}, {"w": "have", "b": [0.6167, 0.4242, 0.6525, 0.439]}, {"w": "a", "b": [0.6586, 0.4242, 0.6677, 0.439]}, {"w": "very", "b": [0.6738, 0.4242, 0.7076, 0.439]}, {"w": "superficial", "b": [0.7137, 0.4242, 0.794, 0.439]}, {"w": "or", "b": [0.8001, 0.4242, 0.8163, 0.439]}, {"w": "overly", "b": [0.8224, 0.4242, 0.8698, 0.439]}, {"w": "optimistic", "b": [0.1312, 0.4421, 0.21, 0.457]}, {"w": "understanding", "b": [0.2161, 0.4421, 0.3292, 0.457]}, {"w": "of", "b": [0.3354, 0.4421, 0.35, 0.457]}, {"w": "it", "b": [0.3562, 0.4421, 0.3682, 0.457]}, {"w": "drawn", "b": [0.3744, 0.4421, 0.4233, 0.457]}, {"w": "from", "b": [0.4295, 0.4421, 0.4663, 0.457]}, {"w": "popular", "b": [0.4725, 0.4421, 0.5336, 0.457]}, {"w": "sources.", "b": [0.5397, 0.4421, 0.6015, 0.457]}, {"w": "They", "b": [0.6098, 0.4421, 0.6506, 0.457]}, {"w": "might", "b": [0.6567, 0.4421, 0.7026, 0.457]}, {"w": "have", "b": [0.7088, 0.4421, 0.7445, 0.457]}, {"w": "such", "b": [0.7507, 0.4421, 0.7856, 0.457]}, {"w": "a", "b": [0.7918, 0.4421, 0.8008, 0.457]}, {"w": "mindset", "b": [0.807, 0.4421, 0.8696, 0.457]}, {"w": "that", "b": [0.1312, 0.4601, 0.1644, 0.4749]}, {"w": "with", "b": [0.1695, 0.4601, 0.2047, 0.4749]}, {"w": "enough", "b": [0.2098, 0.4601, 0.2661, 0.4749]}, {"w": "resources,", "b": [0.2712, 0.4601, 0.3479, 0.4749]}, {"w": "technical", "b": [0.3532, 0.4601, 0.423, 0.4749]}, {"w": "and", "b": [0.4281, 0.4601, 0.4573, 0.4749]}, {"w": "human,", "b": [0.4624, 0.4601, 0.5212, 0.4749]}, {"w": "AI", "b": [0.5265, 0.4601, 0.5466, 0.4749]}, {"w": "can", "b": [0.5517, 0.4601, 0.5788, 0.4749]}, {"w": "solve", "b": [0.5839, 0.4601, 0.6222, 0.4749]}, {"w": "any", "b": [0.6273, 0.4601, 0.6555, 0.4749]}, {"w": "problem", "b": [0.6606, 0.4601, 0.7249, 0.4749]}, {"w": "in", "b": [0.73, 0.4601, 0.7451, 0.4749]}, {"w": "a", "b": [0.7502, 0.4601, 0.7593, 0.4749]}, {"w": "short", "b": [0.7644, 0.4601, 0.8047, 0.4749]}, {"w": "amount", "b": [0.8098, 0.4601, 0.8696, 0.4749]}, {"w": "of", "b": [0.1312, 0.4778, 0.1464, 0.4929]}, {"w": "time.", "b": [0.1535, 0.4778, 0.1953, 0.4929]}, {"w": "When", "b": [0.2064, 0.4778, 0.255, 0.4929]}, {"w": "fast", "b": [0.2622, 0.4778, 0.2921, 0.4929]}, {"w": "progress", "b": [0.2992, 0.4778, 0.3664, 0.4929]}, {"w": "doesn’t", "b": [0.3735, 0.4778, 0.4327, 0.4929]}, {"w": "happen,", "b": [0.4399, 0.4778, 0.5052, 0.4929]}, {"w": "they", "b": [0.5126, 0.4778, 0.5487, 0.4929]}, {"w": "easily", "b": [0.5558, 0.4778, 0.6014, 0.4929]}, {"w": "blame", "b": [0.6085, 0.4778, 0.6576, 0.4929]}, {"w": "scientists", "b": [0.6647, 0.4778, 0.7388, 0.4929]}, {"w": "or", "b": [0.7459, 0.4778, 0.7627, 0.4929]}, {"w": "entirely", "b": [0.7698, 0.4778, 0.8316, 0.4929]}, {"w": "lose", "b": [0.8387, 0.4778, 0.8692, 0.4929]}, {"w": "interest", "b": [0.1312, 0.4959, 0.1914, 0.5108]}, {"w": "in", "b": [0.1975, 0.4959, 0.2129, 0.5108]}, {"w": "AI", "b": [0.2191, 0.4959, 0.2396, 0.5108]}, {"w": "as", "b": [0.2457, 0.4959, 0.2622, 0.5108]}, {"w": "an", "b": [0.2684, 0.4959, 0.2879, 0.5108]}, {"w": "ineffective", "b": [0.294, 0.4959, 0.3745, 0.5108]}, {"w": "tool", "b": [0.3807, 0.4959, 0.412, 0.5108]}, {"w": "with", "b": [0.4181, 0.4959, 0.454, 0.5108]}, {"w": "hard-to-predict", "b": [0.4601, 0.4959, 0.5823, 0.5108]}, {"w": "and", "b": [0.5884, 0.4959, 0.6181, 0.5108]}, {"w": "uncertain", "b": [0.6243, 0.4959, 0.7002, 0.5108]}, {"w": "results.", "b": [0.7064, 0.4959, 0.7641, 0.5108]}]}, {"id": "b_5", "type": "paragraph", "text": "Often, the problem lies in the inability of scientists to communicate the results and challenges to upper management. Because they don’t share the vocabulary and have very different levels of technical expertise, even a success presented badly can be seen as a failure.", "words": [{"w": "Often,", "b": [0.1312, 0.5229, 0.181, 0.5377]}, {"w": "the", "b": [0.1866, 0.5229, 0.2118, 0.5377]}, {"w": "problem", "b": [0.2173, 0.5229, 0.2816, 0.5377]}, {"w": "lies", "b": [0.2872, 0.5229, 0.3124, 0.5377]}, {"w": "in", "b": [0.3179, 0.5229, 0.333, 0.5377]}, {"w": "the", "b": [0.3385, 0.5229, 0.3636, 0.5377]}, {"w": "inability", "b": [0.3691, 0.5229, 0.4345, 0.5377]}, {"w": "of", "b": [0.44, 0.5229, 0.4545, 0.5377]}, {"w": "scientists", "b": [0.4601, 0.5229, 0.5312, 0.5377]}, {"w": "to", "b": [0.5367, 0.5229, 0.5528, 0.5377]}, {"w": "communicate", "b": [0.5583, 0.5229, 0.6623, 0.5377]}, {"w": "the", "b": [0.6678, 0.5229, 0.693, 0.5377]}, {"w": "results", "b": [0.6985, 0.5229, 0.75, 0.5377]}, {"w": "and", "b": [0.7555, 0.5229, 0.7847, 0.5377]}, {"w": "challenges", "b": [0.7902, 0.5229, 0.8692, 0.5377]}, {"w": "to", "b": [0.1312, 0.5406, 0.148, 0.5557]}, {"w": "upper", "b": [0.1551, 0.5406, 0.2028, 0.5557]}, {"w": "management.", "b": [0.21, 0.5406, 0.3192, 0.5557]}, {"w": "Because", "b": [0.3305, 0.5406, 0.3963, 0.5557]}, {"w": "they", "b": [0.4034, 0.5406, 0.4395, 0.5557]}, {"w": "don’t", "b": [0.4467, 0.5406, 0.4896, 0.5557]}, {"w": "share", "b": [0.4967, 0.5406, 0.5398, 0.5557]}, {"w": "the", "b": [0.5469, 0.5406, 0.5731, 0.5557]}, {"w": "vocabulary", "b": [0.5803, 0.5406, 0.6703, 0.5557]}, {"w": "and", "b": [0.6775, 0.5406, 0.7078, 0.5557]}, {"w": "have", "b": [0.7149, 0.5406, 0.7521, 0.5557]}, {"w": "very", "b": [0.7593, 0.5406, 0.7944, 0.5557]}, {"w": "different", "b": [0.8015, 0.5406, 0.8696, 0.5557]}, {"w": "levels", "b": [0.1312, 0.5587, 0.1744, 0.5736]}, {"w": "of", "b": [0.1806, 0.5587, 0.1954, 0.5736]}, {"w": "technical", "b": [0.2016, 0.5587, 0.2729, 0.5736]}, {"w": "expertise,", "b": [0.279, 0.5587, 0.3561, 0.5736]}, {"w": "even", "b": [0.3623, 0.5587, 0.3982, 0.5736]}, {"w": "a", "b": [0.4043, 0.5587, 0.4135, 0.5736]}, {"w": "success", "b": [0.4197, 0.5587, 0.4764, 0.5736]}, {"w": "presented", "b": [0.4826, 0.5587, 0.5592, 0.5736]}, {"w": "badly", "b": [0.5653, 0.5587, 0.6099, 0.5736]}, {"w": "can", "b": [0.6161, 0.5587, 0.6438, 0.5736]}, {"w": "be", "b": [0.6499, 0.5587, 0.6689, 0.5736]}, {"w": "seen", "b": [0.675, 0.5587, 0.709, 0.5736]}, {"w": "as", "b": [0.7152, 0.5587, 0.7317, 0.5736]}, {"w": "a", "b": [0.7378, 0.5587, 0.7471, 0.5736]}, {"w": "failure.", "b": [0.7532, 0.5587, 0.8092, 0.5736]}]}, {"id": "b_6", "type": "paragraph", "text": "This is why, in successful organizations, data scientists are good popularizers, while top-level managers, responsible for AI and analytics, often have a technical or scientific background.", "words": [{"w": "This", "b": [0.1306, 0.5857, 0.166, 0.6005]}, {"w": "is", "b": [0.1721, 0.5857, 0.1843, 0.6005]}, {"w": "why,", "b": [0.1905, 0.5857, 0.2262, 0.6005]}, {"w": "in", "b": [0.2324, 0.5857, 0.2475, 0.6005]}, {"w": "successful", "b": [0.2537, 0.5857, 0.3302, 0.6005]}, {"w": "organizations,", "b": [0.3363, 0.5857, 0.4463, 0.6005]}, {"w": "data", "b": [0.4525, 0.5857, 0.4878, 0.6005]}, {"w": "scientists", "b": [0.494, 0.5857, 0.5654, 0.6005]}, {"w": "are", "b": [0.5715, 0.5857, 0.5958, 0.6005]}, {"w": "good", "b": [0.6019, 0.5857, 0.6403, 0.6005]}, {"w": "popularizers,", "b": [0.6464, 0.5857, 0.748, 0.6005]}, {"w": "while", "b": [0.7541, 0.5857, 0.7955, 0.6005]}, {"w": "top-level", "b": [0.8016, 0.5857, 0.8692, 0.6005]}, {"w": "managers,", "b": [0.1312, 0.6035, 0.2124, 0.6185]}, {"w": "responsible", "b": [0.2185, 0.6035, 0.3075, 0.6185]}, {"w": "for", "b": [0.3137, 0.6035, 0.3358, 0.6185]}, {"w": "AI", "b": [0.3419, 0.6035, 0.3624, 0.6185]}, {"w": "and", "b": [0.3686, 0.6035, 0.3983, 0.6185]}, {"w": "analytics,", "b": [0.4045, 0.6035, 0.481, 0.6185]}, {"w": "often", "b": [0.4871, 0.6035, 0.5276, 0.6185]}, {"w": "have", "b": [0.5338, 0.6035, 0.5702, 0.6185]}, {"w": "a", "b": [0.5763, 0.6035, 0.5856, 0.6185]}, {"w": "technical", "b": [0.5917, 0.6035, 0.663, 0.6185]}, {"w": "or", "b": [0.6691, 0.6035, 0.6856, 0.6185]}, {"w": "scientific", "b": [0.6918, 0.6035, 0.7611, 0.6185]}, {"w": "background.", "b": [0.7673, 0.6035, 0.8658, 0.6185]}]}, {"id": "b_7", "type": "paragraph", "text": "2.5.3 Missing Data Infrastructure", "words": [{"w": "2.5.3", "b": [0.1312, 0.6514, 0.1749, 0.6663]}, {"w": "Missing", "b": [0.1961, 0.6514, 0.2672, 0.6663]}, {"w": "Data", "b": [0.2743, 0.6514, 0.3194, 0.6663]}, {"w": "Infrastructure", "b": [0.3265, 0.6514, 0.4569, 0.6663]}]}, {"id": "b_8", "type": "paragraph", "text": "Data analysts and scientists work with data. The quality of the data is crucial for a machine learning project’s success. Enterprise data infrastructure must provide the analyst with simple ways to get quality data for training models. At the same time, the infrastructure must make sure that similar quality data will be available once the model is deployed in production.", "words": [{"w": "Data", "b": [0.1312, 0.6881, 0.1702, 0.7029]}, {"w": "analysts", "b": [0.1763, 0.6881, 0.2403, 0.7029]}, {"w": "and", "b": [0.2465, 0.6881, 0.2756, 0.7029]}, {"w": "scientists", "b": [0.2817, 0.6881, 0.3529, 0.7029]}, {"w": "work", "b": [0.359, 0.6881, 0.3972, 0.7029]}, {"w": "with", "b": [0.4034, 0.6881, 0.4386, 0.7029]}, {"w": "data.", "b": [0.4447, 0.6881, 0.4849, 0.7029]}, {"w": "The", "b": [0.4931, 0.6881, 0.5242, 0.7029]}, {"w": "quality", "b": [0.5304, 0.6881, 0.5851, 0.7029]}, {"w": "of", "b": [0.5912, 0.6881, 0.6058, 0.7029]}, {"w": "the", "b": [0.612, 0.6881, 0.6371, 0.7029]}, {"w": "data", "b": [0.6432, 0.6881, 0.6784, 0.7029]}, {"w": "is", "b": [0.6845, 0.6881, 0.6967, 0.7029]}, {"w": "crucial", "b": [0.7028, 0.6881, 0.7552, 0.7029]}, {"w": "for", "b": [0.7613, 0.6881, 0.783, 0.7029]}, {"w": "a", "b": [0.7891, 0.6881, 0.7981, 0.7029]}, {"w": "machine", "b": [0.8043, 0.6881, 0.8691, 0.7029]}, {"w": "learning", "b": [0.1312, 0.7058, 0.1972, 0.7209]}, {"w": "project’s", "b": [0.2048, 0.7058, 0.2751, 0.7209]}, {"w": "success.", "b": [0.2827, 0.7058, 0.3458, 0.7209]}, {"w": "Enterprise", "b": [0.3585, 0.7058, 0.4432, 0.7209]}, {"w": "data", "b": [0.4509, 0.7058, 0.4875, 0.7209]}, {"w": "infrastructure", "b": [0.4951, 0.7058, 0.6079, 0.7209]}, {"w": "must", "b": [0.6155, 0.7058, 0.6559, 0.7209]}, {"w": "provide", "b": [0.6635, 0.7058, 0.7243, 0.7209]}, {"w": "the", "b": [0.7319, 0.7058, 0.7581, 0.7209]}, {"w": "analyst", "b": [0.7657, 0.7058, 0.8249, 0.7209]}, {"w": "with", "b": [0.8326, 0.7058, 0.8692, 0.7209]}, {"w": "simple", "b": [0.1312, 0.7237, 0.1836, 0.7389]}, {"w": "ways", "b": [0.19, 0.7237, 0.2294, 0.7389]}, {"w": "to", "b": [0.2358, 0.7237, 0.2525, 0.7389]}, {"w": "get", "b": [0.2589, 0.7237, 0.284, 0.7389]}, {"w": "quality", "b": [0.2904, 0.7237, 0.3474, 0.7389]}, {"w": "data", "b": [0.3538, 0.7237, 0.3904, 0.7389]}, {"w": "for", "b": [0.3968, 0.7237, 0.4194, 0.7389]}, {"w": "training", "b": [0.4258, 0.7237, 0.4907, 0.7389]}, {"w": "models.", "b": [0.4971, 0.7237, 0.5594, 0.7389]}, {"w": "At", "b": [0.5683, 0.7237, 0.5893, 0.7389]}, {"w": "the", "b": [0.5956, 0.7237, 0.6218, 0.7389]}, {"w": "same", "b": [0.6282, 0.7237, 0.6691, 0.7389]}, {"w": "time,", "b": [0.6755, 0.7237, 0.7173, 0.7389]}, {"w": "the", "b": [0.7238, 0.7237, 0.7499, 0.7389]}, {"w": "infrastructure", "b": [0.7563, 0.7237, 0.8691, 0.7389]}, {"w": "must", "b": [0.1312, 0.7417, 0.1716, 0.7568]}, {"w": "make", "b": [0.1786, 0.7417, 0.2215, 0.7568]}, {"w": "sure", "b": [0.2285, 0.7417, 0.2621, 0.7568]}, {"w": "that", "b": [0.2691, 0.7417, 0.3036, 0.7568]}, {"w": "similar", "b": [0.3106, 0.7417, 0.3662, 0.7568]}, {"w": "quality", "b": [0.3732, 0.7417, 0.4302, 0.7568]}, {"w": "data", "b": [0.4372, 0.7417, 0.4738, 0.7568]}, {"w": "will", "b": [0.4808, 0.7417, 0.5101, 0.7568]}, {"w": "be", "b": [0.5171, 0.7417, 0.5365, 0.7568]}, {"w": "available", "b": [0.5434, 0.7417, 0.6146, 0.7568]}, {"w": "once", "b": [0.6216, 0.7417, 0.6582, 0.7568]}, {"w": "the", "b": [0.6652, 0.7417, 0.6914, 0.7568]}, {"w": "model", "b": [0.6984, 0.7417, 0.748, 0.7568]}, {"w": "is", "b": [0.755, 0.7417, 0.7677, 0.7568]}, {"w": "deployed", "b": [0.7747, 0.7417, 0.8464, 0.7568]}, {"w": "in", "b": [0.8534, 0.7417, 0.8691, 0.7568]}, {"w": "production.", "b": [0.1312, 0.7598, 0.2241, 0.7747]}]}, {"id": "b_9", "type": "paragraph", "text": "However, in practice, this is often not the case. Scientists obtain the data for training by using various ad-hoc scripts; they also use different scripts and tools to combine various data sources. Once the model is ready, it turns out that it’s impossible, by using the available production infrastructure, to generate input examples for the model fast enough (or at all). We extensively talk about storing data and features in Chapters 3 and 4.", "words": [{"w": "However,", "b": [0.1312, 0.7866, 0.2061, 0.8017]}, {"w": "in", "b": [0.2128, 0.7866, 0.2285, 0.8017]}, {"w": "practice,", "b": [0.2351, 0.7866, 0.3052, 0.8017]}, {"w": "this", "b": [0.3119, 0.7866, 0.3423, 0.8017]}, {"w": "is", "b": [0.3489, 0.7866, 0.3616, 0.8017]}, {"w": "often", "b": [0.3682, 0.7866, 0.4095, 0.8017]}, {"w": "not", "b": [0.416, 0.7866, 0.4432, 0.8017]}, {"w": "the", "b": [0.4498, 0.7866, 0.476, 0.8017]}, {"w": "case.", "b": [0.4826, 0.7866, 0.5214, 0.8017]}, {"w": "Scientists", "b": [0.5309, 0.7866, 0.608, 0.8017]}, {"w": "obtain", "b": [0.6146, 0.7866, 0.6669, 0.8017]}, {"w": "the", "b": [0.6734, 0.7866, 0.6996, 0.8017]}, {"w": "data", "b": [0.7062, 0.7866, 0.7428, 0.8017]}, {"w": "for", "b": [0.7493, 0.7866, 0.7719, 0.8017]}, {"w": "training", "b": [0.7785, 0.7866, 0.8434, 0.8017]}, {"w": "by", "b": [0.8499, 0.7866, 0.8698, 0.8017]}, {"w": "using", "b": [0.1312, 0.8047, 0.1725, 0.8195]}, {"w": "various", "b": [0.1786, 0.8047, 0.2345, 0.8195]}, {"w": "ad-hoc", "b": [0.2407, 0.8047, 0.2934, 0.8195]}, {"w": "scripts;", "b": [0.2995, 0.8047, 0.3561, 0.8195]}, {"w": "they", "b": [0.3622, 0.8047, 0.3969, 0.8195]}, {"w": "also", "b": [0.403, 0.8047, 0.4332, 0.8195]}, {"w": "use", "b": [0.4393, 0.8047, 0.4645, 0.8195]}, {"w": "different", "b": [0.4706, 0.8047, 0.536, 0.8195]}, {"w": "scripts", "b": [0.5421, 0.8047, 0.5936, 0.8195]}, {"w": "and", "b": [0.5997, 0.8047, 0.6289, 0.8195]}, {"w": "tools", "b": [0.635, 0.8047, 0.6728, 0.8195]}, {"w": "to", "b": [0.6789, 0.8047, 0.6949, 0.8195]}, {"w": "combine", "b": [0.7011, 0.8047, 0.7659, 0.8195]}, {"w": "various", "b": [0.772, 0.8047, 0.8279, 0.8195]}, {"w": "data", "b": [0.834, 0.8047, 0.8691, 0.8195]}, {"w": "sources.", "b": [0.1312, 0.8225, 0.1953, 0.8376]}, {"w": "Once", "b": [0.2046, 0.8225, 0.2465, 0.8376]}, {"w": "the", "b": [0.253, 0.8225, 0.2792, 0.8376]}, {"w": "model", "b": [0.2857, 0.8225, 0.3354, 0.8376]}, {"w": "is", "b": [0.3419, 0.8225, 0.3545, 0.8376]}, {"w": "ready,", "b": [0.3611, 0.8225, 0.4103, 0.8376]}, {"w": "it", "b": [0.4169, 0.8225, 0.4295, 0.8376]}, {"w": "turns", "b": [0.436, 0.8225, 0.4791, 0.8376]}, {"w": "out", "b": [0.4856, 0.8225, 0.5128, 0.8376]}, {"w": "that", "b": [0.5193, 0.8225, 0.5538, 0.8376]}, {"w": "it’s", "b": [0.5603, 0.8225, 0.5856, 0.8376]}, {"w": "impossible,", "b": [0.5921, 0.8225, 0.6828, 0.8376]}, {"w": "by", "b": [0.6894, 0.8225, 0.7093, 0.8376]}, {"w": "using", "b": [0.7158, 0.8225, 0.7588, 0.8376]}, {"w": "the", "b": [0.7653, 0.8225, 0.7915, 0.8376]}, {"w": "available", "b": [0.798, 0.8225, 0.8692, 0.8376]}, {"w": "production", "b": [0.1312, 0.8405, 0.2193, 0.8555]}, {"w": "infrastructure,", "b": [0.2255, 0.8405, 0.3416, 0.8555]}, {"w": "to", "b": [0.3477, 0.8405, 0.3642, 0.8555]}, {"w": "generate", "b": [0.3703, 0.8405, 0.4383, 0.8555]}, {"w": "input", "b": [0.4445, 0.8405, 0.4877, 0.8555]}, {"w": "examples", "b": [0.4938, 0.8405, 0.5676, 0.8555]}, {"w": "for", "b": [0.5737, 0.8405, 0.5959, 0.8555]}, {"w": "the", "b": [0.602, 0.8405, 0.6278, 0.8555]}, {"w": "model", "b": [0.6339, 0.8405, 0.6828, 0.8555]}, {"w": "fast", "b": [0.6889, 0.8405, 0.7184, 0.8555]}, {"w": "enough", "b": [0.7245, 0.8405, 0.7822, 0.8555]}, {"w": "(or", "b": [0.7883, 0.8405, 0.812, 0.8555]}, {"w": "at", "b": [0.8182, 0.8405, 0.8347, 0.8555]}, {"w": "all).", "b": [0.8408, 0.8405, 0.8727, 0.8555]}, {"w": "We", "b": [0.1303, 0.8585, 0.1559, 0.8734]}, {"w": "extensively", "b": [0.1621, 0.8585, 0.2504, 0.8734]}, {"w": "talk", "b": [0.2565, 0.8585, 0.2878, 0.8734]}, {"w": "about", "b": [0.294, 0.8585, 0.3406, 0.8734]}, {"w": "storing", "b": [0.3468, 0.8585, 0.4023, 0.8734]}, {"w": "data", "b": [0.4085, 0.8585, 0.4443, 0.8734]}, {"w": "and", "b": [0.4505, 0.8585, 0.4802, 0.8734]}, {"w": "features", "b": [0.4864, 0.8585, 0.5496, 0.8734]}, {"w": "in", "b": [0.5558, 0.8585, 0.5711, 0.8734]}, {"w": "Chapters", "b": [0.5773, 0.8585, 0.6502, 0.8734]}, {"w": "3", "b": [0.6564, 0.8585, 0.6656, 0.8734]}, {"w": "and", "b": [0.6718, 0.8585, 0.7015, 0.8734]}, {"w": "4.", "b": [0.7077, 0.8585, 0.722, 0.8734]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "11", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 41, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2.5.4 Data Labeling Challenge", "words": [{"w": "2.5.4", "b": [0.1312, 0.0884, 0.1749, 0.1033]}, {"w": "Data", "b": [0.1961, 0.0884, 0.2412, 0.1033]}, {"w": "Labeling", "b": [0.2483, 0.0884, 0.3277, 0.1033]}, {"w": "Challenge", "b": [0.3347, 0.0884, 0.4258, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "In most machine learning projects, analysts use labeled data. This data is usually custom, so labeling is executed specifically for each project. As of 2019, according to some reports,5 as many as 76% AI and data science teams label training data on their own, while 63% build their own labeling and annotation automation technology.", "words": [{"w": "In", "b": [0.1312, 0.1251, 0.1478, 0.1399]}, {"w": "most", "b": [0.1538, 0.1251, 0.1921, 0.1399]}, {"w": "machine", "b": [0.1981, 0.1251, 0.2629, 0.1399]}, {"w": "learning", "b": [0.2689, 0.1251, 0.3322, 0.1399]}, {"w": "projects,", "b": [0.3382, 0.1251, 0.4057, 0.1399]}, {"w": "analysts", "b": [0.4117, 0.1251, 0.4758, 0.1399]}, {"w": "use", "b": [0.4817, 0.1251, 0.507, 0.1399]}, {"w": "labeled", "b": [0.513, 0.1251, 0.5688, 0.1399]}, {"w": "data.", "b": [0.5747, 0.1251, 0.6149, 0.1399]}, {"w": "This", "b": [0.6231, 0.1251, 0.6584, 0.1399]}, {"w": "data", "b": [0.6643, 0.1251, 0.6995, 0.1399]}, {"w": "is", "b": [0.7055, 0.1251, 0.7177, 0.1399]}, {"w": "usually", "b": [0.7237, 0.1251, 0.7795, 0.1399]}, {"w": "custom,", "b": [0.7855, 0.1251, 0.8469, 0.1399]}, {"w": "so", "b": [0.8529, 0.1251, 0.8691, 0.1399]}, {"w": "labeling", "b": [0.1312, 0.1429, 0.1942, 0.1579]}, {"w": "is", "b": [0.2004, 0.1429, 0.2128, 0.1579]}, {"w": "executed", "b": [0.2189, 0.1429, 0.2891, 0.1579]}, {"w": "specifically", "b": [0.2952, 0.1429, 0.3824, 0.1579]}, {"w": "for", "b": [0.3886, 0.1429, 0.4106, 0.1579]}, {"w": "each", "b": [0.4168, 0.1429, 0.4521, 0.1579]}, {"w": "project.", "b": [0.4583, 0.1429, 0.5198, 0.1579]}, {"w": "As", "b": [0.528, 0.1429, 0.5491, 0.1579]}, {"w": "of", "b": [0.5552, 0.1429, 0.5701, 0.1579]}, {"w": "2019,", "b": [0.5762, 0.1429, 0.6182, 0.1579]}, {"w": "according", "b": [0.6243, 0.1429, 0.7012, 0.1579]}, {"w": "to", "b": [0.7073, 0.1429, 0.7237, 0.1579]}, {"w": "some", "b": [0.7299, 0.1429, 0.7699, 0.1579]}, {"w": "reports,5", "b": [0.7761, 0.141, 0.8452, 0.1579]}, {"w": "as", "b": [0.8523, 0.1429, 0.8688, 0.1579]}, {"w": "many", "b": [0.1312, 0.1608, 0.1757, 0.1758]}, {"w": "as", "b": [0.1819, 0.1608, 0.1986, 0.1758]}, {"w": "76%", "b": [0.2047, 0.1608, 0.2389, 0.1758]}, {"w": "AI", "b": [0.245, 0.1608, 0.2657, 0.1758]}, {"w": "and", "b": [0.2719, 0.1608, 0.3019, 0.1758]}, {"w": "data", "b": [0.3081, 0.1608, 0.3443, 0.1758]}, {"w": "science", "b": [0.3505, 0.1608, 0.4065, 0.1758]}, {"w": "teams", "b": [0.4127, 0.1608, 0.4604, 0.1758]}, {"w": "label", "b": [0.4665, 0.1608, 0.5054, 0.1758]}, {"w": "training", "b": [0.5115, 0.1608, 0.5758, 0.1758]}, {"w": "data", "b": [0.582, 0.1608, 0.6182, 0.1758]}, {"w": "on", "b": [0.6244, 0.1608, 0.644, 0.1758]}, {"w": "their", "b": [0.6502, 0.1608, 0.6886, 0.1758]}, {"w": "own,", "b": [0.6947, 0.1608, 0.7325, 0.1758]}, {"w": "while", "b": [0.7387, 0.1608, 0.7811, 0.1758]}, {"w": "63%", "b": [0.787, 0.1608, 0.8212, 0.1758]}, {"w": "build", "b": [0.8274, 0.1608, 0.8688, 0.1758]}, {"w": "their", "b": [0.1312, 0.1788, 0.1692, 0.1938]}, {"w": "own", "b": [0.1754, 0.1788, 0.2077, 0.1938]}, {"w": "labeling", "b": [0.2138, 0.1788, 0.2769, 0.1938]}, {"w": "and", "b": [0.2831, 0.1788, 0.3128, 0.1938]}, {"w": "annotation", "b": [0.3189, 0.1788, 0.4061, 0.1938]}, {"w": "automation", "b": [0.4122, 0.1788, 0.5045, 0.1938]}, {"w": "technology.", "b": [0.5106, 0.1788, 0.6004, 0.1938]}]}, {"id": "b_2", "type": "paragraph", "text": "This results in a significant time spent by skilled data scientists on data labeling and labeling tool development. This is a major challenge for the effective execution of an AI project.", "words": [{"w": "This", "b": [0.1306, 0.2059, 0.1658, 0.2207]}, {"w": "results", "b": [0.1717, 0.2059, 0.2232, 0.2207]}, {"w": "in", "b": [0.2291, 0.2059, 0.2442, 0.2207]}, {"w": "a", "b": [0.25, 0.2059, 0.2591, 0.2207]}, {"w": "significant", "b": [0.2649, 0.2059, 0.3449, 0.2207]}, {"w": "time", "b": [0.3508, 0.2059, 0.3859, 0.2207]}, {"w": "spent", "b": [0.3918, 0.2059, 0.4341, 0.2207]}, {"w": "by", "b": [0.44, 0.2059, 0.4591, 0.2207]}, {"w": "skilled", "b": [0.4649, 0.2059, 0.5148, 0.2207]}, {"w": "data", "b": [0.5206, 0.2059, 0.5558, 0.2207]}, {"w": "scientists", "b": [0.5617, 0.2059, 0.6328, 0.2207]}, {"w": "on", "b": [0.6387, 0.2059, 0.6578, 0.2207]}, {"w": "data", "b": [0.6636, 0.2059, 0.6988, 0.2207]}, {"w": "labeling", "b": [0.7047, 0.2059, 0.7665, 0.2207]}, {"w": "and", "b": [0.7723, 0.2059, 0.8015, 0.2207]}, {"w": "labeling", "b": [0.8073, 0.2059, 0.8691, 0.2207]}, {"w": "tool", "b": [0.1312, 0.2237, 0.1625, 0.2386]}, {"w": "development.", "b": [0.1686, 0.2237, 0.2748, 0.2386]}, {"w": "This", "b": [0.283, 0.2237, 0.319, 0.2386]}, {"w": "is", "b": [0.3251, 0.2237, 0.3376, 0.2386]}, {"w": "a", "b": [0.3437, 0.2237, 0.3529, 0.2386]}, {"w": "major", "b": [0.3591, 0.2237, 0.4063, 0.2386]}, {"w": "challenge", "b": [0.4124, 0.2237, 0.4858, 0.2386]}, {"w": "for", "b": [0.4919, 0.2237, 0.514, 0.2386]}, {"w": "the", "b": [0.5202, 0.2237, 0.5458, 0.2386]}, {"w": "effective", "b": [0.552, 0.2237, 0.6171, 0.2386]}, {"w": "execution", "b": [0.6232, 0.2237, 0.6996, 0.2386]}, {"w": "of", "b": [0.7058, 0.2237, 0.7207, 0.2386]}, {"w": "an", "b": [0.7268, 0.2237, 0.7463, 0.2386]}, {"w": "AI", "b": [0.7524, 0.2237, 0.7729, 0.2386]}, {"w": "project.", "b": [0.7791, 0.2237, 0.8407, 0.2386]}]}, {"id": "b_3", "type": "paragraph", "text": "Some companies outsource data labeling to third-party vendors. However, without proper quality validation, such labeled data can turn out to be of low quality or entirely wrong. Organizations, in order to maintain quality and consistency across datasets, have to invest in formal and standardized training of internal or third-party labelers. This, in turn, can slow down machine learning projects. Though, according to the same reports, companies that outsource data labeling are more likely to get their machine learning projects up to production.", "words": [{"w": "Some", "b": [0.1312, 0.2505, 0.175, 0.2656]}, {"w": "companies", "b": [0.1811, 0.2505, 0.2657, 0.2656]}, {"w": "outsource", "b": [0.2718, 0.2505, 0.3502, 0.2656]}, {"w": "data", "b": [0.3564, 0.2505, 0.3928, 0.2656]}, {"w": "labeling", "b": [0.399, 0.2505, 0.4631, 0.2656]}, {"w": "to", "b": [0.4692, 0.2505, 0.4859, 0.2656]}, {"w": "third-party", "b": [0.492, 0.2505, 0.5829, 0.2656]}, {"w": "vendors.", "b": [0.589, 0.2505, 0.657, 0.2656]}, {"w": "However,", "b": [0.6652, 0.2505, 0.7398, 0.2656]}, {"w": "without", "b": [0.7459, 0.2505, 0.8095, 0.2656]}, {"w": "proper", "b": [0.8156, 0.2505, 0.8695, 0.2656]}, {"w": "quality", "b": [0.1312, 0.2684, 0.1883, 0.2835]}, {"w": "validation,", "b": [0.1953, 0.2684, 0.2816, 0.2835]}, {"w": "such", "b": [0.2889, 0.2684, 0.3251, 0.2835]}, {"w": "labeled", "b": [0.3322, 0.2684, 0.3902, 0.2835]}, {"w": "data", "b": [0.3973, 0.2684, 0.4339, 0.2835]}, {"w": "can", "b": [0.441, 0.2684, 0.4692, 0.2835]}, {"w": "turn", "b": [0.4763, 0.2684, 0.5119, 0.2835]}, {"w": "out", "b": [0.5189, 0.2684, 0.5461, 0.2835]}, {"w": "to", "b": [0.5532, 0.2684, 0.5699, 0.2835]}, {"w": "be", "b": [0.577, 0.2684, 0.5963, 0.2835]}, {"w": "of", "b": [0.6034, 0.2684, 0.6186, 0.2835]}, {"w": "low", "b": [0.6256, 0.2684, 0.6533, 0.2835]}, {"w": "quality", "b": [0.6604, 0.2684, 0.7174, 0.2835]}, {"w": "or", "b": [0.7245, 0.2684, 0.7413, 0.2835]}, {"w": "entirely", "b": [0.7483, 0.2684, 0.8101, 0.2835]}, {"w": "wrong.", "b": [0.8172, 0.2684, 0.8727, 0.2835]}, {"w": "Organizations,", "b": [0.1312, 0.2866, 0.246, 0.3014]}, {"w": "in", "b": [0.252, 0.2866, 0.2671, 0.3014]}, {"w": "order", "b": [0.2731, 0.2866, 0.3144, 0.3014]}, {"w": "to", "b": [0.3204, 0.2866, 0.3365, 0.3014]}, {"w": "maintain", "b": [0.3425, 0.2866, 0.4123, 0.3014]}, {"w": "quality", "b": [0.4183, 0.2866, 0.4731, 0.3014]}, {"w": "and", "b": [0.4791, 0.2866, 0.5082, 0.3014]}, {"w": "consistency", "b": [0.5142, 0.2866, 0.6034, 0.3014]}, {"w": "across", "b": [0.6094, 0.2866, 0.6569, 0.3014]}, {"w": "datasets,", "b": [0.6629, 0.2866, 0.7324, 0.3014]}, {"w": "have", "b": [0.7385, 0.2866, 0.7741, 0.3014]}, {"w": "to", "b": [0.7801, 0.2866, 0.7962, 0.3014]}, {"w": "invest", "b": [0.8022, 0.2866, 0.848, 0.3014]}, {"w": "in", "b": [0.854, 0.2866, 0.8691, 0.3014]}, {"w": "formal", "b": [0.1312, 0.3044, 0.1831, 0.3194]}, {"w": "and", "b": [0.1893, 0.3044, 0.219, 0.3194]}, {"w": "standardized", "b": [0.2252, 0.3044, 0.328, 0.3194]}, {"w": "training", "b": [0.3342, 0.3044, 0.3979, 0.3194]}, {"w": "of", "b": [0.4041, 0.3044, 0.4189, 0.3194]}, {"w": "internal", "b": [0.4251, 0.3044, 0.4873, 0.3194]}, {"w": "or", "b": [0.4934, 0.3044, 0.5099, 0.3194]}, {"w": "third-party", "b": [0.5161, 0.3044, 0.6055, 0.3194]}, {"w": "labelers.", "b": [0.6116, 0.3044, 0.678, 0.3194]}, {"w": "This,", "b": [0.6863, 0.3044, 0.7274, 0.3194]}, {"w": "in", "b": [0.7336, 0.3044, 0.749, 0.3194]}, {"w": "turn,", "b": [0.7551, 0.3044, 0.7952, 0.3194]}, {"w": "can", "b": [0.8014, 0.3044, 0.8291, 0.3194]}, {"w": "slow", "b": [0.8353, 0.3044, 0.8698, 0.3194]}, {"w": "down", "b": [0.1312, 0.3223, 0.1746, 0.3374]}, {"w": "machine", "b": [0.1813, 0.3223, 0.2488, 0.3374]}, {"w": "learning", "b": [0.2555, 0.3223, 0.3215, 0.3374]}, {"w": "projects.", "b": [0.3282, 0.3223, 0.3984, 0.3374]}, {"w": "Though,", "b": [0.4083, 0.3223, 0.4773, 0.3374]}, {"w": "according", "b": [0.4841, 0.3223, 0.5626, 0.3374]}, {"w": "to", "b": [0.5693, 0.3223, 0.5861, 0.3374]}, {"w": "the", "b": [0.5928, 0.3223, 0.6189, 0.3374]}, {"w": "same", "b": [0.6256, 0.3223, 0.6665, 0.3374]}, {"w": "reports,", "b": [0.6732, 0.3223, 0.7367, 0.3374]}, {"w": "companies", "b": [0.7436, 0.3223, 0.8284, 0.3374]}, {"w": "that", "b": [0.8351, 0.3223, 0.8696, 0.3374]}, {"w": "outsource", "b": [0.1312, 0.3405, 0.2068, 0.3553]}, {"w": "data", "b": [0.2117, 0.3405, 0.2468, 0.3553]}, {"w": "labeling", "b": [0.2517, 0.3405, 0.3136, 0.3553]}, {"w": "are", "b": [0.3184, 0.3405, 0.3426, 0.3553]}, {"w": "more", "b": [0.3475, 0.3405, 0.3867, 0.3553]}, {"w": "likely", "b": [0.3916, 0.3405, 0.4334, 0.3553]}, {"w": "to", "b": [0.4382, 0.3405, 0.4543, 0.3553]}, {"w": "get", "b": [0.4592, 0.3405, 0.4833, 0.3553]}, {"w": "their", "b": [0.4882, 0.3405, 0.5255, 0.3553]}, {"w": "machine", "b": [0.5304, 0.3405, 0.5952, 0.3553]}, {"w": "learning", "b": [0.6001, 0.3405, 0.6634, 0.3553]}, {"w": "projects", "b": [0.6683, 0.3405, 0.7308, 0.3553]}, {"w": "up", "b": [0.7357, 0.3405, 0.7558, 0.3553]}, {"w": "to", "b": [0.7607, 0.3405, 0.7768, 0.3553]}, {"w": "production.", "b": [0.7817, 0.3405, 0.8727, 0.3553]}]}, {"id": "b_4", "type": "paragraph", "text": "2.5.5 Siloed Organizations and Lack of Collaboration", "words": [{"w": "2.5.5", "b": [0.1312, 0.3881, 0.1749, 0.4031]}, {"w": "Siloed", "b": [0.1961, 0.3881, 0.2524, 0.4031]}, {"w": "Organizations", "b": [0.2595, 0.3881, 0.3874, 0.4031]}, {"w": "and", "b": [0.3945, 0.3881, 0.4284, 0.4031]}, {"w": "Lack", "b": [0.4355, 0.3881, 0.4786, 0.4031]}, {"w": "of", "b": [0.4856, 0.3881, 0.5027, 0.4031]}, {"w": "Collaboration", "b": [0.5098, 0.3881, 0.6364, 0.4031]}]}, {"id": "b_5", "type": "paragraph", "text": "Data needed for a machine learning project often resides within an organization in different places with different ownership, security constraints, and in different formats. In siloed organizations, people responsible for different data assets might not know one another. Lack of trust and collaboration results in friction when one department needs access to the data stored in a different department. Furthermore, different branches of one organization often have their own budgets, so collaboration becomes complicated because no side has an interest in spending their budget helping to the other side.", "words": [{"w": "Data", "b": [0.1312, 0.4248, 0.1708, 0.4397]}, {"w": "needed", "b": [0.177, 0.4248, 0.2322, 0.4397]}, {"w": "for", "b": [0.2384, 0.4248, 0.2604, 0.4397]}, {"w": "a", "b": [0.2666, 0.4248, 0.2758, 0.4397]}, {"w": "machine", "b": [0.282, 0.4248, 0.3479, 0.4397]}, {"w": "learning", "b": [0.3541, 0.4248, 0.4185, 0.4397]}, {"w": "project", "b": [0.4247, 0.4248, 0.481, 0.4397]}, {"w": "often", "b": [0.4872, 0.4248, 0.5276, 0.4397]}, {"w": "resides", "b": [0.5337, 0.4248, 0.5872, 0.4397]}, {"w": "within", "b": [0.5934, 0.4248, 0.6445, 0.4397]}, {"w": "an", "b": [0.6506, 0.4248, 0.6701, 0.4397]}, {"w": "organization", "b": [0.6762, 0.4248, 0.7754, 0.4397]}, {"w": "in", "b": [0.7816, 0.4248, 0.797, 0.4397]}, {"w": "different", "b": [0.8031, 0.4248, 0.8696, 0.4397]}, {"w": "places", "b": [0.1312, 0.4426, 0.1805, 0.4577]}, {"w": "with", "b": [0.1883, 0.4426, 0.2249, 0.4577]}, {"w": "different", "b": [0.2327, 0.4426, 0.3008, 0.4577]}, {"w": "ownership,", "b": [0.3086, 0.4426, 0.3961, 0.4577]}, {"w": "security", "b": [0.4043, 0.4426, 0.4683, 0.4577]}, {"w": "constraints,", "b": [0.4761, 0.4426, 0.571, 0.4577]}, {"w": "and", "b": [0.5792, 0.4426, 0.6096, 0.4577]}, {"w": "in", "b": [0.6173, 0.4426, 0.633, 0.4577]}, {"w": "different", "b": [0.6408, 0.4426, 0.7089, 0.4577]}, {"w": "formats.", "b": [0.7167, 0.4426, 0.7843, 0.4577]}, {"w": "In", "b": [0.7974, 0.4426, 0.8147, 0.4577]}, {"w": "siloed", "b": [0.8225, 0.4426, 0.8692, 0.4577]}, {"w": "organizations,", "b": [0.1312, 0.4607, 0.2416, 0.4756]}, {"w": "people", "b": [0.2477, 0.4607, 0.2988, 0.4756]}, {"w": "responsible", "b": [0.305, 0.4607, 0.3927, 0.4756]}, {"w": "for", "b": [0.3989, 0.4607, 0.4207, 0.4756]}, {"w": "different", "b": [0.4269, 0.4607, 0.4926, 0.4756]}, {"w": "data", "b": [0.4988, 0.4607, 0.5342, 0.4756]}, {"w": "assets", "b": [0.5403, 0.4607, 0.5861, 0.4756]}, {"w": "might", "b": [0.5923, 0.4607, 0.6383, 0.4756]}, {"w": "not", "b": [0.6444, 0.4607, 0.6707, 0.4756]}, {"w": "know", "b": [0.6769, 0.4607, 0.7183, 0.4756]}, {"w": "one", "b": [0.7245, 0.4607, 0.7518, 0.4756]}, {"w": "another.", "b": [0.7579, 0.4607, 0.8237, 0.4756]}, {"w": "Lack", "b": [0.8319, 0.4607, 0.8696, 0.4756]}, {"w": "of", "b": [0.1312, 0.4786, 0.1462, 0.4936]}, {"w": "trust", "b": [0.1523, 0.4786, 0.1917, 0.4936]}, {"w": "and", "b": [0.1978, 0.4786, 0.2278, 0.4936]}, {"w": "collaboration", "b": [0.2339, 0.4786, 0.3397, 0.4936]}, {"w": "results", "b": [0.3458, 0.4786, 0.3987, 0.4936]}, {"w": "in", "b": [0.4049, 0.4786, 0.4203, 0.4936]}, {"w": "friction", "b": [0.4265, 0.4786, 0.4848, 0.4936]}, {"w": "when", "b": [0.491, 0.4786, 0.5333, 0.4936]}, {"w": "one", "b": [0.5394, 0.4786, 0.5673, 0.4936]}, {"w": "department", "b": [0.5734, 0.4786, 0.6668, 0.4936]}, {"w": "needs", "b": [0.673, 0.4786, 0.7175, 0.4936]}, {"w": "access", "b": [0.7236, 0.4786, 0.7723, 0.4936]}, {"w": "to", "b": [0.7785, 0.4786, 0.795, 0.4936]}, {"w": "the", "b": [0.8011, 0.4786, 0.8269, 0.4936]}, {"w": "data", "b": [0.8331, 0.4786, 0.8692, 0.4936]}, {"w": "stored", "b": [0.1312, 0.4965, 0.1809, 0.5115]}, {"w": "in", "b": [0.187, 0.4965, 0.2025, 0.5115]}, {"w": "a", "b": [0.2086, 0.4965, 0.2179, 0.5115]}, {"w": "different", "b": [0.2241, 0.4965, 0.2912, 0.5115]}, {"w": "department.", "b": [0.2973, 0.4965, 0.3959, 0.5115]}, {"w": "Furthermore,", "b": [0.4041, 0.4965, 0.5107, 0.5115]}, {"w": "different", "b": [0.5169, 0.4965, 0.584, 0.5115]}, {"w": "branches", "b": [0.5901, 0.4965, 0.661, 0.5115]}, {"w": "of", "b": [0.6671, 0.4965, 0.682, 0.5115]}, {"w": "one", "b": [0.6882, 0.4965, 0.716, 0.5115]}, {"w": "organization", "b": [0.7221, 0.4965, 0.8223, 0.5115]}, {"w": "often", "b": [0.8284, 0.4965, 0.8691, 0.5115]}, {"w": "have", "b": [0.1312, 0.5146, 0.1669, 0.5294]}, {"w": "their", "b": [0.1725, 0.5146, 0.2098, 0.5294]}, {"w": "own", "b": [0.2154, 0.5146, 0.247, 0.5294]}, {"w": "budgets,", "b": [0.2526, 0.5146, 0.3191, 0.5294]}, {"w": "so", "b": [0.3248, 0.5146, 0.341, 0.5294]}, {"w": "collaboration", "b": [0.3466, 0.5146, 0.4497, 0.5294]}, {"w": "becomes", "b": [0.4553, 0.5146, 0.5212, 0.5294]}, {"w": "complicated", "b": [0.5269, 0.5146, 0.6213, 0.5294]}, {"w": "because", "b": [0.627, 0.5146, 0.6879, 0.5294]}, {"w": "no", "b": [0.6935, 0.5146, 0.7126, 0.5294]}, {"w": "side", "b": [0.7182, 0.5146, 0.7485, 0.5294]}, {"w": "has", "b": [0.7541, 0.5146, 0.7804, 0.5294]}, {"w": "an", "b": [0.786, 0.5146, 0.8051, 0.5294]}, {"w": "interest", "b": [0.8107, 0.5146, 0.8697, 0.5294]}, {"w": "in", "b": [0.1312, 0.5324, 0.1466, 0.5474]}, {"w": "spending", "b": [0.1528, 0.5324, 0.2242, 0.5474]}, {"w": "their", "b": [0.2303, 0.5324, 0.2683, 0.5474]}, {"w": "budget", "b": [0.2745, 0.5324, 0.3298, 0.5474]}, {"w": "helping", "b": [0.336, 0.5324, 0.3944, 0.5474]}, {"w": "to", "b": [0.4006, 0.5324, 0.417, 0.5474]}, {"w": "the", "b": [0.4232, 0.5324, 0.4488, 0.5474]}, {"w": "other", "b": [0.4549, 0.5324, 0.497, 0.5474]}, {"w": "side.", "b": [0.5032, 0.5324, 0.5392, 0.5474]}]}, {"id": "b_6", "type": "paragraph", "text": "Even within one branch of an organization, there are often several teams involved in a machine learning project at different stages. For example, the data engineering team provides access to the data or individual features, the data science team works on modeling, ETL or DevOps work on the engineering aspects of deployment and monitoring, while the automation and internal tools teams develop tools and processes for a continuous model update. Lack of collaboration between any pair of the involved teams might result in the project being frozen for a long time. Typical reasons for mistrust between teams is the lack of understanding by the engineers of the tools and approaches used by the scientists and the lack of knowledge (or plain ignorance) by the scientists of software engineering good practices and design patterns.", "words": [{"w": "Even", "b": [0.1312, 0.5595, 0.1707, 0.5743]}, {"w": "within", "b": [0.1755, 0.5595, 0.2258, 0.5743]}, {"w": "one", "b": [0.2307, 0.5595, 0.2578, 0.5743]}, {"w": "branch", "b": [0.2627, 0.5595, 0.3165, 0.5743]}, {"w": "of", "b": [0.3214, 0.5595, 0.336, 0.5743]}, {"w": "an", "b": [0.3408, 0.5595, 0.3599, 0.5743]}, {"w": "organization,", "b": [0.3648, 0.5595, 0.4674, 0.5743]}, {"w": "there", "b": [0.4725, 0.5595, 0.5128, 0.5743]}, {"w": "are", "b": [0.5176, 0.5595, 0.5418, 0.5743]}, {"w": "often", "b": [0.5467, 0.5595, 0.5864, 0.5743]}, {"w": "several", "b": [0.5913, 0.5595, 0.6447, 0.5743]}, {"w": "teams", "b": [0.6496, 0.5595, 0.6959, 0.5743]}, {"w": "involved", "b": [0.7008, 0.5595, 0.7656, 0.5743]}, {"w": "in", "b": [0.7704, 0.5595, 0.7855, 0.5743]}, {"w": "a", "b": [0.7904, 0.5595, 0.7994, 0.5743]}, {"w": "machine", "b": [0.8043, 0.5595, 0.8691, 0.5743]}, {"w": "learning", "b": [0.1312, 0.5773, 0.1957, 0.5923]}, {"w": "project", "b": [0.2018, 0.5773, 0.2582, 0.5923]}, {"w": "at", "b": [0.2643, 0.5773, 0.2806, 0.5923]}, {"w": "different", "b": [0.2868, 0.5773, 0.3533, 0.5923]}, {"w": "stages.", "b": [0.3594, 0.5773, 0.4128, 0.5923]}, {"w": "For", "b": [0.421, 0.5773, 0.4479, 0.5923]}, {"w": "example,", "b": [0.454, 0.5773, 0.5251, 0.5923]}, {"w": "the", "b": [0.5312, 0.5773, 0.5568, 0.5923]}, {"w": "data", "b": [0.563, 0.5773, 0.5987, 0.5923]}, {"w": "engineering", "b": [0.6049, 0.5773, 0.6959, 0.5923]}, {"w": "team", "b": [0.7021, 0.5773, 0.7419, 0.5923]}, {"w": "provides", "b": [0.7481, 0.5773, 0.8147, 0.5923]}, {"w": "access", "b": [0.8209, 0.5773, 0.8691, 0.5923]}, {"w": "to", "b": [0.1312, 0.5954, 0.1473, 0.6102]}, {"w": "the", "b": [0.1532, 0.5954, 0.1784, 0.6102]}, {"w": "data", "b": [0.1843, 0.5954, 0.2194, 0.6102]}, {"w": "or", "b": [0.2253, 0.5954, 0.2415, 0.6102]}, {"w": "individual", "b": [0.2474, 0.5954, 0.3263, 0.6102]}, {"w": "features,", "b": [0.3322, 0.5954, 0.3992, 0.6102]}, {"w": "the", "b": [0.4051, 0.5954, 0.4303, 0.6102]}, {"w": "data", "b": [0.4362, 0.5954, 0.4714, 0.6102]}, {"w": "science", "b": [0.4773, 0.5954, 0.5317, 0.6102]}, {"w": "team", "b": [0.5376, 0.5954, 0.5768, 0.6102]}, {"w": "works", "b": [0.5827, 0.5954, 0.628, 0.6102]}, {"w": "on", "b": [0.634, 0.5954, 0.653, 0.6102]}, {"w": "modeling,", "b": [0.659, 0.5954, 0.7358, 0.6102]}, {"w": "ETL", "b": [0.7418, 0.5954, 0.7785, 0.6102]}, {"w": "or", "b": [0.7844, 0.5954, 0.8005, 0.6102]}, {"w": "DevOps", "b": [0.8064, 0.5954, 0.8691, 0.6102]}, {"w": "work", "b": [0.1306, 0.6131, 0.1702, 0.6282]}, {"w": "on", "b": [0.1764, 0.6131, 0.1962, 0.6282]}, {"w": "the", "b": [0.2023, 0.6131, 0.2284, 0.6282]}, {"w": "engineering", "b": [0.2345, 0.6131, 0.3273, 0.6282]}, {"w": "aspects", "b": [0.3335, 0.6131, 0.3926, 0.6282]}, {"w": "of", "b": [0.3987, 0.6131, 0.4139, 0.6282]}, {"w": "deployment", "b": [0.42, 0.6131, 0.5143, 0.6282]}, {"w": "and", "b": [0.5205, 0.6131, 0.5507, 0.6282]}, {"w": "monitoring,", "b": [0.5569, 0.6131, 0.6517, 0.6282]}, {"w": "while", "b": [0.6579, 0.6131, 0.7006, 0.6282]}, {"w": "the", "b": [0.7067, 0.6131, 0.7328, 0.6282]}, {"w": "automation", "b": [0.739, 0.6131, 0.8327, 0.6282]}, {"w": "and", "b": [0.8389, 0.6131, 0.8691, 0.6282]}, {"w": "internal", "b": [0.1312, 0.631, 0.1946, 0.6461]}, {"w": "tools", "b": [0.2016, 0.631, 0.2409, 0.6461]}, {"w": "teams", "b": [0.2479, 0.631, 0.2961, 0.6461]}, {"w": "develop", "b": [0.3031, 0.631, 0.3648, 0.6461]}, {"w": "tools", "b": [0.3718, 0.631, 0.4111, 0.6461]}, {"w": "and", "b": [0.4181, 0.631, 0.4484, 0.6461]}, {"w": "processes", "b": [0.4554, 0.631, 0.5306, 0.6461]}, {"w": "for", "b": [0.5375, 0.631, 0.5601, 0.6461]}, {"w": "a", "b": [0.5671, 0.631, 0.5765, 0.6461]}, {"w": "continuous", "b": [0.5835, 0.631, 0.6714, 0.6461]}, {"w": "model", "b": [0.6784, 0.631, 0.7281, 0.6461]}, {"w": "update.", "b": [0.7351, 0.631, 0.7973, 0.6461]}, {"w": "Lack", "b": [0.808, 0.631, 0.847, 0.6461]}, {"w": "of", "b": [0.8539, 0.631, 0.8691, 0.6461]}, {"w": "collaboration", "b": [0.1312, 0.6492, 0.2343, 0.664]}, {"w": "between", "b": [0.2403, 0.6492, 0.3042, 0.664]}, {"w": "any", "b": [0.3102, 0.6492, 0.3383, 0.664]}, {"w": "pair", "b": [0.3444, 0.6492, 0.3756, 0.664]}, {"w": "of", "b": [0.3816, 0.6492, 0.3962, 0.664]}, {"w": "the", "b": [0.4023, 0.6492, 0.4274, 0.664]}, {"w": "involved", "b": [0.4334, 0.6492, 0.4982, 0.664]}, {"w": "teams", "b": [0.5043, 0.6492, 0.5506, 0.664]}, {"w": "might", "b": [0.5567, 0.6492, 0.6024, 0.664]}, {"w": "result", "b": [0.6084, 0.6492, 0.6528, 0.664]}, {"w": "in", "b": [0.6589, 0.6492, 0.6739, 0.664]}, {"w": "the", "b": [0.68, 0.6492, 0.7051, 0.664]}, {"w": "project", "b": [0.7112, 0.6492, 0.7665, 0.664]}, {"w": "being", "b": [0.7726, 0.6492, 0.8153, 0.664]}, {"w": "frozen", "b": [0.8213, 0.6492, 0.8691, 0.664]}, {"w": "for", "b": [0.1312, 0.6671, 0.1533, 0.682]}, {"w": "a", "b": [0.1594, 0.6671, 0.1686, 0.682]}, {"w": "long", "b": [0.1748, 0.6671, 0.2085, 0.682]}, {"w": "time.", "b": [0.2147, 0.6671, 0.2556, 0.682]}, {"w": "Typical", "b": [0.2638, 0.6671, 0.3241, 0.682]}, {"w": "reasons", "b": [0.3303, 0.6671, 0.3888, 0.682]}, {"w": "for", "b": [0.395, 0.6671, 0.417, 0.682]}, {"w": "mistrust", "b": [0.4232, 0.6671, 0.4899, 0.682]}, {"w": "between", "b": [0.496, 0.6671, 0.561, 0.682]}, {"w": "teams", "b": [0.5671, 0.6671, 0.6143, 0.682]}, {"w": "is", "b": [0.6204, 0.6671, 0.6328, 0.682]}, {"w": "the", "b": [0.639, 0.6671, 0.6645, 0.682]}, {"w": "lack", "b": [0.6707, 0.6671, 0.7024, 0.682]}, {"w": "of", "b": [0.7085, 0.6671, 0.7234, 0.682]}, {"w": "understanding", "b": [0.7295, 0.6671, 0.8442, 0.682]}, {"w": "by", "b": [0.8504, 0.6671, 0.8698, 0.682]}, {"w": "the", "b": [0.1312, 0.6851, 0.1564, 0.6999]}, {"w": "engineers", "b": [0.1621, 0.6851, 0.2346, 0.6999]}, {"w": "of", "b": [0.2404, 0.6851, 0.2549, 0.6999]}, {"w": "the", "b": [0.2607, 0.6851, 0.2858, 0.6999]}, {"w": "tools", "b": [0.2915, 0.6851, 0.3293, 0.6999]}, {"w": "and", "b": [0.3351, 0.6851, 0.3642, 0.6999]}, {"w": "approaches", "b": [0.3699, 0.6851, 0.457, 0.6999]}, {"w": "used", "b": [0.4627, 0.6851, 0.498, 0.6999]}, {"w": "by", "b": [0.5038, 0.6851, 0.5229, 0.6999]}, {"w": "the", "b": [0.5286, 0.6851, 0.5537, 0.6999]}, {"w": "scientists", "b": [0.5594, 0.6851, 0.6306, 0.6999]}, {"w": "and", "b": [0.6363, 0.6851, 0.6655, 0.6999]}, {"w": "the", "b": [0.6712, 0.6851, 0.6964, 0.6999]}, {"w": "lack", "b": [0.7021, 0.6851, 0.7332, 0.6999]}, {"w": "of", "b": [0.739, 0.6851, 0.7535, 0.6999]}, {"w": "knowledge", "b": [0.7593, 0.6851, 0.8406, 0.6999]}, {"w": "(or", "b": [0.8464, 0.6851, 0.8695, 0.6999]}, {"w": "plain", "b": [0.1312, 0.703, 0.1707, 0.7179]}, {"w": "ignorance)", "b": [0.1769, 0.703, 0.2599, 0.7179]}, {"w": "by", "b": [0.2661, 0.703, 0.2853, 0.7179]}, {"w": "the", "b": [0.2914, 0.703, 0.3168, 0.7179]}, {"w": "scientists", "b": [0.3229, 0.703, 0.3946, 0.7179]}, {"w": "of", "b": [0.4007, 0.703, 0.4154, 0.7179]}, {"w": "software", "b": [0.4215, 0.703, 0.487, 0.7179]}, {"w": "engineering", "b": [0.4931, 0.703, 0.5833, 0.7179]}, {"w": "good", "b": [0.5894, 0.703, 0.6279, 0.7179]}, {"w": "practices", "b": [0.634, 0.703, 0.704, 0.7179]}, {"w": "and", "b": [0.7102, 0.703, 0.7395, 0.7179]}, {"w": "design", "b": [0.7457, 0.703, 0.7954, 0.7179]}, {"w": "patterns.", "b": [0.8015, 0.703, 0.8726, 0.7179]}]}, {"id": "b_7", "type": "paragraph", "text": "2.5.6 Technically Infeasible Projects", "words": [{"w": "2.5.6", "b": [0.1312, 0.7507, 0.1749, 0.7657]}, {"w": "Technically", "b": [0.1961, 0.7507, 0.2999, 0.7657]}, {"w": "Infeasible", "b": [0.3069, 0.7507, 0.395, 0.7657]}, {"w": "Projects", "b": [0.4021, 0.7507, 0.4787, 0.7657]}]}, {"id": "b_8", "type": "paragraph", "text": "Because of the high cost of many machine learning projects (due to high expertise and infrastructure cost) some organizations, to “recoup the investment,” might target very ambitious goals: to completely transform the organization or the product or provide unrealistic", "words": [{"w": "Because", "b": [0.1312, 0.7872, 0.197, 0.8024]}, {"w": "of", "b": [0.2049, 0.7872, 0.2201, 0.8024]}, {"w": "the", "b": [0.2281, 0.7872, 0.2542, 0.8024]}, {"w": "high", "b": [0.2622, 0.7872, 0.2978, 0.8024]}, {"w": "cost", "b": [0.3057, 0.7872, 0.3383, 0.8024]}, {"w": "of", "b": [0.3462, 0.7872, 0.3614, 0.8024]}, {"w": "many", "b": [0.3694, 0.7872, 0.4143, 0.8024]}, {"w": "machine", "b": [0.4223, 0.7872, 0.4898, 0.8024]}, {"w": "learning", "b": [0.4977, 0.7872, 0.5637, 0.8024]}, {"w": "projects", "b": [0.5717, 0.7872, 0.6367, 0.8024]}, {"w": "(due", "b": [0.6446, 0.7872, 0.6813, 0.8024]}, {"w": "to", "b": [0.6892, 0.7872, 0.7059, 0.8024]}, {"w": "high", "b": [0.7139, 0.7872, 0.7495, 0.8024]}, {"w": "expertise", "b": [0.7574, 0.7872, 0.8308, 0.8024]}, {"w": "and", "b": [0.8388, 0.7872, 0.8691, 0.8024]}, {"w": "infrastructure", "b": [0.1312, 0.8052, 0.244, 0.8203]}, {"w": "cost)", "b": [0.2528, 0.8052, 0.2927, 0.8203]}, {"w": "some", "b": [0.3015, 0.8052, 0.3424, 0.8203]}, {"w": "organizations,", "b": [0.3512, 0.8052, 0.4654, 0.8203]}, {"w": "to", "b": [0.4749, 0.8052, 0.4916, 0.8203]}, {"w": "“recoup", "b": [0.5004, 0.8052, 0.5638, 0.8203]}, {"w": "the", "b": [0.5726, 0.8052, 0.5987, 0.8203]}, {"w": "investment,”", "b": [0.6076, 0.8052, 0.7107, 0.8203]}, {"w": "might", "b": [0.7202, 0.8052, 0.7678, 0.8203]}, {"w": "target", "b": [0.7766, 0.8052, 0.8259, 0.8203]}, {"w": "very", "b": [0.8347, 0.8052, 0.8698, 0.8203]}, {"w": "ambitious", "b": [0.1312, 0.8234, 0.2082, 0.8382]}, {"w": "goals:", "b": [0.2127, 0.8234, 0.257, 0.8382]}, {"w": "to", "b": [0.2644, 0.8234, 0.2804, 0.8382]}, {"w": "completely", "b": [0.2849, 0.8234, 0.3698, 0.8382]}, {"w": "transform", "b": [0.3743, 0.8234, 0.4514, 0.8382]}, {"w": "the", "b": [0.4559, 0.8234, 0.481, 0.8382]}, {"w": "organization", "b": [0.4855, 0.8234, 0.583, 0.8382]}, {"w": "or", "b": [0.5875, 0.8234, 0.6036, 0.8382]}, {"w": "the", "b": [0.6081, 0.8234, 0.6333, 0.8382]}, {"w": "product", "b": [0.6377, 0.8234, 0.6996, 0.8382]}, {"w": "or", "b": [0.7041, 0.8234, 0.7202, 0.8382]}, {"w": "provide", "b": [0.7247, 0.8234, 0.783, 0.8382]}, {"w": "unrealistic", "b": [0.7875, 0.8234, 0.8691, 0.8382]}]}, {"id": "b_9", "type": "paragraph", "text": "5Alegion and Dimensional Research, “What data scientists tell us about AI model training today,” 2019.", "words": [{"w": "5Alegion", "b": [0.1518, 0.85, 0.211, 0.8639]}, {"w": "and", "b": [0.2162, 0.8519, 0.2414, 0.8639]}, {"w": "Dimensional", "b": [0.2466, 0.8519, 0.3305, 0.8639]}, {"w": "Research,", "b": [0.3357, 0.8519, 0.4006, 0.8639]}, {"w": "“What", "b": [0.4058, 0.8519, 0.4517, 0.8639]}, {"w": "data", "b": [0.457, 0.8519, 0.4873, 0.8639]}, {"w": "scientists", "b": [0.4925, 0.8519, 0.5539, 0.8639]}, {"w": "tell", "b": [0.5591, 0.8519, 0.5808, 0.8639]}, {"w": "us", "b": [0.586, 0.8519, 0.6008, 0.8639]}, {"w": "about", "b": [0.6061, 0.8519, 0.6455, 0.8639]}, {"w": "AI", "b": [0.6507, 0.8519, 0.668, 0.8639]}, {"w": "model", "b": [0.6732, 0.8519, 0.7144, 0.8639]}, {"w": "training", "b": [0.7196, 0.8519, 0.7734, 0.8639]}, {"w": "today,”", "b": [0.7786, 0.8519, 0.8276, 0.8639]}, {"w": "2019.", "b": [0.8328, 0.8519, 0.8683, 0.8639]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "12", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 42, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "return or investment. This results in very large-scale projects, involving collaboration between multiple teams, departments, and third-parties, and pushing those teams to their limits.", "words": [{"w": "return", "b": [0.1312, 0.0885, 0.1806, 0.1033]}, {"w": "or", "b": [0.1857, 0.0885, 0.2018, 0.1033]}, {"w": "investment.", "b": [0.2069, 0.0885, 0.2974, 0.1033]}, {"w": "This", "b": [0.3053, 0.0885, 0.3406, 0.1033]}, {"w": "results", "b": [0.3457, 0.0885, 0.3972, 0.1033]}, {"w": "in", "b": [0.4023, 0.0885, 0.4174, 0.1033]}, {"w": "very", "b": [0.4225, 0.0885, 0.4562, 0.1033]}, {"w": "large-scale", "b": [0.4613, 0.0885, 0.5428, 0.1033]}, {"w": "projects,", "b": [0.5479, 0.0885, 0.6154, 0.1033]}, {"w": "involving", "b": [0.6208, 0.0885, 0.6921, 0.1033]}, {"w": "collaboration", "b": [0.6972, 0.0885, 0.8003, 0.1033]}, {"w": "between", "b": [0.8054, 0.0885, 0.8692, 0.1033]}, {"w": "multiple", "b": [0.1312, 0.1063, 0.1974, 0.1213]}, {"w": "teams,", "b": [0.2035, 0.1063, 0.2559, 0.1213]}, {"w": "departments,", "b": [0.2621, 0.1063, 0.3673, 0.1213]}, {"w": "and", "b": [0.3735, 0.1063, 0.4032, 0.1213]}, {"w": "third-parties,", "b": [0.4094, 0.1063, 0.5152, 0.1213]}, {"w": "and", "b": [0.5214, 0.1063, 0.5511, 0.1213]}, {"w": "pushing", "b": [0.5572, 0.1063, 0.6199, 0.1213]}, {"w": "those", "b": [0.6261, 0.1063, 0.6682, 0.1213]}, {"w": "teams", "b": [0.6744, 0.1063, 0.7216, 0.1213]}, {"w": "to", "b": [0.7278, 0.1063, 0.7442, 0.1213]}, {"w": "their", "b": [0.7503, 0.1063, 0.7883, 0.1213]}, {"w": "limits.", "b": [0.7945, 0.1063, 0.8448, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "As a result, such overly ambitious projects could take months or even years to complete; some key players, including leaders and key scientists, might lose interest in the project or even leave the organization. The project could eventually be deprioritized, or, even when completed, be too late to the market. It is best, at least in the beginning, to focus on achievable projects, involving simple collaboration between teams, easy to scope, and targeting a simple business objective.", "words": [{"w": "As", "b": [0.1305, 0.1334, 0.1512, 0.1482]}, {"w": "a", "b": [0.1567, 0.1334, 0.1657, 0.1482]}, {"w": "result,", "b": [0.1712, 0.1334, 0.2206, 0.1482]}, {"w": "such", "b": [0.2262, 0.1334, 0.261, 0.1482]}, {"w": "overly", "b": [0.2665, 0.1334, 0.3137, 0.1482]}, {"w": "ambitious", "b": [0.3192, 0.1334, 0.3962, 0.1482]}, {"w": "projects", "b": [0.4016, 0.1334, 0.4641, 0.1482]}, {"w": "could", "b": [0.4696, 0.1334, 0.5118, 0.1482]}, {"w": "take", "b": [0.5172, 0.1334, 0.5504, 0.1482]}, {"w": "months", "b": [0.5559, 0.1334, 0.6137, 0.1482]}, {"w": "or", "b": [0.6192, 0.1334, 0.6353, 0.1482]}, {"w": "even", "b": [0.6408, 0.1334, 0.676, 0.1482]}, {"w": "years", "b": [0.6814, 0.1334, 0.7218, 0.1482]}, {"w": "to", "b": [0.7272, 0.1334, 0.7433, 0.1482]}, {"w": "complete;", "b": [0.7488, 0.1334, 0.8241, 0.1482]}, {"w": "some", "b": [0.8298, 0.1334, 0.8691, 0.1482]}, {"w": "key", "b": [0.1312, 0.1513, 0.1579, 0.1661]}, {"w": "players,", "b": [0.1627, 0.1513, 0.2226, 0.1661]}, {"w": "including", "b": [0.2277, 0.1513, 0.3001, 0.1661]}, {"w": "leaders", "b": [0.305, 0.1513, 0.3594, 0.1661]}, {"w": "and", "b": [0.3643, 0.1513, 0.3934, 0.1661]}, {"w": "key", "b": [0.3982, 0.1513, 0.4249, 0.1661]}, {"w": "scientists,", "b": [0.4297, 0.1513, 0.5059, 0.1661]}, {"w": "might", "b": [0.511, 0.1513, 0.5567, 0.1661]}, {"w": "lose", "b": [0.5616, 0.1513, 0.5908, 0.1661]}, {"w": "interest", "b": [0.5957, 0.1513, 0.6546, 0.1661]}, {"w": "in", "b": [0.6594, 0.1513, 0.6745, 0.1661]}, {"w": "the", "b": [0.6794, 0.1513, 0.7045, 0.1661]}, {"w": "project", "b": [0.7094, 0.1513, 0.7647, 0.1661]}, {"w": "or", "b": [0.7695, 0.1513, 0.7857, 0.1661]}, {"w": "even", "b": [0.7905, 0.1513, 0.8257, 0.1661]}, {"w": "leave", "b": [0.8305, 0.1513, 0.8692, 0.1661]}, {"w": "the", "b": [0.1312, 0.1693, 0.1564, 0.1841]}, {"w": "organization.", "b": [0.1625, 0.1693, 0.2652, 0.1841]}, {"w": "The", "b": [0.2734, 0.1693, 0.3045, 0.1841]}, {"w": "project", "b": [0.3107, 0.1693, 0.3661, 0.1841]}, {"w": "could", "b": [0.3722, 0.1693, 0.4145, 0.1841]}, {"w": "eventually", "b": [0.4206, 0.1693, 0.5011, 0.1841]}, {"w": "be", "b": [0.5072, 0.1693, 0.5258, 0.1841]}, {"w": "deprioritized,", "b": [0.532, 0.1693, 0.6367, 0.1841]}, {"w": "or,", "b": [0.6428, 0.1693, 0.664, 0.1841]}, {"w": "even", "b": [0.6702, 0.1693, 0.7054, 0.1841]}, {"w": "when", "b": [0.7115, 0.1693, 0.7528, 0.1841]}, {"w": "completed,", "b": [0.7589, 0.1693, 0.8444, 0.1841]}, {"w": "be", "b": [0.8505, 0.1693, 0.8692, 0.1841]}, {"w": "too", "b": [0.1312, 0.1871, 0.1575, 0.2021]}, {"w": "late", "b": [0.1637, 0.1871, 0.1936, 0.2021]}, {"w": "to", "b": [0.1997, 0.1871, 0.2162, 0.2021]}, {"w": "the", "b": [0.2223, 0.1871, 0.2481, 0.2021]}, {"w": "market.", "b": [0.2543, 0.1871, 0.3162, 0.2021]}, {"w": "It", "b": [0.3244, 0.1871, 0.3383, 0.2021]}, {"w": "is", "b": [0.3445, 0.1871, 0.357, 0.2021]}, {"w": "best,", "b": [0.3631, 0.1871, 0.4019, 0.2021]}, {"w": "at", "b": [0.408, 0.1871, 0.4245, 0.2021]}, {"w": "least", "b": [0.4307, 0.1871, 0.4679, 0.2021]}, {"w": "in", "b": [0.4741, 0.1871, 0.4895, 0.2021]}, {"w": "the", "b": [0.4957, 0.1871, 0.5215, 0.2021]}, {"w": "beginning,", "b": [0.5276, 0.1871, 0.6117, 0.2021]}, {"w": "to", "b": [0.6178, 0.1871, 0.6343, 0.2021]}, {"w": "focus", "b": [0.6405, 0.1871, 0.6818, 0.2021]}, {"w": "on", "b": [0.688, 0.1871, 0.7076, 0.2021]}, {"w": "achievable", "b": [0.7137, 0.1871, 0.7963, 0.2021]}, {"w": "projects,", "b": [0.8024, 0.1871, 0.8717, 0.2021]}, {"w": "involving", "b": [0.1312, 0.2051, 0.2028, 0.22]}, {"w": "simple", "b": [0.2089, 0.2051, 0.2594, 0.22]}, {"w": "collaboration", "b": [0.2656, 0.2051, 0.3689, 0.22]}, {"w": "between", "b": [0.3751, 0.2051, 0.4391, 0.22]}, {"w": "teams,", "b": [0.4452, 0.2051, 0.4967, 0.22]}, {"w": "easy", "b": [0.5029, 0.2051, 0.5367, 0.22]}, {"w": "to", "b": [0.5429, 0.2051, 0.559, 0.22]}, {"w": "scope,", "b": [0.5651, 0.2051, 0.6132, 0.22]}, {"w": "and", "b": [0.6193, 0.2051, 0.6485, 0.22]}, {"w": "targeting", "b": [0.6547, 0.2051, 0.7263, 0.22]}, {"w": "a", "b": [0.7324, 0.2051, 0.7415, 0.22]}, {"w": "simple", "b": [0.7476, 0.2051, 0.7981, 0.22]}, {"w": "business", "b": [0.8043, 0.2051, 0.8691, 0.22]}, {"w": "objective.", "b": [0.1312, 0.223, 0.2082, 0.238]}]}, {"id": "b_2", "type": "paragraph", "text": "2.5.7 Lack of Alignment Between Technical and Business Teams", "words": [{"w": "2.5.7", "b": [0.1312, 0.2708, 0.1749, 0.2858]}, {"w": "Lack", "b": [0.1961, 0.2708, 0.2392, 0.2858]}, {"w": "of", "b": [0.2463, 0.2708, 0.2633, 0.2858]}, {"w": "Alignment", "b": [0.2704, 0.2708, 0.3675, 0.2858]}, {"w": "Between", "b": [0.3746, 0.2708, 0.453, 0.2858]}, {"w": "Technical", "b": [0.4601, 0.2708, 0.5468, 0.2858]}, {"w": "and", "b": [0.5539, 0.2708, 0.5877, 0.2858]}, {"w": "Business", "b": [0.5948, 0.2708, 0.6742, 0.2858]}, {"w": "Teams", "b": [0.6813, 0.2708, 0.7404, 0.2858]}]}, {"id": "b_3", "type": "paragraph", "text": "Many machine learning projects start without a clear understanding, by the technical team, of the business objective. Scientists usually frame the problem as classification or regression with a technical objective, such as high accuracy or low mean squared error. Without continuous feedback from the business team on the achievement of a business objective (such as an increased click-through rate or user retention), the scientists often reach an initial level of model performance (according to the technical objective), and then they are not sure if they are making any useful progress and whether an additional effort is worth it. In such situations, the projects end up being put on the shelf because time and resources were spent but the business team didn’t accept the result.", "words": [{"w": "Many", "b": [0.1312, 0.3075, 0.1759, 0.3223]}, {"w": "machine", "b": [0.1811, 0.3075, 0.2459, 0.3223]}, {"w": "learning", "b": [0.251, 0.3075, 0.3144, 0.3223]}, {"w": "projects", "b": [0.3195, 0.3075, 0.382, 0.3223]}, {"w": "start", "b": [0.3871, 0.3075, 0.4244, 0.3223]}, {"w": "without", "b": [0.4296, 0.3075, 0.4909, 0.3223]}, {"w": "a", "b": [0.496, 0.3075, 0.505, 0.3223]}, {"w": "clear", "b": [0.5101, 0.3075, 0.5474, 0.3223]}, {"w": "understanding,", "b": [0.5525, 0.3075, 0.6703, 0.3223]}, {"w": "by", "b": [0.6756, 0.3075, 0.6947, 0.3223]}, {"w": "the", "b": [0.6998, 0.3075, 0.7249, 0.3223]}, {"w": "technical", "b": [0.7301, 0.3075, 0.7999, 0.3223]}, {"w": "team,", "b": [0.805, 0.3075, 0.8492, 0.3223]}, {"w": "of", "b": [0.8546, 0.3075, 0.8691, 0.3223]}, {"w": "the", "b": [0.1312, 0.3255, 0.1564, 0.3403]}, {"w": "business", "b": [0.1614, 0.3255, 0.2261, 0.3403]}, {"w": "objective.", "b": [0.2312, 0.3255, 0.3066, 0.3403]}, {"w": "Scientists", "b": [0.3144, 0.3255, 0.3885, 0.3403]}, {"w": "usually", "b": [0.3936, 0.3255, 0.4494, 0.3403]}, {"w": "frame", "b": [0.4545, 0.3255, 0.4993, 0.3403]}, {"w": "the", "b": [0.5044, 0.3255, 0.5295, 0.3403]}, {"w": "problem", "b": [0.5346, 0.3255, 0.5989, 0.3403]}, {"w": "as", "b": [0.604, 0.3255, 0.6202, 0.3403]}, {"w": "classification", "b": [0.6253, 0.3255, 0.725, 0.3403]}, {"w": "or", "b": [0.7301, 0.3255, 0.7462, 0.3403]}, {"w": "regression", "b": [0.7513, 0.3255, 0.829, 0.3403]}, {"w": "with", "b": [0.834, 0.3255, 0.8692, 0.3403]}, {"w": "a", "b": [0.1312, 0.3434, 0.1404, 0.3583]}, {"w": "technical", "b": [0.1465, 0.3434, 0.2171, 0.3583]}, {"w": "objective,", "b": [0.2233, 0.3434, 0.2994, 0.3583]}, {"w": "such", "b": [0.3056, 0.3434, 0.3407, 0.3583]}, {"w": "as", "b": [0.3469, 0.3434, 0.3633, 0.3583]}, {"w": "high", "b": [0.3694, 0.3434, 0.404, 0.3583]}, {"w": "accuracy", "b": [0.4101, 0.3434, 0.4797, 0.3583]}, {"w": "or", "b": [0.4859, 0.3434, 0.5022, 0.3583]}, {"w": "low", "b": [0.5084, 0.3434, 0.5353, 0.3583]}, {"w": "mean", "b": [0.5414, 0.3434, 0.5841, 0.3583]}, {"w": "squared", "b": [0.5902, 0.3434, 0.6518, 0.3583]}, {"w": "error.", "b": [0.658, 0.3434, 0.7018, 0.3583]}, {"w": "Without", "b": [0.7101, 0.3434, 0.7776, 0.3583]}, {"w": "continuous", "b": [0.7838, 0.3434, 0.8691, 0.3583]}, {"w": "feedback", "b": [0.1312, 0.3611, 0.2019, 0.3762]}, {"w": "from", "b": [0.2092, 0.3611, 0.2475, 0.3762]}, {"w": "the", "b": [0.2548, 0.3611, 0.281, 0.3762]}, {"w": "business", "b": [0.2883, 0.3611, 0.3556, 0.3762]}, {"w": "team", "b": [0.363, 0.3611, 0.4037, 0.3762]}, {"w": "on", "b": [0.4111, 0.3611, 0.431, 0.3762]}, {"w": "the", "b": [0.4383, 0.3611, 0.4645, 0.3762]}, {"w": "achievement", "b": [0.4719, 0.3611, 0.5723, 0.3762]}, {"w": "of", "b": [0.5797, 0.3611, 0.5948, 0.3762]}, {"w": "a", "b": [0.6022, 0.3611, 0.6116, 0.3762]}, {"w": "business", "b": [0.619, 0.3611, 0.6863, 0.3762]}, {"w": "objective", "b": [0.6936, 0.3611, 0.7668, 0.3762]}, {"w": "(such", "b": [0.7742, 0.3611, 0.8177, 0.3762]}, {"w": "as", "b": [0.8251, 0.3611, 0.8419, 0.3762]}, {"w": "an", "b": [0.8493, 0.3611, 0.8692, 0.3762]}, {"w": "increased", "b": [0.1312, 0.3791, 0.2067, 0.3942]}, {"w": "click-through", "b": [0.2129, 0.3791, 0.3207, 0.3942]}, {"w": "rate", "b": [0.3269, 0.3791, 0.3594, 0.3942]}, {"w": "or", "b": [0.3656, 0.3791, 0.3824, 0.3942]}, {"w": "user", "b": [0.3886, 0.3791, 0.4222, 0.3942]}, {"w": "retention),", "b": [0.4284, 0.3791, 0.5148, 0.3942]}, {"w": "the", "b": [0.521, 0.3791, 0.5472, 0.3942]}, {"w": "scientists", "b": [0.5533, 0.3791, 0.6274, 0.3942]}, {"w": "often", "b": [0.6336, 0.3791, 0.6749, 0.3942]}, {"w": "reach", "b": [0.6812, 0.3791, 0.7246, 0.3942]}, {"w": "an", "b": [0.7308, 0.3791, 0.7507, 0.3942]}, {"w": "initial", "b": [0.7569, 0.3791, 0.805, 0.3942]}, {"w": "level", "b": [0.8112, 0.3791, 0.8478, 0.3942]}, {"w": "of", "b": [0.854, 0.3791, 0.8692, 0.3942]}, {"w": "model", "b": [0.1312, 0.3972, 0.1793, 0.4121]}, {"w": "performance", "b": [0.1854, 0.3972, 0.2837, 0.4121]}, {"w": "(according", "b": [0.2899, 0.3972, 0.3729, 0.4121]}, {"w": "to", "b": [0.379, 0.3972, 0.3952, 0.4121]}, {"w": "the", "b": [0.4014, 0.3972, 0.4267, 0.4121]}, {"w": "technical", "b": [0.4328, 0.3972, 0.5032, 0.4121]}, {"w": "objective),", "b": [0.5093, 0.3972, 0.5923, 0.4121]}, {"w": "and", "b": [0.5984, 0.3972, 0.6278, 0.4121]}, {"w": "then", "b": [0.6339, 0.3972, 0.6694, 0.4121]}, {"w": "they", "b": [0.6755, 0.3972, 0.7104, 0.4121]}, {"w": "are", "b": [0.7165, 0.3972, 0.7409, 0.4121]}, {"w": "not", "b": [0.747, 0.3972, 0.7733, 0.4121]}, {"w": "sure", "b": [0.7795, 0.3972, 0.812, 0.4121]}, {"w": "if", "b": [0.8181, 0.3972, 0.8288, 0.4121]}, {"w": "they", "b": [0.8349, 0.3972, 0.8698, 0.4121]}, {"w": "are", "b": [0.1312, 0.4152, 0.1554, 0.43]}, {"w": "making", "b": [0.1605, 0.4152, 0.2183, 0.43]}, {"w": "any", "b": [0.2234, 0.4152, 0.2515, 0.43]}, {"w": "useful", "b": [0.2566, 0.4152, 0.3024, 0.43]}, {"w": "progress", "b": [0.3075, 0.4152, 0.3722, 0.43]}, {"w": "and", "b": [0.3773, 0.4152, 0.4064, 0.43]}, {"w": "whether", "b": [0.4115, 0.4152, 0.4749, 0.43]}, {"w": "an", "b": [0.48, 0.4152, 0.4991, 0.43]}, {"w": "additional", "b": [0.5041, 0.4152, 0.5835, 0.43]}, {"w": "effort", "b": [0.5886, 0.4152, 0.6304, 0.43]}, {"w": "is", "b": [0.6355, 0.4152, 0.6476, 0.43]}, {"w": "worth", "b": [0.6527, 0.4152, 0.6985, 0.43]}, {"w": "it.", "b": [0.7036, 0.4152, 0.7207, 0.43]}, {"w": "In", "b": [0.7285, 0.4152, 0.7451, 0.43]}, {"w": "such", "b": [0.7502, 0.4152, 0.785, 0.43]}, {"w": "situations,", "b": [0.7901, 0.4152, 0.8717, 0.43]}, {"w": "the", "b": [0.1312, 0.4329, 0.1574, 0.448]}, {"w": "projects", "b": [0.1636, 0.4329, 0.2287, 0.448]}, {"w": "end", "b": [0.2349, 0.4329, 0.2642, 0.448]}, {"w": "up", "b": [0.2705, 0.4329, 0.2914, 0.448]}, {"w": "being", "b": [0.2976, 0.4329, 0.3421, 0.448]}, {"w": "put", "b": [0.3483, 0.4329, 0.3766, 0.448]}, {"w": "on", "b": [0.3828, 0.4329, 0.4027, 0.448]}, {"w": "the", "b": [0.409, 0.4329, 0.4351, 0.448]}, {"w": "shelf", "b": [0.4414, 0.4329, 0.4786, 0.448]}, {"w": "because", "b": [0.4849, 0.4329, 0.5483, 0.448]}, {"w": "time", "b": [0.5545, 0.4329, 0.5911, 0.448]}, {"w": "and", "b": [0.5974, 0.4329, 0.6277, 0.448]}, {"w": "resources", "b": [0.634, 0.4329, 0.7086, 0.448]}, {"w": "were", "b": [0.7148, 0.4329, 0.752, 0.448]}, {"w": "spent", "b": [0.7583, 0.4329, 0.8023, 0.448]}, {"w": "but", "b": [0.8086, 0.4329, 0.8368, 0.448]}, {"w": "the", "b": [0.8431, 0.4329, 0.8692, 0.448]}, {"w": "business", "b": [0.1312, 0.451, 0.1972, 0.466]}, {"w": "team", "b": [0.2034, 0.451, 0.2433, 0.466]}, {"w": "didn’t", "b": [0.2495, 0.451, 0.2977, 0.466]}, {"w": "accept", "b": [0.3038, 0.451, 0.3551, 0.466]}, {"w": "the", "b": [0.3613, 0.451, 0.3869, 0.466]}, {"w": "result.", "b": [0.3931, 0.451, 0.4435, 0.466]}]}, {"id": "b_4", "type": "paragraph", "text": "2.6 Summary", "words": [{"w": "2.6", "b": [0.1312, 0.4995, 0.1631, 0.5175]}, {"w": "Summary", "b": [0.188, 0.4995, 0.2927, 0.5175]}]}, {"id": "b_5", "type": "paragraph", "text": "Before a machine learning project starts, it must be prioritized, and the team working on the project must be built. The key considerations in the prioritization of a machine learning project, are impact and cost.", "words": [{"w": "Before", "b": [0.1312, 0.5383, 0.1838, 0.5534]}, {"w": "a", "b": [0.1902, 0.5383, 0.1996, 0.5534]}, {"w": "machine", "b": [0.2059, 0.5383, 0.2734, 0.5534]}, {"w": "learning", "b": [0.2798, 0.5383, 0.3457, 0.5534]}, {"w": "project", "b": [0.3521, 0.5383, 0.4096, 0.5534]}, {"w": "starts,", "b": [0.416, 0.5383, 0.4675, 0.5534]}, {"w": "it", "b": [0.4739, 0.5383, 0.4864, 0.5534]}, {"w": "must", "b": [0.4928, 0.5383, 0.5332, 0.5534]}, {"w": "be", "b": [0.5395, 0.5383, 0.5589, 0.5534]}, {"w": "prioritized,", "b": [0.5652, 0.5383, 0.6553, 0.5534]}, {"w": "and", "b": [0.6617, 0.5383, 0.692, 0.5534]}, {"w": "the", "b": [0.6984, 0.5383, 0.7245, 0.5534]}, {"w": "team", "b": [0.7309, 0.5383, 0.7716, 0.5534]}, {"w": "working", "b": [0.778, 0.5383, 0.8429, 0.5534]}, {"w": "on", "b": [0.8492, 0.5383, 0.8691, 0.5534]}, {"w": "the", "b": [0.1312, 0.5564, 0.1565, 0.5713]}, {"w": "project", "b": [0.1627, 0.5564, 0.2184, 0.5713]}, {"w": "must", "b": [0.2246, 0.5564, 0.2636, 0.5713]}, {"w": "be", "b": [0.2698, 0.5564, 0.2885, 0.5713]}, {"w": "built.", "b": [0.2946, 0.5564, 0.3371, 0.5713]}, {"w": "The", "b": [0.3453, 0.5564, 0.3767, 0.5713]}, {"w": "key", "b": [0.3829, 0.5564, 0.4097, 0.5713]}, {"w": "considerations", "b": [0.4158, 0.5564, 0.5284, 0.5713]}, {"w": "in", "b": [0.5346, 0.5564, 0.5498, 0.5713]}, {"w": "the", "b": [0.5559, 0.5564, 0.5812, 0.5713]}, {"w": "prioritization", "b": [0.5873, 0.5564, 0.6917, 0.5713]}, {"w": "of", "b": [0.6978, 0.5564, 0.7125, 0.5713]}, {"w": "a", "b": [0.7187, 0.5564, 0.7278, 0.5713]}, {"w": "machine", "b": [0.7339, 0.5564, 0.7992, 0.5713]}, {"w": "learning", "b": [0.8053, 0.5564, 0.8691, 0.5713]}, {"w": "project,", "b": [0.1312, 0.5743, 0.1928, 0.5893]}, {"w": "are", "b": [0.199, 0.5743, 0.2236, 0.5893]}, {"w": "impact", "b": [0.2298, 0.5743, 0.2852, 0.5893]}, {"w": "and", "b": [0.2913, 0.5743, 0.321, 0.5893]}, {"w": "cost.", "b": [0.3272, 0.5743, 0.3642, 0.5893]}]}, {"id": "b_6", "type": "paragraph", "text": "The impact of using machine learning is high when, 1) machine learning can replace a complex part in your engineering project, or 2) there’s a great benefit in getting inexpensive (but probably imperfect) predictions.", "words": [{"w": "The", "b": [0.1306, 0.6013, 0.1617, 0.6162]}, {"w": "impact", "b": [0.1668, 0.6013, 0.2211, 0.6162]}, {"w": "of", "b": [0.2261, 0.6013, 0.2407, 0.6162]}, {"w": "using", "b": [0.2458, 0.6013, 0.2871, 0.6162]}, {"w": "machine", "b": [0.2922, 0.6013, 0.357, 0.6162]}, {"w": "learning", "b": [0.3621, 0.6013, 0.4254, 0.6162]}, {"w": "is", "b": [0.4305, 0.6013, 0.4427, 0.6162]}, {"w": "high", "b": [0.4478, 0.6013, 0.4819, 0.6162]}, {"w": "when,", "b": [0.487, 0.6013, 0.5332, 0.6162]}, {"w": "1)", "b": [0.5385, 0.6013, 0.5546, 0.6162]}, {"w": "machine", "b": [0.5597, 0.6013, 0.6245, 0.6162]}, {"w": "learning", "b": [0.6296, 0.6013, 0.6929, 0.6162]}, {"w": "can", "b": [0.698, 0.6013, 0.7252, 0.6162]}, {"w": "replace", "b": [0.7302, 0.6013, 0.7856, 0.6162]}, {"w": "a", "b": [0.7906, 0.6013, 0.7997, 0.6162]}, {"w": "complex", "b": [0.8048, 0.6013, 0.8696, 0.6162]}, {"w": "part", "b": [0.1312, 0.6191, 0.1658, 0.6342]}, {"w": "in", "b": [0.1727, 0.6191, 0.1884, 0.6342]}, {"w": "your", "b": [0.1953, 0.6191, 0.232, 0.6342]}, {"w": "engineering", "b": [0.2389, 0.6191, 0.3321, 0.6342]}, {"w": "project,", "b": [0.339, 0.6191, 0.4018, 0.6342]}, {"w": "or", "b": [0.409, 0.6191, 0.4257, 0.6342]}, {"w": "2)", "b": [0.4327, 0.6191, 0.4494, 0.6342]}, {"w": "there’s", "b": [0.4563, 0.6191, 0.5109, 0.6342]}, {"w": "a", "b": [0.5178, 0.6191, 0.5272, 0.6342]}, {"w": "great", "b": [0.5341, 0.6191, 0.576, 0.6342]}, {"w": "benefit", "b": [0.5829, 0.6191, 0.6389, 0.6342]}, {"w": "in", "b": [0.6458, 0.6191, 0.6615, 0.6342]}, {"w": "getting", "b": [0.6685, 0.6191, 0.726, 0.6342]}, {"w": "inexpensive", "b": [0.7329, 0.6191, 0.8272, 0.6342]}, {"w": "(but", "b": [0.8341, 0.6191, 0.8697, 0.6342]}, {"w": "probably", "b": [0.1312, 0.6371, 0.2026, 0.6521]}, {"w": "imperfect)", "b": [0.2087, 0.6371, 0.2918, 0.6521]}, {"w": "predictions.", "b": [0.298, 0.6371, 0.3915, 0.6521]}]}, {"id": "b_7", "type": "paragraph", "text": "The cost of the machine learning project is highly influenced by three factors: 1) the difficulty of the problem, 2) the cost of data, and 3) the needed model performance quality.", "words": [{"w": "The", "b": [0.1306, 0.6642, 0.1617, 0.679]}, {"w": "cost", "b": [0.1673, 0.6642, 0.1985, 0.679]}, {"w": "of", "b": [0.2041, 0.6642, 0.2186, 0.679]}, {"w": "the", "b": [0.2242, 0.6642, 0.2493, 0.679]}, {"w": "machine", "b": [0.2549, 0.6642, 0.3197, 0.679]}, {"w": "learning", "b": [0.3252, 0.6642, 0.3886, 0.679]}, {"w": "project", "b": [0.3941, 0.6642, 0.4495, 0.679]}, {"w": "is", "b": [0.455, 0.6642, 0.4672, 0.679]}, {"w": "highly", "b": [0.4727, 0.6642, 0.5214, 0.679]}, {"w": "influenced", "b": [0.527, 0.6642, 0.6064, 0.679]}, {"w": "by", "b": [0.612, 0.6642, 0.631, 0.679]}, {"w": "three", "b": [0.6366, 0.6642, 0.6768, 0.679]}, {"w": "factors:", "b": [0.6824, 0.6642, 0.7403, 0.679]}, {"w": "1)", "b": [0.7482, 0.6642, 0.7643, 0.679]}, {"w": "the", "b": [0.7699, 0.6642, 0.795, 0.679]}, {"w": "difficulty", "b": [0.8005, 0.6642, 0.8699, 0.679]}, {"w": "of", "b": [0.1312, 0.682, 0.1461, 0.6969]}, {"w": "the", "b": [0.1522, 0.682, 0.1779, 0.6969]}, {"w": "problem,", "b": [0.1841, 0.682, 0.2548, 0.6969]}, {"w": "2)", "b": [0.261, 0.682, 0.2774, 0.6969]}, {"w": "the", "b": [0.2836, 0.682, 0.3092, 0.6969]}, {"w": "cost", "b": [0.3153, 0.682, 0.3472, 0.6969]}, {"w": "of", "b": [0.3534, 0.682, 0.3683, 0.6969]}, {"w": "data,", "b": [0.3744, 0.682, 0.4154, 0.6969]}, {"w": "and", "b": [0.4216, 0.682, 0.4513, 0.6969]}, {"w": "3)", "b": [0.4575, 0.682, 0.4739, 0.6969]}, {"w": "the", "b": [0.48, 0.682, 0.5057, 0.6969]}, {"w": "needed", "b": [0.5118, 0.682, 0.5672, 0.6969]}, {"w": "model", "b": [0.5734, 0.682, 0.6221, 0.6969]}, {"w": "performance", "b": [0.6282, 0.682, 0.7278, 0.6969]}, {"w": "quality.", "b": [0.7339, 0.682, 0.7934, 0.6969]}]}, {"id": "b_8", "type": "paragraph", "text": "There is no standard method of estimation of how complex a machine learning project is other than by comparison with other projects executed by the organization or reported in the literature. There are several major unknowns that are almost impossible to guess: whether the required level of model performance is attainable in practice, how much data you will need to reach that level of performance, what features and how many features are needed, how large the model should be, and how long will it take to run one experiment and how many experiments will be needed to reach the desired level of performance.", "words": [{"w": "There", "b": [0.1306, 0.7088, 0.1787, 0.7239]}, {"w": "is", "b": [0.1854, 0.7088, 0.1981, 0.7239]}, {"w": "no", "b": [0.2048, 0.7088, 0.2246, 0.7239]}, {"w": "standard", "b": [0.2313, 0.7088, 0.3037, 0.7239]}, {"w": "method", "b": [0.3103, 0.7088, 0.3726, 0.7239]}, {"w": "of", "b": [0.3792, 0.7088, 0.3944, 0.7239]}, {"w": "estimation", "b": [0.4011, 0.7088, 0.4869, 0.7239]}, {"w": "of", "b": [0.4936, 0.7088, 0.5088, 0.7239]}, {"w": "how", "b": [0.5155, 0.7088, 0.5484, 0.7239]}, {"w": "complex", "b": [0.5551, 0.7088, 0.6226, 0.7239]}, {"w": "a", "b": [0.6293, 0.7088, 0.6387, 0.7239]}, {"w": "machine", "b": [0.6454, 0.7088, 0.7128, 0.7239]}, {"w": "learning", "b": [0.7195, 0.7088, 0.7855, 0.7239]}, {"w": "project", "b": [0.7921, 0.7088, 0.8497, 0.7239]}, {"w": "is", "b": [0.8564, 0.7088, 0.8691, 0.7239]}, {"w": "other", "b": [0.1312, 0.727, 0.1725, 0.7418]}, {"w": "than", "b": [0.1781, 0.727, 0.2143, 0.7418]}, {"w": "by", "b": [0.22, 0.727, 0.239, 0.7418]}, {"w": "comparison", "b": [0.2447, 0.727, 0.3343, 0.7418]}, {"w": "with", "b": [0.3399, 0.727, 0.3751, 0.7418]}, {"w": "other", "b": [0.3807, 0.727, 0.422, 0.7418]}, {"w": "projects", "b": [0.4276, 0.727, 0.4901, 0.7418]}, {"w": "executed", "b": [0.4957, 0.727, 0.5646, 0.7418]}, {"w": "by", "b": [0.5703, 0.727, 0.5893, 0.7418]}, {"w": "the", "b": [0.595, 0.727, 0.6201, 0.7418]}, {"w": "organization", "b": [0.6257, 0.727, 0.7233, 0.7418]}, {"w": "or", "b": [0.7289, 0.727, 0.745, 0.7418]}, {"w": "reported", "b": [0.7507, 0.727, 0.8177, 0.7418]}, {"w": "in", "b": [0.8233, 0.727, 0.8384, 0.7418]}, {"w": "the", "b": [0.844, 0.727, 0.8691, 0.7418]}, {"w": "literature.", "b": [0.1312, 0.7448, 0.2117, 0.7598]}, {"w": "There", "b": [0.2198, 0.7448, 0.2673, 0.7598]}, {"w": "are", "b": [0.2734, 0.7448, 0.2982, 0.7598]}, {"w": "several", "b": [0.3043, 0.7448, 0.359, 0.7598]}, {"w": "major", "b": [0.3651, 0.7448, 0.4125, 0.7598]}, {"w": "unknowns", "b": [0.4187, 0.7448, 0.4991, 0.7598]}, {"w": "that", "b": [0.5052, 0.7448, 0.5392, 0.7598]}, {"w": "are", "b": [0.5453, 0.7448, 0.5701, 0.7598]}, {"w": "almost", "b": [0.5762, 0.7448, 0.6298, 0.7598]}, {"w": "impossible", "b": [0.6359, 0.7448, 0.7201, 0.7598]}, {"w": "to", "b": [0.7262, 0.7448, 0.7427, 0.7598]}, {"w": "guess:", "b": [0.7488, 0.7448, 0.7964, 0.7598]}, {"w": "whether", "b": [0.8046, 0.7448, 0.8695, 0.7598]}, {"w": "the", "b": [0.1312, 0.7626, 0.1574, 0.7777]}, {"w": "required", "b": [0.1637, 0.7626, 0.2313, 0.7777]}, {"w": "level", "b": [0.2375, 0.7626, 0.2742, 0.7777]}, {"w": "of", "b": [0.2804, 0.7626, 0.2956, 0.7777]}, {"w": "model", "b": [0.3019, 0.7626, 0.3516, 0.7777]}, {"w": "performance", "b": [0.3578, 0.7626, 0.4594, 0.7777]}, {"w": "is", "b": [0.4657, 0.7626, 0.4783, 0.7777]}, {"w": "attainable", "b": [0.4846, 0.7626, 0.5672, 0.7777]}, {"w": "in", "b": [0.5735, 0.7626, 0.5892, 0.7777]}, {"w": "practice,", "b": [0.5955, 0.7626, 0.6656, 0.7777]}, {"w": "how", "b": [0.6719, 0.7626, 0.7049, 0.7777]}, {"w": "much", "b": [0.7112, 0.7626, 0.7551, 0.7777]}, {"w": "data", "b": [0.7614, 0.7626, 0.798, 0.7777]}, {"w": "you", "b": [0.8042, 0.7626, 0.8335, 0.7777]}, {"w": "will", "b": [0.8398, 0.7626, 0.8691, 0.7777]}, {"w": "need", "b": [0.1312, 0.7806, 0.1688, 0.7957]}, {"w": "to", "b": [0.175, 0.7806, 0.1917, 0.7957]}, {"w": "reach", "b": [0.1978, 0.7806, 0.2412, 0.7957]}, {"w": "that", "b": [0.2473, 0.7806, 0.2818, 0.7957]}, {"w": "level", "b": [0.2879, 0.7806, 0.3245, 0.7957]}, {"w": "of", "b": [0.3306, 0.7806, 0.3457, 0.7957]}, {"w": "performance,", "b": [0.3519, 0.7806, 0.4584, 0.7957]}, {"w": "what", "b": [0.4646, 0.7806, 0.5053, 0.7957]}, {"w": "features", "b": [0.5114, 0.7806, 0.5758, 0.7957]}, {"w": "and", "b": [0.5819, 0.7806, 0.6122, 0.7957]}, {"w": "how", "b": [0.6183, 0.7806, 0.6512, 0.7957]}, {"w": "many", "b": [0.6573, 0.7806, 0.7022, 0.7957]}, {"w": "features", "b": [0.7083, 0.7806, 0.7727, 0.7957]}, {"w": "are", "b": [0.7789, 0.7806, 0.804, 0.7957]}, {"w": "needed,", "b": [0.8101, 0.7806, 0.8717, 0.7957]}, {"w": "how", "b": [0.1312, 0.7985, 0.1642, 0.8136]}, {"w": "large", "b": [0.1706, 0.7985, 0.2104, 0.8136]}, {"w": "the", "b": [0.2169, 0.7985, 0.243, 0.8136]}, {"w": "model", "b": [0.2495, 0.7985, 0.2991, 0.8136]}, {"w": "should", "b": [0.3056, 0.7985, 0.359, 0.8136]}, {"w": "be,", "b": [0.3655, 0.7985, 0.39, 0.8136]}, {"w": "and", "b": [0.3966, 0.7985, 0.4269, 0.8136]}, {"w": "how", "b": [0.4333, 0.7985, 0.4663, 0.8136]}, {"w": "long", "b": [0.4727, 0.7985, 0.5072, 0.8136]}, {"w": "will", "b": [0.5137, 0.7985, 0.543, 0.8136]}, {"w": "it", "b": [0.5494, 0.7985, 0.5619, 0.8136]}, {"w": "take", "b": [0.5684, 0.7985, 0.6029, 0.8136]}, {"w": "to", "b": [0.6094, 0.7985, 0.6261, 0.8136]}, {"w": "run", "b": [0.6325, 0.7985, 0.6608, 0.8136]}, {"w": "one", "b": [0.6673, 0.7985, 0.6955, 0.8136]}, {"w": "experiment", "b": [0.702, 0.7985, 0.7935, 0.8136]}, {"w": "and", "b": [0.8, 0.7985, 0.8303, 0.8136]}, {"w": "how", "b": [0.8368, 0.7985, 0.8697, 0.8136]}, {"w": "many", "b": [0.1312, 0.8166, 0.1753, 0.8315]}, {"w": "experiments", "b": [0.1815, 0.8166, 0.2785, 0.8315]}, {"w": "will", "b": [0.2847, 0.8166, 0.3134, 0.8315]}, {"w": "be", "b": [0.3195, 0.8166, 0.3385, 0.8315]}, {"w": "needed", "b": [0.3447, 0.8166, 0.4001, 0.8315]}, {"w": "to", "b": [0.4062, 0.8166, 0.4226, 0.8315]}, {"w": "reach", "b": [0.4288, 0.8166, 0.4714, 0.8315]}, {"w": "the", "b": [0.4775, 0.8166, 0.5032, 0.8315]}, {"w": "desired", "b": [0.5093, 0.8166, 0.5659, 0.8315]}, {"w": "level", "b": [0.5721, 0.8166, 0.608, 0.8315]}, {"w": "of", "b": [0.6141, 0.8166, 0.629, 0.8315]}, {"w": "performance.", "b": [0.6351, 0.8166, 0.7398, 0.8315]}]}, {"id": "b_9", "type": "paragraph", "text": "One way to make a more educated guess is to simplify the problem and solve a simpler one.", "words": [{"w": "One", "b": [0.1312, 0.8435, 0.1639, 0.8585]}, {"w": "way", "b": [0.1701, 0.8435, 0.2012, 0.8585]}, {"w": "to", "b": [0.2073, 0.8435, 0.2237, 0.8585]}, {"w": "make", "b": [0.2298, 0.8435, 0.2717, 0.8585]}, {"w": "a", "b": [0.2779, 0.8435, 0.287, 0.8585]}, {"w": "more", "b": [0.2932, 0.8435, 0.3331, 0.8585]}, {"w": "educated", "b": [0.3392, 0.8435, 0.4107, 0.8585]}, {"w": "guess", "b": [0.4169, 0.8435, 0.459, 0.8585]}, {"w": "is", "b": [0.4651, 0.8435, 0.4775, 0.8585]}, {"w": "to", "b": [0.4836, 0.8435, 0.5, 0.8585]}, {"w": "simplify", "b": [0.5061, 0.8435, 0.5695, 0.8585]}, {"w": "the", "b": [0.5757, 0.8435, 0.6012, 0.8585]}, {"w": "problem", "b": [0.6074, 0.8435, 0.6728, 0.8585]}, {"w": "and", "b": [0.679, 0.8435, 0.7086, 0.8585]}, {"w": "solve", "b": [0.7147, 0.8435, 0.7536, 0.8585]}, {"w": "a", "b": [0.7598, 0.8435, 0.769, 0.8585]}, {"w": "simpler", "b": [0.7751, 0.8435, 0.8335, 0.8585]}, {"w": "one.", "b": [0.8396, 0.8435, 0.8723, 0.8585]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "13", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 43, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "The progress of a machine learning project is nonlinear. The error usually decreases fast in the beginning, but then the progress slows down. Because of this nonlinearity of progress, it’s better to make sure that the client understands the constraints and the risks. Carefully log every activity and track the time it took. This will help not only in reporting but also in estimating complexity for similar projects in the future.", "words": [{"w": "The", "b": [0.1306, 0.0884, 0.1625, 0.1034]}, {"w": "progress", "b": [0.1686, 0.0884, 0.2348, 0.1034]}, {"w": "of", "b": [0.2409, 0.0884, 0.2558, 0.1034]}, {"w": "a", "b": [0.262, 0.0884, 0.2712, 0.1034]}, {"w": "machine", "b": [0.2774, 0.0884, 0.3438, 0.1034]}, {"w": "learning", "b": [0.3499, 0.0884, 0.4148, 0.1034]}, {"w": "project", "b": [0.4209, 0.0884, 0.4776, 0.1034]}, {"w": "is", "b": [0.4837, 0.0884, 0.4962, 0.1034]}, {"w": "nonlinear.", "b": [0.5023, 0.0884, 0.5826, 0.1034]}, {"w": "The", "b": [0.5909, 0.0884, 0.6227, 0.1034]}, {"w": "error", "b": [0.6289, 0.0884, 0.6681, 0.1034]}, {"w": "usually", "b": [0.6743, 0.0884, 0.7315, 0.1034]}, {"w": "decreases", "b": [0.7376, 0.0884, 0.812, 0.1034]}, {"w": "fast", "b": [0.8182, 0.0884, 0.8476, 0.1034]}, {"w": "in", "b": [0.8537, 0.0884, 0.8692, 0.1034]}, {"w": "the", "b": [0.1312, 0.1062, 0.1574, 0.1213]}, {"w": "beginning,", "b": [0.1635, 0.1062, 0.2488, 0.1213]}, {"w": "but", "b": [0.255, 0.1062, 0.2832, 0.1213]}, {"w": "then", "b": [0.2894, 0.1062, 0.326, 0.1213]}, {"w": "the", "b": [0.3321, 0.1062, 0.3583, 0.1213]}, {"w": "progress", "b": [0.3645, 0.1062, 0.4317, 0.1213]}, {"w": "slows", "b": [0.4379, 0.1062, 0.4805, 0.1213]}, {"w": "down.", "b": [0.4866, 0.1062, 0.5353, 0.1213]}, {"w": "Because", "b": [0.5435, 0.1062, 0.6093, 0.1213]}, {"w": "of", "b": [0.6154, 0.1062, 0.6306, 0.1213]}, {"w": "this", "b": [0.6367, 0.1062, 0.6672, 0.1213]}, {"w": "nonlinearity", "b": [0.6733, 0.1062, 0.7717, 0.1213]}, {"w": "of", "b": [0.7779, 0.1062, 0.7931, 0.1213]}, {"w": "progress,", "b": [0.7992, 0.1062, 0.8717, 0.1213]}, {"w": "it’s", "b": [0.1312, 0.1243, 0.156, 0.1392]}, {"w": "better", "b": [0.1621, 0.1243, 0.2109, 0.1392]}, {"w": "to", "b": [0.217, 0.1243, 0.2334, 0.1392]}, {"w": "make", "b": [0.2396, 0.1243, 0.2816, 0.1392]}, {"w": "sure", "b": [0.2878, 0.1243, 0.3208, 0.1392]}, {"w": "that", "b": [0.3269, 0.1243, 0.3608, 0.1392]}, {"w": "the", "b": [0.3669, 0.1243, 0.3926, 0.1392]}, {"w": "client", "b": [0.3987, 0.1243, 0.4423, 0.1392]}, {"w": "understands", "b": [0.4485, 0.1243, 0.5462, 0.1392]}, {"w": "the", "b": [0.5523, 0.1243, 0.578, 0.1392]}, {"w": "constraints", "b": [0.5841, 0.1243, 0.6721, 0.1392]}, {"w": "and", "b": [0.6783, 0.1243, 0.708, 0.1392]}, {"w": "the", "b": [0.7141, 0.1243, 0.7398, 0.1392]}, {"w": "risks.", "b": [0.7459, 0.1243, 0.7878, 0.1392]}, {"w": "Carefully", "b": [0.796, 0.1243, 0.8699, 0.1392]}, {"w": "log", "b": [0.1312, 0.1423, 0.1544, 0.1572]}, {"w": "every", "b": [0.1605, 0.1423, 0.2024, 0.1572]}, {"w": "activity", "b": [0.2086, 0.1423, 0.2685, 0.1572]}, {"w": "and", "b": [0.2747, 0.1423, 0.3039, 0.1572]}, {"w": "track", "b": [0.31, 0.1423, 0.3504, 0.1572]}, {"w": "the", "b": [0.3565, 0.1423, 0.3817, 0.1572]}, {"w": "time", "b": [0.3879, 0.1423, 0.4231, 0.1572]}, {"w": "it", "b": [0.4293, 0.1423, 0.4414, 0.1572]}, {"w": "took.", "b": [0.4475, 0.1423, 0.4878, 0.1572]}, {"w": "This", "b": [0.496, 0.1423, 0.5314, 0.1572]}, {"w": "will", "b": [0.5375, 0.1423, 0.5657, 0.1572]}, {"w": "help", "b": [0.5719, 0.1423, 0.6052, 0.1572]}, {"w": "not", "b": [0.6113, 0.1423, 0.6375, 0.1572]}, {"w": "only", "b": [0.6436, 0.1423, 0.6774, 0.1572]}, {"w": "in", "b": [0.6835, 0.1423, 0.6987, 0.1572]}, {"w": "reporting", "b": [0.7048, 0.1423, 0.778, 0.1572]}, {"w": "but", "b": [0.7841, 0.1423, 0.8113, 0.1572]}, {"w": "also", "b": [0.8175, 0.1423, 0.8478, 0.1572]}, {"w": "in", "b": [0.8539, 0.1423, 0.8691, 0.1572]}, {"w": "estimating", "b": [0.1312, 0.1602, 0.2154, 0.1751]}, {"w": "complexity", "b": [0.2216, 0.1602, 0.3092, 0.1751]}, {"w": "for", "b": [0.3154, 0.1602, 0.3375, 0.1751]}, {"w": "similar", "b": [0.3436, 0.1602, 0.3981, 0.1751]}, {"w": "projects", "b": [0.4043, 0.1602, 0.468, 0.1751]}, {"w": "in", "b": [0.4742, 0.1602, 0.4896, 0.1751]}, {"w": "the", "b": [0.4957, 0.1602, 0.5214, 0.1751]}, {"w": "future.", "b": [0.5275, 0.1602, 0.5814, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "The goal of a machine learning project is to build a model that solves some business problem. In particular, the model can be used within a broader system to automate, alert or prompt, organize, annotate, extract, recommend, classify, quantify, synthesize, answer an explicit question, transform its input, and detect novelty or an anomaly. If you cannot frame the goal of machine learning in one of these forms, likely, machine learning is not the best solution.", "words": [{"w": "The", "b": [0.1306, 0.1872, 0.1617, 0.202]}, {"w": "goal", "b": [0.1676, 0.1872, 0.1998, 0.202]}, {"w": "of", "b": [0.2057, 0.1872, 0.2203, 0.202]}, {"w": "a", "b": [0.2262, 0.1872, 0.2352, 0.202]}, {"w": "machine", "b": [0.2411, 0.1872, 0.3059, 0.202]}, {"w": "learning", "b": [0.3118, 0.1872, 0.3752, 0.202]}, {"w": "project", "b": [0.3811, 0.1872, 0.4365, 0.202]}, {"w": "is", "b": [0.4424, 0.1872, 0.4545, 0.202]}, {"w": "to", "b": [0.4604, 0.1872, 0.4765, 0.202]}, {"w": "build", "b": [0.4824, 0.1872, 0.5226, 0.202]}, {"w": "a", "b": [0.5285, 0.1872, 0.5376, 0.202]}, {"w": "model", "b": [0.5435, 0.1872, 0.5912, 0.202]}, {"w": "that", "b": [0.5971, 0.1872, 0.6303, 0.202]}, {"w": "solves", "b": [0.6362, 0.1872, 0.6816, 0.202]}, {"w": "some", "b": [0.6875, 0.1872, 0.7268, 0.202]}, {"w": "business", "b": [0.7327, 0.1872, 0.7974, 0.202]}, {"w": "problem.", "b": [0.8033, 0.1872, 0.8727, 0.202]}, {"w": "In", "b": [0.1312, 0.2051, 0.1481, 0.22]}, {"w": "particular,", "b": [0.1542, 0.2051, 0.2381, 0.22]}, {"w": "the", "b": [0.2442, 0.2051, 0.2698, 0.22]}, {"w": "model", "b": [0.2759, 0.2051, 0.3244, 0.22]}, {"w": "can", "b": [0.3306, 0.2051, 0.3582, 0.22]}, {"w": "be", "b": [0.3643, 0.2051, 0.3832, 0.22]}, {"w": "used", "b": [0.3894, 0.2051, 0.4252, 0.22]}, {"w": "within", "b": [0.4314, 0.2051, 0.4824, 0.22]}, {"w": "a", "b": [0.4886, 0.2051, 0.4978, 0.22]}, {"w": "broader", "b": [0.5039, 0.2051, 0.5653, 0.22]}, {"w": "system", "b": [0.5715, 0.2051, 0.6263, 0.22]}, {"w": "to", "b": [0.6324, 0.2051, 0.6488, 0.22]}, {"w": "automate,", "b": [0.6549, 0.2051, 0.7356, 0.22]}, {"w": "alert", "b": [0.7417, 0.2051, 0.7786, 0.22]}, {"w": "or", "b": [0.7847, 0.2051, 0.8011, 0.22]}, {"w": "prompt,", "b": [0.8072, 0.2051, 0.8716, 0.22]}, {"w": "organize,", "b": [0.1312, 0.2229, 0.2045, 0.238]}, {"w": "annotate,", "b": [0.212, 0.2229, 0.2894, 0.238]}, {"w": "extract,", "b": [0.2968, 0.2229, 0.3601, 0.238]}, {"w": "recommend,", "b": [0.3676, 0.2229, 0.467, 0.238]}, {"w": "classify,", "b": [0.4745, 0.2229, 0.537, 0.238]}, {"w": "quantify,", "b": [0.5444, 0.2229, 0.6161, 0.238]}, {"w": "synthesize,", "b": [0.6236, 0.2229, 0.7117, 0.238]}, {"w": "answer", "b": [0.7191, 0.2229, 0.7752, 0.238]}, {"w": "an", "b": [0.7824, 0.2229, 0.8023, 0.238]}, {"w": "explicit", "b": [0.8095, 0.2229, 0.8697, 0.238]}, {"w": "question,", "b": [0.1312, 0.2411, 0.2022, 0.2559]}, {"w": "transform", "b": [0.208, 0.2411, 0.2851, 0.2559]}, {"w": "its", "b": [0.2908, 0.2411, 0.31, 0.2559]}, {"w": "input,", "b": [0.3157, 0.2411, 0.3629, 0.2559]}, {"w": "and", "b": [0.3687, 0.2411, 0.3979, 0.2559]}, {"w": "detect", "b": [0.4036, 0.2411, 0.4519, 0.2559]}, {"w": "novelty", "b": [0.4576, 0.2411, 0.5143, 0.2559]}, {"w": "or", "b": [0.52, 0.2411, 0.5362, 0.2559]}, {"w": "an", "b": [0.5419, 0.2411, 0.561, 0.2559]}, {"w": "anomaly.", "b": [0.5667, 0.2411, 0.637, 0.2559]}, {"w": "If", "b": [0.645, 0.2411, 0.6571, 0.2559]}, {"w": "you", "b": [0.6628, 0.2411, 0.6909, 0.2559]}, {"w": "cannot", "b": [0.6966, 0.2411, 0.7499, 0.2559]}, {"w": "frame", "b": [0.7556, 0.2411, 0.8004, 0.2559]}, {"w": "the", "b": [0.8061, 0.2411, 0.8312, 0.2559]}, {"w": "goal", "b": [0.8369, 0.2411, 0.8691, 0.2559]}, {"w": "of", "b": [0.1312, 0.2589, 0.1461, 0.2738]}, {"w": "machine", "b": [0.1522, 0.2589, 0.2184, 0.2738]}, {"w": "learning", "b": [0.2245, 0.2589, 0.2892, 0.2738]}, {"w": "in", "b": [0.2954, 0.2589, 0.3107, 0.2738]}, {"w": "one", "b": [0.3169, 0.2589, 0.3446, 0.2738]}, {"w": "of", "b": [0.3507, 0.2589, 0.3656, 0.2738]}, {"w": "these", "b": [0.3718, 0.2589, 0.4129, 0.2738]}, {"w": "forms,", "b": [0.419, 0.2589, 0.4689, 0.2738]}, {"w": "likely,", "b": [0.4751, 0.2589, 0.5212, 0.2738]}, {"w": "machine", "b": [0.5274, 0.2589, 0.5935, 0.2738]}, {"w": "learning", "b": [0.5997, 0.2589, 0.6643, 0.2738]}, {"w": "is", "b": [0.6705, 0.2589, 0.6829, 0.2738]}, {"w": "not", "b": [0.689, 0.2589, 0.7157, 0.2738]}, {"w": "the", "b": [0.7218, 0.2589, 0.7475, 0.2738]}, {"w": "best", "b": [0.7536, 0.2589, 0.7871, 0.2738]}, {"w": "solution.", "b": [0.7932, 0.2589, 0.862, 0.2738]}]}, {"id": "b_2", "type": "paragraph", "text": "A successful model 1) respects the input and output specifications and the minimum perfor- mance requirement, 2) benefits the organization and the user, and 3) is scientifically rigorous.", "words": [{"w": "A", "b": [0.1305, 0.2858, 0.1443, 0.3008]}, {"w": "successful", "b": [0.1504, 0.2858, 0.2276, 0.3008]}, {"w": "model", "b": [0.2338, 0.2858, 0.2822, 0.3008]}, {"w": "1)", "b": [0.2883, 0.2858, 0.3046, 0.3008]}, {"w": "respects", "b": [0.3107, 0.2858, 0.3747, 0.3008]}, {"w": "the", "b": [0.3808, 0.2858, 0.4063, 0.3008]}, {"w": "input", "b": [0.4124, 0.2858, 0.4552, 0.3008]}, {"w": "and", "b": [0.4613, 0.2858, 0.4909, 0.3008]}, {"w": "output", "b": [0.497, 0.2858, 0.551, 0.3008]}, {"w": "specifications", "b": [0.5571, 0.2858, 0.6628, 0.3008]}, {"w": "and", "b": [0.6689, 0.2858, 0.6984, 0.3008]}, {"w": "the", "b": [0.7046, 0.2858, 0.73, 0.3008]}, {"w": "minimum", "b": [0.7362, 0.2858, 0.812, 0.3008]}, {"w": "perfor-", "b": [0.8182, 0.2858, 0.8722, 0.3008]}, {"w": "mance", "b": [0.1312, 0.3039, 0.1815, 0.3187]}, {"w": "requirement,", "b": [0.1875, 0.3039, 0.287, 0.3187]}, {"w": "2)", "b": [0.2931, 0.3039, 0.3091, 0.3187]}, {"w": "benefits", "b": [0.3151, 0.3039, 0.3761, 0.3187]}, {"w": "the", "b": [0.382, 0.3039, 0.4072, 0.3187]}, {"w": "organization", "b": [0.4132, 0.3039, 0.5107, 0.3187]}, {"w": "and", "b": [0.5167, 0.3039, 0.5458, 0.3187]}, {"w": "the", "b": [0.5518, 0.3039, 0.5769, 0.3187]}, {"w": "user,", "b": [0.5829, 0.3039, 0.6203, 0.3187]}, {"w": "and", "b": [0.6263, 0.3039, 0.6554, 0.3187]}, {"w": "3)", "b": [0.6614, 0.3039, 0.6775, 0.3187]}, {"w": "is", "b": [0.6835, 0.3039, 0.6956, 0.3187]}, {"w": "scientifically", "b": [0.7016, 0.3039, 0.7982, 0.3187]}, {"w": "rigorous.", "b": [0.8042, 0.3039, 0.8727, 0.3187]}]}, {"id": "b_3", "type": "paragraph", "text": "There are two cultures of structuring a machine learning team, depending on the organization. One culture says that a machine learning team has to be composed of data analysts who collaborate closely with software engineers. In such a culture, a software engineer doesn’t need to have profound expertise in machine learning but has to understand the vocabulary of their fellow data analysts or scientists. According to the other culture, all engineers in a machine learning team must have a combination of machine learning and software engineering skills.", "words": [{"w": "There", "b": [0.1306, 0.3308, 0.1769, 0.3456]}, {"w": "are", "b": [0.1822, 0.3308, 0.2064, 0.3456]}, {"w": "two", "b": [0.2117, 0.3308, 0.2398, 0.3456]}, {"w": "cultures", "b": [0.2452, 0.3308, 0.3077, 0.3456]}, {"w": "of", "b": [0.313, 0.3308, 0.3276, 0.3456]}, {"w": "structuring", "b": [0.3329, 0.3308, 0.4206, 0.3456]}, {"w": "a", "b": [0.4259, 0.3308, 0.435, 0.3456]}, {"w": "machine", "b": [0.4403, 0.3308, 0.5052, 0.3456]}, {"w": "learning", "b": [0.5105, 0.3308, 0.5739, 0.3456]}, {"w": "team,", "b": [0.5792, 0.3308, 0.6234, 0.3456]}, {"w": "depending", "b": [0.629, 0.3308, 0.7099, 0.3456]}, {"w": "on", "b": [0.7152, 0.3308, 0.7343, 0.3456]}, {"w": "the", "b": [0.7397, 0.3308, 0.7648, 0.3456]}, {"w": "organization.", "b": [0.7702, 0.3308, 0.8727, 0.3456]}, {"w": "One", "b": [0.1312, 0.3485, 0.1647, 0.3636]}, {"w": "culture", "b": [0.1714, 0.3485, 0.229, 0.3636]}, {"w": "says", "b": [0.2356, 0.3485, 0.2693, 0.3636]}, {"w": "that", "b": [0.2759, 0.3485, 0.3104, 0.3636]}, {"w": "a", "b": [0.3171, 0.3485, 0.3265, 0.3636]}, {"w": "machine", "b": [0.3331, 0.3485, 0.4006, 0.3636]}, {"w": "learning", "b": [0.4072, 0.3485, 0.4732, 0.3636]}, {"w": "team", "b": [0.4798, 0.3485, 0.5206, 0.3636]}, {"w": "has", "b": [0.5272, 0.3485, 0.5545, 0.3636]}, {"w": "to", "b": [0.5612, 0.3485, 0.5779, 0.3636]}, {"w": "be", "b": [0.5846, 0.3485, 0.6039, 0.3636]}, {"w": "composed", "b": [0.6106, 0.3485, 0.6907, 0.3636]}, {"w": "of", "b": [0.6973, 0.3485, 0.7125, 0.3636]}, {"w": "data", "b": [0.7191, 0.3485, 0.7557, 0.3636]}, {"w": "analysts", "b": [0.7623, 0.3485, 0.829, 0.3636]}, {"w": "who", "b": [0.8356, 0.3485, 0.8691, 0.3636]}, {"w": "collaborate", "b": [0.1312, 0.3667, 0.2182, 0.3815]}, {"w": "closely", "b": [0.2232, 0.3667, 0.2751, 0.3815]}, {"w": "with", "b": [0.2801, 0.3667, 0.3153, 0.3815]}, {"w": "software", "b": [0.3203, 0.3667, 0.3852, 0.3815]}, {"w": "engineers.", "b": [0.3903, 0.3667, 0.4678, 0.3815]}, {"w": "In", "b": [0.4756, 0.3667, 0.4922, 0.3815]}, {"w": "such", "b": [0.4972, 0.3667, 0.532, 0.3815]}, {"w": "a", "b": [0.537, 0.3667, 0.546, 0.3815]}, {"w": "culture,", "b": [0.5511, 0.3667, 0.6114, 0.3815]}, {"w": "a", "b": [0.6167, 0.3667, 0.6257, 0.3815]}, {"w": "software", "b": [0.6307, 0.3667, 0.6957, 0.3815]}, {"w": "engineer", "b": [0.7007, 0.3667, 0.7661, 0.3815]}, {"w": "doesn’t", "b": [0.7711, 0.3667, 0.828, 0.3815]}, {"w": "need", "b": [0.833, 0.3667, 0.8692, 0.3815]}, {"w": "to", "b": [0.1312, 0.3846, 0.1473, 0.3994]}, {"w": "have", "b": [0.1531, 0.3846, 0.1887, 0.3994]}, {"w": "profound", "b": [0.1944, 0.3846, 0.2654, 0.3994]}, {"w": "expertise", "b": [0.2711, 0.3846, 0.3416, 0.3994]}, {"w": "in", "b": [0.3474, 0.3846, 0.3624, 0.3994]}, {"w": "machine", "b": [0.3682, 0.3846, 0.433, 0.3994]}, {"w": "learning", "b": [0.4387, 0.3846, 0.5021, 0.3994]}, {"w": "but", "b": [0.5079, 0.3846, 0.535, 0.3994]}, {"w": "has", "b": [0.5407, 0.3846, 0.567, 0.3994]}, {"w": "to", "b": [0.5727, 0.3846, 0.5888, 0.3994]}, {"w": "understand", "b": [0.5945, 0.3846, 0.6831, 0.3994]}, {"w": "the", "b": [0.6889, 0.3846, 0.714, 0.3994]}, {"w": "vocabulary", "b": [0.7197, 0.3846, 0.8062, 0.3994]}, {"w": "of", "b": [0.812, 0.3846, 0.8265, 0.3994]}, {"w": "their", "b": [0.8323, 0.3846, 0.8695, 0.3994]}, {"w": "fellow", "b": [0.1312, 0.4025, 0.1772, 0.4174]}, {"w": "data", "b": [0.1833, 0.4025, 0.2191, 0.4174]}, {"w": "analysts", "b": [0.2252, 0.4025, 0.2903, 0.4174]}, {"w": "or", "b": [0.2964, 0.4025, 0.3128, 0.4174]}, {"w": "scientists.", "b": [0.3189, 0.4025, 0.3964, 0.4174]}, {"w": "According", "b": [0.4045, 0.4025, 0.4853, 0.4174]}, {"w": "to", "b": [0.4914, 0.4025, 0.5078, 0.4174]}, {"w": "the", "b": [0.5139, 0.4025, 0.5394, 0.4174]}, {"w": "other", "b": [0.5456, 0.4025, 0.5875, 0.4174]}, {"w": "culture,", "b": [0.5936, 0.4025, 0.655, 0.4174]}, {"w": "all", "b": [0.6611, 0.4025, 0.6805, 0.4174]}, {"w": "engineers", "b": [0.6867, 0.4025, 0.7604, 0.4174]}, {"w": "in", "b": [0.7665, 0.4025, 0.7818, 0.4174]}, {"w": "a", "b": [0.788, 0.4025, 0.7971, 0.4174]}, {"w": "machine", "b": [0.8033, 0.4025, 0.8692, 0.4174]}, {"w": "learning", "b": [0.1312, 0.4204, 0.1959, 0.4354]}, {"w": "team", "b": [0.202, 0.4204, 0.242, 0.4354]}, {"w": "must", "b": [0.2482, 0.4204, 0.2878, 0.4354]}, {"w": "have", "b": [0.2939, 0.4204, 0.3303, 0.4354]}, {"w": "a", "b": [0.3365, 0.4204, 0.3457, 0.4354]}, {"w": "combination", "b": [0.3518, 0.4204, 0.4508, 0.4354]}, {"w": "of", "b": [0.4569, 0.4204, 0.4718, 0.4354]}, {"w": "machine", "b": [0.478, 0.4204, 0.5441, 0.4354]}, {"w": "learning", "b": [0.5502, 0.4204, 0.6149, 0.4354]}, {"w": "and", "b": [0.621, 0.4204, 0.6508, 0.4354]}, {"w": "software", "b": [0.6569, 0.4204, 0.7232, 0.4354]}, {"w": "engineering", "b": [0.7294, 0.4204, 0.8207, 0.4354]}, {"w": "skills.", "b": [0.8269, 0.4204, 0.8717, 0.4354]}]}, {"id": "b_4", "type": "paragraph", "text": "Besides having machine learning and software engineering skills, a machine learning team may include experts in data labeling and data engineering experts. DevOps engineers work closely with machine learning engineers to automate model deployment, loading, monitoring, and occasional or regular model maintenance.", "words": [{"w": "Besides", "b": [0.1312, 0.4472, 0.1919, 0.4623]}, {"w": "having", "b": [0.1981, 0.4472, 0.2525, 0.4623]}, {"w": "machine", "b": [0.2588, 0.4472, 0.3263, 0.4623]}, {"w": "learning", "b": [0.3325, 0.4472, 0.3985, 0.4623]}, {"w": "and", "b": [0.4048, 0.4472, 0.4351, 0.4623]}, {"w": "software", "b": [0.4414, 0.4472, 0.509, 0.4623]}, {"w": "engineering", "b": [0.5153, 0.4472, 0.6084, 0.4623]}, {"w": "skills,", "b": [0.6147, 0.4472, 0.6604, 0.4623]}, {"w": "a", "b": [0.6667, 0.4472, 0.6761, 0.4623]}, {"w": "machine", "b": [0.6824, 0.4472, 0.7499, 0.4623]}, {"w": "learning", "b": [0.7561, 0.4472, 0.8221, 0.4623]}, {"w": "team", "b": [0.8283, 0.4472, 0.8691, 0.4623]}, {"w": "may", "b": [0.1312, 0.4653, 0.1651, 0.4802]}, {"w": "include", "b": [0.1712, 0.4653, 0.2287, 0.4802]}, {"w": "experts", "b": [0.2349, 0.4653, 0.2936, 0.4802]}, {"w": "in", "b": [0.2997, 0.4653, 0.3151, 0.4802]}, {"w": "data", "b": [0.3213, 0.4653, 0.3572, 0.4802]}, {"w": "labeling", "b": [0.3633, 0.4653, 0.4265, 0.4802]}, {"w": "and", "b": [0.4326, 0.4653, 0.4624, 0.4802]}, {"w": "data", "b": [0.4685, 0.4653, 0.5045, 0.4802]}, {"w": "engineering", "b": [0.5106, 0.4653, 0.602, 0.4802]}, {"w": "experts.", "b": [0.6082, 0.4653, 0.672, 0.4802]}, {"w": "DevOps", "b": [0.6802, 0.4653, 0.7442, 0.4802]}, {"w": "engineers", "b": [0.7503, 0.4653, 0.8244, 0.4802]}, {"w": "work", "b": [0.8306, 0.4653, 0.8696, 0.4802]}, {"w": "closely", "b": [0.1312, 0.4833, 0.1834, 0.4982]}, {"w": "with", "b": [0.1895, 0.4833, 0.2248, 0.4982]}, {"w": "machine", "b": [0.231, 0.4833, 0.2961, 0.4982]}, {"w": "learning", "b": [0.3022, 0.4833, 0.3659, 0.4982]}, {"w": "engineers", "b": [0.3721, 0.4833, 0.445, 0.4982]}, {"w": "to", "b": [0.4511, 0.4833, 0.4673, 0.4982]}, {"w": "automate", "b": [0.4734, 0.4833, 0.5481, 0.4982]}, {"w": "model", "b": [0.5542, 0.4833, 0.6022, 0.4982]}, {"w": "deployment,", "b": [0.6084, 0.4833, 0.7048, 0.4982]}, {"w": "loading,", "b": [0.7109, 0.4833, 0.7736, 0.4982]}, {"w": "monitoring,", "b": [0.7797, 0.4833, 0.8716, 0.4982]}, {"w": "and", "b": [0.1312, 0.5012, 0.161, 0.5161]}, {"w": "occasional", "b": [0.1671, 0.5012, 0.2488, 0.5161]}, {"w": "or", "b": [0.2549, 0.5012, 0.2714, 0.5161]}, {"w": "regular", "b": [0.2775, 0.5012, 0.334, 0.5161]}, {"w": "model", "b": [0.3402, 0.5012, 0.3889, 0.5161]}, {"w": "maintenance.", "b": [0.395, 0.5012, 0.5012, 0.5161]}]}, {"id": "b_5", "type": "paragraph", "text": "A machine learning projects can fail for many reasons, and most actually do. Typical reasons for a failure are:", "words": [{"w": "A", "b": [0.1305, 0.5282, 0.1441, 0.543]}, {"w": "machine", "b": [0.1499, 0.5282, 0.2147, 0.543]}, {"w": "learning", "b": [0.2206, 0.5282, 0.2839, 0.543]}, {"w": "projects", "b": [0.2898, 0.5282, 0.3523, 0.543]}, {"w": "can", "b": [0.3581, 0.5282, 0.3852, 0.543]}, {"w": "fail", "b": [0.3911, 0.5282, 0.4157, 0.543]}, {"w": "for", "b": [0.4215, 0.5282, 0.4432, 0.543]}, {"w": "many", "b": [0.449, 0.5282, 0.4922, 0.543]}, {"w": "reasons,", "b": [0.498, 0.5282, 0.5606, 0.543]}, {"w": "and", "b": [0.5665, 0.5282, 0.5956, 0.543]}, {"w": "most", "b": [0.6015, 0.5282, 0.6397, 0.543]}, {"w": "actually", "b": [0.6456, 0.5282, 0.7084, 0.543]}, {"w": "do.", "b": [0.7142, 0.5282, 0.7383, 0.543]}, {"w": "Typical", "b": [0.7464, 0.5282, 0.8057, 0.543]}, {"w": "reasons", "b": [0.8115, 0.5282, 0.8691, 0.543]}, {"w": "for", "b": [0.1312, 0.546, 0.1533, 0.561]}, {"w": "a", "b": [0.1595, 0.546, 0.1687, 0.561]}, {"w": "failure", "b": [0.1749, 0.546, 0.2257, 0.561]}, {"w": "are:", "b": [0.2318, 0.546, 0.2616, 0.561]}]}, {"id": "b_6", "type": "paragraph", "text": "• lack of experienced talent, • lack of support by the leadership, • missing data infrastructure, • data labeling challenge, • siloed organizations and lack of collaboration, • technically infeasible projects, and • lack of alignment between technical and business teams.", "words": [{"w": "•", "b": [0.1538, 0.573, 0.1681, 0.5879]}, {"w": "lack", "b": [0.1774, 0.573, 0.2091, 0.5879]}, {"w": "of", "b": [0.2153, 0.573, 0.2302, 0.5879]}, {"w": "experienced", "b": [0.2363, 0.573, 0.3307, 0.5879]}, {"w": "talent,", "b": [0.3369, 0.573, 0.3887, 0.5879]}, {"w": "•", "b": [0.1538, 0.5909, 0.1681, 0.6059]}, {"w": "lack", "b": [0.1774, 0.5909, 0.2091, 0.6059]}, {"w": "of", "b": [0.2153, 0.5909, 0.2302, 0.6059]}, {"w": "support", "b": [0.2363, 0.5909, 0.2985, 0.6059]}, {"w": "by", "b": [0.3047, 0.5909, 0.3242, 0.6059]}, {"w": "the", "b": [0.3303, 0.5909, 0.3559, 0.6059]}, {"w": "leadership,", "b": [0.3621, 0.5909, 0.4484, 0.6059]}, {"w": "•", "b": [0.1538, 0.6089, 0.1681, 0.6238]}, {"w": "missing", "b": [0.1774, 0.6089, 0.237, 0.6238]}, {"w": "data", "b": [0.2432, 0.6089, 0.2791, 0.6238]}, {"w": "infrastructure,", "b": [0.2852, 0.6089, 0.4009, 0.6238]}, {"w": "•", "b": [0.1538, 0.6268, 0.1681, 0.6418]}, {"w": "data", "b": [0.1774, 0.6268, 0.2132, 0.6418]}, {"w": "labeling", "b": [0.2194, 0.6268, 0.2825, 0.6418]}, {"w": "challenge,", "b": [0.2886, 0.6268, 0.3671, 0.6418]}, {"w": "•", "b": [0.1538, 0.6447, 0.1681, 0.6597]}, {"w": "siloed", "b": [0.1774, 0.6447, 0.2231, 0.6597]}, {"w": "organizations", "b": [0.2293, 0.6447, 0.3361, 0.6597]}, {"w": "and", "b": [0.3422, 0.6447, 0.3719, 0.6597]}, {"w": "lack", "b": [0.3781, 0.6447, 0.4099, 0.6597]}, {"w": "of", "b": [0.416, 0.6447, 0.4309, 0.6597]}, {"w": "collaboration,", "b": [0.437, 0.6447, 0.5473, 0.6597]}, {"w": "•", "b": [0.1538, 0.6627, 0.1681, 0.6776]}, {"w": "technically", "b": [0.1774, 0.6627, 0.2635, 0.6776]}, {"w": "infeasible", "b": [0.2697, 0.6627, 0.3441, 0.6776]}, {"w": "projects,", "b": [0.3503, 0.6627, 0.4192, 0.6776]}, {"w": "and", "b": [0.4253, 0.6627, 0.4551, 0.6776]}, {"w": "•", "b": [0.1538, 0.6806, 0.1681, 0.6956]}, {"w": "lack", "b": [0.1774, 0.6806, 0.2091, 0.6956]}, {"w": "of", "b": [0.2153, 0.6806, 0.2302, 0.6956]}, {"w": "alignment", "b": [0.2363, 0.6806, 0.3158, 0.6956]}, {"w": "between", "b": [0.3219, 0.6806, 0.3871, 0.6956]}, {"w": "technical", "b": [0.3932, 0.6806, 0.4645, 0.6956]}, {"w": "and", "b": [0.4706, 0.6806, 0.5004, 0.6956]}, {"w": "business", "b": [0.5065, 0.6806, 0.5725, 0.6956]}, {"w": "teams.", "b": [0.5786, 0.6806, 0.631, 0.6956]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "14", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 44, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 45, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 46, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3 Data Collection and Preparation", "words": [{"w": "3", "b": [0.1312, 0.0833, 0.1462, 0.1048]}, {"w": "Data", "b": [0.1761, 0.0833, 0.2397, 0.1048]}, {"w": "Collection", "b": [0.2496, 0.0833, 0.3813, 0.1048]}, {"w": "and", "b": [0.3912, 0.0833, 0.439, 0.1048]}, {"w": "Preparation", "b": [0.4489, 0.0833, 0.6046, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "Before any machine learning activity can start, the analyst must collect and prepare the data. The data available to the analyst is not always “right” and is not always in a form that a machine learning algorithm can use. This chapter focuses on the second stage in the machine learning project life cycle, as shown below:", "words": [{"w": "Before", "b": [0.1312, 0.1302, 0.1818, 0.145]}, {"w": "any", "b": [0.1875, 0.1302, 0.2157, 0.145]}, {"w": "machine", "b": [0.2214, 0.1302, 0.2862, 0.145]}, {"w": "learning", "b": [0.2919, 0.1302, 0.3553, 0.145]}, {"w": "activity", "b": [0.361, 0.1302, 0.4208, 0.145]}, {"w": "can", "b": [0.4266, 0.1302, 0.4537, 0.145]}, {"w": "start,", "b": [0.4594, 0.1302, 0.5018, 0.145]}, {"w": "the", "b": [0.5076, 0.1302, 0.5327, 0.145]}, {"w": "analyst", "b": [0.5385, 0.1302, 0.5954, 0.145]}, {"w": "must", "b": [0.6011, 0.1302, 0.6399, 0.145]}, {"w": "collect", "b": [0.6456, 0.1302, 0.6959, 0.145]}, {"w": "and", "b": [0.7016, 0.1302, 0.7308, 0.145]}, {"w": "prepare", "b": [0.7365, 0.1302, 0.7959, 0.145]}, {"w": "the", "b": [0.8016, 0.1302, 0.8268, 0.145]}, {"w": "data.", "b": [0.8325, 0.1302, 0.8727, 0.145]}, {"w": "The", "b": [0.1306, 0.148, 0.163, 0.1631]}, {"w": "data", "b": [0.1693, 0.148, 0.2059, 0.1631]}, {"w": "available", "b": [0.2122, 0.148, 0.2834, 0.1631]}, {"w": "to", "b": [0.2897, 0.148, 0.3065, 0.1631]}, {"w": "the", "b": [0.3128, 0.148, 0.3389, 0.1631]}, {"w": "analyst", "b": [0.3453, 0.148, 0.4045, 0.1631]}, {"w": "is", "b": [0.4108, 0.148, 0.4235, 0.1631]}, {"w": "not", "b": [0.4298, 0.148, 0.457, 0.1631]}, {"w": "always", "b": [0.4633, 0.148, 0.5173, 0.1631]}, {"w": "“right”", "b": [0.5236, 0.148, 0.5807, 0.1631]}, {"w": "and", "b": [0.587, 0.148, 0.6173, 0.1631]}, {"w": "is", "b": [0.6236, 0.148, 0.6363, 0.1631]}, {"w": "not", "b": [0.6426, 0.148, 0.6698, 0.1631]}, {"w": "always", "b": [0.6761, 0.148, 0.7301, 0.1631]}, {"w": "in", "b": [0.7365, 0.148, 0.7522, 0.1631]}, {"w": "a", "b": [0.7585, 0.148, 0.7679, 0.1631]}, {"w": "form", "b": [0.7742, 0.148, 0.8124, 0.1631]}, {"w": "that", "b": [0.8188, 0.148, 0.8533, 0.1631]}, {"w": "a", "b": [0.8596, 0.148, 0.869, 0.1631]}, {"w": "machine", "b": [0.1312, 0.1661, 0.196, 0.1809]}, {"w": "learning", "b": [0.2019, 0.1661, 0.2653, 0.1809]}, {"w": "algorithm", "b": [0.2711, 0.1661, 0.3475, 0.1809]}, {"w": "can", "b": [0.3534, 0.1661, 0.3806, 0.1809]}, {"w": "use.", "b": [0.3864, 0.1661, 0.4167, 0.1809]}, {"w": "This", "b": [0.4248, 0.1661, 0.4601, 0.1809]}, {"w": "chapter", "b": [0.4659, 0.1661, 0.5248, 0.1809]}, {"w": "focuses", "b": [0.5306, 0.1661, 0.5862, 0.1809]}, {"w": "on", "b": [0.592, 0.1661, 0.6111, 0.1809]}, {"w": "the", "b": [0.617, 0.1661, 0.6421, 0.1809]}, {"w": "second", "b": [0.648, 0.1661, 0.7004, 0.1809]}, {"w": "stage", "b": [0.7062, 0.1661, 0.7465, 0.1809]}, {"w": "in", "b": [0.7524, 0.1661, 0.7675, 0.1809]}, {"w": "the", "b": [0.7733, 0.1661, 0.7985, 0.1809]}, {"w": "machine", "b": [0.8043, 0.1661, 0.8691, 0.1809]}, {"w": "learning", "b": [0.1312, 0.184, 0.1959, 0.1989]}, {"w": "project", "b": [0.202, 0.184, 0.2585, 0.1989]}, {"w": "life", "b": [0.2647, 0.184, 0.2888, 0.1989]}, {"w": "cycle,", "b": [0.2949, 0.184, 0.3395, 0.1989]}, {"w": "as", "b": [0.3457, 0.184, 0.3622, 0.1989]}, {"w": "shown", "b": [0.3684, 0.184, 0.4182, 0.1989]}, {"w": "below:", "b": [0.4243, 0.184, 0.4756, 0.1989]}]}, {"id": "b_2", "type": "paragraph", "text": "Figure 1: Machine learning project life cycle.", "words": [{"w": "Figure", "b": [0.3186, 0.5024, 0.3707, 0.5174]}, {"w": "1:", "b": [0.3769, 0.5024, 0.3912, 0.5174]}, {"w": "Machine", "b": [0.3994, 0.5024, 0.4671, 0.5174]}, {"w": "learning", "b": [0.4733, 0.5024, 0.5379, 0.5174]}, {"w": "project", "b": [0.5441, 0.5024, 0.6006, 0.5174]}, {"w": "life", "b": [0.6067, 0.5024, 0.6308, 0.5174]}, {"w": "cycle.", "b": [0.637, 0.5024, 0.6816, 0.5174]}]}, {"id": "b_3", "type": "paragraph", "text": "In particular, we talk about the properties of good quality data, typical problems a dataset can have, and ways to prepare and store data for machine learning.", "words": [{"w": "In", "b": [0.1312, 0.5527, 0.1482, 0.5676]}, {"w": "particular,", "b": [0.1543, 0.5527, 0.2385, 0.5676]}, {"w": "we", "b": [0.2446, 0.5527, 0.2657, 0.5676]}, {"w": "talk", "b": [0.2718, 0.5527, 0.3031, 0.5676]}, {"w": "about", "b": [0.3092, 0.5527, 0.3559, 0.5676]}, {"w": "the", "b": [0.362, 0.5527, 0.3877, 0.5676]}, {"w": "properties", "b": [0.3938, 0.5527, 0.4746, 0.5676]}, {"w": "of", "b": [0.4807, 0.5527, 0.4956, 0.5676]}, {"w": "good", "b": [0.5017, 0.5527, 0.5407, 0.5676]}, {"w": "quality", "b": [0.5468, 0.5527, 0.6027, 0.5676]}, {"w": "data,", "b": [0.6089, 0.5527, 0.6499, 0.5676]}, {"w": "typical", "b": [0.656, 0.5527, 0.7104, 0.5676]}, {"w": "problems", "b": [0.7165, 0.5527, 0.7895, 0.5676]}, {"w": "a", "b": [0.7956, 0.5527, 0.8049, 0.5676]}, {"w": "dataset", "b": [0.811, 0.5527, 0.8696, 0.5676]}, {"w": "can", "b": [0.1312, 0.5706, 0.1589, 0.5856]}, {"w": "have,", "b": [0.1651, 0.5706, 0.2066, 0.5856]}, {"w": "and", "b": [0.2128, 0.5706, 0.2425, 0.5856]}, {"w": "ways", "b": [0.2486, 0.5706, 0.2872, 0.5856]}, {"w": "to", "b": [0.2933, 0.5706, 0.3097, 0.5856]}, {"w": "prepare", "b": [0.3159, 0.5706, 0.3765, 0.5856]}, {"w": "and", "b": [0.3827, 0.5706, 0.4124, 0.5856]}, {"w": "store", "b": [0.4186, 0.5706, 0.4577, 0.5856]}, {"w": "data", "b": [0.4638, 0.5706, 0.4997, 0.5856]}, {"w": "for", "b": [0.5059, 0.5706, 0.528, 0.5856]}, {"w": "machine", "b": [0.5341, 0.5706, 0.6003, 0.5856]}, {"w": "learning.", "b": [0.6064, 0.5706, 0.6762, 0.5856]}]}, {"id": "b_4", "type": "paragraph", "text": "3.1 Questions About the Data", "words": [{"w": "3.1", "b": [0.1312, 0.6191, 0.1631, 0.6371]}, {"w": "Questions", "b": [0.188, 0.6191, 0.2945, 0.6371]}, {"w": "About", "b": [0.3028, 0.6191, 0.3721, 0.6371]}, {"w": "the", "b": [0.3804, 0.6191, 0.4153, 0.6371]}, {"w": "Data", "b": [0.4236, 0.6191, 0.4766, 0.6371]}]}, {"id": "b_5", "type": "paragraph", "text": "Now that you have a machine learning goal with well-defined model input, output, and success criteria, you can start collecting the data needed to train your model. However, before you start collecting the data, there are some questions to answer.", "words": [{"w": "Now", "b": [0.1312, 0.6579, 0.1678, 0.673]}, {"w": "that", "b": [0.1755, 0.6579, 0.21, 0.673]}, {"w": "you", "b": [0.2177, 0.6579, 0.247, 0.673]}, {"w": "have", "b": [0.2547, 0.6579, 0.2919, 0.673]}, {"w": "a", "b": [0.2996, 0.6579, 0.309, 0.673]}, {"w": "machine", "b": [0.3166, 0.6579, 0.3841, 0.673]}, {"w": "learning", "b": [0.3918, 0.6579, 0.4578, 0.673]}, {"w": "goal", "b": [0.4655, 0.6579, 0.4989, 0.673]}, {"w": "with", "b": [0.5066, 0.6579, 0.5432, 0.673]}, {"w": "well-defined", "b": [0.5509, 0.6579, 0.6477, 0.673]}, {"w": "model", "b": [0.6554, 0.6579, 0.705, 0.673]}, {"w": "input,", "b": [0.7127, 0.6579, 0.7619, 0.673]}, {"w": "output,", "b": [0.77, 0.6579, 0.8306, 0.673]}, {"w": "and", "b": [0.8387, 0.6579, 0.869, 0.673]}, {"w": "success", "b": [0.1312, 0.6761, 0.1868, 0.6909]}, {"w": "criteria,", "b": [0.1921, 0.6761, 0.2535, 0.6909]}, {"w": "you", "b": [0.259, 0.6761, 0.2871, 0.6909]}, {"w": "can", "b": [0.2924, 0.6761, 0.3195, 0.6909]}, {"w": "start", "b": [0.3248, 0.6761, 0.3621, 0.6909]}, {"w": "collecting", "b": [0.3674, 0.6761, 0.4418, 0.6909]}, {"w": "the", "b": [0.4471, 0.6761, 0.4722, 0.6909]}, {"w": "data", "b": [0.4775, 0.6761, 0.5127, 0.6909]}, {"w": "needed", "b": [0.5179, 0.6761, 0.5722, 0.6909]}, {"w": "to", "b": [0.5775, 0.6761, 0.5936, 0.6909]}, {"w": "train", "b": [0.5988, 0.6761, 0.6371, 0.6909]}, {"w": "your", "b": [0.6424, 0.6761, 0.6776, 0.6909]}, {"w": "model.", "b": [0.6829, 0.6761, 0.7356, 0.6909]}, {"w": "However,", "b": [0.7435, 0.6761, 0.8154, 0.6909]}, {"w": "before", "b": [0.8209, 0.6761, 0.8692, 0.6909]}, {"w": "you", "b": [0.1308, 0.6939, 0.1595, 0.7089]}, {"w": "start", "b": [0.1656, 0.6939, 0.2037, 0.7089]}, {"w": "collecting", "b": [0.2099, 0.6939, 0.2858, 0.7089]}, {"w": "the", "b": [0.2919, 0.6939, 0.3176, 0.7089]}, {"w": "data,", "b": [0.3237, 0.6939, 0.3647, 0.7089]}, {"w": "there", "b": [0.3709, 0.6939, 0.4119, 0.7089]}, {"w": "are", "b": [0.4181, 0.6939, 0.4428, 0.7089]}, {"w": "some", "b": [0.4489, 0.6939, 0.489, 0.7089]}, {"w": "questions", "b": [0.4951, 0.6939, 0.5697, 0.7089]}, {"w": "to", "b": [0.5759, 0.6939, 0.5923, 0.7089]}, {"w": "answer.", "b": [0.5984, 0.6939, 0.6586, 0.7089]}]}, {"id": "b_6", "type": "paragraph", "text": "3.1.1 Is the Data Accessible?", "words": [{"w": "3.1.1", "b": [0.1312, 0.7418, 0.1749, 0.7567]}, {"w": "Is", "b": [0.1961, 0.7418, 0.2125, 0.7567]}, {"w": "the", "b": [0.2196, 0.7418, 0.2493, 0.7567]}, {"w": "Data", "b": [0.2564, 0.7418, 0.3016, 0.7567]}, {"w": "Accessible?", "b": [0.3086, 0.7418, 0.4127, 0.7567]}]}, {"id": "b_7", "type": "paragraph", "text": "Does the data you need already exist? If yes, is it accessible (physically, contractually, ethically, or from a cost perspective)? If you are purchasing or re-using someone else’s data sources, have you considered how that data might be used or shared? Do you need to negotiate a new licensing agreement with the original supplier?", "words": [{"w": "Does", "b": [0.1312, 0.7782, 0.1713, 0.7933]}, {"w": "the", "b": [0.1795, 0.7782, 0.2056, 0.7933]}, {"w": "data", "b": [0.2138, 0.7782, 0.2504, 0.7933]}, {"w": "you", "b": [0.2585, 0.7782, 0.2878, 0.7933]}, {"w": "need", "b": [0.2959, 0.7782, 0.3336, 0.7933]}, {"w": "already", "b": [0.3417, 0.7782, 0.4019, 0.7933]}, {"w": "exist?", "b": [0.41, 0.7782, 0.4572, 0.7933]}, {"w": "If", "b": [0.4713, 0.7782, 0.4839, 0.7933]}, {"w": "yes,", "b": [0.492, 0.7782, 0.5225, 0.7933]}, {"w": "is", "b": [0.5311, 0.7782, 0.5438, 0.7933]}, {"w": "it", "b": [0.5519, 0.7782, 0.5644, 0.7933]}, {"w": "accessible", "b": [0.5726, 0.7782, 0.6513, 0.7933]}, {"w": "(physically,", "b": [0.6594, 0.7782, 0.7516, 0.7933]}, {"w": "contractually,", "b": [0.7602, 0.7782, 0.8717, 0.7933]}, {"w": "ethically,", "b": [0.1312, 0.7962, 0.2045, 0.8113]}, {"w": "or", "b": [0.213, 0.7962, 0.2298, 0.8113]}, {"w": "from", "b": [0.2378, 0.7962, 0.276, 0.8113]}, {"w": "a", "b": [0.2841, 0.7962, 0.2935, 0.8113]}, {"w": "cost", "b": [0.3015, 0.7962, 0.334, 0.8113]}, {"w": "perspective)?", "b": [0.3421, 0.7962, 0.4505, 0.8113]}, {"w": "If", "b": [0.4643, 0.7962, 0.4769, 0.8113]}, {"w": "you", "b": [0.4849, 0.7962, 0.5142, 0.8113]}, {"w": "are", "b": [0.5222, 0.7962, 0.5474, 0.8113]}, {"w": "purchasing", "b": [0.5554, 0.7962, 0.644, 0.8113]}, {"w": "or", "b": [0.652, 0.7962, 0.6688, 0.8113]}, {"w": "re-using", "b": [0.6768, 0.7962, 0.7419, 0.8113]}, {"w": "someone", "b": [0.7499, 0.7962, 0.819, 0.8113]}, {"w": "else’s", "b": [0.8271, 0.7962, 0.8691, 0.8113]}, {"w": "data", "b": [0.1312, 0.8142, 0.1673, 0.8292]}, {"w": "sources,", "b": [0.1734, 0.8142, 0.2365, 0.8292]}, {"w": "have", "b": [0.2427, 0.8142, 0.2792, 0.8292]}, {"w": "you", "b": [0.2854, 0.8142, 0.3142, 0.8292]}, {"w": "considered", "b": [0.3204, 0.8142, 0.405, 0.8292]}, {"w": "how", "b": [0.4111, 0.8142, 0.4436, 0.8292]}, {"w": "that", "b": [0.4497, 0.8142, 0.4837, 0.8292]}, {"w": "data", "b": [0.4898, 0.8142, 0.5258, 0.8292]}, {"w": "might", "b": [0.532, 0.8142, 0.5788, 0.8292]}, {"w": "be", "b": [0.585, 0.8142, 0.6041, 0.8292]}, {"w": "used", "b": [0.6102, 0.8142, 0.6464, 0.8292]}, {"w": "or", "b": [0.6525, 0.8142, 0.6691, 0.8292]}, {"w": "shared?", "b": [0.6752, 0.8142, 0.7366, 0.8292]}, {"w": "Do", "b": [0.7448, 0.8142, 0.7683, 0.8292]}, {"w": "you", "b": [0.7744, 0.8142, 0.8032, 0.8292]}, {"w": "need", "b": [0.8094, 0.8142, 0.8465, 0.8292]}, {"w": "to", "b": [0.8526, 0.8142, 0.8691, 0.8292]}, {"w": "negotiate", "b": [0.1312, 0.8322, 0.2051, 0.8471]}, {"w": "a", "b": [0.2112, 0.8322, 0.2204, 0.8471]}, {"w": "new", "b": [0.2266, 0.8322, 0.2584, 0.8471]}, {"w": "licensing", "b": [0.2645, 0.8322, 0.3333, 0.8471]}, {"w": "agreement", "b": [0.3395, 0.8322, 0.4221, 0.8471]}, {"w": "with", "b": [0.4282, 0.8322, 0.4641, 0.8471]}, {"w": "the", "b": [0.4703, 0.8322, 0.4959, 0.8471]}, {"w": "original", "b": [0.5021, 0.8322, 0.5626, 0.8471]}, {"w": "supplier?", "b": [0.5688, 0.8322, 0.6412, 0.8471]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "3", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 47, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "If the data is accessible, is it protected by copyright or other legal norms? If so, have you established who owns the copyright in your data? Might there be joint copyright?", "words": [{"w": "If", "b": [0.1312, 0.0883, 0.1438, 0.1034]}, {"w": "the", "b": [0.1501, 0.0883, 0.1762, 0.1034]}, {"w": "data", "b": [0.1825, 0.0883, 0.2191, 0.1034]}, {"w": "is", "b": [0.2253, 0.0883, 0.238, 0.1034]}, {"w": "accessible,", "b": [0.2443, 0.0883, 0.3282, 0.1034]}, {"w": "is", "b": [0.3345, 0.0883, 0.3471, 0.1034]}, {"w": "it", "b": [0.3534, 0.0883, 0.3659, 0.1034]}, {"w": "protected", "b": [0.3722, 0.0883, 0.4497, 0.1034]}, {"w": "by", "b": [0.4559, 0.0883, 0.4758, 0.1034]}, {"w": "copyright", "b": [0.4821, 0.0883, 0.559, 0.1034]}, {"w": "or", "b": [0.5653, 0.0883, 0.5821, 0.1034]}, {"w": "other", "b": [0.5883, 0.0883, 0.6313, 0.1034]}, {"w": "legal", "b": [0.6375, 0.0883, 0.6752, 0.1034]}, {"w": "norms?", "b": [0.6815, 0.0883, 0.7407, 0.1034]}, {"w": "If", "b": [0.7492, 0.0883, 0.7618, 0.1034]}, {"w": "so,", "b": [0.768, 0.0883, 0.7901, 0.1034]}, {"w": "have", "b": [0.7964, 0.0883, 0.8336, 0.1034]}, {"w": "you", "b": [0.8398, 0.0883, 0.8691, 0.1034]}, {"w": "established", "b": [0.1312, 0.1063, 0.2197, 0.1213]}, {"w": "who", "b": [0.2258, 0.1063, 0.2586, 0.1213]}, {"w": "owns", "b": [0.2648, 0.1063, 0.3043, 0.1213]}, {"w": "the", "b": [0.3105, 0.1063, 0.3361, 0.1213]}, {"w": "copyright", "b": [0.3423, 0.1063, 0.4177, 0.1213]}, {"w": "in", "b": [0.4239, 0.1063, 0.4392, 0.1213]}, {"w": "your", "b": [0.4454, 0.1063, 0.4813, 0.1213]}, {"w": "data?", "b": [0.4875, 0.1063, 0.5321, 0.1213]}, {"w": "Might", "b": [0.5403, 0.1063, 0.5885, 0.1213]}, {"w": "there", "b": [0.5946, 0.1063, 0.6357, 0.1213]}, {"w": "be", "b": [0.6418, 0.1063, 0.6608, 0.1213]}, {"w": "joint", "b": [0.667, 0.1063, 0.7039, 0.1213]}, {"w": "copyright?", "b": [0.71, 0.1063, 0.7942, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "Is the data sensitive (e.g., concerning your organization’s projects, clients, or partners, or it is classified by the government), and are there any potential privacy issues? If so, have you discussed data sharing with the respondents from whom you collected the data? Can you preserve personal information for a long-term so that it can be used in the future?", "words": [{"w": "Is", "b": [0.1312, 0.1333, 0.1452, 0.1482]}, {"w": "the", "b": [0.1513, 0.1333, 0.1769, 0.1482]}, {"w": "data", "b": [0.1831, 0.1333, 0.2189, 0.1482]}, {"w": "sensitive", "b": [0.2251, 0.1333, 0.2928, 0.1482]}, {"w": "(e.g.,", "b": [0.299, 0.1333, 0.3389, 0.1482]}, {"w": "concerning", "b": [0.3451, 0.1333, 0.4311, 0.1482]}, {"w": "your", "b": [0.4373, 0.1333, 0.4732, 0.1482]}, {"w": "organization’s", "b": [0.4793, 0.1333, 0.591, 0.1482]}, {"w": "projects,", "b": [0.5972, 0.1333, 0.6659, 0.1482]}, {"w": "clients,", "b": [0.6721, 0.1333, 0.728, 0.1482]}, {"w": "or", "b": [0.7342, 0.1333, 0.7506, 0.1482]}, {"w": "partners,", "b": [0.7568, 0.1333, 0.8286, 0.1482]}, {"w": "or", "b": [0.8348, 0.1333, 0.8512, 0.1482]}, {"w": "it", "b": [0.8574, 0.1333, 0.8697, 0.1482]}, {"w": "is", "b": [0.1312, 0.1512, 0.1437, 0.1662]}, {"w": "classified", "b": [0.1498, 0.1512, 0.221, 0.1662]}, {"w": "by", "b": [0.2271, 0.1512, 0.2467, 0.1662]}, {"w": "the", "b": [0.2528, 0.1512, 0.2785, 0.1662]}, {"w": "government),", "b": [0.2847, 0.1512, 0.3907, 0.1662]}, {"w": "and", "b": [0.3968, 0.1512, 0.4266, 0.1662]}, {"w": "are", "b": [0.4328, 0.1512, 0.4575, 0.1662]}, {"w": "there", "b": [0.4637, 0.1512, 0.5048, 0.1662]}, {"w": "any", "b": [0.511, 0.1512, 0.5398, 0.1662]}, {"w": "potential", "b": [0.5459, 0.1512, 0.6179, 0.1662]}, {"w": "privacy", "b": [0.624, 0.1512, 0.6827, 0.1662]}, {"w": "issues?", "b": [0.6889, 0.1512, 0.7432, 0.1662]}, {"w": "If", "b": [0.7514, 0.1512, 0.7637, 0.1662]}, {"w": "so,", "b": [0.7699, 0.1512, 0.7916, 0.1662]}, {"w": "have", "b": [0.7977, 0.1512, 0.8342, 0.1662]}, {"w": "you", "b": [0.8403, 0.1512, 0.8691, 0.1662]}, {"w": "discussed", "b": [0.1312, 0.169, 0.2069, 0.1841]}, {"w": "data", "b": [0.2131, 0.169, 0.2497, 0.1841]}, {"w": "sharing", "b": [0.256, 0.169, 0.3157, 0.1841]}, {"w": "with", "b": [0.322, 0.169, 0.3586, 0.1841]}, {"w": "the", "b": [0.3648, 0.169, 0.391, 0.1841]}, {"w": "respondents", "b": [0.3972, 0.169, 0.4948, 0.1841]}, {"w": "from", "b": [0.501, 0.169, 0.5393, 0.1841]}, {"w": "whom", "b": [0.5455, 0.169, 0.5946, 0.1841]}, {"w": "you", "b": [0.6008, 0.169, 0.6301, 0.1841]}, {"w": "collected", "b": [0.6364, 0.169, 0.7075, 0.1841]}, {"w": "the", "b": [0.7138, 0.169, 0.7399, 0.1841]}, {"w": "data?", "b": [0.7462, 0.169, 0.7916, 0.1841]}, {"w": "Can", "b": [0.8001, 0.169, 0.8336, 0.1841]}, {"w": "you", "b": [0.8398, 0.169, 0.8691, 0.1841]}, {"w": "preserve", "b": [0.1312, 0.1871, 0.1971, 0.2021]}, {"w": "personal", "b": [0.2032, 0.1871, 0.2706, 0.2021]}, {"w": "information", "b": [0.2767, 0.1871, 0.3706, 0.2021]}, {"w": "for", "b": [0.3767, 0.1871, 0.3988, 0.2021]}, {"w": "a", "b": [0.405, 0.1871, 0.4142, 0.2021]}, {"w": "long-term", "b": [0.4204, 0.1871, 0.4983, 0.2021]}, {"w": "so", "b": [0.5045, 0.1871, 0.521, 0.2021]}, {"w": "that", "b": [0.5271, 0.1871, 0.561, 0.2021]}, {"w": "it", "b": [0.5671, 0.1871, 0.5794, 0.2021]}, {"w": "can", "b": [0.5856, 0.1871, 0.6133, 0.2021]}, {"w": "be", "b": [0.6194, 0.1871, 0.6384, 0.2021]}, {"w": "used", "b": [0.6445, 0.1871, 0.6806, 0.2021]}, {"w": "in", "b": [0.6867, 0.1871, 0.7021, 0.2021]}, {"w": "the", "b": [0.7083, 0.1871, 0.7339, 0.2021]}, {"w": "future?", "b": [0.74, 0.1871, 0.7975, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "Do you need to share the data along with the model? If so, do you need to get written consent from owners or respondents?", "words": [{"w": "Do", "b": [0.1312, 0.2139, 0.155, 0.229]}, {"w": "you", "b": [0.1623, 0.2139, 0.1916, 0.229]}, {"w": "need", "b": [0.1989, 0.2139, 0.2366, 0.229]}, {"w": "to", "b": [0.2439, 0.2139, 0.2607, 0.229]}, {"w": "share", "b": [0.268, 0.2139, 0.311, 0.229]}, {"w": "the", "b": [0.3183, 0.2139, 0.3445, 0.229]}, {"w": "data", "b": [0.3518, 0.2139, 0.3884, 0.229]}, {"w": "along", "b": [0.3957, 0.2139, 0.4396, 0.229]}, {"w": "with", "b": [0.447, 0.2139, 0.4836, 0.229]}, {"w": "the", "b": [0.4909, 0.2139, 0.517, 0.229]}, {"w": "model?", "b": [0.5243, 0.2139, 0.5829, 0.229]}, {"w": "If", "b": [0.5946, 0.2139, 0.6071, 0.229]}, {"w": "so,", "b": [0.6144, 0.2139, 0.6365, 0.229]}, {"w": "do", "b": [0.6441, 0.2139, 0.664, 0.229]}, {"w": "you", "b": [0.6713, 0.2139, 0.7006, 0.229]}, {"w": "need", "b": [0.7079, 0.2139, 0.7456, 0.229]}, {"w": "to", "b": [0.7529, 0.2139, 0.7696, 0.229]}, {"w": "get", "b": [0.7769, 0.2139, 0.802, 0.229]}, {"w": "written", "b": [0.8094, 0.2139, 0.869, 0.229]}, {"w": "consent", "b": [0.1312, 0.232, 0.1913, 0.2469]}, {"w": "from", "b": [0.1975, 0.232, 0.235, 0.2469]}, {"w": "owners", "b": [0.2411, 0.232, 0.2961, 0.2469]}, {"w": "or", "b": [0.3023, 0.232, 0.3187, 0.2469]}, {"w": "respondents?", "b": [0.3249, 0.232, 0.4292, 0.2469]}]}, {"id": "b_3", "type": "paragraph", "text": "Do you need to anonymize data,1 for example, to remove personally identifiable infor- mation (PII), during analysis or in preparation for sharing?", "words": [{"w": "Do", "b": [0.1312, 0.2588, 0.155, 0.2739]}, {"w": "you", "b": [0.1612, 0.2588, 0.1905, 0.2739]}, {"w": "need", "b": [0.1966, 0.2588, 0.2343, 0.2739]}, {"w": "to", "b": [0.2404, 0.2588, 0.2571, 0.2739]}, {"w": "anonymize", "b": [0.2633, 0.2588, 0.3501, 0.2739]}, {"w": "data,1", "b": [0.3562, 0.257, 0.4053, 0.2739]}, {"w": "for", "b": [0.4124, 0.2588, 0.4349, 0.2739]}, {"w": "example,", "b": [0.441, 0.2588, 0.5137, 0.2739]}, {"w": "to", "b": [0.5199, 0.2588, 0.5366, 0.2739]}, {"w": "remove", "b": [0.5427, 0.2588, 0.6009, 0.2739]}, {"w": "personally", "b": [0.6069, 0.2589, 0.7019, 0.2739]}, {"w": "identifiable", "b": [0.7089, 0.2589, 0.8112, 0.2739]}, {"w": "infor-", "b": [0.8183, 0.2589, 0.8688, 0.2739]}, {"w": "mation", "b": [0.1312, 0.2768, 0.1958, 0.2918]}, {"w": "(PII),", "b": [0.202, 0.2768, 0.2527, 0.2918]}, {"w": "during", "b": [0.2588, 0.2768, 0.3112, 0.2918]}, {"w": "analysis", "b": [0.3173, 0.2768, 0.3806, 0.2918]}, {"w": "or", "b": [0.3867, 0.2768, 0.4032, 0.2918]}, {"w": "in", "b": [0.4093, 0.2768, 0.4247, 0.2918]}, {"w": "preparation", "b": [0.4309, 0.2768, 0.5243, 0.2918]}, {"w": "for", "b": [0.5304, 0.2768, 0.5525, 0.2918]}, {"w": "sharing?", "b": [0.5587, 0.2768, 0.626, 0.2918]}]}, {"id": "b_4", "type": "paragraph", "text": "Even if it’s physically possible to get the data you need, don’t work with it until all the above questions are resolved.", "words": [{"w": "Even", "b": [0.1312, 0.3039, 0.1707, 0.3187]}, {"w": "if", "b": [0.1763, 0.3039, 0.1868, 0.3187]}, {"w": "it’s", "b": [0.1925, 0.3039, 0.2167, 0.3187]}, {"w": "physically", "b": [0.2223, 0.3039, 0.3003, 0.3187]}, {"w": "possible", "b": [0.3059, 0.3039, 0.3679, 0.3187]}, {"w": "to", "b": [0.3735, 0.3039, 0.3896, 0.3187]}, {"w": "get", "b": [0.3952, 0.3039, 0.4193, 0.3187]}, {"w": "the", "b": [0.4249, 0.3039, 0.4501, 0.3187]}, {"w": "data", "b": [0.4557, 0.3039, 0.4908, 0.3187]}, {"w": "you", "b": [0.4964, 0.3039, 0.5246, 0.3187]}, {"w": "need,", "b": [0.5302, 0.3039, 0.5714, 0.3187]}, {"w": "don’t", "b": [0.5771, 0.3039, 0.6183, 0.3187]}, {"w": "work", "b": [0.6239, 0.3039, 0.6621, 0.3187]}, {"w": "with", "b": [0.6677, 0.3039, 0.7029, 0.3187]}, {"w": "it", "b": [0.7085, 0.3039, 0.7206, 0.3187]}, {"w": "until", "b": [0.7262, 0.3039, 0.7629, 0.3187]}, {"w": "all", "b": [0.7685, 0.3039, 0.7876, 0.3187]}, {"w": "the", "b": [0.7932, 0.3039, 0.8183, 0.3187]}, {"w": "above", "b": [0.8239, 0.3039, 0.8691, 0.3187]}, {"w": "questions", "b": [0.1312, 0.3217, 0.2058, 0.3367]}, {"w": "are", "b": [0.2119, 0.3217, 0.2366, 0.3367]}, {"w": "resolved.", "b": [0.2428, 0.3217, 0.3127, 0.3367]}]}, {"id": "b_5", "type": "paragraph", "text": "3.1.2 Is the Data Sizeable?", "words": [{"w": "3.1.2", "b": [0.1312, 0.3696, 0.1749, 0.3845]}, {"w": "Is", "b": [0.1961, 0.3696, 0.2125, 0.3845]}, {"w": "the", "b": [0.2196, 0.3696, 0.2493, 0.3845]}, {"w": "Data", "b": [0.2564, 0.3696, 0.3016, 0.3845]}, {"w": "Sizeable?", "b": [0.3086, 0.3696, 0.3932, 0.3845]}]}, {"id": "b_6", "type": "paragraph", "text": "The question for which you would like to have a definitive answer is whether there’s enough data. However, as we already found out, it’s usually not known how much data is needed to reach your goal, especially if the minimum model quality requirement is stringent.", "words": [{"w": "The", "b": [0.1306, 0.4062, 0.1621, 0.4211]}, {"w": "question", "b": [0.1683, 0.4062, 0.2351, 0.4211]}, {"w": "for", "b": [0.2413, 0.4062, 0.2632, 0.4211]}, {"w": "which", "b": [0.2694, 0.4062, 0.3157, 0.4211]}, {"w": "you", "b": [0.3218, 0.4062, 0.3504, 0.4211]}, {"w": "would", "b": [0.3565, 0.4062, 0.4038, 0.4211]}, {"w": "like", "b": [0.41, 0.4062, 0.4375, 0.4211]}, {"w": "to", "b": [0.4436, 0.4062, 0.4599, 0.4211]}, {"w": "have", "b": [0.4661, 0.4062, 0.5022, 0.4211]}, {"w": "a", "b": [0.5084, 0.4062, 0.5175, 0.4211]}, {"w": "definitive", "b": [0.5237, 0.4062, 0.597, 0.4211]}, {"w": "answer", "b": [0.6032, 0.4062, 0.6578, 0.4211]}, {"w": "is", "b": [0.664, 0.4062, 0.6763, 0.4211]}, {"w": "whether", "b": [0.6825, 0.4062, 0.7467, 0.4211]}, {"w": "there’s", "b": [0.7528, 0.4062, 0.806, 0.4211]}, {"w": "enough", "b": [0.8121, 0.4062, 0.8691, 0.4211]}, {"w": "data.", "b": [0.1312, 0.4241, 0.1718, 0.439]}, {"w": "However,", "b": [0.18, 0.4241, 0.2525, 0.439]}, {"w": "as", "b": [0.2587, 0.4241, 0.275, 0.439]}, {"w": "we", "b": [0.2812, 0.4241, 0.3019, 0.439]}, {"w": "already", "b": [0.3081, 0.4241, 0.3665, 0.439]}, {"w": "found", "b": [0.3726, 0.4241, 0.4178, 0.439]}, {"w": "out,", "b": [0.4239, 0.4241, 0.4553, 0.439]}, {"w": "it’s", "b": [0.4615, 0.4241, 0.4859, 0.439]}, {"w": "usually", "b": [0.4921, 0.4241, 0.5485, 0.439]}, {"w": "not", "b": [0.5546, 0.4241, 0.581, 0.439]}, {"w": "known", "b": [0.5872, 0.4241, 0.6389, 0.439]}, {"w": "how", "b": [0.645, 0.4241, 0.6769, 0.439]}, {"w": "much", "b": [0.6831, 0.4241, 0.7257, 0.439]}, {"w": "data", "b": [0.7318, 0.4241, 0.7673, 0.439]}, {"w": "is", "b": [0.7735, 0.4241, 0.7857, 0.439]}, {"w": "needed", "b": [0.7919, 0.4241, 0.8467, 0.439]}, {"w": "to", "b": [0.8528, 0.4241, 0.8691, 0.439]}, {"w": "reach", "b": [0.1312, 0.442, 0.1739, 0.457]}, {"w": "your", "b": [0.18, 0.442, 0.216, 0.457]}, {"w": "goal,", "b": [0.2221, 0.442, 0.26, 0.457]}, {"w": "especially", "b": [0.2662, 0.442, 0.3432, 0.457]}, {"w": "if", "b": [0.3494, 0.442, 0.3601, 0.457]}, {"w": "the", "b": [0.3663, 0.442, 0.3919, 0.457]}, {"w": "minimum", "b": [0.3981, 0.442, 0.4744, 0.457]}, {"w": "model", "b": [0.4806, 0.442, 0.5293, 0.457]}, {"w": "quality", "b": [0.5354, 0.442, 0.5913, 0.457]}, {"w": "requirement", "b": [0.5975, 0.442, 0.694, 0.457]}, {"w": "is", "b": [0.7001, 0.442, 0.7126, 0.457]}, {"w": "stringent.", "b": [0.7187, 0.442, 0.7953, 0.457]}]}, {"id": "b_7", "type": "paragraph", "text": "If you have doubts about the immediate availability of sufficient data, find out how frequently new data gets generated. For some projects, you can start with what’s initially available and, while you are working on feature engineering, modeling, and solving other relevant technical problems, new data might gradually come in. It can come in naturally, as the result of some observable or measurable process, or progressively be provided by your data labeling experts or a third-party data provider.", "words": [{"w": "If", "b": [0.1312, 0.4691, 0.1433, 0.4839]}, {"w": "you", "b": [0.1488, 0.4691, 0.177, 0.4839]}, {"w": "have", "b": [0.1825, 0.4691, 0.2181, 0.4839]}, {"w": "doubts", "b": [0.2237, 0.4691, 0.2771, 0.4839]}, {"w": "about", "b": [0.2826, 0.4691, 0.3283, 0.4839]}, {"w": "the", "b": [0.3339, 0.4691, 0.359, 0.4839]}, {"w": "immediate", "b": [0.3645, 0.4691, 0.4469, 0.4839]}, {"w": "availability", "b": [0.4524, 0.4691, 0.5388, 0.4839]}, {"w": "of", "b": [0.5443, 0.4691, 0.5589, 0.4839]}, {"w": "sufficient", "b": [0.5645, 0.4691, 0.6344, 0.4839]}, {"w": "data,", "b": [0.6399, 0.4691, 0.6801, 0.4839]}, {"w": "find", "b": [0.6858, 0.4691, 0.7159, 0.4839]}, {"w": "out", "b": [0.7215, 0.4691, 0.7476, 0.4839]}, {"w": "how", "b": [0.7531, 0.4691, 0.7848, 0.4839]}, {"w": "frequently", "b": [0.7903, 0.4691, 0.8698, 0.4839]}, {"w": "new", "b": [0.1312, 0.487, 0.1624, 0.5018]}, {"w": "data", "b": [0.1684, 0.487, 0.2035, 0.5018]}, {"w": "gets", "b": [0.2095, 0.487, 0.2407, 0.5018]}, {"w": "generated.", "b": [0.2467, 0.487, 0.3282, 0.5018]}, {"w": "For", "b": [0.3363, 0.487, 0.3627, 0.5018]}, {"w": "some", "b": [0.3687, 0.487, 0.408, 0.5018]}, {"w": "projects,", "b": [0.414, 0.487, 0.4815, 0.5018]}, {"w": "you", "b": [0.4875, 0.487, 0.5156, 0.5018]}, {"w": "can", "b": [0.5216, 0.487, 0.5487, 0.5018]}, {"w": "start", "b": [0.5547, 0.487, 0.592, 0.5018]}, {"w": "with", "b": [0.598, 0.487, 0.6331, 0.5018]}, {"w": "what’s", "b": [0.6391, 0.487, 0.6905, 0.5018]}, {"w": "initially", "b": [0.6964, 0.487, 0.7572, 0.5018]}, {"w": "available", "b": [0.7632, 0.487, 0.8315, 0.5018]}, {"w": "and,", "b": [0.8375, 0.487, 0.8717, 0.5018]}, {"w": "while", "b": [0.1306, 0.5049, 0.1722, 0.5198]}, {"w": "you", "b": [0.1783, 0.5049, 0.2067, 0.5198]}, {"w": "are", "b": [0.2128, 0.5049, 0.2372, 0.5198]}, {"w": "working", "b": [0.2434, 0.5049, 0.3063, 0.5198]}, {"w": "on", "b": [0.3125, 0.5049, 0.3317, 0.5198]}, {"w": "feature", "b": [0.3379, 0.5049, 0.3932, 0.5198]}, {"w": "engineering,", "b": [0.3994, 0.5049, 0.4948, 0.5198]}, {"w": "modeling,", "b": [0.5009, 0.5049, 0.5785, 0.5198]}, {"w": "and", "b": [0.5847, 0.5049, 0.6141, 0.5198]}, {"w": "solving", "b": [0.6202, 0.5049, 0.6756, 0.5198]}, {"w": "other", "b": [0.6818, 0.5049, 0.7234, 0.5198]}, {"w": "relevant", "b": [0.7296, 0.5049, 0.7925, 0.5198]}, {"w": "technical", "b": [0.7986, 0.5049, 0.8691, 0.5198]}, {"w": "problems,", "b": [0.1312, 0.5229, 0.2082, 0.5377]}, {"w": "new", "b": [0.2144, 0.5229, 0.2457, 0.5377]}, {"w": "data", "b": [0.2519, 0.5229, 0.2872, 0.5377]}, {"w": "might", "b": [0.2934, 0.5229, 0.3394, 0.5377]}, {"w": "gradually", "b": [0.3455, 0.5229, 0.4199, 0.5377]}, {"w": "come", "b": [0.426, 0.5229, 0.4664, 0.5377]}, {"w": "in.", "b": [0.4726, 0.5229, 0.4928, 0.5377]}, {"w": "It", "b": [0.501, 0.5229, 0.5146, 0.5377]}, {"w": "can", "b": [0.5208, 0.5229, 0.5481, 0.5377]}, {"w": "come", "b": [0.5542, 0.5229, 0.5946, 0.5377]}, {"w": "in", "b": [0.6008, 0.5229, 0.6159, 0.5377]}, {"w": "naturally,", "b": [0.6221, 0.5229, 0.698, 0.5377]}, {"w": "as", "b": [0.7041, 0.5229, 0.7204, 0.5377]}, {"w": "the", "b": [0.7265, 0.5229, 0.7518, 0.5377]}, {"w": "result", "b": [0.7579, 0.5229, 0.8026, 0.5377]}, {"w": "of", "b": [0.8087, 0.5229, 0.8234, 0.5377]}, {"w": "some", "b": [0.8295, 0.5229, 0.8691, 0.5377]}, {"w": "observable", "b": [0.1312, 0.5408, 0.2135, 0.5557]}, {"w": "or", "b": [0.2197, 0.5408, 0.2359, 0.5557]}, {"w": "measurable", "b": [0.242, 0.5408, 0.3309, 0.5557]}, {"w": "process,", "b": [0.337, 0.5408, 0.3993, 0.5557]}, {"w": "or", "b": [0.4055, 0.5408, 0.4217, 0.5557]}, {"w": "progressively", "b": [0.4278, 0.5408, 0.5294, 0.5557]}, {"w": "be", "b": [0.5356, 0.5408, 0.5542, 0.5557]}, {"w": "provided", "b": [0.5604, 0.5408, 0.629, 0.5557]}, {"w": "by", "b": [0.6352, 0.5408, 0.6543, 0.5557]}, {"w": "your", "b": [0.6605, 0.5408, 0.6958, 0.5557]}, {"w": "data", "b": [0.7019, 0.5408, 0.7372, 0.5557]}, {"w": "labeling", "b": [0.7434, 0.5408, 0.8054, 0.5557]}, {"w": "experts", "b": [0.8115, 0.5408, 0.8692, 0.5557]}, {"w": "or", "b": [0.1312, 0.5587, 0.1477, 0.5736]}, {"w": "a", "b": [0.1538, 0.5587, 0.1631, 0.5736]}, {"w": "third-party", "b": [0.1692, 0.5587, 0.2585, 0.5736]}, {"w": "data", "b": [0.2647, 0.5587, 0.3006, 0.5736]}, {"w": "provider.", "b": [0.3067, 0.5587, 0.3786, 0.5736]}]}, {"id": "b_8", "type": "paragraph", "text": "Consider the estimated time needed to accomplish the project. Will a sufficiently large dataset2 be gathered during this time? Base your answer on the experience working on similar projects or results reported in the literature.", "words": [{"w": "Consider", "b": [0.1312, 0.5855, 0.2036, 0.6006]}, {"w": "the", "b": [0.2113, 0.5855, 0.2375, 0.6006]}, {"w": "estimated", "b": [0.2453, 0.5855, 0.3249, 0.6006]}, {"w": "time", "b": [0.3327, 0.5855, 0.3693, 0.6006]}, {"w": "needed", "b": [0.3771, 0.5855, 0.4335, 0.6006]}, {"w": "to", "b": [0.4413, 0.5855, 0.4581, 0.6006]}, {"w": "accomplish", "b": [0.4658, 0.5855, 0.5559, 0.6006]}, {"w": "the", "b": [0.5637, 0.5855, 0.5899, 0.6006]}, {"w": "project.", "b": [0.5976, 0.5855, 0.6604, 0.6006]}, {"w": "Will", "b": [0.6735, 0.5855, 0.7086, 0.6006]}, {"w": "a", "b": [0.7164, 0.5855, 0.7258, 0.6006]}, {"w": "sufficiently", "b": [0.7335, 0.5855, 0.8215, 0.6006]}, {"w": "large", "b": [0.8293, 0.5855, 0.8691, 0.6006]}, {"w": "dataset2", "b": [0.1312, 0.6016, 0.1983, 0.6185]}, {"w": "be", "b": [0.2067, 0.6034, 0.226, 0.6185]}, {"w": "gathered", "b": [0.2335, 0.6034, 0.3047, 0.6185]}, {"w": "during", "b": [0.3122, 0.6034, 0.3656, 0.6185]}, {"w": "this", "b": [0.3731, 0.6034, 0.4035, 0.6185]}, {"w": "time?", "b": [0.411, 0.6034, 0.4565, 0.6185]}, {"w": "Base", "b": [0.4687, 0.6034, 0.5072, 0.6185]}, {"w": "your", "b": [0.5147, 0.6034, 0.5514, 0.6185]}, {"w": "answer", "b": [0.5589, 0.6034, 0.615, 0.6185]}, {"w": "on", "b": [0.6225, 0.6034, 0.6424, 0.6185]}, {"w": "the", "b": [0.6498, 0.6034, 0.676, 0.6185]}, {"w": "experience", "b": [0.6835, 0.6034, 0.7693, 0.6185]}, {"w": "working", "b": [0.7768, 0.6034, 0.8417, 0.6185]}, {"w": "on", "b": [0.8492, 0.6034, 0.8691, 0.6185]}, {"w": "similar", "b": [0.1312, 0.6215, 0.1857, 0.6364]}, {"w": "projects", "b": [0.1919, 0.6215, 0.2556, 0.6364]}, {"w": "or", "b": [0.2618, 0.6215, 0.2782, 0.6364]}, {"w": "results", "b": [0.2844, 0.6215, 0.337, 0.6364]}, {"w": "reported", "b": [0.3431, 0.6215, 0.4114, 0.6364]}, {"w": "in", "b": [0.4176, 0.6215, 0.433, 0.6364]}, {"w": "the", "b": [0.4391, 0.6215, 0.4648, 0.6364]}, {"w": "literature.", "b": [0.4709, 0.6215, 0.551, 0.6364]}]}, {"id": "b_9", "type": "paragraph", "text": "One practical way to find out if you have collected sufficient data is to plot learning curves. More specifically, plot the training and validation scores of your learning algorithm for varying numbers of training examples, as shown in Figure 2.", "words": [{"w": "One", "b": [0.1312, 0.6485, 0.1634, 0.6633]}, {"w": "practical", "b": [0.1691, 0.6485, 0.2375, 0.6633]}, {"w": "way", "b": [0.2432, 0.6485, 0.2738, 0.6633]}, {"w": "to", "b": [0.2795, 0.6485, 0.2956, 0.6633]}, {"w": "find", "b": [0.3013, 0.6485, 0.3315, 0.6633]}, {"w": "out", "b": [0.3372, 0.6485, 0.3633, 0.6633]}, {"w": "if", "b": [0.369, 0.6485, 0.3796, 0.6633]}, {"w": "you", "b": [0.3853, 0.6485, 0.4134, 0.6633]}, {"w": "have", "b": [0.4191, 0.6485, 0.4548, 0.6633]}, {"w": "collected", "b": [0.4605, 0.6485, 0.5289, 0.6633]}, {"w": "sufficient", "b": [0.5346, 0.6485, 0.6045, 0.6633]}, {"w": "data", "b": [0.6102, 0.6485, 0.6454, 0.6633]}, {"w": "is", "b": [0.6511, 0.6485, 0.6633, 0.6633]}, {"w": "to", "b": [0.669, 0.6485, 0.6851, 0.6633]}, {"w": "plot", "b": [0.6908, 0.6485, 0.7219, 0.6633]}, {"w": "learning", "b": [0.7274, 0.6484, 0.8021, 0.6634]}, {"w": "curves.", "b": [0.8087, 0.6484, 0.8724, 0.6634]}, {"w": "More", "b": [0.1312, 0.6665, 0.172, 0.6813]}, {"w": "specifically,", "b": [0.1771, 0.6665, 0.2661, 0.6813]}, {"w": "plot", "b": [0.2714, 0.6665, 0.3026, 0.6813]}, {"w": "the", "b": [0.3077, 0.6665, 0.3328, 0.6813]}, {"w": "training", "b": [0.3379, 0.6665, 0.4002, 0.6813]}, {"w": "and", "b": [0.4053, 0.6665, 0.4345, 0.6813]}, {"w": "validation", "b": [0.4396, 0.6665, 0.5174, 0.6813]}, {"w": "scores", "b": [0.5225, 0.6665, 0.569, 0.6813]}, {"w": "of", "b": [0.5741, 0.6665, 0.5887, 0.6813]}, {"w": "your", "b": [0.5938, 0.6665, 0.629, 0.6813]}, {"w": "learning", "b": [0.6341, 0.6665, 0.6975, 0.6813]}, {"w": "algorithm", "b": [0.7026, 0.6665, 0.779, 0.6813]}, {"w": "for", "b": [0.784, 0.6665, 0.8057, 0.6813]}, {"w": "varying", "b": [0.8108, 0.6665, 0.8691, 0.6813]}, {"w": "numbers", "b": [0.1312, 0.6843, 0.1996, 0.6993]}, {"w": "of", "b": [0.2057, 0.6843, 0.2206, 0.6993]}, {"w": "training", "b": [0.2268, 0.6843, 0.2904, 0.6993]}, {"w": "examples,", "b": [0.2965, 0.6843, 0.3751, 0.6993]}, {"w": "as", "b": [0.3812, 0.6843, 0.3978, 0.6993]}, {"w": "shown", "b": [0.4039, 0.6843, 0.4537, 0.6993]}, {"w": "in", "b": [0.4599, 0.6843, 0.4753, 0.6993]}, {"w": "Figure", "b": [0.4814, 0.6843, 0.5335, 0.6993]}, {"w": "2.", "b": [0.5397, 0.6843, 0.554, 0.6993]}]}, {"id": "b_10", "type": "paragraph", "text": "By looking at the learning curves, you will see your model’s performance will plateau after you reach a certain number of training examples. Upon reaching that number of training", "words": [{"w": "By", "b": [0.1312, 0.7112, 0.1542, 0.7262]}, {"w": "looking", "b": [0.1604, 0.7112, 0.2193, 0.7262]}, {"w": "at", "b": [0.2254, 0.7112, 0.242, 0.7262]}, {"w": "the", "b": [0.2481, 0.7112, 0.274, 0.7262]}, {"w": "learning", "b": [0.2801, 0.7112, 0.3453, 0.7262]}, {"w": "curves,", "b": [0.3514, 0.7112, 0.4074, 0.7262]}, {"w": "you", "b": [0.4136, 0.7112, 0.4425, 0.7262]}, {"w": "will", "b": [0.4487, 0.7112, 0.4776, 0.7262]}, {"w": "see", "b": [0.4838, 0.7112, 0.5077, 0.7262]}, {"w": "your", "b": [0.5138, 0.7112, 0.5501, 0.7262]}, {"w": "model’s", "b": [0.5562, 0.7112, 0.6178, 0.7262]}, {"w": "performance", "b": [0.624, 0.7112, 0.7243, 0.7262]}, {"w": "will", "b": [0.7305, 0.7112, 0.7594, 0.7262]}, {"w": "plateau", "b": [0.7656, 0.7112, 0.8255, 0.7262]}, {"w": "after", "b": [0.8317, 0.7112, 0.8695, 0.7262]}, {"w": "you", "b": [0.1308, 0.7291, 0.1601, 0.7442]}, {"w": "reach", "b": [0.1665, 0.7291, 0.21, 0.7442]}, {"w": "a", "b": [0.2165, 0.7291, 0.2259, 0.7442]}, {"w": "certain", "b": [0.2323, 0.7291, 0.2889, 0.7442]}, {"w": "number", "b": [0.2953, 0.7291, 0.3576, 0.7442]}, {"w": "of", "b": [0.3641, 0.7291, 0.3793, 0.7442]}, {"w": "training", "b": [0.3857, 0.7291, 0.4506, 0.7442]}, {"w": "examples.", "b": [0.4571, 0.7291, 0.5372, 0.7442]}, {"w": "Upon", "b": [0.5464, 0.7291, 0.5913, 0.7442]}, {"w": "reaching", "b": [0.5978, 0.7291, 0.6664, 0.7442]}, {"w": "that", "b": [0.6728, 0.7291, 0.7073, 0.7442]}, {"w": "number", "b": [0.7138, 0.7291, 0.7761, 0.7442]}, {"w": "of", "b": [0.7826, 0.7291, 0.7977, 0.7442]}, {"w": "training", "b": [0.8042, 0.7291, 0.8691, 0.7442]}]}, {"id": "b_11", "type": "paragraph", "text": "1An illustrative example is the content redistribution policy of Twitter. The policy restricts the sharing of tweet information other than tweet IDs and user IDs. Twitter wants the analysts always to pull fresh data using Twitter API. One possible explanation of such a restriction is that some users might want to delete a particular tweet because they changed their mind or found it too controversial. If that tweet has already been pulled and is shared on a public domain, then it might make that user vulnerable.", "words": [{"w": "1An", "b": [0.1518, 0.7559, 0.1795, 0.7698]}, {"w": "illustrative", "b": [0.1847, 0.7579, 0.2565, 0.7698]}, {"w": "example", "b": [0.2617, 0.7579, 0.3168, 0.7698]}, {"w": "is", "b": [0.322, 0.7579, 0.3323, 0.7698]}, {"w": "the", "b": [0.3375, 0.7579, 0.3589, 0.7698]}, {"w": "content", "b": [0.3641, 0.7579, 0.4136, 0.7698]}, {"w": "redistribution", "b": [0.4188, 0.7579, 0.5102, 0.7698]}, {"w": "policy", "b": [0.5154, 0.7579, 0.5555, 0.7698]}, {"w": "of", "b": [0.5607, 0.7579, 0.5731, 0.7698]}, {"w": "Twitter.", "b": [0.5783, 0.7579, 0.6325, 0.7698]}, {"w": "The", "b": [0.6395, 0.7579, 0.6659, 0.7698]}, {"w": "policy", "b": [0.6711, 0.7579, 0.7113, 0.7698]}, {"w": "restricts", "b": [0.7165, 0.7579, 0.7704, 0.7698]}, {"w": "the", "b": [0.7757, 0.7579, 0.797, 0.7698]}, {"w": "sharing", "b": [0.8022, 0.7579, 0.851, 0.7698]}, {"w": "of", "b": [0.8562, 0.7579, 0.8685, 0.7698]}, {"w": "tweet", "b": [0.1312, 0.772, 0.1682, 0.784]}, {"w": "information", "b": [0.1734, 0.772, 0.2538, 0.784]}, {"w": "other", "b": [0.259, 0.772, 0.2951, 0.784]}, {"w": "than", "b": [0.3003, 0.772, 0.3319, 0.784]}, {"w": "tweet", "b": [0.3371, 0.772, 0.3741, 0.784]}, {"w": "IDs", "b": [0.3793, 0.772, 0.4033, 0.784]}, {"w": "and", "b": [0.4085, 0.772, 0.434, 0.784]}, {"w": "user", "b": [0.4393, 0.772, 0.4675, 0.784]}, {"w": "IDs.", "b": [0.4727, 0.772, 0.5011, 0.784]}, {"w": "Twitter", "b": [0.5081, 0.772, 0.5595, 0.784]}, {"w": "wants", "b": [0.5647, 0.772, 0.6044, 0.784]}, {"w": "the", "b": [0.6096, 0.772, 0.6316, 0.784]}, {"w": "analysts", "b": [0.6368, 0.772, 0.6928, 0.784]}, {"w": "always", "b": [0.698, 0.772, 0.7434, 0.784]}, {"w": "to", "b": [0.7486, 0.772, 0.7627, 0.784]}, {"w": "pull", "b": [0.7679, 0.772, 0.7943, 0.784]}, {"w": "fresh", "b": [0.7995, 0.772, 0.8325, 0.784]}, {"w": "data", "b": [0.8378, 0.772, 0.8685, 0.784]}, {"w": "using", "b": [0.1312, 0.7862, 0.1671, 0.7982]}, {"w": "Twitter", "b": [0.1723, 0.7862, 0.2233, 0.7982]}, {"w": "API.", "b": [0.2285, 0.7862, 0.261, 0.7982]}, {"w": "One", "b": [0.2662, 0.7862, 0.294, 0.7982]}, {"w": "possible", "b": [0.2993, 0.7862, 0.3531, 0.7982]}, {"w": "explanation", "b": [0.3583, 0.7862, 0.438, 0.7982]}, {"w": "of", "b": [0.4432, 0.7862, 0.4559, 0.7982]}, {"w": "such", "b": [0.4611, 0.7862, 0.4913, 0.7982]}, {"w": "a", "b": [0.4965, 0.7862, 0.5043, 0.7982]}, {"w": "restriction", "b": [0.5095, 0.7862, 0.5794, 0.7982]}, {"w": "is", "b": [0.5846, 0.7862, 0.5951, 0.7982]}, {"w": "that", "b": [0.6003, 0.7862, 0.6291, 0.7982]}, {"w": "some", "b": [0.6343, 0.7862, 0.6684, 0.7982]}, {"w": "users", "b": [0.6736, 0.7862, 0.7078, 0.7982]}, {"w": "might", "b": [0.713, 0.7862, 0.7527, 0.7982]}, {"w": "want", "b": [0.7579, 0.7862, 0.791, 0.7982]}, {"w": "to", "b": [0.7962, 0.7862, 0.8102, 0.7982]}, {"w": "delete", "b": [0.8154, 0.7862, 0.8555, 0.7982]}, {"w": "a", "b": [0.8607, 0.7862, 0.8685, 0.7982]}, {"w": "particular", "b": [0.1312, 0.8004, 0.1997, 0.8124]}, {"w": "tweet", "b": [0.2052, 0.8004, 0.2426, 0.8124]}, {"w": "because", "b": [0.2481, 0.8004, 0.302, 0.8124]}, {"w": "they", "b": [0.3075, 0.8004, 0.3382, 0.8124]}, {"w": "changed", "b": [0.3438, 0.8004, 0.4002, 0.8124]}, {"w": "their", "b": [0.4057, 0.8004, 0.4386, 0.8124]}, {"w": "mind", "b": [0.4442, 0.8004, 0.4797, 0.8124]}, {"w": "or", "b": [0.4853, 0.8004, 0.4995, 0.8124]}, {"w": "found", "b": [0.5051, 0.8004, 0.5446, 0.8124]}, {"w": "it", "b": [0.5502, 0.8004, 0.5609, 0.8124]}, {"w": "too", "b": [0.5664, 0.8004, 0.5891, 0.8124]}, {"w": "controversial.", "b": [0.5947, 0.8004, 0.6872, 0.8124]}, {"w": "If", "b": [0.6952, 0.8004, 0.7059, 0.8124]}, {"w": "that", "b": [0.7115, 0.8004, 0.7408, 0.8124]}, {"w": "tweet", "b": [0.7463, 0.8004, 0.7837, 0.8124]}, {"w": "has", "b": [0.7892, 0.8004, 0.8124, 0.8124]}, {"w": "already", "b": [0.818, 0.8004, 0.8691, 0.8124]}, {"w": "been", "b": [0.1312, 0.8147, 0.163, 0.8266]}, {"w": "pulled", "b": [0.1683, 0.8147, 0.21, 0.8266]}, {"w": "and", "b": [0.2153, 0.8147, 0.2405, 0.8266]}, {"w": "is", "b": [0.2458, 0.8147, 0.2563, 0.8266]}, {"w": "shared", "b": [0.2615, 0.8147, 0.306, 0.8266]}, {"w": "on", "b": [0.3113, 0.8147, 0.3278, 0.8266]}, {"w": "a", "b": [0.333, 0.8147, 0.3409, 0.8266]}, {"w": "public", "b": [0.3461, 0.8147, 0.3879, 0.8266]}, {"w": "domain,", "b": [0.3931, 0.8147, 0.448, 0.8266]}, {"w": "then", "b": [0.4532, 0.8147, 0.4837, 0.8266]}, {"w": "it", "b": [0.4889, 0.8147, 0.4994, 0.8266]}, {"w": "might", "b": [0.5046, 0.8147, 0.5442, 0.8266]}, {"w": "make", "b": [0.5494, 0.8147, 0.5852, 0.8266]}, {"w": "that", "b": [0.5904, 0.8147, 0.6191, 0.8266]}, {"w": "user", "b": [0.6243, 0.8147, 0.6523, 0.8266]}, {"w": "vulnerable.", "b": [0.6575, 0.8147, 0.7329, 0.8266]}]}, {"id": "b_12", "type": "paragraph", "text": "2Don’t forget, in your estimates, that you need not just training but also holdout data to validate the model performance on the examples it wasn’t trained on. That holdout data also has to be sizeable to provide reliable, in a statistical sense, model quality estimates.", "words": [{"w": "2Don’t", "b": [0.1518, 0.827, 0.1992, 0.8409]}, {"w": "forget,", "b": [0.2047, 0.8288, 0.2496, 0.8409]}, {"w": "in", "b": [0.2552, 0.8288, 0.2685, 0.8409]}, {"w": "your", "b": [0.274, 0.8288, 0.3051, 0.8409]}, {"w": "estimates,", "b": [0.3106, 0.8288, 0.3801, 0.8409]}, {"w": "that", "b": [0.3856, 0.8288, 0.415, 0.8409]}, {"w": "you", "b": [0.4205, 0.8288, 0.4453, 0.8409]}, {"w": "need", "b": [0.4509, 0.8288, 0.4828, 0.8409]}, {"w": "not", "b": [0.4883, 0.8288, 0.5114, 0.8409]}, {"w": "just", "b": [0.5169, 0.8288, 0.5432, 0.8409]}, {"w": "training", "b": [0.5487, 0.8288, 0.6038, 0.8409]}, {"w": "but", "b": [0.6093, 0.8288, 0.6333, 0.8409]}, {"w": "also", "b": [0.6388, 0.8288, 0.6656, 0.8409]}, {"w": "holdout", "b": [0.671, 0.8288, 0.7243, 0.8409]}, {"w": "data", "b": [0.7299, 0.8288, 0.7609, 0.8409]}, {"w": "to", "b": [0.7664, 0.8288, 0.7806, 0.8409]}, {"w": "validate", "b": [0.7862, 0.8288, 0.8408, 0.8409]}, {"w": "the", "b": [0.8463, 0.8288, 0.8685, 0.8409]}, {"w": "model", "b": [0.1312, 0.8432, 0.1718, 0.855]}, {"w": "performance", "b": [0.1765, 0.8432, 0.2593, 0.855]}, {"w": "on", "b": [0.2641, 0.8432, 0.2803, 0.855]}, {"w": "the", "b": [0.285, 0.8432, 0.3064, 0.855]}, {"w": "examples", "b": [0.3111, 0.8432, 0.3722, 0.855]}, {"w": "it", "b": [0.3769, 0.8432, 0.3872, 0.855]}, {"w": "wasn’t", "b": [0.3919, 0.8432, 0.4351, 0.855]}, {"w": "trained", "b": [0.4398, 0.8432, 0.4876, 0.855]}, {"w": "on.", "b": [0.4924, 0.8432, 0.5128, 0.855]}, {"w": "That", "b": [0.5197, 0.8432, 0.5529, 0.855]}, {"w": "holdout", "b": [0.5577, 0.8432, 0.6089, 0.855]}, {"w": "data", "b": [0.6136, 0.8432, 0.6435, 0.855]}, {"w": "also", "b": [0.6482, 0.8432, 0.6739, 0.855]}, {"w": "has", "b": [0.6786, 0.8432, 0.7009, 0.855]}, {"w": "to", "b": [0.7056, 0.8432, 0.7193, 0.855]}, {"w": "be", "b": [0.724, 0.8432, 0.7398, 0.855]}, {"w": "sizeable", "b": [0.7446, 0.8432, 0.7959, 0.855]}, {"w": "to", "b": [0.8006, 0.8432, 0.8142, 0.855]}, {"w": "provide", "b": [0.819, 0.8432, 0.8685, 0.855]}, {"w": "reliable,", "b": [0.1312, 0.8573, 0.1852, 0.8692]}, {"w": "in", "b": [0.1905, 0.8573, 0.2035, 0.8692]}, {"w": "a", "b": [0.2088, 0.8573, 0.2166, 0.8692]}, {"w": "statistical", "b": [0.2218, 0.8573, 0.2882, 0.8692]}, {"w": "sense,", "b": [0.2934, 0.8573, 0.3328, 0.8692]}, {"w": "model", "b": [0.338, 0.8573, 0.3794, 0.8692]}, {"w": "quality", "b": [0.3846, 0.8573, 0.4321, 0.8692]}, {"w": "estimates.", "b": [0.4373, 0.8573, 0.5054, 0.8692]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "4", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 48, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 2: Learning curves for the Naïve Bayes learning algorithm applied to the standard \"digits\" dataset of scikit-learn.", "words": [{"w": "Figure", "b": [0.1312, 0.415, 0.1844, 0.4301]}, {"w": "2:", "b": [0.1906, 0.415, 0.2052, 0.4301]}, {"w": "Learning", "b": [0.2136, 0.415, 0.2861, 0.4301]}, {"w": "curves", "b": [0.2923, 0.415, 0.3438, 0.4301]}, {"w": "for", "b": [0.35, 0.415, 0.3725, 0.4301]}, {"w": "the", "b": [0.3788, 0.415, 0.4049, 0.4301]}, {"w": "Naïve", "b": [0.4112, 0.415, 0.4577, 0.4301]}, {"w": "Bayes", "b": [0.4639, 0.415, 0.5114, 0.4301]}, {"w": "learning", "b": [0.5176, 0.415, 0.5836, 0.4301]}, {"w": "algorithm", "b": [0.5898, 0.415, 0.6693, 0.4301]}, {"w": "applied", "b": [0.6756, 0.415, 0.7352, 0.4301]}, {"w": "to", "b": [0.7414, 0.415, 0.7581, 0.4301]}, {"w": "the", "b": [0.7644, 0.415, 0.7905, 0.4301]}, {"w": "standard", "b": [0.7968, 0.415, 0.8691, 0.4301]}, {"w": "\"digits\"", "b": [0.1292, 0.4331, 0.1872, 0.448]}, {"w": "dataset", "b": [0.1933, 0.4331, 0.2519, 0.448]}, {"w": "of", "b": [0.258, 0.4331, 0.2729, 0.448]}, {"w": "scikit-learn.", "b": [0.279, 0.4331, 0.373, 0.448]}]}, {"id": "b_1", "type": "paragraph", "text": "examples, you will begin to experience diminishing returns from additional examples.", "words": [{"w": "examples,", "b": [0.1312, 0.4833, 0.2098, 0.4983]}, {"w": "you", "b": [0.2159, 0.4833, 0.2446, 0.4983]}, {"w": "will", "b": [0.2508, 0.4833, 0.2795, 0.4983]}, {"w": "begin", "b": [0.2857, 0.4833, 0.3292, 0.4983]}, {"w": "to", "b": [0.3354, 0.4833, 0.3518, 0.4983]}, {"w": "experience", "b": [0.3579, 0.4833, 0.4421, 0.4983]}, {"w": "diminishing", "b": [0.4483, 0.4833, 0.5417, 0.4983]}, {"w": "returns", "b": [0.5478, 0.4833, 0.6055, 0.4983]}, {"w": "from", "b": [0.6116, 0.4833, 0.6491, 0.4983]}, {"w": "additional", "b": [0.6552, 0.4833, 0.7363, 0.4983]}, {"w": "examples.", "b": [0.7424, 0.4833, 0.821, 0.4983]}]}, {"id": "b_2", "type": "paragraph", "text": "If you observe the performance of the learning algorithm plateaued, it might be a sign that collecting more data will not help in training a better model. I used the expression “might be” because two other explanations are possible:", "words": [{"w": "If", "b": [0.1312, 0.5102, 0.1436, 0.5252]}, {"w": "you", "b": [0.1497, 0.5102, 0.1785, 0.5252]}, {"w": "observe", "b": [0.1846, 0.5102, 0.2444, 0.5252]}, {"w": "the", "b": [0.2505, 0.5102, 0.2762, 0.5252]}, {"w": "performance", "b": [0.2824, 0.5102, 0.3821, 0.5252]}, {"w": "of", "b": [0.3883, 0.5102, 0.4032, 0.5252]}, {"w": "the", "b": [0.4093, 0.5102, 0.435, 0.5252]}, {"w": "learning", "b": [0.4411, 0.5102, 0.5059, 0.5252]}, {"w": "algorithm", "b": [0.5121, 0.5102, 0.5902, 0.5252]}, {"w": "plateaued,", "b": [0.5963, 0.5102, 0.6796, 0.5252]}, {"w": "it", "b": [0.6857, 0.5102, 0.698, 0.5252]}, {"w": "might", "b": [0.7042, 0.5102, 0.7509, 0.5252]}, {"w": "be", "b": [0.757, 0.5102, 0.7761, 0.5252]}, {"w": "a", "b": [0.7822, 0.5102, 0.7914, 0.5252]}, {"w": "sign", "b": [0.7976, 0.5102, 0.8295, 0.5252]}, {"w": "that", "b": [0.8357, 0.5102, 0.8696, 0.5252]}, {"w": "collecting", "b": [0.1312, 0.5281, 0.2078, 0.5432]}, {"w": "more", "b": [0.214, 0.5281, 0.2544, 0.5432]}, {"w": "data", "b": [0.2605, 0.5281, 0.2967, 0.5432]}, {"w": "will", "b": [0.3028, 0.5281, 0.3318, 0.5432]}, {"w": "not", "b": [0.338, 0.5281, 0.3649, 0.5432]}, {"w": "help", "b": [0.371, 0.5281, 0.4052, 0.5432]}, {"w": "in", "b": [0.4113, 0.5281, 0.4268, 0.5432]}, {"w": "training", "b": [0.433, 0.5281, 0.4972, 0.5432]}, {"w": "a", "b": [0.5033, 0.5281, 0.5126, 0.5432]}, {"w": "better", "b": [0.5188, 0.5281, 0.568, 0.5432]}, {"w": "model.", "b": [0.5741, 0.5281, 0.6284, 0.5432]}, {"w": "I", "b": [0.6366, 0.5281, 0.6434, 0.5432]}, {"w": "used", "b": [0.6495, 0.5281, 0.6859, 0.5432]}, {"w": "the", "b": [0.692, 0.5281, 0.7179, 0.5432]}, {"w": "expression", "b": [0.724, 0.5281, 0.8076, 0.5432]}, {"w": "“might", "b": [0.8137, 0.5281, 0.8696, 0.5432]}, {"w": "be”", "b": [0.1312, 0.5461, 0.1589, 0.5611]}, {"w": "because", "b": [0.1651, 0.5461, 0.2272, 0.5611]}, {"w": "two", "b": [0.2334, 0.5461, 0.2621, 0.5611]}, {"w": "other", "b": [0.2682, 0.5461, 0.3103, 0.5611]}, {"w": "explanations", "b": [0.3165, 0.5461, 0.4176, 0.5611]}, {"w": "are", "b": [0.4237, 0.5461, 0.4484, 0.5611]}, {"w": "possible:", "b": [0.4546, 0.5461, 0.523, 0.5611]}]}, {"id": "b_3", "type": "paragraph", "text": "• you didn’t have enough informative features that your learning algorithm can leverage to build a more performant model, or • you used a learning algorithm incapable of training a complex enough model using the data you have.", "words": [{"w": "•", "b": [0.1538, 0.5731, 0.1681, 0.588]}, {"w": "you", "b": [0.1774, 0.5731, 0.2058, 0.588]}, {"w": "didn’t", "b": [0.2119, 0.5731, 0.2596, 0.588]}, {"w": "have", "b": [0.2658, 0.5731, 0.3018, 0.588]}, {"w": "enough", "b": [0.3079, 0.5731, 0.3648, 0.588]}, {"w": "informative", "b": [0.3709, 0.5731, 0.4618, 0.588]}, {"w": "features", "b": [0.468, 0.5731, 0.5306, 0.588]}, {"w": "that", "b": [0.5367, 0.5731, 0.5702, 0.588]}, {"w": "your", "b": [0.5763, 0.5731, 0.6119, 0.588]}, {"w": "learning", "b": [0.618, 0.5731, 0.6821, 0.588]}, {"w": "algorithm", "b": [0.6882, 0.5731, 0.7654, 0.588]}, {"w": "can", "b": [0.7715, 0.5731, 0.7989, 0.588]}, {"w": "leverage", "b": [0.8051, 0.5731, 0.8691, 0.588]}, {"w": "to", "b": [0.1774, 0.591, 0.1938, 0.606]}, {"w": "build", "b": [0.1999, 0.591, 0.2409, 0.606]}, {"w": "a", "b": [0.2471, 0.591, 0.2563, 0.606]}, {"w": "more", "b": [0.2625, 0.591, 0.3025, 0.606]}, {"w": "performant", "b": [0.3086, 0.591, 0.3985, 0.606]}, {"w": "model,", "b": [0.4046, 0.591, 0.4585, 0.606]}, {"w": "or", "b": [0.4646, 0.591, 0.4811, 0.606]}, {"w": "•", "b": [0.1538, 0.6089, 0.1681, 0.6239]}, {"w": "you", "b": [0.1774, 0.609, 0.2057, 0.6239]}, {"w": "used", "b": [0.2118, 0.609, 0.2473, 0.6239]}, {"w": "a", "b": [0.2535, 0.609, 0.2626, 0.6239]}, {"w": "learning", "b": [0.2687, 0.609, 0.3325, 0.6239]}, {"w": "algorithm", "b": [0.3387, 0.609, 0.4155, 0.6239]}, {"w": "incapable", "b": [0.4217, 0.609, 0.4965, 0.6239]}, {"w": "of", "b": [0.5027, 0.609, 0.5174, 0.6239]}, {"w": "training", "b": [0.5235, 0.609, 0.5863, 0.6239]}, {"w": "a", "b": [0.5924, 0.609, 0.6015, 0.6239]}, {"w": "complex", "b": [0.6077, 0.609, 0.6729, 0.6239]}, {"w": "enough", "b": [0.6791, 0.609, 0.7357, 0.6239]}, {"w": "model", "b": [0.7419, 0.609, 0.7899, 0.6239]}, {"w": "using", "b": [0.7961, 0.609, 0.8376, 0.6239]}, {"w": "the", "b": [0.8438, 0.609, 0.8691, 0.6239]}, {"w": "data", "b": [0.1774, 0.6269, 0.2132, 0.6418]}, {"w": "you", "b": [0.2194, 0.6269, 0.2481, 0.6418]}, {"w": "have.", "b": [0.2543, 0.6269, 0.2958, 0.6418]}]}, {"id": "b_4", "type": "paragraph", "text": "In the former case, you might think about engineering additional features by combining the existing features in some clever ways, or by using information from indirect data sources, such as lookup tables and gazetteers. We consider techniques for synthesizing features in Section ?? of Chapter 4.", "words": [{"w": "In", "b": [0.1312, 0.6538, 0.1481, 0.6688]}, {"w": "the", "b": [0.1542, 0.6538, 0.1797, 0.6688]}, {"w": "former", "b": [0.1859, 0.6538, 0.2385, 0.6688]}, {"w": "case,", "b": [0.2446, 0.6538, 0.2825, 0.6688]}, {"w": "you", "b": [0.2887, 0.6538, 0.3172, 0.6688]}, {"w": "might", "b": [0.3234, 0.6538, 0.3698, 0.6688]}, {"w": "think", "b": [0.3759, 0.6538, 0.4183, 0.6688]}, {"w": "about", "b": [0.4244, 0.6538, 0.4708, 0.6688]}, {"w": "engineering", "b": [0.477, 0.6538, 0.5679, 0.6688]}, {"w": "additional", "b": [0.574, 0.6538, 0.6546, 0.6688]}, {"w": "features", "b": [0.6607, 0.6538, 0.7237, 0.6688]}, {"w": "by", "b": [0.7298, 0.6538, 0.7492, 0.6688]}, {"w": "combining", "b": [0.7553, 0.6538, 0.8374, 0.6688]}, {"w": "the", "b": [0.8436, 0.6538, 0.8691, 0.6688]}, {"w": "existing", "b": [0.1312, 0.6716, 0.1946, 0.6867]}, {"w": "features", "b": [0.2013, 0.6716, 0.2658, 0.6867]}, {"w": "in", "b": [0.2725, 0.6716, 0.2882, 0.6867]}, {"w": "some", "b": [0.2949, 0.6716, 0.3358, 0.6867]}, {"w": "clever", "b": [0.3425, 0.6716, 0.3896, 0.6867]}, {"w": "ways,", "b": [0.3963, 0.6716, 0.4409, 0.6867]}, {"w": "or", "b": [0.4477, 0.6716, 0.4645, 0.6867]}, {"w": "by", "b": [0.4712, 0.6716, 0.4911, 0.6867]}, {"w": "using", "b": [0.4978, 0.6716, 0.5408, 0.6867]}, {"w": "information", "b": [0.5475, 0.6716, 0.6432, 0.6867]}, {"w": "from", "b": [0.6499, 0.6716, 0.6881, 0.6867]}, {"w": "indirect", "b": [0.6948, 0.6716, 0.7576, 0.6867]}, {"w": "data", "b": [0.7643, 0.6716, 0.8009, 0.6867]}, {"w": "sources,", "b": [0.8076, 0.6716, 0.8717, 0.6867]}, {"w": "such", "b": [0.1312, 0.6896, 0.1675, 0.7047]}, {"w": "as", "b": [0.1741, 0.6896, 0.1909, 0.7047]}, {"w": "lookup", "b": [0.1975, 0.6896, 0.2529, 0.7047]}, {"w": "tables", "b": [0.2596, 0.6896, 0.3078, 0.7047]}, {"w": "and", "b": [0.3144, 0.6896, 0.3447, 0.7047]}, {"w": "gazetteers.", "b": [0.3514, 0.6896, 0.4383, 0.7047]}, {"w": "We", "b": [0.448, 0.6896, 0.4741, 0.7047]}, {"w": "consider", "b": [0.4807, 0.6896, 0.5479, 0.7047]}, {"w": "techniques", "b": [0.5545, 0.6896, 0.6404, 0.7047]}, {"w": "for", "b": [0.647, 0.6896, 0.6696, 0.7047]}, {"w": "synthesizing", "b": [0.6762, 0.6896, 0.7758, 0.7047]}, {"w": "features", "b": [0.7824, 0.6896, 0.8469, 0.7047]}, {"w": "in", "b": [0.8535, 0.6896, 0.8692, 0.7047]}, {"w": "Section", "b": [0.1312, 0.7077, 0.1897, 0.7226]}, {"w": "??", "b": [0.1958, 0.7077, 0.2158, 0.7226]}, {"w": "of", "b": [0.222, 0.7077, 0.2369, 0.7226]}, {"w": "Chapter", "b": [0.243, 0.7077, 0.3087, 0.7226]}, {"w": "4.", "b": [0.3148, 0.7077, 0.3292, 0.7226]}]}, {"id": "b_5", "type": "paragraph", "text": "In the latter case, one possible approach would be to use an ensemble learning method or train a deep neural network. However, deep neural networks usually require more training data compared to shallow learning algorithms.", "words": [{"w": "In", "b": [0.1312, 0.7345, 0.1485, 0.7496]}, {"w": "the", "b": [0.1547, 0.7345, 0.1809, 0.7496]}, {"w": "latter", "b": [0.1871, 0.7345, 0.2322, 0.7496]}, {"w": "case,", "b": [0.2384, 0.7345, 0.2772, 0.7496]}, {"w": "one", "b": [0.2835, 0.7345, 0.3117, 0.7496]}, {"w": "possible", "b": [0.318, 0.7345, 0.3825, 0.7496]}, {"w": "approach", "b": [0.3888, 0.7345, 0.4636, 0.7496]}, {"w": "would", "b": [0.4699, 0.7345, 0.5185, 0.7496]}, {"w": "be", "b": [0.5247, 0.7345, 0.5441, 0.7496]}, {"w": "to", "b": [0.5503, 0.7345, 0.5671, 0.7496]}, {"w": "use", "b": [0.5733, 0.7345, 0.5996, 0.7496]}, {"w": "an", "b": [0.6058, 0.7345, 0.6257, 0.7496]}, {"w": "ensemble", "b": [0.6319, 0.7345, 0.7058, 0.7496]}, {"w": "learning", "b": [0.7121, 0.7345, 0.778, 0.7496]}, {"w": "method", "b": [0.7843, 0.7345, 0.8465, 0.7496]}, {"w": "or", "b": [0.8527, 0.7345, 0.8695, 0.7496]}, {"w": "train", "b": [0.1312, 0.7524, 0.1708, 0.7675]}, {"w": "a", "b": [0.1769, 0.7524, 0.1863, 0.7675]}, {"w": "deep", "b": [0.1924, 0.7524, 0.2298, 0.7675]}, {"w": "neural", "b": [0.236, 0.7524, 0.2869, 0.7675]}, {"w": "network.", "b": [0.2931, 0.7524, 0.3633, 0.7675]}, {"w": "However,", "b": [0.3715, 0.7524, 0.4458, 0.7675]}, {"w": "deep", "b": [0.452, 0.7524, 0.4894, 0.7675]}, {"w": "neural", "b": [0.4955, 0.7524, 0.5465, 0.7675]}, {"w": "networks", "b": [0.5526, 0.7524, 0.625, 0.7675]}, {"w": "usually", "b": [0.6312, 0.7524, 0.6889, 0.7675]}, {"w": "require", "b": [0.6951, 0.7524, 0.7518, 0.7675]}, {"w": "more", "b": [0.758, 0.7524, 0.7985, 0.7675]}, {"w": "training", "b": [0.8047, 0.7524, 0.8691, 0.7675]}, {"w": "data", "b": [0.1312, 0.7705, 0.1671, 0.7854]}, {"w": "compared", "b": [0.1733, 0.7705, 0.2512, 0.7854]}, {"w": "to", "b": [0.2574, 0.7705, 0.2738, 0.7854]}, {"w": "shallow", "b": [0.28, 0.7705, 0.339, 0.7854]}, {"w": "learning", "b": [0.3452, 0.7705, 0.4098, 0.7854]}, {"w": "algorithms.", "b": [0.416, 0.7705, 0.5063, 0.7854]}]}, {"id": "b_6", "type": "paragraph", "text": "Some practitioners use rules of thumb to estimate the number of training examples needed for a problem. Usually, they are using scaling factors applied to either,", "words": [{"w": "Some", "b": [0.1312, 0.7974, 0.1746, 0.8124]}, {"w": "practitioners", "b": [0.1807, 0.7974, 0.2831, 0.8124]}, {"w": "use", "b": [0.2892, 0.7974, 0.3151, 0.8124]}, {"w": "rules", "b": [0.3213, 0.7974, 0.3596, 0.8124]}, {"w": "of", "b": [0.3657, 0.7974, 0.3807, 0.8124]}, {"w": "thumb", "b": [0.3869, 0.7974, 0.4395, 0.8124]}, {"w": "to", "b": [0.4456, 0.7974, 0.4621, 0.8124]}, {"w": "estimate", "b": [0.4683, 0.7974, 0.5365, 0.8124]}, {"w": "the", "b": [0.5426, 0.7974, 0.5684, 0.8124]}, {"w": "number", "b": [0.5745, 0.7974, 0.636, 0.8124]}, {"w": "of", "b": [0.6421, 0.7974, 0.6571, 0.8124]}, {"w": "training", "b": [0.6632, 0.7974, 0.7272, 0.8124]}, {"w": "examples", "b": [0.7334, 0.7974, 0.8073, 0.8124]}, {"w": "needed", "b": [0.8134, 0.7974, 0.8691, 0.8124]}, {"w": "for", "b": [0.1312, 0.8153, 0.1533, 0.8303]}, {"w": "a", "b": [0.1595, 0.8153, 0.1687, 0.8303]}, {"w": "problem.", "b": [0.1749, 0.8153, 0.2457, 0.8303]}, {"w": "Usually,", "b": [0.2539, 0.8153, 0.3181, 0.8303]}, {"w": "they", "b": [0.3242, 0.8153, 0.3596, 0.8303]}, {"w": "are", "b": [0.3657, 0.8153, 0.3904, 0.8303]}, {"w": "using", "b": [0.3966, 0.8153, 0.4387, 0.8303]}, {"w": "scaling", "b": [0.4449, 0.8153, 0.4993, 0.8303]}, {"w": "factors", "b": [0.5055, 0.8153, 0.5595, 0.8303]}, {"w": "applied", "b": [0.5656, 0.8153, 0.6241, 0.8303]}, {"w": "to", "b": [0.6302, 0.8153, 0.6466, 0.8303]}, {"w": "either,", "b": [0.6528, 0.8153, 0.7041, 0.8303]}]}, {"id": "b_7", "type": "paragraph", "text": "• number of features, or • number of classes, or", "words": [{"w": "•", "b": [0.1538, 0.8423, 0.1681, 0.8572]}, {"w": "number", "b": [0.1774, 0.8423, 0.2384, 0.8572]}, {"w": "of", "b": [0.2446, 0.8423, 0.2594, 0.8572]}, {"w": "features,", "b": [0.2656, 0.8423, 0.334, 0.8572]}, {"w": "or", "b": [0.3401, 0.8423, 0.3566, 0.8572]}, {"w": "•", "b": [0.1538, 0.8602, 0.1681, 0.8752]}, {"w": "number", "b": [0.1774, 0.8602, 0.2384, 0.8752]}, {"w": "of", "b": [0.2446, 0.8602, 0.2594, 0.8752]}, {"w": "classes,", "b": [0.2656, 0.8602, 0.3233, 0.8752]}, {"w": "or", "b": [0.3295, 0.8602, 0.346, 0.8752]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "5", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 49, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• number of trainable parameters in the model.", "words": [{"w": "•", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "number", "b": [0.1774, 0.0884, 0.2384, 0.1033]}, {"w": "of", "b": [0.2446, 0.0884, 0.2594, 0.1033]}, {"w": "trainable", "b": [0.2656, 0.0884, 0.3374, 0.1033]}, {"w": "parameters", "b": [0.3436, 0.0884, 0.433, 0.1033]}, {"w": "in", "b": [0.4392, 0.0884, 0.4545, 0.1033]}, {"w": "the", "b": [0.4607, 0.0884, 0.4863, 0.1033]}, {"w": "model.", "b": [0.4925, 0.0884, 0.5463, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "Such rules of thumb often work, but they are different for different problem domains. Each analyst adjusts the numbers based on experience. While you would discover by experience those “magical” scaling factors that work for you, the most frequently cited numbers in various online sources are:", "words": [{"w": "Such", "b": [0.1312, 0.1153, 0.1697, 0.1303]}, {"w": "rules", "b": [0.1759, 0.1153, 0.214, 0.1303]}, {"w": "of", "b": [0.2202, 0.1153, 0.2351, 0.1303]}, {"w": "thumb", "b": [0.2412, 0.1153, 0.2936, 0.1303]}, {"w": "often", "b": [0.2998, 0.1153, 0.3403, 0.1303]}, {"w": "work,", "b": [0.3465, 0.1153, 0.3906, 0.1303]}, {"w": "but", "b": [0.3968, 0.1153, 0.4245, 0.1303]}, {"w": "they", "b": [0.4307, 0.1153, 0.4661, 0.1303]}, {"w": "are", "b": [0.4723, 0.1153, 0.4969, 0.1303]}, {"w": "different", "b": [0.5031, 0.1153, 0.5699, 0.1303]}, {"w": "for", "b": [0.576, 0.1153, 0.5982, 0.1303]}, {"w": "different", "b": [0.6043, 0.1153, 0.6711, 0.1303]}, {"w": "problem", "b": [0.6773, 0.1153, 0.743, 0.1303]}, {"w": "domains.", "b": [0.7492, 0.1153, 0.8211, 0.1303]}, {"w": "Each", "b": [0.8293, 0.1153, 0.8691, 0.1303]}, {"w": "analyst", "b": [0.1312, 0.1332, 0.1899, 0.1482]}, {"w": "adjusts", "b": [0.196, 0.1332, 0.2538, 0.1482]}, {"w": "the", "b": [0.2599, 0.1332, 0.2858, 0.1482]}, {"w": "numbers", "b": [0.292, 0.1332, 0.3611, 0.1482]}, {"w": "based", "b": [0.3672, 0.1332, 0.4129, 0.1482]}, {"w": "on", "b": [0.4191, 0.1332, 0.4388, 0.1482]}, {"w": "experience.", "b": [0.4449, 0.1332, 0.5352, 0.1482]}, {"w": "While", "b": [0.5434, 0.1332, 0.5916, 0.1482]}, {"w": "you", "b": [0.5977, 0.1332, 0.6267, 0.1482]}, {"w": "would", "b": [0.6328, 0.1332, 0.681, 0.1482]}, {"w": "discover", "b": [0.6872, 0.1332, 0.7521, 0.1482]}, {"w": "by", "b": [0.7583, 0.1332, 0.778, 0.1482]}, {"w": "experience", "b": [0.7841, 0.1332, 0.8692, 0.1482]}, {"w": "those", "b": [0.1312, 0.1511, 0.1742, 0.1662]}, {"w": "“magical”", "b": [0.1818, 0.1511, 0.2623, 0.1662]}, {"w": "scaling", "b": [0.2698, 0.1511, 0.3254, 0.1662]}, {"w": "factors", "b": [0.3329, 0.1511, 0.388, 0.1662]}, {"w": "that", "b": [0.3956, 0.1511, 0.4301, 0.1662]}, {"w": "work", "b": [0.4376, 0.1511, 0.4774, 0.1662]}, {"w": "for", "b": [0.4849, 0.1511, 0.5075, 0.1662]}, {"w": "you,", "b": [0.515, 0.1511, 0.5496, 0.1662]}, {"w": "the", "b": [0.5575, 0.1511, 0.5836, 0.1662]}, {"w": "most", "b": [0.5912, 0.1511, 0.631, 0.1662]}, {"w": "frequently", "b": [0.6386, 0.1511, 0.7213, 0.1662]}, {"w": "cited", "b": [0.7288, 0.1511, 0.7686, 0.1662]}, {"w": "numbers", "b": [0.7761, 0.1511, 0.8459, 0.1662]}, {"w": "in", "b": [0.8534, 0.1511, 0.8691, 0.1662]}, {"w": "various", "b": [0.1308, 0.1692, 0.1878, 0.1841]}, {"w": "online", "b": [0.194, 0.1692, 0.2422, 0.1841]}, {"w": "sources", "b": [0.2483, 0.1692, 0.306, 0.1841]}, {"w": "are:", "b": [0.3122, 0.1692, 0.342, 0.1841]}]}, {"id": "b_2", "type": "paragraph", "text": "• 10 times the amount of features (this often exaggerates the size of the training set, but works well as an upper bound), • 100 or 1000 times the number of classes (this often underestimates the size), or • ten times the number of trainable parameters (usually applied to neural networks).", "words": [{"w": "•", "b": [0.1538, 0.1961, 0.1681, 0.211]}, {"w": "10", "b": [0.1774, 0.1962, 0.1955, 0.211]}, {"w": "times", "b": [0.2016, 0.1962, 0.244, 0.211]}, {"w": "the", "b": [0.2502, 0.1962, 0.2753, 0.211]}, {"w": "amount", "b": [0.2815, 0.1962, 0.3414, 0.211]}, {"w": "of", "b": [0.3475, 0.1962, 0.3621, 0.211]}, {"w": "features", "b": [0.3683, 0.1962, 0.4304, 0.211]}, {"w": "(this", "b": [0.4366, 0.1962, 0.4729, 0.211]}, {"w": "often", "b": [0.4791, 0.1962, 0.5188, 0.211]}, {"w": "exaggerates", "b": [0.525, 0.1962, 0.6163, 0.211]}, {"w": "the", "b": [0.6224, 0.1962, 0.6476, 0.211]}, {"w": "size", "b": [0.6538, 0.1962, 0.6821, 0.211]}, {"w": "of", "b": [0.6882, 0.1962, 0.7028, 0.211]}, {"w": "the", "b": [0.709, 0.1962, 0.7342, 0.211]}, {"w": "training", "b": [0.7403, 0.1962, 0.8028, 0.211]}, {"w": "set,", "b": [0.809, 0.1962, 0.8363, 0.211]}, {"w": "but", "b": [0.8424, 0.1962, 0.8696, 0.211]}, {"w": "works", "b": [0.1767, 0.214, 0.223, 0.229]}, {"w": "well", "b": [0.2291, 0.214, 0.2604, 0.229]}, {"w": "as", "b": [0.2666, 0.214, 0.2831, 0.229]}, {"w": "an", "b": [0.2892, 0.214, 0.3087, 0.229]}, {"w": "upper", "b": [0.3149, 0.214, 0.3616, 0.229]}, {"w": "bound),", "b": [0.3677, 0.214, 0.4308, 0.229]}, {"w": "•", "b": [0.1538, 0.232, 0.1681, 0.2469]}, {"w": "100", "b": [0.1774, 0.232, 0.205, 0.2469]}, {"w": "or", "b": [0.2112, 0.232, 0.2276, 0.2469]}, {"w": "1000", "b": [0.2338, 0.232, 0.2707, 0.2469]}, {"w": "times", "b": [0.2768, 0.232, 0.32, 0.2469]}, {"w": "the", "b": [0.3261, 0.232, 0.3518, 0.2469]}, {"w": "number", "b": [0.3579, 0.232, 0.419, 0.2469]}, {"w": "of", "b": [0.4252, 0.232, 0.44, 0.2469]}, {"w": "classes", "b": [0.4462, 0.232, 0.4988, 0.2469]}, {"w": "(this", "b": [0.505, 0.232, 0.542, 0.2469]}, {"w": "often", "b": [0.5481, 0.232, 0.5886, 0.2469]}, {"w": "underestimates", "b": [0.5948, 0.232, 0.7161, 0.2469]}, {"w": "the", "b": [0.7222, 0.232, 0.7479, 0.2469]}, {"w": "size),", "b": [0.754, 0.232, 0.7952, 0.2469]}, {"w": "or", "b": [0.8013, 0.232, 0.8178, 0.2469]}, {"w": "•", "b": [0.1538, 0.2499, 0.1681, 0.2649]}, {"w": "ten", "b": [0.1774, 0.2499, 0.203, 0.2649]}, {"w": "times", "b": [0.2091, 0.2499, 0.2523, 0.2649]}, {"w": "the", "b": [0.2585, 0.2499, 0.2841, 0.2649]}, {"w": "number", "b": [0.2903, 0.2499, 0.3513, 0.2649]}, {"w": "of", "b": [0.3575, 0.2499, 0.3723, 0.2649]}, {"w": "trainable", "b": [0.3785, 0.2499, 0.4503, 0.2649]}, {"w": "parameters", "b": [0.4565, 0.2499, 0.5459, 0.2649]}, {"w": "(usually", "b": [0.5521, 0.2499, 0.6162, 0.2649]}, {"w": "applied", "b": [0.6224, 0.2499, 0.6809, 0.2649]}, {"w": "to", "b": [0.687, 0.2499, 0.7034, 0.2649]}, {"w": "neural", "b": [0.7096, 0.2499, 0.7599, 0.2649]}, {"w": "networks).", "b": [0.766, 0.2499, 0.8498, 0.2649]}]}, {"id": "b_3", "type": "paragraph", "text": "Keep in mind that just because you have big data does not mean that you should use all of it. A smaller sample of big data can give good results in practice and accelerate the search for a better model. It’s important to ensure, though, that the sample is representative of the whole big dataset. Sampling strategies such as stratified and systematic sampling can lead to better results. We consider data sampling strategies in Section 3.10.", "words": [{"w": "Keep", "b": [0.1312, 0.2769, 0.1721, 0.2918]}, {"w": "in", "b": [0.1783, 0.2769, 0.1936, 0.2918]}, {"w": "mind", "b": [0.1997, 0.2769, 0.2406, 0.2918]}, {"w": "that", "b": [0.2467, 0.2769, 0.2804, 0.2918]}, {"w": "just", "b": [0.2866, 0.2769, 0.3168, 0.2918]}, {"w": "because", "b": [0.323, 0.2769, 0.3849, 0.2918]}, {"w": "you", "b": [0.391, 0.2769, 0.4196, 0.2918]}, {"w": "have", "b": [0.4258, 0.2769, 0.462, 0.2918]}, {"w": "big", "b": [0.4682, 0.2769, 0.4927, 0.2918]}, {"w": "data", "b": [0.4989, 0.2769, 0.5346, 0.2918]}, {"w": "does", "b": [0.5407, 0.2769, 0.5761, 0.2918]}, {"w": "not", "b": [0.5822, 0.2769, 0.6088, 0.2918]}, {"w": "mean", "b": [0.6149, 0.2769, 0.6578, 0.2918]}, {"w": "that", "b": [0.664, 0.2769, 0.6977, 0.2918]}, {"w": "you", "b": [0.7038, 0.2769, 0.7324, 0.2918]}, {"w": "should", "b": [0.7386, 0.2769, 0.7908, 0.2918]}, {"w": "use", "b": [0.7969, 0.2769, 0.8226, 0.2918]}, {"w": "all", "b": [0.8287, 0.2769, 0.8481, 0.2918]}, {"w": "of", "b": [0.8543, 0.2769, 0.8691, 0.2918]}, {"w": "it.", "b": [0.1312, 0.2948, 0.1488, 0.3097]}, {"w": "A", "b": [0.157, 0.2948, 0.1709, 0.3097]}, {"w": "smaller", "b": [0.1771, 0.2948, 0.2349, 0.3097]}, {"w": "sample", "b": [0.2411, 0.2948, 0.2968, 0.3097]}, {"w": "of", "b": [0.303, 0.2948, 0.3179, 0.3097]}, {"w": "big", "b": [0.3241, 0.2948, 0.3488, 0.3097]}, {"w": "data", "b": [0.355, 0.2948, 0.3911, 0.3097]}, {"w": "can", "b": [0.3972, 0.2948, 0.4251, 0.3097]}, {"w": "give", "b": [0.4312, 0.2948, 0.4632, 0.3097]}, {"w": "good", "b": [0.4693, 0.2948, 0.5085, 0.3097]}, {"w": "results", "b": [0.5147, 0.2948, 0.5675, 0.3097]}, {"w": "in", "b": [0.5737, 0.2948, 0.5891, 0.3097]}, {"w": "practice", "b": [0.5953, 0.2948, 0.6592, 0.3097]}, {"w": "and", "b": [0.6654, 0.2948, 0.6953, 0.3097]}, {"w": "accelerate", "b": [0.7014, 0.2948, 0.7809, 0.3097]}, {"w": "the", "b": [0.787, 0.2948, 0.8128, 0.3097]}, {"w": "search", "b": [0.819, 0.2948, 0.8691, 0.3097]}, {"w": "for", "b": [0.1312, 0.3128, 0.1529, 0.3277]}, {"w": "a", "b": [0.1591, 0.3128, 0.1681, 0.3277]}, {"w": "better", "b": [0.1743, 0.3128, 0.2221, 0.3277]}, {"w": "model.", "b": [0.2283, 0.3128, 0.2811, 0.3277]}, {"w": "It’s", "b": [0.2893, 0.3128, 0.315, 0.3277]}, {"w": "important", "b": [0.3212, 0.3128, 0.4007, 0.3277]}, {"w": "to", "b": [0.4068, 0.3128, 0.4229, 0.3277]}, {"w": "ensure,", "b": [0.429, 0.3128, 0.4846, 0.3277]}, {"w": "though,", "b": [0.4907, 0.3128, 0.5511, 0.3277]}, {"w": "that", "b": [0.5572, 0.3128, 0.5904, 0.3277]}, {"w": "the", "b": [0.5965, 0.3128, 0.6217, 0.3277]}, {"w": "sample", "b": [0.6278, 0.3128, 0.6822, 0.3277]}, {"w": "is", "b": [0.6884, 0.3128, 0.7006, 0.3277]}, {"w": "representative", "b": [0.7067, 0.3128, 0.8171, 0.3277]}, {"w": "of", "b": [0.8232, 0.3128, 0.8378, 0.3277]}, {"w": "the", "b": [0.844, 0.3128, 0.8691, 0.3277]}, {"w": "whole", "b": [0.1306, 0.3306, 0.1776, 0.3457]}, {"w": "big", "b": [0.1839, 0.3306, 0.209, 0.3457]}, {"w": "dataset.", "b": [0.2153, 0.3306, 0.2803, 0.3457]}, {"w": "Sampling", "b": [0.2889, 0.3306, 0.3653, 0.3457]}, {"w": "strategies", "b": [0.3715, 0.3306, 0.4492, 0.3457]}, {"w": "such", "b": [0.4555, 0.3306, 0.4917, 0.3457]}, {"w": "as", "b": [0.498, 0.3306, 0.5149, 0.3457]}, {"w": "stratified", "b": [0.521, 0.3307, 0.6041, 0.3456]}, {"w": "and", "b": [0.6104, 0.3306, 0.6407, 0.3457]}, {"w": "systematic", "b": [0.647, 0.3307, 0.7445, 0.3456]}, {"w": "sampling", "b": [0.7517, 0.3307, 0.8341, 0.3456]}, {"w": "can", "b": [0.8405, 0.3306, 0.8688, 0.3457]}, {"w": "lead", "b": [0.1312, 0.3486, 0.1641, 0.3636]}, {"w": "to", "b": [0.1702, 0.3486, 0.1866, 0.3636]}, {"w": "better", "b": [0.1928, 0.3486, 0.2415, 0.3636]}, {"w": "results.", "b": [0.2477, 0.3486, 0.3054, 0.3636]}, {"w": "We", "b": [0.3136, 0.3486, 0.3392, 0.3636]}, {"w": "consider", "b": [0.3454, 0.3486, 0.4112, 0.3636]}, {"w": "data", "b": [0.4173, 0.3486, 0.4532, 0.3636]}, {"w": "sampling", "b": [0.4594, 0.3486, 0.5312, 0.3636]}, {"w": "strategies", "b": [0.5374, 0.3486, 0.6135, 0.3636]}, {"w": "in", "b": [0.6197, 0.3486, 0.6351, 0.3636]}, {"w": "Section", "b": [0.6412, 0.3486, 0.6997, 0.3636]}, {"w": "3.10.", "b": [0.7058, 0.3486, 0.7438, 0.3636]}]}, {"id": "b_4", "type": "paragraph", "text": "3.1.3 Is the Data Useable?", "words": [{"w": "3.1.3", "b": [0.1312, 0.3965, 0.1749, 0.4114]}, {"w": "Is", "b": [0.1961, 0.3965, 0.2125, 0.4114]}, {"w": "the", "b": [0.2196, 0.3965, 0.2493, 0.4114]}, {"w": "Data", "b": [0.2564, 0.3965, 0.3016, 0.4114]}, {"w": "Useable?", "b": [0.3086, 0.3965, 0.3908, 0.4114]}]}, {"id": "b_5", "type": "paragraph", "text": "The data quality is one of the major factors affecting the model performance. Imagine that you want to train a model that predicts a person’s gender, given their name. You might acquire a dataset of people that contains gender information. However, if you use this dataset blindly, you might realize that no matter how hard you try to improve the quality of your model, its performance on new data is low. What is the reason for such a weak performance?", "words": [{"w": "The", "b": [0.1306, 0.433, 0.1624, 0.448]}, {"w": "data", "b": [0.1685, 0.433, 0.2044, 0.448]}, {"w": "quality", "b": [0.2106, 0.433, 0.2665, 0.448]}, {"w": "is", "b": [0.2726, 0.433, 0.285, 0.448]}, {"w": "one", "b": [0.2912, 0.433, 0.3189, 0.448]}, {"w": "of", "b": [0.3251, 0.433, 0.3399, 0.448]}, {"w": "the", "b": [0.3461, 0.433, 0.3718, 0.448]}, {"w": "major", "b": [0.3779, 0.433, 0.4251, 0.448]}, {"w": "factors", "b": [0.4313, 0.433, 0.4853, 0.448]}, {"w": "affecting", "b": [0.4915, 0.433, 0.5597, 0.448]}, {"w": "the", "b": [0.5658, 0.433, 0.5915, 0.448]}, {"w": "model", "b": [0.5976, 0.433, 0.6463, 0.448]}, {"w": "performance.", "b": [0.6525, 0.433, 0.7572, 0.448]}, {"w": "Imagine", "b": [0.7655, 0.433, 0.8295, 0.448]}, {"w": "that", "b": [0.8357, 0.433, 0.8696, 0.448]}, {"w": "you", "b": [0.1308, 0.4509, 0.1601, 0.466]}, {"w": "want", "b": [0.167, 0.4509, 0.2067, 0.466]}, {"w": "to", "b": [0.2137, 0.4509, 0.2304, 0.466]}, {"w": "train", "b": [0.2374, 0.4509, 0.2772, 0.466]}, {"w": "a", "b": [0.2841, 0.4509, 0.2935, 0.466]}, {"w": "model", "b": [0.3005, 0.4509, 0.3501, 0.466]}, {"w": "that", "b": [0.3571, 0.4509, 0.3916, 0.466]}, {"w": "predicts", "b": [0.3985, 0.4509, 0.4636, 0.466]}, {"w": "a", "b": [0.4705, 0.4509, 0.4799, 0.466]}, {"w": "person’s", "b": [0.4869, 0.4509, 0.5535, 0.466]}, {"w": "gender,", "b": [0.5605, 0.4509, 0.6202, 0.466]}, {"w": "given", "b": [0.6273, 0.4509, 0.6702, 0.466]}, {"w": "their", "b": [0.6771, 0.4509, 0.7159, 0.466]}, {"w": "name.", "b": [0.7229, 0.4509, 0.772, 0.466]}, {"w": "You", "b": [0.7826, 0.4509, 0.815, 0.466]}, {"w": "might", "b": [0.822, 0.4509, 0.8696, 0.466]}, {"w": "acquire", "b": [0.1312, 0.4691, 0.1881, 0.4839]}, {"w": "a", "b": [0.1936, 0.4691, 0.2026, 0.4839]}, {"w": "dataset", "b": [0.2082, 0.4691, 0.2656, 0.4839]}, {"w": "of", "b": [0.2711, 0.4691, 0.2856, 0.4839]}, {"w": "people", "b": [0.2912, 0.4691, 0.3419, 0.4839]}, {"w": "that", "b": [0.3475, 0.4691, 0.3806, 0.4839]}, {"w": "contains", "b": [0.3861, 0.4691, 0.4511, 0.4839]}, {"w": "gender", "b": [0.4566, 0.4691, 0.5089, 0.4839]}, {"w": "information.", "b": [0.5144, 0.4691, 0.6115, 0.4839]}, {"w": "However,", "b": [0.6194, 0.4691, 0.6913, 0.4839]}, {"w": "if", "b": [0.697, 0.4691, 0.7075, 0.4839]}, {"w": "you", "b": [0.713, 0.4691, 0.7412, 0.4839]}, {"w": "use", "b": [0.7467, 0.4691, 0.7719, 0.4839]}, {"w": "this", "b": [0.7775, 0.4691, 0.8067, 0.4839]}, {"w": "dataset", "b": [0.8122, 0.4691, 0.8696, 0.4839]}, {"w": "blindly,", "b": [0.1312, 0.4868, 0.1918, 0.5019]}, {"w": "you", "b": [0.1979, 0.4868, 0.2271, 0.5019]}, {"w": "might", "b": [0.2333, 0.4868, 0.2807, 0.5019]}, {"w": "realize", "b": [0.2869, 0.4868, 0.3391, 0.5019]}, {"w": "that", "b": [0.3452, 0.4868, 0.3797, 0.5019]}, {"w": "no", "b": [0.3858, 0.4868, 0.4056, 0.5019]}, {"w": "matter", "b": [0.4118, 0.4868, 0.4671, 0.5019]}, {"w": "how", "b": [0.4733, 0.4868, 0.5061, 0.5019]}, {"w": "hard", "b": [0.5123, 0.4868, 0.5499, 0.5019]}, {"w": "you", "b": [0.556, 0.4868, 0.5852, 0.5019]}, {"w": "try", "b": [0.5914, 0.4868, 0.6159, 0.5019]}, {"w": "to", "b": [0.6221, 0.4868, 0.6388, 0.5019]}, {"w": "improve", "b": [0.6449, 0.4868, 0.7102, 0.5019]}, {"w": "the", "b": [0.7163, 0.4868, 0.7424, 0.5019]}, {"w": "quality", "b": [0.7486, 0.4868, 0.8054, 0.5019]}, {"w": "of", "b": [0.8116, 0.4868, 0.8267, 0.5019]}, {"w": "your", "b": [0.8329, 0.4868, 0.8694, 0.5019]}, {"w": "model,", "b": [0.1312, 0.505, 0.184, 0.5198]}, {"w": "its", "b": [0.19, 0.505, 0.2092, 0.5198]}, {"w": "performance", "b": [0.2152, 0.505, 0.3128, 0.5198]}, {"w": "on", "b": [0.3187, 0.505, 0.3378, 0.5198]}, {"w": "new", "b": [0.3438, 0.505, 0.3749, 0.5198]}, {"w": "data", "b": [0.3809, 0.505, 0.4161, 0.5198]}, {"w": "is", "b": [0.422, 0.505, 0.4342, 0.5198]}, {"w": "low.", "b": [0.4402, 0.505, 0.4718, 0.5198]}, {"w": "What", "b": [0.4799, 0.505, 0.5246, 0.5198]}, {"w": "is", "b": [0.5306, 0.505, 0.5428, 0.5198]}, {"w": "the", "b": [0.5487, 0.505, 0.5739, 0.5198]}, {"w": "reason", "b": [0.5798, 0.505, 0.6302, 0.5198]}, {"w": "for", "b": [0.6362, 0.505, 0.6578, 0.5198]}, {"w": "such", "b": [0.6638, 0.505, 0.6986, 0.5198]}, {"w": "a", "b": [0.7045, 0.505, 0.7136, 0.5198]}, {"w": "weak", "b": [0.7195, 0.505, 0.7587, 0.5198]}, {"w": "performance?", "b": [0.7647, 0.505, 0.8708, 0.5198]}]}, {"id": "b_6", "type": "paragraph", "text": "The answer could be that the gender information was not factual but obtained using a rather low-quality statistical classifier. In this case, the best you can achieve with your model is the performance of that low-quality classifier.", "words": [{"w": "The", "b": [0.1306, 0.5319, 0.1617, 0.5467]}, {"w": "answer", "b": [0.1676, 0.5319, 0.2215, 0.5467]}, {"w": "could", "b": [0.2273, 0.5319, 0.2695, 0.5467]}, {"w": "be", "b": [0.2754, 0.5319, 0.294, 0.5467]}, {"w": "that", "b": [0.2998, 0.5319, 0.333, 0.5467]}, {"w": "the", "b": [0.3388, 0.5319, 0.3639, 0.5467]}, {"w": "gender", "b": [0.3698, 0.5319, 0.4221, 0.5467]}, {"w": "information", "b": [0.428, 0.5319, 0.5199, 0.5467]}, {"w": "was", "b": [0.5258, 0.5319, 0.5545, 0.5467]}, {"w": "not", "b": [0.5604, 0.5319, 0.5865, 0.5467]}, {"w": "factual", "b": [0.5923, 0.5319, 0.6461, 0.5467]}, {"w": "but", "b": [0.6519, 0.5319, 0.6791, 0.5467]}, {"w": "obtained", "b": [0.6849, 0.5319, 0.7533, 0.5467]}, {"w": "using", "b": [0.7591, 0.5319, 0.8004, 0.5467]}, {"w": "a", "b": [0.8062, 0.5319, 0.8153, 0.5467]}, {"w": "rather", "b": [0.8211, 0.5319, 0.8695, 0.5467]}, {"w": "low-quality", "b": [0.1312, 0.5498, 0.2186, 0.5646]}, {"w": "statistical", "b": [0.2247, 0.5498, 0.3013, 0.5646]}, {"w": "classifier.", "b": [0.3074, 0.5498, 0.3791, 0.5646]}, {"w": "In", "b": [0.3873, 0.5498, 0.4038, 0.5646]}, {"w": "this", "b": [0.4099, 0.5498, 0.4392, 0.5646]}, {"w": "case,", "b": [0.4453, 0.5498, 0.4826, 0.5646]}, {"w": "the", "b": [0.4887, 0.5498, 0.5139, 0.5646]}, {"w": "best", "b": [0.52, 0.5498, 0.5528, 0.5646]}, {"w": "you", "b": [0.5589, 0.5498, 0.587, 0.5646]}, {"w": "can", "b": [0.5931, 0.5498, 0.6203, 0.5646]}, {"w": "achieve", "b": [0.6264, 0.5498, 0.6831, 0.5646]}, {"w": "with", "b": [0.6893, 0.5498, 0.7244, 0.5646]}, {"w": "your", "b": [0.7305, 0.5498, 0.7657, 0.5646]}, {"w": "model", "b": [0.7719, 0.5498, 0.8196, 0.5646]}, {"w": "is", "b": [0.8257, 0.5498, 0.8379, 0.5646]}, {"w": "the", "b": [0.844, 0.5498, 0.8691, 0.5646]}, {"w": "performance", "b": [0.1312, 0.5677, 0.2308, 0.5826]}, {"w": "of", "b": [0.237, 0.5677, 0.2518, 0.5826]}, {"w": "that", "b": [0.258, 0.5677, 0.2918, 0.5826]}, {"w": "low-quality", "b": [0.298, 0.5677, 0.3872, 0.5826]}, {"w": "classifier.", "b": [0.3933, 0.5677, 0.4664, 0.5826]}]}, {"id": "b_7", "type": "paragraph", "text": "If the dataset comes in the form of a spreadsheet, the first thing to check is if the data in the spreadsheet is tidy. As discussed in the introduction, the dataset used for machine learning must be tidy. If it’s not the case for your data, you must transform it into tidy data using, as already mentioned, feature engineering.", "words": [{"w": "If", "b": [0.1312, 0.5947, 0.1433, 0.6095]}, {"w": "the", "b": [0.1492, 0.5947, 0.1744, 0.6095]}, {"w": "dataset", "b": [0.1803, 0.5947, 0.2377, 0.6095]}, {"w": "comes", "b": [0.2437, 0.5947, 0.291, 0.6095]}, {"w": "in", "b": [0.2969, 0.5947, 0.312, 0.6095]}, {"w": "the", "b": [0.318, 0.5947, 0.3431, 0.6095]}, {"w": "form", "b": [0.349, 0.5947, 0.3858, 0.6095]}, {"w": "of", "b": [0.3917, 0.5947, 0.4063, 0.6095]}, {"w": "a", "b": [0.4122, 0.5947, 0.4213, 0.6095]}, {"w": "spreadsheet,", "b": [0.4272, 0.5947, 0.524, 0.6095]}, {"w": "the", "b": [0.53, 0.5947, 0.5551, 0.6095]}, {"w": "first", "b": [0.5611, 0.5947, 0.5924, 0.6095]}, {"w": "thing", "b": [0.5983, 0.5947, 0.6395, 0.6095]}, {"w": "to", "b": [0.6455, 0.5947, 0.6615, 0.6095]}, {"w": "check", "b": [0.6675, 0.5947, 0.7102, 0.6095]}, {"w": "is", "b": [0.7162, 0.5947, 0.7283, 0.6095]}, {"w": "if", "b": [0.7343, 0.5947, 0.7448, 0.6095]}, {"w": "the", "b": [0.7508, 0.5947, 0.7759, 0.6095]}, {"w": "data", "b": [0.7819, 0.5947, 0.817, 0.6095]}, {"w": "in", "b": [0.823, 0.5947, 0.8381, 0.6095]}, {"w": "the", "b": [0.844, 0.5947, 0.8691, 0.6095]}, {"w": "spreadsheet", "b": [0.1312, 0.6125, 0.2248, 0.6275]}, {"w": "is", "b": [0.231, 0.6125, 0.2434, 0.6275]}, {"w": "tidy.", "b": [0.2495, 0.6125, 0.2855, 0.6275]}, {"w": "As", "b": [0.2936, 0.6125, 0.3148, 0.6275]}, {"w": "discussed", "b": [0.3209, 0.6125, 0.3951, 0.6275]}, {"w": "in", "b": [0.4012, 0.6125, 0.4166, 0.6275]}, {"w": "the", "b": [0.4228, 0.6125, 0.4484, 0.6275]}, {"w": "introduction,", "b": [0.4546, 0.6125, 0.5592, 0.6275]}, {"w": "the", "b": [0.5654, 0.6125, 0.591, 0.6275]}, {"w": "dataset", "b": [0.5972, 0.6125, 0.6557, 0.6275]}, {"w": "used", "b": [0.6619, 0.6125, 0.6979, 0.6275]}, {"w": "for", "b": [0.704, 0.6125, 0.7261, 0.6275]}, {"w": "machine", "b": [0.7323, 0.6125, 0.7984, 0.6275]}, {"w": "learning", "b": [0.8045, 0.6125, 0.8692, 0.6275]}, {"w": "must", "b": [0.1312, 0.6304, 0.1712, 0.6454]}, {"w": "be", "b": [0.1773, 0.6304, 0.1965, 0.6454]}, {"w": "tidy.", "b": [0.2026, 0.6304, 0.2389, 0.6454]}, {"w": "If", "b": [0.2471, 0.6304, 0.2595, 0.6454]}, {"w": "it’s", "b": [0.2657, 0.6304, 0.2906, 0.6454]}, {"w": "not", "b": [0.2968, 0.6304, 0.3237, 0.6454]}, {"w": "the", "b": [0.3298, 0.6304, 0.3557, 0.6454]}, {"w": "case", "b": [0.3618, 0.6304, 0.3951, 0.6454]}, {"w": "for", "b": [0.4012, 0.6304, 0.4235, 0.6454]}, {"w": "your", "b": [0.4297, 0.6304, 0.466, 0.6454]}, {"w": "data,", "b": [0.4721, 0.6304, 0.5135, 0.6454]}, {"w": "you", "b": [0.5197, 0.6304, 0.5487, 0.6454]}, {"w": "must", "b": [0.5548, 0.6304, 0.5948, 0.6454]}, {"w": "transform", "b": [0.6009, 0.6304, 0.6803, 0.6454]}, {"w": "it", "b": [0.6865, 0.6304, 0.6989, 0.6454]}, {"w": "into", "b": [0.705, 0.6304, 0.7366, 0.6454]}, {"w": "tidy", "b": [0.7428, 0.6304, 0.7754, 0.6454]}, {"w": "data", "b": [0.7815, 0.6304, 0.8178, 0.6454]}, {"w": "using,", "b": [0.8239, 0.6304, 0.8716, 0.6454]}, {"w": "as", "b": [0.1312, 0.6484, 0.1477, 0.6634]}, {"w": "already", "b": [0.1539, 0.6484, 0.2129, 0.6634]}, {"w": "mentioned,", "b": [0.2191, 0.6484, 0.3078, 0.6634]}, {"w": "feature", "b": [0.3139, 0.6484, 0.3699, 0.6634]}, {"w": "engineering.", "b": [0.376, 0.6484, 0.4725, 0.6634]}]}, {"id": "b_8", "type": "paragraph", "text": "A tidy dataset can have missing values. Consider data imputation techniques to fill the missing values. We will discuss several such techniques in Section 3.7.", "words": [{"w": "A", "b": [0.1305, 0.6754, 0.1442, 0.6903]}, {"w": "tidy", "b": [0.1503, 0.6754, 0.1823, 0.6903]}, {"w": "dataset", "b": [0.1884, 0.6754, 0.2463, 0.6903]}, {"w": "can", "b": [0.2524, 0.6754, 0.2798, 0.6903]}, {"w": "have", "b": [0.2859, 0.6754, 0.3219, 0.6903]}, {"w": "missing", "b": [0.328, 0.6753, 0.3966, 0.6903]}, {"w": "values.", "b": [0.4037, 0.6753, 0.4648, 0.6903]}, {"w": "Consider", "b": [0.473, 0.6754, 0.5431, 0.6903]}, {"w": "data", "b": [0.5492, 0.6753, 0.5899, 0.6903]}, {"w": "imputation", "b": [0.5969, 0.6753, 0.6992, 0.6903]}, {"w": "techniques", "b": [0.7054, 0.6754, 0.7886, 0.6903]}, {"w": "to", "b": [0.7948, 0.6754, 0.811, 0.6903]}, {"w": "fill", "b": [0.8171, 0.6754, 0.8374, 0.6903]}, {"w": "the", "b": [0.8435, 0.6754, 0.8689, 0.6903]}, {"w": "missing", "b": [0.1312, 0.6933, 0.1909, 0.7082]}, {"w": "values.", "b": [0.1971, 0.6933, 0.251, 0.7082]}, {"w": "We", "b": [0.2592, 0.6933, 0.2849, 0.7082]}, {"w": "will", "b": [0.291, 0.6933, 0.3197, 0.7082]}, {"w": "discuss", "b": [0.3259, 0.6933, 0.3816, 0.7082]}, {"w": "several", "b": [0.3877, 0.6933, 0.4422, 0.7082]}, {"w": "such", "b": [0.4484, 0.6933, 0.4839, 0.7082]}, {"w": "techniques", "b": [0.49, 0.6933, 0.5743, 0.7082]}, {"w": "in", "b": [0.5804, 0.6933, 0.5958, 0.7082]}, {"w": "Section", "b": [0.6019, 0.6933, 0.6604, 0.7082]}, {"w": "3.7.", "b": [0.6665, 0.6933, 0.6952, 0.7082]}]}, {"id": "b_9", "type": "paragraph", "text": "One frequent problem with datasets compiled by a human is that people can decide to indicate missing values with some magic number like 9999 or −1. Such situations must be spotted during the visual analysis of the data, and those magic numbers have to be replaced using an appropriate data imputation technique.", "words": [{"w": "One", "b": [0.1312, 0.7201, 0.1647, 0.7352]}, {"w": "frequent", "b": [0.1727, 0.7201, 0.2402, 0.7352]}, {"w": "problem", "b": [0.2482, 0.7201, 0.3152, 0.7352]}, {"w": "with", "b": [0.3231, 0.7201, 0.3597, 0.7352]}, {"w": "datasets", "b": [0.3677, 0.7201, 0.4348, 0.7352]}, {"w": "compiled", "b": [0.4428, 0.7201, 0.516, 0.7352]}, {"w": "by", "b": [0.524, 0.7201, 0.5438, 0.7352]}, {"w": "a", "b": [0.5518, 0.7201, 0.5612, 0.7352]}, {"w": "human", "b": [0.5692, 0.7201, 0.6251, 0.7352]}, {"w": "is", "b": [0.6331, 0.7201, 0.6457, 0.7352]}, {"w": "that", "b": [0.6537, 0.7201, 0.6882, 0.7352]}, {"w": "people", "b": [0.6962, 0.7201, 0.749, 0.7352]}, {"w": "can", "b": [0.7569, 0.7201, 0.7852, 0.7352]}, {"w": "decide", "b": [0.7931, 0.7201, 0.8444, 0.7352]}, {"w": "to", "b": [0.8524, 0.7201, 0.8691, 0.7352]}, {"w": "indicate", "b": [0.1312, 0.7383, 0.1937, 0.7531]}, {"w": "missing", "b": [0.1998, 0.7383, 0.2585, 0.7531]}, {"w": "values", "b": [0.2646, 0.7383, 0.3126, 0.7531]}, {"w": "with", "b": [0.3187, 0.7383, 0.3539, 0.7531]}, {"w": "some", "b": [0.3601, 0.7383, 0.3995, 0.7531]}, {"w": "magic", "b": [0.4055, 0.7382, 0.4594, 0.7531]}, {"w": "number", "b": [0.4665, 0.7382, 0.5375, 0.7531]}, {"w": "like", "b": [0.5436, 0.7383, 0.5708, 0.7531]}, {"w": "9999", "b": [0.577, 0.7383, 0.6132, 0.7531]}, {"w": "or", "b": [0.6194, 0.7383, 0.6355, 0.7531]}, {"w": "−1.", "b": [0.6417, 0.7379, 0.6701, 0.7531]}, {"w": "Such", "b": [0.6784, 0.7383, 0.7161, 0.7531]}, {"w": "situations", "b": [0.7223, 0.7383, 0.799, 0.7531]}, {"w": "must", "b": [0.8052, 0.7383, 0.8441, 0.7531]}, {"w": "be", "b": [0.8502, 0.7383, 0.8689, 0.7531]}, {"w": "spotted", "b": [0.1312, 0.7562, 0.1904, 0.771]}, {"w": "during", "b": [0.1966, 0.7562, 0.2482, 0.771]}, {"w": "the", "b": [0.2543, 0.7562, 0.2796, 0.771]}, {"w": "visual", "b": [0.2857, 0.7562, 0.3318, 0.771]}, {"w": "analysis", "b": [0.3379, 0.7562, 0.4002, 0.771]}, {"w": "of", "b": [0.4064, 0.7562, 0.421, 0.771]}, {"w": "the", "b": [0.4272, 0.7562, 0.4524, 0.771]}, {"w": "data,", "b": [0.4586, 0.7562, 0.499, 0.771]}, {"w": "and", "b": [0.5051, 0.7562, 0.5344, 0.771]}, {"w": "those", "b": [0.5406, 0.7562, 0.5821, 0.771]}, {"w": "magic", "b": [0.5882, 0.7562, 0.6347, 0.771]}, {"w": "numbers", "b": [0.6408, 0.7562, 0.7081, 0.771]}, {"w": "have", "b": [0.7143, 0.7562, 0.7501, 0.771]}, {"w": "to", "b": [0.7563, 0.7562, 0.7724, 0.771]}, {"w": "be", "b": [0.7786, 0.7562, 0.7973, 0.771]}, {"w": "replaced", "b": [0.8034, 0.7562, 0.8691, 0.771]}, {"w": "using", "b": [0.1312, 0.774, 0.1734, 0.789]}, {"w": "an", "b": [0.1795, 0.774, 0.199, 0.789]}, {"w": "appropriate", "b": [0.2052, 0.774, 0.2986, 0.789]}, {"w": "data", "b": [0.3047, 0.774, 0.3406, 0.789]}, {"w": "imputation", "b": [0.3468, 0.774, 0.436, 0.789]}, {"w": "technique.", "b": [0.4421, 0.774, 0.5242, 0.789]}]}, {"id": "b_10", "type": "paragraph", "text": "Another property to validate is whether the dataset contains duplicates. Usually, duplicates are removed, unless you added them on purpose to balance an imbalanced problem. We consider this problem and methods to alleviate it in Section 3.9.", "words": [{"w": "Another", "b": [0.1305, 0.8011, 0.1954, 0.8159]}, {"w": "property", "b": [0.201, 0.8011, 0.269, 0.8159]}, {"w": "to", "b": [0.2746, 0.8011, 0.2907, 0.8159]}, {"w": "validate", "b": [0.2963, 0.8011, 0.358, 0.8159]}, {"w": "is", "b": [0.3637, 0.8011, 0.3758, 0.8159]}, {"w": "whether", "b": [0.3814, 0.8011, 0.4448, 0.8159]}, {"w": "the", "b": [0.4504, 0.8011, 0.4756, 0.8159]}, {"w": "dataset", "b": [0.4812, 0.8011, 0.5386, 0.8159]}, {"w": "contains", "b": [0.5442, 0.8011, 0.6091, 0.8159]}, {"w": "duplicates.", "b": [0.6145, 0.801, 0.7127, 0.8159]}, {"w": "Usually,", "b": [0.7208, 0.8011, 0.7836, 0.8159]}, {"w": "duplicates", "b": [0.7893, 0.8011, 0.8689, 0.8159]}, {"w": "are", "b": [0.1312, 0.8189, 0.156, 0.8339]}, {"w": "removed,", "b": [0.1621, 0.8189, 0.2347, 0.8339]}, {"w": "unless", "b": [0.2408, 0.8189, 0.2894, 0.8339]}, {"w": "you", "b": [0.2955, 0.8189, 0.3243, 0.8339]}, {"w": "added", "b": [0.3304, 0.8189, 0.3788, 0.8339]}, {"w": "them", "b": [0.3849, 0.8189, 0.426, 0.8339]}, {"w": "on", "b": [0.4322, 0.8189, 0.4517, 0.8339]}, {"w": "purpose", "b": [0.4578, 0.8189, 0.5213, 0.8339]}, {"w": "to", "b": [0.5274, 0.8189, 0.5438, 0.8339]}, {"w": "balance", "b": [0.55, 0.8189, 0.6107, 0.8339]}, {"w": "an", "b": [0.6168, 0.8189, 0.6363, 0.8339]}, {"w": "imbalanced", "b": [0.6424, 0.8189, 0.7464, 0.8339]}, {"w": "problem.", "b": [0.7534, 0.8189, 0.8349, 0.8339]}, {"w": "We", "b": [0.8431, 0.8189, 0.8688, 0.8339]}, {"w": "consider", "b": [0.1312, 0.8369, 0.197, 0.8518]}, {"w": "this", "b": [0.2032, 0.8369, 0.233, 0.8518]}, {"w": "problem", "b": [0.2392, 0.8369, 0.3049, 0.8518]}, {"w": "and", "b": [0.311, 0.8369, 0.3407, 0.8518]}, {"w": "methods", "b": [0.3469, 0.8369, 0.4152, 0.8518]}, {"w": "to", "b": [0.4213, 0.8369, 0.4377, 0.8518]}, {"w": "alleviate", "b": [0.4439, 0.8369, 0.5111, 0.8518]}, {"w": "it", "b": [0.5172, 0.8369, 0.5295, 0.8518]}, {"w": "in", "b": [0.5357, 0.8369, 0.551, 0.8518]}, {"w": "Section", "b": [0.5572, 0.8369, 0.6157, 0.8518]}, {"w": "3.9.", "b": [0.6218, 0.8369, 0.6505, 0.8518]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "6", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 50, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Data can be expired or be significantly not up to date. For example, let your goal be to train a model that recognizes abnormality in the behavior of a complex piece of electronic appliance, such as a printer. You have measurements taken during the normal and abnormal functioning of a printer. However, these measurements have been recorded for a previous generation of printers, while the new generation has received several significant upgrades since then. The model trained using such expired data from an older printer generation might perform worse when deployed on the new generation of printers.", "words": [{"w": "Data", "b": [0.1312, 0.0883, 0.1717, 0.1034]}, {"w": "can", "b": [0.1782, 0.0883, 0.2065, 0.1034]}, {"w": "be", "b": [0.213, 0.0883, 0.2323, 0.1034]}, {"w": "expired", "b": [0.2388, 0.0884, 0.3077, 0.1034]}, {"w": "or", "b": [0.3141, 0.0883, 0.3309, 0.1034]}, {"w": "be", "b": [0.3374, 0.0883, 0.3568, 0.1034]}, {"w": "significantly", "b": [0.3633, 0.0883, 0.4617, 0.1034]}, {"w": "not", "b": [0.4682, 0.0883, 0.4954, 0.1034]}, {"w": "up", "b": [0.5019, 0.0883, 0.5228, 0.1034]}, {"w": "to", "b": [0.5293, 0.0883, 0.546, 0.1034]}, {"w": "date.", "b": [0.5525, 0.0883, 0.5933, 0.1034]}, {"w": "For", "b": [0.6026, 0.0883, 0.6301, 0.1034]}, {"w": "example,", "b": [0.6366, 0.0883, 0.7093, 0.1034]}, {"w": "let", "b": [0.7159, 0.0883, 0.7368, 0.1034]}, {"w": "your", "b": [0.7433, 0.0883, 0.78, 0.1034]}, {"w": "goal", "b": [0.7865, 0.0883, 0.8199, 0.1034]}, {"w": "be", "b": [0.8264, 0.0883, 0.8458, 0.1034]}, {"w": "to", "b": [0.8523, 0.0883, 0.869, 0.1034]}, {"w": "train", "b": [0.1312, 0.1062, 0.1709, 0.1213]}, {"w": "a", "b": [0.177, 0.1062, 0.1864, 0.1213]}, {"w": "model", "b": [0.1925, 0.1062, 0.242, 0.1213]}, {"w": "that", "b": [0.2481, 0.1062, 0.2825, 0.1213]}, {"w": "recognizes", "b": [0.2886, 0.1062, 0.3711, 0.1213]}, {"w": "abnormality", "b": [0.3772, 0.1062, 0.4762, 0.1213]}, {"w": "in", "b": [0.4824, 0.1062, 0.498, 0.1213]}, {"w": "the", "b": [0.5041, 0.1062, 0.5302, 0.1213]}, {"w": "behavior", "b": [0.5363, 0.1062, 0.6067, 0.1213]}, {"w": "of", "b": [0.6128, 0.1062, 0.6279, 0.1213]}, {"w": "a", "b": [0.6341, 0.1062, 0.6434, 0.1213]}, {"w": "complex", "b": [0.6496, 0.1062, 0.7168, 0.1213]}, {"w": "piece", "b": [0.7229, 0.1062, 0.7635, 0.1213]}, {"w": "of", "b": [0.7697, 0.1062, 0.7848, 0.1213]}, {"w": "electronic", "b": [0.7909, 0.1062, 0.8691, 0.1213]}, {"w": "appliance,", "b": [0.1312, 0.1244, 0.2107, 0.1392]}, {"w": "such", "b": [0.2169, 0.1244, 0.2517, 0.1392]}, {"w": "as", "b": [0.2579, 0.1244, 0.2741, 0.1392]}, {"w": "a", "b": [0.2803, 0.1244, 0.2893, 0.1392]}, {"w": "printer.", "b": [0.2955, 0.1244, 0.3544, 0.1392]}, {"w": "You", "b": [0.3627, 0.1244, 0.3938, 0.1392]}, {"w": "have", "b": [0.4, 0.1244, 0.4357, 0.1392]}, {"w": "measurements", "b": [0.4419, 0.1244, 0.5533, 0.1392]}, {"w": "taken", "b": [0.5595, 0.1244, 0.6027, 0.1392]}, {"w": "during", "b": [0.6089, 0.1244, 0.6602, 0.1392]}, {"w": "the", "b": [0.6664, 0.1244, 0.6916, 0.1392]}, {"w": "normal", "b": [0.6977, 0.1244, 0.7531, 0.1392]}, {"w": "and", "b": [0.7593, 0.1244, 0.7885, 0.1392]}, {"w": "abnormal", "b": [0.7946, 0.1244, 0.8691, 0.1392]}, {"w": "functioning", "b": [0.1312, 0.1421, 0.2238, 0.1572]}, {"w": "of", "b": [0.2303, 0.1421, 0.2455, 0.1572]}, {"w": "a", "b": [0.252, 0.1421, 0.2614, 0.1572]}, {"w": "printer.", "b": [0.2678, 0.1421, 0.3292, 0.1572]}, {"w": "However,", "b": [0.3384, 0.1421, 0.4132, 0.1572]}, {"w": "these", "b": [0.4198, 0.1421, 0.4618, 0.1572]}, {"w": "measurements", "b": [0.4682, 0.1421, 0.5841, 0.1572]}, {"w": "have", "b": [0.5906, 0.1421, 0.6277, 0.1572]}, {"w": "been", "b": [0.6342, 0.1421, 0.6724, 0.1572]}, {"w": "recorded", "b": [0.6789, 0.1421, 0.7491, 0.1572]}, {"w": "for", "b": [0.7556, 0.1421, 0.7781, 0.1572]}, {"w": "a", "b": [0.7846, 0.1421, 0.794, 0.1572]}, {"w": "previous", "b": [0.8005, 0.1421, 0.8692, 0.1572]}, {"w": "generation", "b": [0.1312, 0.1601, 0.2171, 0.1752]}, {"w": "of", "b": [0.2239, 0.1601, 0.2391, 0.1752]}, {"w": "printers,", "b": [0.2459, 0.1601, 0.3147, 0.1752]}, {"w": "while", "b": [0.3217, 0.1601, 0.3645, 0.1752]}, {"w": "the", "b": [0.3714, 0.1601, 0.3975, 0.1752]}, {"w": "new", "b": [0.4044, 0.1601, 0.4368, 0.1752]}, {"w": "generation", "b": [0.4436, 0.1601, 0.5294, 0.1752]}, {"w": "has", "b": [0.5363, 0.1601, 0.5636, 0.1752]}, {"w": "received", "b": [0.5704, 0.1601, 0.6364, 0.1752]}, {"w": "several", "b": [0.6432, 0.1601, 0.6988, 0.1752]}, {"w": "significant", "b": [0.7057, 0.1601, 0.789, 0.1752]}, {"w": "upgrades", "b": [0.7958, 0.1601, 0.8692, 0.1752]}, {"w": "since", "b": [0.1312, 0.1782, 0.1695, 0.1931]}, {"w": "then.", "b": [0.175, 0.1782, 0.2152, 0.1931]}, {"w": "The", "b": [0.2231, 0.1782, 0.2543, 0.1931]}, {"w": "model", "b": [0.2597, 0.1782, 0.3074, 0.1931]}, {"w": "trained", "b": [0.3129, 0.1782, 0.3692, 0.1931]}, {"w": "using", "b": [0.3746, 0.1782, 0.4159, 0.1931]}, {"w": "such", "b": [0.4214, 0.1782, 0.4561, 0.1931]}, {"w": "expired", "b": [0.4616, 0.1782, 0.5194, 0.1931]}, {"w": "data", "b": [0.5248, 0.1782, 0.56, 0.1931]}, {"w": "from", "b": [0.5654, 0.1782, 0.6022, 0.1931]}, {"w": "an", "b": [0.6076, 0.1782, 0.6267, 0.1931]}, {"w": "older", "b": [0.6321, 0.1782, 0.6713, 0.1931]}, {"w": "printer", "b": [0.6768, 0.1782, 0.7306, 0.1931]}, {"w": "generation", "b": [0.7361, 0.1782, 0.8185, 0.1931]}, {"w": "might", "b": [0.8239, 0.1782, 0.8696, 0.1931]}, {"w": "perform", "b": [0.1312, 0.1961, 0.1949, 0.211]}, {"w": "worse", "b": [0.2011, 0.1961, 0.2458, 0.211]}, {"w": "when", "b": [0.252, 0.1961, 0.294, 0.211]}, {"w": "deployed", "b": [0.3002, 0.1961, 0.3704, 0.211]}, {"w": "on", "b": [0.3766, 0.1961, 0.3961, 0.211]}, {"w": "the", "b": [0.4022, 0.1961, 0.4278, 0.211]}, {"w": "new", "b": [0.434, 0.1961, 0.4658, 0.211]}, {"w": "generation", "b": [0.4719, 0.1961, 0.5561, 0.211]}, {"w": "of", "b": [0.5622, 0.1961, 0.5771, 0.211]}, {"w": "printers.", "b": [0.5832, 0.1961, 0.6506, 0.211]}]}, {"id": "b_1", "type": "paragraph", "text": "Finally, data can be incomplete or unrepresentative of the phenomenon. For example, a dataset of animal photos might contain pictures taken only during the summer or in a specific geography. A dataset of pedestrians for self-driving car systems might be created with engineers posing as pedestrians; in such a dataset, most situations would include only younger men, while children, women, and the elderly would be underrepresented or entirely absent.", "words": [{"w": "Finally,", "b": [0.1312, 0.2229, 0.1927, 0.238]}, {"w": "data", "b": [0.1991, 0.2229, 0.2357, 0.238]}, {"w": "can", "b": [0.242, 0.2229, 0.2703, 0.238]}, {"w": "be", "b": [0.2766, 0.2229, 0.2959, 0.238]}, {"w": "incomplete", "b": [0.3022, 0.223, 0.403, 0.238]}, {"w": "or", "b": [0.4093, 0.2229, 0.4261, 0.238]}, {"w": "unrepresentative", "b": [0.4324, 0.223, 0.5871, 0.238]}, {"w": "of", "b": [0.5934, 0.2229, 0.6085, 0.238]}, {"w": "the", "b": [0.6149, 0.2229, 0.641, 0.238]}, {"w": "phenomenon.", "b": [0.6474, 0.2229, 0.7561, 0.238]}, {"w": "For", "b": [0.7649, 0.2229, 0.7924, 0.238]}, {"w": "example,", "b": [0.7988, 0.2229, 0.8715, 0.238]}, {"w": "a", "b": [0.1312, 0.2408, 0.1406, 0.2559]}, {"w": "dataset", "b": [0.1476, 0.2408, 0.2073, 0.2559]}, {"w": "of", "b": [0.2143, 0.2408, 0.2294, 0.2559]}, {"w": "animal", "b": [0.2364, 0.2408, 0.2918, 0.2559]}, {"w": "photos", "b": [0.2988, 0.2408, 0.3533, 0.2559]}, {"w": "might", "b": [0.3602, 0.2408, 0.4078, 0.2559]}, {"w": "contain", "b": [0.4148, 0.2408, 0.4749, 0.2559]}, {"w": "pictures", "b": [0.4819, 0.2408, 0.5469, 0.2559]}, {"w": "taken", "b": [0.5539, 0.2408, 0.5989, 0.2559]}, {"w": "only", "b": [0.6058, 0.2408, 0.6409, 0.2559]}, {"w": "during", "b": [0.6478, 0.2408, 0.7012, 0.2559]}, {"w": "the", "b": [0.7082, 0.2408, 0.7343, 0.2559]}, {"w": "summer", "b": [0.7413, 0.2408, 0.8063, 0.2559]}, {"w": "or", "b": [0.8133, 0.2408, 0.83, 0.2559]}, {"w": "in", "b": [0.837, 0.2408, 0.8527, 0.2559]}, {"w": "a", "b": [0.8596, 0.2408, 0.8691, 0.2559]}, {"w": "specific", "b": [0.1312, 0.259, 0.1882, 0.2738]}, {"w": "geography.", "b": [0.1934, 0.259, 0.2773, 0.2738]}, {"w": "A", "b": [0.2852, 0.259, 0.2988, 0.2738]}, {"w": "dataset", "b": [0.304, 0.259, 0.3614, 0.2738]}, {"w": "of", "b": [0.3667, 0.259, 0.3813, 0.2738]}, {"w": "pedestrians", "b": [0.3865, 0.259, 0.4757, 0.2738]}, {"w": "for", "b": [0.481, 0.259, 0.5027, 0.2738]}, {"w": "self-driving", "b": [0.5079, 0.259, 0.5955, 0.2738]}, {"w": "car", "b": [0.6008, 0.259, 0.6249, 0.2738]}, {"w": "systems", "b": [0.6302, 0.259, 0.6913, 0.2738]}, {"w": "might", "b": [0.6966, 0.259, 0.7423, 0.2738]}, {"w": "be", "b": [0.7475, 0.259, 0.7661, 0.2738]}, {"w": "created", "b": [0.7714, 0.259, 0.8287, 0.2738]}, {"w": "with", "b": [0.834, 0.259, 0.8692, 0.2738]}, {"w": "engineers", "b": [0.1312, 0.277, 0.2038, 0.2918]}, {"w": "posing", "b": [0.2091, 0.277, 0.2599, 0.2918]}, {"w": "as", "b": [0.2652, 0.277, 0.2814, 0.2918]}, {"w": "pedestrians;", "b": [0.2867, 0.277, 0.3809, 0.2918]}, {"w": "in", "b": [0.3865, 0.277, 0.4016, 0.2918]}, {"w": "such", "b": [0.4069, 0.277, 0.4417, 0.2918]}, {"w": "a", "b": [0.447, 0.277, 0.456, 0.2918]}, {"w": "dataset,", "b": [0.4613, 0.277, 0.5237, 0.2918]}, {"w": "most", "b": [0.5292, 0.277, 0.5675, 0.2918]}, {"w": "situations", "b": [0.5728, 0.277, 0.6493, 0.2918]}, {"w": "would", "b": [0.6546, 0.277, 0.7013, 0.2918]}, {"w": "include", "b": [0.7066, 0.277, 0.7629, 0.2918]}, {"w": "only", "b": [0.7682, 0.277, 0.8019, 0.2918]}, {"w": "younger", "b": [0.8072, 0.277, 0.8695, 0.2918]}, {"w": "men,", "b": [0.1312, 0.2948, 0.1702, 0.3097]}, {"w": "while", "b": [0.1763, 0.2948, 0.2184, 0.3097]}, {"w": "children,", "b": [0.2245, 0.2948, 0.2938, 0.3097]}, {"w": "women,", "b": [0.3, 0.2948, 0.361, 0.3097]}, {"w": "and", "b": [0.3671, 0.2948, 0.3969, 0.3097]}, {"w": "the", "b": [0.403, 0.2948, 0.4287, 0.3097]}, {"w": "elderly", "b": [0.4348, 0.2948, 0.4887, 0.3097]}, {"w": "would", "b": [0.4949, 0.2948, 0.5425, 0.3097]}, {"w": "be", "b": [0.5487, 0.2948, 0.5677, 0.3097]}, {"w": "underrepresented", "b": [0.5738, 0.2948, 0.7121, 0.3097]}, {"w": "or", "b": [0.7182, 0.2948, 0.7347, 0.3097]}, {"w": "entirely", "b": [0.7408, 0.2948, 0.8014, 0.3097]}, {"w": "absent.", "b": [0.8075, 0.2948, 0.8646, 0.3097]}]}, {"id": "b_2", "type": "paragraph", "text": "A company working on facial expression recognition might have the research and development office in a predominantly white location, so the dataset would only show faces of white men and women, while black or Asian people would be underrepresented. Engineers developing a posture recognition model for a camera might build the training dataset by taking pictures of people indoors, while the customers would typically use the camera outdoors.", "words": [{"w": "A", "b": [0.1305, 0.3218, 0.1441, 0.3366]}, {"w": "company", "b": [0.1495, 0.3218, 0.2198, 0.3366]}, {"w": "working", "b": [0.2252, 0.3218, 0.2875, 0.3366]}, {"w": "on", "b": [0.2929, 0.3218, 0.312, 0.3366]}, {"w": "facial", "b": [0.3174, 0.3218, 0.3591, 0.3366]}, {"w": "expression", "b": [0.3645, 0.3218, 0.4457, 0.3366]}, {"w": "recognition", "b": [0.4511, 0.3218, 0.5386, 0.3366]}, {"w": "might", "b": [0.544, 0.3218, 0.5897, 0.3366]}, {"w": "have", "b": [0.5951, 0.3218, 0.6307, 0.3366]}, {"w": "the", "b": [0.6361, 0.3218, 0.6613, 0.3366]}, {"w": "research", "b": [0.6667, 0.3218, 0.7307, 0.3366]}, {"w": "and", "b": [0.7361, 0.3218, 0.7652, 0.3366]}, {"w": "development", "b": [0.7706, 0.3218, 0.8696, 0.3366]}, {"w": "office", "b": [0.1312, 0.3397, 0.172, 0.3546]}, {"w": "in", "b": [0.1781, 0.3397, 0.1934, 0.3546]}, {"w": "a", "b": [0.1996, 0.3397, 0.2088, 0.3546]}, {"w": "predominantly", "b": [0.2149, 0.3397, 0.3311, 0.3546]}, {"w": "white", "b": [0.3373, 0.3397, 0.3811, 0.3546]}, {"w": "location,", "b": [0.3873, 0.3397, 0.4561, 0.3546]}, {"w": "so", "b": [0.4622, 0.3397, 0.4786, 0.3546]}, {"w": "the", "b": [0.4848, 0.3397, 0.5103, 0.3546]}, {"w": "dataset", "b": [0.5164, 0.3397, 0.5746, 0.3546]}, {"w": "would", "b": [0.5807, 0.3397, 0.6281, 0.3546]}, {"w": "only", "b": [0.6343, 0.3397, 0.6684, 0.3546]}, {"w": "show", "b": [0.6746, 0.3397, 0.7139, 0.3546]}, {"w": "faces", "b": [0.72, 0.3397, 0.7584, 0.3546]}, {"w": "of", "b": [0.7645, 0.3397, 0.7793, 0.3546]}, {"w": "white", "b": [0.7855, 0.3397, 0.8293, 0.3546]}, {"w": "men", "b": [0.8354, 0.3397, 0.8691, 0.3546]}, {"w": "and", "b": [0.1312, 0.3577, 0.1606, 0.3725]}, {"w": "women,", "b": [0.1667, 0.3577, 0.2268, 0.3725]}, {"w": "while", "b": [0.233, 0.3577, 0.2744, 0.3725]}, {"w": "black", "b": [0.2806, 0.3577, 0.322, 0.3725]}, {"w": "or", "b": [0.3282, 0.3577, 0.3444, 0.3725]}, {"w": "Asian", "b": [0.3506, 0.3577, 0.3956, 0.3725]}, {"w": "people", "b": [0.4018, 0.3577, 0.4529, 0.3725]}, {"w": "would", "b": [0.459, 0.3577, 0.506, 0.3725]}, {"w": "be", "b": [0.5122, 0.3577, 0.5309, 0.3725]}, {"w": "underrepresented.", "b": [0.537, 0.3577, 0.6784, 0.3725]}, {"w": "Engineers", "b": [0.6866, 0.3577, 0.7638, 0.3725]}, {"w": "developing", "b": [0.77, 0.3577, 0.8539, 0.3725]}, {"w": "a", "b": [0.8601, 0.3577, 0.8692, 0.3725]}, {"w": "posture", "b": [0.1312, 0.3755, 0.1915, 0.3905]}, {"w": "recognition", "b": [0.1977, 0.3755, 0.2871, 0.3905]}, {"w": "model", "b": [0.2933, 0.3755, 0.3421, 0.3905]}, {"w": "for", "b": [0.3482, 0.3755, 0.3704, 0.3905]}, {"w": "a", "b": [0.3766, 0.3755, 0.3858, 0.3905]}, {"w": "camera", "b": [0.392, 0.3755, 0.4495, 0.3905]}, {"w": "might", "b": [0.4557, 0.3755, 0.5025, 0.3905]}, {"w": "build", "b": [0.5086, 0.3755, 0.5497, 0.3905]}, {"w": "the", "b": [0.5559, 0.3755, 0.5816, 0.3905]}, {"w": "training", "b": [0.5877, 0.3755, 0.6515, 0.3905]}, {"w": "dataset", "b": [0.6577, 0.3755, 0.7163, 0.3905]}, {"w": "by", "b": [0.7225, 0.3755, 0.742, 0.3905]}, {"w": "taking", "b": [0.7482, 0.3755, 0.799, 0.3905]}, {"w": "pictures", "b": [0.8052, 0.3755, 0.8691, 0.3905]}, {"w": "of", "b": [0.1312, 0.3935, 0.1461, 0.4084]}, {"w": "people", "b": [0.1522, 0.3935, 0.2041, 0.4084]}, {"w": "indoors,", "b": [0.2102, 0.3935, 0.2745, 0.4084]}, {"w": "while", "b": [0.2806, 0.3935, 0.3226, 0.4084]}, {"w": "the", "b": [0.3288, 0.3935, 0.3544, 0.4084]}, {"w": "customers", "b": [0.3606, 0.3935, 0.4408, 0.4084]}, {"w": "would", "b": [0.447, 0.3935, 0.4947, 0.4084]}, {"w": "typically", "b": [0.5008, 0.3935, 0.57, 0.4084]}, {"w": "use", "b": [0.5762, 0.3935, 0.6019, 0.4084]}, {"w": "the", "b": [0.6081, 0.3935, 0.6337, 0.4084]}, {"w": "camera", "b": [0.6399, 0.3935, 0.6973, 0.4084]}, {"w": "outdoors.", "b": [0.7035, 0.3935, 0.779, 0.4084]}]}, {"id": "b_3", "type": "paragraph", "text": "In practice, data can only become useable for modeling after preprocessing; hence the importance of visual analysis of the dataset before you start modeling. Let’s say you work on a problem of predicting the topic in news articles. It’s likely you will scrape your data from news websites. It’s also likely that download dates would be saved in the same document as the news article text. Imagine also that the data engineer decides to loop over news topics mentioned on the websites and scrape one topic at a time. So, on Monday the arts-related articles were scraped, on Tuesday — sports, on Wednesday — technology, and so on.", "words": [{"w": "In", "b": [0.1312, 0.4203, 0.1485, 0.4354]}, {"w": "practice,", "b": [0.1572, 0.4203, 0.2273, 0.4354]}, {"w": "data", "b": [0.2366, 0.4203, 0.2732, 0.4354]}, {"w": "can", "b": [0.2819, 0.4203, 0.3102, 0.4354]}, {"w": "only", "b": [0.3188, 0.4203, 0.3539, 0.4354]}, {"w": "become", "b": [0.3625, 0.4203, 0.4237, 0.4354]}, {"w": "useable", "b": [0.4324, 0.4203, 0.4921, 0.4354]}, {"w": "for", "b": [0.5008, 0.4203, 0.5234, 0.4354]}, {"w": "modeling", "b": [0.5321, 0.4203, 0.6068, 0.4354]}, {"w": "after", "b": [0.6155, 0.4203, 0.6537, 0.4354]}, {"w": "preprocessing;", "b": [0.6624, 0.4203, 0.7783, 0.4354]}, {"w": "hence", "b": [0.7883, 0.4203, 0.8343, 0.4354]}, {"w": "the", "b": [0.843, 0.4203, 0.8692, 0.4354]}, {"w": "importance", "b": [0.1312, 0.4385, 0.2202, 0.4533]}, {"w": "of", "b": [0.226, 0.4385, 0.2406, 0.4533]}, {"w": "visual", "b": [0.2464, 0.4385, 0.2923, 0.4533]}, {"w": "analysis", "b": [0.2981, 0.4385, 0.3601, 0.4533]}, {"w": "of", "b": [0.3659, 0.4385, 0.3805, 0.4533]}, {"w": "the", "b": [0.3863, 0.4385, 0.4114, 0.4533]}, {"w": "dataset", "b": [0.4172, 0.4385, 0.4746, 0.4533]}, {"w": "before", "b": [0.4804, 0.4385, 0.5287, 0.4533]}, {"w": "you", "b": [0.5346, 0.4385, 0.5627, 0.4533]}, {"w": "start", "b": [0.5685, 0.4385, 0.6058, 0.4533]}, {"w": "modeling.", "b": [0.6117, 0.4385, 0.6885, 0.4533]}, {"w": "Let’s", "b": [0.6966, 0.4385, 0.7352, 0.4533]}, {"w": "say", "b": [0.741, 0.4385, 0.7662, 0.4533]}, {"w": "you", "b": [0.772, 0.4385, 0.8001, 0.4533]}, {"w": "work", "b": [0.806, 0.4385, 0.8442, 0.4533]}, {"w": "on", "b": [0.85, 0.4385, 0.8691, 0.4533]}, {"w": "a", "b": [0.1312, 0.4563, 0.1404, 0.4713]}, {"w": "problem", "b": [0.1466, 0.4563, 0.212, 0.4713]}, {"w": "of", "b": [0.2181, 0.4563, 0.2329, 0.4713]}, {"w": "predicting", "b": [0.2391, 0.4563, 0.3198, 0.4713]}, {"w": "the", "b": [0.326, 0.4563, 0.3515, 0.4713]}, {"w": "topic", "b": [0.3576, 0.4563, 0.3975, 0.4713]}, {"w": "in", "b": [0.4036, 0.4563, 0.4189, 0.4713]}, {"w": "news", "b": [0.4251, 0.4563, 0.464, 0.4713]}, {"w": "articles.", "b": [0.4702, 0.4563, 0.5326, 0.4713]}, {"w": "It’s", "b": [0.5408, 0.4563, 0.567, 0.4713]}, {"w": "likely", "b": [0.5731, 0.4563, 0.6155, 0.4713]}, {"w": "you", "b": [0.6216, 0.4563, 0.6502, 0.4713]}, {"w": "will", "b": [0.6564, 0.4563, 0.685, 0.4713]}, {"w": "scrape", "b": [0.6911, 0.4563, 0.7418, 0.4713]}, {"w": "your", "b": [0.748, 0.4563, 0.7838, 0.4713]}, {"w": "data", "b": [0.7899, 0.4563, 0.8256, 0.4713]}, {"w": "from", "b": [0.8318, 0.4563, 0.8691, 0.4713]}, {"w": "news", "b": [0.1312, 0.4743, 0.17, 0.4892]}, {"w": "websites.", "b": [0.1761, 0.4743, 0.2469, 0.4892]}, {"w": "It’s", "b": [0.2551, 0.4743, 0.2812, 0.4892]}, {"w": "also", "b": [0.2873, 0.4743, 0.3179, 0.4892]}, {"w": "likely", "b": [0.324, 0.4743, 0.3662, 0.4892]}, {"w": "that", "b": [0.3723, 0.4743, 0.4059, 0.4892]}, {"w": "download", "b": [0.412, 0.4743, 0.4877, 0.4892]}, {"w": "dates", "b": [0.4938, 0.4743, 0.5356, 0.4892]}, {"w": "would", "b": [0.5418, 0.4743, 0.589, 0.4892]}, {"w": "be", "b": [0.5952, 0.4743, 0.614, 0.4892]}, {"w": "saved", "b": [0.6201, 0.4743, 0.6634, 0.4892]}, {"w": "in", "b": [0.6695, 0.4743, 0.6848, 0.4892]}, {"w": "the", "b": [0.6909, 0.4743, 0.7163, 0.4892]}, {"w": "same", "b": [0.7225, 0.4743, 0.7622, 0.4892]}, {"w": "document", "b": [0.7683, 0.4743, 0.8466, 0.4892]}, {"w": "as", "b": [0.8527, 0.4743, 0.8691, 0.4892]}, {"w": "the", "b": [0.1312, 0.4921, 0.1571, 0.5072]}, {"w": "news", "b": [0.1633, 0.4921, 0.2027, 0.5072]}, {"w": "article", "b": [0.2089, 0.4921, 0.2597, 0.5072]}, {"w": "text.", "b": [0.2658, 0.4921, 0.3036, 0.5072]}, {"w": "Imagine", "b": [0.3118, 0.4921, 0.3765, 0.5072]}, {"w": "also", "b": [0.3826, 0.4921, 0.4138, 0.5072]}, {"w": "that", "b": [0.4199, 0.4921, 0.4541, 0.5072]}, {"w": "the", "b": [0.4602, 0.4921, 0.4861, 0.5072]}, {"w": "data", "b": [0.4923, 0.4921, 0.5285, 0.5072]}, {"w": "engineer", "b": [0.5346, 0.4921, 0.602, 0.5072]}, {"w": "decides", "b": [0.6081, 0.4921, 0.6663, 0.5072]}, {"w": "to", "b": [0.6724, 0.4921, 0.689, 0.5072]}, {"w": "loop", "b": [0.6951, 0.4921, 0.7298, 0.5072]}, {"w": "over", "b": [0.7359, 0.4921, 0.7696, 0.5072]}, {"w": "news", "b": [0.7758, 0.4921, 0.8152, 0.5072]}, {"w": "topics", "b": [0.8214, 0.4921, 0.8691, 0.5072]}, {"w": "mentioned", "b": [0.1312, 0.5101, 0.2156, 0.5251]}, {"w": "on", "b": [0.2218, 0.5101, 0.2415, 0.5251]}, {"w": "the", "b": [0.2476, 0.5101, 0.2735, 0.5251]}, {"w": "websites", "b": [0.2796, 0.5101, 0.3467, 0.5251]}, {"w": "and", "b": [0.3528, 0.5101, 0.3828, 0.5251]}, {"w": "scrape", "b": [0.389, 0.5101, 0.4404, 0.5251]}, {"w": "one", "b": [0.4465, 0.5101, 0.4745, 0.5251]}, {"w": "topic", "b": [0.4806, 0.5101, 0.521, 0.5251]}, {"w": "at", "b": [0.5272, 0.5101, 0.5437, 0.5251]}, {"w": "a", "b": [0.5499, 0.5101, 0.5592, 0.5251]}, {"w": "time.", "b": [0.5653, 0.5101, 0.6067, 0.5251]}, {"w": "So,", "b": [0.6149, 0.5101, 0.6398, 0.5251]}, {"w": "on", "b": [0.6459, 0.5101, 0.6656, 0.5251]}, {"w": "Monday", "b": [0.6717, 0.5101, 0.7375, 0.5251]}, {"w": "the", "b": [0.7436, 0.5101, 0.7695, 0.5251]}, {"w": "arts-related", "b": [0.7757, 0.5101, 0.8691, 0.5251]}, {"w": "articles", "b": [0.1312, 0.5281, 0.1888, 0.543]}, {"w": "were", "b": [0.195, 0.5281, 0.2314, 0.543]}, {"w": "scraped,", "b": [0.2376, 0.5281, 0.3039, 0.543]}, {"w": "on", "b": [0.31, 0.5281, 0.3295, 0.543]}, {"w": "Tuesday", "b": [0.3357, 0.5281, 0.4019, 0.543]}, {"w": "—", "b": [0.4081, 0.5281, 0.4265, 0.543]}, {"w": "sports,", "b": [0.4327, 0.5281, 0.4868, 0.543]}, {"w": "on", "b": [0.4929, 0.5281, 0.5124, 0.543]}, {"w": "Wednesday", "b": [0.5186, 0.5281, 0.6089, 0.543]}, {"w": "—", "b": [0.6151, 0.5281, 0.6335, 0.543]}, {"w": "technology,", "b": [0.6397, 0.5281, 0.7294, 0.543]}, {"w": "and", "b": [0.7356, 0.5281, 0.7653, 0.543]}, {"w": "so", "b": [0.7714, 0.5281, 0.788, 0.543]}, {"w": "on.", "b": [0.7941, 0.5281, 0.8187, 0.543]}]}, {"id": "b_4", "type": "paragraph", "text": "If you don’t preprocess such data by removing the dates, the model can learn the date-topic correlation, and such a model will be of no practical use.", "words": [{"w": "If", "b": [0.1312, 0.5551, 0.1434, 0.5699]}, {"w": "you", "b": [0.1496, 0.5551, 0.1779, 0.5699]}, {"w": "don’t", "b": [0.1841, 0.5551, 0.2256, 0.5699]}, {"w": "preprocess", "b": [0.2318, 0.5551, 0.3147, 0.5699]}, {"w": "such", "b": [0.3208, 0.5551, 0.3559, 0.5699]}, {"w": "data", "b": [0.3621, 0.5551, 0.3975, 0.5699]}, {"w": "by", "b": [0.4037, 0.5551, 0.4229, 0.5699]}, {"w": "removing", "b": [0.4291, 0.5551, 0.5021, 0.5699]}, {"w": "the", "b": [0.5082, 0.5551, 0.5335, 0.5699]}, {"w": "dates,", "b": [0.5397, 0.5551, 0.5864, 0.5699]}, {"w": "the", "b": [0.5926, 0.5551, 0.6179, 0.5699]}, {"w": "model", "b": [0.6241, 0.5551, 0.6722, 0.5699]}, {"w": "can", "b": [0.6784, 0.5551, 0.7057, 0.5699]}, {"w": "learn", "b": [0.7119, 0.5551, 0.7514, 0.5699]}, {"w": "the", "b": [0.7576, 0.5551, 0.7829, 0.5699]}, {"w": "date-topic", "b": [0.7891, 0.5551, 0.8691, 0.5699]}, {"w": "correlation,", "b": [0.1312, 0.573, 0.2226, 0.5879]}, {"w": "and", "b": [0.2288, 0.573, 0.2585, 0.5879]}, {"w": "such", "b": [0.2646, 0.573, 0.3001, 0.5879]}, {"w": "a", "b": [0.3063, 0.573, 0.3155, 0.5879]}, {"w": "model", "b": [0.3217, 0.573, 0.3704, 0.5879]}, {"w": "will", "b": [0.3765, 0.573, 0.4052, 0.5879]}, {"w": "be", "b": [0.4114, 0.573, 0.4304, 0.5879]}, {"w": "of", "b": [0.4365, 0.573, 0.4514, 0.5879]}, {"w": "no", "b": [0.4575, 0.573, 0.477, 0.5879]}, {"w": "practical", "b": [0.4832, 0.573, 0.5529, 0.5879]}, {"w": "use.", "b": [0.5591, 0.573, 0.59, 0.5879]}]}, {"id": "b_5", "type": "paragraph", "text": "3.1.4 Is the Data Understandable?", "words": [{"w": "3.1.4", "b": [0.1312, 0.6208, 0.1749, 0.6358]}, {"w": "Is", "b": [0.1961, 0.6208, 0.2125, 0.6358]}, {"w": "the", "b": [0.2196, 0.6208, 0.2493, 0.6358]}, {"w": "Data", "b": [0.2564, 0.6208, 0.3016, 0.6358]}, {"w": "Understandable?", "b": [0.3086, 0.6208, 0.4653, 0.6358]}]}, {"id": "b_6", "type": "paragraph", "text": "As demonstrated in gender prediction, it’s crucial to understand from where each attribute in the dataset came. It is equally important to understand what each attribute exactly represents. One frequent problem observed in practice is when the variable that the analyst tries to predict is found among the features in the feature vector. How could that happen?", "words": [{"w": "As", "b": [0.1305, 0.6574, 0.1517, 0.6723]}, {"w": "demonstrated", "b": [0.1579, 0.6574, 0.2681, 0.6723]}, {"w": "in", "b": [0.2742, 0.6574, 0.2897, 0.6723]}, {"w": "gender", "b": [0.2958, 0.6574, 0.3494, 0.6723]}, {"w": "prediction,", "b": [0.3555, 0.6574, 0.442, 0.6723]}, {"w": "it’s", "b": [0.4481, 0.6574, 0.4729, 0.6723]}, {"w": "crucial", "b": [0.4791, 0.6574, 0.5326, 0.6723]}, {"w": "to", "b": [0.5388, 0.6574, 0.5552, 0.6723]}, {"w": "understand", "b": [0.5614, 0.6574, 0.6521, 0.6723]}, {"w": "from", "b": [0.6582, 0.6574, 0.6958, 0.6723]}, {"w": "where", "b": [0.7019, 0.6574, 0.7493, 0.6723]}, {"w": "each", "b": [0.7555, 0.6574, 0.791, 0.6723]}, {"w": "attribute", "b": [0.7971, 0.6574, 0.8692, 0.6723]}, {"w": "in", "b": [0.1312, 0.6752, 0.1469, 0.6903]}, {"w": "the", "b": [0.1545, 0.6752, 0.1807, 0.6903]}, {"w": "dataset", "b": [0.1883, 0.6752, 0.2481, 0.6903]}, {"w": "came.", "b": [0.2557, 0.6752, 0.3028, 0.6903]}, {"w": "It", "b": [0.3154, 0.6752, 0.3295, 0.6903]}, {"w": "is", "b": [0.3371, 0.6752, 0.3498, 0.6903]}, {"w": "equally", "b": [0.3574, 0.6752, 0.416, 0.6903]}, {"w": "important", "b": [0.4236, 0.6752, 0.5063, 0.6903]}, {"w": "to", "b": [0.5139, 0.6752, 0.5307, 0.6903]}, {"w": "understand", "b": [0.5383, 0.6752, 0.6305, 0.6903]}, {"w": "what", "b": [0.6381, 0.6752, 0.6789, 0.6903]}, {"w": "each", "b": [0.6865, 0.6752, 0.7227, 0.6903]}, {"w": "attribute", "b": [0.7303, 0.6752, 0.8036, 0.6903]}, {"w": "exactly", "b": [0.8112, 0.6752, 0.8698, 0.6903]}, {"w": "represents.", "b": [0.1312, 0.6933, 0.2167, 0.7082]}, {"w": "One", "b": [0.2249, 0.6933, 0.2575, 0.7082]}, {"w": "frequent", "b": [0.2637, 0.6933, 0.3295, 0.7082]}, {"w": "problem", "b": [0.3357, 0.6933, 0.4009, 0.7082]}, {"w": "observed", "b": [0.4071, 0.6933, 0.4766, 0.7082]}, {"w": "in", "b": [0.4827, 0.6933, 0.498, 0.7082]}, {"w": "practice", "b": [0.5042, 0.6933, 0.5674, 0.7082]}, {"w": "is", "b": [0.5736, 0.6933, 0.5859, 0.7082]}, {"w": "when", "b": [0.5921, 0.6933, 0.6339, 0.7082]}, {"w": "the", "b": [0.64, 0.6933, 0.6655, 0.7082]}, {"w": "variable", "b": [0.6717, 0.6933, 0.7344, 0.7082]}, {"w": "that", "b": [0.7406, 0.6933, 0.7742, 0.7082]}, {"w": "the", "b": [0.7803, 0.6933, 0.8058, 0.7082]}, {"w": "analyst", "b": [0.812, 0.6933, 0.8697, 0.7082]}, {"w": "tries", "b": [0.1312, 0.7112, 0.1663, 0.7262]}, {"w": "to", "b": [0.1724, 0.7112, 0.1888, 0.7262]}, {"w": "predict", "b": [0.195, 0.7112, 0.2514, 0.7262]}, {"w": "is", "b": [0.2576, 0.7112, 0.27, 0.7262]}, {"w": "found", "b": [0.2762, 0.7112, 0.3218, 0.7262]}, {"w": "among", "b": [0.3279, 0.7112, 0.3812, 0.7262]}, {"w": "the", "b": [0.3874, 0.7112, 0.413, 0.7262]}, {"w": "features", "b": [0.4192, 0.7112, 0.4824, 0.7262]}, {"w": "in", "b": [0.4886, 0.7112, 0.504, 0.7262]}, {"w": "the", "b": [0.5101, 0.7112, 0.5358, 0.7262]}, {"w": "feature", "b": [0.5419, 0.7112, 0.5979, 0.7262]}, {"w": "vector.", "b": [0.604, 0.7112, 0.6584, 0.7262]}, {"w": "How", "b": [0.6666, 0.7112, 0.7025, 0.7262]}, {"w": "could", "b": [0.7086, 0.7112, 0.7517, 0.7262]}, {"w": "that", "b": [0.7579, 0.7112, 0.7917, 0.7262]}, {"w": "happen?", "b": [0.7978, 0.7112, 0.8655, 0.7262]}]}, {"id": "b_7", "type": "paragraph", "text": "Imagine that you work on the problem of predicting the price of a house from its attributes such as the number of bedrooms, surface, location, year of construction, and so on. The attributes of each house were provided to you by the client, a large online real estate sales platform. The data has the form of an Excel spreadsheet. Without spending too much time analyzing each column, you remove only the transaction price from the attributes and use that value as the target you want to learn to predict. Very quickly you realize that the model is almost perfect: it predicts the transaction price with accuracy near 100%. You deliver the", "words": [{"w": "Imagine", "b": [0.1312, 0.7382, 0.195, 0.7531]}, {"w": "that", "b": [0.2011, 0.7382, 0.2348, 0.7531]}, {"w": "you", "b": [0.241, 0.7382, 0.2695, 0.7531]}, {"w": "work", "b": [0.2757, 0.7382, 0.3145, 0.7531]}, {"w": "on", "b": [0.3206, 0.7382, 0.34, 0.7531]}, {"w": "the", "b": [0.3462, 0.7382, 0.3717, 0.7531]}, {"w": "problem", "b": [0.3779, 0.7382, 0.4432, 0.7531]}, {"w": "of", "b": [0.4494, 0.7382, 0.4642, 0.7531]}, {"w": "predicting", "b": [0.4703, 0.7382, 0.551, 0.7531]}, {"w": "the", "b": [0.5572, 0.7382, 0.5827, 0.7531]}, {"w": "price", "b": [0.5888, 0.7382, 0.6277, 0.7531]}, {"w": "of", "b": [0.6338, 0.7382, 0.6486, 0.7531]}, {"w": "a", "b": [0.6548, 0.7382, 0.664, 0.7531]}, {"w": "house", "b": [0.6701, 0.7382, 0.7151, 0.7531]}, {"w": "from", "b": [0.7213, 0.7382, 0.7585, 0.7531]}, {"w": "its", "b": [0.7647, 0.7382, 0.7842, 0.7531]}, {"w": "attributes", "b": [0.7904, 0.7382, 0.8691, 0.7531]}, {"w": "such", "b": [0.1312, 0.756, 0.1675, 0.7711]}, {"w": "as", "b": [0.1744, 0.756, 0.1913, 0.7711]}, {"w": "the", "b": [0.1982, 0.756, 0.2244, 0.7711]}, {"w": "number", "b": [0.2313, 0.756, 0.2937, 0.7711]}, {"w": "of", "b": [0.3006, 0.756, 0.3158, 0.7711]}, {"w": "bedrooms,", "b": [0.3227, 0.756, 0.4076, 0.7711]}, {"w": "surface,", "b": [0.4148, 0.756, 0.4772, 0.7711]}, {"w": "location,", "b": [0.4844, 0.756, 0.5549, 0.7711]}, {"w": "year", "b": [0.5621, 0.756, 0.5967, 0.7711]}, {"w": "of", "b": [0.6037, 0.756, 0.6189, 0.7711]}, {"w": "construction,", "b": [0.6258, 0.756, 0.7327, 0.7711]}, {"w": "and", "b": [0.7398, 0.756, 0.7702, 0.7711]}, {"w": "so", "b": [0.7772, 0.756, 0.794, 0.7711]}, {"w": "on.", "b": [0.801, 0.756, 0.8261, 0.7711]}, {"w": "The", "b": [0.8367, 0.756, 0.8691, 0.7711]}, {"w": "attributes", "b": [0.1312, 0.774, 0.2115, 0.789]}, {"w": "of", "b": [0.2176, 0.774, 0.2327, 0.789]}, {"w": "each", "b": [0.2389, 0.774, 0.2748, 0.789]}, {"w": "house", "b": [0.2809, 0.774, 0.3268, 0.789]}, {"w": "were", "b": [0.3329, 0.774, 0.3699, 0.789]}, {"w": "provided", "b": [0.3761, 0.774, 0.4468, 0.789]}, {"w": "to", "b": [0.453, 0.774, 0.4697, 0.789]}, {"w": "you", "b": [0.4758, 0.774, 0.5049, 0.789]}, {"w": "by", "b": [0.5111, 0.774, 0.5308, 0.789]}, {"w": "the", "b": [0.537, 0.774, 0.563, 0.789]}, {"w": "client,", "b": [0.5692, 0.774, 0.6186, 0.789]}, {"w": "a", "b": [0.6248, 0.774, 0.6341, 0.789]}, {"w": "large", "b": [0.6403, 0.774, 0.6798, 0.789]}, {"w": "online", "b": [0.686, 0.774, 0.7349, 0.789]}, {"w": "real", "b": [0.741, 0.774, 0.7712, 0.789]}, {"w": "estate", "b": [0.7774, 0.774, 0.8253, 0.789]}, {"w": "sales", "b": [0.8315, 0.774, 0.8692, 0.789]}, {"w": "platform.", "b": [0.1312, 0.792, 0.205, 0.8069]}, {"w": "The", "b": [0.2131, 0.792, 0.2446, 0.8069]}, {"w": "data", "b": [0.2508, 0.792, 0.2864, 0.8069]}, {"w": "has", "b": [0.2925, 0.792, 0.319, 0.8069]}, {"w": "the", "b": [0.3252, 0.792, 0.3506, 0.8069]}, {"w": "form", "b": [0.3568, 0.792, 0.3939, 0.8069]}, {"w": "of", "b": [0.4, 0.792, 0.4148, 0.8069]}, {"w": "an", "b": [0.4209, 0.792, 0.4402, 0.8069]}, {"w": "Excel", "b": [0.4464, 0.792, 0.4898, 0.8069]}, {"w": "spreadsheet.", "b": [0.496, 0.792, 0.5938, 0.8069]}, {"w": "Without", "b": [0.602, 0.792, 0.6696, 0.8069]}, {"w": "spending", "b": [0.6757, 0.792, 0.7465, 0.8069]}, {"w": "too", "b": [0.7526, 0.792, 0.7786, 0.8069]}, {"w": "much", "b": [0.7847, 0.792, 0.8274, 0.8069]}, {"w": "time", "b": [0.8335, 0.792, 0.8691, 0.8069]}, {"w": "analyzing", "b": [0.1312, 0.8098, 0.2088, 0.8249]}, {"w": "each", "b": [0.2149, 0.8098, 0.2509, 0.8249]}, {"w": "column,", "b": [0.257, 0.8098, 0.3215, 0.8249]}, {"w": "you", "b": [0.3277, 0.8098, 0.3568, 0.8249]}, {"w": "remove", "b": [0.363, 0.8098, 0.4208, 0.8249]}, {"w": "only", "b": [0.427, 0.8098, 0.4618, 0.8249]}, {"w": "the", "b": [0.468, 0.8098, 0.494, 0.8249]}, {"w": "transaction", "b": [0.5002, 0.8098, 0.5919, 0.8249]}, {"w": "price", "b": [0.5981, 0.8098, 0.6377, 0.8249]}, {"w": "from", "b": [0.6438, 0.8098, 0.6819, 0.8249]}, {"w": "the", "b": [0.688, 0.8098, 0.714, 0.8249]}, {"w": "attributes", "b": [0.7202, 0.8098, 0.8005, 0.8249]}, {"w": "and", "b": [0.8066, 0.8098, 0.8368, 0.8249]}, {"w": "use", "b": [0.843, 0.8098, 0.8691, 0.8249]}, {"w": "that", "b": [0.1312, 0.828, 0.1644, 0.8428]}, {"w": "value", "b": [0.1701, 0.828, 0.2108, 0.8428]}, {"w": "as", "b": [0.2166, 0.828, 0.2327, 0.8428]}, {"w": "the", "b": [0.2385, 0.828, 0.2636, 0.8428]}, {"w": "target", "b": [0.2693, 0.828, 0.3166, 0.8428]}, {"w": "you", "b": [0.3224, 0.828, 0.3505, 0.8428]}, {"w": "want", "b": [0.3562, 0.828, 0.3944, 0.8428]}, {"w": "to", "b": [0.4001, 0.828, 0.4162, 0.8428]}, {"w": "learn", "b": [0.422, 0.828, 0.4612, 0.8428]}, {"w": "to", "b": [0.4669, 0.828, 0.483, 0.8428]}, {"w": "predict.", "b": [0.4888, 0.828, 0.5491, 0.8428]}, {"w": "Very", "b": [0.5572, 0.828, 0.5939, 0.8428]}, {"w": "quickly", "b": [0.5996, 0.828, 0.6559, 0.8428]}, {"w": "you", "b": [0.6617, 0.828, 0.6898, 0.8428]}, {"w": "realize", "b": [0.6955, 0.828, 0.7458, 0.8428]}, {"w": "that", "b": [0.7516, 0.828, 0.7847, 0.8428]}, {"w": "the", "b": [0.7905, 0.828, 0.8156, 0.8428]}, {"w": "model", "b": [0.8213, 0.828, 0.8691, 0.8428]}, {"w": "is", "b": [0.1312, 0.8459, 0.1435, 0.8608]}, {"w": "almost", "b": [0.1496, 0.8459, 0.2022, 0.8608]}, {"w": "perfect:", "b": [0.2084, 0.8459, 0.268, 0.8608]}, {"w": "it", "b": [0.2762, 0.8459, 0.2884, 0.8608]}, {"w": "predicts", "b": [0.2945, 0.8459, 0.3573, 0.8608]}, {"w": "the", "b": [0.3635, 0.8459, 0.3887, 0.8608]}, {"w": "transaction", "b": [0.3949, 0.8459, 0.4839, 0.8608]}, {"w": "price", "b": [0.49, 0.8459, 0.5285, 0.8608]}, {"w": "with", "b": [0.5346, 0.8459, 0.57, 0.8608]}, {"w": "accuracy", "b": [0.5761, 0.8459, 0.6454, 0.8608]}, {"w": "near", "b": [0.6515, 0.8459, 0.6859, 0.8608]}, {"w": "100%.", "b": [0.6918, 0.8459, 0.7392, 0.8608]}, {"w": "You", "b": [0.7474, 0.8459, 0.7787, 0.8608]}, {"w": "deliver", "b": [0.7849, 0.8459, 0.8374, 0.8608]}, {"w": "the", "b": [0.8436, 0.8459, 0.8688, 0.8608]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "7", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 51, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "model to the client, they deploy it in production, and the tests show that the model is wrong most of the time. What happened?", "words": [{"w": "model", "b": [0.1312, 0.0885, 0.179, 0.1033]}, {"w": "to", "b": [0.1849, 0.0885, 0.201, 0.1033]}, {"w": "the", "b": [0.2069, 0.0885, 0.2321, 0.1033]}, {"w": "client,", "b": [0.238, 0.0885, 0.2858, 0.1033]}, {"w": "they", "b": [0.2918, 0.0885, 0.3264, 0.1033]}, {"w": "deploy", "b": [0.3324, 0.0885, 0.3836, 0.1033]}, {"w": "it", "b": [0.3896, 0.0885, 0.4016, 0.1033]}, {"w": "in", "b": [0.4076, 0.0885, 0.4227, 0.1033]}, {"w": "production,", "b": [0.4286, 0.0885, 0.5196, 0.1033]}, {"w": "and", "b": [0.5256, 0.0885, 0.5547, 0.1033]}, {"w": "the", "b": [0.5607, 0.0885, 0.5858, 0.1033]}, {"w": "tests", "b": [0.5918, 0.0885, 0.6282, 0.1033]}, {"w": "show", "b": [0.6341, 0.0885, 0.6729, 0.1033]}, {"w": "that", "b": [0.6788, 0.0885, 0.712, 0.1033]}, {"w": "the", "b": [0.718, 0.0885, 0.7431, 0.1033]}, {"w": "model", "b": [0.749, 0.0885, 0.7968, 0.1033]}, {"w": "is", "b": [0.8027, 0.0885, 0.8149, 0.1033]}, {"w": "wrong", "b": [0.8208, 0.0885, 0.8691, 0.1033]}, {"w": "most", "b": [0.1312, 0.1063, 0.1703, 0.1213]}, {"w": "of", "b": [0.1764, 0.1063, 0.1913, 0.1213]}, {"w": "the", "b": [0.1975, 0.1063, 0.2231, 0.1213]}, {"w": "time.", "b": [0.2293, 0.1063, 0.2703, 0.1213]}, {"w": "What", "b": [0.2785, 0.1063, 0.3241, 0.1213]}, {"w": "happened?", "b": [0.3302, 0.1063, 0.4164, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "What did happen is called data leakage (also known as target leakage). After a more", "words": [{"w": "What", "b": [0.1303, 0.1331, 0.1768, 0.1482]}, {"w": "did", "b": [0.1835, 0.1331, 0.2097, 0.1482]}, {"w": "happen", "b": [0.2164, 0.1331, 0.2766, 0.1482]}, {"w": "is", "b": [0.2833, 0.1331, 0.2959, 0.1482]}, {"w": "called", "b": [0.3027, 0.1331, 0.3498, 0.1482]}, {"w": "data", "b": [0.3563, 0.1333, 0.397, 0.1482]}, {"w": "leakage", "b": [0.4047, 0.1333, 0.4725, 0.1482]}, {"w": "(also", "b": [0.4792, 0.1331, 0.518, 0.1482]}, {"w": "known", "b": [0.5248, 0.1331, 0.5781, 0.1482]}, {"w": "as", "b": [0.5848, 0.1331, 0.6017, 0.1482]}, {"w": "target", "b": [0.6083, 0.1333, 0.6642, 0.1482]}, {"w": "leakage).", "b": [0.672, 0.1331, 0.7523, 0.1482]}, {"w": "After", "b": [0.7622, 0.1331, 0.8051, 0.1482]}, {"w": "a", "b": [0.8118, 0.1331, 0.8212, 0.1482]}, {"w": "more", "b": [0.828, 0.1331, 0.8688, 0.1482]}]}, {"id": "b_2", "type": "paragraph", "text": "careful examination of the dataset, you realize that one of the columns in the spreadsheet contained the real estate agent’s commission. Of course, the model easily learned to convert this attribute into the house price perfectly. However, this information is not available in the production environment before the house is sold, because the commission depends on the selling price. In Section 3.2.8, we will consider the problem of data leakage in more detail.", "words": [{"w": "careful", "b": [0.1312, 0.1511, 0.1862, 0.1662]}, {"w": "examination", "b": [0.1924, 0.1511, 0.2933, 0.1662]}, {"w": "of", "b": [0.2994, 0.1511, 0.3146, 0.1662]}, {"w": "the", "b": [0.3208, 0.1511, 0.3469, 0.1662]}, {"w": "dataset,", "b": [0.3531, 0.1511, 0.418, 0.1662]}, {"w": "you", "b": [0.4242, 0.1511, 0.4535, 0.1662]}, {"w": "realize", "b": [0.4596, 0.1511, 0.512, 0.1662]}, {"w": "that", "b": [0.5181, 0.1511, 0.5526, 0.1662]}, {"w": "one", "b": [0.5588, 0.1511, 0.587, 0.1662]}, {"w": "of", "b": [0.5932, 0.1511, 0.6084, 0.1662]}, {"w": "the", "b": [0.6145, 0.1511, 0.6407, 0.1662]}, {"w": "columns", "b": [0.6468, 0.1511, 0.7139, 0.1662]}, {"w": "in", "b": [0.72, 0.1511, 0.7357, 0.1662]}, {"w": "the", "b": [0.7419, 0.1511, 0.768, 0.1662]}, {"w": "spreadsheet", "b": [0.7742, 0.1511, 0.8696, 0.1662]}, {"w": "contained", "b": [0.1312, 0.1692, 0.208, 0.1841]}, {"w": "the", "b": [0.2141, 0.1692, 0.2395, 0.1841]}, {"w": "real", "b": [0.2457, 0.1692, 0.2752, 0.1841]}, {"w": "estate", "b": [0.2814, 0.1692, 0.3282, 0.1841]}, {"w": "agent’s", "b": [0.3344, 0.1692, 0.3899, 0.1841]}, {"w": "commission.", "b": [0.396, 0.1692, 0.4927, 0.1841]}, {"w": "Of", "b": [0.501, 0.1692, 0.5208, 0.1841]}, {"w": "course,", "b": [0.5269, 0.1692, 0.582, 0.1841]}, {"w": "the", "b": [0.5881, 0.1692, 0.6136, 0.1841]}, {"w": "model", "b": [0.6197, 0.1692, 0.668, 0.1841]}, {"w": "easily", "b": [0.6741, 0.1692, 0.7185, 0.1841]}, {"w": "learned", "b": [0.7246, 0.1692, 0.7826, 0.1841]}, {"w": "to", "b": [0.7888, 0.1692, 0.805, 0.1841]}, {"w": "convert", "b": [0.8111, 0.1692, 0.8696, 0.1841]}, {"w": "this", "b": [0.1312, 0.1872, 0.1605, 0.202]}, {"w": "attribute", "b": [0.1666, 0.1872, 0.237, 0.202]}, {"w": "into", "b": [0.2431, 0.1872, 0.2737, 0.202]}, {"w": "the", "b": [0.2799, 0.1872, 0.305, 0.202]}, {"w": "house", "b": [0.3111, 0.1872, 0.3554, 0.202]}, {"w": "price", "b": [0.3615, 0.1872, 0.3998, 0.202]}, {"w": "perfectly.", "b": [0.4059, 0.1872, 0.4783, 0.202]}, {"w": "However,", "b": [0.4865, 0.1872, 0.5583, 0.202]}, {"w": "this", "b": [0.5645, 0.1872, 0.5937, 0.202]}, {"w": "information", "b": [0.5998, 0.1872, 0.6918, 0.202]}, {"w": "is", "b": [0.6979, 0.1872, 0.7101, 0.202]}, {"w": "not", "b": [0.7162, 0.1872, 0.7423, 0.202]}, {"w": "available", "b": [0.7484, 0.1872, 0.8167, 0.202]}, {"w": "in", "b": [0.8228, 0.1872, 0.8379, 0.202]}, {"w": "the", "b": [0.844, 0.1872, 0.8691, 0.202]}, {"w": "production", "b": [0.1312, 0.2049, 0.2207, 0.22]}, {"w": "environment", "b": [0.2271, 0.2049, 0.3292, 0.22]}, {"w": "before", "b": [0.3356, 0.2049, 0.3858, 0.22]}, {"w": "the", "b": [0.3923, 0.2049, 0.4184, 0.22]}, {"w": "house", "b": [0.4248, 0.2049, 0.471, 0.22]}, {"w": "is", "b": [0.4774, 0.2049, 0.49, 0.22]}, {"w": "sold,", "b": [0.4964, 0.2049, 0.5342, 0.22]}, {"w": "because", "b": [0.5407, 0.2049, 0.6041, 0.22]}, {"w": "the", "b": [0.6105, 0.2049, 0.6367, 0.22]}, {"w": "commission", "b": [0.6431, 0.2049, 0.7374, 0.22]}, {"w": "depends", "b": [0.7438, 0.2049, 0.8103, 0.22]}, {"w": "on", "b": [0.8167, 0.2049, 0.8366, 0.22]}, {"w": "the", "b": [0.843, 0.2049, 0.8692, 0.22]}, {"w": "selling", "b": [0.1312, 0.223, 0.1816, 0.238]}, {"w": "price.", "b": [0.1877, 0.223, 0.2319, 0.238]}, {"w": "In", "b": [0.2401, 0.223, 0.257, 0.238]}, {"w": "Section", "b": [0.2632, 0.223, 0.3216, 0.238]}, {"w": "3.2.8,", "b": [0.3278, 0.223, 0.3709, 0.238]}, {"w": "we", "b": [0.377, 0.223, 0.398, 0.238]}, {"w": "will", "b": [0.4042, 0.223, 0.4329, 0.238]}, {"w": "consider", "b": [0.439, 0.223, 0.5048, 0.238]}, {"w": "the", "b": [0.511, 0.223, 0.5366, 0.238]}, {"w": "problem", "b": [0.5428, 0.223, 0.6084, 0.238]}, {"w": "of", "b": [0.6146, 0.223, 0.6295, 0.238]}, {"w": "data", "b": [0.6356, 0.223, 0.6715, 0.238]}, {"w": "leakage", "b": [0.6776, 0.223, 0.7366, 0.238]}, {"w": "in", "b": [0.7428, 0.223, 0.7581, 0.238]}, {"w": "more", "b": [0.7643, 0.223, 0.8043, 0.238]}, {"w": "detail.", "b": [0.8105, 0.223, 0.8607, 0.238]}]}, {"id": "b_3", "type": "paragraph", "text": "3.1.5 Is the Data Reliable?", "words": [{"w": "3.1.5", "b": [0.1312, 0.2709, 0.1749, 0.2858]}, {"w": "Is", "b": [0.1961, 0.2709, 0.2125, 0.2858]}, {"w": "the", "b": [0.2196, 0.2709, 0.2493, 0.2858]}, {"w": "Data", "b": [0.2564, 0.2709, 0.3016, 0.2858]}, {"w": "Reliable?", "b": [0.3086, 0.2709, 0.3938, 0.2858]}]}, {"id": "b_4", "type": "paragraph", "text": "The reliability of a dataset varies depending on the procedure used to gather that dataset. Can you trust the labels? If the data was produced by the workers on Mechanical Turk (so-called “turkers”), then the reliability of such data might be very low. In some cases, the", "words": [{"w": "The", "b": [0.1306, 0.3073, 0.1629, 0.3224]}, {"w": "reliability", "b": [0.169, 0.3073, 0.2472, 0.3224]}, {"w": "of", "b": [0.2534, 0.3073, 0.2685, 0.3224]}, {"w": "a", "b": [0.2746, 0.3073, 0.284, 0.3224]}, {"w": "dataset", "b": [0.2901, 0.3073, 0.3496, 0.3224]}, {"w": "varies", "b": [0.3558, 0.3073, 0.4023, 0.3224]}, {"w": "depending", "b": [0.4085, 0.3073, 0.4924, 0.3224]}, {"w": "on", "b": [0.4985, 0.3073, 0.5183, 0.3224]}, {"w": "the", "b": [0.5244, 0.3073, 0.5505, 0.3224]}, {"w": "procedure", "b": [0.5566, 0.3073, 0.6375, 0.3224]}, {"w": "used", "b": [0.6437, 0.3073, 0.6802, 0.3224]}, {"w": "to", "b": [0.6864, 0.3073, 0.7031, 0.3224]}, {"w": "gather", "b": [0.7092, 0.3073, 0.7614, 0.3224]}, {"w": "that", "b": [0.7675, 0.3073, 0.8019, 0.3224]}, {"w": "dataset.", "b": [0.808, 0.3073, 0.8727, 0.3224]}, {"w": "Can", "b": [0.1312, 0.3253, 0.1647, 0.3404]}, {"w": "you", "b": [0.1719, 0.3253, 0.2012, 0.3404]}, {"w": "trust", "b": [0.2084, 0.3253, 0.2484, 0.3404]}, {"w": "the", "b": [0.2556, 0.3253, 0.2817, 0.3404]}, {"w": "labels?", "b": [0.2889, 0.3253, 0.3445, 0.3404]}, {"w": "If", "b": [0.3559, 0.3253, 0.3685, 0.3404]}, {"w": "the", "b": [0.3757, 0.3253, 0.4019, 0.3404]}, {"w": "data", "b": [0.4091, 0.3253, 0.4457, 0.3404]}, {"w": "was", "b": [0.4529, 0.3253, 0.4828, 0.3404]}, {"w": "produced", "b": [0.49, 0.3253, 0.5659, 0.3404]}, {"w": "by", "b": [0.5732, 0.3253, 0.5931, 0.3404]}, {"w": "the", "b": [0.6003, 0.3253, 0.6264, 0.3404]}, {"w": "workers", "b": [0.6337, 0.3253, 0.6961, 0.3404]}, {"w": "on", "b": [0.7033, 0.3253, 0.7232, 0.3404]}, {"w": "Mechanical", "b": [0.7304, 0.3253, 0.8225, 0.3404]}, {"w": "Turk", "b": [0.8297, 0.3253, 0.8696, 0.3404]}, {"w": "(so-called", "b": [0.1291, 0.3433, 0.2048, 0.3583]}, {"w": "“turkers”),", "b": [0.211, 0.3433, 0.2971, 0.3583]}, {"w": "then", "b": [0.3032, 0.3433, 0.339, 0.3583]}, {"w": "the", "b": [0.3452, 0.3433, 0.3708, 0.3583]}, {"w": "reliability", "b": [0.377, 0.3433, 0.4537, 0.3583]}, {"w": "of", "b": [0.4599, 0.3433, 0.4747, 0.3583]}, {"w": "such", "b": [0.4808, 0.3433, 0.5162, 0.3583]}, {"w": "data", "b": [0.5224, 0.3433, 0.5582, 0.3583]}, {"w": "might", "b": [0.5643, 0.3433, 0.6108, 0.3583]}, {"w": "be", "b": [0.617, 0.3433, 0.6359, 0.3583]}, {"w": "very", "b": [0.6421, 0.3433, 0.6764, 0.3583]}, {"w": "low.", "b": [0.6826, 0.3433, 0.7148, 0.3583]}, {"w": "In", "b": [0.723, 0.3433, 0.7399, 0.3583]}, {"w": "some", "b": [0.746, 0.3433, 0.786, 0.3583]}, {"w": "cases,", "b": [0.7922, 0.3433, 0.8374, 0.3583]}, {"w": "the", "b": [0.8436, 0.3433, 0.8691, 0.3583]}]}, {"id": "b_5", "type": "paragraph", "text": "labels assigned to feature vectors might be obtained as a majority vote (or an average) of several turkers. If that’s the case, the data can be considered more reliable. However, it’s better to do additional validation of quality on a small random sample of the dataset.", "words": [{"w": "labels", "b": [0.1312, 0.3611, 0.1779, 0.3762]}, {"w": "assigned", "b": [0.1842, 0.3611, 0.2524, 0.3762]}, {"w": "to", "b": [0.2587, 0.3611, 0.2755, 0.3762]}, {"w": "feature", "b": [0.2818, 0.3611, 0.3389, 0.3762]}, {"w": "vectors", "b": [0.3452, 0.3611, 0.4029, 0.3762]}, {"w": "might", "b": [0.4092, 0.3611, 0.4568, 0.3762]}, {"w": "be", "b": [0.4631, 0.3611, 0.4825, 0.3762]}, {"w": "obtained", "b": [0.4888, 0.3611, 0.5599, 0.3762]}, {"w": "as", "b": [0.5662, 0.3611, 0.5831, 0.3762]}, {"w": "a", "b": [0.5894, 0.3611, 0.5988, 0.3762]}, {"w": "majority", "b": [0.6051, 0.3611, 0.6752, 0.3762]}, {"w": "vote", "b": [0.6816, 0.3611, 0.7161, 0.3762]}, {"w": "(or", "b": [0.7224, 0.3611, 0.7465, 0.3762]}, {"w": "an", "b": [0.7528, 0.3611, 0.7727, 0.3762]}, {"w": "average)", "b": [0.779, 0.3611, 0.8476, 0.3762]}, {"w": "of", "b": [0.8539, 0.3611, 0.8691, 0.3762]}, {"w": "several", "b": [0.1312, 0.3791, 0.1869, 0.3942]}, {"w": "turkers.", "b": [0.1931, 0.3791, 0.2561, 0.3942]}, {"w": "If", "b": [0.2647, 0.3791, 0.2772, 0.3942]}, {"w": "that’s", "b": [0.2835, 0.3791, 0.3307, 0.3942]}, {"w": "the", "b": [0.337, 0.3791, 0.3631, 0.3942]}, {"w": "case,", "b": [0.3694, 0.3791, 0.4082, 0.3942]}, {"w": "the", "b": [0.4145, 0.3791, 0.4407, 0.3942]}, {"w": "data", "b": [0.4469, 0.3791, 0.4835, 0.3942]}, {"w": "can", "b": [0.4898, 0.3791, 0.5181, 0.3942]}, {"w": "be", "b": [0.5243, 0.3791, 0.5437, 0.3942]}, {"w": "considered", "b": [0.55, 0.3791, 0.6359, 0.3942]}, {"w": "more", "b": [0.6422, 0.3791, 0.683, 0.3942]}, {"w": "reliable.", "b": [0.6893, 0.3791, 0.7542, 0.3942]}, {"w": "However,", "b": [0.7628, 0.3791, 0.8377, 0.3942]}, {"w": "it’s", "b": [0.844, 0.3791, 0.8692, 0.3942]}, {"w": "better", "b": [0.1312, 0.3972, 0.18, 0.4121]}, {"w": "to", "b": [0.1862, 0.3972, 0.2026, 0.4121]}, {"w": "do", "b": [0.2087, 0.3972, 0.2282, 0.4121]}, {"w": "additional", "b": [0.2343, 0.3972, 0.3153, 0.4121]}, {"w": "validation", "b": [0.3215, 0.3972, 0.401, 0.4121]}, {"w": "of", "b": [0.4071, 0.3972, 0.422, 0.4121]}, {"w": "quality", "b": [0.4281, 0.3972, 0.484, 0.4121]}, {"w": "on", "b": [0.4902, 0.3972, 0.5096, 0.4121]}, {"w": "a", "b": [0.5158, 0.3972, 0.525, 0.4121]}, {"w": "small", "b": [0.5312, 0.3972, 0.5733, 0.4121]}, {"w": "random", "b": [0.5795, 0.3972, 0.641, 0.4121]}, {"w": "sample", "b": [0.6472, 0.3972, 0.7026, 0.4121]}, {"w": "of", "b": [0.7088, 0.3972, 0.7237, 0.4121]}, {"w": "the", "b": [0.7298, 0.3972, 0.7555, 0.4121]}, {"w": "dataset.", "b": [0.7616, 0.3972, 0.8253, 0.4121]}]}, {"id": "b_6", "type": "paragraph", "text": "On the other hand, if the data represents measurements made by some measuring devices, you can find the details of each measurement’s accuracy in the technical documentation of the corresponding measuring device.", "words": [{"w": "On", "b": [0.1312, 0.424, 0.1562, 0.4391]}, {"w": "the", "b": [0.1624, 0.424, 0.1884, 0.4391]}, {"w": "other", "b": [0.1945, 0.424, 0.2372, 0.4391]}, {"w": "hand,", "b": [0.2434, 0.424, 0.2891, 0.4391]}, {"w": "if", "b": [0.2953, 0.424, 0.3062, 0.4391]}, {"w": "the", "b": [0.3124, 0.424, 0.3384, 0.4391]}, {"w": "data", "b": [0.3446, 0.424, 0.3809, 0.4391]}, {"w": "represents", "b": [0.3871, 0.424, 0.4691, 0.4391]}, {"w": "measurements", "b": [0.4753, 0.424, 0.5904, 0.4391]}, {"w": "made", "b": [0.5966, 0.424, 0.6402, 0.4391]}, {"w": "by", "b": [0.6464, 0.424, 0.6662, 0.4391]}, {"w": "some", "b": [0.6723, 0.424, 0.713, 0.4391]}, {"w": "measuring", "b": [0.7192, 0.424, 0.8025, 0.4391]}, {"w": "devices,", "b": [0.8087, 0.424, 0.8717, 0.4391]}, {"w": "you", "b": [0.1308, 0.442, 0.1598, 0.457]}, {"w": "can", "b": [0.1659, 0.442, 0.1939, 0.457]}, {"w": "find", "b": [0.2001, 0.442, 0.2312, 0.457]}, {"w": "the", "b": [0.2373, 0.442, 0.2632, 0.457]}, {"w": "details", "b": [0.2694, 0.442, 0.3223, 0.457]}, {"w": "of", "b": [0.3285, 0.442, 0.3435, 0.457]}, {"w": "each", "b": [0.3497, 0.442, 0.3854, 0.457]}, {"w": "measurement’s", "b": [0.3916, 0.442, 0.5115, 0.457]}, {"w": "accuracy", "b": [0.5177, 0.442, 0.5887, 0.457]}, {"w": "in", "b": [0.5948, 0.442, 0.6104, 0.457]}, {"w": "the", "b": [0.6166, 0.442, 0.6425, 0.457]}, {"w": "technical", "b": [0.6486, 0.442, 0.7206, 0.457]}, {"w": "documentation", "b": [0.7268, 0.442, 0.848, 0.457]}, {"w": "of", "b": [0.8541, 0.442, 0.8692, 0.457]}, {"w": "the", "b": [0.1312, 0.46, 0.1569, 0.4749]}, {"w": "corresponding", "b": [0.163, 0.46, 0.2755, 0.4749]}, {"w": "measuring", "b": [0.2817, 0.46, 0.3639, 0.4749]}, {"w": "device.", "b": [0.37, 0.46, 0.4249, 0.4749]}]}, {"id": "b_7", "type": "paragraph", "text": "The reliability of labels can also be affected by the delayed or indirect nature of the label. The label is considered delayed when the feature vector to which the label was assigned represents something that happened significantly earlier than the time of label observation.", "words": [{"w": "The", "b": [0.1306, 0.4869, 0.1621, 0.5018]}, {"w": "reliability", "b": [0.1683, 0.4869, 0.2446, 0.5018]}, {"w": "of", "b": [0.2508, 0.4869, 0.2655, 0.5018]}, {"w": "labels", "b": [0.2717, 0.4869, 0.317, 0.5018]}, {"w": "can", "b": [0.3232, 0.4869, 0.3506, 0.5018]}, {"w": "also", "b": [0.3568, 0.4869, 0.3874, 0.5018]}, {"w": "be", "b": [0.3936, 0.4869, 0.4124, 0.5018]}, {"w": "affected", "b": [0.4185, 0.4869, 0.4801, 0.5018]}, {"w": "by", "b": [0.4862, 0.4869, 0.5056, 0.5018]}, {"w": "the", "b": [0.5117, 0.4869, 0.5372, 0.5018]}, {"w": "delayed", "b": [0.5431, 0.4869, 0.6124, 0.5019]}, {"w": "or", "b": [0.6185, 0.4869, 0.6348, 0.5018]}, {"w": "indirect", "b": [0.641, 0.4869, 0.7125, 0.5019]}, {"w": "nature", "b": [0.7186, 0.4869, 0.7706, 0.5018]}, {"w": "of", "b": [0.7767, 0.4869, 0.7915, 0.5018]}, {"w": "the", "b": [0.7976, 0.4869, 0.823, 0.5018]}, {"w": "label.", "b": [0.8292, 0.4869, 0.8724, 0.5018]}, {"w": "The", "b": [0.1306, 0.5047, 0.163, 0.5198]}, {"w": "label", "b": [0.1703, 0.5047, 0.2096, 0.5198]}, {"w": "is", "b": [0.2169, 0.5047, 0.2296, 0.5198]}, {"w": "considered", "b": [0.2369, 0.5047, 0.3229, 0.5198]}, {"w": "delayed", "b": [0.3302, 0.5047, 0.3914, 0.5198]}, {"w": "when", "b": [0.3988, 0.5047, 0.4417, 0.5198]}, {"w": "the", "b": [0.449, 0.5047, 0.4752, 0.5198]}, {"w": "feature", "b": [0.4825, 0.5047, 0.5396, 0.5198]}, {"w": "vector", "b": [0.547, 0.5047, 0.5972, 0.5198]}, {"w": "to", "b": [0.6046, 0.5047, 0.6213, 0.5198]}, {"w": "which", "b": [0.6287, 0.5047, 0.6763, 0.5198]}, {"w": "the", "b": [0.6836, 0.5047, 0.7098, 0.5198]}, {"w": "label", "b": [0.7171, 0.5047, 0.7563, 0.5198]}, {"w": "was", "b": [0.7637, 0.5047, 0.7936, 0.5198]}, {"w": "assigned", "b": [0.801, 0.5047, 0.8692, 0.5198]}, {"w": "represents", "b": [0.1312, 0.5228, 0.2121, 0.5377]}, {"w": "something", "b": [0.2182, 0.5228, 0.3004, 0.5377]}, {"w": "that", "b": [0.3065, 0.5228, 0.3403, 0.5377]}, {"w": "happened", "b": [0.3465, 0.5228, 0.4239, 0.5377]}, {"w": "significantly", "b": [0.4301, 0.5228, 0.5266, 0.5377]}, {"w": "earlier", "b": [0.5327, 0.5228, 0.5831, 0.5377]}, {"w": "than", "b": [0.5893, 0.5228, 0.6262, 0.5377]}, {"w": "the", "b": [0.6323, 0.5228, 0.658, 0.5377]}, {"w": "time", "b": [0.6641, 0.5228, 0.7, 0.5377]}, {"w": "of", "b": [0.7061, 0.5228, 0.721, 0.5377]}, {"w": "label", "b": [0.7272, 0.5228, 0.7656, 0.5377]}, {"w": "observation.", "b": [0.7718, 0.5228, 0.8688, 0.5377]}]}, {"id": "b_8", "type": "paragraph", "text": "To be more concrete, take the churn prediction problem. Here, we have a feature vector describing a customer, and we want to predict whether the customer will leave at some point in the future (typically six months to one year from now). The feature vector represents what we know about the customer now, but the label (“left” or “stayed”) will be assigned in the future. This is an important property, because between now and the future, many events, not reflected in our feature vector might happen which would affect the customer’s decision to stay or leave. Therefore delayed labels make our data less reliable.", "words": [{"w": "To", "b": [0.1306, 0.5496, 0.1519, 0.5647]}, {"w": "be", "b": [0.158, 0.5496, 0.1773, 0.5647]}, {"w": "more", "b": [0.1834, 0.5496, 0.224, 0.5647]}, {"w": "concrete,", "b": [0.2301, 0.5496, 0.303, 0.5647]}, {"w": "take", "b": [0.3091, 0.5496, 0.3434, 0.5647]}, {"w": "the", "b": [0.3496, 0.5496, 0.3756, 0.5647]}, {"w": "churn", "b": [0.3816, 0.5497, 0.434, 0.5647]}, {"w": "prediction", "b": [0.441, 0.5497, 0.5349, 0.5647]}, {"w": "problem.", "b": [0.5411, 0.5496, 0.6129, 0.5647]}, {"w": "Here,", "b": [0.6211, 0.5496, 0.6643, 0.5647]}, {"w": "we", "b": [0.6704, 0.5496, 0.6918, 0.5647]}, {"w": "have", "b": [0.6979, 0.5496, 0.7348, 0.5647]}, {"w": "a", "b": [0.741, 0.5496, 0.7503, 0.5647]}, {"w": "feature", "b": [0.7564, 0.5496, 0.8132, 0.5647]}, {"w": "vector", "b": [0.8193, 0.5496, 0.8693, 0.5647]}, {"w": "describing", "b": [0.1312, 0.5678, 0.2108, 0.5826]}, {"w": "a", "b": [0.2168, 0.5678, 0.2259, 0.5826]}, {"w": "customer,", "b": [0.2319, 0.5678, 0.3084, 0.5826]}, {"w": "and", "b": [0.3145, 0.5678, 0.3436, 0.5826]}, {"w": "we", "b": [0.3497, 0.5678, 0.3703, 0.5826]}, {"w": "want", "b": [0.3763, 0.5678, 0.4145, 0.5826]}, {"w": "to", "b": [0.4205, 0.5678, 0.4366, 0.5826]}, {"w": "predict", "b": [0.4426, 0.5678, 0.4979, 0.5826]}, {"w": "whether", "b": [0.504, 0.5678, 0.5673, 0.5826]}, {"w": "the", "b": [0.5734, 0.5678, 0.5985, 0.5826]}, {"w": "customer", "b": [0.6045, 0.5678, 0.676, 0.5826]}, {"w": "will", "b": [0.6821, 0.5678, 0.7102, 0.5826]}, {"w": "leave", "b": [0.7162, 0.5678, 0.7549, 0.5826]}, {"w": "at", "b": [0.761, 0.5678, 0.777, 0.5826]}, {"w": "some", "b": [0.7831, 0.5678, 0.8224, 0.5826]}, {"w": "point", "b": [0.8284, 0.5678, 0.8696, 0.5826]}, {"w": "in", "b": [0.1312, 0.5855, 0.1469, 0.6006]}, {"w": "the", "b": [0.1538, 0.5855, 0.18, 0.6006]}, {"w": "future", "b": [0.1869, 0.5855, 0.2366, 0.6006]}, {"w": "(typically", "b": [0.2435, 0.5855, 0.3214, 0.6006]}, {"w": "six", "b": [0.3283, 0.5855, 0.3509, 0.6006]}, {"w": "months", "b": [0.3578, 0.5855, 0.4181, 0.6006]}, {"w": "to", "b": [0.425, 0.5855, 0.4417, 0.6006]}, {"w": "one", "b": [0.4486, 0.5855, 0.4768, 0.6006]}, {"w": "year", "b": [0.4837, 0.5855, 0.5183, 0.6006]}, {"w": "from", "b": [0.5252, 0.5855, 0.5634, 0.6006]}, {"w": "now).", "b": [0.5703, 0.5855, 0.6158, 0.6006]}, {"w": "The", "b": [0.6262, 0.5855, 0.6586, 0.6006]}, {"w": "feature", "b": [0.6655, 0.5855, 0.7226, 0.6006]}, {"w": "vector", "b": [0.7295, 0.5855, 0.7798, 0.6006]}, {"w": "represents", "b": [0.7867, 0.5855, 0.8691, 0.6006]}, {"w": "what", "b": [0.1306, 0.6036, 0.1699, 0.6185]}, {"w": "we", "b": [0.1761, 0.6036, 0.1968, 0.6185]}, {"w": "know", "b": [0.2029, 0.6036, 0.2443, 0.6185]}, {"w": "about", "b": [0.2504, 0.6036, 0.2964, 0.6185]}, {"w": "the", "b": [0.3025, 0.6036, 0.3278, 0.6185]}, {"w": "customer", "b": [0.3339, 0.6036, 0.4058, 0.6185]}, {"w": "now,", "b": [0.4119, 0.6036, 0.4488, 0.6185]}, {"w": "but", "b": [0.4549, 0.6036, 0.4822, 0.6185]}, {"w": "the", "b": [0.4883, 0.6036, 0.5136, 0.6185]}, {"w": "label", "b": [0.5197, 0.6036, 0.5576, 0.6185]}, {"w": "(“left”", "b": [0.5637, 0.6036, 0.6137, 0.6185]}, {"w": "or", "b": [0.6199, 0.6036, 0.6361, 0.6185]}, {"w": "“stayed”)", "b": [0.6422, 0.6036, 0.7165, 0.6185]}, {"w": "will", "b": [0.7227, 0.6036, 0.7509, 0.6185]}, {"w": "be", "b": [0.7571, 0.6036, 0.7758, 0.6185]}, {"w": "assigned", "b": [0.7819, 0.6036, 0.8478, 0.6185]}, {"w": "in", "b": [0.8539, 0.6036, 0.8691, 0.6185]}, {"w": "the", "b": [0.1312, 0.6216, 0.1564, 0.6364]}, {"w": "future.", "b": [0.1622, 0.6216, 0.2151, 0.6364]}, {"w": "This", "b": [0.2232, 0.6216, 0.2584, 0.6364]}, {"w": "is", "b": [0.2643, 0.6216, 0.2765, 0.6364]}, {"w": "an", "b": [0.2824, 0.6216, 0.3015, 0.6364]}, {"w": "important", "b": [0.3073, 0.6216, 0.3868, 0.6364]}, {"w": "property,", "b": [0.3926, 0.6216, 0.4641, 0.6364]}, {"w": "because", "b": [0.47, 0.6216, 0.5309, 0.6364]}, {"w": "between", "b": [0.5368, 0.6216, 0.6006, 0.6364]}, {"w": "now", "b": [0.6065, 0.6216, 0.6381, 0.6364]}, {"w": "and", "b": [0.644, 0.6216, 0.6732, 0.6364]}, {"w": "the", "b": [0.679, 0.6216, 0.7041, 0.6364]}, {"w": "future,", "b": [0.71, 0.6216, 0.7629, 0.6364]}, {"w": "many", "b": [0.7688, 0.6216, 0.812, 0.6364]}, {"w": "events,", "b": [0.8179, 0.6216, 0.8717, 0.6364]}, {"w": "not", "b": [0.1312, 0.6395, 0.1578, 0.6544]}, {"w": "reflected", "b": [0.164, 0.6395, 0.2315, 0.6544]}, {"w": "in", "b": [0.2377, 0.6395, 0.253, 0.6544]}, {"w": "our", "b": [0.2591, 0.6395, 0.2858, 0.6544]}, {"w": "feature", "b": [0.2919, 0.6395, 0.3477, 0.6544]}, {"w": "vector", "b": [0.3539, 0.6395, 0.403, 0.6544]}, {"w": "might", "b": [0.4091, 0.6395, 0.4556, 0.6544]}, {"w": "happen", "b": [0.4618, 0.6395, 0.5206, 0.6544]}, {"w": "which", "b": [0.5267, 0.6395, 0.5732, 0.6544]}, {"w": "would", "b": [0.5794, 0.6395, 0.6269, 0.6544]}, {"w": "affect", "b": [0.6331, 0.6395, 0.6765, 0.6544]}, {"w": "the", "b": [0.6827, 0.6395, 0.7082, 0.6544]}, {"w": "customer’s", "b": [0.7144, 0.6395, 0.7995, 0.6544]}, {"w": "decision", "b": [0.8056, 0.6395, 0.8691, 0.6544]}, {"w": "to", "b": [0.1312, 0.6574, 0.1476, 0.6723]}, {"w": "stay", "b": [0.1538, 0.6574, 0.1867, 0.6723]}, {"w": "or", "b": [0.1929, 0.6574, 0.2093, 0.6723]}, {"w": "leave.", "b": [0.2155, 0.6574, 0.2601, 0.6723]}, {"w": "Therefore", "b": [0.2683, 0.6574, 0.3458, 0.6723]}, {"w": "delayed", "b": [0.352, 0.6574, 0.412, 0.6723]}, {"w": "labels", "b": [0.4181, 0.6574, 0.4639, 0.6723]}, {"w": "make", "b": [0.47, 0.6574, 0.512, 0.6723]}, {"w": "our", "b": [0.5182, 0.6574, 0.5449, 0.6723]}, {"w": "data", "b": [0.551, 0.6574, 0.5869, 0.6723]}, {"w": "less", "b": [0.5931, 0.6574, 0.621, 0.6723]}, {"w": "reliable.", "b": [0.6271, 0.6574, 0.6908, 0.6723]}]}, {"id": "b_9", "type": "paragraph", "text": "Whether a label is direct or indirect also affects reliability, depending, of course, on what we", "words": [{"w": "Whether", "b": [0.1303, 0.6844, 0.1996, 0.6992]}, {"w": "a", "b": [0.2058, 0.6844, 0.2149, 0.6992]}, {"w": "label", "b": [0.221, 0.6844, 0.259, 0.6992]}, {"w": "is", "b": [0.2651, 0.6844, 0.2774, 0.6992]}, {"w": "direct", "b": [0.2836, 0.6844, 0.3291, 0.6992]}, {"w": "or", "b": [0.3353, 0.6844, 0.3515, 0.6992]}, {"w": "indirect", "b": [0.3577, 0.6844, 0.4184, 0.6992]}, {"w": "also", "b": [0.4246, 0.6844, 0.455, 0.6992]}, {"w": "affects", "b": [0.4612, 0.6844, 0.5113, 0.6992]}, {"w": "reliability,", "b": [0.5175, 0.6844, 0.5969, 0.6992]}, {"w": "depending,", "b": [0.6031, 0.6844, 0.6895, 0.6992]}, {"w": "of", "b": [0.6957, 0.6844, 0.7104, 0.6992]}, {"w": "course,", "b": [0.7165, 0.6844, 0.7713, 0.6992]}, {"w": "on", "b": [0.7775, 0.6844, 0.7967, 0.6992]}, {"w": "what", "b": [0.8028, 0.6844, 0.8423, 0.6992]}, {"w": "we", "b": [0.8484, 0.6844, 0.8692, 0.6992]}]}, {"id": "b_10", "type": "paragraph", "text": "are trying to predict. For example, let’s say our goal is to predict whether the website visitor will be interested in a webpage. We might acquire a certain dataset containing information about users, webpages, and labels “interested”/“not_interested” reflecting whether a specific user was interested in a particular webpage. A direct label would indeed indicate interest, while an indirect label could suggest some interest. For example, if the user pressed the “Like” button, we have the direct indicator of interest. However, if the user only clicked on the link, this could be an indicator of some interest, but it’s an indirect indicator. The user could have clicked by mistake, or because the link text was a clickbait, we cannot know for sure. If", "words": [{"w": "are", "b": [0.1312, 0.7024, 0.1554, 0.7172]}, {"w": "trying", "b": [0.1614, 0.7024, 0.2092, 0.7172]}, {"w": "to", "b": [0.2152, 0.7024, 0.2312, 0.7172]}, {"w": "predict.", "b": [0.2372, 0.7024, 0.2976, 0.7172]}, {"w": "For", "b": [0.3057, 0.7024, 0.3321, 0.7172]}, {"w": "example,", "b": [0.3381, 0.7024, 0.408, 0.7172]}, {"w": "let’s", "b": [0.414, 0.7024, 0.4462, 0.7172]}, {"w": "say", "b": [0.4522, 0.7024, 0.4774, 0.7172]}, {"w": "our", "b": [0.4834, 0.7024, 0.5096, 0.7172]}, {"w": "goal", "b": [0.5156, 0.7024, 0.5477, 0.7172]}, {"w": "is", "b": [0.5537, 0.7024, 0.5659, 0.7172]}, {"w": "to", "b": [0.5719, 0.7024, 0.5879, 0.7172]}, {"w": "predict", "b": [0.5939, 0.7024, 0.6493, 0.7172]}, {"w": "whether", "b": [0.6553, 0.7024, 0.7186, 0.7172]}, {"w": "the", "b": [0.7246, 0.7024, 0.7497, 0.7172]}, {"w": "website", "b": [0.7557, 0.7024, 0.8136, 0.7172]}, {"w": "visitor", "b": [0.8196, 0.7024, 0.8695, 0.7172]}, {"w": "will", "b": [0.1306, 0.7202, 0.1593, 0.7352]}, {"w": "be", "b": [0.1655, 0.7202, 0.1845, 0.7352]}, {"w": "interested", "b": [0.1906, 0.7202, 0.2694, 0.7352]}, {"w": "in", "b": [0.2756, 0.7202, 0.291, 0.7352]}, {"w": "a", "b": [0.2972, 0.7202, 0.3064, 0.7352]}, {"w": "webpage.", "b": [0.3125, 0.7202, 0.386, 0.7352]}, {"w": "We", "b": [0.3942, 0.7202, 0.4199, 0.7352]}, {"w": "might", "b": [0.4261, 0.7202, 0.4728, 0.7352]}, {"w": "acquire", "b": [0.479, 0.7202, 0.5371, 0.7352]}, {"w": "a", "b": [0.5432, 0.7202, 0.5525, 0.7352]}, {"w": "certain", "b": [0.5586, 0.7202, 0.6142, 0.7352]}, {"w": "dataset", "b": [0.6203, 0.7202, 0.679, 0.7352]}, {"w": "containing", "b": [0.6852, 0.7202, 0.7689, 0.7352]}, {"w": "information", "b": [0.7751, 0.7202, 0.8691, 0.7352]}, {"w": "about", "b": [0.1312, 0.7383, 0.177, 0.7531]}, {"w": "users,", "b": [0.1832, 0.7383, 0.2277, 0.7531]}, {"w": "webpages,", "b": [0.2339, 0.7383, 0.3129, 0.7531]}, {"w": "and", "b": [0.3191, 0.7383, 0.3482, 0.7531]}, {"w": "labels", "b": [0.3544, 0.7383, 0.3993, 0.7531]}, {"w": "“interested”/“not_interested”", "b": [0.4054, 0.7383, 0.6426, 0.7531]}, {"w": "reflecting", "b": [0.6488, 0.7383, 0.7213, 0.7531]}, {"w": "whether", "b": [0.7274, 0.7383, 0.7909, 0.7531]}, {"w": "a", "b": [0.797, 0.7383, 0.8061, 0.7531]}, {"w": "specific", "b": [0.8122, 0.7383, 0.8692, 0.7531]}, {"w": "user", "b": [0.1312, 0.756, 0.1649, 0.7711]}, {"w": "was", "b": [0.1711, 0.756, 0.201, 0.7711]}, {"w": "interested", "b": [0.2071, 0.756, 0.2873, 0.7711]}, {"w": "in", "b": [0.2935, 0.756, 0.3092, 0.7711]}, {"w": "a", "b": [0.3154, 0.756, 0.3248, 0.7711]}, {"w": "particular", "b": [0.3309, 0.756, 0.4116, 0.7711]}, {"w": "webpage.", "b": [0.4178, 0.756, 0.4925, 0.7711]}, {"w": "A", "b": [0.5008, 0.756, 0.5149, 0.7711]}, {"w": "direct", "b": [0.5211, 0.756, 0.5682, 0.7711]}, {"w": "label", "b": [0.5744, 0.756, 0.6136, 0.7711]}, {"w": "would", "b": [0.6198, 0.756, 0.6684, 0.7711]}, {"w": "indeed", "b": [0.6746, 0.756, 0.7279, 0.7711]}, {"w": "indicate", "b": [0.7341, 0.756, 0.799, 0.7711]}, {"w": "interest,", "b": [0.8051, 0.756, 0.8718, 0.7711]}, {"w": "while", "b": [0.1306, 0.7742, 0.1718, 0.789]}, {"w": "an", "b": [0.1771, 0.7742, 0.1962, 0.789]}, {"w": "indirect", "b": [0.2015, 0.7742, 0.2619, 0.789]}, {"w": "label", "b": [0.2672, 0.7742, 0.3049, 0.789]}, {"w": "could", "b": [0.3102, 0.7742, 0.3524, 0.789]}, {"w": "suggest", "b": [0.3577, 0.7742, 0.4152, 0.789]}, {"w": "some", "b": [0.4204, 0.774, 0.4605, 0.789]}, {"w": "interest.", "b": [0.4658, 0.7742, 0.5298, 0.789]}, {"w": "For", "b": [0.5377, 0.7742, 0.5641, 0.789]}, {"w": "example,", "b": [0.5694, 0.7742, 0.6392, 0.789]}, {"w": "if", "b": [0.6447, 0.7742, 0.6553, 0.789]}, {"w": "the", "b": [0.6606, 0.7742, 0.6857, 0.789]}, {"w": "user", "b": [0.691, 0.7742, 0.7234, 0.789]}, {"w": "pressed", "b": [0.7287, 0.7742, 0.7863, 0.789]}, {"w": "the", "b": [0.7916, 0.7742, 0.8167, 0.789]}, {"w": "“Like”", "b": [0.822, 0.7742, 0.8725, 0.789]}, {"w": "button,", "b": [0.1312, 0.7921, 0.1896, 0.8069]}, {"w": "we", "b": [0.1958, 0.7921, 0.2164, 0.8069]}, {"w": "have", "b": [0.2225, 0.7921, 0.2582, 0.8069]}, {"w": "the", "b": [0.2644, 0.7921, 0.2895, 0.8069]}, {"w": "direct", "b": [0.2957, 0.7921, 0.341, 0.8069]}, {"w": "indicator", "b": [0.3472, 0.7921, 0.4177, 0.8069]}, {"w": "of", "b": [0.4239, 0.7921, 0.4384, 0.8069]}, {"w": "interest.", "b": [0.4446, 0.7921, 0.5086, 0.8069]}, {"w": "However,", "b": [0.5169, 0.7921, 0.5888, 0.8069]}, {"w": "if", "b": [0.595, 0.7921, 0.6056, 0.8069]}, {"w": "the", "b": [0.6117, 0.7921, 0.6369, 0.8069]}, {"w": "user", "b": [0.643, 0.7921, 0.6754, 0.8069]}, {"w": "only", "b": [0.6816, 0.7921, 0.7153, 0.8069]}, {"w": "clicked", "b": [0.7214, 0.7921, 0.7742, 0.8069]}, {"w": "on", "b": [0.7804, 0.7921, 0.7995, 0.8069]}, {"w": "the", "b": [0.8057, 0.7921, 0.8309, 0.8069]}, {"w": "link,", "b": [0.837, 0.7921, 0.8717, 0.8069]}, {"w": "this", "b": [0.1312, 0.8098, 0.1617, 0.8249]}, {"w": "could", "b": [0.1684, 0.8098, 0.2123, 0.8249]}, {"w": "be", "b": [0.219, 0.8098, 0.2384, 0.8249]}, {"w": "an", "b": [0.245, 0.8098, 0.2649, 0.8249]}, {"w": "indicator", "b": [0.2716, 0.8098, 0.3449, 0.8249]}, {"w": "of", "b": [0.3516, 0.8098, 0.3668, 0.8249]}, {"w": "some", "b": [0.3735, 0.8098, 0.4144, 0.8249]}, {"w": "interest,", "b": [0.421, 0.8098, 0.4877, 0.8249]}, {"w": "but", "b": [0.4945, 0.8098, 0.5227, 0.8249]}, {"w": "it’s", "b": [0.5294, 0.8098, 0.5546, 0.8249]}, {"w": "an", "b": [0.5613, 0.8098, 0.5812, 0.8249]}, {"w": "indirect", "b": [0.5879, 0.8098, 0.6507, 0.8249]}, {"w": "indicator.", "b": [0.6574, 0.8098, 0.7359, 0.8249]}, {"w": "The", "b": [0.7458, 0.8098, 0.7782, 0.8249]}, {"w": "user", "b": [0.7849, 0.8098, 0.8185, 0.8249]}, {"w": "could", "b": [0.8252, 0.8098, 0.8692, 0.8249]}, {"w": "have", "b": [0.1312, 0.828, 0.1669, 0.8428]}, {"w": "clicked", "b": [0.173, 0.828, 0.2258, 0.8428]}, {"w": "by", "b": [0.2319, 0.828, 0.251, 0.8428]}, {"w": "mistake,", "b": [0.2571, 0.828, 0.3225, 0.8428]}, {"w": "or", "b": [0.3287, 0.828, 0.3448, 0.8428]}, {"w": "because", "b": [0.3509, 0.828, 0.4119, 0.8428]}, {"w": "the", "b": [0.418, 0.828, 0.4431, 0.8428]}, {"w": "link", "b": [0.4492, 0.828, 0.4789, 0.8428]}, {"w": "text", "b": [0.485, 0.828, 0.5167, 0.8428]}, {"w": "was", "b": [0.5228, 0.828, 0.5515, 0.8428]}, {"w": "a", "b": [0.5577, 0.828, 0.5667, 0.8428]}, {"w": "clickbait,", "b": [0.5728, 0.828, 0.6442, 0.8428]}, {"w": "we", "b": [0.6503, 0.828, 0.6709, 0.8428]}, {"w": "cannot", "b": [0.677, 0.828, 0.7303, 0.8428]}, {"w": "know", "b": [0.7364, 0.828, 0.7776, 0.8428]}, {"w": "for", "b": [0.7837, 0.828, 0.8054, 0.8428]}, {"w": "sure.", "b": [0.8115, 0.828, 0.8489, 0.8428]}, {"w": "If", "b": [0.8571, 0.828, 0.8691, 0.8428]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "8", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 52, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Original photo Labeled photo", "words": [{"w": "Original", "b": [0.2259, 0.3205, 0.2916, 0.3354]}, {"w": "photo", "b": [0.2977, 0.3205, 0.3439, 0.3354]}, {"w": "Labeled", "b": [0.6573, 0.3205, 0.7207, 0.3354]}, {"w": "photo", "b": [0.7268, 0.3205, 0.773, 0.3354]}]}, {"id": "b_1", "type": "paragraph", "text": "Figure 3: The unlabeled and labeled aerial photo. Photo credit: Tom Fisk.", "words": [{"w": "Figure", "b": [0.1966, 0.3509, 0.2487, 0.3659]}, {"w": "3:", "b": [0.2549, 0.3509, 0.2692, 0.3659]}, {"w": "The", "b": [0.2774, 0.3509, 0.3092, 0.3659]}, {"w": "unlabeled", "b": [0.3154, 0.3509, 0.3928, 0.3659]}, {"w": "and", "b": [0.3989, 0.3509, 0.4287, 0.3659]}, {"w": "labeled", "b": [0.4348, 0.3509, 0.4917, 0.3659]}, {"w": "aerial", "b": [0.4979, 0.3509, 0.5421, 0.3659]}, {"w": "photo.", "b": [0.5482, 0.3509, 0.5995, 0.3659]}, {"w": "Photo", "b": [0.6077, 0.3509, 0.6561, 0.3659]}, {"w": "credit:", "b": [0.6623, 0.3509, 0.7136, 0.3659]}, {"w": "Tom", "b": [0.7218, 0.3509, 0.7582, 0.3659]}, {"w": "Fisk.", "b": [0.7643, 0.3509, 0.8037, 0.3659]}]}, {"id": "b_2", "type": "paragraph", "text": "the label is indirect, this also makes such data less reliable. Of course, it’s less reliable for predicting the interest, but can be perfectly reliable for predicting clicks.", "words": [{"w": "the", "b": [0.1312, 0.4011, 0.1574, 0.4162]}, {"w": "label", "b": [0.1636, 0.4011, 0.2028, 0.4162]}, {"w": "is", "b": [0.209, 0.4011, 0.2216, 0.4162]}, {"w": "indirect,", "b": [0.2278, 0.4011, 0.2958, 0.4162]}, {"w": "this", "b": [0.302, 0.4011, 0.3325, 0.4162]}, {"w": "also", "b": [0.3386, 0.4011, 0.3701, 0.4162]}, {"w": "makes", "b": [0.3763, 0.4011, 0.4266, 0.4162]}, {"w": "such", "b": [0.4328, 0.4011, 0.469, 0.4162]}, {"w": "data", "b": [0.4752, 0.4011, 0.5118, 0.4162]}, {"w": "less", "b": [0.5179, 0.4011, 0.5464, 0.4162]}, {"w": "reliable.", "b": [0.5526, 0.4011, 0.6175, 0.4162]}, {"w": "Of", "b": [0.6258, 0.4011, 0.6462, 0.4162]}, {"w": "course,", "b": [0.6523, 0.4011, 0.709, 0.4162]}, {"w": "it’s", "b": [0.7152, 0.4011, 0.7404, 0.4162]}, {"w": "less", "b": [0.7465, 0.4011, 0.775, 0.4162]}, {"w": "reliable", "b": [0.7812, 0.4011, 0.8409, 0.4162]}, {"w": "for", "b": [0.847, 0.4011, 0.8696, 0.4162]}, {"w": "predicting", "b": [0.1312, 0.4191, 0.2123, 0.4341]}, {"w": "the", "b": [0.2185, 0.4191, 0.2441, 0.4341]}, {"w": "interest,", "b": [0.2502, 0.4191, 0.3155, 0.4341]}, {"w": "but", "b": [0.3217, 0.4191, 0.3494, 0.4341]}, {"w": "can", "b": [0.3555, 0.4191, 0.3832, 0.4341]}, {"w": "be", "b": [0.3894, 0.4191, 0.4084, 0.4341]}, {"w": "perfectly", "b": [0.4145, 0.4191, 0.4848, 0.4341]}, {"w": "reliable", "b": [0.491, 0.4191, 0.5495, 0.4341]}, {"w": "for", "b": [0.5556, 0.4191, 0.5777, 0.4341]}, {"w": "predicting", "b": [0.5839, 0.4191, 0.665, 0.4341]}, {"w": "clicks.", "b": [0.6711, 0.4191, 0.7194, 0.4341]}]}, {"id": "b_3", "type": "paragraph", "text": "Another source of unreliability in the data is feedback loops. A feedback loop is a property in the system design when the data used to train the model is obtained using the model itself. Again, imagine that you work on a problem of predicting whether a specific user of a website will like the content, and you only have indirect labels – clicks. If the model is already deployed on the website and the users click on links recommended by the model, this means that the new data indirectly reflects not only the interest of users to the content, but also how intensively the model recommended that content. If the model decided that a specific link is important enough to recommend to many users, more users would likely click on that link, especially if the recommendation was made repeatedly during several days or weeks.", "words": [{"w": "Another", "b": [0.1305, 0.4462, 0.1954, 0.461]}, {"w": "source", "b": [0.2013, 0.4462, 0.2507, 0.461]}, {"w": "of", "b": [0.2566, 0.4462, 0.2712, 0.461]}, {"w": "unreliability", "b": [0.2771, 0.4462, 0.3726, 0.461]}, {"w": "in", "b": [0.3785, 0.4462, 0.3936, 0.461]}, {"w": "the", "b": [0.3995, 0.4462, 0.4246, 0.461]}, {"w": "data", "b": [0.4305, 0.4462, 0.4657, 0.461]}, {"w": "is", "b": [0.4716, 0.4462, 0.4837, 0.461]}, {"w": "feedback", "b": [0.4896, 0.4462, 0.5575, 0.461]}, {"w": "loops.", "b": [0.5634, 0.4462, 0.6092, 0.461]}, {"w": "A", "b": [0.6173, 0.4462, 0.6309, 0.461]}, {"w": "feedback", "b": [0.6365, 0.446, 0.7164, 0.461]}, {"w": "loop", "b": [0.7232, 0.446, 0.7627, 0.461]}, {"w": "is", "b": [0.7686, 0.4462, 0.7807, 0.461]}, {"w": "a", "b": [0.7866, 0.4462, 0.7957, 0.461]}, {"w": "property", "b": [0.8016, 0.4462, 0.8695, 0.461]}, {"w": "in", "b": [0.1312, 0.4639, 0.1469, 0.479]}, {"w": "the", "b": [0.1539, 0.4639, 0.18, 0.479]}, {"w": "system", "b": [0.187, 0.4639, 0.2431, 0.479]}, {"w": "design", "b": [0.2501, 0.4639, 0.3015, 0.479]}, {"w": "when", "b": [0.3084, 0.4639, 0.3513, 0.479]}, {"w": "the", "b": [0.3582, 0.4639, 0.3844, 0.479]}, {"w": "data", "b": [0.3913, 0.4639, 0.4279, 0.479]}, {"w": "used", "b": [0.4349, 0.4639, 0.4716, 0.479]}, {"w": "to", "b": [0.4786, 0.4639, 0.4953, 0.479]}, {"w": "train", "b": [0.5023, 0.4639, 0.5421, 0.479]}, {"w": "the", "b": [0.549, 0.4639, 0.5752, 0.479]}, {"w": "model", "b": [0.5821, 0.4639, 0.6318, 0.479]}, {"w": "is", "b": [0.6387, 0.4639, 0.6514, 0.479]}, {"w": "obtained", "b": [0.6583, 0.4639, 0.7294, 0.479]}, {"w": "using", "b": [0.7364, 0.4639, 0.7794, 0.479]}, {"w": "the", "b": [0.7864, 0.4639, 0.8125, 0.479]}, {"w": "model", "b": [0.8195, 0.4639, 0.8691, 0.479]}, {"w": "itself.", "b": [0.1312, 0.482, 0.1748, 0.4969]}, {"w": "Again,", "b": [0.183, 0.482, 0.2356, 0.4969]}, {"w": "imagine", "b": [0.2417, 0.482, 0.304, 0.4969]}, {"w": "that", "b": [0.3101, 0.482, 0.3438, 0.4969]}, {"w": "you", "b": [0.35, 0.482, 0.3786, 0.4969]}, {"w": "work", "b": [0.3847, 0.482, 0.4236, 0.4969]}, {"w": "on", "b": [0.4297, 0.482, 0.4491, 0.4969]}, {"w": "a", "b": [0.4553, 0.482, 0.4645, 0.4969]}, {"w": "problem", "b": [0.4706, 0.482, 0.536, 0.4969]}, {"w": "of", "b": [0.5422, 0.482, 0.557, 0.4969]}, {"w": "predicting", "b": [0.5631, 0.482, 0.6439, 0.4969]}, {"w": "whether", "b": [0.6501, 0.482, 0.7145, 0.4969]}, {"w": "a", "b": [0.7206, 0.482, 0.7298, 0.4969]}, {"w": "specific", "b": [0.736, 0.482, 0.7938, 0.4969]}, {"w": "user", "b": [0.7999, 0.482, 0.8328, 0.4969]}, {"w": "of", "b": [0.8389, 0.482, 0.8538, 0.4969]}, {"w": "a", "b": [0.8599, 0.482, 0.8691, 0.4969]}, {"w": "website", "b": [0.1306, 0.5, 0.1885, 0.5148]}, {"w": "will", "b": [0.1938, 0.5, 0.222, 0.5148]}, {"w": "like", "b": [0.2274, 0.5, 0.2545, 0.5148]}, {"w": "the", "b": [0.2599, 0.5, 0.2851, 0.5148]}, {"w": "content,", "b": [0.2905, 0.5, 0.3538, 0.5148]}, {"w": "and", "b": [0.3593, 0.5, 0.3885, 0.5148]}, {"w": "you", "b": [0.3939, 0.5, 0.422, 0.5148]}, {"w": "only", "b": [0.4274, 0.5, 0.4611, 0.5148]}, {"w": "have", "b": [0.4665, 0.5, 0.5021, 0.5148]}, {"w": "indirect", "b": [0.5075, 0.5, 0.5679, 0.5148]}, {"w": "labels", "b": [0.5733, 0.5, 0.6181, 0.5148]}, {"w": "–", "b": [0.6235, 0.5, 0.6326, 0.5148]}, {"w": "clicks.", "b": [0.638, 0.5, 0.6853, 0.5148]}, {"w": "If", "b": [0.6933, 0.5, 0.7053, 0.5148]}, {"w": "the", "b": [0.7107, 0.5, 0.7359, 0.5148]}, {"w": "model", "b": [0.7413, 0.5, 0.789, 0.5148]}, {"w": "is", "b": [0.7944, 0.5, 0.8066, 0.5148]}, {"w": "already", "b": [0.812, 0.5, 0.8698, 0.5148]}, {"w": "deployed", "b": [0.1312, 0.5179, 0.2007, 0.5328]}, {"w": "on", "b": [0.2068, 0.5179, 0.2261, 0.5328]}, {"w": "the", "b": [0.2323, 0.5179, 0.2576, 0.5328]}, {"w": "website", "b": [0.2638, 0.5179, 0.3222, 0.5328]}, {"w": "and", "b": [0.3283, 0.5179, 0.3577, 0.5328]}, {"w": "the", "b": [0.3639, 0.5179, 0.3892, 0.5328]}, {"w": "users", "b": [0.3954, 0.5179, 0.4352, 0.5328]}, {"w": "click", "b": [0.4413, 0.5179, 0.4769, 0.5328]}, {"w": "on", "b": [0.483, 0.5179, 0.5023, 0.5328]}, {"w": "links", "b": [0.5084, 0.5179, 0.5455, 0.5328]}, {"w": "recommended", "b": [0.5517, 0.5179, 0.6613, 0.5328]}, {"w": "by", "b": [0.6674, 0.5179, 0.6867, 0.5328]}, {"w": "the", "b": [0.6928, 0.5179, 0.7182, 0.5328]}, {"w": "model,", "b": [0.7243, 0.5179, 0.7776, 0.5328]}, {"w": "this", "b": [0.7837, 0.5179, 0.8132, 0.5328]}, {"w": "means", "b": [0.8194, 0.5179, 0.8692, 0.5328]}, {"w": "that", "b": [0.1312, 0.5357, 0.1657, 0.5508]}, {"w": "the", "b": [0.1719, 0.5357, 0.198, 0.5508]}, {"w": "new", "b": [0.2042, 0.5357, 0.2365, 0.5508]}, {"w": "data", "b": [0.2427, 0.5357, 0.2793, 0.5508]}, {"w": "indirectly", "b": [0.2854, 0.5357, 0.3634, 0.5508]}, {"w": "reflects", "b": [0.3695, 0.5357, 0.4272, 0.5508]}, {"w": "not", "b": [0.4333, 0.5357, 0.4605, 0.5508]}, {"w": "only", "b": [0.4667, 0.5357, 0.5017, 0.5508]}, {"w": "the", "b": [0.5078, 0.5357, 0.534, 0.5508]}, {"w": "interest", "b": [0.5401, 0.5357, 0.6015, 0.5508]}, {"w": "of", "b": [0.6076, 0.5357, 0.6228, 0.5508]}, {"w": "users", "b": [0.6289, 0.5357, 0.67, 0.5508]}, {"w": "to", "b": [0.6761, 0.5357, 0.6928, 0.5508]}, {"w": "the", "b": [0.699, 0.5357, 0.7251, 0.5508]}, {"w": "content,", "b": [0.7313, 0.5357, 0.7972, 0.5508]}, {"w": "but", "b": [0.8033, 0.5357, 0.8315, 0.5508]}, {"w": "also", "b": [0.8377, 0.5357, 0.8692, 0.5508]}, {"w": "how", "b": [0.1312, 0.5537, 0.1638, 0.5687]}, {"w": "intensively", "b": [0.17, 0.5537, 0.2561, 0.5687]}, {"w": "the", "b": [0.2622, 0.5537, 0.2881, 0.5687]}, {"w": "model", "b": [0.2943, 0.5537, 0.3435, 0.5687]}, {"w": "recommended", "b": [0.3496, 0.5537, 0.4615, 0.5687]}, {"w": "that", "b": [0.4677, 0.5537, 0.5019, 0.5687]}, {"w": "content.", "b": [0.508, 0.5537, 0.5733, 0.5687]}, {"w": "If", "b": [0.5815, 0.5537, 0.5939, 0.5687]}, {"w": "the", "b": [0.6, 0.5537, 0.6259, 0.5687]}, {"w": "model", "b": [0.6321, 0.5537, 0.6813, 0.5687]}, {"w": "decided", "b": [0.6874, 0.5537, 0.7486, 0.5687]}, {"w": "that", "b": [0.7547, 0.5537, 0.7889, 0.5687]}, {"w": "a", "b": [0.795, 0.5537, 0.8043, 0.5687]}, {"w": "specific", "b": [0.8105, 0.5537, 0.8691, 0.5687]}, {"w": "link", "b": [0.1312, 0.5717, 0.1611, 0.5866]}, {"w": "is", "b": [0.1672, 0.5717, 0.1794, 0.5866]}, {"w": "important", "b": [0.1856, 0.5717, 0.2655, 0.5866]}, {"w": "enough", "b": [0.2716, 0.5717, 0.3282, 0.5866]}, {"w": "to", "b": [0.3344, 0.5717, 0.3506, 0.5866]}, {"w": "recommend", "b": [0.3567, 0.5717, 0.4477, 0.5866]}, {"w": "to", "b": [0.4539, 0.5717, 0.47, 0.5866]}, {"w": "many", "b": [0.4762, 0.5717, 0.5196, 0.5866]}, {"w": "users,", "b": [0.5258, 0.5717, 0.5705, 0.5866]}, {"w": "more", "b": [0.5767, 0.5717, 0.6161, 0.5866]}, {"w": "users", "b": [0.6223, 0.5717, 0.662, 0.5866]}, {"w": "would", "b": [0.6681, 0.5717, 0.7151, 0.5866]}, {"w": "likely", "b": [0.7212, 0.5717, 0.7632, 0.5866]}, {"w": "click", "b": [0.7693, 0.5717, 0.8047, 0.5866]}, {"w": "on", "b": [0.8109, 0.5717, 0.8301, 0.5866]}, {"w": "that", "b": [0.8362, 0.5717, 0.8696, 0.5866]}, {"w": "link,", "b": [0.1312, 0.5896, 0.1666, 0.6046]}, {"w": "especially", "b": [0.1728, 0.5896, 0.2498, 0.6046]}, {"w": "if", "b": [0.256, 0.5896, 0.2667, 0.6046]}, {"w": "the", "b": [0.2729, 0.5896, 0.2985, 0.6046]}, {"w": "recommendation", "b": [0.3047, 0.5896, 0.438, 0.6046]}, {"w": "was", "b": [0.4442, 0.5896, 0.4735, 0.6046]}, {"w": "made", "b": [0.4796, 0.5896, 0.5227, 0.6046]}, {"w": "repeatedly", "b": [0.5288, 0.5896, 0.613, 0.6046]}, {"w": "during", "b": [0.6191, 0.5896, 0.6715, 0.6046]}, {"w": "several", "b": [0.6776, 0.5896, 0.7322, 0.6046]}, {"w": "days", "b": [0.7383, 0.5896, 0.7743, 0.6046]}, {"w": "or", "b": [0.7805, 0.5896, 0.7969, 0.6046]}, {"w": "weeks.", "b": [0.8031, 0.5896, 0.8544, 0.6046]}]}, {"id": "b_4", "type": "paragraph", "text": "3.2 Common Problems With Data", "words": [{"w": "3.2", "b": [0.1312, 0.6381, 0.1631, 0.6561]}, {"w": "Common", "b": [0.188, 0.6381, 0.2863, 0.6561]}, {"w": "Problems", "b": [0.2946, 0.6381, 0.397, 0.6561]}, {"w": "With", "b": [0.4053, 0.6381, 0.4615, 0.6561]}, {"w": "Data", "b": [0.4698, 0.6381, 0.5228, 0.6561]}]}, {"id": "b_5", "type": "paragraph", "text": "As we have just seen, the data you will work with can have problems. In this section, we cite the most important of these problems and what you can do to alleviate them.", "words": [{"w": "As", "b": [0.1305, 0.6771, 0.1512, 0.692]}, {"w": "we", "b": [0.1572, 0.6771, 0.1778, 0.692]}, {"w": "have", "b": [0.1838, 0.6771, 0.2195, 0.692]}, {"w": "just", "b": [0.2255, 0.6771, 0.2553, 0.692]}, {"w": "seen,", "b": [0.2613, 0.6771, 0.2996, 0.692]}, {"w": "the", "b": [0.3056, 0.6771, 0.3307, 0.692]}, {"w": "data", "b": [0.3367, 0.6771, 0.3719, 0.692]}, {"w": "you", "b": [0.3779, 0.6771, 0.406, 0.692]}, {"w": "will", "b": [0.412, 0.6771, 0.4402, 0.692]}, {"w": "work", "b": [0.4462, 0.6771, 0.4844, 0.692]}, {"w": "with", "b": [0.4904, 0.6771, 0.5256, 0.692]}, {"w": "can", "b": [0.5316, 0.6771, 0.5587, 0.692]}, {"w": "have", "b": [0.5647, 0.6771, 0.6004, 0.692]}, {"w": "problems.", "b": [0.6064, 0.6771, 0.6829, 0.692]}, {"w": "In", "b": [0.6911, 0.6771, 0.7077, 0.692]}, {"w": "this", "b": [0.7137, 0.6771, 0.7429, 0.692]}, {"w": "section,", "b": [0.7489, 0.6771, 0.8083, 0.692]}, {"w": "we", "b": [0.8143, 0.6771, 0.8349, 0.692]}, {"w": "cite", "b": [0.8409, 0.6771, 0.8691, 0.692]}, {"w": "the", "b": [0.1312, 0.695, 0.1569, 0.7099]}, {"w": "most", "b": [0.163, 0.695, 0.2021, 0.7099]}, {"w": "important", "b": [0.2082, 0.695, 0.2893, 0.7099]}, {"w": "of", "b": [0.2954, 0.695, 0.3103, 0.7099]}, {"w": "these", "b": [0.3164, 0.695, 0.3576, 0.7099]}, {"w": "problems", "b": [0.3637, 0.695, 0.4367, 0.7099]}, {"w": "and", "b": [0.4428, 0.695, 0.4726, 0.7099]}, {"w": "what", "b": [0.4787, 0.695, 0.5187, 0.7099]}, {"w": "you", "b": [0.5249, 0.695, 0.5536, 0.7099]}, {"w": "can", "b": [0.5597, 0.695, 0.5874, 0.7099]}, {"w": "do", "b": [0.5936, 0.695, 0.613, 0.7099]}, {"w": "to", "b": [0.6192, 0.695, 0.6356, 0.7099]}, {"w": "alleviate", "b": [0.6417, 0.695, 0.7089, 0.7099]}, {"w": "them.", "b": [0.7151, 0.695, 0.7612, 0.7099]}]}, {"id": "b_6", "type": "paragraph", "text": "3.2.1 High Cost", "words": [{"w": "3.2.1", "b": [0.1312, 0.7428, 0.1749, 0.7578]}, {"w": "High", "b": [0.1961, 0.7428, 0.241, 0.7578]}, {"w": "Cost", "b": [0.2481, 0.7428, 0.2906, 0.7578]}]}, {"id": "b_7", "type": "paragraph", "text": "Getting unlabeled data can be expensive; however, labeling data is the most expensive work, especially if the work is done manually.", "words": [{"w": "Getting", "b": [0.1312, 0.7795, 0.192, 0.7943]}, {"w": "unlabeled", "b": [0.1981, 0.7795, 0.2744, 0.7943]}, {"w": "data", "b": [0.2805, 0.7795, 0.3158, 0.7943]}, {"w": "can", "b": [0.322, 0.7795, 0.3493, 0.7943]}, {"w": "be", "b": [0.3554, 0.7795, 0.3741, 0.7943]}, {"w": "expensive;", "b": [0.3802, 0.7795, 0.4612, 0.7943]}, {"w": "however,", "b": [0.4673, 0.7795, 0.536, 0.7943]}, {"w": "labeling", "b": [0.5422, 0.7795, 0.6043, 0.7943]}, {"w": "data", "b": [0.6104, 0.7795, 0.6458, 0.7943]}, {"w": "is", "b": [0.6519, 0.7795, 0.6641, 0.7943]}, {"w": "the", "b": [0.6702, 0.7795, 0.6955, 0.7943]}, {"w": "most", "b": [0.7016, 0.7795, 0.7401, 0.7943]}, {"w": "expensive", "b": [0.7462, 0.7795, 0.8221, 0.7943]}, {"w": "work,", "b": [0.8282, 0.7795, 0.8717, 0.7943]}, {"w": "especially", "b": [0.1312, 0.7973, 0.2083, 0.8123]}, {"w": "if", "b": [0.2144, 0.7973, 0.2252, 0.8123]}, {"w": "the", "b": [0.2313, 0.7973, 0.257, 0.8123]}, {"w": "work", "b": [0.2631, 0.7973, 0.3021, 0.8123]}, {"w": "is", "b": [0.3083, 0.7973, 0.3207, 0.8123]}, {"w": "done", "b": [0.3269, 0.7973, 0.3648, 0.8123]}, {"w": "manually.", "b": [0.3709, 0.7973, 0.4484, 0.8123]}]}, {"id": "b_8", "type": "paragraph", "text": "Getting unlabeled data becomes expensive when it nust be gathered specifically for your problem. Let’s say your goal is to know where different types of commerce are located in a city. The best solution would be to buy this data from a government agency. However,", "words": [{"w": "Getting", "b": [0.1312, 0.8242, 0.1941, 0.8393]}, {"w": "unlabeled", "b": [0.2011, 0.8242, 0.28, 0.8393]}, {"w": "data", "b": [0.287, 0.8242, 0.3236, 0.8393]}, {"w": "becomes", "b": [0.3305, 0.8242, 0.3991, 0.8393]}, {"w": "expensive", "b": [0.4061, 0.8242, 0.4847, 0.8393]}, {"w": "when", "b": [0.4916, 0.8242, 0.5345, 0.8393]}, {"w": "it", "b": [0.5414, 0.8242, 0.554, 0.8393]}, {"w": "nust", "b": [0.5609, 0.8242, 0.5961, 0.8393]}, {"w": "be", "b": [0.603, 0.8242, 0.6224, 0.8393]}, {"w": "gathered", "b": [0.6293, 0.8242, 0.7005, 0.8393]}, {"w": "specifically", "b": [0.7074, 0.8242, 0.7965, 0.8393]}, {"w": "for", "b": [0.8034, 0.8242, 0.8259, 0.8393]}, {"w": "your", "b": [0.8329, 0.8242, 0.8695, 0.8393]}, {"w": "problem.", "b": [0.1312, 0.8421, 0.2035, 0.8572]}, {"w": "Let’s", "b": [0.2127, 0.8421, 0.2528, 0.8572]}, {"w": "say", "b": [0.2593, 0.8421, 0.2856, 0.8572]}, {"w": "your", "b": [0.2921, 0.8421, 0.3288, 0.8572]}, {"w": "goal", "b": [0.3353, 0.8421, 0.3688, 0.8572]}, {"w": "is", "b": [0.3752, 0.8421, 0.3879, 0.8572]}, {"w": "to", "b": [0.3944, 0.8421, 0.4112, 0.8572]}, {"w": "know", "b": [0.4177, 0.8421, 0.4605, 0.8572]}, {"w": "where", "b": [0.467, 0.8421, 0.5152, 0.8572]}, {"w": "different", "b": [0.5217, 0.8421, 0.5898, 0.8572]}, {"w": "types", "b": [0.5963, 0.8421, 0.6398, 0.8572]}, {"w": "of", "b": [0.6463, 0.8421, 0.6615, 0.8572]}, {"w": "commerce", "b": [0.668, 0.8421, 0.7496, 0.8572]}, {"w": "are", "b": [0.7561, 0.8421, 0.7813, 0.8572]}, {"w": "located", "b": [0.7878, 0.8421, 0.8469, 0.8572]}, {"w": "in", "b": [0.8534, 0.8421, 0.8691, 0.8572]}, {"w": "a", "b": [0.1312, 0.86, 0.1406, 0.8752]}, {"w": "city.", "b": [0.1473, 0.86, 0.1813, 0.8752]}, {"w": "The", "b": [0.1909, 0.86, 0.2234, 0.8752]}, {"w": "best", "b": [0.23, 0.86, 0.2641, 0.8752]}, {"w": "solution", "b": [0.2707, 0.86, 0.3357, 0.8752]}, {"w": "would", "b": [0.3423, 0.86, 0.3909, 0.8752]}, {"w": "be", "b": [0.3976, 0.86, 0.4169, 0.8752]}, {"w": "to", "b": [0.4236, 0.86, 0.4403, 0.8752]}, {"w": "buy", "b": [0.4469, 0.86, 0.4778, 0.8752]}, {"w": "this", "b": [0.4844, 0.86, 0.5148, 0.8752]}, {"w": "data", "b": [0.5215, 0.86, 0.5581, 0.8752]}, {"w": "from", "b": [0.5647, 0.86, 0.6029, 0.8752]}, {"w": "a", "b": [0.6095, 0.86, 0.6189, 0.8752]}, {"w": "government", "b": [0.6256, 0.86, 0.7208, 0.8752]}, {"w": "agency.", "b": [0.7275, 0.86, 0.7871, 0.8752]}, {"w": "However,", "b": [0.7968, 0.86, 0.8716, 0.8752]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "9", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 53, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "for various reasons it can be complicated or even impossible: the government database may be incomplete or outdated. To get up-to-date data, you may decide to send cars equipped with cameras on the streets of a given city. They would take pictures of all buildings on the streets.", "words": [{"w": "for", "b": [0.1312, 0.0884, 0.1533, 0.1033]}, {"w": "various", "b": [0.1594, 0.0884, 0.2163, 0.1033]}, {"w": "reasons", "b": [0.2225, 0.0884, 0.2811, 0.1033]}, {"w": "it", "b": [0.2872, 0.0884, 0.2995, 0.1033]}, {"w": "can", "b": [0.3057, 0.0884, 0.3333, 0.1033]}, {"w": "be", "b": [0.3395, 0.0884, 0.3584, 0.1033]}, {"w": "complicated", "b": [0.3645, 0.0884, 0.4606, 0.1033]}, {"w": "or", "b": [0.4668, 0.0884, 0.4832, 0.1033]}, {"w": "even", "b": [0.4894, 0.0884, 0.5252, 0.1033]}, {"w": "impossible:", "b": [0.5314, 0.0884, 0.62, 0.1033]}, {"w": "the", "b": [0.6283, 0.0884, 0.6538, 0.1033]}, {"w": "government", "b": [0.66, 0.0884, 0.7531, 0.1033]}, {"w": "database", "b": [0.7593, 0.0884, 0.8299, 0.1033]}, {"w": "may", "b": [0.8361, 0.0884, 0.8698, 0.1033]}, {"w": "be", "b": [0.1312, 0.1063, 0.1505, 0.1213]}, {"w": "incomplete", "b": [0.1566, 0.1063, 0.2451, 0.1213]}, {"w": "or", "b": [0.2512, 0.1063, 0.268, 0.1213]}, {"w": "outdated.", "b": [0.2741, 0.1063, 0.3522, 0.1213]}, {"w": "To", "b": [0.3603, 0.1063, 0.3817, 0.1213]}, {"w": "get", "b": [0.3878, 0.1063, 0.4128, 0.1213]}, {"w": "up-to-date", "b": [0.419, 0.1063, 0.5043, 0.1213]}, {"w": "data,", "b": [0.5104, 0.1063, 0.5521, 0.1213]}, {"w": "you", "b": [0.5582, 0.1063, 0.5873, 0.1213]}, {"w": "may", "b": [0.5935, 0.1063, 0.6278, 0.1213]}, {"w": "decide", "b": [0.634, 0.1063, 0.685, 0.1213]}, {"w": "to", "b": [0.6911, 0.1063, 0.7078, 0.1213]}, {"w": "send", "b": [0.7139, 0.1063, 0.7505, 0.1213]}, {"w": "cars", "b": [0.7566, 0.1063, 0.789, 0.1213]}, {"w": "equipped", "b": [0.7952, 0.1063, 0.8691, 0.1213]}, {"w": "with", "b": [0.1306, 0.1243, 0.1662, 0.1392]}, {"w": "cameras", "b": [0.1723, 0.1243, 0.2366, 0.1392]}, {"w": "on", "b": [0.2427, 0.1243, 0.262, 0.1392]}, {"w": "the", "b": [0.2682, 0.1243, 0.2936, 0.1392]}, {"w": "streets", "b": [0.2998, 0.1243, 0.3519, 0.1392]}, {"w": "of", "b": [0.3581, 0.1243, 0.3728, 0.1392]}, {"w": "a", "b": [0.379, 0.1243, 0.3881, 0.1392]}, {"w": "given", "b": [0.3943, 0.1243, 0.436, 0.1392]}, {"w": "city.", "b": [0.4422, 0.1243, 0.4752, 0.1392]}, {"w": "They", "b": [0.4834, 0.1243, 0.5246, 0.1392]}, {"w": "would", "b": [0.5308, 0.1243, 0.5781, 0.1392]}, {"w": "take", "b": [0.5842, 0.1243, 0.6178, 0.1392]}, {"w": "pictures", "b": [0.6239, 0.1243, 0.6872, 0.1392]}, {"w": "of", "b": [0.6933, 0.1243, 0.7081, 0.1392]}, {"w": "all", "b": [0.7142, 0.1243, 0.7336, 0.1392]}, {"w": "buildings", "b": [0.7397, 0.1243, 0.812, 0.1392]}, {"w": "on", "b": [0.8182, 0.1243, 0.8375, 0.1392]}, {"w": "the", "b": [0.8437, 0.1243, 0.8691, 0.1392]}, {"w": "streets.", "b": [0.1312, 0.1422, 0.1889, 0.1572]}]}, {"id": "b_1", "type": "paragraph", "text": "As you might imagine, such an enterprise is not cheap. Collecting pictures of the buildings is not enough. We need the type of commerce in every building. Now we need labeled data: “coffee house,” “bank,” “grocery,” “drug store,” “gas station,” etc. These must be assigned", "words": [{"w": "As", "b": [0.1305, 0.1693, 0.1512, 0.1841]}, {"w": "you", "b": [0.1573, 0.1693, 0.1855, 0.1841]}, {"w": "might", "b": [0.1916, 0.1693, 0.2373, 0.1841]}, {"w": "imagine,", "b": [0.2434, 0.1693, 0.3097, 0.1841]}, {"w": "such", "b": [0.3158, 0.1693, 0.3506, 0.1841]}, {"w": "an", "b": [0.3566, 0.1693, 0.3757, 0.1841]}, {"w": "enterprise", "b": [0.3818, 0.1693, 0.4589, 0.1841]}, {"w": "is", "b": [0.465, 0.1693, 0.4772, 0.1841]}, {"w": "not", "b": [0.4833, 0.1693, 0.5094, 0.1841]}, {"w": "cheap.", "b": [0.5155, 0.1693, 0.5653, 0.1841]}, {"w": "Collecting", "b": [0.5735, 0.1693, 0.6529, 0.1841]}, {"w": "pictures", "b": [0.6589, 0.1693, 0.7214, 0.1841]}, {"w": "of", "b": [0.7275, 0.1693, 0.7421, 0.1841]}, {"w": "the", "b": [0.7482, 0.1693, 0.7733, 0.1841]}, {"w": "buildings", "b": [0.7794, 0.1693, 0.8509, 0.1841]}, {"w": "is", "b": [0.857, 0.1693, 0.8691, 0.1841]}, {"w": "not", "b": [0.1312, 0.187, 0.1584, 0.2021]}, {"w": "enough.", "b": [0.1647, 0.187, 0.2286, 0.2021]}, {"w": "We", "b": [0.2373, 0.187, 0.2635, 0.2021]}, {"w": "need", "b": [0.2698, 0.187, 0.3074, 0.2021]}, {"w": "the", "b": [0.3138, 0.187, 0.3399, 0.2021]}, {"w": "type", "b": [0.3462, 0.187, 0.3823, 0.2021]}, {"w": "of", "b": [0.3886, 0.187, 0.4038, 0.2021]}, {"w": "commerce", "b": [0.4101, 0.187, 0.4918, 0.2021]}, {"w": "in", "b": [0.4981, 0.187, 0.5138, 0.2021]}, {"w": "every", "b": [0.5201, 0.187, 0.5636, 0.2021]}, {"w": "building.", "b": [0.5699, 0.187, 0.6421, 0.2021]}, {"w": "Now", "b": [0.6508, 0.187, 0.6874, 0.2021]}, {"w": "we", "b": [0.6937, 0.187, 0.7152, 0.2021]}, {"w": "need", "b": [0.7215, 0.187, 0.7592, 0.2021]}, {"w": "labeled", "b": [0.7655, 0.187, 0.8235, 0.2021]}, {"w": "data:", "b": [0.8298, 0.187, 0.8717, 0.2021]}, {"w": "“coffee", "b": [0.1286, 0.205, 0.1824, 0.22]}, {"w": "house,”", "b": [0.1886, 0.205, 0.2481, 0.22]}, {"w": "“bank,”", "b": [0.2543, 0.205, 0.3169, 0.22]}, {"w": "“grocery,”", "b": [0.323, 0.205, 0.4043, 0.22]}, {"w": "“drug", "b": [0.4105, 0.205, 0.4566, 0.22]}, {"w": "store,”", "b": [0.4627, 0.205, 0.5161, 0.22]}, {"w": "“gas", "b": [0.5223, 0.205, 0.557, 0.22]}, {"w": "station,”", "b": [0.5632, 0.205, 0.6331, 0.22]}, {"w": "etc.", "b": [0.6392, 0.205, 0.6682, 0.22]}, {"w": "These", "b": [0.6764, 0.205, 0.7241, 0.22]}, {"w": "must", "b": [0.7303, 0.205, 0.7702, 0.22]}, {"w": "be", "b": [0.7764, 0.205, 0.7955, 0.22]}, {"w": "assigned", "b": [0.8016, 0.205, 0.8691, 0.22]}]}, {"id": "b_2", "type": "paragraph", "text": "manually, and paying someone to do that work is expensive. By the way, Google has a clever technique outsourcing the labeling to random people with its free reCAPTCHA service. reCAPTCHA thus solves two problems: reducing spam on the Web and providing cheap labeled data to Google.", "words": [{"w": "manually,", "b": [0.1312, 0.2229, 0.2102, 0.238]}, {"w": "and", "b": [0.2181, 0.2229, 0.2485, 0.238]}, {"w": "paying", "b": [0.256, 0.2229, 0.3104, 0.238]}, {"w": "someone", "b": [0.3179, 0.2229, 0.3871, 0.238]}, {"w": "to", "b": [0.3946, 0.2229, 0.4113, 0.238]}, {"w": "do", "b": [0.4189, 0.2229, 0.4388, 0.238]}, {"w": "that", "b": [0.4463, 0.2229, 0.4808, 0.238]}, {"w": "work", "b": [0.4884, 0.2229, 0.5282, 0.238]}, {"w": "is", "b": [0.5357, 0.2229, 0.5484, 0.238]}, {"w": "expensive.", "b": [0.5559, 0.2229, 0.6397, 0.238]}, {"w": "By", "b": [0.6521, 0.2229, 0.6754, 0.238]}, {"w": "the", "b": [0.6829, 0.2229, 0.7091, 0.238]}, {"w": "way,", "b": [0.7166, 0.2229, 0.7522, 0.238]}, {"w": "Google", "b": [0.7601, 0.2229, 0.8172, 0.238]}, {"w": "has", "b": [0.8248, 0.2229, 0.8521, 0.238]}, {"w": "a", "b": [0.8596, 0.2229, 0.869, 0.238]}, {"w": "clever", "b": [0.1312, 0.2411, 0.1765, 0.2559]}, {"w": "technique", "b": [0.1821, 0.2411, 0.2575, 0.2559]}, {"w": "outsourcing", "b": [0.263, 0.2411, 0.3546, 0.2559]}, {"w": "the", "b": [0.3602, 0.2411, 0.3853, 0.2559]}, {"w": "labeling", "b": [0.3909, 0.2411, 0.4527, 0.2559]}, {"w": "to", "b": [0.4583, 0.2411, 0.4743, 0.2559]}, {"w": "random", "b": [0.4799, 0.2411, 0.5402, 0.2559]}, {"w": "people", "b": [0.5458, 0.2411, 0.5966, 0.2559]}, {"w": "with", "b": [0.6021, 0.2411, 0.6373, 0.2559]}, {"w": "its", "b": [0.6429, 0.2411, 0.6621, 0.2559]}, {"w": "free", "b": [0.6676, 0.2411, 0.6964, 0.2559]}, {"w": "reCAPTCHA", "b": [0.7019, 0.2411, 0.8092, 0.2559]}, {"w": "service.", "b": [0.8148, 0.2411, 0.8727, 0.2559]}, {"w": "reCAPTCHA", "b": [0.1312, 0.2588, 0.2429, 0.2739]}, {"w": "thus", "b": [0.2497, 0.2588, 0.2849, 0.2739]}, {"w": "solves", "b": [0.2917, 0.2588, 0.339, 0.2739]}, {"w": "two", "b": [0.3458, 0.2588, 0.3751, 0.2739]}, {"w": "problems:", "b": [0.3819, 0.2588, 0.4616, 0.2739]}, {"w": "reducing", "b": [0.4711, 0.2588, 0.5413, 0.2739]}, {"w": "spam", "b": [0.5481, 0.2588, 0.5911, 0.2739]}, {"w": "on", "b": [0.5979, 0.2588, 0.6178, 0.2739]}, {"w": "the", "b": [0.6246, 0.2588, 0.6508, 0.2739]}, {"w": "Web", "b": [0.6576, 0.2588, 0.6942, 0.2739]}, {"w": "and", "b": [0.7011, 0.2588, 0.7314, 0.2739]}, {"w": "providing", "b": [0.7382, 0.2588, 0.8157, 0.2739]}, {"w": "cheap", "b": [0.8225, 0.2588, 0.8691, 0.2739]}, {"w": "labeled", "b": [0.1312, 0.2768, 0.1882, 0.2918]}, {"w": "data", "b": [0.1943, 0.2768, 0.2302, 0.2918]}, {"w": "to", "b": [0.2363, 0.2768, 0.2527, 0.2918]}, {"w": "Google.", "b": [0.2589, 0.2768, 0.32, 0.2918]}]}, {"id": "b_3", "type": "paragraph", "text": "In Figure 3, you can see the work needed to label one image. The goal here is to segment a picture by assigning labels to every pixel from the following: “heavy truck,” “car or light truck,” “boat,” “building,” “container,” “other.” Labeling image in Figure 3 took me about 30 minutes. If there were more types, for example “motorcycle,” “tree,” “road,” it would take longer, and the labeling cost would be higher.", "words": [{"w": "In", "b": [0.1312, 0.3038, 0.1481, 0.3187]}, {"w": "Figure", "b": [0.1543, 0.3038, 0.2063, 0.3187]}, {"w": "3,", "b": [0.2124, 0.3038, 0.2267, 0.3187]}, {"w": "you", "b": [0.2329, 0.3038, 0.2616, 0.3187]}, {"w": "can", "b": [0.2677, 0.3038, 0.2953, 0.3187]}, {"w": "see", "b": [0.3015, 0.3038, 0.3252, 0.3187]}, {"w": "the", "b": [0.3313, 0.3038, 0.3569, 0.3187]}, {"w": "work", "b": [0.363, 0.3038, 0.402, 0.3187]}, {"w": "needed", "b": [0.4081, 0.3038, 0.4634, 0.3187]}, {"w": "to", "b": [0.4696, 0.3038, 0.4859, 0.3187]}, {"w": "label", "b": [0.4921, 0.3038, 0.5305, 0.3187]}, {"w": "one", "b": [0.5366, 0.3038, 0.5643, 0.3187]}, {"w": "image.", "b": [0.5704, 0.3038, 0.6226, 0.3187]}, {"w": "The", "b": [0.6308, 0.3038, 0.6625, 0.3187]}, {"w": "goal", "b": [0.6687, 0.3038, 0.7014, 0.3187]}, {"w": "here", "b": [0.7076, 0.3038, 0.7414, 0.3187]}, {"w": "is", "b": [0.7476, 0.3038, 0.76, 0.3187]}, {"w": "to", "b": [0.7661, 0.3038, 0.7825, 0.3187]}, {"w": "segment", "b": [0.7886, 0.3038, 0.8537, 0.3187]}, {"w": "a", "b": [0.8599, 0.3038, 0.8691, 0.3187]}, {"w": "picture", "b": [0.1312, 0.3216, 0.1888, 0.3367]}, {"w": "by", "b": [0.1955, 0.3216, 0.2154, 0.3367]}, {"w": "assigning", "b": [0.2221, 0.3216, 0.2965, 0.3367]}, {"w": "labels", "b": [0.3032, 0.3216, 0.3498, 0.3367]}, {"w": "to", "b": [0.3565, 0.3216, 0.3732, 0.3367]}, {"w": "every", "b": [0.3799, 0.3216, 0.4234, 0.3367]}, {"w": "pixel", "b": [0.43, 0.3216, 0.4693, 0.3367]}, {"w": "from", "b": [0.4759, 0.3216, 0.5141, 0.3367]}, {"w": "the", "b": [0.5208, 0.3216, 0.547, 0.3367]}, {"w": "following:", "b": [0.5536, 0.3216, 0.6321, 0.3367]}, {"w": "“heavy", "b": [0.6413, 0.3216, 0.6978, 0.3367]}, {"w": "truck,”", "b": [0.7045, 0.3216, 0.7615, 0.3367]}, {"w": "“car", "b": [0.7683, 0.3216, 0.8023, 0.3367]}, {"w": "or", "b": [0.809, 0.3216, 0.8258, 0.3367]}, {"w": "light", "b": [0.8325, 0.3216, 0.8696, 0.3367]}, {"w": "truck,”", "b": [0.1312, 0.3396, 0.1872, 0.3546]}, {"w": "“boat,”", "b": [0.1934, 0.3396, 0.2524, 0.3546]}, {"w": "“building,”", "b": [0.2586, 0.3396, 0.3468, 0.3546]}, {"w": "“container,”", "b": [0.353, 0.3396, 0.4501, 0.3546]}, {"w": "“other.”", "b": [0.4562, 0.3396, 0.5184, 0.3546]}, {"w": "Labeling", "b": [0.5266, 0.3396, 0.5962, 0.3546]}, {"w": "image", "b": [0.6023, 0.3396, 0.6495, 0.3546]}, {"w": "in", "b": [0.6557, 0.3396, 0.6711, 0.3546]}, {"w": "Figure", "b": [0.6773, 0.3396, 0.7294, 0.3546]}, {"w": "3", "b": [0.7356, 0.3396, 0.7448, 0.3546]}, {"w": "took", "b": [0.751, 0.3396, 0.7869, 0.3546]}, {"w": "me", "b": [0.7931, 0.3396, 0.8167, 0.3546]}, {"w": "about", "b": [0.8228, 0.3396, 0.8695, 0.3546]}, {"w": "30", "b": [0.1308, 0.3577, 0.1489, 0.3725]}, {"w": "minutes.", "b": [0.1546, 0.3577, 0.2215, 0.3725]}, {"w": "If", "b": [0.2296, 0.3577, 0.2416, 0.3725]}, {"w": "there", "b": [0.2474, 0.3577, 0.2877, 0.3725]}, {"w": "were", "b": [0.2934, 0.3577, 0.3291, 0.3725]}, {"w": "more", "b": [0.3349, 0.3577, 0.3741, 0.3725]}, {"w": "types,", "b": [0.3798, 0.3577, 0.4267, 0.3725]}, {"w": "for", "b": [0.4325, 0.3577, 0.4542, 0.3725]}, {"w": "example", "b": [0.4599, 0.3577, 0.5247, 0.3725]}, {"w": "“motorcycle,”", "b": [0.5305, 0.3577, 0.6386, 0.3725]}, {"w": "“tree,”", "b": [0.6444, 0.3577, 0.6967, 0.3725]}, {"w": "“road,”", "b": [0.7025, 0.3577, 0.7598, 0.3725]}, {"w": "it", "b": [0.7656, 0.3577, 0.7777, 0.3725]}, {"w": "would", "b": [0.7835, 0.3577, 0.8302, 0.3725]}, {"w": "take", "b": [0.8359, 0.3577, 0.8691, 0.3725]}, {"w": "longer,", "b": [0.1312, 0.3755, 0.1856, 0.3905]}, {"w": "and", "b": [0.1918, 0.3755, 0.2215, 0.3905]}, {"w": "the", "b": [0.2277, 0.3755, 0.2533, 0.3905]}, {"w": "labeling", "b": [0.2595, 0.3755, 0.3225, 0.3905]}, {"w": "cost", "b": [0.3287, 0.3755, 0.3606, 0.3905]}, {"w": "would", "b": [0.3667, 0.3755, 0.4144, 0.3905]}, {"w": "be", "b": [0.4206, 0.3755, 0.4395, 0.3905]}, {"w": "higher.", "b": [0.4457, 0.3755, 0.5011, 0.3905]}]}, {"id": "b_4", "type": "paragraph", "text": "Well-designed labeling tools will minimize mouse use (including menus activated by mouse", "words": [{"w": "Well-designed", "b": [0.1303, 0.4024, 0.2422, 0.4174]}, {"w": "labeling", "b": [0.2483, 0.4024, 0.312, 0.4174]}, {"w": "tools", "b": [0.3181, 0.4024, 0.357, 0.4174]}, {"w": "will", "b": [0.3632, 0.4024, 0.3921, 0.4174]}, {"w": "minimize", "b": [0.3983, 0.4024, 0.4717, 0.4174]}, {"w": "mouse", "b": [0.4779, 0.4024, 0.5287, 0.4174]}, {"w": "use", "b": [0.5348, 0.4024, 0.5608, 0.4174]}, {"w": "(including", "b": [0.567, 0.4024, 0.6487, 0.4174]}, {"w": "menus", "b": [0.6549, 0.4024, 0.7062, 0.4174]}, {"w": "activated", "b": [0.7124, 0.4024, 0.7864, 0.4174]}, {"w": "by", "b": [0.7925, 0.4024, 0.8122, 0.4174]}, {"w": "mouse", "b": [0.8183, 0.4024, 0.8691, 0.4174]}]}, {"id": "b_5", "type": "paragraph", "text": "clicks), maximize hotkeys, and reduce costs by increasing the speed of data labeling.", "words": [{"w": "clicks),", "b": [0.1312, 0.4204, 0.1867, 0.4354]}, {"w": "maximize", "b": [0.1929, 0.4204, 0.2693, 0.4354]}, {"w": "hotkeys,", "b": [0.2754, 0.4204, 0.3417, 0.4354]}, {"w": "and", "b": [0.3478, 0.4204, 0.3775, 0.4354]}, {"w": "reduce", "b": [0.3837, 0.4204, 0.4361, 0.4354]}, {"w": "costs", "b": [0.4422, 0.4204, 0.4814, 0.4354]}, {"w": "by", "b": [0.4875, 0.4204, 0.507, 0.4354]}, {"w": "increasing", "b": [0.5132, 0.4204, 0.5934, 0.4354]}, {"w": "the", "b": [0.5995, 0.4204, 0.6251, 0.4354]}, {"w": "speed", "b": [0.6313, 0.4204, 0.676, 0.4354]}, {"w": "of", "b": [0.6822, 0.4204, 0.697, 0.4354]}, {"w": "data", "b": [0.7032, 0.4204, 0.7391, 0.4354]}, {"w": "labeling.", "b": [0.7452, 0.4204, 0.8134, 0.4354]}]}, {"id": "b_6", "type": "paragraph", "text": "Whenever possible, reduce decision-making to a yes/no answer. Instead of asking “Find all", "words": [{"w": "Whenever", "b": [0.1303, 0.4473, 0.2113, 0.4623]}, {"w": "possible,", "b": [0.2174, 0.4473, 0.2861, 0.4623]}, {"w": "reduce", "b": [0.2923, 0.4473, 0.3449, 0.4623]}, {"w": "decision-making", "b": [0.351, 0.4473, 0.4804, 0.4623]}, {"w": "to", "b": [0.4866, 0.4473, 0.5031, 0.4623]}, {"w": "a", "b": [0.5092, 0.4473, 0.5184, 0.4623]}, {"w": "yes/no", "b": [0.5246, 0.4473, 0.5783, 0.4623]}, {"w": "answer.", "b": [0.5844, 0.4473, 0.6448, 0.4623]}, {"w": "Instead", "b": [0.653, 0.4473, 0.7124, 0.4623]}, {"w": "of", "b": [0.7185, 0.4473, 0.7334, 0.4623]}, {"w": "asking", "b": [0.7396, 0.4473, 0.7907, 0.4623]}, {"w": "“Find", "b": [0.7968, 0.4473, 0.8434, 0.4623]}, {"w": "all", "b": [0.8496, 0.4473, 0.8691, 0.4623]}]}, {"id": "b_7", "type": "paragraph", "text": "prices in this text”, extract all numbers from the text and then display each number, one by one, asking, “Is this number a price?” as shown in 4. If the labeler clicks “Not Sure,” you can save this example to analyze later or simply not use such examples for training the model.", "words": [{"w": "prices", "b": [0.1312, 0.4654, 0.177, 0.4802]}, {"w": "in", "b": [0.1831, 0.4654, 0.1983, 0.4802]}, {"w": "this", "b": [0.2044, 0.4654, 0.2339, 0.4802]}, {"w": "text”,", "b": [0.24, 0.4654, 0.2856, 0.4802]}, {"w": "extract", "b": [0.2917, 0.4654, 0.3479, 0.4802]}, {"w": "all", "b": [0.3541, 0.4654, 0.3733, 0.4802]}, {"w": "numbers", "b": [0.3794, 0.4654, 0.4469, 0.4802]}, {"w": "from", "b": [0.453, 0.4654, 0.49, 0.4802]}, {"w": "the", "b": [0.4962, 0.4654, 0.5215, 0.4802]}, {"w": "text", "b": [0.5276, 0.4654, 0.5595, 0.4802]}, {"w": "and", "b": [0.5656, 0.4654, 0.595, 0.4802]}, {"w": "then", "b": [0.6011, 0.4654, 0.6365, 0.4802]}, {"w": "display", "b": [0.6427, 0.4654, 0.6985, 0.4802]}, {"w": "each", "b": [0.7046, 0.4654, 0.7395, 0.4802]}, {"w": "number,", "b": [0.7457, 0.4654, 0.811, 0.4802]}, {"w": "one", "b": [0.8171, 0.4654, 0.8445, 0.4802]}, {"w": "by", "b": [0.8506, 0.4654, 0.8698, 0.4802]}, {"w": "one,", "b": [0.1312, 0.4833, 0.1634, 0.4981]}, {"w": "asking,", "b": [0.1691, 0.4833, 0.224, 0.4981]}, {"w": "“Is", "b": [0.2297, 0.4833, 0.2519, 0.4981]}, {"w": "this", "b": [0.2576, 0.4833, 0.2868, 0.4981]}, {"w": "number", "b": [0.2925, 0.4833, 0.3523, 0.4981]}, {"w": "a", "b": [0.3579, 0.4833, 0.367, 0.4981]}, {"w": "price?”", "b": [0.3726, 0.4833, 0.4279, 0.4981]}, {"w": "as", "b": [0.4359, 0.4833, 0.4521, 0.4981]}, {"w": "shown", "b": [0.4578, 0.4833, 0.5066, 0.4981]}, {"w": "in", "b": [0.5122, 0.4833, 0.5273, 0.4981]}, {"w": "4.", "b": [0.5329, 0.4833, 0.547, 0.4981]}, {"w": "If", "b": [0.555, 0.4833, 0.5671, 0.4981]}, {"w": "the", "b": [0.5727, 0.4833, 0.5978, 0.4981]}, {"w": "labeler", "b": [0.6035, 0.4833, 0.6563, 0.4981]}, {"w": "clicks", "b": [0.6619, 0.4833, 0.7043, 0.4981]}, {"w": "“Not", "b": [0.7099, 0.4833, 0.748, 0.4981]}, {"w": "Sure,”", "b": [0.7537, 0.4833, 0.8025, 0.4981]}, {"w": "you", "b": [0.8082, 0.4833, 0.8363, 0.4981]}, {"w": "can", "b": [0.842, 0.4833, 0.8691, 0.4981]}, {"w": "save", "b": [0.1312, 0.5012, 0.1647, 0.5161]}, {"w": "this", "b": [0.1708, 0.5012, 0.2007, 0.5161]}, {"w": "example", "b": [0.2068, 0.5012, 0.273, 0.5161]}, {"w": "to", "b": [0.2791, 0.5012, 0.2955, 0.5161]}, {"w": "analyze", "b": [0.3016, 0.5012, 0.3616, 0.5161]}, {"w": "later", "b": [0.3678, 0.5012, 0.4048, 0.5161]}, {"w": "or", "b": [0.4109, 0.5012, 0.4274, 0.5161]}, {"w": "simply", "b": [0.4335, 0.5012, 0.4864, 0.5161]}, {"w": "not", "b": [0.4926, 0.5012, 0.5192, 0.5161]}, {"w": "use", "b": [0.5254, 0.5012, 0.5512, 0.5161]}, {"w": "such", "b": [0.5573, 0.5012, 0.5928, 0.5161]}, {"w": "examples", "b": [0.5989, 0.5012, 0.6724, 0.5161]}, {"w": "for", "b": [0.6785, 0.5012, 0.7006, 0.5161]}, {"w": "training", "b": [0.7068, 0.5012, 0.7704, 0.5161]}, {"w": "the", "b": [0.7766, 0.5012, 0.8022, 0.5161]}, {"w": "model.", "b": [0.8083, 0.5012, 0.8622, 0.5161]}]}, {"id": "b_8", "type": "paragraph", "text": "Another trick allowing for accelerated labeling is noisy pre-labeling consisting of pre- labeling the example using the current best model. In this scenario, you start by labeling a certain quantity of examples “from scratch” (that is, without using any support). Then you build the first model that works reasonably well, using this initial set of labeled examples. Next, use the current model and label each new example in place of the human labeler.3", "words": [{"w": "Another", "b": [0.1305, 0.528, 0.1981, 0.5431]}, {"w": "trick", "b": [0.2063, 0.528, 0.244, 0.5431]}, {"w": "allowing", "b": [0.2523, 0.528, 0.3197, 0.5431]}, {"w": "for", "b": [0.328, 0.528, 0.3505, 0.5431]}, {"w": "accelerated", "b": [0.3588, 0.528, 0.4499, 0.5431]}, {"w": "labeling", "b": [0.4581, 0.528, 0.5224, 0.5431]}, {"w": "is", "b": [0.5307, 0.528, 0.5433, 0.5431]}, {"w": "noisy", "b": [0.5514, 0.5281, 0.5993, 0.5431]}, {"w": "pre-labeling", "b": [0.6088, 0.5281, 0.7186, 0.5431]}, {"w": "consisting", "b": [0.727, 0.528, 0.8078, 0.5431]}, {"w": "of", "b": [0.816, 0.528, 0.8312, 0.5431]}, {"w": "pre-", "b": [0.8395, 0.528, 0.8719, 0.5431]}, {"w": "labeling", "b": [0.1312, 0.546, 0.1944, 0.561]}, {"w": "the", "b": [0.2005, 0.546, 0.2262, 0.561]}, {"w": "example", "b": [0.2323, 0.546, 0.2985, 0.561]}, {"w": "using", "b": [0.3046, 0.546, 0.3468, 0.561]}, {"w": "the", "b": [0.353, 0.546, 0.3786, 0.561]}, {"w": "current", "b": [0.3848, 0.546, 0.4429, 0.561]}, {"w": "best", "b": [0.449, 0.546, 0.4825, 0.561]}, {"w": "model.", "b": [0.4886, 0.546, 0.5425, 0.561]}, {"w": "In", "b": [0.5507, 0.546, 0.5676, 0.561]}, {"w": "this", "b": [0.5738, 0.546, 0.6036, 0.561]}, {"w": "scenario,", "b": [0.6098, 0.546, 0.6797, 0.561]}, {"w": "you", "b": [0.6859, 0.546, 0.7146, 0.561]}, {"w": "start", "b": [0.7207, 0.546, 0.7589, 0.561]}, {"w": "by", "b": [0.765, 0.546, 0.7845, 0.561]}, {"w": "labeling", "b": [0.7906, 0.546, 0.8538, 0.561]}, {"w": "a", "b": [0.8599, 0.546, 0.8691, 0.561]}, {"w": "certain", "b": [0.1312, 0.564, 0.1863, 0.5789]}, {"w": "quantity", "b": [0.1924, 0.564, 0.2596, 0.5789]}, {"w": "of", "b": [0.2658, 0.564, 0.2805, 0.5789]}, {"w": "examples", "b": [0.2867, 0.564, 0.3596, 0.5789]}, {"w": "“from", "b": [0.3657, 0.564, 0.4116, 0.5789]}, {"w": "scratch”", "b": [0.4177, 0.564, 0.483, 0.5789]}, {"w": "(that", "b": [0.4892, 0.564, 0.5299, 0.5789]}, {"w": "is,", "b": [0.5361, 0.564, 0.5535, 0.5789]}, {"w": "without", "b": [0.5596, 0.564, 0.6217, 0.5789]}, {"w": "using", "b": [0.6279, 0.564, 0.6697, 0.5789]}, {"w": "any", "b": [0.6759, 0.564, 0.7044, 0.5789]}, {"w": "support).", "b": [0.7105, 0.564, 0.7845, 0.5789]}, {"w": "Then", "b": [0.7927, 0.564, 0.8344, 0.5789]}, {"w": "you", "b": [0.8406, 0.564, 0.8691, 0.5789]}, {"w": "build", "b": [0.1312, 0.5818, 0.1731, 0.5969]}, {"w": "the", "b": [0.1793, 0.5818, 0.2054, 0.5969]}, {"w": "first", "b": [0.2116, 0.5818, 0.2442, 0.5969]}, {"w": "model", "b": [0.2504, 0.5818, 0.3001, 0.5969]}, {"w": "that", "b": [0.3063, 0.5818, 0.3408, 0.5969]}, {"w": "works", "b": [0.347, 0.5818, 0.3942, 0.5969]}, {"w": "reasonably", "b": [0.4004, 0.5818, 0.4879, 0.5969]}, {"w": "well,", "b": [0.4941, 0.5818, 0.5313, 0.5969]}, {"w": "using", "b": [0.5375, 0.5818, 0.5805, 0.5969]}, {"w": "this", "b": [0.5867, 0.5818, 0.6171, 0.5969]}, {"w": "initial", "b": [0.6233, 0.5818, 0.6714, 0.5969]}, {"w": "set", "b": [0.6776, 0.5818, 0.7008, 0.5969]}, {"w": "of", "b": [0.707, 0.5818, 0.7221, 0.5969]}, {"w": "labeled", "b": [0.7283, 0.5818, 0.7864, 0.5969]}, {"w": "examples.", "b": [0.7926, 0.5818, 0.8727, 0.5969]}, {"w": "Next,", "b": [0.1312, 0.5998, 0.1762, 0.6149]}, {"w": "use", "b": [0.1832, 0.5998, 0.2095, 0.6149]}, {"w": "the", "b": [0.2163, 0.5998, 0.2425, 0.6149]}, {"w": "current", "b": [0.2493, 0.5998, 0.3086, 0.6149]}, {"w": "model", "b": [0.3154, 0.5998, 0.365, 0.6149]}, {"w": "and", "b": [0.3719, 0.5998, 0.4022, 0.6149]}, {"w": "label", "b": [0.4091, 0.5998, 0.4483, 0.6149]}, {"w": "each", "b": [0.4551, 0.5998, 0.4912, 0.6149]}, {"w": "new", "b": [0.4981, 0.5998, 0.5305, 0.6149]}, {"w": "example", "b": [0.5373, 0.5998, 0.6048, 0.6149]}, {"w": "in", "b": [0.6116, 0.5998, 0.6273, 0.6149]}, {"w": "place", "b": [0.6342, 0.5998, 0.676, 0.6149]}, {"w": "of", "b": [0.6829, 0.5998, 0.698, 0.6149]}, {"w": "the", "b": [0.7049, 0.5998, 0.731, 0.6149]}, {"w": "human", "b": [0.7379, 0.5998, 0.7938, 0.6149]}, {"w": "labeler.3", "b": [0.8007, 0.598, 0.8678, 0.6149]}]}, {"id": "b_9", "type": "paragraph", "text": "Ask whether the automatically assigned label is correct. If the labeler clicks “Yes,” save this example as usual. If they click “No,” then ask to label this example manually. See the workflow chart illustrating this process in Figure 5. The goal of a good labeling process design is to make the labeling as streamlined as possible. Keeping the labeler engaged is also key. Show progress in the number of labels added, as well as the quality of the current best model. This engages the labeler and adds purpose to the labeling task.", "words": [{"w": "Ask", "b": [0.1305, 0.6177, 0.162, 0.6328]}, {"w": "whether", "b": [0.1692, 0.6177, 0.2351, 0.6328]}, {"w": "the", "b": [0.2423, 0.6177, 0.2685, 0.6328]}, {"w": "automatically", "b": [0.2756, 0.6177, 0.388, 0.6328]}, {"w": "assigned", "b": [0.3952, 0.6177, 0.4634, 0.6328]}, {"w": "label", "b": [0.4706, 0.6177, 0.5098, 0.6328]}, {"w": "is", "b": [0.5169, 0.6177, 0.5296, 0.6328]}, {"w": "correct.", "b": [0.5368, 0.6177, 0.5986, 0.6328]}, {"w": "If", "b": [0.6098, 0.6177, 0.6224, 0.6328]}, {"w": "the", "b": [0.6296, 0.6177, 0.6557, 0.6328]}, {"w": "labeler", "b": [0.6629, 0.6177, 0.7178, 0.6328]}, {"w": "clicks", "b": [0.725, 0.6177, 0.7691, 0.6328]}, {"w": "“Yes,”", "b": [0.7762, 0.6177, 0.8276, 0.6328]}, {"w": "save", "b": [0.835, 0.6177, 0.8691, 0.6328]}, {"w": "this", "b": [0.1312, 0.6357, 0.1613, 0.6507]}, {"w": "example", "b": [0.1674, 0.6357, 0.2339, 0.6507]}, {"w": "as", "b": [0.2401, 0.6357, 0.2567, 0.6507]}, {"w": "usual.", "b": [0.2628, 0.6357, 0.3104, 0.6507]}, {"w": "If", "b": [0.3186, 0.6357, 0.331, 0.6507]}, {"w": "they", "b": [0.3371, 0.6357, 0.3727, 0.6507]}, {"w": "click", "b": [0.3788, 0.6357, 0.415, 0.6507]}, {"w": "“No,”", "b": [0.4211, 0.6357, 0.467, 0.6507]}, {"w": "then", "b": [0.4731, 0.6357, 0.5092, 0.6507]}, {"w": "ask", "b": [0.5154, 0.6357, 0.5418, 0.6507]}, {"w": "to", "b": [0.5479, 0.6357, 0.5644, 0.6507]}, {"w": "label", "b": [0.5706, 0.6357, 0.6093, 0.6507]}, {"w": "this", "b": [0.6154, 0.6357, 0.6454, 0.6507]}, {"w": "example", "b": [0.6516, 0.6357, 0.7181, 0.6507]}, {"w": "manually.", "b": [0.7242, 0.6357, 0.8021, 0.6507]}, {"w": "See", "b": [0.8103, 0.6357, 0.8372, 0.6507]}, {"w": "the", "b": [0.8433, 0.6357, 0.8691, 0.6507]}, {"w": "workflow", "b": [0.1306, 0.6536, 0.2033, 0.6687]}, {"w": "chart", "b": [0.2106, 0.6536, 0.253, 0.6687]}, {"w": "illustrating", "b": [0.2603, 0.6536, 0.3504, 0.6687]}, {"w": "this", "b": [0.3577, 0.6536, 0.3881, 0.6687]}, {"w": "process", "b": [0.3954, 0.6536, 0.4548, 0.6687]}, {"w": "in", "b": [0.462, 0.6536, 0.4777, 0.6687]}, {"w": "Figure", "b": [0.485, 0.6536, 0.5381, 0.6687]}, {"w": "5.", "b": [0.5454, 0.6536, 0.56, 0.6687]}, {"w": "The", "b": [0.5716, 0.6536, 0.604, 0.6687]}, {"w": "goal", "b": [0.6113, 0.6536, 0.6448, 0.6687]}, {"w": "of", "b": [0.652, 0.6536, 0.6672, 0.6687]}, {"w": "a", "b": [0.6745, 0.6536, 0.6839, 0.6687]}, {"w": "good", "b": [0.6911, 0.6536, 0.7309, 0.6687]}, {"w": "labeling", "b": [0.7381, 0.6536, 0.8024, 0.6687]}, {"w": "process", "b": [0.8097, 0.6536, 0.8691, 0.6687]}, {"w": "design", "b": [0.1312, 0.6718, 0.1806, 0.6866]}, {"w": "is", "b": [0.1867, 0.6718, 0.1988, 0.6866]}, {"w": "to", "b": [0.2049, 0.6718, 0.221, 0.6866]}, {"w": "make", "b": [0.227, 0.6718, 0.2682, 0.6866]}, {"w": "the", "b": [0.2743, 0.6718, 0.2994, 0.6866]}, {"w": "labeling", "b": [0.3055, 0.6718, 0.3673, 0.6866]}, {"w": "as", "b": [0.3734, 0.6718, 0.3896, 0.6866]}, {"w": "streamlined", "b": [0.3956, 0.6718, 0.4872, 0.6866]}, {"w": "as", "b": [0.4933, 0.6718, 0.5095, 0.6866]}, {"w": "possible.", "b": [0.5155, 0.6718, 0.5826, 0.6866]}, {"w": "Keeping", "b": [0.5908, 0.6718, 0.6551, 0.6866]}, {"w": "the", "b": [0.6612, 0.6718, 0.6863, 0.6866]}, {"w": "labeler", "b": [0.6924, 0.6718, 0.7452, 0.6866]}, {"w": "engaged", "b": [0.7513, 0.6718, 0.8146, 0.6866]}, {"w": "is", "b": [0.8207, 0.6718, 0.8328, 0.6866]}, {"w": "also", "b": [0.8389, 0.6718, 0.8691, 0.6866]}, {"w": "key.", "b": [0.1312, 0.6896, 0.1619, 0.7046]}, {"w": "Show", "b": [0.1701, 0.6896, 0.2126, 0.7046]}, {"w": "progress", "b": [0.2187, 0.6896, 0.2846, 0.7046]}, {"w": "in", "b": [0.2907, 0.6896, 0.3061, 0.7046]}, {"w": "the", "b": [0.3122, 0.6896, 0.3378, 0.7046]}, {"w": "number", "b": [0.344, 0.6896, 0.4049, 0.7046]}, {"w": "of", "b": [0.411, 0.6896, 0.4259, 0.7046]}, {"w": "labels", "b": [0.432, 0.6896, 0.4777, 0.7046]}, {"w": "added,", "b": [0.4838, 0.6896, 0.5371, 0.7046]}, {"w": "as", "b": [0.5432, 0.6896, 0.5597, 0.7046]}, {"w": "well", "b": [0.5658, 0.6896, 0.597, 0.7046]}, {"w": "as", "b": [0.6032, 0.6896, 0.6197, 0.7046]}, {"w": "the", "b": [0.6258, 0.6896, 0.6514, 0.7046]}, {"w": "quality", "b": [0.6576, 0.6896, 0.7133, 0.7046]}, {"w": "of", "b": [0.7195, 0.6896, 0.7343, 0.7046]}, {"w": "the", "b": [0.7404, 0.6896, 0.766, 0.7046]}, {"w": "current", "b": [0.7722, 0.6896, 0.8301, 0.7046]}, {"w": "best", "b": [0.8363, 0.6896, 0.8696, 0.7046]}, {"w": "model.", "b": [0.1312, 0.7076, 0.1851, 0.7225]}, {"w": "This", "b": [0.1933, 0.7076, 0.2293, 0.7225]}, {"w": "engages", "b": [0.2354, 0.7076, 0.297, 0.7225]}, {"w": "the", "b": [0.3032, 0.7076, 0.3288, 0.7225]}, {"w": "labeler", "b": [0.335, 0.7076, 0.3889, 0.7225]}, {"w": "and", "b": [0.395, 0.7076, 0.4248, 0.7225]}, {"w": "adds", "b": [0.4309, 0.7076, 0.468, 0.7225]}, {"w": "purpose", "b": [0.4741, 0.7076, 0.5373, 0.7225]}, {"w": "to", "b": [0.5435, 0.7076, 0.5599, 0.7225]}, {"w": "the", "b": [0.566, 0.7076, 0.5917, 0.7225]}, {"w": "labeling", "b": [0.5978, 0.7076, 0.6609, 0.7225]}, {"w": "task.", "b": [0.667, 0.7076, 0.7056, 0.7225]}]}, {"id": "b_10", "type": "paragraph", "text": "3This is why it’s called a “noisy” pre-labeling: the labels assigned to examples using a sub-optimal model would not all be accurate and require a human validation.", "words": [{"w": "3This", "b": [0.1518, 0.7343, 0.1896, 0.7482]}, {"w": "is", "b": [0.1949, 0.7363, 0.2053, 0.7482]}, {"w": "why", "b": [0.2105, 0.7363, 0.238, 0.7482]}, {"w": "it’s", "b": [0.2432, 0.7363, 0.2639, 0.7482]}, {"w": "called", "b": [0.2692, 0.7363, 0.3078, 0.7482]}, {"w": "a", "b": [0.3131, 0.7363, 0.3208, 0.7482]}, {"w": "“noisy”", "b": [0.326, 0.7363, 0.3756, 0.7482]}, {"w": "pre-labeling:", "b": [0.3808, 0.7363, 0.4646, 0.7482]}, {"w": "the", "b": [0.4716, 0.7363, 0.4931, 0.7482]}, {"w": "labels", "b": [0.4983, 0.7363, 0.5366, 0.7482]}, {"w": "assigned", "b": [0.5419, 0.7363, 0.5979, 0.7482]}, {"w": "to", "b": [0.6031, 0.7363, 0.6169, 0.7482]}, {"w": "examples", "b": [0.6221, 0.7363, 0.6837, 0.7482]}, {"w": "using", "b": [0.6889, 0.7363, 0.7242, 0.7482]}, {"w": "a", "b": [0.7295, 0.7363, 0.7372, 0.7482]}, {"w": "sub-optimal", "b": [0.7424, 0.7363, 0.8224, 0.7482]}, {"w": "model", "b": [0.8277, 0.7363, 0.8685, 0.7482]}, {"w": "would", "b": [0.1307, 0.7504, 0.1712, 0.7624]}, {"w": "not", "b": [0.1764, 0.7504, 0.199, 0.7624]}, {"w": "all", "b": [0.2043, 0.7504, 0.2208, 0.7624]}, {"w": "be", "b": [0.226, 0.7504, 0.2421, 0.7624]}, {"w": "accurate", "b": [0.2474, 0.7504, 0.3049, 0.7624]}, {"w": "and", "b": [0.3101, 0.7504, 0.3353, 0.7624]}, {"w": "require", "b": [0.3406, 0.7504, 0.3881, 0.7624]}, {"w": "a", "b": [0.3933, 0.7504, 0.4011, 0.7624]}, {"w": "human", "b": [0.4063, 0.7504, 0.4529, 0.7624]}, {"w": "validation.", "b": [0.4582, 0.7504, 0.53, 0.7624]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "10", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 54, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 4: An example of simple labeling interface.", "words": [{"w": "Figure", "b": [0.2976, 0.278, 0.3497, 0.293]}, {"w": "4:", "b": [0.3558, 0.278, 0.3702, 0.293]}, {"w": "An", "b": [0.3784, 0.278, 0.4025, 0.293]}, {"w": "example", "b": [0.4086, 0.278, 0.4748, 0.293]}, {"w": "of", "b": [0.4809, 0.278, 0.4958, 0.293]}, {"w": "simple", "b": [0.5019, 0.278, 0.5533, 0.293]}, {"w": "labeling", "b": [0.5595, 0.278, 0.6225, 0.293]}, {"w": "interface.", "b": [0.6287, 0.278, 0.7026, 0.293]}]}, {"id": "b_1", "type": "equation", "text": "Figure 5: An example of noisy pre-labeling workflow.", "words": [{"w": "Figure", "b": [0.2853, 0.6991, 0.3374, 0.714]}, {"w": "5:", "b": [0.3435, 0.6991, 0.3579, 0.714]}, {"w": "An", "b": [0.3661, 0.6991, 0.3902, 0.714]}, {"w": "example", "b": [0.3963, 0.6991, 0.4625, 0.714]}, {"w": "of", "b": [0.4686, 0.6991, 0.4835, 0.714]}, {"w": "noisy", "b": [0.4896, 0.6991, 0.5313, 0.714]}, {"w": "pre-labeling", "b": [0.5374, 0.6991, 0.6323, 0.714]}, {"w": "workflow.", "b": [0.6385, 0.6991, 0.7149, 0.714]}]}, {"id": "b_2", "type": "paragraph", "text": "3.2.2 Bad Quality", "words": [{"w": "3.2.2", "b": [0.1312, 0.7523, 0.1749, 0.7673]}, {"w": "Bad", "b": [0.1961, 0.7523, 0.2333, 0.7673]}, {"w": "Quality", "b": [0.2403, 0.7523, 0.309, 0.7673]}]}, {"id": "b_3", "type": "paragraph", "text": "Remember that data quality is one of the major factors affecting the performance of the model. I cannot stress it strongly enough.", "words": [{"w": "Remember", "b": [0.1312, 0.7888, 0.2194, 0.8039]}, {"w": "that", "b": [0.2264, 0.7888, 0.2609, 0.8039]}, {"w": "data", "b": [0.2678, 0.7888, 0.3044, 0.8039]}, {"w": "quality", "b": [0.3114, 0.7888, 0.3684, 0.8039]}, {"w": "is", "b": [0.3754, 0.7888, 0.388, 0.8039]}, {"w": "one", "b": [0.395, 0.7888, 0.4233, 0.8039]}, {"w": "of", "b": [0.4302, 0.7888, 0.4454, 0.8039]}, {"w": "the", "b": [0.4523, 0.7888, 0.4785, 0.8039]}, {"w": "major", "b": [0.4855, 0.7888, 0.5336, 0.8039]}, {"w": "factors", "b": [0.5406, 0.7888, 0.5956, 0.8039]}, {"w": "affecting", "b": [0.6026, 0.7888, 0.6722, 0.8039]}, {"w": "the", "b": [0.6791, 0.7888, 0.7053, 0.8039]}, {"w": "performance", "b": [0.7122, 0.7888, 0.8138, 0.8039]}, {"w": "of", "b": [0.8208, 0.7888, 0.8359, 0.8039]}, {"w": "the", "b": [0.8429, 0.7888, 0.8691, 0.8039]}, {"w": "model.", "b": [0.1312, 0.8068, 0.1851, 0.8218]}, {"w": "I", "b": [0.1933, 0.8068, 0.1999, 0.8218]}, {"w": "cannot", "b": [0.2061, 0.8068, 0.2604, 0.8218]}, {"w": "stress", "b": [0.2666, 0.8068, 0.311, 0.8218]}, {"w": "it", "b": [0.3172, 0.8068, 0.3295, 0.8218]}, {"w": "strongly", "b": [0.3357, 0.8068, 0.4009, 0.8218]}, {"w": "enough.", "b": [0.4071, 0.8068, 0.4696, 0.8218]}]}, {"id": "b_4", "type": "paragraph", "text": "Data quality has two components: raw data quality and labeling quality.", "words": [{"w": "Data", "b": [0.1312, 0.8338, 0.171, 0.8487]}, {"w": "quality", "b": [0.1771, 0.8338, 0.233, 0.8487]}, {"w": "has", "b": [0.2391, 0.8338, 0.2659, 0.8487]}, {"w": "two", "b": [0.2721, 0.8338, 0.3008, 0.8487]}, {"w": "components:", "b": [0.3069, 0.8338, 0.4075, 0.8487]}, {"w": "raw", "b": [0.4157, 0.8338, 0.445, 0.8487]}, {"w": "data", "b": [0.4511, 0.8338, 0.487, 0.8487]}, {"w": "quality", "b": [0.4932, 0.8338, 0.549, 0.8487]}, {"w": "and", "b": [0.5552, 0.8338, 0.5849, 0.8487]}, {"w": "labeling", "b": [0.5911, 0.8338, 0.6541, 0.8487]}, {"w": "quality.", "b": [0.6603, 0.8338, 0.7198, 0.8487]}]}, {"id": "b_5", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "11", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 55, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Some common problems with raw data are noise, bias, low predictive power, outdated examples, outliers, and leakage.", "words": [{"w": "Some", "b": [0.1312, 0.0883, 0.1752, 0.1034]}, {"w": "common", "b": [0.1836, 0.0883, 0.2526, 0.1034]}, {"w": "problems", "b": [0.261, 0.0883, 0.3354, 0.1034]}, {"w": "with", "b": [0.3439, 0.0883, 0.3805, 0.1034]}, {"w": "raw", "b": [0.3889, 0.0883, 0.4188, 0.1034]}, {"w": "data", "b": [0.4272, 0.0883, 0.4638, 0.1034]}, {"w": "are", "b": [0.4722, 0.0883, 0.4974, 0.1034]}, {"w": "noise,", "b": [0.5058, 0.0883, 0.5519, 0.1034]}, {"w": "bias,", "b": [0.5609, 0.0883, 0.5987, 0.1034]}, {"w": "low", "b": [0.6077, 0.0883, 0.6354, 0.1034]}, {"w": "predictive", "b": [0.6438, 0.0883, 0.7245, 0.1034]}, {"w": "power,", "b": [0.7329, 0.0883, 0.7868, 0.1034]}, {"w": "outdated", "b": [0.7958, 0.0883, 0.869, 0.1034]}, {"w": "examples,", "b": [0.1312, 0.1063, 0.2098, 0.1213]}, {"w": "outliers,", "b": [0.2159, 0.1063, 0.2807, 0.1213]}, {"w": "and", "b": [0.2869, 0.1063, 0.3166, 0.1213]}, {"w": "leakage.", "b": [0.3227, 0.1063, 0.3868, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "3.2.3 Noise", "words": [{"w": "3.2.3", "b": [0.1312, 0.1542, 0.1749, 0.1692]}, {"w": "Noise", "b": [0.1961, 0.1542, 0.2473, 0.1692]}]}, {"id": "b_2", "type": "paragraph", "text": "Noise in data is a corruption of examples. Images can be blurry or incomplete. Text can lose formatting, which makes some words concatenated or split. Audio data can have noise in the background. Poll answers can be incomplete or have missing attributes, such as the responder’s age or gender. Noise is often a random process that corrupts each example independently of other examples in the collection.", "words": [{"w": "Noise", "b": [0.1312, 0.1908, 0.1824, 0.2057]}, {"w": "in", "b": [0.1887, 0.1906, 0.2044, 0.2058]}, {"w": "data", "b": [0.2107, 0.1906, 0.2473, 0.2058]}, {"w": "is", "b": [0.2536, 0.1906, 0.2662, 0.2058]}, {"w": "a", "b": [0.2725, 0.1906, 0.2819, 0.2058]}, {"w": "corruption", "b": [0.2882, 0.1906, 0.374, 0.2058]}, {"w": "of", "b": [0.3803, 0.1906, 0.3955, 0.2058]}, {"w": "examples.", "b": [0.4018, 0.1906, 0.4819, 0.2058]}, {"w": "Images", "b": [0.4905, 0.1906, 0.5476, 0.2058]}, {"w": "can", "b": [0.5538, 0.1906, 0.5821, 0.2058]}, {"w": "be", "b": [0.5884, 0.1906, 0.6077, 0.2058]}, {"w": "blurry", "b": [0.614, 0.1906, 0.6648, 0.2058]}, {"w": "or", "b": [0.6711, 0.1906, 0.6879, 0.2058]}, {"w": "incomplete.", "b": [0.6941, 0.1906, 0.7883, 0.2058]}, {"w": "Text", "b": [0.7969, 0.1906, 0.8345, 0.2058]}, {"w": "can", "b": [0.8408, 0.1906, 0.8691, 0.2058]}, {"w": "lose", "b": [0.1312, 0.2087, 0.1612, 0.2237]}, {"w": "formatting,", "b": [0.1673, 0.2087, 0.2584, 0.2237]}, {"w": "which", "b": [0.2645, 0.2087, 0.3113, 0.2237]}, {"w": "makes", "b": [0.3175, 0.2087, 0.3669, 0.2237]}, {"w": "some", "b": [0.3731, 0.2087, 0.4133, 0.2237]}, {"w": "words", "b": [0.4194, 0.2087, 0.4664, 0.2237]}, {"w": "concatenated", "b": [0.4725, 0.2087, 0.5785, 0.2237]}, {"w": "or", "b": [0.5846, 0.2087, 0.6011, 0.2237]}, {"w": "split.", "b": [0.6072, 0.2087, 0.6475, 0.2237]}, {"w": "Audio", "b": [0.6557, 0.2087, 0.704, 0.2237]}, {"w": "data", "b": [0.7101, 0.2087, 0.7461, 0.2237]}, {"w": "can", "b": [0.7523, 0.2087, 0.7801, 0.2237]}, {"w": "have", "b": [0.7862, 0.2087, 0.8227, 0.2237]}, {"w": "noise", "b": [0.8289, 0.2087, 0.8691, 0.2237]}, {"w": "in", "b": [0.1312, 0.2266, 0.1468, 0.2416]}, {"w": "the", "b": [0.153, 0.2266, 0.1789, 0.2416]}, {"w": "background.", "b": [0.1851, 0.2266, 0.2848, 0.2416]}, {"w": "Poll", "b": [0.293, 0.2266, 0.325, 0.2416]}, {"w": "answers", "b": [0.3311, 0.2266, 0.3942, 0.2416]}, {"w": "can", "b": [0.4004, 0.2266, 0.4284, 0.2416]}, {"w": "be", "b": [0.4345, 0.2266, 0.4538, 0.2416]}, {"w": "incomplete", "b": [0.4599, 0.2266, 0.5482, 0.2416]}, {"w": "or", "b": [0.5543, 0.2266, 0.571, 0.2416]}, {"w": "have", "b": [0.5771, 0.2266, 0.614, 0.2416]}, {"w": "missing", "b": [0.6202, 0.2266, 0.6806, 0.2416]}, {"w": "attributes,", "b": [0.6867, 0.2266, 0.7721, 0.2416]}, {"w": "such", "b": [0.7782, 0.2266, 0.8142, 0.2416]}, {"w": "as", "b": [0.8203, 0.2266, 0.837, 0.2416]}, {"w": "the", "b": [0.8432, 0.2266, 0.8692, 0.2416]}, {"w": "responder’s", "b": [0.1312, 0.2445, 0.2241, 0.2596]}, {"w": "age", "b": [0.2318, 0.2445, 0.259, 0.2596]}, {"w": "or", "b": [0.2667, 0.2445, 0.2835, 0.2596]}, {"w": "gender.", "b": [0.2912, 0.2445, 0.3508, 0.2596]}, {"w": "Noise", "b": [0.3636, 0.2445, 0.4082, 0.2596]}, {"w": "is", "b": [0.4159, 0.2445, 0.4285, 0.2596]}, {"w": "often", "b": [0.4362, 0.2445, 0.4775, 0.2596]}, {"w": "a", "b": [0.4852, 0.2445, 0.4946, 0.2596]}, {"w": "random", "b": [0.5023, 0.2445, 0.5651, 0.2596]}, {"w": "process", "b": [0.5728, 0.2445, 0.6321, 0.2596]}, {"w": "that", "b": [0.6398, 0.2445, 0.6743, 0.2596]}, {"w": "corrupts", "b": [0.682, 0.2445, 0.7502, 0.2596]}, {"w": "each", "b": [0.7579, 0.2445, 0.794, 0.2596]}, {"w": "example", "b": [0.8017, 0.2445, 0.8691, 0.2596]}, {"w": "independently", "b": [0.1312, 0.2626, 0.2446, 0.2775]}, {"w": "of", "b": [0.2507, 0.2626, 0.2656, 0.2775]}, {"w": "other", "b": [0.2717, 0.2626, 0.3138, 0.2775]}, {"w": "examples", "b": [0.32, 0.2626, 0.3934, 0.2775]}, {"w": "in", "b": [0.3996, 0.2626, 0.4149, 0.2775]}, {"w": "the", "b": [0.4211, 0.2626, 0.4468, 0.2775]}, {"w": "collection.", "b": [0.4529, 0.2626, 0.5339, 0.2775]}]}, {"id": "b_3", "type": "paragraph", "text": "If tidy data has missing attributes, data imputation techniques can help in guessing values for those attributes. We will consider data imputation techniques in Section 3.7.1.", "words": [{"w": "If", "b": [0.1312, 0.2896, 0.1433, 0.3044]}, {"w": "tidy", "b": [0.1492, 0.2896, 0.1808, 0.3044]}, {"w": "data", "b": [0.1867, 0.2896, 0.2219, 0.3044]}, {"w": "has", "b": [0.2278, 0.2896, 0.254, 0.3044]}, {"w": "missing", "b": [0.2599, 0.2896, 0.3184, 0.3044]}, {"w": "attributes,", "b": [0.3243, 0.2896, 0.4068, 0.3044]}, {"w": "data", "b": [0.4126, 0.2895, 0.4533, 0.3044]}, {"w": "imputation", "b": [0.4601, 0.2895, 0.5623, 0.3044]}, {"w": "techniques", "b": [0.5683, 0.2896, 0.6508, 0.3044]}, {"w": "can", "b": [0.6567, 0.2896, 0.6838, 0.3044]}, {"w": "help", "b": [0.6897, 0.2896, 0.7229, 0.3044]}, {"w": "in", "b": [0.7288, 0.2896, 0.7438, 0.3044]}, {"w": "guessing", "b": [0.7497, 0.2896, 0.8152, 0.3044]}, {"w": "values", "b": [0.8211, 0.2896, 0.869, 0.3044]}, {"w": "for", "b": [0.1312, 0.3074, 0.1533, 0.3224]}, {"w": "those", "b": [0.1595, 0.3074, 0.2016, 0.3224]}, {"w": "attributes.", "b": [0.2078, 0.3074, 0.292, 0.3224]}, {"w": "We", "b": [0.3002, 0.3074, 0.3259, 0.3224]}, {"w": "will", "b": [0.332, 0.3074, 0.3607, 0.3224]}, {"w": "consider", "b": [0.3669, 0.3074, 0.4327, 0.3224]}, {"w": "data", "b": [0.4388, 0.3074, 0.4747, 0.3224]}, {"w": "imputation", "b": [0.4809, 0.3074, 0.5701, 0.3224]}, {"w": "techniques", "b": [0.5762, 0.3074, 0.6604, 0.3224]}, {"w": "in", "b": [0.6666, 0.3074, 0.682, 0.3224]}, {"w": "Section", "b": [0.6881, 0.3074, 0.7466, 0.3224]}, {"w": "3.7.1.", "b": [0.7527, 0.3074, 0.7958, 0.3224]}]}, {"id": "b_4", "type": "paragraph", "text": "Blurred images can be deblurred using specific image deblurring algorithms, though deep machine learning models, such as neural networks, can learn to deblur if needed. The same can be said about noise in audio data: it can be algorithmically suppressed.", "words": [{"w": "Blurred", "b": [0.1312, 0.3342, 0.1938, 0.3493]}, {"w": "images", "b": [0.2003, 0.3342, 0.2558, 0.3493]}, {"w": "can", "b": [0.2623, 0.3342, 0.2905, 0.3493]}, {"w": "be", "b": [0.297, 0.3342, 0.3163, 0.3493]}, {"w": "deblurred", "b": [0.3228, 0.3342, 0.4014, 0.3493]}, {"w": "using", "b": [0.4078, 0.3342, 0.4508, 0.3493]}, {"w": "specific", "b": [0.4573, 0.3342, 0.5165, 0.3493]}, {"w": "image", "b": [0.5229, 0.3342, 0.571, 0.3493]}, {"w": "deblurring", "b": [0.5775, 0.3342, 0.6623, 0.3493]}, {"w": "algorithms,", "b": [0.6688, 0.3342, 0.761, 0.3493]}, {"w": "though", "b": [0.7675, 0.3342, 0.825, 0.3493]}, {"w": "deep", "b": [0.8315, 0.3342, 0.8692, 0.3493]}, {"w": "machine", "b": [0.1312, 0.3523, 0.1974, 0.3672]}, {"w": "learning", "b": [0.2036, 0.3523, 0.2683, 0.3672]}, {"w": "models,", "b": [0.2744, 0.3523, 0.3356, 0.3672]}, {"w": "such", "b": [0.3417, 0.3523, 0.3773, 0.3672]}, {"w": "as", "b": [0.3834, 0.3523, 0.3999, 0.3672]}, {"w": "neural", "b": [0.406, 0.3523, 0.4564, 0.3672]}, {"w": "networks,", "b": [0.4625, 0.3523, 0.5391, 0.3672]}, {"w": "can", "b": [0.5453, 0.3523, 0.573, 0.3672]}, {"w": "learn", "b": [0.5791, 0.3523, 0.6192, 0.3672]}, {"w": "to", "b": [0.6253, 0.3523, 0.6418, 0.3672]}, {"w": "deblur", "b": [0.6479, 0.3523, 0.6993, 0.3672]}, {"w": "if", "b": [0.7054, 0.3523, 0.7162, 0.3672]}, {"w": "needed.", "b": [0.7223, 0.3523, 0.7829, 0.3672]}, {"w": "The", "b": [0.7911, 0.3523, 0.8229, 0.3672]}, {"w": "same", "b": [0.829, 0.3523, 0.8691, 0.3672]}, {"w": "can", "b": [0.1312, 0.3702, 0.1589, 0.3852]}, {"w": "be", "b": [0.1651, 0.3702, 0.1841, 0.3852]}, {"w": "said", "b": [0.1902, 0.3702, 0.2221, 0.3852]}, {"w": "about", "b": [0.2282, 0.3702, 0.2749, 0.3852]}, {"w": "noise", "b": [0.2811, 0.3702, 0.3211, 0.3852]}, {"w": "in", "b": [0.3273, 0.3702, 0.3427, 0.3852]}, {"w": "audio", "b": [0.3488, 0.3702, 0.3929, 0.3852]}, {"w": "data:", "b": [0.3991, 0.3702, 0.4401, 0.3852]}, {"w": "it", "b": [0.4483, 0.3702, 0.4606, 0.3852]}, {"w": "can", "b": [0.4668, 0.3702, 0.4944, 0.3852]}, {"w": "be", "b": [0.5006, 0.3702, 0.5196, 0.3852]}, {"w": "algorithmically", "b": [0.5257, 0.3702, 0.6462, 0.3852]}, {"w": "suppressed.", "b": [0.6524, 0.3702, 0.7441, 0.3852]}]}, {"id": "b_5", "type": "paragraph", "text": "Noise is more a problem when the dataset is relatively small (thousands of examples or less), because the presence of noise can lead to overfitting: the algorithm may learn to model the noise contained in the training data, which is undesirable. In the big data context, on the other hand, noise, if it’s randomly applied to each example independently of other examples in the dataset, is typically “averaged out” over multiple examples. In that latter context, noise can bring a regularization effect as it prevents the learning algorithm from relying too much on a small subset of input features.4", "words": [{"w": "Noise", "b": [0.1312, 0.3973, 0.1742, 0.4121]}, {"w": "is", "b": [0.1803, 0.3973, 0.1925, 0.4121]}, {"w": "more", "b": [0.1987, 0.3973, 0.238, 0.4121]}, {"w": "a", "b": [0.2441, 0.3973, 0.2532, 0.4121]}, {"w": "problem", "b": [0.2593, 0.3973, 0.3239, 0.4121]}, {"w": "when", "b": [0.3301, 0.3973, 0.3714, 0.4121]}, {"w": "the", "b": [0.3775, 0.3973, 0.4027, 0.4121]}, {"w": "dataset", "b": [0.4089, 0.3973, 0.4664, 0.4121]}, {"w": "is", "b": [0.4725, 0.3973, 0.4848, 0.4121]}, {"w": "relatively", "b": [0.4909, 0.3973, 0.564, 0.4121]}, {"w": "small", "b": [0.5702, 0.3973, 0.6116, 0.4121]}, {"w": "(thousands", "b": [0.6177, 0.3973, 0.7046, 0.4121]}, {"w": "of", "b": [0.7108, 0.3973, 0.7254, 0.4121]}, {"w": "examples", "b": [0.7315, 0.3973, 0.8037, 0.4121]}, {"w": "or", "b": [0.8098, 0.3973, 0.826, 0.4121]}, {"w": "less),", "b": [0.8321, 0.3973, 0.8717, 0.4121]}, {"w": "because", "b": [0.1312, 0.4152, 0.1922, 0.43]}, {"w": "the", "b": [0.1982, 0.4152, 0.2233, 0.43]}, {"w": "presence", "b": [0.2293, 0.4152, 0.2958, 0.43]}, {"w": "of", "b": [0.3018, 0.4152, 0.3164, 0.43]}, {"w": "noise", "b": [0.3224, 0.4152, 0.3617, 0.43]}, {"w": "can", "b": [0.3677, 0.4152, 0.3949, 0.43]}, {"w": "lead", "b": [0.4009, 0.4152, 0.433, 0.43]}, {"w": "to", "b": [0.4391, 0.4152, 0.4551, 0.43]}, {"w": "overfitting:", "b": [0.4609, 0.4151, 0.5618, 0.4301]}, {"w": "the", "b": [0.57, 0.4152, 0.5951, 0.43]}, {"w": "algorithm", "b": [0.6011, 0.4152, 0.6775, 0.43]}, {"w": "may", "b": [0.6835, 0.4152, 0.7166, 0.43]}, {"w": "learn", "b": [0.7226, 0.4152, 0.7619, 0.43]}, {"w": "to", "b": [0.7679, 0.4152, 0.784, 0.43]}, {"w": "model", "b": [0.79, 0.4152, 0.8377, 0.43]}, {"w": "the", "b": [0.8437, 0.4152, 0.8689, 0.43]}, {"w": "noise", "b": [0.1312, 0.4329, 0.1721, 0.448]}, {"w": "contained", "b": [0.1783, 0.4329, 0.2572, 0.448]}, {"w": "in", "b": [0.2633, 0.4329, 0.279, 0.448]}, {"w": "the", "b": [0.2851, 0.4329, 0.3113, 0.448]}, {"w": "training", "b": [0.3174, 0.4329, 0.3822, 0.448]}, {"w": "data,", "b": [0.3884, 0.4329, 0.4302, 0.448]}, {"w": "which", "b": [0.4363, 0.4329, 0.4839, 0.448]}, {"w": "is", "b": [0.49, 0.4329, 0.5027, 0.448]}, {"w": "undesirable.", "b": [0.5088, 0.4329, 0.6072, 0.448]}, {"w": "In", "b": [0.6154, 0.4329, 0.6327, 0.448]}, {"w": "the", "b": [0.6388, 0.4329, 0.6649, 0.448]}, {"w": "big", "b": [0.6711, 0.4329, 0.6962, 0.448]}, {"w": "data", "b": [0.7023, 0.4329, 0.7389, 0.448]}, {"w": "context,", "b": [0.745, 0.4329, 0.8109, 0.448]}, {"w": "on", "b": [0.817, 0.4329, 0.8369, 0.448]}, {"w": "the", "b": [0.843, 0.4329, 0.8691, 0.448]}, {"w": "other", "b": [0.1312, 0.4511, 0.1729, 0.4659]}, {"w": "hand,", "b": [0.1791, 0.4511, 0.2237, 0.4659]}, {"w": "noise,", "b": [0.2299, 0.4511, 0.2747, 0.4659]}, {"w": "if", "b": [0.2808, 0.4511, 0.2915, 0.4659]}, {"w": "it’s", "b": [0.2977, 0.4511, 0.3221, 0.4659]}, {"w": "randomly", "b": [0.3283, 0.4511, 0.404, 0.4659]}, {"w": "applied", "b": [0.4101, 0.4511, 0.468, 0.4659]}, {"w": "to", "b": [0.4742, 0.4511, 0.4904, 0.4659]}, {"w": "each", "b": [0.4965, 0.4511, 0.5316, 0.4659]}, {"w": "example", "b": [0.5377, 0.4511, 0.6032, 0.4659]}, {"w": "independently", "b": [0.6094, 0.4511, 0.7216, 0.4659]}, {"w": "of", "b": [0.7277, 0.4511, 0.7425, 0.4659]}, {"w": "other", "b": [0.7486, 0.4511, 0.7903, 0.4659]}, {"w": "examples", "b": [0.7965, 0.4511, 0.8691, 0.4659]}, {"w": "in", "b": [0.1312, 0.4688, 0.1469, 0.4839]}, {"w": "the", "b": [0.1536, 0.4688, 0.1797, 0.4839]}, {"w": "dataset,", "b": [0.1863, 0.4688, 0.2513, 0.4839]}, {"w": "is", "b": [0.258, 0.4688, 0.2707, 0.4839]}, {"w": "typically", "b": [0.2773, 0.4688, 0.3479, 0.4839]}, {"w": "“averaged", "b": [0.3546, 0.4688, 0.4352, 0.4839]}, {"w": "out”", "b": [0.4418, 0.4688, 0.4779, 0.4839]}, {"w": "over", "b": [0.4845, 0.4688, 0.5186, 0.4839]}, {"w": "multiple", "b": [0.5252, 0.4688, 0.5927, 0.4839]}, {"w": "examples.", "b": [0.5993, 0.4688, 0.6794, 0.4839]}, {"w": "In", "b": [0.6891, 0.4688, 0.7063, 0.4839]}, {"w": "that", "b": [0.7129, 0.4688, 0.7475, 0.4839]}, {"w": "latter", "b": [0.7541, 0.4688, 0.7991, 0.4839]}, {"w": "context,", "b": [0.8058, 0.4688, 0.8717, 0.4839]}, {"w": "noise", "b": [0.1312, 0.4869, 0.1711, 0.5018]}, {"w": "can", "b": [0.1773, 0.4869, 0.2048, 0.5018]}, {"w": "bring", "b": [0.211, 0.4869, 0.2528, 0.5018]}, {"w": "a", "b": [0.259, 0.4869, 0.2681, 0.5018]}, {"w": "regularization", "b": [0.2743, 0.4869, 0.3845, 0.5018]}, {"w": "effect", "b": [0.3907, 0.4869, 0.433, 0.5018]}, {"w": "as", "b": [0.4391, 0.4869, 0.4555, 0.5018]}, {"w": "it", "b": [0.4617, 0.4869, 0.4739, 0.5018]}, {"w": "prevents", "b": [0.4801, 0.4869, 0.547, 0.5018]}, {"w": "the", "b": [0.5532, 0.4869, 0.5787, 0.5018]}, {"w": "learning", "b": [0.5849, 0.4869, 0.6491, 0.5018]}, {"w": "algorithm", "b": [0.6553, 0.4869, 0.7328, 0.5018]}, {"w": "from", "b": [0.739, 0.4869, 0.7762, 0.5018]}, {"w": "relying", "b": [0.7824, 0.4869, 0.837, 0.5018]}, {"w": "too", "b": [0.8431, 0.4869, 0.8691, 0.5018]}, {"w": "much", "b": [0.1312, 0.5048, 0.1743, 0.5198]}, {"w": "on", "b": [0.1805, 0.5048, 0.1999, 0.5198]}, {"w": "a", "b": [0.2061, 0.5048, 0.2153, 0.5198]}, {"w": "small", "b": [0.2215, 0.5048, 0.2636, 0.5198]}, {"w": "subset", "b": [0.2698, 0.5048, 0.3202, 0.5198]}, {"w": "of", "b": [0.3264, 0.5048, 0.3412, 0.5198]}, {"w": "input", "b": [0.3474, 0.5048, 0.3905, 0.5198]}, {"w": "features.4", "b": [0.3966, 0.5029, 0.4722, 0.5198]}]}, {"id": "b_6", "type": "paragraph", "text": "3.2.4 Bias", "words": [{"w": "3.2.4", "b": [0.1312, 0.5527, 0.1749, 0.5677]}, {"w": "Bias", "b": [0.1961, 0.5527, 0.2358, 0.5677]}]}, {"id": "b_7", "type": "paragraph", "text": "Bias in data is an inconsistency with the phenomenon that data represents. This inconsistency may occur for a number of reasons (which are not mutually exclusive).", "words": [{"w": "Bias", "b": [0.1312, 0.5893, 0.1709, 0.6042]}, {"w": "in", "b": [0.1754, 0.5894, 0.1905, 0.6042]}, {"w": "data", "b": [0.1949, 0.5894, 0.2301, 0.6042]}, {"w": "is", "b": [0.2346, 0.5894, 0.2467, 0.6042]}, {"w": "an", "b": [0.2512, 0.5894, 0.2703, 0.6042]}, {"w": "inconsistency", "b": [0.2748, 0.5894, 0.379, 0.6042]}, {"w": "with", "b": [0.3835, 0.5894, 0.4186, 0.6042]}, {"w": "the", "b": [0.4231, 0.5894, 0.4483, 0.6042]}, {"w": "phenomenon", "b": [0.4527, 0.5894, 0.5522, 0.6042]}, {"w": "that", "b": [0.5567, 0.5894, 0.5898, 0.6042]}, {"w": "data", "b": [0.5943, 0.5894, 0.6295, 0.6042]}, {"w": "represents.", "b": [0.634, 0.5894, 0.7182, 0.6042]}, {"w": "This", "b": [0.7258, 0.5894, 0.7611, 0.6042]}, {"w": "inconsistency", "b": [0.7656, 0.5894, 0.8698, 0.6042]}, {"w": "may", "b": [0.1312, 0.6072, 0.1651, 0.6222]}, {"w": "occur", "b": [0.1712, 0.6072, 0.2148, 0.6222]}, {"w": "for", "b": [0.221, 0.6072, 0.2431, 0.6222]}, {"w": "a", "b": [0.2493, 0.6072, 0.2585, 0.6222]}, {"w": "number", "b": [0.2646, 0.6072, 0.3257, 0.6222]}, {"w": "of", "b": [0.3318, 0.6072, 0.3467, 0.6222]}, {"w": "reasons", "b": [0.3529, 0.6072, 0.4116, 0.6222]}, {"w": "(which", "b": [0.4177, 0.6072, 0.4716, 0.6222]}, {"w": "are", "b": [0.4777, 0.6072, 0.5024, 0.6222]}, {"w": "not", "b": [0.5085, 0.6072, 0.5352, 0.6222]}, {"w": "mutually", "b": [0.5413, 0.6072, 0.6131, 0.6222]}, {"w": "exclusive).", "b": [0.6193, 0.6072, 0.703, 0.6222]}]}, {"id": "b_8", "type": "paragraph", "text": "Types of Bias", "words": [{"w": "Types", "b": [0.1312, 0.6318, 0.1967, 0.6498]}, {"w": "of", "b": [0.205, 0.6318, 0.2251, 0.6498]}, {"w": "Bias", "b": [0.2334, 0.6318, 0.28, 0.6498]}]}, {"id": "b_9", "type": "paragraph", "text": "Selection bias is the tendency to skew your choice of data sources to those that are easily available, convenient, and/or cost-effective. For example, you might want to know the opinion of the readers on your new book. You decide to send several initial chapters to the mailing list of your previous book’s readers. It’s very likely this select group will like your new book. However, this information doesn’t tell you much about a general reader.", "words": [{"w": "Selection", "b": [0.1312, 0.6611, 0.2143, 0.676]}, {"w": "bias", "b": [0.2214, 0.6611, 0.2578, 0.676]}, {"w": "is", "b": [0.2639, 0.6611, 0.2763, 0.676]}, {"w": "the", "b": [0.2825, 0.6611, 0.3081, 0.676]}, {"w": "tendency", "b": [0.3143, 0.6611, 0.3866, 0.676]}, {"w": "to", "b": [0.3928, 0.6611, 0.4092, 0.676]}, {"w": "skew", "b": [0.4153, 0.6611, 0.4533, 0.676]}, {"w": "your", "b": [0.4595, 0.6611, 0.4954, 0.676]}, {"w": "choice", "b": [0.5016, 0.6611, 0.5503, 0.676]}, {"w": "of", "b": [0.5565, 0.6611, 0.5713, 0.676]}, {"w": "data", "b": [0.5775, 0.6611, 0.6134, 0.676]}, {"w": "sources", "b": [0.6195, 0.6611, 0.6772, 0.676]}, {"w": "to", "b": [0.6834, 0.6611, 0.6998, 0.676]}, {"w": "those", "b": [0.7059, 0.6611, 0.7481, 0.676]}, {"w": "that", "b": [0.7542, 0.6611, 0.7881, 0.676]}, {"w": "are", "b": [0.7942, 0.6611, 0.8189, 0.676]}, {"w": "easily", "b": [0.825, 0.6611, 0.8698, 0.676]}, {"w": "available,", "b": [0.1312, 0.6791, 0.2046, 0.6939]}, {"w": "convenient,", "b": [0.21, 0.6791, 0.2985, 0.6939]}, {"w": "and/or", "b": [0.3039, 0.6791, 0.3582, 0.6939]}, {"w": "cost-effective.", "b": [0.3635, 0.6791, 0.4697, 0.6939]}, {"w": "For", "b": [0.4776, 0.6791, 0.504, 0.6939]}, {"w": "example,", "b": [0.5093, 0.6791, 0.5791, 0.6939]}, {"w": "you", "b": [0.5846, 0.6791, 0.6127, 0.6939]}, {"w": "might", "b": [0.618, 0.6791, 0.6637, 0.6939]}, {"w": "want", "b": [0.669, 0.6791, 0.7072, 0.6939]}, {"w": "to", "b": [0.7125, 0.6791, 0.7286, 0.6939]}, {"w": "know", "b": [0.7338, 0.6791, 0.775, 0.6939]}, {"w": "the", "b": [0.7803, 0.6791, 0.8055, 0.6939]}, {"w": "opinion", "b": [0.8108, 0.6791, 0.8691, 0.6939]}, {"w": "of", "b": [0.1312, 0.6969, 0.1462, 0.7119]}, {"w": "the", "b": [0.1523, 0.6969, 0.1781, 0.7119]}, {"w": "readers", "b": [0.1842, 0.6969, 0.2421, 0.7119]}, {"w": "on", "b": [0.2482, 0.6969, 0.2678, 0.7119]}, {"w": "your", "b": [0.2739, 0.6969, 0.31, 0.7119]}, {"w": "new", "b": [0.3162, 0.6969, 0.3481, 0.7119]}, {"w": "book.", "b": [0.3542, 0.6969, 0.399, 0.7119]}, {"w": "You", "b": [0.4072, 0.6969, 0.4391, 0.7119]}, {"w": "decide", "b": [0.4453, 0.6969, 0.4957, 0.7119]}, {"w": "to", "b": [0.5019, 0.6969, 0.5183, 0.7119]}, {"w": "send", "b": [0.5245, 0.6969, 0.5606, 0.7119]}, {"w": "several", "b": [0.5668, 0.6969, 0.6215, 0.7119]}, {"w": "initial", "b": [0.6277, 0.6969, 0.675, 0.7119]}, {"w": "chapters", "b": [0.6812, 0.6969, 0.7488, 0.7119]}, {"w": "to", "b": [0.7549, 0.6969, 0.7714, 0.7119]}, {"w": "the", "b": [0.7775, 0.6969, 0.8033, 0.7119]}, {"w": "mailing", "b": [0.8094, 0.6969, 0.8691, 0.7119]}, {"w": "list", "b": [0.1312, 0.715, 0.1556, 0.7298]}, {"w": "of", "b": [0.1618, 0.715, 0.1764, 0.7298]}, {"w": "your", "b": [0.1826, 0.715, 0.218, 0.7298]}, {"w": "previous", "b": [0.2242, 0.715, 0.2906, 0.7298]}, {"w": "book’s", "b": [0.2968, 0.715, 0.348, 0.7298]}, {"w": "readers.", "b": [0.3541, 0.715, 0.4161, 0.7298]}, {"w": "It’s", "b": [0.4243, 0.715, 0.4502, 0.7298]}, {"w": "very", "b": [0.4563, 0.715, 0.4903, 0.7298]}, {"w": "likely", "b": [0.4964, 0.715, 0.5384, 0.7298]}, {"w": "this", "b": [0.5446, 0.715, 0.574, 0.7298]}, {"w": "select", "b": [0.5802, 0.715, 0.6238, 0.7298]}, {"w": "group", "b": [0.6299, 0.715, 0.6755, 0.7298]}, {"w": "will", "b": [0.6816, 0.715, 0.71, 0.7298]}, {"w": "like", "b": [0.7161, 0.715, 0.7435, 0.7298]}, {"w": "your", "b": [0.7496, 0.715, 0.785, 0.7298]}, {"w": "new", "b": [0.7912, 0.715, 0.8226, 0.7298]}, {"w": "book.", "b": [0.8287, 0.715, 0.8727, 0.7298]}, {"w": "However,", "b": [0.1312, 0.7328, 0.2046, 0.7478]}, {"w": "this", "b": [0.2107, 0.7328, 0.2406, 0.7478]}, {"w": "information", "b": [0.2467, 0.7328, 0.3406, 0.7478]}, {"w": "doesn’t", "b": [0.3468, 0.7328, 0.4048, 0.7478]}, {"w": "tell", "b": [0.411, 0.7328, 0.4366, 0.7478]}, {"w": "you", "b": [0.4427, 0.7328, 0.4715, 0.7478]}, {"w": "much", "b": [0.4776, 0.7328, 0.5207, 0.7478]}, {"w": "about", "b": [0.5268, 0.7328, 0.5735, 0.7478]}, {"w": "a", "b": [0.5796, 0.7328, 0.5889, 0.7478]}, {"w": "general", "b": [0.595, 0.7328, 0.6525, 0.7478]}, {"w": "reader.", "b": [0.6586, 0.7328, 0.7141, 0.7478]}]}, {"id": "b_10", "type": "paragraph", "text": "A real-life example of selection bias is an image generated by the Photo Upsampling via Latent Space Exploration (PULSE) algorithm that uses a neural network model to upscale (increase the resolution) of images. When Internet users tested it, they discovered that an", "words": [{"w": "A", "b": [0.1305, 0.7596, 0.1446, 0.7747]}, {"w": "real-life", "b": [0.1518, 0.7596, 0.213, 0.7747]}, {"w": "example", "b": [0.2201, 0.7596, 0.2876, 0.7747]}, {"w": "of", "b": [0.2947, 0.7596, 0.3099, 0.7747]}, {"w": "selection", "b": [0.317, 0.7596, 0.3872, 0.7747]}, {"w": "bias", "b": [0.3943, 0.7596, 0.4269, 0.7747]}, {"w": "is", "b": [0.434, 0.7596, 0.4467, 0.7747]}, {"w": "an", "b": [0.4538, 0.7596, 0.4736, 0.7747]}, {"w": "image", "b": [0.4808, 0.7596, 0.5289, 0.7747]}, {"w": "generated", "b": [0.536, 0.7596, 0.6156, 0.7747]}, {"w": "by", "b": [0.6227, 0.7596, 0.6426, 0.7747]}, {"w": "the", "b": [0.6497, 0.7596, 0.6758, 0.7747]}, {"w": "Photo", "b": [0.683, 0.7596, 0.7324, 0.7747]}, {"w": "Upsampling", "b": [0.7395, 0.7596, 0.8374, 0.7747]}, {"w": "via", "b": [0.8445, 0.7596, 0.8691, 0.7747]}, {"w": "Latent", "b": [0.1312, 0.7778, 0.1838, 0.7926]}, {"w": "Space", "b": [0.1899, 0.7778, 0.2356, 0.7926]}, {"w": "Exploration", "b": [0.2417, 0.7778, 0.3359, 0.7926]}, {"w": "(PULSE)", "b": [0.3421, 0.7777, 0.4255, 0.7927]}, {"w": "algorithm", "b": [0.4316, 0.7778, 0.5088, 0.7926]}, {"w": "that", "b": [0.515, 0.7778, 0.5484, 0.7926]}, {"w": "uses", "b": [0.5546, 0.7778, 0.5873, 0.7926]}, {"w": "a", "b": [0.5934, 0.7778, 0.6026, 0.7926]}, {"w": "neural", "b": [0.6087, 0.7778, 0.6585, 0.7926]}, {"w": "network", "b": [0.6646, 0.7778, 0.7281, 0.7926]}, {"w": "model", "b": [0.7342, 0.7778, 0.7825, 0.7926]}, {"w": "to", "b": [0.7886, 0.7778, 0.8048, 0.7926]}, {"w": "upscale", "b": [0.811, 0.7778, 0.8689, 0.7926]}, {"w": "(increase", "b": [0.1291, 0.7956, 0.2012, 0.8106]}, {"w": "the", "b": [0.2074, 0.7956, 0.2334, 0.8106]}, {"w": "resolution)", "b": [0.2396, 0.7956, 0.3274, 0.8106]}, {"w": "of", "b": [0.3335, 0.7956, 0.3486, 0.8106]}, {"w": "images.", "b": [0.3548, 0.7956, 0.4154, 0.8106]}, {"w": "When", "b": [0.4236, 0.7956, 0.4721, 0.8106]}, {"w": "Internet", "b": [0.4782, 0.7956, 0.544, 0.8106]}, {"w": "users", "b": [0.5501, 0.7956, 0.5911, 0.8106]}, {"w": "tested", "b": [0.5972, 0.7956, 0.6464, 0.8106]}, {"w": "it,", "b": [0.6525, 0.7956, 0.6702, 0.8106]}, {"w": "they", "b": [0.6764, 0.7956, 0.7124, 0.8106]}, {"w": "discovered", "b": [0.7185, 0.7956, 0.8027, 0.8106]}, {"w": "that", "b": [0.8088, 0.7956, 0.8432, 0.8106]}, {"w": "an", "b": [0.8494, 0.7956, 0.8692, 0.8106]}]}, {"id": "b_11", "type": "paragraph", "text": "4This is, by the way, the rationale behind the increase in performance brought by the dropout regularization technique in deep learning.", "words": [{"w": "4This", "b": [0.1518, 0.8232, 0.1894, 0.8371]}, {"w": "is,", "b": [0.1929, 0.8252, 0.2075, 0.8371]}, {"w": "by", "b": [0.2114, 0.8252, 0.2276, 0.8371]}, {"w": "the", "b": [0.2311, 0.8252, 0.2524, 0.8371]}, {"w": "way,", "b": [0.2559, 0.8252, 0.2849, 0.8371]}, {"w": "the", "b": [0.2887, 0.8252, 0.3101, 0.8371]}, {"w": "rationale", "b": [0.3136, 0.8252, 0.3724, 0.8371]}, {"w": "behind", "b": [0.3759, 0.8252, 0.4216, 0.8371]}, {"w": "the", "b": [0.4251, 0.8252, 0.4464, 0.8371]}, {"w": "increase", "b": [0.4499, 0.8252, 0.503, 0.8371]}, {"w": "in", "b": [0.5065, 0.8252, 0.5193, 0.8371]}, {"w": "performance", "b": [0.5228, 0.8252, 0.6056, 0.8371]}, {"w": "brought", "b": [0.6091, 0.8252, 0.6616, 0.8371]}, {"w": "by", "b": [0.6651, 0.8252, 0.6813, 0.8371]}, {"w": "the", "b": [0.6848, 0.8252, 0.7061, 0.8371]}, {"w": "dropout", "b": [0.7098, 0.8251, 0.7731, 0.8371]}, {"w": "regularization", "b": [0.7765, 0.8252, 0.8687, 0.8371]}, {"w": "technique", "b": [0.1312, 0.8393, 0.1966, 0.8513]}, {"w": "in", "b": [0.2018, 0.8393, 0.2148, 0.8513]}, {"w": "deep", "b": [0.2201, 0.8393, 0.2568, 0.8513]}, {"w": "learning.", "b": [0.2628, 0.8393, 0.331, 0.8513]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "12", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 56, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "upscaled image of a black person could, in some cases, represent a white person, as illustrated by Barack Obama’s upscaled photo shown in Figure 6.", "words": [{"w": "upscaled", "b": [0.1312, 0.0885, 0.1987, 0.1033]}, {"w": "image", "b": [0.2042, 0.0885, 0.2504, 0.1033]}, {"w": "of", "b": [0.256, 0.0885, 0.2706, 0.1033]}, {"w": "a", "b": [0.2761, 0.0885, 0.2851, 0.1033]}, {"w": "black", "b": [0.2907, 0.0885, 0.3319, 0.1033]}, {"w": "person", "b": [0.3374, 0.0885, 0.3893, 0.1033]}, {"w": "could,", "b": [0.3949, 0.0885, 0.4421, 0.1033]}, {"w": "in", "b": [0.4478, 0.0885, 0.4629, 0.1033]}, {"w": "some", "b": [0.4684, 0.0885, 0.5077, 0.1033]}, {"w": "cases,", "b": [0.5132, 0.0885, 0.5577, 0.1033]}, {"w": "represent", "b": [0.5633, 0.0885, 0.6354, 0.1033]}, {"w": "a", "b": [0.6409, 0.0885, 0.65, 0.1033]}, {"w": "white", "b": [0.6555, 0.0885, 0.6987, 0.1033]}, {"w": "person,", "b": [0.7043, 0.0885, 0.7612, 0.1033]}, {"w": "as", "b": [0.7669, 0.0885, 0.7831, 0.1033]}, {"w": "illustrated", "b": [0.7886, 0.0885, 0.8692, 0.1033]}, {"w": "by", "b": [0.1312, 0.1063, 0.1507, 0.1213]}, {"w": "Barack", "b": [0.1569, 0.1063, 0.2131, 0.1213]}, {"w": "Obama’s", "b": [0.2192, 0.1063, 0.29, 0.1213]}, {"w": "upscaled", "b": [0.2962, 0.1063, 0.365, 0.1213]}, {"w": "photo", "b": [0.3712, 0.1063, 0.4173, 0.1213]}, {"w": "shown", "b": [0.4235, 0.1063, 0.4733, 0.1213]}, {"w": "in", "b": [0.4794, 0.1063, 0.4948, 0.1213]}, {"w": "Figure", "b": [0.501, 0.1063, 0.5531, 0.1213]}, {"w": "6.", "b": [0.5592, 0.1063, 0.5736, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "Figure 6: An illustration of the effect the selection bias can have on the trained model. Image: Twitter / @Chicken3gg.", "words": [{"w": "Figure", "b": [0.1312, 0.3614, 0.1823, 0.3762]}, {"w": "6:", "b": [0.1877, 0.3614, 0.2017, 0.3762]}, {"w": "An", "b": [0.2095, 0.3614, 0.2332, 0.3762]}, {"w": "illustration", "b": [0.2385, 0.3614, 0.3251, 0.3762]}, {"w": "of", "b": [0.3305, 0.3614, 0.3451, 0.3762]}, {"w": "the", "b": [0.3504, 0.3614, 0.3756, 0.3762]}, {"w": "effect", "b": [0.3809, 0.3614, 0.4227, 0.3762]}, {"w": "the", "b": [0.428, 0.3614, 0.4532, 0.3762]}, {"w": "selection", "b": [0.4585, 0.3614, 0.526, 0.3762]}, {"w": "bias", "b": [0.5314, 0.3614, 0.5626, 0.3762]}, {"w": "can", "b": [0.568, 0.3614, 0.5951, 0.3762]}, {"w": "have", "b": [0.6005, 0.3614, 0.6362, 0.3762]}, {"w": "on", "b": [0.6415, 0.3614, 0.6606, 0.3762]}, {"w": "the", "b": [0.666, 0.3614, 0.6911, 0.3762]}, {"w": "trained", "b": [0.6965, 0.3614, 0.7529, 0.3762]}, {"w": "model.", "b": [0.7582, 0.3614, 0.811, 0.3762]}, {"w": "Image:", "b": [0.8189, 0.3614, 0.8717, 0.3762]}, {"w": "Twitter", "b": [0.1306, 0.3792, 0.1906, 0.3942]}, {"w": "/", "b": [0.1967, 0.3792, 0.206, 0.3942]}, {"w": "@Chicken3gg.", "b": [0.2121, 0.3792, 0.3234, 0.3942]}]}, {"id": "b_2", "type": "paragraph", "text": "The above example shows that it cannot be assumed that machine learning model is correct, simply because machine learning algorithms are impartial and the trained models are based on data. If the data has a bias, it will most likely be reflected in the model.", "words": [{"w": "The", "b": [0.1306, 0.4296, 0.1619, 0.4444]}, {"w": "above", "b": [0.1681, 0.4296, 0.2135, 0.4444]}, {"w": "example", "b": [0.2197, 0.4296, 0.2848, 0.4444]}, {"w": "shows", "b": [0.291, 0.4296, 0.3371, 0.4444]}, {"w": "that", "b": [0.3433, 0.4296, 0.3766, 0.4444]}, {"w": "it", "b": [0.3828, 0.4296, 0.3949, 0.4444]}, {"w": "cannot", "b": [0.4011, 0.4296, 0.4546, 0.4444]}, {"w": "be", "b": [0.4608, 0.4296, 0.4795, 0.4444]}, {"w": "assumed", "b": [0.4857, 0.4296, 0.5526, 0.4444]}, {"w": "that", "b": [0.5587, 0.4296, 0.592, 0.4444]}, {"w": "machine", "b": [0.5982, 0.4296, 0.6634, 0.4444]}, {"w": "learning", "b": [0.6695, 0.4296, 0.7332, 0.4444]}, {"w": "model", "b": [0.7394, 0.4296, 0.7874, 0.4444]}, {"w": "is", "b": [0.7935, 0.4296, 0.8058, 0.4444]}, {"w": "correct,", "b": [0.8119, 0.4296, 0.8717, 0.4444]}, {"w": "simply", "b": [0.1312, 0.4475, 0.1838, 0.4624]}, {"w": "because", "b": [0.19, 0.4475, 0.2517, 0.4624]}, {"w": "machine", "b": [0.2579, 0.4475, 0.3236, 0.4624]}, {"w": "learning", "b": [0.3297, 0.4475, 0.394, 0.4624]}, {"w": "algorithms", "b": [0.4001, 0.4475, 0.4849, 0.4624]}, {"w": "are", "b": [0.491, 0.4475, 0.5155, 0.4624]}, {"w": "impartial", "b": [0.5216, 0.4475, 0.5951, 0.4624]}, {"w": "and", "b": [0.6012, 0.4475, 0.6307, 0.4624]}, {"w": "the", "b": [0.6369, 0.4475, 0.6623, 0.4624]}, {"w": "trained", "b": [0.6685, 0.4475, 0.7256, 0.4624]}, {"w": "models", "b": [0.7317, 0.4475, 0.7874, 0.4624]}, {"w": "are", "b": [0.7935, 0.4475, 0.818, 0.4624]}, {"w": "based", "b": [0.8241, 0.4475, 0.8691, 0.4624]}, {"w": "on", "b": [0.1312, 0.4654, 0.1507, 0.4803]}, {"w": "data.", "b": [0.1569, 0.4654, 0.1979, 0.4803]}, {"w": "If", "b": [0.2061, 0.4654, 0.2184, 0.4803]}, {"w": "the", "b": [0.2245, 0.4654, 0.2502, 0.4803]}, {"w": "data", "b": [0.2563, 0.4654, 0.2922, 0.4803]}, {"w": "has", "b": [0.2983, 0.4654, 0.3251, 0.4803]}, {"w": "a", "b": [0.3313, 0.4654, 0.3405, 0.4803]}, {"w": "bias,", "b": [0.3466, 0.4654, 0.3837, 0.4803]}, {"w": "it", "b": [0.3898, 0.4654, 0.4021, 0.4803]}, {"w": "will", "b": [0.4083, 0.4654, 0.437, 0.4803]}, {"w": "most", "b": [0.4431, 0.4654, 0.4822, 0.4803]}, {"w": "likely", "b": [0.4883, 0.4654, 0.5309, 0.4803]}, {"w": "be", "b": [0.5371, 0.4654, 0.556, 0.4803]}, {"w": "reflected", "b": [0.5622, 0.4654, 0.6299, 0.4803]}, {"w": "in", "b": [0.6361, 0.4654, 0.6515, 0.4803]}, {"w": "the", "b": [0.6576, 0.4654, 0.6833, 0.4803]}, {"w": "model.", "b": [0.6894, 0.4654, 0.7433, 0.4803]}]}, {"id": "b_3", "type": "paragraph", "text": "Self-selection bias is a form of selection bias where you get the data from sources that “volunteered” to provide it. Most poll data has this type of bias. For example, you want to", "words": [{"w": "Self-selection", "b": [0.1312, 0.4923, 0.2519, 0.5073]}, {"w": "bias", "b": [0.26, 0.4923, 0.2963, 0.5073]}, {"w": "is", "b": [0.3033, 0.4922, 0.316, 0.5073]}, {"w": "a", "b": [0.323, 0.4922, 0.3324, 0.5073]}, {"w": "form", "b": [0.3394, 0.4922, 0.3776, 0.5073]}, {"w": "of", "b": [0.3846, 0.4922, 0.3998, 0.5073]}, {"w": "selection", "b": [0.4068, 0.4922, 0.477, 0.5073]}, {"w": "bias", "b": [0.484, 0.4922, 0.5165, 0.5073]}, {"w": "where", "b": [0.5236, 0.4922, 0.5717, 0.5073]}, {"w": "you", "b": [0.5787, 0.4922, 0.608, 0.5073]}, {"w": "get", "b": [0.615, 0.4922, 0.6401, 0.5073]}, {"w": "the", "b": [0.6471, 0.4922, 0.6733, 0.5073]}, {"w": "data", "b": [0.6803, 0.4922, 0.7169, 0.5073]}, {"w": "from", "b": [0.7239, 0.4922, 0.7621, 0.5073]}, {"w": "sources", "b": [0.7691, 0.4922, 0.828, 0.5073]}, {"w": "that", "b": [0.835, 0.4922, 0.8695, 0.5073]}, {"w": "“volunteered”", "b": [0.1286, 0.5102, 0.2391, 0.5252]}, {"w": "to", "b": [0.2453, 0.5102, 0.2617, 0.5252]}, {"w": "provide", "b": [0.2679, 0.5102, 0.3275, 0.5252]}, {"w": "it.", "b": [0.3337, 0.5102, 0.3511, 0.5252]}, {"w": "Most", "b": [0.3594, 0.5102, 0.4, 0.5252]}, {"w": "poll", "b": [0.4062, 0.5102, 0.4365, 0.5252]}, {"w": "data", "b": [0.4427, 0.5102, 0.4786, 0.5252]}, {"w": "has", "b": [0.4848, 0.5102, 0.5116, 0.5252]}, {"w": "this", "b": [0.5177, 0.5102, 0.5477, 0.5252]}, {"w": "type", "b": [0.5538, 0.5102, 0.5893, 0.5252]}, {"w": "of", "b": [0.5954, 0.5102, 0.6103, 0.5252]}, {"w": "bias.", "b": [0.6165, 0.5102, 0.6536, 0.5252]}, {"w": "For", "b": [0.6618, 0.5102, 0.6888, 0.5252]}, {"w": "example,", "b": [0.695, 0.5102, 0.7664, 0.5252]}, {"w": "you", "b": [0.7725, 0.5102, 0.8013, 0.5252]}, {"w": "want", "b": [0.8074, 0.5102, 0.8465, 0.5252]}, {"w": "to", "b": [0.8526, 0.5102, 0.8691, 0.5252]}]}, {"id": "b_4", "type": "paragraph", "text": "train a model that predicts the behavior of successful entrepreneurs. You decide to first ask entrepreneurs whether they are successful or not. Then you only keep the data obtained from those who declared themselves successful. The problem here is that most likely, really successful entrepreneurs don’t have time to answer your questions, while those who claim themselves successful can be wrong on that matter.", "words": [{"w": "train", "b": [0.1312, 0.5282, 0.1701, 0.5432]}, {"w": "a", "b": [0.1762, 0.5282, 0.1854, 0.5432]}, {"w": "model", "b": [0.1916, 0.5282, 0.24, 0.5432]}, {"w": "that", "b": [0.2462, 0.5282, 0.2799, 0.5432]}, {"w": "predicts", "b": [0.286, 0.5282, 0.3494, 0.5432]}, {"w": "the", "b": [0.3556, 0.5282, 0.3811, 0.5432]}, {"w": "behavior", "b": [0.3873, 0.5282, 0.4562, 0.5432]}, {"w": "of", "b": [0.4624, 0.5282, 0.4772, 0.5432]}, {"w": "successful", "b": [0.4833, 0.5282, 0.5607, 0.5432]}, {"w": "entrepreneurs.", "b": [0.5669, 0.5282, 0.6809, 0.5432]}, {"w": "You", "b": [0.6892, 0.5282, 0.7208, 0.5432]}, {"w": "decide", "b": [0.7269, 0.5282, 0.777, 0.5432]}, {"w": "to", "b": [0.7831, 0.5282, 0.7994, 0.5432]}, {"w": "first", "b": [0.8056, 0.5282, 0.8374, 0.5432]}, {"w": "ask", "b": [0.8436, 0.5282, 0.8697, 0.5432]}, {"w": "entrepreneurs", "b": [0.1312, 0.546, 0.2429, 0.5611]}, {"w": "whether", "b": [0.2498, 0.546, 0.3158, 0.5611]}, {"w": "they", "b": [0.3226, 0.546, 0.3587, 0.5611]}, {"w": "are", "b": [0.3656, 0.546, 0.3908, 0.5611]}, {"w": "successful", "b": [0.3976, 0.546, 0.4769, 0.5611]}, {"w": "or", "b": [0.4838, 0.546, 0.5006, 0.5611]}, {"w": "not.", "b": [0.5075, 0.546, 0.5399, 0.5611]}, {"w": "Then", "b": [0.5502, 0.546, 0.5931, 0.5611]}, {"w": "you", "b": [0.6, 0.546, 0.6293, 0.5611]}, {"w": "only", "b": [0.6362, 0.546, 0.6712, 0.5611]}, {"w": "keep", "b": [0.6781, 0.546, 0.7147, 0.5611]}, {"w": "the", "b": [0.7216, 0.546, 0.7477, 0.5611]}, {"w": "data", "b": [0.7546, 0.546, 0.7912, 0.5611]}, {"w": "obtained", "b": [0.7981, 0.546, 0.8692, 0.5611]}, {"w": "from", "b": [0.1312, 0.5641, 0.1687, 0.5791]}, {"w": "those", "b": [0.1749, 0.5641, 0.2171, 0.5791]}, {"w": "who", "b": [0.2232, 0.5641, 0.2561, 0.5791]}, {"w": "declared", "b": [0.2622, 0.5641, 0.329, 0.5791]}, {"w": "themselves", "b": [0.3352, 0.5641, 0.4216, 0.5791]}, {"w": "successful.", "b": [0.4278, 0.5641, 0.5108, 0.5791]}, {"w": "The", "b": [0.519, 0.5641, 0.5508, 0.5791]}, {"w": "problem", "b": [0.5569, 0.5641, 0.6227, 0.5791]}, {"w": "here", "b": [0.6288, 0.5641, 0.6628, 0.5791]}, {"w": "is", "b": [0.6689, 0.5641, 0.6813, 0.5791]}, {"w": "that", "b": [0.6875, 0.5641, 0.7214, 0.5791]}, {"w": "most", "b": [0.7275, 0.5641, 0.7666, 0.5791]}, {"w": "likely,", "b": [0.7728, 0.5641, 0.819, 0.5791]}, {"w": "really", "b": [0.8251, 0.5641, 0.8698, 0.5791]}, {"w": "successful", "b": [0.1312, 0.5819, 0.2106, 0.597]}, {"w": "entrepreneurs", "b": [0.2169, 0.5819, 0.3286, 0.597]}, {"w": "don’t", "b": [0.335, 0.5819, 0.3778, 0.597]}, {"w": "have", "b": [0.3842, 0.5819, 0.4213, 0.597]}, {"w": "time", "b": [0.4277, 0.5819, 0.4643, 0.597]}, {"w": "to", "b": [0.4706, 0.5819, 0.4874, 0.597]}, {"w": "answer", "b": [0.4937, 0.5819, 0.5498, 0.597]}, {"w": "your", "b": [0.5562, 0.5819, 0.5928, 0.597]}, {"w": "questions,", "b": [0.5992, 0.5819, 0.6805, 0.597]}, {"w": "while", "b": [0.6869, 0.5819, 0.7298, 0.597]}, {"w": "those", "b": [0.7361, 0.5819, 0.7791, 0.597]}, {"w": "who", "b": [0.7854, 0.5819, 0.8189, 0.597]}, {"w": "claim", "b": [0.8253, 0.5819, 0.8692, 0.597]}, {"w": "themselves", "b": [0.1312, 0.6, 0.2176, 0.615]}, {"w": "successful", "b": [0.2237, 0.6, 0.3015, 0.615]}, {"w": "can", "b": [0.3077, 0.6, 0.3354, 0.615]}, {"w": "be", "b": [0.3415, 0.6, 0.3605, 0.615]}, {"w": "wrong", "b": [0.3666, 0.6, 0.4159, 0.615]}, {"w": "on", "b": [0.422, 0.6, 0.4415, 0.615]}, {"w": "that", "b": [0.4477, 0.6, 0.4815, 0.615]}, {"w": "matter.", "b": [0.4877, 0.6, 0.5472, 0.615]}]}, {"id": "b_5", "type": "paragraph", "text": "Here’s another example. Let’s say, you want to train a model that predicts whether a book will be liked by the readers. You can use the rating users gave to similar books in the past. However, it turns out that unhappy users tend to provide disproportionally low ratings. The data will be biased towards too many very low ratings as compared to the quantity of mid-range ratings, as shown in Figure 7. The bias is compounded by the fact that we tend to rate only when the experience was either very good or very bad.", "words": [{"w": "Here’s", "b": [0.1312, 0.6269, 0.1812, 0.6419]}, {"w": "another", "b": [0.1873, 0.6269, 0.249, 0.6419]}, {"w": "example.", "b": [0.2551, 0.6269, 0.3265, 0.6419]}, {"w": "Let’s", "b": [0.3347, 0.6269, 0.374, 0.6419]}, {"w": "say,", "b": [0.3802, 0.6269, 0.4095, 0.6419]}, {"w": "you", "b": [0.4157, 0.6269, 0.4444, 0.6419]}, {"w": "want", "b": [0.4506, 0.6269, 0.4896, 0.6419]}, {"w": "to", "b": [0.4957, 0.6269, 0.5121, 0.6419]}, {"w": "train", "b": [0.5183, 0.6269, 0.5574, 0.6419]}, {"w": "a", "b": [0.5635, 0.6269, 0.5727, 0.6419]}, {"w": "model", "b": [0.5789, 0.6269, 0.6276, 0.6419]}, {"w": "that", "b": [0.6338, 0.6269, 0.6677, 0.6419]}, {"w": "predicts", "b": [0.6738, 0.6269, 0.7376, 0.6419]}, {"w": "whether", "b": [0.7438, 0.6269, 0.8085, 0.6419]}, {"w": "a", "b": [0.8146, 0.6269, 0.8239, 0.6419]}, {"w": "book", "b": [0.83, 0.6269, 0.8696, 0.6419]}, {"w": "will", "b": [0.1306, 0.6448, 0.1594, 0.6598]}, {"w": "be", "b": [0.1656, 0.6448, 0.1847, 0.6598]}, {"w": "liked", "b": [0.1908, 0.6448, 0.2289, 0.6598]}, {"w": "by", "b": [0.2351, 0.6448, 0.2547, 0.6598]}, {"w": "the", "b": [0.2609, 0.6448, 0.2866, 0.6598]}, {"w": "readers.", "b": [0.2928, 0.6448, 0.3559, 0.6598]}, {"w": "You", "b": [0.3641, 0.6448, 0.3961, 0.6598]}, {"w": "can", "b": [0.4022, 0.6448, 0.4301, 0.6598]}, {"w": "use", "b": [0.4362, 0.6448, 0.4621, 0.6598]}, {"w": "the", "b": [0.4682, 0.6448, 0.494, 0.6598]}, {"w": "rating", "b": [0.5002, 0.6448, 0.5487, 0.6598]}, {"w": "users", "b": [0.5548, 0.6448, 0.5953, 0.6598]}, {"w": "gave", "b": [0.6014, 0.6448, 0.637, 0.6598]}, {"w": "to", "b": [0.6432, 0.6448, 0.6597, 0.6598]}, {"w": "similar", "b": [0.6658, 0.6448, 0.7206, 0.6598]}, {"w": "books", "b": [0.7267, 0.6448, 0.7737, 0.6598]}, {"w": "in", "b": [0.7799, 0.6448, 0.7954, 0.6598]}, {"w": "the", "b": [0.8015, 0.6448, 0.8273, 0.6598]}, {"w": "past.", "b": [0.8334, 0.6448, 0.8727, 0.6598]}, {"w": "However,", "b": [0.1312, 0.6627, 0.2061, 0.6778]}, {"w": "it", "b": [0.2142, 0.6627, 0.2268, 0.6778]}, {"w": "turns", "b": [0.2345, 0.6627, 0.2775, 0.6778]}, {"w": "out", "b": [0.2853, 0.6627, 0.3124, 0.6778]}, {"w": "that", "b": [0.3202, 0.6627, 0.3547, 0.6778]}, {"w": "unhappy", "b": [0.3624, 0.6627, 0.4335, 0.6778]}, {"w": "users", "b": [0.4413, 0.6627, 0.4823, 0.6778]}, {"w": "tend", "b": [0.4901, 0.6627, 0.5267, 0.6778]}, {"w": "to", "b": [0.5344, 0.6627, 0.5511, 0.6778]}, {"w": "provide", "b": [0.5588, 0.6627, 0.6196, 0.6778]}, {"w": "disproportionally", "b": [0.6273, 0.6627, 0.7677, 0.6778]}, {"w": "low", "b": [0.7754, 0.6627, 0.8031, 0.6778]}, {"w": "ratings.", "b": [0.8108, 0.6627, 0.8727, 0.6778]}, {"w": "The", "b": [0.1306, 0.6807, 0.1626, 0.6957]}, {"w": "data", "b": [0.1688, 0.6807, 0.2049, 0.6957]}, {"w": "will", "b": [0.2111, 0.6807, 0.24, 0.6957]}, {"w": "be", "b": [0.2462, 0.6807, 0.2653, 0.6957]}, {"w": "biased", "b": [0.2715, 0.6807, 0.3222, 0.6957]}, {"w": "towards", "b": [0.3284, 0.6807, 0.3916, 0.6957]}, {"w": "too", "b": [0.3978, 0.6807, 0.4241, 0.6957]}, {"w": "many", "b": [0.4303, 0.6807, 0.4747, 0.6957]}, {"w": "very", "b": [0.4809, 0.6807, 0.5156, 0.6957]}, {"w": "low", "b": [0.5217, 0.6807, 0.5491, 0.6957]}, {"w": "ratings", "b": [0.5553, 0.6807, 0.6112, 0.6957]}, {"w": "as", "b": [0.6174, 0.6807, 0.634, 0.6957]}, {"w": "compared", "b": [0.6402, 0.6807, 0.7188, 0.6957]}, {"w": "to", "b": [0.725, 0.6807, 0.7415, 0.6957]}, {"w": "the", "b": [0.7476, 0.6807, 0.7735, 0.6957]}, {"w": "quantity", "b": [0.7797, 0.6807, 0.8479, 0.6957]}, {"w": "of", "b": [0.854, 0.6807, 0.869, 0.6957]}, {"w": "mid-range", "b": [0.1312, 0.6987, 0.2127, 0.7137]}, {"w": "ratings,", "b": [0.2188, 0.6987, 0.2798, 0.7137]}, {"w": "as", "b": [0.286, 0.6987, 0.3026, 0.7137]}, {"w": "shown", "b": [0.3087, 0.6987, 0.3588, 0.7137]}, {"w": "in", "b": [0.3649, 0.6987, 0.3804, 0.7137]}, {"w": "Figure", "b": [0.3865, 0.6987, 0.4389, 0.7137]}, {"w": "7.", "b": [0.4451, 0.6987, 0.4595, 0.7137]}, {"w": "The", "b": [0.4677, 0.6987, 0.4997, 0.7137]}, {"w": "bias", "b": [0.5058, 0.6987, 0.5379, 0.7137]}, {"w": "is", "b": [0.544, 0.6987, 0.5565, 0.7137]}, {"w": "compounded", "b": [0.5626, 0.6987, 0.6652, 0.7137]}, {"w": "by", "b": [0.6713, 0.6987, 0.6909, 0.7137]}, {"w": "the", "b": [0.6971, 0.6987, 0.7229, 0.7137]}, {"w": "fact", "b": [0.729, 0.6987, 0.7594, 0.7137]}, {"w": "that", "b": [0.7656, 0.6987, 0.7996, 0.7137]}, {"w": "we", "b": [0.8057, 0.6987, 0.8269, 0.7137]}, {"w": "tend", "b": [0.833, 0.6987, 0.8691, 0.7137]}, {"w": "to", "b": [0.1312, 0.7167, 0.1476, 0.7316]}, {"w": "rate", "b": [0.1538, 0.7167, 0.1856, 0.7316]}, {"w": "only", "b": [0.1918, 0.7167, 0.2261, 0.7316]}, {"w": "when", "b": [0.2323, 0.7167, 0.2743, 0.7316]}, {"w": "the", "b": [0.2805, 0.7167, 0.3061, 0.7316]}, {"w": "experience", "b": [0.3123, 0.7167, 0.3964, 0.7316]}, {"w": "was", "b": [0.4026, 0.7167, 0.4319, 0.7316]}, {"w": "either", "b": [0.4381, 0.7167, 0.4843, 0.7316]}, {"w": "very", "b": [0.4904, 0.7167, 0.5248, 0.7316]}, {"w": "good", "b": [0.531, 0.7167, 0.5699, 0.7316]}, {"w": "or", "b": [0.5761, 0.7167, 0.5925, 0.7316]}, {"w": "very", "b": [0.5987, 0.7167, 0.6331, 0.7316]}, {"w": "bad.", "b": [0.6393, 0.7167, 0.6741, 0.7316]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "13", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 57, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 7: The distribution of ratings given by the readers to a popular AI book on Amazon.", "words": [{"w": "Figure", "b": [0.1312, 0.3377, 0.1826, 0.3525]}, {"w": "7:", "b": [0.1888, 0.3377, 0.2029, 0.3525]}, {"w": "The", "b": [0.2111, 0.3377, 0.2425, 0.3525]}, {"w": "distribution", "b": [0.2486, 0.3377, 0.3418, 0.3525]}, {"w": "of", "b": [0.3479, 0.3377, 0.3626, 0.3525]}, {"w": "ratings", "b": [0.3687, 0.3377, 0.4235, 0.3525]}, {"w": "given", "b": [0.4296, 0.3377, 0.4711, 0.3525]}, {"w": "by", "b": [0.4772, 0.3377, 0.4965, 0.3525]}, {"w": "the", "b": [0.5026, 0.3377, 0.5279, 0.3525]}, {"w": "readers", "b": [0.534, 0.3377, 0.5909, 0.3525]}, {"w": "to", "b": [0.597, 0.3377, 0.6132, 0.3525]}, {"w": "a", "b": [0.6194, 0.3377, 0.6284, 0.3525]}, {"w": "popular", "b": [0.6346, 0.3377, 0.6958, 0.3525]}, {"w": "AI", "b": [0.702, 0.3377, 0.7222, 0.3525]}, {"w": "book", "b": [0.7283, 0.3377, 0.7673, 0.3525]}, {"w": "on", "b": [0.7734, 0.3377, 0.7926, 0.3525]}, {"w": "Amazon.", "b": [0.7988, 0.3377, 0.869, 0.3525]}]}, {"id": "b_1", "type": "paragraph", "text": "Omitted variable bias happens when your featurized data doesn’t have a feature necessary for accurate prediction. For example, let’s assume that you are working on a churn prediction model and you want to predict whether a customer cancels their subscription within six months. You train a model, and it’s accurate enough; however, several weeks after deployment you see many unexpected false negatives. You investigate the decreased model performance and discover a new competitor now offers a very similar service for a lower price. This feature wasn’t initially available to your model, therefore important information for accurate prediction was missing.", "words": [{"w": "Omitted", "b": [0.1312, 0.3851, 0.2088, 0.4]}, {"w": "variable", "b": [0.215, 0.3851, 0.2877, 0.4]}, {"w": "bias", "b": [0.294, 0.3851, 0.3304, 0.4]}, {"w": "happens", "b": [0.3358, 0.3852, 0.4007, 0.4]}, {"w": "when", "b": [0.4061, 0.3852, 0.4473, 0.4]}, {"w": "your", "b": [0.4528, 0.3852, 0.488, 0.4]}, {"w": "featurized", "b": [0.4934, 0.3852, 0.5714, 0.4]}, {"w": "data", "b": [0.5768, 0.3852, 0.612, 0.4]}, {"w": "doesn’t", "b": [0.6174, 0.3852, 0.6743, 0.4]}, {"w": "have", "b": [0.6798, 0.3852, 0.7154, 0.4]}, {"w": "a", "b": [0.7209, 0.3852, 0.7299, 0.4]}, {"w": "feature", "b": [0.7353, 0.3852, 0.7902, 0.4]}, {"w": "necessary", "b": [0.7956, 0.3852, 0.8698, 0.4]}, {"w": "for", "b": [0.1312, 0.4031, 0.1529, 0.4179]}, {"w": "accurate", "b": [0.1585, 0.4031, 0.2249, 0.4179]}, {"w": "prediction.", "b": [0.2305, 0.4031, 0.3149, 0.4179]}, {"w": "For", "b": [0.3229, 0.4031, 0.3493, 0.4179]}, {"w": "example,", "b": [0.3549, 0.4031, 0.4248, 0.4179]}, {"w": "let’s", "b": [0.4305, 0.4031, 0.4627, 0.4179]}, {"w": "assume", "b": [0.4683, 0.4031, 0.5248, 0.4179]}, {"w": "that", "b": [0.5304, 0.4031, 0.5636, 0.4179]}, {"w": "you", "b": [0.5691, 0.4031, 0.5973, 0.4179]}, {"w": "are", "b": [0.6028, 0.4031, 0.627, 0.4179]}, {"w": "working", "b": [0.6326, 0.4031, 0.6949, 0.4179]}, {"w": "on", "b": [0.7005, 0.4031, 0.7196, 0.4179]}, {"w": "a", "b": [0.7252, 0.4031, 0.7342, 0.4179]}, {"w": "churn", "b": [0.7398, 0.4031, 0.7841, 0.4179]}, {"w": "prediction", "b": [0.7897, 0.4031, 0.8691, 0.4179]}, {"w": "model", "b": [0.1312, 0.4209, 0.1809, 0.436]}, {"w": "and", "b": [0.1881, 0.4209, 0.2185, 0.436]}, {"w": "you", "b": [0.2257, 0.4209, 0.255, 0.436]}, {"w": "want", "b": [0.2623, 0.4209, 0.302, 0.436]}, {"w": "to", "b": [0.3093, 0.4209, 0.326, 0.436]}, {"w": "predict", "b": [0.3333, 0.4209, 0.3908, 0.436]}, {"w": "whether", "b": [0.3981, 0.4209, 0.4641, 0.436]}, {"w": "a", "b": [0.4713, 0.4209, 0.4807, 0.436]}, {"w": "customer", "b": [0.488, 0.4209, 0.5624, 0.436]}, {"w": "cancels", "b": [0.5696, 0.4209, 0.6273, 0.436]}, {"w": "their", "b": [0.6345, 0.4209, 0.6733, 0.436]}, {"w": "subscription", "b": [0.6806, 0.4209, 0.7802, 0.436]}, {"w": "within", "b": [0.7875, 0.4209, 0.8398, 0.436]}, {"w": "six", "b": [0.847, 0.4209, 0.8696, 0.436]}, {"w": "months.", "b": [0.1312, 0.439, 0.1941, 0.4538]}, {"w": "You", "b": [0.2019, 0.439, 0.2331, 0.4538]}, {"w": "train", "b": [0.238, 0.439, 0.2763, 0.4538]}, {"w": "a", "b": [0.2813, 0.439, 0.2903, 0.4538]}, {"w": "model,", "b": [0.2953, 0.439, 0.3481, 0.4538]}, {"w": "and", "b": [0.3533, 0.439, 0.3824, 0.4538]}, {"w": "it’s", "b": [0.3874, 0.439, 0.4116, 0.4538]}, {"w": "accurate", "b": [0.4166, 0.439, 0.483, 0.4538]}, {"w": "enough;", "b": [0.488, 0.439, 0.5493, 0.4538]}, {"w": "however,", "b": [0.5547, 0.439, 0.623, 0.4538]}, {"w": "several", "b": [0.6282, 0.439, 0.6817, 0.4538]}, {"w": "weeks", "b": [0.6867, 0.439, 0.732, 0.4538]}, {"w": "after", "b": [0.737, 0.439, 0.7737, 0.4538]}, {"w": "deployment", "b": [0.7787, 0.439, 0.8696, 0.4538]}, {"w": "you", "b": [0.1308, 0.4569, 0.1594, 0.4718]}, {"w": "see", "b": [0.1655, 0.4569, 0.1892, 0.4718]}, {"w": "many", "b": [0.1953, 0.4569, 0.2392, 0.4718]}, {"w": "unexpected", "b": [0.2454, 0.4569, 0.3364, 0.4718]}, {"w": "false", "b": [0.3425, 0.4569, 0.3779, 0.4718]}, {"w": "negatives.", "b": [0.384, 0.4569, 0.4629, 0.4718]}, {"w": "You", "b": [0.4711, 0.4569, 0.5028, 0.4718]}, {"w": "investigate", "b": [0.5089, 0.4569, 0.5944, 0.4718]}, {"w": "the", "b": [0.6005, 0.4569, 0.6261, 0.4718]}, {"w": "decreased", "b": [0.6322, 0.4569, 0.7091, 0.4718]}, {"w": "model", "b": [0.7152, 0.4569, 0.7638, 0.4718]}, {"w": "performance", "b": [0.7699, 0.4569, 0.8692, 0.4718]}, {"w": "and", "b": [0.1312, 0.4747, 0.1616, 0.4898]}, {"w": "discover", "b": [0.1694, 0.4747, 0.2349, 0.4898]}, {"w": "a", "b": [0.2427, 0.4747, 0.2521, 0.4898]}, {"w": "new", "b": [0.2599, 0.4747, 0.2924, 0.4898]}, {"w": "competitor", "b": [0.3001, 0.4747, 0.3896, 0.4898]}, {"w": "now", "b": [0.3974, 0.4747, 0.4303, 0.4898]}, {"w": "offers", "b": [0.4382, 0.4747, 0.4817, 0.4898]}, {"w": "a", "b": [0.4895, 0.4747, 0.4989, 0.4898]}, {"w": "very", "b": [0.5067, 0.4747, 0.5418, 0.4898]}, {"w": "similar", "b": [0.5496, 0.4747, 0.6052, 0.4898]}, {"w": "service", "b": [0.613, 0.4747, 0.6681, 0.4898]}, {"w": "for", "b": [0.6759, 0.4747, 0.6984, 0.4898]}, {"w": "a", "b": [0.7062, 0.4747, 0.7156, 0.4898]}, {"w": "lower", "b": [0.7234, 0.4747, 0.7664, 0.4898]}, {"w": "price.", "b": [0.7742, 0.4747, 0.8192, 0.4898]}, {"w": "This", "b": [0.8324, 0.4747, 0.8691, 0.4898]}, {"w": "feature", "b": [0.1312, 0.4929, 0.1862, 0.5077]}, {"w": "wasn’t", "b": [0.1924, 0.4929, 0.2434, 0.5077]}, {"w": "initially", "b": [0.2495, 0.4929, 0.3105, 0.5077]}, {"w": "available", "b": [0.3166, 0.4929, 0.3852, 0.5077]}, {"w": "to", "b": [0.3913, 0.4929, 0.4074, 0.5077]}, {"w": "your", "b": [0.4136, 0.4929, 0.4489, 0.5077]}, {"w": "model,", "b": [0.455, 0.4929, 0.5079, 0.5077]}, {"w": "therefore", "b": [0.5141, 0.4929, 0.5843, 0.5077]}, {"w": "important", "b": [0.5904, 0.4929, 0.6701, 0.5077]}, {"w": "information", "b": [0.6762, 0.4929, 0.7685, 0.5077]}, {"w": "for", "b": [0.7746, 0.4929, 0.7964, 0.5077]}, {"w": "accurate", "b": [0.8025, 0.4929, 0.8691, 0.5077]}, {"w": "prediction", "b": [0.1312, 0.5107, 0.2123, 0.5257]}, {"w": "was", "b": [0.2185, 0.5107, 0.2478, 0.5257]}, {"w": "missing.", "b": [0.2539, 0.5107, 0.3187, 0.5257]}]}, {"id": "b_2", "type": "paragraph", "text": "Sponsorship or funding bias affects the data produced by a sponsored agency. For example, let a famous video game company sponsor a news agency to provide news about the video game industry. If you try to make a prediction about the video game industry, you might include in your data the story produced by this sponsored agency.", "words": [{"w": "Sponsorship", "b": [0.1312, 0.5376, 0.2434, 0.5526]}, {"w": "or", "b": [0.2479, 0.5377, 0.264, 0.5526]}, {"w": "funding", "b": [0.2685, 0.5376, 0.3387, 0.5526]}, {"w": "bias", "b": [0.3439, 0.5376, 0.3803, 0.5526]}, {"w": "affects", "b": [0.3848, 0.5377, 0.4346, 0.5526]}, {"w": "the", "b": [0.4392, 0.5377, 0.4643, 0.5526]}, {"w": "data", "b": [0.4688, 0.5377, 0.504, 0.5526]}, {"w": "produced", "b": [0.5085, 0.5377, 0.5815, 0.5526]}, {"w": "by", "b": [0.586, 0.5377, 0.6051, 0.5526]}, {"w": "a", "b": [0.6096, 0.5377, 0.6187, 0.5526]}, {"w": "sponsored", "b": [0.6232, 0.5377, 0.7013, 0.5526]}, {"w": "agency.", "b": [0.7059, 0.5377, 0.7631, 0.5526]}, {"w": "For", "b": [0.7708, 0.5377, 0.7972, 0.5526]}, {"w": "example,", "b": [0.8017, 0.5377, 0.8716, 0.5526]}, {"w": "let", "b": [0.1312, 0.5555, 0.152, 0.5706]}, {"w": "a", "b": [0.1582, 0.5555, 0.1675, 0.5706]}, {"w": "famous", "b": [0.1736, 0.5555, 0.2314, 0.5706]}, {"w": "video", "b": [0.2375, 0.5555, 0.2807, 0.5706]}, {"w": "game", "b": [0.2868, 0.5555, 0.3294, 0.5706]}, {"w": "company", "b": [0.3355, 0.5555, 0.4082, 0.5706]}, {"w": "sponsor", "b": [0.4144, 0.5555, 0.4764, 0.5706]}, {"w": "a", "b": [0.4826, 0.5555, 0.4919, 0.5706]}, {"w": "news", "b": [0.498, 0.5555, 0.5376, 0.5706]}, {"w": "agency", "b": [0.5438, 0.5555, 0.5994, 0.5706]}, {"w": "to", "b": [0.6055, 0.5555, 0.6221, 0.5706]}, {"w": "provide", "b": [0.6283, 0.5555, 0.6886, 0.5706]}, {"w": "news", "b": [0.6947, 0.5555, 0.7343, 0.5706]}, {"w": "about", "b": [0.7404, 0.5555, 0.7877, 0.5706]}, {"w": "the", "b": [0.7938, 0.5555, 0.8198, 0.5706]}, {"w": "video", "b": [0.8259, 0.5555, 0.8691, 0.5706]}, {"w": "game", "b": [0.1312, 0.5734, 0.1741, 0.5885]}, {"w": "industry.", "b": [0.1803, 0.5734, 0.2527, 0.5885]}, {"w": "If", "b": [0.2611, 0.5734, 0.2737, 0.5885]}, {"w": "you", "b": [0.2799, 0.5734, 0.3092, 0.5885]}, {"w": "try", "b": [0.3154, 0.5734, 0.3401, 0.5885]}, {"w": "to", "b": [0.3463, 0.5734, 0.363, 0.5885]}, {"w": "make", "b": [0.3692, 0.5734, 0.4121, 0.5885]}, {"w": "a", "b": [0.4183, 0.5734, 0.4278, 0.5885]}, {"w": "prediction", "b": [0.434, 0.5734, 0.5167, 0.5885]}, {"w": "about", "b": [0.5229, 0.5734, 0.5705, 0.5885]}, {"w": "the", "b": [0.5767, 0.5734, 0.6029, 0.5885]}, {"w": "video", "b": [0.6091, 0.5734, 0.6525, 0.5885]}, {"w": "game", "b": [0.6587, 0.5734, 0.7016, 0.5885]}, {"w": "industry,", "b": [0.7078, 0.5734, 0.7802, 0.5885]}, {"w": "you", "b": [0.7864, 0.5734, 0.8157, 0.5885]}, {"w": "might", "b": [0.822, 0.5734, 0.8695, 0.5885]}, {"w": "include", "b": [0.1312, 0.5915, 0.1887, 0.6064]}, {"w": "in", "b": [0.1948, 0.5915, 0.2102, 0.6064]}, {"w": "your", "b": [0.2164, 0.5915, 0.2523, 0.6064]}, {"w": "data", "b": [0.2585, 0.5915, 0.2943, 0.6064]}, {"w": "the", "b": [0.3005, 0.5915, 0.3261, 0.6064]}, {"w": "story", "b": [0.3323, 0.5915, 0.3729, 0.6064]}, {"w": "produced", "b": [0.3791, 0.5915, 0.4535, 0.6064]}, {"w": "by", "b": [0.4596, 0.5915, 0.4791, 0.6064]}, {"w": "this", "b": [0.4853, 0.5915, 0.5151, 0.6064]}, {"w": "sponsored", "b": [0.5213, 0.5915, 0.601, 0.6064]}, {"w": "agency.", "b": [0.6072, 0.5915, 0.6656, 0.6064]}]}, {"id": "b_3", "type": "paragraph", "text": "However, sponsored news agencies tend to suppress bad news about their sponsor and exaggerate their achievements. As a result, the model’s performance will be suboptimal.", "words": [{"w": "However,", "b": [0.1312, 0.6183, 0.2061, 0.6334]}, {"w": "sponsored", "b": [0.2152, 0.6183, 0.2965, 0.6334]}, {"w": "news", "b": [0.305, 0.6183, 0.3449, 0.6334]}, {"w": "agencies", "b": [0.3534, 0.6183, 0.4205, 0.6334]}, {"w": "tend", "b": [0.429, 0.6183, 0.4656, 0.6334]}, {"w": "to", "b": [0.4741, 0.6183, 0.4908, 0.6334]}, {"w": "suppress", "b": [0.4993, 0.6183, 0.5688, 0.6334]}, {"w": "bad", "b": [0.5773, 0.6183, 0.6076, 0.6334]}, {"w": "news", "b": [0.6161, 0.6183, 0.656, 0.6334]}, {"w": "about", "b": [0.6645, 0.6183, 0.712, 0.6334]}, {"w": "their", "b": [0.7205, 0.6183, 0.7593, 0.6334]}, {"w": "sponsor", "b": [0.7678, 0.6183, 0.8303, 0.6334]}, {"w": "and", "b": [0.8388, 0.6183, 0.8692, 0.6334]}, {"w": "exaggerate", "b": [0.1312, 0.6363, 0.2169, 0.6513]}, {"w": "their", "b": [0.2231, 0.6363, 0.2611, 0.6513]}, {"w": "achievements.", "b": [0.2672, 0.6363, 0.3781, 0.6513]}, {"w": "As", "b": [0.3863, 0.6363, 0.4074, 0.6513]}, {"w": "a", "b": [0.4135, 0.6363, 0.4228, 0.6513]}, {"w": "result,", "b": [0.4289, 0.6363, 0.4794, 0.6513]}, {"w": "the", "b": [0.4855, 0.6363, 0.5111, 0.6513]}, {"w": "model’s", "b": [0.5173, 0.6363, 0.5784, 0.6513]}, {"w": "performance", "b": [0.5846, 0.6363, 0.6841, 0.6513]}, {"w": "will", "b": [0.6903, 0.6363, 0.719, 0.6513]}, {"w": "be", "b": [0.7251, 0.6363, 0.7441, 0.6513]}, {"w": "suboptimal.", "b": [0.7503, 0.6363, 0.8452, 0.6513]}]}, {"id": "b_4", "type": "paragraph", "text": "Sampling bias (also known as distribution shift) occurs when the distribution of examples used for training doesn’t reflect the distribution of the inputs the model will receive in production. This type of bias is frequently observed in practice. For example, you are working on a system that classifies documents according to a taxonomy of several hundred topics. You might decide to create a collection of documents in which an equal amount of documents represents each topic. Once you finish the work on the model, you observe 5% error. Soon after deployment, you see the wrong assignment to about 30% of documents. Why did this happen?", "words": [{"w": "Sampling", "b": [0.1312, 0.6633, 0.217, 0.6782]}, {"w": "bias", "b": [0.2225, 0.6633, 0.2589, 0.6782]}, {"w": "(also", "b": [0.2636, 0.6634, 0.3009, 0.6782]}, {"w": "known", "b": [0.3057, 0.6634, 0.3569, 0.6782]}, {"w": "as", "b": [0.3617, 0.6634, 0.3778, 0.6782]}, {"w": "distribution", "b": [0.3826, 0.6633, 0.4917, 0.6782]}, {"w": "shift)", "b": [0.4971, 0.6633, 0.5449, 0.6782]}, {"w": "occurs", "b": [0.5497, 0.6634, 0.5996, 0.6782]}, {"w": "when", "b": [0.6044, 0.6634, 0.6456, 0.6782]}, {"w": "the", "b": [0.6504, 0.6634, 0.6755, 0.6782]}, {"w": "distribution", "b": [0.6803, 0.6634, 0.7729, 0.6782]}, {"w": "of", "b": [0.7776, 0.6634, 0.7922, 0.6782]}, {"w": "examples", "b": [0.797, 0.6634, 0.869, 0.6782]}, {"w": "used", "b": [0.1312, 0.6811, 0.168, 0.6962]}, {"w": "for", "b": [0.176, 0.6811, 0.1986, 0.6962]}, {"w": "training", "b": [0.2066, 0.6811, 0.2715, 0.6962]}, {"w": "doesn’t", "b": [0.2796, 0.6811, 0.3388, 0.6962]}, {"w": "reflect", "b": [0.3468, 0.6811, 0.3971, 0.6962]}, {"w": "the", "b": [0.4052, 0.6811, 0.4313, 0.6962]}, {"w": "distribution", "b": [0.4393, 0.6811, 0.5358, 0.6962]}, {"w": "of", "b": [0.5438, 0.6811, 0.559, 0.6962]}, {"w": "the", "b": [0.567, 0.6811, 0.5932, 0.6962]}, {"w": "inputs", "b": [0.6012, 0.6811, 0.6526, 0.6962]}, {"w": "the", "b": [0.6606, 0.6811, 0.6868, 0.6962]}, {"w": "model", "b": [0.6949, 0.6811, 0.7445, 0.6962]}, {"w": "will", "b": [0.7526, 0.6811, 0.7819, 0.6962]}, {"w": "receive", "b": [0.7899, 0.6811, 0.8454, 0.6962]}, {"w": "in", "b": [0.8535, 0.6811, 0.8692, 0.6962]}, {"w": "production.", "b": [0.1312, 0.6993, 0.2222, 0.7141]}, {"w": "This", "b": [0.2301, 0.6993, 0.2654, 0.7141]}, {"w": "type", "b": [0.2705, 0.6993, 0.3052, 0.7141]}, {"w": "of", "b": [0.3104, 0.6993, 0.3249, 0.7141]}, {"w": "bias", "b": [0.3301, 0.6993, 0.3613, 0.7141]}, {"w": "is", "b": [0.3665, 0.6993, 0.3786, 0.7141]}, {"w": "frequently", "b": [0.3838, 0.6993, 0.4632, 0.7141]}, {"w": "observed", "b": [0.4684, 0.6993, 0.5369, 0.7141]}, {"w": "in", "b": [0.542, 0.6993, 0.5571, 0.7141]}, {"w": "practice.", "b": [0.5622, 0.6993, 0.6296, 0.7141]}, {"w": "For", "b": [0.6375, 0.6993, 0.6639, 0.7141]}, {"w": "example,", "b": [0.669, 0.6993, 0.7389, 0.7141]}, {"w": "you", "b": [0.7442, 0.6993, 0.7724, 0.7141]}, {"w": "are", "b": [0.7775, 0.6993, 0.8017, 0.7141]}, {"w": "working", "b": [0.8068, 0.6993, 0.8691, 0.7141]}, {"w": "on", "b": [0.1312, 0.717, 0.1511, 0.7321]}, {"w": "a", "b": [0.1578, 0.717, 0.1672, 0.7321]}, {"w": "system", "b": [0.1739, 0.717, 0.23, 0.7321]}, {"w": "that", "b": [0.2367, 0.717, 0.2712, 0.7321]}, {"w": "classifies", "b": [0.2779, 0.717, 0.3472, 0.7321]}, {"w": "documents", "b": [0.3539, 0.717, 0.4419, 0.7321]}, {"w": "according", "b": [0.4485, 0.717, 0.5271, 0.7321]}, {"w": "to", "b": [0.5337, 0.717, 0.5504, 0.7321]}, {"w": "a", "b": [0.5571, 0.717, 0.5665, 0.7321]}, {"w": "taxonomy", "b": [0.5732, 0.717, 0.6542, 0.7321]}, {"w": "of", "b": [0.6609, 0.717, 0.6761, 0.7321]}, {"w": "several", "b": [0.6827, 0.717, 0.7383, 0.7321]}, {"w": "hundred", "b": [0.745, 0.717, 0.8126, 0.7321]}, {"w": "topics.", "b": [0.8192, 0.717, 0.8727, 0.7321]}, {"w": "You", "b": [0.1305, 0.7352, 0.1616, 0.75]}, {"w": "might", "b": [0.1674, 0.7352, 0.2131, 0.75]}, {"w": "decide", "b": [0.2188, 0.7352, 0.2681, 0.75]}, {"w": "to", "b": [0.2738, 0.7352, 0.2899, 0.75]}, {"w": "create", "b": [0.2957, 0.7352, 0.343, 0.75]}, {"w": "a", "b": [0.3487, 0.7352, 0.3577, 0.75]}, {"w": "collection", "b": [0.3635, 0.7352, 0.4379, 0.75]}, {"w": "of", "b": [0.4436, 0.7352, 0.4582, 0.75]}, {"w": "documents", "b": [0.4639, 0.7352, 0.5484, 0.75]}, {"w": "in", "b": [0.5542, 0.7352, 0.5693, 0.75]}, {"w": "which", "b": [0.575, 0.7352, 0.6207, 0.75]}, {"w": "an", "b": [0.6265, 0.7352, 0.6456, 0.75]}, {"w": "equal", "b": [0.6513, 0.7352, 0.693, 0.75]}, {"w": "amount", "b": [0.6987, 0.7352, 0.7585, 0.75]}, {"w": "of", "b": [0.7642, 0.7352, 0.7788, 0.75]}, {"w": "documents", "b": [0.7846, 0.7352, 0.8691, 0.75]}, {"w": "represents", "b": [0.1312, 0.7531, 0.2104, 0.7679]}, {"w": "each", "b": [0.215, 0.7531, 0.2497, 0.7679]}, {"w": "topic.", "b": [0.2543, 0.7531, 0.2985, 0.7679]}, {"w": "Once", "b": [0.3062, 0.7531, 0.3464, 0.7679]}, {"w": "you", "b": [0.3509, 0.7531, 0.3791, 0.7679]}, {"w": "finish", "b": [0.3837, 0.7531, 0.426, 0.7679]}, {"w": "the", "b": [0.4306, 0.7531, 0.4557, 0.7679]}, {"w": "work", "b": [0.4603, 0.7531, 0.4985, 0.7679]}, {"w": "on", "b": [0.503, 0.7531, 0.5221, 0.7679]}, {"w": "the", "b": [0.5267, 0.7531, 0.5518, 0.7679]}, {"w": "model,", "b": [0.5564, 0.7531, 0.6092, 0.7679]}, {"w": "you", "b": [0.6141, 0.7531, 0.6422, 0.7679]}, {"w": "observe", "b": [0.6468, 0.7531, 0.7052, 0.7679]}, {"w": "5%", "b": [0.7095, 0.7531, 0.7336, 0.7679]}, {"w": "error.", "b": [0.7381, 0.7531, 0.7815, 0.7679]}, {"w": "Soon", "b": [0.7892, 0.7531, 0.8279, 0.7679]}, {"w": "after", "b": [0.8325, 0.7531, 0.8692, 0.7679]}, {"w": "deployment,", "b": [0.1312, 0.7711, 0.2272, 0.7859]}, {"w": "you", "b": [0.2326, 0.7711, 0.2608, 0.7859]}, {"w": "see", "b": [0.2661, 0.7711, 0.2893, 0.7859]}, {"w": "the", "b": [0.2946, 0.7711, 0.3197, 0.7859]}, {"w": "wrong", "b": [0.325, 0.7711, 0.3733, 0.7859]}, {"w": "assignment", "b": [0.3786, 0.7711, 0.4657, 0.7859]}, {"w": "to", "b": [0.471, 0.7711, 0.4871, 0.7859]}, {"w": "about", "b": [0.4924, 0.7711, 0.5381, 0.7859]}, {"w": "30%", "b": [0.5432, 0.7711, 0.5764, 0.7859]}, {"w": "of", "b": [0.5817, 0.7711, 0.5962, 0.7859]}, {"w": "documents.", "b": [0.6015, 0.7711, 0.6911, 0.7859]}, {"w": "Why", "b": [0.6964, 0.7711, 0.734, 0.7859]}, {"w": "did", "b": [0.7393, 0.7711, 0.7645, 0.7859]}, {"w": "this", "b": [0.7698, 0.7711, 0.799, 0.7859]}, {"w": "happen?", "b": [0.8043, 0.7711, 0.8706, 0.7859]}]}, {"id": "b_5", "type": "paragraph", "text": "One of the possible reasons is sampling bias: one or two frequent topics in production data might account for 80% of all input. If your model doesn’t perform well for these frequent topics, then your system will make more errors in production than you initially expected.", "words": [{"w": "One", "b": [0.1312, 0.7978, 0.1642, 0.8128]}, {"w": "of", "b": [0.1703, 0.7978, 0.1852, 0.8128]}, {"w": "the", "b": [0.1913, 0.7978, 0.217, 0.8128]}, {"w": "possible", "b": [0.2232, 0.7978, 0.2867, 0.8128]}, {"w": "reasons", "b": [0.2928, 0.7978, 0.3517, 0.8128]}, {"w": "is", "b": [0.3578, 0.7978, 0.3703, 0.8128]}, {"w": "sampling", "b": [0.3764, 0.7978, 0.4485, 0.8128]}, {"w": "bias:", "b": [0.4546, 0.7978, 0.4917, 0.8128]}, {"w": "one", "b": [0.4999, 0.7978, 0.5277, 0.8128]}, {"w": "or", "b": [0.5338, 0.7978, 0.5503, 0.8128]}, {"w": "two", "b": [0.5565, 0.7978, 0.5852, 0.8128]}, {"w": "frequent", "b": [0.5914, 0.7978, 0.6578, 0.8128]}, {"w": "topics", "b": [0.6639, 0.7978, 0.7113, 0.8128]}, {"w": "in", "b": [0.7175, 0.7978, 0.7329, 0.8128]}, {"w": "production", "b": [0.739, 0.7978, 0.827, 0.8128]}, {"w": "data", "b": [0.8332, 0.7978, 0.8691, 0.8128]}, {"w": "might", "b": [0.1312, 0.8157, 0.1788, 0.8308]}, {"w": "account", "b": [0.1853, 0.8157, 0.2486, 0.8308]}, {"w": "for", "b": [0.255, 0.8157, 0.2775, 0.8308]}, {"w": "80%", "b": [0.2839, 0.8157, 0.3184, 0.8308]}, {"w": "of", "b": [0.3249, 0.8157, 0.34, 0.8308]}, {"w": "all", "b": [0.3465, 0.8157, 0.3663, 0.8308]}, {"w": "input.", "b": [0.3728, 0.8157, 0.4219, 0.8308]}, {"w": "If", "b": [0.431, 0.8157, 0.4436, 0.8308]}, {"w": "your", "b": [0.45, 0.8157, 0.4867, 0.8308]}, {"w": "model", "b": [0.4931, 0.8157, 0.5428, 0.8308]}, {"w": "doesn’t", "b": [0.5492, 0.8157, 0.6084, 0.8308]}, {"w": "perform", "b": [0.6149, 0.8157, 0.6798, 0.8308]}, {"w": "well", "b": [0.6862, 0.8157, 0.7182, 0.8308]}, {"w": "for", "b": [0.7246, 0.8157, 0.7471, 0.8308]}, {"w": "these", "b": [0.7536, 0.8157, 0.7955, 0.8308]}, {"w": "frequent", "b": [0.802, 0.8157, 0.8695, 0.8308]}, {"w": "topics,", "b": [0.1312, 0.8338, 0.1836, 0.8487]}, {"w": "then", "b": [0.1898, 0.8338, 0.2257, 0.8487]}, {"w": "your", "b": [0.2318, 0.8338, 0.2678, 0.8487]}, {"w": "system", "b": [0.2739, 0.8338, 0.329, 0.8487]}, {"w": "will", "b": [0.3352, 0.8338, 0.3639, 0.8487]}, {"w": "make", "b": [0.37, 0.8338, 0.412, 0.8487]}, {"w": "more", "b": [0.4182, 0.8338, 0.4582, 0.8487]}, {"w": "errors", "b": [0.4644, 0.8338, 0.5108, 0.8487]}, {"w": "in", "b": [0.5169, 0.8338, 0.5323, 0.8487]}, {"w": "production", "b": [0.5385, 0.8338, 0.6262, 0.8487]}, {"w": "than", "b": [0.6324, 0.8338, 0.6693, 0.8487]}, {"w": "you", "b": [0.6754, 0.8338, 0.7041, 0.8487]}, {"w": "initially", "b": [0.7103, 0.8338, 0.7723, 0.8487]}, {"w": "expected.", "b": [0.7785, 0.8338, 0.8544, 0.8487]}]}, {"id": "b_6", "type": "paragraph", "text": "Prejudice or stereotype bias is often observed in data obtained from historical sources,", "words": [{"w": "Prejudice", "b": [0.1312, 0.8607, 0.2193, 0.8756]}, {"w": "or", "b": [0.2256, 0.8606, 0.2424, 0.8757]}, {"w": "stereotype", "b": [0.2486, 0.8607, 0.345, 0.8756]}, {"w": "bias", "b": [0.3522, 0.8607, 0.3886, 0.8756]}, {"w": "is", "b": [0.3949, 0.8606, 0.4075, 0.8757]}, {"w": "often", "b": [0.4138, 0.8606, 0.4551, 0.8757]}, {"w": "observed", "b": [0.4614, 0.8606, 0.5327, 0.8757]}, {"w": "in", "b": [0.539, 0.8606, 0.5547, 0.8757]}, {"w": "data", "b": [0.561, 0.8606, 0.5976, 0.8757]}, {"w": "obtained", "b": [0.6038, 0.8606, 0.675, 0.8757]}, {"w": "from", "b": [0.6812, 0.8606, 0.7195, 0.8757]}, {"w": "historical", "b": [0.7258, 0.8606, 0.8012, 0.8757]}, {"w": "sources,", "b": [0.8075, 0.8606, 0.8716, 0.8757]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "14", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 58, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "such as books or photo archives, or from online activity such as social media, online forums, and comments to online publications.", "words": [{"w": "such", "b": [0.1312, 0.0884, 0.1665, 0.1033]}, {"w": "as", "b": [0.1727, 0.0884, 0.1891, 0.1033]}, {"w": "books", "b": [0.1952, 0.0884, 0.2417, 0.1033]}, {"w": "or", "b": [0.2478, 0.0884, 0.2642, 0.1033]}, {"w": "photo", "b": [0.2703, 0.0884, 0.3162, 0.1033]}, {"w": "archives,", "b": [0.3223, 0.0884, 0.3913, 0.1033]}, {"w": "or", "b": [0.3974, 0.0884, 0.4138, 0.1033]}, {"w": "from", "b": [0.4199, 0.0884, 0.4572, 0.1033]}, {"w": "online", "b": [0.4633, 0.0884, 0.5112, 0.1033]}, {"w": "activity", "b": [0.5174, 0.0884, 0.578, 0.1033]}, {"w": "such", "b": [0.5842, 0.0884, 0.6194, 0.1033]}, {"w": "as", "b": [0.6256, 0.0884, 0.642, 0.1033]}, {"w": "social", "b": [0.6481, 0.0884, 0.6926, 0.1033]}, {"w": "media,", "b": [0.6987, 0.0884, 0.7517, 0.1033]}, {"w": "online", "b": [0.7578, 0.0884, 0.8058, 0.1033]}, {"w": "forums,", "b": [0.8119, 0.0884, 0.8717, 0.1033]}, {"w": "and", "b": [0.1312, 0.1063, 0.161, 0.1213]}, {"w": "comments", "b": [0.1671, 0.1063, 0.2477, 0.1213]}, {"w": "to", "b": [0.2539, 0.1063, 0.2703, 0.1213]}, {"w": "online", "b": [0.2764, 0.1063, 0.3246, 0.1213]}, {"w": "publications.", "b": [0.3308, 0.1063, 0.4334, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "Using a photo archive to train a model that distinguishes men from women might show, for example, men more frequently in work or outdoor contexts, and women more often at home indoors. If we use such biased data, our model will have more difficulty recognizing a woman outdoors or a man at home.", "words": [{"w": "Using", "b": [0.1312, 0.1333, 0.1768, 0.1482]}, {"w": "a", "b": [0.1829, 0.1333, 0.1921, 0.1482]}, {"w": "photo", "b": [0.1982, 0.1333, 0.2442, 0.1482]}, {"w": "archive", "b": [0.2503, 0.1333, 0.3071, 0.1482]}, {"w": "to", "b": [0.3132, 0.1333, 0.3295, 0.1482]}, {"w": "train", "b": [0.3357, 0.1333, 0.3745, 0.1482]}, {"w": "a", "b": [0.3807, 0.1333, 0.3899, 0.1482]}, {"w": "model", "b": [0.396, 0.1333, 0.4445, 0.1482]}, {"w": "that", "b": [0.4506, 0.1333, 0.4843, 0.1482]}, {"w": "distinguishes", "b": [0.4905, 0.1333, 0.5929, 0.1482]}, {"w": "men", "b": [0.5991, 0.1333, 0.6328, 0.1482]}, {"w": "from", "b": [0.6389, 0.1333, 0.6762, 0.1482]}, {"w": "women", "b": [0.6824, 0.1333, 0.738, 0.1482]}, {"w": "might", "b": [0.7441, 0.1333, 0.7906, 0.1482]}, {"w": "show,", "b": [0.7967, 0.1333, 0.8412, 0.1482]}, {"w": "for", "b": [0.8474, 0.1333, 0.8694, 0.1482]}, {"w": "example,", "b": [0.1312, 0.1513, 0.2019, 0.1661]}, {"w": "men", "b": [0.208, 0.1513, 0.2415, 0.1661]}, {"w": "more", "b": [0.2477, 0.1513, 0.2874, 0.1661]}, {"w": "frequently", "b": [0.2935, 0.1513, 0.3739, 0.1661]}, {"w": "in", "b": [0.38, 0.1513, 0.3952, 0.1661]}, {"w": "work", "b": [0.4014, 0.1513, 0.44, 0.1661]}, {"w": "or", "b": [0.4462, 0.1513, 0.4625, 0.1661]}, {"w": "outdoor", "b": [0.4687, 0.1513, 0.5312, 0.1661]}, {"w": "contexts,", "b": [0.5373, 0.1513, 0.6086, 0.1661]}, {"w": "and", "b": [0.6147, 0.1513, 0.6442, 0.1661]}, {"w": "women", "b": [0.6503, 0.1513, 0.7057, 0.1661]}, {"w": "more", "b": [0.7119, 0.1513, 0.7515, 0.1661]}, {"w": "often", "b": [0.7577, 0.1513, 0.7978, 0.1661]}, {"w": "at", "b": [0.804, 0.1513, 0.8202, 0.1661]}, {"w": "home", "b": [0.8264, 0.1513, 0.869, 0.1661]}, {"w": "indoors.", "b": [0.1312, 0.1693, 0.1942, 0.1841]}, {"w": "If", "b": [0.2024, 0.1693, 0.2144, 0.1841]}, {"w": "we", "b": [0.2205, 0.1693, 0.2411, 0.1841]}, {"w": "use", "b": [0.2472, 0.1693, 0.2724, 0.1841]}, {"w": "such", "b": [0.2785, 0.1693, 0.3132, 0.1841]}, {"w": "biased", "b": [0.3193, 0.1693, 0.3687, 0.1841]}, {"w": "data,", "b": [0.3747, 0.1693, 0.4149, 0.1841]}, {"w": "our", "b": [0.421, 0.1693, 0.4472, 0.1841]}, {"w": "model", "b": [0.4532, 0.1693, 0.501, 0.1841]}, {"w": "will", "b": [0.5071, 0.1693, 0.5352, 0.1841]}, {"w": "have", "b": [0.5412, 0.1693, 0.5769, 0.1841]}, {"w": "more", "b": [0.583, 0.1693, 0.6222, 0.1841]}, {"w": "difficulty", "b": [0.6283, 0.1693, 0.6976, 0.1841]}, {"w": "recognizing", "b": [0.7037, 0.1693, 0.7922, 0.1841]}, {"w": "a", "b": [0.7982, 0.1693, 0.8073, 0.1841]}, {"w": "woman", "b": [0.8133, 0.1693, 0.8691, 0.1841]}, {"w": "outdoors", "b": [0.1312, 0.1871, 0.2016, 0.2021]}, {"w": "or", "b": [0.2078, 0.1871, 0.2242, 0.2021]}, {"w": "a", "b": [0.2304, 0.1871, 0.2396, 0.2021]}, {"w": "man", "b": [0.2458, 0.1871, 0.2806, 0.2021]}, {"w": "at", "b": [0.2868, 0.1871, 0.3032, 0.2021]}, {"w": "home.", "b": [0.3093, 0.1871, 0.3575, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "A famous example of this type of bias is looking for associations for words using word embeddings trained with an algorithm like word2vec. The model predicts that king − man+woman ≈queen, but at the same time, that programmer−man+woman ≈homemaker.", "words": [{"w": "A", "b": [0.1305, 0.2139, 0.1446, 0.229]}, {"w": "famous", "b": [0.1525, 0.2139, 0.2107, 0.229]}, {"w": "example", "b": [0.2185, 0.2139, 0.286, 0.229]}, {"w": "of", "b": [0.2939, 0.2139, 0.309, 0.229]}, {"w": "this", "b": [0.3169, 0.2139, 0.3474, 0.229]}, {"w": "type", "b": [0.3552, 0.2139, 0.3913, 0.229]}, {"w": "of", "b": [0.3992, 0.2139, 0.4144, 0.229]}, {"w": "bias", "b": [0.4223, 0.2139, 0.4548, 0.229]}, {"w": "is", "b": [0.4627, 0.2139, 0.4753, 0.229]}, {"w": "looking", "b": [0.4832, 0.2139, 0.5428, 0.229]}, {"w": "for", "b": [0.5507, 0.2139, 0.5732, 0.229]}, {"w": "associations", "b": [0.5811, 0.2139, 0.6782, 0.229]}, {"w": "for", "b": [0.686, 0.2139, 0.7086, 0.229]}, {"w": "words", "b": [0.7164, 0.2139, 0.7642, 0.229]}, {"w": "using", "b": [0.7721, 0.2139, 0.8151, 0.229]}, {"w": "word", "b": [0.8229, 0.214, 0.8688, 0.229]}, {"w": "embeddings", "b": [0.1312, 0.232, 0.2404, 0.2469]}, {"w": "trained", "b": [0.2473, 0.2319, 0.3059, 0.247]}, {"w": "with", "b": [0.3128, 0.2319, 0.3494, 0.247]}, {"w": "an", "b": [0.3563, 0.2319, 0.3762, 0.247]}, {"w": "algorithm", "b": [0.383, 0.2319, 0.4626, 0.247]}, {"w": "like", "b": [0.4695, 0.2319, 0.4977, 0.247]}, {"w": "word2vec.", "b": [0.5045, 0.2319, 0.596, 0.247]}, {"w": "The", "b": [0.6064, 0.2319, 0.6388, 0.247]}, {"w": "model", "b": [0.6457, 0.2319, 0.6954, 0.247]}, {"w": "predicts", "b": [0.7023, 0.2319, 0.7673, 0.247]}, {"w": "that", "b": [0.7742, 0.2319, 0.8087, 0.247]}, {"w": "king", "b": [0.8155, 0.232, 0.8498, 0.2469]}, {"w": "−", "b": [0.8544, 0.2318, 0.8688, 0.2467]}, {"w": "man+woman", "b": [0.1312, 0.2499, 0.2387, 0.2649]}, {"w": "≈queen,", "b": [0.2439, 0.2497, 0.315, 0.2649]}, {"w": "but", "b": [0.3199, 0.25, 0.347, 0.2648]}, {"w": "at", "b": [0.3515, 0.25, 0.3676, 0.2648]}, {"w": "the", "b": [0.3721, 0.25, 0.3973, 0.2648]}, {"w": "same", "b": [0.4018, 0.25, 0.4411, 0.2648]}, {"w": "time,", "b": [0.4456, 0.25, 0.4858, 0.2648]}, {"w": "that", "b": [0.4907, 0.25, 0.5238, 0.2648]}, {"w": "programmer−man+woman", "b": [0.5283, 0.2497, 0.7504, 0.2649]}, {"w": "≈homemaker.", "b": [0.7556, 0.2497, 0.8724, 0.2649]}]}, {"id": "b_3", "type": "paragraph", "text": "Systematic value distortion is bias usually occurring with the device making measurements or observations. This results in a machine learning model making suboptimal predictions when deployed in the production environment.", "words": [{"w": "Systematic", "b": [0.1312, 0.2768, 0.2321, 0.2918]}, {"w": "value", "b": [0.237, 0.2768, 0.2847, 0.2918]}, {"w": "distortion", "b": [0.2895, 0.2768, 0.3798, 0.2918]}, {"w": "is", "b": [0.384, 0.277, 0.3962, 0.2918]}, {"w": "bias", "b": [0.4004, 0.277, 0.4316, 0.2918]}, {"w": "usually", "b": [0.4358, 0.277, 0.4917, 0.2918]}, {"w": "occurring", "b": [0.4959, 0.277, 0.5699, 0.2918]}, {"w": "with", "b": [0.5741, 0.277, 0.6093, 0.2918]}, {"w": "the", "b": [0.6135, 0.277, 0.6386, 0.2918]}, {"w": "device", "b": [0.6428, 0.277, 0.6916, 0.2918]}, {"w": "making", "b": [0.6958, 0.277, 0.7535, 0.2918]}, {"w": "measurements", "b": [0.7577, 0.277, 0.869, 0.2918]}, {"w": "or", "b": [0.1312, 0.2947, 0.148, 0.3098]}, {"w": "observations.", "b": [0.1545, 0.2947, 0.261, 0.3098]}, {"w": "This", "b": [0.2702, 0.2947, 0.3069, 0.3098]}, {"w": "results", "b": [0.3134, 0.2947, 0.3671, 0.3098]}, {"w": "in", "b": [0.3736, 0.2947, 0.3893, 0.3098]}, {"w": "a", "b": [0.3957, 0.2947, 0.4052, 0.3098]}, {"w": "machine", "b": [0.4117, 0.2947, 0.4791, 0.3098]}, {"w": "learning", "b": [0.4856, 0.2947, 0.5516, 0.3098]}, {"w": "model", "b": [0.5581, 0.2947, 0.6077, 0.3098]}, {"w": "making", "b": [0.6142, 0.2947, 0.6744, 0.3098]}, {"w": "suboptimal", "b": [0.6809, 0.2947, 0.7725, 0.3098]}, {"w": "predictions", "b": [0.779, 0.2947, 0.8691, 0.3098]}, {"w": "when", "b": [0.1306, 0.3127, 0.1726, 0.3277]}, {"w": "deployed", "b": [0.1788, 0.3127, 0.249, 0.3277]}, {"w": "in", "b": [0.2552, 0.3127, 0.2706, 0.3277]}, {"w": "the", "b": [0.2767, 0.3127, 0.3023, 0.3277]}, {"w": "production", "b": [0.3085, 0.3127, 0.3962, 0.3277]}, {"w": "environment.", "b": [0.4024, 0.3127, 0.5075, 0.3277]}]}, {"id": "b_4", "type": "paragraph", "text": "For example, the training data is gathered using a camera with a white balance which makes white look yellowish. In production, however, engineers decide to use a higher-quality camera which “sees” white as white. Because your model was trained on lower-quality pictures, the predictions using higher-quality input will be suboptimal.", "words": [{"w": "For", "b": [0.1312, 0.3398, 0.1576, 0.3546]}, {"w": "example,", "b": [0.1637, 0.3398, 0.2335, 0.3546]}, {"w": "the", "b": [0.2396, 0.3398, 0.2647, 0.3546]}, {"w": "training", "b": [0.2708, 0.3398, 0.3332, 0.3546]}, {"w": "data", "b": [0.3392, 0.3398, 0.3744, 0.3546]}, {"w": "is", "b": [0.3805, 0.3398, 0.3926, 0.3546]}, {"w": "gathered", "b": [0.3987, 0.3398, 0.4671, 0.3546]}, {"w": "using", "b": [0.4731, 0.3398, 0.5144, 0.3546]}, {"w": "a", "b": [0.5205, 0.3398, 0.5296, 0.3546]}, {"w": "camera", "b": [0.5356, 0.3398, 0.5919, 0.3546]}, {"w": "with", "b": [0.598, 0.3398, 0.6332, 0.3546]}, {"w": "a", "b": [0.6392, 0.3398, 0.6483, 0.3546]}, {"w": "white", "b": [0.6543, 0.3398, 0.6975, 0.3546]}, {"w": "balance", "b": [0.7036, 0.3398, 0.7629, 0.3546]}, {"w": "which", "b": [0.769, 0.3398, 0.8147, 0.3546]}, {"w": "makes", "b": [0.8207, 0.3398, 0.8691, 0.3546]}, {"w": "white", "b": [0.1306, 0.3577, 0.1738, 0.3725]}, {"w": "look", "b": [0.1795, 0.3577, 0.2127, 0.3725]}, {"w": "yellowish.", "b": [0.2185, 0.3577, 0.2944, 0.3725]}, {"w": "In", "b": [0.3025, 0.3577, 0.3191, 0.3725]}, {"w": "production,", "b": [0.3249, 0.3577, 0.4159, 0.3725]}, {"w": "however,", "b": [0.4217, 0.3577, 0.4901, 0.3725]}, {"w": "engineers", "b": [0.4959, 0.3577, 0.5685, 0.3725]}, {"w": "decide", "b": [0.5742, 0.3577, 0.6235, 0.3725]}, {"w": "to", "b": [0.6293, 0.3577, 0.6454, 0.3725]}, {"w": "use", "b": [0.6511, 0.3577, 0.6764, 0.3725]}, {"w": "a", "b": [0.6821, 0.3577, 0.6912, 0.3725]}, {"w": "higher-quality", "b": [0.697, 0.3577, 0.807, 0.3725]}, {"w": "camera", "b": [0.8128, 0.3577, 0.8691, 0.3725]}, {"w": "which", "b": [0.1306, 0.3756, 0.177, 0.3905]}, {"w": "“sees”", "b": [0.1832, 0.3756, 0.2314, 0.3905]}, {"w": "white", "b": [0.2376, 0.3756, 0.2815, 0.3905]}, {"w": "as", "b": [0.2877, 0.3756, 0.3041, 0.3905]}, {"w": "white.", "b": [0.3103, 0.3756, 0.3593, 0.3905]}, {"w": "Because", "b": [0.3676, 0.3756, 0.4318, 0.3905]}, {"w": "your", "b": [0.4379, 0.3756, 0.4737, 0.3905]}, {"w": "model", "b": [0.4799, 0.3756, 0.5284, 0.3905]}, {"w": "was", "b": [0.5346, 0.3756, 0.5638, 0.3905]}, {"w": "trained", "b": [0.5699, 0.3756, 0.6272, 0.3905]}, {"w": "on", "b": [0.6333, 0.3756, 0.6527, 0.3905]}, {"w": "lower-quality", "b": [0.6589, 0.3756, 0.7626, 0.3905]}, {"w": "pictures,", "b": [0.7688, 0.3756, 0.8374, 0.3905]}, {"w": "the", "b": [0.8436, 0.3756, 0.8691, 0.3905]}, {"w": "predictions", "b": [0.1312, 0.3935, 0.2196, 0.4084]}, {"w": "using", "b": [0.2257, 0.3935, 0.2679, 0.4084]}, {"w": "higher-quality", "b": [0.274, 0.3935, 0.3864, 0.4084]}, {"w": "input", "b": [0.3925, 0.3935, 0.4356, 0.4084]}, {"w": "will", "b": [0.4418, 0.3935, 0.4705, 0.4084]}, {"w": "be", "b": [0.4766, 0.3935, 0.4956, 0.4084]}, {"w": "suboptimal.", "b": [0.5017, 0.3935, 0.5967, 0.4084]}]}, {"id": "b_5", "type": "paragraph", "text": "This should not be confused with noisy data. Noise is the result of a random process that distorts the data. When you have a sufficiently large dataset, noise becomes less of a problem because it might average out. On the other hand, if the measurements are consistently skewed in one direction, then it damages training data, and ultimately results in a poor-quality model.", "words": [{"w": "This", "b": [0.1306, 0.4203, 0.1672, 0.4354]}, {"w": "should", "b": [0.1734, 0.4203, 0.2268, 0.4354]}, {"w": "not", "b": [0.233, 0.4203, 0.2601, 0.4354]}, {"w": "be", "b": [0.2663, 0.4203, 0.2856, 0.4354]}, {"w": "confused", "b": [0.2918, 0.4203, 0.3624, 0.4354]}, {"w": "with", "b": [0.3686, 0.4203, 0.4051, 0.4354]}, {"w": "noisy", "b": [0.4113, 0.4203, 0.4537, 0.4354]}, {"w": "data.", "b": [0.4599, 0.4203, 0.5017, 0.4354]}, {"w": "Noise", "b": [0.5099, 0.4203, 0.5544, 0.4354]}, {"w": "is", "b": [0.5605, 0.4203, 0.5732, 0.4354]}, {"w": "the", "b": [0.5794, 0.4203, 0.6055, 0.4354]}, {"w": "result", "b": [0.6116, 0.4203, 0.6578, 0.4354]}, {"w": "of", "b": [0.6639, 0.4203, 0.6791, 0.4354]}, {"w": "a", "b": [0.6852, 0.4203, 0.6946, 0.4354]}, {"w": "random", "b": [0.7008, 0.4203, 0.7635, 0.4354]}, {"w": "process", "b": [0.7697, 0.4203, 0.829, 0.4354]}, {"w": "that", "b": [0.8351, 0.4203, 0.8696, 0.4354]}, {"w": "distorts", "b": [0.1312, 0.4385, 0.1908, 0.4533]}, {"w": "the", "b": [0.1965, 0.4385, 0.2216, 0.4533]}, {"w": "data.", "b": [0.2273, 0.4385, 0.2675, 0.4533]}, {"w": "When", "b": [0.2755, 0.4385, 0.3223, 0.4533]}, {"w": "you", "b": [0.3279, 0.4385, 0.3561, 0.4533]}, {"w": "have", "b": [0.3618, 0.4385, 0.3974, 0.4533]}, {"w": "a", "b": [0.4031, 0.4385, 0.4121, 0.4533]}, {"w": "sufficiently", "b": [0.4178, 0.4385, 0.5023, 0.4533]}, {"w": "large", "b": [0.508, 0.4385, 0.5463, 0.4533]}, {"w": "dataset,", "b": [0.5519, 0.4385, 0.6144, 0.4533]}, {"w": "noise", "b": [0.6201, 0.4385, 0.6594, 0.4533]}, {"w": "becomes", "b": [0.6651, 0.4385, 0.7311, 0.4533]}, {"w": "less", "b": [0.7367, 0.4385, 0.7641, 0.4533]}, {"w": "of", "b": [0.7698, 0.4385, 0.7843, 0.4533]}, {"w": "a", "b": [0.79, 0.4385, 0.7991, 0.4533]}, {"w": "problem", "b": [0.8048, 0.4385, 0.8691, 0.4533]}, {"w": "because", "b": [0.1312, 0.4564, 0.1922, 0.4712]}, {"w": "it", "b": [0.1974, 0.4564, 0.2094, 0.4712]}, {"w": "might", "b": [0.2147, 0.4564, 0.2603, 0.4712]}, {"w": "average", "b": [0.2656, 0.4564, 0.3244, 0.4712]}, {"w": "out.", "b": [0.3296, 0.4564, 0.3607, 0.4712]}, {"w": "On", "b": [0.3686, 0.4564, 0.3927, 0.4712]}, {"w": "the", "b": [0.398, 0.4564, 0.4231, 0.4712]}, {"w": "other", "b": [0.4283, 0.4564, 0.4696, 0.4712]}, {"w": "hand,", "b": [0.4748, 0.4564, 0.519, 0.4712]}, {"w": "if", "b": [0.5244, 0.4564, 0.535, 0.4712]}, {"w": "the", "b": [0.5402, 0.4564, 0.5653, 0.4712]}, {"w": "measurements", "b": [0.5705, 0.4564, 0.6818, 0.4712]}, {"w": "are", "b": [0.687, 0.4564, 0.7112, 0.4712]}, {"w": "consistently", "b": [0.7164, 0.4564, 0.8091, 0.4712]}, {"w": "skewed", "b": [0.8143, 0.4564, 0.8691, 0.4712]}, {"w": "in", "b": [0.1312, 0.4741, 0.1469, 0.4892]}, {"w": "one", "b": [0.1543, 0.4741, 0.1826, 0.4892]}, {"w": "direction,", "b": [0.19, 0.4741, 0.2674, 0.4892]}, {"w": "then", "b": [0.2752, 0.4741, 0.3118, 0.4892]}, {"w": "it", "b": [0.3192, 0.4741, 0.3317, 0.4892]}, {"w": "damages", "b": [0.3391, 0.4741, 0.4093, 0.4892]}, {"w": "training", "b": [0.4167, 0.4741, 0.4816, 0.4892]}, {"w": "data,", "b": [0.489, 0.4741, 0.5308, 0.4892]}, {"w": "and", "b": [0.5385, 0.4741, 0.5689, 0.4892]}, {"w": "ultimately", "b": [0.5763, 0.4741, 0.6605, 0.4892]}, {"w": "results", "b": [0.6679, 0.4741, 0.7215, 0.4892]}, {"w": "in", "b": [0.7289, 0.4741, 0.7446, 0.4892]}, {"w": "a", "b": [0.752, 0.4741, 0.7614, 0.4892]}, {"w": "poor-quality", "b": [0.7688, 0.4741, 0.8698, 0.4892]}, {"w": "model.", "b": [0.1312, 0.4922, 0.1851, 0.5072]}]}, {"id": "b_6", "type": "paragraph", "text": "Experimenter bias is the tendency to search for, interpret, favor, or recall information in a way that affirms one’s prior beliefs or hypotheses. Applied to machine learning, experimenter bias often occurs when each example in the dataset is obtained from the answers to a survey given by a particular person, one example per person.", "words": [{"w": "Experimenter", "b": [0.1312, 0.5191, 0.2584, 0.5341]}, {"w": "bias", "b": [0.2651, 0.5191, 0.3014, 0.5341]}, {"w": "is", "b": [0.3072, 0.5192, 0.3193, 0.534]}, {"w": "the", "b": [0.3251, 0.5192, 0.3502, 0.534]}, {"w": "tendency", "b": [0.356, 0.5192, 0.4269, 0.534]}, {"w": "to", "b": [0.4326, 0.5192, 0.4487, 0.534]}, {"w": "search", "b": [0.4544, 0.5192, 0.5033, 0.534]}, {"w": "for,", "b": [0.5091, 0.5192, 0.5358, 0.534]}, {"w": "interpret,", "b": [0.5416, 0.5192, 0.6156, 0.534]}, {"w": "favor,", "b": [0.6214, 0.5192, 0.6657, 0.534]}, {"w": "or", "b": [0.6715, 0.5192, 0.6876, 0.534]}, {"w": "recall", "b": [0.6934, 0.5192, 0.7357, 0.534]}, {"w": "information", "b": [0.7414, 0.5192, 0.8334, 0.534]}, {"w": "in", "b": [0.8392, 0.5192, 0.8543, 0.534]}, {"w": "a", "b": [0.86, 0.5192, 0.8691, 0.534]}, {"w": "way", "b": [0.1306, 0.5372, 0.1612, 0.552]}, {"w": "that", "b": [0.1671, 0.5372, 0.2003, 0.552]}, {"w": "affirms", "b": [0.2062, 0.5372, 0.2596, 0.552]}, {"w": "one’s", "b": [0.2655, 0.5372, 0.3048, 0.552]}, {"w": "prior", "b": [0.3107, 0.5372, 0.349, 0.552]}, {"w": "beliefs", "b": [0.3549, 0.5372, 0.4043, 0.552]}, {"w": "or", "b": [0.4102, 0.5372, 0.4263, 0.552]}, {"w": "hypotheses.", "b": [0.4323, 0.5372, 0.5234, 0.552]}, {"w": "Applied", "b": [0.5316, 0.5372, 0.5934, 0.552]}, {"w": "to", "b": [0.5993, 0.5372, 0.6154, 0.552]}, {"w": "machine", "b": [0.6213, 0.5372, 0.6861, 0.552]}, {"w": "learning,", "b": [0.692, 0.5372, 0.7604, 0.552]}, {"w": "experimenter", "b": [0.7664, 0.5372, 0.8695, 0.552]}, {"w": "bias", "b": [0.1312, 0.5551, 0.1626, 0.5699]}, {"w": "often", "b": [0.1687, 0.5551, 0.2085, 0.5699]}, {"w": "occurs", "b": [0.2147, 0.5551, 0.2647, 0.5699]}, {"w": "when", "b": [0.2709, 0.5551, 0.3122, 0.5699]}, {"w": "each", "b": [0.3183, 0.5551, 0.3531, 0.5699]}, {"w": "example", "b": [0.3592, 0.5551, 0.4242, 0.5699]}, {"w": "in", "b": [0.4303, 0.5551, 0.4455, 0.5699]}, {"w": "the", "b": [0.4516, 0.5551, 0.4768, 0.5699]}, {"w": "dataset", "b": [0.483, 0.5551, 0.5405, 0.5699]}, {"w": "is", "b": [0.5466, 0.5551, 0.5588, 0.5699]}, {"w": "obtained", "b": [0.565, 0.5551, 0.6335, 0.5699]}, {"w": "from", "b": [0.6397, 0.5551, 0.6765, 0.5699]}, {"w": "the", "b": [0.6826, 0.5551, 0.7078, 0.5699]}, {"w": "answers", "b": [0.714, 0.5551, 0.7751, 0.5699]}, {"w": "to", "b": [0.7813, 0.5551, 0.7974, 0.5699]}, {"w": "a", "b": [0.8036, 0.5551, 0.8126, 0.5699]}, {"w": "survey", "b": [0.8188, 0.5551, 0.8698, 0.5699]}, {"w": "given", "b": [0.1312, 0.573, 0.1733, 0.5879]}, {"w": "by", "b": [0.1794, 0.573, 0.1989, 0.5879]}, {"w": "a", "b": [0.2051, 0.573, 0.2143, 0.5879]}, {"w": "particular", "b": [0.2204, 0.573, 0.2995, 0.5879]}, {"w": "person,", "b": [0.3057, 0.573, 0.3638, 0.5879]}, {"w": "one", "b": [0.3699, 0.573, 0.3976, 0.5879]}, {"w": "example", "b": [0.4037, 0.573, 0.4699, 0.5879]}, {"w": "per", "b": [0.476, 0.573, 0.5022, 0.5879]}, {"w": "person.", "b": [0.5084, 0.573, 0.5665, 0.5879]}]}, {"id": "b_7", "type": "paragraph", "text": "Usually, each survey contains multiple questions. The form of those questions can significantly affect the responses. The simplest way for a question to affect the response is to provide limited response options: “Which kind of pizza do you like: pepperoni, all meats, or vegetarian?” This doesn’t leave the choice of giving a different answer, or even “Other.”", "words": [{"w": "Usually,", "b": [0.1312, 0.6, 0.1941, 0.6148]}, {"w": "each", "b": [0.1994, 0.6, 0.2341, 0.6148]}, {"w": "survey", "b": [0.2391, 0.6, 0.29, 0.6148]}, {"w": "contains", "b": [0.2951, 0.6, 0.36, 0.6148]}, {"w": "multiple", "b": [0.3651, 0.6, 0.4299, 0.6148]}, {"w": "questions.", "b": [0.435, 0.6, 0.5131, 0.6148]}, {"w": "The", "b": [0.5209, 0.6, 0.5521, 0.6148]}, {"w": "form", "b": [0.5571, 0.6, 0.5938, 0.6148]}, {"w": "of", "b": [0.5989, 0.6, 0.6135, 0.6148]}, {"w": "those", "b": [0.6186, 0.6, 0.6599, 0.6148]}, {"w": "questions", "b": [0.6649, 0.6, 0.738, 0.6148]}, {"w": "can", "b": [0.7431, 0.6, 0.7702, 0.6148]}, {"w": "significantly", "b": [0.7753, 0.6, 0.8698, 0.6148]}, {"w": "affect", "b": [0.1312, 0.6179, 0.1739, 0.6327]}, {"w": "the", "b": [0.1784, 0.6179, 0.2036, 0.6327]}, {"w": "responses.", "b": [0.2081, 0.6179, 0.2873, 0.6327]}, {"w": "The", "b": [0.295, 0.6179, 0.3261, 0.6327]}, {"w": "simplest", "b": [0.3306, 0.6179, 0.3951, 0.6327]}, {"w": "way", "b": [0.3996, 0.6179, 0.4302, 0.6327]}, {"w": "for", "b": [0.4347, 0.6179, 0.4564, 0.6327]}, {"w": "a", "b": [0.4609, 0.6179, 0.4699, 0.6327]}, {"w": "question", "b": [0.4744, 0.6179, 0.5404, 0.6327]}, {"w": "to", "b": [0.5448, 0.6179, 0.5609, 0.6327]}, {"w": "affect", "b": [0.5654, 0.6179, 0.6081, 0.6327]}, {"w": "the", "b": [0.6126, 0.6179, 0.6377, 0.6327]}, {"w": "response", "b": [0.6422, 0.6179, 0.7093, 0.6327]}, {"w": "is", "b": [0.7138, 0.6179, 0.726, 0.6327]}, {"w": "to", "b": [0.7305, 0.6179, 0.7466, 0.6327]}, {"w": "provide", "b": [0.751, 0.6179, 0.8094, 0.6327]}, {"w": "limited", "b": [0.8139, 0.6179, 0.8691, 0.6327]}, {"w": "response", "b": [0.1312, 0.6357, 0.2011, 0.6508]}, {"w": "options:", "b": [0.2075, 0.6357, 0.2725, 0.6508]}, {"w": "“Which", "b": [0.2813, 0.6357, 0.3436, 0.6508]}, {"w": "kind", "b": [0.3501, 0.6357, 0.3861, 0.6508]}, {"w": "of", "b": [0.3926, 0.6357, 0.4078, 0.6508]}, {"w": "pizza", "b": [0.4143, 0.6357, 0.4561, 0.6508]}, {"w": "do", "b": [0.4626, 0.6357, 0.4825, 0.6508]}, {"w": "you", "b": [0.4889, 0.6357, 0.5182, 0.6508]}, {"w": "like:", "b": [0.5247, 0.6357, 0.5582, 0.6508]}, {"w": "pepperoni,", "b": [0.567, 0.6357, 0.6539, 0.6508]}, {"w": "all", "b": [0.6605, 0.6357, 0.6803, 0.6508]}, {"w": "meats,", "b": [0.6868, 0.6357, 0.7402, 0.6508]}, {"w": "or", "b": [0.7468, 0.6357, 0.7636, 0.6508]}, {"w": "vegetarian?”", "b": [0.7701, 0.6357, 0.8726, 0.6508]}, {"w": "This", "b": [0.1306, 0.6537, 0.1666, 0.6687]}, {"w": "doesn’t", "b": [0.1727, 0.6537, 0.2308, 0.6687]}, {"w": "leave", "b": [0.2369, 0.6537, 0.2764, 0.6687]}, {"w": "the", "b": [0.2826, 0.6537, 0.3082, 0.6687]}, {"w": "choice", "b": [0.3143, 0.6537, 0.3631, 0.6687]}, {"w": "of", "b": [0.3692, 0.6537, 0.3841, 0.6687]}, {"w": "giving", "b": [0.3902, 0.6537, 0.4389, 0.6687]}, {"w": "a", "b": [0.4451, 0.6537, 0.4543, 0.6687]}, {"w": "different", "b": [0.4605, 0.6537, 0.5272, 0.6687]}, {"w": "answer,", "b": [0.5333, 0.6537, 0.5935, 0.6687]}, {"w": "or", "b": [0.5996, 0.6537, 0.6161, 0.6687]}, {"w": "even", "b": [0.6222, 0.6537, 0.6581, 0.6687]}, {"w": "“Other.”", "b": [0.6643, 0.6537, 0.7315, 0.6687]}]}, {"id": "b_8", "type": "paragraph", "text": "Alternatively, a survey question might be constructed with a built-in slant. Instead of asking, “Do you recycle?” an analyst with a experimenter bias might ask, “Do you dodge from", "words": [{"w": "Alternatively,", "b": [0.1305, 0.6808, 0.2376, 0.6956]}, {"w": "a", "b": [0.2436, 0.6808, 0.2526, 0.6956]}, {"w": "survey", "b": [0.2586, 0.6808, 0.3095, 0.6956]}, {"w": "question", "b": [0.3154, 0.6808, 0.3814, 0.6956]}, {"w": "might", "b": [0.3873, 0.6808, 0.433, 0.6956]}, {"w": "be", "b": [0.439, 0.6808, 0.4576, 0.6956]}, {"w": "constructed", "b": [0.4636, 0.6808, 0.5552, 0.6956]}, {"w": "with", "b": [0.5611, 0.6808, 0.5963, 0.6956]}, {"w": "a", "b": [0.6022, 0.6808, 0.6113, 0.6956]}, {"w": "built-in", "b": [0.6173, 0.6808, 0.6755, 0.6956]}, {"w": "slant.", "b": [0.6815, 0.6808, 0.7243, 0.6956]}, {"w": "Instead", "b": [0.7324, 0.6808, 0.7903, 0.6956]}, {"w": "of", "b": [0.7963, 0.6808, 0.8109, 0.6956]}, {"w": "asking,", "b": [0.8168, 0.6808, 0.8717, 0.6956]}, {"w": "“Do", "b": [0.1286, 0.6985, 0.1613, 0.7136]}, {"w": "you", "b": [0.1689, 0.6985, 0.1981, 0.7136]}, {"w": "recycle?”", "b": [0.2057, 0.6985, 0.2795, 0.7136]}, {"w": "an", "b": [0.292, 0.6985, 0.3119, 0.7136]}, {"w": "analyst", "b": [0.3194, 0.6985, 0.3787, 0.7136]}, {"w": "with", "b": [0.3862, 0.6985, 0.4228, 0.7136]}, {"w": "a", "b": [0.4304, 0.6985, 0.4398, 0.7136]}, {"w": "experimenter", "b": [0.4474, 0.6985, 0.5547, 0.7136]}, {"w": "bias", "b": [0.5623, 0.6985, 0.5948, 0.7136]}, {"w": "might", "b": [0.6024, 0.6985, 0.65, 0.7136]}, {"w": "ask,", "b": [0.6576, 0.6985, 0.6896, 0.7136]}, {"w": "“Do", "b": [0.6975, 0.6985, 0.7302, 0.7136]}, {"w": "you", "b": [0.7377, 0.6985, 0.767, 0.7136]}, {"w": "dodge", "b": [0.7746, 0.6985, 0.8232, 0.7136]}, {"w": "from", "b": [0.8308, 0.6985, 0.869, 0.7136]}]}, {"id": "b_9", "type": "paragraph", "text": "recycling?” In the former case, the respondent is more likely to give an honest answer, compared to the latter.", "words": [{"w": "recycling?”", "b": [0.1312, 0.7164, 0.2218, 0.7315]}, {"w": "In", "b": [0.2352, 0.7164, 0.2525, 0.7315]}, {"w": "the", "b": [0.2604, 0.7164, 0.2865, 0.7315]}, {"w": "former", "b": [0.2944, 0.7164, 0.3484, 0.7315]}, {"w": "case,", "b": [0.3563, 0.7164, 0.3951, 0.7315]}, {"w": "the", "b": [0.4035, 0.7164, 0.4296, 0.7315]}, {"w": "respondent", "b": [0.4375, 0.7164, 0.5277, 0.7315]}, {"w": "is", "b": [0.5356, 0.7164, 0.5482, 0.7315]}, {"w": "more", "b": [0.5561, 0.7164, 0.597, 0.7315]}, {"w": "likely", "b": [0.6049, 0.7164, 0.6483, 0.7315]}, {"w": "to", "b": [0.6562, 0.7164, 0.6729, 0.7315]}, {"w": "give", "b": [0.6809, 0.7164, 0.7133, 0.7315]}, {"w": "an", "b": [0.7212, 0.7164, 0.7411, 0.7315]}, {"w": "honest", "b": [0.749, 0.7164, 0.8024, 0.7315]}, {"w": "answer,", "b": [0.8103, 0.7164, 0.8717, 0.7315]}, {"w": "compared", "b": [0.1312, 0.7345, 0.2092, 0.7494]}, {"w": "to", "b": [0.2154, 0.7345, 0.2318, 0.7494]}, {"w": "the", "b": [0.2379, 0.7345, 0.2636, 0.7494]}, {"w": "latter.", "b": [0.2697, 0.7345, 0.319, 0.7494]}]}, {"id": "b_10", "type": "paragraph", "text": "Furthermore, experimenter bias might happen when the analyst is briefed in advance to support a particular conclusion (for example, the one in favor of doing “business as usual”). In that situation, they can exclude specific variables from the analysis as unreliable or noisy.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.7613, 0.2394, 0.7764]}, {"w": "experimenter", "b": [0.2469, 0.7613, 0.3543, 0.7764]}, {"w": "bias", "b": [0.3615, 0.7613, 0.3941, 0.7764]}, {"w": "might", "b": [0.4013, 0.7613, 0.4489, 0.7764]}, {"w": "happen", "b": [0.4562, 0.7613, 0.5163, 0.7764]}, {"w": "when", "b": [0.5236, 0.7613, 0.5665, 0.7764]}, {"w": "the", "b": [0.5737, 0.7613, 0.5999, 0.7764]}, {"w": "analyst", "b": [0.6071, 0.7613, 0.6663, 0.7764]}, {"w": "is", "b": [0.6736, 0.7613, 0.6863, 0.7764]}, {"w": "briefed", "b": [0.6935, 0.7613, 0.7495, 0.7764]}, {"w": "in", "b": [0.7568, 0.7613, 0.7725, 0.7764]}, {"w": "advance", "b": [0.7797, 0.7613, 0.8452, 0.7764]}, {"w": "to", "b": [0.8524, 0.7613, 0.8691, 0.7764]}, {"w": "support", "b": [0.1312, 0.7794, 0.1934, 0.7943]}, {"w": "a", "b": [0.1995, 0.7794, 0.2087, 0.7943]}, {"w": "particular", "b": [0.2149, 0.7794, 0.2938, 0.7943]}, {"w": "conclusion", "b": [0.3, 0.7794, 0.3831, 0.7943]}, {"w": "(for", "b": [0.3892, 0.7794, 0.4185, 0.7943]}, {"w": "example,", "b": [0.4246, 0.7794, 0.4958, 0.7943]}, {"w": "the", "b": [0.5019, 0.7794, 0.5275, 0.7943]}, {"w": "one", "b": [0.5337, 0.7794, 0.5613, 0.7943]}, {"w": "in", "b": [0.5675, 0.7794, 0.5828, 0.7943]}, {"w": "favor", "b": [0.589, 0.7794, 0.629, 0.7943]}, {"w": "of", "b": [0.6351, 0.7794, 0.65, 0.7943]}, {"w": "doing", "b": [0.6561, 0.7794, 0.7001, 0.7943]}, {"w": "“business", "b": [0.7063, 0.7794, 0.7809, 0.7943]}, {"w": "as", "b": [0.787, 0.7794, 0.8035, 0.7943]}, {"w": "usual”).", "b": [0.8096, 0.7794, 0.8727, 0.7943]}, {"w": "In", "b": [0.1312, 0.7974, 0.148, 0.8122]}, {"w": "that", "b": [0.1541, 0.7974, 0.1876, 0.8122]}, {"w": "situation,", "b": [0.1938, 0.7974, 0.269, 0.8122]}, {"w": "they", "b": [0.2752, 0.7974, 0.3102, 0.8122]}, {"w": "can", "b": [0.3163, 0.7974, 0.3437, 0.8122]}, {"w": "exclude", "b": [0.3499, 0.7974, 0.4093, 0.8122]}, {"w": "specific", "b": [0.4155, 0.7974, 0.4729, 0.8122]}, {"w": "variables", "b": [0.4791, 0.7974, 0.5488, 0.8122]}, {"w": "from", "b": [0.5549, 0.7974, 0.592, 0.8122]}, {"w": "the", "b": [0.5982, 0.7974, 0.6236, 0.8122]}, {"w": "analysis", "b": [0.6297, 0.7974, 0.6924, 0.8122]}, {"w": "as", "b": [0.6985, 0.7974, 0.7149, 0.8122]}, {"w": "unreliable", "b": [0.721, 0.7974, 0.7992, 0.8122]}, {"w": "or", "b": [0.8054, 0.7974, 0.8217, 0.8122]}, {"w": "noisy.", "b": [0.8279, 0.7974, 0.8726, 0.8122]}]}, {"id": "b_11", "type": "paragraph", "text": "Labeling bias happens when labels are assigned to unlabeled examples by a biased process or person. For example, if you ask several labelers to assign a topic to a document by reading the document, some labelers can indeed read the document entirely and assign well-thought", "words": [{"w": "Labeling", "b": [0.1312, 0.8242, 0.2106, 0.8392]}, {"w": "bias", "b": [0.2177, 0.8242, 0.2541, 0.8392]}, {"w": "happens", "b": [0.2602, 0.8243, 0.3254, 0.8391]}, {"w": "when", "b": [0.3315, 0.8243, 0.3729, 0.8391]}, {"w": "labels", "b": [0.379, 0.8243, 0.4241, 0.8391]}, {"w": "are", "b": [0.4302, 0.8243, 0.4545, 0.8391]}, {"w": "assigned", "b": [0.4606, 0.8243, 0.5264, 0.8391]}, {"w": "to", "b": [0.5326, 0.8243, 0.5487, 0.8391]}, {"w": "unlabeled", "b": [0.5548, 0.8243, 0.6311, 0.8391]}, {"w": "examples", "b": [0.6372, 0.8243, 0.7094, 0.8391]}, {"w": "by", "b": [0.7156, 0.8243, 0.7347, 0.8391]}, {"w": "a", "b": [0.7409, 0.8243, 0.75, 0.8391]}, {"w": "biased", "b": [0.7561, 0.8243, 0.8057, 0.8391]}, {"w": "process", "b": [0.8118, 0.8243, 0.8691, 0.8391]}, {"w": "or", "b": [0.1312, 0.8423, 0.1474, 0.8571]}, {"w": "person.", "b": [0.153, 0.8423, 0.21, 0.8571]}, {"w": "For", "b": [0.218, 0.8423, 0.2444, 0.8571]}, {"w": "example,", "b": [0.2501, 0.8423, 0.32, 0.8571]}, {"w": "if", "b": [0.3257, 0.8423, 0.3363, 0.8571]}, {"w": "you", "b": [0.342, 0.8423, 0.3701, 0.8571]}, {"w": "ask", "b": [0.3758, 0.8423, 0.4015, 0.8571]}, {"w": "several", "b": [0.4072, 0.8423, 0.4606, 0.8571]}, {"w": "labelers", "b": [0.4663, 0.8423, 0.5263, 0.8571]}, {"w": "to", "b": [0.532, 0.8423, 0.548, 0.8571]}, {"w": "assign", "b": [0.5537, 0.8423, 0.6012, 0.8571]}, {"w": "a", "b": [0.6069, 0.8423, 0.6159, 0.8571]}, {"w": "topic", "b": [0.6216, 0.8423, 0.6608, 0.8571]}, {"w": "to", "b": [0.6664, 0.8423, 0.6825, 0.8571]}, {"w": "a", "b": [0.6882, 0.8423, 0.6973, 0.8571]}, {"w": "document", "b": [0.7029, 0.8423, 0.7803, 0.8571]}, {"w": "by", "b": [0.786, 0.8423, 0.8051, 0.8571]}, {"w": "reading", "b": [0.8108, 0.8423, 0.8691, 0.8571]}, {"w": "the", "b": [0.1312, 0.8602, 0.1567, 0.8751]}, {"w": "document,", "b": [0.1628, 0.8602, 0.2463, 0.8751]}, {"w": "some", "b": [0.2524, 0.8602, 0.2922, 0.8751]}, {"w": "labelers", "b": [0.2984, 0.8602, 0.3591, 0.8751]}, {"w": "can", "b": [0.3652, 0.8602, 0.3927, 0.8751]}, {"w": "indeed", "b": [0.3989, 0.8602, 0.4508, 0.8751]}, {"w": "read", "b": [0.4569, 0.8602, 0.4916, 0.8751]}, {"w": "the", "b": [0.4978, 0.8602, 0.5232, 0.8751]}, {"w": "document", "b": [0.5294, 0.8602, 0.6077, 0.8751]}, {"w": "entirely", "b": [0.6139, 0.8602, 0.674, 0.8751]}, {"w": "and", "b": [0.6801, 0.8602, 0.7096, 0.8751]}, {"w": "assign", "b": [0.7158, 0.8602, 0.7638, 0.8751]}, {"w": "well-thought", "b": [0.77, 0.8602, 0.8696, 0.8751]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 15", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "15", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 59, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "labels. In contrast, others could just try to quickly “scan” the text, spot some keyphrases and choose the topic that corresponds the best to the selected keyphrases. Because each person’s brain pays more attention to keyphrases from a specific domain or domains and less to others, the labels assigned by labelers who scan the text without reading will be biased.", "words": [{"w": "labels.", "b": [0.1312, 0.0883, 0.1831, 0.1034]}, {"w": "In", "b": [0.1915, 0.0883, 0.2088, 0.1034]}, {"w": "contrast,", "b": [0.215, 0.0883, 0.2868, 0.1034]}, {"w": "others", "b": [0.293, 0.0883, 0.3434, 0.1034]}, {"w": "could", "b": [0.3496, 0.0883, 0.3936, 0.1034]}, {"w": "just", "b": [0.3998, 0.0883, 0.4307, 0.1034]}, {"w": "try", "b": [0.437, 0.0883, 0.4616, 0.1034]}, {"w": "to", "b": [0.4678, 0.0883, 0.4845, 0.1034]}, {"w": "quickly", "b": [0.4908, 0.0883, 0.5494, 0.1034]}, {"w": "“scan”", "b": [0.5556, 0.0883, 0.609, 0.1034]}, {"w": "the", "b": [0.6152, 0.0883, 0.6414, 0.1034]}, {"w": "text,", "b": [0.6476, 0.0883, 0.6858, 0.1034]}, {"w": "spot", "b": [0.692, 0.0883, 0.7272, 0.1034]}, {"w": "some", "b": [0.7334, 0.0883, 0.7743, 0.1034]}, {"w": "keyphrases", "b": [0.7805, 0.0883, 0.8692, 0.1034]}, {"w": "and", "b": [0.1312, 0.1062, 0.1616, 0.1213]}, {"w": "choose", "b": [0.1684, 0.1062, 0.2219, 0.1213]}, {"w": "the", "b": [0.2288, 0.1062, 0.2549, 0.1213]}, {"w": "topic", "b": [0.2618, 0.1062, 0.3026, 0.1213]}, {"w": "that", "b": [0.3095, 0.1062, 0.344, 0.1213]}, {"w": "corresponds", "b": [0.3508, 0.1062, 0.4479, 0.1213]}, {"w": "the", "b": [0.4548, 0.1062, 0.481, 0.1213]}, {"w": "best", "b": [0.4878, 0.1062, 0.5219, 0.1213]}, {"w": "to", "b": [0.5288, 0.1062, 0.5455, 0.1213]}, {"w": "the", "b": [0.5524, 0.1062, 0.5785, 0.1213]}, {"w": "selected", "b": [0.5854, 0.1062, 0.6493, 0.1213]}, {"w": "keyphrases.", "b": [0.6562, 0.1062, 0.7501, 0.1213]}, {"w": "Because", "b": [0.7605, 0.1062, 0.8262, 0.1213]}, {"w": "each", "b": [0.8331, 0.1062, 0.8692, 0.1213]}, {"w": "person’s", "b": [0.1312, 0.1244, 0.1953, 0.1392]}, {"w": "brain", "b": [0.2015, 0.1244, 0.2427, 0.1392]}, {"w": "pays", "b": [0.2489, 0.1244, 0.2841, 0.1392]}, {"w": "more", "b": [0.2903, 0.1244, 0.3295, 0.1392]}, {"w": "attention", "b": [0.3356, 0.1244, 0.4075, 0.1392]}, {"w": "to", "b": [0.4136, 0.1244, 0.4297, 0.1392]}, {"w": "keyphrases", "b": [0.4358, 0.1244, 0.521, 0.1392]}, {"w": "from", "b": [0.5272, 0.1244, 0.5639, 0.1392]}, {"w": "a", "b": [0.57, 0.1244, 0.5791, 0.1392]}, {"w": "specific", "b": [0.5852, 0.1244, 0.6421, 0.1392]}, {"w": "domain", "b": [0.6483, 0.1244, 0.7065, 0.1392]}, {"w": "or", "b": [0.7127, 0.1244, 0.7288, 0.1392]}, {"w": "domains", "b": [0.7349, 0.1244, 0.8003, 0.1392]}, {"w": "and", "b": [0.8065, 0.1244, 0.8356, 0.1392]}, {"w": "less", "b": [0.8418, 0.1244, 0.8691, 0.1392]}, {"w": "to", "b": [0.1312, 0.1422, 0.1476, 0.1572]}, {"w": "others,", "b": [0.1538, 0.1422, 0.2083, 0.1572]}, {"w": "the", "b": [0.2144, 0.1422, 0.2401, 0.1572]}, {"w": "labels", "b": [0.2462, 0.1422, 0.292, 0.1572]}, {"w": "assigned", "b": [0.2981, 0.1422, 0.365, 0.1572]}, {"w": "by", "b": [0.3712, 0.1422, 0.3906, 0.1572]}, {"w": "labelers", "b": [0.3968, 0.1422, 0.458, 0.1572]}, {"w": "who", "b": [0.4641, 0.1422, 0.4969, 0.1572]}, {"w": "scan", "b": [0.5031, 0.1422, 0.5381, 0.1572]}, {"w": "the", "b": [0.5442, 0.1422, 0.5699, 0.1572]}, {"w": "text", "b": [0.576, 0.1422, 0.6083, 0.1572]}, {"w": "without", "b": [0.6145, 0.1422, 0.677, 0.1572]}, {"w": "reading", "b": [0.6831, 0.1422, 0.7427, 0.1572]}, {"w": "will", "b": [0.7488, 0.1422, 0.7775, 0.1572]}, {"w": "be", "b": [0.7837, 0.1422, 0.8027, 0.1572]}, {"w": "biased.", "b": [0.8088, 0.1422, 0.8643, 0.1572]}]}, {"id": "b_1", "type": "paragraph", "text": "Alternatively, some labelers would be more interested in reading documents on some topics that they personally prefer. If it’s the case, a labeler might skip uninteresting documents, and the latter will be underrepresented in your data.", "words": [{"w": "Alternatively,", "b": [0.1305, 0.1691, 0.2399, 0.1841]}, {"w": "some", "b": [0.2461, 0.1691, 0.2862, 0.1841]}, {"w": "labelers", "b": [0.2924, 0.1691, 0.3536, 0.1841]}, {"w": "would", "b": [0.3598, 0.1691, 0.4075, 0.1841]}, {"w": "be", "b": [0.4137, 0.1691, 0.4327, 0.1841]}, {"w": "more", "b": [0.4389, 0.1691, 0.4789, 0.1841]}, {"w": "interested", "b": [0.4851, 0.1691, 0.5638, 0.1841]}, {"w": "in", "b": [0.57, 0.1691, 0.5854, 0.1841]}, {"w": "reading", "b": [0.5916, 0.1691, 0.6512, 0.1841]}, {"w": "documents", "b": [0.6573, 0.1691, 0.7437, 0.1841]}, {"w": "on", "b": [0.7498, 0.1691, 0.7693, 0.1841]}, {"w": "some", "b": [0.7755, 0.1691, 0.8156, 0.1841]}, {"w": "topics", "b": [0.8218, 0.1691, 0.8691, 0.1841]}, {"w": "that", "b": [0.1312, 0.187, 0.1657, 0.2021]}, {"w": "they", "b": [0.1721, 0.187, 0.2082, 0.2021]}, {"w": "personally", "b": [0.2145, 0.187, 0.2983, 0.2021]}, {"w": "prefer.", "b": [0.3047, 0.187, 0.3576, 0.2021]}, {"w": "If", "b": [0.3663, 0.187, 0.3789, 0.2021]}, {"w": "it’s", "b": [0.3852, 0.187, 0.4104, 0.2021]}, {"w": "the", "b": [0.4168, 0.187, 0.4429, 0.2021]}, {"w": "case,", "b": [0.4493, 0.187, 0.4881, 0.2021]}, {"w": "a", "b": [0.4945, 0.187, 0.5039, 0.2021]}, {"w": "labeler", "b": [0.5102, 0.187, 0.5652, 0.2021]}, {"w": "might", "b": [0.5715, 0.187, 0.6191, 0.2021]}, {"w": "skip", "b": [0.6254, 0.187, 0.6585, 0.2021]}, {"w": "uninteresting", "b": [0.6648, 0.187, 0.7722, 0.2021]}, {"w": "documents,", "b": [0.7785, 0.187, 0.8717, 0.2021]}, {"w": "and", "b": [0.1312, 0.205, 0.161, 0.22]}, {"w": "the", "b": [0.1671, 0.205, 0.1928, 0.22]}, {"w": "latter", "b": [0.1989, 0.205, 0.2431, 0.22]}, {"w": "will", "b": [0.2492, 0.205, 0.2779, 0.22]}, {"w": "be", "b": [0.2841, 0.205, 0.3031, 0.22]}, {"w": "underrepresented", "b": [0.3092, 0.205, 0.4474, 0.22]}, {"w": "in", "b": [0.4536, 0.205, 0.469, 0.22]}, {"w": "your", "b": [0.4751, 0.205, 0.511, 0.22]}, {"w": "data.", "b": [0.5172, 0.205, 0.5582, 0.22]}]}, {"id": "b_2", "type": "paragraph", "text": "Ways to Avoid Bias", "words": [{"w": "Ways", "b": [0.1312, 0.2297, 0.1893, 0.2476]}, {"w": "to", "b": [0.1976, 0.2297, 0.2197, 0.2476]}, {"w": "Avoid", "b": [0.228, 0.2297, 0.2898, 0.2476]}, {"w": "Bias", "b": [0.2981, 0.2297, 0.3447, 0.2476]}]}, {"id": "b_3", "type": "paragraph", "text": "It is usually impossible to know exactly what biases are present in a dataset. Furthermore, even knowing there are biases, avoiding them is a challenging task. First of all, be prepared.", "words": [{"w": "It", "b": [0.1312, 0.2588, 0.1452, 0.2739]}, {"w": "is", "b": [0.1513, 0.2588, 0.1638, 0.2739]}, {"w": "usually", "b": [0.17, 0.2588, 0.2274, 0.2739]}, {"w": "impossible", "b": [0.2336, 0.2588, 0.318, 0.2739]}, {"w": "to", "b": [0.3241, 0.2588, 0.3407, 0.2739]}, {"w": "know", "b": [0.3468, 0.2588, 0.3892, 0.2739]}, {"w": "exactly", "b": [0.3953, 0.2588, 0.4532, 0.2739]}, {"w": "what", "b": [0.4593, 0.2588, 0.4996, 0.2739]}, {"w": "biases", "b": [0.5057, 0.2588, 0.5535, 0.2739]}, {"w": "are", "b": [0.5596, 0.2588, 0.5845, 0.2739]}, {"w": "present", "b": [0.5906, 0.2588, 0.6492, 0.2739]}, {"w": "in", "b": [0.6553, 0.2588, 0.6708, 0.2739]}, {"w": "a", "b": [0.677, 0.2588, 0.6863, 0.2739]}, {"w": "dataset.", "b": [0.6924, 0.2588, 0.7566, 0.2739]}, {"w": "Furthermore,", "b": [0.7648, 0.2588, 0.8717, 0.2739]}, {"w": "even", "b": [0.1312, 0.2769, 0.1668, 0.2918]}, {"w": "knowing", "b": [0.173, 0.2769, 0.2391, 0.2918]}, {"w": "there", "b": [0.2453, 0.2769, 0.286, 0.2918]}, {"w": "are", "b": [0.2922, 0.2769, 0.3166, 0.2918]}, {"w": "biases,", "b": [0.3228, 0.2769, 0.3749, 0.2918]}, {"w": "avoiding", "b": [0.381, 0.2769, 0.4476, 0.2918]}, {"w": "them", "b": [0.4538, 0.2769, 0.4945, 0.2918]}, {"w": "is", "b": [0.5006, 0.2769, 0.5129, 0.2918]}, {"w": "a", "b": [0.5191, 0.2769, 0.5282, 0.2918]}, {"w": "challenging", "b": [0.5344, 0.2769, 0.6234, 0.2918]}, {"w": "task.", "b": [0.6296, 0.2769, 0.6678, 0.2918]}, {"w": "First", "b": [0.676, 0.2769, 0.7146, 0.2918]}, {"w": "of", "b": [0.7207, 0.2769, 0.7355, 0.2918]}, {"w": "all,", "b": [0.7416, 0.2769, 0.766, 0.2918]}, {"w": "be", "b": [0.7722, 0.2769, 0.791, 0.2918]}, {"w": "prepared.", "b": [0.7972, 0.2769, 0.8725, 0.2918]}]}, {"id": "b_4", "type": "paragraph", "text": "A good habit is to question everything: who created the data, what were their motivations and quality criteria, and more importantly, how and why the data was created. If the data is a result of some research, question the research method and make sure that it doesn’t contribute to any of the biases described above.", "words": [{"w": "A", "b": [0.1305, 0.3037, 0.1444, 0.3187]}, {"w": "good", "b": [0.1506, 0.3037, 0.1897, 0.3187]}, {"w": "habit", "b": [0.1959, 0.3037, 0.2381, 0.3187]}, {"w": "is", "b": [0.2443, 0.3037, 0.2568, 0.3187]}, {"w": "to", "b": [0.2629, 0.3037, 0.2794, 0.3187]}, {"w": "question", "b": [0.2856, 0.3037, 0.3532, 0.3187]}, {"w": "everything:", "b": [0.3594, 0.3037, 0.4496, 0.3187]}, {"w": "who", "b": [0.4578, 0.3037, 0.4908, 0.3187]}, {"w": "created", "b": [0.4969, 0.3037, 0.5557, 0.3187]}, {"w": "the", "b": [0.5619, 0.3037, 0.5877, 0.3187]}, {"w": "data,", "b": [0.5938, 0.3037, 0.635, 0.3187]}, {"w": "what", "b": [0.6412, 0.3037, 0.6814, 0.3187]}, {"w": "were", "b": [0.6875, 0.3037, 0.7242, 0.3187]}, {"w": "their", "b": [0.7303, 0.3037, 0.7685, 0.3187]}, {"w": "motivations", "b": [0.7747, 0.3037, 0.8691, 0.3187]}, {"w": "and", "b": [0.1312, 0.3217, 0.1611, 0.3367]}, {"w": "quality", "b": [0.1673, 0.3217, 0.2234, 0.3367]}, {"w": "criteria,", "b": [0.2295, 0.3217, 0.2924, 0.3367]}, {"w": "and", "b": [0.2986, 0.3217, 0.3285, 0.3367]}, {"w": "more", "b": [0.3346, 0.3217, 0.3748, 0.3367]}, {"w": "importantly,", "b": [0.381, 0.3217, 0.4809, 0.3367]}, {"w": "how", "b": [0.4871, 0.3217, 0.5195, 0.3367]}, {"w": "and", "b": [0.5256, 0.3217, 0.5555, 0.3367]}, {"w": "why", "b": [0.5617, 0.3217, 0.5946, 0.3367]}, {"w": "the", "b": [0.6008, 0.3217, 0.6265, 0.3367]}, {"w": "data", "b": [0.6327, 0.3217, 0.6687, 0.3367]}, {"w": "was", "b": [0.6749, 0.3217, 0.7043, 0.3367]}, {"w": "created.", "b": [0.7104, 0.3217, 0.7744, 0.3367]}, {"w": "If", "b": [0.7826, 0.3217, 0.795, 0.3367]}, {"w": "the", "b": [0.8011, 0.3217, 0.8268, 0.3367]}, {"w": "data", "b": [0.833, 0.3217, 0.869, 0.3367]}, {"w": "is", "b": [0.1312, 0.3395, 0.1439, 0.3546]}, {"w": "a", "b": [0.1509, 0.3395, 0.1603, 0.3546]}, {"w": "result", "b": [0.1673, 0.3395, 0.2135, 0.3546]}, {"w": "of", "b": [0.2205, 0.3395, 0.2357, 0.3546]}, {"w": "some", "b": [0.2427, 0.3395, 0.2836, 0.3546]}, {"w": "research,", "b": [0.2906, 0.3395, 0.3625, 0.3546]}, {"w": "question", "b": [0.3698, 0.3395, 0.4384, 0.3546]}, {"w": "the", "b": [0.4454, 0.3395, 0.4715, 0.3546]}, {"w": "research", "b": [0.4786, 0.3395, 0.5452, 0.3546]}, {"w": "method", "b": [0.5522, 0.3395, 0.6144, 0.3546]}, {"w": "and", "b": [0.6214, 0.3395, 0.6518, 0.3546]}, {"w": "make", "b": [0.6588, 0.3395, 0.7017, 0.3546]}, {"w": "sure", "b": [0.7087, 0.3395, 0.7423, 0.3546]}, {"w": "that", "b": [0.7494, 0.3395, 0.7839, 0.3546]}, {"w": "it", "b": [0.7909, 0.3395, 0.8034, 0.3546]}, {"w": "doesn’t", "b": [0.8104, 0.3395, 0.8696, 0.3546]}, {"w": "contribute", "b": [0.1312, 0.3576, 0.2138, 0.3726]}, {"w": "to", "b": [0.22, 0.3576, 0.2364, 0.3726]}, {"w": "any", "b": [0.2426, 0.3576, 0.2713, 0.3726]}, {"w": "of", "b": [0.2774, 0.3576, 0.2923, 0.3726]}, {"w": "the", "b": [0.2984, 0.3576, 0.3241, 0.3726]}, {"w": "biases", "b": [0.3302, 0.3576, 0.3776, 0.3726]}, {"w": "described", "b": [0.3838, 0.3576, 0.4593, 0.3726]}, {"w": "above.", "b": [0.4655, 0.3576, 0.5167, 0.3726]}]}, {"id": "b_5", "type": "paragraph", "text": "Selection bias can be avoided by systematically questioning the reason why a specific data source was chosen. If the reason is simplicity or low cost, then pay careful attention. Recall the example whether a specific customer would subscribe to your new offering. Training the model using only the data about your current customers is likely a bad idea, because your existing customers are more loyal to your brand than a random potential customer. Your estimates of model’s quality will be overly optimistic.", "words": [{"w": "Selection", "b": [0.1312, 0.3845, 0.2143, 0.3995]}, {"w": "bias", "b": [0.2214, 0.3845, 0.2578, 0.3995]}, {"w": "can", "b": [0.2639, 0.3846, 0.2912, 0.3994]}, {"w": "be", "b": [0.2973, 0.3846, 0.316, 0.3994]}, {"w": "avoided", "b": [0.3222, 0.3846, 0.3822, 0.3994]}, {"w": "by", "b": [0.3884, 0.3846, 0.4075, 0.3994]}, {"w": "systematically", "b": [0.4137, 0.3846, 0.5259, 0.3994]}, {"w": "questioning", "b": [0.5321, 0.3846, 0.6225, 0.3994]}, {"w": "the", "b": [0.6286, 0.3846, 0.6539, 0.3994]}, {"w": "reason", "b": [0.66, 0.3846, 0.7106, 0.3994]}, {"w": "why", "b": [0.7168, 0.3846, 0.7491, 0.3994]}, {"w": "a", "b": [0.7552, 0.3846, 0.7643, 0.3994]}, {"w": "specific", "b": [0.7705, 0.3846, 0.8276, 0.3994]}, {"w": "data", "b": [0.8338, 0.3846, 0.8691, 0.3994]}, {"w": "source", "b": [0.1312, 0.4025, 0.1814, 0.4174]}, {"w": "was", "b": [0.1876, 0.4025, 0.2167, 0.4174]}, {"w": "chosen.", "b": [0.2229, 0.4025, 0.2806, 0.4174]}, {"w": "If", "b": [0.2888, 0.4025, 0.3011, 0.4174]}, {"w": "the", "b": [0.3073, 0.4025, 0.3328, 0.4174]}, {"w": "reason", "b": [0.3389, 0.4025, 0.3901, 0.4174]}, {"w": "is", "b": [0.3963, 0.4025, 0.4086, 0.4174]}, {"w": "simplicity", "b": [0.4148, 0.4025, 0.4924, 0.4174]}, {"w": "or", "b": [0.4986, 0.4025, 0.5149, 0.4174]}, {"w": "low", "b": [0.5211, 0.4025, 0.5481, 0.4174]}, {"w": "cost,", "b": [0.5543, 0.4025, 0.5911, 0.4174]}, {"w": "then", "b": [0.5973, 0.4025, 0.633, 0.4174]}, {"w": "pay", "b": [0.6391, 0.4025, 0.6677, 0.4174]}, {"w": "careful", "b": [0.6738, 0.4025, 0.7275, 0.4174]}, {"w": "attention.", "b": [0.7336, 0.4025, 0.8117, 0.4174]}, {"w": "Recall", "b": [0.8199, 0.4025, 0.8691, 0.4174]}, {"w": "the", "b": [0.1312, 0.4205, 0.1566, 0.4354]}, {"w": "example", "b": [0.1628, 0.4205, 0.2283, 0.4354]}, {"w": "whether", "b": [0.2344, 0.4205, 0.2985, 0.4354]}, {"w": "a", "b": [0.3046, 0.4205, 0.3138, 0.4354]}, {"w": "specific", "b": [0.3199, 0.4205, 0.3775, 0.4354]}, {"w": "customer", "b": [0.3836, 0.4205, 0.4559, 0.4354]}, {"w": "would", "b": [0.462, 0.4205, 0.5093, 0.4354]}, {"w": "subscribe", "b": [0.5154, 0.4205, 0.5893, 0.4354]}, {"w": "to", "b": [0.5955, 0.4205, 0.6117, 0.4354]}, {"w": "your", "b": [0.6178, 0.4205, 0.6535, 0.4354]}, {"w": "new", "b": [0.6596, 0.4205, 0.6911, 0.4354]}, {"w": "offering.", "b": [0.6972, 0.4205, 0.7618, 0.4354]}, {"w": "Training", "b": [0.77, 0.4205, 0.8376, 0.4354]}, {"w": "the", "b": [0.8437, 0.4205, 0.8691, 0.4354]}, {"w": "model", "b": [0.1312, 0.4383, 0.1806, 0.4533]}, {"w": "using", "b": [0.1867, 0.4383, 0.2294, 0.4533]}, {"w": "only", "b": [0.2356, 0.4383, 0.2704, 0.4533]}, {"w": "the", "b": [0.2765, 0.4383, 0.3025, 0.4533]}, {"w": "data", "b": [0.3086, 0.4383, 0.345, 0.4533]}, {"w": "about", "b": [0.3512, 0.4383, 0.3984, 0.4533]}, {"w": "your", "b": [0.4046, 0.4383, 0.441, 0.4533]}, {"w": "current", "b": [0.4471, 0.4383, 0.506, 0.4533]}, {"w": "customers", "b": [0.5121, 0.4383, 0.5934, 0.4533]}, {"w": "is", "b": [0.5996, 0.4383, 0.6121, 0.4533]}, {"w": "likely", "b": [0.6183, 0.4383, 0.6614, 0.4533]}, {"w": "a", "b": [0.6676, 0.4383, 0.6769, 0.4533]}, {"w": "bad", "b": [0.6831, 0.4383, 0.7132, 0.4533]}, {"w": "idea,", "b": [0.7194, 0.4383, 0.7578, 0.4533]}, {"w": "because", "b": [0.764, 0.4383, 0.8269, 0.4533]}, {"w": "your", "b": [0.8331, 0.4383, 0.8695, 0.4533]}, {"w": "existing", "b": [0.1312, 0.4562, 0.1946, 0.4713]}, {"w": "customers", "b": [0.201, 0.4562, 0.2828, 0.4713]}, {"w": "are", "b": [0.2891, 0.4562, 0.3143, 0.4713]}, {"w": "more", "b": [0.3206, 0.4562, 0.3615, 0.4713]}, {"w": "loyal", "b": [0.3678, 0.4562, 0.406, 0.4713]}, {"w": "to", "b": [0.4123, 0.4562, 0.429, 0.4713]}, {"w": "your", "b": [0.4354, 0.4562, 0.472, 0.4713]}, {"w": "brand", "b": [0.4784, 0.4562, 0.5265, 0.4713]}, {"w": "than", "b": [0.5329, 0.4562, 0.5705, 0.4713]}, {"w": "a", "b": [0.5768, 0.4562, 0.5862, 0.4713]}, {"w": "random", "b": [0.5926, 0.4562, 0.6554, 0.4713]}, {"w": "potential", "b": [0.6617, 0.4562, 0.7349, 0.4713]}, {"w": "customer.", "b": [0.7412, 0.4562, 0.8209, 0.4713]}, {"w": "Your", "b": [0.8296, 0.4562, 0.8694, 0.4713]}, {"w": "estimates", "b": [0.1312, 0.4743, 0.2063, 0.4892]}, {"w": "of", "b": [0.2124, 0.4743, 0.2273, 0.4892]}, {"w": "model’s", "b": [0.2335, 0.4743, 0.2946, 0.4892]}, {"w": "quality", "b": [0.3007, 0.4743, 0.3566, 0.4892]}, {"w": "will", "b": [0.3628, 0.4743, 0.3915, 0.4892]}, {"w": "be", "b": [0.3976, 0.4743, 0.4166, 0.4892]}, {"w": "overly", "b": [0.4228, 0.4743, 0.471, 0.4892]}, {"w": "optimistic.", "b": [0.4772, 0.4743, 0.5624, 0.4892]}]}, {"id": "b_6", "type": "paragraph", "text": "Self-selection bias cannot be completely eliminated. It usually appears in surveys; the mere consent of the responder to answer the questions represents self-selection bias. The longer the survey, the less likely the respondent will answer with a high degree of attention. Therefore, keep your survey short and provide an incentive to give quality answers.", "words": [{"w": "Self-selection", "b": [0.1312, 0.5012, 0.2519, 0.5161]}, {"w": "bias", "b": [0.26, 0.5012, 0.2964, 0.5161]}, {"w": "cannot", "b": [0.3035, 0.5011, 0.3589, 0.5162]}, {"w": "be", "b": [0.366, 0.5011, 0.3854, 0.5162]}, {"w": "completely", "b": [0.3924, 0.5011, 0.4808, 0.5162]}, {"w": "eliminated.", "b": [0.4879, 0.5011, 0.5789, 0.5162]}, {"w": "It", "b": [0.5899, 0.5011, 0.604, 0.5162]}, {"w": "usually", "b": [0.6111, 0.5011, 0.6693, 0.5162]}, {"w": "appears", "b": [0.6764, 0.5011, 0.7398, 0.5162]}, {"w": "in", "b": [0.7469, 0.5011, 0.7626, 0.5162]}, {"w": "surveys;", "b": [0.7697, 0.5011, 0.8353, 0.5162]}, {"w": "the", "b": [0.8429, 0.5011, 0.8691, 0.5162]}, {"w": "mere", "b": [0.1312, 0.519, 0.171, 0.5341]}, {"w": "consent", "b": [0.1778, 0.519, 0.2391, 0.5341]}, {"w": "of", "b": [0.2459, 0.519, 0.261, 0.5341]}, {"w": "the", "b": [0.2678, 0.519, 0.2939, 0.5341]}, {"w": "responder", "b": [0.3007, 0.519, 0.3809, 0.5341]}, {"w": "to", "b": [0.3877, 0.519, 0.4044, 0.5341]}, {"w": "answer", "b": [0.4112, 0.519, 0.4673, 0.5341]}, {"w": "the", "b": [0.474, 0.519, 0.5002, 0.5341]}, {"w": "questions", "b": [0.507, 0.519, 0.583, 0.5341]}, {"w": "represents", "b": [0.5898, 0.519, 0.6722, 0.5341]}, {"w": "self-selection", "b": [0.679, 0.519, 0.7823, 0.5341]}, {"w": "bias.", "b": [0.789, 0.519, 0.8268, 0.5341]}, {"w": "The", "b": [0.8368, 0.519, 0.8692, 0.5341]}, {"w": "longer", "b": [0.1312, 0.5371, 0.1806, 0.552]}, {"w": "the", "b": [0.1867, 0.5371, 0.2124, 0.552]}, {"w": "survey,", "b": [0.2185, 0.5371, 0.2741, 0.552]}, {"w": "the", "b": [0.2802, 0.5371, 0.3059, 0.552]}, {"w": "less", "b": [0.312, 0.5371, 0.34, 0.552]}, {"w": "likely", "b": [0.3461, 0.5371, 0.3887, 0.552]}, {"w": "the", "b": [0.3948, 0.5371, 0.4205, 0.552]}, {"w": "respondent", "b": [0.4266, 0.5371, 0.5151, 0.552]}, {"w": "will", "b": [0.5212, 0.5371, 0.5499, 0.552]}, {"w": "answer", "b": [0.556, 0.5371, 0.6111, 0.552]}, {"w": "with", "b": [0.6172, 0.5371, 0.6532, 0.552]}, {"w": "a", "b": [0.6593, 0.5371, 0.6685, 0.552]}, {"w": "high", "b": [0.6747, 0.5371, 0.7095, 0.552]}, {"w": "degree", "b": [0.7157, 0.5371, 0.7671, 0.552]}, {"w": "of", "b": [0.7732, 0.5371, 0.7881, 0.552]}, {"w": "attention.", "b": [0.7942, 0.5371, 0.8727, 0.552]}, {"w": "Therefore,", "b": [0.1306, 0.555, 0.2132, 0.57]}, {"w": "keep", "b": [0.2194, 0.555, 0.2553, 0.57]}, {"w": "your", "b": [0.2614, 0.555, 0.2974, 0.57]}, {"w": "survey", "b": [0.3035, 0.555, 0.3555, 0.57]}, {"w": "short", "b": [0.3616, 0.555, 0.4028, 0.57]}, {"w": "and", "b": [0.409, 0.555, 0.4387, 0.57]}, {"w": "provide", "b": [0.4449, 0.555, 0.5044, 0.57]}, {"w": "an", "b": [0.5105, 0.555, 0.53, 0.57]}, {"w": "incentive", "b": [0.5362, 0.555, 0.6075, 0.57]}, {"w": "to", "b": [0.6136, 0.555, 0.63, 0.57]}, {"w": "give", "b": [0.6362, 0.555, 0.6679, 0.57]}, {"w": "quality", "b": [0.6741, 0.555, 0.73, 0.57]}, {"w": "answers.", "b": [0.7361, 0.555, 0.8036, 0.57]}]}, {"id": "b_7", "type": "paragraph", "text": "Pre-select responders to reduce self-selection. Don’t ask entrepreneurs whether they consider themselves successful. Rather, build a list based on references from experts or publications, and only contact those individuals.", "words": [{"w": "Pre-select", "b": [0.1312, 0.582, 0.2082, 0.5969]}, {"w": "responders", "b": [0.2144, 0.582, 0.2988, 0.5969]}, {"w": "to", "b": [0.305, 0.582, 0.3211, 0.5969]}, {"w": "reduce", "b": [0.3272, 0.582, 0.3787, 0.5969]}, {"w": "self-selection.", "b": [0.3848, 0.582, 0.4893, 0.5969]}, {"w": "Don’t", "b": [0.4975, 0.582, 0.5426, 0.5969]}, {"w": "ask", "b": [0.5488, 0.582, 0.5745, 0.5969]}, {"w": "entrepreneurs", "b": [0.5807, 0.582, 0.6882, 0.5969]}, {"w": "whether", "b": [0.6944, 0.582, 0.7579, 0.5969]}, {"w": "they", "b": [0.7641, 0.582, 0.7988, 0.5969]}, {"w": "consider", "b": [0.805, 0.582, 0.8696, 0.5969]}, {"w": "themselves", "b": [0.1312, 0.5999, 0.2178, 0.6148]}, {"w": "successful.", "b": [0.2239, 0.5999, 0.307, 0.6148]}, {"w": "Rather,", "b": [0.3152, 0.5999, 0.3761, 0.6148]}, {"w": "build", "b": [0.3822, 0.5999, 0.4233, 0.6148]}, {"w": "a", "b": [0.4294, 0.5999, 0.4387, 0.6148]}, {"w": "list", "b": [0.4448, 0.5999, 0.4696, 0.6148]}, {"w": "based", "b": [0.4757, 0.5999, 0.521, 0.6148]}, {"w": "on", "b": [0.5272, 0.5999, 0.5467, 0.6148]}, {"w": "references", "b": [0.5528, 0.5999, 0.6317, 0.6148]}, {"w": "from", "b": [0.6378, 0.5999, 0.6753, 0.6148]}, {"w": "experts", "b": [0.6814, 0.5999, 0.7402, 0.6148]}, {"w": "or", "b": [0.7463, 0.5999, 0.7628, 0.6148]}, {"w": "publications,", "b": [0.7689, 0.5999, 0.8718, 0.6148]}, {"w": "and", "b": [0.1312, 0.6178, 0.161, 0.6328]}, {"w": "only", "b": [0.1671, 0.6178, 0.2015, 0.6328]}, {"w": "contact", "b": [0.2076, 0.6178, 0.2666, 0.6328]}, {"w": "those", "b": [0.2727, 0.6178, 0.3149, 0.6328]}, {"w": "individuals.", "b": [0.321, 0.6178, 0.414, 0.6328]}]}, {"id": "b_8", "type": "paragraph", "text": "It’s tough to avoid the omitted variable bias completely, because, as they say, “we don’t know what we don’t know.” One approach is to use all available information, that is, to include in your feature vector as many features as possible, even those you deem unnecessary. This could make your feature vector very wide (i.e., of many dimensions) and sparse (i.e., when the values in most dimensions are zero). Still, if you use a well-tuned regularization, your model will “decide” which features are important, and which ones aren’t.", "words": [{"w": "It’s", "b": [0.1312, 0.6447, 0.1576, 0.6597]}, {"w": "tough", "b": [0.1637, 0.6447, 0.21, 0.6597]}, {"w": "to", "b": [0.2162, 0.6447, 0.2326, 0.6597]}, {"w": "avoid", "b": [0.2388, 0.6447, 0.2815, 0.6597]}, {"w": "the", "b": [0.2876, 0.6447, 0.3133, 0.6597]}, {"w": "omitted", "b": [0.3194, 0.6448, 0.3916, 0.6597]}, {"w": "variable", "b": [0.3987, 0.6448, 0.4714, 0.6597]}, {"w": "bias", "b": [0.4785, 0.6448, 0.5149, 0.6597]}, {"w": "completely,", "b": [0.521, 0.6447, 0.6115, 0.6597]}, {"w": "because,", "b": [0.6177, 0.6447, 0.6852, 0.6597]}, {"w": "as", "b": [0.6913, 0.6447, 0.7079, 0.6597]}, {"w": "they", "b": [0.7141, 0.6447, 0.7495, 0.6597]}, {"w": "say,", "b": [0.7557, 0.6447, 0.7851, 0.6597]}, {"w": "“we", "b": [0.7913, 0.6447, 0.8211, 0.6597]}, {"w": "don’t", "b": [0.8273, 0.6447, 0.8694, 0.6597]}, {"w": "know", "b": [0.1312, 0.6626, 0.1741, 0.6777]}, {"w": "what", "b": [0.1812, 0.6626, 0.222, 0.6777]}, {"w": "we", "b": [0.229, 0.6626, 0.2505, 0.6777]}, {"w": "don’t", "b": [0.2575, 0.6626, 0.3004, 0.6777]}, {"w": "know.”", "b": [0.3075, 0.6626, 0.3619, 0.6777]}, {"w": "One", "b": [0.3728, 0.6626, 0.4063, 0.6777]}, {"w": "approach", "b": [0.4134, 0.6626, 0.4882, 0.6777]}, {"w": "is", "b": [0.4953, 0.6626, 0.508, 0.6777]}, {"w": "to", "b": [0.515, 0.6626, 0.5317, 0.6777]}, {"w": "use", "b": [0.5388, 0.6626, 0.5651, 0.6777]}, {"w": "all", "b": [0.5721, 0.6626, 0.592, 0.6777]}, {"w": "available", "b": [0.5991, 0.6626, 0.6702, 0.6777]}, {"w": "information,", "b": [0.6773, 0.6626, 0.7782, 0.6777]}, {"w": "that", "b": [0.7855, 0.6626, 0.8201, 0.6777]}, {"w": "is,", "b": [0.8271, 0.6626, 0.845, 0.6777]}, {"w": "to", "b": [0.8523, 0.6626, 0.869, 0.6777]}, {"w": "include", "b": [0.1312, 0.6808, 0.1875, 0.6956]}, {"w": "in", "b": [0.1935, 0.6808, 0.2086, 0.6956]}, {"w": "your", "b": [0.2146, 0.6808, 0.2498, 0.6956]}, {"w": "feature", "b": [0.2558, 0.6808, 0.3106, 0.6956]}, {"w": "vector", "b": [0.3166, 0.6808, 0.3648, 0.6956]}, {"w": "as", "b": [0.3708, 0.6808, 0.387, 0.6956]}, {"w": "many", "b": [0.393, 0.6808, 0.4362, 0.6956]}, {"w": "features", "b": [0.4421, 0.6808, 0.5041, 0.6956]}, {"w": "as", "b": [0.5101, 0.6808, 0.5263, 0.6956]}, {"w": "possible,", "b": [0.5323, 0.6808, 0.5993, 0.6956]}, {"w": "even", "b": [0.6053, 0.6808, 0.6405, 0.6956]}, {"w": "those", "b": [0.6465, 0.6808, 0.6878, 0.6956]}, {"w": "you", "b": [0.6938, 0.6808, 0.7219, 0.6956]}, {"w": "deem", "b": [0.7279, 0.6808, 0.7691, 0.6956]}, {"w": "unnecessary.", "b": [0.7751, 0.6808, 0.8728, 0.6956]}, {"w": "This", "b": [0.1306, 0.6985, 0.1673, 0.7136]}, {"w": "could", "b": [0.1736, 0.6985, 0.2176, 0.7136]}, {"w": "make", "b": [0.2239, 0.6985, 0.2668, 0.7136]}, {"w": "your", "b": [0.2732, 0.6985, 0.3099, 0.7136]}, {"w": "feature", "b": [0.3162, 0.6985, 0.3733, 0.7136]}, {"w": "vector", "b": [0.3796, 0.6985, 0.4299, 0.7136]}, {"w": "very", "b": [0.4363, 0.6985, 0.4714, 0.7136]}, {"w": "wide", "b": [0.4778, 0.6985, 0.5154, 0.7136]}, {"w": "(i.e.,", "b": [0.5218, 0.6985, 0.5584, 0.7136]}, {"w": "of", "b": [0.5648, 0.6985, 0.58, 0.7136]}, {"w": "many", "b": [0.5863, 0.6985, 0.6313, 0.7136]}, {"w": "dimensions)", "b": [0.6377, 0.6985, 0.7352, 0.7136]}, {"w": "and", "b": [0.7415, 0.6985, 0.7719, 0.7136]}, {"w": "sparse", "b": [0.7782, 0.6985, 0.8287, 0.7136]}, {"w": "(i.e.,", "b": [0.8351, 0.6985, 0.8717, 0.7136]}, {"w": "when", "b": [0.1306, 0.7164, 0.1734, 0.7315]}, {"w": "the", "b": [0.1795, 0.7164, 0.2056, 0.7315]}, {"w": "values", "b": [0.2118, 0.7164, 0.2615, 0.7315]}, {"w": "in", "b": [0.2677, 0.7164, 0.2834, 0.7315]}, {"w": "most", "b": [0.2895, 0.7164, 0.3293, 0.7315]}, {"w": "dimensions", "b": [0.3354, 0.7164, 0.4254, 0.7315]}, {"w": "are", "b": [0.4316, 0.7164, 0.4567, 0.7315]}, {"w": "zero).", "b": [0.4629, 0.7164, 0.5089, 0.7315]}, {"w": "Still,", "b": [0.5171, 0.7164, 0.5557, 0.7315]}, {"w": "if", "b": [0.5619, 0.7164, 0.5729, 0.7315]}, {"w": "you", "b": [0.579, 0.7164, 0.6083, 0.7315]}, {"w": "use", "b": [0.6144, 0.7164, 0.6407, 0.7315]}, {"w": "a", "b": [0.6468, 0.7164, 0.6562, 0.7315]}, {"w": "well-tuned", "b": [0.6624, 0.7164, 0.7475, 0.7315]}, {"w": "regularization,", "b": [0.7536, 0.7164, 0.8717, 0.7315]}, {"w": "your", "b": [0.1308, 0.7345, 0.1667, 0.7494]}, {"w": "model", "b": [0.1728, 0.7345, 0.2215, 0.7494]}, {"w": "will", "b": [0.2277, 0.7345, 0.2564, 0.7494]}, {"w": "“decide”", "b": [0.2626, 0.7345, 0.3302, 0.7494]}, {"w": "which", "b": [0.3364, 0.7345, 0.383, 0.7494]}, {"w": "features", "b": [0.3892, 0.7345, 0.4524, 0.7494]}, {"w": "are", "b": [0.4586, 0.7345, 0.4832, 0.7494]}, {"w": "important,", "b": [0.4894, 0.7345, 0.5756, 0.7494]}, {"w": "and", "b": [0.5817, 0.7345, 0.6115, 0.7494]}, {"w": "which", "b": [0.6176, 0.7345, 0.6643, 0.7494]}, {"w": "ones", "b": [0.6704, 0.7345, 0.7054, 0.7494]}, {"w": "aren’t.", "b": [0.7116, 0.7345, 0.7639, 0.7494]}]}, {"id": "b_9", "type": "paragraph", "text": "Alternatively, let us suspect that a particular variable would be important for accurate predictions, and leaving it out of our model could result in an omitted variable bias. Suppose getting that data is problematic. Try using a proxy variable in lieu of the omitted variable. For instance, if we want to train a model that predicts the price of a used car, and we cannot get the car’s age, use, instead, the length of ownership by its current owner. The amount of time the current owner owned the car can be taken as a proxy for the age of the vehicle.", "words": [{"w": "Alternatively,", "b": [0.1305, 0.7613, 0.242, 0.7764]}, {"w": "let", "b": [0.2505, 0.7613, 0.2714, 0.7764]}, {"w": "us", "b": [0.2794, 0.7613, 0.2973, 0.7764]}, {"w": "suspect", "b": [0.3054, 0.7613, 0.3657, 0.7764]}, {"w": "that", "b": [0.3737, 0.7613, 0.4083, 0.7764]}, {"w": "a", "b": [0.4163, 0.7613, 0.4257, 0.7764]}, {"w": "particular", "b": [0.4337, 0.7613, 0.5143, 0.7764]}, {"w": "variable", "b": [0.5223, 0.7613, 0.5867, 0.7764]}, {"w": "would", "b": [0.5948, 0.7613, 0.6434, 0.7764]}, {"w": "be", "b": [0.6514, 0.7613, 0.6708, 0.7764]}, {"w": "important", "b": [0.6788, 0.7613, 0.7615, 0.7764]}, {"w": "for", "b": [0.7695, 0.7613, 0.792, 0.7764]}, {"w": "accurate", "b": [0.8, 0.7613, 0.8691, 0.7764]}, {"w": "predictions,", "b": [0.1312, 0.7795, 0.2229, 0.7943]}, {"w": "and", "b": [0.2288, 0.7795, 0.2579, 0.7943]}, {"w": "leaving", "b": [0.2638, 0.7795, 0.319, 0.7943]}, {"w": "it", "b": [0.3249, 0.7795, 0.3369, 0.7943]}, {"w": "out", "b": [0.3428, 0.7795, 0.3689, 0.7943]}, {"w": "of", "b": [0.3748, 0.7795, 0.3893, 0.7943]}, {"w": "our", "b": [0.3952, 0.7795, 0.4214, 0.7943]}, {"w": "model", "b": [0.4272, 0.7795, 0.4749, 0.7943]}, {"w": "could", "b": [0.4808, 0.7795, 0.523, 0.7943]}, {"w": "result", "b": [0.5289, 0.7795, 0.5732, 0.7943]}, {"w": "in", "b": [0.5791, 0.7795, 0.5942, 0.7943]}, {"w": "an", "b": [0.6, 0.7795, 0.6191, 0.7943]}, {"w": "omitted", "b": [0.625, 0.7795, 0.6863, 0.7943]}, {"w": "variable", "b": [0.6921, 0.7795, 0.754, 0.7943]}, {"w": "bias.", "b": [0.7598, 0.7795, 0.7961, 0.7943]}, {"w": "Suppose", "b": [0.8042, 0.7795, 0.8691, 0.7943]}, {"w": "getting", "b": [0.1312, 0.7973, 0.188, 0.8123]}, {"w": "that", "b": [0.1941, 0.7973, 0.2282, 0.8123]}, {"w": "data", "b": [0.2343, 0.7973, 0.2704, 0.8123]}, {"w": "is", "b": [0.2765, 0.7973, 0.289, 0.8123]}, {"w": "problematic.", "b": [0.2951, 0.7973, 0.3963, 0.8123]}, {"w": "Try", "b": [0.4045, 0.7973, 0.4334, 0.8123]}, {"w": "using", "b": [0.4396, 0.7973, 0.482, 0.8123]}, {"w": "a", "b": [0.4881, 0.7973, 0.4974, 0.8123]}, {"w": "proxy", "b": [0.5035, 0.7973, 0.5495, 0.8123]}, {"w": "variable", "b": [0.5556, 0.7973, 0.6191, 0.8123]}, {"w": "in", "b": [0.6253, 0.7973, 0.6407, 0.8123]}, {"w": "lieu", "b": [0.6469, 0.7973, 0.6758, 0.8123]}, {"w": "of", "b": [0.6819, 0.7973, 0.6969, 0.8123]}, {"w": "the", "b": [0.703, 0.7973, 0.7288, 0.8123]}, {"w": "omitted", "b": [0.7349, 0.7973, 0.7979, 0.8123]}, {"w": "variable.", "b": [0.804, 0.7973, 0.8726, 0.8123]}, {"w": "For", "b": [0.1312, 0.8154, 0.1576, 0.8302]}, {"w": "instance,", "b": [0.1635, 0.8154, 0.233, 0.8302]}, {"w": "if", "b": [0.2389, 0.8154, 0.2495, 0.8302]}, {"w": "we", "b": [0.2554, 0.8154, 0.2759, 0.8302]}, {"w": "want", "b": [0.2818, 0.8154, 0.32, 0.8302]}, {"w": "to", "b": [0.3259, 0.8154, 0.342, 0.8302]}, {"w": "train", "b": [0.3479, 0.8154, 0.3861, 0.8302]}, {"w": "a", "b": [0.392, 0.8154, 0.401, 0.8302]}, {"w": "model", "b": [0.4069, 0.8154, 0.4547, 0.8302]}, {"w": "that", "b": [0.4605, 0.8154, 0.4937, 0.8302]}, {"w": "predicts", "b": [0.4996, 0.8154, 0.5621, 0.8302]}, {"w": "the", "b": [0.5679, 0.8154, 0.5931, 0.8302]}, {"w": "price", "b": [0.599, 0.8154, 0.6372, 0.8302]}, {"w": "of", "b": [0.6431, 0.8154, 0.6577, 0.8302]}, {"w": "a", "b": [0.6636, 0.8154, 0.6726, 0.8302]}, {"w": "used", "b": [0.6785, 0.8154, 0.7138, 0.8302]}, {"w": "car,", "b": [0.7197, 0.8154, 0.7489, 0.8302]}, {"w": "and", "b": [0.7548, 0.8154, 0.784, 0.8302]}, {"w": "we", "b": [0.7899, 0.8154, 0.8105, 0.8302]}, {"w": "cannot", "b": [0.8163, 0.8154, 0.8696, 0.8302]}, {"w": "get", "b": [0.1312, 0.8332, 0.1557, 0.8481]}, {"w": "the", "b": [0.1618, 0.8332, 0.1873, 0.8481]}, {"w": "car’s", "b": [0.1935, 0.8332, 0.2303, 0.8481]}, {"w": "age,", "b": [0.2364, 0.8332, 0.268, 0.8481]}, {"w": "use,", "b": [0.2742, 0.8332, 0.3048, 0.8481]}, {"w": "instead,", "b": [0.311, 0.8332, 0.3732, 0.8481]}, {"w": "the", "b": [0.3794, 0.8332, 0.4049, 0.8481]}, {"w": "length", "b": [0.411, 0.8332, 0.4609, 0.8481]}, {"w": "of", "b": [0.4671, 0.8332, 0.4818, 0.8481]}, {"w": "ownership", "b": [0.488, 0.8332, 0.5681, 0.8481]}, {"w": "by", "b": [0.5743, 0.8332, 0.5936, 0.8481]}, {"w": "its", "b": [0.5998, 0.8332, 0.6192, 0.8481]}, {"w": "current", "b": [0.6254, 0.8332, 0.683, 0.8481]}, {"w": "owner.", "b": [0.6892, 0.8332, 0.7417, 0.8481]}, {"w": "The", "b": [0.7499, 0.8332, 0.7815, 0.8481]}, {"w": "amount", "b": [0.7876, 0.8332, 0.8482, 0.8481]}, {"w": "of", "b": [0.8544, 0.8332, 0.8691, 0.8481]}, {"w": "time", "b": [0.1312, 0.8511, 0.1671, 0.8661]}, {"w": "the", "b": [0.1733, 0.8511, 0.1989, 0.8661]}, {"w": "current", "b": [0.2051, 0.8511, 0.2631, 0.8661]}, {"w": "owner", "b": [0.2693, 0.8511, 0.317, 0.8661]}, {"w": "owned", "b": [0.3231, 0.8511, 0.3739, 0.8661]}, {"w": "the", "b": [0.3801, 0.8511, 0.4057, 0.8661]}, {"w": "car", "b": [0.4118, 0.8511, 0.4365, 0.8661]}, {"w": "can", "b": [0.4427, 0.8511, 0.4703, 0.8661]}, {"w": "be", "b": [0.4765, 0.8511, 0.4955, 0.8661]}, {"w": "taken", "b": [0.5016, 0.8511, 0.5457, 0.8661]}, {"w": "as", "b": [0.5519, 0.8511, 0.5684, 0.8661]}, {"w": "a", "b": [0.5745, 0.8511, 0.5838, 0.8661]}, {"w": "proxy", "b": [0.5899, 0.8511, 0.6356, 0.8661]}, {"w": "for", "b": [0.6417, 0.8511, 0.6638, 0.8661]}, {"w": "the", "b": [0.67, 0.8511, 0.6956, 0.8661]}, {"w": "age", "b": [0.7018, 0.8511, 0.7284, 0.8661]}, {"w": "of", "b": [0.7346, 0.8511, 0.7495, 0.8661]}, {"w": "the", "b": [0.7556, 0.8511, 0.7813, 0.8661]}, {"w": "vehicle.", "b": [0.7874, 0.8511, 0.8469, 0.8661]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 16", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "16", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 60, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Sponsorship bias can be reduced by carefully investigating the data source, specifically the source owner’s incentive to provide the data. For example, it’s known that publications on tobacco and pharmaceutical drugs are very often sponsored by tobacco and pharmaceutical companies, or their opponents. The same can be said about news companies, especially those that depend on the advertisement revenue or have an undisclosed business model.", "words": [{"w": "Sponsorship", "b": [0.1312, 0.0884, 0.2434, 0.1034]}, {"w": "bias", "b": [0.25, 0.0884, 0.2864, 0.1034]}, {"w": "can", "b": [0.2921, 0.0885, 0.3193, 0.1033]}, {"w": "be", "b": [0.3251, 0.0885, 0.3437, 0.1033]}, {"w": "reduced", "b": [0.3495, 0.0885, 0.4108, 0.1033]}, {"w": "by", "b": [0.4166, 0.0885, 0.4357, 0.1033]}, {"w": "carefully", "b": [0.4415, 0.0885, 0.5089, 0.1033]}, {"w": "investigating", "b": [0.5147, 0.0885, 0.6147, 0.1033]}, {"w": "the", "b": [0.6205, 0.0885, 0.6456, 0.1033]}, {"w": "data", "b": [0.6514, 0.0885, 0.6866, 0.1033]}, {"w": "source,", "b": [0.6924, 0.0885, 0.7468, 0.1033]}, {"w": "specifically", "b": [0.7526, 0.0885, 0.8382, 0.1033]}, {"w": "the", "b": [0.844, 0.0885, 0.8691, 0.1033]}, {"w": "source", "b": [0.1312, 0.1063, 0.1821, 0.1213]}, {"w": "owner’s", "b": [0.1882, 0.1063, 0.2488, 0.1213]}, {"w": "incentive", "b": [0.255, 0.1063, 0.3269, 0.1213]}, {"w": "to", "b": [0.333, 0.1063, 0.3496, 0.1213]}, {"w": "provide", "b": [0.3557, 0.1063, 0.4157, 0.1213]}, {"w": "the", "b": [0.4219, 0.1063, 0.4477, 0.1213]}, {"w": "data.", "b": [0.4539, 0.1063, 0.4952, 0.1213]}, {"w": "For", "b": [0.5034, 0.1063, 0.5307, 0.1213]}, {"w": "example,", "b": [0.5368, 0.1063, 0.6087, 0.1213]}, {"w": "it’s", "b": [0.6148, 0.1063, 0.6397, 0.1213]}, {"w": "known", "b": [0.6459, 0.1063, 0.6986, 0.1213]}, {"w": "that", "b": [0.7047, 0.1063, 0.7388, 0.1213]}, {"w": "publications", "b": [0.745, 0.1063, 0.8433, 0.1213]}, {"w": "on", "b": [0.8495, 0.1063, 0.8691, 0.1213]}, {"w": "tobacco", "b": [0.1312, 0.1243, 0.1926, 0.1392]}, {"w": "and", "b": [0.1988, 0.1243, 0.2285, 0.1392]}, {"w": "pharmaceutical", "b": [0.2346, 0.1243, 0.3574, 0.1392]}, {"w": "drugs", "b": [0.3636, 0.1243, 0.4077, 0.1392]}, {"w": "are", "b": [0.4139, 0.1243, 0.4385, 0.1392]}, {"w": "very", "b": [0.4446, 0.1243, 0.479, 0.1392]}, {"w": "often", "b": [0.4851, 0.1243, 0.5255, 0.1392]}, {"w": "sponsored", "b": [0.5316, 0.1243, 0.6112, 0.1392]}, {"w": "by", "b": [0.6174, 0.1243, 0.6368, 0.1392]}, {"w": "tobacco", "b": [0.6429, 0.1243, 0.7043, 0.1392]}, {"w": "and", "b": [0.7105, 0.1243, 0.7401, 0.1392]}, {"w": "pharmaceutical", "b": [0.7463, 0.1243, 0.8691, 0.1392]}, {"w": "companies,", "b": [0.1312, 0.1424, 0.2178, 0.1572]}, {"w": "or", "b": [0.2236, 0.1424, 0.2398, 0.1572]}, {"w": "their", "b": [0.2455, 0.1424, 0.2828, 0.1572]}, {"w": "opponents.", "b": [0.2886, 0.1424, 0.3741, 0.1572]}, {"w": "The", "b": [0.3822, 0.1424, 0.4133, 0.1572]}, {"w": "same", "b": [0.4191, 0.1424, 0.4584, 0.1572]}, {"w": "can", "b": [0.4642, 0.1424, 0.4913, 0.1572]}, {"w": "be", "b": [0.4971, 0.1424, 0.5157, 0.1572]}, {"w": "said", "b": [0.5215, 0.1424, 0.5528, 0.1572]}, {"w": "about", "b": [0.5586, 0.1424, 0.6043, 0.1572]}, {"w": "news", "b": [0.6101, 0.1424, 0.6484, 0.1572]}, {"w": "companies,", "b": [0.6542, 0.1424, 0.7407, 0.1572]}, {"w": "especially", "b": [0.7465, 0.1424, 0.822, 0.1572]}, {"w": "those", "b": [0.8278, 0.1424, 0.8691, 0.1572]}, {"w": "that", "b": [0.1312, 0.1602, 0.1651, 0.1751]}, {"w": "depend", "b": [0.1712, 0.1602, 0.2292, 0.1751]}, {"w": "on", "b": [0.2353, 0.1602, 0.2548, 0.1751]}, {"w": "the", "b": [0.261, 0.1602, 0.2866, 0.1751]}, {"w": "advertisement", "b": [0.2928, 0.1602, 0.4052, 0.1751]}, {"w": "revenue", "b": [0.4113, 0.1602, 0.4724, 0.1751]}, {"w": "or", "b": [0.4786, 0.1602, 0.4951, 0.1751]}, {"w": "have", "b": [0.5012, 0.1602, 0.5376, 0.1751]}, {"w": "an", "b": [0.5438, 0.1602, 0.5632, 0.1751]}, {"w": "undisclosed", "b": [0.5694, 0.1602, 0.6609, 0.1751]}, {"w": "business", "b": [0.667, 0.1602, 0.733, 0.1751]}, {"w": "model.", "b": [0.7392, 0.1602, 0.793, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "Sampling bias can be avoided by researching the real proportion of various properties in the data that will be observed in production, and then sampling the training data by keeping similar proportions.", "words": [{"w": "Sampling", "b": [0.1312, 0.1871, 0.217, 0.2021]}, {"w": "bias", "b": [0.2241, 0.1871, 0.2605, 0.2021]}, {"w": "can", "b": [0.2666, 0.187, 0.2947, 0.2021]}, {"w": "be", "b": [0.3009, 0.187, 0.3202, 0.2021]}, {"w": "avoided", "b": [0.3263, 0.187, 0.3883, 0.2021]}, {"w": "by", "b": [0.3945, 0.187, 0.4143, 0.2021]}, {"w": "researching", "b": [0.4204, 0.187, 0.5118, 0.2021]}, {"w": "the", "b": [0.518, 0.187, 0.5441, 0.2021]}, {"w": "real", "b": [0.5502, 0.187, 0.5805, 0.2021]}, {"w": "proportion", "b": [0.5866, 0.187, 0.6737, 0.2021]}, {"w": "of", "b": [0.6799, 0.187, 0.695, 0.2021]}, {"w": "various", "b": [0.7011, 0.187, 0.7592, 0.2021]}, {"w": "properties", "b": [0.7653, 0.187, 0.8473, 0.2021]}, {"w": "in", "b": [0.8535, 0.187, 0.8691, 0.2021]}, {"w": "the", "b": [0.1312, 0.2052, 0.1564, 0.22]}, {"w": "data", "b": [0.1622, 0.2052, 0.1974, 0.22]}, {"w": "that", "b": [0.2032, 0.2052, 0.2363, 0.22]}, {"w": "will", "b": [0.2421, 0.2052, 0.2703, 0.22]}, {"w": "be", "b": [0.2761, 0.2052, 0.2947, 0.22]}, {"w": "observed", "b": [0.3005, 0.2052, 0.369, 0.22]}, {"w": "in", "b": [0.3748, 0.2052, 0.3899, 0.22]}, {"w": "production,", "b": [0.3957, 0.2052, 0.4867, 0.22]}, {"w": "and", "b": [0.4926, 0.2052, 0.5217, 0.22]}, {"w": "then", "b": [0.5276, 0.2052, 0.5628, 0.22]}, {"w": "sampling", "b": [0.5686, 0.2052, 0.639, 0.22]}, {"w": "the", "b": [0.6448, 0.2052, 0.67, 0.22]}, {"w": "training", "b": [0.6758, 0.2052, 0.7381, 0.22]}, {"w": "data", "b": [0.7439, 0.2052, 0.7791, 0.22]}, {"w": "by", "b": [0.7849, 0.2052, 0.804, 0.22]}, {"w": "keeping", "b": [0.8098, 0.2052, 0.8691, 0.22]}, {"w": "similar", "b": [0.1312, 0.223, 0.1857, 0.238]}, {"w": "proportions.", "b": [0.1919, 0.223, 0.29, 0.238]}]}, {"id": "b_2", "type": "paragraph", "text": "Prejudice or stereotype bias can be controlled. When developing the training model to distinguish pictures of women from men, a data analyst could choose to under-sample the number of women indoors, or oversample the number of men at home. In other words, prejudice or stereotype bias is reduced by exposing the learning algorithm to a more even- handed distribution of examples.", "words": [{"w": "Prejudice", "b": [0.1312, 0.2499, 0.2193, 0.2649]}, {"w": "or", "b": [0.2269, 0.2498, 0.2437, 0.2649]}, {"w": "stereotype", "b": [0.2513, 0.2499, 0.3477, 0.2649]}, {"w": "bias", "b": [0.3565, 0.2499, 0.3929, 0.2649]}, {"w": "can", "b": [0.4005, 0.2498, 0.4287, 0.2649]}, {"w": "be", "b": [0.4363, 0.2498, 0.4557, 0.2649]}, {"w": "controlled.", "b": [0.4633, 0.2498, 0.5497, 0.2649]}, {"w": "When", "b": [0.5623, 0.2498, 0.6109, 0.2649]}, {"w": "developing", "b": [0.6186, 0.2498, 0.7054, 0.2649]}, {"w": "the", "b": [0.713, 0.2498, 0.7392, 0.2649]}, {"w": "training", "b": [0.7468, 0.2498, 0.8117, 0.2649]}, {"w": "model", "b": [0.8193, 0.2498, 0.869, 0.2649]}, {"w": "to", "b": [0.1312, 0.2677, 0.148, 0.2829]}, {"w": "distinguish", "b": [0.1547, 0.2677, 0.2438, 0.2829]}, {"w": "pictures", "b": [0.2505, 0.2677, 0.3156, 0.2829]}, {"w": "of", "b": [0.3223, 0.2677, 0.3375, 0.2829]}, {"w": "women", "b": [0.3442, 0.2677, 0.4012, 0.2829]}, {"w": "from", "b": [0.4079, 0.2677, 0.4461, 0.2829]}, {"w": "men,", "b": [0.4528, 0.2677, 0.4926, 0.2829]}, {"w": "a", "b": [0.4994, 0.2677, 0.5088, 0.2829]}, {"w": "data", "b": [0.5156, 0.2677, 0.5522, 0.2829]}, {"w": "analyst", "b": [0.5589, 0.2677, 0.6181, 0.2829]}, {"w": "could", "b": [0.6248, 0.2677, 0.6687, 0.2829]}, {"w": "choose", "b": [0.6755, 0.2677, 0.7289, 0.2829]}, {"w": "to", "b": [0.7356, 0.2677, 0.7524, 0.2829]}, {"w": "under-sample", "b": [0.7591, 0.2677, 0.8691, 0.2829]}, {"w": "the", "b": [0.1312, 0.2857, 0.1572, 0.3008]}, {"w": "number", "b": [0.1633, 0.2857, 0.2252, 0.3008]}, {"w": "of", "b": [0.2314, 0.2857, 0.2464, 0.3008]}, {"w": "women", "b": [0.2525, 0.2857, 0.3092, 0.3008]}, {"w": "indoors,", "b": [0.3153, 0.2857, 0.3804, 0.3008]}, {"w": "or", "b": [0.3865, 0.2857, 0.4032, 0.3008]}, {"w": "oversample", "b": [0.4093, 0.2857, 0.4993, 0.3008]}, {"w": "the", "b": [0.5055, 0.2857, 0.5314, 0.3008]}, {"w": "number", "b": [0.5376, 0.2857, 0.5995, 0.3008]}, {"w": "of", "b": [0.6056, 0.2857, 0.6206, 0.3008]}, {"w": "men", "b": [0.6268, 0.2857, 0.6611, 0.3008]}, {"w": "at", "b": [0.6672, 0.2857, 0.6838, 0.3008]}, {"w": "home.", "b": [0.6899, 0.2857, 0.7388, 0.3008]}, {"w": "In", "b": [0.7469, 0.2857, 0.7641, 0.3008]}, {"w": "other", "b": [0.7702, 0.2857, 0.8129, 0.3008]}, {"w": "words,", "b": [0.819, 0.2857, 0.8716, 0.3008]}, {"w": "prejudice", "b": [0.1312, 0.3037, 0.2058, 0.3187]}, {"w": "or", "b": [0.2119, 0.3037, 0.2287, 0.3187]}, {"w": "stereotype", "b": [0.2348, 0.3037, 0.3188, 0.3187]}, {"w": "bias", "b": [0.325, 0.3037, 0.3574, 0.3187]}, {"w": "is", "b": [0.3635, 0.3037, 0.3761, 0.3187]}, {"w": "reduced", "b": [0.3823, 0.3037, 0.4459, 0.3187]}, {"w": "by", "b": [0.452, 0.3037, 0.4718, 0.3187]}, {"w": "exposing", "b": [0.4779, 0.3037, 0.5489, 0.3187]}, {"w": "the", "b": [0.555, 0.3037, 0.5811, 0.3187]}, {"w": "learning", "b": [0.5872, 0.3037, 0.6529, 0.3187]}, {"w": "algorithm", "b": [0.6591, 0.3037, 0.7383, 0.3187]}, {"w": "to", "b": [0.7444, 0.3037, 0.7611, 0.3187]}, {"w": "a", "b": [0.7672, 0.3037, 0.7766, 0.3187]}, {"w": "more", "b": [0.7827, 0.3037, 0.8234, 0.3187]}, {"w": "even-", "b": [0.8295, 0.3037, 0.8722, 0.3187]}, {"w": "handed", "b": [0.1312, 0.3217, 0.1897, 0.3367]}, {"w": "distribution", "b": [0.1958, 0.3217, 0.2904, 0.3367]}, {"w": "of", "b": [0.2965, 0.3217, 0.3114, 0.3367]}, {"w": "examples.", "b": [0.3175, 0.3217, 0.3961, 0.3367]}]}, {"id": "b_3", "type": "paragraph", "text": "Systematic value distortion bias can be alleviated by having multiple measuring devices, or hiring humans trained to compare the output of measuring or observing devices.", "words": [{"w": "Systematic", "b": [0.1312, 0.3486, 0.2321, 0.3636]}, {"w": "value", "b": [0.2392, 0.3486, 0.287, 0.3636]}, {"w": "distortion", "b": [0.294, 0.3486, 0.3843, 0.3636]}, {"w": "bias", "b": [0.3905, 0.3487, 0.4218, 0.3636]}, {"w": "can", "b": [0.428, 0.3487, 0.4552, 0.3636]}, {"w": "be", "b": [0.4614, 0.3487, 0.48, 0.3636]}, {"w": "alleviated", "b": [0.4862, 0.3487, 0.5623, 0.3636]}, {"w": "by", "b": [0.5685, 0.3487, 0.5876, 0.3636]}, {"w": "having", "b": [0.5938, 0.3487, 0.6462, 0.3636]}, {"w": "multiple", "b": [0.6523, 0.3487, 0.7174, 0.3636]}, {"w": "measuring", "b": [0.7235, 0.3487, 0.8043, 0.3636]}, {"w": "devices,", "b": [0.8105, 0.3487, 0.8716, 0.3636]}, {"w": "or", "b": [0.1312, 0.3666, 0.1477, 0.3815]}, {"w": "hiring", "b": [0.1538, 0.3666, 0.2011, 0.3815]}, {"w": "humans", "b": [0.2072, 0.3666, 0.2694, 0.3815]}, {"w": "trained", "b": [0.2755, 0.3666, 0.333, 0.3815]}, {"w": "to", "b": [0.3391, 0.3666, 0.3555, 0.3815]}, {"w": "compare", "b": [0.3617, 0.3666, 0.4294, 0.3815]}, {"w": "the", "b": [0.4356, 0.3666, 0.4612, 0.3815]}, {"w": "output", "b": [0.4674, 0.3666, 0.5217, 0.3815]}, {"w": "of", "b": [0.5279, 0.3666, 0.5427, 0.3815]}, {"w": "measuring", "b": [0.5489, 0.3666, 0.6311, 0.3815]}, {"w": "or", "b": [0.6372, 0.3666, 0.6537, 0.3815]}, {"w": "observing", "b": [0.6598, 0.3666, 0.7364, 0.3815]}, {"w": "devices.", "b": [0.7425, 0.3666, 0.8047, 0.3815]}]}, {"id": "b_4", "type": "paragraph", "text": "Experimenter bias can be avoided by letting multiple people validate the questions asked in the survey. Ask yourself: “Do I feel uncomfortable or constrained answering this question?”", "words": [{"w": "Experimenter", "b": [0.1312, 0.3935, 0.2584, 0.4085]}, {"w": "bias", "b": [0.2655, 0.3935, 0.3019, 0.4085]}, {"w": "can", "b": [0.308, 0.3936, 0.3354, 0.4084]}, {"w": "be", "b": [0.3416, 0.3936, 0.3604, 0.4084]}, {"w": "avoided", "b": [0.3665, 0.3936, 0.4269, 0.4084]}, {"w": "by", "b": [0.4331, 0.3936, 0.4523, 0.4084]}, {"w": "letting", "b": [0.4585, 0.3936, 0.5102, 0.4084]}, {"w": "multiple", "b": [0.5164, 0.3936, 0.5818, 0.4084]}, {"w": "people", "b": [0.588, 0.3936, 0.6392, 0.4084]}, {"w": "validate", "b": [0.6454, 0.3936, 0.7077, 0.4084]}, {"w": "the", "b": [0.7139, 0.3936, 0.7393, 0.4084]}, {"w": "questions", "b": [0.7454, 0.3936, 0.8192, 0.4084]}, {"w": "asked", "b": [0.8253, 0.3936, 0.8691, 0.4084]}, {"w": "in", "b": [0.1312, 0.4116, 0.1463, 0.4264]}, {"w": "the", "b": [0.1518, 0.4116, 0.1769, 0.4264]}, {"w": "survey.", "b": [0.1824, 0.4116, 0.2367, 0.4264]}, {"w": "Ask", "b": [0.2447, 0.4116, 0.275, 0.4264]}, {"w": "yourself:", "b": [0.2804, 0.4116, 0.3464, 0.4264]}, {"w": "“Do", "b": [0.3543, 0.4116, 0.3857, 0.4264]}, {"w": "I", "b": [0.3911, 0.4116, 0.3976, 0.4264]}, {"w": "feel", "b": [0.4031, 0.4116, 0.4298, 0.4264]}, {"w": "uncomfortable", "b": [0.4352, 0.4116, 0.5483, 0.4264]}, {"w": "or", "b": [0.5538, 0.4116, 0.5699, 0.4264]}, {"w": "constrained", "b": [0.5754, 0.4116, 0.666, 0.4264]}, {"w": "answering", "b": [0.6714, 0.4116, 0.7495, 0.4264]}, {"w": "this", "b": [0.7549, 0.4116, 0.7842, 0.4264]}, {"w": "question?”", "b": [0.7896, 0.4116, 0.8726, 0.4264]}]}, {"id": "b_5", "type": "paragraph", "text": "Furthermore, despite more difficulties in analysis, opt for open-ended questions rather than yes/no or multiple-choice questions. If you still prefer to give responders a choice of answers, include the option “Other” and a place to write a different answer.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.4384, 0.2374, 0.4533]}, {"w": "despite", "b": [0.2435, 0.4384, 0.3001, 0.4533]}, {"w": "more", "b": [0.3062, 0.4384, 0.3463, 0.4533]}, {"w": "difficulties", "b": [0.3524, 0.4384, 0.4346, 0.4533]}, {"w": "in", "b": [0.4408, 0.4384, 0.4562, 0.4533]}, {"w": "analysis,", "b": [0.4623, 0.4384, 0.5307, 0.4533]}, {"w": "opt", "b": [0.5369, 0.4384, 0.5636, 0.4533]}, {"w": "for", "b": [0.5697, 0.4384, 0.5918, 0.4533]}, {"w": "open-ended", "b": [0.5979, 0.4384, 0.6898, 0.4533]}, {"w": "questions", "b": [0.6959, 0.4384, 0.7706, 0.4533]}, {"w": "rather", "b": [0.7767, 0.4384, 0.8261, 0.4533]}, {"w": "than", "b": [0.8322, 0.4384, 0.8692, 0.4533]}, {"w": "yes/no", "b": [0.1308, 0.4564, 0.1834, 0.4712]}, {"w": "or", "b": [0.1895, 0.4564, 0.2058, 0.4712]}, {"w": "multiple-choice", "b": [0.2119, 0.4564, 0.3311, 0.4712]}, {"w": "questions.", "b": [0.3372, 0.4564, 0.4158, 0.4712]}, {"w": "If", "b": [0.424, 0.4564, 0.4361, 0.4712]}, {"w": "you", "b": [0.4423, 0.4564, 0.4705, 0.4712]}, {"w": "still", "b": [0.4767, 0.4564, 0.5061, 0.4712]}, {"w": "prefer", "b": [0.5122, 0.4564, 0.5583, 0.4712]}, {"w": "to", "b": [0.5645, 0.4564, 0.5807, 0.4712]}, {"w": "give", "b": [0.5868, 0.4564, 0.6181, 0.4712]}, {"w": "responders", "b": [0.6243, 0.4564, 0.709, 0.4712]}, {"w": "a", "b": [0.7151, 0.4564, 0.7242, 0.4712]}, {"w": "choice", "b": [0.7304, 0.4564, 0.7783, 0.4712]}, {"w": "of", "b": [0.7845, 0.4564, 0.7992, 0.4712]}, {"w": "answers,", "b": [0.8053, 0.4564, 0.8717, 0.4712]}, {"w": "include", "b": [0.1312, 0.4743, 0.1887, 0.4892]}, {"w": "the", "b": [0.1948, 0.4743, 0.2205, 0.4892]}, {"w": "option", "b": [0.2266, 0.4743, 0.2779, 0.4892]}, {"w": "“Other”", "b": [0.284, 0.4743, 0.3487, 0.4892]}, {"w": "and", "b": [0.3548, 0.4743, 0.3846, 0.4892]}, {"w": "a", "b": [0.3907, 0.4743, 0.3999, 0.4892]}, {"w": "place", "b": [0.4061, 0.4743, 0.4471, 0.4892]}, {"w": "to", "b": [0.4533, 0.4743, 0.4697, 0.4892]}, {"w": "write", "b": [0.4758, 0.4743, 0.5169, 0.4892]}, {"w": "a", "b": [0.523, 0.4743, 0.5323, 0.4892]}, {"w": "different", "b": [0.5384, 0.4743, 0.6051, 0.4892]}, {"w": "answer.", "b": [0.6113, 0.4743, 0.6714, 0.4892]}]}, {"id": "b_6", "type": "paragraph", "text": "Labeling bias can be avoided by asking several labelers to identify the same example. Ask the labelers why they decided to assign a specific label to examples that produced different results. If you see that some labelers refer to certain keyphrases, rather than trying to paraphrase the entire document, you can identify those who are quickly scanning instead of reading.", "words": [{"w": "Labeling", "b": [0.1312, 0.5012, 0.2106, 0.5161]}, {"w": "bias", "b": [0.2177, 0.5012, 0.2541, 0.5161]}, {"w": "can", "b": [0.2602, 0.5012, 0.2876, 0.5161]}, {"w": "be", "b": [0.2937, 0.5012, 0.3125, 0.5161]}, {"w": "avoided", "b": [0.3186, 0.5012, 0.379, 0.5161]}, {"w": "by", "b": [0.3852, 0.5012, 0.4045, 0.5161]}, {"w": "asking", "b": [0.4106, 0.5012, 0.461, 0.5161]}, {"w": "several", "b": [0.4671, 0.5012, 0.5211, 0.5161]}, {"w": "labelers", "b": [0.5272, 0.5012, 0.5878, 0.5161]}, {"w": "to", "b": [0.5939, 0.5012, 0.6102, 0.5161]}, {"w": "identify", "b": [0.6163, 0.5012, 0.6767, 0.5161]}, {"w": "the", "b": [0.6829, 0.5012, 0.7083, 0.5161]}, {"w": "same", "b": [0.7144, 0.5012, 0.7541, 0.5161]}, {"w": "example.", "b": [0.7603, 0.5012, 0.8308, 0.5161]}, {"w": "Ask", "b": [0.839, 0.5012, 0.8695, 0.5161]}, {"w": "the", "b": [0.1312, 0.5191, 0.1569, 0.5341]}, {"w": "labelers", "b": [0.1631, 0.5191, 0.2244, 0.5341]}, {"w": "why", "b": [0.2306, 0.5191, 0.2634, 0.5341]}, {"w": "they", "b": [0.2696, 0.5191, 0.305, 0.5341]}, {"w": "decided", "b": [0.3112, 0.5191, 0.3718, 0.5341]}, {"w": "to", "b": [0.378, 0.5191, 0.3944, 0.5341]}, {"w": "assign", "b": [0.4006, 0.5191, 0.4491, 0.5341]}, {"w": "a", "b": [0.4553, 0.5191, 0.4645, 0.5341]}, {"w": "specific", "b": [0.4707, 0.5191, 0.5289, 0.5341]}, {"w": "label", "b": [0.535, 0.5191, 0.5736, 0.5341]}, {"w": "to", "b": [0.5797, 0.5191, 0.5961, 0.5341]}, {"w": "examples", "b": [0.6023, 0.5191, 0.6759, 0.5341]}, {"w": "that", "b": [0.682, 0.5191, 0.7159, 0.5341]}, {"w": "produced", "b": [0.7221, 0.5191, 0.7967, 0.5341]}, {"w": "different", "b": [0.8028, 0.5191, 0.8697, 0.5341]}, {"w": "results.", "b": [0.1312, 0.5369, 0.1901, 0.5521]}, {"w": "If", "b": [0.2035, 0.5369, 0.216, 0.5521]}, {"w": "you", "b": [0.2239, 0.5369, 0.2532, 0.5521]}, {"w": "see", "b": [0.2611, 0.5369, 0.2853, 0.5521]}, {"w": "that", "b": [0.2932, 0.5369, 0.3277, 0.5521]}, {"w": "some", "b": [0.3356, 0.5369, 0.3765, 0.5521]}, {"w": "labelers", "b": [0.3844, 0.5369, 0.4468, 0.5521]}, {"w": "refer", "b": [0.4546, 0.5369, 0.4919, 0.5521]}, {"w": "to", "b": [0.4998, 0.5369, 0.5165, 0.5521]}, {"w": "certain", "b": [0.5244, 0.5369, 0.581, 0.5521]}, {"w": "keyphrases,", "b": [0.5888, 0.5369, 0.6827, 0.5521]}, {"w": "rather", "b": [0.6911, 0.5369, 0.7414, 0.5521]}, {"w": "than", "b": [0.7493, 0.5369, 0.7869, 0.5521]}, {"w": "trying", "b": [0.7948, 0.5369, 0.8445, 0.5521]}, {"w": "to", "b": [0.8524, 0.5369, 0.8692, 0.5521]}, {"w": "paraphrase", "b": [0.1312, 0.555, 0.2193, 0.57]}, {"w": "the", "b": [0.2254, 0.555, 0.251, 0.57]}, {"w": "entire", "b": [0.2571, 0.555, 0.3026, 0.57]}, {"w": "document,", "b": [0.3088, 0.555, 0.3926, 0.57]}, {"w": "you", "b": [0.3987, 0.555, 0.4273, 0.57]}, {"w": "can", "b": [0.4335, 0.555, 0.461, 0.57]}, {"w": "identify", "b": [0.4672, 0.555, 0.528, 0.57]}, {"w": "those", "b": [0.5341, 0.555, 0.5761, 0.57]}, {"w": "who", "b": [0.5823, 0.555, 0.6149, 0.57]}, {"w": "are", "b": [0.6211, 0.555, 0.6457, 0.57]}, {"w": "quickly", "b": [0.6518, 0.555, 0.709, 0.57]}, {"w": "scanning", "b": [0.7152, 0.555, 0.7847, 0.57]}, {"w": "instead", "b": [0.7909, 0.555, 0.8482, 0.57]}, {"w": "of", "b": [0.8543, 0.555, 0.8692, 0.57]}, {"w": "reading.", "b": [0.1312, 0.573, 0.1959, 0.5879]}]}, {"id": "b_7", "type": "paragraph", "text": "You can also compare the frequency of skipped documents for different labelers. If you see that a labeler skips documents more often than the average, ask if they encountered technical problems, or simply were not interested in some topics.", "words": [{"w": "You", "b": [0.1305, 0.5998, 0.1626, 0.6149]}, {"w": "can", "b": [0.1688, 0.5998, 0.1968, 0.6149]}, {"w": "also", "b": [0.2029, 0.5998, 0.2341, 0.6149]}, {"w": "compare", "b": [0.2403, 0.5998, 0.3087, 0.6149]}, {"w": "the", "b": [0.3148, 0.5998, 0.3407, 0.6149]}, {"w": "frequency", "b": [0.3469, 0.5998, 0.4252, 0.6149]}, {"w": "of", "b": [0.4313, 0.5998, 0.4464, 0.6149]}, {"w": "skipped", "b": [0.4525, 0.5998, 0.5148, 0.6149]}, {"w": "documents", "b": [0.5209, 0.5998, 0.6081, 0.6149]}, {"w": "for", "b": [0.6142, 0.5998, 0.6365, 0.6149]}, {"w": "different", "b": [0.6427, 0.5998, 0.7101, 0.6149]}, {"w": "labelers.", "b": [0.7162, 0.5998, 0.7832, 0.6149]}, {"w": "If", "b": [0.7915, 0.5998, 0.8039, 0.6149]}, {"w": "you", "b": [0.8101, 0.5998, 0.8391, 0.6149]}, {"w": "see", "b": [0.8452, 0.5998, 0.8692, 0.6149]}, {"w": "that", "b": [0.1312, 0.6179, 0.1644, 0.6327]}, {"w": "a", "b": [0.1701, 0.6179, 0.1791, 0.6327]}, {"w": "labeler", "b": [0.1848, 0.6179, 0.2376, 0.6327]}, {"w": "skips", "b": [0.2433, 0.6179, 0.2822, 0.6327]}, {"w": "documents", "b": [0.2879, 0.6179, 0.3724, 0.6327]}, {"w": "more", "b": [0.3781, 0.6179, 0.4173, 0.6327]}, {"w": "often", "b": [0.423, 0.6179, 0.4627, 0.6327]}, {"w": "than", "b": [0.4683, 0.6179, 0.5045, 0.6327]}, {"w": "the", "b": [0.5102, 0.6179, 0.5353, 0.6327]}, {"w": "average,", "b": [0.541, 0.6179, 0.6048, 0.6327]}, {"w": "ask", "b": [0.6106, 0.6179, 0.6363, 0.6327]}, {"w": "if", "b": [0.642, 0.6179, 0.6526, 0.6327]}, {"w": "they", "b": [0.6583, 0.6179, 0.6929, 0.6327]}, {"w": "encountered", "b": [0.6986, 0.6179, 0.7936, 0.6327]}, {"w": "technical", "b": [0.7993, 0.6179, 0.8692, 0.6327]}, {"w": "problems,", "b": [0.1312, 0.6358, 0.2093, 0.6507]}, {"w": "or", "b": [0.2155, 0.6358, 0.2319, 0.6507]}, {"w": "simply", "b": [0.2381, 0.6358, 0.291, 0.6507]}, {"w": "were", "b": [0.2971, 0.6358, 0.3336, 0.6507]}, {"w": "not", "b": [0.3397, 0.6358, 0.3664, 0.6507]}, {"w": "interested", "b": [0.3725, 0.6358, 0.4512, 0.6507]}, {"w": "in", "b": [0.4573, 0.6358, 0.4727, 0.6507]}, {"w": "some", "b": [0.4789, 0.6358, 0.519, 0.6507]}, {"w": "topics.", "b": [0.5251, 0.6358, 0.5775, 0.6507]}]}, {"id": "b_8", "type": "paragraph", "text": "You cannot entirely avoid bias in data. There’s no silver bullet. As a general rule, keep a human in the loop, especially if your model affects people’s lives.", "words": [{"w": "You", "b": [0.1305, 0.6626, 0.163, 0.6777]}, {"w": "cannot", "b": [0.1694, 0.6626, 0.2248, 0.6777]}, {"w": "entirely", "b": [0.2312, 0.6626, 0.293, 0.6777]}, {"w": "avoid", "b": [0.2993, 0.6626, 0.3427, 0.6777]}, {"w": "bias", "b": [0.3491, 0.6626, 0.3817, 0.6777]}, {"w": "in", "b": [0.388, 0.6626, 0.4037, 0.6777]}, {"w": "data.", "b": [0.4101, 0.6626, 0.4519, 0.6777]}, {"w": "There’s", "b": [0.4608, 0.6626, 0.5217, 0.6777]}, {"w": "no", "b": [0.528, 0.6626, 0.5479, 0.6777]}, {"w": "silver", "b": [0.5543, 0.6626, 0.5973, 0.6777]}, {"w": "bullet.", "b": [0.6037, 0.6626, 0.656, 0.6777]}, {"w": "As", "b": [0.6649, 0.6626, 0.6864, 0.6777]}, {"w": "a", "b": [0.6928, 0.6626, 0.7022, 0.6777]}, {"w": "general", "b": [0.7086, 0.6626, 0.7672, 0.6777]}, {"w": "rule,", "b": [0.7736, 0.6626, 0.8103, 0.6777]}, {"w": "keep", "b": [0.8167, 0.6626, 0.8533, 0.6777]}, {"w": "a", "b": [0.8597, 0.6626, 0.8691, 0.6777]}, {"w": "human", "b": [0.1312, 0.6806, 0.1861, 0.6956]}, {"w": "in", "b": [0.1922, 0.6806, 0.2076, 0.6956]}, {"w": "the", "b": [0.2138, 0.6806, 0.2394, 0.6956]}, {"w": "loop,", "b": [0.2456, 0.6806, 0.285, 0.6956]}, {"w": "especially", "b": [0.2912, 0.6806, 0.3682, 0.6956]}, {"w": "if", "b": [0.3744, 0.6806, 0.3852, 0.6956]}, {"w": "your", "b": [0.3913, 0.6806, 0.4272, 0.6956]}, {"w": "model", "b": [0.4334, 0.6806, 0.4821, 0.6956]}, {"w": "affects", "b": [0.4882, 0.6806, 0.5391, 0.6956]}, {"w": "people’s", "b": [0.5453, 0.6806, 0.6095, 0.6956]}, {"w": "lives.", "b": [0.6156, 0.6806, 0.6557, 0.6956]}]}, {"id": "b_9", "type": "paragraph", "text": "Recall that there is a temptation among the data analysts to assume that machine learning models are inherently fair because they make decisions based on evidence and math, as opposed to often messy or irrational human judgments. This is, unfortunately, not always the case: inevitably, a model trained on biased data will produce biased results.", "words": [{"w": "Recall", "b": [0.1312, 0.7076, 0.1805, 0.7225]}, {"w": "that", "b": [0.1867, 0.7076, 0.2204, 0.7225]}, {"w": "there", "b": [0.2265, 0.7076, 0.2675, 0.7225]}, {"w": "is", "b": [0.2736, 0.7076, 0.286, 0.7225]}, {"w": "a", "b": [0.2922, 0.7076, 0.3014, 0.7225]}, {"w": "temptation", "b": [0.3075, 0.7076, 0.3964, 0.7225]}, {"w": "among", "b": [0.4025, 0.7076, 0.4556, 0.7225]}, {"w": "the", "b": [0.4618, 0.7076, 0.4873, 0.7225]}, {"w": "data", "b": [0.4935, 0.7076, 0.5292, 0.7225]}, {"w": "analysts", "b": [0.5354, 0.7076, 0.6005, 0.7225]}, {"w": "to", "b": [0.6067, 0.7076, 0.623, 0.7225]}, {"w": "assume", "b": [0.6292, 0.7076, 0.6866, 0.7225]}, {"w": "that", "b": [0.6927, 0.7076, 0.7264, 0.7225]}, {"w": "machine", "b": [0.7326, 0.7076, 0.7985, 0.7225]}, {"w": "learning", "b": [0.8046, 0.7076, 0.869, 0.7225]}, {"w": "models", "b": [0.1312, 0.7254, 0.1883, 0.7405]}, {"w": "are", "b": [0.1959, 0.7254, 0.2211, 0.7405]}, {"w": "inherently", "b": [0.2287, 0.7254, 0.3115, 0.7405]}, {"w": "fair", "b": [0.3191, 0.7254, 0.3469, 0.7405]}, {"w": "because", "b": [0.3545, 0.7254, 0.4179, 0.7405]}, {"w": "they", "b": [0.4255, 0.7254, 0.4616, 0.7405]}, {"w": "make", "b": [0.4692, 0.7254, 0.5121, 0.7405]}, {"w": "decisions", "b": [0.5198, 0.7254, 0.5921, 0.7405]}, {"w": "based", "b": [0.5998, 0.7254, 0.6459, 0.7405]}, {"w": "on", "b": [0.6536, 0.7254, 0.6734, 0.7405]}, {"w": "evidence", "b": [0.681, 0.7254, 0.7506, 0.7405]}, {"w": "and", "b": [0.7583, 0.7254, 0.7886, 0.7405]}, {"w": "math,", "b": [0.7962, 0.7254, 0.8443, 0.7405]}, {"w": "as", "b": [0.8523, 0.7254, 0.8692, 0.7405]}, {"w": "opposed", "b": [0.1312, 0.7434, 0.1976, 0.7584]}, {"w": "to", "b": [0.2037, 0.7434, 0.2204, 0.7584]}, {"w": "often", "b": [0.2265, 0.7434, 0.2677, 0.7584]}, {"w": "messy", "b": [0.2739, 0.7434, 0.3225, 0.7584]}, {"w": "or", "b": [0.3287, 0.7434, 0.3454, 0.7584]}, {"w": "irrational", "b": [0.3515, 0.7434, 0.4278, 0.7584]}, {"w": "human", "b": [0.4339, 0.7434, 0.4897, 0.7584]}, {"w": "judgments.", "b": [0.4958, 0.7434, 0.5857, 0.7584]}, {"w": "This", "b": [0.5939, 0.7434, 0.6304, 0.7584]}, {"w": "is,", "b": [0.6366, 0.7434, 0.6544, 0.7584]}, {"w": "unfortunately,", "b": [0.6606, 0.7434, 0.7759, 0.7584]}, {"w": "not", "b": [0.782, 0.7434, 0.8091, 0.7584]}, {"w": "always", "b": [0.8153, 0.7434, 0.8691, 0.7584]}, {"w": "the", "b": [0.1312, 0.7614, 0.1569, 0.7764]}, {"w": "case:", "b": [0.163, 0.7614, 0.2011, 0.7764]}, {"w": "inevitably,", "b": [0.2093, 0.7614, 0.2929, 0.7764]}, {"w": "a", "b": [0.299, 0.7614, 0.3082, 0.7764]}, {"w": "model", "b": [0.3144, 0.7614, 0.3631, 0.7764]}, {"w": "trained", "b": [0.3692, 0.7614, 0.4267, 0.7764]}, {"w": "on", "b": [0.4329, 0.7614, 0.4524, 0.7764]}, {"w": "biased", "b": [0.4585, 0.7614, 0.5089, 0.7764]}, {"w": "data", "b": [0.515, 0.7614, 0.5509, 0.7764]}, {"w": "will", "b": [0.557, 0.7614, 0.5857, 0.7764]}, {"w": "produce", "b": [0.5919, 0.7614, 0.6561, 0.7764]}, {"w": "biased", "b": [0.6622, 0.7614, 0.7126, 0.7764]}, {"w": "results.", "b": [0.7187, 0.7614, 0.7764, 0.7764]}]}, {"id": "b_10", "type": "paragraph", "text": "It is the duty of people training the model to ensure that the output is fair. But what’s fair, you may ask? Unfortunately, again, there is no silver bullet measurement that would always detect unfairness. Choosing an appropriate definition of model fairness is always problem-specific and requires human judgment. In Section ?? of Chapter 7, we consider several definitions of fairness in machine learning.", "words": [{"w": "It", "b": [0.1312, 0.7882, 0.1453, 0.8033]}, {"w": "is", "b": [0.1524, 0.7882, 0.165, 0.8033]}, {"w": "the", "b": [0.172, 0.7882, 0.1982, 0.8033]}, {"w": "duty", "b": [0.2052, 0.7882, 0.2429, 0.8033]}, {"w": "of", "b": [0.2499, 0.7882, 0.265, 0.8033]}, {"w": "people", "b": [0.2721, 0.7882, 0.3249, 0.8033]}, {"w": "training", "b": [0.3319, 0.7882, 0.3968, 0.8033]}, {"w": "the", "b": [0.4038, 0.7882, 0.43, 0.8033]}, {"w": "model", "b": [0.437, 0.7882, 0.4867, 0.8033]}, {"w": "to", "b": [0.4937, 0.7882, 0.5104, 0.8033]}, {"w": "ensure", "b": [0.5174, 0.7882, 0.5699, 0.8033]}, {"w": "that", "b": [0.5769, 0.7882, 0.6114, 0.8033]}, {"w": "the", "b": [0.6184, 0.7882, 0.6446, 0.8033]}, {"w": "output", "b": [0.6516, 0.7882, 0.707, 0.8033]}, {"w": "is", "b": [0.7141, 0.7882, 0.7267, 0.8033]}, {"w": "fair.", "b": [0.7337, 0.7882, 0.7667, 0.8033]}, {"w": "But", "b": [0.7775, 0.7882, 0.8086, 0.8033]}, {"w": "what’s", "b": [0.8157, 0.7882, 0.8691, 0.8033]}, {"w": "fair,", "b": [0.1312, 0.8062, 0.1642, 0.8213]}, {"w": "you", "b": [0.1703, 0.8062, 0.1996, 0.8213]}, {"w": "may", "b": [0.2057, 0.8062, 0.2401, 0.8213]}, {"w": "ask?", "b": [0.2463, 0.8062, 0.2819, 0.8213]}, {"w": "Unfortunately,", "b": [0.2901, 0.8062, 0.4092, 0.8213]}, {"w": "again,", "b": [0.4153, 0.8062, 0.4644, 0.8213]}, {"w": "there", "b": [0.4706, 0.8062, 0.5124, 0.8213]}, {"w": "is", "b": [0.5185, 0.8062, 0.5312, 0.8213]}, {"w": "no", "b": [0.5373, 0.8062, 0.5572, 0.8213]}, {"w": "silver", "b": [0.5633, 0.8062, 0.6063, 0.8213]}, {"w": "bullet", "b": [0.6124, 0.8062, 0.6594, 0.8213]}, {"w": "measurement", "b": [0.6656, 0.8062, 0.7738, 0.8213]}, {"w": "that", "b": [0.7799, 0.8062, 0.8144, 0.8213]}, {"w": "would", "b": [0.8205, 0.8062, 0.8691, 0.8213]}, {"w": "always", "b": [0.1312, 0.8241, 0.1852, 0.8392]}, {"w": "detect", "b": [0.1925, 0.8241, 0.2427, 0.8392]}, {"w": "unfairness.", "b": [0.25, 0.8241, 0.3377, 0.8392]}, {"w": "Choosing", "b": [0.3493, 0.8241, 0.4252, 0.8392]}, {"w": "an", "b": [0.4325, 0.8241, 0.4524, 0.8392]}, {"w": "appropriate", "b": [0.4597, 0.8241, 0.555, 0.8392]}, {"w": "definition", "b": [0.5623, 0.8241, 0.6397, 0.8392]}, {"w": "of", "b": [0.647, 0.8241, 0.6622, 0.8392]}, {"w": "model", "b": [0.6695, 0.8241, 0.7191, 0.8392]}, {"w": "fairness", "b": [0.7264, 0.8241, 0.7879, 0.8392]}, {"w": "is", "b": [0.7952, 0.8241, 0.8078, 0.8392]}, {"w": "always", "b": [0.8151, 0.8241, 0.8691, 0.8392]}, {"w": "problem-specific", "b": [0.1312, 0.842, 0.2637, 0.8572]}, {"w": "and", "b": [0.2708, 0.842, 0.3012, 0.8572]}, {"w": "requires", "b": [0.3083, 0.842, 0.3729, 0.8572]}, {"w": "human", "b": [0.38, 0.842, 0.436, 0.8572]}, {"w": "judgment.", "b": [0.4431, 0.842, 0.5258, 0.8572]}, {"w": "In", "b": [0.537, 0.842, 0.5542, 0.8572]}, {"w": "Section", "b": [0.5613, 0.842, 0.621, 0.8572]}, {"w": "??", "b": [0.6279, 0.8422, 0.6479, 0.8571]}, {"w": "of", "b": [0.6551, 0.842, 0.6702, 0.8572]}, {"w": "Chapter", "b": [0.6774, 0.842, 0.7443, 0.8572]}, {"w": "7,", "b": [0.7515, 0.842, 0.7661, 0.8572]}, {"w": "we", "b": [0.7735, 0.842, 0.795, 0.8572]}, {"w": "consider", "b": [0.8021, 0.842, 0.8692, 0.8572]}, {"w": "several", "b": [0.1312, 0.8601, 0.1858, 0.8751]}, {"w": "definitions", "b": [0.1919, 0.8601, 0.2751, 0.8751]}, {"w": "of", "b": [0.2812, 0.8601, 0.2961, 0.8751]}, {"w": "fairness", "b": [0.3036, 0.8601, 0.3733, 0.8751]}, {"w": "in", "b": [0.3794, 0.8601, 0.3948, 0.8751]}, {"w": "machine", "b": [0.401, 0.8601, 0.4671, 0.8751]}, {"w": "learning.", "b": [0.4733, 0.8601, 0.543, 0.8751]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 17", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "17", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 61, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Human involvement in all stages of data gathering and preparation is the best approach to make sure that the possible damage caused by machine learning is minimized.", "words": [{"w": "Human", "b": [0.1312, 0.0884, 0.1904, 0.1034]}, {"w": "involvement", "b": [0.1965, 0.0884, 0.2932, 0.1034]}, {"w": "in", "b": [0.2993, 0.0884, 0.3148, 0.1034]}, {"w": "all", "b": [0.3209, 0.0884, 0.3405, 0.1034]}, {"w": "stages", "b": [0.3466, 0.0884, 0.3952, 0.1034]}, {"w": "of", "b": [0.4013, 0.0884, 0.4163, 0.1034]}, {"w": "data", "b": [0.4224, 0.0884, 0.4584, 0.1034]}, {"w": "gathering", "b": [0.4646, 0.0884, 0.5407, 0.1034]}, {"w": "and", "b": [0.5469, 0.0884, 0.5767, 0.1034]}, {"w": "preparation", "b": [0.5829, 0.0884, 0.6765, 0.1034]}, {"w": "is", "b": [0.6827, 0.0884, 0.6952, 0.1034]}, {"w": "the", "b": [0.7013, 0.0884, 0.727, 0.1034]}, {"w": "best", "b": [0.7332, 0.0884, 0.7667, 0.1034]}, {"w": "approach", "b": [0.7729, 0.0884, 0.8465, 0.1034]}, {"w": "to", "b": [0.8526, 0.0884, 0.8691, 0.1034]}, {"w": "make", "b": [0.1312, 0.1063, 0.1733, 0.1213]}, {"w": "sure", "b": [0.1794, 0.1063, 0.2124, 0.1213]}, {"w": "that", "b": [0.2186, 0.1063, 0.2524, 0.1213]}, {"w": "the", "b": [0.2585, 0.1063, 0.2842, 0.1213]}, {"w": "possible", "b": [0.2903, 0.1063, 0.3536, 0.1213]}, {"w": "damage", "b": [0.3598, 0.1063, 0.4213, 0.1213]}, {"w": "caused", "b": [0.4274, 0.1063, 0.4809, 0.1213]}, {"w": "by", "b": [0.487, 0.1063, 0.5065, 0.1213]}, {"w": "machine", "b": [0.5127, 0.1063, 0.5788, 0.1213]}, {"w": "learning", "b": [0.5849, 0.1063, 0.6496, 0.1213]}, {"w": "is", "b": [0.6557, 0.1063, 0.6682, 0.1213]}, {"w": "minimized.", "b": [0.6743, 0.1063, 0.7625, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "3.2.5 Low Predictive Power", "words": [{"w": "3.2.5", "b": [0.1312, 0.1542, 0.1749, 0.1692]}, {"w": "Low", "b": [0.1961, 0.1542, 0.2342, 0.1692]}, {"w": "Predictive", "b": [0.2413, 0.1542, 0.3358, 0.1692]}, {"w": "Power", "b": [0.3429, 0.1542, 0.4001, 0.1692]}]}, {"id": "b_2", "type": "paragraph", "text": "Low predictive power is an issue that you often don’t consider until you have spent fruitless energy trying to train a good model. Does the model underperform because it is not expressive enough? Does the data not contain enough information from which to learn? You don’t know.", "words": [{"w": "Low", "b": [0.1312, 0.1908, 0.1693, 0.2057]}, {"w": "predictive", "b": [0.1788, 0.1908, 0.2707, 0.2057]}, {"w": "power", "b": [0.2801, 0.1908, 0.3357, 0.2057]}, {"w": "is", "b": [0.3439, 0.1906, 0.3565, 0.2058]}, {"w": "an", "b": [0.3648, 0.1906, 0.3846, 0.2058]}, {"w": "issue", "b": [0.3928, 0.1906, 0.4318, 0.2058]}, {"w": "that", "b": [0.44, 0.1906, 0.4745, 0.2058]}, {"w": "you", "b": [0.4827, 0.1906, 0.512, 0.2058]}, {"w": "often", "b": [0.5202, 0.1906, 0.5615, 0.2058]}, {"w": "don’t", "b": [0.5698, 0.1906, 0.6126, 0.2058]}, {"w": "consider", "b": [0.6209, 0.1906, 0.688, 0.2058]}, {"w": "until", "b": [0.6962, 0.1906, 0.7344, 0.2058]}, {"w": "you", "b": [0.7426, 0.1906, 0.7719, 0.2058]}, {"w": "have", "b": [0.7801, 0.1906, 0.8173, 0.2058]}, {"w": "spent", "b": [0.8255, 0.1906, 0.8695, 0.2058]}, {"w": "fruitless", "b": [0.1312, 0.2088, 0.1933, 0.2236]}, {"w": "energy", "b": [0.1993, 0.2088, 0.2511, 0.2236]}, {"w": "trying", "b": [0.2571, 0.2088, 0.3049, 0.2236]}, {"w": "to", "b": [0.3109, 0.2088, 0.327, 0.2236]}, {"w": "train", "b": [0.3329, 0.2088, 0.3712, 0.2236]}, {"w": "a", "b": [0.3772, 0.2088, 0.3862, 0.2236]}, {"w": "good", "b": [0.3922, 0.2088, 0.4304, 0.2236]}, {"w": "model.", "b": [0.4364, 0.2088, 0.4892, 0.2236]}, {"w": "Does", "b": [0.4973, 0.2088, 0.5359, 0.2236]}, {"w": "the", "b": [0.5418, 0.2088, 0.567, 0.2236]}, {"w": "model", "b": [0.573, 0.2088, 0.6207, 0.2236]}, {"w": "underperform", "b": [0.6267, 0.2088, 0.7344, 0.2236]}, {"w": "because", "b": [0.7404, 0.2088, 0.8013, 0.2236]}, {"w": "it", "b": [0.8073, 0.2088, 0.8194, 0.2236]}, {"w": "is", "b": [0.8253, 0.2088, 0.8375, 0.2236]}, {"w": "not", "b": [0.8435, 0.2088, 0.8696, 0.2236]}, {"w": "expressive", "b": [0.1312, 0.2268, 0.2106, 0.2416]}, {"w": "enough?", "b": [0.2167, 0.2268, 0.2817, 0.2416]}, {"w": "Does", "b": [0.2899, 0.2268, 0.3285, 0.2416]}, {"w": "the", "b": [0.3347, 0.2268, 0.3598, 0.2416]}, {"w": "data", "b": [0.366, 0.2268, 0.4012, 0.2416]}, {"w": "not", "b": [0.4074, 0.2268, 0.4336, 0.2416]}, {"w": "contain", "b": [0.4397, 0.2268, 0.4976, 0.2416]}, {"w": "enough", "b": [0.5038, 0.2268, 0.5601, 0.2416]}, {"w": "information", "b": [0.5663, 0.2268, 0.6585, 0.2416]}, {"w": "from", "b": [0.6646, 0.2268, 0.7014, 0.2416]}, {"w": "which", "b": [0.7076, 0.2268, 0.7534, 0.2416]}, {"w": "to", "b": [0.7595, 0.2268, 0.7756, 0.2416]}, {"w": "learn?", "b": [0.7818, 0.2268, 0.8297, 0.2416]}, {"w": "You", "b": [0.8379, 0.2268, 0.8691, 0.2416]}, {"w": "don’t", "b": [0.1312, 0.2446, 0.1733, 0.2596]}, {"w": "know.", "b": [0.1794, 0.2446, 0.2266, 0.2596]}]}, {"id": "b_3", "type": "paragraph", "text": "Suppose the goal is to predict whether a listener will like a new song on a music streaming service. Your data is the name of the artist, the song title, lyrics, and whether that song is in their playlist. The model you train with this data will be far from perfect.", "words": [{"w": "Suppose", "b": [0.1312, 0.2715, 0.1979, 0.2865]}, {"w": "the", "b": [0.204, 0.2715, 0.2298, 0.2865]}, {"w": "goal", "b": [0.236, 0.2715, 0.269, 0.2865]}, {"w": "is", "b": [0.2751, 0.2715, 0.2876, 0.2865]}, {"w": "to", "b": [0.2938, 0.2715, 0.3103, 0.2865]}, {"w": "predict", "b": [0.3164, 0.2715, 0.3733, 0.2865]}, {"w": "whether", "b": [0.3794, 0.2715, 0.4445, 0.2865]}, {"w": "a", "b": [0.4506, 0.2715, 0.4599, 0.2865]}, {"w": "listener", "b": [0.4661, 0.2715, 0.525, 0.2865]}, {"w": "will", "b": [0.5312, 0.2715, 0.5601, 0.2865]}, {"w": "like", "b": [0.5662, 0.2715, 0.5941, 0.2865]}, {"w": "a", "b": [0.6002, 0.2715, 0.6095, 0.2865]}, {"w": "new", "b": [0.6157, 0.2715, 0.6476, 0.2865]}, {"w": "song", "b": [0.6538, 0.2715, 0.69, 0.2865]}, {"w": "on", "b": [0.6962, 0.2715, 0.7158, 0.2865]}, {"w": "a", "b": [0.7219, 0.2715, 0.7312, 0.2865]}, {"w": "music", "b": [0.7373, 0.2715, 0.7834, 0.2865]}, {"w": "streaming", "b": [0.7895, 0.2715, 0.8691, 0.2865]}, {"w": "service.", "b": [0.1312, 0.2896, 0.1892, 0.3044]}, {"w": "Your", "b": [0.1973, 0.2896, 0.2355, 0.3044]}, {"w": "data", "b": [0.2413, 0.2896, 0.2765, 0.3044]}, {"w": "is", "b": [0.2823, 0.2896, 0.2945, 0.3044]}, {"w": "the", "b": [0.3003, 0.2896, 0.3254, 0.3044]}, {"w": "name", "b": [0.3313, 0.2896, 0.3735, 0.3044]}, {"w": "of", "b": [0.3793, 0.2896, 0.3938, 0.3044]}, {"w": "the", "b": [0.3997, 0.2896, 0.4248, 0.3044]}, {"w": "artist,", "b": [0.4306, 0.2896, 0.478, 0.3044]}, {"w": "the", "b": [0.4839, 0.2896, 0.509, 0.3044]}, {"w": "song", "b": [0.5149, 0.2896, 0.5501, 0.3044]}, {"w": "title,", "b": [0.556, 0.2896, 0.5931, 0.3044]}, {"w": "lyrics,", "b": [0.599, 0.2896, 0.6459, 0.3044]}, {"w": "and", "b": [0.6518, 0.2896, 0.681, 0.3044]}, {"w": "whether", "b": [0.6868, 0.2896, 0.7502, 0.3044]}, {"w": "that", "b": [0.756, 0.2896, 0.7891, 0.3044]}, {"w": "song", "b": [0.795, 0.2896, 0.8302, 0.3044]}, {"w": "is", "b": [0.8361, 0.2896, 0.8482, 0.3044]}, {"w": "in", "b": [0.854, 0.2896, 0.8691, 0.3044]}, {"w": "their", "b": [0.1312, 0.3074, 0.1692, 0.3224]}, {"w": "playlist.", "b": [0.1754, 0.3074, 0.2391, 0.3224]}, {"w": "The", "b": [0.2473, 0.3074, 0.2791, 0.3224]}, {"w": "model", "b": [0.2852, 0.3074, 0.3339, 0.3224]}, {"w": "you", "b": [0.3401, 0.3074, 0.3688, 0.3224]}, {"w": "train", "b": [0.3749, 0.3074, 0.4139, 0.3224]}, {"w": "with", "b": [0.4201, 0.3074, 0.456, 0.3224]}, {"w": "this", "b": [0.4621, 0.3074, 0.492, 0.3224]}, {"w": "data", "b": [0.4981, 0.3074, 0.534, 0.3224]}, {"w": "will", "b": [0.5401, 0.3074, 0.5688, 0.3224]}, {"w": "be", "b": [0.575, 0.3074, 0.594, 0.3224]}, {"w": "far", "b": [0.6001, 0.3074, 0.6222, 0.3224]}, {"w": "from", "b": [0.6284, 0.3074, 0.6659, 0.3224]}, {"w": "perfect.", "b": [0.672, 0.3074, 0.7326, 0.3224]}]}, {"id": "b_4", "type": "paragraph", "text": "Artists who are not in the listener’s playlist are unlikely to receive a high score from the model. Furthermore, many users will only add some songs of a specific artist to their playlist. Their musical preferences are significantly influenced by the song arrangement, choice of instruments, sound effects, tone of voice, and subtle changes in tonality, rhythm, and beat. These are properties of songs that cannot be found in lyrics, title, or the artist’s name; they have to be extracted from the sound file.", "words": [{"w": "Artists", "b": [0.1305, 0.3342, 0.1868, 0.3493]}, {"w": "who", "b": [0.1937, 0.3342, 0.2271, 0.3493]}, {"w": "are", "b": [0.234, 0.3342, 0.2592, 0.3493]}, {"w": "not", "b": [0.2661, 0.3342, 0.2933, 0.3493]}, {"w": "in", "b": [0.3002, 0.3342, 0.3159, 0.3493]}, {"w": "the", "b": [0.3228, 0.3342, 0.3489, 0.3493]}, {"w": "listener’s", "b": [0.3558, 0.3342, 0.4283, 0.3493]}, {"w": "playlist", "b": [0.4352, 0.3342, 0.4949, 0.3493]}, {"w": "are", "b": [0.5018, 0.3342, 0.527, 0.3493]}, {"w": "unlikely", "b": [0.5339, 0.3342, 0.5983, 0.3493]}, {"w": "to", "b": [0.6052, 0.3342, 0.6219, 0.3493]}, {"w": "receive", "b": [0.6288, 0.3342, 0.6843, 0.3493]}, {"w": "a", "b": [0.6912, 0.3342, 0.7006, 0.3493]}, {"w": "high", "b": [0.7075, 0.3342, 0.7431, 0.3493]}, {"w": "score", "b": [0.75, 0.3342, 0.791, 0.3493]}, {"w": "from", "b": [0.7979, 0.3342, 0.8361, 0.3493]}, {"w": "the", "b": [0.843, 0.3342, 0.8691, 0.3493]}, {"w": "model.", "b": [0.1312, 0.3524, 0.184, 0.3672]}, {"w": "Furthermore,", "b": [0.1921, 0.3524, 0.296, 0.3672]}, {"w": "many", "b": [0.3019, 0.3524, 0.3451, 0.3672]}, {"w": "users", "b": [0.3509, 0.3524, 0.3904, 0.3672]}, {"w": "will", "b": [0.3963, 0.3524, 0.4244, 0.3672]}, {"w": "only", "b": [0.4302, 0.3524, 0.4639, 0.3672]}, {"w": "add", "b": [0.4698, 0.3524, 0.4989, 0.3672]}, {"w": "some", "b": [0.5046, 0.3523, 0.5447, 0.3672]}, {"w": "songs", "b": [0.5505, 0.3524, 0.5929, 0.3672]}, {"w": "of", "b": [0.5988, 0.3524, 0.6134, 0.3672]}, {"w": "a", "b": [0.6192, 0.3524, 0.6283, 0.3672]}, {"w": "specific", "b": [0.6341, 0.3524, 0.691, 0.3672]}, {"w": "artist", "b": [0.6969, 0.3524, 0.7392, 0.3672]}, {"w": "to", "b": [0.7451, 0.3524, 0.7612, 0.3672]}, {"w": "their", "b": [0.767, 0.3524, 0.8043, 0.3672]}, {"w": "playlist.", "b": [0.8101, 0.3524, 0.8725, 0.3672]}, {"w": "Their", "b": [0.1306, 0.3701, 0.1756, 0.3852]}, {"w": "musical", "b": [0.1828, 0.3701, 0.2441, 0.3852]}, {"w": "preferences", "b": [0.2513, 0.3701, 0.342, 0.3852]}, {"w": "are", "b": [0.3492, 0.3701, 0.3743, 0.3852]}, {"w": "significantly", "b": [0.3815, 0.3701, 0.48, 0.3852]}, {"w": "influenced", "b": [0.4872, 0.3701, 0.5698, 0.3852]}, {"w": "by", "b": [0.577, 0.3701, 0.5969, 0.3852]}, {"w": "the", "b": [0.6041, 0.3701, 0.6302, 0.3852]}, {"w": "song", "b": [0.6374, 0.3701, 0.6741, 0.3852]}, {"w": "arrangement,", "b": [0.6813, 0.3701, 0.7897, 0.3852]}, {"w": "choice", "b": [0.7971, 0.3701, 0.8468, 0.3852]}, {"w": "of", "b": [0.854, 0.3701, 0.8692, 0.3852]}, {"w": "instruments,", "b": [0.1312, 0.3881, 0.2327, 0.4032]}, {"w": "sound", "b": [0.2388, 0.3881, 0.2867, 0.4032]}, {"w": "effects,", "b": [0.2928, 0.3881, 0.3484, 0.4032]}, {"w": "tone", "b": [0.3546, 0.3881, 0.3898, 0.4032]}, {"w": "of", "b": [0.396, 0.3881, 0.411, 0.4032]}, {"w": "voice,", "b": [0.4171, 0.3881, 0.4628, 0.4032]}, {"w": "and", "b": [0.4689, 0.3881, 0.499, 0.4032]}, {"w": "subtle", "b": [0.5052, 0.3881, 0.554, 0.4032]}, {"w": "changes", "b": [0.5602, 0.3881, 0.6231, 0.4032]}, {"w": "in", "b": [0.6292, 0.3881, 0.6448, 0.4032]}, {"w": "tonality,", "b": [0.6509, 0.3881, 0.7178, 0.4032]}, {"w": "rhythm,", "b": [0.724, 0.3881, 0.7894, 0.4032]}, {"w": "and", "b": [0.7955, 0.3881, 0.8256, 0.4032]}, {"w": "beat.", "b": [0.8317, 0.3881, 0.8727, 0.4032]}, {"w": "These", "b": [0.1306, 0.4062, 0.1775, 0.4211]}, {"w": "are", "b": [0.1836, 0.4062, 0.2081, 0.4211]}, {"w": "properties", "b": [0.2142, 0.4062, 0.2943, 0.4211]}, {"w": "of", "b": [0.3005, 0.4062, 0.3152, 0.4211]}, {"w": "songs", "b": [0.3213, 0.4062, 0.3643, 0.4211]}, {"w": "that", "b": [0.3704, 0.4062, 0.404, 0.4211]}, {"w": "cannot", "b": [0.4101, 0.4062, 0.464, 0.4211]}, {"w": "be", "b": [0.4702, 0.4062, 0.489, 0.4211]}, {"w": "found", "b": [0.4952, 0.4062, 0.5404, 0.4211]}, {"w": "in", "b": [0.5466, 0.4062, 0.5618, 0.4211]}, {"w": "lyrics,", "b": [0.568, 0.4062, 0.6155, 0.4211]}, {"w": "title,", "b": [0.6216, 0.4062, 0.6592, 0.4211]}, {"w": "or", "b": [0.6654, 0.4062, 0.6817, 0.4211]}, {"w": "the", "b": [0.6879, 0.4062, 0.7133, 0.4211]}, {"w": "artist’s", "b": [0.7194, 0.4062, 0.7746, 0.4211]}, {"w": "name;", "b": [0.7808, 0.4062, 0.8286, 0.4211]}, {"w": "they", "b": [0.8347, 0.4062, 0.8698, 0.4211]}, {"w": "have", "b": [0.1312, 0.4241, 0.1676, 0.439]}, {"w": "to", "b": [0.1738, 0.4241, 0.1902, 0.439]}, {"w": "be", "b": [0.1963, 0.4241, 0.2153, 0.439]}, {"w": "extracted", "b": [0.2215, 0.4241, 0.2969, 0.439]}, {"w": "from", "b": [0.3031, 0.4241, 0.3405, 0.439]}, {"w": "the", "b": [0.3467, 0.4241, 0.3723, 0.439]}, {"w": "sound", "b": [0.3785, 0.4241, 0.4258, 0.439]}, {"w": "file.", "b": [0.4319, 0.4241, 0.4606, 0.439]}]}, {"id": "b_5", "type": "paragraph", "text": "On the other hand, extracting these relevant features from an audio file is challenging. Even with modern neural networks, recommending songs based on how they sound is considered a hard task for artificial intelligence. Typically, song recommendations are developed by comparing playlists of different listeners and finding those with similar compositions.", "words": [{"w": "On", "b": [0.1312, 0.4511, 0.1555, 0.4659]}, {"w": "the", "b": [0.1616, 0.4511, 0.1869, 0.4659]}, {"w": "other", "b": [0.193, 0.4511, 0.2346, 0.4659]}, {"w": "hand,", "b": [0.2407, 0.4511, 0.2852, 0.4659]}, {"w": "extracting", "b": [0.2913, 0.4511, 0.3718, 0.4659]}, {"w": "these", "b": [0.3779, 0.4511, 0.4185, 0.4659]}, {"w": "relevant", "b": [0.4246, 0.4511, 0.4873, 0.4659]}, {"w": "features", "b": [0.4935, 0.4511, 0.5558, 0.4659]}, {"w": "from", "b": [0.5619, 0.4511, 0.5989, 0.4659]}, {"w": "an", "b": [0.605, 0.4511, 0.6242, 0.4659]}, {"w": "audio", "b": [0.6304, 0.4511, 0.6738, 0.4659]}, {"w": "file", "b": [0.68, 0.4511, 0.7032, 0.4659]}, {"w": "is", "b": [0.7094, 0.4511, 0.7216, 0.4659]}, {"w": "challenging.", "b": [0.7278, 0.4511, 0.8213, 0.4659]}, {"w": "Even", "b": [0.8295, 0.4511, 0.8692, 0.4659]}, {"w": "with", "b": [0.1306, 0.4689, 0.1667, 0.4839]}, {"w": "modern", "b": [0.1728, 0.4689, 0.2343, 0.4839]}, {"w": "neural", "b": [0.2404, 0.4689, 0.2911, 0.4839]}, {"w": "networks,", "b": [0.2972, 0.4689, 0.3743, 0.4839]}, {"w": "recommending", "b": [0.3805, 0.4689, 0.4982, 0.4839]}, {"w": "songs", "b": [0.5043, 0.4689, 0.5479, 0.4839]}, {"w": "based", "b": [0.5541, 0.4689, 0.5996, 0.4839]}, {"w": "on", "b": [0.6057, 0.4689, 0.6254, 0.4839]}, {"w": "how", "b": [0.6315, 0.4689, 0.664, 0.4839]}, {"w": "they", "b": [0.6701, 0.4689, 0.7058, 0.4839]}, {"w": "sound", "b": [0.7119, 0.4689, 0.7595, 0.4839]}, {"w": "is", "b": [0.7656, 0.4689, 0.7781, 0.4839]}, {"w": "considered", "b": [0.7843, 0.4689, 0.8691, 0.4839]}, {"w": "a", "b": [0.1312, 0.4868, 0.1406, 0.5019]}, {"w": "hard", "b": [0.1478, 0.4868, 0.1855, 0.5019]}, {"w": "task", "b": [0.1927, 0.4868, 0.2268, 0.5019]}, {"w": "for", "b": [0.2339, 0.4868, 0.2565, 0.5019]}, {"w": "artificial", "b": [0.2636, 0.4868, 0.3317, 0.5019]}, {"w": "intelligence.", "b": [0.3389, 0.4868, 0.4356, 0.5019]}, {"w": "Typically,", "b": [0.4469, 0.4868, 0.5275, 0.5019]}, {"w": "song", "b": [0.5349, 0.4868, 0.5716, 0.5019]}, {"w": "recommendations", "b": [0.5787, 0.4868, 0.7222, 0.5019]}, {"w": "are", "b": [0.7294, 0.4868, 0.7545, 0.5019]}, {"w": "developed", "b": [0.7617, 0.4868, 0.8428, 0.5019]}, {"w": "by", "b": [0.8499, 0.4868, 0.8698, 0.5019]}, {"w": "comparing", "b": [0.1312, 0.5048, 0.2154, 0.5198]}, {"w": "playlists", "b": [0.2215, 0.5048, 0.2874, 0.5198]}, {"w": "of", "b": [0.2935, 0.5048, 0.3084, 0.5198]}, {"w": "different", "b": [0.3145, 0.5048, 0.3812, 0.5198]}, {"w": "listeners", "b": [0.3874, 0.5048, 0.4533, 0.5198]}, {"w": "and", "b": [0.4594, 0.5048, 0.4892, 0.5198]}, {"w": "finding", "b": [0.4953, 0.5048, 0.5507, 0.5198]}, {"w": "those", "b": [0.5569, 0.5048, 0.599, 0.5198]}, {"w": "with", "b": [0.6052, 0.5048, 0.6411, 0.5198]}, {"w": "similar", "b": [0.6472, 0.5048, 0.7017, 0.5198]}, {"w": "compositions.", "b": [0.7078, 0.5048, 0.8173, 0.5198]}]}, {"id": "b_6", "type": "paragraph", "text": "Consider a different example of low predictive power. Let’s say we want to train a model that will predict where to point the telescope and observe something interesting. Our data are photos of various regions of the sky where something unusual was captured in the past. Based on these photos alone, it’s very unlikely that we will be able to train a model that accurately predicts such an event. However, if we add to this data the measurements of various sensors, such as those measuring radiofrequency signals from different zones, or particle bursts, it is more likely we will be able to make better predictions.", "words": [{"w": "Consider", "b": [0.1312, 0.5319, 0.2007, 0.5467]}, {"w": "a", "b": [0.2064, 0.5319, 0.2154, 0.5467]}, {"w": "different", "b": [0.221, 0.5319, 0.2864, 0.5467]}, {"w": "example", "b": [0.292, 0.5319, 0.3568, 0.5467]}, {"w": "of", "b": [0.3625, 0.5319, 0.377, 0.5467]}, {"w": "low", "b": [0.3827, 0.5319, 0.4093, 0.5467]}, {"w": "predictive", "b": [0.4149, 0.5319, 0.4923, 0.5467]}, {"w": "power.", "b": [0.498, 0.5319, 0.5498, 0.5467]}, {"w": "Let’s", "b": [0.5578, 0.5319, 0.5963, 0.5467]}, {"w": "say", "b": [0.602, 0.5319, 0.6272, 0.5467]}, {"w": "we", "b": [0.6328, 0.5319, 0.6534, 0.5467]}, {"w": "want", "b": [0.659, 0.5319, 0.6972, 0.5467]}, {"w": "to", "b": [0.7028, 0.5319, 0.7189, 0.5467]}, {"w": "train", "b": [0.7245, 0.5319, 0.7627, 0.5467]}, {"w": "a", "b": [0.7684, 0.5319, 0.7774, 0.5467]}, {"w": "model", "b": [0.783, 0.5319, 0.8308, 0.5467]}, {"w": "that", "b": [0.8364, 0.5319, 0.8695, 0.5467]}, {"w": "will", "b": [0.1306, 0.5496, 0.1598, 0.5647]}, {"w": "predict", "b": [0.1661, 0.5496, 0.2237, 0.5647]}, {"w": "where", "b": [0.2299, 0.5496, 0.278, 0.5647]}, {"w": "to", "b": [0.2843, 0.5496, 0.301, 0.5647]}, {"w": "point", "b": [0.3072, 0.5496, 0.3501, 0.5647]}, {"w": "the", "b": [0.3563, 0.5496, 0.3825, 0.5647]}, {"w": "telescope", "b": [0.3887, 0.5496, 0.4625, 0.5647]}, {"w": "and", "b": [0.4688, 0.5496, 0.4991, 0.5647]}, {"w": "observe", "b": [0.5053, 0.5496, 0.5662, 0.5647]}, {"w": "something", "b": [0.5724, 0.5496, 0.6562, 0.5647]}, {"w": "interesting.", "b": [0.6624, 0.5496, 0.7541, 0.5647]}, {"w": "Our", "b": [0.7625, 0.5496, 0.795, 0.5647]}, {"w": "data", "b": [0.8012, 0.5496, 0.8378, 0.5647]}, {"w": "are", "b": [0.844, 0.5496, 0.8691, 0.5647]}, {"w": "photos", "b": [0.1312, 0.5678, 0.1836, 0.5826]}, {"w": "of", "b": [0.1889, 0.5678, 0.2035, 0.5826]}, {"w": "various", "b": [0.2088, 0.5678, 0.2647, 0.5826]}, {"w": "regions", "b": [0.27, 0.5678, 0.3255, 0.5826]}, {"w": "of", "b": [0.3307, 0.5678, 0.3453, 0.5826]}, {"w": "the", "b": [0.3506, 0.5678, 0.3758, 0.5826]}, {"w": "sky", "b": [0.3811, 0.5678, 0.4073, 0.5826]}, {"w": "where", "b": [0.4126, 0.5678, 0.4589, 0.5826]}, {"w": "something", "b": [0.4642, 0.5678, 0.5447, 0.5826]}, {"w": "unusual", "b": [0.55, 0.5678, 0.6109, 0.5826]}, {"w": "was", "b": [0.6163, 0.5678, 0.645, 0.5826]}, {"w": "captured", "b": [0.6503, 0.5678, 0.7197, 0.5826]}, {"w": "in", "b": [0.725, 0.5678, 0.7401, 0.5826]}, {"w": "the", "b": [0.7454, 0.5678, 0.7705, 0.5826]}, {"w": "past.", "b": [0.7758, 0.5678, 0.8141, 0.5826]}, {"w": "Based", "b": [0.822, 0.5678, 0.8691, 0.5826]}, {"w": "on", "b": [0.1312, 0.5857, 0.1503, 0.6005]}, {"w": "these", "b": [0.1564, 0.5857, 0.1967, 0.6005]}, {"w": "photos", "b": [0.2028, 0.5857, 0.2551, 0.6005]}, {"w": "alone,", "b": [0.2612, 0.5857, 0.3074, 0.6005]}, {"w": "it’s", "b": [0.3135, 0.5857, 0.3377, 0.6005]}, {"w": "very", "b": [0.3437, 0.5857, 0.3775, 0.6005]}, {"w": "unlikely", "b": [0.3835, 0.5857, 0.4453, 0.6005]}, {"w": "that", "b": [0.4514, 0.5857, 0.4845, 0.6005]}, {"w": "we", "b": [0.4906, 0.5857, 0.5112, 0.6005]}, {"w": "will", "b": [0.5172, 0.5857, 0.5454, 0.6005]}, {"w": "be", "b": [0.5514, 0.5857, 0.57, 0.6005]}, {"w": "able", "b": [0.5761, 0.5857, 0.6082, 0.6005]}, {"w": "to", "b": [0.6143, 0.5857, 0.6304, 0.6005]}, {"w": "train", "b": [0.6364, 0.5857, 0.6747, 0.6005]}, {"w": "a", "b": [0.6807, 0.5857, 0.6898, 0.6005]}, {"w": "model", "b": [0.6958, 0.5857, 0.7435, 0.6005]}, {"w": "that", "b": [0.7496, 0.5857, 0.7828, 0.6005]}, {"w": "accurately", "b": [0.7888, 0.5857, 0.8698, 0.6005]}, {"w": "predicts", "b": [0.1312, 0.6036, 0.194, 0.6185]}, {"w": "such", "b": [0.2001, 0.6036, 0.2351, 0.6185]}, {"w": "an", "b": [0.2412, 0.6036, 0.2604, 0.6185]}, {"w": "event.", "b": [0.2666, 0.6036, 0.3135, 0.6185]}, {"w": "However,", "b": [0.3217, 0.6036, 0.3939, 0.6185]}, {"w": "if", "b": [0.4, 0.6036, 0.4106, 0.6185]}, {"w": "we", "b": [0.4168, 0.6036, 0.4375, 0.6185]}, {"w": "add", "b": [0.4436, 0.6036, 0.4729, 0.6185]}, {"w": "to", "b": [0.4791, 0.6036, 0.4952, 0.6185]}, {"w": "this", "b": [0.5014, 0.6036, 0.5308, 0.6185]}, {"w": "data", "b": [0.5369, 0.6036, 0.5722, 0.6185]}, {"w": "the", "b": [0.5784, 0.6036, 0.6036, 0.6185]}, {"w": "measurements", "b": [0.6098, 0.6036, 0.7215, 0.6185]}, {"w": "of", "b": [0.7277, 0.6036, 0.7423, 0.6185]}, {"w": "various", "b": [0.7485, 0.6036, 0.8046, 0.6185]}, {"w": "sensors,", "b": [0.8108, 0.6036, 0.8717, 0.6185]}, {"w": "such", "b": [0.1312, 0.6215, 0.1668, 0.6364]}, {"w": "as", "b": [0.1729, 0.6215, 0.1894, 0.6364]}, {"w": "those", "b": [0.1956, 0.6215, 0.2378, 0.6364]}, {"w": "measuring", "b": [0.2439, 0.6215, 0.3262, 0.6364]}, {"w": "radiofrequency", "b": [0.3324, 0.6215, 0.4511, 0.6364]}, {"w": "signals", "b": [0.4572, 0.6215, 0.5108, 0.6364]}, {"w": "from", "b": [0.5169, 0.6215, 0.5545, 0.6364]}, {"w": "different", "b": [0.5606, 0.6215, 0.6274, 0.6364]}, {"w": "zones,", "b": [0.6335, 0.6215, 0.6819, 0.6364]}, {"w": "or", "b": [0.6881, 0.6215, 0.7045, 0.6364]}, {"w": "particle", "b": [0.7107, 0.6215, 0.7713, 0.6364]}, {"w": "bursts,", "b": [0.7775, 0.6215, 0.8321, 0.6364]}, {"w": "it", "b": [0.8383, 0.6215, 0.8506, 0.6364]}, {"w": "is", "b": [0.8568, 0.6215, 0.8692, 0.6364]}, {"w": "more", "b": [0.1312, 0.6394, 0.1713, 0.6544]}, {"w": "likely", "b": [0.1774, 0.6394, 0.22, 0.6544]}, {"w": "we", "b": [0.2261, 0.6394, 0.2471, 0.6544]}, {"w": "will", "b": [0.2533, 0.6394, 0.282, 0.6544]}, {"w": "be", "b": [0.2881, 0.6394, 0.3071, 0.6544]}, {"w": "able", "b": [0.3133, 0.6394, 0.3461, 0.6544]}, {"w": "to", "b": [0.3523, 0.6394, 0.3687, 0.6544]}, {"w": "make", "b": [0.3748, 0.6394, 0.4168, 0.6544]}, {"w": "better", "b": [0.423, 0.6394, 0.4718, 0.6544]}, {"w": "predictions.", "b": [0.4779, 0.6394, 0.5714, 0.6544]}]}, {"id": "b_7", "type": "paragraph", "text": "Your work may be especially challenging the first time working with the dataset. If you cannot obtain acceptable results, no matter how complex the model becomes, it may be time to consider the problem of low predictive power. Engineer as many additional features as possible (apply your creativity!). Consider indirect data sources to enrich feature vectors.", "words": [{"w": "Your", "b": [0.1305, 0.6662, 0.1704, 0.6813]}, {"w": "work", "b": [0.1776, 0.6662, 0.2174, 0.6813]}, {"w": "may", "b": [0.2246, 0.6662, 0.2591, 0.6813]}, {"w": "be", "b": [0.2663, 0.6662, 0.2857, 0.6813]}, {"w": "especially", "b": [0.2929, 0.6662, 0.3714, 0.6813]}, {"w": "challenging", "b": [0.3786, 0.6662, 0.4702, 0.6813]}, {"w": "the", "b": [0.4774, 0.6662, 0.5035, 0.6813]}, {"w": "first", "b": [0.5108, 0.6662, 0.5433, 0.6813]}, {"w": "time", "b": [0.5506, 0.6662, 0.5872, 0.6813]}, {"w": "working", "b": [0.5944, 0.6662, 0.6593, 0.6813]}, {"w": "with", "b": [0.6665, 0.6662, 0.7031, 0.6813]}, {"w": "the", "b": [0.7103, 0.6662, 0.7364, 0.6813]}, {"w": "dataset.", "b": [0.7437, 0.6662, 0.8086, 0.6813]}, {"w": "If", "b": [0.82, 0.6662, 0.8325, 0.6813]}, {"w": "you", "b": [0.8398, 0.6662, 0.8691, 0.6813]}, {"w": "cannot", "b": [0.1312, 0.6844, 0.1845, 0.6992]}, {"w": "obtain", "b": [0.1905, 0.6844, 0.2407, 0.6992]}, {"w": "acceptable", "b": [0.2467, 0.6844, 0.3291, 0.6992]}, {"w": "results,", "b": [0.3351, 0.6844, 0.3916, 0.6992]}, {"w": "no", "b": [0.3976, 0.6844, 0.4167, 0.6992]}, {"w": "matter", "b": [0.4227, 0.6844, 0.476, 0.6992]}, {"w": "how", "b": [0.482, 0.6844, 0.5136, 0.6992]}, {"w": "complex", "b": [0.5196, 0.6844, 0.5844, 0.6992]}, {"w": "the", "b": [0.5904, 0.6844, 0.6155, 0.6992]}, {"w": "model", "b": [0.6215, 0.6844, 0.6692, 0.6992]}, {"w": "becomes,", "b": [0.6752, 0.6844, 0.7462, 0.6992]}, {"w": "it", "b": [0.7522, 0.6844, 0.7642, 0.6992]}, {"w": "may", "b": [0.7702, 0.6844, 0.8033, 0.6992]}, {"w": "be", "b": [0.8093, 0.6844, 0.8279, 0.6992]}, {"w": "time", "b": [0.8339, 0.6844, 0.8691, 0.6992]}, {"w": "to", "b": [0.1312, 0.7021, 0.148, 0.7172]}, {"w": "consider", "b": [0.1543, 0.7021, 0.2214, 0.7172]}, {"w": "the", "b": [0.2278, 0.7021, 0.254, 0.7172]}, {"w": "problem", "b": [0.2603, 0.7021, 0.3273, 0.7172]}, {"w": "of", "b": [0.3337, 0.7021, 0.3488, 0.7172]}, {"w": "low", "b": [0.3552, 0.7021, 0.3829, 0.7172]}, {"w": "predictive", "b": [0.3893, 0.7021, 0.4699, 0.7172]}, {"w": "power.", "b": [0.4763, 0.7021, 0.5302, 0.7172]}, {"w": "Engineer", "b": [0.539, 0.7021, 0.6115, 0.7172]}, {"w": "as", "b": [0.6179, 0.7021, 0.6347, 0.7172]}, {"w": "many", "b": [0.6411, 0.7021, 0.6861, 0.7172]}, {"w": "additional", "b": [0.6924, 0.7021, 0.7751, 0.7172]}, {"w": "features", "b": [0.7814, 0.7021, 0.8459, 0.7172]}, {"w": "as", "b": [0.8523, 0.7021, 0.8691, 0.7172]}, {"w": "possible", "b": [0.1312, 0.7202, 0.1945, 0.7352]}, {"w": "(apply", "b": [0.2007, 0.7202, 0.2525, 0.7352]}, {"w": "your", "b": [0.2586, 0.7202, 0.2945, 0.7352]}, {"w": "creativity!).", "b": [0.3007, 0.7202, 0.3946, 0.7352]}, {"w": "Consider", "b": [0.4028, 0.7202, 0.4737, 0.7352]}, {"w": "indirect", "b": [0.4799, 0.7202, 0.5415, 0.7352]}, {"w": "data", "b": [0.5476, 0.7202, 0.5835, 0.7352]}, {"w": "sources", "b": [0.5896, 0.7202, 0.6473, 0.7352]}, {"w": "to", "b": [0.6535, 0.7202, 0.6699, 0.7352]}, {"w": "enrich", "b": [0.676, 0.7202, 0.7248, 0.7352]}, {"w": "feature", "b": [0.731, 0.7202, 0.7869, 0.7352]}, {"w": "vectors.", "b": [0.7931, 0.7202, 0.8548, 0.7352]}]}, {"id": "b_8", "type": "paragraph", "text": "3.2.6 Outdated Examples", "words": [{"w": "3.2.6", "b": [0.1312, 0.7681, 0.1749, 0.783]}, {"w": "Outdated", "b": [0.1961, 0.7681, 0.2839, 0.783]}, {"w": "Examples", "b": [0.291, 0.7681, 0.3799, 0.783]}]}, {"id": "b_9", "type": "paragraph", "text": "Once you build the model and deploy it in production, the model usually performs well for some time. This period depends entirely on the phenomenon you are modeling.", "words": [{"w": "Once", "b": [0.1312, 0.8046, 0.1724, 0.8196]}, {"w": "you", "b": [0.1786, 0.8046, 0.2074, 0.8196]}, {"w": "build", "b": [0.2135, 0.8046, 0.2547, 0.8196]}, {"w": "the", "b": [0.2609, 0.8046, 0.2866, 0.8196]}, {"w": "model", "b": [0.2928, 0.8046, 0.3417, 0.8196]}, {"w": "and", "b": [0.3478, 0.8046, 0.3777, 0.8196]}, {"w": "deploy", "b": [0.3839, 0.8046, 0.4364, 0.8196]}, {"w": "it", "b": [0.4425, 0.8046, 0.4549, 0.8196]}, {"w": "in", "b": [0.461, 0.8046, 0.4765, 0.8196]}, {"w": "production,", "b": [0.4826, 0.8046, 0.5759, 0.8196]}, {"w": "the", "b": [0.582, 0.8046, 0.6078, 0.8196]}, {"w": "model", "b": [0.6139, 0.8046, 0.6628, 0.8196]}, {"w": "usually", "b": [0.6689, 0.8046, 0.7262, 0.8196]}, {"w": "performs", "b": [0.7323, 0.8046, 0.8036, 0.8196]}, {"w": "well", "b": [0.8098, 0.8046, 0.8411, 0.8196]}, {"w": "for", "b": [0.8473, 0.8046, 0.8695, 0.8196]}, {"w": "some", "b": [0.1312, 0.8226, 0.1713, 0.8375]}, {"w": "time.", "b": [0.1775, 0.8226, 0.2185, 0.8375]}, {"w": "This", "b": [0.2267, 0.8226, 0.2627, 0.8375]}, {"w": "period", "b": [0.2688, 0.8226, 0.3202, 0.8375]}, {"w": "depends", "b": [0.3263, 0.8226, 0.3916, 0.8375]}, {"w": "entirely", "b": [0.3977, 0.8226, 0.4583, 0.8375]}, {"w": "on", "b": [0.4644, 0.8226, 0.4839, 0.8375]}, {"w": "the", "b": [0.4901, 0.8226, 0.5157, 0.8375]}, {"w": "phenomenon", "b": [0.5218, 0.8226, 0.6234, 0.8375]}, {"w": "you", "b": [0.6295, 0.8226, 0.6582, 0.8375]}, {"w": "are", "b": [0.6644, 0.8226, 0.689, 0.8375]}, {"w": "modeling.", "b": [0.6952, 0.8226, 0.7736, 0.8375]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 18", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "18", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 62, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Typically, as we will discuss in Section ?? of Chapter 9, a certain model quality monitoring procedure is deployed in the production environment. Once an erratic behavior is detected, new training data is added to adjust the model; the model is then retrained and redeployed.", "words": [{"w": "Typically,", "b": [0.1306, 0.0884, 0.2095, 0.1033]}, {"w": "as", "b": [0.2156, 0.0884, 0.2321, 0.1033]}, {"w": "we", "b": [0.2382, 0.0884, 0.2592, 0.1033]}, {"w": "will", "b": [0.2653, 0.0884, 0.294, 0.1033]}, {"w": "discuss", "b": [0.3001, 0.0884, 0.3558, 0.1033]}, {"w": "in", "b": [0.3619, 0.0884, 0.3773, 0.1033]}, {"w": "Section", "b": [0.3834, 0.0884, 0.4418, 0.1033]}, {"w": "??", "b": [0.4478, 0.0884, 0.4678, 0.1034]}, {"w": "of", "b": [0.474, 0.0884, 0.4888, 0.1033]}, {"w": "Chapter", "b": [0.495, 0.0884, 0.5606, 0.1033]}, {"w": "9,", "b": [0.5667, 0.0884, 0.581, 0.1033]}, {"w": "a", "b": [0.5872, 0.0884, 0.5964, 0.1033]}, {"w": "certain", "b": [0.6025, 0.0884, 0.6579, 0.1033]}, {"w": "model", "b": [0.664, 0.0884, 0.7127, 0.1033]}, {"w": "quality", "b": [0.7188, 0.0884, 0.7746, 0.1033]}, {"w": "monitoring", "b": [0.7808, 0.0884, 0.8689, 0.1033]}, {"w": "procedure", "b": [0.1312, 0.1063, 0.211, 0.1213]}, {"w": "is", "b": [0.2171, 0.1063, 0.2296, 0.1213]}, {"w": "deployed", "b": [0.2357, 0.1063, 0.3061, 0.1213]}, {"w": "in", "b": [0.3122, 0.1063, 0.3276, 0.1213]}, {"w": "the", "b": [0.3337, 0.1063, 0.3594, 0.1213]}, {"w": "production", "b": [0.3656, 0.1063, 0.4535, 0.1213]}, {"w": "environment.", "b": [0.4596, 0.1063, 0.565, 0.1213]}, {"w": "Once", "b": [0.5732, 0.1063, 0.6143, 0.1213]}, {"w": "an", "b": [0.6204, 0.1063, 0.6399, 0.1213]}, {"w": "erratic", "b": [0.6461, 0.1063, 0.6986, 0.1213]}, {"w": "behavior", "b": [0.7047, 0.1063, 0.7741, 0.1213]}, {"w": "is", "b": [0.7802, 0.1063, 0.7927, 0.1213]}, {"w": "detected,", "b": [0.7988, 0.1063, 0.8718, 0.1213]}, {"w": "new", "b": [0.1312, 0.1243, 0.1628, 0.1392]}, {"w": "training", "b": [0.169, 0.1243, 0.2321, 0.1392]}, {"w": "data", "b": [0.2383, 0.1243, 0.2739, 0.1392]}, {"w": "is", "b": [0.2801, 0.1243, 0.2924, 0.1392]}, {"w": "added", "b": [0.2985, 0.1243, 0.3464, 0.1392]}, {"w": "to", "b": [0.3526, 0.1243, 0.3688, 0.1392]}, {"w": "adjust", "b": [0.375, 0.1243, 0.4245, 0.1392]}, {"w": "the", "b": [0.4306, 0.1243, 0.4561, 0.1392]}, {"w": "model;", "b": [0.4623, 0.1243, 0.5157, 0.1392]}, {"w": "the", "b": [0.5219, 0.1243, 0.5473, 0.1392]}, {"w": "model", "b": [0.5535, 0.1243, 0.6018, 0.1392]}, {"w": "is", "b": [0.608, 0.1243, 0.6203, 0.1392]}, {"w": "then", "b": [0.6265, 0.1243, 0.6621, 0.1392]}, {"w": "retrained", "b": [0.6683, 0.1243, 0.7407, 0.1392]}, {"w": "and", "b": [0.7468, 0.1243, 0.7764, 0.1392]}, {"w": "redeployed.", "b": [0.7825, 0.1243, 0.8727, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "Often, the cause of an error is explained by the finiteness of the training set. In such cases, additional training examples will solidify the model. However, in many practical scenarios, the model starts to make errors because of concept drift. Concept drift is a fundamental change in the statistical relationship between the features and the label.", "words": [{"w": "Often,", "b": [0.1312, 0.1512, 0.1823, 0.1662]}, {"w": "the", "b": [0.1884, 0.1512, 0.2142, 0.1662]}, {"w": "cause", "b": [0.2203, 0.1512, 0.2637, 0.1662]}, {"w": "of", "b": [0.2699, 0.1512, 0.2848, 0.1662]}, {"w": "an", "b": [0.291, 0.1512, 0.3105, 0.1662]}, {"w": "error", "b": [0.3167, 0.1512, 0.356, 0.1662]}, {"w": "is", "b": [0.3622, 0.1512, 0.3746, 0.1662]}, {"w": "explained", "b": [0.3808, 0.1512, 0.4576, 0.1662]}, {"w": "by", "b": [0.4637, 0.1512, 0.4833, 0.1662]}, {"w": "the", "b": [0.4895, 0.1512, 0.5152, 0.1662]}, {"w": "finiteness", "b": [0.5214, 0.1512, 0.5958, 0.1662]}, {"w": "of", "b": [0.602, 0.1512, 0.6169, 0.1662]}, {"w": "the", "b": [0.6231, 0.1512, 0.6488, 0.1662]}, {"w": "training", "b": [0.655, 0.1512, 0.7189, 0.1662]}, {"w": "set.", "b": [0.7251, 0.1512, 0.753, 0.1662]}, {"w": "In", "b": [0.7612, 0.1512, 0.7782, 0.1662]}, {"w": "such", "b": [0.7844, 0.1512, 0.8201, 0.1662]}, {"w": "cases,", "b": [0.8262, 0.1512, 0.8718, 0.1662]}, {"w": "additional", "b": [0.1312, 0.1691, 0.2131, 0.1841]}, {"w": "training", "b": [0.2193, 0.1691, 0.2836, 0.1841]}, {"w": "examples", "b": [0.2897, 0.1691, 0.364, 0.1841]}, {"w": "will", "b": [0.3701, 0.1691, 0.3991, 0.1841]}, {"w": "solidify", "b": [0.4053, 0.1691, 0.4634, 0.1841]}, {"w": "the", "b": [0.4695, 0.1691, 0.4955, 0.1841]}, {"w": "model.", "b": [0.5016, 0.1691, 0.556, 0.1841]}, {"w": "However,", "b": [0.5642, 0.1691, 0.6384, 0.1841]}, {"w": "in", "b": [0.6445, 0.1691, 0.6601, 0.1841]}, {"w": "many", "b": [0.6662, 0.1691, 0.7108, 0.1841]}, {"w": "practical", "b": [0.7169, 0.1691, 0.7875, 0.1841]}, {"w": "scenarios,", "b": [0.7936, 0.1691, 0.8717, 0.1841]}, {"w": "the", "b": [0.1312, 0.1871, 0.1571, 0.2021]}, {"w": "model", "b": [0.1632, 0.1871, 0.2123, 0.2021]}, {"w": "starts", "b": [0.2185, 0.1871, 0.2642, 0.2021]}, {"w": "to", "b": [0.2703, 0.1871, 0.2869, 0.2021]}, {"w": "make", "b": [0.293, 0.1871, 0.3354, 0.2021]}, {"w": "errors", "b": [0.3415, 0.1871, 0.3883, 0.2021]}, {"w": "because", "b": [0.3945, 0.1871, 0.4571, 0.2021]}, {"w": "of", "b": [0.4633, 0.1871, 0.4783, 0.2021]}, {"w": "concept", "b": [0.4857, 0.1871, 0.5567, 0.2021]}, {"w": "drift.", "b": [0.5638, 0.1871, 0.6101, 0.2021]}, {"w": "Concept", "b": [0.6183, 0.1871, 0.6855, 0.2021]}, {"w": "drift", "b": [0.6916, 0.1871, 0.7273, 0.2021]}, {"w": "is", "b": [0.7335, 0.1871, 0.746, 0.2021]}, {"w": "a", "b": [0.7521, 0.1871, 0.7614, 0.2021]}, {"w": "fundamental", "b": [0.7676, 0.1871, 0.8689, 0.2021]}, {"w": "change", "b": [0.1312, 0.205, 0.1861, 0.22]}, {"w": "in", "b": [0.1922, 0.205, 0.2076, 0.22]}, {"w": "the", "b": [0.2138, 0.205, 0.2394, 0.22]}, {"w": "statistical", "b": [0.2456, 0.205, 0.3237, 0.22]}, {"w": "relationship", "b": [0.3299, 0.205, 0.4244, 0.22]}, {"w": "between", "b": [0.4305, 0.205, 0.4957, 0.22]}, {"w": "the", "b": [0.5018, 0.205, 0.5274, 0.22]}, {"w": "features", "b": [0.5336, 0.205, 0.5968, 0.22]}, {"w": "and", "b": [0.603, 0.205, 0.6327, 0.22]}, {"w": "the", "b": [0.6389, 0.205, 0.6645, 0.22]}, {"w": "label.", "b": [0.6707, 0.205, 0.7143, 0.22]}]}, {"id": "b_2", "type": "paragraph", "text": "Imagine your model predicts whether a user will like certain content on a website. Over time, the preferences of some users may start to change, perhaps due to aging, or because a user discovers something new (I didn’t listen to jazz three years ago, now I do!). The examples added to the training data in the past no longer reflect some user’s preferences and start hurting the model performance, rather than contributing to it. This is concept drift. Consider it if you see a decreasing trend in model performance on new data.", "words": [{"w": "Imagine", "b": [0.1312, 0.2319, 0.1966, 0.247]}, {"w": "your", "b": [0.2037, 0.2319, 0.2403, 0.247]}, {"w": "model", "b": [0.2474, 0.2319, 0.2971, 0.247]}, {"w": "predicts", "b": [0.3042, 0.2319, 0.3692, 0.247]}, {"w": "whether", "b": [0.3763, 0.2319, 0.4423, 0.247]}, {"w": "a", "b": [0.4493, 0.2319, 0.4587, 0.247]}, {"w": "user", "b": [0.4658, 0.2319, 0.4995, 0.247]}, {"w": "will", "b": [0.5066, 0.2319, 0.5358, 0.247]}, {"w": "like", "b": [0.5429, 0.2319, 0.5712, 0.247]}, {"w": "certain", "b": [0.5783, 0.2319, 0.6348, 0.247]}, {"w": "content", "b": [0.6419, 0.2319, 0.7026, 0.247]}, {"w": "on", "b": [0.7097, 0.2319, 0.7296, 0.247]}, {"w": "a", "b": [0.7367, 0.2319, 0.7461, 0.247]}, {"w": "website.", "b": [0.7532, 0.2319, 0.8186, 0.247]}, {"w": "Over", "b": [0.8297, 0.2319, 0.8695, 0.247]}, {"w": "time,", "b": [0.1312, 0.2498, 0.173, 0.2649]}, {"w": "the", "b": [0.1791, 0.2498, 0.2052, 0.2649]}, {"w": "preferences", "b": [0.2114, 0.2498, 0.3019, 0.2649]}, {"w": "of", "b": [0.3081, 0.2498, 0.3232, 0.2649]}, {"w": "some", "b": [0.3294, 0.2498, 0.3702, 0.2649]}, {"w": "users", "b": [0.3763, 0.2498, 0.4173, 0.2649]}, {"w": "may", "b": [0.4235, 0.2498, 0.4579, 0.2649]}, {"w": "start", "b": [0.464, 0.2498, 0.5028, 0.2649]}, {"w": "to", "b": [0.509, 0.2498, 0.5257, 0.2649]}, {"w": "change,", "b": [0.5318, 0.2498, 0.5929, 0.2649]}, {"w": "perhaps", "b": [0.599, 0.2498, 0.6634, 0.2649]}, {"w": "due", "b": [0.6695, 0.2498, 0.6988, 0.2649]}, {"w": "to", "b": [0.7049, 0.2498, 0.7216, 0.2649]}, {"w": "aging,", "b": [0.7278, 0.2498, 0.7768, 0.2649]}, {"w": "or", "b": [0.783, 0.2498, 0.7997, 0.2649]}, {"w": "because", "b": [0.8059, 0.2498, 0.8692, 0.2649]}, {"w": "a", "b": [0.1312, 0.2677, 0.1406, 0.2829]}, {"w": "user", "b": [0.148, 0.2677, 0.1816, 0.2829]}, {"w": "discovers", "b": [0.189, 0.2677, 0.262, 0.2829]}, {"w": "something", "b": [0.2694, 0.2677, 0.3531, 0.2829]}, {"w": "new", "b": [0.3605, 0.2677, 0.3929, 0.2829]}, {"w": "(I", "b": [0.4003, 0.2677, 0.4144, 0.2829]}, {"w": "didn’t", "b": [0.4217, 0.2677, 0.4709, 0.2829]}, {"w": "listen", "b": [0.4783, 0.2677, 0.5223, 0.2829]}, {"w": "to", "b": [0.5297, 0.2677, 0.5464, 0.2829]}, {"w": "jazz", "b": [0.5537, 0.2677, 0.5857, 0.2829]}, {"w": "three", "b": [0.593, 0.2677, 0.6349, 0.2829]}, {"w": "years", "b": [0.6423, 0.2677, 0.6843, 0.2829]}, {"w": "ago,", "b": [0.6916, 0.2677, 0.7251, 0.2829]}, {"w": "now", "b": [0.7328, 0.2677, 0.7657, 0.2829]}, {"w": "I", "b": [0.773, 0.2677, 0.7798, 0.2829]}, {"w": "do!).", "b": [0.7872, 0.2677, 0.8249, 0.2829]}, {"w": "The", "b": [0.8367, 0.2677, 0.8691, 0.2829]}, {"w": "examples", "b": [0.1312, 0.2859, 0.2032, 0.3007]}, {"w": "added", "b": [0.2092, 0.2859, 0.2565, 0.3007]}, {"w": "to", "b": [0.2625, 0.2859, 0.2786, 0.3007]}, {"w": "the", "b": [0.2847, 0.2859, 0.3098, 0.3007]}, {"w": "training", "b": [0.3158, 0.2859, 0.3782, 0.3007]}, {"w": "data", "b": [0.3842, 0.2859, 0.4194, 0.3007]}, {"w": "in", "b": [0.4255, 0.2859, 0.4405, 0.3007]}, {"w": "the", "b": [0.4466, 0.2859, 0.4717, 0.3007]}, {"w": "past", "b": [0.4778, 0.2859, 0.511, 0.3007]}, {"w": "no", "b": [0.5171, 0.2859, 0.5362, 0.3007]}, {"w": "longer", "b": [0.5422, 0.2859, 0.5905, 0.3007]}, {"w": "reflect", "b": [0.5966, 0.2859, 0.6449, 0.3007]}, {"w": "some", "b": [0.6509, 0.2859, 0.6902, 0.3007]}, {"w": "user’s", "b": [0.6963, 0.2859, 0.7408, 0.3007]}, {"w": "preferences", "b": [0.7468, 0.2859, 0.834, 0.3007]}, {"w": "and", "b": [0.84, 0.2859, 0.8692, 0.3007]}, {"w": "start", "b": [0.1312, 0.3036, 0.1701, 0.3187]}, {"w": "hurting", "b": [0.1763, 0.3036, 0.2365, 0.3187]}, {"w": "the", "b": [0.2427, 0.3036, 0.2689, 0.3187]}, {"w": "model", "b": [0.2751, 0.3036, 0.3247, 0.3187]}, {"w": "performance,", "b": [0.3309, 0.3036, 0.4377, 0.3187]}, {"w": "rather", "b": [0.4439, 0.3036, 0.4943, 0.3187]}, {"w": "than", "b": [0.5004, 0.3036, 0.5381, 0.3187]}, {"w": "contributing", "b": [0.5443, 0.3036, 0.6453, 0.3187]}, {"w": "to", "b": [0.6515, 0.3036, 0.6682, 0.3187]}, {"w": "it.", "b": [0.6744, 0.3036, 0.6922, 0.3187]}, {"w": "This", "b": [0.7006, 0.3036, 0.7373, 0.3187]}, {"w": "is", "b": [0.7435, 0.3036, 0.7561, 0.3187]}, {"w": "concept", "b": [0.7624, 0.3036, 0.8251, 0.3187]}, {"w": "drift.", "b": [0.8313, 0.3036, 0.8727, 0.3187]}, {"w": "Consider", "b": [0.1312, 0.3217, 0.2022, 0.3367]}, {"w": "it", "b": [0.2083, 0.3217, 0.2206, 0.3367]}, {"w": "if", "b": [0.2267, 0.3217, 0.2375, 0.3367]}, {"w": "you", "b": [0.2437, 0.3217, 0.2724, 0.3367]}, {"w": "see", "b": [0.2785, 0.3217, 0.3022, 0.3367]}, {"w": "a", "b": [0.3084, 0.3217, 0.3176, 0.3367]}, {"w": "decreasing", "b": [0.3238, 0.3217, 0.407, 0.3367]}, {"w": "trend", "b": [0.4132, 0.3217, 0.4563, 0.3367]}, {"w": "in", "b": [0.4624, 0.3217, 0.4778, 0.3367]}, {"w": "model", "b": [0.484, 0.3217, 0.5327, 0.3367]}, {"w": "performance", "b": [0.5388, 0.3217, 0.6384, 0.3367]}, {"w": "on", "b": [0.6445, 0.3217, 0.664, 0.3367]}, {"w": "new", "b": [0.6702, 0.3217, 0.702, 0.3367]}, {"w": "data.", "b": [0.7081, 0.3217, 0.7491, 0.3367]}]}, {"id": "b_3", "type": "paragraph", "text": "Correct the model by removing the outdated examples from the training data. Sort your training examples, most recent first. Define an additional hyperparameter — what percentage of the most recent examples to use to retrain the model — and tune it using grid search, or another hyperparameter tuning technique.", "words": [{"w": "Correct", "b": [0.1312, 0.3485, 0.1931, 0.3636]}, {"w": "the", "b": [0.1996, 0.3485, 0.2258, 0.3636]}, {"w": "model", "b": [0.2324, 0.3485, 0.2821, 0.3636]}, {"w": "by", "b": [0.2887, 0.3485, 0.3085, 0.3636]}, {"w": "removing", "b": [0.3151, 0.3485, 0.3905, 0.3636]}, {"w": "the", "b": [0.3971, 0.3485, 0.4233, 0.3636]}, {"w": "outdated", "b": [0.4298, 0.3485, 0.5031, 0.3636]}, {"w": "examples", "b": [0.5097, 0.3485, 0.5846, 0.3636]}, {"w": "from", "b": [0.5912, 0.3485, 0.6294, 0.3636]}, {"w": "the", "b": [0.636, 0.3485, 0.6621, 0.3636]}, {"w": "training", "b": [0.6687, 0.3485, 0.7336, 0.3636]}, {"w": "data.", "b": [0.7402, 0.3485, 0.782, 0.3636]}, {"w": "Sort", "b": [0.7916, 0.3485, 0.8262, 0.3636]}, {"w": "your", "b": [0.8328, 0.3485, 0.8694, 0.3636]}, {"w": "training", "b": [0.1312, 0.3667, 0.1936, 0.3815]}, {"w": "examples,", "b": [0.1989, 0.3667, 0.2758, 0.3815]}, {"w": "most", "b": [0.2813, 0.3667, 0.3195, 0.3815]}, {"w": "recent", "b": [0.3248, 0.3667, 0.3726, 0.3815]}, {"w": "first.", "b": [0.3778, 0.3667, 0.4142, 0.3815]}, {"w": "Define", "b": [0.4221, 0.3667, 0.4721, 0.3815]}, {"w": "an", "b": [0.4773, 0.3667, 0.4964, 0.3815]}, {"w": "additional", "b": [0.5017, 0.3667, 0.5811, 0.3815]}, {"w": "hyperparameter", "b": [0.5863, 0.3667, 0.7116, 0.3815]}, {"w": "—", "b": [0.7169, 0.3667, 0.7349, 0.3815]}, {"w": "what", "b": [0.7402, 0.3667, 0.7794, 0.3815]}, {"w": "percentage", "b": [0.7846, 0.3667, 0.8691, 0.3815]}, {"w": "of", "b": [0.1312, 0.3844, 0.1463, 0.3995]}, {"w": "the", "b": [0.1524, 0.3844, 0.1784, 0.3995]}, {"w": "most", "b": [0.1846, 0.3844, 0.2241, 0.3995]}, {"w": "recent", "b": [0.2303, 0.3844, 0.2797, 0.3995]}, {"w": "examples", "b": [0.2859, 0.3844, 0.3602, 0.3995]}, {"w": "to", "b": [0.3664, 0.3844, 0.383, 0.3995]}, {"w": "use", "b": [0.3892, 0.3844, 0.4153, 0.3995]}, {"w": "to", "b": [0.4214, 0.3844, 0.438, 0.3995]}, {"w": "retrain", "b": [0.4442, 0.3844, 0.4994, 0.3995]}, {"w": "the", "b": [0.5055, 0.3844, 0.5315, 0.3995]}, {"w": "model", "b": [0.5376, 0.3844, 0.587, 0.3995]}, {"w": "—", "b": [0.5931, 0.3844, 0.6118, 0.3995]}, {"w": "and", "b": [0.618, 0.3844, 0.6481, 0.3995]}, {"w": "tune", "b": [0.6542, 0.3844, 0.6906, 0.3995]}, {"w": "it", "b": [0.6968, 0.3844, 0.7092, 0.3995]}, {"w": "using", "b": [0.7154, 0.3844, 0.7581, 0.3995]}, {"w": "grid", "b": [0.7642, 0.3845, 0.8012, 0.3995]}, {"w": "search,", "b": [0.8083, 0.3844, 0.8713, 0.3995]}, {"w": "or", "b": [0.1312, 0.4025, 0.1477, 0.4174]}, {"w": "another", "b": [0.1538, 0.4025, 0.2154, 0.4174]}, {"w": "hyperparameter", "b": [0.2216, 0.4025, 0.3494, 0.4174]}, {"w": "tuning", "b": [0.3555, 0.4025, 0.4078, 0.4174]}, {"w": "technique.", "b": [0.414, 0.4025, 0.4961, 0.4174]}]}, {"id": "b_4", "type": "paragraph", "text": "Concept drift is an example of a broader problem known as distribution shift. We consider hyperparameter tuning and other types of distribution shift in Sections ?? and ??.", "words": [{"w": "Concept", "b": [0.1312, 0.4295, 0.1966, 0.4443]}, {"w": "drift", "b": [0.2022, 0.4295, 0.2369, 0.4443]}, {"w": "is", "b": [0.2425, 0.4295, 0.2547, 0.4443]}, {"w": "an", "b": [0.2603, 0.4295, 0.2794, 0.4443]}, {"w": "example", "b": [0.285, 0.4295, 0.3498, 0.4443]}, {"w": "of", "b": [0.3554, 0.4295, 0.37, 0.4443]}, {"w": "a", "b": [0.3756, 0.4295, 0.3846, 0.4443]}, {"w": "broader", "b": [0.3903, 0.4295, 0.4507, 0.4443]}, {"w": "problem", "b": [0.4563, 0.4295, 0.5206, 0.4443]}, {"w": "known", "b": [0.5262, 0.4295, 0.5775, 0.4443]}, {"w": "as", "b": [0.5831, 0.4295, 0.5993, 0.4443]}, {"w": "distribution", "b": [0.6047, 0.4294, 0.7138, 0.4444]}, {"w": "shift.", "b": [0.7202, 0.4294, 0.766, 0.4444]}, {"w": "We", "b": [0.774, 0.4295, 0.7991, 0.4443]}, {"w": "consider", "b": [0.8047, 0.4295, 0.8692, 0.4443]}, {"w": "hyperparameter", "b": [0.1312, 0.4473, 0.2591, 0.4623]}, {"w": "tuning", "b": [0.2652, 0.4473, 0.3175, 0.4623]}, {"w": "and", "b": [0.3237, 0.4473, 0.3534, 0.4623]}, {"w": "other", "b": [0.3595, 0.4473, 0.4016, 0.4623]}, {"w": "types", "b": [0.4078, 0.4473, 0.4505, 0.4623]}, {"w": "of", "b": [0.4566, 0.4473, 0.4715, 0.4623]}, {"w": "distribution", "b": [0.4776, 0.4473, 0.5722, 0.4623]}, {"w": "shift", "b": [0.5783, 0.4473, 0.6138, 0.4623]}, {"w": "in", "b": [0.6199, 0.4473, 0.6353, 0.4623]}, {"w": "Sections", "b": [0.6415, 0.4473, 0.7072, 0.4623]}, {"w": "??", "b": [0.7131, 0.4473, 0.7331, 0.4623]}, {"w": "and", "b": [0.7392, 0.4473, 0.769, 0.4623]}, {"w": "??.", "b": [0.7751, 0.4473, 0.8003, 0.4623]}]}, {"id": "b_5", "type": "paragraph", "text": "3.2.7 Outliers", "words": [{"w": "3.2.7", "b": [0.1312, 0.4952, 0.1749, 0.5101]}, {"w": "Outliers", "b": [0.1961, 0.4952, 0.2707, 0.5101]}]}, {"id": "b_6", "type": "paragraph", "text": "Outliers are examples that look dissimilar to the majority of examples from the dataset. It’s up to the data analyst to define “dissimilar.” Typically, dissimilarity is measured by some distance metric, such as Euclidean distance.", "words": [{"w": "Outliers", "b": [0.1312, 0.5318, 0.195, 0.5467]}, {"w": "are", "b": [0.2012, 0.5318, 0.2255, 0.5467]}, {"w": "examples", "b": [0.2316, 0.5318, 0.3039, 0.5467]}, {"w": "that", "b": [0.3101, 0.5318, 0.3434, 0.5467]}, {"w": "look", "b": [0.3495, 0.5318, 0.3828, 0.5467]}, {"w": "dissimilar", "b": [0.389, 0.5318, 0.465, 0.5467]}, {"w": "to", "b": [0.4711, 0.5318, 0.4873, 0.5467]}, {"w": "the", "b": [0.4934, 0.5318, 0.5187, 0.5467]}, {"w": "majority", "b": [0.5248, 0.5318, 0.5925, 0.5467]}, {"w": "of", "b": [0.5986, 0.5318, 0.6133, 0.5467]}, {"w": "examples", "b": [0.6194, 0.5318, 0.6917, 0.5467]}, {"w": "from", "b": [0.6979, 0.5318, 0.7348, 0.5467]}, {"w": "the", "b": [0.7409, 0.5318, 0.7662, 0.5467]}, {"w": "dataset.", "b": [0.7723, 0.5318, 0.835, 0.5467]}, {"w": "It’s", "b": [0.8432, 0.5318, 0.8691, 0.5467]}, {"w": "up", "b": [0.1312, 0.5496, 0.1522, 0.5647]}, {"w": "to", "b": [0.1583, 0.5496, 0.175, 0.5647]}, {"w": "the", "b": [0.1812, 0.5496, 0.2073, 0.5647]}, {"w": "data", "b": [0.2135, 0.5496, 0.2501, 0.5647]}, {"w": "analyst", "b": [0.2562, 0.5496, 0.3154, 0.5647]}, {"w": "to", "b": [0.3216, 0.5496, 0.3383, 0.5647]}, {"w": "define", "b": [0.3445, 0.5496, 0.3926, 0.5647]}, {"w": "“dissimilar.”", "b": [0.3987, 0.5496, 0.4979, 0.5647]}, {"w": "Typically,", "b": [0.5061, 0.5496, 0.5867, 0.5647]}, {"w": "dissimilarity", "b": [0.5928, 0.5496, 0.6935, 0.5647]}, {"w": "is", "b": [0.6996, 0.5496, 0.7123, 0.5647]}, {"w": "measured", "b": [0.7185, 0.5496, 0.796, 0.5647]}, {"w": "by", "b": [0.8022, 0.5496, 0.8221, 0.5647]}, {"w": "some", "b": [0.8282, 0.5496, 0.8691, 0.5647]}, {"w": "distance", "b": [0.1312, 0.5677, 0.197, 0.5826]}, {"w": "metric,", "b": [0.2031, 0.5677, 0.2596, 0.5826]}, {"w": "such", "b": [0.2657, 0.5677, 0.3012, 0.5826]}, {"w": "as", "b": [0.3074, 0.5677, 0.3239, 0.5826]}, {"w": "Euclidean", "b": [0.3299, 0.5677, 0.4205, 0.5826]}, {"w": "distance.", "b": [0.4276, 0.5677, 0.5082, 0.5826]}]}, {"id": "b_7", "type": "paragraph", "text": "In practice, however, what seems to be an outlier in the original feature vector space can be a typical example in a feature vector space transformed using tools such as a kernel function. Feature space transformation is often explicitly done by a kernel-based model, such as support vector machine (SVM), or implicitly by a deep neural network.", "words": [{"w": "In", "b": [0.1312, 0.5945, 0.1485, 0.6096]}, {"w": "practice,", "b": [0.1551, 0.5945, 0.2252, 0.6096]}, {"w": "however,", "b": [0.2319, 0.5945, 0.3031, 0.6096]}, {"w": "what", "b": [0.3097, 0.5945, 0.3505, 0.6096]}, {"w": "seems", "b": [0.3571, 0.5945, 0.4044, 0.6096]}, {"w": "to", "b": [0.4109, 0.5945, 0.4277, 0.6096]}, {"w": "be", "b": [0.4342, 0.5945, 0.4536, 0.6096]}, {"w": "an", "b": [0.4601, 0.5945, 0.48, 0.6096]}, {"w": "outlier", "b": [0.4866, 0.5945, 0.54, 0.6096]}, {"w": "in", "b": [0.5465, 0.5945, 0.5622, 0.6096]}, {"w": "the", "b": [0.5688, 0.5945, 0.5949, 0.6096]}, {"w": "original", "b": [0.6015, 0.5945, 0.6632, 0.6096]}, {"w": "feature", "b": [0.6698, 0.5945, 0.7269, 0.6096]}, {"w": "vector", "b": [0.7334, 0.5945, 0.7837, 0.6096]}, {"w": "space", "b": [0.7903, 0.5945, 0.8343, 0.6096]}, {"w": "can", "b": [0.8409, 0.5945, 0.8691, 0.6096]}, {"w": "be", "b": [0.1312, 0.6124, 0.1506, 0.6275]}, {"w": "a", "b": [0.1579, 0.6124, 0.1673, 0.6275]}, {"w": "typical", "b": [0.1746, 0.6124, 0.23, 0.6275]}, {"w": "example", "b": [0.2373, 0.6124, 0.3047, 0.6275]}, {"w": "in", "b": [0.312, 0.6124, 0.3277, 0.6275]}, {"w": "a", "b": [0.335, 0.6124, 0.3444, 0.6275]}, {"w": "feature", "b": [0.3517, 0.6124, 0.4087, 0.6275]}, {"w": "vector", "b": [0.416, 0.6124, 0.4663, 0.6275]}, {"w": "space", "b": [0.4736, 0.6124, 0.5176, 0.6275]}, {"w": "transformed", "b": [0.5249, 0.6124, 0.624, 0.6275]}, {"w": "using", "b": [0.6313, 0.6124, 0.6742, 0.6275]}, {"w": "tools", "b": [0.6815, 0.6124, 0.7208, 0.6275]}, {"w": "such", "b": [0.7281, 0.6124, 0.7643, 0.6275]}, {"w": "as", "b": [0.7716, 0.6124, 0.7885, 0.6275]}, {"w": "a", "b": [0.7957, 0.6124, 0.8051, 0.6275]}, {"w": "kernel", "b": [0.8123, 0.6125, 0.8688, 0.6275]}, {"w": "function.", "b": [0.1312, 0.6303, 0.2126, 0.6455]}, {"w": "Feature", "b": [0.2225, 0.6303, 0.2845, 0.6455]}, {"w": "space", "b": [0.2912, 0.6303, 0.3353, 0.6455]}, {"w": "transformation", "b": [0.342, 0.6303, 0.4641, 0.6455]}, {"w": "is", "b": [0.4708, 0.6303, 0.4835, 0.6455]}, {"w": "often", "b": [0.4902, 0.6303, 0.5315, 0.6455]}, {"w": "explicitly", "b": [0.5382, 0.6303, 0.6135, 0.6455]}, {"w": "done", "b": [0.6203, 0.6303, 0.659, 0.6455]}, {"w": "by", "b": [0.6657, 0.6303, 0.6856, 0.6455]}, {"w": "a", "b": [0.6923, 0.6303, 0.7017, 0.6455]}, {"w": "kernel-based", "b": [0.7084, 0.6303, 0.8101, 0.6455]}, {"w": "model,", "b": [0.8168, 0.6303, 0.8717, 0.6455]}, {"w": "such", "b": [0.1312, 0.6484, 0.1667, 0.6634]}, {"w": "as", "b": [0.1729, 0.6484, 0.1894, 0.6634]}, {"w": "support", "b": [0.1955, 0.6484, 0.2674, 0.6634]}, {"w": "vector", "b": [0.2745, 0.6484, 0.3319, 0.6634]}, {"w": "machine", "b": [0.3389, 0.6484, 0.415, 0.6634]}, {"w": "(SVM),", "b": [0.4211, 0.6484, 0.4816, 0.6634]}, {"w": "or", "b": [0.4877, 0.6484, 0.5042, 0.6634]}, {"w": "implicitly", "b": [0.5104, 0.6484, 0.5867, 0.6634]}, {"w": "by", "b": [0.5929, 0.6484, 0.6124, 0.6634]}, {"w": "a", "b": [0.6185, 0.6484, 0.6277, 0.6634]}, {"w": "deep", "b": [0.6339, 0.6484, 0.6708, 0.6634]}, {"w": "neural", "b": [0.677, 0.6484, 0.7273, 0.6634]}, {"w": "network.", "b": [0.7334, 0.6484, 0.8027, 0.6634]}]}, {"id": "b_8", "type": "paragraph", "text": "Shallow algorithms, such as linear or logistic regression, and some ensemble methods, such as AdaBoost, are particularly sensitive to outliers. SVM has one definition that is less sensitive to outliers: a special penalty hyperparameter regulates the influence of misclassified examples (which often happen to be outliers) on the decision boundary. If this penalty value is low,", "words": [{"w": "Shallow", "b": [0.1312, 0.6754, 0.192, 0.6903]}, {"w": "algorithms,", "b": [0.1979, 0.6754, 0.2865, 0.6903]}, {"w": "such", "b": [0.2924, 0.6754, 0.3272, 0.6903]}, {"w": "as", "b": [0.3331, 0.6754, 0.3493, 0.6903]}, {"w": "linear", "b": [0.3552, 0.6754, 0.3994, 0.6903]}, {"w": "or", "b": [0.4053, 0.6754, 0.4215, 0.6903]}, {"w": "logistic", "b": [0.4274, 0.6754, 0.4827, 0.6903]}, {"w": "regression,", "b": [0.4886, 0.6754, 0.5714, 0.6903]}, {"w": "and", "b": [0.5773, 0.6754, 0.6065, 0.6903]}, {"w": "some", "b": [0.6123, 0.6754, 0.6516, 0.6903]}, {"w": "ensemble", "b": [0.6575, 0.6754, 0.7285, 0.6903]}, {"w": "methods,", "b": [0.7344, 0.6754, 0.8063, 0.6903]}, {"w": "such", "b": [0.8123, 0.6754, 0.8471, 0.6903]}, {"w": "as", "b": [0.8529, 0.6754, 0.8691, 0.6903]}, {"w": "AdaBoost,", "b": [0.1305, 0.6934, 0.2139, 0.7082]}, {"w": "are", "b": [0.22, 0.6934, 0.2443, 0.7082]}, {"w": "particularly", "b": [0.2505, 0.6934, 0.3432, 0.7082]}, {"w": "sensitive", "b": [0.3493, 0.6934, 0.4163, 0.7082]}, {"w": "to", "b": [0.4225, 0.6934, 0.4387, 0.7082]}, {"w": "outliers.", "b": [0.4448, 0.6934, 0.5087, 0.7082]}, {"w": "SVM", "b": [0.5169, 0.6934, 0.5574, 0.7082]}, {"w": "has", "b": [0.5635, 0.6934, 0.5899, 0.7082]}, {"w": "one", "b": [0.5961, 0.6934, 0.6234, 0.7082]}, {"w": "definition", "b": [0.6295, 0.6934, 0.7044, 0.7082]}, {"w": "that", "b": [0.7106, 0.6934, 0.744, 0.7082]}, {"w": "is", "b": [0.7501, 0.6934, 0.7623, 0.7082]}, {"w": "less", "b": [0.7685, 0.6934, 0.796, 0.7082]}, {"w": "sensitive", "b": [0.8021, 0.6934, 0.8692, 0.7082]}, {"w": "to", "b": [0.1312, 0.7113, 0.1473, 0.7261]}, {"w": "outliers:", "b": [0.1529, 0.7113, 0.2164, 0.7261]}, {"w": "a", "b": [0.2243, 0.7113, 0.2334, 0.7261]}, {"w": "special", "b": [0.239, 0.7113, 0.2919, 0.7261]}, {"w": "penalty", "b": [0.2975, 0.7113, 0.3563, 0.7261]}, {"w": "hyperparameter", "b": [0.3619, 0.7113, 0.4872, 0.7261]}, {"w": "regulates", "b": [0.4928, 0.7113, 0.5633, 0.7261]}, {"w": "the", "b": [0.5689, 0.7113, 0.594, 0.7261]}, {"w": "influence", "b": [0.5996, 0.7113, 0.669, 0.7261]}, {"w": "of", "b": [0.6746, 0.7113, 0.6892, 0.7261]}, {"w": "misclassified", "b": [0.6948, 0.7113, 0.7916, 0.7261]}, {"w": "examples", "b": [0.7972, 0.7113, 0.8692, 0.7261]}, {"w": "(which", "b": [0.1291, 0.7293, 0.1819, 0.7441]}, {"w": "often", "b": [0.1881, 0.7293, 0.2279, 0.7441]}, {"w": "happen", "b": [0.234, 0.7293, 0.2919, 0.7441]}, {"w": "to", "b": [0.2981, 0.7293, 0.3142, 0.7441]}, {"w": "be", "b": [0.3203, 0.7293, 0.339, 0.7441]}, {"w": "outliers)", "b": [0.3451, 0.7293, 0.4107, 0.7441]}, {"w": "on", "b": [0.4169, 0.7293, 0.436, 0.7441]}, {"w": "the", "b": [0.4422, 0.7293, 0.4673, 0.7441]}, {"w": "decision", "b": [0.4733, 0.7292, 0.5468, 0.7441]}, {"w": "boundary.", "b": [0.5539, 0.7292, 0.6475, 0.7441]}, {"w": "If", "b": [0.6557, 0.7293, 0.6678, 0.7441]}, {"w": "this", "b": [0.674, 0.7293, 0.7033, 0.7441]}, {"w": "penalty", "b": [0.7094, 0.7293, 0.7683, 0.7441]}, {"w": "value", "b": [0.7745, 0.7293, 0.8152, 0.7441]}, {"w": "is", "b": [0.8214, 0.7293, 0.8336, 0.7441]}, {"w": "low,", "b": [0.8397, 0.7293, 0.8714, 0.7441]}]}, {"id": "b_9", "type": "paragraph", "text": "the SVM algorithm may completely ignore outliers from consideration when drawing the decision boundary (an imaginary hyperplane separating positive and negative examples). If it’s too low, even some regular examples can end up on the wrong side of the decision boundary. The best value for that hyperparameter should be found by the analyst using a hyperparameter tuning technique.", "words": [{"w": "the", "b": [0.1312, 0.747, 0.1574, 0.7621]}, {"w": "SVM", "b": [0.1642, 0.747, 0.206, 0.7621]}, {"w": "algorithm", "b": [0.2128, 0.747, 0.2923, 0.7621]}, {"w": "may", "b": [0.2991, 0.747, 0.3336, 0.7621]}, {"w": "completely", "b": [0.3404, 0.747, 0.4288, 0.7621]}, {"w": "ignore", "b": [0.4356, 0.747, 0.4858, 0.7621]}, {"w": "outliers", "b": [0.4926, 0.747, 0.5535, 0.7621]}, {"w": "from", "b": [0.5603, 0.747, 0.5985, 0.7621]}, {"w": "consideration", "b": [0.6053, 0.747, 0.7142, 0.7621]}, {"w": "when", "b": [0.721, 0.747, 0.7639, 0.7621]}, {"w": "drawing", "b": [0.7707, 0.747, 0.8361, 0.7621]}, {"w": "the", "b": [0.8429, 0.747, 0.8691, 0.7621]}, {"w": "decision", "b": [0.1312, 0.765, 0.1962, 0.7801]}, {"w": "boundary", "b": [0.2033, 0.765, 0.2818, 0.7801]}, {"w": "(an", "b": [0.2889, 0.765, 0.3161, 0.7801]}, {"w": "imaginary", "b": [0.3233, 0.765, 0.4054, 0.7801]}, {"w": "hyperplane", "b": [0.4125, 0.765, 0.503, 0.7801]}, {"w": "separating", "b": [0.5102, 0.765, 0.595, 0.7801]}, {"w": "positive", "b": [0.6022, 0.765, 0.6656, 0.7801]}, {"w": "and", "b": [0.6727, 0.765, 0.703, 0.7801]}, {"w": "negative", "b": [0.7101, 0.765, 0.7781, 0.7801]}, {"w": "examples).", "b": [0.7853, 0.765, 0.8727, 0.7801]}, {"w": "If", "b": [0.1312, 0.7829, 0.1438, 0.798]}, {"w": "it’s", "b": [0.1507, 0.7829, 0.1759, 0.798]}, {"w": "too", "b": [0.1829, 0.7829, 0.2095, 0.798]}, {"w": "low,", "b": [0.2164, 0.7829, 0.2494, 0.798]}, {"w": "even", "b": [0.2565, 0.7829, 0.2931, 0.798]}, {"w": "some", "b": [0.3001, 0.7829, 0.3409, 0.798]}, {"w": "regular", "b": [0.3479, 0.7829, 0.4055, 0.798]}, {"w": "examples", "b": [0.4124, 0.7829, 0.4873, 0.798]}, {"w": "can", "b": [0.4943, 0.7829, 0.5225, 0.798]}, {"w": "end", "b": [0.5294, 0.7829, 0.5587, 0.798]}, {"w": "up", "b": [0.5656, 0.7829, 0.5866, 0.798]}, {"w": "on", "b": [0.5935, 0.7829, 0.6134, 0.798]}, {"w": "the", "b": [0.6203, 0.7829, 0.6464, 0.798]}, {"w": "wrong", "b": [0.6534, 0.7829, 0.7036, 0.798]}, {"w": "side", "b": [0.7105, 0.7829, 0.742, 0.798]}, {"w": "of", "b": [0.749, 0.7829, 0.7641, 0.798]}, {"w": "the", "b": [0.7711, 0.7829, 0.7972, 0.798]}, {"w": "decision", "b": [0.8041, 0.7829, 0.8691, 0.798]}, {"w": "boundary.", "b": [0.1312, 0.8009, 0.2127, 0.8159]}, {"w": "The", "b": [0.2209, 0.8009, 0.253, 0.8159]}, {"w": "best", "b": [0.2592, 0.8009, 0.293, 0.8159]}, {"w": "value", "b": [0.2991, 0.8009, 0.3411, 0.8159]}, {"w": "for", "b": [0.3473, 0.8009, 0.3696, 0.8159]}, {"w": "that", "b": [0.3758, 0.8009, 0.41, 0.8159]}, {"w": "hyperparameter", "b": [0.4161, 0.8009, 0.5454, 0.8159]}, {"w": "should", "b": [0.5515, 0.8009, 0.6045, 0.8159]}, {"w": "be", "b": [0.6107, 0.8009, 0.6298, 0.8159]}, {"w": "found", "b": [0.636, 0.8009, 0.6821, 0.8159]}, {"w": "by", "b": [0.6883, 0.8009, 0.708, 0.8159]}, {"w": "the", "b": [0.7141, 0.8009, 0.7401, 0.8159]}, {"w": "analyst", "b": [0.7462, 0.8009, 0.8049, 0.8159]}, {"w": "using", "b": [0.811, 0.8009, 0.8537, 0.8159]}, {"w": "a", "b": [0.8598, 0.8009, 0.8691, 0.8159]}, {"w": "hyperparameter", "b": [0.1312, 0.8189, 0.2591, 0.8339]}, {"w": "tuning", "b": [0.2652, 0.8189, 0.3175, 0.8339]}, {"w": "technique.", "b": [0.3237, 0.8189, 0.4057, 0.8339]}]}, {"id": "b_10", "type": "paragraph", "text": "A sufficiently complex neural network can learn to behave differently for each outlier in the", "words": [{"w": "A", "b": [0.1305, 0.8458, 0.1444, 0.8608]}, {"w": "sufficiently", "b": [0.1505, 0.8458, 0.2368, 0.8608]}, {"w": "complex", "b": [0.2429, 0.8458, 0.309, 0.8608]}, {"w": "neural", "b": [0.3152, 0.8458, 0.3655, 0.8608]}, {"w": "network", "b": [0.3716, 0.8458, 0.4358, 0.8608]}, {"w": "can", "b": [0.4419, 0.8458, 0.4696, 0.8608]}, {"w": "learn", "b": [0.4757, 0.8458, 0.5158, 0.8608]}, {"w": "to", "b": [0.5219, 0.8458, 0.5383, 0.8608]}, {"w": "behave", "b": [0.5445, 0.8458, 0.5998, 0.8608]}, {"w": "differently", "b": [0.606, 0.8458, 0.6876, 0.8608]}, {"w": "for", "b": [0.6937, 0.8458, 0.7158, 0.8608]}, {"w": "each", "b": [0.7219, 0.8458, 0.7573, 0.8608]}, {"w": "outlier", "b": [0.7635, 0.8458, 0.8158, 0.8608]}, {"w": "in", "b": [0.822, 0.8458, 0.8373, 0.8608]}, {"w": "the", "b": [0.8435, 0.8458, 0.8691, 0.8608]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 19", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "19", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 63, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "dataset and, at the same time, still work well for the regular examples. It’s not the desired outcome, as the model becomes unnecessarily complex for the task. More complexity results in longer training and prediction time, and poorer generalization after production deployment.", "words": [{"w": "dataset", "b": [0.1312, 0.0884, 0.19, 0.1034]}, {"w": "and,", "b": [0.1962, 0.0884, 0.2312, 0.1034]}, {"w": "at", "b": [0.2374, 0.0884, 0.2538, 0.1034]}, {"w": "the", "b": [0.26, 0.0884, 0.2857, 0.1034]}, {"w": "same", "b": [0.2919, 0.0884, 0.3322, 0.1034]}, {"w": "time,", "b": [0.3383, 0.0884, 0.3795, 0.1034]}, {"w": "still", "b": [0.3856, 0.0884, 0.4156, 0.1034]}, {"w": "work", "b": [0.4218, 0.0884, 0.4609, 0.1034]}, {"w": "well", "b": [0.4671, 0.0884, 0.4985, 0.1034]}, {"w": "for", "b": [0.5047, 0.0884, 0.5269, 0.1034]}, {"w": "the", "b": [0.533, 0.0884, 0.5588, 0.1034]}, {"w": "regular", "b": [0.5649, 0.0884, 0.6217, 0.1034]}, {"w": "examples.", "b": [0.6278, 0.0884, 0.7067, 0.1034]}, {"w": "It’s", "b": [0.7149, 0.0884, 0.7413, 0.1034]}, {"w": "not", "b": [0.7475, 0.0884, 0.7742, 0.1034]}, {"w": "the", "b": [0.7804, 0.0884, 0.8061, 0.1034]}, {"w": "desired", "b": [0.8123, 0.0884, 0.8691, 0.1034]}, {"w": "outcome,", "b": [0.1312, 0.1064, 0.203, 0.1213]}, {"w": "as", "b": [0.2091, 0.1064, 0.2254, 0.1213]}, {"w": "the", "b": [0.2316, 0.1064, 0.2568, 0.1213]}, {"w": "model", "b": [0.263, 0.1064, 0.311, 0.1213]}, {"w": "becomes", "b": [0.3171, 0.1064, 0.3835, 0.1213]}, {"w": "unnecessarily", "b": [0.3896, 0.1064, 0.4945, 0.1213]}, {"w": "complex", "b": [0.5007, 0.1064, 0.5659, 0.1213]}, {"w": "for", "b": [0.572, 0.1064, 0.5938, 0.1213]}, {"w": "the", "b": [0.6, 0.1064, 0.6252, 0.1213]}, {"w": "task.", "b": [0.6314, 0.1064, 0.6694, 0.1213]}, {"w": "More", "b": [0.6776, 0.1064, 0.7186, 0.1213]}, {"w": "complexity", "b": [0.7247, 0.1064, 0.8112, 0.1213]}, {"w": "results", "b": [0.8173, 0.1064, 0.8691, 0.1213]}, {"w": "in", "b": [0.1312, 0.1244, 0.1463, 0.1392]}, {"w": "longer", "b": [0.1516, 0.1244, 0.1999, 0.1392]}, {"w": "training", "b": [0.2051, 0.1244, 0.2675, 0.1392]}, {"w": "and", "b": [0.2728, 0.1244, 0.3019, 0.1392]}, {"w": "prediction", "b": [0.3072, 0.1244, 0.3867, 0.1392]}, {"w": "time,", "b": [0.3919, 0.1244, 0.4321, 0.1392]}, {"w": "and", "b": [0.4375, 0.1244, 0.4667, 0.1392]}, {"w": "poorer", "b": [0.472, 0.1244, 0.5233, 0.1392]}, {"w": "generalization", "b": [0.5286, 0.1244, 0.6382, 0.1392]}, {"w": "after", "b": [0.6435, 0.1244, 0.6802, 0.1392]}, {"w": "production", "b": [0.6855, 0.1244, 0.7715, 0.1392]}, {"w": "deployment.", "b": [0.7768, 0.1244, 0.8727, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "Whether to exclude outliers from the training data, or to use machine learning algorithms and", "words": [{"w": "Whether", "b": [0.1303, 0.1513, 0.1992, 0.1661]}, {"w": "to", "b": [0.2045, 0.1513, 0.2205, 0.1661]}, {"w": "exclude", "b": [0.2258, 0.1513, 0.2846, 0.1661]}, {"w": "outliers", "b": [0.2899, 0.1513, 0.3483, 0.1661]}, {"w": "from", "b": [0.3536, 0.1513, 0.3903, 0.1661]}, {"w": "the", "b": [0.3956, 0.1513, 0.4207, 0.1661]}, {"w": "training", "b": [0.426, 0.1513, 0.4883, 0.1661]}, {"w": "data,", "b": [0.4936, 0.1513, 0.5338, 0.1661]}, {"w": "or", "b": [0.5392, 0.1513, 0.5553, 0.1661]}, {"w": "to", "b": [0.5606, 0.1513, 0.5767, 0.1661]}, {"w": "use", "b": [0.5819, 0.1513, 0.6072, 0.1661]}, {"w": "machine", "b": [0.6124, 0.1513, 0.6773, 0.1661]}, {"w": "learning", "b": [0.6825, 0.1513, 0.7459, 0.1661]}, {"w": "algorithms", "b": [0.7512, 0.1513, 0.8347, 0.1661]}, {"w": "and", "b": [0.84, 0.1513, 0.8691, 0.1661]}]}, {"id": "b_2", "type": "paragraph", "text": "models robust to outliers, is debatable. Deleting examples from a dataset is not considered scientifically or methodologically sound, especially in small datasets. In the big data context, on the other hand, outliers don’t typically have a significant influence on the model.", "words": [{"w": "models", "b": [0.1312, 0.1691, 0.1875, 0.1841]}, {"w": "robust", "b": [0.1936, 0.1691, 0.2452, 0.1841]}, {"w": "to", "b": [0.2513, 0.1691, 0.2678, 0.1841]}, {"w": "outliers,", "b": [0.2739, 0.1691, 0.339, 0.1841]}, {"w": "is", "b": [0.3451, 0.1691, 0.3576, 0.1841]}, {"w": "debatable.", "b": [0.3637, 0.1691, 0.4471, 0.1841]}, {"w": "Deleting", "b": [0.4553, 0.1691, 0.523, 0.1841]}, {"w": "examples", "b": [0.5291, 0.1691, 0.6028, 0.1841]}, {"w": "from", "b": [0.609, 0.1691, 0.6466, 0.1841]}, {"w": "a", "b": [0.6527, 0.1691, 0.662, 0.1841]}, {"w": "dataset", "b": [0.6681, 0.1691, 0.7269, 0.1841]}, {"w": "is", "b": [0.733, 0.1691, 0.7455, 0.1841]}, {"w": "not", "b": [0.7516, 0.1691, 0.7784, 0.1841]}, {"w": "considered", "b": [0.7845, 0.1691, 0.8691, 0.1841]}, {"w": "scientifically", "b": [0.1312, 0.1872, 0.228, 0.202]}, {"w": "or", "b": [0.2342, 0.1872, 0.2503, 0.202]}, {"w": "methodologically", "b": [0.2564, 0.1872, 0.3904, 0.202]}, {"w": "sound,", "b": [0.3965, 0.1872, 0.448, 0.202]}, {"w": "especially", "b": [0.4541, 0.1872, 0.5298, 0.202]}, {"w": "in", "b": [0.5359, 0.1872, 0.551, 0.202]}, {"w": "small", "b": [0.5571, 0.1872, 0.5985, 0.202]}, {"w": "datasets.", "b": [0.6046, 0.1872, 0.6743, 0.202]}, {"w": "In", "b": [0.6825, 0.1872, 0.6991, 0.202]}, {"w": "the", "b": [0.7053, 0.1872, 0.7305, 0.202]}, {"w": "big", "b": [0.7366, 0.1872, 0.7608, 0.202]}, {"w": "data", "b": [0.7669, 0.1872, 0.8021, 0.202]}, {"w": "context,", "b": [0.8083, 0.1872, 0.8717, 0.202]}, {"w": "on", "b": [0.1312, 0.205, 0.1507, 0.22]}, {"w": "the", "b": [0.1569, 0.205, 0.1825, 0.22]}, {"w": "other", "b": [0.1887, 0.205, 0.2307, 0.22]}, {"w": "hand,", "b": [0.2369, 0.205, 0.282, 0.22]}, {"w": "outliers", "b": [0.2882, 0.205, 0.3478, 0.22]}, {"w": "don’t", "b": [0.354, 0.205, 0.396, 0.22]}, {"w": "typically", "b": [0.4022, 0.205, 0.4714, 0.22]}, {"w": "have", "b": [0.4775, 0.205, 0.5139, 0.22]}, {"w": "a", "b": [0.5201, 0.205, 0.5293, 0.22]}, {"w": "significant", "b": [0.5355, 0.205, 0.6171, 0.22]}, {"w": "influence", "b": [0.6233, 0.205, 0.694, 0.22]}, {"w": "on", "b": [0.7002, 0.205, 0.7197, 0.22]}, {"w": "the", "b": [0.7258, 0.205, 0.7515, 0.22]}, {"w": "model.", "b": [0.7576, 0.205, 0.8114, 0.22]}]}, {"id": "b_3", "type": "paragraph", "text": "From a practical standpoint, if excluding some training examples results in better performance of the model on the holdout data, the exclusion may be justified. Which examples to consider for exclusion can be decided based on a certain similarity measure. A modern approach to getting such a measure is to build an autoencoder and use the reconstruction error5 as the measure of (dis)similarity: the higher the reconstruction error for a given example, the more dissimilar it is to the dataset.", "words": [{"w": "From", "b": [0.1312, 0.2321, 0.1727, 0.2469]}, {"w": "a", "b": [0.1775, 0.2321, 0.1866, 0.2469]}, {"w": "practical", "b": [0.1914, 0.2321, 0.2598, 0.2469]}, {"w": "standpoint,", "b": [0.2647, 0.2321, 0.3542, 0.2469]}, {"w": "if", "b": [0.3593, 0.2321, 0.3699, 0.2469]}, {"w": "excluding", "b": [0.3747, 0.2321, 0.4496, 0.2469]}, {"w": "some", "b": [0.4545, 0.2321, 0.4937, 0.2469]}, {"w": "training", "b": [0.4986, 0.2321, 0.5609, 0.2469]}, {"w": "examples", "b": [0.5658, 0.2321, 0.6378, 0.2469]}, {"w": "results", "b": [0.6426, 0.2321, 0.6941, 0.2469]}, {"w": "in", "b": [0.699, 0.2321, 0.7141, 0.2469]}, {"w": "better", "b": [0.7189, 0.2321, 0.7667, 0.2469]}, {"w": "performance", "b": [0.7715, 0.2321, 0.8691, 0.2469]}, {"w": "of", "b": [0.1312, 0.25, 0.1458, 0.2648]}, {"w": "the", "b": [0.1513, 0.25, 0.1765, 0.2648]}, {"w": "model", "b": [0.182, 0.25, 0.2297, 0.2648]}, {"w": "on", "b": [0.2353, 0.25, 0.2544, 0.2648]}, {"w": "the", "b": [0.2599, 0.25, 0.285, 0.2648]}, {"w": "holdout", "b": [0.2906, 0.25, 0.3508, 0.2648]}, {"w": "data,", "b": [0.3564, 0.25, 0.3966, 0.2648]}, {"w": "the", "b": [0.4022, 0.25, 0.4274, 0.2648]}, {"w": "exclusion", "b": [0.4329, 0.25, 0.5049, 0.2648]}, {"w": "may", "b": [0.5104, 0.25, 0.5435, 0.2648]}, {"w": "be", "b": [0.5491, 0.25, 0.5677, 0.2648]}, {"w": "justified.", "b": [0.5732, 0.25, 0.6412, 0.2648]}, {"w": "Which", "b": [0.6491, 0.25, 0.7004, 0.2648]}, {"w": "examples", "b": [0.7059, 0.25, 0.7779, 0.2648]}, {"w": "to", "b": [0.7834, 0.25, 0.7995, 0.2648]}, {"w": "consider", "b": [0.805, 0.25, 0.8695, 0.2648]}, {"w": "for", "b": [0.1312, 0.2678, 0.1535, 0.2828]}, {"w": "exclusion", "b": [0.1597, 0.2678, 0.2338, 0.2828]}, {"w": "can", "b": [0.24, 0.2678, 0.2679, 0.2828]}, {"w": "be", "b": [0.2741, 0.2678, 0.2932, 0.2828]}, {"w": "decided", "b": [0.2994, 0.2678, 0.3604, 0.2828]}, {"w": "based", "b": [0.3666, 0.2678, 0.4122, 0.2828]}, {"w": "on", "b": [0.4184, 0.2678, 0.4381, 0.2828]}, {"w": "a", "b": [0.4442, 0.2678, 0.4535, 0.2828]}, {"w": "certain", "b": [0.4597, 0.2678, 0.5156, 0.2828]}, {"w": "similarity", "b": [0.5218, 0.2678, 0.5985, 0.2828]}, {"w": "measure.", "b": [0.6047, 0.2678, 0.6763, 0.2828]}, {"w": "A", "b": [0.6845, 0.2678, 0.6984, 0.2828]}, {"w": "modern", "b": [0.7046, 0.2678, 0.7662, 0.2828]}, {"w": "approach", "b": [0.7724, 0.2678, 0.8464, 0.2828]}, {"w": "to", "b": [0.8526, 0.2678, 0.8691, 0.2828]}, {"w": "getting", "b": [0.1312, 0.2859, 0.1865, 0.3007]}, {"w": "such", "b": [0.1927, 0.2859, 0.2274, 0.3007]}, {"w": "a", "b": [0.2336, 0.2859, 0.2426, 0.3007]}, {"w": "measure", "b": [0.2488, 0.2859, 0.3133, 0.3007]}, {"w": "is", "b": [0.3194, 0.2859, 0.3316, 0.3007]}, {"w": "to", "b": [0.3378, 0.2859, 0.3539, 0.3007]}, {"w": "build", "b": [0.36, 0.2859, 0.4002, 0.3007]}, {"w": "an", "b": [0.4064, 0.2859, 0.4255, 0.3007]}, {"w": "autoencoder", "b": [0.4316, 0.2858, 0.5456, 0.3008]}, {"w": "and", "b": [0.5517, 0.2859, 0.5809, 0.3007]}, {"w": "use", "b": [0.5871, 0.2859, 0.6123, 0.3007]}, {"w": "the", "b": [0.6185, 0.2859, 0.6436, 0.3007]}, {"w": "reconstruction", "b": [0.6498, 0.2859, 0.7625, 0.3007]}, {"w": "error5", "b": [0.7687, 0.2839, 0.8142, 0.3007]}, {"w": "as", "b": [0.8213, 0.2859, 0.8375, 0.3007]}, {"w": "the", "b": [0.8437, 0.2859, 0.8688, 0.3007]}, {"w": "measure", "b": [0.1312, 0.3038, 0.1961, 0.3187]}, {"w": "of", "b": [0.2023, 0.3038, 0.2169, 0.3187]}, {"w": "(dis)similarity:", "b": [0.2231, 0.3038, 0.3396, 0.3187]}, {"w": "the", "b": [0.3479, 0.3038, 0.3731, 0.3187]}, {"w": "higher", "b": [0.3793, 0.3038, 0.4289, 0.3187]}, {"w": "the", "b": [0.4351, 0.3038, 0.4604, 0.3187]}, {"w": "reconstruction", "b": [0.4665, 0.3038, 0.58, 0.3187]}, {"w": "error", "b": [0.5862, 0.3038, 0.6248, 0.3187]}, {"w": "for", "b": [0.6309, 0.3038, 0.6527, 0.3187]}, {"w": "a", "b": [0.6589, 0.3038, 0.668, 0.3187]}, {"w": "given", "b": [0.6741, 0.3038, 0.7156, 0.3187]}, {"w": "example,", "b": [0.7218, 0.3038, 0.792, 0.3187]}, {"w": "the", "b": [0.7982, 0.3038, 0.8235, 0.3187]}, {"w": "more", "b": [0.8297, 0.3038, 0.8691, 0.3187]}, {"w": "dissimilar", "b": [0.1312, 0.3217, 0.2084, 0.3367]}, {"w": "it", "b": [0.2146, 0.3217, 0.2269, 0.3367]}, {"w": "is", "b": [0.233, 0.3217, 0.2454, 0.3367]}, {"w": "to", "b": [0.2516, 0.3217, 0.268, 0.3367]}, {"w": "the", "b": [0.2741, 0.3217, 0.2998, 0.3367]}, {"w": "dataset.", "b": [0.3059, 0.3217, 0.3696, 0.3367]}]}, {"id": "b_4", "type": "paragraph", "text": "3.2.8 Data Leakage", "words": [{"w": "3.2.8", "b": [0.1312, 0.3696, 0.1749, 0.3845]}, {"w": "Data", "b": [0.1961, 0.3696, 0.2412, 0.3845]}, {"w": "Leakage", "b": [0.2483, 0.3696, 0.3229, 0.3845]}]}, {"id": "b_5", "type": "paragraph", "text": "Data leakage, also called target leakage, is a problem affecting several stages of the machine learning life cycle, from data collection to model evaluation. In this section, I will only describe how this problem manifests itself at the data collection and preparation stages. In the subsequent chapters, I will describe its other forms.", "words": [{"w": "Data", "b": [0.1312, 0.4061, 0.1764, 0.4211]}, {"w": "leakage,", "b": [0.1856, 0.406, 0.2586, 0.4211]}, {"w": "also", "b": [0.267, 0.406, 0.2985, 0.4211]}, {"w": "called", "b": [0.3065, 0.406, 0.3536, 0.4211]}, {"w": "target", "b": [0.3615, 0.4061, 0.4174, 0.4211]}, {"w": "leakage,", "b": [0.4266, 0.406, 0.4996, 0.4211]}, {"w": "is", "b": [0.5081, 0.406, 0.5207, 0.4211]}, {"w": "a", "b": [0.5287, 0.406, 0.5381, 0.4211]}, {"w": "problem", "b": [0.5461, 0.406, 0.6131, 0.4211]}, {"w": "affecting", "b": [0.6211, 0.406, 0.6907, 0.4211]}, {"w": "several", "b": [0.6986, 0.406, 0.7543, 0.4211]}, {"w": "stages", "b": [0.7623, 0.406, 0.8116, 0.4211]}, {"w": "of", "b": [0.8196, 0.406, 0.8348, 0.4211]}, {"w": "the", "b": [0.8428, 0.406, 0.8689, 0.4211]}, {"w": "machine", "b": [0.1312, 0.424, 0.1979, 0.439]}, {"w": "learning", "b": [0.2041, 0.424, 0.2693, 0.439]}, {"w": "life", "b": [0.2754, 0.424, 0.2997, 0.439]}, {"w": "cycle,", "b": [0.3059, 0.424, 0.3509, 0.439]}, {"w": "from", "b": [0.357, 0.424, 0.3948, 0.439]}, {"w": "data", "b": [0.401, 0.424, 0.4371, 0.439]}, {"w": "collection", "b": [0.4433, 0.424, 0.5198, 0.439]}, {"w": "to", "b": [0.526, 0.424, 0.5425, 0.439]}, {"w": "model", "b": [0.5487, 0.424, 0.5978, 0.439]}, {"w": "evaluation.", "b": [0.6039, 0.424, 0.6923, 0.439]}, {"w": "In", "b": [0.7005, 0.424, 0.7176, 0.439]}, {"w": "this", "b": [0.7238, 0.424, 0.7539, 0.439]}, {"w": "section,", "b": [0.76, 0.424, 0.8211, 0.439]}, {"w": "I", "b": [0.8273, 0.424, 0.834, 0.439]}, {"w": "will", "b": [0.8402, 0.424, 0.8691, 0.439]}, {"w": "only", "b": [0.1312, 0.4421, 0.165, 0.457]}, {"w": "describe", "b": [0.1712, 0.4421, 0.2355, 0.457]}, {"w": "how", "b": [0.2416, 0.4421, 0.2734, 0.457]}, {"w": "this", "b": [0.2796, 0.4421, 0.3089, 0.457]}, {"w": "problem", "b": [0.3151, 0.4421, 0.3797, 0.457]}, {"w": "manifests", "b": [0.3859, 0.4421, 0.4602, 0.457]}, {"w": "itself", "b": [0.4664, 0.4421, 0.5044, 0.457]}, {"w": "at", "b": [0.5105, 0.4421, 0.5267, 0.457]}, {"w": "the", "b": [0.5328, 0.4421, 0.5581, 0.457]}, {"w": "data", "b": [0.5642, 0.4421, 0.5995, 0.457]}, {"w": "collection", "b": [0.6057, 0.4421, 0.6804, 0.457]}, {"w": "and", "b": [0.6865, 0.4421, 0.7158, 0.457]}, {"w": "preparation", "b": [0.7219, 0.4421, 0.8139, 0.457]}, {"w": "stages.", "b": [0.82, 0.4421, 0.8727, 0.457]}, {"w": "In", "b": [0.1312, 0.46, 0.1482, 0.4749]}, {"w": "the", "b": [0.1543, 0.46, 0.1799, 0.4749]}, {"w": "subsequent", "b": [0.1861, 0.46, 0.2745, 0.4749]}, {"w": "chapters,", "b": [0.2807, 0.46, 0.3531, 0.4749]}, {"w": "I", "b": [0.3593, 0.46, 0.3659, 0.4749]}, {"w": "will", "b": [0.3721, 0.46, 0.4008, 0.4749]}, {"w": "describe", "b": [0.407, 0.46, 0.4722, 0.4749]}, {"w": "its", "b": [0.4784, 0.46, 0.498, 0.4749]}, {"w": "other", "b": [0.5041, 0.46, 0.5462, 0.4749]}, {"w": "forms.", "b": [0.5524, 0.46, 0.6023, 0.4749]}]}, {"id": "b_6", "type": "paragraph", "text": "Information available at the", "words": [{"w": "Information", "b": [0.2502, 0.5812, 0.3325, 0.5945]}, {"w": "available", "b": [0.337, 0.5812, 0.4019, 0.5945]}, {"w": "at", "b": [0.4065, 0.5812, 0.4202, 0.5945]}, {"w": "the", "b": [0.4248, 0.5812, 0.4476, 0.5945]}]}, {"id": "b_7", "type": "paragraph", "text": "prediction time", "words": [{"w": "prediction", "b": [0.2955, 0.597, 0.3667, 0.6104]}, {"w": "time", "b": [0.3713, 0.597, 0.4024, 0.6104]}]}, {"id": "b_8", "type": "paragraph", "text": "Information unavailable at the", "words": [{"w": "Information", "b": [0.5288, 0.5812, 0.6111, 0.5945]}, {"w": "unavailable", "b": [0.6157, 0.5812, 0.6988, 0.5945]}, {"w": "at", "b": [0.7034, 0.5812, 0.7171, 0.5945]}, {"w": "the", "b": [0.7217, 0.5812, 0.7445, 0.5945]}]}, {"id": "b_9", "type": "paragraph", "text": "prediction time", "words": [{"w": "prediction", "b": [0.5832, 0.597, 0.6545, 0.6104]}, {"w": "time", "b": [0.6591, 0.597, 0.6901, 0.6104]}]}, {"id": "b_10", "type": "paragraph", "text": "Time Prediction time", "words": [{"w": "Time", "b": [0.7729, 0.647, 0.8088, 0.6603]}, {"w": "Prediction", "b": [0.4384, 0.647, 0.5115, 0.6603]}, {"w": "time", "b": [0.5161, 0.647, 0.5472, 0.6603]}]}, {"id": "b_11", "type": "paragraph", "text": "Contamination", "words": [{"w": "Contamination", "b": [0.4398, 0.4971, 0.5458, 0.5104]}]}, {"id": "b_12", "type": "paragraph", "text": "Figure 8: Data leakage in a nutshell.", "words": [{"w": "Figure", "b": [0.3516, 0.6791, 0.4037, 0.6941]}, {"w": "8:", "b": [0.4098, 0.6791, 0.4242, 0.6941]}, {"w": "Data", "b": [0.4324, 0.6791, 0.4721, 0.6941]}, {"w": "leakage", "b": [0.4782, 0.6791, 0.5372, 0.6941]}, {"w": "in", "b": [0.5433, 0.6791, 0.5587, 0.6941]}, {"w": "a", "b": [0.5649, 0.6791, 0.5741, 0.6941]}, {"w": "nutshell.", "b": [0.5803, 0.6791, 0.6486, 0.6941]}]}, {"id": "b_13", "type": "paragraph", "text": "Data leakage in supervised learning is the unintentional introduction of information about the target that should not be made available. We call it “contamination” (Figure 8). Training on contaminated data leads to overly optimistic expectations about the model performance.", "words": [{"w": "Data", "b": [0.1312, 0.7293, 0.1714, 0.7444]}, {"w": "leakage", "b": [0.1776, 0.7293, 0.2373, 0.7444]}, {"w": "in", "b": [0.2434, 0.7293, 0.259, 0.7444]}, {"w": "supervised", "b": [0.2651, 0.7293, 0.3505, 0.7444]}, {"w": "learning", "b": [0.3567, 0.7293, 0.4221, 0.7444]}, {"w": "is", "b": [0.4283, 0.7293, 0.4408, 0.7444]}, {"w": "the", "b": [0.447, 0.7293, 0.4729, 0.7444]}, {"w": "unintentional", "b": [0.4791, 0.7293, 0.587, 0.7444]}, {"w": "introduction", "b": [0.5932, 0.7293, 0.6939, 0.7444]}, {"w": "of", "b": [0.7001, 0.7293, 0.7151, 0.7444]}, {"w": "information", "b": [0.7213, 0.7293, 0.8163, 0.7444]}, {"w": "about", "b": [0.8224, 0.7293, 0.8696, 0.7444]}, {"w": "the", "b": [0.1312, 0.7475, 0.1564, 0.7623]}, {"w": "target", "b": [0.1617, 0.7475, 0.209, 0.7623]}, {"w": "that", "b": [0.2144, 0.7475, 0.2475, 0.7623]}, {"w": "should", "b": [0.2529, 0.7475, 0.3042, 0.7623]}, {"w": "not", "b": [0.3096, 0.7475, 0.3357, 0.7623]}, {"w": "be", "b": [0.3411, 0.7475, 0.3597, 0.7623]}, {"w": "made", "b": [0.3651, 0.7475, 0.4073, 0.7623]}, {"w": "available.", "b": [0.4126, 0.7475, 0.486, 0.7623]}, {"w": "We", "b": [0.4939, 0.7475, 0.519, 0.7623]}, {"w": "call", "b": [0.5244, 0.7475, 0.5515, 0.7623]}, {"w": "it", "b": [0.5568, 0.7475, 0.5689, 0.7623]}, {"w": "“contamination”", "b": [0.5743, 0.7475, 0.7044, 0.7623]}, {"w": "(Figure", "b": [0.7097, 0.7475, 0.7678, 0.7623]}, {"w": "8).", "b": [0.7732, 0.7475, 0.7943, 0.7623]}, {"w": "Training", "b": [0.8022, 0.7475, 0.8691, 0.7623]}, {"w": "on", "b": [0.1312, 0.7653, 0.1507, 0.7802]}, {"w": "contaminated", "b": [0.1568, 0.7653, 0.2657, 0.7802]}, {"w": "data", "b": [0.2718, 0.7653, 0.3076, 0.7802]}, {"w": "leads", "b": [0.3138, 0.7653, 0.3537, 0.7802]}, {"w": "to", "b": [0.3599, 0.7653, 0.3762, 0.7802]}, {"w": "overly", "b": [0.3824, 0.7653, 0.4305, 0.7802]}, {"w": "optimistic", "b": [0.4366, 0.7653, 0.5165, 0.7802]}, {"w": "expectations", "b": [0.5226, 0.7653, 0.623, 0.7802]}, {"w": "about", "b": [0.6291, 0.7653, 0.6756, 0.7802]}, {"w": "the", "b": [0.6818, 0.7653, 0.7073, 0.7802]}, {"w": "model", "b": [0.7135, 0.7653, 0.762, 0.7802]}, {"w": "performance.", "b": [0.7682, 0.7653, 0.8726, 0.7802]}]}, {"id": "b_14", "type": "paragraph", "text": "5An autoencoder model is trained to reconstruct its input from an embedding vector. The hyperparame- ters of the autoencoder are tuned to minimize the reconstruction error of the holdout data.", "words": [{"w": "5An", "b": [0.1518, 0.7921, 0.1795, 0.8059]}, {"w": "autoencoder", "b": [0.1845, 0.794, 0.2665, 0.8059]}, {"w": "model", "b": [0.2715, 0.794, 0.3121, 0.8059]}, {"w": "is", "b": [0.3171, 0.794, 0.3274, 0.8059]}, {"w": "trained", "b": [0.3325, 0.794, 0.3803, 0.8059]}, {"w": "to", "b": [0.3853, 0.794, 0.3989, 0.8059]}, {"w": "reconstruct", "b": [0.404, 0.794, 0.4792, 0.8059]}, {"w": "its", "b": [0.4842, 0.794, 0.5005, 0.8059]}, {"w": "input", "b": [0.5055, 0.794, 0.5414, 0.8059]}, {"w": "from", "b": [0.5464, 0.794, 0.5776, 0.8059]}, {"w": "an", "b": [0.5826, 0.794, 0.5988, 0.8059]}, {"w": "embedding", "b": [0.604, 0.7939, 0.6899, 0.8059]}, {"w": "vector.", "b": [0.6951, 0.794, 0.7403, 0.8059]}, {"w": "The", "b": [0.7472, 0.794, 0.7737, 0.8059]}, {"w": "hyperparame-", "b": [0.7787, 0.794, 0.8713, 0.8059]}, {"w": "ters", "b": [0.1312, 0.8081, 0.1566, 0.8201]}, {"w": "of", "b": [0.1618, 0.8081, 0.1744, 0.8201]}, {"w": "the", "b": [0.1797, 0.8081, 0.2014, 0.8201]}, {"w": "autoencoder", "b": [0.2067, 0.8081, 0.2903, 0.8201]}, {"w": "are", "b": [0.2955, 0.8081, 0.3164, 0.8201]}, {"w": "tuned", "b": [0.3217, 0.8081, 0.3608, 0.8201]}, {"w": "to", "b": [0.3661, 0.8081, 0.38, 0.8201]}, {"w": "minimize", "b": [0.3852, 0.8081, 0.4471, 0.8201]}, {"w": "the", "b": [0.4523, 0.8081, 0.4741, 0.8201]}, {"w": "reconstruction", "b": [0.4793, 0.8081, 0.5769, 0.8201]}, {"w": "error", "b": [0.5822, 0.8081, 0.6153, 0.8201]}, {"w": "of", "b": [0.6205, 0.8081, 0.6332, 0.8201]}, {"w": "the", "b": [0.6384, 0.8081, 0.6602, 0.8201]}, {"w": "holdout", "b": [0.6654, 0.8081, 0.7176, 0.8201]}, {"w": "data.", "b": [0.7229, 0.8081, 0.7577, 0.8201]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 20", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "20", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 64, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3.3 What Is Good Data", "words": [{"w": "3.3", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "What", "b": [0.188, 0.0861, 0.2494, 0.104]}, {"w": "Is", "b": [0.2577, 0.0861, 0.2768, 0.104]}, {"w": "Good", "b": [0.2851, 0.0861, 0.3448, 0.104]}, {"w": "Data", "b": [0.3531, 0.0861, 0.4061, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "We already considered questions to answer about the data before to start collecting it and", "words": [{"w": "We", "b": [0.1303, 0.1249, 0.1563, 0.1399]}, {"w": "already", "b": [0.1624, 0.1249, 0.2222, 0.1399]}, {"w": "considered", "b": [0.2283, 0.1249, 0.3136, 0.1399]}, {"w": "questions", "b": [0.3197, 0.1249, 0.3952, 0.1399]}, {"w": "to", "b": [0.4014, 0.1249, 0.418, 0.1399]}, {"w": "answer", "b": [0.4241, 0.1249, 0.4798, 0.1399]}, {"w": "about", "b": [0.486, 0.1249, 0.5332, 0.1399]}, {"w": "the", "b": [0.5393, 0.1249, 0.5653, 0.1399]}, {"w": "data", "b": [0.5715, 0.1249, 0.6078, 0.1399]}, {"w": "before", "b": [0.6139, 0.1249, 0.6638, 0.1399]}, {"w": "to", "b": [0.67, 0.1249, 0.6866, 0.1399]}, {"w": "start", "b": [0.6927, 0.1249, 0.7313, 0.1399]}, {"w": "collecting", "b": [0.7375, 0.1249, 0.8143, 0.1399]}, {"w": "it", "b": [0.8204, 0.1249, 0.8329, 0.1399]}, {"w": "and", "b": [0.839, 0.1249, 0.8691, 0.1399]}]}, {"id": "b_2", "type": "paragraph", "text": "the common problems with the data an analyst might encounter. But what constitutes good data for a machine learning project? Below we take a look at several properties of good data.", "words": [{"w": "the", "b": [0.1312, 0.143, 0.1564, 0.1578]}, {"w": "common", "b": [0.1625, 0.143, 0.2289, 0.1578]}, {"w": "problems", "b": [0.2351, 0.143, 0.3067, 0.1578]}, {"w": "with", "b": [0.3128, 0.143, 0.348, 0.1578]}, {"w": "the", "b": [0.3542, 0.143, 0.3793, 0.1578]}, {"w": "data", "b": [0.3855, 0.143, 0.4207, 0.1578]}, {"w": "an", "b": [0.4269, 0.143, 0.446, 0.1578]}, {"w": "analyst", "b": [0.4521, 0.143, 0.5091, 0.1578]}, {"w": "might", "b": [0.5153, 0.143, 0.561, 0.1578]}, {"w": "encounter.", "b": [0.5672, 0.143, 0.6492, 0.1578]}, {"w": "But", "b": [0.6575, 0.143, 0.6874, 0.1578]}, {"w": "what", "b": [0.6935, 0.143, 0.7327, 0.1578]}, {"w": "constitutes", "b": [0.7389, 0.143, 0.8246, 0.1578]}, {"w": "good", "b": [0.8308, 0.143, 0.869, 0.1578]}, {"w": "data", "b": [0.1312, 0.161, 0.1664, 0.1758]}, {"w": "for", "b": [0.1724, 0.161, 0.1941, 0.1758]}, {"w": "a", "b": [0.2001, 0.161, 0.2091, 0.1758]}, {"w": "machine", "b": [0.2152, 0.161, 0.28, 0.1758]}, {"w": "learning", "b": [0.286, 0.161, 0.3494, 0.1758]}, {"w": "project?", "b": [0.3554, 0.161, 0.4193, 0.1758]}, {"w": "Below", "b": [0.4274, 0.161, 0.4749, 0.1758]}, {"w": "we", "b": [0.4809, 0.161, 0.5015, 0.1758]}, {"w": "take", "b": [0.5075, 0.161, 0.5407, 0.1758]}, {"w": "a", "b": [0.5467, 0.161, 0.5557, 0.1758]}, {"w": "look", "b": [0.5617, 0.161, 0.5949, 0.1758]}, {"w": "at", "b": [0.6009, 0.161, 0.617, 0.1758]}, {"w": "several", "b": [0.623, 0.161, 0.6765, 0.1758]}, {"w": "properties", "b": [0.6825, 0.161, 0.7616, 0.1758]}, {"w": "of", "b": [0.7676, 0.161, 0.7822, 0.1758]}, {"w": "good", "b": [0.7882, 0.161, 0.8264, 0.1758]}, {"w": "data.", "b": [0.8324, 0.161, 0.8726, 0.1758]}]}, {"id": "b_3", "type": "paragraph", "text": "3.3.1 Good Data Is Informative", "words": [{"w": "3.3.1", "b": [0.1312, 0.208, 0.1749, 0.223]}, {"w": "Good", "b": [0.1961, 0.208, 0.2469, 0.223]}, {"w": "Data", "b": [0.254, 0.208, 0.2992, 0.223]}, {"w": "Is", "b": [0.3062, 0.208, 0.3226, 0.223]}, {"w": "Informative", "b": [0.3297, 0.208, 0.4379, 0.223]}]}, {"id": "b_4", "type": "paragraph", "text": "Good data contains enough information that can be used for modeling. For example, if you want to train a model that predicts whether the customer will buy a specific product, you will need to possess both the properties of the product in question and the properties of the products customers purchased in the past. If you only have the properties of the product and a customer’s location and name, then the predictions will be the same for all users from the same location.", "words": [{"w": "Good", "b": [0.1312, 0.2445, 0.1763, 0.2596]}, {"w": "data", "b": [0.1853, 0.2445, 0.2219, 0.2596]}, {"w": "contains", "b": [0.2308, 0.2445, 0.2984, 0.2596]}, {"w": "enough", "b": [0.3074, 0.2445, 0.366, 0.2596]}, {"w": "information", "b": [0.3749, 0.2445, 0.4707, 0.2596]}, {"w": "that", "b": [0.4796, 0.2445, 0.5141, 0.2596]}, {"w": "can", "b": [0.5231, 0.2445, 0.5513, 0.2596]}, {"w": "be", "b": [0.5603, 0.2445, 0.5797, 0.2596]}, {"w": "used", "b": [0.5886, 0.2445, 0.6253, 0.2596]}, {"w": "for", "b": [0.6343, 0.2445, 0.6568, 0.2596]}, {"w": "modeling.", "b": [0.6658, 0.2445, 0.7458, 0.2596]}, {"w": "For", "b": [0.7624, 0.2445, 0.79, 0.2596]}, {"w": "example,", "b": [0.7989, 0.2445, 0.8716, 0.2596]}, {"w": "if", "b": [0.1312, 0.2624, 0.1422, 0.2775]}, {"w": "you", "b": [0.152, 0.2624, 0.1813, 0.2775]}, {"w": "want", "b": [0.1912, 0.2624, 0.2309, 0.2775]}, {"w": "to", "b": [0.2407, 0.2624, 0.2575, 0.2775]}, {"w": "train", "b": [0.2673, 0.2624, 0.3071, 0.2775]}, {"w": "a", "b": [0.3169, 0.2624, 0.3263, 0.2775]}, {"w": "model", "b": [0.3361, 0.2624, 0.3858, 0.2775]}, {"w": "that", "b": [0.3956, 0.2624, 0.4301, 0.2775]}, {"w": "predicts", "b": [0.44, 0.2624, 0.505, 0.2775]}, {"w": "whether", "b": [0.5148, 0.2624, 0.5808, 0.2775]}, {"w": "the", "b": [0.5906, 0.2624, 0.6168, 0.2775]}, {"w": "customer", "b": [0.6266, 0.2624, 0.701, 0.2775]}, {"w": "will", "b": [0.7108, 0.2624, 0.7401, 0.2775]}, {"w": "buy", "b": [0.7499, 0.2624, 0.7808, 0.2775]}, {"w": "a", "b": [0.7906, 0.2624, 0.8, 0.2775]}, {"w": "specific", "b": [0.8099, 0.2624, 0.8691, 0.2775]}, {"w": "product,", "b": [0.1312, 0.2804, 0.2008, 0.2955]}, {"w": "you", "b": [0.2108, 0.2804, 0.2401, 0.2955]}, {"w": "will", "b": [0.2493, 0.2804, 0.2786, 0.2955]}, {"w": "need", "b": [0.2878, 0.2804, 0.3255, 0.2955]}, {"w": "to", "b": [0.3347, 0.2804, 0.3515, 0.2955]}, {"w": "possess", "b": [0.3607, 0.2804, 0.4192, 0.2955]}, {"w": "both", "b": [0.4284, 0.2804, 0.4666, 0.2955]}, {"w": "the", "b": [0.4758, 0.2804, 0.5019, 0.2955]}, {"w": "properties", "b": [0.5112, 0.2804, 0.5935, 0.2955]}, {"w": "of", "b": [0.6027, 0.2804, 0.6179, 0.2955]}, {"w": "the", "b": [0.6271, 0.2804, 0.6532, 0.2955]}, {"w": "product", "b": [0.6625, 0.2804, 0.7268, 0.2955]}, {"w": "in", "b": [0.7361, 0.2804, 0.7517, 0.2955]}, {"w": "question", "b": [0.761, 0.2804, 0.8296, 0.2955]}, {"w": "and", "b": [0.8388, 0.2804, 0.8692, 0.2955]}, {"w": "the", "b": [0.1312, 0.2983, 0.1574, 0.3134]}, {"w": "properties", "b": [0.1662, 0.2983, 0.2485, 0.3134]}, {"w": "of", "b": [0.2573, 0.2983, 0.2724, 0.3134]}, {"w": "the", "b": [0.2812, 0.2983, 0.3074, 0.3134]}, {"w": "products", "b": [0.3162, 0.2983, 0.388, 0.3134]}, {"w": "customers", "b": [0.3968, 0.2983, 0.4786, 0.3134]}, {"w": "purchased", "b": [0.4874, 0.2983, 0.5697, 0.3134]}, {"w": "in", "b": [0.5785, 0.2983, 0.5942, 0.3134]}, {"w": "the", "b": [0.603, 0.2983, 0.6291, 0.3134]}, {"w": "past.", "b": [0.6379, 0.2983, 0.6777, 0.3134]}, {"w": "If", "b": [0.6938, 0.2983, 0.7064, 0.3134]}, {"w": "you", "b": [0.7152, 0.2983, 0.7445, 0.3134]}, {"w": "only", "b": [0.7533, 0.2983, 0.7883, 0.3134]}, {"w": "have", "b": [0.7971, 0.2983, 0.8342, 0.3134]}, {"w": "the", "b": [0.843, 0.2983, 0.8692, 0.3134]}, {"w": "properties", "b": [0.1312, 0.3162, 0.2136, 0.3314]}, {"w": "of", "b": [0.2239, 0.3162, 0.2391, 0.3314]}, {"w": "the", "b": [0.2494, 0.3162, 0.2756, 0.3314]}, {"w": "product", "b": [0.2859, 0.3162, 0.3503, 0.3314]}, {"w": "and", "b": [0.3607, 0.3162, 0.391, 0.3314]}, {"w": "a", "b": [0.4014, 0.3162, 0.4108, 0.3314]}, {"w": "customer’s", "b": [0.4211, 0.3162, 0.5082, 0.3314]}, {"w": "location", "b": [0.5186, 0.3162, 0.5839, 0.3314]}, {"w": "and", "b": [0.5943, 0.3162, 0.6246, 0.3314]}, {"w": "name,", "b": [0.635, 0.3162, 0.6841, 0.3314]}, {"w": "then", "b": [0.6955, 0.3162, 0.7321, 0.3314]}, {"w": "the", "b": [0.7425, 0.3162, 0.7686, 0.3314]}, {"w": "predictions", "b": [0.779, 0.3162, 0.8691, 0.3314]}, {"w": "will", "b": [0.1306, 0.3343, 0.1593, 0.3493]}, {"w": "be", "b": [0.1654, 0.3343, 0.1844, 0.3493]}, {"w": "the", "b": [0.1905, 0.3343, 0.2162, 0.3493]}, {"w": "same", "b": [0.2224, 0.3343, 0.2624, 0.3493]}, {"w": "for", "b": [0.2686, 0.3343, 0.2907, 0.3493]}, {"w": "all", "b": [0.2968, 0.3343, 0.3163, 0.3493]}, {"w": "users", "b": [0.3225, 0.3343, 0.3627, 0.3493]}, {"w": "from", "b": [0.3689, 0.3343, 0.4063, 0.3493]}, {"w": "the", "b": [0.4125, 0.3343, 0.4382, 0.3493]}, {"w": "same", "b": [0.4443, 0.3343, 0.4844, 0.3493]}, {"w": "location.", "b": [0.4905, 0.3343, 0.5598, 0.3493]}]}, {"id": "b_5", "type": "paragraph", "text": "If you have enough training examples, then the model can potentially derive the gender and ethnicity from the name and make different predictions for men, women, locations, and ethnicities, but not to each customer individually.", "words": [{"w": "If", "b": [0.1312, 0.3611, 0.1438, 0.3762]}, {"w": "you", "b": [0.1512, 0.3611, 0.1805, 0.3762]}, {"w": "have", "b": [0.1879, 0.3611, 0.2251, 0.3762]}, {"w": "enough", "b": [0.2325, 0.3611, 0.2911, 0.3762]}, {"w": "training", "b": [0.2985, 0.3611, 0.3634, 0.3762]}, {"w": "examples,", "b": [0.3708, 0.3611, 0.4509, 0.3762]}, {"w": "then", "b": [0.4587, 0.3611, 0.4953, 0.3762]}, {"w": "the", "b": [0.5027, 0.3611, 0.5288, 0.3762]}, {"w": "model", "b": [0.5363, 0.3611, 0.5859, 0.3762]}, {"w": "can", "b": [0.5934, 0.3611, 0.6216, 0.3762]}, {"w": "potentially", "b": [0.629, 0.3611, 0.7174, 0.3762]}, {"w": "derive", "b": [0.7248, 0.3611, 0.774, 0.3762]}, {"w": "the", "b": [0.7815, 0.3611, 0.8076, 0.3762]}, {"w": "gender", "b": [0.815, 0.3611, 0.8695, 0.3762]}, {"w": "and", "b": [0.1312, 0.3792, 0.1608, 0.3941]}, {"w": "ethnicity", "b": [0.1669, 0.3792, 0.2373, 0.3941]}, {"w": "from", "b": [0.2434, 0.3792, 0.2807, 0.3941]}, {"w": "the", "b": [0.2868, 0.3792, 0.3123, 0.3941]}, {"w": "name", "b": [0.3185, 0.3792, 0.3613, 0.3941]}, {"w": "and", "b": [0.3674, 0.3792, 0.397, 0.3941]}, {"w": "make", "b": [0.4032, 0.3792, 0.4449, 0.3941]}, {"w": "different", "b": [0.4511, 0.3792, 0.5174, 0.3941]}, {"w": "predictions", "b": [0.5236, 0.3792, 0.6114, 0.3941]}, {"w": "for", "b": [0.6175, 0.3792, 0.6395, 0.3941]}, {"w": "men,", "b": [0.6456, 0.3792, 0.6844, 0.3941]}, {"w": "women,", "b": [0.6905, 0.3792, 0.7512, 0.3941]}, {"w": "locations,", "b": [0.7573, 0.3792, 0.8334, 0.3941]}, {"w": "and", "b": [0.8395, 0.3792, 0.8691, 0.3941]}, {"w": "ethnicities,", "b": [0.1312, 0.3971, 0.2185, 0.4121]}, {"w": "but", "b": [0.2247, 0.3971, 0.2524, 0.4121]}, {"w": "not", "b": [0.2585, 0.3971, 0.2852, 0.4121]}, {"w": "to", "b": [0.2913, 0.3971, 0.3077, 0.4121]}, {"w": "each", "b": [0.3139, 0.3971, 0.3493, 0.4121]}, {"w": "customer", "b": [0.3554, 0.3971, 0.4284, 0.4121]}, {"w": "individually.", "b": [0.4345, 0.3971, 0.5335, 0.4121]}]}, {"id": "b_6", "type": "paragraph", "text": "3.3.2 Good Data Has Good Coverage", "words": [{"w": "3.3.2", "b": [0.1312, 0.4443, 0.1749, 0.4592]}, {"w": "Good", "b": [0.1961, 0.4443, 0.2469, 0.4592]}, {"w": "Data", "b": [0.254, 0.4443, 0.2992, 0.4592]}, {"w": "Has", "b": [0.3062, 0.4443, 0.3415, 0.4592]}, {"w": "Good", "b": [0.3486, 0.4443, 0.3995, 0.4592]}, {"w": "Coverage", "b": [0.4065, 0.4443, 0.4916, 0.4592]}]}, {"id": "b_7", "type": "paragraph", "text": "Good data has good coverage of what you want to do with the model. For example, if you’re going to use the model to classify web pages by topic and you have a thousand topics of interest, then your data has to contain examples of documents on each of the thousand topics in quantity sufficient for the algorithm to be able to learn the difference between topics.", "words": [{"w": "Good", "b": [0.1312, 0.481, 0.1746, 0.4958]}, {"w": "data", "b": [0.1806, 0.481, 0.2158, 0.4958]}, {"w": "has", "b": [0.2218, 0.481, 0.248, 0.4958]}, {"w": "good", "b": [0.2541, 0.481, 0.2923, 0.4958]}, {"w": "coverage", "b": [0.2983, 0.481, 0.3652, 0.4958]}, {"w": "of", "b": [0.3712, 0.481, 0.3857, 0.4958]}, {"w": "what", "b": [0.3918, 0.481, 0.431, 0.4958]}, {"w": "you", "b": [0.437, 0.481, 0.4651, 0.4958]}, {"w": "want", "b": [0.4711, 0.481, 0.5093, 0.4958]}, {"w": "to", "b": [0.5153, 0.481, 0.5314, 0.4958]}, {"w": "do", "b": [0.5374, 0.481, 0.5565, 0.4958]}, {"w": "with", "b": [0.5626, 0.481, 0.5977, 0.4958]}, {"w": "the", "b": [0.6037, 0.481, 0.6289, 0.4958]}, {"w": "model.", "b": [0.6349, 0.481, 0.6877, 0.4958]}, {"w": "For", "b": [0.6958, 0.481, 0.7222, 0.4958]}, {"w": "example,", "b": [0.7282, 0.481, 0.7981, 0.4958]}, {"w": "if", "b": [0.8041, 0.481, 0.8147, 0.4958]}, {"w": "you’re", "b": [0.8207, 0.481, 0.869, 0.4958]}, {"w": "going", "b": [0.1312, 0.4987, 0.1752, 0.5138]}, {"w": "to", "b": [0.182, 0.4987, 0.1988, 0.5138]}, {"w": "use", "b": [0.2056, 0.4987, 0.2319, 0.5138]}, {"w": "the", "b": [0.2388, 0.4987, 0.2649, 0.5138]}, {"w": "model", "b": [0.2718, 0.4987, 0.3215, 0.5138]}, {"w": "to", "b": [0.3284, 0.4987, 0.3451, 0.5138]}, {"w": "classify", "b": [0.352, 0.4987, 0.4108, 0.5138]}, {"w": "web", "b": [0.4176, 0.4987, 0.4495, 0.5138]}, {"w": "pages", "b": [0.4564, 0.4987, 0.5015, 0.5138]}, {"w": "by", "b": [0.5084, 0.4987, 0.5283, 0.5138]}, {"w": "topic", "b": [0.5351, 0.4987, 0.5759, 0.5138]}, {"w": "and", "b": [0.5828, 0.4987, 0.6131, 0.5138]}, {"w": "you", "b": [0.62, 0.4987, 0.6493, 0.5138]}, {"w": "have", "b": [0.6562, 0.4987, 0.6934, 0.5138]}, {"w": "a", "b": [0.7002, 0.4987, 0.7096, 0.5138]}, {"w": "thousand", "b": [0.7165, 0.4987, 0.7919, 0.5138]}, {"w": "topics", "b": [0.7988, 0.4987, 0.847, 0.5138]}, {"w": "of", "b": [0.8539, 0.4987, 0.8691, 0.5138]}, {"w": "interest,", "b": [0.1312, 0.5168, 0.1952, 0.5317]}, {"w": "then", "b": [0.201, 0.5168, 0.2362, 0.5317]}, {"w": "your", "b": [0.2418, 0.5168, 0.277, 0.5317]}, {"w": "data", "b": [0.2827, 0.5168, 0.3178, 0.5317]}, {"w": "has", "b": [0.3235, 0.5168, 0.3497, 0.5317]}, {"w": "to", "b": [0.3554, 0.5168, 0.3715, 0.5317]}, {"w": "contain", "b": [0.3771, 0.5168, 0.4349, 0.5317]}, {"w": "examples", "b": [0.4406, 0.5168, 0.5125, 0.5317]}, {"w": "of", "b": [0.5182, 0.5168, 0.5327, 0.5317]}, {"w": "documents", "b": [0.5384, 0.5168, 0.6229, 0.5317]}, {"w": "on", "b": [0.6286, 0.5168, 0.6477, 0.5317]}, {"w": "each", "b": [0.6533, 0.5168, 0.688, 0.5317]}, {"w": "of", "b": [0.6937, 0.5168, 0.7082, 0.5317]}, {"w": "the", "b": [0.7139, 0.5168, 0.739, 0.5317]}, {"w": "thousand", "b": [0.7447, 0.5168, 0.8171, 0.5317]}, {"w": "topics", "b": [0.8228, 0.5168, 0.8691, 0.5317]}, {"w": "in", "b": [0.1312, 0.5347, 0.1466, 0.5496]}, {"w": "quantity", "b": [0.1528, 0.5347, 0.2205, 0.5496]}, {"w": "sufficient", "b": [0.2266, 0.5347, 0.298, 0.5496]}, {"w": "for", "b": [0.3041, 0.5347, 0.3262, 0.5496]}, {"w": "the", "b": [0.3324, 0.5347, 0.358, 0.5496]}, {"w": "algorithm", "b": [0.3642, 0.5347, 0.4421, 0.5496]}, {"w": "to", "b": [0.4483, 0.5347, 0.4647, 0.5496]}, {"w": "be", "b": [0.4708, 0.5347, 0.4898, 0.5496]}, {"w": "able", "b": [0.496, 0.5347, 0.5288, 0.5496]}, {"w": "to", "b": [0.5349, 0.5347, 0.5513, 0.5496]}, {"w": "learn", "b": [0.5575, 0.5347, 0.5975, 0.5496]}, {"w": "the", "b": [0.6037, 0.5347, 0.6293, 0.5496]}, {"w": "difference", "b": [0.6355, 0.5347, 0.7119, 0.5496]}, {"w": "between", "b": [0.7181, 0.5347, 0.7832, 0.5496]}, {"w": "topics.", "b": [0.7894, 0.5347, 0.8418, 0.5496]}]}, {"id": "b_8", "type": "paragraph", "text": "Imagine a different situation. Let’s say that for a particular topic, you only have one or a couple of documents. Let each document contain a unique ID in the text. In such a scenario, the learning algorithm will not be sure what it must look at in each document to understand to which topic it belongs. Maybe the IDs? They look like good differentiators. If the algorithm decides to use IDs to separate these couple examples from the rest of the dataset, then the learned model will not be able to generalize: it will not see any of those IDs ever again.", "words": [{"w": "Imagine", "b": [0.1312, 0.5615, 0.1966, 0.5766]}, {"w": "a", "b": [0.2038, 0.5615, 0.2132, 0.5766]}, {"w": "different", "b": [0.2203, 0.5615, 0.2884, 0.5766]}, {"w": "situation.", "b": [0.2956, 0.5615, 0.3731, 0.5766]}, {"w": "Let’s", "b": [0.3843, 0.5615, 0.4244, 0.5766]}, {"w": "say", "b": [0.4316, 0.5615, 0.4579, 0.5766]}, {"w": "that", "b": [0.465, 0.5615, 0.4995, 0.5766]}, {"w": "for", "b": [0.5067, 0.5615, 0.5292, 0.5766]}, {"w": "a", "b": [0.5364, 0.5615, 0.5458, 0.5766]}, {"w": "particular", "b": [0.553, 0.5615, 0.6336, 0.5766]}, {"w": "topic,", "b": [0.6408, 0.5615, 0.6868, 0.5766]}, {"w": "you", "b": [0.6943, 0.5615, 0.7235, 0.5766]}, {"w": "only", "b": [0.7307, 0.5615, 0.7657, 0.5766]}, {"w": "have", "b": [0.7729, 0.5615, 0.8101, 0.5766]}, {"w": "one", "b": [0.8172, 0.5615, 0.8455, 0.5766]}, {"w": "or", "b": [0.8526, 0.5615, 0.8694, 0.5766]}, {"w": "a", "b": [0.1312, 0.5794, 0.1406, 0.5945]}, {"w": "couple", "b": [0.1484, 0.5794, 0.2007, 0.5945]}, {"w": "of", "b": [0.2085, 0.5794, 0.2237, 0.5945]}, {"w": "documents.", "b": [0.2315, 0.5794, 0.3247, 0.5945]}, {"w": "Let", "b": [0.3377, 0.5794, 0.3652, 0.5945]}, {"w": "each", "b": [0.373, 0.5794, 0.4091, 0.5945]}, {"w": "document", "b": [0.4169, 0.5794, 0.4974, 0.5945]}, {"w": "contain", "b": [0.5052, 0.5794, 0.5654, 0.5945]}, {"w": "a", "b": [0.5731, 0.5794, 0.5825, 0.5945]}, {"w": "unique", "b": [0.5903, 0.5794, 0.6452, 0.5945]}, {"w": "ID", "b": [0.653, 0.5794, 0.6742, 0.5945]}, {"w": "in", "b": [0.682, 0.5794, 0.6977, 0.5945]}, {"w": "the", "b": [0.7055, 0.5794, 0.7316, 0.5945]}, {"w": "text.", "b": [0.7394, 0.5794, 0.7776, 0.5945]}, {"w": "In", "b": [0.7907, 0.5794, 0.8079, 0.5945]}, {"w": "such", "b": [0.8157, 0.5794, 0.8519, 0.5945]}, {"w": "a", "b": [0.8597, 0.5794, 0.8691, 0.5945]}, {"w": "scenario,", "b": [0.1312, 0.5974, 0.2018, 0.6125]}, {"w": "the", "b": [0.2079, 0.5974, 0.2338, 0.6125]}, {"w": "learning", "b": [0.2399, 0.5974, 0.3052, 0.6125]}, {"w": "algorithm", "b": [0.3113, 0.5974, 0.39, 0.6125]}, {"w": "will", "b": [0.3961, 0.5974, 0.4251, 0.6125]}, {"w": "not", "b": [0.4313, 0.5974, 0.4582, 0.6125]}, {"w": "be", "b": [0.4643, 0.5974, 0.4835, 0.6125]}, {"w": "sure", "b": [0.4896, 0.5974, 0.5229, 0.6125]}, {"w": "what", "b": [0.529, 0.5974, 0.5694, 0.6125]}, {"w": "it", "b": [0.5755, 0.5974, 0.5879, 0.6125]}, {"w": "must", "b": [0.5941, 0.5974, 0.634, 0.6125]}, {"w": "look", "b": [0.6402, 0.5974, 0.6743, 0.6125]}, {"w": "at", "b": [0.6805, 0.5974, 0.697, 0.6125]}, {"w": "in", "b": [0.7032, 0.5974, 0.7187, 0.6125]}, {"w": "each", "b": [0.7248, 0.5974, 0.7605, 0.6125]}, {"w": "document", "b": [0.7667, 0.5974, 0.8464, 0.6125]}, {"w": "to", "b": [0.8525, 0.5974, 0.8691, 0.6125]}, {"w": "understand", "b": [0.1312, 0.6153, 0.2231, 0.6304]}, {"w": "to", "b": [0.2292, 0.6153, 0.2459, 0.6304]}, {"w": "which", "b": [0.2521, 0.6153, 0.2995, 0.6304]}, {"w": "topic", "b": [0.3057, 0.6153, 0.3463, 0.6304]}, {"w": "it", "b": [0.3525, 0.6153, 0.365, 0.6304]}, {"w": "belongs.", "b": [0.3711, 0.6153, 0.4374, 0.6304]}, {"w": "Maybe", "b": [0.4456, 0.6153, 0.5008, 0.6304]}, {"w": "the", "b": [0.507, 0.6153, 0.533, 0.6304]}, {"w": "IDs?", "b": [0.5392, 0.6153, 0.5765, 0.6304]}, {"w": "They", "b": [0.5848, 0.6153, 0.627, 0.6304]}, {"w": "look", "b": [0.6331, 0.6153, 0.6675, 0.6304]}, {"w": "like", "b": [0.6736, 0.6153, 0.7018, 0.6304]}, {"w": "good", "b": [0.7079, 0.6153, 0.7475, 0.6304]}, {"w": "differentiators.", "b": [0.7537, 0.6153, 0.8727, 0.6304]}, {"w": "If", "b": [0.1312, 0.6333, 0.1438, 0.6484]}, {"w": "the", "b": [0.15, 0.6333, 0.1761, 0.6484]}, {"w": "algorithm", "b": [0.1823, 0.6333, 0.2619, 0.6484]}, {"w": "decides", "b": [0.268, 0.6333, 0.3268, 0.6484]}, {"w": "to", "b": [0.3329, 0.6333, 0.3497, 0.6484]}, {"w": "use", "b": [0.3559, 0.6333, 0.3821, 0.6484]}, {"w": "IDs", "b": [0.3883, 0.6333, 0.417, 0.6484]}, {"w": "to", "b": [0.4231, 0.6333, 0.4399, 0.6484]}, {"w": "separate", "b": [0.4461, 0.6333, 0.5142, 0.6484]}, {"w": "these", "b": [0.5204, 0.6333, 0.5624, 0.6484]}, {"w": "couple", "b": [0.5686, 0.6333, 0.6209, 0.6484]}, {"w": "examples", "b": [0.6271, 0.6333, 0.702, 0.6484]}, {"w": "from", "b": [0.7082, 0.6333, 0.7464, 0.6484]}, {"w": "the", "b": [0.7526, 0.6333, 0.7787, 0.6484]}, {"w": "rest", "b": [0.7849, 0.6333, 0.8154, 0.6484]}, {"w": "of", "b": [0.8216, 0.6333, 0.8368, 0.6484]}, {"w": "the", "b": [0.843, 0.6333, 0.8691, 0.6484]}, {"w": "dataset,", "b": [0.1312, 0.6512, 0.1962, 0.6663]}, {"w": "then", "b": [0.2025, 0.6512, 0.2391, 0.6663]}, {"w": "the", "b": [0.2453, 0.6512, 0.2715, 0.6663]}, {"w": "learned", "b": [0.2777, 0.6512, 0.3374, 0.6663]}, {"w": "model", "b": [0.3436, 0.6512, 0.3933, 0.6663]}, {"w": "will", "b": [0.3995, 0.6512, 0.4288, 0.6663]}, {"w": "not", "b": [0.4351, 0.6512, 0.4623, 0.6663]}, {"w": "be", "b": [0.4685, 0.6512, 0.4879, 0.6663]}, {"w": "able", "b": [0.4941, 0.6512, 0.5276, 0.6663]}, {"w": "to", "b": [0.5338, 0.6512, 0.5505, 0.6663]}, {"w": "generalize:", "b": [0.5568, 0.6512, 0.6426, 0.6663]}, {"w": "it", "b": [0.651, 0.6512, 0.6636, 0.6663]}, {"w": "will", "b": [0.6698, 0.6512, 0.6991, 0.6663]}, {"w": "not", "b": [0.7053, 0.6512, 0.7325, 0.6663]}, {"w": "see", "b": [0.7388, 0.6512, 0.7629, 0.6663]}, {"w": "any", "b": [0.7692, 0.6512, 0.7985, 0.6663]}, {"w": "of", "b": [0.8047, 0.6512, 0.8199, 0.6663]}, {"w": "those", "b": [0.8261, 0.6512, 0.8691, 0.6663]}, {"w": "IDs", "b": [0.1312, 0.6693, 0.1593, 0.6842]}, {"w": "ever", "b": [0.1654, 0.6693, 0.1983, 0.6842]}, {"w": "again.", "b": [0.2045, 0.6693, 0.2526, 0.6842]}]}, {"id": "b_9", "type": "paragraph", "text": "3.3.3 Good Data Reflects Real Inputs", "words": [{"w": "3.3.3", "b": [0.1312, 0.7164, 0.1749, 0.7314]}, {"w": "Good", "b": [0.1961, 0.7164, 0.2469, 0.7314]}, {"w": "Data", "b": [0.254, 0.7164, 0.2992, 0.7314]}, {"w": "Reflects", "b": [0.3062, 0.7164, 0.3794, 0.7314]}, {"w": "Real", "b": [0.3865, 0.7164, 0.4284, 0.7314]}, {"w": "Inputs", "b": [0.4354, 0.7164, 0.4955, 0.7314]}]}, {"id": "b_10", "type": "paragraph", "text": "Good data reflects real inputs that the model will see in production. For example, if you build a system that recognizes cars on the road and all pictures you have were taken during the working hours, then it’s unlikely that you will have many examples of night pictures. Once you deploy the model in production, pictures will start coming from all times of the day, and your model will more frequently make errors on night pictures. Also, remember the problem of a cat, a dog, and a raccoon: if your model doesn’t know anything about raccoons, it will predict their pictures as either dogs or cats.", "words": [{"w": "Good", "b": [0.1312, 0.7529, 0.1763, 0.768]}, {"w": "data", "b": [0.1829, 0.7529, 0.2195, 0.768]}, {"w": "reflects", "b": [0.2261, 0.7529, 0.2838, 0.768]}, {"w": "real", "b": [0.2904, 0.7529, 0.3208, 0.768]}, {"w": "inputs", "b": [0.3274, 0.7529, 0.3788, 0.768]}, {"w": "that", "b": [0.3854, 0.7529, 0.4199, 0.768]}, {"w": "the", "b": [0.4265, 0.7529, 0.4526, 0.768]}, {"w": "model", "b": [0.4592, 0.7529, 0.5089, 0.768]}, {"w": "will", "b": [0.5155, 0.7529, 0.5448, 0.768]}, {"w": "see", "b": [0.5514, 0.7529, 0.5756, 0.768]}, {"w": "in", "b": [0.5822, 0.7529, 0.5979, 0.768]}, {"w": "production.", "b": [0.6044, 0.7529, 0.6991, 0.768]}, {"w": "For", "b": [0.7087, 0.7529, 0.7362, 0.768]}, {"w": "example,", "b": [0.7428, 0.7529, 0.8155, 0.768]}, {"w": "if", "b": [0.8222, 0.7529, 0.8332, 0.768]}, {"w": "you", "b": [0.8398, 0.7529, 0.8691, 0.768]}, {"w": "build", "b": [0.1312, 0.771, 0.1719, 0.7859]}, {"w": "a", "b": [0.1781, 0.771, 0.1873, 0.7859]}, {"w": "system", "b": [0.1934, 0.771, 0.2481, 0.7859]}, {"w": "that", "b": [0.2542, 0.771, 0.2878, 0.7859]}, {"w": "recognizes", "b": [0.294, 0.771, 0.3745, 0.7859]}, {"w": "cars", "b": [0.3807, 0.771, 0.4124, 0.7859]}, {"w": "on", "b": [0.4185, 0.771, 0.4379, 0.7859]}, {"w": "the", "b": [0.444, 0.771, 0.4695, 0.7859]}, {"w": "road", "b": [0.4756, 0.771, 0.5113, 0.7859]}, {"w": "and", "b": [0.5175, 0.771, 0.547, 0.7859]}, {"w": "all", "b": [0.5531, 0.771, 0.5724, 0.7859]}, {"w": "pictures", "b": [0.5786, 0.771, 0.6419, 0.7859]}, {"w": "you", "b": [0.648, 0.771, 0.6765, 0.7859]}, {"w": "have", "b": [0.6827, 0.771, 0.7188, 0.7859]}, {"w": "were", "b": [0.725, 0.771, 0.7611, 0.7859]}, {"w": "taken", "b": [0.7673, 0.771, 0.811, 0.7859]}, {"w": "during", "b": [0.8172, 0.771, 0.8691, 0.7859]}, {"w": "the", "b": [0.1312, 0.7888, 0.1574, 0.8039]}, {"w": "working", "b": [0.1642, 0.7888, 0.2291, 0.8039]}, {"w": "hours,", "b": [0.236, 0.7888, 0.2863, 0.8039]}, {"w": "then", "b": [0.2934, 0.7888, 0.33, 0.8039]}, {"w": "it’s", "b": [0.3368, 0.7888, 0.362, 0.8039]}, {"w": "unlikely", "b": [0.3689, 0.7888, 0.4332, 0.8039]}, {"w": "that", "b": [0.4401, 0.7888, 0.4746, 0.8039]}, {"w": "you", "b": [0.4814, 0.7888, 0.5107, 0.8039]}, {"w": "will", "b": [0.5175, 0.7888, 0.5468, 0.8039]}, {"w": "have", "b": [0.5537, 0.7888, 0.5908, 0.8039]}, {"w": "many", "b": [0.5977, 0.7888, 0.6426, 0.8039]}, {"w": "examples", "b": [0.6495, 0.7888, 0.7244, 0.8039]}, {"w": "of", "b": [0.7312, 0.7888, 0.7464, 0.8039]}, {"w": "night", "b": [0.7532, 0.7888, 0.7956, 0.8039]}, {"w": "pictures.", "b": [0.8024, 0.7888, 0.8727, 0.8039]}, {"w": "Once", "b": [0.1312, 0.8067, 0.1731, 0.8218]}, {"w": "you", "b": [0.1792, 0.8067, 0.2085, 0.8218]}, {"w": "deploy", "b": [0.2146, 0.8067, 0.268, 0.8218]}, {"w": "the", "b": [0.2741, 0.8067, 0.3003, 0.8218]}, {"w": "model", "b": [0.3064, 0.8067, 0.3561, 0.8218]}, {"w": "in", "b": [0.3622, 0.8067, 0.3779, 0.8218]}, {"w": "production,", "b": [0.384, 0.8067, 0.4787, 0.8218]}, {"w": "pictures", "b": [0.4849, 0.8067, 0.5499, 0.8218]}, {"w": "will", "b": [0.556, 0.8067, 0.5853, 0.8218]}, {"w": "start", "b": [0.5915, 0.8067, 0.6303, 0.8218]}, {"w": "coming", "b": [0.6364, 0.8067, 0.695, 0.8218]}, {"w": "from", "b": [0.7011, 0.8067, 0.7393, 0.8218]}, {"w": "all", "b": [0.7455, 0.8067, 0.7654, 0.8218]}, {"w": "times", "b": [0.7715, 0.8067, 0.8155, 0.8218]}, {"w": "of", "b": [0.8216, 0.8067, 0.8368, 0.8218]}, {"w": "the", "b": [0.8429, 0.8067, 0.8691, 0.8218]}, {"w": "day,", "b": [0.1312, 0.8249, 0.163, 0.8397]}, {"w": "and", "b": [0.1691, 0.8249, 0.1983, 0.8397]}, {"w": "your", "b": [0.2045, 0.8249, 0.2398, 0.8397]}, {"w": "model", "b": [0.2459, 0.8249, 0.2938, 0.8397]}, {"w": "will", "b": [0.2999, 0.8249, 0.3281, 0.8397]}, {"w": "more", "b": [0.3343, 0.8249, 0.3737, 0.8397]}, {"w": "frequently", "b": [0.3798, 0.8249, 0.4595, 0.8397]}, {"w": "make", "b": [0.4656, 0.8249, 0.5069, 0.8397]}, {"w": "errors", "b": [0.5131, 0.8249, 0.5587, 0.8397]}, {"w": "on", "b": [0.5648, 0.8249, 0.584, 0.8397]}, {"w": "night", "b": [0.5901, 0.8249, 0.6309, 0.8397]}, {"w": "pictures.", "b": [0.6371, 0.8249, 0.7048, 0.8397]}, {"w": "Also,", "b": [0.713, 0.8249, 0.7529, 0.8397]}, {"w": "remember", "b": [0.759, 0.8249, 0.8377, 0.8397]}, {"w": "the", "b": [0.8439, 0.8249, 0.8691, 0.8397]}, {"w": "problem", "b": [0.1312, 0.8428, 0.1956, 0.8576]}, {"w": "of", "b": [0.2015, 0.8428, 0.2161, 0.8576]}, {"w": "a", "b": [0.2221, 0.8428, 0.2311, 0.8576]}, {"w": "cat,", "b": [0.237, 0.8428, 0.2662, 0.8576]}, {"w": "a", "b": [0.2722, 0.8428, 0.2812, 0.8576]}, {"w": "dog,", "b": [0.2871, 0.8428, 0.3203, 0.8576]}, {"w": "and", "b": [0.3263, 0.8428, 0.3554, 0.8576]}, {"w": "a", "b": [0.3614, 0.8428, 0.3704, 0.8576]}, {"w": "raccoon:", "b": [0.3764, 0.8428, 0.4423, 0.8576]}, {"w": "if", "b": [0.4504, 0.8428, 0.4609, 0.8576]}, {"w": "your", "b": [0.4668, 0.8428, 0.5021, 0.8576]}, {"w": "model", "b": [0.508, 0.8428, 0.5557, 0.8576]}, {"w": "doesn’t", "b": [0.5617, 0.8428, 0.6186, 0.8576]}, {"w": "know", "b": [0.6245, 0.8428, 0.6657, 0.8576]}, {"w": "anything", "b": [0.6717, 0.8428, 0.741, 0.8576]}, {"w": "about", "b": [0.7469, 0.8428, 0.7926, 0.8576]}, {"w": "raccoons,", "b": [0.7986, 0.8428, 0.8716, 0.8576]}, {"w": "it", "b": [0.1312, 0.8607, 0.1435, 0.8756]}, {"w": "will", "b": [0.1497, 0.8607, 0.1784, 0.8756]}, {"w": "predict", "b": [0.1846, 0.8607, 0.241, 0.8756]}, {"w": "their", "b": [0.2472, 0.8607, 0.2852, 0.8756]}, {"w": "pictures", "b": [0.2913, 0.8607, 0.3551, 0.8756]}, {"w": "as", "b": [0.3612, 0.8607, 0.3777, 0.8756]}, {"w": "either", "b": [0.3839, 0.8607, 0.4301, 0.8756]}, {"w": "dogs", "b": [0.4362, 0.8607, 0.4722, 0.8756]}, {"w": "or", "b": [0.4784, 0.8607, 0.4948, 0.8756]}, {"w": "cats.", "b": [0.501, 0.8607, 0.538, 0.8756]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 21", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "21", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 65, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3.3.4 Good Data Is Unbiased", "words": [{"w": "3.3.4", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Good", "b": [0.1961, 0.0884, 0.2469, 0.1034]}, {"w": "Data", "b": [0.254, 0.0884, 0.2992, 0.1034]}, {"w": "Is", "b": [0.3062, 0.0884, 0.3226, 0.1034]}, {"w": "Unbiased", "b": [0.3297, 0.0884, 0.4151, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "Good data is as unbiased as possible. This property can look similar to the previous one. Still, bias can be present in both the data you use for training and the data that the model is applied to in the production environment.", "words": [{"w": "Good", "b": [0.1312, 0.1249, 0.1763, 0.14]}, {"w": "data", "b": [0.1829, 0.1249, 0.2195, 0.14]}, {"w": "is", "b": [0.226, 0.1249, 0.2387, 0.14]}, {"w": "as", "b": [0.2452, 0.1249, 0.2621, 0.14]}, {"w": "unbiased", "b": [0.2686, 0.1249, 0.3404, 0.14]}, {"w": "as", "b": [0.3469, 0.1249, 0.3638, 0.14]}, {"w": "possible.", "b": [0.3703, 0.1249, 0.4401, 0.14]}, {"w": "This", "b": [0.4495, 0.1249, 0.4862, 0.14]}, {"w": "property", "b": [0.4928, 0.1249, 0.5635, 0.14]}, {"w": "can", "b": [0.57, 0.1249, 0.5983, 0.14]}, {"w": "look", "b": [0.6048, 0.1249, 0.6393, 0.14]}, {"w": "similar", "b": [0.6459, 0.1249, 0.7015, 0.14]}, {"w": "to", "b": [0.708, 0.1249, 0.7247, 0.14]}, {"w": "the", "b": [0.7313, 0.1249, 0.7574, 0.14]}, {"w": "previous", "b": [0.764, 0.1249, 0.8327, 0.14]}, {"w": "one.", "b": [0.8392, 0.1249, 0.8727, 0.14]}, {"w": "Still,", "b": [0.1312, 0.1429, 0.1691, 0.1579]}, {"w": "bias", "b": [0.1752, 0.1429, 0.2071, 0.1579]}, {"w": "can", "b": [0.2132, 0.1429, 0.2409, 0.1579]}, {"w": "be", "b": [0.247, 0.1429, 0.2659, 0.1579]}, {"w": "present", "b": [0.2721, 0.1429, 0.3301, 0.1579]}, {"w": "in", "b": [0.3362, 0.1429, 0.3516, 0.1579]}, {"w": "both", "b": [0.3577, 0.1429, 0.3951, 0.1579]}, {"w": "the", "b": [0.4012, 0.1429, 0.4268, 0.1579]}, {"w": "data", "b": [0.4329, 0.1429, 0.4688, 0.1579]}, {"w": "you", "b": [0.4749, 0.1429, 0.5035, 0.1579]}, {"w": "use", "b": [0.5097, 0.1429, 0.5354, 0.1579]}, {"w": "for", "b": [0.5415, 0.1429, 0.5636, 0.1579]}, {"w": "training", "b": [0.5697, 0.1429, 0.6332, 0.1579]}, {"w": "and", "b": [0.6394, 0.1429, 0.669, 0.1579]}, {"w": "the", "b": [0.6752, 0.1429, 0.7008, 0.1579]}, {"w": "data", "b": [0.7069, 0.1429, 0.7427, 0.1579]}, {"w": "that", "b": [0.7489, 0.1429, 0.7826, 0.1579]}, {"w": "the", "b": [0.7888, 0.1429, 0.8144, 0.1579]}, {"w": "model", "b": [0.8205, 0.1429, 0.8691, 0.1579]}, {"w": "is", "b": [0.1312, 0.1609, 0.1436, 0.1758]}, {"w": "applied", "b": [0.1498, 0.1609, 0.2083, 0.1758]}, {"w": "to", "b": [0.2144, 0.1609, 0.2308, 0.1758]}, {"w": "in", "b": [0.237, 0.1609, 0.2524, 0.1758]}, {"w": "the", "b": [0.2585, 0.1609, 0.2841, 0.1758]}, {"w": "production", "b": [0.2903, 0.1609, 0.378, 0.1758]}, {"w": "environment.", "b": [0.3842, 0.1609, 0.4893, 0.1758]}]}, {"id": "b_2", "type": "paragraph", "text": "We discussed several sources of bias in data and how to deal with it in Section 3.2. A user", "words": [{"w": "We", "b": [0.1303, 0.1877, 0.1563, 0.2028]}, {"w": "discussed", "b": [0.1624, 0.1877, 0.2375, 0.2028]}, {"w": "several", "b": [0.2436, 0.1877, 0.2988, 0.2028]}, {"w": "sources", "b": [0.305, 0.1877, 0.3634, 0.2028]}, {"w": "of", "b": [0.3695, 0.1877, 0.3846, 0.2028]}, {"w": "bias", "b": [0.3907, 0.1877, 0.423, 0.2028]}, {"w": "in", "b": [0.4292, 0.1877, 0.4447, 0.2028]}, {"w": "data", "b": [0.4509, 0.1877, 0.4872, 0.2028]}, {"w": "and", "b": [0.4934, 0.1877, 0.5235, 0.2028]}, {"w": "how", "b": [0.5296, 0.1877, 0.5623, 0.2028]}, {"w": "to", "b": [0.5685, 0.1877, 0.5851, 0.2028]}, {"w": "deal", "b": [0.5912, 0.1877, 0.6244, 0.2028]}, {"w": "with", "b": [0.6306, 0.1877, 0.6669, 0.2028]}, {"w": "it", "b": [0.673, 0.1877, 0.6855, 0.2028]}, {"w": "in", "b": [0.6916, 0.1877, 0.7072, 0.2028]}, {"w": "Section", "b": [0.7134, 0.1877, 0.7725, 0.2028]}, {"w": "3.2.", "b": [0.7787, 0.1877, 0.8078, 0.2028]}, {"w": "A", "b": [0.816, 0.1877, 0.83, 0.2028]}, {"w": "user", "b": [0.8361, 0.1877, 0.8695, 0.2028]}]}, {"id": "b_3", "type": "paragraph", "text": "interface can also be a source of bias. For example, you want to predict the popularity of a news article, and use the click rate as a feature. If some news article was displayed on the top of the page, the number of clicks it got would often be higher compared to another news article displayed on the bottom, even if the latter is more engaging.", "words": [{"w": "interface", "b": [0.1312, 0.2057, 0.2001, 0.2207]}, {"w": "can", "b": [0.2063, 0.2057, 0.2341, 0.2207]}, {"w": "also", "b": [0.2402, 0.2057, 0.2711, 0.2207]}, {"w": "be", "b": [0.2773, 0.2057, 0.2963, 0.2207]}, {"w": "a", "b": [0.3025, 0.2057, 0.3117, 0.2207]}, {"w": "source", "b": [0.3178, 0.2057, 0.3684, 0.2207]}, {"w": "of", "b": [0.3745, 0.2057, 0.3894, 0.2207]}, {"w": "bias.", "b": [0.3956, 0.2057, 0.4327, 0.2207]}, {"w": "For", "b": [0.4409, 0.2057, 0.4679, 0.2207]}, {"w": "example,", "b": [0.474, 0.2057, 0.5455, 0.2207]}, {"w": "you", "b": [0.5516, 0.2057, 0.5804, 0.2207]}, {"w": "want", "b": [0.5865, 0.2057, 0.6256, 0.2207]}, {"w": "to", "b": [0.6317, 0.2057, 0.6481, 0.2207]}, {"w": "predict", "b": [0.6543, 0.2057, 0.7109, 0.2207]}, {"w": "the", "b": [0.717, 0.2057, 0.7427, 0.2207]}, {"w": "popularity", "b": [0.7489, 0.2057, 0.8327, 0.2207]}, {"w": "of", "b": [0.8388, 0.2057, 0.8537, 0.2207]}, {"w": "a", "b": [0.8599, 0.2057, 0.8691, 0.2207]}, {"w": "news", "b": [0.1312, 0.2236, 0.171, 0.2387]}, {"w": "article,", "b": [0.1771, 0.2236, 0.2335, 0.2387]}, {"w": "and", "b": [0.2396, 0.2236, 0.2699, 0.2387]}, {"w": "use", "b": [0.276, 0.2236, 0.3022, 0.2387]}, {"w": "the", "b": [0.3083, 0.2236, 0.3344, 0.2387]}, {"w": "click", "b": [0.3406, 0.2236, 0.3771, 0.2387]}, {"w": "rate", "b": [0.3832, 0.2236, 0.4156, 0.2387]}, {"w": "as", "b": [0.4218, 0.2236, 0.4386, 0.2387]}, {"w": "a", "b": [0.4447, 0.2236, 0.4541, 0.2387]}, {"w": "feature.", "b": [0.4602, 0.2236, 0.5223, 0.2387]}, {"w": "If", "b": [0.5305, 0.2236, 0.543, 0.2387]}, {"w": "some", "b": [0.5492, 0.2236, 0.5899, 0.2387]}, {"w": "news", "b": [0.5961, 0.2236, 0.6358, 0.2387]}, {"w": "article", "b": [0.642, 0.2236, 0.6931, 0.2387]}, {"w": "was", "b": [0.6993, 0.2236, 0.7291, 0.2387]}, {"w": "displayed", "b": [0.7352, 0.2236, 0.811, 0.2387]}, {"w": "on", "b": [0.8171, 0.2236, 0.8369, 0.2387]}, {"w": "the", "b": [0.8431, 0.2236, 0.8691, 0.2387]}, {"w": "top", "b": [0.1312, 0.2417, 0.1574, 0.2566]}, {"w": "of", "b": [0.1636, 0.2417, 0.1782, 0.2566]}, {"w": "the", "b": [0.1843, 0.2417, 0.2095, 0.2566]}, {"w": "page,", "b": [0.2157, 0.2417, 0.257, 0.2566]}, {"w": "the", "b": [0.2632, 0.2417, 0.2884, 0.2566]}, {"w": "number", "b": [0.2945, 0.2417, 0.3545, 0.2566]}, {"w": "of", "b": [0.3607, 0.2417, 0.3753, 0.2566]}, {"w": "clicks", "b": [0.3814, 0.2417, 0.4239, 0.2566]}, {"w": "it", "b": [0.43, 0.2417, 0.4421, 0.2566]}, {"w": "got", "b": [0.4483, 0.2417, 0.4735, 0.2566]}, {"w": "would", "b": [0.4796, 0.2417, 0.5264, 0.2566]}, {"w": "often", "b": [0.5326, 0.2417, 0.5724, 0.2566]}, {"w": "be", "b": [0.5785, 0.2417, 0.5972, 0.2566]}, {"w": "higher", "b": [0.6034, 0.2417, 0.6528, 0.2566]}, {"w": "compared", "b": [0.6589, 0.2417, 0.7356, 0.2566]}, {"w": "to", "b": [0.7418, 0.2417, 0.7579, 0.2566]}, {"w": "another", "b": [0.764, 0.2417, 0.8245, 0.2566]}, {"w": "news", "b": [0.8307, 0.2417, 0.8691, 0.2566]}, {"w": "article", "b": [0.1312, 0.2596, 0.1815, 0.2745]}, {"w": "displayed", "b": [0.1877, 0.2596, 0.2621, 0.2745]}, {"w": "on", "b": [0.2683, 0.2596, 0.2878, 0.2745]}, {"w": "the", "b": [0.2939, 0.2596, 0.3196, 0.2745]}, {"w": "bottom,", "b": [0.3257, 0.2596, 0.3898, 0.2745]}, {"w": "even", "b": [0.3959, 0.2596, 0.4318, 0.2745]}, {"w": "if", "b": [0.438, 0.2596, 0.4488, 0.2745]}, {"w": "the", "b": [0.4549, 0.2596, 0.4806, 0.2745]}, {"w": "latter", "b": [0.4867, 0.2596, 0.5309, 0.2745]}, {"w": "is", "b": [0.537, 0.2596, 0.5494, 0.2745]}, {"w": "more", "b": [0.5556, 0.2596, 0.5956, 0.2745]}, {"w": "engaging.", "b": [0.6018, 0.2596, 0.6776, 0.2745]}]}, {"id": "b_4", "type": "paragraph", "text": "3.3.5 Good Data Is Not a Result of a Feedback Loop", "words": [{"w": "3.3.5", "b": [0.1312, 0.3074, 0.1749, 0.3224]}, {"w": "Good", "b": [0.1961, 0.3074, 0.2469, 0.3224]}, {"w": "Data", "b": [0.254, 0.3074, 0.2992, 0.3224]}, {"w": "Is", "b": [0.3062, 0.3074, 0.3226, 0.3224]}, {"w": "Not", "b": [0.3297, 0.3074, 0.3652, 0.3224]}, {"w": "a", "b": [0.3723, 0.3074, 0.3826, 0.3224]}, {"w": "Result", "b": [0.3896, 0.3074, 0.4496, 0.3224]}, {"w": "of", "b": [0.4567, 0.3074, 0.4738, 0.3224]}, {"w": "a", "b": [0.4808, 0.3074, 0.4911, 0.3224]}, {"w": "Feedback", "b": [0.4982, 0.3074, 0.5832, 0.3224]}, {"w": "Loop", "b": [0.5903, 0.3074, 0.6366, 0.3224]}]}, {"id": "b_5", "type": "paragraph", "text": "Good data is not a result of the model itself. This echoes the problem of the feedback loop discussed above. For example, you cannot train a model that predicts the gender of a person from their name, and then use the prediction to label a new training example.", "words": [{"w": "Good", "b": [0.1312, 0.3441, 0.1746, 0.3589]}, {"w": "data", "b": [0.1805, 0.3441, 0.2156, 0.3589]}, {"w": "is", "b": [0.2215, 0.3441, 0.2337, 0.3589]}, {"w": "not", "b": [0.2396, 0.3441, 0.2657, 0.3589]}, {"w": "a", "b": [0.2716, 0.3441, 0.2806, 0.3589]}, {"w": "result", "b": [0.2865, 0.3441, 0.3309, 0.3589]}, {"w": "of", "b": [0.3368, 0.3441, 0.3513, 0.3589]}, {"w": "the", "b": [0.3572, 0.3441, 0.3824, 0.3589]}, {"w": "model", "b": [0.3882, 0.3441, 0.436, 0.3589]}, {"w": "itself.", "b": [0.4419, 0.3441, 0.4847, 0.3589]}, {"w": "This", "b": [0.4928, 0.3441, 0.5281, 0.3589]}, {"w": "echoes", "b": [0.534, 0.3441, 0.5843, 0.3589]}, {"w": "the", "b": [0.5902, 0.3441, 0.6153, 0.3589]}, {"w": "problem", "b": [0.6212, 0.3441, 0.6856, 0.3589]}, {"w": "of", "b": [0.6915, 0.3441, 0.706, 0.3589]}, {"w": "the", "b": [0.7119, 0.3441, 0.737, 0.3589]}, {"w": "feedback", "b": [0.7427, 0.344, 0.8225, 0.359]}, {"w": "loop", "b": [0.8293, 0.344, 0.8688, 0.359]}, {"w": "discussed", "b": [0.1312, 0.3621, 0.2039, 0.3769]}, {"w": "above.", "b": [0.21, 0.3621, 0.2603, 0.3769]}, {"w": "For", "b": [0.2685, 0.3621, 0.2949, 0.3769]}, {"w": "example,", "b": [0.301, 0.3621, 0.3708, 0.3769]}, {"w": "you", "b": [0.3769, 0.3621, 0.405, 0.3769]}, {"w": "cannot", "b": [0.4112, 0.3621, 0.4644, 0.3769]}, {"w": "train", "b": [0.4705, 0.3621, 0.5088, 0.3769]}, {"w": "a", "b": [0.5149, 0.3621, 0.5239, 0.3769]}, {"w": "model", "b": [0.53, 0.3621, 0.5777, 0.3769]}, {"w": "that", "b": [0.5839, 0.3621, 0.617, 0.3769]}, {"w": "predicts", "b": [0.6231, 0.3621, 0.6856, 0.3769]}, {"w": "the", "b": [0.6917, 0.3621, 0.7168, 0.3769]}, {"w": "gender", "b": [0.7229, 0.3621, 0.7753, 0.3769]}, {"w": "of", "b": [0.7814, 0.3621, 0.796, 0.3769]}, {"w": "a", "b": [0.802, 0.3621, 0.8111, 0.3769]}, {"w": "person", "b": [0.8172, 0.3621, 0.8691, 0.3769]}, {"w": "from", "b": [0.1312, 0.3799, 0.1687, 0.3948]}, {"w": "their", "b": [0.1748, 0.3799, 0.2129, 0.3948]}, {"w": "name,", "b": [0.219, 0.3799, 0.2672, 0.3948]}, {"w": "and", "b": [0.2733, 0.3799, 0.3031, 0.3948]}, {"w": "then", "b": [0.3092, 0.3799, 0.3451, 0.3948]}, {"w": "use", "b": [0.3513, 0.3799, 0.377, 0.3948]}, {"w": "the", "b": [0.3832, 0.3799, 0.4088, 0.3948]}, {"w": "prediction", "b": [0.415, 0.3799, 0.496, 0.3948]}, {"w": "to", "b": [0.5022, 0.3799, 0.5186, 0.3948]}, {"w": "label", "b": [0.5248, 0.3799, 0.5632, 0.3948]}, {"w": "a", "b": [0.5694, 0.3799, 0.5786, 0.3948]}, {"w": "new", "b": [0.5847, 0.3799, 0.6165, 0.3948]}, {"w": "training", "b": [0.6227, 0.3799, 0.6863, 0.3948]}, {"w": "example.", "b": [0.6925, 0.3799, 0.7637, 0.3948]}]}, {"id": "b_6", "type": "paragraph", "text": "Alternatively, if you use the model to decide which email messages are important to the user and highlight those important messages, you should not directly take the clicks on those emails as a signal that the email is important. The user might have clicked on them because the model highlighted them.", "words": [{"w": "Alternatively,", "b": [0.1305, 0.4069, 0.2379, 0.4217]}, {"w": "if", "b": [0.244, 0.4069, 0.2546, 0.4217]}, {"w": "you", "b": [0.2608, 0.4069, 0.289, 0.4217]}, {"w": "use", "b": [0.2951, 0.4069, 0.3204, 0.4217]}, {"w": "the", "b": [0.3266, 0.4069, 0.3518, 0.4217]}, {"w": "model", "b": [0.3579, 0.4069, 0.4058, 0.4217]}, {"w": "to", "b": [0.412, 0.4069, 0.4281, 0.4217]}, {"w": "decide", "b": [0.4342, 0.4069, 0.4836, 0.4217]}, {"w": "which", "b": [0.4898, 0.4069, 0.5356, 0.4217]}, {"w": "email", "b": [0.5418, 0.4069, 0.5841, 0.4217]}, {"w": "messages", "b": [0.5902, 0.4069, 0.6611, 0.4217]}, {"w": "are", "b": [0.6673, 0.4069, 0.6915, 0.4217]}, {"w": "important", "b": [0.6976, 0.4069, 0.7773, 0.4217]}, {"w": "to", "b": [0.7835, 0.4069, 0.7996, 0.4217]}, {"w": "the", "b": [0.8057, 0.4069, 0.8309, 0.4217]}, {"w": "user", "b": [0.8371, 0.4069, 0.8695, 0.4217]}, {"w": "and", "b": [0.1312, 0.4246, 0.1616, 0.4397]}, {"w": "highlight", "b": [0.1685, 0.4246, 0.2412, 0.4397]}, {"w": "those", "b": [0.2482, 0.4246, 0.2912, 0.4397]}, {"w": "important", "b": [0.2981, 0.4246, 0.3808, 0.4397]}, {"w": "messages,", "b": [0.3877, 0.4246, 0.4665, 0.4397]}, {"w": "you", "b": [0.4737, 0.4246, 0.503, 0.4397]}, {"w": "should", "b": [0.5099, 0.4246, 0.5634, 0.4397]}, {"w": "not", "b": [0.5703, 0.4246, 0.5975, 0.4397]}, {"w": "directly", "b": [0.6045, 0.4246, 0.6668, 0.4397]}, {"w": "take", "b": [0.6737, 0.4246, 0.7082, 0.4397]}, {"w": "the", "b": [0.7152, 0.4246, 0.7413, 0.4397]}, {"w": "clicks", "b": [0.7483, 0.4246, 0.7924, 0.4397]}, {"w": "on", "b": [0.7993, 0.4246, 0.8192, 0.4397]}, {"w": "those", "b": [0.8261, 0.4246, 0.8691, 0.4397]}, {"w": "emails", "b": [0.1312, 0.4428, 0.1808, 0.4576]}, {"w": "as", "b": [0.1869, 0.4428, 0.2032, 0.4576]}, {"w": "a", "b": [0.2093, 0.4428, 0.2184, 0.4576]}, {"w": "signal", "b": [0.2245, 0.4428, 0.2701, 0.4576]}, {"w": "that", "b": [0.2762, 0.4428, 0.3095, 0.4576]}, {"w": "the", "b": [0.3157, 0.4428, 0.3409, 0.4576]}, {"w": "email", "b": [0.347, 0.4428, 0.3894, 0.4576]}, {"w": "is", "b": [0.3956, 0.4428, 0.4078, 0.4576]}, {"w": "important.", "b": [0.4139, 0.4428, 0.4987, 0.4576]}, {"w": "The", "b": [0.5069, 0.4428, 0.5382, 0.4576]}, {"w": "user", "b": [0.5443, 0.4428, 0.5768, 0.4576]}, {"w": "might", "b": [0.583, 0.4428, 0.6288, 0.4576]}, {"w": "have", "b": [0.635, 0.4428, 0.6708, 0.4576]}, {"w": "clicked", "b": [0.6769, 0.4428, 0.7299, 0.4576]}, {"w": "on", "b": [0.7361, 0.4428, 0.7552, 0.4576]}, {"w": "them", "b": [0.7614, 0.4428, 0.8018, 0.4576]}, {"w": "because", "b": [0.8079, 0.4428, 0.8691, 0.4576]}, {"w": "the", "b": [0.1312, 0.4607, 0.1569, 0.4756]}, {"w": "model", "b": [0.163, 0.4607, 0.2117, 0.4756]}, {"w": "highlighted", "b": [0.2179, 0.4607, 0.3076, 0.4756]}, {"w": "them.", "b": [0.3138, 0.4607, 0.3599, 0.4756]}]}, {"id": "b_7", "type": "paragraph", "text": "3.3.6 Good Data Has Consistent Labels", "words": [{"w": "3.3.6", "b": [0.1312, 0.5085, 0.1749, 0.5235]}, {"w": "Good", "b": [0.1961, 0.5085, 0.2469, 0.5235]}, {"w": "Data", "b": [0.254, 0.5085, 0.2992, 0.5235]}, {"w": "Has", "b": [0.3062, 0.5085, 0.3415, 0.5235]}, {"w": "Consistent", "b": [0.3486, 0.5085, 0.4464, 0.5235]}, {"w": "Labels", "b": [0.4535, 0.5085, 0.5129, 0.5235]}]}, {"id": "b_8", "type": "paragraph", "text": "Good data has consistent labels. Inconsistency in labeling can come from several sources:", "words": [{"w": "Good", "b": [0.1312, 0.5451, 0.1755, 0.56]}, {"w": "data", "b": [0.1816, 0.5451, 0.2175, 0.56]}, {"w": "has", "b": [0.2236, 0.5451, 0.2504, 0.56]}, {"w": "consistent", "b": [0.2565, 0.5451, 0.3362, 0.56]}, {"w": "labels.", "b": [0.3424, 0.5451, 0.3933, 0.56]}, {"w": "Inconsistency", "b": [0.4015, 0.5451, 0.5094, 0.56]}, {"w": "in", "b": [0.5155, 0.5451, 0.5309, 0.56]}, {"w": "labeling", "b": [0.5371, 0.5451, 0.6001, 0.56]}, {"w": "can", "b": [0.6063, 0.5451, 0.634, 0.56]}, {"w": "come", "b": [0.6401, 0.5451, 0.6811, 0.56]}, {"w": "from", "b": [0.6873, 0.5451, 0.7247, 0.56]}, {"w": "several", "b": [0.7309, 0.5451, 0.7854, 0.56]}, {"w": "sources:", "b": [0.7916, 0.5451, 0.8544, 0.56]}]}, {"id": "b_9", "type": "paragraph", "text": "• Different people do labeling according to different criteria. Even if people believe that they use the same criteria, different people often interpret the same criteria differently.6", "words": [{"w": "•", "b": [0.1538, 0.572, 0.1681, 0.587]}, {"w": "Different", "b": [0.1774, 0.572, 0.2476, 0.587]}, {"w": "people", "b": [0.2537, 0.572, 0.3053, 0.587]}, {"w": "do", "b": [0.3115, 0.572, 0.3309, 0.587]}, {"w": "labeling", "b": [0.337, 0.572, 0.3998, 0.587]}, {"w": "according", "b": [0.4059, 0.572, 0.4826, 0.587]}, {"w": "to", "b": [0.4887, 0.572, 0.505, 0.587]}, {"w": "different", "b": [0.5112, 0.572, 0.5776, 0.587]}, {"w": "criteria.", "b": [0.5837, 0.572, 0.6462, 0.587]}, {"w": "Even", "b": [0.6543, 0.572, 0.6944, 0.587]}, {"w": "if", "b": [0.7006, 0.572, 0.7113, 0.587]}, {"w": "people", "b": [0.7174, 0.572, 0.769, 0.587]}, {"w": "believe", "b": [0.7751, 0.572, 0.8298, 0.587]}, {"w": "that", "b": [0.8359, 0.572, 0.8696, 0.587]}, {"w": "they", "b": [0.1774, 0.5901, 0.212, 0.6049]}, {"w": "use", "b": [0.2177, 0.5901, 0.243, 0.6049]}, {"w": "the", "b": [0.2487, 0.5901, 0.2739, 0.6049]}, {"w": "same", "b": [0.2796, 0.5901, 0.3189, 0.6049]}, {"w": "criteria,", "b": [0.3246, 0.5901, 0.386, 0.6049]}, {"w": "different", "b": [0.3918, 0.5901, 0.4572, 0.6049]}, {"w": "people", "b": [0.4629, 0.5901, 0.5137, 0.6049]}, {"w": "often", "b": [0.5194, 0.5901, 0.5591, 0.6049]}, {"w": "interpret", "b": [0.5648, 0.5901, 0.6338, 0.6049]}, {"w": "the", "b": [0.6395, 0.5901, 0.6646, 0.6049]}, {"w": "same", "b": [0.6703, 0.5901, 0.7096, 0.6049]}, {"w": "criteria", "b": [0.7153, 0.5901, 0.7717, 0.6049]}, {"w": "differently.6", "b": [0.7774, 0.588, 0.8678, 0.6049]}]}, {"id": "b_10", "type": "paragraph", "text": "• The definition of some classes evolved over time. This results in a situation when two very similar feature vectors receive two different labels. • Misinterpretation of user’s motives. For example, assume that the user ignored a recommended news article. As a consequence, this news article receives a negative label. However, the motive of the user for ignoring this recommendation might be that they already knew the story and not that they are uninterested in the topic of the story.", "words": [{"w": "•", "b": [0.1538, 0.6079, 0.1681, 0.6229]}, {"w": "The", "b": [0.1774, 0.6079, 0.2091, 0.6229]}, {"w": "definition", "b": [0.2153, 0.6079, 0.2911, 0.6229]}, {"w": "of", "b": [0.2973, 0.6079, 0.3121, 0.6229]}, {"w": "some", "b": [0.3183, 0.6079, 0.3583, 0.6229]}, {"w": "classes", "b": [0.3645, 0.6079, 0.4171, 0.6229]}, {"w": "evolved", "b": [0.4232, 0.6079, 0.4827, 0.6229]}, {"w": "over", "b": [0.4888, 0.6079, 0.5222, 0.6229]}, {"w": "time.", "b": [0.5284, 0.6079, 0.5693, 0.6229]}, {"w": "This", "b": [0.5776, 0.6079, 0.6135, 0.6229]}, {"w": "results", "b": [0.6197, 0.6079, 0.6722, 0.6229]}, {"w": "in", "b": [0.6784, 0.6079, 0.6938, 0.6229]}, {"w": "a", "b": [0.6999, 0.6079, 0.7091, 0.6229]}, {"w": "situation", "b": [0.7153, 0.6079, 0.7861, 0.6229]}, {"w": "when", "b": [0.7923, 0.6079, 0.8343, 0.6229]}, {"w": "two", "b": [0.8404, 0.6079, 0.8691, 0.6229]}, {"w": "very", "b": [0.1769, 0.6258, 0.2113, 0.6408]}, {"w": "similar", "b": [0.2174, 0.6258, 0.2719, 0.6408]}, {"w": "feature", "b": [0.2781, 0.6258, 0.334, 0.6408]}, {"w": "vectors", "b": [0.3402, 0.6258, 0.3968, 0.6408]}, {"w": "receive", "b": [0.4029, 0.6258, 0.4573, 0.6408]}, {"w": "two", "b": [0.4635, 0.6258, 0.4922, 0.6408]}, {"w": "different", "b": [0.4983, 0.6258, 0.565, 0.6408]}, {"w": "labels.", "b": [0.5712, 0.6258, 0.6221, 0.6408]}, {"w": "•", "b": [0.1538, 0.6438, 0.1681, 0.6587]}, {"w": "Misinterpretation", "b": [0.1774, 0.6437, 0.3209, 0.6588]}, {"w": "of", "b": [0.329, 0.6437, 0.3441, 0.6588]}, {"w": "user’s", "b": [0.3522, 0.6437, 0.3985, 0.6588]}, {"w": "motives.", "b": [0.4066, 0.6437, 0.4747, 0.6588]}, {"w": "For", "b": [0.4886, 0.6437, 0.5162, 0.6588]}, {"w": "example,", "b": [0.5243, 0.6437, 0.5969, 0.6588]}, {"w": "assume", "b": [0.6055, 0.6437, 0.6643, 0.6588]}, {"w": "that", "b": [0.6724, 0.6437, 0.7069, 0.6588]}, {"w": "the", "b": [0.7149, 0.6437, 0.7411, 0.6588]}, {"w": "user", "b": [0.7492, 0.6437, 0.7828, 0.6588]}, {"w": "ignored", "b": [0.7909, 0.6437, 0.8516, 0.6588]}, {"w": "a", "b": [0.8597, 0.6437, 0.8691, 0.6588]}, {"w": "recommended", "b": [0.1774, 0.6619, 0.2859, 0.6767]}, {"w": "news", "b": [0.2915, 0.6619, 0.3298, 0.6767]}, {"w": "article.", "b": [0.3353, 0.6619, 0.3896, 0.6767]}, {"w": "As", "b": [0.3976, 0.6619, 0.4183, 0.6767]}, {"w": "a", "b": [0.4238, 0.6619, 0.4329, 0.6767]}, {"w": "consequence,", "b": [0.4384, 0.6619, 0.5395, 0.6767]}, {"w": "this", "b": [0.5452, 0.6619, 0.5744, 0.6767]}, {"w": "news", "b": [0.58, 0.6619, 0.6183, 0.6767]}, {"w": "article", "b": [0.6238, 0.6619, 0.6731, 0.6767]}, {"w": "receives", "b": [0.6786, 0.6619, 0.7391, 0.6767]}, {"w": "a", "b": [0.7446, 0.6619, 0.7536, 0.6767]}, {"w": "negative", "b": [0.7592, 0.6619, 0.8245, 0.6767]}, {"w": "label.", "b": [0.83, 0.6619, 0.8727, 0.6767]}, {"w": "However,", "b": [0.1774, 0.6797, 0.2507, 0.6946]}, {"w": "the", "b": [0.2569, 0.6797, 0.2825, 0.6946]}, {"w": "motive", "b": [0.2886, 0.6797, 0.343, 0.6946]}, {"w": "of", "b": [0.3491, 0.6797, 0.364, 0.6946]}, {"w": "the", "b": [0.3701, 0.6797, 0.3957, 0.6946]}, {"w": "user", "b": [0.4019, 0.6797, 0.4349, 0.6946]}, {"w": "for", "b": [0.441, 0.6797, 0.4631, 0.6946]}, {"w": "ignoring", "b": [0.4692, 0.6797, 0.5349, 0.6946]}, {"w": "this", "b": [0.541, 0.6797, 0.5709, 0.6946]}, {"w": "recommendation", "b": [0.577, 0.6797, 0.7104, 0.6946]}, {"w": "might", "b": [0.7165, 0.6797, 0.7631, 0.6946]}, {"w": "be", "b": [0.7693, 0.6797, 0.7882, 0.6946]}, {"w": "that", "b": [0.7944, 0.6797, 0.8282, 0.6946]}, {"w": "they", "b": [0.8344, 0.6797, 0.8697, 0.6946]}, {"w": "already", "b": [0.1774, 0.6976, 0.2364, 0.7126]}, {"w": "knew", "b": [0.2425, 0.6976, 0.284, 0.7126]}, {"w": "the", "b": [0.2902, 0.6976, 0.3158, 0.7126]}, {"w": "story", "b": [0.322, 0.6976, 0.3627, 0.7126]}, {"w": "and", "b": [0.3688, 0.6976, 0.3985, 0.7126]}, {"w": "not", "b": [0.4047, 0.6976, 0.4313, 0.7126]}, {"w": "that", "b": [0.4375, 0.6976, 0.4713, 0.7126]}, {"w": "they", "b": [0.4775, 0.6976, 0.5129, 0.7126]}, {"w": "are", "b": [0.519, 0.6976, 0.5437, 0.7126]}, {"w": "uninterested", "b": [0.5498, 0.6976, 0.649, 0.7126]}, {"w": "in", "b": [0.6551, 0.6976, 0.6705, 0.7126]}, {"w": "the", "b": [0.6767, 0.6976, 0.7023, 0.7126]}, {"w": "topic", "b": [0.7085, 0.6976, 0.7485, 0.7126]}, {"w": "of", "b": [0.7546, 0.6976, 0.7695, 0.7126]}, {"w": "the", "b": [0.7756, 0.6976, 0.8013, 0.7126]}, {"w": "story.", "b": [0.8074, 0.6976, 0.8517, 0.7126]}]}, {"id": "b_11", "type": "paragraph", "text": "3.3.7 Good Data Is Big Enough", "words": [{"w": "3.3.7", "b": [0.1312, 0.7455, 0.1749, 0.7604]}, {"w": "Good", "b": [0.1961, 0.7455, 0.2469, 0.7604]}, {"w": "Data", "b": [0.254, 0.7455, 0.2992, 0.7604]}, {"w": "Is", "b": [0.3062, 0.7455, 0.3226, 0.7604]}, {"w": "Big", "b": [0.3297, 0.7455, 0.3613, 0.7604]}, {"w": "Enough", "b": [0.3684, 0.7455, 0.4389, 0.7604]}]}, {"id": "b_12", "type": "paragraph", "text": "Good data is big enough to allow generalization. Sometimes, nothing can be done to increase the accuracy of the model. No matter how much data you throw on the learning algorithm: the information contained in the data has low predictive power for your problem. However,", "words": [{"w": "Good", "b": [0.1312, 0.7822, 0.1746, 0.797]}, {"w": "data", "b": [0.1804, 0.7822, 0.2156, 0.797]}, {"w": "is", "b": [0.2214, 0.7822, 0.2336, 0.797]}, {"w": "big", "b": [0.2394, 0.7822, 0.2636, 0.797]}, {"w": "enough", "b": [0.2694, 0.7822, 0.3257, 0.797]}, {"w": "to", "b": [0.3315, 0.7822, 0.3476, 0.797]}, {"w": "allow", "b": [0.3534, 0.7822, 0.3941, 0.797]}, {"w": "generalization.", "b": [0.3999, 0.7822, 0.5146, 0.797]}, {"w": "Sometimes,", "b": [0.5227, 0.7822, 0.6122, 0.797]}, {"w": "nothing", "b": [0.6181, 0.7822, 0.6784, 0.797]}, {"w": "can", "b": [0.6842, 0.7822, 0.7114, 0.797]}, {"w": "be", "b": [0.7172, 0.7822, 0.7358, 0.797]}, {"w": "done", "b": [0.7417, 0.7822, 0.7789, 0.797]}, {"w": "to", "b": [0.7847, 0.7822, 0.8008, 0.797]}, {"w": "increase", "b": [0.8066, 0.7822, 0.8691, 0.797]}, {"w": "the", "b": [0.1312, 0.8, 0.1568, 0.815]}, {"w": "accuracy", "b": [0.163, 0.8, 0.2331, 0.815]}, {"w": "of", "b": [0.2393, 0.8, 0.2541, 0.815]}, {"w": "the", "b": [0.2603, 0.8, 0.2859, 0.815]}, {"w": "model.", "b": [0.292, 0.8, 0.3458, 0.815]}, {"w": "No", "b": [0.354, 0.8, 0.377, 0.815]}, {"w": "matter", "b": [0.3832, 0.8, 0.4374, 0.815]}, {"w": "how", "b": [0.4436, 0.8, 0.4758, 0.815]}, {"w": "much", "b": [0.482, 0.8, 0.5249, 0.815]}, {"w": "data", "b": [0.5311, 0.8, 0.5669, 0.815]}, {"w": "you", "b": [0.5731, 0.8, 0.6017, 0.815]}, {"w": "throw", "b": [0.6079, 0.8, 0.6545, 0.815]}, {"w": "on", "b": [0.6606, 0.8, 0.6801, 0.815]}, {"w": "the", "b": [0.6862, 0.8, 0.7118, 0.815]}, {"w": "learning", "b": [0.718, 0.8, 0.7825, 0.815]}, {"w": "algorithm:", "b": [0.7887, 0.8, 0.8716, 0.815]}, {"w": "the", "b": [0.1312, 0.8179, 0.157, 0.8329]}, {"w": "information", "b": [0.1631, 0.8179, 0.2572, 0.8329]}, {"w": "contained", "b": [0.2634, 0.8179, 0.341, 0.8329]}, {"w": "in", "b": [0.3471, 0.8179, 0.3626, 0.8329]}, {"w": "the", "b": [0.3687, 0.8179, 0.3944, 0.8329]}, {"w": "data", "b": [0.4005, 0.8179, 0.4365, 0.8329]}, {"w": "has", "b": [0.4426, 0.8179, 0.4695, 0.8329]}, {"w": "low", "b": [0.4756, 0.8179, 0.5029, 0.8329]}, {"w": "predictive", "b": [0.509, 0.8179, 0.5883, 0.8329]}, {"w": "power", "b": [0.5944, 0.8179, 0.6423, 0.8329]}, {"w": "for", "b": [0.6484, 0.8179, 0.6706, 0.8329]}, {"w": "your", "b": [0.6767, 0.8179, 0.7127, 0.8329]}, {"w": "problem.", "b": [0.7188, 0.8179, 0.7899, 0.8329]}, {"w": "However,", "b": [0.7981, 0.8179, 0.8717, 0.8329]}]}, {"id": "b_13", "type": "paragraph", "text": "6Recall the example of Mechanical Turk we considered in Section 3.1. To improve the reliability of labels assigned by different people, one can use a majority vote (or an average) of several labelers.", "words": [{"w": "6Recall", "b": [0.1518, 0.8447, 0.2011, 0.8586]}, {"w": "the", "b": [0.2063, 0.8466, 0.2279, 0.8586]}, {"w": "example", "b": [0.2331, 0.8466, 0.2888, 0.8586]}, {"w": "of", "b": [0.294, 0.8466, 0.3065, 0.8586]}, {"w": "Mechanical", "b": [0.3117, 0.8466, 0.3877, 0.8586]}, {"w": "Turk", "b": [0.3929, 0.8466, 0.4257, 0.8586]}, {"w": "we", "b": [0.4309, 0.8466, 0.4486, 0.8586]}, {"w": "considered", "b": [0.4538, 0.8466, 0.5246, 0.8586]}, {"w": "in", "b": [0.5299, 0.8466, 0.5428, 0.8586]}, {"w": "Section", "b": [0.548, 0.8466, 0.5972, 0.8586]}, {"w": "3.1.", "b": [0.6024, 0.8466, 0.6266, 0.8586]}, {"w": "To", "b": [0.6335, 0.8466, 0.6512, 0.8586]}, {"w": "improve", "b": [0.6564, 0.8466, 0.7104, 0.8586]}, {"w": "the", "b": [0.7156, 0.8466, 0.7372, 0.8586]}, {"w": "reliability", "b": [0.7424, 0.8466, 0.8071, 0.8586]}, {"w": "of", "b": [0.8123, 0.8466, 0.8248, 0.8586]}, {"w": "labels", "b": [0.83, 0.8466, 0.8685, 0.8586]}, {"w": "assigned", "b": [0.1312, 0.8608, 0.188, 0.8728]}, {"w": "by", "b": [0.1932, 0.8608, 0.2098, 0.8728]}, {"w": "different", "b": [0.215, 0.8608, 0.2717, 0.8728]}, {"w": "people,", "b": [0.2769, 0.8608, 0.3252, 0.8728]}, {"w": "one", "b": [0.3304, 0.8608, 0.3539, 0.8728]}, {"w": "can", "b": [0.3592, 0.8608, 0.3827, 0.8728]}, {"w": "use", "b": [0.3879, 0.8608, 0.4098, 0.8728]}, {"w": "a", "b": [0.415, 0.8608, 0.4228, 0.8728]}, {"w": "majority", "b": [0.4281, 0.8608, 0.4864, 0.8728]}, {"w": "vote", "b": [0.4917, 0.8608, 0.5204, 0.8728]}, {"w": "(or", "b": [0.5256, 0.8608, 0.5457, 0.8728]}, {"w": "an", "b": [0.5509, 0.8608, 0.5674, 0.8728]}, {"w": "average)", "b": [0.5727, 0.8608, 0.6297, 0.8728]}, {"w": "of", "b": [0.635, 0.8608, 0.6476, 0.8728]}, {"w": "several", "b": [0.6528, 0.8608, 0.6991, 0.8728]}, {"w": "labelers.", "b": [0.7043, 0.8608, 0.7606, 0.8728]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 22", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "22", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 66, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "more often, you can get a very accurate model if you pass from thousands of examples to millions or hundreds of millions. You cannot know how much data you need before you start working on your problem and see the progress.", "words": [{"w": "more", "b": [0.1312, 0.0883, 0.1721, 0.1034]}, {"w": "often,", "b": [0.1784, 0.0883, 0.225, 0.1034]}, {"w": "you", "b": [0.2314, 0.0883, 0.2607, 0.1034]}, {"w": "can", "b": [0.267, 0.0883, 0.2953, 0.1034]}, {"w": "get", "b": [0.3016, 0.0883, 0.3267, 0.1034]}, {"w": "a", "b": [0.3331, 0.0883, 0.3425, 0.1034]}, {"w": "very", "b": [0.3488, 0.0883, 0.3839, 0.1034]}, {"w": "accurate", "b": [0.3903, 0.0883, 0.4594, 0.1034]}, {"w": "model", "b": [0.4657, 0.0883, 0.5154, 0.1034]}, {"w": "if", "b": [0.5217, 0.0883, 0.5327, 0.1034]}, {"w": "you", "b": [0.5391, 0.0883, 0.5684, 0.1034]}, {"w": "pass", "b": [0.5747, 0.0883, 0.6095, 0.1034]}, {"w": "from", "b": [0.6158, 0.0883, 0.654, 0.1034]}, {"w": "thousands", "b": [0.6604, 0.0883, 0.7432, 0.1034]}, {"w": "of", "b": [0.7496, 0.0883, 0.7647, 0.1034]}, {"w": "examples", "b": [0.7711, 0.0883, 0.846, 0.1034]}, {"w": "to", "b": [0.8523, 0.0883, 0.8691, 0.1034]}, {"w": "millions", "b": [0.1312, 0.1065, 0.1927, 0.1213]}, {"w": "or", "b": [0.1989, 0.1065, 0.215, 0.1213]}, {"w": "hundreds", "b": [0.2212, 0.1065, 0.2933, 0.1213]}, {"w": "of", "b": [0.2994, 0.1065, 0.314, 0.1213]}, {"w": "millions.", "b": [0.3202, 0.1065, 0.3867, 0.1213]}, {"w": "You", "b": [0.3949, 0.1065, 0.426, 0.1213]}, {"w": "cannot", "b": [0.4322, 0.1065, 0.4855, 0.1213]}, {"w": "know", "b": [0.4917, 0.1065, 0.5329, 0.1213]}, {"w": "how", "b": [0.5391, 0.1065, 0.5707, 0.1213]}, {"w": "much", "b": [0.5769, 0.1065, 0.6191, 0.1213]}, {"w": "data", "b": [0.6253, 0.1065, 0.6605, 0.1213]}, {"w": "you", "b": [0.6666, 0.1065, 0.6948, 0.1213]}, {"w": "need", "b": [0.701, 0.1065, 0.7372, 0.1213]}, {"w": "before", "b": [0.7434, 0.1065, 0.7917, 0.1213]}, {"w": "you", "b": [0.7979, 0.1065, 0.826, 0.1213]}, {"w": "start", "b": [0.8322, 0.1065, 0.8696, 0.1213]}, {"w": "working", "b": [0.1306, 0.1243, 0.1942, 0.1392]}, {"w": "on", "b": [0.2003, 0.1243, 0.2198, 0.1392]}, {"w": "your", "b": [0.226, 0.1243, 0.2619, 0.1392]}, {"w": "problem", "b": [0.2681, 0.1243, 0.3337, 0.1392]}, {"w": "and", "b": [0.3399, 0.1243, 0.3696, 0.1392]}, {"w": "see", "b": [0.3758, 0.1243, 0.3995, 0.1392]}, {"w": "the", "b": [0.4056, 0.1243, 0.4313, 0.1392]}, {"w": "progress.", "b": [0.4374, 0.1243, 0.5085, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "3.3.8 Summary of Good Data", "words": [{"w": "3.3.8", "b": [0.1312, 0.1721, 0.1749, 0.1871]}, {"w": "Summary", "b": [0.1961, 0.1721, 0.2853, 0.1871]}, {"w": "of", "b": [0.2923, 0.1721, 0.3094, 0.1871]}, {"w": "Good", "b": [0.3165, 0.1721, 0.3673, 0.1871]}, {"w": "Data", "b": [0.3744, 0.1721, 0.4196, 0.1871]}]}, {"id": "b_2", "type": "paragraph", "text": "For the convenience of future reference, let me once again repeat the properties of good data:", "words": [{"w": "For", "b": [0.1312, 0.2088, 0.1576, 0.2236]}, {"w": "the", "b": [0.1637, 0.2088, 0.1888, 0.2236]}, {"w": "convenience", "b": [0.1949, 0.2088, 0.2879, 0.2236]}, {"w": "of", "b": [0.2939, 0.2088, 0.3085, 0.2236]}, {"w": "future", "b": [0.3146, 0.2088, 0.3624, 0.2236]}, {"w": "reference,", "b": [0.3684, 0.2088, 0.4434, 0.2236]}, {"w": "let", "b": [0.4495, 0.2088, 0.4696, 0.2236]}, {"w": "me", "b": [0.4757, 0.2088, 0.4988, 0.2236]}, {"w": "once", "b": [0.5049, 0.2088, 0.54, 0.2236]}, {"w": "again", "b": [0.5461, 0.2088, 0.5883, 0.2236]}, {"w": "repeat", "b": [0.5944, 0.2088, 0.6442, 0.2236]}, {"w": "the", "b": [0.6503, 0.2088, 0.6754, 0.2236]}, {"w": "properties", "b": [0.6815, 0.2088, 0.7606, 0.2236]}, {"w": "of", "b": [0.7666, 0.2088, 0.7812, 0.2236]}, {"w": "good", "b": [0.7873, 0.2088, 0.8255, 0.2236]}, {"w": "data:", "b": [0.8316, 0.2088, 0.8717, 0.2236]}]}, {"id": "b_3", "type": "paragraph", "text": "• it contains enough information that can be used for modeling, • it has good coverage of what you want to do with the model, • it reflects real inputs that the model will see in production, • it is as unbiased as possible, • it is not a result of the model itself, • it has consistent labels, and • it is big enough to allow generalization.", "words": [{"w": "•", "b": [0.1538, 0.2356, 0.1681, 0.2506]}, {"w": "it", "b": [0.1774, 0.2356, 0.1897, 0.2506]}, {"w": "contains", "b": [0.1958, 0.2356, 0.2621, 0.2506]}, {"w": "enough", "b": [0.2682, 0.2356, 0.3256, 0.2506]}, {"w": "information", "b": [0.3318, 0.2356, 0.4257, 0.2506]}, {"w": "that", "b": [0.4318, 0.2356, 0.4656, 0.2506]}, {"w": "can", "b": [0.4718, 0.2356, 0.4995, 0.2506]}, {"w": "be", "b": [0.5056, 0.2356, 0.5246, 0.2506]}, {"w": "used", "b": [0.5308, 0.2356, 0.5668, 0.2506]}, {"w": "for", "b": [0.5729, 0.2356, 0.595, 0.2506]}, {"w": "modeling,", "b": [0.6012, 0.2356, 0.6796, 0.2506]}, {"w": "•", "b": [0.1538, 0.2536, 0.1681, 0.2685]}, {"w": "it", "b": [0.1774, 0.2536, 0.1897, 0.2685]}, {"w": "has", "b": [0.1958, 0.2536, 0.2226, 0.2685]}, {"w": "good", "b": [0.2287, 0.2536, 0.2677, 0.2685]}, {"w": "coverage", "b": [0.2738, 0.2536, 0.3421, 0.2685]}, {"w": "of", "b": [0.3482, 0.2536, 0.3631, 0.2685]}, {"w": "what", "b": [0.3692, 0.2536, 0.4092, 0.2685]}, {"w": "you", "b": [0.4154, 0.2536, 0.4441, 0.2685]}, {"w": "want", "b": [0.4502, 0.2536, 0.4892, 0.2685]}, {"w": "to", "b": [0.4953, 0.2536, 0.5118, 0.2685]}, {"w": "do", "b": [0.5179, 0.2536, 0.5374, 0.2685]}, {"w": "with", "b": [0.5435, 0.2536, 0.5794, 0.2685]}, {"w": "the", "b": [0.5856, 0.2536, 0.6112, 0.2685]}, {"w": "model,", "b": [0.6174, 0.2536, 0.6712, 0.2685]}, {"w": "•", "b": [0.1538, 0.2715, 0.1681, 0.2865]}, {"w": "it", "b": [0.1774, 0.2715, 0.1897, 0.2865]}, {"w": "reflects", "b": [0.1958, 0.2715, 0.2524, 0.2865]}, {"w": "real", "b": [0.2585, 0.2715, 0.2883, 0.2865]}, {"w": "inputs", "b": [0.2945, 0.2715, 0.3448, 0.2865]}, {"w": "that", "b": [0.351, 0.2715, 0.3848, 0.2865]}, {"w": "the", "b": [0.391, 0.2715, 0.4166, 0.2865]}, {"w": "model", "b": [0.4228, 0.2715, 0.4715, 0.2865]}, {"w": "will", "b": [0.4776, 0.2715, 0.5063, 0.2865]}, {"w": "see", "b": [0.5125, 0.2715, 0.5362, 0.2865]}, {"w": "in", "b": [0.5423, 0.2715, 0.5577, 0.2865]}, {"w": "production,", "b": [0.5639, 0.2715, 0.6567, 0.2865]}, {"w": "•", "b": [0.1538, 0.2895, 0.1681, 0.3044]}, {"w": "it", "b": [0.1774, 0.2895, 0.1897, 0.3044]}, {"w": "is", "b": [0.1958, 0.2895, 0.2082, 0.3044]}, {"w": "as", "b": [0.2144, 0.2895, 0.2309, 0.3044]}, {"w": "unbiased", "b": [0.237, 0.2895, 0.3074, 0.3044]}, {"w": "as", "b": [0.3135, 0.2895, 0.3301, 0.3044]}, {"w": "possible,", "b": [0.3362, 0.2895, 0.4046, 0.3044]}, {"w": "•", "b": [0.1538, 0.3074, 0.1681, 0.3224]}, {"w": "it", "b": [0.1774, 0.3074, 0.1897, 0.3224]}, {"w": "is", "b": [0.1958, 0.3074, 0.2082, 0.3224]}, {"w": "not", "b": [0.2144, 0.3074, 0.241, 0.3224]}, {"w": "a", "b": [0.2472, 0.3074, 0.2564, 0.3224]}, {"w": "result", "b": [0.2626, 0.3074, 0.3078, 0.3224]}, {"w": "of", "b": [0.314, 0.3074, 0.3289, 0.3224]}, {"w": "the", "b": [0.335, 0.3074, 0.3607, 0.3224]}, {"w": "model", "b": [0.3668, 0.3074, 0.4155, 0.3224]}, {"w": "itself,", "b": [0.4217, 0.3074, 0.4654, 0.3224]}, {"w": "•", "b": [0.1538, 0.3254, 0.1681, 0.3403]}, {"w": "it", "b": [0.1774, 0.3254, 0.1897, 0.3403]}, {"w": "has", "b": [0.1958, 0.3254, 0.2226, 0.3403]}, {"w": "consistent", "b": [0.2287, 0.3254, 0.3084, 0.3403]}, {"w": "labels,", "b": [0.3146, 0.3254, 0.3654, 0.3403]}, {"w": "and", "b": [0.3716, 0.3254, 0.4013, 0.3403]}, {"w": "•", "b": [0.1538, 0.3433, 0.1681, 0.3583]}, {"w": "it", "b": [0.1774, 0.3433, 0.1897, 0.3583]}, {"w": "is", "b": [0.1958, 0.3433, 0.2082, 0.3583]}, {"w": "big", "b": [0.2144, 0.3433, 0.239, 0.3583]}, {"w": "enough", "b": [0.2451, 0.3433, 0.3026, 0.3583]}, {"w": "to", "b": [0.3087, 0.3433, 0.3251, 0.3583]}, {"w": "allow", "b": [0.3313, 0.3433, 0.3728, 0.3583]}, {"w": "generalization.", "b": [0.3789, 0.3433, 0.4959, 0.3583]}]}, {"id": "b_4", "type": "paragraph", "text": "3.4 Dealing With Interaction Data", "words": [{"w": "3.4", "b": [0.1312, 0.3918, 0.1631, 0.4098]}, {"w": "Dealing", "b": [0.188, 0.3918, 0.2707, 0.4098]}, {"w": "With", "b": [0.279, 0.3918, 0.3352, 0.4098]}, {"w": "Interaction", "b": [0.3435, 0.3918, 0.4633, 0.4098]}, {"w": "Data", "b": [0.4716, 0.3918, 0.5246, 0.4098]}]}, {"id": "b_5", "type": "paragraph", "text": "Interaction data is the data you can collect from user interactions with the system your model supports. You are considered lucky if you can gather good data from interactions of the user with the system.", "words": [{"w": "Interaction", "b": [0.1312, 0.4307, 0.2335, 0.4457]}, {"w": "data", "b": [0.2405, 0.4307, 0.2812, 0.4457]}, {"w": "is", "b": [0.2877, 0.4306, 0.3004, 0.4457]}, {"w": "the", "b": [0.3065, 0.4306, 0.3326, 0.4457]}, {"w": "data", "b": [0.3388, 0.4306, 0.3753, 0.4457]}, {"w": "you", "b": [0.3815, 0.4306, 0.4107, 0.4457]}, {"w": "can", "b": [0.4169, 0.4306, 0.4451, 0.4457]}, {"w": "collect", "b": [0.4512, 0.4306, 0.5035, 0.4457]}, {"w": "from", "b": [0.5096, 0.4306, 0.5478, 0.4457]}, {"w": "user", "b": [0.5539, 0.4306, 0.5875, 0.4457]}, {"w": "interactions", "b": [0.5936, 0.4306, 0.6895, 0.4457]}, {"w": "with", "b": [0.6956, 0.4306, 0.7321, 0.4457]}, {"w": "the", "b": [0.7383, 0.4306, 0.7644, 0.4457]}, {"w": "system", "b": [0.7705, 0.4306, 0.8267, 0.4457]}, {"w": "your", "b": [0.8328, 0.4306, 0.8694, 0.4457]}, {"w": "model", "b": [0.1312, 0.4487, 0.1802, 0.4636]}, {"w": "supports.", "b": [0.1863, 0.4487, 0.2613, 0.4636]}, {"w": "You", "b": [0.2696, 0.4487, 0.3015, 0.4636]}, {"w": "are", "b": [0.3077, 0.4487, 0.3325, 0.4636]}, {"w": "considered", "b": [0.3386, 0.4487, 0.4233, 0.4636]}, {"w": "lucky", "b": [0.4295, 0.4487, 0.4723, 0.4636]}, {"w": "if", "b": [0.4784, 0.4487, 0.4893, 0.4636]}, {"w": "you", "b": [0.4954, 0.4487, 0.5243, 0.4636]}, {"w": "can", "b": [0.5304, 0.4487, 0.5583, 0.4636]}, {"w": "gather", "b": [0.5644, 0.4487, 0.616, 0.4636]}, {"w": "good", "b": [0.6222, 0.4487, 0.6613, 0.4636]}, {"w": "data", "b": [0.6675, 0.4487, 0.7035, 0.4636]}, {"w": "from", "b": [0.7097, 0.4487, 0.7474, 0.4636]}, {"w": "interactions", "b": [0.7535, 0.4487, 0.848, 0.4636]}, {"w": "of", "b": [0.8542, 0.4487, 0.8691, 0.4636]}, {"w": "the", "b": [0.1312, 0.4666, 0.1569, 0.4816]}, {"w": "user", "b": [0.163, 0.4666, 0.196, 0.4816]}, {"w": "with", "b": [0.2022, 0.4666, 0.238, 0.4816]}, {"w": "the", "b": [0.2442, 0.4666, 0.2698, 0.4816]}, {"w": "system.", "b": [0.276, 0.4666, 0.3362, 0.4816]}]}, {"id": "b_6", "type": "paragraph", "text": "Good interaction data contains information on three aspects:", "words": [{"w": "Good", "b": [0.1312, 0.4935, 0.1755, 0.5085]}, {"w": "interaction", "b": [0.1816, 0.4935, 0.2683, 0.5085]}, {"w": "data", "b": [0.2745, 0.4935, 0.3103, 0.5085]}, {"w": "contains", "b": [0.3165, 0.4935, 0.3828, 0.5085]}, {"w": "information", "b": [0.3889, 0.4935, 0.4828, 0.5085]}, {"w": "on", "b": [0.4889, 0.4935, 0.5084, 0.5085]}, {"w": "three", "b": [0.5145, 0.4935, 0.5556, 0.5085]}, {"w": "aspects:", "b": [0.5618, 0.4935, 0.6251, 0.5085]}]}, {"id": "b_7", "type": "paragraph", "text": "• context of interaction, • action of the user in that context, and • outcome of interaction.", "words": [{"w": "•", "b": [0.1538, 0.5205, 0.1681, 0.5354]}, {"w": "context", "b": [0.1774, 0.5205, 0.2368, 0.5354]}, {"w": "of", "b": [0.243, 0.5205, 0.2579, 0.5354]}, {"w": "interaction,", "b": [0.264, 0.5205, 0.3559, 0.5354]}, {"w": "•", "b": [0.1538, 0.5384, 0.1681, 0.5534]}, {"w": "action", "b": [0.1774, 0.5384, 0.2266, 0.5534]}, {"w": "of", "b": [0.2327, 0.5384, 0.2476, 0.5534]}, {"w": "the", "b": [0.2537, 0.5384, 0.2794, 0.5534]}, {"w": "user", "b": [0.2855, 0.5384, 0.3185, 0.5534]}, {"w": "in", "b": [0.3247, 0.5384, 0.3401, 0.5534]}, {"w": "that", "b": [0.3462, 0.5384, 0.38, 0.5534]}, {"w": "context,", "b": [0.3862, 0.5384, 0.4508, 0.5534]}, {"w": "and", "b": [0.457, 0.5384, 0.4867, 0.5534]}, {"w": "•", "b": [0.1538, 0.5564, 0.1681, 0.5713]}, {"w": "outcome", "b": [0.1774, 0.5564, 0.245, 0.5713]}, {"w": "of", "b": [0.2512, 0.5564, 0.266, 0.5713]}, {"w": "interaction.", "b": [0.2722, 0.5564, 0.364, 0.5713]}]}, {"id": "b_8", "type": "paragraph", "text": "As an example, assume that you build a search engine, and your model reranks search results for each user individually. A reranking model takes as input the list of links returned by the search engine, based on keywords provided by the user and outputs another list in which the items change order. Usually, a reranked model “knows” something about the user and their preferences and can reorder the generic search results for each user individually according to that user’s learned preferences. The context here is the search query and the hundred documents presented to the user in a specific order. The action is a click of the user on a particular document link. The outcome is how much time the user spent reading the document and whether the user hit “back.” Another action is the click on the “next page” link.", "words": [{"w": "As", "b": [0.1305, 0.5834, 0.1512, 0.5982]}, {"w": "an", "b": [0.157, 0.5834, 0.1761, 0.5982]}, {"w": "example,", "b": [0.1819, 0.5834, 0.2518, 0.5982]}, {"w": "assume", "b": [0.2577, 0.5834, 0.3141, 0.5982]}, {"w": "that", "b": [0.3199, 0.5834, 0.3531, 0.5982]}, {"w": "you", "b": [0.3589, 0.5834, 0.387, 0.5982]}, {"w": "build", "b": [0.3929, 0.5834, 0.4331, 0.5982]}, {"w": "a", "b": [0.4389, 0.5834, 0.4479, 0.5982]}, {"w": "search", "b": [0.4537, 0.5834, 0.5026, 0.5982]}, {"w": "engine,", "b": [0.5084, 0.5834, 0.5637, 0.5982]}, {"w": "and", "b": [0.5696, 0.5834, 0.5987, 0.5982]}, {"w": "your", "b": [0.6045, 0.5834, 0.6397, 0.5982]}, {"w": "model", "b": [0.6456, 0.5834, 0.6933, 0.5982]}, {"w": "reranks", "b": [0.6991, 0.5834, 0.7571, 0.5982]}, {"w": "search", "b": [0.7629, 0.5834, 0.8118, 0.5982]}, {"w": "results", "b": [0.8176, 0.5834, 0.8691, 0.5982]}, {"w": "for", "b": [0.1312, 0.6013, 0.153, 0.6162]}, {"w": "each", "b": [0.1592, 0.6013, 0.1941, 0.6162]}, {"w": "user", "b": [0.2003, 0.6013, 0.2328, 0.6162]}, {"w": "individually.", "b": [0.239, 0.6013, 0.3366, 0.6162]}, {"w": "A", "b": [0.3448, 0.6013, 0.3585, 0.6162]}, {"w": "reranking", "b": [0.3646, 0.6013, 0.4401, 0.6162]}, {"w": "model", "b": [0.4463, 0.6013, 0.4944, 0.6162]}, {"w": "takes", "b": [0.5005, 0.6013, 0.5411, 0.6162]}, {"w": "as", "b": [0.5472, 0.6013, 0.5635, 0.6162]}, {"w": "input", "b": [0.5697, 0.6013, 0.6122, 0.6162]}, {"w": "the", "b": [0.6184, 0.6013, 0.6437, 0.6162]}, {"w": "list", "b": [0.6498, 0.6013, 0.6742, 0.6162]}, {"w": "of", "b": [0.6804, 0.6013, 0.6951, 0.6162]}, {"w": "links", "b": [0.7012, 0.6013, 0.7382, 0.6162]}, {"w": "returned", "b": [0.7444, 0.6013, 0.8123, 0.6162]}, {"w": "by", "b": [0.8185, 0.6013, 0.8377, 0.6162]}, {"w": "the", "b": [0.8439, 0.6013, 0.8692, 0.6162]}, {"w": "search", "b": [0.1312, 0.6193, 0.1802, 0.6341]}, {"w": "engine,", "b": [0.1863, 0.6193, 0.2417, 0.6341]}, {"w": "based", "b": [0.2478, 0.6193, 0.2922, 0.6341]}, {"w": "on", "b": [0.2983, 0.6193, 0.3175, 0.6341]}, {"w": "keywords", "b": [0.3236, 0.6193, 0.3962, 0.6341]}, {"w": "provided", "b": [0.4023, 0.6193, 0.4708, 0.6341]}, {"w": "by", "b": [0.4769, 0.6193, 0.496, 0.6341]}, {"w": "the", "b": [0.5022, 0.6193, 0.5273, 0.6341]}, {"w": "user", "b": [0.5335, 0.6193, 0.5658, 0.6341]}, {"w": "and", "b": [0.572, 0.6193, 0.6011, 0.6341]}, {"w": "outputs", "b": [0.6073, 0.6193, 0.6678, 0.6341]}, {"w": "another", "b": [0.6739, 0.6193, 0.7343, 0.6341]}, {"w": "list", "b": [0.7405, 0.6193, 0.7647, 0.6341]}, {"w": "in", "b": [0.7709, 0.6193, 0.786, 0.6341]}, {"w": "which", "b": [0.7921, 0.6193, 0.8379, 0.6341]}, {"w": "the", "b": [0.844, 0.6193, 0.8692, 0.6341]}, {"w": "items", "b": [0.1312, 0.6371, 0.1742, 0.6521]}, {"w": "change", "b": [0.1804, 0.6371, 0.235, 0.6521]}, {"w": "order.", "b": [0.2411, 0.6371, 0.2882, 0.6521]}, {"w": "Usually,", "b": [0.2964, 0.6371, 0.3603, 0.6521]}, {"w": "a", "b": [0.3665, 0.6371, 0.3757, 0.6521]}, {"w": "reranked", "b": [0.3818, 0.6371, 0.4514, 0.6521]}, {"w": "model", "b": [0.4575, 0.6371, 0.506, 0.6521]}, {"w": "“knows”", "b": [0.5121, 0.6371, 0.5786, 0.6521]}, {"w": "something", "b": [0.5847, 0.6371, 0.6665, 0.6521]}, {"w": "about", "b": [0.6726, 0.6371, 0.7191, 0.6521]}, {"w": "the", "b": [0.7252, 0.6371, 0.7508, 0.6521]}, {"w": "user", "b": [0.7569, 0.6371, 0.7898, 0.6521]}, {"w": "and", "b": [0.7959, 0.6371, 0.8255, 0.6521]}, {"w": "their", "b": [0.8316, 0.6371, 0.8695, 0.6521]}, {"w": "preferences", "b": [0.1312, 0.655, 0.222, 0.6701]}, {"w": "and", "b": [0.2281, 0.655, 0.2584, 0.6701]}, {"w": "can", "b": [0.2646, 0.655, 0.2928, 0.6701]}, {"w": "reorder", "b": [0.2989, 0.655, 0.3577, 0.6701]}, {"w": "the", "b": [0.3638, 0.655, 0.39, 0.6701]}, {"w": "generic", "b": [0.3961, 0.655, 0.4537, 0.6701]}, {"w": "search", "b": [0.4598, 0.655, 0.5108, 0.6701]}, {"w": "results", "b": [0.5169, 0.655, 0.5705, 0.6701]}, {"w": "for", "b": [0.5766, 0.655, 0.5992, 0.6701]}, {"w": "each", "b": [0.6053, 0.655, 0.6414, 0.6701]}, {"w": "user", "b": [0.6475, 0.655, 0.6812, 0.6701]}, {"w": "individually", "b": [0.6873, 0.655, 0.7846, 0.6701]}, {"w": "according", "b": [0.7908, 0.655, 0.8692, 0.6701]}, {"w": "to", "b": [0.1312, 0.6729, 0.148, 0.688]}, {"w": "that", "b": [0.1547, 0.6729, 0.1892, 0.688]}, {"w": "user’s", "b": [0.1959, 0.6729, 0.2422, 0.688]}, {"w": "learned", "b": [0.2489, 0.6729, 0.3086, 0.688]}, {"w": "preferences.", "b": [0.3154, 0.6729, 0.4113, 0.688]}, {"w": "The", "b": [0.4212, 0.6729, 0.4536, 0.688]}, {"w": "context", "b": [0.4604, 0.6729, 0.521, 0.688]}, {"w": "here", "b": [0.5278, 0.6729, 0.5623, 0.688]}, {"w": "is", "b": [0.5691, 0.6729, 0.5817, 0.688]}, {"w": "the", "b": [0.5884, 0.6729, 0.6146, 0.688]}, {"w": "search", "b": [0.6213, 0.6729, 0.6722, 0.688]}, {"w": "query", "b": [0.679, 0.6729, 0.725, 0.688]}, {"w": "and", "b": [0.7318, 0.6729, 0.7621, 0.688]}, {"w": "the", "b": [0.7688, 0.6729, 0.795, 0.688]}, {"w": "hundred", "b": [0.8017, 0.6729, 0.8692, 0.688]}, {"w": "documents", "b": [0.1312, 0.6908, 0.2192, 0.706]}, {"w": "presented", "b": [0.2264, 0.6908, 0.3045, 0.706]}, {"w": "to", "b": [0.3117, 0.6908, 0.3285, 0.706]}, {"w": "the", "b": [0.3357, 0.6908, 0.3618, 0.706]}, {"w": "user", "b": [0.369, 0.6908, 0.4027, 0.706]}, {"w": "in", "b": [0.4099, 0.6908, 0.4256, 0.706]}, {"w": "a", "b": [0.4328, 0.6908, 0.4422, 0.706]}, {"w": "specific", "b": [0.4494, 0.6908, 0.5086, 0.706]}, {"w": "order.", "b": [0.5158, 0.6908, 0.564, 0.706]}, {"w": "The", "b": [0.5754, 0.6908, 0.6078, 0.706]}, {"w": "action", "b": [0.615, 0.6908, 0.6652, 0.706]}, {"w": "is", "b": [0.6724, 0.6908, 0.6851, 0.706]}, {"w": "a", "b": [0.6923, 0.6908, 0.7017, 0.706]}, {"w": "click", "b": [0.7089, 0.6908, 0.7455, 0.706]}, {"w": "of", "b": [0.7527, 0.6908, 0.7679, 0.706]}, {"w": "the", "b": [0.7751, 0.6908, 0.8013, 0.706]}, {"w": "user", "b": [0.8085, 0.6908, 0.8421, 0.706]}, {"w": "on", "b": [0.8493, 0.6908, 0.8692, 0.706]}, {"w": "a", "b": [0.1312, 0.7088, 0.1406, 0.7239]}, {"w": "particular", "b": [0.1483, 0.7088, 0.229, 0.7239]}, {"w": "document", "b": [0.2367, 0.7088, 0.3172, 0.7239]}, {"w": "link.", "b": [0.3249, 0.7088, 0.361, 0.7239]}, {"w": "The", "b": [0.3738, 0.7088, 0.4063, 0.7239]}, {"w": "outcome", "b": [0.4139, 0.7088, 0.483, 0.7239]}, {"w": "is", "b": [0.4907, 0.7088, 0.5033, 0.7239]}, {"w": "how", "b": [0.511, 0.7088, 0.544, 0.7239]}, {"w": "much", "b": [0.5517, 0.7088, 0.5956, 0.7239]}, {"w": "time", "b": [0.6033, 0.7088, 0.6399, 0.7239]}, {"w": "the", "b": [0.6476, 0.7088, 0.6737, 0.7239]}, {"w": "user", "b": [0.6814, 0.7088, 0.7151, 0.7239]}, {"w": "spent", "b": [0.7228, 0.7088, 0.7668, 0.7239]}, {"w": "reading", "b": [0.7745, 0.7088, 0.8352, 0.7239]}, {"w": "the", "b": [0.8429, 0.7088, 0.8691, 0.7239]}, {"w": "document", "b": [0.1312, 0.7268, 0.2116, 0.7418]}, {"w": "and", "b": [0.2178, 0.7268, 0.248, 0.7418]}, {"w": "whether", "b": [0.2542, 0.7268, 0.32, 0.7418]}, {"w": "the", "b": [0.3261, 0.7268, 0.3523, 0.7418]}, {"w": "user", "b": [0.3584, 0.7268, 0.392, 0.7418]}, {"w": "hit", "b": [0.3981, 0.7268, 0.4211, 0.7418]}, {"w": "“back.”", "b": [0.4272, 0.7268, 0.4852, 0.7418]}, {"w": "Another", "b": [0.4934, 0.7268, 0.5608, 0.7418]}, {"w": "action", "b": [0.5669, 0.7268, 0.617, 0.7418]}, {"w": "is", "b": [0.6232, 0.7268, 0.6358, 0.7418]}, {"w": "the", "b": [0.642, 0.7268, 0.6681, 0.7418]}, {"w": "click", "b": [0.6742, 0.7268, 0.7108, 0.7418]}, {"w": "on", "b": [0.7169, 0.7268, 0.7367, 0.7418]}, {"w": "the", "b": [0.7429, 0.7268, 0.769, 0.7418]}, {"w": "“next", "b": [0.7751, 0.7268, 0.82, 0.7418]}, {"w": "page”", "b": [0.8262, 0.7268, 0.8726, 0.7418]}, {"w": "link.", "b": [0.1312, 0.7448, 0.1666, 0.7598]}]}, {"id": "b_9", "type": "paragraph", "text": "The intuition is that the ranking was good if the user clicked on some link and spent significant time reading the page. The ranking was not so good if the user clicked on a link to a result and then hit “back” quickly. The ranking was bad if the user clicked on the “next page” link. This data can be used to improve the ranking algorithm and make it more personalized.", "words": [{"w": "The", "b": [0.1306, 0.7718, 0.1617, 0.7866]}, {"w": "intuition", "b": [0.1666, 0.7718, 0.2344, 0.7866]}, {"w": "is", "b": [0.2393, 0.7718, 0.2514, 0.7866]}, {"w": "that", "b": [0.2563, 0.7718, 0.2895, 0.7866]}, {"w": "the", "b": [0.2943, 0.7718, 0.3194, 0.7866]}, {"w": "ranking", "b": [0.3243, 0.7718, 0.3841, 0.7866]}, {"w": "was", "b": [0.389, 0.7718, 0.4177, 0.7866]}, {"w": "good", "b": [0.4226, 0.7718, 0.4608, 0.7866]}, {"w": "if", "b": [0.4656, 0.7718, 0.4762, 0.7866]}, {"w": "the", "b": [0.4811, 0.7718, 0.5062, 0.7866]}, {"w": "user", "b": [0.511, 0.7718, 0.5434, 0.7866]}, {"w": "clicked", "b": [0.5482, 0.7718, 0.601, 0.7866]}, {"w": "on", "b": [0.6058, 0.7718, 0.6249, 0.7866]}, {"w": "some", "b": [0.6298, 0.7718, 0.6691, 0.7866]}, {"w": "link", "b": [0.674, 0.7718, 0.7036, 0.7866]}, {"w": "and", "b": [0.7085, 0.7718, 0.7376, 0.7866]}, {"w": "spent", "b": [0.7425, 0.7718, 0.7848, 0.7866]}, {"w": "significant", "b": [0.7896, 0.7718, 0.8696, 0.7866]}, {"w": "time", "b": [0.1312, 0.7897, 0.167, 0.8046]}, {"w": "reading", "b": [0.1732, 0.7897, 0.2326, 0.8046]}, {"w": "the", "b": [0.2388, 0.7897, 0.2644, 0.8046]}, {"w": "page.", "b": [0.2705, 0.7897, 0.3125, 0.8046]}, {"w": "The", "b": [0.3207, 0.7897, 0.3524, 0.8046]}, {"w": "ranking", "b": [0.3586, 0.7897, 0.4195, 0.8046]}, {"w": "was", "b": [0.4257, 0.7897, 0.4549, 0.8046]}, {"w": "not", "b": [0.4611, 0.7897, 0.4877, 0.8046]}, {"w": "so", "b": [0.4939, 0.7897, 0.5103, 0.8046]}, {"w": "good", "b": [0.5165, 0.7897, 0.5554, 0.8046]}, {"w": "if", "b": [0.5615, 0.7897, 0.5723, 0.8046]}, {"w": "the", "b": [0.5785, 0.7897, 0.604, 0.8046]}, {"w": "user", "b": [0.6102, 0.7897, 0.6431, 0.8046]}, {"w": "clicked", "b": [0.6493, 0.7897, 0.703, 0.8046]}, {"w": "on", "b": [0.7092, 0.7897, 0.7286, 0.8046]}, {"w": "a", "b": [0.7348, 0.7897, 0.744, 0.8046]}, {"w": "link", "b": [0.7501, 0.7897, 0.7803, 0.8046]}, {"w": "to", "b": [0.7865, 0.7897, 0.8029, 0.8046]}, {"w": "a", "b": [0.809, 0.7897, 0.8182, 0.8046]}, {"w": "result", "b": [0.8244, 0.7897, 0.8696, 0.8046]}, {"w": "and", "b": [0.1312, 0.8077, 0.1604, 0.8225]}, {"w": "then", "b": [0.1665, 0.8077, 0.2017, 0.8225]}, {"w": "hit", "b": [0.2077, 0.8077, 0.2298, 0.8225]}, {"w": "“back”", "b": [0.2359, 0.8077, 0.2892, 0.8225]}, {"w": "quickly.", "b": [0.2953, 0.8077, 0.355, 0.8225]}, {"w": "The", "b": [0.3632, 0.8077, 0.3944, 0.8225]}, {"w": "ranking", "b": [0.4004, 0.8077, 0.4603, 0.8225]}, {"w": "was", "b": [0.4664, 0.8077, 0.4951, 0.8225]}, {"w": "bad", "b": [0.5012, 0.8077, 0.5303, 0.8225]}, {"w": "if", "b": [0.5364, 0.8077, 0.547, 0.8225]}, {"w": "the", "b": [0.5531, 0.8077, 0.5782, 0.8225]}, {"w": "user", "b": [0.5843, 0.8077, 0.6166, 0.8225]}, {"w": "clicked", "b": [0.6227, 0.8077, 0.6754, 0.8225]}, {"w": "on", "b": [0.6815, 0.8077, 0.7006, 0.8225]}, {"w": "the", "b": [0.7067, 0.8077, 0.7318, 0.8225]}, {"w": "“next", "b": [0.7379, 0.8077, 0.7811, 0.8225]}, {"w": "page”", "b": [0.7872, 0.8077, 0.8319, 0.8225]}, {"w": "link.", "b": [0.838, 0.8077, 0.8727, 0.8225]}, {"w": "This", "b": [0.1306, 0.8256, 0.1666, 0.8405]}, {"w": "data", "b": [0.1727, 0.8256, 0.2086, 0.8405]}, {"w": "can", "b": [0.2148, 0.8256, 0.2424, 0.8405]}, {"w": "be", "b": [0.2486, 0.8256, 0.2676, 0.8405]}, {"w": "used", "b": [0.2737, 0.8256, 0.3097, 0.8405]}, {"w": "to", "b": [0.3159, 0.8256, 0.3323, 0.8405]}, {"w": "improve", "b": [0.3384, 0.8256, 0.4026, 0.8405]}, {"w": "the", "b": [0.4087, 0.8256, 0.4344, 0.8405]}, {"w": "ranking", "b": [0.4405, 0.8256, 0.5016, 0.8405]}, {"w": "algorithm", "b": [0.5077, 0.8256, 0.5857, 0.8405]}, {"w": "and", "b": [0.5918, 0.8256, 0.6216, 0.8405]}, {"w": "make", "b": [0.6277, 0.8256, 0.6697, 0.8405]}, {"w": "it", "b": [0.6759, 0.8256, 0.6882, 0.8405]}, {"w": "more", "b": [0.6944, 0.8256, 0.7344, 0.8405]}, {"w": "personalized.", "b": [0.7405, 0.8256, 0.8448, 0.8405]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 23", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "23", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 67, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Population Country GDP per", "words": [{"w": "Population", "b": [0.3081, 0.0975, 0.3817, 0.1101]}, {"w": "Country", "b": [0.2138, 0.0975, 0.2683, 0.1101]}, {"w": "GDP", "b": [0.6248, 0.0901, 0.6585, 0.1027]}, {"w": "per", "b": [0.6629, 0.0901, 0.6854, 0.1027]}]}, {"id": "b_1", "type": "paragraph", "text": "capita", "words": [{"w": "capita", "b": [0.6343, 0.1048, 0.6759, 0.1175]}]}, {"id": "b_2", "type": "paragraph", "text": "France", "words": [{"w": "France", "b": [0.2155, 0.129, 0.264, 0.1417]}]}, {"id": "b_3", "type": "paragraph", "text": "Germany", "words": [{"w": "Germany", "b": [0.2077, 0.1606, 0.2718, 0.1732]}]}, {"id": "b_4", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.2345, 0.1922, 0.2475, 0.2048]}]}, {"id": "b_5", "type": "paragraph", "text": "China", "words": [{"w": "China", "b": [0.2194, 0.2237, 0.2601, 0.2364]}]}, {"id": "b_6", "type": "paragraph", "text": "83M", "words": [{"w": "83M", "b": [0.3284, 0.1606, 0.3587, 0.1732]}]}, {"id": "b_7", "type": "paragraph", "text": "67M 38,800", "words": [{"w": "67M", "b": [0.3284, 0.129, 0.3587, 0.1417]}, {"w": "38,800", "b": [0.6326, 0.129, 0.6802, 0.1417]}]}, {"id": "b_8", "type": "paragraph", "text": "44,578", "words": [{"w": "44,578", "b": [0.6326, 0.1606, 0.6802, 0.1732]}]}, {"id": "b_9", "type": "paragraph", "text": "... ...", "words": [{"w": "...", "b": [0.3384, 0.1922, 0.3514, 0.2048]}, {"w": "...", "b": [0.6499, 0.1922, 0.6629, 0.2048]}]}, {"id": "b_10", "type": "paragraph", "text": "1386M 8,802", "words": [{"w": "1386M", "b": [0.3211, 0.2237, 0.3687, 0.2364]}, {"w": "8,802", "b": [0.6369, 0.2237, 0.6759, 0.2364]}]}, {"id": "b_11", "type": "paragraph", "text": "Region", "words": [{"w": "Region", "b": [0.424, 0.0975, 0.4734, 0.1101]}]}, {"id": "b_12", "type": "paragraph", "text": "Europe", "words": [{"w": "Europe", "b": [0.4236, 0.129, 0.4738, 0.1417]}]}, {"id": "b_13", "type": "paragraph", "text": "Europe", "words": [{"w": "Europe", "b": [0.4236, 0.1606, 0.4738, 0.1732]}]}, {"id": "b_14", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.4422, 0.1922, 0.4552, 0.2048]}]}, {"id": "b_15", "type": "paragraph", "text": "Asia", "words": [{"w": "Asia", "b": [0.4323, 0.2237, 0.4626, 0.2364]}]}, {"id": "b_16", "type": "paragraph", "text": "GDP", "words": [{"w": "GDP", "b": [0.7433, 0.0975, 0.7771, 0.1101]}]}, {"id": "b_17", "type": "paragraph", "text": "2.6T", "words": [{"w": "2.6T", "b": [0.7446, 0.129, 0.7758, 0.1417]}]}, {"id": "b_18", "type": "paragraph", "text": "3.7T", "words": [{"w": "3.7T", "b": [0.7446, 0.1606, 0.7758, 0.1732]}]}, {"id": "b_19", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.7537, 0.1922, 0.7667, 0.2048]}]}, {"id": "b_20", "type": "paragraph", "text": "12.2T", "words": [{"w": "12.2T", "b": [0.7403, 0.2237, 0.7801, 0.2364]}]}, {"id": "b_21", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.546, 0.0975, 0.559, 0.1101]}]}, {"id": "b_22", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.546, 0.129, 0.559, 0.1417]}]}, {"id": "b_23", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.546, 0.1606, 0.559, 0.1732]}]}, {"id": "b_24", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.546, 0.1922, 0.559, 0.2048]}]}, {"id": "b_25", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.546, 0.2237, 0.559, 0.2364]}]}, {"id": "b_26", "type": "paragraph", "text": "Figure 9: An example of the target (GDP) being a simple function of two features: Population and GDP per capita.", "words": [{"w": "Figure", "b": [0.1312, 0.262, 0.1823, 0.2769]}, {"w": "9:", "b": [0.1873, 0.262, 0.2013, 0.2769]}, {"w": "An", "b": [0.209, 0.262, 0.2326, 0.2769]}, {"w": "example", "b": [0.2376, 0.262, 0.3024, 0.2769]}, {"w": "of", "b": [0.3074, 0.262, 0.322, 0.2769]}, {"w": "the", "b": [0.327, 0.262, 0.3521, 0.2769]}, {"w": "target", "b": [0.3571, 0.262, 0.4044, 0.2769]}, {"w": "(GDP)", "b": [0.4093, 0.262, 0.4637, 0.2769]}, {"w": "being", "b": [0.4687, 0.262, 0.5114, 0.2769]}, {"w": "a", "b": [0.5165, 0.262, 0.5255, 0.2769]}, {"w": "simple", "b": [0.5305, 0.262, 0.5808, 0.2769]}, {"w": "function", "b": [0.5858, 0.262, 0.6506, 0.2769]}, {"w": "of", "b": [0.6557, 0.262, 0.6702, 0.2769]}, {"w": "two", "b": [0.6752, 0.262, 0.7033, 0.2769]}, {"w": "features:", "b": [0.7083, 0.262, 0.7753, 0.2769]}, {"w": "Population", "b": [0.7829, 0.262, 0.8691, 0.2769]}, {"w": "and", "b": [0.1312, 0.2799, 0.161, 0.2948]}, {"w": "GDP", "b": [0.1671, 0.2799, 0.2083, 0.2948]}, {"w": "per", "b": [0.2144, 0.2799, 0.2406, 0.2948]}, {"w": "capita.", "b": [0.2468, 0.2799, 0.3011, 0.2948]}]}, {"id": "b_27", "type": "paragraph", "text": "3.5 Causes of Data Leakage", "words": [{"w": "3.5", "b": [0.1312, 0.3278, 0.1631, 0.3458]}, {"w": "Causes", "b": [0.188, 0.3278, 0.263, 0.3458]}, {"w": "of", "b": [0.2713, 0.3278, 0.2913, 0.3458]}, {"w": "Data", "b": [0.2996, 0.3278, 0.3526, 0.3458]}, {"w": "Leakage", "b": [0.361, 0.3278, 0.4485, 0.3458]}]}, {"id": "b_28", "type": "paragraph", "text": "Let’s discuss the three most frequent causes of data leakage that can happen during data collection and preparation: 1) target being a function of a feature, 2) feature hiding the target, and 3) feature coming from the future.", "words": [{"w": "Let’s", "b": [0.1312, 0.3667, 0.1706, 0.3817]}, {"w": "discuss", "b": [0.1767, 0.3667, 0.2324, 0.3817]}, {"w": "the", "b": [0.2386, 0.3667, 0.2642, 0.3817]}, {"w": "three", "b": [0.2703, 0.3667, 0.3114, 0.3817]}, {"w": "most", "b": [0.3176, 0.3667, 0.3566, 0.3817]}, {"w": "frequent", "b": [0.3628, 0.3667, 0.429, 0.3817]}, {"w": "causes", "b": [0.4351, 0.3667, 0.4856, 0.3817]}, {"w": "of", "b": [0.4917, 0.3667, 0.5066, 0.3817]}, {"w": "data", "b": [0.5139, 0.3667, 0.5546, 0.3817]}, {"w": "leakage", "b": [0.5617, 0.3667, 0.6295, 0.3817]}, {"w": "that", "b": [0.6356, 0.3667, 0.6694, 0.3817]}, {"w": "can", "b": [0.6756, 0.3667, 0.7033, 0.3817]}, {"w": "happen", "b": [0.7094, 0.3667, 0.7684, 0.3817]}, {"w": "during", "b": [0.7745, 0.3667, 0.8268, 0.3817]}, {"w": "data", "b": [0.833, 0.3667, 0.8689, 0.3817]}, {"w": "collection", "b": [0.1312, 0.3845, 0.2087, 0.3996]}, {"w": "and", "b": [0.2159, 0.3845, 0.2462, 0.3996]}, {"w": "preparation:", "b": [0.2534, 0.3845, 0.3539, 0.3996]}, {"w": "1)", "b": [0.3642, 0.3845, 0.381, 0.3996]}, {"w": "target", "b": [0.3882, 0.3845, 0.4374, 0.3996]}, {"w": "being", "b": [0.4446, 0.3845, 0.489, 0.3996]}, {"w": "a", "b": [0.4962, 0.3845, 0.5056, 0.3996]}, {"w": "function", "b": [0.5128, 0.3845, 0.5803, 0.3996]}, {"w": "of", "b": [0.5875, 0.3845, 0.6027, 0.3996]}, {"w": "a", "b": [0.6099, 0.3845, 0.6193, 0.3996]}, {"w": "feature,", "b": [0.6265, 0.3845, 0.6888, 0.3996]}, {"w": "2)", "b": [0.6963, 0.3845, 0.713, 0.3996]}, {"w": "feature", "b": [0.7202, 0.3845, 0.7773, 0.3996]}, {"w": "hiding", "b": [0.7845, 0.3845, 0.8358, 0.3996]}, {"w": "the", "b": [0.843, 0.3845, 0.8691, 0.3996]}, {"w": "target,", "b": [0.1312, 0.4026, 0.1846, 0.4176]}, {"w": "and", "b": [0.1908, 0.4026, 0.2205, 0.4176]}, {"w": "3)", "b": [0.2266, 0.4026, 0.243, 0.4176]}, {"w": "feature", "b": [0.2492, 0.4026, 0.3052, 0.4176]}, {"w": "coming", "b": [0.3113, 0.4026, 0.3687, 0.4176]}, {"w": "from", "b": [0.3749, 0.4026, 0.4123, 0.4176]}, {"w": "the", "b": [0.4185, 0.4026, 0.4441, 0.4176]}, {"w": "future.", "b": [0.4503, 0.4026, 0.5042, 0.4176]}]}, {"id": "b_29", "type": "paragraph", "text": "3.5.1 Target is a Function of a Feature", "words": [{"w": "3.5.1", "b": [0.1312, 0.4505, 0.1749, 0.4654]}, {"w": "Target", "b": [0.1961, 0.4505, 0.2567, 0.4654]}, {"w": "is", "b": [0.2638, 0.4505, 0.2781, 0.4654]}, {"w": "a", "b": [0.2851, 0.4505, 0.2955, 0.4654]}, {"w": "Function", "b": [0.3025, 0.4505, 0.3837, 0.4654]}, {"w": "of", "b": [0.3907, 0.4505, 0.4078, 0.4654]}, {"w": "a", "b": [0.4149, 0.4505, 0.4252, 0.4654]}, {"w": "Feature", "b": [0.4323, 0.4505, 0.5024, 0.4654]}]}, {"id": "b_30", "type": "paragraph", "text": "Gross Domestic Product (GDP) is defined as the monetary measure of all finished goods and services in a country within a specific period. Let our goal be to predict a country’s GDP based on various attributes: area, population, geographic region, and so on. An example of such data is shown in Figure 9. If you don’t do a careful analysis of each attribute and its relation to GDP, you might let a leakage happen: in the data in Figure 9, two columns, Population and GDP per capita, multiplied, equal GDP. The model you will train will perfectly predict GDP by looking at these two columns only. The fact that you let GDP be one of the features, though in a slightly modified form (devised by the population), constitutes contamination and, therefore, leads to data leakage.", "words": [{"w": "Gross", "b": [0.1312, 0.4871, 0.1758, 0.502]}, {"w": "Domestic", "b": [0.1818, 0.4871, 0.255, 0.502]}, {"w": "Product", "b": [0.261, 0.4871, 0.3251, 0.502]}, {"w": "(GDP)", "b": [0.3311, 0.4871, 0.3855, 0.502]}, {"w": "is", "b": [0.3915, 0.4871, 0.4037, 0.502]}, {"w": "defined", "b": [0.4097, 0.4871, 0.466, 0.502]}, {"w": "as", "b": [0.472, 0.4871, 0.4881, 0.502]}, {"w": "the", "b": [0.4941, 0.4871, 0.5193, 0.502]}, {"w": "monetary", "b": [0.5252, 0.4871, 0.6001, 0.502]}, {"w": "measure", "b": [0.6061, 0.4871, 0.6706, 0.502]}, {"w": "of", "b": [0.6766, 0.4871, 0.6912, 0.502]}, {"w": "all", "b": [0.6972, 0.4871, 0.7163, 0.502]}, {"w": "finished", "b": [0.7222, 0.4871, 0.7827, 0.502]}, {"w": "goods", "b": [0.7887, 0.4871, 0.834, 0.502]}, {"w": "and", "b": [0.84, 0.4871, 0.8691, 0.502]}, {"w": "services", "b": [0.1312, 0.5049, 0.1938, 0.52]}, {"w": "in", "b": [0.1999, 0.5049, 0.2156, 0.52]}, {"w": "a", "b": [0.2217, 0.5049, 0.2311, 0.52]}, {"w": "country", "b": [0.2373, 0.5049, 0.3001, 0.52]}, {"w": "within", "b": [0.3062, 0.5049, 0.3585, 0.52]}, {"w": "a", "b": [0.3647, 0.5049, 0.3741, 0.52]}, {"w": "specific", "b": [0.3802, 0.5049, 0.4394, 0.52]}, {"w": "period.", "b": [0.4456, 0.5049, 0.5031, 0.52]}, {"w": "Let", "b": [0.5113, 0.5049, 0.5388, 0.52]}, {"w": "our", "b": [0.5449, 0.5049, 0.5722, 0.52]}, {"w": "goal", "b": [0.5783, 0.5049, 0.6118, 0.52]}, {"w": "be", "b": [0.6179, 0.5049, 0.6373, 0.52]}, {"w": "to", "b": [0.6434, 0.5049, 0.6601, 0.52]}, {"w": "predict", "b": [0.6663, 0.5049, 0.7239, 0.52]}, {"w": "a", "b": [0.73, 0.5049, 0.7394, 0.52]}, {"w": "country’s", "b": [0.7456, 0.5049, 0.821, 0.52]}, {"w": "GDP", "b": [0.8272, 0.5049, 0.8692, 0.52]}, {"w": "based", "b": [0.1312, 0.5228, 0.1774, 0.5379]}, {"w": "on", "b": [0.1841, 0.5228, 0.2039, 0.5379]}, {"w": "various", "b": [0.2106, 0.5228, 0.2689, 0.5379]}, {"w": "attributes:", "b": [0.2756, 0.5228, 0.3615, 0.5379]}, {"w": "area,", "b": [0.3708, 0.5228, 0.4106, 0.5379]}, {"w": "population,", "b": [0.4175, 0.5228, 0.5111, 0.5379]}, {"w": "geographic", "b": [0.5179, 0.5228, 0.6058, 0.5379]}, {"w": "region,", "b": [0.6125, 0.5228, 0.668, 0.5379]}, {"w": "and", "b": [0.6748, 0.5228, 0.7052, 0.5379]}, {"w": "so", "b": [0.7119, 0.5228, 0.7287, 0.5379]}, {"w": "on.", "b": [0.7354, 0.5228, 0.7605, 0.5379]}, {"w": "An", "b": [0.7704, 0.5228, 0.7949, 0.5379]}, {"w": "example", "b": [0.8016, 0.5228, 0.8691, 0.5379]}, {"w": "of", "b": [0.1312, 0.5408, 0.1464, 0.5559]}, {"w": "such", "b": [0.1526, 0.5408, 0.1889, 0.5559]}, {"w": "data", "b": [0.1951, 0.5408, 0.2317, 0.5559]}, {"w": "is", "b": [0.2379, 0.5408, 0.2506, 0.5559]}, {"w": "shown", "b": [0.2568, 0.5408, 0.3077, 0.5559]}, {"w": "in", "b": [0.3139, 0.5408, 0.3296, 0.5559]}, {"w": "Figure", "b": [0.3358, 0.5408, 0.389, 0.5559]}, {"w": "9.", "b": [0.3952, 0.5408, 0.4099, 0.5559]}, {"w": "If", "b": [0.4183, 0.5408, 0.4309, 0.5559]}, {"w": "you", "b": [0.4371, 0.5408, 0.4664, 0.5559]}, {"w": "don’t", "b": [0.4726, 0.5408, 0.5155, 0.5559]}, {"w": "do", "b": [0.5218, 0.5408, 0.5416, 0.5559]}, {"w": "a", "b": [0.5479, 0.5408, 0.5573, 0.5559]}, {"w": "careful", "b": [0.5635, 0.5408, 0.6185, 0.5559]}, {"w": "analysis", "b": [0.6247, 0.5408, 0.6893, 0.5559]}, {"w": "of", "b": [0.6955, 0.5408, 0.7107, 0.5559]}, {"w": "each", "b": [0.7169, 0.5408, 0.753, 0.5559]}, {"w": "attribute", "b": [0.7593, 0.5408, 0.8325, 0.5559]}, {"w": "and", "b": [0.8388, 0.5408, 0.8691, 0.5559]}, {"w": "its", "b": [0.1312, 0.5588, 0.151, 0.5738]}, {"w": "relation", "b": [0.1571, 0.5588, 0.2192, 0.5738]}, {"w": "to", "b": [0.2254, 0.5588, 0.2419, 0.5738]}, {"w": "GDP,", "b": [0.248, 0.5588, 0.2931, 0.5738]}, {"w": "you", "b": [0.2993, 0.5588, 0.3282, 0.5738]}, {"w": "might", "b": [0.3344, 0.5588, 0.3814, 0.5738]}, {"w": "let", "b": [0.3875, 0.5588, 0.4082, 0.5738]}, {"w": "a", "b": [0.4144, 0.5588, 0.4237, 0.5738]}, {"w": "leakage", "b": [0.4298, 0.5588, 0.4892, 0.5738]}, {"w": "happen:", "b": [0.4954, 0.5588, 0.56, 0.5738]}, {"w": "in", "b": [0.5682, 0.5588, 0.5837, 0.5738]}, {"w": "the", "b": [0.5899, 0.5588, 0.6157, 0.5738]}, {"w": "data", "b": [0.6219, 0.5588, 0.658, 0.5738]}, {"w": "in", "b": [0.6642, 0.5588, 0.6797, 0.5738]}, {"w": "Figure", "b": [0.6858, 0.5588, 0.7383, 0.5738]}, {"w": "9,", "b": [0.7445, 0.5588, 0.759, 0.5738]}, {"w": "two", "b": [0.7651, 0.5588, 0.794, 0.5738]}, {"w": "columns,", "b": [0.8002, 0.5588, 0.8716, 0.5738]}, {"w": "Population", "b": [0.1312, 0.5766, 0.2209, 0.5918]}, {"w": "and", "b": [0.2291, 0.5766, 0.2594, 0.5918]}, {"w": "GDP", "b": [0.2675, 0.5766, 0.3095, 0.5918]}, {"w": "per", "b": [0.3176, 0.5766, 0.3443, 0.5918]}, {"w": "capita,", "b": [0.3524, 0.5766, 0.4078, 0.5918]}, {"w": "multiplied,", "b": [0.4164, 0.5766, 0.5049, 0.5918]}, {"w": "equal", "b": [0.5135, 0.5766, 0.5569, 0.5918]}, {"w": "GDP.", "b": [0.565, 0.5766, 0.6106, 0.5918]}, {"w": "The", "b": [0.6187, 0.5766, 0.6512, 0.5918]}, {"w": "model", "b": [0.6593, 0.5766, 0.7089, 0.5918]}, {"w": "you", "b": [0.7171, 0.5766, 0.7463, 0.5918]}, {"w": "will", "b": [0.7545, 0.5766, 0.7837, 0.5918]}, {"w": "train", "b": [0.7918, 0.5766, 0.8316, 0.5918]}, {"w": "will", "b": [0.8398, 0.5766, 0.869, 0.5918]}, {"w": "perfectly", "b": [0.1312, 0.5947, 0.2011, 0.6097]}, {"w": "predict", "b": [0.2073, 0.5947, 0.2634, 0.6097]}, {"w": "GDP", "b": [0.2696, 0.5947, 0.3105, 0.6097]}, {"w": "by", "b": [0.3167, 0.5947, 0.336, 0.6097]}, {"w": "looking", "b": [0.3422, 0.5947, 0.4003, 0.6097]}, {"w": "at", "b": [0.4064, 0.5947, 0.4227, 0.6097]}, {"w": "these", "b": [0.4289, 0.5947, 0.4698, 0.6097]}, {"w": "two", "b": [0.476, 0.5947, 0.5045, 0.6097]}, {"w": "columns", "b": [0.5107, 0.5947, 0.576, 0.6097]}, {"w": "only.", "b": [0.5822, 0.5947, 0.6199, 0.6097]}, {"w": "The", "b": [0.6281, 0.5947, 0.6597, 0.6097]}, {"w": "fact", "b": [0.6659, 0.5947, 0.696, 0.6097]}, {"w": "that", "b": [0.7021, 0.5947, 0.7357, 0.6097]}, {"w": "you", "b": [0.7419, 0.5947, 0.7704, 0.6097]}, {"w": "let", "b": [0.7766, 0.5947, 0.797, 0.6097]}, {"w": "GDP", "b": [0.8032, 0.5947, 0.8441, 0.6097]}, {"w": "be", "b": [0.8502, 0.5947, 0.8691, 0.6097]}, {"w": "one", "b": [0.1312, 0.6128, 0.1584, 0.6276]}, {"w": "of", "b": [0.1634, 0.6128, 0.178, 0.6276]}, {"w": "the", "b": [0.183, 0.6128, 0.2081, 0.6276]}, {"w": "features,", "b": [0.2132, 0.6128, 0.2802, 0.6276]}, {"w": "though", "b": [0.2854, 0.6128, 0.3407, 0.6276]}, {"w": "in", "b": [0.3458, 0.6128, 0.3608, 0.6276]}, {"w": "a", "b": [0.3659, 0.6128, 0.3749, 0.6276]}, {"w": "slightly", "b": [0.3799, 0.6128, 0.4373, 0.6276]}, {"w": "modified", "b": [0.4424, 0.6128, 0.5102, 0.6276]}, {"w": "form", "b": [0.5152, 0.6128, 0.552, 0.6276]}, {"w": "(devised", "b": [0.557, 0.6128, 0.6219, 0.6276]}, {"w": "by", "b": [0.627, 0.6128, 0.6461, 0.6276]}, {"w": "the", "b": [0.6511, 0.6128, 0.6762, 0.6276]}, {"w": "population),", "b": [0.6813, 0.6128, 0.7783, 0.6276]}, {"w": "constitutes", "b": [0.7835, 0.6128, 0.8691, 0.6276]}, {"w": "contamination", "b": [0.1312, 0.6306, 0.2466, 0.6456]}, {"w": "and,", "b": [0.2527, 0.6306, 0.2876, 0.6456]}, {"w": "therefore,", "b": [0.2938, 0.6306, 0.3703, 0.6456]}, {"w": "leads", "b": [0.3764, 0.6306, 0.4165, 0.6456]}, {"w": "to", "b": [0.4227, 0.6306, 0.4391, 0.6456]}, {"w": "data", "b": [0.4452, 0.6306, 0.4811, 0.6456]}, {"w": "leakage.", "b": [0.4872, 0.6306, 0.5513, 0.6456]}]}, {"id": "b_31", "type": "paragraph", "text": "A simpler example is when you have a copy of the target among features, just put in a different format. Imagine you train a model to predict the yearly salary, given the attributes of an employee. The training data is a table that contains both monthly and yearly salary, among many other attributes. If you forget to remove the monthly salary from the list of features, that attribute alone will perfectly predict the yearly salary, making you believe your model is perfect. Once the model is put in production, it will likely stop receiving information about a person’s monthly salary: otherwise, the modeling would not be needed.", "words": [{"w": "A", "b": [0.1305, 0.6574, 0.1446, 0.6725]}, {"w": "simpler", "b": [0.1522, 0.6574, 0.212, 0.6725]}, {"w": "example", "b": [0.2196, 0.6574, 0.287, 0.6725]}, {"w": "is", "b": [0.2946, 0.6574, 0.3073, 0.6725]}, {"w": "when", "b": [0.3149, 0.6574, 0.3577, 0.6725]}, {"w": "you", "b": [0.3653, 0.6574, 0.3946, 0.6725]}, {"w": "have", "b": [0.4022, 0.6574, 0.4393, 0.6725]}, {"w": "a", "b": [0.4469, 0.6574, 0.4563, 0.6725]}, {"w": "copy", "b": [0.4639, 0.6574, 0.5016, 0.6725]}, {"w": "of", "b": [0.5092, 0.6574, 0.5243, 0.6725]}, {"w": "the", "b": [0.5319, 0.6574, 0.558, 0.6725]}, {"w": "target", "b": [0.5656, 0.6574, 0.6148, 0.6725]}, {"w": "among", "b": [0.6224, 0.6574, 0.6768, 0.6725]}, {"w": "features,", "b": [0.6844, 0.6574, 0.7541, 0.6725]}, {"w": "just", "b": [0.762, 0.6574, 0.793, 0.6725]}, {"w": "put", "b": [0.8006, 0.6574, 0.8288, 0.6725]}, {"w": "in", "b": [0.8364, 0.6574, 0.8521, 0.6725]}, {"w": "a", "b": [0.8597, 0.6574, 0.8691, 0.6725]}, {"w": "different", "b": [0.1312, 0.6756, 0.1968, 0.6904]}, {"w": "format.", "b": [0.203, 0.6756, 0.261, 0.6904]}, {"w": "Imagine", "b": [0.2692, 0.6756, 0.3321, 0.6904]}, {"w": "you", "b": [0.3383, 0.6756, 0.3665, 0.6904]}, {"w": "train", "b": [0.3727, 0.6756, 0.411, 0.6904]}, {"w": "a", "b": [0.4172, 0.6756, 0.4262, 0.6904]}, {"w": "model", "b": [0.4324, 0.6756, 0.4803, 0.6904]}, {"w": "to", "b": [0.4864, 0.6756, 0.5025, 0.6904]}, {"w": "predict", "b": [0.5087, 0.6756, 0.5642, 0.6904]}, {"w": "the", "b": [0.5704, 0.6756, 0.5956, 0.6904]}, {"w": "yearly", "b": [0.6017, 0.6756, 0.6496, 0.6904]}, {"w": "salary,", "b": [0.6558, 0.6756, 0.7063, 0.6904]}, {"w": "given", "b": [0.7125, 0.6756, 0.7538, 0.6904]}, {"w": "the", "b": [0.7599, 0.6756, 0.7851, 0.6904]}, {"w": "attributes", "b": [0.7913, 0.6756, 0.8691, 0.6904]}, {"w": "of", "b": [0.1312, 0.6934, 0.1463, 0.7084]}, {"w": "an", "b": [0.1524, 0.6934, 0.1721, 0.7084]}, {"w": "employee.", "b": [0.1782, 0.6934, 0.2575, 0.7084]}, {"w": "The", "b": [0.2656, 0.6934, 0.2977, 0.7084]}, {"w": "training", "b": [0.3039, 0.6934, 0.3682, 0.7084]}, {"w": "data", "b": [0.3743, 0.6934, 0.4105, 0.7084]}, {"w": "is", "b": [0.4167, 0.6934, 0.4292, 0.7084]}, {"w": "a", "b": [0.4354, 0.6934, 0.4447, 0.7084]}, {"w": "table", "b": [0.4508, 0.6934, 0.4912, 0.7084]}, {"w": "that", "b": [0.4973, 0.6934, 0.5315, 0.7084]}, {"w": "contains", "b": [0.5377, 0.6934, 0.6046, 0.7084]}, {"w": "both", "b": [0.6107, 0.6934, 0.6485, 0.7084]}, {"w": "monthly", "b": [0.6547, 0.6934, 0.722, 0.7084]}, {"w": "and", "b": [0.7281, 0.6934, 0.7581, 0.7084]}, {"w": "yearly", "b": [0.7643, 0.6934, 0.8135, 0.7084]}, {"w": "salary,", "b": [0.8197, 0.6934, 0.8716, 0.7084]}, {"w": "among", "b": [0.1312, 0.7112, 0.1856, 0.7264]}, {"w": "many", "b": [0.1919, 0.7112, 0.2369, 0.7264]}, {"w": "other", "b": [0.2433, 0.7112, 0.2862, 0.7264]}, {"w": "attributes.", "b": [0.2925, 0.7112, 0.3785, 0.7264]}, {"w": "If", "b": [0.3873, 0.7112, 0.3998, 0.7264]}, {"w": "you", "b": [0.4061, 0.7112, 0.4354, 0.7264]}, {"w": "forget", "b": [0.4418, 0.7112, 0.4894, 0.7264]}, {"w": "to", "b": [0.4958, 0.7112, 0.5125, 0.7264]}, {"w": "remove", "b": [0.5188, 0.7112, 0.5769, 0.7264]}, {"w": "the", "b": [0.5833, 0.7112, 0.6094, 0.7264]}, {"w": "monthly", "b": [0.6158, 0.7112, 0.6838, 0.7264]}, {"w": "salary", "b": [0.6901, 0.7112, 0.7389, 0.7264]}, {"w": "from", "b": [0.7453, 0.7112, 0.7835, 0.7264]}, {"w": "the", "b": [0.7898, 0.7112, 0.816, 0.7264]}, {"w": "list", "b": [0.8223, 0.7112, 0.8475, 0.7264]}, {"w": "of", "b": [0.8539, 0.7112, 0.869, 0.7264]}, {"w": "features,", "b": [0.1312, 0.7294, 0.1982, 0.7442]}, {"w": "that", "b": [0.2041, 0.7294, 0.2373, 0.7442]}, {"w": "attribute", "b": [0.2431, 0.7294, 0.3135, 0.7442]}, {"w": "alone", "b": [0.3194, 0.7294, 0.3606, 0.7442]}, {"w": "will", "b": [0.3664, 0.7294, 0.3945, 0.7442]}, {"w": "perfectly", "b": [0.4004, 0.7294, 0.4693, 0.7442]}, {"w": "predict", "b": [0.4751, 0.7294, 0.5304, 0.7442]}, {"w": "the", "b": [0.5363, 0.7294, 0.5614, 0.7442]}, {"w": "yearly", "b": [0.5673, 0.7294, 0.615, 0.7442]}, {"w": "salary,", "b": [0.6209, 0.7294, 0.6712, 0.7442]}, {"w": "making", "b": [0.6771, 0.7294, 0.7349, 0.7442]}, {"w": "you", "b": [0.7407, 0.7294, 0.7689, 0.7442]}, {"w": "believe", "b": [0.7747, 0.7294, 0.8285, 0.7442]}, {"w": "your", "b": [0.8343, 0.7294, 0.8695, 0.7442]}, {"w": "model", "b": [0.1312, 0.7474, 0.179, 0.7622]}, {"w": "is", "b": [0.1843, 0.7474, 0.1965, 0.7622]}, {"w": "perfect.", "b": [0.2019, 0.7474, 0.2612, 0.7622]}, {"w": "Once", "b": [0.2692, 0.7474, 0.3094, 0.7622]}, {"w": "the", "b": [0.3147, 0.7474, 0.3399, 0.7622]}, {"w": "model", "b": [0.3452, 0.7474, 0.3929, 0.7622]}, {"w": "is", "b": [0.3983, 0.7474, 0.4105, 0.7622]}, {"w": "put", "b": [0.4158, 0.7474, 0.443, 0.7622]}, {"w": "in", "b": [0.4483, 0.7474, 0.4634, 0.7622]}, {"w": "production,", "b": [0.4688, 0.7474, 0.5598, 0.7622]}, {"w": "it", "b": [0.5653, 0.7474, 0.5773, 0.7622]}, {"w": "will", "b": [0.5827, 0.7474, 0.6108, 0.7622]}, {"w": "likely", "b": [0.6162, 0.7474, 0.6579, 0.7622]}, {"w": "stop", "b": [0.6633, 0.7474, 0.6965, 0.7622]}, {"w": "receiving", "b": [0.7019, 0.7474, 0.7718, 0.7622]}, {"w": "information", "b": [0.7772, 0.7474, 0.8691, 0.7622]}, {"w": "about", "b": [0.1312, 0.7652, 0.1779, 0.7802]}, {"w": "a", "b": [0.184, 0.7652, 0.1933, 0.7802]}, {"w": "person’s", "b": [0.1994, 0.7652, 0.2648, 0.7802]}, {"w": "monthly", "b": [0.2709, 0.7652, 0.3376, 0.7802]}, {"w": "salary:", "b": [0.3438, 0.7652, 0.3967, 0.7802]}, {"w": "otherwise,", "b": [0.4049, 0.7652, 0.4861, 0.7802]}, {"w": "the", "b": [0.4922, 0.7652, 0.5179, 0.7802]}, {"w": "modeling", "b": [0.524, 0.7652, 0.5973, 0.7802]}, {"w": "would", "b": [0.6035, 0.7652, 0.6512, 0.7802]}, {"w": "not", "b": [0.6573, 0.7652, 0.684, 0.7802]}, {"w": "be", "b": [0.6901, 0.7652, 0.7091, 0.7802]}, {"w": "needed.", "b": [0.7152, 0.7652, 0.7758, 0.7802]}]}, {"id": "b_32", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 24", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "24", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 68, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Group Customer ID Yearly Pageviews", "words": [{"w": "Group", "b": [0.3219, 0.0975, 0.3652, 0.1101]}, {"w": "Customer", "b": [0.196, 0.0975, 0.2635, 0.1101]}, {"w": "ID", "b": [0.2679, 0.0975, 0.2834, 0.1101]}, {"w": "Yearly", "b": [0.5312, 0.0901, 0.5739, 0.1027]}, {"w": "Pageviews", "b": [0.5149, 0.1048, 0.5902, 0.1175]}]}, {"id": "b_3", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.2345, 0.1922, 0.2475, 0.2048]}]}, {"id": "b_4", "type": "paragraph", "text": "18879", "words": [{"w": "18879", "b": [0.2181, 0.2237, 0.2614, 0.2364]}]}, {"id": "b_5", "type": "equation", "text": "F25-35", "words": [{"w": "F25-35", "b": [0.3202, 0.1606, 0.3696, 0.1732]}]}, {"id": "b_6", "type": "equation", "text": "M18-25 11,987", "words": [{"w": "M18-25", "b": [0.3185, 0.129, 0.3713, 0.1417]}, {"w": "11,987", "b": [0.528, 0.129, 0.5745, 0.1417]}]}, {"id": "b_7", "type": "paragraph", "text": "8,543", "words": [{"w": "8,543", "b": [0.5331, 0.1606, 0.572, 0.1732]}]}, {"id": "b_8", "type": "paragraph", "text": "... ...", "words": [{"w": "...", "b": [0.3384, 0.1922, 0.3514, 0.2048]}, {"w": "...", "b": [0.546, 0.1922, 0.559, 0.2048]}]}, {"id": "b_9", "type": "equation", "text": "F65+ 6,775", "words": [{"w": "F65+", "b": [0.3256, 0.2237, 0.3616, 0.2364]}, {"w": "6,775", "b": [0.5331, 0.2237, 0.572, 0.2364]}]}, {"id": "b_10", "type": "paragraph", "text": "Yearly Spendings", "words": [{"w": "Yearly", "b": [0.4261, 0.0901, 0.4688, 0.1027]}, {"w": "Spendings", "b": [0.4106, 0.1048, 0.4842, 0.1175]}]}, {"id": "b_11", "type": "paragraph", "text": "1350", "words": [{"w": "1350", "b": [0.4314, 0.129, 0.466, 0.1417]}]}, {"id": "b_12", "type": "paragraph", "text": "2365", "words": [{"w": "2365", "b": [0.4314, 0.1606, 0.466, 0.1732]}]}, {"id": "b_13", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.4422, 0.1922, 0.4552, 0.2048]}]}, {"id": "b_14", "type": "paragraph", "text": "3653", "words": [{"w": "3653", "b": [0.4314, 0.2237, 0.466, 0.2364]}]}, {"id": "b_15", "type": "paragraph", "text": "Gender", "words": [{"w": "Gender", "b": [0.7342, 0.0975, 0.7862, 0.1101]}]}, {"id": "b_18", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.7537, 0.1922, 0.7667, 0.2048]}]}, {"id": "b_20", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6499, 0.0975, 0.6629, 0.1101]}]}, {"id": "b_21", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6499, 0.129, 0.6629, 0.1417]}]}, {"id": "b_22", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6499, 0.1606, 0.6629, 0.1732]}]}, {"id": "b_23", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6499, 0.1922, 0.6629, 0.2048]}]}, {"id": "b_24", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6499, 0.2237, 0.6629, 0.2364]}]}, {"id": "b_25", "type": "paragraph", "text": "Figure 10: An example of the target being hidden in one of the features.", "words": [{"w": "Figure", "b": [0.2069, 0.2619, 0.259, 0.2769]}, {"w": "10:", "b": [0.2651, 0.2619, 0.2887, 0.2769]}, {"w": "An", "b": [0.2969, 0.2619, 0.321, 0.2769]}, {"w": "example", "b": [0.3271, 0.2619, 0.3933, 0.2769]}, {"w": "of", "b": [0.3994, 0.2619, 0.4143, 0.2769]}, {"w": "the", "b": [0.4204, 0.2619, 0.4461, 0.2769]}, {"w": "target", "b": [0.4522, 0.2619, 0.5005, 0.2769]}, {"w": "being", "b": [0.5066, 0.2619, 0.5502, 0.2769]}, {"w": "hidden", "b": [0.5564, 0.2619, 0.6107, 0.2769]}, {"w": "in", "b": [0.6169, 0.2619, 0.6323, 0.2769]}, {"w": "one", "b": [0.6384, 0.2619, 0.6661, 0.2769]}, {"w": "of", "b": [0.6722, 0.2619, 0.6871, 0.2769]}, {"w": "the", "b": [0.6933, 0.2619, 0.7189, 0.2769]}, {"w": "features.", "b": [0.7251, 0.2619, 0.7934, 0.2769]}]}, {"id": "b_26", "type": "paragraph", "text": "3.5.2 Feature Hides the Target", "words": [{"w": "3.5.2", "b": [0.1312, 0.3122, 0.1749, 0.3271]}, {"w": "Feature", "b": [0.1961, 0.3122, 0.2662, 0.3271]}, {"w": "Hides", "b": [0.2733, 0.3122, 0.3257, 0.3271]}, {"w": "the", "b": [0.3328, 0.3122, 0.3625, 0.3271]}, {"w": "Target", "b": [0.3696, 0.3122, 0.4302, 0.3271]}]}, {"id": "b_27", "type": "paragraph", "text": "Sometimes the target is not a function of one or more features, but rather is “hidden” in one of the features. Consider the dataset in Figure 10.", "words": [{"w": "Sometimes", "b": [0.1312, 0.3489, 0.2157, 0.3637]}, {"w": "the", "b": [0.2219, 0.3489, 0.247, 0.3637]}, {"w": "target", "b": [0.2532, 0.3489, 0.3004, 0.3637]}, {"w": "is", "b": [0.3066, 0.3489, 0.3188, 0.3637]}, {"w": "not", "b": [0.3249, 0.3489, 0.351, 0.3637]}, {"w": "a", "b": [0.3572, 0.3489, 0.3662, 0.3637]}, {"w": "function", "b": [0.3724, 0.3489, 0.4372, 0.3637]}, {"w": "of", "b": [0.4434, 0.3489, 0.4579, 0.3637]}, {"w": "one", "b": [0.4641, 0.3489, 0.4912, 0.3637]}, {"w": "or", "b": [0.4974, 0.3489, 0.5135, 0.3637]}, {"w": "more", "b": [0.5196, 0.3489, 0.5589, 0.3637]}, {"w": "features,", "b": [0.565, 0.3489, 0.632, 0.3637]}, {"w": "but", "b": [0.6382, 0.3489, 0.6653, 0.3637]}, {"w": "rather", "b": [0.6715, 0.3489, 0.7198, 0.3637]}, {"w": "is", "b": [0.7259, 0.3489, 0.7381, 0.3637]}, {"w": "“hidden”", "b": [0.7443, 0.3489, 0.8146, 0.3637]}, {"w": "in", "b": [0.8207, 0.3489, 0.8358, 0.3637]}, {"w": "one", "b": [0.842, 0.3489, 0.8691, 0.3637]}, {"w": "of", "b": [0.1312, 0.3667, 0.1461, 0.3817]}, {"w": "the", "b": [0.1522, 0.3667, 0.1779, 0.3817]}, {"w": "features.", "b": [0.1841, 0.3667, 0.2524, 0.3817]}, {"w": "Consider", "b": [0.2606, 0.3667, 0.3315, 0.3817]}, {"w": "the", "b": [0.3377, 0.3667, 0.3633, 0.3817]}, {"w": "dataset", "b": [0.3695, 0.3667, 0.428, 0.3817]}, {"w": "in", "b": [0.4342, 0.3667, 0.4496, 0.3817]}, {"w": "Figure", "b": [0.4557, 0.3667, 0.5078, 0.3817]}, {"w": "10.", "b": [0.5201, 0.3667, 0.5437, 0.3817]}]}, {"id": "b_28", "type": "paragraph", "text": "In this scenario, you use customer data to predict their gender. Look at the column Group. If you closely investigate the data in the column Group, you will see that it represents a demographic value to which each existing customer was related in the past. If the data about a customer’s gender and age is factual (as opposed to being guessed by another model that might be available in production), then the column Group constitutes a form of data leakage, when the value you want to predict is “hidden” in the value of a feature.", "words": [{"w": "In", "b": [0.1312, 0.3936, 0.1482, 0.4086]}, {"w": "this", "b": [0.1543, 0.3936, 0.1842, 0.4086]}, {"w": "scenario,", "b": [0.1903, 0.3936, 0.2603, 0.4086]}, {"w": "you", "b": [0.2664, 0.3936, 0.2952, 0.4086]}, {"w": "use", "b": [0.3013, 0.3936, 0.3271, 0.4086]}, {"w": "customer", "b": [0.3332, 0.3936, 0.4063, 0.4086]}, {"w": "data", "b": [0.4124, 0.3936, 0.4483, 0.4086]}, {"w": "to", "b": [0.4545, 0.3936, 0.4709, 0.4086]}, {"w": "predict", "b": [0.477, 0.3936, 0.5336, 0.4086]}, {"w": "their", "b": [0.5397, 0.3936, 0.5777, 0.4086]}, {"w": "gender.", "b": [0.5839, 0.3936, 0.6424, 0.4086]}, {"w": "Look", "b": [0.6506, 0.3936, 0.6909, 0.4086]}, {"w": "at", "b": [0.697, 0.3936, 0.7135, 0.4086]}, {"w": "the", "b": [0.7196, 0.3936, 0.7453, 0.4086]}, {"w": "column", "b": [0.7514, 0.3936, 0.8099, 0.4086]}, {"w": "Group.", "b": [0.8161, 0.3936, 0.8727, 0.4086]}, {"w": "If", "b": [0.1312, 0.4115, 0.1438, 0.4266]}, {"w": "you", "b": [0.1507, 0.4115, 0.18, 0.4266]}, {"w": "closely", "b": [0.1869, 0.4115, 0.2409, 0.4266]}, {"w": "investigate", "b": [0.2478, 0.4115, 0.3353, 0.4266]}, {"w": "the", "b": [0.3422, 0.4115, 0.3684, 0.4266]}, {"w": "data", "b": [0.3753, 0.4115, 0.4119, 0.4266]}, {"w": "in", "b": [0.4188, 0.4115, 0.4345, 0.4266]}, {"w": "the", "b": [0.4415, 0.4115, 0.4676, 0.4266]}, {"w": "column", "b": [0.4745, 0.4115, 0.5341, 0.4266]}, {"w": "Group,", "b": [0.5411, 0.4115, 0.5988, 0.4266]}, {"w": "you", "b": [0.6059, 0.4115, 0.6352, 0.4266]}, {"w": "will", "b": [0.6421, 0.4115, 0.6714, 0.4266]}, {"w": "see", "b": [0.6783, 0.4115, 0.7025, 0.4266]}, {"w": "that", "b": [0.7094, 0.4115, 0.7439, 0.4266]}, {"w": "it", "b": [0.7508, 0.4115, 0.7634, 0.4266]}, {"w": "represents", "b": [0.7703, 0.4115, 0.8528, 0.4266]}, {"w": "a", "b": [0.8597, 0.4115, 0.8691, 0.4266]}, {"w": "demographic", "b": [0.1312, 0.4296, 0.2318, 0.4444]}, {"w": "value", "b": [0.2375, 0.4296, 0.2782, 0.4444]}, {"w": "to", "b": [0.284, 0.4296, 0.3, 0.4444]}, {"w": "which", "b": [0.3058, 0.4296, 0.3515, 0.4444]}, {"w": "each", "b": [0.3573, 0.4296, 0.3919, 0.4444]}, {"w": "existing", "b": [0.3977, 0.4296, 0.4586, 0.4444]}, {"w": "customer", "b": [0.4643, 0.4296, 0.5359, 0.4444]}, {"w": "was", "b": [0.5416, 0.4296, 0.5703, 0.4444]}, {"w": "related", "b": [0.5761, 0.4296, 0.6304, 0.4444]}, {"w": "in", "b": [0.6362, 0.4296, 0.6513, 0.4444]}, {"w": "the", "b": [0.657, 0.4296, 0.6821, 0.4444]}, {"w": "past.", "b": [0.6879, 0.4296, 0.7262, 0.4444]}, {"w": "If", "b": [0.7342, 0.4296, 0.7463, 0.4444]}, {"w": "the", "b": [0.7521, 0.4296, 0.7772, 0.4444]}, {"w": "data", "b": [0.783, 0.4296, 0.8181, 0.4444]}, {"w": "about", "b": [0.8239, 0.4296, 0.8696, 0.4444]}, {"w": "a", "b": [0.1312, 0.4475, 0.1405, 0.4624]}, {"w": "customer’s", "b": [0.1466, 0.4475, 0.2322, 0.4624]}, {"w": "gender", "b": [0.2383, 0.4475, 0.2918, 0.4624]}, {"w": "and", "b": [0.298, 0.4475, 0.3278, 0.4624]}, {"w": "age", "b": [0.3339, 0.4475, 0.3606, 0.4624]}, {"w": "is", "b": [0.3668, 0.4475, 0.3792, 0.4624]}, {"w": "factual", "b": [0.3853, 0.4475, 0.4403, 0.4624]}, {"w": "(as", "b": [0.4465, 0.4475, 0.4702, 0.4624]}, {"w": "opposed", "b": [0.4764, 0.4475, 0.5417, 0.4624]}, {"w": "to", "b": [0.5479, 0.4475, 0.5643, 0.4624]}, {"w": "being", "b": [0.5704, 0.4475, 0.6141, 0.4624]}, {"w": "guessed", "b": [0.6202, 0.4475, 0.6811, 0.4624]}, {"w": "by", "b": [0.6873, 0.4475, 0.7068, 0.4624]}, {"w": "another", "b": [0.7129, 0.4475, 0.7746, 0.4624]}, {"w": "model", "b": [0.7808, 0.4475, 0.8296, 0.4624]}, {"w": "that", "b": [0.8357, 0.4475, 0.8696, 0.4624]}, {"w": "might", "b": [0.1312, 0.4655, 0.1769, 0.4803]}, {"w": "be", "b": [0.1828, 0.4655, 0.2015, 0.4803]}, {"w": "available", "b": [0.2074, 0.4655, 0.2757, 0.4803]}, {"w": "in", "b": [0.2816, 0.4655, 0.2966, 0.4803]}, {"w": "production),", "b": [0.3025, 0.4655, 0.4006, 0.4803]}, {"w": "then", "b": [0.4065, 0.4655, 0.4417, 0.4803]}, {"w": "the", "b": [0.4476, 0.4655, 0.4728, 0.4803]}, {"w": "column", "b": [0.4787, 0.4655, 0.5359, 0.4803]}, {"w": "Group", "b": [0.5419, 0.4655, 0.5923, 0.4803]}, {"w": "constitutes", "b": [0.5982, 0.4655, 0.6838, 0.4803]}, {"w": "a", "b": [0.6897, 0.4655, 0.6988, 0.4803]}, {"w": "form", "b": [0.7047, 0.4655, 0.7414, 0.4803]}, {"w": "of", "b": [0.7473, 0.4655, 0.7619, 0.4803]}, {"w": "data", "b": [0.7678, 0.4655, 0.8029, 0.4803]}, {"w": "leakage,", "b": [0.8088, 0.4655, 0.8717, 0.4803]}, {"w": "when", "b": [0.1306, 0.4834, 0.1726, 0.4983]}, {"w": "the", "b": [0.1788, 0.4834, 0.2044, 0.4983]}, {"w": "value", "b": [0.2105, 0.4834, 0.2521, 0.4983]}, {"w": "you", "b": [0.2582, 0.4834, 0.2869, 0.4983]}, {"w": "want", "b": [0.2931, 0.4834, 0.3321, 0.4983]}, {"w": "to", "b": [0.3382, 0.4834, 0.3546, 0.4983]}, {"w": "predict", "b": [0.3608, 0.4834, 0.4172, 0.4983]}, {"w": "is", "b": [0.4234, 0.4834, 0.4358, 0.4983]}, {"w": "“hidden”", "b": [0.4419, 0.4834, 0.5137, 0.4983]}, {"w": "in", "b": [0.5199, 0.4834, 0.5353, 0.4983]}, {"w": "the", "b": [0.5414, 0.4834, 0.567, 0.4983]}, {"w": "value", "b": [0.5732, 0.4834, 0.6147, 0.4983]}, {"w": "of", "b": [0.6209, 0.4834, 0.6357, 0.4983]}, {"w": "a", "b": [0.6419, 0.4834, 0.6511, 0.4983]}, {"w": "feature.", "b": [0.6573, 0.4834, 0.7184, 0.4983]}]}, {"id": "b_29", "type": "paragraph", "text": "On the other hand, if the Group values are predictions provided by another, possibly less accurate model, then you can use this attribute to build a potentially stronger model. This is called model stacking, and we will consider this topic in Section ?? in Chapter 6.", "words": [{"w": "On", "b": [0.1312, 0.5102, 0.1563, 0.5253]}, {"w": "the", "b": [0.1627, 0.5102, 0.1889, 0.5253]}, {"w": "other", "b": [0.1952, 0.5102, 0.2382, 0.5253]}, {"w": "hand,", "b": [0.2445, 0.5102, 0.2906, 0.5253]}, {"w": "if", "b": [0.297, 0.5102, 0.308, 0.5253]}, {"w": "the", "b": [0.3144, 0.5102, 0.3405, 0.5253]}, {"w": "Group", "b": [0.3469, 0.5102, 0.3994, 0.5253]}, {"w": "values", "b": [0.4057, 0.5102, 0.4555, 0.5253]}, {"w": "are", "b": [0.4619, 0.5102, 0.4871, 0.5253]}, {"w": "predictions", "b": [0.4934, 0.5102, 0.5836, 0.5253]}, {"w": "provided", "b": [0.5899, 0.5102, 0.6612, 0.5253]}, {"w": "by", "b": [0.6675, 0.5102, 0.6874, 0.5253]}, {"w": "another,", "b": [0.6938, 0.5102, 0.7618, 0.5253]}, {"w": "possibly", "b": [0.7682, 0.5102, 0.8344, 0.5253]}, {"w": "less", "b": [0.8407, 0.5102, 0.8692, 0.5253]}, {"w": "accurate", "b": [0.1312, 0.5282, 0.1989, 0.5432]}, {"w": "model,", "b": [0.2051, 0.5282, 0.2588, 0.5432]}, {"w": "then", "b": [0.265, 0.5282, 0.3009, 0.5432]}, {"w": "you", "b": [0.307, 0.5282, 0.3357, 0.5432]}, {"w": "can", "b": [0.3419, 0.5282, 0.3695, 0.5432]}, {"w": "use", "b": [0.3757, 0.5282, 0.4014, 0.5432]}, {"w": "this", "b": [0.4075, 0.5282, 0.4374, 0.5432]}, {"w": "attribute", "b": [0.4435, 0.5282, 0.5153, 0.5432]}, {"w": "to", "b": [0.5215, 0.5282, 0.5378, 0.5432]}, {"w": "build", "b": [0.544, 0.5282, 0.585, 0.5432]}, {"w": "a", "b": [0.5911, 0.5282, 0.6004, 0.5432]}, {"w": "potentially", "b": [0.6065, 0.5282, 0.6931, 0.5432]}, {"w": "stronger", "b": [0.6992, 0.5282, 0.765, 0.5432]}, {"w": "model.", "b": [0.7712, 0.5282, 0.8249, 0.5432]}, {"w": "This", "b": [0.8332, 0.5282, 0.8691, 0.5432]}, {"w": "is", "b": [0.1312, 0.5462, 0.1436, 0.5611]}, {"w": "called", "b": [0.1498, 0.5462, 0.196, 0.5611]}, {"w": "model", "b": [0.2021, 0.5462, 0.2583, 0.5611]}, {"w": "stacking,", "b": [0.2654, 0.5462, 0.346, 0.5611]}, {"w": "and", "b": [0.3521, 0.5462, 0.3819, 0.5611]}, {"w": "we", "b": [0.388, 0.5462, 0.4091, 0.5611]}, {"w": "will", "b": [0.4152, 0.5462, 0.4439, 0.5611]}, {"w": "consider", "b": [0.4501, 0.5462, 0.5159, 0.5611]}, {"w": "this", "b": [0.522, 0.5462, 0.5519, 0.5611]}, {"w": "topic", "b": [0.558, 0.5462, 0.598, 0.5611]}, {"w": "in", "b": [0.6042, 0.5462, 0.6195, 0.5611]}, {"w": "Section", "b": [0.6257, 0.5462, 0.6842, 0.5611]}, {"w": "??", "b": [0.6901, 0.5462, 0.7102, 0.5611]}, {"w": "in", "b": [0.7163, 0.5462, 0.7317, 0.5611]}, {"w": "Chapter", "b": [0.7378, 0.5462, 0.8035, 0.5611]}, {"w": "6.", "b": [0.8097, 0.5462, 0.824, 0.5611]}]}, {"id": "b_30", "type": "paragraph", "text": "3.5.3 Feature From the Future", "words": [{"w": "3.5.3", "b": [0.1312, 0.594, 0.1749, 0.609]}, {"w": "Feature", "b": [0.1961, 0.594, 0.2662, 0.609]}, {"w": "From", "b": [0.2733, 0.594, 0.3219, 0.609]}, {"w": "the", "b": [0.329, 0.594, 0.3587, 0.609]}, {"w": "Future", "b": [0.3658, 0.594, 0.4277, 0.609]}]}, {"id": "b_31", "type": "paragraph", "text": "Feature from the future is a kind of data leakage that is hard to catch if you don’t have a clear understanding of the business goal. Imagine a client asked you to train a model that predicts whether a borrower will pay back the loan, based on attributes such as age, gender, education, salary, marital status, and so on. An example of such data is shown in Figure 11.", "words": [{"w": "Feature", "b": [0.1312, 0.6305, 0.1933, 0.6456]}, {"w": "from", "b": [0.1994, 0.6305, 0.2377, 0.6456]}, {"w": "the", "b": [0.2438, 0.6305, 0.27, 0.6456]}, {"w": "future", "b": [0.2761, 0.6305, 0.3259, 0.6456]}, {"w": "is", "b": [0.332, 0.6305, 0.3447, 0.6456]}, {"w": "a", "b": [0.3508, 0.6305, 0.3602, 0.6456]}, {"w": "kind", "b": [0.3664, 0.6305, 0.4025, 0.6456]}, {"w": "of", "b": [0.4086, 0.6305, 0.4238, 0.6456]}, {"w": "data", "b": [0.4299, 0.6305, 0.4665, 0.6456]}, {"w": "leakage", "b": [0.4727, 0.6305, 0.5328, 0.6456]}, {"w": "that", "b": [0.539, 0.6305, 0.5735, 0.6456]}, {"w": "is", "b": [0.5796, 0.6305, 0.5923, 0.6456]}, {"w": "hard", "b": [0.5985, 0.6305, 0.6362, 0.6456]}, {"w": "to", "b": [0.6423, 0.6305, 0.659, 0.6456]}, {"w": "catch", "b": [0.6652, 0.6305, 0.7086, 0.6456]}, {"w": "if", "b": [0.7148, 0.6305, 0.7258, 0.6456]}, {"w": "you", "b": [0.7319, 0.6305, 0.7612, 0.6456]}, {"w": "don’t", "b": [0.7673, 0.6305, 0.8102, 0.6456]}, {"w": "have", "b": [0.8164, 0.6305, 0.8535, 0.6456]}, {"w": "a", "b": [0.8597, 0.6305, 0.8691, 0.6456]}, {"w": "clear", "b": [0.1312, 0.6485, 0.1698, 0.6635]}, {"w": "understanding", "b": [0.176, 0.6485, 0.2927, 0.6635]}, {"w": "of", "b": [0.2989, 0.6485, 0.314, 0.6635]}, {"w": "the", "b": [0.3201, 0.6485, 0.3462, 0.6635]}, {"w": "business", "b": [0.3523, 0.6485, 0.4193, 0.6635]}, {"w": "goal.", "b": [0.4254, 0.6485, 0.4639, 0.6635]}, {"w": "Imagine", "b": [0.4721, 0.6485, 0.5372, 0.6635]}, {"w": "a", "b": [0.5433, 0.6485, 0.5527, 0.6635]}, {"w": "client", "b": [0.5588, 0.6485, 0.6031, 0.6635]}, {"w": "asked", "b": [0.6093, 0.6485, 0.6541, 0.6635]}, {"w": "you", "b": [0.6603, 0.6485, 0.6894, 0.6635]}, {"w": "to", "b": [0.6956, 0.6485, 0.7122, 0.6635]}, {"w": "train", "b": [0.7184, 0.6485, 0.758, 0.6635]}, {"w": "a", "b": [0.7642, 0.6485, 0.7735, 0.6635]}, {"w": "model", "b": [0.7797, 0.6485, 0.8291, 0.6635]}, {"w": "that", "b": [0.8353, 0.6485, 0.8696, 0.6635]}, {"w": "predicts", "b": [0.1312, 0.6666, 0.1944, 0.6814]}, {"w": "whether", "b": [0.2006, 0.6666, 0.2646, 0.6814]}, {"w": "a", "b": [0.2708, 0.6666, 0.2799, 0.6814]}, {"w": "borrower", "b": [0.2861, 0.6666, 0.3568, 0.6814]}, {"w": "will", "b": [0.363, 0.6666, 0.3914, 0.6814]}, {"w": "pay", "b": [0.3976, 0.6666, 0.4261, 0.6814]}, {"w": "back", "b": [0.4322, 0.6666, 0.4688, 0.6814]}, {"w": "the", "b": [0.4749, 0.6666, 0.5003, 0.6814]}, {"w": "loan,", "b": [0.5065, 0.6666, 0.5451, 0.6814]}, {"w": "based", "b": [0.5512, 0.6666, 0.5961, 0.6814]}, {"w": "on", "b": [0.6022, 0.6666, 0.6215, 0.6814]}, {"w": "attributes", "b": [0.6277, 0.6666, 0.7061, 0.6814]}, {"w": "such", "b": [0.7122, 0.6666, 0.7474, 0.6814]}, {"w": "as", "b": [0.7536, 0.6666, 0.7699, 0.6814]}, {"w": "age,", "b": [0.7761, 0.6666, 0.8076, 0.6814]}, {"w": "gender,", "b": [0.8137, 0.6666, 0.8717, 0.6814]}, {"w": "education,", "b": [0.1312, 0.6845, 0.2135, 0.6994]}, {"w": "salary,", "b": [0.2196, 0.6845, 0.2705, 0.6994]}, {"w": "marital", "b": [0.2767, 0.6845, 0.3346, 0.6994]}, {"w": "status,", "b": [0.3407, 0.6845, 0.3937, 0.6994]}, {"w": "and", "b": [0.3999, 0.6845, 0.4293, 0.6994]}, {"w": "so", "b": [0.4355, 0.6845, 0.4518, 0.6994]}, {"w": "on.", "b": [0.458, 0.6845, 0.4823, 0.6994]}, {"w": "An", "b": [0.4905, 0.6845, 0.5144, 0.6994]}, {"w": "example", "b": [0.5205, 0.6845, 0.586, 0.6994]}, {"w": "of", "b": [0.5921, 0.6845, 0.6069, 0.6994]}, {"w": "such", "b": [0.613, 0.6845, 0.6482, 0.6994]}, {"w": "data", "b": [0.6543, 0.6845, 0.6898, 0.6994]}, {"w": "is", "b": [0.696, 0.6845, 0.7083, 0.6994]}, {"w": "shown", "b": [0.7144, 0.6845, 0.7638, 0.6994]}, {"w": "in", "b": [0.7699, 0.6845, 0.7851, 0.6994]}, {"w": "Figure", "b": [0.7913, 0.6845, 0.8429, 0.6994]}, {"w": "11.", "b": [0.849, 0.6845, 0.8723, 0.6994]}]}, {"id": "b_32", "type": "paragraph", "text": "If you don’t make an effort to understand the business context in which your model will be used, you might decide to use all available attributes to predict the value in the column Will Pay Loan, including the data from the column Late Payment Reminders. Your model will look accurate at testing time and you send it to the client, who will later report that the model doesn’t work well in the production environment.", "words": [{"w": "If", "b": [0.1312, 0.7114, 0.1435, 0.7263]}, {"w": "you", "b": [0.1497, 0.7114, 0.1784, 0.7263]}, {"w": "don’t", "b": [0.1846, 0.7114, 0.2266, 0.7263]}, {"w": "make", "b": [0.2327, 0.7114, 0.2748, 0.7263]}, {"w": "an", "b": [0.2809, 0.7114, 0.3004, 0.7263]}, {"w": "effort", "b": [0.3066, 0.7114, 0.3492, 0.7263]}, {"w": "to", "b": [0.3553, 0.7114, 0.3717, 0.7263]}, {"w": "understand", "b": [0.3779, 0.7114, 0.4683, 0.7263]}, {"w": "the", "b": [0.4744, 0.7114, 0.5001, 0.7263]}, {"w": "business", "b": [0.5062, 0.7114, 0.5722, 0.7263]}, {"w": "context", "b": [0.5783, 0.7114, 0.6378, 0.7263]}, {"w": "in", "b": [0.644, 0.7114, 0.6594, 0.7263]}, {"w": "which", "b": [0.6655, 0.7114, 0.7122, 0.7263]}, {"w": "your", "b": [0.7183, 0.7114, 0.7543, 0.7263]}, {"w": "model", "b": [0.7604, 0.7114, 0.8091, 0.7263]}, {"w": "will", "b": [0.8153, 0.7114, 0.844, 0.7263]}, {"w": "be", "b": [0.8501, 0.7114, 0.8691, 0.7263]}, {"w": "used,", "b": [0.1312, 0.7294, 0.1716, 0.7442]}, {"w": "you", "b": [0.1778, 0.7294, 0.206, 0.7442]}, {"w": "might", "b": [0.2121, 0.7294, 0.2579, 0.7442]}, {"w": "decide", "b": [0.2641, 0.7294, 0.3135, 0.7442]}, {"w": "to", "b": [0.3196, 0.7294, 0.3357, 0.7442]}, {"w": "use", "b": [0.3419, 0.7294, 0.3672, 0.7442]}, {"w": "all", "b": [0.3733, 0.7294, 0.3925, 0.7442]}, {"w": "available", "b": [0.3986, 0.7294, 0.4671, 0.7442]}, {"w": "attributes", "b": [0.4732, 0.7294, 0.5509, 0.7442]}, {"w": "to", "b": [0.5571, 0.7294, 0.5732, 0.7442]}, {"w": "predict", "b": [0.5794, 0.7294, 0.6348, 0.7442]}, {"w": "the", "b": [0.641, 0.7294, 0.6661, 0.7442]}, {"w": "value", "b": [0.6723, 0.7294, 0.7131, 0.7442]}, {"w": "in", "b": [0.7192, 0.7294, 0.7343, 0.7442]}, {"w": "the", "b": [0.7405, 0.7294, 0.7657, 0.7442]}, {"w": "column", "b": [0.7718, 0.7294, 0.8292, 0.7442]}, {"w": "Will", "b": [0.8354, 0.7294, 0.8691, 0.7442]}, {"w": "Pay", "b": [0.1312, 0.7472, 0.1622, 0.7622]}, {"w": "Loan,", "b": [0.1683, 0.7472, 0.2143, 0.7622]}, {"w": "including", "b": [0.2204, 0.7472, 0.2953, 0.7622]}, {"w": "the", "b": [0.3014, 0.7472, 0.3274, 0.7622]}, {"w": "data", "b": [0.3336, 0.7472, 0.3699, 0.7622]}, {"w": "from", "b": [0.3761, 0.7472, 0.4141, 0.7622]}, {"w": "the", "b": [0.4202, 0.7472, 0.4462, 0.7622]}, {"w": "column", "b": [0.4523, 0.7472, 0.5116, 0.7622]}, {"w": "Late", "b": [0.5177, 0.7472, 0.5543, 0.7622]}, {"w": "Payment", "b": [0.5605, 0.7472, 0.6325, 0.7622]}, {"w": "Reminders.", "b": [0.6386, 0.7472, 0.7305, 0.7622]}, {"w": "Your", "b": [0.7387, 0.7472, 0.7783, 0.7622]}, {"w": "model", "b": [0.7844, 0.7472, 0.8338, 0.7622]}, {"w": "will", "b": [0.8399, 0.7472, 0.869, 0.7622]}, {"w": "look", "b": [0.1312, 0.7651, 0.1657, 0.7802]}, {"w": "accurate", "b": [0.1723, 0.7651, 0.2414, 0.7802]}, {"w": "at", "b": [0.248, 0.7651, 0.2647, 0.7802]}, {"w": "testing", "b": [0.2713, 0.7651, 0.3268, 0.7802]}, {"w": "time", "b": [0.3334, 0.7651, 0.37, 0.7802]}, {"w": "and", "b": [0.3766, 0.7651, 0.4069, 0.7802]}, {"w": "you", "b": [0.4135, 0.7651, 0.4428, 0.7802]}, {"w": "send", "b": [0.4494, 0.7651, 0.4861, 0.7802]}, {"w": "it", "b": [0.4927, 0.7651, 0.5052, 0.7802]}, {"w": "to", "b": [0.5118, 0.7651, 0.5285, 0.7802]}, {"w": "the", "b": [0.5351, 0.7651, 0.5613, 0.7802]}, {"w": "client,", "b": [0.5679, 0.7651, 0.6176, 0.7802]}, {"w": "who", "b": [0.6243, 0.7651, 0.6577, 0.7802]}, {"w": "will", "b": [0.6643, 0.7651, 0.6936, 0.7802]}, {"w": "later", "b": [0.7001, 0.7651, 0.7379, 0.7802]}, {"w": "report", "b": [0.7444, 0.7651, 0.7953, 0.7802]}, {"w": "that", "b": [0.8018, 0.7651, 0.8364, 0.7802]}, {"w": "the", "b": [0.8429, 0.7651, 0.8691, 0.7802]}, {"w": "model", "b": [0.1312, 0.7832, 0.1799, 0.7981]}, {"w": "doesn’t", "b": [0.1861, 0.7832, 0.2441, 0.7981]}, {"w": "work", "b": [0.2503, 0.7832, 0.2893, 0.7981]}, {"w": "well", "b": [0.2954, 0.7832, 0.3267, 0.7981]}, {"w": "in", "b": [0.3329, 0.7832, 0.3483, 0.7981]}, {"w": "the", "b": [0.3544, 0.7832, 0.38, 0.7981]}, {"w": "production", "b": [0.3862, 0.7832, 0.4739, 0.7981]}, {"w": "environment.", "b": [0.4801, 0.7832, 0.5852, 0.7981]}]}, {"id": "b_33", "type": "paragraph", "text": "After investigation, you find out that, in the production environment, the value of Late Payment Reminders is always zero. This makes sense because the client uses your model before the borrower gets the credit, so no reminders have yet been made! However, your", "words": [{"w": "After", "b": [0.1305, 0.81, 0.1735, 0.8251]}, {"w": "investigation,", "b": [0.181, 0.81, 0.2905, 0.8251]}, {"w": "you", "b": [0.2984, 0.81, 0.3277, 0.8251]}, {"w": "find", "b": [0.3352, 0.81, 0.3666, 0.8251]}, {"w": "out", "b": [0.3742, 0.81, 0.4014, 0.8251]}, {"w": "that,", "b": [0.4089, 0.81, 0.4487, 0.8251]}, {"w": "in", "b": [0.4566, 0.81, 0.4723, 0.8251]}, {"w": "the", "b": [0.4799, 0.81, 0.506, 0.8251]}, {"w": "production", "b": [0.5136, 0.81, 0.6031, 0.8251]}, {"w": "environment,", "b": [0.6106, 0.81, 0.7179, 0.8251]}, {"w": "the", "b": [0.7258, 0.81, 0.752, 0.8251]}, {"w": "value", "b": [0.7596, 0.81, 0.8019, 0.8251]}, {"w": "of", "b": [0.8095, 0.81, 0.8247, 0.8251]}, {"w": "Late", "b": [0.8322, 0.81, 0.8691, 0.8251]}, {"w": "Payment", "b": [0.1312, 0.8279, 0.2037, 0.843]}, {"w": "Reminders", "b": [0.2103, 0.8279, 0.2976, 0.843]}, {"w": "is", "b": [0.3042, 0.8279, 0.3169, 0.843]}, {"w": "always", "b": [0.3236, 0.8279, 0.3775, 0.843]}, {"w": "zero.", "b": [0.3842, 0.8279, 0.423, 0.843]}, {"w": "This", "b": [0.4327, 0.8279, 0.4694, 0.843]}, {"w": "makes", "b": [0.4761, 0.8279, 0.5264, 0.843]}, {"w": "sense", "b": [0.533, 0.8279, 0.5751, 0.843]}, {"w": "because", "b": [0.5818, 0.8279, 0.6452, 0.843]}, {"w": "the", "b": [0.6518, 0.8279, 0.678, 0.843]}, {"w": "client", "b": [0.6847, 0.8279, 0.7291, 0.843]}, {"w": "uses", "b": [0.7358, 0.8279, 0.7695, 0.843]}, {"w": "your", "b": [0.7762, 0.8279, 0.8128, 0.843]}, {"w": "model", "b": [0.8195, 0.8279, 0.8692, 0.843]}, {"w": "before", "b": [0.1312, 0.846, 0.1805, 0.8609]}, {"w": "the", "b": [0.1874, 0.8459, 0.2135, 0.861]}, {"w": "borrower", "b": [0.2204, 0.8459, 0.2933, 0.861]}, {"w": "gets", "b": [0.3001, 0.8459, 0.3327, 0.861]}, {"w": "the", "b": [0.3396, 0.8459, 0.3657, 0.861]}, {"w": "credit,", "b": [0.3726, 0.8459, 0.425, 0.861]}, {"w": "so", "b": [0.4321, 0.8459, 0.4489, 0.861]}, {"w": "no", "b": [0.4558, 0.8459, 0.4756, 0.861]}, {"w": "reminders", "b": [0.4825, 0.8459, 0.5633, 0.861]}, {"w": "have", "b": [0.5702, 0.8459, 0.6073, 0.861]}, {"w": "yet", "b": [0.6142, 0.8459, 0.6393, 0.861]}, {"w": "been", "b": [0.6462, 0.8459, 0.6844, 0.861]}, {"w": "made!", "b": [0.6913, 0.8459, 0.7405, 0.861]}, {"w": "However,", "b": [0.7509, 0.8459, 0.8257, 0.861]}, {"w": "your", "b": [0.8328, 0.8459, 0.8695, 0.861]}]}, {"id": "b_34", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 25", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "25", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 69, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Demographic", "words": [{"w": "Demographic", "b": [0.2973, 0.0901, 0.3899, 0.1027]}]}, {"id": "b_1", "type": "paragraph", "text": "Group Borrower ID ...", "words": [{"w": "Group", "b": [0.322, 0.1048, 0.3652, 0.1175]}, {"w": "Borrower", "b": [0.1995, 0.0975, 0.2627, 0.1101]}, {"w": "ID", "b": [0.267, 0.0975, 0.2826, 0.1101]}, {"w": "...", "b": [0.546, 0.0975, 0.559, 0.1101]}]}, {"id": "b_4", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.2345, 0.1922, 0.2475, 0.2048]}]}, {"id": "b_5", "type": "paragraph", "text": "65723", "words": [{"w": "65723", "b": [0.2181, 0.2237, 0.2614, 0.2364]}]}, {"id": "b_6", "type": "equation", "text": "F25-35", "words": [{"w": "F25-35", "b": [0.3202, 0.1606, 0.3696, 0.1732]}]}, {"id": "b_7", "type": "equation", "text": "M35-50 ...", "words": [{"w": "M35-50", "b": [0.3185, 0.129, 0.3713, 0.1417]}, {"w": "...", "b": [0.546, 0.129, 0.559, 0.1417]}]}, {"id": "b_8", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.546, 0.1606, 0.559, 0.1732]}]}, {"id": "b_9", "type": "paragraph", "text": "... ...", "words": [{"w": "...", "b": [0.3384, 0.1922, 0.3514, 0.2048]}, {"w": "...", "b": [0.546, 0.1922, 0.559, 0.2048]}]}, {"id": "b_10", "type": "equation", "text": "M25-35 ...", "words": [{"w": "M25-35", "b": [0.3185, 0.2237, 0.3713, 0.2364]}, {"w": "...", "b": [0.546, 0.2237, 0.559, 0.2364]}]}, {"id": "b_11", "type": "paragraph", "text": "Education", "words": [{"w": "Education", "b": [0.4128, 0.0975, 0.482, 0.1101]}]}, {"id": "b_12", "type": "paragraph", "text": "High school", "words": [{"w": "High", "b": [0.408, 0.129, 0.44, 0.1417]}, {"w": "school", "b": [0.4444, 0.129, 0.4894, 0.1417]}]}, {"id": "b_13", "type": "paragraph", "text": "Master's", "words": [{"w": "Master's", "b": [0.4195, 0.1606, 0.4779, 0.1732]}]}, {"id": "b_14", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.4422, 0.1922, 0.4552, 0.2048]}]}, {"id": "b_15", "type": "paragraph", "text": "Master's", "words": [{"w": "Master's", "b": [0.4195, 0.2237, 0.4779, 0.2364]}]}, {"id": "b_16", "type": "paragraph", "text": "Will Pay Loan", "words": [{"w": "Will", "b": [0.7113, 0.0975, 0.7364, 0.1101]}, {"w": "Pay", "b": [0.7407, 0.0975, 0.7675, 0.1101]}, {"w": "Loan", "b": [0.7719, 0.0975, 0.8065, 0.1101]}]}, {"id": "b_19", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.7537, 0.1922, 0.7667, 0.2048]}]}, {"id": "b_21", "type": "paragraph", "text": "Late Payment", "words": [{"w": "Late", "b": [0.607, 0.0901, 0.6374, 0.1027]}, {"w": "Payment", "b": [0.6417, 0.0901, 0.7031, 0.1027]}]}, {"id": "b_22", "type": "paragraph", "text": "Reminders", "words": [{"w": "Reminders", "b": [0.6174, 0.1048, 0.6927, 0.1175]}]}, {"id": "b_25", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6499, 0.1922, 0.6629, 0.2048]}]}, {"id": "b_27", "type": "paragraph", "text": "Figure 11: A feature unavailable at the prediction time: Late Payment Reminders.", "words": [{"w": "Figure", "b": [0.1655, 0.2619, 0.2176, 0.2769]}, {"w": "11:", "b": [0.2237, 0.2619, 0.2473, 0.2769]}, {"w": "A", "b": [0.2555, 0.2619, 0.2693, 0.2769]}, {"w": "feature", "b": [0.2755, 0.2619, 0.3314, 0.2769]}, {"w": "unavailable", "b": [0.3376, 0.2619, 0.4278, 0.2769]}, {"w": "at", "b": [0.434, 0.2619, 0.4504, 0.2769]}, {"w": "the", "b": [0.4565, 0.2619, 0.4822, 0.2769]}, {"w": "prediction", "b": [0.4883, 0.2619, 0.5694, 0.2769]}, {"w": "time:", "b": [0.5755, 0.2619, 0.6165, 0.2769]}, {"w": "Late", "b": [0.6247, 0.2619, 0.6609, 0.2769]}, {"w": "Payment", "b": [0.667, 0.2619, 0.738, 0.2769]}, {"w": "Reminders.", "b": [0.7442, 0.2619, 0.8348, 0.2769]}]}, {"id": "b_28", "type": "paragraph", "text": "model most likely learned to make the “No” prediction when Late Payment Reminders is 1 or more and pays less attention to the other features.", "words": [{"w": "model", "b": [0.1312, 0.3106, 0.1801, 0.3256]}, {"w": "most", "b": [0.1863, 0.3106, 0.2255, 0.3256]}, {"w": "likely", "b": [0.2317, 0.3106, 0.2744, 0.3256]}, {"w": "learned", "b": [0.2805, 0.3106, 0.3393, 0.3256]}, {"w": "to", "b": [0.3455, 0.3106, 0.3619, 0.3256]}, {"w": "make", "b": [0.3681, 0.3106, 0.4103, 0.3256]}, {"w": "the", "b": [0.4165, 0.3106, 0.4422, 0.3256]}, {"w": "“No”", "b": [0.4483, 0.3106, 0.489, 0.3256]}, {"w": "prediction", "b": [0.4952, 0.3106, 0.5766, 0.3256]}, {"w": "when", "b": [0.5827, 0.3106, 0.6249, 0.3256]}, {"w": "Late", "b": [0.6311, 0.3106, 0.6674, 0.3256]}, {"w": "Payment", "b": [0.6735, 0.3106, 0.7448, 0.3256]}, {"w": "Reminders", "b": [0.751, 0.3106, 0.8369, 0.3256]}, {"w": "is", "b": [0.843, 0.3106, 0.8555, 0.3256]}, {"w": "1", "b": [0.8613, 0.3106, 0.8706, 0.3256]}, {"w": "or", "b": [0.1312, 0.3286, 0.1477, 0.3436]}, {"w": "more", "b": [0.1538, 0.3286, 0.1939, 0.3436]}, {"w": "and", "b": [0.2, 0.3286, 0.2298, 0.3436]}, {"w": "pays", "b": [0.2359, 0.3286, 0.2719, 0.3436]}, {"w": "less", "b": [0.2781, 0.3286, 0.306, 0.3436]}, {"w": "attention", "b": [0.3121, 0.3286, 0.3854, 0.3436]}, {"w": "to", "b": [0.3916, 0.3286, 0.408, 0.3436]}, {"w": "the", "b": [0.4141, 0.3286, 0.4398, 0.3436]}, {"w": "other", "b": [0.4459, 0.3286, 0.488, 0.3436]}, {"w": "features.", "b": [0.4942, 0.3286, 0.5625, 0.3436]}]}, {"id": "b_29", "type": "paragraph", "text": "Here is another example. Let’s say you have a news website and you want to predict the ranking of news you serve to the user, so as to maximize the number of clicks on stories. If in your training data, you have positional features for each news item served in the past (e.g., the x −y position of the title, and the abstract block on the webpage), such information will not be available on the serving time, because you don’t know the positions of articles on the page before you rank them.", "words": [{"w": "Here", "b": [0.1312, 0.3554, 0.1695, 0.3705]}, {"w": "is", "b": [0.1761, 0.3554, 0.1888, 0.3705]}, {"w": "another", "b": [0.1954, 0.3554, 0.2582, 0.3705]}, {"w": "example.", "b": [0.2649, 0.3554, 0.3376, 0.3705]}, {"w": "Let’s", "b": [0.3472, 0.3554, 0.3873, 0.3705]}, {"w": "say", "b": [0.394, 0.3554, 0.4202, 0.3705]}, {"w": "you", "b": [0.4269, 0.3554, 0.4562, 0.3705]}, {"w": "have", "b": [0.4628, 0.3554, 0.5, 0.3705]}, {"w": "a", "b": [0.5066, 0.3554, 0.516, 0.3705]}, {"w": "news", "b": [0.5227, 0.3554, 0.5625, 0.3705]}, {"w": "website", "b": [0.5691, 0.3554, 0.6294, 0.3705]}, {"w": "and", "b": [0.636, 0.3554, 0.6664, 0.3705]}, {"w": "you", "b": [0.673, 0.3554, 0.7023, 0.3705]}, {"w": "want", "b": [0.709, 0.3554, 0.7487, 0.3705]}, {"w": "to", "b": [0.7553, 0.3554, 0.7721, 0.3705]}, {"w": "predict", "b": [0.7787, 0.3554, 0.8363, 0.3705]}, {"w": "the", "b": [0.8429, 0.3554, 0.8691, 0.3705]}, {"w": "ranking", "b": [0.1312, 0.3734, 0.1925, 0.3884]}, {"w": "of", "b": [0.1986, 0.3734, 0.2136, 0.3884]}, {"w": "news", "b": [0.2197, 0.3734, 0.2589, 0.3884]}, {"w": "you", "b": [0.2651, 0.3734, 0.2939, 0.3884]}, {"w": "serve", "b": [0.3, 0.3734, 0.3403, 0.3884]}, {"w": "to", "b": [0.3465, 0.3734, 0.3629, 0.3884]}, {"w": "the", "b": [0.3691, 0.3734, 0.3948, 0.3884]}, {"w": "user,", "b": [0.401, 0.3734, 0.4392, 0.3884]}, {"w": "so", "b": [0.4453, 0.3734, 0.4619, 0.3884]}, {"w": "as", "b": [0.4681, 0.3734, 0.4846, 0.3884]}, {"w": "to", "b": [0.4908, 0.3734, 0.5072, 0.3884]}, {"w": "maximize", "b": [0.5134, 0.3734, 0.59, 0.3884]}, {"w": "the", "b": [0.5962, 0.3734, 0.6219, 0.3884]}, {"w": "number", "b": [0.628, 0.3734, 0.6893, 0.3884]}, {"w": "of", "b": [0.6955, 0.3734, 0.7104, 0.3884]}, {"w": "clicks", "b": [0.7165, 0.3734, 0.7599, 0.3884]}, {"w": "on", "b": [0.766, 0.3734, 0.7855, 0.3884]}, {"w": "stories.", "b": [0.7917, 0.3734, 0.8485, 0.3884]}, {"w": "If", "b": [0.8568, 0.3734, 0.8691, 0.3884]}, {"w": "in", "b": [0.1312, 0.3915, 0.1463, 0.4063]}, {"w": "your", "b": [0.1521, 0.3915, 0.1873, 0.4063]}, {"w": "training", "b": [0.1931, 0.3915, 0.2555, 0.4063]}, {"w": "data,", "b": [0.2613, 0.3915, 0.3015, 0.4063]}, {"w": "you", "b": [0.3074, 0.3915, 0.3355, 0.4063]}, {"w": "have", "b": [0.3413, 0.3915, 0.377, 0.4063]}, {"w": "positional", "b": [0.3828, 0.3915, 0.4598, 0.4063]}, {"w": "features", "b": [0.4656, 0.3915, 0.5276, 0.4063]}, {"w": "for", "b": [0.5334, 0.3915, 0.555, 0.4063]}, {"w": "each", "b": [0.5608, 0.3915, 0.5955, 0.4063]}, {"w": "news", "b": [0.6013, 0.3915, 0.6396, 0.4063]}, {"w": "item", "b": [0.6454, 0.3915, 0.6806, 0.4063]}, {"w": "served", "b": [0.6864, 0.3915, 0.7358, 0.4063]}, {"w": "in", "b": [0.7416, 0.3915, 0.7567, 0.4063]}, {"w": "the", "b": [0.7625, 0.3915, 0.7876, 0.4063]}, {"w": "past", "b": [0.7934, 0.3915, 0.8267, 0.4063]}, {"w": "(e.g.,", "b": [0.8325, 0.3915, 0.8717, 0.4063]}, {"w": "the", "b": [0.1312, 0.4095, 0.1564, 0.4243]}, {"w": "x", "b": [0.1625, 0.4093, 0.173, 0.4243]}, {"w": "−y", "b": [0.177, 0.4091, 0.2045, 0.4243]}, {"w": "position", "b": [0.2113, 0.4095, 0.2742, 0.4243]}, {"w": "of", "b": [0.2803, 0.4095, 0.2949, 0.4243]}, {"w": "the", "b": [0.301, 0.4095, 0.3261, 0.4243]}, {"w": "title,", "b": [0.3322, 0.4095, 0.3694, 0.4243]}, {"w": "and", "b": [0.3756, 0.4095, 0.4047, 0.4243]}, {"w": "the", "b": [0.4108, 0.4095, 0.4359, 0.4243]}, {"w": "abstract", "b": [0.4421, 0.4095, 0.5065, 0.4243]}, {"w": "block", "b": [0.5127, 0.4095, 0.5544, 0.4243]}, {"w": "on", "b": [0.5605, 0.4095, 0.5796, 0.4243]}, {"w": "the", "b": [0.5857, 0.4095, 0.6108, 0.4243]}, {"w": "webpage),", "b": [0.6169, 0.4095, 0.6958, 0.4243]}, {"w": "such", "b": [0.7019, 0.4095, 0.7367, 0.4243]}, {"w": "information", "b": [0.7428, 0.4095, 0.8348, 0.4243]}, {"w": "will", "b": [0.8409, 0.4095, 0.8691, 0.4243]}, {"w": "not", "b": [0.1312, 0.4274, 0.1575, 0.4422]}, {"w": "be", "b": [0.1637, 0.4274, 0.1824, 0.4422]}, {"w": "available", "b": [0.1886, 0.4274, 0.2573, 0.4422]}, {"w": "on", "b": [0.2635, 0.4274, 0.2827, 0.4422]}, {"w": "the", "b": [0.2889, 0.4274, 0.3141, 0.4422]}, {"w": "serving", "b": [0.3203, 0.4274, 0.3766, 0.4422]}, {"w": "time,", "b": [0.3828, 0.4274, 0.4232, 0.4422]}, {"w": "because", "b": [0.4294, 0.4274, 0.4907, 0.4422]}, {"w": "you", "b": [0.4969, 0.4274, 0.5252, 0.4422]}, {"w": "don’t", "b": [0.5313, 0.4274, 0.5728, 0.4422]}, {"w": "know", "b": [0.5789, 0.4274, 0.6204, 0.4422]}, {"w": "the", "b": [0.6266, 0.4274, 0.6518, 0.4422]}, {"w": "positions", "b": [0.658, 0.4274, 0.7285, 0.4422]}, {"w": "of", "b": [0.7347, 0.4274, 0.7493, 0.4422]}, {"w": "articles", "b": [0.7555, 0.4274, 0.8123, 0.4422]}, {"w": "on", "b": [0.8185, 0.4274, 0.8377, 0.4422]}, {"w": "the", "b": [0.8438, 0.4274, 0.8691, 0.4422]}, {"w": "page", "b": [0.1312, 0.4453, 0.1682, 0.4602]}, {"w": "before", "b": [0.1743, 0.4453, 0.2236, 0.4602]}, {"w": "you", "b": [0.2297, 0.4453, 0.2584, 0.4602]}, {"w": "rank", "b": [0.2646, 0.4453, 0.3011, 0.4602]}, {"w": "them.", "b": [0.3072, 0.4453, 0.3533, 0.4602]}]}, {"id": "b_30", "type": "paragraph", "text": "Understanding the business context in which the model will be used is, thus, crucial to avoid data leakage.", "words": [{"w": "Understanding", "b": [0.1312, 0.4723, 0.2475, 0.4871]}, {"w": "the", "b": [0.2536, 0.4723, 0.2787, 0.4871]}, {"w": "business", "b": [0.2848, 0.4723, 0.3495, 0.4871]}, {"w": "context", "b": [0.3556, 0.4723, 0.4139, 0.4871]}, {"w": "in", "b": [0.42, 0.4723, 0.4351, 0.4871]}, {"w": "which", "b": [0.4412, 0.4723, 0.4869, 0.4871]}, {"w": "the", "b": [0.4931, 0.4723, 0.5182, 0.4871]}, {"w": "model", "b": [0.5243, 0.4723, 0.5721, 0.4871]}, {"w": "will", "b": [0.5782, 0.4723, 0.6063, 0.4871]}, {"w": "be", "b": [0.6124, 0.4723, 0.6311, 0.4871]}, {"w": "used", "b": [0.6372, 0.4723, 0.6725, 0.4871]}, {"w": "is,", "b": [0.6786, 0.4723, 0.6958, 0.4871]}, {"w": "thus,", "b": [0.7019, 0.4723, 0.7407, 0.4871]}, {"w": "crucial", "b": [0.7468, 0.4723, 0.7992, 0.4871]}, {"w": "to", "b": [0.8053, 0.4723, 0.8214, 0.4871]}, {"w": "avoid", "b": [0.8275, 0.4723, 0.8692, 0.4871]}, {"w": "data", "b": [0.1312, 0.4901, 0.1671, 0.5051]}, {"w": "leakage.", "b": [0.1733, 0.4901, 0.2374, 0.5051]}]}, {"id": "b_31", "type": "paragraph", "text": "3.6 Data Partitioning", "words": [{"w": "3.6", "b": [0.1312, 0.5383, 0.1631, 0.5563]}, {"w": "Data", "b": [0.188, 0.5383, 0.241, 0.5563]}, {"w": "Partitioning", "b": [0.2493, 0.5383, 0.3807, 0.5563]}]}, {"id": "b_32", "type": "paragraph", "text": "As discussed in Section ?? of the first chapter, in practical machine learning, we typically use three disjoint sets of examples: training set, validation set, and test set.", "words": [{"w": "As", "b": [0.1305, 0.5773, 0.1512, 0.5921]}, {"w": "discussed", "b": [0.1571, 0.5773, 0.2298, 0.5921]}, {"w": "in", "b": [0.2356, 0.5773, 0.2507, 0.5921]}, {"w": "Section", "b": [0.2565, 0.5773, 0.3138, 0.5921]}, {"w": "??", "b": [0.3195, 0.5772, 0.3395, 0.5922]}, {"w": "of", "b": [0.3454, 0.5773, 0.3599, 0.5921]}, {"w": "the", "b": [0.3658, 0.5773, 0.3909, 0.5921]}, {"w": "first", "b": [0.3967, 0.5773, 0.4281, 0.5921]}, {"w": "chapter,", "b": [0.4339, 0.5773, 0.4978, 0.5921]}, {"w": "in", "b": [0.5037, 0.5773, 0.5187, 0.5921]}, {"w": "practical", "b": [0.5246, 0.5773, 0.593, 0.5921]}, {"w": "machine", "b": [0.5988, 0.5773, 0.6636, 0.5921]}, {"w": "learning,", "b": [0.6694, 0.5773, 0.7378, 0.5921]}, {"w": "we", "b": [0.7437, 0.5773, 0.7643, 0.5921]}, {"w": "typically", "b": [0.7702, 0.5773, 0.838, 0.5921]}, {"w": "use", "b": [0.8438, 0.5773, 0.8691, 0.5921]}, {"w": "three", "b": [0.1312, 0.5952, 0.1723, 0.6101]}, {"w": "disjoint", "b": [0.1785, 0.5952, 0.2381, 0.6101]}, {"w": "sets", "b": [0.2442, 0.5952, 0.2742, 0.6101]}, {"w": "of", "b": [0.2803, 0.5952, 0.2952, 0.6101]}, {"w": "examples:", "b": [0.3013, 0.5952, 0.3799, 0.6101]}, {"w": "training", "b": [0.3881, 0.5952, 0.4517, 0.6101]}, {"w": "set,", "b": [0.4579, 0.5952, 0.4857, 0.6101]}, {"w": "validation", "b": [0.4918, 0.5952, 0.5713, 0.6101]}, {"w": "set,", "b": [0.5774, 0.5952, 0.6052, 0.6101]}, {"w": "and", "b": [0.6114, 0.5952, 0.6411, 0.6101]}, {"w": "test", "b": [0.6473, 0.5952, 0.6771, 0.6101]}, {"w": "set.", "b": [0.6833, 0.5952, 0.7111, 0.6101]}]}, {"id": "b_33", "type": "paragraph", "text": "Training data Test data Validation", "words": [{"w": "Training", "b": [0.3671, 0.7079, 0.427, 0.7215]}, {"w": "data", "b": [0.4317, 0.7079, 0.4643, 0.7215]}, {"w": "Test", "b": [0.6883, 0.7003, 0.719, 0.7139]}, {"w": "data", "b": [0.6873, 0.7164, 0.7199, 0.73]}, {"w": "Validation", "b": [0.5837, 0.7003, 0.656, 0.7139]}]}, {"id": "b_34", "type": "paragraph", "text": "data", "words": [{"w": "data", "b": [0.6036, 0.7164, 0.6362, 0.73]}]}, {"id": "b_35", "type": "paragraph", "text": "Entire dataset", "words": [{"w": "Entire", "b": [0.4393, 0.6326, 0.4858, 0.647]}, {"w": "dataset", "b": [0.4907, 0.6326, 0.5491, 0.647]}]}, {"id": "b_36", "type": "paragraph", "text": "Figure 12: The entire dataset partitioned into a training, validation and test sets.", "words": [{"w": "Figure", "b": [0.17, 0.7663, 0.2221, 0.7813]}, {"w": "12:", "b": [0.2283, 0.7663, 0.2519, 0.7813]}, {"w": "The", "b": [0.2601, 0.7663, 0.2919, 0.7813]}, {"w": "entire", "b": [0.298, 0.7663, 0.3437, 0.7813]}, {"w": "dataset", "b": [0.3498, 0.7663, 0.4084, 0.7813]}, {"w": "partitioned", "b": [0.4145, 0.7663, 0.5038, 0.7813]}, {"w": "into", "b": [0.51, 0.7663, 0.5413, 0.7813]}, {"w": "a", "b": [0.5474, 0.7663, 0.5566, 0.7813]}, {"w": "training,", "b": [0.5628, 0.7663, 0.6315, 0.7813]}, {"w": "validation", "b": [0.6377, 0.7663, 0.7172, 0.7813]}, {"w": "and", "b": [0.7233, 0.7663, 0.753, 0.7813]}, {"w": "test", "b": [0.7592, 0.7663, 0.789, 0.7813]}, {"w": "sets.", "b": [0.7952, 0.7663, 0.8303, 0.7813]}]}, {"id": "b_37", "type": "paragraph", "text": "The training set is used by the machine learning algorithm to train the model.", "words": [{"w": "The", "b": [0.1306, 0.8158, 0.1624, 0.8308]}, {"w": "training", "b": [0.1685, 0.8158, 0.2418, 0.8308]}, {"w": "set", "b": [0.2489, 0.8158, 0.2752, 0.8308]}, {"w": "is", "b": [0.2813, 0.8158, 0.2937, 0.8308]}, {"w": "used", "b": [0.2999, 0.8158, 0.3359, 0.8308]}, {"w": "by", "b": [0.342, 0.8158, 0.3615, 0.8308]}, {"w": "the", "b": [0.3677, 0.8158, 0.3933, 0.8308]}, {"w": "machine", "b": [0.3995, 0.8158, 0.4656, 0.8308]}, {"w": "learning", "b": [0.4718, 0.8158, 0.5364, 0.8308]}, {"w": "algorithm", "b": [0.5426, 0.8158, 0.6206, 0.8308]}, {"w": "to", "b": [0.6267, 0.8158, 0.6431, 0.8308]}, {"w": "train", "b": [0.6492, 0.8158, 0.6883, 0.8308]}, {"w": "the", "b": [0.6944, 0.8158, 0.7201, 0.8308]}, {"w": "model.", "b": [0.7262, 0.8158, 0.78, 0.8308]}]}, {"id": "b_38", "type": "paragraph", "text": "The validation set is needed to find the best values for the hyperparameters of the machine learning pipeline. The analyst tries different combinations of hyperparameter values one by", "words": [{"w": "The", "b": [0.1306, 0.8428, 0.1617, 0.8576]}, {"w": "validation", "b": [0.1675, 0.8427, 0.2583, 0.8577]}, {"w": "set", "b": [0.265, 0.8427, 0.2914, 0.8577]}, {"w": "is", "b": [0.2971, 0.8428, 0.3093, 0.8576]}, {"w": "needed", "b": [0.3151, 0.8428, 0.3694, 0.8576]}, {"w": "to", "b": [0.3752, 0.8428, 0.3913, 0.8576]}, {"w": "find", "b": [0.3971, 0.8428, 0.4273, 0.8576]}, {"w": "the", "b": [0.4331, 0.8428, 0.4582, 0.8576]}, {"w": "best", "b": [0.464, 0.8428, 0.4968, 0.8576]}, {"w": "values", "b": [0.5026, 0.8428, 0.5505, 0.8576]}, {"w": "for", "b": [0.5563, 0.8428, 0.5779, 0.8576]}, {"w": "the", "b": [0.5838, 0.8428, 0.6089, 0.8576]}, {"w": "hyperparameters", "b": [0.6147, 0.8428, 0.7471, 0.8576]}, {"w": "of", "b": [0.7529, 0.8428, 0.7675, 0.8576]}, {"w": "the", "b": [0.7733, 0.8428, 0.7985, 0.8576]}, {"w": "machine", "b": [0.8043, 0.8428, 0.8691, 0.8576]}, {"w": "learning", "b": [0.1312, 0.8607, 0.1958, 0.8756]}, {"w": "pipeline.", "b": [0.202, 0.8607, 0.2701, 0.8756]}, {"w": "The", "b": [0.2784, 0.8607, 0.3101, 0.8756]}, {"w": "analyst", "b": [0.3163, 0.8607, 0.3743, 0.8756]}, {"w": "tries", "b": [0.3805, 0.8607, 0.4155, 0.8756]}, {"w": "different", "b": [0.4216, 0.8607, 0.4883, 0.8756]}, {"w": "combinations", "b": [0.4944, 0.8607, 0.6006, 0.8756]}, {"w": "of", "b": [0.6067, 0.8607, 0.6216, 0.8756]}, {"w": "hyperparameter", "b": [0.6277, 0.8607, 0.7554, 0.8756]}, {"w": "values", "b": [0.7616, 0.8607, 0.8104, 0.8756]}, {"w": "one", "b": [0.8165, 0.8607, 0.8442, 0.8756]}, {"w": "by", "b": [0.8504, 0.8607, 0.8698, 0.8756]}]}, {"id": "b_39", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 26", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "26", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 70, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "one, trains a model by using each combination, and notes the model performance on the validation set. The hyperparameters that maximize the model performance are then used to train the model for production. We consider techniques of hyperparameter tuning in more detail in Section ?? of Chapter 5.", "words": [{"w": "one,", "b": [0.1312, 0.0883, 0.1647, 0.1034]}, {"w": "trains", "b": [0.1717, 0.0883, 0.219, 0.1034]}, {"w": "a", "b": [0.2258, 0.0883, 0.2352, 0.1034]}, {"w": "model", "b": [0.2421, 0.0883, 0.2917, 0.1034]}, {"w": "by", "b": [0.2986, 0.0883, 0.3185, 0.1034]}, {"w": "using", "b": [0.3253, 0.0883, 0.3683, 0.1034]}, {"w": "each", "b": [0.3752, 0.0883, 0.4112, 0.1034]}, {"w": "combination,", "b": [0.4181, 0.0883, 0.5243, 0.1034]}, {"w": "and", "b": [0.5313, 0.0883, 0.5616, 0.1034]}, {"w": "notes", "b": [0.5685, 0.0883, 0.6115, 0.1034]}, {"w": "the", "b": [0.6183, 0.0883, 0.6445, 0.1034]}, {"w": "model", "b": [0.6513, 0.0883, 0.701, 0.1034]}, {"w": "performance", "b": [0.7078, 0.0883, 0.8094, 0.1034]}, {"w": "on", "b": [0.8162, 0.0883, 0.8361, 0.1034]}, {"w": "the", "b": [0.8429, 0.0883, 0.8691, 0.1034]}, {"w": "validation", "b": [0.1308, 0.1064, 0.2092, 0.1213]}, {"w": "set.", "b": [0.2153, 0.1064, 0.2428, 0.1213]}, {"w": "The", "b": [0.251, 0.1064, 0.2823, 0.1213]}, {"w": "hyperparameters", "b": [0.2885, 0.1064, 0.4218, 0.1213]}, {"w": "that", "b": [0.428, 0.1064, 0.4614, 0.1213]}, {"w": "maximize", "b": [0.4675, 0.1064, 0.5429, 0.1213]}, {"w": "the", "b": [0.549, 0.1064, 0.5744, 0.1213]}, {"w": "model", "b": [0.5805, 0.1064, 0.6286, 0.1213]}, {"w": "performance", "b": [0.6347, 0.1064, 0.733, 0.1213]}, {"w": "are", "b": [0.7391, 0.1064, 0.7635, 0.1213]}, {"w": "then", "b": [0.7696, 0.1064, 0.8051, 0.1213]}, {"w": "used", "b": [0.8112, 0.1064, 0.8468, 0.1213]}, {"w": "to", "b": [0.8529, 0.1064, 0.8691, 0.1213]}, {"w": "train", "b": [0.1312, 0.1242, 0.1707, 0.1393]}, {"w": "the", "b": [0.1768, 0.1242, 0.2028, 0.1393]}, {"w": "model", "b": [0.2089, 0.1242, 0.2582, 0.1393]}, {"w": "for", "b": [0.2643, 0.1242, 0.2867, 0.1393]}, {"w": "production.", "b": [0.2928, 0.1242, 0.3868, 0.1393]}, {"w": "We", "b": [0.395, 0.1242, 0.421, 0.1393]}, {"w": "consider", "b": [0.4271, 0.1242, 0.4937, 0.1393]}, {"w": "techniques", "b": [0.4998, 0.1242, 0.5851, 0.1393]}, {"w": "of", "b": [0.5912, 0.1242, 0.6063, 0.1393]}, {"w": "hyperparameter", "b": [0.6124, 0.1242, 0.7417, 0.1393]}, {"w": "tuning", "b": [0.7479, 0.1242, 0.8008, 0.1393]}, {"w": "in", "b": [0.8069, 0.1242, 0.8225, 0.1393]}, {"w": "more", "b": [0.8286, 0.1242, 0.8692, 0.1393]}, {"w": "detail", "b": [0.1312, 0.1422, 0.1764, 0.1572]}, {"w": "in", "b": [0.1825, 0.1422, 0.1979, 0.1572]}, {"w": "Section", "b": [0.204, 0.1422, 0.2625, 0.1572]}, {"w": "??", "b": [0.2686, 0.1422, 0.2886, 0.1572]}, {"w": "of", "b": [0.2948, 0.1422, 0.3096, 0.1572]}, {"w": "Chapter", "b": [0.3158, 0.1422, 0.3815, 0.1572]}, {"w": "5.", "b": [0.3876, 0.1422, 0.402, 0.1572]}]}, {"id": "b_1", "type": "paragraph", "text": "The test set is used for reporting: once you have your best model, you test its performance on the test set and report the results.", "words": [{"w": "The", "b": [0.1306, 0.1692, 0.1619, 0.1841]}, {"w": "test", "b": [0.1681, 0.1692, 0.2027, 0.1841]}, {"w": "set", "b": [0.2097, 0.1692, 0.2361, 0.1841]}, {"w": "is", "b": [0.2422, 0.1692, 0.2545, 0.1841]}, {"w": "used", "b": [0.2606, 0.1692, 0.2962, 0.1841]}, {"w": "for", "b": [0.3023, 0.1692, 0.3241, 0.1841]}, {"w": "reporting:", "b": [0.3303, 0.1692, 0.4088, 0.1841]}, {"w": "once", "b": [0.417, 0.1692, 0.4525, 0.1841]}, {"w": "you", "b": [0.4586, 0.1692, 0.4869, 0.1841]}, {"w": "have", "b": [0.4931, 0.1692, 0.529, 0.1841]}, {"w": "your", "b": [0.5352, 0.1692, 0.5706, 0.1841]}, {"w": "best", "b": [0.5768, 0.1692, 0.6098, 0.1841]}, {"w": "model,", "b": [0.6159, 0.1692, 0.6691, 0.1841]}, {"w": "you", "b": [0.6752, 0.1692, 0.7036, 0.1841]}, {"w": "test", "b": [0.7097, 0.1692, 0.7392, 0.1841]}, {"w": "its", "b": [0.7453, 0.1692, 0.7646, 0.1841]}, {"w": "performance", "b": [0.7708, 0.1692, 0.8691, 0.1841]}, {"w": "on", "b": [0.1312, 0.1871, 0.1507, 0.2021]}, {"w": "the", "b": [0.1569, 0.1871, 0.1825, 0.2021]}, {"w": "test", "b": [0.1887, 0.1871, 0.2185, 0.2021]}, {"w": "set", "b": [0.2247, 0.1871, 0.2473, 0.2021]}, {"w": "and", "b": [0.2535, 0.1871, 0.2832, 0.2021]}, {"w": "report", "b": [0.2894, 0.1871, 0.3392, 0.2021]}, {"w": "the", "b": [0.3454, 0.1871, 0.371, 0.2021]}, {"w": "results.", "b": [0.3771, 0.1871, 0.4349, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "Validation and test sets are often referred to as holdout sets: they contain the examples that the learning algorithm is not allowed to see.", "words": [{"w": "Validation", "b": [0.1305, 0.2139, 0.2153, 0.229]}, {"w": "and", "b": [0.2216, 0.2139, 0.2519, 0.229]}, {"w": "test", "b": [0.2582, 0.2139, 0.2886, 0.229]}, {"w": "sets", "b": [0.2949, 0.2139, 0.3254, 0.229]}, {"w": "are", "b": [0.3317, 0.2139, 0.3569, 0.229]}, {"w": "often", "b": [0.3631, 0.2139, 0.4045, 0.229]}, {"w": "referred", "b": [0.4108, 0.2139, 0.4742, 0.229]}, {"w": "to", "b": [0.4805, 0.2139, 0.4972, 0.229]}, {"w": "as", "b": [0.5035, 0.2139, 0.5204, 0.229]}, {"w": "holdout", "b": [0.5264, 0.214, 0.5971, 0.229]}, {"w": "sets:", "b": [0.6044, 0.2139, 0.6443, 0.229]}, {"w": "they", "b": [0.6527, 0.2139, 0.6888, 0.229]}, {"w": "contain", "b": [0.6951, 0.2139, 0.7553, 0.229]}, {"w": "the", "b": [0.7616, 0.2139, 0.7877, 0.229]}, {"w": "examples", "b": [0.794, 0.2139, 0.8689, 0.229]}, {"w": "that", "b": [0.1312, 0.232, 0.1651, 0.2469]}, {"w": "the", "b": [0.1712, 0.232, 0.1969, 0.2469]}, {"w": "learning", "b": [0.203, 0.232, 0.2677, 0.2469]}, {"w": "algorithm", "b": [0.2738, 0.232, 0.3518, 0.2469]}, {"w": "is", "b": [0.3579, 0.232, 0.3704, 0.2469]}, {"w": "not", "b": [0.3765, 0.232, 0.4032, 0.2469]}, {"w": "allowed", "b": [0.4093, 0.232, 0.4688, 0.2469]}, {"w": "to", "b": [0.4749, 0.232, 0.4913, 0.2469]}, {"w": "see.", "b": [0.4975, 0.232, 0.5263, 0.2469]}]}, {"id": "b_3", "type": "paragraph", "text": "To obtain good partitions of your entire dataset into these three disjoint sets, as schematically illustrated in Figure 12, partitioning has to satisfy several conditions.", "words": [{"w": "To", "b": [0.1306, 0.259, 0.1511, 0.2738]}, {"w": "obtain", "b": [0.1565, 0.259, 0.2068, 0.2738]}, {"w": "good", "b": [0.2122, 0.259, 0.2504, 0.2738]}, {"w": "partitions", "b": [0.2558, 0.259, 0.3323, 0.2738]}, {"w": "of", "b": [0.3378, 0.259, 0.3523, 0.2738]}, {"w": "your", "b": [0.3577, 0.259, 0.393, 0.2738]}, {"w": "entire", "b": [0.3984, 0.259, 0.4432, 0.2738]}, {"w": "dataset", "b": [0.4486, 0.259, 0.506, 0.2738]}, {"w": "into", "b": [0.5114, 0.259, 0.542, 0.2738]}, {"w": "these", "b": [0.5474, 0.259, 0.5877, 0.2738]}, {"w": "three", "b": [0.5932, 0.259, 0.6334, 0.2738]}, {"w": "disjoint", "b": [0.6388, 0.259, 0.6972, 0.2738]}, {"w": "sets,", "b": [0.7027, 0.259, 0.737, 0.2738]}, {"w": "as", "b": [0.7426, 0.259, 0.7588, 0.2738]}, {"w": "schematically", "b": [0.7642, 0.259, 0.8698, 0.2738]}, {"w": "illustrated", "b": [0.1312, 0.2768, 0.2134, 0.2918]}, {"w": "in", "b": [0.2196, 0.2768, 0.235, 0.2918]}, {"w": "Figure", "b": [0.2411, 0.2768, 0.2932, 0.2918]}, {"w": "12,", "b": [0.2994, 0.2768, 0.323, 0.2918]}, {"w": "partitioning", "b": [0.3291, 0.2768, 0.4245, 0.2918]}, {"w": "has", "b": [0.4307, 0.2768, 0.4574, 0.2918]}, {"w": "to", "b": [0.4636, 0.2768, 0.48, 0.2918]}, {"w": "satisfy", "b": [0.4861, 0.2768, 0.5376, 0.2918]}, {"w": "several", "b": [0.5438, 0.2768, 0.5983, 0.2918]}, {"w": "conditions.", "b": [0.6044, 0.2768, 0.6917, 0.2918]}]}, {"id": "b_4", "type": "paragraph", "text": "Condition 1: Split was applied to raw data.", "words": [{"w": "Condition", "b": [0.1312, 0.3038, 0.2232, 0.3187]}, {"w": "1:", "b": [0.2303, 0.3038, 0.2468, 0.3187]}, {"w": "Split", "b": [0.2562, 0.3038, 0.2998, 0.3187]}, {"w": "was", "b": [0.3069, 0.3038, 0.3404, 0.3187]}, {"w": "applied", "b": [0.3474, 0.3038, 0.4146, 0.3187]}, {"w": "to", "b": [0.4217, 0.3038, 0.4406, 0.3187]}, {"w": "raw", "b": [0.4476, 0.3038, 0.4814, 0.3187]}, {"w": "data.", "b": [0.4885, 0.3038, 0.5351, 0.3187]}]}, {"id": "b_5", "type": "paragraph", "text": "Once you have access to raw examples, and before everything else, do the split. This will allow avoiding data leakage, as we will see later.", "words": [{"w": "Once", "b": [0.1774, 0.3216, 0.2188, 0.3367]}, {"w": "you", "b": [0.2249, 0.3216, 0.2539, 0.3367]}, {"w": "have", "b": [0.2601, 0.3216, 0.2969, 0.3367]}, {"w": "access", "b": [0.303, 0.3216, 0.3519, 0.3367]}, {"w": "to", "b": [0.3581, 0.3216, 0.3747, 0.3367]}, {"w": "raw", "b": [0.3808, 0.3216, 0.4104, 0.3367]}, {"w": "examples,", "b": [0.4165, 0.3216, 0.4958, 0.3367]}, {"w": "and", "b": [0.502, 0.3216, 0.532, 0.3367]}, {"w": "before", "b": [0.5382, 0.3216, 0.588, 0.3367]}, {"w": "everything", "b": [0.5941, 0.3216, 0.6796, 0.3367]}, {"w": "else,", "b": [0.6858, 0.3216, 0.7201, 0.3367]}, {"w": "do", "b": [0.7262, 0.3216, 0.7459, 0.3367]}, {"w": "the", "b": [0.752, 0.3216, 0.7779, 0.3367]}, {"w": "split.", "b": [0.7841, 0.3216, 0.8246, 0.3367]}, {"w": "This", "b": [0.8328, 0.3216, 0.8691, 0.3367]}, {"w": "will", "b": [0.1767, 0.3396, 0.2054, 0.3546]}, {"w": "allow", "b": [0.2115, 0.3396, 0.2531, 0.3546]}, {"w": "avoiding", "b": [0.2592, 0.3396, 0.3264, 0.3546]}, {"w": "data", "b": [0.3325, 0.3396, 0.3684, 0.3546]}, {"w": "leakage,", "b": [0.3746, 0.3396, 0.4387, 0.3546]}, {"w": "as", "b": [0.4448, 0.3396, 0.4613, 0.3546]}, {"w": "we", "b": [0.4675, 0.3396, 0.4885, 0.3546]}, {"w": "will", "b": [0.4946, 0.3396, 0.5233, 0.3546]}, {"w": "see", "b": [0.5295, 0.3396, 0.5532, 0.3546]}, {"w": "later.", "b": [0.5593, 0.3396, 0.6014, 0.3546]}]}, {"id": "b_6", "type": "paragraph", "text": "Condition 2: Data was randomized before the split.", "words": [{"w": "Condition", "b": [0.1312, 0.3666, 0.2232, 0.3815]}, {"w": "2:", "b": [0.2303, 0.3666, 0.2468, 0.3815]}, {"w": "Data", "b": [0.2562, 0.3666, 0.3014, 0.3815]}, {"w": "was", "b": [0.3084, 0.3666, 0.3419, 0.3815]}, {"w": "randomized", "b": [0.3489, 0.3666, 0.4567, 0.3815]}, {"w": "before", "b": [0.4638, 0.3666, 0.5214, 0.3815]}, {"w": "the", "b": [0.5285, 0.3666, 0.5583, 0.3815]}, {"w": "split.", "b": [0.5653, 0.3666, 0.6114, 0.3815]}]}, {"id": "b_7", "type": "paragraph", "text": "Randomly shuffle your examples first, then do the split.", "words": [{"w": "Randomly", "b": [0.1774, 0.3845, 0.2601, 0.3995]}, {"w": "shuffle", "b": [0.2663, 0.3845, 0.3171, 0.3995]}, {"w": "your", "b": [0.3233, 0.3845, 0.3592, 0.3995]}, {"w": "examples", "b": [0.3654, 0.3845, 0.4388, 0.3995]}, {"w": "first,", "b": [0.445, 0.3845, 0.482, 0.3995]}, {"w": "then", "b": [0.4882, 0.3845, 0.5241, 0.3995]}, {"w": "do", "b": [0.5303, 0.3845, 0.5497, 0.3995]}, {"w": "the", "b": [0.5559, 0.3845, 0.5815, 0.3995]}, {"w": "split.", "b": [0.5877, 0.3845, 0.6278, 0.3995]}]}, {"id": "b_8", "type": "paragraph", "text": "Condition 3: Validation and test sets follow the same distribution.", "words": [{"w": "Condition", "b": [0.1312, 0.4114, 0.2232, 0.4264]}, {"w": "3:", "b": [0.2303, 0.4114, 0.2468, 0.4264]}, {"w": "Validation", "b": [0.2562, 0.4114, 0.3512, 0.4264]}, {"w": "and", "b": [0.3583, 0.4114, 0.3922, 0.4264]}, {"w": "test", "b": [0.3993, 0.4114, 0.4339, 0.4264]}, {"w": "sets", "b": [0.4409, 0.4114, 0.4757, 0.4264]}, {"w": "follow", "b": [0.4827, 0.4114, 0.537, 0.4264]}, {"w": "the", "b": [0.5441, 0.4114, 0.5738, 0.4264]}, {"w": "same", "b": [0.5809, 0.4114, 0.627, 0.4264]}, {"w": "distribution.", "b": [0.634, 0.4114, 0.749, 0.4264]}]}, {"id": "b_9", "type": "paragraph", "text": "When you select the best values of hyperparameters using the validation set, you want", "words": [{"w": "When", "b": [0.1764, 0.4295, 0.2235, 0.4443]}, {"w": "you", "b": [0.2296, 0.4295, 0.258, 0.4443]}, {"w": "select", "b": [0.2641, 0.4295, 0.3078, 0.4443]}, {"w": "the", "b": [0.3139, 0.4295, 0.3392, 0.4443]}, {"w": "best", "b": [0.3454, 0.4295, 0.3784, 0.4443]}, {"w": "values", "b": [0.3846, 0.4295, 0.4328, 0.4443]}, {"w": "of", "b": [0.4389, 0.4295, 0.4536, 0.4443]}, {"w": "hyperparameters", "b": [0.4598, 0.4295, 0.5931, 0.4443]}, {"w": "using", "b": [0.5993, 0.4295, 0.6409, 0.4443]}, {"w": "the", "b": [0.647, 0.4295, 0.6724, 0.4443]}, {"w": "validation", "b": [0.6785, 0.4295, 0.7569, 0.4443]}, {"w": "set,", "b": [0.7631, 0.4295, 0.7905, 0.4443]}, {"w": "you", "b": [0.7967, 0.4295, 0.825, 0.4443]}, {"w": "want", "b": [0.8312, 0.4295, 0.8696, 0.4443]}]}, {"id": "b_10", "type": "paragraph", "text": "that this selection yields a model that works well in production. The examples in the test set are your best representatives of the production data. Hence the need for the validation and test sets to follow the same distribution.", "words": [{"w": "that", "b": [0.1774, 0.4473, 0.2113, 0.4623]}, {"w": "this", "b": [0.2174, 0.4473, 0.2474, 0.4623]}, {"w": "selection", "b": [0.2535, 0.4473, 0.3225, 0.4623]}, {"w": "yields", "b": [0.3287, 0.4473, 0.3745, 0.4623]}, {"w": "a", "b": [0.3807, 0.4473, 0.3899, 0.4623]}, {"w": "model", "b": [0.396, 0.4473, 0.4449, 0.4623]}, {"w": "that", "b": [0.451, 0.4473, 0.485, 0.4623]}, {"w": "works", "b": [0.4911, 0.4473, 0.5375, 0.4623]}, {"w": "well", "b": [0.5436, 0.4473, 0.575, 0.4623]}, {"w": "in", "b": [0.5811, 0.4473, 0.5966, 0.4623]}, {"w": "production.", "b": [0.6027, 0.4473, 0.6958, 0.4623]}, {"w": "The", "b": [0.704, 0.4473, 0.7359, 0.4623]}, {"w": "examples", "b": [0.742, 0.4473, 0.8157, 0.4623]}, {"w": "in", "b": [0.8218, 0.4473, 0.8373, 0.4623]}, {"w": "the", "b": [0.8434, 0.4473, 0.8691, 0.4623]}, {"w": "test", "b": [0.1774, 0.4652, 0.2077, 0.4803]}, {"w": "set", "b": [0.2138, 0.4652, 0.2368, 0.4803]}, {"w": "are", "b": [0.243, 0.4652, 0.268, 0.4803]}, {"w": "your", "b": [0.2742, 0.4652, 0.3106, 0.4803]}, {"w": "best", "b": [0.3168, 0.4652, 0.3507, 0.4803]}, {"w": "representatives", "b": [0.3569, 0.4652, 0.4785, 0.4803]}, {"w": "of", "b": [0.4847, 0.4652, 0.4998, 0.4803]}, {"w": "the", "b": [0.5059, 0.4652, 0.532, 0.4803]}, {"w": "production", "b": [0.5381, 0.4652, 0.6271, 0.4803]}, {"w": "data.", "b": [0.6333, 0.4652, 0.6749, 0.4803]}, {"w": "Hence", "b": [0.6831, 0.4652, 0.7326, 0.4803]}, {"w": "the", "b": [0.7387, 0.4652, 0.7648, 0.4803]}, {"w": "need", "b": [0.7709, 0.4652, 0.8084, 0.4803]}, {"w": "for", "b": [0.8146, 0.4652, 0.837, 0.4803]}, {"w": "the", "b": [0.8431, 0.4652, 0.8692, 0.4803]}, {"w": "validation", "b": [0.1769, 0.4832, 0.2563, 0.4982]}, {"w": "and", "b": [0.2625, 0.4832, 0.2922, 0.4982]}, {"w": "test", "b": [0.2984, 0.4832, 0.3282, 0.4982]}, {"w": "sets", "b": [0.3344, 0.4832, 0.3643, 0.4982]}, {"w": "to", "b": [0.3705, 0.4832, 0.3869, 0.4982]}, {"w": "follow", "b": [0.393, 0.4832, 0.4402, 0.4982]}, {"w": "the", "b": [0.4463, 0.4832, 0.472, 0.4982]}, {"w": "same", "b": [0.4781, 0.4832, 0.5182, 0.4982]}, {"w": "distribution.", "b": [0.5244, 0.4832, 0.624, 0.4982]}]}, {"id": "b_11", "type": "paragraph", "text": "Condition 4: Leakage during the split was avoided.", "words": [{"w": "Condition", "b": [0.1312, 0.5102, 0.2232, 0.5251]}, {"w": "4:", "b": [0.2303, 0.5102, 0.2468, 0.5251]}, {"w": "Leakage", "b": [0.2562, 0.5102, 0.3309, 0.5251]}, {"w": "during", "b": [0.3379, 0.5102, 0.3986, 0.5251]}, {"w": "the", "b": [0.4056, 0.5102, 0.4354, 0.5251]}, {"w": "split", "b": [0.4425, 0.5102, 0.4827, 0.5251]}, {"w": "was", "b": [0.4897, 0.5102, 0.5232, 0.5251]}, {"w": "avoided.", "b": [0.5303, 0.5102, 0.6063, 0.5251]}]}, {"id": "b_12", "type": "paragraph", "text": "Data leakage can happen even during the data partitioning. Below, we will see what forms of leakage can happen at that stage.", "words": [{"w": "Data", "b": [0.1774, 0.528, 0.2176, 0.5431]}, {"w": "leakage", "b": [0.2237, 0.528, 0.2835, 0.5431]}, {"w": "can", "b": [0.2896, 0.528, 0.3176, 0.5431]}, {"w": "happen", "b": [0.3237, 0.528, 0.3835, 0.5431]}, {"w": "even", "b": [0.3896, 0.528, 0.426, 0.5431]}, {"w": "during", "b": [0.4321, 0.528, 0.4851, 0.5431]}, {"w": "the", "b": [0.4913, 0.528, 0.5172, 0.5431]}, {"w": "data", "b": [0.5234, 0.528, 0.5597, 0.5431]}, {"w": "partitioning.", "b": [0.5658, 0.528, 0.6677, 0.5431]}, {"w": "Below,", "b": [0.6759, 0.528, 0.7301, 0.5431]}, {"w": "we", "b": [0.7363, 0.528, 0.7576, 0.5431]}, {"w": "will", "b": [0.7637, 0.528, 0.7928, 0.5431]}, {"w": "see", "b": [0.7989, 0.528, 0.8229, 0.5431]}, {"w": "what", "b": [0.829, 0.528, 0.8695, 0.5431]}, {"w": "forms", "b": [0.1774, 0.546, 0.2221, 0.561]}, {"w": "of", "b": [0.2283, 0.546, 0.2431, 0.561]}, {"w": "leakage", "b": [0.2493, 0.546, 0.3082, 0.561]}, {"w": "can", "b": [0.3144, 0.546, 0.3421, 0.561]}, {"w": "happen", "b": [0.3482, 0.546, 0.4072, 0.561]}, {"w": "at", "b": [0.4134, 0.546, 0.4298, 0.561]}, {"w": "that", "b": [0.4359, 0.546, 0.4697, 0.561]}, {"w": "stage.", "b": [0.4759, 0.546, 0.5221, 0.561]}]}, {"id": "b_13", "type": "paragraph", "text": "There is no ideal ratio for the split. In older literature (pre-big data), you might find the recommended splits of either 70%/15%/15% or 80%/10%/10% (for training, validation, and test sets, respectively, in proportion to the entire dataset).", "words": [{"w": "There", "b": [0.1306, 0.5728, 0.1787, 0.5879]}, {"w": "is", "b": [0.1853, 0.5728, 0.198, 0.5879]}, {"w": "no", "b": [0.2045, 0.5728, 0.2244, 0.5879]}, {"w": "ideal", "b": [0.2309, 0.5728, 0.2696, 0.5879]}, {"w": "ratio", "b": [0.2762, 0.5728, 0.3149, 0.5879]}, {"w": "for", "b": [0.3215, 0.5728, 0.344, 0.5879]}, {"w": "the", "b": [0.3506, 0.5728, 0.3767, 0.5879]}, {"w": "split.", "b": [0.3833, 0.5728, 0.4242, 0.5879]}, {"w": "In", "b": [0.4336, 0.5728, 0.4508, 0.5879]}, {"w": "older", "b": [0.4574, 0.5728, 0.4982, 0.5879]}, {"w": "literature", "b": [0.5048, 0.5728, 0.5812, 0.5879]}, {"w": "(pre-big", "b": [0.5878, 0.5728, 0.6527, 0.5879]}, {"w": "data),", "b": [0.6592, 0.5728, 0.7084, 0.5879]}, {"w": "you", "b": [0.715, 0.5728, 0.7443, 0.5879]}, {"w": "might", "b": [0.7509, 0.5728, 0.7985, 0.5879]}, {"w": "find", "b": [0.805, 0.5728, 0.8364, 0.5879]}, {"w": "the", "b": [0.843, 0.5728, 0.8691, 0.5879]}, {"w": "recommended", "b": [0.1312, 0.591, 0.2409, 0.6058]}, {"w": "splits", "b": [0.2471, 0.591, 0.2889, 0.6058]}, {"w": "of", "b": [0.2951, 0.591, 0.3098, 0.6058]}, {"w": "either", "b": [0.3159, 0.591, 0.3617, 0.6058]}, {"w": "70%/15%/15%", "b": [0.3677, 0.5909, 0.4866, 0.6058]}, {"w": "or", "b": [0.4927, 0.591, 0.509, 0.6058]}, {"w": "80%/10%/10%", "b": [0.5152, 0.5909, 0.634, 0.6058]}, {"w": "(for", "b": [0.6402, 0.591, 0.6692, 0.6058]}, {"w": "training,", "b": [0.6753, 0.591, 0.7434, 0.6058]}, {"w": "validation,", "b": [0.7495, 0.591, 0.8333, 0.6058]}, {"w": "and", "b": [0.8394, 0.591, 0.8689, 0.6058]}, {"w": "test", "b": [0.1312, 0.6089, 0.1611, 0.6238]}, {"w": "sets,", "b": [0.1672, 0.6089, 0.2023, 0.6238]}, {"w": "respectively,", "b": [0.2085, 0.6089, 0.3066, 0.6238]}, {"w": "in", "b": [0.3127, 0.6089, 0.3281, 0.6238]}, {"w": "proportion", "b": [0.3343, 0.6089, 0.42, 0.6238]}, {"w": "to", "b": [0.4261, 0.6089, 0.4425, 0.6238]}, {"w": "the", "b": [0.4487, 0.6089, 0.4743, 0.6238]}, {"w": "entire", "b": [0.4805, 0.6089, 0.5262, 0.6238]}, {"w": "dataset).", "b": [0.5323, 0.6089, 0.6032, 0.6238]}]}, {"id": "b_14", "type": "paragraph", "text": "Today, in the era of the Internet and cheap labor (e.g., Mechanical Turk or crowdsourcing), organizations, scientists, and even enthusiasts at home can get access to millions of training examples. That makes it wasteful only to use 70% or 80% of the available data for training.", "words": [{"w": "Today,", "b": [0.1306, 0.6358, 0.1845, 0.6507]}, {"w": "in", "b": [0.1906, 0.6358, 0.206, 0.6507]}, {"w": "the", "b": [0.2122, 0.6358, 0.2378, 0.6507]}, {"w": "era", "b": [0.244, 0.6358, 0.2687, 0.6507]}, {"w": "of", "b": [0.2748, 0.6358, 0.2897, 0.6507]}, {"w": "the", "b": [0.2959, 0.6358, 0.3216, 0.6507]}, {"w": "Internet", "b": [0.3277, 0.6358, 0.3924, 0.6507]}, {"w": "and", "b": [0.3986, 0.6358, 0.4284, 0.6507]}, {"w": "cheap", "b": [0.4345, 0.6358, 0.4802, 0.6507]}, {"w": "labor", "b": [0.4864, 0.6358, 0.528, 0.6507]}, {"w": "(e.g.,", "b": [0.5342, 0.6358, 0.5742, 0.6507]}, {"w": "Mechanical", "b": [0.5803, 0.6358, 0.6707, 0.6507]}, {"w": "Turk", "b": [0.6769, 0.6358, 0.7159, 0.6507]}, {"w": "or", "b": [0.7221, 0.6358, 0.7385, 0.6507]}, {"w": "crowdsourcing),", "b": [0.7447, 0.6358, 0.8717, 0.6507]}, {"w": "organizations,", "b": [0.1312, 0.6537, 0.2426, 0.6687]}, {"w": "scientists,", "b": [0.2487, 0.6537, 0.3261, 0.6687]}, {"w": "and", "b": [0.3322, 0.6537, 0.3618, 0.6687]}, {"w": "even", "b": [0.3679, 0.6537, 0.4037, 0.6687]}, {"w": "enthusiasts", "b": [0.4098, 0.6537, 0.4979, 0.6687]}, {"w": "at", "b": [0.504, 0.6537, 0.5203, 0.6687]}, {"w": "home", "b": [0.5264, 0.6537, 0.5693, 0.6687]}, {"w": "can", "b": [0.5754, 0.6537, 0.603, 0.6687]}, {"w": "get", "b": [0.6091, 0.6537, 0.6336, 0.6687]}, {"w": "access", "b": [0.6397, 0.6537, 0.6879, 0.6687]}, {"w": "to", "b": [0.694, 0.6537, 0.7103, 0.6687]}, {"w": "millions", "b": [0.7165, 0.6537, 0.7788, 0.6687]}, {"w": "of", "b": [0.7849, 0.6537, 0.7997, 0.6687]}, {"w": "training", "b": [0.8058, 0.6537, 0.8691, 0.6687]}, {"w": "examples.", "b": [0.1312, 0.6717, 0.2095, 0.6866]}, {"w": "That", "b": [0.2177, 0.6717, 0.2575, 0.6866]}, {"w": "makes", "b": [0.2636, 0.6717, 0.3128, 0.6866]}, {"w": "it", "b": [0.3189, 0.6717, 0.3312, 0.6866]}, {"w": "wasteful", "b": [0.3373, 0.6717, 0.4028, 0.6866]}, {"w": "only", "b": [0.4089, 0.6717, 0.4431, 0.6866]}, {"w": "to", "b": [0.4493, 0.6717, 0.4656, 0.6866]}, {"w": "use", "b": [0.4718, 0.6717, 0.4974, 0.6866]}, {"w": "70%", "b": [0.5034, 0.6717, 0.5371, 0.6866]}, {"w": "or", "b": [0.5433, 0.6717, 0.5597, 0.6866]}, {"w": "80%", "b": [0.5658, 0.6717, 0.5995, 0.6866]}, {"w": "of", "b": [0.6056, 0.6717, 0.6205, 0.6866]}, {"w": "the", "b": [0.6266, 0.6717, 0.6522, 0.6866]}, {"w": "available", "b": [0.6583, 0.6717, 0.7277, 0.6866]}, {"w": "data", "b": [0.7339, 0.6717, 0.7696, 0.6866]}, {"w": "for", "b": [0.7758, 0.6717, 0.7978, 0.6866]}, {"w": "training.", "b": [0.8039, 0.6717, 0.8724, 0.6866]}]}, {"id": "b_15", "type": "paragraph", "text": "The validation and test data are only used to calculate statistics reflecting the performance of the model. Those two sets just need to be large enough to provide reliable statistics. How much is debatable. As a rule of thumb, having a dozen examples per class is a desirable minimum. If you can have a hundred examples per class in each of the two holdout sets, you have a solid setup and the statistics calculated based on such sets are reliable.", "words": [{"w": "The", "b": [0.1306, 0.6986, 0.1623, 0.7135]}, {"w": "validation", "b": [0.1685, 0.6986, 0.2479, 0.7135]}, {"w": "and", "b": [0.254, 0.6986, 0.2837, 0.7135]}, {"w": "test", "b": [0.2899, 0.6986, 0.3197, 0.7135]}, {"w": "data", "b": [0.3259, 0.6986, 0.3617, 0.7135]}, {"w": "are", "b": [0.3679, 0.6986, 0.3925, 0.7135]}, {"w": "only", "b": [0.3987, 0.6986, 0.433, 0.7135]}, {"w": "used", "b": [0.4392, 0.6986, 0.4752, 0.7135]}, {"w": "to", "b": [0.4813, 0.6986, 0.4977, 0.7135]}, {"w": "calculate", "b": [0.5039, 0.6986, 0.5746, 0.7135]}, {"w": "statistics", "b": [0.5807, 0.6986, 0.6517, 0.7135]}, {"w": "reflecting", "b": [0.6579, 0.6986, 0.7317, 0.7135]}, {"w": "the", "b": [0.7379, 0.6986, 0.7635, 0.7135]}, {"w": "performance", "b": [0.7697, 0.6986, 0.8691, 0.7135]}, {"w": "of", "b": [0.1312, 0.7166, 0.1459, 0.7315]}, {"w": "the", "b": [0.152, 0.7166, 0.1772, 0.7315]}, {"w": "model.", "b": [0.1834, 0.7166, 0.2363, 0.7315]}, {"w": "Those", "b": [0.2445, 0.7166, 0.292, 0.7315]}, {"w": "two", "b": [0.2981, 0.7166, 0.3263, 0.7315]}, {"w": "sets", "b": [0.3325, 0.7166, 0.3619, 0.7315]}, {"w": "just", "b": [0.3681, 0.7166, 0.3979, 0.7315]}, {"w": "need", "b": [0.4041, 0.7166, 0.4404, 0.7315]}, {"w": "to", "b": [0.4466, 0.7166, 0.4627, 0.7315]}, {"w": "be", "b": [0.4688, 0.7166, 0.4875, 0.7315]}, {"w": "large", "b": [0.4937, 0.7166, 0.532, 0.7315]}, {"w": "enough", "b": [0.5382, 0.7166, 0.5946, 0.7315]}, {"w": "to", "b": [0.6008, 0.7166, 0.6169, 0.7315]}, {"w": "provide", "b": [0.6231, 0.7166, 0.6816, 0.7315]}, {"w": "reliable", "b": [0.6877, 0.7166, 0.7452, 0.7315]}, {"w": "statistics.", "b": [0.7514, 0.7166, 0.8263, 0.7315]}, {"w": "How", "b": [0.8345, 0.7166, 0.8698, 0.7315]}, {"w": "much", "b": [0.1312, 0.7344, 0.1752, 0.7495]}, {"w": "is", "b": [0.1822, 0.7344, 0.1948, 0.7495]}, {"w": "debatable.", "b": [0.2018, 0.7344, 0.2865, 0.7495]}, {"w": "As", "b": [0.2972, 0.7344, 0.3188, 0.7495]}, {"w": "a", "b": [0.3258, 0.7344, 0.3352, 0.7495]}, {"w": "rule", "b": [0.3421, 0.7344, 0.3736, 0.7495]}, {"w": "of", "b": [0.3806, 0.7344, 0.3957, 0.7495]}, {"w": "thumb,", "b": [0.4027, 0.7344, 0.4613, 0.7495]}, {"w": "having", "b": [0.4685, 0.7344, 0.5229, 0.7495]}, {"w": "a", "b": [0.5299, 0.7344, 0.5393, 0.7495]}, {"w": "dozen", "b": [0.5463, 0.7344, 0.5933, 0.7495]}, {"w": "examples", "b": [0.6003, 0.7344, 0.6752, 0.7495]}, {"w": "per", "b": [0.6822, 0.7344, 0.7089, 0.7495]}, {"w": "class", "b": [0.7159, 0.7344, 0.7538, 0.7495]}, {"w": "is", "b": [0.7607, 0.7344, 0.7734, 0.7495]}, {"w": "a", "b": [0.7804, 0.7344, 0.7898, 0.7495]}, {"w": "desirable", "b": [0.7968, 0.7344, 0.8691, 0.7495]}, {"w": "minimum.", "b": [0.1312, 0.7525, 0.2111, 0.7673]}, {"w": "If", "b": [0.2193, 0.7525, 0.2314, 0.7673]}, {"w": "you", "b": [0.2375, 0.7525, 0.2656, 0.7673]}, {"w": "can", "b": [0.2718, 0.7525, 0.2989, 0.7673]}, {"w": "have", "b": [0.3051, 0.7525, 0.3407, 0.7673]}, {"w": "a", "b": [0.3469, 0.7525, 0.356, 0.7673]}, {"w": "hundred", "b": [0.3621, 0.7525, 0.427, 0.7673]}, {"w": "examples", "b": [0.4331, 0.7525, 0.5051, 0.7673]}, {"w": "per", "b": [0.5112, 0.7525, 0.5369, 0.7673]}, {"w": "class", "b": [0.5431, 0.7525, 0.5795, 0.7673]}, {"w": "in", "b": [0.5856, 0.7525, 0.6007, 0.7673]}, {"w": "each", "b": [0.6069, 0.7525, 0.6415, 0.7673]}, {"w": "of", "b": [0.6477, 0.7525, 0.6623, 0.7673]}, {"w": "the", "b": [0.6684, 0.7525, 0.6936, 0.7673]}, {"w": "two", "b": [0.6997, 0.7525, 0.7278, 0.7673]}, {"w": "holdout", "b": [0.734, 0.7525, 0.7943, 0.7673]}, {"w": "sets,", "b": [0.8004, 0.7525, 0.8348, 0.7673]}, {"w": "you", "b": [0.841, 0.7525, 0.8691, 0.7673]}, {"w": "have", "b": [0.1312, 0.7704, 0.1676, 0.7853]}, {"w": "a", "b": [0.1738, 0.7704, 0.183, 0.7853]}, {"w": "solid", "b": [0.1892, 0.7704, 0.2262, 0.7853]}, {"w": "setup", "b": [0.2323, 0.7704, 0.2755, 0.7853]}, {"w": "and", "b": [0.2817, 0.7704, 0.3114, 0.7853]}, {"w": "the", "b": [0.3176, 0.7704, 0.3432, 0.7853]}, {"w": "statistics", "b": [0.3494, 0.7704, 0.4204, 0.7853]}, {"w": "calculated", "b": [0.4266, 0.7704, 0.5076, 0.7853]}, {"w": "based", "b": [0.5138, 0.7704, 0.559, 0.7853]}, {"w": "on", "b": [0.5651, 0.7704, 0.5846, 0.7853]}, {"w": "such", "b": [0.5908, 0.7704, 0.6263, 0.7853]}, {"w": "sets", "b": [0.6324, 0.7704, 0.6624, 0.7853]}, {"w": "are", "b": [0.6685, 0.7704, 0.6932, 0.7853]}, {"w": "reliable.", "b": [0.6993, 0.7704, 0.763, 0.7853]}]}, {"id": "b_16", "type": "paragraph", "text": "The percentage of the split can also be dependent on the chosen machine learning algorithm or model. Deep learning models tend to significantly improve when exposed to more training data. This is less true for shallow algorithms and models.", "words": [{"w": "The", "b": [0.1306, 0.7974, 0.1619, 0.8122]}, {"w": "percentage", "b": [0.1681, 0.7974, 0.2532, 0.8122]}, {"w": "of", "b": [0.2593, 0.7974, 0.274, 0.8122]}, {"w": "the", "b": [0.2802, 0.7974, 0.3055, 0.8122]}, {"w": "split", "b": [0.3117, 0.7974, 0.3462, 0.8122]}, {"w": "can", "b": [0.3523, 0.7974, 0.3797, 0.8122]}, {"w": "also", "b": [0.3858, 0.7974, 0.4163, 0.8122]}, {"w": "be", "b": [0.4225, 0.7974, 0.4412, 0.8122]}, {"w": "dependent", "b": [0.4474, 0.7974, 0.5294, 0.8122]}, {"w": "on", "b": [0.5355, 0.7974, 0.5548, 0.8122]}, {"w": "the", "b": [0.5609, 0.7974, 0.5862, 0.8122]}, {"w": "chosen", "b": [0.5924, 0.7974, 0.6446, 0.8122]}, {"w": "machine", "b": [0.6508, 0.7974, 0.7161, 0.8122]}, {"w": "learning", "b": [0.7222, 0.7974, 0.786, 0.8122]}, {"w": "algorithm", "b": [0.7922, 0.7974, 0.8691, 0.8122]}, {"w": "or", "b": [0.1312, 0.8154, 0.1474, 0.8302]}, {"w": "model.", "b": [0.1534, 0.8154, 0.2062, 0.8302]}, {"w": "Deep", "b": [0.2143, 0.8154, 0.2543, 0.8302]}, {"w": "learning", "b": [0.2603, 0.8154, 0.3237, 0.8302]}, {"w": "models", "b": [0.3298, 0.8154, 0.3846, 0.8302]}, {"w": "tend", "b": [0.3907, 0.8154, 0.4259, 0.8302]}, {"w": "to", "b": [0.4319, 0.8154, 0.448, 0.8302]}, {"w": "significantly", "b": [0.4541, 0.8154, 0.5486, 0.8302]}, {"w": "improve", "b": [0.5547, 0.8154, 0.6175, 0.8302]}, {"w": "when", "b": [0.6236, 0.8154, 0.6648, 0.8302]}, {"w": "exposed", "b": [0.6708, 0.8154, 0.7333, 0.8302]}, {"w": "to", "b": [0.7393, 0.8154, 0.7554, 0.8302]}, {"w": "more", "b": [0.7614, 0.8154, 0.8007, 0.8302]}, {"w": "training", "b": [0.8067, 0.8154, 0.8691, 0.8302]}, {"w": "data.", "b": [0.1312, 0.8332, 0.1722, 0.8481]}, {"w": "This", "b": [0.1804, 0.8332, 0.2164, 0.8481]}, {"w": "is", "b": [0.2226, 0.8332, 0.235, 0.8481]}, {"w": "less", "b": [0.2412, 0.8332, 0.2691, 0.8481]}, {"w": "true", "b": [0.2752, 0.8332, 0.3081, 0.8481]}, {"w": "for", "b": [0.3142, 0.8332, 0.3363, 0.8481]}, {"w": "shallow", "b": [0.3425, 0.8332, 0.4016, 0.8481]}, {"w": "algorithms", "b": [0.4077, 0.8332, 0.4929, 0.8481]}, {"w": "and", "b": [0.4991, 0.8332, 0.5288, 0.8481]}, {"w": "models.", "b": [0.535, 0.8332, 0.5961, 0.8481]}]}, {"id": "b_17", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 27", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "27", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 71, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Your proportions may depend on the size of the dataset. A small dataset of less than a thousand examples would do best with 90% of the data used for training. In this case, you might decide to not have a distinct validation set, and instead simulate with the cross- validation technique. We will talk more about that in Section ?? in Chapter 5.", "words": [{"w": "Your", "b": [0.1305, 0.0883, 0.1704, 0.1034]}, {"w": "proportions", "b": [0.1777, 0.0883, 0.2725, 0.1034]}, {"w": "may", "b": [0.2798, 0.0883, 0.3143, 0.1034]}, {"w": "depend", "b": [0.3216, 0.0883, 0.3807, 0.1034]}, {"w": "on", "b": [0.388, 0.0883, 0.4079, 0.1034]}, {"w": "the", "b": [0.4152, 0.0883, 0.4413, 0.1034]}, {"w": "size", "b": [0.4486, 0.0883, 0.478, 0.1034]}, {"w": "of", "b": [0.4853, 0.0883, 0.5005, 0.1034]}, {"w": "the", "b": [0.5078, 0.0883, 0.5339, 0.1034]}, {"w": "dataset.", "b": [0.5412, 0.0883, 0.6062, 0.1034]}, {"w": "A", "b": [0.6178, 0.0883, 0.6319, 0.1034]}, {"w": "small", "b": [0.6392, 0.0883, 0.6822, 0.1034]}, {"w": "dataset", "b": [0.6895, 0.0883, 0.7492, 0.1034]}, {"w": "of", "b": [0.7565, 0.0883, 0.7717, 0.1034]}, {"w": "less", "b": [0.779, 0.0883, 0.8074, 0.1034]}, {"w": "than", "b": [0.8147, 0.0883, 0.8524, 0.1034]}, {"w": "a", "b": [0.8597, 0.0883, 0.8691, 0.1034]}, {"w": "thousand", "b": [0.1312, 0.1063, 0.2055, 0.1213]}, {"w": "examples", "b": [0.2117, 0.1063, 0.2855, 0.1213]}, {"w": "would", "b": [0.2916, 0.1063, 0.3395, 0.1213]}, {"w": "do", "b": [0.3456, 0.1063, 0.3652, 0.1213]}, {"w": "best", "b": [0.3714, 0.1063, 0.405, 0.1213]}, {"w": "with", "b": [0.4111, 0.1063, 0.4472, 0.1213]}, {"w": "90%", "b": [0.4532, 0.1063, 0.4872, 0.1213]}, {"w": "of", "b": [0.4933, 0.1063, 0.5082, 0.1213]}, {"w": "the", "b": [0.5144, 0.1063, 0.5401, 0.1213]}, {"w": "data", "b": [0.5463, 0.1063, 0.5823, 0.1213]}, {"w": "used", "b": [0.5885, 0.1063, 0.6247, 0.1213]}, {"w": "for", "b": [0.6308, 0.1063, 0.653, 0.1213]}, {"w": "training.", "b": [0.6591, 0.1063, 0.7283, 0.1213]}, {"w": "In", "b": [0.7364, 0.1063, 0.7535, 0.1213]}, {"w": "this", "b": [0.7596, 0.1063, 0.7896, 0.1213]}, {"w": "case,", "b": [0.7957, 0.1063, 0.834, 0.1213]}, {"w": "you", "b": [0.8401, 0.1063, 0.8689, 0.1213]}, {"w": "might", "b": [0.1312, 0.1242, 0.1788, 0.1393]}, {"w": "decide", "b": [0.1862, 0.1242, 0.2375, 0.1393]}, {"w": "to", "b": [0.2449, 0.1242, 0.2617, 0.1393]}, {"w": "not", "b": [0.2691, 0.1242, 0.2963, 0.1393]}, {"w": "have", "b": [0.3037, 0.1242, 0.3409, 0.1393]}, {"w": "a", "b": [0.3483, 0.1242, 0.3577, 0.1393]}, {"w": "distinct", "b": [0.3651, 0.1242, 0.4269, 0.1393]}, {"w": "validation", "b": [0.4344, 0.1242, 0.5154, 0.1393]}, {"w": "set,", "b": [0.5229, 0.1242, 0.5512, 0.1393]}, {"w": "and", "b": [0.559, 0.1242, 0.5893, 0.1393]}, {"w": "instead", "b": [0.5967, 0.1242, 0.6554, 0.1393]}, {"w": "simulate", "b": [0.6628, 0.1242, 0.7315, 0.1393]}, {"w": "with", "b": [0.7389, 0.1242, 0.7755, 0.1393]}, {"w": "the", "b": [0.7829, 0.1242, 0.8091, 0.1393]}, {"w": "cross-", "b": [0.8162, 0.1243, 0.8688, 0.1393]}, {"w": "validation", "b": [0.1312, 0.1422, 0.222, 0.1572]}, {"w": "technique.", "b": [0.2282, 0.1422, 0.3103, 0.1572]}, {"w": "We", "b": [0.3185, 0.1422, 0.3441, 0.1572]}, {"w": "will", "b": [0.3503, 0.1422, 0.379, 0.1572]}, {"w": "talk", "b": [0.3851, 0.1422, 0.4164, 0.1572]}, {"w": "more", "b": [0.4225, 0.1422, 0.4626, 0.1572]}, {"w": "about", "b": [0.4687, 0.1422, 0.5154, 0.1572]}, {"w": "that", "b": [0.5215, 0.1422, 0.5554, 0.1572]}, {"w": "in", "b": [0.5615, 0.1422, 0.5769, 0.1572]}, {"w": "Section", "b": [0.583, 0.1422, 0.6415, 0.1572]}, {"w": "??", "b": [0.6475, 0.1422, 0.6675, 0.1572]}, {"w": "in", "b": [0.6737, 0.1422, 0.6891, 0.1572]}, {"w": "Chapter", "b": [0.6952, 0.1422, 0.7609, 0.1572]}, {"w": "5.", "b": [0.767, 0.1422, 0.7814, 0.1572]}]}, {"id": "b_1", "type": "paragraph", "text": "It’s worth mentioning that when you split time-series data into the three datasets, you must execute the split so that the order of observations in each example is preserved during the shuffling. Otherwise, for most predictive problems, your data will be broken, and no learning will be possible. We talk more about time series in Section ?? in Chapter 4.", "words": [{"w": "It’s", "b": [0.1312, 0.169, 0.158, 0.1841]}, {"w": "worth", "b": [0.1646, 0.169, 0.2123, 0.1841]}, {"w": "mentioning", "b": [0.2189, 0.169, 0.3104, 0.1841]}, {"w": "that", "b": [0.3171, 0.169, 0.3516, 0.1841]}, {"w": "when", "b": [0.3582, 0.169, 0.4011, 0.1841]}, {"w": "you", "b": [0.4077, 0.169, 0.437, 0.1841]}, {"w": "split", "b": [0.4437, 0.169, 0.4793, 0.1841]}, {"w": "time-series", "b": [0.4858, 0.1692, 0.5853, 0.1841]}, {"w": "data", "b": [0.5929, 0.1692, 0.6336, 0.1841]}, {"w": "into", "b": [0.6406, 0.169, 0.6725, 0.1841]}, {"w": "the", "b": [0.6791, 0.169, 0.7053, 0.1841]}, {"w": "three", "b": [0.7119, 0.169, 0.7538, 0.1841]}, {"w": "datasets,", "b": [0.7604, 0.169, 0.8328, 0.1841]}, {"w": "you", "b": [0.8396, 0.169, 0.8689, 0.1841]}, {"w": "must", "b": [0.1312, 0.1871, 0.1705, 0.202]}, {"w": "execute", "b": [0.1767, 0.1871, 0.2363, 0.202]}, {"w": "the", "b": [0.2424, 0.1871, 0.2679, 0.202]}, {"w": "split", "b": [0.274, 0.1871, 0.3088, 0.202]}, {"w": "so", "b": [0.3149, 0.1871, 0.3313, 0.202]}, {"w": "that", "b": [0.3375, 0.1871, 0.3711, 0.202]}, {"w": "the", "b": [0.3772, 0.1871, 0.4027, 0.202]}, {"w": "order", "b": [0.4088, 0.1871, 0.4507, 0.202]}, {"w": "of", "b": [0.4568, 0.1871, 0.4716, 0.202]}, {"w": "observations", "b": [0.4778, 0.1871, 0.5763, 0.202]}, {"w": "in", "b": [0.5824, 0.1871, 0.5977, 0.202]}, {"w": "each", "b": [0.6039, 0.1871, 0.639, 0.202]}, {"w": "example", "b": [0.6451, 0.1871, 0.7108, 0.202]}, {"w": "is", "b": [0.717, 0.1871, 0.7293, 0.202]}, {"w": "preserved", "b": [0.7354, 0.1871, 0.811, 0.202]}, {"w": "during", "b": [0.8172, 0.1871, 0.8692, 0.202]}, {"w": "the", "b": [0.1312, 0.2049, 0.1574, 0.22]}, {"w": "shuffling.", "b": [0.1643, 0.2049, 0.2382, 0.22]}, {"w": "Otherwise,", "b": [0.2487, 0.2049, 0.3367, 0.22]}, {"w": "for", "b": [0.3439, 0.2049, 0.3664, 0.22]}, {"w": "most", "b": [0.3733, 0.2049, 0.4132, 0.22]}, {"w": "predictive", "b": [0.4201, 0.2049, 0.5007, 0.22]}, {"w": "problems,", "b": [0.5077, 0.2049, 0.5873, 0.22]}, {"w": "your", "b": [0.5945, 0.2049, 0.6311, 0.22]}, {"w": "data", "b": [0.6381, 0.2049, 0.6747, 0.22]}, {"w": "will", "b": [0.6816, 0.2049, 0.7109, 0.22]}, {"w": "be", "b": [0.7178, 0.2049, 0.7372, 0.22]}, {"w": "broken,", "b": [0.7441, 0.2049, 0.8048, 0.22]}, {"w": "and", "b": [0.812, 0.2049, 0.8423, 0.22]}, {"w": "no", "b": [0.8492, 0.2049, 0.8691, 0.22]}, {"w": "learning", "b": [0.1312, 0.223, 0.1959, 0.238]}, {"w": "will", "b": [0.202, 0.223, 0.2307, 0.238]}, {"w": "be", "b": [0.2369, 0.223, 0.2559, 0.238]}, {"w": "possible.", "b": [0.262, 0.223, 0.3304, 0.238]}, {"w": "We", "b": [0.3386, 0.223, 0.3643, 0.238]}, {"w": "talk", "b": [0.3704, 0.223, 0.4017, 0.238]}, {"w": "more", "b": [0.4079, 0.223, 0.4479, 0.238]}, {"w": "about", "b": [0.454, 0.223, 0.5007, 0.238]}, {"w": "time", "b": [0.5068, 0.223, 0.5427, 0.238]}, {"w": "series", "b": [0.5489, 0.223, 0.5922, 0.238]}, {"w": "in", "b": [0.5984, 0.223, 0.6138, 0.238]}, {"w": "Section", "b": [0.6199, 0.223, 0.6784, 0.238]}, {"w": "??", "b": [0.6843, 0.223, 0.7043, 0.238]}, {"w": "in", "b": [0.7104, 0.223, 0.7258, 0.238]}, {"w": "Chapter", "b": [0.732, 0.223, 0.7976, 0.238]}, {"w": "4.", "b": [0.8038, 0.223, 0.8181, 0.238]}]}, {"id": "b_2", "type": "paragraph", "text": "3.6.1 Leakage During Partitioning", "words": [{"w": "3.6.1", "b": [0.1312, 0.2709, 0.1749, 0.2858]}, {"w": "Leakage", "b": [0.1961, 0.2709, 0.2707, 0.2858]}, {"w": "During", "b": [0.2778, 0.2709, 0.3429, 0.2858]}, {"w": "Partitioning", "b": [0.35, 0.2709, 0.4619, 0.2858]}]}, {"id": "b_3", "type": "paragraph", "text": "As you already know, data leakage may happen at any stage, from data collection to model evaluation. The data partitioning stage is no exception.", "words": [{"w": "As", "b": [0.1305, 0.3075, 0.1516, 0.3224]}, {"w": "you", "b": [0.1577, 0.3075, 0.1863, 0.3224]}, {"w": "already", "b": [0.1924, 0.3075, 0.2512, 0.3224]}, {"w": "know,", "b": [0.2573, 0.3075, 0.3042, 0.3224]}, {"w": "data", "b": [0.3104, 0.3075, 0.3461, 0.3224]}, {"w": "leakage", "b": [0.3522, 0.3075, 0.4109, 0.3224]}, {"w": "may", "b": [0.4171, 0.3075, 0.4507, 0.3224]}, {"w": "happen", "b": [0.4569, 0.3075, 0.5156, 0.3224]}, {"w": "at", "b": [0.5217, 0.3075, 0.538, 0.3224]}, {"w": "any", "b": [0.5442, 0.3075, 0.5728, 0.3224]}, {"w": "stage,", "b": [0.5789, 0.3075, 0.6249, 0.3224]}, {"w": "from", "b": [0.6311, 0.3075, 0.6684, 0.3224]}, {"w": "data", "b": [0.6745, 0.3075, 0.7102, 0.3224]}, {"w": "collection", "b": [0.7164, 0.3075, 0.7919, 0.3224]}, {"w": "to", "b": [0.7981, 0.3075, 0.8144, 0.3224]}, {"w": "model", "b": [0.8206, 0.3075, 0.869, 0.3224]}, {"w": "evaluation.", "b": [0.1312, 0.3254, 0.2189, 0.3403]}, {"w": "The", "b": [0.2271, 0.3254, 0.2589, 0.3403]}, {"w": "data", "b": [0.265, 0.3254, 0.3009, 0.3403]}, {"w": "partitioning", "b": [0.3071, 0.3254, 0.4025, 0.3403]}, {"w": "stage", "b": [0.4086, 0.3254, 0.4498, 0.3403]}, {"w": "is", "b": [0.4559, 0.3254, 0.4683, 0.3403]}, {"w": "no", "b": [0.4745, 0.3254, 0.494, 0.3403]}, {"w": "exception.", "b": [0.5001, 0.3254, 0.5817, 0.3403]}]}, {"id": "b_4", "type": "paragraph", "text": "Group leakage may occur during partitioning. Imagine you have magnetic resonance images of the brains of multiple patients. Each image is labeled with certain brain disease, and the same patient may be represented by several images taken at different times. If you apply the partitioning technique discussed above (shuffle, then split), images of the same patient might appear in both the training and holdout data.", "words": [{"w": "Group", "b": [0.1312, 0.3523, 0.1908, 0.3673]}, {"w": "leakage", "b": [0.1964, 0.3523, 0.2642, 0.3673]}, {"w": "may", "b": [0.269, 0.3524, 0.3021, 0.3672]}, {"w": "occur", "b": [0.307, 0.3524, 0.3498, 0.3672]}, {"w": "during", "b": [0.3546, 0.3524, 0.4059, 0.3672]}, {"w": "partitioning.", "b": [0.4107, 0.3524, 0.5093, 0.3672]}, {"w": "Imagine", "b": [0.517, 0.3524, 0.5798, 0.3672]}, {"w": "you", "b": [0.5847, 0.3524, 0.6128, 0.3672]}, {"w": "have", "b": [0.6176, 0.3524, 0.6533, 0.3672]}, {"w": "magnetic", "b": [0.6581, 0.3524, 0.7294, 0.3672]}, {"w": "resonance", "b": [0.7343, 0.3524, 0.8108, 0.3672]}, {"w": "images", "b": [0.8157, 0.3524, 0.869, 0.3672]}, {"w": "of", "b": [0.1312, 0.3703, 0.146, 0.3852]}, {"w": "the", "b": [0.1522, 0.3703, 0.1777, 0.3852]}, {"w": "brains", "b": [0.1839, 0.3703, 0.2331, 0.3852]}, {"w": "of", "b": [0.2393, 0.3703, 0.2541, 0.3852]}, {"w": "multiple", "b": [0.2602, 0.3703, 0.3261, 0.3852]}, {"w": "patients.", "b": [0.3323, 0.3703, 0.4013, 0.3852]}, {"w": "Each", "b": [0.4095, 0.3703, 0.4491, 0.3852]}, {"w": "image", "b": [0.4553, 0.3703, 0.5023, 0.3852]}, {"w": "is", "b": [0.5084, 0.3703, 0.5208, 0.3852]}, {"w": "labeled", "b": [0.5269, 0.3703, 0.5836, 0.3852]}, {"w": "with", "b": [0.5898, 0.3703, 0.6256, 0.3852]}, {"w": "certain", "b": [0.6317, 0.3703, 0.6869, 0.3852]}, {"w": "brain", "b": [0.6931, 0.3703, 0.735, 0.3852]}, {"w": "disease,", "b": [0.7412, 0.3703, 0.8017, 0.3852]}, {"w": "and", "b": [0.8078, 0.3703, 0.8374, 0.3852]}, {"w": "the", "b": [0.8436, 0.3703, 0.8692, 0.3852]}, {"w": "same", "b": [0.1312, 0.3883, 0.1705, 0.4031]}, {"w": "patient", "b": [0.1767, 0.3883, 0.2324, 0.4031]}, {"w": "may", "b": [0.2386, 0.3883, 0.2717, 0.4031]}, {"w": "be", "b": [0.2778, 0.3883, 0.2964, 0.4031]}, {"w": "represented", "b": [0.3026, 0.3883, 0.3927, 0.4031]}, {"w": "by", "b": [0.3989, 0.3883, 0.418, 0.4031]}, {"w": "several", "b": [0.4241, 0.3883, 0.4775, 0.4031]}, {"w": "images", "b": [0.4836, 0.3883, 0.537, 0.4031]}, {"w": "taken", "b": [0.5431, 0.3883, 0.5863, 0.4031]}, {"w": "at", "b": [0.5924, 0.3883, 0.6085, 0.4031]}, {"w": "different", "b": [0.6147, 0.3883, 0.68, 0.4031]}, {"w": "times.", "b": [0.6862, 0.3883, 0.7335, 0.4031]}, {"w": "If", "b": [0.7417, 0.3883, 0.7537, 0.4031]}, {"w": "you", "b": [0.7599, 0.3883, 0.788, 0.4031]}, {"w": "apply", "b": [0.7941, 0.3883, 0.8378, 0.4031]}, {"w": "the", "b": [0.844, 0.3883, 0.8691, 0.4031]}, {"w": "partitioning", "b": [0.1312, 0.4062, 0.2248, 0.4211]}, {"w": "technique", "b": [0.231, 0.4062, 0.3064, 0.4211]}, {"w": "discussed", "b": [0.3126, 0.4062, 0.3853, 0.4211]}, {"w": "above", "b": [0.3915, 0.4062, 0.4367, 0.4211]}, {"w": "(shuffle,", "b": [0.4429, 0.4062, 0.5048, 0.4211]}, {"w": "then", "b": [0.511, 0.4062, 0.5462, 0.4211]}, {"w": "split),", "b": [0.5524, 0.4062, 0.5987, 0.4211]}, {"w": "images", "b": [0.6049, 0.4062, 0.6583, 0.4211]}, {"w": "of", "b": [0.6644, 0.4062, 0.679, 0.4211]}, {"w": "the", "b": [0.6852, 0.4062, 0.7103, 0.4211]}, {"w": "same", "b": [0.7165, 0.4062, 0.7558, 0.4211]}, {"w": "patient", "b": [0.7619, 0.4062, 0.8178, 0.4211]}, {"w": "might", "b": [0.8239, 0.4062, 0.8696, 0.4211]}, {"w": "appear", "b": [0.1312, 0.4241, 0.1862, 0.439]}, {"w": "in", "b": [0.1923, 0.4241, 0.2077, 0.439]}, {"w": "both", "b": [0.2138, 0.4241, 0.2513, 0.439]}, {"w": "the", "b": [0.2574, 0.4241, 0.2831, 0.439]}, {"w": "training", "b": [0.2892, 0.4241, 0.3528, 0.439]}, {"w": "and", "b": [0.359, 0.4241, 0.3887, 0.439]}, {"w": "holdout", "b": [0.3949, 0.4241, 0.4564, 0.439]}, {"w": "data.", "b": [0.4625, 0.4241, 0.5036, 0.439]}]}, {"id": "b_5", "type": "paragraph", "text": "The model might learn from the particularities of the patient rather than the disease. The model would remember that patient A’s brain has specific brain convolutions, and if they have a specific disease in the training data, the model successfully predicts this disease in the validation data by recognizing patient A from just the brain convolutions.", "words": [{"w": "The", "b": [0.1306, 0.4509, 0.1627, 0.466]}, {"w": "model", "b": [0.1688, 0.4509, 0.218, 0.466]}, {"w": "might", "b": [0.2241, 0.4509, 0.2712, 0.466]}, {"w": "learn", "b": [0.2774, 0.4509, 0.3178, 0.466]}, {"w": "from", "b": [0.324, 0.4509, 0.3618, 0.466]}, {"w": "the", "b": [0.3679, 0.4509, 0.3938, 0.466]}, {"w": "particularities", "b": [0.4, 0.4509, 0.5131, 0.466]}, {"w": "of", "b": [0.5192, 0.4509, 0.5343, 0.466]}, {"w": "the", "b": [0.5404, 0.4509, 0.5663, 0.466]}, {"w": "patient", "b": [0.5724, 0.4509, 0.6299, 0.466]}, {"w": "rather", "b": [0.6361, 0.4509, 0.6859, 0.466]}, {"w": "than", "b": [0.692, 0.4509, 0.7293, 0.466]}, {"w": "the", "b": [0.7354, 0.4509, 0.7613, 0.466]}, {"w": "disease.", "b": [0.7675, 0.4509, 0.8288, 0.466]}, {"w": "The", "b": [0.837, 0.4509, 0.8691, 0.466]}, {"w": "model", "b": [0.1312, 0.4688, 0.1809, 0.4839]}, {"w": "would", "b": [0.1872, 0.4688, 0.2359, 0.4839]}, {"w": "remember", "b": [0.2422, 0.4688, 0.3239, 0.4839]}, {"w": "that", "b": [0.3302, 0.4688, 0.3647, 0.4839]}, {"w": "patient", "b": [0.3711, 0.4688, 0.4291, 0.4839]}, {"w": "A’s", "b": [0.4353, 0.4688, 0.4618, 0.4839]}, {"w": "brain", "b": [0.4682, 0.4688, 0.5111, 0.4839]}, {"w": "has", "b": [0.5175, 0.4688, 0.5447, 0.4839]}, {"w": "specific", "b": [0.5511, 0.4688, 0.6103, 0.4839]}, {"w": "brain", "b": [0.6166, 0.4688, 0.6596, 0.4839]}, {"w": "convolutions,", "b": [0.6659, 0.4688, 0.7732, 0.4839]}, {"w": "and", "b": [0.7796, 0.4688, 0.8099, 0.4839]}, {"w": "if", "b": [0.8163, 0.4688, 0.8273, 0.4839]}, {"w": "they", "b": [0.8336, 0.4688, 0.8697, 0.4839]}, {"w": "have", "b": [0.1312, 0.487, 0.1669, 0.5018]}, {"w": "a", "b": [0.1728, 0.487, 0.1819, 0.5018]}, {"w": "specific", "b": [0.1878, 0.487, 0.2447, 0.5018]}, {"w": "disease", "b": [0.2507, 0.487, 0.3051, 0.5018]}, {"w": "in", "b": [0.3111, 0.487, 0.3262, 0.5018]}, {"w": "the", "b": [0.3321, 0.487, 0.3572, 0.5018]}, {"w": "training", "b": [0.3631, 0.487, 0.4255, 0.5018]}, {"w": "data,", "b": [0.4314, 0.487, 0.4716, 0.5018]}, {"w": "the", "b": [0.4776, 0.487, 0.5027, 0.5018]}, {"w": "model", "b": [0.5087, 0.487, 0.5564, 0.5018]}, {"w": "successfully", "b": [0.5623, 0.487, 0.6531, 0.5018]}, {"w": "predicts", "b": [0.6591, 0.487, 0.7215, 0.5018]}, {"w": "this", "b": [0.7275, 0.487, 0.7567, 0.5018]}, {"w": "disease", "b": [0.7627, 0.487, 0.8171, 0.5018]}, {"w": "in", "b": [0.8231, 0.487, 0.8382, 0.5018]}, {"w": "the", "b": [0.8441, 0.487, 0.8692, 0.5018]}, {"w": "validation", "b": [0.1308, 0.5048, 0.2102, 0.5198]}, {"w": "data", "b": [0.2164, 0.5048, 0.2523, 0.5198]}, {"w": "by", "b": [0.2584, 0.5048, 0.2779, 0.5198]}, {"w": "recognizing", "b": [0.284, 0.5048, 0.3743, 0.5198]}, {"w": "patient", "b": [0.3805, 0.5048, 0.4374, 0.5198]}, {"w": "A", "b": [0.4434, 0.5048, 0.4573, 0.5198]}, {"w": "from", "b": [0.4634, 0.5048, 0.5009, 0.5198]}, {"w": "just", "b": [0.507, 0.5048, 0.5374, 0.5198]}, {"w": "the", "b": [0.5435, 0.5048, 0.5692, 0.5198]}, {"w": "brain", "b": [0.5753, 0.5048, 0.6174, 0.5198]}, {"w": "convolutions.", "b": [0.6236, 0.5048, 0.7288, 0.5198]}]}, {"id": "b_6", "type": "paragraph", "text": "The solution to group leakage is group partitioning. It consists of keeping all patient examples together in one set: either training or holdout. Once again, you can see how important it is for the data analyst to know as much as possible about the data.", "words": [{"w": "The", "b": [0.1306, 0.5316, 0.163, 0.5467]}, {"w": "solution", "b": [0.1705, 0.5316, 0.2355, 0.5467]}, {"w": "to", "b": [0.243, 0.5316, 0.2598, 0.5467]}, {"w": "group", "b": [0.2673, 0.5316, 0.3144, 0.5467]}, {"w": "leakage", "b": [0.322, 0.5316, 0.3821, 0.5467]}, {"w": "is", "b": [0.3897, 0.5316, 0.4023, 0.5467]}, {"w": "group", "b": [0.4098, 0.5318, 0.4633, 0.5467]}, {"w": "partitioning.", "b": [0.472, 0.5316, 0.5872, 0.5467]}, {"w": "It", "b": [0.5996, 0.5316, 0.6137, 0.5467]}, {"w": "consists", "b": [0.6213, 0.5316, 0.6844, 0.5467]}, {"w": "of", "b": [0.6919, 0.5316, 0.7071, 0.5467]}, {"w": "keeping", "b": [0.7146, 0.5316, 0.7764, 0.5467]}, {"w": "all", "b": [0.7839, 0.5316, 0.8038, 0.5467]}, {"w": "patient", "b": [0.8113, 0.5316, 0.8694, 0.5467]}, {"w": "examples", "b": [0.1312, 0.5496, 0.2061, 0.5647]}, {"w": "together", "b": [0.2141, 0.5496, 0.2821, 0.5647]}, {"w": "in", "b": [0.29, 0.5496, 0.3057, 0.5647]}, {"w": "one", "b": [0.3136, 0.5496, 0.3419, 0.5647]}, {"w": "set:", "b": [0.3498, 0.5496, 0.3782, 0.5647]}, {"w": "either", "b": [0.3899, 0.5496, 0.437, 0.5647]}, {"w": "training", "b": [0.445, 0.5496, 0.5099, 0.5647]}, {"w": "or", "b": [0.5178, 0.5496, 0.5346, 0.5647]}, {"w": "holdout.", "b": [0.5425, 0.5496, 0.6105, 0.5647]}, {"w": "Once", "b": [0.624, 0.5496, 0.6659, 0.5647]}, {"w": "again,", "b": [0.6738, 0.5496, 0.723, 0.5647]}, {"w": "you", "b": [0.7313, 0.5496, 0.7606, 0.5647]}, {"w": "can", "b": [0.7686, 0.5496, 0.7968, 0.5647]}, {"w": "see", "b": [0.8047, 0.5496, 0.8289, 0.5647]}, {"w": "how", "b": [0.8368, 0.5496, 0.8698, 0.5647]}, {"w": "important", "b": [0.1312, 0.5677, 0.2123, 0.5826]}, {"w": "it", "b": [0.2184, 0.5677, 0.2307, 0.5826]}, {"w": "is", "b": [0.2369, 0.5677, 0.2493, 0.5826]}, {"w": "for", "b": [0.2555, 0.5677, 0.2776, 0.5826]}, {"w": "the", "b": [0.2837, 0.5677, 0.3093, 0.5826]}, {"w": "data", "b": [0.3155, 0.5677, 0.3514, 0.5826]}, {"w": "analyst", "b": [0.3575, 0.5677, 0.4156, 0.5826]}, {"w": "to", "b": [0.4217, 0.5677, 0.4381, 0.5826]}, {"w": "know", "b": [0.4443, 0.5677, 0.4863, 0.5826]}, {"w": "as", "b": [0.4925, 0.5677, 0.509, 0.5826]}, {"w": "much", "b": [0.5151, 0.5677, 0.5582, 0.5826]}, {"w": "as", "b": [0.5643, 0.5677, 0.5808, 0.5826]}, {"w": "possible", "b": [0.587, 0.5677, 0.6503, 0.5826]}, {"w": "about", "b": [0.6564, 0.5677, 0.7031, 0.5826]}, {"w": "the", "b": [0.7092, 0.5677, 0.7349, 0.5826]}, {"w": "data.", "b": [0.741, 0.5677, 0.782, 0.5826]}]}, {"id": "b_7", "type": "paragraph", "text": "3.7 Dealing with Missing Attributes", "words": [{"w": "3.7", "b": [0.1312, 0.6162, 0.1631, 0.6341]}, {"w": "Dealing", "b": [0.188, 0.6162, 0.2707, 0.6341]}, {"w": "with", "b": [0.279, 0.6162, 0.3275, 0.6341]}, {"w": "Missing", "b": [0.3358, 0.6162, 0.4192, 0.6341]}, {"w": "Attributes", "b": [0.4275, 0.6162, 0.5407, 0.6341]}]}, {"id": "b_8", "type": "paragraph", "text": "Sometimes, the data comes to the analyst in a tidy form, such as an Excel spreadsheet,7", "words": [{"w": "Sometimes,", "b": [0.1312, 0.655, 0.2244, 0.6701]}, {"w": "the", "b": [0.2314, 0.655, 0.2575, 0.6701]}, {"w": "data", "b": [0.2644, 0.655, 0.301, 0.6701]}, {"w": "comes", "b": [0.3078, 0.655, 0.357, 0.6701]}, {"w": "to", "b": [0.3638, 0.655, 0.3806, 0.6701]}, {"w": "the", "b": [0.3874, 0.655, 0.4135, 0.6701]}, {"w": "analyst", "b": [0.4203, 0.655, 0.4795, 0.6701]}, {"w": "in", "b": [0.4863, 0.655, 0.502, 0.6701]}, {"w": "a", "b": [0.5088, 0.655, 0.5182, 0.6701]}, {"w": "tidy", "b": [0.5251, 0.655, 0.558, 0.6701]}, {"w": "form,", "b": [0.5648, 0.655, 0.6083, 0.6701]}, {"w": "such", "b": [0.6152, 0.655, 0.6514, 0.6701]}, {"w": "as", "b": [0.6583, 0.655, 0.6751, 0.6701]}, {"w": "an", "b": [0.6819, 0.655, 0.7018, 0.6701]}, {"w": "Excel", "b": [0.7086, 0.655, 0.7533, 0.6701]}, {"w": "spreadsheet,7", "b": [0.7601, 0.6531, 0.8678, 0.6701]}]}, {"id": "b_9", "type": "paragraph", "text": "but you might find some attributes missing. This often happens when the dataset was handcrafted, and the person forgot to fill some values or didn’t get them measured.", "words": [{"w": "but", "b": [0.1312, 0.6729, 0.1595, 0.688]}, {"w": "you", "b": [0.1675, 0.6729, 0.1967, 0.688]}, {"w": "might", "b": [0.2047, 0.6729, 0.2523, 0.688]}, {"w": "find", "b": [0.2603, 0.6729, 0.2917, 0.688]}, {"w": "some", "b": [0.2996, 0.6729, 0.3405, 0.688]}, {"w": "attributes", "b": [0.3485, 0.6729, 0.4292, 0.688]}, {"w": "missing.", "b": [0.4372, 0.6729, 0.5033, 0.688]}, {"w": "This", "b": [0.517, 0.6729, 0.5537, 0.688]}, {"w": "often", "b": [0.5616, 0.6729, 0.603, 0.688]}, {"w": "happens", "b": [0.6109, 0.6729, 0.6785, 0.688]}, {"w": "when", "b": [0.6865, 0.6729, 0.7294, 0.688]}, {"w": "the", "b": [0.7374, 0.6729, 0.7635, 0.688]}, {"w": "dataset", "b": [0.7715, 0.6729, 0.8312, 0.688]}, {"w": "was", "b": [0.8392, 0.6729, 0.8691, 0.688]}, {"w": "handcrafted,", "b": [0.1312, 0.691, 0.2323, 0.7059]}, {"w": "and", "b": [0.2385, 0.691, 0.2682, 0.7059]}, {"w": "the", "b": [0.2743, 0.691, 0.3, 0.7059]}, {"w": "person", "b": [0.3061, 0.691, 0.3591, 0.7059]}, {"w": "forgot", "b": [0.3653, 0.691, 0.413, 0.7059]}, {"w": "to", "b": [0.4192, 0.691, 0.4356, 0.7059]}, {"w": "��ll", "b": [0.4417, 0.691, 0.4622, 0.7059]}, {"w": "some", "b": [0.4684, 0.691, 0.5084, 0.7059]}, {"w": "values", "b": [0.5146, 0.691, 0.5634, 0.7059]}, {"w": "or", "b": [0.5696, 0.691, 0.586, 0.7059]}, {"w": "didn’t", "b": [0.5922, 0.691, 0.6404, 0.7059]}, {"w": "get", "b": [0.6465, 0.691, 0.6711, 0.7059]}, {"w": "them", "b": [0.6773, 0.691, 0.7183, 0.7059]}, {"w": "measured.", "b": [0.7245, 0.691, 0.8056, 0.7059]}]}, {"id": "b_10", "type": "paragraph", "text": "The list of typical approaches of dealing with missing values for an attribute include:", "words": [{"w": "The", "b": [0.1306, 0.7179, 0.1624, 0.7328]}, {"w": "list", "b": [0.1685, 0.7179, 0.1932, 0.7328]}, {"w": "of", "b": [0.1994, 0.7179, 0.2143, 0.7328]}, {"w": "typical", "b": [0.2204, 0.7179, 0.2747, 0.7328]}, {"w": "approaches", "b": [0.2809, 0.7179, 0.3698, 0.7328]}, {"w": "of", "b": [0.3759, 0.7179, 0.3908, 0.7328]}, {"w": "dealing", "b": [0.3969, 0.7179, 0.4544, 0.7328]}, {"w": "with", "b": [0.4605, 0.7179, 0.4964, 0.7328]}, {"w": "missing", "b": [0.5025, 0.7179, 0.5622, 0.7328]}, {"w": "values", "b": [0.5684, 0.7179, 0.6172, 0.7328]}, {"w": "for", "b": [0.6233, 0.7179, 0.6455, 0.7328]}, {"w": "an", "b": [0.6516, 0.7179, 0.6711, 0.7328]}, {"w": "attribute", "b": [0.6772, 0.7179, 0.7491, 0.7328]}, {"w": "include:", "b": [0.7552, 0.7179, 0.8178, 0.7328]}]}, {"id": "b_11", "type": "paragraph", "text": "• removing the examples with missing attributes from the dataset (this can be done if your dataset is big enough to safely sacrifice some data); • using a learning algorithm that can deal with missing attribute values (such as the decision tree learning algorithm); • using a data imputation technique.", "words": [{"w": "•", "b": [0.1538, 0.7448, 0.1681, 0.7598]}, {"w": "removing", "b": [0.1774, 0.7447, 0.2525, 0.7598]}, {"w": "the", "b": [0.2586, 0.7447, 0.2847, 0.7598]}, {"w": "examples", "b": [0.2909, 0.7447, 0.3655, 0.7598]}, {"w": "with", "b": [0.3717, 0.7447, 0.4082, 0.7598]}, {"w": "missing", "b": [0.4143, 0.7447, 0.475, 0.7598]}, {"w": "attributes", "b": [0.4811, 0.7447, 0.5616, 0.7598]}, {"w": "from", "b": [0.5677, 0.7447, 0.6058, 0.7598]}, {"w": "the", "b": [0.612, 0.7447, 0.638, 0.7598]}, {"w": "dataset", "b": [0.6442, 0.7447, 0.7037, 0.7598]}, {"w": "(this", "b": [0.7099, 0.7447, 0.7475, 0.7598]}, {"w": "can", "b": [0.7537, 0.7447, 0.7818, 0.7598]}, {"w": "be", "b": [0.788, 0.7447, 0.8073, 0.7598]}, {"w": "done", "b": [0.8134, 0.7447, 0.852, 0.7598]}, {"w": "if", "b": [0.8581, 0.7447, 0.8691, 0.7598]}, {"w": "your", "b": [0.1769, 0.7627, 0.2128, 0.7777]}, {"w": "dataset", "b": [0.219, 0.7627, 0.2775, 0.7777]}, {"w": "is", "b": [0.2837, 0.7627, 0.2961, 0.7777]}, {"w": "big", "b": [0.3022, 0.7627, 0.3269, 0.7777]}, {"w": "enough", "b": [0.333, 0.7627, 0.3904, 0.7777]}, {"w": "to", "b": [0.3966, 0.7627, 0.413, 0.7777]}, {"w": "safely", "b": [0.4191, 0.7627, 0.4644, 0.7777]}, {"w": "sacrifice", "b": [0.4705, 0.7627, 0.5343, 0.7777]}, {"w": "some", "b": [0.5404, 0.7627, 0.5805, 0.7777]}, {"w": "data);", "b": [0.5867, 0.7627, 0.6348, 0.7777]}, {"w": "•", "b": [0.1538, 0.7807, 0.1681, 0.7957]}, {"w": "using", "b": [0.1774, 0.7806, 0.2204, 0.7957]}, {"w": "a", "b": [0.2273, 0.7806, 0.2367, 0.7957]}, {"w": "learning", "b": [0.2437, 0.7806, 0.3096, 0.7957]}, {"w": "algorithm", "b": [0.3166, 0.7806, 0.3961, 0.7957]}, {"w": "that", "b": [0.4031, 0.7806, 0.4376, 0.7957]}, {"w": "can", "b": [0.4446, 0.7806, 0.4728, 0.7957]}, {"w": "deal", "b": [0.4798, 0.7806, 0.5132, 0.7957]}, {"w": "with", "b": [0.5202, 0.7806, 0.5568, 0.7957]}, {"w": "missing", "b": [0.5638, 0.7806, 0.6246, 0.7957]}, {"w": "attribute", "b": [0.6316, 0.7806, 0.7049, 0.7957]}, {"w": "values", "b": [0.7118, 0.7806, 0.7617, 0.7957]}, {"w": "(such", "b": [0.7686, 0.7806, 0.8122, 0.7957]}, {"w": "as", "b": [0.8191, 0.7806, 0.836, 0.7957]}, {"w": "the", "b": [0.8429, 0.7806, 0.8691, 0.7957]}, {"w": "decision", "b": [0.1774, 0.7986, 0.2411, 0.8136]}, {"w": "tree", "b": [0.2472, 0.7986, 0.278, 0.8136]}, {"w": "learning", "b": [0.2842, 0.7986, 0.3488, 0.8136]}, {"w": "algorithm);", "b": [0.355, 0.7986, 0.4453, 0.8136]}, {"w": "•", "b": [0.1538, 0.8166, 0.1681, 0.8315]}, {"w": "using", "b": [0.1774, 0.8166, 0.2195, 0.8315]}, {"w": "a", "b": [0.2257, 0.8166, 0.2349, 0.8315]}, {"w": "data", "b": [0.2412, 0.8166, 0.2819, 0.8316]}, {"w": "imputation", "b": [0.2889, 0.8166, 0.3912, 0.8316]}, {"w": "technique.", "b": [0.3974, 0.8166, 0.4795, 0.8315]}]}, {"id": "b_12", "type": "paragraph", "text": "7The fact that your raw dataset is contained in an Excel spreadsheet doesn’t guarantee that the data is tidy. One property of tidiness is that each row represents one example.", "words": [{"w": "7The", "b": [0.1518, 0.8433, 0.1866, 0.8572]}, {"w": "fact", "b": [0.1918, 0.8452, 0.2177, 0.8572]}, {"w": "that", "b": [0.2229, 0.8452, 0.2518, 0.8572]}, {"w": "your", "b": [0.2571, 0.8452, 0.2877, 0.8572]}, {"w": "raw", "b": [0.293, 0.8452, 0.3179, 0.8572]}, {"w": "dataset", "b": [0.3232, 0.8452, 0.3732, 0.8572]}, {"w": "is", "b": [0.3784, 0.8452, 0.389, 0.8572]}, {"w": "contained", "b": [0.3943, 0.8452, 0.4604, 0.8572]}, {"w": "in", "b": [0.4656, 0.8452, 0.4788, 0.8572]}, {"w": "an", "b": [0.484, 0.8452, 0.5006, 0.8572]}, {"w": "Excel", "b": [0.5059, 0.8452, 0.5433, 0.8572]}, {"w": "spreadsheet", "b": [0.5486, 0.8452, 0.6285, 0.8572]}, {"w": "doesn’t", "b": [0.6337, 0.8452, 0.6833, 0.8572]}, {"w": "guarantee", "b": [0.6885, 0.8452, 0.7555, 0.8572]}, {"w": "that", "b": [0.7608, 0.8452, 0.7897, 0.8572]}, {"w": "the", "b": [0.7949, 0.8452, 0.8168, 0.8572]}, {"w": "data", "b": [0.822, 0.8452, 0.8527, 0.8572]}, {"w": "is", "b": [0.8579, 0.8452, 0.8685, 0.8572]}, {"w": "tidy.", "b": [0.1312, 0.8594, 0.1617, 0.8714]}, {"w": "One", "b": [0.1687, 0.8594, 0.1966, 0.8714]}, {"w": "property", "b": [0.2018, 0.8594, 0.2606, 0.8714]}, {"w": "of", "b": [0.2658, 0.8594, 0.2785, 0.8714]}, {"w": "tidiness", "b": [0.2837, 0.8594, 0.3352, 0.8714]}, {"w": "is", "b": [0.3405, 0.8594, 0.351, 0.8714]}, {"w": "that", "b": [0.3562, 0.8594, 0.385, 0.8714]}, {"w": "each", "b": [0.3902, 0.8594, 0.4203, 0.8714]}, {"w": "row", "b": [0.4255, 0.8594, 0.4503, 0.8714]}, {"w": "represents", "b": [0.4555, 0.8594, 0.5241, 0.8714]}, {"w": "one", "b": [0.5293, 0.8594, 0.5528, 0.8714]}, {"w": "example.", "b": [0.5581, 0.8594, 0.6186, 0.8714]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 28", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "28", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 72, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3.7.1 Data Imputation Techniques", "words": [{"w": "3.7.1", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Data", "b": [0.1961, 0.0884, 0.2412, 0.1034]}, {"w": "Imputation", "b": [0.2483, 0.0884, 0.3527, 0.1034]}, {"w": "Techniques", "b": [0.3598, 0.0884, 0.4619, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "To impute the value of a missing numerical attribute, one technique consists in replacing the missing value by the average value of this attribute in the rest of the dataset. Mathematically it looks as follows. Let j be an attribute that is missing in some examples in the original dataset, and let S(j) be the set of size N (j) that contains only those examples from the original dataset in which the value of the attribute j is present. Then the missing value ˆx(j)", "words": [{"w": "To", "b": [0.1306, 0.1251, 0.1512, 0.1399]}, {"w": "impute", "b": [0.1573, 0.1251, 0.2127, 0.1399]}, {"w": "the", "b": [0.2189, 0.1251, 0.2441, 0.1399]}, {"w": "value", "b": [0.2503, 0.1251, 0.291, 0.1399]}, {"w": "of", "b": [0.2972, 0.1251, 0.3118, 0.1399]}, {"w": "a", "b": [0.318, 0.1251, 0.327, 0.1399]}, {"w": "missing", "b": [0.3332, 0.1251, 0.3918, 0.1399]}, {"w": "numerical", "b": [0.398, 0.1251, 0.475, 0.1399]}, {"w": "attribute,", "b": [0.4812, 0.1251, 0.5568, 0.1399]}, {"w": "one", "b": [0.563, 0.1251, 0.5902, 0.1399]}, {"w": "technique", "b": [0.5963, 0.1251, 0.6719, 0.1399]}, {"w": "consists", "b": [0.678, 0.1251, 0.7388, 0.1399]}, {"w": "in", "b": [0.745, 0.1251, 0.7601, 0.1399]}, {"w": "replacing", "b": [0.7662, 0.1251, 0.8378, 0.1399]}, {"w": "the", "b": [0.844, 0.1251, 0.8691, 0.1399]}, {"w": "missing", "b": [0.1312, 0.143, 0.1897, 0.1578]}, {"w": "value", "b": [0.1953, 0.143, 0.236, 0.1578]}, {"w": "by", "b": [0.2416, 0.143, 0.2607, 0.1578]}, {"w": "the", "b": [0.2663, 0.143, 0.2914, 0.1578]}, {"w": "average", "b": [0.297, 0.143, 0.3558, 0.1578]}, {"w": "value", "b": [0.3614, 0.143, 0.4021, 0.1578]}, {"w": "of", "b": [0.4076, 0.143, 0.4222, 0.1578]}, {"w": "this", "b": [0.4278, 0.143, 0.4571, 0.1578]}, {"w": "attribute", "b": [0.4626, 0.143, 0.533, 0.1578]}, {"w": "in", "b": [0.5386, 0.143, 0.5537, 0.1578]}, {"w": "the", "b": [0.5593, 0.143, 0.5844, 0.1578]}, {"w": "rest", "b": [0.59, 0.143, 0.6193, 0.1578]}, {"w": "of", "b": [0.6249, 0.143, 0.6395, 0.1578]}, {"w": "the", "b": [0.6451, 0.143, 0.6702, 0.1578]}, {"w": "dataset.", "b": [0.6758, 0.143, 0.7382, 0.1578]}, {"w": "Mathematically", "b": [0.7462, 0.143, 0.8698, 0.1578]}, {"w": "it", "b": [0.1312, 0.1607, 0.1438, 0.1759]}, {"w": "looks", "b": [0.1503, 0.1607, 0.1923, 0.1759]}, {"w": "as", "b": [0.1988, 0.1607, 0.2156, 0.1759]}, {"w": "follows.", "b": [0.2222, 0.1607, 0.2829, 0.1759]}, {"w": "Let", "b": [0.2923, 0.1607, 0.3198, 0.1759]}, {"w": "j", "b": [0.3262, 0.1608, 0.3338, 0.1758]}, {"w": "be", "b": [0.3414, 0.1607, 0.3608, 0.1759]}, {"w": "an", "b": [0.3673, 0.1607, 0.3872, 0.1759]}, {"w": "attribute", "b": [0.3937, 0.1607, 0.467, 0.1759]}, {"w": "that", "b": [0.4735, 0.1607, 0.5081, 0.1759]}, {"w": "is", "b": [0.5146, 0.1607, 0.5273, 0.1759]}, {"w": "missing", "b": [0.5338, 0.1607, 0.5947, 0.1759]}, {"w": "in", "b": [0.6012, 0.1607, 0.6169, 0.1759]}, {"w": "some", "b": [0.6234, 0.1607, 0.6643, 0.1759]}, {"w": "examples", "b": [0.6709, 0.1607, 0.7458, 0.1759]}, {"w": "in", "b": [0.7523, 0.1607, 0.768, 0.1759]}, {"w": "the", "b": [0.7745, 0.1607, 0.8007, 0.1759]}, {"w": "original", "b": [0.8072, 0.1607, 0.869, 0.1759]}, {"w": "dataset,", "b": [0.1312, 0.1787, 0.1962, 0.1938]}, {"w": "and", "b": [0.2041, 0.1787, 0.2344, 0.1938]}, {"w": "let", "b": [0.242, 0.1787, 0.2629, 0.1938]}, {"w": "S(j)", "b": [0.2704, 0.1769, 0.3013, 0.1936]}, {"w": "be", "b": [0.3098, 0.1787, 0.3291, 0.1938]}, {"w": "the", "b": [0.3367, 0.1787, 0.3628, 0.1938]}, {"w": "set", "b": [0.3704, 0.1787, 0.3935, 0.1938]}, {"w": "of", "b": [0.401, 0.1787, 0.4162, 0.1938]}, {"w": "size", "b": [0.4237, 0.1787, 0.4531, 0.1938]}, {"w": "N", "b": [0.4606, 0.1788, 0.4754, 0.1937]}, {"w": "(j)", "b": [0.4774, 0.1769, 0.4958, 0.1874]}, {"w": "that", "b": [0.5043, 0.1787, 0.5388, 0.1938]}, {"w": "contains", "b": [0.5463, 0.1787, 0.6139, 0.1938]}, {"w": "only", "b": [0.6214, 0.1787, 0.6565, 0.1938]}, {"w": "those", "b": [0.664, 0.1787, 0.707, 0.1938]}, {"w": "examples", "b": [0.7146, 0.1787, 0.7895, 0.1938]}, {"w": "from", "b": [0.797, 0.1787, 0.8352, 0.1938]}, {"w": "the", "b": [0.8428, 0.1787, 0.8689, 0.1938]}, {"w": "original", "b": [0.1312, 0.1968, 0.1912, 0.2117]}, {"w": "dataset", "b": [0.1973, 0.1968, 0.2553, 0.2117]}, {"w": "in", "b": [0.2614, 0.1968, 0.2767, 0.2117]}, {"w": "which", "b": [0.2828, 0.1968, 0.329, 0.2117]}, {"w": "the", "b": [0.3351, 0.1968, 0.3605, 0.2117]}, {"w": "value", "b": [0.3666, 0.1968, 0.4077, 0.2117]}, {"w": "of", "b": [0.4139, 0.1968, 0.4286, 0.2117]}, {"w": "the", "b": [0.4347, 0.1968, 0.4601, 0.2117]}, {"w": "attribute", "b": [0.4662, 0.1968, 0.5374, 0.2117]}, {"w": "j", "b": [0.5433, 0.1967, 0.5509, 0.2117]}, {"w": "is", "b": [0.5581, 0.1968, 0.5704, 0.2117]}, {"w": "present.", "b": [0.5765, 0.1968, 0.6391, 0.2117]}, {"w": "Then", "b": [0.6473, 0.1968, 0.689, 0.2117]}, {"w": "the", "b": [0.6951, 0.1968, 0.7205, 0.2117]}, {"w": "missing", "b": [0.7266, 0.1968, 0.7857, 0.2117]}, {"w": "value", "b": [0.7918, 0.1968, 0.8329, 0.2117]}, {"w": "ˆx(j)", "b": [0.8389, 0.1948, 0.8678, 0.2117]}]}, {"id": "b_2", "type": "paragraph", "text": "of the attribute j is given by,", "words": [{"w": "of", "b": [0.1312, 0.2147, 0.1461, 0.2297]}, {"w": "the", "b": [0.1522, 0.2147, 0.1779, 0.2297]}, {"w": "attribute", "b": [0.1841, 0.2147, 0.2559, 0.2297]}, {"w": "j", "b": [0.262, 0.2147, 0.2696, 0.2296]}, {"w": "is", "b": [0.2768, 0.2147, 0.2892, 0.2297]}, {"w": "given", "b": [0.2953, 0.2147, 0.3374, 0.2297]}, {"w": "by,", "b": [0.3435, 0.2147, 0.3666, 0.2297]}]}, {"id": "b_3", "type": "paragraph", "text": "ˆx(j) ← 1 N (j)", "words": [{"w": "ˆx(j)", "b": [0.4089, 0.26, 0.4378, 0.2776]}, {"w": "←", "b": [0.4438, 0.2624, 0.4623, 0.2774]}, {"w": "1", "b": [0.4831, 0.2525, 0.4923, 0.2675]}, {"w": "N", "b": [0.4696, 0.2732, 0.4845, 0.2881]}, {"w": "(j)", "b": [0.4865, 0.2724, 0.5048, 0.2828]}]}, {"id": "b_5", "type": "paragraph", "text": "i∈S(j)", "words": [{"w": "i∈S(j)", "b": [0.511, 0.2848, 0.5522, 0.2959]}]}, {"id": "b_6", "type": "paragraph", "text": "x(j)", "words": [{"w": "x(j)", "b": [0.5562, 0.2584, 0.5851, 0.2776]}]}, {"id": "b_7", "type": "paragraph", "text": "i ,", "words": [{"w": "i", "b": [0.5667, 0.2703, 0.5719, 0.2808]}, {"w": ",", "b": [0.586, 0.2626, 0.5911, 0.2776]}]}, {"id": "b_8", "type": "paragraph", "text": "where N (j) < N and the summation is made only over those examples where the value of the attribute j is present. An illustration of this technique is given in Figure 13, where two examples (at row 1 and 3) have the Height attribute missing. The average value, 177, will be imputed in the empty cells.", "words": [{"w": "where", "b": [0.1306, 0.3169, 0.1787, 0.332]}, {"w": "N", "b": [0.1851, 0.317, 0.1999, 0.3319]}, {"w": "(j)", "b": [0.2019, 0.3151, 0.2203, 0.3255]}, {"w": "<", "b": [0.2267, 0.317, 0.241, 0.3319]}, {"w": "N", "b": [0.2465, 0.317, 0.2613, 0.3319]}, {"w": "and", "b": [0.2697, 0.3169, 0.3, 0.332]}, {"w": "the", "b": [0.3064, 0.3169, 0.3325, 0.332]}, {"w": "summation", "b": [0.3389, 0.3169, 0.43, 0.332]}, {"w": "is", "b": [0.4363, 0.3169, 0.449, 0.332]}, {"w": "made", "b": [0.4554, 0.3169, 0.4993, 0.332]}, {"w": "only", "b": [0.5056, 0.3169, 0.5407, 0.332]}, {"w": "over", "b": [0.547, 0.3169, 0.5811, 0.332]}, {"w": "those", "b": [0.5875, 0.3169, 0.6305, 0.332]}, {"w": "examples", "b": [0.6368, 0.3169, 0.7117, 0.332]}, {"w": "where", "b": [0.7181, 0.3169, 0.7662, 0.332]}, {"w": "the", "b": [0.7726, 0.3169, 0.7988, 0.332]}, {"w": "value", "b": [0.8051, 0.3169, 0.8475, 0.332]}, {"w": "of", "b": [0.8539, 0.3169, 0.869, 0.332]}, {"w": "the", "b": [0.1312, 0.3349, 0.1569, 0.3499]}, {"w": "attribute", "b": [0.163, 0.3349, 0.2349, 0.3499]}, {"w": "j", "b": [0.241, 0.3349, 0.2486, 0.3499]}, {"w": "is", "b": [0.2558, 0.3349, 0.2682, 0.3499]}, {"w": "present.", "b": [0.2744, 0.3349, 0.3376, 0.3499]}, {"w": "An", "b": [0.3458, 0.3349, 0.3699, 0.3499]}, {"w": "illustration", "b": [0.3761, 0.3349, 0.4644, 0.3499]}, {"w": "of", "b": [0.4706, 0.3349, 0.4854, 0.3499]}, {"w": "this", "b": [0.4916, 0.3349, 0.5215, 0.3499]}, {"w": "technique", "b": [0.5276, 0.3349, 0.6045, 0.3499]}, {"w": "is", "b": [0.6107, 0.3349, 0.6231, 0.3499]}, {"w": "given", "b": [0.6293, 0.3349, 0.6713, 0.3499]}, {"w": "in", "b": [0.6775, 0.3349, 0.6929, 0.3499]}, {"w": "Figure", "b": [0.699, 0.3349, 0.7511, 0.3499]}, {"w": "13,", "b": [0.7573, 0.3349, 0.7808, 0.3499]}, {"w": "where", "b": [0.787, 0.3349, 0.8342, 0.3499]}, {"w": "two", "b": [0.8404, 0.3349, 0.8691, 0.3499]}, {"w": "examples", "b": [0.1312, 0.353, 0.2032, 0.3678]}, {"w": "(at", "b": [0.2092, 0.353, 0.2323, 0.3678]}, {"w": "row", "b": [0.2383, 0.353, 0.267, 0.3678]}, {"w": "1", "b": [0.273, 0.353, 0.282, 0.3678]}, {"w": "and", "b": [0.288, 0.353, 0.3172, 0.3678]}, {"w": "3)", "b": [0.3232, 0.353, 0.3393, 0.3678]}, {"w": "have", "b": [0.3453, 0.353, 0.3809, 0.3678]}, {"w": "the", "b": [0.3869, 0.353, 0.4121, 0.3678]}, {"w": "Height", "b": [0.4181, 0.353, 0.4703, 0.3678]}, {"w": "attribute", "b": [0.4763, 0.353, 0.5467, 0.3678]}, {"w": "missing.", "b": [0.5527, 0.353, 0.6162, 0.3678]}, {"w": "The", "b": [0.6244, 0.353, 0.6555, 0.3678]}, {"w": "average", "b": [0.6615, 0.353, 0.7204, 0.3678]}, {"w": "value,", "b": [0.7264, 0.353, 0.7721, 0.3678]}, {"w": "177,", "b": [0.7779, 0.353, 0.81, 0.3678]}, {"w": "will", "b": [0.8161, 0.353, 0.8442, 0.3678]}, {"w": "be", "b": [0.8502, 0.353, 0.8688, 0.3678]}, {"w": "imputed", "b": [0.1312, 0.3708, 0.1979, 0.3858]}, {"w": "in", "b": [0.204, 0.3708, 0.2194, 0.3858]}, {"w": "the", "b": [0.2256, 0.3708, 0.2512, 0.3858]}, {"w": "empty", "b": [0.2574, 0.3708, 0.3076, 0.3858]}, {"w": "cells.", "b": [0.3138, 0.3708, 0.3528, 0.3858]}]}, {"id": "b_9", "type": "paragraph", "text": "Weight Age Salary", "words": [{"w": "Weight", "b": [0.3072, 0.4169, 0.3543, 0.4293]}, {"w": "Age", "b": [0.2158, 0.4169, 0.2428, 0.4293]}, {"w": "Salary", "b": [0.512, 0.4169, 0.5552, 0.4293]}]}, {"id": "b_14", "type": "paragraph", "text": "70 35,000", "words": [{"w": "70", "b": [0.3223, 0.4478, 0.3392, 0.4601]}, {"w": "35,000", "b": [0.5103, 0.4478, 0.5569, 0.4601]}]}, {"id": "b_15", "type": "paragraph", "text": "26,900", "words": [{"w": "26,900", "b": [0.5103, 0.4786, 0.5569, 0.4909]}]}, {"id": "b_16", "type": "paragraph", "text": "87 76,500", "words": [{"w": "87", "b": [0.3223, 0.5094, 0.3392, 0.5218]}, {"w": "76,500", "b": [0.5103, 0.5094, 0.5569, 0.5218]}]}, {"id": "b_17", "type": "paragraph", "text": "66 94,800", "words": [{"w": "66", "b": [0.3223, 0.5403, 0.3392, 0.5526]}, {"w": "94,800", "b": [0.5103, 0.5403, 0.5569, 0.5526]}]}, {"id": "b_18", "type": "paragraph", "text": "Height", "words": [{"w": "Height", "b": [0.4102, 0.4169, 0.4542, 0.4293]}]}, {"id": "b_19", "type": "paragraph", "text": "175", "words": [{"w": "175", "b": [0.4195, 0.4786, 0.4449, 0.4909]}]}, {"id": "b_20", "type": "paragraph", "text": "187", "words": [{"w": "187", "b": [0.4195, 0.5403, 0.4449, 0.5526]}]}, {"id": "b_22", "type": "paragraph", "text": "65 60 19,000 169", "words": [{"w": "65", "b": [0.2209, 0.5711, 0.2378, 0.5834]}, {"w": "60", "b": [0.3223, 0.5711, 0.3392, 0.5834]}, {"w": "19,000", "b": [0.5103, 0.5711, 0.5569, 0.5834]}, {"w": "169", "b": [0.4195, 0.5711, 0.4449, 0.5834]}]}, {"id": "b_23", "type": "paragraph", "text": "Row", "words": [{"w": "Row", "b": [0.1127, 0.4169, 0.1431, 0.4293]}]}, {"id": "b_29", "type": "paragraph", "text": "Figure 13: Replacing the missing value by an average value of this attribute in the dataset.", "words": [{"w": "Figure", "b": [0.1312, 0.6098, 0.1833, 0.6247]}, {"w": "13:", "b": [0.1895, 0.6098, 0.2131, 0.6247]}, {"w": "Replacing", "b": [0.2213, 0.6098, 0.3005, 0.6247]}, {"w": "the", "b": [0.3066, 0.6098, 0.3323, 0.6247]}, {"w": "missing", "b": [0.3384, 0.6098, 0.3981, 0.6247]}, {"w": "value", "b": [0.4043, 0.6098, 0.4458, 0.6247]}, {"w": "by", "b": [0.4519, 0.6098, 0.4714, 0.6247]}, {"w": "an", "b": [0.4776, 0.6098, 0.4971, 0.6247]}, {"w": "average", "b": [0.5032, 0.6098, 0.5633, 0.6247]}, {"w": "value", "b": [0.5694, 0.6098, 0.6109, 0.6247]}, {"w": "of", "b": [0.6171, 0.6098, 0.632, 0.6247]}, {"w": "this", "b": [0.6381, 0.6098, 0.6679, 0.6247]}, {"w": "attribute", "b": [0.6741, 0.6098, 0.7459, 0.6247]}, {"w": "in", "b": [0.7521, 0.6098, 0.7675, 0.6247]}, {"w": "the", "b": [0.7736, 0.6098, 0.7993, 0.6247]}, {"w": "dataset.", "b": [0.8054, 0.6098, 0.8691, 0.6247]}]}, {"id": "b_30", "type": "paragraph", "text": "Another technique is to replace the missing value with a value outside the normal range of values. For example, if the regular range is [0, 1], you can set the missing value to 2 or −1; if the attribute is categorical, such as days of the week, then a missing value can be replaced by the value “Unknown.” Here, the learning algorithm learns what to do when the attribute has a value different from regular values. If the attribute is numerical, another technique is replacing the missing value with a value in the middle of the range. For example, if the range for an attribute is [−1, 1], you can set the missing value to be equal to 0. Here, the idea is that the value in the middle of the range will not significantly affect the prediction.", "words": [{"w": "Another", "b": [0.1305, 0.66, 0.1973, 0.675]}, {"w": "technique", "b": [0.2035, 0.66, 0.2811, 0.675]}, {"w": "is", "b": [0.2873, 0.66, 0.2998, 0.675]}, {"w": "to", "b": [0.3059, 0.66, 0.3225, 0.675]}, {"w": "replace", "b": [0.3286, 0.66, 0.3856, 0.675]}, {"w": "the", "b": [0.3918, 0.66, 0.4176, 0.675]}, {"w": "missing", "b": [0.4238, 0.66, 0.484, 0.675]}, {"w": "value", "b": [0.4901, 0.66, 0.5321, 0.675]}, {"w": "with", "b": [0.5382, 0.66, 0.5744, 0.675]}, {"w": "a", "b": [0.5806, 0.66, 0.5899, 0.675]}, {"w": "value", "b": [0.596, 0.66, 0.6379, 0.675]}, {"w": "outside", "b": [0.6441, 0.66, 0.7022, 0.675]}, {"w": "the", "b": [0.7083, 0.66, 0.7342, 0.675]}, {"w": "normal", "b": [0.7403, 0.66, 0.7973, 0.675]}, {"w": "range", "b": [0.8034, 0.66, 0.848, 0.675]}, {"w": "of", "b": [0.8541, 0.66, 0.8691, 0.675]}, {"w": "values.", "b": [0.1308, 0.6781, 0.1837, 0.6929]}, {"w": "For", "b": [0.1919, 0.6781, 0.2183, 0.6929]}, {"w": "example,", "b": [0.2244, 0.6781, 0.2943, 0.6929]}, {"w": "if", "b": [0.3005, 0.6781, 0.311, 0.6929]}, {"w": "the", "b": [0.3172, 0.6781, 0.3423, 0.6929]}, {"w": "regular", "b": [0.3485, 0.6781, 0.4039, 0.6929]}, {"w": "range", "b": [0.41, 0.6781, 0.4533, 0.6929]}, {"w": "is", "b": [0.4595, 0.6781, 0.4717, 0.6929]}, {"w": "[0,", "b": [0.4776, 0.678, 0.4969, 0.6929]}, {"w": "1],", "b": [0.5, 0.6781, 0.5191, 0.6929]}, {"w": "you", "b": [0.5252, 0.6781, 0.5534, 0.6929]}, {"w": "can", "b": [0.5595, 0.6781, 0.5867, 0.6929]}, {"w": "set", "b": [0.5928, 0.6781, 0.6151, 0.6929]}, {"w": "the", "b": [0.6212, 0.6781, 0.6464, 0.6929]}, {"w": "missing", "b": [0.6525, 0.6781, 0.7111, 0.6929]}, {"w": "value", "b": [0.7172, 0.6781, 0.7579, 0.6929]}, {"w": "to", "b": [0.7641, 0.6781, 0.7802, 0.6929]}, {"w": "2", "b": [0.7862, 0.6781, 0.7952, 0.6929]}, {"w": "or", "b": [0.8014, 0.6781, 0.8175, 0.6929]}, {"w": "−1;", "b": [0.8236, 0.6778, 0.8521, 0.6929]}, {"w": "if", "b": [0.8582, 0.6781, 0.8688, 0.6929]}, {"w": "the", "b": [0.1312, 0.6959, 0.1571, 0.7109]}, {"w": "attribute", "b": [0.1633, 0.6959, 0.2358, 0.7109]}, {"w": "is", "b": [0.2419, 0.6959, 0.2544, 0.7109]}, {"w": "categorical,", "b": [0.2606, 0.6959, 0.3528, 0.7109]}, {"w": "such", "b": [0.3589, 0.6959, 0.3948, 0.7109]}, {"w": "as", "b": [0.4009, 0.6959, 0.4176, 0.7109]}, {"w": "days", "b": [0.4237, 0.6959, 0.4601, 0.7109]}, {"w": "of", "b": [0.4662, 0.6959, 0.4812, 0.7109]}, {"w": "the", "b": [0.4874, 0.6959, 0.5133, 0.7109]}, {"w": "week,", "b": [0.5194, 0.6959, 0.5639, 0.7109]}, {"w": "then", "b": [0.5701, 0.6959, 0.6063, 0.7109]}, {"w": "a", "b": [0.6125, 0.6959, 0.6218, 0.7109]}, {"w": "missing", "b": [0.6279, 0.6959, 0.6882, 0.7109]}, {"w": "value", "b": [0.6943, 0.6959, 0.7362, 0.7109]}, {"w": "can", "b": [0.7424, 0.6959, 0.7704, 0.7109]}, {"w": "be", "b": [0.7765, 0.6959, 0.7957, 0.7109]}, {"w": "replaced", "b": [0.8018, 0.6959, 0.8692, 0.7109]}, {"w": "by", "b": [0.1312, 0.7139, 0.1505, 0.7288]}, {"w": "the", "b": [0.1567, 0.7139, 0.182, 0.7288]}, {"w": "value", "b": [0.1882, 0.7139, 0.2293, 0.7288]}, {"w": "“Unknown.”", "b": [0.2354, 0.7139, 0.3307, 0.7288]}, {"w": "Here,", "b": [0.339, 0.7139, 0.3811, 0.7288]}, {"w": "the", "b": [0.3873, 0.7139, 0.4126, 0.7288]}, {"w": "learning", "b": [0.4188, 0.7139, 0.4828, 0.7288]}, {"w": "algorithm", "b": [0.4889, 0.7139, 0.566, 0.7288]}, {"w": "learns", "b": [0.5722, 0.7139, 0.619, 0.7288]}, {"w": "what", "b": [0.6252, 0.7139, 0.6647, 0.7288]}, {"w": "to", "b": [0.6709, 0.7139, 0.6871, 0.7288]}, {"w": "do", "b": [0.6933, 0.7139, 0.7126, 0.7288]}, {"w": "when", "b": [0.7187, 0.7139, 0.7603, 0.7288]}, {"w": "the", "b": [0.7665, 0.7139, 0.7919, 0.7288]}, {"w": "attribute", "b": [0.798, 0.7139, 0.8691, 0.7288]}, {"w": "has", "b": [0.1312, 0.7317, 0.1585, 0.7468]}, {"w": "a", "b": [0.1651, 0.7317, 0.1745, 0.7468]}, {"w": "value", "b": [0.1811, 0.7317, 0.2235, 0.7468]}, {"w": "different", "b": [0.2301, 0.7317, 0.2981, 0.7468]}, {"w": "from", "b": [0.3047, 0.7317, 0.3429, 0.7468]}, {"w": "regular", "b": [0.3495, 0.7317, 0.4072, 0.7468]}, {"w": "values.", "b": [0.4137, 0.7317, 0.4688, 0.7468]}, {"w": "If", "b": [0.4783, 0.7317, 0.4908, 0.7468]}, {"w": "the", "b": [0.4974, 0.7317, 0.5236, 0.7468]}, {"w": "attribute", "b": [0.5302, 0.7317, 0.6034, 0.7468]}, {"w": "is", "b": [0.61, 0.7317, 0.6227, 0.7468]}, {"w": "numerical,", "b": [0.6293, 0.7317, 0.7146, 0.7468]}, {"w": "another", "b": [0.7213, 0.7317, 0.7841, 0.7468]}, {"w": "technique", "b": [0.7907, 0.7317, 0.8691, 0.7468]}, {"w": "is", "b": [0.1312, 0.7497, 0.1439, 0.7648]}, {"w": "replacing", "b": [0.1501, 0.7497, 0.2244, 0.7648]}, {"w": "the", "b": [0.2306, 0.7497, 0.2567, 0.7648]}, {"w": "missing", "b": [0.2629, 0.7497, 0.3237, 0.7648]}, {"w": "value", "b": [0.3299, 0.7497, 0.3723, 0.7648]}, {"w": "with", "b": [0.3784, 0.7497, 0.4151, 0.7648]}, {"w": "a", "b": [0.4212, 0.7497, 0.4306, 0.7648]}, {"w": "value", "b": [0.4368, 0.7497, 0.4792, 0.7648]}, {"w": "in", "b": [0.4853, 0.7497, 0.501, 0.7648]}, {"w": "the", "b": [0.5072, 0.7497, 0.5333, 0.7648]}, {"w": "middle", "b": [0.5395, 0.7497, 0.595, 0.7648]}, {"w": "of", "b": [0.6011, 0.7497, 0.6163, 0.7648]}, {"w": "the", "b": [0.6224, 0.7497, 0.6486, 0.7648]}, {"w": "range.", "b": [0.6548, 0.7497, 0.705, 0.7648]}, {"w": "For", "b": [0.7132, 0.7497, 0.7408, 0.7648]}, {"w": "example,", "b": [0.7469, 0.7497, 0.8196, 0.7648]}, {"w": "if", "b": [0.8258, 0.7497, 0.8368, 0.7648]}, {"w": "the", "b": [0.843, 0.7497, 0.8691, 0.7648]}, {"w": "range", "b": [0.1312, 0.7676, 0.1763, 0.7827]}, {"w": "for", "b": [0.1826, 0.7676, 0.2052, 0.7827]}, {"w": "an", "b": [0.2115, 0.7676, 0.2314, 0.7827]}, {"w": "attribute", "b": [0.2377, 0.7676, 0.311, 0.7827]}, {"w": "is", "b": [0.3173, 0.7676, 0.33, 0.7827]}, {"w": "[−1,", "b": [0.3362, 0.7675, 0.3705, 0.7827]}, {"w": "1],", "b": [0.3735, 0.7676, 0.3934, 0.7827]}, {"w": "you", "b": [0.3998, 0.7676, 0.4291, 0.7827]}, {"w": "can", "b": [0.4354, 0.7676, 0.4637, 0.7827]}, {"w": "set", "b": [0.47, 0.7676, 0.4931, 0.7827]}, {"w": "the", "b": [0.4995, 0.7676, 0.5256, 0.7827]}, {"w": "missing", "b": [0.532, 0.7676, 0.5929, 0.7827]}, {"w": "value", "b": [0.5992, 0.7676, 0.6416, 0.7827]}, {"w": "to", "b": [0.6479, 0.7676, 0.6647, 0.7827]}, {"w": "be", "b": [0.671, 0.7676, 0.6904, 0.7827]}, {"w": "equal", "b": [0.6967, 0.7676, 0.7401, 0.7827]}, {"w": "to", "b": [0.7465, 0.7676, 0.7632, 0.7827]}, {"w": "0.", "b": [0.7694, 0.7676, 0.784, 0.7827]}, {"w": "Here,", "b": [0.7928, 0.7676, 0.8363, 0.7827]}, {"w": "the", "b": [0.8427, 0.7676, 0.8688, 0.7827]}, {"w": "idea", "b": [0.1312, 0.7857, 0.1641, 0.8006]}, {"w": "is", "b": [0.1702, 0.7857, 0.1826, 0.8006]}, {"w": "that", "b": [0.1888, 0.7857, 0.2226, 0.8006]}, {"w": "the", "b": [0.2288, 0.7857, 0.2544, 0.8006]}, {"w": "value", "b": [0.2605, 0.7857, 0.3021, 0.8006]}, {"w": "in", "b": [0.3082, 0.7857, 0.3236, 0.8006]}, {"w": "the", "b": [0.3298, 0.7857, 0.3554, 0.8006]}, {"w": "middle", "b": [0.3616, 0.7857, 0.4159, 0.8006]}, {"w": "of", "b": [0.422, 0.7857, 0.4369, 0.8006]}, {"w": "the", "b": [0.4431, 0.7857, 0.4687, 0.8006]}, {"w": "range", "b": [0.4749, 0.7857, 0.519, 0.8006]}, {"w": "will", "b": [0.5252, 0.7857, 0.5539, 0.8006]}, {"w": "not", "b": [0.56, 0.7857, 0.5867, 0.8006]}, {"w": "significantly", "b": [0.5928, 0.7857, 0.6893, 0.8006]}, {"w": "affect", "b": [0.6955, 0.7857, 0.7391, 0.8006]}, {"w": "the", "b": [0.7452, 0.7857, 0.7709, 0.8006]}, {"w": "prediction.", "b": [0.777, 0.7857, 0.8632, 0.8006]}]}, {"id": "b_31", "type": "paragraph", "text": "A more advanced technique is to use the missing value as the target variable for a regression problem. (In this case, we assume all attributes are numerical.) You can use the remaining attributes [x(1)", "words": [{"w": "A", "b": [0.1305, 0.8127, 0.1441, 0.8275]}, {"w": "more", "b": [0.1503, 0.8127, 0.1897, 0.8275]}, {"w": "advanced", "b": [0.1958, 0.8127, 0.269, 0.8275]}, {"w": "technique", "b": [0.2751, 0.8127, 0.3508, 0.8275]}, {"w": "is", "b": [0.357, 0.8127, 0.3692, 0.8275]}, {"w": "to", "b": [0.3753, 0.8127, 0.3915, 0.8275]}, {"w": "use", "b": [0.3976, 0.8127, 0.423, 0.8275]}, {"w": "the", "b": [0.4291, 0.8127, 0.4543, 0.8275]}, {"w": "missing", "b": [0.4605, 0.8127, 0.5192, 0.8275]}, {"w": "value", "b": [0.5254, 0.8127, 0.5662, 0.8275]}, {"w": "as", "b": [0.5724, 0.8127, 0.5886, 0.8275]}, {"w": "the", "b": [0.5948, 0.8127, 0.62, 0.8275]}, {"w": "target", "b": [0.6261, 0.8127, 0.6736, 0.8275]}, {"w": "variable", "b": [0.6797, 0.8127, 0.7419, 0.8275]}, {"w": "for", "b": [0.748, 0.8127, 0.7697, 0.8275]}, {"w": "a", "b": [0.7759, 0.8127, 0.785, 0.8275]}, {"w": "regression", "b": [0.7911, 0.8127, 0.8691, 0.8275]}, {"w": "problem.", "b": [0.1312, 0.8305, 0.2022, 0.8455]}, {"w": "(In", "b": [0.2104, 0.8305, 0.2345, 0.8455]}, {"w": "this", "b": [0.2407, 0.8305, 0.2706, 0.8455]}, {"w": "case,", "b": [0.2767, 0.8305, 0.3149, 0.8455]}, {"w": "we", "b": [0.321, 0.8305, 0.3421, 0.8455]}, {"w": "assume", "b": [0.3482, 0.8305, 0.406, 0.8455]}, {"w": "all", "b": [0.4121, 0.8305, 0.4316, 0.8455]}, {"w": "attributes", "b": [0.4378, 0.8305, 0.5171, 0.8455]}, {"w": "are", "b": [0.5232, 0.8305, 0.5479, 0.8455]}, {"w": "numerical.)", "b": [0.554, 0.8305, 0.645, 0.8455]}, {"w": "You", "b": [0.6532, 0.8305, 0.6851, 0.8455]}, {"w": "can", "b": [0.6912, 0.8305, 0.719, 0.8455]}, {"w": "use", "b": [0.7251, 0.8305, 0.7509, 0.8455]}, {"w": "the", "b": [0.7571, 0.8305, 0.7828, 0.8455]}, {"w": "remaining", "b": [0.7889, 0.8305, 0.8691, 0.8455]}, {"w": "attributes", "b": [0.1312, 0.8513, 0.2119, 0.8664]}, {"w": "[x(1)", "b": [0.2185, 0.8471, 0.2532, 0.8664]}]}, {"id": "b_32", "type": "paragraph", "text": "i , x(2)", "words": [{"w": "i", "b": [0.2343, 0.859, 0.2396, 0.8695]}, {"w": ",", "b": [0.2541, 0.8514, 0.2593, 0.8663]}, {"w": "x(2)", "b": [0.2624, 0.8471, 0.2918, 0.8663]}]}, {"id": "b_33", "type": "paragraph", "text": "i , . . . , x(j−1)", "words": [{"w": "i", "b": [0.2729, 0.859, 0.2781, 0.8695]}, {"w": ",", "b": [0.2927, 0.8514, 0.2978, 0.8663]}, {"w": ".", "b": [0.3009, 0.8514, 0.306, 0.8663]}, {"w": ".", "b": [0.3091, 0.8514, 0.3142, 0.8663]}, {"w": ".", "b": [0.3173, 0.8514, 0.3224, 0.8663]}, {"w": ",", "b": [0.3255, 0.8514, 0.3306, 0.8663]}, {"w": "x(j−1)", "b": [0.3337, 0.847, 0.3815, 0.8663]}]}, {"id": "b_34", "type": "equation", "text": "i , x(j+1)", "words": [{"w": "i", "b": [0.3442, 0.859, 0.3495, 0.8695]}, {"w": ",", "b": [0.3824, 0.8514, 0.3876, 0.8663]}, {"w": "x(j+1)", "b": [0.3906, 0.8471, 0.4382, 0.8663]}]}, {"id": "b_35", "type": "paragraph", "text": "i , . . . , x(D)", "words": [{"w": "i", "b": [0.4012, 0.859, 0.4064, 0.8695]}, {"w": ",", "b": [0.4392, 0.8514, 0.4443, 0.8663]}, {"w": ".", "b": [0.4474, 0.8514, 0.4525, 0.8663]}, {"w": ".", "b": [0.4556, 0.8514, 0.4607, 0.8663]}, {"w": ".", "b": [0.4638, 0.8514, 0.4689, 0.8663]}, {"w": ",", "b": [0.472, 0.8514, 0.4771, 0.8663]}, {"w": "x(D)", "b": [0.4802, 0.8471, 0.5147, 0.8663]}]}, {"id": "b_36", "type": "paragraph", "text": "i ] to form a feature vector ˆxi, set ˆyi ←x(j)", "words": [{"w": "i", "b": [0.4907, 0.859, 0.4959, 0.8695]}, {"w": "]", "b": [0.5156, 0.8513, 0.5208, 0.8664]}, {"w": "to", "b": [0.5274, 0.8513, 0.5442, 0.8664]}, {"w": "form", "b": [0.5507, 0.8513, 0.589, 0.8664]}, {"w": "a", "b": [0.5955, 0.8513, 0.605, 0.8664]}, {"w": "feature", "b": [0.6115, 0.8513, 0.6686, 0.8664]}, {"w": "vector", "b": [0.6752, 0.8513, 0.7255, 0.8664]}, {"w": "ˆxi,", "b": [0.732, 0.8513, 0.7545, 0.8676]}, {"w": "set", "b": [0.7612, 0.8513, 0.7844, 0.8664]}, {"w": "ˆyi", "b": [0.7909, 0.8514, 0.8052, 0.8676]}, {"w": "←x(j)", "b": [0.812, 0.8471, 0.8652, 0.8663]}]}, {"id": "b_37", "type": "paragraph", "text": "i ,", "words": [{"w": "i", "b": [0.8468, 0.859, 0.852, 0.8695]}, {"w": ",", "b": [0.8661, 0.8513, 0.8713, 0.8664]}]}, {"id": "b_38", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 29", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "29", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 73, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "where j is the attribute with a missing value. Then you build a regression model to predict ˆy from ˆx. Of course, to build training examples (ˆx, ˆy), you only use those examples from the original dataset, in which the value of attribute j is present.", "words": [{"w": "where", "b": [0.1306, 0.0885, 0.1769, 0.1033]}, {"w": "j", "b": [0.1827, 0.0884, 0.1903, 0.1033]}, {"w": "is", "b": [0.1973, 0.0885, 0.2094, 0.1033]}, {"w": "the", "b": [0.2153, 0.0885, 0.2405, 0.1033]}, {"w": "attribute", "b": [0.2463, 0.0885, 0.3167, 0.1033]}, {"w": "with", "b": [0.3226, 0.0885, 0.3578, 0.1033]}, {"w": "a", "b": [0.3637, 0.0885, 0.3727, 0.1033]}, {"w": "missing", "b": [0.3786, 0.0885, 0.4371, 0.1033]}, {"w": "value.", "b": [0.443, 0.0885, 0.4887, 0.1033]}, {"w": "Then", "b": [0.4968, 0.0885, 0.538, 0.1033]}, {"w": "you", "b": [0.5439, 0.0885, 0.572, 0.1033]}, {"w": "build", "b": [0.5779, 0.0885, 0.6181, 0.1033]}, {"w": "a", "b": [0.624, 0.0885, 0.6331, 0.1033]}, {"w": "regression", "b": [0.639, 0.0885, 0.7167, 0.1033]}, {"w": "model", "b": [0.7225, 0.0885, 0.7703, 0.1033]}, {"w": "to", "b": [0.7762, 0.0885, 0.7922, 0.1033]}, {"w": "predict", "b": [0.7981, 0.0885, 0.8535, 0.1033]}, {"w": "ˆy", "b": [0.8591, 0.0884, 0.8696, 0.1033]}, {"w": "from", "b": [0.1312, 0.1063, 0.1689, 0.1213]}, {"w": "ˆx.", "b": [0.1751, 0.1063, 0.1915, 0.1213]}, {"w": "Of", "b": [0.1997, 0.1063, 0.2198, 0.1213]}, {"w": "course,", "b": [0.226, 0.1063, 0.2819, 0.1213]}, {"w": "to", "b": [0.288, 0.1063, 0.3045, 0.1213]}, {"w": "build", "b": [0.3106, 0.1063, 0.3519, 0.1213]}, {"w": "training", "b": [0.358, 0.1063, 0.4221, 0.1213]}, {"w": "examples", "b": [0.4282, 0.1063, 0.502, 0.1213]}, {"w": "(ˆx,", "b": [0.508, 0.1063, 0.5317, 0.1213]}, {"w": "ˆy),", "b": [0.5348, 0.1063, 0.5568, 0.1213]}, {"w": "you", "b": [0.563, 0.1063, 0.5919, 0.1213]}, {"w": "only", "b": [0.598, 0.1063, 0.6326, 0.1213]}, {"w": "use", "b": [0.6387, 0.1063, 0.6646, 0.1213]}, {"w": "those", "b": [0.6707, 0.1063, 0.7132, 0.1213]}, {"w": "examples", "b": [0.7193, 0.1063, 0.7931, 0.1213]}, {"w": "from", "b": [0.7993, 0.1063, 0.837, 0.1213]}, {"w": "the", "b": [0.8431, 0.1063, 0.8689, 0.1213]}, {"w": "original", "b": [0.1312, 0.1243, 0.1918, 0.1392]}, {"w": "dataset,", "b": [0.1979, 0.1243, 0.2616, 0.1392]}, {"w": "in", "b": [0.2678, 0.1243, 0.2831, 0.1392]}, {"w": "which", "b": [0.2893, 0.1243, 0.336, 0.1392]}, {"w": "the", "b": [0.3421, 0.1243, 0.3678, 0.1392]}, {"w": "value", "b": [0.3739, 0.1243, 0.4154, 0.1392]}, {"w": "of", "b": [0.4216, 0.1243, 0.4365, 0.1392]}, {"w": "attribute", "b": [0.4426, 0.1243, 0.5144, 0.1392]}, {"w": "j", "b": [0.5204, 0.1243, 0.528, 0.1392]}, {"w": "is", "b": [0.5352, 0.1243, 0.5476, 0.1392]}, {"w": "present.", "b": [0.5538, 0.1243, 0.617, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "Finally, if you have a significantly large dataset and just a few attributes with missing values, you can add a synthetic binary indicator attribute for each original attribute with missing values. Let’s say that examples in your dataset are D-dimensional, and attribute at position j = 12 has missing values. For each example x, you then add the attribute at position j = D + 1, which is equal to 1 if the value of the attribute at position 12 is present in x and 0 otherwise. The missing value then can be replaced by 0 or any value of your choice.", "words": [{"w": "Finally,", "b": [0.1312, 0.1513, 0.1902, 0.1661]}, {"w": "if", "b": [0.1962, 0.1513, 0.2068, 0.1661]}, {"w": "you", "b": [0.2127, 0.1513, 0.2409, 0.1661]}, {"w": "have", "b": [0.2468, 0.1513, 0.2825, 0.1661]}, {"w": "a", "b": [0.2884, 0.1513, 0.2975, 0.1661]}, {"w": "significantly", "b": [0.3034, 0.1513, 0.398, 0.1661]}, {"w": "large", "b": [0.4039, 0.1513, 0.4422, 0.1661]}, {"w": "dataset", "b": [0.4481, 0.1513, 0.5055, 0.1661]}, {"w": "and", "b": [0.5114, 0.1513, 0.5406, 0.1661]}, {"w": "just", "b": [0.5465, 0.1513, 0.5763, 0.1661]}, {"w": "a", "b": [0.5822, 0.1513, 0.5913, 0.1661]}, {"w": "few", "b": [0.5972, 0.1513, 0.6238, 0.1661]}, {"w": "attributes", "b": [0.6298, 0.1513, 0.7073, 0.1661]}, {"w": "with", "b": [0.7133, 0.1513, 0.7484, 0.1661]}, {"w": "missing", "b": [0.7544, 0.1513, 0.8129, 0.1661]}, {"w": "values,", "b": [0.8188, 0.1513, 0.8717, 0.1661]}, {"w": "you", "b": [0.1308, 0.1691, 0.1599, 0.1841]}, {"w": "can", "b": [0.166, 0.1691, 0.1941, 0.1841]}, {"w": "add", "b": [0.2003, 0.1691, 0.2304, 0.1841]}, {"w": "a", "b": [0.2366, 0.1691, 0.2459, 0.1841]}, {"w": "synthetic", "b": [0.2521, 0.1691, 0.326, 0.1841]}, {"w": "binary", "b": [0.3322, 0.1691, 0.3847, 0.1841]}, {"w": "indicator", "b": [0.3909, 0.1691, 0.4637, 0.1841]}, {"w": "attribute", "b": [0.4699, 0.1691, 0.5428, 0.1841]}, {"w": "for", "b": [0.5489, 0.1691, 0.5713, 0.1841]}, {"w": "each", "b": [0.5775, 0.1691, 0.6134, 0.1841]}, {"w": "original", "b": [0.6195, 0.1691, 0.6809, 0.1841]}, {"w": "attribute", "b": [0.6871, 0.1691, 0.7599, 0.1841]}, {"w": "with", "b": [0.7661, 0.1691, 0.8024, 0.1841]}, {"w": "missing", "b": [0.8086, 0.1691, 0.8691, 0.1841]}, {"w": "values.", "b": [0.1308, 0.1872, 0.1839, 0.202]}, {"w": "Let’s", "b": [0.1921, 0.1872, 0.2309, 0.202]}, {"w": "say", "b": [0.2371, 0.1872, 0.2624, 0.202]}, {"w": "that", "b": [0.2686, 0.1872, 0.3019, 0.202]}, {"w": "examples", "b": [0.3081, 0.1872, 0.3805, 0.202]}, {"w": "in", "b": [0.3866, 0.1872, 0.4018, 0.202]}, {"w": "your", "b": [0.4079, 0.1872, 0.4434, 0.202]}, {"w": "dataset", "b": [0.4495, 0.1872, 0.5072, 0.202]}, {"w": "are", "b": [0.5134, 0.1872, 0.5377, 0.202]}, {"w": "D-dimensional,", "b": [0.5437, 0.1871, 0.6647, 0.202]}, {"w": "and", "b": [0.6708, 0.1872, 0.7002, 0.202]}, {"w": "attribute", "b": [0.7063, 0.1872, 0.7771, 0.202]}, {"w": "at", "b": [0.7833, 0.1872, 0.7995, 0.202]}, {"w": "position", "b": [0.8056, 0.1872, 0.8689, 0.202]}, {"w": "j", "b": [0.1312, 0.205, 0.1388, 0.22]}, {"w": "=", "b": [0.1474, 0.2049, 0.1621, 0.22]}, {"w": "12", "b": [0.1696, 0.2049, 0.1885, 0.22]}, {"w": "has", "b": [0.1961, 0.2049, 0.2234, 0.22]}, {"w": "missing", "b": [0.231, 0.2049, 0.2919, 0.22]}, {"w": "values.", "b": [0.2995, 0.2049, 0.3545, 0.22]}, {"w": "For", "b": [0.3671, 0.2049, 0.3946, 0.22]}, {"w": "each", "b": [0.4022, 0.2049, 0.4384, 0.22]}, {"w": "example", "b": [0.446, 0.2049, 0.5134, 0.22]}, {"w": "x,", "b": [0.5209, 0.2049, 0.5374, 0.22]}, {"w": "you", "b": [0.5454, 0.2049, 0.5747, 0.22]}, {"w": "then", "b": [0.5823, 0.2049, 0.6189, 0.22]}, {"w": "add", "b": [0.6265, 0.2049, 0.6569, 0.22]}, {"w": "the", "b": [0.6645, 0.2049, 0.6906, 0.22]}, {"w": "attribute", "b": [0.6982, 0.2049, 0.7715, 0.22]}, {"w": "at", "b": [0.7791, 0.2049, 0.7958, 0.22]}, {"w": "position", "b": [0.8034, 0.2049, 0.8689, 0.22]}, {"w": "j", "b": [0.1312, 0.223, 0.1388, 0.2379]}, {"w": "=", "b": [0.145, 0.2231, 0.1592, 0.2379]}, {"w": "D", "b": [0.1643, 0.223, 0.1796, 0.2379]}, {"w": "+", "b": [0.1842, 0.2231, 0.1983, 0.2379]}, {"w": "1,", "b": [0.2024, 0.2231, 0.2166, 0.2379]}, {"w": "which", "b": [0.2227, 0.2231, 0.2687, 0.2379]}, {"w": "is", "b": [0.2748, 0.2231, 0.287, 0.2379]}, {"w": "equal", "b": [0.2932, 0.2231, 0.3351, 0.2379]}, {"w": "to", "b": [0.3413, 0.2231, 0.3574, 0.2379]}, {"w": "1", "b": [0.3635, 0.2231, 0.3726, 0.2379]}, {"w": "if", "b": [0.3788, 0.2231, 0.3894, 0.2379]}, {"w": "the", "b": [0.3955, 0.2231, 0.4208, 0.2379]}, {"w": "value", "b": [0.4269, 0.2231, 0.4679, 0.2379]}, {"w": "of", "b": [0.474, 0.2231, 0.4886, 0.2379]}, {"w": "the", "b": [0.4948, 0.2231, 0.5201, 0.2379]}, {"w": "attribute", "b": [0.5262, 0.2231, 0.597, 0.2379]}, {"w": "at", "b": [0.6031, 0.2231, 0.6193, 0.2379]}, {"w": "position", "b": [0.6254, 0.2231, 0.6887, 0.2379]}, {"w": "12", "b": [0.6947, 0.2231, 0.7129, 0.2379]}, {"w": "is", "b": [0.719, 0.2231, 0.7312, 0.2379]}, {"w": "present", "b": [0.7374, 0.2231, 0.7946, 0.2379]}, {"w": "in", "b": [0.8008, 0.2231, 0.8159, 0.2379]}, {"w": "x", "b": [0.822, 0.223, 0.8332, 0.238]}, {"w": "and", "b": [0.8395, 0.2231, 0.8688, 0.2379]}, {"w": "0", "b": [0.1312, 0.2409, 0.1405, 0.2559]}, {"w": "otherwise.", "b": [0.1466, 0.2409, 0.2278, 0.2559]}, {"w": "The", "b": [0.236, 0.2409, 0.2678, 0.2559]}, {"w": "missing", "b": [0.2739, 0.2409, 0.3336, 0.2559]}, {"w": "value", "b": [0.3398, 0.2409, 0.3813, 0.2559]}, {"w": "then", "b": [0.3874, 0.2409, 0.4233, 0.2559]}, {"w": "can", "b": [0.4295, 0.2409, 0.4572, 0.2559]}, {"w": "be", "b": [0.4633, 0.2409, 0.4823, 0.2559]}, {"w": "replaced", "b": [0.4885, 0.2409, 0.5552, 0.2559]}, {"w": "by", "b": [0.5613, 0.2409, 0.5808, 0.2559]}, {"w": "0", "b": [0.5867, 0.2409, 0.596, 0.2559]}, {"w": "or", "b": [0.6021, 0.2409, 0.6186, 0.2559]}, {"w": "any", "b": [0.6247, 0.2409, 0.6534, 0.2559]}, {"w": "value", "b": [0.6596, 0.2409, 0.7011, 0.2559]}, {"w": "of", "b": [0.7072, 0.2409, 0.7221, 0.2559]}, {"w": "your", "b": [0.7283, 0.2409, 0.7642, 0.2559]}, {"w": "choice.", "b": [0.7704, 0.2409, 0.8242, 0.2559]}]}, {"id": "b_2", "type": "paragraph", "text": "At prediction time, if your example is not complete, you should use the same data imputation technique to fill the missing values as the technique you used to complete the training data.", "words": [{"w": "At", "b": [0.1305, 0.268, 0.1506, 0.2828]}, {"w": "prediction", "b": [0.1561, 0.268, 0.2356, 0.2828]}, {"w": "time,", "b": [0.2411, 0.268, 0.2813, 0.2828]}, {"w": "if", "b": [0.2869, 0.268, 0.2975, 0.2828]}, {"w": "your", "b": [0.303, 0.268, 0.3382, 0.2828]}, {"w": "example", "b": [0.3437, 0.268, 0.4085, 0.2828]}, {"w": "is", "b": [0.414, 0.268, 0.4262, 0.2828]}, {"w": "not", "b": [0.4317, 0.268, 0.4578, 0.2828]}, {"w": "complete,", "b": [0.4633, 0.268, 0.5387, 0.2828]}, {"w": "you", "b": [0.5443, 0.268, 0.5725, 0.2828]}, {"w": "should", "b": [0.578, 0.268, 0.6293, 0.2828]}, {"w": "use", "b": [0.6348, 0.268, 0.6601, 0.2828]}, {"w": "the", "b": [0.6656, 0.268, 0.6907, 0.2828]}, {"w": "same", "b": [0.6962, 0.268, 0.7355, 0.2828]}, {"w": "data", "b": [0.741, 0.268, 0.7762, 0.2828]}, {"w": "imputation", "b": [0.7817, 0.268, 0.8691, 0.2828]}, {"w": "technique", "b": [0.1312, 0.2858, 0.208, 0.3008]}, {"w": "to", "b": [0.2142, 0.2858, 0.2305, 0.3008]}, {"w": "fill", "b": [0.2367, 0.2858, 0.2572, 0.3008]}, {"w": "the", "b": [0.2633, 0.2858, 0.2889, 0.3008]}, {"w": "missing", "b": [0.295, 0.2858, 0.3546, 0.3008]}, {"w": "values", "b": [0.3607, 0.2858, 0.4095, 0.3008]}, {"w": "as", "b": [0.4156, 0.2858, 0.4321, 0.3008]}, {"w": "the", "b": [0.4383, 0.2858, 0.4639, 0.3008]}, {"w": "technique", "b": [0.47, 0.2858, 0.5468, 0.3008]}, {"w": "you", "b": [0.5529, 0.2858, 0.5816, 0.3008]}, {"w": "used", "b": [0.5877, 0.2858, 0.6237, 0.3008]}, {"w": "to", "b": [0.6298, 0.2858, 0.6462, 0.3008]}, {"w": "complete", "b": [0.6523, 0.2858, 0.724, 0.3008]}, {"w": "the", "b": [0.7301, 0.2858, 0.7557, 0.3008]}, {"w": "training", "b": [0.7619, 0.2858, 0.8254, 0.3008]}, {"w": "data.", "b": [0.8315, 0.2858, 0.8724, 0.3008]}]}, {"id": "b_3", "type": "paragraph", "text": "Before you start working on the learning problem, you cannot tell which data imputation technique will work best. Try several techniques, build several models, and select the one that works best (using the validation set to compare models).", "words": [{"w": "Before", "b": [0.1312, 0.3126, 0.1838, 0.3277]}, {"w": "you", "b": [0.1901, 0.3126, 0.2194, 0.3277]}, {"w": "start", "b": [0.2257, 0.3126, 0.2646, 0.3277]}, {"w": "working", "b": [0.2709, 0.3126, 0.3358, 0.3277]}, {"w": "on", "b": [0.3421, 0.3126, 0.3619, 0.3277]}, {"w": "the", "b": [0.3682, 0.3126, 0.3944, 0.3277]}, {"w": "learning", "b": [0.4007, 0.3126, 0.4666, 0.3277]}, {"w": "problem,", "b": [0.473, 0.3126, 0.5452, 0.3277]}, {"w": "you", "b": [0.5515, 0.3126, 0.5808, 0.3277]}, {"w": "cannot", "b": [0.5871, 0.3126, 0.6425, 0.3277]}, {"w": "tell", "b": [0.6488, 0.3126, 0.675, 0.3277]}, {"w": "which", "b": [0.6813, 0.3126, 0.7289, 0.3277]}, {"w": "data", "b": [0.7352, 0.3126, 0.7718, 0.3277]}, {"w": "imputation", "b": [0.7781, 0.3126, 0.8691, 0.3277]}, {"w": "technique", "b": [0.1312, 0.3306, 0.2097, 0.3457]}, {"w": "will", "b": [0.2161, 0.3306, 0.2454, 0.3457]}, {"w": "work", "b": [0.2517, 0.3306, 0.2915, 0.3457]}, {"w": "best.", "b": [0.2979, 0.3306, 0.3372, 0.3457]}, {"w": "Try", "b": [0.346, 0.3306, 0.3754, 0.3457]}, {"w": "several", "b": [0.3818, 0.3306, 0.4374, 0.3457]}, {"w": "techniques,", "b": [0.4438, 0.3306, 0.5349, 0.3457]}, {"w": "build", "b": [0.5413, 0.3306, 0.5832, 0.3457]}, {"w": "several", "b": [0.5895, 0.3306, 0.6452, 0.3457]}, {"w": "models,", "b": [0.6515, 0.3306, 0.7138, 0.3457]}, {"w": "and", "b": [0.7203, 0.3306, 0.7506, 0.3457]}, {"w": "select", "b": [0.757, 0.3306, 0.8021, 0.3457]}, {"w": "the", "b": [0.8084, 0.3306, 0.8346, 0.3457]}, {"w": "one", "b": [0.8409, 0.3306, 0.8692, 0.3457]}, {"w": "that", "b": [0.1312, 0.3486, 0.1651, 0.3636]}, {"w": "works", "b": [0.1712, 0.3486, 0.2175, 0.3636]}, {"w": "best", "b": [0.2237, 0.3486, 0.2571, 0.3636]}, {"w": "(using", "b": [0.2633, 0.3486, 0.3126, 0.3636]}, {"w": "the", "b": [0.3187, 0.3486, 0.3444, 0.3636]}, {"w": "validation", "b": [0.3505, 0.3486, 0.43, 0.3636]}, {"w": "set", "b": [0.4361, 0.3486, 0.4588, 0.3636]}, {"w": "to", "b": [0.465, 0.3486, 0.4814, 0.3636]}, {"w": "compare", "b": [0.4875, 0.3486, 0.5552, 0.3636]}, {"w": "models).", "b": [0.5614, 0.3486, 0.6297, 0.3636]}]}, {"id": "b_4", "type": "paragraph", "text": "3.7.2 Leakage During Imputation", "words": [{"w": "3.7.2", "b": [0.1312, 0.3965, 0.1749, 0.4114]}, {"w": "Leakage", "b": [0.1961, 0.3965, 0.2707, 0.4114]}, {"w": "During", "b": [0.2778, 0.3965, 0.3429, 0.4114]}, {"w": "Imputation", "b": [0.35, 0.3965, 0.4544, 0.4114]}]}, {"id": "b_5", "type": "paragraph", "text": "If you use the imputation techniques that compute some statistic of one attribute (such as average) or several attributes (by solving the regression problem), the leakage happens if you use the whole dataset to compute this statistic. Using all available examples, you contaminate the training data with information obtained from the validation and test examples.", "words": [{"w": "If", "b": [0.1312, 0.433, 0.1436, 0.448]}, {"w": "you", "b": [0.1498, 0.433, 0.1788, 0.448]}, {"w": "use", "b": [0.1849, 0.433, 0.2109, 0.448]}, {"w": "the", "b": [0.2171, 0.433, 0.243, 0.448]}, {"w": "imputation", "b": [0.2491, 0.433, 0.3391, 0.448]}, {"w": "techniques", "b": [0.3453, 0.433, 0.4303, 0.448]}, {"w": "that", "b": [0.4364, 0.433, 0.4706, 0.448]}, {"w": "compute", "b": [0.4767, 0.433, 0.546, 0.448]}, {"w": "some", "b": [0.5522, 0.433, 0.5927, 0.448]}, {"w": "statistic", "b": [0.5988, 0.433, 0.6632, 0.448]}, {"w": "of", "b": [0.6693, 0.433, 0.6843, 0.448]}, {"w": "one", "b": [0.6905, 0.433, 0.7184, 0.448]}, {"w": "attribute", "b": [0.7246, 0.433, 0.7971, 0.448]}, {"w": "(such", "b": [0.8032, 0.433, 0.8463, 0.448]}, {"w": "as", "b": [0.8525, 0.433, 0.8691, 0.448]}, {"w": "average)", "b": [0.1312, 0.4511, 0.1971, 0.4659]}, {"w": "or", "b": [0.2031, 0.4511, 0.2192, 0.4659]}, {"w": "several", "b": [0.2252, 0.4511, 0.2787, 0.4659]}, {"w": "attributes", "b": [0.2847, 0.4511, 0.3622, 0.4659]}, {"w": "(by", "b": [0.3682, 0.4511, 0.3943, 0.4659]}, {"w": "solving", "b": [0.4004, 0.4511, 0.4552, 0.4659]}, {"w": "the", "b": [0.4612, 0.4511, 0.4864, 0.4659]}, {"w": "regression", "b": [0.4924, 0.4511, 0.5701, 0.4659]}, {"w": "problem),", "b": [0.5761, 0.4511, 0.6525, 0.4659]}, {"w": "the", "b": [0.6586, 0.4511, 0.6837, 0.4659]}, {"w": "leakage", "b": [0.6897, 0.4511, 0.7475, 0.4659]}, {"w": "happens", "b": [0.7535, 0.4511, 0.8184, 0.4659]}, {"w": "if", "b": [0.8244, 0.4511, 0.835, 0.4659]}, {"w": "you", "b": [0.841, 0.4511, 0.8691, 0.4659]}, {"w": "use", "b": [0.1312, 0.4691, 0.1565, 0.4839]}, {"w": "the", "b": [0.1617, 0.4691, 0.1868, 0.4839]}, {"w": "whole", "b": [0.192, 0.4691, 0.2372, 0.4839]}, {"w": "dataset", "b": [0.2424, 0.4691, 0.2998, 0.4839]}, {"w": "to", "b": [0.305, 0.4691, 0.3211, 0.4839]}, {"w": "compute", "b": [0.3262, 0.4691, 0.3936, 0.4839]}, {"w": "this", "b": [0.3988, 0.4691, 0.428, 0.4839]}, {"w": "statistic.", "b": [0.4332, 0.4691, 0.5008, 0.4839]}, {"w": "Using", "b": [0.5086, 0.4691, 0.5535, 0.4839]}, {"w": "all", "b": [0.5587, 0.4691, 0.5778, 0.4839]}, {"w": "available", "b": [0.583, 0.4691, 0.6513, 0.4839]}, {"w": "examples,", "b": [0.6564, 0.4691, 0.7334, 0.4839]}, {"w": "you", "b": [0.7388, 0.4691, 0.7669, 0.4839]}, {"w": "contaminate", "b": [0.7721, 0.4691, 0.8691, 0.4839]}, {"w": "the", "b": [0.1312, 0.4869, 0.1569, 0.5018]}, {"w": "training", "b": [0.163, 0.4869, 0.2267, 0.5018]}, {"w": "data", "b": [0.2328, 0.4869, 0.2687, 0.5018]}, {"w": "with", "b": [0.2748, 0.4869, 0.3107, 0.5018]}, {"w": "information", "b": [0.3169, 0.4869, 0.4107, 0.5018]}, {"w": "obtained", "b": [0.4169, 0.4869, 0.4866, 0.5018]}, {"w": "from", "b": [0.4928, 0.4869, 0.5302, 0.5018]}, {"w": "the", "b": [0.5364, 0.4869, 0.562, 0.5018]}, {"w": "validation", "b": [0.5682, 0.4869, 0.6476, 0.5018]}, {"w": "and", "b": [0.6538, 0.4869, 0.6835, 0.5018]}, {"w": "test", "b": [0.6897, 0.4869, 0.7195, 0.5018]}, {"w": "examples.", "b": [0.7257, 0.4869, 0.8042, 0.5018]}]}, {"id": "b_6", "type": "paragraph", "text": "This type of leakage is not as significant as other types discussed earlier. However, you still have to be aware of it and avoid it by partitioning first, and then computing the imputation statistic only on the training set.", "words": [{"w": "This", "b": [0.1306, 0.5138, 0.1665, 0.5288]}, {"w": "type", "b": [0.1727, 0.5138, 0.208, 0.5288]}, {"w": "of", "b": [0.2141, 0.5138, 0.229, 0.5288]}, {"w": "leakage", "b": [0.2351, 0.5138, 0.294, 0.5288]}, {"w": "is", "b": [0.3001, 0.5138, 0.3125, 0.5288]}, {"w": "not", "b": [0.3187, 0.5138, 0.3453, 0.5288]}, {"w": "as", "b": [0.3515, 0.5138, 0.368, 0.5288]}, {"w": "significant", "b": [0.3741, 0.5138, 0.4556, 0.5288]}, {"w": "as", "b": [0.4618, 0.5138, 0.4782, 0.5288]}, {"w": "other", "b": [0.4844, 0.5138, 0.5264, 0.5288]}, {"w": "types", "b": [0.5326, 0.5138, 0.5752, 0.5288]}, {"w": "discussed", "b": [0.5813, 0.5138, 0.6554, 0.5288]}, {"w": "earlier.", "b": [0.6615, 0.5138, 0.7169, 0.5288]}, {"w": "However,", "b": [0.7252, 0.5138, 0.7984, 0.5288]}, {"w": "you", "b": [0.8046, 0.5138, 0.8332, 0.5288]}, {"w": "still", "b": [0.8394, 0.5138, 0.8692, 0.5288]}, {"w": "have", "b": [0.1312, 0.5318, 0.1672, 0.5467]}, {"w": "to", "b": [0.1733, 0.5318, 0.1895, 0.5467]}, {"w": "be", "b": [0.1957, 0.5318, 0.2144, 0.5467]}, {"w": "aware", "b": [0.2206, 0.5318, 0.2662, 0.5467]}, {"w": "of", "b": [0.2724, 0.5318, 0.287, 0.5467]}, {"w": "it", "b": [0.2932, 0.5318, 0.3053, 0.5467]}, {"w": "and", "b": [0.3115, 0.5318, 0.3409, 0.5467]}, {"w": "avoid", "b": [0.347, 0.5318, 0.389, 0.5467]}, {"w": "it", "b": [0.3952, 0.5318, 0.4073, 0.5467]}, {"w": "by", "b": [0.4135, 0.5318, 0.4327, 0.5467]}, {"w": "partitioning", "b": [0.4389, 0.5318, 0.5332, 0.5467]}, {"w": "first,", "b": [0.5393, 0.5318, 0.5759, 0.5467]}, {"w": "and", "b": [0.5821, 0.5318, 0.6115, 0.5467]}, {"w": "then", "b": [0.6176, 0.5318, 0.6531, 0.5467]}, {"w": "computing", "b": [0.6592, 0.5318, 0.7433, 0.5467]}, {"w": "the", "b": [0.7494, 0.5318, 0.7748, 0.5467]}, {"w": "imputation", "b": [0.7809, 0.5318, 0.8691, 0.5467]}, {"w": "statistic", "b": [0.1312, 0.5497, 0.195, 0.5647]}, {"w": "only", "b": [0.2012, 0.5497, 0.2355, 0.5647]}, {"w": "on", "b": [0.2417, 0.5497, 0.2612, 0.5647]}, {"w": "the", "b": [0.2673, 0.5497, 0.293, 0.5647]}, {"w": "training", "b": [0.2991, 0.5497, 0.3627, 0.5647]}, {"w": "set.", "b": [0.3689, 0.5497, 0.3967, 0.5647]}]}, {"id": "b_7", "type": "paragraph", "text": "3.8 Data Augmentation", "words": [{"w": "3.8", "b": [0.1312, 0.5982, 0.1631, 0.6162]}, {"w": "Data", "b": [0.188, 0.5982, 0.241, 0.6162]}, {"w": "Augmentation", "b": [0.2493, 0.5982, 0.4037, 0.6162]}]}, {"id": "b_8", "type": "paragraph", "text": "For some types of data, it’s quite easy to get more labeled examples without additional labeling. The strategy is called data augmentation, and it’s most effective when applied to images. It consists of applying simple operations, such as crop or flip, to the original images to obtain new images.", "words": [{"w": "For", "b": [0.1312, 0.637, 0.1588, 0.6521]}, {"w": "some", "b": [0.1663, 0.637, 0.2071, 0.6521]}, {"w": "types", "b": [0.2146, 0.637, 0.2582, 0.6521]}, {"w": "of", "b": [0.2657, 0.637, 0.2808, 0.6521]}, {"w": "data,", "b": [0.2883, 0.637, 0.3301, 0.6521]}, {"w": "it’s", "b": [0.338, 0.637, 0.3632, 0.6521]}, {"w": "quite", "b": [0.3707, 0.637, 0.412, 0.6521]}, {"w": "easy", "b": [0.4195, 0.637, 0.4546, 0.6521]}, {"w": "to", "b": [0.4621, 0.637, 0.4788, 0.6521]}, {"w": "get", "b": [0.4863, 0.637, 0.5114, 0.6521]}, {"w": "more", "b": [0.5189, 0.637, 0.5597, 0.6521]}, {"w": "labeled", "b": [0.5672, 0.637, 0.6253, 0.6521]}, {"w": "examples", "b": [0.6328, 0.637, 0.7077, 0.6521]}, {"w": "without", "b": [0.7152, 0.637, 0.779, 0.6521]}, {"w": "additional", "b": [0.7864, 0.637, 0.8691, 0.6521]}, {"w": "labeling.", "b": [0.1312, 0.6552, 0.1981, 0.67]}, {"w": "The", "b": [0.2061, 0.6552, 0.2373, 0.67]}, {"w": "strategy", "b": [0.2429, 0.6552, 0.3068, 0.67]}, {"w": "is", "b": [0.3124, 0.6552, 0.3246, 0.67]}, {"w": "called", "b": [0.3302, 0.6552, 0.3754, 0.67]}, {"w": "data", "b": [0.3809, 0.6551, 0.4216, 0.67]}, {"w": "augmentation,", "b": [0.428, 0.6551, 0.5595, 0.67]}, {"w": "and", "b": [0.5652, 0.6552, 0.5944, 0.67]}, {"w": "it’s", "b": [0.6, 0.6552, 0.6242, 0.67]}, {"w": "most", "b": [0.6298, 0.6552, 0.6681, 0.67]}, {"w": "effective", "b": [0.6737, 0.6552, 0.7375, 0.67]}, {"w": "when", "b": [0.7431, 0.6552, 0.7843, 0.67]}, {"w": "applied", "b": [0.7899, 0.6552, 0.8472, 0.67]}, {"w": "to", "b": [0.8528, 0.6552, 0.8689, 0.67]}, {"w": "images.", "b": [0.1312, 0.6731, 0.1902, 0.688]}, {"w": "It", "b": [0.1983, 0.6731, 0.212, 0.688]}, {"w": "consists", "b": [0.2182, 0.6731, 0.2794, 0.688]}, {"w": "of", "b": [0.2855, 0.6731, 0.3002, 0.688]}, {"w": "applying", "b": [0.3063, 0.6731, 0.3748, 0.688]}, {"w": "simple", "b": [0.381, 0.6731, 0.4318, 0.688]}, {"w": "operations,", "b": [0.4379, 0.6731, 0.5258, 0.688]}, {"w": "such", "b": [0.5319, 0.6731, 0.567, 0.688]}, {"w": "as", "b": [0.5732, 0.6731, 0.5895, 0.688]}, {"w": "crop", "b": [0.5957, 0.6731, 0.6302, 0.688]}, {"w": "or", "b": [0.6364, 0.6731, 0.6526, 0.688]}, {"w": "flip,", "b": [0.6588, 0.6731, 0.6892, 0.688]}, {"w": "to", "b": [0.6954, 0.6731, 0.7116, 0.688]}, {"w": "the", "b": [0.7177, 0.6731, 0.7431, 0.688]}, {"w": "original", "b": [0.7492, 0.6731, 0.8091, 0.688]}, {"w": "images", "b": [0.8153, 0.6731, 0.8691, 0.688]}, {"w": "to", "b": [0.1312, 0.691, 0.1476, 0.7059]}, {"w": "obtain", "b": [0.1538, 0.691, 0.205, 0.7059]}, {"w": "new", "b": [0.2112, 0.691, 0.243, 0.7059]}, {"w": "images.", "b": [0.2491, 0.691, 0.3087, 0.7059]}]}, {"id": "b_9", "type": "paragraph", "text": "3.8.1 Data Augmentation for Images", "words": [{"w": "3.8.1", "b": [0.1312, 0.7388, 0.1749, 0.7538]}, {"w": "Data", "b": [0.1961, 0.7388, 0.2412, 0.7538]}, {"w": "Augmentation", "b": [0.2483, 0.7388, 0.3798, 0.7538]}, {"w": "for", "b": [0.3869, 0.7388, 0.4128, 0.7538]}, {"w": "Images", "b": [0.4198, 0.7388, 0.4846, 0.7538]}]}, {"id": "b_10", "type": "paragraph", "text": "In Figure 14, you can see examples of operations that can be easily applied to a given image to obtain one or more new images: flip, rotation, crop, color shift, noise addition, perspective change, contrast change, and information loss.", "words": [{"w": "In", "b": [0.1312, 0.7755, 0.1479, 0.7903]}, {"w": "Figure", "b": [0.154, 0.7755, 0.2053, 0.7903]}, {"w": "14,", "b": [0.2115, 0.7755, 0.2347, 0.7903]}, {"w": "you", "b": [0.2408, 0.7755, 0.2691, 0.7903]}, {"w": "can", "b": [0.2753, 0.7755, 0.3025, 0.7903]}, {"w": "see", "b": [0.3087, 0.7755, 0.332, 0.7903]}, {"w": "examples", "b": [0.3381, 0.7755, 0.4105, 0.7903]}, {"w": "of", "b": [0.4166, 0.7755, 0.4312, 0.7903]}, {"w": "operations", "b": [0.4374, 0.7755, 0.5199, 0.7903]}, {"w": "that", "b": [0.526, 0.7755, 0.5593, 0.7903]}, {"w": "can", "b": [0.5654, 0.7755, 0.5927, 0.7903]}, {"w": "be", "b": [0.5989, 0.7755, 0.6176, 0.7903]}, {"w": "easily", "b": [0.6237, 0.7755, 0.6677, 0.7903]}, {"w": "applied", "b": [0.6739, 0.7755, 0.7315, 0.7903]}, {"w": "to", "b": [0.7376, 0.7755, 0.7538, 0.7903]}, {"w": "a", "b": [0.7599, 0.7755, 0.769, 0.7903]}, {"w": "given", "b": [0.7751, 0.7755, 0.8165, 0.7903]}, {"w": "image", "b": [0.8226, 0.7755, 0.8691, 0.7903]}, {"w": "to", "b": [0.1312, 0.7935, 0.1473, 0.8083]}, {"w": "obtain", "b": [0.1532, 0.7935, 0.2035, 0.8083]}, {"w": "one", "b": [0.2094, 0.7935, 0.2366, 0.8083]}, {"w": "or", "b": [0.2425, 0.7935, 0.2586, 0.8083]}, {"w": "more", "b": [0.2645, 0.7935, 0.3038, 0.8083]}, {"w": "new", "b": [0.3097, 0.7935, 0.3409, 0.8083]}, {"w": "images:", "b": [0.3468, 0.7935, 0.4052, 0.8083]}, {"w": "flip,", "b": [0.4133, 0.7935, 0.4434, 0.8083]}, {"w": "rotation,", "b": [0.4494, 0.7935, 0.5178, 0.8083]}, {"w": "crop,", "b": [0.5237, 0.7935, 0.563, 0.8083]}, {"w": "color", "b": [0.569, 0.7935, 0.6072, 0.8083]}, {"w": "shift,", "b": [0.6131, 0.7935, 0.6529, 0.8083]}, {"w": "noise", "b": [0.6589, 0.7935, 0.6982, 0.8083]}, {"w": "addition,", "b": [0.7042, 0.7935, 0.7745, 0.8083]}, {"w": "perspective", "b": [0.7805, 0.7935, 0.8691, 0.8083]}, {"w": "change,", "b": [0.1312, 0.8113, 0.1912, 0.8262]}, {"w": "contrast", "b": [0.1974, 0.8113, 0.2626, 0.8262]}, {"w": "change,", "b": [0.2688, 0.8113, 0.3288, 0.8262]}, {"w": "and", "b": [0.335, 0.8113, 0.3647, 0.8262]}, {"w": "information", "b": [0.3708, 0.8113, 0.4647, 0.8262]}, {"w": "loss.", "b": [0.4708, 0.8113, 0.5049, 0.8262]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 30", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "30", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 74, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 14: Examples of data augmentation techniques. Photo credit: Alfonso Escalante.", "words": [{"w": "Figure", "b": [0.1433, 0.5552, 0.1954, 0.5702]}, {"w": "14:", "b": [0.2016, 0.5552, 0.2251, 0.5702]}, {"w": "Examples", "b": [0.2333, 0.5552, 0.3111, 0.5702]}, {"w": "of", "b": [0.3173, 0.5552, 0.3321, 0.5702]}, {"w": "data", "b": [0.3383, 0.5552, 0.3742, 0.5702]}, {"w": "augmentation", "b": [0.3803, 0.5552, 0.4905, 0.5702]}, {"w": "techniques.", "b": [0.4967, 0.5552, 0.586, 0.5702]}, {"w": "Photo", "b": [0.5942, 0.5552, 0.6427, 0.5702]}, {"w": "credit:", "b": [0.6488, 0.5552, 0.7002, 0.5702]}, {"w": "Alfonso", "b": [0.7084, 0.5552, 0.769, 0.5702]}, {"w": "Escalante.", "b": [0.7751, 0.5552, 0.857, 0.5702]}]}, {"id": "b_1", "type": "paragraph", "text": "Flipping, of course, has to be done only with respect to the axis for which the meaning of the image is preserved. If it’s a football, you can flip with respect to both axes,8 but if it’s a car or a pedestrian, then you should only flip with respect to the vertical axis.", "words": [{"w": "Flipping,", "b": [0.1312, 0.6054, 0.2052, 0.6205]}, {"w": "of", "b": [0.2114, 0.6054, 0.2266, 0.6205]}, {"w": "course,", "b": [0.2327, 0.6054, 0.2894, 0.6205]}, {"w": "has", "b": [0.2956, 0.6054, 0.3229, 0.6205]}, {"w": "to", "b": [0.329, 0.6054, 0.3457, 0.6205]}, {"w": "be", "b": [0.3519, 0.6054, 0.3713, 0.6205]}, {"w": "done", "b": [0.3774, 0.6054, 0.4161, 0.6205]}, {"w": "only", "b": [0.4223, 0.6054, 0.4573, 0.6205]}, {"w": "with", "b": [0.4635, 0.6054, 0.5001, 0.6205]}, {"w": "respect", "b": [0.5062, 0.6054, 0.5645, 0.6205]}, {"w": "to", "b": [0.5706, 0.6054, 0.5874, 0.6205]}, {"w": "the", "b": [0.5935, 0.6054, 0.6197, 0.6205]}, {"w": "axis", "b": [0.6258, 0.6054, 0.6578, 0.6205]}, {"w": "for", "b": [0.664, 0.6054, 0.6865, 0.6205]}, {"w": "which", "b": [0.6927, 0.6054, 0.7403, 0.6205]}, {"w": "the", "b": [0.7465, 0.6054, 0.7726, 0.6205]}, {"w": "meaning", "b": [0.7788, 0.6054, 0.8478, 0.6205]}, {"w": "of", "b": [0.8539, 0.6054, 0.8691, 0.6205]}, {"w": "the", "b": [0.1312, 0.6235, 0.1565, 0.6383]}, {"w": "image", "b": [0.1626, 0.6235, 0.2091, 0.6383]}, {"w": "is", "b": [0.2152, 0.6235, 0.2274, 0.6383]}, {"w": "preserved.", "b": [0.2336, 0.6235, 0.3136, 0.6383]}, {"w": "If", "b": [0.3218, 0.6235, 0.3339, 0.6383]}, {"w": "it’s", "b": [0.3401, 0.6235, 0.3644, 0.6383]}, {"w": "a", "b": [0.3705, 0.6235, 0.3796, 0.6383]}, {"w": "football,", "b": [0.3858, 0.6235, 0.4514, 0.6383]}, {"w": "you", "b": [0.4576, 0.6235, 0.4859, 0.6383]}, {"w": "can", "b": [0.492, 0.6235, 0.5193, 0.6383]}, {"w": "flip", "b": [0.5254, 0.6235, 0.5507, 0.6383]}, {"w": "with", "b": [0.5568, 0.6235, 0.5921, 0.6383]}, {"w": "respect", "b": [0.5983, 0.6235, 0.6545, 0.6383]}, {"w": "to", "b": [0.6607, 0.6235, 0.6768, 0.6383]}, {"w": "both", "b": [0.683, 0.6235, 0.7198, 0.6383]}, {"w": "axes,8", "b": [0.726, 0.6215, 0.772, 0.6383]}, {"w": "but", "b": [0.7791, 0.6235, 0.8063, 0.6383]}, {"w": "if", "b": [0.8125, 0.6235, 0.8231, 0.6383]}, {"w": "it’s", "b": [0.8292, 0.6235, 0.8536, 0.6383]}, {"w": "a", "b": [0.8597, 0.6235, 0.8688, 0.6383]}, {"w": "car", "b": [0.1312, 0.6414, 0.1559, 0.6563]}, {"w": "or", "b": [0.162, 0.6414, 0.1785, 0.6563]}, {"w": "a", "b": [0.1847, 0.6414, 0.1939, 0.6563]}, {"w": "pedestrian,", "b": [0.2, 0.6414, 0.2889, 0.6563]}, {"w": "then", "b": [0.2951, 0.6414, 0.331, 0.6563]}, {"w": "you", "b": [0.3371, 0.6414, 0.3658, 0.6563]}, {"w": "should", "b": [0.372, 0.6414, 0.4244, 0.6563]}, {"w": "only", "b": [0.4305, 0.6414, 0.4649, 0.6563]}, {"w": "flip", "b": [0.471, 0.6414, 0.4967, 0.6563]}, {"w": "with", "b": [0.5028, 0.6414, 0.5387, 0.6563]}, {"w": "respect", "b": [0.5448, 0.6414, 0.6019, 0.6563]}, {"w": "to", "b": [0.6081, 0.6414, 0.6245, 0.6563]}, {"w": "the", "b": [0.6306, 0.6414, 0.6563, 0.6563]}, {"w": "vertical", "b": [0.6624, 0.6414, 0.722, 0.6563]}, {"w": "axis.", "b": [0.7281, 0.6414, 0.7646, 0.6563]}]}, {"id": "b_2", "type": "paragraph", "text": "Rotation should be applied with slight angles to simulate an incorrect horizon calibration. You can rotate an image in both directions.", "words": [{"w": "Rotation", "b": [0.1312, 0.6682, 0.2036, 0.6833]}, {"w": "should", "b": [0.2098, 0.6682, 0.2632, 0.6833]}, {"w": "be", "b": [0.2694, 0.6682, 0.2887, 0.6833]}, {"w": "applied", "b": [0.2949, 0.6682, 0.3545, 0.6833]}, {"w": "with", "b": [0.3607, 0.6682, 0.3973, 0.6833]}, {"w": "slight", "b": [0.4034, 0.6682, 0.448, 0.6833]}, {"w": "angles", "b": [0.4541, 0.6682, 0.5044, 0.6833]}, {"w": "to", "b": [0.5106, 0.6682, 0.5273, 0.6833]}, {"w": "simulate", "b": [0.5335, 0.6682, 0.6021, 0.6833]}, {"w": "an", "b": [0.6082, 0.6682, 0.6281, 0.6833]}, {"w": "incorrect", "b": [0.6342, 0.6682, 0.7065, 0.6833]}, {"w": "horizon", "b": [0.7127, 0.6682, 0.7734, 0.6833]}, {"w": "calibration.", "b": [0.7795, 0.6682, 0.8727, 0.6833]}, {"w": "You", "b": [0.1305, 0.6862, 0.1623, 0.7012]}, {"w": "can", "b": [0.1685, 0.6862, 0.1962, 0.7012]}, {"w": "rotate", "b": [0.2023, 0.6862, 0.2505, 0.7012]}, {"w": "an", "b": [0.2567, 0.6862, 0.2762, 0.7012]}, {"w": "image", "b": [0.2823, 0.6862, 0.3295, 0.7012]}, {"w": "in", "b": [0.3356, 0.6862, 0.351, 0.7012]}, {"w": "both", "b": [0.3572, 0.6862, 0.3946, 0.7012]}, {"w": "directions.", "b": [0.4007, 0.6862, 0.484, 0.7012]}]}, {"id": "b_3", "type": "paragraph", "text": "Crops can be randomly applied multiple times to the same image by keeping a significant part of the object(s) of interest in the cropped images.", "words": [{"w": "Crops", "b": [0.1312, 0.713, 0.1795, 0.7281]}, {"w": "can", "b": [0.1857, 0.713, 0.214, 0.7281]}, {"w": "be", "b": [0.2202, 0.713, 0.2396, 0.7281]}, {"w": "randomly", "b": [0.2458, 0.713, 0.3237, 0.7281]}, {"w": "applied", "b": [0.33, 0.713, 0.3896, 0.7281]}, {"w": "multiple", "b": [0.3958, 0.713, 0.4633, 0.7281]}, {"w": "times", "b": [0.4695, 0.713, 0.5136, 0.7281]}, {"w": "to", "b": [0.5198, 0.713, 0.5365, 0.7281]}, {"w": "the", "b": [0.5428, 0.713, 0.5689, 0.7281]}, {"w": "same", "b": [0.5751, 0.713, 0.616, 0.7281]}, {"w": "image", "b": [0.6223, 0.713, 0.6704, 0.7281]}, {"w": "by", "b": [0.6766, 0.713, 0.6965, 0.7281]}, {"w": "keeping", "b": [0.7027, 0.713, 0.7644, 0.7281]}, {"w": "a", "b": [0.7707, 0.713, 0.7801, 0.7281]}, {"w": "significant", "b": [0.7863, 0.713, 0.8696, 0.7281]}, {"w": "part", "b": [0.1312, 0.7311, 0.1651, 0.7461]}, {"w": "of", "b": [0.1713, 0.7311, 0.1861, 0.7461]}, {"w": "the", "b": [0.1923, 0.7311, 0.2179, 0.7461]}, {"w": "object(s)", "b": [0.2241, 0.7311, 0.295, 0.7461]}, {"w": "of", "b": [0.3011, 0.7311, 0.316, 0.7461]}, {"w": "interest", "b": [0.3221, 0.7311, 0.3823, 0.7461]}, {"w": "in", "b": [0.3884, 0.7311, 0.4038, 0.7461]}, {"w": "the", "b": [0.41, 0.7311, 0.4356, 0.7461]}, {"w": "cropped", "b": [0.4418, 0.7311, 0.5059, 0.7461]}, {"w": "images.", "b": [0.5121, 0.7311, 0.5717, 0.7461]}]}, {"id": "b_4", "type": "paragraph", "text": "In color shift, nuances of red-green-blue (RGB) are slightly changed to simulate different lighting conditions. Contrast change (both decreasing and increasing) and Gaussian noise of different intensity can also be applied multiple times to the same image.", "words": [{"w": "In", "b": [0.1312, 0.7579, 0.1485, 0.773]}, {"w": "color", "b": [0.1553, 0.7579, 0.1951, 0.773]}, {"w": "shift,", "b": [0.202, 0.7579, 0.2434, 0.773]}, {"w": "nuances", "b": [0.2504, 0.7579, 0.3149, 0.773]}, {"w": "of", "b": [0.3217, 0.7579, 0.3369, 0.773]}, {"w": "red-green-blue", "b": [0.3437, 0.7579, 0.461, 0.773]}, {"w": "(RGB)", "b": [0.4678, 0.7579, 0.5239, 0.773]}, {"w": "are", "b": [0.5307, 0.7579, 0.5559, 0.773]}, {"w": "slightly", "b": [0.5627, 0.7579, 0.6224, 0.773]}, {"w": "changed", "b": [0.6293, 0.7579, 0.6957, 0.773]}, {"w": "to", "b": [0.7025, 0.7579, 0.7193, 0.773]}, {"w": "simulate", "b": [0.7261, 0.7579, 0.7947, 0.773]}, {"w": "different", "b": [0.8016, 0.7579, 0.8696, 0.773]}, {"w": "lighting", "b": [0.1312, 0.776, 0.1917, 0.7909]}, {"w": "conditions.", "b": [0.1979, 0.776, 0.2844, 0.7909]}, {"w": "Contrast", "b": [0.2926, 0.776, 0.3624, 0.7909]}, {"w": "change", "b": [0.3685, 0.776, 0.4229, 0.7909]}, {"w": "(both", "b": [0.429, 0.776, 0.4733, 0.7909]}, {"w": "decreasing", "b": [0.4794, 0.776, 0.5619, 0.7909]}, {"w": "and", "b": [0.5681, 0.776, 0.5976, 0.7909]}, {"w": "increasing)", "b": [0.6037, 0.776, 0.6903, 0.7909]}, {"w": "and", "b": [0.6964, 0.776, 0.7259, 0.7909]}, {"w": "Gaussian", "b": [0.7318, 0.776, 0.8153, 0.7909]}, {"w": "noise", "b": [0.8224, 0.776, 0.8688, 0.7909]}, {"w": "of", "b": [0.1312, 0.7939, 0.1461, 0.8089]}, {"w": "different", "b": [0.1522, 0.7939, 0.219, 0.8089]}, {"w": "intensity", "b": [0.2251, 0.7939, 0.2945, 0.8089]}, {"w": "can", "b": [0.3006, 0.7939, 0.3283, 0.8089]}, {"w": "also", "b": [0.3344, 0.7939, 0.3653, 0.8089]}, {"w": "be", "b": [0.3715, 0.7939, 0.3904, 0.8089]}, {"w": "applied", "b": [0.3966, 0.7939, 0.455, 0.8089]}, {"w": "multiple", "b": [0.4612, 0.7939, 0.5273, 0.8089]}, {"w": "times", "b": [0.5335, 0.7939, 0.5767, 0.8089]}, {"w": "to", "b": [0.5828, 0.7939, 0.5992, 0.8089]}, {"w": "the", "b": [0.6054, 0.7939, 0.631, 0.8089]}, {"w": "same", "b": [0.6371, 0.7939, 0.6772, 0.8089]}, {"w": "image.", "b": [0.6834, 0.7939, 0.7357, 0.8089]}]}, {"id": "b_5", "type": "paragraph", "text": "By randomly removing parts of an image, we can simulate situations when an object is", "words": [{"w": "By", "b": [0.1312, 0.8207, 0.1545, 0.8358]}, {"w": "randomly", "b": [0.1621, 0.8207, 0.2401, 0.8358]}, {"w": "removing", "b": [0.2477, 0.8207, 0.3231, 0.8358]}, {"w": "parts", "b": [0.3307, 0.8207, 0.3727, 0.8358]}, {"w": "of", "b": [0.3803, 0.8207, 0.3955, 0.8358]}, {"w": "an", "b": [0.4031, 0.8207, 0.423, 0.8358]}, {"w": "image,", "b": [0.4306, 0.8207, 0.484, 0.8358]}, {"w": "we", "b": [0.492, 0.8207, 0.5134, 0.8358]}, {"w": "can", "b": [0.5211, 0.8207, 0.5493, 0.8358]}, {"w": "simulate", "b": [0.5569, 0.8207, 0.6256, 0.8358]}, {"w": "situations", "b": [0.6332, 0.8207, 0.7129, 0.8358]}, {"w": "when", "b": [0.7205, 0.8207, 0.7634, 0.8358]}, {"w": "an", "b": [0.771, 0.8207, 0.7909, 0.8358]}, {"w": "object", "b": [0.7985, 0.8207, 0.8487, 0.8358]}, {"w": "is", "b": [0.8564, 0.8207, 0.869, 0.8358]}]}, {"id": "b_6", "type": "paragraph", "text": "8Unless the context, like grass, makes flipping according to the horizontal axis irrelevant.", "words": [{"w": "8Unless", "b": [0.1518, 0.8476, 0.2036, 0.8614]}, {"w": "the", "b": [0.2088, 0.8495, 0.2306, 0.8614]}, {"w": "context,", "b": [0.2358, 0.8495, 0.2907, 0.8614]}, {"w": "like", "b": [0.2959, 0.8495, 0.3195, 0.8614]}, {"w": "grass,", "b": [0.3247, 0.8495, 0.3632, 0.8614]}, {"w": "makes", "b": [0.3684, 0.8495, 0.4103, 0.8614]}, {"w": "flipping", "b": [0.4155, 0.8495, 0.4669, 0.8614]}, {"w": "according", "b": [0.4721, 0.8495, 0.5375, 0.8614]}, {"w": "to", "b": [0.5427, 0.8495, 0.5566, 0.8614]}, {"w": "the", "b": [0.5618, 0.8495, 0.5836, 0.8614]}, {"w": "horizontal", "b": [0.5889, 0.8495, 0.6572, 0.8614]}, {"w": "axis", "b": [0.6624, 0.8495, 0.6891, 0.8614]}, {"w": "irrelevant.", "b": [0.6943, 0.8495, 0.7632, 0.8614]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 31", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "31", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 75, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "recognizable but not entirely visible because of an obstacle.", "words": [{"w": "recognizable", "b": [0.1312, 0.0884, 0.2298, 0.1033]}, {"w": "but", "b": [0.2359, 0.0884, 0.2636, 0.1033]}, {"w": "not", "b": [0.2697, 0.0884, 0.2964, 0.1033]}, {"w": "entirely", "b": [0.3026, 0.0884, 0.3631, 0.1033]}, {"w": "visible", "b": [0.3693, 0.0884, 0.4201, 0.1033]}, {"w": "because", "b": [0.4263, 0.0884, 0.4885, 0.1033]}, {"w": "of", "b": [0.4946, 0.0884, 0.5095, 0.1033]}, {"w": "an", "b": [0.5156, 0.0884, 0.5351, 0.1033]}, {"w": "obstacle.", "b": [0.5412, 0.0884, 0.6111, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "Another popular technique of data augmentation that seems counterintuitive, but works very well in practice, is mixup. As the name suggests, the technique consists of training the model on a mix of the images from the training set. More precisely, instead of training the model on the raw images, we take two images (that could be of the same class or not) and use for training their linear combination:", "words": [{"w": "Another", "b": [0.1305, 0.1154, 0.1954, 0.1302]}, {"w": "popular", "b": [0.2014, 0.1154, 0.2622, 0.1302]}, {"w": "technique", "b": [0.2683, 0.1154, 0.3436, 0.1302]}, {"w": "of", "b": [0.3496, 0.1154, 0.3642, 0.1302]}, {"w": "data", "b": [0.3702, 0.1154, 0.4054, 0.1302]}, {"w": "augmentation", "b": [0.4113, 0.1154, 0.5193, 0.1302]}, {"w": "that", "b": [0.5253, 0.1154, 0.5585, 0.1302]}, {"w": "seems", "b": [0.5645, 0.1154, 0.6099, 0.1302]}, {"w": "counterintuitive,", "b": [0.6159, 0.1154, 0.7456, 0.1302]}, {"w": "but", "b": [0.7516, 0.1154, 0.7787, 0.1302]}, {"w": "works", "b": [0.7847, 0.1154, 0.8301, 0.1302]}, {"w": "very", "b": [0.8361, 0.1154, 0.8698, 0.1302]}, {"w": "well", "b": [0.1306, 0.1331, 0.1625, 0.1482]}, {"w": "in", "b": [0.1697, 0.1331, 0.1854, 0.1482]}, {"w": "practice,", "b": [0.1927, 0.1331, 0.2628, 0.1482]}, {"w": "is", "b": [0.2704, 0.1331, 0.2831, 0.1482]}, {"w": "mixup.", "b": [0.2902, 0.1331, 0.3538, 0.1482]}, {"w": "As", "b": [0.3653, 0.1331, 0.3869, 0.1482]}, {"w": "the", "b": [0.3941, 0.1331, 0.4203, 0.1482]}, {"w": "name", "b": [0.4276, 0.1331, 0.4715, 0.1482]}, {"w": "suggests,", "b": [0.4787, 0.1331, 0.5512, 0.1482]}, {"w": "the", "b": [0.5588, 0.1331, 0.5849, 0.1482]}, {"w": "technique", "b": [0.5922, 0.1331, 0.6707, 0.1482]}, {"w": "consists", "b": [0.6779, 0.1331, 0.741, 0.1482]}, {"w": "of", "b": [0.7483, 0.1331, 0.7635, 0.1482]}, {"w": "training", "b": [0.7707, 0.1331, 0.8356, 0.1482]}, {"w": "the", "b": [0.8429, 0.1331, 0.869, 0.1482]}, {"w": "model", "b": [0.1312, 0.1512, 0.1802, 0.1662]}, {"w": "on", "b": [0.1864, 0.1512, 0.206, 0.1662]}, {"w": "a", "b": [0.2121, 0.1512, 0.2214, 0.1662]}, {"w": "mix", "b": [0.2276, 0.1512, 0.258, 0.1662]}, {"w": "of", "b": [0.2642, 0.1512, 0.2791, 0.1662]}, {"w": "the", "b": [0.2853, 0.1512, 0.3111, 0.1662]}, {"w": "images", "b": [0.3172, 0.1512, 0.372, 0.1662]}, {"w": "from", "b": [0.3782, 0.1512, 0.4159, 0.1662]}, {"w": "the", "b": [0.422, 0.1512, 0.4478, 0.1662]}, {"w": "training", "b": [0.454, 0.1512, 0.518, 0.1662]}, {"w": "set.", "b": [0.5242, 0.1512, 0.5521, 0.1662]}, {"w": "More", "b": [0.5604, 0.1512, 0.6022, 0.1662]}, {"w": "precisely,", "b": [0.6084, 0.1512, 0.6818, 0.1662]}, {"w": "instead", "b": [0.688, 0.1512, 0.7458, 0.1662]}, {"w": "of", "b": [0.752, 0.1512, 0.767, 0.1662]}, {"w": "training", "b": [0.7731, 0.1512, 0.8371, 0.1662]}, {"w": "the", "b": [0.8433, 0.1512, 0.8691, 0.1662]}, {"w": "model", "b": [0.1312, 0.1691, 0.1804, 0.1841]}, {"w": "on", "b": [0.1865, 0.1691, 0.2062, 0.1841]}, {"w": "the", "b": [0.2123, 0.1691, 0.2382, 0.1841]}, {"w": "raw", "b": [0.2443, 0.1691, 0.2739, 0.1841]}, {"w": "images,", "b": [0.28, 0.1691, 0.3401, 0.1841]}, {"w": "we", "b": [0.3463, 0.1691, 0.3675, 0.1841]}, {"w": "take", "b": [0.3736, 0.1691, 0.4078, 0.1841]}, {"w": "two", "b": [0.4139, 0.1691, 0.4429, 0.1841]}, {"w": "images", "b": [0.4491, 0.1691, 0.504, 0.1841]}, {"w": "(that", "b": [0.5101, 0.1691, 0.5515, 0.1841]}, {"w": "could", "b": [0.5577, 0.1691, 0.6011, 0.1841]}, {"w": "be", "b": [0.6073, 0.1691, 0.6264, 0.1841]}, {"w": "of", "b": [0.6326, 0.1691, 0.6476, 0.1841]}, {"w": "the", "b": [0.6537, 0.1691, 0.6796, 0.1841]}, {"w": "same", "b": [0.6858, 0.1691, 0.7262, 0.1841]}, {"w": "class", "b": [0.7324, 0.1691, 0.7698, 0.1841]}, {"w": "or", "b": [0.776, 0.1691, 0.7926, 0.1841]}, {"w": "not)", "b": [0.7987, 0.1691, 0.8329, 0.1841]}, {"w": "and", "b": [0.839, 0.1691, 0.869, 0.1841]}, {"w": "use", "b": [0.1312, 0.1871, 0.157, 0.2021]}, {"w": "for", "b": [0.1631, 0.1871, 0.1852, 0.2021]}, {"w": "training", "b": [0.1914, 0.1871, 0.255, 0.2021]}, {"w": "their", "b": [0.2612, 0.1871, 0.2992, 0.2021]}, {"w": "linear", "b": [0.3053, 0.1871, 0.3505, 0.2021]}, {"w": "combination:", "b": [0.3566, 0.1871, 0.4607, 0.2021]}]}, {"id": "b_2", "type": "equation", "text": "mixup_image = t × image1 + (1 −t) × image2,", "words": [{"w": "mixup_image", "b": [0.3103, 0.232, 0.4221, 0.2469]}, {"w": "=", "b": [0.4272, 0.232, 0.4415, 0.2469]}, {"w": "t", "b": [0.4466, 0.2319, 0.4533, 0.2469]}, {"w": "×", "b": [0.4574, 0.2318, 0.4717, 0.2467]}, {"w": "image1", "b": [0.4758, 0.232, 0.5303, 0.2496]}, {"w": "+", "b": [0.5354, 0.232, 0.5497, 0.2469]}, {"w": "(1", "b": [0.5538, 0.232, 0.5702, 0.2469]}, {"w": "−t)", "b": [0.5743, 0.2318, 0.6066, 0.2469]}, {"w": "×", "b": [0.6107, 0.2318, 0.625, 0.2467]}, {"w": "image2,", "b": [0.6291, 0.2319, 0.6897, 0.2496]}]}, {"id": "b_3", "type": "paragraph", "text": "where t is a real number between 0 and 1. The target of that mixup image is a combination of the original targets obtained using the same value of t:", "words": [{"w": "where", "b": [0.1306, 0.2679, 0.1773, 0.2828]}, {"w": "t", "b": [0.1834, 0.2678, 0.1901, 0.2828]}, {"w": "is", "b": [0.1962, 0.2679, 0.2085, 0.2828]}, {"w": "a", "b": [0.2147, 0.2679, 0.2238, 0.2828]}, {"w": "real", "b": [0.23, 0.2679, 0.2595, 0.2828]}, {"w": "number", "b": [0.2656, 0.2679, 0.3261, 0.2828]}, {"w": "between", "b": [0.3322, 0.2679, 0.3967, 0.2828]}, {"w": "0", "b": [0.4027, 0.2679, 0.4119, 0.2828]}, {"w": "and", "b": [0.418, 0.2679, 0.4474, 0.2828]}, {"w": "1.", "b": [0.4536, 0.2679, 0.4678, 0.2828]}, {"w": "The", "b": [0.476, 0.2679, 0.5075, 0.2828]}, {"w": "target", "b": [0.5136, 0.2679, 0.5613, 0.2828]}, {"w": "of", "b": [0.5675, 0.2679, 0.5822, 0.2828]}, {"w": "that", "b": [0.5884, 0.2679, 0.6219, 0.2828]}, {"w": "mixup", "b": [0.628, 0.2679, 0.6782, 0.2828]}, {"w": "image", "b": [0.6844, 0.2679, 0.7311, 0.2828]}, {"w": "is", "b": [0.7372, 0.2679, 0.7495, 0.2828]}, {"w": "a", "b": [0.7557, 0.2679, 0.7648, 0.2828]}, {"w": "combination", "b": [0.7709, 0.2679, 0.8689, 0.2828]}, {"w": "of", "b": [0.1312, 0.2858, 0.1461, 0.3008]}, {"w": "the", "b": [0.1522, 0.2858, 0.1779, 0.3008]}, {"w": "original", "b": [0.1841, 0.2858, 0.2446, 0.3008]}, {"w": "targets", "b": [0.2507, 0.2858, 0.3063, 0.3008]}, {"w": "obtained", "b": [0.3124, 0.2858, 0.3822, 0.3008]}, {"w": "using", "b": [0.3883, 0.2858, 0.4305, 0.3008]}, {"w": "the", "b": [0.4366, 0.2858, 0.4622, 0.3008]}, {"w": "same", "b": [0.4684, 0.2858, 0.5085, 0.3008]}, {"w": "value", "b": [0.5146, 0.2858, 0.5562, 0.3008]}, {"w": "of", "b": [0.5623, 0.2858, 0.5772, 0.3008]}, {"w": "t:", "b": [0.5831, 0.2858, 0.5949, 0.3008]}]}, {"id": "b_4", "type": "equation", "text": "mixup_target = t × target1 + (1 −t) × target2.", "words": [{"w": "mixup_target", "b": [0.3087, 0.3307, 0.4215, 0.3456]}, {"w": "=", "b": [0.4266, 0.3307, 0.441, 0.3456]}, {"w": "t", "b": [0.4461, 0.3307, 0.4527, 0.3456]}, {"w": "×", "b": [0.4568, 0.3305, 0.4712, 0.3454]}, {"w": "target1", "b": [0.4753, 0.3307, 0.5309, 0.3483]}, {"w": "+", "b": [0.5359, 0.3307, 0.5503, 0.3456]}, {"w": "(1", "b": [0.5543, 0.3307, 0.5708, 0.3456]}, {"w": "−t)", "b": [0.5748, 0.3305, 0.6071, 0.3456]}, {"w": "×", "b": [0.6112, 0.3305, 0.6256, 0.3454]}, {"w": "target2.", "b": [0.6297, 0.3307, 0.6913, 0.3483]}]}, {"id": "b_5", "type": "paragraph", "text": "Experiments9 on the ImageNet-2012, CIFAR-10, and several other datasets showed that mixup improves the generalization of neural network models. The authors of the mixup also found that it increases the robustness to adversarial examples and stabilizes the training of generative adversarial networks (GANs).", "words": [{"w": "Experiments9", "b": [0.1312, 0.3646, 0.2383, 0.3815]}, {"w": "on", "b": [0.2454, 0.3667, 0.2646, 0.3815]}, {"w": "the", "b": [0.2707, 0.3667, 0.296, 0.3815]}, {"w": "ImageNet-2012,", "b": [0.3021, 0.3666, 0.4476, 0.3815]}, {"w": "CIFAR-10,", "b": [0.4538, 0.3666, 0.5534, 0.3815]}, {"w": "and", "b": [0.5596, 0.3667, 0.5889, 0.3815]}, {"w": "several", "b": [0.595, 0.3667, 0.6487, 0.3815]}, {"w": "other", "b": [0.6548, 0.3667, 0.6963, 0.3815]}, {"w": "datasets", "b": [0.7024, 0.3667, 0.7672, 0.3815]}, {"w": "showed", "b": [0.7734, 0.3667, 0.83, 0.3815]}, {"w": "that", "b": [0.8361, 0.3667, 0.8694, 0.3815]}, {"w": "mixup", "b": [0.1312, 0.3846, 0.1813, 0.3995]}, {"w": "improves", "b": [0.1875, 0.3846, 0.258, 0.3995]}, {"w": "the", "b": [0.2641, 0.3846, 0.2894, 0.3995]}, {"w": "generalization", "b": [0.2955, 0.3846, 0.4059, 0.3995]}, {"w": "of", "b": [0.412, 0.3846, 0.4267, 0.3995]}, {"w": "neural", "b": [0.4329, 0.3846, 0.4825, 0.3995]}, {"w": "network", "b": [0.4886, 0.3846, 0.5519, 0.3995]}, {"w": "models.", "b": [0.5581, 0.3846, 0.6184, 0.3995]}, {"w": "The", "b": [0.6266, 0.3846, 0.658, 0.3995]}, {"w": "authors", "b": [0.6641, 0.3846, 0.724, 0.3995]}, {"w": "of", "b": [0.7301, 0.3846, 0.7448, 0.3995]}, {"w": "the", "b": [0.7509, 0.3846, 0.7762, 0.3995]}, {"w": "mixup", "b": [0.7824, 0.3846, 0.8325, 0.3995]}, {"w": "also", "b": [0.8386, 0.3846, 0.8691, 0.3995]}, {"w": "found", "b": [0.1312, 0.4025, 0.1765, 0.4174]}, {"w": "that", "b": [0.1827, 0.4025, 0.2162, 0.4174]}, {"w": "it", "b": [0.2224, 0.4025, 0.2346, 0.4174]}, {"w": "increases", "b": [0.2408, 0.4025, 0.3112, 0.4174]}, {"w": "the", "b": [0.3174, 0.4025, 0.3429, 0.4174]}, {"w": "robustness", "b": [0.349, 0.4025, 0.4328, 0.4174]}, {"w": "to", "b": [0.439, 0.4025, 0.4553, 0.4174]}, {"w": "adversarial", "b": [0.4612, 0.4025, 0.562, 0.4174]}, {"w": "examples", "b": [0.5691, 0.4025, 0.6538, 0.4174]}, {"w": "and", "b": [0.6599, 0.4025, 0.6894, 0.4174]}, {"w": "stabilizes", "b": [0.6955, 0.4025, 0.768, 0.4174]}, {"w": "the", "b": [0.7742, 0.4025, 0.7996, 0.4174]}, {"w": "training", "b": [0.8058, 0.4025, 0.8689, 0.4174]}, {"w": "of", "b": [0.1312, 0.4204, 0.1461, 0.4354]}, {"w": "generative", "b": [0.1537, 0.4204, 0.2491, 0.4354]}, {"w": "adversarial", "b": [0.2562, 0.4204, 0.3569, 0.4354]}, {"w": "networks", "b": [0.364, 0.4204, 0.4468, 0.4354]}, {"w": "(GANs).", "b": [0.4529, 0.4204, 0.5218, 0.4354]}]}, {"id": "b_6", "type": "paragraph", "text": "In addition to the techniques shown in Figure 14, if you expect the input images in your production system will come overcompressed, you can simulate overcompression by using some frequently used lossy compression methods and file formats, such as JPEG or GIF.", "words": [{"w": "In", "b": [0.1312, 0.4472, 0.1485, 0.4623]}, {"w": "addition", "b": [0.1553, 0.4472, 0.2233, 0.4623]}, {"w": "to", "b": [0.2301, 0.4472, 0.2468, 0.4623]}, {"w": "the", "b": [0.2536, 0.4472, 0.2797, 0.4623]}, {"w": "techniques", "b": [0.2865, 0.4472, 0.3724, 0.4623]}, {"w": "shown", "b": [0.3792, 0.4472, 0.4301, 0.4623]}, {"w": "in", "b": [0.4369, 0.4472, 0.4526, 0.4623]}, {"w": "Figure", "b": [0.4594, 0.4472, 0.5125, 0.4623]}, {"w": "14,", "b": [0.5193, 0.4472, 0.5434, 0.4623]}, {"w": "if", "b": [0.5503, 0.4472, 0.5613, 0.4623]}, {"w": "you", "b": [0.5681, 0.4472, 0.5974, 0.4623]}, {"w": "expect", "b": [0.6042, 0.4472, 0.6575, 0.4623]}, {"w": "the", "b": [0.6643, 0.4472, 0.6905, 0.4623]}, {"w": "input", "b": [0.6973, 0.4472, 0.7412, 0.4623]}, {"w": "images", "b": [0.748, 0.4472, 0.8035, 0.4623]}, {"w": "in", "b": [0.8103, 0.4472, 0.826, 0.4623]}, {"w": "your", "b": [0.8328, 0.4472, 0.8695, 0.4623]}, {"w": "production", "b": [0.1312, 0.4652, 0.2207, 0.4803]}, {"w": "system", "b": [0.2273, 0.4652, 0.2834, 0.4803]}, {"w": "will", "b": [0.29, 0.4652, 0.3193, 0.4803]}, {"w": "come", "b": [0.3259, 0.4652, 0.3677, 0.4803]}, {"w": "overcompressed,", "b": [0.3742, 0.4652, 0.5069, 0.4803]}, {"w": "you", "b": [0.5136, 0.4652, 0.5429, 0.4803]}, {"w": "can", "b": [0.5494, 0.4652, 0.5777, 0.4803]}, {"w": "simulate", "b": [0.5842, 0.4652, 0.6529, 0.4803]}, {"w": "overcompression", "b": [0.6594, 0.4652, 0.7931, 0.4803]}, {"w": "by", "b": [0.7997, 0.4652, 0.8196, 0.4803]}, {"w": "using", "b": [0.8261, 0.4652, 0.8691, 0.4803]}, {"w": "some", "b": [0.1312, 0.4832, 0.1713, 0.4982]}, {"w": "frequently", "b": [0.1775, 0.4832, 0.2586, 0.4982]}, {"w": "used", "b": [0.2647, 0.4832, 0.3007, 0.4982]}, {"w": "lossy", "b": [0.3069, 0.4832, 0.3455, 0.4982]}, {"w": "compression", "b": [0.3517, 0.4832, 0.4494, 0.4982]}, {"w": "methods", "b": [0.4555, 0.4832, 0.5238, 0.4982]}, {"w": "and", "b": [0.53, 0.4832, 0.5597, 0.4982]}, {"w": "file", "b": [0.5658, 0.4832, 0.5894, 0.4982]}, {"w": "formats,", "b": [0.5956, 0.4832, 0.6619, 0.4982]}, {"w": "such", "b": [0.668, 0.4832, 0.7035, 0.4982]}, {"w": "as", "b": [0.7097, 0.4832, 0.7262, 0.4982]}, {"w": "JPEG", "b": [0.7323, 0.4832, 0.7814, 0.4982]}, {"w": "or", "b": [0.7876, 0.4832, 0.804, 0.4982]}, {"w": "GIF.", "b": [0.8102, 0.4832, 0.8485, 0.4982]}]}, {"id": "b_7", "type": "paragraph", "text": "Only training data undergoes augmentation. Of course, it’s impractical to generate all these additional examples in advance and store them. In practice, the data augmentation techniques are applied to the original data on-the-fly during training.", "words": [{"w": "Only", "b": [0.1312, 0.5102, 0.1702, 0.5251]}, {"w": "training", "b": [0.1764, 0.5102, 0.2392, 0.5251]}, {"w": "data", "b": [0.2454, 0.5102, 0.2808, 0.5251]}, {"w": "undergoes", "b": [0.2869, 0.5102, 0.3666, 0.5251]}, {"w": "augmentation.", "b": [0.3728, 0.5102, 0.4867, 0.5251]}, {"w": "Of", "b": [0.4949, 0.5102, 0.5147, 0.5251]}, {"w": "course,", "b": [0.5208, 0.5102, 0.5757, 0.5251]}, {"w": "it’s", "b": [0.5818, 0.5102, 0.6063, 0.5251]}, {"w": "impractical", "b": [0.6124, 0.5102, 0.7016, 0.5251]}, {"w": "to", "b": [0.7077, 0.5102, 0.7239, 0.5251]}, {"w": "generate", "b": [0.73, 0.5102, 0.797, 0.5251]}, {"w": "all", "b": [0.8031, 0.5102, 0.8223, 0.5251]}, {"w": "these", "b": [0.8285, 0.5102, 0.8691, 0.5251]}, {"w": "additional", "b": [0.1312, 0.5282, 0.2106, 0.543]}, {"w": "examples", "b": [0.2155, 0.5282, 0.2874, 0.543]}, {"w": "in", "b": [0.2922, 0.5282, 0.3073, 0.543]}, {"w": "advance", "b": [0.3121, 0.5282, 0.3749, 0.543]}, {"w": "and", "b": [0.3798, 0.5282, 0.4089, 0.543]}, {"w": "store", "b": [0.4138, 0.5282, 0.4521, 0.543]}, {"w": "them.", "b": [0.4569, 0.5282, 0.5022, 0.543]}, {"w": "In", "b": [0.5099, 0.5282, 0.5265, 0.543]}, {"w": "practice,", "b": [0.5313, 0.5282, 0.5987, 0.543]}, {"w": "the", "b": [0.6038, 0.5282, 0.6289, 0.543]}, {"w": "data", "b": [0.6338, 0.5282, 0.6689, 0.543]}, {"w": "augmentation", "b": [0.6738, 0.5282, 0.7818, 0.543]}, {"w": "techniques", "b": [0.7866, 0.5282, 0.8691, 0.543]}, {"w": "are", "b": [0.1312, 0.546, 0.1559, 0.561]}, {"w": "applied", "b": [0.162, 0.546, 0.2205, 0.561]}, {"w": "to", "b": [0.2267, 0.546, 0.2431, 0.561]}, {"w": "the", "b": [0.2492, 0.546, 0.2749, 0.561]}, {"w": "original", "b": [0.281, 0.546, 0.3416, 0.561]}, {"w": "data", "b": [0.3477, 0.546, 0.3836, 0.561]}, {"w": "on-the-fly", "b": [0.3897, 0.546, 0.4671, 0.561]}, {"w": "during", "b": [0.4733, 0.546, 0.5256, 0.561]}, {"w": "training.", "b": [0.5318, 0.546, 0.6006, 0.561]}]}, {"id": "b_8", "type": "paragraph", "text": "3.8.2 Data Augmentation for Text", "words": [{"w": "3.8.2", "b": [0.1312, 0.5939, 0.1749, 0.6089]}, {"w": "Data", "b": [0.1961, 0.5939, 0.2412, 0.6089]}, {"w": "Augmentation", "b": [0.2483, 0.5939, 0.3798, 0.6089]}, {"w": "for", "b": [0.3869, 0.5939, 0.4128, 0.6089]}, {"w": "Text", "b": [0.4198, 0.5939, 0.462, 0.6089]}]}, {"id": "b_9", "type": "paragraph", "text": "When it comes to text data augmentations, it is not as straightforward. We need to use", "words": [{"w": "When", "b": [0.1303, 0.6303, 0.1789, 0.6455]}, {"w": "it", "b": [0.186, 0.6303, 0.1985, 0.6455]}, {"w": "comes", "b": [0.2055, 0.6303, 0.2548, 0.6455]}, {"w": "to", "b": [0.2618, 0.6303, 0.2785, 0.6455]}, {"w": "text", "b": [0.2856, 0.6303, 0.3185, 0.6455]}, {"w": "data", "b": [0.3255, 0.6303, 0.3621, 0.6455]}, {"w": "augmentations,", "b": [0.3692, 0.6303, 0.4942, 0.6455]}, {"w": "it", "b": [0.5015, 0.6303, 0.514, 0.6455]}, {"w": "is", "b": [0.5211, 0.6303, 0.5337, 0.6455]}, {"w": "not", "b": [0.5407, 0.6303, 0.5679, 0.6455]}, {"w": "as", "b": [0.5749, 0.6303, 0.5918, 0.6455]}, {"w": "straightforward.", "b": [0.5988, 0.6303, 0.7304, 0.6455]}, {"w": "We", "b": [0.7412, 0.6303, 0.7673, 0.6455]}, {"w": "need", "b": [0.7744, 0.6303, 0.812, 0.6455]}, {"w": "to", "b": [0.8191, 0.6303, 0.8358, 0.6455]}, {"w": "use", "b": [0.8428, 0.6303, 0.8691, 0.6455]}]}, {"id": "b_10", "type": "paragraph", "text": "appropriate transformation techniques to preserve the contextual and grammatical structure of natural language texts.", "words": [{"w": "appropriate", "b": [0.1312, 0.6485, 0.2234, 0.6633]}, {"w": "transformation", "b": [0.2295, 0.6485, 0.3475, 0.6633]}, {"w": "techniques", "b": [0.3536, 0.6485, 0.4366, 0.6633]}, {"w": "to", "b": [0.4427, 0.6485, 0.4589, 0.6633]}, {"w": "preserve", "b": [0.465, 0.6485, 0.5299, 0.6633]}, {"w": "the", "b": [0.536, 0.6485, 0.5613, 0.6633]}, {"w": "contextual", "b": [0.5674, 0.6485, 0.6503, 0.6633]}, {"w": "and", "b": [0.6565, 0.6485, 0.6858, 0.6633]}, {"w": "grammatical", "b": [0.6919, 0.6485, 0.791, 0.6633]}, {"w": "structure", "b": [0.7971, 0.6485, 0.8691, 0.6633]}, {"w": "of", "b": [0.1312, 0.6664, 0.1461, 0.6813]}, {"w": "natural", "b": [0.1522, 0.6664, 0.2107, 0.6813]}, {"w": "language", "b": [0.2169, 0.6664, 0.2876, 0.6813]}, {"w": "texts.", "b": [0.2938, 0.6664, 0.3385, 0.6813]}]}, {"id": "b_11", "type": "paragraph", "text": "One technique involves replacing random words in a sentence with their close synonyms. For the sentence, “The car stopped near a shopping mall.” some equivalent sentences are:", "words": [{"w": "One", "b": [0.1312, 0.6932, 0.1647, 0.7083]}, {"w": "technique", "b": [0.1711, 0.6932, 0.2496, 0.7083]}, {"w": "involves", "b": [0.256, 0.6932, 0.3204, 0.7083]}, {"w": "replacing", "b": [0.3268, 0.6932, 0.4011, 0.7083]}, {"w": "random", "b": [0.4075, 0.6932, 0.4703, 0.7083]}, {"w": "words", "b": [0.4767, 0.6932, 0.5244, 0.7083]}, {"w": "in", "b": [0.5308, 0.6932, 0.5465, 0.7083]}, {"w": "a", "b": [0.5529, 0.6932, 0.5623, 0.7083]}, {"w": "sentence", "b": [0.5687, 0.6932, 0.6374, 0.7083]}, {"w": "with", "b": [0.6437, 0.6932, 0.6803, 0.7083]}, {"w": "their", "b": [0.6867, 0.6932, 0.7255, 0.7083]}, {"w": "close", "b": [0.7319, 0.6932, 0.7707, 0.7083]}, {"w": "synonyms.", "b": [0.7767, 0.6932, 0.8723, 0.7083]}, {"w": "For", "b": [0.1312, 0.7112, 0.1582, 0.7262]}, {"w": "the", "b": [0.1643, 0.7112, 0.19, 0.7262]}, {"w": "sentence,", "b": [0.1961, 0.7112, 0.2686, 0.7262]}, {"w": "“The", "b": [0.2747, 0.7112, 0.3152, 0.7262]}, {"w": "car", "b": [0.3214, 0.7112, 0.346, 0.7262]}, {"w": "stopped", "b": [0.3522, 0.7112, 0.4154, 0.7262]}, {"w": "near", "b": [0.4215, 0.7112, 0.4564, 0.7262]}, {"w": "a", "b": [0.4626, 0.7112, 0.4718, 0.7262]}, {"w": "shopping", "b": [0.478, 0.7112, 0.5498, 0.7262]}, {"w": "mall.”", "b": [0.556, 0.7112, 0.6021, 0.7262]}, {"w": "some", "b": [0.6103, 0.7112, 0.6504, 0.7262]}, {"w": "equivalent", "b": [0.6566, 0.7112, 0.7381, 0.7262]}, {"w": "sentences", "b": [0.7442, 0.7112, 0.8188, 0.7262]}, {"w": "are:", "b": [0.825, 0.7112, 0.8548, 0.7262]}]}, {"id": "b_12", "type": "paragraph", "text": "“The automobile stopped near a shopping mall.”", "words": [{"w": "“The", "b": [0.1774, 0.7381, 0.2179, 0.7531]}, {"w": "automobile", "b": [0.224, 0.7381, 0.3132, 0.7531]}, {"w": "stopped", "b": [0.3193, 0.7381, 0.3825, 0.7531]}, {"w": "near", "b": [0.3887, 0.7381, 0.4236, 0.7531]}, {"w": "a", "b": [0.4297, 0.7381, 0.439, 0.7531]}, {"w": "shopping", "b": [0.4451, 0.7381, 0.517, 0.7531]}, {"w": "mall.”", "b": [0.5232, 0.7381, 0.5693, 0.7531]}]}, {"id": "b_13", "type": "paragraph", "text": "“The car stopped near a shopping center.”", "words": [{"w": "“The", "b": [0.1774, 0.7651, 0.2179, 0.78]}, {"w": "car", "b": [0.224, 0.7651, 0.2487, 0.78]}, {"w": "stopped", "b": [0.2548, 0.7651, 0.318, 0.78]}, {"w": "near", "b": [0.3241, 0.7651, 0.3591, 0.78]}, {"w": "a", "b": [0.3652, 0.7651, 0.3745, 0.78]}, {"w": "shopping", "b": [0.3806, 0.7651, 0.4525, 0.78]}, {"w": "center.”", "b": [0.4586, 0.7651, 0.5187, 0.78]}]}, {"id": "b_14", "type": "paragraph", "text": "“The auto stopped near a mall.”", "words": [{"w": "“The", "b": [0.1774, 0.792, 0.2179, 0.8069]}, {"w": "auto", "b": [0.224, 0.792, 0.2599, 0.8069]}, {"w": "stopped", "b": [0.266, 0.792, 0.3292, 0.8069]}, {"w": "near", "b": [0.3354, 0.792, 0.3703, 0.8069]}, {"w": "a", "b": [0.3764, 0.792, 0.3857, 0.8069]}, {"w": "mall.”", "b": [0.3918, 0.792, 0.4379, 0.8069]}]}, {"id": "b_15", "type": "paragraph", "text": "9More details on the mixup technique can be found in Zhang, Hongyi, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. “mixup: Beyond empirical risk minimization.” arXiv preprint arXiv:1710.09412 (2017).", "words": [{"w": "9More", "b": [0.1518, 0.8187, 0.194, 0.8326]}, {"w": "details", "b": [0.1987, 0.8207, 0.2423, 0.8326]}, {"w": "on", "b": [0.247, 0.8207, 0.2632, 0.8326]}, {"w": "the", "b": [0.2679, 0.8207, 0.2893, 0.8326]}, {"w": "mixup", "b": [0.2939, 0.8207, 0.3362, 0.8326]}, {"w": "technique", "b": [0.3409, 0.8207, 0.4049, 0.8326]}, {"w": "can", "b": [0.4096, 0.8207, 0.4326, 0.8326]}, {"w": "be", "b": [0.4373, 0.8207, 0.4531, 0.8326]}, {"w": "found", "b": [0.4578, 0.8207, 0.4958, 0.8326]}, {"w": "in", "b": [0.5005, 0.8207, 0.5133, 0.8326]}, {"w": "Zhang,", "b": [0.518, 0.8207, 0.5641, 0.8326]}, {"w": "Hongyi,", "b": [0.5688, 0.8207, 0.6209, 0.8326]}, {"w": "Moustapha", "b": [0.6257, 0.8207, 0.7005, 0.8326]}, {"w": "Cisse,", "b": [0.7051, 0.8207, 0.7437, 0.8326]}, {"w": "Yann", "b": [0.7485, 0.8207, 0.7835, 0.8326]}, {"w": "N.", "b": [0.7882, 0.8207, 0.8039, 0.8326]}, {"w": "Dauphin,", "b": [0.8086, 0.8207, 0.8707, 0.8326]}, {"w": "and", "b": [0.1312, 0.8349, 0.156, 0.8468]}, {"w": "David", "b": [0.1607, 0.8349, 0.2006, 0.8468]}, {"w": "Lopez-Paz.", "b": [0.2053, 0.8349, 0.2791, 0.8468]}, {"w": "“mixup:", "b": [0.2859, 0.8349, 0.3397, 0.8468]}, {"w": "Beyond", "b": [0.3464, 0.8349, 0.3965, 0.8468]}, {"w": "empirical", "b": [0.4012, 0.8349, 0.4627, 0.8468]}, {"w": "risk", "b": [0.4674, 0.8349, 0.4918, 0.8468]}, {"w": "minimization.”", "b": [0.4965, 0.8349, 0.5937, 0.8468]}, {"w": "arXiv", "b": [0.6005, 0.8349, 0.6381, 0.8468]}, {"w": "preprint", "b": [0.6428, 0.8349, 0.697, 0.8468]}, {"w": "arXiv:1710.09412", "b": [0.7017, 0.8349, 0.8169, 0.8468]}, {"w": "(2017).", "b": [0.8216, 0.8349, 0.8685, 0.8468]}]}, {"id": "b_16", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 32", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "32", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 76, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "A similar technique uses hypernyms instead of synonyms. A hypernym is a word that has more general meaning. For example, “mammal” is a hypernym for “whale” and “cat”; “vehicle” is a hypernym for “car” and “bus.” From our example above, we could create the fol-", "words": [{"w": "A", "b": [0.1305, 0.0883, 0.1446, 0.1034]}, {"w": "similar", "b": [0.1522, 0.0883, 0.2078, 0.1034]}, {"w": "technique", "b": [0.2153, 0.0883, 0.2938, 0.1034]}, {"w": "uses", "b": [0.3013, 0.0883, 0.3351, 0.1034]}, {"w": "hypernyms", "b": [0.3425, 0.0884, 0.4442, 0.1034]}, {"w": "instead", "b": [0.4517, 0.0883, 0.5104, 0.1034]}, {"w": "of", "b": [0.5179, 0.0883, 0.5331, 0.1034]}, {"w": "synonyms.", "b": [0.5407, 0.0883, 0.6261, 0.1034]}, {"w": "A", "b": [0.6385, 0.0883, 0.6526, 0.1034]}, {"w": "hypernym", "b": [0.6602, 0.0883, 0.7423, 0.1034]}, {"w": "is", "b": [0.7499, 0.0883, 0.7625, 0.1034]}, {"w": "a", "b": [0.7701, 0.0883, 0.7795, 0.1034]}, {"w": "word", "b": [0.787, 0.0883, 0.8274, 0.1034]}, {"w": "that", "b": [0.8349, 0.0883, 0.8694, 0.1034]}, {"w": "has", "b": [0.1312, 0.1062, 0.1585, 0.1213]}, {"w": "more", "b": [0.1646, 0.1062, 0.2053, 0.1213]}, {"w": "general", "b": [0.2115, 0.1062, 0.2699, 0.1213]}, {"w": "meaning.", "b": [0.2761, 0.1062, 0.3501, 0.1213]}, {"w": "For", "b": [0.3584, 0.1062, 0.3858, 0.1213]}, {"w": "example,", "b": [0.392, 0.1062, 0.4645, 0.1213]}, {"w": "“mammal”", "b": [0.4706, 0.1062, 0.5592, 0.1213]}, {"w": "is", "b": [0.5654, 0.1062, 0.578, 0.1213]}, {"w": "a", "b": [0.5842, 0.1062, 0.5935, 0.1213]}, {"w": "hypernym", "b": [0.5997, 0.1062, 0.6816, 0.1213]}, {"w": "for", "b": [0.6878, 0.1062, 0.7102, 0.1213]}, {"w": "“whale”", "b": [0.7164, 0.1062, 0.781, 0.1213]}, {"w": "and", "b": [0.7872, 0.1062, 0.8174, 0.1213]}, {"w": "“cat”;", "b": [0.8236, 0.1062, 0.8716, 0.1213]}, {"w": "“vehicle”", "b": [0.1286, 0.1244, 0.1989, 0.1392]}, {"w": "is", "b": [0.2045, 0.1244, 0.2166, 0.1392]}, {"w": "a", "b": [0.2221, 0.1244, 0.2312, 0.1392]}, {"w": "hypernym", "b": [0.2367, 0.1244, 0.3156, 0.1392]}, {"w": "for", "b": [0.3211, 0.1244, 0.3428, 0.1392]}, {"w": "“car”", "b": [0.3483, 0.1244, 0.3895, 0.1392]}, {"w": "and", "b": [0.395, 0.1244, 0.4242, 0.1392]}, {"w": "“bus.”", "b": [0.4297, 0.1244, 0.4765, 0.1392]}, {"w": "From", "b": [0.4845, 0.1244, 0.5259, 0.1392]}, {"w": "our", "b": [0.5314, 0.1244, 0.5576, 0.1392]}, {"w": "example", "b": [0.5631, 0.1244, 0.6279, 0.1392]}, {"w": "above,", "b": [0.6334, 0.1244, 0.6837, 0.1392]}, {"w": "we", "b": [0.6893, 0.1244, 0.7099, 0.1392]}, {"w": "could", "b": [0.7154, 0.1244, 0.7576, 0.1392]}, {"w": "create", "b": [0.7631, 0.1244, 0.8104, 0.1392]}, {"w": "the", "b": [0.8159, 0.1244, 0.841, 0.1392]}, {"w": "fol-", "b": [0.8465, 0.1244, 0.8722, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "lowing sentences:", "words": [{"w": "lowing", "b": [0.1312, 0.1422, 0.183, 0.1572]}, {"w": "sentences:", "b": [0.1891, 0.1422, 0.2689, 0.1572]}]}, {"id": "b_2", "type": "paragraph", "text": "“The vehicle stopped near a shopping mall.”", "words": [{"w": "“The", "b": [0.1774, 0.1692, 0.2179, 0.1841]}, {"w": "vehicle", "b": [0.224, 0.1692, 0.2784, 0.1841]}, {"w": "stopped", "b": [0.2845, 0.1692, 0.3477, 0.1841]}, {"w": "near", "b": [0.3538, 0.1692, 0.3888, 0.1841]}, {"w": "a", "b": [0.3949, 0.1692, 0.4042, 0.1841]}, {"w": "shopping", "b": [0.4103, 0.1692, 0.4822, 0.1841]}, {"w": "mall.”", "b": [0.4883, 0.1692, 0.5345, 0.1841]}]}, {"id": "b_3", "type": "paragraph", "text": "“The car stopped near a building.”", "words": [{"w": "“The", "b": [0.1774, 0.1961, 0.2179, 0.211]}, {"w": "car", "b": [0.224, 0.1961, 0.2487, 0.211]}, {"w": "stopped", "b": [0.2548, 0.1961, 0.318, 0.211]}, {"w": "near", "b": [0.3241, 0.1961, 0.3591, 0.211]}, {"w": "a", "b": [0.3652, 0.1961, 0.3745, 0.211]}, {"w": "building.”", "b": [0.3806, 0.1961, 0.4575, 0.211]}]}, {"id": "b_4", "type": "paragraph", "text": "If you represent words or documents in your dataset using word or document embeddings, you can apply slight Gaussian noise to randomly chosen embedding features to make a variation of the same word or document. You can tune the number of features to modify and the noise intensity as hyperparameters by optimizing the performance on validation data.", "words": [{"w": "If", "b": [0.1312, 0.2231, 0.1433, 0.2379]}, {"w": "you", "b": [0.1482, 0.2231, 0.1764, 0.2379]}, {"w": "represent", "b": [0.1813, 0.2231, 0.2534, 0.2379]}, {"w": "words", "b": [0.2584, 0.2231, 0.3042, 0.2379]}, {"w": "or", "b": [0.3092, 0.2231, 0.3253, 0.2379]}, {"w": "documents", "b": [0.3302, 0.2231, 0.4148, 0.2379]}, {"w": "in", "b": [0.4197, 0.2231, 0.4348, 0.2379]}, {"w": "your", "b": [0.4397, 0.2231, 0.475, 0.2379]}, {"w": "dataset", "b": [0.4799, 0.2231, 0.5373, 0.2379]}, {"w": "using", "b": [0.5423, 0.2231, 0.5835, 0.2379]}, {"w": "word", "b": [0.5885, 0.223, 0.6344, 0.238]}, {"w": "or", "b": [0.6393, 0.2231, 0.6555, 0.2379]}, {"w": "document", "b": [0.6604, 0.223, 0.7515, 0.238]}, {"w": "embeddings,", "b": [0.7572, 0.223, 0.8713, 0.238]}, {"w": "you", "b": [0.1308, 0.2411, 0.1589, 0.2559]}, {"w": "can", "b": [0.1631, 0.2411, 0.1902, 0.2559]}, {"w": "apply", "b": [0.1945, 0.2411, 0.2382, 0.2559]}, {"w": "slight", "b": [0.2424, 0.2411, 0.2852, 0.2559]}, {"w": "Gaussian", "b": [0.2894, 0.2411, 0.3611, 0.2559]}, {"w": "noise", "b": [0.3654, 0.2411, 0.4047, 0.2559]}, {"w": "to", "b": [0.4089, 0.2411, 0.425, 0.2559]}, {"w": "randomly", "b": [0.4292, 0.2411, 0.5041, 0.2559]}, {"w": "chosen", "b": [0.5083, 0.2411, 0.5602, 0.2559]}, {"w": "embedding", "b": [0.5644, 0.2411, 0.6498, 0.2559]}, {"w": "features", "b": [0.6541, 0.2411, 0.716, 0.2559]}, {"w": "to", "b": [0.7203, 0.2411, 0.7363, 0.2559]}, {"w": "make", "b": [0.7406, 0.2411, 0.7818, 0.2559]}, {"w": "a", "b": [0.786, 0.2411, 0.795, 0.2559]}, {"w": "variation", "b": [0.7992, 0.2411, 0.8691, 0.2559]}, {"w": "of", "b": [0.1312, 0.259, 0.1458, 0.2738]}, {"w": "the", "b": [0.1517, 0.259, 0.1768, 0.2738]}, {"w": "same", "b": [0.1827, 0.259, 0.222, 0.2738]}, {"w": "word", "b": [0.2279, 0.259, 0.2666, 0.2738]}, {"w": "or", "b": [0.2725, 0.259, 0.2886, 0.2738]}, {"w": "document.", "b": [0.2945, 0.259, 0.3769, 0.2738]}, {"w": "You", "b": [0.385, 0.259, 0.4161, 0.2738]}, {"w": "can", "b": [0.422, 0.259, 0.4491, 0.2738]}, {"w": "tune", "b": [0.455, 0.259, 0.4902, 0.2738]}, {"w": "the", "b": [0.4961, 0.259, 0.5212, 0.2738]}, {"w": "number", "b": [0.5271, 0.259, 0.5869, 0.2738]}, {"w": "of", "b": [0.5928, 0.259, 0.6074, 0.2738]}, {"w": "features", "b": [0.6133, 0.259, 0.6753, 0.2738]}, {"w": "to", "b": [0.6811, 0.259, 0.6972, 0.2738]}, {"w": "modify", "b": [0.7031, 0.259, 0.7579, 0.2738]}, {"w": "and", "b": [0.7638, 0.259, 0.7929, 0.2738]}, {"w": "the", "b": [0.7988, 0.259, 0.8239, 0.2738]}, {"w": "noise", "b": [0.8298, 0.259, 0.8691, 0.2738]}, {"w": "intensity", "b": [0.1312, 0.2768, 0.2006, 0.2918]}, {"w": "as", "b": [0.2067, 0.2768, 0.2232, 0.2918]}, {"w": "hyperparameters", "b": [0.2294, 0.2768, 0.3645, 0.2918]}, {"w": "by", "b": [0.3706, 0.2768, 0.3901, 0.2918]}, {"w": "optimizing", "b": [0.3963, 0.2768, 0.4814, 0.2918]}, {"w": "the", "b": [0.4875, 0.2768, 0.5132, 0.2918]}, {"w": "performance", "b": [0.5193, 0.2768, 0.6189, 0.2918]}, {"w": "on", "b": [0.625, 0.2768, 0.6445, 0.2918]}, {"w": "validation", "b": [0.6507, 0.2768, 0.7302, 0.2918]}, {"w": "data.", "b": [0.7363, 0.2768, 0.7773, 0.2918]}]}, {"id": "b_5", "type": "paragraph", "text": "Alternatively, to replace a given word w in the sentence, you can find k nearest neighbors to the word w in the word embedding space and generate k new sentences by replacing the word w with its respective neighbor. The nearest neighbors can be found using a measure such as cosine similarity or Euclidean distance. The choice of the measure and the value of k, can be tuned as hyperparameters.", "words": [{"w": "Alternatively,", "b": [0.1305, 0.3038, 0.2384, 0.3187]}, {"w": "to", "b": [0.2445, 0.3038, 0.2607, 0.3187]}, {"w": "replace", "b": [0.2668, 0.3038, 0.3226, 0.3187]}, {"w": "a", "b": [0.3287, 0.3038, 0.3378, 0.3187]}, {"w": "given", "b": [0.3439, 0.3038, 0.3854, 0.3187]}, {"w": "word", "b": [0.3916, 0.3038, 0.4306, 0.3187]}, {"w": "w", "b": [0.4366, 0.3037, 0.4498, 0.3187]}, {"w": "in", "b": [0.4564, 0.3038, 0.4716, 0.3187]}, {"w": "the", "b": [0.4778, 0.3038, 0.5031, 0.3187]}, {"w": "sentence,", "b": [0.5092, 0.3038, 0.5807, 0.3187]}, {"w": "you", "b": [0.5868, 0.3038, 0.6152, 0.3187]}, {"w": "can", "b": [0.6213, 0.3038, 0.6486, 0.3187]}, {"w": "find", "b": [0.6548, 0.3038, 0.6851, 0.3187]}, {"w": "k", "b": [0.6911, 0.3037, 0.7008, 0.3187]}, {"w": "nearest", "b": [0.7075, 0.3038, 0.7643, 0.3187]}, {"w": "neighbors", "b": [0.7705, 0.3038, 0.8465, 0.3187]}, {"w": "to", "b": [0.8527, 0.3038, 0.8689, 0.3187]}, {"w": "the", "b": [0.1312, 0.3218, 0.1564, 0.3366]}, {"w": "word", "b": [0.162, 0.3218, 0.2007, 0.3366]}, {"w": "w", "b": [0.2062, 0.3217, 0.2194, 0.3366]}, {"w": "in", "b": [0.2255, 0.3218, 0.2406, 0.3366]}, {"w": "the", "b": [0.2462, 0.3218, 0.2713, 0.3366]}, {"w": "word", "b": [0.2769, 0.3218, 0.3156, 0.3366]}, {"w": "embedding", "b": [0.3212, 0.3218, 0.4066, 0.3366]}, {"w": "space", "b": [0.4122, 0.3218, 0.4545, 0.3366]}, {"w": "and", "b": [0.4601, 0.3218, 0.4893, 0.3366]}, {"w": "generate", "b": [0.4948, 0.3218, 0.5612, 0.3366]}, {"w": "k", "b": [0.5666, 0.3217, 0.5763, 0.3366]}, {"w": "new", "b": [0.5824, 0.3218, 0.6136, 0.3366]}, {"w": "sentences", "b": [0.6192, 0.3218, 0.6922, 0.3366]}, {"w": "by", "b": [0.6978, 0.3218, 0.7169, 0.3366]}, {"w": "replacing", "b": [0.7225, 0.3218, 0.7939, 0.3366]}, {"w": "the", "b": [0.7995, 0.3218, 0.8246, 0.3366]}, {"w": "word", "b": [0.8302, 0.3218, 0.8689, 0.3366]}, {"w": "w", "b": [0.1312, 0.3396, 0.1444, 0.3546]}, {"w": "with", "b": [0.1511, 0.3397, 0.1865, 0.3546]}, {"w": "its", "b": [0.1927, 0.3397, 0.212, 0.3546]}, {"w": "respective", "b": [0.2182, 0.3397, 0.2968, 0.3546]}, {"w": "neighbor.", "b": [0.303, 0.3397, 0.3769, 0.3546]}, {"w": "The", "b": [0.3851, 0.3397, 0.4165, 0.3546]}, {"w": "nearest", "b": [0.4227, 0.3397, 0.4795, 0.3546]}, {"w": "neighbors", "b": [0.4857, 0.3397, 0.5618, 0.3546]}, {"w": "can", "b": [0.5679, 0.3397, 0.5953, 0.3546]}, {"w": "be", "b": [0.6014, 0.3397, 0.6202, 0.3546]}, {"w": "found", "b": [0.6263, 0.3397, 0.6714, 0.3546]}, {"w": "using", "b": [0.6776, 0.3397, 0.7191, 0.3546]}, {"w": "a", "b": [0.7253, 0.3397, 0.7344, 0.3546]}, {"w": "measure", "b": [0.7406, 0.3397, 0.8055, 0.3546]}, {"w": "such", "b": [0.8117, 0.3397, 0.8467, 0.3546]}, {"w": "as", "b": [0.8529, 0.3397, 0.8692, 0.3546]}, {"w": "cosine", "b": [0.1312, 0.3576, 0.1871, 0.3726]}, {"w": "similarity", "b": [0.1941, 0.3576, 0.2817, 0.3726]}, {"w": "or", "b": [0.2878, 0.3575, 0.3045, 0.3726]}, {"w": "Euclidean", "b": [0.3107, 0.3576, 0.4013, 0.3726]}, {"w": "distance.", "b": [0.4084, 0.3575, 0.4891, 0.3726]}, {"w": "The", "b": [0.4973, 0.3575, 0.5296, 0.3726]}, {"w": "choice", "b": [0.5358, 0.3575, 0.5853, 0.3726]}, {"w": "of", "b": [0.5914, 0.3575, 0.6066, 0.3726]}, {"w": "the", "b": [0.6127, 0.3575, 0.6388, 0.3726]}, {"w": "measure", "b": [0.6449, 0.3575, 0.7117, 0.3726]}, {"w": "and", "b": [0.7179, 0.3575, 0.7481, 0.3726]}, {"w": "the", "b": [0.7543, 0.3575, 0.7803, 0.3726]}, {"w": "value", "b": [0.7865, 0.3575, 0.8287, 0.3726]}, {"w": "of", "b": [0.8349, 0.3575, 0.85, 0.3726]}, {"w": "k,", "b": [0.8559, 0.3575, 0.8713, 0.3726]}, {"w": "can", "b": [0.1312, 0.3755, 0.1589, 0.3905]}, {"w": "be", "b": [0.1651, 0.3755, 0.1841, 0.3905]}, {"w": "tuned", "b": [0.1902, 0.3755, 0.2364, 0.3905]}, {"w": "as", "b": [0.2425, 0.3755, 0.259, 0.3905]}, {"w": "hyperparameters.", "b": [0.2652, 0.3755, 0.4054, 0.3905]}]}, {"id": "b_6", "type": "paragraph", "text": "A modern alternative to the k-nearest-neighbors approach described above is to use a deep pre-trained model such as Bidirectional Encoder Representations from Transformers (BERT). Models like BERT are trained to predict a masked word given other words in a sentence. One can use BERT to generate k most likely predictions for a masked word and then use them as synonyms for data augmentation.", "words": [{"w": "A", "b": [0.1305, 0.4024, 0.1444, 0.4174]}, {"w": "modern", "b": [0.1506, 0.4024, 0.2119, 0.4174]}, {"w": "alternative", "b": [0.218, 0.4024, 0.3046, 0.4174]}, {"w": "to", "b": [0.3107, 0.4024, 0.3272, 0.4174]}, {"w": "the", "b": [0.3333, 0.4024, 0.3591, 0.4174]}, {"w": "k-nearest-neighbors", "b": [0.3651, 0.4024, 0.5229, 0.4174]}, {"w": "approach", "b": [0.529, 0.4024, 0.6027, 0.4174]}, {"w": "described", "b": [0.6088, 0.4024, 0.6847, 0.4174]}, {"w": "above", "b": [0.6908, 0.4024, 0.7372, 0.4174]}, {"w": "is", "b": [0.7433, 0.4024, 0.7558, 0.4174]}, {"w": "to", "b": [0.7619, 0.4024, 0.7784, 0.4174]}, {"w": "use", "b": [0.7846, 0.4024, 0.8104, 0.4174]}, {"w": "a", "b": [0.8166, 0.4024, 0.8258, 0.4174]}, {"w": "deep", "b": [0.832, 0.4024, 0.8691, 0.4174]}, {"w": "pre-trained", "b": [0.1312, 0.4205, 0.2188, 0.4353]}, {"w": "model", "b": [0.2238, 0.4205, 0.2716, 0.4353]}, {"w": "such", "b": [0.2766, 0.4205, 0.3114, 0.4353]}, {"w": "as", "b": [0.3165, 0.4205, 0.3327, 0.4353]}, {"w": "Bidirectional", "b": [0.3377, 0.4205, 0.439, 0.4353]}, {"w": "Encoder", "b": [0.4441, 0.4205, 0.5092, 0.4353]}, {"w": "Representations", "b": [0.5143, 0.4205, 0.6399, 0.4353]}, {"w": "from", "b": [0.645, 0.4205, 0.6817, 0.4353]}, {"w": "Transformers", "b": [0.6868, 0.4205, 0.7906, 0.4353]}, {"w": "(BERT).", "b": [0.7957, 0.4204, 0.8724, 0.4354]}, {"w": "Models", "b": [0.1312, 0.4382, 0.1899, 0.4533]}, {"w": "like", "b": [0.1967, 0.4382, 0.2249, 0.4533]}, {"w": "BERT", "b": [0.2317, 0.4382, 0.2837, 0.4533]}, {"w": "are", "b": [0.2905, 0.4382, 0.3156, 0.4533]}, {"w": "trained", "b": [0.3224, 0.4382, 0.381, 0.4533]}, {"w": "to", "b": [0.3877, 0.4382, 0.4045, 0.4533]}, {"w": "predict", "b": [0.4112, 0.4382, 0.4688, 0.4533]}, {"w": "a", "b": [0.4756, 0.4382, 0.485, 0.4533]}, {"w": "masked", "b": [0.4917, 0.4382, 0.5525, 0.4533]}, {"w": "word", "b": [0.5593, 0.4382, 0.5996, 0.4533]}, {"w": "given", "b": [0.6063, 0.4382, 0.6492, 0.4533]}, {"w": "other", "b": [0.656, 0.4382, 0.6989, 0.4533]}, {"w": "words", "b": [0.7057, 0.4382, 0.7534, 0.4533]}, {"w": "in", "b": [0.7602, 0.4382, 0.7759, 0.4533]}, {"w": "a", "b": [0.7826, 0.4382, 0.792, 0.4533]}, {"w": "sentence.", "b": [0.7988, 0.4382, 0.8727, 0.4533]}, {"w": "One", "b": [0.1312, 0.4562, 0.1647, 0.4713]}, {"w": "can", "b": [0.1711, 0.4562, 0.1993, 0.4713]}, {"w": "use", "b": [0.2057, 0.4562, 0.232, 0.4713]}, {"w": "BERT", "b": [0.2384, 0.4562, 0.2904, 0.4713]}, {"w": "to", "b": [0.2968, 0.4562, 0.3135, 0.4713]}, {"w": "generate", "b": [0.3199, 0.4562, 0.389, 0.4713]}, {"w": "k", "b": [0.3953, 0.4563, 0.4049, 0.4712]}, {"w": "most", "b": [0.4119, 0.4562, 0.4517, 0.4713]}, {"w": "likely", "b": [0.4581, 0.4562, 0.5015, 0.4713]}, {"w": "predictions", "b": [0.5079, 0.4562, 0.598, 0.4713]}, {"w": "for", "b": [0.6044, 0.4562, 0.6269, 0.4713]}, {"w": "a", "b": [0.6333, 0.4562, 0.6427, 0.4713]}, {"w": "masked", "b": [0.6491, 0.4562, 0.7099, 0.4713]}, {"w": "word", "b": [0.7163, 0.4562, 0.7566, 0.4713]}, {"w": "and", "b": [0.763, 0.4562, 0.7933, 0.4713]}, {"w": "then", "b": [0.7997, 0.4562, 0.8363, 0.4713]}, {"w": "use", "b": [0.8427, 0.4562, 0.869, 0.4713]}, {"w": "them", "b": [0.1312, 0.4743, 0.1722, 0.4892]}, {"w": "as", "b": [0.1784, 0.4743, 0.1949, 0.4892]}, {"w": "synonyms", "b": [0.2011, 0.4743, 0.2797, 0.4892]}, {"w": "for", "b": [0.2859, 0.4743, 0.308, 0.4892]}, {"w": "data", "b": [0.3141, 0.4743, 0.35, 0.4892]}, {"w": "augmentation.", "b": [0.3561, 0.4743, 0.4715, 0.4892]}]}, {"id": "b_7", "type": "paragraph", "text": "Similarly, if your problem is document classification, and you have a large corpus of unlabeled documents, but only a small corpus of labeled documents, you can do as follows. First, build document embeddings for all documents in your large corpus. Use doc2vec or any other technique of document embedding. Then, for each labeled document d in your dataset, find k closest unlabeled documents in the document embedding space and label them with the same label as d. Again, tune k on the validation data.", "words": [{"w": "Similarly,", "b": [0.1312, 0.5013, 0.2056, 0.5161]}, {"w": "if", "b": [0.2112, 0.5013, 0.2218, 0.5161]}, {"w": "your", "b": [0.2273, 0.5013, 0.2625, 0.5161]}, {"w": "problem", "b": [0.268, 0.5013, 0.3323, 0.5161]}, {"w": "is", "b": [0.3378, 0.5013, 0.35, 0.5161]}, {"w": "document", "b": [0.3554, 0.5013, 0.4328, 0.5161]}, {"w": "classification,", "b": [0.4383, 0.5013, 0.543, 0.5161]}, {"w": "and", "b": [0.5487, 0.5013, 0.5778, 0.5161]}, {"w": "you", "b": [0.5833, 0.5013, 0.6114, 0.5161]}, {"w": "have", "b": [0.6169, 0.5013, 0.6526, 0.5161]}, {"w": "a", "b": [0.658, 0.5013, 0.6671, 0.5161]}, {"w": "large", "b": [0.6726, 0.5013, 0.7108, 0.5161]}, {"w": "corpus", "b": [0.7163, 0.5013, 0.7677, 0.5161]}, {"w": "of", "b": [0.7732, 0.5013, 0.7877, 0.5161]}, {"w": "unlabeled", "b": [0.7932, 0.5013, 0.8691, 0.5161]}, {"w": "documents,", "b": [0.1312, 0.5192, 0.2208, 0.534]}, {"w": "but", "b": [0.2269, 0.5192, 0.254, 0.534]}, {"w": "only", "b": [0.2601, 0.5192, 0.2938, 0.534]}, {"w": "a", "b": [0.2999, 0.5192, 0.3089, 0.534]}, {"w": "small", "b": [0.315, 0.5192, 0.3563, 0.534]}, {"w": "corpus", "b": [0.3624, 0.5192, 0.4138, 0.534]}, {"w": "of", "b": [0.42, 0.5192, 0.4345, 0.534]}, {"w": "labeled", "b": [0.4406, 0.5192, 0.4964, 0.534]}, {"w": "documents,", "b": [0.5025, 0.5192, 0.5921, 0.534]}, {"w": "you", "b": [0.5982, 0.5192, 0.6263, 0.534]}, {"w": "can", "b": [0.6324, 0.5192, 0.6595, 0.534]}, {"w": "do", "b": [0.6657, 0.5192, 0.6847, 0.534]}, {"w": "as", "b": [0.6908, 0.5192, 0.707, 0.534]}, {"w": "follows.", "b": [0.7131, 0.5192, 0.7715, 0.534]}, {"w": "First,", "b": [0.7797, 0.5192, 0.8228, 0.534]}, {"w": "build", "b": [0.8289, 0.5192, 0.8691, 0.534]}, {"w": "document", "b": [0.1312, 0.5369, 0.2118, 0.5521]}, {"w": "embeddings", "b": [0.2183, 0.5369, 0.3147, 0.5521]}, {"w": "for", "b": [0.3213, 0.5369, 0.3438, 0.5521]}, {"w": "all", "b": [0.3504, 0.5369, 0.3702, 0.5521]}, {"w": "documents", "b": [0.3768, 0.5369, 0.4648, 0.5521]}, {"w": "in", "b": [0.4714, 0.5369, 0.487, 0.5521]}, {"w": "your", "b": [0.4936, 0.5369, 0.5303, 0.5521]}, {"w": "large", "b": [0.5369, 0.5369, 0.5767, 0.5521]}, {"w": "corpus.", "b": [0.5832, 0.5369, 0.642, 0.5521]}, {"w": "Use", "b": [0.6514, 0.5369, 0.6814, 0.5521]}, {"w": "doc2vec", "b": [0.6877, 0.5371, 0.7604, 0.552]}, {"w": "or", "b": [0.767, 0.5369, 0.7838, 0.5521]}, {"w": "any", "b": [0.7904, 0.5369, 0.8197, 0.5521]}, {"w": "other", "b": [0.8262, 0.5369, 0.8692, 0.5521]}, {"w": "technique", "b": [0.1312, 0.555, 0.2078, 0.57]}, {"w": "of", "b": [0.2139, 0.555, 0.2287, 0.57]}, {"w": "document", "b": [0.2349, 0.555, 0.3135, 0.57]}, {"w": "embedding.", "b": [0.3196, 0.555, 0.4115, 0.57]}, {"w": "Then,", "b": [0.4197, 0.555, 0.4666, 0.57]}, {"w": "for", "b": [0.4728, 0.555, 0.4948, 0.57]}, {"w": "each", "b": [0.5009, 0.555, 0.5362, 0.57]}, {"w": "labeled", "b": [0.5423, 0.555, 0.599, 0.57]}, {"w": "document", "b": [0.6051, 0.555, 0.6837, 0.57]}, {"w": "d", "b": [0.6895, 0.555, 0.6992, 0.5699]}, {"w": "in", "b": [0.7053, 0.555, 0.7206, 0.57]}, {"w": "your", "b": [0.7268, 0.555, 0.7625, 0.57]}, {"w": "dataset,", "b": [0.7687, 0.555, 0.8321, 0.57]}, {"w": "find", "b": [0.8382, 0.555, 0.8689, 0.57]}, {"w": "k", "b": [0.1312, 0.5729, 0.1408, 0.5879]}, {"w": "closest", "b": [0.1476, 0.5729, 0.201, 0.5879]}, {"w": "unlabeled", "b": [0.2071, 0.5729, 0.2858, 0.5879]}, {"w": "documents", "b": [0.292, 0.5729, 0.3796, 0.5879]}, {"w": "in", "b": [0.3858, 0.5729, 0.4014, 0.5879]}, {"w": "the", "b": [0.4076, 0.5729, 0.4336, 0.5879]}, {"w": "document", "b": [0.4398, 0.5729, 0.52, 0.5879]}, {"w": "embedding", "b": [0.5262, 0.5729, 0.6148, 0.5879]}, {"w": "space", "b": [0.6209, 0.5729, 0.6648, 0.5879]}, {"w": "and", "b": [0.671, 0.5729, 0.7012, 0.5879]}, {"w": "label", "b": [0.7074, 0.5729, 0.7464, 0.5879]}, {"w": "them", "b": [0.7526, 0.5729, 0.7943, 0.5879]}, {"w": "with", "b": [0.8005, 0.5729, 0.8369, 0.5879]}, {"w": "the", "b": [0.8431, 0.5729, 0.8691, 0.5879]}, {"w": "same", "b": [0.1312, 0.5909, 0.1713, 0.6059]}, {"w": "label", "b": [0.1775, 0.5909, 0.2159, 0.6059]}, {"w": "as", "b": [0.2221, 0.5909, 0.2386, 0.6059]}, {"w": "d.", "b": [0.2447, 0.5909, 0.2594, 0.6059]}, {"w": "Again,", "b": [0.2676, 0.5909, 0.3204, 0.6059]}, {"w": "tune", "b": [0.3266, 0.5909, 0.3625, 0.6059]}, {"w": "k", "b": [0.3686, 0.5909, 0.3782, 0.6058]}, {"w": "on", "b": [0.3849, 0.5909, 0.4044, 0.6059]}, {"w": "the", "b": [0.4105, 0.5909, 0.4362, 0.6059]}, {"w": "validation", "b": [0.4423, 0.5909, 0.5218, 0.6059]}, {"w": "data.", "b": [0.528, 0.5909, 0.569, 0.6059]}]}, {"id": "b_8", "type": "paragraph", "text": "Another useful text data augmentation technique is back translation. To create a new example from a text written in English (it can be a sentence or a document), first translate it into another language l using a machine translation system. Then translate it back from l into English. If the text obtained through back translation is different from the original text, you add it to the dataset by assigning the same label as the original text.", "words": [{"w": "Another", "b": [0.1305, 0.6177, 0.1981, 0.6328]}, {"w": "useful", "b": [0.2052, 0.6177, 0.2529, 0.6328]}, {"w": "text", "b": [0.26, 0.6177, 0.293, 0.6328]}, {"w": "data", "b": [0.3001, 0.6177, 0.3367, 0.6328]}, {"w": "augmentation", "b": [0.3438, 0.6177, 0.4563, 0.6328]}, {"w": "technique", "b": [0.4634, 0.6177, 0.5419, 0.6328]}, {"w": "is", "b": [0.549, 0.6177, 0.5617, 0.6328]}, {"w": "back", "b": [0.5686, 0.6178, 0.6107, 0.6328]}, {"w": "translation.", "b": [0.6189, 0.6177, 0.7244, 0.6328]}, {"w": "To", "b": [0.7356, 0.6177, 0.757, 0.6328]}, {"w": "create", "b": [0.7642, 0.6177, 0.8134, 0.6328]}, {"w": "a", "b": [0.8205, 0.6177, 0.8299, 0.6328]}, {"w": "new", "b": [0.8371, 0.6177, 0.8695, 0.6328]}, {"w": "example", "b": [0.1312, 0.6358, 0.1972, 0.6507]}, {"w": "from", "b": [0.2033, 0.6358, 0.2407, 0.6507]}, {"w": "a", "b": [0.2468, 0.6358, 0.256, 0.6507]}, {"w": "text", "b": [0.2622, 0.6358, 0.2944, 0.6507]}, {"w": "written", "b": [0.3005, 0.6358, 0.3589, 0.6507]}, {"w": "in", "b": [0.365, 0.6358, 0.3804, 0.6507]}, {"w": "English", "b": [0.3865, 0.6358, 0.4462, 0.6507]}, {"w": "(it", "b": [0.4523, 0.6358, 0.4718, 0.6507]}, {"w": "can", "b": [0.4779, 0.6358, 0.5055, 0.6507]}, {"w": "be", "b": [0.5117, 0.6358, 0.5306, 0.6507]}, {"w": "a", "b": [0.5367, 0.6358, 0.5459, 0.6507]}, {"w": "sentence", "b": [0.5521, 0.6358, 0.6192, 0.6507]}, {"w": "or", "b": [0.6253, 0.6358, 0.6418, 0.6507]}, {"w": "a", "b": [0.6479, 0.6358, 0.6571, 0.6507]}, {"w": "document),", "b": [0.6633, 0.6358, 0.7542, 0.6507]}, {"w": "first", "b": [0.7604, 0.6358, 0.7923, 0.6507]}, {"w": "translate", "b": [0.7984, 0.6358, 0.8691, 0.6507]}, {"w": "it", "b": [0.1312, 0.6538, 0.1434, 0.6687]}, {"w": "into", "b": [0.1495, 0.6538, 0.1803, 0.6687]}, {"w": "another", "b": [0.1865, 0.6538, 0.2472, 0.6687]}, {"w": "language", "b": [0.2534, 0.6538, 0.3232, 0.6687]}, {"w": "l", "b": [0.3292, 0.6537, 0.3347, 0.6687]}, {"w": "using", "b": [0.3413, 0.6538, 0.3828, 0.6687]}, {"w": "a", "b": [0.389, 0.6538, 0.3981, 0.6687]}, {"w": "machine", "b": [0.4042, 0.6538, 0.4695, 0.6687]}, {"w": "translation", "b": [0.4756, 0.6538, 0.5617, 0.6687]}, {"w": "system.", "b": [0.5679, 0.6538, 0.6272, 0.6687]}, {"w": "Then", "b": [0.6355, 0.6538, 0.6769, 0.6687]}, {"w": "translate", "b": [0.6831, 0.6538, 0.753, 0.6687]}, {"w": "it", "b": [0.7592, 0.6538, 0.7713, 0.6687]}, {"w": "back", "b": [0.7775, 0.6538, 0.8139, 0.6687]}, {"w": "from", "b": [0.82, 0.6538, 0.857, 0.6687]}, {"w": "l", "b": [0.8629, 0.6537, 0.8684, 0.6687]}, {"w": "into", "b": [0.1312, 0.6718, 0.1619, 0.6866]}, {"w": "English.", "b": [0.1681, 0.6718, 0.2319, 0.6866]}, {"w": "If", "b": [0.2401, 0.6718, 0.2522, 0.6866]}, {"w": "the", "b": [0.2583, 0.6718, 0.2835, 0.6866]}, {"w": "text", "b": [0.2896, 0.6718, 0.3214, 0.6866]}, {"w": "obtained", "b": [0.3275, 0.6718, 0.396, 0.6866]}, {"w": "through", "b": [0.4021, 0.6718, 0.4646, 0.6866]}, {"w": "back", "b": [0.4708, 0.6718, 0.507, 0.6866]}, {"w": "translation", "b": [0.5132, 0.6718, 0.5989, 0.6866]}, {"w": "is", "b": [0.6051, 0.6718, 0.6172, 0.6866]}, {"w": "different", "b": [0.6234, 0.6718, 0.6889, 0.6866]}, {"w": "from", "b": [0.695, 0.6718, 0.7318, 0.6866]}, {"w": "the", "b": [0.738, 0.6718, 0.7632, 0.6866]}, {"w": "original", "b": [0.7693, 0.6718, 0.8288, 0.6866]}, {"w": "text,", "b": [0.8349, 0.6718, 0.8717, 0.6866]}, {"w": "you", "b": [0.1308, 0.6896, 0.1595, 0.7046]}, {"w": "add", "b": [0.1656, 0.6896, 0.1953, 0.7046]}, {"w": "it", "b": [0.2015, 0.6896, 0.2138, 0.7046]}, {"w": "to", "b": [0.22, 0.6896, 0.2364, 0.7046]}, {"w": "the", "b": [0.2425, 0.6896, 0.2681, 0.7046]}, {"w": "dataset", "b": [0.2743, 0.6896, 0.3329, 0.7046]}, {"w": "by", "b": [0.339, 0.6896, 0.3585, 0.7046]}, {"w": "assigning", "b": [0.3646, 0.6896, 0.4377, 0.7046]}, {"w": "the", "b": [0.4438, 0.6896, 0.4694, 0.7046]}, {"w": "same", "b": [0.4756, 0.6896, 0.5157, 0.7046]}, {"w": "label", "b": [0.5218, 0.6896, 0.5603, 0.7046]}, {"w": "as", "b": [0.5665, 0.6896, 0.583, 0.7046]}, {"w": "the", "b": [0.5891, 0.6896, 0.6148, 0.7046]}, {"w": "original", "b": [0.6209, 0.6896, 0.6814, 0.7046]}, {"w": "text.", "b": [0.6876, 0.6896, 0.725, 0.7046]}]}, {"id": "b_9", "type": "paragraph", "text": "There are also data augmentation techniques for other data types, such as audio and video: addition of noise, shifting an audio or a video clip in time, slowing it down or accelerating, changing pitch for audio and color balance for video, to name a few. Describing these techniques in detail is out of the scope of this book. You should just be aware that data augmentation can be applied to any media data, and not only images and text.", "words": [{"w": "There", "b": [0.1306, 0.7165, 0.1778, 0.7315]}, {"w": "are", "b": [0.184, 0.7165, 0.2087, 0.7315]}, {"w": "also", "b": [0.2148, 0.7165, 0.2457, 0.7315]}, {"w": "data", "b": [0.2518, 0.7165, 0.2878, 0.7315]}, {"w": "augmentation", "b": [0.2939, 0.7165, 0.4042, 0.7315]}, {"w": "techniques", "b": [0.4104, 0.7165, 0.4947, 0.7315]}, {"w": "for", "b": [0.5008, 0.7165, 0.523, 0.7315]}, {"w": "other", "b": [0.5291, 0.7165, 0.5712, 0.7315]}, {"w": "data", "b": [0.5774, 0.7165, 0.6133, 0.7315]}, {"w": "types,", "b": [0.6194, 0.7165, 0.6673, 0.7315]}, {"w": "such", "b": [0.6734, 0.7165, 0.709, 0.7315]}, {"w": "as", "b": [0.7151, 0.7165, 0.7316, 0.7315]}, {"w": "audio", "b": [0.7377, 0.7165, 0.7819, 0.7315]}, {"w": "and", "b": [0.788, 0.7165, 0.8178, 0.7315]}, {"w": "video:", "b": [0.8239, 0.7165, 0.8717, 0.7315]}, {"w": "addition", "b": [0.1312, 0.7344, 0.1987, 0.7495]}, {"w": "of", "b": [0.2048, 0.7344, 0.2199, 0.7495]}, {"w": "noise,", "b": [0.226, 0.7344, 0.2718, 0.7495]}, {"w": "shifting", "b": [0.2779, 0.7344, 0.3387, 0.7495]}, {"w": "an", "b": [0.3449, 0.7344, 0.3646, 0.7495]}, {"w": "audio", "b": [0.3707, 0.7344, 0.4153, 0.7495]}, {"w": "or", "b": [0.4215, 0.7344, 0.4381, 0.7495]}, {"w": "a", "b": [0.4442, 0.7344, 0.4536, 0.7495]}, {"w": "video", "b": [0.4597, 0.7344, 0.5028, 0.7495]}, {"w": "clip", "b": [0.5089, 0.7344, 0.538, 0.7495]}, {"w": "in", "b": [0.5441, 0.7344, 0.5597, 0.7495]}, {"w": "time,", "b": [0.5658, 0.7344, 0.6073, 0.7495]}, {"w": "slowing", "b": [0.6134, 0.7344, 0.6732, 0.7495]}, {"w": "it", "b": [0.6793, 0.7344, 0.6918, 0.7495]}, {"w": "down", "b": [0.6979, 0.7344, 0.741, 0.7495]}, {"w": "or", "b": [0.7471, 0.7344, 0.7638, 0.7495]}, {"w": "accelerating,", "b": [0.7699, 0.7344, 0.8717, 0.7495]}, {"w": "changing", "b": [0.1312, 0.7523, 0.2039, 0.7674]}, {"w": "pitch", "b": [0.2122, 0.7523, 0.2535, 0.7674]}, {"w": "for", "b": [0.2617, 0.7523, 0.2842, 0.7674]}, {"w": "audio", "b": [0.2924, 0.7523, 0.3374, 0.7674]}, {"w": "and", "b": [0.3456, 0.7523, 0.3759, 0.7674]}, {"w": "color", "b": [0.3842, 0.7523, 0.424, 0.7674]}, {"w": "balance", "b": [0.4322, 0.7523, 0.4939, 0.7674]}, {"w": "for", "b": [0.5021, 0.7523, 0.5246, 0.7674]}, {"w": "video,", "b": [0.5328, 0.7523, 0.5815, 0.7674]}, {"w": "to", "b": [0.5902, 0.7523, 0.6069, 0.7674]}, {"w": "name", "b": [0.6151, 0.7523, 0.6591, 0.7674]}, {"w": "a", "b": [0.6673, 0.7523, 0.6767, 0.7674]}, {"w": "few.", "b": [0.6849, 0.7523, 0.7178, 0.7674]}, {"w": "Describing", "b": [0.7322, 0.7523, 0.8189, 0.7674]}, {"w": "these", "b": [0.8272, 0.7523, 0.8691, 0.7674]}, {"w": "techniques", "b": [0.1312, 0.7703, 0.2171, 0.7854]}, {"w": "in", "b": [0.224, 0.7703, 0.2396, 0.7854]}, {"w": "detail", "b": [0.2464, 0.7703, 0.2925, 0.7854]}, {"w": "is", "b": [0.2993, 0.7703, 0.3119, 0.7854]}, {"w": "out", "b": [0.3187, 0.7703, 0.3459, 0.7854]}, {"w": "of", "b": [0.3527, 0.7703, 0.3679, 0.7854]}, {"w": "the", "b": [0.3747, 0.7703, 0.4008, 0.7854]}, {"w": "scope", "b": [0.4077, 0.7703, 0.4522, 0.7854]}, {"w": "of", "b": [0.459, 0.7703, 0.4742, 0.7854]}, {"w": "this", "b": [0.481, 0.7703, 0.5114, 0.7854]}, {"w": "book.", "b": [0.5182, 0.7703, 0.5637, 0.7854]}, {"w": "You", "b": [0.5739, 0.7703, 0.6063, 0.7854]}, {"w": "should", "b": [0.6131, 0.7703, 0.6666, 0.7854]}, {"w": "just", "b": [0.6733, 0.7703, 0.7043, 0.7854]}, {"w": "be", "b": [0.7111, 0.7703, 0.7305, 0.7854]}, {"w": "aware", "b": [0.7373, 0.7703, 0.7844, 0.7854]}, {"w": "that", "b": [0.7912, 0.7703, 0.8257, 0.7854]}, {"w": "data", "b": [0.8325, 0.7703, 0.8691, 0.7854]}, {"w": "augmentation", "b": [0.1312, 0.7883, 0.2414, 0.8033]}, {"w": "can", "b": [0.2476, 0.7883, 0.2753, 0.8033]}, {"w": "be", "b": [0.2814, 0.7883, 0.3004, 0.8033]}, {"w": "applied", "b": [0.3066, 0.7883, 0.365, 0.8033]}, {"w": "to", "b": [0.3712, 0.7883, 0.3876, 0.8033]}, {"w": "any", "b": [0.3937, 0.7883, 0.4224, 0.8033]}, {"w": "media", "b": [0.4286, 0.7883, 0.4768, 0.8033]}, {"w": "data,", "b": [0.4829, 0.7883, 0.5239, 0.8033]}, {"w": "and", "b": [0.5301, 0.7883, 0.5598, 0.8033]}, {"w": "not", "b": [0.566, 0.7883, 0.5926, 0.8033]}, {"w": "only", "b": [0.5988, 0.7883, 0.6331, 0.8033]}, {"w": "images", "b": [0.6393, 0.7883, 0.6937, 0.8033]}, {"w": "and", "b": [0.6999, 0.7883, 0.7296, 0.8033]}, {"w": "text.", "b": [0.7358, 0.7883, 0.7732, 0.8033]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 33", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "33", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 77, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3.9 Dealing With Imbalanced Data", "words": [{"w": "3.9", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Dealing", "b": [0.188, 0.0861, 0.2707, 0.104]}, {"w": "With", "b": [0.279, 0.0861, 0.3352, 0.104]}, {"w": "Imbalanced", "b": [0.3435, 0.0861, 0.4679, 0.104]}, {"w": "Data", "b": [0.4763, 0.0861, 0.5293, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "Class imbalance is a condition in the data that can significantly affect the performance of the model, independently of the chosen learning algorithm. The problem is a very uneven distribution of labels in the training data.", "words": [{"w": "Class", "b": [0.1312, 0.125, 0.1795, 0.1399]}, {"w": "imbalance", "b": [0.1866, 0.125, 0.2788, 0.1399]}, {"w": "is", "b": [0.2849, 0.125, 0.2972, 0.1399]}, {"w": "a", "b": [0.3034, 0.125, 0.3125, 0.1399]}, {"w": "condition", "b": [0.3186, 0.125, 0.3928, 0.1399]}, {"w": "in", "b": [0.399, 0.125, 0.4142, 0.1399]}, {"w": "the", "b": [0.4204, 0.125, 0.4458, 0.1399]}, {"w": "data", "b": [0.4519, 0.125, 0.4875, 0.1399]}, {"w": "that", "b": [0.4936, 0.125, 0.5271, 0.1399]}, {"w": "can", "b": [0.5333, 0.125, 0.5607, 0.1399]}, {"w": "significantly", "b": [0.5668, 0.125, 0.6625, 0.1399]}, {"w": "affect", "b": [0.6686, 0.125, 0.7118, 0.1399]}, {"w": "the", "b": [0.7179, 0.125, 0.7433, 0.1399]}, {"w": "performance", "b": [0.7495, 0.125, 0.8482, 0.1399]}, {"w": "of", "b": [0.8543, 0.125, 0.869, 0.1399]}, {"w": "the", "b": [0.1312, 0.1428, 0.1574, 0.1579]}, {"w": "model,", "b": [0.1635, 0.1428, 0.2183, 0.1579]}, {"w": "independently", "b": [0.2245, 0.1428, 0.34, 0.1579]}, {"w": "of", "b": [0.3461, 0.1428, 0.3612, 0.1579]}, {"w": "the", "b": [0.3674, 0.1428, 0.3935, 0.1579]}, {"w": "chosen", "b": [0.3996, 0.1428, 0.4536, 0.1579]}, {"w": "learning", "b": [0.4597, 0.1428, 0.5256, 0.1579]}, {"w": "algorithm.", "b": [0.5317, 0.1428, 0.6164, 0.1579]}, {"w": "The", "b": [0.6246, 0.1428, 0.657, 0.1579]}, {"w": "problem", "b": [0.6631, 0.1428, 0.73, 0.1579]}, {"w": "is", "b": [0.7361, 0.1428, 0.7488, 0.1579]}, {"w": "a", "b": [0.7549, 0.1428, 0.7643, 0.1579]}, {"w": "very", "b": [0.7704, 0.1428, 0.8055, 0.1579]}, {"w": "uneven", "b": [0.8116, 0.1428, 0.8691, 0.1579]}, {"w": "distribution", "b": [0.1312, 0.1609, 0.2257, 0.1758]}, {"w": "of", "b": [0.2319, 0.1609, 0.2468, 0.1758]}, {"w": "labels", "b": [0.2529, 0.1609, 0.2987, 0.1758]}, {"w": "in", "b": [0.3048, 0.1609, 0.3202, 0.1758]}, {"w": "the", "b": [0.3263, 0.1609, 0.352, 0.1758]}, {"w": "training", "b": [0.3581, 0.1609, 0.4218, 0.1758]}, {"w": "data.", "b": [0.4279, 0.1609, 0.4689, 0.1758]}]}, {"id": "b_2", "type": "paragraph", "text": "This is the case, for example, when your classifier has to distinguish between genuine and fraudulent e-commerce transactions: the examples of genuine transactions are much more frequent. Typically, a machine learning algorithm tries to classify most training examples correctly. The algorithm is pushed to do so because it needs to minimize a cost function that typically assigns a positive loss value to each misclassified example. If the loss is the same for the misclassification of a minority class example as it is for the misclassification of a majority class, then it’s very likely that the learning algorithm decides to “give up” on many minority class examples in order to make fewer mistakes in the majority class.", "words": [{"w": "This", "b": [0.1306, 0.1877, 0.1673, 0.2028]}, {"w": "is", "b": [0.1735, 0.1877, 0.1862, 0.2028]}, {"w": "the", "b": [0.1925, 0.1877, 0.2187, 0.2028]}, {"w": "case,", "b": [0.2249, 0.1877, 0.2637, 0.2028]}, {"w": "for", "b": [0.2701, 0.1877, 0.2926, 0.2028]}, {"w": "example,", "b": [0.2989, 0.1877, 0.3716, 0.2028]}, {"w": "when", "b": [0.3779, 0.1877, 0.4208, 0.2028]}, {"w": "your", "b": [0.427, 0.1877, 0.4637, 0.2028]}, {"w": "classifier", "b": [0.47, 0.1877, 0.5393, 0.2028]}, {"w": "has", "b": [0.5456, 0.1877, 0.5729, 0.2028]}, {"w": "to", "b": [0.5792, 0.1877, 0.5959, 0.2028]}, {"w": "distinguish", "b": [0.6022, 0.1877, 0.6913, 0.2028]}, {"w": "between", "b": [0.6976, 0.1877, 0.764, 0.2028]}, {"w": "genuine", "b": [0.7703, 0.1877, 0.8326, 0.2028]}, {"w": "and", "b": [0.8388, 0.1877, 0.8692, 0.2028]}, {"w": "fraudulent", "b": [0.1312, 0.2056, 0.216, 0.2207]}, {"w": "e-commerce", "b": [0.2222, 0.2056, 0.3185, 0.2207]}, {"w": "transactions:", "b": [0.3247, 0.2056, 0.4295, 0.2207]}, {"w": "the", "b": [0.4378, 0.2056, 0.464, 0.2207]}, {"w": "examples", "b": [0.4701, 0.2056, 0.545, 0.2207]}, {"w": "of", "b": [0.5512, 0.2056, 0.5664, 0.2207]}, {"w": "genuine", "b": [0.5726, 0.2056, 0.6348, 0.2207]}, {"w": "transactions", "b": [0.641, 0.2056, 0.7406, 0.2207]}, {"w": "are", "b": [0.7468, 0.2056, 0.772, 0.2207]}, {"w": "much", "b": [0.7782, 0.2056, 0.8221, 0.2207]}, {"w": "more", "b": [0.8283, 0.2056, 0.8691, 0.2207]}, {"w": "frequent.", "b": [0.1312, 0.2236, 0.204, 0.2387]}, {"w": "Typically,", "b": [0.2126, 0.2236, 0.2931, 0.2387]}, {"w": "a", "b": [0.2994, 0.2236, 0.3088, 0.2387]}, {"w": "machine", "b": [0.3151, 0.2236, 0.3826, 0.2387]}, {"w": "learning", "b": [0.3889, 0.2236, 0.4548, 0.2387]}, {"w": "algorithm", "b": [0.4611, 0.2236, 0.5406, 0.2387]}, {"w": "tries", "b": [0.5469, 0.2236, 0.5826, 0.2387]}, {"w": "to", "b": [0.5889, 0.2236, 0.6056, 0.2387]}, {"w": "classify", "b": [0.6119, 0.2236, 0.6707, 0.2387]}, {"w": "most", "b": [0.6769, 0.2236, 0.7168, 0.2387]}, {"w": "training", "b": [0.723, 0.2236, 0.7879, 0.2387]}, {"w": "examples", "b": [0.7942, 0.2236, 0.8691, 0.2387]}, {"w": "correctly.", "b": [0.1312, 0.2415, 0.2063, 0.2566]}, {"w": "The", "b": [0.2145, 0.2415, 0.2468, 0.2566]}, {"w": "algorithm", "b": [0.2529, 0.2415, 0.332, 0.2566]}, {"w": "is", "b": [0.3382, 0.2415, 0.3508, 0.2566]}, {"w": "pushed", "b": [0.3569, 0.2415, 0.4143, 0.2566]}, {"w": "to", "b": [0.4204, 0.2415, 0.437, 0.2566]}, {"w": "do", "b": [0.4432, 0.2415, 0.463, 0.2566]}, {"w": "so", "b": [0.4691, 0.2415, 0.4858, 0.2566]}, {"w": "because", "b": [0.492, 0.2415, 0.5551, 0.2566]}, {"w": "it", "b": [0.5612, 0.2415, 0.5737, 0.2566]}, {"w": "needs", "b": [0.5798, 0.2415, 0.6247, 0.2566]}, {"w": "to", "b": [0.6308, 0.2415, 0.6475, 0.2566]}, {"w": "minimize", "b": [0.6536, 0.2415, 0.7275, 0.2566]}, {"w": "a", "b": [0.7336, 0.2415, 0.743, 0.2566]}, {"w": "cost", "b": [0.749, 0.2416, 0.7857, 0.2566]}, {"w": "function", "b": [0.7927, 0.2416, 0.8688, 0.2566]}, {"w": "that", "b": [0.1312, 0.2595, 0.1657, 0.2746]}, {"w": "typically", "b": [0.1721, 0.2595, 0.2427, 0.2746]}, {"w": "assigns", "b": [0.2491, 0.2595, 0.3059, 0.2746]}, {"w": "a", "b": [0.3123, 0.2595, 0.3217, 0.2746]}, {"w": "positive", "b": [0.3281, 0.2595, 0.3914, 0.2746]}, {"w": "loss", "b": [0.3978, 0.2595, 0.4273, 0.2746]}, {"w": "value", "b": [0.4337, 0.2595, 0.4761, 0.2746]}, {"w": "to", "b": [0.4824, 0.2595, 0.4992, 0.2746]}, {"w": "each", "b": [0.5055, 0.2595, 0.5416, 0.2746]}, {"w": "misclassified", "b": [0.548, 0.2595, 0.6488, 0.2746]}, {"w": "example.", "b": [0.6551, 0.2595, 0.7278, 0.2746]}, {"w": "If", "b": [0.7367, 0.2595, 0.7492, 0.2746]}, {"w": "the", "b": [0.7556, 0.2595, 0.7817, 0.2746]}, {"w": "loss", "b": [0.7881, 0.2595, 0.8176, 0.2746]}, {"w": "is", "b": [0.824, 0.2595, 0.8366, 0.2746]}, {"w": "the", "b": [0.843, 0.2595, 0.8692, 0.2746]}, {"w": "same", "b": [0.1312, 0.2776, 0.1705, 0.2924]}, {"w": "for", "b": [0.1765, 0.2776, 0.1981, 0.2924]}, {"w": "the", "b": [0.204, 0.2776, 0.2292, 0.2924]}, {"w": "misclassification", "b": [0.2351, 0.2776, 0.362, 0.2924]}, {"w": "of", "b": [0.368, 0.2776, 0.3825, 0.2924]}, {"w": "a", "b": [0.3885, 0.2776, 0.3975, 0.2924]}, {"w": "minority", "b": [0.4034, 0.2776, 0.4708, 0.2924]}, {"w": "class", "b": [0.4767, 0.2776, 0.5131, 0.2924]}, {"w": "example", "b": [0.5191, 0.2776, 0.5839, 0.2924]}, {"w": "as", "b": [0.5898, 0.2776, 0.606, 0.2924]}, {"w": "it", "b": [0.6119, 0.2776, 0.624, 0.2924]}, {"w": "is", "b": [0.6299, 0.2776, 0.6421, 0.2924]}, {"w": "for", "b": [0.648, 0.2776, 0.6697, 0.2924]}, {"w": "the", "b": [0.6756, 0.2776, 0.7008, 0.2924]}, {"w": "misclassification", "b": [0.7067, 0.2776, 0.8336, 0.2924]}, {"w": "of", "b": [0.8395, 0.2776, 0.8541, 0.2924]}, {"w": "a", "b": [0.8601, 0.2776, 0.8691, 0.2924]}, {"w": "majority", "b": [0.1312, 0.2956, 0.1987, 0.3104]}, {"w": "class,", "b": [0.2049, 0.2956, 0.2464, 0.3104]}, {"w": "then", "b": [0.2526, 0.2956, 0.2878, 0.3104]}, {"w": "it’s", "b": [0.294, 0.2956, 0.3183, 0.3104]}, {"w": "very", "b": [0.3244, 0.2956, 0.3582, 0.3104]}, {"w": "likely", "b": [0.3644, 0.2956, 0.4062, 0.3104]}, {"w": "that", "b": [0.4123, 0.2956, 0.4456, 0.3104]}, {"w": "the", "b": [0.4517, 0.2956, 0.4769, 0.3104]}, {"w": "learning", "b": [0.4831, 0.2956, 0.5466, 0.3104]}, {"w": "algorithm", "b": [0.5527, 0.2956, 0.6293, 0.3104]}, {"w": "decides", "b": [0.6355, 0.2956, 0.692, 0.3104]}, {"w": "to", "b": [0.6981, 0.2956, 0.7142, 0.3104]}, {"w": "“give", "b": [0.7204, 0.2956, 0.7602, 0.3104]}, {"w": "up”", "b": [0.7663, 0.2956, 0.795, 0.3104]}, {"w": "on", "b": [0.8012, 0.2956, 0.8203, 0.3104]}, {"w": "many", "b": [0.8265, 0.2956, 0.8698, 0.3104]}, {"w": "minority", "b": [0.1312, 0.3134, 0.2, 0.3284]}, {"w": "class", "b": [0.2061, 0.3134, 0.2433, 0.3284]}, {"w": "examples", "b": [0.2494, 0.3134, 0.3228, 0.3284]}, {"w": "in", "b": [0.329, 0.3134, 0.3444, 0.3284]}, {"w": "order", "b": [0.3505, 0.3134, 0.3927, 0.3284]}, {"w": "to", "b": [0.3988, 0.3134, 0.4152, 0.3284]}, {"w": "make", "b": [0.4214, 0.3134, 0.4634, 0.3284]}, {"w": "fewer", "b": [0.4696, 0.3134, 0.5117, 0.3284]}, {"w": "mistakes", "b": [0.5178, 0.3134, 0.5867, 0.3284]}, {"w": "in", "b": [0.5929, 0.3134, 0.6083, 0.3284]}, {"w": "the", "b": [0.6144, 0.3134, 0.64, 0.3284]}, {"w": "majority", "b": [0.6462, 0.3134, 0.7149, 0.3284]}, {"w": "class.", "b": [0.7211, 0.3134, 0.7633, 0.3284]}]}, {"id": "b_3", "type": "paragraph", "text": "While there is no formal definition of imbalanced data, consider the following rule of thumb.", "words": [{"w": "While", "b": [0.1303, 0.3405, 0.177, 0.3553]}, {"w": "there", "b": [0.1821, 0.3405, 0.2224, 0.3553]}, {"w": "is", "b": [0.2274, 0.3405, 0.2396, 0.3553]}, {"w": "no", "b": [0.2446, 0.3405, 0.2637, 0.3553]}, {"w": "formal", "b": [0.2688, 0.3405, 0.3196, 0.3553]}, {"w": "definition", "b": [0.3246, 0.3405, 0.399, 0.3553]}, {"w": "of", "b": [0.4041, 0.3405, 0.4186, 0.3553]}, {"w": "imbalanced", "b": [0.425, 0.3403, 0.5291, 0.3553]}, {"w": "data,", "b": [0.5349, 0.3403, 0.5809, 0.3553]}, {"w": "consider", "b": [0.5862, 0.3405, 0.6507, 0.3553]}, {"w": "the", "b": [0.6558, 0.3405, 0.6809, 0.3553]}, {"w": "following", "b": [0.686, 0.3405, 0.7563, 0.3553]}, {"w": "rule", "b": [0.7614, 0.3405, 0.7915, 0.3553]}, {"w": "of", "b": [0.7966, 0.3405, 0.8112, 0.3553]}, {"w": "thumb.", "b": [0.8162, 0.3405, 0.8725, 0.3553]}]}, {"id": "b_4", "type": "paragraph", "text": "If there are two classes, then balanced data would mean half of the dataset representing each class. A slight class imbalance is usually not a problem. So, if 60% examples belong to one class and 40% belong to the other, and you use a popular machine learning algorithm in its standard formulation, it should not cause any significant performance degradation. However, when the class imbalance is high, for example when 90% examples are of one class, and 10% are of the other, using the standard formulation of the learning algorithm that usually equally weights errors made in both classes may not be as effective and would need modification.", "words": [{"w": "If", "b": [0.1312, 0.3584, 0.1433, 0.3732]}, {"w": "there", "b": [0.1493, 0.3584, 0.1896, 0.3732]}, {"w": "are", "b": [0.1956, 0.3584, 0.2198, 0.3732]}, {"w": "two", "b": [0.2258, 0.3584, 0.2539, 0.3732]}, {"w": "classes,", "b": [0.26, 0.3584, 0.3166, 0.3732]}, {"w": "then", "b": [0.3226, 0.3584, 0.3578, 0.3732]}, {"w": "balanced", "b": [0.3638, 0.3584, 0.4332, 0.3732]}, {"w": "data", "b": [0.4392, 0.3584, 0.4744, 0.3732]}, {"w": "would", "b": [0.4804, 0.3584, 0.5271, 0.3732]}, {"w": "mean", "b": [0.5332, 0.3584, 0.5754, 0.3732]}, {"w": "half", "b": [0.5814, 0.3584, 0.611, 0.3732]}, {"w": "of", "b": [0.6171, 0.3584, 0.6316, 0.3732]}, {"w": "the", "b": [0.6377, 0.3584, 0.6628, 0.3732]}, {"w": "dataset", "b": [0.6688, 0.3584, 0.7262, 0.3732]}, {"w": "representing", "b": [0.7323, 0.3584, 0.8284, 0.3732]}, {"w": "each", "b": [0.8345, 0.3584, 0.8691, 0.3732]}, {"w": "class.", "b": [0.1312, 0.3762, 0.1737, 0.3912]}, {"w": "A", "b": [0.1819, 0.3762, 0.1957, 0.3912]}, {"w": "slight", "b": [0.2019, 0.3762, 0.2457, 0.3912]}, {"w": "class", "b": [0.2519, 0.3762, 0.2892, 0.3912]}, {"w": "imbalance", "b": [0.2953, 0.3762, 0.3761, 0.3912]}, {"w": "is", "b": [0.3823, 0.3762, 0.3947, 0.3912]}, {"w": "usually", "b": [0.4008, 0.3762, 0.4581, 0.3912]}, {"w": "not", "b": [0.4642, 0.3762, 0.491, 0.3912]}, {"w": "a", "b": [0.4971, 0.3762, 0.5064, 0.3912]}, {"w": "problem.", "b": [0.5125, 0.3762, 0.5836, 0.3912]}, {"w": "So,", "b": [0.5918, 0.3762, 0.6165, 0.3912]}, {"w": "if", "b": [0.6226, 0.3762, 0.6335, 0.3912]}, {"w": "60%", "b": [0.6394, 0.3762, 0.6733, 0.3912]}, {"w": "examples", "b": [0.6794, 0.3762, 0.7532, 0.3912]}, {"w": "belong", "b": [0.7593, 0.3762, 0.8123, 0.3912]}, {"w": "to", "b": [0.8184, 0.3762, 0.8349, 0.3912]}, {"w": "one", "b": [0.841, 0.3762, 0.8688, 0.3912]}, {"w": "class", "b": [0.1312, 0.3942, 0.1682, 0.4091]}, {"w": "and", "b": [0.1744, 0.3942, 0.204, 0.4091]}, {"w": "40%", "b": [0.2101, 0.3942, 0.2438, 0.4091]}, {"w": "belong", "b": [0.2499, 0.3942, 0.3025, 0.4091]}, {"w": "to", "b": [0.3087, 0.3942, 0.325, 0.4091]}, {"w": "the", "b": [0.3312, 0.3942, 0.3567, 0.4091]}, {"w": "other,", "b": [0.3628, 0.3942, 0.4099, 0.4091]}, {"w": "and", "b": [0.416, 0.3942, 0.4457, 0.4091]}, {"w": "you", "b": [0.4518, 0.3942, 0.4804, 0.4091]}, {"w": "use", "b": [0.4865, 0.3942, 0.5122, 0.4091]}, {"w": "a", "b": [0.5183, 0.3942, 0.5275, 0.4091]}, {"w": "popular", "b": [0.5337, 0.3942, 0.5955, 0.4091]}, {"w": "machine", "b": [0.6017, 0.3942, 0.6675, 0.4091]}, {"w": "learning", "b": [0.6737, 0.3942, 0.7381, 0.4091]}, {"w": "algorithm", "b": [0.7442, 0.3942, 0.8219, 0.4091]}, {"w": "in", "b": [0.8281, 0.3942, 0.8434, 0.4091]}, {"w": "its", "b": [0.8495, 0.3942, 0.869, 0.4091]}, {"w": "standard", "b": [0.1312, 0.4122, 0.201, 0.4271]}, {"w": "formulation,", "b": [0.2072, 0.4122, 0.3041, 0.4271]}, {"w": "it", "b": [0.3102, 0.4122, 0.3223, 0.4271]}, {"w": "should", "b": [0.3285, 0.4122, 0.3801, 0.4271]}, {"w": "not", "b": [0.3862, 0.4122, 0.4125, 0.4271]}, {"w": "cause", "b": [0.4186, 0.4122, 0.4611, 0.4271]}, {"w": "any", "b": [0.4673, 0.4122, 0.4955, 0.4271]}, {"w": "significant", "b": [0.5017, 0.4122, 0.582, 0.4271]}, {"w": "performance", "b": [0.5882, 0.4122, 0.6862, 0.4271]}, {"w": "degradation.", "b": [0.6923, 0.4122, 0.7913, 0.4271]}, {"w": "However,", "b": [0.7995, 0.4122, 0.8717, 0.4271]}, {"w": "when", "b": [0.1306, 0.4301, 0.1722, 0.445]}, {"w": "the", "b": [0.1783, 0.4301, 0.2036, 0.445]}, {"w": "class", "b": [0.2098, 0.4301, 0.2465, 0.445]}, {"w": "imbalance", "b": [0.2526, 0.4301, 0.3322, 0.445]}, {"w": "is", "b": [0.3384, 0.4301, 0.3507, 0.445]}, {"w": "high,", "b": [0.3568, 0.4301, 0.3963, 0.445]}, {"w": "for", "b": [0.4025, 0.4301, 0.4243, 0.445]}, {"w": "example", "b": [0.4305, 0.4301, 0.4959, 0.445]}, {"w": "when", "b": [0.502, 0.4301, 0.5436, 0.445]}, {"w": "90%", "b": [0.5495, 0.4301, 0.583, 0.445]}, {"w": "examples", "b": [0.5891, 0.4301, 0.6617, 0.445]}, {"w": "are", "b": [0.6679, 0.4301, 0.6922, 0.445]}, {"w": "of", "b": [0.6984, 0.4301, 0.7131, 0.445]}, {"w": "one", "b": [0.7192, 0.4301, 0.7466, 0.445]}, {"w": "class,", "b": [0.7527, 0.4301, 0.7945, 0.445]}, {"w": "and", "b": [0.8007, 0.4301, 0.8301, 0.445]}, {"w": "10%", "b": [0.8361, 0.4301, 0.8695, 0.445]}, {"w": "are", "b": [0.1312, 0.4481, 0.1554, 0.4629]}, {"w": "of", "b": [0.1608, 0.4481, 0.1754, 0.4629]}, {"w": "the", "b": [0.1808, 0.4481, 0.206, 0.4629]}, {"w": "other,", "b": [0.2114, 0.4481, 0.2577, 0.4629]}, {"w": "using", "b": [0.2633, 0.4481, 0.3046, 0.4629]}, {"w": "the", "b": [0.31, 0.4481, 0.3351, 0.4629]}, {"w": "standard", "b": [0.3406, 0.4481, 0.4101, 0.4629]}, {"w": "formulation", "b": [0.4155, 0.4481, 0.507, 0.4629]}, {"w": "of", "b": [0.5124, 0.4481, 0.527, 0.4629]}, {"w": "the", "b": [0.5324, 0.4481, 0.5575, 0.4629]}, {"w": "learning", "b": [0.563, 0.4481, 0.6263, 0.4629]}, {"w": "algorithm", "b": [0.6318, 0.4481, 0.7082, 0.4629]}, {"w": "that", "b": [0.7136, 0.4481, 0.7468, 0.4629]}, {"w": "usually", "b": [0.7522, 0.4481, 0.8081, 0.4629]}, {"w": "equally", "b": [0.8135, 0.4481, 0.8698, 0.4629]}, {"w": "weights", "b": [0.1306, 0.466, 0.1901, 0.4809]}, {"w": "errors", "b": [0.1963, 0.466, 0.2427, 0.4809]}, {"w": "made", "b": [0.2489, 0.466, 0.2919, 0.4809]}, {"w": "in", "b": [0.2981, 0.466, 0.3135, 0.4809]}, {"w": "both", "b": [0.3196, 0.466, 0.357, 0.4809]}, {"w": "classes", "b": [0.3632, 0.466, 0.4158, 0.4809]}, {"w": "may", "b": [0.422, 0.466, 0.4558, 0.4809]}, {"w": "not", "b": [0.4619, 0.466, 0.4886, 0.4809]}, {"w": "be", "b": [0.4947, 0.466, 0.5137, 0.4809]}, {"w": "as", "b": [0.5199, 0.466, 0.5364, 0.4809]}, {"w": "effective", "b": [0.5425, 0.466, 0.6077, 0.4809]}, {"w": "and", "b": [0.6138, 0.466, 0.6436, 0.4809]}, {"w": "would", "b": [0.6497, 0.466, 0.6974, 0.4809]}, {"w": "need", "b": [0.7035, 0.466, 0.7404, 0.4809]}, {"w": "modification.", "b": [0.7466, 0.466, 0.8517, 0.4809]}]}, {"id": "b_5", "type": "paragraph", "text": "3.9.1 Oversampling", "words": [{"w": "3.9.1", "b": [0.1312, 0.5138, 0.1749, 0.5288]}, {"w": "Oversampling", "b": [0.1961, 0.5138, 0.3235, 0.5288]}]}, {"id": "b_6", "type": "paragraph", "text": "A technique used frequently to mitigate class imbalance is oversampling. By making multi- ple copies of minority class examples, it increases their weight, as illustrated in Figure 15a. You might also create synthetic examples by sampling feature values of several examples of the minority class and combining them to obtain a new example of that class. Two popular algo- rithms that oversample the minority class by creating synthetic examples: Synthetic Minority Oversampling Technique (SMOTE) and Adaptive Synthetic Sampling Method (ADASYN).", "words": [{"w": "A", "b": [0.1305, 0.5505, 0.1441, 0.5653]}, {"w": "technique", "b": [0.1501, 0.5505, 0.2255, 0.5653]}, {"w": "used", "b": [0.2316, 0.5505, 0.2668, 0.5653]}, {"w": "frequently", "b": [0.2729, 0.5505, 0.3523, 0.5653]}, {"w": "to", "b": [0.3584, 0.5505, 0.3745, 0.5653]}, {"w": "mitigate", "b": [0.3805, 0.5505, 0.4458, 0.5653]}, {"w": "class", "b": [0.4518, 0.5505, 0.4882, 0.5653]}, {"w": "imbalance", "b": [0.4943, 0.5505, 0.5731, 0.5653]}, {"w": "is", "b": [0.5792, 0.5505, 0.5914, 0.5653]}, {"w": "oversampling.", "b": [0.5972, 0.5504, 0.7238, 0.5654]}, {"w": "By", "b": [0.732, 0.5505, 0.7543, 0.5653]}, {"w": "making", "b": [0.7604, 0.5505, 0.8181, 0.5653]}, {"w": "multi-", "b": [0.8242, 0.5505, 0.8719, 0.5653]}, {"w": "ple", "b": [0.1312, 0.5683, 0.1551, 0.5833]}, {"w": "copies", "b": [0.1612, 0.5683, 0.21, 0.5833]}, {"w": "of", "b": [0.2161, 0.5683, 0.2312, 0.5833]}, {"w": "minority", "b": [0.2373, 0.5683, 0.3067, 0.5833]}, {"w": "class", "b": [0.3129, 0.5683, 0.3504, 0.5833]}, {"w": "examples,", "b": [0.3565, 0.5683, 0.4359, 0.5833]}, {"w": "it", "b": [0.442, 0.5683, 0.4545, 0.5833]}, {"w": "increases", "b": [0.4606, 0.5683, 0.5323, 0.5833]}, {"w": "their", "b": [0.5385, 0.5683, 0.5769, 0.5833]}, {"w": "weight,", "b": [0.583, 0.5683, 0.641, 0.5833]}, {"w": "as", "b": [0.6472, 0.5683, 0.6638, 0.5833]}, {"w": "illustrated", "b": [0.67, 0.5683, 0.753, 0.5833]}, {"w": "in", "b": [0.7592, 0.5683, 0.7747, 0.5833]}, {"w": "Figure", "b": [0.7808, 0.5683, 0.8335, 0.5833]}, {"w": "15a.", "b": [0.8396, 0.5683, 0.8727, 0.5833]}, {"w": "You", "b": [0.1305, 0.5864, 0.1616, 0.6012]}, {"w": "might", "b": [0.1666, 0.5864, 0.2123, 0.6012]}, {"w": "also", "b": [0.2172, 0.5864, 0.2475, 0.6012]}, {"w": "create", "b": [0.2524, 0.5864, 0.2997, 0.6012]}, {"w": "synthetic", "b": [0.3046, 0.5864, 0.3761, 0.6012]}, {"w": "examples", "b": [0.381, 0.5864, 0.4529, 0.6012]}, {"w": "by", "b": [0.4579, 0.5864, 0.477, 0.6012]}, {"w": "sampling", "b": [0.4819, 0.5864, 0.5523, 0.6012]}, {"w": "feature", "b": [0.5573, 0.5864, 0.6121, 0.6012]}, {"w": "values", "b": [0.617, 0.5864, 0.6648, 0.6012]}, {"w": "of", "b": [0.6698, 0.5864, 0.6844, 0.6012]}, {"w": "several", "b": [0.6893, 0.5864, 0.7427, 0.6012]}, {"w": "examples", "b": [0.7476, 0.5864, 0.8196, 0.6012]}, {"w": "of", "b": [0.8245, 0.5864, 0.8391, 0.6012]}, {"w": "the", "b": [0.844, 0.5864, 0.8691, 0.6012]}, {"w": "minority", "b": [0.1312, 0.6043, 0.1986, 0.6192]}, {"w": "class", "b": [0.2047, 0.6043, 0.2411, 0.6192]}, {"w": "and", "b": [0.2473, 0.6043, 0.2764, 0.6192]}, {"w": "combining", "b": [0.2826, 0.6043, 0.3635, 0.6192]}, {"w": "them", "b": [0.3696, 0.6043, 0.4098, 0.6192]}, {"w": "to", "b": [0.4159, 0.6043, 0.432, 0.6192]}, {"w": "obtain", "b": [0.4382, 0.6043, 0.4884, 0.6192]}, {"w": "a", "b": [0.4946, 0.6043, 0.5036, 0.6192]}, {"w": "new", "b": [0.5098, 0.6043, 0.5409, 0.6192]}, {"w": "example", "b": [0.5471, 0.6043, 0.6119, 0.6192]}, {"w": "of", "b": [0.618, 0.6043, 0.6326, 0.6192]}, {"w": "that", "b": [0.6387, 0.6043, 0.6719, 0.6192]}, {"w": "class.", "b": [0.6781, 0.6043, 0.7195, 0.6192]}, {"w": "Two", "b": [0.7277, 0.6043, 0.7608, 0.6192]}, {"w": "popular", "b": [0.7669, 0.6043, 0.8278, 0.6192]}, {"w": "algo-", "b": [0.8339, 0.6043, 0.8721, 0.6192]}, {"w": "rithms", "b": [0.1312, 0.6223, 0.1826, 0.6371]}, {"w": "that", "b": [0.1882, 0.6223, 0.2214, 0.6371]}, {"w": "oversample", "b": [0.227, 0.6223, 0.3141, 0.6371]}, {"w": "the", "b": [0.3196, 0.6223, 0.3448, 0.6371]}, {"w": "minority", "b": [0.3504, 0.6223, 0.4177, 0.6371]}, {"w": "class", "b": [0.4233, 0.6223, 0.4597, 0.6371]}, {"w": "by", "b": [0.4653, 0.6223, 0.4844, 0.6371]}, {"w": "creating", "b": [0.49, 0.6223, 0.5534, 0.6371]}, {"w": "synthetic", "b": [0.559, 0.6223, 0.6304, 0.6371]}, {"w": "examples:", "b": [0.6361, 0.6223, 0.713, 0.6371]}, {"w": "Synthetic", "b": [0.721, 0.6223, 0.7953, 0.6371]}, {"w": "Minority", "b": [0.8009, 0.6223, 0.8698, 0.6371]}, {"w": "Oversampling", "b": [0.1312, 0.6402, 0.2399, 0.655]}, {"w": "Technique", "b": [0.2451, 0.6402, 0.3249, 0.655]}, {"w": "(SMOTE)", "b": [0.3301, 0.6401, 0.4207, 0.6551]}, {"w": "and", "b": [0.4258, 0.6402, 0.455, 0.655]}, {"w": "Adaptive", "b": [0.4602, 0.6402, 0.5315, 0.655]}, {"w": "Synthetic", "b": [0.5367, 0.6402, 0.611, 0.655]}, {"w": "Sampling", "b": [0.6162, 0.6402, 0.6896, 0.655]}, {"w": "Method", "b": [0.6947, 0.6402, 0.756, 0.655]}, {"w": "(ADASYN).", "b": [0.7612, 0.6401, 0.8724, 0.6551]}]}, {"id": "b_7", "type": "paragraph", "text": "SMOTE and ADASYN work similarly in many ways. For a given example xi of the minority class, they pick k nearest neighbors. Let’s denote this set of k examples as Sk. The synthetic example xnew is defined as xi + λ(xzi −xi), where xzi is an example of the minority class chosen randomly from Sk. The interpolation hyperparameter λ is an arbitrary number in the range [0, 1]. (See an illustration for λ = 0.5 in Figure 16.)", "words": [{"w": "SMOTE", "b": [0.1312, 0.6672, 0.1973, 0.682]}, {"w": "and", "b": [0.2033, 0.6672, 0.2325, 0.682]}, {"w": "ADASYN", "b": [0.2385, 0.6672, 0.3161, 0.682]}, {"w": "work", "b": [0.3221, 0.6672, 0.3603, 0.682]}, {"w": "similarly", "b": [0.3663, 0.6672, 0.4343, 0.682]}, {"w": "in", "b": [0.4404, 0.6672, 0.4554, 0.682]}, {"w": "many", "b": [0.4615, 0.6672, 0.5046, 0.682]}, {"w": "ways.", "b": [0.5107, 0.6672, 0.5535, 0.682]}, {"w": "For", "b": [0.5616, 0.6672, 0.588, 0.682]}, {"w": "a", "b": [0.5941, 0.6672, 0.6031, 0.682]}, {"w": "given", "b": [0.6091, 0.6672, 0.6503, 0.682]}, {"w": "example", "b": [0.6563, 0.6672, 0.7212, 0.682]}, {"w": "xi", "b": [0.727, 0.6671, 0.7434, 0.6832]}, {"w": "of", "b": [0.7504, 0.6672, 0.765, 0.682]}, {"w": "the", "b": [0.771, 0.6672, 0.7961, 0.682]}, {"w": "minority", "b": [0.8021, 0.6672, 0.8695, 0.682]}, {"w": "class,", "b": [0.1312, 0.6851, 0.1727, 0.6999]}, {"w": "they", "b": [0.1786, 0.6851, 0.2133, 0.6999]}, {"w": "pick", "b": [0.2192, 0.6851, 0.2514, 0.6999]}, {"w": "k", "b": [0.2573, 0.685, 0.2669, 0.6999]}, {"w": "nearest", "b": [0.2734, 0.6851, 0.3298, 0.6999]}, {"w": "neighbors.", "b": [0.3358, 0.6851, 0.4163, 0.6999]}, {"w": "Let’s", "b": [0.4244, 0.6851, 0.463, 0.6999]}, {"w": "denote", "b": [0.4689, 0.6851, 0.5212, 0.6999]}, {"w": "this", "b": [0.5271, 0.6851, 0.5564, 0.6999]}, {"w": "set", "b": [0.5623, 0.6851, 0.5845, 0.6999]}, {"w": "of", "b": [0.5905, 0.6851, 0.605, 0.6999]}, {"w": "k", "b": [0.6108, 0.685, 0.6204, 0.6999]}, {"w": "examples", "b": [0.6269, 0.6851, 0.6989, 0.6999]}, {"w": "as", "b": [0.7048, 0.6851, 0.721, 0.6999]}, {"w": "Sk.", "b": [0.7269, 0.6848, 0.7522, 0.7012]}, {"w": "The", "b": [0.7603, 0.6851, 0.7914, 0.6999]}, {"w": "synthetic", "b": [0.7974, 0.6851, 0.8688, 0.6999]}, {"w": "example", "b": [0.1312, 0.7028, 0.1986, 0.7179]}, {"w": "xnew", "b": [0.2047, 0.7029, 0.2427, 0.7191]}, {"w": "is", "b": [0.2501, 0.7028, 0.2627, 0.7179]}, {"w": "defined", "b": [0.2689, 0.7028, 0.3273, 0.7179]}, {"w": "as", "b": [0.3335, 0.7028, 0.3503, 0.7179]}, {"w": "xi", "b": [0.3564, 0.7029, 0.3728, 0.7191]}, {"w": "+", "b": [0.3778, 0.7028, 0.3924, 0.7179]}, {"w": "λ(xzi", "b": [0.3965, 0.7028, 0.4385, 0.7191]}, {"w": "−xi),", "b": [0.4435, 0.7027, 0.4918, 0.7191]}, {"w": "where", "b": [0.498, 0.7028, 0.5461, 0.7179]}, {"w": "xzi", "b": [0.5522, 0.7029, 0.5762, 0.7191]}, {"w": "is", "b": [0.5832, 0.7028, 0.5959, 0.7179]}, {"w": "an", "b": [0.602, 0.7028, 0.6218, 0.7179]}, {"w": "example", "b": [0.628, 0.7028, 0.6953, 0.7179]}, {"w": "of", "b": [0.7014, 0.7028, 0.7166, 0.7179]}, {"w": "the", "b": [0.7227, 0.7028, 0.7488, 0.7179]}, {"w": "minority", "b": [0.755, 0.7028, 0.8249, 0.7179]}, {"w": "class", "b": [0.8311, 0.7028, 0.8689, 0.7179]}, {"w": "chosen", "b": [0.1312, 0.721, 0.1831, 0.7358]}, {"w": "randomly", "b": [0.1889, 0.721, 0.2638, 0.7358]}, {"w": "from", "b": [0.2697, 0.721, 0.3064, 0.7358]}, {"w": "Sk.", "b": [0.3121, 0.7207, 0.3374, 0.7371]}, {"w": "The", "b": [0.3455, 0.721, 0.3767, 0.7358]}, {"w": "interpolation", "b": [0.3825, 0.721, 0.484, 0.7358]}, {"w": "hyperparameter", "b": [0.4899, 0.721, 0.6151, 0.7358]}, {"w": "λ", "b": [0.6208, 0.7209, 0.6316, 0.7358]}, {"w": "is", "b": [0.6374, 0.721, 0.6496, 0.7358]}, {"w": "an", "b": [0.6554, 0.721, 0.6745, 0.7358]}, {"w": "arbitrary", "b": [0.6804, 0.721, 0.7514, 0.7358]}, {"w": "number", "b": [0.7572, 0.721, 0.817, 0.7358]}, {"w": "in", "b": [0.8228, 0.721, 0.8379, 0.7358]}, {"w": "the", "b": [0.8437, 0.721, 0.8689, 0.7358]}, {"w": "range", "b": [0.1312, 0.7388, 0.1754, 0.7538]}, {"w": "[0,", "b": [0.1815, 0.7388, 0.2011, 0.7538]}, {"w": "1].", "b": [0.2042, 0.7388, 0.2236, 0.7538]}, {"w": "(See", "b": [0.2318, 0.7388, 0.2657, 0.7538]}, {"w": "an", "b": [0.2718, 0.7388, 0.2913, 0.7538]}, {"w": "illustration", "b": [0.2975, 0.7388, 0.3858, 0.7538]}, {"w": "for", "b": [0.392, 0.7388, 0.4141, 0.7538]}, {"w": "λ", "b": [0.4201, 0.7388, 0.4309, 0.7538]}, {"w": "=", "b": [0.436, 0.7388, 0.4503, 0.7538]}, {"w": "0.5", "b": [0.4555, 0.7388, 0.479, 0.7538]}, {"w": "in", "b": [0.4852, 0.7388, 0.5006, 0.7538]}, {"w": "Figure", "b": [0.5067, 0.7388, 0.5588, 0.7538]}, {"w": "16.)", "b": [0.565, 0.7388, 0.5957, 0.7538]}]}, {"id": "b_8", "type": "paragraph", "text": "Both SMOTE and ADASYN randomly pick among all possible xi in the dataset. In ADASYN, the number of synthetic examples generated for each xi is proportional to the number of examples in Sk, which are not from the minority class. Therefore, more synthetic examples are generated in the area where the minority class examples are rare.", "words": [{"w": "Both", "b": [0.1312, 0.7659, 0.1702, 0.7807]}, {"w": "SMOTE", "b": [0.1749, 0.7659, 0.2409, 0.7807]}, {"w": "and", "b": [0.2456, 0.7659, 0.2748, 0.7807]}, {"w": "ADASYN", "b": [0.2795, 0.7659, 0.3571, 0.7807]}, {"w": "randomly", "b": [0.3618, 0.7659, 0.4367, 0.7807]}, {"w": "pick", "b": [0.4414, 0.7659, 0.4736, 0.7807]}, {"w": "among", "b": [0.4783, 0.7659, 0.5306, 0.7807]}, {"w": "all", "b": [0.5353, 0.7659, 0.5543, 0.7807]}, {"w": "possible", "b": [0.5591, 0.7659, 0.6211, 0.7807]}, {"w": "xi", "b": [0.6257, 0.7658, 0.6421, 0.782]}, {"w": "in", "b": [0.6477, 0.7659, 0.6628, 0.7807]}, {"w": "the", "b": [0.6675, 0.7659, 0.6927, 0.7807]}, {"w": "dataset.", "b": [0.6974, 0.7659, 0.7598, 0.7807]}, {"w": "In", "b": [0.7675, 0.7659, 0.7841, 0.7807]}, {"w": "ADASYN,", "b": [0.7888, 0.7659, 0.8714, 0.7807]}, {"w": "the", "b": [0.1312, 0.7836, 0.1574, 0.7987]}, {"w": "number", "b": [0.1641, 0.7836, 0.2264, 0.7987]}, {"w": "of", "b": [0.2332, 0.7836, 0.2483, 0.7987]}, {"w": "synthetic", "b": [0.2551, 0.7836, 0.3295, 0.7987]}, {"w": "examples", "b": [0.3362, 0.7836, 0.4111, 0.7987]}, {"w": "generated", "b": [0.4178, 0.7836, 0.4974, 0.7987]}, {"w": "for", "b": [0.5041, 0.7836, 0.5267, 0.7987]}, {"w": "each", "b": [0.5334, 0.7836, 0.5695, 0.7987]}, {"w": "xi", "b": [0.576, 0.7837, 0.5924, 0.7999]}, {"w": "is", "b": [0.6001, 0.7836, 0.6128, 0.7987]}, {"w": "proportional", "b": [0.6195, 0.7836, 0.7216, 0.7987]}, {"w": "to", "b": [0.7283, 0.7836, 0.745, 0.7987]}, {"w": "the", "b": [0.7518, 0.7836, 0.7779, 0.7987]}, {"w": "number", "b": [0.7847, 0.7836, 0.847, 0.7987]}, {"w": "of", "b": [0.8537, 0.7836, 0.8689, 0.7987]}, {"w": "examples", "b": [0.1312, 0.8016, 0.2047, 0.8166]}, {"w": "in", "b": [0.2109, 0.8016, 0.2263, 0.8166]}, {"w": "Sk,", "b": [0.2324, 0.8014, 0.2577, 0.8178]}, {"w": "which", "b": [0.2639, 0.8016, 0.3106, 0.8166]}, {"w": "are", "b": [0.3167, 0.8016, 0.3414, 0.8166]}, {"w": "not", "b": [0.3476, 0.8016, 0.3743, 0.8166]}, {"w": "from", "b": [0.3804, 0.8016, 0.4179, 0.8166]}, {"w": "the", "b": [0.4241, 0.8016, 0.4497, 0.8166]}, {"w": "minority", "b": [0.4559, 0.8016, 0.5247, 0.8166]}, {"w": "class.", "b": [0.5308, 0.8016, 0.5731, 0.8166]}, {"w": "Therefore,", "b": [0.5813, 0.8016, 0.6641, 0.8166]}, {"w": "more", "b": [0.6702, 0.8016, 0.7103, 0.8166]}, {"w": "synthetic", "b": [0.7164, 0.8016, 0.7894, 0.8166]}, {"w": "examples", "b": [0.7955, 0.8016, 0.869, 0.8166]}, {"w": "are", "b": [0.1312, 0.8196, 0.1559, 0.8345]}, {"w": "generated", "b": [0.162, 0.8196, 0.24, 0.8345]}, {"w": "in", "b": [0.2462, 0.8196, 0.2616, 0.8345]}, {"w": "the", "b": [0.2677, 0.8196, 0.2934, 0.8345]}, {"w": "area", "b": [0.2995, 0.8196, 0.3334, 0.8345]}, {"w": "where", "b": [0.3396, 0.8196, 0.3868, 0.8345]}, {"w": "the", "b": [0.3929, 0.8196, 0.4186, 0.8345]}, {"w": "minority", "b": [0.4247, 0.8196, 0.4935, 0.8345]}, {"w": "class", "b": [0.4996, 0.8196, 0.5368, 0.8345]}, {"w": "examples", "b": [0.5429, 0.8196, 0.6163, 0.8345]}, {"w": "are", "b": [0.6225, 0.8196, 0.6471, 0.8345]}, {"w": "rare.", "b": [0.6533, 0.8196, 0.6903, 0.8345]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 34", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "34", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 78, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Original data Oversampled data Original data Undersampled data", "words": [{"w": "Original", "b": [0.1359, 0.2902, 0.1941, 0.3039]}, {"w": "data", "b": [0.1988, 0.2902, 0.2317, 0.3039]}, {"w": "Oversampled", "b": [0.3149, 0.2902, 0.4154, 0.3039]}, {"w": "data", "b": [0.4201, 0.2902, 0.453, 0.3039]}, {"w": "Original", "b": [0.5591, 0.2899, 0.6172, 0.3036]}, {"w": "data", "b": [0.6219, 0.2899, 0.6547, 0.3036]}, {"w": "Undersampled", "b": [0.7241, 0.2899, 0.8337, 0.3036]}, {"w": "data", "b": [0.8384, 0.2899, 0.8712, 0.3036]}]}, {"id": "b_1", "type": "paragraph", "text": "Figure 15: Undersampling (left) and oversampling (right).", "words": [{"w": "Figure", "b": [0.2652, 0.3197, 0.3173, 0.3346]}, {"w": "15:", "b": [0.3235, 0.3197, 0.347, 0.3346]}, {"w": "Undersampling", "b": [0.3552, 0.3197, 0.4769, 0.3346]}, {"w": "(left)", "b": [0.4831, 0.3197, 0.5236, 0.3346]}, {"w": "and", "b": [0.5297, 0.3197, 0.5595, 0.3346]}, {"w": "oversampling", "b": [0.5656, 0.3197, 0.6709, 0.3346]}, {"w": "(right).", "b": [0.677, 0.3197, 0.735, 0.3346]}]}, {"id": "b_2", "type": "paragraph", "text": "3.9.2 Undersampling", "words": [{"w": "3.9.2", "b": [0.1312, 0.3699, 0.1749, 0.3849]}, {"w": "Undersampling", "b": [0.1961, 0.3699, 0.3368, 0.3849]}]}, {"id": "b_3", "type": "paragraph", "text": "An opposite approach, undersampling, is to remove from the training set some examples of the majority class (Figure 15b).", "words": [{"w": "An", "b": [0.1305, 0.4064, 0.1548, 0.4215]}, {"w": "opposite", "b": [0.161, 0.4064, 0.2289, 0.4215]}, {"w": "approach,", "b": [0.235, 0.4064, 0.3142, 0.4215]}, {"w": "undersampling,", "b": [0.3203, 0.4064, 0.4618, 0.4215]}, {"w": "is", "b": [0.4679, 0.4064, 0.4805, 0.4215]}, {"w": "to", "b": [0.4866, 0.4064, 0.5032, 0.4215]}, {"w": "remove", "b": [0.5093, 0.4064, 0.5668, 0.4215]}, {"w": "from", "b": [0.5729, 0.4064, 0.6107, 0.4215]}, {"w": "the", "b": [0.6169, 0.4064, 0.6427, 0.4215]}, {"w": "training", "b": [0.6489, 0.4064, 0.7131, 0.4215]}, {"w": "set", "b": [0.7192, 0.4064, 0.7421, 0.4215]}, {"w": "some", "b": [0.7483, 0.4064, 0.7887, 0.4215]}, {"w": "examples", "b": [0.7949, 0.4064, 0.8689, 0.4215]}, {"w": "of", "b": [0.1312, 0.4244, 0.1461, 0.4394]}, {"w": "the", "b": [0.1522, 0.4244, 0.1779, 0.4394]}, {"w": "majority", "b": [0.1841, 0.4244, 0.2528, 0.4394]}, {"w": "class", "b": [0.2589, 0.4244, 0.2961, 0.4394]}, {"w": "(Figure", "b": [0.3022, 0.4244, 0.3615, 0.4394]}, {"w": "15b).", "b": [0.3676, 0.4244, 0.4087, 0.4394]}]}, {"id": "b_4", "type": "paragraph", "text": "The undersampling can be done randomly; that is, the examples to remove from the majority class can be chosen at random. Alternatively, examples to withdraw from the majority class can be selected based on some property. One such property is Tomek links. A Tomek link exists between two examples xi and xj belonging to two different classes if there’s no other example xk in the dataset closer to either xi or xj than the latter two are to each other. The closeness can be defined using a metric such as cosine similarity or Euclidean distance.", "words": [{"w": "The", "b": [0.1306, 0.4515, 0.1617, 0.4663]}, {"w": "undersampling", "b": [0.1675, 0.4515, 0.2832, 0.4663]}, {"w": "can", "b": [0.289, 0.4515, 0.3161, 0.4663]}, {"w": "be", "b": [0.3219, 0.4515, 0.3405, 0.4663]}, {"w": "done", "b": [0.3462, 0.4515, 0.3834, 0.4663]}, {"w": "randomly;", "b": [0.3892, 0.4515, 0.4691, 0.4663]}, {"w": "that", "b": [0.475, 0.4515, 0.5082, 0.4663]}, {"w": "is,", "b": [0.5139, 0.4515, 0.5311, 0.4663]}, {"w": "the", "b": [0.537, 0.4515, 0.5621, 0.4663]}, {"w": "examples", "b": [0.5679, 0.4515, 0.6398, 0.4663]}, {"w": "to", "b": [0.6456, 0.4515, 0.6617, 0.4663]}, {"w": "remove", "b": [0.6674, 0.4515, 0.7232, 0.4663]}, {"w": "from", "b": [0.729, 0.4515, 0.7657, 0.4663]}, {"w": "the", "b": [0.7715, 0.4515, 0.7966, 0.4663]}, {"w": "majority", "b": [0.8024, 0.4515, 0.8697, 0.4663]}, {"w": "class", "b": [0.1312, 0.4694, 0.168, 0.4842]}, {"w": "can", "b": [0.1741, 0.4694, 0.2015, 0.4842]}, {"w": "be", "b": [0.2076, 0.4694, 0.2264, 0.4842]}, {"w": "chosen", "b": [0.2325, 0.4694, 0.2849, 0.4842]}, {"w": "at", "b": [0.291, 0.4694, 0.3072, 0.4842]}, {"w": "random.", "b": [0.3134, 0.4694, 0.3793, 0.4842]}, {"w": "Alternatively,", "b": [0.3875, 0.4694, 0.4956, 0.4842]}, {"w": "examples", "b": [0.5017, 0.4694, 0.5743, 0.4842]}, {"w": "to", "b": [0.5805, 0.4694, 0.5967, 0.4842]}, {"w": "withdraw", "b": [0.6028, 0.4694, 0.6774, 0.4842]}, {"w": "from", "b": [0.6835, 0.4694, 0.7206, 0.4842]}, {"w": "the", "b": [0.7267, 0.4694, 0.7521, 0.4842]}, {"w": "majority", "b": [0.7582, 0.4694, 0.8262, 0.4842]}, {"w": "class", "b": [0.8323, 0.4694, 0.8691, 0.4842]}, {"w": "can", "b": [0.1312, 0.4873, 0.1587, 0.5022]}, {"w": "be", "b": [0.1648, 0.4873, 0.1836, 0.5022]}, {"w": "selected", "b": [0.1898, 0.4873, 0.2519, 0.5022]}, {"w": "based", "b": [0.258, 0.4873, 0.3029, 0.5022]}, {"w": "on", "b": [0.309, 0.4873, 0.3283, 0.5022]}, {"w": "some", "b": [0.3345, 0.4873, 0.3742, 0.5022]}, {"w": "property.", "b": [0.3803, 0.4873, 0.4526, 0.5022]}, {"w": "One", "b": [0.4608, 0.4873, 0.4933, 0.5022]}, {"w": "such", "b": [0.4995, 0.4873, 0.5346, 0.5022]}, {"w": "property", "b": [0.5408, 0.4873, 0.6095, 0.5022]}, {"w": "is", "b": [0.6156, 0.4873, 0.6279, 0.5022]}, {"w": "Tomek", "b": [0.6338, 0.4873, 0.696, 0.5022]}, {"w": "links.", "b": [0.703, 0.4873, 0.7513, 0.5022]}, {"w": "A", "b": [0.7595, 0.4873, 0.7732, 0.5022]}, {"w": "Tomek", "b": [0.7793, 0.4873, 0.8331, 0.5022]}, {"w": "link", "b": [0.8393, 0.4873, 0.8693, 0.5022]}, {"w": "exists", "b": [0.1312, 0.5052, 0.1761, 0.5202]}, {"w": "between", "b": [0.1822, 0.5052, 0.2474, 0.5202]}, {"w": "two", "b": [0.2535, 0.5052, 0.2822, 0.5202]}, {"w": "examples", "b": [0.2884, 0.5052, 0.3618, 0.5202]}, {"w": "xi", "b": [0.3678, 0.5052, 0.3843, 0.5214]}, {"w": "and", "b": [0.3913, 0.5052, 0.4211, 0.5202]}, {"w": "xj", "b": [0.4272, 0.5052, 0.4445, 0.5214]}, {"w": "belonging", "b": [0.4524, 0.5052, 0.5298, 0.5202]}, {"w": "to", "b": [0.5359, 0.5052, 0.5523, 0.5202]}, {"w": "two", "b": [0.5585, 0.5052, 0.5872, 0.5202]}, {"w": "different", "b": [0.5934, 0.5052, 0.6601, 0.5202]}, {"w": "classes", "b": [0.6662, 0.5052, 0.7189, 0.5202]}, {"w": "if", "b": [0.725, 0.5052, 0.7358, 0.5202]}, {"w": "there’s", "b": [0.742, 0.5052, 0.7955, 0.5202]}, {"w": "no", "b": [0.8016, 0.5052, 0.8211, 0.5202]}, {"w": "other", "b": [0.8273, 0.5052, 0.8693, 0.5202]}, {"w": "example", "b": [0.1312, 0.5233, 0.1961, 0.5381]}, {"w": "xk", "b": [0.2018, 0.5232, 0.2208, 0.5393]}, {"w": "in", "b": [0.2278, 0.5233, 0.2429, 0.5381]}, {"w": "the", "b": [0.2487, 0.5233, 0.2738, 0.5381]}, {"w": "dataset", "b": [0.2796, 0.5233, 0.337, 0.5381]}, {"w": "closer", "b": [0.3427, 0.5233, 0.3871, 0.5381]}, {"w": "to", "b": [0.3929, 0.5233, 0.409, 0.5381]}, {"w": "either", "b": [0.4147, 0.5233, 0.46, 0.5381]}, {"w": "xi", "b": [0.4657, 0.5232, 0.4821, 0.5393]}, {"w": "or", "b": [0.4888, 0.5233, 0.5049, 0.5381]}, {"w": "xj", "b": [0.5107, 0.5232, 0.528, 0.5393]}, {"w": "than", "b": [0.5354, 0.5233, 0.5716, 0.5381]}, {"w": "the", "b": [0.5774, 0.5233, 0.6025, 0.5381]}, {"w": "latter", "b": [0.6083, 0.5233, 0.6515, 0.5381]}, {"w": "two", "b": [0.6573, 0.5233, 0.6854, 0.5381]}, {"w": "are", "b": [0.6912, 0.5233, 0.7153, 0.5381]}, {"w": "to", "b": [0.7211, 0.5233, 0.7372, 0.5381]}, {"w": "each", "b": [0.743, 0.5233, 0.7776, 0.5381]}, {"w": "other.", "b": [0.7834, 0.5233, 0.8297, 0.5381]}, {"w": "The", "b": [0.8378, 0.5233, 0.8689, 0.5381]}, {"w": "closeness", "b": [0.1312, 0.5411, 0.2021, 0.556]}, {"w": "can", "b": [0.2082, 0.5411, 0.2358, 0.556]}, {"w": "be", "b": [0.2419, 0.5411, 0.2608, 0.556]}, {"w": "defined", "b": [0.267, 0.5411, 0.3242, 0.556]}, {"w": "using", "b": [0.3303, 0.5411, 0.3723, 0.556]}, {"w": "a", "b": [0.3785, 0.5411, 0.3877, 0.556]}, {"w": "metric", "b": [0.3938, 0.5411, 0.4449, 0.556]}, {"w": "such", "b": [0.4511, 0.5411, 0.4864, 0.556]}, {"w": "as", "b": [0.4926, 0.5411, 0.509, 0.556]}, {"w": "cosine", "b": [0.5149, 0.5411, 0.5708, 0.5561]}, {"w": "similarity", "b": [0.5778, 0.5411, 0.6654, 0.5561]}, {"w": "or", "b": [0.6715, 0.5411, 0.6879, 0.556]}, {"w": "Euclidean", "b": [0.6941, 0.5411, 0.7846, 0.5561]}, {"w": "distance.", "b": [0.7917, 0.5411, 0.8723, 0.5561]}]}, {"id": "b_5", "type": "paragraph", "text": "In Figure 17, you can see how removing examples from the majority class based on Tomek links helps to establish a clear margin between examples of two classes.", "words": [{"w": "In", "b": [0.1312, 0.568, 0.1483, 0.583]}, {"w": "Figure", "b": [0.1544, 0.568, 0.207, 0.583]}, {"w": "17,", "b": [0.2132, 0.568, 0.2369, 0.583]}, {"w": "you", "b": [0.2431, 0.568, 0.2721, 0.583]}, {"w": "can", "b": [0.2782, 0.568, 0.3062, 0.583]}, {"w": "see", "b": [0.3123, 0.568, 0.3362, 0.583]}, {"w": "how", "b": [0.3424, 0.568, 0.3749, 0.583]}, {"w": "removing", "b": [0.3811, 0.568, 0.4556, 0.583]}, {"w": "examples", "b": [0.4618, 0.568, 0.5359, 0.583]}, {"w": "from", "b": [0.542, 0.568, 0.5798, 0.583]}, {"w": "the", "b": [0.586, 0.568, 0.6118, 0.583]}, {"w": "majority", "b": [0.618, 0.568, 0.6873, 0.583]}, {"w": "class", "b": [0.6935, 0.568, 0.731, 0.583]}, {"w": "based", "b": [0.7371, 0.568, 0.7828, 0.583]}, {"w": "on", "b": [0.7889, 0.568, 0.8086, 0.583]}, {"w": "Tomek", "b": [0.8147, 0.568, 0.8695, 0.583]}, {"w": "links", "b": [0.1312, 0.586, 0.1688, 0.6009]}, {"w": "helps", "b": [0.1749, 0.586, 0.2161, 0.6009]}, {"w": "to", "b": [0.2222, 0.586, 0.2386, 0.6009]}, {"w": "establish", "b": [0.2448, 0.586, 0.3147, 0.6009]}, {"w": "a", "b": [0.3209, 0.586, 0.3301, 0.6009]}, {"w": "clear", "b": [0.3362, 0.586, 0.3742, 0.6009]}, {"w": "margin", "b": [0.3804, 0.586, 0.4368, 0.6009]}, {"w": "between", "b": [0.443, 0.586, 0.5081, 0.6009]}, {"w": "examples", "b": [0.5143, 0.586, 0.5877, 0.6009]}, {"w": "of", "b": [0.5938, 0.586, 0.6087, 0.6009]}, {"w": "two", "b": [0.6148, 0.586, 0.6436, 0.6009]}, {"w": "classes.", "b": [0.6497, 0.586, 0.7075, 0.6009]}]}, {"id": "b_6", "type": "paragraph", "text": "Cluster-based undersampling works as follows. Decide on the number of examples you want to have in the majority class resulting from undersampling. Let that number be k. Run a centroid-based clustering algorithm on the majority examples only with k being the desired number of clusters. Then replace all examples in the majority classes with the k centroids. An example of a centroid-based clustering algorithm is k-nearest neighbors.", "words": [{"w": "Cluster-based", "b": [0.1312, 0.6129, 0.2584, 0.6278]}, {"w": "undersampling", "b": [0.2655, 0.6129, 0.4017, 0.6278]}, {"w": "works", "b": [0.4079, 0.6128, 0.4547, 0.6278]}, {"w": "as", "b": [0.4608, 0.6128, 0.4775, 0.6278]}, {"w": "follows.", "b": [0.4837, 0.6128, 0.5438, 0.6278]}, {"w": "Decide", "b": [0.552, 0.6128, 0.6067, 0.6278]}, {"w": "on", "b": [0.6128, 0.6128, 0.6325, 0.6278]}, {"w": "the", "b": [0.6386, 0.6128, 0.6645, 0.6278]}, {"w": "number", "b": [0.6707, 0.6128, 0.7324, 0.6278]}, {"w": "of", "b": [0.7385, 0.6128, 0.7535, 0.6278]}, {"w": "examples", "b": [0.7597, 0.6128, 0.8338, 0.6278]}, {"w": "you", "b": [0.84, 0.6128, 0.869, 0.6278]}, {"w": "want", "b": [0.1306, 0.6309, 0.1687, 0.6457]}, {"w": "to", "b": [0.1746, 0.6309, 0.1907, 0.6457]}, {"w": "have", "b": [0.1965, 0.6309, 0.2322, 0.6457]}, {"w": "in", "b": [0.2381, 0.6309, 0.2532, 0.6457]}, {"w": "the", "b": [0.259, 0.6309, 0.2842, 0.6457]}, {"w": "majority", "b": [0.29, 0.6309, 0.3574, 0.6457]}, {"w": "class", "b": [0.3633, 0.6309, 0.3997, 0.6457]}, {"w": "resulting", "b": [0.4056, 0.6309, 0.474, 0.6457]}, {"w": "from", "b": [0.4799, 0.6309, 0.5166, 0.6457]}, {"w": "undersampling.", "b": [0.5225, 0.6309, 0.6433, 0.6457]}, {"w": "Let", "b": [0.6514, 0.6309, 0.6778, 0.6457]}, {"w": "that", "b": [0.6836, 0.6309, 0.7168, 0.6457]}, {"w": "number", "b": [0.7227, 0.6309, 0.7825, 0.6457]}, {"w": "be", "b": [0.7884, 0.6309, 0.807, 0.6457]}, {"w": "k.", "b": [0.8126, 0.6308, 0.8278, 0.6458]}, {"w": "Run", "b": [0.8359, 0.6309, 0.8688, 0.6457]}, {"w": "a", "b": [0.1312, 0.6488, 0.1405, 0.6637]}, {"w": "centroid-based", "b": [0.1468, 0.6488, 0.2815, 0.6637]}, {"w": "clustering", "b": [0.2886, 0.6488, 0.3791, 0.6637]}, {"w": "algorithm", "b": [0.3862, 0.6488, 0.476, 0.6637]}, {"w": "on", "b": [0.4821, 0.6488, 0.5017, 0.6637]}, {"w": "the", "b": [0.5078, 0.6488, 0.5335, 0.6637]}, {"w": "majority", "b": [0.5396, 0.6488, 0.6085, 0.6637]}, {"w": "examples", "b": [0.6147, 0.6488, 0.6882, 0.6637]}, {"w": "only", "b": [0.6944, 0.6488, 0.7288, 0.6637]}, {"w": "with", "b": [0.735, 0.6488, 0.7709, 0.6637]}, {"w": "k", "b": [0.777, 0.6488, 0.7866, 0.6637]}, {"w": "being", "b": [0.7933, 0.6488, 0.837, 0.6637]}, {"w": "the", "b": [0.8431, 0.6488, 0.8688, 0.6637]}, {"w": "desired", "b": [0.1312, 0.6666, 0.1889, 0.6817]}, {"w": "number", "b": [0.1959, 0.6666, 0.2582, 0.6817]}, {"w": "of", "b": [0.2652, 0.6666, 0.2804, 0.6817]}, {"w": "clusters.", "b": [0.2874, 0.6666, 0.3546, 0.6817]}, {"w": "Then", "b": [0.3654, 0.6666, 0.4083, 0.6817]}, {"w": "replace", "b": [0.4152, 0.6666, 0.4728, 0.6817]}, {"w": "all", "b": [0.4798, 0.6666, 0.4997, 0.6817]}, {"w": "examples", "b": [0.5067, 0.6666, 0.5816, 0.6817]}, {"w": "in", "b": [0.5886, 0.6666, 0.6043, 0.6817]}, {"w": "the", "b": [0.6113, 0.6666, 0.6374, 0.6817]}, {"w": "majority", "b": [0.6444, 0.6666, 0.7145, 0.6817]}, {"w": "classes", "b": [0.7215, 0.6666, 0.7752, 0.6817]}, {"w": "with", "b": [0.7822, 0.6666, 0.8188, 0.6817]}, {"w": "the", "b": [0.8258, 0.6666, 0.852, 0.6817]}, {"w": "k", "b": [0.8586, 0.6667, 0.8682, 0.6817]}, {"w": "centroids.", "b": [0.1312, 0.6847, 0.2088, 0.6996]}, {"w": "An", "b": [0.217, 0.6847, 0.2411, 0.6996]}, {"w": "example", "b": [0.2473, 0.6847, 0.3134, 0.6996]}, {"w": "of", "b": [0.3196, 0.6847, 0.3344, 0.6996]}, {"w": "a", "b": [0.3406, 0.6847, 0.3498, 0.6996]}, {"w": "centroid-based", "b": [0.3559, 0.6847, 0.4725, 0.6996]}, {"w": "clustering", "b": [0.4787, 0.6847, 0.5568, 0.6996]}, {"w": "algorithm", "b": [0.5629, 0.6847, 0.6409, 0.6996]}, {"w": "is", "b": [0.647, 0.6847, 0.6595, 0.6996]}, {"w": "k-nearest", "b": [0.6653, 0.6847, 0.7505, 0.6996]}, {"w": "neighbors.", "b": [0.7576, 0.6847, 0.852, 0.6996]}]}, {"id": "b_7", "type": "paragraph", "text": "3.9.3 Hybrid Strategies", "words": [{"w": "3.9.3", "b": [0.1312, 0.7325, 0.1749, 0.7475]}, {"w": "Hybrid", "b": [0.1961, 0.7325, 0.2621, 0.7475]}, {"w": "Strategies", "b": [0.2692, 0.7325, 0.3609, 0.7475]}]}, {"id": "b_8", "type": "paragraph", "text": "You can develop your hybrid strategies (by combining both over- and undersampling) and possibly get better results. One such strategy consists of using ADASYN to oversample, and then Tomek links to undersample.", "words": [{"w": "You", "b": [0.1305, 0.769, 0.1628, 0.7841]}, {"w": "can", "b": [0.1689, 0.769, 0.197, 0.7841]}, {"w": "develop", "b": [0.2032, 0.769, 0.2646, 0.7841]}, {"w": "your", "b": [0.2707, 0.769, 0.3072, 0.7841]}, {"w": "hybrid", "b": [0.3133, 0.769, 0.3664, 0.7841]}, {"w": "strategies", "b": [0.3726, 0.769, 0.4498, 0.7841]}, {"w": "(by", "b": [0.456, 0.769, 0.483, 0.7841]}, {"w": "combining", "b": [0.4892, 0.769, 0.5729, 0.7841]}, {"w": "both", "b": [0.5791, 0.769, 0.617, 0.7841]}, {"w": "over-", "b": [0.6232, 0.769, 0.6633, 0.7841]}, {"w": "and", "b": [0.6694, 0.769, 0.6996, 0.7841]}, {"w": "undersampling)", "b": [0.7058, 0.769, 0.8328, 0.7841]}, {"w": "and", "b": [0.839, 0.769, 0.8691, 0.7841]}, {"w": "possibly", "b": [0.1312, 0.7871, 0.1949, 0.802]}, {"w": "get", "b": [0.2011, 0.7871, 0.2252, 0.802]}, {"w": "better", "b": [0.2314, 0.7871, 0.2793, 0.802]}, {"w": "results.", "b": [0.2855, 0.7871, 0.3421, 0.802]}, {"w": "One", "b": [0.3504, 0.7871, 0.3826, 0.802]}, {"w": "such", "b": [0.3888, 0.7871, 0.4236, 0.802]}, {"w": "strategy", "b": [0.4298, 0.7871, 0.4939, 0.802]}, {"w": "consists", "b": [0.5001, 0.7871, 0.5608, 0.802]}, {"w": "of", "b": [0.567, 0.7871, 0.5816, 0.802]}, {"w": "using", "b": [0.5877, 0.7871, 0.6291, 0.802]}, {"w": "ADASYN", "b": [0.6353, 0.7871, 0.713, 0.802]}, {"w": "to", "b": [0.7192, 0.7871, 0.7353, 0.802]}, {"w": "oversample,", "b": [0.7415, 0.7871, 0.8338, 0.802]}, {"w": "and", "b": [0.8399, 0.7871, 0.8691, 0.802]}, {"w": "then", "b": [0.1312, 0.805, 0.1671, 0.8199]}, {"w": "Tomek", "b": [0.1733, 0.805, 0.2276, 0.8199]}, {"w": "links", "b": [0.2338, 0.805, 0.2713, 0.8199]}, {"w": "to", "b": [0.2774, 0.805, 0.2938, 0.8199]}, {"w": "undersample.", "b": [0.3, 0.805, 0.4068, 0.8199]}]}, {"id": "b_9", "type": "paragraph", "text": "Another possible strategy consists of combining cluster-based undersampling with SMOTE.", "words": [{"w": "Another", "b": [0.1305, 0.8319, 0.1967, 0.8469]}, {"w": "possible", "b": [0.2029, 0.8319, 0.2662, 0.8469]}, {"w": "strategy", "b": [0.2723, 0.8319, 0.3376, 0.8469]}, {"w": "consists", "b": [0.3437, 0.8319, 0.4056, 0.8469]}, {"w": "of", "b": [0.4117, 0.8319, 0.4266, 0.8469]}, {"w": "combining", "b": [0.4328, 0.8319, 0.5153, 0.8469]}, {"w": "cluster-based", "b": [0.5215, 0.8319, 0.6263, 0.8469]}, {"w": "undersampling", "b": [0.6325, 0.8319, 0.7506, 0.8469]}, {"w": "with", "b": [0.7567, 0.8319, 0.7926, 0.8469]}, {"w": "SMOTE.", "b": [0.7987, 0.8319, 0.8713, 0.8469]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 35", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "35", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 79, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 16: An illustration of a synthetic example generation for SMOTE and ADASYN. (Built using a script adapted from Guillaume Lemaitre.)", "words": [{"w": "Figure", "b": [0.1312, 0.527, 0.1844, 0.5421]}, {"w": "16:", "b": [0.1916, 0.527, 0.2156, 0.5421]}, {"w": "An", "b": [0.2259, 0.527, 0.2505, 0.5421]}, {"w": "illustration", "b": [0.2577, 0.527, 0.3479, 0.5421]}, {"w": "of", "b": [0.3551, 0.527, 0.3702, 0.5421]}, {"w": "a", "b": [0.3774, 0.527, 0.3868, 0.5421]}, {"w": "synthetic", "b": [0.394, 0.527, 0.4685, 0.5421]}, {"w": "example", "b": [0.4757, 0.527, 0.5431, 0.5421]}, {"w": "generation", "b": [0.5503, 0.527, 0.6361, 0.5421]}, {"w": "for", "b": [0.6434, 0.527, 0.6659, 0.5421]}, {"w": "SMOTE", "b": [0.6731, 0.527, 0.7419, 0.5421]}, {"w": "and", "b": [0.7491, 0.527, 0.7794, 0.5421]}, {"w": "ADASYN.", "b": [0.7866, 0.527, 0.8726, 0.5421]}, {"w": "(Built", "b": [0.1291, 0.545, 0.177, 0.56]}, {"w": "using", "b": [0.1832, 0.545, 0.2253, 0.56]}, {"w": "a", "b": [0.2315, 0.545, 0.2407, 0.56]}, {"w": "script", "b": [0.2468, 0.545, 0.2921, 0.56]}, {"w": "adapted", "b": [0.2983, 0.545, 0.3629, 0.56]}, {"w": "from", "b": [0.369, 0.545, 0.4065, 0.56]}, {"w": "Guillaume", "b": [0.4126, 0.545, 0.4958, 0.56]}, {"w": "Lemaitre.)", "b": [0.502, 0.545, 0.5864, 0.56]}]}, {"id": "b_1", "type": "paragraph", "text": "3.10 Data Sampling Strategies", "words": [{"w": "3.10", "b": [0.1312, 0.593, 0.1756, 0.6109]}, {"w": "Data", "b": [0.2005, 0.593, 0.2535, 0.6109]}, {"w": "Sampling", "b": [0.2618, 0.593, 0.3625, 0.6109]}, {"w": "Strategies", "b": [0.3708, 0.593, 0.4782, 0.6109]}]}, {"id": "b_2", "type": "paragraph", "text": "When you have a large data asset, so-called big data, it’s not always practical or necessary to work with the entire data asset. Instead, you can draw a smaller data sample that contains enough information for learning.", "words": [{"w": "When", "b": [0.1303, 0.632, 0.177, 0.6468]}, {"w": "you", "b": [0.1829, 0.632, 0.211, 0.6468]}, {"w": "have", "b": [0.2169, 0.632, 0.2525, 0.6468]}, {"w": "a", "b": [0.2584, 0.632, 0.2674, 0.6468]}, {"w": "large", "b": [0.2733, 0.632, 0.3115, 0.6468]}, {"w": "data", "b": [0.3174, 0.632, 0.3525, 0.6468]}, {"w": "asset,", "b": [0.3584, 0.632, 0.4018, 0.6468]}, {"w": "so-called", "b": [0.4077, 0.632, 0.4751, 0.6468]}, {"w": "big", "b": [0.481, 0.632, 0.5051, 0.6468]}, {"w": "data,", "b": [0.511, 0.632, 0.5512, 0.6468]}, {"w": "it’s", "b": [0.5571, 0.632, 0.5813, 0.6468]}, {"w": "not", "b": [0.5871, 0.632, 0.6133, 0.6468]}, {"w": "always", "b": [0.6191, 0.632, 0.6709, 0.6468]}, {"w": "practical", "b": [0.6768, 0.632, 0.7452, 0.6468]}, {"w": "or", "b": [0.751, 0.632, 0.7672, 0.6468]}, {"w": "necessary", "b": [0.773, 0.632, 0.8472, 0.6468]}, {"w": "to", "b": [0.853, 0.632, 0.8691, 0.6468]}, {"w": "work", "b": [0.1306, 0.6498, 0.1695, 0.6648]}, {"w": "with", "b": [0.1757, 0.6498, 0.2115, 0.6648]}, {"w": "the", "b": [0.2177, 0.6498, 0.2433, 0.6648]}, {"w": "entire", "b": [0.2495, 0.6498, 0.2951, 0.6648]}, {"w": "data", "b": [0.3013, 0.6498, 0.3371, 0.6648]}, {"w": "asset.", "b": [0.3433, 0.6498, 0.3875, 0.6648]}, {"w": "Instead,", "b": [0.3957, 0.6498, 0.4599, 0.6648]}, {"w": "you", "b": [0.466, 0.6498, 0.4947, 0.6648]}, {"w": "can", "b": [0.5009, 0.6498, 0.5285, 0.6648]}, {"w": "draw", "b": [0.5347, 0.6498, 0.5742, 0.6648]}, {"w": "a", "b": [0.5803, 0.6498, 0.5895, 0.6648]}, {"w": "smaller", "b": [0.5957, 0.6498, 0.6532, 0.6648]}, {"w": "data", "b": [0.6593, 0.6498, 0.6952, 0.6648]}, {"w": "sample", "b": [0.7014, 0.6498, 0.7568, 0.6648]}, {"w": "that", "b": [0.7629, 0.6498, 0.7967, 0.6648]}, {"w": "contains", "b": [0.8029, 0.6498, 0.8691, 0.6648]}, {"w": "enough", "b": [0.1312, 0.6677, 0.1887, 0.6827]}, {"w": "information", "b": [0.1948, 0.6677, 0.2887, 0.6827]}, {"w": "for", "b": [0.2948, 0.6677, 0.3169, 0.6827]}, {"w": "learning.", "b": [0.3231, 0.6677, 0.3929, 0.6827]}]}, {"id": "b_3", "type": "paragraph", "text": "Similarly, when you undersample the majority class to adjust for data imbalance, the smaller data sample should be representative of the entire majority class. In this section, we discuss several sampling strategies, their properties, advantages, and drawbacks.", "words": [{"w": "Similarly,", "b": [0.1312, 0.6948, 0.2056, 0.7096]}, {"w": "when", "b": [0.2117, 0.6948, 0.2529, 0.7096]}, {"w": "you", "b": [0.259, 0.6948, 0.2871, 0.7096]}, {"w": "undersample", "b": [0.2931, 0.6948, 0.3928, 0.7096]}, {"w": "the", "b": [0.3988, 0.6948, 0.424, 0.7096]}, {"w": "majority", "b": [0.43, 0.6948, 0.4974, 0.7096]}, {"w": "class", "b": [0.5035, 0.6948, 0.5398, 0.7096]}, {"w": "to", "b": [0.5459, 0.6948, 0.562, 0.7096]}, {"w": "adjust", "b": [0.568, 0.6948, 0.6169, 0.7096]}, {"w": "for", "b": [0.6229, 0.6948, 0.6446, 0.7096]}, {"w": "data", "b": [0.6506, 0.6948, 0.6858, 0.7096]}, {"w": "imbalance,", "b": [0.6919, 0.6948, 0.7758, 0.7096]}, {"w": "the", "b": [0.7819, 0.6948, 0.807, 0.7096]}, {"w": "smaller", "b": [0.813, 0.6948, 0.8695, 0.7096]}, {"w": "data", "b": [0.1312, 0.7127, 0.1668, 0.7276]}, {"w": "sample", "b": [0.1729, 0.7127, 0.2278, 0.7276]}, {"w": "should", "b": [0.2339, 0.7127, 0.2858, 0.7276]}, {"w": "be", "b": [0.292, 0.7127, 0.3108, 0.7276]}, {"w": "representative", "b": [0.3169, 0.7127, 0.4283, 0.7276]}, {"w": "of", "b": [0.4344, 0.7127, 0.4491, 0.7276]}, {"w": "the", "b": [0.4553, 0.7127, 0.4807, 0.7276]}, {"w": "entire", "b": [0.4868, 0.7127, 0.532, 0.7276]}, {"w": "majority", "b": [0.5382, 0.7127, 0.6062, 0.7276]}, {"w": "class.", "b": [0.6123, 0.7127, 0.6542, 0.7276]}, {"w": "In", "b": [0.6624, 0.7127, 0.6791, 0.7276]}, {"w": "this", "b": [0.6853, 0.7127, 0.7148, 0.7276]}, {"w": "section,", "b": [0.7209, 0.7127, 0.7809, 0.7276]}, {"w": "we", "b": [0.7871, 0.7127, 0.8079, 0.7276]}, {"w": "discuss", "b": [0.814, 0.7127, 0.8692, 0.7276]}, {"w": "several", "b": [0.1312, 0.7306, 0.1858, 0.7455]}, {"w": "sampling", "b": [0.1919, 0.7306, 0.2638, 0.7455]}, {"w": "strategies,", "b": [0.2699, 0.7306, 0.3512, 0.7455]}, {"w": "their", "b": [0.3574, 0.7306, 0.3954, 0.7455]}, {"w": "properties,", "b": [0.4015, 0.7306, 0.4874, 0.7455]}, {"w": "advantages,", "b": [0.4935, 0.7306, 0.5869, 0.7455]}, {"w": "and", "b": [0.5931, 0.7306, 0.6228, 0.7455]}, {"w": "drawbacks.", "b": [0.629, 0.7306, 0.7178, 0.7455]}]}, {"id": "b_4", "type": "paragraph", "text": "There are two main strategies: probability sampling and nonprobability sampling. In probability sampling, all examples have a chance to be selected. These techniques involve randomness.", "words": [{"w": "There", "b": [0.1306, 0.7574, 0.1787, 0.7725]}, {"w": "are", "b": [0.1877, 0.7574, 0.2129, 0.7725]}, {"w": "two", "b": [0.2219, 0.7574, 0.2511, 0.7725]}, {"w": "main", "b": [0.2601, 0.7574, 0.3009, 0.7725]}, {"w": "strategies:", "b": [0.3099, 0.7574, 0.3928, 0.7725]}, {"w": "probability", "b": [0.4067, 0.7574, 0.4967, 0.7725]}, {"w": "sampling", "b": [0.5056, 0.7574, 0.579, 0.7725]}, {"w": "and", "b": [0.5879, 0.7574, 0.6183, 0.7725]}, {"w": "nonprobability", "b": [0.6272, 0.7574, 0.7476, 0.7725]}, {"w": "sampling.", "b": [0.7566, 0.7574, 0.8351, 0.7725]}, {"w": "In", "b": [0.8518, 0.7574, 0.8691, 0.7725]}, {"w": "probability", "b": [0.1312, 0.7754, 0.2328, 0.7904]}, {"w": "sampling,", "b": [0.2398, 0.7754, 0.3273, 0.7904]}, {"w": "all", "b": [0.3333, 0.7755, 0.3524, 0.7904]}, {"w": "examples", "b": [0.3585, 0.7755, 0.4304, 0.7904]}, {"w": "have", "b": [0.4365, 0.7755, 0.4721, 0.7904]}, {"w": "a", "b": [0.4782, 0.7755, 0.4872, 0.7904]}, {"w": "chance", "b": [0.4932, 0.7755, 0.546, 0.7904]}, {"w": "to", "b": [0.552, 0.7755, 0.5681, 0.7904]}, {"w": "be", "b": [0.5741, 0.7755, 0.5928, 0.7904]}, {"w": "selected.", "b": [0.5988, 0.7755, 0.6652, 0.7904]}, {"w": "These", "b": [0.6734, 0.7755, 0.7197, 0.7904]}, {"w": "techniques", "b": [0.7258, 0.7755, 0.8083, 0.7904]}, {"w": "involve", "b": [0.8143, 0.7755, 0.8691, 0.7904]}, {"w": "randomness.", "b": [0.1312, 0.7934, 0.231, 0.8083]}]}, {"id": "b_5", "type": "paragraph", "text": "Nonprobability sampling is not random. To build a sample, it follows a fixed deterministic sequence of heuristic actions. This means that some examples don’t have a chance of being selected, no matter how many samples you build.", "words": [{"w": "Nonprobability", "b": [0.1312, 0.8203, 0.2718, 0.8353]}, {"w": "sampling", "b": [0.2774, 0.8203, 0.3598, 0.8353]}, {"w": "is", "b": [0.3648, 0.8204, 0.3769, 0.8352]}, {"w": "not", "b": [0.3818, 0.8204, 0.4079, 0.8352]}, {"w": "random.", "b": [0.4128, 0.8204, 0.4781, 0.8352]}, {"w": "To", "b": [0.4859, 0.8204, 0.5064, 0.8352]}, {"w": "build", "b": [0.5113, 0.8204, 0.5515, 0.8352]}, {"w": "a", "b": [0.5564, 0.8204, 0.5654, 0.8352]}, {"w": "sample,", "b": [0.5702, 0.8204, 0.6296, 0.8352]}, {"w": "it", "b": [0.6348, 0.8204, 0.6468, 0.8352]}, {"w": "follows", "b": [0.6517, 0.8204, 0.705, 0.8352]}, {"w": "a", "b": [0.7099, 0.8204, 0.7189, 0.8352]}, {"w": "fixed", "b": [0.7238, 0.8204, 0.7615, 0.8352]}, {"w": "deterministic", "b": [0.7663, 0.8204, 0.869, 0.8352]}, {"w": "sequence", "b": [0.1312, 0.8382, 0.2017, 0.8532]}, {"w": "of", "b": [0.2078, 0.8382, 0.2227, 0.8532]}, {"w": "heuristic", "b": [0.2288, 0.8382, 0.2978, 0.8532]}, {"w": "actions.", "b": [0.3039, 0.8382, 0.3656, 0.8532]}, {"w": "This", "b": [0.3738, 0.8382, 0.4098, 0.8532]}, {"w": "means", "b": [0.4159, 0.8382, 0.4663, 0.8532]}, {"w": "that", "b": [0.4725, 0.8382, 0.5063, 0.8532]}, {"w": "some", "b": [0.5125, 0.8382, 0.5526, 0.8532]}, {"w": "examples", "b": [0.5587, 0.8382, 0.6322, 0.8532]}, {"w": "don’t", "b": [0.6383, 0.8382, 0.6804, 0.8532]}, {"w": "have", "b": [0.6865, 0.8382, 0.723, 0.8532]}, {"w": "a", "b": [0.7291, 0.8382, 0.7383, 0.8532]}, {"w": "chance", "b": [0.7445, 0.8382, 0.7984, 0.8532]}, {"w": "of", "b": [0.8045, 0.8382, 0.8194, 0.8532]}, {"w": "being", "b": [0.8255, 0.8382, 0.8691, 0.8532]}, {"w": "selected,", "b": [0.1312, 0.8562, 0.1991, 0.8711]}, {"w": "no", "b": [0.2052, 0.8562, 0.2247, 0.8711]}, {"w": "matter", "b": [0.2308, 0.8562, 0.2852, 0.8711]}, {"w": "how", "b": [0.2914, 0.8562, 0.3237, 0.8711]}, {"w": "many", "b": [0.3298, 0.8562, 0.3739, 0.8711]}, {"w": "samples", "b": [0.38, 0.8562, 0.4428, 0.8711]}, {"w": "you", "b": [0.4489, 0.8562, 0.4777, 0.8711]}, {"w": "build.", "b": [0.4838, 0.8562, 0.53, 0.8711]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 36", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "36", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 80, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "(a) original data (b) Tomek links (c) undersampled data", "words": [{"w": "(a)", "b": [0.1538, 0.2601, 0.1773, 0.275]}, {"w": "original", "b": [0.1835, 0.2601, 0.244, 0.275]}, {"w": "data", "b": [0.2502, 0.2601, 0.2861, 0.275]}, {"w": "(b)", "b": [0.4346, 0.2601, 0.4592, 0.275]}, {"w": "Tomek", "b": [0.4653, 0.2601, 0.5196, 0.275]}, {"w": "links", "b": [0.5258, 0.2601, 0.5633, 0.275]}, {"w": "(c)", "b": [0.6867, 0.2601, 0.7092, 0.275]}, {"w": "undersampled", "b": [0.7154, 0.2601, 0.8273, 0.275]}, {"w": "data", "b": [0.8335, 0.2601, 0.8693, 0.275]}]}, {"id": "b_1", "type": "paragraph", "text": "Figure 17: Undersampling with Tomek links.", "words": [{"w": "Figure", "b": [0.3186, 0.2913, 0.3707, 0.3063]}, {"w": "17:", "b": [0.3768, 0.2913, 0.4004, 0.3063]}, {"w": "Undersampling", "b": [0.4086, 0.2913, 0.5302, 0.3063]}, {"w": "with", "b": [0.5364, 0.2913, 0.5723, 0.3063]}, {"w": "Tomek", "b": [0.5784, 0.2913, 0.6327, 0.3063]}, {"w": "links.", "b": [0.6389, 0.2913, 0.6816, 0.3063]}]}, {"id": "b_2", "type": "paragraph", "text": "Historically, nonprobability methods were more manageable for a human to execute manually. Nowadays this advantage is not significant. Data analysts use computers and software that greatly simplify sampling, even from big data. The main drawback of nonprobability sampling methods is that they include non-representative samples and might systematically exclude important examples. These drawbacks outweigh the possible advantages of nonprobability sampling methods. Therefore, in this book I will only present probability sampling methods.", "words": [{"w": "Historically,", "b": [0.1312, 0.3417, 0.2253, 0.3565]}, {"w": "nonprobability", "b": [0.2311, 0.3417, 0.3467, 0.3565]}, {"w": "methods", "b": [0.3523, 0.3417, 0.4193, 0.3565]}, {"w": "were", "b": [0.4249, 0.3417, 0.4606, 0.3565]}, {"w": "more", "b": [0.4663, 0.3417, 0.5055, 0.3565]}, {"w": "manageable", "b": [0.5112, 0.3417, 0.6036, 0.3565]}, {"w": "for", "b": [0.6093, 0.3417, 0.6309, 0.3565]}, {"w": "a", "b": [0.6366, 0.3417, 0.6456, 0.3565]}, {"w": "human", "b": [0.6512, 0.3417, 0.705, 0.3565]}, {"w": "to", "b": [0.7106, 0.3417, 0.7267, 0.3565]}, {"w": "execute", "b": [0.7324, 0.3417, 0.7912, 0.3565]}, {"w": "manually.", "b": [0.7968, 0.3417, 0.8726, 0.3565]}, {"w": "Nowadays", "b": [0.1312, 0.3595, 0.212, 0.3745]}, {"w": "this", "b": [0.2181, 0.3595, 0.248, 0.3745]}, {"w": "advantage", "b": [0.2542, 0.3595, 0.3354, 0.3745]}, {"w": "is", "b": [0.3415, 0.3595, 0.3539, 0.3745]}, {"w": "not", "b": [0.3601, 0.3595, 0.3868, 0.3745]}, {"w": "significant.", "b": [0.393, 0.3595, 0.4799, 0.3745]}, {"w": "Data", "b": [0.4881, 0.3595, 0.5279, 0.3745]}, {"w": "analysts", "b": [0.534, 0.3595, 0.5995, 0.3745]}, {"w": "use", "b": [0.6057, 0.3595, 0.6315, 0.3745]}, {"w": "computers", "b": [0.6376, 0.3595, 0.721, 0.3745]}, {"w": "and", "b": [0.7271, 0.3595, 0.7569, 0.3745]}, {"w": "software", "b": [0.7631, 0.3595, 0.8295, 0.3745]}, {"w": "that", "b": [0.8357, 0.3595, 0.8696, 0.3745]}, {"w": "greatly", "b": [0.1312, 0.3776, 0.1861, 0.3924]}, {"w": "simplify", "b": [0.1911, 0.3776, 0.2535, 0.3924]}, {"w": "sampling,", "b": [0.2585, 0.3776, 0.3339, 0.3924]}, {"w": "even", "b": [0.3392, 0.3776, 0.3743, 0.3924]}, {"w": "from", "b": [0.3793, 0.3776, 0.4161, 0.3924]}, {"w": "big", "b": [0.4211, 0.3776, 0.4452, 0.3924]}, {"w": "data.", "b": [0.4502, 0.3776, 0.4904, 0.3924]}, {"w": "The", "b": [0.4982, 0.3776, 0.5293, 0.3924]}, {"w": "main", "b": [0.5344, 0.3776, 0.5735, 0.3924]}, {"w": "drawback", "b": [0.5785, 0.3776, 0.6534, 0.3924]}, {"w": "of", "b": [0.6584, 0.3776, 0.673, 0.3924]}, {"w": "nonprobability", "b": [0.678, 0.3776, 0.7936, 0.3924]}, {"w": "sampling", "b": [0.7986, 0.3776, 0.8691, 0.3924]}, {"w": "methods", "b": [0.1312, 0.3954, 0.2003, 0.4104]}, {"w": "is", "b": [0.2064, 0.3954, 0.219, 0.4104]}, {"w": "that", "b": [0.2251, 0.3954, 0.2594, 0.4104]}, {"w": "they", "b": [0.2655, 0.3954, 0.3013, 0.4104]}, {"w": "include", "b": [0.3074, 0.3954, 0.3655, 0.4104]}, {"w": "non-representative", "b": [0.3717, 0.3954, 0.5217, 0.4104]}, {"w": "samples", "b": [0.5279, 0.3954, 0.5913, 0.4104]}, {"w": "and", "b": [0.5975, 0.3954, 0.6275, 0.4104]}, {"w": "might", "b": [0.6337, 0.3954, 0.6809, 0.4104]}, {"w": "systematically", "b": [0.687, 0.3954, 0.8023, 0.4104]}, {"w": "exclude", "b": [0.8085, 0.3954, 0.8692, 0.4104]}, {"w": "important", "b": [0.1312, 0.4133, 0.2133, 0.4284]}, {"w": "examples.", "b": [0.2195, 0.4133, 0.299, 0.4284]}, {"w": "These", "b": [0.3072, 0.4133, 0.3551, 0.4284]}, {"w": "drawbacks", "b": [0.3613, 0.4133, 0.4461, 0.4284]}, {"w": "outweigh", "b": [0.4522, 0.4133, 0.525, 0.4284]}, {"w": "the", "b": [0.5311, 0.4133, 0.5571, 0.4284]}, {"w": "possible", "b": [0.5632, 0.4133, 0.6273, 0.4284]}, {"w": "advantages", "b": [0.6335, 0.4133, 0.7229, 0.4284]}, {"w": "of", "b": [0.7291, 0.4133, 0.7441, 0.4284]}, {"w": "nonprobability", "b": [0.7503, 0.4133, 0.8698, 0.4284]}, {"w": "sampling", "b": [0.1312, 0.4314, 0.2022, 0.4463]}, {"w": "methods.", "b": [0.2083, 0.4314, 0.2808, 0.4463]}, {"w": "Therefore,", "b": [0.289, 0.4314, 0.3706, 0.4463]}, {"w": "in", "b": [0.3767, 0.4314, 0.3919, 0.4463]}, {"w": "this", "b": [0.3981, 0.4314, 0.4275, 0.4463]}, {"w": "book", "b": [0.4337, 0.4314, 0.4727, 0.4463]}, {"w": "I", "b": [0.4788, 0.4314, 0.4854, 0.4463]}, {"w": "will", "b": [0.4915, 0.4314, 0.5199, 0.4463]}, {"w": "only", "b": [0.526, 0.4314, 0.5599, 0.4463]}, {"w": "present", "b": [0.5661, 0.4314, 0.6234, 0.4463]}, {"w": "probability", "b": [0.6296, 0.4314, 0.7166, 0.4463]}, {"w": "sampling", "b": [0.7228, 0.4314, 0.7937, 0.4463]}, {"w": "methods.", "b": [0.7999, 0.4314, 0.8724, 0.4463]}]}, {"id": "b_3", "type": "paragraph", "text": "3.10.1 Simple Random Sampling", "words": [{"w": "3.10.1", "b": [0.1312, 0.4792, 0.1855, 0.4941]}, {"w": "Simple", "b": [0.2067, 0.4792, 0.2695, 0.4941]}, {"w": "Random", "b": [0.2765, 0.4792, 0.3546, 0.4941]}, {"w": "Sampling", "b": [0.3617, 0.4792, 0.4475, 0.4941]}]}, {"id": "b_4", "type": "paragraph", "text": "Simple random sampling is the most straightforward method, and the one I refer to when I say “sample randomly.” Here, each example from the entire dataset is chosen purely by chance; each example has an equal chance of being selected.", "words": [{"w": "Simple", "b": [0.1312, 0.5158, 0.194, 0.5307]}, {"w": "random", "b": [0.2003, 0.5158, 0.2713, 0.5307]}, {"w": "sampling", "b": [0.2776, 0.5158, 0.3599, 0.5307]}, {"w": "is", "b": [0.3656, 0.5159, 0.3778, 0.5307]}, {"w": "the", "b": [0.3833, 0.5159, 0.4084, 0.5307]}, {"w": "most", "b": [0.4139, 0.5159, 0.4522, 0.5307]}, {"w": "straightforward", "b": [0.4577, 0.5159, 0.579, 0.5307]}, {"w": "method,", "b": [0.5845, 0.5159, 0.6493, 0.5307]}, {"w": "and", "b": [0.655, 0.5159, 0.6841, 0.5307]}, {"w": "the", "b": [0.6896, 0.5159, 0.7147, 0.5307]}, {"w": "one", "b": [0.7202, 0.5159, 0.7474, 0.5307]}, {"w": "I", "b": [0.7529, 0.5159, 0.7594, 0.5307]}, {"w": "refer", "b": [0.7649, 0.5159, 0.8007, 0.5307]}, {"w": "to", "b": [0.8062, 0.5159, 0.8223, 0.5307]}, {"w": "when", "b": [0.8278, 0.5159, 0.869, 0.5307]}, {"w": "I", "b": [0.1312, 0.5336, 0.138, 0.5487]}, {"w": "say", "b": [0.1447, 0.5336, 0.1709, 0.5487]}, {"w": "“sample", "b": [0.1775, 0.5336, 0.243, 0.5487]}, {"w": "randomly.”", "b": [0.2496, 0.5336, 0.3376, 0.5487]}, {"w": "Here,", "b": [0.3472, 0.5336, 0.3907, 0.5487]}, {"w": "each", "b": [0.3975, 0.5336, 0.4336, 0.5487]}, {"w": "example", "b": [0.4402, 0.5336, 0.5077, 0.5487]}, {"w": "from", "b": [0.5143, 0.5336, 0.5525, 0.5487]}, {"w": "the", "b": [0.5591, 0.5336, 0.5853, 0.5487]}, {"w": "entire", "b": [0.5919, 0.5336, 0.6385, 0.5487]}, {"w": "dataset", "b": [0.6452, 0.5336, 0.7049, 0.5487]}, {"w": "is", "b": [0.7115, 0.5336, 0.7242, 0.5487]}, {"w": "chosen", "b": [0.7308, 0.5336, 0.7848, 0.5487]}, {"w": "purely", "b": [0.7914, 0.5336, 0.8433, 0.5487]}, {"w": "by", "b": [0.8499, 0.5336, 0.8698, 0.5487]}, {"w": "chance;", "b": [0.1312, 0.5516, 0.1902, 0.5666]}, {"w": "each", "b": [0.1964, 0.5516, 0.2317, 0.5666]}, {"w": "example", "b": [0.2379, 0.5516, 0.304, 0.5666]}, {"w": "has", "b": [0.3102, 0.5516, 0.337, 0.5666]}, {"w": "an", "b": [0.3431, 0.5516, 0.3626, 0.5666]}, {"w": "equal", "b": [0.3687, 0.5516, 0.4113, 0.5666]}, {"w": "chance", "b": [0.4175, 0.5516, 0.4713, 0.5666]}, {"w": "of", "b": [0.4775, 0.5516, 0.4923, 0.5666]}, {"w": "being", "b": [0.4985, 0.5516, 0.5421, 0.5666]}, {"w": "selected.", "b": [0.5482, 0.5516, 0.616, 0.5666]}]}, {"id": "b_5", "type": "paragraph", "text": "One way of obtaining a simple random sample is to assign a number to each example, and then use a random number generator to decide which examples to select. For example, if your entire dataset contains 1000 examples, tagged from 0 to 999, use groups of three digits from the random number generator to select an example. So, if the first three numbers from the random number generator were 0, 5, and 7, choose the example numbered 57, and so on.", "words": [{"w": "One", "b": [0.1312, 0.5785, 0.1644, 0.5935]}, {"w": "way", "b": [0.1706, 0.5785, 0.2021, 0.5935]}, {"w": "of", "b": [0.2083, 0.5785, 0.2233, 0.5935]}, {"w": "obtaining", "b": [0.2295, 0.5785, 0.3061, 0.5935]}, {"w": "a", "b": [0.3123, 0.5785, 0.3216, 0.5935]}, {"w": "simple", "b": [0.3278, 0.5785, 0.3797, 0.5935]}, {"w": "random", "b": [0.3858, 0.5785, 0.448, 0.5935]}, {"w": "sample", "b": [0.4542, 0.5785, 0.5102, 0.5935]}, {"w": "is", "b": [0.5164, 0.5785, 0.5289, 0.5935]}, {"w": "to", "b": [0.5351, 0.5785, 0.5516, 0.5935]}, {"w": "assign", "b": [0.5578, 0.5785, 0.6067, 0.5935]}, {"w": "a", "b": [0.6129, 0.5785, 0.6222, 0.5935]}, {"w": "number", "b": [0.6284, 0.5785, 0.69, 0.5935]}, {"w": "to", "b": [0.6962, 0.5785, 0.7128, 0.5935]}, {"w": "each", "b": [0.7189, 0.5785, 0.7547, 0.5935]}, {"w": "example,", "b": [0.7608, 0.5785, 0.8328, 0.5935]}, {"w": "and", "b": [0.839, 0.5785, 0.869, 0.5935]}, {"w": "then", "b": [0.1312, 0.5964, 0.1679, 0.6115]}, {"w": "use", "b": [0.1744, 0.5964, 0.2006, 0.6115]}, {"w": "a", "b": [0.2072, 0.5964, 0.2166, 0.6115]}, {"w": "random", "b": [0.2231, 0.5964, 0.2859, 0.6115]}, {"w": "number", "b": [0.2924, 0.5964, 0.3547, 0.6115]}, {"w": "generator", "b": [0.3612, 0.5964, 0.4387, 0.6115]}, {"w": "to", "b": [0.4453, 0.5964, 0.462, 0.6115]}, {"w": "decide", "b": [0.4685, 0.5964, 0.5198, 0.6115]}, {"w": "which", "b": [0.5263, 0.5964, 0.5739, 0.6115]}, {"w": "examples", "b": [0.5804, 0.5964, 0.6553, 0.6115]}, {"w": "to", "b": [0.6619, 0.5964, 0.6786, 0.6115]}, {"w": "select.", "b": [0.6851, 0.5964, 0.7354, 0.6115]}, {"w": "For", "b": [0.7448, 0.5964, 0.7723, 0.6115]}, {"w": "example,", "b": [0.7788, 0.5964, 0.8515, 0.6115]}, {"w": "if", "b": [0.8581, 0.5964, 0.8691, 0.6115]}, {"w": "your", "b": [0.1308, 0.6145, 0.1664, 0.6294]}, {"w": "entire", "b": [0.1726, 0.6145, 0.218, 0.6294]}, {"w": "dataset", "b": [0.2241, 0.6145, 0.2823, 0.6294]}, {"w": "contains", "b": [0.2884, 0.6145, 0.3542, 0.6294]}, {"w": "1000", "b": [0.3603, 0.6145, 0.3969, 0.6294]}, {"w": "examples,", "b": [0.4031, 0.6145, 0.4811, 0.6294]}, {"w": "tagged", "b": [0.4872, 0.6145, 0.5402, 0.6294]}, {"w": "from", "b": [0.5463, 0.6145, 0.5835, 0.6294]}, {"w": "0", "b": [0.5896, 0.6145, 0.5988, 0.6294]}, {"w": "to", "b": [0.6049, 0.6145, 0.6212, 0.6294]}, {"w": "999,", "b": [0.6274, 0.6145, 0.66, 0.6294]}, {"w": "use", "b": [0.6661, 0.6145, 0.6917, 0.6294]}, {"w": "groups", "b": [0.6978, 0.6145, 0.751, 0.6294]}, {"w": "of", "b": [0.7571, 0.6145, 0.7719, 0.6294]}, {"w": "three", "b": [0.7781, 0.6145, 0.8188, 0.6294]}, {"w": "digits", "b": [0.825, 0.6145, 0.8689, 0.6294]}, {"w": "from", "b": [0.1312, 0.6325, 0.1682, 0.6473]}, {"w": "the", "b": [0.1743, 0.6325, 0.1996, 0.6473]}, {"w": "random", "b": [0.2057, 0.6325, 0.2664, 0.6473]}, {"w": "number", "b": [0.2726, 0.6325, 0.3328, 0.6473]}, {"w": "generator", "b": [0.3389, 0.6325, 0.4138, 0.6473]}, {"w": "to", "b": [0.4199, 0.6325, 0.4361, 0.6473]}, {"w": "select", "b": [0.4423, 0.6325, 0.4858, 0.6473]}, {"w": "an", "b": [0.492, 0.6325, 0.5112, 0.6473]}, {"w": "example.", "b": [0.5173, 0.6325, 0.5876, 0.6473]}, {"w": "So,", "b": [0.5958, 0.6325, 0.6201, 0.6473]}, {"w": "if", "b": [0.6262, 0.6325, 0.6368, 0.6473]}, {"w": "the", "b": [0.6429, 0.6325, 0.6682, 0.6473]}, {"w": "first", "b": [0.6744, 0.6325, 0.7059, 0.6473]}, {"w": "three", "b": [0.712, 0.6325, 0.7525, 0.6473]}, {"w": "numbers", "b": [0.7586, 0.6325, 0.826, 0.6473]}, {"w": "from", "b": [0.8321, 0.6325, 0.8691, 0.6473]}, {"w": "the", "b": [0.1312, 0.6504, 0.1565, 0.6653]}, {"w": "random", "b": [0.1627, 0.6504, 0.2234, 0.6653]}, {"w": "number", "b": [0.2296, 0.6504, 0.2899, 0.6653]}, {"w": "generator", "b": [0.296, 0.6504, 0.371, 0.6653]}, {"w": "were", "b": [0.3771, 0.6504, 0.4131, 0.6653]}, {"w": "0,", "b": [0.4191, 0.6504, 0.4333, 0.6653]}, {"w": "5,", "b": [0.4394, 0.6504, 0.4536, 0.6653]}, {"w": "and", "b": [0.4597, 0.6504, 0.4891, 0.6653]}, {"w": "7,", "b": [0.4952, 0.6504, 0.5094, 0.6653]}, {"w": "choose", "b": [0.5155, 0.6504, 0.5672, 0.6653]}, {"w": "the", "b": [0.5734, 0.6504, 0.5987, 0.6653]}, {"w": "example", "b": [0.6048, 0.6504, 0.6701, 0.6653]}, {"w": "numbered", "b": [0.6762, 0.6504, 0.7547, 0.6653]}, {"w": "57,", "b": [0.7608, 0.6504, 0.784, 0.6653]}, {"w": "and", "b": [0.7902, 0.6504, 0.8195, 0.6653]}, {"w": "so", "b": [0.8257, 0.6504, 0.842, 0.6653]}, {"w": "on.", "b": [0.8481, 0.6504, 0.8724, 0.6653]}]}, {"id": "b_6", "type": "paragraph", "text": "Simplicity is the great advantage of this sampling method, and it can be easily implemented as any programming language can serve as a random number generator. A disadvantage of simple random sampling is that you may not select enough examples that would have a particular property of interest. Consider the situation where you extract a sample from a large imbalanced dataset. In so doing, you accidentally fail to capture a sufficient number of examples from the minority class - or any at all.", "words": [{"w": "Simplicity", "b": [0.1312, 0.6774, 0.2112, 0.6922]}, {"w": "is", "b": [0.2173, 0.6774, 0.2296, 0.6922]}, {"w": "the", "b": [0.2357, 0.6774, 0.261, 0.6922]}, {"w": "great", "b": [0.2672, 0.6774, 0.3077, 0.6922]}, {"w": "advantage", "b": [0.3139, 0.6774, 0.3938, 0.6922]}, {"w": "of", "b": [0.4, 0.6774, 0.4146, 0.6922]}, {"w": "this", "b": [0.4208, 0.6774, 0.4502, 0.6922]}, {"w": "sampling", "b": [0.4564, 0.6774, 0.5273, 0.6922]}, {"w": "method,", "b": [0.5335, 0.6774, 0.5988, 0.6922]}, {"w": "and", "b": [0.6049, 0.6774, 0.6343, 0.6922]}, {"w": "it", "b": [0.6404, 0.6774, 0.6526, 0.6922]}, {"w": "can", "b": [0.6587, 0.6774, 0.6861, 0.6922]}, {"w": "be", "b": [0.6922, 0.6774, 0.7109, 0.6922]}, {"w": "easily", "b": [0.7171, 0.6774, 0.7612, 0.6922]}, {"w": "implemented", "b": [0.7674, 0.6774, 0.8691, 0.6922]}, {"w": "as", "b": [0.1312, 0.6951, 0.1481, 0.7102]}, {"w": "any", "b": [0.155, 0.6951, 0.1843, 0.7102]}, {"w": "programming", "b": [0.1912, 0.6951, 0.3011, 0.7102]}, {"w": "language", "b": [0.308, 0.6951, 0.3801, 0.7102]}, {"w": "can", "b": [0.387, 0.6951, 0.4153, 0.7102]}, {"w": "serve", "b": [0.4222, 0.6951, 0.4632, 0.7102]}, {"w": "as", "b": [0.4701, 0.6951, 0.4869, 0.7102]}, {"w": "a", "b": [0.4938, 0.6951, 0.5032, 0.7102]}, {"w": "random", "b": [0.5101, 0.6951, 0.5729, 0.7102]}, {"w": "number", "b": [0.5798, 0.6951, 0.6421, 0.7102]}, {"w": "generator.", "b": [0.649, 0.6951, 0.7318, 0.7102]}, {"w": "A", "b": [0.7422, 0.6951, 0.7564, 0.7102]}, {"w": "disadvantage", "b": [0.7633, 0.6951, 0.869, 0.7102]}, {"w": "of", "b": [0.1312, 0.7131, 0.1463, 0.7281]}, {"w": "simple", "b": [0.1524, 0.7131, 0.2045, 0.7281]}, {"w": "random", "b": [0.2106, 0.7131, 0.273, 0.7281]}, {"w": "sampling", "b": [0.2791, 0.7131, 0.352, 0.7281]}, {"w": "is", "b": [0.3581, 0.7131, 0.3707, 0.7281]}, {"w": "that", "b": [0.3768, 0.7131, 0.4111, 0.7281]}, {"w": "you", "b": [0.4172, 0.7131, 0.4463, 0.7281]}, {"w": "may", "b": [0.4525, 0.7131, 0.4867, 0.7281]}, {"w": "not", "b": [0.4929, 0.7131, 0.5199, 0.7281]}, {"w": "select", "b": [0.526, 0.7131, 0.5708, 0.7281]}, {"w": "enough", "b": [0.5769, 0.7131, 0.6351, 0.7281]}, {"w": "examples", "b": [0.6413, 0.7131, 0.7157, 0.7281]}, {"w": "that", "b": [0.7218, 0.7131, 0.7561, 0.7281]}, {"w": "would", "b": [0.7622, 0.7131, 0.8105, 0.7281]}, {"w": "have", "b": [0.8167, 0.7131, 0.8535, 0.7281]}, {"w": "a", "b": [0.8597, 0.7131, 0.869, 0.7281]}, {"w": "particular", "b": [0.1312, 0.731, 0.2119, 0.7461]}, {"w": "property", "b": [0.2182, 0.731, 0.2889, 0.7461]}, {"w": "of", "b": [0.2953, 0.731, 0.3104, 0.7461]}, {"w": "interest.", "b": [0.3168, 0.731, 0.3834, 0.7461]}, {"w": "Consider", "b": [0.3921, 0.731, 0.4645, 0.7461]}, {"w": "the", "b": [0.4708, 0.731, 0.497, 0.7461]}, {"w": "situation", "b": [0.5033, 0.731, 0.5756, 0.7461]}, {"w": "where", "b": [0.5819, 0.731, 0.6301, 0.7461]}, {"w": "you", "b": [0.6364, 0.731, 0.6657, 0.7461]}, {"w": "extract", "b": [0.672, 0.731, 0.7301, 0.7461]}, {"w": "a", "b": [0.7365, 0.731, 0.7459, 0.7461]}, {"w": "sample", "b": [0.7522, 0.731, 0.8088, 0.7461]}, {"w": "from", "b": [0.8151, 0.731, 0.8534, 0.7461]}, {"w": "a", "b": [0.8597, 0.731, 0.8691, 0.7461]}, {"w": "large", "b": [0.1312, 0.7491, 0.1697, 0.764]}, {"w": "imbalanced", "b": [0.1759, 0.7491, 0.2653, 0.764]}, {"w": "dataset.", "b": [0.2715, 0.7491, 0.3343, 0.764]}, {"w": "In", "b": [0.3425, 0.7491, 0.3592, 0.764]}, {"w": "so", "b": [0.3654, 0.7491, 0.3816, 0.764]}, {"w": "doing,", "b": [0.3878, 0.7491, 0.4363, 0.764]}, {"w": "you", "b": [0.4425, 0.7491, 0.4708, 0.764]}, {"w": "accidentally", "b": [0.477, 0.7491, 0.571, 0.764]}, {"w": "fail", "b": [0.5771, 0.7491, 0.6019, 0.764]}, {"w": "to", "b": [0.6081, 0.7491, 0.6242, 0.764]}, {"w": "capture", "b": [0.6304, 0.7491, 0.6901, 0.764]}, {"w": "a", "b": [0.6963, 0.7491, 0.7054, 0.764]}, {"w": "sufficient", "b": [0.7115, 0.7491, 0.7819, 0.764]}, {"w": "number", "b": [0.7881, 0.7491, 0.8483, 0.764]}, {"w": "of", "b": [0.8544, 0.7491, 0.8691, 0.764]}, {"w": "examples", "b": [0.1312, 0.767, 0.2047, 0.782]}, {"w": "from", "b": [0.2108, 0.767, 0.2483, 0.782]}, {"w": "the", "b": [0.2544, 0.767, 0.2801, 0.782]}, {"w": "minority", "b": [0.2862, 0.767, 0.355, 0.782]}, {"w": "class", "b": [0.3611, 0.767, 0.3982, 0.782]}, {"w": "-", "b": [0.4044, 0.767, 0.4105, 0.782]}, {"w": "or", "b": [0.4167, 0.767, 0.4332, 0.782]}, {"w": "any", "b": [0.4393, 0.767, 0.468, 0.782]}, {"w": "at", "b": [0.4741, 0.767, 0.4906, 0.782]}, {"w": "all.", "b": [0.4967, 0.767, 0.5213, 0.782]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 37", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "37", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 81, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3.10.2 Systematic Sampling", "words": [{"w": "3.10.2", "b": [0.1312, 0.0884, 0.1855, 0.1034]}, {"w": "Systematic", "b": [0.2067, 0.0884, 0.3076, 0.1034]}, {"w": "Sampling", "b": [0.3147, 0.0884, 0.4004, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "To implement systematic sampling (also known as interval sampling), you create a list containing all examples. From that list, you randomly select the first example xstart from the first k elements on the list. Then, you select every kth item on the list starting from xstart. You choose such a value of k that will give you a sample of the desired size.", "words": [{"w": "To", "b": [0.1306, 0.1251, 0.1512, 0.1399]}, {"w": "implement", "b": [0.1574, 0.1251, 0.2407, 0.1399]}, {"w": "systematic", "b": [0.2468, 0.125, 0.3443, 0.1399]}, {"w": "sampling", "b": [0.3514, 0.125, 0.4337, 0.1399]}, {"w": "(also", "b": [0.4401, 0.1251, 0.4775, 0.1399]}, {"w": "known", "b": [0.4837, 0.1251, 0.5352, 0.1399]}, {"w": "as", "b": [0.5413, 0.1251, 0.5576, 0.1399]}, {"w": "interval", "b": [0.5637, 0.125, 0.6338, 0.1399]}, {"w": "sampling),", "b": [0.6409, 0.125, 0.7355, 0.1399]}, {"w": "you", "b": [0.7416, 0.1251, 0.7699, 0.1399]}, {"w": "create", "b": [0.7761, 0.1251, 0.8236, 0.1399]}, {"w": "a", "b": [0.8297, 0.1251, 0.8388, 0.1399]}, {"w": "list", "b": [0.845, 0.1251, 0.8693, 0.1399]}, {"w": "containing", "b": [0.1312, 0.1428, 0.2165, 0.1579]}, {"w": "all", "b": [0.2227, 0.1428, 0.2425, 0.1579]}, {"w": "examples.", "b": [0.2487, 0.1428, 0.3288, 0.1579]}, {"w": "From", "b": [0.337, 0.1428, 0.3802, 0.1579]}, {"w": "that", "b": [0.3864, 0.1428, 0.4209, 0.1579]}, {"w": "list,", "b": [0.4271, 0.1428, 0.4575, 0.1579]}, {"w": "you", "b": [0.4637, 0.1428, 0.493, 0.1579]}, {"w": "randomly", "b": [0.4991, 0.1428, 0.5771, 0.1579]}, {"w": "select", "b": [0.5832, 0.1428, 0.6284, 0.1579]}, {"w": "the", "b": [0.6345, 0.1428, 0.6607, 0.1579]}, {"w": "first", "b": [0.6668, 0.1428, 0.6994, 0.1579]}, {"w": "example", "b": [0.7056, 0.1428, 0.773, 0.1579]}, {"w": "xstart", "b": [0.7789, 0.1429, 0.8235, 0.1591]}, {"w": "from", "b": [0.8306, 0.1428, 0.8688, 0.1579]}, {"w": "the", "b": [0.1312, 0.1607, 0.1574, 0.1759]}, {"w": "first", "b": [0.1643, 0.1607, 0.1969, 0.1759]}, {"w": "k", "b": [0.2037, 0.1608, 0.2133, 0.1758]}, {"w": "elements", "b": [0.2208, 0.1607, 0.2915, 0.1759]}, {"w": "on", "b": [0.2984, 0.1607, 0.3182, 0.1759]}, {"w": "the", "b": [0.3251, 0.1607, 0.3513, 0.1759]}, {"w": "list.", "b": [0.3582, 0.1607, 0.3886, 0.1759]}, {"w": "Then,", "b": [0.399, 0.1607, 0.4471, 0.1759]}, {"w": "you", "b": [0.4542, 0.1607, 0.4835, 0.1759]}, {"w": "select", "b": [0.4904, 0.1607, 0.5355, 0.1759]}, {"w": "every", "b": [0.5424, 0.1607, 0.5858, 0.1759]}, {"w": "kth", "b": [0.5925, 0.1589, 0.6166, 0.1758]}, {"w": "item", "b": [0.6244, 0.1607, 0.661, 0.1759]}, {"w": "on", "b": [0.6679, 0.1607, 0.6878, 0.1759]}, {"w": "the", "b": [0.6947, 0.1607, 0.7208, 0.1759]}, {"w": "list", "b": [0.7277, 0.1607, 0.7529, 0.1759]}, {"w": "starting", "b": [0.7598, 0.1607, 0.8237, 0.1759]}, {"w": "from", "b": [0.8306, 0.1607, 0.8689, 0.1759]}, {"w": "xstart.", "b": [0.1312, 0.1788, 0.1818, 0.195]}, {"w": "You", "b": [0.19, 0.1788, 0.2218, 0.1938]}, {"w": "choose", "b": [0.228, 0.1788, 0.2804, 0.1938]}, {"w": "such", "b": [0.2865, 0.1788, 0.322, 0.1938]}, {"w": "a", "b": [0.3282, 0.1788, 0.3374, 0.1938]}, {"w": "value", "b": [0.3435, 0.1788, 0.3851, 0.1938]}, {"w": "of", "b": [0.3912, 0.1788, 0.4061, 0.1938]}, {"w": "k", "b": [0.4121, 0.1788, 0.4218, 0.1937]}, {"w": "that", "b": [0.4285, 0.1788, 0.4623, 0.1938]}, {"w": "will", "b": [0.4685, 0.1788, 0.4972, 0.1938]}, {"w": "give", "b": [0.5033, 0.1788, 0.5351, 0.1938]}, {"w": "you", "b": [0.5413, 0.1788, 0.57, 0.1938]}, {"w": "a", "b": [0.5761, 0.1788, 0.5854, 0.1938]}, {"w": "sample", "b": [0.5915, 0.1788, 0.647, 0.1938]}, {"w": "of", "b": [0.6531, 0.1788, 0.668, 0.1938]}, {"w": "the", "b": [0.6741, 0.1788, 0.6998, 0.1938]}, {"w": "desired", "b": [0.7059, 0.1788, 0.7625, 0.1938]}, {"w": "size.", "b": [0.7687, 0.1788, 0.8026, 0.1938]}]}, {"id": "b_2", "type": "paragraph", "text": "An advantage of the systematic sampling over the simple random sampling is that it draws examples from the whole range of values. However, systematic sampling is inappropriate if the list of examples has periodicity or repetitive patterns. In the latter case, the obtained sample can exhibit a bias. However, if the list of examples is randomized, then systematic sampling often results in a better sample than simple random sampling.", "words": [{"w": "An", "b": [0.1305, 0.2057, 0.1547, 0.2207]}, {"w": "advantage", "b": [0.1608, 0.2057, 0.2419, 0.2207]}, {"w": "of", "b": [0.2481, 0.2057, 0.263, 0.2207]}, {"w": "the", "b": [0.2691, 0.2057, 0.2948, 0.2207]}, {"w": "systematic", "b": [0.301, 0.2057, 0.3858, 0.2207]}, {"w": "sampling", "b": [0.392, 0.2057, 0.464, 0.2207]}, {"w": "over", "b": [0.4701, 0.2057, 0.5036, 0.2207]}, {"w": "the", "b": [0.5097, 0.2057, 0.5354, 0.2207]}, {"w": "simple", "b": [0.5416, 0.2057, 0.593, 0.2207]}, {"w": "random", "b": [0.5992, 0.2057, 0.6608, 0.2207]}, {"w": "sampling", "b": [0.667, 0.2057, 0.7389, 0.2207]}, {"w": "is", "b": [0.7451, 0.2057, 0.7575, 0.2207]}, {"w": "that", "b": [0.7637, 0.2057, 0.7975, 0.2207]}, {"w": "it", "b": [0.8037, 0.2057, 0.816, 0.2207]}, {"w": "draws", "b": [0.8222, 0.2057, 0.8691, 0.2207]}, {"w": "examples", "b": [0.1312, 0.2236, 0.2052, 0.2386]}, {"w": "from", "b": [0.2113, 0.2236, 0.249, 0.2386]}, {"w": "the", "b": [0.2552, 0.2236, 0.281, 0.2386]}, {"w": "whole", "b": [0.2871, 0.2236, 0.3336, 0.2386]}, {"w": "range", "b": [0.3397, 0.2236, 0.3841, 0.2386]}, {"w": "of", "b": [0.3903, 0.2236, 0.4052, 0.2386]}, {"w": "values.", "b": [0.4114, 0.2236, 0.4657, 0.2386]}, {"w": "However,", "b": [0.4739, 0.2236, 0.5478, 0.2386]}, {"w": "systematic", "b": [0.5539, 0.2236, 0.6393, 0.2386]}, {"w": "sampling", "b": [0.6454, 0.2236, 0.7178, 0.2386]}, {"w": "is", "b": [0.7239, 0.2236, 0.7364, 0.2386]}, {"w": "inappropriate", "b": [0.7426, 0.2236, 0.8521, 0.2386]}, {"w": "if", "b": [0.8582, 0.2236, 0.8691, 0.2386]}, {"w": "the", "b": [0.1312, 0.2415, 0.1574, 0.2566]}, {"w": "list", "b": [0.1636, 0.2415, 0.1888, 0.2566]}, {"w": "of", "b": [0.195, 0.2415, 0.2101, 0.2566]}, {"w": "examples", "b": [0.2163, 0.2415, 0.2912, 0.2566]}, {"w": "has", "b": [0.2974, 0.2415, 0.3247, 0.2566]}, {"w": "periodicity", "b": [0.3308, 0.2415, 0.4188, 0.2566]}, {"w": "or", "b": [0.4249, 0.2415, 0.4417, 0.2566]}, {"w": "repetitive", "b": [0.4479, 0.2415, 0.5259, 0.2566]}, {"w": "patterns.", "b": [0.5321, 0.2415, 0.6055, 0.2566]}, {"w": "In", "b": [0.6137, 0.2415, 0.631, 0.2566]}, {"w": "the", "b": [0.6372, 0.2415, 0.6633, 0.2566]}, {"w": "latter", "b": [0.6695, 0.2415, 0.7145, 0.2566]}, {"w": "case,", "b": [0.7207, 0.2415, 0.7595, 0.2566]}, {"w": "the", "b": [0.7657, 0.2415, 0.7919, 0.2566]}, {"w": "obtained", "b": [0.798, 0.2415, 0.8692, 0.2566]}, {"w": "sample", "b": [0.1312, 0.2595, 0.1876, 0.2746]}, {"w": "can", "b": [0.1937, 0.2595, 0.2219, 0.2746]}, {"w": "exhibit", "b": [0.228, 0.2595, 0.2848, 0.2746]}, {"w": "a", "b": [0.2909, 0.2595, 0.3003, 0.2746]}, {"w": "bias.", "b": [0.3064, 0.2595, 0.344, 0.2746]}, {"w": "However,", "b": [0.3522, 0.2595, 0.4268, 0.2746]}, {"w": "if", "b": [0.4329, 0.2595, 0.4439, 0.2746]}, {"w": "the", "b": [0.45, 0.2595, 0.4761, 0.2746]}, {"w": "list", "b": [0.4822, 0.2595, 0.5073, 0.2746]}, {"w": "of", "b": [0.5134, 0.2595, 0.5285, 0.2746]}, {"w": "examples", "b": [0.5347, 0.2595, 0.6093, 0.2746]}, {"w": "is", "b": [0.6154, 0.2595, 0.628, 0.2746]}, {"w": "randomized,", "b": [0.6341, 0.2595, 0.7342, 0.2746]}, {"w": "then", "b": [0.7404, 0.2595, 0.7768, 0.2746]}, {"w": "systematic", "b": [0.783, 0.2595, 0.8691, 0.2746]}, {"w": "sampling", "b": [0.1312, 0.2775, 0.2031, 0.2925]}, {"w": "often", "b": [0.2093, 0.2775, 0.2498, 0.2925]}, {"w": "results", "b": [0.2559, 0.2775, 0.3085, 0.2925]}, {"w": "in", "b": [0.3146, 0.2775, 0.33, 0.2925]}, {"w": "a", "b": [0.3362, 0.2775, 0.3454, 0.2925]}, {"w": "better", "b": [0.3516, 0.2775, 0.4003, 0.2925]}, {"w": "sample", "b": [0.4065, 0.2775, 0.462, 0.2925]}, {"w": "than", "b": [0.4681, 0.2775, 0.505, 0.2925]}, {"w": "simple", "b": [0.5112, 0.2775, 0.5625, 0.2925]}, {"w": "random", "b": [0.5687, 0.2775, 0.6302, 0.2925]}, {"w": "sampling.", "b": [0.6364, 0.2775, 0.7134, 0.2925]}]}, {"id": "b_3", "type": "paragraph", "text": "3.10.3 Stratified Sampling", "words": [{"w": "3.10.3", "b": [0.1312, 0.3254, 0.1855, 0.3403]}, {"w": "Stratified", "b": [0.2067, 0.3254, 0.2932, 0.3403]}, {"w": "Sampling", "b": [0.3003, 0.3254, 0.3861, 0.3403]}]}, {"id": "b_4", "type": "paragraph", "text": "If you know about the existence of several groups (e.g., gender, location, or age) in your data, you should have examples from each of those groups in your sample. In stratified sampling, you first divide your dataset into groups (called strata) and then randomly select examples from each stratum, like in simple random sampling. The number of examples to select from each stratum is proportional to the size of the stratum.", "words": [{"w": "If", "b": [0.1312, 0.3618, 0.1438, 0.3769]}, {"w": "you", "b": [0.1508, 0.3618, 0.1801, 0.3769]}, {"w": "know", "b": [0.1871, 0.3618, 0.23, 0.3769]}, {"w": "about", "b": [0.237, 0.3618, 0.2846, 0.3769]}, {"w": "the", "b": [0.2916, 0.3618, 0.3177, 0.3769]}, {"w": "existence", "b": [0.3248, 0.3618, 0.3986, 0.3769]}, {"w": "of", "b": [0.4056, 0.3618, 0.4208, 0.3769]}, {"w": "several", "b": [0.4278, 0.3618, 0.4834, 0.3769]}, {"w": "groups", "b": [0.4905, 0.3618, 0.545, 0.3769]}, {"w": "(e.g.,", "b": [0.552, 0.3618, 0.5928, 0.3769]}, {"w": "gender,", "b": [0.6001, 0.3618, 0.6597, 0.3769]}, {"w": "location,", "b": [0.667, 0.3618, 0.7376, 0.3769]}, {"w": "or", "b": [0.7448, 0.3618, 0.7616, 0.3769]}, {"w": "age)", "b": [0.7686, 0.3618, 0.8031, 0.3769]}, {"w": "in", "b": [0.8101, 0.3618, 0.8258, 0.3769]}, {"w": "your", "b": [0.8328, 0.3618, 0.8695, 0.3769]}, {"w": "data,", "b": [0.1312, 0.3798, 0.1731, 0.3949]}, {"w": "you", "b": [0.1801, 0.3798, 0.2094, 0.3949]}, {"w": "should", "b": [0.2162, 0.3798, 0.2697, 0.3949]}, {"w": "have", "b": [0.2765, 0.3798, 0.3137, 0.3949]}, {"w": "examples", "b": [0.3205, 0.3798, 0.3954, 0.3949]}, {"w": "from", "b": [0.4023, 0.3798, 0.4405, 0.3949]}, {"w": "each", "b": [0.4473, 0.3798, 0.4834, 0.3949]}, {"w": "of", "b": [0.4903, 0.3798, 0.5055, 0.3949]}, {"w": "those", "b": [0.5123, 0.3798, 0.5553, 0.3949]}, {"w": "groups", "b": [0.5621, 0.3798, 0.6167, 0.3949]}, {"w": "in", "b": [0.6235, 0.3798, 0.6392, 0.3949]}, {"w": "your", "b": [0.6461, 0.3798, 0.6828, 0.3949]}, {"w": "sample.", "b": [0.6896, 0.3798, 0.7514, 0.3949]}, {"w": "In", "b": [0.7617, 0.3798, 0.779, 0.3949]}, {"w": "stratified", "b": [0.7857, 0.3799, 0.8688, 0.3949]}, {"w": "sampling,", "b": [0.1312, 0.3979, 0.2188, 0.4128]}, {"w": "you", "b": [0.2249, 0.398, 0.2531, 0.4128]}, {"w": "first", "b": [0.2592, 0.398, 0.2905, 0.4128]}, {"w": "divide", "b": [0.2966, 0.398, 0.3444, 0.4128]}, {"w": "your", "b": [0.3505, 0.398, 0.3857, 0.4128]}, {"w": "dataset", "b": [0.3919, 0.398, 0.4492, 0.4128]}, {"w": "into", "b": [0.4554, 0.398, 0.486, 0.4128]}, {"w": "groups", "b": [0.4921, 0.398, 0.5445, 0.4128]}, {"w": "(called", "b": [0.5507, 0.398, 0.6029, 0.4128]}, {"w": "strata)", "b": [0.6091, 0.398, 0.6625, 0.4128]}, {"w": "and", "b": [0.6686, 0.398, 0.6978, 0.4128]}, {"w": "then", "b": [0.7039, 0.398, 0.7391, 0.4128]}, {"w": "randomly", "b": [0.7452, 0.398, 0.8201, 0.4128]}, {"w": "select", "b": [0.8263, 0.398, 0.8696, 0.4128]}, {"w": "examples", "b": [0.1312, 0.4157, 0.2058, 0.4308]}, {"w": "from", "b": [0.212, 0.4157, 0.25, 0.4308]}, {"w": "each", "b": [0.2562, 0.4157, 0.2921, 0.4308]}, {"w": "stratum,", "b": [0.2982, 0.4157, 0.3682, 0.4308]}, {"w": "like", "b": [0.3743, 0.4157, 0.4025, 0.4308]}, {"w": "in", "b": [0.4086, 0.4157, 0.4242, 0.4308]}, {"w": "simple", "b": [0.4304, 0.4157, 0.4826, 0.4308]}, {"w": "random", "b": [0.4887, 0.4157, 0.5513, 0.4308]}, {"w": "sampling.", "b": [0.5574, 0.4157, 0.6356, 0.4308]}, {"w": "The", "b": [0.6438, 0.4157, 0.6761, 0.4308]}, {"w": "number", "b": [0.6822, 0.4157, 0.7443, 0.4308]}, {"w": "of", "b": [0.7504, 0.4157, 0.7655, 0.4308]}, {"w": "examples", "b": [0.7717, 0.4157, 0.8463, 0.4308]}, {"w": "to", "b": [0.8524, 0.4157, 0.8691, 0.4308]}, {"w": "select", "b": [0.1312, 0.4337, 0.1755, 0.4487]}, {"w": "from", "b": [0.1816, 0.4337, 0.2191, 0.4487]}, {"w": "each", "b": [0.2252, 0.4337, 0.2606, 0.4487]}, {"w": "stratum", "b": [0.2668, 0.4337, 0.3305, 0.4487]}, {"w": "is", "b": [0.3366, 0.4337, 0.349, 0.4487]}, {"w": "proportional", "b": [0.3552, 0.4337, 0.4553, 0.4487]}, {"w": "to", "b": [0.4614, 0.4337, 0.4778, 0.4487]}, {"w": "the", "b": [0.484, 0.4337, 0.5096, 0.4487]}, {"w": "size", "b": [0.5158, 0.4337, 0.5446, 0.4487]}, {"w": "of", "b": [0.5508, 0.4337, 0.5656, 0.4487]}, {"w": "the", "b": [0.5718, 0.4337, 0.5974, 0.4487]}, {"w": "stratum.", "b": [0.6036, 0.4337, 0.6724, 0.4487]}]}, {"id": "b_5", "type": "paragraph", "text": "Stratified sampling often improves the representativeness of the sample by reducing its bias; in the worst of cases, the resulting sample is of no less quality than the results of simple random sampling. However, to define strata, the analyst has to understand the properties of the dataset. Furthermore, it can be difficult to decide which attributes will define the strata.", "words": [{"w": "Stratified", "b": [0.1312, 0.4607, 0.2057, 0.4756]}, {"w": "sampling", "b": [0.2118, 0.4607, 0.2833, 0.4756]}, {"w": "often", "b": [0.2894, 0.4607, 0.3297, 0.4756]}, {"w": "improves", "b": [0.3359, 0.4607, 0.4068, 0.4756]}, {"w": "the", "b": [0.413, 0.4607, 0.4385, 0.4756]}, {"w": "representativeness", "b": [0.4446, 0.4607, 0.5893, 0.4756]}, {"w": "of", "b": [0.5955, 0.4607, 0.6102, 0.4756]}, {"w": "the", "b": [0.6164, 0.4607, 0.6419, 0.4756]}, {"w": "sample", "b": [0.648, 0.4607, 0.7032, 0.4756]}, {"w": "by", "b": [0.7093, 0.4607, 0.7287, 0.4756]}, {"w": "reducing", "b": [0.7348, 0.4607, 0.8032, 0.4756]}, {"w": "its", "b": [0.8093, 0.4607, 0.8288, 0.4756]}, {"w": "bias;", "b": [0.8349, 0.4607, 0.8717, 0.4756]}, {"w": "in", "b": [0.1312, 0.4785, 0.1469, 0.4936]}, {"w": "the", "b": [0.1539, 0.4785, 0.18, 0.4936]}, {"w": "worst", "b": [0.1869, 0.4785, 0.2315, 0.4936]}, {"w": "of", "b": [0.2385, 0.4785, 0.2536, 0.4936]}, {"w": "cases,", "b": [0.2605, 0.4785, 0.3068, 0.4936]}, {"w": "the", "b": [0.3139, 0.4785, 0.3401, 0.4936]}, {"w": "resulting", "b": [0.347, 0.4785, 0.4183, 0.4936]}, {"w": "sample", "b": [0.4252, 0.4785, 0.4818, 0.4936]}, {"w": "is", "b": [0.4887, 0.4785, 0.5014, 0.4936]}, {"w": "of", "b": [0.5083, 0.4785, 0.5234, 0.4936]}, {"w": "no", "b": [0.5304, 0.4785, 0.5502, 0.4936]}, {"w": "less", "b": [0.5571, 0.4785, 0.5856, 0.4936]}, {"w": "quality", "b": [0.5925, 0.4785, 0.6495, 0.4936]}, {"w": "than", "b": [0.6565, 0.4785, 0.6941, 0.4936]}, {"w": "the", "b": [0.701, 0.4785, 0.7272, 0.4936]}, {"w": "results", "b": [0.7341, 0.4785, 0.7877, 0.4936]}, {"w": "of", "b": [0.7947, 0.4785, 0.8098, 0.4936]}, {"w": "simple", "b": [0.8167, 0.4785, 0.8692, 0.4936]}, {"w": "random", "b": [0.1312, 0.4966, 0.1918, 0.5115]}, {"w": "sampling.", "b": [0.198, 0.4966, 0.2737, 0.5115]}, {"w": "However,", "b": [0.2819, 0.4966, 0.3541, 0.5115]}, {"w": "to", "b": [0.3603, 0.4966, 0.3764, 0.5115]}, {"w": "define", "b": [0.3826, 0.4966, 0.429, 0.5115]}, {"w": "strata,", "b": [0.4352, 0.4966, 0.4868, 0.5115]}, {"w": "the", "b": [0.4929, 0.4966, 0.5182, 0.5115]}, {"w": "analyst", "b": [0.5243, 0.4966, 0.5814, 0.5115]}, {"w": "has", "b": [0.5876, 0.4966, 0.6139, 0.5115]}, {"w": "to", "b": [0.6201, 0.4966, 0.6362, 0.5115]}, {"w": "understand", "b": [0.6424, 0.4966, 0.7313, 0.5115]}, {"w": "the", "b": [0.7375, 0.4966, 0.7627, 0.5115]}, {"w": "properties", "b": [0.7689, 0.4966, 0.8483, 0.5115]}, {"w": "of", "b": [0.8545, 0.4966, 0.8691, 0.5115]}, {"w": "the", "b": [0.1312, 0.5146, 0.1565, 0.5294]}, {"w": "dataset.", "b": [0.1627, 0.5146, 0.2255, 0.5294]}, {"w": "Furthermore,", "b": [0.2337, 0.5146, 0.3382, 0.5294]}, {"w": "it", "b": [0.3443, 0.5146, 0.3565, 0.5294]}, {"w": "can", "b": [0.3626, 0.5146, 0.3899, 0.5294]}, {"w": "be", "b": [0.3961, 0.5146, 0.4148, 0.5294]}, {"w": "difficult", "b": [0.4209, 0.5146, 0.4816, 0.5294]}, {"w": "to", "b": [0.4878, 0.5146, 0.5039, 0.5294]}, {"w": "decide", "b": [0.5101, 0.5146, 0.5596, 0.5294]}, {"w": "which", "b": [0.5658, 0.5146, 0.6118, 0.5294]}, {"w": "attributes", "b": [0.6179, 0.5146, 0.696, 0.5294]}, {"w": "will", "b": [0.7021, 0.5146, 0.7304, 0.5294]}, {"w": "define", "b": [0.7366, 0.5146, 0.7831, 0.5294]}, {"w": "the", "b": [0.7892, 0.5146, 0.8145, 0.5294]}, {"w": "strata.", "b": [0.8207, 0.5146, 0.8724, 0.5294]}]}, {"id": "b_6", "type": "paragraph", "text": "If you don’t know how to best define the strata, you can use clustering. The only decision you have to make is how many clusters you need. This technique is also useful to choose the unlabeled examples to send for labeling to a human labeler. It often happens that we have millions of unlabeled examples, and few resources available for labeling. Choose examples carefully, so that each stratum or cluster is represented in our labeled data.", "words": [{"w": "If", "b": [0.1312, 0.5414, 0.1435, 0.5564]}, {"w": "you", "b": [0.1496, 0.5414, 0.1782, 0.5564]}, {"w": "don’t", "b": [0.1843, 0.5414, 0.2262, 0.5564]}, {"w": "know", "b": [0.2323, 0.5414, 0.2741, 0.5564]}, {"w": "how", "b": [0.2803, 0.5414, 0.3124, 0.5564]}, {"w": "to", "b": [0.3185, 0.5414, 0.3348, 0.5564]}, {"w": "best", "b": [0.341, 0.5414, 0.3742, 0.5564]}, {"w": "define", "b": [0.3804, 0.5414, 0.4273, 0.5564]}, {"w": "the", "b": [0.4335, 0.5414, 0.459, 0.5564]}, {"w": "strata,", "b": [0.4651, 0.5414, 0.5173, 0.5564]}, {"w": "you", "b": [0.5234, 0.5414, 0.552, 0.5564]}, {"w": "can", "b": [0.5582, 0.5414, 0.5857, 0.5564]}, {"w": "use", "b": [0.5918, 0.5414, 0.6175, 0.5564]}, {"w": "clustering.", "b": [0.6234, 0.5414, 0.7192, 0.5564]}, {"w": "The", "b": [0.7274, 0.5414, 0.759, 0.5564]}, {"w": "only", "b": [0.7652, 0.5414, 0.7993, 0.5564]}, {"w": "decision", "b": [0.8055, 0.5414, 0.8689, 0.5564]}, {"w": "you", "b": [0.1308, 0.5595, 0.159, 0.5743]}, {"w": "have", "b": [0.1652, 0.5595, 0.201, 0.5743]}, {"w": "to", "b": [0.2072, 0.5595, 0.2233, 0.5743]}, {"w": "make", "b": [0.2295, 0.5595, 0.2709, 0.5743]}, {"w": "is", "b": [0.277, 0.5595, 0.2893, 0.5743]}, {"w": "how", "b": [0.2954, 0.5595, 0.3272, 0.5743]}, {"w": "many", "b": [0.3334, 0.5595, 0.3768, 0.5743]}, {"w": "clusters", "b": [0.383, 0.5595, 0.4428, 0.5743]}, {"w": "you", "b": [0.449, 0.5595, 0.4772, 0.5743]}, {"w": "need.", "b": [0.4834, 0.5595, 0.5248, 0.5743]}, {"w": "This", "b": [0.5331, 0.5595, 0.5685, 0.5743]}, {"w": "technique", "b": [0.5747, 0.5595, 0.6504, 0.5743]}, {"w": "is", "b": [0.6566, 0.5595, 0.6688, 0.5743]}, {"w": "also", "b": [0.675, 0.5595, 0.7054, 0.5743]}, {"w": "useful", "b": [0.7115, 0.5595, 0.7576, 0.5743]}, {"w": "to", "b": [0.7638, 0.5595, 0.7799, 0.5743]}, {"w": "choose", "b": [0.7861, 0.5595, 0.8377, 0.5743]}, {"w": "the", "b": [0.8439, 0.5595, 0.8691, 0.5743]}, {"w": "unlabeled", "b": [0.1312, 0.5773, 0.2091, 0.5923]}, {"w": "examples", "b": [0.2153, 0.5773, 0.2891, 0.5923]}, {"w": "to", "b": [0.2953, 0.5773, 0.3118, 0.5923]}, {"w": "send", "b": [0.3179, 0.5773, 0.3542, 0.5923]}, {"w": "for", "b": [0.3603, 0.5773, 0.3825, 0.5923]}, {"w": "labeling", "b": [0.3887, 0.5773, 0.4521, 0.5923]}, {"w": "to", "b": [0.4583, 0.5773, 0.4748, 0.5923]}, {"w": "a", "b": [0.4809, 0.5773, 0.4902, 0.5923]}, {"w": "human", "b": [0.4963, 0.5773, 0.5515, 0.5923]}, {"w": "labeler.", "b": [0.5577, 0.5773, 0.617, 0.5923]}, {"w": "It", "b": [0.6252, 0.5773, 0.6392, 0.5923]}, {"w": "often", "b": [0.6453, 0.5773, 0.6861, 0.5923]}, {"w": "happens", "b": [0.6922, 0.5773, 0.7589, 0.5923]}, {"w": "that", "b": [0.765, 0.5773, 0.799, 0.5923]}, {"w": "we", "b": [0.8052, 0.5773, 0.8263, 0.5923]}, {"w": "have", "b": [0.8325, 0.5773, 0.8691, 0.5923]}, {"w": "millions", "b": [0.1312, 0.5951, 0.1951, 0.6102]}, {"w": "of", "b": [0.2013, 0.5951, 0.2165, 0.6102]}, {"w": "unlabeled", "b": [0.2226, 0.5951, 0.3016, 0.6102]}, {"w": "examples,", "b": [0.3077, 0.5951, 0.3879, 0.6102]}, {"w": "and", "b": [0.394, 0.5951, 0.4243, 0.6102]}, {"w": "few", "b": [0.4305, 0.5951, 0.4582, 0.6102]}, {"w": "resources", "b": [0.4644, 0.5951, 0.539, 0.6102]}, {"w": "available", "b": [0.5451, 0.5951, 0.6163, 0.6102]}, {"w": "for", "b": [0.6224, 0.5951, 0.645, 0.6102]}, {"w": "labeling.", "b": [0.6511, 0.5951, 0.7207, 0.6102]}, {"w": "Choose", "b": [0.7289, 0.5951, 0.7881, 0.6102]}, {"w": "examples", "b": [0.7942, 0.5951, 0.8691, 0.6102]}, {"w": "carefully,", "b": [0.1312, 0.6132, 0.2036, 0.6282]}, {"w": "so", "b": [0.2098, 0.6132, 0.2263, 0.6282]}, {"w": "that", "b": [0.2324, 0.6132, 0.2662, 0.6282]}, {"w": "each", "b": [0.2724, 0.6132, 0.3078, 0.6282]}, {"w": "stratum", "b": [0.3139, 0.6132, 0.3777, 0.6282]}, {"w": "or", "b": [0.3838, 0.6132, 0.4003, 0.6282]}, {"w": "cluster", "b": [0.4064, 0.6132, 0.4599, 0.6282]}, {"w": "is", "b": [0.4661, 0.6132, 0.4785, 0.6282]}, {"w": "represented", "b": [0.4846, 0.6132, 0.5766, 0.6282]}, {"w": "in", "b": [0.5828, 0.6132, 0.5982, 0.6282]}, {"w": "our", "b": [0.6043, 0.6132, 0.631, 0.6282]}, {"w": "labeled", "b": [0.6372, 0.6132, 0.6941, 0.6282]}, {"w": "data.", "b": [0.7003, 0.6132, 0.7413, 0.6282]}]}, {"id": "b_7", "type": "paragraph", "text": "Stratified sampling is the slowest of the three methods due to the additional overhead of working with several independent strata. However, its potential benefit of producing a less biased sample typically outweighs its drawbacks.", "words": [{"w": "Stratified", "b": [0.1312, 0.64, 0.2077, 0.6551]}, {"w": "sampling", "b": [0.2145, 0.64, 0.2878, 0.6551]}, {"w": "is", "b": [0.2947, 0.64, 0.3073, 0.6551]}, {"w": "the", "b": [0.3142, 0.64, 0.3403, 0.6551]}, {"w": "slowest", "b": [0.3472, 0.64, 0.405, 0.6551]}, {"w": "of", "b": [0.4118, 0.64, 0.427, 0.6551]}, {"w": "the", "b": [0.4338, 0.64, 0.46, 0.6551]}, {"w": "three", "b": [0.4668, 0.64, 0.5087, 0.6551]}, {"w": "methods", "b": [0.5156, 0.64, 0.5852, 0.6551]}, {"w": "due", "b": [0.5921, 0.64, 0.6214, 0.6551]}, {"w": "to", "b": [0.6283, 0.64, 0.645, 0.6551]}, {"w": "the", "b": [0.6518, 0.64, 0.678, 0.6551]}, {"w": "additional", "b": [0.6848, 0.64, 0.7675, 0.6551]}, {"w": "overhead", "b": [0.7743, 0.64, 0.8471, 0.6551]}, {"w": "of", "b": [0.8539, 0.64, 0.8691, 0.6551]}, {"w": "working", "b": [0.1306, 0.658, 0.1948, 0.673]}, {"w": "with", "b": [0.2009, 0.658, 0.2371, 0.673]}, {"w": "several", "b": [0.2432, 0.658, 0.2982, 0.673]}, {"w": "independent", "b": [0.3043, 0.658, 0.4037, 0.673]}, {"w": "strata.", "b": [0.4098, 0.658, 0.4627, 0.673]}, {"w": "However,", "b": [0.4709, 0.658, 0.545, 0.673]}, {"w": "its", "b": [0.5511, 0.658, 0.5709, 0.673]}, {"w": "potential", "b": [0.577, 0.658, 0.6494, 0.673]}, {"w": "benefit", "b": [0.6555, 0.658, 0.7109, 0.673]}, {"w": "of", "b": [0.717, 0.658, 0.732, 0.673]}, {"w": "producing", "b": [0.7382, 0.658, 0.8194, 0.673]}, {"w": "a", "b": [0.8256, 0.658, 0.8349, 0.673]}, {"w": "less", "b": [0.841, 0.658, 0.8691, 0.673]}, {"w": "biased", "b": [0.1312, 0.676, 0.1816, 0.691]}, {"w": "sample", "b": [0.1877, 0.676, 0.2432, 0.691]}, {"w": "typically", "b": [0.2494, 0.676, 0.3186, 0.691]}, {"w": "outweighs", "b": [0.3247, 0.676, 0.4038, 0.691]}, {"w": "its", "b": [0.4099, 0.676, 0.4295, 0.691]}, {"w": "drawbacks.", "b": [0.4357, 0.676, 0.5246, 0.691]}]}, {"id": "b_8", "type": "paragraph", "text": "3.11 Storing Data", "words": [{"w": "3.11", "b": [0.1312, 0.7245, 0.1756, 0.7425]}, {"w": "Storing", "b": [0.2005, 0.7245, 0.2799, 0.7425]}, {"w": "Data", "b": [0.2882, 0.7245, 0.3412, 0.7425]}]}, {"id": "b_9", "type": "paragraph", "text": "Keeping data safe is insurance for your organization’s business: if you lose a business-critical model for any reason, such as a disaster or human mistake (the file with the model was accidentally erased or overwritten), having the data will allow you to rebuild that model easily.", "words": [{"w": "Keeping", "b": [0.1312, 0.7635, 0.1958, 0.7784]}, {"w": "data", "b": [0.2019, 0.7635, 0.2372, 0.7784]}, {"w": "safe", "b": [0.2433, 0.7635, 0.2731, 0.7784]}, {"w": "is", "b": [0.2793, 0.7635, 0.2915, 0.7784]}, {"w": "insurance", "b": [0.2976, 0.7635, 0.3724, 0.7784]}, {"w": "for", "b": [0.3785, 0.7635, 0.4002, 0.7784]}, {"w": "your", "b": [0.4064, 0.7635, 0.4417, 0.7784]}, {"w": "organization’s", "b": [0.4478, 0.7635, 0.5579, 0.7784]}, {"w": "business:", "b": [0.564, 0.7635, 0.6339, 0.7784]}, {"w": "if", "b": [0.6421, 0.7635, 0.6527, 0.7784]}, {"w": "you", "b": [0.6588, 0.7635, 0.687, 0.7784]}, {"w": "lose", "b": [0.6931, 0.7635, 0.7225, 0.7784]}, {"w": "a", "b": [0.7286, 0.7635, 0.7377, 0.7784]}, {"w": "business-critical", "b": [0.7438, 0.7635, 0.8692, 0.7784]}, {"w": "model", "b": [0.1312, 0.7813, 0.1809, 0.7964]}, {"w": "for", "b": [0.1882, 0.7813, 0.2108, 0.7964]}, {"w": "any", "b": [0.2181, 0.7813, 0.2474, 0.7964]}, {"w": "reason,", "b": [0.2547, 0.7813, 0.3124, 0.7964]}, {"w": "such", "b": [0.3201, 0.7813, 0.3563, 0.7964]}, {"w": "as", "b": [0.3636, 0.7813, 0.3805, 0.7964]}, {"w": "a", "b": [0.3878, 0.7813, 0.3972, 0.7964]}, {"w": "disaster", "b": [0.4045, 0.7813, 0.4676, 0.7964]}, {"w": "or", "b": [0.4749, 0.7813, 0.4917, 0.7964]}, {"w": "human", "b": [0.499, 0.7813, 0.555, 0.7964]}, {"w": "mistake", "b": [0.5623, 0.7813, 0.6252, 0.7964]}, {"w": "(the", "b": [0.6325, 0.7813, 0.666, 0.7964]}, {"w": "file", "b": [0.6733, 0.7813, 0.6974, 0.7964]}, {"w": "with", "b": [0.7047, 0.7813, 0.7413, 0.7964]}, {"w": "the", "b": [0.7487, 0.7813, 0.7748, 0.7964]}, {"w": "model", "b": [0.7822, 0.7813, 0.8318, 0.7964]}, {"w": "was", "b": [0.8392, 0.7813, 0.8691, 0.7964]}, {"w": "accidentally", "b": [0.1312, 0.7994, 0.2247, 0.8143]}, {"w": "erased", "b": [0.2298, 0.7994, 0.2792, 0.8143]}, {"w": "or", "b": [0.2843, 0.7994, 0.3004, 0.8143]}, {"w": "overwritten),", "b": [0.3055, 0.7994, 0.4075, 0.8143]}, {"w": "having", "b": [0.4128, 0.7994, 0.4651, 0.8143]}, {"w": "the", "b": [0.4701, 0.7994, 0.4953, 0.8143]}, {"w": "data", "b": [0.5004, 0.7994, 0.5355, 0.8143]}, {"w": "will", "b": [0.5406, 0.7994, 0.5687, 0.8143]}, {"w": "allow", "b": [0.5738, 0.7994, 0.6145, 0.8143]}, {"w": "you", "b": [0.6195, 0.7994, 0.6477, 0.8143]}, {"w": "to", "b": [0.6528, 0.7994, 0.6688, 0.8143]}, {"w": "rebuild", "b": [0.6739, 0.7994, 0.7292, 0.8143]}, {"w": "that", "b": [0.7343, 0.7994, 0.7675, 0.8143]}, {"w": "model", "b": [0.7725, 0.7994, 0.8203, 0.8143]}, {"w": "easily.", "b": [0.8254, 0.7994, 0.8727, 0.8143]}]}, {"id": "b_10", "type": "paragraph", "text": "When sensitive data or personally identifiable information (PII) is provided by customers or", "words": [{"w": "When", "b": [0.1303, 0.8263, 0.1775, 0.8412]}, {"w": "sensitive", "b": [0.1837, 0.8263, 0.2509, 0.8412]}, {"w": "data", "b": [0.2571, 0.8263, 0.2926, 0.8412]}, {"w": "or", "b": [0.2988, 0.8263, 0.3151, 0.8412]}, {"w": "personally", "b": [0.3212, 0.8263, 0.4026, 0.8412]}, {"w": "identifiable", "b": [0.4088, 0.8263, 0.4966, 0.8412]}, {"w": "information", "b": [0.5028, 0.8263, 0.5957, 0.8412]}, {"w": "(PII)", "b": [0.6019, 0.8263, 0.6422, 0.8412]}, {"w": "is", "b": [0.6484, 0.8263, 0.6607, 0.8412]}, {"w": "provided", "b": [0.6669, 0.8263, 0.736, 0.8412]}, {"w": "by", "b": [0.7421, 0.8263, 0.7614, 0.8412]}, {"w": "customers", "b": [0.7676, 0.8263, 0.847, 0.8412]}, {"w": "or", "b": [0.8532, 0.8263, 0.8695, 0.8412]}]}, {"id": "b_11", "type": "paragraph", "text": "business partners, it must be stored in not just a safe but also a secure location. Jointly with", "words": [{"w": "business", "b": [0.1312, 0.8443, 0.1959, 0.8591]}, {"w": "partners,", "b": [0.2018, 0.8443, 0.2723, 0.8591]}, {"w": "it", "b": [0.2783, 0.8443, 0.2904, 0.8591]}, {"w": "must", "b": [0.2963, 0.8443, 0.3351, 0.8591]}, {"w": "be", "b": [0.341, 0.8443, 0.3596, 0.8591]}, {"w": "stored", "b": [0.3655, 0.8443, 0.4139, 0.8591]}, {"w": "in", "b": [0.4198, 0.8443, 0.4349, 0.8591]}, {"w": "not", "b": [0.4408, 0.8443, 0.4669, 0.8591]}, {"w": "just", "b": [0.4728, 0.8443, 0.5026, 0.8591]}, {"w": "a", "b": [0.5085, 0.8443, 0.5175, 0.8591]}, {"w": "safe", "b": [0.5234, 0.8443, 0.5532, 0.8591]}, {"w": "but", "b": [0.5591, 0.8443, 0.5863, 0.8591]}, {"w": "also", "b": [0.5922, 0.8443, 0.6224, 0.8591]}, {"w": "a", "b": [0.6283, 0.8443, 0.6374, 0.8591]}, {"w": "secure", "b": [0.6433, 0.8443, 0.6917, 0.8591]}, {"w": "location.", "b": [0.6976, 0.8443, 0.7655, 0.8591]}, {"w": "Jointly", "b": [0.7736, 0.8443, 0.8281, 0.8591]}, {"w": "with", "b": [0.834, 0.8443, 0.8691, 0.8591]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 38", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "38", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 82, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "the DBA or DevOps engineers, access to sensitive data can be restricted by username and, if needed, IP address. Access to a relational database might also be limited on the per row and per column basis.", "words": [{"w": "the", "b": [0.1312, 0.0885, 0.1564, 0.1033]}, {"w": "DBA", "b": [0.1625, 0.0885, 0.2027, 0.1033]}, {"w": "or", "b": [0.2089, 0.0885, 0.225, 0.1033]}, {"w": "DevOps", "b": [0.2311, 0.0885, 0.2938, 0.1033]}, {"w": "engineers,", "b": [0.3, 0.0885, 0.3775, 0.1033]}, {"w": "access", "b": [0.3837, 0.0885, 0.4311, 0.1033]}, {"w": "to", "b": [0.4373, 0.0885, 0.4534, 0.1033]}, {"w": "sensitive", "b": [0.4595, 0.0885, 0.5261, 0.1033]}, {"w": "data", "b": [0.5322, 0.0885, 0.5674, 0.1033]}, {"w": "can", "b": [0.5735, 0.0885, 0.6007, 0.1033]}, {"w": "be", "b": [0.6068, 0.0885, 0.6255, 0.1033]}, {"w": "restricted", "b": [0.6316, 0.0885, 0.7062, 0.1033]}, {"w": "by", "b": [0.7124, 0.0885, 0.7314, 0.1033]}, {"w": "username", "b": [0.7376, 0.0885, 0.8121, 0.1033]}, {"w": "and,", "b": [0.8183, 0.0885, 0.8525, 0.1033]}, {"w": "if", "b": [0.8586, 0.0885, 0.8692, 0.1033]}, {"w": "needed,", "b": [0.1312, 0.1065, 0.1906, 0.1213]}, {"w": "IP", "b": [0.1966, 0.1065, 0.2154, 0.1213]}, {"w": "address.", "b": [0.2214, 0.1065, 0.285, 0.1213]}, {"w": "Access", "b": [0.2931, 0.1065, 0.3446, 0.1213]}, {"w": "to", "b": [0.3506, 0.1065, 0.3667, 0.1213]}, {"w": "a", "b": [0.3727, 0.1065, 0.3817, 0.1213]}, {"w": "relational", "b": [0.3877, 0.1065, 0.4621, 0.1213]}, {"w": "database", "b": [0.4681, 0.1065, 0.5376, 0.1213]}, {"w": "might", "b": [0.5436, 0.1065, 0.5893, 0.1213]}, {"w": "also", "b": [0.5953, 0.1065, 0.6255, 0.1213]}, {"w": "be", "b": [0.6315, 0.1065, 0.6501, 0.1213]}, {"w": "limited", "b": [0.6561, 0.1065, 0.7114, 0.1213]}, {"w": "on", "b": [0.7174, 0.1065, 0.7365, 0.1213]}, {"w": "the", "b": [0.7425, 0.1065, 0.7676, 0.1213]}, {"w": "per", "b": [0.7736, 0.1065, 0.7993, 0.1213]}, {"w": "row", "b": [0.8053, 0.1065, 0.834, 0.1213]}, {"w": "and", "b": [0.84, 0.1065, 0.8691, 0.1213]}, {"w": "per", "b": [0.1312, 0.1243, 0.1574, 0.1392]}, {"w": "column", "b": [0.1636, 0.1243, 0.222, 0.1392]}, {"w": "basis.", "b": [0.2282, 0.1243, 0.2725, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "It’s also recommended to limit access to read-only and add-only operations, by restricting write and erase operations to specific users.", "words": [{"w": "It’s", "b": [0.1312, 0.1511, 0.1579, 0.1662]}, {"w": "also", "b": [0.1641, 0.1511, 0.1955, 0.1662]}, {"w": "recommended", "b": [0.2016, 0.1511, 0.3143, 0.1662]}, {"w": "to", "b": [0.3204, 0.1511, 0.3371, 0.1662]}, {"w": "limit", "b": [0.3433, 0.1511, 0.3818, 0.1662]}, {"w": "access", "b": [0.388, 0.1511, 0.4372, 0.1662]}, {"w": "to", "b": [0.4434, 0.1511, 0.46, 0.1662]}, {"w": "read-only", "b": [0.4662, 0.1511, 0.5429, 0.1662]}, {"w": "and", "b": [0.549, 0.1511, 0.5793, 0.1662]}, {"w": "add-only", "b": [0.5854, 0.1511, 0.6568, 0.1662]}, {"w": "operations,", "b": [0.663, 0.1511, 0.7533, 0.1662]}, {"w": "by", "b": [0.7595, 0.1511, 0.7793, 0.1662]}, {"w": "restricting", "b": [0.7854, 0.1511, 0.8691, 0.1662]}, {"w": "write", "b": [0.1306, 0.1692, 0.1716, 0.1841]}, {"w": "and", "b": [0.1778, 0.1692, 0.2075, 0.1841]}, {"w": "erase", "b": [0.2137, 0.1692, 0.2538, 0.1841]}, {"w": "operations", "b": [0.26, 0.1692, 0.3437, 0.1841]}, {"w": "to", "b": [0.3499, 0.1692, 0.3663, 0.1841]}, {"w": "specific", "b": [0.3724, 0.1692, 0.4305, 0.1841]}, {"w": "users.", "b": [0.4366, 0.1692, 0.482, 0.1841]}]}, {"id": "b_2", "type": "paragraph", "text": "If the data is collected on mobile devices, it might be necessary to store it on the mobile device until the owner connects to wifi. This data might need to be encrypted so that other applications cannot access it. Once the user is connected to wifi, the data has to be synchronized with a secure server by using cryptographic protocols, such as Transport Layer Security (TLS). Each data element on the mobile device has to be marked with a timestamp to allow its proper synchronization with the data on the server.", "words": [{"w": "If", "b": [0.1312, 0.196, 0.1438, 0.2111]}, {"w": "the", "b": [0.1505, 0.196, 0.1767, 0.2111]}, {"w": "data", "b": [0.1834, 0.196, 0.22, 0.2111]}, {"w": "is", "b": [0.2268, 0.196, 0.2394, 0.2111]}, {"w": "collected", "b": [0.2462, 0.196, 0.3173, 0.2111]}, {"w": "on", "b": [0.3241, 0.196, 0.344, 0.2111]}, {"w": "mobile", "b": [0.3507, 0.196, 0.4051, 0.2111]}, {"w": "devices,", "b": [0.4118, 0.196, 0.4752, 0.2111]}, {"w": "it", "b": [0.4821, 0.196, 0.4947, 0.2111]}, {"w": "might", "b": [0.5014, 0.196, 0.549, 0.2111]}, {"w": "be", "b": [0.5558, 0.196, 0.5751, 0.2111]}, {"w": "necessary", "b": [0.5819, 0.196, 0.659, 0.2111]}, {"w": "to", "b": [0.6658, 0.196, 0.6825, 0.2111]}, {"w": "store", "b": [0.6893, 0.196, 0.7292, 0.2111]}, {"w": "it", "b": [0.7359, 0.196, 0.7485, 0.2111]}, {"w": "on", "b": [0.7552, 0.196, 0.7751, 0.2111]}, {"w": "the", "b": [0.7818, 0.196, 0.808, 0.2111]}, {"w": "mobile", "b": [0.8147, 0.196, 0.8691, 0.2111]}, {"w": "device", "b": [0.1312, 0.2139, 0.182, 0.229]}, {"w": "until", "b": [0.19, 0.2139, 0.2282, 0.229]}, {"w": "the", "b": [0.2362, 0.2139, 0.2624, 0.229]}, {"w": "owner", "b": [0.2704, 0.2139, 0.3191, 0.229]}, {"w": "connects", "b": [0.3271, 0.2139, 0.3973, 0.229]}, {"w": "to", "b": [0.4053, 0.2139, 0.422, 0.229]}, {"w": "wifi.", "b": [0.43, 0.2139, 0.4646, 0.229]}, {"w": "This", "b": [0.4784, 0.2139, 0.5151, 0.229]}, {"w": "data", "b": [0.5231, 0.2139, 0.5597, 0.229]}, {"w": "might", "b": [0.5677, 0.2139, 0.6153, 0.229]}, {"w": "need", "b": [0.6233, 0.2139, 0.661, 0.229]}, {"w": "to", "b": [0.669, 0.2139, 0.6857, 0.229]}, {"w": "be", "b": [0.6937, 0.2139, 0.7131, 0.229]}, {"w": "encrypted", "b": [0.7211, 0.2139, 0.8022, 0.229]}, {"w": "so", "b": [0.8102, 0.2139, 0.8271, 0.229]}, {"w": "that", "b": [0.8351, 0.2139, 0.8696, 0.229]}, {"w": "other", "b": [0.1312, 0.2319, 0.1742, 0.247]}, {"w": "applications", "b": [0.1803, 0.2319, 0.2788, 0.247]}, {"w": "cannot", "b": [0.2849, 0.2319, 0.3404, 0.247]}, {"w": "access", "b": [0.3465, 0.2319, 0.3959, 0.247]}, {"w": "it.", "b": [0.4021, 0.2319, 0.4199, 0.247]}, {"w": "Once", "b": [0.4281, 0.2319, 0.4699, 0.247]}, {"w": "the", "b": [0.4761, 0.2319, 0.5023, 0.247]}, {"w": "user", "b": [0.5084, 0.2319, 0.5421, 0.247]}, {"w": "is", "b": [0.5482, 0.2319, 0.5609, 0.247]}, {"w": "connected", "b": [0.567, 0.2319, 0.6487, 0.247]}, {"w": "to", "b": [0.6548, 0.2319, 0.6715, 0.247]}, {"w": "wifi,", "b": [0.6777, 0.2319, 0.7122, 0.247]}, {"w": "the", "b": [0.7184, 0.2319, 0.7445, 0.247]}, {"w": "data", "b": [0.7507, 0.2319, 0.7873, 0.247]}, {"w": "has", "b": [0.7935, 0.2319, 0.8208, 0.247]}, {"w": "to", "b": [0.8269, 0.2319, 0.8437, 0.247]}, {"w": "be", "b": [0.8498, 0.2319, 0.8692, 0.247]}, {"w": "synchronized", "b": [0.1312, 0.25, 0.2334, 0.2648]}, {"w": "with", "b": [0.2396, 0.25, 0.2749, 0.2648]}, {"w": "a", "b": [0.2811, 0.25, 0.2902, 0.2648]}, {"w": "secure", "b": [0.2964, 0.25, 0.345, 0.2648]}, {"w": "server", "b": [0.3512, 0.25, 0.3979, 0.2648]}, {"w": "by", "b": [0.4041, 0.25, 0.4232, 0.2648]}, {"w": "using", "b": [0.4294, 0.25, 0.471, 0.2648]}, {"w": "cryptographic", "b": [0.4771, 0.25, 0.5868, 0.2648]}, {"w": "protocols,", "b": [0.593, 0.25, 0.6704, 0.2648]}, {"w": "such", "b": [0.6766, 0.25, 0.7116, 0.2648]}, {"w": "as", "b": [0.7177, 0.25, 0.734, 0.2648]}, {"w": "Transport", "b": [0.7402, 0.25, 0.8192, 0.2648]}, {"w": "Layer", "b": [0.8253, 0.25, 0.8695, 0.2648]}, {"w": "Security", "b": [0.1312, 0.268, 0.1957, 0.2828]}, {"w": "(TLS).", "b": [0.2018, 0.268, 0.2554, 0.2828]}, {"w": "Each", "b": [0.2615, 0.268, 0.3005, 0.2828]}, {"w": "data", "b": [0.3066, 0.268, 0.3418, 0.2828]}, {"w": "element", "b": [0.348, 0.268, 0.4088, 0.2828]}, {"w": "on", "b": [0.415, 0.268, 0.4341, 0.2828]}, {"w": "the", "b": [0.4403, 0.268, 0.4654, 0.2828]}, {"w": "mobile", "b": [0.4716, 0.268, 0.5239, 0.2828]}, {"w": "device", "b": [0.53, 0.268, 0.5788, 0.2828]}, {"w": "has", "b": [0.585, 0.268, 0.6112, 0.2828]}, {"w": "to", "b": [0.6174, 0.268, 0.6335, 0.2828]}, {"w": "be", "b": [0.6396, 0.268, 0.6583, 0.2828]}, {"w": "marked", "b": [0.6644, 0.268, 0.7228, 0.2828]}, {"w": "with", "b": [0.7289, 0.268, 0.7641, 0.2828]}, {"w": "a", "b": [0.7703, 0.268, 0.7793, 0.2828]}, {"w": "timestamp", "b": [0.7855, 0.268, 0.8691, 0.2828]}, {"w": "to", "b": [0.1312, 0.2858, 0.1476, 0.3008]}, {"w": "allow", "b": [0.1538, 0.2858, 0.1953, 0.3008]}, {"w": "its", "b": [0.2015, 0.2858, 0.221, 0.3008]}, {"w": "proper", "b": [0.2272, 0.2858, 0.2801, 0.3008]}, {"w": "synchronization", "b": [0.2863, 0.2858, 0.4126, 0.3008]}, {"w": "with", "b": [0.4187, 0.2858, 0.4546, 0.3008]}, {"w": "the", "b": [0.4607, 0.2858, 0.4864, 0.3008]}, {"w": "data", "b": [0.4925, 0.2858, 0.5284, 0.3008]}, {"w": "on", "b": [0.5346, 0.2858, 0.5541, 0.3008]}, {"w": "the", "b": [0.5602, 0.2858, 0.5858, 0.3008]}, {"w": "server.", "b": [0.592, 0.2858, 0.6445, 0.3008]}]}, {"id": "b_3", "type": "paragraph", "text": "3.11.1 Data Formats", "words": [{"w": "3.11.1", "b": [0.1312, 0.3337, 0.1855, 0.3486]}, {"w": "Data", "b": [0.2067, 0.3337, 0.2518, 0.3486]}, {"w": "Formats", "b": [0.2589, 0.3337, 0.3345, 0.3486]}]}, {"id": "b_4", "type": "paragraph", "text": "Data for machine learning can be stored in various formats. Data used indirectly, such as dictionaries or gazetteers, may be stored as a table in a relational database, a collection in a key-value store, or a structured text file.", "words": [{"w": "Data", "b": [0.1312, 0.3701, 0.1717, 0.3852]}, {"w": "for", "b": [0.178, 0.3701, 0.2006, 0.3852]}, {"w": "machine", "b": [0.2068, 0.3701, 0.2743, 0.3852]}, {"w": "learning", "b": [0.2805, 0.3701, 0.3465, 0.3852]}, {"w": "can", "b": [0.3528, 0.3701, 0.381, 0.3852]}, {"w": "be", "b": [0.3873, 0.3701, 0.4066, 0.3852]}, {"w": "stored", "b": [0.4129, 0.3701, 0.4632, 0.3852]}, {"w": "in", "b": [0.4695, 0.3701, 0.4852, 0.3852]}, {"w": "various", "b": [0.4915, 0.3701, 0.5497, 0.3852]}, {"w": "formats.", "b": [0.5559, 0.3701, 0.6235, 0.3852]}, {"w": "Data", "b": [0.6321, 0.3701, 0.6726, 0.3852]}, {"w": "used", "b": [0.6788, 0.3701, 0.7156, 0.3852]}, {"w": "indirectly,", "b": [0.7218, 0.3701, 0.8035, 0.3852]}, {"w": "such", "b": [0.8098, 0.3701, 0.846, 0.3852]}, {"w": "as", "b": [0.8523, 0.3701, 0.8691, 0.3852]}, {"w": "dictionaries", "b": [0.1312, 0.3883, 0.2224, 0.4031]}, {"w": "or", "b": [0.2286, 0.3883, 0.2448, 0.4031]}, {"w": "gazetteers,", "b": [0.2509, 0.3883, 0.335, 0.4031]}, {"w": "may", "b": [0.3412, 0.3883, 0.3745, 0.4031]}, {"w": "be", "b": [0.3807, 0.3883, 0.3994, 0.4031]}, {"w": "stored", "b": [0.4056, 0.3883, 0.4543, 0.4031]}, {"w": "as", "b": [0.4604, 0.3883, 0.4767, 0.4031]}, {"w": "a", "b": [0.4829, 0.3883, 0.492, 0.4031]}, {"w": "table", "b": [0.4981, 0.3883, 0.5376, 0.4031]}, {"w": "in", "b": [0.5437, 0.3883, 0.5589, 0.4031]}, {"w": "a", "b": [0.5651, 0.3883, 0.5741, 0.4031]}, {"w": "relational", "b": [0.5803, 0.3883, 0.6552, 0.4031]}, {"w": "database,", "b": [0.6614, 0.3883, 0.7363, 0.4031]}, {"w": "a", "b": [0.7424, 0.3883, 0.7515, 0.4031]}, {"w": "collection", "b": [0.7577, 0.3883, 0.8325, 0.4031]}, {"w": "in", "b": [0.8387, 0.3883, 0.8539, 0.4031]}, {"w": "a", "b": [0.86, 0.3883, 0.8691, 0.4031]}, {"w": "key-value", "b": [0.1312, 0.4061, 0.2061, 0.4211]}, {"w": "store,", "b": [0.2122, 0.4061, 0.2565, 0.4211]}, {"w": "or", "b": [0.2626, 0.4061, 0.2791, 0.4211]}, {"w": "a", "b": [0.2852, 0.4061, 0.2945, 0.4211]}, {"w": "structured", "b": [0.3006, 0.4061, 0.3839, 0.4211]}, {"w": "text", "b": [0.3901, 0.4061, 0.4224, 0.4211]}, {"w": "file.", "b": [0.4285, 0.4061, 0.4573, 0.4211]}]}, {"id": "b_5", "type": "paragraph", "text": "The tidy data is usually stored as comma-separated values (CSV) or tab-separated values (TSV) files. In this case, all examples are stored in one file. Alternatively, collection of XML (Extensible Markup Language) files or JSON (JavaScript Object Notation) files can contain", "words": [{"w": "The", "b": [0.1306, 0.4329, 0.163, 0.448]}, {"w": "tidy", "b": [0.1691, 0.4329, 0.2021, 0.448]}, {"w": "data", "b": [0.2082, 0.4329, 0.2448, 0.448]}, {"w": "is", "b": [0.251, 0.4329, 0.2637, 0.448]}, {"w": "usually", "b": [0.2698, 0.4329, 0.328, 0.448]}, {"w": "stored", "b": [0.3341, 0.4329, 0.3845, 0.448]}, {"w": "as", "b": [0.3906, 0.4329, 0.4075, 0.448]}, {"w": "comma-separated", "b": [0.4136, 0.4329, 0.557, 0.448]}, {"w": "values", "b": [0.5632, 0.4329, 0.613, 0.448]}, {"w": "(CSV)", "b": [0.6191, 0.4329, 0.672, 0.448]}, {"w": "or", "b": [0.6781, 0.4329, 0.6949, 0.448]}, {"w": "tab-separated", "b": [0.701, 0.4329, 0.8131, 0.448]}, {"w": "values", "b": [0.8193, 0.4329, 0.8691, 0.448]}, {"w": "(TSV)", "b": [0.1291, 0.4511, 0.1801, 0.4659]}, {"w": "files.", "b": [0.1863, 0.4511, 0.2218, 0.4659]}, {"w": "In", "b": [0.2299, 0.4511, 0.2466, 0.4659]}, {"w": "this", "b": [0.2528, 0.4511, 0.2822, 0.4659]}, {"w": "case,", "b": [0.2883, 0.4511, 0.3258, 0.4659]}, {"w": "all", "b": [0.332, 0.4511, 0.3512, 0.4659]}, {"w": "examples", "b": [0.3573, 0.4511, 0.4297, 0.4659]}, {"w": "are", "b": [0.4359, 0.4511, 0.4602, 0.4659]}, {"w": "stored", "b": [0.4663, 0.4511, 0.515, 0.4659]}, {"w": "in", "b": [0.5211, 0.4511, 0.5363, 0.4659]}, {"w": "one", "b": [0.5424, 0.4511, 0.5698, 0.4659]}, {"w": "file.", "b": [0.5759, 0.4511, 0.6042, 0.4659]}, {"w": "Alternatively,", "b": [0.6124, 0.4511, 0.7201, 0.4659]}, {"w": "collection", "b": [0.7262, 0.4511, 0.8011, 0.4659]}, {"w": "of", "b": [0.8072, 0.4511, 0.8219, 0.4659]}, {"w": "XML", "b": [0.828, 0.4511, 0.8697, 0.4659]}, {"w": "(Extensible", "b": [0.1291, 0.469, 0.2197, 0.4839]}, {"w": "Markup", "b": [0.2258, 0.469, 0.2891, 0.4839]}, {"w": "Language)", "b": [0.2952, 0.469, 0.3791, 0.4839]}, {"w": "files", "b": [0.3852, 0.469, 0.4159, 0.4839]}, {"w": "or", "b": [0.4221, 0.469, 0.4384, 0.4839]}, {"w": "JSON", "b": [0.4446, 0.469, 0.4923, 0.4839]}, {"w": "(JavaScript", "b": [0.4984, 0.469, 0.5894, 0.4839]}, {"w": "Object", "b": [0.5956, 0.469, 0.6497, 0.4839]}, {"w": "Notation)", "b": [0.6558, 0.469, 0.7338, 0.4839]}, {"w": "files", "b": [0.7399, 0.469, 0.7706, 0.4839]}, {"w": "can", "b": [0.7768, 0.469, 0.8043, 0.4839]}, {"w": "contain", "b": [0.8105, 0.469, 0.8691, 0.4839]}]}, {"id": "b_6", "type": "paragraph", "text": "one example per file.", "words": [{"w": "one", "b": [0.1312, 0.4869, 0.1589, 0.5018]}, {"w": "example", "b": [0.1651, 0.4869, 0.2312, 0.5018]}, {"w": "per", "b": [0.2374, 0.4869, 0.2636, 0.5018]}, {"w": "file.", "b": [0.2697, 0.4869, 0.2984, 0.5018]}]}, {"id": "b_7", "type": "paragraph", "text": "In addition to general-purpose formats, certain popular machine learning packages use proprietary data formats to store tidy data. Other machine learning packages often provide application programming interfaces (APIs) to one or several such proprietary data formats. The most frequently supported formats are ARFF (Attribute-Relation File Format used in the Weka machine learning package) and the LIBSVM (Library for Support Vector Machines) format, which is the default format used by the LIBSVM and LIBLINEAR (Library for Large Linear Classification) machine learning libraries.", "words": [{"w": "In", "b": [0.1312, 0.5137, 0.1485, 0.5288]}, {"w": "addition", "b": [0.1571, 0.5137, 0.2251, 0.5288]}, {"w": "to", "b": [0.2338, 0.5137, 0.2505, 0.5288]}, {"w": "general-purpose", "b": [0.2591, 0.5137, 0.3885, 0.5288]}, {"w": "formats,", "b": [0.3972, 0.5137, 0.4648, 0.5288]}, {"w": "certain", "b": [0.474, 0.5137, 0.5306, 0.5288]}, {"w": "popular", "b": [0.5392, 0.5137, 0.6026, 0.5288]}, {"w": "machine", "b": [0.6112, 0.5137, 0.6787, 0.5288]}, {"w": "learning", "b": [0.6873, 0.5137, 0.7533, 0.5288]}, {"w": "packages", "b": [0.7619, 0.5137, 0.8342, 0.5288]}, {"w": "use", "b": [0.8428, 0.5137, 0.8691, 0.5288]}, {"w": "proprietary", "b": [0.1312, 0.5318, 0.2216, 0.5467]}, {"w": "data", "b": [0.2278, 0.5318, 0.2634, 0.5467]}, {"w": "formats", "b": [0.2696, 0.5318, 0.3304, 0.5467]}, {"w": "to", "b": [0.3366, 0.5318, 0.3529, 0.5467]}, {"w": "store", "b": [0.359, 0.5318, 0.3979, 0.5467]}, {"w": "tidy", "b": [0.4041, 0.5318, 0.4362, 0.5467]}, {"w": "data.", "b": [0.4424, 0.5318, 0.4832, 0.5467]}, {"w": "Other", "b": [0.4914, 0.5318, 0.5383, 0.5467]}, {"w": "machine", "b": [0.5445, 0.5318, 0.6103, 0.5467]}, {"w": "learning", "b": [0.6164, 0.5318, 0.6807, 0.5467]}, {"w": "packages", "b": [0.6869, 0.5318, 0.7573, 0.5467]}, {"w": "often", "b": [0.7635, 0.5318, 0.8037, 0.5467]}, {"w": "provide", "b": [0.8099, 0.5318, 0.8691, 0.5467]}, {"w": "application", "b": [0.1312, 0.5497, 0.2208, 0.5647]}, {"w": "programming", "b": [0.2269, 0.5497, 0.3351, 0.5647]}, {"w": "interfaces", "b": [0.3412, 0.5497, 0.4176, 0.5647]}, {"w": "(APIs)", "b": [0.4237, 0.5497, 0.4787, 0.5647]}, {"w": "to", "b": [0.4848, 0.5497, 0.5012, 0.5647]}, {"w": "one", "b": [0.5074, 0.5497, 0.5352, 0.5647]}, {"w": "or", "b": [0.5413, 0.5497, 0.5578, 0.5647]}, {"w": "several", "b": [0.5639, 0.5497, 0.6187, 0.5647]}, {"w": "such", "b": [0.6248, 0.5497, 0.6604, 0.5647]}, {"w": "proprietary", "b": [0.6666, 0.5497, 0.7578, 0.5647]}, {"w": "data", "b": [0.764, 0.5497, 0.8, 0.5647]}, {"w": "formats.", "b": [0.8061, 0.5497, 0.8727, 0.5647]}, {"w": "The", "b": [0.1306, 0.5675, 0.163, 0.5826]}, {"w": "most", "b": [0.1697, 0.5675, 0.2095, 0.5826]}, {"w": "frequently", "b": [0.2162, 0.5675, 0.2989, 0.5826]}, {"w": "supported", "b": [0.3056, 0.5675, 0.3879, 0.5826]}, {"w": "formats", "b": [0.3946, 0.5675, 0.457, 0.5826]}, {"w": "are", "b": [0.4637, 0.5675, 0.4888, 0.5826]}, {"w": "ARFF", "b": [0.4953, 0.5677, 0.554, 0.5826]}, {"w": "(Attribute-Relation", "b": [0.5607, 0.5675, 0.721, 0.5826]}, {"w": "File", "b": [0.7277, 0.5675, 0.7588, 0.5826]}, {"w": "Format", "b": [0.7655, 0.5675, 0.8255, 0.5826]}, {"w": "used", "b": [0.8321, 0.5675, 0.8689, 0.5826]}, {"w": "in", "b": [0.1312, 0.5855, 0.1469, 0.6006]}, {"w": "the", "b": [0.1547, 0.5855, 0.1809, 0.6006]}, {"w": "Weka", "b": [0.1887, 0.5855, 0.2342, 0.6006]}, {"w": "machine", "b": [0.242, 0.5855, 0.3095, 0.6006]}, {"w": "learning", "b": [0.3173, 0.5855, 0.3832, 0.6006]}, {"w": "package)", "b": [0.391, 0.5855, 0.4632, 0.6006]}, {"w": "and", "b": [0.471, 0.5855, 0.5013, 0.6006]}, {"w": "the", "b": [0.5091, 0.5855, 0.5353, 0.6006]}, {"w": "LIBSVM", "b": [0.5429, 0.5856, 0.6268, 0.6006]}, {"w": "(Library", "b": [0.6345, 0.5855, 0.7034, 0.6006]}, {"w": "for", "b": [0.7112, 0.5855, 0.7338, 0.6006]}, {"w": "Support", "b": [0.7415, 0.5855, 0.808, 0.6006]}, {"w": "Vector", "b": [0.8158, 0.5855, 0.8692, 0.6006]}, {"w": "Machines)", "b": [0.1312, 0.6034, 0.215, 0.6185]}, {"w": "format,", "b": [0.2225, 0.6034, 0.2826, 0.6185]}, {"w": "which", "b": [0.2904, 0.6034, 0.338, 0.6185]}, {"w": "is", "b": [0.3454, 0.6034, 0.3581, 0.6185]}, {"w": "the", "b": [0.3655, 0.6034, 0.3917, 0.6185]}, {"w": "default", "b": [0.3991, 0.6034, 0.4561, 0.6185]}, {"w": "format", "b": [0.4635, 0.6034, 0.5185, 0.6185]}, {"w": "used", "b": [0.5259, 0.6034, 0.5626, 0.6185]}, {"w": "by", "b": [0.57, 0.6034, 0.5899, 0.6185]}, {"w": "the", "b": [0.5973, 0.6034, 0.6235, 0.6185]}, {"w": "LIBSVM", "b": [0.6309, 0.6034, 0.7046, 0.6185]}, {"w": "and", "b": [0.7121, 0.6034, 0.7424, 0.6185]}, {"w": "LIBLINEAR", "b": [0.7496, 0.6036, 0.8688, 0.6185]}, {"w": "(Library", "b": [0.1291, 0.6215, 0.1966, 0.6364]}, {"w": "for", "b": [0.2027, 0.6215, 0.2248, 0.6364]}, {"w": "Large", "b": [0.231, 0.6215, 0.2764, 0.6364]}, {"w": "Linear", "b": [0.2826, 0.6215, 0.3342, 0.6364]}, {"w": "Classification)", "b": [0.3403, 0.6215, 0.4543, 0.6364]}, {"w": "machine", "b": [0.4605, 0.6215, 0.5266, 0.6364]}, {"w": "learning", "b": [0.5328, 0.6215, 0.5974, 0.6364]}, {"w": "libraries.", "b": [0.6036, 0.6215, 0.6735, 0.6364]}]}, {"id": "b_8", "type": "paragraph", "text": "The data in the LIBSVM format consists of one file containing all examples. Each line of that file represents a labeled feature vector using the following format:", "words": [{"w": "The", "b": [0.1306, 0.6483, 0.163, 0.6634]}, {"w": "data", "b": [0.1694, 0.6483, 0.206, 0.6634]}, {"w": "in", "b": [0.2124, 0.6483, 0.228, 0.6634]}, {"w": "the", "b": [0.2344, 0.6483, 0.2606, 0.6634]}, {"w": "LIBSVM", "b": [0.2669, 0.6483, 0.3407, 0.6634]}, {"w": "format", "b": [0.347, 0.6483, 0.402, 0.6634]}, {"w": "consists", "b": [0.4084, 0.6483, 0.4714, 0.6634]}, {"w": "of", "b": [0.4778, 0.6483, 0.493, 0.6634]}, {"w": "one", "b": [0.4994, 0.6483, 0.5276, 0.6634]}, {"w": "file", "b": [0.534, 0.6483, 0.5581, 0.6634]}, {"w": "containing", "b": [0.5644, 0.6483, 0.6497, 0.6634]}, {"w": "all", "b": [0.6561, 0.6483, 0.6759, 0.6634]}, {"w": "examples.", "b": [0.6823, 0.6483, 0.7624, 0.6634]}, {"w": "Each", "b": [0.7713, 0.6483, 0.8119, 0.6634]}, {"w": "line", "b": [0.8182, 0.6483, 0.8475, 0.6634]}, {"w": "of", "b": [0.8539, 0.6483, 0.8691, 0.6634]}, {"w": "that", "b": [0.1312, 0.6664, 0.1651, 0.6813]}, {"w": "file", "b": [0.1712, 0.6664, 0.1948, 0.6813]}, {"w": "represents", "b": [0.201, 0.6664, 0.2818, 0.6813]}, {"w": "a", "b": [0.288, 0.6664, 0.2972, 0.6813]}, {"w": "labeled", "b": [0.3033, 0.6664, 0.3603, 0.6813]}, {"w": "feature", "b": [0.3664, 0.6664, 0.4224, 0.6813]}, {"w": "vector", "b": [0.4285, 0.6664, 0.4778, 0.6813]}, {"w": "using", "b": [0.4839, 0.6664, 0.5261, 0.6813]}, {"w": "the", "b": [0.5322, 0.6664, 0.5579, 0.6813]}, {"w": "following", "b": [0.564, 0.6664, 0.6358, 0.6813]}, {"w": "format:", "b": [0.6419, 0.6664, 0.7009, 0.6813]}]}, {"id": "b_9", "type": "paragraph", "text": "label index1:value1 index2:value2 ...", "words": [{"w": "label", "b": [0.1312, 0.694, 0.1797, 0.709]}, {"w": "index1:value1", "b": [0.1893, 0.694, 0.3153, 0.709]}, {"w": "index2:value2", "b": [0.325, 0.694, 0.4509, 0.709]}, {"w": "...", "b": [0.4606, 0.694, 0.4896, 0.709]}]}, {"id": "b_10", "type": "paragraph", "text": "where indexX:valueY specifies the value Y of the feature at position (dimension) X. If the value at some position is zero, it can be omitted. This data format is especially convenient for sparse data consisting of examples in which the values of most features are zero.", "words": [{"w": "where", "b": [0.1306, 0.7202, 0.1779, 0.7352]}, {"w": "indexX:valueY", "b": [0.1841, 0.7202, 0.302, 0.7352]}, {"w": "specifies", "b": [0.3122, 0.7202, 0.3778, 0.7352]}, {"w": "the", "b": [0.3839, 0.7202, 0.4096, 0.7352]}, {"w": "value", "b": [0.4158, 0.7202, 0.4574, 0.7352]}, {"w": "Y", "b": [0.4635, 0.7202, 0.4742, 0.7351]}, {"w": "of", "b": [0.4844, 0.7202, 0.4994, 0.7352]}, {"w": "the", "b": [0.5055, 0.7202, 0.5312, 0.7352]}, {"w": "feature", "b": [0.5374, 0.7202, 0.5935, 0.7352]}, {"w": "at", "b": [0.5996, 0.7202, 0.6161, 0.7352]}, {"w": "position", "b": [0.6222, 0.7202, 0.6866, 0.7352]}, {"w": "(dimension)", "b": [0.6928, 0.7202, 0.7885, 0.7352]}, {"w": "X.", "b": [0.7945, 0.7202, 0.8164, 0.7352]}, {"w": "If", "b": [0.8246, 0.7202, 0.8369, 0.7352]}, {"w": "the", "b": [0.8431, 0.7202, 0.8688, 0.7352]}, {"w": "value", "b": [0.1308, 0.7381, 0.1726, 0.7531]}, {"w": "at", "b": [0.1788, 0.7381, 0.1953, 0.7531]}, {"w": "some", "b": [0.2014, 0.7381, 0.2419, 0.7531]}, {"w": "position", "b": [0.248, 0.7381, 0.3127, 0.7531]}, {"w": "is", "b": [0.3188, 0.7381, 0.3313, 0.7531]}, {"w": "zero,", "b": [0.3375, 0.7381, 0.3758, 0.7531]}, {"w": "it", "b": [0.3819, 0.7381, 0.3943, 0.7531]}, {"w": "can", "b": [0.4005, 0.7381, 0.4284, 0.7531]}, {"w": "be", "b": [0.4345, 0.7381, 0.4536, 0.7531]}, {"w": "omitted.", "b": [0.4598, 0.7381, 0.528, 0.7531]}, {"w": "This", "b": [0.5362, 0.7381, 0.5725, 0.7531]}, {"w": "data", "b": [0.5786, 0.7381, 0.6148, 0.7531]}, {"w": "format", "b": [0.6209, 0.7381, 0.6752, 0.7531]}, {"w": "is", "b": [0.6814, 0.7381, 0.6939, 0.7531]}, {"w": "especially", "b": [0.7, 0.7381, 0.7776, 0.7531]}, {"w": "convenient", "b": [0.7838, 0.7381, 0.8696, 0.7531]}, {"w": "for", "b": [0.1312, 0.7561, 0.1533, 0.771]}, {"w": "sparse", "b": [0.1595, 0.7561, 0.2168, 0.7711]}, {"w": "data", "b": [0.2239, 0.7561, 0.2645, 0.7711]}, {"w": "consisting", "b": [0.2711, 0.7561, 0.3502, 0.771]}, {"w": "of", "b": [0.3564, 0.7561, 0.3713, 0.771]}, {"w": "examples", "b": [0.3774, 0.7561, 0.4508, 0.771]}, {"w": "in", "b": [0.457, 0.7561, 0.4724, 0.771]}, {"w": "which", "b": [0.4785, 0.7561, 0.5252, 0.771]}, {"w": "the", "b": [0.5313, 0.7561, 0.557, 0.771]}, {"w": "values", "b": [0.5631, 0.7561, 0.6119, 0.771]}, {"w": "of", "b": [0.6181, 0.7561, 0.633, 0.771]}, {"w": "most", "b": [0.6391, 0.7561, 0.6782, 0.771]}, {"w": "features", "b": [0.6843, 0.7561, 0.7476, 0.771]}, {"w": "are", "b": [0.7537, 0.7561, 0.7784, 0.771]}, {"w": "zero.", "b": [0.7845, 0.7561, 0.8225, 0.771]}]}, {"id": "b_11", "type": "paragraph", "text": "Furthermore, different programming languages come with data serialization capabilities. The data for a specific machine learning package can be persisted on the hard drive using a serialization object or function provided by the programming language or library. When needed, the data can be deserialized in its original form. For example, in Python, a popular", "words": [{"w": "Furthermore,", "b": [0.1312, 0.7829, 0.239, 0.798]}, {"w": "different", "b": [0.2451, 0.7829, 0.3129, 0.798]}, {"w": "programming", "b": [0.319, 0.7829, 0.4285, 0.798]}, {"w": "languages", "b": [0.4346, 0.7829, 0.5139, 0.798]}, {"w": "come", "b": [0.52, 0.7829, 0.5617, 0.798]}, {"w": "with", "b": [0.5678, 0.7829, 0.6043, 0.798]}, {"w": "data", "b": [0.6104, 0.783, 0.651, 0.798]}, {"w": "serialization", "b": [0.6581, 0.783, 0.7692, 0.798]}, {"w": "capabilities.", "b": [0.7754, 0.7829, 0.8724, 0.798]}, {"w": "The", "b": [0.1306, 0.8008, 0.163, 0.8159]}, {"w": "data", "b": [0.1691, 0.8008, 0.2057, 0.8159]}, {"w": "for", "b": [0.2118, 0.8008, 0.2344, 0.8159]}, {"w": "a", "b": [0.2405, 0.8008, 0.2499, 0.8159]}, {"w": "specific", "b": [0.2561, 0.8008, 0.3153, 0.8159]}, {"w": "machine", "b": [0.3214, 0.8008, 0.3889, 0.8159]}, {"w": "learning", "b": [0.395, 0.8008, 0.461, 0.8159]}, {"w": "package", "b": [0.4671, 0.8008, 0.532, 0.8159]}, {"w": "can", "b": [0.5381, 0.8008, 0.5663, 0.8159]}, {"w": "be", "b": [0.5725, 0.8008, 0.5918, 0.8159]}, {"w": "persisted", "b": [0.5979, 0.8008, 0.6709, 0.8159]}, {"w": "on", "b": [0.6771, 0.8008, 0.6969, 0.8159]}, {"w": "the", "b": [0.703, 0.8008, 0.7292, 0.8159]}, {"w": "hard", "b": [0.7353, 0.8008, 0.773, 0.8159]}, {"w": "drive", "b": [0.7792, 0.8008, 0.82, 0.8159]}, {"w": "using", "b": [0.8262, 0.8008, 0.8692, 0.8159]}, {"w": "a", "b": [0.1312, 0.8188, 0.1406, 0.8339]}, {"w": "serialization", "b": [0.1467, 0.8188, 0.2447, 0.8339]}, {"w": "object", "b": [0.2508, 0.8188, 0.3007, 0.8339]}, {"w": "or", "b": [0.3069, 0.8188, 0.3236, 0.8339]}, {"w": "function", "b": [0.3297, 0.8188, 0.3968, 0.8339]}, {"w": "provided", "b": [0.403, 0.8188, 0.4737, 0.8339]}, {"w": "by", "b": [0.4799, 0.8188, 0.4997, 0.8339]}, {"w": "the", "b": [0.5058, 0.8188, 0.5318, 0.8339]}, {"w": "programming", "b": [0.538, 0.8188, 0.6472, 0.8339]}, {"w": "language", "b": [0.6534, 0.8188, 0.7251, 0.8339]}, {"w": "or", "b": [0.7313, 0.8188, 0.748, 0.8339]}, {"w": "library.", "b": [0.7542, 0.8188, 0.8125, 0.8339]}, {"w": "When", "b": [0.8207, 0.8188, 0.8691, 0.8339]}, {"w": "needed,", "b": [0.1312, 0.8369, 0.1913, 0.8518]}, {"w": "the", "b": [0.1975, 0.8369, 0.2229, 0.8518]}, {"w": "data", "b": [0.2291, 0.8369, 0.2647, 0.8518]}, {"w": "can", "b": [0.2709, 0.8369, 0.2984, 0.8518]}, {"w": "be", "b": [0.3045, 0.8369, 0.3234, 0.8518]}, {"w": "deserialized", "b": [0.3295, 0.8369, 0.4213, 0.8518]}, {"w": "in", "b": [0.4275, 0.8369, 0.4427, 0.8518]}, {"w": "its", "b": [0.4489, 0.8369, 0.4683, 0.8518]}, {"w": "original", "b": [0.4745, 0.8369, 0.5346, 0.8518]}, {"w": "form.", "b": [0.5408, 0.8369, 0.5831, 0.8518]}, {"w": "For", "b": [0.5913, 0.8369, 0.618, 0.8518]}, {"w": "example,", "b": [0.6242, 0.8369, 0.6949, 0.8518]}, {"w": "in", "b": [0.7011, 0.8369, 0.7164, 0.8518]}, {"w": "Python,", "b": [0.7225, 0.8369, 0.7864, 0.8518]}, {"w": "a", "b": [0.7925, 0.8369, 0.8017, 0.8518]}, {"w": "popular", "b": [0.8078, 0.8369, 0.8695, 0.8518]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 39", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "39", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 83, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "general-purpose serialization module is Pickle; R has built-in saveRDS and readRDS functions. Different data analysis packages can also offer their own serialization/deserialization tools.", "words": [{"w": "general-purpose", "b": [0.1312, 0.0885, 0.2556, 0.1033]}, {"w": "serialization", "b": [0.2602, 0.0885, 0.3549, 0.1033]}, {"w": "module", "b": [0.3595, 0.0885, 0.4173, 0.1033]}, {"w": "is", "b": [0.4219, 0.0885, 0.4341, 0.1033]}, {"w": "Pickle;", "b": [0.4386, 0.0884, 0.4997, 0.1034]}, {"w": "R", "b": [0.5048, 0.0885, 0.5181, 0.1033]}, {"w": "has", "b": [0.5228, 0.0885, 0.549, 0.1033]}, {"w": "built-in", "b": [0.5537, 0.0885, 0.612, 0.1033]}, {"w": "saveRDS", "b": [0.6167, 0.0892, 0.6845, 0.1041]}, {"w": "and", "b": [0.6892, 0.0885, 0.7183, 0.1033]}, {"w": "readRDS", "b": [0.723, 0.0892, 0.7908, 0.1041]}, {"w": "functions.", "b": [0.7954, 0.0885, 0.8724, 0.1033]}, {"w": "Different", "b": [0.1312, 0.1063, 0.2018, 0.1213]}, {"w": "data", "b": [0.2079, 0.1063, 0.2438, 0.1213]}, {"w": "analysis", "b": [0.25, 0.1063, 0.3133, 0.1213]}, {"w": "packages", "b": [0.3194, 0.1063, 0.3903, 0.1213]}, {"w": "can", "b": [0.3964, 0.1063, 0.4241, 0.1213]}, {"w": "also", "b": [0.4302, 0.1063, 0.4611, 0.1213]}, {"w": "offer", "b": [0.4673, 0.1063, 0.5027, 0.1213]}, {"w": "their", "b": [0.5088, 0.1063, 0.5468, 0.1213]}, {"w": "own", "b": [0.553, 0.1063, 0.5853, 0.1213]}, {"w": "serialization/deserialization", "b": [0.5914, 0.1063, 0.8122, 0.1213]}, {"w": "tools.", "b": [0.8184, 0.1063, 0.8621, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "In Java, any object that implements the java.io.Serializable interface can be serialized into a file and then deserialized when needed.", "words": [{"w": "In", "b": [0.1312, 0.1333, 0.1481, 0.1482]}, {"w": "Java,", "b": [0.1543, 0.1333, 0.1955, 0.1482]}, {"w": "any", "b": [0.2017, 0.1333, 0.2303, 0.1482]}, {"w": "object", "b": [0.2365, 0.1333, 0.2857, 0.1482]}, {"w": "that", "b": [0.2918, 0.1333, 0.3256, 0.1482]}, {"w": "implements", "b": [0.3318, 0.1333, 0.4235, 0.1482]}, {"w": "the", "b": [0.4297, 0.1333, 0.4553, 0.1482]}, {"w": "java.io.Serializable", "b": [0.4613, 0.134, 0.6551, 0.149]}, {"w": "interface", "b": [0.6612, 0.1333, 0.7299, 0.1482]}, {"w": "can", "b": [0.7361, 0.1333, 0.7637, 0.1482]}, {"w": "be", "b": [0.7699, 0.1333, 0.7888, 0.1482]}, {"w": "serialized", "b": [0.795, 0.1333, 0.8689, 0.1482]}, {"w": "into", "b": [0.1312, 0.1512, 0.1625, 0.1662]}, {"w": "a", "b": [0.1687, 0.1512, 0.1779, 0.1662]}, {"w": "file", "b": [0.184, 0.1512, 0.2076, 0.1662]}, {"w": "and", "b": [0.2138, 0.1512, 0.2435, 0.1662]}, {"w": "then", "b": [0.2497, 0.1512, 0.2856, 0.1662]}, {"w": "deserialized", "b": [0.2917, 0.1512, 0.3842, 0.1662]}, {"w": "when", "b": [0.3903, 0.1512, 0.4324, 0.1662]}, {"w": "needed.", "b": [0.4385, 0.1512, 0.4991, 0.1662]}]}, {"id": "b_2", "type": "paragraph", "text": "3.11.2 Data Storage Levels", "words": [{"w": "3.11.2", "b": [0.1312, 0.1991, 0.1855, 0.214]}, {"w": "Data", "b": [0.2067, 0.1991, 0.2518, 0.214]}, {"w": "Storage", "b": [0.2589, 0.1991, 0.3289, 0.214]}, {"w": "Levels", "b": [0.336, 0.1991, 0.3931, 0.214]}]}, {"id": "b_3", "type": "paragraph", "text": "Before deciding how and where to store the data, it’s essential to choose the appropriate storage level. Storage can be organized in different levels of abstraction: from the lowest level, the filesystem, to the highest level, such as data lake.", "words": [{"w": "Before", "b": [0.1312, 0.2355, 0.1838, 0.2506]}, {"w": "deciding", "b": [0.1907, 0.2355, 0.2587, 0.2506]}, {"w": "how", "b": [0.2655, 0.2355, 0.2984, 0.2506]}, {"w": "and", "b": [0.3052, 0.2355, 0.3356, 0.2506]}, {"w": "where", "b": [0.3424, 0.2355, 0.3906, 0.2506]}, {"w": "to", "b": [0.3974, 0.2355, 0.4141, 0.2506]}, {"w": "store", "b": [0.4209, 0.2355, 0.4608, 0.2506]}, {"w": "the", "b": [0.4676, 0.2355, 0.4938, 0.2506]}, {"w": "data,", "b": [0.5006, 0.2355, 0.5425, 0.2506]}, {"w": "it’s", "b": [0.5495, 0.2355, 0.5747, 0.2506]}, {"w": "essential", "b": [0.5815, 0.2355, 0.6502, 0.2506]}, {"w": "to", "b": [0.657, 0.2355, 0.6738, 0.2506]}, {"w": "choose", "b": [0.6806, 0.2355, 0.7341, 0.2506]}, {"w": "the", "b": [0.7409, 0.2355, 0.767, 0.2506]}, {"w": "appropriate", "b": [0.7738, 0.2355, 0.8691, 0.2506]}, {"w": "storage", "b": [0.1312, 0.2536, 0.1979, 0.2685]}, {"w": "level.", "b": [0.2049, 0.2535, 0.252, 0.2686]}, {"w": "Storage", "b": [0.2602, 0.2535, 0.3216, 0.2686]}, {"w": "can", "b": [0.3277, 0.2535, 0.3558, 0.2686]}, {"w": "be", "b": [0.3619, 0.2535, 0.3812, 0.2686]}, {"w": "organized", "b": [0.3873, 0.2535, 0.4654, 0.2686]}, {"w": "in", "b": [0.4715, 0.2535, 0.4871, 0.2686]}, {"w": "different", "b": [0.4932, 0.2535, 0.5609, 0.2686]}, {"w": "levels", "b": [0.567, 0.2535, 0.6108, 0.2686]}, {"w": "of", "b": [0.617, 0.2535, 0.6321, 0.2686]}, {"w": "abstraction:", "b": [0.6382, 0.2535, 0.7351, 0.2686]}, {"w": "from", "b": [0.7433, 0.2535, 0.7813, 0.2686]}, {"w": "the", "b": [0.7874, 0.2535, 0.8134, 0.2686]}, {"w": "lowest", "b": [0.8195, 0.2535, 0.8696, 0.2686]}, {"w": "level,", "b": [0.1312, 0.2715, 0.1723, 0.2865]}, {"w": "the", "b": [0.1784, 0.2715, 0.2041, 0.2865]}, {"w": "filesystem,", "b": [0.2102, 0.2715, 0.294, 0.2865]}, {"w": "to", "b": [0.3002, 0.2715, 0.3166, 0.2865]}, {"w": "the", "b": [0.3227, 0.2715, 0.3483, 0.2865]}, {"w": "highest", "b": [0.3545, 0.2715, 0.412, 0.2865]}, {"w": "level,", "b": [0.4182, 0.2715, 0.4592, 0.2865]}, {"w": "such", "b": [0.4654, 0.2715, 0.5009, 0.2865]}, {"w": "as", "b": [0.507, 0.2715, 0.5235, 0.2865]}, {"w": "data", "b": [0.5297, 0.2715, 0.5655, 0.2865]}, {"w": "lake.", "b": [0.5717, 0.2715, 0.6086, 0.2865]}]}, {"id": "b_4", "type": "paragraph", "text": "Filesystem is the foundational level of storage. The fundamental unit of data on that level is a file. A file can be text or binary, is not versioned, and can be easily erased or overwritten.", "words": [{"w": "Filesystem", "b": [0.1312, 0.2985, 0.2297, 0.3134]}, {"w": "is", "b": [0.2359, 0.2985, 0.2482, 0.3134]}, {"w": "the", "b": [0.2544, 0.2985, 0.2797, 0.3134]}, {"w": "foundational", "b": [0.2859, 0.2985, 0.3857, 0.3134]}, {"w": "level", "b": [0.3918, 0.2985, 0.4273, 0.3134]}, {"w": "of", "b": [0.4334, 0.2985, 0.4481, 0.3134]}, {"w": "storage.", "b": [0.4543, 0.2985, 0.5163, 0.3134]}, {"w": "The", "b": [0.5245, 0.2985, 0.5559, 0.3134]}, {"w": "fundamental", "b": [0.5621, 0.2985, 0.6614, 0.3134]}, {"w": "unit", "b": [0.6675, 0.2985, 0.6999, 0.3134]}, {"w": "of", "b": [0.7061, 0.2985, 0.7208, 0.3134]}, {"w": "data", "b": [0.727, 0.2985, 0.7624, 0.3134]}, {"w": "on", "b": [0.7686, 0.2985, 0.7878, 0.3134]}, {"w": "that", "b": [0.794, 0.2985, 0.8274, 0.3134]}, {"w": "level", "b": [0.8336, 0.2985, 0.8691, 0.3134]}, {"w": "is", "b": [0.1312, 0.3165, 0.1434, 0.3313]}, {"w": "a", "b": [0.1489, 0.3165, 0.1579, 0.3313]}, {"w": "file.", "b": [0.1636, 0.3164, 0.196, 0.3314]}, {"w": "A", "b": [0.204, 0.3165, 0.2176, 0.3313]}, {"w": "file", "b": [0.2231, 0.3165, 0.2462, 0.3313]}, {"w": "can", "b": [0.2517, 0.3165, 0.2788, 0.3313]}, {"w": "be", "b": [0.2843, 0.3165, 0.3029, 0.3313]}, {"w": "text", "b": [0.3084, 0.3165, 0.34, 0.3313]}, {"w": "or", "b": [0.3455, 0.3165, 0.3616, 0.3313]}, {"w": "binary,", "b": [0.3671, 0.3165, 0.4214, 0.3313]}, {"w": "is", "b": [0.427, 0.3165, 0.4392, 0.3313]}, {"w": "not", "b": [0.4447, 0.3165, 0.4708, 0.3313]}, {"w": "versioned,", "b": [0.4763, 0.3165, 0.5549, 0.3313]}, {"w": "and", "b": [0.5605, 0.3165, 0.5896, 0.3313]}, {"w": "can", "b": [0.5951, 0.3165, 0.6223, 0.3313]}, {"w": "be", "b": [0.6277, 0.3165, 0.6463, 0.3313]}, {"w": "easily", "b": [0.6518, 0.3165, 0.6957, 0.3313]}, {"w": "erased", "b": [0.7011, 0.3165, 0.7506, 0.3313]}, {"w": "or", "b": [0.756, 0.3165, 0.7722, 0.3313]}, {"w": "overwritten.", "b": [0.7777, 0.3165, 0.8727, 0.3313]}]}, {"id": "b_5", "type": "paragraph", "text": "A filesystem can be local or networked. A networked filesystem can be simple or distributed.", "words": [{"w": "A", "b": [0.1305, 0.3434, 0.1442, 0.3582]}, {"w": "filesystem", "b": [0.1503, 0.3434, 0.228, 0.3582]}, {"w": "can", "b": [0.2341, 0.3434, 0.2614, 0.3582]}, {"w": "be", "b": [0.2676, 0.3434, 0.2863, 0.3582]}, {"w": "local", "b": [0.2924, 0.3434, 0.3294, 0.3582]}, {"w": "or", "b": [0.3355, 0.3434, 0.3518, 0.3582]}, {"w": "networked.", "b": [0.3579, 0.3434, 0.444, 0.3582]}, {"w": "A", "b": [0.4522, 0.3434, 0.4658, 0.3582]}, {"w": "networked", "b": [0.472, 0.3434, 0.553, 0.3582]}, {"w": "filesystem", "b": [0.5591, 0.3434, 0.6367, 0.3582]}, {"w": "can", "b": [0.6429, 0.3434, 0.6702, 0.3582]}, {"w": "be", "b": [0.6763, 0.3434, 0.6951, 0.3582]}, {"w": "simple", "b": [0.7012, 0.3434, 0.7519, 0.3582]}, {"w": "or", "b": [0.758, 0.3434, 0.7743, 0.3582]}, {"w": "distributed.", "b": [0.7804, 0.3434, 0.8727, 0.3582]}]}, {"id": "b_6", "type": "paragraph", "text": "A local filesystem can be as simple as a locally mounted disk containing all the files needed for your machine learning project.", "words": [{"w": "A", "b": [0.1305, 0.3704, 0.1441, 0.3852]}, {"w": "local", "b": [0.1497, 0.3702, 0.1925, 0.3852]}, {"w": "filesystem", "b": [0.199, 0.3702, 0.29, 0.3852]}, {"w": "can", "b": [0.2957, 0.3704, 0.3228, 0.3852]}, {"w": "be", "b": [0.3285, 0.3704, 0.3471, 0.3852]}, {"w": "as", "b": [0.3527, 0.3704, 0.3689, 0.3852]}, {"w": "simple", "b": [0.3745, 0.3704, 0.4249, 0.3852]}, {"w": "as", "b": [0.4305, 0.3704, 0.4467, 0.3852]}, {"w": "a", "b": [0.4524, 0.3704, 0.4614, 0.3852]}, {"w": "locally", "b": [0.467, 0.3704, 0.5183, 0.3852]}, {"w": "mounted", "b": [0.5239, 0.3704, 0.5928, 0.3852]}, {"w": "disk", "b": [0.5984, 0.3704, 0.6302, 0.3852]}, {"w": "containing", "b": [0.6358, 0.3704, 0.7177, 0.3852]}, {"w": "all", "b": [0.7233, 0.3704, 0.7424, 0.3852]}, {"w": "the", "b": [0.7481, 0.3704, 0.7732, 0.3852]}, {"w": "files", "b": [0.7789, 0.3704, 0.8091, 0.3852]}, {"w": "needed", "b": [0.8148, 0.3704, 0.8691, 0.3852]}, {"w": "for", "b": [0.1312, 0.3882, 0.1533, 0.4031]}, {"w": "your", "b": [0.1595, 0.3882, 0.1954, 0.4031]}, {"w": "machine", "b": [0.2016, 0.3882, 0.2677, 0.4031]}, {"w": "learning", "b": [0.2739, 0.3882, 0.3385, 0.4031]}, {"w": "project.", "b": [0.3447, 0.3882, 0.4063, 0.4031]}]}, {"id": "b_7", "type": "paragraph", "text": "A distributed filesystem, such as NFS (Network File System), CephFS (Ceph File System) or HDFS, can be accessed over the network by multiple physical or virtual machines. Files in a distributed filesystem are stored and accessed over multiple machines in the network.", "words": [{"w": "A", "b": [0.1305, 0.415, 0.1446, 0.4301]}, {"w": "distributed", "b": [0.1532, 0.4151, 0.2555, 0.4301]}, {"w": "filesystem,", "b": [0.2653, 0.415, 0.3616, 0.4301]}, {"w": "such", "b": [0.3708, 0.415, 0.407, 0.4301]}, {"w": "as", "b": [0.4155, 0.415, 0.4324, 0.4301]}, {"w": "NFS", "b": [0.4409, 0.4151, 0.4826, 0.4301]}, {"w": "(Network", "b": [0.4912, 0.415, 0.5676, 0.4301]}, {"w": "File", "b": [0.5761, 0.415, 0.6072, 0.4301]}, {"w": "System),", "b": [0.6158, 0.415, 0.6875, 0.4301]}, {"w": "CephFS", "b": [0.6966, 0.4151, 0.7704, 0.4301]}, {"w": "(Ceph", "b": [0.7789, 0.415, 0.8291, 0.4301]}, {"w": "File", "b": [0.8377, 0.415, 0.8688, 0.4301]}, {"w": "System)", "b": [0.1312, 0.4332, 0.1951, 0.448]}, {"w": "or", "b": [0.2004, 0.4332, 0.2165, 0.448]}, {"w": "HDFS,", "b": [0.2217, 0.4331, 0.2847, 0.448]}, {"w": "can", "b": [0.29, 0.4332, 0.3171, 0.448]}, {"w": "be", "b": [0.3223, 0.4332, 0.3409, 0.448]}, {"w": "accessed", "b": [0.3462, 0.4332, 0.4117, 0.448]}, {"w": "over", "b": [0.417, 0.4332, 0.4496, 0.448]}, {"w": "the", "b": [0.4549, 0.4332, 0.48, 0.448]}, {"w": "network", "b": [0.4852, 0.4332, 0.5481, 0.448]}, {"w": "by", "b": [0.5533, 0.4332, 0.5724, 0.448]}, {"w": "multiple", "b": [0.5776, 0.4332, 0.6424, 0.448]}, {"w": "physical", "b": [0.6476, 0.4332, 0.7111, 0.448]}, {"w": "or", "b": [0.7163, 0.4332, 0.7324, 0.448]}, {"w": "virtual", "b": [0.7376, 0.4332, 0.7905, 0.448]}, {"w": "machines.", "b": [0.7957, 0.4332, 0.8727, 0.448]}, {"w": "Files", "b": [0.1312, 0.4511, 0.1683, 0.4659]}, {"w": "in", "b": [0.1734, 0.4511, 0.1885, 0.4659]}, {"w": "a", "b": [0.1936, 0.4511, 0.2027, 0.4659]}, {"w": "distributed", "b": [0.2078, 0.4511, 0.2944, 0.4659]}, {"w": "filesystem", "b": [0.2995, 0.4511, 0.3766, 0.4659]}, {"w": "are", "b": [0.3818, 0.4511, 0.4059, 0.4659]}, {"w": "stored", "b": [0.4111, 0.4511, 0.4595, 0.4659]}, {"w": "and", "b": [0.4646, 0.4511, 0.4937, 0.4659]}, {"w": "accessed", "b": [0.4989, 0.4511, 0.5644, 0.4659]}, {"w": "over", "b": [0.5696, 0.4511, 0.6023, 0.4659]}, {"w": "multiple", "b": [0.6074, 0.4511, 0.6722, 0.4659]}, {"w": "machines", "b": [0.6773, 0.4511, 0.7493, 0.4659]}, {"w": "in", "b": [0.7544, 0.4511, 0.7695, 0.4659]}, {"w": "the", "b": [0.7746, 0.4511, 0.7998, 0.4659]}, {"w": "network.", "b": [0.8049, 0.4511, 0.8728, 0.4659]}]}, {"id": "b_8", "type": "paragraph", "text": "Despite its simplicity, filesystem-level storage is appropriate for a many use cases, including:", "words": [{"w": "Despite", "b": [0.1312, 0.478, 0.1912, 0.4929]}, {"w": "its", "b": [0.1973, 0.478, 0.2168, 0.4929]}, {"w": "simplicity,", "b": [0.2229, 0.478, 0.304, 0.4929]}, {"w": "filesystem-level", "b": [0.3101, 0.478, 0.43, 0.4929]}, {"w": "storage", "b": [0.4361, 0.478, 0.4933, 0.4929]}, {"w": "is", "b": [0.4995, 0.478, 0.5118, 0.4929]}, {"w": "appropriate", "b": [0.5179, 0.478, 0.6107, 0.4929]}, {"w": "for", "b": [0.6169, 0.478, 0.6388, 0.4929]}, {"w": "a", "b": [0.6449, 0.478, 0.6541, 0.4929]}, {"w": "many", "b": [0.6603, 0.478, 0.704, 0.4929]}, {"w": "use", "b": [0.7102, 0.478, 0.7357, 0.4929]}, {"w": "cases,", "b": [0.7419, 0.478, 0.7869, 0.4929]}, {"w": "including:", "b": [0.7931, 0.478, 0.8715, 0.4929]}]}, {"id": "b_9", "type": "paragraph", "text": "File sharing", "words": [{"w": "File", "b": [0.1312, 0.5048, 0.1661, 0.5198]}, {"w": "sharing", "b": [0.1732, 0.5048, 0.2407, 0.5198]}]}, {"id": "b_10", "type": "paragraph", "text": "The simplicity of filesystem-level storage and support for standard protocols allows you to store and share data with a small group of colleagues with minimal effort.", "words": [{"w": "The", "b": [0.1767, 0.5229, 0.2078, 0.5377]}, {"w": "simplicity", "b": [0.2139, 0.5229, 0.2903, 0.5377]}, {"w": "of", "b": [0.2964, 0.5229, 0.3109, 0.5377]}, {"w": "filesystem-level", "b": [0.317, 0.5229, 0.4352, 0.5377]}, {"w": "storage", "b": [0.4413, 0.5229, 0.4977, 0.5377]}, {"w": "and", "b": [0.5037, 0.5229, 0.5329, 0.5377]}, {"w": "support", "b": [0.5389, 0.5229, 0.5999, 0.5377]}, {"w": "for", "b": [0.6059, 0.5229, 0.6275, 0.5377]}, {"w": "standard", "b": [0.6336, 0.5229, 0.7031, 0.5377]}, {"w": "protocols", "b": [0.7091, 0.5229, 0.7811, 0.5377]}, {"w": "allows", "b": [0.7871, 0.5229, 0.8349, 0.5377]}, {"w": "you", "b": [0.841, 0.5229, 0.8691, 0.5377]}, {"w": "to", "b": [0.1774, 0.5407, 0.1938, 0.5557]}, {"w": "store", "b": [0.1999, 0.5407, 0.239, 0.5557]}, {"w": "and", "b": [0.2452, 0.5407, 0.2749, 0.5557]}, {"w": "share", "b": [0.2811, 0.5407, 0.3233, 0.5557]}, {"w": "data", "b": [0.3294, 0.5407, 0.3653, 0.5557]}, {"w": "with", "b": [0.3715, 0.5407, 0.4073, 0.5557]}, {"w": "a", "b": [0.4135, 0.5407, 0.4227, 0.5557]}, {"w": "small", "b": [0.4289, 0.5407, 0.471, 0.5557]}, {"w": "group", "b": [0.4772, 0.5407, 0.5234, 0.5557]}, {"w": "of", "b": [0.5295, 0.5407, 0.5444, 0.5557]}, {"w": "colleagues", "b": [0.5505, 0.5407, 0.6306, 0.5557]}, {"w": "with", "b": [0.6368, 0.5407, 0.6727, 0.5557]}, {"w": "minimal", "b": [0.6788, 0.5407, 0.7444, 0.5557]}, {"w": "effort.", "b": [0.7506, 0.5407, 0.7983, 0.5557]}]}, {"id": "b_11", "type": "paragraph", "text": "Local archiving", "words": [{"w": "Local", "b": [0.1312, 0.5677, 0.1808, 0.5826]}, {"w": "archiving", "b": [0.1879, 0.5677, 0.273, 0.5826]}]}, {"id": "b_12", "type": "paragraph", "text": "Filesystem-level storage is a cost-effective option for archiving data, thanks to the availability and accessibility of scale-out NAS solutions.", "words": [{"w": "Filesystem-level", "b": [0.1774, 0.5855, 0.3075, 0.6006]}, {"w": "storage", "b": [0.3153, 0.5855, 0.374, 0.6006]}, {"w": "is", "b": [0.3818, 0.5855, 0.3944, 0.6006]}, {"w": "a", "b": [0.4022, 0.5855, 0.4116, 0.6006]}, {"w": "cost-effective", "b": [0.4193, 0.5855, 0.5246, 0.6006]}, {"w": "option", "b": [0.5323, 0.5855, 0.5846, 0.6006]}, {"w": "for", "b": [0.5923, 0.5855, 0.6149, 0.6006]}, {"w": "archiving", "b": [0.6226, 0.5855, 0.698, 0.6006]}, {"w": "data,", "b": [0.7057, 0.5855, 0.7476, 0.6006]}, {"w": "thanks", "b": [0.7557, 0.5855, 0.8107, 0.6006]}, {"w": "to", "b": [0.8185, 0.5855, 0.8352, 0.6006]}, {"w": "the", "b": [0.8429, 0.5855, 0.8691, 0.6006]}, {"w": "availability", "b": [0.1774, 0.6035, 0.2655, 0.6185]}, {"w": "and", "b": [0.2717, 0.6035, 0.3014, 0.6185]}, {"w": "accessibility", "b": [0.3076, 0.6035, 0.4032, 0.6185]}, {"w": "of", "b": [0.4093, 0.6035, 0.4242, 0.6185]}, {"w": "scale-out", "b": [0.4304, 0.6035, 0.5012, 0.6185]}, {"w": "NAS", "b": [0.5074, 0.6035, 0.5453, 0.6185]}, {"w": "solutions.", "b": [0.5514, 0.6035, 0.6275, 0.6185]}]}, {"id": "b_13", "type": "paragraph", "text": "Data protection", "words": [{"w": "Data", "b": [0.1312, 0.6305, 0.1764, 0.6454]}, {"w": "protection", "b": [0.1834, 0.6305, 0.2785, 0.6454]}]}, {"id": "b_14", "type": "paragraph", "text": "Filesystem-level storage is a viable data protection solution thanks to built-in redundancy and replication.", "words": [{"w": "Filesystem-level", "b": [0.1774, 0.6485, 0.3024, 0.6633]}, {"w": "storage", "b": [0.3066, 0.6485, 0.363, 0.6633]}, {"w": "is", "b": [0.3672, 0.6485, 0.3793, 0.6633]}, {"w": "a", "b": [0.3835, 0.6485, 0.3925, 0.6633]}, {"w": "viable", "b": [0.3967, 0.6485, 0.4434, 0.6633]}, {"w": "data", "b": [0.4476, 0.6485, 0.4828, 0.6633]}, {"w": "protection", "b": [0.4869, 0.6485, 0.5673, 0.6633]}, {"w": "solution", "b": [0.5715, 0.6485, 0.6339, 0.6633]}, {"w": "thanks", "b": [0.6381, 0.6485, 0.6909, 0.6633]}, {"w": "to", "b": [0.6951, 0.6485, 0.7112, 0.6633]}, {"w": "built-in", "b": [0.7153, 0.6485, 0.7736, 0.6633]}, {"w": "redundancy", "b": [0.7778, 0.6485, 0.8698, 0.6633]}, {"w": "and", "b": [0.1774, 0.6664, 0.2071, 0.6813]}, {"w": "replication.", "b": [0.2132, 0.6664, 0.3036, 0.6813]}]}, {"id": "b_15", "type": "paragraph", "text": "Parallel access to the data on the filesystem level is fast for retrieval access but slow for storage, so it’s an appropriate storage level for smaller teams and data.", "words": [{"w": "Parallel", "b": [0.1312, 0.6932, 0.1938, 0.7083]}, {"w": "access", "b": [0.201, 0.6932, 0.2504, 0.7083]}, {"w": "to", "b": [0.2577, 0.6932, 0.2744, 0.7083]}, {"w": "the", "b": [0.2816, 0.6932, 0.3078, 0.7083]}, {"w": "data", "b": [0.315, 0.6932, 0.3517, 0.7083]}, {"w": "on", "b": [0.3589, 0.6932, 0.3788, 0.7083]}, {"w": "the", "b": [0.386, 0.6932, 0.4122, 0.7083]}, {"w": "filesystem", "b": [0.4194, 0.6932, 0.4996, 0.7083]}, {"w": "level", "b": [0.5069, 0.6932, 0.5435, 0.7083]}, {"w": "is", "b": [0.5508, 0.6932, 0.5634, 0.7083]}, {"w": "fast", "b": [0.5707, 0.6932, 0.6006, 0.7083]}, {"w": "for", "b": [0.6078, 0.6932, 0.6304, 0.7083]}, {"w": "retrieval", "b": [0.6376, 0.6932, 0.7052, 0.7083]}, {"w": "access", "b": [0.7125, 0.6932, 0.7619, 0.7083]}, {"w": "but", "b": [0.7691, 0.6932, 0.7973, 0.7083]}, {"w": "slow", "b": [0.8046, 0.6932, 0.8397, 0.7083]}, {"w": "for", "b": [0.847, 0.6932, 0.8695, 0.7083]}, {"w": "storage,", "b": [0.1312, 0.7112, 0.1939, 0.7262]}, {"w": "so", "b": [0.2001, 0.7112, 0.2166, 0.7262]}, {"w": "it’s", "b": [0.2227, 0.7112, 0.2475, 0.7262]}, {"w": "an", "b": [0.2536, 0.7112, 0.2731, 0.7262]}, {"w": "appropriate", "b": [0.2793, 0.7112, 0.3727, 0.7262]}, {"w": "storage", "b": [0.3788, 0.7112, 0.4364, 0.7262]}, {"w": "level", "b": [0.4425, 0.7112, 0.4784, 0.7262]}, {"w": "for", "b": [0.4846, 0.7112, 0.5067, 0.7262]}, {"w": "smaller", "b": [0.5129, 0.7112, 0.5704, 0.7262]}, {"w": "teams", "b": [0.5766, 0.7112, 0.6238, 0.7262]}, {"w": "and", "b": [0.63, 0.7112, 0.6597, 0.7262]}, {"w": "data.", "b": [0.6659, 0.7112, 0.7069, 0.7262]}]}, {"id": "b_16", "type": "paragraph", "text": "Object storage is an application programming interface (API) defined over a filesystem. Using an API, you can programmatically execute such operations on files as GET, PUT, or DELETE without worrying where the files are actually stored. The API is typically provided by an API service available on the network and accessible by HTTP or, more generally, TCP/IP or a different communication protocol suite.", "words": [{"w": "Object", "b": [0.1312, 0.7382, 0.1934, 0.7531]}, {"w": "storage", "b": [0.201, 0.7382, 0.2676, 0.7531]}, {"w": "is", "b": [0.2741, 0.738, 0.2868, 0.7531]}, {"w": "an", "b": [0.2934, 0.738, 0.3132, 0.7531]}, {"w": "application", "b": [0.3198, 0.738, 0.4108, 0.7531]}, {"w": "programming", "b": [0.4173, 0.738, 0.5272, 0.7531]}, {"w": "interface", "b": [0.5338, 0.738, 0.6039, 0.7531]}, {"w": "(API)", "b": [0.6105, 0.738, 0.6589, 0.7531]}, {"w": "defined", "b": [0.6654, 0.738, 0.724, 0.7531]}, {"w": "over", "b": [0.7306, 0.738, 0.7646, 0.7531]}, {"w": "a", "b": [0.7712, 0.738, 0.7806, 0.7531]}, {"w": "filesystem.", "b": [0.7871, 0.738, 0.8726, 0.7531]}, {"w": "Using", "b": [0.1312, 0.7561, 0.1768, 0.771]}, {"w": "an", "b": [0.1829, 0.7561, 0.2023, 0.771]}, {"w": "API,", "b": [0.2085, 0.7561, 0.2465, 0.771]}, {"w": "you", "b": [0.2527, 0.7561, 0.2813, 0.771]}, {"w": "can", "b": [0.2874, 0.7561, 0.315, 0.771]}, {"w": "programmatically", "b": [0.3211, 0.7561, 0.4626, 0.771]}, {"w": "execute", "b": [0.4688, 0.7561, 0.5285, 0.771]}, {"w": "such", "b": [0.5347, 0.7561, 0.5701, 0.771]}, {"w": "operations", "b": [0.5762, 0.7561, 0.6596, 0.771]}, {"w": "on", "b": [0.6657, 0.7561, 0.6851, 0.771]}, {"w": "files", "b": [0.6913, 0.7561, 0.722, 0.771]}, {"w": "as", "b": [0.7282, 0.7561, 0.7446, 0.771]}, {"w": "GET,", "b": [0.7508, 0.7561, 0.7961, 0.771]}, {"w": "PUT,", "b": [0.8022, 0.7561, 0.8469, 0.771]}, {"w": "or", "b": [0.853, 0.7561, 0.8694, 0.771]}, {"w": "DELETE", "b": [0.1312, 0.7742, 0.2063, 0.789]}, {"w": "without", "b": [0.2122, 0.7742, 0.2735, 0.789]}, {"w": "worrying", "b": [0.2793, 0.7742, 0.3487, 0.789]}, {"w": "where", "b": [0.3545, 0.7742, 0.4008, 0.789]}, {"w": "the", "b": [0.4067, 0.7742, 0.4318, 0.789]}, {"w": "files", "b": [0.4376, 0.7742, 0.4679, 0.789]}, {"w": "are", "b": [0.4737, 0.7742, 0.4979, 0.789]}, {"w": "actually", "b": [0.5037, 0.7742, 0.5665, 0.789]}, {"w": "stored.", "b": [0.5723, 0.7742, 0.6257, 0.789]}, {"w": "The", "b": [0.6338, 0.7742, 0.665, 0.789]}, {"w": "API", "b": [0.6708, 0.7742, 0.7032, 0.789]}, {"w": "is", "b": [0.709, 0.7742, 0.7212, 0.789]}, {"w": "typically", "b": [0.7271, 0.7742, 0.7949, 0.789]}, {"w": "provided", "b": [0.8007, 0.7742, 0.8691, 0.789]}, {"w": "by", "b": [0.1312, 0.7919, 0.1511, 0.807]}, {"w": "an", "b": [0.1572, 0.7919, 0.1771, 0.807]}, {"w": "API", "b": [0.1833, 0.792, 0.2219, 0.807]}, {"w": "service", "b": [0.229, 0.792, 0.2921, 0.807]}, {"w": "available", "b": [0.2982, 0.7919, 0.3693, 0.807]}, {"w": "on", "b": [0.3754, 0.7919, 0.3953, 0.807]}, {"w": "the", "b": [0.4014, 0.7919, 0.4275, 0.807]}, {"w": "network", "b": [0.4337, 0.7919, 0.499, 0.807]}, {"w": "and", "b": [0.5051, 0.7919, 0.5354, 0.807]}, {"w": "accessible", "b": [0.5416, 0.7919, 0.6201, 0.807]}, {"w": "by", "b": [0.6263, 0.7919, 0.6461, 0.807]}, {"w": "HTTP", "b": [0.6522, 0.792, 0.7129, 0.807]}, {"w": "or,", "b": [0.719, 0.7919, 0.741, 0.807]}, {"w": "more", "b": [0.7471, 0.7919, 0.7879, 0.807]}, {"w": "generally,", "b": [0.7941, 0.7919, 0.8714, 0.807]}, {"w": "TCP/IP", "b": [0.1312, 0.8099, 0.209, 0.8249]}, {"w": "or", "b": [0.2151, 0.8099, 0.2316, 0.8249]}, {"w": "a", "b": [0.2377, 0.8099, 0.247, 0.8249]}, {"w": "different", "b": [0.2531, 0.8099, 0.3198, 0.8249]}, {"w": "communication", "b": [0.326, 0.8099, 0.4485, 0.8249]}, {"w": "protocol", "b": [0.4546, 0.8099, 0.5208, 0.8249]}, {"w": "suite.", "b": [0.527, 0.8099, 0.5702, 0.8249]}]}, {"id": "b_17", "type": "paragraph", "text": "The fundamental unit of data in an object storage level is an object. Objects are usually binary: images, sound, or video files, and other data elements having a particular format.", "words": [{"w": "The", "b": [0.1306, 0.8367, 0.163, 0.8518]}, {"w": "fundamental", "b": [0.1693, 0.8367, 0.2718, 0.8518]}, {"w": "unit", "b": [0.2781, 0.8367, 0.3116, 0.8518]}, {"w": "of", "b": [0.3179, 0.8367, 0.3331, 0.8518]}, {"w": "data", "b": [0.3394, 0.8367, 0.376, 0.8518]}, {"w": "in", "b": [0.3823, 0.8367, 0.398, 0.8518]}, {"w": "an", "b": [0.4043, 0.8367, 0.4241, 0.8518]}, {"w": "object", "b": [0.4304, 0.8367, 0.4806, 0.8518]}, {"w": "storage", "b": [0.487, 0.8367, 0.5457, 0.8518]}, {"w": "level", "b": [0.552, 0.8367, 0.5886, 0.8518]}, {"w": "is", "b": [0.5949, 0.8367, 0.6076, 0.8518]}, {"w": "an", "b": [0.6139, 0.8367, 0.6338, 0.8518]}, {"w": "object.", "b": [0.64, 0.8367, 0.7021, 0.8518]}, {"w": "Objects", "b": [0.7107, 0.8367, 0.7736, 0.8518]}, {"w": "are", "b": [0.7799, 0.8367, 0.8051, 0.8518]}, {"w": "usually", "b": [0.8114, 0.8367, 0.8695, 0.8518]}, {"w": "binary:", "b": [0.1312, 0.8548, 0.1882, 0.8698]}, {"w": "images,", "b": [0.1964, 0.8548, 0.256, 0.8698]}, {"w": "sound,", "b": [0.2621, 0.8548, 0.3145, 0.8698]}, {"w": "or", "b": [0.3207, 0.8548, 0.3371, 0.8698]}, {"w": "video", "b": [0.3433, 0.8548, 0.3859, 0.8698]}, {"w": "files,", "b": [0.392, 0.8548, 0.428, 0.8698]}, {"w": "and", "b": [0.4342, 0.8548, 0.4639, 0.8698]}, {"w": "other", "b": [0.4701, 0.8548, 0.5121, 0.8698]}, {"w": "data", "b": [0.5183, 0.8548, 0.5542, 0.8698]}, {"w": "elements", "b": [0.5603, 0.8548, 0.6297, 0.8698]}, {"w": "having", "b": [0.6358, 0.8548, 0.6891, 0.8698]}, {"w": "a", "b": [0.6953, 0.8548, 0.7045, 0.8698]}, {"w": "particular", "b": [0.7107, 0.8548, 0.7897, 0.8698]}, {"w": "format.", "b": [0.7959, 0.8548, 0.8549, 0.8698]}]}, {"id": "b_18", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 40", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "40", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 84, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Such features as versioning and redundancy can be built into the API service. The access to the data stored on the object storage level can often be done in parallel, but the access is not as fast as on the filesystem level.", "words": [{"w": "Such", "b": [0.1312, 0.0885, 0.1691, 0.1033]}, {"w": "features", "b": [0.1753, 0.0885, 0.2376, 0.1033]}, {"w": "as", "b": [0.2437, 0.0885, 0.26, 0.1033]}, {"w": "versioning", "b": [0.2661, 0.0885, 0.3461, 0.1033]}, {"w": "and", "b": [0.3522, 0.0885, 0.3815, 0.1033]}, {"w": "redundancy", "b": [0.3877, 0.0885, 0.4802, 0.1033]}, {"w": "can", "b": [0.4863, 0.0885, 0.5136, 0.1033]}, {"w": "be", "b": [0.5198, 0.0885, 0.5385, 0.1033]}, {"w": "built", "b": [0.5446, 0.0885, 0.582, 0.1033]}, {"w": "into", "b": [0.5882, 0.0885, 0.6189, 0.1033]}, {"w": "the", "b": [0.6251, 0.0885, 0.6504, 0.1033]}, {"w": "API", "b": [0.6565, 0.0885, 0.6891, 0.1033]}, {"w": "service.", "b": [0.6952, 0.0885, 0.7535, 0.1033]}, {"w": "The", "b": [0.7617, 0.0885, 0.793, 0.1033]}, {"w": "access", "b": [0.7992, 0.0885, 0.8469, 0.1033]}, {"w": "to", "b": [0.853, 0.0885, 0.8692, 0.1033]}, {"w": "the", "b": [0.1312, 0.1065, 0.1564, 0.1213]}, {"w": "data", "b": [0.1623, 0.1065, 0.1974, 0.1213]}, {"w": "stored", "b": [0.2034, 0.1065, 0.2518, 0.1213]}, {"w": "on", "b": [0.2577, 0.1065, 0.2768, 0.1213]}, {"w": "the", "b": [0.2827, 0.1065, 0.3078, 0.1213]}, {"w": "object", "b": [0.3137, 0.1065, 0.362, 0.1213]}, {"w": "storage", "b": [0.3679, 0.1065, 0.4243, 0.1213]}, {"w": "level", "b": [0.4303, 0.1065, 0.4654, 0.1213]}, {"w": "can", "b": [0.4713, 0.1065, 0.4985, 0.1213]}, {"w": "often", "b": [0.5044, 0.1065, 0.5441, 0.1213]}, {"w": "be", "b": [0.55, 0.1065, 0.5686, 0.1213]}, {"w": "done", "b": [0.5745, 0.1065, 0.6117, 0.1213]}, {"w": "in", "b": [0.6176, 0.1065, 0.6327, 0.1213]}, {"w": "parallel,", "b": [0.6387, 0.1065, 0.702, 0.1213]}, {"w": "but", "b": [0.708, 0.1065, 0.7351, 0.1213]}, {"w": "the", "b": [0.741, 0.1065, 0.7662, 0.1213]}, {"w": "access", "b": [0.7721, 0.1065, 0.8195, 0.1213]}, {"w": "is", "b": [0.8255, 0.1065, 0.8376, 0.1213]}, {"w": "not", "b": [0.8435, 0.1065, 0.8697, 0.1213]}, {"w": "as", "b": [0.1312, 0.1243, 0.1477, 0.1392]}, {"w": "fast", "b": [0.1539, 0.1243, 0.1832, 0.1392]}, {"w": "as", "b": [0.1894, 0.1243, 0.2059, 0.1392]}, {"w": "on", "b": [0.212, 0.1243, 0.2315, 0.1392]}, {"w": "the", "b": [0.2377, 0.1243, 0.2633, 0.1392]}, {"w": "filesystem", "b": [0.2695, 0.1243, 0.3481, 0.1392]}, {"w": "level.", "b": [0.3543, 0.1243, 0.3953, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "Canonical examples of object storage are Amazon S3 and Google Cloud Storage (GCS). Alternatively, Ceph is a storage platform that implements object storage on a single dis- tributed computer cluster and provides interfaces for both object- and filesystem-level storage. It’s often used as an alternative to S3 and GCS in on-premises computing systems.", "words": [{"w": "Canonical", "b": [0.1312, 0.1513, 0.2096, 0.1661]}, {"w": "examples", "b": [0.2155, 0.1513, 0.2875, 0.1661]}, {"w": "of", "b": [0.2934, 0.1513, 0.3079, 0.1661]}, {"w": "object", "b": [0.3139, 0.1513, 0.3621, 0.1661]}, {"w": "storage", "b": [0.368, 0.1513, 0.4245, 0.1661]}, {"w": "are", "b": [0.4304, 0.1513, 0.4545, 0.1661]}, {"w": "Amazon", "b": [0.4603, 0.1512, 0.5362, 0.1662]}, {"w": "S3", "b": [0.543, 0.1512, 0.5654, 0.1662]}, {"w": "and", "b": [0.5713, 0.1513, 0.6004, 0.1661]}, {"w": "Google", "b": [0.6063, 0.1512, 0.671, 0.1662]}, {"w": "Cloud", "b": [0.6778, 0.1512, 0.7332, 0.1662]}, {"w": "Storage", "b": [0.7401, 0.1512, 0.8101, 0.1662]}, {"w": "(GCS).", "b": [0.816, 0.1513, 0.8724, 0.1661]}, {"w": "Alternatively,", "b": [0.1305, 0.169, 0.242, 0.1841]}, {"w": "Ceph", "b": [0.2489, 0.1692, 0.2975, 0.1841]}, {"w": "is", "b": [0.3043, 0.169, 0.317, 0.1841]}, {"w": "a", "b": [0.3237, 0.169, 0.3332, 0.1841]}, {"w": "storage", "b": [0.3399, 0.169, 0.3986, 0.1841]}, {"w": "platform", "b": [0.4054, 0.169, 0.476, 0.1841]}, {"w": "that", "b": [0.4828, 0.169, 0.5173, 0.1841]}, {"w": "implements", "b": [0.5241, 0.169, 0.6178, 0.1841]}, {"w": "object", "b": [0.6245, 0.169, 0.6747, 0.1841]}, {"w": "storage", "b": [0.6815, 0.169, 0.7402, 0.1841]}, {"w": "on", "b": [0.747, 0.169, 0.7669, 0.1841]}, {"w": "a", "b": [0.7736, 0.169, 0.783, 0.1841]}, {"w": "single", "b": [0.7898, 0.169, 0.8359, 0.1841]}, {"w": "dis-", "b": [0.8427, 0.169, 0.8721, 0.1841]}, {"w": "tributed", "b": [0.1312, 0.1872, 0.1956, 0.202]}, {"w": "computer", "b": [0.201, 0.1872, 0.2754, 0.202]}, {"w": "cluster", "b": [0.2809, 0.1872, 0.3333, 0.202]}, {"w": "and", "b": [0.3387, 0.1872, 0.3679, 0.202]}, {"w": "provides", "b": [0.3733, 0.1872, 0.4388, 0.202]}, {"w": "interfaces", "b": [0.4442, 0.1872, 0.5187, 0.202]}, {"w": "for", "b": [0.5241, 0.1872, 0.5458, 0.202]}, {"w": "both", "b": [0.5512, 0.1872, 0.5879, 0.202]}, {"w": "object-", "b": [0.5933, 0.1872, 0.6476, 0.202]}, {"w": "and", "b": [0.653, 0.1872, 0.6822, 0.202]}, {"w": "filesystem-level", "b": [0.6876, 0.1872, 0.8059, 0.202]}, {"w": "storage.", "b": [0.8113, 0.1872, 0.8728, 0.202]}, {"w": "It’s", "b": [0.1312, 0.205, 0.1575, 0.22]}, {"w": "often", "b": [0.1636, 0.205, 0.2041, 0.22]}, {"w": "used", "b": [0.2103, 0.205, 0.2463, 0.22]}, {"w": "as", "b": [0.2525, 0.205, 0.269, 0.22]}, {"w": "an", "b": [0.2751, 0.205, 0.2946, 0.22]}, {"w": "alternative", "b": [0.3007, 0.205, 0.3869, 0.22]}, {"w": "to", "b": [0.3931, 0.205, 0.4095, 0.22]}, {"w": "S3", "b": [0.4156, 0.205, 0.4351, 0.22]}, {"w": "and", "b": [0.4413, 0.205, 0.471, 0.22]}, {"w": "GCS", "b": [0.4772, 0.205, 0.5152, 0.22]}, {"w": "in", "b": [0.5214, 0.205, 0.5368, 0.22]}, {"w": "on-premises", "b": [0.5429, 0.205, 0.6375, 0.22]}, {"w": "computing", "b": [0.6437, 0.205, 0.7288, 0.22]}, {"w": "systems.", "b": [0.7349, 0.205, 0.8024, 0.22]}]}, {"id": "b_2", "type": "paragraph", "text": "The database level of data storage allows persistent, fast, and scalable storage of structured data with fast parallel access for both storage and retrieval.", "words": [{"w": "The", "b": [0.1306, 0.2321, 0.1617, 0.2469]}, {"w": "database", "b": [0.1664, 0.232, 0.2473, 0.2469]}, {"w": "level", "b": [0.252, 0.2321, 0.2872, 0.2469]}, {"w": "of", "b": [0.2919, 0.2321, 0.3065, 0.2469]}, {"w": "data", "b": [0.3112, 0.2321, 0.3464, 0.2469]}, {"w": "storage", "b": [0.3511, 0.2321, 0.4075, 0.2469]}, {"w": "allows", "b": [0.4122, 0.2321, 0.4601, 0.2469]}, {"w": "persistent,", "b": [0.4648, 0.2321, 0.5465, 0.2469]}, {"w": "fast,", "b": [0.5515, 0.2321, 0.5853, 0.2469]}, {"w": "and", "b": [0.5903, 0.2321, 0.6194, 0.2469]}, {"w": "scalable", "b": [0.6241, 0.2321, 0.6855, 0.2469]}, {"w": "storage", "b": [0.6903, 0.2321, 0.7467, 0.2469]}, {"w": "of", "b": [0.7514, 0.2321, 0.766, 0.2469]}, {"w": "structured", "b": [0.7719, 0.232, 0.8688, 0.2469]}, {"w": "data", "b": [0.1312, 0.2499, 0.1719, 0.2649]}, {"w": "with", "b": [0.1784, 0.2499, 0.2143, 0.2649]}, {"w": "fast", "b": [0.2205, 0.2499, 0.2498, 0.2649]}, {"w": "parallel", "b": [0.256, 0.2499, 0.3155, 0.2649]}, {"w": "access", "b": [0.3217, 0.2499, 0.3701, 0.2649]}, {"w": "for", "b": [0.3762, 0.2499, 0.3983, 0.2649]}, {"w": "both", "b": [0.4045, 0.2499, 0.4419, 0.2649]}, {"w": "storage", "b": [0.448, 0.2499, 0.5056, 0.2649]}, {"w": "and", "b": [0.5118, 0.2499, 0.5415, 0.2649]}, {"w": "retrieval.", "b": [0.5477, 0.2499, 0.6191, 0.2649]}]}, {"id": "b_3", "type": "paragraph", "text": "A modern database management system (DBMS) stores data in random-access memory (RAM), but software ensures that data is persisted (and operations on data are logged) to", "words": [{"w": "A", "b": [0.1305, 0.2767, 0.1446, 0.2918]}, {"w": "modern", "b": [0.1514, 0.2767, 0.2137, 0.2918]}, {"w": "database", "b": [0.2205, 0.2767, 0.2927, 0.2918]}, {"w": "management", "b": [0.2995, 0.2767, 0.4036, 0.2918]}, {"w": "system", "b": [0.4104, 0.2767, 0.4665, 0.2918]}, {"w": "(DBMS)", "b": [0.4733, 0.2767, 0.5511, 0.2918]}, {"w": "stores", "b": [0.5579, 0.2767, 0.6053, 0.2918]}, {"w": "data", "b": [0.612, 0.2767, 0.6486, 0.2918]}, {"w": "in", "b": [0.6554, 0.2767, 0.6711, 0.2918]}, {"w": "random-access", "b": [0.6779, 0.2767, 0.7963, 0.2918]}, {"w": "memory", "b": [0.8031, 0.2767, 0.8696, 0.2918]}, {"w": "(RAM),", "b": [0.1291, 0.2948, 0.2007, 0.3097]}, {"w": "but", "b": [0.2068, 0.2948, 0.2345, 0.3097]}, {"w": "software", "b": [0.2407, 0.2948, 0.307, 0.3097]}, {"w": "ensures", "b": [0.3132, 0.2948, 0.372, 0.3097]}, {"w": "that", "b": [0.3781, 0.2948, 0.412, 0.3097]}, {"w": "data", "b": [0.4181, 0.2948, 0.454, 0.3097]}, {"w": "is", "b": [0.4601, 0.2948, 0.4726, 0.3097]}, {"w": "persisted", "b": [0.4787, 0.2948, 0.5503, 0.3097]}, {"w": "(and", "b": [0.5565, 0.2948, 0.5934, 0.3097]}, {"w": "operations", "b": [0.5996, 0.2948, 0.6834, 0.3097]}, {"w": "on", "b": [0.6895, 0.2948, 0.709, 0.3097]}, {"w": "data", "b": [0.7151, 0.2948, 0.7511, 0.3097]}, {"w": "are", "b": [0.7572, 0.2948, 0.7819, 0.3097]}, {"w": "logged)", "b": [0.788, 0.2948, 0.8465, 0.3097]}, {"w": "to", "b": [0.8527, 0.2948, 0.8691, 0.3097]}]}, {"id": "b_4", "type": "paragraph", "text": "disk and never lost.", "words": [{"w": "disk", "b": [0.1312, 0.3127, 0.1636, 0.3277]}, {"w": "and", "b": [0.1698, 0.3127, 0.1995, 0.3277]}, {"w": "never", "b": [0.2057, 0.3127, 0.2488, 0.3277]}, {"w": "lost.", "b": [0.255, 0.3127, 0.2889, 0.3277]}]}, {"id": "b_5", "type": "paragraph", "text": "The fundamental unit of data at this level is a row. A row has a unique ID and contains values in columns. In a relational database, rows are organized in tables. Rows can have references to other rows in the same or different tables.", "words": [{"w": "The", "b": [0.1306, 0.3395, 0.163, 0.3546]}, {"w": "fundamental", "b": [0.1694, 0.3395, 0.2719, 0.3546]}, {"w": "unit", "b": [0.2783, 0.3395, 0.3118, 0.3546]}, {"w": "of", "b": [0.3182, 0.3395, 0.3334, 0.3546]}, {"w": "data", "b": [0.3398, 0.3395, 0.3764, 0.3546]}, {"w": "at", "b": [0.3828, 0.3395, 0.3996, 0.3546]}, {"w": "this", "b": [0.406, 0.3395, 0.4364, 0.3546]}, {"w": "level", "b": [0.4429, 0.3395, 0.4795, 0.3546]}, {"w": "is", "b": [0.4859, 0.3395, 0.4986, 0.3546]}, {"w": "a", "b": [0.505, 0.3395, 0.5144, 0.3546]}, {"w": "row.", "b": [0.5209, 0.3395, 0.5602, 0.3546]}, {"w": "A", "b": [0.5692, 0.3395, 0.5833, 0.3546]}, {"w": "row", "b": [0.5898, 0.3395, 0.6196, 0.3546]}, {"w": "has", "b": [0.626, 0.3395, 0.6534, 0.3546]}, {"w": "a", "b": [0.6598, 0.3395, 0.6692, 0.3546]}, {"w": "unique", "b": [0.6756, 0.3395, 0.7305, 0.3546]}, {"w": "ID", "b": [0.7369, 0.3395, 0.7581, 0.3546]}, {"w": "and", "b": [0.7646, 0.3395, 0.7949, 0.3546]}, {"w": "contains", "b": [0.8013, 0.3395, 0.8689, 0.3546]}, {"w": "values", "b": [0.1308, 0.3575, 0.1806, 0.3726]}, {"w": "in", "b": [0.1869, 0.3575, 0.2026, 0.3726]}, {"w": "columns.", "b": [0.2089, 0.3575, 0.2812, 0.3726]}, {"w": "In", "b": [0.2899, 0.3575, 0.3072, 0.3726]}, {"w": "a", "b": [0.3135, 0.3575, 0.3229, 0.3726]}, {"w": "relational", "b": [0.3292, 0.3575, 0.4067, 0.3726]}, {"w": "database,", "b": [0.413, 0.3575, 0.4905, 0.3726]}, {"w": "rows", "b": [0.4969, 0.3575, 0.5342, 0.3726]}, {"w": "are", "b": [0.5405, 0.3575, 0.5656, 0.3726]}, {"w": "organized", "b": [0.572, 0.3575, 0.6505, 0.3726]}, {"w": "in", "b": [0.6568, 0.3575, 0.6725, 0.3726]}, {"w": "tables.", "b": [0.6787, 0.3575, 0.7383, 0.3726]}, {"w": "Rows", "b": [0.747, 0.3575, 0.7908, 0.3726]}, {"w": "can", "b": [0.7971, 0.3575, 0.8253, 0.3726]}, {"w": "have", "b": [0.8317, 0.3575, 0.8688, 0.3726]}, {"w": "references", "b": [0.1312, 0.3755, 0.2099, 0.3905]}, {"w": "to", "b": [0.2161, 0.3755, 0.2325, 0.3905]}, {"w": "other", "b": [0.2386, 0.3755, 0.2807, 0.3905]}, {"w": "rows", "b": [0.2869, 0.3755, 0.3234, 0.3905]}, {"w": "in", "b": [0.3296, 0.3755, 0.345, 0.3905]}, {"w": "the", "b": [0.3511, 0.3755, 0.3768, 0.3905]}, {"w": "same", "b": [0.3829, 0.3755, 0.423, 0.3905]}, {"w": "or", "b": [0.4292, 0.3755, 0.4456, 0.3905]}, {"w": "different", "b": [0.4518, 0.3755, 0.5185, 0.3905]}, {"w": "tables.", "b": [0.5246, 0.3755, 0.577, 0.3905]}]}, {"id": "b_6", "type": "paragraph", "text": "Databases are not exceptionally well suited for storing binary data, though rather small binary objects can sometimes be stored in a column in the form of a blob (for Binary Large OBject). Blob is a collection of binary data stored as a single entity. More often, though, a row stores references to binary objects stored elsewhere — in a filesystem or object storage.", "words": [{"w": "Databases", "b": [0.1312, 0.4023, 0.2149, 0.4175]}, {"w": "are", "b": [0.2222, 0.4023, 0.2473, 0.4175]}, {"w": "not", "b": [0.2547, 0.4023, 0.2819, 0.4175]}, {"w": "exceptionally", "b": [0.2892, 0.4023, 0.3969, 0.4175]}, {"w": "well", "b": [0.4043, 0.4023, 0.4362, 0.4175]}, {"w": "suited", "b": [0.4435, 0.4023, 0.4928, 0.4175]}, {"w": "for", "b": [0.5001, 0.4023, 0.5227, 0.4175]}, {"w": "storing", "b": [0.53, 0.4023, 0.5866, 0.4175]}, {"w": "binary", "b": [0.594, 0.4023, 0.6468, 0.4175]}, {"w": "data,", "b": [0.6542, 0.4023, 0.696, 0.4175]}, {"w": "though", "b": [0.7036, 0.4023, 0.7611, 0.4175]}, {"w": "rather", "b": [0.7685, 0.4023, 0.8188, 0.4175]}, {"w": "small", "b": [0.8261, 0.4023, 0.8691, 0.4175]}, {"w": "binary", "b": [0.1312, 0.4205, 0.1822, 0.4353]}, {"w": "objects", "b": [0.1884, 0.4205, 0.244, 0.4353]}, {"w": "can", "b": [0.2502, 0.4205, 0.2774, 0.4353]}, {"w": "sometimes", "b": [0.2836, 0.4205, 0.3655, 0.4353]}, {"w": "be", "b": [0.3716, 0.4205, 0.3903, 0.4353]}, {"w": "stored", "b": [0.3965, 0.4205, 0.4451, 0.4353]}, {"w": "in", "b": [0.4512, 0.4205, 0.4663, 0.4353]}, {"w": "a", "b": [0.4725, 0.4205, 0.4816, 0.4353]}, {"w": "column", "b": [0.4877, 0.4205, 0.5452, 0.4353]}, {"w": "in", "b": [0.5514, 0.4205, 0.5665, 0.4353]}, {"w": "the", "b": [0.5727, 0.4205, 0.5979, 0.4353]}, {"w": "form", "b": [0.604, 0.4205, 0.6409, 0.4353]}, {"w": "of", "b": [0.6471, 0.4205, 0.6617, 0.4353]}, {"w": "a", "b": [0.6678, 0.4205, 0.6769, 0.4353]}, {"w": "blob", "b": [0.683, 0.4204, 0.7231, 0.4354]}, {"w": "(for", "b": [0.7292, 0.4205, 0.7581, 0.4353]}, {"w": "Binary", "b": [0.7642, 0.4205, 0.818, 0.4353]}, {"w": "Large", "b": [0.8241, 0.4205, 0.8688, 0.4353]}, {"w": "OBject).", "b": [0.1312, 0.4384, 0.2002, 0.4533]}, {"w": "Blob", "b": [0.2084, 0.4384, 0.2461, 0.4533]}, {"w": "is", "b": [0.2522, 0.4384, 0.2646, 0.4533]}, {"w": "a", "b": [0.2708, 0.4384, 0.28, 0.4533]}, {"w": "collection", "b": [0.2862, 0.4384, 0.3621, 0.4533]}, {"w": "of", "b": [0.3682, 0.4384, 0.3831, 0.4533]}, {"w": "binary", "b": [0.3892, 0.4384, 0.4411, 0.4533]}, {"w": "data", "b": [0.4472, 0.4384, 0.4831, 0.4533]}, {"w": "stored", "b": [0.4893, 0.4384, 0.5386, 0.4533]}, {"w": "as", "b": [0.5448, 0.4384, 0.5613, 0.4533]}, {"w": "a", "b": [0.5674, 0.4384, 0.5767, 0.4533]}, {"w": "single", "b": [0.5828, 0.4384, 0.6281, 0.4533]}, {"w": "entity.", "b": [0.6342, 0.4384, 0.6845, 0.4533]}, {"w": "More", "b": [0.6927, 0.4384, 0.7342, 0.4533]}, {"w": "often,", "b": [0.7404, 0.4384, 0.786, 0.4533]}, {"w": "though,", "b": [0.7922, 0.4384, 0.8537, 0.4533]}, {"w": "a", "b": [0.8599, 0.4384, 0.8691, 0.4533]}, {"w": "row", "b": [0.1312, 0.4563, 0.1605, 0.4713]}, {"w": "stores", "b": [0.1667, 0.4563, 0.2131, 0.4713]}, {"w": "references", "b": [0.2192, 0.4563, 0.2979, 0.4713]}, {"w": "to", "b": [0.3041, 0.4563, 0.3205, 0.4713]}, {"w": "binary", "b": [0.3266, 0.4563, 0.3785, 0.4713]}, {"w": "objects", "b": [0.3846, 0.4563, 0.4411, 0.4713]}, {"w": "stored", "b": [0.4473, 0.4563, 0.4967, 0.4713]}, {"w": "elsewhere", "b": [0.5028, 0.4563, 0.5789, 0.4713]}, {"w": "—", "b": [0.585, 0.4563, 0.6035, 0.4713]}, {"w": "in", "b": [0.6096, 0.4563, 0.625, 0.4713]}, {"w": "a", "b": [0.6312, 0.4563, 0.6404, 0.4713]}, {"w": "filesystem", "b": [0.6465, 0.4563, 0.7252, 0.4713]}, {"w": "or", "b": [0.7313, 0.4563, 0.7478, 0.4713]}, {"w": "object", "b": [0.7539, 0.4563, 0.8032, 0.4713]}, {"w": "storage.", "b": [0.8093, 0.4563, 0.872, 0.4713]}]}, {"id": "b_7", "type": "paragraph", "text": "The four most frequently used DBMS in the industry are Oracle, MySQL, Microsoft SQL Server, and PostgresSQL. They all support SQL (Structured Query Language), an interface for accessing and modifying data stored in the databases, as well as creating, modifying, and erasing databases.10", "words": [{"w": "The", "b": [0.1306, 0.4831, 0.163, 0.4982]}, {"w": "four", "b": [0.1692, 0.4831, 0.2022, 0.4982]}, {"w": "most", "b": [0.2084, 0.4831, 0.2483, 0.4982]}, {"w": "frequently", "b": [0.2545, 0.4831, 0.3372, 0.4982]}, {"w": "used", "b": [0.3435, 0.4831, 0.3802, 0.4982]}, {"w": "DBMS", "b": [0.3864, 0.4831, 0.4418, 0.4982]}, {"w": "in", "b": [0.4481, 0.4831, 0.4637, 0.4982]}, {"w": "the", "b": [0.47, 0.4831, 0.4961, 0.4982]}, {"w": "industry", "b": [0.5023, 0.4831, 0.571, 0.4982]}, {"w": "are", "b": [0.5773, 0.4831, 0.6024, 0.4982]}, {"w": "Oracle,", "b": [0.6086, 0.4831, 0.6673, 0.4982]}, {"w": "MySQL,", "b": [0.6735, 0.4831, 0.7428, 0.4982]}, {"w": "Microsoft", "b": [0.749, 0.4831, 0.8266, 0.4982]}, {"w": "SQL", "b": [0.8328, 0.4831, 0.8697, 0.4982]}, {"w": "Server,", "b": [0.1312, 0.5012, 0.1864, 0.5161]}, {"w": "and", "b": [0.1925, 0.5012, 0.2221, 0.5161]}, {"w": "PostgresSQL.", "b": [0.2282, 0.5012, 0.3365, 0.5161]}, {"w": "They", "b": [0.3427, 0.5012, 0.3839, 0.5161]}, {"w": "all", "b": [0.3901, 0.5012, 0.4094, 0.5161]}, {"w": "support", "b": [0.4156, 0.5012, 0.4774, 0.5161]}, {"w": "SQL", "b": [0.4835, 0.5012, 0.5195, 0.5161]}, {"w": "(Structured", "b": [0.5256, 0.5012, 0.6185, 0.5161]}, {"w": "Query", "b": [0.6246, 0.5012, 0.6741, 0.5161]}, {"w": "Language),", "b": [0.6802, 0.5012, 0.7691, 0.5161]}, {"w": "an", "b": [0.7753, 0.5012, 0.7946, 0.5161]}, {"w": "interface", "b": [0.8008, 0.5012, 0.8691, 0.5161]}, {"w": "for", "b": [0.1312, 0.5192, 0.1529, 0.534]}, {"w": "accessing", "b": [0.1591, 0.5192, 0.2307, 0.534]}, {"w": "and", "b": [0.2369, 0.5192, 0.266, 0.534]}, {"w": "modifying", "b": [0.2722, 0.5192, 0.3512, 0.534]}, {"w": "data", "b": [0.3573, 0.5192, 0.3925, 0.534]}, {"w": "stored", "b": [0.3987, 0.5192, 0.4471, 0.534]}, {"w": "in", "b": [0.4533, 0.5192, 0.4684, 0.534]}, {"w": "the", "b": [0.4745, 0.5192, 0.4997, 0.534]}, {"w": "databases,", "b": [0.5058, 0.5192, 0.5875, 0.534]}, {"w": "as", "b": [0.5937, 0.5192, 0.6099, 0.534]}, {"w": "well", "b": [0.616, 0.5192, 0.6467, 0.534]}, {"w": "as", "b": [0.6528, 0.5192, 0.669, 0.534]}, {"w": "creating,", "b": [0.6752, 0.5192, 0.7436, 0.534]}, {"w": "modifying,", "b": [0.7498, 0.5192, 0.8338, 0.534]}, {"w": "and", "b": [0.8399, 0.5192, 0.8691, 0.534]}, {"w": "erasing", "b": [0.1312, 0.5371, 0.1878, 0.552]}, {"w": "databases.10", "b": [0.1939, 0.5351, 0.2918, 0.552]}]}, {"id": "b_8", "type": "paragraph", "text": "A data lake is a repository of data stored in its natural or raw format, usually in the form of object blobs or files. A data lake is typically an unstructured aggregation of data from multiple sources, including databases, logs, or intermediary data obtained as a result of expensive transformations of the original data.", "words": [{"w": "A", "b": [0.1305, 0.564, 0.1443, 0.5789]}, {"w": "data", "b": [0.1505, 0.564, 0.1912, 0.579]}, {"w": "lake", "b": [0.1983, 0.564, 0.2348, 0.579]}, {"w": "is", "b": [0.241, 0.564, 0.2533, 0.5789]}, {"w": "a", "b": [0.2595, 0.564, 0.2687, 0.5789]}, {"w": "repository", "b": [0.2749, 0.564, 0.3559, 0.5789]}, {"w": "of", "b": [0.3621, 0.564, 0.3769, 0.5789]}, {"w": "data", "b": [0.3831, 0.564, 0.4189, 0.5789]}, {"w": "stored", "b": [0.4251, 0.564, 0.4743, 0.5789]}, {"w": "in", "b": [0.4805, 0.564, 0.4959, 0.5789]}, {"w": "its", "b": [0.502, 0.564, 0.5216, 0.5789]}, {"w": "natural", "b": [0.5277, 0.564, 0.5861, 0.5789]}, {"w": "or", "b": [0.5923, 0.564, 0.6087, 0.5789]}, {"w": "raw", "b": [0.6149, 0.564, 0.6441, 0.5789]}, {"w": "format,", "b": [0.6502, 0.564, 0.7091, 0.5789]}, {"w": "usually", "b": [0.7153, 0.564, 0.7722, 0.5789]}, {"w": "in", "b": [0.7784, 0.564, 0.7937, 0.5789]}, {"w": "the", "b": [0.7999, 0.564, 0.8255, 0.5789]}, {"w": "form", "b": [0.8316, 0.564, 0.869, 0.5789]}, {"w": "of", "b": [0.1312, 0.5818, 0.1464, 0.5969]}, {"w": "object", "b": [0.1528, 0.5818, 0.203, 0.5969]}, {"w": "blobs", "b": [0.2094, 0.5818, 0.2524, 0.5969]}, {"w": "or", "b": [0.2588, 0.5818, 0.2756, 0.5969]}, {"w": "files.", "b": [0.282, 0.5818, 0.3187, 0.5969]}, {"w": "A", "b": [0.3277, 0.5818, 0.3418, 0.5969]}, {"w": "data", "b": [0.3482, 0.5818, 0.3848, 0.5969]}, {"w": "lake", "b": [0.3912, 0.5818, 0.4237, 0.5969]}, {"w": "is", "b": [0.43, 0.5818, 0.4427, 0.5969]}, {"w": "typically", "b": [0.4491, 0.5818, 0.5197, 0.5969]}, {"w": "an", "b": [0.5261, 0.5818, 0.546, 0.5969]}, {"w": "unstructured", "b": [0.5524, 0.5818, 0.6583, 0.5969]}, {"w": "aggregation", "b": [0.6647, 0.5818, 0.7599, 0.5969]}, {"w": "of", "b": [0.7663, 0.5818, 0.7815, 0.5969]}, {"w": "data", "b": [0.7879, 0.5818, 0.8245, 0.5969]}, {"w": "from", "b": [0.8309, 0.5818, 0.8691, 0.5969]}, {"w": "multiple", "b": [0.1312, 0.5998, 0.1987, 0.6149]}, {"w": "sources,", "b": [0.2063, 0.5998, 0.2704, 0.6149]}, {"w": "including", "b": [0.2784, 0.5998, 0.3537, 0.6149]}, {"w": "databases,", "b": [0.3613, 0.5998, 0.4463, 0.6149]}, {"w": "logs,", "b": [0.4543, 0.5998, 0.491, 0.6149]}, {"w": "or", "b": [0.499, 0.5998, 0.5157, 0.6149]}, {"w": "intermediary", "b": [0.5234, 0.5998, 0.6281, 0.6149]}, {"w": "data", "b": [0.6357, 0.5998, 0.6723, 0.6149]}, {"w": "obtained", "b": [0.6799, 0.5998, 0.7511, 0.6149]}, {"w": "as", "b": [0.7587, 0.5998, 0.7755, 0.6149]}, {"w": "a", "b": [0.7831, 0.5998, 0.7925, 0.6149]}, {"w": "result", "b": [0.8001, 0.5998, 0.8463, 0.6149]}, {"w": "of", "b": [0.854, 0.5998, 0.8691, 0.6149]}, {"w": "expensive", "b": [0.1312, 0.6178, 0.2083, 0.6328]}, {"w": "transformations", "b": [0.2144, 0.6178, 0.3414, 0.6328]}, {"w": "of", "b": [0.3475, 0.6178, 0.3624, 0.6328]}, {"w": "the", "b": [0.3685, 0.6178, 0.3942, 0.6328]}, {"w": "original", "b": [0.4003, 0.6178, 0.4609, 0.6328]}, {"w": "data.", "b": [0.467, 0.6178, 0.508, 0.6328]}]}, {"id": "b_9", "type": "paragraph", "text": "The data is saved in the data lake in its raw format, including the structured data. To read data from a data lake, the analyst needs to write the programming code that reads and parses the data stored in a file or a blob. Writing a script to parse the data file or a blob is an approach called schema on read, as opposed to the schema on write in DBMS. In a DBMS, the schema of data is defined beforehand, and, at each write, the DBMS makes sure that the data corresponds to the schema.", "words": [{"w": "The", "b": [0.1306, 0.6448, 0.1622, 0.6597]}, {"w": "data", "b": [0.1683, 0.6448, 0.204, 0.6597]}, {"w": "is", "b": [0.2102, 0.6448, 0.2225, 0.6597]}, {"w": "saved", "b": [0.2287, 0.6448, 0.2721, 0.6597]}, {"w": "in", "b": [0.2783, 0.6448, 0.2936, 0.6597]}, {"w": "the", "b": [0.2997, 0.6448, 0.3252, 0.6597]}, {"w": "data", "b": [0.3314, 0.6448, 0.367, 0.6597]}, {"w": "lake", "b": [0.3732, 0.6448, 0.4048, 0.6597]}, {"w": "in", "b": [0.411, 0.6448, 0.4263, 0.6597]}, {"w": "its", "b": [0.4324, 0.6448, 0.4519, 0.6597]}, {"w": "raw", "b": [0.4581, 0.6448, 0.4872, 0.6597]}, {"w": "format,", "b": [0.4933, 0.6448, 0.552, 0.6597]}, {"w": "including", "b": [0.5581, 0.6448, 0.6315, 0.6597]}, {"w": "the", "b": [0.6377, 0.6448, 0.6632, 0.6597]}, {"w": "structured", "b": [0.6694, 0.6448, 0.7522, 0.6597]}, {"w": "data.", "b": [0.7583, 0.6448, 0.7991, 0.6597]}, {"w": "To", "b": [0.8073, 0.6448, 0.8282, 0.6597]}, {"w": "read", "b": [0.8344, 0.6448, 0.8691, 0.6597]}, {"w": "data", "b": [0.1312, 0.6626, 0.1678, 0.6777]}, {"w": "from", "b": [0.1751, 0.6626, 0.2133, 0.6777]}, {"w": "a", "b": [0.2206, 0.6626, 0.23, 0.6777]}, {"w": "data", "b": [0.2372, 0.6626, 0.2738, 0.6777]}, {"w": "lake,", "b": [0.2811, 0.6626, 0.3188, 0.6777]}, {"w": "the", "b": [0.3263, 0.6626, 0.3525, 0.6777]}, {"w": "analyst", "b": [0.3597, 0.6626, 0.4189, 0.6777]}, {"w": "needs", "b": [0.4262, 0.6626, 0.4713, 0.6777]}, {"w": "to", "b": [0.4785, 0.6626, 0.4953, 0.6777]}, {"w": "write", "b": [0.5025, 0.6626, 0.5444, 0.6777]}, {"w": "the", "b": [0.5517, 0.6626, 0.5778, 0.6777]}, {"w": "programming", "b": [0.5851, 0.6626, 0.695, 0.6777]}, {"w": "code", "b": [0.7022, 0.6626, 0.7394, 0.6777]}, {"w": "that", "b": [0.7466, 0.6626, 0.7811, 0.6777]}, {"w": "reads", "b": [0.7884, 0.6626, 0.8315, 0.6777]}, {"w": "and", "b": [0.8387, 0.6626, 0.869, 0.6777]}, {"w": "parses", "b": [0.1312, 0.6806, 0.1807, 0.6956]}, {"w": "the", "b": [0.1868, 0.6806, 0.2125, 0.6956]}, {"w": "data", "b": [0.2186, 0.6806, 0.2545, 0.6956]}, {"w": "stored", "b": [0.2606, 0.6806, 0.31, 0.6956]}, {"w": "in", "b": [0.3161, 0.6806, 0.3315, 0.6956]}, {"w": "a", "b": [0.3376, 0.6806, 0.3469, 0.6956]}, {"w": "file", "b": [0.353, 0.6806, 0.3766, 0.6956]}, {"w": "or", "b": [0.3828, 0.6806, 0.3992, 0.6956]}, {"w": "a", "b": [0.4054, 0.6806, 0.4146, 0.6956]}, {"w": "blob.", "b": [0.4207, 0.6806, 0.4607, 0.6956]}, {"w": "Writing", "b": [0.4689, 0.6806, 0.5304, 0.6956]}, {"w": "a", "b": [0.5366, 0.6806, 0.5458, 0.6956]}, {"w": "script", "b": [0.552, 0.6806, 0.5972, 0.6956]}, {"w": "to", "b": [0.6034, 0.6806, 0.6197, 0.6956]}, {"w": "parse", "b": [0.6259, 0.6806, 0.6681, 0.6956]}, {"w": "the", "b": [0.6742, 0.6806, 0.6998, 0.6956]}, {"w": "data", "b": [0.706, 0.6806, 0.7418, 0.6956]}, {"w": "file", "b": [0.748, 0.6806, 0.7716, 0.6956]}, {"w": "or", "b": [0.7777, 0.6806, 0.7942, 0.6956]}, {"w": "a", "b": [0.8003, 0.6806, 0.8096, 0.6956]}, {"w": "blob", "b": [0.8157, 0.6806, 0.8506, 0.6956]}, {"w": "is", "b": [0.8567, 0.6806, 0.8691, 0.6956]}, {"w": "an", "b": [0.1312, 0.6986, 0.1507, 0.7135]}, {"w": "approach", "b": [0.1569, 0.6986, 0.2302, 0.7135]}, {"w": "called", "b": [0.2364, 0.6986, 0.2826, 0.7135]}, {"w": "schema", "b": [0.2886, 0.6986, 0.3553, 0.7136]}, {"w": "on", "b": [0.3624, 0.6986, 0.3848, 0.7136]}, {"w": "read,", "b": [0.3919, 0.6986, 0.4376, 0.7136]}, {"w": "as", "b": [0.4437, 0.6986, 0.4602, 0.7135]}, {"w": "opposed", "b": [0.4664, 0.6986, 0.5316, 0.7135]}, {"w": "to", "b": [0.5377, 0.6986, 0.5541, 0.7135]}, {"w": "the", "b": [0.5603, 0.6986, 0.586, 0.7135]}, {"w": "schema", "b": [0.592, 0.6986, 0.6587, 0.7136]}, {"w": "on", "b": [0.6658, 0.6986, 0.6882, 0.7136]}, {"w": "write", "b": [0.6953, 0.6986, 0.7432, 0.7136]}, {"w": "in", "b": [0.7494, 0.6986, 0.7647, 0.7135]}, {"w": "DBMS.", "b": [0.7709, 0.6986, 0.8303, 0.7135]}, {"w": "In", "b": [0.8365, 0.6986, 0.8534, 0.7135]}, {"w": "a", "b": [0.8596, 0.6986, 0.8688, 0.7135]}, {"w": "DBMS,", "b": [0.1312, 0.7166, 0.19, 0.7315]}, {"w": "the", "b": [0.1961, 0.7166, 0.2215, 0.7315]}, {"w": "schema", "b": [0.2276, 0.7166, 0.285, 0.7315]}, {"w": "of", "b": [0.2911, 0.7166, 0.3058, 0.7315]}, {"w": "data", "b": [0.312, 0.7166, 0.3475, 0.7315]}, {"w": "is", "b": [0.3536, 0.7166, 0.3659, 0.7315]}, {"w": "defined", "b": [0.372, 0.7166, 0.4288, 0.7315]}, {"w": "beforehand,", "b": [0.4349, 0.7166, 0.5282, 0.7315]}, {"w": "and,", "b": [0.5344, 0.7166, 0.5688, 0.7315]}, {"w": "at", "b": [0.575, 0.7166, 0.5912, 0.7315]}, {"w": "each", "b": [0.5974, 0.7166, 0.6323, 0.7315]}, {"w": "write,", "b": [0.6385, 0.7166, 0.6841, 0.7315]}, {"w": "the", "b": [0.6903, 0.7166, 0.7156, 0.7315]}, {"w": "DBMS", "b": [0.7218, 0.7166, 0.7755, 0.7315]}, {"w": "makes", "b": [0.7816, 0.7166, 0.8304, 0.7315]}, {"w": "sure", "b": [0.8365, 0.7166, 0.8691, 0.7315]}, {"w": "that", "b": [0.1312, 0.7345, 0.1651, 0.7494]}, {"w": "the", "b": [0.1712, 0.7345, 0.1969, 0.7494]}, {"w": "data", "b": [0.203, 0.7345, 0.2389, 0.7494]}, {"w": "corresponds", "b": [0.245, 0.7345, 0.3402, 0.7494]}, {"w": "to", "b": [0.3464, 0.7345, 0.3628, 0.7494]}, {"w": "the", "b": [0.3689, 0.7345, 0.3946, 0.7494]}, {"w": "schema.", "b": [0.4007, 0.7345, 0.4639, 0.7494]}]}, {"id": "b_10", "type": "paragraph", "text": "10The SQL Server uses its proprietary Transact SQL (T-SQL) while Oracle uses Procedural Language SQL (PL/SQL).", "words": [{"w": "10The", "b": [0.145, 0.7612, 0.1859, 0.7751]}, {"w": "SQL", "b": [0.191, 0.7632, 0.2211, 0.7751]}, {"w": "Server", "b": [0.2262, 0.7632, 0.2681, 0.7751]}, {"w": "uses", "b": [0.2732, 0.7632, 0.3006, 0.7751]}, {"w": "its", "b": [0.3057, 0.7632, 0.322, 0.7751]}, {"w": "proprietary", "b": [0.3271, 0.7632, 0.4027, 0.7751]}, {"w": "Transact", "b": [0.4078, 0.7632, 0.4663, 0.7751]}, {"w": "SQL", "b": [0.4715, 0.7632, 0.5015, 0.7751]}, {"w": "(T-SQL)", "b": [0.5066, 0.7632, 0.5649, 0.7751]}, {"w": "while", "b": [0.57, 0.7632, 0.605, 0.7751]}, {"w": "Oracle", "b": [0.6101, 0.7632, 0.6536, 0.7751]}, {"w": "uses", "b": [0.6587, 0.7632, 0.6862, 0.7751]}, {"w": "Procedural", "b": [0.6913, 0.7632, 0.7645, 0.7751]}, {"w": "Language", "b": [0.7696, 0.7632, 0.8339, 0.7751]}, {"w": "SQL", "b": [0.839, 0.7632, 0.869, 0.7751]}, {"w": "(PL/SQL).", "b": [0.1294, 0.7773, 0.205, 0.7893]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 41", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "41", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 85, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3.11.3 Data Versioning", "words": [{"w": "3.11.3", "b": [0.1312, 0.0884, 0.1855, 0.1034]}, {"w": "Data", "b": [0.2067, 0.0884, 0.2518, 0.1034]}, {"w": "Versioning", "b": [0.2589, 0.0884, 0.3566, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "If data is held and updated in multiple places, you might need to keep track of versions. Versioning the data is also needed if you frequently update the model by collecting more data, especially in an automated way. This happens when you work on automated driving, spam detection, or personalized recommendations, for example. The new data comes from a human driving a car, or the user cleaning up their electronic mail, or recent video streaming. Sometimes, after an update of the data, the new model performs worse, and you would like to investigate why by switching from one version of the data to another.", "words": [{"w": "If", "b": [0.1312, 0.1249, 0.1438, 0.14]}, {"w": "data", "b": [0.1509, 0.1249, 0.1875, 0.14]}, {"w": "is", "b": [0.1947, 0.1249, 0.2073, 0.14]}, {"w": "held", "b": [0.2144, 0.1249, 0.249, 0.14]}, {"w": "and", "b": [0.2561, 0.1249, 0.2864, 0.14]}, {"w": "updated", "b": [0.2936, 0.1249, 0.361, 0.14]}, {"w": "in", "b": [0.3682, 0.1249, 0.3838, 0.14]}, {"w": "multiple", "b": [0.391, 0.1249, 0.4584, 0.14]}, {"w": "places,", "b": [0.4656, 0.1249, 0.5201, 0.14]}, {"w": "you", "b": [0.5275, 0.1249, 0.5568, 0.14]}, {"w": "might", "b": [0.5639, 0.1249, 0.6115, 0.14]}, {"w": "need", "b": [0.6186, 0.1249, 0.6563, 0.14]}, {"w": "to", "b": [0.6634, 0.1249, 0.6801, 0.14]}, {"w": "keep", "b": [0.6873, 0.1249, 0.7239, 0.14]}, {"w": "track", "b": [0.731, 0.1249, 0.7729, 0.14]}, {"w": "of", "b": [0.78, 0.1249, 0.7952, 0.14]}, {"w": "versions.", "b": [0.8023, 0.1249, 0.8727, 0.14]}, {"w": "Versioning", "b": [0.1305, 0.1428, 0.2165, 0.1579]}, {"w": "the", "b": [0.2233, 0.1428, 0.2495, 0.1579]}, {"w": "data", "b": [0.2563, 0.1428, 0.2929, 0.1579]}, {"w": "is", "b": [0.2997, 0.1428, 0.3123, 0.1579]}, {"w": "also", "b": [0.3191, 0.1428, 0.3506, 0.1579]}, {"w": "needed", "b": [0.3574, 0.1428, 0.4139, 0.1579]}, {"w": "if", "b": [0.4207, 0.1428, 0.4317, 0.1579]}, {"w": "you", "b": [0.4385, 0.1428, 0.4678, 0.1579]}, {"w": "frequently", "b": [0.4746, 0.1428, 0.5573, 0.1579]}, {"w": "update", "b": [0.5642, 0.1428, 0.6212, 0.1579]}, {"w": "the", "b": [0.628, 0.1428, 0.6541, 0.1579]}, {"w": "model", "b": [0.6609, 0.1428, 0.7106, 0.1579]}, {"w": "by", "b": [0.7174, 0.1428, 0.7373, 0.1579]}, {"w": "collecting", "b": [0.7441, 0.1428, 0.8215, 0.1579]}, {"w": "more", "b": [0.8283, 0.1428, 0.8691, 0.1579]}, {"w": "data,", "b": [0.1312, 0.1608, 0.1725, 0.1758]}, {"w": "especially", "b": [0.1787, 0.1608, 0.2563, 0.1758]}, {"w": "in", "b": [0.2624, 0.1608, 0.2779, 0.1758]}, {"w": "an", "b": [0.2841, 0.1608, 0.3037, 0.1758]}, {"w": "automated", "b": [0.3099, 0.1608, 0.3966, 0.1758]}, {"w": "way.", "b": [0.4028, 0.1608, 0.4379, 0.1758]}, {"w": "This", "b": [0.4461, 0.1608, 0.4823, 0.1758]}, {"w": "happens", "b": [0.4885, 0.1608, 0.5552, 0.1758]}, {"w": "when", "b": [0.5614, 0.1608, 0.6037, 0.1758]}, {"w": "you", "b": [0.6099, 0.1608, 0.6388, 0.1758]}, {"w": "work", "b": [0.645, 0.1608, 0.6843, 0.1758]}, {"w": "on", "b": [0.6904, 0.1608, 0.71, 0.1758]}, {"w": "automated", "b": [0.7162, 0.1608, 0.8029, 0.1758]}, {"w": "driving,", "b": [0.8091, 0.1608, 0.8716, 0.1758]}, {"w": "spam", "b": [0.1312, 0.1789, 0.1729, 0.1937]}, {"w": "detection,", "b": [0.179, 0.1789, 0.257, 0.1937]}, {"w": "or", "b": [0.2631, 0.1789, 0.2794, 0.1937]}, {"w": "personalized", "b": [0.2855, 0.1789, 0.3835, 0.1937]}, {"w": "recommendations,", "b": [0.3896, 0.1789, 0.5336, 0.1937]}, {"w": "for", "b": [0.5398, 0.1789, 0.5616, 0.1937]}, {"w": "example.", "b": [0.5677, 0.1789, 0.6381, 0.1937]}, {"w": "The", "b": [0.6463, 0.1789, 0.6777, 0.1937]}, {"w": "new", "b": [0.6839, 0.1789, 0.7153, 0.1937]}, {"w": "data", "b": [0.7214, 0.1789, 0.7569, 0.1937]}, {"w": "comes", "b": [0.763, 0.1789, 0.8107, 0.1937]}, {"w": "from", "b": [0.8168, 0.1789, 0.8538, 0.1937]}, {"w": "a", "b": [0.86, 0.1789, 0.8691, 0.1937]}, {"w": "human", "b": [0.1312, 0.1968, 0.1853, 0.2117]}, {"w": "driving", "b": [0.1914, 0.1968, 0.2475, 0.2117]}, {"w": "a", "b": [0.2537, 0.1968, 0.2628, 0.2117]}, {"w": "car,", "b": [0.2689, 0.1968, 0.2983, 0.2117]}, {"w": "or", "b": [0.3044, 0.1968, 0.3206, 0.2117]}, {"w": "the", "b": [0.3268, 0.1968, 0.352, 0.2117]}, {"w": "user", "b": [0.3582, 0.1968, 0.3907, 0.2117]}, {"w": "cleaning", "b": [0.3968, 0.1968, 0.4615, 0.2117]}, {"w": "up", "b": [0.4676, 0.1968, 0.4879, 0.2117]}, {"w": "their", "b": [0.494, 0.1968, 0.5314, 0.2117]}, {"w": "electronic", "b": [0.5376, 0.1968, 0.6134, 0.2117]}, {"w": "mail,", "b": [0.6196, 0.1968, 0.659, 0.2117]}, {"w": "or", "b": [0.6651, 0.1968, 0.6813, 0.2117]}, {"w": "recent", "b": [0.6875, 0.1968, 0.7355, 0.2117]}, {"w": "video", "b": [0.7417, 0.1968, 0.7836, 0.2117]}, {"w": "streaming.", "b": [0.7898, 0.1968, 0.8727, 0.2117]}, {"w": "Sometimes,", "b": [0.1312, 0.2147, 0.2225, 0.2297]}, {"w": "after", "b": [0.2286, 0.2147, 0.2661, 0.2297]}, {"w": "an", "b": [0.2722, 0.2147, 0.2917, 0.2297]}, {"w": "update", "b": [0.2978, 0.2147, 0.3536, 0.2297]}, {"w": "of", "b": [0.3598, 0.2147, 0.3746, 0.2297]}, {"w": "the", "b": [0.3807, 0.2147, 0.4064, 0.2297]}, {"w": "data,", "b": [0.4125, 0.2147, 0.4535, 0.2297]}, {"w": "the", "b": [0.4596, 0.2147, 0.4852, 0.2297]}, {"w": "new", "b": [0.4914, 0.2147, 0.5231, 0.2297]}, {"w": "model", "b": [0.5292, 0.2147, 0.5779, 0.2297]}, {"w": "performs", "b": [0.584, 0.2147, 0.6549, 0.2297]}, {"w": "worse,", "b": [0.661, 0.2147, 0.7109, 0.2297]}, {"w": "and", "b": [0.717, 0.2147, 0.7467, 0.2297]}, {"w": "you", "b": [0.7528, 0.2147, 0.7815, 0.2297]}, {"w": "would", "b": [0.7876, 0.2147, 0.8353, 0.2297]}, {"w": "like", "b": [0.8414, 0.2147, 0.8691, 0.2297]}, {"w": "to", "b": [0.1312, 0.2327, 0.1476, 0.2476]}, {"w": "investigate", "b": [0.1538, 0.2327, 0.2395, 0.2476]}, {"w": "why", "b": [0.2457, 0.2327, 0.2785, 0.2476]}, {"w": "by", "b": [0.2846, 0.2327, 0.3041, 0.2476]}, {"w": "switching", "b": [0.3103, 0.2327, 0.3857, 0.2476]}, {"w": "from", "b": [0.3919, 0.2327, 0.4294, 0.2476]}, {"w": "one", "b": [0.4355, 0.2327, 0.4632, 0.2476]}, {"w": "version", "b": [0.4694, 0.2327, 0.5259, 0.2476]}, {"w": "of", "b": [0.5321, 0.2327, 0.5469, 0.2476]}, {"w": "the", "b": [0.5531, 0.2327, 0.5787, 0.2476]}, {"w": "data", "b": [0.5849, 0.2327, 0.6208, 0.2476]}, {"w": "to", "b": [0.6269, 0.2327, 0.6433, 0.2476]}, {"w": "another.", "b": [0.6495, 0.2327, 0.7162, 0.2476]}]}, {"id": "b_2", "type": "paragraph", "text": "Data versioning is also critical in supervised learning when the labeling is done by multiple labelers. Some labelers might assign very different labels to similar examples, which typically hurts the performance of the model. You would like to keep the examples annotated by different labelers separately and only merge them when you build the model. Careful analysis of the model performance may show that labelers didn’t provide quality or consistent labels. Exclude such data from the training data, or relabel it, and data versioning will allow this with minimal effort.", "words": [{"w": "Data", "b": [0.1312, 0.2596, 0.171, 0.2745]}, {"w": "versioning", "b": [0.1772, 0.2596, 0.2585, 0.2745]}, {"w": "is", "b": [0.2646, 0.2596, 0.2771, 0.2745]}, {"w": "also", "b": [0.2832, 0.2596, 0.3141, 0.2745]}, {"w": "critical", "b": [0.3203, 0.2596, 0.3758, 0.2745]}, {"w": "in", "b": [0.3819, 0.2596, 0.3974, 0.2745]}, {"w": "supervised", "b": [0.4035, 0.2596, 0.488, 0.2745]}, {"w": "learning", "b": [0.4942, 0.2596, 0.5589, 0.2745]}, {"w": "when", "b": [0.5651, 0.2596, 0.6072, 0.2745]}, {"w": "the", "b": [0.6134, 0.2596, 0.639, 0.2745]}, {"w": "labeling", "b": [0.6452, 0.2596, 0.7084, 0.2745]}, {"w": "is", "b": [0.7145, 0.2596, 0.7269, 0.2745]}, {"w": "done", "b": [0.7331, 0.2596, 0.7711, 0.2745]}, {"w": "by", "b": [0.7772, 0.2596, 0.7968, 0.2745]}, {"w": "multiple", "b": [0.8029, 0.2596, 0.8692, 0.2745]}, {"w": "labelers.", "b": [0.1312, 0.2776, 0.1962, 0.2924]}, {"w": "Some", "b": [0.2044, 0.2776, 0.2466, 0.2924]}, {"w": "labelers", "b": [0.2526, 0.2776, 0.3126, 0.2924]}, {"w": "might", "b": [0.3186, 0.2776, 0.3643, 0.2924]}, {"w": "assign", "b": [0.3703, 0.2776, 0.4177, 0.2924]}, {"w": "very", "b": [0.4238, 0.2776, 0.4575, 0.2924]}, {"w": "different", "b": [0.4635, 0.2776, 0.5289, 0.2924]}, {"w": "labels", "b": [0.5349, 0.2776, 0.5797, 0.2924]}, {"w": "to", "b": [0.5857, 0.2776, 0.6018, 0.2924]}, {"w": "similar", "b": [0.6078, 0.2776, 0.6612, 0.2924]}, {"w": "examples,", "b": [0.6672, 0.2776, 0.7442, 0.2924]}, {"w": "which", "b": [0.7502, 0.2776, 0.796, 0.2924]}, {"w": "typically", "b": [0.802, 0.2776, 0.8698, 0.2924]}, {"w": "hurts", "b": [0.1312, 0.2954, 0.1738, 0.3105]}, {"w": "the", "b": [0.181, 0.2954, 0.2072, 0.3105]}, {"w": "performance", "b": [0.2144, 0.2954, 0.316, 0.3105]}, {"w": "of", "b": [0.3233, 0.2954, 0.3384, 0.3105]}, {"w": "the", "b": [0.3457, 0.2954, 0.3718, 0.3105]}, {"w": "model.", "b": [0.3791, 0.2954, 0.434, 0.3105]}, {"w": "You", "b": [0.4455, 0.2954, 0.4779, 0.3105]}, {"w": "would", "b": [0.4852, 0.2954, 0.5338, 0.3105]}, {"w": "like", "b": [0.5411, 0.2954, 0.5693, 0.3105]}, {"w": "to", "b": [0.5766, 0.2954, 0.5933, 0.3105]}, {"w": "keep", "b": [0.6006, 0.2954, 0.6372, 0.3105]}, {"w": "the", "b": [0.6445, 0.2954, 0.6706, 0.3105]}, {"w": "examples", "b": [0.6779, 0.2954, 0.7528, 0.3105]}, {"w": "annotated", "b": [0.76, 0.2954, 0.8426, 0.3105]}, {"w": "by", "b": [0.8499, 0.2954, 0.8698, 0.3105]}, {"w": "different", "b": [0.1312, 0.3135, 0.1966, 0.3283]}, {"w": "labelers", "b": [0.2022, 0.3135, 0.2622, 0.3283]}, {"w": "separately", "b": [0.2677, 0.3135, 0.3478, 0.3283]}, {"w": "and", "b": [0.3534, 0.3135, 0.3825, 0.3283]}, {"w": "only", "b": [0.3881, 0.3135, 0.4217, 0.3283]}, {"w": "merge", "b": [0.4273, 0.3135, 0.4746, 0.3283]}, {"w": "them", "b": [0.4802, 0.3135, 0.5204, 0.3283]}, {"w": "when", "b": [0.5259, 0.3135, 0.5671, 0.3283]}, {"w": "you", "b": [0.5727, 0.3135, 0.6009, 0.3283]}, {"w": "build", "b": [0.6064, 0.3135, 0.6466, 0.3283]}, {"w": "the", "b": [0.6522, 0.3135, 0.6773, 0.3283]}, {"w": "model.", "b": [0.6829, 0.3135, 0.7357, 0.3283]}, {"w": "Careful", "b": [0.7437, 0.3135, 0.8015, 0.3283]}, {"w": "analysis", "b": [0.8071, 0.3135, 0.8691, 0.3283]}, {"w": "of", "b": [0.1312, 0.3314, 0.146, 0.3463]}, {"w": "the", "b": [0.1521, 0.3314, 0.1775, 0.3463]}, {"w": "model", "b": [0.1837, 0.3314, 0.2319, 0.3463]}, {"w": "performance", "b": [0.2381, 0.3314, 0.3367, 0.3463]}, {"w": "may", "b": [0.3428, 0.3314, 0.3763, 0.3463]}, {"w": "show", "b": [0.3825, 0.3314, 0.4217, 0.3463]}, {"w": "that", "b": [0.4279, 0.3314, 0.4614, 0.3463]}, {"w": "labelers", "b": [0.4675, 0.3314, 0.5281, 0.3463]}, {"w": "didn’t", "b": [0.5343, 0.3314, 0.582, 0.3463]}, {"w": "provide", "b": [0.5882, 0.3314, 0.6471, 0.3463]}, {"w": "quality", "b": [0.6533, 0.3314, 0.7086, 0.3463]}, {"w": "or", "b": [0.7148, 0.3314, 0.7311, 0.3463]}, {"w": "consistent", "b": [0.7373, 0.3314, 0.8162, 0.3463]}, {"w": "labels.", "b": [0.8223, 0.3314, 0.8727, 0.3463]}, {"w": "Exclude", "b": [0.1312, 0.3492, 0.1964, 0.3643]}, {"w": "such", "b": [0.2025, 0.3492, 0.2384, 0.3643]}, {"w": "data", "b": [0.2446, 0.3492, 0.2809, 0.3643]}, {"w": "from", "b": [0.287, 0.3492, 0.3249, 0.3643]}, {"w": "the", "b": [0.3311, 0.3492, 0.357, 0.3643]}, {"w": "training", "b": [0.3632, 0.3492, 0.4276, 0.3643]}, {"w": "data,", "b": [0.4337, 0.3492, 0.4752, 0.3643]}, {"w": "or", "b": [0.4813, 0.3492, 0.498, 0.3643]}, {"w": "relabel", "b": [0.5041, 0.3492, 0.5587, 0.3643]}, {"w": "it,", "b": [0.5648, 0.3492, 0.5824, 0.3643]}, {"w": "and", "b": [0.5886, 0.3492, 0.6187, 0.3643]}, {"w": "data", "b": [0.6248, 0.3492, 0.6611, 0.3643]}, {"w": "versioning", "b": [0.6672, 0.3492, 0.7494, 0.3643]}, {"w": "will", "b": [0.7555, 0.3492, 0.7846, 0.3643]}, {"w": "allow", "b": [0.7907, 0.3492, 0.8327, 0.3643]}, {"w": "this", "b": [0.8389, 0.3492, 0.8691, 0.3643]}, {"w": "with", "b": [0.1306, 0.3673, 0.1665, 0.3822]}, {"w": "minimal", "b": [0.1726, 0.3673, 0.2382, 0.3822]}, {"w": "effort.", "b": [0.2444, 0.3673, 0.2921, 0.3822]}]}, {"id": "b_3", "type": "paragraph", "text": "Data versioning can be implemented in several levels of complexity, from the most basic to the most elaborate.", "words": [{"w": "Data", "b": [0.1312, 0.3941, 0.1712, 0.4091]}, {"w": "versioning", "b": [0.1773, 0.3941, 0.2589, 0.4091]}, {"w": "can", "b": [0.265, 0.3941, 0.2929, 0.4091]}, {"w": "be", "b": [0.299, 0.3941, 0.3181, 0.4091]}, {"w": "implemented", "b": [0.3242, 0.3941, 0.4278, 0.4091]}, {"w": "in", "b": [0.434, 0.3941, 0.4494, 0.4091]}, {"w": "several", "b": [0.4556, 0.3941, 0.5104, 0.4091]}, {"w": "levels", "b": [0.5165, 0.3941, 0.5599, 0.4091]}, {"w": "of", "b": [0.5661, 0.3941, 0.581, 0.4091]}, {"w": "complexity,", "b": [0.5872, 0.3941, 0.6789, 0.4091]}, {"w": "from", "b": [0.685, 0.3941, 0.7227, 0.4091]}, {"w": "the", "b": [0.7288, 0.3941, 0.7546, 0.4091]}, {"w": "most", "b": [0.7608, 0.3941, 0.8, 0.4091]}, {"w": "basic", "b": [0.8062, 0.3941, 0.8465, 0.4091]}, {"w": "to", "b": [0.8526, 0.3941, 0.8691, 0.4091]}, {"w": "the", "b": [0.1312, 0.4121, 0.1569, 0.4271]}, {"w": "most", "b": [0.163, 0.4121, 0.2021, 0.4271]}, {"w": "elaborate.", "b": [0.2082, 0.4121, 0.2878, 0.4271]}]}, {"id": "b_4", "type": "paragraph", "text": "Level 0: data is unversioned.", "words": [{"w": "Level", "b": [0.1312, 0.4391, 0.18, 0.454]}, {"w": "0:", "b": [0.187, 0.4391, 0.2035, 0.454]}, {"w": "data", "b": [0.213, 0.4391, 0.2536, 0.454]}, {"w": "is", "b": [0.2607, 0.4391, 0.275, 0.454]}, {"w": "unversioned.", "b": [0.2821, 0.4391, 0.3982, 0.454]}]}, {"id": "b_5", "type": "paragraph", "text": "At this level, data may reside on a local filesystem, object storage, or in a database. The advantage of having unversioned data is the speed and simplicity of dealing with the data. Still, that advantage is outweighed by potential problems you might encounter when working on your model. Most likely, your first problem will be the inability to make versioned deployments. As we will discuss in Chapter 8, model deployments must be versioned. A deployed machine learning model is a mix of code and data. If the code is versioned, the data must be too. Otherwise, the deployment will be unversioned.", "words": [{"w": "At", "b": [0.1767, 0.4571, 0.1967, 0.4719]}, {"w": "this", "b": [0.2019, 0.4571, 0.2312, 0.4719]}, {"w": "level,", "b": [0.2364, 0.4571, 0.2766, 0.4719]}, {"w": "data", "b": [0.282, 0.4571, 0.3172, 0.4719]}, {"w": "may", "b": [0.3224, 0.4571, 0.3555, 0.4719]}, {"w": "reside", "b": [0.3607, 0.4571, 0.4061, 0.4719]}, {"w": "on", "b": [0.4114, 0.4571, 0.4304, 0.4719]}, {"w": "a", "b": [0.4357, 0.4571, 0.4447, 0.4719]}, {"w": "local", "b": [0.4499, 0.4571, 0.4866, 0.4719]}, {"w": "filesystem,", "b": [0.4918, 0.4571, 0.574, 0.4719]}, {"w": "object", "b": [0.5794, 0.4571, 0.6276, 0.4719]}, {"w": "storage,", "b": [0.6328, 0.4571, 0.6943, 0.4719]}, {"w": "or", "b": [0.6997, 0.4571, 0.7158, 0.4719]}, {"w": "in", "b": [0.721, 0.4571, 0.7361, 0.4719]}, {"w": "a", "b": [0.7413, 0.4571, 0.7504, 0.4719]}, {"w": "database.", "b": [0.7556, 0.4571, 0.83, 0.4719]}, {"w": "The", "b": [0.8379, 0.4571, 0.8691, 0.4719]}, {"w": "advantage", "b": [0.1774, 0.4749, 0.2594, 0.4899]}, {"w": "of", "b": [0.2655, 0.4749, 0.2806, 0.4899]}, {"w": "having", "b": [0.2867, 0.4749, 0.3407, 0.4899]}, {"w": "unversioned", "b": [0.3468, 0.4749, 0.443, 0.4899]}, {"w": "data", "b": [0.4491, 0.4749, 0.4855, 0.4899]}, {"w": "is", "b": [0.4916, 0.4749, 0.5042, 0.4899]}, {"w": "the", "b": [0.5103, 0.4749, 0.5363, 0.4899]}, {"w": "speed", "b": [0.5424, 0.4749, 0.5877, 0.4899]}, {"w": "and", "b": [0.5938, 0.4749, 0.6239, 0.4899]}, {"w": "simplicity", "b": [0.6301, 0.4749, 0.7091, 0.4899]}, {"w": "of", "b": [0.7152, 0.4749, 0.7303, 0.4899]}, {"w": "dealing", "b": [0.7364, 0.4749, 0.7945, 0.4899]}, {"w": "with", "b": [0.8007, 0.4749, 0.837, 0.4899]}, {"w": "the", "b": [0.8432, 0.4749, 0.8691, 0.4899]}, {"w": "data.", "b": [0.1774, 0.4928, 0.2189, 0.5079]}, {"w": "Still,", "b": [0.2271, 0.4928, 0.2655, 0.5079]}, {"w": "that", "b": [0.2717, 0.4928, 0.3059, 0.5079]}, {"w": "advantage", "b": [0.3121, 0.4928, 0.3942, 0.5079]}, {"w": "is", "b": [0.4003, 0.4928, 0.4128, 0.5079]}, {"w": "outweighed", "b": [0.419, 0.4928, 0.5104, 0.5079]}, {"w": "by", "b": [0.5165, 0.4928, 0.5363, 0.5079]}, {"w": "potential", "b": [0.5424, 0.4928, 0.6151, 0.5079]}, {"w": "problems", "b": [0.6212, 0.4928, 0.6952, 0.5079]}, {"w": "you", "b": [0.7013, 0.4928, 0.7304, 0.5079]}, {"w": "might", "b": [0.7365, 0.4928, 0.7838, 0.5079]}, {"w": "encounter", "b": [0.7899, 0.4928, 0.8694, 0.5079]}, {"w": "when", "b": [0.1767, 0.5107, 0.2196, 0.5258]}, {"w": "working", "b": [0.2258, 0.5107, 0.2907, 0.5258]}, {"w": "on", "b": [0.2969, 0.5107, 0.3167, 0.5258]}, {"w": "your", "b": [0.3229, 0.5107, 0.3596, 0.5258]}, {"w": "model.", "b": [0.3658, 0.5107, 0.4207, 0.5258]}, {"w": "Most", "b": [0.429, 0.5107, 0.4704, 0.5258]}, {"w": "likely,", "b": [0.4766, 0.5107, 0.5237, 0.5258]}, {"w": "your", "b": [0.5299, 0.5107, 0.5666, 0.5258]}, {"w": "first", "b": [0.5728, 0.5107, 0.6054, 0.5258]}, {"w": "problem", "b": [0.6116, 0.5107, 0.6786, 0.5258]}, {"w": "will", "b": [0.6848, 0.5107, 0.714, 0.5258]}, {"w": "be", "b": [0.7202, 0.5107, 0.7396, 0.5258]}, {"w": "the", "b": [0.7458, 0.5107, 0.7719, 0.5258]}, {"w": "inability", "b": [0.7781, 0.5107, 0.8461, 0.5258]}, {"w": "to", "b": [0.8523, 0.5107, 0.8691, 0.5258]}, {"w": "make", "b": [0.1774, 0.5289, 0.2185, 0.5437]}, {"w": "versioned", "b": [0.2244, 0.5289, 0.2979, 0.5437]}, {"w": "deployments.", "b": [0.3037, 0.5289, 0.4068, 0.5437]}, {"w": "As", "b": [0.4149, 0.5289, 0.4356, 0.5437]}, {"w": "we", "b": [0.4415, 0.5289, 0.462, 0.5437]}, {"w": "will", "b": [0.4679, 0.5289, 0.496, 0.5437]}, {"w": "discuss", "b": [0.5018, 0.5289, 0.5564, 0.5437]}, {"w": "in", "b": [0.5623, 0.5289, 0.5773, 0.5437]}, {"w": "Chapter", "b": [0.5832, 0.5289, 0.6475, 0.5437]}, {"w": "8,", "b": [0.6534, 0.5289, 0.6674, 0.5437]}, {"w": "model", "b": [0.6733, 0.5289, 0.7211, 0.5437]}, {"w": "deployments", "b": [0.7269, 0.5289, 0.825, 0.5437]}, {"w": "must", "b": [0.8308, 0.5289, 0.8696, 0.5437]}, {"w": "be", "b": [0.1774, 0.5468, 0.196, 0.5616]}, {"w": "versioned.", "b": [0.2015, 0.5468, 0.28, 0.5616]}, {"w": "A", "b": [0.288, 0.5468, 0.3016, 0.5616]}, {"w": "deployed", "b": [0.307, 0.5468, 0.3759, 0.5616]}, {"w": "machine", "b": [0.3814, 0.5468, 0.4462, 0.5616]}, {"w": "learning", "b": [0.4517, 0.5468, 0.5151, 0.5616]}, {"w": "model", "b": [0.5206, 0.5468, 0.5683, 0.5616]}, {"w": "is", "b": [0.5738, 0.5468, 0.586, 0.5616]}, {"w": "a", "b": [0.5915, 0.5468, 0.6005, 0.5616]}, {"w": "mix", "b": [0.606, 0.5468, 0.6356, 0.5616]}, {"w": "of", "b": [0.6411, 0.5468, 0.6557, 0.5616]}, {"w": "code", "b": [0.6612, 0.5468, 0.6969, 0.5616]}, {"w": "and", "b": [0.7024, 0.5468, 0.7315, 0.5616]}, {"w": "data.", "b": [0.737, 0.5468, 0.7772, 0.5616]}, {"w": "If", "b": [0.7852, 0.5468, 0.7973, 0.5616]}, {"w": "the", "b": [0.8028, 0.5468, 0.8279, 0.5616]}, {"w": "code", "b": [0.8334, 0.5468, 0.8691, 0.5616]}, {"w": "is", "b": [0.1774, 0.5647, 0.1898, 0.5796]}, {"w": "versioned,", "b": [0.1959, 0.5647, 0.2761, 0.5796]}, {"w": "the", "b": [0.2822, 0.5647, 0.3079, 0.5796]}, {"w": "data", "b": [0.314, 0.5647, 0.3499, 0.5796]}, {"w": "must", "b": [0.3561, 0.5647, 0.3956, 0.5796]}, {"w": "be", "b": [0.4018, 0.5647, 0.4208, 0.5796]}, {"w": "too.", "b": [0.4269, 0.5647, 0.4582, 0.5796]}, {"w": "Otherwise,", "b": [0.4664, 0.5647, 0.5527, 0.5796]}, {"w": "the", "b": [0.5588, 0.5647, 0.5845, 0.5796]}, {"w": "deployment", "b": [0.5906, 0.5647, 0.6834, 0.5796]}, {"w": "will", "b": [0.6896, 0.5647, 0.7183, 0.5796]}, {"w": "be", "b": [0.7244, 0.5647, 0.7434, 0.5796]}, {"w": "unversioned.", "b": [0.7496, 0.5647, 0.8497, 0.5796]}]}, {"id": "b_6", "type": "paragraph", "text": "If you don’t version deployments, you will not be able to get back to the previous level of performance in case of any problem with the model. Therefore, unversioned data is not recommended.", "words": [{"w": "If", "b": [0.1774, 0.5917, 0.1894, 0.6065]}, {"w": "you", "b": [0.1956, 0.5917, 0.2238, 0.6065]}, {"w": "don’t", "b": [0.23, 0.5917, 0.2713, 0.6065]}, {"w": "version", "b": [0.2774, 0.5917, 0.333, 0.6065]}, {"w": "deployments,", "b": [0.3391, 0.5917, 0.4424, 0.6065]}, {"w": "you", "b": [0.4486, 0.5917, 0.4768, 0.6065]}, {"w": "will", "b": [0.483, 0.5917, 0.5111, 0.6065]}, {"w": "not", "b": [0.5173, 0.5917, 0.5435, 0.6065]}, {"w": "be", "b": [0.5497, 0.5917, 0.5683, 0.6065]}, {"w": "able", "b": [0.5745, 0.5917, 0.6067, 0.6065]}, {"w": "to", "b": [0.6129, 0.5917, 0.629, 0.6065]}, {"w": "get", "b": [0.6352, 0.5917, 0.6593, 0.6065]}, {"w": "back", "b": [0.6655, 0.5917, 0.7017, 0.6065]}, {"w": "to", "b": [0.7079, 0.5917, 0.724, 0.6065]}, {"w": "the", "b": [0.7302, 0.5917, 0.7554, 0.6065]}, {"w": "previous", "b": [0.7615, 0.5917, 0.8277, 0.6065]}, {"w": "level", "b": [0.8338, 0.5917, 0.8691, 0.6065]}, {"w": "of", "b": [0.1774, 0.6096, 0.1921, 0.6245]}, {"w": "performance", "b": [0.1983, 0.6096, 0.2973, 0.6245]}, {"w": "in", "b": [0.3034, 0.6096, 0.3187, 0.6245]}, {"w": "case", "b": [0.3249, 0.6096, 0.3576, 0.6245]}, {"w": "of", "b": [0.3638, 0.6096, 0.3785, 0.6245]}, {"w": "any", "b": [0.3847, 0.6096, 0.4132, 0.6245]}, {"w": "problem", "b": [0.4194, 0.6096, 0.4847, 0.6245]}, {"w": "with", "b": [0.4908, 0.6096, 0.5265, 0.6245]}, {"w": "the", "b": [0.5326, 0.6096, 0.5581, 0.6245]}, {"w": "model.", "b": [0.5643, 0.6096, 0.6178, 0.6245]}, {"w": "Therefore,", "b": [0.626, 0.6096, 0.7082, 0.6245]}, {"w": "unversioned", "b": [0.7143, 0.6096, 0.8088, 0.6245]}, {"w": "data", "b": [0.8149, 0.6096, 0.8506, 0.6245]}, {"w": "is", "b": [0.8568, 0.6096, 0.8691, 0.6245]}, {"w": "not", "b": [0.1774, 0.6275, 0.204, 0.6424]}, {"w": "recommended.", "b": [0.2102, 0.6275, 0.3261, 0.6424]}]}, {"id": "b_7", "type": "paragraph", "text": "Level 1: data is versioned as a snapshot at training time.", "words": [{"w": "Level", "b": [0.1312, 0.6544, 0.18, 0.6694]}, {"w": "1:", "b": [0.187, 0.6544, 0.2035, 0.6694]}, {"w": "data", "b": [0.213, 0.6544, 0.2536, 0.6694]}, {"w": "is", "b": [0.2607, 0.6544, 0.275, 0.6694]}, {"w": "versioned", "b": [0.2821, 0.6544, 0.3693, 0.6694]}, {"w": "as", "b": [0.3764, 0.6544, 0.3951, 0.6694]}, {"w": "a", "b": [0.4022, 0.6544, 0.4125, 0.6694]}, {"w": "snapshot", "b": [0.4195, 0.6544, 0.5008, 0.6694]}, {"w": "at", "b": [0.5079, 0.6544, 0.5265, 0.6694]}, {"w": "training", "b": [0.5335, 0.6544, 0.6068, 0.6694]}, {"w": "time.", "b": [0.6139, 0.6544, 0.6614, 0.6694]}]}, {"id": "b_8", "type": "paragraph", "text": "At this level, data is versioned by storing, at training time, a snapshot of everything needed to train a model. Such an approach allows you to version deployed models and get back to past performance. You should keep track of each version in some document, typically an Excel spreadsheet. That document should describe the location of the snapshot of both code and data, hyperparameter values, and other metadata needed to reproduce the experiment if needed. If you don’t have many models and don’t update them too frequently, this level of versioning could be a viable strategy. Otherwise, it’s not recommended.", "words": [{"w": "At", "b": [0.1767, 0.6722, 0.1975, 0.6873]}, {"w": "this", "b": [0.2037, 0.6722, 0.2341, 0.6873]}, {"w": "level,", "b": [0.2402, 0.6722, 0.282, 0.6873]}, {"w": "data", "b": [0.2881, 0.6722, 0.3247, 0.6873]}, {"w": "is", "b": [0.3308, 0.6722, 0.3435, 0.6873]}, {"w": "versioned", "b": [0.3496, 0.6722, 0.426, 0.6873]}, {"w": "by", "b": [0.4321, 0.6722, 0.452, 0.6873]}, {"w": "storing,", "b": [0.4581, 0.6722, 0.5199, 0.6873]}, {"w": "at", "b": [0.526, 0.6722, 0.5427, 0.6873]}, {"w": "training", "b": [0.5489, 0.6722, 0.6136, 0.6873]}, {"w": "time,", "b": [0.6198, 0.6722, 0.6615, 0.6873]}, {"w": "a", "b": [0.6677, 0.6722, 0.6771, 0.6873]}, {"w": "snapshot", "b": [0.6832, 0.6722, 0.7555, 0.6873]}, {"w": "of", "b": [0.7616, 0.6722, 0.7768, 0.6873]}, {"w": "everything", "b": [0.7829, 0.6722, 0.8691, 0.6873]}, {"w": "needed", "b": [0.1774, 0.6904, 0.232, 0.7052]}, {"w": "to", "b": [0.2382, 0.6904, 0.2544, 0.7052]}, {"w": "train", "b": [0.2605, 0.6904, 0.299, 0.7052]}, {"w": "a", "b": [0.3052, 0.6904, 0.3143, 0.7052]}, {"w": "model.", "b": [0.3204, 0.6904, 0.3735, 0.7052]}, {"w": "Such", "b": [0.3817, 0.6904, 0.4197, 0.7052]}, {"w": "an", "b": [0.4258, 0.6904, 0.4451, 0.7052]}, {"w": "approach", "b": [0.4512, 0.6904, 0.5236, 0.7052]}, {"w": "allows", "b": [0.5298, 0.6904, 0.5779, 0.7052]}, {"w": "you", "b": [0.5841, 0.6904, 0.6124, 0.7052]}, {"w": "to", "b": [0.6186, 0.6904, 0.6347, 0.7052]}, {"w": "version", "b": [0.6409, 0.6904, 0.6967, 0.7052]}, {"w": "deployed", "b": [0.7028, 0.6904, 0.7722, 0.7052]}, {"w": "models", "b": [0.7783, 0.6904, 0.8336, 0.7052]}, {"w": "and", "b": [0.8397, 0.6904, 0.8691, 0.7052]}, {"w": "get", "b": [0.1774, 0.7084, 0.2015, 0.7232]}, {"w": "back", "b": [0.2072, 0.7084, 0.2434, 0.7232]}, {"w": "to", "b": [0.2491, 0.7084, 0.2652, 0.7232]}, {"w": "past", "b": [0.2709, 0.7084, 0.3042, 0.7232]}, {"w": "performance.", "b": [0.31, 0.7084, 0.4126, 0.7232]}, {"w": "You", "b": [0.4206, 0.7084, 0.4518, 0.7232]}, {"w": "should", "b": [0.4575, 0.7084, 0.5089, 0.7232]}, {"w": "keep", "b": [0.5146, 0.7084, 0.5498, 0.7232]}, {"w": "track", "b": [0.5555, 0.7084, 0.5958, 0.7232]}, {"w": "of", "b": [0.6015, 0.7084, 0.6161, 0.7232]}, {"w": "each", "b": [0.6218, 0.7084, 0.6565, 0.7232]}, {"w": "version", "b": [0.6622, 0.7084, 0.7177, 0.7232]}, {"w": "in", "b": [0.7234, 0.7084, 0.7385, 0.7232]}, {"w": "some", "b": [0.7442, 0.7084, 0.7835, 0.7232]}, {"w": "document,", "b": [0.7893, 0.7084, 0.8717, 0.7232]}, {"w": "typically", "b": [0.1774, 0.7261, 0.248, 0.7412]}, {"w": "an", "b": [0.255, 0.7261, 0.2749, 0.7412]}, {"w": "Excel", "b": [0.282, 0.7261, 0.3267, 0.7412]}, {"w": "spreadsheet.", "b": [0.3338, 0.7261, 0.4345, 0.7412]}, {"w": "That", "b": [0.4454, 0.7261, 0.4862, 0.7412]}, {"w": "document", "b": [0.4933, 0.7261, 0.5738, 0.7412]}, {"w": "should", "b": [0.5809, 0.7261, 0.6344, 0.7412]}, {"w": "describe", "b": [0.6414, 0.7261, 0.708, 0.7412]}, {"w": "the", "b": [0.7151, 0.7261, 0.7412, 0.7412]}, {"w": "location", "b": [0.7483, 0.7261, 0.8137, 0.7412]}, {"w": "of", "b": [0.8208, 0.7261, 0.8359, 0.7412]}, {"w": "the", "b": [0.843, 0.7261, 0.8691, 0.7412]}, {"w": "snapshot", "b": [0.1774, 0.7443, 0.2469, 0.7591]}, {"w": "of", "b": [0.253, 0.7443, 0.2675, 0.7591]}, {"w": "both", "b": [0.2736, 0.7443, 0.3103, 0.7591]}, {"w": "code", "b": [0.3163, 0.7443, 0.352, 0.7591]}, {"w": "and", "b": [0.3581, 0.7443, 0.3872, 0.7591]}, {"w": "data,", "b": [0.3933, 0.7443, 0.4335, 0.7591]}, {"w": "hyperparameter", "b": [0.4395, 0.7443, 0.5648, 0.7591]}, {"w": "values,", "b": [0.5709, 0.7443, 0.6237, 0.7591]}, {"w": "and", "b": [0.6298, 0.7443, 0.6589, 0.7591]}, {"w": "other", "b": [0.665, 0.7443, 0.7062, 0.7591]}, {"w": "metadata", "b": [0.7123, 0.7443, 0.7866, 0.7591]}, {"w": "needed", "b": [0.7927, 0.7443, 0.847, 0.7591]}, {"w": "to", "b": [0.853, 0.7443, 0.8691, 0.7591]}, {"w": "reproduce", "b": [0.1774, 0.7621, 0.2565, 0.777]}, {"w": "the", "b": [0.2626, 0.7621, 0.2881, 0.777]}, {"w": "experiment", "b": [0.2942, 0.7621, 0.3835, 0.777]}, {"w": "if", "b": [0.3896, 0.7621, 0.4004, 0.777]}, {"w": "needed.", "b": [0.4065, 0.7621, 0.4667, 0.777]}, {"w": "If", "b": [0.4749, 0.7621, 0.4871, 0.777]}, {"w": "you", "b": [0.4932, 0.7621, 0.5218, 0.777]}, {"w": "don’t", "b": [0.5279, 0.7621, 0.5697, 0.777]}, {"w": "have", "b": [0.5758, 0.7621, 0.612, 0.777]}, {"w": "many", "b": [0.6182, 0.7621, 0.662, 0.777]}, {"w": "models", "b": [0.6681, 0.7621, 0.7238, 0.777]}, {"w": "and", "b": [0.7299, 0.7621, 0.7595, 0.777]}, {"w": "don’t", "b": [0.7656, 0.7621, 0.8074, 0.777]}, {"w": "update", "b": [0.8136, 0.7621, 0.8691, 0.777]}, {"w": "them", "b": [0.1774, 0.7801, 0.2182, 0.795]}, {"w": "too", "b": [0.2243, 0.7801, 0.2504, 0.795]}, {"w": "frequently,", "b": [0.2565, 0.7801, 0.3408, 0.795]}, {"w": "this", "b": [0.347, 0.7801, 0.3767, 0.795]}, {"w": "level", "b": [0.3828, 0.7801, 0.4186, 0.795]}, {"w": "of", "b": [0.4247, 0.7801, 0.4395, 0.795]}, {"w": "versioning", "b": [0.4456, 0.7801, 0.5265, 0.795]}, {"w": "could", "b": [0.5326, 0.7801, 0.5755, 0.795]}, {"w": "be", "b": [0.5817, 0.7801, 0.6006, 0.795]}, {"w": "a", "b": [0.6067, 0.7801, 0.6159, 0.795]}, {"w": "viable", "b": [0.622, 0.7801, 0.6695, 0.795]}, {"w": "strategy.", "b": [0.6756, 0.7801, 0.7442, 0.795]}, {"w": "Otherwise,", "b": [0.7524, 0.7801, 0.8384, 0.795]}, {"w": "it’s", "b": [0.8445, 0.7801, 0.8691, 0.795]}, {"w": "not", "b": [0.1774, 0.798, 0.204, 0.8129]}, {"w": "recommended.", "b": [0.2102, 0.798, 0.3261, 0.8129]}]}, {"id": "b_9", "type": "paragraph", "text": "Level 2: both data and code are versioned as one asset.", "words": [{"w": "Level", "b": [0.1312, 0.8249, 0.18, 0.8399]}, {"w": "2:", "b": [0.187, 0.8249, 0.2035, 0.8399]}, {"w": "both", "b": [0.213, 0.8249, 0.256, 0.8399]}, {"w": "data", "b": [0.2631, 0.8249, 0.3037, 0.8399]}, {"w": "and", "b": [0.3108, 0.8249, 0.3447, 0.8399]}, {"w": "code", "b": [0.3518, 0.8249, 0.3939, 0.8399]}, {"w": "are", "b": [0.401, 0.8249, 0.4298, 0.8399]}, {"w": "versioned", "b": [0.4368, 0.8249, 0.5241, 0.8399]}, {"w": "as", "b": [0.5312, 0.8249, 0.5498, 0.8399]}, {"w": "one", "b": [0.5569, 0.8249, 0.5891, 0.8399]}, {"w": "asset.", "b": [0.5961, 0.8249, 0.6471, 0.8399]}]}, {"id": "b_10", "type": "paragraph", "text": "At this level of versioning, small data assets, such as dictionaries, gazetteers, and small", "words": [{"w": "At", "b": [0.1767, 0.843, 0.1968, 0.8578]}, {"w": "this", "b": [0.2029, 0.843, 0.2322, 0.8578]}, {"w": "level", "b": [0.2384, 0.843, 0.2736, 0.8578]}, {"w": "of", "b": [0.2798, 0.843, 0.2944, 0.8578]}, {"w": "versioning,", "b": [0.3005, 0.843, 0.3853, 0.8578]}, {"w": "small", "b": [0.3914, 0.843, 0.4328, 0.8578]}, {"w": "data", "b": [0.439, 0.843, 0.4742, 0.8578]}, {"w": "assets,", "b": [0.4803, 0.843, 0.531, 0.8578]}, {"w": "such", "b": [0.5372, 0.843, 0.572, 0.8578]}, {"w": "as", "b": [0.5782, 0.843, 0.5944, 0.8578]}, {"w": "dictionaries,", "b": [0.6005, 0.843, 0.6963, 0.8578]}, {"w": "gazetteers,", "b": [0.7025, 0.843, 0.7862, 0.8578]}, {"w": "and", "b": [0.7924, 0.843, 0.8216, 0.8578]}, {"w": "small", "b": [0.8278, 0.843, 0.8691, 0.8578]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 42", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "42", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 86, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "datasets, are stored jointly with the code in a version control system, such as Git or Mercurial. Large files are stored in object storage, such as S3 or GCS, with unique IDs. The training data is stored as JSON, XML, or another standard format, and includes relevant metadata such as labels, the identity of the labeler, time of labeling, the tool used to label the data, and so on.", "words": [{"w": "datasets,", "b": [0.1774, 0.0883, 0.2494, 0.1034]}, {"w": "are", "b": [0.2556, 0.0883, 0.2806, 0.1034]}, {"w": "stored", "b": [0.2867, 0.0883, 0.3369, 0.1034]}, {"w": "jointly", "b": [0.343, 0.0883, 0.3956, 0.1034]}, {"w": "with", "b": [0.4018, 0.0883, 0.4382, 0.1034]}, {"w": "the", "b": [0.4443, 0.0883, 0.4703, 0.1034]}, {"w": "code", "b": [0.4765, 0.0883, 0.5135, 0.1034]}, {"w": "in", "b": [0.5196, 0.0883, 0.5352, 0.1034]}, {"w": "a", "b": [0.5414, 0.0883, 0.5508, 0.1034]}, {"w": "version", "b": [0.5569, 0.0883, 0.6143, 0.1034]}, {"w": "control", "b": [0.6205, 0.0883, 0.6773, 0.1034]}, {"w": "system,", "b": [0.6834, 0.0883, 0.7445, 0.1034]}, {"w": "such", "b": [0.7507, 0.0883, 0.7867, 0.1034]}, {"w": "as", "b": [0.7929, 0.0883, 0.8096, 0.1034]}, {"w": "Git", "b": [0.8155, 0.0884, 0.8463, 0.1034]}, {"w": "or", "b": [0.8524, 0.0883, 0.8691, 0.1034]}, {"w": "Mercurial.", "b": [0.1774, 0.1063, 0.2732, 0.1213]}, {"w": "Large", "b": [0.2814, 0.1063, 0.3269, 0.1213]}, {"w": "files", "b": [0.333, 0.1063, 0.3639, 0.1213]}, {"w": "are", "b": [0.3701, 0.1063, 0.3948, 0.1213]}, {"w": "stored", "b": [0.4009, 0.1063, 0.4504, 0.1213]}, {"w": "in", "b": [0.4565, 0.1063, 0.4719, 0.1213]}, {"w": "object", "b": [0.4781, 0.1063, 0.5273, 0.1213]}, {"w": "storage,", "b": [0.5335, 0.1063, 0.5963, 0.1213]}, {"w": "such", "b": [0.6024, 0.1063, 0.638, 0.1213]}, {"w": "as", "b": [0.6441, 0.1063, 0.6606, 0.1213]}, {"w": "S3", "b": [0.6666, 0.1064, 0.689, 0.1213]}, {"w": "or", "b": [0.6951, 0.1063, 0.7116, 0.1213]}, {"w": "GCS,", "b": [0.7178, 0.1063, 0.7667, 0.1213]}, {"w": "with", "b": [0.7728, 0.1063, 0.8088, 0.1213]}, {"w": "unique", "b": [0.8149, 0.1063, 0.8688, 0.1213]}, {"w": "IDs.", "b": [0.1774, 0.1242, 0.2112, 0.1393]}, {"w": "The", "b": [0.2227, 0.1242, 0.2552, 0.1393]}, {"w": "training", "b": [0.2625, 0.1242, 0.3274, 0.1393]}, {"w": "data", "b": [0.3346, 0.1242, 0.3712, 0.1393]}, {"w": "is", "b": [0.3785, 0.1242, 0.3912, 0.1393]}, {"w": "stored", "b": [0.3984, 0.1242, 0.4488, 0.1393]}, {"w": "as", "b": [0.4561, 0.1242, 0.4729, 0.1393]}, {"w": "JSON,", "b": [0.4802, 0.1242, 0.5343, 0.1393]}, {"w": "XML,", "b": [0.5416, 0.1242, 0.5899, 0.1393]}, {"w": "or", "b": [0.5972, 0.1242, 0.614, 0.1393]}, {"w": "another", "b": [0.6213, 0.1242, 0.6841, 0.1393]}, {"w": "standard", "b": [0.6914, 0.1242, 0.7637, 0.1393]}, {"w": "format,", "b": [0.771, 0.1242, 0.8311, 0.1393]}, {"w": "and", "b": [0.8387, 0.1242, 0.869, 0.1393]}, {"w": "includes", "b": [0.1774, 0.1422, 0.2422, 0.1572]}, {"w": "relevant", "b": [0.2484, 0.1422, 0.3121, 0.1572]}, {"w": "metadata", "b": [0.3183, 0.1422, 0.3943, 0.1572]}, {"w": "such", "b": [0.4004, 0.1422, 0.436, 0.1572]}, {"w": "as", "b": [0.4421, 0.1422, 0.4587, 0.1572]}, {"w": "labels,", "b": [0.4648, 0.1422, 0.5158, 0.1572]}, {"w": "the", "b": [0.5219, 0.1422, 0.5476, 0.1572]}, {"w": "identity", "b": [0.5538, 0.1422, 0.6159, 0.1572]}, {"w": "of", "b": [0.6221, 0.1422, 0.637, 0.1572]}, {"w": "the", "b": [0.6431, 0.1422, 0.6688, 0.1572]}, {"w": "labeler,", "b": [0.6749, 0.1422, 0.7341, 0.1572]}, {"w": "time", "b": [0.7402, 0.1422, 0.7762, 0.1572]}, {"w": "of", "b": [0.7823, 0.1422, 0.7972, 0.1572]}, {"w": "labeling,", "b": [0.8034, 0.1422, 0.8717, 0.1572]}, {"w": "the", "b": [0.1774, 0.1602, 0.203, 0.1751]}, {"w": "tool", "b": [0.2091, 0.1602, 0.2404, 0.1751]}, {"w": "used", "b": [0.2466, 0.1602, 0.2826, 0.1751]}, {"w": "to", "b": [0.2887, 0.1602, 0.3051, 0.1751]}, {"w": "label", "b": [0.3113, 0.1602, 0.3497, 0.1751]}, {"w": "the", "b": [0.3559, 0.1602, 0.3815, 0.1751]}, {"w": "data,", "b": [0.3877, 0.1602, 0.4287, 0.1751]}, {"w": "and", "b": [0.4348, 0.1602, 0.4646, 0.1751]}, {"w": "so", "b": [0.4707, 0.1602, 0.4872, 0.1751]}, {"w": "on.", "b": [0.4934, 0.1602, 0.518, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "Tools like Git Large File Storage (LFS) automatically replace large files such as audio samples, videos, large datasets, and graphics with text pointers, inside Git, while storing the file contents on a remote server.", "words": [{"w": "Tools", "b": [0.1767, 0.187, 0.2207, 0.2021]}, {"w": "like", "b": [0.2279, 0.187, 0.2561, 0.2021]}, {"w": "Git", "b": [0.2632, 0.1871, 0.294, 0.2021]}, {"w": "Large", "b": [0.3022, 0.1871, 0.3544, 0.2021]}, {"w": "File", "b": [0.3625, 0.1871, 0.3974, 0.2021]}, {"w": "Storage", "b": [0.4056, 0.1871, 0.4757, 0.2021]}, {"w": "(LFS)", "b": [0.4827, 0.187, 0.5319, 0.2021]}, {"w": "automatically", "b": [0.539, 0.187, 0.6514, 0.2021]}, {"w": "replace", "b": [0.6585, 0.187, 0.7161, 0.2021]}, {"w": "large", "b": [0.7232, 0.187, 0.763, 0.2021]}, {"w": "files", "b": [0.7702, 0.187, 0.8017, 0.2021]}, {"w": "such", "b": [0.8088, 0.187, 0.845, 0.2021]}, {"w": "as", "b": [0.8521, 0.187, 0.869, 0.2021]}, {"w": "audio", "b": [0.1774, 0.2052, 0.2206, 0.22]}, {"w": "samples,", "b": [0.2266, 0.2052, 0.2931, 0.22]}, {"w": "videos,", "b": [0.2992, 0.2052, 0.3531, 0.22]}, {"w": "large", "b": [0.3591, 0.2052, 0.3974, 0.22]}, {"w": "datasets,", "b": [0.4034, 0.2052, 0.473, 0.22]}, {"w": "and", "b": [0.479, 0.2052, 0.5082, 0.22]}, {"w": "graphics", "b": [0.5142, 0.2052, 0.5797, 0.22]}, {"w": "with", "b": [0.5857, 0.2052, 0.6209, 0.22]}, {"w": "text", "b": [0.6269, 0.2052, 0.6586, 0.22]}, {"w": "pointers,", "b": [0.6646, 0.2052, 0.7331, 0.22]}, {"w": "inside", "b": [0.7392, 0.2052, 0.7845, 0.22]}, {"w": "Git,", "b": [0.7906, 0.2052, 0.8218, 0.22]}, {"w": "while", "b": [0.8279, 0.2052, 0.8691, 0.22]}, {"w": "storing", "b": [0.1774, 0.223, 0.2329, 0.238]}, {"w": "the", "b": [0.239, 0.223, 0.2647, 0.238]}, {"w": "file", "b": [0.2708, 0.223, 0.2944, 0.238]}, {"w": "contents", "b": [0.3006, 0.223, 0.3673, 0.238]}, {"w": "on", "b": [0.3735, 0.223, 0.393, 0.238]}, {"w": "a", "b": [0.3991, 0.223, 0.4083, 0.238]}, {"w": "remote", "b": [0.4145, 0.223, 0.4699, 0.238]}, {"w": "server.", "b": [0.4761, 0.223, 0.5286, 0.238]}]}, {"id": "b_2", "type": "paragraph", "text": "The version of the dataset is defined by the git signatures of the code and the data file. It can also be helpful to add a timestamp to identify a needed version easily.", "words": [{"w": "The", "b": [0.1767, 0.2499, 0.2087, 0.2649]}, {"w": "version", "b": [0.2149, 0.2499, 0.2719, 0.2649]}, {"w": "of", "b": [0.2781, 0.2499, 0.2931, 0.2649]}, {"w": "the", "b": [0.2992, 0.2499, 0.3251, 0.2649]}, {"w": "dataset", "b": [0.3312, 0.2499, 0.3902, 0.2649]}, {"w": "is", "b": [0.3964, 0.2499, 0.4089, 0.2649]}, {"w": "defined", "b": [0.4151, 0.2499, 0.473, 0.2649]}, {"w": "by", "b": [0.4791, 0.2499, 0.4988, 0.2649]}, {"w": "the", "b": [0.5049, 0.2499, 0.5308, 0.2649]}, {"w": "git", "b": [0.5367, 0.2499, 0.5615, 0.2649]}, {"w": "signatures", "b": [0.5686, 0.2499, 0.6624, 0.2649]}, {"w": "of", "b": [0.6686, 0.2499, 0.6835, 0.2649]}, {"w": "the", "b": [0.6897, 0.2499, 0.7155, 0.2649]}, {"w": "code", "b": [0.7217, 0.2499, 0.7584, 0.2649]}, {"w": "and", "b": [0.7646, 0.2499, 0.7945, 0.2649]}, {"w": "the", "b": [0.8007, 0.2499, 0.8265, 0.2649]}, {"w": "data", "b": [0.8327, 0.2499, 0.8689, 0.2649]}, {"w": "file.", "b": [0.1774, 0.2679, 0.2061, 0.2828]}, {"w": "It", "b": [0.2143, 0.2679, 0.2281, 0.2828]}, {"w": "can", "b": [0.2343, 0.2679, 0.262, 0.2828]}, {"w": "also", "b": [0.2681, 0.2679, 0.299, 0.2828]}, {"w": "be", "b": [0.3051, 0.2679, 0.3241, 0.2828]}, {"w": "helpful", "b": [0.3302, 0.2679, 0.3851, 0.2828]}, {"w": "to", "b": [0.3913, 0.2679, 0.4077, 0.2828]}, {"w": "add", "b": [0.4138, 0.2679, 0.4436, 0.2828]}, {"w": "a", "b": [0.4497, 0.2679, 0.4589, 0.2828]}, {"w": "timestamp", "b": [0.4651, 0.2679, 0.5503, 0.2828]}, {"w": "to", "b": [0.5564, 0.2679, 0.5728, 0.2828]}, {"w": "identify", "b": [0.579, 0.2679, 0.64, 0.2828]}, {"w": "a", "b": [0.6462, 0.2679, 0.6554, 0.2828]}, {"w": "needed", "b": [0.6615, 0.2679, 0.7169, 0.2828]}, {"w": "version", "b": [0.7231, 0.2679, 0.7797, 0.2828]}, {"w": "easily.", "b": [0.7858, 0.2679, 0.8341, 0.2828]}]}, {"id": "b_3", "type": "paragraph", "text": "Level 3: using or building a specialized data versioning solution.", "words": [{"w": "Level", "b": [0.1312, 0.2948, 0.18, 0.3097]}, {"w": "3:", "b": [0.187, 0.2948, 0.2035, 0.3097]}, {"w": "using", "b": [0.213, 0.2948, 0.2614, 0.3097]}, {"w": "or", "b": [0.2685, 0.2948, 0.2879, 0.3097]}, {"w": "building", "b": [0.2949, 0.2948, 0.3704, 0.3097]}, {"w": "a", "b": [0.3775, 0.2948, 0.3878, 0.3097]}, {"w": "specialized", "b": [0.3949, 0.2948, 0.4937, 0.3097]}, {"w": "data", "b": [0.5008, 0.2948, 0.5415, 0.3097]}, {"w": "versioning", "b": [0.5485, 0.2948, 0.6426, 0.3097]}, {"w": "solution.", "b": [0.6497, 0.2948, 0.7288, 0.3097]}]}, {"id": "b_4", "type": "paragraph", "text": "Data versioning software such as DVC and Pachyderm provide additional tools for data versioning. They typically interoperate with code versioning software, such as Git.", "words": [{"w": "Data", "b": [0.1774, 0.3127, 0.2174, 0.3277]}, {"w": "versioning", "b": [0.2236, 0.3127, 0.3055, 0.3277]}, {"w": "software", "b": [0.3116, 0.3127, 0.3786, 0.3277]}, {"w": "such", "b": [0.3847, 0.3127, 0.4205, 0.3277]}, {"w": "as", "b": [0.4267, 0.3127, 0.4434, 0.3277]}, {"w": "DVC", "b": [0.4494, 0.3127, 0.4958, 0.3277]}, {"w": "and", "b": [0.502, 0.3127, 0.532, 0.3277]}, {"w": "Pachyderm", "b": [0.5381, 0.3127, 0.6415, 0.3277]}, {"w": "provide", "b": [0.6478, 0.3127, 0.7078, 0.3277]}, {"w": "additional", "b": [0.714, 0.3127, 0.7957, 0.3277]}, {"w": "tools", "b": [0.8019, 0.3127, 0.8408, 0.3277]}, {"w": "for", "b": [0.8469, 0.3127, 0.8692, 0.3277]}, {"w": "data", "b": [0.1774, 0.3308, 0.2125, 0.3456]}, {"w": "versioning.", "b": [0.2186, 0.3308, 0.3032, 0.3456]}, {"w": "They", "b": [0.3113, 0.3308, 0.352, 0.3456]}, {"w": "typically", "b": [0.3581, 0.3308, 0.4259, 0.3456]}, {"w": "interoperate", "b": [0.432, 0.3308, 0.5276, 0.3456]}, {"w": "with", "b": [0.5336, 0.3308, 0.5688, 0.3456]}, {"w": "code", "b": [0.5749, 0.3308, 0.6106, 0.3456]}, {"w": "versioning", "b": [0.6167, 0.3308, 0.6962, 0.3456]}, {"w": "software,", "b": [0.7023, 0.3308, 0.7722, 0.3456]}, {"w": "such", "b": [0.7783, 0.3308, 0.8131, 0.3456]}, {"w": "as", "b": [0.8192, 0.3308, 0.8353, 0.3456]}, {"w": "Git.", "b": [0.8414, 0.3308, 0.8727, 0.3456]}]}, {"id": "b_5", "type": "paragraph", "text": "Level 2 of versioning is a recommended way of implementing versioning for most projects. If you feel like Level 2 is not sufficient for your needs, explore Level 3 solutions, or consider building your own. Otherwise, that approach is not recommended, as it adds complexity to what is already a complex engineering project.", "words": [{"w": "Level", "b": [0.1312, 0.3577, 0.1729, 0.3725]}, {"w": "2", "b": [0.1791, 0.3577, 0.1882, 0.3725]}, {"w": "of", "b": [0.1944, 0.3577, 0.209, 0.3725]}, {"w": "versioning", "b": [0.2152, 0.3577, 0.2952, 0.3725]}, {"w": "is", "b": [0.3014, 0.3577, 0.3136, 0.3725]}, {"w": "a", "b": [0.3197, 0.3577, 0.3288, 0.3725]}, {"w": "recommended", "b": [0.335, 0.3577, 0.4442, 0.3725]}, {"w": "way", "b": [0.4504, 0.3577, 0.4812, 0.3725]}, {"w": "of", "b": [0.4874, 0.3577, 0.502, 0.3725]}, {"w": "implementing", "b": [0.5082, 0.3577, 0.6159, 0.3725]}, {"w": "versioning", "b": [0.622, 0.3577, 0.702, 0.3725]}, {"w": "for", "b": [0.7082, 0.3577, 0.73, 0.3725]}, {"w": "most", "b": [0.7362, 0.3577, 0.7746, 0.3725]}, {"w": "projects.", "b": [0.7808, 0.3577, 0.8487, 0.3725]}, {"w": "If", "b": [0.857, 0.3577, 0.8691, 0.3725]}, {"w": "you", "b": [0.1308, 0.3754, 0.1601, 0.3905]}, {"w": "feel", "b": [0.1666, 0.3754, 0.1944, 0.3905]}, {"w": "like", "b": [0.2009, 0.3754, 0.2292, 0.3905]}, {"w": "Level", "b": [0.2358, 0.3754, 0.2789, 0.3905]}, {"w": "2", "b": [0.2855, 0.3754, 0.2949, 0.3905]}, {"w": "is", "b": [0.3015, 0.3754, 0.3142, 0.3905]}, {"w": "not", "b": [0.3207, 0.3754, 0.3479, 0.3905]}, {"w": "sufficient", "b": [0.3545, 0.3754, 0.4273, 0.3905]}, {"w": "for", "b": [0.4339, 0.3754, 0.4564, 0.3905]}, {"w": "your", "b": [0.463, 0.3754, 0.4997, 0.3905]}, {"w": "needs,", "b": [0.5063, 0.3754, 0.5566, 0.3905]}, {"w": "explore", "b": [0.5633, 0.3754, 0.6225, 0.3905]}, {"w": "Level", "b": [0.629, 0.3754, 0.6722, 0.3905]}, {"w": "3", "b": [0.6788, 0.3754, 0.6882, 0.3905]}, {"w": "solutions,", "b": [0.6948, 0.3754, 0.7724, 0.3905]}, {"w": "or", "b": [0.7791, 0.3754, 0.7958, 0.3905]}, {"w": "consider", "b": [0.8024, 0.3754, 0.8695, 0.3905]}, {"w": "building", "b": [0.1312, 0.3935, 0.1967, 0.4084]}, {"w": "your", "b": [0.2029, 0.3935, 0.2387, 0.4084]}, {"w": "own.", "b": [0.2449, 0.3935, 0.2822, 0.4084]}, {"w": "Otherwise,", "b": [0.2904, 0.3935, 0.3765, 0.4084]}, {"w": "that", "b": [0.3827, 0.3935, 0.4164, 0.4084]}, {"w": "approach", "b": [0.4226, 0.3935, 0.4958, 0.4084]}, {"w": "is", "b": [0.5019, 0.3935, 0.5143, 0.4084]}, {"w": "not", "b": [0.5204, 0.3935, 0.547, 0.4084]}, {"w": "recommended,", "b": [0.5532, 0.3935, 0.6689, 0.4084]}, {"w": "as", "b": [0.675, 0.3935, 0.6915, 0.4084]}, {"w": "it", "b": [0.6976, 0.3935, 0.7099, 0.4084]}, {"w": "adds", "b": [0.716, 0.3935, 0.753, 0.4084]}, {"w": "complexity", "b": [0.7591, 0.3935, 0.8466, 0.4084]}, {"w": "to", "b": [0.8527, 0.3935, 0.8691, 0.4084]}, {"w": "what", "b": [0.1306, 0.4114, 0.1705, 0.4264]}, {"w": "is", "b": [0.1767, 0.4114, 0.1891, 0.4264]}, {"w": "already", "b": [0.1953, 0.4114, 0.2543, 0.4264]}, {"w": "a", "b": [0.2604, 0.4114, 0.2697, 0.4264]}, {"w": "complex", "b": [0.2758, 0.4114, 0.3419, 0.4264]}, {"w": "engineering", "b": [0.3481, 0.4114, 0.4394, 0.4264]}, {"w": "project.", "b": [0.4456, 0.4114, 0.5072, 0.4264]}]}, {"id": "b_6", "type": "paragraph", "text": "3.11.4 Documentation and Metadata", "words": [{"w": "3.11.4", "b": [0.1312, 0.4593, 0.1855, 0.4743]}, {"w": "Documentation", "b": [0.2067, 0.4593, 0.3491, 0.4743]}, {"w": "and", "b": [0.3561, 0.4593, 0.39, 0.4743]}, {"w": "Metadata", "b": [0.3971, 0.4593, 0.4862, 0.4743]}]}, {"id": "b_7", "type": "paragraph", "text": "While you are actively working on a machine learning project, you are often capable of", "words": [{"w": "While", "b": [0.1303, 0.4957, 0.1789, 0.5109]}, {"w": "you", "b": [0.1867, 0.4957, 0.216, 0.5109]}, {"w": "are", "b": [0.2238, 0.4957, 0.2489, 0.5109]}, {"w": "actively", "b": [0.2567, 0.4957, 0.32, 0.5109]}, {"w": "working", "b": [0.3278, 0.4957, 0.3927, 0.5109]}, {"w": "on", "b": [0.4005, 0.4957, 0.4204, 0.5109]}, {"w": "a", "b": [0.4281, 0.4957, 0.4375, 0.5109]}, {"w": "machine", "b": [0.4453, 0.4957, 0.5128, 0.5109]}, {"w": "learning", "b": [0.5206, 0.4957, 0.5865, 0.5109]}, {"w": "project,", "b": [0.5943, 0.4957, 0.6571, 0.5109]}, {"w": "you", "b": [0.6653, 0.4957, 0.6946, 0.5109]}, {"w": "are", "b": [0.7024, 0.4957, 0.7275, 0.5109]}, {"w": "often", "b": [0.7353, 0.4957, 0.7766, 0.5109]}, {"w": "capable", "b": [0.7844, 0.4957, 0.8461, 0.5109]}, {"w": "of", "b": [0.8539, 0.4957, 0.8691, 0.5109]}]}, {"id": "b_8", "type": "paragraph", "text": "remembering important details about the data. However, once the project goes to production and you switch to another project, this information will eventually become less detailed.", "words": [{"w": "remembering", "b": [0.1312, 0.5139, 0.2338, 0.5287]}, {"w": "important", "b": [0.2395, 0.5139, 0.3189, 0.5287]}, {"w": "details", "b": [0.3245, 0.5139, 0.3759, 0.5287]}, {"w": "about", "b": [0.3815, 0.5139, 0.4272, 0.5287]}, {"w": "the", "b": [0.4329, 0.5139, 0.458, 0.5287]}, {"w": "data.", "b": [0.4636, 0.5139, 0.5038, 0.5287]}, {"w": "However,", "b": [0.5118, 0.5139, 0.5837, 0.5287]}, {"w": "once", "b": [0.5894, 0.5139, 0.6246, 0.5287]}, {"w": "the", "b": [0.6302, 0.5139, 0.6554, 0.5287]}, {"w": "project", "b": [0.661, 0.5139, 0.7164, 0.5287]}, {"w": "goes", "b": [0.722, 0.5139, 0.7558, 0.5287]}, {"w": "to", "b": [0.7614, 0.5139, 0.7775, 0.5287]}, {"w": "production", "b": [0.7831, 0.5139, 0.8691, 0.5287]}, {"w": "and", "b": [0.1312, 0.5318, 0.161, 0.5467]}, {"w": "you", "b": [0.1671, 0.5318, 0.1958, 0.5467]}, {"w": "switch", "b": [0.202, 0.5318, 0.2529, 0.5467]}, {"w": "to", "b": [0.259, 0.5318, 0.2754, 0.5467]}, {"w": "another", "b": [0.2815, 0.5318, 0.3431, 0.5467]}, {"w": "project,", "b": [0.3493, 0.5318, 0.4109, 0.5467]}, {"w": "this", "b": [0.417, 0.5318, 0.4469, 0.5467]}, {"w": "information", "b": [0.453, 0.5318, 0.5469, 0.5467]}, {"w": "will", "b": [0.553, 0.5318, 0.5817, 0.5467]}, {"w": "eventually", "b": [0.5879, 0.5318, 0.6699, 0.5467]}, {"w": "become", "b": [0.6761, 0.5318, 0.7361, 0.5467]}, {"w": "less", "b": [0.7422, 0.5318, 0.7701, 0.5467]}, {"w": "detailed.", "b": [0.7763, 0.5318, 0.845, 0.5467]}]}, {"id": "b_9", "type": "paragraph", "text": "Before you switch to another project, you should make sure that others can understand your data and use it properly.", "words": [{"w": "Before", "b": [0.1312, 0.5588, 0.1819, 0.5736]}, {"w": "you", "b": [0.188, 0.5588, 0.2162, 0.5736]}, {"w": "switch", "b": [0.2224, 0.5588, 0.2723, 0.5736]}, {"w": "to", "b": [0.2785, 0.5588, 0.2946, 0.5736]}, {"w": "another", "b": [0.3007, 0.5588, 0.3612, 0.5736]}, {"w": "project,", "b": [0.3674, 0.5588, 0.4278, 0.5736]}, {"w": "you", "b": [0.434, 0.5588, 0.4622, 0.5736]}, {"w": "should", "b": [0.4683, 0.5588, 0.5198, 0.5736]}, {"w": "make", "b": [0.526, 0.5588, 0.5672, 0.5736]}, {"w": "sure", "b": [0.5734, 0.5588, 0.6058, 0.5736]}, {"w": "that", "b": [0.6119, 0.5588, 0.6451, 0.5736]}, {"w": "others", "b": [0.6513, 0.5588, 0.6998, 0.5736]}, {"w": "can", "b": [0.7059, 0.5588, 0.7331, 0.5736]}, {"w": "understand", "b": [0.7393, 0.5588, 0.8281, 0.5736]}, {"w": "your", "b": [0.8342, 0.5588, 0.8695, 0.5736]}, {"w": "data", "b": [0.1312, 0.5766, 0.1671, 0.5916]}, {"w": "and", "b": [0.1733, 0.5766, 0.203, 0.5916]}, {"w": "use", "b": [0.2092, 0.5766, 0.2349, 0.5916]}, {"w": "it", "b": [0.2411, 0.5766, 0.2534, 0.5916]}, {"w": "properly.", "b": [0.2595, 0.5766, 0.3309, 0.5916]}]}, {"id": "b_10", "type": "paragraph", "text": "If the data is self-explanatory, then you might leave it undocumented. However, it’s rather rare that someone who didn’t create a dataset can easily understand it and know how to use it just by looking at it.", "words": [{"w": "If", "b": [0.1312, 0.6035, 0.1436, 0.6185]}, {"w": "the", "b": [0.1498, 0.6035, 0.1756, 0.6185]}, {"w": "data", "b": [0.1817, 0.6035, 0.2179, 0.6185]}, {"w": "is", "b": [0.2241, 0.6035, 0.2366, 0.6185]}, {"w": "self-explanatory,", "b": [0.2427, 0.6035, 0.3752, 0.6185]}, {"w": "then", "b": [0.3813, 0.6035, 0.4175, 0.6185]}, {"w": "you", "b": [0.4237, 0.6035, 0.4526, 0.6185]}, {"w": "might", "b": [0.4587, 0.6035, 0.5057, 0.6185]}, {"w": "leave", "b": [0.5119, 0.6035, 0.5517, 0.6185]}, {"w": "it", "b": [0.5578, 0.6035, 0.5702, 0.6185]}, {"w": "undocumented.", "b": [0.5763, 0.6035, 0.7004, 0.6185]}, {"w": "However,", "b": [0.7086, 0.6035, 0.7826, 0.6185]}, {"w": "it’s", "b": [0.7887, 0.6035, 0.8136, 0.6185]}, {"w": "rather", "b": [0.8197, 0.6035, 0.8695, 0.6185]}, {"w": "rare", "b": [0.1312, 0.6216, 0.1625, 0.6364]}, {"w": "that", "b": [0.1687, 0.6216, 0.2019, 0.6364]}, {"w": "someone", "b": [0.208, 0.6216, 0.2745, 0.6364]}, {"w": "who", "b": [0.2807, 0.6216, 0.3128, 0.6364]}, {"w": "didn’t", "b": [0.319, 0.6216, 0.3663, 0.6364]}, {"w": "create", "b": [0.3724, 0.6216, 0.4198, 0.6364]}, {"w": "a", "b": [0.4259, 0.6216, 0.4349, 0.6364]}, {"w": "dataset", "b": [0.4411, 0.6216, 0.4985, 0.6364]}, {"w": "can", "b": [0.5047, 0.6216, 0.5318, 0.6364]}, {"w": "easily", "b": [0.538, 0.6216, 0.5819, 0.6364]}, {"w": "understand", "b": [0.588, 0.6216, 0.6767, 0.6364]}, {"w": "it", "b": [0.6829, 0.6216, 0.6949, 0.6364]}, {"w": "and", "b": [0.7011, 0.6216, 0.7303, 0.6364]}, {"w": "know", "b": [0.7364, 0.6216, 0.7776, 0.6364]}, {"w": "how", "b": [0.7838, 0.6216, 0.8154, 0.6364]}, {"w": "to", "b": [0.8216, 0.6216, 0.8377, 0.6364]}, {"w": "use", "b": [0.8438, 0.6216, 0.8691, 0.6364]}, {"w": "it", "b": [0.1312, 0.6394, 0.1435, 0.6544]}, {"w": "just", "b": [0.1497, 0.6394, 0.1801, 0.6544]}, {"w": "by", "b": [0.1862, 0.6394, 0.2057, 0.6544]}, {"w": "looking", "b": [0.2118, 0.6394, 0.2703, 0.6544]}, {"w": "at", "b": [0.2764, 0.6394, 0.2928, 0.6544]}, {"w": "it.", "b": [0.299, 0.6394, 0.3164, 0.6544]}]}, {"id": "b_11", "type": "paragraph", "text": "Documentation has to accompany any data asset that was used to train a model. This documentation has to contain the following details:", "words": [{"w": "Documentation", "b": [0.1312, 0.6662, 0.2575, 0.6813]}, {"w": "has", "b": [0.2651, 0.6662, 0.2924, 0.6813]}, {"w": "to", "b": [0.3001, 0.6662, 0.3168, 0.6813]}, {"w": "accompany", "b": [0.3245, 0.6662, 0.4154, 0.6813]}, {"w": "any", "b": [0.4231, 0.6662, 0.4524, 0.6813]}, {"w": "data", "b": [0.46, 0.6662, 0.4966, 0.6813]}, {"w": "asset", "b": [0.5042, 0.6662, 0.5442, 0.6813]}, {"w": "that", "b": [0.5519, 0.6662, 0.5864, 0.6813]}, {"w": "was", "b": [0.594, 0.6662, 0.6239, 0.6813]}, {"w": "used", "b": [0.6316, 0.6662, 0.6683, 0.6813]}, {"w": "to", "b": [0.6759, 0.6662, 0.6926, 0.6813]}, {"w": "train", "b": [0.7003, 0.6662, 0.7401, 0.6813]}, {"w": "a", "b": [0.7477, 0.6662, 0.7571, 0.6813]}, {"w": "model.", "b": [0.7647, 0.6662, 0.8197, 0.6813]}, {"w": "This", "b": [0.8323, 0.6662, 0.869, 0.6813]}, {"w": "documentation", "b": [0.1312, 0.6843, 0.2512, 0.6993]}, {"w": "has", "b": [0.2574, 0.6843, 0.2841, 0.6993]}, {"w": "to", "b": [0.2903, 0.6843, 0.3067, 0.6993]}, {"w": "contain", "b": [0.3128, 0.6843, 0.3718, 0.6993]}, {"w": "the", "b": [0.3779, 0.6843, 0.4036, 0.6993]}, {"w": "following", "b": [0.4097, 0.6843, 0.4815, 0.6993]}, {"w": "details:", "b": [0.4877, 0.6843, 0.5452, 0.6993]}]}, {"id": "b_12", "type": "paragraph", "text": "• what that data means, • how it was collected, or methods used to create it (instructions to labelers and methods for quality control), • the details of train-validation-test splits, • details of all pre-processing steps, • an explanation of any data that were excluded, • what format is used to store the data, • types of attributes or features (which values are allowed for each attribute or feature), • number of examples,", "words": [{"w": "•", "b": [0.1538, 0.7112, 0.1681, 0.7262]}, {"w": "what", "b": [0.1774, 0.7112, 0.2173, 0.7262]}, {"w": "that", "b": [0.2235, 0.7112, 0.2573, 0.7262]}, {"w": "data", "b": [0.2635, 0.7112, 0.2994, 0.7262]}, {"w": "means,", "b": [0.3055, 0.7112, 0.361, 0.7262]}, {"w": "•", "b": [0.1538, 0.7292, 0.1681, 0.7441]}, {"w": "how", "b": [0.1774, 0.7293, 0.209, 0.7441]}, {"w": "it", "b": [0.2147, 0.7293, 0.2268, 0.7441]}, {"w": "was", "b": [0.2325, 0.7293, 0.2612, 0.7441]}, {"w": "collected,", "b": [0.267, 0.7293, 0.3403, 0.7441]}, {"w": "or", "b": [0.3462, 0.7293, 0.3623, 0.7441]}, {"w": "methods", "b": [0.368, 0.7293, 0.4349, 0.7441]}, {"w": "used", "b": [0.4407, 0.7293, 0.476, 0.7441]}, {"w": "to", "b": [0.4817, 0.7293, 0.4978, 0.7441]}, {"w": "create", "b": [0.5035, 0.7293, 0.5508, 0.7441]}, {"w": "it", "b": [0.5565, 0.7293, 0.5686, 0.7441]}, {"w": "(instructions", "b": [0.5743, 0.7293, 0.6741, 0.7441]}, {"w": "to", "b": [0.6798, 0.7293, 0.6959, 0.7441]}, {"w": "labelers", "b": [0.7016, 0.7293, 0.7616, 0.7441]}, {"w": "and", "b": [0.7673, 0.7293, 0.7964, 0.7441]}, {"w": "methods", "b": [0.8022, 0.7293, 0.8691, 0.7441]}, {"w": "for", "b": [0.1774, 0.7471, 0.1995, 0.7621]}, {"w": "quality", "b": [0.2056, 0.7471, 0.2615, 0.7621]}, {"w": "control),", "b": [0.2676, 0.7471, 0.3359, 0.7621]}, {"w": "•", "b": [0.1538, 0.7651, 0.1681, 0.78]}, {"w": "the", "b": [0.1774, 0.7651, 0.203, 0.78]}, {"w": "details", "b": [0.2091, 0.7651, 0.2616, 0.78]}, {"w": "of", "b": [0.2677, 0.7651, 0.2826, 0.78]}, {"w": "train-validation-test", "b": [0.2887, 0.7651, 0.4494, 0.78]}, {"w": "splits,", "b": [0.4555, 0.7651, 0.5029, 0.78]}, {"w": "•", "b": [0.1538, 0.783, 0.1681, 0.798]}, {"w": "details", "b": [0.1774, 0.783, 0.2298, 0.798]}, {"w": "of", "b": [0.2359, 0.783, 0.2508, 0.798]}, {"w": "all", "b": [0.2569, 0.783, 0.2764, 0.798]}, {"w": "pre-processing", "b": [0.2826, 0.783, 0.3972, 0.798]}, {"w": "steps,", "b": [0.4034, 0.783, 0.4487, 0.798]}, {"w": "•", "b": [0.1538, 0.801, 0.1681, 0.8159]}, {"w": "an", "b": [0.1774, 0.801, 0.1968, 0.8159]}, {"w": "explanation", "b": [0.203, 0.801, 0.2968, 0.8159]}, {"w": "of", "b": [0.303, 0.801, 0.3178, 0.8159]}, {"w": "any", "b": [0.324, 0.801, 0.3527, 0.8159]}, {"w": "data", "b": [0.3588, 0.801, 0.3947, 0.8159]}, {"w": "that", "b": [0.4009, 0.801, 0.4347, 0.8159]}, {"w": "were", "b": [0.4409, 0.801, 0.4773, 0.8159]}, {"w": "excluded,", "b": [0.4835, 0.801, 0.5589, 0.8159]}, {"w": "•", "b": [0.1538, 0.8189, 0.1681, 0.8339]}, {"w": "what", "b": [0.1774, 0.8189, 0.2173, 0.8339]}, {"w": "format", "b": [0.2235, 0.8189, 0.2774, 0.8339]}, {"w": "is", "b": [0.2835, 0.8189, 0.2959, 0.8339]}, {"w": "used", "b": [0.3021, 0.8189, 0.3381, 0.8339]}, {"w": "to", "b": [0.3442, 0.8189, 0.3606, 0.8339]}, {"w": "store", "b": [0.3668, 0.8189, 0.4059, 0.8339]}, {"w": "the", "b": [0.4121, 0.8189, 0.4377, 0.8339]}, {"w": "data,", "b": [0.4439, 0.8189, 0.4849, 0.8339]}, {"w": "•", "b": [0.1538, 0.8369, 0.1681, 0.8518]}, {"w": "types", "b": [0.1774, 0.8369, 0.2198, 0.8518]}, {"w": "of", "b": [0.226, 0.8369, 0.2408, 0.8518]}, {"w": "attributes", "b": [0.2469, 0.8369, 0.3256, 0.8518]}, {"w": "or", "b": [0.3318, 0.8369, 0.3482, 0.8518]}, {"w": "features", "b": [0.3543, 0.8369, 0.4172, 0.8518]}, {"w": "(which", "b": [0.4234, 0.8369, 0.4769, 0.8518]}, {"w": "values", "b": [0.4831, 0.8369, 0.5317, 0.8518]}, {"w": "are", "b": [0.5378, 0.8369, 0.5624, 0.8518]}, {"w": "allowed", "b": [0.5685, 0.8369, 0.6277, 0.8518]}, {"w": "for", "b": [0.6338, 0.8369, 0.6558, 0.8518]}, {"w": "each", "b": [0.662, 0.8369, 0.6972, 0.8518]}, {"w": "attribute", "b": [0.7033, 0.8369, 0.7748, 0.8518]}, {"w": "or", "b": [0.781, 0.8369, 0.7973, 0.8518]}, {"w": "feature),", "b": [0.8035, 0.8369, 0.8714, 0.8518]}, {"w": "•", "b": [0.1538, 0.8548, 0.1681, 0.8698]}, {"w": "number", "b": [0.1774, 0.8548, 0.2384, 0.8698]}, {"w": "of", "b": [0.2446, 0.8548, 0.2594, 0.8698]}, {"w": "examples,", "b": [0.2656, 0.8548, 0.3441, 0.8698]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 43", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "43", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 87, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• possible values for labels or the allowable range for a numerical target.", "words": [{"w": "•", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "possible", "b": [0.1774, 0.0884, 0.2407, 0.1033]}, {"w": "values", "b": [0.2468, 0.0884, 0.2956, 0.1033]}, {"w": "for", "b": [0.3018, 0.0884, 0.3239, 0.1033]}, {"w": "labels", "b": [0.33, 0.0884, 0.3758, 0.1033]}, {"w": "or", "b": [0.3819, 0.0884, 0.3984, 0.1033]}, {"w": "the", "b": [0.4045, 0.0884, 0.4302, 0.1033]}, {"w": "allowable", "b": [0.4363, 0.0884, 0.5101, 0.1033]}, {"w": "range", "b": [0.5163, 0.0884, 0.5604, 0.1033]}, {"w": "for", "b": [0.5666, 0.0884, 0.5887, 0.1033]}, {"w": "a", "b": [0.5948, 0.0884, 0.6041, 0.1033]}, {"w": "numerical", "b": [0.6102, 0.0884, 0.6887, 0.1033]}, {"w": "target.", "b": [0.6949, 0.0884, 0.7482, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "3.11.5 Data Lifecycle", "words": [{"w": "3.11.5", "b": [0.1312, 0.1363, 0.1855, 0.1512]}, {"w": "Data", "b": [0.2067, 0.1363, 0.2518, 0.1512]}, {"w": "Lifecycle", "b": [0.2589, 0.1363, 0.3395, 0.1512]}]}, {"id": "b_2", "type": "paragraph", "text": "Some data can be stored indefinitely. However, in some business contexts, you might be allowed to store some data for a specific time, and then you might have to erase it. If such restrictions apply to the data you work with, you have to make sure that a reliable alerting system is in place. That alerting system has to contact the person responsible for the data erasure and have a backup plan in case that person is not available. Don’t forget that the consequences for not erasing data can sometimes be very serious for the organization.", "words": [{"w": "Some", "b": [0.1312, 0.1727, 0.1752, 0.1878]}, {"w": "data", "b": [0.1822, 0.1727, 0.2188, 0.1878]}, {"w": "can", "b": [0.2259, 0.1727, 0.2541, 0.1878]}, {"w": "be", "b": [0.2611, 0.1727, 0.2805, 0.1878]}, {"w": "stored", "b": [0.2875, 0.1727, 0.3379, 0.1878]}, {"w": "indefinitely.", "b": [0.3449, 0.1727, 0.4402, 0.1878]}, {"w": "However,", "b": [0.4511, 0.1727, 0.5259, 0.1878]}, {"w": "in", "b": [0.5332, 0.1727, 0.5489, 0.1878]}, {"w": "some", "b": [0.5559, 0.1727, 0.5968, 0.1878]}, {"w": "business", "b": [0.6039, 0.1727, 0.6711, 0.1878]}, {"w": "contexts,", "b": [0.6782, 0.1727, 0.7515, 0.1878]}, {"w": "you", "b": [0.7588, 0.1727, 0.7881, 0.1878]}, {"w": "might", "b": [0.7951, 0.1727, 0.8427, 0.1878]}, {"w": "be", "b": [0.8498, 0.1727, 0.8691, 0.1878]}, {"w": "allowed", "b": [0.1312, 0.1907, 0.1911, 0.2057]}, {"w": "to", "b": [0.1973, 0.1907, 0.2138, 0.2057]}, {"w": "store", "b": [0.22, 0.1907, 0.2594, 0.2057]}, {"w": "some", "b": [0.2655, 0.1907, 0.3059, 0.2057]}, {"w": "data", "b": [0.312, 0.1907, 0.3482, 0.2057]}, {"w": "for", "b": [0.3543, 0.1907, 0.3766, 0.2057]}, {"w": "a", "b": [0.3827, 0.1907, 0.392, 0.2057]}, {"w": "specific", "b": [0.3982, 0.1907, 0.4567, 0.2057]}, {"w": "time,", "b": [0.4628, 0.1907, 0.5041, 0.2057]}, {"w": "and", "b": [0.5103, 0.1907, 0.5402, 0.2057]}, {"w": "then", "b": [0.5464, 0.1907, 0.5825, 0.2057]}, {"w": "you", "b": [0.5887, 0.1907, 0.6176, 0.2057]}, {"w": "might", "b": [0.6238, 0.1907, 0.6708, 0.2057]}, {"w": "have", "b": [0.6769, 0.1907, 0.7136, 0.2057]}, {"w": "to", "b": [0.7197, 0.1907, 0.7362, 0.2057]}, {"w": "erase", "b": [0.7424, 0.1907, 0.7829, 0.2057]}, {"w": "it.", "b": [0.789, 0.1907, 0.8066, 0.2057]}, {"w": "If", "b": [0.8148, 0.1907, 0.8272, 0.2057]}, {"w": "such", "b": [0.8333, 0.1907, 0.8691, 0.2057]}, {"w": "restrictions", "b": [0.1312, 0.2087, 0.2206, 0.2237]}, {"w": "apply", "b": [0.2268, 0.2087, 0.2713, 0.2237]}, {"w": "to", "b": [0.2774, 0.2087, 0.2938, 0.2237]}, {"w": "the", "b": [0.3, 0.2087, 0.3256, 0.2237]}, {"w": "data", "b": [0.3317, 0.2087, 0.3675, 0.2237]}, {"w": "you", "b": [0.3737, 0.2087, 0.4024, 0.2237]}, {"w": "work", "b": [0.4085, 0.2087, 0.4474, 0.2237]}, {"w": "with,", "b": [0.4536, 0.2087, 0.4945, 0.2237]}, {"w": "you", "b": [0.5007, 0.2087, 0.5294, 0.2237]}, {"w": "have", "b": [0.5355, 0.2087, 0.5719, 0.2237]}, {"w": "to", "b": [0.578, 0.2087, 0.5944, 0.2237]}, {"w": "make", "b": [0.6006, 0.2087, 0.6425, 0.2237]}, {"w": "sure", "b": [0.6487, 0.2087, 0.6816, 0.2237]}, {"w": "that", "b": [0.6877, 0.2087, 0.7215, 0.2237]}, {"w": "a", "b": [0.7277, 0.2087, 0.7369, 0.2237]}, {"w": "reliable", "b": [0.7431, 0.2087, 0.8014, 0.2237]}, {"w": "alerting", "b": [0.8076, 0.2087, 0.8691, 0.2237]}, {"w": "system", "b": [0.1312, 0.2266, 0.1867, 0.2416]}, {"w": "is", "b": [0.1928, 0.2266, 0.2053, 0.2416]}, {"w": "in", "b": [0.2115, 0.2266, 0.227, 0.2416]}, {"w": "place.", "b": [0.2332, 0.2266, 0.2796, 0.2416]}, {"w": "That", "b": [0.2878, 0.2266, 0.3281, 0.2416]}, {"w": "alerting", "b": [0.3343, 0.2266, 0.3963, 0.2416]}, {"w": "system", "b": [0.4024, 0.2266, 0.4579, 0.2416]}, {"w": "has", "b": [0.464, 0.2266, 0.491, 0.2416]}, {"w": "to", "b": [0.4972, 0.2266, 0.5137, 0.2416]}, {"w": "contact", "b": [0.5198, 0.2266, 0.5792, 0.2416]}, {"w": "the", "b": [0.5854, 0.2266, 0.6112, 0.2416]}, {"w": "person", "b": [0.6173, 0.2266, 0.6707, 0.2416]}, {"w": "responsible", "b": [0.6768, 0.2266, 0.7664, 0.2416]}, {"w": "for", "b": [0.7726, 0.2266, 0.7949, 0.2416]}, {"w": "the", "b": [0.801, 0.2266, 0.8268, 0.2416]}, {"w": "data", "b": [0.833, 0.2266, 0.8691, 0.2416]}, {"w": "erasure", "b": [0.1312, 0.2445, 0.1899, 0.2596]}, {"w": "and", "b": [0.196, 0.2445, 0.2263, 0.2596]}, {"w": "have", "b": [0.2324, 0.2445, 0.2695, 0.2596]}, {"w": "a", "b": [0.2757, 0.2445, 0.2851, 0.2596]}, {"w": "backup", "b": [0.2912, 0.2445, 0.3497, 0.2596]}, {"w": "plan", "b": [0.3558, 0.2445, 0.3913, 0.2596]}, {"w": "in", "b": [0.3974, 0.2445, 0.4131, 0.2596]}, {"w": "case", "b": [0.4192, 0.2445, 0.4527, 0.2596]}, {"w": "that", "b": [0.4589, 0.2445, 0.4933, 0.2596]}, {"w": "person", "b": [0.4994, 0.2445, 0.5533, 0.2596]}, {"w": "is", "b": [0.5595, 0.2445, 0.5721, 0.2596]}, {"w": "not", "b": [0.5782, 0.2445, 0.6054, 0.2596]}, {"w": "available.", "b": [0.6115, 0.2445, 0.6877, 0.2596]}, {"w": "Don’t", "b": [0.6959, 0.2445, 0.7426, 0.2596]}, {"w": "forget", "b": [0.7488, 0.2445, 0.7963, 0.2596]}, {"w": "that", "b": [0.8024, 0.2445, 0.8369, 0.2596]}, {"w": "the", "b": [0.843, 0.2445, 0.8691, 0.2596]}, {"w": "consequences", "b": [0.1312, 0.2626, 0.2366, 0.2775]}, {"w": "for", "b": [0.2427, 0.2626, 0.2648, 0.2775]}, {"w": "not", "b": [0.271, 0.2626, 0.2976, 0.2775]}, {"w": "erasing", "b": [0.3038, 0.2626, 0.3604, 0.2775]}, {"w": "data", "b": [0.3665, 0.2626, 0.4024, 0.2775]}, {"w": "can", "b": [0.4085, 0.2626, 0.4362, 0.2775]}, {"w": "sometimes", "b": [0.4424, 0.2626, 0.5256, 0.2775]}, {"w": "be", "b": [0.5318, 0.2626, 0.5508, 0.2775]}, {"w": "very", "b": [0.5569, 0.2626, 0.5913, 0.2775]}, {"w": "serious", "b": [0.5975, 0.2626, 0.6521, 0.2775]}, {"w": "for", "b": [0.6583, 0.2626, 0.6804, 0.2775]}, {"w": "the", "b": [0.6865, 0.2626, 0.7121, 0.2775]}, {"w": "organization.", "b": [0.7183, 0.2626, 0.8229, 0.2775]}]}, {"id": "b_3", "type": "paragraph", "text": "For every sensitive data asset, a data lifecycle document has to describe the asset, the circle of persons who have access to that data asset, both during and after the project development. The document has to describe how long the data asset will be stored and whether it has to be explicitly destroyed.", "words": [{"w": "For", "b": [0.1312, 0.2894, 0.1588, 0.3045]}, {"w": "every", "b": [0.1652, 0.2894, 0.2087, 0.3045]}, {"w": "sensitive", "b": [0.2152, 0.2894, 0.2845, 0.3045]}, {"w": "data", "b": [0.2909, 0.2894, 0.3275, 0.3045]}, {"w": "asset,", "b": [0.334, 0.2894, 0.3792, 0.3045]}, {"w": "a", "b": [0.3857, 0.2894, 0.3951, 0.3045]}, {"w": "data", "b": [0.4017, 0.2895, 0.4423, 0.3044]}, {"w": "lifecycle", "b": [0.4498, 0.2895, 0.5234, 0.3044]}, {"w": "document", "b": [0.5309, 0.2895, 0.6219, 0.3044]}, {"w": "has", "b": [0.6284, 0.2894, 0.6557, 0.3045]}, {"w": "to", "b": [0.6621, 0.2894, 0.6789, 0.3045]}, {"w": "describe", "b": [0.6853, 0.2894, 0.7519, 0.3045]}, {"w": "the", "b": [0.7584, 0.2894, 0.7846, 0.3045]}, {"w": "asset,", "b": [0.791, 0.2894, 0.8362, 0.3045]}, {"w": "the", "b": [0.8428, 0.2894, 0.8689, 0.3045]}, {"w": "circle", "b": [0.1312, 0.3073, 0.1742, 0.3224]}, {"w": "of", "b": [0.1823, 0.3073, 0.1975, 0.3224]}, {"w": "persons", "b": [0.2055, 0.3073, 0.267, 0.3224]}, {"w": "who", "b": [0.2751, 0.3073, 0.3086, 0.3224]}, {"w": "have", "b": [0.3166, 0.3073, 0.3538, 0.3224]}, {"w": "access", "b": [0.3619, 0.3073, 0.4113, 0.3224]}, {"w": "to", "b": [0.4194, 0.3073, 0.4361, 0.3224]}, {"w": "that", "b": [0.4442, 0.3073, 0.4787, 0.3224]}, {"w": "data", "b": [0.4868, 0.3073, 0.5234, 0.3224]}, {"w": "asset,", "b": [0.5315, 0.3073, 0.5767, 0.3224]}, {"w": "both", "b": [0.5853, 0.3073, 0.6235, 0.3224]}, {"w": "during", "b": [0.6316, 0.3073, 0.685, 0.3224]}, {"w": "and", "b": [0.6931, 0.3073, 0.7234, 0.3224]}, {"w": "after", "b": [0.7315, 0.3073, 0.7697, 0.3224]}, {"w": "the", "b": [0.7778, 0.3073, 0.804, 0.3224]}, {"w": "project", "b": [0.8121, 0.3073, 0.8696, 0.3224]}, {"w": "development.", "b": [0.1312, 0.3253, 0.2395, 0.3404]}, {"w": "The", "b": [0.2512, 0.3253, 0.2836, 0.3404]}, {"w": "document", "b": [0.2909, 0.3253, 0.3714, 0.3404]}, {"w": "has", "b": [0.3787, 0.3253, 0.406, 0.3404]}, {"w": "to", "b": [0.4133, 0.3253, 0.43, 0.3404]}, {"w": "describe", "b": [0.4373, 0.3253, 0.5039, 0.3404]}, {"w": "how", "b": [0.5112, 0.3253, 0.5442, 0.3404]}, {"w": "long", "b": [0.5515, 0.3253, 0.586, 0.3404]}, {"w": "the", "b": [0.5933, 0.3253, 0.6194, 0.3404]}, {"w": "data", "b": [0.6267, 0.3253, 0.6633, 0.3404]}, {"w": "asset", "b": [0.6706, 0.3253, 0.7106, 0.3404]}, {"w": "will", "b": [0.7179, 0.3253, 0.7472, 0.3404]}, {"w": "be", "b": [0.7545, 0.3253, 0.7738, 0.3404]}, {"w": "stored", "b": [0.7811, 0.3253, 0.8315, 0.3404]}, {"w": "and", "b": [0.8388, 0.3253, 0.8691, 0.3404]}, {"w": "whether", "b": [0.1306, 0.3433, 0.1952, 0.3583]}, {"w": "it", "b": [0.2014, 0.3433, 0.2137, 0.3583]}, {"w": "has", "b": [0.2198, 0.3433, 0.2466, 0.3583]}, {"w": "to", "b": [0.2528, 0.3433, 0.2692, 0.3583]}, {"w": "be", "b": [0.2753, 0.3433, 0.2943, 0.3583]}, {"w": "explicitly", "b": [0.3004, 0.3433, 0.3743, 0.3583]}, {"w": "destroyed.", "b": [0.3804, 0.3433, 0.4621, 0.3583]}]}, {"id": "b_4", "type": "paragraph", "text": "3.12 Data Manipulation Best Practices", "words": [{"w": "3.12", "b": [0.1312, 0.3918, 0.1756, 0.4098]}, {"w": "Data", "b": [0.2005, 0.3918, 0.2535, 0.4098]}, {"w": "Manipulation", "b": [0.2618, 0.3918, 0.4079, 0.4098]}, {"w": "Best", "b": [0.4162, 0.3918, 0.4648, 0.4098]}, {"w": "Practices", "b": [0.4731, 0.3918, 0.5724, 0.4098]}]}, {"id": "b_5", "type": "paragraph", "text": "To conclude this chapter, we consider two remaining best practices: reproducibility and “data first, algorithm second.”", "words": [{"w": "To", "b": [0.1306, 0.4309, 0.1511, 0.4457]}, {"w": "conclude", "b": [0.1566, 0.4309, 0.225, 0.4457]}, {"w": "this", "b": [0.2305, 0.4309, 0.2598, 0.4457]}, {"w": "chapter,", "b": [0.2652, 0.4309, 0.3291, 0.4457]}, {"w": "we", "b": [0.3348, 0.4309, 0.3553, 0.4457]}, {"w": "consider", "b": [0.3609, 0.4309, 0.4253, 0.4457]}, {"w": "two", "b": [0.4308, 0.4309, 0.4589, 0.4457]}, {"w": "remaining", "b": [0.4645, 0.4309, 0.5429, 0.4457]}, {"w": "best", "b": [0.5484, 0.4309, 0.5812, 0.4457]}, {"w": "practices:", "b": [0.5867, 0.4309, 0.6612, 0.4457]}, {"w": "reproducibility", "b": [0.6691, 0.4309, 0.7853, 0.4457]}, {"w": "and", "b": [0.7908, 0.4309, 0.82, 0.4457]}, {"w": "“data", "b": [0.8254, 0.4309, 0.8691, 0.4457]}, {"w": "first,", "b": [0.1312, 0.4487, 0.1683, 0.4636]}, {"w": "algorithm", "b": [0.1745, 0.4487, 0.2524, 0.4636]}, {"w": "second.”", "b": [0.2586, 0.4487, 0.3233, 0.4636]}]}, {"id": "b_6", "type": "paragraph", "text": "3.12.1 Reproducibility", "words": [{"w": "3.12.1", "b": [0.1312, 0.4965, 0.1855, 0.5115]}, {"w": "Reproducibility", "b": [0.2067, 0.4965, 0.3513, 0.5115]}]}, {"id": "b_7", "type": "paragraph", "text": "Reproducibility should be an important concern in everything you do, including data collection and preparation. You should avoid transforming data manually, or using powerful tools included in text editors or command line shells, such as regular expressions, “quick and dirty” ad hoc awk or sed commands, and piped expressions.", "words": [{"w": "Reproducibility", "b": [0.1312, 0.5331, 0.2759, 0.5481]}, {"w": "should", "b": [0.2837, 0.533, 0.3371, 0.5481]}, {"w": "be", "b": [0.345, 0.533, 0.3643, 0.5481]}, {"w": "an", "b": [0.3722, 0.533, 0.392, 0.5481]}, {"w": "important", "b": [0.3999, 0.533, 0.4825, 0.5481]}, {"w": "concern", "b": [0.4904, 0.533, 0.5532, 0.5481]}, {"w": "in", "b": [0.561, 0.533, 0.5767, 0.5481]}, {"w": "everything", "b": [0.5846, 0.533, 0.6709, 0.5481]}, {"w": "you", "b": [0.6788, 0.533, 0.7081, 0.5481]}, {"w": "do,", "b": [0.7159, 0.533, 0.741, 0.5481]}, {"w": "including", "b": [0.7493, 0.533, 0.8246, 0.5481]}, {"w": "data", "b": [0.8325, 0.533, 0.8691, 0.5481]}, {"w": "collection", "b": [0.1312, 0.5511, 0.2064, 0.566]}, {"w": "and", "b": [0.2125, 0.5511, 0.242, 0.566]}, {"w": "preparation.", "b": [0.2481, 0.5511, 0.3457, 0.566]}, {"w": "You", "b": [0.3539, 0.5511, 0.3854, 0.566]}, {"w": "should", "b": [0.3915, 0.5511, 0.4434, 0.566]}, {"w": "avoid", "b": [0.4496, 0.5511, 0.4917, 0.566]}, {"w": "transforming", "b": [0.4978, 0.5511, 0.6001, 0.566]}, {"w": "data", "b": [0.6062, 0.5511, 0.6418, 0.566]}, {"w": "manually,", "b": [0.6479, 0.5511, 0.7245, 0.566]}, {"w": "or", "b": [0.7307, 0.5511, 0.747, 0.566]}, {"w": "using", "b": [0.7531, 0.5511, 0.7948, 0.566]}, {"w": "powerful", "b": [0.801, 0.5511, 0.8691, 0.566]}, {"w": "tools", "b": [0.1312, 0.5691, 0.1691, 0.5839]}, {"w": "included", "b": [0.1752, 0.5691, 0.2416, 0.5839]}, {"w": "in", "b": [0.2477, 0.5691, 0.2628, 0.5839]}, {"w": "text", "b": [0.269, 0.5691, 0.3007, 0.5839]}, {"w": "editors", "b": [0.3068, 0.5691, 0.3603, 0.5839]}, {"w": "or", "b": [0.3664, 0.5691, 0.3825, 0.5839]}, {"w": "command", "b": [0.3887, 0.5691, 0.4651, 0.5839]}, {"w": "line", "b": [0.4712, 0.5691, 0.4994, 0.5839]}, {"w": "shells,", "b": [0.5055, 0.5691, 0.553, 0.5839]}, {"w": "such", "b": [0.5592, 0.5691, 0.594, 0.5839]}, {"w": "as", "b": [0.6001, 0.5691, 0.6163, 0.5839]}, {"w": "regular", "b": [0.6225, 0.5691, 0.6779, 0.5839]}, {"w": "expressions,", "b": [0.684, 0.5691, 0.7774, 0.5839]}, {"w": "“quick", "b": [0.7836, 0.5691, 0.8339, 0.5839]}, {"w": "and", "b": [0.84, 0.5691, 0.8692, 0.5839]}, {"w": "dirty”", "b": [0.1312, 0.5869, 0.179, 0.6019]}, {"w": "ad", "b": [0.1851, 0.5869, 0.2046, 0.6019]}, {"w": "hoc", "b": [0.2107, 0.5869, 0.2389, 0.6019]}, {"w": "awk", "b": [0.2451, 0.5869, 0.2769, 0.6019]}, {"w": "or", "b": [0.283, 0.5869, 0.2995, 0.6019]}, {"w": "sed", "b": [0.3056, 0.5869, 0.3314, 0.6019]}, {"w": "commands,", "b": [0.3375, 0.5869, 0.4279, 0.6019]}, {"w": "and", "b": [0.434, 0.5869, 0.4637, 0.6019]}, {"w": "piped", "b": [0.4699, 0.5869, 0.5145, 0.6019]}, {"w": "expressions.", "b": [0.5207, 0.5869, 0.6159, 0.6019]}]}, {"id": "b_8", "type": "paragraph", "text": "Usually, the data collection and transformation activities consist of multiple stages. These include downloading data from web APIs or databases, replacing multiword expressions by unique tokens, removing stop-words and noise, cropping and unblurring images, imputation of missing values, and so on. Each step in this multistage process has to be implemented as a software script, such as Python or R script with their inputs and outputs. If you are organized like that in your work, it will allow you to keep track of all changes in the data. If during any stage something wrong happens to the data, you can always fix the script and run the entire data processing pipeline from scratch.", "words": [{"w": "Usually,", "b": [0.1312, 0.6138, 0.1963, 0.6288]}, {"w": "the", "b": [0.2024, 0.6138, 0.2284, 0.6288]}, {"w": "data", "b": [0.2345, 0.6138, 0.2709, 0.6288]}, {"w": "collection", "b": [0.277, 0.6138, 0.3539, 0.6288]}, {"w": "and", "b": [0.36, 0.6138, 0.3901, 0.6288]}, {"w": "transformation", "b": [0.3963, 0.6138, 0.5175, 0.6288]}, {"w": "activities", "b": [0.5236, 0.6138, 0.5969, 0.6288]}, {"w": "consist", "b": [0.6031, 0.6138, 0.6584, 0.6288]}, {"w": "of", "b": [0.6645, 0.6138, 0.6796, 0.6288]}, {"w": "multiple", "b": [0.6857, 0.6138, 0.7527, 0.6288]}, {"w": "stages.", "b": [0.7588, 0.6138, 0.813, 0.6288]}, {"w": "These", "b": [0.8212, 0.6138, 0.8691, 0.6288]}, {"w": "include", "b": [0.1312, 0.6318, 0.189, 0.6468]}, {"w": "downloading", "b": [0.1951, 0.6318, 0.2966, 0.6468]}, {"w": "data", "b": [0.3027, 0.6318, 0.3388, 0.6468]}, {"w": "from", "b": [0.3449, 0.6318, 0.3826, 0.6468]}, {"w": "web", "b": [0.3887, 0.6318, 0.4202, 0.6468]}, {"w": "APIs", "b": [0.4263, 0.6318, 0.4669, 0.6468]}, {"w": "or", "b": [0.473, 0.6318, 0.4895, 0.6468]}, {"w": "databases,", "b": [0.4957, 0.6318, 0.5794, 0.6468]}, {"w": "replacing", "b": [0.5855, 0.6318, 0.6587, 0.6468]}, {"w": "multiword", "b": [0.6649, 0.6318, 0.7473, 0.6468]}, {"w": "expressions", "b": [0.7535, 0.6318, 0.8441, 0.6468]}, {"w": "by", "b": [0.8502, 0.6318, 0.8698, 0.6468]}, {"w": "unique", "b": [0.1312, 0.6498, 0.1849, 0.6647]}, {"w": "tokens,", "b": [0.191, 0.6498, 0.2473, 0.6647]}, {"w": "removing", "b": [0.2534, 0.6498, 0.327, 0.6647]}, {"w": "stop-words", "b": [0.3332, 0.6498, 0.4197, 0.6647]}, {"w": "and", "b": [0.4259, 0.6498, 0.4555, 0.6647]}, {"w": "noise,", "b": [0.4616, 0.6498, 0.5067, 0.6647]}, {"w": "cropping", "b": [0.5128, 0.6498, 0.5823, 0.6647]}, {"w": "and", "b": [0.5885, 0.6498, 0.6181, 0.6647]}, {"w": "unblurring", "b": [0.6242, 0.6498, 0.7086, 0.6647]}, {"w": "images,", "b": [0.7148, 0.6498, 0.7741, 0.6647]}, {"w": "imputation", "b": [0.7803, 0.6498, 0.8691, 0.6647]}, {"w": "of", "b": [0.1312, 0.6676, 0.1464, 0.6827]}, {"w": "missing", "b": [0.1529, 0.6676, 0.2138, 0.6827]}, {"w": "values,", "b": [0.2204, 0.6676, 0.2754, 0.6827]}, {"w": "and", "b": [0.282, 0.6676, 0.3124, 0.6827]}, {"w": "so", "b": [0.3189, 0.6676, 0.3358, 0.6827]}, {"w": "on.", "b": [0.3423, 0.6676, 0.3674, 0.6827]}, {"w": "Each", "b": [0.3768, 0.6676, 0.4173, 0.6827]}, {"w": "step", "b": [0.4239, 0.6676, 0.4574, 0.6827]}, {"w": "in", "b": [0.464, 0.6676, 0.4797, 0.6827]}, {"w": "this", "b": [0.4862, 0.6676, 0.5167, 0.6827]}, {"w": "multistage", "b": [0.5232, 0.6676, 0.6086, 0.6827]}, {"w": "process", "b": [0.6151, 0.6676, 0.6745, 0.6827]}, {"w": "has", "b": [0.681, 0.6676, 0.7083, 0.6827]}, {"w": "to", "b": [0.7148, 0.6676, 0.7316, 0.6827]}, {"w": "be", "b": [0.7381, 0.6676, 0.7575, 0.6827]}, {"w": "implemented", "b": [0.764, 0.6676, 0.8691, 0.6827]}, {"w": "as", "b": [0.1312, 0.6855, 0.1481, 0.7006]}, {"w": "a", "b": [0.1544, 0.6855, 0.1638, 0.7006]}, {"w": "software", "b": [0.1701, 0.6855, 0.2378, 0.7006]}, {"w": "script,", "b": [0.2441, 0.6855, 0.2956, 0.7006]}, {"w": "such", "b": [0.3019, 0.6855, 0.3381, 0.7006]}, {"w": "as", "b": [0.3445, 0.6855, 0.3613, 0.7006]}, {"w": "Python", "b": [0.3676, 0.6855, 0.4281, 0.7006]}, {"w": "or", "b": [0.4344, 0.6855, 0.4512, 0.7006]}, {"w": "R", "b": [0.4575, 0.6855, 0.4714, 0.7006]}, {"w": "script", "b": [0.4777, 0.6855, 0.5239, 0.7006]}, {"w": "with", "b": [0.5302, 0.6855, 0.5668, 0.7006]}, {"w": "their", "b": [0.5731, 0.6855, 0.6119, 0.7006]}, {"w": "inputs", "b": [0.6182, 0.6855, 0.6696, 0.7006]}, {"w": "and", "b": [0.6759, 0.6855, 0.7063, 0.7006]}, {"w": "outputs.", "b": [0.7126, 0.6855, 0.7807, 0.7006]}, {"w": "If", "b": [0.7895, 0.6855, 0.802, 0.7006]}, {"w": "you", "b": [0.8083, 0.6855, 0.8376, 0.7006]}, {"w": "are", "b": [0.844, 0.6855, 0.8691, 0.7006]}, {"w": "organized", "b": [0.1312, 0.7037, 0.2069, 0.7185]}, {"w": "like", "b": [0.2131, 0.7037, 0.2403, 0.7185]}, {"w": "that", "b": [0.2464, 0.7037, 0.2797, 0.7185]}, {"w": "in", "b": [0.2859, 0.7037, 0.301, 0.7185]}, {"w": "your", "b": [0.3071, 0.7037, 0.3425, 0.7185]}, {"w": "work,", "b": [0.3486, 0.7037, 0.392, 0.7185]}, {"w": "it", "b": [0.3982, 0.7037, 0.4103, 0.7185]}, {"w": "will", "b": [0.4164, 0.7037, 0.4447, 0.7185]}, {"w": "allow", "b": [0.4508, 0.7037, 0.4916, 0.7185]}, {"w": "you", "b": [0.4978, 0.7037, 0.526, 0.7185]}, {"w": "to", "b": [0.5321, 0.7037, 0.5483, 0.7185]}, {"w": "keep", "b": [0.5544, 0.7037, 0.5897, 0.7185]}, {"w": "track", "b": [0.5959, 0.7037, 0.6362, 0.7185]}, {"w": "of", "b": [0.6424, 0.7037, 0.657, 0.7185]}, {"w": "all", "b": [0.6632, 0.7037, 0.6823, 0.7185]}, {"w": "changes", "b": [0.6885, 0.7037, 0.7496, 0.7185]}, {"w": "in", "b": [0.7558, 0.7037, 0.7709, 0.7185]}, {"w": "the", "b": [0.777, 0.7037, 0.8023, 0.7185]}, {"w": "data.", "b": [0.8084, 0.7037, 0.8487, 0.7185]}, {"w": "If", "b": [0.857, 0.7037, 0.8691, 0.7185]}, {"w": "during", "b": [0.1312, 0.7214, 0.1846, 0.7365]}, {"w": "any", "b": [0.1908, 0.7214, 0.2201, 0.7365]}, {"w": "stage", "b": [0.2262, 0.7214, 0.2682, 0.7365]}, {"w": "something", "b": [0.2743, 0.7214, 0.3581, 0.7365]}, {"w": "wrong", "b": [0.3643, 0.7214, 0.4145, 0.7365]}, {"w": "happens", "b": [0.4207, 0.7214, 0.4882, 0.7365]}, {"w": "to", "b": [0.4944, 0.7214, 0.5111, 0.7365]}, {"w": "the", "b": [0.5173, 0.7214, 0.5434, 0.7365]}, {"w": "data,", "b": [0.5496, 0.7214, 0.5914, 0.7365]}, {"w": "you", "b": [0.5976, 0.7214, 0.6268, 0.7365]}, {"w": "can", "b": [0.633, 0.7214, 0.6612, 0.7365]}, {"w": "always", "b": [0.6674, 0.7214, 0.7214, 0.7365]}, {"w": "fix", "b": [0.7275, 0.7214, 0.7479, 0.7365]}, {"w": "the", "b": [0.7541, 0.7214, 0.7803, 0.7365]}, {"w": "script", "b": [0.7864, 0.7214, 0.8326, 0.7365]}, {"w": "and", "b": [0.8387, 0.7214, 0.8691, 0.7365]}, {"w": "run", "b": [0.1312, 0.7395, 0.159, 0.7545]}, {"w": "the", "b": [0.1651, 0.7395, 0.1908, 0.7545]}, {"w": "entire", "b": [0.1969, 0.7395, 0.2426, 0.7545]}, {"w": "data", "b": [0.2488, 0.7395, 0.2847, 0.7545]}, {"w": "processing", "b": [0.2908, 0.7395, 0.3736, 0.7545]}, {"w": "pipeline", "b": [0.3798, 0.7395, 0.4429, 0.7545]}, {"w": "from", "b": [0.449, 0.7395, 0.4865, 0.7545]}, {"w": "scratch.", "b": [0.4926, 0.7395, 0.5548, 0.7545]}]}, {"id": "b_9", "type": "paragraph", "text": "On the other hand, manual interventions can be hard to reproduce. These are difficult to apply to updated data, or scale for much more data (once you can afford getting more data or a different dataset).", "words": [{"w": "On", "b": [0.1312, 0.7663, 0.1563, 0.7814]}, {"w": "the", "b": [0.1626, 0.7663, 0.1888, 0.7814]}, {"w": "other", "b": [0.1951, 0.7663, 0.238, 0.7814]}, {"w": "hand,", "b": [0.2443, 0.7663, 0.2903, 0.7814]}, {"w": "manual", "b": [0.2966, 0.7663, 0.3568, 0.7814]}, {"w": "interventions", "b": [0.3631, 0.7663, 0.4689, 0.7814]}, {"w": "can", "b": [0.4752, 0.7663, 0.5034, 0.7814]}, {"w": "be", "b": [0.5097, 0.7663, 0.5291, 0.7814]}, {"w": "hard", "b": [0.5354, 0.7663, 0.5731, 0.7814]}, {"w": "to", "b": [0.5794, 0.7663, 0.5961, 0.7814]}, {"w": "reproduce.", "b": [0.6024, 0.7663, 0.6888, 0.7814]}, {"w": "These", "b": [0.6974, 0.7663, 0.7456, 0.7814]}, {"w": "are", "b": [0.7519, 0.7663, 0.7771, 0.7814]}, {"w": "difficult", "b": [0.7834, 0.7663, 0.8461, 0.7814]}, {"w": "to", "b": [0.8524, 0.7663, 0.8691, 0.7814]}, {"w": "apply", "b": [0.1312, 0.7844, 0.1757, 0.7993]}, {"w": "to", "b": [0.1818, 0.7844, 0.1981, 0.7993]}, {"w": "updated", "b": [0.2043, 0.7844, 0.2702, 0.7993]}, {"w": "data,", "b": [0.2763, 0.7844, 0.3171, 0.7993]}, {"w": "or", "b": [0.3233, 0.7844, 0.3397, 0.7993]}, {"w": "scale", "b": [0.3458, 0.7844, 0.3837, 0.7993]}, {"w": "for", "b": [0.3898, 0.7844, 0.4118, 0.7993]}, {"w": "much", "b": [0.418, 0.7844, 0.4609, 0.7993]}, {"w": "more", "b": [0.467, 0.7844, 0.5069, 0.7993]}, {"w": "data", "b": [0.513, 0.7844, 0.5487, 0.7993]}, {"w": "(once", "b": [0.5549, 0.7844, 0.5978, 0.7993]}, {"w": "you", "b": [0.6039, 0.7844, 0.6325, 0.7993]}, {"w": "can", "b": [0.6386, 0.7844, 0.6662, 0.7993]}, {"w": "afford", "b": [0.6724, 0.7844, 0.7189, 0.7993]}, {"w": "getting", "b": [0.725, 0.7844, 0.7812, 0.7993]}, {"w": "more", "b": [0.7873, 0.7844, 0.8272, 0.7993]}, {"w": "data", "b": [0.8333, 0.7844, 0.869, 0.7993]}, {"w": "or", "b": [0.1312, 0.8023, 0.1477, 0.8173]}, {"w": "a", "b": [0.1538, 0.8023, 0.1631, 0.8173]}, {"w": "different", "b": [0.1692, 0.8023, 0.2359, 0.8173]}, {"w": "dataset).", "b": [0.2421, 0.8023, 0.3129, 0.8173]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 44", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "44", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 88, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3.12.2 Data First, Algorithm Second", "words": [{"w": "3.12.2", "b": [0.1312, 0.0884, 0.1855, 0.1034]}, {"w": "Data", "b": [0.2067, 0.0884, 0.2518, 0.1034]}, {"w": "First,", "b": [0.2589, 0.0884, 0.3094, 0.1034]}, {"w": "Algorithm", "b": [0.3165, 0.0884, 0.412, 0.1034]}, {"w": "Second", "b": [0.4191, 0.0884, 0.4842, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "Remember that in the industry, contrary to academia, “data first, algorithm second,” so focus most of your effort and time on getting more data of wide variety and high quality, instead of trying to squeeze the maximum out of a learning algorithm.", "words": [{"w": "Remember", "b": [0.1312, 0.1249, 0.2194, 0.14]}, {"w": "that", "b": [0.2264, 0.1249, 0.2609, 0.14]}, {"w": "in", "b": [0.2679, 0.1249, 0.2836, 0.14]}, {"w": "the", "b": [0.2907, 0.1249, 0.3168, 0.14]}, {"w": "industry,", "b": [0.3239, 0.1249, 0.3962, 0.14]}, {"w": "contrary", "b": [0.4035, 0.1249, 0.4726, 0.14]}, {"w": "to", "b": [0.4797, 0.1249, 0.4964, 0.14]}, {"w": "academia,", "b": [0.5034, 0.1249, 0.585, 0.14]}, {"w": "“data", "b": [0.5922, 0.1249, 0.6377, 0.14]}, {"w": "first,", "b": [0.6447, 0.1249, 0.6826, 0.14]}, {"w": "algorithm", "b": [0.6898, 0.1249, 0.7693, 0.14]}, {"w": "second,”", "b": [0.7763, 0.1249, 0.845, 0.14]}, {"w": "so", "b": [0.8522, 0.1249, 0.8691, 0.14]}, {"w": "focus", "b": [0.1312, 0.1428, 0.1732, 0.1579]}, {"w": "most", "b": [0.1798, 0.1428, 0.2196, 0.1579]}, {"w": "of", "b": [0.2263, 0.1428, 0.2414, 0.1579]}, {"w": "your", "b": [0.2481, 0.1428, 0.2847, 0.1579]}, {"w": "effort", "b": [0.2914, 0.1428, 0.3348, 0.1579]}, {"w": "and", "b": [0.3415, 0.1428, 0.3718, 0.1579]}, {"w": "time", "b": [0.3784, 0.1428, 0.415, 0.1579]}, {"w": "on", "b": [0.4216, 0.1428, 0.4415, 0.1579]}, {"w": "getting", "b": [0.4481, 0.1428, 0.5057, 0.1579]}, {"w": "more", "b": [0.5123, 0.1428, 0.5531, 0.1579]}, {"w": "data", "b": [0.5598, 0.1428, 0.5964, 0.1579]}, {"w": "of", "b": [0.603, 0.1428, 0.6182, 0.1579]}, {"w": "wide", "b": [0.6248, 0.1428, 0.6624, 0.1579]}, {"w": "variety", "b": [0.6691, 0.1428, 0.7251, 0.1579]}, {"w": "and", "b": [0.7317, 0.1428, 0.7621, 0.1579]}, {"w": "high", "b": [0.7687, 0.1428, 0.8043, 0.1579]}, {"w": "quality,", "b": [0.8109, 0.1428, 0.8716, 0.1579]}, {"w": "instead", "b": [0.1312, 0.1609, 0.1888, 0.1758]}, {"w": "of", "b": [0.1949, 0.1609, 0.2098, 0.1758]}, {"w": "trying", "b": [0.2159, 0.1609, 0.2647, 0.1758]}, {"w": "to", "b": [0.2709, 0.1609, 0.2873, 0.1758]}, {"w": "squeeze", "b": [0.2934, 0.1609, 0.3535, 0.1758]}, {"w": "the", "b": [0.3597, 0.1609, 0.3853, 0.1758]}, {"w": "maximum", "b": [0.3915, 0.1609, 0.4714, 0.1758]}, {"w": "out", "b": [0.4776, 0.1609, 0.5042, 0.1758]}, {"w": "of", "b": [0.5104, 0.1609, 0.5252, 0.1758]}, {"w": "a", "b": [0.5314, 0.1609, 0.5406, 0.1758]}, {"w": "learning", "b": [0.5468, 0.1609, 0.6114, 0.1758]}, {"w": "algorithm.", "b": [0.6176, 0.1609, 0.7007, 0.1758]}]}, {"id": "b_2", "type": "paragraph", "text": "Data augmentation, when implemented well, will most likely contribute more to the quality of the model than the search for the best hyperparameter values or model architecture.", "words": [{"w": "Data", "b": [0.1312, 0.1878, 0.1764, 0.2028]}, {"w": "augmentation,", "b": [0.182, 0.1878, 0.3134, 0.2028]}, {"w": "when", "b": [0.3186, 0.1879, 0.3598, 0.2027]}, {"w": "implemented", "b": [0.3646, 0.1879, 0.4656, 0.2027]}, {"w": "well,", "b": [0.4705, 0.1879, 0.5062, 0.2027]}, {"w": "will", "b": [0.5113, 0.1879, 0.5394, 0.2027]}, {"w": "most", "b": [0.5443, 0.1879, 0.5826, 0.2027]}, {"w": "likely", "b": [0.5875, 0.1879, 0.6291, 0.2027]}, {"w": "contribute", "b": [0.634, 0.1879, 0.715, 0.2027]}, {"w": "more", "b": [0.7199, 0.1879, 0.7591, 0.2027]}, {"w": "to", "b": [0.764, 0.1879, 0.78, 0.2027]}, {"w": "the", "b": [0.7849, 0.1879, 0.81, 0.2027]}, {"w": "quality", "b": [0.8149, 0.1879, 0.8697, 0.2027]}, {"w": "of", "b": [0.1312, 0.2057, 0.1461, 0.2207]}, {"w": "the", "b": [0.1522, 0.2057, 0.1779, 0.2207]}, {"w": "model", "b": [0.1841, 0.2057, 0.2327, 0.2207]}, {"w": "than", "b": [0.2389, 0.2057, 0.2758, 0.2207]}, {"w": "the", "b": [0.282, 0.2057, 0.3076, 0.2207]}, {"w": "search", "b": [0.3138, 0.2057, 0.3637, 0.2207]}, {"w": "for", "b": [0.3698, 0.2057, 0.3919, 0.2207]}, {"w": "the", "b": [0.3981, 0.2057, 0.4237, 0.2207]}, {"w": "best", "b": [0.4299, 0.2057, 0.4633, 0.2207]}, {"w": "hyperparameter", "b": [0.4694, 0.2057, 0.5973, 0.2207]}, {"w": "values", "b": [0.6034, 0.2057, 0.6522, 0.2207]}, {"w": "or", "b": [0.6584, 0.2057, 0.6748, 0.2207]}, {"w": "model", "b": [0.681, 0.2057, 0.7297, 0.2207]}, {"w": "architecture.", "b": [0.7359, 0.2057, 0.837, 0.2207]}]}, {"id": "b_3", "type": "paragraph", "text": "3.13 Summary", "words": [{"w": "3.13", "b": [0.1312, 0.2543, 0.1756, 0.2722]}, {"w": "Summary", "b": [0.2005, 0.2543, 0.3051, 0.2722]}]}, {"id": "b_4", "type": "paragraph", "text": "Before you start collecting the data, there are five questions to answer: is the data you will work with accessible, sizeable, useable, understandable, and reliable.", "words": [{"w": "Before", "b": [0.1312, 0.2931, 0.1829, 0.3081]}, {"w": "you", "b": [0.189, 0.2931, 0.2178, 0.3081]}, {"w": "start", "b": [0.2239, 0.2931, 0.262, 0.3081]}, {"w": "collecting", "b": [0.2682, 0.2931, 0.3441, 0.3081]}, {"w": "the", "b": [0.3503, 0.2931, 0.376, 0.3081]}, {"w": "data,", "b": [0.3821, 0.2931, 0.4232, 0.3081]}, {"w": "there", "b": [0.4293, 0.2931, 0.4704, 0.3081]}, {"w": "are", "b": [0.4766, 0.2931, 0.5013, 0.3081]}, {"w": "five", "b": [0.5074, 0.2931, 0.5351, 0.3081]}, {"w": "questions", "b": [0.5413, 0.2931, 0.6159, 0.3081]}, {"w": "to", "b": [0.6221, 0.2931, 0.6385, 0.3081]}, {"w": "answer:", "b": [0.6446, 0.2931, 0.7048, 0.3081]}, {"w": "is", "b": [0.713, 0.2931, 0.7255, 0.3081]}, {"w": "the", "b": [0.7316, 0.2931, 0.7573, 0.3081]}, {"w": "data", "b": [0.7634, 0.2931, 0.7993, 0.3081]}, {"w": "you", "b": [0.8055, 0.2931, 0.8342, 0.3081]}, {"w": "will", "b": [0.8404, 0.2931, 0.8691, 0.3081]}, {"w": "work", "b": [0.1306, 0.3111, 0.1696, 0.3261]}, {"w": "with", "b": [0.1757, 0.3111, 0.2116, 0.3261]}, {"w": "accessible,", "b": [0.2178, 0.3111, 0.3, 0.3261]}, {"w": "sizeable,", "b": [0.3062, 0.3111, 0.373, 0.3261]}, {"w": "useable,", "b": [0.3791, 0.3111, 0.4428, 0.3261]}, {"w": "understandable,", "b": [0.449, 0.3111, 0.5773, 0.3261]}, {"w": "and", "b": [0.5835, 0.3111, 0.6132, 0.3261]}, {"w": "reliable.", "b": [0.6194, 0.3111, 0.683, 0.3261]}]}, {"id": "b_5", "type": "paragraph", "text": "Common problems with data are high cost, bias, low predictive power, outdated examples, outliers, and leakage.", "words": [{"w": "Common", "b": [0.1312, 0.338, 0.2047, 0.353]}, {"w": "problems", "b": [0.2108, 0.338, 0.2844, 0.353]}, {"w": "with", "b": [0.2906, 0.338, 0.3268, 0.353]}, {"w": "data", "b": [0.333, 0.338, 0.3692, 0.353]}, {"w": "are", "b": [0.3753, 0.338, 0.4002, 0.353]}, {"w": "high", "b": [0.4064, 0.338, 0.4416, 0.353]}, {"w": "cost,", "b": [0.4477, 0.338, 0.4851, 0.353]}, {"w": "bias,", "b": [0.4913, 0.338, 0.5286, 0.353]}, {"w": "low", "b": [0.5348, 0.338, 0.5622, 0.353]}, {"w": "predictive", "b": [0.5684, 0.338, 0.6481, 0.353]}, {"w": "power,", "b": [0.6543, 0.338, 0.7076, 0.353]}, {"w": "outdated", "b": [0.7138, 0.338, 0.7862, 0.353]}, {"w": "examples,", "b": [0.7924, 0.338, 0.8716, 0.353]}, {"w": "outliers,", "b": [0.1312, 0.356, 0.196, 0.3709]}, {"w": "and", "b": [0.2022, 0.356, 0.2319, 0.3709]}, {"w": "leakage.", "b": [0.238, 0.356, 0.3021, 0.3709]}]}, {"id": "b_6", "type": "paragraph", "text": "Good data contains enough information that can be used for modeling, has good coverage of what you want to do with the model, and reflects real inputs that the model will see in production. It is as unbiased as possible and not a result of the model itself, has consistent labels, and is big enough to allow generalization.", "words": [{"w": "Good", "b": [0.1312, 0.3828, 0.1761, 0.3979]}, {"w": "data", "b": [0.1822, 0.3828, 0.2186, 0.3979]}, {"w": "contains", "b": [0.2248, 0.3828, 0.2919, 0.3979]}, {"w": "enough", "b": [0.2981, 0.3828, 0.3563, 0.3979]}, {"w": "information", "b": [0.3625, 0.3828, 0.4577, 0.3979]}, {"w": "that", "b": [0.4639, 0.3828, 0.4982, 0.3979]}, {"w": "can", "b": [0.5043, 0.3828, 0.5324, 0.3979]}, {"w": "be", "b": [0.5386, 0.3828, 0.5578, 0.3979]}, {"w": "used", "b": [0.564, 0.3828, 0.6005, 0.3979]}, {"w": "for", "b": [0.6066, 0.3828, 0.629, 0.3979]}, {"w": "modeling,", "b": [0.6352, 0.3828, 0.7147, 0.3979]}, {"w": "has", "b": [0.7209, 0.3828, 0.748, 0.3979]}, {"w": "good", "b": [0.7542, 0.3828, 0.7937, 0.3979]}, {"w": "coverage", "b": [0.7999, 0.3828, 0.8691, 0.3979]}, {"w": "of", "b": [0.1312, 0.4007, 0.1464, 0.4158]}, {"w": "what", "b": [0.1525, 0.4007, 0.1932, 0.4158]}, {"w": "you", "b": [0.1994, 0.4007, 0.2286, 0.4158]}, {"w": "want", "b": [0.2347, 0.4007, 0.2744, 0.4158]}, {"w": "to", "b": [0.2805, 0.4007, 0.2972, 0.4158]}, {"w": "do", "b": [0.3034, 0.4007, 0.3232, 0.4158]}, {"w": "with", "b": [0.3294, 0.4007, 0.3659, 0.4158]}, {"w": "the", "b": [0.372, 0.4007, 0.3981, 0.4158]}, {"w": "model,", "b": [0.4043, 0.4007, 0.4591, 0.4158]}, {"w": "and", "b": [0.4652, 0.4007, 0.4955, 0.4158]}, {"w": "reflects", "b": [0.5016, 0.4007, 0.5592, 0.4158]}, {"w": "real", "b": [0.5653, 0.4007, 0.5957, 0.4158]}, {"w": "inputs", "b": [0.6018, 0.4007, 0.6531, 0.4158]}, {"w": "that", "b": [0.6592, 0.4007, 0.6937, 0.4158]}, {"w": "the", "b": [0.6998, 0.4007, 0.7259, 0.4158]}, {"w": "model", "b": [0.7321, 0.4007, 0.7816, 0.4158]}, {"w": "will", "b": [0.7878, 0.4007, 0.817, 0.4158]}, {"w": "see", "b": [0.8231, 0.4007, 0.8473, 0.4158]}, {"w": "in", "b": [0.8534, 0.4007, 0.8691, 0.4158]}, {"w": "production.", "b": [0.1312, 0.4188, 0.2244, 0.4337]}, {"w": "It", "b": [0.2326, 0.4188, 0.2465, 0.4337]}, {"w": "is", "b": [0.2526, 0.4188, 0.2651, 0.4337]}, {"w": "as", "b": [0.2712, 0.4188, 0.2878, 0.4337]}, {"w": "unbiased", "b": [0.2939, 0.4188, 0.3645, 0.4337]}, {"w": "as", "b": [0.3706, 0.4188, 0.3872, 0.4337]}, {"w": "possible", "b": [0.3934, 0.4188, 0.4568, 0.4337]}, {"w": "and", "b": [0.463, 0.4188, 0.4928, 0.4337]}, {"w": "not", "b": [0.499, 0.4188, 0.5257, 0.4337]}, {"w": "a", "b": [0.5318, 0.4188, 0.5411, 0.4337]}, {"w": "result", "b": [0.5473, 0.4188, 0.5927, 0.4337]}, {"w": "of", "b": [0.5988, 0.4188, 0.6137, 0.4337]}, {"w": "the", "b": [0.6199, 0.4188, 0.6456, 0.4337]}, {"w": "model", "b": [0.6517, 0.4188, 0.7006, 0.4337]}, {"w": "itself,", "b": [0.7067, 0.4188, 0.7506, 0.4337]}, {"w": "has", "b": [0.7567, 0.4188, 0.7836, 0.4337]}, {"w": "consistent", "b": [0.7897, 0.4188, 0.8697, 0.4337]}, {"w": "labels,", "b": [0.1312, 0.4367, 0.1821, 0.4517]}, {"w": "and", "b": [0.1883, 0.4367, 0.218, 0.4517]}, {"w": "is", "b": [0.2241, 0.4367, 0.2366, 0.4517]}, {"w": "big", "b": [0.2427, 0.4367, 0.2673, 0.4517]}, {"w": "enough", "b": [0.2735, 0.4367, 0.3309, 0.4517]}, {"w": "to", "b": [0.3371, 0.4367, 0.3535, 0.4517]}, {"w": "allow", "b": [0.3596, 0.4367, 0.4011, 0.4517]}, {"w": "generalization.", "b": [0.4073, 0.4367, 0.5242, 0.4517]}]}, {"id": "b_7", "type": "paragraph", "text": "Good interaction data contains information on three aspects: context of interaction, action of the user in that context, and outcome of the interaction.", "words": [{"w": "Good", "b": [0.1312, 0.4636, 0.1756, 0.4786]}, {"w": "interaction", "b": [0.1817, 0.4636, 0.2687, 0.4786]}, {"w": "data", "b": [0.2748, 0.4636, 0.3108, 0.4786]}, {"w": "contains", "b": [0.317, 0.4636, 0.3834, 0.4786]}, {"w": "information", "b": [0.3896, 0.4636, 0.4837, 0.4786]}, {"w": "on", "b": [0.4899, 0.4636, 0.5094, 0.4786]}, {"w": "three", "b": [0.5156, 0.4636, 0.5568, 0.4786]}, {"w": "aspects:", "b": [0.5629, 0.4636, 0.6264, 0.4786]}, {"w": "context", "b": [0.6346, 0.4636, 0.6943, 0.4786]}, {"w": "of", "b": [0.7004, 0.4636, 0.7153, 0.4786]}, {"w": "interaction,", "b": [0.7215, 0.4636, 0.8136, 0.4786]}, {"w": "action", "b": [0.8198, 0.4636, 0.8691, 0.4786]}, {"w": "of", "b": [0.1312, 0.4816, 0.1461, 0.4965]}, {"w": "the", "b": [0.1522, 0.4816, 0.1779, 0.4965]}, {"w": "user", "b": [0.1841, 0.4816, 0.217, 0.4965]}, {"w": "in", "b": [0.2232, 0.4816, 0.2386, 0.4965]}, {"w": "that", "b": [0.2447, 0.4816, 0.2786, 0.4965]}, {"w": "context,", "b": [0.2847, 0.4816, 0.3493, 0.4965]}, {"w": "and", "b": [0.3555, 0.4816, 0.3852, 0.4965]}, {"w": "outcome", "b": [0.3913, 0.4816, 0.459, 0.4965]}, {"w": "of", "b": [0.4652, 0.4816, 0.48, 0.4965]}, {"w": "the", "b": [0.4862, 0.4816, 0.5118, 0.4965]}, {"w": "interaction.", "b": [0.518, 0.4816, 0.6098, 0.4965]}]}, {"id": "b_8", "type": "paragraph", "text": "To obtain a good partition of your entire dataset into training, validation and test sets, the process of partitioning has to satisfy several conditions: 1) data was randomized before the split, 2) split was applied to raw data, 3) validation and test sets follow the same distribution, and 4) leakage was avoided.", "words": [{"w": "To", "b": [0.1306, 0.5085, 0.1516, 0.5235]}, {"w": "obtain", "b": [0.1577, 0.5085, 0.209, 0.5235]}, {"w": "a", "b": [0.2152, 0.5085, 0.2244, 0.5235]}, {"w": "good", "b": [0.2305, 0.5085, 0.2695, 0.5235]}, {"w": "partition", "b": [0.2757, 0.5085, 0.3465, 0.5235]}, {"w": "of", "b": [0.3526, 0.5085, 0.3675, 0.5235]}, {"w": "your", "b": [0.3736, 0.5085, 0.4096, 0.5235]}, {"w": "entire", "b": [0.4157, 0.5085, 0.4614, 0.5235]}, {"w": "dataset", "b": [0.4676, 0.5085, 0.5262, 0.5235]}, {"w": "into", "b": [0.5323, 0.5085, 0.5636, 0.5235]}, {"w": "training,", "b": [0.5698, 0.5085, 0.6385, 0.5235]}, {"w": "validation", "b": [0.6447, 0.5085, 0.7241, 0.5235]}, {"w": "and", "b": [0.7303, 0.5085, 0.76, 0.5235]}, {"w": "test", "b": [0.7662, 0.5085, 0.796, 0.5235]}, {"w": "sets,", "b": [0.8022, 0.5085, 0.8373, 0.5235]}, {"w": "the", "b": [0.8434, 0.5085, 0.8691, 0.5235]}, {"w": "process", "b": [0.1312, 0.5264, 0.1896, 0.5414]}, {"w": "of", "b": [0.1957, 0.5264, 0.2106, 0.5414]}, {"w": "partitioning", "b": [0.2167, 0.5264, 0.3123, 0.5414]}, {"w": "has", "b": [0.3185, 0.5264, 0.3453, 0.5414]}, {"w": "to", "b": [0.3514, 0.5264, 0.3678, 0.5414]}, {"w": "satisfy", "b": [0.374, 0.5264, 0.4256, 0.5414]}, {"w": "several", "b": [0.4317, 0.5264, 0.4863, 0.5414]}, {"w": "conditions:", "b": [0.4925, 0.5264, 0.5799, 0.5414]}, {"w": "1)", "b": [0.5881, 0.5264, 0.6045, 0.5414]}, {"w": "data", "b": [0.6107, 0.5264, 0.6466, 0.5414]}, {"w": "was", "b": [0.6527, 0.5264, 0.6821, 0.5414]}, {"w": "randomized", "b": [0.6882, 0.5264, 0.7818, 0.5414]}, {"w": "before", "b": [0.7879, 0.5264, 0.8373, 0.5414]}, {"w": "the", "b": [0.8434, 0.5264, 0.8691, 0.5414]}, {"w": "split,", "b": [0.1312, 0.5445, 0.1705, 0.5593]}, {"w": "2)", "b": [0.1763, 0.5445, 0.1923, 0.5593]}, {"w": "split", "b": [0.1979, 0.5445, 0.2322, 0.5593]}, {"w": "was", "b": [0.2378, 0.5445, 0.2665, 0.5593]}, {"w": "applied", "b": [0.2721, 0.5445, 0.3294, 0.5593]}, {"w": "to", "b": [0.335, 0.5445, 0.3511, 0.5593]}, {"w": "raw", "b": [0.3567, 0.5445, 0.3854, 0.5593]}, {"w": "data,", "b": [0.391, 0.5445, 0.4312, 0.5593]}, {"w": "3)", "b": [0.4369, 0.5445, 0.453, 0.5593]}, {"w": "validation", "b": [0.4586, 0.5445, 0.5364, 0.5593]}, {"w": "and", "b": [0.542, 0.5445, 0.5712, 0.5593]}, {"w": "test", "b": [0.5767, 0.5445, 0.606, 0.5593]}, {"w": "sets", "b": [0.6116, 0.5445, 0.641, 0.5593]}, {"w": "follow", "b": [0.6466, 0.5445, 0.6928, 0.5593]}, {"w": "the", "b": [0.6984, 0.5445, 0.7235, 0.5593]}, {"w": "same", "b": [0.7291, 0.5445, 0.7684, 0.5593]}, {"w": "distribution,", "b": [0.774, 0.5445, 0.8716, 0.5593]}, {"w": "and", "b": [0.1312, 0.5624, 0.161, 0.5773]}, {"w": "4)", "b": [0.1671, 0.5624, 0.1835, 0.5773]}, {"w": "leakage", "b": [0.1897, 0.5624, 0.2486, 0.5773]}, {"w": "was", "b": [0.2548, 0.5624, 0.2841, 0.5773]}, {"w": "avoided.", "b": [0.2902, 0.5624, 0.3564, 0.5773]}]}, {"id": "b_9", "type": "paragraph", "text": "Data imputation techniques can be used to deal with missing attributes in the data.", "words": [{"w": "Data", "b": [0.1312, 0.5893, 0.171, 0.6042]}, {"w": "imputation", "b": [0.1771, 0.5893, 0.2663, 0.6042]}, {"w": "techniques", "b": [0.2725, 0.5893, 0.3567, 0.6042]}, {"w": "can", "b": [0.3628, 0.5893, 0.3905, 0.6042]}, {"w": "be", "b": [0.3967, 0.5893, 0.4156, 0.6042]}, {"w": "used", "b": [0.4218, 0.5893, 0.4578, 0.6042]}, {"w": "to", "b": [0.4639, 0.5893, 0.4803, 0.6042]}, {"w": "deal", "b": [0.4865, 0.5893, 0.5193, 0.6042]}, {"w": "with", "b": [0.5255, 0.5893, 0.5614, 0.6042]}, {"w": "missing", "b": [0.5675, 0.5893, 0.6272, 0.6042]}, {"w": "attributes", "b": [0.6333, 0.5893, 0.7125, 0.6042]}, {"w": "in", "b": [0.7186, 0.5893, 0.734, 0.6042]}, {"w": "the", "b": [0.7401, 0.5893, 0.7658, 0.6042]}, {"w": "data.", "b": [0.7719, 0.5893, 0.813, 0.6042]}]}, {"id": "b_10", "type": "paragraph", "text": "Data augmentation techniques are often used to get more labeled examples without additional manual labeling. The techniques usually apply to image data, but could also be applied to text and other types of perceptive data.", "words": [{"w": "Data", "b": [0.1312, 0.6163, 0.1702, 0.6311]}, {"w": "augmentation", "b": [0.1753, 0.6163, 0.2833, 0.6311]}, {"w": "techniques", "b": [0.2884, 0.6163, 0.3709, 0.6311]}, {"w": "are", "b": [0.376, 0.6163, 0.4002, 0.6311]}, {"w": "often", "b": [0.4053, 0.6163, 0.445, 0.6311]}, {"w": "used", "b": [0.4501, 0.6163, 0.4854, 0.6311]}, {"w": "to", "b": [0.4905, 0.6163, 0.5066, 0.6311]}, {"w": "get", "b": [0.5117, 0.6163, 0.5359, 0.6311]}, {"w": "more", "b": [0.541, 0.6163, 0.5802, 0.6311]}, {"w": "labeled", "b": [0.5853, 0.6163, 0.6411, 0.6311]}, {"w": "examples", "b": [0.6462, 0.6163, 0.7182, 0.6311]}, {"w": "without", "b": [0.7233, 0.6163, 0.7846, 0.6311]}, {"w": "additional", "b": [0.7897, 0.6163, 0.8691, 0.6311]}, {"w": "manual", "b": [0.1312, 0.6341, 0.1907, 0.6491]}, {"w": "labeling.", "b": [0.1968, 0.6341, 0.2655, 0.6491]}, {"w": "The", "b": [0.2737, 0.6341, 0.3058, 0.6491]}, {"w": "techniques", "b": [0.3119, 0.6341, 0.3968, 0.6491]}, {"w": "usually", "b": [0.4029, 0.6341, 0.4604, 0.6491]}, {"w": "apply", "b": [0.4665, 0.6341, 0.5115, 0.6491]}, {"w": "to", "b": [0.5176, 0.6341, 0.5342, 0.6491]}, {"w": "image", "b": [0.5403, 0.6341, 0.5878, 0.6491]}, {"w": "data,", "b": [0.5939, 0.6341, 0.6353, 0.6491]}, {"w": "but", "b": [0.6414, 0.6341, 0.6693, 0.6491]}, {"w": "could", "b": [0.6755, 0.6341, 0.7189, 0.6491]}, {"w": "also", "b": [0.725, 0.6341, 0.7561, 0.6491]}, {"w": "be", "b": [0.7622, 0.6341, 0.7814, 0.6491]}, {"w": "applied", "b": [0.7875, 0.6341, 0.8464, 0.6491]}, {"w": "to", "b": [0.8526, 0.6341, 0.8691, 0.6491]}, {"w": "text", "b": [0.1312, 0.6521, 0.1635, 0.667]}, {"w": "and", "b": [0.1697, 0.6521, 0.1994, 0.667]}, {"w": "other", "b": [0.2056, 0.6521, 0.2477, 0.667]}, {"w": "types", "b": [0.2538, 0.6521, 0.2965, 0.667]}, {"w": "of", "b": [0.3026, 0.6521, 0.3175, 0.667]}, {"w": "perceptive", "b": [0.3237, 0.6521, 0.4063, 0.667]}, {"w": "data.", "b": [0.4124, 0.6521, 0.4534, 0.667]}]}, {"id": "b_11", "type": "paragraph", "text": "Class imbalance can significantly affect the performance of the model. Learning algorithms perform suboptimally when the training data suffers from class imbalance. Such techniques as over- and undersampling can help to overcome the class imbalance problem.", "words": [{"w": "Class", "b": [0.1312, 0.679, 0.1736, 0.694]}, {"w": "imbalance", "b": [0.1797, 0.679, 0.2605, 0.694]}, {"w": "can", "b": [0.2666, 0.679, 0.2944, 0.694]}, {"w": "significantly", "b": [0.3005, 0.679, 0.3973, 0.694]}, {"w": "affect", "b": [0.4034, 0.679, 0.4471, 0.694]}, {"w": "the", "b": [0.4533, 0.679, 0.479, 0.694]}, {"w": "performance", "b": [0.4851, 0.679, 0.585, 0.694]}, {"w": "of", "b": [0.5911, 0.679, 0.606, 0.694]}, {"w": "the", "b": [0.6121, 0.679, 0.6379, 0.694]}, {"w": "model.", "b": [0.644, 0.679, 0.698, 0.694]}, {"w": "Learning", "b": [0.7062, 0.679, 0.7775, 0.694]}, {"w": "algorithms", "b": [0.7836, 0.679, 0.8691, 0.694]}, {"w": "perform", "b": [0.1312, 0.697, 0.1948, 0.7119]}, {"w": "suboptimally", "b": [0.2009, 0.697, 0.3054, 0.7119]}, {"w": "when", "b": [0.3116, 0.697, 0.3535, 0.7119]}, {"w": "the", "b": [0.3597, 0.697, 0.3853, 0.7119]}, {"w": "training", "b": [0.3914, 0.697, 0.4549, 0.7119]}, {"w": "data", "b": [0.4611, 0.697, 0.4969, 0.7119]}, {"w": "suffers", "b": [0.5031, 0.697, 0.554, 0.7119]}, {"w": "from", "b": [0.5601, 0.697, 0.5975, 0.7119]}, {"w": "class", "b": [0.6037, 0.697, 0.6407, 0.7119]}, {"w": "imbalance.", "b": [0.6469, 0.697, 0.7323, 0.7119]}, {"w": "Such", "b": [0.7405, 0.697, 0.7789, 0.7119]}, {"w": "techniques", "b": [0.7851, 0.697, 0.8691, 0.7119]}, {"w": "as", "b": [0.1312, 0.7149, 0.1477, 0.7299]}, {"w": "over-", "b": [0.1539, 0.7149, 0.1934, 0.7299]}, {"w": "and", "b": [0.1996, 0.7149, 0.2293, 0.7299]}, {"w": "undersampling", "b": [0.2355, 0.7149, 0.3535, 0.7299]}, {"w": "can", "b": [0.3597, 0.7149, 0.3874, 0.7299]}, {"w": "help", "b": [0.3935, 0.7149, 0.4274, 0.7299]}, {"w": "to", "b": [0.4335, 0.7149, 0.4499, 0.7299]}, {"w": "overcome", "b": [0.4561, 0.7149, 0.5305, 0.7299]}, {"w": "the", "b": [0.5366, 0.7149, 0.5623, 0.7299]}, {"w": "class", "b": [0.5684, 0.7149, 0.6056, 0.7299]}, {"w": "imbalance", "b": [0.6117, 0.7149, 0.6922, 0.7299]}, {"w": "problem.", "b": [0.6983, 0.7149, 0.7692, 0.7299]}]}, {"id": "b_12", "type": "paragraph", "text": "When you work with big data, it’s not always practical and necessary to work with the entire", "words": [{"w": "When", "b": [0.1303, 0.7419, 0.177, 0.7567]}, {"w": "you", "b": [0.1828, 0.7419, 0.211, 0.7567]}, {"w": "work", "b": [0.2168, 0.7419, 0.255, 0.7567]}, {"w": "with", "b": [0.2608, 0.7419, 0.296, 0.7567]}, {"w": "big", "b": [0.3018, 0.7419, 0.3259, 0.7567]}, {"w": "data,", "b": [0.3317, 0.7419, 0.3719, 0.7567]}, {"w": "it’s", "b": [0.3778, 0.7419, 0.402, 0.7567]}, {"w": "not", "b": [0.4078, 0.7419, 0.4339, 0.7567]}, {"w": "always", "b": [0.4397, 0.7419, 0.4916, 0.7567]}, {"w": "practical", "b": [0.4974, 0.7419, 0.5658, 0.7567]}, {"w": "and", "b": [0.5716, 0.7419, 0.6007, 0.7567]}, {"w": "necessary", "b": [0.6065, 0.7419, 0.6807, 0.7567]}, {"w": "to", "b": [0.6865, 0.7419, 0.7026, 0.7567]}, {"w": "work", "b": [0.7084, 0.7419, 0.7466, 0.7567]}, {"w": "with", "b": [0.7524, 0.7419, 0.7875, 0.7567]}, {"w": "the", "b": [0.7934, 0.7419, 0.8185, 0.7567]}, {"w": "entire", "b": [0.8243, 0.7419, 0.8691, 0.7567]}]}, {"id": "b_13", "type": "paragraph", "text": "data asset. Instead, draw a smaller sample of data that contains enough information for learning. Different data sampling strategies can be used for that, in particular simple random sampling, systematic sampling, stratified sampling, and cluster sampling.", "words": [{"w": "data", "b": [0.1312, 0.7597, 0.1678, 0.7748]}, {"w": "asset.", "b": [0.1749, 0.7597, 0.22, 0.7748]}, {"w": "Instead,", "b": [0.2308, 0.7597, 0.2963, 0.7748]}, {"w": "draw", "b": [0.3035, 0.7597, 0.3439, 0.7748]}, {"w": "a", "b": [0.3509, 0.7597, 0.3603, 0.7748]}, {"w": "smaller", "b": [0.3673, 0.7597, 0.426, 0.7748]}, {"w": "sample", "b": [0.433, 0.7597, 0.4896, 0.7748]}, {"w": "of", "b": [0.4966, 0.7597, 0.5118, 0.7748]}, {"w": "data", "b": [0.5188, 0.7597, 0.5554, 0.7748]}, {"w": "that", "b": [0.5624, 0.7597, 0.5969, 0.7748]}, {"w": "contains", "b": [0.6039, 0.7597, 0.6715, 0.7748]}, {"w": "enough", "b": [0.6785, 0.7597, 0.7371, 0.7748]}, {"w": "information", "b": [0.7441, 0.7597, 0.8399, 0.7748]}, {"w": "for", "b": [0.8469, 0.7597, 0.8694, 0.7748]}, {"w": "learning.", "b": [0.1312, 0.7778, 0.1996, 0.7926]}, {"w": "Different", "b": [0.2077, 0.7778, 0.2768, 0.7926]}, {"w": "data", "b": [0.2824, 0.7778, 0.3176, 0.7926]}, {"w": "sampling", "b": [0.3233, 0.7778, 0.3937, 0.7926]}, {"w": "strategies", "b": [0.3994, 0.7778, 0.474, 0.7926]}, {"w": "can", "b": [0.4796, 0.7778, 0.5068, 0.7926]}, {"w": "be", "b": [0.5124, 0.7778, 0.531, 0.7926]}, {"w": "used", "b": [0.5367, 0.7778, 0.572, 0.7926]}, {"w": "for", "b": [0.5777, 0.7778, 0.5993, 0.7926]}, {"w": "that,", "b": [0.605, 0.7778, 0.6431, 0.7926]}, {"w": "in", "b": [0.6489, 0.7778, 0.664, 0.7926]}, {"w": "particular", "b": [0.6696, 0.7778, 0.7471, 0.7926]}, {"w": "simple", "b": [0.7528, 0.7778, 0.8031, 0.7926]}, {"w": "random", "b": [0.8088, 0.7778, 0.8691, 0.7926]}, {"w": "sampling,", "b": [0.1312, 0.7957, 0.2082, 0.8106]}, {"w": "systematic", "b": [0.2144, 0.7957, 0.2992, 0.8106]}, {"w": "sampling,", "b": [0.3053, 0.7957, 0.3823, 0.8106]}, {"w": "stratified", "b": [0.3885, 0.7957, 0.4604, 0.8106]}, {"w": "sampling,", "b": [0.4666, 0.7957, 0.5436, 0.8106]}, {"w": "and", "b": [0.5498, 0.7957, 0.5795, 0.8106]}, {"w": "cluster", "b": [0.5856, 0.7957, 0.6391, 0.8106]}, {"w": "sampling.", "b": [0.6453, 0.7957, 0.7223, 0.8106]}]}, {"id": "b_14", "type": "paragraph", "text": "Data can be stored in different data formats and on several data storage levels. Data versioning is a critical element in supervised learning when the labeling is done by multiple labelers. Different labelers may provide labels of varying quality, so it’s important to keep", "words": [{"w": "Data", "b": [0.1312, 0.8225, 0.1717, 0.8376]}, {"w": "can", "b": [0.1802, 0.8225, 0.2085, 0.8376]}, {"w": "be", "b": [0.217, 0.8225, 0.2363, 0.8376]}, {"w": "stored", "b": [0.2448, 0.8225, 0.2952, 0.8376]}, {"w": "in", "b": [0.3037, 0.8225, 0.3194, 0.8376]}, {"w": "different", "b": [0.3279, 0.8225, 0.3959, 0.8376]}, {"w": "data", "b": [0.4044, 0.8225, 0.441, 0.8376]}, {"w": "formats", "b": [0.4495, 0.8225, 0.5119, 0.8376]}, {"w": "and", "b": [0.5204, 0.8225, 0.5507, 0.8376]}, {"w": "on", "b": [0.5592, 0.8225, 0.5791, 0.8376]}, {"w": "several", "b": [0.5876, 0.8225, 0.6432, 0.8376]}, {"w": "data", "b": [0.6517, 0.8225, 0.6883, 0.8376]}, {"w": "storage", "b": [0.6968, 0.8225, 0.7555, 0.8376]}, {"w": "levels.", "b": [0.764, 0.8225, 0.8133, 0.8376]}, {"w": "Data", "b": [0.8285, 0.8225, 0.8691, 0.8376]}, {"w": "versioning", "b": [0.1308, 0.8405, 0.212, 0.8555]}, {"w": "is", "b": [0.2182, 0.8405, 0.2306, 0.8555]}, {"w": "a", "b": [0.2368, 0.8405, 0.246, 0.8555]}, {"w": "critical", "b": [0.2522, 0.8405, 0.3077, 0.8555]}, {"w": "element", "b": [0.3138, 0.8405, 0.3759, 0.8555]}, {"w": "in", "b": [0.3821, 0.8405, 0.3975, 0.8555]}, {"w": "supervised", "b": [0.4037, 0.8405, 0.4881, 0.8555]}, {"w": "learning", "b": [0.4943, 0.8405, 0.559, 0.8555]}, {"w": "when", "b": [0.5652, 0.8405, 0.6073, 0.8555]}, {"w": "the", "b": [0.6134, 0.8405, 0.6391, 0.8555]}, {"w": "labeling", "b": [0.6453, 0.8405, 0.7084, 0.8555]}, {"w": "is", "b": [0.7146, 0.8405, 0.727, 0.8555]}, {"w": "done", "b": [0.7332, 0.8405, 0.7711, 0.8555]}, {"w": "by", "b": [0.7773, 0.8405, 0.7968, 0.8555]}, {"w": "multiple", "b": [0.803, 0.8405, 0.8692, 0.8555]}, {"w": "labelers.", "b": [0.1312, 0.8584, 0.1986, 0.8735]}, {"w": "Different", "b": [0.2068, 0.8584, 0.2785, 0.8735]}, {"w": "labelers", "b": [0.2846, 0.8584, 0.3468, 0.8735]}, {"w": "may", "b": [0.3529, 0.8584, 0.3873, 0.8735]}, {"w": "provide", "b": [0.3934, 0.8584, 0.4539, 0.8735]}, {"w": "labels", "b": [0.4601, 0.8584, 0.5066, 0.8735]}, {"w": "of", "b": [0.5127, 0.8584, 0.5278, 0.8735]}, {"w": "varying", "b": [0.5339, 0.8584, 0.5944, 0.8735]}, {"w": "quality,", "b": [0.6006, 0.8584, 0.661, 0.8735]}, {"w": "so", "b": [0.6672, 0.8584, 0.684, 0.8735]}, {"w": "it’s", "b": [0.6901, 0.8584, 0.7152, 0.8735]}, {"w": "important", "b": [0.7213, 0.8584, 0.8037, 0.8735]}, {"w": "to", "b": [0.8098, 0.8584, 0.8265, 0.8735]}, {"w": "keep", "b": [0.8326, 0.8584, 0.8691, 0.8735]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 45", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "45", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 89, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "track of who created which labeled example. Data versioning can be implemented with several levels of complexity, from the most basic to the most elaborate: unversioned (level 0), versioned as a snapshot at training time (level 1), versioned as one asset containing both data and code (level 2), and versioned by using or building a specialized data versioning solution (level 3).", "words": [{"w": "track", "b": [0.1312, 0.0883, 0.1731, 0.1034]}, {"w": "of", "b": [0.1808, 0.0883, 0.1959, 0.1034]}, {"w": "who", "b": [0.2036, 0.0883, 0.237, 0.1034]}, {"w": "created", "b": [0.2447, 0.0883, 0.3044, 0.1034]}, {"w": "which", "b": [0.312, 0.0883, 0.3596, 0.1034]}, {"w": "labeled", "b": [0.3672, 0.0883, 0.4253, 0.1034]}, {"w": "example.", "b": [0.4329, 0.0883, 0.5056, 0.1034]}, {"w": "Data", "b": [0.5183, 0.0883, 0.5588, 0.1034]}, {"w": "versioning", "b": [0.5664, 0.0883, 0.6492, 0.1034]}, {"w": "can", "b": [0.6569, 0.0883, 0.6851, 0.1034]}, {"w": "be", "b": [0.6927, 0.0883, 0.7121, 0.1034]}, {"w": "implemented", "b": [0.7197, 0.0883, 0.8249, 0.1034]}, {"w": "with", "b": [0.8325, 0.0883, 0.8691, 0.1034]}, {"w": "several", "b": [0.1312, 0.1065, 0.1846, 0.1213]}, {"w": "levels", "b": [0.1908, 0.1065, 0.2331, 0.1213]}, {"w": "of", "b": [0.2392, 0.1065, 0.2537, 0.1213]}, {"w": "complexity,", "b": [0.2598, 0.1065, 0.3492, 0.1213]}, {"w": "from", "b": [0.3553, 0.1065, 0.3921, 0.1213]}, {"w": "the", "b": [0.3982, 0.1065, 0.4233, 0.1213]}, {"w": "most", "b": [0.4294, 0.1065, 0.4677, 0.1213]}, {"w": "basic", "b": [0.4738, 0.1065, 0.5131, 0.1213]}, {"w": "to", "b": [0.5192, 0.1065, 0.5352, 0.1213]}, {"w": "the", "b": [0.5413, 0.1065, 0.5665, 0.1213]}, {"w": "most", "b": [0.5726, 0.1065, 0.6108, 0.1213]}, {"w": "elaborate:", "b": [0.6169, 0.1065, 0.6949, 0.1213]}, {"w": "unversioned", "b": [0.7031, 0.1065, 0.7962, 0.1213]}, {"w": "(level", "b": [0.8023, 0.1065, 0.8445, 0.1213]}, {"w": "0),", "b": [0.8502, 0.1065, 0.8713, 0.1213]}, {"w": "versioned", "b": [0.1308, 0.1244, 0.2043, 0.1392]}, {"w": "as", "b": [0.2099, 0.1244, 0.2261, 0.1392]}, {"w": "a", "b": [0.2317, 0.1244, 0.2407, 0.1392]}, {"w": "snapshot", "b": [0.2463, 0.1244, 0.3159, 0.1392]}, {"w": "at", "b": [0.3215, 0.1244, 0.3375, 0.1392]}, {"w": "training", "b": [0.3431, 0.1244, 0.4055, 0.1392]}, {"w": "time", "b": [0.4111, 0.1244, 0.4463, 0.1392]}, {"w": "(level", "b": [0.4519, 0.1244, 0.4941, 0.1392]}, {"w": "1),", "b": [0.4995, 0.1244, 0.5206, 0.1392]}, {"w": "versioned", "b": [0.5263, 0.1244, 0.5998, 0.1392]}, {"w": "as", "b": [0.6054, 0.1244, 0.6216, 0.1392]}, {"w": "one", "b": [0.6272, 0.1244, 0.6544, 0.1392]}, {"w": "asset", "b": [0.66, 0.1244, 0.6984, 0.1392]}, {"w": "containing", "b": [0.704, 0.1244, 0.7859, 0.1392]}, {"w": "both", "b": [0.7915, 0.1244, 0.8282, 0.1392]}, {"w": "data", "b": [0.8338, 0.1244, 0.869, 0.1392]}, {"w": "and", "b": [0.1312, 0.1423, 0.1608, 0.1572]}, {"w": "code", "b": [0.167, 0.1423, 0.2032, 0.1572]}, {"w": "(level", "b": [0.2094, 0.1423, 0.2522, 0.1572]}, {"w": "2),", "b": [0.2583, 0.1423, 0.2797, 0.1572]}, {"w": "and", "b": [0.2859, 0.1423, 0.3155, 0.1572]}, {"w": "versioned", "b": [0.3217, 0.1423, 0.3963, 0.1572]}, {"w": "by", "b": [0.4025, 0.1423, 0.4218, 0.1572]}, {"w": "using", "b": [0.428, 0.1423, 0.47, 0.1572]}, {"w": "or", "b": [0.4761, 0.1423, 0.4925, 0.1572]}, {"w": "building", "b": [0.4986, 0.1423, 0.5639, 0.1572]}, {"w": "a", "b": [0.5701, 0.1423, 0.5793, 0.1572]}, {"w": "specialized", "b": [0.5854, 0.1423, 0.6708, 0.1572]}, {"w": "data", "b": [0.6769, 0.1423, 0.7126, 0.1572]}, {"w": "versioning", "b": [0.7188, 0.1423, 0.7996, 0.1572]}, {"w": "solution", "b": [0.8057, 0.1423, 0.8691, 0.1572]}, {"w": "(level", "b": [0.1291, 0.1602, 0.1722, 0.1751]}, {"w": "3).", "b": [0.1783, 0.1602, 0.1998, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "Level 2 is recommended for most projects.", "words": [{"w": "Level", "b": [0.1312, 0.1871, 0.1735, 0.2021]}, {"w": "2", "b": [0.1797, 0.1871, 0.1889, 0.2021]}, {"w": "is", "b": [0.195, 0.1871, 0.2075, 0.2021]}, {"w": "recommended", "b": [0.2136, 0.1871, 0.3244, 0.2021]}, {"w": "for", "b": [0.3305, 0.1871, 0.3527, 0.2021]}, {"w": "most", "b": [0.3588, 0.1871, 0.3979, 0.2021]}, {"w": "projects.", "b": [0.404, 0.1871, 0.4729, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "Documentation has to accompany any data asset that was used to train a model. That documentation has to contain the following details: what that data means, how it was collected, or methods used to create it (instructions to labelers and methods for quality control), the details of train-validation-test splits and of all pre-processing steps. It must also contain an explanation of any data that were excluded, what format is used to store the data, types of attributes or features, number of examples, and possible values for labels or the allowable range for a numerical target.", "words": [{"w": "Documentation", "b": [0.1312, 0.2139, 0.2575, 0.229]}, {"w": "has", "b": [0.2649, 0.2139, 0.2922, 0.229]}, {"w": "to", "b": [0.2996, 0.2139, 0.3164, 0.229]}, {"w": "accompany", "b": [0.3238, 0.2139, 0.4148, 0.229]}, {"w": "any", "b": [0.4222, 0.2139, 0.4515, 0.229]}, {"w": "data", "b": [0.4589, 0.2139, 0.4955, 0.229]}, {"w": "asset", "b": [0.5029, 0.2139, 0.5429, 0.229]}, {"w": "that", "b": [0.5503, 0.2139, 0.5848, 0.229]}, {"w": "was", "b": [0.5922, 0.2139, 0.6221, 0.229]}, {"w": "used", "b": [0.6295, 0.2139, 0.6663, 0.229]}, {"w": "to", "b": [0.6737, 0.2139, 0.6904, 0.229]}, {"w": "train", "b": [0.6978, 0.2139, 0.7376, 0.229]}, {"w": "a", "b": [0.745, 0.2139, 0.7544, 0.229]}, {"w": "model.", "b": [0.7619, 0.2139, 0.8167, 0.229]}, {"w": "That", "b": [0.8287, 0.2139, 0.8695, 0.229]}, {"w": "documentation", "b": [0.1312, 0.2319, 0.2536, 0.247]}, {"w": "has", "b": [0.2617, 0.2319, 0.289, 0.247]}, {"w": "to", "b": [0.297, 0.2319, 0.3138, 0.247]}, {"w": "contain", "b": [0.3218, 0.2319, 0.382, 0.247]}, {"w": "the", "b": [0.39, 0.2319, 0.4162, 0.247]}, {"w": "following", "b": [0.4243, 0.2319, 0.4975, 0.247]}, {"w": "details:", "b": [0.5055, 0.2319, 0.5642, 0.247]}, {"w": "what", "b": [0.5763, 0.2319, 0.617, 0.247]}, {"w": "that", "b": [0.6251, 0.2319, 0.6596, 0.247]}, {"w": "data", "b": [0.6677, 0.2319, 0.7043, 0.247]}, {"w": "means,", "b": [0.7123, 0.2319, 0.7689, 0.247]}, {"w": "how", "b": [0.7775, 0.2319, 0.8104, 0.247]}, {"w": "it", "b": [0.8185, 0.2319, 0.831, 0.247]}, {"w": "was", "b": [0.8391, 0.2319, 0.869, 0.247]}, {"w": "collected,", "b": [0.1312, 0.2498, 0.2076, 0.2649]}, {"w": "or", "b": [0.2155, 0.2498, 0.2322, 0.2649]}, {"w": "methods", "b": [0.2398, 0.2498, 0.3094, 0.2649]}, {"w": "used", "b": [0.3169, 0.2498, 0.3537, 0.2649]}, {"w": "to", "b": [0.3612, 0.2498, 0.3779, 0.2649]}, {"w": "create", "b": [0.3854, 0.2498, 0.4346, 0.2649]}, {"w": "it", "b": [0.4422, 0.2498, 0.4547, 0.2649]}, {"w": "(instructions", "b": [0.4622, 0.2498, 0.5661, 0.2649]}, {"w": "to", "b": [0.5736, 0.2498, 0.5903, 0.2649]}, {"w": "labelers", "b": [0.5978, 0.2498, 0.6602, 0.2649]}, {"w": "and", "b": [0.6677, 0.2498, 0.6981, 0.2649]}, {"w": "methods", "b": [0.7056, 0.2498, 0.7752, 0.2649]}, {"w": "for", "b": [0.7828, 0.2498, 0.8053, 0.2649]}, {"w": "quality", "b": [0.8128, 0.2498, 0.8698, 0.2649]}, {"w": "control),", "b": [0.1312, 0.2677, 0.2009, 0.2829]}, {"w": "the", "b": [0.2077, 0.2677, 0.2339, 0.2829]}, {"w": "details", "b": [0.2406, 0.2677, 0.294, 0.2829]}, {"w": "of", "b": [0.3008, 0.2677, 0.3159, 0.2829]}, {"w": "train-validation-test", "b": [0.3227, 0.2677, 0.4865, 0.2829]}, {"w": "splits", "b": [0.4932, 0.2677, 0.5363, 0.2829]}, {"w": "and", "b": [0.5431, 0.2677, 0.5734, 0.2829]}, {"w": "of", "b": [0.5801, 0.2677, 0.5953, 0.2829]}, {"w": "all", "b": [0.602, 0.2677, 0.6219, 0.2829]}, {"w": "pre-processing", "b": [0.6286, 0.2677, 0.7455, 0.2829]}, {"w": "steps.", "b": [0.7523, 0.2677, 0.7985, 0.2829]}, {"w": "It", "b": [0.8084, 0.2677, 0.8225, 0.2829]}, {"w": "must", "b": [0.8292, 0.2677, 0.8696, 0.2829]}, {"w": "also", "b": [0.1312, 0.2859, 0.1615, 0.3007]}, {"w": "contain", "b": [0.1677, 0.2859, 0.2255, 0.3007]}, {"w": "an", "b": [0.2317, 0.2859, 0.2508, 0.3007]}, {"w": "explanation", "b": [0.2569, 0.2859, 0.349, 0.3007]}, {"w": "of", "b": [0.3551, 0.2859, 0.3697, 0.3007]}, {"w": "any", "b": [0.3759, 0.2859, 0.404, 0.3007]}, {"w": "data", "b": [0.4102, 0.2859, 0.4454, 0.3007]}, {"w": "that", "b": [0.4515, 0.2859, 0.4847, 0.3007]}, {"w": "were", "b": [0.4909, 0.2859, 0.5267, 0.3007]}, {"w": "excluded,", "b": [0.5328, 0.2859, 0.6068, 0.3007]}, {"w": "what", "b": [0.6129, 0.2859, 0.6522, 0.3007]}, {"w": "format", "b": [0.6583, 0.2859, 0.7112, 0.3007]}, {"w": "is", "b": [0.7173, 0.2859, 0.7295, 0.3007]}, {"w": "used", "b": [0.7357, 0.2859, 0.771, 0.3007]}, {"w": "to", "b": [0.7771, 0.2859, 0.7932, 0.3007]}, {"w": "store", "b": [0.7994, 0.2859, 0.8378, 0.3007]}, {"w": "the", "b": [0.8439, 0.2859, 0.8691, 0.3007]}, {"w": "data,", "b": [0.1312, 0.3037, 0.1728, 0.3187]}, {"w": "types", "b": [0.179, 0.3037, 0.2222, 0.3187]}, {"w": "of", "b": [0.2284, 0.3037, 0.2435, 0.3187]}, {"w": "attributes", "b": [0.2496, 0.3037, 0.3299, 0.3187]}, {"w": "or", "b": [0.336, 0.3037, 0.3527, 0.3187]}, {"w": "features,", "b": [0.3588, 0.3037, 0.4282, 0.3187]}, {"w": "number", "b": [0.4343, 0.3037, 0.4963, 0.3187]}, {"w": "of", "b": [0.5024, 0.3037, 0.5175, 0.3187]}, {"w": "examples,", "b": [0.5236, 0.3037, 0.6033, 0.3187]}, {"w": "and", "b": [0.6094, 0.3037, 0.6396, 0.3187]}, {"w": "possible", "b": [0.6457, 0.3037, 0.7099, 0.3187]}, {"w": "values", "b": [0.7161, 0.3037, 0.7656, 0.3187]}, {"w": "for", "b": [0.7717, 0.3037, 0.7942, 0.3187]}, {"w": "labels", "b": [0.8003, 0.3037, 0.8467, 0.3187]}, {"w": "or", "b": [0.8528, 0.3037, 0.8695, 0.3187]}, {"w": "the", "b": [0.1312, 0.3217, 0.1569, 0.3367]}, {"w": "allowable", "b": [0.163, 0.3217, 0.2369, 0.3367]}, {"w": "range", "b": [0.243, 0.3217, 0.2871, 0.3367]}, {"w": "for", "b": [0.2933, 0.3217, 0.3154, 0.3367]}, {"w": "a", "b": [0.3215, 0.3217, 0.3308, 0.3367]}, {"w": "numerical", "b": [0.3369, 0.3217, 0.4154, 0.3367]}, {"w": "target.", "b": [0.4216, 0.3217, 0.4749, 0.3367]}]}, {"id": "b_3", "type": "paragraph", "text": "For every sensitive data asset, a data lifecycle document has to describe the asset, the circle of persons who have access to that data asset both during and after the project development.", "words": [{"w": "For", "b": [0.1312, 0.3487, 0.1579, 0.3636]}, {"w": "every", "b": [0.1641, 0.3487, 0.2063, 0.3636]}, {"w": "sensitive", "b": [0.2125, 0.3487, 0.2798, 0.3636]}, {"w": "data", "b": [0.2859, 0.3487, 0.3215, 0.3636]}, {"w": "asset,", "b": [0.3276, 0.3487, 0.3715, 0.3636]}, {"w": "a", "b": [0.3777, 0.3487, 0.3869, 0.3636]}, {"w": "data", "b": [0.393, 0.3487, 0.4286, 0.3636]}, {"w": "lifecycle", "b": [0.4347, 0.3487, 0.4978, 0.3636]}, {"w": "document", "b": [0.5039, 0.3487, 0.5822, 0.3636]}, {"w": "has", "b": [0.5883, 0.3487, 0.6148, 0.3636]}, {"w": "to", "b": [0.621, 0.3487, 0.6372, 0.3636]}, {"w": "describe", "b": [0.6434, 0.3487, 0.7081, 0.3636]}, {"w": "the", "b": [0.7143, 0.3487, 0.7397, 0.3636]}, {"w": "asset,", "b": [0.7458, 0.3487, 0.7897, 0.3636]}, {"w": "the", "b": [0.7959, 0.3487, 0.8213, 0.3636]}, {"w": "circle", "b": [0.8275, 0.3487, 0.8692, 0.3636]}, {"w": "of", "b": [0.1312, 0.3667, 0.1458, 0.3815]}, {"w": "persons", "b": [0.1519, 0.3667, 0.211, 0.3815]}, {"w": "who", "b": [0.2171, 0.3667, 0.2492, 0.3815]}, {"w": "have", "b": [0.2553, 0.3667, 0.291, 0.3815]}, {"w": "access", "b": [0.2971, 0.3667, 0.3445, 0.3815]}, {"w": "to", "b": [0.3506, 0.3667, 0.3667, 0.3815]}, {"w": "that", "b": [0.3728, 0.3667, 0.4059, 0.3815]}, {"w": "data", "b": [0.412, 0.3667, 0.4472, 0.3815]}, {"w": "asset", "b": [0.4533, 0.3667, 0.4917, 0.3815]}, {"w": "both", "b": [0.4978, 0.3667, 0.5345, 0.3815]}, {"w": "during", "b": [0.5406, 0.3667, 0.5919, 0.3815]}, {"w": "and", "b": [0.598, 0.3667, 0.6271, 0.3815]}, {"w": "after", "b": [0.6332, 0.3667, 0.67, 0.3815]}, {"w": "the", "b": [0.676, 0.3667, 0.7012, 0.3815]}, {"w": "project", "b": [0.7073, 0.3667, 0.7626, 0.3815]}, {"w": "development.", "b": [0.7687, 0.3667, 0.8727, 0.3815]}]}, {"id": "b_4", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 46", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "46", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 90, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 91, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 92, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "4 Feature Engineering", "words": [{"w": "4", "b": [0.1312, 0.0833, 0.1462, 0.1048]}, {"w": "Feature", "b": [0.1761, 0.0833, 0.2746, 0.1048]}, {"w": "Engineering", "b": [0.2846, 0.0833, 0.44, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "After data collection and preparation, feature engineering is the second most important activity in machine learning. It’s also the third stage in the machine learning project life cycle:", "words": [{"w": "After", "b": [0.1305, 0.1298, 0.1718, 0.1448]}, {"w": "data", "b": [0.176, 0.1298, 0.2112, 0.1448]}, {"w": "collection", "b": [0.2154, 0.1298, 0.2898, 0.1448]}, {"w": "and", "b": [0.2941, 0.1298, 0.3232, 0.1448]}, {"w": "preparation,", "b": [0.3274, 0.1298, 0.424, 0.1448]}, {"w": "feature", "b": [0.4286, 0.1298, 0.4835, 0.1448]}, {"w": "engineering", "b": [0.4877, 0.1298, 0.5772, 0.1448]}, {"w": "is", "b": [0.5815, 0.1298, 0.5936, 0.1448]}, {"w": "the", "b": [0.5979, 0.1298, 0.623, 0.1448]}, {"w": "second", "b": [0.6272, 0.1298, 0.6796, 0.1448]}, {"w": "most", "b": [0.6839, 0.1298, 0.7221, 0.1448]}, {"w": "important", "b": [0.7264, 0.1298, 0.8058, 0.1448]}, {"w": "activity", "b": [0.81, 0.1298, 0.8698, 0.1448]}, {"w": "in", "b": [0.1312, 0.1478, 0.1466, 0.1627]}, {"w": "machine", "b": [0.1528, 0.1478, 0.2189, 0.1627]}, {"w": "learning.", "b": [0.2251, 0.1478, 0.2948, 0.1627]}, {"w": "It’s", "b": [0.3031, 0.1478, 0.3293, 0.1627]}, {"w": "also", "b": [0.3354, 0.1478, 0.3663, 0.1627]}, {"w": "the", "b": [0.3725, 0.1478, 0.3981, 0.1627]}, {"w": "third", "b": [0.4043, 0.1478, 0.4443, 0.1627]}, {"w": "stage", "b": [0.4505, 0.1478, 0.4916, 0.1627]}, {"w": "in", "b": [0.4977, 0.1478, 0.5131, 0.1627]}, {"w": "the", "b": [0.5193, 0.1478, 0.5449, 0.1627]}, {"w": "machine", "b": [0.5511, 0.1478, 0.6172, 0.1627]}, {"w": "learning", "b": [0.6233, 0.1478, 0.688, 0.1627]}, {"w": "project", "b": [0.6942, 0.1478, 0.7506, 0.1627]}, {"w": "life", "b": [0.7568, 0.1478, 0.7809, 0.1627]}, {"w": "cycle:", "b": [0.787, 0.1478, 0.8317, 0.1627]}]}, {"id": "b_2", "type": "paragraph", "text": "Figure 1: Machine learning project life cycle.", "words": [{"w": "Figure", "b": [0.3186, 0.4662, 0.3707, 0.4812]}, {"w": "1:", "b": [0.3769, 0.4662, 0.3912, 0.4812]}, {"w": "Machine", "b": [0.3994, 0.4662, 0.4671, 0.4812]}, {"w": "learning", "b": [0.4733, 0.4662, 0.5379, 0.4812]}, {"w": "project", "b": [0.5441, 0.4662, 0.6006, 0.4812]}, {"w": "life", "b": [0.6067, 0.4662, 0.6308, 0.4812]}, {"w": "cycle.", "b": [0.637, 0.4662, 0.6816, 0.4812]}]}, {"id": "b_3", "type": "paragraph", "text": "Feature engineering is a process of first conceptually and then programmatically transforming a raw example into a feature vector. It consists of conceptualizing a feature and then writing the programming code that would transform the entire raw example, with potentially the help of some indirect data, into a feature.", "words": [{"w": "Feature", "b": [0.1312, 0.5165, 0.1908, 0.5314]}, {"w": "engineering", "b": [0.1963, 0.5165, 0.2859, 0.5314]}, {"w": "is", "b": [0.2914, 0.5165, 0.3036, 0.5314]}, {"w": "a", "b": [0.3091, 0.5165, 0.3181, 0.5314]}, {"w": "process", "b": [0.3237, 0.5165, 0.3807, 0.5314]}, {"w": "of", "b": [0.3863, 0.5165, 0.4008, 0.5314]}, {"w": "first", "b": [0.4064, 0.5165, 0.4377, 0.5314]}, {"w": "conceptually", "b": [0.4432, 0.5165, 0.5422, 0.5314]}, {"w": "and", "b": [0.5477, 0.5165, 0.5769, 0.5314]}, {"w": "then", "b": [0.5824, 0.5165, 0.6176, 0.5314]}, {"w": "programmatically", "b": [0.6232, 0.5165, 0.7624, 0.5314]}, {"w": "transforming", "b": [0.7679, 0.5165, 0.8691, 0.5314]}, {"w": "a", "b": [0.1312, 0.5344, 0.1403, 0.5494]}, {"w": "raw", "b": [0.1463, 0.5344, 0.175, 0.5494]}, {"w": "example", "b": [0.181, 0.5344, 0.2458, 0.5494]}, {"w": "into", "b": [0.2519, 0.5344, 0.2825, 0.5494]}, {"w": "a", "b": [0.2885, 0.5344, 0.2976, 0.5494]}, {"w": "feature", "b": [0.3036, 0.5344, 0.3584, 0.5494]}, {"w": "vector.", "b": [0.3645, 0.5344, 0.4178, 0.5494]}, {"w": "It", "b": [0.4259, 0.5344, 0.4395, 0.5494]}, {"w": "consists", "b": [0.4455, 0.5344, 0.5062, 0.5494]}, {"w": "of", "b": [0.5122, 0.5344, 0.5268, 0.5494]}, {"w": "conceptualizing", "b": [0.5328, 0.5344, 0.6544, 0.5494]}, {"w": "a", "b": [0.6605, 0.5344, 0.6695, 0.5494]}, {"w": "feature", "b": [0.6755, 0.5344, 0.7304, 0.5494]}, {"w": "and", "b": [0.7364, 0.5344, 0.7655, 0.5494]}, {"w": "then", "b": [0.7716, 0.5344, 0.8068, 0.5494]}, {"w": "writing", "b": [0.8128, 0.5344, 0.8691, 0.5494]}, {"w": "the", "b": [0.1312, 0.5524, 0.1574, 0.5673]}, {"w": "programming", "b": [0.1636, 0.5524, 0.2735, 0.5673]}, {"w": "code", "b": [0.2797, 0.5524, 0.3169, 0.5673]}, {"w": "that", "b": [0.3231, 0.5524, 0.3576, 0.5673]}, {"w": "would", "b": [0.3638, 0.5524, 0.4125, 0.5673]}, {"w": "transform", "b": [0.4187, 0.5524, 0.4989, 0.5673]}, {"w": "the", "b": [0.5052, 0.5524, 0.5313, 0.5673]}, {"w": "entire", "b": [0.5376, 0.5524, 0.5842, 0.5673]}, {"w": "raw", "b": [0.5904, 0.5524, 0.6203, 0.5673]}, {"w": "example,", "b": [0.6265, 0.5524, 0.6992, 0.5673]}, {"w": "with", "b": [0.7055, 0.5524, 0.7421, 0.5673]}, {"w": "potentially", "b": [0.7483, 0.5524, 0.8367, 0.5673]}, {"w": "the", "b": [0.8429, 0.5524, 0.8691, 0.5673]}, {"w": "help", "b": [0.1312, 0.5703, 0.1651, 0.5853]}, {"w": "of", "b": [0.1712, 0.5703, 0.1861, 0.5853]}, {"w": "some", "b": [0.1922, 0.5703, 0.2323, 0.5853]}, {"w": "indirect", "b": [0.2385, 0.5703, 0.3001, 0.5853]}, {"w": "data,", "b": [0.3062, 0.5703, 0.3473, 0.5853]}, {"w": "into", "b": [0.3534, 0.5703, 0.3847, 0.5853]}, {"w": "a", "b": [0.3908, 0.5703, 0.4001, 0.5853]}, {"w": "feature.", "b": [0.4062, 0.5703, 0.4673, 0.5853]}]}, {"id": "b_4", "type": "paragraph", "text": "4.1 Why Engineer Features", "words": [{"w": "4.1", "b": [0.1312, 0.6191, 0.1631, 0.6371]}, {"w": "Why", "b": [0.188, 0.6191, 0.24, 0.6371]}, {"w": "Engineer", "b": [0.2483, 0.6191, 0.3446, 0.6371]}, {"w": "Features", "b": [0.3529, 0.6191, 0.4449, 0.6371]}]}, {"id": "b_5", "type": "paragraph", "text": "To be more specific, consider the problem of recognizing movie titles in tweets. Say you have a vast collection of movie titles; this is data to use indirectly. You also have a collection of tweets; this data will be used directly to create examples. First, build an index of movie titles for fast string matching.1 Then find all movie title matches in your tweets. Now stipulate that your examples are matches, and your machine learning problem is that of binary classification: whether a match is a movie, or is not a movie.", "words": [{"w": "To", "b": [0.1306, 0.6577, 0.1511, 0.6727]}, {"w": "be", "b": [0.1573, 0.6577, 0.1759, 0.6727]}, {"w": "more", "b": [0.182, 0.6577, 0.2213, 0.6727]}, {"w": "specific,", "b": [0.2274, 0.6577, 0.2894, 0.6727]}, {"w": "consider", "b": [0.2955, 0.6577, 0.36, 0.6727]}, {"w": "the", "b": [0.3662, 0.6577, 0.3913, 0.6727]}, {"w": "problem", "b": [0.3974, 0.6577, 0.4618, 0.6727]}, {"w": "of", "b": [0.4679, 0.6577, 0.4825, 0.6727]}, {"w": "recognizing", "b": [0.4887, 0.6577, 0.5772, 0.6727]}, {"w": "movie", "b": [0.5833, 0.6577, 0.6295, 0.6727]}, {"w": "titles", "b": [0.6357, 0.6577, 0.675, 0.6727]}, {"w": "in", "b": [0.6811, 0.6577, 0.6962, 0.6727]}, {"w": "tweets.", "b": [0.7024, 0.6577, 0.7567, 0.6727]}, {"w": "Say", "b": [0.7649, 0.6577, 0.793, 0.6727]}, {"w": "you", "b": [0.7992, 0.6577, 0.8273, 0.6727]}, {"w": "have", "b": [0.8335, 0.6577, 0.8691, 0.6727]}, {"w": "a", "b": [0.1312, 0.6757, 0.1403, 0.6906]}, {"w": "vast", "b": [0.1465, 0.6757, 0.1785, 0.6906]}, {"w": "collection", "b": [0.1846, 0.6757, 0.2596, 0.6906]}, {"w": "of", "b": [0.2658, 0.6757, 0.2805, 0.6906]}, {"w": "movie", "b": [0.2866, 0.6757, 0.3332, 0.6906]}, {"w": "titles;", "b": [0.3394, 0.6757, 0.3841, 0.6906]}, {"w": "this", "b": [0.3902, 0.6757, 0.4197, 0.6906]}, {"w": "is", "b": [0.4258, 0.6757, 0.4381, 0.6906]}, {"w": "data", "b": [0.4443, 0.6757, 0.4797, 0.6906]}, {"w": "to", "b": [0.4859, 0.6757, 0.5021, 0.6906]}, {"w": "use", "b": [0.5082, 0.6757, 0.5337, 0.6906]}, {"w": "indirectly.", "b": [0.5396, 0.6757, 0.6333, 0.6909]}, {"w": "You", "b": [0.6415, 0.6757, 0.6729, 0.6906]}, {"w": "also", "b": [0.679, 0.6757, 0.7095, 0.6906]}, {"w": "have", "b": [0.7157, 0.6757, 0.7516, 0.6906]}, {"w": "a", "b": [0.7578, 0.6757, 0.7669, 0.6906]}, {"w": "collection", "b": [0.773, 0.6757, 0.848, 0.6906]}, {"w": "of", "b": [0.8542, 0.6757, 0.8689, 0.6906]}, {"w": "tweets;", "b": [0.1312, 0.6936, 0.1878, 0.7086]}, {"w": "this", "b": [0.1943, 0.6936, 0.2247, 0.7086]}, {"w": "data", "b": [0.231, 0.6936, 0.2676, 0.7086]}, {"w": "will", "b": [0.274, 0.6936, 0.3033, 0.7086]}, {"w": "be", "b": [0.3096, 0.6936, 0.3289, 0.7086]}, {"w": "used", "b": [0.3353, 0.6936, 0.372, 0.7086]}, {"w": "directly", "b": [0.3782, 0.6939, 0.4491, 0.7089]}, {"w": "to", "b": [0.4555, 0.6936, 0.4722, 0.7086]}, {"w": "create", "b": [0.4785, 0.6936, 0.5277, 0.7086]}, {"w": "examples.", "b": [0.5341, 0.6936, 0.6142, 0.7086]}, {"w": "First,", "b": [0.6229, 0.6936, 0.6678, 0.7086]}, {"w": "build", "b": [0.6742, 0.6936, 0.716, 0.7086]}, {"w": "an", "b": [0.7224, 0.6936, 0.7422, 0.7086]}, {"w": "index", "b": [0.7486, 0.6936, 0.793, 0.7086]}, {"w": "of", "b": [0.7994, 0.6936, 0.8145, 0.7086]}, {"w": "movie", "b": [0.8208, 0.6936, 0.869, 0.7086]}, {"w": "titles", "b": [0.1312, 0.7116, 0.1721, 0.7265]}, {"w": "for", "b": [0.18, 0.7116, 0.2025, 0.7265]}, {"w": "fast", "b": [0.2104, 0.7116, 0.2403, 0.7265]}, {"w": "string", "b": [0.2481, 0.7116, 0.2954, 0.7265]}, {"w": "matching.1", "b": [0.3032, 0.7099, 0.3915, 0.7265]}, {"w": "Then", "b": [0.4057, 0.7116, 0.4486, 0.7265]}, {"w": "find", "b": [0.4565, 0.7116, 0.4878, 0.7265]}, {"w": "all", "b": [0.4957, 0.7116, 0.5156, 0.7265]}, {"w": "movie", "b": [0.5234, 0.7116, 0.5715, 0.7265]}, {"w": "title", "b": [0.5794, 0.7116, 0.6128, 0.7265]}, {"w": "matches", "b": [0.6207, 0.7116, 0.6872, 0.7265]}, {"w": "in", "b": [0.695, 0.7116, 0.7107, 0.7265]}, {"w": "your", "b": [0.7186, 0.7116, 0.7553, 0.7265]}, {"w": "tweets.", "b": [0.7631, 0.7116, 0.8197, 0.7265]}, {"w": "Now", "b": [0.833, 0.7116, 0.8696, 0.7265]}, {"w": "stipulate", "b": [0.1312, 0.7295, 0.2025, 0.7445]}, {"w": "that", "b": [0.2097, 0.7295, 0.2442, 0.7445]}, {"w": "your", "b": [0.2514, 0.7295, 0.2881, 0.7445]}, {"w": "examples", "b": [0.2953, 0.7295, 0.3701, 0.7445]}, {"w": "are", "b": [0.3773, 0.7295, 0.4025, 0.7445]}, {"w": "matches,", "b": [0.4097, 0.7295, 0.4815, 0.7445]}, {"w": "and", "b": [0.4889, 0.7295, 0.5193, 0.7445]}, {"w": "your", "b": [0.5265, 0.7295, 0.5631, 0.7445]}, {"w": "machine", "b": [0.5703, 0.7295, 0.6378, 0.7445]}, {"w": "learning", "b": [0.645, 0.7295, 0.711, 0.7445]}, {"w": "problem", "b": [0.7182, 0.7295, 0.7851, 0.7445]}, {"w": "is", "b": [0.7924, 0.7295, 0.805, 0.7445]}, {"w": "that", "b": [0.8122, 0.7295, 0.8467, 0.7445]}, {"w": "of", "b": [0.8539, 0.7295, 0.8691, 0.7445]}, {"w": "binary", "b": [0.1312, 0.7475, 0.1831, 0.7624]}, {"w": "classification:", "b": [0.1892, 0.7475, 0.2961, 0.7624]}, {"w": "whether", "b": [0.3043, 0.7475, 0.369, 0.7624]}, {"w": "a", "b": [0.3751, 0.7475, 0.3843, 0.7624]}, {"w": "match", "b": [0.3905, 0.7475, 0.4402, 0.7624]}, {"w": "is", "b": [0.4463, 0.7475, 0.4588, 0.7624]}, {"w": "a", "b": [0.4649, 0.7475, 0.4741, 0.7624]}, {"w": "movie,", "b": [0.4803, 0.7475, 0.5326, 0.7624]}, {"w": "or", "b": [0.5387, 0.7475, 0.5552, 0.7624]}, {"w": "is", "b": [0.5613, 0.7475, 0.5738, 0.7624]}, {"w": "not", "b": [0.5799, 0.7475, 0.6066, 0.7624]}, {"w": "a", "b": [0.6127, 0.7475, 0.6219, 0.7624]}, {"w": "movie.", "b": [0.6281, 0.7475, 0.6804, 0.7624]}]}, {"id": "b_6", "type": "paragraph", "text": "Consider the following tweet:", "words": [{"w": "Consider", "b": [0.1312, 0.7744, 0.2022, 0.7893]}, {"w": "the", "b": [0.2083, 0.7744, 0.2339, 0.7893]}, {"w": "following", "b": [0.2401, 0.7744, 0.3119, 0.7893]}, {"w": "tweet:", "b": [0.318, 0.7744, 0.3662, 0.7893]}]}, {"id": "b_7", "type": "paragraph", "text": "1To build an index for fast string matching, you can, for example, use the Aho–Corasick algorithm.", "words": [{"w": "1To", "b": [0.1518, 0.8014, 0.1773, 0.8153]}, {"w": "build", "b": [0.1825, 0.8033, 0.2174, 0.8153]}, {"w": "an", "b": [0.2226, 0.8033, 0.2391, 0.8153]}, {"w": "index", "b": [0.2444, 0.8033, 0.2814, 0.8153]}, {"w": "for", "b": [0.2866, 0.8033, 0.3054, 0.8153]}, {"w": "fast", "b": [0.3106, 0.8033, 0.3355, 0.8153]}, {"w": "string", "b": [0.3407, 0.8033, 0.38, 0.8153]}, {"w": "matching,", "b": [0.3853, 0.8033, 0.4527, 0.8153]}, {"w": "you", "b": [0.458, 0.8033, 0.4824, 0.8153]}, {"w": "can,", "b": [0.4876, 0.8033, 0.5154, 0.8153]}, {"w": "for", "b": [0.5207, 0.8033, 0.5394, 0.8153]}, {"w": "example,", "b": [0.5446, 0.8033, 0.6052, 0.8153]}, {"w": "use", "b": [0.6104, 0.8033, 0.6323, 0.8153]}, {"w": "the", "b": [0.6375, 0.8033, 0.6593, 0.8153]}, {"w": "Aho–Corasick", "b": [0.6646, 0.8033, 0.774, 0.8152]}, {"w": "algorithm.", "b": [0.78, 0.8033, 0.8609, 0.8153]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "3", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 93, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 2: A tweet from Kyle.", "words": [{"w": "Figure", "b": [0.382, 0.3429, 0.4341, 0.3579]}, {"w": "2:", "b": [0.4402, 0.3429, 0.4545, 0.3579]}, {"w": "A", "b": [0.4628, 0.3429, 0.4766, 0.3579]}, {"w": "tweet", "b": [0.4827, 0.3429, 0.5258, 0.3579]}, {"w": "from", "b": [0.532, 0.3429, 0.5694, 0.3579]}, {"w": "Kyle.", "b": [0.5756, 0.3429, 0.6181, 0.3579]}]}, {"id": "b_1", "type": "paragraph", "text": "Our movie title matching index would help us find the following matches: “avatar,” “the terminator,” “It,” and “her”. That gives us four unlabeled examples. You can label those four examples: {(avatar, False), (the terminator, True), (It, False), (her, False)}. However, a machine learning algorithm cannot learn anything from the movie title alone (neither can a human): it needs a context. You might decide that the five words preceding the match and the five words following it are a sufficiently informative context. In machine learning jargon, we call such a context a “ten-word window” around a match. You can tune the width of the window as a hyperparameter.", "words": [{"w": "Our", "b": [0.1312, 0.3932, 0.1637, 0.4081]}, {"w": "movie", "b": [0.1705, 0.3932, 0.2186, 0.4081]}, {"w": "title", "b": [0.2253, 0.3932, 0.2588, 0.4081]}, {"w": "matching", "b": [0.2655, 0.3932, 0.3414, 0.4081]}, {"w": "index", "b": [0.3481, 0.3932, 0.3926, 0.4081]}, {"w": "would", "b": [0.3993, 0.3932, 0.448, 0.4081]}, {"w": "help", "b": [0.4547, 0.3932, 0.4893, 0.4081]}, {"w": "us", "b": [0.496, 0.3932, 0.5139, 0.4081]}, {"w": "find", "b": [0.5206, 0.3932, 0.552, 0.4081]}, {"w": "the", "b": [0.5588, 0.3932, 0.5849, 0.4081]}, {"w": "following", "b": [0.5917, 0.3932, 0.6649, 0.4081]}, {"w": "matches:", "b": [0.6717, 0.3932, 0.7434, 0.4081]}, {"w": "“avatar,”", "b": [0.7528, 0.3932, 0.8271, 0.4081]}, {"w": "“the", "b": [0.834, 0.3932, 0.8691, 0.4081]}, {"w": "terminator,”", "b": [0.1312, 0.4111, 0.2333, 0.4261]}, {"w": "“It,”", "b": [0.2397, 0.4111, 0.2768, 0.4261]}, {"w": "and", "b": [0.2833, 0.4111, 0.3136, 0.4261]}, {"w": "“her”.", "b": [0.32, 0.4111, 0.3666, 0.4261]}, {"w": "That", "b": [0.3756, 0.4111, 0.4163, 0.4261]}, {"w": "gives", "b": [0.4227, 0.4111, 0.4626, 0.4261]}, {"w": "us", "b": [0.469, 0.4111, 0.4869, 0.4261]}, {"w": "four", "b": [0.4933, 0.4111, 0.5263, 0.4261]}, {"w": "unlabeled", "b": [0.5326, 0.4111, 0.6116, 0.4261]}, {"w": "examples.", "b": [0.618, 0.4111, 0.6981, 0.4261]}, {"w": "You", "b": [0.707, 0.4111, 0.7395, 0.4261]}, {"w": "can", "b": [0.7459, 0.4111, 0.7741, 0.4261]}, {"w": "label", "b": [0.7805, 0.4111, 0.8197, 0.4261]}, {"w": "those", "b": [0.8261, 0.4111, 0.8691, 0.4261]}, {"w": "four", "b": [0.1312, 0.429, 0.1642, 0.444]}, {"w": "examples:", "b": [0.1712, 0.429, 0.2513, 0.444]}, {"w": "{(avatar,", "b": [0.261, 0.429, 0.3329, 0.4443]}, {"w": "False),", "b": [0.336, 0.429, 0.3888, 0.4443]}, {"w": "(the", "b": [0.3919, 0.429, 0.4248, 0.444]}, {"w": "terminator,", "b": [0.431, 0.429, 0.5223, 0.4443]}, {"w": "True),", "b": [0.5254, 0.429, 0.5753, 0.4443]}, {"w": "(It,", "b": [0.5783, 0.429, 0.6046, 0.4443]}, {"w": "False),", "b": [0.6077, 0.429, 0.6605, 0.4443]}, {"w": "(her,", "b": [0.6635, 0.429, 0.7017, 0.4443]}, {"w": "False)}.", "b": [0.7047, 0.429, 0.7668, 0.4441]}, {"w": "However,", "b": [0.7774, 0.429, 0.8523, 0.444]}, {"w": "a", "b": [0.8594, 0.429, 0.8688, 0.444]}, {"w": "machine", "b": [0.1312, 0.447, 0.1972, 0.4619]}, {"w": "learning", "b": [0.2033, 0.447, 0.2678, 0.4619]}, {"w": "algorithm", "b": [0.274, 0.447, 0.3517, 0.4619]}, {"w": "cannot", "b": [0.3579, 0.447, 0.4121, 0.4619]}, {"w": "learn", "b": [0.4182, 0.447, 0.4582, 0.4619]}, {"w": "anything", "b": [0.4643, 0.447, 0.5349, 0.4619]}, {"w": "from", "b": [0.541, 0.447, 0.5784, 0.4619]}, {"w": "the", "b": [0.5846, 0.447, 0.6101, 0.4619]}, {"w": "movie", "b": [0.6163, 0.447, 0.6633, 0.4619]}, {"w": "title", "b": [0.6695, 0.447, 0.7022, 0.4619]}, {"w": "alone", "b": [0.7084, 0.447, 0.7503, 0.4619]}, {"w": "(neither", "b": [0.7565, 0.447, 0.8199, 0.4619]}, {"w": "can", "b": [0.8261, 0.447, 0.8537, 0.4619]}, {"w": "a", "b": [0.8599, 0.447, 0.8691, 0.4619]}, {"w": "human):", "b": [0.1312, 0.4649, 0.1983, 0.4799]}, {"w": "it", "b": [0.2065, 0.4649, 0.2188, 0.4799]}, {"w": "needs", "b": [0.225, 0.4649, 0.2691, 0.4799]}, {"w": "a", "b": [0.2753, 0.4649, 0.2845, 0.4799]}, {"w": "context.", "b": [0.2906, 0.4649, 0.3552, 0.4799]}, {"w": "You", "b": [0.3634, 0.4649, 0.3951, 0.4799]}, {"w": "might", "b": [0.4013, 0.4649, 0.4479, 0.4799]}, {"w": "decide", "b": [0.454, 0.4649, 0.5042, 0.4799]}, {"w": "that", "b": [0.5104, 0.4649, 0.5442, 0.4799]}, {"w": "the", "b": [0.5503, 0.4649, 0.5759, 0.4799]}, {"w": "five", "b": [0.5821, 0.4649, 0.6097, 0.4799]}, {"w": "words", "b": [0.6159, 0.4649, 0.6626, 0.4799]}, {"w": "preceding", "b": [0.6688, 0.4649, 0.7457, 0.4799]}, {"w": "the", "b": [0.7518, 0.4649, 0.7774, 0.4799]}, {"w": "match", "b": [0.7836, 0.4649, 0.8333, 0.4799]}, {"w": "and", "b": [0.8394, 0.4649, 0.8691, 0.4799]}, {"w": "the", "b": [0.1312, 0.4829, 0.1566, 0.4978]}, {"w": "five", "b": [0.1628, 0.4829, 0.1902, 0.4978]}, {"w": "words", "b": [0.1964, 0.4829, 0.2428, 0.4978]}, {"w": "following", "b": [0.2489, 0.4829, 0.32, 0.4978]}, {"w": "it", "b": [0.3262, 0.4829, 0.3384, 0.4978]}, {"w": "are", "b": [0.3445, 0.4829, 0.369, 0.4978]}, {"w": "a", "b": [0.3751, 0.4829, 0.3843, 0.4978]}, {"w": "sufficiently", "b": [0.3904, 0.4829, 0.4759, 0.4978]}, {"w": "informative", "b": [0.482, 0.4829, 0.573, 0.4978]}, {"w": "context.", "b": [0.5792, 0.4829, 0.6432, 0.4978]}, {"w": "In", "b": [0.6514, 0.4829, 0.6682, 0.4978]}, {"w": "machine", "b": [0.6743, 0.4829, 0.7398, 0.4978]}, {"w": "learning", "b": [0.746, 0.4829, 0.8101, 0.4978]}, {"w": "jargon,", "b": [0.8162, 0.4829, 0.8716, 0.4978]}, {"w": "we", "b": [0.1306, 0.5008, 0.1513, 0.5158]}, {"w": "call", "b": [0.1575, 0.5008, 0.1848, 0.5158]}, {"w": "such", "b": [0.191, 0.5008, 0.226, 0.5158]}, {"w": "a", "b": [0.2321, 0.5008, 0.2412, 0.5158]}, {"w": "context", "b": [0.2474, 0.5008, 0.3061, 0.5158]}, {"w": "a", "b": [0.3123, 0.5008, 0.3214, 0.5158]}, {"w": "“ten-word", "b": [0.3275, 0.5008, 0.4065, 0.5158]}, {"w": "window”", "b": [0.4127, 0.5008, 0.4815, 0.5158]}, {"w": "around", "b": [0.4876, 0.5008, 0.5433, 0.5158]}, {"w": "a", "b": [0.5495, 0.5008, 0.5586, 0.5158]}, {"w": "match.", "b": [0.5648, 0.5008, 0.6189, 0.5158]}, {"w": "You", "b": [0.6271, 0.5008, 0.6585, 0.5158]}, {"w": "can", "b": [0.6646, 0.5008, 0.692, 0.5158]}, {"w": "tune", "b": [0.6981, 0.5008, 0.7336, 0.5158]}, {"w": "the", "b": [0.7397, 0.5008, 0.765, 0.5158]}, {"w": "width", "b": [0.7712, 0.5008, 0.8167, 0.5158]}, {"w": "of", "b": [0.8229, 0.5008, 0.8376, 0.5158]}, {"w": "the", "b": [0.8437, 0.5008, 0.869, 0.5158]}, {"w": "window", "b": [0.1306, 0.5188, 0.1916, 0.5337]}, {"w": "as", "b": [0.1977, 0.5188, 0.2142, 0.5337]}, {"w": "a", "b": [0.2204, 0.5188, 0.2296, 0.5337]}, {"w": "hyperparameter.", "b": [0.2357, 0.5188, 0.3687, 0.5337]}]}, {"id": "b_2", "type": "paragraph", "text": "Now, your examples are labeled matches in their context. However, a learning algorithm cannot be applied to such data. Machine learning algorithms can only apply to feature vectors. This is why you resort to feature engineering.", "words": [{"w": "Now,", "b": [0.1312, 0.5457, 0.1731, 0.5607]}, {"w": "your", "b": [0.18, 0.5457, 0.2166, 0.5607]}, {"w": "examples", "b": [0.2234, 0.5457, 0.2983, 0.5607]}, {"w": "are", "b": [0.305, 0.5457, 0.3302, 0.5607]}, {"w": "labeled", "b": [0.3369, 0.5457, 0.395, 0.5607]}, {"w": "matches", "b": [0.4017, 0.5457, 0.4683, 0.5607]}, {"w": "in", "b": [0.475, 0.5457, 0.4907, 0.5607]}, {"w": "their", "b": [0.4975, 0.5457, 0.5362, 0.5607]}, {"w": "context.", "b": [0.543, 0.5457, 0.6089, 0.5607]}, {"w": "However,", "b": [0.6189, 0.5457, 0.6938, 0.5607]}, {"w": "a", "b": [0.7007, 0.5457, 0.7101, 0.5607]}, {"w": "learning", "b": [0.7168, 0.5457, 0.7828, 0.5607]}, {"w": "algorithm", "b": [0.7896, 0.5457, 0.8691, 0.5607]}, {"w": "cannot", "b": [0.1312, 0.5636, 0.1867, 0.5786]}, {"w": "be", "b": [0.1943, 0.5636, 0.2136, 0.5786]}, {"w": "applied", "b": [0.2213, 0.5636, 0.2809, 0.5786]}, {"w": "to", "b": [0.2885, 0.5636, 0.3052, 0.5786]}, {"w": "such", "b": [0.3129, 0.5636, 0.3491, 0.5786]}, {"w": "data.", "b": [0.3567, 0.5636, 0.3985, 0.5786]}, {"w": "Machine", "b": [0.4112, 0.5636, 0.4802, 0.5786]}, {"w": "learning", "b": [0.4879, 0.5636, 0.5538, 0.5786]}, {"w": "algorithms", "b": [0.5614, 0.5636, 0.6484, 0.5786]}, {"w": "can", "b": [0.656, 0.5636, 0.6843, 0.5786]}, {"w": "only", "b": [0.6919, 0.5636, 0.7269, 0.5786]}, {"w": "apply", "b": [0.7345, 0.5636, 0.78, 0.5786]}, {"w": "to", "b": [0.7877, 0.5636, 0.8044, 0.5786]}, {"w": "feature", "b": [0.812, 0.5636, 0.8691, 0.5786]}, {"w": "vectors.", "b": [0.1308, 0.5816, 0.1924, 0.5965]}, {"w": "This", "b": [0.2006, 0.5816, 0.2366, 0.5965]}, {"w": "is", "b": [0.2428, 0.5816, 0.2552, 0.5965]}, {"w": "why", "b": [0.2614, 0.5816, 0.2942, 0.5965]}, {"w": "you", "b": [0.3003, 0.5816, 0.329, 0.5965]}, {"w": "resort", "b": [0.3352, 0.5816, 0.3815, 0.5965]}, {"w": "to", "b": [0.3877, 0.5816, 0.4041, 0.5965]}, {"w": "feature", "b": [0.4102, 0.5816, 0.4662, 0.5965]}, {"w": "engineering.", "b": [0.4723, 0.5816, 0.5688, 0.5965]}]}, {"id": "b_3", "type": "paragraph", "text": "4.2 How to Engineer Features", "words": [{"w": "4.2", "b": [0.1312, 0.6304, 0.1631, 0.6484]}, {"w": "How", "b": [0.188, 0.6304, 0.2373, 0.6484]}, {"w": "to", "b": [0.2456, 0.6304, 0.2677, 0.6484]}, {"w": "Engineer", "b": [0.276, 0.6304, 0.3723, 0.6484]}, {"w": "Features", "b": [0.3806, 0.6304, 0.4726, 0.6484]}]}, {"id": "b_4", "type": "paragraph", "text": "Feature engineering is a creative process where the analyst applies their imagination, intuition, and domain expertise. In our illustrative problem of movie title recognition in tweets, we used our intuition to fix the width of the window around the match to ten. Now, we need to be even more creative to transform string sequences into numerical vectors.", "words": [{"w": "Feature", "b": [0.1312, 0.669, 0.1908, 0.684]}, {"w": "engineering", "b": [0.1958, 0.669, 0.2853, 0.684]}, {"w": "is", "b": [0.2904, 0.669, 0.3025, 0.684]}, {"w": "a", "b": [0.3076, 0.669, 0.3166, 0.684]}, {"w": "creative", "b": [0.3216, 0.669, 0.383, 0.684]}, {"w": "process", "b": [0.388, 0.669, 0.4451, 0.684]}, {"w": "where", "b": [0.4501, 0.669, 0.4964, 0.684]}, {"w": "the", "b": [0.5014, 0.669, 0.5266, 0.684]}, {"w": "analyst", "b": [0.5316, 0.669, 0.5884, 0.684]}, {"w": "applies", "b": [0.5935, 0.669, 0.6479, 0.684]}, {"w": "their", "b": [0.6529, 0.669, 0.6901, 0.684]}, {"w": "imagination,", "b": [0.6952, 0.669, 0.7936, 0.684]}, {"w": "intuition,", "b": [0.7989, 0.669, 0.8717, 0.684]}, {"w": "and", "b": [0.1312, 0.687, 0.1616, 0.7019]}, {"w": "domain", "b": [0.1681, 0.687, 0.2287, 0.7019]}, {"w": "expertise.", "b": [0.2352, 0.687, 0.3138, 0.7019]}, {"w": "In", "b": [0.323, 0.687, 0.3403, 0.7019]}, {"w": "our", "b": [0.3468, 0.687, 0.374, 0.7019]}, {"w": "illustrative", "b": [0.3805, 0.687, 0.4686, 0.7019]}, {"w": "problem", "b": [0.475, 0.687, 0.542, 0.7019]}, {"w": "of", "b": [0.5485, 0.687, 0.5637, 0.7019]}, {"w": "movie", "b": [0.5702, 0.687, 0.6183, 0.7019]}, {"w": "title", "b": [0.6248, 0.687, 0.6583, 0.7019]}, {"w": "recognition", "b": [0.6647, 0.687, 0.7558, 0.7019]}, {"w": "in", "b": [0.7623, 0.687, 0.778, 0.7019]}, {"w": "tweets,", "b": [0.7845, 0.687, 0.8411, 0.7019]}, {"w": "we", "b": [0.8476, 0.687, 0.8691, 0.7019]}, {"w": "used", "b": [0.1312, 0.7049, 0.1666, 0.7199]}, {"w": "our", "b": [0.1728, 0.7049, 0.199, 0.7199]}, {"w": "intuition", "b": [0.2052, 0.7049, 0.2732, 0.7199]}, {"w": "to", "b": [0.2794, 0.7049, 0.2955, 0.7199]}, {"w": "fix", "b": [0.3016, 0.7049, 0.3213, 0.7199]}, {"w": "the", "b": [0.3274, 0.7049, 0.3527, 0.7199]}, {"w": "width", "b": [0.3588, 0.7049, 0.4042, 0.7199]}, {"w": "of", "b": [0.4103, 0.7049, 0.4249, 0.7199]}, {"w": "the", "b": [0.4311, 0.7049, 0.4563, 0.7199]}, {"w": "window", "b": [0.4624, 0.7049, 0.5224, 0.7199]}, {"w": "around", "b": [0.5285, 0.7049, 0.584, 0.7199]}, {"w": "the", "b": [0.5902, 0.7049, 0.6154, 0.7199]}, {"w": "match", "b": [0.6215, 0.7049, 0.6704, 0.7199]}, {"w": "to", "b": [0.6765, 0.7049, 0.6926, 0.7199]}, {"w": "ten.", "b": [0.6988, 0.7049, 0.729, 0.7199]}, {"w": "Now,", "b": [0.7372, 0.7049, 0.7775, 0.7199]}, {"w": "we", "b": [0.7837, 0.7049, 0.8043, 0.7199]}, {"w": "need", "b": [0.8105, 0.7049, 0.8468, 0.7199]}, {"w": "to", "b": [0.8529, 0.7049, 0.869, 0.7199]}, {"w": "be", "b": [0.1312, 0.7229, 0.1502, 0.7378]}, {"w": "even", "b": [0.1564, 0.7229, 0.1923, 0.7378]}, {"w": "more", "b": [0.1984, 0.7229, 0.2384, 0.7378]}, {"w": "creative", "b": [0.2446, 0.7229, 0.3072, 0.7378]}, {"w": "to", "b": [0.3134, 0.7229, 0.3298, 0.7378]}, {"w": "transform", "b": [0.3359, 0.7229, 0.4146, 0.7378]}, {"w": "string", "b": [0.4207, 0.7229, 0.467, 0.7378]}, {"w": "sequences", "b": [0.4732, 0.7229, 0.5508, 0.7378]}, {"w": "into", "b": [0.557, 0.7229, 0.5883, 0.7378]}, {"w": "numerical", "b": [0.5944, 0.7229, 0.6729, 0.7378]}, {"w": "vectors.", "b": [0.679, 0.7229, 0.7408, 0.7378]}]}, {"id": "b_5", "type": "paragraph", "text": "4.2.1 Feature Engineering for Text", "words": [{"w": "4.2.1", "b": [0.1312, 0.771, 0.1749, 0.786]}, {"w": "Feature", "b": [0.1961, 0.771, 0.2662, 0.786]}, {"w": "Engineering", "b": [0.2733, 0.771, 0.3838, 0.786]}, {"w": "for", "b": [0.3909, 0.771, 0.4167, 0.786]}, {"w": "Text", "b": [0.4238, 0.771, 0.4659, 0.786]}]}, {"id": "b_6", "type": "paragraph", "text": "When it comes to text, scientists and engineers often use simple feature engineering tricks. Two such tricks are one-hot encoding and bag-of-words.", "words": [{"w": "When", "b": [0.1303, 0.8073, 0.1787, 0.8222]}, {"w": "it", "b": [0.1848, 0.8073, 0.1973, 0.8222]}, {"w": "comes", "b": [0.2035, 0.8073, 0.2525, 0.8222]}, {"w": "to", "b": [0.2586, 0.8073, 0.2753, 0.8222]}, {"w": "text,", "b": [0.2814, 0.8073, 0.3194, 0.8222]}, {"w": "scientists", "b": [0.3256, 0.8073, 0.3993, 0.8222]}, {"w": "and", "b": [0.4054, 0.8073, 0.4356, 0.8222]}, {"w": "engineers", "b": [0.4418, 0.8073, 0.5169, 0.8222]}, {"w": "often", "b": [0.523, 0.8073, 0.5642, 0.8222]}, {"w": "use", "b": [0.5703, 0.8073, 0.5964, 0.8222]}, {"w": "simple", "b": [0.6026, 0.8073, 0.6547, 0.8222]}, {"w": "feature", "b": [0.6609, 0.8073, 0.7177, 0.8222]}, {"w": "engineering", "b": [0.7238, 0.8073, 0.8165, 0.8222]}, {"w": "tricks.", "b": [0.8226, 0.8073, 0.8728, 0.8222]}, {"w": "Two", "b": [0.1306, 0.8252, 0.1644, 0.8402]}, {"w": "such", "b": [0.1705, 0.8252, 0.206, 0.8402]}, {"w": "tricks", "b": [0.2122, 0.8252, 0.2564, 0.8402]}, {"w": "are", "b": [0.2626, 0.8252, 0.2873, 0.8402]}, {"w": "one-hot", "b": [0.2934, 0.8252, 0.3539, 0.8402]}, {"w": "encoding", "b": [0.3601, 0.8252, 0.4313, 0.8402]}, {"w": "and", "b": [0.4375, 0.8252, 0.4672, 0.8402]}, {"w": "bag-of-words.", "b": [0.4734, 0.8252, 0.5812, 0.8402]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "4", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 94, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Generally speaking, one-hot encoding transforms a categorical attribute into several binary ones. Let’s say your dataset has an attribute “Color” with possible values “red,” “yellow,” and “green.” We transform each value into a three-dimensional binary vector, as shown below:", "words": [{"w": "Generally", "b": [0.1312, 0.0881, 0.2073, 0.1031]}, {"w": "speaking,", "b": [0.2126, 0.0881, 0.2861, 0.1031]}, {"w": "one-hot", "b": [0.2914, 0.0884, 0.3612, 0.1034]}, {"w": "encoding", "b": [0.3673, 0.0884, 0.4495, 0.1034]}, {"w": "transforms", "b": [0.455, 0.0881, 0.5392, 0.1031]}, {"w": "a", "b": [0.5445, 0.0881, 0.5535, 0.1031]}, {"w": "categorical", "b": [0.5588, 0.0881, 0.6433, 0.1031]}, {"w": "attribute", "b": [0.6486, 0.0881, 0.719, 0.1031]}, {"w": "into", "b": [0.7242, 0.0881, 0.7549, 0.1031]}, {"w": "several", "b": [0.7602, 0.0881, 0.8136, 0.1031]}, {"w": "binary", "b": [0.8188, 0.0881, 0.8696, 0.1031]}, {"w": "ones.", "b": [0.1312, 0.106, 0.1721, 0.121]}, {"w": "Let’s", "b": [0.1803, 0.106, 0.2203, 0.121]}, {"w": "say", "b": [0.2264, 0.106, 0.2526, 0.121]}, {"w": "your", "b": [0.2588, 0.106, 0.2954, 0.121]}, {"w": "dataset", "b": [0.3015, 0.106, 0.3611, 0.121]}, {"w": "has", "b": [0.3673, 0.106, 0.3945, 0.121]}, {"w": "an", "b": [0.4006, 0.106, 0.4205, 0.121]}, {"w": "attribute", "b": [0.4266, 0.106, 0.4997, 0.121]}, {"w": "“Color”", "b": [0.5059, 0.106, 0.5685, 0.121]}, {"w": "with", "b": [0.5747, 0.106, 0.6112, 0.121]}, {"w": "possible", "b": [0.6173, 0.106, 0.6818, 0.121]}, {"w": "values", "b": [0.6879, 0.106, 0.7376, 0.121]}, {"w": "“red,”", "b": [0.7437, 0.106, 0.7928, 0.121]}, {"w": "“yellow,”", "b": [0.799, 0.106, 0.8726, 0.121]}, {"w": "and", "b": [0.1312, 0.124, 0.1604, 0.1389]}, {"w": "“green.”", "b": [0.1658, 0.124, 0.2276, 0.1389]}, {"w": "We", "b": [0.2355, 0.124, 0.2606, 0.1389]}, {"w": "transform", "b": [0.2661, 0.124, 0.3431, 0.1389]}, {"w": "each", "b": [0.3485, 0.124, 0.3832, 0.1389]}, {"w": "value", "b": [0.3886, 0.124, 0.4293, 0.1389]}, {"w": "into", "b": [0.4347, 0.124, 0.4654, 0.1389]}, {"w": "a", "b": [0.4708, 0.124, 0.4798, 0.1389]}, {"w": "three-dimensional", "b": [0.4852, 0.124, 0.6251, 0.1389]}, {"w": "binary", "b": [0.6305, 0.124, 0.6813, 0.1389]}, {"w": "vector,", "b": [0.6867, 0.124, 0.74, 0.1389]}, {"w": "as", "b": [0.7456, 0.124, 0.7618, 0.1389]}, {"w": "shown", "b": [0.7672, 0.124, 0.816, 0.1389]}, {"w": "below:", "b": [0.8214, 0.124, 0.8717, 0.1389]}]}, {"id": "b_1", "type": "equation", "text": "red = [1, 0, 0]", "words": [{"w": "red", "b": [0.4571, 0.1799, 0.4828, 0.1949]}, {"w": "=", "b": [0.4879, 0.1799, 0.5023, 0.1949]}, {"w": "[1,", "b": [0.5074, 0.1799, 0.527, 0.1952]}, {"w": "0,", "b": [0.53, 0.1799, 0.5444, 0.1952]}, {"w": "0]", "b": [0.5474, 0.1799, 0.5618, 0.1949]}]}, {"id": "b_2", "type": "equation", "text": "yellow = [0, 1, 0]", "words": [{"w": "yellow", "b": [0.4331, 0.2024, 0.4828, 0.2173]}, {"w": "=", "b": [0.4879, 0.2024, 0.5023, 0.2173]}, {"w": "[0,", "b": [0.5074, 0.2024, 0.527, 0.2176]}, {"w": "1,", "b": [0.53, 0.2024, 0.5444, 0.2176]}, {"w": "0]", "b": [0.5474, 0.2024, 0.5618, 0.2173]}]}, {"id": "b_3", "type": "equation", "text": "green = [0, 0, 1].", "words": [{"w": "green", "b": [0.4397, 0.2248, 0.4828, 0.2397]}, {"w": "=", "b": [0.4879, 0.2248, 0.5023, 0.2397]}, {"w": "[0,", "b": [0.5074, 0.2248, 0.527, 0.24]}, {"w": "0,", "b": [0.53, 0.2248, 0.5444, 0.24]}, {"w": "1].", "b": [0.5474, 0.2248, 0.5669, 0.24]}]}, {"id": "b_4", "type": "paragraph", "text": "In a spreadsheet, instead of one column headed with the attribute “Color,” you will use three synthetic columns, with the values 1 or 0. The advantage is you now have a vast range of machine learning algorithms at your disposal, for only a handful of learning algorithms support categorical attributes.", "words": [{"w": "In", "b": [0.1312, 0.2659, 0.1485, 0.2809]}, {"w": "a", "b": [0.1558, 0.2659, 0.1652, 0.2809]}, {"w": "spreadsheet,", "b": [0.1724, 0.2659, 0.2731, 0.2809]}, {"w": "instead", "b": [0.2807, 0.2659, 0.3394, 0.2809]}, {"w": "of", "b": [0.3467, 0.2659, 0.3618, 0.2809]}, {"w": "one", "b": [0.3691, 0.2659, 0.3973, 0.2809]}, {"w": "column", "b": [0.4046, 0.2659, 0.4642, 0.2809]}, {"w": "headed", "b": [0.4715, 0.2659, 0.5291, 0.2809]}, {"w": "with", "b": [0.5363, 0.2659, 0.5729, 0.2809]}, {"w": "the", "b": [0.5802, 0.2659, 0.6063, 0.2809]}, {"w": "attribute", "b": [0.6136, 0.2659, 0.6869, 0.2809]}, {"w": "“Color,”", "b": [0.6942, 0.2659, 0.7622, 0.2809]}, {"w": "you", "b": [0.7697, 0.2659, 0.799, 0.2809]}, {"w": "will", "b": [0.8063, 0.2659, 0.8356, 0.2809]}, {"w": "use", "b": [0.8428, 0.2659, 0.8691, 0.2809]}, {"w": "three", "b": [0.1312, 0.2839, 0.1715, 0.2988]}, {"w": "synthetic", "b": [0.1777, 0.2839, 0.2492, 0.2988]}, {"w": "columns,", "b": [0.2554, 0.2839, 0.3249, 0.2988]}, {"w": "with", "b": [0.331, 0.2839, 0.3662, 0.2988]}, {"w": "the", "b": [0.3724, 0.2839, 0.3975, 0.2988]}, {"w": "values", "b": [0.4037, 0.2839, 0.4515, 0.2988]}, {"w": "1", "b": [0.4575, 0.2839, 0.4666, 0.2988]}, {"w": "or", "b": [0.4727, 0.2839, 0.4889, 0.2988]}, {"w": "0.", "b": [0.495, 0.2839, 0.5091, 0.2988]}, {"w": "The", "b": [0.5173, 0.2839, 0.5485, 0.2988]}, {"w": "advantage", "b": [0.5546, 0.2839, 0.634, 0.2988]}, {"w": "is", "b": [0.6402, 0.2839, 0.6524, 0.2988]}, {"w": "you", "b": [0.6585, 0.2839, 0.6867, 0.2988]}, {"w": "now", "b": [0.6928, 0.2839, 0.7245, 0.2988]}, {"w": "have", "b": [0.7306, 0.2839, 0.7663, 0.2988]}, {"w": "a", "b": [0.7725, 0.2839, 0.7815, 0.2988]}, {"w": "vast", "b": [0.7877, 0.2839, 0.8194, 0.2988]}, {"w": "range", "b": [0.8256, 0.2839, 0.8689, 0.2988]}, {"w": "of", "b": [0.1312, 0.3018, 0.1464, 0.3168]}, {"w": "machine", "b": [0.1526, 0.3018, 0.2201, 0.3168]}, {"w": "learning", "b": [0.2263, 0.3018, 0.2922, 0.3168]}, {"w": "algorithms", "b": [0.2985, 0.3018, 0.3854, 0.3168]}, {"w": "at", "b": [0.3916, 0.3018, 0.4084, 0.3168]}, {"w": "your", "b": [0.4146, 0.3018, 0.4512, 0.3168]}, {"w": "disposal,", "b": [0.4574, 0.3018, 0.5283, 0.3168]}, {"w": "for", "b": [0.5345, 0.3018, 0.557, 0.3168]}, {"w": "only", "b": [0.5632, 0.3018, 0.5983, 0.3168]}, {"w": "a", "b": [0.6045, 0.3018, 0.6139, 0.3168]}, {"w": "handful", "b": [0.6201, 0.3018, 0.6824, 0.3168]}, {"w": "of", "b": [0.6886, 0.3018, 0.7037, 0.3168]}, {"w": "learning", "b": [0.71, 0.3018, 0.7759, 0.3168]}, {"w": "algorithms", "b": [0.7821, 0.3018, 0.8691, 0.3168]}, {"w": "support", "b": [0.1312, 0.3197, 0.1934, 0.3347]}, {"w": "categorical", "b": [0.1996, 0.3197, 0.2858, 0.3347]}, {"w": "attributes.", "b": [0.2919, 0.3197, 0.3762, 0.3347]}]}, {"id": "b_5", "type": "paragraph", "text": "Bag-of-words is a generalization of applying the one-hot encoding technique to text data. Instead of representing one attribute as a binary vector, you use this technique to represent an entire text document as a binary vector. Let’s see how it works.", "words": [{"w": "Bag-of-words", "b": [0.1312, 0.347, 0.2527, 0.3619]}, {"w": "is", "b": [0.2589, 0.3467, 0.2714, 0.3616]}, {"w": "a", "b": [0.2776, 0.3467, 0.2869, 0.3616]}, {"w": "generalization", "b": [0.293, 0.3467, 0.4057, 0.3616]}, {"w": "of", "b": [0.4119, 0.3467, 0.4269, 0.3616]}, {"w": "applying", "b": [0.4331, 0.3467, 0.5028, 0.3616]}, {"w": "the", "b": [0.509, 0.3467, 0.5348, 0.3616]}, {"w": "one-hot", "b": [0.541, 0.3467, 0.602, 0.3616]}, {"w": "encoding", "b": [0.6082, 0.3467, 0.68, 0.3616]}, {"w": "technique", "b": [0.6862, 0.3467, 0.7637, 0.3616]}, {"w": "to", "b": [0.7699, 0.3467, 0.7864, 0.3616]}, {"w": "text", "b": [0.7926, 0.3467, 0.8251, 0.3616]}, {"w": "data.", "b": [0.8313, 0.3467, 0.8726, 0.3616]}, {"w": "Instead", "b": [0.1312, 0.3646, 0.1901, 0.3796]}, {"w": "of", "b": [0.1962, 0.3646, 0.211, 0.3796]}, {"w": "representing", "b": [0.2172, 0.3646, 0.315, 0.3796]}, {"w": "one", "b": [0.3211, 0.3646, 0.3487, 0.3796]}, {"w": "attribute", "b": [0.3549, 0.3646, 0.4264, 0.3796]}, {"w": "as", "b": [0.4326, 0.3646, 0.449, 0.3796]}, {"w": "a", "b": [0.4552, 0.3646, 0.4644, 0.3796]}, {"w": "binary", "b": [0.4705, 0.3646, 0.5222, 0.3796]}, {"w": "vector,", "b": [0.5283, 0.3646, 0.5825, 0.3796]}, {"w": "you", "b": [0.5887, 0.3646, 0.6173, 0.3796]}, {"w": "use", "b": [0.6234, 0.3646, 0.6491, 0.3796]}, {"w": "this", "b": [0.6553, 0.3646, 0.685, 0.3796]}, {"w": "technique", "b": [0.6912, 0.3646, 0.7678, 0.3796]}, {"w": "to", "b": [0.7739, 0.3646, 0.7903, 0.3796]}, {"w": "represent", "b": [0.7964, 0.3646, 0.8697, 0.3796]}, {"w": "an", "b": [0.1312, 0.3826, 0.1507, 0.3975]}, {"w": "entire", "b": [0.1569, 0.3826, 0.2026, 0.3975]}, {"w": "text", "b": [0.2087, 0.3826, 0.241, 0.3975]}, {"w": "document", "b": [0.2472, 0.3826, 0.3261, 0.3975]}, {"w": "as", "b": [0.3323, 0.3826, 0.3488, 0.3975]}, {"w": "a", "b": [0.3549, 0.3826, 0.3642, 0.3975]}, {"w": "binary", "b": [0.3703, 0.3826, 0.4222, 0.3975]}, {"w": "vector.", "b": [0.4283, 0.3826, 0.4827, 0.3975]}, {"w": "Let’s", "b": [0.4909, 0.3826, 0.5302, 0.3975]}, {"w": "see", "b": [0.5364, 0.3826, 0.5601, 0.3975]}, {"w": "how", "b": [0.5662, 0.3826, 0.5985, 0.3975]}, {"w": "it", "b": [0.6047, 0.3826, 0.617, 0.3975]}, {"w": "works.", "b": [0.6231, 0.3826, 0.6746, 0.3975]}]}, {"id": "b_6", "type": "paragraph", "text": "Imagine that you have a collection of six text documents, as shown below:", "words": [{"w": "Imagine", "b": [0.1312, 0.4095, 0.1953, 0.4244]}, {"w": "that", "b": [0.2015, 0.4095, 0.2353, 0.4244]}, {"w": "you", "b": [0.2414, 0.4095, 0.2702, 0.4244]}, {"w": "have", "b": [0.2763, 0.4095, 0.3127, 0.4244]}, {"w": "a", "b": [0.3189, 0.4095, 0.3281, 0.4244]}, {"w": "collection", "b": [0.3342, 0.4095, 0.4101, 0.4244]}, {"w": "of", "b": [0.4163, 0.4095, 0.4311, 0.4244]}, {"w": "six", "b": [0.4373, 0.4095, 0.4594, 0.4244]}, {"w": "text", "b": [0.4656, 0.4095, 0.4979, 0.4244]}, {"w": "documents,", "b": [0.5041, 0.4095, 0.5954, 0.4244]}, {"w": "as", "b": [0.6016, 0.4095, 0.6181, 0.4244]}, {"w": "shown", "b": [0.6242, 0.4095, 0.6741, 0.4244]}, {"w": "below:", "b": [0.6802, 0.4095, 0.7315, 0.4244]}]}, {"id": "b_7", "type": "paragraph", "text": "Love, love is a verb", "words": [{"w": "Love,", "b": [0.4465, 0.4527, 0.4866, 0.4684]}, {"w": "love", "b": [0.4909, 0.4527, 0.5209, 0.4684]}, {"w": "is", "b": [0.5252, 0.4527, 0.5368, 0.4684]}, {"w": "a", "b": [0.5412, 0.4527, 0.5489, 0.4684]}, {"w": "verb", "b": [0.5532, 0.4527, 0.5841, 0.4684]}]}, {"id": "b_8", "type": "paragraph", "text": "Love is a doing word", "words": [{"w": "Love", "b": [0.4465, 0.4824, 0.4822, 0.498]}, {"w": "is", "b": [0.4866, 0.4824, 0.4982, 0.498]}, {"w": "a", "b": [0.5025, 0.4824, 0.5102, 0.498]}, {"w": "doing", "b": [0.5146, 0.4824, 0.5542, 0.498]}, {"w": "word", "b": [0.5585, 0.4824, 0.5943, 0.498]}]}, {"id": "b_9", "type": "paragraph", "text": "Feathers on my breath", "words": [{"w": "Feathers", "b": [0.4465, 0.5121, 0.5054, 0.5277]}, {"w": "on", "b": [0.5098, 0.5121, 0.5271, 0.5277]}, {"w": "my", "b": [0.5315, 0.5121, 0.5537, 0.5277]}, {"w": "breath", "b": [0.5581, 0.5121, 0.6015, 0.5277]}]}, {"id": "b_10", "type": "paragraph", "text": "Gentle impulsion", "words": [{"w": "Gentle", "b": [0.4465, 0.5418, 0.4929, 0.5574]}, {"w": "impulsion", "b": [0.4972, 0.5418, 0.5668, 0.5574]}]}, {"id": "b_11", "type": "paragraph", "text": "Shakes me, makes me lighter", "words": [{"w": "Shakes", "b": [0.4465, 0.5715, 0.4958, 0.5871]}, {"w": "me,", "b": [0.5001, 0.5715, 0.5257, 0.5871]}, {"w": "makes", "b": [0.53, 0.5715, 0.5745, 0.5871]}, {"w": "me", "b": [0.5788, 0.5715, 0.6001, 0.5871]}, {"w": "lighter", "b": [0.6044, 0.5715, 0.6498, 0.5871]}]}, {"id": "b_12", "type": "paragraph", "text": "Feathers on my breath", "words": [{"w": "Feathers", "b": [0.4465, 0.6011, 0.5054, 0.6167]}, {"w": "on", "b": [0.5098, 0.6011, 0.5271, 0.6167]}, {"w": "my", "b": [0.5315, 0.6011, 0.5537, 0.6167]}, {"w": "breath", "b": [0.5581, 0.6011, 0.6015, 0.6167]}]}, {"id": "b_13", "type": "paragraph", "text": "Document 1", "words": [{"w": "Document", "b": [0.3275, 0.455, 0.4026, 0.4684]}, {"w": "1", "b": [0.4072, 0.455, 0.4163, 0.4684]}]}, {"id": "b_14", "type": "paragraph", "text": "Document 2", "words": [{"w": "Document", "b": [0.3275, 0.4847, 0.4026, 0.4981]}, {"w": "2", "b": [0.4072, 0.4847, 0.4163, 0.4981]}]}, {"id": "b_15", "type": "paragraph", "text": "Document 3", "words": [{"w": "Document", "b": [0.3275, 0.5144, 0.4026, 0.5277]}, {"w": "3", "b": [0.4072, 0.5144, 0.4163, 0.5277]}]}, {"id": "b_16", "type": "paragraph", "text": "Document 4", "words": [{"w": "Document", "b": [0.3275, 0.5441, 0.4026, 0.5574]}, {"w": "4", "b": [0.4072, 0.5441, 0.4163, 0.5574]}]}, {"id": "b_17", "type": "paragraph", "text": "Document 5", "words": [{"w": "Document", "b": [0.3275, 0.5737, 0.4026, 0.5871]}, {"w": "5", "b": [0.4072, 0.5737, 0.4163, 0.5871]}]}, {"id": "b_18", "type": "paragraph", "text": "Document 6", "words": [{"w": "Document", "b": [0.3275, 0.6034, 0.4026, 0.6168]}, {"w": "6", "b": [0.4072, 0.6034, 0.4163, 0.6168]}]}, {"id": "b_19", "type": "paragraph", "text": "Figure 3: A collection of six documents.", "words": [{"w": "Figure", "b": [0.3383, 0.6404, 0.3904, 0.6553]}, {"w": "3:", "b": [0.3966, 0.6404, 0.4109, 0.6553]}, {"w": "A", "b": [0.4191, 0.6404, 0.433, 0.6553]}, {"w": "collection", "b": [0.4391, 0.6404, 0.515, 0.6553]}, {"w": "of", "b": [0.5211, 0.6404, 0.536, 0.6553]}, {"w": "six", "b": [0.5422, 0.6404, 0.5643, 0.6553]}, {"w": "documents.", "b": [0.5705, 0.6404, 0.6618, 0.6553]}]}, {"id": "b_20", "type": "paragraph", "text": "Let your problem be to build a text classifier by topic. A classification learning algorithm expects inputs to be labeled feature vectors, so you have to transform the text document collection into a feature vector collection. Bag-of-words allows you to do just that.", "words": [{"w": "Let", "b": [0.1312, 0.6906, 0.1587, 0.7056]}, {"w": "your", "b": [0.1648, 0.6906, 0.2015, 0.7056]}, {"w": "problem", "b": [0.2076, 0.6906, 0.2746, 0.7056]}, {"w": "be", "b": [0.2807, 0.6906, 0.3001, 0.7056]}, {"w": "to", "b": [0.3062, 0.6906, 0.3229, 0.7056]}, {"w": "build", "b": [0.3291, 0.6906, 0.3709, 0.7056]}, {"w": "a", "b": [0.3771, 0.6906, 0.3865, 0.7056]}, {"w": "text", "b": [0.3926, 0.6906, 0.4255, 0.7056]}, {"w": "classifier", "b": [0.4317, 0.6906, 0.501, 0.7056]}, {"w": "by", "b": [0.5071, 0.6906, 0.527, 0.7056]}, {"w": "topic.", "b": [0.5331, 0.6906, 0.5792, 0.7056]}, {"w": "A", "b": [0.5873, 0.6906, 0.6015, 0.7056]}, {"w": "classification", "b": [0.6076, 0.6906, 0.7114, 0.7056]}, {"w": "learning", "b": [0.7175, 0.6906, 0.7835, 0.7056]}, {"w": "algorithm", "b": [0.7896, 0.6906, 0.8691, 0.7056]}, {"w": "expects", "b": [0.1312, 0.7086, 0.192, 0.7235]}, {"w": "inputs", "b": [0.1986, 0.7086, 0.25, 0.7235]}, {"w": "to", "b": [0.2565, 0.7086, 0.2733, 0.7235]}, {"w": "be", "b": [0.2799, 0.7086, 0.2992, 0.7235]}, {"w": "labeled", "b": [0.3058, 0.7086, 0.3638, 0.7235]}, {"w": "feature", "b": [0.3704, 0.7086, 0.4275, 0.7235]}, {"w": "vectors,", "b": [0.4341, 0.7086, 0.497, 0.7235]}, {"w": "so", "b": [0.5037, 0.7086, 0.5205, 0.7235]}, {"w": "you", "b": [0.5271, 0.7086, 0.5564, 0.7235]}, {"w": "have", "b": [0.563, 0.7086, 0.6001, 0.7235]}, {"w": "to", "b": [0.6067, 0.7086, 0.6235, 0.7235]}, {"w": "transform", "b": [0.63, 0.7086, 0.7103, 0.7235]}, {"w": "the", "b": [0.7168, 0.7086, 0.743, 0.7235]}, {"w": "text", "b": [0.7496, 0.7086, 0.7825, 0.7235]}, {"w": "document", "b": [0.7891, 0.7086, 0.8696, 0.7235]}, {"w": "collection", "b": [0.1312, 0.7265, 0.2071, 0.7415]}, {"w": "into", "b": [0.2133, 0.7265, 0.2445, 0.7415]}, {"w": "a", "b": [0.2507, 0.7265, 0.2599, 0.7415]}, {"w": "feature", "b": [0.2661, 0.7265, 0.322, 0.7415]}, {"w": "vector", "b": [0.3282, 0.7265, 0.3775, 0.7415]}, {"w": "collection.", "b": [0.3836, 0.7265, 0.4646, 0.7415]}, {"w": "Bag-of-words", "b": [0.4728, 0.7265, 0.5783, 0.7415]}, {"w": "allows", "b": [0.5845, 0.7265, 0.6333, 0.7415]}, {"w": "you", "b": [0.6394, 0.7265, 0.6681, 0.7415]}, {"w": "to", "b": [0.6743, 0.7265, 0.6907, 0.7415]}, {"w": "do", "b": [0.6968, 0.7265, 0.7163, 0.7415]}, {"w": "just", "b": [0.7225, 0.7265, 0.7528, 0.7415]}, {"w": "that.", "b": [0.759, 0.7265, 0.7979, 0.7415]}]}, {"id": "b_21", "type": "paragraph", "text": "First, tokenize the texts. Tokenization is a procedure of splitting a text into pieces called “tokens.” A tokenizer is software that takes a string as input, and returns a sequence of", "words": [{"w": "First,", "b": [0.1312, 0.7534, 0.1755, 0.7684]}, {"w": "tokenize", "b": [0.1816, 0.7534, 0.2476, 0.7684]}, {"w": "the", "b": [0.2537, 0.7534, 0.2795, 0.7684]}, {"w": "texts.", "b": [0.2856, 0.7534, 0.3306, 0.7684]}, {"w": "Tokenization", "b": [0.3387, 0.7537, 0.4566, 0.7687]}, {"w": "is", "b": [0.4628, 0.7534, 0.4753, 0.7684]}, {"w": "a", "b": [0.4814, 0.7534, 0.4907, 0.7684]}, {"w": "procedure", "b": [0.4968, 0.7534, 0.5768, 0.7684]}, {"w": "of", "b": [0.583, 0.7534, 0.5979, 0.7684]}, {"w": "splitting", "b": [0.6041, 0.7534, 0.6712, 0.7684]}, {"w": "a", "b": [0.6773, 0.7534, 0.6866, 0.7684]}, {"w": "text", "b": [0.6927, 0.7534, 0.7252, 0.7684]}, {"w": "into", "b": [0.7313, 0.7534, 0.7628, 0.7684]}, {"w": "pieces", "b": [0.7689, 0.7534, 0.8165, 0.7684]}, {"w": "called", "b": [0.8226, 0.7534, 0.869, 0.7684]}, {"w": "“tokens.”", "b": [0.1286, 0.7714, 0.2015, 0.7863]}, {"w": "A", "b": [0.2113, 0.7714, 0.2254, 0.7863]}, {"w": "tokenizer", "b": [0.2321, 0.7717, 0.3169, 0.7866]}, {"w": "is", "b": [0.3236, 0.7714, 0.3362, 0.7863]}, {"w": "software", "b": [0.3429, 0.7714, 0.4106, 0.7863]}, {"w": "that", "b": [0.4173, 0.7714, 0.4518, 0.7863]}, {"w": "takes", "b": [0.4585, 0.7714, 0.5004, 0.7863]}, {"w": "a", "b": [0.5071, 0.7714, 0.5166, 0.7863]}, {"w": "string", "b": [0.5233, 0.7714, 0.5705, 0.7863]}, {"w": "as", "b": [0.5772, 0.7714, 0.594, 0.7863]}, {"w": "input,", "b": [0.6007, 0.7714, 0.6499, 0.7863]}, {"w": "and", "b": [0.6567, 0.7714, 0.6871, 0.7863]}, {"w": "returns", "b": [0.6938, 0.7714, 0.7526, 0.7863]}, {"w": "a", "b": [0.7593, 0.7714, 0.7687, 0.7863]}, {"w": "sequence", "b": [0.7754, 0.7714, 0.8472, 0.7863]}, {"w": "of", "b": [0.8539, 0.7714, 0.8691, 0.7863]}]}, {"id": "b_22", "type": "paragraph", "text": "tokens extracted from that string. Typically, tokens are words, but it’s not strictly necessary. It can be a punctuation mark, a word, or, in some cases, a combination of words, such as a company (e.g., McDonald’s) or a place (e.g., Red Square). Let’s use a simple tokenizer that extracts words and ignores everything else. We obtain the following collection:", "words": [{"w": "tokens", "b": [0.1312, 0.7893, 0.1817, 0.8043]}, {"w": "extracted", "b": [0.1878, 0.7893, 0.2619, 0.8043]}, {"w": "from", "b": [0.268, 0.7893, 0.3048, 0.8043]}, {"w": "that", "b": [0.311, 0.7893, 0.3442, 0.8043]}, {"w": "string.", "b": [0.3503, 0.7893, 0.4008, 0.8043]}, {"w": "Typically,", "b": [0.409, 0.7893, 0.4865, 0.8043]}, {"w": "tokens", "b": [0.4926, 0.7893, 0.5431, 0.8043]}, {"w": "are", "b": [0.5492, 0.7893, 0.5734, 0.8043]}, {"w": "words,", "b": [0.5796, 0.7893, 0.6306, 0.8043]}, {"w": "but", "b": [0.6367, 0.7893, 0.6639, 0.8043]}, {"w": "it’s", "b": [0.67, 0.7893, 0.6943, 0.8043]}, {"w": "not", "b": [0.7004, 0.7893, 0.7266, 0.8043]}, {"w": "strictly", "b": [0.7327, 0.7893, 0.7888, 0.8043]}, {"w": "necessary.", "b": [0.7949, 0.7893, 0.8727, 0.8043]}, {"w": "It", "b": [0.1312, 0.8073, 0.1451, 0.8222]}, {"w": "can", "b": [0.1512, 0.8073, 0.179, 0.8222]}, {"w": "be", "b": [0.1851, 0.8073, 0.2041, 0.8222]}, {"w": "a", "b": [0.2103, 0.8073, 0.2195, 0.8222]}, {"w": "punctuation", "b": [0.2257, 0.8073, 0.3232, 0.8222]}, {"w": "mark,", "b": [0.3294, 0.8073, 0.3761, 0.8222]}, {"w": "a", "b": [0.3822, 0.8073, 0.3915, 0.8222]}, {"w": "word,", "b": [0.3976, 0.8073, 0.4423, 0.8222]}, {"w": "or,", "b": [0.4485, 0.8073, 0.4701, 0.8222]}, {"w": "in", "b": [0.4763, 0.8073, 0.4917, 0.8222]}, {"w": "some", "b": [0.4978, 0.8073, 0.5379, 0.8222]}, {"w": "cases,", "b": [0.5441, 0.8073, 0.5895, 0.8222]}, {"w": "a", "b": [0.5957, 0.8073, 0.6049, 0.8222]}, {"w": "combination", "b": [0.611, 0.8073, 0.7101, 0.8222]}, {"w": "of", "b": [0.7163, 0.8073, 0.7311, 0.8222]}, {"w": "words,", "b": [0.7373, 0.8073, 0.7893, 0.8222]}, {"w": "such", "b": [0.7954, 0.8073, 0.831, 0.8222]}, {"w": "as", "b": [0.8371, 0.8073, 0.8537, 0.8222]}, {"w": "a", "b": [0.8598, 0.8073, 0.8691, 0.8222]}, {"w": "company", "b": [0.1312, 0.8252, 0.2027, 0.8402]}, {"w": "(e.g.,", "b": [0.2089, 0.8252, 0.2487, 0.8402]}, {"w": "McDonald’s)", "b": [0.2548, 0.8252, 0.3573, 0.8402]}, {"w": "or", "b": [0.3634, 0.8252, 0.3798, 0.8402]}, {"w": "a", "b": [0.386, 0.8252, 0.3952, 0.8402]}, {"w": "place", "b": [0.4013, 0.8252, 0.4422, 0.8402]}, {"w": "(e.g.,", "b": [0.4483, 0.8252, 0.4881, 0.8402]}, {"w": "Red", "b": [0.4943, 0.8252, 0.5262, 0.8402]}, {"w": "Square).", "b": [0.5323, 0.8252, 0.5993, 0.8402]}, {"w": "Let’s", "b": [0.6075, 0.8252, 0.6466, 0.8402]}, {"w": "use", "b": [0.6528, 0.8252, 0.6784, 0.8402]}, {"w": "a", "b": [0.6846, 0.8252, 0.6937, 0.8402]}, {"w": "simple", "b": [0.6999, 0.8252, 0.7511, 0.8402]}, {"w": "tokenizer", "b": [0.7572, 0.8252, 0.8298, 0.8402]}, {"w": "that", "b": [0.8359, 0.8252, 0.8696, 0.8402]}, {"w": "extracts", "b": [0.1312, 0.8432, 0.1955, 0.8581]}, {"w": "words", "b": [0.2016, 0.8432, 0.2484, 0.8581]}, {"w": "and", "b": [0.2546, 0.8432, 0.2843, 0.8581]}, {"w": "ignores", "b": [0.2905, 0.8432, 0.3471, 0.8581]}, {"w": "everything", "b": [0.3532, 0.8432, 0.4379, 0.8581]}, {"w": "else.", "b": [0.444, 0.8432, 0.478, 0.8581]}, {"w": "We", "b": [0.4862, 0.8432, 0.5118, 0.8581]}, {"w": "obtain", "b": [0.518, 0.8432, 0.5692, 0.8581]}, {"w": "the", "b": [0.5754, 0.8432, 0.601, 0.8581]}, {"w": "following", "b": [0.6072, 0.8432, 0.6789, 0.8581]}, {"w": "collection:", "b": [0.6851, 0.8432, 0.7661, 0.8581]}]}, {"id": "b_23", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "5", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 95, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "[Love, love, is a verb]", "words": [{"w": "[Love,", "b": [0.4465, 0.0941, 0.4924, 0.1097]}, {"w": "love,", "b": [0.4967, 0.0941, 0.531, 0.1097]}, {"w": "is", "b": [0.5353, 0.0941, 0.5469, 0.1097]}, {"w": "a", "b": [0.5513, 0.0941, 0.559, 0.1097]}, {"w": "verb]", "b": [0.5634, 0.0941, 0.6001, 0.1097]}]}, {"id": "b_1", "type": "paragraph", "text": "[Love, is, a, doing, word]", "words": [{"w": "[Love,", "b": [0.4465, 0.1237, 0.4924, 0.1393]}, {"w": "is,", "b": [0.4967, 0.1237, 0.5127, 0.1393]}, {"w": "a,", "b": [0.517, 0.1237, 0.5291, 0.1393]}, {"w": "doing,", "b": [0.5334, 0.1237, 0.5774, 0.1393]}, {"w": "word]", "b": [0.5817, 0.1237, 0.6232, 0.1393]}]}, {"id": "b_2", "type": "paragraph", "text": "[Feathers, on, my, breath]", "words": [{"w": "[Feathers,", "b": [0.4465, 0.1534, 0.5155, 0.169]}, {"w": "on,", "b": [0.5199, 0.1534, 0.5416, 0.169]}, {"w": "my,", "b": [0.546, 0.1534, 0.5714, 0.169]}, {"w": "breath]", "b": [0.5758, 0.1534, 0.625, 0.169]}]}, {"id": "b_3", "type": "paragraph", "text": "[Gentle, impulsion]", "words": [{"w": "[Gentle,", "b": [0.4465, 0.1831, 0.503, 0.1987]}, {"w": "impulsion]", "b": [0.5073, 0.1831, 0.5827, 0.1987]}]}, {"id": "b_4", "type": "paragraph", "text": "[Shakes, me, makes, me lighter]", "words": [{"w": "[Shakes,", "b": [0.4465, 0.2128, 0.5059, 0.2284]}, {"w": "me,", "b": [0.5102, 0.2128, 0.5358, 0.2284]}, {"w": "makes,", "b": [0.5402, 0.2128, 0.589, 0.2284]}, {"w": "me", "b": [0.5933, 0.2128, 0.6146, 0.2284]}, {"w": "lighter]", "b": [0.6189, 0.2128, 0.6701, 0.2284]}]}, {"id": "b_5", "type": "paragraph", "text": "[Feathers, on, my, breath]", "words": [{"w": "[Feathers,", "b": [0.4465, 0.2424, 0.5155, 0.2581]}, {"w": "on,", "b": [0.5199, 0.2424, 0.5416, 0.2581]}, {"w": "my,", "b": [0.546, 0.2424, 0.5714, 0.2581]}, {"w": "breath]", "b": [0.5758, 0.2424, 0.625, 0.2581]}]}, {"id": "b_6", "type": "paragraph", "text": "Document 1", "words": [{"w": "Document", "b": [0.3275, 0.0963, 0.4026, 0.1097]}, {"w": "1", "b": [0.4072, 0.0963, 0.4163, 0.1097]}]}, {"id": "b_7", "type": "paragraph", "text": "Document 2", "words": [{"w": "Document", "b": [0.3275, 0.126, 0.4026, 0.1394]}, {"w": "2", "b": [0.4072, 0.126, 0.4163, 0.1394]}]}, {"id": "b_8", "type": "paragraph", "text": "Document 3", "words": [{"w": "Document", "b": [0.3275, 0.1557, 0.4026, 0.169]}, {"w": "3", "b": [0.4072, 0.1557, 0.4163, 0.169]}]}, {"id": "b_9", "type": "paragraph", "text": "Document 4", "words": [{"w": "Document", "b": [0.3275, 0.1854, 0.4026, 0.1987]}, {"w": "4", "b": [0.4072, 0.1854, 0.4163, 0.1987]}]}, {"id": "b_10", "type": "paragraph", "text": "Document 5", "words": [{"w": "Document", "b": [0.3275, 0.215, 0.4026, 0.2284]}, {"w": "5", "b": [0.4072, 0.215, 0.4163, 0.2284]}]}, {"id": "b_11", "type": "paragraph", "text": "Document 6", "words": [{"w": "Document", "b": [0.3275, 0.2447, 0.4026, 0.2581]}, {"w": "6", "b": [0.4072, 0.2447, 0.4163, 0.2581]}]}, {"id": "b_12", "type": "paragraph", "text": "Figure 4: The collection of tokenized documents.", "words": [{"w": "Figure", "b": [0.3025, 0.2817, 0.3546, 0.2966]}, {"w": "4:", "b": [0.3607, 0.2817, 0.3751, 0.2966]}, {"w": "The", "b": [0.3833, 0.2817, 0.4151, 0.2966]}, {"w": "collection", "b": [0.4212, 0.2817, 0.4971, 0.2966]}, {"w": "of", "b": [0.5033, 0.2817, 0.5181, 0.2966]}, {"w": "tokenized", "b": [0.5243, 0.2817, 0.6002, 0.2966]}, {"w": "documents.", "b": [0.6063, 0.2817, 0.6977, 0.2966]}]}, {"id": "b_13", "type": "paragraph", "text": "The next step is to build a vocabulary. It contains 16 tokens:2", "words": [{"w": "The", "b": [0.1306, 0.3319, 0.1624, 0.3469]}, {"w": "next", "b": [0.1685, 0.3319, 0.2039, 0.3469]}, {"w": "step", "b": [0.21, 0.3319, 0.243, 0.3469]}, {"w": "is", "b": [0.2491, 0.3319, 0.2615, 0.3469]}, {"w": "to", "b": [0.2677, 0.3319, 0.2841, 0.3469]}, {"w": "build", "b": [0.2902, 0.3319, 0.3313, 0.3469]}, {"w": "a", "b": [0.3374, 0.3319, 0.3466, 0.3469]}, {"w": "vocabulary.", "b": [0.3528, 0.3319, 0.4446, 0.3469]}, {"w": "It", "b": [0.4528, 0.3319, 0.4667, 0.3469]}, {"w": "contains", "b": [0.4728, 0.3319, 0.5391, 0.3469]}, {"w": "16", "b": [0.545, 0.3319, 0.5635, 0.3469]}, {"w": "tokens:2", "b": [0.5696, 0.3303, 0.6334, 0.3469]}]}, {"id": "b_14", "type": "paragraph", "text": "a breath doing feathers gentle impulsion is lighter love makes me my on shakes verb word", "words": [{"w": "a", "b": [0.3503, 0.3668, 0.3596, 0.3818]}, {"w": "breath", "b": [0.4201, 0.3668, 0.4725, 0.3818]}, {"w": "doing", "b": [0.5203, 0.3668, 0.5644, 0.3818]}, {"w": "feathers", "b": [0.5865, 0.3668, 0.6498, 0.3818]}, {"w": "gentle", "b": [0.3503, 0.3848, 0.398, 0.3997]}, {"w": "impulsion", "b": [0.4202, 0.3848, 0.4982, 0.3997]}, {"w": "is", "b": [0.5203, 0.3848, 0.5328, 0.3997]}, {"w": "lighter", "b": [0.5866, 0.3848, 0.6384, 0.3997]}, {"w": "love", "b": [0.3503, 0.4027, 0.3816, 0.4177]}, {"w": "makes", "b": [0.4201, 0.4027, 0.4695, 0.4177]}, {"w": "me", "b": [0.5203, 0.4027, 0.5439, 0.4177]}, {"w": "my", "b": [0.5865, 0.4027, 0.6111, 0.4177]}, {"w": "on", "b": [0.3503, 0.4207, 0.3698, 0.4356]}, {"w": "shakes", "b": [0.4201, 0.4207, 0.4716, 0.4356]}, {"w": "verb", "b": [0.5203, 0.4207, 0.5552, 0.4356]}, {"w": "word", "b": [0.5866, 0.4207, 0.6261, 0.4356]}]}, {"id": "b_15", "type": "paragraph", "text": "Now order your vocabulary in some way and assign a unique index to each token. I ordered the tokens alphabetically:", "words": [{"w": "Now", "b": [0.1312, 0.4709, 0.1668, 0.4859]}, {"w": "order", "b": [0.173, 0.4709, 0.2148, 0.4859]}, {"w": "your", "b": [0.221, 0.4709, 0.2567, 0.4859]}, {"w": "vocabulary", "b": [0.2628, 0.4709, 0.3504, 0.4859]}, {"w": "in", "b": [0.3566, 0.4709, 0.3718, 0.4859]}, {"w": "some", "b": [0.378, 0.4709, 0.4178, 0.4859]}, {"w": "way", "b": [0.424, 0.4709, 0.455, 0.4859]}, {"w": "and", "b": [0.4611, 0.4709, 0.4907, 0.4859]}, {"w": "assign", "b": [0.4968, 0.4709, 0.5449, 0.4859]}, {"w": "a", "b": [0.551, 0.4709, 0.5602, 0.4859]}, {"w": "unique", "b": [0.5663, 0.4709, 0.6198, 0.4859]}, {"w": "index", "b": [0.6259, 0.4709, 0.6692, 0.4859]}, {"w": "to", "b": [0.6754, 0.4709, 0.6916, 0.4859]}, {"w": "each", "b": [0.6978, 0.4709, 0.7329, 0.4859]}, {"w": "token.", "b": [0.7391, 0.4709, 0.7879, 0.4859]}, {"w": "I", "b": [0.7961, 0.4709, 0.8027, 0.4859]}, {"w": "ordered", "b": [0.8089, 0.4709, 0.8691, 0.4859]}, {"w": "the", "b": [0.1312, 0.4889, 0.1569, 0.5038]}, {"w": "tokens", "b": [0.163, 0.4889, 0.2144, 0.5038]}, {"w": "alphabetically:", "b": [0.2206, 0.4889, 0.3385, 0.5038]}]}, {"id": "b_16", "type": "paragraph", "text": "1 2", "words": [{"w": "1", "b": [0.2031, 0.6063, 0.2129, 0.6205]}, {"w": "2", "b": [0.2421, 0.6063, 0.2519, 0.6205]}]}, {"id": "b_18", "type": "paragraph", "text": "3 4 5 6 7 8 9 10 11 12 13 14 15 16", "words": [{"w": "3", "b": [0.2811, 0.6063, 0.2909, 0.6205]}, {"w": "4", "b": [0.3201, 0.6063, 0.3299, 0.6205]}, {"w": "5", "b": [0.3591, 0.6063, 0.3688, 0.6205]}, {"w": "6", "b": [0.3981, 0.6063, 0.4078, 0.6205]}, {"w": "7", "b": [0.4371, 0.6063, 0.4468, 0.6205]}, {"w": "8", "b": [0.4761, 0.6063, 0.4858, 0.6205]}, {"w": "9", "b": [0.5151, 0.6063, 0.5248, 0.6205]}, {"w": "10", "b": [0.5492, 0.6063, 0.5687, 0.6205]}, {"w": "11", "b": [0.5888, 0.6063, 0.6071, 0.6205]}, {"w": "12", "b": [0.6272, 0.6063, 0.6467, 0.6205]}, {"w": "13", "b": [0.6662, 0.6063, 0.6857, 0.6205]}, {"w": "14", "b": [0.7052, 0.6063, 0.7247, 0.6205]}, {"w": "15", "b": [0.7442, 0.6063, 0.7637, 0.6205]}, {"w": "16", "b": [0.7832, 0.6063, 0.8027, 0.6205]}]}, {"id": "b_19", "type": "paragraph", "text": "breath", "words": [{"w": "breath", "b": [0.2349, 0.5524, 0.2554, 0.59]}]}, {"id": "b_20", "type": "paragraph", "text": "doing", "words": [{"w": "doing", "b": [0.2739, 0.5558, 0.2944, 0.59]}]}, {"id": "b_21", "type": "paragraph", "text": "feathers", "words": [{"w": "feathers", "b": [0.3129, 0.5424, 0.3334, 0.59]}]}, {"id": "b_22", "type": "paragraph", "text": "gentle", "words": [{"w": "gentle", "b": [0.3519, 0.5533, 0.3724, 0.59]}]}, {"id": "b_23", "type": "paragraph", "text": "impulsion", "words": [{"w": "impulsion", "b": [0.3899, 0.5299, 0.4104, 0.59]}]}, {"id": "b_25", "type": "paragraph", "text": "lighter", "words": [{"w": "lighter", "b": [0.4689, 0.5508, 0.4894, 0.59]}]}, {"id": "b_26", "type": "paragraph", "text": "love", "words": [{"w": "love", "b": [0.5079, 0.5641, 0.5284, 0.59]}]}, {"id": "b_27", "type": "paragraph", "text": "makes", "words": [{"w": "makes", "b": [0.5468, 0.5516, 0.5674, 0.59]}]}, {"id": "b_31", "type": "paragraph", "text": "shakes", "words": [{"w": "shakes", "b": [0.7028, 0.5499, 0.7233, 0.59]}]}, {"id": "b_32", "type": "paragraph", "text": "verb", "words": [{"w": "verb", "b": [0.7418, 0.5633, 0.7623, 0.59]}]}, {"id": "b_33", "type": "paragraph", "text": "word", "words": [{"w": "word", "b": [0.7808, 0.5591, 0.8013, 0.59]}]}, {"id": "b_34", "type": "paragraph", "text": "Figure 5: Ordered and indexed tokens.", "words": [{"w": "Figure", "b": [0.3434, 0.6446, 0.3955, 0.6595]}, {"w": "5:", "b": [0.4017, 0.6446, 0.416, 0.6595]}, {"w": "Ordered", "b": [0.4242, 0.6446, 0.49, 0.6595]}, {"w": "and", "b": [0.4961, 0.6446, 0.5259, 0.6595]}, {"w": "indexed", "b": [0.532, 0.6446, 0.5941, 0.6595]}, {"w": "tokens.", "b": [0.6002, 0.6446, 0.6567, 0.6595]}]}, {"id": "b_35", "type": "paragraph", "text": "Each token in the vocabulary has a unique index, from 1 to 16. We transform our collection into a collection of binary feature vectors, as shown below:", "words": [{"w": "Each", "b": [0.1312, 0.6948, 0.1705, 0.7098]}, {"w": "token", "b": [0.1766, 0.6948, 0.2202, 0.7098]}, {"w": "in", "b": [0.2263, 0.6948, 0.2415, 0.7098]}, {"w": "the", "b": [0.2477, 0.6948, 0.273, 0.7098]}, {"w": "vocabulary", "b": [0.2792, 0.6948, 0.3664, 0.7098]}, {"w": "has", "b": [0.3725, 0.6948, 0.3989, 0.7098]}, {"w": "a", "b": [0.4051, 0.6948, 0.4142, 0.7098]}, {"w": "unique", "b": [0.4203, 0.6948, 0.4736, 0.7098]}, {"w": "index,", "b": [0.4797, 0.6948, 0.5278, 0.7098]}, {"w": "from", "b": [0.534, 0.6948, 0.571, 0.7098]}, {"w": "1", "b": [0.5769, 0.6948, 0.5861, 0.7098]}, {"w": "to", "b": [0.5922, 0.6948, 0.6084, 0.7098]}, {"w": "16.", "b": [0.6146, 0.6948, 0.6378, 0.7098]}, {"w": "We", "b": [0.646, 0.6948, 0.6713, 0.7098]}, {"w": "transform", "b": [0.6775, 0.6948, 0.7552, 0.7098]}, {"w": "our", "b": [0.7614, 0.6948, 0.7877, 0.7098]}, {"w": "collection", "b": [0.7939, 0.6948, 0.8689, 0.7098]}, {"w": "into", "b": [0.1312, 0.7128, 0.1625, 0.7277]}, {"w": "a", "b": [0.1687, 0.7128, 0.1779, 0.7277]}, {"w": "collection", "b": [0.184, 0.7128, 0.2599, 0.7277]}, {"w": "of", "b": [0.2661, 0.7128, 0.2809, 0.7277]}, {"w": "binary", "b": [0.2871, 0.7128, 0.3389, 0.7277]}, {"w": "feature", "b": [0.3451, 0.7128, 0.401, 0.7277]}, {"w": "vectors,", "b": [0.4072, 0.7128, 0.4689, 0.7277]}, {"w": "as", "b": [0.475, 0.7128, 0.4915, 0.7277]}, {"w": "shown", "b": [0.4977, 0.7128, 0.5475, 0.7277]}, {"w": "below:", "b": [0.5537, 0.7128, 0.6049, 0.7277]}]}, {"id": "b_36", "type": "paragraph", "text": "2I decided to ignore capitalization, but you, as an analyst, might choose to treat the two tokens “Love” and “love” as two separate vocabulary entities.", "words": [{"w": "2I", "b": [0.1518, 0.7398, 0.1652, 0.7537]}, {"w": "decided", "b": [0.1704, 0.7416, 0.2226, 0.7537]}, {"w": "to", "b": [0.2278, 0.7416, 0.242, 0.7537]}, {"w": "ignore", "b": [0.2472, 0.7416, 0.2896, 0.7537]}, {"w": "capitalization,", "b": [0.2949, 0.7416, 0.393, 0.7537]}, {"w": "but", "b": [0.3982, 0.7416, 0.4221, 0.7537]}, {"w": "you,", "b": [0.4273, 0.7416, 0.4565, 0.7537]}, {"w": "as", "b": [0.4618, 0.7416, 0.476, 0.7537]}, {"w": "an", "b": [0.4812, 0.7416, 0.498, 0.7537]}, {"w": "analyst,", "b": [0.5033, 0.7416, 0.5577, 0.7537]}, {"w": "might", "b": [0.563, 0.7416, 0.6032, 0.7537]}, {"w": "choose", "b": [0.6084, 0.7416, 0.6536, 0.7537]}, {"w": "to", "b": [0.6588, 0.7416, 0.673, 0.7537]}, {"w": "treat", "b": [0.6782, 0.7416, 0.7118, 0.7537]}, {"w": "the", "b": [0.7171, 0.7416, 0.7392, 0.7537]}, {"w": "two", "b": [0.7444, 0.7416, 0.7692, 0.7537]}, {"w": "tokens", "b": [0.7744, 0.7416, 0.8187, 0.7537]}, {"w": "“Love”", "b": [0.8239, 0.7416, 0.8715, 0.7537]}, {"w": "and", "b": [0.1312, 0.7559, 0.1565, 0.7679]}, {"w": "“love”", "b": [0.1617, 0.7559, 0.2031, 0.7679]}, {"w": "as", "b": [0.2083, 0.7559, 0.2223, 0.7679]}, {"w": "two", "b": [0.2276, 0.7559, 0.252, 0.7679]}, {"w": "separate", "b": [0.2572, 0.7559, 0.3139, 0.7679]}, {"w": "vocabulary", "b": [0.3191, 0.7559, 0.394, 0.7679]}, {"w": "entities.", "b": [0.3993, 0.7559, 0.4529, 0.7679]}]}, {"id": "b_37", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "6", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 96, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Document 1", "words": [{"w": "Document", "b": [0.2001, 0.1737, 0.2854, 0.1889]}, {"w": "1", "b": [0.2906, 0.1737, 0.301, 0.1889]}]}, {"id": "b_1", "type": "paragraph", "text": "Document 2", "words": [{"w": "Document", "b": [0.2001, 0.2074, 0.2854, 0.2226]}, {"w": "2", "b": [0.2906, 0.2074, 0.301, 0.2226]}]}, {"id": "b_2", "type": "paragraph", "text": "Document 3", "words": [{"w": "Document", "b": [0.2001, 0.2412, 0.2854, 0.2563]}, {"w": "3", "b": [0.2906, 0.2412, 0.301, 0.2563]}]}, {"id": "b_3", "type": "paragraph", "text": "Document 4", "words": [{"w": "Document", "b": [0.2001, 0.2749, 0.2854, 0.29]}, {"w": "4", "b": [0.2906, 0.2749, 0.301, 0.29]}]}, {"id": "b_4", "type": "paragraph", "text": "Document 5", "words": [{"w": "Document", "b": [0.2001, 0.3086, 0.2854, 0.3238]}, {"w": "5", "b": [0.2906, 0.3086, 0.301, 0.3238]}]}, {"id": "b_5", "type": "paragraph", "text": "Document 6", "words": [{"w": "Document", "b": [0.2001, 0.3423, 0.2854, 0.3575]}, {"w": "6", "b": [0.2906, 0.3423, 0.301, 0.3575]}]}, {"id": "b_6", "type": "paragraph", "text": "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16", "words": [{"w": "1", "b": [0.3238, 0.14, 0.3342, 0.1552]}, {"w": "2", "b": [0.355, 0.14, 0.3654, 0.1552]}, {"w": "3", "b": [0.3862, 0.14, 0.3966, 0.1552]}, {"w": "4", "b": [0.4174, 0.14, 0.4278, 0.1552]}, {"w": "5", "b": [0.4486, 0.14, 0.459, 0.1552]}, {"w": "6", "b": [0.4797, 0.14, 0.4902, 0.1552]}, {"w": "7", "b": [0.5109, 0.14, 0.5213, 0.1552]}, {"w": "8", "b": [0.5421, 0.14, 0.5525, 0.1552]}, {"w": "9", "b": [0.5733, 0.14, 0.5837, 0.1552]}, {"w": "10", "b": [0.5993, 0.14, 0.6201, 0.1552]}, {"w": "11", "b": [0.6312, 0.14, 0.6506, 0.1552]}, {"w": "12", "b": [0.6617, 0.14, 0.6825, 0.1552]}, {"w": "13", "b": [0.6929, 0.14, 0.7137, 0.1552]}, {"w": "14", "b": [0.7241, 0.14, 0.7449, 0.1552]}, {"w": "15", "b": [0.7553, 0.14, 0.7761, 0.1552]}, {"w": "16", "b": [0.7865, 0.14, 0.8073, 0.1552]}]}, {"id": "b_7", "type": "paragraph", "text": "1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0", "words": [{"w": "1", "b": [0.3238, 0.1737, 0.3342, 0.1889]}, {"w": "0", "b": [0.355, 0.1737, 0.3654, 0.1889]}, {"w": "0", "b": [0.3862, 0.1737, 0.3966, 0.1889]}, {"w": "0", "b": [0.4174, 0.1737, 0.4278, 0.1889]}, {"w": "0", "b": [0.4486, 0.1737, 0.459, 0.1889]}, {"w": "0", "b": [0.4797, 0.1737, 0.4902, 0.1889]}, {"w": "1", "b": [0.5109, 0.1737, 0.5213, 0.1889]}, {"w": "0", "b": [0.5421, 0.1737, 0.5525, 0.1889]}, {"w": "1", "b": [0.5733, 0.1737, 0.5837, 0.1889]}, {"w": "0", "b": [0.6045, 0.1737, 0.6149, 0.1889]}, {"w": "0", "b": [0.6357, 0.1737, 0.6461, 0.1889]}, {"w": "0", "b": [0.6669, 0.1737, 0.6773, 0.1889]}, {"w": "0", "b": [0.6981, 0.1737, 0.7085, 0.1889]}, {"w": "0", "b": [0.7293, 0.1737, 0.7397, 0.1889]}, {"w": "1", "b": [0.7605, 0.1737, 0.7709, 0.1889]}, {"w": "0", "b": [0.7917, 0.1737, 0.8021, 0.1889]}]}, {"id": "b_8", "type": "paragraph", "text": "1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1", "words": [{"w": "1", "b": [0.3238, 0.2074, 0.3342, 0.2226]}, {"w": "0", "b": [0.355, 0.2074, 0.3654, 0.2226]}, {"w": "1", "b": [0.3862, 0.2074, 0.3966, 0.2226]}, {"w": "0", "b": [0.4174, 0.2074, 0.4278, 0.2226]}, {"w": "0", "b": [0.4486, 0.2074, 0.459, 0.2226]}, {"w": "0", "b": [0.4797, 0.2074, 0.4902, 0.2226]}, {"w": "1", "b": [0.5109, 0.2074, 0.5213, 0.2226]}, {"w": "0", "b": [0.5421, 0.2074, 0.5525, 0.2226]}, {"w": "1", "b": [0.5733, 0.2074, 0.5837, 0.2226]}, {"w": "0", "b": [0.6045, 0.2074, 0.6149, 0.2226]}, {"w": "0", "b": [0.6357, 0.2074, 0.6461, 0.2226]}, {"w": "0", "b": [0.6669, 0.2074, 0.6773, 0.2226]}, {"w": "0", "b": [0.6981, 0.2074, 0.7085, 0.2226]}, {"w": "0", "b": [0.7293, 0.2074, 0.7397, 0.2226]}, {"w": "0", "b": [0.7605, 0.2074, 0.7709, 0.2226]}, {"w": "1", "b": [0.7917, 0.2074, 0.8021, 0.2226]}]}, {"id": "b_9", "type": "paragraph", "text": "0 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0", "words": [{"w": "0", "b": [0.3238, 0.2412, 0.3342, 0.2563]}, {"w": "1", "b": [0.355, 0.2412, 0.3654, 0.2563]}, {"w": "0", "b": [0.3862, 0.2412, 0.3966, 0.2563]}, {"w": "1", "b": [0.4174, 0.2412, 0.4278, 0.2563]}, {"w": "0", "b": [0.4486, 0.2412, 0.459, 0.2563]}, {"w": "0", "b": [0.4797, 0.2412, 0.4902, 0.2563]}, {"w": "0", "b": [0.5109, 0.2412, 0.5213, 0.2563]}, {"w": "0", "b": [0.5421, 0.2412, 0.5525, 0.2563]}, {"w": "0", "b": [0.5733, 0.2412, 0.5837, 0.2563]}, {"w": "0", "b": [0.6045, 0.2412, 0.6149, 0.2563]}, {"w": "0", "b": [0.6357, 0.2412, 0.6461, 0.2563]}, {"w": "1", "b": [0.6669, 0.2412, 0.6773, 0.2563]}, {"w": "1", "b": [0.6981, 0.2412, 0.7085, 0.2563]}, {"w": "0", "b": [0.7293, 0.2412, 0.7397, 0.2563]}, {"w": "0", "b": [0.7605, 0.2412, 0.7709, 0.2563]}, {"w": "0", "b": [0.7917, 0.2412, 0.8021, 0.2563]}]}, {"id": "b_10", "type": "paragraph", "text": "0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0", "words": [{"w": "0", "b": [0.3238, 0.2749, 0.3342, 0.29]}, {"w": "0", "b": [0.355, 0.2749, 0.3654, 0.29]}, {"w": "0", "b": [0.3862, 0.2749, 0.3966, 0.29]}, {"w": "0", "b": [0.4174, 0.2749, 0.4278, 0.29]}, {"w": "1", "b": [0.4486, 0.2749, 0.459, 0.29]}, {"w": "1", "b": [0.4797, 0.2749, 0.4902, 0.29]}, {"w": "0", "b": [0.5109, 0.2749, 0.5213, 0.29]}, {"w": "0", "b": [0.5421, 0.2749, 0.5525, 0.29]}, {"w": "0", "b": [0.5733, 0.2749, 0.5837, 0.29]}, {"w": "0", "b": [0.6045, 0.2749, 0.6149, 0.29]}, {"w": "0", "b": [0.6357, 0.2749, 0.6461, 0.29]}, {"w": "0", "b": [0.6669, 0.2749, 0.6773, 0.29]}, {"w": "0", "b": [0.6981, 0.2749, 0.7085, 0.29]}, {"w": "0", "b": [0.7293, 0.2749, 0.7397, 0.29]}, {"w": "0", "b": [0.7605, 0.2749, 0.7709, 0.29]}, {"w": "0", "b": [0.7917, 0.2749, 0.8021, 0.29]}]}, {"id": "b_11", "type": "paragraph", "text": "0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0", "words": [{"w": "0", "b": [0.3238, 0.3086, 0.3342, 0.3238]}, {"w": "0", "b": [0.355, 0.3086, 0.3654, 0.3238]}, {"w": "0", "b": [0.3862, 0.3086, 0.3966, 0.3238]}, {"w": "0", "b": [0.4174, 0.3086, 0.4278, 0.3238]}, {"w": "0", "b": [0.4486, 0.3086, 0.459, 0.3238]}, {"w": "0", "b": [0.4797, 0.3086, 0.4902, 0.3238]}, {"w": "0", "b": [0.5109, 0.3086, 0.5213, 0.3238]}, {"w": "1", "b": [0.5421, 0.3086, 0.5525, 0.3238]}, {"w": "0", "b": [0.5733, 0.3086, 0.5837, 0.3238]}, {"w": "1", "b": [0.6045, 0.3086, 0.6149, 0.3238]}, {"w": "1", "b": [0.6357, 0.3086, 0.6461, 0.3238]}, {"w": "0", "b": [0.6669, 0.3086, 0.6773, 0.3238]}, {"w": "0", "b": [0.6981, 0.3086, 0.7085, 0.3238]}, {"w": "1", "b": [0.7293, 0.3086, 0.7397, 0.3238]}, {"w": "0", "b": [0.7605, 0.3086, 0.7709, 0.3238]}, {"w": "0", "b": [0.7917, 0.3086, 0.8021, 0.3238]}]}, {"id": "b_12", "type": "paragraph", "text": "0 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0", "words": [{"w": "0", "b": [0.3238, 0.3423, 0.3342, 0.3575]}, {"w": "1", "b": [0.355, 0.3423, 0.3654, 0.3575]}, {"w": "0", "b": [0.3862, 0.3423, 0.3966, 0.3575]}, {"w": "1", "b": [0.4174, 0.3423, 0.4278, 0.3575]}, {"w": "0", "b": [0.4486, 0.3423, 0.459, 0.3575]}, {"w": "0", "b": [0.4797, 0.3423, 0.4902, 0.3575]}, {"w": "0", "b": [0.5109, 0.3423, 0.5213, 0.3575]}, {"w": "0", "b": [0.5421, 0.3423, 0.5525, 0.3575]}, {"w": "0", "b": [0.5733, 0.3423, 0.5837, 0.3575]}, {"w": "0", "b": [0.6045, 0.3423, 0.6149, 0.3575]}, {"w": "0", "b": [0.6357, 0.3423, 0.6461, 0.3575]}, {"w": "1", "b": [0.6669, 0.3423, 0.6773, 0.3575]}, {"w": "1", "b": [0.6981, 0.3423, 0.7085, 0.3575]}, {"w": "0", "b": [0.7293, 0.3423, 0.7397, 0.3575]}, {"w": "0", "b": [0.7605, 0.3423, 0.7709, 0.3575]}, {"w": "0", "b": [0.7917, 0.3423, 0.8021, 0.3575]}]}, {"id": "b_14", "type": "paragraph", "text": "word", "words": [{"w": "word", "b": [0.7833, 0.0872, 0.8041, 0.1184]}]}, {"id": "b_15", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5549, 0.1036, 0.5689, 0.1204]}]}, {"id": "b_16", "type": "paragraph", "text": "Figure 6: Feature vectors.", "words": [{"w": "Figure", "b": [0.3953, 0.3812, 0.4474, 0.3962]}, {"w": "6:", "b": [0.4536, 0.3812, 0.4679, 0.3962]}, {"w": "Feature", "b": [0.4761, 0.3812, 0.5369, 0.3962]}, {"w": "vectors.", "b": [0.5431, 0.3812, 0.6048, 0.3962]}]}, {"id": "b_17", "type": "paragraph", "text": "The 1 is in a specific position if the corresponding token is present in the text. Otherwise, the feature at that position has a 0.", "words": [{"w": "The", "b": [0.1306, 0.4308, 0.163, 0.4457]}, {"w": "1", "b": [0.1691, 0.4308, 0.1785, 0.4457]}, {"w": "is", "b": [0.1847, 0.4308, 0.1973, 0.4457]}, {"w": "in", "b": [0.2035, 0.4308, 0.2192, 0.4457]}, {"w": "a", "b": [0.2253, 0.4308, 0.2347, 0.4457]}, {"w": "specific", "b": [0.2409, 0.4308, 0.3, 0.4457]}, {"w": "position", "b": [0.3062, 0.4308, 0.3716, 0.4457]}, {"w": "if", "b": [0.3778, 0.4308, 0.3887, 0.4457]}, {"w": "the", "b": [0.3949, 0.4308, 0.421, 0.4457]}, {"w": "corresponding", "b": [0.4272, 0.4308, 0.5418, 0.4457]}, {"w": "token", "b": [0.548, 0.4308, 0.5929, 0.4457]}, {"w": "is", "b": [0.5991, 0.4308, 0.6117, 0.4457]}, {"w": "present", "b": [0.6179, 0.4308, 0.6771, 0.4457]}, {"w": "in", "b": [0.6833, 0.4308, 0.699, 0.4457]}, {"w": "the", "b": [0.7051, 0.4308, 0.7313, 0.4457]}, {"w": "text.", "b": [0.7374, 0.4308, 0.7756, 0.4457]}, {"w": "Otherwise,", "b": [0.7838, 0.4308, 0.8717, 0.4457]}, {"w": "the", "b": [0.1312, 0.4487, 0.1569, 0.4637]}, {"w": "feature", "b": [0.163, 0.4487, 0.219, 0.4637]}, {"w": "at", "b": [0.2251, 0.4487, 0.2415, 0.4637]}, {"w": "that", "b": [0.2477, 0.4487, 0.2815, 0.4637]}, {"w": "position", "b": [0.2877, 0.4487, 0.3519, 0.4637]}, {"w": "has", "b": [0.358, 0.4487, 0.3848, 0.4637]}, {"w": "a", "b": [0.3909, 0.4487, 0.4001, 0.4637]}, {"w": "0.", "b": [0.4062, 0.4487, 0.4205, 0.4637]}]}, {"id": "b_18", "type": "paragraph", "text": "For instance, document 1 “Love, love is a verb” is represented by the following feature vector:", "words": [{"w": "For", "b": [0.1312, 0.4756, 0.1576, 0.4906]}, {"w": "instance,", "b": [0.1635, 0.4756, 0.233, 0.4906]}, {"w": "document", "b": [0.2389, 0.4756, 0.3163, 0.4906]}, {"w": "1", "b": [0.322, 0.4756, 0.3311, 0.4906]}, {"w": "“Love,", "b": [0.3369, 0.4756, 0.3874, 0.4906]}, {"w": "love", "b": [0.3933, 0.4756, 0.424, 0.4906]}, {"w": "is", "b": [0.4298, 0.4756, 0.442, 0.4906]}, {"w": "a", "b": [0.4479, 0.4756, 0.4569, 0.4906]}, {"w": "verb”", "b": [0.4628, 0.4756, 0.5055, 0.4906]}, {"w": "is", "b": [0.5114, 0.4756, 0.5236, 0.4906]}, {"w": "represented", "b": [0.5294, 0.4756, 0.6196, 0.4906]}, {"w": "by", "b": [0.6255, 0.4756, 0.6445, 0.4906]}, {"w": "the", "b": [0.6504, 0.4756, 0.6755, 0.4906]}, {"w": "following", "b": [0.6814, 0.4756, 0.7517, 0.4906]}, {"w": "feature", "b": [0.7576, 0.4756, 0.8124, 0.4906]}, {"w": "vector:", "b": [0.8183, 0.4756, 0.8716, 0.4906]}]}, {"id": "b_19", "type": "paragraph", "text": "[1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0]", "words": [{"w": "[1,", "b": [0.3595, 0.5205, 0.3791, 0.5357]}, {"w": "0,", "b": [0.3822, 0.5205, 0.3965, 0.5357]}, {"w": "0,", "b": [0.3996, 0.5205, 0.414, 0.5357]}, {"w": "0,", "b": [0.417, 0.5205, 0.4314, 0.5357]}, {"w": "0,", "b": [0.4344, 0.5205, 0.4488, 0.5357]}, {"w": "0,", "b": [0.4519, 0.5205, 0.4662, 0.5357]}, {"w": "1,", "b": [0.4693, 0.5205, 0.4837, 0.5357]}, {"w": "0,", "b": [0.4867, 0.5205, 0.5011, 0.5357]}, {"w": "1,", "b": [0.5041, 0.5205, 0.5185, 0.5357]}, {"w": "0,", "b": [0.5216, 0.5205, 0.5359, 0.5357]}, {"w": "0,", "b": [0.539, 0.5205, 0.5533, 0.5357]}, {"w": "0,", "b": [0.5564, 0.5205, 0.5708, 0.5357]}, {"w": "0,", "b": [0.5738, 0.5205, 0.5882, 0.5357]}, {"w": "0,", "b": [0.5913, 0.5205, 0.6056, 0.5357]}, {"w": "1,", "b": [0.6087, 0.5205, 0.623, 0.5357]}, {"w": "0]", "b": [0.6261, 0.5205, 0.6405, 0.5354]}]}, {"id": "b_20", "type": "paragraph", "text": "Use the corresponding labeled feature vectors as the training data, which any classification learning algorithm can work with.", "words": [{"w": "Use", "b": [0.1312, 0.5553, 0.1607, 0.5702]}, {"w": "the", "b": [0.1669, 0.5553, 0.1926, 0.5702]}, {"w": "corresponding", "b": [0.1988, 0.5553, 0.3118, 0.5702]}, {"w": "labeled", "b": [0.318, 0.5553, 0.3752, 0.5702]}, {"w": "feature", "b": [0.3814, 0.5553, 0.4376, 0.5702]}, {"w": "vectors", "b": [0.4437, 0.5553, 0.5006, 0.5702]}, {"w": "as", "b": [0.5067, 0.5553, 0.5233, 0.5702]}, {"w": "the", "b": [0.5295, 0.5553, 0.5553, 0.5702]}, {"w": "training", "b": [0.5614, 0.5553, 0.6253, 0.5702]}, {"w": "data,", "b": [0.6315, 0.5553, 0.6727, 0.5702]}, {"w": "which", "b": [0.6789, 0.5553, 0.7258, 0.5702]}, {"w": "any", "b": [0.7319, 0.5553, 0.7608, 0.5702]}, {"w": "classification", "b": [0.7669, 0.5553, 0.8692, 0.5702]}, {"w": "learning", "b": [0.1312, 0.5732, 0.1959, 0.5882]}, {"w": "algorithm", "b": [0.202, 0.5732, 0.28, 0.5882]}, {"w": "can", "b": [0.2862, 0.5732, 0.3138, 0.5882]}, {"w": "work", "b": [0.32, 0.5732, 0.359, 0.5882]}, {"w": "with.", "b": [0.3652, 0.5732, 0.4062, 0.5882]}]}, {"id": "b_21", "type": "paragraph", "text": "There are several bag-of-words “flavors.” The above binary-value model often works well. Alternatives to binary values include 1) counts of tokens, 2) frequencies of tokens, or 3) TF-IDF (term frequency-inverse document frequency). If you use the counts of words, then the feature value for “love” in Document 1 “Love, love is a verb” would be 2, representing the number of times the word “love” appears in the document. If applying frequencies of tokens, the value for “love” would be 2/5 = 0.4, assuming that the tokenizer extracted two “love” tokens, and five total tokens from Document 1. The TF–IDF value increases proportionally to the frequency of a word in the document and is offset by the number of documents in the corpus that contain that word. This adjusts for some words, such as prepositions and pronouns, appearing more frequently in general. I will not go into further detail on TF-IDF, but would recommend the interested reader to learn more about it online.", "words": [{"w": "There", "b": [0.1306, 0.6001, 0.1787, 0.6151]}, {"w": "are", "b": [0.1856, 0.6001, 0.2107, 0.6151]}, {"w": "several", "b": [0.2176, 0.6001, 0.2732, 0.6151]}, {"w": "bag-of-words", "b": [0.28, 0.6001, 0.3847, 0.6151]}, {"w": "“flavors.”", "b": [0.3916, 0.6001, 0.465, 0.6151]}, {"w": "The", "b": [0.4753, 0.6001, 0.5077, 0.6151]}, {"w": "above", "b": [0.5145, 0.6001, 0.5616, 0.6151]}, {"w": "binary-value", "b": [0.5684, 0.6001, 0.67, 0.6151]}, {"w": "model", "b": [0.6768, 0.6001, 0.7264, 0.6151]}, {"w": "often", "b": [0.7333, 0.6001, 0.7746, 0.6151]}, {"w": "works", "b": [0.7814, 0.6001, 0.8287, 0.6151]}, {"w": "well.", "b": [0.8355, 0.6001, 0.8726, 0.6151]}, {"w": "Alternatives", "b": [0.1305, 0.6181, 0.2306, 0.633]}, {"w": "to", "b": [0.2382, 0.6181, 0.2549, 0.633]}, {"w": "binary", "b": [0.2625, 0.6181, 0.3154, 0.633]}, {"w": "values", "b": [0.323, 0.6181, 0.3728, 0.633]}, {"w": "include", "b": [0.3804, 0.6181, 0.439, 0.633]}, {"w": "1)", "b": [0.4466, 0.6181, 0.4633, 0.633]}, {"w": "counts", "b": [0.4709, 0.6181, 0.5238, 0.633]}, {"w": "of", "b": [0.5314, 0.6181, 0.5466, 0.633]}, {"w": "tokens,", "b": [0.5542, 0.6181, 0.6118, 0.633]}, {"w": "2)", "b": [0.6198, 0.6181, 0.6365, 0.633]}, {"w": "frequencies", "b": [0.6441, 0.6181, 0.7343, 0.633]}, {"w": "of", "b": [0.7418, 0.6181, 0.757, 0.633]}, {"w": "tokens,", "b": [0.7646, 0.6181, 0.8223, 0.633]}, {"w": "or", "b": [0.8302, 0.6181, 0.847, 0.633]}, {"w": "3)", "b": [0.8546, 0.6181, 0.8713, 0.633]}, {"w": "TF-IDF", "b": [0.1312, 0.6363, 0.2041, 0.6513]}, {"w": "(term", "b": [0.2102, 0.636, 0.2546, 0.651]}, {"w": "frequency-inverse", "b": [0.2607, 0.636, 0.397, 0.651]}, {"w": "document", "b": [0.4032, 0.636, 0.4808, 0.651]}, {"w": "frequency).", "b": [0.4869, 0.636, 0.5752, 0.651]}, {"w": "If", "b": [0.5834, 0.636, 0.5955, 0.651]}, {"w": "you", "b": [0.6016, 0.636, 0.6299, 0.651]}, {"w": "use", "b": [0.636, 0.636, 0.6613, 0.651]}, {"w": "the", "b": [0.6674, 0.636, 0.6926, 0.651]}, {"w": "counts", "b": [0.6988, 0.636, 0.7498, 0.651]}, {"w": "of", "b": [0.7559, 0.636, 0.7705, 0.651]}, {"w": "words,", "b": [0.7767, 0.636, 0.8277, 0.651]}, {"w": "then", "b": [0.8338, 0.636, 0.8691, 0.651]}, {"w": "the", "b": [0.1312, 0.654, 0.1564, 0.6689]}, {"w": "feature", "b": [0.162, 0.654, 0.2169, 0.6689]}, {"w": "value", "b": [0.2226, 0.654, 0.2633, 0.6689]}, {"w": "for", "b": [0.2689, 0.654, 0.2906, 0.6689]}, {"w": "“love”", "b": [0.2963, 0.654, 0.344, 0.6689]}, {"w": "in", "b": [0.3497, 0.654, 0.3648, 0.6689]}, {"w": "Document", "b": [0.3704, 0.654, 0.4516, 0.6689]}, {"w": "1", "b": [0.4573, 0.654, 0.4663, 0.6689]}, {"w": "“Love,", "b": [0.472, 0.654, 0.5225, 0.6689]}, {"w": "love", "b": [0.5282, 0.654, 0.5589, 0.6689]}, {"w": "is", "b": [0.5645, 0.654, 0.5767, 0.6689]}, {"w": "a", "b": [0.5824, 0.654, 0.5914, 0.6689]}, {"w": "verb”", "b": [0.5971, 0.654, 0.6399, 0.6689]}, {"w": "would", "b": [0.6456, 0.654, 0.6923, 0.6689]}, {"w": "be", "b": [0.698, 0.654, 0.7166, 0.6689]}, {"w": "2,", "b": [0.722, 0.654, 0.7361, 0.6689]}, {"w": "representing", "b": [0.7419, 0.654, 0.838, 0.6689]}, {"w": "the", "b": [0.8437, 0.654, 0.8689, 0.6689]}, {"w": "number", "b": [0.1312, 0.6719, 0.1914, 0.6869]}, {"w": "of", "b": [0.1976, 0.6719, 0.2123, 0.6869]}, {"w": "times", "b": [0.2184, 0.6719, 0.261, 0.6869]}, {"w": "the", "b": [0.2671, 0.6719, 0.2924, 0.6869]}, {"w": "word", "b": [0.2986, 0.6719, 0.3375, 0.6869]}, {"w": "“love”", "b": [0.3437, 0.6719, 0.3917, 0.6869]}, {"w": "appears", "b": [0.3978, 0.6719, 0.4592, 0.6869]}, {"w": "in", "b": [0.4653, 0.6719, 0.4805, 0.6869]}, {"w": "the", "b": [0.4866, 0.6719, 0.5119, 0.6869]}, {"w": "document.", "b": [0.5181, 0.6719, 0.601, 0.6869]}, {"w": "If", "b": [0.6092, 0.6719, 0.6213, 0.6869]}, {"w": "applying", "b": [0.6275, 0.6719, 0.6957, 0.6869]}, {"w": "frequencies", "b": [0.7019, 0.6719, 0.789, 0.6869]}, {"w": "of", "b": [0.7952, 0.6719, 0.8098, 0.6869]}, {"w": "tokens,", "b": [0.816, 0.6719, 0.8717, 0.6869]}, {"w": "the", "b": [0.1312, 0.6899, 0.1574, 0.7048]}, {"w": "value", "b": [0.1638, 0.6899, 0.2062, 0.7048]}, {"w": "for", "b": [0.2126, 0.6899, 0.2351, 0.7048]}, {"w": "“love”", "b": [0.2415, 0.6899, 0.2912, 0.7048]}, {"w": "would", "b": [0.2976, 0.6899, 0.3462, 0.7048]}, {"w": "be", "b": [0.3526, 0.6899, 0.372, 0.7048]}, {"w": "2/5", "b": [0.3783, 0.6899, 0.4063, 0.7051]}, {"w": "=", "b": [0.4118, 0.6899, 0.4265, 0.7048]}, {"w": "0.4,", "b": [0.432, 0.6899, 0.4612, 0.7051]}, {"w": "assuming", "b": [0.4676, 0.6899, 0.5431, 0.7048]}, {"w": "that", "b": [0.5495, 0.6899, 0.5841, 0.7048]}, {"w": "the", "b": [0.5904, 0.6899, 0.6166, 0.7048]}, {"w": "tokenizer", "b": [0.623, 0.6899, 0.6973, 0.7048]}, {"w": "extracted", "b": [0.7037, 0.6899, 0.7807, 0.7048]}, {"w": "two", "b": [0.7871, 0.6899, 0.8163, 0.7048]}, {"w": "“love”", "b": [0.8227, 0.6899, 0.8724, 0.7048]}, {"w": "tokens,", "b": [0.1312, 0.7078, 0.1876, 0.7228]}, {"w": "and", "b": [0.1937, 0.7078, 0.2234, 0.7228]}, {"w": "five", "b": [0.2295, 0.7078, 0.2571, 0.7228]}, {"w": "total", "b": [0.2633, 0.7078, 0.3011, 0.7228]}, {"w": "tokens", "b": [0.3073, 0.7078, 0.3585, 0.7228]}, {"w": "from", "b": [0.3647, 0.7078, 0.402, 0.7228]}, {"w": "Document", "b": [0.4082, 0.7078, 0.4907, 0.7228]}, {"w": "1.", "b": [0.4967, 0.7078, 0.511, 0.7228]}, {"w": "The", "b": [0.5193, 0.7078, 0.551, 0.7228]}, {"w": "TF–IDF", "b": [0.5571, 0.7078, 0.6243, 0.7228]}, {"w": "value", "b": [0.6305, 0.7078, 0.6719, 0.7228]}, {"w": "increases", "b": [0.678, 0.7078, 0.7489, 0.7228]}, {"w": "proportionally", "b": [0.755, 0.7078, 0.8696, 0.7228]}, {"w": "to", "b": [0.1312, 0.7258, 0.148, 0.7407]}, {"w": "the", "b": [0.1547, 0.7258, 0.1809, 0.7407]}, {"w": "frequency", "b": [0.1877, 0.7258, 0.2667, 0.7407]}, {"w": "of", "b": [0.2735, 0.7258, 0.2886, 0.7407]}, {"w": "a", "b": [0.2954, 0.7258, 0.3048, 0.7407]}, {"w": "word", "b": [0.3116, 0.7258, 0.3519, 0.7407]}, {"w": "in", "b": [0.3587, 0.7258, 0.3743, 0.7407]}, {"w": "the", "b": [0.3811, 0.7258, 0.4073, 0.7407]}, {"w": "document", "b": [0.414, 0.7258, 0.4946, 0.7407]}, {"w": "and", "b": [0.5013, 0.7258, 0.5317, 0.7407]}, {"w": "is", "b": [0.5384, 0.7258, 0.5511, 0.7407]}, {"w": "offset", "b": [0.5578, 0.7258, 0.6014, 0.7407]}, {"w": "by", "b": [0.6081, 0.7258, 0.628, 0.7407]}, {"w": "the", "b": [0.6348, 0.7258, 0.6609, 0.7407]}, {"w": "number", "b": [0.6677, 0.7258, 0.73, 0.7407]}, {"w": "of", "b": [0.7367, 0.7258, 0.7519, 0.7407]}, {"w": "documents", "b": [0.7587, 0.7258, 0.8466, 0.7407]}, {"w": "in", "b": [0.8534, 0.7258, 0.8691, 0.7407]}, {"w": "the", "b": [0.1312, 0.7437, 0.1574, 0.7587]}, {"w": "corpus", "b": [0.1636, 0.7437, 0.2171, 0.7587]}, {"w": "that", "b": [0.2234, 0.7437, 0.2579, 0.7587]}, {"w": "contain", "b": [0.2641, 0.7437, 0.3243, 0.7587]}, {"w": "that", "b": [0.3305, 0.7437, 0.365, 0.7587]}, {"w": "word.", "b": [0.3713, 0.7437, 0.4168, 0.7587]}, {"w": "This", "b": [0.4253, 0.7437, 0.462, 0.7587]}, {"w": "adjusts", "b": [0.4682, 0.7437, 0.5265, 0.7587]}, {"w": "for", "b": [0.5328, 0.7437, 0.5553, 0.7587]}, {"w": "some", "b": [0.5615, 0.7437, 0.6024, 0.7587]}, {"w": "words,", "b": [0.6087, 0.7437, 0.6616, 0.7587]}, {"w": "such", "b": [0.6679, 0.7437, 0.7041, 0.7587]}, {"w": "as", "b": [0.7104, 0.7437, 0.7272, 0.7587]}, {"w": "prepositions", "b": [0.7334, 0.7437, 0.8326, 0.7587]}, {"w": "and", "b": [0.8388, 0.7437, 0.8691, 0.7587]}, {"w": "pronouns,", "b": [0.1312, 0.7617, 0.2095, 0.7766]}, {"w": "appearing", "b": [0.2156, 0.7617, 0.2943, 0.7766]}, {"w": "more", "b": [0.3004, 0.7617, 0.34, 0.7766]}, {"w": "frequently", "b": [0.3462, 0.7617, 0.4264, 0.7766]}, {"w": "in", "b": [0.4325, 0.7617, 0.4477, 0.7766]}, {"w": "general.", "b": [0.4539, 0.7617, 0.5158, 0.7766]}, {"w": "I", "b": [0.524, 0.7617, 0.5306, 0.7766]}, {"w": "will", "b": [0.5367, 0.7617, 0.5651, 0.7766]}, {"w": "not", "b": [0.5713, 0.7617, 0.5976, 0.7766]}, {"w": "go", "b": [0.6038, 0.7617, 0.622, 0.7766]}, {"w": "into", "b": [0.6282, 0.7617, 0.6591, 0.7766]}, {"w": "further", "b": [0.6652, 0.7617, 0.7206, 0.7766]}, {"w": "detail", "b": [0.7268, 0.7617, 0.7714, 0.7766]}, {"w": "on", "b": [0.7776, 0.7617, 0.7968, 0.7766]}, {"w": "TF-IDF,", "b": [0.803, 0.7617, 0.8716, 0.7766]}, {"w": "but", "b": [0.1312, 0.7796, 0.1589, 0.7946]}, {"w": "would", "b": [0.1651, 0.7796, 0.2127, 0.7946]}, {"w": "recommend", "b": [0.2189, 0.7796, 0.3112, 0.7946]}, {"w": "the", "b": [0.3174, 0.7796, 0.343, 0.7946]}, {"w": "interested", "b": [0.3492, 0.7796, 0.4278, 0.7946]}, {"w": "reader", "b": [0.4339, 0.7796, 0.4843, 0.7946]}, {"w": "to", "b": [0.4905, 0.7796, 0.5069, 0.7946]}, {"w": "learn", "b": [0.513, 0.7796, 0.5531, 0.7946]}, {"w": "more", "b": [0.5592, 0.7796, 0.5993, 0.7946]}, {"w": "about", "b": [0.6054, 0.7796, 0.6521, 0.7946]}, {"w": "it", "b": [0.6582, 0.7796, 0.6705, 0.7946]}, {"w": "online.", "b": [0.6766, 0.7796, 0.73, 0.7946]}]}, {"id": "b_22", "type": "paragraph", "text": "A straightforward extension of the bag-of-words technique is bag-of-n-grams. An n-gram is a sequence of n words taken from the corpus. If n = 2, and you ignore the punctuation, then all two-grams (usually called bigrams) that can be found in the text “No, I am your father.” are as follows: [“No I,” “I am,” “am your,” “your father”]. The three-grams are [“No", "words": [{"w": "A", "b": [0.1305, 0.8065, 0.1442, 0.8215]}, {"w": "straightforward", "b": [0.1504, 0.8065, 0.2729, 0.8215]}, {"w": "extension", "b": [0.2791, 0.8065, 0.3538, 0.8215]}, {"w": "of", "b": [0.36, 0.8065, 0.3747, 0.8215]}, {"w": "the", "b": [0.3808, 0.8065, 0.4062, 0.8215]}, {"w": "bag-of-words", "b": [0.4124, 0.8065, 0.514, 0.8215]}, {"w": "technique", "b": [0.5201, 0.8065, 0.5963, 0.8215]}, {"w": "is", "b": [0.6024, 0.8065, 0.6147, 0.8215]}, {"w": "bag-of-n-grams.", "b": [0.6207, 0.8065, 0.7643, 0.8218]}, {"w": "An", "b": [0.7725, 0.8065, 0.7963, 0.8215]}, {"w": "n-gram", "b": [0.8026, 0.8068, 0.8688, 0.8218]}, {"w": "is", "b": [0.1312, 0.8245, 0.1439, 0.8394]}, {"w": "a", "b": [0.1501, 0.8245, 0.1595, 0.8394]}, {"w": "sequence", "b": [0.1656, 0.8245, 0.2374, 0.8394]}, {"w": "of", "b": [0.2436, 0.8245, 0.2587, 0.8394]}, {"w": "n", "b": [0.2648, 0.8248, 0.2759, 0.8397]}, {"w": "words", "b": [0.282, 0.8245, 0.3298, 0.8394]}, {"w": "taken", "b": [0.336, 0.8245, 0.381, 0.8394]}, {"w": "from", "b": [0.3871, 0.8245, 0.4253, 0.8394]}, {"w": "the", "b": [0.4315, 0.8245, 0.4576, 0.8394]}, {"w": "corpus.", "b": [0.4638, 0.8245, 0.5225, 0.8394]}, {"w": "If", "b": [0.5308, 0.8245, 0.5433, 0.8394]}, {"w": "n", "b": [0.5494, 0.8248, 0.5604, 0.8397]}, {"w": "=", "b": [0.5656, 0.8245, 0.5802, 0.8394]}, {"w": "2,", "b": [0.5854, 0.8245, 0.6, 0.8394]}, {"w": "and", "b": [0.6062, 0.8245, 0.6365, 0.8394]}, {"w": "you", "b": [0.6427, 0.8245, 0.672, 0.8394]}, {"w": "ignore", "b": [0.6781, 0.8245, 0.7284, 0.8394]}, {"w": "the", "b": [0.7345, 0.8245, 0.7607, 0.8394]}, {"w": "punctuation,", "b": [0.7669, 0.8245, 0.8715, 0.8394]}, {"w": "then", "b": [0.1312, 0.8424, 0.1676, 0.8574]}, {"w": "all", "b": [0.1737, 0.8424, 0.1934, 0.8574]}, {"w": "two-grams", "b": [0.1996, 0.8424, 0.2838, 0.8574]}, {"w": "(usually", "b": [0.2899, 0.8424, 0.3549, 0.8574]}, {"w": "called", "b": [0.361, 0.8424, 0.4077, 0.8574]}, {"w": "bigrams)", "b": [0.4138, 0.8424, 0.4944, 0.8577]}, {"w": "that", "b": [0.5006, 0.8424, 0.5348, 0.8574]}, {"w": "can", "b": [0.541, 0.8424, 0.569, 0.8574]}, {"w": "be", "b": [0.5751, 0.8424, 0.5943, 0.8574]}, {"w": "found", "b": [0.6005, 0.8424, 0.6467, 0.8574]}, {"w": "in", "b": [0.6528, 0.8424, 0.6684, 0.8574]}, {"w": "the", "b": [0.6745, 0.8424, 0.7005, 0.8574]}, {"w": "text", "b": [0.7066, 0.8424, 0.7393, 0.8574]}, {"w": "“No,", "b": [0.7455, 0.8424, 0.7828, 0.8574]}, {"w": "I", "b": [0.789, 0.8424, 0.7957, 0.8574]}, {"w": "am", "b": [0.8019, 0.8424, 0.8268, 0.8574]}, {"w": "your", "b": [0.8329, 0.8424, 0.8693, 0.8574]}, {"w": "father.”", "b": [0.1312, 0.8604, 0.189, 0.8753]}, {"w": "are", "b": [0.1972, 0.8604, 0.2213, 0.8753]}, {"w": "as", "b": [0.2273, 0.8604, 0.2435, 0.8753]}, {"w": "follows:", "b": [0.2496, 0.8604, 0.3079, 0.8753]}, {"w": "[“No", "b": [0.316, 0.8604, 0.3522, 0.8753]}, {"w": "I,”", "b": [0.3582, 0.8604, 0.3783, 0.8753]}, {"w": "“I", "b": [0.3843, 0.8604, 0.3994, 0.8753]}, {"w": "am,”", "b": [0.4054, 0.8604, 0.443, 0.8753]}, {"w": "“am", "b": [0.4491, 0.8604, 0.4817, 0.8753]}, {"w": "your,”", "b": [0.4877, 0.8604, 0.5365, 0.8753]}, {"w": "“your", "b": [0.5425, 0.8604, 0.5863, 0.8753]}, {"w": "father”].", "b": [0.5923, 0.8604, 0.6577, 0.8753]}, {"w": "The", "b": [0.6658, 0.8604, 0.697, 0.8753]}, {"w": "three-grams", "b": [0.703, 0.8604, 0.7966, 0.8753]}, {"w": "are", "b": [0.8026, 0.8604, 0.8268, 0.8753]}, {"w": "[“No", "b": [0.8328, 0.8604, 0.869, 0.8753]}]}, {"id": "b_23", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "7", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 97, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "I am,” “I am your,” “am your father”]. By mixing all n-grams, up to a certain n, with tokens in one dictionary, we obtain a bag of n-grams that we can tokenize the same way as we deal with a bag-of-words model.", "words": [{"w": "I", "b": [0.1312, 0.0881, 0.1378, 0.1031]}, {"w": "am,”", "b": [0.1436, 0.0881, 0.1813, 0.1031]}, {"w": "“I", "b": [0.1872, 0.0881, 0.2022, 0.1031]}, {"w": "am", "b": [0.2081, 0.0881, 0.2322, 0.1031]}, {"w": "your,”", "b": [0.238, 0.0881, 0.2868, 0.1031]}, {"w": "“am", "b": [0.2927, 0.0881, 0.3253, 0.1031]}, {"w": "your", "b": [0.3311, 0.0881, 0.3663, 0.1031]}, {"w": "father”].", "b": [0.3722, 0.0881, 0.4375, 0.1031]}, {"w": "By", "b": [0.4456, 0.0881, 0.468, 0.1031]}, {"w": "mixing", "b": [0.4738, 0.0881, 0.5276, 0.1031]}, {"w": "all", "b": [0.5334, 0.0881, 0.5525, 0.1031]}, {"w": "n-grams,", "b": [0.5583, 0.0881, 0.6268, 0.1031]}, {"w": "up", "b": [0.6327, 0.0881, 0.6528, 0.1031]}, {"w": "to", "b": [0.6587, 0.0881, 0.6747, 0.1031]}, {"w": "a", "b": [0.6806, 0.0881, 0.6896, 0.1031]}, {"w": "certain", "b": [0.6954, 0.0881, 0.7498, 0.1031]}, {"w": "n,", "b": [0.7555, 0.0881, 0.7716, 0.1033]}, {"w": "with", "b": [0.7775, 0.0881, 0.8126, 0.1031]}, {"w": "tokens", "b": [0.8185, 0.0881, 0.8688, 0.1031]}, {"w": "in", "b": [0.1312, 0.106, 0.1465, 0.121]}, {"w": "one", "b": [0.1526, 0.106, 0.18, 0.121]}, {"w": "dictionary,", "b": [0.1862, 0.106, 0.2705, 0.121]}, {"w": "we", "b": [0.2766, 0.106, 0.2974, 0.121]}, {"w": "obtain", "b": [0.3036, 0.106, 0.3543, 0.121]}, {"w": "a", "b": [0.3605, 0.106, 0.3696, 0.121]}, {"w": "bag", "b": [0.3757, 0.106, 0.4041, 0.121]}, {"w": "of", "b": [0.4103, 0.106, 0.425, 0.121]}, {"w": "n-grams", "b": [0.4312, 0.106, 0.4953, 0.121]}, {"w": "that", "b": [0.5014, 0.106, 0.5349, 0.121]}, {"w": "we", "b": [0.541, 0.106, 0.5618, 0.121]}, {"w": "can", "b": [0.568, 0.106, 0.5954, 0.121]}, {"w": "tokenize", "b": [0.6015, 0.106, 0.6665, 0.121]}, {"w": "the", "b": [0.6727, 0.106, 0.698, 0.121]}, {"w": "same", "b": [0.7042, 0.106, 0.7439, 0.121]}, {"w": "way", "b": [0.75, 0.106, 0.781, 0.121]}, {"w": "as", "b": [0.7871, 0.106, 0.8035, 0.121]}, {"w": "we", "b": [0.8096, 0.106, 0.8304, 0.121]}, {"w": "deal", "b": [0.8365, 0.106, 0.869, 0.121]}, {"w": "with", "b": [0.1306, 0.124, 0.1665, 0.1389]}, {"w": "a", "b": [0.1726, 0.124, 0.1818, 0.1389]}, {"w": "bag-of-words", "b": [0.188, 0.124, 0.2907, 0.1389]}, {"w": "model.", "b": [0.2968, 0.124, 0.3506, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "Because sequences of words are often less common than individual words, using n-grams creates a more sparse feature vector. At the same time, n-grams allow the machine learning algorithm to learn a more nuanced model. For example, the expressions “this movie was not good and boring” and “this movie was good and not boring” have opposite meaning, but would result in the same bag-of-words vectors, based solely on words. If we consider bigrams of words, then bag-of-words vectors of bigrams for those two expressions would be different.", "words": [{"w": "Because", "b": [0.1312, 0.1509, 0.197, 0.1659]}, {"w": "sequences", "b": [0.204, 0.1509, 0.2832, 0.1659]}, {"w": "of", "b": [0.2902, 0.1509, 0.3054, 0.1659]}, {"w": "words", "b": [0.3124, 0.1509, 0.3601, 0.1659]}, {"w": "are", "b": [0.3671, 0.1509, 0.3923, 0.1659]}, {"w": "often", "b": [0.3993, 0.1509, 0.4406, 0.1659]}, {"w": "less", "b": [0.4476, 0.1509, 0.4761, 0.1659]}, {"w": "common", "b": [0.4831, 0.1509, 0.5521, 0.1659]}, {"w": "than", "b": [0.5591, 0.1509, 0.5968, 0.1659]}, {"w": "individual", "b": [0.6038, 0.1509, 0.6859, 0.1659]}, {"w": "words,", "b": [0.6929, 0.1509, 0.7459, 0.1659]}, {"w": "using", "b": [0.7531, 0.1509, 0.7961, 0.1659]}, {"w": "n-grams", "b": [0.8031, 0.1509, 0.8691, 0.1659]}, {"w": "creates", "b": [0.1312, 0.1689, 0.1857, 0.1838]}, {"w": "a", "b": [0.1918, 0.1689, 0.2008, 0.1838]}, {"w": "more", "b": [0.2069, 0.1689, 0.2462, 0.1838]}, {"w": "sparse", "b": [0.2522, 0.1692, 0.3095, 0.1841]}, {"w": "feature", "b": [0.3156, 0.1689, 0.3704, 0.1838]}, {"w": "vector.", "b": [0.3765, 0.1689, 0.4299, 0.1838]}, {"w": "At", "b": [0.438, 0.1689, 0.4581, 0.1838]}, {"w": "the", "b": [0.4642, 0.1689, 0.4894, 0.1838]}, {"w": "same", "b": [0.4954, 0.1689, 0.5347, 0.1838]}, {"w": "time,", "b": [0.5408, 0.1689, 0.581, 0.1838]}, {"w": "n-grams", "b": [0.5872, 0.1689, 0.6506, 0.1838]}, {"w": "allow", "b": [0.6567, 0.1689, 0.6974, 0.1838]}, {"w": "the", "b": [0.7035, 0.1689, 0.7286, 0.1838]}, {"w": "machine", "b": [0.7347, 0.1689, 0.7995, 0.1838]}, {"w": "learning", "b": [0.8056, 0.1689, 0.869, 0.1838]}, {"w": "algorithm", "b": [0.1312, 0.1868, 0.2081, 0.2018]}, {"w": "to", "b": [0.2143, 0.1868, 0.2304, 0.2018]}, {"w": "learn", "b": [0.2366, 0.1868, 0.2761, 0.2018]}, {"w": "a", "b": [0.2822, 0.1868, 0.2913, 0.2018]}, {"w": "more", "b": [0.2975, 0.1868, 0.337, 0.2018]}, {"w": "nuanced", "b": [0.3431, 0.1868, 0.4083, 0.2018]}, {"w": "model.", "b": [0.4145, 0.1868, 0.4676, 0.2018]}, {"w": "For", "b": [0.4758, 0.1868, 0.5024, 0.2018]}, {"w": "example,", "b": [0.5085, 0.1868, 0.5788, 0.2018]}, {"w": "the", "b": [0.585, 0.1868, 0.6102, 0.2018]}, {"w": "expressions", "b": [0.6164, 0.1868, 0.7052, 0.2018]}, {"w": "“this", "b": [0.7114, 0.1868, 0.7494, 0.2018]}, {"w": "movie", "b": [0.7556, 0.1868, 0.8021, 0.2018]}, {"w": "was", "b": [0.8082, 0.1868, 0.8371, 0.2018]}, {"w": "not", "b": [0.8433, 0.1868, 0.8696, 0.2018]}, {"w": "good", "b": [0.1312, 0.2048, 0.1709, 0.2197]}, {"w": "and", "b": [0.1775, 0.2048, 0.2078, 0.2197]}, {"w": "boring”", "b": [0.2144, 0.2048, 0.2761, 0.2197]}, {"w": "and", "b": [0.2826, 0.2048, 0.313, 0.2197]}, {"w": "“this", "b": [0.3195, 0.2048, 0.3588, 0.2197]}, {"w": "movie", "b": [0.3654, 0.2048, 0.4135, 0.2197]}, {"w": "was", "b": [0.42, 0.2048, 0.4499, 0.2197]}, {"w": "good", "b": [0.4565, 0.2048, 0.4962, 0.2197]}, {"w": "and", "b": [0.5027, 0.2048, 0.533, 0.2197]}, {"w": "not", "b": [0.5396, 0.2048, 0.5668, 0.2197]}, {"w": "boring”", "b": [0.5733, 0.2048, 0.635, 0.2197]}, {"w": "have", "b": [0.6416, 0.2048, 0.6787, 0.2197]}, {"w": "opposite", "b": [0.6853, 0.2048, 0.7539, 0.2197]}, {"w": "meaning,", "b": [0.7604, 0.2048, 0.8347, 0.2197]}, {"w": "but", "b": [0.8413, 0.2048, 0.8695, 0.2197]}, {"w": "would", "b": [0.1306, 0.2227, 0.1773, 0.2377]}, {"w": "result", "b": [0.1835, 0.2227, 0.2279, 0.2377]}, {"w": "in", "b": [0.2341, 0.2227, 0.2492, 0.2377]}, {"w": "the", "b": [0.2554, 0.2227, 0.2805, 0.2377]}, {"w": "same", "b": [0.2867, 0.2227, 0.326, 0.2377]}, {"w": "bag-of-words", "b": [0.3322, 0.2227, 0.4329, 0.2377]}, {"w": "vectors,", "b": [0.4391, 0.2227, 0.4996, 0.2377]}, {"w": "based", "b": [0.5058, 0.2227, 0.5501, 0.2377]}, {"w": "solely", "b": [0.5563, 0.2227, 0.6002, 0.2377]}, {"w": "on", "b": [0.6063, 0.2227, 0.6255, 0.2377]}, {"w": "words.", "b": [0.6316, 0.2227, 0.6826, 0.2377]}, {"w": "If", "b": [0.6908, 0.2227, 0.7029, 0.2377]}, {"w": "we", "b": [0.7091, 0.2227, 0.7297, 0.2377]}, {"w": "consider", "b": [0.7359, 0.2227, 0.8004, 0.2377]}, {"w": "bigrams", "b": [0.8066, 0.2227, 0.8691, 0.2377]}, {"w": "of", "b": [0.1312, 0.2406, 0.1461, 0.2556]}, {"w": "words,", "b": [0.1522, 0.2406, 0.2041, 0.2556]}, {"w": "then", "b": [0.2103, 0.2406, 0.2461, 0.2556]}, {"w": "bag-of-words", "b": [0.2523, 0.2406, 0.3549, 0.2556]}, {"w": "vectors", "b": [0.361, 0.2406, 0.4175, 0.2556]}, {"w": "of", "b": [0.4237, 0.2406, 0.4385, 0.2556]}, {"w": "bigrams", "b": [0.4447, 0.2406, 0.5083, 0.2556]}, {"w": "for", "b": [0.5145, 0.2406, 0.5365, 0.2556]}, {"w": "those", "b": [0.5427, 0.2406, 0.5848, 0.2556]}, {"w": "two", "b": [0.591, 0.2406, 0.6196, 0.2556]}, {"w": "expressions", "b": [0.6258, 0.2406, 0.7158, 0.2556]}, {"w": "would", "b": [0.722, 0.2406, 0.7696, 0.2556]}, {"w": "be", "b": [0.7757, 0.2406, 0.7947, 0.2556]}, {"w": "different.", "b": [0.8008, 0.2406, 0.8726, 0.2556]}]}, {"id": "b_2", "type": "equation", "text": "4.2.2 Why Bag-of-Words Works", "words": [{"w": "4.2.2", "b": [0.1312, 0.2888, 0.1749, 0.3038]}, {"w": "Why", "b": [0.1961, 0.2888, 0.2404, 0.3038]}, {"w": "Bag-of-Words", "b": [0.2475, 0.2888, 0.3744, 0.3038]}, {"w": "Works", "b": [0.3815, 0.2888, 0.4406, 0.3038]}]}, {"id": "b_3", "type": "paragraph", "text": "Feature vectors only work when certain rules are followed. One rule is that a feature at position j in a feature vector must represent the same property in all examples in the dataset. If that feature represents the height in cm of a certain person in a dataset, where each example represents a different person, then that must hold true in all other examples. The feature at position j must always represent the height in cm, and nothing else.", "words": [{"w": "Feature", "b": [0.1312, 0.3251, 0.1933, 0.34]}, {"w": "vectors", "b": [0.2006, 0.3251, 0.2583, 0.34]}, {"w": "only", "b": [0.2655, 0.3251, 0.3006, 0.34]}, {"w": "work", "b": [0.3079, 0.3251, 0.3476, 0.34]}, {"w": "when", "b": [0.3549, 0.3251, 0.3978, 0.34]}, {"w": "certain", "b": [0.4051, 0.3251, 0.4616, 0.34]}, {"w": "rules", "b": [0.4689, 0.3251, 0.5078, 0.34]}, {"w": "are", "b": [0.515, 0.3251, 0.5402, 0.34]}, {"w": "followed.", "b": [0.5475, 0.3251, 0.6191, 0.34]}, {"w": "One", "b": [0.6307, 0.3251, 0.6642, 0.34]}, {"w": "rule", "b": [0.6714, 0.3251, 0.7029, 0.34]}, {"w": "is", "b": [0.7102, 0.3251, 0.7228, 0.34]}, {"w": "that", "b": [0.7301, 0.3251, 0.7646, 0.34]}, {"w": "a", "b": [0.7719, 0.3251, 0.7813, 0.34]}, {"w": "feature", "b": [0.7886, 0.3251, 0.8456, 0.34]}, {"w": "at", "b": [0.8529, 0.3251, 0.8696, 0.34]}, {"w": "position", "b": [0.1312, 0.343, 0.1942, 0.358]}, {"w": "j", "b": [0.1998, 0.3433, 0.2074, 0.3583]}, {"w": "in", "b": [0.2141, 0.343, 0.2292, 0.358]}, {"w": "a", "b": [0.2349, 0.343, 0.2439, 0.358]}, {"w": "feature", "b": [0.2496, 0.343, 0.3044, 0.358]}, {"w": "vector", "b": [0.3101, 0.343, 0.3584, 0.358]}, {"w": "must", "b": [0.364, 0.343, 0.4028, 0.358]}, {"w": "represent", "b": [0.4085, 0.343, 0.4805, 0.358]}, {"w": "the", "b": [0.4862, 0.343, 0.5114, 0.358]}, {"w": "same", "b": [0.517, 0.343, 0.5563, 0.358]}, {"w": "property", "b": [0.562, 0.343, 0.6299, 0.358]}, {"w": "in", "b": [0.6356, 0.343, 0.6507, 0.358]}, {"w": "all", "b": [0.6563, 0.343, 0.6754, 0.358]}, {"w": "examples", "b": [0.6811, 0.343, 0.7531, 0.358]}, {"w": "in", "b": [0.7587, 0.343, 0.7738, 0.358]}, {"w": "the", "b": [0.7795, 0.343, 0.8046, 0.358]}, {"w": "dataset.", "b": [0.8103, 0.343, 0.8727, 0.358]}, {"w": "If", "b": [0.1312, 0.361, 0.1438, 0.3759]}, {"w": "that", "b": [0.1516, 0.361, 0.1861, 0.3759]}, {"w": "feature", "b": [0.1939, 0.361, 0.251, 0.3759]}, {"w": "represents", "b": [0.2588, 0.361, 0.3412, 0.3759]}, {"w": "the", "b": [0.349, 0.361, 0.3752, 0.3759]}, {"w": "height", "b": [0.383, 0.361, 0.4337, 0.3759]}, {"w": "in", "b": [0.4415, 0.361, 0.4572, 0.3759]}, {"w": "cm", "b": [0.465, 0.361, 0.4891, 0.3759]}, {"w": "of", "b": [0.4969, 0.361, 0.512, 0.3759]}, {"w": "a", "b": [0.5198, 0.361, 0.5292, 0.3759]}, {"w": "certain", "b": [0.537, 0.361, 0.5936, 0.3759]}, {"w": "person", "b": [0.6014, 0.361, 0.6554, 0.3759]}, {"w": "in", "b": [0.6632, 0.361, 0.6789, 0.3759]}, {"w": "a", "b": [0.6867, 0.361, 0.6961, 0.3759]}, {"w": "dataset,", "b": [0.7039, 0.361, 0.7689, 0.3759]}, {"w": "where", "b": [0.7771, 0.361, 0.8253, 0.3759]}, {"w": "each", "b": [0.833, 0.361, 0.8692, 0.3759]}, {"w": "example", "b": [0.1312, 0.3789, 0.1978, 0.3939]}, {"w": "represents", "b": [0.204, 0.3789, 0.2854, 0.3939]}, {"w": "a", "b": [0.2915, 0.3789, 0.3008, 0.3939]}, {"w": "different", "b": [0.3069, 0.3789, 0.3741, 0.3939]}, {"w": "person,", "b": [0.3803, 0.3789, 0.4388, 0.3939]}, {"w": "then", "b": [0.4449, 0.3789, 0.4811, 0.3939]}, {"w": "that", "b": [0.4872, 0.3789, 0.5213, 0.3939]}, {"w": "must", "b": [0.5274, 0.3789, 0.5673, 0.3939]}, {"w": "hold", "b": [0.5734, 0.3789, 0.6085, 0.3939]}, {"w": "true", "b": [0.6147, 0.3789, 0.6478, 0.3939]}, {"w": "in", "b": [0.6539, 0.3789, 0.6694, 0.3939]}, {"w": "all", "b": [0.6755, 0.3789, 0.6952, 0.3939]}, {"w": "other", "b": [0.7013, 0.3789, 0.7437, 0.3939]}, {"w": "examples.", "b": [0.7498, 0.3789, 0.8289, 0.3939]}, {"w": "The", "b": [0.8371, 0.3789, 0.8691, 0.3939]}, {"w": "feature", "b": [0.1312, 0.3969, 0.1872, 0.4118]}, {"w": "at", "b": [0.1933, 0.3969, 0.2097, 0.4118]}, {"w": "position", "b": [0.2159, 0.3969, 0.2801, 0.4118]}, {"w": "j", "b": [0.2862, 0.3971, 0.2938, 0.4121]}, {"w": "must", "b": [0.301, 0.3969, 0.3405, 0.4118]}, {"w": "always", "b": [0.3467, 0.3969, 0.3996, 0.4118]}, {"w": "represent", "b": [0.4057, 0.3969, 0.4793, 0.4118]}, {"w": "the", "b": [0.4854, 0.3969, 0.5111, 0.4118]}, {"w": "height", "b": [0.5172, 0.3969, 0.567, 0.4118]}, {"w": "in", "b": [0.5731, 0.3969, 0.5885, 0.4118]}, {"w": "cm,", "b": [0.5947, 0.3969, 0.6234, 0.4118]}, {"w": "and", "b": [0.6295, 0.3969, 0.6592, 0.4118]}, {"w": "nothing", "b": [0.6654, 0.3969, 0.7269, 0.4118]}, {"w": "else.", "b": [0.7331, 0.3969, 0.767, 0.4118]}]}, {"id": "b_4", "type": "paragraph", "text": "The bag-of-words technique works the same way. Each feature represents the same property of a document: whether a specific token is present or absent in a document.", "words": [{"w": "The", "b": [0.1306, 0.4238, 0.162, 0.4387]}, {"w": "bag-of-words", "b": [0.1682, 0.4238, 0.2699, 0.4387]}, {"w": "technique", "b": [0.276, 0.4238, 0.3522, 0.4387]}, {"w": "works", "b": [0.3583, 0.4238, 0.4042, 0.4387]}, {"w": "the", "b": [0.4103, 0.4238, 0.4357, 0.4387]}, {"w": "same", "b": [0.4419, 0.4238, 0.4816, 0.4387]}, {"w": "way.", "b": [0.4878, 0.4238, 0.5222, 0.4387]}, {"w": "Each", "b": [0.5305, 0.4238, 0.5698, 0.4387]}, {"w": "feature", "b": [0.576, 0.4238, 0.6314, 0.4387]}, {"w": "represents", "b": [0.6376, 0.4238, 0.7176, 0.4387]}, {"w": "the", "b": [0.7238, 0.4238, 0.7491, 0.4387]}, {"w": "same", "b": [0.7553, 0.4238, 0.795, 0.4387]}, {"w": "property", "b": [0.8012, 0.4238, 0.8698, 0.4387]}, {"w": "of", "b": [0.1312, 0.4417, 0.1461, 0.4567]}, {"w": "a", "b": [0.1522, 0.4417, 0.1615, 0.4567]}, {"w": "document:", "b": [0.1676, 0.4417, 0.2517, 0.4567]}, {"w": "whether", "b": [0.2599, 0.4417, 0.3246, 0.4567]}, {"w": "a", "b": [0.3307, 0.4417, 0.3399, 0.4567]}, {"w": "specific", "b": [0.3461, 0.4417, 0.4042, 0.4567]}, {"w": "token", "b": [0.4103, 0.4417, 0.4544, 0.4567]}, {"w": "is", "b": [0.4606, 0.4417, 0.473, 0.4567]}, {"w": "present", "b": [0.4791, 0.4417, 0.5372, 0.4567]}, {"w": "or", "b": [0.5434, 0.4417, 0.5598, 0.4567]}, {"w": "absent", "b": [0.566, 0.4417, 0.6179, 0.4567]}, {"w": "in", "b": [0.624, 0.4417, 0.6394, 0.4567]}, {"w": "a", "b": [0.6456, 0.4417, 0.6548, 0.4567]}, {"w": "document.", "b": [0.6609, 0.4417, 0.745, 0.4567]}]}, {"id": "b_5", "type": "paragraph", "text": "Another rule is that similar feature vectors must represent similar entities in the dataset. This property is also respected when using the bag-of-words technique. Two identical documents will have identical feature vectors. Likewise, two texts regarding the same topic will have higher chances to have similar feature vectors, because they will share more words than those of two different topics.", "words": [{"w": "Another", "b": [0.1305, 0.4686, 0.1954, 0.4836]}, {"w": "rule", "b": [0.2006, 0.4686, 0.2308, 0.4836]}, {"w": "is", "b": [0.236, 0.4686, 0.2482, 0.4836]}, {"w": "that", "b": [0.2534, 0.4686, 0.2865, 0.4836]}, {"w": "similar", "b": [0.2918, 0.4686, 0.3452, 0.4836]}, {"w": "feature", "b": [0.3504, 0.4686, 0.4052, 0.4836]}, {"w": "vectors", "b": [0.4104, 0.4686, 0.4658, 0.4836]}, {"w": "must", "b": [0.471, 0.4686, 0.5098, 0.4836]}, {"w": "represent", "b": [0.515, 0.4686, 0.5871, 0.4836]}, {"w": "similar", "b": [0.5923, 0.4686, 0.6457, 0.4836]}, {"w": "entities", "b": [0.6509, 0.4686, 0.7078, 0.4836]}, {"w": "in", "b": [0.713, 0.4686, 0.7281, 0.4836]}, {"w": "the", "b": [0.7333, 0.4686, 0.7584, 0.4836]}, {"w": "dataset.", "b": [0.7636, 0.4686, 0.826, 0.4836]}, {"w": "This", "b": [0.8339, 0.4686, 0.8692, 0.4836]}, {"w": "property", "b": [0.1312, 0.4866, 0.2003, 0.5016]}, {"w": "is", "b": [0.2064, 0.4866, 0.2188, 0.5016]}, {"w": "also", "b": [0.2249, 0.4866, 0.2557, 0.5016]}, {"w": "respected", "b": [0.2618, 0.4866, 0.3371, 0.5016]}, {"w": "when", "b": [0.3432, 0.4866, 0.3851, 0.5016]}, {"w": "using", "b": [0.3912, 0.4866, 0.4332, 0.5016]}, {"w": "the", "b": [0.4394, 0.4866, 0.4649, 0.5016]}, {"w": "bag-of-words", "b": [0.471, 0.4866, 0.5733, 0.5016]}, {"w": "technique.", "b": [0.5794, 0.4866, 0.6612, 0.5016]}, {"w": "Two", "b": [0.6694, 0.4866, 0.703, 0.5016]}, {"w": "identical", "b": [0.7092, 0.4866, 0.7771, 0.5016]}, {"w": "documents", "b": [0.7832, 0.4866, 0.8691, 0.5016]}, {"w": "will", "b": [0.1306, 0.5045, 0.1598, 0.5195]}, {"w": "have", "b": [0.1663, 0.5045, 0.2035, 0.5195]}, {"w": "identical", "b": [0.2099, 0.5045, 0.2795, 0.5195]}, {"w": "feature", "b": [0.2859, 0.5045, 0.343, 0.5195]}, {"w": "vectors.", "b": [0.3494, 0.5045, 0.4124, 0.5195]}, {"w": "Likewise,", "b": [0.4214, 0.5045, 0.4961, 0.5195]}, {"w": "two", "b": [0.5026, 0.5045, 0.5319, 0.5195]}, {"w": "texts", "b": [0.5383, 0.5045, 0.5787, 0.5195]}, {"w": "regarding", "b": [0.5851, 0.5045, 0.6626, 0.5195]}, {"w": "the", "b": [0.6691, 0.5045, 0.6952, 0.5195]}, {"w": "same", "b": [0.7017, 0.5045, 0.7426, 0.5195]}, {"w": "topic", "b": [0.749, 0.5045, 0.7898, 0.5195]}, {"w": "will", "b": [0.7962, 0.5045, 0.8255, 0.5195]}, {"w": "have", "b": [0.832, 0.5045, 0.8691, 0.5195]}, {"w": "higher", "b": [0.1312, 0.5225, 0.1805, 0.5374]}, {"w": "chances", "b": [0.1863, 0.5225, 0.2462, 0.5374]}, {"w": "to", "b": [0.2519, 0.5225, 0.268, 0.5374]}, {"w": "have", "b": [0.2738, 0.5225, 0.3094, 0.5374]}, {"w": "similar", "b": [0.3152, 0.5225, 0.3686, 0.5374]}, {"w": "feature", "b": [0.3743, 0.5225, 0.4292, 0.5374]}, {"w": "vectors,", "b": [0.4349, 0.5225, 0.4954, 0.5374]}, {"w": "because", "b": [0.5012, 0.5225, 0.5621, 0.5374]}, {"w": "they", "b": [0.5679, 0.5225, 0.6026, 0.5374]}, {"w": "will", "b": [0.6083, 0.5225, 0.6365, 0.5374]}, {"w": "share", "b": [0.6422, 0.5225, 0.6836, 0.5374]}, {"w": "more", "b": [0.6893, 0.5225, 0.7286, 0.5374]}, {"w": "words", "b": [0.7343, 0.5225, 0.7802, 0.5374]}, {"w": "than", "b": [0.7859, 0.5225, 0.8221, 0.5374]}, {"w": "those", "b": [0.8278, 0.5225, 0.8692, 0.5374]}, {"w": "of", "b": [0.1312, 0.5404, 0.1461, 0.5554]}, {"w": "two", "b": [0.1522, 0.5404, 0.181, 0.5554]}, {"w": "different", "b": [0.1871, 0.5404, 0.2538, 0.5554]}, {"w": "topics.", "b": [0.26, 0.5404, 0.3124, 0.5554]}]}, {"id": "b_6", "type": "paragraph", "text": "4.2.3 Converting Categorical Features to Numbers", "words": [{"w": "4.2.3", "b": [0.1312, 0.5886, 0.1749, 0.6035]}, {"w": "Converting", "b": [0.1961, 0.5886, 0.2988, 0.6035]}, {"w": "Categorical", "b": [0.3059, 0.5886, 0.411, 0.6035]}, {"w": "Features", "b": [0.4181, 0.5886, 0.4966, 0.6035]}, {"w": "to", "b": [0.5037, 0.5886, 0.5225, 0.6035]}, {"w": "Numbers", "b": [0.5296, 0.5886, 0.6143, 0.6035]}]}, {"id": "b_7", "type": "paragraph", "text": "One-hot encoding is not the only way to convert categorical features to numbers, and it’s not always the best way.", "words": [{"w": "One-hot", "b": [0.1312, 0.6249, 0.1955, 0.6398]}, {"w": "encoding", "b": [0.2014, 0.6249, 0.2713, 0.6398]}, {"w": "is", "b": [0.2772, 0.6249, 0.2894, 0.6398]}, {"w": "not", "b": [0.2953, 0.6249, 0.3214, 0.6398]}, {"w": "the", "b": [0.3273, 0.6249, 0.3524, 0.6398]}, {"w": "only", "b": [0.3583, 0.6249, 0.392, 0.6398]}, {"w": "way", "b": [0.3979, 0.6249, 0.4285, 0.6398]}, {"w": "to", "b": [0.4344, 0.6249, 0.4505, 0.6398]}, {"w": "convert", "b": [0.4564, 0.6249, 0.5142, 0.6398]}, {"w": "categorical", "b": [0.5201, 0.6249, 0.6046, 0.6398]}, {"w": "features", "b": [0.6105, 0.6249, 0.6725, 0.6398]}, {"w": "to", "b": [0.6784, 0.6249, 0.6945, 0.6398]}, {"w": "numbers,", "b": [0.7003, 0.6249, 0.7723, 0.6398]}, {"w": "and", "b": [0.7783, 0.6249, 0.8075, 0.6398]}, {"w": "it’s", "b": [0.8133, 0.6249, 0.8376, 0.6398]}, {"w": "not", "b": [0.8435, 0.6249, 0.8696, 0.6398]}, {"w": "always", "b": [0.1312, 0.6428, 0.1841, 0.6578]}, {"w": "the", "b": [0.1903, 0.6428, 0.2159, 0.6578]}, {"w": "best", "b": [0.2221, 0.6428, 0.2555, 0.6578]}, {"w": "way.", "b": [0.2617, 0.6428, 0.2965, 0.6578]}]}, {"id": "b_8", "type": "paragraph", "text": "Mean encoding, also known as bin counting or feature calibration, is another technique. First, the sample mean of the label is calculated using all examples where the feature has value z. Each value z of the categorical feature is then replaced by that sample mean value. The advantage of this technique is that the data dimensionality doesn’t increase, and by design, the numerical value contains some information about the label.", "words": [{"w": "Mean", "b": [0.1312, 0.67, 0.1832, 0.685]}, {"w": "encoding,", "b": [0.1884, 0.6697, 0.2758, 0.685]}, {"w": "also", "b": [0.2807, 0.6697, 0.3109, 0.6847]}, {"w": "known", "b": [0.3154, 0.6697, 0.3667, 0.6847]}, {"w": "as", "b": [0.3712, 0.6697, 0.3874, 0.6847]}, {"w": "bin", "b": [0.3918, 0.67, 0.4213, 0.685]}, {"w": "counting", "b": [0.4265, 0.67, 0.5061, 0.685]}, {"w": "or", "b": [0.5108, 0.6697, 0.5269, 0.6847]}, {"w": "feature", "b": [0.5314, 0.67, 0.5964, 0.685]}, {"w": "calibration,", "b": [0.6016, 0.6697, 0.7057, 0.685]}, {"w": "is", "b": [0.7105, 0.6697, 0.7227, 0.6847]}, {"w": "another", "b": [0.7272, 0.6697, 0.7875, 0.6847]}, {"w": "technique.", "b": [0.792, 0.6697, 0.8725, 0.6847]}, {"w": "First,", "b": [0.1312, 0.6877, 0.1751, 0.7026]}, {"w": "the", "b": [0.1813, 0.6877, 0.2068, 0.7026]}, {"w": "sample", "b": [0.213, 0.688, 0.2767, 0.7029]}, {"w": "mean", "b": [0.2838, 0.688, 0.3333, 0.7029]}, {"w": "of", "b": [0.3396, 0.6877, 0.3544, 0.7026]}, {"w": "the", "b": [0.3605, 0.6877, 0.3861, 0.7026]}, {"w": "label", "b": [0.3923, 0.6877, 0.4306, 0.7026]}, {"w": "is", "b": [0.4368, 0.6877, 0.4492, 0.7026]}, {"w": "calculated", "b": [0.4553, 0.6877, 0.5361, 0.7026]}, {"w": "using", "b": [0.5423, 0.6877, 0.5843, 0.7026]}, {"w": "all", "b": [0.5905, 0.6877, 0.6099, 0.7026]}, {"w": "examples", "b": [0.6161, 0.6877, 0.6893, 0.7026]}, {"w": "where", "b": [0.6954, 0.6877, 0.7425, 0.7026]}, {"w": "the", "b": [0.7487, 0.6877, 0.7742, 0.7026]}, {"w": "feature", "b": [0.7804, 0.6877, 0.8362, 0.7026]}, {"w": "has", "b": [0.8424, 0.6877, 0.8691, 0.7026]}, {"w": "value", "b": [0.1308, 0.7056, 0.1722, 0.7206]}, {"w": "z.", "b": [0.1783, 0.7056, 0.1928, 0.7209]}, {"w": "Each", "b": [0.201, 0.7056, 0.2407, 0.7206]}, {"w": "value", "b": [0.2468, 0.7056, 0.2883, 0.7206]}, {"w": "z", "b": [0.2944, 0.7059, 0.3029, 0.7209]}, {"w": "of", "b": [0.3099, 0.7056, 0.3247, 0.7206]}, {"w": "the", "b": [0.3309, 0.7056, 0.3565, 0.7206]}, {"w": "categorical", "b": [0.3626, 0.7056, 0.4486, 0.7206]}, {"w": "feature", "b": [0.4548, 0.7056, 0.5106, 0.7206]}, {"w": "is", "b": [0.5167, 0.7056, 0.5291, 0.7206]}, {"w": "then", "b": [0.5353, 0.7056, 0.5711, 0.7206]}, {"w": "replaced", "b": [0.5772, 0.7056, 0.6438, 0.7206]}, {"w": "by", "b": [0.65, 0.7056, 0.6694, 0.7206]}, {"w": "that", "b": [0.6755, 0.7056, 0.7093, 0.7206]}, {"w": "sample", "b": [0.7154, 0.7056, 0.7708, 0.7206]}, {"w": "mean", "b": [0.777, 0.7056, 0.8199, 0.7206]}, {"w": "value.", "b": [0.8261, 0.7056, 0.8726, 0.7206]}, {"w": "The", "b": [0.1306, 0.7236, 0.163, 0.7385]}, {"w": "advantage", "b": [0.17, 0.7236, 0.2526, 0.7385]}, {"w": "of", "b": [0.2596, 0.7236, 0.2748, 0.7385]}, {"w": "this", "b": [0.2818, 0.7236, 0.3122, 0.7385]}, {"w": "technique", "b": [0.3192, 0.7236, 0.3977, 0.7385]}, {"w": "is", "b": [0.4047, 0.7236, 0.4174, 0.7385]}, {"w": "that", "b": [0.4244, 0.7236, 0.4589, 0.7385]}, {"w": "the", "b": [0.4659, 0.7236, 0.492, 0.7385]}, {"w": "data", "b": [0.499, 0.7236, 0.5356, 0.7385]}, {"w": "dimensionality", "b": [0.5426, 0.7236, 0.662, 0.7385]}, {"w": "doesn’t", "b": [0.6689, 0.7236, 0.7281, 0.7385]}, {"w": "increase,", "b": [0.7351, 0.7236, 0.8054, 0.7385]}, {"w": "and", "b": [0.8126, 0.7236, 0.8429, 0.7385]}, {"w": "by", "b": [0.8499, 0.7236, 0.8698, 0.7385]}, {"w": "design,", "b": [0.1312, 0.7415, 0.1867, 0.7565]}, {"w": "the", "b": [0.1929, 0.7415, 0.2185, 0.7565]}, {"w": "numerical", "b": [0.2247, 0.7415, 0.3032, 0.7565]}, {"w": "value", "b": [0.3093, 0.7415, 0.3509, 0.7565]}, {"w": "contains", "b": [0.357, 0.7415, 0.4232, 0.7565]}, {"w": "some", "b": [0.4294, 0.7415, 0.4695, 0.7565]}, {"w": "information", "b": [0.4756, 0.7415, 0.5695, 0.7565]}, {"w": "about", "b": [0.5757, 0.7415, 0.6223, 0.7565]}, {"w": "the", "b": [0.6285, 0.7415, 0.6541, 0.7565]}, {"w": "label.", "b": [0.6602, 0.7415, 0.7038, 0.7565]}]}, {"id": "b_9", "type": "paragraph", "text": "If you work on a binary classification problem, in addition to sample mean, you can use other useful quantities: the raw counts of the positive class for a given value of z, the odds ratio, and the log-odds ratio. The odds ratio (OR) is usually defined between two random variables. In a general sense, OR is a statistic that quantifies the strength of the association between two events A and B. Two events are considered independent if the OR equals 1, that is, the odds of one event are the same in either the presence or absence of the other event.", "words": [{"w": "If", "b": [0.1312, 0.7684, 0.1438, 0.7834]}, {"w": "you", "b": [0.151, 0.7684, 0.1803, 0.7834]}, {"w": "work", "b": [0.1874, 0.7684, 0.2272, 0.7834]}, {"w": "on", "b": [0.2344, 0.7684, 0.2543, 0.7834]}, {"w": "a", "b": [0.2614, 0.7684, 0.2708, 0.7834]}, {"w": "binary", "b": [0.278, 0.7684, 0.3309, 0.7834]}, {"w": "classification", "b": [0.3381, 0.7684, 0.4418, 0.7834]}, {"w": "problem,", "b": [0.449, 0.7684, 0.5212, 0.7834]}, {"w": "in", "b": [0.5287, 0.7684, 0.5444, 0.7834]}, {"w": "addition", "b": [0.5515, 0.7684, 0.6195, 0.7834]}, {"w": "to", "b": [0.6267, 0.7684, 0.6434, 0.7834]}, {"w": "sample", "b": [0.6506, 0.7684, 0.7072, 0.7834]}, {"w": "mean,", "b": [0.7143, 0.7684, 0.7635, 0.7834]}, {"w": "you", "b": [0.7709, 0.7684, 0.8002, 0.7834]}, {"w": "can", "b": [0.8074, 0.7684, 0.8356, 0.7834]}, {"w": "use", "b": [0.8428, 0.7684, 0.8691, 0.7834]}, {"w": "other", "b": [0.1312, 0.7864, 0.1732, 0.8013]}, {"w": "useful", "b": [0.1794, 0.7864, 0.226, 0.8013]}, {"w": "quantities:", "b": [0.2322, 0.7864, 0.3161, 0.8013]}, {"w": "the", "b": [0.3244, 0.7864, 0.3499, 0.8013]}, {"w": "raw", "b": [0.3561, 0.7864, 0.3853, 0.8013]}, {"w": "counts", "b": [0.3914, 0.7864, 0.4432, 0.8013]}, {"w": "of", "b": [0.4493, 0.7864, 0.4642, 0.8013]}, {"w": "the", "b": [0.4703, 0.7864, 0.4959, 0.8013]}, {"w": "positive", "b": [0.5021, 0.7864, 0.564, 0.8013]}, {"w": "class", "b": [0.5702, 0.7864, 0.6072, 0.8013]}, {"w": "for", "b": [0.6134, 0.7864, 0.6354, 0.8013]}, {"w": "a", "b": [0.6416, 0.7864, 0.6508, 0.8013]}, {"w": "given", "b": [0.6569, 0.7864, 0.6989, 0.8013]}, {"w": "value", "b": [0.705, 0.7864, 0.7464, 0.8013]}, {"w": "of", "b": [0.7526, 0.7864, 0.7674, 0.8013]}, {"w": "z,", "b": [0.7732, 0.7864, 0.7877, 0.8016]}, {"w": "the", "b": [0.7939, 0.7864, 0.8195, 0.8013]}, {"w": "odds", "b": [0.8256, 0.7867, 0.8688, 0.8016]}, {"w": "ratio,", "b": [0.1312, 0.8043, 0.1801, 0.8196]}, {"w": "and", "b": [0.186, 0.8043, 0.2151, 0.8193]}, {"w": "the", "b": [0.221, 0.8043, 0.2461, 0.8193]}, {"w": "log-odds", "b": [0.252, 0.8046, 0.3293, 0.8196]}, {"w": "ratio.", "b": [0.336, 0.8043, 0.3849, 0.8196]}, {"w": "The", "b": [0.393, 0.8043, 0.4241, 0.8193]}, {"w": "odds", "b": [0.43, 0.8043, 0.4668, 0.8193]}, {"w": "ratio", "b": [0.4726, 0.8043, 0.5099, 0.8193]}, {"w": "(OR)", "b": [0.5157, 0.8043, 0.5572, 0.8193]}, {"w": "is", "b": [0.563, 0.8043, 0.5752, 0.8193]}, {"w": "usually", "b": [0.5811, 0.8043, 0.6369, 0.8193]}, {"w": "defined", "b": [0.6428, 0.8043, 0.6991, 0.8193]}, {"w": "between", "b": [0.705, 0.8043, 0.7688, 0.8193]}, {"w": "two", "b": [0.7747, 0.8043, 0.8028, 0.8193]}, {"w": "random", "b": [0.8086, 0.8043, 0.869, 0.8193]}, {"w": "variables.", "b": [0.1308, 0.8223, 0.2055, 0.8372]}, {"w": "In", "b": [0.2137, 0.8223, 0.2305, 0.8372]}, {"w": "a", "b": [0.2366, 0.8223, 0.2457, 0.8372]}, {"w": "general", "b": [0.2519, 0.8223, 0.3088, 0.8372]}, {"w": "sense,", "b": [0.315, 0.8223, 0.3609, 0.8372]}, {"w": "OR", "b": [0.367, 0.8223, 0.3947, 0.8372]}, {"w": "is", "b": [0.4008, 0.8223, 0.4131, 0.8372]}, {"w": "a", "b": [0.4193, 0.8223, 0.4284, 0.8372]}, {"w": "statistic", "b": [0.4346, 0.8223, 0.4977, 0.8372]}, {"w": "that", "b": [0.5038, 0.8223, 0.5373, 0.8372]}, {"w": "quantifies", "b": [0.5435, 0.8223, 0.6197, 0.8372]}, {"w": "the", "b": [0.6259, 0.8223, 0.6513, 0.8372]}, {"w": "strength", "b": [0.6574, 0.8223, 0.7236, 0.8372]}, {"w": "of", "b": [0.7297, 0.8223, 0.7445, 0.8372]}, {"w": "the", "b": [0.7506, 0.8223, 0.776, 0.8372]}, {"w": "association", "b": [0.7821, 0.8223, 0.8691, 0.8372]}, {"w": "between", "b": [0.1312, 0.8402, 0.195, 0.8552]}, {"w": "two", "b": [0.2005, 0.8402, 0.2286, 0.8552]}, {"w": "events", "b": [0.2341, 0.8402, 0.283, 0.8552]}, {"w": "A", "b": [0.2884, 0.8405, 0.3022, 0.8555]}, {"w": "and", "b": [0.3077, 0.8402, 0.3368, 0.8552]}, {"w": "B.", "b": [0.3423, 0.8402, 0.3622, 0.8555]}, {"w": "Two", "b": [0.3702, 0.8402, 0.4033, 0.8552]}, {"w": "events", "b": [0.4088, 0.8402, 0.4576, 0.8552]}, {"w": "are", "b": [0.4631, 0.8402, 0.4873, 0.8552]}, {"w": "considered", "b": [0.4928, 0.8402, 0.5754, 0.8552]}, {"w": "independent", "b": [0.5809, 0.8402, 0.6774, 0.8552]}, {"w": "if", "b": [0.6828, 0.8402, 0.6934, 0.8552]}, {"w": "the", "b": [0.6989, 0.8402, 0.724, 0.8552]}, {"w": "OR", "b": [0.7295, 0.8402, 0.7569, 0.8552]}, {"w": "equals", "b": [0.7624, 0.8402, 0.8112, 0.8552]}, {"w": "1,", "b": [0.8164, 0.8402, 0.8305, 0.8552]}, {"w": "that", "b": [0.8361, 0.8402, 0.8693, 0.8552]}, {"w": "is,", "b": [0.1312, 0.8582, 0.1488, 0.8731]}, {"w": "the", "b": [0.1549, 0.8582, 0.1806, 0.8731]}, {"w": "odds", "b": [0.1867, 0.8582, 0.2243, 0.8731]}, {"w": "of", "b": [0.2304, 0.8582, 0.2453, 0.8731]}, {"w": "one", "b": [0.2514, 0.8582, 0.2791, 0.8731]}, {"w": "event", "b": [0.2853, 0.8582, 0.3278, 0.8731]}, {"w": "are", "b": [0.334, 0.8582, 0.3587, 0.8731]}, {"w": "the", "b": [0.3648, 0.8582, 0.3904, 0.8731]}, {"w": "same", "b": [0.3966, 0.8582, 0.4367, 0.8731]}, {"w": "in", "b": [0.4428, 0.8582, 0.4582, 0.8731]}, {"w": "either", "b": [0.4644, 0.8582, 0.5106, 0.8731]}, {"w": "the", "b": [0.5167, 0.8582, 0.5424, 0.8731]}, {"w": "presence", "b": [0.5485, 0.8582, 0.6164, 0.8731]}, {"w": "or", "b": [0.6225, 0.8582, 0.639, 0.8731]}, {"w": "absence", "b": [0.6451, 0.8582, 0.7068, 0.8731]}, {"w": "of", "b": [0.7129, 0.8582, 0.7278, 0.8731]}, {"w": "the", "b": [0.734, 0.8582, 0.7596, 0.8731]}, {"w": "other", "b": [0.7658, 0.8582, 0.8079, 0.8731]}, {"w": "event.", "b": [0.814, 0.8582, 0.8617, 0.8731]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "8", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 98, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "In application to quantifying a categorical feature, we can calculate the odds ratio between the value z of a categorical feature (event A) and the positive label (event B). Let’s illustrate that with an example. Let our problem be to predict whether an email message is spam or not spam. Let’s assume that we have a labeled dataset of email messages, and we engineered a feature that contains the most frequent word in each email message. Let us find the numerical value that would replace the categorical value “infected” of this feature. We first build the contingency table for “infected” and “spam”:", "words": [{"w": "In", "b": [0.1312, 0.0881, 0.1482, 0.1031]}, {"w": "application", "b": [0.1543, 0.0881, 0.2438, 0.1031]}, {"w": "to", "b": [0.25, 0.0881, 0.2664, 0.1031]}, {"w": "quantifying", "b": [0.2726, 0.0881, 0.3641, 0.1031]}, {"w": "a", "b": [0.3702, 0.0881, 0.3795, 0.1031]}, {"w": "categorical", "b": [0.3856, 0.0881, 0.4721, 0.1031]}, {"w": "feature,", "b": [0.4782, 0.0881, 0.5395, 0.1031]}, {"w": "we", "b": [0.5456, 0.0881, 0.5667, 0.1031]}, {"w": "can", "b": [0.5729, 0.0881, 0.6006, 0.1031]}, {"w": "calculate", "b": [0.6068, 0.0881, 0.6777, 0.1031]}, {"w": "the", "b": [0.6839, 0.0881, 0.7096, 0.1031]}, {"w": "odds", "b": [0.7158, 0.0881, 0.7534, 0.1031]}, {"w": "ratio", "b": [0.7595, 0.0881, 0.7976, 0.1031]}, {"w": "between", "b": [0.8038, 0.0881, 0.8691, 0.1031]}, {"w": "the", "b": [0.1312, 0.106, 0.1564, 0.121]}, {"w": "value", "b": [0.162, 0.106, 0.2027, 0.121]}, {"w": "z", "b": [0.2083, 0.1063, 0.2169, 0.1213]}, {"w": "of", "b": [0.2233, 0.106, 0.2379, 0.121]}, {"w": "a", "b": [0.2435, 0.106, 0.2526, 0.121]}, {"w": "categorical", "b": [0.2582, 0.106, 0.3426, 0.121]}, {"w": "feature", "b": [0.3483, 0.106, 0.4031, 0.121]}, {"w": "(event", "b": [0.4087, 0.106, 0.4575, 0.121]}, {"w": "A)", "b": [0.463, 0.106, 0.4839, 0.1213]}, {"w": "and", "b": [0.4895, 0.106, 0.5186, 0.121]}, {"w": "the", "b": [0.5243, 0.106, 0.5494, 0.121]}, {"w": "positive", "b": [0.555, 0.106, 0.6159, 0.121]}, {"w": "label", "b": [0.6216, 0.106, 0.6593, 0.121]}, {"w": "(event", "b": [0.6649, 0.106, 0.7136, 0.121]}, {"w": "B).", "b": [0.7191, 0.106, 0.7461, 0.1213]}, {"w": "Let’s", "b": [0.7542, 0.106, 0.7927, 0.121]}, {"w": "illustrate", "b": [0.7983, 0.106, 0.8688, 0.121]}, {"w": "that", "b": [0.1312, 0.124, 0.1644, 0.1389]}, {"w": "with", "b": [0.1695, 0.124, 0.2047, 0.1389]}, {"w": "an", "b": [0.2098, 0.124, 0.2289, 0.1389]}, {"w": "example.", "b": [0.2341, 0.124, 0.3039, 0.1389]}, {"w": "Let", "b": [0.3118, 0.124, 0.3382, 0.1389]}, {"w": "our", "b": [0.3433, 0.124, 0.3695, 0.1389]}, {"w": "problem", "b": [0.3746, 0.124, 0.439, 0.1389]}, {"w": "be", "b": [0.4442, 0.124, 0.4628, 0.1389]}, {"w": "to", "b": [0.4679, 0.124, 0.484, 0.1389]}, {"w": "predict", "b": [0.4892, 0.124, 0.5445, 0.1389]}, {"w": "whether", "b": [0.5496, 0.124, 0.613, 0.1389]}, {"w": "an", "b": [0.6182, 0.124, 0.6372, 0.1389]}, {"w": "email", "b": [0.6424, 0.124, 0.6846, 0.1389]}, {"w": "message", "b": [0.6897, 0.124, 0.7533, 0.1389]}, {"w": "is", "b": [0.7584, 0.124, 0.7706, 0.1389]}, {"w": "spam", "b": [0.7757, 0.124, 0.817, 0.1389]}, {"w": "or", "b": [0.8222, 0.124, 0.8383, 0.1389]}, {"w": "not", "b": [0.8434, 0.124, 0.8696, 0.1389]}, {"w": "spam.", "b": [0.1312, 0.1419, 0.1787, 0.1569]}, {"w": "Let’s", "b": [0.1869, 0.1419, 0.2265, 0.1569]}, {"w": "assume", "b": [0.2326, 0.1419, 0.2905, 0.1569]}, {"w": "that", "b": [0.2967, 0.1419, 0.3307, 0.1569]}, {"w": "we", "b": [0.3368, 0.1419, 0.3579, 0.1569]}, {"w": "have", "b": [0.3641, 0.1419, 0.4007, 0.1569]}, {"w": "a", "b": [0.4068, 0.1419, 0.4161, 0.1569]}, {"w": "labeled", "b": [0.4222, 0.1419, 0.4794, 0.1569]}, {"w": "dataset", "b": [0.4855, 0.1419, 0.5444, 0.1569]}, {"w": "of", "b": [0.5505, 0.1419, 0.5655, 0.1569]}, {"w": "email", "b": [0.5716, 0.1419, 0.6149, 0.1569]}, {"w": "messages,", "b": [0.621, 0.1419, 0.6986, 0.1569]}, {"w": "and", "b": [0.7048, 0.1419, 0.7347, 0.1569]}, {"w": "we", "b": [0.7408, 0.1419, 0.7619, 0.1569]}, {"w": "engineered", "b": [0.7681, 0.1419, 0.8537, 0.1569]}, {"w": "a", "b": [0.8598, 0.1419, 0.8691, 0.1569]}, {"w": "feature", "b": [0.1312, 0.1599, 0.1861, 0.1748]}, {"w": "that", "b": [0.1913, 0.1599, 0.2245, 0.1748]}, {"w": "contains", "b": [0.2298, 0.1599, 0.2947, 0.1748]}, {"w": "the", "b": [0.3, 0.1599, 0.3251, 0.1748]}, {"w": "most", "b": [0.3304, 0.1599, 0.3686, 0.1748]}, {"w": "frequent", "b": [0.3739, 0.1599, 0.4388, 0.1748]}, {"w": "word", "b": [0.4441, 0.1599, 0.4828, 0.1748]}, {"w": "in", "b": [0.488, 0.1599, 0.5031, 0.1748]}, {"w": "each", "b": [0.5084, 0.1599, 0.5431, 0.1748]}, {"w": "email", "b": [0.5483, 0.1599, 0.5905, 0.1748]}, {"w": "message.", "b": [0.5958, 0.1599, 0.6643, 0.1748]}, {"w": "Let", "b": [0.6723, 0.1599, 0.6986, 0.1748]}, {"w": "us", "b": [0.7039, 0.1599, 0.7211, 0.1748]}, {"w": "find", "b": [0.7264, 0.1599, 0.7565, 0.1748]}, {"w": "the", "b": [0.7618, 0.1599, 0.7869, 0.1748]}, {"w": "numerical", "b": [0.7922, 0.1599, 0.8691, 0.1748]}, {"w": "value", "b": [0.1308, 0.1778, 0.1728, 0.1928]}, {"w": "that", "b": [0.1789, 0.1778, 0.2131, 0.1928]}, {"w": "would", "b": [0.2192, 0.1778, 0.2674, 0.1928]}, {"w": "replace", "b": [0.2736, 0.1778, 0.3306, 0.1928]}, {"w": "the", "b": [0.3368, 0.1778, 0.3627, 0.1928]}, {"w": "categorical", "b": [0.3688, 0.1778, 0.456, 0.1928]}, {"w": "value", "b": [0.4621, 0.1778, 0.5041, 0.1928]}, {"w": "“infected”", "b": [0.5102, 0.1778, 0.5916, 0.1928]}, {"w": "of", "b": [0.5977, 0.1778, 0.6128, 0.1928]}, {"w": "this", "b": [0.6189, 0.1778, 0.6491, 0.1928]}, {"w": "feature.", "b": [0.6552, 0.1778, 0.717, 0.1928]}, {"w": "We", "b": [0.7251, 0.1778, 0.7511, 0.1928]}, {"w": "first", "b": [0.7572, 0.1778, 0.7895, 0.1928]}, {"w": "build", "b": [0.7956, 0.1778, 0.8371, 0.1928]}, {"w": "the", "b": [0.8432, 0.1778, 0.8692, 0.1928]}, {"w": "contingency", "b": [0.1312, 0.1961, 0.2412, 0.211]}, {"w": "table", "b": [0.2482, 0.1961, 0.2942, 0.211]}, {"w": "for", "b": [0.3003, 0.1958, 0.3224, 0.2107]}, {"w": "“infected”", "b": [0.3286, 0.1958, 0.4091, 0.2107]}, {"w": "and", "b": [0.4152, 0.1958, 0.445, 0.2107]}, {"w": "“spam”:", "b": [0.4511, 0.1958, 0.5158, 0.2107]}]}, {"id": "b_1", "type": "paragraph", "text": "Spam", "words": [{"w": "Spam", "b": [0.437, 0.2425, 0.478, 0.2553]}]}, {"id": "b_2", "type": "paragraph", "text": "145 contains \"infected\" doesn't contain", "words": [{"w": "145", "b": [0.4444, 0.2744, 0.4706, 0.2871]}, {"w": "contains", "b": [0.3143, 0.267, 0.3728, 0.2797]}, {"w": "\"infected\"", "b": [0.3105, 0.2818, 0.3767, 0.2946]}, {"w": "doesn't", "b": [0.2909, 0.2988, 0.3411, 0.3115]}, {"w": "contain", "b": [0.3455, 0.2988, 0.3962, 0.3115]}]}, {"id": "b_3", "type": "paragraph", "text": "\"infected\"", "words": [{"w": "\"infected\"", "b": [0.3105, 0.3137, 0.3767, 0.3264]}]}, {"id": "b_4", "type": "paragraph", "text": "Not Spam", "words": [{"w": "Not", "b": [0.5273, 0.2425, 0.5518, 0.2553]}, {"w": "Spam", "b": [0.5562, 0.2425, 0.5972, 0.2553]}]}, {"id": "b_6", "type": "paragraph", "text": "346 2909", "words": [{"w": "346", "b": [0.4444, 0.3062, 0.4706, 0.319]}, {"w": "2909", "b": [0.5448, 0.3062, 0.5798, 0.319]}]}, {"id": "b_7", "type": "paragraph", "text": "Total", "words": [{"w": "Total", "b": [0.6505, 0.2425, 0.6836, 0.2553]}]}, {"id": "b_8", "type": "paragraph", "text": "153", "words": [{"w": "153", "b": [0.654, 0.2744, 0.6802, 0.2871]}]}, {"id": "b_9", "type": "paragraph", "text": "3255", "words": [{"w": "3255", "b": [0.6496, 0.3062, 0.6845, 0.319]}]}, {"id": "b_10", "type": "paragraph", "text": "Total 491 2917 3408", "words": [{"w": "Total", "b": [0.327, 0.3381, 0.3601, 0.3508]}, {"w": "491", "b": [0.4444, 0.3381, 0.4706, 0.3508]}, {"w": "2917", "b": [0.5448, 0.3381, 0.5798, 0.3508]}, {"w": "3408", "b": [0.6496, 0.3381, 0.6845, 0.3508]}]}, {"id": "b_11", "type": "paragraph", "text": "Figure 7: Contingency table for “infected” and “spam.”", "words": [{"w": "Figure", "b": [0.2768, 0.3771, 0.3289, 0.3921]}, {"w": "7:", "b": [0.3351, 0.3771, 0.3494, 0.3921]}, {"w": "Contingency", "b": [0.3577, 0.3771, 0.4581, 0.3921]}, {"w": "table", "b": [0.4643, 0.3771, 0.5043, 0.3921]}, {"w": "for", "b": [0.5104, 0.3771, 0.5325, 0.3921]}, {"w": "“infected”", "b": [0.5387, 0.3771, 0.6192, 0.3921]}, {"w": "and", "b": [0.6253, 0.3771, 0.6551, 0.3921]}, {"w": "“spam.”", "b": [0.6612, 0.3771, 0.7234, 0.3921]}]}, {"id": "b_12", "type": "equation", "text": "The odds-ratio of “infected” and “spam” is given by:", "words": [{"w": "The", "b": [0.1306, 0.4268, 0.1624, 0.4417]}, {"w": "odds-ratio", "b": [0.1685, 0.4268, 0.2502, 0.4417]}, {"w": "of", "b": [0.2563, 0.4268, 0.2712, 0.4417]}, {"w": "“infected”", "b": [0.2774, 0.4268, 0.3578, 0.4417]}, {"w": "and", "b": [0.364, 0.4268, 0.3937, 0.4417]}, {"w": "“spam”", "b": [0.3999, 0.4268, 0.4594, 0.4417]}, {"w": "is", "b": [0.4656, 0.4268, 0.478, 0.4417]}, {"w": "given", "b": [0.4841, 0.4268, 0.5262, 0.4417]}, {"w": "by:", "b": [0.5324, 0.4268, 0.557, 0.4417]}]}, {"id": "b_13", "type": "equation", "text": "odds ratio(infected, spam) = 145/8 346/2909 = 152.4.", "words": [{"w": "odds", "b": [0.308, 0.4765, 0.3456, 0.4915]}, {"w": "ratio(infected,", "b": [0.3517, 0.4765, 0.465, 0.4918]}, {"w": "spam)", "b": [0.4681, 0.4765, 0.5174, 0.4915]}, {"w": "=", "b": [0.5225, 0.4765, 0.5369, 0.4915]}, {"w": "145/8", "b": [0.558, 0.4664, 0.6042, 0.4817]}, {"w": "346/2909", "b": [0.5442, 0.4868, 0.618, 0.502]}, {"w": "=", "b": [0.6253, 0.4765, 0.6397, 0.4915]}, {"w": "152.4.", "b": [0.6448, 0.4765, 0.692, 0.4918]}]}, {"id": "b_14", "type": "paragraph", "text": "As you can see, the odds ratio, depending on the values in the contingency table, can be extremely low (near zero) or extremely high (an arbitrarily high positive value). To avoid numerical overflow issues, analysts often use the log-odds ratio:", "words": [{"w": "As", "b": [0.1305, 0.5194, 0.1521, 0.5344]}, {"w": "you", "b": [0.1589, 0.5194, 0.1882, 0.5344]}, {"w": "can", "b": [0.1949, 0.5194, 0.2232, 0.5344]}, {"w": "see,", "b": [0.23, 0.5194, 0.2594, 0.5344]}, {"w": "the", "b": [0.2663, 0.5194, 0.2924, 0.5344]}, {"w": "odds", "b": [0.2992, 0.5194, 0.3375, 0.5344]}, {"w": "ratio,", "b": [0.3443, 0.5194, 0.3882, 0.5344]}, {"w": "depending", "b": [0.3952, 0.5194, 0.4794, 0.5344]}, {"w": "on", "b": [0.4862, 0.5194, 0.5061, 0.5344]}, {"w": "the", "b": [0.5128, 0.5194, 0.539, 0.5344]}, {"w": "values", "b": [0.5458, 0.5194, 0.5956, 0.5344]}, {"w": "in", "b": [0.6024, 0.5194, 0.6181, 0.5344]}, {"w": "the", "b": [0.6248, 0.5194, 0.651, 0.5344]}, {"w": "contingency", "b": [0.6578, 0.5194, 0.7551, 0.5344]}, {"w": "table,", "b": [0.7618, 0.5194, 0.8079, 0.5344]}, {"w": "can", "b": [0.8148, 0.5194, 0.843, 0.5344]}, {"w": "be", "b": [0.8498, 0.5194, 0.8692, 0.5344]}, {"w": "extremely", "b": [0.1312, 0.5374, 0.2118, 0.5523]}, {"w": "low", "b": [0.218, 0.5374, 0.2457, 0.5523]}, {"w": "(near", "b": [0.2519, 0.5374, 0.2948, 0.5523]}, {"w": "zero)", "b": [0.301, 0.5374, 0.3419, 0.5523]}, {"w": "or", "b": [0.3481, 0.5374, 0.3648, 0.5523]}, {"w": "extremely", "b": [0.371, 0.5374, 0.4516, 0.5523]}, {"w": "high", "b": [0.4578, 0.5374, 0.4934, 0.5523]}, {"w": "(an", "b": [0.4995, 0.5374, 0.5267, 0.5523]}, {"w": "arbitrarily", "b": [0.5329, 0.5374, 0.6173, 0.5523]}, {"w": "high", "b": [0.6235, 0.5374, 0.659, 0.5523]}, {"w": "positive", "b": [0.6652, 0.5374, 0.7286, 0.5523]}, {"w": "value).", "b": [0.7348, 0.5374, 0.7897, 0.5523]}, {"w": "To", "b": [0.798, 0.5374, 0.8195, 0.5523]}, {"w": "avoid", "b": [0.8256, 0.5374, 0.8691, 0.5523]}, {"w": "numerical", "b": [0.1312, 0.5553, 0.2097, 0.5703]}, {"w": "overflow", "b": [0.2159, 0.5553, 0.2816, 0.5703]}, {"w": "issues,", "b": [0.2877, 0.5553, 0.3383, 0.5703]}, {"w": "analysts", "b": [0.3444, 0.5553, 0.4098, 0.5703]}, {"w": "often", "b": [0.4159, 0.5553, 0.4564, 0.5703]}, {"w": "use", "b": [0.4626, 0.5553, 0.4883, 0.5703]}, {"w": "the", "b": [0.4945, 0.5553, 0.5201, 0.5703]}, {"w": "log-odds", "b": [0.5263, 0.5553, 0.5935, 0.5703]}, {"w": "ratio:", "b": [0.5997, 0.5553, 0.6428, 0.5703]}]}, {"id": "b_15", "type": "equation", "text": "log odds ratio(infected, spam) = log(145/8) −log(346/2909)", "words": [{"w": "log", "b": [0.1806, 0.6098, 0.2042, 0.6248]}, {"w": "odds", "b": [0.2104, 0.6098, 0.2479, 0.6248]}, {"w": "ratio(infected,", "b": [0.254, 0.6098, 0.3673, 0.6251]}, {"w": "spam)", "b": [0.3704, 0.6098, 0.4197, 0.6248]}, {"w": "=", "b": [0.4248, 0.6098, 0.4392, 0.6248]}, {"w": "log(145/8)", "b": [0.4443, 0.6098, 0.5286, 0.6251]}, {"w": "−log(346/2909)", "b": [0.5327, 0.6098, 0.6631, 0.6251]}]}, {"id": "b_16", "type": "equation", "text": "= log(145) −log(8) −log(346) + log(2909) = 2.2.", "words": [{"w": "=", "b": [0.4248, 0.6323, 0.4392, 0.6472]}, {"w": "log(145)", "b": [0.4443, 0.6323, 0.5102, 0.6472]}, {"w": "−log(8)", "b": [0.5142, 0.6323, 0.5801, 0.6473]}, {"w": "−log(346)", "b": [0.5842, 0.6323, 0.6685, 0.6473]}, {"w": "+", "b": [0.6726, 0.6323, 0.6869, 0.6472]}, {"w": "log(2909)", "b": [0.691, 0.6323, 0.7661, 0.6472]}, {"w": "=", "b": [0.7712, 0.6323, 0.7856, 0.6472]}, {"w": "2.2.", "b": [0.7907, 0.6323, 0.8194, 0.6475]}]}, {"id": "b_17", "type": "paragraph", "text": "Now you can replace the value “infected” in the above categorical feature with the value of 2.2. You can proceed the same way for other values of that categorical feature and convert all of them into log-odds ratio values.", "words": [{"w": "Now", "b": [0.1312, 0.6719, 0.1672, 0.6869]}, {"w": "you", "b": [0.1734, 0.6719, 0.2022, 0.6869]}, {"w": "can", "b": [0.2083, 0.6719, 0.2361, 0.6869]}, {"w": "replace", "b": [0.2422, 0.6719, 0.2989, 0.6869]}, {"w": "the", "b": [0.305, 0.6719, 0.3307, 0.6869]}, {"w": "value", "b": [0.3369, 0.6719, 0.3786, 0.6869]}, {"w": "“infected”", "b": [0.3847, 0.6719, 0.4655, 0.6869]}, {"w": "in", "b": [0.4716, 0.6719, 0.4871, 0.6869]}, {"w": "the", "b": [0.4932, 0.6719, 0.5189, 0.6869]}, {"w": "above", "b": [0.5251, 0.6719, 0.5714, 0.6869]}, {"w": "categorical", "b": [0.5775, 0.6719, 0.664, 0.6869]}, {"w": "feature", "b": [0.6701, 0.6719, 0.7262, 0.6869]}, {"w": "with", "b": [0.7324, 0.6719, 0.7684, 0.6869]}, {"w": "the", "b": [0.7745, 0.6719, 0.8002, 0.6869]}, {"w": "value", "b": [0.8064, 0.6719, 0.8481, 0.6869]}, {"w": "of", "b": [0.8542, 0.6719, 0.8691, 0.6869]}, {"w": "2.2.", "b": [0.1308, 0.6899, 0.1596, 0.7051]}, {"w": "You", "b": [0.1679, 0.6899, 0.1999, 0.7048]}, {"w": "can", "b": [0.206, 0.6899, 0.2339, 0.7048]}, {"w": "proceed", "b": [0.2401, 0.6899, 0.3026, 0.7048]}, {"w": "the", "b": [0.3088, 0.6899, 0.3346, 0.7048]}, {"w": "same", "b": [0.3408, 0.6899, 0.3811, 0.7048]}, {"w": "way", "b": [0.3873, 0.6899, 0.4188, 0.7048]}, {"w": "for", "b": [0.4249, 0.6899, 0.4472, 0.7048]}, {"w": "other", "b": [0.4533, 0.6899, 0.4957, 0.7048]}, {"w": "values", "b": [0.5019, 0.6899, 0.5511, 0.7048]}, {"w": "of", "b": [0.5572, 0.6899, 0.5722, 0.7048]}, {"w": "that", "b": [0.5784, 0.6899, 0.6124, 0.7048]}, {"w": "categorical", "b": [0.6186, 0.6899, 0.7054, 0.7048]}, {"w": "feature", "b": [0.7115, 0.6899, 0.7679, 0.7048]}, {"w": "and", "b": [0.774, 0.6899, 0.804, 0.7048]}, {"w": "convert", "b": [0.8101, 0.6899, 0.8696, 0.7048]}, {"w": "all", "b": [0.1312, 0.7078, 0.1507, 0.7228]}, {"w": "of", "b": [0.1569, 0.7078, 0.1717, 0.7228]}, {"w": "them", "b": [0.1779, 0.7078, 0.2189, 0.7228]}, {"w": "into", "b": [0.225, 0.7078, 0.2563, 0.7228]}, {"w": "log-odds", "b": [0.2625, 0.7078, 0.3297, 0.7228]}, {"w": "ratio", "b": [0.3359, 0.7078, 0.3739, 0.7228]}, {"w": "values.", "b": [0.38, 0.7078, 0.434, 0.7228]}]}, {"id": "b_18", "type": "paragraph", "text": "Sometimes, categorical features are ordered, but not cyclical. Examples include school marks (from “A” to “E”) and seniority levels (“junior,” “mid-level,” “senior”). Instead of using", "words": [{"w": "Sometimes,", "b": [0.1312, 0.7347, 0.2208, 0.7497]}, {"w": "categorical", "b": [0.2268, 0.7347, 0.3113, 0.7497]}, {"w": "features", "b": [0.3173, 0.7347, 0.3793, 0.7497]}, {"w": "are", "b": [0.3853, 0.7347, 0.4095, 0.7497]}, {"w": "ordered,", "b": [0.4155, 0.7347, 0.4799, 0.7497]}, {"w": "but", "b": [0.486, 0.7347, 0.5131, 0.7497]}, {"w": "not", "b": [0.5192, 0.7347, 0.5453, 0.7497]}, {"w": "cyclical.", "b": [0.5513, 0.7347, 0.6142, 0.7497]}, {"w": "Examples", "b": [0.6223, 0.7347, 0.6985, 0.7497]}, {"w": "include", "b": [0.7046, 0.7347, 0.7609, 0.7497]}, {"w": "school", "b": [0.7669, 0.7347, 0.8152, 0.7497]}, {"w": "marks", "b": [0.8213, 0.7347, 0.8691, 0.7497]}, {"w": "(from", "b": [0.1291, 0.7527, 0.1746, 0.7677]}, {"w": "“A”", "b": [0.1817, 0.7527, 0.2136, 0.7677]}, {"w": "to", "b": [0.2207, 0.7527, 0.2375, 0.7677]}, {"w": "“E”)", "b": [0.2446, 0.7527, 0.2825, 0.7677]}, {"w": "and", "b": [0.2896, 0.7527, 0.3199, 0.7677]}, {"w": "seniority", "b": [0.3271, 0.7527, 0.3973, 0.7677]}, {"w": "levels", "b": [0.4045, 0.7527, 0.4485, 0.7677]}, {"w": "(“junior,”", "b": [0.4556, 0.7527, 0.5347, 0.7677]}, {"w": "“mid-level,”", "b": [0.542, 0.7527, 0.6393, 0.7677]}, {"w": "“senior”).", "b": [0.6467, 0.7527, 0.7253, 0.7677]}, {"w": "Instead", "b": [0.7364, 0.7527, 0.7967, 0.7677]}, {"w": "of", "b": [0.8038, 0.7527, 0.819, 0.7677]}, {"w": "using", "b": [0.8261, 0.7527, 0.8691, 0.7677]}]}, {"id": "b_19", "type": "paragraph", "text": "one-hot encoding, it’s convenient to represent them with meaningful numbers. Use uniform numbers in the [0, 1] range, like 1/3 for “junior”, 2/3 for “mid-level” and 1 for “senior.” If some values should be farther apart, you can reflect that with different ratios. If “senior” should be farther from “mid-level” than “mid-level” from “junior,” you might use 1/5, 2/5, 1 for “junior,” “mid-level,” and “senior,” respectively. This is why domain knowledge is important.", "words": [{"w": "one-hot", "b": [0.1312, 0.7706, 0.1917, 0.7856]}, {"w": "encoding,", "b": [0.1979, 0.7706, 0.2743, 0.7856]}, {"w": "it’s", "b": [0.2804, 0.7706, 0.3052, 0.7856]}, {"w": "convenient", "b": [0.3113, 0.7706, 0.3964, 0.7856]}, {"w": "to", "b": [0.4026, 0.7706, 0.419, 0.7856]}, {"w": "represent", "b": [0.4251, 0.7706, 0.4987, 0.7856]}, {"w": "them", "b": [0.5048, 0.7706, 0.5458, 0.7856]}, {"w": "with", "b": [0.552, 0.7706, 0.5879, 0.7856]}, {"w": "meaningful", "b": [0.594, 0.7706, 0.6827, 0.7856]}, {"w": "numbers.", "b": [0.6889, 0.7706, 0.7623, 0.7856]}, {"w": "Use", "b": [0.7705, 0.7706, 0.7999, 0.7856]}, {"w": "uniform", "b": [0.806, 0.7706, 0.8691, 0.7856]}, {"w": "numbers", "b": [0.1312, 0.7886, 0.201, 0.8035]}, {"w": "in", "b": [0.2072, 0.7886, 0.2229, 0.8035]}, {"w": "the", "b": [0.2291, 0.7886, 0.2552, 0.8035]}, {"w": "[0,", "b": [0.2614, 0.7886, 0.2813, 0.8038]}, {"w": "1]", "b": [0.2843, 0.7886, 0.299, 0.8035]}, {"w": "range,", "b": [0.3052, 0.7886, 0.3554, 0.8035]}, {"w": "like", "b": [0.3617, 0.7886, 0.3899, 0.8035]}, {"w": "1/3", "b": [0.3961, 0.7886, 0.4241, 0.8038]}, {"w": "for", "b": [0.4304, 0.7886, 0.4529, 0.8035]}, {"w": "“junior”,", "b": [0.4591, 0.7886, 0.5308, 0.8035]}, {"w": "2/3", "b": [0.537, 0.7886, 0.565, 0.8038]}, {"w": "for", "b": [0.5713, 0.7886, 0.5938, 0.8035]}, {"w": "“mid-level”", "b": [0.6, 0.7886, 0.6921, 0.8035]}, {"w": "and", "b": [0.6983, 0.7886, 0.7286, 0.8035]}, {"w": "1", "b": [0.7348, 0.7886, 0.7442, 0.8035]}, {"w": "for", "b": [0.7504, 0.7886, 0.7729, 0.8035]}, {"w": "“senior.”", "b": [0.7791, 0.7886, 0.8479, 0.8035]}, {"w": "If", "b": [0.8563, 0.7886, 0.8688, 0.8035]}, {"w": "some", "b": [0.1312, 0.8065, 0.1721, 0.8215]}, {"w": "values", "b": [0.1787, 0.8065, 0.2285, 0.8215]}, {"w": "should", "b": [0.2351, 0.8065, 0.2886, 0.8215]}, {"w": "be", "b": [0.2952, 0.8065, 0.3146, 0.8215]}, {"w": "farther", "b": [0.3212, 0.8065, 0.3772, 0.8215]}, {"w": "apart,", "b": [0.3839, 0.8065, 0.4331, 0.8215]}, {"w": "you", "b": [0.4398, 0.8065, 0.4691, 0.8215]}, {"w": "can", "b": [0.4757, 0.8065, 0.5039, 0.8215]}, {"w": "reflect", "b": [0.5105, 0.8065, 0.5608, 0.8215]}, {"w": "that", "b": [0.5674, 0.8065, 0.6019, 0.8215]}, {"w": "with", "b": [0.6085, 0.8065, 0.6451, 0.8215]}, {"w": "different", "b": [0.6517, 0.8065, 0.7198, 0.8215]}, {"w": "ratios.", "b": [0.7264, 0.8065, 0.7778, 0.8215]}, {"w": "If", "b": [0.7874, 0.8065, 0.8, 0.8215]}, {"w": "“senior”", "b": [0.8066, 0.8065, 0.8726, 0.8215]}, {"w": "should", "b": [0.1312, 0.8245, 0.184, 0.8394]}, {"w": "be", "b": [0.1902, 0.8245, 0.2093, 0.8394]}, {"w": "farther", "b": [0.2155, 0.8245, 0.2708, 0.8394]}, {"w": "from", "b": [0.277, 0.8245, 0.3147, 0.8394]}, {"w": "“mid-level”", "b": [0.3209, 0.8245, 0.4117, 0.8394]}, {"w": "than", "b": [0.4179, 0.8245, 0.4551, 0.8394]}, {"w": "“mid-level”", "b": [0.4613, 0.8245, 0.5521, 0.8394]}, {"w": "from", "b": [0.5583, 0.8245, 0.596, 0.8394]}, {"w": "“junior,”", "b": [0.6022, 0.8245, 0.673, 0.8394]}, {"w": "you", "b": [0.6791, 0.8245, 0.7081, 0.8394]}, {"w": "might", "b": [0.7142, 0.8245, 0.7612, 0.8394]}, {"w": "use", "b": [0.7674, 0.8245, 0.7933, 0.8394]}, {"w": "1/5,", "b": [0.7992, 0.8245, 0.8322, 0.8397]}, {"w": "2/5,", "b": [0.8384, 0.8245, 0.8713, 0.8397]}, {"w": "1", "b": [0.1303, 0.8424, 0.1397, 0.8574]}, {"w": "for", "b": [0.1472, 0.8424, 0.1697, 0.8574]}, {"w": "“junior,”", "b": [0.1772, 0.8424, 0.2489, 0.8574]}, {"w": "“mid-level,”", "b": [0.2567, 0.8424, 0.3539, 0.8574]}, {"w": "and", "b": [0.3617, 0.8424, 0.3921, 0.8574]}, {"w": "“senior,”", "b": [0.3995, 0.8424, 0.4708, 0.8574]}, {"w": "respectively.", "b": [0.4786, 0.8424, 0.5787, 0.8574]}, {"w": "This", "b": [0.5909, 0.8424, 0.6276, 0.8574]}, {"w": "is", "b": [0.635, 0.8424, 0.6477, 0.8574]}, {"w": "why", "b": [0.6552, 0.8424, 0.6886, 0.8574]}, {"w": "domain", "b": [0.6961, 0.8424, 0.7568, 0.8574]}, {"w": "knowledge", "b": [0.7642, 0.8424, 0.849, 0.8574]}, {"w": "is", "b": [0.8564, 0.8424, 0.8691, 0.8574]}, {"w": "important.", "b": [0.1312, 0.8604, 0.2174, 0.8753]}]}, {"id": "b_20", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "9", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 99, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "When categorical features are cyclical, integer encoding does not work well. For example,", "words": [{"w": "When", "b": [0.1303, 0.0881, 0.1789, 0.1031]}, {"w": "categorical", "b": [0.1854, 0.0881, 0.2733, 0.1031]}, {"w": "features", "b": [0.2798, 0.0881, 0.3443, 0.1031]}, {"w": "are", "b": [0.3508, 0.0881, 0.3759, 0.1031]}, {"w": "cyclical,", "b": [0.3824, 0.0881, 0.4478, 0.1031]}, {"w": "integer", "b": [0.4544, 0.0881, 0.5104, 0.1031]}, {"w": "encoding", "b": [0.5169, 0.0881, 0.5896, 0.1031]}, {"w": "does", "b": [0.5961, 0.0881, 0.6323, 0.1031]}, {"w": "not", "b": [0.6387, 0.0881, 0.6659, 0.1031]}, {"w": "work", "b": [0.6724, 0.0881, 0.7122, 0.1031]}, {"w": "well.", "b": [0.7187, 0.0881, 0.7558, 0.1031]}, {"w": "For", "b": [0.765, 0.0881, 0.7925, 0.1031]}, {"w": "example,", "b": [0.799, 0.0881, 0.8717, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "try converting Monday through Sunday to the integers 1 through 7. The difference between Sunday and Saturday is 1, while the difference between Monday and Sunday is −6. However, our reasoning suggests the same difference of 1, because Monday is just one day past Sunday.", "words": [{"w": "try", "b": [0.1312, 0.106, 0.1552, 0.121]}, {"w": "converting", "b": [0.1614, 0.106, 0.2443, 0.121]}, {"w": "Monday", "b": [0.2505, 0.106, 0.3151, 0.121]}, {"w": "through", "b": [0.3213, 0.106, 0.3844, 0.121]}, {"w": "Sunday", "b": [0.3905, 0.106, 0.4496, 0.121]}, {"w": "to", "b": [0.4557, 0.106, 0.472, 0.121]}, {"w": "the", "b": [0.4782, 0.106, 0.5036, 0.121]}, {"w": "integers", "b": [0.5098, 0.106, 0.5715, 0.121]}, {"w": "1", "b": [0.5774, 0.106, 0.5866, 0.121]}, {"w": "through", "b": [0.5928, 0.106, 0.6559, 0.121]}, {"w": "7.", "b": [0.662, 0.106, 0.6763, 0.121]}, {"w": "The", "b": [0.6845, 0.106, 0.7161, 0.121]}, {"w": "difference", "b": [0.7222, 0.106, 0.7981, 0.121]}, {"w": "between", "b": [0.8043, 0.106, 0.8689, 0.121]}, {"w": "Sunday", "b": [0.1312, 0.124, 0.1895, 0.1389]}, {"w": "and", "b": [0.1955, 0.124, 0.2247, 0.1389]}, {"w": "Saturday", "b": [0.2307, 0.124, 0.3021, 0.1389]}, {"w": "is", "b": [0.3081, 0.124, 0.3203, 0.1389]}, {"w": "1,", "b": [0.3263, 0.124, 0.3403, 0.1389]}, {"w": "while", "b": [0.3464, 0.124, 0.3876, 0.1389]}, {"w": "the", "b": [0.3936, 0.124, 0.4188, 0.1389]}, {"w": "difference", "b": [0.4248, 0.124, 0.4997, 0.1389]}, {"w": "between", "b": [0.5058, 0.124, 0.5696, 0.1389]}, {"w": "Monday", "b": [0.5756, 0.124, 0.6394, 0.1389]}, {"w": "and", "b": [0.6454, 0.124, 0.6746, 0.1389]}, {"w": "Sunday", "b": [0.6806, 0.124, 0.7389, 0.1389]}, {"w": "is", "b": [0.7449, 0.124, 0.7571, 0.1389]}, {"w": "−6.", "b": [0.7629, 0.124, 0.7913, 0.139]}, {"w": "However,", "b": [0.7995, 0.124, 0.8714, 0.1389]}, {"w": "our", "b": [0.1312, 0.1419, 0.1574, 0.1569]}, {"w": "reasoning", "b": [0.1635, 0.1419, 0.238, 0.1569]}, {"w": "suggests", "b": [0.2441, 0.1419, 0.3087, 0.1569]}, {"w": "the", "b": [0.3148, 0.1419, 0.3399, 0.1569]}, {"w": "same", "b": [0.346, 0.1419, 0.3853, 0.1569]}, {"w": "difference", "b": [0.3914, 0.1419, 0.4663, 0.1569]}, {"w": "of", "b": [0.4724, 0.1419, 0.487, 0.1569]}, {"w": "1,", "b": [0.4929, 0.1419, 0.5069, 0.1569]}, {"w": "because", "b": [0.513, 0.1419, 0.574, 0.1569]}, {"w": "Monday", "b": [0.58, 0.1419, 0.6438, 0.1569]}, {"w": "is", "b": [0.6499, 0.1419, 0.6621, 0.1569]}, {"w": "just", "b": [0.6682, 0.1419, 0.6979, 0.1569]}, {"w": "one", "b": [0.704, 0.1419, 0.7311, 0.1569]}, {"w": "day", "b": [0.7372, 0.1419, 0.7654, 0.1569]}, {"w": "past", "b": [0.7714, 0.1419, 0.8047, 0.1569]}, {"w": "Sunday.", "b": [0.8108, 0.1419, 0.8726, 0.1569]}]}, {"id": "b_2", "type": "paragraph", "text": "Instead, use the sine-cosine transformation. It converts a cyclical feature into two synthetic features. Let p denote the integer value of our cyclical feature. Replace the value p of the cyclical feature with the following two values:", "words": [{"w": "Instead,", "b": [0.1312, 0.1689, 0.1967, 0.1838]}, {"w": "use", "b": [0.2064, 0.1689, 0.2327, 0.1838]}, {"w": "the", "b": [0.2416, 0.1689, 0.2678, 0.1838]}, {"w": "sine-cosine", "b": [0.2767, 0.1692, 0.3754, 0.1841]}, {"w": "transformation.", "b": [0.3857, 0.1689, 0.5288, 0.1841]}, {"w": "It", "b": [0.5455, 0.1689, 0.5596, 0.1838]}, {"w": "converts", "b": [0.5685, 0.1689, 0.6362, 0.1838]}, {"w": "a", "b": [0.6452, 0.1689, 0.6546, 0.1838]}, {"w": "cyclical", "b": [0.6636, 0.1689, 0.7237, 0.1838]}, {"w": "feature", "b": [0.7327, 0.1689, 0.7898, 0.1838]}, {"w": "into", "b": [0.7987, 0.1689, 0.8307, 0.1838]}, {"w": "two", "b": [0.8396, 0.1689, 0.8689, 0.1838]}, {"w": "synthetic", "b": [0.1312, 0.1868, 0.2028, 0.2018]}, {"w": "features.", "b": [0.2089, 0.1868, 0.276, 0.2018]}, {"w": "Let", "b": [0.2842, 0.1868, 0.3106, 0.2018]}, {"w": "p", "b": [0.3166, 0.1871, 0.3259, 0.202]}, {"w": "denote", "b": [0.332, 0.1868, 0.3843, 0.2018]}, {"w": "the", "b": [0.3905, 0.1868, 0.4156, 0.2018]}, {"w": "integer", "b": [0.4218, 0.1868, 0.4757, 0.2018]}, {"w": "value", "b": [0.4818, 0.1868, 0.5225, 0.2018]}, {"w": "of", "b": [0.5287, 0.1868, 0.5433, 0.2018]}, {"w": "our", "b": [0.5494, 0.1868, 0.5756, 0.2018]}, {"w": "cyclical", "b": [0.5817, 0.1868, 0.6396, 0.2018]}, {"w": "feature.", "b": [0.6457, 0.1868, 0.7057, 0.2018]}, {"w": "Replace", "b": [0.7139, 0.1868, 0.7755, 0.2018]}, {"w": "the", "b": [0.7816, 0.1868, 0.8068, 0.2018]}, {"w": "value", "b": [0.8129, 0.1868, 0.8536, 0.2018]}, {"w": "p", "b": [0.8595, 0.1871, 0.8688, 0.202]}, {"w": "of", "b": [0.1312, 0.2048, 0.1461, 0.2197]}, {"w": "the", "b": [0.1522, 0.2048, 0.1779, 0.2197]}, {"w": "cyclical", "b": [0.1841, 0.2048, 0.243, 0.2197]}, {"w": "feature", "b": [0.2492, 0.2048, 0.3051, 0.2197]}, {"w": "with", "b": [0.3113, 0.2048, 0.3472, 0.2197]}, {"w": "the", "b": [0.3533, 0.2048, 0.379, 0.2197]}, {"w": "following", "b": [0.3851, 0.2048, 0.4569, 0.2197]}, {"w": "two", "b": [0.463, 0.2048, 0.4917, 0.2197]}, {"w": "values:", "b": [0.4979, 0.2048, 0.5518, 0.2197]}]}, {"id": "b_3", "type": "equation", "text": "psin = sin", "words": [{"w": "psin", "b": [0.3012, 0.2551, 0.3318, 0.2713]}, {"w": "=", "b": [0.3378, 0.2549, 0.3522, 0.2698]}, {"w": "sin", "b": [0.3573, 0.2549, 0.38, 0.2698]}]}, {"id": "b_4", "type": "paragraph", "text": "2 × π × p", "words": [{"w": "2", "b": [0.399, 0.2447, 0.4082, 0.2597]}, {"w": "×", "b": [0.4123, 0.2448, 0.4266, 0.2598]}, {"w": "π", "b": [0.4307, 0.245, 0.4412, 0.26]}, {"w": "×", "b": [0.446, 0.2448, 0.4604, 0.2598]}, {"w": "p", "b": [0.4645, 0.245, 0.4737, 0.26]}]}, {"id": "b_5", "type": "paragraph", "text": "max(p)", "words": [{"w": "max(p)", "b": [0.4072, 0.2651, 0.4655, 0.2803]}]}, {"id": "b_7", "type": "equation", "text": ", pcos = cos", "words": [{"w": ",", "b": [0.4926, 0.2551, 0.4977, 0.2701]}, {"w": "pcos", "b": [0.5008, 0.2551, 0.5309, 0.2713]}, {"w": "=", "b": [0.537, 0.2549, 0.5513, 0.2698]}, {"w": "cos", "b": [0.5565, 0.2549, 0.5812, 0.2698]}]}, {"id": "b_8", "type": "paragraph", "text": "2 × π × p", "words": [{"w": "2", "b": [0.6, 0.2447, 0.6093, 0.2597]}, {"w": "×", "b": [0.6133, 0.2448, 0.6277, 0.2598]}, {"w": "π", "b": [0.6318, 0.245, 0.6423, 0.26]}, {"w": "×", "b": [0.6471, 0.2448, 0.6614, 0.2598]}, {"w": "p", "b": [0.6655, 0.245, 0.6748, 0.26]}]}, {"id": "b_9", "type": "paragraph", "text": "max(p)", "words": [{"w": "max(p)", "b": [0.6083, 0.2651, 0.6666, 0.2803]}]}, {"id": "b_12", "type": "paragraph", "text": "The table below contains the values of psin and pcos for the seven days of the week:", "words": [{"w": "The", "b": [0.1306, 0.2988, 0.1624, 0.3138]}, {"w": "table", "b": [0.1685, 0.2988, 0.2085, 0.3138]}, {"w": "below", "b": [0.2147, 0.2988, 0.2608, 0.3138]}, {"w": "contains", "b": [0.2669, 0.2988, 0.3332, 0.3138]}, {"w": "the", "b": [0.3393, 0.2988, 0.365, 0.3138]}, {"w": "values", "b": [0.3711, 0.2988, 0.42, 0.3138]}, {"w": "of", "b": [0.4261, 0.2988, 0.441, 0.3138]}, {"w": "psin", "b": [0.447, 0.2991, 0.4776, 0.3153]}, {"w": "and", "b": [0.4846, 0.2988, 0.5144, 0.3138]}, {"w": "pcos", "b": [0.5205, 0.2991, 0.5506, 0.3153]}, {"w": "for", "b": [0.5577, 0.2988, 0.5798, 0.3138]}, {"w": "the", "b": [0.5859, 0.2988, 0.6116, 0.3138]}, {"w": "seven", "b": [0.6178, 0.2988, 0.6609, 0.3138]}, {"w": "days", "b": [0.6671, 0.2988, 0.7031, 0.3138]}, {"w": "of", "b": [0.7092, 0.2988, 0.7241, 0.3138]}, {"w": "the", "b": [0.7303, 0.2988, 0.7559, 0.3138]}, {"w": "week:", "b": [0.762, 0.2988, 0.8061, 0.3138]}]}, {"id": "b_13", "type": "paragraph", "text": "p psin pcos", "words": [{"w": "p", "b": [0.4202, 0.3394, 0.4295, 0.3543]}, {"w": "psin", "b": [0.4627, 0.3394, 0.4933, 0.3556]}, {"w": "pcos", "b": [0.5381, 0.3394, 0.5683, 0.3556]}]}, {"id": "b_14", "type": "paragraph", "text": "1 0.78 0.62 2 0.97 −0.22 3 0.43 −0.9 4 −0.43 −0.9 5 −0.97 −0.22 6 −0.78 0.62 7 0 1", "words": [{"w": "1", "b": [0.4202, 0.3646, 0.4294, 0.3795]}, {"w": "0.78", "b": [0.4667, 0.3646, 0.4995, 0.3798]}, {"w": "0.62", "b": [0.5419, 0.3646, 0.5747, 0.3798]}, {"w": "2", "b": [0.4202, 0.3831, 0.4294, 0.3981]}, {"w": "0.97", "b": [0.4667, 0.3831, 0.4995, 0.3983]}, {"w": "−0.22", "b": [0.5275, 0.3831, 0.5747, 0.3983]}, {"w": "3", "b": [0.4202, 0.4016, 0.4294, 0.4166]}, {"w": "0.43", "b": [0.4667, 0.4016, 0.4995, 0.4169]}, {"w": "−0.9", "b": [0.5275, 0.4016, 0.5654, 0.4169]}, {"w": "4", "b": [0.4202, 0.4202, 0.4294, 0.4351]}, {"w": "−0.43", "b": [0.4524, 0.4202, 0.4995, 0.4354]}, {"w": "−0.9", "b": [0.5275, 0.4202, 0.5654, 0.4354]}, {"w": "5", "b": [0.4202, 0.4387, 0.4294, 0.4537]}, {"w": "−0.97", "b": [0.4524, 0.4387, 0.4995, 0.454]}, {"w": "−0.22", "b": [0.5275, 0.4387, 0.5747, 0.454]}, {"w": "6", "b": [0.4202, 0.4573, 0.4294, 0.4722]}, {"w": "−0.78", "b": [0.4524, 0.4573, 0.4995, 0.4725]}, {"w": "0.62", "b": [0.5419, 0.4573, 0.5747, 0.4725]}, {"w": "7", "b": [0.4202, 0.4758, 0.4294, 0.4908]}, {"w": "0", "b": [0.4667, 0.4758, 0.4759, 0.4908]}, {"w": "1", "b": [0.5419, 0.4758, 0.5511, 0.4908]}]}, {"id": "b_15", "type": "paragraph", "text": "Figure 8 contains the scatter plot built using the above table. You can see the cyclical nature of the two new features.", "words": [{"w": "Figure", "b": [0.1312, 0.5298, 0.1823, 0.5448]}, {"w": "8", "b": [0.188, 0.5298, 0.1971, 0.5448]}, {"w": "contains", "b": [0.2028, 0.5298, 0.2678, 0.5448]}, {"w": "the", "b": [0.2735, 0.5298, 0.2986, 0.5448]}, {"w": "scatter", "b": [0.3044, 0.5298, 0.3578, 0.5448]}, {"w": "plot", "b": [0.3636, 0.5298, 0.3947, 0.5448]}, {"w": "built", "b": [0.4005, 0.5298, 0.4377, 0.5448]}, {"w": "using", "b": [0.4434, 0.5298, 0.4848, 0.5448]}, {"w": "the", "b": [0.4905, 0.5298, 0.5156, 0.5448]}, {"w": "above", "b": [0.5214, 0.5298, 0.5666, 0.5448]}, {"w": "table.", "b": [0.5724, 0.5298, 0.6166, 0.5448]}, {"w": "You", "b": [0.6246, 0.5298, 0.6558, 0.5448]}, {"w": "can", "b": [0.6615, 0.5298, 0.6887, 0.5448]}, {"w": "see", "b": [0.6944, 0.5298, 0.7176, 0.5448]}, {"w": "the", "b": [0.7234, 0.5298, 0.7485, 0.5448]}, {"w": "cyclical", "b": [0.7543, 0.5298, 0.8121, 0.5448]}, {"w": "nature", "b": [0.8179, 0.5298, 0.8692, 0.5448]}, {"w": "of", "b": [0.1312, 0.5478, 0.1461, 0.5628]}, {"w": "the", "b": [0.1522, 0.5478, 0.1779, 0.5628]}, {"w": "two", "b": [0.1841, 0.5478, 0.2127, 0.5628]}, {"w": "new", "b": [0.2189, 0.5478, 0.2507, 0.5628]}, {"w": "features.", "b": [0.2568, 0.5478, 0.3252, 0.5628]}]}, {"id": "b_16", "type": "paragraph", "text": "Now, in your tidy data, replace “Monday” with two values [0.78, 0.62], “Tuesday” with [0.97, −0.22], and so on. The dataset has added another dimension, but the model’s predictive quality is significantly better, compared to integer encoding.", "words": [{"w": "Now,", "b": [0.1312, 0.5747, 0.1731, 0.5897]}, {"w": "in", "b": [0.1816, 0.5747, 0.1973, 0.5897]}, {"w": "your", "b": [0.2054, 0.5747, 0.2421, 0.5897]}, {"w": "tidy", "b": [0.2502, 0.5747, 0.2832, 0.5897]}, {"w": "data,", "b": [0.2912, 0.5747, 0.3331, 0.5897]}, {"w": "replace", "b": [0.3417, 0.5747, 0.3993, 0.5897]}, {"w": "“Monday”", "b": [0.4074, 0.5747, 0.4915, 0.5897]}, {"w": "with", "b": [0.4996, 0.5747, 0.5362, 0.5897]}, {"w": "two", "b": [0.5443, 0.5747, 0.5736, 0.5897]}, {"w": "values", "b": [0.5817, 0.5747, 0.6316, 0.5897]}, {"w": "[0.78,", "b": [0.6395, 0.5747, 0.6833, 0.5899]}, {"w": "0.62],", "b": [0.6863, 0.5747, 0.7302, 0.5899]}, {"w": "“Tuesday”", "b": [0.7387, 0.5747, 0.8241, 0.5897]}, {"w": "with", "b": [0.8322, 0.5747, 0.8688, 0.5897]}, {"w": "[0.97,", "b": [0.1312, 0.5927, 0.1737, 0.6079]}, {"w": "−0.22],", "b": [0.1768, 0.5927, 0.2334, 0.6079]}, {"w": "and", "b": [0.2388, 0.5927, 0.2679, 0.6076]}, {"w": "so", "b": [0.273, 0.5927, 0.2892, 0.6076]}, {"w": "on.", "b": [0.2943, 0.5927, 0.3184, 0.6076]}, {"w": "The", "b": [0.3263, 0.5927, 0.3574, 0.6076]}, {"w": "dataset", "b": [0.3626, 0.5927, 0.42, 0.6076]}, {"w": "has", "b": [0.4251, 0.5927, 0.4513, 0.6076]}, {"w": "added", "b": [0.4564, 0.5927, 0.5037, 0.6076]}, {"w": "another", "b": [0.5088, 0.5927, 0.5692, 0.6076]}, {"w": "dimension,", "b": [0.5743, 0.5927, 0.6588, 0.6076]}, {"w": "but", "b": [0.6641, 0.5927, 0.6912, 0.6076]}, {"w": "the", "b": [0.6964, 0.5927, 0.7215, 0.6076]}, {"w": "model’s", "b": [0.7266, 0.5927, 0.7865, 0.6076]}, {"w": "predictive", "b": [0.7916, 0.5927, 0.8691, 0.6076]}, {"w": "quality", "b": [0.1312, 0.6106, 0.1871, 0.6256]}, {"w": "is", "b": [0.1933, 0.6106, 0.2057, 0.6256]}, {"w": "significantly", "b": [0.2118, 0.6106, 0.3083, 0.6256]}, {"w": "better,", "b": [0.3145, 0.6106, 0.3684, 0.6256]}, {"w": "compared", "b": [0.3745, 0.6106, 0.4525, 0.6256]}, {"w": "to", "b": [0.4587, 0.6106, 0.4751, 0.6256]}, {"w": "integer", "b": [0.4812, 0.6106, 0.5361, 0.6256]}, {"w": "encoding.", "b": [0.5423, 0.6106, 0.6187, 0.6256]}]}, {"id": "b_17", "type": "paragraph", "text": "4.2.4 Feature Hashing", "words": [{"w": "4.2.4", "b": [0.1312, 0.6588, 0.1749, 0.6737]}, {"w": "Feature", "b": [0.1961, 0.6588, 0.2662, 0.6737]}, {"w": "Hashing", "b": [0.2733, 0.6588, 0.3487, 0.6737]}]}, {"id": "b_18", "type": "paragraph", "text": "Feature hashing, or hashing trick, converts text data, or categorical attributes with many values, into a feature vector of arbitrary dimensionality. One-hot encoding and bag-of-words have a drawback: many unique values will create high-dimensional feature vectors. For example, if there are one million unique tokens in a collection of text documents, bag-of-words will produce feature vectors that each have a dimensionality of one million. Working with such high-dimensional data might be very computationally expensive.", "words": [{"w": "Feature", "b": [0.1312, 0.6953, 0.2014, 0.7103]}, {"w": "hashing,", "b": [0.2073, 0.695, 0.2831, 0.7103]}, {"w": "or", "b": [0.2885, 0.695, 0.3046, 0.71]}, {"w": "hashing", "b": [0.3098, 0.6953, 0.3804, 0.7103]}, {"w": "trick,", "b": [0.3863, 0.695, 0.4344, 0.7103]}, {"w": "converts", "b": [0.4398, 0.695, 0.5048, 0.71]}, {"w": "text", "b": [0.5099, 0.695, 0.5416, 0.71]}, {"w": "data,", "b": [0.5468, 0.695, 0.587, 0.71]}, {"w": "or", "b": [0.5924, 0.695, 0.6085, 0.71]}, {"w": "categorical", "b": [0.6137, 0.695, 0.6982, 0.71]}, {"w": "attributes", "b": [0.7033, 0.695, 0.7809, 0.71]}, {"w": "with", "b": [0.7861, 0.695, 0.8213, 0.71]}, {"w": "many", "b": [0.8265, 0.695, 0.8696, 0.71]}, {"w": "values,", "b": [0.1308, 0.713, 0.1841, 0.7279]}, {"w": "into", "b": [0.1902, 0.713, 0.2211, 0.7279]}, {"w": "a", "b": [0.2272, 0.713, 0.2363, 0.7279]}, {"w": "feature", "b": [0.2425, 0.713, 0.2978, 0.7279]}, {"w": "vector", "b": [0.3039, 0.713, 0.3526, 0.7279]}, {"w": "of", "b": [0.3587, 0.713, 0.3734, 0.7279]}, {"w": "arbitrary", "b": [0.3795, 0.713, 0.4511, 0.7279]}, {"w": "dimensionality.", "b": [0.4573, 0.713, 0.5764, 0.7279]}, {"w": "One-hot", "b": [0.5846, 0.713, 0.6494, 0.7279]}, {"w": "encoding", "b": [0.6556, 0.713, 0.726, 0.7279]}, {"w": "and", "b": [0.7321, 0.713, 0.7615, 0.7279]}, {"w": "bag-of-words", "b": [0.7677, 0.713, 0.8691, 0.7279]}, {"w": "have", "b": [0.1312, 0.7309, 0.1684, 0.7459]}, {"w": "a", "b": [0.1761, 0.7309, 0.1855, 0.7459]}, {"w": "drawback:", "b": [0.1932, 0.7309, 0.2764, 0.7459]}, {"w": "many", "b": [0.2877, 0.7309, 0.3327, 0.7459]}, {"w": "unique", "b": [0.3404, 0.7309, 0.3953, 0.7459]}, {"w": "values", "b": [0.403, 0.7309, 0.4528, 0.7459]}, {"w": "will", "b": [0.4606, 0.7309, 0.4898, 0.7459]}, {"w": "create", "b": [0.4975, 0.7309, 0.5468, 0.7459]}, {"w": "high-dimensional", "b": [0.5545, 0.7309, 0.6937, 0.7459]}, {"w": "feature", "b": [0.7014, 0.7309, 0.7584, 0.7459]}, {"w": "vectors.", "b": [0.7661, 0.7309, 0.8291, 0.7459]}, {"w": "For", "b": [0.8419, 0.7309, 0.8695, 0.7459]}, {"w": "example,", "b": [0.1312, 0.7489, 0.2011, 0.7638]}, {"w": "if", "b": [0.2065, 0.7489, 0.217, 0.7638]}, {"w": "there", "b": [0.2223, 0.7489, 0.2626, 0.7638]}, {"w": "are", "b": [0.2678, 0.7489, 0.2919, 0.7638]}, {"w": "one", "b": [0.2972, 0.7489, 0.3243, 0.7638]}, {"w": "million", "b": [0.3296, 0.7489, 0.3838, 0.7638]}, {"w": "unique", "b": [0.3891, 0.7489, 0.4418, 0.7638]}, {"w": "tokens", "b": [0.4471, 0.7489, 0.4974, 0.7638]}, {"w": "in", "b": [0.5026, 0.7489, 0.5177, 0.7638]}, {"w": "a", "b": [0.5229, 0.7489, 0.532, 0.7638]}, {"w": "collection", "b": [0.5372, 0.7489, 0.6116, 0.7638]}, {"w": "of", "b": [0.6168, 0.7489, 0.6314, 0.7638]}, {"w": "text", "b": [0.6366, 0.7489, 0.6683, 0.7638]}, {"w": "documents,", "b": [0.6735, 0.7489, 0.7631, 0.7638]}, {"w": "bag-of-words", "b": [0.7685, 0.7489, 0.8691, 0.7638]}, {"w": "will", "b": [0.1306, 0.7668, 0.1598, 0.7818]}, {"w": "produce", "b": [0.1659, 0.7668, 0.2313, 0.7818]}, {"w": "feature", "b": [0.2375, 0.7668, 0.2945, 0.7818]}, {"w": "vectors", "b": [0.3006, 0.7668, 0.3583, 0.7818]}, {"w": "that", "b": [0.3644, 0.7668, 0.3989, 0.7818]}, {"w": "each", "b": [0.405, 0.7668, 0.4411, 0.7818]}, {"w": "have", "b": [0.4472, 0.7668, 0.4843, 0.7818]}, {"w": "a", "b": [0.4905, 0.7668, 0.4999, 0.7818]}, {"w": "dimensionality", "b": [0.506, 0.7668, 0.6252, 0.7818]}, {"w": "of", "b": [0.6314, 0.7668, 0.6465, 0.7818]}, {"w": "one", "b": [0.6526, 0.7668, 0.6809, 0.7818]}, {"w": "million.", "b": [0.687, 0.7668, 0.7486, 0.7818]}, {"w": "Working", "b": [0.7568, 0.7668, 0.8264, 0.7818]}, {"w": "with", "b": [0.8325, 0.7668, 0.8691, 0.7818]}, {"w": "such", "b": [0.1312, 0.7848, 0.1667, 0.7997]}, {"w": "high-dimensional", "b": [0.1729, 0.7848, 0.3094, 0.7997]}, {"w": "data", "b": [0.3155, 0.7848, 0.3514, 0.7997]}, {"w": "might", "b": [0.3576, 0.7848, 0.4042, 0.7997]}, {"w": "be", "b": [0.4103, 0.7848, 0.4293, 0.7997]}, {"w": "very", "b": [0.4355, 0.7848, 0.4699, 0.7997]}, {"w": "computationally", "b": [0.476, 0.7848, 0.6067, 0.7997]}, {"w": "expensive.", "b": [0.6129, 0.7848, 0.6951, 0.7997]}]}, {"id": "b_19", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "10", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 100, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 8: The sine-cosine transformed feature that represents the days of the week.", "words": [{"w": "Figure", "b": [0.1635, 0.444, 0.2156, 0.459]}, {"w": "8:", "b": [0.2217, 0.444, 0.2361, 0.459]}, {"w": "The", "b": [0.2443, 0.444, 0.2761, 0.459]}, {"w": "sine-cosine", "b": [0.2822, 0.444, 0.3676, 0.459]}, {"w": "transformed", "b": [0.3737, 0.444, 0.4708, 0.459]}, {"w": "feature", "b": [0.477, 0.444, 0.5329, 0.459]}, {"w": "that", "b": [0.5391, 0.444, 0.5729, 0.459]}, {"w": "represents", "b": [0.579, 0.444, 0.6599, 0.459]}, {"w": "the", "b": [0.666, 0.444, 0.6917, 0.459]}, {"w": "days", "b": [0.6978, 0.444, 0.7338, 0.459]}, {"w": "of", "b": [0.74, 0.444, 0.7549, 0.459]}, {"w": "the", "b": [0.761, 0.444, 0.7866, 0.459]}, {"w": "week.", "b": [0.7928, 0.444, 0.8369, 0.459]}]}, {"id": "b_1", "type": "paragraph", "text": "Original values Features", "words": [{"w": "Original", "b": [0.2857, 0.7857, 0.3416, 0.7988]}, {"w": "values", "b": [0.3461, 0.7857, 0.393, 0.7988]}, {"w": "Features", "b": [0.6157, 0.7857, 0.6798, 0.7988]}]}, {"id": "b_2", "type": "paragraph", "text": "Value 1", "words": [{"w": "Value", "b": [0.3106, 0.5248, 0.353, 0.5386]}, {"w": "1", "b": [0.3578, 0.5248, 0.3673, 0.5386]}]}, {"id": "b_3", "type": "paragraph", "text": "Feature 0", "words": [{"w": "Feature", "b": [0.6108, 0.5525, 0.6696, 0.5663]}, {"w": "0", "b": [0.6744, 0.5525, 0.6839, 0.5663]}]}, {"id": "b_4", "type": "paragraph", "text": "Feature 1", "words": [{"w": "Feature", "b": [0.6108, 0.5871, 0.6696, 0.6009]}, {"w": "1", "b": [0.6744, 0.5871, 0.6839, 0.6009]}]}, {"id": "b_5", "type": "paragraph", "text": "Feature 3", "words": [{"w": "Feature", "b": [0.6108, 0.6217, 0.6696, 0.6356]}, {"w": "3", "b": [0.6744, 0.6217, 0.6839, 0.6356]}]}, {"id": "b_6", "type": "paragraph", "text": "Feature 4", "words": [{"w": "Feature", "b": [0.6108, 0.6563, 0.6696, 0.6702]}, {"w": "4", "b": [0.6744, 0.6563, 0.6839, 0.6702]}]}, {"id": "b_7", "type": "paragraph", "text": "Feature 5", "words": [{"w": "Feature", "b": [0.6108, 0.691, 0.6696, 0.7048]}, {"w": "5", "b": [0.6744, 0.691, 0.6839, 0.7048]}]}, {"id": "b_8", "type": "paragraph", "text": "Value 2", "words": [{"w": "Value", "b": [0.3106, 0.5663, 0.353, 0.5802]}, {"w": "2", "b": [0.3578, 0.5663, 0.3673, 0.5802]}]}, {"id": "b_9", "type": "paragraph", "text": "Value 3", "words": [{"w": "Value", "b": [0.3106, 0.6079, 0.353, 0.6217]}, {"w": "3", "b": [0.3578, 0.6079, 0.3673, 0.6217]}]}, {"id": "b_10", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.3331, 0.639, 0.3474, 0.6529]}]}, {"id": "b_11", "type": "equation", "text": "Value K-1", "words": [{"w": "Value", "b": [0.3021, 0.6771, 0.3445, 0.691]}, {"w": "K-1", "b": [0.3492, 0.6771, 0.3758, 0.691]}]}, {"id": "b_12", "type": "paragraph", "text": "Value K", "words": [{"w": "Value", "b": [0.3097, 0.7187, 0.3521, 0.7325]}, {"w": "K", "b": [0.3568, 0.7187, 0.3682, 0.7325]}]}, {"id": "b_13", "type": "paragraph", "text": "Feature 0", "words": [{"w": "Feature", "b": [0.6108, 0.5525, 0.6696, 0.5663]}, {"w": "0", "b": [0.6744, 0.5525, 0.6839, 0.5663]}]}, {"id": "b_14", "type": "paragraph", "text": "Hash function", "words": [{"w": "Hash", "b": [0.4444, 0.7857, 0.4823, 0.7988]}, {"w": "function", "b": [0.4868, 0.7857, 0.5436, 0.7988]}]}, {"id": "b_15", "type": "paragraph", "text": "Figure 9: An illustration of the hashing trick for the desired dimensionality of 5 for the original cardinality K of values of an attribute.", "words": [{"w": "Figure", "b": [0.1312, 0.815, 0.1844, 0.83]}, {"w": "9:", "b": [0.1918, 0.815, 0.2064, 0.83]}, {"w": "An", "b": [0.2171, 0.815, 0.2417, 0.83]}, {"w": "illustration", "b": [0.2491, 0.815, 0.3393, 0.83]}, {"w": "of", "b": [0.3467, 0.815, 0.3618, 0.83]}, {"w": "the", "b": [0.3692, 0.815, 0.3954, 0.83]}, {"w": "hashing", "b": [0.4028, 0.815, 0.4657, 0.83]}, {"w": "trick", "b": [0.4731, 0.815, 0.5108, 0.83]}, {"w": "for", "b": [0.5182, 0.815, 0.5408, 0.83]}, {"w": "the", "b": [0.5482, 0.815, 0.5743, 0.83]}, {"w": "desired", "b": [0.5817, 0.815, 0.6394, 0.83]}, {"w": "dimensionality", "b": [0.6469, 0.815, 0.7662, 0.83]}, {"w": "of", "b": [0.7736, 0.815, 0.7888, 0.83]}, {"w": "5", "b": [0.7959, 0.815, 0.8053, 0.83]}, {"w": "for", "b": [0.8127, 0.815, 0.8352, 0.83]}, {"w": "the", "b": [0.8426, 0.815, 0.8688, 0.83]}, {"w": "original", "b": [0.1312, 0.833, 0.1918, 0.8479]}, {"w": "cardinality", "b": [0.1979, 0.833, 0.2841, 0.8479]}, {"w": "K", "b": [0.2902, 0.8332, 0.3059, 0.8482]}, {"w": "of", "b": [0.3133, 0.833, 0.3282, 0.8479]}, {"w": "values", "b": [0.3344, 0.833, 0.3832, 0.8479]}, {"w": "of", "b": [0.3893, 0.833, 0.4042, 0.8479]}, {"w": "an", "b": [0.4104, 0.833, 0.4298, 0.8479]}, {"w": "attribute.", "b": [0.436, 0.833, 0.5129, 0.8479]}]}, {"id": "b_16", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "11", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 101, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "To keep your data manageable, you can use the hashing trick that works as follows. First you decide on the desired dimensionality of your feature vectors. Then, using a hash function, you first convert all values of your categorical attribute (or all tokens in your collection of documents) into a number, and then you convert this number into an index of your feature vector. The process is illustrated in Figure 9.", "words": [{"w": "To", "b": [0.1306, 0.0881, 0.1511, 0.1031]}, {"w": "keep", "b": [0.1568, 0.0881, 0.192, 0.1031]}, {"w": "your", "b": [0.1977, 0.0881, 0.2329, 0.1031]}, {"w": "data", "b": [0.2386, 0.0881, 0.2737, 0.1031]}, {"w": "manageable,", "b": [0.2794, 0.0881, 0.3769, 0.1031]}, {"w": "you", "b": [0.3827, 0.0881, 0.4108, 0.1031]}, {"w": "can", "b": [0.4165, 0.0881, 0.4436, 0.1031]}, {"w": "use", "b": [0.4493, 0.0881, 0.4745, 0.1031]}, {"w": "the", "b": [0.4802, 0.0881, 0.5053, 0.1031]}, {"w": "hashing", "b": [0.511, 0.0881, 0.5714, 0.1031]}, {"w": "trick", "b": [0.5771, 0.0881, 0.6133, 0.1031]}, {"w": "that", "b": [0.619, 0.0881, 0.6522, 0.1031]}, {"w": "works", "b": [0.6578, 0.0881, 0.7032, 0.1031]}, {"w": "as", "b": [0.7089, 0.0881, 0.7251, 0.1031]}, {"w": "follows.", "b": [0.7308, 0.0881, 0.7891, 0.1031]}, {"w": "First", "b": [0.7972, 0.0881, 0.8353, 0.1031]}, {"w": "you", "b": [0.8409, 0.0881, 0.8691, 0.1031]}, {"w": "decide", "b": [0.1312, 0.106, 0.1813, 0.121]}, {"w": "on", "b": [0.1874, 0.106, 0.2068, 0.121]}, {"w": "the", "b": [0.213, 0.106, 0.2385, 0.121]}, {"w": "desired", "b": [0.2447, 0.106, 0.3011, 0.121]}, {"w": "dimensionality", "b": [0.3072, 0.106, 0.4237, 0.121]}, {"w": "of", "b": [0.4299, 0.106, 0.4447, 0.121]}, {"w": "your", "b": [0.4509, 0.106, 0.4867, 0.121]}, {"w": "feature", "b": [0.4928, 0.106, 0.5485, 0.121]}, {"w": "vectors.", "b": [0.5547, 0.106, 0.6161, 0.121]}, {"w": "Then,", "b": [0.6243, 0.106, 0.6713, 0.121]}, {"w": "using", "b": [0.6775, 0.106, 0.7195, 0.121]}, {"w": "a", "b": [0.7256, 0.106, 0.7348, 0.121]}, {"w": "hash", "b": [0.7408, 0.1064, 0.7831, 0.1213]}, {"w": "function,", "b": [0.7901, 0.106, 0.8713, 0.1213]}, {"w": "you", "b": [0.1308, 0.124, 0.1601, 0.1389]}, {"w": "first", "b": [0.1662, 0.124, 0.1988, 0.1389]}, {"w": "convert", "b": [0.2049, 0.124, 0.2652, 0.1389]}, {"w": "all", "b": [0.2713, 0.124, 0.2912, 0.1389]}, {"w": "values", "b": [0.2973, 0.124, 0.3471, 0.1389]}, {"w": "of", "b": [0.3533, 0.124, 0.3684, 0.1389]}, {"w": "your", "b": [0.3746, 0.124, 0.4113, 0.1389]}, {"w": "categorical", "b": [0.4174, 0.124, 0.5053, 0.1389]}, {"w": "attribute", "b": [0.5115, 0.124, 0.5848, 0.1389]}, {"w": "(or", "b": [0.5909, 0.124, 0.615, 0.1389]}, {"w": "all", "b": [0.6212, 0.124, 0.641, 0.1389]}, {"w": "tokens", "b": [0.6472, 0.124, 0.6996, 0.1389]}, {"w": "in", "b": [0.7057, 0.124, 0.7214, 0.1389]}, {"w": "your", "b": [0.7276, 0.124, 0.7643, 0.1389]}, {"w": "collection", "b": [0.7704, 0.124, 0.8478, 0.1389]}, {"w": "of", "b": [0.854, 0.124, 0.8691, 0.1389]}, {"w": "documents)", "b": [0.1312, 0.1419, 0.2247, 0.1569]}, {"w": "into", "b": [0.2308, 0.1419, 0.2621, 0.1569]}, {"w": "a", "b": [0.2682, 0.1419, 0.2775, 0.1569]}, {"w": "number,", "b": [0.2836, 0.1419, 0.3498, 0.1569]}, {"w": "and", "b": [0.356, 0.1419, 0.3857, 0.1569]}, {"w": "then", "b": [0.3919, 0.1419, 0.4278, 0.1569]}, {"w": "you", "b": [0.4339, 0.1419, 0.4627, 0.1569]}, {"w": "convert", "b": [0.4688, 0.1419, 0.5278, 0.1569]}, {"w": "this", "b": [0.534, 0.1419, 0.5638, 0.1569]}, {"w": "number", "b": [0.57, 0.1419, 0.6311, 0.1569]}, {"w": "into", "b": [0.6372, 0.1419, 0.6685, 0.1569]}, {"w": "an", "b": [0.6747, 0.1419, 0.6941, 0.1569]}, {"w": "index", "b": [0.7003, 0.1419, 0.7439, 0.1569]}, {"w": "of", "b": [0.75, 0.1419, 0.7649, 0.1569]}, {"w": "your", "b": [0.7711, 0.1419, 0.807, 0.1569]}, {"w": "feature", "b": [0.8132, 0.1419, 0.8691, 0.1569]}, {"w": "vector.", "b": [0.1308, 0.1599, 0.1852, 0.1748]}, {"w": "The", "b": [0.1934, 0.1599, 0.2251, 0.1748]}, {"w": "process", "b": [0.2313, 0.1599, 0.2895, 0.1748]}, {"w": "is", "b": [0.2957, 0.1599, 0.3081, 0.1748]}, {"w": "illustrated", "b": [0.3142, 0.1599, 0.3964, 0.1748]}, {"w": "in", "b": [0.4026, 0.1599, 0.418, 0.1748]}, {"w": "Figure", "b": [0.4241, 0.1599, 0.4762, 0.1748]}, {"w": "9.", "b": [0.4824, 0.1599, 0.4967, 0.1748]}]}, {"id": "b_1", "type": "paragraph", "text": "Let’s illustrate how it would work for converting a text “Love is a doing word” into a feature vector. Let us have a hash function h that takes a string as input and outputs a non-negative integer, and let the desired dimensionality be 5. By applying the hash function to each word and applying the modulo of 5 to obtain the index of the word, we get:", "words": [{"w": "Let’s", "b": [0.1312, 0.1868, 0.1698, 0.2018]}, {"w": "illustrate", "b": [0.1759, 0.1868, 0.2464, 0.2018]}, {"w": "how", "b": [0.2526, 0.1868, 0.2842, 0.2018]}, {"w": "it", "b": [0.2903, 0.1868, 0.3024, 0.2018]}, {"w": "would", "b": [0.3085, 0.1868, 0.3552, 0.2018]}, {"w": "work", "b": [0.3613, 0.1868, 0.3996, 0.2018]}, {"w": "for", "b": [0.4057, 0.1868, 0.4274, 0.2018]}, {"w": "converting", "b": [0.4335, 0.1868, 0.5154, 0.2018]}, {"w": "a", "b": [0.5216, 0.1868, 0.5306, 0.2018]}, {"w": "text", "b": [0.5367, 0.1868, 0.5684, 0.2018]}, {"w": "“Love", "b": [0.5745, 0.1868, 0.6199, 0.2018]}, {"w": "is", "b": [0.6261, 0.1868, 0.6382, 0.2018]}, {"w": "a", "b": [0.6444, 0.1868, 0.6534, 0.2018]}, {"w": "doing", "b": [0.6595, 0.1868, 0.7028, 0.2018]}, {"w": "word”", "b": [0.7089, 0.1868, 0.7561, 0.2018]}, {"w": "into", "b": [0.7623, 0.1868, 0.7929, 0.2018]}, {"w": "a", "b": [0.799, 0.1868, 0.8081, 0.2018]}, {"w": "feature", "b": [0.8142, 0.1868, 0.8691, 0.2018]}, {"w": "vector.", "b": [0.1308, 0.2048, 0.1841, 0.2197]}, {"w": "Let", "b": [0.1921, 0.2048, 0.2185, 0.2197]}, {"w": "us", "b": [0.2242, 0.2048, 0.2414, 0.2197]}, {"w": "have", "b": [0.2472, 0.2048, 0.2828, 0.2197]}, {"w": "a", "b": [0.2885, 0.2048, 0.2976, 0.2197]}, {"w": "hash", "b": [0.3033, 0.2048, 0.3396, 0.2197]}, {"w": "function", "b": [0.3453, 0.2048, 0.4101, 0.2197]}, {"w": "h", "b": [0.4157, 0.205, 0.4264, 0.22]}, {"w": "that", "b": [0.4321, 0.2048, 0.4652, 0.2197]}, {"w": "takes", "b": [0.471, 0.2048, 0.5113, 0.2197]}, {"w": "a", "b": [0.517, 0.2048, 0.526, 0.2197]}, {"w": "string", "b": [0.5318, 0.2048, 0.5771, 0.2197]}, {"w": "as", "b": [0.5829, 0.2048, 0.599, 0.2197]}, {"w": "input", "b": [0.6048, 0.2048, 0.647, 0.2197]}, {"w": "and", "b": [0.6527, 0.2048, 0.6819, 0.2197]}, {"w": "outputs", "b": [0.6876, 0.2048, 0.748, 0.2197]}, {"w": "a", "b": [0.7537, 0.2048, 0.7628, 0.2197]}, {"w": "non-negative", "b": [0.7685, 0.2048, 0.869, 0.2197]}, {"w": "integer,", "b": [0.1312, 0.2227, 0.1903, 0.2377]}, {"w": "and", "b": [0.1964, 0.2227, 0.2256, 0.2377]}, {"w": "let", "b": [0.2318, 0.2227, 0.2519, 0.2377]}, {"w": "the", "b": [0.2581, 0.2227, 0.2833, 0.2377]}, {"w": "desired", "b": [0.2894, 0.2227, 0.345, 0.2377]}, {"w": "dimensionality", "b": [0.3511, 0.2227, 0.4661, 0.2377]}, {"w": "be", "b": [0.4723, 0.2227, 0.4909, 0.2377]}, {"w": "5.", "b": [0.4969, 0.2227, 0.511, 0.2377]}, {"w": "By", "b": [0.5192, 0.2227, 0.5416, 0.2377]}, {"w": "applying", "b": [0.5477, 0.2227, 0.6158, 0.2377]}, {"w": "the", "b": [0.6219, 0.2227, 0.6471, 0.2377]}, {"w": "hash", "b": [0.6532, 0.2227, 0.6896, 0.2377]}, {"w": "function", "b": [0.6958, 0.2227, 0.7608, 0.2377]}, {"w": "to", "b": [0.7669, 0.2227, 0.783, 0.2377]}, {"w": "each", "b": [0.7892, 0.2227, 0.8239, 0.2377]}, {"w": "word", "b": [0.8301, 0.2227, 0.8689, 0.2377]}, {"w": "and", "b": [0.1312, 0.2406, 0.161, 0.2556]}, {"w": "applying", "b": [0.1671, 0.2406, 0.2363, 0.2556]}, {"w": "the", "b": [0.2425, 0.2406, 0.2681, 0.2556]}, {"w": "modulo", "b": [0.2743, 0.2406, 0.3342, 0.2556]}, {"w": "of", "b": [0.3404, 0.2406, 0.3553, 0.2556]}, {"w": "5", "b": [0.3613, 0.2406, 0.3706, 0.2556]}, {"w": "to", "b": [0.3767, 0.2406, 0.3931, 0.2556]}, {"w": "obtain", "b": [0.3993, 0.2406, 0.4505, 0.2556]}, {"w": "the", "b": [0.4567, 0.2406, 0.4823, 0.2556]}, {"w": "index", "b": [0.4885, 0.2406, 0.5321, 0.2556]}, {"w": "of", "b": [0.5382, 0.2406, 0.5531, 0.2556]}, {"w": "the", "b": [0.5592, 0.2406, 0.5849, 0.2556]}, {"w": "word,", "b": [0.591, 0.2406, 0.6357, 0.2556]}, {"w": "we", "b": [0.6418, 0.2406, 0.6628, 0.2556]}, {"w": "get:", "b": [0.669, 0.2406, 0.6987, 0.2556]}]}, {"id": "b_2", "type": "equation", "text": "h(love) mod 5 = 0", "words": [{"w": "h(love)", "b": [0.4306, 0.2962, 0.4864, 0.3111]}, {"w": "mod", "b": [0.4926, 0.2962, 0.528, 0.3111]}, {"w": "5", "b": [0.5341, 0.2962, 0.5433, 0.3111]}, {"w": "=", "b": [0.5484, 0.2962, 0.5628, 0.3111]}, {"w": "0", "b": [0.5679, 0.2962, 0.5771, 0.3111]}]}, {"id": "b_3", "type": "equation", "text": "h(is) mod 5 = 3", "words": [{"w": "h(is)", "b": [0.4494, 0.3186, 0.4864, 0.3335]}, {"w": "mod", "b": [0.4926, 0.3186, 0.528, 0.3335]}, {"w": "5", "b": [0.5341, 0.3186, 0.5433, 0.3335]}, {"w": "=", "b": [0.5484, 0.3186, 0.5628, 0.3335]}, {"w": "3", "b": [0.5679, 0.3186, 0.5771, 0.3335]}]}, {"id": "b_4", "type": "equation", "text": "h(a) mod 5 = 1", "words": [{"w": "h(a)", "b": [0.4526, 0.341, 0.4864, 0.356]}, {"w": "mod", "b": [0.4926, 0.341, 0.5279, 0.356]}, {"w": "5", "b": [0.5341, 0.341, 0.5433, 0.356]}, {"w": "=", "b": [0.5484, 0.341, 0.5628, 0.356]}, {"w": "1", "b": [0.5679, 0.341, 0.5771, 0.356]}]}, {"id": "b_5", "type": "equation", "text": "h(doing) mod 5 = 3", "words": [{"w": "h(doing)", "b": [0.4177, 0.3635, 0.4865, 0.3784]}, {"w": "mod", "b": [0.4926, 0.3635, 0.528, 0.3784]}, {"w": "5", "b": [0.5341, 0.3635, 0.5433, 0.3784]}, {"w": "=", "b": [0.5484, 0.3635, 0.5628, 0.3784]}, {"w": "3", "b": [0.5679, 0.3635, 0.5771, 0.3784]}]}, {"id": "b_6", "type": "equation", "text": "h(word) mod 5 = 4.", "words": [{"w": "h(word)", "b": [0.4223, 0.3859, 0.4864, 0.4008]}, {"w": "mod", "b": [0.4926, 0.3859, 0.5279, 0.4008]}, {"w": "5", "b": [0.5341, 0.3859, 0.5433, 0.4008]}, {"w": "=", "b": [0.5484, 0.3859, 0.5628, 0.4008]}, {"w": "4.", "b": [0.5679, 0.3859, 0.5823, 0.4011]}]}, {"id": "b_7", "type": "paragraph", "text": "Then we build the feature vector as,", "words": [{"w": "Then", "b": [0.1306, 0.4266, 0.1726, 0.4415]}, {"w": "we", "b": [0.1788, 0.4266, 0.1998, 0.4415]}, {"w": "build", "b": [0.2059, 0.4266, 0.247, 0.4415]}, {"w": "the", "b": [0.2531, 0.4266, 0.2788, 0.4415]}, {"w": "feature", "b": [0.2849, 0.4266, 0.3409, 0.4415]}, {"w": "vector", "b": [0.347, 0.4266, 0.3963, 0.4415]}, {"w": "as,", "b": [0.4024, 0.4266, 0.4241, 0.4415]}]}, {"id": "b_8", "type": "paragraph", "text": "[1, 1, 0, 2, 1].", "words": [{"w": "[1,", "b": [0.4528, 0.4714, 0.4724, 0.4867]}, {"w": "1,", "b": [0.4754, 0.4714, 0.4898, 0.4867]}, {"w": "0,", "b": [0.4929, 0.4714, 0.5072, 0.4867]}, {"w": "2,", "b": [0.5103, 0.4714, 0.5246, 0.4867]}, {"w": "1].", "b": [0.5277, 0.4714, 0.5472, 0.4867]}]}, {"id": "b_9", "type": "paragraph", "text": "Indeed, h(love) mod 5 = 0 means that we have one word in dimension 0 of the feature vector; h(is) mod 5 = 3 and h(doing) mod 5 = 3 means that we have two words in dimension 3 of the feature vector, and so on. As you can see, there is a collision between words “is” and “doing”: they both are represented by dimension 3. The lower the desired dimensionality, the", "words": [{"w": "Indeed,", "b": [0.1312, 0.5071, 0.189, 0.522]}, {"w": "h(love)", "b": [0.1948, 0.5071, 0.2507, 0.522]}, {"w": "mod", "b": [0.2569, 0.5071, 0.2922, 0.522]}, {"w": "5", "b": [0.2984, 0.5071, 0.3076, 0.522]}, {"w": "=", "b": [0.3127, 0.5071, 0.3267, 0.522]}, {"w": "0", "b": [0.3319, 0.5071, 0.3409, 0.522]}, {"w": "means", "b": [0.3466, 0.5071, 0.396, 0.522]}, {"w": "that", "b": [0.4017, 0.5071, 0.4349, 0.522]}, {"w": "we", "b": [0.4406, 0.5071, 0.4612, 0.522]}, {"w": "have", "b": [0.467, 0.5071, 0.5026, 0.522]}, {"w": "one", "b": [0.5083, 0.5071, 0.5355, 0.522]}, {"w": "word", "b": [0.5412, 0.5071, 0.5799, 0.522]}, {"w": "in", "b": [0.5857, 0.5071, 0.6007, 0.522]}, {"w": "dimension", "b": [0.6065, 0.5071, 0.686, 0.522]}, {"w": "0", "b": [0.6916, 0.5071, 0.7006, 0.522]}, {"w": "of", "b": [0.7064, 0.5071, 0.7209, 0.522]}, {"w": "the", "b": [0.7267, 0.5071, 0.7518, 0.522]}, {"w": "feature", "b": [0.7576, 0.5071, 0.8124, 0.522]}, {"w": "vector;", "b": [0.8181, 0.5071, 0.8714, 0.522]}, {"w": "h(is)", "b": [0.1312, 0.525, 0.1683, 0.54]}, {"w": "mod", "b": [0.1744, 0.525, 0.2098, 0.54]}, {"w": "5", "b": [0.2159, 0.525, 0.2251, 0.54]}, {"w": "=", "b": [0.2303, 0.525, 0.245, 0.54]}, {"w": "3", "b": [0.2502, 0.525, 0.2596, 0.54]}, {"w": "and", "b": [0.2658, 0.525, 0.2961, 0.54]}, {"w": "h(doing)", "b": [0.3023, 0.525, 0.371, 0.54]}, {"w": "mod", "b": [0.3772, 0.525, 0.4125, 0.54]}, {"w": "5", "b": [0.4187, 0.525, 0.4279, 0.54]}, {"w": "=", "b": [0.4331, 0.525, 0.4477, 0.54]}, {"w": "3", "b": [0.4529, 0.525, 0.4624, 0.54]}, {"w": "means", "b": [0.4686, 0.525, 0.5199, 0.54]}, {"w": "that", "b": [0.5261, 0.525, 0.5606, 0.54]}, {"w": "we", "b": [0.5668, 0.525, 0.5883, 0.54]}, {"w": "have", "b": [0.5945, 0.525, 0.6316, 0.54]}, {"w": "two", "b": [0.6378, 0.525, 0.6671, 0.54]}, {"w": "words", "b": [0.6733, 0.525, 0.7211, 0.54]}, {"w": "in", "b": [0.7273, 0.525, 0.743, 0.54]}, {"w": "dimension", "b": [0.7492, 0.525, 0.8319, 0.54]}, {"w": "3", "b": [0.838, 0.525, 0.8474, 0.54]}, {"w": "of", "b": [0.8536, 0.525, 0.8688, 0.54]}, {"w": "the", "b": [0.1312, 0.543, 0.1573, 0.5579]}, {"w": "feature", "b": [0.1634, 0.543, 0.2204, 0.5579]}, {"w": "vector,", "b": [0.2265, 0.543, 0.2818, 0.5579]}, {"w": "and", "b": [0.288, 0.543, 0.3182, 0.5579]}, {"w": "so", "b": [0.3244, 0.543, 0.3412, 0.5579]}, {"w": "on.", "b": [0.3473, 0.543, 0.3723, 0.5579]}, {"w": "As", "b": [0.3805, 0.543, 0.402, 0.5579]}, {"w": "you", "b": [0.4081, 0.543, 0.4373, 0.5579]}, {"w": "can", "b": [0.4435, 0.543, 0.4716, 0.5579]}, {"w": "see,", "b": [0.4778, 0.543, 0.5071, 0.5579]}, {"w": "there", "b": [0.5132, 0.543, 0.555, 0.5579]}, {"w": "is", "b": [0.5612, 0.543, 0.5738, 0.5579]}, {"w": "a", "b": [0.5799, 0.543, 0.5893, 0.5579]}, {"w": "collision", "b": [0.5954, 0.5433, 0.6698, 0.5582]}, {"w": "between", "b": [0.676, 0.543, 0.7423, 0.5579]}, {"w": "words", "b": [0.7484, 0.543, 0.796, 0.5579]}, {"w": "“is”", "b": [0.8021, 0.543, 0.8325, 0.5579]}, {"w": "and", "b": [0.8386, 0.543, 0.8689, 0.5579]}, {"w": "“doing”:", "b": [0.1286, 0.5609, 0.1939, 0.5759]}, {"w": "they", "b": [0.202, 0.5609, 0.2366, 0.5759]}, {"w": "both", "b": [0.2425, 0.5609, 0.2792, 0.5759]}, {"w": "are", "b": [0.285, 0.5609, 0.3092, 0.5759]}, {"w": "represented", "b": [0.3151, 0.5609, 0.4053, 0.5759]}, {"w": "by", "b": [0.4111, 0.5609, 0.4302, 0.5759]}, {"w": "dimension", "b": [0.4361, 0.5609, 0.5155, 0.5759]}, {"w": "3.", "b": [0.5212, 0.5609, 0.5353, 0.5759]}, {"w": "The", "b": [0.5434, 0.5609, 0.5745, 0.5759]}, {"w": "lower", "b": [0.5804, 0.5609, 0.6216, 0.5759]}, {"w": "the", "b": [0.6275, 0.5609, 0.6526, 0.5759]}, {"w": "desired", "b": [0.6584, 0.5609, 0.7139, 0.5759]}, {"w": "dimensionality,", "b": [0.7198, 0.5609, 0.8379, 0.5759]}, {"w": "the", "b": [0.8438, 0.5609, 0.8689, 0.5759]}]}, {"id": "b_10", "type": "paragraph", "text": "higher are the chances of collision. This is the trade-offbetween speed and quality of learning.", "words": [{"w": "higher", "b": [0.1312, 0.5789, 0.1805, 0.5938]}, {"w": "are", "b": [0.1861, 0.5789, 0.2103, 0.5938]}, {"w": "the", "b": [0.2158, 0.5789, 0.241, 0.5938]}, {"w": "chances", "b": [0.2465, 0.5789, 0.3065, 0.5938]}, {"w": "of", "b": [0.312, 0.5789, 0.3266, 0.5938]}, {"w": "collision.", "b": [0.3322, 0.5789, 0.4006, 0.5938]}, {"w": "This", "b": [0.4086, 0.5789, 0.4439, 0.5938]}, {"w": "is", "b": [0.4495, 0.5789, 0.4616, 0.5938]}, {"w": "the", "b": [0.4672, 0.5789, 0.4924, 0.5938]}, {"w": "trade-offbetween", "b": [0.4979, 0.5789, 0.6342, 0.5938]}, {"w": "speed", "b": [0.6397, 0.5789, 0.6836, 0.5938]}, {"w": "and", "b": [0.6892, 0.5789, 0.7183, 0.5938]}, {"w": "quality", "b": [0.7239, 0.5789, 0.7786, 0.5938]}, {"w": "of", "b": [0.7842, 0.5789, 0.7988, 0.5938]}, {"w": "learning.", "b": [0.8043, 0.5789, 0.8727, 0.5938]}]}, {"id": "b_11", "type": "paragraph", "text": "Commonly used hash functions are MurmurHash3, Jenkins, CityHash, and MD5.", "words": [{"w": "Commonly", "b": [0.1312, 0.6058, 0.2189, 0.6207]}, {"w": "used", "b": [0.225, 0.6058, 0.261, 0.6207]}, {"w": "hash", "b": [0.2672, 0.6058, 0.3042, 0.6207]}, {"w": "functions", "b": [0.3104, 0.6058, 0.3838, 0.6207]}, {"w": "are", "b": [0.3899, 0.6058, 0.4146, 0.6207]}, {"w": "MurmurHash3,", "b": [0.4206, 0.6058, 0.5617, 0.621]}, {"w": "Jenkins,", "b": [0.5679, 0.6058, 0.6427, 0.621]}, {"w": "CityHash,", "b": [0.6489, 0.6058, 0.7412, 0.621]}, {"w": "and", "b": [0.7474, 0.6058, 0.7771, 0.6207]}, {"w": "MD5.", "b": [0.7832, 0.6058, 0.8354, 0.621]}]}, {"id": "b_12", "type": "paragraph", "text": "4.2.5 Topic Modeling", "words": [{"w": "4.2.5", "b": [0.1312, 0.6539, 0.1749, 0.6688]}, {"w": "Topic", "b": [0.1961, 0.6539, 0.2468, 0.6688]}, {"w": "Modeling", "b": [0.2539, 0.6539, 0.3409, 0.6688]}]}, {"id": "b_13", "type": "paragraph", "text": "Topic modeling is a family of techniques that uses unlabeled data, typically in the form of natural language text documents. The model learns to represent a document as a vector of topics. For example, in a collection of news articles, the five major topics could be “sports,” “politics,” “entertainment,” “finance,” and “technology”. Then, each document could be", "words": [{"w": "Topic", "b": [0.1306, 0.6901, 0.1759, 0.7051]}, {"w": "modeling", "b": [0.182, 0.6901, 0.2564, 0.7051]}, {"w": "is", "b": [0.2625, 0.6901, 0.2752, 0.7051]}, {"w": "a", "b": [0.2813, 0.6901, 0.2907, 0.7051]}, {"w": "family", "b": [0.2968, 0.6901, 0.3478, 0.7051]}, {"w": "of", "b": [0.354, 0.6901, 0.369, 0.7051]}, {"w": "techniques", "b": [0.3752, 0.6901, 0.4607, 0.7051]}, {"w": "that", "b": [0.4668, 0.6901, 0.5012, 0.7051]}, {"w": "uses", "b": [0.5073, 0.6901, 0.5408, 0.7051]}, {"w": "unlabeled", "b": [0.547, 0.6901, 0.6256, 0.7051]}, {"w": "data,", "b": [0.6317, 0.6901, 0.6733, 0.7051]}, {"w": "typically", "b": [0.6795, 0.6901, 0.7498, 0.7051]}, {"w": "in", "b": [0.7559, 0.6901, 0.7715, 0.7051]}, {"w": "the", "b": [0.7777, 0.6901, 0.8037, 0.7051]}, {"w": "form", "b": [0.8098, 0.6901, 0.8479, 0.7051]}, {"w": "of", "b": [0.854, 0.6901, 0.8691, 0.7051]}, {"w": "natural", "b": [0.1312, 0.7081, 0.1898, 0.723]}, {"w": "language", "b": [0.196, 0.7081, 0.2668, 0.723]}, {"w": "text", "b": [0.273, 0.7081, 0.3053, 0.723]}, {"w": "documents.", "b": [0.3115, 0.7081, 0.4029, 0.723]}, {"w": "The", "b": [0.4112, 0.7081, 0.443, 0.723]}, {"w": "model", "b": [0.4492, 0.7081, 0.4979, 0.723]}, {"w": "learns", "b": [0.5041, 0.7081, 0.5515, 0.723]}, {"w": "to", "b": [0.5576, 0.7081, 0.5741, 0.723]}, {"w": "represent", "b": [0.5802, 0.7081, 0.6539, 0.723]}, {"w": "a", "b": [0.66, 0.7081, 0.6693, 0.723]}, {"w": "document", "b": [0.6754, 0.7081, 0.7544, 0.723]}, {"w": "as", "b": [0.7606, 0.7081, 0.7771, 0.723]}, {"w": "a", "b": [0.7833, 0.7081, 0.7925, 0.723]}, {"w": "vector", "b": [0.7987, 0.7081, 0.848, 0.723]}, {"w": "of", "b": [0.8542, 0.7081, 0.8691, 0.723]}, {"w": "topics.", "b": [0.1312, 0.726, 0.1835, 0.741]}, {"w": "For", "b": [0.1917, 0.726, 0.2186, 0.741]}, {"w": "example,", "b": [0.2247, 0.726, 0.2957, 0.741]}, {"w": "in", "b": [0.3019, 0.726, 0.3172, 0.741]}, {"w": "a", "b": [0.3234, 0.726, 0.3326, 0.741]}, {"w": "collection", "b": [0.3387, 0.726, 0.4144, 0.741]}, {"w": "of", "b": [0.4205, 0.726, 0.4353, 0.741]}, {"w": "news", "b": [0.4415, 0.726, 0.4804, 0.741]}, {"w": "articles,", "b": [0.4866, 0.726, 0.5491, 0.741]}, {"w": "the", "b": [0.5552, 0.726, 0.5808, 0.741]}, {"w": "five", "b": [0.5869, 0.726, 0.6146, 0.741]}, {"w": "major", "b": [0.6207, 0.726, 0.6677, 0.741]}, {"w": "topics", "b": [0.6739, 0.726, 0.721, 0.741]}, {"w": "could", "b": [0.7272, 0.726, 0.7701, 0.741]}, {"w": "be", "b": [0.7763, 0.726, 0.7952, 0.741]}, {"w": "“sports,”", "b": [0.8013, 0.726, 0.8726, 0.741]}, {"w": "“politics,”", "b": [0.1286, 0.744, 0.2108, 0.7589]}, {"w": "“entertainment,”", "b": [0.2186, 0.744, 0.3567, 0.7589]}, {"w": "“finance,”", "b": [0.3645, 0.744, 0.445, 0.7589]}, {"w": "and", "b": [0.4528, 0.744, 0.4831, 0.7589]}, {"w": "“technology”.", "b": [0.4906, 0.744, 0.5989, 0.7589]}, {"w": "Then,", "b": [0.611, 0.744, 0.6591, 0.7589]}, {"w": "each", "b": [0.6669, 0.744, 0.7029, 0.7589]}, {"w": "document", "b": [0.7104, 0.744, 0.7909, 0.7589]}, {"w": "could", "b": [0.7984, 0.744, 0.8423, 0.7589]}, {"w": "be", "b": [0.8498, 0.744, 0.8691, 0.7589]}]}, {"id": "b_14", "type": "equation", "text": "represented as a five-dimensional feature vector, one dimension per topic:", "words": [{"w": "represented", "b": [0.1312, 0.7619, 0.2233, 0.7769]}, {"w": "as", "b": [0.2294, 0.7619, 0.2459, 0.7769]}, {"w": "a", "b": [0.2521, 0.7619, 0.2613, 0.7769]}, {"w": "five-dimensional", "b": [0.2674, 0.7619, 0.3968, 0.7769]}, {"w": "feature", "b": [0.4029, 0.7619, 0.4589, 0.7769]}, {"w": "vector,", "b": [0.465, 0.7619, 0.5194, 0.7769]}, {"w": "one", "b": [0.5255, 0.7619, 0.5532, 0.7769]}, {"w": "dimension", "b": [0.5594, 0.7619, 0.6405, 0.7769]}, {"w": "per", "b": [0.6467, 0.7619, 0.6729, 0.7769]}, {"w": "topic:", "b": [0.679, 0.7619, 0.7242, 0.7769]}]}, {"id": "b_15", "type": "paragraph", "text": "[0.04, 0.5, 0.1, 0.3, 0.06]", "words": [{"w": "[0.04,", "b": [0.4103, 0.8068, 0.4534, 0.822]}, {"w": "0.5,", "b": [0.4565, 0.8068, 0.4852, 0.822]}, {"w": "0.1,", "b": [0.4883, 0.8068, 0.517, 0.822]}, {"w": "0.3,", "b": [0.52, 0.8068, 0.5487, 0.822]}, {"w": "0.06]", "b": [0.5518, 0.8068, 0.5897, 0.822]}]}, {"id": "b_16", "type": "paragraph", "text": "The above feature vector represents a document that mixes two major topics: politics (with a weight of 0.5) and finance (with a weight of 0.3). Topic modeling algorithms, such as Latent", "words": [{"w": "The", "b": [0.1306, 0.8424, 0.1617, 0.8574]}, {"w": "above", "b": [0.1674, 0.8424, 0.2126, 0.8574]}, {"w": "feature", "b": [0.2183, 0.8424, 0.2731, 0.8574]}, {"w": "vector", "b": [0.2788, 0.8424, 0.327, 0.8574]}, {"w": "represents", "b": [0.3327, 0.8424, 0.4119, 0.8574]}, {"w": "a", "b": [0.4176, 0.8424, 0.4266, 0.8574]}, {"w": "document", "b": [0.4323, 0.8424, 0.5097, 0.8574]}, {"w": "that", "b": [0.5153, 0.8424, 0.5485, 0.8574]}, {"w": "mixes", "b": [0.5541, 0.8424, 0.599, 0.8574]}, {"w": "two", "b": [0.6046, 0.8424, 0.6327, 0.8574]}, {"w": "major", "b": [0.6384, 0.8424, 0.6847, 0.8574]}, {"w": "topics:", "b": [0.6903, 0.8424, 0.7417, 0.8574]}, {"w": "politics", "b": [0.7496, 0.8424, 0.8065, 0.8574]}, {"w": "(with", "b": [0.8122, 0.8424, 0.8544, 0.8574]}, {"w": "a", "b": [0.8601, 0.8424, 0.8691, 0.8574]}, {"w": "weight", "b": [0.1306, 0.8604, 0.1818, 0.8753]}, {"w": "of", "b": [0.1876, 0.8604, 0.2022, 0.8753]}, {"w": "0.5)", "b": [0.208, 0.8604, 0.2383, 0.8756]}, {"w": "and", "b": [0.2441, 0.8604, 0.2733, 0.8753]}, {"w": "finance", "b": [0.2791, 0.8604, 0.3344, 0.8753]}, {"w": "(with", "b": [0.3403, 0.8604, 0.3825, 0.8753]}, {"w": "a", "b": [0.3883, 0.8604, 0.3974, 0.8753]}, {"w": "weight", "b": [0.4032, 0.8604, 0.4544, 0.8753]}, {"w": "of", "b": [0.4603, 0.8604, 0.4749, 0.8753]}, {"w": "0.3).", "b": [0.4806, 0.8604, 0.5159, 0.8756]}, {"w": "Topic", "b": [0.524, 0.8604, 0.5677, 0.8753]}, {"w": "modeling", "b": [0.5735, 0.8604, 0.6454, 0.8753]}, {"w": "algorithms,", "b": [0.6512, 0.8604, 0.7398, 0.8753]}, {"w": "such", "b": [0.7457, 0.8604, 0.7805, 0.8753]}, {"w": "as", "b": [0.7864, 0.8604, 0.8025, 0.8753]}, {"w": "Latent", "b": [0.8083, 0.8607, 0.8688, 0.8756]}]}, {"id": "b_17", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "12", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 102, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Semantic Analysis (LSA) and Latent Dirichlet Allocation (LDA), learn by analyzing the unlabeled documents. These two algorithms produce similar outputs, but are based on different mathematical models. LSA uses singular value decomposition (SVD) of the word-to-document matrix (constructed using a binary bag-of-words or TF-IDF). LDA uses a hierarchical Bayesian model, in which each document is a mixture of several topics, and each word’s presence is attributable to one of the topics.", "words": [{"w": "Semantic", "b": [0.1312, 0.0884, 0.2155, 0.1034]}, {"w": "Analysis", "b": [0.2226, 0.0884, 0.3005, 0.1034]}, {"w": "(LSA)", "b": [0.3066, 0.0881, 0.3566, 0.1031]}, {"w": "and", "b": [0.3627, 0.0881, 0.3925, 0.1031]}, {"w": "Latent", "b": [0.3986, 0.0884, 0.4591, 0.1034]}, {"w": "Dirichlet", "b": [0.4661, 0.0884, 0.5475, 0.1034]}, {"w": "Allocation", "b": [0.5545, 0.0884, 0.6499, 0.1034]}, {"w": "(LDA),", "b": [0.656, 0.0881, 0.7145, 0.1031]}, {"w": "learn", "b": [0.7206, 0.0881, 0.7607, 0.1031]}, {"w": "by", "b": [0.7668, 0.0881, 0.7863, 0.1031]}, {"w": "analyzing", "b": [0.7925, 0.0881, 0.8689, 0.1031]}, {"w": "the", "b": [0.1312, 0.106, 0.157, 0.121]}, {"w": "unlabeled", "b": [0.1632, 0.106, 0.2411, 0.121]}, {"w": "documents.", "b": [0.2472, 0.106, 0.3391, 0.121]}, {"w": "These", "b": [0.3473, 0.106, 0.3949, 0.121]}, {"w": "two", "b": [0.401, 0.106, 0.4299, 0.121]}, {"w": "algorithms", "b": [0.4361, 0.106, 0.5218, 0.121]}, {"w": "produce", "b": [0.528, 0.106, 0.5925, 0.121]}, {"w": "similar", "b": [0.5986, 0.106, 0.6535, 0.121]}, {"w": "outputs,", "b": [0.6596, 0.106, 0.7268, 0.121]}, {"w": "but", "b": [0.7329, 0.106, 0.7608, 0.121]}, {"w": "are", "b": [0.7669, 0.106, 0.7917, 0.121]}, {"w": "based", "b": [0.7979, 0.106, 0.8434, 0.121]}, {"w": "on", "b": [0.8495, 0.106, 0.8691, 0.121]}, {"w": "different", "b": [0.1312, 0.124, 0.1993, 0.1389]}, {"w": "mathematical", "b": [0.2063, 0.124, 0.3182, 0.1389]}, {"w": "models.", "b": [0.3252, 0.124, 0.3876, 0.1389]}, {"w": "LSA", "b": [0.3984, 0.124, 0.4348, 0.1389]}, {"w": "uses", "b": [0.4418, 0.124, 0.4755, 0.1389]}, {"w": "singular", "b": [0.4824, 0.1243, 0.5558, 0.1393]}, {"w": "value", "b": [0.5639, 0.1243, 0.6116, 0.1393]}, {"w": "decomposition", "b": [0.6197, 0.1243, 0.7528, 0.1393]}, {"w": "(SVD)", "b": [0.7598, 0.124, 0.8134, 0.1389]}, {"w": "of", "b": [0.8205, 0.124, 0.8356, 0.1389]}, {"w": "the", "b": [0.8426, 0.124, 0.8688, 0.1389]}, {"w": "word-to-document", "b": [0.1306, 0.1419, 0.2807, 0.1569]}, {"w": "matrix", "b": [0.288, 0.1419, 0.343, 0.1569]}, {"w": "(constructed", "b": [0.3503, 0.1419, 0.4529, 0.1569]}, {"w": "using", "b": [0.4603, 0.1419, 0.5032, 0.1569]}, {"w": "a", "b": [0.5106, 0.1419, 0.52, 0.1569]}, {"w": "binary", "b": [0.5273, 0.1419, 0.5802, 0.1569]}, {"w": "bag-of-words", "b": [0.5874, 0.1422, 0.7056, 0.1572]}, {"w": "or", "b": [0.7129, 0.1419, 0.7297, 0.1569]}, {"w": "TF-IDF).", "b": [0.737, 0.1419, 0.8224, 0.1572]}, {"w": "LDA", "b": [0.8297, 0.1419, 0.8695, 0.1569]}, {"w": "uses", "b": [0.1312, 0.1599, 0.1636, 0.1748]}, {"w": "a", "b": [0.1691, 0.1599, 0.1782, 0.1748]}, {"w": "hierarchical", "b": [0.1837, 0.1599, 0.2747, 0.1748]}, {"w": "Bayesian", "b": [0.2802, 0.1602, 0.3618, 0.1751]}, {"w": "model,", "b": [0.3681, 0.1599, 0.4294, 0.1751]}, {"w": "in", "b": [0.4351, 0.1599, 0.4501, 0.1748]}, {"w": "which", "b": [0.4557, 0.1599, 0.5014, 0.1748]}, {"w": "each", "b": [0.5069, 0.1599, 0.5415, 0.1748]}, {"w": "document", "b": [0.547, 0.1599, 0.6244, 0.1748]}, {"w": "is", "b": [0.6299, 0.1599, 0.6421, 0.1748]}, {"w": "a", "b": [0.6476, 0.1599, 0.6567, 0.1748]}, {"w": "mixture", "b": [0.6623, 0.1602, 0.7355, 0.1751]}, {"w": "of", "b": [0.741, 0.1599, 0.7556, 0.1748]}, {"w": "several", "b": [0.7611, 0.1599, 0.8145, 0.1748]}, {"w": "topics,", "b": [0.82, 0.1599, 0.8714, 0.1748]}, {"w": "and", "b": [0.1312, 0.1778, 0.161, 0.1928]}, {"w": "each", "b": [0.1671, 0.1778, 0.2025, 0.1928]}, {"w": "word’s", "b": [0.2087, 0.1778, 0.2606, 0.1928]}, {"w": "presence", "b": [0.2667, 0.1778, 0.3346, 0.1928]}, {"w": "is", "b": [0.3408, 0.1778, 0.3532, 0.1928]}, {"w": "attributable", "b": [0.3593, 0.1778, 0.4558, 0.1928]}, {"w": "to", "b": [0.4619, 0.1778, 0.4783, 0.1928]}, {"w": "one", "b": [0.4845, 0.1778, 0.5122, 0.1928]}, {"w": "of", "b": [0.5183, 0.1778, 0.5332, 0.1928]}, {"w": "the", "b": [0.5393, 0.1778, 0.565, 0.1928]}, {"w": "topics.", "b": [0.5711, 0.1778, 0.6235, 0.1928]}]}, {"id": "b_1", "type": "paragraph", "text": "Let us illustrate how it works in Python and R. Below is a Python code for LSA:", "words": [{"w": "Let", "b": [0.1312, 0.2048, 0.1582, 0.2197]}, {"w": "us", "b": [0.1643, 0.2048, 0.1818, 0.2197]}, {"w": "illustrate", "b": [0.188, 0.2048, 0.2599, 0.2197]}, {"w": "how", "b": [0.2661, 0.2048, 0.2984, 0.2197]}, {"w": "it", "b": [0.3045, 0.2048, 0.3168, 0.2197]}, {"w": "works", "b": [0.323, 0.2048, 0.3693, 0.2197]}, {"w": "in", "b": [0.3754, 0.2048, 0.3908, 0.2197]}, {"w": "Python", "b": [0.397, 0.2048, 0.4562, 0.2197]}, {"w": "and", "b": [0.4623, 0.2048, 0.4921, 0.2197]}, {"w": "R.", "b": [0.4982, 0.2048, 0.5169, 0.2197]}, {"w": "Below", "b": [0.5231, 0.2048, 0.5715, 0.2197]}, {"w": "is", "b": [0.5776, 0.2048, 0.5901, 0.2197]}, {"w": "a", "b": [0.5962, 0.2048, 0.6055, 0.2197]}, {"w": "Python", "b": [0.6116, 0.2048, 0.6708, 0.2197]}, {"w": "code", "b": [0.677, 0.2048, 0.7134, 0.2197]}, {"w": "for", "b": [0.7195, 0.2048, 0.7416, 0.2197]}, {"w": "LSA:", "b": [0.7478, 0.2048, 0.7885, 0.2197]}]}, {"id": "b_2", "type": "equation", "text": "1 from sklearn.feature_extraction.text import TfidfVectorizer", "words": [{"w": "1", "b": [0.1028, 0.2378, 0.1091, 0.2453]}, {"w": "from", "b": [0.1312, 0.2327, 0.17, 0.2477]}, {"w": "sklearn.feature_extraction.text", "b": [0.1797, 0.2327, 0.4799, 0.2477]}, {"w": "import", "b": [0.4896, 0.2327, 0.5477, 0.2477]}, {"w": "TfidfVectorizer", "b": [0.5574, 0.2327, 0.7027, 0.2477]}]}, {"id": "b_3", "type": "paragraph", "text": "2 from sklearn.decomposition import TruncatedSVD", "words": [{"w": "2", "b": [0.1028, 0.2557, 0.1091, 0.2632]}, {"w": "from", "b": [0.1312, 0.2507, 0.17, 0.2656]}, {"w": "sklearn.decomposition", "b": [0.1797, 0.2507, 0.3831, 0.2656]}, {"w": "import", "b": [0.3928, 0.2507, 0.4509, 0.2656]}, {"w": "TruncatedSVD", "b": [0.4606, 0.2507, 0.5768, 0.2656]}]}, {"id": "b_5", "type": "paragraph", "text": "4 class LSA():", "words": [{"w": "4", "b": [0.1028, 0.2916, 0.1091, 0.2991]}, {"w": "class", "b": [0.1312, 0.2865, 0.1797, 0.3015]}, {"w": "LSA():", "b": [0.1893, 0.2866, 0.2475, 0.3015]}]}, {"id": "b_6", "type": "equation", "text": "5 def __init__(self, docs):", "words": [{"w": "5", "b": [0.1028, 0.3096, 0.1091, 0.3171]}, {"w": "def", "b": [0.17, 0.3044, 0.199, 0.3194]}, {"w": "__init__(self,", "b": [0.2087, 0.3045, 0.3443, 0.3195]}, {"w": "docs):", "b": [0.354, 0.3045, 0.4121, 0.3195]}]}, {"id": "b_7", "type": "equation", "text": "6 # Convert documents to TF-IDF vectors", "words": [{"w": "6", "b": [0.1028, 0.3275, 0.1091, 0.335]}, {"w": "#", "b": [0.2087, 0.3225, 0.2184, 0.3374]}, {"w": "Convert", "b": [0.2281, 0.3225, 0.2959, 0.3374]}, {"w": "documents", "b": [0.3056, 0.3225, 0.3928, 0.3374]}, {"w": "to", "b": [0.4024, 0.3225, 0.4218, 0.3374]}, {"w": "TF-IDF", "b": [0.4315, 0.3225, 0.4896, 0.3374]}, {"w": "vectors", "b": [0.4993, 0.3225, 0.5671, 0.3374]}]}, {"id": "b_8", "type": "equation", "text": "7 self.TF_IDF = TfidfVectorizer()", "words": [{"w": "7", "b": [0.1028, 0.3455, 0.1091, 0.353]}, {"w": "self.TF_IDF", "b": [0.2087, 0.3404, 0.3153, 0.3554]}, {"w": "=", "b": [0.325, 0.3404, 0.3346, 0.3554]}, {"w": "TfidfVectorizer()", "b": [0.3443, 0.3404, 0.509, 0.3554]}]}, {"id": "b_9", "type": "equation", "text": "8 self.TF_IDF.fit(docs)", "words": [{"w": "8", "b": [0.1028, 0.3634, 0.1091, 0.3709]}, {"w": "self.TF_IDF.fit(docs)", "b": [0.2087, 0.3584, 0.4121, 0.3733]}]}, {"id": "b_10", "type": "equation", "text": "9 vectors = self.TF_IDF.transform(docs)", "words": [{"w": "9", "b": [0.1028, 0.3814, 0.1091, 0.3889]}, {"w": "vectors", "b": [0.2087, 0.3763, 0.2765, 0.3913]}, {"w": "=", "b": [0.2862, 0.3763, 0.2959, 0.3913]}, {"w": "self.TF_IDF.transform(docs)", "b": [0.3056, 0.3763, 0.5671, 0.3913]}]}, {"id": "b_12", "type": "paragraph", "text": "11 # Build the LSA topic model", "words": [{"w": "11", "b": [0.0965, 0.4173, 0.1091, 0.4247]}, {"w": "#", "b": [0.2087, 0.4122, 0.2184, 0.4272]}, {"w": "Build", "b": [0.2281, 0.4122, 0.2765, 0.4272]}, {"w": "the", "b": [0.2862, 0.4122, 0.3153, 0.4272]}, {"w": "LSA", "b": [0.325, 0.4122, 0.354, 0.4272]}, {"w": "topic", "b": [0.3637, 0.4122, 0.4121, 0.4272]}, {"w": "model", "b": [0.4218, 0.4122, 0.4702, 0.4272]}]}, {"id": "b_13", "type": "equation", "text": "12 self.LSA_model = TruncatedSVD(n_components=50)", "words": [{"w": "12", "b": [0.0965, 0.4352, 0.1091, 0.4427]}, {"w": "self.LSA_model", "b": [0.2087, 0.4301, 0.3443, 0.4451]}, {"w": "=", "b": [0.354, 0.4301, 0.3637, 0.4451]}, {"w": "TruncatedSVD(n_components=50)", "b": [0.3734, 0.4301, 0.6543, 0.4451]}]}, {"id": "b_14", "type": "equation", "text": "13 self.LSA_model.fit(vectors)", "words": [{"w": "13", "b": [0.0965, 0.4532, 0.1091, 0.4606]}, {"w": "self.LSA_model.fit(vectors)", "b": [0.2087, 0.4481, 0.4702, 0.463]}]}, {"id": "b_15", "type": "paragraph", "text": "14 return", "words": [{"w": "14", "b": [0.0965, 0.4711, 0.1091, 0.4786]}, {"w": "return", "b": [0.2087, 0.466, 0.2668, 0.4809]}]}, {"id": "b_17", "type": "equation", "text": "16 def get_features(self, new_docs):", "words": [{"w": "16", "b": [0.0965, 0.507, 0.1091, 0.5145]}, {"w": "def", "b": [0.17, 0.5019, 0.199, 0.5168]}, {"w": "get_features(self,", "b": [0.2087, 0.5019, 0.3831, 0.5169]}, {"w": "new_docs):", "b": [0.3928, 0.5019, 0.4896, 0.5169]}]}, {"id": "b_18", "type": "equation", "text": "17 # Get topic-based features for new documents", "words": [{"w": "17", "b": [0.0965, 0.525, 0.1091, 0.5324]}, {"w": "#", "b": [0.2087, 0.5199, 0.2184, 0.5348]}, {"w": "Get", "b": [0.2281, 0.5199, 0.2571, 0.5348]}, {"w": "topic-based", "b": [0.2668, 0.5199, 0.3734, 0.5348]}, {"w": "features", "b": [0.3831, 0.5199, 0.4606, 0.5348]}, {"w": "for", "b": [0.4702, 0.5199, 0.4993, 0.5348]}, {"w": "new", "b": [0.509, 0.5199, 0.538, 0.5348]}, {"w": "documents", "b": [0.5477, 0.5199, 0.6349, 0.5348]}]}, {"id": "b_19", "type": "equation", "text": "18 new_vectors = self.TF_IDF.transform(new_docs)", "words": [{"w": "18", "b": [0.0965, 0.5429, 0.1091, 0.5504]}, {"w": "new_vectors", "b": [0.2087, 0.5378, 0.3153, 0.5528]}, {"w": "=", "b": [0.325, 0.5378, 0.3346, 0.5528]}, {"w": "self.TF_IDF.transform(new_docs)", "b": [0.3443, 0.5378, 0.6446, 0.5528]}]}, {"id": "b_20", "type": "equation", "text": "19 return self.LSA_model.transform(new_vectors)", "words": [{"w": "19", "b": [0.0965, 0.5608, 0.1091, 0.5683]}, {"w": "return", "b": [0.2087, 0.5557, 0.2668, 0.5707]}, {"w": "self.LSA_model.transform(new_vectors)", "b": [0.2765, 0.5558, 0.6349, 0.5707]}]}, {"id": "b_22", "type": "paragraph", "text": "21 # Later, in production, instantiate LSA model", "words": [{"w": "21", "b": [0.0965, 0.5967, 0.1091, 0.6042]}, {"w": "#", "b": [0.1312, 0.5917, 0.1409, 0.6066]}, {"w": "Later,", "b": [0.1506, 0.5917, 0.2087, 0.6066]}, {"w": "in", "b": [0.2184, 0.5917, 0.2378, 0.6066]}, {"w": "production,", "b": [0.2475, 0.5917, 0.354, 0.6066]}, {"w": "instantiate", "b": [0.3637, 0.5917, 0.4702, 0.6066]}, {"w": "LSA", "b": [0.4799, 0.5917, 0.509, 0.6066]}, {"w": "model", "b": [0.5187, 0.5917, 0.5671, 0.6066]}]}, {"id": "b_23", "type": "equation", "text": "22 docs = [\"This is a text.\", \"This another one.\"]", "words": [{"w": "22", "b": [0.0965, 0.6147, 0.1091, 0.6222]}, {"w": "docs", "b": [0.1312, 0.6096, 0.17, 0.6246]}, {"w": "=", "b": [0.1797, 0.6096, 0.1893, 0.6246]}, {"w": "[\"This", "b": [0.199, 0.6096, 0.2571, 0.6246]}, {"w": "is", "b": [0.2668, 0.6096, 0.2862, 0.6246]}, {"w": "a", "b": [0.2959, 0.6096, 0.3056, 0.6246]}, {"w": "text.\",", "b": [0.3153, 0.6096, 0.3831, 0.6246]}, {"w": "\"This", "b": [0.3928, 0.6096, 0.4412, 0.6246]}, {"w": "another", "b": [0.4509, 0.6096, 0.5187, 0.6246]}, {"w": "one.\"]", "b": [0.5284, 0.6096, 0.5865, 0.6246]}]}, {"id": "b_24", "type": "equation", "text": "23 LSA_featurizer = LSA(docs)", "words": [{"w": "23", "b": [0.0965, 0.6326, 0.1091, 0.6401]}, {"w": "LSA_featurizer", "b": [0.1312, 0.6276, 0.2668, 0.6425]}, {"w": "=", "b": [0.2765, 0.6276, 0.2862, 0.6425]}, {"w": "LSA(docs)", "b": [0.2959, 0.6276, 0.3831, 0.6425]}]}, {"id": "b_26", "type": "equation", "text": "25 # Get topic-based features for new_docs", "words": [{"w": "25", "b": [0.0965, 0.6685, 0.1091, 0.676]}, {"w": "#", "b": [0.1312, 0.6635, 0.1409, 0.6784]}, {"w": "Get", "b": [0.1506, 0.6635, 0.1797, 0.6784]}, {"w": "topic-based", "b": [0.1893, 0.6635, 0.2959, 0.6784]}, {"w": "features", "b": [0.3056, 0.6635, 0.3831, 0.6784]}, {"w": "for", "b": [0.3928, 0.6635, 0.4218, 0.6784]}, {"w": "new_docs", "b": [0.4315, 0.6635, 0.509, 0.6784]}]}, {"id": "b_27", "type": "equation", "text": "26 new_docs = [\"This is a third text.\", \"This is a fourth one.\"]", "words": [{"w": "26", "b": [0.0965, 0.6865, 0.1091, 0.694]}, {"w": "new_docs", "b": [0.1312, 0.6814, 0.2087, 0.6964]}, {"w": "=", "b": [0.2184, 0.6814, 0.2281, 0.6964]}, {"w": "[\"This", "b": [0.2378, 0.6814, 0.2959, 0.6964]}, {"w": "is", "b": [0.3056, 0.6814, 0.325, 0.6964]}, {"w": "a", "b": [0.3346, 0.6814, 0.3443, 0.6964]}, {"w": "third", "b": [0.354, 0.6814, 0.4024, 0.6964]}, {"w": "text.\",", "b": [0.4121, 0.6814, 0.4799, 0.6964]}, {"w": "\"This", "b": [0.4896, 0.6814, 0.538, 0.6964]}, {"w": "is", "b": [0.5477, 0.6814, 0.5671, 0.6964]}, {"w": "a", "b": [0.5768, 0.6814, 0.5865, 0.6964]}, {"w": "fourth", "b": [0.5962, 0.6814, 0.6543, 0.6964]}, {"w": "one.\"]", "b": [0.664, 0.6814, 0.7221, 0.6964]}]}, {"id": "b_28", "type": "equation", "text": "27 LSA_features = LSA_featurizer.get_features(new_docs)", "words": [{"w": "27", "b": [0.0965, 0.7044, 0.1091, 0.7119]}, {"w": "LSA_features", "b": [0.1312, 0.6993, 0.2475, 0.7143]}, {"w": "=", "b": [0.2571, 0.6993, 0.2668, 0.7143]}, {"w": "LSA_featurizer.get_features(new_docs)", "b": [0.2765, 0.6993, 0.6349, 0.7143]}]}, {"id": "b_29", "type": "paragraph", "text": "The corresponding code3 in R is shown below:", "words": [{"w": "The", "b": [0.1306, 0.7252, 0.1624, 0.7402]}, {"w": "corresponding", "b": [0.1685, 0.7252, 0.281, 0.7402]}, {"w": "code3", "b": [0.2872, 0.7236, 0.3308, 0.7402]}, {"w": "in", "b": [0.3379, 0.7252, 0.3533, 0.7402]}, {"w": "R", "b": [0.3594, 0.7252, 0.373, 0.7402]}, {"w": "is", "b": [0.3792, 0.7252, 0.3916, 0.7402]}, {"w": "shown", "b": [0.3977, 0.7252, 0.4476, 0.7402]}, {"w": "below:", "b": [0.4537, 0.7252, 0.505, 0.7402]}]}, {"id": "b_30", "type": "paragraph", "text": "1 library(tm)", "words": [{"w": "1", "b": [0.1028, 0.7583, 0.1091, 0.7657]}, {"w": "library(tm)", "b": [0.1312, 0.7531, 0.2378, 0.7681]}]}, {"id": "b_31", "type": "paragraph", "text": "2 library(lsa)", "words": [{"w": "2", "b": [0.1028, 0.7762, 0.1091, 0.7837]}, {"w": "library(lsa)", "b": [0.1312, 0.7711, 0.2475, 0.7861]}]}, {"id": "b_33", "type": "equation", "text": "4 get_features <- function(LSA_model, new_docs){", "words": [{"w": "4", "b": [0.1028, 0.8121, 0.1091, 0.8196]}, {"w": "get_features", "b": [0.1312, 0.807, 0.2475, 0.822]}, {"w": "<-", "b": [0.2571, 0.807, 0.2765, 0.822]}, {"w": "function(LSA_model,", "b": [0.2862, 0.807, 0.4702, 0.822]}, {"w": "new_docs){", "b": [0.4799, 0.807, 0.5768, 0.822]}]}, {"id": "b_34", "type": "equation", "text": "5 # new_docs can be passed as a tm::Corpus object or as a vector", "words": [{"w": "5", "b": [0.1028, 0.83, 0.1091, 0.8375]}, {"w": "#", "b": [0.17, 0.825, 0.1797, 0.8399]}, {"w": "new_docs", "b": [0.1893, 0.825, 0.2668, 0.8399]}, {"w": "can", "b": [0.2765, 0.825, 0.3056, 0.8399]}, {"w": "be", "b": [0.3153, 0.825, 0.3346, 0.8399]}, {"w": "passed", "b": [0.3443, 0.825, 0.4024, 0.8399]}, {"w": "as", "b": [0.4121, 0.825, 0.4315, 0.8399]}, {"w": "a", "b": [0.4412, 0.825, 0.4509, 0.8399]}, {"w": "tm::Corpus", "b": [0.4606, 0.825, 0.5574, 0.8399]}, {"w": "object", "b": [0.5671, 0.825, 0.6252, 0.8399]}, {"w": "or", "b": [0.6349, 0.825, 0.6543, 0.8399]}, {"w": "as", "b": [0.664, 0.825, 0.6833, 0.8399]}, {"w": "a", "b": [0.693, 0.825, 0.7027, 0.8399]}, {"w": "vector", "b": [0.7124, 0.825, 0.7705, 0.8399]}]}, {"id": "b_35", "type": "paragraph", "text": "3The R code for LSA and LDA is courtesy of Julian Amon.", "words": [{"w": "3The", "b": [0.1518, 0.8514, 0.1865, 0.8652]}, {"w": "R", "b": [0.1917, 0.8533, 0.2032, 0.8652]}, {"w": "code", "b": [0.2084, 0.8533, 0.2394, 0.8652]}, {"w": "for", "b": [0.2446, 0.8533, 0.2633, 0.8652]}, {"w": "LSA", "b": [0.2686, 0.8533, 0.2988, 0.8652]}, {"w": "and", "b": [0.304, 0.8533, 0.3293, 0.8652]}, {"w": "LDA", "b": [0.3345, 0.8533, 0.3676, 0.8652]}, {"w": "is", "b": [0.3728, 0.8533, 0.3834, 0.8652]}, {"w": "courtesy", "b": [0.3886, 0.8533, 0.4458, 0.8652]}, {"w": "of", "b": [0.451, 0.8533, 0.4636, 0.8652]}, {"w": "Julian", "b": [0.4688, 0.8533, 0.5109, 0.8652]}, {"w": "Amon.", "b": [0.5161, 0.8533, 0.5618, 0.8652]}]}, {"id": "b_36", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "13", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 103, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "6 # holding character strings representing documents:", "words": [{"w": "6", "b": [0.1028, 0.0942, 0.1091, 0.1017]}, {"w": "#", "b": [0.17, 0.0892, 0.1797, 0.1041]}, {"w": "holding", "b": [0.1893, 0.0892, 0.2572, 0.1041]}, {"w": "character", "b": [0.2668, 0.0892, 0.354, 0.1041]}, {"w": "strings", "b": [0.3637, 0.0892, 0.4315, 0.1041]}, {"w": "representing", "b": [0.4412, 0.0892, 0.5574, 0.1041]}, {"w": "documents:", "b": [0.5671, 0.0892, 0.664, 0.1041]}]}, {"id": "b_1", "type": "equation", "text": "7 if(!inherits(new_docs, \"Corpus\")) new_docs <- VCorpus(VectorSource(new_docs))", "words": [{"w": "7", "b": [0.1028, 0.1122, 0.1091, 0.1197]}, {"w": "if(!inherits(new_docs,", "b": [0.17, 0.107, 0.3831, 0.1221]}, {"w": "\"Corpus\"))", "b": [0.3928, 0.1071, 0.4896, 0.1221]}, {"w": "new_docs", "b": [0.4993, 0.1071, 0.5768, 0.1221]}, {"w": "<-", "b": [0.5865, 0.1071, 0.6058, 0.1221]}, {"w": "VCorpus(VectorSource(new_docs))", "b": [0.6155, 0.107, 0.9158, 0.1221]}]}, {"id": "b_2", "type": "equation", "text": "8 tdm_test <- TermDocumentMatrix(", "words": [{"w": "8", "b": [0.1028, 0.1301, 0.1091, 0.1376]}, {"w": "tdm_test", "b": [0.17, 0.125, 0.2475, 0.14]}, {"w": "<-", "b": [0.2572, 0.125, 0.2765, 0.14]}, {"w": "TermDocumentMatrix(", "b": [0.2862, 0.125, 0.4702, 0.14]}]}, {"id": "b_3", "type": "equation", "text": "9 new_docs,", "words": [{"w": "9", "b": [0.1028, 0.1481, 0.1091, 0.1555]}, {"w": "new_docs,", "b": [0.2087, 0.143, 0.2959, 0.1579]}]}, {"id": "b_4", "type": "equation", "text": "10 control = list(", "words": [{"w": "10", "b": [0.0965, 0.166, 0.1091, 0.1735]}, {"w": "control", "b": [0.2087, 0.1609, 0.2765, 0.1759]}, {"w": "=", "b": [0.2862, 0.1609, 0.2959, 0.1759]}, {"w": "list(", "b": [0.3056, 0.1609, 0.354, 0.1759]}]}, {"id": "b_5", "type": "equation", "text": "11 dictionary = rownames(LSA_model$tk),", "words": [{"w": "11", "b": [0.0965, 0.184, 0.1091, 0.1914]}, {"w": "dictionary", "b": [0.2475, 0.1789, 0.3443, 0.1938]}, {"w": "=", "b": [0.354, 0.1789, 0.3637, 0.1938]}, {"w": "rownames(LSA_model$tk),", "b": [0.3734, 0.1788, 0.5962, 0.1938]}]}, {"id": "b_6", "type": "equation", "text": "12 weighting = weightTfIdf", "words": [{"w": "12", "b": [0.0965, 0.2019, 0.1091, 0.2094]}, {"w": "weighting", "b": [0.2475, 0.1968, 0.3346, 0.2118]}, {"w": "=", "b": [0.3443, 0.1968, 0.354, 0.2118]}, {"w": "weightTfIdf", "b": [0.3637, 0.1968, 0.4702, 0.2118]}]}, {"id": "b_7", "type": "paragraph", "text": "13 )", "words": [{"w": "13", "b": [0.0965, 0.2199, 0.1091, 0.2273]}, {"w": ")", "b": [0.2087, 0.2148, 0.2184, 0.2297]}]}, {"id": "b_8", "type": "paragraph", "text": "14 )", "words": [{"w": "14", "b": [0.0965, 0.2378, 0.1091, 0.2453]}, {"w": ")", "b": [0.17, 0.2327, 0.1797, 0.2477]}]}, {"id": "b_9", "type": "equation", "text": "15 txt_mat <- as.textmatrix(as.matrix(tdm_test))", "words": [{"w": "15", "b": [0.0965, 0.2557, 0.1091, 0.2632]}, {"w": "txt_mat", "b": [0.17, 0.2507, 0.2378, 0.2656]}, {"w": "<-", "b": [0.2475, 0.2507, 0.2668, 0.2656]}, {"w": "as.textmatrix(as.matrix(tdm_test))", "b": [0.2765, 0.2506, 0.6058, 0.2656]}]}, {"id": "b_10", "type": "equation", "text": "16 crossprod(t(crossprod(txt_mat, LSA_model$tk)), diag(1/LSA_model$sk))", "words": [{"w": "16", "b": [0.0965, 0.2737, 0.1091, 0.2812]}, {"w": "crossprod(t(crossprod(txt_mat,", "b": [0.17, 0.2685, 0.4606, 0.2836]}, {"w": "LSA_model$tk)),", "b": [0.4702, 0.2686, 0.6155, 0.2836]}, {"w": "diag(1/LSA_model$sk))", "b": [0.6252, 0.2685, 0.8286, 0.2836]}]}, {"id": "b_11", "type": "equation", "text": "17 }", "words": [{"w": "17", "b": [0.0965, 0.2916, 0.1091, 0.2991]}, {"w": "}", "b": [0.1312, 0.2866, 0.1409, 0.3015]}]}, {"id": "b_13", "type": "paragraph", "text": "19 # Train LSA model using docs", "words": [{"w": "19", "b": [0.0965, 0.3275, 0.1091, 0.335]}, {"w": "#", "b": [0.1312, 0.3225, 0.1409, 0.3374]}, {"w": "Train", "b": [0.1506, 0.3225, 0.199, 0.3374]}, {"w": "LSA", "b": [0.2087, 0.3225, 0.2378, 0.3374]}, {"w": "model", "b": [0.2475, 0.3225, 0.2959, 0.3374]}, {"w": "using", "b": [0.3056, 0.3225, 0.354, 0.3374]}, {"w": "docs", "b": [0.3637, 0.3225, 0.4024, 0.3374]}]}, {"id": "b_14", "type": "equation", "text": "20 docs <- c(\"This is a text.\", \"This another one.\")", "words": [{"w": "20", "b": [0.0965, 0.3455, 0.1091, 0.353]}, {"w": "docs", "b": [0.1312, 0.3404, 0.17, 0.3554]}, {"w": "<-", "b": [0.1797, 0.3404, 0.199, 0.3554]}, {"w": "c(\"This", "b": [0.2087, 0.3403, 0.2765, 0.3554]}, {"w": "is", "b": [0.2862, 0.3404, 0.3056, 0.3554]}, {"w": "a", "b": [0.3153, 0.3404, 0.3249, 0.3554]}, {"w": "text.\",", "b": [0.3346, 0.3404, 0.4024, 0.3554]}, {"w": "\"This", "b": [0.4121, 0.3404, 0.4606, 0.3554]}, {"w": "another", "b": [0.4702, 0.3404, 0.538, 0.3554]}, {"w": "one.\")", "b": [0.5477, 0.3404, 0.6058, 0.3554]}]}, {"id": "b_15", "type": "equation", "text": "21 corpus <- VCorpus(VectorSource(docs))", "words": [{"w": "21", "b": [0.0965, 0.3634, 0.1091, 0.3709]}, {"w": "corpus", "b": [0.1312, 0.3584, 0.1893, 0.3733]}, {"w": "<-", "b": [0.199, 0.3584, 0.2184, 0.3733]}, {"w": "VCorpus(VectorSource(docs))", "b": [0.2281, 0.3583, 0.4896, 0.3733]}]}, {"id": "b_16", "type": "equation", "text": "22 tdm_train <- TermDocumentMatrix(", "words": [{"w": "22", "b": [0.0965, 0.3814, 0.1091, 0.3889]}, {"w": "tdm_train", "b": [0.1312, 0.3763, 0.2184, 0.3913]}, {"w": "<-", "b": [0.2281, 0.3763, 0.2475, 0.3913]}, {"w": "TermDocumentMatrix(", "b": [0.2571, 0.3762, 0.4412, 0.3913]}]}, {"id": "b_17", "type": "equation", "text": "23 corpus, control = list(weighting = weightTfIdf))", "words": [{"w": "23", "b": [0.0965, 0.3993, 0.1091, 0.4068]}, {"w": "corpus,", "b": [0.1312, 0.3942, 0.199, 0.4092]}, {"w": "control", "b": [0.2087, 0.3942, 0.2765, 0.4092]}, {"w": "=", "b": [0.2862, 0.3942, 0.2959, 0.4092]}, {"w": "list(weighting", "b": [0.3056, 0.3942, 0.4412, 0.4092]}, {"w": "=", "b": [0.4509, 0.3942, 0.4606, 0.4092]}, {"w": "weightTfIdf))", "b": [0.4702, 0.3942, 0.5962, 0.4092]}]}, {"id": "b_18", "type": "equation", "text": "24 txt_mat <- as.textmatrix(as.matrix(tdm_train))", "words": [{"w": "24", "b": [0.0965, 0.4173, 0.1091, 0.4247]}, {"w": "txt_mat", "b": [0.1312, 0.4122, 0.199, 0.4272]}, {"w": "<-", "b": [0.2087, 0.4122, 0.2281, 0.4272]}, {"w": "as.textmatrix(as.matrix(tdm_train))", "b": [0.2378, 0.4121, 0.5768, 0.4272]}]}, {"id": "b_19", "type": "equation", "text": "25 LSA_fit <- lsa(txt_mat, dims = 2)", "words": [{"w": "25", "b": [0.0965, 0.4352, 0.1091, 0.4427]}, {"w": "LSA_fit", "b": [0.1312, 0.4301, 0.199, 0.4451]}, {"w": "<-", "b": [0.2087, 0.4301, 0.2281, 0.4451]}, {"w": "lsa(txt_mat,", "b": [0.2378, 0.4301, 0.354, 0.4451]}, {"w": "dims", "b": [0.3637, 0.4301, 0.4024, 0.4451]}, {"w": "=", "b": [0.4121, 0.4301, 0.4218, 0.4451]}, {"w": "2)", "b": [0.4315, 0.4301, 0.4509, 0.4451]}]}, {"id": "b_21", "type": "equation", "text": "27 # Later, in production, get topic-based features for new_docs", "words": [{"w": "27", "b": [0.0965, 0.4711, 0.1091, 0.4786]}, {"w": "#", "b": [0.1312, 0.466, 0.1409, 0.481]}, {"w": "Later,", "b": [0.1506, 0.466, 0.2087, 0.481]}, {"w": "in", "b": [0.2184, 0.466, 0.2378, 0.481]}, {"w": "production,", "b": [0.2475, 0.466, 0.354, 0.481]}, {"w": "get", "b": [0.3637, 0.466, 0.3928, 0.481]}, {"w": "topic-based", "b": [0.4024, 0.466, 0.509, 0.481]}, {"w": "features", "b": [0.5187, 0.466, 0.5962, 0.481]}, {"w": "for", "b": [0.6058, 0.466, 0.6349, 0.481]}, {"w": "new_docs", "b": [0.6446, 0.466, 0.7221, 0.481]}]}, {"id": "b_22", "type": "equation", "text": "28 new_docs <- c(\"This is a third text.\", \"This is a fourth one.\")", "words": [{"w": "28", "b": [0.0965, 0.4891, 0.1091, 0.4965]}, {"w": "new_docs", "b": [0.1312, 0.484, 0.2087, 0.4989]}, {"w": "<-", "b": [0.2184, 0.484, 0.2378, 0.4989]}, {"w": "c(\"This", "b": [0.2475, 0.4839, 0.3153, 0.4989]}, {"w": "is", "b": [0.325, 0.484, 0.3443, 0.4989]}, {"w": "a", "b": [0.354, 0.484, 0.3637, 0.4989]}, {"w": "third", "b": [0.3734, 0.484, 0.4218, 0.4989]}, {"w": "text.\",", "b": [0.4315, 0.484, 0.4993, 0.4989]}, {"w": "\"This", "b": [0.509, 0.484, 0.5574, 0.4989]}, {"w": "is", "b": [0.5671, 0.484, 0.5865, 0.4989]}, {"w": "a", "b": [0.5962, 0.484, 0.6058, 0.4989]}, {"w": "fourth", "b": [0.6155, 0.484, 0.6736, 0.4989]}, {"w": "one.\")", "b": [0.6833, 0.484, 0.7414, 0.4989]}]}, {"id": "b_23", "type": "equation", "text": "29 LSA_features <- get_features(LSA_fit, new_docs)", "words": [{"w": "29", "b": [0.0965, 0.507, 0.1091, 0.5145]}, {"w": "LSA_features", "b": [0.1312, 0.5019, 0.2475, 0.5169]}, {"w": "<-", "b": [0.2571, 0.5019, 0.2765, 0.5169]}, {"w": "get_features(LSA_fit,", "b": [0.2862, 0.5019, 0.4896, 0.5169]}, {"w": "new_docs)", "b": [0.4993, 0.5019, 0.5865, 0.5169]}]}, {"id": "b_24", "type": "paragraph", "text": "Below is a Python code for LDA:", "words": [{"w": "Below", "b": [0.1312, 0.5278, 0.1797, 0.5428]}, {"w": "is", "b": [0.1858, 0.5278, 0.1982, 0.5428]}, {"w": "a", "b": [0.2044, 0.5278, 0.2136, 0.5428]}, {"w": "Python", "b": [0.2198, 0.5278, 0.279, 0.5428]}, {"w": "code", "b": [0.2851, 0.5278, 0.3215, 0.5428]}, {"w": "for", "b": [0.3277, 0.5278, 0.3498, 0.5428]}, {"w": "LDA:", "b": [0.3559, 0.5278, 0.4, 0.5428]}]}, {"id": "b_25", "type": "equation", "text": "1 from sklearn.feature_extraction.text import CountVectorizer", "words": [{"w": "1", "b": [0.1028, 0.5608, 0.1091, 0.5683]}, {"w": "from", "b": [0.1312, 0.5558, 0.17, 0.5707]}, {"w": "sklearn.feature_extraction.text", "b": [0.1797, 0.5558, 0.4799, 0.5707]}, {"w": "import", "b": [0.4896, 0.5558, 0.5477, 0.5707]}, {"w": "CountVectorizer", "b": [0.5574, 0.5558, 0.7027, 0.5707]}]}, {"id": "b_26", "type": "paragraph", "text": "2 from sklearn.decomposition import LatentDirichletAllocation", "words": [{"w": "2", "b": [0.1028, 0.5788, 0.1091, 0.5863]}, {"w": "from", "b": [0.1312, 0.5737, 0.17, 0.5887]}, {"w": "sklearn.decomposition", "b": [0.1797, 0.5737, 0.3831, 0.5887]}, {"w": "import", "b": [0.3928, 0.5737, 0.4509, 0.5887]}, {"w": "LatentDirichletAllocation", "b": [0.4606, 0.5737, 0.7027, 0.5887]}]}, {"id": "b_28", "type": "paragraph", "text": "4 class LDA():", "words": [{"w": "4", "b": [0.1028, 0.6147, 0.1091, 0.6222]}, {"w": "class", "b": [0.1312, 0.6095, 0.1797, 0.6245]}, {"w": "LDA():", "b": [0.1893, 0.6096, 0.2475, 0.6246]}]}, {"id": "b_29", "type": "equation", "text": "5 def __init__(self, docs):", "words": [{"w": "5", "b": [0.1028, 0.6326, 0.1091, 0.6401]}, {"w": "def", "b": [0.17, 0.6275, 0.199, 0.6424]}, {"w": "__init__(self,", "b": [0.2087, 0.6276, 0.3443, 0.6425]}, {"w": "docs):", "b": [0.354, 0.6276, 0.4121, 0.6425]}]}, {"id": "b_30", "type": "equation", "text": "6 # Convert documents to TF-IDF vectors", "words": [{"w": "6", "b": [0.1028, 0.6506, 0.1091, 0.6581]}, {"w": "#", "b": [0.2087, 0.6455, 0.2184, 0.6605]}, {"w": "Convert", "b": [0.2281, 0.6455, 0.2959, 0.6605]}, {"w": "documents", "b": [0.3056, 0.6455, 0.3928, 0.6605]}, {"w": "to", "b": [0.4024, 0.6455, 0.4218, 0.6605]}, {"w": "TF-IDF", "b": [0.4315, 0.6455, 0.4896, 0.6605]}, {"w": "vectors", "b": [0.4993, 0.6455, 0.5671, 0.6605]}]}, {"id": "b_31", "type": "equation", "text": "7 self.TF = CountVectorizer()", "words": [{"w": "7", "b": [0.1028, 0.6685, 0.1091, 0.676]}, {"w": "self.TF", "b": [0.2087, 0.6635, 0.2765, 0.6784]}, {"w": "=", "b": [0.2862, 0.6635, 0.2959, 0.6784]}, {"w": "CountVectorizer()", "b": [0.3056, 0.6635, 0.4702, 0.6784]}]}, {"id": "b_32", "type": "paragraph", "text": "8 self.TF.fit(docs)", "words": [{"w": "8", "b": [0.1028, 0.6865, 0.1091, 0.694]}, {"w": "self.TF.fit(docs)", "b": [0.2087, 0.6814, 0.3734, 0.6964]}]}, {"id": "b_33", "type": "equation", "text": "9 vectors = self.TF.transform(docs)", "words": [{"w": "9", "b": [0.1028, 0.7044, 0.1091, 0.7119]}, {"w": "vectors", "b": [0.2087, 0.6993, 0.2765, 0.7143]}, {"w": "=", "b": [0.2862, 0.6993, 0.2959, 0.7143]}, {"w": "self.TF.transform(docs)", "b": [0.3056, 0.6993, 0.5284, 0.7143]}]}, {"id": "b_34", "type": "paragraph", "text": "10 # Build the LDA topic model", "words": [{"w": "10", "b": [0.0965, 0.7224, 0.1091, 0.7298]}, {"w": "#", "b": [0.2087, 0.7173, 0.2184, 0.7322]}, {"w": "Build", "b": [0.2281, 0.7173, 0.2765, 0.7322]}, {"w": "the", "b": [0.2862, 0.7173, 0.3153, 0.7322]}, {"w": "LDA", "b": [0.325, 0.7173, 0.354, 0.7322]}, {"w": "topic", "b": [0.3637, 0.7173, 0.4121, 0.7322]}, {"w": "model", "b": [0.4218, 0.7173, 0.4702, 0.7322]}]}, {"id": "b_35", "type": "equation", "text": "11 self.LDA_model = LatentDirichletAllocation(n_components=50)", "words": [{"w": "11", "b": [0.0965, 0.7403, 0.1091, 0.7478]}, {"w": "self.LDA_model", "b": [0.2087, 0.7352, 0.3443, 0.7502]}, {"w": "=", "b": [0.354, 0.7352, 0.3637, 0.7502]}, {"w": "LatentDirichletAllocation(n_components=50)", "b": [0.3734, 0.7352, 0.7802, 0.7502]}]}, {"id": "b_36", "type": "equation", "text": "12 self.LDA_model.fit(vectors)", "words": [{"w": "12", "b": [0.0965, 0.7583, 0.1091, 0.7657]}, {"w": "self.LDA_model.fit(vectors)", "b": [0.2087, 0.7532, 0.4702, 0.7681]}]}, {"id": "b_37", "type": "paragraph", "text": "13 return", "words": [{"w": "13", "b": [0.0965, 0.7762, 0.1091, 0.7837]}, {"w": "return", "b": [0.2087, 0.7711, 0.2668, 0.786]}]}, {"id": "b_38", "type": "equation", "text": "14 def get_features(self, new_docs):", "words": [{"w": "14", "b": [0.0965, 0.7942, 0.1091, 0.8016]}, {"w": "def", "b": [0.17, 0.789, 0.199, 0.804]}, {"w": "get_features(self,", "b": [0.2087, 0.7891, 0.3831, 0.804]}, {"w": "new_docs):", "b": [0.3928, 0.7891, 0.4896, 0.804]}]}, {"id": "b_39", "type": "equation", "text": "15 # Get topic-based features for new documents", "words": [{"w": "15", "b": [0.0965, 0.8121, 0.1091, 0.8196]}, {"w": "#", "b": [0.2087, 0.807, 0.2184, 0.822]}, {"w": "Get", "b": [0.2281, 0.807, 0.2571, 0.822]}, {"w": "topic-based", "b": [0.2668, 0.807, 0.3734, 0.822]}, {"w": "features", "b": [0.3831, 0.807, 0.4606, 0.822]}, {"w": "for", "b": [0.4702, 0.807, 0.4993, 0.822]}, {"w": "new", "b": [0.509, 0.807, 0.538, 0.822]}, {"w": "documents", "b": [0.5477, 0.807, 0.6349, 0.822]}]}, {"id": "b_40", "type": "equation", "text": "16 new_vectors = self.TF.transform(new_docs)", "words": [{"w": "16", "b": [0.0965, 0.83, 0.1091, 0.8375]}, {"w": "new_vectors", "b": [0.2087, 0.825, 0.3153, 0.8399]}, {"w": "=", "b": [0.325, 0.825, 0.3346, 0.8399]}, {"w": "self.TF.transform(new_docs)", "b": [0.3443, 0.825, 0.6058, 0.8399]}]}, {"id": "b_41", "type": "equation", "text": "17 return self.LDA_model.transform(new_vectors)", "words": [{"w": "17", "b": [0.0965, 0.848, 0.1091, 0.8555]}, {"w": "return", "b": [0.2087, 0.8428, 0.2668, 0.8578]}, {"w": "self.LDA_model.transform(new_vectors)", "b": [0.2765, 0.8429, 0.6349, 0.8579]}]}, {"id": "b_43", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "14", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 104, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "19 # Later, in production, instantiate LDA model", "words": [{"w": "19", "b": [0.0965, 0.0942, 0.1091, 0.1017]}, {"w": "#", "b": [0.1312, 0.0892, 0.1409, 0.1041]}, {"w": "Later,", "b": [0.1506, 0.0892, 0.2087, 0.1041]}, {"w": "in", "b": [0.2184, 0.0892, 0.2378, 0.1041]}, {"w": "production,", "b": [0.2475, 0.0892, 0.354, 0.1041]}, {"w": "instantiate", "b": [0.3637, 0.0892, 0.4702, 0.1041]}, {"w": "LDA", "b": [0.4799, 0.0892, 0.509, 0.1041]}, {"w": "model", "b": [0.5187, 0.0892, 0.5671, 0.1041]}]}, {"id": "b_1", "type": "equation", "text": "20 docs = [\"This is a text.\", \"This another one.\"]", "words": [{"w": "20", "b": [0.0965, 0.1122, 0.1091, 0.1197]}, {"w": "docs", "b": [0.1312, 0.1071, 0.17, 0.1221]}, {"w": "=", "b": [0.1797, 0.1071, 0.1893, 0.1221]}, {"w": "[\"This", "b": [0.199, 0.1071, 0.2571, 0.1221]}, {"w": "is", "b": [0.2668, 0.1071, 0.2862, 0.1221]}, {"w": "a", "b": [0.2959, 0.1071, 0.3056, 0.1221]}, {"w": "text.\",", "b": [0.3153, 0.1071, 0.3831, 0.1221]}, {"w": "\"This", "b": [0.3928, 0.1071, 0.4412, 0.1221]}, {"w": "another", "b": [0.4509, 0.1071, 0.5187, 0.1221]}, {"w": "one.\"]", "b": [0.5284, 0.1071, 0.5865, 0.1221]}]}, {"id": "b_2", "type": "equation", "text": "21 LDA_featurizer = LDA(docs)", "words": [{"w": "21", "b": [0.0965, 0.1301, 0.1091, 0.1376]}, {"w": "LDA_featurizer", "b": [0.1312, 0.125, 0.2668, 0.14]}, {"w": "=", "b": [0.2765, 0.125, 0.2862, 0.14]}, {"w": "LDA(docs)", "b": [0.2959, 0.125, 0.3831, 0.14]}]}, {"id": "b_4", "type": "equation", "text": "23 # Get topic-based features for new_docs", "words": [{"w": "23", "b": [0.0965, 0.166, 0.1091, 0.1735]}, {"w": "#", "b": [0.1312, 0.1609, 0.1409, 0.1759]}, {"w": "Get", "b": [0.1506, 0.1609, 0.1797, 0.1759]}, {"w": "topic-based", "b": [0.1893, 0.1609, 0.2959, 0.1759]}, {"w": "features", "b": [0.3056, 0.1609, 0.3831, 0.1759]}, {"w": "for", "b": [0.3928, 0.1609, 0.4218, 0.1759]}, {"w": "new_docs", "b": [0.4315, 0.1609, 0.509, 0.1759]}]}, {"id": "b_5", "type": "equation", "text": "24 new_docs = [\"This is a third text.\", \"This is a fourth one.\"]", "words": [{"w": "24", "b": [0.0965, 0.184, 0.1091, 0.1914]}, {"w": "new_docs", "b": [0.1312, 0.1789, 0.2087, 0.1938]}, {"w": "=", "b": [0.2184, 0.1789, 0.2281, 0.1938]}, {"w": "[\"This", "b": [0.2378, 0.1789, 0.2959, 0.1938]}, {"w": "is", "b": [0.3056, 0.1789, 0.325, 0.1938]}, {"w": "a", "b": [0.3346, 0.1789, 0.3443, 0.1938]}, {"w": "third", "b": [0.354, 0.1789, 0.4024, 0.1938]}, {"w": "text.\",", "b": [0.4121, 0.1789, 0.4799, 0.1938]}, {"w": "\"This", "b": [0.4896, 0.1789, 0.538, 0.1938]}, {"w": "is", "b": [0.5477, 0.1789, 0.5671, 0.1938]}, {"w": "a", "b": [0.5768, 0.1789, 0.5865, 0.1938]}, {"w": "fourth", "b": [0.5962, 0.1789, 0.6543, 0.1938]}, {"w": "one.\"]", "b": [0.664, 0.1789, 0.7221, 0.1938]}]}, {"id": "b_6", "type": "equation", "text": "25 LDA_features = LDA_featurizer.get_features(new_docs)", "words": [{"w": "25", "b": [0.0965, 0.2019, 0.1091, 0.2094]}, {"w": "LDA_features", "b": [0.1312, 0.1968, 0.2475, 0.2118]}, {"w": "=", "b": [0.2571, 0.1968, 0.2668, 0.2118]}, {"w": "LDA_featurizer.get_features(new_docs)", "b": [0.2765, 0.1968, 0.6349, 0.2118]}]}, {"id": "b_7", "type": "paragraph", "text": "And here is the corresponding code in R:", "words": [{"w": "And", "b": [0.1305, 0.2227, 0.1649, 0.2377]}, {"w": "here", "b": [0.171, 0.2227, 0.2049, 0.2377]}, {"w": "is", "b": [0.2111, 0.2227, 0.2235, 0.2377]}, {"w": "the", "b": [0.2297, 0.2227, 0.2553, 0.2377]}, {"w": "corresponding", "b": [0.2614, 0.2227, 0.374, 0.2377]}, {"w": "code", "b": [0.3801, 0.2227, 0.4165, 0.2377]}, {"w": "in", "b": [0.4227, 0.2227, 0.4381, 0.2377]}, {"w": "R:", "b": [0.4442, 0.2227, 0.4629, 0.2377]}]}, {"id": "b_8", "type": "paragraph", "text": "1 library(tm)", "words": [{"w": "1", "b": [0.1028, 0.2557, 0.1091, 0.2632]}, {"w": "library(tm)", "b": [0.1312, 0.2506, 0.2378, 0.2656]}]}, {"id": "b_9", "type": "paragraph", "text": "2 library(topicmodels)", "words": [{"w": "2", "b": [0.1028, 0.2737, 0.1091, 0.2812]}, {"w": "library(topicmodels)", "b": [0.1312, 0.2685, 0.325, 0.2836]}]}, {"id": "b_11", "type": "equation", "text": "4 # Generate feature for new_docs by using LDA_model", "words": [{"w": "4", "b": [0.1028, 0.3096, 0.1091, 0.3171]}, {"w": "#", "b": [0.1312, 0.3045, 0.1409, 0.3195]}, {"w": "Generate", "b": [0.1506, 0.3045, 0.2281, 0.3195]}, {"w": "feature", "b": [0.2378, 0.3045, 0.3056, 0.3195]}, {"w": "for", "b": [0.3153, 0.3045, 0.3443, 0.3195]}, {"w": "new_docs", "b": [0.354, 0.3045, 0.4315, 0.3195]}, {"w": "by", "b": [0.4412, 0.3045, 0.4606, 0.3195]}, {"w": "using", "b": [0.4702, 0.3045, 0.5187, 0.3195]}, {"w": "LDA_model", "b": [0.5284, 0.3045, 0.6155, 0.3195]}]}, {"id": "b_12", "type": "equation", "text": "5 get_features <- function(LDA_mode, new_docs){", "words": [{"w": "5", "b": [0.1028, 0.3275, 0.1091, 0.335]}, {"w": "get_features", "b": [0.1312, 0.3225, 0.2475, 0.3374]}, {"w": "<-", "b": [0.2571, 0.3225, 0.2765, 0.3374]}, {"w": "function(LDA_mode,", "b": [0.2862, 0.3224, 0.4606, 0.3374]}, {"w": "new_docs){", "b": [0.4702, 0.3225, 0.5671, 0.3374]}]}, {"id": "b_13", "type": "equation", "text": "6 # new_docs can be passed as tm::Corpus object or as a vector", "words": [{"w": "6", "b": [0.1028, 0.3455, 0.1091, 0.353]}, {"w": "#", "b": [0.1506, 0.3404, 0.1603, 0.3554]}, {"w": "new_docs", "b": [0.17, 0.3404, 0.2475, 0.3554]}, {"w": "can", "b": [0.2571, 0.3404, 0.2862, 0.3554]}, {"w": "be", "b": [0.2959, 0.3404, 0.3153, 0.3554]}, {"w": "passed", "b": [0.325, 0.3404, 0.3831, 0.3554]}, {"w": "as", "b": [0.3928, 0.3404, 0.4121, 0.3554]}, {"w": "tm::Corpus", "b": [0.4218, 0.3404, 0.5187, 0.3554]}, {"w": "object", "b": [0.5284, 0.3404, 0.5865, 0.3554]}, {"w": "or", "b": [0.5962, 0.3404, 0.6155, 0.3554]}, {"w": "as", "b": [0.6252, 0.3404, 0.6446, 0.3554]}, {"w": "a", "b": [0.6543, 0.3404, 0.664, 0.3554]}, {"w": "vector", "b": [0.6736, 0.3404, 0.7318, 0.3554]}]}, {"id": "b_14", "type": "paragraph", "text": "7 # holding character strings representing documents:", "words": [{"w": "7", "b": [0.1028, 0.3634, 0.1091, 0.3709]}, {"w": "#", "b": [0.1506, 0.3584, 0.1603, 0.3733]}, {"w": "holding", "b": [0.17, 0.3584, 0.2378, 0.3733]}, {"w": "character", "b": [0.2475, 0.3584, 0.3346, 0.3733]}, {"w": "strings", "b": [0.3443, 0.3584, 0.4121, 0.3733]}, {"w": "representing", "b": [0.4218, 0.3584, 0.538, 0.3733]}, {"w": "documents:", "b": [0.5477, 0.3584, 0.6446, 0.3733]}]}, {"id": "b_15", "type": "equation", "text": "8 if(!inherits(new_docs, \"Corpus\")) new_docs <- VCorpus(VectorSource(new_docs))", "words": [{"w": "8", "b": [0.1028, 0.3814, 0.1091, 0.3889]}, {"w": "if(!inherits(new_docs,", "b": [0.1506, 0.3762, 0.3637, 0.3913]}, {"w": "\"Corpus\"))", "b": [0.3734, 0.3763, 0.4702, 0.3913]}, {"w": "new_docs", "b": [0.4799, 0.3763, 0.5574, 0.3913]}, {"w": "<-", "b": [0.5671, 0.3763, 0.5865, 0.3913]}, {"w": "VCorpus(VectorSource(new_docs))", "b": [0.5962, 0.3762, 0.8964, 0.3913]}]}, {"id": "b_16", "type": "equation", "text": "9 new_dtm <- DocumentTermMatrix(new_docs, control = list(weighting = weightTf))", "words": [{"w": "9", "b": [0.1028, 0.3993, 0.1091, 0.4068]}, {"w": "new_dtm", "b": [0.1506, 0.3942, 0.2184, 0.4092]}, {"w": "<-", "b": [0.2281, 0.3942, 0.2475, 0.4092]}, {"w": "DocumentTermMatrix(new_docs,", "b": [0.2571, 0.3942, 0.5284, 0.4092]}, {"w": "control", "b": [0.538, 0.3942, 0.6058, 0.4092]}, {"w": "=", "b": [0.6155, 0.3942, 0.6252, 0.4092]}, {"w": "list(weighting", "b": [0.6349, 0.3942, 0.7705, 0.4092]}, {"w": "=", "b": [0.7802, 0.3942, 0.7899, 0.4092]}, {"w": "weightTf))", "b": [0.7996, 0.3942, 0.8964, 0.4092]}]}, {"id": "b_17", "type": "equation", "text": "10 posterior(LDA_mode, newdata = new_dtm)$topics", "words": [{"w": "10", "b": [0.0965, 0.4173, 0.1091, 0.4247]}, {"w": "posterior(LDA_mode,", "b": [0.1506, 0.4121, 0.3346, 0.4272]}, {"w": "newdata", "b": [0.3443, 0.4122, 0.4121, 0.4272]}, {"w": "=", "b": [0.4218, 0.4122, 0.4315, 0.4272]}, {"w": "new_dtm)$topics", "b": [0.4412, 0.4122, 0.5865, 0.4272]}]}, {"id": "b_18", "type": "equation", "text": "11 }", "words": [{"w": "11", "b": [0.0965, 0.4352, 0.1091, 0.4427]}, {"w": "}", "b": [0.1312, 0.4301, 0.1409, 0.4451]}]}, {"id": "b_20", "type": "paragraph", "text": "13 # train LDA model using docs", "words": [{"w": "13", "b": [0.0965, 0.4711, 0.1091, 0.4786]}, {"w": "#", "b": [0.1312, 0.466, 0.1409, 0.481]}, {"w": "train", "b": [0.1506, 0.466, 0.199, 0.481]}, {"w": "LDA", "b": [0.2087, 0.466, 0.2378, 0.481]}, {"w": "model", "b": [0.2475, 0.466, 0.2959, 0.481]}, {"w": "using", "b": [0.3056, 0.466, 0.354, 0.481]}, {"w": "docs", "b": [0.3637, 0.466, 0.4024, 0.481]}]}, {"id": "b_21", "type": "equation", "text": "14 docs <- c(\"This is a text.\", \"This another one.\")", "words": [{"w": "14", "b": [0.0965, 0.4891, 0.1091, 0.4965]}, {"w": "docs", "b": [0.1312, 0.484, 0.17, 0.4989]}, {"w": "<-", "b": [0.1797, 0.484, 0.199, 0.4989]}, {"w": "c(\"This", "b": [0.2087, 0.4839, 0.2765, 0.4989]}, {"w": "is", "b": [0.2862, 0.484, 0.3056, 0.4989]}, {"w": "a", "b": [0.3153, 0.484, 0.325, 0.4989]}, {"w": "text.\",", "b": [0.3346, 0.484, 0.4024, 0.4989]}, {"w": "\"This", "b": [0.4121, 0.484, 0.4606, 0.4989]}, {"w": "another", "b": [0.4702, 0.484, 0.538, 0.4989]}, {"w": "one.\")", "b": [0.5477, 0.484, 0.6058, 0.4989]}]}, {"id": "b_22", "type": "equation", "text": "15 corpus <- VCorpus(VectorSource(docs))", "words": [{"w": "15", "b": [0.0965, 0.507, 0.1091, 0.5145]}, {"w": "corpus", "b": [0.1312, 0.5019, 0.1893, 0.5169]}, {"w": "<-", "b": [0.199, 0.5019, 0.2184, 0.5169]}, {"w": "VCorpus(VectorSource(docs))", "b": [0.2281, 0.5019, 0.4896, 0.5169]}]}, {"id": "b_23", "type": "equation", "text": "16 dtm <- DocumentTermMatrix(corpus, control = list(weighting = weightTf))", "words": [{"w": "16", "b": [0.0965, 0.525, 0.1091, 0.5324]}, {"w": "dtm", "b": [0.1312, 0.5199, 0.1603, 0.5348]}, {"w": "<-", "b": [0.17, 0.5199, 0.1893, 0.5348]}, {"w": "DocumentTermMatrix(corpus,", "b": [0.199, 0.5198, 0.4509, 0.5348]}, {"w": "control", "b": [0.4606, 0.5199, 0.5284, 0.5348]}, {"w": "=", "b": [0.538, 0.5199, 0.5477, 0.5348]}, {"w": "list(weighting", "b": [0.5574, 0.5198, 0.693, 0.5348]}, {"w": "=", "b": [0.7027, 0.5199, 0.7124, 0.5348]}, {"w": "weightTf))", "b": [0.7221, 0.5199, 0.8189, 0.5348]}]}, {"id": "b_24", "type": "equation", "text": "17 LDA_fit <- LDA(dtm, k = 5)", "words": [{"w": "17", "b": [0.0965, 0.5429, 0.1091, 0.5504]}, {"w": "LDA_fit", "b": [0.1312, 0.5378, 0.199, 0.5528]}, {"w": "<-", "b": [0.2087, 0.5378, 0.2281, 0.5528]}, {"w": "LDA(dtm,", "b": [0.2378, 0.5378, 0.3153, 0.5528]}, {"w": "k", "b": [0.325, 0.5378, 0.3346, 0.5528]}, {"w": "=", "b": [0.3443, 0.5378, 0.354, 0.5528]}, {"w": "5)", "b": [0.3637, 0.5378, 0.3831, 0.5528]}]}, {"id": "b_26", "type": "equation", "text": "19 # later, in production, get topic-based features for new_docs", "words": [{"w": "19", "b": [0.0965, 0.5788, 0.1091, 0.5863]}, {"w": "#", "b": [0.1312, 0.5737, 0.1409, 0.5887]}, {"w": "later,", "b": [0.1506, 0.5737, 0.2087, 0.5887]}, {"w": "in", "b": [0.2184, 0.5737, 0.2378, 0.5887]}, {"w": "production,", "b": [0.2475, 0.5737, 0.354, 0.5887]}, {"w": "get", "b": [0.3637, 0.5737, 0.3928, 0.5887]}, {"w": "topic-based", "b": [0.4024, 0.5737, 0.509, 0.5887]}, {"w": "features", "b": [0.5187, 0.5737, 0.5962, 0.5887]}, {"w": "for", "b": [0.6058, 0.5737, 0.6349, 0.5887]}, {"w": "new_docs", "b": [0.6446, 0.5737, 0.7221, 0.5887]}]}, {"id": "b_27", "type": "equation", "text": "20 new_docs <- c(\"This is a third text.\", \"This is a fourth one.\")", "words": [{"w": "20", "b": [0.0965, 0.5967, 0.1091, 0.6042]}, {"w": "new_docs", "b": [0.1312, 0.5917, 0.2087, 0.6066]}, {"w": "<-", "b": [0.2184, 0.5917, 0.2378, 0.6066]}, {"w": "c(\"This", "b": [0.2475, 0.5916, 0.3153, 0.6066]}, {"w": "is", "b": [0.325, 0.5917, 0.3443, 0.6066]}, {"w": "a", "b": [0.354, 0.5917, 0.3637, 0.6066]}, {"w": "third", "b": [0.3734, 0.5917, 0.4218, 0.6066]}, {"w": "text.\",", "b": [0.4315, 0.5917, 0.4993, 0.6066]}, {"w": "\"This", "b": [0.509, 0.5917, 0.5574, 0.6066]}, {"w": "is", "b": [0.5671, 0.5917, 0.5865, 0.6066]}, {"w": "a", "b": [0.5962, 0.5917, 0.6058, 0.6066]}, {"w": "fourth", "b": [0.6155, 0.5917, 0.6736, 0.6066]}, {"w": "one.\")", "b": [0.6833, 0.5917, 0.7414, 0.6066]}]}, {"id": "b_28", "type": "equation", "text": "21 LDA_features <- get_features(LDA_fit, new_docs)", "words": [{"w": "21", "b": [0.0965, 0.6147, 0.1091, 0.6222]}, {"w": "LDA_features", "b": [0.1312, 0.6096, 0.2475, 0.6246]}, {"w": "<-", "b": [0.2571, 0.6096, 0.2765, 0.6246]}, {"w": "get_features(LDA_fit,", "b": [0.2862, 0.6095, 0.4896, 0.6246]}, {"w": "new_docs)", "b": [0.4993, 0.6096, 0.5865, 0.6246]}]}, {"id": "b_29", "type": "paragraph", "text": "In the above listings, docs is a collection of text documents. It can, for example, be a list of strings, where each string is a document.", "words": [{"w": "In", "b": [0.1312, 0.6355, 0.148, 0.6504]}, {"w": "the", "b": [0.1542, 0.6355, 0.1796, 0.6504]}, {"w": "above", "b": [0.1858, 0.6355, 0.2315, 0.6504]}, {"w": "listings,", "b": [0.2377, 0.6355, 0.2989, 0.6504]}, {"w": "docs", "b": [0.305, 0.6355, 0.3405, 0.6504]}, {"w": "is", "b": [0.3466, 0.6355, 0.3589, 0.6504]}, {"w": "a", "b": [0.3651, 0.6355, 0.3742, 0.6504]}, {"w": "collection", "b": [0.3804, 0.6355, 0.4557, 0.6504]}, {"w": "of", "b": [0.4618, 0.6355, 0.4766, 0.6504]}, {"w": "text", "b": [0.4827, 0.6355, 0.5148, 0.6504]}, {"w": "documents.", "b": [0.5209, 0.6355, 0.6116, 0.6504]}, {"w": "It", "b": [0.6198, 0.6355, 0.6335, 0.6504]}, {"w": "can,", "b": [0.6397, 0.6355, 0.6722, 0.6504]}, {"w": "for", "b": [0.6784, 0.6355, 0.7003, 0.6504]}, {"w": "example,", "b": [0.7064, 0.6355, 0.7771, 0.6504]}, {"w": "be", "b": [0.7833, 0.6355, 0.8021, 0.6504]}, {"w": "a", "b": [0.8083, 0.6355, 0.8174, 0.6504]}, {"w": "list", "b": [0.8236, 0.6355, 0.8481, 0.6504]}, {"w": "of", "b": [0.8542, 0.6355, 0.869, 0.6504]}, {"w": "strings,", "b": [0.1312, 0.6534, 0.19, 0.6684]}, {"w": "where", "b": [0.1961, 0.6534, 0.2433, 0.6684]}, {"w": "each", "b": [0.2495, 0.6534, 0.2849, 0.6684]}, {"w": "string", "b": [0.291, 0.6534, 0.3373, 0.6684]}, {"w": "is", "b": [0.3435, 0.6534, 0.3559, 0.6684]}, {"w": "a", "b": [0.362, 0.6534, 0.3713, 0.6684]}, {"w": "document.", "b": [0.3774, 0.6534, 0.4615, 0.6684]}]}, {"id": "b_30", "type": "equation", "text": "4.2.6 Features for Time-Series", "words": [{"w": "4.2.6", "b": [0.1312, 0.7016, 0.1749, 0.7165]}, {"w": "Features", "b": [0.1961, 0.7016, 0.2746, 0.7165]}, {"w": "for", "b": [0.2817, 0.7016, 0.3075, 0.7165]}, {"w": "Time-Series", "b": [0.3146, 0.7016, 0.4239, 0.7165]}]}, {"id": "b_31", "type": "paragraph", "text": "Time-series data is different from the traditional supervised learning data, which has a form of unordered collections of independent observations. A time series is an ordered sequence of observations, and each is marked with a time-related attribute, such as timestamp, date, month-year, year, and so on. An example of a time-series data is given in Figure 10.", "words": [{"w": "Time-series", "b": [0.1312, 0.7382, 0.2372, 0.7531]}, {"w": "data", "b": [0.2428, 0.7382, 0.2834, 0.7531]}, {"w": "is", "b": [0.2887, 0.7379, 0.3008, 0.7528]}, {"w": "different", "b": [0.3057, 0.7379, 0.371, 0.7528]}, {"w": "from", "b": [0.3759, 0.7379, 0.4126, 0.7528]}, {"w": "the", "b": [0.4175, 0.7379, 0.4426, 0.7528]}, {"w": "traditional", "b": [0.4474, 0.7379, 0.5309, 0.7528]}, {"w": "supervised", "b": [0.5357, 0.7379, 0.6184, 0.7528]}, {"w": "learning", "b": [0.6233, 0.7379, 0.6867, 0.7528]}, {"w": "data,", "b": [0.6915, 0.7379, 0.7317, 0.7528]}, {"w": "which", "b": [0.7368, 0.7379, 0.7825, 0.7528]}, {"w": "has", "b": [0.7874, 0.7379, 0.8136, 0.7528]}, {"w": "a", "b": [0.8184, 0.7379, 0.8275, 0.7528]}, {"w": "form", "b": [0.8323, 0.7379, 0.869, 0.7528]}, {"w": "of", "b": [0.1312, 0.7558, 0.1463, 0.7708]}, {"w": "unordered", "b": [0.1525, 0.7558, 0.2347, 0.7708]}, {"w": "collections", "b": [0.2409, 0.7558, 0.3252, 0.7708]}, {"w": "of", "b": [0.3314, 0.7558, 0.3465, 0.7708]}, {"w": "independent", "b": [0.3526, 0.7558, 0.4525, 0.7708]}, {"w": "observations.", "b": [0.4587, 0.7558, 0.5645, 0.7708]}, {"w": "A", "b": [0.5727, 0.7558, 0.5867, 0.7708]}, {"w": "time", "b": [0.5929, 0.7558, 0.6293, 0.7708]}, {"w": "series", "b": [0.6355, 0.7558, 0.6794, 0.7708]}, {"w": "is", "b": [0.6856, 0.7558, 0.6982, 0.7708]}, {"w": "an", "b": [0.7043, 0.7558, 0.7241, 0.7708]}, {"w": "ordered", "b": [0.7302, 0.7558, 0.7917, 0.7708]}, {"w": "sequence", "b": [0.7979, 0.7558, 0.8692, 0.7708]}, {"w": "of", "b": [0.1312, 0.7737, 0.1462, 0.7887]}, {"w": "observations,", "b": [0.1523, 0.7737, 0.2571, 0.7887]}, {"w": "and", "b": [0.2632, 0.7737, 0.2931, 0.7887]}, {"w": "each", "b": [0.2992, 0.7737, 0.3347, 0.7887]}, {"w": "is", "b": [0.3408, 0.7737, 0.3533, 0.7887]}, {"w": "marked", "b": [0.3594, 0.7737, 0.4192, 0.7887]}, {"w": "with", "b": [0.4253, 0.7737, 0.4613, 0.7887]}, {"w": "a", "b": [0.4674, 0.7737, 0.4767, 0.7887]}, {"w": "time-related", "b": [0.4828, 0.7737, 0.5807, 0.7887]}, {"w": "attribute,", "b": [0.5868, 0.7737, 0.6641, 0.7887]}, {"w": "such", "b": [0.6702, 0.7737, 0.7059, 0.7887]}, {"w": "as", "b": [0.712, 0.7737, 0.7286, 0.7887]}, {"w": "timestamp,", "b": [0.7347, 0.7737, 0.8254, 0.7887]}, {"w": "date,", "b": [0.8315, 0.7737, 0.8717, 0.7887]}, {"w": "month-year,", "b": [0.1312, 0.7917, 0.2282, 0.8066]}, {"w": "year,", "b": [0.2343, 0.7917, 0.2733, 0.8066]}, {"w": "and", "b": [0.2795, 0.7917, 0.3092, 0.8066]}, {"w": "so", "b": [0.3154, 0.7917, 0.3319, 0.8066]}, {"w": "on.", "b": [0.338, 0.7917, 0.3627, 0.8066]}, {"w": "An", "b": [0.3709, 0.7917, 0.3949, 0.8066]}, {"w": "example", "b": [0.4011, 0.7917, 0.4672, 0.8066]}, {"w": "of", "b": [0.4734, 0.7917, 0.4882, 0.8066]}, {"w": "a", "b": [0.4944, 0.7917, 0.5036, 0.8066]}, {"w": "time-series", "b": [0.5098, 0.7917, 0.5952, 0.8066]}, {"w": "data", "b": [0.6013, 0.7917, 0.6372, 0.8066]}, {"w": "is", "b": [0.6433, 0.7917, 0.6557, 0.8066]}, {"w": "given", "b": [0.6619, 0.7917, 0.704, 0.8066]}, {"w": "in", "b": [0.7101, 0.7917, 0.7255, 0.8066]}, {"w": "Figure", "b": [0.7316, 0.7917, 0.7837, 0.8066]}, {"w": "10.", "b": [0.7899, 0.7917, 0.8135, 0.8066]}]}, {"id": "b_32", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 15", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "15", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 105, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Stock Price", "words": [{"w": "Stock", "b": [0.4147, 0.0987, 0.4558, 0.1121]}, {"w": "Price", "b": [0.4604, 0.0987, 0.4978, 0.1121]}]}, {"id": "b_1", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.4494, 0.1321, 0.4631, 0.1454]}]}, {"id": "b_2", "type": "paragraph", "text": "14.7", "words": [{"w": "14.7", "b": [0.4402, 0.1987, 0.4722, 0.2121]}]}, {"id": "b_3", "type": "paragraph", "text": "15.9", "words": [{"w": "15.9", "b": [0.4402, 0.2321, 0.4722, 0.2454]}]}, {"id": "b_4", "type": "paragraph", "text": "16.8", "words": [{"w": "16.8", "b": [0.4402, 0.2988, 0.4722, 0.3121]}]}, {"id": "b_5", "type": "paragraph", "text": "Date S&P 500", "words": [{"w": "Date", "b": [0.3292, 0.0987, 0.3639, 0.1121]}, {"w": "S&P", "b": [0.5225, 0.0987, 0.5554, 0.1121]}, {"w": "500", "b": [0.56, 0.0987, 0.5874, 0.1121]}]}, {"id": "b_6", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5481, 0.1321, 0.5618, 0.1454]}]}, {"id": "b_7", "type": "paragraph", "text": "3,352", "words": [{"w": "3,352", "b": [0.5344, 0.1987, 0.5755, 0.2121]}]}, {"id": "b_8", "type": "paragraph", "text": "3,347", "words": [{"w": "3,347", "b": [0.5344, 0.2321, 0.5755, 0.2454]}]}, {"id": "b_9", "type": "paragraph", "text": "3,521", "words": [{"w": "3,521", "b": [0.5344, 0.2988, 0.5755, 0.3121]}]}, {"id": "b_10", "type": "paragraph", "text": "17.9 3,298", "words": [{"w": "17.9", "b": [0.4402, 0.2654, 0.4722, 0.2787]}, {"w": "3,298", "b": [0.5344, 0.2654, 0.5755, 0.2787]}]}, {"id": "b_11", "type": "equation", "text": "2020-01-11", "words": [{"w": "2020-01-11", "b": [0.3051, 0.1321, 0.3881, 0.1454]}]}, {"id": "b_12", "type": "equation", "text": "2020-01-12", "words": [{"w": "2020-01-12", "b": [0.3045, 0.1987, 0.3886, 0.2121]}]}, {"id": "b_13", "type": "equation", "text": "2020-01-12", "words": [{"w": "2020-01-12", "b": [0.3045, 0.2321, 0.3886, 0.2454]}]}, {"id": "b_14", "type": "equation", "text": "2016-01-13", "words": [{"w": "2016-01-13", "b": [0.3045, 0.2988, 0.3886, 0.3121]}]}, {"id": "b_15", "type": "equation", "text": "2020-01-13", "words": [{"w": "2020-01-13", "b": [0.3045, 0.2654, 0.3886, 0.2787]}]}, {"id": "b_16", "type": "paragraph", "text": "Dow Jones", "words": [{"w": "Dow", "b": [0.6239, 0.0987, 0.6568, 0.1121]}, {"w": "Jones", "b": [0.6614, 0.0987, 0.7053, 0.1121]}]}, {"id": "b_17", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6577, 0.1321, 0.6715, 0.1454]}]}, {"id": "b_18", "type": "paragraph", "text": "28,611", "words": [{"w": "28,611", "b": [0.6401, 0.1987, 0.6891, 0.2121]}]}, {"id": "b_19", "type": "paragraph", "text": "29,001", "words": [{"w": "29,001", "b": [0.6395, 0.2321, 0.6898, 0.2454]}]}, {"id": "b_20", "type": "paragraph", "text": "28,127", "words": [{"w": "28,127", "b": [0.6395, 0.2988, 0.6898, 0.3121]}]}, {"id": "b_21", "type": "paragraph", "text": "28,312", "words": [{"w": "28,312", "b": [0.6395, 0.2654, 0.6898, 0.2787]}]}, {"id": "b_22", "type": "paragraph", "text": "16.8 3,540", "words": [{"w": "16.8", "b": [0.4402, 0.3654, 0.4722, 0.3788]}, {"w": "3,540", "b": [0.5344, 0.3654, 0.5755, 0.3788]}]}, {"id": "b_23", "type": "paragraph", "text": "17.9 3,687", "words": [{"w": "17.9", "b": [0.4402, 0.3321, 0.4722, 0.3454]}, {"w": "3,687", "b": [0.5344, 0.3321, 0.5755, 0.3454]}]}, {"id": "b_24", "type": "equation", "text": "2016-01-15", "words": [{"w": "2016-01-15", "b": [0.3045, 0.3654, 0.3886, 0.3788]}]}, {"id": "b_25", "type": "equation", "text": "2020-01-14", "words": [{"w": "2020-01-14", "b": [0.3045, 0.3321, 0.3886, 0.3454]}]}, {"id": "b_26", "type": "paragraph", "text": "27,998", "words": [{"w": "27,998", "b": [0.6395, 0.3654, 0.6898, 0.3788]}]}, {"id": "b_27", "type": "paragraph", "text": "28,564", "words": [{"w": "28,564", "b": [0.6395, 0.3321, 0.6898, 0.3454]}]}, {"id": "b_28", "type": "equation", "text": "... ... 2016-01-16 ...", "words": [{"w": "...", "b": [0.4494, 0.3988, 0.4631, 0.4121]}, {"w": "...", "b": [0.5481, 0.3988, 0.5618, 0.4121]}, {"w": "2016-01-16", "b": [0.3045, 0.3988, 0.3886, 0.4121]}, {"w": "...", "b": [0.6577, 0.3988, 0.6715, 0.4121]}]}, {"id": "b_29", "type": "equation", "text": "14.5 3,345 2020-01-12 28,583", "words": [{"w": "14.5", "b": [0.4402, 0.1654, 0.4722, 0.1787]}, {"w": "3,345", "b": [0.5344, 0.1654, 0.5755, 0.1787]}, {"w": "2020-01-12", "b": [0.3045, 0.1654, 0.3886, 0.1787]}, {"w": "28,583", "b": [0.6395, 0.1654, 0.6898, 0.1787]}]}, {"id": "b_30", "type": "equation", "text": "Figure 10: An example of time-series data in the form of an event stream.", "words": [{"w": "Figure", "b": [0.2006, 0.4393, 0.2527, 0.4542]}, {"w": "10:", "b": [0.2588, 0.4393, 0.2824, 0.4542]}, {"w": "An", "b": [0.2906, 0.4393, 0.3147, 0.4542]}, {"w": "example", "b": [0.3209, 0.4393, 0.387, 0.4542]}, {"w": "of", "b": [0.3931, 0.4393, 0.408, 0.4542]}, {"w": "time-series", "b": [0.4142, 0.4393, 0.4995, 0.4542]}, {"w": "data", "b": [0.5057, 0.4393, 0.5416, 0.4542]}, {"w": "in", "b": [0.5477, 0.4393, 0.5631, 0.4542]}, {"w": "the", "b": [0.5693, 0.4393, 0.5949, 0.4542]}, {"w": "form", "b": [0.601, 0.4393, 0.6385, 0.4542]}, {"w": "of", "b": [0.6447, 0.4393, 0.6595, 0.4542]}, {"w": "an", "b": [0.6657, 0.4393, 0.6852, 0.4542]}, {"w": "event", "b": [0.6913, 0.4393, 0.7339, 0.4542]}, {"w": "stream.", "b": [0.74, 0.4393, 0.7997, 0.4542]}]}, {"id": "b_31", "type": "paragraph", "text": "Stock Price", "words": [{"w": "Stock", "b": [0.4147, 0.5076, 0.4558, 0.521]}, {"w": "Price", "b": [0.4604, 0.5076, 0.4978, 0.521]}]}, {"id": "b_32", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.4494, 0.541, 0.4631, 0.5543]}]}, {"id": "b_33", "type": "paragraph", "text": "Date S&P 500", "words": [{"w": "Date", "b": [0.3292, 0.5076, 0.3639, 0.521]}, {"w": "S&P", "b": [0.5225, 0.5076, 0.5554, 0.521]}, {"w": "500", "b": [0.56, 0.5076, 0.5874, 0.521]}]}, {"id": "b_34", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5481, 0.541, 0.5618, 0.5543]}]}, {"id": "b_35", "type": "paragraph", "text": "17.4 3,410", "words": [{"w": "17.4", "b": [0.4402, 0.6076, 0.4722, 0.621]}, {"w": "3,410", "b": [0.5344, 0.6076, 0.5755, 0.621]}]}, {"id": "b_36", "type": "equation", "text": "2020-01-11", "words": [{"w": "2020-01-11", "b": [0.3051, 0.541, 0.3881, 0.5543]}]}, {"id": "b_37", "type": "equation", "text": "2020-01-13", "words": [{"w": "2020-01-13", "b": [0.3045, 0.6076, 0.3886, 0.621]}]}, {"id": "b_38", "type": "paragraph", "text": "Dow Jones", "words": [{"w": "Dow", "b": [0.6239, 0.5076, 0.6568, 0.521]}, {"w": "Jones", "b": [0.6614, 0.5076, 0.7053, 0.521]}]}, {"id": "b_39", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6577, 0.541, 0.6715, 0.5543]}]}, {"id": "b_40", "type": "paragraph", "text": "28,220", "words": [{"w": "28,220", "b": [0.6395, 0.6076, 0.6898, 0.621]}]}, {"id": "b_41", "type": "paragraph", "text": "16.8 3,540", "words": [{"w": "16.8", "b": [0.4402, 0.6743, 0.4722, 0.6876]}, {"w": "3,540", "b": [0.5344, 0.6743, 0.5755, 0.6876]}]}, {"id": "b_42", "type": "paragraph", "text": "17.9 3,687", "words": [{"w": "17.9", "b": [0.4402, 0.641, 0.4722, 0.6543]}, {"w": "3,687", "b": [0.5344, 0.641, 0.5755, 0.6543]}]}, {"id": "b_43", "type": "equation", "text": "2016-01-15", "words": [{"w": "2016-01-15", "b": [0.3045, 0.6743, 0.3886, 0.6876]}]}, {"id": "b_44", "type": "equation", "text": "2020-01-14", "words": [{"w": "2020-01-14", "b": [0.3045, 0.641, 0.3886, 0.6543]}]}, {"id": "b_45", "type": "paragraph", "text": "27,998", "words": [{"w": "27,998", "b": [0.6395, 0.6743, 0.6898, 0.6876]}]}, {"id": "b_46", "type": "paragraph", "text": "28,564", "words": [{"w": "28,564", "b": [0.6395, 0.641, 0.6898, 0.6543]}]}, {"id": "b_47", "type": "equation", "text": "... ... 2016-01-16 ...", "words": [{"w": "...", "b": [0.4494, 0.7076, 0.4631, 0.721]}, {"w": "...", "b": [0.5481, 0.7076, 0.5618, 0.721]}, {"w": "2016-01-16", "b": [0.3045, 0.7076, 0.3886, 0.721]}, {"w": "...", "b": [0.6577, 0.7076, 0.6715, 0.721]}]}, {"id": "b_48", "type": "equation", "text": "15.0 3,348 2020-01-12 28,732", "words": [{"w": "15.0", "b": [0.4402, 0.5743, 0.4722, 0.5876]}, {"w": "3,348", "b": [0.5344, 0.5743, 0.5755, 0.5876]}, {"w": "2020-01-12", "b": [0.3045, 0.5743, 0.3886, 0.5876]}, {"w": "28,732", "b": [0.6395, 0.5743, 0.6898, 0.5876]}]}, {"id": "b_49", "type": "paragraph", "text": "Figure 11: Classical time series obtained by aggregating the event stream from Figure 10.", "words": [{"w": "Figure", "b": [0.1375, 0.7475, 0.1896, 0.7624]}, {"w": "11:", "b": [0.1958, 0.7475, 0.2193, 0.7624]}, {"w": "Classical", "b": [0.2276, 0.7475, 0.2975, 0.7624]}, {"w": "time", "b": [0.3036, 0.7475, 0.3395, 0.7624]}, {"w": "series", "b": [0.3457, 0.7475, 0.389, 0.7624]}, {"w": "obtained", "b": [0.3952, 0.7475, 0.4649, 0.7624]}, {"w": "by", "b": [0.471, 0.7475, 0.4905, 0.7624]}, {"w": "aggregating", "b": [0.4967, 0.7475, 0.59, 0.7624]}, {"w": "the", "b": [0.5962, 0.7475, 0.6218, 0.7624]}, {"w": "event", "b": [0.628, 0.7475, 0.6705, 0.7624]}, {"w": "stream", "b": [0.6767, 0.7475, 0.7312, 0.7624]}, {"w": "from", "b": [0.7373, 0.7475, 0.7748, 0.7624]}, {"w": "Figure", "b": [0.781, 0.7475, 0.8331, 0.7624]}, {"w": "10.", "b": [0.8392, 0.7475, 0.8628, 0.7624]}]}, {"id": "b_50", "type": "paragraph", "text": "In Figure 10, each row corresponds to the cost of a certain stock at a moment in time, as well as the values of two indices: S&P 500 and Dow Jones. The observations were made irregularly: on 2020-01-12, three observations were made. On 2020-01-13, there were two observations. In the classical time-series data, observations are evenly spaced over time,", "words": [{"w": "In", "b": [0.1312, 0.7977, 0.1485, 0.8127]}, {"w": "Figure", "b": [0.1548, 0.7977, 0.208, 0.8127]}, {"w": "10,", "b": [0.2143, 0.7977, 0.2384, 0.8127]}, {"w": "each", "b": [0.2448, 0.7977, 0.2809, 0.8127]}, {"w": "row", "b": [0.2872, 0.7977, 0.3171, 0.8127]}, {"w": "corresponds", "b": [0.3234, 0.7977, 0.4205, 0.8127]}, {"w": "to", "b": [0.4269, 0.7977, 0.4436, 0.8127]}, {"w": "the", "b": [0.45, 0.7977, 0.4761, 0.8127]}, {"w": "cost", "b": [0.4825, 0.7977, 0.515, 0.8127]}, {"w": "of", "b": [0.5214, 0.7977, 0.5365, 0.8127]}, {"w": "a", "b": [0.5429, 0.7977, 0.5523, 0.8127]}, {"w": "certain", "b": [0.5586, 0.7977, 0.6152, 0.8127]}, {"w": "stock", "b": [0.6215, 0.7977, 0.664, 0.8127]}, {"w": "at", "b": [0.6703, 0.7977, 0.6871, 0.8127]}, {"w": "a", "b": [0.6934, 0.7977, 0.7028, 0.8127]}, {"w": "moment", "b": [0.7092, 0.7977, 0.7756, 0.8127]}, {"w": "in", "b": [0.7819, 0.7977, 0.7976, 0.8127]}, {"w": "time,", "b": [0.804, 0.7977, 0.8458, 0.8127]}, {"w": "as", "b": [0.8522, 0.7977, 0.8691, 0.8127]}, {"w": "well", "b": [0.1306, 0.8157, 0.1625, 0.8306]}, {"w": "as", "b": [0.1694, 0.8157, 0.1862, 0.8306]}, {"w": "the", "b": [0.1931, 0.8157, 0.2193, 0.8306]}, {"w": "values", "b": [0.2262, 0.8157, 0.276, 0.8306]}, {"w": "of", "b": [0.2829, 0.8157, 0.2981, 0.8306]}, {"w": "two", "b": [0.305, 0.8157, 0.3343, 0.8306]}, {"w": "indices:", "b": [0.3411, 0.8157, 0.4019, 0.8306]}, {"w": "S&P", "b": [0.4116, 0.8157, 0.4496, 0.8306]}, {"w": "500", "b": [0.4565, 0.8157, 0.4847, 0.8306]}, {"w": "and", "b": [0.4916, 0.8157, 0.5219, 0.8306]}, {"w": "Dow", "b": [0.5288, 0.8157, 0.5657, 0.8306]}, {"w": "Jones.", "b": [0.5726, 0.8157, 0.6232, 0.8306]}, {"w": "The", "b": [0.6336, 0.8157, 0.666, 0.8306]}, {"w": "observations", "b": [0.6729, 0.8157, 0.7742, 0.8306]}, {"w": "were", "b": [0.7811, 0.8157, 0.8182, 0.8306]}, {"w": "made", "b": [0.8252, 0.8157, 0.8691, 0.8306]}, {"w": "irregularly:", "b": [0.1312, 0.8336, 0.2219, 0.8486]}, {"w": "on", "b": [0.2314, 0.8336, 0.2513, 0.8486]}, {"w": "2020-01-12,", "b": [0.2581, 0.8336, 0.3494, 0.8486]}, {"w": "three", "b": [0.3564, 0.8336, 0.3983, 0.8486]}, {"w": "observations", "b": [0.4052, 0.8336, 0.5064, 0.8486]}, {"w": "were", "b": [0.5132, 0.8336, 0.5504, 0.8486]}, {"w": "made.", "b": [0.5572, 0.8336, 0.6064, 0.8486]}, {"w": "On", "b": [0.6166, 0.8336, 0.6417, 0.8486]}, {"w": "2020-01-13,", "b": [0.6484, 0.8336, 0.7398, 0.8486]}, {"w": "there", "b": [0.7468, 0.8336, 0.7887, 0.8486]}, {"w": "were", "b": [0.7955, 0.8336, 0.8327, 0.8486]}, {"w": "two", "b": [0.8395, 0.8336, 0.8688, 0.8486]}, {"w": "observations.", "b": [0.1312, 0.8516, 0.2356, 0.8665]}, {"w": "In", "b": [0.2438, 0.8516, 0.2607, 0.8665]}, {"w": "the", "b": [0.2668, 0.8516, 0.2925, 0.8665]}, {"w": "classical", "b": [0.2985, 0.8519, 0.3725, 0.8668]}, {"w": "time-series", "b": [0.3795, 0.8519, 0.479, 0.8668]}, {"w": "data,", "b": [0.4861, 0.8516, 0.5322, 0.8668]}, {"w": "observations", "b": [0.5383, 0.8516, 0.6376, 0.8665]}, {"w": "are", "b": [0.6437, 0.8516, 0.6684, 0.8665]}, {"w": "evenly", "b": [0.6745, 0.8516, 0.7253, 0.8665]}, {"w": "spaced", "b": [0.7314, 0.8516, 0.7849, 0.8665]}, {"w": "over", "b": [0.791, 0.8516, 0.8244, 0.8665]}, {"w": "time,", "b": [0.8305, 0.8516, 0.8715, 0.8665]}]}, {"id": "b_51", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 16", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "16", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 106, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "17.4 3,410 28,220", "words": [{"w": "17.4", "b": [0.6092, 0.1182, 0.6387, 0.1305]}, {"w": "3,410", "b": [0.696, 0.1182, 0.734, 0.1305]}, {"w": "28,220", "b": [0.793, 0.1182, 0.8394, 0.1305]}]}, {"id": "b_1", "type": "paragraph", "text": "17.9 3,687 28,564 17.4 3,410 28,220", "words": [{"w": "17.9", "b": [0.6092, 0.1489, 0.6387, 0.1613]}, {"w": "3,687", "b": [0.696, 0.1489, 0.734, 0.1613]}, {"w": "28,564", "b": [0.793, 0.1489, 0.8394, 0.1613]}, {"w": "17.4", "b": [0.2107, 0.1489, 0.2402, 0.1613]}, {"w": "3,410", "b": [0.2976, 0.1489, 0.3355, 0.1613]}, {"w": "28,220", "b": [0.3945, 0.1489, 0.4409, 0.1613]}]}, {"id": "b_2", "type": "paragraph", "text": "15.0 3,348 28,732", "words": [{"w": "15.0", "b": [0.2107, 0.1182, 0.2402, 0.1305]}, {"w": "3,348", "b": [0.2976, 0.1182, 0.3355, 0.1305]}, {"w": "28,732", "b": [0.3945, 0.1182, 0.4409, 0.1305]}]}, {"id": "b_3", "type": "paragraph", "text": "16.8 3,540", "words": [{"w": "16.8", "b": [0.4156, 0.2535, 0.4452, 0.2658]}, {"w": "3,540", "b": [0.5025, 0.2535, 0.5405, 0.2658]}]}, {"id": "b_4", "type": "paragraph", "text": "17.9 3,687", "words": [{"w": "17.9", "b": [0.4156, 0.2228, 0.4452, 0.2351]}, {"w": "3,687", "b": [0.5025, 0.2228, 0.5405, 0.2351]}]}, {"id": "b_5", "type": "paragraph", "text": "27,998", "words": [{"w": "27,998", "b": [0.5995, 0.2535, 0.6459, 0.2658]}]}, {"id": "b_6", "type": "paragraph", "text": "28,564", "words": [{"w": "28,564", "b": [0.5995, 0.2228, 0.6459, 0.2351]}]}, {"id": "b_7", "type": "equation", "text": "𝑖+ 1 example 𝑖 example", "words": [{"w": "𝑖+", "b": [0.665, 0.0867, 0.6886, 0.1035]}, {"w": "1", "b": [0.6924, 0.0874, 0.7023, 0.1035]}, {"w": "example", "b": [0.5929, 0.0923, 0.655, 0.1056]}, {"w": "𝑖", "b": [0.2628, 0.0878, 0.269, 0.1039]}, {"w": "example", "b": [0.1919, 0.0933, 0.254, 0.1066]}]}, {"id": "b_8", "type": "equation", "text": "𝑖+ 2 example", "words": [{"w": "𝑖+", "b": [0.4613, 0.1913, 0.4849, 0.2081]}, {"w": "2", "b": [0.4887, 0.192, 0.4987, 0.2081]}, {"w": "example", "b": [0.3955, 0.1969, 0.4577, 0.2102]}]}, {"id": "b_9", "type": "paragraph", "text": "𝑡−1", "words": [{"w": "𝑡−1", "b": [0.14, 0.0917, 0.1774, 0.1598]}]}, {"id": "b_10", "type": "paragraph", "text": "𝑡−2", "words": [{"w": "𝑡−2", "b": [0.14, 0.061, 0.1774, 0.129]}]}, {"id": "b_11", "type": "paragraph", "text": "𝑡−1", "words": [{"w": "𝑡−1", "b": [0.3449, 0.2035, 0.3823, 0.2716]}]}, {"id": "b_12", "type": "paragraph", "text": "𝑡−2", "words": [{"w": "𝑡−2", "b": [0.3449, 0.1645, 0.3823, 0.2326]}]}, {"id": "b_13", "type": "paragraph", "text": "𝑡−1", "words": [{"w": "𝑡−1", "b": [0.5385, 0.0917, 0.5759, 0.1598]}]}, {"id": "b_14", "type": "paragraph", "text": "𝑡−2", "words": [{"w": "𝑡−2", "b": [0.5385, 0.061, 0.5759, 0.129]}]}, {"id": "b_15", "type": "equation", "text": "Figure 12: Time-series chunked into segments of length w = 2.", "words": [{"w": "Figure", "b": [0.2473, 0.2904, 0.2994, 0.3053]}, {"w": "12:", "b": [0.3055, 0.2904, 0.3291, 0.3053]}, {"w": "Time-series", "b": [0.3373, 0.2904, 0.4288, 0.3053]}, {"w": "chunked", "b": [0.435, 0.2904, 0.5006, 0.3053]}, {"w": "into", "b": [0.5068, 0.2904, 0.5381, 0.3053]}, {"w": "segments", "b": [0.5442, 0.2904, 0.6167, 0.3053]}, {"w": "of", "b": [0.6229, 0.2904, 0.6377, 0.3053]}, {"w": "length", "b": [0.6439, 0.2904, 0.6941, 0.3053]}, {"w": "w", "b": [0.7001, 0.2906, 0.7133, 0.3056]}, {"w": "=", "b": [0.7189, 0.2904, 0.7332, 0.3053]}, {"w": "2.", "b": [0.7384, 0.2904, 0.7527, 0.3053]}]}, {"id": "b_16", "type": "paragraph", "text": "such as one observation per second, per minute, per day, and so on. If observations are irregular, such time-series data is called a point process or an event stream.", "words": [{"w": "such", "b": [0.1312, 0.3406, 0.1675, 0.3556]}, {"w": "as", "b": [0.1749, 0.3406, 0.1917, 0.3556]}, {"w": "one", "b": [0.1991, 0.3406, 0.2273, 0.3556]}, {"w": "observation", "b": [0.2347, 0.3406, 0.3285, 0.3556]}, {"w": "per", "b": [0.3359, 0.3406, 0.3626, 0.3556]}, {"w": "second,", "b": [0.3701, 0.3406, 0.4298, 0.3556]}, {"w": "per", "b": [0.4375, 0.3406, 0.4642, 0.3556]}, {"w": "minute,", "b": [0.4716, 0.3406, 0.5339, 0.3556]}, {"w": "per", "b": [0.5416, 0.3406, 0.5683, 0.3556]}, {"w": "day,", "b": [0.5757, 0.3406, 0.6087, 0.3556]}, {"w": "and", "b": [0.6164, 0.3406, 0.6467, 0.3556]}, {"w": "so", "b": [0.6541, 0.3406, 0.671, 0.3556]}, {"w": "on.", "b": [0.6784, 0.3406, 0.7035, 0.3556]}, {"w": "If", "b": [0.7154, 0.3406, 0.728, 0.3556]}, {"w": "observations", "b": [0.7354, 0.3406, 0.8366, 0.3556]}, {"w": "are", "b": [0.844, 0.3406, 0.8692, 0.3556]}, {"w": "irregular,", "b": [0.1312, 0.3586, 0.2052, 0.3735]}, {"w": "such", "b": [0.2114, 0.3586, 0.2469, 0.3735]}, {"w": "time-series", "b": [0.253, 0.3586, 0.3384, 0.3735]}, {"w": "data", "b": [0.3446, 0.3586, 0.3804, 0.3735]}, {"w": "is", "b": [0.3866, 0.3586, 0.399, 0.3735]}, {"w": "called", "b": [0.4051, 0.3586, 0.4513, 0.3735]}, {"w": "a", "b": [0.4575, 0.3586, 0.4667, 0.3735]}, {"w": "point", "b": [0.4728, 0.3589, 0.5212, 0.3738]}, {"w": "process", "b": [0.5283, 0.3589, 0.5959, 0.3738]}, {"w": "or", "b": [0.602, 0.3586, 0.6185, 0.3735]}, {"w": "an", "b": [0.6246, 0.3586, 0.6441, 0.3735]}, {"w": "event", "b": [0.6504, 0.3589, 0.6999, 0.3738]}, {"w": "stream.", "b": [0.7069, 0.3586, 0.7752, 0.3738]}]}, {"id": "b_17", "type": "paragraph", "text": "It’s usually possible to convert an event stream into the classical time-series data by aggregating observations. Examples of aggregation operators are COUNT and AVERAGE. By applying the AVERAGE operator to the event stream data in Figure 10, we obtain the classical time-series data shown in Figure 11.", "words": [{"w": "It’s", "b": [0.1312, 0.3855, 0.157, 0.4004]}, {"w": "usually", "b": [0.1611, 0.3855, 0.217, 0.4004]}, {"w": "possible", "b": [0.2211, 0.3855, 0.2831, 0.4004]}, {"w": "to", "b": [0.2872, 0.3855, 0.3033, 0.4004]}, {"w": "convert", "b": [0.3074, 0.3855, 0.3652, 0.4004]}, {"w": "an", "b": [0.3693, 0.3855, 0.3884, 0.4004]}, {"w": "event", "b": [0.3925, 0.3855, 0.4342, 0.4004]}, {"w": "stream", "b": [0.4383, 0.3855, 0.4917, 0.4004]}, {"w": "into", "b": [0.4958, 0.3855, 0.5265, 0.4004]}, {"w": "the", "b": [0.5306, 0.3855, 0.5557, 0.4004]}, {"w": "classical", "b": [0.5598, 0.3855, 0.6233, 0.4004]}, {"w": "time-series", "b": [0.6274, 0.3855, 0.7111, 0.4004]}, {"w": "data", "b": [0.7152, 0.3855, 0.7504, 0.4004]}, {"w": "by", "b": [0.7545, 0.3855, 0.7735, 0.4004]}, {"w": "aggregating", "b": [0.7776, 0.3855, 0.8691, 0.4004]}, {"w": "observations.", "b": [0.1312, 0.4034, 0.235, 0.4184]}, {"w": "Examples", "b": [0.2432, 0.4034, 0.3205, 0.4184]}, {"w": "of", "b": [0.3266, 0.4034, 0.3414, 0.4184]}, {"w": "aggregation", "b": [0.3476, 0.4034, 0.4403, 0.4184]}, {"w": "operators", "b": [0.4465, 0.4034, 0.5216, 0.4184]}, {"w": "are", "b": [0.5278, 0.4034, 0.5523, 0.4184]}, {"w": "COUNT", "b": [0.5584, 0.4034, 0.6267, 0.4184]}, {"w": "and", "b": [0.6329, 0.4034, 0.6624, 0.4184]}, {"w": "AVERAGE.", "b": [0.6686, 0.4034, 0.7652, 0.4184]}, {"w": "By", "b": [0.7714, 0.4034, 0.7941, 0.4184]}, {"w": "applying", "b": [0.8002, 0.4034, 0.869, 0.4184]}, {"w": "the", "b": [0.1312, 0.4214, 0.1574, 0.4363]}, {"w": "AVERAGE", "b": [0.1653, 0.4214, 0.2593, 0.4363]}, {"w": "operator", "b": [0.2672, 0.4214, 0.3368, 0.4363]}, {"w": "to", "b": [0.3447, 0.4214, 0.3614, 0.4363]}, {"w": "the", "b": [0.3693, 0.4214, 0.3954, 0.4363]}, {"w": "event", "b": [0.4033, 0.4214, 0.4467, 0.4363]}, {"w": "stream", "b": [0.4546, 0.4214, 0.5102, 0.4363]}, {"w": "data", "b": [0.518, 0.4214, 0.5546, 0.4363]}, {"w": "in", "b": [0.5625, 0.4214, 0.5782, 0.4363]}, {"w": "Figure", "b": [0.5861, 0.4214, 0.6392, 0.4363]}, {"w": "10,", "b": [0.6471, 0.4214, 0.6711, 0.4363]}, {"w": "we", "b": [0.6794, 0.4214, 0.7009, 0.4363]}, {"w": "obtain", "b": [0.7087, 0.4214, 0.761, 0.4363]}, {"w": "the", "b": [0.7689, 0.4214, 0.7951, 0.4363]}, {"w": "classical", "b": [0.8029, 0.4214, 0.8691, 0.4363]}, {"w": "time-series", "b": [0.1312, 0.4393, 0.2166, 0.4543]}, {"w": "data", "b": [0.2228, 0.4393, 0.2586, 0.4543]}, {"w": "shown", "b": [0.2648, 0.4393, 0.3146, 0.4543]}, {"w": "in", "b": [0.3208, 0.4393, 0.3362, 0.4543]}, {"w": "Figure", "b": [0.3423, 0.4393, 0.3944, 0.4543]}, {"w": "11.", "b": [0.4006, 0.4393, 0.4241, 0.4543]}]}, {"id": "b_18", "type": "paragraph", "text": "While it’s possible to directly work with event streams, bringing time series to the classical", "words": [{"w": "While", "b": [0.1303, 0.4662, 0.1782, 0.4812]}, {"w": "it’s", "b": [0.1843, 0.4662, 0.2091, 0.4812]}, {"w": "possible", "b": [0.2153, 0.4662, 0.2788, 0.4812]}, {"w": "to", "b": [0.2849, 0.4662, 0.3014, 0.4812]}, {"w": "directly", "b": [0.3075, 0.4662, 0.3689, 0.4812]}, {"w": "work", "b": [0.375, 0.4662, 0.4142, 0.4812]}, {"w": "with", "b": [0.4203, 0.4662, 0.4563, 0.4812]}, {"w": "event", "b": [0.4624, 0.4662, 0.5052, 0.4812]}, {"w": "streams,", "b": [0.5113, 0.4662, 0.5785, 0.4812]}, {"w": "bringing", "b": [0.5846, 0.4662, 0.6516, 0.4812]}, {"w": "time", "b": [0.6578, 0.4662, 0.6938, 0.4812]}, {"w": "series", "b": [0.6999, 0.4662, 0.7434, 0.4812]}, {"w": "to", "b": [0.7496, 0.4662, 0.766, 0.4812]}, {"w": "the", "b": [0.7722, 0.4662, 0.7979, 0.4812]}, {"w": "classical", "b": [0.8041, 0.4662, 0.8691, 0.4812]}]}, {"id": "b_19", "type": "paragraph", "text": "form makes it simpler to apply further aggregations and generate features for machine learning.", "words": [{"w": "form", "b": [0.1312, 0.4842, 0.168, 0.4991]}, {"w": "makes", "b": [0.1727, 0.4842, 0.221, 0.4991]}, {"w": "it", "b": [0.2257, 0.4842, 0.2378, 0.4991]}, {"w": "simpler", "b": [0.2425, 0.4842, 0.2999, 0.4991]}, {"w": "to", "b": [0.3046, 0.4842, 0.3207, 0.4991]}, {"w": "apply", "b": [0.3254, 0.4842, 0.3691, 0.4991]}, {"w": "further", "b": [0.3738, 0.4842, 0.4287, 0.4991]}, {"w": "aggregations", "b": [0.4334, 0.4842, 0.5321, 0.4991]}, {"w": "and", "b": [0.5368, 0.4842, 0.5659, 0.4991]}, {"w": "generate", "b": [0.5706, 0.4842, 0.637, 0.4991]}, {"w": "features", "b": [0.6417, 0.4842, 0.7037, 0.4991]}, {"w": "for", "b": [0.7084, 0.4842, 0.7301, 0.4991]}, {"w": "machine", "b": [0.7348, 0.4842, 0.7996, 0.4991]}, {"w": "learning.", "b": [0.8043, 0.4842, 0.8727, 0.4991]}]}, {"id": "b_20", "type": "paragraph", "text": "Analysts typically use time-series data to solve two kinds of prediction problems. Given a sequence of recent observations:", "words": [{"w": "Analysts", "b": [0.1305, 0.5111, 0.2019, 0.5261]}, {"w": "typically", "b": [0.208, 0.5111, 0.2786, 0.5261]}, {"w": "use", "b": [0.2848, 0.5111, 0.3111, 0.5261]}, {"w": "time-series", "b": [0.3172, 0.5111, 0.4043, 0.5261]}, {"w": "data", "b": [0.4105, 0.5111, 0.4471, 0.5261]}, {"w": "to", "b": [0.4532, 0.5111, 0.4699, 0.5261]}, {"w": "solve", "b": [0.4761, 0.5111, 0.516, 0.5261]}, {"w": "two", "b": [0.5221, 0.5111, 0.5514, 0.5261]}, {"w": "kinds", "b": [0.5576, 0.5111, 0.6011, 0.5261]}, {"w": "of", "b": [0.6073, 0.5111, 0.6224, 0.5261]}, {"w": "prediction", "b": [0.6286, 0.5111, 0.7113, 0.5261]}, {"w": "problems.", "b": [0.7174, 0.5111, 0.7971, 0.5261]}, {"w": "Given", "b": [0.8053, 0.5111, 0.8535, 0.5261]}, {"w": "a", "b": [0.8597, 0.5111, 0.8691, 0.5261]}, {"w": "sequence", "b": [0.1312, 0.5291, 0.2016, 0.544]}, {"w": "of", "b": [0.2078, 0.5291, 0.2226, 0.544]}, {"w": "recent", "b": [0.2288, 0.5291, 0.2776, 0.544]}, {"w": "observations:", "b": [0.2837, 0.5291, 0.3881, 0.544]}]}, {"id": "b_21", "type": "paragraph", "text": "• predict something about the next observation (for example, given the stock price and the value of stock indices for the last seven days, predict the stock price for tomorrow), or • predict something about the phenomenon that generated that sequence (for example, given a user’s connection log to a software system, predict whether they are likely to cancel their subscription during the current quarter).", "words": [{"w": "•", "b": [0.1538, 0.556, 0.1681, 0.5709]}, {"w": "predict", "b": [0.1774, 0.556, 0.2327, 0.5709]}, {"w": "something", "b": [0.2375, 0.556, 0.3179, 0.5709]}, {"w": "about", "b": [0.3227, 0.556, 0.3684, 0.5709]}, {"w": "the", "b": [0.3732, 0.556, 0.3983, 0.5709]}, {"w": "next", "b": [0.4031, 0.556, 0.4377, 0.5709]}, {"w": "observation", "b": [0.4425, 0.556, 0.5326, 0.5709]}, {"w": "(for", "b": [0.5374, 0.556, 0.566, 0.5709]}, {"w": "example,", "b": [0.5708, 0.556, 0.6406, 0.5709]}, {"w": "given", "b": [0.6457, 0.556, 0.6869, 0.5709]}, {"w": "the", "b": [0.6916, 0.556, 0.7168, 0.5709]}, {"w": "stock", "b": [0.7215, 0.556, 0.7623, 0.5709]}, {"w": "price", "b": [0.7671, 0.556, 0.8053, 0.5709]}, {"w": "and", "b": [0.8101, 0.556, 0.8392, 0.5709]}, {"w": "the", "b": [0.844, 0.556, 0.8691, 0.5709]}, {"w": "value", "b": [0.1769, 0.5739, 0.2181, 0.5889]}, {"w": "of", "b": [0.2243, 0.5739, 0.239, 0.5889]}, {"w": "stock", "b": [0.2452, 0.5739, 0.2865, 0.5889]}, {"w": "indices", "b": [0.2927, 0.5739, 0.3468, 0.5889]}, {"w": "for", "b": [0.3529, 0.5739, 0.3749, 0.5889]}, {"w": "the", "b": [0.381, 0.5739, 0.4065, 0.5889]}, {"w": "last", "b": [0.4126, 0.5739, 0.4412, 0.5889]}, {"w": "seven", "b": [0.4474, 0.5739, 0.4903, 0.5889]}, {"w": "days,", "b": [0.4964, 0.5739, 0.5373, 0.5889]}, {"w": "predict", "b": [0.5434, 0.5739, 0.5995, 0.5889]}, {"w": "the", "b": [0.6056, 0.5739, 0.6311, 0.5889]}, {"w": "stock", "b": [0.6372, 0.5739, 0.6786, 0.5889]}, {"w": "price", "b": [0.6847, 0.5739, 0.7235, 0.5889]}, {"w": "for", "b": [0.7297, 0.5739, 0.7516, 0.5889]}, {"w": "tomorrow),", "b": [0.7578, 0.5739, 0.8469, 0.5889]}, {"w": "or", "b": [0.8531, 0.5739, 0.8694, 0.5889]}, {"w": "•", "b": [0.1538, 0.5919, 0.1681, 0.6068]}, {"w": "predict", "b": [0.1774, 0.5919, 0.2342, 0.6068]}, {"w": "something", "b": [0.2403, 0.5919, 0.3229, 0.6068]}, {"w": "about", "b": [0.3291, 0.5919, 0.376, 0.6068]}, {"w": "the", "b": [0.3822, 0.5919, 0.408, 0.6068]}, {"w": "phenomenon", "b": [0.4141, 0.5919, 0.5163, 0.6068]}, {"w": "that", "b": [0.5224, 0.5919, 0.5565, 0.6068]}, {"w": "generated", "b": [0.5626, 0.5919, 0.6411, 0.6068]}, {"w": "that", "b": [0.6472, 0.5919, 0.6813, 0.6068]}, {"w": "sequence", "b": [0.6874, 0.5919, 0.7582, 0.6068]}, {"w": "(for", "b": [0.7644, 0.5919, 0.7938, 0.6068]}, {"w": "example,", "b": [0.8, 0.5919, 0.8717, 0.6068]}, {"w": "given", "b": [0.1774, 0.6098, 0.2199, 0.6248]}, {"w": "a", "b": [0.2261, 0.6098, 0.2354, 0.6248]}, {"w": "user’s", "b": [0.2415, 0.6098, 0.2875, 0.6248]}, {"w": "connection", "b": [0.2936, 0.6098, 0.3808, 0.6248]}, {"w": "log", "b": [0.3869, 0.6098, 0.4108, 0.6248]}, {"w": "to", "b": [0.4169, 0.6098, 0.4335, 0.6248]}, {"w": "a", "b": [0.4396, 0.6098, 0.449, 0.6248]}, {"w": "software", "b": [0.4551, 0.6098, 0.5222, 0.6248]}, {"w": "system,", "b": [0.5283, 0.6098, 0.5893, 0.6248]}, {"w": "predict", "b": [0.5954, 0.6098, 0.6525, 0.6248]}, {"w": "whether", "b": [0.6587, 0.6098, 0.7241, 0.6248]}, {"w": "they", "b": [0.7303, 0.6098, 0.7661, 0.6248]}, {"w": "are", "b": [0.7722, 0.6098, 0.7972, 0.6248]}, {"w": "likely", "b": [0.8033, 0.6098, 0.8464, 0.6248]}, {"w": "to", "b": [0.8525, 0.6098, 0.8691, 0.6248]}, {"w": "cancel", "b": [0.1774, 0.6278, 0.2266, 0.6427]}, {"w": "their", "b": [0.2327, 0.6278, 0.2707, 0.6427]}, {"w": "subscription", "b": [0.2769, 0.6278, 0.3746, 0.6427]}, {"w": "during", "b": [0.3807, 0.6278, 0.4331, 0.6427]}, {"w": "the", "b": [0.4392, 0.6278, 0.4649, 0.6427]}, {"w": "current", "b": [0.4711, 0.6278, 0.5291, 0.6427]}, {"w": "quarter).", "b": [0.5353, 0.6278, 0.6066, 0.6427]}]}, {"id": "b_22", "type": "paragraph", "text": "Before neural networks reached their modern learning capacity, analysts worked with time- series data using the shallow machine learning toolkit. To transform a time-series into training data in the form of feature vectors, two decisions must be made:", "words": [{"w": "Before", "b": [0.1312, 0.6547, 0.1832, 0.6696]}, {"w": "neural", "b": [0.1893, 0.6547, 0.24, 0.6696]}, {"w": "networks", "b": [0.2461, 0.6547, 0.3181, 0.6696]}, {"w": "reached", "b": [0.3242, 0.6547, 0.3857, 0.6696]}, {"w": "their", "b": [0.3919, 0.6547, 0.4302, 0.6696]}, {"w": "modern", "b": [0.4363, 0.6547, 0.4978, 0.6696]}, {"w": "learning", "b": [0.504, 0.6547, 0.5691, 0.6696]}, {"w": "capacity,", "b": [0.5752, 0.6547, 0.646, 0.6696]}, {"w": "analysts", "b": [0.6521, 0.6547, 0.7179, 0.6696]}, {"w": "worked", "b": [0.7241, 0.6547, 0.7814, 0.6696]}, {"w": "with", "b": [0.7876, 0.6547, 0.8237, 0.6696]}, {"w": "time-", "b": [0.8299, 0.6547, 0.8722, 0.6696]}, {"w": "series", "b": [0.1312, 0.6726, 0.1755, 0.6876]}, {"w": "data", "b": [0.1817, 0.6726, 0.2183, 0.6876]}, {"w": "using", "b": [0.2246, 0.6726, 0.2676, 0.6876]}, {"w": "the", "b": [0.2739, 0.6726, 0.3, 0.6876]}, {"w": "shallow", "b": [0.3062, 0.6729, 0.3738, 0.6879]}, {"w": "machine", "b": [0.3811, 0.6729, 0.4571, 0.6879]}, {"w": "learning", "b": [0.4643, 0.6729, 0.5391, 0.6879]}, {"w": "toolkit.", "b": [0.5455, 0.6726, 0.6051, 0.6876]}, {"w": "To", "b": [0.6137, 0.6726, 0.6352, 0.6876]}, {"w": "transform", "b": [0.6414, 0.6726, 0.7216, 0.6876]}, {"w": "a", "b": [0.7279, 0.6726, 0.7373, 0.6876]}, {"w": "time-series", "b": [0.7436, 0.6726, 0.8307, 0.6876]}, {"w": "into", "b": [0.837, 0.6726, 0.8689, 0.6876]}, {"w": "training", "b": [0.1312, 0.6906, 0.1949, 0.7055]}, {"w": "data", "b": [0.201, 0.6906, 0.2369, 0.7055]}, {"w": "in", "b": [0.243, 0.6906, 0.2584, 0.7055]}, {"w": "the", "b": [0.2646, 0.6906, 0.2902, 0.7055]}, {"w": "form", "b": [0.2964, 0.6906, 0.3338, 0.7055]}, {"w": "of", "b": [0.34, 0.6906, 0.3549, 0.7055]}, {"w": "feature", "b": [0.361, 0.6906, 0.417, 0.7055]}, {"w": "vectors,", "b": [0.4231, 0.6906, 0.4848, 0.7055]}, {"w": "two", "b": [0.491, 0.6906, 0.5196, 0.7055]}, {"w": "decisions", "b": [0.5258, 0.6906, 0.5968, 0.7055]}, {"w": "must", "b": [0.6029, 0.6906, 0.6425, 0.7055]}, {"w": "be", "b": [0.6487, 0.6906, 0.6676, 0.7055]}, {"w": "made:", "b": [0.6738, 0.6906, 0.722, 0.7055]}]}, {"id": "b_23", "type": "paragraph", "text": "• how many of the consecutive observations are needed to make an accurate prediction (so-called prediction window), and • how to convert a sequence of observations into a fixed-dimensionality feature vector.", "words": [{"w": "•", "b": [0.1538, 0.7175, 0.1681, 0.7325]}, {"w": "how", "b": [0.1774, 0.7175, 0.2098, 0.7325]}, {"w": "many", "b": [0.216, 0.7175, 0.2603, 0.7325]}, {"w": "of", "b": [0.2665, 0.7175, 0.2814, 0.7325]}, {"w": "the", "b": [0.2876, 0.7175, 0.3134, 0.7325]}, {"w": "consecutive", "b": [0.3195, 0.7175, 0.4115, 0.7325]}, {"w": "observations", "b": [0.4176, 0.7175, 0.5175, 0.7325]}, {"w": "are", "b": [0.5236, 0.7175, 0.5484, 0.7325]}, {"w": "needed", "b": [0.5546, 0.7175, 0.6103, 0.7325]}, {"w": "to", "b": [0.6164, 0.7175, 0.6329, 0.7325]}, {"w": "make", "b": [0.6391, 0.7175, 0.6814, 0.7325]}, {"w": "an", "b": [0.6875, 0.7175, 0.7071, 0.7325]}, {"w": "accurate", "b": [0.7133, 0.7175, 0.7814, 0.7325]}, {"w": "prediction", "b": [0.7876, 0.7175, 0.8691, 0.7325]}, {"w": "(so-called", "b": [0.1752, 0.7355, 0.2512, 0.7504]}, {"w": "prediction", "b": [0.2573, 0.7355, 0.3384, 0.7504]}, {"w": "window),", "b": [0.3446, 0.7355, 0.4179, 0.7504]}, {"w": "and", "b": [0.424, 0.7355, 0.4538, 0.7504]}, {"w": "•", "b": [0.1538, 0.7534, 0.1681, 0.7684]}, {"w": "how", "b": [0.1774, 0.7534, 0.2096, 0.7684]}, {"w": "to", "b": [0.2158, 0.7534, 0.2322, 0.7684]}, {"w": "convert", "b": [0.2384, 0.7534, 0.2974, 0.7684]}, {"w": "a", "b": [0.3035, 0.7534, 0.3127, 0.7684]}, {"w": "sequence", "b": [0.3189, 0.7534, 0.3893, 0.7684]}, {"w": "of", "b": [0.3954, 0.7534, 0.4103, 0.7684]}, {"w": "observations", "b": [0.4164, 0.7534, 0.5157, 0.7684]}, {"w": "into", "b": [0.5218, 0.7534, 0.5531, 0.7684]}, {"w": "a", "b": [0.5592, 0.7534, 0.5685, 0.7684]}, {"w": "fixed-dimensionality", "b": [0.5746, 0.7534, 0.7362, 0.7684]}, {"w": "feature", "b": [0.7424, 0.7534, 0.7983, 0.7684]}, {"w": "vector.", "b": [0.8045, 0.7534, 0.8589, 0.7684]}]}, {"id": "b_24", "type": "paragraph", "text": "There’s no simple way to answer either question. Usually decisions are made based on the subject-matter expert’s knowledge, or by using a hyperparameter tuning technique. However, some recipes work for many time-series data. Below is one such recipe:", "words": [{"w": "There’s", "b": [0.1306, 0.7803, 0.1914, 0.7953]}, {"w": "no", "b": [0.1994, 0.7803, 0.2193, 0.7953]}, {"w": "simple", "b": [0.2274, 0.7803, 0.2798, 0.7953]}, {"w": "way", "b": [0.2878, 0.7803, 0.3197, 0.7953]}, {"w": "to", "b": [0.3277, 0.7803, 0.3445, 0.7953]}, {"w": "answer", "b": [0.3525, 0.7803, 0.4086, 0.7953]}, {"w": "either", "b": [0.4167, 0.7803, 0.4638, 0.7953]}, {"w": "question.", "b": [0.4719, 0.7803, 0.5457, 0.7953]}, {"w": "Usually", "b": [0.5596, 0.7803, 0.6214, 0.7953]}, {"w": "decisions", "b": [0.6295, 0.7803, 0.7019, 0.7953]}, {"w": "are", "b": [0.7099, 0.7803, 0.7351, 0.7953]}, {"w": "made", "b": [0.7431, 0.7803, 0.787, 0.7953]}, {"w": "based", "b": [0.7951, 0.7803, 0.8412, 0.7953]}, {"w": "on", "b": [0.8492, 0.7803, 0.8691, 0.7953]}, {"w": "the", "b": [0.1312, 0.7983, 0.1572, 0.8132]}, {"w": "subject-matter", "b": [0.1633, 0.7983, 0.2827, 0.8132]}, {"w": "expert’s", "b": [0.2888, 0.7983, 0.3532, 0.8132]}, {"w": "knowledge,", "b": [0.3594, 0.7983, 0.4485, 0.8132]}, {"w": "or", "b": [0.4547, 0.7983, 0.4713, 0.8132]}, {"w": "by", "b": [0.4774, 0.7983, 0.4971, 0.8132]}, {"w": "using", "b": [0.5033, 0.7983, 0.5459, 0.8132]}, {"w": "a", "b": [0.552, 0.7983, 0.5613, 0.8132]}, {"w": "hyperparameter", "b": [0.5674, 0.7986, 0.716, 0.8135]}, {"w": "tuning", "b": [0.723, 0.7986, 0.7831, 0.8135]}, {"w": "technique.", "b": [0.7894, 0.7983, 0.8724, 0.8132]}, {"w": "However,", "b": [0.1312, 0.8162, 0.2046, 0.8312]}, {"w": "some", "b": [0.2107, 0.8162, 0.2508, 0.8312]}, {"w": "recipes", "b": [0.257, 0.8162, 0.312, 0.8312]}, {"w": "work", "b": [0.3182, 0.8162, 0.3572, 0.8312]}, {"w": "for", "b": [0.3633, 0.8162, 0.3854, 0.8312]}, {"w": "many", "b": [0.3916, 0.8162, 0.4357, 0.8312]}, {"w": "time-series", "b": [0.4418, 0.8162, 0.5272, 0.8312]}, {"w": "data.", "b": [0.5333, 0.8162, 0.5743, 0.8312]}, {"w": "Below", "b": [0.5826, 0.8162, 0.631, 0.8312]}, {"w": "is", "b": [0.6371, 0.8162, 0.6495, 0.8312]}, {"w": "one", "b": [0.6557, 0.8162, 0.6834, 0.8312]}, {"w": "such", "b": [0.6895, 0.8162, 0.725, 0.8312]}, {"w": "recipe:", "b": [0.7312, 0.8162, 0.7841, 0.8312]}]}, {"id": "b_25", "type": "paragraph", "text": "1) chunk the entire time series into segments of length w,", "words": [{"w": "1)", "b": [0.1517, 0.8431, 0.1681, 0.8581]}, {"w": "chunk", "b": [0.1774, 0.8431, 0.2251, 0.8581]}, {"w": "the", "b": [0.2312, 0.8431, 0.2569, 0.8581]}, {"w": "entire", "b": [0.263, 0.8431, 0.3087, 0.8581]}, {"w": "time", "b": [0.3148, 0.8431, 0.3507, 0.8581]}, {"w": "series", "b": [0.3569, 0.8431, 0.4002, 0.8581]}, {"w": "into", "b": [0.4064, 0.8431, 0.4377, 0.8581]}, {"w": "segments", "b": [0.4438, 0.8431, 0.5163, 0.8581]}, {"w": "of", "b": [0.5225, 0.8431, 0.5373, 0.8581]}, {"w": "length", "b": [0.5435, 0.8431, 0.5937, 0.8581]}, {"w": "w,", "b": [0.5996, 0.8431, 0.6185, 0.8584]}]}, {"id": "b_26", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 17", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "17", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 107, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2) create a training example e from each segment s, 3) for each e, calculate various statistics on the observations in s.", "words": [{"w": "2)", "b": [0.1517, 0.0881, 0.1681, 0.1031]}, {"w": "create", "b": [0.1774, 0.0881, 0.2256, 0.1031]}, {"w": "a", "b": [0.2318, 0.0881, 0.241, 0.1031]}, {"w": "training", "b": [0.2471, 0.0881, 0.3108, 0.1031]}, {"w": "example", "b": [0.3169, 0.0881, 0.3831, 0.1031]}, {"w": "e", "b": [0.3891, 0.0884, 0.3977, 0.1033]}, {"w": "from", "b": [0.4039, 0.0881, 0.4413, 0.1031]}, {"w": "each", "b": [0.4475, 0.0881, 0.4829, 0.1031]}, {"w": "segment", "b": [0.489, 0.0881, 0.5542, 0.1031]}, {"w": "s,", "b": [0.5603, 0.0881, 0.5741, 0.1033]}, {"w": "3)", "b": [0.1517, 0.106, 0.1681, 0.121]}, {"w": "for", "b": [0.1774, 0.106, 0.1995, 0.121]}, {"w": "each", "b": [0.2056, 0.106, 0.241, 0.121]}, {"w": "e,", "b": [0.2471, 0.106, 0.2608, 0.1213]}, {"w": "calculate", "b": [0.267, 0.106, 0.3377, 0.121]}, {"w": "various", "b": [0.3439, 0.106, 0.401, 0.121]}, {"w": "statistics", "b": [0.4071, 0.106, 0.4782, 0.121]}, {"w": "on", "b": [0.4843, 0.106, 0.5038, 0.121]}, {"w": "the", "b": [0.51, 0.106, 0.5356, 0.121]}, {"w": "observations", "b": [0.5418, 0.106, 0.641, 0.121]}, {"w": "in", "b": [0.6471, 0.106, 0.6625, 0.121]}, {"w": "s.", "b": [0.6685, 0.106, 0.6822, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "We take Figure 11’s data and chunk it into segments of length w = 2, where w the length of", "words": [{"w": "We", "b": [0.1303, 0.133, 0.1556, 0.1479]}, {"w": "take", "b": [0.1618, 0.133, 0.1952, 0.1479]}, {"w": "Figure", "b": [0.2013, 0.133, 0.2528, 0.1479]}, {"w": "11’s", "b": [0.259, 0.133, 0.2895, 0.1479]}, {"w": "data", "b": [0.2956, 0.133, 0.3311, 0.1479]}, {"w": "and", "b": [0.3373, 0.133, 0.3666, 0.1479]}, {"w": "chunk", "b": [0.3728, 0.133, 0.4199, 0.1479]}, {"w": "it", "b": [0.4261, 0.133, 0.4382, 0.1479]}, {"w": "into", "b": [0.4444, 0.133, 0.4753, 0.1479]}, {"w": "segments", "b": [0.4814, 0.133, 0.5531, 0.1479]}, {"w": "of", "b": [0.5592, 0.133, 0.5739, 0.1479]}, {"w": "length", "b": [0.5801, 0.133, 0.6297, 0.1479]}, {"w": "w", "b": [0.6357, 0.1332, 0.6489, 0.1482]}, {"w": "=", "b": [0.6545, 0.133, 0.6687, 0.1479]}, {"w": "2,", "b": [0.6738, 0.133, 0.688, 0.1479]}, {"w": "where", "b": [0.6942, 0.133, 0.7408, 0.1479]}, {"w": "w", "b": [0.747, 0.1332, 0.7602, 0.1482]}, {"w": "the", "b": [0.7668, 0.133, 0.7922, 0.1479]}, {"w": "length", "b": [0.7983, 0.133, 0.848, 0.1479]}, {"w": "of", "b": [0.8541, 0.133, 0.8688, 0.1479]}]}, {"id": "b_2", "type": "paragraph", "text": "the prediction window. Figure 12 shows that each segment is now a separate example.", "words": [{"w": "the", "b": [0.1312, 0.1509, 0.1569, 0.1659]}, {"w": "prediction", "b": [0.163, 0.1509, 0.2441, 0.1659]}, {"w": "window.", "b": [0.2502, 0.1509, 0.3164, 0.1659]}, {"w": "Figure", "b": [0.3246, 0.1509, 0.3767, 0.1659]}, {"w": "12", "b": [0.3828, 0.1509, 0.4013, 0.1659]}, {"w": "shows", "b": [0.4074, 0.1509, 0.4543, 0.1659]}, {"w": "that", "b": [0.4604, 0.1509, 0.4943, 0.1659]}, {"w": "each", "b": [0.5004, 0.1509, 0.5358, 0.1659]}, {"w": "segment", "b": [0.542, 0.1509, 0.6072, 0.1659]}, {"w": "is", "b": [0.6133, 0.1509, 0.6257, 0.1659]}, {"w": "now", "b": [0.6319, 0.1509, 0.6642, 0.1659]}, {"w": "a", "b": [0.6703, 0.1509, 0.6796, 0.1659]}, {"w": "separate", "b": [0.6857, 0.1509, 0.7525, 0.1659]}, {"w": "example.", "b": [0.7587, 0.1509, 0.8299, 0.1659]}]}, {"id": "b_3", "type": "paragraph", "text": "In practice, w is usually larger than 2. Let’s say our prediction window has a length of seven. The statistics calculated at step (3) of the above recipe could be:", "words": [{"w": "In", "b": [0.1312, 0.1778, 0.1478, 0.1928]}, {"w": "practice,", "b": [0.1538, 0.1778, 0.2212, 0.1928]}, {"w": "w", "b": [0.2272, 0.1781, 0.2404, 0.1931]}, {"w": "is", "b": [0.247, 0.1778, 0.2591, 0.1928]}, {"w": "usually", "b": [0.2651, 0.1778, 0.321, 0.1928]}, {"w": "larger", "b": [0.3271, 0.1778, 0.3724, 0.1928]}, {"w": "than", "b": [0.3784, 0.1778, 0.4146, 0.1928]}, {"w": "2.", "b": [0.4205, 0.1778, 0.4346, 0.1928]}, {"w": "Let’s", "b": [0.4427, 0.1778, 0.4813, 0.1928]}, {"w": "say", "b": [0.4873, 0.1778, 0.5125, 0.1928]}, {"w": "our", "b": [0.5186, 0.1778, 0.5447, 0.1928]}, {"w": "prediction", "b": [0.5508, 0.1778, 0.6302, 0.1928]}, {"w": "window", "b": [0.6362, 0.1778, 0.696, 0.1928]}, {"w": "has", "b": [0.702, 0.1778, 0.7283, 0.1928]}, {"w": "a", "b": [0.7343, 0.1778, 0.7433, 0.1928]}, {"w": "length", "b": [0.7493, 0.1778, 0.7986, 0.1928]}, {"w": "of", "b": [0.8046, 0.1778, 0.8192, 0.1928]}, {"w": "seven.", "b": [0.8252, 0.1778, 0.8726, 0.1928]}, {"w": "The", "b": [0.1306, 0.1958, 0.1624, 0.2107]}, {"w": "statistics", "b": [0.1685, 0.1958, 0.2396, 0.2107]}, {"w": "calculated", "b": [0.2457, 0.1958, 0.3268, 0.2107]}, {"w": "at", "b": [0.3329, 0.1958, 0.3493, 0.2107]}, {"w": "step", "b": [0.3555, 0.1958, 0.3884, 0.2107]}, {"w": "(3)", "b": [0.3945, 0.1958, 0.4181, 0.2107]}, {"w": "of", "b": [0.4243, 0.1958, 0.4391, 0.2107]}, {"w": "the", "b": [0.4453, 0.1958, 0.4709, 0.2107]}, {"w": "above", "b": [0.4771, 0.1958, 0.5232, 0.2107]}, {"w": "recipe", "b": [0.5294, 0.1958, 0.5771, 0.2107]}, {"w": "could", "b": [0.5833, 0.1958, 0.6264, 0.2107]}, {"w": "be:", "b": [0.6325, 0.1958, 0.6566, 0.2107]}]}, {"id": "b_4", "type": "paragraph", "text": "• average (e.g., the mean or median of the stock price during the last seven days), • spread (e.g., standard deviation, median absolute deviation, or interquartile range of the values of the S&P 500 index during the last seven days), • outliers (e.g., the fraction of observations, in which the values of the Dow Jones index was atypically low; for example, more than two standard deviations from the mean), • growth (e.g., whether the values of the S&P 500 index have grown between the day t −6 and t, days t −3 and t, and between t −1 and t. • visual (e.g., how different the curve of the stock price values is from a known visual image, such as a hat, or head and shoulders).", "words": [{"w": "•", "b": [0.1538, 0.2227, 0.1681, 0.2377]}, {"w": "average", "b": [0.1774, 0.2227, 0.2374, 0.2377]}, {"w": "(e.g.,", "b": [0.2436, 0.2227, 0.2836, 0.2377]}, {"w": "the", "b": [0.2897, 0.2227, 0.3153, 0.2377]}, {"w": "mean", "b": [0.3214, 0.223, 0.3709, 0.238]}, {"w": "or", "b": [0.3771, 0.2227, 0.3936, 0.2377]}, {"w": "median", "b": [0.3997, 0.223, 0.4669, 0.238]}, {"w": "of", "b": [0.4732, 0.2227, 0.488, 0.2377]}, {"w": "the", "b": [0.4942, 0.2227, 0.5198, 0.2377]}, {"w": "stock", "b": [0.526, 0.2227, 0.5676, 0.2377]}, {"w": "price", "b": [0.5738, 0.2227, 0.6128, 0.2377]}, {"w": "during", "b": [0.6189, 0.2227, 0.6713, 0.2377]}, {"w": "the", "b": [0.6774, 0.2227, 0.7031, 0.2377]}, {"w": "last", "b": [0.7092, 0.2227, 0.738, 0.2377]}, {"w": "seven", "b": [0.7442, 0.2227, 0.7874, 0.2377]}, {"w": "days),", "b": [0.7935, 0.2227, 0.8418, 0.2377]}, {"w": "•", "b": [0.1538, 0.2406, 0.1681, 0.2556]}, {"w": "spread", "b": [0.1774, 0.2406, 0.2309, 0.2556]}, {"w": "(e.g.,", "b": [0.2377, 0.2406, 0.2785, 0.2556]}, {"w": "standard", "b": [0.2854, 0.241, 0.3667, 0.2559]}, {"w": "deviation,", "b": [0.3746, 0.2406, 0.4653, 0.2559]}, {"w": "median", "b": [0.4723, 0.241, 0.5395, 0.2559]}, {"w": "absolute", "b": [0.5473, 0.241, 0.624, 0.2559]}, {"w": "deviation,", "b": [0.6319, 0.2406, 0.7226, 0.2559]}, {"w": "or", "b": [0.7296, 0.2406, 0.7464, 0.2556]}, {"w": "interquartile", "b": [0.7532, 0.241, 0.8688, 0.2559]}, {"w": "range", "b": [0.1774, 0.2589, 0.2285, 0.2739]}, {"w": "of", "b": [0.2347, 0.2586, 0.2495, 0.2735]}, {"w": "the", "b": [0.2557, 0.2586, 0.2813, 0.2735]}, {"w": "values", "b": [0.2875, 0.2586, 0.3363, 0.2735]}, {"w": "of", "b": [0.3425, 0.2586, 0.3573, 0.2735]}, {"w": "the", "b": [0.3635, 0.2586, 0.3891, 0.2735]}, {"w": "S&P", "b": [0.3953, 0.2586, 0.4325, 0.2735]}, {"w": "500", "b": [0.4386, 0.2586, 0.4663, 0.2735]}, {"w": "index", "b": [0.4724, 0.2586, 0.516, 0.2735]}, {"w": "during", "b": [0.5222, 0.2586, 0.5745, 0.2735]}, {"w": "the", "b": [0.5807, 0.2586, 0.6063, 0.2735]}, {"w": "last", "b": [0.6125, 0.2586, 0.6413, 0.2735]}, {"w": "seven", "b": [0.6474, 0.2586, 0.6906, 0.2735]}, {"w": "days),", "b": [0.6968, 0.2586, 0.7451, 0.2735]}, {"w": "•", "b": [0.1538, 0.2765, 0.1681, 0.2915]}, {"w": "outliers", "b": [0.1774, 0.2765, 0.2368, 0.2915]}, {"w": "(e.g.,", "b": [0.243, 0.2765, 0.2829, 0.2915]}, {"w": "the", "b": [0.289, 0.2765, 0.3146, 0.2915]}, {"w": "fraction", "b": [0.3208, 0.2765, 0.3827, 0.2915]}, {"w": "of", "b": [0.3888, 0.2765, 0.4037, 0.2915]}, {"w": "observations,", "b": [0.4098, 0.2765, 0.5138, 0.2915]}, {"w": "in", "b": [0.52, 0.2765, 0.5354, 0.2915]}, {"w": "which", "b": [0.5415, 0.2765, 0.588, 0.2915]}, {"w": "the", "b": [0.5942, 0.2765, 0.6197, 0.2915]}, {"w": "values", "b": [0.6259, 0.2765, 0.6746, 0.2915]}, {"w": "of", "b": [0.6808, 0.2765, 0.6956, 0.2915]}, {"w": "the", "b": [0.7017, 0.2765, 0.7273, 0.2915]}, {"w": "Dow", "b": [0.7335, 0.2765, 0.7695, 0.2915]}, {"w": "Jones", "b": [0.7757, 0.2765, 0.82, 0.2915]}, {"w": "index", "b": [0.8261, 0.2765, 0.8696, 0.2915]}, {"w": "was", "b": [0.1767, 0.2945, 0.206, 0.3094]}, {"w": "atypically", "b": [0.2122, 0.2945, 0.2906, 0.3094]}, {"w": "low;", "b": [0.2968, 0.2945, 0.329, 0.3094]}, {"w": "for", "b": [0.3352, 0.2945, 0.3573, 0.3094]}, {"w": "example,", "b": [0.3635, 0.2945, 0.4347, 0.3094]}, {"w": "more", "b": [0.4409, 0.2945, 0.4809, 0.3094]}, {"w": "than", "b": [0.487, 0.2945, 0.524, 0.3094]}, {"w": "two", "b": [0.5301, 0.2945, 0.5588, 0.3094]}, {"w": "standard", "b": [0.565, 0.2945, 0.6359, 0.3094]}, {"w": "deviations", "b": [0.642, 0.2945, 0.7237, 0.3094]}, {"w": "from", "b": [0.7298, 0.2945, 0.7673, 0.3094]}, {"w": "the", "b": [0.7734, 0.2945, 0.7991, 0.3094]}, {"w": "mean),", "b": [0.8052, 0.2945, 0.8606, 0.3094]}, {"w": "•", "b": [0.1538, 0.3124, 0.1681, 0.3274]}, {"w": "growth", "b": [0.1774, 0.3124, 0.2344, 0.3274]}, {"w": "(e.g.,", "b": [0.241, 0.3124, 0.2818, 0.3274]}, {"w": "whether", "b": [0.2884, 0.3124, 0.3544, 0.3274]}, {"w": "the", "b": [0.3609, 0.3124, 0.3871, 0.3274]}, {"w": "values", "b": [0.3937, 0.3124, 0.4435, 0.3274]}, {"w": "of", "b": [0.45, 0.3124, 0.4652, 0.3274]}, {"w": "the", "b": [0.4718, 0.3124, 0.4979, 0.3274]}, {"w": "S&P", "b": [0.5045, 0.3124, 0.5424, 0.3274]}, {"w": "500", "b": [0.5489, 0.3124, 0.5772, 0.3274]}, {"w": "index", "b": [0.5837, 0.3124, 0.6282, 0.3274]}, {"w": "have", "b": [0.6348, 0.3124, 0.6719, 0.3274]}, {"w": "grown", "b": [0.6784, 0.3124, 0.7282, 0.3274]}, {"w": "between", "b": [0.7348, 0.3124, 0.8012, 0.3274]}, {"w": "the", "b": [0.8077, 0.3124, 0.8339, 0.3274]}, {"w": "day", "b": [0.8405, 0.3124, 0.8698, 0.3274]}, {"w": "t", "b": [0.1774, 0.3307, 0.184, 0.3456]}, {"w": "−6", "b": [0.1881, 0.3304, 0.2158, 0.3454]}, {"w": "and", "b": [0.2219, 0.3304, 0.2517, 0.3453]}, {"w": "t,", "b": [0.2578, 0.3304, 0.2696, 0.3456]}, {"w": "days", "b": [0.2758, 0.3304, 0.3118, 0.3453]}, {"w": "t", "b": [0.3179, 0.3307, 0.3245, 0.3456]}, {"w": "−3", "b": [0.3286, 0.3304, 0.3563, 0.3454]}, {"w": "and", "b": [0.3625, 0.3304, 0.3922, 0.3453]}, {"w": "t,", "b": [0.3983, 0.3304, 0.4101, 0.3456]}, {"w": "and", "b": [0.4163, 0.3304, 0.446, 0.3453]}, {"w": "between", "b": [0.4522, 0.3304, 0.5173, 0.3453]}, {"w": "t", "b": [0.5234, 0.3307, 0.53, 0.3456]}, {"w": "−1", "b": [0.5341, 0.3304, 0.5618, 0.3454]}, {"w": "and", "b": [0.568, 0.3304, 0.5977, 0.3453]}, {"w": "t.", "b": [0.6038, 0.3304, 0.6156, 0.3456]}, {"w": "•", "b": [0.1538, 0.3483, 0.1681, 0.3633]}, {"w": "visual", "b": [0.1774, 0.3483, 0.2251, 0.3633]}, {"w": "(e.g.,", "b": [0.2315, 0.3483, 0.2723, 0.3633]}, {"w": "how", "b": [0.2789, 0.3483, 0.3119, 0.3633]}, {"w": "different", "b": [0.3183, 0.3483, 0.3864, 0.3633]}, {"w": "the", "b": [0.3929, 0.3483, 0.419, 0.3633]}, {"w": "curve", "b": [0.4255, 0.3483, 0.4695, 0.3633]}, {"w": "of", "b": [0.476, 0.3483, 0.4912, 0.3633]}, {"w": "the", "b": [0.4976, 0.3483, 0.5238, 0.3633]}, {"w": "stock", "b": [0.5303, 0.3483, 0.5727, 0.3633]}, {"w": "price", "b": [0.5792, 0.3483, 0.6191, 0.3633]}, {"w": "values", "b": [0.6255, 0.3483, 0.6753, 0.3633]}, {"w": "is", "b": [0.6818, 0.3483, 0.6945, 0.3633]}, {"w": "from", "b": [0.701, 0.3483, 0.7392, 0.3633]}, {"w": "a", "b": [0.7457, 0.3483, 0.7551, 0.3633]}, {"w": "known", "b": [0.7616, 0.3483, 0.8149, 0.3633]}, {"w": "visual", "b": [0.8214, 0.3483, 0.8691, 0.3633]}, {"w": "image,", "b": [0.1774, 0.3663, 0.2296, 0.3812]}, {"w": "such", "b": [0.2358, 0.3663, 0.2713, 0.3812]}, {"w": "as", "b": [0.2774, 0.3663, 0.294, 0.3812]}, {"w": "a", "b": [0.3001, 0.3663, 0.3093, 0.3812]}, {"w": "hat,", "b": [0.3155, 0.3663, 0.3473, 0.3812]}, {"w": "or", "b": [0.3534, 0.3663, 0.3699, 0.3812]}, {"w": "head", "b": [0.376, 0.3663, 0.414, 0.3812]}, {"w": "and", "b": [0.4201, 0.3663, 0.4499, 0.3812]}, {"w": "shoulders).", "b": [0.456, 0.3663, 0.5434, 0.3812]}]}, {"id": "b_5", "type": "paragraph", "text": "Now you see why converting a time series into a classical form is recommended: the above statistics are only meaningful when calculated on the comparable values.", "words": [{"w": "Now", "b": [0.1312, 0.3932, 0.1675, 0.4082]}, {"w": "you", "b": [0.1737, 0.3932, 0.2027, 0.4082]}, {"w": "see", "b": [0.2089, 0.3932, 0.2329, 0.4082]}, {"w": "why", "b": [0.239, 0.3932, 0.2722, 0.4082]}, {"w": "converting", "b": [0.2783, 0.3932, 0.363, 0.4082]}, {"w": "a", "b": [0.3691, 0.3932, 0.3785, 0.4082]}, {"w": "time", "b": [0.3846, 0.3932, 0.4209, 0.4082]}, {"w": "series", "b": [0.427, 0.3932, 0.4709, 0.4082]}, {"w": "into", "b": [0.4771, 0.3932, 0.5087, 0.4082]}, {"w": "a", "b": [0.5148, 0.3932, 0.5242, 0.4082]}, {"w": "classical", "b": [0.5303, 0.3932, 0.5959, 0.4082]}, {"w": "form", "b": [0.602, 0.3932, 0.64, 0.4082]}, {"w": "is", "b": [0.6461, 0.3932, 0.6587, 0.4082]}, {"w": "recommended:", "b": [0.6648, 0.3932, 0.7821, 0.4082]}, {"w": "the", "b": [0.7903, 0.3932, 0.8163, 0.4082]}, {"w": "above", "b": [0.8224, 0.3932, 0.8691, 0.4082]}, {"w": "statistics", "b": [0.1312, 0.4111, 0.2023, 0.4261]}, {"w": "are", "b": [0.2085, 0.4111, 0.2331, 0.4261]}, {"w": "only", "b": [0.2393, 0.4111, 0.2736, 0.4261]}, {"w": "meaningful", "b": [0.2798, 0.4111, 0.3685, 0.4261]}, {"w": "when", "b": [0.3746, 0.4111, 0.4167, 0.4261]}, {"w": "calculated", "b": [0.4228, 0.4111, 0.5039, 0.4261]}, {"w": "on", "b": [0.51, 0.4111, 0.5295, 0.4261]}, {"w": "the", "b": [0.5356, 0.4111, 0.5613, 0.4261]}, {"w": "comparable", "b": [0.5674, 0.4111, 0.6597, 0.4261]}, {"w": "values.", "b": [0.6659, 0.4111, 0.7199, 0.4261]}]}, {"id": "b_6", "type": "paragraph", "text": "It should be noted that in the modern neural-network era, analysts most often prefer to train deep neural networks. Long short-term memory (LSTM), convolutional neural network (CNN), and Transformer are popular choices of architecture for a time-series model. These can read arbitrary length time-series as input, and generate a prediction based on the entire sequence. Similarly, neural networks are often applied to texts by reading them word-by-word, or character-by-character. Words and characters are usually represented as embedding vectors; the latter are learned from large corpora of text documents. We will talk about embeddings in Section 4.7.1.", "words": [{"w": "It", "b": [0.1312, 0.4381, 0.1453, 0.453]}, {"w": "should", "b": [0.1525, 0.4381, 0.206, 0.453]}, {"w": "be", "b": [0.2131, 0.4381, 0.2325, 0.453]}, {"w": "noted", "b": [0.2397, 0.4381, 0.2857, 0.453]}, {"w": "that", "b": [0.2929, 0.4381, 0.3274, 0.453]}, {"w": "in", "b": [0.3345, 0.4381, 0.3502, 0.453]}, {"w": "the", "b": [0.3574, 0.4381, 0.3836, 0.453]}, {"w": "modern", "b": [0.3907, 0.4381, 0.453, 0.453]}, {"w": "neural-network", "b": [0.4602, 0.4381, 0.5832, 0.453]}, {"w": "era,", "b": [0.5904, 0.4381, 0.6208, 0.453]}, {"w": "analysts", "b": [0.6282, 0.4381, 0.6948, 0.453]}, {"w": "most", "b": [0.702, 0.4381, 0.7418, 0.453]}, {"w": "often", "b": [0.749, 0.4381, 0.7903, 0.453]}, {"w": "prefer", "b": [0.7975, 0.4381, 0.8452, 0.453]}, {"w": "to", "b": [0.8524, 0.4381, 0.8691, 0.453]}, {"w": "train", "b": [0.1312, 0.456, 0.1704, 0.471]}, {"w": "deep", "b": [0.1766, 0.456, 0.2137, 0.471]}, {"w": "neural", "b": [0.2199, 0.456, 0.2704, 0.471]}, {"w": "networks.", "b": [0.2766, 0.456, 0.3535, 0.471]}, {"w": "Long", "b": [0.3616, 0.4563, 0.4074, 0.4713]}, {"w": "short-term", "b": [0.4145, 0.4563, 0.5137, 0.4713]}, {"w": "memory", "b": [0.5208, 0.4563, 0.5964, 0.4713]}, {"w": "(LSTM),", "b": [0.6026, 0.456, 0.6744, 0.471]}, {"w": "convolutional", "b": [0.6806, 0.4563, 0.8035, 0.4713]}, {"w": "neural", "b": [0.8106, 0.4563, 0.8688, 0.4713]}, {"w": "network", "b": [0.1312, 0.4743, 0.2057, 0.4892]}, {"w": "(CNN),", "b": [0.213, 0.474, 0.2747, 0.4889]}, {"w": "and", "b": [0.2819, 0.474, 0.3123, 0.4889]}, {"w": "Transformer", "b": [0.3194, 0.4743, 0.4336, 0.4892]}, {"w": "are", "b": [0.4408, 0.474, 0.466, 0.4889]}, {"w": "popular", "b": [0.4732, 0.474, 0.5365, 0.4889]}, {"w": "choices", "b": [0.5437, 0.474, 0.6008, 0.4889]}, {"w": "of", "b": [0.6081, 0.474, 0.6232, 0.4889]}, {"w": "architecture", "b": [0.6304, 0.474, 0.7284, 0.4889]}, {"w": "for", "b": [0.7356, 0.474, 0.7581, 0.4889]}, {"w": "a", "b": [0.7653, 0.474, 0.7747, 0.4889]}, {"w": "time-series", "b": [0.7819, 0.474, 0.869, 0.4889]}, {"w": "model.", "b": [0.1312, 0.4919, 0.184, 0.5069]}, {"w": "These", "b": [0.1922, 0.4919, 0.2385, 0.5069]}, {"w": "can", "b": [0.2447, 0.4919, 0.2718, 0.5069]}, {"w": "read", "b": [0.2779, 0.4919, 0.3121, 0.5069]}, {"w": "arbitrary", "b": [0.3183, 0.4919, 0.3893, 0.5069]}, {"w": "length", "b": [0.3954, 0.4919, 0.4447, 0.5069]}, {"w": "time-series", "b": [0.4508, 0.4919, 0.5345, 0.5069]}, {"w": "as", "b": [0.5406, 0.4919, 0.5568, 0.5069]}, {"w": "input,", "b": [0.5629, 0.4919, 0.6101, 0.5069]}, {"w": "and", "b": [0.6163, 0.4919, 0.6454, 0.5069]}, {"w": "generate", "b": [0.6515, 0.4919, 0.7179, 0.5069]}, {"w": "a", "b": [0.724, 0.4919, 0.7331, 0.5069]}, {"w": "prediction", "b": [0.7392, 0.4919, 0.8187, 0.5069]}, {"w": "based", "b": [0.8248, 0.4919, 0.8691, 0.5069]}, {"w": "on", "b": [0.1312, 0.5098, 0.1503, 0.5248]}, {"w": "the", "b": [0.1564, 0.5098, 0.1816, 0.5248]}, {"w": "entire", "b": [0.1877, 0.5098, 0.2324, 0.5248]}, {"w": "sequence.", "b": [0.2386, 0.5098, 0.3126, 0.5248]}, {"w": "Similarly,", "b": [0.3207, 0.5098, 0.3951, 0.5248]}, {"w": "neural", "b": [0.4012, 0.5098, 0.4505, 0.5248]}, {"w": "networks", "b": [0.4566, 0.5098, 0.5266, 0.5248]}, {"w": "are", "b": [0.5327, 0.5098, 0.5569, 0.5248]}, {"w": "often", "b": [0.563, 0.5098, 0.6027, 0.5248]}, {"w": "applied", "b": [0.6088, 0.5098, 0.6661, 0.5248]}, {"w": "to", "b": [0.6722, 0.5098, 0.6883, 0.5248]}, {"w": "texts", "b": [0.6944, 0.5098, 0.7332, 0.5248]}, {"w": "by", "b": [0.7393, 0.5098, 0.7584, 0.5248]}, {"w": "reading", "b": [0.7645, 0.5098, 0.8228, 0.5248]}, {"w": "them", "b": [0.829, 0.5098, 0.8691, 0.5248]}, {"w": "word-by-word,", "b": [0.1306, 0.5278, 0.2483, 0.5428]}, {"w": "or", "b": [0.2544, 0.5278, 0.2711, 0.5428]}, {"w": "character-by-character.", "b": [0.2772, 0.5278, 0.4658, 0.5428]}, {"w": "Words", "b": [0.474, 0.5278, 0.5262, 0.5428]}, {"w": "and", "b": [0.5324, 0.5278, 0.5625, 0.5428]}, {"w": "characters", "b": [0.5686, 0.5278, 0.6516, 0.5428]}, {"w": "are", "b": [0.6577, 0.5278, 0.6828, 0.5428]}, {"w": "usually", "b": [0.6889, 0.5278, 0.7467, 0.5428]}, {"w": "represented", "b": [0.7529, 0.5278, 0.8463, 0.5428]}, {"w": "as", "b": [0.8524, 0.5278, 0.8691, 0.5428]}, {"w": "embedding", "b": [0.1312, 0.546, 0.232, 0.561]}, {"w": "vectors;", "b": [0.2391, 0.5457, 0.3099, 0.561]}, {"w": "the", "b": [0.3161, 0.5457, 0.3417, 0.5607]}, {"w": "latter", "b": [0.3478, 0.5457, 0.392, 0.5607]}, {"w": "are", "b": [0.3981, 0.5457, 0.4228, 0.5607]}, {"w": "learned", "b": [0.4289, 0.5457, 0.4874, 0.5607]}, {"w": "from", "b": [0.4935, 0.5457, 0.531, 0.5607]}, {"w": "large", "b": [0.5371, 0.5457, 0.5762, 0.5607]}, {"w": "corpora", "b": [0.5823, 0.5457, 0.6434, 0.5607]}, {"w": "of", "b": [0.6495, 0.5457, 0.6644, 0.5607]}, {"w": "text", "b": [0.6705, 0.5457, 0.7029, 0.5607]}, {"w": "documents.", "b": [0.709, 0.5457, 0.8004, 0.5607]}, {"w": "We", "b": [0.8085, 0.5457, 0.8342, 0.5607]}, {"w": "will", "b": [0.8403, 0.5457, 0.869, 0.5607]}, {"w": "talk", "b": [0.1312, 0.5637, 0.1625, 0.5786]}, {"w": "about", "b": [0.1686, 0.5637, 0.2153, 0.5786]}, {"w": "embeddings", "b": [0.2215, 0.5637, 0.3159, 0.5786]}, {"w": "in", "b": [0.3221, 0.5637, 0.3374, 0.5786]}, {"w": "Section", "b": [0.3436, 0.5637, 0.402, 0.5786]}, {"w": "4.7.1.", "b": [0.4082, 0.5637, 0.4513, 0.5786]}]}, {"id": "b_7", "type": "paragraph", "text": "4.2.7 Use Your Creativity", "words": [{"w": "4.2.7", "b": [0.1312, 0.6118, 0.1749, 0.6268]}, {"w": "Use", "b": [0.1961, 0.6118, 0.2305, 0.6268]}, {"w": "Your", "b": [0.2376, 0.6118, 0.283, 0.6268]}, {"w": "Creativity", "b": [0.2901, 0.6118, 0.3843, 0.6268]}]}, {"id": "b_8", "type": "paragraph", "text": "As I mentioned at the beginning of this section, feature engineering is a creative process. As an analyst, you are in the best position to determine what are good features for your prediction model. Put yourself “in the shoes” of a learning algorithm and imagine what you would look at in your data to decide which label to assign.", "words": [{"w": "As", "b": [0.1305, 0.6481, 0.1521, 0.6631]}, {"w": "I", "b": [0.159, 0.6481, 0.1658, 0.6631]}, {"w": "mentioned", "b": [0.1728, 0.6481, 0.258, 0.6631]}, {"w": "at", "b": [0.265, 0.6481, 0.2817, 0.6631]}, {"w": "the", "b": [0.2887, 0.6481, 0.3148, 0.6631]}, {"w": "beginning", "b": [0.3218, 0.6481, 0.4018, 0.6631]}, {"w": "of", "b": [0.4087, 0.6481, 0.4239, 0.6631]}, {"w": "this", "b": [0.4308, 0.6481, 0.4613, 0.6631]}, {"w": "section,", "b": [0.4682, 0.6481, 0.5301, 0.6631]}, {"w": "feature", "b": [0.5372, 0.6481, 0.5943, 0.6631]}, {"w": "engineering", "b": [0.6012, 0.6481, 0.6944, 0.6631]}, {"w": "is", "b": [0.7013, 0.6481, 0.714, 0.6631]}, {"w": "a", "b": [0.721, 0.6481, 0.7304, 0.6631]}, {"w": "creative", "b": [0.7373, 0.6481, 0.8012, 0.6631]}, {"w": "process.", "b": [0.8082, 0.6481, 0.8728, 0.6631]}, {"w": "As", "b": [0.1305, 0.6661, 0.1521, 0.681]}, {"w": "an", "b": [0.1589, 0.6661, 0.1788, 0.681]}, {"w": "analyst,", "b": [0.1856, 0.6661, 0.25, 0.681]}, {"w": "you", "b": [0.257, 0.6661, 0.2863, 0.681]}, {"w": "are", "b": [0.2932, 0.6661, 0.3183, 0.681]}, {"w": "in", "b": [0.3252, 0.6661, 0.3408, 0.681]}, {"w": "the", "b": [0.3477, 0.6661, 0.3738, 0.681]}, {"w": "best", "b": [0.3807, 0.6661, 0.4148, 0.681]}, {"w": "position", "b": [0.4216, 0.6661, 0.4871, 0.681]}, {"w": "to", "b": [0.4939, 0.6661, 0.5106, 0.681]}, {"w": "determine", "b": [0.5175, 0.6661, 0.5991, 0.681]}, {"w": "what", "b": [0.6059, 0.6661, 0.6467, 0.681]}, {"w": "are", "b": [0.6535, 0.6661, 0.6787, 0.681]}, {"w": "good", "b": [0.6855, 0.6661, 0.7252, 0.681]}, {"w": "features", "b": [0.7321, 0.6661, 0.7966, 0.681]}, {"w": "for", "b": [0.8034, 0.6661, 0.826, 0.681]}, {"w": "your", "b": [0.8328, 0.6661, 0.8695, 0.681]}, {"w": "prediction", "b": [0.1312, 0.684, 0.2115, 0.699]}, {"w": "model.", "b": [0.2177, 0.684, 0.271, 0.699]}, {"w": "Put", "b": [0.2792, 0.684, 0.3089, 0.699]}, {"w": "yourself", "b": [0.3151, 0.684, 0.3767, 0.699]}, {"w": "“in", "b": [0.3828, 0.684, 0.4067, 0.699]}, {"w": "the", "b": [0.4128, 0.684, 0.4382, 0.699]}, {"w": "shoes”", "b": [0.4444, 0.684, 0.4954, 0.699]}, {"w": "of", "b": [0.5015, 0.684, 0.5162, 0.699]}, {"w": "a", "b": [0.5224, 0.684, 0.5315, 0.699]}, {"w": "learning", "b": [0.5377, 0.684, 0.6017, 0.699]}, {"w": "algorithm", "b": [0.6079, 0.684, 0.6851, 0.699]}, {"w": "and", "b": [0.6912, 0.684, 0.7207, 0.699]}, {"w": "imagine", "b": [0.7268, 0.684, 0.7887, 0.699]}, {"w": "what", "b": [0.7949, 0.684, 0.8345, 0.699]}, {"w": "you", "b": [0.8407, 0.684, 0.8691, 0.699]}, {"w": "would", "b": [0.1306, 0.702, 0.1782, 0.7169]}, {"w": "look", "b": [0.1844, 0.702, 0.2182, 0.7169]}, {"w": "at", "b": [0.2244, 0.702, 0.2408, 0.7169]}, {"w": "in", "b": [0.2469, 0.702, 0.2623, 0.7169]}, {"w": "your", "b": [0.2685, 0.702, 0.3044, 0.7169]}, {"w": "data", "b": [0.3106, 0.702, 0.3464, 0.7169]}, {"w": "to", "b": [0.3526, 0.702, 0.369, 0.7169]}, {"w": "decide", "b": [0.3751, 0.702, 0.4254, 0.7169]}, {"w": "which", "b": [0.4315, 0.702, 0.4782, 0.7169]}, {"w": "label", "b": [0.4844, 0.702, 0.5228, 0.7169]}, {"w": "to", "b": [0.529, 0.702, 0.5454, 0.7169]}, {"w": "assign.", "b": [0.5515, 0.702, 0.6051, 0.7169]}]}, {"id": "b_9", "type": "paragraph", "text": "Say you are classifying emails as important or unimportant. You might notice that a significant number of important messages come from the government revenue agency on the first Monday of each month. Create a feature “government first monday.” Let it equal 1 when the email came from the government revenue agency on the first Monday of a month, and 0 otherwise. Alternatively, you might notice that an email with more than one smiley is rarely important. Create a feature “contains smileys.” Let it equal 1 when an email contains more than one smiley, and 0 otherwise.", "words": [{"w": "Say", "b": [0.1312, 0.7289, 0.1605, 0.7438]}, {"w": "you", "b": [0.1692, 0.7289, 0.1985, 0.7438]}, {"w": "are", "b": [0.2073, 0.7289, 0.2324, 0.7438]}, {"w": "classifying", "b": [0.2411, 0.7289, 0.325, 0.7438]}, {"w": "emails", "b": [0.3338, 0.7289, 0.3851, 0.7438]}, {"w": "as", "b": [0.3938, 0.7289, 0.4107, 0.7438]}, {"w": "important", "b": [0.4194, 0.7289, 0.5021, 0.7438]}, {"w": "or", "b": [0.5108, 0.7289, 0.5276, 0.7438]}, {"w": "unimportant.", "b": [0.5363, 0.7289, 0.6451, 0.7438]}, {"w": "You", "b": [0.661, 0.7289, 0.6935, 0.7438]}, {"w": "might", "b": [0.7022, 0.7289, 0.7498, 0.7438]}, {"w": "notice", "b": [0.7585, 0.7289, 0.8077, 0.7438]}, {"w": "that", "b": [0.8164, 0.7289, 0.8509, 0.7438]}, {"w": "a", "b": [0.8596, 0.7289, 0.869, 0.7438]}, {"w": "significant", "b": [0.1312, 0.7468, 0.2122, 0.7618]}, {"w": "number", "b": [0.2184, 0.7468, 0.2789, 0.7618]}, {"w": "of", "b": [0.2851, 0.7468, 0.2999, 0.7618]}, {"w": "important", "b": [0.306, 0.7468, 0.3864, 0.7618]}, {"w": "messages", "b": [0.3926, 0.7468, 0.4641, 0.7618]}, {"w": "come", "b": [0.4703, 0.7468, 0.511, 0.7618]}, {"w": "from", "b": [0.5171, 0.7468, 0.5543, 0.7618]}, {"w": "the", "b": [0.5605, 0.7468, 0.5859, 0.7618]}, {"w": "government", "b": [0.5921, 0.7468, 0.6847, 0.7618]}, {"w": "revenue", "b": [0.6908, 0.7468, 0.7514, 0.7618]}, {"w": "agency", "b": [0.7576, 0.7468, 0.812, 0.7618]}, {"w": "on", "b": [0.8182, 0.7468, 0.8375, 0.7618]}, {"w": "the", "b": [0.8437, 0.7468, 0.8691, 0.7618]}, {"w": "first", "b": [0.1312, 0.7648, 0.1638, 0.7797]}, {"w": "Monday", "b": [0.1708, 0.7648, 0.2373, 0.7797]}, {"w": "of", "b": [0.2443, 0.7648, 0.2595, 0.7797]}, {"w": "each", "b": [0.2665, 0.7648, 0.3026, 0.7797]}, {"w": "month.", "b": [0.3096, 0.7648, 0.3677, 0.7797]}, {"w": "Create", "b": [0.3785, 0.7648, 0.4329, 0.7797]}, {"w": "a", "b": [0.44, 0.7648, 0.4494, 0.7797]}, {"w": "feature", "b": [0.4564, 0.7648, 0.5135, 0.7797]}, {"w": "“government", "b": [0.5205, 0.7648, 0.6246, 0.7797]}, {"w": "first", "b": [0.6317, 0.7648, 0.6643, 0.7797]}, {"w": "monday.”", "b": [0.6713, 0.7648, 0.7462, 0.7797]}, {"w": "Let", "b": [0.757, 0.7648, 0.7844, 0.7797]}, {"w": "it", "b": [0.7915, 0.7648, 0.804, 0.7797]}, {"w": "equal", "b": [0.811, 0.7648, 0.8545, 0.7797]}, {"w": "1", "b": [0.8612, 0.7648, 0.8706, 0.7797]}, {"w": "when", "b": [0.1306, 0.7827, 0.1727, 0.7977]}, {"w": "the", "b": [0.1789, 0.7827, 0.2046, 0.7977]}, {"w": "email", "b": [0.2107, 0.7827, 0.2539, 0.7977]}, {"w": "came", "b": [0.26, 0.7827, 0.3011, 0.7977]}, {"w": "from", "b": [0.3073, 0.7827, 0.3448, 0.7977]}, {"w": "the", "b": [0.351, 0.7827, 0.3767, 0.7977]}, {"w": "government", "b": [0.3828, 0.7827, 0.4764, 0.7977]}, {"w": "revenue", "b": [0.4825, 0.7827, 0.5438, 0.7977]}, {"w": "agency", "b": [0.5499, 0.7827, 0.6049, 0.7977]}, {"w": "on", "b": [0.611, 0.7827, 0.6306, 0.7977]}, {"w": "the", "b": [0.6367, 0.7827, 0.6624, 0.7977]}, {"w": "first", "b": [0.6686, 0.7827, 0.7006, 0.7977]}, {"w": "Monday", "b": [0.7068, 0.7827, 0.772, 0.7977]}, {"w": "of", "b": [0.7782, 0.7827, 0.7931, 0.7977]}, {"w": "a", "b": [0.7992, 0.7827, 0.8085, 0.7977]}, {"w": "month,", "b": [0.8146, 0.7827, 0.8716, 0.7977]}, {"w": "and", "b": [0.1312, 0.8007, 0.1605, 0.8156]}, {"w": "0", "b": [0.1667, 0.8007, 0.1758, 0.8156]}, {"w": "otherwise.", "b": [0.1819, 0.8007, 0.2619, 0.8156]}, {"w": "Alternatively,", "b": [0.2701, 0.8007, 0.3777, 0.8156]}, {"w": "you", "b": [0.3839, 0.8007, 0.4122, 0.8156]}, {"w": "might", "b": [0.4183, 0.8007, 0.4643, 0.8156]}, {"w": "notice", "b": [0.4704, 0.8007, 0.5179, 0.8156]}, {"w": "that", "b": [0.5241, 0.8007, 0.5574, 0.8156]}, {"w": "an", "b": [0.5635, 0.8007, 0.5827, 0.8156]}, {"w": "email", "b": [0.5889, 0.8007, 0.6313, 0.8156]}, {"w": "with", "b": [0.6375, 0.8007, 0.6728, 0.8156]}, {"w": "more", "b": [0.679, 0.8007, 0.7184, 0.8156]}, {"w": "than", "b": [0.7246, 0.8007, 0.7609, 0.8156]}, {"w": "one", "b": [0.7671, 0.8007, 0.7944, 0.8156]}, {"w": "smiley", "b": [0.8005, 0.8007, 0.8506, 0.8156]}, {"w": "is", "b": [0.8568, 0.8007, 0.869, 0.8156]}, {"w": "rarely", "b": [0.1312, 0.8186, 0.1773, 0.8336]}, {"w": "important.", "b": [0.1834, 0.8186, 0.2683, 0.8336]}, {"w": "Create", "b": [0.2765, 0.8186, 0.3291, 0.8336]}, {"w": "a", "b": [0.3352, 0.8186, 0.3443, 0.8336]}, {"w": "feature", "b": [0.3504, 0.8186, 0.4056, 0.8336]}, {"w": "“contains", "b": [0.4117, 0.8186, 0.4855, 0.8336]}, {"w": "smileys.”", "b": [0.4917, 0.8186, 0.56, 0.8336]}, {"w": "Let", "b": [0.5682, 0.8186, 0.5947, 0.8336]}, {"w": "it", "b": [0.6008, 0.8186, 0.613, 0.8336]}, {"w": "equal", "b": [0.6191, 0.8186, 0.661, 0.8336]}, {"w": "1", "b": [0.6669, 0.8186, 0.676, 0.8336]}, {"w": "when", "b": [0.6822, 0.8186, 0.7236, 0.8336]}, {"w": "an", "b": [0.7297, 0.8186, 0.7489, 0.8336]}, {"w": "email", "b": [0.755, 0.8186, 0.7975, 0.8336]}, {"w": "contains", "b": [0.8036, 0.8186, 0.8689, 0.8336]}, {"w": "more", "b": [0.1312, 0.8366, 0.1713, 0.8515]}, {"w": "than", "b": [0.1774, 0.8366, 0.2143, 0.8515]}, {"w": "one", "b": [0.2205, 0.8366, 0.2482, 0.8515]}, {"w": "smiley,", "b": [0.2543, 0.8366, 0.3088, 0.8515]}, {"w": "and", "b": [0.3149, 0.8366, 0.3447, 0.8515]}, {"w": "0", "b": [0.3507, 0.8366, 0.36, 0.8515]}, {"w": "otherwise.", "b": [0.3661, 0.8366, 0.4473, 0.8515]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 18", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "18", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 108, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "4.3 Stacking Features", "words": [{"w": "4.3", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Stacking", "b": [0.188, 0.0861, 0.2804, 0.104]}, {"w": "Features", "b": [0.2887, 0.0861, 0.3807, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "Back to our problem of movie title classification in tweets. Each example has three parts:", "words": [{"w": "Back", "b": [0.1312, 0.1247, 0.171, 0.1396]}, {"w": "to", "b": [0.1771, 0.1247, 0.1935, 0.1396]}, {"w": "our", "b": [0.1997, 0.1247, 0.2264, 0.1396]}, {"w": "problem", "b": [0.2325, 0.1247, 0.2982, 0.1396]}, {"w": "of", "b": [0.3043, 0.1247, 0.3192, 0.1396]}, {"w": "movie", "b": [0.3254, 0.1247, 0.3725, 0.1396]}, {"w": "title", "b": [0.3787, 0.1247, 0.4115, 0.1396]}, {"w": "classification", "b": [0.4176, 0.1247, 0.5194, 0.1396]}, {"w": "in", "b": [0.5255, 0.1247, 0.5409, 0.1396]}, {"w": "tweets.", "b": [0.5471, 0.1247, 0.6026, 0.1396]}, {"w": "Each", "b": [0.6107, 0.1247, 0.6505, 0.1396]}, {"w": "example", "b": [0.6566, 0.1247, 0.7228, 0.1396]}, {"w": "has", "b": [0.7289, 0.1247, 0.7557, 0.1396]}, {"w": "three", "b": [0.7618, 0.1247, 0.8029, 0.1396]}, {"w": "parts:", "b": [0.8091, 0.1247, 0.8554, 0.1396]}]}, {"id": "b_2", "type": "paragraph", "text": "1) five words4 that precede the extracted potential movie title (the left context), 2) the extracted potential movie title (the extraction), 3) five words that follow the extracted movie title (the right context).", "words": [{"w": "1)", "b": [0.1517, 0.1516, 0.1681, 0.1666]}, {"w": "five", "b": [0.1774, 0.1516, 0.2051, 0.1666]}, {"w": "words4", "b": [0.2112, 0.15, 0.2653, 0.1666]}, {"w": "that", "b": [0.2724, 0.1516, 0.3062, 0.1666]}, {"w": "precede", "b": [0.3124, 0.1516, 0.373, 0.1666]}, {"w": "the", "b": [0.3791, 0.1516, 0.4048, 0.1666]}, {"w": "extracted", "b": [0.4109, 0.1516, 0.4863, 0.1666]}, {"w": "potential", "b": [0.4925, 0.1516, 0.5643, 0.1666]}, {"w": "movie", "b": [0.5704, 0.1516, 0.6176, 0.1666]}, {"w": "title", "b": [0.6237, 0.1516, 0.6565, 0.1666]}, {"w": "(the", "b": [0.6627, 0.1516, 0.6955, 0.1666]}, {"w": "left", "b": [0.7017, 0.1516, 0.7278, 0.1666]}, {"w": "context),", "b": [0.734, 0.1516, 0.8058, 0.1666]}, {"w": "2)", "b": [0.1517, 0.1695, 0.1681, 0.1845]}, {"w": "the", "b": [0.1774, 0.1695, 0.203, 0.1845]}, {"w": "extracted", "b": [0.2091, 0.1695, 0.2846, 0.1845]}, {"w": "potential", "b": [0.2907, 0.1695, 0.3625, 0.1845]}, {"w": "movie", "b": [0.3687, 0.1695, 0.4158, 0.1845]}, {"w": "title", "b": [0.422, 0.1695, 0.4548, 0.1845]}, {"w": "(the", "b": [0.4609, 0.1695, 0.4938, 0.1845]}, {"w": "extraction),", "b": [0.4999, 0.1695, 0.5938, 0.1845]}, {"w": "3)", "b": [0.1517, 0.1875, 0.1681, 0.2024]}, {"w": "five", "b": [0.1774, 0.1875, 0.2051, 0.2024]}, {"w": "words", "b": [0.2112, 0.1875, 0.258, 0.2024]}, {"w": "that", "b": [0.2642, 0.1875, 0.298, 0.2024]}, {"w": "follow", "b": [0.3041, 0.1875, 0.3513, 0.2024]}, {"w": "the", "b": [0.3575, 0.1875, 0.3831, 0.2024]}, {"w": "extracted", "b": [0.3892, 0.1875, 0.4647, 0.2024]}, {"w": "movie", "b": [0.4708, 0.1875, 0.518, 0.2024]}, {"w": "title", "b": [0.5241, 0.1875, 0.557, 0.2024]}, {"w": "(the", "b": [0.5631, 0.1875, 0.5959, 0.2024]}, {"w": "right", "b": [0.6021, 0.1875, 0.6406, 0.2024]}, {"w": "context).", "b": [0.6467, 0.1875, 0.7185, 0.2024]}]}, {"id": "b_3", "type": "paragraph", "text": "To represent such multi-part examples, we first transform each part into a feature vector, and then stack the three feature vectors next to one another to obtain the feature vector for the entire example.", "words": [{"w": "To", "b": [0.1306, 0.2144, 0.152, 0.2294]}, {"w": "represent", "b": [0.1586, 0.2144, 0.2336, 0.2294]}, {"w": "such", "b": [0.2402, 0.2144, 0.2764, 0.2294]}, {"w": "multi-part", "b": [0.2829, 0.2144, 0.3672, 0.2294]}, {"w": "examples,", "b": [0.3737, 0.2144, 0.4538, 0.2294]}, {"w": "we", "b": [0.4605, 0.2144, 0.4819, 0.2294]}, {"w": "first", "b": [0.4885, 0.2144, 0.5211, 0.2294]}, {"w": "transform", "b": [0.5276, 0.2144, 0.6078, 0.2294]}, {"w": "each", "b": [0.6144, 0.2144, 0.6505, 0.2294]}, {"w": "part", "b": [0.657, 0.2144, 0.6916, 0.2294]}, {"w": "into", "b": [0.6981, 0.2144, 0.7301, 0.2294]}, {"w": "a", "b": [0.7366, 0.2144, 0.746, 0.2294]}, {"w": "feature", "b": [0.7525, 0.2144, 0.8096, 0.2294]}, {"w": "vector,", "b": [0.8162, 0.2144, 0.8717, 0.2294]}, {"w": "and", "b": [0.1312, 0.2324, 0.1606, 0.2473]}, {"w": "then", "b": [0.1668, 0.2324, 0.2022, 0.2473]}, {"w": "stack", "b": [0.2084, 0.2324, 0.249, 0.2473]}, {"w": "the", "b": [0.2551, 0.2324, 0.2805, 0.2473]}, {"w": "three", "b": [0.2866, 0.2324, 0.3272, 0.2473]}, {"w": "feature", "b": [0.3334, 0.2324, 0.3887, 0.2473]}, {"w": "vectors", "b": [0.3948, 0.2324, 0.4507, 0.2473]}, {"w": "next", "b": [0.4568, 0.2324, 0.4918, 0.2473]}, {"w": "to", "b": [0.4979, 0.2324, 0.5141, 0.2473]}, {"w": "one", "b": [0.5203, 0.2324, 0.5476, 0.2473]}, {"w": "another", "b": [0.5538, 0.2324, 0.6146, 0.2473]}, {"w": "to", "b": [0.6208, 0.2324, 0.637, 0.2473]}, {"w": "obtain", "b": [0.6431, 0.2324, 0.6938, 0.2473]}, {"w": "the", "b": [0.6999, 0.2324, 0.7253, 0.2473]}, {"w": "feature", "b": [0.7314, 0.2324, 0.7867, 0.2473]}, {"w": "vector", "b": [0.7929, 0.2324, 0.8415, 0.2473]}, {"w": "for", "b": [0.8477, 0.2324, 0.8695, 0.2473]}, {"w": "the", "b": [0.1312, 0.2503, 0.1569, 0.2653]}, {"w": "entire", "b": [0.163, 0.2503, 0.2087, 0.2653]}, {"w": "example.", "b": [0.2149, 0.2503, 0.2861, 0.2653]}]}, {"id": "b_4", "type": "paragraph", "text": "4.3.1 Stacking Feature Vectors", "words": [{"w": "4.3.1", "b": [0.1312, 0.2985, 0.1749, 0.3134]}, {"w": "Stacking", "b": [0.1961, 0.2985, 0.2748, 0.3134]}, {"w": "Feature", "b": [0.2818, 0.2985, 0.352, 0.3134]}, {"w": "Vectors", "b": [0.359, 0.2985, 0.4284, 0.3134]}]}, {"id": "b_5", "type": "paragraph", "text": "In our movie title classification problem, we first collect all the left contexts. We then apply bag-of-words to transform each left context into a binary feature vector. Next, collect all extractions and, using bag-of-words, transform each extraction into a binary feature vector. Then we collect all the right contexts and apply bag-of-words to transform each right context into a binary feature vector. Finally, we concatenate each example, joining the feature vectors of the left context, the extraction, and the right context. We obtain the final feature vector that represents the entire example, as shown in Figure 13.", "words": [{"w": "In", "b": [0.1312, 0.3347, 0.148, 0.3497]}, {"w": "our", "b": [0.1541, 0.3347, 0.1806, 0.3497]}, {"w": "movie", "b": [0.1868, 0.3347, 0.2336, 0.3497]}, {"w": "title", "b": [0.2397, 0.3347, 0.2722, 0.3497]}, {"w": "classification", "b": [0.2784, 0.3347, 0.3793, 0.3497]}, {"w": "problem,", "b": [0.3854, 0.3347, 0.4557, 0.3497]}, {"w": "we", "b": [0.4618, 0.3347, 0.4827, 0.3497]}, {"w": "first", "b": [0.4888, 0.3347, 0.5205, 0.3497]}, {"w": "collect", "b": [0.5266, 0.3347, 0.5775, 0.3497]}, {"w": "all", "b": [0.5836, 0.3347, 0.603, 0.3497]}, {"w": "the", "b": [0.6091, 0.3347, 0.6345, 0.3497]}, {"w": "left", "b": [0.6407, 0.3347, 0.6666, 0.3497]}, {"w": "contexts.", "b": [0.6727, 0.3347, 0.7441, 0.3497]}, {"w": "We", "b": [0.7523, 0.3347, 0.7777, 0.3497]}, {"w": "then", "b": [0.7838, 0.3347, 0.8194, 0.3497]}, {"w": "apply", "b": [0.8256, 0.3347, 0.8698, 0.3497]}, {"w": "bag-of-words", "b": [0.1312, 0.3527, 0.236, 0.3676]}, {"w": "to", "b": [0.2426, 0.3527, 0.2593, 0.3676]}, {"w": "transform", "b": [0.2659, 0.3527, 0.3461, 0.3676]}, {"w": "each", "b": [0.3527, 0.3527, 0.3888, 0.3676]}, {"w": "left", "b": [0.3954, 0.3527, 0.4221, 0.3676]}, {"w": "context", "b": [0.4287, 0.3527, 0.4894, 0.3676]}, {"w": "into", "b": [0.4959, 0.3527, 0.5279, 0.3676]}, {"w": "a", "b": [0.5345, 0.3527, 0.5439, 0.3676]}, {"w": "binary", "b": [0.5504, 0.3527, 0.6033, 0.3676]}, {"w": "feature", "b": [0.6099, 0.3527, 0.667, 0.3676]}, {"w": "vector.", "b": [0.6736, 0.3527, 0.7291, 0.3676]}, {"w": "Next,", "b": [0.7386, 0.3527, 0.7836, 0.3676]}, {"w": "collect", "b": [0.7903, 0.3527, 0.8426, 0.3676]}, {"w": "all", "b": [0.8492, 0.3527, 0.8691, 0.3676]}, {"w": "extractions", "b": [0.1312, 0.3706, 0.2204, 0.3856]}, {"w": "and,", "b": [0.2265, 0.3706, 0.2615, 0.3856]}, {"w": "using", "b": [0.2676, 0.3706, 0.3099, 0.3856]}, {"w": "bag-of-words,", "b": [0.316, 0.3706, 0.4241, 0.3856]}, {"w": "transform", "b": [0.4303, 0.3706, 0.5092, 0.3856]}, {"w": "each", "b": [0.5153, 0.3706, 0.5508, 0.3856]}, {"w": "extraction", "b": [0.5569, 0.3706, 0.6387, 0.3856]}, {"w": "into", "b": [0.6448, 0.3706, 0.6762, 0.3856]}, {"w": "a", "b": [0.6824, 0.3706, 0.6916, 0.3856]}, {"w": "binary", "b": [0.6977, 0.3706, 0.7497, 0.3856]}, {"w": "feature", "b": [0.7559, 0.3706, 0.812, 0.3856]}, {"w": "vector.", "b": [0.8181, 0.3706, 0.8727, 0.3856]}, {"w": "Then", "b": [0.1306, 0.3886, 0.1718, 0.4035]}, {"w": "we", "b": [0.1776, 0.3886, 0.1982, 0.4035]}, {"w": "collect", "b": [0.2041, 0.3886, 0.2544, 0.4035]}, {"w": "all", "b": [0.2603, 0.3886, 0.2794, 0.4035]}, {"w": "the", "b": [0.2852, 0.3886, 0.3104, 0.4035]}, {"w": "right", "b": [0.3162, 0.3886, 0.354, 0.4035]}, {"w": "contexts", "b": [0.3598, 0.3886, 0.4253, 0.4035]}, {"w": "and", "b": [0.4311, 0.3886, 0.4603, 0.4035]}, {"w": "apply", "b": [0.4662, 0.3886, 0.5099, 0.4035]}, {"w": "bag-of-words", "b": [0.5158, 0.3886, 0.6164, 0.4035]}, {"w": "to", "b": [0.6222, 0.3886, 0.6383, 0.4035]}, {"w": "transform", "b": [0.6442, 0.3886, 0.7213, 0.4035]}, {"w": "each", "b": [0.7271, 0.3886, 0.7618, 0.4035]}, {"w": "right", "b": [0.7677, 0.3886, 0.8054, 0.4035]}, {"w": "context", "b": [0.8113, 0.3886, 0.8696, 0.4035]}, {"w": "into", "b": [0.1312, 0.4065, 0.1619, 0.4215]}, {"w": "a", "b": [0.1672, 0.4065, 0.1763, 0.4215]}, {"w": "binary", "b": [0.1816, 0.4065, 0.2324, 0.4215]}, {"w": "feature", "b": [0.2378, 0.4065, 0.2926, 0.4215]}, {"w": "vector.", "b": [0.298, 0.4065, 0.3513, 0.4215]}, {"w": "Finally,", "b": [0.3592, 0.4065, 0.4182, 0.4215]}, {"w": "we", "b": [0.4238, 0.4065, 0.4443, 0.4215]}, {"w": "concatenate", "b": [0.4497, 0.4065, 0.5432, 0.4215]}, {"w": "each", "b": [0.5485, 0.4065, 0.5832, 0.4215]}, {"w": "example,", "b": [0.5886, 0.4065, 0.6584, 0.4215]}, {"w": "joining", "b": [0.6639, 0.4065, 0.7177, 0.4215]}, {"w": "the", "b": [0.723, 0.4065, 0.7482, 0.4215]}, {"w": "feature", "b": [0.7535, 0.4065, 0.8084, 0.4215]}, {"w": "vectors", "b": [0.8137, 0.4065, 0.8691, 0.4215]}, {"w": "of", "b": [0.1312, 0.4245, 0.1461, 0.4394]}, {"w": "the", "b": [0.1522, 0.4245, 0.1778, 0.4394]}, {"w": "left", "b": [0.184, 0.4245, 0.2101, 0.4394]}, {"w": "context,", "b": [0.2163, 0.4245, 0.2808, 0.4394]}, {"w": "the", "b": [0.2869, 0.4245, 0.3126, 0.4394]}, {"w": "extraction,", "b": [0.3187, 0.4245, 0.4053, 0.4394]}, {"w": "and", "b": [0.4115, 0.4245, 0.4412, 0.4394]}, {"w": "the", "b": [0.4473, 0.4245, 0.4729, 0.4394]}, {"w": "right", "b": [0.4791, 0.4245, 0.5175, 0.4394]}, {"w": "context.", "b": [0.5237, 0.4245, 0.5882, 0.4394]}, {"w": "We", "b": [0.5964, 0.4245, 0.622, 0.4394]}, {"w": "obtain", "b": [0.6282, 0.4245, 0.6794, 0.4394]}, {"w": "the", "b": [0.6855, 0.4245, 0.7111, 0.4394]}, {"w": "final", "b": [0.7173, 0.4245, 0.7521, 0.4394]}, {"w": "feature", "b": [0.7582, 0.4245, 0.8142, 0.4394]}, {"w": "vector", "b": [0.8203, 0.4245, 0.8695, 0.4394]}, {"w": "that", "b": [0.1312, 0.4424, 0.1651, 0.4574]}, {"w": "represents", "b": [0.1712, 0.4424, 0.2521, 0.4574]}, {"w": "the", "b": [0.2582, 0.4424, 0.2838, 0.4574]}, {"w": "entire", "b": [0.29, 0.4424, 0.3357, 0.4574]}, {"w": "example,", "b": [0.3419, 0.4424, 0.4131, 0.4574]}, {"w": "as", "b": [0.4193, 0.4424, 0.4358, 0.4574]}, {"w": "shown", "b": [0.4419, 0.4424, 0.4918, 0.4574]}, {"w": "in", "b": [0.4979, 0.4424, 0.5133, 0.4574]}, {"w": "Figure", "b": [0.5194, 0.4424, 0.5715, 0.4574]}, {"w": "13.", "b": [0.5777, 0.4424, 0.6013, 0.4574]}]}, {"id": "b_6", "type": "paragraph", "text": "Note that the three feature vectors (one from each part of the example) are created indepen- dently of one another. This means that the vocabulary of tokens is different for each part and, therefore, the feature vector dimensionality of each part may also be different.", "words": [{"w": "Note", "b": [0.1312, 0.4693, 0.1691, 0.4843]}, {"w": "that", "b": [0.1752, 0.4693, 0.2085, 0.4843]}, {"w": "the", "b": [0.2147, 0.4693, 0.2399, 0.4843]}, {"w": "three", "b": [0.246, 0.4693, 0.2865, 0.4843]}, {"w": "feature", "b": [0.2926, 0.4693, 0.3476, 0.4843]}, {"w": "vectors", "b": [0.3538, 0.4693, 0.4094, 0.4843]}, {"w": "(one", "b": [0.4156, 0.4693, 0.4499, 0.4843]}, {"w": "from", "b": [0.456, 0.4693, 0.4929, 0.4843]}, {"w": "each", "b": [0.4991, 0.4693, 0.5339, 0.4843]}, {"w": "part", "b": [0.54, 0.4693, 0.5734, 0.4843]}, {"w": "of", "b": [0.5795, 0.4693, 0.5941, 0.4843]}, {"w": "the", "b": [0.6003, 0.4693, 0.6255, 0.4843]}, {"w": "example)", "b": [0.6317, 0.4693, 0.7038, 0.4843]}, {"w": "are", "b": [0.7099, 0.4693, 0.7342, 0.4843]}, {"w": "created", "b": [0.7404, 0.4693, 0.7979, 0.4843]}, {"w": "indepen-", "b": [0.8041, 0.4693, 0.8722, 0.4843]}, {"w": "dently", "b": [0.1312, 0.4873, 0.1825, 0.5022]}, {"w": "of", "b": [0.1887, 0.4873, 0.2039, 0.5022]}, {"w": "one", "b": [0.2101, 0.4873, 0.2383, 0.5022]}, {"w": "another.", "b": [0.2446, 0.4873, 0.3126, 0.5022]}, {"w": "This", "b": [0.321, 0.4873, 0.3577, 0.5022]}, {"w": "means", "b": [0.3639, 0.4873, 0.4153, 0.5022]}, {"w": "that", "b": [0.4215, 0.4873, 0.456, 0.5022]}, {"w": "the", "b": [0.4622, 0.4873, 0.4884, 0.5022]}, {"w": "vocabulary", "b": [0.4946, 0.4873, 0.5846, 0.5022]}, {"w": "of", "b": [0.5908, 0.4873, 0.606, 0.5022]}, {"w": "tokens", "b": [0.6122, 0.4873, 0.6646, 0.5022]}, {"w": "is", "b": [0.6708, 0.4873, 0.6835, 0.5022]}, {"w": "different", "b": [0.6897, 0.4873, 0.7577, 0.5022]}, {"w": "for", "b": [0.764, 0.4873, 0.7865, 0.5022]}, {"w": "each", "b": [0.7927, 0.4873, 0.8288, 0.5022]}, {"w": "part", "b": [0.8351, 0.4873, 0.8696, 0.5022]}, {"w": "and,", "b": [0.1312, 0.5052, 0.1661, 0.5202]}, {"w": "therefore,", "b": [0.1722, 0.5052, 0.2488, 0.5202]}, {"w": "the", "b": [0.2549, 0.5052, 0.2806, 0.5202]}, {"w": "feature", "b": [0.2867, 0.5052, 0.3427, 0.5202]}, {"w": "vector", "b": [0.3488, 0.5052, 0.3981, 0.5202]}, {"w": "dimensionality", "b": [0.4042, 0.5052, 0.5213, 0.5202]}, {"w": "of", "b": [0.5274, 0.5052, 0.5423, 0.5202]}, {"w": "each", "b": [0.5484, 0.5052, 0.5838, 0.5202]}, {"w": "part", "b": [0.59, 0.5052, 0.6238, 0.5202]}, {"w": "may", "b": [0.63, 0.5052, 0.6638, 0.5202]}, {"w": "also", "b": [0.67, 0.5052, 0.7008, 0.5202]}, {"w": "be", "b": [0.707, 0.5052, 0.726, 0.5202]}, {"w": "different.", "b": [0.7321, 0.5052, 0.8039, 0.5202]}]}, {"id": "b_7", "type": "paragraph", "text": "The order in which you concatenate feature vectors doesn’t matter. The left context features can be placed in the middle or right side of the final feature vector. However, you must keep the same concatenation order in all examples. This ensures each feature represents the same property from one example to another.", "words": [{"w": "The", "b": [0.1306, 0.5321, 0.1617, 0.5471]}, {"w": "order", "b": [0.1678, 0.5321, 0.2091, 0.5471]}, {"w": "in", "b": [0.2152, 0.5321, 0.2303, 0.5471]}, {"w": "which", "b": [0.2364, 0.5321, 0.2821, 0.5471]}, {"w": "you", "b": [0.2882, 0.5321, 0.3163, 0.5471]}, {"w": "concatenate", "b": [0.3224, 0.5321, 0.4159, 0.5471]}, {"w": "feature", "b": [0.4219, 0.5321, 0.4768, 0.5471]}, {"w": "vectors", "b": [0.4828, 0.5321, 0.5383, 0.5471]}, {"w": "doesn’t", "b": [0.5444, 0.5321, 0.6013, 0.5471]}, {"w": "matter.", "b": [0.6073, 0.5321, 0.6657, 0.5471]}, {"w": "The", "b": [0.6738, 0.5321, 0.705, 0.5471]}, {"w": "left", "b": [0.7111, 0.5321, 0.7367, 0.5471]}, {"w": "context", "b": [0.7428, 0.5321, 0.8011, 0.5471]}, {"w": "features", "b": [0.8072, 0.5321, 0.8691, 0.5471]}, {"w": "can", "b": [0.1312, 0.5501, 0.1585, 0.5651]}, {"w": "be", "b": [0.1646, 0.5501, 0.1833, 0.5651]}, {"w": "placed", "b": [0.1894, 0.5501, 0.2398, 0.5651]}, {"w": "in", "b": [0.2459, 0.5501, 0.2611, 0.5651]}, {"w": "the", "b": [0.2672, 0.5501, 0.2924, 0.5651]}, {"w": "middle", "b": [0.2986, 0.5501, 0.352, 0.5651]}, {"w": "or", "b": [0.3581, 0.5501, 0.3743, 0.5651]}, {"w": "right", "b": [0.3804, 0.5501, 0.4183, 0.5651]}, {"w": "side", "b": [0.4244, 0.5501, 0.4548, 0.5651]}, {"w": "of", "b": [0.4609, 0.5501, 0.4755, 0.5651]}, {"w": "the", "b": [0.4817, 0.5501, 0.5069, 0.5651]}, {"w": "final", "b": [0.513, 0.5501, 0.5473, 0.5651]}, {"w": "feature", "b": [0.5534, 0.5501, 0.6084, 0.5651]}, {"w": "vector.", "b": [0.6146, 0.5501, 0.668, 0.5651]}, {"w": "However,", "b": [0.6762, 0.5501, 0.7483, 0.5651]}, {"w": "you", "b": [0.7545, 0.5501, 0.7827, 0.5651]}, {"w": "must", "b": [0.7888, 0.5501, 0.8277, 0.5651]}, {"w": "keep", "b": [0.8339, 0.5501, 0.8691, 0.5651]}, {"w": "the", "b": [0.1312, 0.568, 0.1565, 0.583]}, {"w": "same", "b": [0.1627, 0.568, 0.2021, 0.583]}, {"w": "concatenation", "b": [0.2083, 0.568, 0.3184, 0.583]}, {"w": "order", "b": [0.3246, 0.568, 0.3661, 0.583]}, {"w": "in", "b": [0.3723, 0.568, 0.3874, 0.583]}, {"w": "all", "b": [0.3936, 0.568, 0.4128, 0.583]}, {"w": "examples.", "b": [0.4189, 0.568, 0.4963, 0.583]}, {"w": "This", "b": [0.5046, 0.568, 0.54, 0.583]}, {"w": "ensures", "b": [0.5462, 0.568, 0.604, 0.583]}, {"w": "each", "b": [0.6102, 0.568, 0.645, 0.583]}, {"w": "feature", "b": [0.6512, 0.568, 0.7063, 0.583]}, {"w": "represents", "b": [0.7125, 0.568, 0.7921, 0.583]}, {"w": "the", "b": [0.7983, 0.568, 0.8235, 0.583]}, {"w": "same", "b": [0.8297, 0.568, 0.8692, 0.583]}, {"w": "property", "b": [0.1312, 0.586, 0.2006, 0.6009]}, {"w": "from", "b": [0.2067, 0.586, 0.2442, 0.6009]}, {"w": "one", "b": [0.2503, 0.586, 0.278, 0.6009]}, {"w": "example", "b": [0.2842, 0.586, 0.3503, 0.6009]}, {"w": "to", "b": [0.3565, 0.586, 0.3729, 0.6009]}, {"w": "another.", "b": [0.379, 0.586, 0.4457, 0.6009]}]}, {"id": "b_8", "type": "paragraph", "text": "4.3.2 Stacking Individual Features", "words": [{"w": "4.3.2", "b": [0.1312, 0.6341, 0.1749, 0.6491]}, {"w": "Stacking", "b": [0.1961, 0.6341, 0.2748, 0.6491]}, {"w": "Individual", "b": [0.2818, 0.6341, 0.3763, 0.6491]}, {"w": "Features", "b": [0.3833, 0.6341, 0.4618, 0.6491]}]}, {"id": "b_9", "type": "paragraph", "text": "Until now, we engineered features in bulk. One-hot encoding and bag-of-words often generate thousands of features. This is a very time-efficient way of engineering features, but some problems require more to obtain feature vectors with high enough predictive power. We consider the predictive power of a feature in the next section.", "words": [{"w": "Until", "b": [0.1312, 0.6704, 0.1714, 0.6854]}, {"w": "now,", "b": [0.1771, 0.6704, 0.2137, 0.6854]}, {"w": "we", "b": [0.2195, 0.6704, 0.2401, 0.6854]}, {"w": "engineered", "b": [0.2457, 0.6704, 0.3292, 0.6854]}, {"w": "features", "b": [0.3348, 0.6704, 0.3968, 0.6854]}, {"w": "in", "b": [0.4024, 0.6704, 0.4175, 0.6854]}, {"w": "bulk.", "b": [0.4232, 0.6704, 0.4629, 0.6854]}, {"w": "One-hot", "b": [0.4709, 0.6704, 0.5352, 0.6854]}, {"w": "encoding", "b": [0.5408, 0.6704, 0.6107, 0.6854]}, {"w": "and", "b": [0.6163, 0.6704, 0.6455, 0.6854]}, {"w": "bag-of-words", "b": [0.6511, 0.6704, 0.7517, 0.6854]}, {"w": "often", "b": [0.7574, 0.6704, 0.7971, 0.6854]}, {"w": "generate", "b": [0.8027, 0.6704, 0.8691, 0.6854]}, {"w": "thousands", "b": [0.1312, 0.6884, 0.2141, 0.7033]}, {"w": "of", "b": [0.2208, 0.6884, 0.236, 0.7033]}, {"w": "features.", "b": [0.2427, 0.6884, 0.3125, 0.7033]}, {"w": "This", "b": [0.3224, 0.6884, 0.3591, 0.7033]}, {"w": "is", "b": [0.3659, 0.6884, 0.3785, 0.7033]}, {"w": "a", "b": [0.3853, 0.6884, 0.3947, 0.7033]}, {"w": "very", "b": [0.4014, 0.6884, 0.4365, 0.7033]}, {"w": "time-efficient", "b": [0.4433, 0.6884, 0.5495, 0.7033]}, {"w": "way", "b": [0.5562, 0.6884, 0.5881, 0.7033]}, {"w": "of", "b": [0.5948, 0.6884, 0.61, 0.7033]}, {"w": "engineering", "b": [0.6167, 0.6884, 0.7099, 0.7033]}, {"w": "features,", "b": [0.7166, 0.6884, 0.7864, 0.7033]}, {"w": "but", "b": [0.7933, 0.6884, 0.8215, 0.7033]}, {"w": "some", "b": [0.8282, 0.6884, 0.8691, 0.7033]}, {"w": "problems", "b": [0.1312, 0.7063, 0.205, 0.7213]}, {"w": "require", "b": [0.2111, 0.7063, 0.2677, 0.7213]}, {"w": "more", "b": [0.2739, 0.7063, 0.3143, 0.7213]}, {"w": "to", "b": [0.3205, 0.7063, 0.3371, 0.7213]}, {"w": "obtain", "b": [0.3432, 0.7063, 0.395, 0.7213]}, {"w": "feature", "b": [0.4011, 0.7063, 0.4577, 0.7213]}, {"w": "vectors", "b": [0.4638, 0.7063, 0.521, 0.7213]}, {"w": "with", "b": [0.5271, 0.7063, 0.5634, 0.7213]}, {"w": "high", "b": [0.5696, 0.7063, 0.6048, 0.7213]}, {"w": "enough", "b": [0.6109, 0.7063, 0.669, 0.7213]}, {"w": "predictive", "b": [0.675, 0.7066, 0.7669, 0.7216]}, {"w": "power.", "b": [0.7739, 0.7063, 0.8347, 0.7216]}, {"w": "We", "b": [0.8428, 0.7063, 0.8688, 0.7213]}, {"w": "consider", "b": [0.1312, 0.7243, 0.197, 0.7392]}, {"w": "the", "b": [0.2032, 0.7243, 0.2288, 0.7392]}, {"w": "predictive", "b": [0.235, 0.7243, 0.314, 0.7392]}, {"w": "power", "b": [0.3202, 0.7243, 0.3679, 0.7392]}, {"w": "of", "b": [0.374, 0.7243, 0.3889, 0.7392]}, {"w": "a", "b": [0.3951, 0.7243, 0.4043, 0.7392]}, {"w": "feature", "b": [0.4104, 0.7243, 0.4664, 0.7392]}, {"w": "in", "b": [0.4725, 0.7243, 0.4879, 0.7392]}, {"w": "the", "b": [0.4941, 0.7243, 0.5197, 0.7392]}, {"w": "next", "b": [0.5259, 0.7243, 0.5612, 0.7392]}, {"w": "section.", "b": [0.5674, 0.7243, 0.628, 0.7392]}]}, {"id": "b_10", "type": "paragraph", "text": "Imagine that you already have a classifier mA that takes an entire tweet as input and predicts its topic. Let one of the topics be cinema. You might want to enrich the feature vectors in your movie title classification problem with this additional information available from the classifier mA. In this case, you will engineer one feature that can be described as “whether", "words": [{"w": "Imagine", "b": [0.1312, 0.7512, 0.194, 0.7661]}, {"w": "that", "b": [0.1995, 0.7512, 0.2326, 0.7661]}, {"w": "you", "b": [0.2381, 0.7512, 0.2662, 0.7661]}, {"w": "already", "b": [0.2716, 0.7512, 0.3294, 0.7661]}, {"w": "have", "b": [0.3349, 0.7512, 0.3705, 0.7661]}, {"w": "a", "b": [0.376, 0.7512, 0.385, 0.7661]}, {"w": "classifier", "b": [0.3904, 0.7512, 0.457, 0.7661]}, {"w": "mA", "b": [0.4623, 0.7515, 0.4896, 0.7677]}, {"w": "that", "b": [0.496, 0.7512, 0.5291, 0.7661]}, {"w": "takes", "b": [0.5346, 0.7512, 0.5749, 0.7661]}, {"w": "an", "b": [0.5803, 0.7512, 0.5994, 0.7661]}, {"w": "entire", "b": [0.6048, 0.7512, 0.6496, 0.7661]}, {"w": "tweet", "b": [0.655, 0.7512, 0.6972, 0.7661]}, {"w": "as", "b": [0.7027, 0.7512, 0.7188, 0.7661]}, {"w": "input", "b": [0.7243, 0.7512, 0.7665, 0.7661]}, {"w": "and", "b": [0.7719, 0.7512, 0.8011, 0.7661]}, {"w": "predicts", "b": [0.8065, 0.7512, 0.869, 0.7661]}, {"w": "its", "b": [0.1312, 0.7691, 0.151, 0.7841]}, {"w": "topic.", "b": [0.1571, 0.7691, 0.2027, 0.7841]}, {"w": "Let", "b": [0.2109, 0.7691, 0.238, 0.7841]}, {"w": "one", "b": [0.2442, 0.7691, 0.2721, 0.7841]}, {"w": "of", "b": [0.2783, 0.7691, 0.2933, 0.7841]}, {"w": "the", "b": [0.2994, 0.7691, 0.3253, 0.7841]}, {"w": "topics", "b": [0.3314, 0.7691, 0.3791, 0.7841]}, {"w": "be", "b": [0.3853, 0.7691, 0.4044, 0.7841]}, {"w": "cinema.", "b": [0.4105, 0.7691, 0.4726, 0.7841]}, {"w": "You", "b": [0.4808, 0.7691, 0.5129, 0.7841]}, {"w": "might", "b": [0.519, 0.7691, 0.5661, 0.7841]}, {"w": "want", "b": [0.5722, 0.7691, 0.6116, 0.7841]}, {"w": "to", "b": [0.6177, 0.7691, 0.6343, 0.7841]}, {"w": "enrich", "b": [0.6404, 0.7691, 0.6896, 0.7841]}, {"w": "the", "b": [0.6958, 0.7691, 0.7216, 0.7841]}, {"w": "feature", "b": [0.7278, 0.7691, 0.7842, 0.7841]}, {"w": "vectors", "b": [0.7904, 0.7691, 0.8475, 0.7841]}, {"w": "in", "b": [0.8536, 0.7691, 0.8691, 0.7841]}, {"w": "your", "b": [0.1308, 0.7871, 0.1674, 0.802]}, {"w": "movie", "b": [0.1736, 0.7871, 0.2218, 0.802]}, {"w": "title", "b": [0.228, 0.7871, 0.2614, 0.802]}, {"w": "classification", "b": [0.2677, 0.7871, 0.3714, 0.802]}, {"w": "problem", "b": [0.3776, 0.7871, 0.4446, 0.802]}, {"w": "with", "b": [0.4509, 0.7871, 0.4875, 0.802]}, {"w": "this", "b": [0.4937, 0.7871, 0.5241, 0.802]}, {"w": "additional", "b": [0.5303, 0.7871, 0.613, 0.802]}, {"w": "information", "b": [0.6192, 0.7871, 0.7149, 0.802]}, {"w": "available", "b": [0.7211, 0.7871, 0.7923, 0.802]}, {"w": "from", "b": [0.7985, 0.7871, 0.8367, 0.802]}, {"w": "the", "b": [0.8429, 0.7871, 0.8691, 0.802]}, {"w": "classifier", "b": [0.1312, 0.805, 0.1997, 0.82]}, {"w": "mA.", "b": [0.2058, 0.805, 0.2391, 0.8215]}, {"w": "In", "b": [0.2473, 0.805, 0.2644, 0.82]}, {"w": "this", "b": [0.2705, 0.805, 0.3006, 0.82]}, {"w": "case,", "b": [0.3067, 0.805, 0.345, 0.82]}, {"w": "you", "b": [0.3512, 0.805, 0.3801, 0.82]}, {"w": "will", "b": [0.3862, 0.805, 0.4151, 0.82]}, {"w": "engineer", "b": [0.4213, 0.805, 0.4885, 0.82]}, {"w": "one", "b": [0.4946, 0.805, 0.5225, 0.82]}, {"w": "feature", "b": [0.5286, 0.805, 0.585, 0.82]}, {"w": "that", "b": [0.5911, 0.805, 0.6252, 0.82]}, {"w": "can", "b": [0.6313, 0.805, 0.6592, 0.82]}, {"w": "be", "b": [0.6654, 0.805, 0.6845, 0.82]}, {"w": "described", "b": [0.6906, 0.805, 0.7667, 0.82]}, {"w": "as", "b": [0.7728, 0.805, 0.7895, 0.82]}, {"w": "“whether", "b": [0.7956, 0.805, 0.8695, 0.82]}]}, {"id": "b_11", "type": "paragraph", "text": "4In practice, the context to the left or the right of the potential movie title can for some examples be shorter than five words, because it’s either the beginning or the end of the tweet.", "words": [{"w": "4In", "b": [0.1518, 0.8321, 0.1741, 0.8459]}, {"w": "practice,", "b": [0.1798, 0.8339, 0.2393, 0.8459]}, {"w": "the", "b": [0.2451, 0.8339, 0.2673, 0.8459]}, {"w": "context", "b": [0.273, 0.8339, 0.3245, 0.8459]}, {"w": "to", "b": [0.3302, 0.8339, 0.3444, 0.8459]}, {"w": "the", "b": [0.3501, 0.8339, 0.3723, 0.8459]}, {"w": "left", "b": [0.3779, 0.8339, 0.4006, 0.8459]}, {"w": "or", "b": [0.4063, 0.8339, 0.4205, 0.8459]}, {"w": "the", "b": [0.4262, 0.8339, 0.4484, 0.8459]}, {"w": "right", "b": [0.4541, 0.8339, 0.4874, 0.8459]}, {"w": "of", "b": [0.4931, 0.8339, 0.5059, 0.8459]}, {"w": "the", "b": [0.5116, 0.8339, 0.5338, 0.8459]}, {"w": "potential", "b": [0.5395, 0.8339, 0.6017, 0.8459]}, {"w": "movie", "b": [0.6073, 0.8339, 0.6482, 0.8459]}, {"w": "title", "b": [0.6539, 0.8339, 0.6823, 0.8459]}, {"w": "can", "b": [0.688, 0.8339, 0.712, 0.8459]}, {"w": "for", "b": [0.7176, 0.8339, 0.7368, 0.8459]}, {"w": "some", "b": [0.7424, 0.8339, 0.7772, 0.8459]}, {"w": "examples", "b": [0.7828, 0.8339, 0.8464, 0.8459]}, {"w": "be", "b": [0.8521, 0.8339, 0.8685, 0.8459]}, {"w": "shorter", "b": [0.1312, 0.8482, 0.1792, 0.8601]}, {"w": "than", "b": [0.1845, 0.8482, 0.2158, 0.8601]}, {"w": "five", "b": [0.221, 0.8482, 0.2446, 0.8601]}, {"w": "words,", "b": [0.2498, 0.8482, 0.2939, 0.8601]}, {"w": "because", "b": [0.2991, 0.8482, 0.3519, 0.8601]}, {"w": "it’s", "b": [0.3571, 0.8482, 0.3781, 0.8601]}, {"w": "either", "b": [0.3833, 0.8482, 0.4225, 0.8601]}, {"w": "the", "b": [0.4278, 0.8482, 0.4495, 0.8601]}, {"w": "beginning", "b": [0.4547, 0.8482, 0.5214, 0.8601]}, {"w": "or", "b": [0.5266, 0.8482, 0.5405, 0.8601]}, {"w": "the", "b": [0.5458, 0.8482, 0.5675, 0.8601]}, {"w": "end", "b": [0.5728, 0.8482, 0.5971, 0.8601]}, {"w": "of", "b": [0.6024, 0.8482, 0.615, 0.8601]}, {"w": "the", "b": [0.6202, 0.8482, 0.642, 0.8601]}, {"w": "tweet.", "b": [0.6472, 0.8482, 0.6882, 0.8601]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 19", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "19", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 109, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "0 1 0", "words": [{"w": "0", "b": [0.1387, 0.1945, 0.1499, 0.2139]}, {"w": "1", "b": [0.1726, 0.1945, 0.1837, 0.2139]}, {"w": "0", "b": [0.2064, 0.1945, 0.2176, 0.2139]}]}, {"id": "b_1", "type": "paragraph", "text": "avatar is sarah connor from", "words": [{"w": "avatar", "b": [0.1165, 0.1025, 0.1676, 0.1218]}, {"w": "is", "b": [0.1725, 0.1025, 0.1858, 0.1218]}, {"w": "sarah", "b": [0.1907, 0.1025, 0.2361, 0.1218]}, {"w": "connor", "b": [0.241, 0.1025, 0.2983, 0.1218]}, {"w": "from", "b": [0.3032, 0.1025, 0.3407, 0.1218]}]}, {"id": "b_2", "type": "paragraph", "text": "0 ... 0", "words": [{"w": "0", "b": [0.2403, 0.1945, 0.2514, 0.2139]}, {"w": "...", "b": [0.2724, 0.1945, 0.2871, 0.2139]}, {"w": "0", "b": [0.308, 0.1945, 0.3191, 0.2139]}]}, {"id": "b_3", "type": "paragraph", "text": "0 1 0 0 ... 0", "words": [{"w": "0", "b": [0.2066, 0.3453, 0.2177, 0.3646]}, {"w": "1", "b": [0.2404, 0.3453, 0.2516, 0.3646]}, {"w": "0", "b": [0.2743, 0.3453, 0.2854, 0.3646]}, {"w": "0", "b": [0.3081, 0.3453, 0.3193, 0.3646]}, {"w": "...", "b": [0.3402, 0.3453, 0.3549, 0.3646]}, {"w": "0", "b": [0.3758, 0.3453, 0.387, 0.3646]}]}, {"id": "b_4", "type": "paragraph", "text": "feature vector of", "words": [{"w": "feature", "b": [0.1661, 0.2355, 0.2203, 0.2539]}, {"w": "vector", "b": [0.2248, 0.2355, 0.272, 0.2539]}, {"w": "of", "b": [0.2765, 0.2355, 0.291, 0.2539]}]}, {"id": "b_5", "type": "paragraph", "text": "the left context", "words": [{"w": "the", "b": [0.1704, 0.2502, 0.1945, 0.2686]}, {"w": "left", "b": [0.199, 0.2496, 0.2241, 0.2686]}, {"w": "context", "b": [0.2286, 0.2496, 0.2868, 0.2686]}]}, {"id": "b_6", "type": "paragraph", "text": "bag of", "words": [{"w": "bag", "b": [0.173, 0.1388, 0.2016, 0.1572]}, {"w": "of", "b": [0.2061, 0.1388, 0.2207, 0.1572]}]}, {"id": "b_7", "type": "paragraph", "text": "words", "words": [{"w": "words", "b": [0.1751, 0.1535, 0.2207, 0.1719]}]}, {"id": "b_8", "type": "paragraph", "text": "concatenation concatenation", "words": [{"w": "concatenation", "b": [0.3444, 0.3188, 0.452, 0.3372]}, {"w": "concatenation", "b": [0.5479, 0.3188, 0.6556, 0.3372]}]}, {"id": "b_9", "type": "paragraph", "text": "0 0 0", "words": [{"w": "0", "b": [0.4101, 0.1945, 0.4213, 0.2139]}, {"w": "0", "b": [0.444, 0.1945, 0.4551, 0.2139]}, {"w": "0", "b": [0.4778, 0.1945, 0.489, 0.2139]}]}, {"id": "b_10", "type": "paragraph", "text": "the terminator", "words": [{"w": "the", "b": [0.4414, 0.1025, 0.4677, 0.1218]}, {"w": "terminator", "b": [0.4725, 0.1025, 0.5586, 0.1218]}]}, {"id": "b_11", "type": "paragraph", "text": "1 ... 1", "words": [{"w": "1", "b": [0.5117, 0.1945, 0.5228, 0.2139]}, {"w": "...", "b": [0.5438, 0.1945, 0.5585, 0.2139]}, {"w": "1", "b": [0.5794, 0.1945, 0.5905, 0.2139]}]}, {"id": "b_12", "type": "paragraph", "text": "feature vector of", "words": [{"w": "feature", "b": [0.4375, 0.2355, 0.4917, 0.2539]}, {"w": "vector", "b": [0.4962, 0.2355, 0.5434, 0.2539]}, {"w": "of", "b": [0.5479, 0.2355, 0.5624, 0.2539]}]}, {"id": "b_13", "type": "paragraph", "text": "the extraction", "words": [{"w": "the", "b": [0.446, 0.2502, 0.4701, 0.2686]}, {"w": "extraction", "b": [0.4746, 0.2496, 0.554, 0.2686]}]}, {"id": "b_14", "type": "paragraph", "text": "0 0 0 1 ... 1", "words": [{"w": "0", "b": [0.4101, 0.3453, 0.4213, 0.3646]}, {"w": "0", "b": [0.444, 0.3453, 0.4551, 0.3646]}, {"w": "0", "b": [0.4778, 0.3453, 0.489, 0.3646]}, {"w": "1", "b": [0.5117, 0.3453, 0.5228, 0.3646]}, {"w": "...", "b": [0.5438, 0.3453, 0.5585, 0.3646]}, {"w": "1", "b": [0.5794, 0.3453, 0.5905, 0.3646]}]}, {"id": "b_15", "type": "paragraph", "text": "feature vector of the entire example", "words": [{"w": "feature", "b": [0.4375, 0.3862, 0.4917, 0.4046]}, {"w": "vector", "b": [0.4962, 0.3862, 0.5434, 0.4046]}, {"w": "of", "b": [0.5479, 0.3862, 0.5624, 0.4046]}, {"w": "the", "b": [0.4275, 0.4009, 0.4517, 0.4193]}, {"w": "entire", "b": [0.4562, 0.4003, 0.5019, 0.4193]}, {"w": "example", "b": [0.5064, 0.4003, 0.5724, 0.4193]}]}, {"id": "b_16", "type": "paragraph", "text": "bag of", "words": [{"w": "bag", "b": [0.4444, 0.1388, 0.473, 0.1572]}, {"w": "of", "b": [0.4775, 0.1388, 0.4921, 0.1572]}]}, {"id": "b_17", "type": "paragraph", "text": "words", "words": [{"w": "words", "b": [0.4465, 0.1535, 0.4921, 0.1719]}]}, {"id": "b_18", "type": "paragraph", "text": "0 0 1", "words": [{"w": "0", "b": [0.6815, 0.1945, 0.6927, 0.2139]}, {"w": "0", "b": [0.7154, 0.1945, 0.7265, 0.2139]}, {"w": "1", "b": [0.7492, 0.1945, 0.7604, 0.2139]}]}, {"id": "b_19", "type": "paragraph", "text": "it is her favorite movie", "words": [{"w": "it", "b": [0.6812, 0.1025, 0.6922, 0.1218]}, {"w": "is", "b": [0.697, 0.1025, 0.7103, 0.1218]}, {"w": "her", "b": [0.7152, 0.1025, 0.7422, 0.1218]}, {"w": "favorite", "b": [0.7471, 0.1025, 0.8086, 0.1218]}, {"w": "movie", "b": [0.8135, 0.1025, 0.8616, 0.1218]}]}, {"id": "b_20", "type": "paragraph", "text": "0 ... 1", "words": [{"w": "0", "b": [0.7831, 0.1945, 0.7942, 0.2139]}, {"w": "...", "b": [0.8151, 0.1945, 0.8299, 0.2139]}, {"w": "1", "b": [0.8508, 0.1945, 0.8619, 0.2139]}]}, {"id": "b_21", "type": "paragraph", "text": "0 0 1 0 ... 1", "words": [{"w": "0", "b": [0.6137, 0.3453, 0.6248, 0.3646]}, {"w": "0", "b": [0.6475, 0.3453, 0.6587, 0.3646]}, {"w": "1", "b": [0.6814, 0.3453, 0.6925, 0.3646]}, {"w": "0", "b": [0.7152, 0.3453, 0.7264, 0.3646]}, {"w": "...", "b": [0.7473, 0.3453, 0.762, 0.3646]}, {"w": "1", "b": [0.7829, 0.3453, 0.7941, 0.3646]}]}, {"id": "b_22", "type": "paragraph", "text": "feature vector of the right context", "words": [{"w": "feature", "b": [0.7089, 0.2355, 0.7631, 0.2539]}, {"w": "vector", "b": [0.7676, 0.2355, 0.8148, 0.2539]}, {"w": "of", "b": [0.8193, 0.2355, 0.8338, 0.2539]}, {"w": "the", "b": [0.7072, 0.2502, 0.7314, 0.2686]}, {"w": "right", "b": [0.7359, 0.2496, 0.7729, 0.2686]}, {"w": "context", "b": [0.7774, 0.2496, 0.8356, 0.2686]}]}, {"id": "b_23", "type": "paragraph", "text": "bag of", "words": [{"w": "bag", "b": [0.7158, 0.1388, 0.7444, 0.1572]}, {"w": "of", "b": [0.7489, 0.1388, 0.7635, 0.1572]}]}, {"id": "b_24", "type": "paragraph", "text": "words", "words": [{"w": "words", "b": [0.7179, 0.1535, 0.7635, 0.1719]}]}, {"id": "b_25", "type": "paragraph", "text": "Figure 13: Creating and stacking feature vectors.", "words": [{"w": "Figure", "b": [0.3013, 0.4444, 0.3534, 0.4594]}, {"w": "13:", "b": [0.3596, 0.4444, 0.3832, 0.4594]}, {"w": "Creating", "b": [0.3914, 0.4444, 0.4611, 0.4594]}, {"w": "and", "b": [0.4673, 0.4444, 0.497, 0.4594]}, {"w": "stacking", "b": [0.5032, 0.4444, 0.5689, 0.4594]}, {"w": "feature", "b": [0.575, 0.4444, 0.631, 0.4594]}, {"w": "vectors.", "b": [0.6372, 0.4444, 0.6989, 0.4594]}]}, {"id": "b_26", "type": "paragraph", "text": "the topic of the tweet is cinema” and that feature will also be binary: 1 if the topic predicted by mA for the entire tweet is cinema, and 0 otherwise. Again, we concatenate the three partial feature vectors, as shown in Figure 14.", "words": [{"w": "the", "b": [0.1312, 0.4947, 0.1564, 0.5096]}, {"w": "topic", "b": [0.1623, 0.4947, 0.2015, 0.5096]}, {"w": "of", "b": [0.2074, 0.4947, 0.2219, 0.5096]}, {"w": "the", "b": [0.2278, 0.4947, 0.253, 0.5096]}, {"w": "tweet", "b": [0.2589, 0.4947, 0.301, 0.5096]}, {"w": "is", "b": [0.307, 0.4947, 0.3191, 0.5096]}, {"w": "cinema”", "b": [0.325, 0.4947, 0.3888, 0.5096]}, {"w": "and", "b": [0.3947, 0.4947, 0.4239, 0.5096]}, {"w": "that", "b": [0.4298, 0.4947, 0.4629, 0.5096]}, {"w": "feature", "b": [0.4688, 0.4947, 0.5237, 0.5096]}, {"w": "will", "b": [0.5296, 0.4947, 0.5577, 0.5096]}, {"w": "also", "b": [0.5636, 0.4947, 0.5939, 0.5096]}, {"w": "be", "b": [0.5997, 0.4947, 0.6184, 0.5096]}, {"w": "binary:", "b": [0.6243, 0.4947, 0.6801, 0.5096]}, {"w": "1", "b": [0.6879, 0.4947, 0.697, 0.5096]}, {"w": "if", "b": [0.7029, 0.4947, 0.7134, 0.5096]}, {"w": "the", "b": [0.7193, 0.4947, 0.7444, 0.5096]}, {"w": "topic", "b": [0.7504, 0.4947, 0.7895, 0.5096]}, {"w": "predicted", "b": [0.7954, 0.4947, 0.8689, 0.5096]}, {"w": "by", "b": [0.1312, 0.5126, 0.1511, 0.5276]}, {"w": "mA", "b": [0.1583, 0.5129, 0.1856, 0.5291]}, {"w": "for", "b": [0.1936, 0.5126, 0.2162, 0.5276]}, {"w": "the", "b": [0.2233, 0.5126, 0.2495, 0.5276]}, {"w": "entire", "b": [0.2566, 0.5126, 0.3033, 0.5276]}, {"w": "tweet", "b": [0.3104, 0.5126, 0.3544, 0.5276]}, {"w": "is", "b": [0.3615, 0.5126, 0.3742, 0.5276]}, {"w": "cinema,", "b": [0.3813, 0.5126, 0.4441, 0.5276]}, {"w": "and", "b": [0.4515, 0.5126, 0.4818, 0.5276]}, {"w": "0", "b": [0.4888, 0.5126, 0.4983, 0.5276]}, {"w": "otherwise.", "b": [0.5054, 0.5126, 0.5882, 0.5276]}, {"w": "Again,", "b": [0.5994, 0.5126, 0.6533, 0.5276]}, {"w": "we", "b": [0.6607, 0.5126, 0.6821, 0.5276]}, {"w": "concatenate", "b": [0.6893, 0.5126, 0.7866, 0.5276]}, {"w": "the", "b": [0.7937, 0.5126, 0.8199, 0.5276]}, {"w": "three", "b": [0.827, 0.5126, 0.8689, 0.5276]}, {"w": "partial", "b": [0.1312, 0.5306, 0.1846, 0.5455]}, {"w": "feature", "b": [0.1908, 0.5306, 0.2467, 0.5455]}, {"w": "vectors,", "b": [0.2529, 0.5306, 0.3145, 0.5455]}, {"w": "as", "b": [0.3207, 0.5306, 0.3372, 0.5455]}, {"w": "shown", "b": [0.3434, 0.5306, 0.3932, 0.5455]}, {"w": "in", "b": [0.3993, 0.5306, 0.4147, 0.5455]}, {"w": "Figure", "b": [0.4209, 0.5306, 0.473, 0.5455]}, {"w": "14.", "b": [0.4791, 0.5306, 0.5027, 0.5455]}]}, {"id": "b_27", "type": "paragraph", "text": "You might come up with many more useful features for title classification in tweets. Examples of such features are:", "words": [{"w": "You", "b": [0.1305, 0.5575, 0.1616, 0.5724]}, {"w": "might", "b": [0.1669, 0.5575, 0.2127, 0.5724]}, {"w": "come", "b": [0.218, 0.5575, 0.2581, 0.5724]}, {"w": "up", "b": [0.2634, 0.5575, 0.2835, 0.5724]}, {"w": "with", "b": [0.2889, 0.5575, 0.324, 0.5724]}, {"w": "many", "b": [0.3293, 0.5575, 0.3725, 0.5724]}, {"w": "more", "b": [0.3778, 0.5575, 0.4171, 0.5724]}, {"w": "useful", "b": [0.4223, 0.5575, 0.4682, 0.5724]}, {"w": "features", "b": [0.4735, 0.5575, 0.5355, 0.5724]}, {"w": "for", "b": [0.5408, 0.5575, 0.5624, 0.5724]}, {"w": "title", "b": [0.5678, 0.5575, 0.5999, 0.5724]}, {"w": "classification", "b": [0.6052, 0.5575, 0.7049, 0.5724]}, {"w": "in", "b": [0.7102, 0.5575, 0.7253, 0.5724]}, {"w": "tweets.", "b": [0.7306, 0.5575, 0.7849, 0.5724]}, {"w": "Examples", "b": [0.7929, 0.5575, 0.8691, 0.5724]}, {"w": "of", "b": [0.1312, 0.5754, 0.1461, 0.5904]}, {"w": "such", "b": [0.1522, 0.5754, 0.1877, 0.5904]}, {"w": "features", "b": [0.1939, 0.5754, 0.2571, 0.5904]}, {"w": "are:", "b": [0.2633, 0.5754, 0.2931, 0.5904]}]}, {"id": "b_28", "type": "paragraph", "text": "• the average IMDB score of the movie, • the number of votes for the movie on IMDB, • the Rotten Tomato score of the movie, • whether the movie is recent (or the number that represents the release year), • whether the tweet text contains other movie titles, and • whether the tweet text includes the names of actors or directors.", "words": [{"w": "•", "b": [0.1538, 0.6024, 0.1681, 0.6173]}, {"w": "the", "b": [0.1774, 0.6024, 0.203, 0.6173]}, {"w": "average", "b": [0.2091, 0.6024, 0.2692, 0.6173]}, {"w": "IMDB", "b": [0.2753, 0.6024, 0.3261, 0.6173]}, {"w": "score", "b": [0.3322, 0.6024, 0.3724, 0.6173]}, {"w": "of", "b": [0.3785, 0.6024, 0.3934, 0.6173]}, {"w": "the", "b": [0.3996, 0.6024, 0.4252, 0.6173]}, {"w": "movie,", "b": [0.4313, 0.6024, 0.4836, 0.6173]}, {"w": "•", "b": [0.1538, 0.6203, 0.1681, 0.6353]}, {"w": "the", "b": [0.1774, 0.6203, 0.203, 0.6353]}, {"w": "number", "b": [0.2091, 0.6203, 0.2702, 0.6353]}, {"w": "of", "b": [0.2764, 0.6203, 0.2912, 0.6353]}, {"w": "votes", "b": [0.2974, 0.6203, 0.3385, 0.6353]}, {"w": "for", "b": [0.3447, 0.6203, 0.3668, 0.6353]}, {"w": "the", "b": [0.3729, 0.6203, 0.3986, 0.6353]}, {"w": "movie", "b": [0.4047, 0.6203, 0.4519, 0.6353]}, {"w": "on", "b": [0.458, 0.6203, 0.4775, 0.6353]}, {"w": "IMDB,", "b": [0.4837, 0.6203, 0.5395, 0.6353]}, {"w": "•", "b": [0.1538, 0.6383, 0.1681, 0.6532]}, {"w": "the", "b": [0.1774, 0.6383, 0.203, 0.6532]}, {"w": "Rotten", "b": [0.2091, 0.6383, 0.2648, 0.6532]}, {"w": "Tomato", "b": [0.2709, 0.6383, 0.3329, 0.6532]}, {"w": "score", "b": [0.3391, 0.6383, 0.3792, 0.6532]}, {"w": "of", "b": [0.3854, 0.6383, 0.4003, 0.6532]}, {"w": "the", "b": [0.4064, 0.6383, 0.432, 0.6532]}, {"w": "movie,", "b": [0.4382, 0.6383, 0.4905, 0.6532]}, {"w": "•", "b": [0.1538, 0.6562, 0.1681, 0.6712]}, {"w": "whether", "b": [0.1774, 0.6562, 0.242, 0.6712]}, {"w": "the", "b": [0.2482, 0.6562, 0.2738, 0.6712]}, {"w": "movie", "b": [0.28, 0.6562, 0.3271, 0.6712]}, {"w": "is", "b": [0.3333, 0.6562, 0.3457, 0.6712]}, {"w": "recent", "b": [0.3518, 0.6562, 0.4006, 0.6712]}, {"w": "(or", "b": [0.4068, 0.6562, 0.4304, 0.6712]}, {"w": "the", "b": [0.4366, 0.6562, 0.4622, 0.6712]}, {"w": "number", "b": [0.4683, 0.6562, 0.5294, 0.6712]}, {"w": "that", "b": [0.5355, 0.6562, 0.5694, 0.6712]}, {"w": "represents", "b": [0.5755, 0.6562, 0.6564, 0.6712]}, {"w": "the", "b": [0.6625, 0.6562, 0.6882, 0.6712]}, {"w": "release", "b": [0.6943, 0.6562, 0.7478, 0.6712]}, {"w": "year),", "b": [0.754, 0.6562, 0.8002, 0.6712]}, {"w": "•", "b": [0.1538, 0.6741, 0.1681, 0.6891]}, {"w": "whether", "b": [0.1774, 0.6741, 0.242, 0.6891]}, {"w": "the", "b": [0.2482, 0.6741, 0.2738, 0.6891]}, {"w": "tweet", "b": [0.28, 0.6741, 0.323, 0.6891]}, {"w": "text", "b": [0.3292, 0.6741, 0.3615, 0.6891]}, {"w": "contains", "b": [0.3676, 0.6741, 0.4339, 0.6891]}, {"w": "other", "b": [0.44, 0.6741, 0.4821, 0.6891]}, {"w": "movie", "b": [0.4883, 0.6741, 0.5354, 0.6891]}, {"w": "titles,", "b": [0.5416, 0.6741, 0.5868, 0.6891]}, {"w": "and", "b": [0.593, 0.6741, 0.6227, 0.6891]}, {"w": "•", "b": [0.1538, 0.6921, 0.1681, 0.707]}, {"w": "whether", "b": [0.1774, 0.6921, 0.242, 0.707]}, {"w": "the", "b": [0.2482, 0.6921, 0.2738, 0.707]}, {"w": "tweet", "b": [0.28, 0.6921, 0.323, 0.707]}, {"w": "text", "b": [0.3292, 0.6921, 0.3615, 0.707]}, {"w": "includes", "b": [0.3676, 0.6921, 0.4324, 0.707]}, {"w": "the", "b": [0.4385, 0.6921, 0.4642, 0.707]}, {"w": "names", "b": [0.4703, 0.6921, 0.5206, 0.707]}, {"w": "of", "b": [0.5268, 0.6921, 0.5417, 0.707]}, {"w": "actors", "b": [0.5478, 0.6921, 0.5962, 0.707]}, {"w": "or", "b": [0.6023, 0.6921, 0.6188, 0.707]}, {"w": "directors.", "b": [0.6249, 0.6921, 0.7, 0.707]}]}, {"id": "b_29", "type": "paragraph", "text": "All these additional features, as long as they are numerical, can be concatenated to the feature vector. The only condition is that they are concatenated in the same order in all examples.", "words": [{"w": "All", "b": [0.1305, 0.719, 0.1551, 0.734]}, {"w": "these", "b": [0.1627, 0.719, 0.2046, 0.734]}, {"w": "additional", "b": [0.2122, 0.719, 0.2948, 0.734]}, {"w": "features,", "b": [0.3024, 0.719, 0.3721, 0.734]}, {"w": "as", "b": [0.3801, 0.719, 0.3969, 0.734]}, {"w": "long", "b": [0.4045, 0.719, 0.439, 0.734]}, {"w": "as", "b": [0.4466, 0.719, 0.4634, 0.734]}, {"w": "they", "b": [0.471, 0.719, 0.5071, 0.734]}, {"w": "are", "b": [0.5147, 0.719, 0.5398, 0.734]}, {"w": "numerical,", "b": [0.5474, 0.719, 0.6327, 0.734]}, {"w": "can", "b": [0.6406, 0.719, 0.6689, 0.734]}, {"w": "be", "b": [0.6764, 0.719, 0.6958, 0.734]}, {"w": "concatenated", "b": [0.7034, 0.719, 0.8111, 0.734]}, {"w": "to", "b": [0.8187, 0.719, 0.8354, 0.734]}, {"w": "the", "b": [0.843, 0.719, 0.8691, 0.734]}, {"w": "feature", "b": [0.1312, 0.737, 0.1883, 0.7519]}, {"w": "vector.", "b": [0.195, 0.737, 0.2505, 0.7519]}, {"w": "The", "b": [0.2605, 0.737, 0.2929, 0.7519]}, {"w": "only", "b": [0.2996, 0.737, 0.3346, 0.7519]}, {"w": "condition", "b": [0.3414, 0.737, 0.4177, 0.7519]}, {"w": "is", "b": [0.4244, 0.737, 0.4371, 0.7519]}, {"w": "that", "b": [0.4438, 0.737, 0.4783, 0.7519]}, {"w": "they", "b": [0.4851, 0.737, 0.5211, 0.7519]}, {"w": "are", "b": [0.5279, 0.737, 0.553, 0.7519]}, {"w": "concatenated", "b": [0.5597, 0.737, 0.6675, 0.7519]}, {"w": "in", "b": [0.6742, 0.737, 0.6899, 0.7519]}, {"w": "the", "b": [0.6966, 0.737, 0.7228, 0.7519]}, {"w": "same", "b": [0.7295, 0.737, 0.7704, 0.7519]}, {"w": "order", "b": [0.7771, 0.737, 0.8201, 0.7519]}, {"w": "in", "b": [0.8269, 0.737, 0.8425, 0.7519]}, {"w": "all", "b": [0.8493, 0.737, 0.8691, 0.7519]}, {"w": "examples.", "b": [0.1312, 0.7549, 0.2098, 0.7699]}]}, {"id": "b_30", "type": "paragraph", "text": "4.4 Properties of Good Features", "words": [{"w": "4.4", "b": [0.1312, 0.8037, 0.1631, 0.8217]}, {"w": "Properties", "b": [0.188, 0.8037, 0.3016, 0.8217]}, {"w": "of", "b": [0.3099, 0.8037, 0.3299, 0.8217]}, {"w": "Good", "b": [0.3382, 0.8037, 0.398, 0.8217]}, {"w": "Features", "b": [0.4063, 0.8037, 0.4982, 0.8217]}]}, {"id": "b_31", "type": "paragraph", "text": "Not all features are created equal. In this section, we consider the properties of a good feature.", "words": [{"w": "Not", "b": [0.1312, 0.8423, 0.1609, 0.8573]}, {"w": "all", "b": [0.1661, 0.8423, 0.1852, 0.8573]}, {"w": "features", "b": [0.1904, 0.8423, 0.2524, 0.8573]}, {"w": "are", "b": [0.2576, 0.8423, 0.2818, 0.8573]}, {"w": "created", "b": [0.287, 0.8423, 0.3443, 0.8573]}, {"w": "equal.", "b": [0.3495, 0.8423, 0.3963, 0.8573]}, {"w": "In", "b": [0.4042, 0.8423, 0.4207, 0.8573]}, {"w": "this", "b": [0.426, 0.8423, 0.4552, 0.8573]}, {"w": "section,", "b": [0.4604, 0.8423, 0.5198, 0.8573]}, {"w": "we", "b": [0.5252, 0.8423, 0.5458, 0.8573]}, {"w": "consider", "b": [0.551, 0.8423, 0.6155, 0.8573]}, {"w": "the", "b": [0.6207, 0.8423, 0.6459, 0.8573]}, {"w": "properties", "b": [0.6511, 0.8423, 0.7302, 0.8573]}, {"w": "of", "b": [0.7354, 0.8423, 0.75, 0.8573]}, {"w": "a", "b": [0.7552, 0.8423, 0.7643, 0.8573]}, {"w": "good", "b": [0.7695, 0.8423, 0.8077, 0.8573]}, {"w": "feature.", "b": [0.8129, 0.8423, 0.8727, 0.8573]}]}, {"id": "b_32", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 20", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "20", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 110, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "0 1 0 0 ... 0 0 0 0 1 ... 1 0 0 1 0 ... 1", "words": [{"w": "0", "b": [0.2087, 0.1626, 0.2182, 0.1765]}, {"w": "1", "b": [0.2449, 0.1626, 0.2545, 0.1765]}, {"w": "0", "b": [0.2812, 0.1626, 0.2908, 0.1765]}, {"w": "0", "b": [0.3175, 0.1626, 0.3271, 0.1765]}, {"w": "...", "b": [0.3526, 0.16, 0.3645, 0.1716]}, {"w": "0", "b": [0.39, 0.1626, 0.3996, 0.1765]}, {"w": "0", "b": [0.4263, 0.1626, 0.4359, 0.1765]}, {"w": "0", "b": [0.4626, 0.1626, 0.4722, 0.1765]}, {"w": "0", "b": [0.4989, 0.1626, 0.5085, 0.1765]}, {"w": "1", "b": [0.5352, 0.1626, 0.5447, 0.1765]}, {"w": "...", "b": [0.5702, 0.16, 0.5822, 0.1716]}, {"w": "1", "b": [0.6077, 0.1626, 0.6173, 0.1765]}, {"w": "0", "b": [0.644, 0.1626, 0.6536, 0.1765]}, {"w": "0", "b": [0.6803, 0.1626, 0.6898, 0.1765]}, {"w": "1", "b": [0.7165, 0.1626, 0.7261, 0.1765]}, {"w": "0", "b": [0.7528, 0.1626, 0.7624, 0.1765]}, {"w": "...", "b": [0.7879, 0.16, 0.7999, 0.1716]}, {"w": "1", "b": [0.8254, 0.1626, 0.835, 0.1765]}]}, {"id": "b_1", "type": "equation", "text": "B-o-w 1", "words": [{"w": "B-o-w", "b": [0.2075, 0.1167, 0.222, 0.1475]}, {"w": "1", "b": [0.2075, 0.1069, 0.222, 0.1135]}]}, {"id": "b_2", "type": "equation", "text": "B-o-w 2", "words": [{"w": "B-o-w", "b": [0.244, 0.1166, 0.2585, 0.1473]}, {"w": "2", "b": [0.244, 0.1068, 0.2585, 0.1133]}]}, {"id": "b_3", "type": "equation", "text": "B-o-w M", "words": [{"w": "B-o-w", "b": [0.824, 0.1167, 0.8385, 0.1474]}, {"w": "M", "b": [0.824, 0.1037, 0.8385, 0.1135]}]}, {"id": "b_4", "type": "paragraph", "text": "Is cinema?", "words": [{"w": "Is", "b": [0.8607, 0.1375, 0.8752, 0.1466]}, {"w": "cinema?", "b": [0.8607, 0.0898, 0.8752, 0.1342]}]}, {"id": "b_5", "type": "paragraph", "text": "Example 1", "words": [{"w": "Example", "b": [0.118, 0.1621, 0.1744, 0.1738]}, {"w": "1", "b": [0.1784, 0.1621, 0.1865, 0.1738]}]}, {"id": "b_6", "type": "paragraph", "text": "0 0 1 1 ... 1 0 1 0 1 ... 0 1 1 1 0 ... 0 Example 2", "words": [{"w": "0", "b": [0.2087, 0.192, 0.2182, 0.2059]}, {"w": "0", "b": [0.2449, 0.192, 0.2545, 0.2059]}, {"w": "1", "b": [0.2812, 0.192, 0.2908, 0.2059]}, {"w": "1", "b": [0.3175, 0.192, 0.3271, 0.2059]}, {"w": "...", "b": [0.3526, 0.1894, 0.3645, 0.201]}, {"w": "1", "b": [0.39, 0.192, 0.3996, 0.2059]}, {"w": "0", "b": [0.4263, 0.192, 0.4359, 0.2059]}, {"w": "1", "b": [0.4626, 0.192, 0.4722, 0.2059]}, {"w": "0", "b": [0.4989, 0.192, 0.5085, 0.2059]}, {"w": "1", "b": [0.5352, 0.192, 0.5447, 0.2059]}, {"w": "...", "b": [0.5702, 0.1894, 0.5822, 0.201]}, {"w": "0", "b": [0.6077, 0.192, 0.6173, 0.2059]}, {"w": "1", "b": [0.644, 0.192, 0.6536, 0.2059]}, {"w": "1", "b": [0.6803, 0.192, 0.6898, 0.2059]}, {"w": "1", "b": [0.7165, 0.192, 0.7261, 0.2059]}, {"w": "0", "b": [0.7528, 0.192, 0.7624, 0.2059]}, {"w": "...", "b": [0.7879, 0.1894, 0.7999, 0.201]}, {"w": "0", "b": [0.8254, 0.192, 0.835, 0.2059]}, {"w": "Example", "b": [0.118, 0.1915, 0.1744, 0.2032]}, {"w": "2", "b": [0.1784, 0.1915, 0.1865, 0.2032]}]}, {"id": "b_7", "type": "paragraph", "text": "... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...", "words": [{"w": "...", "b": [0.2075, 0.2188, 0.2194, 0.2304]}, {"w": "...", "b": [0.2437, 0.2188, 0.2557, 0.2304]}, {"w": "...", "b": [0.28, 0.2188, 0.292, 0.2304]}, {"w": "...", "b": [0.3163, 0.2188, 0.3283, 0.2304]}, {"w": "...", "b": [0.3526, 0.2188, 0.3645, 0.2304]}, {"w": "...", "b": [0.3889, 0.2188, 0.4008, 0.2304]}, {"w": "...", "b": [0.4251, 0.2188, 0.4371, 0.2304]}, {"w": "...", "b": [0.4614, 0.2188, 0.4734, 0.2304]}, {"w": "...", "b": [0.4987, 0.2203, 0.5087, 0.23]}, {"w": "...", "b": [0.534, 0.2188, 0.5459, 0.2304]}, {"w": "...", "b": [0.5702, 0.2188, 0.5822, 0.2304]}, {"w": "...", "b": [0.6065, 0.2188, 0.6185, 0.2304]}, {"w": "...", "b": [0.6428, 0.2188, 0.6548, 0.2304]}, {"w": "...", "b": [0.6791, 0.2188, 0.691, 0.2304]}, {"w": "...", "b": [0.7153, 0.2188, 0.7273, 0.2304]}, {"w": "...", "b": [0.7516, 0.2188, 0.7636, 0.2304]}, {"w": "...", "b": [0.7879, 0.2188, 0.7999, 0.2304]}, {"w": "...", "b": [0.8242, 0.2188, 0.8361, 0.2304]}, {"w": "...", "b": [0.8614, 0.2195, 0.8715, 0.2293]}]}, {"id": "b_8", "type": "paragraph", "text": "0 0 1 1 ... 0 1 1 0 1 ... 1 1 0 1 1 ... 1 Example N", "words": [{"w": "0", "b": [0.2087, 0.2508, 0.2182, 0.2648]}, {"w": "0", "b": [0.2449, 0.2508, 0.2545, 0.2648]}, {"w": "1", "b": [0.2812, 0.2508, 0.2908, 0.2648]}, {"w": "1", "b": [0.3175, 0.2508, 0.3271, 0.2648]}, {"w": "...", "b": [0.3526, 0.2482, 0.3645, 0.2598]}, {"w": "0", "b": [0.39, 0.2508, 0.3996, 0.2648]}, {"w": "1", "b": [0.4263, 0.2508, 0.4359, 0.2648]}, {"w": "1", "b": [0.4626, 0.2508, 0.4722, 0.2648]}, {"w": "0", "b": [0.4989, 0.2508, 0.5085, 0.2648]}, {"w": "1", "b": [0.5352, 0.2508, 0.5447, 0.2648]}, {"w": "...", "b": [0.5702, 0.2482, 0.5822, 0.2598]}, {"w": "1", "b": [0.6077, 0.2508, 0.6173, 0.2648]}, {"w": "1", "b": [0.644, 0.2508, 0.6536, 0.2648]}, {"w": "0", "b": [0.6803, 0.2508, 0.6898, 0.2648]}, {"w": "1", "b": [0.7165, 0.2508, 0.7261, 0.2648]}, {"w": "1", "b": [0.7528, 0.2508, 0.7624, 0.2648]}, {"w": "...", "b": [0.7879, 0.2482, 0.7999, 0.2598]}, {"w": "1", "b": [0.8254, 0.2508, 0.835, 0.2648]}, {"w": "Example", "b": [0.1168, 0.2503, 0.1732, 0.2621]}, {"w": "N", "b": [0.1772, 0.2503, 0.1877, 0.2621]}]}, {"id": "b_12", "type": "equation", "text": "B-o-w M–1", "words": [{"w": "B-o-w", "b": [0.7901, 0.1174, 0.8046, 0.1481]}, {"w": "M–1", "b": [0.7901, 0.0925, 0.8046, 0.1141]}]}, {"id": "b_13", "type": "paragraph", "text": "Figure 14: Single feature stacking.", "words": [{"w": "Figure", "b": [0.3614, 0.2879, 0.4135, 0.3029]}, {"w": "14:", "b": [0.4196, 0.2879, 0.4432, 0.3029]}, {"w": "Single", "b": [0.4514, 0.2879, 0.4996, 0.3029]}, {"w": "feature", "b": [0.5058, 0.2879, 0.5617, 0.3029]}, {"w": "stacking.", "b": [0.5679, 0.2879, 0.6387, 0.3029]}]}, {"id": "b_14", "type": "paragraph", "text": "4.4.1 High Predictive Power", "words": [{"w": "4.4.1", "b": [0.1312, 0.3385, 0.1749, 0.3534]}, {"w": "High", "b": [0.1961, 0.3385, 0.241, 0.3534]}, {"w": "Predictive", "b": [0.2481, 0.3385, 0.3426, 0.3534]}, {"w": "Power", "b": [0.3497, 0.3385, 0.4068, 0.3534]}]}, {"id": "b_15", "type": "paragraph", "text": "First of all, a good feature has high predictive power. In Chapter 3, you read about predictive power as a property of data. However, a feature can also have high or low predictive power. Let’s say you want to predict whether a patient has cancer. Among other features, you know the make of the person’s car and whether the person is married. These two features are not good predictors for cancer, so our machine learning algorithm will not learn a meaningful relationship between these features and the label. Predictive power is a property of the feature with respect to the problem. The make of the person’s car and whether the person is married could have high predictive power if the problem were different.", "words": [{"w": "First", "b": [0.1312, 0.3747, 0.1709, 0.3897]}, {"w": "of", "b": [0.1787, 0.3747, 0.1939, 0.3897]}, {"w": "all,", "b": [0.2017, 0.3747, 0.2268, 0.3897]}, {"w": "a", "b": [0.2351, 0.3747, 0.2445, 0.3897]}, {"w": "good", "b": [0.2523, 0.3747, 0.2921, 0.3897]}, {"w": "feature", "b": [0.2999, 0.3747, 0.357, 0.3897]}, {"w": "has", "b": [0.3648, 0.3747, 0.3921, 0.3897]}, {"w": "high", "b": [0.4, 0.3747, 0.4355, 0.3897]}, {"w": "predictive", "b": [0.4434, 0.375, 0.5352, 0.39]}, {"w": "power.", "b": [0.5443, 0.3747, 0.6051, 0.39]}, {"w": "In", "b": [0.6184, 0.3747, 0.6356, 0.3897]}, {"w": "Chapter", "b": [0.6434, 0.3747, 0.7104, 0.3897]}, {"w": "3,", "b": [0.7183, 0.3747, 0.7329, 0.3897]}, {"w": "you", "b": [0.7412, 0.3747, 0.7705, 0.3897]}, {"w": "read", "b": [0.7783, 0.3747, 0.8139, 0.3897]}, {"w": "about", "b": [0.8218, 0.3747, 0.8693, 0.3897]}, {"w": "predictive", "b": [0.1312, 0.3927, 0.2119, 0.4076]}, {"w": "power", "b": [0.2205, 0.3927, 0.2692, 0.4076]}, {"w": "as", "b": [0.2778, 0.3927, 0.2946, 0.4076]}, {"w": "a", "b": [0.3033, 0.3927, 0.3127, 0.4076]}, {"w": "property", "b": [0.3213, 0.3927, 0.392, 0.4076]}, {"w": "of", "b": [0.4006, 0.3927, 0.4158, 0.4076]}, {"w": "data.", "b": [0.4244, 0.3927, 0.4662, 0.4076]}, {"w": "However,", "b": [0.4819, 0.3927, 0.5567, 0.4076]}, {"w": "a", "b": [0.566, 0.3927, 0.5754, 0.4076]}, {"w": "feature", "b": [0.584, 0.3927, 0.6411, 0.4076]}, {"w": "can", "b": [0.6497, 0.3927, 0.6779, 0.4076]}, {"w": "also", "b": [0.6865, 0.3927, 0.718, 0.4076]}, {"w": "have", "b": [0.7266, 0.3927, 0.7638, 0.4076]}, {"w": "high", "b": [0.7724, 0.3927, 0.808, 0.4076]}, {"w": "or", "b": [0.8166, 0.3927, 0.8334, 0.4076]}, {"w": "low", "b": [0.842, 0.3927, 0.8697, 0.4076]}, {"w": "predictive", "b": [0.1312, 0.4106, 0.2099, 0.4256]}, {"w": "power.", "b": [0.216, 0.4106, 0.2686, 0.4256]}, {"w": "Let’s", "b": [0.2768, 0.4106, 0.3159, 0.4256]}, {"w": "say", "b": [0.3221, 0.4106, 0.3477, 0.4256]}, {"w": "you", "b": [0.3538, 0.4106, 0.3824, 0.4256]}, {"w": "want", "b": [0.3885, 0.4106, 0.4272, 0.4256]}, {"w": "to", "b": [0.4334, 0.4106, 0.4497, 0.4256]}, {"w": "predict", "b": [0.4558, 0.4106, 0.512, 0.4256]}, {"w": "whether", "b": [0.5181, 0.4106, 0.5825, 0.4256]}, {"w": "a", "b": [0.5886, 0.4106, 0.5978, 0.4256]}, {"w": "patient", "b": [0.6039, 0.4106, 0.6606, 0.4256]}, {"w": "has", "b": [0.6667, 0.4106, 0.6933, 0.4256]}, {"w": "cancer.", "b": [0.6995, 0.4106, 0.7556, 0.4256]}, {"w": "Among", "b": [0.7638, 0.4106, 0.8215, 0.4256]}, {"w": "other", "b": [0.8276, 0.4106, 0.8695, 0.4256]}, {"w": "features,", "b": [0.1312, 0.4286, 0.2002, 0.4435]}, {"w": "you", "b": [0.2064, 0.4286, 0.2353, 0.4435]}, {"w": "know", "b": [0.2415, 0.4286, 0.2839, 0.4435]}, {"w": "the", "b": [0.2901, 0.4286, 0.3159, 0.4435]}, {"w": "make", "b": [0.3221, 0.4286, 0.3645, 0.4435]}, {"w": "of", "b": [0.3706, 0.4286, 0.3856, 0.4435]}, {"w": "the", "b": [0.3918, 0.4286, 0.4177, 0.4435]}, {"w": "person’s", "b": [0.4238, 0.4286, 0.4898, 0.4435]}, {"w": "car", "b": [0.4959, 0.4286, 0.5208, 0.4435]}, {"w": "and", "b": [0.527, 0.4286, 0.557, 0.4435]}, {"w": "whether", "b": [0.5631, 0.4286, 0.6284, 0.4435]}, {"w": "the", "b": [0.6345, 0.4286, 0.6604, 0.4435]}, {"w": "person", "b": [0.6666, 0.4286, 0.72, 0.4435]}, {"w": "is", "b": [0.7262, 0.4286, 0.7387, 0.4435]}, {"w": "married.", "b": [0.7448, 0.4286, 0.8132, 0.4435]}, {"w": "These", "b": [0.8214, 0.4286, 0.8691, 0.4435]}, {"w": "two", "b": [0.1312, 0.4465, 0.1601, 0.4615]}, {"w": "features", "b": [0.1663, 0.4465, 0.2299, 0.4615]}, {"w": "are", "b": [0.236, 0.4465, 0.2608, 0.4615]}, {"w": "not", "b": [0.267, 0.4465, 0.2938, 0.4615]}, {"w": "good", "b": [0.3, 0.4465, 0.3391, 0.4615]}, {"w": "predictors", "b": [0.3453, 0.4465, 0.426, 0.4615]}, {"w": "for", "b": [0.4321, 0.4465, 0.4544, 0.4615]}, {"w": "cancer,", "b": [0.4605, 0.4465, 0.5173, 0.4615]}, {"w": "so", "b": [0.5235, 0.4465, 0.5401, 0.4615]}, {"w": "our", "b": [0.5462, 0.4465, 0.5731, 0.4615]}, {"w": "machine", "b": [0.5793, 0.4465, 0.6458, 0.4615]}, {"w": "learning", "b": [0.652, 0.4465, 0.717, 0.4615]}, {"w": "algorithm", "b": [0.7231, 0.4465, 0.8016, 0.4615]}, {"w": "will", "b": [0.8077, 0.4465, 0.8366, 0.4615]}, {"w": "not", "b": [0.8428, 0.4465, 0.8696, 0.4615]}, {"w": "learn", "b": [0.1312, 0.4645, 0.1721, 0.4794]}, {"w": "a", "b": [0.1787, 0.4645, 0.1881, 0.4794]}, {"w": "meaningful", "b": [0.1948, 0.4645, 0.2852, 0.4794]}, {"w": "relationship", "b": [0.2919, 0.4645, 0.3883, 0.4794]}, {"w": "between", "b": [0.3949, 0.4645, 0.4613, 0.4794]}, {"w": "these", "b": [0.468, 0.4645, 0.5099, 0.4794]}, {"w": "features", "b": [0.5166, 0.4645, 0.5811, 0.4794]}, {"w": "and", "b": [0.5877, 0.4645, 0.618, 0.4794]}, {"w": "the", "b": [0.6247, 0.4645, 0.6508, 0.4794]}, {"w": "label.", "b": [0.6575, 0.4645, 0.7019, 0.4794]}, {"w": "Predictive", "b": [0.7116, 0.4645, 0.7946, 0.4794]}, {"w": "power", "b": [0.8012, 0.4645, 0.8499, 0.4794]}, {"w": "is", "b": [0.8565, 0.4645, 0.8692, 0.4794]}, {"w": "a", "b": [0.1312, 0.4824, 0.1406, 0.4974]}, {"w": "property", "b": [0.1474, 0.4824, 0.2181, 0.4974]}, {"w": "of", "b": [0.2248, 0.4824, 0.24, 0.4974]}, {"w": "the", "b": [0.2467, 0.4824, 0.2728, 0.4974]}, {"w": "feature", "b": [0.2795, 0.4824, 0.3366, 0.4974]}, {"w": "with", "b": [0.3433, 0.4824, 0.3799, 0.4974]}, {"w": "respect", "b": [0.3867, 0.4824, 0.4449, 0.4974]}, {"w": "to", "b": [0.4516, 0.4824, 0.4683, 0.4974]}, {"w": "the", "b": [0.475, 0.4824, 0.5012, 0.4974]}, {"w": "problem.", "b": [0.5079, 0.4824, 0.5801, 0.4974]}, {"w": "The", "b": [0.59, 0.4824, 0.6224, 0.4974]}, {"w": "make", "b": [0.6292, 0.4824, 0.672, 0.4974]}, {"w": "of", "b": [0.6788, 0.4824, 0.6939, 0.4974]}, {"w": "the", "b": [0.7006, 0.4824, 0.7268, 0.4974]}, {"w": "person’s", "b": [0.7335, 0.4824, 0.8002, 0.4974]}, {"w": "car", "b": [0.8069, 0.4824, 0.8321, 0.4974]}, {"w": "and", "b": [0.8388, 0.4824, 0.8691, 0.4974]}, {"w": "whether", "b": [0.1306, 0.5004, 0.1939, 0.5153]}, {"w": "the", "b": [0.2001, 0.5004, 0.2252, 0.5153]}, {"w": "person", "b": [0.2313, 0.5004, 0.2833, 0.5153]}, {"w": "is", "b": [0.2894, 0.5004, 0.3015, 0.5153]}, {"w": "married", "b": [0.3077, 0.5004, 0.3691, 0.5153]}, {"w": "could", "b": [0.3752, 0.5004, 0.4174, 0.5153]}, {"w": "have", "b": [0.4235, 0.5004, 0.4592, 0.5153]}, {"w": "high", "b": [0.4653, 0.5004, 0.4995, 0.5153]}, {"w": "predictive", "b": [0.5056, 0.5004, 0.583, 0.5153]}, {"w": "power", "b": [0.5892, 0.5004, 0.6359, 0.5153]}, {"w": "if", "b": [0.6421, 0.5004, 0.6526, 0.5153]}, {"w": "the", "b": [0.6587, 0.5004, 0.6839, 0.5153]}, {"w": "problem", "b": [0.69, 0.5004, 0.7544, 0.5153]}, {"w": "were", "b": [0.7605, 0.5004, 0.7962, 0.5153]}, {"w": "different.", "b": [0.8023, 0.5004, 0.8727, 0.5153]}]}, {"id": "b_16", "type": "paragraph", "text": "4.4.2 Fast Computability", "words": [{"w": "4.4.2", "b": [0.1312, 0.5485, 0.1749, 0.5635]}, {"w": "Fast", "b": [0.1961, 0.5485, 0.2346, 0.5635]}, {"w": "Computability", "b": [0.2417, 0.5485, 0.3758, 0.5635]}]}, {"id": "b_17", "type": "paragraph", "text": "Good features can be computed fast. Let’s say you want to predict the topic of a tweet. A tweet is short, and a bag-of-words-based feature vector will be sparse. A sparse vector is a vector whose values in most dimensions are zero. If your dataset is small and the texts are short, the learning algorithm will have a hard time seeing patterns in sparse vectors because they contain little information compared to their size. The information in one sparse vector is rarely contained in the same dimensions as the information in another sparse vector, even if they represent similar concepts.", "words": [{"w": "Good", "b": [0.1312, 0.5848, 0.1758, 0.5998]}, {"w": "features", "b": [0.1819, 0.5848, 0.2457, 0.5998]}, {"w": "can", "b": [0.2518, 0.5848, 0.2797, 0.5998]}, {"w": "be", "b": [0.2859, 0.5848, 0.305, 0.5998]}, {"w": "computed", "b": [0.3112, 0.5848, 0.3908, 0.5998]}, {"w": "fast.", "b": [0.3969, 0.5848, 0.4316, 0.5998]}, {"w": "Let’s", "b": [0.4398, 0.5848, 0.4795, 0.5998]}, {"w": "say", "b": [0.4857, 0.5848, 0.5116, 0.5998]}, {"w": "you", "b": [0.5178, 0.5848, 0.5467, 0.5998]}, {"w": "want", "b": [0.5528, 0.5848, 0.5921, 0.5998]}, {"w": "to", "b": [0.5983, 0.5848, 0.6148, 0.5998]}, {"w": "predict", "b": [0.6209, 0.5848, 0.6779, 0.5998]}, {"w": "the", "b": [0.684, 0.5848, 0.7099, 0.5998]}, {"w": "topic", "b": [0.716, 0.5848, 0.7563, 0.5998]}, {"w": "of", "b": [0.7625, 0.5848, 0.7775, 0.5998]}, {"w": "a", "b": [0.7836, 0.5848, 0.7929, 0.5998]}, {"w": "tweet.", "b": [0.7991, 0.5848, 0.8476, 0.5998]}, {"w": "A", "b": [0.8558, 0.5848, 0.8698, 0.5998]}, {"w": "tweet", "b": [0.1312, 0.6027, 0.1735, 0.6177]}, {"w": "is", "b": [0.1796, 0.6027, 0.1918, 0.6177]}, {"w": "short,", "b": [0.198, 0.6027, 0.2435, 0.6177]}, {"w": "and", "b": [0.2496, 0.6027, 0.2788, 0.6177]}, {"w": "a", "b": [0.2849, 0.6027, 0.294, 0.6177]}, {"w": "bag-of-words-based", "b": [0.3001, 0.6027, 0.4514, 0.6177]}, {"w": "feature", "b": [0.4575, 0.6027, 0.5125, 0.6177]}, {"w": "vector", "b": [0.5186, 0.6027, 0.567, 0.6177]}, {"w": "will", "b": [0.5731, 0.6027, 0.6013, 0.6177]}, {"w": "be", "b": [0.6074, 0.6027, 0.6261, 0.6177]}, {"w": "sparse.", "b": [0.6322, 0.6027, 0.6859, 0.6177]}, {"w": "A", "b": [0.6941, 0.6027, 0.7077, 0.6177]}, {"w": "sparse", "b": [0.7135, 0.603, 0.7709, 0.618]}, {"w": "vector", "b": [0.7779, 0.603, 0.8353, 0.618]}, {"w": "is", "b": [0.8414, 0.6027, 0.8536, 0.6177]}, {"w": "a", "b": [0.8597, 0.6027, 0.8688, 0.6177]}, {"w": "vector", "b": [0.1308, 0.6207, 0.1804, 0.6356]}, {"w": "whose", "b": [0.1866, 0.6207, 0.2353, 0.6356]}, {"w": "values", "b": [0.2414, 0.6207, 0.2906, 0.6356]}, {"w": "in", "b": [0.2968, 0.6207, 0.3123, 0.6356]}, {"w": "most", "b": [0.3184, 0.6207, 0.3578, 0.6356]}, {"w": "dimensions", "b": [0.3639, 0.6207, 0.4531, 0.6356]}, {"w": "are", "b": [0.4592, 0.6207, 0.4841, 0.6356]}, {"w": "zero.", "b": [0.4902, 0.6207, 0.5285, 0.6356]}, {"w": "If", "b": [0.5367, 0.6207, 0.5491, 0.6356]}, {"w": "your", "b": [0.5553, 0.6207, 0.5915, 0.6356]}, {"w": "dataset", "b": [0.5976, 0.6207, 0.6567, 0.6356]}, {"w": "is", "b": [0.6628, 0.6207, 0.6753, 0.6356]}, {"w": "small", "b": [0.6815, 0.6207, 0.7239, 0.6356]}, {"w": "and", "b": [0.7301, 0.6207, 0.7601, 0.6356]}, {"w": "the", "b": [0.7662, 0.6207, 0.7921, 0.6356]}, {"w": "texts", "b": [0.7982, 0.6207, 0.8381, 0.6356]}, {"w": "are", "b": [0.8443, 0.6207, 0.8691, 0.6356]}, {"w": "short,", "b": [0.1312, 0.6386, 0.1769, 0.6536]}, {"w": "the", "b": [0.1831, 0.6386, 0.2084, 0.6536]}, {"w": "learning", "b": [0.2145, 0.6386, 0.2783, 0.6536]}, {"w": "algorithm", "b": [0.2845, 0.6386, 0.3615, 0.6536]}, {"w": "will", "b": [0.3676, 0.6386, 0.3959, 0.6536]}, {"w": "have", "b": [0.4021, 0.6386, 0.438, 0.6536]}, {"w": "a", "b": [0.4441, 0.6386, 0.4532, 0.6536]}, {"w": "hard", "b": [0.4594, 0.6386, 0.4959, 0.6536]}, {"w": "time", "b": [0.502, 0.6386, 0.5374, 0.6536]}, {"w": "seeing", "b": [0.5436, 0.6386, 0.5913, 0.6536]}, {"w": "patterns", "b": [0.5974, 0.6386, 0.6633, 0.6536]}, {"w": "in", "b": [0.6695, 0.6386, 0.6847, 0.6536]}, {"w": "sparse", "b": [0.6908, 0.6386, 0.7397, 0.6536]}, {"w": "vectors", "b": [0.7458, 0.6386, 0.8016, 0.6536]}, {"w": "because", "b": [0.8078, 0.6386, 0.8691, 0.6536]}, {"w": "they", "b": [0.1312, 0.6566, 0.1664, 0.6715]}, {"w": "contain", "b": [0.1726, 0.6566, 0.2312, 0.6715]}, {"w": "little", "b": [0.2373, 0.6566, 0.2751, 0.6715]}, {"w": "information", "b": [0.2812, 0.6566, 0.3745, 0.6715]}, {"w": "compared", "b": [0.3807, 0.6566, 0.4582, 0.6715]}, {"w": "to", "b": [0.4644, 0.6566, 0.4807, 0.6715]}, {"w": "their", "b": [0.4868, 0.6566, 0.5246, 0.6715]}, {"w": "size.", "b": [0.5308, 0.6566, 0.5645, 0.6715]}, {"w": "The", "b": [0.5728, 0.6566, 0.6044, 0.6715]}, {"w": "information", "b": [0.6105, 0.6566, 0.7038, 0.6715]}, {"w": "in", "b": [0.71, 0.6566, 0.7253, 0.6715]}, {"w": "one", "b": [0.7315, 0.6566, 0.759, 0.6715]}, {"w": "sparse", "b": [0.7651, 0.6566, 0.8143, 0.6715]}, {"w": "vector", "b": [0.8205, 0.6566, 0.8695, 0.6715]}, {"w": "is", "b": [0.1312, 0.6745, 0.1435, 0.6895]}, {"w": "rarely", "b": [0.1497, 0.6745, 0.1959, 0.6895]}, {"w": "contained", "b": [0.2021, 0.6745, 0.2787, 0.6895]}, {"w": "in", "b": [0.2848, 0.6745, 0.3, 0.6895]}, {"w": "the", "b": [0.3062, 0.6745, 0.3316, 0.6895]}, {"w": "same", "b": [0.3377, 0.6745, 0.3774, 0.6895]}, {"w": "dimensions", "b": [0.3835, 0.6745, 0.471, 0.6895]}, {"w": "as", "b": [0.4771, 0.6745, 0.4934, 0.6895]}, {"w": "the", "b": [0.4996, 0.6745, 0.525, 0.6895]}, {"w": "information", "b": [0.5311, 0.6745, 0.624, 0.6895]}, {"w": "in", "b": [0.6301, 0.6745, 0.6453, 0.6895]}, {"w": "another", "b": [0.6515, 0.6745, 0.7124, 0.6895]}, {"w": "sparse", "b": [0.7186, 0.6745, 0.7675, 0.6895]}, {"w": "vector,", "b": [0.7737, 0.6745, 0.8275, 0.6895]}, {"w": "even", "b": [0.8336, 0.6745, 0.8692, 0.6895]}, {"w": "if", "b": [0.1312, 0.6925, 0.142, 0.7074]}, {"w": "they", "b": [0.1482, 0.6925, 0.1835, 0.7074]}, {"w": "represent", "b": [0.1897, 0.6925, 0.2632, 0.7074]}, {"w": "similar", "b": [0.2694, 0.6925, 0.3239, 0.7074]}, {"w": "concepts.", "b": [0.33, 0.6925, 0.404, 0.7074]}]}, {"id": "b_18", "type": "paragraph", "text": "To reduce sparsity, you might want to augment your sparse feature vectors with additional non-zero values. To do that, you might send the tweet text to Wikipedia as a search query, and then extract other words from the search results. Wikipedia’s API doesn’t give any guarantee for the speed of response, so it could take several seconds to get a response. For real-time systems, feature extraction must be fast: a less informative feature computed in a fraction of a millisecond is often preferred to a feature with a high predictive power that takes seconds to compute. If your application must be fast, the features obtained from Wikipedia might not be appropriate for your task.", "words": [{"w": "To", "b": [0.1306, 0.7194, 0.1517, 0.7344]}, {"w": "reduce", "b": [0.1579, 0.7194, 0.2106, 0.7344]}, {"w": "sparsity,", "b": [0.2167, 0.7194, 0.2835, 0.7344]}, {"w": "you", "b": [0.2897, 0.7194, 0.3186, 0.7344]}, {"w": "might", "b": [0.3247, 0.7194, 0.3716, 0.7344]}, {"w": "want", "b": [0.3778, 0.7194, 0.417, 0.7344]}, {"w": "to", "b": [0.4231, 0.7194, 0.4396, 0.7344]}, {"w": "augment", "b": [0.4458, 0.7194, 0.5154, 0.7344]}, {"w": "your", "b": [0.5216, 0.7194, 0.5577, 0.7344]}, {"w": "sparse", "b": [0.5639, 0.7194, 0.6137, 0.7344]}, {"w": "feature", "b": [0.6198, 0.7194, 0.6761, 0.7344]}, {"w": "vectors", "b": [0.6823, 0.7194, 0.7392, 0.7344]}, {"w": "with", "b": [0.7453, 0.7194, 0.7814, 0.7344]}, {"w": "additional", "b": [0.7876, 0.7194, 0.8691, 0.7344]}, {"w": "non-zero", "b": [0.1312, 0.7373, 0.2002, 0.7523]}, {"w": "values.", "b": [0.2064, 0.7373, 0.2605, 0.7523]}, {"w": "To", "b": [0.2687, 0.7373, 0.2898, 0.7523]}, {"w": "do", "b": [0.2959, 0.7373, 0.3155, 0.7523]}, {"w": "that,", "b": [0.3216, 0.7373, 0.3607, 0.7523]}, {"w": "you", "b": [0.3669, 0.7373, 0.3957, 0.7523]}, {"w": "might", "b": [0.4018, 0.7373, 0.4486, 0.7523]}, {"w": "send", "b": [0.4547, 0.7373, 0.4909, 0.7523]}, {"w": "the", "b": [0.497, 0.7373, 0.5228, 0.7523]}, {"w": "tweet", "b": [0.5289, 0.7373, 0.5721, 0.7523]}, {"w": "text", "b": [0.5783, 0.7373, 0.6107, 0.7523]}, {"w": "to", "b": [0.6168, 0.7373, 0.6333, 0.7523]}, {"w": "Wikipedia", "b": [0.6394, 0.7373, 0.7222, 0.7523]}, {"w": "as", "b": [0.7284, 0.7373, 0.745, 0.7523]}, {"w": "a", "b": [0.7511, 0.7373, 0.7604, 0.7523]}, {"w": "search", "b": [0.7665, 0.7373, 0.8166, 0.7523]}, {"w": "query,", "b": [0.8227, 0.7373, 0.8717, 0.7523]}, {"w": "and", "b": [0.1312, 0.7553, 0.1616, 0.7702]}, {"w": "then", "b": [0.1687, 0.7553, 0.2053, 0.7702]}, {"w": "extract", "b": [0.2125, 0.7553, 0.2706, 0.7702]}, {"w": "other", "b": [0.2778, 0.7553, 0.3207, 0.7702]}, {"w": "words", "b": [0.3279, 0.7553, 0.3756, 0.7702]}, {"w": "from", "b": [0.3828, 0.7553, 0.421, 0.7702]}, {"w": "the", "b": [0.4282, 0.7553, 0.4543, 0.7702]}, {"w": "search", "b": [0.4615, 0.7553, 0.5124, 0.7702]}, {"w": "results.", "b": [0.5196, 0.7553, 0.5784, 0.7702]}, {"w": "Wikipedia’s", "b": [0.5897, 0.7553, 0.6865, 0.7702]}, {"w": "API", "b": [0.6937, 0.7553, 0.7274, 0.7702]}, {"w": "doesn’t", "b": [0.7346, 0.7553, 0.7938, 0.7702]}, {"w": "give", "b": [0.8009, 0.7553, 0.8334, 0.7702]}, {"w": "any", "b": [0.8405, 0.7553, 0.8698, 0.7702]}, {"w": "guarantee", "b": [0.1312, 0.7732, 0.2106, 0.7882]}, {"w": "for", "b": [0.2167, 0.7732, 0.2391, 0.7882]}, {"w": "the", "b": [0.2452, 0.7732, 0.2711, 0.7882]}, {"w": "speed", "b": [0.2773, 0.7732, 0.3225, 0.7882]}, {"w": "of", "b": [0.3286, 0.7732, 0.3436, 0.7882]}, {"w": "response,", "b": [0.3498, 0.7732, 0.4242, 0.7882]}, {"w": "so", "b": [0.4303, 0.7732, 0.447, 0.7882]}, {"w": "it", "b": [0.4531, 0.7732, 0.4656, 0.7882]}, {"w": "could", "b": [0.4717, 0.7732, 0.5152, 0.7882]}, {"w": "take", "b": [0.5214, 0.7732, 0.5556, 0.7882]}, {"w": "several", "b": [0.5617, 0.7732, 0.6168, 0.7882]}, {"w": "seconds", "b": [0.623, 0.7732, 0.6844, 0.7882]}, {"w": "to", "b": [0.6905, 0.7732, 0.7071, 0.7882]}, {"w": "get", "b": [0.7132, 0.7732, 0.7381, 0.7882]}, {"w": "a", "b": [0.7442, 0.7732, 0.7535, 0.7882]}, {"w": "response.", "b": [0.7597, 0.7732, 0.8341, 0.7882]}, {"w": "For", "b": [0.8423, 0.7732, 0.8696, 0.7882]}, {"w": "real-time", "b": [0.1312, 0.7912, 0.2028, 0.8061]}, {"w": "systems,", "b": [0.2089, 0.7912, 0.2761, 0.8061]}, {"w": "feature", "b": [0.2823, 0.7912, 0.338, 0.8061]}, {"w": "extraction", "b": [0.3442, 0.7912, 0.4255, 0.8061]}, {"w": "must", "b": [0.4316, 0.7912, 0.471, 0.8061]}, {"w": "be", "b": [0.4772, 0.7912, 0.4961, 0.8061]}, {"w": "fast:", "b": [0.5023, 0.7912, 0.5366, 0.8061]}, {"w": "a", "b": [0.5448, 0.7912, 0.554, 0.8061]}, {"w": "less", "b": [0.5602, 0.7912, 0.588, 0.8061]}, {"w": "informative", "b": [0.5941, 0.7912, 0.6856, 0.8061]}, {"w": "feature", "b": [0.6917, 0.7912, 0.7475, 0.8061]}, {"w": "computed", "b": [0.7536, 0.7912, 0.8323, 0.8061]}, {"w": "in", "b": [0.8384, 0.7912, 0.8538, 0.8061]}, {"w": "a", "b": [0.8599, 0.7912, 0.8691, 0.8061]}, {"w": "fraction", "b": [0.1312, 0.8091, 0.1921, 0.8241]}, {"w": "of", "b": [0.1975, 0.8091, 0.2121, 0.8241]}, {"w": "a", "b": [0.2175, 0.8091, 0.2266, 0.8241]}, {"w": "millisecond", "b": [0.232, 0.8091, 0.3196, 0.8241]}, {"w": "is", "b": [0.325, 0.8091, 0.3372, 0.8241]}, {"w": "often", "b": [0.3426, 0.8091, 0.3823, 0.8241]}, {"w": "preferred", "b": [0.3877, 0.8091, 0.4588, 0.8241]}, {"w": "to", "b": [0.4642, 0.8091, 0.4803, 0.8241]}, {"w": "a", "b": [0.4857, 0.8091, 0.4948, 0.8241]}, {"w": "feature", "b": [0.5002, 0.8091, 0.555, 0.8241]}, {"w": "with", "b": [0.5605, 0.8091, 0.5956, 0.8241]}, {"w": "a", "b": [0.6011, 0.8091, 0.6101, 0.8241]}, {"w": "high", "b": [0.6156, 0.8091, 0.6497, 0.8241]}, {"w": "predictive", "b": [0.6552, 0.8091, 0.7326, 0.8241]}, {"w": "power", "b": [0.738, 0.8091, 0.7848, 0.8241]}, {"w": "that", "b": [0.7903, 0.8091, 0.8234, 0.8241]}, {"w": "takes", "b": [0.8288, 0.8091, 0.8691, 0.8241]}, {"w": "seconds", "b": [0.1312, 0.8271, 0.1916, 0.842]}, {"w": "to", "b": [0.1977, 0.8271, 0.214, 0.842]}, {"w": "compute.", "b": [0.2202, 0.8271, 0.2935, 0.842]}, {"w": "If", "b": [0.3017, 0.8271, 0.314, 0.842]}, {"w": "your", "b": [0.3201, 0.8271, 0.3558, 0.842]}, {"w": "application", "b": [0.362, 0.8271, 0.4506, 0.842]}, {"w": "must", "b": [0.4568, 0.8271, 0.4961, 0.842]}, {"w": "be", "b": [0.5022, 0.8271, 0.5211, 0.842]}, {"w": "fast,", "b": [0.5272, 0.8271, 0.5615, 0.842]}, {"w": "the", "b": [0.5676, 0.8271, 0.5931, 0.842]}, {"w": "features", "b": [0.5993, 0.8271, 0.6621, 0.842]}, {"w": "obtained", "b": [0.6682, 0.8271, 0.7376, 0.842]}, {"w": "from", "b": [0.7437, 0.8271, 0.7809, 0.842]}, {"w": "Wikipedia", "b": [0.7871, 0.8271, 0.8691, 0.842]}, {"w": "might", "b": [0.1312, 0.845, 0.1779, 0.86]}, {"w": "not", "b": [0.184, 0.845, 0.2107, 0.86]}, {"w": "be", "b": [0.2168, 0.845, 0.2358, 0.86]}, {"w": "appropriate", "b": [0.242, 0.845, 0.3354, 0.86]}, {"w": "for", "b": [0.3415, 0.845, 0.3636, 0.86]}, {"w": "your", "b": [0.3698, 0.845, 0.4057, 0.86]}, {"w": "task.", "b": [0.4119, 0.845, 0.4504, 0.86]}]}, {"id": "b_19", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 21", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "21", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 111, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "4.4.3 Reliability", "words": [{"w": "4.4.3", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Reliability", "b": [0.1961, 0.0884, 0.2922, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "A good feature must also be reliable. Again, in our Wikipedia example, we cannot have a guarantee that the website will respond at all: it can be down, on planned maintenance, or the API may be temporarily overused and is rejecting requests. Therefore, we cannot trust that Wikipedia-based features will always be available and complete. Thus, we cannot call such features reliable. One unreliable feature can reduce the quality of predictions made by your model. Furthermore, some predictions can become entirely wrong if the value of an important feature is missing.", "words": [{"w": "A", "b": [0.1305, 0.1247, 0.1446, 0.1396]}, {"w": "good", "b": [0.1508, 0.1247, 0.1905, 0.1396]}, {"w": "feature", "b": [0.1967, 0.1247, 0.2537, 0.1396]}, {"w": "must", "b": [0.2599, 0.1247, 0.3003, 0.1396]}, {"w": "also", "b": [0.3064, 0.1247, 0.3379, 0.1396]}, {"w": "be", "b": [0.3441, 0.1247, 0.3634, 0.1396]}, {"w": "reliable.", "b": [0.3696, 0.1247, 0.4345, 0.1396]}, {"w": "Again,", "b": [0.4427, 0.1247, 0.4966, 0.1396]}, {"w": "in", "b": [0.5027, 0.1247, 0.5184, 0.1396]}, {"w": "our", "b": [0.5246, 0.1247, 0.5518, 0.1396]}, {"w": "Wikipedia", "b": [0.558, 0.1247, 0.6422, 0.1396]}, {"w": "example,", "b": [0.6483, 0.1247, 0.721, 0.1396]}, {"w": "we", "b": [0.7272, 0.1247, 0.7486, 0.1396]}, {"w": "cannot", "b": [0.7548, 0.1247, 0.8102, 0.1396]}, {"w": "have", "b": [0.8163, 0.1247, 0.8535, 0.1396]}, {"w": "a", "b": [0.8597, 0.1247, 0.8691, 0.1396]}, {"w": "guarantee", "b": [0.1312, 0.1426, 0.21, 0.1576]}, {"w": "that", "b": [0.2161, 0.1426, 0.25, 0.1576]}, {"w": "the", "b": [0.2562, 0.1426, 0.2819, 0.1576]}, {"w": "website", "b": [0.288, 0.1426, 0.3473, 0.1576]}, {"w": "will", "b": [0.3534, 0.1426, 0.3822, 0.1576]}, {"w": "respond", "b": [0.3883, 0.1426, 0.4517, 0.1576]}, {"w": "at", "b": [0.4579, 0.1426, 0.4743, 0.1576]}, {"w": "all:", "b": [0.4805, 0.1426, 0.5051, 0.1576]}, {"w": "it", "b": [0.5133, 0.1426, 0.5257, 0.1576]}, {"w": "can", "b": [0.5318, 0.1426, 0.5596, 0.1576]}, {"w": "be", "b": [0.5657, 0.1426, 0.5847, 0.1576]}, {"w": "down,", "b": [0.5909, 0.1426, 0.6387, 0.1576]}, {"w": "on", "b": [0.6448, 0.1426, 0.6644, 0.1576]}, {"w": "planned", "b": [0.6705, 0.1426, 0.7342, 0.1576]}, {"w": "maintenance,", "b": [0.7404, 0.1426, 0.8468, 0.1576]}, {"w": "or", "b": [0.853, 0.1426, 0.8695, 0.1576]}, {"w": "the", "b": [0.1312, 0.1606, 0.157, 0.1755]}, {"w": "API", "b": [0.1631, 0.1606, 0.1963, 0.1755]}, {"w": "may", "b": [0.2024, 0.1606, 0.2363, 0.1755]}, {"w": "be", "b": [0.2425, 0.1606, 0.2615, 0.1755]}, {"w": "temporarily", "b": [0.2677, 0.1606, 0.3624, 0.1755]}, {"w": "overused", "b": [0.3685, 0.1606, 0.4381, 0.1755]}, {"w": "and", "b": [0.4443, 0.1606, 0.4741, 0.1755]}, {"w": "is", "b": [0.4802, 0.1606, 0.4927, 0.1755]}, {"w": "rejecting", "b": [0.4989, 0.1606, 0.5683, 0.1755]}, {"w": "requests.", "b": [0.5745, 0.1606, 0.6452, 0.1755]}, {"w": "Therefore,", "b": [0.6534, 0.1606, 0.7364, 0.1755]}, {"w": "we", "b": [0.7425, 0.1606, 0.7636, 0.1755]}, {"w": "cannot", "b": [0.7697, 0.1606, 0.8242, 0.1755]}, {"w": "trust", "b": [0.8304, 0.1606, 0.8696, 0.1755]}, {"w": "that", "b": [0.1312, 0.1785, 0.1653, 0.1935]}, {"w": "Wikipedia-based", "b": [0.1715, 0.1785, 0.3065, 0.1935]}, {"w": "features", "b": [0.3126, 0.1785, 0.3764, 0.1935]}, {"w": "will", "b": [0.3825, 0.1785, 0.4115, 0.1935]}, {"w": "always", "b": [0.4176, 0.1785, 0.4709, 0.1935]}, {"w": "be", "b": [0.4771, 0.1785, 0.4962, 0.1935]}, {"w": "available", "b": [0.5024, 0.1785, 0.5727, 0.1935]}, {"w": "and", "b": [0.5788, 0.1785, 0.6088, 0.1935]}, {"w": "complete.", "b": [0.6149, 0.1785, 0.6925, 0.1935]}, {"w": "Thus,", "b": [0.7007, 0.1785, 0.7468, 0.1935]}, {"w": "we", "b": [0.7529, 0.1785, 0.7741, 0.1935]}, {"w": "cannot", "b": [0.7802, 0.1785, 0.835, 0.1935]}, {"w": "call", "b": [0.8412, 0.1785, 0.8691, 0.1935]}, {"w": "such", "b": [0.1312, 0.1965, 0.1667, 0.2114]}, {"w": "features", "b": [0.1728, 0.1965, 0.236, 0.2114]}, {"w": "reliable.", "b": [0.2421, 0.1965, 0.3057, 0.2114]}, {"w": "One", "b": [0.3139, 0.1965, 0.3467, 0.2114]}, {"w": "unreliable", "b": [0.3528, 0.1965, 0.4318, 0.2114]}, {"w": "feature", "b": [0.4379, 0.1965, 0.4938, 0.2114]}, {"w": "can", "b": [0.4999, 0.1965, 0.5276, 0.2114]}, {"w": "reduce", "b": [0.5337, 0.1965, 0.5861, 0.2114]}, {"w": "the", "b": [0.5922, 0.1965, 0.6178, 0.2114]}, {"w": "quality", "b": [0.6239, 0.1965, 0.6798, 0.2114]}, {"w": "of", "b": [0.6859, 0.1965, 0.7007, 0.2114]}, {"w": "predictions", "b": [0.7069, 0.1965, 0.7951, 0.2114]}, {"w": "made", "b": [0.8013, 0.1965, 0.8443, 0.2114]}, {"w": "by", "b": [0.8504, 0.1965, 0.8699, 0.2114]}, {"w": "your", "b": [0.1308, 0.2144, 0.1674, 0.2294]}, {"w": "model.", "b": [0.1742, 0.2144, 0.2291, 0.2294]}, {"w": "Furthermore,", "b": [0.2392, 0.2144, 0.3474, 0.2294]}, {"w": "some", "b": [0.3543, 0.2144, 0.3952, 0.2294]}, {"w": "predictions", "b": [0.402, 0.2144, 0.4921, 0.2294]}, {"w": "can", "b": [0.4989, 0.2144, 0.5271, 0.2294]}, {"w": "become", "b": [0.5339, 0.2144, 0.5951, 0.2294]}, {"w": "entirely", "b": [0.6018, 0.2144, 0.6636, 0.2294]}, {"w": "wrong", "b": [0.6704, 0.2144, 0.7206, 0.2294]}, {"w": "if", "b": [0.7274, 0.2144, 0.7384, 0.2294]}, {"w": "the", "b": [0.7452, 0.2144, 0.7713, 0.2294]}, {"w": "value", "b": [0.7781, 0.2144, 0.8205, 0.2294]}, {"w": "of", "b": [0.8273, 0.2144, 0.8425, 0.2294]}, {"w": "an", "b": [0.8492, 0.2144, 0.8691, 0.2294]}, {"w": "important", "b": [0.1312, 0.2324, 0.2123, 0.2473]}, {"w": "feature", "b": [0.2184, 0.2324, 0.2744, 0.2473]}, {"w": "is", "b": [0.2805, 0.2324, 0.2929, 0.2473]}, {"w": "missing.", "b": [0.2991, 0.2324, 0.3639, 0.2473]}]}, {"id": "b_2", "type": "paragraph", "text": "4.4.4 Uncorrelatedness", "words": [{"w": "4.4.4", "b": [0.1312, 0.2805, 0.1749, 0.2955]}, {"w": "Uncorrelatedness", "b": [0.1961, 0.2805, 0.3557, 0.2955]}]}, {"id": "b_3", "type": "paragraph", "text": "Correlation of two features means their values are related. If the growth of one feature implies the growth of the other, and the inverse is also true, then the two features are correlated.", "words": [{"w": "Correlation", "b": [0.1312, 0.3171, 0.2372, 0.332]}, {"w": "of", "b": [0.2413, 0.3168, 0.2559, 0.3317]}, {"w": "two", "b": [0.26, 0.3168, 0.2881, 0.3317]}, {"w": "features", "b": [0.2923, 0.3168, 0.3542, 0.3317]}, {"w": "means", "b": [0.3584, 0.3168, 0.4077, 0.3317]}, {"w": "their", "b": [0.4119, 0.3168, 0.4491, 0.3317]}, {"w": "values", "b": [0.4532, 0.3168, 0.501, 0.3317]}, {"w": "are", "b": [0.5052, 0.3168, 0.5294, 0.3317]}, {"w": "related.", "b": [0.5335, 0.3168, 0.5929, 0.3317]}, {"w": "If", "b": [0.6004, 0.3168, 0.6124, 0.3317]}, {"w": "the", "b": [0.6166, 0.3168, 0.6417, 0.3317]}, {"w": "growth", "b": [0.6458, 0.3168, 0.7006, 0.3317]}, {"w": "of", "b": [0.7048, 0.3168, 0.7193, 0.3317]}, {"w": "one", "b": [0.7235, 0.3168, 0.7506, 0.3317]}, {"w": "feature", "b": [0.7547, 0.3168, 0.8096, 0.3317]}, {"w": "implies", "b": [0.8137, 0.3168, 0.8691, 0.3317]}, {"w": "the", "b": [0.1312, 0.3347, 0.1569, 0.3497]}, {"w": "growth", "b": [0.163, 0.3347, 0.2189, 0.3497]}, {"w": "of", "b": [0.2251, 0.3347, 0.24, 0.3497]}, {"w": "the", "b": [0.2461, 0.3347, 0.2718, 0.3497]}, {"w": "other,", "b": [0.2779, 0.3347, 0.3251, 0.3497]}, {"w": "and", "b": [0.3313, 0.3347, 0.361, 0.3497]}, {"w": "the", "b": [0.3672, 0.3347, 0.3928, 0.3497]}, {"w": "inverse", "b": [0.399, 0.3347, 0.454, 0.3497]}, {"w": "is", "b": [0.4601, 0.3347, 0.4726, 0.3497]}, {"w": "also", "b": [0.4787, 0.3347, 0.5096, 0.3497]}, {"w": "true,", "b": [0.5157, 0.3347, 0.5537, 0.3497]}, {"w": "then", "b": [0.5599, 0.3347, 0.5958, 0.3497]}, {"w": "the", "b": [0.6019, 0.3347, 0.6276, 0.3497]}, {"w": "two", "b": [0.6337, 0.3347, 0.6624, 0.3497]}, {"w": "features", "b": [0.6686, 0.3347, 0.7318, 0.3497]}, {"w": "are", "b": [0.738, 0.3347, 0.7626, 0.3497]}, {"w": "correlated.", "b": [0.7688, 0.3347, 0.854, 0.3497]}]}, {"id": "b_4", "type": "paragraph", "text": "Once the model is in production, its performance may change because the input data’s properties may change over time. When many of your features are highly correlated, even a minor change in the input data’s properties may result in significant changes in the model’s behavior.", "words": [{"w": "Once", "b": [0.1312, 0.3617, 0.1731, 0.3766]}, {"w": "the", "b": [0.1809, 0.3617, 0.2071, 0.3766]}, {"w": "model", "b": [0.2149, 0.3617, 0.2646, 0.3766]}, {"w": "is", "b": [0.2724, 0.3617, 0.2851, 0.3766]}, {"w": "in", "b": [0.2929, 0.3617, 0.3086, 0.3766]}, {"w": "production,", "b": [0.3165, 0.3617, 0.4112, 0.3766]}, {"w": "its", "b": [0.4195, 0.3617, 0.4394, 0.3766]}, {"w": "performance", "b": [0.4473, 0.3617, 0.5488, 0.3766]}, {"w": "may", "b": [0.5567, 0.3617, 0.5912, 0.3766]}, {"w": "change", "b": [0.599, 0.3617, 0.655, 0.3766]}, {"w": "because", "b": [0.6628, 0.3617, 0.7262, 0.3766]}, {"w": "the", "b": [0.7341, 0.3617, 0.7603, 0.3766]}, {"w": "input", "b": [0.7681, 0.3617, 0.812, 0.3766]}, {"w": "data’s", "b": [0.8199, 0.3617, 0.8691, 0.3766]}, {"w": "properties", "b": [0.1312, 0.3796, 0.2133, 0.3946]}, {"w": "may", "b": [0.2195, 0.3796, 0.2538, 0.3946]}, {"w": "change", "b": [0.26, 0.3796, 0.3158, 0.3946]}, {"w": "over", "b": [0.3219, 0.3796, 0.3559, 0.3946]}, {"w": "time.", "b": [0.362, 0.3796, 0.4037, 0.3946]}, {"w": "When", "b": [0.4119, 0.3796, 0.4604, 0.3946]}, {"w": "many", "b": [0.4665, 0.3796, 0.5114, 0.3946]}, {"w": "of", "b": [0.5175, 0.3796, 0.5326, 0.3946]}, {"w": "your", "b": [0.5387, 0.3796, 0.5753, 0.3946]}, {"w": "features", "b": [0.5814, 0.3796, 0.6457, 0.3946]}, {"w": "are", "b": [0.6519, 0.3796, 0.677, 0.3946]}, {"w": "highly", "b": [0.6831, 0.3796, 0.7337, 0.3946]}, {"w": "correlated,", "b": [0.7398, 0.3796, 0.8265, 0.3946]}, {"w": "even", "b": [0.8326, 0.3796, 0.8691, 0.3946]}, {"w": "a", "b": [0.1312, 0.3975, 0.1406, 0.4125]}, {"w": "minor", "b": [0.1494, 0.3975, 0.1975, 0.4125]}, {"w": "change", "b": [0.2062, 0.3975, 0.2622, 0.4125]}, {"w": "in", "b": [0.2709, 0.3975, 0.2866, 0.4125]}, {"w": "the", "b": [0.2953, 0.3975, 0.3215, 0.4125]}, {"w": "input", "b": [0.3302, 0.3975, 0.3741, 0.4125]}, {"w": "data’s", "b": [0.3829, 0.3975, 0.4321, 0.4125]}, {"w": "properties", "b": [0.4409, 0.3975, 0.5232, 0.4125]}, {"w": "may", "b": [0.5319, 0.3975, 0.5664, 0.4125]}, {"w": "result", "b": [0.5751, 0.3975, 0.6213, 0.4125]}, {"w": "in", "b": [0.63, 0.3975, 0.6457, 0.4125]}, {"w": "significant", "b": [0.6544, 0.3975, 0.7377, 0.4125]}, {"w": "changes", "b": [0.7464, 0.3975, 0.8098, 0.4125]}, {"w": "in", "b": [0.8186, 0.3975, 0.8342, 0.4125]}, {"w": "the", "b": [0.843, 0.3975, 0.8691, 0.4125]}, {"w": "model’s", "b": [0.1312, 0.4155, 0.1924, 0.4304]}, {"w": "behavior.", "b": [0.1985, 0.4155, 0.2729, 0.4304]}]}, {"id": "b_5", "type": "paragraph", "text": "Sometimes the model was built under strict time constraints, so the developer used all possible sources of features. With time, maintaining those sources can become costly. It’s generally recommended to eliminate redundant or highly correlated features. Feature selection techniques help reduce such features.", "words": [{"w": "Sometimes", "b": [0.1312, 0.4424, 0.2192, 0.4574]}, {"w": "the", "b": [0.2273, 0.4424, 0.2535, 0.4574]}, {"w": "model", "b": [0.2616, 0.4424, 0.3113, 0.4574]}, {"w": "was", "b": [0.3194, 0.4424, 0.3493, 0.4574]}, {"w": "built", "b": [0.3574, 0.4424, 0.3961, 0.4574]}, {"w": "under", "b": [0.4043, 0.4424, 0.4514, 0.4574]}, {"w": "strict", "b": [0.4595, 0.4424, 0.5026, 0.4574]}, {"w": "time", "b": [0.5107, 0.4424, 0.5473, 0.4574]}, {"w": "constraints,", "b": [0.5555, 0.4424, 0.6504, 0.4574]}, {"w": "so", "b": [0.659, 0.4424, 0.6759, 0.4574]}, {"w": "the", "b": [0.684, 0.4424, 0.7101, 0.4574]}, {"w": "developer", "b": [0.7183, 0.4424, 0.7963, 0.4574]}, {"w": "used", "b": [0.8044, 0.4424, 0.8411, 0.4574]}, {"w": "all", "b": [0.8493, 0.4424, 0.8691, 0.4574]}, {"w": "possible", "b": [0.1312, 0.4604, 0.1958, 0.4753]}, {"w": "sources", "b": [0.202, 0.4604, 0.2608, 0.4753]}, {"w": "of", "b": [0.267, 0.4604, 0.2821, 0.4753]}, {"w": "features.", "b": [0.2883, 0.4604, 0.358, 0.4753]}, {"w": "With", "b": [0.3663, 0.4604, 0.4087, 0.4753]}, {"w": "time,", "b": [0.4148, 0.4604, 0.4567, 0.4753]}, {"w": "maintaining", "b": [0.4628, 0.4604, 0.5606, 0.4753]}, {"w": "those", "b": [0.5668, 0.4604, 0.6098, 0.4753]}, {"w": "sources", "b": [0.616, 0.4604, 0.6748, 0.4753]}, {"w": "can", "b": [0.681, 0.4604, 0.7092, 0.4753]}, {"w": "become", "b": [0.7154, 0.4604, 0.7766, 0.4753]}, {"w": "costly.", "b": [0.7827, 0.4604, 0.8341, 0.4753]}, {"w": "It’s", "b": [0.8424, 0.4604, 0.8692, 0.4753]}, {"w": "generally", "b": [0.1312, 0.4783, 0.2021, 0.4933]}, {"w": "recommended", "b": [0.207, 0.4783, 0.3156, 0.4933]}, {"w": "to", "b": [0.3205, 0.4783, 0.3366, 0.4933]}, {"w": "eliminate", "b": [0.3414, 0.4783, 0.4138, 0.4933]}, {"w": "redundant", "b": [0.4187, 0.4783, 0.4996, 0.4933]}, {"w": "or", "b": [0.5045, 0.4783, 0.5206, 0.4933]}, {"w": "highly", "b": [0.5255, 0.4783, 0.5742, 0.4933]}, {"w": "correlated", "b": [0.5791, 0.4783, 0.6576, 0.4933]}, {"w": "features.", "b": [0.6625, 0.4783, 0.7295, 0.4933]}, {"w": "Feature", "b": [0.7373, 0.4783, 0.7968, 0.4933]}, {"w": "selection", "b": [0.8017, 0.4783, 0.8692, 0.4933]}, {"w": "techniques", "b": [0.1312, 0.4963, 0.2155, 0.5112]}, {"w": "help", "b": [0.2216, 0.4963, 0.2555, 0.5112]}, {"w": "reduce", "b": [0.2616, 0.4963, 0.314, 0.5112]}, {"w": "such", "b": [0.3201, 0.4963, 0.3556, 0.5112]}, {"w": "features.", "b": [0.3618, 0.4963, 0.4301, 0.5112]}]}, {"id": "b_6", "type": "paragraph", "text": "4.4.5 Other Properties", "words": [{"w": "4.4.5", "b": [0.1312, 0.5444, 0.1749, 0.5594]}, {"w": "Other", "b": [0.1961, 0.5444, 0.2505, 0.5594]}, {"w": "Properties", "b": [0.2576, 0.5444, 0.3545, 0.5594]}]}, {"id": "b_7", "type": "paragraph", "text": "An essential property of a good feature is that the distribution of its values in the training set is similar to the distribution it will receive in production. For example, a tweet’s date might be necessary for some predictions about it. However, if you apply the model built on historical tweets to predict something about current tweets, the date of your production examples will always be out of the training distribution, which can result in a significant error.5", "words": [{"w": "An", "b": [0.1305, 0.5807, 0.1549, 0.5956]}, {"w": "essential", "b": [0.161, 0.5807, 0.2291, 0.5956]}, {"w": "property", "b": [0.2352, 0.5807, 0.3052, 0.5956]}, {"w": "of", "b": [0.3114, 0.5807, 0.3264, 0.5956]}, {"w": "a", "b": [0.3325, 0.5807, 0.3418, 0.5956]}, {"w": "good", "b": [0.348, 0.5807, 0.3873, 0.5956]}, {"w": "feature", "b": [0.3934, 0.5807, 0.4499, 0.5956]}, {"w": "is", "b": [0.4561, 0.5807, 0.4686, 0.5956]}, {"w": "that", "b": [0.4747, 0.5807, 0.5089, 0.5956]}, {"w": "the", "b": [0.515, 0.5807, 0.5409, 0.5956]}, {"w": "distribution", "b": [0.5471, 0.5807, 0.6425, 0.5956]}, {"w": "of", "b": [0.6487, 0.5807, 0.6637, 0.5956]}, {"w": "its", "b": [0.6698, 0.5807, 0.6896, 0.5956]}, {"w": "values", "b": [0.6957, 0.5807, 0.745, 0.5956]}, {"w": "in", "b": [0.7512, 0.5807, 0.7667, 0.5956]}, {"w": "the", "b": [0.7728, 0.5807, 0.7987, 0.5956]}, {"w": "training", "b": [0.8049, 0.5807, 0.8691, 0.5956]}, {"w": "set", "b": [0.1312, 0.5986, 0.1544, 0.6136]}, {"w": "is", "b": [0.1607, 0.5986, 0.1734, 0.6136]}, {"w": "similar", "b": [0.1797, 0.5986, 0.2353, 0.6136]}, {"w": "to", "b": [0.2416, 0.5986, 0.2584, 0.6136]}, {"w": "the", "b": [0.2647, 0.5986, 0.2909, 0.6136]}, {"w": "distribution", "b": [0.2972, 0.5986, 0.3936, 0.6136]}, {"w": "it", "b": [0.4, 0.5986, 0.4125, 0.6136]}, {"w": "will", "b": [0.4189, 0.5986, 0.4481, 0.6136]}, {"w": "receive", "b": [0.4545, 0.5986, 0.51, 0.6136]}, {"w": "in", "b": [0.5163, 0.5986, 0.532, 0.6136]}, {"w": "production.", "b": [0.5384, 0.5986, 0.6331, 0.6136]}, {"w": "For", "b": [0.6419, 0.5986, 0.6694, 0.6136]}, {"w": "example,", "b": [0.6758, 0.5986, 0.7485, 0.6136]}, {"w": "a", "b": [0.7549, 0.5986, 0.7643, 0.6136]}, {"w": "tweet’s", "b": [0.7706, 0.5986, 0.8272, 0.6136]}, {"w": "date", "b": [0.8336, 0.5986, 0.8691, 0.6136]}, {"w": "might", "b": [0.1312, 0.6166, 0.1788, 0.6315]}, {"w": "be", "b": [0.1857, 0.6166, 0.2051, 0.6315]}, {"w": "necessary", "b": [0.2119, 0.6166, 0.2891, 0.6315]}, {"w": "for", "b": [0.296, 0.6166, 0.3186, 0.6315]}, {"w": "some", "b": [0.3254, 0.6166, 0.3663, 0.6315]}, {"w": "predictions", "b": [0.3732, 0.6166, 0.4634, 0.6315]}, {"w": "about", "b": [0.4702, 0.6166, 0.5178, 0.6315]}, {"w": "it.", "b": [0.5247, 0.6166, 0.5425, 0.6315]}, {"w": "However,", "b": [0.5529, 0.6166, 0.6278, 0.6315]}, {"w": "if", "b": [0.6348, 0.6166, 0.6458, 0.6315]}, {"w": "you", "b": [0.6527, 0.6166, 0.682, 0.6315]}, {"w": "apply", "b": [0.6889, 0.6166, 0.7344, 0.6315]}, {"w": "the", "b": [0.7413, 0.6166, 0.7675, 0.6315]}, {"w": "model", "b": [0.7743, 0.6166, 0.824, 0.6315]}, {"w": "built", "b": [0.8309, 0.6166, 0.8696, 0.6315]}, {"w": "on", "b": [0.1312, 0.6345, 0.1507, 0.6495]}, {"w": "historical", "b": [0.1569, 0.6345, 0.2309, 0.6495]}, {"w": "tweets", "b": [0.237, 0.6345, 0.2874, 0.6495]}, {"w": "to", "b": [0.2935, 0.6345, 0.3099, 0.6495]}, {"w": "predict", "b": [0.316, 0.6345, 0.3725, 0.6495]}, {"w": "something", "b": [0.3786, 0.6345, 0.4608, 0.6495]}, {"w": "about", "b": [0.4669, 0.6345, 0.5136, 0.6495]}, {"w": "current", "b": [0.5197, 0.6345, 0.5778, 0.6495]}, {"w": "tweets,", "b": [0.5839, 0.6345, 0.6394, 0.6495]}, {"w": "the", "b": [0.6455, 0.6345, 0.6712, 0.6495]}, {"w": "date", "b": [0.6773, 0.6345, 0.7122, 0.6495]}, {"w": "of", "b": [0.7183, 0.6345, 0.7332, 0.6495]}, {"w": "your", "b": [0.7393, 0.6345, 0.7753, 0.6495]}, {"w": "production", "b": [0.7814, 0.6345, 0.8691, 0.6495]}, {"w": "examples", "b": [0.1312, 0.6525, 0.2061, 0.6674]}, {"w": "will", "b": [0.2129, 0.6525, 0.2422, 0.6674]}, {"w": "always", "b": [0.249, 0.6525, 0.303, 0.6674]}, {"w": "be", "b": [0.3098, 0.6525, 0.3291, 0.6674]}, {"w": "out", "b": [0.3359, 0.6525, 0.3631, 0.6674]}, {"w": "of", "b": [0.3699, 0.6525, 0.3851, 0.6674]}, {"w": "the", "b": [0.3919, 0.6525, 0.4181, 0.6674]}, {"w": "training", "b": [0.4249, 0.6525, 0.4898, 0.6674]}, {"w": "distribution,", "b": [0.4966, 0.6525, 0.5982, 0.6674]}, {"w": "which", "b": [0.6052, 0.6525, 0.6528, 0.6674]}, {"w": "can", "b": [0.6596, 0.6525, 0.6878, 0.6674]}, {"w": "result", "b": [0.6946, 0.6525, 0.7408, 0.6674]}, {"w": "in", "b": [0.7476, 0.6525, 0.7633, 0.6674]}, {"w": "a", "b": [0.7701, 0.6525, 0.7795, 0.6674]}, {"w": "significant", "b": [0.7863, 0.6525, 0.8696, 0.6674]}, {"w": "error.5", "b": [0.1312, 0.6688, 0.1828, 0.6854]}]}, {"id": "b_8", "type": "paragraph", "text": "Finally, features that you design should be unitary, easy to understand, and maintain. Unitary means the feature represents a certain simple-to-understand and -explain quantity. For example, when classifying a car’s type given its characteristics, you may use such unitary features as weight, length, width, and color. A feature like “length divided by weight” is not unitary, as it’s composed of two unitary features.", "words": [{"w": "Finally,", "b": [0.1312, 0.6973, 0.1927, 0.7123]}, {"w": "features", "b": [0.202, 0.6973, 0.2665, 0.7123]}, {"w": "that", "b": [0.2752, 0.6973, 0.3097, 0.7123]}, {"w": "you", "b": [0.3184, 0.6973, 0.3477, 0.7123]}, {"w": "design", "b": [0.3564, 0.6973, 0.4077, 0.7123]}, {"w": "should", "b": [0.4164, 0.6973, 0.4699, 0.7123]}, {"w": "be", "b": [0.4785, 0.6973, 0.4979, 0.7123]}, {"w": "unitary,", "b": [0.5066, 0.6973, 0.5705, 0.7123]}, {"w": "easy", "b": [0.5798, 0.6973, 0.6149, 0.7123]}, {"w": "to", "b": [0.6236, 0.6973, 0.6403, 0.7123]}, {"w": "understand,", "b": [0.649, 0.6973, 0.7465, 0.7123]}, {"w": "and", "b": [0.7558, 0.6973, 0.7861, 0.7123]}, {"w": "maintain.", "b": [0.7948, 0.6973, 0.8727, 0.7123]}, {"w": "Unitary", "b": [0.1312, 0.7153, 0.1942, 0.7302]}, {"w": "means", "b": [0.2004, 0.7153, 0.251, 0.7302]}, {"w": "the", "b": [0.2572, 0.7153, 0.283, 0.7302]}, {"w": "feature", "b": [0.2892, 0.7153, 0.3455, 0.7302]}, {"w": "represents", "b": [0.3517, 0.7153, 0.433, 0.7302]}, {"w": "a", "b": [0.4392, 0.7153, 0.4484, 0.7302]}, {"w": "certain", "b": [0.4546, 0.7153, 0.5104, 0.7302]}, {"w": "simple-to-understand", "b": [0.5166, 0.7153, 0.6881, 0.7302]}, {"w": "and", "b": [0.6942, 0.7153, 0.7242, 0.7302]}, {"w": "-explain", "b": [0.7303, 0.7153, 0.7948, 0.7302]}, {"w": "quantity.", "b": [0.801, 0.7153, 0.8727, 0.7302]}, {"w": "For", "b": [0.1312, 0.7332, 0.1576, 0.7482]}, {"w": "example,", "b": [0.1636, 0.7332, 0.2334, 0.7482]}, {"w": "when", "b": [0.2394, 0.7332, 0.2806, 0.7482]}, {"w": "classifying", "b": [0.2866, 0.7332, 0.3672, 0.7482]}, {"w": "a", "b": [0.3732, 0.7332, 0.3822, 0.7482]}, {"w": "car’s", "b": [0.3882, 0.7332, 0.4245, 0.7482]}, {"w": "type", "b": [0.4305, 0.7332, 0.4652, 0.7482]}, {"w": "given", "b": [0.4711, 0.7332, 0.5123, 0.7482]}, {"w": "its", "b": [0.5183, 0.7332, 0.5375, 0.7482]}, {"w": "characteristics,", "b": [0.5435, 0.7332, 0.6609, 0.7482]}, {"w": "you", "b": [0.6669, 0.7332, 0.695, 0.7482]}, {"w": "may", "b": [0.701, 0.7332, 0.7341, 0.7482]}, {"w": "use", "b": [0.7401, 0.7332, 0.7653, 0.7482]}, {"w": "such", "b": [0.7713, 0.7332, 0.806, 0.7482]}, {"w": "unitary", "b": [0.812, 0.7332, 0.8698, 0.7482]}, {"w": "features", "b": [0.1312, 0.7512, 0.1937, 0.7661]}, {"w": "as", "b": [0.1998, 0.7512, 0.2161, 0.7661]}, {"w": "weight,", "b": [0.2222, 0.7512, 0.2789, 0.7661]}, {"w": "length,", "b": [0.285, 0.7512, 0.3397, 0.7661]}, {"w": "width,", "b": [0.3458, 0.7512, 0.3965, 0.7661]}, {"w": "and", "b": [0.4026, 0.7512, 0.4319, 0.7661]}, {"w": "color.", "b": [0.4381, 0.7512, 0.4817, 0.7661]}, {"w": "A", "b": [0.4899, 0.7512, 0.5035, 0.7661]}, {"w": "feature", "b": [0.5097, 0.7512, 0.5649, 0.7661]}, {"w": "like", "b": [0.571, 0.7512, 0.5984, 0.7661]}, {"w": "“length", "b": [0.6045, 0.7512, 0.6627, 0.7661]}, {"w": "divided", "b": [0.6688, 0.7512, 0.7271, 0.7661]}, {"w": "by", "b": [0.7332, 0.7512, 0.7524, 0.7661]}, {"w": "weight”", "b": [0.7586, 0.7512, 0.8188, 0.7661]}, {"w": "is", "b": [0.8249, 0.7512, 0.8372, 0.7661]}, {"w": "not", "b": [0.8433, 0.7512, 0.8696, 0.7661]}, {"w": "unitary,", "b": [0.1312, 0.7691, 0.1939, 0.7841]}, {"w": "as", "b": [0.2, 0.7691, 0.2165, 0.7841]}, {"w": "it’s", "b": [0.2226, 0.7691, 0.2474, 0.7841]}, {"w": "composed", "b": [0.2535, 0.7691, 0.3321, 0.7841]}, {"w": "of", "b": [0.3382, 0.7691, 0.3531, 0.7841]}, {"w": "two", "b": [0.3592, 0.7691, 0.3879, 0.7841]}, {"w": "unitary", "b": [0.3941, 0.7691, 0.4531, 0.7841]}, {"w": "features.", "b": [0.4593, 0.7691, 0.5276, 0.7841]}]}, {"id": "b_9", "type": "paragraph", "text": "5The date information often is relevant for machine learning and can still be included in the training data. For instance, you could consider engineering cyclical features like “hour of the day,” “day of the week,” “month of the year.” For the prediction problems in which time seasonality has predictive power, having such", "words": [{"w": "5The", "b": [0.1518, 0.7962, 0.1859, 0.81]}, {"w": "date", "b": [0.1911, 0.7982, 0.2201, 0.81]}, {"w": "information", "b": [0.2253, 0.7982, 0.3034, 0.81]}, {"w": "often", "b": [0.3086, 0.7982, 0.3424, 0.81]}, {"w": "is", "b": [0.3476, 0.7982, 0.3579, 0.81]}, {"w": "relevant", "b": [0.3631, 0.7982, 0.416, 0.81]}, {"w": "for", "b": [0.4212, 0.7982, 0.4396, 0.81]}, {"w": "machine", "b": [0.4448, 0.7982, 0.4998, 0.81]}, {"w": "learning", "b": [0.505, 0.7982, 0.5588, 0.81]}, {"w": "and", "b": [0.564, 0.7982, 0.5887, 0.81]}, {"w": "can", "b": [0.5939, 0.7982, 0.617, 0.81]}, {"w": "still", "b": [0.6222, 0.7982, 0.647, 0.81]}, {"w": "be", "b": [0.6522, 0.7982, 0.668, 0.81]}, {"w": "included", "b": [0.6732, 0.7982, 0.7295, 0.81]}, {"w": "in", "b": [0.7347, 0.7982, 0.7475, 0.81]}, {"w": "the", "b": [0.7527, 0.7982, 0.7741, 0.81]}, {"w": "training", "b": [0.7793, 0.7982, 0.8322, 0.81]}, {"w": "data.", "b": [0.8374, 0.7982, 0.8716, 0.81]}, {"w": "For", "b": [0.1312, 0.8122, 0.1546, 0.8243]}, {"w": "instance,", "b": [0.1601, 0.8122, 0.2215, 0.8243]}, {"w": "you", "b": [0.2271, 0.8122, 0.252, 0.8243]}, {"w": "could", "b": [0.2575, 0.8122, 0.2948, 0.8243]}, {"w": "consider", "b": [0.3004, 0.8122, 0.3573, 0.8243]}, {"w": "engineering", "b": [0.3629, 0.8122, 0.4419, 0.8243]}, {"w": "cyclical", "b": [0.4478, 0.8122, 0.5053, 0.8242]}, {"w": "features", "b": [0.5116, 0.8122, 0.5742, 0.8242]}, {"w": "like", "b": [0.5798, 0.8122, 0.6038, 0.8243]}, {"w": "“hour", "b": [0.6093, 0.8122, 0.6488, 0.8243]}, {"w": "of", "b": [0.6544, 0.8122, 0.6673, 0.8243]}, {"w": "the", "b": [0.6728, 0.8122, 0.695, 0.8243]}, {"w": "day,”", "b": [0.7005, 0.8122, 0.7361, 0.8243]}, {"w": "“day", "b": [0.7417, 0.8122, 0.7742, 0.8243]}, {"w": "of", "b": [0.7797, 0.8122, 0.7926, 0.8243]}, {"w": "the", "b": [0.7981, 0.8122, 0.8203, 0.8243]}, {"w": "week,”", "b": [0.8259, 0.8122, 0.8717, 0.8243]}, {"w": "“month", "b": [0.129, 0.8266, 0.1794, 0.8384]}, {"w": "of", "b": [0.1846, 0.8266, 0.197, 0.8384]}, {"w": "the", "b": [0.2022, 0.8266, 0.2236, 0.8384]}, {"w": "year.”", "b": [0.2288, 0.8266, 0.2664, 0.8384]}, {"w": "For", "b": [0.2734, 0.8266, 0.2958, 0.8384]}, {"w": "the", "b": [0.301, 0.8266, 0.3223, 0.8384]}, {"w": "prediction", "b": [0.3276, 0.8266, 0.3951, 0.8384]}, {"w": "problems", "b": [0.4003, 0.8266, 0.4611, 0.8384]}, {"w": "in", "b": [0.4663, 0.8266, 0.4791, 0.8384]}, {"w": "which", "b": [0.4843, 0.8266, 0.5232, 0.8384]}, {"w": "time", "b": [0.5284, 0.8266, 0.5583, 0.8384]}, {"w": "seasonality", "b": [0.5635, 0.8266, 0.6363, 0.8384]}, {"w": "has", "b": [0.6415, 0.8266, 0.6638, 0.8384]}, {"w": "predictive", "b": [0.6691, 0.8266, 0.7349, 0.8384]}, {"w": "power,", "b": [0.7401, 0.8266, 0.7841, 0.8384]}, {"w": "having", "b": [0.7893, 0.8266, 0.8337, 0.8384]}, {"w": "such", "b": [0.839, 0.8266, 0.8685, 0.8384]}]}, {"id": "b_10", "type": "paragraph", "text": "features can be useful.", "words": [{"w": "features", "b": [0.1312, 0.8407, 0.1849, 0.8527]}, {"w": "can", "b": [0.1901, 0.8407, 0.2136, 0.8527]}, {"w": "be", "b": [0.2189, 0.8407, 0.235, 0.8527]}, {"w": "useful.", "b": [0.2402, 0.8407, 0.2843, 0.8527]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 22", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "22", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 112, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Some learning algorithms may benefit from combining features. However, it’s preferable to do this in a dedicated stage in the model training pipeline. We will consider feature combination and generation of synthetic features later in this chapter.", "words": [{"w": "Some", "b": [0.1312, 0.0881, 0.1734, 0.1031]}, {"w": "learning", "b": [0.1789, 0.0881, 0.2422, 0.1031]}, {"w": "algorithms", "b": [0.2477, 0.0881, 0.3312, 0.1031]}, {"w": "may", "b": [0.3367, 0.0881, 0.3698, 0.1031]}, {"w": "benefit", "b": [0.3752, 0.0881, 0.429, 0.1031]}, {"w": "from", "b": [0.4345, 0.0881, 0.4712, 0.1031]}, {"w": "combining", "b": [0.4766, 0.0881, 0.5575, 0.1031]}, {"w": "features.", "b": [0.563, 0.0881, 0.63, 0.1031]}, {"w": "However,", "b": [0.6379, 0.0881, 0.7098, 0.1031]}, {"w": "it’s", "b": [0.7154, 0.0881, 0.7396, 0.1031]}, {"w": "preferable", "b": [0.745, 0.0881, 0.823, 0.1031]}, {"w": "to", "b": [0.8285, 0.0881, 0.8446, 0.1031]}, {"w": "do", "b": [0.85, 0.0881, 0.8691, 0.1031]}, {"w": "this", "b": [0.1312, 0.106, 0.1605, 0.121]}, {"w": "in", "b": [0.1662, 0.106, 0.1813, 0.121]}, {"w": "a", "b": [0.187, 0.106, 0.196, 0.121]}, {"w": "dedicated", "b": [0.2017, 0.106, 0.2771, 0.121]}, {"w": "stage", "b": [0.2828, 0.106, 0.3231, 0.121]}, {"w": "in", "b": [0.3288, 0.106, 0.3439, 0.121]}, {"w": "the", "b": [0.3496, 0.106, 0.3747, 0.121]}, {"w": "model", "b": [0.3804, 0.106, 0.4282, 0.121]}, {"w": "training", "b": [0.4339, 0.106, 0.4962, 0.121]}, {"w": "pipeline.", "b": [0.5019, 0.106, 0.5688, 0.121]}, {"w": "We", "b": [0.5768, 0.106, 0.6019, 0.121]}, {"w": "will", "b": [0.6076, 0.106, 0.6358, 0.121]}, {"w": "consider", "b": [0.6415, 0.106, 0.706, 0.121]}, {"w": "feature", "b": [0.7116, 0.106, 0.7665, 0.121]}, {"w": "combination", "b": [0.7722, 0.106, 0.8691, 0.121]}, {"w": "and", "b": [0.1312, 0.124, 0.161, 0.1389]}, {"w": "generation", "b": [0.1671, 0.124, 0.2513, 0.1389]}, {"w": "of", "b": [0.2574, 0.124, 0.2723, 0.1389]}, {"w": "synthetic", "b": [0.2784, 0.124, 0.3514, 0.1389]}, {"w": "features", "b": [0.3575, 0.124, 0.4208, 0.1389]}, {"w": "later", "b": [0.4269, 0.124, 0.4639, 0.1389]}, {"w": "in", "b": [0.47, 0.124, 0.4854, 0.1389]}, {"w": "this", "b": [0.4915, 0.124, 0.5214, 0.1389]}, {"w": "chapter.", "b": [0.5276, 0.124, 0.5927, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "4.5 Feature Selection", "words": [{"w": "4.5", "b": [0.1312, 0.1728, 0.1631, 0.1908]}, {"w": "Feature", "b": [0.188, 0.1728, 0.2701, 0.1908]}, {"w": "Selection", "b": [0.2784, 0.1728, 0.3759, 0.1908]}]}, {"id": "b_2", "type": "paragraph", "text": "Not all features will be equally important for your problem. For instance, in the problem of detecting movies in tweets, the length of the movie might not be a very important feature. At the same time, when you use bag-of-words, the vocabulary can be very large, while most tokens will appear in the collection of texts only once. If the learning algorithm “sees” that some feature has a non-zero value only in a couple of training examples, it is doubtful the algorithm will learn any useful pattern from that feature. However, if the feature vector is very wide (contains thousands or millions of features), the training time can become prohibitively long. Furthermore, the overall size of the training data can become too large to fit in the RAM of a conventional server.", "words": [{"w": "Not", "b": [0.1312, 0.2114, 0.1613, 0.2264]}, {"w": "all", "b": [0.1675, 0.2114, 0.1868, 0.2264]}, {"w": "features", "b": [0.193, 0.2114, 0.2558, 0.2264]}, {"w": "will", "b": [0.262, 0.2114, 0.2905, 0.2264]}, {"w": "be", "b": [0.2967, 0.2114, 0.3155, 0.2264]}, {"w": "equally", "b": [0.3217, 0.2114, 0.3788, 0.2264]}, {"w": "important", "b": [0.3849, 0.2114, 0.4655, 0.2264]}, {"w": "for", "b": [0.4716, 0.2114, 0.4936, 0.2264]}, {"w": "your", "b": [0.4998, 0.2114, 0.5355, 0.2264]}, {"w": "problem.", "b": [0.5416, 0.2114, 0.612, 0.2264]}, {"w": "For", "b": [0.6202, 0.2114, 0.647, 0.2264]}, {"w": "instance,", "b": [0.6532, 0.2114, 0.7236, 0.2264]}, {"w": "in", "b": [0.7298, 0.2114, 0.7451, 0.2264]}, {"w": "the", "b": [0.7512, 0.2114, 0.7767, 0.2264]}, {"w": "problem", "b": [0.7829, 0.2114, 0.8482, 0.2264]}, {"w": "of", "b": [0.8543, 0.2114, 0.8691, 0.2264]}, {"w": "detecting", "b": [0.1312, 0.2294, 0.206, 0.2443]}, {"w": "movies", "b": [0.2122, 0.2294, 0.2674, 0.2443]}, {"w": "in", "b": [0.2735, 0.2294, 0.2891, 0.2443]}, {"w": "tweets,", "b": [0.2952, 0.2294, 0.3515, 0.2443]}, {"w": "the", "b": [0.3576, 0.2294, 0.3836, 0.2443]}, {"w": "length", "b": [0.3897, 0.2294, 0.4407, 0.2443]}, {"w": "of", "b": [0.4468, 0.2294, 0.4619, 0.2443]}, {"w": "the", "b": [0.468, 0.2294, 0.494, 0.2443]}, {"w": "movie", "b": [0.5002, 0.2294, 0.5479, 0.2443]}, {"w": "might", "b": [0.5541, 0.2294, 0.6013, 0.2443]}, {"w": "not", "b": [0.6075, 0.2294, 0.6345, 0.2443]}, {"w": "be", "b": [0.6407, 0.2294, 0.6599, 0.2443]}, {"w": "a", "b": [0.666, 0.2294, 0.6754, 0.2443]}, {"w": "very", "b": [0.6815, 0.2294, 0.7164, 0.2443]}, {"w": "important", "b": [0.7225, 0.2294, 0.8046, 0.2443]}, {"w": "feature.", "b": [0.8108, 0.2294, 0.8727, 0.2443]}, {"w": "At", "b": [0.1305, 0.2473, 0.1509, 0.2623]}, {"w": "the", "b": [0.157, 0.2473, 0.1825, 0.2623]}, {"w": "same", "b": [0.1886, 0.2473, 0.2284, 0.2623]}, {"w": "time,", "b": [0.2346, 0.2473, 0.2752, 0.2623]}, {"w": "when", "b": [0.2814, 0.2473, 0.3231, 0.2623]}, {"w": "you", "b": [0.3293, 0.2473, 0.3578, 0.2623]}, {"w": "use", "b": [0.3639, 0.2473, 0.3895, 0.2623]}, {"w": "bag-of-words,", "b": [0.3957, 0.2473, 0.5026, 0.2623]}, {"w": "the", "b": [0.5087, 0.2473, 0.5342, 0.2623]}, {"w": "vocabulary", "b": [0.5403, 0.2473, 0.6279, 0.2623]}, {"w": "can", "b": [0.634, 0.2473, 0.6615, 0.2623]}, {"w": "be", "b": [0.6677, 0.2473, 0.6865, 0.2623]}, {"w": "very", "b": [0.6927, 0.2473, 0.7268, 0.2623]}, {"w": "large,", "b": [0.733, 0.2473, 0.7768, 0.2623]}, {"w": "while", "b": [0.7829, 0.2473, 0.8246, 0.2623]}, {"w": "most", "b": [0.8308, 0.2473, 0.8696, 0.2623]}, {"w": "tokens", "b": [0.1312, 0.2652, 0.1826, 0.2802]}, {"w": "will", "b": [0.1887, 0.2652, 0.2174, 0.2802]}, {"w": "appear", "b": [0.2236, 0.2652, 0.2784, 0.2802]}, {"w": "in", "b": [0.2846, 0.2652, 0.2999, 0.2802]}, {"w": "the", "b": [0.3061, 0.2652, 0.3317, 0.2802]}, {"w": "collection", "b": [0.3379, 0.2652, 0.4137, 0.2802]}, {"w": "of", "b": [0.4199, 0.2652, 0.4347, 0.2802]}, {"w": "texts", "b": [0.4409, 0.2652, 0.4804, 0.2802]}, {"w": "only", "b": [0.4866, 0.2652, 0.5209, 0.2802]}, {"w": "once.", "b": [0.5271, 0.2652, 0.568, 0.2802]}, {"w": "If", "b": [0.5763, 0.2652, 0.5886, 0.2802]}, {"w": "the", "b": [0.5947, 0.2652, 0.6203, 0.2802]}, {"w": "learning", "b": [0.6265, 0.2652, 0.6911, 0.2802]}, {"w": "algorithm", "b": [0.6972, 0.2652, 0.7751, 0.2802]}, {"w": "“sees”", "b": [0.7813, 0.2652, 0.8297, 0.2802]}, {"w": "that", "b": [0.8358, 0.2652, 0.8696, 0.2802]}, {"w": "some", "b": [0.1312, 0.2832, 0.172, 0.2982]}, {"w": "feature", "b": [0.1782, 0.2832, 0.2352, 0.2982]}, {"w": "has", "b": [0.2413, 0.2832, 0.2685, 0.2982]}, {"w": "a", "b": [0.2747, 0.2832, 0.2841, 0.2982]}, {"w": "non-zero", "b": [0.2902, 0.2832, 0.3602, 0.2982]}, {"w": "value", "b": [0.3664, 0.2832, 0.4087, 0.2982]}, {"w": "only", "b": [0.4148, 0.2832, 0.4498, 0.2982]}, {"w": "in", "b": [0.4559, 0.2832, 0.4716, 0.2982]}, {"w": "a", "b": [0.4777, 0.2832, 0.4871, 0.2982]}, {"w": "couple", "b": [0.4933, 0.2832, 0.5455, 0.2982]}, {"w": "of", "b": [0.5517, 0.2832, 0.5668, 0.2982]}, {"w": "training", "b": [0.5729, 0.2832, 0.6377, 0.2982]}, {"w": "examples,", "b": [0.6439, 0.2832, 0.7238, 0.2982]}, {"w": "it", "b": [0.73, 0.2832, 0.7425, 0.2982]}, {"w": "is", "b": [0.7487, 0.2832, 0.7613, 0.2982]}, {"w": "doubtful", "b": [0.7674, 0.2832, 0.8369, 0.2982]}, {"w": "the", "b": [0.843, 0.2832, 0.8691, 0.2982]}, {"w": "algorithm", "b": [0.1312, 0.3011, 0.2108, 0.3161]}, {"w": "will", "b": [0.2179, 0.3011, 0.2471, 0.3161]}, {"w": "learn", "b": [0.2542, 0.3011, 0.2951, 0.3161]}, {"w": "any", "b": [0.3022, 0.3011, 0.3315, 0.3161]}, {"w": "useful", "b": [0.3386, 0.3011, 0.3863, 0.3161]}, {"w": "pattern", "b": [0.3934, 0.3011, 0.4541, 0.3161]}, {"w": "from", "b": [0.4612, 0.3011, 0.4994, 0.3161]}, {"w": "that", "b": [0.5065, 0.3011, 0.541, 0.3161]}, {"w": "feature.", "b": [0.5481, 0.3011, 0.6104, 0.3161]}, {"w": "However,", "b": [0.6215, 0.3011, 0.6963, 0.3161]}, {"w": "if", "b": [0.7037, 0.3011, 0.7147, 0.3161]}, {"w": "the", "b": [0.7218, 0.3011, 0.7479, 0.3161]}, {"w": "feature", "b": [0.755, 0.3011, 0.8121, 0.3161]}, {"w": "vector", "b": [0.8192, 0.3011, 0.8695, 0.3161]}, {"w": "is", "b": [0.1312, 0.3191, 0.1439, 0.334]}, {"w": "very", "b": [0.1519, 0.3191, 0.187, 0.334]}, {"w": "wide", "b": [0.195, 0.3191, 0.2327, 0.334]}, {"w": "(contains", "b": [0.2407, 0.3191, 0.3156, 0.334]}, {"w": "thousands", "b": [0.3236, 0.3191, 0.4065, 0.334]}, {"w": "or", "b": [0.4145, 0.3191, 0.4313, 0.334]}, {"w": "millions", "b": [0.4393, 0.3191, 0.5032, 0.334]}, {"w": "of", "b": [0.5112, 0.3191, 0.5264, 0.334]}, {"w": "features),", "b": [0.5344, 0.3191, 0.6115, 0.334]}, {"w": "the", "b": [0.62, 0.3191, 0.6461, 0.334]}, {"w": "training", "b": [0.6541, 0.3191, 0.719, 0.334]}, {"w": "time", "b": [0.7271, 0.3191, 0.7637, 0.334]}, {"w": "can", "b": [0.7717, 0.3191, 0.7999, 0.334]}, {"w": "become", "b": [0.8079, 0.3191, 0.8691, 0.334]}, {"w": "prohibitively", "b": [0.1312, 0.337, 0.2313, 0.352]}, {"w": "long.", "b": [0.2374, 0.337, 0.2756, 0.352]}, {"w": "Furthermore,", "b": [0.2837, 0.337, 0.3876, 0.352]}, {"w": "the", "b": [0.3937, 0.337, 0.4189, 0.352]}, {"w": "overall", "b": [0.425, 0.337, 0.4767, 0.352]}, {"w": "size", "b": [0.4829, 0.337, 0.5111, 0.352]}, {"w": "of", "b": [0.5172, 0.337, 0.5318, 0.352]}, {"w": "the", "b": [0.5379, 0.337, 0.563, 0.352]}, {"w": "training", "b": [0.5691, 0.337, 0.6315, 0.352]}, {"w": "data", "b": [0.6376, 0.337, 0.6727, 0.352]}, {"w": "can", "b": [0.6788, 0.337, 0.706, 0.352]}, {"w": "become", "b": [0.7121, 0.337, 0.7709, 0.352]}, {"w": "too", "b": [0.777, 0.337, 0.8026, 0.352]}, {"w": "large", "b": [0.8087, 0.337, 0.8469, 0.352]}, {"w": "to", "b": [0.853, 0.337, 0.8691, 0.352]}, {"w": "fit", "b": [0.1312, 0.355, 0.1487, 0.3699]}, {"w": "in", "b": [0.1548, 0.355, 0.1702, 0.3699]}, {"w": "the", "b": [0.1764, 0.355, 0.202, 0.3699]}, {"w": "RAM", "b": [0.2081, 0.355, 0.2525, 0.3699]}, {"w": "of", "b": [0.2586, 0.355, 0.2735, 0.3699]}, {"w": "a", "b": [0.2796, 0.355, 0.2889, 0.3699]}, {"w": "conventional", "b": [0.295, 0.355, 0.3955, 0.3699]}, {"w": "server.", "b": [0.4017, 0.355, 0.4542, 0.3699]}]}, {"id": "b_3", "type": "paragraph", "text": "If we could estimate the importance of features, we would keep only the most important ones. That would allow us to save time, fit more examples in memory, and improve the model’s quality. Below, we consider some feature selection techniques.", "words": [{"w": "If", "b": [0.1312, 0.3819, 0.1433, 0.3969]}, {"w": "we", "b": [0.149, 0.3819, 0.1696, 0.3969]}, {"w": "could", "b": [0.1754, 0.3819, 0.2176, 0.3969]}, {"w": "estimate", "b": [0.2233, 0.3819, 0.2897, 0.3969]}, {"w": "the", "b": [0.2955, 0.3819, 0.3206, 0.3969]}, {"w": "importance", "b": [0.3264, 0.3819, 0.4153, 0.3969]}, {"w": "of", "b": [0.4211, 0.3819, 0.4357, 0.3969]}, {"w": "features,", "b": [0.4414, 0.3819, 0.5084, 0.3969]}, {"w": "we", "b": [0.5142, 0.3819, 0.5348, 0.3969]}, {"w": "would", "b": [0.5405, 0.3819, 0.5873, 0.3969]}, {"w": "keep", "b": [0.593, 0.3819, 0.6282, 0.3969]}, {"w": "only", "b": [0.6339, 0.3819, 0.6676, 0.3969]}, {"w": "the", "b": [0.6733, 0.3819, 0.6984, 0.3969]}, {"w": "most", "b": [0.7042, 0.3819, 0.7425, 0.3969]}, {"w": "important", "b": [0.7482, 0.3819, 0.8276, 0.3969]}, {"w": "ones.", "b": [0.8334, 0.3819, 0.8727, 0.3969]}, {"w": "That", "b": [0.1306, 0.3999, 0.1713, 0.4148]}, {"w": "would", "b": [0.1775, 0.3999, 0.2261, 0.4148]}, {"w": "allow", "b": [0.2323, 0.3999, 0.2747, 0.4148]}, {"w": "us", "b": [0.2808, 0.3999, 0.2987, 0.4148]}, {"w": "to", "b": [0.3049, 0.3999, 0.3216, 0.4148]}, {"w": "save", "b": [0.3278, 0.3999, 0.3619, 0.4148]}, {"w": "time,", "b": [0.3681, 0.3999, 0.4099, 0.4148]}, {"w": "fit", "b": [0.4161, 0.3999, 0.4339, 0.4148]}, {"w": "more", "b": [0.44, 0.3999, 0.4809, 0.4148]}, {"w": "examples", "b": [0.487, 0.3999, 0.5619, 0.4148]}, {"w": "in", "b": [0.5681, 0.3999, 0.5838, 0.4148]}, {"w": "memory,", "b": [0.59, 0.3999, 0.6601, 0.4148]}, {"w": "and", "b": [0.6663, 0.3999, 0.6966, 0.4148]}, {"w": "improve", "b": [0.7028, 0.3999, 0.7682, 0.4148]}, {"w": "the", "b": [0.7744, 0.3999, 0.8005, 0.4148]}, {"w": "model’s", "b": [0.8067, 0.3999, 0.869, 0.4148]}, {"w": "quality.", "b": [0.1312, 0.4178, 0.1907, 0.4328]}, {"w": "Below,", "b": [0.1989, 0.4178, 0.2525, 0.4328]}, {"w": "we", "b": [0.2586, 0.4178, 0.2796, 0.4328]}, {"w": "consider", "b": [0.2858, 0.4178, 0.3516, 0.4328]}, {"w": "some", "b": [0.3577, 0.4178, 0.3978, 0.4328]}, {"w": "feature", "b": [0.404, 0.4178, 0.4599, 0.4328]}, {"w": "selection", "b": [0.4661, 0.4178, 0.5349, 0.4328]}, {"w": "techniques.", "b": [0.5411, 0.4178, 0.6304, 0.4328]}]}, {"id": "b_4", "type": "paragraph", "text": "4.5.1 Cutting the Long Tail", "words": [{"w": "4.5.1", "b": [0.1312, 0.466, 0.1749, 0.4809]}, {"w": "Cutting", "b": [0.1961, 0.466, 0.268, 0.4809]}, {"w": "the", "b": [0.2751, 0.466, 0.3048, 0.4809]}, {"w": "Long", "b": [0.3119, 0.466, 0.3577, 0.4809]}, {"w": "Tail", "b": [0.3647, 0.466, 0.3999, 0.4809]}]}, {"id": "b_5", "type": "paragraph", "text": "Typically, if a feature contains information (e.g., a non-zero value) only for a handful of examples, such a feature could be removed from the feature vector. In bag-of-words, you can build a graph with the distribution of token counts, and then cut offthe so-called long tail, as shown in Figure 15.", "words": [{"w": "Typically,", "b": [0.1306, 0.5022, 0.2111, 0.5172]}, {"w": "if", "b": [0.2187, 0.5022, 0.2297, 0.5172]}, {"w": "a", "b": [0.237, 0.5022, 0.2464, 0.5172]}, {"w": "feature", "b": [0.2537, 0.5022, 0.3108, 0.5172]}, {"w": "contains", "b": [0.3181, 0.5022, 0.3857, 0.5172]}, {"w": "information", "b": [0.393, 0.5022, 0.4887, 0.5172]}, {"w": "(e.g.,", "b": [0.496, 0.5022, 0.5368, 0.5172]}, {"w": "a", "b": [0.5444, 0.5022, 0.5538, 0.5172]}, {"w": "non-zero", "b": [0.5611, 0.5022, 0.6312, 0.5172]}, {"w": "value)", "b": [0.6385, 0.5022, 0.6882, 0.5172]}, {"w": "only", "b": [0.6955, 0.5022, 0.7306, 0.5172]}, {"w": "for", "b": [0.7378, 0.5022, 0.7604, 0.5172]}, {"w": "a", "b": [0.7677, 0.5022, 0.7771, 0.5172]}, {"w": "handful", "b": [0.7844, 0.5022, 0.8466, 0.5172]}, {"w": "of", "b": [0.8539, 0.5022, 0.8691, 0.5172]}, {"w": "examples,", "b": [0.1312, 0.5202, 0.2105, 0.5351]}, {"w": "such", "b": [0.2166, 0.5202, 0.2525, 0.5351]}, {"w": "a", "b": [0.2586, 0.5202, 0.2679, 0.5351]}, {"w": "feature", "b": [0.2741, 0.5202, 0.3305, 0.5351]}, {"w": "could", "b": [0.3367, 0.5202, 0.3801, 0.5351]}, {"w": "be", "b": [0.3863, 0.5202, 0.4054, 0.5351]}, {"w": "removed", "b": [0.4116, 0.5202, 0.4794, 0.5351]}, {"w": "from", "b": [0.4856, 0.5202, 0.5234, 0.5351]}, {"w": "the", "b": [0.5295, 0.5202, 0.5554, 0.5351]}, {"w": "feature", "b": [0.5615, 0.5202, 0.618, 0.5351]}, {"w": "vector.", "b": [0.6241, 0.5202, 0.679, 0.5351]}, {"w": "In", "b": [0.6873, 0.5202, 0.7043, 0.5351]}, {"w": "bag-of-words,", "b": [0.7103, 0.5202, 0.8337, 0.5354]}, {"w": "you", "b": [0.8398, 0.5202, 0.8688, 0.5351]}, {"w": "can", "b": [0.1312, 0.5381, 0.1591, 0.5531]}, {"w": "build", "b": [0.1652, 0.5381, 0.2065, 0.5531]}, {"w": "a", "b": [0.2127, 0.5381, 0.2219, 0.5531]}, {"w": "graph", "b": [0.2281, 0.5381, 0.2746, 0.5531]}, {"w": "with", "b": [0.2807, 0.5381, 0.3168, 0.5531]}, {"w": "the", "b": [0.3229, 0.5381, 0.3487, 0.5531]}, {"w": "distribution", "b": [0.3549, 0.5381, 0.45, 0.5531]}, {"w": "of", "b": [0.4561, 0.5381, 0.4711, 0.5531]}, {"w": "token", "b": [0.4772, 0.5381, 0.5216, 0.5531]}, {"w": "counts,", "b": [0.5277, 0.5381, 0.5851, 0.5531]}, {"w": "and", "b": [0.5912, 0.5381, 0.6212, 0.5531]}, {"w": "then", "b": [0.6273, 0.5381, 0.6634, 0.5531]}, {"w": "cut", "b": [0.6696, 0.5381, 0.6954, 0.5531]}, {"w": "offthe", "b": [0.7015, 0.5381, 0.7535, 0.5531]}, {"w": "so-called", "b": [0.7597, 0.5381, 0.8289, 0.5531]}, {"w": "long", "b": [0.8351, 0.5381, 0.8691, 0.5531]}, {"w": "tail,", "b": [0.1312, 0.5561, 0.163, 0.571]}, {"w": "as", "b": [0.1692, 0.5561, 0.1857, 0.571]}, {"w": "shown", "b": [0.1918, 0.5561, 0.2417, 0.571]}, {"w": "in", "b": [0.2478, 0.5561, 0.2632, 0.571]}, {"w": "Figure", "b": [0.2693, 0.5561, 0.3214, 0.571]}, {"w": "15.", "b": [0.3276, 0.5561, 0.3512, 0.571]}]}, {"id": "b_6", "type": "paragraph", "text": "A long tail of a distribution is such a part of that distribution that contains elements with substantially lower counts compared to a smaller group of elements with the highest counts. This smaller group is called the head of the distribution, and their aggregated counts make for at least half of all the counts.", "words": [{"w": "A", "b": [0.1305, 0.583, 0.1443, 0.5979]}, {"w": "long", "b": [0.1505, 0.5833, 0.1894, 0.5982]}, {"w": "tail", "b": [0.1965, 0.5833, 0.2268, 0.5982]}, {"w": "of", "b": [0.233, 0.583, 0.2478, 0.5979]}, {"w": "a", "b": [0.254, 0.583, 0.2632, 0.5979]}, {"w": "distribution", "b": [0.2693, 0.583, 0.3635, 0.5979]}, {"w": "is", "b": [0.3696, 0.583, 0.382, 0.5979]}, {"w": "such", "b": [0.3882, 0.583, 0.4235, 0.5979]}, {"w": "a", "b": [0.4297, 0.583, 0.4389, 0.5979]}, {"w": "part", "b": [0.445, 0.583, 0.4788, 0.5979]}, {"w": "of", "b": [0.485, 0.583, 0.4998, 0.5979]}, {"w": "that", "b": [0.5059, 0.583, 0.5396, 0.5979]}, {"w": "distribution", "b": [0.5458, 0.583, 0.6399, 0.5979]}, {"w": "that", "b": [0.6461, 0.583, 0.6798, 0.5979]}, {"w": "contains", "b": [0.686, 0.583, 0.752, 0.5979]}, {"w": "elements", "b": [0.7581, 0.583, 0.8272, 0.5979]}, {"w": "with", "b": [0.8333, 0.583, 0.8691, 0.5979]}, {"w": "substantially", "b": [0.1312, 0.6009, 0.2336, 0.6159]}, {"w": "lower", "b": [0.2397, 0.6009, 0.2816, 0.6159]}, {"w": "counts", "b": [0.2878, 0.6009, 0.3394, 0.6159]}, {"w": "compared", "b": [0.3456, 0.6009, 0.4233, 0.6159]}, {"w": "to", "b": [0.4294, 0.6009, 0.4457, 0.6159]}, {"w": "a", "b": [0.4518, 0.6009, 0.461, 0.6159]}, {"w": "smaller", "b": [0.4672, 0.6009, 0.5245, 0.6159]}, {"w": "group", "b": [0.5306, 0.6009, 0.5767, 0.6159]}, {"w": "of", "b": [0.5828, 0.6009, 0.5976, 0.6159]}, {"w": "elements", "b": [0.6037, 0.6009, 0.6728, 0.6159]}, {"w": "with", "b": [0.6789, 0.6009, 0.7147, 0.6159]}, {"w": "the", "b": [0.7208, 0.6009, 0.7463, 0.6159]}, {"w": "highest", "b": [0.7525, 0.6009, 0.8098, 0.6159]}, {"w": "counts.", "b": [0.8159, 0.6009, 0.8727, 0.6159]}, {"w": "This", "b": [0.1306, 0.6189, 0.1666, 0.6338]}, {"w": "smaller", "b": [0.1728, 0.6189, 0.2305, 0.6338]}, {"w": "group", "b": [0.2367, 0.6189, 0.2829, 0.6338]}, {"w": "is", "b": [0.2891, 0.6189, 0.3015, 0.6338]}, {"w": "called", "b": [0.3077, 0.6189, 0.354, 0.6338]}, {"w": "the", "b": [0.3601, 0.6189, 0.3858, 0.6338]}, {"w": "head", "b": [0.392, 0.6189, 0.43, 0.6338]}, {"w": "of", "b": [0.4362, 0.6189, 0.4511, 0.6338]}, {"w": "the", "b": [0.4572, 0.6189, 0.4829, 0.6338]}, {"w": "distribution,", "b": [0.4891, 0.6189, 0.5889, 0.6338]}, {"w": "and", "b": [0.5951, 0.6189, 0.6249, 0.6338]}, {"w": "their", "b": [0.6311, 0.6189, 0.6691, 0.6338]}, {"w": "aggregated", "b": [0.6753, 0.6189, 0.7627, 0.6338]}, {"w": "counts", "b": [0.7688, 0.6189, 0.8208, 0.6338]}, {"w": "make", "b": [0.827, 0.6189, 0.8691, 0.6338]}, {"w": "for", "b": [0.1312, 0.6368, 0.1533, 0.6518]}, {"w": "at", "b": [0.1595, 0.6368, 0.1759, 0.6518]}, {"w": "least", "b": [0.182, 0.6368, 0.2191, 0.6518]}, {"w": "half", "b": [0.2252, 0.6368, 0.2555, 0.6518]}, {"w": "of", "b": [0.2616, 0.6368, 0.2765, 0.6518]}, {"w": "all", "b": [0.2826, 0.6368, 0.3021, 0.6518]}, {"w": "the", "b": [0.3083, 0.6368, 0.3339, 0.6518]}, {"w": "counts.", "b": [0.3401, 0.6368, 0.3971, 0.6518]}]}, {"id": "b_7", "type": "paragraph", "text": "The decision on a threshold for defining the long tail is somewhat subjective. You can set it as a hyperparameter for your problem and discover the optimal value experimentally. On the other hand, the decision can be made by looking at the distribution of counts, as shown in Figure 15a. As you can see, I cut offthe long tail at a point where the distribution of the elements in the tail has become visually flat (Figure 15b).", "words": [{"w": "The", "b": [0.1306, 0.6637, 0.1621, 0.6787]}, {"w": "decision", "b": [0.1683, 0.6637, 0.2315, 0.6787]}, {"w": "on", "b": [0.2377, 0.6637, 0.257, 0.6787]}, {"w": "a", "b": [0.2632, 0.6637, 0.2723, 0.6787]}, {"w": "threshold", "b": [0.2785, 0.6637, 0.353, 0.6787]}, {"w": "for", "b": [0.3591, 0.6637, 0.3811, 0.6787]}, {"w": "defining", "b": [0.3872, 0.6637, 0.4503, 0.6787]}, {"w": "the", "b": [0.4565, 0.6637, 0.4819, 0.6787]}, {"w": "long", "b": [0.4881, 0.6637, 0.5217, 0.6787]}, {"w": "tail", "b": [0.5278, 0.6637, 0.5543, 0.6787]}, {"w": "is", "b": [0.5605, 0.6637, 0.5728, 0.6787]}, {"w": "somewhat", "b": [0.5789, 0.6637, 0.6584, 0.6787]}, {"w": "subjective.", "b": [0.6646, 0.6637, 0.7492, 0.6787]}, {"w": "You", "b": [0.7574, 0.6637, 0.789, 0.6787]}, {"w": "can", "b": [0.7951, 0.6637, 0.8226, 0.6787]}, {"w": "set", "b": [0.8287, 0.6637, 0.8513, 0.6787]}, {"w": "it", "b": [0.8574, 0.6637, 0.8696, 0.6787]}, {"w": "as", "b": [0.1312, 0.6817, 0.1474, 0.6966]}, {"w": "a", "b": [0.1533, 0.6817, 0.1623, 0.6966]}, {"w": "hyperparameter", "b": [0.1682, 0.6817, 0.2935, 0.6966]}, {"w": "for", "b": [0.2993, 0.6817, 0.321, 0.6966]}, {"w": "your", "b": [0.3269, 0.6817, 0.3621, 0.6966]}, {"w": "problem", "b": [0.368, 0.6817, 0.4323, 0.6966]}, {"w": "and", "b": [0.4382, 0.6817, 0.4673, 0.6966]}, {"w": "discover", "b": [0.4732, 0.6817, 0.5362, 0.6966]}, {"w": "the", "b": [0.5421, 0.6817, 0.5672, 0.6966]}, {"w": "optimal", "b": [0.573, 0.6817, 0.6333, 0.6966]}, {"w": "value", "b": [0.6392, 0.6817, 0.6799, 0.6966]}, {"w": "experimentally.", "b": [0.6858, 0.6817, 0.8059, 0.6966]}, {"w": "On", "b": [0.814, 0.6817, 0.8381, 0.6966]}, {"w": "the", "b": [0.844, 0.6817, 0.8691, 0.6966]}, {"w": "other", "b": [0.1312, 0.6996, 0.1737, 0.7146]}, {"w": "hand,", "b": [0.1798, 0.6996, 0.2253, 0.7146]}, {"w": "the", "b": [0.2315, 0.6996, 0.2573, 0.7146]}, {"w": "decision", "b": [0.2635, 0.6996, 0.3277, 0.7146]}, {"w": "can", "b": [0.3338, 0.6996, 0.3617, 0.7146]}, {"w": "be", "b": [0.3679, 0.6996, 0.387, 0.7146]}, {"w": "made", "b": [0.3932, 0.6996, 0.4366, 0.7146]}, {"w": "by", "b": [0.4427, 0.6996, 0.4624, 0.7146]}, {"w": "looking", "b": [0.4685, 0.6996, 0.5274, 0.7146]}, {"w": "at", "b": [0.5336, 0.6996, 0.5501, 0.7146]}, {"w": "the", "b": [0.5562, 0.6996, 0.5821, 0.7146]}, {"w": "distribution", "b": [0.5883, 0.6996, 0.6835, 0.7146]}, {"w": "of", "b": [0.6897, 0.6996, 0.7046, 0.7146]}, {"w": "counts,", "b": [0.7108, 0.6996, 0.7683, 0.7146]}, {"w": "as", "b": [0.7744, 0.6996, 0.7911, 0.7146]}, {"w": "shown", "b": [0.7972, 0.6996, 0.8475, 0.7146]}, {"w": "in", "b": [0.8536, 0.6996, 0.8691, 0.7146]}, {"w": "Figure", "b": [0.1312, 0.7176, 0.1844, 0.7325]}, {"w": "15a.", "b": [0.1906, 0.7176, 0.2241, 0.7325]}, {"w": "As", "b": [0.2325, 0.7176, 0.254, 0.7325]}, {"w": "you", "b": [0.2603, 0.7176, 0.2896, 0.7325]}, {"w": "can", "b": [0.2958, 0.7176, 0.324, 0.7325]}, {"w": "see,", "b": [0.3302, 0.7176, 0.3596, 0.7325]}, {"w": "I", "b": [0.3659, 0.7176, 0.3727, 0.7325]}, {"w": "cut", "b": [0.3789, 0.7176, 0.4051, 0.7325]}, {"w": "offthe", "b": [0.4113, 0.7176, 0.4641, 0.7325]}, {"w": "long", "b": [0.4703, 0.7176, 0.5048, 0.7325]}, {"w": "tail", "b": [0.511, 0.7176, 0.5382, 0.7325]}, {"w": "at", "b": [0.5444, 0.7176, 0.5612, 0.7325]}, {"w": "a", "b": [0.5674, 0.7176, 0.5768, 0.7325]}, {"w": "point", "b": [0.583, 0.7176, 0.6259, 0.7325]}, {"w": "where", "b": [0.6321, 0.7176, 0.6803, 0.7325]}, {"w": "the", "b": [0.6865, 0.7176, 0.7127, 0.7325]}, {"w": "distribution", "b": [0.7189, 0.7176, 0.8153, 0.7325]}, {"w": "of", "b": [0.8215, 0.7176, 0.8367, 0.7325]}, {"w": "the", "b": [0.8429, 0.7176, 0.8691, 0.7325]}, {"w": "elements", "b": [0.1312, 0.7355, 0.2006, 0.7505]}, {"w": "in", "b": [0.2067, 0.7355, 0.2221, 0.7505]}, {"w": "the", "b": [0.2283, 0.7355, 0.2539, 0.7505]}, {"w": "tail", "b": [0.26, 0.7355, 0.2867, 0.7505]}, {"w": "has", "b": [0.2928, 0.7355, 0.3196, 0.7505]}, {"w": "become", "b": [0.3258, 0.7355, 0.3858, 0.7505]}, {"w": "visually", "b": [0.3919, 0.7355, 0.4535, 0.7505]}, {"w": "flat", "b": [0.4597, 0.7355, 0.4863, 0.7505]}, {"w": "(Figure", "b": [0.4925, 0.7355, 0.5518, 0.7505]}, {"w": "15b).", "b": [0.5579, 0.7355, 0.5989, 0.7505]}]}, {"id": "b_8", "type": "paragraph", "text": "Whether to cut the long tail, and where to do it, is debatable. In classification problems with", "words": [{"w": "Whether", "b": [0.1303, 0.7625, 0.1992, 0.7774]}, {"w": "to", "b": [0.205, 0.7625, 0.2211, 0.7774]}, {"w": "cut", "b": [0.2268, 0.7625, 0.252, 0.7774]}, {"w": "the", "b": [0.2578, 0.7625, 0.2829, 0.7774]}, {"w": "long", "b": [0.2887, 0.7625, 0.3218, 0.7774]}, {"w": "tail,", "b": [0.3276, 0.7625, 0.3588, 0.7774]}, {"w": "and", "b": [0.3646, 0.7625, 0.3938, 0.7774]}, {"w": "where", "b": [0.3996, 0.7625, 0.4459, 0.7774]}, {"w": "to", "b": [0.4517, 0.7625, 0.4677, 0.7774]}, {"w": "do", "b": [0.4735, 0.7625, 0.4926, 0.7774]}, {"w": "it,", "b": [0.4984, 0.7625, 0.5155, 0.7774]}, {"w": "is", "b": [0.5213, 0.7625, 0.5335, 0.7774]}, {"w": "debatable.", "b": [0.5393, 0.7625, 0.6207, 0.7774]}, {"w": "In", "b": [0.6288, 0.7625, 0.6454, 0.7774]}, {"w": "classification", "b": [0.6511, 0.7625, 0.7509, 0.7774]}, {"w": "problems", "b": [0.7566, 0.7625, 0.8282, 0.7774]}, {"w": "with", "b": [0.8339, 0.7625, 0.8691, 0.7774]}]}, {"id": "b_9", "type": "paragraph", "text": "many classes, the difference between some classes can be very subtle. Even features whose values are rarely non-zero may become important. However, removing long-tail features often results in faster learning and a better model.", "words": [{"w": "many", "b": [0.1312, 0.7804, 0.1759, 0.7954]}, {"w": "classes,", "b": [0.182, 0.7804, 0.2405, 0.7954]}, {"w": "the", "b": [0.2466, 0.7804, 0.2726, 0.7954]}, {"w": "difference", "b": [0.2787, 0.7804, 0.3561, 0.7954]}, {"w": "between", "b": [0.3622, 0.7804, 0.4282, 0.7954]}, {"w": "some", "b": [0.4343, 0.7804, 0.4749, 0.7954]}, {"w": "classes", "b": [0.481, 0.7804, 0.5343, 0.7954]}, {"w": "can", "b": [0.5405, 0.7804, 0.5685, 0.7954]}, {"w": "be", "b": [0.5746, 0.7804, 0.5938, 0.7954]}, {"w": "very", "b": [0.6, 0.7804, 0.6348, 0.7954]}, {"w": "subtle.", "b": [0.641, 0.7804, 0.6951, 0.7954]}, {"w": "Even", "b": [0.7033, 0.7804, 0.744, 0.7954]}, {"w": "features", "b": [0.7502, 0.7804, 0.8142, 0.7954]}, {"w": "whose", "b": [0.8203, 0.7804, 0.8692, 0.7954]}, {"w": "values", "b": [0.1308, 0.7983, 0.1786, 0.8133]}, {"w": "are", "b": [0.1843, 0.7983, 0.2085, 0.8133]}, {"w": "rarely", "b": [0.2142, 0.7983, 0.26, 0.8133]}, {"w": "non-zero", "b": [0.2658, 0.7983, 0.3332, 0.8133]}, {"w": "may", "b": [0.3389, 0.7983, 0.372, 0.8133]}, {"w": "become", "b": [0.3778, 0.7983, 0.4366, 0.8133]}, {"w": "important.", "b": [0.4423, 0.7983, 0.5267, 0.8133]}, {"w": "However,", "b": [0.5348, 0.7983, 0.6067, 0.8133]}, {"w": "removing", "b": [0.6125, 0.7983, 0.6849, 0.8133]}, {"w": "long-tail", "b": [0.6906, 0.7983, 0.7559, 0.8133]}, {"w": "features", "b": [0.7616, 0.7983, 0.8236, 0.8133]}, {"w": "often", "b": [0.8294, 0.7983, 0.8691, 0.8133]}, {"w": "results", "b": [0.1312, 0.8163, 0.1838, 0.8313]}, {"w": "in", "b": [0.19, 0.8163, 0.2053, 0.8313]}, {"w": "faster", "b": [0.2115, 0.8163, 0.2563, 0.8313]}, {"w": "learning", "b": [0.2624, 0.8163, 0.3271, 0.8313]}, {"w": "and", "b": [0.3332, 0.8163, 0.363, 0.8313]}, {"w": "a", "b": [0.3691, 0.8163, 0.3783, 0.8313]}, {"w": "better", "b": [0.3845, 0.8163, 0.4333, 0.8313]}, {"w": "model.", "b": [0.4394, 0.8163, 0.4932, 0.8313]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 23", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "23", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 113, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "(a) distribution of word counts in English (b) the long tail", "words": [{"w": "(a)", "b": [0.1156, 0.3415, 0.1392, 0.3565]}, {"w": "distribution", "b": [0.1454, 0.3415, 0.2399, 0.3565]}, {"w": "of", "b": [0.246, 0.3415, 0.2609, 0.3565]}, {"w": "word", "b": [0.267, 0.3415, 0.3066, 0.3565]}, {"w": "counts", "b": [0.3127, 0.3415, 0.3646, 0.3565]}, {"w": "in", "b": [0.3708, 0.3415, 0.3861, 0.3565]}, {"w": "English", "b": [0.3923, 0.3415, 0.4521, 0.3565]}, {"w": "(b)", "b": [0.6495, 0.3415, 0.6741, 0.3565]}, {"w": "the", "b": [0.6802, 0.3415, 0.7059, 0.3565]}, {"w": "long", "b": [0.712, 0.3415, 0.7458, 0.3565]}, {"w": "tail", "b": [0.752, 0.3415, 0.7787, 0.3565]}]}, {"id": "b_1", "type": "paragraph", "text": "Figure 15: The distribution of word counts in a collection of texts in English (a) and the long tail (b, zone in blue). The highest count corresponds to “the” (a count of 615); the lowest count corresponds to “zambia” (a count of 1).", "words": [{"w": "Figure", "b": [0.1312, 0.3728, 0.1823, 0.3877]}, {"w": "15:", "b": [0.188, 0.3728, 0.2111, 0.3877]}, {"w": "The", "b": [0.2191, 0.3728, 0.2503, 0.3877]}, {"w": "distribution", "b": [0.256, 0.3728, 0.3486, 0.3877]}, {"w": "of", "b": [0.3543, 0.3728, 0.3689, 0.3877]}, {"w": "word", "b": [0.3746, 0.3728, 0.4134, 0.3877]}, {"w": "counts", "b": [0.4191, 0.3728, 0.4699, 0.3877]}, {"w": "in", "b": [0.4757, 0.3728, 0.4908, 0.3877]}, {"w": "a", "b": [0.4965, 0.3728, 0.5055, 0.3877]}, {"w": "collection", "b": [0.5113, 0.3728, 0.5856, 0.3877]}, {"w": "of", "b": [0.5914, 0.3728, 0.6059, 0.3877]}, {"w": "texts", "b": [0.6117, 0.3728, 0.6505, 0.3877]}, {"w": "in", "b": [0.6562, 0.3728, 0.6713, 0.3877]}, {"w": "English", "b": [0.677, 0.3728, 0.7357, 0.3877]}, {"w": "(a)", "b": [0.7414, 0.3728, 0.7645, 0.3877]}, {"w": "and", "b": [0.7702, 0.3728, 0.7994, 0.3877]}, {"w": "the", "b": [0.8051, 0.3728, 0.8302, 0.3877]}, {"w": "long", "b": [0.8359, 0.3728, 0.8691, 0.3877]}, {"w": "tail", "b": [0.1312, 0.3907, 0.1584, 0.4057]}, {"w": "(b,", "b": [0.1645, 0.3907, 0.1875, 0.4057]}, {"w": "zone", "b": [0.1937, 0.3907, 0.2303, 0.4057]}, {"w": "in", "b": [0.2364, 0.3907, 0.2521, 0.4057]}, {"w": "blue).", "b": [0.2582, 0.3907, 0.3053, 0.4057]}, {"w": "The", "b": [0.3135, 0.3907, 0.3459, 0.4057]}, {"w": "highest", "b": [0.352, 0.3907, 0.4106, 0.4057]}, {"w": "count", "b": [0.4168, 0.3907, 0.4622, 0.4057]}, {"w": "corresponds", "b": [0.4684, 0.3907, 0.5654, 0.4057]}, {"w": "to", "b": [0.5715, 0.3907, 0.5882, 0.4057]}, {"w": "“the”", "b": [0.5944, 0.3907, 0.6383, 0.4057]}, {"w": "(a", "b": [0.6444, 0.3907, 0.6611, 0.4057]}, {"w": "count", "b": [0.6673, 0.3907, 0.7127, 0.4057]}, {"w": "of", "b": [0.7189, 0.3907, 0.734, 0.4057]}, {"w": "615);", "b": [0.7399, 0.3907, 0.7806, 0.4057]}, {"w": "the", "b": [0.7868, 0.3907, 0.8129, 0.4057]}, {"w": "lowest", "b": [0.819, 0.3907, 0.8693, 0.4057]}, {"w": "count", "b": [0.1312, 0.4087, 0.1758, 0.4236]}, {"w": "corresponds", "b": [0.182, 0.4087, 0.2772, 0.4236]}, {"w": "to", "b": [0.2833, 0.4087, 0.2997, 0.4236]}, {"w": "“zambia”", "b": [0.3059, 0.4087, 0.3802, 0.4236]}, {"w": "(a", "b": [0.3863, 0.4087, 0.4028, 0.4236]}, {"w": "count", "b": [0.4089, 0.4087, 0.4535, 0.4236]}, {"w": "of", "b": [0.4597, 0.4087, 0.4745, 0.4236]}, {"w": "1).", "b": [0.4805, 0.4087, 0.5021, 0.4236]}]}, {"id": "b_2", "type": "paragraph", "text": "4.5.2 Boruta", "words": [{"w": "4.5.2", "b": [0.1312, 0.4592, 0.1749, 0.4742]}, {"w": "Boruta", "b": [0.1961, 0.4592, 0.2609, 0.4742]}]}, {"id": "b_3", "type": "paragraph", "text": "Cutting the long tail is not the only way to select important features and remove less important ones. One popular tool used in Kaggle competitions is Boruta. Boruta iteratively trains random forest models and runs statistical tests to identify features as important and unimportant. The tool exists both in the form of an R package and a Python module.", "words": [{"w": "Cutting", "b": [0.1312, 0.4955, 0.1925, 0.5105]}, {"w": "the", "b": [0.197, 0.4955, 0.2222, 0.5105]}, {"w": "long", "b": [0.2267, 0.4955, 0.2599, 0.5105]}, {"w": "tail", "b": [0.2644, 0.4955, 0.2905, 0.5105]}, {"w": "is", "b": [0.295, 0.4955, 0.3072, 0.5105]}, {"w": "not", "b": [0.3117, 0.4955, 0.3379, 0.5105]}, {"w": "the", "b": [0.3424, 0.4955, 0.3675, 0.5105]}, {"w": "only", "b": [0.372, 0.4955, 0.4057, 0.5105]}, {"w": "way", "b": [0.4102, 0.4955, 0.4408, 0.5105]}, {"w": "to", "b": [0.4454, 0.4955, 0.4615, 0.5105]}, {"w": "select", "b": [0.466, 0.4955, 0.5093, 0.5105]}, {"w": "important", "b": [0.5138, 0.4955, 0.5933, 0.5105]}, {"w": "features", "b": [0.5978, 0.4955, 0.6598, 0.5105]}, {"w": "and", "b": [0.6643, 0.4955, 0.6934, 0.5105]}, {"w": "remove", "b": [0.6979, 0.4955, 0.7538, 0.5105]}, {"w": "less", "b": [0.7583, 0.4955, 0.7856, 0.5105]}, {"w": "important", "b": [0.7902, 0.4955, 0.8696, 0.5105]}, {"w": "ones.", "b": [0.1312, 0.5134, 0.172, 0.5284]}, {"w": "One", "b": [0.1802, 0.5134, 0.2135, 0.5284]}, {"w": "popular", "b": [0.2197, 0.5134, 0.2828, 0.5284]}, {"w": "tool", "b": [0.2889, 0.5134, 0.3207, 0.5284]}, {"w": "used", "b": [0.3268, 0.5134, 0.3634, 0.5284]}, {"w": "in", "b": [0.3696, 0.5134, 0.3852, 0.5284]}, {"w": "Kaggle", "b": [0.3913, 0.5137, 0.4551, 0.5287]}, {"w": "competitions", "b": [0.4613, 0.5134, 0.5661, 0.5284]}, {"w": "is", "b": [0.5722, 0.5134, 0.5848, 0.5284]}, {"w": "Boruta.", "b": [0.5909, 0.5134, 0.6613, 0.5287]}, {"w": "Boruta", "b": [0.6695, 0.5134, 0.7266, 0.5284]}, {"w": "iteratively", "b": [0.7328, 0.5134, 0.8157, 0.5284]}, {"w": "trains", "b": [0.8218, 0.5134, 0.8688, 0.5284]}, {"w": "random", "b": [0.1312, 0.5317, 0.2022, 0.5467]}, {"w": "forest", "b": [0.2102, 0.5317, 0.2624, 0.5467]}, {"w": "models", "b": [0.2693, 0.5314, 0.3264, 0.5463]}, {"w": "and", "b": [0.3334, 0.5314, 0.3638, 0.5463]}, {"w": "runs", "b": [0.3708, 0.5314, 0.4065, 0.5463]}, {"w": "statistical", "b": [0.4134, 0.5317, 0.5027, 0.5467]}, {"w": "tests", "b": [0.5107, 0.5317, 0.5537, 0.5467]}, {"w": "to", "b": [0.5606, 0.5314, 0.5774, 0.5463]}, {"w": "identify", "b": [0.5843, 0.5314, 0.6466, 0.5463]}, {"w": "features", "b": [0.6536, 0.5314, 0.7181, 0.5463]}, {"w": "as", "b": [0.7251, 0.5314, 0.7419, 0.5463]}, {"w": "important", "b": [0.7489, 0.5314, 0.8316, 0.5463]}, {"w": "and", "b": [0.8386, 0.5314, 0.8689, 0.5463]}, {"w": "unimportant.", "b": [0.1312, 0.5493, 0.2379, 0.5643]}, {"w": "The", "b": [0.2461, 0.5493, 0.2779, 0.5643]}, {"w": "tool", "b": [0.284, 0.5493, 0.3153, 0.5643]}, {"w": "exists", "b": [0.3215, 0.5493, 0.3663, 0.5643]}, {"w": "both", "b": [0.3725, 0.5493, 0.4099, 0.5643]}, {"w": "in", "b": [0.416, 0.5493, 0.4314, 0.5643]}, {"w": "the", "b": [0.4376, 0.5493, 0.4632, 0.5643]}, {"w": "form", "b": [0.4694, 0.5493, 0.5068, 0.5643]}, {"w": "of", "b": [0.513, 0.5493, 0.5278, 0.5643]}, {"w": "an", "b": [0.534, 0.5493, 0.5535, 0.5643]}, {"w": "R", "b": [0.5596, 0.5493, 0.5732, 0.5643]}, {"w": "package", "b": [0.5793, 0.5493, 0.6429, 0.5643]}, {"w": "and", "b": [0.6491, 0.5493, 0.6788, 0.5643]}, {"w": "a", "b": [0.685, 0.5493, 0.6942, 0.5643]}, {"w": "Python", "b": [0.7003, 0.5493, 0.7596, 0.5643]}, {"w": "module.", "b": [0.7657, 0.5493, 0.8298, 0.5643]}]}, {"id": "b_4", "type": "paragraph", "text": "Boruta works as a wrapper around the random forest learning algorithm, hence its name — Boruta is a spirit of the forests in Slavic mythology. To understand the Boruta algorithm, let’s first recall how the random forest learning algorithm works.", "words": [{"w": "Boruta", "b": [0.1312, 0.5763, 0.1873, 0.5912]}, {"w": "works", "b": [0.1934, 0.5763, 0.2396, 0.5912]}, {"w": "as", "b": [0.2458, 0.5763, 0.2623, 0.5912]}, {"w": "a", "b": [0.2684, 0.5763, 0.2776, 0.5912]}, {"w": "wrapper", "b": [0.2837, 0.5763, 0.3498, 0.5912]}, {"w": "around", "b": [0.356, 0.5763, 0.4123, 0.5912]}, {"w": "the", "b": [0.4185, 0.5763, 0.4441, 0.5912]}, {"w": "random", "b": [0.4502, 0.5763, 0.5116, 0.5912]}, {"w": "forest", "b": [0.5178, 0.5763, 0.5625, 0.5912]}, {"w": "learning", "b": [0.5686, 0.5763, 0.6331, 0.5912]}, {"w": "algorithm,", "b": [0.6393, 0.5763, 0.7222, 0.5912]}, {"w": "hence", "b": [0.7283, 0.5763, 0.7734, 0.5912]}, {"w": "its", "b": [0.7795, 0.5763, 0.7991, 0.5912]}, {"w": "name", "b": [0.8052, 0.5763, 0.8482, 0.5912]}, {"w": "—", "b": [0.8543, 0.5763, 0.8727, 0.5912]}, {"w": "Boruta", "b": [0.1312, 0.5942, 0.1885, 0.6092]}, {"w": "is", "b": [0.1947, 0.5942, 0.2073, 0.6092]}, {"w": "a", "b": [0.2135, 0.5942, 0.2229, 0.6092]}, {"w": "spirit", "b": [0.229, 0.5942, 0.2721, 0.6092]}, {"w": "of", "b": [0.2782, 0.5942, 0.2933, 0.6092]}, {"w": "the", "b": [0.2995, 0.5942, 0.3256, 0.6092]}, {"w": "forests", "b": [0.3317, 0.5942, 0.3848, 0.6092]}, {"w": "in", "b": [0.391, 0.5942, 0.4067, 0.6092]}, {"w": "Slavic", "b": [0.4128, 0.5942, 0.4609, 0.6092]}, {"w": "mythology.", "b": [0.4671, 0.5942, 0.557, 0.6092]}, {"w": "To", "b": [0.5652, 0.5942, 0.5867, 0.6092]}, {"w": "understand", "b": [0.5928, 0.5942, 0.685, 0.6092]}, {"w": "the", "b": [0.6912, 0.5942, 0.7173, 0.6092]}, {"w": "Boruta", "b": [0.7234, 0.5942, 0.7807, 0.6092]}, {"w": "algorithm,", "b": [0.7869, 0.5942, 0.8716, 0.6092]}, {"w": "let’s", "b": [0.1312, 0.6122, 0.1642, 0.6271]}, {"w": "first", "b": [0.1703, 0.6122, 0.2023, 0.6271]}, {"w": "recall", "b": [0.2084, 0.6122, 0.2515, 0.6271]}, {"w": "how", "b": [0.2577, 0.6122, 0.29, 0.6271]}, {"w": "the", "b": [0.2961, 0.6122, 0.3218, 0.6271]}, {"w": "random", "b": [0.3279, 0.6122, 0.3895, 0.6271]}, {"w": "forest", "b": [0.3956, 0.6122, 0.4404, 0.6271]}, {"w": "learning", "b": [0.4466, 0.6122, 0.5112, 0.6271]}, {"w": "algorithm", "b": [0.5174, 0.6122, 0.5953, 0.6271]}, {"w": "works.", "b": [0.6015, 0.6122, 0.6529, 0.6271]}]}, {"id": "b_5", "type": "paragraph", "text": "Random forest is based on the idea of bagging. It makes many random samples of the training set and then trains a different statistical model on each sample. The prediction is then made by taking the majority vote (for classification) or an average (for regression) of all models. The only substantial difference of random forest from the vanilla bagging algorithm is that in the former, the trained statistical models are decision trees. At each split of the decision tree, a random subset of all features is considered.", "words": [{"w": "Random", "b": [0.1312, 0.6391, 0.2005, 0.654]}, {"w": "forest", "b": [0.2078, 0.6391, 0.2534, 0.654]}, {"w": "is", "b": [0.2607, 0.6391, 0.2734, 0.654]}, {"w": "based", "b": [0.2807, 0.6391, 0.3268, 0.654]}, {"w": "on", "b": [0.3341, 0.6391, 0.3539, 0.654]}, {"w": "the", "b": [0.3612, 0.6391, 0.3873, 0.654]}, {"w": "idea", "b": [0.3946, 0.6391, 0.4281, 0.654]}, {"w": "of", "b": [0.4354, 0.6391, 0.4505, 0.654]}, {"w": "bagging.", "b": [0.4591, 0.6391, 0.5362, 0.6543]}, {"w": "It", "b": [0.5477, 0.6391, 0.5618, 0.654]}, {"w": "makes", "b": [0.5691, 0.6391, 0.6194, 0.654]}, {"w": "many", "b": [0.6267, 0.6391, 0.6716, 0.654]}, {"w": "random", "b": [0.6789, 0.6391, 0.7417, 0.654]}, {"w": "samples", "b": [0.749, 0.6391, 0.813, 0.654]}, {"w": "of", "b": [0.8203, 0.6391, 0.8354, 0.654]}, {"w": "the", "b": [0.8427, 0.6391, 0.8689, 0.654]}, {"w": "training", "b": [0.1312, 0.657, 0.1956, 0.672]}, {"w": "set", "b": [0.2018, 0.657, 0.2247, 0.672]}, {"w": "and", "b": [0.2309, 0.657, 0.261, 0.672]}, {"w": "then", "b": [0.2672, 0.657, 0.3035, 0.672]}, {"w": "trains", "b": [0.3097, 0.657, 0.3565, 0.672]}, {"w": "a", "b": [0.3627, 0.657, 0.372, 0.672]}, {"w": "different", "b": [0.3782, 0.657, 0.4457, 0.672]}, {"w": "statistical", "b": [0.4519, 0.657, 0.531, 0.672]}, {"w": "model", "b": [0.5371, 0.657, 0.5864, 0.672]}, {"w": "on", "b": [0.5926, 0.657, 0.6123, 0.672]}, {"w": "each", "b": [0.6184, 0.657, 0.6543, 0.672]}, {"w": "sample.", "b": [0.6604, 0.657, 0.7218, 0.672]}, {"w": "The", "b": [0.73, 0.657, 0.7622, 0.672]}, {"w": "prediction", "b": [0.7684, 0.657, 0.8504, 0.672]}, {"w": "is", "b": [0.8566, 0.657, 0.8691, 0.672]}, {"w": "then", "b": [0.1312, 0.675, 0.1664, 0.6899]}, {"w": "made", "b": [0.1724, 0.675, 0.2146, 0.6899]}, {"w": "by", "b": [0.2205, 0.675, 0.2396, 0.6899]}, {"w": "taking", "b": [0.2456, 0.675, 0.2953, 0.6899]}, {"w": "the", "b": [0.3013, 0.675, 0.3264, 0.6899]}, {"w": "majority", "b": [0.3324, 0.675, 0.3997, 0.6899]}, {"w": "vote", "b": [0.4057, 0.675, 0.4389, 0.6899]}, {"w": "(for", "b": [0.4448, 0.675, 0.4735, 0.6899]}, {"w": "classification)", "b": [0.4795, 0.675, 0.5862, 0.6899]}, {"w": "or", "b": [0.5922, 0.675, 0.6083, 0.6899]}, {"w": "an", "b": [0.6143, 0.675, 0.6334, 0.6899]}, {"w": "average", "b": [0.6393, 0.675, 0.6981, 0.6899]}, {"w": "(for", "b": [0.7041, 0.675, 0.7328, 0.6899]}, {"w": "regression)", "b": [0.7388, 0.675, 0.8235, 0.6899]}, {"w": "of", "b": [0.8295, 0.675, 0.844, 0.6899]}, {"w": "all", "b": [0.85, 0.675, 0.8691, 0.6899]}, {"w": "models.", "b": [0.1312, 0.6929, 0.1917, 0.7079]}, {"w": "The", "b": [0.1999, 0.6929, 0.2314, 0.7079]}, {"w": "only", "b": [0.2375, 0.6929, 0.2715, 0.7079]}, {"w": "substantial", "b": [0.2776, 0.6929, 0.3645, 0.7079]}, {"w": "difference", "b": [0.3707, 0.6929, 0.4463, 0.7079]}, {"w": "of", "b": [0.4525, 0.6929, 0.4672, 0.7079]}, {"w": "random", "b": [0.4734, 0.6929, 0.5342, 0.7079]}, {"w": "forest", "b": [0.5404, 0.6929, 0.5847, 0.7079]}, {"w": "from", "b": [0.5908, 0.6929, 0.6279, 0.7079]}, {"w": "the", "b": [0.634, 0.6929, 0.6594, 0.7079]}, {"w": "vanilla", "b": [0.6656, 0.6929, 0.7178, 0.7079]}, {"w": "bagging", "b": [0.7239, 0.6929, 0.7858, 0.7079]}, {"w": "algorithm", "b": [0.792, 0.6929, 0.8691, 0.7079]}, {"w": "is", "b": [0.1312, 0.7109, 0.1439, 0.7258]}, {"w": "that", "b": [0.15, 0.7109, 0.1845, 0.7258]}, {"w": "in", "b": [0.1907, 0.7109, 0.2063, 0.7258]}, {"w": "the", "b": [0.2125, 0.7109, 0.2386, 0.7258]}, {"w": "former,", "b": [0.2448, 0.7109, 0.3039, 0.7258]}, {"w": "the", "b": [0.3101, 0.7109, 0.3362, 0.7258]}, {"w": "trained", "b": [0.3424, 0.7109, 0.4009, 0.7258]}, {"w": "statistical", "b": [0.4071, 0.7109, 0.4867, 0.7258]}, {"w": "models", "b": [0.4928, 0.7109, 0.5499, 0.7258]}, {"w": "are", "b": [0.5561, 0.7109, 0.5812, 0.7258]}, {"w": "decision", "b": [0.5873, 0.7109, 0.6523, 0.7258]}, {"w": "trees.", "b": [0.6584, 0.7109, 0.7025, 0.7258]}, {"w": "At", "b": [0.7107, 0.7109, 0.7316, 0.7258]}, {"w": "each", "b": [0.7377, 0.7109, 0.7738, 0.7258]}, {"w": "split", "b": [0.7799, 0.7109, 0.8156, 0.7258]}, {"w": "of", "b": [0.8217, 0.7109, 0.8369, 0.7258]}, {"w": "the", "b": [0.843, 0.7109, 0.8692, 0.7258]}, {"w": "decision", "b": [0.1312, 0.7288, 0.1949, 0.7438]}, {"w": "tree,", "b": [0.2011, 0.7288, 0.237, 0.7438]}, {"w": "a", "b": [0.2432, 0.7288, 0.2524, 0.7438]}, {"w": "random", "b": [0.2586, 0.7288, 0.3201, 0.7438]}, {"w": "subset", "b": [0.3263, 0.7288, 0.3768, 0.7438]}, {"w": "of", "b": [0.3829, 0.7288, 0.3978, 0.7438]}, {"w": "all", "b": [0.4039, 0.7288, 0.4234, 0.7438]}, {"w": "features", "b": [0.4295, 0.7288, 0.4928, 0.7438]}, {"w": "is", "b": [0.4989, 0.7288, 0.5114, 0.7438]}, {"w": "considered.", "b": [0.5175, 0.7288, 0.6069, 0.7438]}]}, {"id": "b_6", "type": "paragraph", "text": "One useful feature of the random forest is its built-in capability to estimate the importance of each feature. Below, I will explain how this estimation works for the case of classification.", "words": [{"w": "One", "b": [0.1312, 0.7557, 0.164, 0.7707]}, {"w": "useful", "b": [0.1701, 0.7557, 0.2168, 0.7707]}, {"w": "feature", "b": [0.2229, 0.7557, 0.2787, 0.7707]}, {"w": "of", "b": [0.2849, 0.7557, 0.2997, 0.7707]}, {"w": "the", "b": [0.3059, 0.7557, 0.3315, 0.7707]}, {"w": "random", "b": [0.3376, 0.7557, 0.399, 0.7707]}, {"w": "forest", "b": [0.4052, 0.7557, 0.4498, 0.7707]}, {"w": "is", "b": [0.456, 0.7557, 0.4684, 0.7707]}, {"w": "its", "b": [0.4745, 0.7557, 0.4941, 0.7707]}, {"w": "built-in", "b": [0.5002, 0.7557, 0.5595, 0.7707]}, {"w": "capability", "b": [0.5657, 0.7557, 0.6444, 0.7707]}, {"w": "to", "b": [0.6506, 0.7557, 0.667, 0.7707]}, {"w": "estimate", "b": [0.6731, 0.7557, 0.7407, 0.7707]}, {"w": "the", "b": [0.7469, 0.7557, 0.7724, 0.7707]}, {"w": "importance", "b": [0.7786, 0.7557, 0.8691, 0.7707]}, {"w": "of", "b": [0.1312, 0.7737, 0.146, 0.7886]}, {"w": "each", "b": [0.1521, 0.7737, 0.1872, 0.7886]}, {"w": "feature.", "b": [0.1933, 0.7737, 0.2538, 0.7886]}, {"w": "Below,", "b": [0.262, 0.7737, 0.3151, 0.7886]}, {"w": "I", "b": [0.3213, 0.7737, 0.3279, 0.7886]}, {"w": "will", "b": [0.334, 0.7737, 0.3624, 0.7886]}, {"w": "explain", "b": [0.3686, 0.7737, 0.426, 0.7886]}, {"w": "how", "b": [0.4321, 0.7737, 0.4641, 0.7886]}, {"w": "this", "b": [0.4703, 0.7737, 0.4998, 0.7886]}, {"w": "estimation", "b": [0.506, 0.7737, 0.5894, 0.7886]}, {"w": "works", "b": [0.5955, 0.7737, 0.6414, 0.7886]}, {"w": "for", "b": [0.6475, 0.7737, 0.6694, 0.7886]}, {"w": "the", "b": [0.6756, 0.7737, 0.701, 0.7886]}, {"w": "case", "b": [0.7071, 0.7737, 0.7398, 0.7886]}, {"w": "of", "b": [0.7459, 0.7737, 0.7606, 0.7886]}, {"w": "classification.", "b": [0.7668, 0.7737, 0.8727, 0.7886]}]}, {"id": "b_7", "type": "paragraph", "text": "The algorithm works in two stages. First, it classifies all training examples from the original training set. Each decision tree in the random forest model votes only on the classification of examples that weren’t used to build that tree. After a tree is tested, the number of correct predictions is recorded for that tree.", "words": [{"w": "The", "b": [0.1306, 0.8006, 0.162, 0.8155]}, {"w": "algorithm", "b": [0.1681, 0.8006, 0.2452, 0.8155]}, {"w": "works", "b": [0.2513, 0.8006, 0.297, 0.8155]}, {"w": "in", "b": [0.3032, 0.8006, 0.3184, 0.8155]}, {"w": "two", "b": [0.3245, 0.8006, 0.3529, 0.8155]}, {"w": "stages.", "b": [0.3591, 0.8006, 0.412, 0.8155]}, {"w": "First,", "b": [0.4202, 0.8006, 0.4636, 0.8155]}, {"w": "it", "b": [0.4698, 0.8006, 0.4819, 0.8155]}, {"w": "classifies", "b": [0.4881, 0.8006, 0.5553, 0.8155]}, {"w": "all", "b": [0.5615, 0.8006, 0.5807, 0.8155]}, {"w": "training", "b": [0.5869, 0.8006, 0.6497, 0.8155]}, {"w": "examples", "b": [0.6559, 0.8006, 0.7284, 0.8155]}, {"w": "from", "b": [0.7346, 0.8006, 0.7716, 0.8155]}, {"w": "the", "b": [0.7777, 0.8006, 0.8031, 0.8155]}, {"w": "original", "b": [0.8092, 0.8006, 0.8691, 0.8155]}, {"w": "training", "b": [0.1312, 0.8185, 0.1936, 0.8335]}, {"w": "set.", "b": [0.1996, 0.8185, 0.2268, 0.8335]}, {"w": "Each", "b": [0.235, 0.8185, 0.2739, 0.8335]}, {"w": "decision", "b": [0.2799, 0.8185, 0.3423, 0.8335]}, {"w": "tree", "b": [0.3483, 0.8185, 0.3786, 0.8335]}, {"w": "in", "b": [0.3846, 0.8185, 0.3996, 0.8335]}, {"w": "the", "b": [0.4056, 0.8185, 0.4308, 0.8335]}, {"w": "random", "b": [0.4368, 0.8185, 0.4971, 0.8335]}, {"w": "forest", "b": [0.5031, 0.8185, 0.547, 0.8335]}, {"w": "model", "b": [0.553, 0.8185, 0.6007, 0.8335]}, {"w": "votes", "b": [0.6067, 0.8185, 0.647, 0.8335]}, {"w": "only", "b": [0.653, 0.8185, 0.6866, 0.8335]}, {"w": "on", "b": [0.6926, 0.8185, 0.7117, 0.8335]}, {"w": "the", "b": [0.7177, 0.8185, 0.7429, 0.8335]}, {"w": "classification", "b": [0.7489, 0.8185, 0.8486, 0.8335]}, {"w": "of", "b": [0.8546, 0.8185, 0.8691, 0.8335]}, {"w": "examples", "b": [0.1312, 0.8365, 0.205, 0.8514]}, {"w": "that", "b": [0.2112, 0.8365, 0.2452, 0.8514]}, {"w": "weren’t", "b": [0.2513, 0.8365, 0.3107, 0.8514]}, {"w": "used", "b": [0.3168, 0.8365, 0.353, 0.8514]}, {"w": "to", "b": [0.3592, 0.8365, 0.3757, 0.8514]}, {"w": "build", "b": [0.3818, 0.8365, 0.4231, 0.8514]}, {"w": "that", "b": [0.4292, 0.8365, 0.4632, 0.8514]}, {"w": "tree.", "b": [0.4694, 0.8365, 0.5055, 0.8514]}, {"w": "After", "b": [0.5138, 0.8365, 0.5561, 0.8514]}, {"w": "a", "b": [0.5622, 0.8365, 0.5715, 0.8514]}, {"w": "tree", "b": [0.5777, 0.8365, 0.6086, 0.8514]}, {"w": "is", "b": [0.6148, 0.8365, 0.6273, 0.8514]}, {"w": "tested,", "b": [0.6334, 0.8365, 0.6871, 0.8514]}, {"w": "the", "b": [0.6933, 0.8365, 0.7191, 0.8514]}, {"w": "number", "b": [0.7252, 0.8365, 0.7866, 0.8514]}, {"w": "of", "b": [0.7928, 0.8365, 0.8077, 0.8514]}, {"w": "correct", "b": [0.8139, 0.8365, 0.8696, 0.8514]}, {"w": "predictions", "b": [0.1312, 0.8544, 0.2196, 0.8694]}, {"w": "is", "b": [0.2257, 0.8544, 0.2382, 0.8694]}, {"w": "recorded", "b": [0.2443, 0.8544, 0.3131, 0.8694]}, {"w": "for", "b": [0.3193, 0.8544, 0.3414, 0.8694]}, {"w": "that", "b": [0.3476, 0.8544, 0.3814, 0.8694]}, {"w": "tree.", "b": [0.3875, 0.8544, 0.4235, 0.8694]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 24", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "24", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 114, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "At the second stage, the values of a certain feature are randomly permuted across examples, and the tests are repeated. The number of correct predictions is once again recorded for each tree. The importance of the feature for a single tree is then computed as the difference between the number of correct classifications between the original and permuted setting, divided by the number of examples. To obtain the feature importance score, the feature importance measures for individual trees are averaged. While not strictly necessary, it’s convenient to use z-scores instead of the raw importance scores.", "words": [{"w": "At", "b": [0.1305, 0.0881, 0.1508, 0.1031]}, {"w": "the", "b": [0.157, 0.0881, 0.1824, 0.1031]}, {"w": "second", "b": [0.1886, 0.0881, 0.2415, 0.1031]}, {"w": "stage,", "b": [0.2477, 0.0881, 0.2935, 0.1031]}, {"w": "the", "b": [0.2997, 0.0881, 0.3251, 0.1031]}, {"w": "values", "b": [0.3313, 0.0881, 0.3796, 0.1031]}, {"w": "of", "b": [0.3858, 0.0881, 0.4005, 0.1031]}, {"w": "a", "b": [0.4067, 0.0881, 0.4158, 0.1031]}, {"w": "certain", "b": [0.422, 0.0881, 0.4769, 0.1031]}, {"w": "feature", "b": [0.4831, 0.0881, 0.5386, 0.1031]}, {"w": "are", "b": [0.5447, 0.0881, 0.5692, 0.1031]}, {"w": "randomly", "b": [0.5753, 0.0881, 0.6511, 0.1031]}, {"w": "permuted", "b": [0.6572, 0.0881, 0.7335, 0.1031]}, {"w": "across", "b": [0.7397, 0.0881, 0.7877, 0.1031]}, {"w": "examples,", "b": [0.7938, 0.0881, 0.8717, 0.1031]}, {"w": "and", "b": [0.1312, 0.106, 0.1616, 0.121]}, {"w": "the", "b": [0.1685, 0.106, 0.1946, 0.121]}, {"w": "tests", "b": [0.2015, 0.106, 0.2394, 0.121]}, {"w": "are", "b": [0.2463, 0.106, 0.2715, 0.121]}, {"w": "repeated.", "b": [0.2784, 0.106, 0.3543, 0.121]}, {"w": "The", "b": [0.3648, 0.106, 0.3972, 0.121]}, {"w": "number", "b": [0.4041, 0.106, 0.4664, 0.121]}, {"w": "of", "b": [0.4733, 0.106, 0.4885, 0.121]}, {"w": "correct", "b": [0.4954, 0.106, 0.552, 0.121]}, {"w": "predictions", "b": [0.5589, 0.106, 0.649, 0.121]}, {"w": "is", "b": [0.656, 0.106, 0.6686, 0.121]}, {"w": "once", "b": [0.6755, 0.106, 0.7122, 0.121]}, {"w": "again", "b": [0.7191, 0.106, 0.763, 0.121]}, {"w": "recorded", "b": [0.7699, 0.106, 0.8401, 0.121]}, {"w": "for", "b": [0.847, 0.106, 0.8695, 0.121]}, {"w": "each", "b": [0.1312, 0.124, 0.1663, 0.1389]}, {"w": "tree.", "b": [0.1724, 0.124, 0.208, 0.1389]}, {"w": "The", "b": [0.2163, 0.124, 0.2477, 0.1389]}, {"w": "importance", "b": [0.2539, 0.124, 0.3438, 0.1389]}, {"w": "of", "b": [0.35, 0.124, 0.3647, 0.1389]}, {"w": "the", "b": [0.3708, 0.124, 0.3962, 0.1389]}, {"w": "feature", "b": [0.4024, 0.124, 0.4578, 0.1389]}, {"w": "for", "b": [0.4639, 0.124, 0.4858, 0.1389]}, {"w": "a", "b": [0.492, 0.124, 0.5011, 0.1389]}, {"w": "single", "b": [0.5073, 0.124, 0.5521, 0.1389]}, {"w": "tree", "b": [0.5582, 0.124, 0.5887, 0.1389]}, {"w": "is", "b": [0.5949, 0.124, 0.6072, 0.1389]}, {"w": "then", "b": [0.6134, 0.124, 0.6489, 0.1389]}, {"w": "computed", "b": [0.6551, 0.124, 0.7332, 0.1389]}, {"w": "as", "b": [0.7394, 0.124, 0.7558, 0.1389]}, {"w": "the", "b": [0.7619, 0.124, 0.7873, 0.1389]}, {"w": "difference", "b": [0.7935, 0.124, 0.8692, 0.1389]}, {"w": "between", "b": [0.1312, 0.1419, 0.1977, 0.1569]}, {"w": "the", "b": [0.2048, 0.1419, 0.231, 0.1569]}, {"w": "number", "b": [0.2381, 0.1419, 0.3004, 0.1569]}, {"w": "of", "b": [0.3076, 0.1419, 0.3227, 0.1569]}, {"w": "correct", "b": [0.3299, 0.1419, 0.3865, 0.1569]}, {"w": "classifications", "b": [0.3937, 0.1419, 0.5049, 0.1569]}, {"w": "between", "b": [0.512, 0.1419, 0.5784, 0.1569]}, {"w": "the", "b": [0.5856, 0.1419, 0.6118, 0.1569]}, {"w": "original", "b": [0.6189, 0.1419, 0.6807, 0.1569]}, {"w": "and", "b": [0.6878, 0.1419, 0.7181, 0.1569]}, {"w": "permuted", "b": [0.7253, 0.1419, 0.8038, 0.1569]}, {"w": "setting,", "b": [0.8109, 0.1419, 0.8717, 0.1569]}, {"w": "divided", "b": [0.1312, 0.1599, 0.1914, 0.1748]}, {"w": "by", "b": [0.1984, 0.1599, 0.2183, 0.1748]}, {"w": "the", "b": [0.2253, 0.1599, 0.2514, 0.1748]}, {"w": "number", "b": [0.2585, 0.1599, 0.3208, 0.1748]}, {"w": "of", "b": [0.3278, 0.1599, 0.3429, 0.1748]}, {"w": "examples.", "b": [0.3499, 0.1599, 0.4301, 0.1748]}, {"w": "To", "b": [0.4408, 0.1599, 0.4623, 0.1748]}, {"w": "obtain", "b": [0.4693, 0.1599, 0.5216, 0.1748]}, {"w": "the", "b": [0.5286, 0.1599, 0.5548, 0.1748]}, {"w": "feature", "b": [0.5618, 0.1599, 0.6189, 0.1748]}, {"w": "importance", "b": [0.6259, 0.1599, 0.7185, 0.1748]}, {"w": "score,", "b": [0.7255, 0.1599, 0.7717, 0.1748]}, {"w": "the", "b": [0.7789, 0.1599, 0.8051, 0.1748]}, {"w": "feature", "b": [0.8121, 0.1599, 0.8691, 0.1748]}, {"w": "importance", "b": [0.1312, 0.1778, 0.2238, 0.1928]}, {"w": "measures", "b": [0.2311, 0.1778, 0.3057, 0.1928]}, {"w": "for", "b": [0.313, 0.1778, 0.3355, 0.1928]}, {"w": "individual", "b": [0.3428, 0.1778, 0.4249, 0.1928]}, {"w": "trees", "b": [0.4323, 0.1778, 0.4711, 0.1928]}, {"w": "are", "b": [0.4784, 0.1778, 0.5036, 0.1928]}, {"w": "averaged.", "b": [0.5109, 0.1778, 0.5879, 0.1928]}, {"w": "While", "b": [0.5995, 0.1778, 0.6482, 0.1928]}, {"w": "not", "b": [0.6555, 0.1778, 0.6827, 0.1928]}, {"w": "strictly", "b": [0.69, 0.1778, 0.7482, 0.1928]}, {"w": "necessary,", "b": [0.7555, 0.1778, 0.8364, 0.1928]}, {"w": "it’s", "b": [0.844, 0.1778, 0.8692, 0.1928]}, {"w": "convenient", "b": [0.1312, 0.1958, 0.2164, 0.2107]}, {"w": "to", "b": [0.2225, 0.1958, 0.2389, 0.2107]}, {"w": "use", "b": [0.2451, 0.1958, 0.2708, 0.2107]}, {"w": "z-scores", "b": [0.2769, 0.1961, 0.3486, 0.211]}, {"w": "instead", "b": [0.3548, 0.1958, 0.4123, 0.2107]}, {"w": "of", "b": [0.4185, 0.1958, 0.4333, 0.2107]}, {"w": "the", "b": [0.4395, 0.1958, 0.4651, 0.2107]}, {"w": "raw", "b": [0.4713, 0.1958, 0.5005, 0.2107]}, {"w": "importance", "b": [0.5067, 0.1958, 0.5975, 0.2107]}, {"w": "scores.", "b": [0.6036, 0.1958, 0.6562, 0.2107]}]}, {"id": "b_1", "type": "paragraph", "text": "To obtain a z-score for a feature, we first find the average value and the standard deviation of individual feature scores for individual trees. The feature’s z-score is obtained by subtracting the average value from the score, and then dividing it by the standard deviation.", "words": [{"w": "To", "b": [0.1306, 0.2227, 0.1511, 0.2377]}, {"w": "obtain", "b": [0.1568, 0.2227, 0.2071, 0.2377]}, {"w": "a", "b": [0.2127, 0.2227, 0.2218, 0.2377]}, {"w": "z-score", "b": [0.2275, 0.2227, 0.2809, 0.2377]}, {"w": "for", "b": [0.2866, 0.2227, 0.3083, 0.2377]}, {"w": "a", "b": [0.3139, 0.2227, 0.323, 0.2377]}, {"w": "feature,", "b": [0.3287, 0.2227, 0.3885, 0.2377]}, {"w": "we", "b": [0.3943, 0.2227, 0.4149, 0.2377]}, {"w": "first", "b": [0.4206, 0.2227, 0.4519, 0.2377]}, {"w": "find", "b": [0.4576, 0.2227, 0.4877, 0.2377]}, {"w": "the", "b": [0.4934, 0.2227, 0.5186, 0.2377]}, {"w": "average", "b": [0.5243, 0.2227, 0.5831, 0.2377]}, {"w": "value", "b": [0.5888, 0.2227, 0.6295, 0.2377]}, {"w": "and", "b": [0.6352, 0.2227, 0.6643, 0.2377]}, {"w": "the", "b": [0.67, 0.2227, 0.6951, 0.2377]}, {"w": "standard", "b": [0.7008, 0.2227, 0.7703, 0.2377]}, {"w": "deviation", "b": [0.776, 0.2227, 0.8488, 0.2377]}, {"w": "of", "b": [0.8545, 0.2227, 0.8691, 0.2377]}, {"w": "individual", "b": [0.1312, 0.2406, 0.2101, 0.2556]}, {"w": "feature", "b": [0.2161, 0.2406, 0.271, 0.2556]}, {"w": "scores", "b": [0.2769, 0.2406, 0.3234, 0.2556]}, {"w": "for", "b": [0.3294, 0.2406, 0.3511, 0.2556]}, {"w": "individual", "b": [0.3571, 0.2406, 0.436, 0.2556]}, {"w": "trees.", "b": [0.442, 0.2406, 0.4843, 0.2556]}, {"w": "The", "b": [0.4925, 0.2406, 0.5236, 0.2556]}, {"w": "feature’s", "b": [0.5296, 0.2406, 0.5966, 0.2556]}, {"w": "z-score", "b": [0.6026, 0.2406, 0.656, 0.2556]}, {"w": "is", "b": [0.662, 0.2406, 0.6742, 0.2556]}, {"w": "obtained", "b": [0.6802, 0.2406, 0.7485, 0.2556]}, {"w": "by", "b": [0.7545, 0.2406, 0.7736, 0.2556]}, {"w": "subtracting", "b": [0.7796, 0.2406, 0.8692, 0.2556]}, {"w": "the", "b": [0.1312, 0.2586, 0.1569, 0.2735]}, {"w": "average", "b": [0.163, 0.2586, 0.2231, 0.2735]}, {"w": "value", "b": [0.2292, 0.2586, 0.2707, 0.2735]}, {"w": "from", "b": [0.2769, 0.2586, 0.3144, 0.2735]}, {"w": "the", "b": [0.3205, 0.2586, 0.3462, 0.2735]}, {"w": "score,", "b": [0.3523, 0.2586, 0.3976, 0.2735]}, {"w": "and", "b": [0.4037, 0.2586, 0.4335, 0.2735]}, {"w": "then", "b": [0.4396, 0.2586, 0.4755, 0.2735]}, {"w": "dividing", "b": [0.4817, 0.2586, 0.5468, 0.2735]}, {"w": "it", "b": [0.553, 0.2586, 0.5653, 0.2735]}, {"w": "by", "b": [0.5714, 0.2586, 0.5909, 0.2735]}, {"w": "the", "b": [0.5971, 0.2586, 0.6227, 0.2735]}, {"w": "standard", "b": [0.6288, 0.2586, 0.6998, 0.2735]}, {"w": "deviation.", "b": [0.7059, 0.2586, 0.7854, 0.2735]}]}, {"id": "b_2", "type": "paragraph", "text": "You might stop here and use the z-scores of each feature as the criterion to keep it (the higher, the better). However, in practice, the importance score alone often doesn’t reflect meaningful correlations between features and the target. Therefore, we need a different tool to distinguish the truly important features from the non-important ones, and, as you could guess, Boruta provides that tool.", "words": [{"w": "You", "b": [0.1305, 0.2855, 0.163, 0.3005]}, {"w": "might", "b": [0.1703, 0.2855, 0.2178, 0.3005]}, {"w": "stop", "b": [0.2251, 0.2855, 0.2597, 0.3005]}, {"w": "here", "b": [0.267, 0.2855, 0.3016, 0.3005]}, {"w": "and", "b": [0.3089, 0.2855, 0.3392, 0.3005]}, {"w": "use", "b": [0.3465, 0.2855, 0.3728, 0.3005]}, {"w": "the", "b": [0.38, 0.2855, 0.4062, 0.3005]}, {"w": "z-scores", "b": [0.4135, 0.2855, 0.4765, 0.3005]}, {"w": "of", "b": [0.4838, 0.2855, 0.4989, 0.3005]}, {"w": "each", "b": [0.5062, 0.2855, 0.5423, 0.3005]}, {"w": "feature", "b": [0.5496, 0.2855, 0.6067, 0.3005]}, {"w": "as", "b": [0.614, 0.2855, 0.6308, 0.3005]}, {"w": "the", "b": [0.6381, 0.2855, 0.6642, 0.3005]}, {"w": "criterion", "b": [0.6715, 0.2855, 0.7407, 0.3005]}, {"w": "to", "b": [0.7479, 0.2855, 0.7647, 0.3005]}, {"w": "keep", "b": [0.7719, 0.2855, 0.8086, 0.3005]}, {"w": "it", "b": [0.8158, 0.2855, 0.8284, 0.3005]}, {"w": "(the", "b": [0.8357, 0.2855, 0.8692, 0.3005]}, {"w": "higher,", "b": [0.1312, 0.3035, 0.1878, 0.3184]}, {"w": "the", "b": [0.1942, 0.3035, 0.2204, 0.3184]}, {"w": "better).", "b": [0.2268, 0.3035, 0.2891, 0.3184]}, {"w": "However,", "b": [0.298, 0.3035, 0.3728, 0.3184]}, {"w": "in", "b": [0.3793, 0.3035, 0.395, 0.3184]}, {"w": "practice,", "b": [0.4014, 0.3035, 0.4715, 0.3184]}, {"w": "the", "b": [0.4779, 0.3035, 0.5041, 0.3184]}, {"w": "importance", "b": [0.5105, 0.3035, 0.6031, 0.3184]}, {"w": "score", "b": [0.6095, 0.3035, 0.6504, 0.3184]}, {"w": "alone", "b": [0.6568, 0.3035, 0.6997, 0.3184]}, {"w": "often", "b": [0.7061, 0.3035, 0.7474, 0.3184]}, {"w": "doesn’t", "b": [0.7538, 0.3035, 0.813, 0.3184]}, {"w": "reflect", "b": [0.8194, 0.3035, 0.8697, 0.3184]}, {"w": "meaningful", "b": [0.1312, 0.3214, 0.2192, 0.3364]}, {"w": "correlations", "b": [0.2254, 0.3214, 0.3182, 0.3364]}, {"w": "between", "b": [0.3243, 0.3214, 0.3889, 0.3364]}, {"w": "features", "b": [0.3951, 0.3214, 0.4578, 0.3364]}, {"w": "and", "b": [0.464, 0.3214, 0.4935, 0.3364]}, {"w": "the", "b": [0.4997, 0.3214, 0.5251, 0.3364]}, {"w": "target.", "b": [0.5313, 0.3214, 0.5842, 0.3364]}, {"w": "Therefore,", "b": [0.5925, 0.3214, 0.6745, 0.3364]}, {"w": "we", "b": [0.6806, 0.3214, 0.7015, 0.3364]}, {"w": "need", "b": [0.7077, 0.3214, 0.7443, 0.3364]}, {"w": "a", "b": [0.7505, 0.3214, 0.7596, 0.3364]}, {"w": "different", "b": [0.7658, 0.3214, 0.8319, 0.3364]}, {"w": "tool", "b": [0.8381, 0.3214, 0.8691, 0.3364]}, {"w": "to", "b": [0.1312, 0.3394, 0.1477, 0.3543]}, {"w": "distinguish", "b": [0.1538, 0.3394, 0.2414, 0.3543]}, {"w": "the", "b": [0.2475, 0.3394, 0.2732, 0.3543]}, {"w": "truly", "b": [0.2794, 0.3394, 0.319, 0.3543]}, {"w": "important", "b": [0.3252, 0.3394, 0.4064, 0.3543]}, {"w": "features", "b": [0.4125, 0.3394, 0.4759, 0.3543]}, {"w": "from", "b": [0.482, 0.3394, 0.5196, 0.3543]}, {"w": "the", "b": [0.5257, 0.3394, 0.5514, 0.3543]}, {"w": "non-important", "b": [0.5576, 0.3394, 0.6747, 0.3543]}, {"w": "ones,", "b": [0.6809, 0.3394, 0.7211, 0.3543]}, {"w": "and,", "b": [0.7272, 0.3394, 0.7622, 0.3543]}, {"w": "as", "b": [0.7683, 0.3394, 0.7849, 0.3543]}, {"w": "you", "b": [0.791, 0.3394, 0.8198, 0.3543]}, {"w": "could", "b": [0.8259, 0.3394, 0.8691, 0.3543]}, {"w": "guess,", "b": [0.1312, 0.3573, 0.1786, 0.3723]}, {"w": "Boruta", "b": [0.1848, 0.3573, 0.241, 0.3723]}, {"w": "provides", "b": [0.2471, 0.3573, 0.3139, 0.3723]}, {"w": "that", "b": [0.3201, 0.3573, 0.3539, 0.3723]}, {"w": "tool.", "b": [0.3601, 0.3573, 0.3965, 0.3723]}]}, {"id": "b_3", "type": "paragraph", "text": "The underlying idea of Boruta is simple: we first extend the list of features by adding a randomized copy of each original feature, and then build a classifier based on this extended dataset. To assess the importance of an original feature, we compare it to all randomized features. Only features for which the importance is higher than that of the randomized features — and statistically significant — are considered truly important.", "words": [{"w": "The", "b": [0.1306, 0.3842, 0.163, 0.3992]}, {"w": "underlying", "b": [0.1702, 0.3842, 0.2576, 0.3992]}, {"w": "idea", "b": [0.2647, 0.3842, 0.2982, 0.3992]}, {"w": "of", "b": [0.3054, 0.3842, 0.3205, 0.3992]}, {"w": "Boruta", "b": [0.3277, 0.3842, 0.385, 0.3992]}, {"w": "is", "b": [0.3922, 0.3842, 0.4048, 0.3992]}, {"w": "simple:", "b": [0.412, 0.3842, 0.4696, 0.3992]}, {"w": "we", "b": [0.4799, 0.3842, 0.5013, 0.3992]}, {"w": "first", "b": [0.5085, 0.3842, 0.5411, 0.3992]}, {"w": "extend", "b": [0.5483, 0.3842, 0.6032, 0.3992]}, {"w": "the", "b": [0.6103, 0.3842, 0.6365, 0.3992]}, {"w": "list", "b": [0.6437, 0.3842, 0.6689, 0.3992]}, {"w": "of", "b": [0.6761, 0.3842, 0.6912, 0.3992]}, {"w": "features", "b": [0.6984, 0.3842, 0.7629, 0.3992]}, {"w": "by", "b": [0.7701, 0.3842, 0.7899, 0.3992]}, {"w": "adding", "b": [0.7971, 0.3842, 0.8525, 0.3992]}, {"w": "a", "b": [0.8597, 0.3842, 0.8691, 0.3992]}, {"w": "randomized", "b": [0.1312, 0.4022, 0.2244, 0.4171]}, {"w": "copy", "b": [0.2306, 0.4022, 0.2674, 0.4171]}, {"w": "of", "b": [0.2736, 0.4022, 0.2884, 0.4171]}, {"w": "each", "b": [0.2946, 0.4022, 0.3299, 0.4171]}, {"w": "original", "b": [0.3361, 0.4022, 0.3965, 0.4171]}, {"w": "feature,", "b": [0.4027, 0.4022, 0.4636, 0.4171]}, {"w": "and", "b": [0.4698, 0.4022, 0.4995, 0.4171]}, {"w": "then", "b": [0.5056, 0.4022, 0.5415, 0.4171]}, {"w": "build", "b": [0.5476, 0.4022, 0.5886, 0.4171]}, {"w": "a", "b": [0.5948, 0.4022, 0.604, 0.4171]}, {"w": "classifier", "b": [0.6101, 0.4022, 0.678, 0.4171]}, {"w": "based", "b": [0.6841, 0.4022, 0.7293, 0.4171]}, {"w": "on", "b": [0.7354, 0.4022, 0.7549, 0.4171]}, {"w": "this", "b": [0.761, 0.4022, 0.7908, 0.4171]}, {"w": "extended", "b": [0.797, 0.4022, 0.8692, 0.4171]}, {"w": "dataset.", "b": [0.1312, 0.4201, 0.1962, 0.4351]}, {"w": "To", "b": [0.2049, 0.4201, 0.2264, 0.4351]}, {"w": "assess", "b": [0.2327, 0.4201, 0.2803, 0.4351]}, {"w": "the", "b": [0.2866, 0.4201, 0.3127, 0.4351]}, {"w": "importance", "b": [0.3191, 0.4201, 0.4117, 0.4351]}, {"w": "of", "b": [0.418, 0.4201, 0.4332, 0.4351]}, {"w": "an", "b": [0.4395, 0.4201, 0.4594, 0.4351]}, {"w": "original", "b": [0.4657, 0.4201, 0.5275, 0.4351]}, {"w": "feature,", "b": [0.5338, 0.4201, 0.5961, 0.4351]}, {"w": "we", "b": [0.6025, 0.4201, 0.624, 0.4351]}, {"w": "compare", "b": [0.6303, 0.4201, 0.6994, 0.4351]}, {"w": "it", "b": [0.7057, 0.4201, 0.7182, 0.4351]}, {"w": "to", "b": [0.7246, 0.4201, 0.7413, 0.4351]}, {"w": "all", "b": [0.7476, 0.4201, 0.7675, 0.4351]}, {"w": "randomized", "b": [0.7738, 0.4201, 0.8691, 0.4351]}, {"w": "features.", "b": [0.1312, 0.4381, 0.201, 0.453]}, {"w": "Only", "b": [0.2131, 0.4381, 0.2534, 0.453]}, {"w": "features", "b": [0.2609, 0.4381, 0.3254, 0.453]}, {"w": "for", "b": [0.3328, 0.4381, 0.3554, 0.453]}, {"w": "which", "b": [0.3628, 0.4381, 0.4105, 0.453]}, {"w": "the", "b": [0.4179, 0.4381, 0.4441, 0.453]}, {"w": "importance", "b": [0.4515, 0.4381, 0.5441, 0.453]}, {"w": "is", "b": [0.5516, 0.4381, 0.5643, 0.453]}, {"w": "higher", "b": [0.5717, 0.4381, 0.6231, 0.453]}, {"w": "than", "b": [0.6305, 0.4381, 0.6682, 0.453]}, {"w": "that", "b": [0.6757, 0.4381, 0.7102, 0.453]}, {"w": "of", "b": [0.7176, 0.4381, 0.7328, 0.453]}, {"w": "the", "b": [0.7403, 0.4381, 0.7664, 0.453]}, {"w": "randomized", "b": [0.7739, 0.4381, 0.8691, 0.453]}, {"w": "features", "b": [0.1312, 0.456, 0.1945, 0.471]}, {"w": "—", "b": [0.2006, 0.456, 0.2191, 0.471]}, {"w": "and", "b": [0.2252, 0.456, 0.255, 0.471]}, {"w": "statistically", "b": [0.2611, 0.456, 0.3541, 0.471]}, {"w": "significant", "b": [0.3603, 0.456, 0.4419, 0.471]}, {"w": "—", "b": [0.4481, 0.456, 0.4665, 0.471]}, {"w": "are", "b": [0.4727, 0.456, 0.4973, 0.471]}, {"w": "considered", "b": [0.5035, 0.456, 0.5877, 0.471]}, {"w": "truly", "b": [0.5939, 0.456, 0.6334, 0.471]}, {"w": "important.", "b": [0.6396, 0.456, 0.7258, 0.471]}]}, {"id": "b_4", "type": "paragraph", "text": "Below, I outline the main steps of the Boruta algorithm in the way it was described by its authors6 with adaptations for consistency and clarity:", "words": [{"w": "Below,", "b": [0.1312, 0.4829, 0.1856, 0.4979]}, {"w": "I", "b": [0.1917, 0.4829, 0.1984, 0.4979]}, {"w": "outline", "b": [0.2046, 0.4829, 0.2607, 0.4979]}, {"w": "the", "b": [0.2669, 0.4829, 0.2929, 0.4979]}, {"w": "main", "b": [0.299, 0.4829, 0.3396, 0.4979]}, {"w": "steps", "b": [0.3457, 0.4829, 0.3865, 0.4979]}, {"w": "of", "b": [0.3926, 0.4829, 0.4077, 0.4979]}, {"w": "the", "b": [0.4138, 0.4829, 0.4399, 0.4979]}, {"w": "Boruta", "b": [0.446, 0.4829, 0.503, 0.4979]}, {"w": "algorithm", "b": [0.5091, 0.4829, 0.5881, 0.4979]}, {"w": "in", "b": [0.5943, 0.4829, 0.6099, 0.4979]}, {"w": "the", "b": [0.616, 0.4829, 0.642, 0.4979]}, {"w": "way", "b": [0.6482, 0.4829, 0.6799, 0.4979]}, {"w": "it", "b": [0.686, 0.4829, 0.6985, 0.4979]}, {"w": "was", "b": [0.7047, 0.4829, 0.7344, 0.4979]}, {"w": "described", "b": [0.7405, 0.4829, 0.8171, 0.4979]}, {"w": "by", "b": [0.8233, 0.4829, 0.8431, 0.4979]}, {"w": "its", "b": [0.8492, 0.4829, 0.8691, 0.4979]}, {"w": "authors6", "b": [0.1312, 0.4992, 0.1992, 0.5158]}, {"w": "with", "b": [0.2063, 0.5009, 0.2422, 0.5158]}, {"w": "adaptations", "b": [0.2483, 0.5009, 0.3428, 0.5158]}, {"w": "for", "b": [0.3489, 0.5009, 0.371, 0.5158]}, {"w": "consistency", "b": [0.3772, 0.5009, 0.4681, 0.5158]}, {"w": "and", "b": [0.4743, 0.5009, 0.504, 0.5158]}, {"w": "clarity:", "b": [0.5102, 0.5009, 0.5666, 0.5158]}]}, {"id": "b_5", "type": "paragraph", "text": "The Boruta Algorithm", "words": [{"w": "The", "b": [0.1312, 0.5281, 0.1675, 0.5431]}, {"w": "Boruta", "b": [0.1746, 0.5281, 0.2394, 0.5431]}, {"w": "Algorithm", "b": [0.2464, 0.5281, 0.342, 0.5431]}]}, {"id": "b_6", "type": "paragraph", "text": "• Build extended training feature vectors, where each original feature is replicated. Randomly permute the values of the replicated features across the training examples to remove any correlation between the replicated variables and the target.", "words": [{"w": "•", "b": [0.1944, 0.5801, 0.2087, 0.5951]}, {"w": "Build", "b": [0.2179, 0.5801, 0.2618, 0.5951]}, {"w": "extended", "b": [0.2679, 0.5801, 0.3403, 0.5951]}, {"w": "training", "b": [0.3464, 0.5801, 0.4101, 0.5951]}, {"w": "feature", "b": [0.4162, 0.5801, 0.4722, 0.5951]}, {"w": "vectors,", "b": [0.4783, 0.5801, 0.54, 0.5951]}, {"w": "where", "b": [0.5462, 0.5801, 0.5934, 0.5951]}, {"w": "each", "b": [0.5996, 0.5801, 0.635, 0.5951]}, {"w": "original", "b": [0.6412, 0.5801, 0.7017, 0.5951]}, {"w": "feature", "b": [0.7079, 0.5801, 0.7638, 0.5951]}, {"w": "is", "b": [0.77, 0.5801, 0.7824, 0.5951]}, {"w": "replicated.", "b": [0.7886, 0.5801, 0.8727, 0.5951]}, {"w": "Randomly", "b": [0.2179, 0.5981, 0.2991, 0.613]}, {"w": "permute", "b": [0.3032, 0.5981, 0.3686, 0.613]}, {"w": "the", "b": [0.3727, 0.5981, 0.3979, 0.613]}, {"w": "values", "b": [0.402, 0.5981, 0.4498, 0.613]}, {"w": "of", "b": [0.454, 0.5981, 0.4686, 0.613]}, {"w": "the", "b": [0.4727, 0.5981, 0.4978, 0.613]}, {"w": "replicated", "b": [0.502, 0.5981, 0.5794, 0.613]}, {"w": "features", "b": [0.5836, 0.5981, 0.6456, 0.613]}, {"w": "across", "b": [0.6497, 0.5981, 0.6972, 0.613]}, {"w": "the", "b": [0.7014, 0.5981, 0.7265, 0.613]}, {"w": "training", "b": [0.7306, 0.5981, 0.793, 0.613]}, {"w": "examples", "b": [0.7971, 0.5981, 0.8691, 0.613]}, {"w": "to", "b": [0.2179, 0.616, 0.2343, 0.631]}, {"w": "remove", "b": [0.2405, 0.616, 0.2975, 0.631]}, {"w": "any", "b": [0.3036, 0.616, 0.3323, 0.631]}, {"w": "correlation", "b": [0.3385, 0.616, 0.4247, 0.631]}, {"w": "between", "b": [0.4309, 0.616, 0.496, 0.631]}, {"w": "the", "b": [0.5021, 0.616, 0.5278, 0.631]}, {"w": "replicated", "b": [0.5339, 0.616, 0.613, 0.631]}, {"w": "variables", "b": [0.6191, 0.616, 0.6895, 0.631]}, {"w": "and", "b": [0.6957, 0.616, 0.7254, 0.631]}, {"w": "the", "b": [0.7316, 0.616, 0.7572, 0.631]}, {"w": "target.", "b": [0.7633, 0.616, 0.8167, 0.631]}]}, {"id": "b_7", "type": "paragraph", "text": "• Perform several random forest learning runs. The replicated features are random- ized before each run by applying the same random feature value permutation process as in the previous step.", "words": [{"w": "•", "b": [0.1944, 0.643, 0.2087, 0.6579]}, {"w": "Perform", "b": [0.2179, 0.643, 0.2822, 0.6579]}, {"w": "several", "b": [0.2884, 0.643, 0.3423, 0.6579]}, {"w": "random", "b": [0.3484, 0.643, 0.4093, 0.6579]}, {"w": "forest", "b": [0.4155, 0.643, 0.4598, 0.6579]}, {"w": "learning", "b": [0.4659, 0.643, 0.5299, 0.6579]}, {"w": "runs.", "b": [0.5361, 0.643, 0.5758, 0.6579]}, {"w": "The", "b": [0.584, 0.643, 0.6154, 0.6579]}, {"w": "replicated", "b": [0.6216, 0.643, 0.6998, 0.6579]}, {"w": "features", "b": [0.7059, 0.643, 0.7685, 0.6579]}, {"w": "are", "b": [0.7747, 0.643, 0.7991, 0.6579]}, {"w": "random-", "b": [0.8052, 0.643, 0.8722, 0.6579]}, {"w": "ized", "b": [0.2179, 0.6609, 0.2504, 0.6759]}, {"w": "before", "b": [0.2579, 0.6609, 0.3082, 0.6759]}, {"w": "each", "b": [0.3157, 0.6609, 0.3518, 0.6759]}, {"w": "run", "b": [0.3593, 0.6609, 0.3876, 0.6759]}, {"w": "by", "b": [0.3951, 0.6609, 0.415, 0.6759]}, {"w": "applying", "b": [0.4226, 0.6609, 0.4931, 0.6759]}, {"w": "the", "b": [0.5007, 0.6609, 0.5268, 0.6759]}, {"w": "same", "b": [0.5344, 0.6609, 0.5752, 0.6759]}, {"w": "random", "b": [0.5828, 0.6609, 0.6456, 0.6759]}, {"w": "feature", "b": [0.6531, 0.6609, 0.7102, 0.6759]}, {"w": "value", "b": [0.7177, 0.6609, 0.7601, 0.6759]}, {"w": "permutation", "b": [0.7676, 0.6609, 0.8691, 0.6759]}, {"w": "process", "b": [0.2179, 0.6788, 0.2762, 0.6938]}, {"w": "as", "b": [0.2823, 0.6788, 0.2988, 0.6938]}, {"w": "in", "b": [0.305, 0.6788, 0.3204, 0.6938]}, {"w": "the", "b": [0.3265, 0.6788, 0.3521, 0.6938]}, {"w": "previous", "b": [0.3583, 0.6788, 0.4256, 0.6938]}, {"w": "step.", "b": [0.4318, 0.6788, 0.4699, 0.6938]}]}, {"id": "b_8", "type": "paragraph", "text": "• For each run, compute the importance (z-score) of all original and replicated features.", "words": [{"w": "•", "b": [0.1944, 0.7058, 0.2087, 0.7207]}, {"w": "For", "b": [0.2179, 0.7058, 0.2455, 0.7207]}, {"w": "each", "b": [0.2534, 0.7058, 0.2895, 0.7207]}, {"w": "run,", "b": [0.2973, 0.7058, 0.3309, 0.7207]}, {"w": "compute", "b": [0.3392, 0.7058, 0.4093, 0.7207]}, {"w": "the", "b": [0.4172, 0.7058, 0.4433, 0.7207]}, {"w": "importance", "b": [0.4512, 0.7058, 0.5438, 0.7207]}, {"w": "(z-score)", "b": [0.5517, 0.7058, 0.6219, 0.7207]}, {"w": "of", "b": [0.6298, 0.7058, 0.645, 0.7207]}, {"w": "all", "b": [0.6529, 0.7058, 0.6727, 0.7207]}, {"w": "original", "b": [0.6806, 0.7058, 0.7424, 0.7207]}, {"w": "and", "b": [0.7502, 0.7058, 0.7806, 0.7207]}, {"w": "replicated", "b": [0.7885, 0.7058, 0.8691, 0.7207]}, {"w": "features.", "b": [0.2179, 0.7237, 0.2863, 0.7387]}]}, {"id": "b_9", "type": "paragraph", "text": "– A feature is deemed important for a single run if its importance is higher than", "words": [{"w": "–", "b": [0.2326, 0.7734, 0.2432, 0.7883]}, {"w": "A", "b": [0.2524, 0.7731, 0.266, 0.788]}, {"w": "feature", "b": [0.2716, 0.7731, 0.3265, 0.788]}, {"w": "is", "b": [0.3321, 0.7731, 0.3443, 0.788]}, {"w": "deemed", "b": [0.3499, 0.7731, 0.4092, 0.788]}, {"w": "important", "b": [0.4148, 0.7731, 0.4942, 0.788]}, {"w": "for", "b": [0.4998, 0.7731, 0.5215, 0.788]}, {"w": "a", "b": [0.5271, 0.7731, 0.5362, 0.788]}, {"w": "single", "b": [0.5418, 0.7731, 0.5861, 0.788]}, {"w": "run", "b": [0.5917, 0.7731, 0.6189, 0.788]}, {"w": "if", "b": [0.6246, 0.7731, 0.6351, 0.788]}, {"w": "its", "b": [0.6407, 0.7731, 0.6599, 0.788]}, {"w": "importance", "b": [0.6656, 0.7731, 0.7546, 0.788]}, {"w": "is", "b": [0.7602, 0.7731, 0.7723, 0.788]}, {"w": "higher", "b": [0.778, 0.7731, 0.8273, 0.788]}, {"w": "than", "b": [0.8329, 0.7731, 0.8691, 0.788]}]}, {"id": "b_10", "type": "paragraph", "text": "the maximal importance among all replicated features.", "words": [{"w": "the", "b": [0.2524, 0.791, 0.2781, 0.806]}, {"w": "maximal", "b": [0.2842, 0.791, 0.3534, 0.806]}, {"w": "importance", "b": [0.3596, 0.791, 0.4504, 0.806]}, {"w": "among", "b": [0.4565, 0.791, 0.5098, 0.806]}, {"w": "all", "b": [0.516, 0.791, 0.5355, 0.806]}, {"w": "replicated", "b": [0.5416, 0.791, 0.6206, 0.806]}, {"w": "features.", "b": [0.6268, 0.791, 0.6952, 0.806]}]}, {"id": "b_11", "type": "paragraph", "text": "• Perform a statistical test for all original features.", "words": [{"w": "•", "b": [0.1944, 0.8179, 0.2087, 0.8329]}, {"w": "Perform", "b": [0.2179, 0.8179, 0.2829, 0.8329]}, {"w": "a", "b": [0.289, 0.8179, 0.2983, 0.8329]}, {"w": "statistical", "b": [0.3046, 0.8182, 0.3939, 0.8332]}, {"w": "test", "b": [0.4009, 0.8182, 0.4355, 0.8332]}, {"w": "for", "b": [0.4416, 0.8179, 0.4637, 0.8329]}, {"w": "all", "b": [0.4699, 0.8179, 0.4894, 0.8329]}, {"w": "original", "b": [0.4955, 0.8179, 0.5561, 0.8329]}, {"w": "features.", "b": [0.5622, 0.8179, 0.6306, 0.8329]}]}, {"id": "b_12", "type": "paragraph", "text": "6Miron B. Kursa, Aleksander Jankowski, Witold R. Rudnicki, “Boruta - A System for Feature Selection,” published in Fundamenta Informaticae 101 in 2010, pages 271–285.", "words": [{"w": "6Miron", "b": [0.1518, 0.845, 0.2004, 0.8588]}, {"w": "B.", "b": [0.2056, 0.8469, 0.2209, 0.8588]}, {"w": "Kursa,", "b": [0.2262, 0.8469, 0.2711, 0.8588]}, {"w": "Aleksander", "b": [0.2763, 0.8469, 0.3514, 0.8588]}, {"w": "Jankowski,", "b": [0.3567, 0.8469, 0.4303, 0.8588]}, {"w": "Witold", "b": [0.4355, 0.8469, 0.4825, 0.8588]}, {"w": "R.", "b": [0.4877, 0.8469, 0.5035, 0.8588]}, {"w": "Rudnicki,", "b": [0.5087, 0.8469, 0.5731, 0.8588]}, {"w": "“Boruta", "b": [0.5784, 0.8469, 0.6329, 0.8588]}, {"w": "-", "b": [0.6381, 0.8469, 0.6433, 0.8588]}, {"w": "A", "b": [0.6486, 0.8469, 0.6602, 0.8588]}, {"w": "System", "b": [0.6654, 0.8469, 0.7142, 0.8588]}, {"w": "for", "b": [0.7195, 0.8469, 0.738, 0.8588]}, {"w": "Feature", "b": [0.7432, 0.8469, 0.7943, 0.8588]}, {"w": "Selection,”", "b": [0.7996, 0.8469, 0.8716, 0.8588]}, {"w": "published", "b": [0.1312, 0.8611, 0.1966, 0.8731]}, {"w": "in", "b": [0.2019, 0.8611, 0.2149, 0.8731]}, {"w": "Fundamenta", "b": [0.2202, 0.8611, 0.3053, 0.8731]}, {"w": "Informaticae", "b": [0.3105, 0.8611, 0.3967, 0.8731]}, {"w": "101", "b": [0.402, 0.8611, 0.4255, 0.8731]}, {"w": "in", "b": [0.4307, 0.8611, 0.4437, 0.8731]}, {"w": "2010,", "b": [0.449, 0.8611, 0.4847, 0.8731]}, {"w": "pages", "b": [0.4899, 0.8611, 0.5274, 0.8731]}, {"w": "271–285.", "b": [0.5327, 0.8611, 0.5919, 0.8731]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 25", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "25", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 115, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "– The null hypothesis is that the feature’s importance is equal to the maximal", "words": [{"w": "–", "b": [0.2326, 0.0884, 0.2432, 0.1034]}, {"w": "The", "b": [0.2524, 0.0881, 0.2836, 0.1031]}, {"w": "null", "b": [0.2888, 0.0884, 0.3236, 0.1034]}, {"w": "hypothesis", "b": [0.3296, 0.0884, 0.4274, 0.1034]}, {"w": "is", "b": [0.4326, 0.0881, 0.4448, 0.1031]}, {"w": "that", "b": [0.45, 0.0881, 0.4831, 0.1031]}, {"w": "the", "b": [0.4884, 0.0881, 0.5135, 0.1031]}, {"w": "feature’s", "b": [0.5187, 0.0881, 0.5857, 0.1031]}, {"w": "importance", "b": [0.591, 0.0881, 0.6799, 0.1031]}, {"w": "is", "b": [0.6852, 0.0881, 0.6973, 0.1031]}, {"w": "equal", "b": [0.7026, 0.0881, 0.7443, 0.1031]}, {"w": "to", "b": [0.7495, 0.0881, 0.7656, 0.1031]}, {"w": "the", "b": [0.7708, 0.0881, 0.7959, 0.1031]}, {"w": "maximal", "b": [0.8012, 0.0881, 0.869, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "importance of the replicated features (MIRA).", "words": [{"w": "importance", "b": [0.2524, 0.106, 0.3433, 0.121]}, {"w": "of", "b": [0.3494, 0.106, 0.3643, 0.121]}, {"w": "the", "b": [0.3704, 0.106, 0.3961, 0.121]}, {"w": "replicated", "b": [0.4022, 0.106, 0.4812, 0.121]}, {"w": "features", "b": [0.4874, 0.106, 0.5506, 0.121]}, {"w": "(MIRA).", "b": [0.5568, 0.106, 0.6272, 0.121]}]}, {"id": "b_2", "type": "equation", "text": "– The statistical test is a two-sided equality test - the hypothesis may be", "words": [{"w": "–", "b": [0.2326, 0.1333, 0.2432, 0.1482]}, {"w": "The", "b": [0.2524, 0.133, 0.2849, 0.1479]}, {"w": "statistical", "b": [0.2916, 0.133, 0.3713, 0.1479]}, {"w": "test", "b": [0.3781, 0.133, 0.4085, 0.1479]}, {"w": "is", "b": [0.4153, 0.133, 0.4279, 0.1479]}, {"w": "a", "b": [0.4347, 0.133, 0.4441, 0.1479]}, {"w": "two-sided", "b": [0.4509, 0.1333, 0.5386, 0.1482]}, {"w": "equality", "b": [0.5463, 0.1333, 0.62, 0.1482]}, {"w": "test", "b": [0.6278, 0.1333, 0.6624, 0.1482]}, {"w": "-", "b": [0.6691, 0.133, 0.6753, 0.1479]}, {"w": "the", "b": [0.6821, 0.133, 0.7082, 0.1479]}, {"w": "hypothesis", "b": [0.715, 0.133, 0.8015, 0.1479]}, {"w": "may", "b": [0.8083, 0.133, 0.8428, 0.1479]}, {"w": "be", "b": [0.8495, 0.133, 0.8689, 0.1479]}]}, {"id": "b_3", "type": "paragraph", "text": "rejected either when the importance of the feature is significantly higher or significantly lower than MIRA.", "words": [{"w": "rejected", "b": [0.2524, 0.1509, 0.3167, 0.1659]}, {"w": "either", "b": [0.3228, 0.1509, 0.3698, 0.1659]}, {"w": "when", "b": [0.376, 0.1509, 0.4188, 0.1659]}, {"w": "the", "b": [0.4249, 0.1509, 0.451, 0.1659]}, {"w": "importance", "b": [0.4572, 0.1509, 0.5495, 0.1659]}, {"w": "of", "b": [0.5557, 0.1509, 0.5708, 0.1659]}, {"w": "the", "b": [0.577, 0.1509, 0.603, 0.1659]}, {"w": "feature", "b": [0.6092, 0.1509, 0.6661, 0.1659]}, {"w": "is", "b": [0.6723, 0.1509, 0.6849, 0.1659]}, {"w": "significantly", "b": [0.6911, 0.1509, 0.7893, 0.1659]}, {"w": "higher", "b": [0.7954, 0.1509, 0.8466, 0.1659]}, {"w": "or", "b": [0.8527, 0.1509, 0.8695, 0.1659]}, {"w": "significantly", "b": [0.2524, 0.1689, 0.349, 0.1838]}, {"w": "lower", "b": [0.3551, 0.1689, 0.3972, 0.1838]}, {"w": "than", "b": [0.4033, 0.1689, 0.4403, 0.1838]}, {"w": "MIRA.", "b": [0.4464, 0.1689, 0.5025, 0.1838]}]}, {"id": "b_4", "type": "paragraph", "text": "– For each original feature, we count and record the number of hits.", "words": [{"w": "–", "b": [0.2326, 0.1961, 0.2432, 0.211]}, {"w": "For", "b": [0.2524, 0.1958, 0.2794, 0.2107]}, {"w": "each", "b": [0.2856, 0.1958, 0.3209, 0.2107]}, {"w": "original", "b": [0.3271, 0.1958, 0.3876, 0.2107]}, {"w": "feature,", "b": [0.3938, 0.1958, 0.4549, 0.2107]}, {"w": "we", "b": [0.461, 0.1958, 0.482, 0.2107]}, {"w": "count", "b": [0.4882, 0.1958, 0.5328, 0.2107]}, {"w": "and", "b": [0.539, 0.1958, 0.5687, 0.2107]}, {"w": "record", "b": [0.5748, 0.1958, 0.6252, 0.2107]}, {"w": "the", "b": [0.6314, 0.1958, 0.657, 0.2107]}, {"w": "number", "b": [0.6631, 0.1958, 0.7242, 0.2107]}, {"w": "of", "b": [0.7304, 0.1958, 0.7452, 0.2107]}, {"w": "hits.", "b": [0.7514, 0.1958, 0.7864, 0.2107]}]}, {"id": "b_5", "type": "paragraph", "text": "– The number of hits for a feature is the number of runs in which the importance", "words": [{"w": "–", "b": [0.2326, 0.223, 0.2432, 0.238]}, {"w": "The", "b": [0.2524, 0.2227, 0.2836, 0.2377]}, {"w": "number", "b": [0.2886, 0.2227, 0.3485, 0.2377]}, {"w": "of", "b": [0.3535, 0.2227, 0.3681, 0.2377]}, {"w": "hits", "b": [0.3731, 0.2227, 0.4023, 0.2377]}, {"w": "for", "b": [0.4073, 0.2227, 0.429, 0.2377]}, {"w": "a", "b": [0.434, 0.2227, 0.4431, 0.2377]}, {"w": "feature", "b": [0.4481, 0.2227, 0.5029, 0.2377]}, {"w": "is", "b": [0.5079, 0.2227, 0.5201, 0.2377]}, {"w": "the", "b": [0.5251, 0.2227, 0.5503, 0.2377]}, {"w": "number", "b": [0.5553, 0.2227, 0.6151, 0.2377]}, {"w": "of", "b": [0.6201, 0.2227, 0.6347, 0.2377]}, {"w": "runs", "b": [0.6397, 0.2227, 0.6741, 0.2377]}, {"w": "in", "b": [0.6791, 0.2227, 0.6942, 0.2377]}, {"w": "which", "b": [0.6992, 0.2227, 0.7449, 0.2377]}, {"w": "the", "b": [0.7499, 0.2227, 0.7751, 0.2377]}, {"w": "importance", "b": [0.7801, 0.2227, 0.8691, 0.2377]}]}, {"id": "b_6", "type": "paragraph", "text": "of that feature was higher than MIRA.", "words": [{"w": "of", "b": [0.2524, 0.2406, 0.2673, 0.2556]}, {"w": "that", "b": [0.2735, 0.2406, 0.3073, 0.2556]}, {"w": "feature", "b": [0.3135, 0.2406, 0.3694, 0.2556]}, {"w": "was", "b": [0.3756, 0.2406, 0.4049, 0.2556]}, {"w": "higher", "b": [0.411, 0.2406, 0.4613, 0.2556]}, {"w": "than", "b": [0.4675, 0.2406, 0.5044, 0.2556]}, {"w": "MIRA.", "b": [0.5106, 0.2406, 0.5667, 0.2556]}]}, {"id": "b_7", "type": "equation", "text": "– The expected number of hits for R runs is E(R) = 0.5R with standard", "words": [{"w": "–", "b": [0.2326, 0.2679, 0.2432, 0.2828]}, {"w": "The", "b": [0.2524, 0.2676, 0.2849, 0.2825]}, {"w": "expected", "b": [0.2935, 0.2676, 0.3657, 0.2825]}, {"w": "number", "b": [0.3744, 0.2676, 0.4367, 0.2825]}, {"w": "of", "b": [0.4453, 0.2676, 0.4605, 0.2825]}, {"w": "hits", "b": [0.4691, 0.2676, 0.4996, 0.2825]}, {"w": "for", "b": [0.5082, 0.2676, 0.5308, 0.2825]}, {"w": "R", "b": [0.5393, 0.2678, 0.5533, 0.2828]}, {"w": "runs", "b": [0.5621, 0.2676, 0.5978, 0.2825]}, {"w": "is", "b": [0.6065, 0.2676, 0.6192, 0.2825]}, {"w": "E(R)", "b": [0.6278, 0.2676, 0.6712, 0.2828]}, {"w": "=", "b": [0.6805, 0.2676, 0.6952, 0.2825]}, {"w": "0.5R", "b": [0.7045, 0.2676, 0.7424, 0.2828]}, {"w": "with", "b": [0.7512, 0.2676, 0.7878, 0.2825]}, {"w": "standard", "b": [0.7965, 0.2676, 0.8688, 0.2825]}]}, {"id": "b_8", "type": "equation", "text": "deviation S =", "words": [{"w": "deviation", "b": [0.2524, 0.2855, 0.3268, 0.3005]}, {"w": "S", "b": [0.3329, 0.2858, 0.3442, 0.3007]}, {"w": "=", "b": [0.3504, 0.2855, 0.3648, 0.3005]}]}, {"id": "b_10", "type": "equation", "text": "0.25R (binomial distribution with p = q = 0.5).", "words": [{"w": "0.25R", "b": [0.3853, 0.2855, 0.4321, 0.3007]}, {"w": "(binomial", "b": [0.4384, 0.2855, 0.5254, 0.3008]}, {"w": "distribution", "b": [0.5325, 0.2858, 0.6416, 0.3008]}, {"w": "with", "b": [0.6477, 0.2855, 0.6836, 0.3005]}, {"w": "p", "b": [0.6897, 0.2858, 0.699, 0.3007]}, {"w": "=", "b": [0.7042, 0.2855, 0.7185, 0.3005]}, {"w": "q", "b": [0.7236, 0.2858, 0.7319, 0.3007]}, {"w": "=", "b": [0.7377, 0.2855, 0.752, 0.3005]}, {"w": "0.5).", "b": [0.7571, 0.2855, 0.793, 0.3007]}]}, {"id": "b_11", "type": "paragraph", "text": "– An original feature is deemed important (accepted) when the number of", "words": [{"w": "–", "b": [0.2326, 0.3127, 0.2432, 0.3277]}, {"w": "An", "b": [0.2524, 0.3124, 0.277, 0.3274]}, {"w": "original", "b": [0.2854, 0.3124, 0.3472, 0.3274]}, {"w": "feature", "b": [0.3556, 0.3124, 0.4126, 0.3274]}, {"w": "is", "b": [0.421, 0.3124, 0.4337, 0.3274]}, {"w": "deemed", "b": [0.4421, 0.3124, 0.5038, 0.3274]}, {"w": "important", "b": [0.5122, 0.3124, 0.5948, 0.3274]}, {"w": "(accepted)", "b": [0.6032, 0.3124, 0.689, 0.3274]}, {"w": "when", "b": [0.6974, 0.3124, 0.7403, 0.3274]}, {"w": "the", "b": [0.7487, 0.3124, 0.7748, 0.3274]}, {"w": "number", "b": [0.7832, 0.3124, 0.8455, 0.3274]}, {"w": "of", "b": [0.8539, 0.3124, 0.869, 0.3274]}]}, {"id": "b_12", "type": "paragraph", "text": "hits is significantly higher than the expected number of hits and is deemed unimportant (rejected) when the number of hits is significantly lower than the expected. (It is possible to compute limits for accepting and rejecting feature for any number of runs for the desired confidence level.)", "words": [{"w": "hits", "b": [0.2524, 0.3304, 0.2829, 0.3453]}, {"w": "is", "b": [0.2892, 0.3304, 0.3018, 0.3453]}, {"w": "significantly", "b": [0.3081, 0.3304, 0.4065, 0.3453]}, {"w": "higher", "b": [0.4128, 0.3304, 0.4641, 0.3453]}, {"w": "than", "b": [0.4704, 0.3304, 0.508, 0.3453]}, {"w": "the", "b": [0.5143, 0.3304, 0.5404, 0.3453]}, {"w": "expected", "b": [0.5467, 0.3304, 0.6189, 0.3453]}, {"w": "number", "b": [0.6252, 0.3304, 0.6875, 0.3453]}, {"w": "of", "b": [0.6937, 0.3304, 0.7089, 0.3453]}, {"w": "hits", "b": [0.7152, 0.3304, 0.7456, 0.3453]}, {"w": "and", "b": [0.7519, 0.3304, 0.7822, 0.3453]}, {"w": "is", "b": [0.7885, 0.3304, 0.8011, 0.3453]}, {"w": "deemed", "b": [0.8074, 0.3304, 0.8691, 0.3453]}, {"w": "unimportant", "b": [0.2524, 0.3483, 0.352, 0.3633]}, {"w": "(rejected)", "b": [0.3576, 0.3483, 0.4336, 0.3633]}, {"w": "when", "b": [0.4392, 0.3483, 0.4804, 0.3633]}, {"w": "the", "b": [0.486, 0.3483, 0.5111, 0.3633]}, {"w": "number", "b": [0.5168, 0.3483, 0.5766, 0.3633]}, {"w": "of", "b": [0.5822, 0.3483, 0.5968, 0.3633]}, {"w": "hits", "b": [0.6024, 0.3483, 0.6317, 0.3633]}, {"w": "is", "b": [0.6373, 0.3483, 0.6495, 0.3633]}, {"w": "significantly", "b": [0.6551, 0.3483, 0.7497, 0.3633]}, {"w": "lower", "b": [0.7553, 0.3483, 0.7965, 0.3633]}, {"w": "than", "b": [0.8021, 0.3483, 0.8383, 0.3633]}, {"w": "the", "b": [0.8439, 0.3483, 0.8691, 0.3633]}, {"w": "expected.", "b": [0.2524, 0.3663, 0.3272, 0.3812]}, {"w": "(It", "b": [0.3353, 0.3663, 0.356, 0.3812]}, {"w": "is", "b": [0.3622, 0.3663, 0.3744, 0.3812]}, {"w": "possible", "b": [0.3805, 0.3663, 0.4428, 0.3812]}, {"w": "to", "b": [0.4489, 0.3663, 0.4651, 0.3812]}, {"w": "compute", "b": [0.4712, 0.3663, 0.5388, 0.3812]}, {"w": "limits", "b": [0.545, 0.3663, 0.5895, 0.3812]}, {"w": "for", "b": [0.5956, 0.3663, 0.6174, 0.3812]}, {"w": "accepting", "b": [0.6235, 0.3663, 0.6982, 0.3812]}, {"w": "and", "b": [0.7043, 0.3663, 0.7336, 0.3812]}, {"w": "rejecting", "b": [0.7397, 0.3663, 0.8079, 0.3812]}, {"w": "feature", "b": [0.814, 0.3663, 0.8691, 0.3812]}, {"w": "for", "b": [0.2524, 0.3842, 0.2745, 0.3992]}, {"w": "any", "b": [0.2807, 0.3842, 0.3094, 0.3992]}, {"w": "number", "b": [0.3156, 0.3842, 0.3766, 0.3992]}, {"w": "of", "b": [0.3828, 0.3842, 0.3976, 0.3992]}, {"w": "runs", "b": [0.4038, 0.3842, 0.4388, 0.3992]}, {"w": "for", "b": [0.445, 0.3842, 0.4671, 0.3992]}, {"w": "the", "b": [0.4732, 0.3842, 0.4989, 0.3992]}, {"w": "desired", "b": [0.505, 0.3842, 0.5616, 0.3992]}, {"w": "confidence", "b": [0.5677, 0.3842, 0.6508, 0.3992]}, {"w": "level.)", "b": [0.657, 0.3842, 0.7052, 0.3992]}]}, {"id": "b_13", "type": "paragraph", "text": "• Remove the features which are deemed unimportant from the feature vectors (both original and replicated).", "words": [{"w": "•", "b": [0.1944, 0.4111, 0.2087, 0.4261]}, {"w": "Remove", "b": [0.2179, 0.4111, 0.28, 0.4261]}, {"w": "the", "b": [0.2852, 0.4111, 0.3103, 0.4261]}, {"w": "features", "b": [0.3155, 0.4111, 0.3775, 0.4261]}, {"w": "which", "b": [0.3827, 0.4111, 0.4285, 0.4261]}, {"w": "are", "b": [0.4337, 0.4111, 0.4579, 0.4261]}, {"w": "deemed", "b": [0.4631, 0.4111, 0.5224, 0.4261]}, {"w": "unimportant", "b": [0.5276, 0.4111, 0.6271, 0.4261]}, {"w": "from", "b": [0.6323, 0.4111, 0.6691, 0.4261]}, {"w": "the", "b": [0.6743, 0.4111, 0.6994, 0.4261]}, {"w": "feature", "b": [0.7046, 0.4111, 0.7595, 0.4261]}, {"w": "vectors", "b": [0.7647, 0.4111, 0.8201, 0.4261]}, {"w": "(both", "b": [0.8254, 0.4111, 0.8691, 0.4261]}, {"w": "original", "b": [0.2179, 0.4291, 0.2785, 0.444]}, {"w": "and", "b": [0.2846, 0.4291, 0.3144, 0.444]}, {"w": "replicated).", "b": [0.3205, 0.4291, 0.4119, 0.444]}]}, {"id": "b_14", "type": "paragraph", "text": "• Perform the same procedure for a predefined number of iterations, or until all features are either rejected or conclusively deemed important, whichever comes first.", "words": [{"w": "•", "b": [0.1944, 0.456, 0.2087, 0.471]}, {"w": "Perform", "b": [0.2179, 0.456, 0.2842, 0.471]}, {"w": "the", "b": [0.2913, 0.456, 0.3174, 0.471]}, {"w": "same", "b": [0.3245, 0.456, 0.3653, 0.471]}, {"w": "procedure", "b": [0.3724, 0.456, 0.4536, 0.471]}, {"w": "for", "b": [0.4606, 0.456, 0.4832, 0.471]}, {"w": "a", "b": [0.4902, 0.456, 0.4996, 0.471]}, {"w": "predefined", "b": [0.5067, 0.456, 0.5915, 0.471]}, {"w": "number", "b": [0.5985, 0.456, 0.6608, 0.471]}, {"w": "of", "b": [0.6679, 0.456, 0.683, 0.471]}, {"w": "iterations,", "b": [0.6901, 0.456, 0.7729, 0.471]}, {"w": "or", "b": [0.7802, 0.456, 0.7969, 0.471]}, {"w": "until", "b": [0.804, 0.456, 0.8422, 0.471]}, {"w": "all", "b": [0.8492, 0.456, 0.8691, 0.471]}, {"w": "features", "b": [0.2179, 0.474, 0.2799, 0.4889]}, {"w": "are", "b": [0.2845, 0.474, 0.3087, 0.4889]}, {"w": "either", "b": [0.3132, 0.474, 0.3585, 0.4889]}, {"w": "rejected", "b": [0.3631, 0.474, 0.4249, 0.4889]}, {"w": "or", "b": [0.4295, 0.474, 0.4456, 0.4889]}, {"w": "conclusively", "b": [0.4502, 0.474, 0.5443, 0.4889]}, {"w": "deemed", "b": [0.5488, 0.474, 0.6081, 0.4889]}, {"w": "important,", "b": [0.6127, 0.474, 0.6971, 0.4889]}, {"w": "whichever", "b": [0.702, 0.474, 0.78, 0.4889]}, {"w": "comes", "b": [0.7845, 0.474, 0.8318, 0.4889]}, {"w": "first.", "b": [0.8364, 0.474, 0.8727, 0.4889]}]}, {"id": "b_15", "type": "paragraph", "text": "Boruta worked well for many Kaggle competitions; therefore, you can consider it a universally applicable tool for feature selection. One thing worth noting, though, before using Boruta in production: Boruta is a heuristic. There are no theoretical guarantees for its performance. If you want to be sure that Boruta doesn’t harm, run it multiple times and make sure that the feature selection is stable (i.e., consistent across multiple Boruta applications to your data). If the feature selection is not stable, make sure that the number of trees in the random forest is large enough to generate stable results.", "words": [{"w": "Boruta", "b": [0.1312, 0.5009, 0.1863, 0.5158]}, {"w": "worked", "b": [0.1917, 0.5009, 0.2475, 0.5158]}, {"w": "well", "b": [0.2529, 0.5009, 0.2836, 0.5158]}, {"w": "for", "b": [0.289, 0.5009, 0.3107, 0.5158]}, {"w": "many", "b": [0.3161, 0.5009, 0.3593, 0.5158]}, {"w": "Kaggle", "b": [0.3647, 0.5009, 0.4189, 0.5158]}, {"w": "competitions;", "b": [0.4244, 0.5009, 0.5305, 0.5158]}, {"w": "therefore,", "b": [0.5362, 0.5009, 0.6112, 0.5158]}, {"w": "you", "b": [0.6167, 0.5009, 0.6449, 0.5158]}, {"w": "can", "b": [0.6503, 0.5009, 0.6774, 0.5158]}, {"w": "consider", "b": [0.6828, 0.5009, 0.7473, 0.5158]}, {"w": "it", "b": [0.7528, 0.5009, 0.7648, 0.5158]}, {"w": "a", "b": [0.7702, 0.5009, 0.7793, 0.5158]}, {"w": "universally", "b": [0.7847, 0.5009, 0.8698, 0.5158]}, {"w": "applicable", "b": [0.1312, 0.5188, 0.211, 0.5338]}, {"w": "tool", "b": [0.2171, 0.5188, 0.2479, 0.5338]}, {"w": "for", "b": [0.254, 0.5188, 0.2757, 0.5338]}, {"w": "feature", "b": [0.2819, 0.5188, 0.3369, 0.5338]}, {"w": "selection.", "b": [0.3431, 0.5188, 0.4158, 0.5338]}, {"w": "One", "b": [0.424, 0.5188, 0.4563, 0.5338]}, {"w": "thing", "b": [0.4625, 0.5188, 0.5038, 0.5338]}, {"w": "worth", "b": [0.5099, 0.5188, 0.5559, 0.5338]}, {"w": "noting,", "b": [0.562, 0.5188, 0.6175, 0.5338]}, {"w": "though,", "b": [0.6236, 0.5188, 0.6842, 0.5338]}, {"w": "before", "b": [0.6903, 0.5188, 0.7388, 0.5338]}, {"w": "using", "b": [0.745, 0.5188, 0.7865, 0.5338]}, {"w": "Boruta", "b": [0.7926, 0.5188, 0.8478, 0.5338]}, {"w": "in", "b": [0.854, 0.5188, 0.8691, 0.5338]}, {"w": "production:", "b": [0.1312, 0.5368, 0.2222, 0.5517]}, {"w": "Boruta", "b": [0.2304, 0.5368, 0.2855, 0.5517]}, {"w": "is", "b": [0.2916, 0.5368, 0.3037, 0.5517]}, {"w": "a", "b": [0.3098, 0.5368, 0.3189, 0.5517]}, {"w": "heuristic.", "b": [0.325, 0.5368, 0.3975, 0.5517]}, {"w": "There", "b": [0.4057, 0.5368, 0.452, 0.5517]}, {"w": "are", "b": [0.4581, 0.5368, 0.4822, 0.5517]}, {"w": "no", "b": [0.4883, 0.5368, 0.5074, 0.5517]}, {"w": "theoretical", "b": [0.5135, 0.5368, 0.597, 0.5517]}, {"w": "guarantees", "b": [0.6031, 0.5368, 0.6871, 0.5517]}, {"w": "for", "b": [0.6932, 0.5368, 0.7149, 0.5517]}, {"w": "its", "b": [0.721, 0.5368, 0.7402, 0.5517]}, {"w": "performance.", "b": [0.7463, 0.5368, 0.8489, 0.5517]}, {"w": "If", "b": [0.8571, 0.5368, 0.8691, 0.5517]}, {"w": "you", "b": [0.1308, 0.5547, 0.159, 0.5697]}, {"w": "want", "b": [0.1651, 0.5547, 0.2034, 0.5697]}, {"w": "to", "b": [0.2095, 0.5547, 0.2256, 0.5697]}, {"w": "be", "b": [0.2318, 0.5547, 0.2504, 0.5697]}, {"w": "sure", "b": [0.2566, 0.5547, 0.289, 0.5697]}, {"w": "that", "b": [0.2952, 0.5547, 0.3284, 0.5697]}, {"w": "Boruta", "b": [0.3346, 0.5547, 0.3898, 0.5697]}, {"w": "doesn’t", "b": [0.3959, 0.5547, 0.453, 0.5697]}, {"w": "harm,", "b": [0.4591, 0.5547, 0.5055, 0.5697]}, {"w": "run", "b": [0.5117, 0.5547, 0.539, 0.5697]}, {"w": "it", "b": [0.5451, 0.5547, 0.5572, 0.5697]}, {"w": "multiple", "b": [0.5633, 0.5547, 0.6283, 0.5697]}, {"w": "times", "b": [0.6345, 0.5547, 0.6769, 0.5697]}, {"w": "and", "b": [0.6831, 0.5547, 0.7123, 0.5697]}, {"w": "make", "b": [0.7184, 0.5547, 0.7598, 0.5697]}, {"w": "sure", "b": [0.7659, 0.5547, 0.7983, 0.5697]}, {"w": "that", "b": [0.8045, 0.5547, 0.8377, 0.5697]}, {"w": "the", "b": [0.8438, 0.5547, 0.8691, 0.5697]}, {"w": "feature", "b": [0.1312, 0.5727, 0.1872, 0.5876]}, {"w": "selection", "b": [0.1933, 0.5727, 0.2621, 0.5876]}, {"w": "is", "b": [0.2683, 0.5727, 0.2807, 0.5876]}, {"w": "stable", "b": [0.2868, 0.5727, 0.3341, 0.5876]}, {"w": "(i.e.,", "b": [0.3402, 0.5727, 0.3761, 0.5876]}, {"w": "consistent", "b": [0.3823, 0.5727, 0.462, 0.5876]}, {"w": "across", "b": [0.4681, 0.5727, 0.5166, 0.5876]}, {"w": "multiple", "b": [0.5227, 0.5727, 0.5888, 0.5876]}, {"w": "Boruta", "b": [0.595, 0.5727, 0.6512, 0.5876]}, {"w": "applications", "b": [0.6573, 0.5727, 0.7538, 0.5876]}, {"w": "to", "b": [0.7599, 0.5727, 0.7763, 0.5876]}, {"w": "your", "b": [0.7825, 0.5727, 0.8184, 0.5876]}, {"w": "data).", "b": [0.8245, 0.5727, 0.8727, 0.5876]}, {"w": "If", "b": [0.1312, 0.5906, 0.1433, 0.6056]}, {"w": "the", "b": [0.1492, 0.5906, 0.1744, 0.6056]}, {"w": "feature", "b": [0.1803, 0.5906, 0.2352, 0.6056]}, {"w": "selection", "b": [0.2411, 0.5906, 0.3086, 0.6056]}, {"w": "is", "b": [0.3145, 0.5906, 0.3267, 0.6056]}, {"w": "not", "b": [0.3327, 0.5906, 0.3588, 0.6056]}, {"w": "stable,", "b": [0.3647, 0.5906, 0.4161, 0.6056]}, {"w": "make", "b": [0.4221, 0.5906, 0.4633, 0.6056]}, {"w": "sure", "b": [0.4692, 0.5906, 0.5016, 0.6056]}, {"w": "that", "b": [0.5075, 0.5906, 0.5407, 0.6056]}, {"w": "the", "b": [0.5466, 0.5906, 0.5718, 0.6056]}, {"w": "number", "b": [0.5777, 0.5906, 0.6376, 0.6056]}, {"w": "of", "b": [0.6435, 0.5906, 0.6581, 0.6056]}, {"w": "trees", "b": [0.6641, 0.5906, 0.7014, 0.6056]}, {"w": "in", "b": [0.7074, 0.5906, 0.7224, 0.6056]}, {"w": "the", "b": [0.7284, 0.5906, 0.7535, 0.6056]}, {"w": "random", "b": [0.7595, 0.5906, 0.8198, 0.6056]}, {"w": "forest", "b": [0.8258, 0.5906, 0.8697, 0.6056]}, {"w": "is", "b": [0.1312, 0.6086, 0.1436, 0.6235]}, {"w": "large", "b": [0.1498, 0.6086, 0.1888, 0.6235]}, {"w": "enough", "b": [0.195, 0.6086, 0.2524, 0.6235]}, {"w": "to", "b": [0.2586, 0.6086, 0.275, 0.6235]}, {"w": "generate", "b": [0.2811, 0.6086, 0.3488, 0.6235]}, {"w": "stable", "b": [0.355, 0.6086, 0.4023, 0.6235]}, {"w": "results.", "b": [0.4084, 0.6086, 0.4661, 0.6235]}]}, {"id": "b_16", "type": "paragraph", "text": "Though Boruta is an effective method of feature selection, it’s not the only one used by practitioners. You will find the description of several other methods in the book’s companion wiki in an extended version of this chapter.", "words": [{"w": "Though", "b": [0.1306, 0.6355, 0.1944, 0.6504]}, {"w": "Boruta", "b": [0.2017, 0.6355, 0.259, 0.6504]}, {"w": "is", "b": [0.2664, 0.6355, 0.2791, 0.6504]}, {"w": "an", "b": [0.2864, 0.6355, 0.3063, 0.6504]}, {"w": "effective", "b": [0.3137, 0.6355, 0.3801, 0.6504]}, {"w": "method", "b": [0.3875, 0.6355, 0.4497, 0.6504]}, {"w": "of", "b": [0.457, 0.6355, 0.4722, 0.6504]}, {"w": "feature", "b": [0.4796, 0.6355, 0.5366, 0.6504]}, {"w": "selection,", "b": [0.544, 0.6355, 0.6195, 0.6504]}, {"w": "it’s", "b": [0.6271, 0.6355, 0.6523, 0.6504]}, {"w": "not", "b": [0.6597, 0.6355, 0.6869, 0.6504]}, {"w": "the", "b": [0.6943, 0.6355, 0.7204, 0.6504]}, {"w": "only", "b": [0.7278, 0.6355, 0.7628, 0.6504]}, {"w": "one", "b": [0.7702, 0.6355, 0.7984, 0.6504]}, {"w": "used", "b": [0.8058, 0.6355, 0.8425, 0.6504]}, {"w": "by", "b": [0.8499, 0.6355, 0.8698, 0.6504]}, {"w": "practitioners.", "b": [0.1312, 0.6534, 0.236, 0.6684]}, {"w": "You", "b": [0.2441, 0.6534, 0.2752, 0.6684]}, {"w": "will", "b": [0.2811, 0.6534, 0.3093, 0.6684]}, {"w": "find", "b": [0.3152, 0.6534, 0.3454, 0.6684]}, {"w": "the", "b": [0.3513, 0.6534, 0.3764, 0.6684]}, {"w": "description", "b": [0.3824, 0.6534, 0.469, 0.6684]}, {"w": "of", "b": [0.4749, 0.6534, 0.4895, 0.6684]}, {"w": "several", "b": [0.4954, 0.6534, 0.5488, 0.6684]}, {"w": "other", "b": [0.5548, 0.6534, 0.596, 0.6684]}, {"w": "methods", "b": [0.602, 0.6534, 0.6689, 0.6684]}, {"w": "in", "b": [0.6748, 0.6534, 0.6899, 0.6684]}, {"w": "the", "b": [0.6958, 0.6534, 0.721, 0.6684]}, {"w": "book’s", "b": [0.7269, 0.6534, 0.7778, 0.6684]}, {"w": "companion", "b": [0.7837, 0.6534, 0.8691, 0.6684]}, {"w": "wiki", "b": [0.1306, 0.6714, 0.1639, 0.6863]}, {"w": "in", "b": [0.17, 0.6714, 0.1854, 0.6863]}, {"w": "an", "b": [0.1916, 0.6714, 0.2111, 0.6863]}, {"w": "extended", "b": [0.2172, 0.6714, 0.2895, 0.6863]}, {"w": "version", "b": [0.2957, 0.6714, 0.3522, 0.6863]}, {"w": "of", "b": [0.3584, 0.6714, 0.3733, 0.6863]}, {"w": "this", "b": [0.3794, 0.6714, 0.4093, 0.6863]}, {"w": "chapter.", "b": [0.4154, 0.6714, 0.4806, 0.6863]}]}, {"id": "b_17", "type": "equation", "text": "4.5.3 L1-Regularization", "words": [{"w": "4.5.3", "b": [0.1312, 0.7195, 0.1749, 0.7345]}, {"w": "L1-Regularization", "b": [0.1961, 0.7195, 0.3617, 0.7345]}]}, {"id": "b_18", "type": "paragraph", "text": "Regularization is an umbrella term for a range of techniques that improve the general- ization of the model. Generalization, in turn, is the model’s ability to correctly predict the label for unseen examples.", "words": [{"w": "Regularization", "b": [0.1312, 0.7561, 0.2664, 0.7711]}, {"w": "is", "b": [0.2727, 0.7558, 0.2854, 0.7708]}, {"w": "an", "b": [0.2917, 0.7558, 0.3115, 0.7708]}, {"w": "umbrella", "b": [0.3178, 0.7558, 0.3895, 0.7708]}, {"w": "term", "b": [0.3958, 0.7558, 0.4345, 0.7708]}, {"w": "for", "b": [0.4408, 0.7558, 0.4633, 0.7708]}, {"w": "a", "b": [0.4696, 0.7558, 0.479, 0.7708]}, {"w": "range", "b": [0.4853, 0.7558, 0.5303, 0.7708]}, {"w": "of", "b": [0.5366, 0.7558, 0.5518, 0.7708]}, {"w": "techniques", "b": [0.558, 0.7558, 0.6439, 0.7708]}, {"w": "that", "b": [0.6502, 0.7558, 0.6847, 0.7708]}, {"w": "improve", "b": [0.691, 0.7558, 0.7564, 0.7708]}, {"w": "the", "b": [0.7627, 0.7558, 0.7889, 0.7708]}, {"w": "general-", "b": [0.7949, 0.7561, 0.8688, 0.7711]}, {"w": "ization", "b": [0.1312, 0.7741, 0.1934, 0.789]}, {"w": "of", "b": [0.1996, 0.7737, 0.2144, 0.7887]}, {"w": "the", "b": [0.2205, 0.7737, 0.246, 0.7887]}, {"w": "model.", "b": [0.2521, 0.7737, 0.3056, 0.7887]}, {"w": "Generalization,", "b": [0.3138, 0.7737, 0.4353, 0.7887]}, {"w": "in", "b": [0.4415, 0.7737, 0.4568, 0.7887]}, {"w": "turn,", "b": [0.4629, 0.7737, 0.5027, 0.7887]}, {"w": "is", "b": [0.5088, 0.7737, 0.5212, 0.7887]}, {"w": "the", "b": [0.5273, 0.7737, 0.5528, 0.7887]}, {"w": "model’s", "b": [0.5589, 0.7737, 0.6197, 0.7887]}, {"w": "ability", "b": [0.6258, 0.7737, 0.6767, 0.7887]}, {"w": "to", "b": [0.6829, 0.7737, 0.6992, 0.7887]}, {"w": "correctly", "b": [0.7053, 0.7737, 0.7752, 0.7887]}, {"w": "predict", "b": [0.7814, 0.7737, 0.8375, 0.7887]}, {"w": "the", "b": [0.8436, 0.7737, 0.8691, 0.7887]}, {"w": "label", "b": [0.1312, 0.7917, 0.1697, 0.8066]}, {"w": "for", "b": [0.1758, 0.7917, 0.1979, 0.8066]}, {"w": "unseen", "b": [0.2041, 0.7917, 0.2586, 0.8066]}, {"w": "examples.", "b": [0.2647, 0.7917, 0.3433, 0.8066]}]}, {"id": "b_19", "type": "paragraph", "text": "While regularization doesn’t let you identify important features, some regularization tech-", "words": [{"w": "While", "b": [0.1303, 0.8186, 0.1789, 0.8336]}, {"w": "regularization", "b": [0.1851, 0.8186, 0.2982, 0.8336]}, {"w": "doesn’t", "b": [0.3044, 0.8186, 0.3636, 0.8336]}, {"w": "let", "b": [0.3698, 0.8186, 0.3907, 0.8336]}, {"w": "you", "b": [0.3969, 0.8186, 0.4262, 0.8336]}, {"w": "identify", "b": [0.4324, 0.8186, 0.4946, 0.8336]}, {"w": "important", "b": [0.5008, 0.8186, 0.5835, 0.8336]}, {"w": "features,", "b": [0.5897, 0.8186, 0.6594, 0.8336]}, {"w": "some", "b": [0.6656, 0.8186, 0.7065, 0.8336]}, {"w": "regularization", "b": [0.7127, 0.8186, 0.8257, 0.8336]}, {"w": "tech-", "b": [0.8319, 0.8186, 0.8722, 0.8336]}]}, {"id": "b_20", "type": "paragraph", "text": "niques, such as L1, allow the machine learning algorithm to learn to ignore some features.", "words": [{"w": "niques,", "b": [0.1312, 0.8366, 0.1872, 0.8515]}, {"w": "such", "b": [0.1934, 0.8366, 0.2289, 0.8515]}, {"w": "as", "b": [0.235, 0.8366, 0.2515, 0.8515]}, {"w": "L1,", "b": [0.2577, 0.8366, 0.2836, 0.8515]}, {"w": "allow", "b": [0.2897, 0.8366, 0.3312, 0.8515]}, {"w": "the", "b": [0.3374, 0.8366, 0.363, 0.8515]}, {"w": "machine", "b": [0.3692, 0.8366, 0.4353, 0.8515]}, {"w": "learning", "b": [0.4415, 0.8366, 0.5061, 0.8515]}, {"w": "algorithm", "b": [0.5123, 0.8366, 0.5903, 0.8515]}, {"w": "to", "b": [0.5964, 0.8366, 0.6128, 0.8515]}, {"w": "learn", "b": [0.619, 0.8366, 0.659, 0.8515]}, {"w": "to", "b": [0.6652, 0.8366, 0.6816, 0.8515]}, {"w": "ignore", "b": [0.6877, 0.8366, 0.737, 0.8515]}, {"w": "some", "b": [0.7431, 0.8366, 0.7832, 0.8515]}, {"w": "features.", "b": [0.7894, 0.8366, 0.8577, 0.8515]}]}, {"id": "b_21", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 26", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "26", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 116, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Depending on the kind of model you train, L1 may apply differently, but the main principle remains the same: L1 penalizes the model for being too complex.", "words": [{"w": "Depending", "b": [0.1312, 0.0881, 0.217, 0.1031]}, {"w": "on", "b": [0.2231, 0.0881, 0.2424, 0.1031]}, {"w": "the", "b": [0.2486, 0.0881, 0.274, 0.1031]}, {"w": "kind", "b": [0.2802, 0.0881, 0.3153, 0.1031]}, {"w": "of", "b": [0.3214, 0.0881, 0.3362, 0.1031]}, {"w": "model", "b": [0.3423, 0.0881, 0.3906, 0.1031]}, {"w": "you", "b": [0.3968, 0.0881, 0.4253, 0.1031]}, {"w": "train,", "b": [0.4314, 0.0881, 0.4752, 0.1031]}, {"w": "L1", "b": [0.4814, 0.0881, 0.502, 0.1031]}, {"w": "may", "b": [0.5081, 0.0881, 0.5416, 0.1031]}, {"w": "apply", "b": [0.5478, 0.0881, 0.5921, 0.1031]}, {"w": "differently,", "b": [0.5982, 0.0881, 0.6827, 0.1031]}, {"w": "but", "b": [0.6888, 0.0881, 0.7163, 0.1031]}, {"w": "the", "b": [0.7225, 0.0881, 0.7479, 0.1031]}, {"w": "main", "b": [0.754, 0.0881, 0.7937, 0.1031]}, {"w": "principle", "b": [0.7998, 0.0881, 0.8691, 0.1031]}, {"w": "remains", "b": [0.1312, 0.106, 0.1939, 0.121]}, {"w": "the", "b": [0.2001, 0.106, 0.2257, 0.121]}, {"w": "same:", "b": [0.2319, 0.106, 0.2771, 0.121]}, {"w": "L1", "b": [0.2853, 0.106, 0.3061, 0.121]}, {"w": "penalizes", "b": [0.3122, 0.106, 0.3846, 0.121]}, {"w": "the", "b": [0.3908, 0.106, 0.4164, 0.121]}, {"w": "model", "b": [0.4226, 0.106, 0.4713, 0.121]}, {"w": "for", "b": [0.4774, 0.106, 0.4995, 0.121]}, {"w": "being", "b": [0.5057, 0.106, 0.5493, 0.121]}, {"w": "too", "b": [0.5554, 0.106, 0.5815, 0.121]}, {"w": "complex.", "b": [0.5877, 0.106, 0.659, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "In practice, L1 regularization produces a sparse model, which is a model that has most of its parameters equal to zero. Therefore, L1 implicitly performs feature selection by deciding which features are essential for prediction, and which ones are not. We will talk about regularization in more detail in the next chapter.", "words": [{"w": "In", "b": [0.1312, 0.133, 0.148, 0.1479]}, {"w": "practice,", "b": [0.1542, 0.133, 0.2225, 0.1479]}, {"w": "L1", "b": [0.2286, 0.133, 0.2492, 0.1479]}, {"w": "regularization", "b": [0.2554, 0.133, 0.3655, 0.1479]}, {"w": "produces", "b": [0.3716, 0.133, 0.4425, 0.1479]}, {"w": "a", "b": [0.4487, 0.133, 0.4578, 0.1479]}, {"w": "sparse", "b": [0.464, 0.1333, 0.5213, 0.1482]}, {"w": "model,", "b": [0.5284, 0.133, 0.5898, 0.1482]}, {"w": "which", "b": [0.5959, 0.133, 0.6423, 0.1479]}, {"w": "is", "b": [0.6484, 0.133, 0.6607, 0.1479]}, {"w": "a", "b": [0.6669, 0.133, 0.676, 0.1479]}, {"w": "model", "b": [0.6822, 0.133, 0.7305, 0.1479]}, {"w": "that", "b": [0.7367, 0.133, 0.7703, 0.1479]}, {"w": "has", "b": [0.7764, 0.133, 0.803, 0.1479]}, {"w": "most", "b": [0.8092, 0.133, 0.848, 0.1479]}, {"w": "of", "b": [0.8541, 0.133, 0.8689, 0.1479]}, {"w": "its", "b": [0.1312, 0.1509, 0.1507, 0.1659]}, {"w": "parameters", "b": [0.1568, 0.1509, 0.2455, 0.1659]}, {"w": "equal", "b": [0.2516, 0.1509, 0.2938, 0.1659]}, {"w": "to", "b": [0.3, 0.1509, 0.3162, 0.1659]}, {"w": "zero.", "b": [0.3224, 0.1509, 0.3601, 0.1659]}, {"w": "Therefore,", "b": [0.3683, 0.1509, 0.4502, 0.1659]}, {"w": "L1", "b": [0.4564, 0.1509, 0.477, 0.1659]}, {"w": "implicitly", "b": [0.4831, 0.1509, 0.5589, 0.1659]}, {"w": "performs", "b": [0.565, 0.1509, 0.6354, 0.1659]}, {"w": "feature", "b": [0.6415, 0.1509, 0.697, 0.1659]}, {"w": "selection", "b": [0.7032, 0.1509, 0.7714, 0.1659]}, {"w": "by", "b": [0.7776, 0.1509, 0.7969, 0.1659]}, {"w": "deciding", "b": [0.803, 0.1509, 0.8692, 0.1659]}, {"w": "which", "b": [0.1306, 0.1689, 0.1782, 0.1838]}, {"w": "features", "b": [0.1861, 0.1689, 0.2506, 0.1838]}, {"w": "are", "b": [0.2585, 0.1689, 0.2836, 0.1838]}, {"w": "essential", "b": [0.2915, 0.1689, 0.3603, 0.1838]}, {"w": "for", "b": [0.3681, 0.1689, 0.3907, 0.1838]}, {"w": "prediction,", "b": [0.3986, 0.1689, 0.4865, 0.1838]}, {"w": "and", "b": [0.4948, 0.1689, 0.5252, 0.1838]}, {"w": "which", "b": [0.5331, 0.1689, 0.5807, 0.1838]}, {"w": "ones", "b": [0.5885, 0.1689, 0.6242, 0.1838]}, {"w": "are", "b": [0.6321, 0.1689, 0.6573, 0.1838]}, {"w": "not.", "b": [0.6652, 0.1689, 0.6976, 0.1838]}, {"w": "We", "b": [0.711, 0.1689, 0.7372, 0.1838]}, {"w": "will", "b": [0.7451, 0.1689, 0.7744, 0.1838]}, {"w": "talk", "b": [0.7823, 0.1689, 0.8142, 0.1838]}, {"w": "about", "b": [0.822, 0.1689, 0.8696, 0.1838]}, {"w": "regularization", "b": [0.1312, 0.1868, 0.2421, 0.2018]}, {"w": "in", "b": [0.2482, 0.1868, 0.2636, 0.2018]}, {"w": "more", "b": [0.2698, 0.1868, 0.3098, 0.2018]}, {"w": "detail", "b": [0.316, 0.1868, 0.3611, 0.2018]}, {"w": "in", "b": [0.3672, 0.1868, 0.3826, 0.2018]}, {"w": "the", "b": [0.3888, 0.1868, 0.4144, 0.2018]}, {"w": "next", "b": [0.4206, 0.1868, 0.4559, 0.2018]}, {"w": "chapter.", "b": [0.4621, 0.1868, 0.5273, 0.2018]}]}, {"id": "b_2", "type": "equation", "text": "4.5.4 Task-Specific Feature Selection", "words": [{"w": "4.5.4", "b": [0.1312, 0.235, 0.1749, 0.2499]}, {"w": "Task-Specific", "b": [0.1961, 0.235, 0.3165, 0.2499]}, {"w": "Feature", "b": [0.3235, 0.235, 0.3937, 0.2499]}, {"w": "Selection", "b": [0.4007, 0.235, 0.4839, 0.2499]}]}, {"id": "b_3", "type": "paragraph", "text": "Feature selection can also be task-specific. For example, we can remove some features from bag-of-words vectors representing natural language texts by excluding the dimensions corresponding to stop words. Stop words are the words that are too generic or common for the problem we are trying to solve. Frequent examples of stop words are articles, prepositions, and pronouns. Dictionaries of stop words for most languages are available online.", "words": [{"w": "Feature", "b": [0.1312, 0.2712, 0.1933, 0.2862]}, {"w": "selection", "b": [0.2017, 0.2712, 0.2719, 0.2862]}, {"w": "can", "b": [0.2803, 0.2712, 0.3086, 0.2862]}, {"w": "also", "b": [0.317, 0.2712, 0.3485, 0.2862]}, {"w": "be", "b": [0.3569, 0.2712, 0.3763, 0.2862]}, {"w": "task-specific.", "b": [0.3847, 0.2712, 0.4895, 0.2862]}, {"w": "For", "b": [0.5046, 0.2712, 0.5321, 0.2862]}, {"w": "example,", "b": [0.5405, 0.2712, 0.6132, 0.2862]}, {"w": "we", "b": [0.6222, 0.2712, 0.6437, 0.2862]}, {"w": "can", "b": [0.6521, 0.2712, 0.6803, 0.2862]}, {"w": "remove", "b": [0.6888, 0.2712, 0.7469, 0.2862]}, {"w": "some", "b": [0.7553, 0.2712, 0.7962, 0.2862]}, {"w": "features", "b": [0.8046, 0.2712, 0.8691, 0.2862]}, {"w": "from", "b": [0.1312, 0.2892, 0.1689, 0.3041]}, {"w": "bag-of-words", "b": [0.175, 0.2892, 0.2781, 0.3041]}, {"w": "vectors", "b": [0.2843, 0.2892, 0.341, 0.3041]}, {"w": "representing", "b": [0.3472, 0.2892, 0.4458, 0.3041]}, {"w": "natural", "b": [0.4519, 0.2892, 0.5106, 0.3041]}, {"w": "language", "b": [0.5168, 0.2892, 0.5878, 0.3041]}, {"w": "texts", "b": [0.594, 0.2892, 0.6337, 0.3041]}, {"w": "by", "b": [0.6399, 0.2892, 0.6594, 0.3041]}, {"w": "excluding", "b": [0.6656, 0.2892, 0.7423, 0.3041]}, {"w": "the", "b": [0.7485, 0.2892, 0.7742, 0.3041]}, {"w": "dimensions", "b": [0.7804, 0.2892, 0.8691, 0.3041]}, {"w": "corresponding", "b": [0.1312, 0.3071, 0.2415, 0.3221]}, {"w": "to", "b": [0.2476, 0.3071, 0.2636, 0.3221]}, {"w": "stop", "b": [0.2696, 0.3074, 0.3086, 0.3224]}, {"w": "words.", "b": [0.3156, 0.3071, 0.3749, 0.3224]}, {"w": "Stop", "b": [0.3831, 0.3071, 0.4192, 0.3221]}, {"w": "words", "b": [0.4253, 0.3071, 0.4712, 0.3221]}, {"w": "are", "b": [0.4772, 0.3071, 0.5014, 0.3221]}, {"w": "the", "b": [0.5074, 0.3071, 0.5326, 0.3221]}, {"w": "words", "b": [0.5386, 0.3071, 0.5845, 0.3221]}, {"w": "that", "b": [0.5906, 0.3071, 0.6237, 0.3221]}, {"w": "are", "b": [0.6298, 0.3071, 0.6539, 0.3221]}, {"w": "too", "b": [0.66, 0.3071, 0.6856, 0.3221]}, {"w": "generic", "b": [0.6917, 0.3071, 0.747, 0.3221]}, {"w": "or", "b": [0.7531, 0.3071, 0.7692, 0.3221]}, {"w": "common", "b": [0.7753, 0.3071, 0.8416, 0.3221]}, {"w": "for", "b": [0.8477, 0.3071, 0.8693, 0.3221]}, {"w": "the", "b": [0.1312, 0.3251, 0.1564, 0.34]}, {"w": "problem", "b": [0.1617, 0.3251, 0.2261, 0.34]}, {"w": "we", "b": [0.2315, 0.3251, 0.252, 0.34]}, {"w": "are", "b": [0.2574, 0.3251, 0.2816, 0.34]}, {"w": "trying", "b": [0.287, 0.3251, 0.3347, 0.34]}, {"w": "to", "b": [0.3401, 0.3251, 0.3562, 0.34]}, {"w": "solve.", "b": [0.3615, 0.3251, 0.4049, 0.34]}, {"w": "Frequent", "b": [0.4128, 0.3251, 0.4824, 0.34]}, {"w": "examples", "b": [0.4878, 0.3251, 0.5597, 0.34]}, {"w": "of", "b": [0.5651, 0.3251, 0.5797, 0.34]}, {"w": "stop", "b": [0.585, 0.3251, 0.6183, 0.34]}, {"w": "words", "b": [0.6237, 0.3251, 0.6695, 0.34]}, {"w": "are", "b": [0.6749, 0.3251, 0.6991, 0.34]}, {"w": "articles,", "b": [0.7044, 0.3251, 0.7659, 0.34]}, {"w": "prepositions,", "b": [0.7714, 0.3251, 0.8717, 0.34]}, {"w": "and", "b": [0.1312, 0.343, 0.161, 0.358]}, {"w": "pronouns.", "b": [0.1671, 0.343, 0.2462, 0.358]}, {"w": "Dictionaries", "b": [0.2544, 0.343, 0.3507, 0.358]}, {"w": "of", "b": [0.3569, 0.343, 0.3718, 0.358]}, {"w": "stop", "b": [0.3779, 0.343, 0.4119, 0.358]}, {"w": "words", "b": [0.418, 0.343, 0.4648, 0.358]}, {"w": "for", "b": [0.471, 0.343, 0.4931, 0.358]}, {"w": "most", "b": [0.4992, 0.343, 0.5383, 0.358]}, {"w": "languages", "b": [0.5444, 0.343, 0.6225, 0.358]}, {"w": "are", "b": [0.6286, 0.343, 0.6533, 0.358]}, {"w": "available", "b": [0.6594, 0.343, 0.7292, 0.358]}, {"w": "online.", "b": [0.7353, 0.343, 0.7886, 0.358]}]}, {"id": "b_4", "type": "paragraph", "text": "To further reduce the feature vector dimensionality obtained from the text data, sometimes it’s practical to preprocess the text by replacing infrequent words (e.g., those whose count in the corpus is below three) with the same synthetic token, for example RARE_WORD.", "words": [{"w": "To", "b": [0.1306, 0.3699, 0.1515, 0.3849]}, {"w": "further", "b": [0.1577, 0.3699, 0.2135, 0.3849]}, {"w": "reduce", "b": [0.2197, 0.3699, 0.2719, 0.3849]}, {"w": "the", "b": [0.278, 0.3699, 0.3036, 0.3849]}, {"w": "feature", "b": [0.3098, 0.3699, 0.3655, 0.3849]}, {"w": "vector", "b": [0.3717, 0.3699, 0.4208, 0.3849]}, {"w": "dimensionality", "b": [0.427, 0.3699, 0.5436, 0.3849]}, {"w": "obtained", "b": [0.5498, 0.3699, 0.6193, 0.3849]}, {"w": "from", "b": [0.6255, 0.3699, 0.6628, 0.3849]}, {"w": "the", "b": [0.669, 0.3699, 0.6945, 0.3849]}, {"w": "text", "b": [0.7007, 0.3699, 0.7329, 0.3849]}, {"w": "data,", "b": [0.7391, 0.3699, 0.7799, 0.3849]}, {"w": "sometimes", "b": [0.7861, 0.3699, 0.8691, 0.3849]}, {"w": "it’s", "b": [0.1312, 0.3879, 0.1555, 0.4028]}, {"w": "practical", "b": [0.1617, 0.3879, 0.2302, 0.4028]}, {"w": "to", "b": [0.2363, 0.3879, 0.2524, 0.4028]}, {"w": "preprocess", "b": [0.2586, 0.3879, 0.341, 0.4028]}, {"w": "the", "b": [0.3471, 0.3879, 0.3723, 0.4028]}, {"w": "text", "b": [0.3784, 0.3879, 0.4102, 0.4028]}, {"w": "by", "b": [0.4163, 0.3879, 0.4354, 0.4028]}, {"w": "replacing", "b": [0.4416, 0.3879, 0.5131, 0.4028]}, {"w": "infrequent", "b": [0.5192, 0.3879, 0.5994, 0.4028]}, {"w": "words", "b": [0.6055, 0.3879, 0.6515, 0.4028]}, {"w": "(e.g.,", "b": [0.6576, 0.3879, 0.6969, 0.4028]}, {"w": "those", "b": [0.703, 0.3879, 0.7444, 0.4028]}, {"w": "whose", "b": [0.7506, 0.3879, 0.798, 0.4028]}, {"w": "count", "b": [0.8041, 0.3879, 0.8479, 0.4028]}, {"w": "in", "b": [0.8541, 0.3879, 0.8692, 0.4028]}, {"w": "the", "b": [0.1312, 0.4058, 0.1569, 0.4208]}, {"w": "corpus", "b": [0.163, 0.4058, 0.2155, 0.4208]}, {"w": "is", "b": [0.2216, 0.4058, 0.2341, 0.4208]}, {"w": "below", "b": [0.2402, 0.4058, 0.2864, 0.4208]}, {"w": "three)", "b": [0.2925, 0.4058, 0.3408, 0.4208]}, {"w": "with", "b": [0.3469, 0.4058, 0.3828, 0.4208]}, {"w": "the", "b": [0.3889, 0.4058, 0.4146, 0.4208]}, {"w": "same", "b": [0.4207, 0.4058, 0.4608, 0.4208]}, {"w": "synthetic", "b": [0.467, 0.4058, 0.5399, 0.4208]}, {"w": "token,", "b": [0.546, 0.4058, 0.5953, 0.4208]}, {"w": "for", "b": [0.6014, 0.4058, 0.6235, 0.4208]}, {"w": "example", "b": [0.6297, 0.4058, 0.6958, 0.4208]}, {"w": "RARE_WORD.", "b": [0.702, 0.4058, 0.835, 0.4208]}]}, {"id": "b_5", "type": "paragraph", "text": "4.6 Synthesizing Features", "words": [{"w": "4.6", "b": [0.1312, 0.4547, 0.1631, 0.4726]}, {"w": "Synthesizing", "b": [0.188, 0.4547, 0.3241, 0.4726]}, {"w": "Features", "b": [0.3324, 0.4547, 0.4243, 0.4726]}]}, {"id": "b_6", "type": "paragraph", "text": "The learning algorithms implemented in the most popular machine learning package for Python, scikit-learn, only work with numerical features. But it can still be useful to convert numerical features into categorical ones.", "words": [{"w": "The", "b": [0.1306, 0.4933, 0.163, 0.5082]}, {"w": "learning", "b": [0.1705, 0.4933, 0.2365, 0.5082]}, {"w": "algorithms", "b": [0.244, 0.4933, 0.3309, 0.5082]}, {"w": "implemented", "b": [0.3384, 0.4933, 0.4436, 0.5082]}, {"w": "in", "b": [0.4511, 0.4933, 0.4668, 0.5082]}, {"w": "the", "b": [0.4742, 0.4933, 0.5004, 0.5082]}, {"w": "most", "b": [0.5079, 0.4933, 0.5478, 0.5082]}, {"w": "popular", "b": [0.5553, 0.4933, 0.6186, 0.5082]}, {"w": "machine", "b": [0.6261, 0.4933, 0.6936, 0.5082]}, {"w": "learning", "b": [0.7011, 0.4933, 0.767, 0.5082]}, {"w": "package", "b": [0.7745, 0.4933, 0.8394, 0.5082]}, {"w": "for", "b": [0.8469, 0.4933, 0.8694, 0.5082]}, {"w": "Python,", "b": [0.1312, 0.5112, 0.1943, 0.5262]}, {"w": "scikit-learn,", "b": [0.1999, 0.5112, 0.3076, 0.5265]}, {"w": "only", "b": [0.3132, 0.5112, 0.3469, 0.5262]}, {"w": "work", "b": [0.3524, 0.5112, 0.3906, 0.5262]}, {"w": "with", "b": [0.3961, 0.5112, 0.4313, 0.5262]}, {"w": "numerical", "b": [0.4368, 0.5112, 0.5137, 0.5262]}, {"w": "features.", "b": [0.5192, 0.5112, 0.5862, 0.5262]}, {"w": "But", "b": [0.5942, 0.5112, 0.6241, 0.5262]}, {"w": "it", "b": [0.6296, 0.5112, 0.6417, 0.5262]}, {"w": "can", "b": [0.6472, 0.5112, 0.6743, 0.5262]}, {"w": "still", "b": [0.6799, 0.5112, 0.7091, 0.5262]}, {"w": "be", "b": [0.7146, 0.5112, 0.7332, 0.5262]}, {"w": "useful", "b": [0.7388, 0.5112, 0.7846, 0.5262]}, {"w": "to", "b": [0.7901, 0.5112, 0.8062, 0.5262]}, {"w": "convert", "b": [0.8117, 0.5112, 0.8695, 0.5262]}, {"w": "numerical", "b": [0.1312, 0.5291, 0.2097, 0.5441]}, {"w": "features", "b": [0.2159, 0.5291, 0.2791, 0.5441]}, {"w": "into", "b": [0.2853, 0.5291, 0.3166, 0.5441]}, {"w": "categorical", "b": [0.3227, 0.5291, 0.4089, 0.5441]}, {"w": "ones.", "b": [0.415, 0.5291, 0.4551, 0.5441]}]}, {"id": "b_7", "type": "paragraph", "text": "4.6.1 Feature Discretization", "words": [{"w": "4.6.1", "b": [0.1312, 0.5773, 0.1749, 0.5923]}, {"w": "Feature", "b": [0.1961, 0.5773, 0.2662, 0.5923]}, {"w": "Discretization", "b": [0.2733, 0.5773, 0.4022, 0.5923]}]}, {"id": "b_8", "type": "paragraph", "text": "The reasons to discretize a real-valued numerical feature can be numerous. For example, some feature selection techniques only apply to categorical features. A successful discretization adds useful information to the learning algorithm when the training dataset is relatively small. Numerous studies show that discretization can lead to improved predictive accuracy. It is also simpler for a human to interpret a model’s prediction if it is based on discrete groups of values, such as age groups or salary ranges.", "words": [{"w": "The", "b": [0.1306, 0.6136, 0.1617, 0.6285]}, {"w": "reasons", "b": [0.167, 0.6136, 0.2245, 0.6285]}, {"w": "to", "b": [0.2298, 0.6136, 0.2459, 0.6285]}, {"w": "discretize", "b": [0.2511, 0.6136, 0.3247, 0.6285]}, {"w": "a", "b": [0.3299, 0.6136, 0.339, 0.6285]}, {"w": "real-valued", "b": [0.3442, 0.6136, 0.4302, 0.6285]}, {"w": "numerical", "b": [0.4354, 0.6136, 0.5124, 0.6285]}, {"w": "feature", "b": [0.5176, 0.6136, 0.5725, 0.6285]}, {"w": "can", "b": [0.5777, 0.6136, 0.6049, 0.6285]}, {"w": "be", "b": [0.6101, 0.6136, 0.6287, 0.6285]}, {"w": "numerous.", "b": [0.634, 0.6136, 0.715, 0.6285]}, {"w": "For", "b": [0.7229, 0.6136, 0.7493, 0.6285]}, {"w": "example,", "b": [0.7546, 0.6136, 0.8244, 0.6285]}, {"w": "some", "b": [0.8299, 0.6136, 0.8691, 0.6285]}, {"w": "feature", "b": [0.1312, 0.6315, 0.1883, 0.6465]}, {"w": "selection", "b": [0.1947, 0.6315, 0.2649, 0.6465]}, {"w": "techniques", "b": [0.2713, 0.6315, 0.3572, 0.6465]}, {"w": "only", "b": [0.3636, 0.6315, 0.3986, 0.6465]}, {"w": "apply", "b": [0.405, 0.6315, 0.4505, 0.6465]}, {"w": "to", "b": [0.4569, 0.6315, 0.4737, 0.6465]}, {"w": "categorical", "b": [0.48, 0.6315, 0.5679, 0.6465]}, {"w": "features.", "b": [0.5743, 0.6315, 0.6441, 0.6465]}, {"w": "A", "b": [0.653, 0.6315, 0.6671, 0.6465]}, {"w": "successful", "b": [0.6735, 0.6315, 0.7528, 0.6465]}, {"w": "discretization", "b": [0.7592, 0.6315, 0.8692, 0.6465]}, {"w": "adds", "b": [0.1312, 0.6495, 0.1675, 0.6644]}, {"w": "useful", "b": [0.1728, 0.6495, 0.2187, 0.6644]}, {"w": "information", "b": [0.224, 0.6495, 0.316, 0.6644]}, {"w": "to", "b": [0.3213, 0.6495, 0.3373, 0.6644]}, {"w": "the", "b": [0.3426, 0.6495, 0.3678, 0.6644]}, {"w": "learning", "b": [0.3731, 0.6495, 0.4364, 0.6644]}, {"w": "algorithm", "b": [0.4417, 0.6495, 0.5181, 0.6644]}, {"w": "when", "b": [0.5234, 0.6495, 0.5646, 0.6644]}, {"w": "the", "b": [0.5699, 0.6495, 0.595, 0.6644]}, {"w": "training", "b": [0.6003, 0.6495, 0.6627, 0.6644]}, {"w": "dataset", "b": [0.668, 0.6495, 0.7254, 0.6644]}, {"w": "is", "b": [0.7307, 0.6495, 0.7429, 0.6644]}, {"w": "relatively", "b": [0.7482, 0.6495, 0.8211, 0.6644]}, {"w": "small.", "b": [0.8264, 0.6495, 0.8727, 0.6644]}, {"w": "Numerous", "b": [0.1312, 0.6674, 0.2145, 0.6824]}, {"w": "studies", "b": [0.2207, 0.6674, 0.2774, 0.6824]}, {"w": "show", "b": [0.2835, 0.6674, 0.3239, 0.6824]}, {"w": "that", "b": [0.3301, 0.6674, 0.3646, 0.6824]}, {"w": "discretization", "b": [0.3707, 0.6674, 0.4807, 0.6824]}, {"w": "can", "b": [0.4869, 0.6674, 0.5151, 0.6824]}, {"w": "lead", "b": [0.5213, 0.6674, 0.5548, 0.6824]}, {"w": "to", "b": [0.5609, 0.6674, 0.5776, 0.6824]}, {"w": "improved", "b": [0.5838, 0.6674, 0.6597, 0.6824]}, {"w": "predictive", "b": [0.6658, 0.6674, 0.7465, 0.6824]}, {"w": "accuracy.", "b": [0.7526, 0.6674, 0.828, 0.6824]}, {"w": "It", "b": [0.8362, 0.6674, 0.8503, 0.6824]}, {"w": "is", "b": [0.8565, 0.6674, 0.8691, 0.6824]}, {"w": "also", "b": [0.1312, 0.6854, 0.1616, 0.7003]}, {"w": "simpler", "b": [0.1677, 0.6854, 0.2254, 0.7003]}, {"w": "for", "b": [0.2315, 0.6854, 0.2532, 0.7003]}, {"w": "a", "b": [0.2594, 0.6854, 0.2685, 0.7003]}, {"w": "human", "b": [0.2746, 0.6854, 0.3285, 0.7003]}, {"w": "to", "b": [0.3347, 0.6854, 0.3508, 0.7003]}, {"w": "interpret", "b": [0.357, 0.6854, 0.4261, 0.7003]}, {"w": "a", "b": [0.4323, 0.6854, 0.4414, 0.7003]}, {"w": "model’s", "b": [0.4475, 0.6854, 0.5076, 0.7003]}, {"w": "prediction", "b": [0.5138, 0.6854, 0.5935, 0.7003]}, {"w": "if", "b": [0.5996, 0.6854, 0.6102, 0.7003]}, {"w": "it", "b": [0.6164, 0.6854, 0.6285, 0.7003]}, {"w": "is", "b": [0.6347, 0.6854, 0.6469, 0.7003]}, {"w": "based", "b": [0.653, 0.6854, 0.6975, 0.7003]}, {"w": "on", "b": [0.7036, 0.6854, 0.7228, 0.7003]}, {"w": "discrete", "b": [0.729, 0.6854, 0.7896, 0.7003]}, {"w": "groups", "b": [0.7958, 0.6854, 0.8484, 0.7003]}, {"w": "of", "b": [0.8545, 0.6854, 0.8691, 0.7003]}, {"w": "values,", "b": [0.1308, 0.7033, 0.1847, 0.7183]}, {"w": "such", "b": [0.1909, 0.7033, 0.2264, 0.7183]}, {"w": "as", "b": [0.2325, 0.7033, 0.249, 0.7183]}, {"w": "age", "b": [0.2552, 0.7033, 0.2818, 0.7183]}, {"w": "groups", "b": [0.288, 0.7033, 0.3414, 0.7183]}, {"w": "or", "b": [0.3476, 0.7033, 0.3641, 0.7183]}, {"w": "salary", "b": [0.3702, 0.7033, 0.418, 0.7183]}, {"w": "ranges.", "b": [0.4242, 0.7033, 0.4808, 0.7183]}]}, {"id": "b_9", "type": "paragraph", "text": "Binning, also known as bucketing, is a popular technique that allows transforming a numerical feature into a categorical one by replacing numerical values in a specific range by a constant categorical value.", "words": [{"w": "Binning,", "b": [0.1312, 0.7302, 0.2095, 0.7455]}, {"w": "also", "b": [0.2183, 0.7302, 0.2498, 0.7452]}, {"w": "known", "b": [0.258, 0.7302, 0.3114, 0.7452]}, {"w": "as", "b": [0.3197, 0.7302, 0.3365, 0.7452]}, {"w": "bucketing,", "b": [0.3447, 0.7302, 0.4394, 0.7455]}, {"w": "is", "b": [0.4482, 0.7302, 0.4609, 0.7452]}, {"w": "a", "b": [0.4691, 0.7302, 0.4785, 0.7452]}, {"w": "popular", "b": [0.4868, 0.7302, 0.5501, 0.7452]}, {"w": "technique", "b": [0.5584, 0.7302, 0.6369, 0.7452]}, {"w": "that", "b": [0.6451, 0.7302, 0.6796, 0.7452]}, {"w": "allows", "b": [0.6879, 0.7302, 0.7377, 0.7452]}, {"w": "transforming", "b": [0.746, 0.7302, 0.8513, 0.7452]}, {"w": "a", "b": [0.8595, 0.7302, 0.869, 0.7452]}, {"w": "numerical", "b": [0.1312, 0.7482, 0.2081, 0.7631]}, {"w": "feature", "b": [0.214, 0.7482, 0.2688, 0.7631]}, {"w": "into", "b": [0.2746, 0.7482, 0.3053, 0.7631]}, {"w": "a", "b": [0.3111, 0.7482, 0.3201, 0.7631]}, {"w": "categorical", "b": [0.3259, 0.7482, 0.4104, 0.7631]}, {"w": "one", "b": [0.4162, 0.7482, 0.4433, 0.7631]}, {"w": "by", "b": [0.4492, 0.7482, 0.4682, 0.7631]}, {"w": "replacing", "b": [0.4741, 0.7482, 0.5455, 0.7631]}, {"w": "numerical", "b": [0.5513, 0.7482, 0.6282, 0.7631]}, {"w": "values", "b": [0.634, 0.7482, 0.6818, 0.7631]}, {"w": "in", "b": [0.6877, 0.7482, 0.7027, 0.7631]}, {"w": "a", "b": [0.7085, 0.7482, 0.7176, 0.7631]}, {"w": "specific", "b": [0.7234, 0.7482, 0.7803, 0.7631]}, {"w": "range", "b": [0.7861, 0.7482, 0.8294, 0.7631]}, {"w": "by", "b": [0.8352, 0.7482, 0.8543, 0.7631]}, {"w": "a", "b": [0.8601, 0.7482, 0.8691, 0.7631]}, {"w": "constant", "b": [0.1312, 0.7661, 0.1995, 0.7811]}, {"w": "categorical", "b": [0.2057, 0.7661, 0.2919, 0.7811]}, {"w": "value.", "b": [0.298, 0.7661, 0.3447, 0.7811]}]}, {"id": "b_10", "type": "paragraph", "text": "There are three typical approaches to binning:", "words": [{"w": "There", "b": [0.1306, 0.793, 0.1778, 0.808]}, {"w": "are", "b": [0.1839, 0.793, 0.2086, 0.808]}, {"w": "three", "b": [0.2148, 0.793, 0.2558, 0.808]}, {"w": "typical", "b": [0.262, 0.793, 0.3164, 0.808]}, {"w": "approaches", "b": [0.3225, 0.793, 0.4114, 0.808]}, {"w": "to", "b": [0.4175, 0.793, 0.4339, 0.808]}, {"w": "binning:", "b": [0.4401, 0.793, 0.5057, 0.808]}]}, {"id": "b_11", "type": "equation", "text": "• uniform binning, • k-means-based binning, and • quantile-based binning.", "words": [{"w": "•", "b": [0.1538, 0.82, 0.1681, 0.8349]}, {"w": "uniform", "b": [0.1774, 0.82, 0.2405, 0.8349]}, {"w": "binning,", "b": [0.2466, 0.82, 0.3123, 0.8349]}, {"w": "•", "b": [0.1538, 0.8379, 0.1681, 0.8529]}, {"w": "k-means-based", "b": [0.1774, 0.8379, 0.2954, 0.8531]}, {"w": "binning,", "b": [0.3016, 0.8379, 0.3672, 0.8529]}, {"w": "and", "b": [0.3733, 0.8379, 0.4031, 0.8529]}, {"w": "•", "b": [0.1538, 0.8559, 0.1681, 0.8708]}, {"w": "quantile-based", "b": [0.1774, 0.8559, 0.2933, 0.8708]}, {"w": "binning.", "b": [0.2995, 0.8559, 0.3651, 0.8708]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 27", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "27", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 117, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "uniform: bins of the same width", "words": [{"w": "uniform:", "b": [0.3373, 0.0941, 0.4088, 0.1102]}, {"w": "bins", "b": [0.4143, 0.0941, 0.4506, 0.1102]}, {"w": "of", "b": [0.4561, 0.0941, 0.4726, 0.1102]}, {"w": "the", "b": [0.4781, 0.0941, 0.5056, 0.1102]}, {"w": "same", "b": [0.5111, 0.0941, 0.5595, 0.1102]}, {"w": "width", "b": [0.565, 0.0941, 0.6112, 0.1102]}]}, {"id": "b_1", "type": "equation", "text": "k-means: each bin is a cluster", "words": [{"w": "k-means:", "b": [0.3434, 0.2546, 0.4248, 0.2706]}, {"w": "each", "b": [0.4303, 0.2546, 0.4732, 0.2706]}, {"w": "bin", "b": [0.4787, 0.2546, 0.5051, 0.2706]}, {"w": "is", "b": [0.5106, 0.2546, 0.5249, 0.2706]}, {"w": "a", "b": [0.5304, 0.2546, 0.5414, 0.2706]}, {"w": "cluster", "b": [0.5469, 0.2546, 0.6052, 0.2706]}]}, {"id": "b_2", "type": "paragraph", "text": "quantile: each bin contains 4 examples", "words": [{"w": "quantile:", "b": [0.312, 0.3749, 0.3868, 0.391]}, {"w": "each", "b": [0.3923, 0.3749, 0.4352, 0.391]}, {"w": "bin", "b": [0.4407, 0.3749, 0.4671, 0.391]}, {"w": "contains", "b": [0.4726, 0.3749, 0.5463, 0.391]}, {"w": "4", "b": [0.5518, 0.3749, 0.5628, 0.391]}, {"w": "examples", "b": [0.5684, 0.3749, 0.653, 0.391]}]}, {"id": "b_3", "type": "paragraph", "text": "bin 1 bin 2 bin 3", "words": [{"w": "bin", "b": [0.2997, 0.2032, 0.3217, 0.2165]}, {"w": "1", "b": [0.3263, 0.2032, 0.3355, 0.2165]}, {"w": "bin", "b": [0.4564, 0.2032, 0.4784, 0.2165]}, {"w": "2", "b": [0.483, 0.2032, 0.4922, 0.2165]}, {"w": "bin", "b": [0.6016, 0.2032, 0.6236, 0.2165]}, {"w": "3", "b": [0.6282, 0.2032, 0.6373, 0.2165]}]}, {"id": "b_4", "type": "paragraph", "text": "bin 1 bin 2 bin 3", "words": [{"w": "bin", "b": [0.2156, 0.3248, 0.2376, 0.3382]}, {"w": "1", "b": [0.2422, 0.3248, 0.2514, 0.3382]}, {"w": "bin", "b": [0.4284, 0.3235, 0.4504, 0.3369]}, {"w": "2", "b": [0.455, 0.3235, 0.4641, 0.3369]}, {"w": "bin", "b": [0.6543, 0.3248, 0.6764, 0.3382]}, {"w": "3", "b": [0.6809, 0.3248, 0.6901, 0.3382]}]}, {"id": "b_5", "type": "paragraph", "text": "bin 1 bin 2 bin 3", "words": [{"w": "bin", "b": [0.2585, 0.4438, 0.2805, 0.4572]}, {"w": "1", "b": [0.2851, 0.4438, 0.2943, 0.4572]}, {"w": "bin", "b": [0.4036, 0.4438, 0.4256, 0.4572]}, {"w": "2", "b": [0.4302, 0.4438, 0.4394, 0.4572]}, {"w": "bin", "b": [0.6379, 0.4438, 0.6599, 0.4572]}, {"w": "3", "b": [0.6644, 0.4438, 0.6736, 0.4572]}]}, {"id": "b_6", "type": "paragraph", "text": "Figure 16: Three binning approaches: uniform, k-means-based, and quantile-based.", "words": [{"w": "Figure", "b": [0.1637, 0.4787, 0.2158, 0.4937]}, {"w": "16:", "b": [0.2219, 0.4787, 0.2455, 0.4937]}, {"w": "Three", "b": [0.2537, 0.4787, 0.3009, 0.4937]}, {"w": "binning", "b": [0.3071, 0.4787, 0.3676, 0.4937]}, {"w": "approaches:", "b": [0.3737, 0.4787, 0.4677, 0.4937]}, {"w": "uniform,", "b": [0.4759, 0.4787, 0.5442, 0.4937]}, {"w": "k-means-based,", "b": [0.5501, 0.4787, 0.6733, 0.4939]}, {"w": "and", "b": [0.6795, 0.4787, 0.7092, 0.4937]}, {"w": "quantile-based.", "b": [0.7153, 0.4787, 0.8365, 0.4937]}]}, {"id": "b_7", "type": "paragraph", "text": "In all three cases, you should decide how many bins you want to have. Consider an illustration in Figure 16. Here, we have a numerical feature j and 12 values of this feature, one for each of the 12 examples in our dataset. Let’s say we decided to have three bins. In uniform binning, all bins for a feature have identical widths, as illustrated in Figure 16 on the top.", "words": [{"w": "In", "b": [0.1312, 0.5289, 0.1478, 0.5439]}, {"w": "all", "b": [0.1528, 0.5289, 0.1719, 0.5439]}, {"w": "three", "b": [0.177, 0.5289, 0.2172, 0.5439]}, {"w": "cases,", "b": [0.2222, 0.5289, 0.2667, 0.5439]}, {"w": "you", "b": [0.2719, 0.5289, 0.3001, 0.5439]}, {"w": "should", "b": [0.3051, 0.5289, 0.3565, 0.5439]}, {"w": "decide", "b": [0.3615, 0.5289, 0.4107, 0.5439]}, {"w": "how", "b": [0.4158, 0.5289, 0.4474, 0.5439]}, {"w": "many", "b": [0.4524, 0.5289, 0.4956, 0.5439]}, {"w": "bins", "b": [0.5006, 0.5289, 0.5329, 0.5439]}, {"w": "you", "b": [0.5379, 0.5289, 0.5661, 0.5439]}, {"w": "want", "b": [0.5711, 0.5289, 0.6093, 0.5439]}, {"w": "to", "b": [0.6143, 0.5289, 0.6304, 0.5439]}, {"w": "have.", "b": [0.6354, 0.5289, 0.6761, 0.5439]}, {"w": "Consider", "b": [0.6839, 0.5289, 0.7534, 0.5439]}, {"w": "an", "b": [0.7584, 0.5289, 0.7775, 0.5439]}, {"w": "illustration", "b": [0.7825, 0.5289, 0.8691, 0.5439]}, {"w": "in", "b": [0.1312, 0.5469, 0.1463, 0.5619]}, {"w": "Figure", "b": [0.1516, 0.5469, 0.2027, 0.5619]}, {"w": "16.", "b": [0.2081, 0.5469, 0.2312, 0.5619]}, {"w": "Here,", "b": [0.2391, 0.5469, 0.2808, 0.5619]}, {"w": "we", "b": [0.2864, 0.5469, 0.3069, 0.5619]}, {"w": "have", "b": [0.3123, 0.5469, 0.3479, 0.5619]}, {"w": "a", "b": [0.3533, 0.5469, 0.3623, 0.5619]}, {"w": "numerical", "b": [0.3677, 0.5469, 0.4446, 0.5619]}, {"w": "feature", "b": [0.4499, 0.5469, 0.5048, 0.5619]}, {"w": "j", "b": [0.5099, 0.5472, 0.5175, 0.5621]}, {"w": "and", "b": [0.5239, 0.5469, 0.5531, 0.5619]}, {"w": "12", "b": [0.5584, 0.5469, 0.5765, 0.5619]}, {"w": "values", "b": [0.5818, 0.5469, 0.6296, 0.5619]}, {"w": "of", "b": [0.635, 0.5469, 0.6496, 0.5619]}, {"w": "this", "b": [0.6549, 0.5469, 0.6842, 0.5619]}, {"w": "feature,", "b": [0.6895, 0.5469, 0.7494, 0.5619]}, {"w": "one", "b": [0.7549, 0.5469, 0.782, 0.5619]}, {"w": "for", "b": [0.7873, 0.5469, 0.809, 0.5619]}, {"w": "each", "b": [0.8144, 0.5469, 0.849, 0.5619]}, {"w": "of", "b": [0.8544, 0.5469, 0.8689, 0.5619]}, {"w": "the", "b": [0.1312, 0.5648, 0.1565, 0.5798]}, {"w": "12", "b": [0.1626, 0.5648, 0.1808, 0.5798]}, {"w": "examples", "b": [0.187, 0.5648, 0.2593, 0.5798]}, {"w": "in", "b": [0.2655, 0.5648, 0.2806, 0.5798]}, {"w": "our", "b": [0.2868, 0.5648, 0.3131, 0.5798]}, {"w": "dataset.", "b": [0.3192, 0.5648, 0.382, 0.5798]}, {"w": "Let’s", "b": [0.3902, 0.5648, 0.4289, 0.5798]}, {"w": "say", "b": [0.4351, 0.5648, 0.4604, 0.5798]}, {"w": "we", "b": [0.4666, 0.5648, 0.4873, 0.5798]}, {"w": "decided", "b": [0.4934, 0.5648, 0.5531, 0.5798]}, {"w": "to", "b": [0.5592, 0.5648, 0.5754, 0.5798]}, {"w": "have", "b": [0.5815, 0.5648, 0.6174, 0.5798]}, {"w": "three", "b": [0.6235, 0.5648, 0.664, 0.5798]}, {"w": "bins.", "b": [0.6702, 0.5648, 0.7076, 0.5798]}, {"w": "In", "b": [0.7159, 0.5648, 0.7325, 0.5798]}, {"w": "uniform", "b": [0.7387, 0.5648, 0.8009, 0.5798]}, {"w": "binning,", "b": [0.807, 0.5648, 0.8717, 0.5798]}, {"w": "all", "b": [0.1312, 0.5828, 0.1507, 0.5977]}, {"w": "bins", "b": [0.1569, 0.5828, 0.1898, 0.5977]}, {"w": "for", "b": [0.1959, 0.5828, 0.218, 0.5977]}, {"w": "a", "b": [0.2242, 0.5828, 0.2334, 0.5977]}, {"w": "feature", "b": [0.2396, 0.5828, 0.2955, 0.5977]}, {"w": "have", "b": [0.3017, 0.5828, 0.3381, 0.5977]}, {"w": "identical", "b": [0.3442, 0.5828, 0.4124, 0.5977]}, {"w": "widths,", "b": [0.4186, 0.5828, 0.4771, 0.5977]}, {"w": "as", "b": [0.4833, 0.5828, 0.4998, 0.5977]}, {"w": "illustrated", "b": [0.506, 0.5828, 0.5881, 0.5977]}, {"w": "in", "b": [0.5943, 0.5828, 0.6097, 0.5977]}, {"w": "Figure", "b": [0.6158, 0.5828, 0.6679, 0.5977]}, {"w": "16", "b": [0.6741, 0.5828, 0.6925, 0.5977]}, {"w": "on", "b": [0.6987, 0.5828, 0.7182, 0.5977]}, {"w": "the", "b": [0.7243, 0.5828, 0.75, 0.5977]}, {"w": "top.", "b": [0.7561, 0.5828, 0.7879, 0.5977]}]}, {"id": "b_8", "type": "paragraph", "text": "In k-means-based binning, values in each bin belong to the nearest one-dimensional k-means cluster, as shown in Figure 16 in the middle.", "words": [{"w": "In", "b": [0.1312, 0.6097, 0.1479, 0.6247]}, {"w": "k-means-based", "b": [0.154, 0.6097, 0.2704, 0.6249]}, {"w": "binning,", "b": [0.2766, 0.6097, 0.3411, 0.6247]}, {"w": "values", "b": [0.3473, 0.6097, 0.3953, 0.6247]}, {"w": "in", "b": [0.4015, 0.6097, 0.4166, 0.6247]}, {"w": "each", "b": [0.4228, 0.6097, 0.4576, 0.6247]}, {"w": "bin", "b": [0.4638, 0.6097, 0.489, 0.6247]}, {"w": "belong", "b": [0.4952, 0.6097, 0.5472, 0.6247]}, {"w": "to", "b": [0.5534, 0.6097, 0.5695, 0.6247]}, {"w": "the", "b": [0.5757, 0.6097, 0.6009, 0.6247]}, {"w": "nearest", "b": [0.6071, 0.6097, 0.6637, 0.6247]}, {"w": "one-dimensional", "b": [0.6699, 0.6097, 0.7972, 0.6247]}, {"w": "k-means", "b": [0.803, 0.6097, 0.8688, 0.6249]}, {"w": "cluster,", "b": [0.1312, 0.6277, 0.1899, 0.6426]}, {"w": "as", "b": [0.196, 0.6277, 0.2125, 0.6426]}, {"w": "shown", "b": [0.2187, 0.6277, 0.2685, 0.6426]}, {"w": "in", "b": [0.2747, 0.6277, 0.29, 0.6426]}, {"w": "Figure", "b": [0.2962, 0.6277, 0.3483, 0.6426]}, {"w": "16", "b": [0.3544, 0.6277, 0.3729, 0.6426]}, {"w": "in", "b": [0.379, 0.6277, 0.3944, 0.6426]}, {"w": "the", "b": [0.4006, 0.6277, 0.4262, 0.6426]}, {"w": "middle.", "b": [0.4324, 0.6277, 0.4918, 0.6426]}]}, {"id": "b_9", "type": "paragraph", "text": "In quantile-based binning, all bins have the same number of examples, as shown in Figure 16 at the bottom.", "words": [{"w": "In", "b": [0.1312, 0.6546, 0.1478, 0.6695]}, {"w": "quantile-based", "b": [0.1539, 0.6546, 0.2676, 0.6695]}, {"w": "binning,", "b": [0.2737, 0.6546, 0.338, 0.6695]}, {"w": "all", "b": [0.3441, 0.6546, 0.3632, 0.6695]}, {"w": "bins", "b": [0.3694, 0.6546, 0.4016, 0.6695]}, {"w": "have", "b": [0.4077, 0.6546, 0.4434, 0.6695]}, {"w": "the", "b": [0.4495, 0.6546, 0.4746, 0.6695]}, {"w": "same", "b": [0.4807, 0.6546, 0.52, 0.6695]}, {"w": "number", "b": [0.5261, 0.6546, 0.586, 0.6695]}, {"w": "of", "b": [0.5921, 0.6546, 0.6067, 0.6695]}, {"w": "examples,", "b": [0.6128, 0.6546, 0.6898, 0.6695]}, {"w": "as", "b": [0.6959, 0.6546, 0.7121, 0.6695]}, {"w": "shown", "b": [0.7182, 0.6546, 0.767, 0.6695]}, {"w": "in", "b": [0.7731, 0.6546, 0.7882, 0.6695]}, {"w": "Figure", "b": [0.7943, 0.6546, 0.8454, 0.6695]}, {"w": "16", "b": [0.8515, 0.6546, 0.8696, 0.6695]}, {"w": "at", "b": [0.1312, 0.6725, 0.1476, 0.6875]}, {"w": "the", "b": [0.1538, 0.6725, 0.1794, 0.6875]}, {"w": "bottom.", "b": [0.1856, 0.6725, 0.2496, 0.6875]}]}, {"id": "b_10", "type": "paragraph", "text": "In uniform binning, once the model is deployed in production, if the value of the feature in the input feature vector is below or above the range of any bin, then the closest bin is assigned, which is either the leftmost or the rightmost bin.", "words": [{"w": "In", "b": [0.1312, 0.6994, 0.1485, 0.7144]}, {"w": "uniform", "b": [0.1554, 0.6994, 0.2198, 0.7144]}, {"w": "binning,", "b": [0.2267, 0.6994, 0.2937, 0.7144]}, {"w": "once", "b": [0.3008, 0.6994, 0.3374, 0.7144]}, {"w": "the", "b": [0.3443, 0.6994, 0.3705, 0.7144]}, {"w": "model", "b": [0.3774, 0.6994, 0.4271, 0.7144]}, {"w": "is", "b": [0.434, 0.6994, 0.4466, 0.7144]}, {"w": "deployed", "b": [0.4536, 0.6994, 0.5252, 0.7144]}, {"w": "in", "b": [0.5322, 0.6994, 0.5479, 0.7144]}, {"w": "production,", "b": [0.5548, 0.6994, 0.6495, 0.7144]}, {"w": "if", "b": [0.6566, 0.6994, 0.6676, 0.7144]}, {"w": "the", "b": [0.6745, 0.6994, 0.7007, 0.7144]}, {"w": "value", "b": [0.7076, 0.6994, 0.75, 0.7144]}, {"w": "of", "b": [0.7569, 0.6994, 0.7721, 0.7144]}, {"w": "the", "b": [0.779, 0.6994, 0.8052, 0.7144]}, {"w": "feature", "b": [0.8121, 0.6994, 0.8692, 0.7144]}, {"w": "in", "b": [0.1312, 0.7174, 0.1469, 0.7323]}, {"w": "the", "b": [0.1535, 0.7174, 0.1797, 0.7323]}, {"w": "input", "b": [0.1863, 0.7174, 0.2302, 0.7323]}, {"w": "feature", "b": [0.2368, 0.7174, 0.2939, 0.7323]}, {"w": "vector", "b": [0.3005, 0.7174, 0.3508, 0.7323]}, {"w": "is", "b": [0.3574, 0.7174, 0.3701, 0.7323]}, {"w": "below", "b": [0.3767, 0.7174, 0.4237, 0.7323]}, {"w": "or", "b": [0.4303, 0.7174, 0.4471, 0.7323]}, {"w": "above", "b": [0.4537, 0.7174, 0.5008, 0.7323]}, {"w": "the", "b": [0.5074, 0.7174, 0.5335, 0.7323]}, {"w": "range", "b": [0.5402, 0.7174, 0.5852, 0.7323]}, {"w": "of", "b": [0.5918, 0.7174, 0.607, 0.7323]}, {"w": "any", "b": [0.6136, 0.7174, 0.6429, 0.7323]}, {"w": "bin,", "b": [0.6495, 0.7174, 0.6809, 0.7323]}, {"w": "then", "b": [0.6876, 0.7174, 0.7242, 0.7323]}, {"w": "the", "b": [0.7308, 0.7174, 0.757, 0.7323]}, {"w": "closest", "b": [0.7636, 0.7174, 0.8171, 0.7323]}, {"w": "bin", "b": [0.8237, 0.7174, 0.8499, 0.7323]}, {"w": "is", "b": [0.8565, 0.7174, 0.8692, 0.7323]}, {"w": "assigned,", "b": [0.1312, 0.7353, 0.2032, 0.7503]}, {"w": "which", "b": [0.2094, 0.7353, 0.256, 0.7503]}, {"w": "is", "b": [0.2622, 0.7353, 0.2746, 0.7503]}, {"w": "either", "b": [0.2808, 0.7353, 0.327, 0.7503]}, {"w": "the", "b": [0.3331, 0.7353, 0.3588, 0.7503]}, {"w": "leftmost", "b": [0.3649, 0.7353, 0.4301, 0.7503]}, {"w": "or", "b": [0.4363, 0.7353, 0.4527, 0.7503]}, {"w": "the", "b": [0.4589, 0.7353, 0.4845, 0.7503]}, {"w": "rightmost", "b": [0.4907, 0.7353, 0.5682, 0.7503]}, {"w": "bin.", "b": [0.5744, 0.7353, 0.6052, 0.7503]}]}, {"id": "b_11", "type": "paragraph", "text": "Remember, most modern machine learning algorithm implementations require numerical features. The bins must be transformed back to numerical values by using a technique like one-hot encoding.", "words": [{"w": "Remember,", "b": [0.1312, 0.7623, 0.2246, 0.7772]}, {"w": "most", "b": [0.2319, 0.7623, 0.2717, 0.7772]}, {"w": "modern", "b": [0.2788, 0.7623, 0.3411, 0.7772]}, {"w": "machine", "b": [0.3481, 0.7623, 0.4156, 0.7772]}, {"w": "learning", "b": [0.4226, 0.7623, 0.4886, 0.7772]}, {"w": "algorithm", "b": [0.4956, 0.7623, 0.5752, 0.7772]}, {"w": "implementations", "b": [0.5822, 0.7623, 0.7178, 0.7772]}, {"w": "require", "b": [0.7248, 0.7623, 0.7819, 0.7772]}, {"w": "numerical", "b": [0.789, 0.7623, 0.8691, 0.7772]}, {"w": "features.", "b": [0.1312, 0.7802, 0.2002, 0.7952]}, {"w": "The", "b": [0.2083, 0.7802, 0.2404, 0.7952]}, {"w": "bins", "b": [0.2465, 0.7802, 0.2797, 0.7952]}, {"w": "must", "b": [0.2858, 0.7802, 0.3257, 0.7952]}, {"w": "be", "b": [0.3319, 0.7802, 0.351, 0.7952]}, {"w": "transformed", "b": [0.3571, 0.7802, 0.455, 0.7952]}, {"w": "back", "b": [0.4611, 0.7802, 0.4983, 0.7952]}, {"w": "to", "b": [0.5045, 0.7802, 0.521, 0.7952]}, {"w": "numerical", "b": [0.5271, 0.7802, 0.6063, 0.7952]}, {"w": "values", "b": [0.6124, 0.7802, 0.6616, 0.7952]}, {"w": "by", "b": [0.6677, 0.7802, 0.6874, 0.7952]}, {"w": "using", "b": [0.6935, 0.7802, 0.736, 0.7952]}, {"w": "a", "b": [0.7421, 0.7802, 0.7514, 0.7952]}, {"w": "technique", "b": [0.7576, 0.7802, 0.8351, 0.7952]}, {"w": "like", "b": [0.8412, 0.7802, 0.8692, 0.7952]}, {"w": "one-hot", "b": [0.1312, 0.7985, 0.2011, 0.8134]}, {"w": "encoding.", "b": [0.2081, 0.7982, 0.2957, 0.8134]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 28", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "28", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 118, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Gender", "words": [{"w": "Gender", "b": [0.3335, 0.123, 0.3914, 0.137]}]}, {"id": "b_5", "type": "paragraph", "text": "User ID", "words": [{"w": "User", "b": [0.2172, 0.123, 0.2538, 0.137]}, {"w": "ID", "b": [0.2587, 0.123, 0.2761, 0.137]}]}, {"id": "b_11", "type": "paragraph", "text": "Age", "words": [{"w": "Age", "b": [0.4628, 0.123, 0.4937, 0.137]}]}, {"id": "b_16", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.1213, 0.6117, 0.133]}]}, {"id": "b_17", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.1565, 0.6117, 0.1682]}]}, {"id": "b_18", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.2973, 0.6117, 0.309]}]}, {"id": "b_19", "type": "paragraph", "text": "Date Subscribed", "words": [{"w": "Date", "b": [0.679, 0.123, 0.7157, 0.137]}, {"w": "Subscribed", "b": [0.7205, 0.123, 0.8074, 0.137]}]}, {"id": "b_20", "type": "equation", "text": "2016-01-12", "words": [{"w": "2016-01-12", "b": [0.6987, 0.1582, 0.7876, 0.1723]}]}, {"id": "b_21", "type": "equation", "text": "2017-08-23", "words": [{"w": "2017-08-23", "b": [0.6987, 0.1934, 0.7876, 0.2075]}]}, {"id": "b_22", "type": "equation", "text": "2019-12-19", "words": [{"w": "2019-12-19", "b": [0.6987, 0.2286, 0.7876, 0.2427]}]}, {"id": "b_23", "type": "equation", "text": "2016-11-30", "words": [{"w": "2016-11-30", "b": [0.6994, 0.299, 0.787, 0.3131]}]}, {"id": "b_24", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.1917, 0.6117, 0.2034]}]}, {"id": "b_25", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.2269, 0.6117, 0.2386]}]}, {"id": "b_26", "type": "paragraph", "text": "User", "words": [{"w": "User", "b": [0.1984, 0.0936, 0.237, 0.1077]}]}, {"id": "b_27", "type": "paragraph", "text": "User ID", "words": [{"w": "User", "b": [0.333, 0.3988, 0.3697, 0.4128]}, {"w": "ID", "b": [0.3745, 0.3988, 0.3919, 0.4128]}]}, {"id": "b_32", "type": "paragraph", "text": "Order ID", "words": [{"w": "Order", "b": [0.2133, 0.3988, 0.2577, 0.4128]}, {"w": "ID", "b": [0.2625, 0.3988, 0.2799, 0.4128]}]}, {"id": "b_37", "type": "paragraph", "text": "Amount", "words": [{"w": "Amount", "b": [0.4483, 0.3988, 0.5082, 0.4128]}]}, {"id": "b_40", "type": "paragraph", "text": "7.5", "words": [{"w": "7.5", "b": [0.4662, 0.5044, 0.4903, 0.5185]}]}, {"id": "b_41", "type": "paragraph", "text": "8.3", "words": [{"w": "8.3", "b": [0.4662, 0.5396, 0.4903, 0.5537]}]}, {"id": "b_42", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.397, 0.6117, 0.4088]}]}, {"id": "b_43", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.4322, 0.6117, 0.444]}]}, {"id": "b_44", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.5379, 0.6117, 0.5496]}]}, {"id": "b_45", "type": "paragraph", "text": "Order Date", "words": [{"w": "Order", "b": [0.7002, 0.3988, 0.7446, 0.4128]}, {"w": "Date", "b": [0.7494, 0.3988, 0.7861, 0.4128]}]}, {"id": "b_46", "type": "equation", "text": "2017-09-13", "words": [{"w": "2017-09-13", "b": [0.6987, 0.434, 0.7876, 0.448]}]}, {"id": "b_47", "type": "equation", "text": "2018-11-23", "words": [{"w": "2018-11-23", "b": [0.6994, 0.4692, 0.787, 0.4833]}]}, {"id": "b_48", "type": "equation", "text": "2019-12-19", "words": [{"w": "2019-12-19", "b": [0.6987, 0.5044, 0.7876, 0.5185]}]}, {"id": "b_49", "type": "equation", "text": "2016-11-30", "words": [{"w": "2016-11-30", "b": [0.6994, 0.5396, 0.787, 0.5537]}]}, {"id": "b_50", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.4675, 0.6117, 0.4792]}]}, {"id": "b_51", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.5027, 0.6117, 0.5144]}]}, {"id": "b_52", "type": "paragraph", "text": "Order", "words": [{"w": "Order", "b": [0.194, 0.3694, 0.2413, 0.3835]}]}, {"id": "b_53", "type": "paragraph", "text": "User ID", "words": [{"w": "User", "b": [0.333, 0.6393, 0.3697, 0.6534]}, {"w": "ID", "b": [0.3745, 0.6393, 0.3919, 0.6534]}]}, {"id": "b_58", "type": "paragraph", "text": "Call ID", "words": [{"w": "Call", "b": [0.2205, 0.6393, 0.2505, 0.6534]}, {"w": "ID", "b": [0.2553, 0.6393, 0.2727, 0.6534]}]}, {"id": "b_63", "type": "paragraph", "text": "Call Duration", "words": [{"w": "Call", "b": [0.428, 0.6393, 0.458, 0.6534]}, {"w": "Duration", "b": [0.4628, 0.6393, 0.5284, 0.6534]}]}, {"id": "b_65", "type": "paragraph", "text": "235", "words": [{"w": "235", "b": [0.4638, 0.7098, 0.4927, 0.7238]}]}, {"id": "b_66", "type": "paragraph", "text": "476", "words": [{"w": "476", "b": [0.4638, 0.745, 0.4927, 0.759]}]}, {"id": "b_68", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.6376, 0.6117, 0.6494]}]}, {"id": "b_69", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.6728, 0.6117, 0.6846]}]}, {"id": "b_70", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.8225, 0.6117, 0.8342]}]}, {"id": "b_71", "type": "paragraph", "text": "Call Date", "words": [{"w": "Call", "b": [0.7075, 0.6393, 0.7374, 0.6534]}, {"w": "Date", "b": [0.7422, 0.6393, 0.7789, 0.6534]}]}, {"id": "b_72", "type": "equation", "text": "2016-01-12", "words": [{"w": "2016-01-12", "b": [0.6987, 0.6745, 0.7876, 0.6886]}]}, {"id": "b_73", "type": "equation", "text": "2016-01-13", "words": [{"w": "2016-01-13", "b": [0.6987, 0.7098, 0.7876, 0.7238]}]}, {"id": "b_74", "type": "equation", "text": "2016-12-17", "words": [{"w": "2016-12-17", "b": [0.6987, 0.745, 0.7876, 0.759]}]}, {"id": "b_75", "type": "equation", "text": "2016-11-30", "words": [{"w": "2016-11-30", "b": [0.6994, 0.8154, 0.787, 0.8295]}]}, {"id": "b_76", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.708, 0.6117, 0.7198]}]}, {"id": "b_77", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.5996, 0.7432, 0.6117, 0.755]}]}, {"id": "b_78", "type": "paragraph", "text": "Call", "words": [{"w": "Call", "b": [0.2017, 0.61, 0.2336, 0.6241]}]}, {"id": "b_79", "type": "equation", "text": "M 19 ... 2019-12-18", "words": [{"w": "M", "b": [0.3552, 0.2638, 0.3697, 0.2779]}, {"w": "19", "b": [0.4686, 0.2638, 0.4879, 0.2779]}, {"w": "...", "b": [0.5996, 0.2621, 0.6117, 0.2738]}, {"w": "2019-12-18", "b": [0.6987, 0.2638, 0.7876, 0.2779]}]}, {"id": "b_80", "type": "equation", "text": "4 4 334 2019-12-19 ...", "words": [{"w": "4", "b": [0.3576, 0.7802, 0.3673, 0.7942]}, {"w": "4", "b": [0.2418, 0.7802, 0.2514, 0.7942]}, {"w": "334", "b": [0.4638, 0.7802, 0.4927, 0.7942]}, {"w": "2019-12-19", "b": [0.6987, 0.7802, 0.7876, 0.7942]}, {"w": "...", "b": [0.5996, 0.7785, 0.6117, 0.7902]}]}, {"id": "b_81", "type": "paragraph", "text": "Figure 17: Relational data for churn analysis.", "words": [{"w": "Figure", "b": [0.3158, 0.8555, 0.3679, 0.8705]}, {"w": "17:", "b": [0.3741, 0.8555, 0.3977, 0.8705]}, {"w": "Relational", "b": [0.4059, 0.8555, 0.4882, 0.8705]}, {"w": "data", "b": [0.4943, 0.8555, 0.5302, 0.8705]}, {"w": "for", "b": [0.5363, 0.8555, 0.5584, 0.8705]}, {"w": "churn", "b": [0.5646, 0.8555, 0.6098, 0.8705]}, {"w": "analysis.", "b": [0.6159, 0.8555, 0.6843, 0.8705]}]}, {"id": "b_82", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 29", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "29", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 119, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Gender", "words": [{"w": "Gender", "b": [0.2464, 0.1225, 0.3036, 0.1363]}]}, {"id": "b_2", "type": "paragraph", "text": "User ID", "words": [{"w": "User", "b": [0.1317, 0.1225, 0.1679, 0.1363]}, {"w": "ID", "b": [0.1727, 0.1225, 0.1898, 0.1363]}]}, {"id": "b_5", "type": "paragraph", "text": "Age", "words": [{"w": "Age", "b": [0.374, 0.1225, 0.4045, 0.1363]}]}, {"id": "b_7", "type": "paragraph", "text": "User features", "words": [{"w": "User", "b": [0.106, 0.0935, 0.1441, 0.1074]}, {"w": "features", "b": [0.1488, 0.0935, 0.2155, 0.1074]}]}, {"id": "b_8", "type": "paragraph", "text": "M 19", "words": [{"w": "M", "b": [0.2679, 0.1919, 0.2822, 0.2058]}, {"w": "19", "b": [0.3797, 0.1919, 0.3988, 0.2058]}]}, {"id": "b_9", "type": "paragraph", "text": "Mean Order", "words": [{"w": "Mean", "b": [0.4578, 0.1144, 0.5007, 0.1282]}, {"w": "Order", "b": [0.5054, 0.1144, 0.5492, 0.1282]}]}, {"id": "b_10", "type": "paragraph", "text": "Amount", "words": [{"w": "Amount", "b": [0.474, 0.1306, 0.5331, 0.1445]}]}, {"id": "b_11", "type": "paragraph", "text": "12.9", "words": [{"w": "12.9", "b": [0.4868, 0.1572, 0.5202, 0.1711]}]}, {"id": "b_13", "type": "paragraph", "text": "Std Dev Order Amount", "words": [{"w": "Std", "b": [0.5873, 0.1144, 0.613, 0.1282]}, {"w": "Dev", "b": [0.6178, 0.1144, 0.6483, 0.1282]}, {"w": "Order", "b": [0.564, 0.1306, 0.6078, 0.1445]}, {"w": "Amount", "b": [0.6125, 0.1306, 0.6716, 0.1445]}]}, {"id": "b_14", "type": "paragraph", "text": "7.1", "words": [{"w": "7.1", "b": [0.6059, 0.1572, 0.6297, 0.1711]}]}, {"id": "b_16", "type": "paragraph", "text": "Mean Call", "words": [{"w": "Mean", "b": [0.6935, 0.1144, 0.7363, 0.1282]}, {"w": "Call", "b": [0.7411, 0.1144, 0.7706, 0.1282]}]}, {"id": "b_17", "type": "paragraph", "text": "Duration", "words": [{"w": "Duration", "b": [0.6997, 0.1306, 0.7644, 0.1445]}]}, {"id": "b_18", "type": "paragraph", "text": "235", "words": [{"w": "235", "b": [0.7177, 0.1572, 0.7463, 0.1711]}]}, {"id": "b_19", "type": "paragraph", "text": "134.3", "words": [{"w": "134.3", "b": [0.7106, 0.1919, 0.7535, 0.2058]}]}, {"id": "b_20", "type": "paragraph", "text": "Std Dev Call", "words": [{"w": "Std", "b": [0.7987, 0.1144, 0.8244, 0.1282]}, {"w": "Dev", "b": [0.8292, 0.1144, 0.8596, 0.1282]}, {"w": "Call", "b": [0.8644, 0.1144, 0.8939, 0.1282]}]}, {"id": "b_21", "type": "paragraph", "text": "Duration", "words": [{"w": "Duration", "b": [0.8139, 0.1306, 0.8787, 0.1445]}]}, {"id": "b_23", "type": "paragraph", "text": "142.7", "words": [{"w": "142.7", "b": [0.8249, 0.1919, 0.8677, 0.2058]}]}, {"id": "b_24", "type": "paragraph", "text": "Figure 18: Synthetic features based on sample mean and standard deviation.", "words": [{"w": "Figure", "b": [0.1893, 0.2317, 0.2414, 0.2467]}, {"w": "18:", "b": [0.2475, 0.2317, 0.2711, 0.2467]}, {"w": "Synthetic", "b": [0.2793, 0.2317, 0.3552, 0.2467]}, {"w": "features", "b": [0.3614, 0.2317, 0.4246, 0.2467]}, {"w": "based", "b": [0.4307, 0.2317, 0.476, 0.2467]}, {"w": "on", "b": [0.4821, 0.2317, 0.5016, 0.2467]}, {"w": "sample", "b": [0.5078, 0.2317, 0.5632, 0.2467]}, {"w": "mean", "b": [0.5694, 0.2317, 0.6124, 0.2467]}, {"w": "and", "b": [0.6186, 0.2317, 0.6483, 0.2467]}, {"w": "standard", "b": [0.6545, 0.2317, 0.7254, 0.2467]}, {"w": "deviation.", "b": [0.7315, 0.2317, 0.811, 0.2467]}]}, {"id": "b_25", "type": "paragraph", "text": "4.6.2 Synthesizing Features from Relational Data", "words": [{"w": "4.6.2", "b": [0.1312, 0.2823, 0.1749, 0.2972]}, {"w": "Synthesizing", "b": [0.1961, 0.2823, 0.312, 0.2972]}, {"w": "Features", "b": [0.3191, 0.2823, 0.3976, 0.2972]}, {"w": "from", "b": [0.4047, 0.2823, 0.4482, 0.2972]}, {"w": "Relational", "b": [0.4553, 0.2823, 0.5499, 0.2972]}, {"w": "Data", "b": [0.5569, 0.2823, 0.6021, 0.2972]}]}, {"id": "b_26", "type": "paragraph", "text": "Data analysts often work with data in a relational database. For example, a mobile phone operator wants to know whether a customer will soon abandon the subscription. This problem is known as churn analysis. We have to represent each customer as a vector of features.", "words": [{"w": "Data", "b": [0.1312, 0.3186, 0.1702, 0.3335]}, {"w": "analysts", "b": [0.1759, 0.3186, 0.24, 0.3335]}, {"w": "often", "b": [0.2457, 0.3186, 0.2854, 0.3335]}, {"w": "work", "b": [0.2912, 0.3186, 0.3294, 0.3335]}, {"w": "with", "b": [0.3352, 0.3186, 0.3704, 0.3335]}, {"w": "data", "b": [0.3761, 0.3186, 0.4113, 0.3335]}, {"w": "in", "b": [0.4171, 0.3186, 0.4322, 0.3335]}, {"w": "a", "b": [0.438, 0.3186, 0.447, 0.3335]}, {"w": "relational", "b": [0.4529, 0.3189, 0.5403, 0.3338]}, {"w": "database.", "b": [0.547, 0.3186, 0.6328, 0.3338]}, {"w": "For", "b": [0.6409, 0.3186, 0.6673, 0.3335]}, {"w": "example,", "b": [0.6731, 0.3186, 0.7429, 0.3335]}, {"w": "a", "b": [0.7488, 0.3186, 0.7578, 0.3335]}, {"w": "mobile", "b": [0.7636, 0.3186, 0.8158, 0.3335]}, {"w": "phone", "b": [0.8216, 0.3186, 0.8689, 0.3335]}, {"w": "operator", "b": [0.1312, 0.3365, 0.1982, 0.3515]}, {"w": "wants", "b": [0.2032, 0.3365, 0.2484, 0.3515]}, {"w": "to", "b": [0.2534, 0.3365, 0.2695, 0.3515]}, {"w": "know", "b": [0.2745, 0.3365, 0.3157, 0.3515]}, {"w": "whether", "b": [0.3207, 0.3365, 0.384, 0.3515]}, {"w": "a", "b": [0.389, 0.3365, 0.3981, 0.3515]}, {"w": "customer", "b": [0.4031, 0.3365, 0.4746, 0.3515]}, {"w": "will", "b": [0.4796, 0.3365, 0.5077, 0.3515]}, {"w": "soon", "b": [0.5127, 0.3365, 0.5485, 0.3515]}, {"w": "abandon", "b": [0.5534, 0.3365, 0.6208, 0.3515]}, {"w": "the", "b": [0.6257, 0.3365, 0.6509, 0.3515]}, {"w": "subscription.", "b": [0.6559, 0.3365, 0.7566, 0.3515]}, {"w": "This", "b": [0.7645, 0.3365, 0.7997, 0.3515]}, {"w": "problem", "b": [0.8047, 0.3365, 0.8691, 0.3515]}, {"w": "is", "b": [0.1312, 0.3545, 0.1436, 0.3694]}, {"w": "known", "b": [0.1498, 0.3545, 0.2021, 0.3694]}, {"w": "as", "b": [0.2082, 0.3545, 0.2248, 0.3694]}, {"w": "churn", "b": [0.2309, 0.3548, 0.2832, 0.3697]}, {"w": "analysis.", "b": [0.2903, 0.3545, 0.3675, 0.3697]}, {"w": "We", "b": [0.3757, 0.3545, 0.4014, 0.3694]}, {"w": "have", "b": [0.4075, 0.3545, 0.4439, 0.3694]}, {"w": "to", "b": [0.4501, 0.3545, 0.4665, 0.3694]}, {"w": "represent", "b": [0.4726, 0.3545, 0.5462, 0.3694]}, {"w": "each", "b": [0.5524, 0.3545, 0.5877, 0.3694]}, {"w": "customer", "b": [0.5939, 0.3545, 0.6668, 0.3694]}, {"w": "as", "b": [0.673, 0.3545, 0.6895, 0.3694]}, {"w": "a", "b": [0.6956, 0.3545, 0.7049, 0.3694]}, {"w": "vector", "b": [0.711, 0.3545, 0.7603, 0.3694]}, {"w": "of", "b": [0.7665, 0.3545, 0.7813, 0.3694]}, {"w": "features.", "b": [0.7875, 0.3545, 0.8558, 0.3694]}]}, {"id": "b_27", "type": "paragraph", "text": "Let’s say the data on the users is contained in three relational tables: User, Order, and Call, as shown in Figure 17.", "words": [{"w": "Let’s", "b": [0.1312, 0.3814, 0.1701, 0.3963]}, {"w": "say", "b": [0.1762, 0.3814, 0.2016, 0.3963]}, {"w": "the", "b": [0.2077, 0.3814, 0.2331, 0.3963]}, {"w": "data", "b": [0.2392, 0.3814, 0.2746, 0.3963]}, {"w": "on", "b": [0.2808, 0.3814, 0.3, 0.3963]}, {"w": "the", "b": [0.3062, 0.3814, 0.3315, 0.3963]}, {"w": "users", "b": [0.3376, 0.3814, 0.3774, 0.3963]}, {"w": "is", "b": [0.3835, 0.3814, 0.3958, 0.3963]}, {"w": "contained", "b": [0.4019, 0.3814, 0.4784, 0.3963]}, {"w": "in", "b": [0.4845, 0.3814, 0.4997, 0.3963]}, {"w": "three", "b": [0.5059, 0.3814, 0.5464, 0.3963]}, {"w": "relational", "b": [0.5525, 0.3814, 0.6275, 0.3963]}, {"w": "tables:", "b": [0.6336, 0.3814, 0.6854, 0.3963]}, {"w": "User,", "b": [0.6936, 0.3814, 0.7347, 0.3963]}, {"w": "Order,", "b": [0.7409, 0.3814, 0.7926, 0.3963]}, {"w": "and", "b": [0.7988, 0.3814, 0.8281, 0.3963]}, {"w": "Call,", "b": [0.8343, 0.3814, 0.8717, 0.3963]}, {"w": "as", "b": [0.1312, 0.3993, 0.1477, 0.4143]}, {"w": "shown", "b": [0.1539, 0.3993, 0.2037, 0.4143]}, {"w": "in", "b": [0.2099, 0.3993, 0.2253, 0.4143]}, {"w": "Figure", "b": [0.2314, 0.3993, 0.2835, 0.4143]}, {"w": "17.", "b": [0.2897, 0.3993, 0.3132, 0.4143]}]}, {"id": "b_28", "type": "paragraph", "text": "The table User already contains two potentially useful features: Gender and Age. We can also create synthetic features using the data from tables Order and Call. As you can see, user 2 has three rows in table Order, while user 4 has one row in table Order, but three rows in table Calls. In order to create a feature that represents one user, we have to reduce those several records into one value. A typical approach is to compute various statistics from the data coming from multiple rows and use the value of each statistic as a feature. The most commonly used statistics are sample mean and standard deviation. (Standard deviation is the square root of sample variance.)", "words": [{"w": "The", "b": [0.1306, 0.4262, 0.163, 0.4412]}, {"w": "table", "b": [0.1691, 0.4262, 0.2099, 0.4412]}, {"w": "User", "b": [0.216, 0.4262, 0.2533, 0.4412]}, {"w": "already", "b": [0.2594, 0.4262, 0.3196, 0.4412]}, {"w": "contains", "b": [0.3257, 0.4262, 0.3932, 0.4412]}, {"w": "two", "b": [0.3994, 0.4262, 0.4287, 0.4412]}, {"w": "potentially", "b": [0.4348, 0.4262, 0.5231, 0.4412]}, {"w": "useful", "b": [0.5293, 0.4262, 0.5769, 0.4412]}, {"w": "features:", "b": [0.5831, 0.4262, 0.6528, 0.4412]}, {"w": "Gender", "b": [0.6609, 0.4262, 0.7207, 0.4412]}, {"w": "and", "b": [0.7269, 0.4262, 0.7572, 0.4412]}, {"w": "Age.", "b": [0.7633, 0.4262, 0.8004, 0.4412]}, {"w": "We", "b": [0.8086, 0.4262, 0.8348, 0.4412]}, {"w": "can", "b": [0.8409, 0.4262, 0.8691, 0.4412]}, {"w": "also", "b": [0.1312, 0.4442, 0.1627, 0.4591]}, {"w": "create", "b": [0.1694, 0.4442, 0.2186, 0.4591]}, {"w": "synthetic", "b": [0.2252, 0.4442, 0.2997, 0.4591]}, {"w": "features", "b": [0.3063, 0.4442, 0.3708, 0.4591]}, {"w": "using", "b": [0.3775, 0.4442, 0.4205, 0.4591]}, {"w": "the", "b": [0.4271, 0.4442, 0.4533, 0.4591]}, {"w": "data", "b": [0.4599, 0.4442, 0.4965, 0.4591]}, {"w": "from", "b": [0.5032, 0.4442, 0.5414, 0.4591]}, {"w": "tables", "b": [0.5481, 0.4442, 0.5963, 0.4591]}, {"w": "Order", "b": [0.603, 0.4442, 0.6512, 0.4591]}, {"w": "and", "b": [0.6578, 0.4442, 0.6882, 0.4591]}, {"w": "Call.", "b": [0.6948, 0.4442, 0.7335, 0.4591]}, {"w": "As", "b": [0.7432, 0.4442, 0.7648, 0.4591]}, {"w": "you", "b": [0.7714, 0.4442, 0.8007, 0.4591]}, {"w": "can", "b": [0.8074, 0.4442, 0.8356, 0.4591]}, {"w": "see,", "b": [0.8423, 0.4442, 0.8717, 0.4591]}, {"w": "user", "b": [0.1312, 0.4621, 0.1636, 0.4771]}, {"w": "2", "b": [0.1696, 0.4621, 0.1786, 0.4771]}, {"w": "has", "b": [0.1847, 0.4621, 0.2109, 0.4771]}, {"w": "three", "b": [0.217, 0.4621, 0.2572, 0.4771]}, {"w": "rows", "b": [0.2633, 0.4621, 0.2991, 0.4771]}, {"w": "in", "b": [0.3052, 0.4621, 0.3202, 0.4771]}, {"w": "table", "b": [0.3263, 0.4621, 0.3655, 0.4771]}, {"w": "Order,", "b": [0.3716, 0.4621, 0.4229, 0.4771]}, {"w": "while", "b": [0.429, 0.4621, 0.4702, 0.4771]}, {"w": "user", "b": [0.4762, 0.4621, 0.5086, 0.4771]}, {"w": "4", "b": [0.5146, 0.4621, 0.5237, 0.4771]}, {"w": "has", "b": [0.5297, 0.4621, 0.556, 0.4771]}, {"w": "one", "b": [0.562, 0.4621, 0.5892, 0.4771]}, {"w": "row", "b": [0.5952, 0.4621, 0.6239, 0.4771]}, {"w": "in", "b": [0.6299, 0.4621, 0.645, 0.4771]}, {"w": "table", "b": [0.6511, 0.4621, 0.6903, 0.4771]}, {"w": "Order,", "b": [0.6963, 0.4621, 0.7477, 0.4771]}, {"w": "but", "b": [0.7538, 0.4621, 0.7809, 0.4771]}, {"w": "three", "b": [0.787, 0.4621, 0.8272, 0.4771]}, {"w": "rows", "b": [0.8333, 0.4621, 0.8691, 0.4771]}, {"w": "in", "b": [0.1312, 0.4801, 0.1465, 0.495]}, {"w": "table", "b": [0.1526, 0.4801, 0.1922, 0.495]}, {"w": "Calls.", "b": [0.1983, 0.4801, 0.243, 0.495]}, {"w": "In", "b": [0.2512, 0.4801, 0.268, 0.495]}, {"w": "order", "b": [0.2741, 0.4801, 0.3158, 0.495]}, {"w": "to", "b": [0.322, 0.4801, 0.3382, 0.495]}, {"w": "create", "b": [0.3443, 0.4801, 0.3921, 0.495]}, {"w": "a", "b": [0.3982, 0.4801, 0.4073, 0.495]}, {"w": "feature", "b": [0.4135, 0.4801, 0.4688, 0.495]}, {"w": "that", "b": [0.475, 0.4801, 0.5084, 0.495]}, {"w": "represents", "b": [0.5146, 0.4801, 0.5945, 0.495]}, {"w": "one", "b": [0.6007, 0.4801, 0.6281, 0.495]}, {"w": "user,", "b": [0.6342, 0.4801, 0.6719, 0.495]}, {"w": "we", "b": [0.6781, 0.4801, 0.6989, 0.495]}, {"w": "have", "b": [0.705, 0.4801, 0.741, 0.495]}, {"w": "to", "b": [0.7472, 0.4801, 0.7634, 0.495]}, {"w": "reduce", "b": [0.7695, 0.4801, 0.8213, 0.495]}, {"w": "those", "b": [0.8275, 0.4801, 0.8692, 0.495]}, {"w": "several", "b": [0.1312, 0.498, 0.1859, 0.513]}, {"w": "records", "b": [0.192, 0.498, 0.2498, 0.513]}, {"w": "into", "b": [0.256, 0.498, 0.2873, 0.513]}, {"w": "one", "b": [0.2935, 0.498, 0.3212, 0.513]}, {"w": "value.", "b": [0.3274, 0.498, 0.3741, 0.513]}, {"w": "A", "b": [0.3824, 0.498, 0.3963, 0.513]}, {"w": "typical", "b": [0.4024, 0.498, 0.4569, 0.513]}, {"w": "approach", "b": [0.4631, 0.498, 0.5366, 0.513]}, {"w": "is", "b": [0.5428, 0.498, 0.5552, 0.513]}, {"w": "to", "b": [0.5614, 0.498, 0.5778, 0.513]}, {"w": "compute", "b": [0.584, 0.498, 0.6528, 0.513]}, {"w": "various", "b": [0.659, 0.498, 0.7162, 0.513]}, {"w": "statistics", "b": [0.7223, 0.498, 0.7936, 0.513]}, {"w": "from", "b": [0.7997, 0.498, 0.8373, 0.513]}, {"w": "the", "b": [0.8434, 0.498, 0.8691, 0.513]}, {"w": "data", "b": [0.1312, 0.516, 0.1677, 0.5309]}, {"w": "coming", "b": [0.1738, 0.516, 0.2322, 0.5309]}, {"w": "from", "b": [0.2383, 0.516, 0.2764, 0.5309]}, {"w": "multiple", "b": [0.2825, 0.516, 0.3497, 0.5309]}, {"w": "rows", "b": [0.3559, 0.516, 0.393, 0.5309]}, {"w": "and", "b": [0.3992, 0.516, 0.4294, 0.5309]}, {"w": "use", "b": [0.4355, 0.516, 0.4617, 0.5309]}, {"w": "the", "b": [0.4678, 0.516, 0.4939, 0.5309]}, {"w": "value", "b": [0.5, 0.516, 0.5423, 0.5309]}, {"w": "of", "b": [0.5484, 0.516, 0.5635, 0.5309]}, {"w": "each", "b": [0.5697, 0.516, 0.6056, 0.5309]}, {"w": "statistic", "b": [0.6118, 0.516, 0.6766, 0.5309]}, {"w": "as", "b": [0.6828, 0.516, 0.6995, 0.5309]}, {"w": "a", "b": [0.7057, 0.516, 0.715, 0.5309]}, {"w": "feature.", "b": [0.7212, 0.516, 0.7832, 0.5309]}, {"w": "The", "b": [0.7915, 0.516, 0.8237, 0.5309]}, {"w": "most", "b": [0.8299, 0.516, 0.8696, 0.5309]}, {"w": "commonly", "b": [0.1312, 0.5339, 0.2121, 0.5489]}, {"w": "used", "b": [0.2178, 0.5339, 0.2531, 0.5489]}, {"w": "statistics", "b": [0.2588, 0.5339, 0.3285, 0.5489]}, {"w": "are", "b": [0.3341, 0.5339, 0.3583, 0.5489]}, {"w": "sample", "b": [0.3639, 0.5342, 0.4277, 0.5492]}, {"w": "mean", "b": [0.4342, 0.5342, 0.4837, 0.5492]}, {"w": "and", "b": [0.4895, 0.5339, 0.5187, 0.5489]}, {"w": "standard", "b": [0.5243, 0.5342, 0.6057, 0.5492]}, {"w": "deviation.", "b": [0.6123, 0.5339, 0.7028, 0.5492]}, {"w": "(Standard", "b": [0.7108, 0.5339, 0.7903, 0.5489]}, {"w": "deviation", "b": [0.796, 0.5339, 0.8688, 0.5489]}, {"w": "is", "b": [0.1312, 0.5519, 0.1436, 0.5668]}, {"w": "the", "b": [0.1498, 0.5519, 0.1754, 0.5668]}, {"w": "square", "b": [0.1816, 0.5519, 0.2335, 0.5668]}, {"w": "root", "b": [0.2397, 0.5519, 0.2731, 0.5668]}, {"w": "of", "b": [0.2792, 0.5519, 0.2941, 0.5668]}, {"w": "sample", "b": [0.3016, 0.5522, 0.3654, 0.5671]}, {"w": "variance.)", "b": [0.3725, 0.5519, 0.461, 0.5671]}]}, {"id": "b_29", "type": "paragraph", "text": "To give a concrete example, I have calculated the values of four features for users 2 and 4. You can find them in Figure 18.", "words": [{"w": "To", "b": [0.1306, 0.5788, 0.152, 0.5937]}, {"w": "give", "b": [0.1582, 0.5788, 0.1906, 0.5937]}, {"w": "a", "b": [0.1968, 0.5788, 0.2062, 0.5937]}, {"w": "concrete", "b": [0.2124, 0.5788, 0.2804, 0.5937]}, {"w": "example,", "b": [0.2866, 0.5788, 0.3593, 0.5937]}, {"w": "I", "b": [0.3655, 0.5788, 0.3723, 0.5937]}, {"w": "have", "b": [0.3784, 0.5788, 0.4156, 0.5937]}, {"w": "calculated", "b": [0.4217, 0.5788, 0.5044, 0.5937]}, {"w": "the", "b": [0.5106, 0.5788, 0.5367, 0.5937]}, {"w": "values", "b": [0.5429, 0.5788, 0.5927, 0.5937]}, {"w": "of", "b": [0.5989, 0.5788, 0.614, 0.5937]}, {"w": "four", "b": [0.6202, 0.5788, 0.6532, 0.5937]}, {"w": "features", "b": [0.6594, 0.5788, 0.7239, 0.5937]}, {"w": "for", "b": [0.73, 0.5788, 0.7526, 0.5937]}, {"w": "users", "b": [0.7588, 0.5788, 0.7998, 0.5937]}, {"w": "2", "b": [0.8056, 0.5788, 0.8151, 0.5937]}, {"w": "and", "b": [0.8212, 0.5788, 0.8516, 0.5937]}, {"w": "4.", "b": [0.8577, 0.5788, 0.8723, 0.5937]}, {"w": "You", "b": [0.1305, 0.5967, 0.1623, 0.6117]}, {"w": "can", "b": [0.1685, 0.5967, 0.1962, 0.6117]}, {"w": "find", "b": [0.2023, 0.5967, 0.2331, 0.6117]}, {"w": "them", "b": [0.2392, 0.5967, 0.2802, 0.6117]}, {"w": "in", "b": [0.2864, 0.5967, 0.3018, 0.6117]}, {"w": "Figure", "b": [0.3079, 0.5967, 0.36, 0.6117]}, {"w": "18.", "b": [0.3662, 0.5967, 0.3897, 0.6117]}]}, {"id": "b_30", "type": "paragraph", "text": "Sometimes, a relational database can have a deeper structure. For example, a user can have orders, while each order can have ordered items. In such a case, we can compute a statistic of a statistic. For example, one feature can be created by first calculating the standard deviation of item prices in each order, and then by taking the average of those standard deviations for a specific user. You can combine the statistics in arbitrary ways: the mean of the mean, the standard deviation of the mean, the standard deviation of the standard deviation, and so on. The same principle applies to the database whose table structure is deeper than two levels.", "words": [{"w": "Sometimes,", "b": [0.1312, 0.6237, 0.2217, 0.6386]}, {"w": "a", "b": [0.2278, 0.6237, 0.237, 0.6386]}, {"w": "relational", "b": [0.2431, 0.6237, 0.3183, 0.6386]}, {"w": "database", "b": [0.3244, 0.6237, 0.3946, 0.6386]}, {"w": "can", "b": [0.4007, 0.6237, 0.4282, 0.6386]}, {"w": "have", "b": [0.4343, 0.6237, 0.4704, 0.6386]}, {"w": "a", "b": [0.4765, 0.6237, 0.4856, 0.6386]}, {"w": "deeper", "b": [0.4918, 0.6237, 0.5441, 0.6386]}, {"w": "structure.", "b": [0.5503, 0.6237, 0.6277, 0.6386]}, {"w": "For", "b": [0.6359, 0.6237, 0.6626, 0.6386]}, {"w": "example,", "b": [0.6687, 0.6237, 0.7393, 0.6386]}, {"w": "a", "b": [0.7454, 0.6237, 0.7546, 0.6386]}, {"w": "user", "b": [0.7607, 0.6237, 0.7934, 0.6386]}, {"w": "can", "b": [0.7995, 0.6237, 0.8269, 0.6386]}, {"w": "have", "b": [0.8331, 0.6237, 0.8691, 0.6386]}, {"w": "orders,", "b": [0.1312, 0.6416, 0.1847, 0.6566]}, {"w": "while", "b": [0.1905, 0.6416, 0.2317, 0.6566]}, {"w": "each", "b": [0.2373, 0.6416, 0.272, 0.6566]}, {"w": "order", "b": [0.2777, 0.6416, 0.319, 0.6566]}, {"w": "can", "b": [0.3246, 0.6416, 0.3518, 0.6566]}, {"w": "have", "b": [0.3574, 0.6416, 0.3931, 0.6566]}, {"w": "ordered", "b": [0.3988, 0.6416, 0.4582, 0.6566]}, {"w": "items.", "b": [0.4638, 0.6416, 0.5112, 0.6566]}, {"w": "In", "b": [0.5192, 0.6416, 0.5358, 0.6566]}, {"w": "such", "b": [0.5414, 0.6416, 0.5762, 0.6566]}, {"w": "a", "b": [0.5819, 0.6416, 0.5909, 0.6566]}, {"w": "case,", "b": [0.5966, 0.6416, 0.6339, 0.6566]}, {"w": "we", "b": [0.6397, 0.6416, 0.6602, 0.6566]}, {"w": "can", "b": [0.6659, 0.6416, 0.693, 0.6566]}, {"w": "compute", "b": [0.6987, 0.6416, 0.766, 0.6566]}, {"w": "a", "b": [0.7717, 0.6416, 0.7807, 0.6566]}, {"w": "statistic", "b": [0.7864, 0.6416, 0.8489, 0.6566]}, {"w": "of", "b": [0.8546, 0.6416, 0.8691, 0.6566]}, {"w": "a", "b": [0.1312, 0.6595, 0.1403, 0.6745]}, {"w": "statistic.", "b": [0.1456, 0.6595, 0.2131, 0.6745]}, {"w": "For", "b": [0.221, 0.6595, 0.2474, 0.6745]}, {"w": "example,", "b": [0.2527, 0.6595, 0.3225, 0.6745]}, {"w": "one", "b": [0.328, 0.6595, 0.3551, 0.6745]}, {"w": "feature", "b": [0.3604, 0.6595, 0.4152, 0.6745]}, {"w": "can", "b": [0.4205, 0.6595, 0.4476, 0.6745]}, {"w": "be", "b": [0.4529, 0.6595, 0.4715, 0.6745]}, {"w": "created", "b": [0.4768, 0.6595, 0.5342, 0.6745]}, {"w": "by", "b": [0.5394, 0.6595, 0.5585, 0.6745]}, {"w": "first", "b": [0.5638, 0.6595, 0.5951, 0.6745]}, {"w": "calculating", "b": [0.6004, 0.6595, 0.6858, 0.6745]}, {"w": "the", "b": [0.6911, 0.6595, 0.7162, 0.6745]}, {"w": "standard", "b": [0.7215, 0.6595, 0.791, 0.6745]}, {"w": "deviation", "b": [0.7963, 0.6595, 0.8691, 0.6745]}, {"w": "of", "b": [0.1312, 0.6775, 0.1459, 0.6925]}, {"w": "item", "b": [0.1521, 0.6775, 0.1875, 0.6925]}, {"w": "prices", "b": [0.1936, 0.6775, 0.2393, 0.6925]}, {"w": "in", "b": [0.2455, 0.6775, 0.2607, 0.6925]}, {"w": "each", "b": [0.2668, 0.6775, 0.3017, 0.6925]}, {"w": "order,", "b": [0.3079, 0.6775, 0.3546, 0.6925]}, {"w": "and", "b": [0.3607, 0.6775, 0.3901, 0.6925]}, {"w": "then", "b": [0.3962, 0.6775, 0.4316, 0.6925]}, {"w": "by", "b": [0.4378, 0.6775, 0.457, 0.6925]}, {"w": "taking", "b": [0.4632, 0.6775, 0.5132, 0.6925]}, {"w": "the", "b": [0.5194, 0.6775, 0.5447, 0.6925]}, {"w": "average", "b": [0.5509, 0.6775, 0.6101, 0.6925]}, {"w": "of", "b": [0.6163, 0.6775, 0.6309, 0.6925]}, {"w": "those", "b": [0.6371, 0.6775, 0.6787, 0.6925]}, {"w": "standard", "b": [0.6848, 0.6775, 0.7548, 0.6925]}, {"w": "deviations", "b": [0.761, 0.6775, 0.8415, 0.6925]}, {"w": "for", "b": [0.8477, 0.6775, 0.8695, 0.6925]}, {"w": "a", "b": [0.1312, 0.6954, 0.1404, 0.7104]}, {"w": "specific", "b": [0.1465, 0.6954, 0.2039, 0.7104]}, {"w": "user.", "b": [0.2101, 0.6954, 0.2478, 0.7104]}, {"w": "You", "b": [0.256, 0.6954, 0.2875, 0.7104]}, {"w": "can", "b": [0.2936, 0.6954, 0.321, 0.7104]}, {"w": "combine", "b": [0.3272, 0.6954, 0.3926, 0.7104]}, {"w": "the", "b": [0.3987, 0.6954, 0.4241, 0.7104]}, {"w": "statistics", "b": [0.4302, 0.6954, 0.5005, 0.7104]}, {"w": "in", "b": [0.5067, 0.6954, 0.5219, 0.7104]}, {"w": "arbitrary", "b": [0.5281, 0.6954, 0.5997, 0.7104]}, {"w": "ways:", "b": [0.6059, 0.6954, 0.6491, 0.7104]}, {"w": "the", "b": [0.6573, 0.6954, 0.6827, 0.7104]}, {"w": "mean", "b": [0.6888, 0.6954, 0.7314, 0.7104]}, {"w": "of", "b": [0.7376, 0.6954, 0.7523, 0.7104]}, {"w": "the", "b": [0.7584, 0.6954, 0.7838, 0.7104]}, {"w": "mean,", "b": [0.7899, 0.6954, 0.8376, 0.7104]}, {"w": "the", "b": [0.8438, 0.6954, 0.8691, 0.7104]}, {"w": "standard", "b": [0.1312, 0.7134, 0.2009, 0.7283]}, {"w": "deviation", "b": [0.2071, 0.7134, 0.2802, 0.7283]}, {"w": "of", "b": [0.2863, 0.7134, 0.3009, 0.7283]}, {"w": "the", "b": [0.3071, 0.7134, 0.3323, 0.7283]}, {"w": "mean,", "b": [0.3385, 0.7134, 0.3858, 0.7283]}, {"w": "the", "b": [0.392, 0.7134, 0.4172, 0.7283]}, {"w": "standard", "b": [0.4233, 0.7134, 0.4931, 0.7283]}, {"w": "deviation", "b": [0.4992, 0.7134, 0.5723, 0.7283]}, {"w": "of", "b": [0.5785, 0.7134, 0.5931, 0.7283]}, {"w": "the", "b": [0.5992, 0.7134, 0.6244, 0.7283]}, {"w": "standard", "b": [0.6306, 0.7134, 0.7003, 0.7283]}, {"w": "deviation,", "b": [0.7064, 0.7134, 0.7846, 0.7283]}, {"w": "and", "b": [0.7907, 0.7134, 0.82, 0.7283]}, {"w": "so", "b": [0.8261, 0.7134, 0.8423, 0.7283]}, {"w": "on.", "b": [0.8485, 0.7134, 0.8727, 0.7283]}, {"w": "The", "b": [0.1306, 0.7313, 0.1624, 0.7463]}, {"w": "same", "b": [0.1685, 0.7313, 0.2086, 0.7463]}, {"w": "principle", "b": [0.2148, 0.7313, 0.2845, 0.7463]}, {"w": "applies", "b": [0.2907, 0.7313, 0.3462, 0.7463]}, {"w": "to", "b": [0.3523, 0.7313, 0.3687, 0.7463]}, {"w": "the", "b": [0.3749, 0.7313, 0.4005, 0.7463]}, {"w": "database", "b": [0.4067, 0.7313, 0.4775, 0.7463]}, {"w": "whose", "b": [0.4837, 0.7313, 0.532, 0.7463]}, {"w": "table", "b": [0.5381, 0.7313, 0.5781, 0.7463]}, {"w": "structure", "b": [0.5843, 0.7313, 0.6573, 0.7463]}, {"w": "is", "b": [0.6635, 0.7313, 0.6759, 0.7463]}, {"w": "deeper", "b": [0.682, 0.7313, 0.7349, 0.7463]}, {"w": "than", "b": [0.7411, 0.7313, 0.778, 0.7463]}, {"w": "two", "b": [0.7841, 0.7313, 0.8128, 0.7463]}, {"w": "levels.", "b": [0.819, 0.7313, 0.8673, 0.7463]}]}, {"id": "b_31", "type": "paragraph", "text": "Once you have generated features based on all possible combinations of statistics, you can select the most useful ones by using one of the feature selection methods.", "words": [{"w": "Once", "b": [0.1312, 0.7583, 0.1729, 0.7732]}, {"w": "you", "b": [0.179, 0.7583, 0.2081, 0.7732]}, {"w": "have", "b": [0.2143, 0.7583, 0.2512, 0.7732]}, {"w": "generated", "b": [0.2574, 0.7583, 0.3365, 0.7732]}, {"w": "features", "b": [0.3426, 0.7583, 0.4068, 0.7732]}, {"w": "based", "b": [0.413, 0.7583, 0.4589, 0.7732]}, {"w": "on", "b": [0.465, 0.7583, 0.4848, 0.7732]}, {"w": "all", "b": [0.4909, 0.7583, 0.5107, 0.7732]}, {"w": "possible", "b": [0.5168, 0.7583, 0.581, 0.7732]}, {"w": "combinations", "b": [0.5871, 0.7583, 0.695, 0.7732]}, {"w": "of", "b": [0.7011, 0.7583, 0.7162, 0.7732]}, {"w": "statistics,", "b": [0.7223, 0.7583, 0.7997, 0.7732]}, {"w": "you", "b": [0.8058, 0.7583, 0.8349, 0.7732]}, {"w": "can", "b": [0.8411, 0.7583, 0.8692, 0.7732]}, {"w": "select", "b": [0.1312, 0.7762, 0.1755, 0.7912]}, {"w": "the", "b": [0.1816, 0.7762, 0.2072, 0.7912]}, {"w": "most", "b": [0.2134, 0.7762, 0.2524, 0.7912]}, {"w": "useful", "b": [0.2586, 0.7762, 0.3054, 0.7912]}, {"w": "ones", "b": [0.3115, 0.7762, 0.3465, 0.7912]}, {"w": "by", "b": [0.3527, 0.7762, 0.3721, 0.7912]}, {"w": "using", "b": [0.3783, 0.7762, 0.4204, 0.7912]}, {"w": "one", "b": [0.4266, 0.7762, 0.4543, 0.7912]}, {"w": "of", "b": [0.4604, 0.7762, 0.4753, 0.7912]}, {"w": "the", "b": [0.4815, 0.7762, 0.5071, 0.7912]}, {"w": "feature", "b": [0.5132, 0.7762, 0.5692, 0.7912]}, {"w": "selection", "b": [0.5753, 0.7762, 0.6442, 0.7912]}, {"w": "methods.", "b": [0.6503, 0.7762, 0.7237, 0.7912]}]}, {"id": "b_32", "type": "paragraph", "text": "If you want to increase the predictive power of your feature vectors, or when your training set is rather small, you can synthesize additional features that would help in predictions. There are two typical ways to synthesize additional features: from the data, or from other features.", "words": [{"w": "If", "b": [0.1312, 0.8031, 0.1433, 0.8181]}, {"w": "you", "b": [0.1489, 0.8031, 0.177, 0.8181]}, {"w": "want", "b": [0.1827, 0.8031, 0.2208, 0.8181]}, {"w": "to", "b": [0.2264, 0.8031, 0.2425, 0.8181]}, {"w": "increase", "b": [0.2481, 0.8031, 0.3106, 0.8181]}, {"w": "the", "b": [0.3162, 0.8031, 0.3413, 0.8181]}, {"w": "predictive", "b": [0.347, 0.8031, 0.4244, 0.8181]}, {"w": "power", "b": [0.43, 0.8031, 0.4768, 0.8181]}, {"w": "of", "b": [0.4824, 0.8031, 0.497, 0.8181]}, {"w": "your", "b": [0.5026, 0.8031, 0.5378, 0.8181]}, {"w": "feature", "b": [0.5434, 0.8031, 0.5982, 0.8181]}, {"w": "vectors,", "b": [0.6039, 0.8031, 0.6643, 0.8181]}, {"w": "or", "b": [0.67, 0.8031, 0.6862, 0.8181]}, {"w": "when", "b": [0.6918, 0.8031, 0.733, 0.8181]}, {"w": "your", "b": [0.7386, 0.8031, 0.7738, 0.8181]}, {"w": "training", "b": [0.7794, 0.8031, 0.8418, 0.8181]}, {"w": "set", "b": [0.8474, 0.8031, 0.8696, 0.8181]}, {"w": "is", "b": [0.1312, 0.8211, 0.1435, 0.836]}, {"w": "rather", "b": [0.1497, 0.8211, 0.1985, 0.836]}, {"w": "small,", "b": [0.2047, 0.8211, 0.2515, 0.836]}, {"w": "you", "b": [0.2576, 0.8211, 0.2861, 0.836]}, {"w": "can", "b": [0.2922, 0.8211, 0.3196, 0.836]}, {"w": "synthesize", "b": [0.3258, 0.8211, 0.4062, 0.836]}, {"w": "additional", "b": [0.4124, 0.8211, 0.4926, 0.836]}, {"w": "features", "b": [0.4988, 0.8211, 0.5614, 0.836]}, {"w": "that", "b": [0.5675, 0.8211, 0.601, 0.836]}, {"w": "would", "b": [0.6072, 0.8211, 0.6544, 0.836]}, {"w": "help", "b": [0.6605, 0.8211, 0.6941, 0.836]}, {"w": "in", "b": [0.7002, 0.8211, 0.7155, 0.836]}, {"w": "predictions.", "b": [0.7216, 0.8211, 0.8142, 0.836]}, {"w": "There", "b": [0.8224, 0.8211, 0.8692, 0.836]}, {"w": "are", "b": [0.1312, 0.839, 0.1556, 0.854]}, {"w": "two", "b": [0.1617, 0.839, 0.19, 0.854]}, {"w": "typical", "b": [0.1962, 0.839, 0.2498, 0.854]}, {"w": "ways", "b": [0.256, 0.839, 0.294, 0.854]}, {"w": "to", "b": [0.3002, 0.839, 0.3164, 0.854]}, {"w": "synthesize", "b": [0.3225, 0.839, 0.4027, 0.854]}, {"w": "additional", "b": [0.4088, 0.839, 0.4888, 0.854]}, {"w": "features:", "b": [0.4949, 0.839, 0.5624, 0.854]}, {"w": "from", "b": [0.5706, 0.839, 0.6076, 0.854]}, {"w": "the", "b": [0.6137, 0.839, 0.6391, 0.854]}, {"w": "data,", "b": [0.6452, 0.839, 0.6857, 0.854]}, {"w": "or", "b": [0.6918, 0.839, 0.7081, 0.854]}, {"w": "from", "b": [0.7142, 0.839, 0.7512, 0.854]}, {"w": "other", "b": [0.7574, 0.839, 0.7989, 0.854]}, {"w": "features.", "b": [0.8051, 0.839, 0.8725, 0.854]}]}, {"id": "b_33", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 30", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "30", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 120, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "4.6.3 Synthesizing Features from the Data", "words": [{"w": "4.6.3", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Synthesizing", "b": [0.1961, 0.0884, 0.312, 0.1034]}, {"w": "Features", "b": [0.3191, 0.0884, 0.3976, 0.1034]}, {"w": "from", "b": [0.4047, 0.0884, 0.4482, 0.1034]}, {"w": "the", "b": [0.4553, 0.0884, 0.485, 0.1034]}, {"w": "Data", "b": [0.4921, 0.0884, 0.5372, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "One technique commonly used to synthesize one or more additional features is clustering. Let us use the k-means clustering. Choose a value for k. If your ultimate goal is to build a classification model, a common way to assign a value for k is to use the number C of classes. In regression, use your intuition or apply any technique allowing to determine the right value of clusters in your data, such as prediction strength or the elbow method. Apply k-means clustering to the feature vectors in your training data. Then add k additional features to your feature vectors. The additional feature D + j, where j = 1, . . . , k, will be binary and equal to 1 if the corresponding feature vector belongs to cluster j.", "words": [{"w": "One", "b": [0.1312, 0.1247, 0.1643, 0.1396]}, {"w": "technique", "b": [0.1705, 0.1247, 0.2481, 0.1396]}, {"w": "commonly", "b": [0.2543, 0.1247, 0.3375, 0.1396]}, {"w": "used", "b": [0.3437, 0.1247, 0.38, 0.1396]}, {"w": "to", "b": [0.3862, 0.1247, 0.4027, 0.1396]}, {"w": "synthesize", "b": [0.4088, 0.1247, 0.4908, 0.1396]}, {"w": "one", "b": [0.497, 0.1247, 0.5249, 0.1396]}, {"w": "or", "b": [0.531, 0.1247, 0.5476, 0.1396]}, {"w": "more", "b": [0.5538, 0.1247, 0.5942, 0.1396]}, {"w": "additional", "b": [0.6003, 0.1247, 0.6821, 0.1396]}, {"w": "features", "b": [0.6882, 0.1247, 0.752, 0.1396]}, {"w": "is", "b": [0.7582, 0.1247, 0.7707, 0.1396]}, {"w": "clustering.", "b": [0.7765, 0.1247, 0.8723, 0.1399]}, {"w": "Let", "b": [0.1312, 0.1426, 0.1579, 0.1576]}, {"w": "us", "b": [0.164, 0.1426, 0.1814, 0.1576]}, {"w": "use", "b": [0.1876, 0.1426, 0.2131, 0.1576]}, {"w": "the", "b": [0.2192, 0.1426, 0.2446, 0.1576]}, {"w": "k-means", "b": [0.2507, 0.1429, 0.3268, 0.1579]}, {"w": "clustering.", "b": [0.3339, 0.1426, 0.4297, 0.1579]}, {"w": "Choose", "b": [0.4379, 0.1426, 0.4954, 0.1576]}, {"w": "a", "b": [0.5015, 0.1426, 0.5106, 0.1576]}, {"w": "value", "b": [0.5168, 0.1426, 0.5579, 0.1576]}, {"w": "for", "b": [0.5641, 0.1426, 0.5859, 0.1576]}, {"w": "k.", "b": [0.5921, 0.1426, 0.6073, 0.1579]}, {"w": "If", "b": [0.6155, 0.1426, 0.6277, 0.1576]}, {"w": "your", "b": [0.6339, 0.1426, 0.6695, 0.1576]}, {"w": "ultimate", "b": [0.6756, 0.1426, 0.7426, 0.1576]}, {"w": "goal", "b": [0.7488, 0.1426, 0.7813, 0.1576]}, {"w": "is", "b": [0.7874, 0.1426, 0.7997, 0.1576]}, {"w": "to", "b": [0.8059, 0.1426, 0.8221, 0.1576]}, {"w": "build", "b": [0.8282, 0.1426, 0.8689, 0.1576]}, {"w": "a", "b": [0.1312, 0.1606, 0.1406, 0.1755]}, {"w": "classification", "b": [0.1481, 0.1606, 0.2519, 0.1755]}, {"w": "model,", "b": [0.2594, 0.1606, 0.3143, 0.1755]}, {"w": "a", "b": [0.3221, 0.1606, 0.3315, 0.1755]}, {"w": "common", "b": [0.339, 0.1606, 0.408, 0.1755]}, {"w": "way", "b": [0.4155, 0.1606, 0.4474, 0.1755]}, {"w": "to", "b": [0.4549, 0.1606, 0.4716, 0.1755]}, {"w": "assign", "b": [0.4791, 0.1606, 0.5284, 0.1755]}, {"w": "a", "b": [0.5359, 0.1606, 0.5453, 0.1755]}, {"w": "value", "b": [0.5528, 0.1606, 0.5952, 0.1755]}, {"w": "for", "b": [0.6027, 0.1606, 0.6252, 0.1755]}, {"w": "k", "b": [0.6325, 0.1608, 0.6421, 0.1758]}, {"w": "is", "b": [0.6502, 0.1606, 0.6629, 0.1755]}, {"w": "to", "b": [0.6703, 0.1606, 0.6871, 0.1755]}, {"w": "use", "b": [0.6946, 0.1606, 0.7208, 0.1755]}, {"w": "the", "b": [0.7283, 0.1606, 0.7545, 0.1755]}, {"w": "number", "b": [0.7619, 0.1606, 0.8242, 0.1755]}, {"w": "C", "b": [0.8316, 0.1608, 0.8448, 0.1758]}, {"w": "of", "b": [0.8536, 0.1606, 0.8688, 0.1755]}, {"w": "classes.", "b": [0.1312, 0.1785, 0.19, 0.1935]}, {"w": "In", "b": [0.1982, 0.1785, 0.2154, 0.1935]}, {"w": "regression,", "b": [0.2215, 0.1785, 0.3074, 0.1935]}, {"w": "use", "b": [0.3135, 0.1785, 0.3397, 0.1935]}, {"w": "your", "b": [0.3459, 0.1785, 0.3824, 0.1935]}, {"w": "intuition", "b": [0.3886, 0.1785, 0.459, 0.1935]}, {"w": "or", "b": [0.4651, 0.1785, 0.4819, 0.1935]}, {"w": "apply", "b": [0.488, 0.1785, 0.5334, 0.1935]}, {"w": "any", "b": [0.5395, 0.1785, 0.5687, 0.1935]}, {"w": "technique", "b": [0.5749, 0.1785, 0.6531, 0.1935]}, {"w": "allowing", "b": [0.6593, 0.1785, 0.7265, 0.1935]}, {"w": "to", "b": [0.7327, 0.1785, 0.7494, 0.1935]}, {"w": "determine", "b": [0.7555, 0.1785, 0.8369, 0.1935]}, {"w": "the", "b": [0.8431, 0.1785, 0.8692, 0.1935]}, {"w": "right", "b": [0.1312, 0.1965, 0.1705, 0.2114]}, {"w": "value", "b": [0.1769, 0.1965, 0.2193, 0.2114]}, {"w": "of", "b": [0.2257, 0.1965, 0.2409, 0.2114]}, {"w": "clusters", "b": [0.2473, 0.1965, 0.3093, 0.2114]}, {"w": "in", "b": [0.3157, 0.1965, 0.3314, 0.2114]}, {"w": "your", "b": [0.3378, 0.1965, 0.3745, 0.2114]}, {"w": "data,", "b": [0.3809, 0.1965, 0.4228, 0.2114]}, {"w": "such", "b": [0.4292, 0.1965, 0.4655, 0.2114]}, {"w": "as", "b": [0.4719, 0.1965, 0.4887, 0.2114]}, {"w": "prediction", "b": [0.4949, 0.1968, 0.5889, 0.2117]}, {"w": "strength", "b": [0.5963, 0.1968, 0.6738, 0.2117]}, {"w": "or", "b": [0.6802, 0.1965, 0.697, 0.2114]}, {"w": "the", "b": [0.7034, 0.1965, 0.7296, 0.2114]}, {"w": "elbow", "b": [0.736, 0.1968, 0.7893, 0.2117]}, {"w": "method.", "b": [0.7967, 0.1965, 0.8723, 0.2117]}, {"w": "Apply", "b": [0.1305, 0.2144, 0.1788, 0.2294]}, {"w": "k-means", "b": [0.1846, 0.2144, 0.2501, 0.2296]}, {"w": "clustering", "b": [0.256, 0.2144, 0.3325, 0.2294]}, {"w": "to", "b": [0.3384, 0.2144, 0.3544, 0.2294]}, {"w": "the", "b": [0.3603, 0.2144, 0.3854, 0.2294]}, {"w": "feature", "b": [0.3912, 0.2144, 0.4461, 0.2294]}, {"w": "vectors", "b": [0.4519, 0.2144, 0.5073, 0.2294]}, {"w": "in", "b": [0.5132, 0.2144, 0.5283, 0.2294]}, {"w": "your", "b": [0.5341, 0.2144, 0.5693, 0.2294]}, {"w": "training", "b": [0.5751, 0.2144, 0.6375, 0.2294]}, {"w": "data.", "b": [0.6433, 0.2144, 0.6835, 0.2294]}, {"w": "Then", "b": [0.6916, 0.2144, 0.7328, 0.2294]}, {"w": "add", "b": [0.7387, 0.2144, 0.7678, 0.2294]}, {"w": "k", "b": [0.7734, 0.2147, 0.783, 0.2296]}, {"w": "additional", "b": [0.7894, 0.2144, 0.8688, 0.2294]}, {"w": "features", "b": [0.1312, 0.2324, 0.1957, 0.2473]}, {"w": "to", "b": [0.2021, 0.2324, 0.2188, 0.2473]}, {"w": "your", "b": [0.2251, 0.2324, 0.2618, 0.2473]}, {"w": "feature", "b": [0.2681, 0.2324, 0.3252, 0.2473]}, {"w": "vectors.", "b": [0.3315, 0.2324, 0.3944, 0.2473]}, {"w": "The", "b": [0.4031, 0.2324, 0.4356, 0.2473]}, {"w": "additional", "b": [0.4419, 0.2324, 0.5245, 0.2473]}, {"w": "feature", "b": [0.5308, 0.2324, 0.5879, 0.2473]}, {"w": "D", "b": [0.594, 0.2326, 0.6093, 0.2476]}, {"w": "+", "b": [0.614, 0.2324, 0.6286, 0.2473]}, {"w": "j,", "b": [0.6328, 0.2324, 0.6467, 0.2476]}, {"w": "where", "b": [0.6531, 0.2324, 0.7013, 0.2473]}, {"w": "j", "b": [0.7075, 0.2326, 0.7151, 0.2476]}, {"w": "=", "b": [0.7216, 0.2324, 0.7363, 0.2473]}, {"w": "1,", "b": [0.7417, 0.2324, 0.7562, 0.2476]}, {"w": ".", "b": [0.7593, 0.2326, 0.7644, 0.2476]}, {"w": ".", "b": [0.7675, 0.2326, 0.7726, 0.2476]}, {"w": ".", "b": [0.7757, 0.2326, 0.7808, 0.2476]}, {"w": ",", "b": [0.7839, 0.2326, 0.789, 0.2476]}, {"w": "k,", "b": [0.7921, 0.2324, 0.8075, 0.2476]}, {"w": "will", "b": [0.8138, 0.2324, 0.8431, 0.2473]}, {"w": "be", "b": [0.8494, 0.2324, 0.8688, 0.2473]}, {"w": "binary", "b": [0.1312, 0.2503, 0.1831, 0.2653]}, {"w": "and", "b": [0.1892, 0.2503, 0.219, 0.2653]}, {"w": "equal", "b": [0.2251, 0.2503, 0.2677, 0.2653]}, {"w": "to", "b": [0.2738, 0.2503, 0.2902, 0.2653]}, {"w": "1", "b": [0.2963, 0.2503, 0.3055, 0.2653]}, {"w": "if", "b": [0.3117, 0.2503, 0.3225, 0.2653]}, {"w": "the", "b": [0.3286, 0.2503, 0.3542, 0.2653]}, {"w": "corresponding", "b": [0.3604, 0.2503, 0.4729, 0.2653]}, {"w": "feature", "b": [0.479, 0.2503, 0.535, 0.2653]}, {"w": "vector", "b": [0.5411, 0.2503, 0.5904, 0.2653]}, {"w": "belongs", "b": [0.5966, 0.2503, 0.6567, 0.2653]}, {"w": "to", "b": [0.6628, 0.2503, 0.6792, 0.2653]}, {"w": "cluster", "b": [0.6854, 0.2503, 0.7389, 0.2653]}, {"w": "j.", "b": [0.7448, 0.2503, 0.7586, 0.2655]}]}, {"id": "b_2", "type": "paragraph", "text": "You can synthesize even more features by applying different clustering algorithms, or by restarting k-means multiple times from randomly chosen starting points.", "words": [{"w": "You", "b": [0.1305, 0.2772, 0.163, 0.2922]}, {"w": "can", "b": [0.1702, 0.2772, 0.1984, 0.2922]}, {"w": "synthesize", "b": [0.2056, 0.2772, 0.2885, 0.2922]}, {"w": "even", "b": [0.2957, 0.2772, 0.3323, 0.2922]}, {"w": "more", "b": [0.3395, 0.2772, 0.3804, 0.2922]}, {"w": "features", "b": [0.3876, 0.2772, 0.4521, 0.2922]}, {"w": "by", "b": [0.4593, 0.2772, 0.4792, 0.2922]}, {"w": "applying", "b": [0.4864, 0.2772, 0.557, 0.2922]}, {"w": "different", "b": [0.5642, 0.2772, 0.6322, 0.2922]}, {"w": "clustering", "b": [0.6394, 0.2772, 0.7191, 0.2922]}, {"w": "algorithms,", "b": [0.7263, 0.2772, 0.8185, 0.2922]}, {"w": "or", "b": [0.826, 0.2772, 0.8427, 0.2922]}, {"w": "by", "b": [0.8499, 0.2772, 0.8698, 0.2922]}, {"w": "restarting", "b": [0.1312, 0.2952, 0.2094, 0.3101]}, {"w": "k-means", "b": [0.2155, 0.2952, 0.2822, 0.3104]}, {"w": "multiple", "b": [0.2883, 0.2952, 0.3544, 0.3101]}, {"w": "times", "b": [0.3606, 0.2952, 0.4038, 0.3101]}, {"w": "from", "b": [0.4099, 0.2952, 0.4474, 0.3101]}, {"w": "randomly", "b": [0.4535, 0.2952, 0.53, 0.3101]}, {"w": "chosen", "b": [0.5361, 0.2952, 0.589, 0.3101]}, {"w": "starting", "b": [0.5952, 0.2952, 0.6579, 0.3101]}, {"w": "points.", "b": [0.6641, 0.2952, 0.7185, 0.3101]}]}, {"id": "b_3", "type": "paragraph", "text": "4.6.4 Synthesizing Features from Other Features", "words": [{"w": "4.6.4", "b": [0.1312, 0.3433, 0.1749, 0.3583]}, {"w": "Synthesizing", "b": [0.1961, 0.3433, 0.312, 0.3583]}, {"w": "Features", "b": [0.3191, 0.3433, 0.3976, 0.3583]}, {"w": "from", "b": [0.4047, 0.3433, 0.4482, 0.3583]}, {"w": "Other", "b": [0.4553, 0.3433, 0.5097, 0.3583]}, {"w": "Features", "b": [0.5168, 0.3433, 0.5953, 0.3583]}]}, {"id": "b_4", "type": "paragraph", "text": "Neural networks are notorious for their ability to learn complex features by combining simple features in unordinary ways. They combine simple features by letting their values undergo several levels of nested nonlinear transformations. If you have data in abundance, you can train a deep multilayer perceptron model that will learn to cleverly combine the basic unitary features it receives as input.", "words": [{"w": "Neural", "b": [0.1312, 0.3799, 0.1943, 0.3949]}, {"w": "networks", "b": [0.2022, 0.3799, 0.285, 0.3949]}, {"w": "are", "b": [0.2918, 0.3796, 0.317, 0.3946]}, {"w": "notorious", "b": [0.3238, 0.3796, 0.4003, 0.3946]}, {"w": "for", "b": [0.4071, 0.3796, 0.4297, 0.3946]}, {"w": "their", "b": [0.4365, 0.3796, 0.4753, 0.3946]}, {"w": "ability", "b": [0.4821, 0.3796, 0.5344, 0.3946]}, {"w": "to", "b": [0.5412, 0.3796, 0.558, 0.3946]}, {"w": "learn", "b": [0.5648, 0.3796, 0.6057, 0.3946]}, {"w": "complex", "b": [0.6125, 0.3796, 0.6799, 0.3946]}, {"w": "features", "b": [0.6868, 0.3796, 0.7513, 0.3946]}, {"w": "by", "b": [0.7581, 0.3796, 0.778, 0.3946]}, {"w": "combining", "b": [0.7848, 0.3796, 0.869, 0.3946]}, {"w": "simple", "b": [0.1312, 0.3975, 0.1836, 0.4125]}, {"w": "features", "b": [0.1902, 0.3975, 0.2547, 0.4125]}, {"w": "in", "b": [0.2613, 0.3975, 0.277, 0.4125]}, {"w": "unordinary", "b": [0.2835, 0.3975, 0.3741, 0.4125]}, {"w": "ways.", "b": [0.3807, 0.3975, 0.4252, 0.4125]}, {"w": "They", "b": [0.4347, 0.3975, 0.477, 0.4125]}, {"w": "combine", "b": [0.4836, 0.3975, 0.5511, 0.4125]}, {"w": "simple", "b": [0.5576, 0.3975, 0.61, 0.4125]}, {"w": "features", "b": [0.6166, 0.3975, 0.6811, 0.4125]}, {"w": "by", "b": [0.6877, 0.3975, 0.7075, 0.4125]}, {"w": "letting", "b": [0.7141, 0.3975, 0.7674, 0.4125]}, {"w": "their", "b": [0.774, 0.3975, 0.8128, 0.4125]}, {"w": "values", "b": [0.8193, 0.3975, 0.8692, 0.4125]}, {"w": "undergo", "b": [0.1312, 0.4155, 0.1968, 0.4304]}, {"w": "several", "b": [0.2029, 0.4155, 0.2582, 0.4304]}, {"w": "levels", "b": [0.2644, 0.4155, 0.3082, 0.4304]}, {"w": "of", "b": [0.3143, 0.4155, 0.3294, 0.4304]}, {"w": "nested", "b": [0.3355, 0.4155, 0.3876, 0.4304]}, {"w": "nonlinear", "b": [0.3938, 0.4155, 0.4697, 0.4304]}, {"w": "transformations.", "b": [0.4759, 0.4155, 0.6098, 0.4304]}, {"w": "If", "b": [0.618, 0.4155, 0.6304, 0.4304]}, {"w": "you", "b": [0.6366, 0.4155, 0.6657, 0.4304]}, {"w": "have", "b": [0.6718, 0.4155, 0.7088, 0.4304]}, {"w": "data", "b": [0.7149, 0.4155, 0.7513, 0.4304]}, {"w": "in", "b": [0.7574, 0.4155, 0.773, 0.4304]}, {"w": "abundance,", "b": [0.7792, 0.4155, 0.8717, 0.4304]}, {"w": "you", "b": [0.1308, 0.4334, 0.1591, 0.4484]}, {"w": "can", "b": [0.1652, 0.4334, 0.1926, 0.4484]}, {"w": "train", "b": [0.1987, 0.4334, 0.2373, 0.4484]}, {"w": "a", "b": [0.2434, 0.4334, 0.2526, 0.4484]}, {"w": "deep", "b": [0.2587, 0.4334, 0.2952, 0.4484]}, {"w": "multilayer", "b": [0.3012, 0.4337, 0.3949, 0.4487]}, {"w": "perceptron", "b": [0.4019, 0.4337, 0.5031, 0.4487]}, {"w": "model", "b": [0.5093, 0.4334, 0.5574, 0.4484]}, {"w": "that", "b": [0.5635, 0.4334, 0.597, 0.4484]}, {"w": "will", "b": [0.6031, 0.4334, 0.6314, 0.4484]}, {"w": "learn", "b": [0.6376, 0.4334, 0.6772, 0.4484]}, {"w": "to", "b": [0.6833, 0.4334, 0.6995, 0.4484]}, {"w": "cleverly", "b": [0.7056, 0.4334, 0.766, 0.4484]}, {"w": "combine", "b": [0.7721, 0.4334, 0.8375, 0.4484]}, {"w": "the", "b": [0.8436, 0.4334, 0.8689, 0.4484]}, {"w": "basic", "b": [0.1312, 0.4514, 0.1713, 0.4663]}, {"w": "unitary", "b": [0.1775, 0.4514, 0.2365, 0.4663]}, {"w": "features", "b": [0.2426, 0.4514, 0.3059, 0.4663]}, {"w": "it", "b": [0.312, 0.4514, 0.3243, 0.4663]}, {"w": "receives", "b": [0.3305, 0.4514, 0.3922, 0.4663]}, {"w": "as", "b": [0.3984, 0.4514, 0.4149, 0.4663]}, {"w": "input.", "b": [0.421, 0.4514, 0.4692, 0.4663]}]}, {"id": "b_5", "type": "paragraph", "text": "If you don’t have an infinite supply of training examples (often the case in practice), very deep neural networks lose their appeal.7 In the case of smaller to moderately large datasets (the number of training examples varies between a thousand and a hundred thousand), you", "words": [{"w": "If", "b": [0.1312, 0.4783, 0.1438, 0.4933]}, {"w": "you", "b": [0.15, 0.4783, 0.1793, 0.4933]}, {"w": "don’t", "b": [0.1856, 0.4783, 0.2284, 0.4933]}, {"w": "have", "b": [0.2347, 0.4783, 0.2719, 0.4933]}, {"w": "an", "b": [0.2781, 0.4783, 0.298, 0.4933]}, {"w": "infinite", "b": [0.3042, 0.4783, 0.3618, 0.4933]}, {"w": "supply", "b": [0.368, 0.4783, 0.422, 0.4933]}, {"w": "of", "b": [0.4282, 0.4783, 0.4434, 0.4933]}, {"w": "training", "b": [0.4496, 0.4783, 0.5145, 0.4933]}, {"w": "examples", "b": [0.5208, 0.4783, 0.5957, 0.4933]}, {"w": "(often", "b": [0.6019, 0.4783, 0.6506, 0.4933]}, {"w": "the", "b": [0.6568, 0.4783, 0.683, 0.4933]}, {"w": "case", "b": [0.6892, 0.4783, 0.7228, 0.4933]}, {"w": "in", "b": [0.7291, 0.4783, 0.7447, 0.4933]}, {"w": "practice),", "b": [0.751, 0.4783, 0.8284, 0.4933]}, {"w": "very", "b": [0.8347, 0.4783, 0.8698, 0.4933]}, {"w": "deep", "b": [0.1312, 0.4963, 0.168, 0.5112]}, {"w": "neural", "b": [0.1742, 0.4963, 0.2243, 0.5112]}, {"w": "networks", "b": [0.2304, 0.4963, 0.3016, 0.5112]}, {"w": "lose", "b": [0.3077, 0.4963, 0.3375, 0.5112]}, {"w": "their", "b": [0.3436, 0.4963, 0.3815, 0.5112]}, {"w": "appeal.7", "b": [0.3876, 0.4946, 0.4525, 0.5112]}, {"w": "In", "b": [0.4616, 0.4963, 0.4785, 0.5112]}, {"w": "the", "b": [0.4847, 0.4963, 0.5102, 0.5112]}, {"w": "case", "b": [0.5164, 0.4963, 0.5492, 0.5112]}, {"w": "of", "b": [0.5553, 0.4963, 0.5701, 0.5112]}, {"w": "smaller", "b": [0.5763, 0.4963, 0.6336, 0.5112]}, {"w": "to", "b": [0.6398, 0.4963, 0.6561, 0.5112]}, {"w": "moderately", "b": [0.6623, 0.4963, 0.7522, 0.5112]}, {"w": "large", "b": [0.7583, 0.4963, 0.7972, 0.5112]}, {"w": "datasets", "b": [0.8034, 0.4963, 0.8689, 0.5112]}, {"w": "(the", "b": [0.1291, 0.5142, 0.1619, 0.5292]}, {"w": "number", "b": [0.1681, 0.5142, 0.2291, 0.5292]}, {"w": "of", "b": [0.2353, 0.5142, 0.2501, 0.5292]}, {"w": "training", "b": [0.2563, 0.5142, 0.3199, 0.5292]}, {"w": "examples", "b": [0.3261, 0.5142, 0.3995, 0.5292]}, {"w": "varies", "b": [0.4057, 0.5142, 0.4515, 0.5292]}, {"w": "between", "b": [0.4576, 0.5142, 0.5227, 0.5292]}, {"w": "a", "b": [0.5289, 0.5142, 0.5381, 0.5292]}, {"w": "thousand", "b": [0.5443, 0.5142, 0.6182, 0.5292]}, {"w": "and", "b": [0.6244, 0.5142, 0.6541, 0.5292]}, {"w": "a", "b": [0.6603, 0.5142, 0.6695, 0.5292]}, {"w": "hundred", "b": [0.6757, 0.5142, 0.7419, 0.5292]}, {"w": "thousand),", "b": [0.748, 0.5142, 0.8343, 0.5292]}, {"w": "you", "b": [0.8404, 0.5142, 0.8691, 0.5292]}]}, {"id": "b_6", "type": "paragraph", "text": "might prefer to use a shallow learning algorithm and “help” your learning algorithm learn by providing a richer set of features.", "words": [{"w": "might", "b": [0.1312, 0.5321, 0.1769, 0.5471]}, {"w": "prefer", "b": [0.1831, 0.5321, 0.2289, 0.5471]}, {"w": "to", "b": [0.2351, 0.5321, 0.2512, 0.5471]}, {"w": "use", "b": [0.2573, 0.5321, 0.2826, 0.5471]}, {"w": "a", "b": [0.2887, 0.5321, 0.2978, 0.5471]}, {"w": "shallow", "b": [0.3039, 0.5321, 0.3618, 0.5471]}, {"w": "learning", "b": [0.368, 0.5321, 0.4313, 0.5471]}, {"w": "algorithm", "b": [0.4375, 0.5321, 0.5139, 0.5471]}, {"w": "and", "b": [0.5201, 0.5321, 0.5492, 0.5471]}, {"w": "“help”", "b": [0.5554, 0.5321, 0.6056, 0.5471]}, {"w": "your", "b": [0.6118, 0.5321, 0.647, 0.5471]}, {"w": "learning", "b": [0.6532, 0.5321, 0.7165, 0.5471]}, {"w": "algorithm", "b": [0.7227, 0.5321, 0.7991, 0.5471]}, {"w": "learn", "b": [0.8052, 0.5321, 0.8445, 0.5471]}, {"w": "by", "b": [0.8507, 0.5321, 0.8697, 0.5471]}, {"w": "providing", "b": [0.1312, 0.5501, 0.2072, 0.5651]}, {"w": "a", "b": [0.2133, 0.5501, 0.2225, 0.5651]}, {"w": "richer", "b": [0.2287, 0.5501, 0.2745, 0.5651]}, {"w": "set", "b": [0.2806, 0.5501, 0.3033, 0.5651]}, {"w": "of", "b": [0.3094, 0.5501, 0.3243, 0.5651]}, {"w": "features.", "b": [0.3304, 0.5501, 0.3988, 0.5651]}]}, {"id": "b_7", "type": "paragraph", "text": "In practice, the most common way to obtain new features from the existing features is to apply a simple transformation to one or a pair of existing features. Three typical simple transformations that apply to a numerical feature j in example i are 1) discretization of the feature, 2) squaring the feature, and 3) computing the sample mean and the standard deviation of feature j from k-nearest neighbors of the example i found by using some metric like Euclidean distance or cosine similarity.", "words": [{"w": "In", "b": [0.1312, 0.577, 0.1485, 0.592]}, {"w": "practice,", "b": [0.1549, 0.577, 0.225, 0.592]}, {"w": "the", "b": [0.2315, 0.577, 0.2576, 0.592]}, {"w": "most", "b": [0.264, 0.577, 0.3039, 0.592]}, {"w": "common", "b": [0.3103, 0.577, 0.3793, 0.592]}, {"w": "way", "b": [0.3857, 0.577, 0.4176, 0.592]}, {"w": "to", "b": [0.424, 0.577, 0.4407, 0.592]}, {"w": "obtain", "b": [0.4471, 0.577, 0.4994, 0.592]}, {"w": "new", "b": [0.5058, 0.577, 0.5382, 0.592]}, {"w": "features", "b": [0.5446, 0.577, 0.6091, 0.592]}, {"w": "from", "b": [0.6154, 0.577, 0.6537, 0.592]}, {"w": "the", "b": [0.6601, 0.577, 0.6862, 0.592]}, {"w": "existing", "b": [0.6926, 0.577, 0.756, 0.592]}, {"w": "features", "b": [0.7624, 0.577, 0.8269, 0.592]}, {"w": "is", "b": [0.8333, 0.577, 0.846, 0.592]}, {"w": "to", "b": [0.8523, 0.577, 0.8691, 0.592]}, {"w": "apply", "b": [0.1312, 0.595, 0.1767, 0.6099]}, {"w": "a", "b": [0.1837, 0.595, 0.1931, 0.6099]}, {"w": "simple", "b": [0.2, 0.595, 0.2524, 0.6099]}, {"w": "transformation", "b": [0.2593, 0.595, 0.3814, 0.6099]}, {"w": "to", "b": [0.3883, 0.595, 0.405, 0.6099]}, {"w": "one", "b": [0.4119, 0.595, 0.4402, 0.6099]}, {"w": "or", "b": [0.4471, 0.595, 0.4639, 0.6099]}, {"w": "a", "b": [0.4708, 0.595, 0.4802, 0.6099]}, {"w": "pair", "b": [0.4872, 0.595, 0.5196, 0.6099]}, {"w": "of", "b": [0.5265, 0.595, 0.5417, 0.6099]}, {"w": "existing", "b": [0.5486, 0.595, 0.612, 0.6099]}, {"w": "features.", "b": [0.619, 0.595, 0.6887, 0.6099]}, {"w": "Three", "b": [0.6992, 0.595, 0.7474, 0.6099]}, {"w": "typical", "b": [0.7543, 0.595, 0.8098, 0.6099]}, {"w": "simple", "b": [0.8167, 0.595, 0.8691, 0.6099]}, {"w": "transformations", "b": [0.1312, 0.6129, 0.2605, 0.6279]}, {"w": "that", "b": [0.2666, 0.6129, 0.3011, 0.6279]}, {"w": "apply", "b": [0.3072, 0.6129, 0.3526, 0.6279]}, {"w": "to", "b": [0.3588, 0.6129, 0.3755, 0.6279]}, {"w": "a", "b": [0.3817, 0.6129, 0.3911, 0.6279]}, {"w": "numerical", "b": [0.3972, 0.6129, 0.4772, 0.6279]}, {"w": "feature", "b": [0.4833, 0.6129, 0.5403, 0.6279]}, {"w": "j", "b": [0.5463, 0.6132, 0.5539, 0.6281]}, {"w": "in", "b": [0.5611, 0.6129, 0.5768, 0.6279]}, {"w": "example", "b": [0.5829, 0.6129, 0.6503, 0.6279]}, {"w": "i", "b": [0.6564, 0.6132, 0.6628, 0.6281]}, {"w": "are", "b": [0.6689, 0.6129, 0.694, 0.6279]}, {"w": "1)", "b": [0.7002, 0.6129, 0.7169, 0.6279]}, {"w": "discretization", "b": [0.723, 0.6132, 0.8474, 0.6282]}, {"w": "of", "b": [0.8536, 0.6129, 0.8688, 0.6279]}, {"w": "the", "b": [0.1312, 0.6309, 0.1574, 0.6458]}, {"w": "feature,", "b": [0.1635, 0.6309, 0.2257, 0.6458]}, {"w": "2)", "b": [0.2319, 0.6309, 0.2486, 0.6458]}, {"w": "squaring", "b": [0.2547, 0.6309, 0.3244, 0.6458]}, {"w": "the", "b": [0.3305, 0.6309, 0.3566, 0.6458]}, {"w": "feature,", "b": [0.3627, 0.6309, 0.425, 0.6458]}, {"w": "and", "b": [0.4311, 0.6309, 0.4614, 0.6458]}, {"w": "3)", "b": [0.4675, 0.6309, 0.4843, 0.6458]}, {"w": "computing", "b": [0.4904, 0.6309, 0.5771, 0.6458]}, {"w": "the", "b": [0.5832, 0.6309, 0.6094, 0.6458]}, {"w": "sample", "b": [0.6155, 0.6309, 0.672, 0.6458]}, {"w": "mean", "b": [0.6782, 0.6309, 0.722, 0.6458]}, {"w": "and", "b": [0.7282, 0.6309, 0.7585, 0.6458]}, {"w": "the", "b": [0.7646, 0.6309, 0.7907, 0.6458]}, {"w": "standard", "b": [0.7968, 0.6309, 0.8691, 0.6458]}, {"w": "deviation", "b": [0.1312, 0.6488, 0.2046, 0.6638]}, {"w": "of", "b": [0.2108, 0.6488, 0.2254, 0.6638]}, {"w": "feature", "b": [0.2316, 0.6488, 0.2868, 0.6638]}, {"w": "j", "b": [0.2928, 0.6491, 0.3004, 0.664]}, {"w": "from", "b": [0.3076, 0.6488, 0.3446, 0.6638]}, {"w": "k-nearest", "b": [0.3507, 0.6488, 0.4238, 0.664]}, {"w": "neighbors", "b": [0.43, 0.6488, 0.5061, 0.6638]}, {"w": "of", "b": [0.5122, 0.6488, 0.5269, 0.6638]}, {"w": "the", "b": [0.533, 0.6488, 0.5583, 0.6638]}, {"w": "example", "b": [0.5645, 0.6488, 0.6297, 0.6638]}, {"w": "i", "b": [0.6357, 0.6491, 0.6421, 0.664]}, {"w": "found", "b": [0.6482, 0.6488, 0.6933, 0.6638]}, {"w": "by", "b": [0.6994, 0.6488, 0.7186, 0.6638]}, {"w": "using", "b": [0.7248, 0.6488, 0.7664, 0.6638]}, {"w": "some", "b": [0.7725, 0.6488, 0.8121, 0.6638]}, {"w": "metric", "b": [0.8182, 0.6488, 0.8689, 0.6638]}, {"w": "like", "b": [0.1312, 0.6667, 0.1589, 0.6817]}, {"w": "Euclidean", "b": [0.1651, 0.6667, 0.2443, 0.6817]}, {"w": "distance", "b": [0.2505, 0.6667, 0.3162, 0.6817]}, {"w": "or", "b": [0.3224, 0.6667, 0.3388, 0.6817]}, {"w": "cosine", "b": [0.345, 0.6667, 0.3933, 0.6817]}, {"w": "similarity.", "b": [0.3994, 0.6667, 0.4791, 0.6817]}]}, {"id": "b_8", "type": "paragraph", "text": "Transformations that apply to a pair of numerical features are simple arithmetic operators: +, −, ×, and ÷ (a technique also known as feature-crossing). For example, you can obtain", "words": [{"w": "Transformations", "b": [0.1306, 0.6937, 0.2628, 0.7086]}, {"w": "that", "b": [0.2689, 0.6937, 0.3029, 0.7086]}, {"w": "apply", "b": [0.3091, 0.6937, 0.3539, 0.7086]}, {"w": "to", "b": [0.3601, 0.6937, 0.3766, 0.7086]}, {"w": "a", "b": [0.3827, 0.6937, 0.392, 0.7086]}, {"w": "pair", "b": [0.3981, 0.6937, 0.4301, 0.7086]}, {"w": "of", "b": [0.4363, 0.6937, 0.4512, 0.7086]}, {"w": "numerical", "b": [0.4574, 0.6937, 0.5363, 0.7086]}, {"w": "features", "b": [0.5424, 0.6937, 0.606, 0.7086]}, {"w": "are", "b": [0.6121, 0.6937, 0.6369, 0.7086]}, {"w": "simple", "b": [0.6431, 0.6937, 0.6947, 0.7086]}, {"w": "arithmetic", "b": [0.7009, 0.6937, 0.7844, 0.7086]}, {"w": "operators:", "b": [0.7905, 0.6937, 0.8717, 0.7086]}, {"w": "+,", "b": [0.1277, 0.7116, 0.1467, 0.7266]}, {"w": "−,", "b": [0.1527, 0.7116, 0.1721, 0.7267]}, {"w": "×,", "b": [0.178, 0.7116, 0.1974, 0.7267]}, {"w": "and", "b": [0.2033, 0.7116, 0.2325, 0.7266]}, {"w": "÷", "b": [0.2384, 0.7117, 0.2527, 0.7267]}, {"w": "(a", "b": [0.2586, 0.7116, 0.2747, 0.7266]}, {"w": "technique", "b": [0.2806, 0.7116, 0.356, 0.7266]}, {"w": "also", "b": [0.3619, 0.7116, 0.3921, 0.7266]}, {"w": "known", "b": [0.3981, 0.7116, 0.4493, 0.7266]}, {"w": "as", "b": [0.4552, 0.7116, 0.4714, 0.7266]}, {"w": "feature-crossing).", "b": [0.4772, 0.7116, 0.6353, 0.7269]}, {"w": "For", "b": [0.6434, 0.7116, 0.6698, 0.7266]}, {"w": "example,", "b": [0.6758, 0.7116, 0.7456, 0.7266]}, {"w": "you", "b": [0.7516, 0.7116, 0.7797, 0.7266]}, {"w": "can", "b": [0.7856, 0.7116, 0.8127, 0.7266]}, {"w": "obtain", "b": [0.8186, 0.7116, 0.8689, 0.7266]}]}, {"id": "b_9", "type": "paragraph", "text": "the value of a new feature q in example i, where q > D, by combining the values of features 2 and 6 in the following way: x(q) i", "words": [{"w": "the", "b": [0.1312, 0.7296, 0.1567, 0.7445]}, {"w": "value", "b": [0.1629, 0.7296, 0.2041, 0.7445]}, {"w": "of", "b": [0.2102, 0.7296, 0.225, 0.7445]}, {"w": "a", "b": [0.2312, 0.7296, 0.2403, 0.7445]}, {"w": "new", "b": [0.2465, 0.7296, 0.2781, 0.7445]}, {"w": "feature", "b": [0.2842, 0.7296, 0.3398, 0.7445]}, {"w": "q", "b": [0.3458, 0.7298, 0.3541, 0.7448]}, {"w": "in", "b": [0.3609, 0.7296, 0.3762, 0.7445]}, {"w": "example", "b": [0.3823, 0.7296, 0.448, 0.7445]}, {"w": "i,", "b": [0.4541, 0.7296, 0.4656, 0.7448]}, {"w": "where", "b": [0.4717, 0.7296, 0.5186, 0.7445]}, {"w": "q", "b": [0.5248, 0.7298, 0.533, 0.7448]}, {"w": ">", "b": [0.5388, 0.7298, 0.5531, 0.7448]}, {"w": "D,", "b": [0.5583, 0.7296, 0.5792, 0.7448]}, {"w": "by", "b": [0.5853, 0.7296, 0.6047, 0.7445]}, {"w": "combining", "b": [0.6108, 0.7296, 0.6928, 0.7445]}, {"w": "the", "b": [0.6989, 0.7296, 0.7244, 0.7445]}, {"w": "values", "b": [0.7306, 0.7296, 0.779, 0.7445]}, {"w": "of", "b": [0.7852, 0.7296, 0.8, 0.7445]}, {"w": "features", "b": [0.8061, 0.7296, 0.8689, 0.7445]}, {"w": "2", "b": [0.1308, 0.7514, 0.1402, 0.7663]}, {"w": "and", "b": [0.1463, 0.7514, 0.1766, 0.7663]}, {"w": "6", "b": [0.1827, 0.7514, 0.1921, 0.7663]}, {"w": "in", "b": [0.1982, 0.7514, 0.2139, 0.7663]}, {"w": "the", "b": [0.22, 0.7514, 0.2461, 0.7663]}, {"w": "following", "b": [0.2523, 0.7514, 0.3252, 0.7663]}, {"w": "way:", "b": [0.3314, 0.7514, 0.3684, 0.7663]}, {"w": "x(q)", "b": [0.3766, 0.7474, 0.4059, 0.7666]}, {"w": "i", "b": [0.3871, 0.7593, 0.3923, 0.7698]}]}, {"id": "b_10", "type": "equation", "text": "def = x(2)", "words": [{"w": "def", "b": [0.4119, 0.7465, 0.4312, 0.7569]}, {"w": "=", "b": [0.4144, 0.7514, 0.4288, 0.7663]}, {"w": "x(2)", "b": [0.4363, 0.7474, 0.4658, 0.7666]}]}, {"id": "b_11", "type": "paragraph", "text": "i ÷ x(6)", "words": [{"w": "i", "b": [0.4469, 0.7593, 0.4521, 0.7698]}, {"w": "÷", "b": [0.4708, 0.7514, 0.4852, 0.7664]}, {"w": "x(6)", "b": [0.4893, 0.7474, 0.5187, 0.7666]}]}, {"id": "b_12", "type": "paragraph", "text": "i . I selected features 2 and 6, as well as the transformation ÷ arbitrarily. If the number D of original features is not too large, you can generate all possible transformations (by considering all pairs of features and all arithmetic operators). Then, by using one of the feature selection methods, select those that increase the quality of the model.", "words": [{"w": "i", "b": [0.4998, 0.7593, 0.505, 0.7698]}, {"w": ".", "b": [0.5196, 0.7514, 0.5248, 0.7663]}, {"w": "I", "b": [0.533, 0.7514, 0.5398, 0.7663]}, {"w": "selected", "b": [0.5459, 0.7514, 0.6097, 0.7663]}, {"w": "features", "b": [0.6159, 0.7514, 0.6802, 0.7663]}, {"w": "2", "b": [0.6862, 0.7514, 0.6956, 0.7663]}, {"w": "and", "b": [0.7018, 0.7514, 0.732, 0.7663]}, {"w": "6,", "b": [0.7381, 0.7514, 0.7527, 0.7663]}, {"w": "as", "b": [0.7589, 0.7514, 0.7757, 0.7663]}, {"w": "well", "b": [0.7818, 0.7514, 0.8136, 0.7663]}, {"w": "as", "b": [0.8198, 0.7514, 0.8366, 0.7663]}, {"w": "the", "b": [0.8427, 0.7514, 0.8688, 0.7663]}, {"w": "transformation", "b": [0.1312, 0.7693, 0.2517, 0.7843]}, {"w": "÷", "b": [0.2578, 0.7694, 0.2722, 0.7843]}, {"w": "arbitrarily.", "b": [0.2783, 0.7693, 0.3652, 0.7843]}, {"w": "If", "b": [0.3734, 0.7693, 0.3858, 0.7843]}, {"w": "the", "b": [0.3919, 0.7693, 0.4177, 0.7843]}, {"w": "number", "b": [0.4239, 0.7693, 0.4854, 0.7843]}, {"w": "D", "b": [0.4914, 0.7696, 0.5067, 0.7845]}, {"w": "of", "b": [0.5133, 0.7693, 0.5283, 0.7843]}, {"w": "original", "b": [0.5344, 0.7693, 0.5954, 0.7843]}, {"w": "features", "b": [0.6015, 0.7693, 0.6652, 0.7843]}, {"w": "is", "b": [0.6714, 0.7693, 0.6839, 0.7843]}, {"w": "not", "b": [0.69, 0.7693, 0.7168, 0.7843]}, {"w": "too", "b": [0.723, 0.7693, 0.7493, 0.7843]}, {"w": "large,", "b": [0.7554, 0.7693, 0.7999, 0.7843]}, {"w": "you", "b": [0.806, 0.7693, 0.8349, 0.7843]}, {"w": "can", "b": [0.841, 0.7693, 0.8689, 0.7843]}, {"w": "generate", "b": [0.1312, 0.7873, 0.199, 0.8022]}, {"w": "all", "b": [0.2052, 0.7873, 0.2247, 0.8022]}, {"w": "possible", "b": [0.2308, 0.7873, 0.2942, 0.8022]}, {"w": "transformations", "b": [0.3003, 0.7873, 0.4274, 0.8022]}, {"w": "(by", "b": [0.4335, 0.7873, 0.4602, 0.8022]}, {"w": "considering", "b": [0.4663, 0.7873, 0.5569, 0.8022]}, {"w": "all", "b": [0.563, 0.7873, 0.5825, 0.8022]}, {"w": "pairs", "b": [0.5886, 0.7873, 0.6278, 0.8022]}, {"w": "of", "b": [0.6339, 0.7873, 0.6488, 0.8022]}, {"w": "features", "b": [0.655, 0.7873, 0.7183, 0.8022]}, {"w": "and", "b": [0.7244, 0.7873, 0.7542, 0.8022]}, {"w": "all", "b": [0.7603, 0.7873, 0.7798, 0.8022]}, {"w": "arithmetic", "b": [0.786, 0.7873, 0.8691, 0.8022]}, {"w": "operators).", "b": [0.1312, 0.8052, 0.2203, 0.8202]}, {"w": "Then,", "b": [0.2285, 0.8052, 0.2764, 0.8202]}, {"w": "by", "b": [0.2825, 0.8052, 0.3023, 0.8202]}, {"w": "using", "b": [0.3084, 0.8052, 0.3512, 0.8202]}, {"w": "one", "b": [0.3573, 0.8052, 0.3854, 0.8202]}, {"w": "of", "b": [0.3915, 0.8052, 0.4066, 0.8202]}, {"w": "the", "b": [0.4127, 0.8052, 0.4387, 0.8202]}, {"w": "feature", "b": [0.4448, 0.8052, 0.5016, 0.8202]}, {"w": "selection", "b": [0.5077, 0.8052, 0.5775, 0.8202]}, {"w": "methods,", "b": [0.5837, 0.8052, 0.6581, 0.8202]}, {"w": "select", "b": [0.6642, 0.8052, 0.7091, 0.8202]}, {"w": "those", "b": [0.7152, 0.8052, 0.758, 0.8202]}, {"w": "that", "b": [0.7641, 0.8052, 0.7984, 0.8202]}, {"w": "increase", "b": [0.8045, 0.8052, 0.8692, 0.8202]}, {"w": "the", "b": [0.1312, 0.8232, 0.1569, 0.8381]}, {"w": "quality", "b": [0.163, 0.8232, 0.2189, 0.8381]}, {"w": "of", "b": [0.2251, 0.8232, 0.2399, 0.8381]}, {"w": "the", "b": [0.2461, 0.8232, 0.2717, 0.8381]}, {"w": "model.", "b": [0.2779, 0.8232, 0.3317, 0.8381]}]}, {"id": "b_13", "type": "paragraph", "text": "7Unless you use deep pre-trained models in transfer learning, as we will discuss in the next chapter.", "words": [{"w": "7Unless", "b": [0.1518, 0.8502, 0.2036, 0.8641]}, {"w": "you", "b": [0.2088, 0.8521, 0.2332, 0.8641]}, {"w": "use", "b": [0.2385, 0.8521, 0.2603, 0.8641]}, {"w": "deep", "b": [0.2655, 0.8521, 0.2969, 0.8641]}, {"w": "pre-trained", "b": [0.3021, 0.8521, 0.3779, 0.8641]}, {"w": "models", "b": [0.3831, 0.8521, 0.4307, 0.8641]}, {"w": "in", "b": [0.4359, 0.8521, 0.449, 0.8641]}, {"w": "transfer", "b": [0.4543, 0.8521, 0.516, 0.864]}, {"w": "learning,", "b": [0.5221, 0.8521, 0.5903, 0.8641]}, {"w": "as", "b": [0.5955, 0.8521, 0.6095, 0.8641]}, {"w": "we", "b": [0.6148, 0.8521, 0.6326, 0.8641]}, {"w": "will", "b": [0.6379, 0.8521, 0.6622, 0.8641]}, {"w": "discuss", "b": [0.6675, 0.8521, 0.7147, 0.8641]}, {"w": "in", "b": [0.72, 0.8521, 0.7331, 0.8641]}, {"w": "the", "b": [0.7383, 0.8521, 0.76, 0.8641]}, {"w": "next", "b": [0.7653, 0.8521, 0.7953, 0.8641]}, {"w": "chapter.", "b": [0.8005, 0.8521, 0.8559, 0.8641]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 31", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "31", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 121, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "4.7 Learning Features from Data", "words": [{"w": "4.7", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Learning", "b": [0.188, 0.0861, 0.2837, 0.104]}, {"w": "Features", "b": [0.292, 0.0861, 0.3839, 0.104]}, {"w": "from", "b": [0.3922, 0.0861, 0.4433, 0.104]}, {"w": "Data", "b": [0.4516, 0.0861, 0.5046, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "Sometimes, useful features can be learned from data. Learning features from data is especially effective when we can get access to large collections of relevant labeled or unlabeled data, such as text corpora or collections of images from the Web.", "words": [{"w": "Sometimes,", "b": [0.1312, 0.1247, 0.2208, 0.1396]}, {"w": "useful", "b": [0.2261, 0.1247, 0.272, 0.1396]}, {"w": "features", "b": [0.2771, 0.1247, 0.3391, 0.1396]}, {"w": "can", "b": [0.3443, 0.1247, 0.3714, 0.1396]}, {"w": "be", "b": [0.3766, 0.1247, 0.3952, 0.1396]}, {"w": "learned", "b": [0.4004, 0.1247, 0.4577, 0.1396]}, {"w": "from", "b": [0.4629, 0.1247, 0.4996, 0.1396]}, {"w": "data.", "b": [0.5048, 0.1247, 0.545, 0.1396]}, {"w": "Learning", "b": [0.5528, 0.1247, 0.6225, 0.1396]}, {"w": "features", "b": [0.6276, 0.1247, 0.6896, 0.1396]}, {"w": "from", "b": [0.6948, 0.1247, 0.7315, 0.1396]}, {"w": "data", "b": [0.7367, 0.1247, 0.7718, 0.1396]}, {"w": "is", "b": [0.777, 0.1247, 0.7892, 0.1396]}, {"w": "especially", "b": [0.7943, 0.1247, 0.8698, 0.1396]}, {"w": "effective", "b": [0.1312, 0.1426, 0.1977, 0.1576]}, {"w": "when", "b": [0.2041, 0.1426, 0.247, 0.1576]}, {"w": "we", "b": [0.2534, 0.1426, 0.2748, 0.1576]}, {"w": "can", "b": [0.2813, 0.1426, 0.3095, 0.1576]}, {"w": "get", "b": [0.3159, 0.1426, 0.341, 0.1576]}, {"w": "access", "b": [0.3474, 0.1426, 0.3968, 0.1576]}, {"w": "to", "b": [0.4033, 0.1426, 0.42, 0.1576]}, {"w": "large", "b": [0.4264, 0.1426, 0.4662, 0.1576]}, {"w": "collections", "b": [0.4726, 0.1426, 0.5574, 0.1576]}, {"w": "of", "b": [0.5639, 0.1426, 0.579, 0.1576]}, {"w": "relevant", "b": [0.5854, 0.1426, 0.6504, 0.1576]}, {"w": "labeled", "b": [0.6568, 0.1426, 0.7149, 0.1576]}, {"w": "or", "b": [0.7213, 0.1426, 0.7381, 0.1576]}, {"w": "unlabeled", "b": [0.7445, 0.1426, 0.8235, 0.1576]}, {"w": "data,", "b": [0.8299, 0.1426, 0.8717, 0.1576]}, {"w": "such", "b": [0.1312, 0.1606, 0.1667, 0.1755]}, {"w": "as", "b": [0.1729, 0.1606, 0.1894, 0.1755]}, {"w": "text", "b": [0.1955, 0.1606, 0.2279, 0.1755]}, {"w": "corpora", "b": [0.234, 0.1606, 0.2951, 0.1755]}, {"w": "or", "b": [0.3013, 0.1606, 0.3177, 0.1755]}, {"w": "collections", "b": [0.3239, 0.1606, 0.407, 0.1755]}, {"w": "of", "b": [0.4132, 0.1606, 0.4281, 0.1755]}, {"w": "images", "b": [0.4342, 0.1606, 0.4887, 0.1755]}, {"w": "from", "b": [0.4948, 0.1606, 0.5323, 0.1755]}, {"w": "the", "b": [0.5384, 0.1606, 0.5641, 0.1755]}, {"w": "Web.", "b": [0.5702, 0.1606, 0.6112, 0.1755]}]}, {"id": "b_2", "type": "paragraph", "text": "4.7.1 Word Embeddings", "words": [{"w": "4.7.1", "b": [0.1312, 0.2087, 0.1749, 0.2237]}, {"w": "Word", "b": [0.1961, 0.2087, 0.2474, 0.2237]}, {"w": "Embeddings", "b": [0.2545, 0.2087, 0.3678, 0.2237]}]}, {"id": "b_3", "type": "paragraph", "text": "In Chapter 3, we used word embeddings for data augmentation. Word embeddings are feature vectors that represent words. Similar words have similar feature vectors, where similarity is given by a certain measure, such as cosine similarity. Word embeddings are learned from large corpora of text documents. A shallow neural network with one hidden layer (called the embedding layer) is trained to predict a word, given its surrounding words, or to predict the surrounding words, given the word in the middle. Once the neural network is trained, the parameters of the embedding layer are used as word embeddings. There are many algorithms to learn word embeddings from data. The most widely used algorithm, invented at Google, with the code available in open source, is word2vec. Pre-trained word2vec embeddings for many languages are available for download.", "words": [{"w": "In", "b": [0.1312, 0.245, 0.1485, 0.26]}, {"w": "Chapter", "b": [0.155, 0.245, 0.222, 0.26]}, {"w": "3,", "b": [0.2284, 0.245, 0.2431, 0.26]}, {"w": "we", "b": [0.2497, 0.245, 0.2711, 0.26]}, {"w": "used", "b": [0.2776, 0.245, 0.3143, 0.26]}, {"w": "word", "b": [0.3208, 0.245, 0.3611, 0.26]}, {"w": "embeddings", "b": [0.3676, 0.245, 0.464, 0.26]}, {"w": "for", "b": [0.4705, 0.245, 0.493, 0.26]}, {"w": "data", "b": [0.4995, 0.245, 0.5361, 0.26]}, {"w": "augmentation.", "b": [0.5426, 0.245, 0.6602, 0.26]}, {"w": "Word", "b": [0.6692, 0.2453, 0.7205, 0.2603]}, {"w": "embeddings", "b": [0.728, 0.2453, 0.8372, 0.2603]}, {"w": "are", "b": [0.8436, 0.245, 0.8688, 0.26]}, {"w": "feature", "b": [0.1312, 0.2629, 0.1883, 0.2779]}, {"w": "vectors", "b": [0.1962, 0.2629, 0.2539, 0.2779]}, {"w": "that", "b": [0.2619, 0.2629, 0.2964, 0.2779]}, {"w": "represent", "b": [0.3043, 0.2629, 0.3794, 0.2779]}, {"w": "words.", "b": [0.3873, 0.2629, 0.4403, 0.2779]}, {"w": "Similar", "b": [0.4538, 0.2629, 0.5124, 0.2779]}, {"w": "words", "b": [0.5204, 0.2629, 0.5681, 0.2779]}, {"w": "have", "b": [0.576, 0.2629, 0.6132, 0.2779]}, {"w": "similar", "b": [0.6211, 0.2629, 0.6767, 0.2779]}, {"w": "feature", "b": [0.6846, 0.2629, 0.7417, 0.2779]}, {"w": "vectors,", "b": [0.7497, 0.2629, 0.8126, 0.2779]}, {"w": "where", "b": [0.821, 0.2629, 0.8691, 0.2779]}, {"w": "similarity", "b": [0.1312, 0.2809, 0.2081, 0.2958]}, {"w": "is", "b": [0.2143, 0.2809, 0.2268, 0.2958]}, {"w": "given", "b": [0.233, 0.2809, 0.2755, 0.2958]}, {"w": "by", "b": [0.2816, 0.2809, 0.3013, 0.2958]}, {"w": "a", "b": [0.3075, 0.2809, 0.3168, 0.2958]}, {"w": "certain", "b": [0.3229, 0.2809, 0.379, 0.2958]}, {"w": "measure,", "b": [0.3851, 0.2809, 0.4568, 0.2958]}, {"w": "such", "b": [0.463, 0.2809, 0.4989, 0.2958]}, {"w": "as", "b": [0.505, 0.2809, 0.5217, 0.2958]}, {"w": "cosine", "b": [0.5277, 0.2812, 0.5835, 0.2962]}, {"w": "similarity.", "b": [0.5906, 0.2809, 0.6833, 0.2962]}, {"w": "Word", "b": [0.6915, 0.2809, 0.7361, 0.2958]}, {"w": "embeddings", "b": [0.7423, 0.2809, 0.8378, 0.2958]}, {"w": "are", "b": [0.8439, 0.2809, 0.8689, 0.2958]}, {"w": "learned", "b": [0.1312, 0.2988, 0.1886, 0.3138]}, {"w": "from", "b": [0.1944, 0.2988, 0.2312, 0.3138]}, {"w": "large", "b": [0.237, 0.2988, 0.2753, 0.3138]}, {"w": "corpora", "b": [0.2811, 0.2988, 0.341, 0.3138]}, {"w": "of", "b": [0.3469, 0.2988, 0.3615, 0.3138]}, {"w": "text", "b": [0.3673, 0.2988, 0.399, 0.3138]}, {"w": "documents.", "b": [0.4048, 0.2988, 0.4944, 0.3138]}, {"w": "A", "b": [0.5025, 0.2988, 0.5161, 0.3138]}, {"w": "shallow", "b": [0.5217, 0.2991, 0.5894, 0.3141]}, {"w": "neural", "b": [0.5961, 0.2991, 0.6544, 0.3141]}, {"w": "network", "b": [0.6611, 0.2991, 0.7356, 0.3141]}, {"w": "with", "b": [0.7415, 0.2988, 0.7767, 0.3138]}, {"w": "one", "b": [0.7826, 0.2988, 0.8097, 0.3138]}, {"w": "hidden", "b": [0.8156, 0.2988, 0.8688, 0.3138]}, {"w": "layer", "b": [0.1312, 0.3168, 0.1689, 0.3317]}, {"w": "(called", "b": [0.1742, 0.3168, 0.2264, 0.3317]}, {"w": "the", "b": [0.2317, 0.3168, 0.2568, 0.3317]}, {"w": "embedding", "b": [0.262, 0.3171, 0.3627, 0.332]}, {"w": "layer)", "b": [0.3688, 0.3168, 0.4205, 0.332]}, {"w": "is", "b": [0.4257, 0.3168, 0.4379, 0.3317]}, {"w": "trained", "b": [0.4431, 0.3168, 0.4994, 0.3317]}, {"w": "to", "b": [0.5046, 0.3168, 0.5207, 0.3317]}, {"w": "predict", "b": [0.5259, 0.3168, 0.5813, 0.3317]}, {"w": "a", "b": [0.5865, 0.3168, 0.5955, 0.3317]}, {"w": "word,", "b": [0.6008, 0.3168, 0.6445, 0.3317]}, {"w": "given", "b": [0.6499, 0.3168, 0.6911, 0.3317]}, {"w": "its", "b": [0.6963, 0.3168, 0.7155, 0.3317]}, {"w": "surrounding", "b": [0.7208, 0.3168, 0.8154, 0.3317]}, {"w": "words,", "b": [0.8207, 0.3168, 0.8716, 0.3317]}, {"w": "or", "b": [0.1312, 0.3347, 0.1474, 0.3497]}, {"w": "to", "b": [0.1526, 0.3347, 0.1687, 0.3497]}, {"w": "predict", "b": [0.1739, 0.3347, 0.2292, 0.3497]}, {"w": "the", "b": [0.2345, 0.3347, 0.2596, 0.3497]}, {"w": "surrounding", "b": [0.2648, 0.3347, 0.3595, 0.3497]}, {"w": "words,", "b": [0.3647, 0.3347, 0.4156, 0.3497]}, {"w": "given", "b": [0.421, 0.3347, 0.4622, 0.3497]}, {"w": "the", "b": [0.4674, 0.3347, 0.4926, 0.3497]}, {"w": "word", "b": [0.4978, 0.3347, 0.5365, 0.3497]}, {"w": "in", "b": [0.5417, 0.3347, 0.5568, 0.3497]}, {"w": "the", "b": [0.562, 0.3347, 0.5872, 0.3497]}, {"w": "middle.", "b": [0.5924, 0.3347, 0.6507, 0.3497]}, {"w": "Once", "b": [0.6586, 0.3347, 0.6988, 0.3497]}, {"w": "the", "b": [0.704, 0.3347, 0.7292, 0.3497]}, {"w": "neural", "b": [0.7344, 0.3347, 0.7837, 0.3497]}, {"w": "network", "b": [0.7889, 0.3347, 0.8518, 0.3497]}, {"w": "is", "b": [0.857, 0.3347, 0.8691, 0.3497]}, {"w": "trained,", "b": [0.1312, 0.3527, 0.1926, 0.3676]}, {"w": "the", "b": [0.198, 0.3527, 0.2231, 0.3676]}, {"w": "parameters", "b": [0.2284, 0.3527, 0.316, 0.3676]}, {"w": "of", "b": [0.3212, 0.3527, 0.3358, 0.3676]}, {"w": "the", "b": [0.341, 0.3527, 0.3662, 0.3676]}, {"w": "embedding", "b": [0.3714, 0.3527, 0.4568, 0.3676]}, {"w": "layer", "b": [0.462, 0.3527, 0.4997, 0.3676]}, {"w": "are", "b": [0.505, 0.3527, 0.5291, 0.3676]}, {"w": "used", "b": [0.5344, 0.3527, 0.5697, 0.3676]}, {"w": "as", "b": [0.5749, 0.3527, 0.5911, 0.3676]}, {"w": "word", "b": [0.5963, 0.3527, 0.635, 0.3676]}, {"w": "embeddings.", "b": [0.6402, 0.3527, 0.7378, 0.3676]}, {"w": "There", "b": [0.7457, 0.3527, 0.792, 0.3676]}, {"w": "are", "b": [0.7972, 0.3527, 0.8214, 0.3676]}, {"w": "many", "b": [0.8266, 0.3527, 0.8698, 0.3676]}, {"w": "algorithms", "b": [0.1312, 0.3706, 0.2163, 0.3856]}, {"w": "to", "b": [0.2224, 0.3706, 0.2388, 0.3856]}, {"w": "learn", "b": [0.2449, 0.3706, 0.2849, 0.3856]}, {"w": "word", "b": [0.291, 0.3706, 0.3305, 0.3856]}, {"w": "embeddings", "b": [0.3366, 0.3706, 0.4309, 0.3856]}, {"w": "from", "b": [0.437, 0.3706, 0.4744, 0.3856]}, {"w": "data.", "b": [0.4805, 0.3706, 0.5214, 0.3856]}, {"w": "The", "b": [0.5296, 0.3706, 0.5613, 0.3856]}, {"w": "most", "b": [0.5675, 0.3706, 0.6064, 0.3856]}, {"w": "widely", "b": [0.6126, 0.3706, 0.6643, 0.3856]}, {"w": "used", "b": [0.6704, 0.3706, 0.7063, 0.3856]}, {"w": "algorithm,", "b": [0.7124, 0.3706, 0.7954, 0.3856]}, {"w": "invented", "b": [0.8015, 0.3706, 0.8691, 0.3856]}, {"w": "at", "b": [0.1312, 0.3886, 0.148, 0.4035]}, {"w": "Google,", "b": [0.156, 0.3886, 0.2183, 0.4035]}, {"w": "with", "b": [0.2268, 0.3886, 0.2634, 0.4035]}, {"w": "the", "b": [0.2714, 0.3886, 0.2975, 0.4035]}, {"w": "code", "b": [0.3055, 0.3886, 0.3427, 0.4035]}, {"w": "available", "b": [0.3507, 0.3886, 0.4218, 0.4035]}, {"w": "in", "b": [0.4298, 0.3886, 0.4455, 0.4035]}, {"w": "open", "b": [0.4535, 0.3886, 0.4927, 0.4035]}, {"w": "source,", "b": [0.5007, 0.3886, 0.5574, 0.4035]}, {"w": "is", "b": [0.5658, 0.3886, 0.5785, 0.4035]}, {"w": "word2vec.", "b": [0.5863, 0.3886, 0.6777, 0.4038]}, {"w": "Pre-trained", "b": [0.6915, 0.3886, 0.785, 0.4035]}, {"w": "word2vec", "b": [0.793, 0.3886, 0.8688, 0.4035]}, {"w": "embeddings", "b": [0.1312, 0.4065, 0.2257, 0.4215]}, {"w": "for", "b": [0.2318, 0.4065, 0.2539, 0.4215]}, {"w": "many", "b": [0.2601, 0.4065, 0.3042, 0.4215]}, {"w": "languages", "b": [0.3103, 0.4065, 0.3884, 0.4215]}, {"w": "are", "b": [0.3945, 0.4065, 0.4192, 0.4215]}, {"w": "available", "b": [0.4253, 0.4065, 0.4951, 0.4215]}, {"w": "for", "b": [0.5012, 0.4065, 0.5233, 0.4215]}, {"w": "download.", "b": [0.5294, 0.4065, 0.611, 0.4215]}]}, {"id": "b_4", "type": "paragraph", "text": "Once you have a collection of word embeddings for some language, you can use them to represent individual words in sentences or documents written in that language, instead of using one-hot encoding.", "words": [{"w": "Once", "b": [0.1312, 0.4334, 0.1731, 0.4484]}, {"w": "you", "b": [0.1803, 0.4334, 0.2095, 0.4484]}, {"w": "have", "b": [0.2167, 0.4334, 0.2539, 0.4484]}, {"w": "a", "b": [0.261, 0.4334, 0.2704, 0.4484]}, {"w": "collection", "b": [0.2776, 0.4334, 0.355, 0.4484]}, {"w": "of", "b": [0.3622, 0.4334, 0.3773, 0.4484]}, {"w": "word", "b": [0.3845, 0.4334, 0.4248, 0.4484]}, {"w": "embeddings", "b": [0.432, 0.4334, 0.5283, 0.4484]}, {"w": "for", "b": [0.5355, 0.4334, 0.558, 0.4484]}, {"w": "some", "b": [0.5652, 0.4334, 0.6061, 0.4484]}, {"w": "language,", "b": [0.6132, 0.4334, 0.6906, 0.4484]}, {"w": "you", "b": [0.6981, 0.4334, 0.7274, 0.4484]}, {"w": "can", "b": [0.7345, 0.4334, 0.7628, 0.4484]}, {"w": "use", "b": [0.7699, 0.4334, 0.7962, 0.4484]}, {"w": "them", "b": [0.8033, 0.4334, 0.8452, 0.4484]}, {"w": "to", "b": [0.8523, 0.4334, 0.8691, 0.4484]}, {"w": "represent", "b": [0.1312, 0.4514, 0.2063, 0.4663]}, {"w": "individual", "b": [0.2125, 0.4514, 0.2947, 0.4663]}, {"w": "words", "b": [0.3009, 0.4514, 0.3487, 0.4663]}, {"w": "in", "b": [0.355, 0.4514, 0.3707, 0.4663]}, {"w": "sentences", "b": [0.3769, 0.4514, 0.453, 0.4663]}, {"w": "or", "b": [0.4593, 0.4514, 0.4761, 0.4663]}, {"w": "documents", "b": [0.4824, 0.4514, 0.5703, 0.4663]}, {"w": "written", "b": [0.5766, 0.4514, 0.6363, 0.4663]}, {"w": "in", "b": [0.6426, 0.4514, 0.6583, 0.4663]}, {"w": "that", "b": [0.6645, 0.4514, 0.6991, 0.4663]}, {"w": "language,", "b": [0.7053, 0.4514, 0.7827, 0.4663]}, {"w": "instead", "b": [0.789, 0.4514, 0.8477, 0.4663]}, {"w": "of", "b": [0.854, 0.4514, 0.8692, 0.4663]}, {"w": "using", "b": [0.1312, 0.4693, 0.1734, 0.4843]}, {"w": "one-hot", "b": [0.1797, 0.4696, 0.2496, 0.4846]}, {"w": "encoding.", "b": [0.2566, 0.4693, 0.3442, 0.4846]}]}, {"id": "b_5", "type": "paragraph", "text": "Let’s see how word embeddings are trained by one version of the word2vec algorithm called skip-gram. In word embedding learning, our goal is to build a model that we can use to convert a one-hot encoding of a word into a word embedding. Let our dictionary contain 10,000 words. The one-hot vector for each word is a 10,000-dimensional vector of all zeros, except for one dimension that contains a 1. Different words have a 1 in different dimensions.", "words": [{"w": "Let’s", "b": [0.1312, 0.4963, 0.1704, 0.5112]}, {"w": "see", "b": [0.1766, 0.4963, 0.2002, 0.5112]}, {"w": "how", "b": [0.2064, 0.4963, 0.2385, 0.5112]}, {"w": "word", "b": [0.2447, 0.4963, 0.284, 0.5112]}, {"w": "embeddings", "b": [0.2902, 0.4963, 0.3843, 0.5112]}, {"w": "are", "b": [0.3904, 0.4963, 0.415, 0.5112]}, {"w": "trained", "b": [0.4212, 0.4963, 0.4784, 0.5112]}, {"w": "by", "b": [0.4846, 0.4963, 0.504, 0.5112]}, {"w": "one", "b": [0.5102, 0.4963, 0.5377, 0.5112]}, {"w": "version", "b": [0.5439, 0.4963, 0.6002, 0.5112]}, {"w": "of", "b": [0.6064, 0.4963, 0.6212, 0.5112]}, {"w": "the", "b": [0.6274, 0.4963, 0.6529, 0.5112]}, {"w": "word2vec", "b": [0.6591, 0.4963, 0.7332, 0.5112]}, {"w": "algorithm", "b": [0.7393, 0.4963, 0.817, 0.5112]}, {"w": "called", "b": [0.8231, 0.4963, 0.8691, 0.5112]}, {"w": "skip-gram.", "b": [0.1312, 0.5142, 0.2282, 0.5295]}, {"w": "In", "b": [0.2371, 0.5142, 0.2544, 0.5292]}, {"w": "word", "b": [0.2608, 0.5142, 0.3011, 0.5292]}, {"w": "embedding", "b": [0.3075, 0.5142, 0.3964, 0.5292]}, {"w": "learning,", "b": [0.4028, 0.5142, 0.474, 0.5292]}, {"w": "our", "b": [0.4804, 0.5142, 0.5077, 0.5292]}, {"w": "goal", "b": [0.5141, 0.5142, 0.5476, 0.5292]}, {"w": "is", "b": [0.5539, 0.5142, 0.5666, 0.5292]}, {"w": "to", "b": [0.573, 0.5142, 0.5897, 0.5292]}, {"w": "build", "b": [0.5961, 0.5142, 0.638, 0.5292]}, {"w": "a", "b": [0.6444, 0.5142, 0.6538, 0.5292]}, {"w": "model", "b": [0.6602, 0.5142, 0.7098, 0.5292]}, {"w": "that", "b": [0.7162, 0.5142, 0.7508, 0.5292]}, {"w": "we", "b": [0.7571, 0.5142, 0.7786, 0.5292]}, {"w": "can", "b": [0.785, 0.5142, 0.8132, 0.5292]}, {"w": "use", "b": [0.8196, 0.5142, 0.8459, 0.5292]}, {"w": "to", "b": [0.8523, 0.5142, 0.869, 0.5292]}, {"w": "convert", "b": [0.1312, 0.5321, 0.1915, 0.5471]}, {"w": "a", "b": [0.198, 0.5321, 0.2074, 0.5471]}, {"w": "one-hot", "b": [0.214, 0.5321, 0.2757, 0.5471]}, {"w": "encoding", "b": [0.2823, 0.5321, 0.355, 0.5471]}, {"w": "of", "b": [0.3616, 0.5321, 0.3768, 0.5471]}, {"w": "a", "b": [0.3833, 0.5321, 0.3928, 0.5471]}, {"w": "word", "b": [0.3993, 0.5321, 0.4396, 0.5471]}, {"w": "into", "b": [0.4462, 0.5321, 0.4781, 0.5471]}, {"w": "a", "b": [0.4847, 0.5321, 0.4941, 0.5471]}, {"w": "word", "b": [0.5007, 0.5321, 0.541, 0.5471]}, {"w": "embedding.", "b": [0.5476, 0.5321, 0.6418, 0.5471]}, {"w": "Let", "b": [0.6513, 0.5321, 0.6787, 0.5471]}, {"w": "our", "b": [0.6853, 0.5321, 0.7125, 0.5471]}, {"w": "dictionary", "b": [0.7191, 0.5321, 0.8023, 0.5471]}, {"w": "contain", "b": [0.8089, 0.5321, 0.8691, 0.5471]}, {"w": "10,000", "b": [0.1303, 0.5501, 0.1822, 0.5651]}, {"w": "words.", "b": [0.1883, 0.5501, 0.2409, 0.5651]}, {"w": "The", "b": [0.2491, 0.5501, 0.2813, 0.5651]}, {"w": "one-hot", "b": [0.2875, 0.5501, 0.3487, 0.5651]}, {"w": "vector", "b": [0.3548, 0.5501, 0.4047, 0.5651]}, {"w": "for", "b": [0.4109, 0.5501, 0.4333, 0.5651]}, {"w": "each", "b": [0.4394, 0.5501, 0.4752, 0.5651]}, {"w": "word", "b": [0.4814, 0.5501, 0.5214, 0.5651]}, {"w": "is", "b": [0.5276, 0.5501, 0.5401, 0.5651]}, {"w": "a", "b": [0.5463, 0.5501, 0.5556, 0.5651]}, {"w": "10,000-dimensional", "b": [0.5618, 0.5501, 0.7165, 0.5651]}, {"w": "vector", "b": [0.7227, 0.5501, 0.7725, 0.5651]}, {"w": "of", "b": [0.7787, 0.5501, 0.7937, 0.5651]}, {"w": "all", "b": [0.7999, 0.5501, 0.8196, 0.5651]}, {"w": "zeros,", "b": [0.8258, 0.5501, 0.8716, 0.5651]}, {"w": "except", "b": [0.1312, 0.568, 0.1825, 0.583]}, {"w": "for", "b": [0.1886, 0.568, 0.2105, 0.583]}, {"w": "one", "b": [0.2166, 0.568, 0.244, 0.583]}, {"w": "dimension", "b": [0.2502, 0.568, 0.3304, 0.583]}, {"w": "that", "b": [0.3365, 0.568, 0.37, 0.583]}, {"w": "contains", "b": [0.3762, 0.568, 0.4417, 0.583]}, {"w": "a", "b": [0.4478, 0.568, 0.4569, 0.583]}, {"w": "1.", "b": [0.4629, 0.568, 0.4771, 0.583]}, {"w": "Different", "b": [0.4853, 0.568, 0.5551, 0.583]}, {"w": "words", "b": [0.5612, 0.568, 0.6075, 0.583]}, {"w": "have", "b": [0.6137, 0.568, 0.6497, 0.583]}, {"w": "a", "b": [0.6558, 0.568, 0.6649, 0.583]}, {"w": "1", "b": [0.671, 0.568, 0.6801, 0.583]}, {"w": "in", "b": [0.6863, 0.568, 0.7015, 0.583]}, {"w": "different", "b": [0.7077, 0.568, 0.7736, 0.583]}, {"w": "dimensions.", "b": [0.7798, 0.568, 0.8723, 0.583]}]}, {"id": "b_6", "type": "paragraph", "text": "Consider a sentence: “I am attentively reading the book on machine learning engineering.” Now, take the same sentence, but remove one word, say “book.” Our sentence becomes: “I am attentively reading the · on machine learning engineering.” Now let’s only keep the", "words": [{"w": "Consider", "b": [0.1312, 0.595, 0.2031, 0.6099]}, {"w": "a", "b": [0.2093, 0.595, 0.2187, 0.6099]}, {"w": "sentence:", "b": [0.2248, 0.595, 0.2983, 0.6099]}, {"w": "“I", "b": [0.3065, 0.595, 0.3221, 0.6099]}, {"w": "am", "b": [0.3282, 0.595, 0.3531, 0.6099]}, {"w": "attentively", "b": [0.3593, 0.595, 0.4467, 0.6099]}, {"w": "reading", "b": [0.4528, 0.595, 0.5132, 0.6099]}, {"w": "the", "b": [0.5193, 0.595, 0.5453, 0.6099]}, {"w": "book", "b": [0.5515, 0.595, 0.5915, 0.6099]}, {"w": "on", "b": [0.5977, 0.595, 0.6174, 0.6099]}, {"w": "machine", "b": [0.6236, 0.595, 0.6906, 0.6099]}, {"w": "learning", "b": [0.6968, 0.595, 0.7624, 0.6099]}, {"w": "engineering.”", "b": [0.7685, 0.595, 0.8726, 0.6099]}, {"w": "Now,", "b": [0.1312, 0.6129, 0.1731, 0.6279]}, {"w": "take", "b": [0.1807, 0.6129, 0.2153, 0.6279]}, {"w": "the", "b": [0.2226, 0.6129, 0.2488, 0.6279]}, {"w": "same", "b": [0.2561, 0.6129, 0.297, 0.6279]}, {"w": "sentence,", "b": [0.3044, 0.6129, 0.3783, 0.6279]}, {"w": "but", "b": [0.3859, 0.6129, 0.4142, 0.6279]}, {"w": "remove", "b": [0.4215, 0.6129, 0.4797, 0.6279]}, {"w": "one", "b": [0.487, 0.6129, 0.5153, 0.6279]}, {"w": "word,", "b": [0.5226, 0.6129, 0.5682, 0.6279]}, {"w": "say", "b": [0.5758, 0.6129, 0.6021, 0.6279]}, {"w": "“book.”", "b": [0.6095, 0.6129, 0.6701, 0.6279]}, {"w": "Our", "b": [0.682, 0.6129, 0.7144, 0.6279]}, {"w": "sentence", "b": [0.7218, 0.6129, 0.7905, 0.6279]}, {"w": "becomes:", "b": [0.7978, 0.6129, 0.8717, 0.6279]}, {"w": "“I", "b": [0.1286, 0.6309, 0.1443, 0.6458]}, {"w": "am", "b": [0.1508, 0.6309, 0.1759, 0.6458]}, {"w": "attentively", "b": [0.1824, 0.6309, 0.2703, 0.6458]}, {"w": "reading", "b": [0.2768, 0.6309, 0.3375, 0.6458]}, {"w": "the", "b": [0.344, 0.6309, 0.3701, 0.6458]}, {"w": "·", "b": [0.3766, 0.6309, 0.3817, 0.6459]}, {"w": "on", "b": [0.3882, 0.6309, 0.4081, 0.6458]}, {"w": "machine", "b": [0.4146, 0.6309, 0.482, 0.6458]}, {"w": "learning", "b": [0.4886, 0.6309, 0.5545, 0.6458]}, {"w": "engineering.”", "b": [0.561, 0.6309, 0.6657, 0.6458]}, {"w": "Now", "b": [0.675, 0.6309, 0.7116, 0.6458]}, {"w": "let’s", "b": [0.7181, 0.6309, 0.7517, 0.6458]}, {"w": "only", "b": [0.7582, 0.6309, 0.7932, 0.6458]}, {"w": "keep", "b": [0.7997, 0.6309, 0.8363, 0.6458]}, {"w": "the", "b": [0.8428, 0.6309, 0.869, 0.6458]}]}, {"id": "b_7", "type": "paragraph", "text": "three words before the · and the three words after it: “attentively reading the · on machine learning.” Looking at this six-word window around the ·, if I ask you to guess what · stands for, you would probably say: “book,” “article,” or “paper.” That’s how the context words let you predict the word they surround. It’s also how the machine can learn that words “book,” “paper,” and “article” have a similar meaning. They share similar contexts in multiple texts.", "words": [{"w": "three", "b": [0.1312, 0.6488, 0.1724, 0.6638]}, {"w": "words", "b": [0.1785, 0.6488, 0.2254, 0.6638]}, {"w": "before", "b": [0.2315, 0.6488, 0.2808, 0.6638]}, {"w": "the", "b": [0.287, 0.6488, 0.3126, 0.6638]}, {"w": "·", "b": [0.3187, 0.6489, 0.3238, 0.6638]}, {"w": "and", "b": [0.33, 0.6488, 0.3597, 0.6638]}, {"w": "the", "b": [0.3659, 0.6488, 0.3915, 0.6638]}, {"w": "three", "b": [0.3977, 0.6488, 0.4388, 0.6638]}, {"w": "words", "b": [0.445, 0.6488, 0.4918, 0.6638]}, {"w": "after", "b": [0.4979, 0.6488, 0.5355, 0.6638]}, {"w": "it:", "b": [0.5416, 0.6488, 0.5591, 0.6638]}, {"w": "“attentively", "b": [0.5673, 0.6488, 0.6622, 0.6638]}, {"w": "reading", "b": [0.6684, 0.6488, 0.728, 0.6638]}, {"w": "the", "b": [0.7341, 0.6488, 0.7598, 0.6638]}, {"w": "·", "b": [0.7657, 0.6489, 0.7708, 0.6638]}, {"w": "on", "b": [0.777, 0.6488, 0.7965, 0.6638]}, {"w": "machine", "b": [0.8026, 0.6488, 0.8688, 0.6638]}, {"w": "learning.”", "b": [0.1312, 0.6667, 0.2066, 0.6817]}, {"w": "Looking", "b": [0.2148, 0.6667, 0.2792, 0.6817]}, {"w": "at", "b": [0.2853, 0.6667, 0.3016, 0.6817]}, {"w": "this", "b": [0.3078, 0.6667, 0.3374, 0.6817]}, {"w": "six-word", "b": [0.3435, 0.6667, 0.4109, 0.6817]}, {"w": "window", "b": [0.417, 0.6667, 0.4776, 0.6817]}, {"w": "around", "b": [0.4837, 0.6667, 0.5398, 0.6817]}, {"w": "the", "b": [0.5459, 0.6667, 0.5714, 0.6817]}, {"w": "·,", "b": [0.5774, 0.6667, 0.5876, 0.6818]}, {"w": "if", "b": [0.5937, 0.6667, 0.6044, 0.6817]}, {"w": "I", "b": [0.6105, 0.6667, 0.6172, 0.6817]}, {"w": "ask", "b": [0.6233, 0.6667, 0.6494, 0.6817]}, {"w": "you", "b": [0.6555, 0.6667, 0.684, 0.6817]}, {"w": "to", "b": [0.6901, 0.6667, 0.7064, 0.6817]}, {"w": "guess", "b": [0.7125, 0.6667, 0.7545, 0.6817]}, {"w": "what", "b": [0.7607, 0.6667, 0.8004, 0.6817]}, {"w": "·", "b": [0.8064, 0.6668, 0.8115, 0.6818]}, {"w": "stands", "b": [0.8177, 0.6667, 0.8688, 0.6817]}, {"w": "for,", "b": [0.1312, 0.6847, 0.158, 0.6997]}, {"w": "you", "b": [0.1641, 0.6847, 0.1923, 0.6997]}, {"w": "would", "b": [0.1985, 0.6847, 0.2453, 0.6997]}, {"w": "probably", "b": [0.2514, 0.6847, 0.3215, 0.6997]}, {"w": "say:", "b": [0.3276, 0.6847, 0.3579, 0.6997]}, {"w": "“book,”", "b": [0.3662, 0.6847, 0.4271, 0.6997]}, {"w": "“article,”", "b": [0.4332, 0.6847, 0.5048, 0.6997]}, {"w": "or", "b": [0.5109, 0.6847, 0.5271, 0.6997]}, {"w": "“paper.”", "b": [0.5333, 0.6847, 0.5977, 0.6997]}, {"w": "That’s", "b": [0.6059, 0.6847, 0.6574, 0.6997]}, {"w": "how", "b": [0.6635, 0.6847, 0.6952, 0.6997]}, {"w": "the", "b": [0.7014, 0.6847, 0.7266, 0.6997]}, {"w": "context", "b": [0.7327, 0.6847, 0.7911, 0.6997]}, {"w": "words", "b": [0.7973, 0.6847, 0.8433, 0.6997]}, {"w": "let", "b": [0.8494, 0.6847, 0.8695, 0.6997]}, {"w": "you", "b": [0.1308, 0.7026, 0.1591, 0.7176]}, {"w": "predict", "b": [0.1653, 0.7026, 0.2212, 0.7176]}, {"w": "the", "b": [0.2273, 0.7026, 0.2527, 0.7176]}, {"w": "word", "b": [0.2588, 0.7026, 0.2979, 0.7176]}, {"w": "they", "b": [0.3041, 0.7026, 0.3391, 0.7176]}, {"w": "surround.", "b": [0.3453, 0.7026, 0.4215, 0.7176]}, {"w": "It’s", "b": [0.4298, 0.7026, 0.4558, 0.7176]}, {"w": "also", "b": [0.4619, 0.7026, 0.4925, 0.7176]}, {"w": "how", "b": [0.4986, 0.7026, 0.5305, 0.7176]}, {"w": "the", "b": [0.5367, 0.7026, 0.5621, 0.7176]}, {"w": "machine", "b": [0.5682, 0.7026, 0.6336, 0.7176]}, {"w": "can", "b": [0.6398, 0.7026, 0.6672, 0.7176]}, {"w": "learn", "b": [0.6734, 0.7026, 0.713, 0.7176]}, {"w": "that", "b": [0.7191, 0.7026, 0.7526, 0.7176]}, {"w": "words", "b": [0.7588, 0.7026, 0.8051, 0.7176]}, {"w": "“book,”", "b": [0.8112, 0.7026, 0.8726, 0.7176]}, {"w": "“paper,”", "b": [0.1286, 0.7206, 0.196, 0.7355]}, {"w": "and", "b": [0.2022, 0.7206, 0.2316, 0.7355]}, {"w": "“article”", "b": [0.2377, 0.7206, 0.3046, 0.7355]}, {"w": "have", "b": [0.3108, 0.7206, 0.3467, 0.7355]}, {"w": "a", "b": [0.3529, 0.7206, 0.362, 0.7355]}, {"w": "similar", "b": [0.3681, 0.7206, 0.422, 0.7355]}, {"w": "meaning.", "b": [0.4282, 0.7206, 0.5001, 0.7355]}, {"w": "They", "b": [0.5083, 0.7206, 0.5493, 0.7355]}, {"w": "share", "b": [0.5554, 0.7206, 0.5971, 0.7355]}, {"w": "similar", "b": [0.6033, 0.7206, 0.6571, 0.7355]}, {"w": "contexts", "b": [0.6633, 0.7206, 0.7293, 0.7355]}, {"w": "in", "b": [0.7354, 0.7206, 0.7506, 0.7355]}, {"w": "multiple", "b": [0.7567, 0.7206, 0.8221, 0.7355]}, {"w": "texts.", "b": [0.8282, 0.7206, 0.8724, 0.7355]}]}, {"id": "b_8", "type": "paragraph", "text": "It turns out that it works the other way around too: a word can predict the context surrounding it. The piece “attentively reading the · on machine learning” is called a skip-gram, with window size 6 (3 + 3). By using the documents available on the Web, we can easily create hundreds of millions of skip-grams.", "words": [{"w": "It", "b": [0.1312, 0.7475, 0.1448, 0.7625]}, {"w": "turns", "b": [0.149, 0.7475, 0.1904, 0.7625]}, {"w": "out", "b": [0.1946, 0.7475, 0.2207, 0.7625]}, {"w": "that", "b": [0.225, 0.7475, 0.2581, 0.7625]}, {"w": "it", "b": [0.2624, 0.7475, 0.2744, 0.7625]}, {"w": "works", "b": [0.2787, 0.7475, 0.324, 0.7625]}, {"w": "the", "b": [0.3282, 0.7475, 0.3534, 0.7625]}, {"w": "other", "b": [0.3576, 0.7475, 0.3989, 0.7625]}, {"w": "way", "b": [0.4031, 0.7475, 0.4337, 0.7625]}, {"w": "around", "b": [0.4379, 0.7475, 0.4933, 0.7625]}, {"w": "too:", "b": [0.4975, 0.7475, 0.5281, 0.7625]}, {"w": "a", "b": [0.5354, 0.7475, 0.5444, 0.7625]}, {"w": "word", "b": [0.5487, 0.7475, 0.5874, 0.7625]}, {"w": "can", "b": [0.5916, 0.7475, 0.6187, 0.7625]}, {"w": "predict", "b": [0.623, 0.7475, 0.6783, 0.7625]}, {"w": "the", "b": [0.6825, 0.7475, 0.7077, 0.7625]}, {"w": "context", "b": [0.7119, 0.7475, 0.7702, 0.7625]}, {"w": "surrounding", "b": [0.7744, 0.7475, 0.8691, 0.7625]}, {"w": "it.", "b": [0.1312, 0.7655, 0.149, 0.7804]}, {"w": "The", "b": [0.1601, 0.7655, 0.1925, 0.7804]}, {"w": "piece", "b": [0.1996, 0.7655, 0.2404, 0.7804]}, {"w": "“attentively", "b": [0.2475, 0.7655, 0.3443, 0.7804]}, {"w": "reading", "b": [0.3514, 0.7655, 0.4121, 0.7804]}, {"w": "the", "b": [0.4192, 0.7655, 0.4454, 0.7804]}, {"w": "·", "b": [0.4523, 0.7655, 0.4575, 0.7805]}, {"w": "on", "b": [0.4646, 0.7655, 0.4844, 0.7804]}, {"w": "machine", "b": [0.4916, 0.7655, 0.559, 0.7804]}, {"w": "learning”", "b": [0.5661, 0.7655, 0.641, 0.7804]}, {"w": "is", "b": [0.6481, 0.7655, 0.6607, 0.7804]}, {"w": "called", "b": [0.6678, 0.7655, 0.7149, 0.7804]}, {"w": "a", "b": [0.722, 0.7655, 0.7314, 0.7804]}, {"w": "skip-gram,", "b": [0.7385, 0.7655, 0.825, 0.7804]}, {"w": "with", "b": [0.8323, 0.7655, 0.8689, 0.7804]}, {"w": "window", "b": [0.1306, 0.7834, 0.1922, 0.7984]}, {"w": "size", "b": [0.1983, 0.7834, 0.2274, 0.7984]}, {"w": "6", "b": [0.2335, 0.7834, 0.2429, 0.7984]}, {"w": "(3", "b": [0.249, 0.7834, 0.2656, 0.7984]}, {"w": "+", "b": [0.2717, 0.7834, 0.2862, 0.7984]}, {"w": "3).", "b": [0.2923, 0.7834, 0.3141, 0.7984]}, {"w": "By", "b": [0.3223, 0.7834, 0.3453, 0.7984]}, {"w": "using", "b": [0.3514, 0.7834, 0.394, 0.7984]}, {"w": "the", "b": [0.4002, 0.7834, 0.4261, 0.7984]}, {"w": "documents", "b": [0.4322, 0.7834, 0.5193, 0.7984]}, {"w": "available", "b": [0.5255, 0.7834, 0.5959, 0.7984]}, {"w": "on", "b": [0.6021, 0.7834, 0.6217, 0.7984]}, {"w": "the", "b": [0.6279, 0.7834, 0.6538, 0.7984]}, {"w": "Web,", "b": [0.6599, 0.7834, 0.7014, 0.7984]}, {"w": "we", "b": [0.7075, 0.7834, 0.7287, 0.7984]}, {"w": "can", "b": [0.7349, 0.7834, 0.7628, 0.7984]}, {"w": "easily", "b": [0.769, 0.7834, 0.8141, 0.7984]}, {"w": "create", "b": [0.8203, 0.7834, 0.869, 0.7984]}, {"w": "hundreds", "b": [0.1312, 0.8014, 0.2047, 0.8163]}, {"w": "of", "b": [0.2109, 0.8014, 0.2257, 0.8163]}, {"w": "millions", "b": [0.2319, 0.8014, 0.2945, 0.8163]}, {"w": "of", "b": [0.3007, 0.8014, 0.3156, 0.8163]}, {"w": "skip-grams.", "b": [0.3217, 0.8014, 0.4137, 0.8163]}]}, {"id": "b_9", "type": "paragraph", "text": "Let’s denote a skip-gram in the following way: [x−3, x−2, x−1, x, x+1, x+2, x+3]. In our sentence, x−3 is the one-hot vector for “attentively,” x−2 corresponds to “reading,” x is the", "words": [{"w": "Let’s", "b": [0.1312, 0.8283, 0.1714, 0.8432]}, {"w": "denote", "b": [0.1797, 0.8283, 0.2341, 0.8432]}, {"w": "a", "b": [0.2425, 0.8283, 0.2519, 0.8432]}, {"w": "skip-gram", "b": [0.2603, 0.8283, 0.3415, 0.8432]}, {"w": "in", "b": [0.3499, 0.8283, 0.3656, 0.8432]}, {"w": "the", "b": [0.3739, 0.8283, 0.4001, 0.8432]}, {"w": "following", "b": [0.4085, 0.8283, 0.4817, 0.8432]}, {"w": "way:", "b": [0.4901, 0.8283, 0.5272, 0.8432]}, {"w": "[x−3,", "b": [0.5397, 0.8283, 0.5812, 0.8448]}, {"w": "x−2,", "b": [0.5842, 0.8285, 0.6204, 0.8448]}, {"w": "x−1,", "b": [0.6234, 0.8285, 0.6596, 0.8448]}, {"w": "x,", "b": [0.6626, 0.8285, 0.6791, 0.8435]}, {"w": "x+1,", "b": [0.6821, 0.8285, 0.7181, 0.8448]}, {"w": "x+2,", "b": [0.7211, 0.8285, 0.7571, 0.8448]}, {"w": "x+3].", "b": [0.7601, 0.8283, 0.8014, 0.8448]}, {"w": "In", "b": [0.8163, 0.8283, 0.8335, 0.8432]}, {"w": "our", "b": [0.8419, 0.8283, 0.8691, 0.8432]}, {"w": "sentence,", "b": [0.1312, 0.8462, 0.2033, 0.8612]}, {"w": "x−3", "b": [0.2094, 0.8465, 0.2395, 0.8627]}, {"w": "is", "b": [0.2466, 0.8462, 0.2589, 0.8612]}, {"w": "the", "b": [0.2651, 0.8462, 0.2906, 0.8612]}, {"w": "one-hot", "b": [0.2967, 0.8462, 0.3569, 0.8612]}, {"w": "vector", "b": [0.3631, 0.8462, 0.4121, 0.8612]}, {"w": "for", "b": [0.4183, 0.8462, 0.4403, 0.8612]}, {"w": "“attentively,”", "b": [0.4464, 0.8462, 0.553, 0.8612]}, {"w": "x−2", "b": [0.5591, 0.8465, 0.5891, 0.8627]}, {"w": "corresponds", "b": [0.5962, 0.8462, 0.691, 0.8612]}, {"w": "to", "b": [0.6971, 0.8462, 0.7134, 0.8612]}, {"w": "“reading,”", "b": [0.7196, 0.8462, 0.8012, 0.8612]}, {"w": "x", "b": [0.8073, 0.8465, 0.8185, 0.8615]}, {"w": "is", "b": [0.8248, 0.8462, 0.8371, 0.8612]}, {"w": "the", "b": [0.8433, 0.8462, 0.8688, 0.8612]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 32", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "32", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 122, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "skipped word (·), x+1 is “on,” and so on.", "words": [{"w": "skipped", "b": [0.1312, 0.0881, 0.1929, 0.1031]}, {"w": "word", "b": [0.199, 0.0881, 0.2386, 0.1031]}, {"w": "(·),", "b": [0.2447, 0.0881, 0.2693, 0.1031]}, {"w": "x+1", "b": [0.2754, 0.0884, 0.3053, 0.1046]}, {"w": "is", "b": [0.3123, 0.0881, 0.3248, 0.1031]}, {"w": "“on,”", "b": [0.3309, 0.0881, 0.3729, 0.1031]}, {"w": "and", "b": [0.3791, 0.0881, 0.4088, 0.1031]}, {"w": "so", "b": [0.415, 0.0881, 0.4315, 0.1031]}, {"w": "on.", "b": [0.4376, 0.0881, 0.4622, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "A skip-gram with window size 4 will look like this: [x−2, x−1, x, x+1, x+2]. It can also be schematically depicted, as shown in Figure 19. It is a fully-connected network, like the multilayer perceptron. The input word is denoted as · in the skip-gram. The neural network has to learn to predict the context words of the skip-gram, given the input’s central word.", "words": [{"w": "A", "b": [0.1305, 0.115, 0.1446, 0.13]}, {"w": "skip-gram", "b": [0.1514, 0.115, 0.2326, 0.13]}, {"w": "with", "b": [0.2394, 0.115, 0.276, 0.13]}, {"w": "window", "b": [0.2828, 0.115, 0.345, 0.13]}, {"w": "size", "b": [0.3518, 0.115, 0.3812, 0.13]}, {"w": "4", "b": [0.388, 0.115, 0.3974, 0.13]}, {"w": "will", "b": [0.4042, 0.115, 0.4334, 0.13]}, {"w": "look", "b": [0.4402, 0.115, 0.4747, 0.13]}, {"w": "like", "b": [0.4815, 0.115, 0.5098, 0.13]}, {"w": "this:", "b": [0.5166, 0.115, 0.5522, 0.13]}, {"w": "[x−2,", "b": [0.5617, 0.115, 0.6031, 0.1315]}, {"w": "x−1,", "b": [0.6062, 0.1153, 0.6423, 0.1315]}, {"w": "x,", "b": [0.6454, 0.1153, 0.6618, 0.1303]}, {"w": "x+1,", "b": [0.6649, 0.1153, 0.7008, 0.1315]}, {"w": "x+2].", "b": [0.7039, 0.115, 0.7451, 0.1315]}, {"w": "It", "b": [0.7553, 0.115, 0.7694, 0.13]}, {"w": "can", "b": [0.7762, 0.115, 0.8044, 0.13]}, {"w": "also", "b": [0.8112, 0.115, 0.8427, 0.13]}, {"w": "be", "b": [0.8495, 0.115, 0.8688, 0.13]}, {"w": "schematically", "b": [0.1312, 0.133, 0.2408, 0.1479]}, {"w": "depicted,", "b": [0.247, 0.133, 0.3211, 0.1479]}, {"w": "as", "b": [0.3272, 0.133, 0.344, 0.1479]}, {"w": "shown", "b": [0.3501, 0.133, 0.4008, 0.1479]}, {"w": "in", "b": [0.407, 0.133, 0.4226, 0.1479]}, {"w": "Figure", "b": [0.4288, 0.133, 0.4817, 0.1479]}, {"w": "19.", "b": [0.4879, 0.133, 0.5119, 0.1479]}, {"w": "It", "b": [0.5201, 0.133, 0.5341, 0.1479]}, {"w": "is", "b": [0.5403, 0.133, 0.5529, 0.1479]}, {"w": "a", "b": [0.559, 0.133, 0.5684, 0.1479]}, {"w": "fully-connected", "b": [0.5745, 0.1333, 0.7154, 0.1482]}, {"w": "network,", "b": [0.7225, 0.133, 0.8023, 0.1482]}, {"w": "like", "b": [0.8084, 0.133, 0.8366, 0.1479]}, {"w": "the", "b": [0.8427, 0.133, 0.8688, 0.1479]}, {"w": "multilayer", "b": [0.1312, 0.1512, 0.2249, 0.1662]}, {"w": "perceptron.", "b": [0.2336, 0.1509, 0.34, 0.1662]}, {"w": "The", "b": [0.3525, 0.1509, 0.3849, 0.1659]}, {"w": "input", "b": [0.3925, 0.1509, 0.4364, 0.1659]}, {"w": "word", "b": [0.444, 0.1509, 0.4844, 0.1659]}, {"w": "is", "b": [0.4919, 0.1509, 0.5046, 0.1659]}, {"w": "denoted", "b": [0.5122, 0.1509, 0.577, 0.1659]}, {"w": "as", "b": [0.5846, 0.1509, 0.6015, 0.1659]}, {"w": "·", "b": [0.6089, 0.151, 0.614, 0.166]}, {"w": "in", "b": [0.6216, 0.1509, 0.6373, 0.1659]}, {"w": "the", "b": [0.6449, 0.1509, 0.6711, 0.1659]}, {"w": "skip-gram.", "b": [0.6786, 0.1509, 0.7651, 0.1659]}, {"w": "The", "b": [0.7776, 0.1509, 0.81, 0.1659]}, {"w": "neural", "b": [0.8176, 0.1509, 0.8689, 0.1659]}, {"w": "network", "b": [0.1312, 0.1689, 0.1944, 0.1838]}, {"w": "has", "b": [0.2005, 0.1689, 0.2269, 0.1838]}, {"w": "to", "b": [0.2331, 0.1689, 0.2492, 0.1838]}, {"w": "learn", "b": [0.2554, 0.1689, 0.2948, 0.1838]}, {"w": "to", "b": [0.301, 0.1689, 0.3171, 0.1838]}, {"w": "predict", "b": [0.3233, 0.1689, 0.3789, 0.1838]}, {"w": "the", "b": [0.385, 0.1689, 0.4103, 0.1838]}, {"w": "context", "b": [0.4165, 0.1689, 0.475, 0.1838]}, {"w": "words", "b": [0.4812, 0.1689, 0.5273, 0.1838]}, {"w": "of", "b": [0.5334, 0.1689, 0.5481, 0.1838]}, {"w": "the", "b": [0.5542, 0.1689, 0.5795, 0.1838]}, {"w": "skip-gram,", "b": [0.5856, 0.1689, 0.6691, 0.1838]}, {"w": "given", "b": [0.6752, 0.1689, 0.7167, 0.1838]}, {"w": "the", "b": [0.7228, 0.1689, 0.7481, 0.1838]}, {"w": "input’s", "b": [0.7542, 0.1689, 0.8089, 0.1838]}, {"w": "central", "b": [0.815, 0.1689, 0.8691, 0.1838]}, {"w": "word.", "b": [0.1306, 0.1868, 0.1752, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "The activation function used in the output layer is softmax. The cost function is the negative log-likelihood. The embedding for a word is given by the parameters of the embedding layer that apply when a one-hot encoded word is given as the input to the model.", "words": [{"w": "The", "b": [0.1306, 0.2137, 0.163, 0.2287]}, {"w": "activation", "b": [0.1692, 0.214, 0.26, 0.229]}, {"w": "function", "b": [0.2671, 0.214, 0.3431, 0.229]}, {"w": "used", "b": [0.3494, 0.2137, 0.3861, 0.2287]}, {"w": "in", "b": [0.3923, 0.2137, 0.408, 0.2287]}, {"w": "the", "b": [0.4142, 0.2137, 0.4404, 0.2287]}, {"w": "output", "b": [0.4466, 0.2137, 0.502, 0.2287]}, {"w": "layer", "b": [0.5082, 0.2137, 0.5475, 0.2287]}, {"w": "is", "b": [0.5537, 0.2137, 0.5664, 0.2287]}, {"w": "softmax.", "b": [0.5725, 0.2137, 0.6507, 0.229]}, {"w": "The", "b": [0.6591, 0.2137, 0.6915, 0.2287]}, {"w": "cost", "b": [0.6977, 0.214, 0.7343, 0.229]}, {"w": "function", "b": [0.7415, 0.214, 0.8175, 0.229]}, {"w": "is", "b": [0.8238, 0.2137, 0.8364, 0.2287]}, {"w": "the", "b": [0.8426, 0.2137, 0.8688, 0.2287]}, {"w": "negative", "b": [0.1312, 0.232, 0.2081, 0.2469]}, {"w": "log-likelihood.", "b": [0.2168, 0.2317, 0.3461, 0.2469]}, {"w": "The", "b": [0.3584, 0.2317, 0.3909, 0.2466]}, {"w": "embedding", "b": [0.3984, 0.2317, 0.4873, 0.2466]}, {"w": "for", "b": [0.4948, 0.2317, 0.5174, 0.2466]}, {"w": "a", "b": [0.5249, 0.2317, 0.5343, 0.2466]}, {"w": "word", "b": [0.5418, 0.2317, 0.5822, 0.2466]}, {"w": "is", "b": [0.5897, 0.2317, 0.6023, 0.2466]}, {"w": "given", "b": [0.6099, 0.2317, 0.6528, 0.2466]}, {"w": "by", "b": [0.6603, 0.2317, 0.6802, 0.2466]}, {"w": "the", "b": [0.6877, 0.2317, 0.7139, 0.2466]}, {"w": "parameters", "b": [0.7214, 0.2317, 0.8126, 0.2466]}, {"w": "of", "b": [0.8201, 0.2317, 0.8353, 0.2466]}, {"w": "the", "b": [0.8428, 0.2317, 0.869, 0.2466]}, {"w": "embedding", "b": [0.1312, 0.2496, 0.2167, 0.2646]}, {"w": "layer", "b": [0.2228, 0.2496, 0.2605, 0.2646]}, {"w": "that", "b": [0.2667, 0.2496, 0.2998, 0.2646]}, {"w": "apply", "b": [0.306, 0.2496, 0.3497, 0.2646]}, {"w": "when", "b": [0.3558, 0.2496, 0.397, 0.2646]}, {"w": "a", "b": [0.4032, 0.2496, 0.4122, 0.2646]}, {"w": "one-hot", "b": [0.4184, 0.2496, 0.4777, 0.2646]}, {"w": "encoded", "b": [0.4838, 0.2496, 0.5477, 0.2646]}, {"w": "word", "b": [0.5538, 0.2496, 0.5925, 0.2646]}, {"w": "is", "b": [0.5987, 0.2496, 0.6108, 0.2646]}, {"w": "given", "b": [0.617, 0.2496, 0.6582, 0.2646]}, {"w": "as", "b": [0.6643, 0.2496, 0.6805, 0.2646]}, {"w": "the", "b": [0.6867, 0.2496, 0.7118, 0.2646]}, {"w": "input", "b": [0.718, 0.2496, 0.7602, 0.2646]}, {"w": "to", "b": [0.7663, 0.2496, 0.7824, 0.2646]}, {"w": "the", "b": [0.7885, 0.2496, 0.8137, 0.2646]}, {"w": "model.", "b": [0.8198, 0.2496, 0.8726, 0.2646]}]}, {"id": "b_3", "type": "paragraph", "text": "One problem with word embeddings trained using word2vec is that the set of word embeddings is fixed, and you cannot use the model for out-of-vocabulary words, that is, the words that weren’t present in the corpus used to train word embeddings. There are other architectures of neural networks that allow obtaining embeddings for any word, including out-of-vocabulary words. One such architecture, often used in practice, is fastText. It was invented at Facebook, and the code is available in open source.", "words": [{"w": "One", "b": [0.1312, 0.2765, 0.1634, 0.2915]}, {"w": "problem", "b": [0.1681, 0.2765, 0.2325, 0.2915]}, {"w": "with", "b": [0.2372, 0.2765, 0.2723, 0.2915]}, {"w": "word", "b": [0.277, 0.2765, 0.3158, 0.2915]}, {"w": "embeddings", "b": [0.3205, 0.2765, 0.413, 0.2915]}, {"w": "trained", "b": [0.4177, 0.2765, 0.4741, 0.2915]}, {"w": "using", "b": [0.4788, 0.2765, 0.5201, 0.2915]}, {"w": "word2vec", "b": [0.5248, 0.2765, 0.5977, 0.2915]}, {"w": "is", "b": [0.6024, 0.2765, 0.6145, 0.2915]}, {"w": "that", "b": [0.6192, 0.2765, 0.6524, 0.2915]}, {"w": "the", "b": [0.6571, 0.2765, 0.6822, 0.2915]}, {"w": "set", "b": [0.6869, 0.2765, 0.7092, 0.2915]}, {"w": "of", "b": [0.7139, 0.2765, 0.7284, 0.2915]}, {"w": "word", "b": [0.7331, 0.2765, 0.7718, 0.2915]}, {"w": "embeddings", "b": [0.7765, 0.2765, 0.8691, 0.2915]}, {"w": "is", "b": [0.1312, 0.2945, 0.1437, 0.3094]}, {"w": "fixed,", "b": [0.1499, 0.2945, 0.1937, 0.3094]}, {"w": "and", "b": [0.1999, 0.2945, 0.2297, 0.3094]}, {"w": "you", "b": [0.2359, 0.2945, 0.2648, 0.3094]}, {"w": "cannot", "b": [0.2709, 0.2945, 0.3255, 0.3094]}, {"w": "use", "b": [0.3317, 0.2945, 0.3576, 0.3094]}, {"w": "the", "b": [0.3638, 0.2945, 0.3895, 0.3094]}, {"w": "model", "b": [0.3957, 0.2945, 0.4446, 0.3094]}, {"w": "for", "b": [0.4508, 0.2945, 0.473, 0.3094]}, {"w": "out-of-vocabulary", "b": [0.4792, 0.2945, 0.6219, 0.3094]}, {"w": "words,", "b": [0.6281, 0.2945, 0.6803, 0.3094]}, {"w": "that", "b": [0.6865, 0.2945, 0.7205, 0.3094]}, {"w": "is,", "b": [0.7266, 0.2945, 0.7443, 0.3094]}, {"w": "the", "b": [0.7504, 0.2945, 0.7762, 0.3094]}, {"w": "words", "b": [0.7824, 0.2945, 0.8294, 0.3094]}, {"w": "that", "b": [0.8356, 0.2945, 0.8696, 0.3094]}, {"w": "weren’t", "b": [0.1306, 0.3124, 0.1884, 0.3274]}, {"w": "present", "b": [0.1938, 0.3124, 0.2508, 0.3274]}, {"w": "in", "b": [0.2562, 0.3124, 0.2713, 0.3274]}, {"w": "the", "b": [0.2768, 0.3124, 0.3019, 0.3274]}, {"w": "corpus", "b": [0.3073, 0.3124, 0.3588, 0.3274]}, {"w": "used", "b": [0.3642, 0.3124, 0.3995, 0.3274]}, {"w": "to", "b": [0.405, 0.3124, 0.421, 0.3274]}, {"w": "train", "b": [0.4265, 0.3124, 0.4647, 0.3274]}, {"w": "word", "b": [0.4702, 0.3124, 0.5089, 0.3274]}, {"w": "embeddings.", "b": [0.5143, 0.3124, 0.6119, 0.3274]}, {"w": "There", "b": [0.6199, 0.3124, 0.6662, 0.3274]}, {"w": "are", "b": [0.6716, 0.3124, 0.6958, 0.3274]}, {"w": "other", "b": [0.7012, 0.3124, 0.7425, 0.3274]}, {"w": "architectures", "b": [0.7479, 0.3124, 0.8492, 0.3274]}, {"w": "of", "b": [0.8546, 0.3124, 0.8692, 0.3274]}, {"w": "neural", "b": [0.1312, 0.3304, 0.1814, 0.3453]}, {"w": "networks", "b": [0.1876, 0.3304, 0.2588, 0.3453]}, {"w": "that", "b": [0.265, 0.3304, 0.2987, 0.3453]}, {"w": "allow", "b": [0.3049, 0.3304, 0.3463, 0.3453]}, {"w": "obtaining", "b": [0.3524, 0.3304, 0.4281, 0.3453]}, {"w": "embeddings", "b": [0.4343, 0.3304, 0.5284, 0.3453]}, {"w": "for", "b": [0.5346, 0.3304, 0.5566, 0.3453]}, {"w": "any", "b": [0.5628, 0.3304, 0.5914, 0.3453]}, {"w": "word,", "b": [0.5976, 0.3304, 0.6421, 0.3453]}, {"w": "including", "b": [0.6483, 0.3304, 0.7219, 0.3453]}, {"w": "out-of-vocabulary", "b": [0.7281, 0.3304, 0.8697, 0.3453]}, {"w": "words.", "b": [0.1306, 0.3483, 0.1836, 0.3633]}, {"w": "One", "b": [0.1989, 0.3483, 0.2324, 0.3633]}, {"w": "such", "b": [0.241, 0.3483, 0.2772, 0.3633]}, {"w": "architecture,", "b": [0.2857, 0.3483, 0.3889, 0.3633]}, {"w": "often", "b": [0.3981, 0.3483, 0.4394, 0.3633]}, {"w": "used", "b": [0.4479, 0.3483, 0.4846, 0.3633]}, {"w": "in", "b": [0.4932, 0.3483, 0.5089, 0.3633]}, {"w": "practice,", "b": [0.5174, 0.3483, 0.5876, 0.3633]}, {"w": "is", "b": [0.5967, 0.3483, 0.6094, 0.3633]}, {"w": "fastText.", "b": [0.6176, 0.3483, 0.6985, 0.3636]}, {"w": "It", "b": [0.7139, 0.3483, 0.728, 0.3633]}, {"w": "was", "b": [0.7365, 0.3483, 0.7664, 0.3633]}, {"w": "invented", "b": [0.775, 0.3483, 0.8441, 0.3633]}, {"w": "at", "b": [0.8526, 0.3483, 0.8693, 0.3633]}, {"w": "Facebook,", "b": [0.1312, 0.3663, 0.212, 0.3812]}, {"w": "and", "b": [0.2181, 0.3663, 0.2479, 0.3812]}, {"w": "the", "b": [0.254, 0.3663, 0.2797, 0.3812]}, {"w": "code", "b": [0.2858, 0.3663, 0.3222, 0.3812]}, {"w": "is", "b": [0.3284, 0.3663, 0.3408, 0.3812]}, {"w": "available", "b": [0.3469, 0.3663, 0.4167, 0.3812]}, {"w": "in", "b": [0.4228, 0.3663, 0.4382, 0.3812]}, {"w": "open", "b": [0.4444, 0.3663, 0.4828, 0.3812]}, {"w": "source.", "b": [0.489, 0.3663, 0.5445, 0.3812]}]}, {"id": "b_4", "type": "paragraph", "text": "The key difference between word2vec and fastText is that word2vec treats each word in the corpus as a unitary entity, and learns a vector for each word. Alternatively, fastText treats each word as an average of embedding vectors representing character n-grams that word is composed of. For example, the embedding for the word “mouse” is an average of the embedding vectors of the n-grams “,” “ous,” “ouse,” “ouse>,” “use,” “use>,” “se>” (assuming that the sizes", "words": [{"w": "The", "b": [0.1306, 0.3932, 0.163, 0.4082]}, {"w": "key", "b": [0.1705, 0.3932, 0.1982, 0.4082]}, {"w": "difference", "b": [0.2057, 0.3932, 0.2837, 0.4082]}, {"w": "between", "b": [0.2913, 0.3932, 0.3577, 0.4082]}, {"w": "word2vec", "b": [0.3652, 0.3932, 0.4411, 0.4082]}, {"w": "and", "b": [0.4486, 0.3932, 0.479, 0.4082]}, {"w": "fastText", "b": [0.4865, 0.3932, 0.5541, 0.4082]}, {"w": "is", "b": [0.5616, 0.3932, 0.5742, 0.4082]}, {"w": "that", "b": [0.5818, 0.3932, 0.6163, 0.4082]}, {"w": "word2vec", "b": [0.6238, 0.3932, 0.6997, 0.4082]}, {"w": "treats", "b": [0.7072, 0.3932, 0.7544, 0.4082]}, {"w": "each", "b": [0.762, 0.3932, 0.7981, 0.4082]}, {"w": "word", "b": [0.8056, 0.3932, 0.8459, 0.4082]}, {"w": "in", "b": [0.8534, 0.3932, 0.8691, 0.4082]}, {"w": "the", "b": [0.1312, 0.4111, 0.1574, 0.4261]}, {"w": "corpus", "b": [0.1642, 0.4111, 0.2177, 0.4261]}, {"w": "as", "b": [0.2246, 0.4111, 0.2414, 0.4261]}, {"w": "a", "b": [0.2482, 0.4111, 0.2576, 0.4261]}, {"w": "unitary", "b": [0.2645, 0.4111, 0.3247, 0.4261]}, {"w": "entity,", "b": [0.3315, 0.4111, 0.3828, 0.4261]}, {"w": "and", "b": [0.3898, 0.4111, 0.4201, 0.4261]}, {"w": "learns", "b": [0.427, 0.4111, 0.4752, 0.4261]}, {"w": "a", "b": [0.4821, 0.4111, 0.4915, 0.4261]}, {"w": "vector", "b": [0.4983, 0.4111, 0.5486, 0.4261]}, {"w": "for", "b": [0.5554, 0.4111, 0.578, 0.4261]}, {"w": "each", "b": [0.5848, 0.4111, 0.6209, 0.4261]}, {"w": "word.", "b": [0.6277, 0.4111, 0.6733, 0.4261]}, {"w": "Alternatively,", "b": [0.6835, 0.4111, 0.795, 0.4261]}, {"w": "fastText", "b": [0.802, 0.4111, 0.8696, 0.4261]}, {"w": "treats", "b": [0.1312, 0.4291, 0.1785, 0.444]}, {"w": "each", "b": [0.185, 0.4291, 0.2211, 0.444]}, {"w": "word", "b": [0.2276, 0.4291, 0.2679, 0.444]}, {"w": "as", "b": [0.2745, 0.4291, 0.2913, 0.444]}, {"w": "an", "b": [0.2979, 0.4291, 0.3177, 0.444]}, {"w": "average", "b": [0.3242, 0.4291, 0.3855, 0.444]}, {"w": "of", "b": [0.392, 0.4291, 0.4072, 0.444]}, {"w": "embedding", "b": [0.4137, 0.4291, 0.5026, 0.444]}, {"w": "vectors", "b": [0.5092, 0.4291, 0.5669, 0.444]}, {"w": "representing", "b": [0.5734, 0.4291, 0.6735, 0.444]}, {"w": "character", "b": [0.6801, 0.4291, 0.756, 0.444]}, {"w": "n-grams", "b": [0.7625, 0.4291, 0.8286, 0.444]}, {"w": "that", "b": [0.8351, 0.4291, 0.8696, 0.444]}, {"w": "word", "b": [0.1306, 0.447, 0.1709, 0.462]}, {"w": "is", "b": [0.1775, 0.447, 0.1902, 0.462]}, {"w": "composed", "b": [0.1968, 0.447, 0.2769, 0.462]}, {"w": "of.", "b": [0.2836, 0.447, 0.304, 0.462]}, {"w": "For", "b": [0.3136, 0.447, 0.3411, 0.462]}, {"w": "example,", "b": [0.3478, 0.447, 0.4205, 0.462]}, {"w": "the", "b": [0.4272, 0.447, 0.4534, 0.462]}, {"w": "embedding", "b": [0.46, 0.447, 0.5489, 0.462]}, {"w": "for", "b": [0.5555, 0.447, 0.5781, 0.462]}, {"w": "the", "b": [0.5847, 0.447, 0.6109, 0.462]}, {"w": "word", "b": [0.6175, 0.447, 0.6578, 0.462]}, {"w": "“mouse”", "b": [0.6645, 0.447, 0.7336, 0.462]}, {"w": "is", "b": [0.7402, 0.447, 0.7529, 0.462]}, {"w": "an", "b": [0.7595, 0.447, 0.7794, 0.462]}, {"w": "average", "b": [0.786, 0.447, 0.8473, 0.462]}, {"w": "of", "b": [0.8539, 0.447, 0.8691, 0.462]}, {"w": "the", "b": [0.1312, 0.465, 0.1566, 0.4799]}, {"w": "embedding", "b": [0.1627, 0.465, 0.2488, 0.4799]}, {"w": "vectors", "b": [0.255, 0.465, 0.3109, 0.4799]}, {"w": "of", "b": [0.317, 0.465, 0.3317, 0.4799]}, {"w": "the", "b": [0.3378, 0.465, 0.3632, 0.4799]}, {"w": "n-grams", "b": [0.3693, 0.465, 0.4333, 0.4799]}, {"w": "“,”", "b": [0.2201, 0.4829, 0.3056, 0.4979]}, {"w": "“ous,”", "b": [0.3116, 0.4829, 0.36, 0.4979]}, {"w": "“ouse,”", "b": [0.366, 0.4829, 0.4223, 0.4979]}, {"w": "“ouse>,”", "b": [0.4284, 0.4829, 0.4988, 0.4979]}, {"w": "“use,”", "b": [0.5048, 0.4829, 0.5521, 0.4979]}, {"w": "“use>,”", "b": [0.5582, 0.4829, 0.6196, 0.4979]}, {"w": "“se>”", "b": [0.6256, 0.4829, 0.6719, 0.4979]}, {"w": "(assuming", "b": [0.6779, 0.4829, 0.7575, 0.4979]}, {"w": "that", "b": [0.7634, 0.4829, 0.7966, 0.4979]}, {"w": "the", "b": [0.8026, 0.4829, 0.8277, 0.4979]}, {"w": "sizes", "b": [0.8337, 0.4829, 0.8691, 0.4979]}]}, {"id": "b_5", "type": "equation", "text": "of the smallest and the largest n-gram are, respectively, 3 and 6).", "words": [{"w": "of", "b": [0.1312, 0.5009, 0.1461, 0.5158]}, {"w": "the", "b": [0.1522, 0.5009, 0.1779, 0.5158]}, {"w": "smallest", "b": [0.1841, 0.5009, 0.2488, 0.5158]}, {"w": "and", "b": [0.255, 0.5009, 0.2847, 0.5158]}, {"w": "the", "b": [0.2909, 0.5009, 0.3165, 0.5158]}, {"w": "largest", "b": [0.3227, 0.5009, 0.3762, 0.5158]}, {"w": "n-gram", "b": [0.3823, 0.5009, 0.4398, 0.5158]}, {"w": "are,", "b": [0.4459, 0.5009, 0.4757, 0.5158]}, {"w": "respectively,", "b": [0.4819, 0.5009, 0.58, 0.5158]}, {"w": "3", "b": [0.5859, 0.5009, 0.5951, 0.5158]}, {"w": "and", "b": [0.6013, 0.5009, 0.631, 0.5158]}, {"w": "6).", "b": [0.6372, 0.5009, 0.6587, 0.5158]}]}, {"id": "b_6", "type": "paragraph", "text": "Word embeddings are an effective way of representing natural language texts for use in", "words": [{"w": "Word", "b": [0.1303, 0.5278, 0.1753, 0.5428]}, {"w": "embeddings", "b": [0.1832, 0.5278, 0.2795, 0.5428]}, {"w": "are", "b": [0.2874, 0.5278, 0.3125, 0.5428]}, {"w": "an", "b": [0.3204, 0.5278, 0.3403, 0.5428]}, {"w": "effective", "b": [0.3481, 0.5278, 0.4146, 0.5428]}, {"w": "way", "b": [0.4224, 0.5278, 0.4543, 0.5428]}, {"w": "of", "b": [0.4622, 0.5278, 0.4773, 0.5428]}, {"w": "representing", "b": [0.4852, 0.5278, 0.5853, 0.5428]}, {"w": "natural", "b": [0.5932, 0.5278, 0.6528, 0.5428]}, {"w": "language", "b": [0.6607, 0.5278, 0.7328, 0.5428]}, {"w": "texts", "b": [0.7407, 0.5278, 0.7811, 0.5428]}, {"w": "for", "b": [0.7889, 0.5278, 0.8115, 0.5428]}, {"w": "use", "b": [0.8193, 0.5278, 0.8456, 0.5428]}, {"w": "in", "b": [0.8534, 0.5278, 0.8691, 0.5428]}]}, {"id": "b_7", "type": "paragraph", "text": "such neural network architectures as recurrent neural networks (RNN) and convolutional neural networks (CNN) adapted for working with sequences. However, if you want to use word embeddings for representing variable-length texts for shallow learning algorithms (which require the input feature vectors of fixed dimensions), you would have to apply some", "words": [{"w": "such", "b": [0.1312, 0.5457, 0.166, 0.5607]}, {"w": "neural", "b": [0.1716, 0.5457, 0.2209, 0.5607]}, {"w": "network", "b": [0.2265, 0.5457, 0.2893, 0.5607]}, {"w": "architectures", "b": [0.2949, 0.5457, 0.3961, 0.5607]}, {"w": "as", "b": [0.4017, 0.5457, 0.4178, 0.5607]}, {"w": "recurrent", "b": [0.4233, 0.546, 0.5096, 0.561]}, {"w": "neural", "b": [0.516, 0.546, 0.5743, 0.561]}, {"w": "networks", "b": [0.5807, 0.546, 0.6635, 0.561]}, {"w": "(RNN)", "b": [0.669, 0.5457, 0.7235, 0.5607]}, {"w": "and", "b": [0.7291, 0.5457, 0.7583, 0.5607]}, {"w": "convolutional", "b": [0.7638, 0.5457, 0.8688, 0.5607]}, {"w": "neural", "b": [0.1312, 0.5637, 0.1826, 0.5786]}, {"w": "networks", "b": [0.1889, 0.5637, 0.2618, 0.5786]}, {"w": "(CNN)", "b": [0.2681, 0.5637, 0.3246, 0.5786]}, {"w": "adapted", "b": [0.3309, 0.5637, 0.3968, 0.5786]}, {"w": "for", "b": [0.4031, 0.5637, 0.4257, 0.5786]}, {"w": "working", "b": [0.432, 0.5637, 0.4969, 0.5786]}, {"w": "with", "b": [0.5033, 0.5637, 0.5399, 0.5786]}, {"w": "sequences.", "b": [0.5462, 0.5637, 0.6307, 0.5786]}, {"w": "However,", "b": [0.6394, 0.5637, 0.7143, 0.5786]}, {"w": "if", "b": [0.7207, 0.5637, 0.7317, 0.5786]}, {"w": "you", "b": [0.738, 0.5637, 0.7673, 0.5786]}, {"w": "want", "b": [0.7736, 0.5637, 0.8134, 0.5786]}, {"w": "to", "b": [0.8197, 0.5637, 0.8365, 0.5786]}, {"w": "use", "b": [0.8428, 0.5637, 0.8691, 0.5786]}, {"w": "word", "b": [0.1306, 0.5816, 0.1709, 0.5966]}, {"w": "embeddings", "b": [0.178, 0.5816, 0.2743, 0.5966]}, {"w": "for", "b": [0.2814, 0.5816, 0.3039, 0.5966]}, {"w": "representing", "b": [0.311, 0.5816, 0.4111, 0.5966]}, {"w": "variable-length", "b": [0.4182, 0.5816, 0.5402, 0.5966]}, {"w": "texts", "b": [0.5472, 0.5816, 0.5876, 0.5966]}, {"w": "for", "b": [0.5947, 0.5816, 0.6172, 0.5966]}, {"w": "shallow", "b": [0.6241, 0.5819, 0.6917, 0.5969]}, {"w": "learning", "b": [0.6998, 0.5819, 0.7746, 0.5969]}, {"w": "algorithms", "b": [0.7818, 0.5816, 0.8688, 0.5966]}, {"w": "(which", "b": [0.1291, 0.5996, 0.1825, 0.6145]}, {"w": "require", "b": [0.1886, 0.5996, 0.2442, 0.6145]}, {"w": "the", "b": [0.2504, 0.5996, 0.2758, 0.6145]}, {"w": "input", "b": [0.282, 0.5996, 0.3247, 0.6145]}, {"w": "feature", "b": [0.3309, 0.5996, 0.3864, 0.6145]}, {"w": "vectors", "b": [0.3925, 0.5996, 0.4487, 0.6145]}, {"w": "of", "b": [0.4548, 0.5996, 0.4696, 0.6145]}, {"w": "fixed", "b": [0.4757, 0.5996, 0.5139, 0.6145]}, {"w": "dimensions),", "b": [0.5201, 0.5996, 0.62, 0.6145]}, {"w": "you", "b": [0.6261, 0.5996, 0.6546, 0.6145]}, {"w": "would", "b": [0.6608, 0.5996, 0.7081, 0.6145]}, {"w": "have", "b": [0.7142, 0.5996, 0.7503, 0.6145]}, {"w": "to", "b": [0.7565, 0.5996, 0.7728, 0.6145]}, {"w": "apply", "b": [0.7789, 0.5996, 0.8232, 0.6145]}, {"w": "some", "b": [0.8294, 0.5996, 0.8691, 0.6145]}]}, {"id": "b_8", "type": "paragraph", "text": "aggregation operation to word vectors, such as weighted sum or average. The representation of a text document obtained as an average of the words composing that document turns out to be not very useful in practice.", "words": [{"w": "aggregation", "b": [0.1312, 0.6175, 0.2233, 0.6325]}, {"w": "operation", "b": [0.2294, 0.6175, 0.3048, 0.6325]}, {"w": "to", "b": [0.311, 0.6175, 0.3272, 0.6325]}, {"w": "word", "b": [0.3334, 0.6175, 0.3723, 0.6325]}, {"w": "vectors,", "b": [0.3785, 0.6175, 0.4393, 0.6325]}, {"w": "such", "b": [0.4455, 0.6175, 0.4805, 0.6325]}, {"w": "as", "b": [0.4867, 0.6175, 0.503, 0.6325]}, {"w": "weighted", "b": [0.5091, 0.6175, 0.5789, 0.6325]}, {"w": "sum", "b": [0.5851, 0.6175, 0.6175, 0.6325]}, {"w": "or", "b": [0.6237, 0.6175, 0.6399, 0.6325]}, {"w": "average.", "b": [0.6461, 0.6175, 0.7103, 0.6325]}, {"w": "The", "b": [0.7186, 0.6175, 0.75, 0.6325]}, {"w": "representation", "b": [0.7561, 0.6175, 0.8691, 0.6325]}, {"w": "of", "b": [0.1312, 0.6355, 0.1459, 0.6504]}, {"w": "a", "b": [0.152, 0.6355, 0.1612, 0.6504]}, {"w": "text", "b": [0.1673, 0.6355, 0.1992, 0.6504]}, {"w": "document", "b": [0.2053, 0.6355, 0.2832, 0.6504]}, {"w": "obtained", "b": [0.2894, 0.6355, 0.3582, 0.6504]}, {"w": "as", "b": [0.3644, 0.6355, 0.3806, 0.6504]}, {"w": "an", "b": [0.3868, 0.6355, 0.406, 0.6504]}, {"w": "average", "b": [0.4122, 0.6355, 0.4714, 0.6504]}, {"w": "of", "b": [0.4775, 0.6355, 0.4922, 0.6504]}, {"w": "the", "b": [0.4983, 0.6355, 0.5236, 0.6504]}, {"w": "words", "b": [0.5298, 0.6355, 0.576, 0.6504]}, {"w": "composing", "b": [0.5821, 0.6355, 0.6657, 0.6504]}, {"w": "that", "b": [0.6719, 0.6355, 0.7052, 0.6504]}, {"w": "document", "b": [0.7114, 0.6355, 0.7893, 0.6504]}, {"w": "turns", "b": [0.7955, 0.6355, 0.8371, 0.6504]}, {"w": "out", "b": [0.8433, 0.6355, 0.8696, 0.6504]}, {"w": "to", "b": [0.1312, 0.6534, 0.1476, 0.6684]}, {"w": "be", "b": [0.1538, 0.6534, 0.1728, 0.6684]}, {"w": "not", "b": [0.1789, 0.6534, 0.2056, 0.6684]}, {"w": "very", "b": [0.2117, 0.6534, 0.2461, 0.6684]}, {"w": "useful", "b": [0.2523, 0.6534, 0.2991, 0.6684]}, {"w": "in", "b": [0.3052, 0.6534, 0.3206, 0.6684]}, {"w": "practice.", "b": [0.3267, 0.6534, 0.3955, 0.6684]}]}, {"id": "b_9", "type": "paragraph", "text": "4.7.2 Document Embeddings", "words": [{"w": "4.7.2", "b": [0.1312, 0.7016, 0.1749, 0.7165]}, {"w": "Document", "b": [0.1961, 0.7016, 0.2916, 0.7165]}, {"w": "Embeddings", "b": [0.2987, 0.7016, 0.4121, 0.7165]}]}, {"id": "b_10", "type": "paragraph", "text": "A popular way of obtaining an embedding for a sentence or an entire document is to use the doc2vec neural network architecture, also invented at Google and available in open source. The architecture of doc2vec is very similar to word2vec. The only major difference is that now there are two embedding vectors, one for the document ID and one for the word. The prediction of the surrounding words for an input word is made by, first, averaging the two embedding vectors (the document embedding vector and the word embedding vector), and then predicting the surrounding words from that average. To average the two vectors, they", "words": [{"w": "A", "b": [0.1305, 0.7379, 0.1441, 0.7528]}, {"w": "popular", "b": [0.1503, 0.7379, 0.2114, 0.7528]}, {"w": "way", "b": [0.2176, 0.7379, 0.2483, 0.7528]}, {"w": "of", "b": [0.2545, 0.7379, 0.2691, 0.7528]}, {"w": "obtaining", "b": [0.2753, 0.7379, 0.35, 0.7528]}, {"w": "an", "b": [0.3562, 0.7379, 0.3753, 0.7528]}, {"w": "embedding", "b": [0.3815, 0.7379, 0.4673, 0.7528]}, {"w": "for", "b": [0.4734, 0.7379, 0.4952, 0.7528]}, {"w": "a", "b": [0.5013, 0.7379, 0.5104, 0.7528]}, {"w": "sentence", "b": [0.5166, 0.7379, 0.5828, 0.7528]}, {"w": "or", "b": [0.589, 0.7379, 0.6052, 0.7528]}, {"w": "an", "b": [0.6113, 0.7379, 0.6305, 0.7528]}, {"w": "entire", "b": [0.6367, 0.7379, 0.6816, 0.7528]}, {"w": "document", "b": [0.6878, 0.7379, 0.7655, 0.7528]}, {"w": "is", "b": [0.7717, 0.7379, 0.7839, 0.7528]}, {"w": "to", "b": [0.7901, 0.7379, 0.8062, 0.7528]}, {"w": "use", "b": [0.8124, 0.7379, 0.8377, 0.7528]}, {"w": "the", "b": [0.8439, 0.7379, 0.8691, 0.7528]}, {"w": "doc2vec", "b": [0.1312, 0.7561, 0.204, 0.7711]}, {"w": "neural", "b": [0.2102, 0.7558, 0.2604, 0.7708]}, {"w": "network", "b": [0.2666, 0.7558, 0.3307, 0.7708]}, {"w": "architecture,", "b": [0.3368, 0.7558, 0.4378, 0.7708]}, {"w": "also", "b": [0.444, 0.7558, 0.4748, 0.7708]}, {"w": "invented", "b": [0.481, 0.7558, 0.5486, 0.7708]}, {"w": "at", "b": [0.5548, 0.7558, 0.5712, 0.7708]}, {"w": "Google", "b": [0.5773, 0.7558, 0.6333, 0.7708]}, {"w": "and", "b": [0.6394, 0.7558, 0.6691, 0.7708]}, {"w": "available", "b": [0.6753, 0.7558, 0.7449, 0.7708]}, {"w": "in", "b": [0.7511, 0.7558, 0.7665, 0.7708]}, {"w": "open", "b": [0.7726, 0.7558, 0.811, 0.7708]}, {"w": "source.", "b": [0.8172, 0.7558, 0.8727, 0.7708]}, {"w": "The", "b": [0.1306, 0.7737, 0.163, 0.7887]}, {"w": "architecture", "b": [0.1691, 0.7737, 0.2669, 0.7887]}, {"w": "of", "b": [0.2731, 0.7737, 0.2882, 0.7887]}, {"w": "doc2vec", "b": [0.2943, 0.7737, 0.3586, 0.7887]}, {"w": "is", "b": [0.3647, 0.7737, 0.3774, 0.7887]}, {"w": "very", "b": [0.3835, 0.7737, 0.4186, 0.7887]}, {"w": "similar", "b": [0.4247, 0.7737, 0.4802, 0.7887]}, {"w": "to", "b": [0.4864, 0.7737, 0.5031, 0.7887]}, {"w": "word2vec.", "b": [0.5092, 0.7737, 0.5902, 0.7887]}, {"w": "The", "b": [0.5984, 0.7737, 0.6308, 0.7887]}, {"w": "only", "b": [0.637, 0.7737, 0.672, 0.7887]}, {"w": "major", "b": [0.6781, 0.7737, 0.7262, 0.7887]}, {"w": "difference", "b": [0.7323, 0.7737, 0.8102, 0.7887]}, {"w": "is", "b": [0.8163, 0.7737, 0.829, 0.7887]}, {"w": "that", "b": [0.8351, 0.7737, 0.8696, 0.7887]}, {"w": "now", "b": [0.1312, 0.7917, 0.1638, 0.8066]}, {"w": "there", "b": [0.1699, 0.7917, 0.2113, 0.8066]}, {"w": "are", "b": [0.2175, 0.7917, 0.2423, 0.8066]}, {"w": "two", "b": [0.2485, 0.7917, 0.2774, 0.8066]}, {"w": "embedding", "b": [0.2836, 0.7917, 0.3714, 0.8066]}, {"w": "vectors,", "b": [0.3776, 0.7917, 0.4398, 0.8066]}, {"w": "one", "b": [0.4459, 0.7917, 0.4738, 0.8066]}, {"w": "for", "b": [0.48, 0.7917, 0.5023, 0.8066]}, {"w": "the", "b": [0.5084, 0.7917, 0.5343, 0.8066]}, {"w": "document", "b": [0.5404, 0.7917, 0.62, 0.8066]}, {"w": "ID", "b": [0.6262, 0.7917, 0.6471, 0.8066]}, {"w": "and", "b": [0.6532, 0.7917, 0.6832, 0.8066]}, {"w": "one", "b": [0.6893, 0.7917, 0.7173, 0.8066]}, {"w": "for", "b": [0.7234, 0.7917, 0.7457, 0.8066]}, {"w": "the", "b": [0.7518, 0.7917, 0.7777, 0.8066]}, {"w": "word.", "b": [0.7838, 0.7917, 0.8288, 0.8066]}, {"w": "The", "b": [0.837, 0.7917, 0.8691, 0.8066]}, {"w": "prediction", "b": [0.1312, 0.8096, 0.2136, 0.8246]}, {"w": "of", "b": [0.2197, 0.8096, 0.2349, 0.8246]}, {"w": "the", "b": [0.241, 0.8096, 0.267, 0.8246]}, {"w": "surrounding", "b": [0.2732, 0.8096, 0.3713, 0.8246]}, {"w": "words", "b": [0.3775, 0.8096, 0.425, 0.8246]}, {"w": "for", "b": [0.4312, 0.8096, 0.4536, 0.8246]}, {"w": "an", "b": [0.4597, 0.8096, 0.4795, 0.8246]}, {"w": "input", "b": [0.4857, 0.8096, 0.5294, 0.8246]}, {"w": "word", "b": [0.5356, 0.8096, 0.5757, 0.8246]}, {"w": "is", "b": [0.5819, 0.8096, 0.5945, 0.8246]}, {"w": "made", "b": [0.6006, 0.8096, 0.6444, 0.8246]}, {"w": "by,", "b": [0.6505, 0.8096, 0.674, 0.8246]}, {"w": "first,", "b": [0.6801, 0.8096, 0.7178, 0.8246]}, {"w": "averaging", "b": [0.7239, 0.8096, 0.8016, 0.8246]}, {"w": "the", "b": [0.8077, 0.8096, 0.8338, 0.8246]}, {"w": "two", "b": [0.8399, 0.8096, 0.8691, 0.8246]}, {"w": "embedding", "b": [0.1312, 0.8276, 0.219, 0.8425]}, {"w": "vectors", "b": [0.2252, 0.8276, 0.2821, 0.8425]}, {"w": "(the", "b": [0.2883, 0.8276, 0.3214, 0.8425]}, {"w": "document", "b": [0.3275, 0.8276, 0.407, 0.8425]}, {"w": "embedding", "b": [0.4132, 0.8276, 0.501, 0.8425]}, {"w": "vector", "b": [0.5072, 0.8276, 0.5568, 0.8425]}, {"w": "and", "b": [0.563, 0.8276, 0.5929, 0.8425]}, {"w": "the", "b": [0.5991, 0.8276, 0.6249, 0.8425]}, {"w": "word", "b": [0.6311, 0.8276, 0.6709, 0.8425]}, {"w": "embedding", "b": [0.677, 0.8276, 0.7648, 0.8425]}, {"w": "vector),", "b": [0.771, 0.8276, 0.833, 0.8425]}, {"w": "and", "b": [0.8392, 0.8276, 0.8691, 0.8425]}, {"w": "then", "b": [0.1312, 0.8455, 0.1672, 0.8605]}, {"w": "predicting", "b": [0.1734, 0.8455, 0.2546, 0.8605]}, {"w": "the", "b": [0.2608, 0.8455, 0.2865, 0.8605]}, {"w": "surrounding", "b": [0.2926, 0.8455, 0.3894, 0.8605]}, {"w": "words", "b": [0.3956, 0.8455, 0.4425, 0.8605]}, {"w": "from", "b": [0.4487, 0.8455, 0.4862, 0.8605]}, {"w": "that", "b": [0.4924, 0.8455, 0.5263, 0.8605]}, {"w": "average.", "b": [0.5325, 0.8455, 0.5978, 0.8605]}, {"w": "To", "b": [0.606, 0.8455, 0.6271, 0.8605]}, {"w": "average", "b": [0.6332, 0.8455, 0.6934, 0.8605]}, {"w": "the", "b": [0.6996, 0.8455, 0.7252, 0.8605]}, {"w": "two", "b": [0.7314, 0.8455, 0.7602, 0.8605]}, {"w": "vectors,", "b": [0.7663, 0.8455, 0.8282, 0.8605]}, {"w": "they", "b": [0.8343, 0.8455, 0.8698, 0.8605]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 33", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "33", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 123, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 19: The skip-gram model with window size 4 and the embedding layer of 300 units.", "words": [{"w": "Figure", "b": [0.1332, 0.8002, 0.1853, 0.8151]}, {"w": "19:", "b": [0.1915, 0.8002, 0.215, 0.8151]}, {"w": "The", "b": [0.2233, 0.8002, 0.255, 0.8151]}, {"w": "skip-gram", "b": [0.2612, 0.8002, 0.3408, 0.8151]}, {"w": "model", "b": [0.3469, 0.8002, 0.3956, 0.8151]}, {"w": "with", "b": [0.4018, 0.8002, 0.4377, 0.8151]}, {"w": "window", "b": [0.4438, 0.8002, 0.5048, 0.8151]}, {"w": "size", "b": [0.511, 0.8002, 0.5398, 0.8151]}, {"w": "4", "b": [0.5458, 0.8002, 0.555, 0.8151]}, {"w": "and", "b": [0.5612, 0.8002, 0.5909, 0.8151]}, {"w": "the", "b": [0.5971, 0.8002, 0.6227, 0.8151]}, {"w": "embedding", "b": [0.6289, 0.8002, 0.716, 0.8151]}, {"w": "layer", "b": [0.7222, 0.8002, 0.7607, 0.8151]}, {"w": "of", "b": [0.7668, 0.8002, 0.7817, 0.8151]}, {"w": "300", "b": [0.7878, 0.8002, 0.8154, 0.8151]}, {"w": "units.", "b": [0.8216, 0.8002, 0.8668, 0.8151]}]}, {"id": "b_1", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 34", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "34", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 124, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "must be of the same dimensionality. Interestingly, this makes it possible to compare not just document vectors (by finding the cosine similarity), but also a document and a word vector. The word vectors trained that way are very similar to those trained using word2vec.", "words": [{"w": "must", "b": [0.1312, 0.0881, 0.1702, 0.1031]}, {"w": "be", "b": [0.1763, 0.0881, 0.195, 0.1031]}, {"w": "of", "b": [0.2012, 0.0881, 0.2158, 0.1031]}, {"w": "the", "b": [0.222, 0.0881, 0.2472, 0.1031]}, {"w": "same", "b": [0.2533, 0.0881, 0.2928, 0.1031]}, {"w": "dimensionality.", "b": [0.299, 0.0881, 0.4177, 0.1031]}, {"w": "Interestingly,", "b": [0.4259, 0.0881, 0.5291, 0.1031]}, {"w": "this", "b": [0.5352, 0.0881, 0.5646, 0.1031]}, {"w": "makes", "b": [0.5707, 0.0881, 0.6193, 0.1031]}, {"w": "it", "b": [0.6255, 0.0881, 0.6376, 0.1031]}, {"w": "possible", "b": [0.6437, 0.0881, 0.706, 0.1031]}, {"w": "to", "b": [0.7122, 0.0881, 0.7283, 0.1031]}, {"w": "compare", "b": [0.7345, 0.0881, 0.8012, 0.1031]}, {"w": "not", "b": [0.8073, 0.0881, 0.8336, 0.1031]}, {"w": "just", "b": [0.8397, 0.0881, 0.8696, 0.1031]}, {"w": "document", "b": [0.1312, 0.106, 0.2097, 0.121]}, {"w": "vectors", "b": [0.2158, 0.106, 0.2721, 0.121]}, {"w": "(by", "b": [0.2782, 0.106, 0.3047, 0.121]}, {"w": "finding", "b": [0.3109, 0.106, 0.3659, 0.121]}, {"w": "the", "b": [0.372, 0.106, 0.3975, 0.121]}, {"w": "cosine", "b": [0.4037, 0.106, 0.4517, 0.121]}, {"w": "similarity),", "b": [0.4578, 0.106, 0.5456, 0.121]}, {"w": "but", "b": [0.5518, 0.106, 0.5793, 0.121]}, {"w": "also", "b": [0.5854, 0.106, 0.6161, 0.121]}, {"w": "a", "b": [0.6222, 0.106, 0.6314, 0.121]}, {"w": "document", "b": [0.6376, 0.106, 0.7161, 0.121]}, {"w": "and", "b": [0.7222, 0.106, 0.7517, 0.121]}, {"w": "a", "b": [0.7579, 0.106, 0.7671, 0.121]}, {"w": "word", "b": [0.7732, 0.106, 0.8125, 0.121]}, {"w": "vector.", "b": [0.8186, 0.106, 0.8727, 0.121]}, {"w": "The", "b": [0.1306, 0.124, 0.1624, 0.1389]}, {"w": "word", "b": [0.1685, 0.124, 0.208, 0.1389]}, {"w": "vectors", "b": [0.2142, 0.124, 0.2707, 0.1389]}, {"w": "trained", "b": [0.2769, 0.124, 0.3344, 0.1389]}, {"w": "that", "b": [0.3405, 0.124, 0.3744, 0.1389]}, {"w": "way", "b": [0.3805, 0.124, 0.4118, 0.1389]}, {"w": "are", "b": [0.4179, 0.124, 0.4426, 0.1389]}, {"w": "very", "b": [0.4487, 0.124, 0.4832, 0.1389]}, {"w": "similar", "b": [0.4893, 0.124, 0.5438, 0.1389]}, {"w": "to", "b": [0.5499, 0.124, 0.5663, 0.1389]}, {"w": "those", "b": [0.5725, 0.124, 0.6147, 0.1389]}, {"w": "trained", "b": [0.6208, 0.124, 0.6783, 0.1389]}, {"w": "using", "b": [0.6844, 0.124, 0.7266, 0.1389]}, {"w": "word2vec.", "b": [0.7327, 0.124, 0.8123, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "To obtain an embedding for a new document, not belonging to the corpus of documents used to train document embeddings, this new document is first added to the corpus. It gets a new document ID assigned to it. Then the existing model is additionally trained for several epochs with all trained parameters being frozen but the new ones, corresponding to the new document ID. The input document ID is provided as a one-hot encoding.", "words": [{"w": "To", "b": [0.1306, 0.1509, 0.1511, 0.1659]}, {"w": "obtain", "b": [0.1571, 0.1509, 0.2074, 0.1659]}, {"w": "an", "b": [0.2134, 0.1509, 0.2325, 0.1659]}, {"w": "embedding", "b": [0.2384, 0.1509, 0.3239, 0.1659]}, {"w": "for", "b": [0.3299, 0.1509, 0.3515, 0.1659]}, {"w": "a", "b": [0.3575, 0.1509, 0.3666, 0.1659]}, {"w": "new", "b": [0.3726, 0.1509, 0.4037, 0.1659]}, {"w": "document,", "b": [0.4097, 0.1509, 0.4921, 0.1659]}, {"w": "not", "b": [0.4981, 0.1509, 0.5242, 0.1659]}, {"w": "belonging", "b": [0.5302, 0.1509, 0.6061, 0.1659]}, {"w": "to", "b": [0.6121, 0.1509, 0.6282, 0.1659]}, {"w": "the", "b": [0.6342, 0.1509, 0.6593, 0.1659]}, {"w": "corpus", "b": [0.6653, 0.1509, 0.7167, 0.1659]}, {"w": "of", "b": [0.7227, 0.1509, 0.7373, 0.1659]}, {"w": "documents", "b": [0.7433, 0.1509, 0.8278, 0.1659]}, {"w": "used", "b": [0.8338, 0.1509, 0.8691, 0.1659]}, {"w": "to", "b": [0.1312, 0.1689, 0.148, 0.1838]}, {"w": "train", "b": [0.1547, 0.1689, 0.1945, 0.1838]}, {"w": "document", "b": [0.2012, 0.1689, 0.2817, 0.1838]}, {"w": "embeddings,", "b": [0.2884, 0.1689, 0.39, 0.1838]}, {"w": "this", "b": [0.3968, 0.1689, 0.4272, 0.1838]}, {"w": "new", "b": [0.4339, 0.1689, 0.4664, 0.1838]}, {"w": "document", "b": [0.473, 0.1689, 0.5536, 0.1838]}, {"w": "is", "b": [0.5603, 0.1689, 0.573, 0.1838]}, {"w": "first", "b": [0.5797, 0.1689, 0.6122, 0.1838]}, {"w": "added", "b": [0.6189, 0.1689, 0.6681, 0.1838]}, {"w": "to", "b": [0.6748, 0.1689, 0.6915, 0.1838]}, {"w": "the", "b": [0.6982, 0.1689, 0.7244, 0.1838]}, {"w": "corpus.", "b": [0.7311, 0.1689, 0.7898, 0.1838]}, {"w": "It", "b": [0.7997, 0.1689, 0.8138, 0.1838]}, {"w": "gets", "b": [0.8205, 0.1689, 0.853, 0.1838]}, {"w": "a", "b": [0.8597, 0.1689, 0.8691, 0.1838]}, {"w": "new", "b": [0.1312, 0.1868, 0.1629, 0.2018]}, {"w": "document", "b": [0.169, 0.1868, 0.2476, 0.2018]}, {"w": "ID", "b": [0.2537, 0.1868, 0.2743, 0.2018]}, {"w": "assigned", "b": [0.2805, 0.1868, 0.347, 0.2018]}, {"w": "to", "b": [0.3532, 0.1868, 0.3695, 0.2018]}, {"w": "it.", "b": [0.3756, 0.1868, 0.393, 0.2018]}, {"w": "Then", "b": [0.4012, 0.1868, 0.443, 0.2018]}, {"w": "the", "b": [0.4491, 0.1868, 0.4747, 0.2018]}, {"w": "existing", "b": [0.4808, 0.1868, 0.5426, 0.2018]}, {"w": "model", "b": [0.5488, 0.1868, 0.5972, 0.2018]}, {"w": "is", "b": [0.6034, 0.1868, 0.6157, 0.2018]}, {"w": "additionally", "b": [0.6219, 0.1868, 0.7173, 0.2018]}, {"w": "trained", "b": [0.7234, 0.1868, 0.7806, 0.2018]}, {"w": "for", "b": [0.7867, 0.1868, 0.8087, 0.2018]}, {"w": "several", "b": [0.8149, 0.1868, 0.8691, 0.2018]}, {"w": "epochs", "b": [0.1312, 0.2048, 0.1845, 0.2197]}, {"w": "with", "b": [0.1907, 0.2048, 0.2262, 0.2197]}, {"w": "all", "b": [0.2323, 0.2048, 0.2516, 0.2197]}, {"w": "trained", "b": [0.2578, 0.2048, 0.3145, 0.2197]}, {"w": "parameters", "b": [0.3207, 0.2048, 0.409, 0.2197]}, {"w": "being", "b": [0.4152, 0.2048, 0.4583, 0.2197]}, {"w": "frozen", "b": [0.4645, 0.2048, 0.5127, 0.2197]}, {"w": "but", "b": [0.5188, 0.2048, 0.5462, 0.2197]}, {"w": "the", "b": [0.5523, 0.2048, 0.5777, 0.2197]}, {"w": "new", "b": [0.5838, 0.2048, 0.6152, 0.2197]}, {"w": "ones,", "b": [0.6214, 0.2048, 0.661, 0.2197]}, {"w": "corresponding", "b": [0.6672, 0.2048, 0.7784, 0.2197]}, {"w": "to", "b": [0.7845, 0.2048, 0.8007, 0.2197]}, {"w": "the", "b": [0.8069, 0.2048, 0.8322, 0.2197]}, {"w": "new", "b": [0.8384, 0.2048, 0.8698, 0.2197]}, {"w": "document", "b": [0.1312, 0.2227, 0.2102, 0.2377]}, {"w": "ID.", "b": [0.2163, 0.2227, 0.2422, 0.2377]}, {"w": "The", "b": [0.2484, 0.2227, 0.2802, 0.2377]}, {"w": "input", "b": [0.2863, 0.2227, 0.3294, 0.2377]}, {"w": "document", "b": [0.3355, 0.2227, 0.4145, 0.2377]}, {"w": "ID", "b": [0.4206, 0.2227, 0.4414, 0.2377]}, {"w": "is", "b": [0.4475, 0.2227, 0.46, 0.2377]}, {"w": "provided", "b": [0.4661, 0.2227, 0.5359, 0.2377]}, {"w": "as", "b": [0.5421, 0.2227, 0.5586, 0.2377]}, {"w": "a", "b": [0.5647, 0.2227, 0.5739, 0.2377]}, {"w": "one-hot", "b": [0.5801, 0.2227, 0.6406, 0.2377]}, {"w": "encoding.", "b": [0.6467, 0.2227, 0.7231, 0.2377]}]}, {"id": "b_2", "type": "paragraph", "text": "4.7.3 Embeddings of Anything", "words": [{"w": "4.7.3", "b": [0.1312, 0.2709, 0.1749, 0.2858]}, {"w": "Embeddings", "b": [0.1961, 0.2709, 0.3095, 0.2858]}, {"w": "of", "b": [0.3165, 0.2709, 0.3336, 0.2858]}, {"w": "Anything", "b": [0.3407, 0.2709, 0.4275, 0.2858]}]}, {"id": "b_3", "type": "paragraph", "text": "The following technique is commonly used to obtain embedding vectors for any object (and not just words or documents). First, we formulate a supervised learning problem that takes our objects as input and outputs a prediction. Then we build a labeled dataset and train a neural network model that solves our supervised learning problem. Then we use the outputs of one of the fully connected layers near the output layer of the neural network model (before non-linearity) as embeddings of the input object.", "words": [{"w": "The", "b": [0.1306, 0.3071, 0.1623, 0.3221]}, {"w": "following", "b": [0.1684, 0.3071, 0.2401, 0.3221]}, {"w": "technique", "b": [0.2462, 0.3071, 0.323, 0.3221]}, {"w": "is", "b": [0.3292, 0.3071, 0.3416, 0.3221]}, {"w": "commonly", "b": [0.3477, 0.3071, 0.4301, 0.3221]}, {"w": "used", "b": [0.4362, 0.3071, 0.4722, 0.3221]}, {"w": "to", "b": [0.4783, 0.3071, 0.4947, 0.3221]}, {"w": "obtain", "b": [0.5009, 0.3071, 0.552, 0.3221]}, {"w": "embedding", "b": [0.5582, 0.3071, 0.6452, 0.3221]}, {"w": "vectors", "b": [0.6513, 0.3071, 0.7078, 0.3221]}, {"w": "for", "b": [0.7139, 0.3071, 0.736, 0.3221]}, {"w": "any", "b": [0.7422, 0.3071, 0.7708, 0.3221]}, {"w": "object", "b": [0.777, 0.3071, 0.8261, 0.3221]}, {"w": "(and", "b": [0.8323, 0.3071, 0.8691, 0.3221]}, {"w": "not", "b": [0.1312, 0.3251, 0.1577, 0.34]}, {"w": "just", "b": [0.1639, 0.3251, 0.1941, 0.34]}, {"w": "words", "b": [0.2002, 0.3251, 0.2468, 0.34]}, {"w": "or", "b": [0.2529, 0.3251, 0.2693, 0.34]}, {"w": "documents).", "b": [0.2754, 0.3251, 0.3734, 0.34]}, {"w": "First,", "b": [0.3816, 0.3251, 0.4253, 0.34]}, {"w": "we", "b": [0.4315, 0.3251, 0.4524, 0.34]}, {"w": "formulate", "b": [0.4586, 0.3251, 0.535, 0.34]}, {"w": "a", "b": [0.5412, 0.3251, 0.5504, 0.34]}, {"w": "supervised", "b": [0.5565, 0.3251, 0.6404, 0.34]}, {"w": "learning", "b": [0.6466, 0.3251, 0.7108, 0.34]}, {"w": "problem", "b": [0.717, 0.3251, 0.7823, 0.34]}, {"w": "that", "b": [0.7884, 0.3251, 0.8221, 0.34]}, {"w": "takes", "b": [0.8282, 0.3251, 0.8691, 0.34]}, {"w": "our", "b": [0.1312, 0.343, 0.158, 0.358]}, {"w": "objects", "b": [0.1641, 0.343, 0.2208, 0.358]}, {"w": "as", "b": [0.2269, 0.343, 0.2434, 0.358]}, {"w": "input", "b": [0.2496, 0.343, 0.2927, 0.358]}, {"w": "and", "b": [0.2989, 0.343, 0.3287, 0.358]}, {"w": "outputs", "b": [0.3348, 0.343, 0.3966, 0.358]}, {"w": "a", "b": [0.4027, 0.343, 0.4119, 0.358]}, {"w": "prediction.", "b": [0.4181, 0.343, 0.5045, 0.358]}, {"w": "Then", "b": [0.5127, 0.343, 0.5548, 0.358]}, {"w": "we", "b": [0.5609, 0.343, 0.582, 0.358]}, {"w": "build", "b": [0.5881, 0.343, 0.6292, 0.358]}, {"w": "a", "b": [0.6354, 0.343, 0.6446, 0.358]}, {"w": "labeled", "b": [0.6507, 0.343, 0.7078, 0.358]}, {"w": "dataset", "b": [0.7139, 0.343, 0.7726, 0.358]}, {"w": "and", "b": [0.7787, 0.343, 0.8085, 0.358]}, {"w": "train", "b": [0.8146, 0.343, 0.8537, 0.358]}, {"w": "a", "b": [0.8599, 0.343, 0.8691, 0.358]}, {"w": "neural", "b": [0.1312, 0.361, 0.1808, 0.3759]}, {"w": "network", "b": [0.1869, 0.361, 0.2501, 0.3759]}, {"w": "model", "b": [0.2562, 0.361, 0.3042, 0.3759]}, {"w": "that", "b": [0.3104, 0.361, 0.3437, 0.3759]}, {"w": "solves", "b": [0.3498, 0.361, 0.3955, 0.3759]}, {"w": "our", "b": [0.4016, 0.361, 0.4279, 0.3759]}, {"w": "supervised", "b": [0.4341, 0.361, 0.5172, 0.3759]}, {"w": "learning", "b": [0.5233, 0.361, 0.587, 0.3759]}, {"w": "problem.", "b": [0.5932, 0.361, 0.6629, 0.3759]}, {"w": "Then", "b": [0.6711, 0.361, 0.7125, 0.3759]}, {"w": "we", "b": [0.7187, 0.361, 0.7394, 0.3759]}, {"w": "use", "b": [0.7455, 0.361, 0.7709, 0.3759]}, {"w": "the", "b": [0.777, 0.361, 0.8023, 0.3759]}, {"w": "outputs", "b": [0.8084, 0.361, 0.8691, 0.3759]}, {"w": "of", "b": [0.1312, 0.3789, 0.1458, 0.3939]}, {"w": "one", "b": [0.1516, 0.3789, 0.1787, 0.3939]}, {"w": "of", "b": [0.1846, 0.3789, 0.1991, 0.3939]}, {"w": "the", "b": [0.2049, 0.3789, 0.23, 0.3939]}, {"w": "fully", "b": [0.2358, 0.3789, 0.271, 0.3939]}, {"w": "connected", "b": [0.2768, 0.3789, 0.3552, 0.3939]}, {"w": "layers", "b": [0.361, 0.3789, 0.4059, 0.3939]}, {"w": "near", "b": [0.4117, 0.3789, 0.4459, 0.3939]}, {"w": "the", "b": [0.4517, 0.3789, 0.4769, 0.3939]}, {"w": "output", "b": [0.4827, 0.3789, 0.5359, 0.3939]}, {"w": "layer", "b": [0.5417, 0.3789, 0.5794, 0.3939]}, {"w": "of", "b": [0.5852, 0.3789, 0.5998, 0.3939]}, {"w": "the", "b": [0.6056, 0.3789, 0.6307, 0.3939]}, {"w": "neural", "b": [0.6365, 0.3789, 0.6858, 0.3939]}, {"w": "network", "b": [0.6916, 0.3789, 0.7545, 0.3939]}, {"w": "model", "b": [0.7603, 0.3789, 0.808, 0.3939]}, {"w": "(before", "b": [0.8138, 0.3789, 0.8692, 0.3939]}, {"w": "non-linearity)", "b": [0.1312, 0.3969, 0.241, 0.4118]}, {"w": "as", "b": [0.2472, 0.3969, 0.2637, 0.4118]}, {"w": "embeddings", "b": [0.2698, 0.3969, 0.3643, 0.4118]}, {"w": "of", "b": [0.3704, 0.3969, 0.3853, 0.4118]}, {"w": "the", "b": [0.3914, 0.3969, 0.4171, 0.4118]}, {"w": "input", "b": [0.4232, 0.3969, 0.4663, 0.4118]}, {"w": "object.", "b": [0.4725, 0.3969, 0.5268, 0.4118]}]}, {"id": "b_4", "type": "paragraph", "text": "For example, the ImageNet labeled dataset of images and a deep convolutional neural network (CNN) architecture, similar to AlexNet, is often used to train embeddings for images. An illustration of the embedding layers for images is shown in Figure 20. In this illustration, we have a deep CNN with two fully connected layers near the output. The neural network was trained to predict the object depicted in the image. To obtain an embedding of an image not used for training the model, we send that image (usually represented as three matrices of pixels, one per channel R, G, and B) to the input of the neural network, and then use the output of one of the fully connected layers before non-linearity. Which of the fully connected layers is better depends on the task you want to solve, and", "words": [{"w": "For", "b": [0.1312, 0.4238, 0.1588, 0.4387]}, {"w": "example,", "b": [0.1657, 0.4238, 0.2384, 0.4387]}, {"w": "the", "b": [0.2456, 0.4238, 0.2718, 0.4387]}, {"w": "ImageNet", "b": [0.2787, 0.4238, 0.3582, 0.4387]}, {"w": "labeled", "b": [0.3652, 0.4238, 0.4232, 0.4387]}, {"w": "dataset", "b": [0.4302, 0.4238, 0.4899, 0.4387]}, {"w": "of", "b": [0.4969, 0.4238, 0.5121, 0.4387]}, {"w": "images", "b": [0.519, 0.4238, 0.5746, 0.4387]}, {"w": "and", "b": [0.5815, 0.4238, 0.6119, 0.4387]}, {"w": "a", "b": [0.6188, 0.4238, 0.6282, 0.4387]}, {"w": "deep", "b": [0.6352, 0.4238, 0.6729, 0.4387]}, {"w": "convolutional", "b": [0.6796, 0.4241, 0.8025, 0.439]}, {"w": "neural", "b": [0.8105, 0.4241, 0.8688, 0.439]}, {"w": "network", "b": [0.1312, 0.442, 0.2057, 0.457]}, {"w": "(CNN)", "b": [0.2127, 0.4417, 0.2692, 0.4567]}, {"w": "architecture,", "b": [0.276, 0.4417, 0.3792, 0.4567]}, {"w": "similar", "b": [0.3862, 0.4417, 0.4418, 0.4567]}, {"w": "to", "b": [0.4487, 0.4417, 0.4654, 0.4567]}, {"w": "AlexNet,", "b": [0.4722, 0.4417, 0.5549, 0.457]}, {"w": "is", "b": [0.5619, 0.4417, 0.5746, 0.4567]}, {"w": "often", "b": [0.5815, 0.4417, 0.6228, 0.4567]}, {"w": "used", "b": [0.6297, 0.4417, 0.6664, 0.4567]}, {"w": "to", "b": [0.6733, 0.4417, 0.69, 0.4567]}, {"w": "train", "b": [0.6969, 0.4417, 0.7367, 0.4567]}, {"w": "embeddings", "b": [0.7435, 0.4417, 0.8399, 0.4567]}, {"w": "for", "b": [0.8468, 0.4417, 0.8693, 0.4567]}, {"w": "images.", "b": [0.1312, 0.4597, 0.192, 0.4746]}, {"w": "An", "b": [0.2074, 0.4597, 0.232, 0.4746]}, {"w": "illustration", "b": [0.2406, 0.4597, 0.3307, 0.4746]}, {"w": "of", "b": [0.3393, 0.4597, 0.3544, 0.4746]}, {"w": "the", "b": [0.363, 0.4597, 0.3892, 0.4746]}, {"w": "embedding", "b": [0.3977, 0.4597, 0.4866, 0.4746]}, {"w": "layers", "b": [0.4952, 0.4597, 0.5419, 0.4746]}, {"w": "for", "b": [0.5505, 0.4597, 0.573, 0.4746]}, {"w": "images", "b": [0.5816, 0.4597, 0.6371, 0.4746]}, {"w": "is", "b": [0.6457, 0.4597, 0.6584, 0.4746]}, {"w": "shown", "b": [0.6669, 0.4597, 0.7178, 0.4746]}, {"w": "in", "b": [0.7263, 0.4597, 0.742, 0.4746]}, {"w": "Figure", "b": [0.7506, 0.4597, 0.8037, 0.4746]}, {"w": "20.", "b": [0.8123, 0.4597, 0.8364, 0.4746]}, {"w": "In", "b": [0.8518, 0.4597, 0.8691, 0.4746]}, {"w": "this", "b": [0.1312, 0.4776, 0.1617, 0.4926]}, {"w": "illustration,", "b": [0.1682, 0.4776, 0.2635, 0.4926]}, {"w": "we", "b": [0.2701, 0.4776, 0.2915, 0.4926]}, {"w": "have", "b": [0.298, 0.4776, 0.3352, 0.4926]}, {"w": "a", "b": [0.3417, 0.4776, 0.3511, 0.4926]}, {"w": "deep", "b": [0.3576, 0.4776, 0.3952, 0.4926]}, {"w": "CNN", "b": [0.4017, 0.4776, 0.4435, 0.4926]}, {"w": "with", "b": [0.45, 0.4776, 0.4866, 0.4926]}, {"w": "two", "b": [0.4931, 0.4776, 0.5224, 0.4926]}, {"w": "fully", "b": [0.5287, 0.4779, 0.57, 0.4929]}, {"w": "connected", "b": [0.5775, 0.4779, 0.67, 0.4929]}, {"w": "layers", "b": [0.6775, 0.4779, 0.7305, 0.4929]}, {"w": "near", "b": [0.737, 0.4776, 0.7726, 0.4926]}, {"w": "the", "b": [0.7791, 0.4776, 0.8053, 0.4926]}, {"w": "output.", "b": [0.8117, 0.4776, 0.8724, 0.4926]}, {"w": "The", "b": [0.1306, 0.4956, 0.163, 0.5105]}, {"w": "neural", "b": [0.1706, 0.4956, 0.2219, 0.5105]}, {"w": "network", "b": [0.2296, 0.4956, 0.295, 0.5105]}, {"w": "was", "b": [0.3027, 0.4956, 0.3326, 0.5105]}, {"w": "trained", "b": [0.3403, 0.4956, 0.3989, 0.5105]}, {"w": "to", "b": [0.4065, 0.4956, 0.4233, 0.5105]}, {"w": "predict", "b": [0.4309, 0.4956, 0.4885, 0.5105]}, {"w": "the", "b": [0.4962, 0.4956, 0.5223, 0.5105]}, {"w": "object", "b": [0.53, 0.4956, 0.5802, 0.5105]}, {"w": "depicted", "b": [0.5878, 0.4956, 0.6569, 0.5105]}, {"w": "in", "b": [0.6645, 0.4956, 0.6802, 0.5105]}, {"w": "the", "b": [0.6879, 0.4956, 0.714, 0.5105]}, {"w": "image.", "b": [0.7217, 0.4956, 0.775, 0.5105]}, {"w": "To", "b": [0.7877, 0.4956, 0.8092, 0.5105]}, {"w": "obtain", "b": [0.8168, 0.4956, 0.8691, 0.5105]}, {"w": "an", "b": [0.1312, 0.5135, 0.1511, 0.5285]}, {"w": "embedding", "b": [0.1583, 0.5135, 0.2472, 0.5285]}, {"w": "of", "b": [0.2544, 0.5135, 0.2695, 0.5285]}, {"w": "an", "b": [0.2767, 0.5135, 0.2966, 0.5285]}, {"w": "image", "b": [0.3038, 0.5135, 0.3519, 0.5285]}, {"w": "not", "b": [0.359, 0.5135, 0.3862, 0.5285]}, {"w": "used", "b": [0.3934, 0.5135, 0.4301, 0.5285]}, {"w": "for", "b": [0.4373, 0.5135, 0.4599, 0.5285]}, {"w": "training", "b": [0.467, 0.5135, 0.5319, 0.5285]}, {"w": "the", "b": [0.5391, 0.5135, 0.5653, 0.5285]}, {"w": "model,", "b": [0.5724, 0.5135, 0.6273, 0.5285]}, {"w": "we", "b": [0.6348, 0.5135, 0.6562, 0.5285]}, {"w": "send", "b": [0.6634, 0.5135, 0.7001, 0.5285]}, {"w": "that", "b": [0.7073, 0.5135, 0.7418, 0.5285]}, {"w": "image", "b": [0.749, 0.5135, 0.7971, 0.5285]}, {"w": "(usually", "b": [0.8043, 0.5135, 0.8697, 0.5285]}, {"w": "represented", "b": [0.1312, 0.5315, 0.2214, 0.5464]}, {"w": "as", "b": [0.2263, 0.5315, 0.2425, 0.5464]}, {"w": "three", "b": [0.2474, 0.5315, 0.2877, 0.5464]}, {"w": "matrices", "b": [0.2926, 0.5315, 0.3591, 0.5464]}, {"w": "of", "b": [0.364, 0.5315, 0.3786, 0.5464]}, {"w": "pixels,", "b": [0.3835, 0.5315, 0.4334, 0.5464]}, {"w": "one", "b": [0.4385, 0.5315, 0.4657, 0.5464]}, {"w": "per", "b": [0.4706, 0.5315, 0.4963, 0.5464]}, {"w": "channel", "b": [0.5012, 0.5315, 0.561, 0.5464]}, {"w": "R,", "b": [0.5659, 0.5315, 0.5843, 0.5464]}, {"w": "G,", "b": [0.5892, 0.5315, 0.6084, 0.5464]}, {"w": "and", "b": [0.6133, 0.5315, 0.6425, 0.5464]}, {"w": "B)", "b": [0.6474, 0.5315, 0.6672, 0.5464]}, {"w": "to", "b": [0.6721, 0.5315, 0.6882, 0.5464]}, {"w": "the", "b": [0.6931, 0.5315, 0.7183, 0.5464]}, {"w": "input", "b": [0.7232, 0.5315, 0.7654, 0.5464]}, {"w": "of", "b": [0.7703, 0.5315, 0.7849, 0.5464]}, {"w": "the", "b": [0.7898, 0.5315, 0.815, 0.5464]}, {"w": "neural", "b": [0.8199, 0.5315, 0.8692, 0.5464]}, {"w": "network,", "b": [0.1312, 0.5494, 0.2019, 0.5644]}, {"w": "and", "b": [0.2082, 0.5494, 0.2385, 0.5644]}, {"w": "then", "b": [0.2448, 0.5494, 0.2814, 0.5644]}, {"w": "use", "b": [0.2877, 0.5494, 0.3139, 0.5644]}, {"w": "the", "b": [0.3202, 0.5494, 0.3464, 0.5644]}, {"w": "output", "b": [0.3526, 0.5494, 0.4081, 0.5644]}, {"w": "of", "b": [0.4143, 0.5494, 0.4295, 0.5644]}, {"w": "one", "b": [0.4358, 0.5494, 0.464, 0.5644]}, {"w": "of", "b": [0.4703, 0.5494, 0.4854, 0.5644]}, {"w": "the", "b": [0.4917, 0.5494, 0.5179, 0.5644]}, {"w": "fully", "b": [0.5241, 0.5494, 0.5607, 0.5644]}, {"w": "connected", "b": [0.567, 0.5494, 0.6486, 0.5644]}, {"w": "layers", "b": [0.6549, 0.5494, 0.7016, 0.5644]}, {"w": "before", "b": [0.7079, 0.5494, 0.7581, 0.5644]}, {"w": "non-linearity.", "b": [0.7644, 0.5494, 0.8727, 0.5644]}, {"w": "Which", "b": [0.1303, 0.5674, 0.1837, 0.5823]}, {"w": "of", "b": [0.1905, 0.5674, 0.2056, 0.5823]}, {"w": "the", "b": [0.2124, 0.5674, 0.2386, 0.5823]}, {"w": "fully", "b": [0.2454, 0.5674, 0.282, 0.5823]}, {"w": "connected", "b": [0.2888, 0.5674, 0.3704, 0.5823]}, {"w": "layers", "b": [0.3772, 0.5674, 0.4239, 0.5823]}, {"w": "is", "b": [0.4307, 0.5674, 0.4434, 0.5823]}, {"w": "better", "b": [0.4502, 0.5674, 0.4999, 0.5823]}, {"w": "depends", "b": [0.5067, 0.5674, 0.5733, 0.5823]}, {"w": "on", "b": [0.5801, 0.5674, 0.5999, 0.5823]}, {"w": "the", "b": [0.6067, 0.5674, 0.6329, 0.5823]}, {"w": "task", "b": [0.6397, 0.5674, 0.6738, 0.5823]}, {"w": "you", "b": [0.6806, 0.5674, 0.7099, 0.5823]}, {"w": "want", "b": [0.7167, 0.5674, 0.7564, 0.5823]}, {"w": "to", "b": [0.7632, 0.5674, 0.78, 0.5823]}, {"w": "solve,", "b": [0.7868, 0.5674, 0.8319, 0.5823]}, {"w": "and", "b": [0.8388, 0.5674, 0.8692, 0.5823]}]}, {"id": "b_5", "type": "paragraph", "text": "must be decided experimentally.", "words": [{"w": "must", "b": [0.1312, 0.5853, 0.1708, 0.6003]}, {"w": "be", "b": [0.177, 0.5853, 0.1959, 0.6003]}, {"w": "decided", "b": [0.2021, 0.5853, 0.2626, 0.6003]}, {"w": "experimentally.", "b": [0.2688, 0.5853, 0.3914, 0.6003]}]}, {"id": "b_6", "type": "paragraph", "text": "By following the above approach, we can train embeddings of any type. The data analyst only needs to figure out three things:", "words": [{"w": "By", "b": [0.1312, 0.6122, 0.1545, 0.6272]}, {"w": "following", "b": [0.1607, 0.6122, 0.2339, 0.6272]}, {"w": "the", "b": [0.2401, 0.6122, 0.2662, 0.6272]}, {"w": "above", "b": [0.2724, 0.6122, 0.3195, 0.6272]}, {"w": "approach,", "b": [0.3257, 0.6122, 0.4058, 0.6272]}, {"w": "we", "b": [0.4119, 0.6122, 0.4334, 0.6272]}, {"w": "can", "b": [0.4396, 0.6122, 0.4678, 0.6272]}, {"w": "train", "b": [0.474, 0.6122, 0.5138, 0.6272]}, {"w": "embeddings", "b": [0.52, 0.6122, 0.6163, 0.6272]}, {"w": "of", "b": [0.6225, 0.6122, 0.6377, 0.6272]}, {"w": "any", "b": [0.6439, 0.6122, 0.6732, 0.6272]}, {"w": "type.", "b": [0.6794, 0.6122, 0.7207, 0.6272]}, {"w": "The", "b": [0.729, 0.6122, 0.7614, 0.6272]}, {"w": "data", "b": [0.7676, 0.6122, 0.8042, 0.6272]}, {"w": "analyst", "b": [0.8104, 0.6122, 0.8695, 0.6272]}, {"w": "only", "b": [0.1312, 0.6302, 0.1656, 0.6451]}, {"w": "needs", "b": [0.1717, 0.6302, 0.216, 0.6451]}, {"w": "to", "b": [0.2221, 0.6302, 0.2385, 0.6451]}, {"w": "figure", "b": [0.2447, 0.6302, 0.2898, 0.6451]}, {"w": "out", "b": [0.296, 0.6302, 0.3226, 0.6451]}, {"w": "three", "b": [0.3288, 0.6302, 0.3699, 0.6451]}, {"w": "things:", "b": [0.376, 0.6302, 0.4305, 0.6451]}]}, {"id": "b_7", "type": "paragraph", "text": "• what supervised learning problem to solve (for images, usually object classification), • how to represent the input for the neural network (for images, matrices of pixels, one per channel), and • what will be the architecture of the neural network before the fully connected layers (for images, usually a deep CNN).", "words": [{"w": "•", "b": [0.1538, 0.6571, 0.1681, 0.672]}, {"w": "what", "b": [0.1774, 0.6571, 0.2173, 0.672]}, {"w": "supervised", "b": [0.2235, 0.6571, 0.3079, 0.672]}, {"w": "learning", "b": [0.314, 0.6571, 0.3787, 0.672]}, {"w": "problem", "b": [0.3848, 0.6571, 0.4505, 0.672]}, {"w": "to", "b": [0.4566, 0.6571, 0.473, 0.672]}, {"w": "solve", "b": [0.4792, 0.6571, 0.5183, 0.672]}, {"w": "(for", "b": [0.5244, 0.6571, 0.5537, 0.672]}, {"w": "images,", "b": [0.5598, 0.6571, 0.6194, 0.672]}, {"w": "usually", "b": [0.6256, 0.6571, 0.6826, 0.672]}, {"w": "object", "b": [0.6888, 0.6571, 0.738, 0.672]}, {"w": "classification),", "b": [0.7441, 0.6571, 0.8582, 0.672]}, {"w": "•", "b": [0.1538, 0.675, 0.1681, 0.69]}, {"w": "how", "b": [0.1774, 0.675, 0.2098, 0.69]}, {"w": "to", "b": [0.2159, 0.675, 0.2324, 0.69]}, {"w": "represent", "b": [0.2385, 0.675, 0.3124, 0.69]}, {"w": "the", "b": [0.3185, 0.675, 0.3443, 0.69]}, {"w": "input", "b": [0.3504, 0.675, 0.3937, 0.69]}, {"w": "for", "b": [0.3998, 0.675, 0.422, 0.69]}, {"w": "the", "b": [0.4282, 0.675, 0.4539, 0.69]}, {"w": "neural", "b": [0.4601, 0.675, 0.5106, 0.69]}, {"w": "network", "b": [0.5167, 0.675, 0.5811, 0.69]}, {"w": "(for", "b": [0.5873, 0.675, 0.6167, 0.69]}, {"w": "images,", "b": [0.6228, 0.675, 0.6826, 0.69]}, {"w": "matrices", "b": [0.6887, 0.675, 0.7569, 0.69]}, {"w": "of", "b": [0.763, 0.675, 0.7779, 0.69]}, {"w": "pixels,", "b": [0.7841, 0.675, 0.8351, 0.69]}, {"w": "one", "b": [0.8413, 0.675, 0.8691, 0.69]}, {"w": "per", "b": [0.1774, 0.693, 0.2036, 0.7079]}, {"w": "channel),", "b": [0.2097, 0.693, 0.2831, 0.7079]}, {"w": "and", "b": [0.2892, 0.693, 0.3189, 0.7079]}, {"w": "•", "b": [0.1538, 0.7109, 0.1681, 0.7259]}, {"w": "what", "b": [0.1774, 0.7109, 0.2181, 0.7259]}, {"w": "will", "b": [0.2242, 0.7109, 0.2534, 0.7259]}, {"w": "be", "b": [0.2596, 0.7109, 0.2789, 0.7259]}, {"w": "the", "b": [0.2851, 0.7109, 0.3112, 0.7259]}, {"w": "architecture", "b": [0.3173, 0.7109, 0.4151, 0.7259]}, {"w": "of", "b": [0.4212, 0.7109, 0.4364, 0.7259]}, {"w": "the", "b": [0.4425, 0.7109, 0.4686, 0.7259]}, {"w": "neural", "b": [0.4748, 0.7109, 0.526, 0.7259]}, {"w": "network", "b": [0.5322, 0.7109, 0.5975, 0.7259]}, {"w": "before", "b": [0.6036, 0.7109, 0.6538, 0.7259]}, {"w": "the", "b": [0.6599, 0.7109, 0.6861, 0.7259]}, {"w": "fully", "b": [0.6922, 0.7109, 0.7287, 0.7259]}, {"w": "connected", "b": [0.7349, 0.7109, 0.8164, 0.7259]}, {"w": "layers", "b": [0.8225, 0.7109, 0.8691, 0.7259]}, {"w": "(for", "b": [0.1752, 0.7289, 0.2045, 0.7438]}, {"w": "images,", "b": [0.2106, 0.7289, 0.2702, 0.7438]}, {"w": "usually", "b": [0.2763, 0.7289, 0.3334, 0.7438]}, {"w": "a", "b": [0.3395, 0.7289, 0.3488, 0.7438]}, {"w": "deep", "b": [0.3549, 0.7289, 0.3918, 0.7438]}, {"w": "CNN).", "b": [0.398, 0.7289, 0.4513, 0.7438]}]}, {"id": "b_8", "type": "paragraph", "text": "4.7.4 Choosing Embedding Dimensionality", "words": [{"w": "4.7.4", "b": [0.1312, 0.777, 0.1749, 0.792]}, {"w": "Choosing", "b": [0.1961, 0.777, 0.2817, 0.792]}, {"w": "Embedding", "b": [0.2888, 0.777, 0.3938, 0.792]}, {"w": "Dimensionality", "b": [0.4008, 0.777, 0.5398, 0.792]}]}, {"id": "b_9", "type": "paragraph", "text": "The embedding dimensionality is usually determined experimentally or from experience. For example, Google, in its TensorFlow documentation, recommends the following rule of thumb:", "words": [{"w": "The", "b": [0.1306, 0.8133, 0.1619, 0.8283]}, {"w": "embedding", "b": [0.1681, 0.8133, 0.254, 0.8283]}, {"w": "dimensionality", "b": [0.2602, 0.8133, 0.3755, 0.8283]}, {"w": "is", "b": [0.3817, 0.8133, 0.3939, 0.8283]}, {"w": "usually", "b": [0.4001, 0.8133, 0.4563, 0.8283]}, {"w": "determined", "b": [0.4625, 0.8133, 0.5515, 0.8283]}, {"w": "experimentally", "b": [0.5577, 0.8133, 0.675, 0.8283]}, {"w": "or", "b": [0.6812, 0.8133, 0.6974, 0.8283]}, {"w": "from", "b": [0.7035, 0.8133, 0.7405, 0.8283]}, {"w": "experience.", "b": [0.7467, 0.8133, 0.8347, 0.8283]}, {"w": "For", "b": [0.8429, 0.8133, 0.8695, 0.8283]}, {"w": "example,", "b": [0.1312, 0.8313, 0.2011, 0.8462]}, {"w": "Google,", "b": [0.2073, 0.8313, 0.2673, 0.8462]}, {"w": "in", "b": [0.2734, 0.8313, 0.2885, 0.8462]}, {"w": "its", "b": [0.2947, 0.8313, 0.3139, 0.8462]}, {"w": "TensorFlow", "b": [0.32, 0.8313, 0.4114, 0.8462]}, {"w": "documentation,", "b": [0.4176, 0.8313, 0.5403, 0.8462]}, {"w": "recommends", "b": [0.5465, 0.8313, 0.6442, 0.8462]}, {"w": "the", "b": [0.6503, 0.8313, 0.6755, 0.8462]}, {"w": "following", "b": [0.6816, 0.8313, 0.752, 0.8462]}, {"w": "rule", "b": [0.7582, 0.8313, 0.7884, 0.8462]}, {"w": "of", "b": [0.7946, 0.8313, 0.8092, 0.8462]}, {"w": "thumb:", "b": [0.8153, 0.8313, 0.8716, 0.8462]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 35", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "35", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 125, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 20: A neural network architecture for training image embeddings. The embedding layers are shown in green.", "words": [{"w": "Figure", "b": [0.1312, 0.4408, 0.1844, 0.4558]}, {"w": "20:", "b": [0.1906, 0.4408, 0.2147, 0.4558]}, {"w": "A", "b": [0.2231, 0.4408, 0.2372, 0.4558]}, {"w": "neural", "b": [0.2435, 0.4408, 0.2948, 0.4558]}, {"w": "network", "b": [0.3011, 0.4408, 0.3665, 0.4558]}, {"w": "architecture", "b": [0.3728, 0.4408, 0.4708, 0.4558]}, {"w": "for", "b": [0.477, 0.4408, 0.4996, 0.4558]}, {"w": "training", "b": [0.5058, 0.4408, 0.5707, 0.4558]}, {"w": "image", "b": [0.577, 0.4408, 0.6251, 0.4558]}, {"w": "embeddings.", "b": [0.6314, 0.4408, 0.7329, 0.4558]}, {"w": "The", "b": [0.7415, 0.4408, 0.7739, 0.4558]}, {"w": "embedding", "b": [0.7802, 0.4408, 0.8691, 0.4558]}, {"w": "layers", "b": [0.1312, 0.4588, 0.177, 0.4737]}, {"w": "are", "b": [0.1832, 0.4588, 0.2079, 0.4737]}, {"w": "shown", "b": [0.214, 0.4588, 0.2638, 0.4737]}, {"w": "in", "b": [0.27, 0.4588, 0.2854, 0.4737]}, {"w": "green.", "b": [0.2915, 0.4588, 0.3398, 0.4737]}]}, {"id": "b_1", "type": "equation", "text": "d =", "words": [{"w": "d", "b": [0.4637, 0.5272, 0.4733, 0.5422]}, {"w": "=", "b": [0.4784, 0.527, 0.4928, 0.5419]}]}, {"id": "b_2", "type": "paragraph", "text": "4√ D,", "words": [{"w": "4√", "b": [0.5, 0.5137, 0.5154, 0.5294]}, {"w": "D,", "b": [0.5154, 0.5272, 0.5363, 0.5422]}]}, {"id": "b_3", "type": "paragraph", "text": "where d is the embedding dimensionality and D is the “number of categories.” The number of categories for word embeddings is the number of unique words in the corpus. For arbitrary embeddings, it’s the dimensionality of the original input. For example, if the number of the unique words in the corpus is D = 5000000 then the embedding dimensionality d =", "words": [{"w": "where", "b": [0.1306, 0.5629, 0.1778, 0.5778]}, {"w": "d", "b": [0.1839, 0.5631, 0.1935, 0.5781]}, {"w": "is", "b": [0.1997, 0.5629, 0.2121, 0.5778]}, {"w": "the", "b": [0.2183, 0.5629, 0.2439, 0.5778]}, {"w": "embedding", "b": [0.2501, 0.5629, 0.3373, 0.5778]}, {"w": "dimensionality", "b": [0.3434, 0.5629, 0.4604, 0.5778]}, {"w": "and", "b": [0.4666, 0.5629, 0.4963, 0.5778]}, {"w": "D", "b": [0.5023, 0.5631, 0.5176, 0.5781]}, {"w": "is", "b": [0.5243, 0.5629, 0.5367, 0.5778]}, {"w": "the", "b": [0.5429, 0.5629, 0.5685, 0.5778]}, {"w": "“number", "b": [0.5747, 0.5629, 0.6444, 0.5778]}, {"w": "of", "b": [0.6506, 0.5629, 0.6655, 0.5778]}, {"w": "categories.”", "b": [0.6716, 0.5629, 0.762, 0.5778]}, {"w": "The", "b": [0.7703, 0.5629, 0.8021, 0.5778]}, {"w": "number", "b": [0.8082, 0.5629, 0.8693, 0.5778]}, {"w": "of", "b": [0.1312, 0.5808, 0.1458, 0.5958]}, {"w": "categories", "b": [0.1516, 0.5808, 0.2291, 0.5958]}, {"w": "for", "b": [0.2349, 0.5808, 0.2566, 0.5958]}, {"w": "word", "b": [0.2624, 0.5808, 0.3011, 0.5958]}, {"w": "embeddings", "b": [0.3069, 0.5808, 0.3995, 0.5958]}, {"w": "is", "b": [0.4052, 0.5808, 0.4174, 0.5958]}, {"w": "the", "b": [0.4232, 0.5808, 0.4483, 0.5958]}, {"w": "number", "b": [0.4541, 0.5808, 0.514, 0.5958]}, {"w": "of", "b": [0.5197, 0.5808, 0.5343, 0.5958]}, {"w": "unique", "b": [0.5401, 0.5808, 0.5929, 0.5958]}, {"w": "words", "b": [0.5987, 0.5808, 0.6445, 0.5958]}, {"w": "in", "b": [0.6503, 0.5808, 0.6654, 0.5958]}, {"w": "the", "b": [0.6712, 0.5808, 0.6963, 0.5958]}, {"w": "corpus.", "b": [0.7021, 0.5808, 0.7585, 0.5958]}, {"w": "For", "b": [0.7666, 0.5808, 0.793, 0.5958]}, {"w": "arbitrary", "b": [0.7988, 0.5808, 0.8698, 0.5958]}, {"w": "embeddings,", "b": [0.1312, 0.5988, 0.2328, 0.6137]}, {"w": "it’s", "b": [0.2422, 0.5988, 0.2675, 0.6137]}, {"w": "the", "b": [0.2762, 0.5988, 0.3024, 0.6137]}, {"w": "dimensionality", "b": [0.3112, 0.5988, 0.4305, 0.6137]}, {"w": "of", "b": [0.4393, 0.5988, 0.4545, 0.6137]}, {"w": "the", "b": [0.4633, 0.5988, 0.4894, 0.6137]}, {"w": "original", "b": [0.4982, 0.5988, 0.56, 0.6137]}, {"w": "input.", "b": [0.5688, 0.5988, 0.6179, 0.6137]}, {"w": "For", "b": [0.634, 0.5988, 0.6616, 0.6137]}, {"w": "example,", "b": [0.6703, 0.5988, 0.743, 0.6137]}, {"w": "if", "b": [0.7525, 0.5988, 0.7635, 0.6137]}, {"w": "the", "b": [0.7722, 0.5988, 0.7984, 0.6137]}, {"w": "number", "b": [0.8072, 0.5988, 0.8695, 0.6137]}, {"w": "of", "b": [0.1312, 0.6167, 0.1464, 0.6317]}, {"w": "the", "b": [0.1549, 0.6167, 0.181, 0.6317]}, {"w": "unique", "b": [0.1894, 0.6167, 0.2444, 0.6317]}, {"w": "words", "b": [0.2528, 0.6167, 0.3006, 0.6317]}, {"w": "in", "b": [0.309, 0.6167, 0.3247, 0.6317]}, {"w": "the", "b": [0.3331, 0.6167, 0.3593, 0.6317]}, {"w": "corpus", "b": [0.3677, 0.6167, 0.4212, 0.6317]}, {"w": "is", "b": [0.4297, 0.6167, 0.4424, 0.6317]}, {"w": "D", "b": [0.4506, 0.617, 0.4659, 0.6319]}, {"w": "=", "b": [0.4754, 0.6167, 0.49, 0.6317]}, {"w": "5000000", "b": [0.4989, 0.6167, 0.5648, 0.6317]}, {"w": "then", "b": [0.5732, 0.6167, 0.6099, 0.6317]}, {"w": "the", "b": [0.6183, 0.6167, 0.6444, 0.6317]}, {"w": "embedding", "b": [0.6529, 0.6167, 0.7418, 0.6317]}, {"w": "dimensionality", "b": [0.7502, 0.6167, 0.8696, 0.6317]}, {"w": "d", "b": [0.1312, 0.6349, 0.1408, 0.6499]}, {"w": "=", "b": [0.146, 0.6347, 0.1603, 0.6496]}]}, {"id": "b_4", "type": "equation", "text": "4√ 5000000 = 47. In practice, values between 50 and 600 are often used.", "words": [{"w": "4√", "b": [0.1675, 0.6225, 0.1829, 0.6384]}, {"w": "5000000", "b": [0.1829, 0.6347, 0.2475, 0.6496]}, {"w": "=", "b": [0.2526, 0.6347, 0.2669, 0.6496]}, {"w": "47.", "b": [0.2721, 0.6347, 0.2956, 0.6496]}, {"w": "In", "b": [0.3038, 0.6347, 0.3207, 0.6496]}, {"w": "practice,", "b": [0.3269, 0.6347, 0.3957, 0.6496]}, {"w": "values", "b": [0.4018, 0.6347, 0.4506, 0.6496]}, {"w": "between", "b": [0.4568, 0.6347, 0.5219, 0.6496]}, {"w": "50", "b": [0.5279, 0.6347, 0.5464, 0.6496]}, {"w": "and", "b": [0.5525, 0.6347, 0.5823, 0.6496]}, {"w": "600", "b": [0.5884, 0.6347, 0.6161, 0.6496]}, {"w": "are", "b": [0.6222, 0.6347, 0.6469, 0.6496]}, {"w": "often", "b": [0.653, 0.6347, 0.6936, 0.6496]}, {"w": "used.", "b": [0.6997, 0.6347, 0.7408, 0.6496]}]}, {"id": "b_5", "type": "paragraph", "text": "A more principled approach to choose the embedding dimensionality is to treat it as a hyperparameter tuned on a downstream task. For example, if you have a labeled corpus of documents, then you can optimize the embedding dimensionality by minimizing the number of prediction errors made by the classifier trained on that labeled data, where the words in the documents are represented by the embeddings.", "words": [{"w": "A", "b": [0.1305, 0.6616, 0.1446, 0.6765]}, {"w": "more", "b": [0.1528, 0.6616, 0.1936, 0.6765]}, {"w": "principled", "b": [0.2018, 0.6616, 0.2835, 0.6765]}, {"w": "approach", "b": [0.2917, 0.6616, 0.3665, 0.6765]}, {"w": "to", "b": [0.3747, 0.6616, 0.3914, 0.6765]}, {"w": "choose", "b": [0.3996, 0.6616, 0.4531, 0.6765]}, {"w": "the", "b": [0.4612, 0.6616, 0.4874, 0.6765]}, {"w": "embedding", "b": [0.4956, 0.6616, 0.5845, 0.6765]}, {"w": "dimensionality", "b": [0.5927, 0.6616, 0.712, 0.6765]}, {"w": "is", "b": [0.7202, 0.6616, 0.7329, 0.6765]}, {"w": "to", "b": [0.7411, 0.6616, 0.7578, 0.6765]}, {"w": "treat", "b": [0.766, 0.6616, 0.8058, 0.6765]}, {"w": "it", "b": [0.8139, 0.6616, 0.8265, 0.6765]}, {"w": "as", "b": [0.8347, 0.6616, 0.8515, 0.6765]}, {"w": "a", "b": [0.8597, 0.6616, 0.8691, 0.6765]}, {"w": "hyperparameter", "b": [0.1312, 0.6795, 0.2598, 0.6945]}, {"w": "tuned", "b": [0.266, 0.6795, 0.3124, 0.6945]}, {"w": "on", "b": [0.3185, 0.6795, 0.3381, 0.6945]}, {"w": "a", "b": [0.3443, 0.6795, 0.3536, 0.6945]}, {"w": "downstream", "b": [0.3597, 0.6795, 0.4574, 0.6945]}, {"w": "task.", "b": [0.4635, 0.6795, 0.5023, 0.6945]}, {"w": "For", "b": [0.5105, 0.6795, 0.5376, 0.6945]}, {"w": "example,", "b": [0.5437, 0.6795, 0.6154, 0.6945]}, {"w": "if", "b": [0.6216, 0.6795, 0.6324, 0.6945]}, {"w": "you", "b": [0.6386, 0.6795, 0.6675, 0.6945]}, {"w": "have", "b": [0.6736, 0.6795, 0.7102, 0.6945]}, {"w": "a", "b": [0.7164, 0.6795, 0.7257, 0.6945]}, {"w": "labeled", "b": [0.7318, 0.6795, 0.7891, 0.6945]}, {"w": "corpus", "b": [0.7952, 0.6795, 0.848, 0.6945]}, {"w": "of", "b": [0.8541, 0.6795, 0.8691, 0.6945]}, {"w": "documents,", "b": [0.1312, 0.6975, 0.2217, 0.7124]}, {"w": "then", "b": [0.2278, 0.6975, 0.2634, 0.7124]}, {"w": "you", "b": [0.2695, 0.6975, 0.2979, 0.7124]}, {"w": "can", "b": [0.3041, 0.6975, 0.3315, 0.7124]}, {"w": "optimize", "b": [0.3376, 0.6975, 0.4056, 0.7124]}, {"w": "the", "b": [0.4117, 0.6975, 0.4371, 0.7124]}, {"w": "embedding", "b": [0.4433, 0.6975, 0.5296, 0.7124]}, {"w": "dimensionality", "b": [0.5357, 0.6975, 0.6515, 0.7124]}, {"w": "by", "b": [0.6576, 0.6975, 0.6769, 0.7124]}, {"w": "minimizing", "b": [0.6831, 0.6975, 0.7714, 0.7124]}, {"w": "the", "b": [0.7775, 0.6975, 0.8029, 0.7124]}, {"w": "number", "b": [0.809, 0.6975, 0.8695, 0.7124]}, {"w": "of", "b": [0.1312, 0.7154, 0.1462, 0.7304]}, {"w": "prediction", "b": [0.1523, 0.7154, 0.2338, 0.7304]}, {"w": "errors", "b": [0.24, 0.7154, 0.2866, 0.7304]}, {"w": "made", "b": [0.2928, 0.7154, 0.3361, 0.7304]}, {"w": "by", "b": [0.3422, 0.7154, 0.3618, 0.7304]}, {"w": "the", "b": [0.368, 0.7154, 0.3937, 0.7304]}, {"w": "classifier", "b": [0.3999, 0.7154, 0.4682, 0.7304]}, {"w": "trained", "b": [0.4743, 0.7154, 0.5321, 0.7304]}, {"w": "on", "b": [0.5383, 0.7154, 0.5579, 0.7304]}, {"w": "that", "b": [0.564, 0.7154, 0.598, 0.7304]}, {"w": "labeled", "b": [0.6042, 0.7154, 0.6614, 0.7304]}, {"w": "data,", "b": [0.6675, 0.7154, 0.7088, 0.7304]}, {"w": "where", "b": [0.7149, 0.7154, 0.7624, 0.7304]}, {"w": "the", "b": [0.7685, 0.7154, 0.7943, 0.7304]}, {"w": "words", "b": [0.8005, 0.7154, 0.8475, 0.7304]}, {"w": "in", "b": [0.8537, 0.7154, 0.8691, 0.7304]}, {"w": "the", "b": [0.1312, 0.7334, 0.1569, 0.7483]}, {"w": "documents", "b": [0.163, 0.7334, 0.2493, 0.7483]}, {"w": "are", "b": [0.2554, 0.7334, 0.2801, 0.7483]}, {"w": "represented", "b": [0.2862, 0.7334, 0.3783, 0.7483]}, {"w": "by", "b": [0.3844, 0.7334, 0.4039, 0.7483]}, {"w": "the", "b": [0.41, 0.7334, 0.4357, 0.7483]}, {"w": "embeddings.", "b": [0.4418, 0.7334, 0.5414, 0.7483]}]}, {"id": "b_6", "type": "paragraph", "text": "4.8 Dimensionality Reduction", "words": [{"w": "4.8", "b": [0.1312, 0.7822, 0.1631, 0.8001]}, {"w": "Dimensionality", "b": [0.188, 0.7822, 0.3512, 0.8001]}, {"w": "Reduction", "b": [0.3595, 0.7822, 0.4711, 0.8001]}]}, {"id": "b_7", "type": "paragraph", "text": "Sometimes, it might be necessary to reduce the dimensionality of examples. This is different from the problem of feature selection. In the latter, we analyze the properties of all existing features and remove those that, in our opinion, do not contribute much to the quality of the", "words": [{"w": "Sometimes,", "b": [0.1312, 0.8208, 0.2214, 0.8357]}, {"w": "it", "b": [0.2276, 0.8208, 0.2397, 0.8357]}, {"w": "might", "b": [0.2459, 0.8208, 0.2919, 0.8357]}, {"w": "be", "b": [0.2981, 0.8208, 0.3168, 0.8357]}, {"w": "necessary", "b": [0.323, 0.8208, 0.3976, 0.8357]}, {"w": "to", "b": [0.4038, 0.8208, 0.42, 0.8357]}, {"w": "reduce", "b": [0.4261, 0.8208, 0.4778, 0.8357]}, {"w": "the", "b": [0.484, 0.8208, 0.5093, 0.8357]}, {"w": "dimensionality", "b": [0.5155, 0.8208, 0.6309, 0.8357]}, {"w": "of", "b": [0.6371, 0.8208, 0.6518, 0.8357]}, {"w": "examples.", "b": [0.6579, 0.8208, 0.7355, 0.8357]}, {"w": "This", "b": [0.7437, 0.8208, 0.7792, 0.8357]}, {"w": "is", "b": [0.7854, 0.8208, 0.7976, 0.8357]}, {"w": "different", "b": [0.8038, 0.8208, 0.8696, 0.8357]}, {"w": "from", "b": [0.1312, 0.8387, 0.1684, 0.8537]}, {"w": "the", "b": [0.1745, 0.8387, 0.1999, 0.8537]}, {"w": "problem", "b": [0.2061, 0.8387, 0.2712, 0.8537]}, {"w": "of", "b": [0.2773, 0.8387, 0.2921, 0.8537]}, {"w": "feature", "b": [0.2982, 0.8387, 0.3537, 0.8537]}, {"w": "selection.", "b": [0.3598, 0.8387, 0.4331, 0.8537]}, {"w": "In", "b": [0.4414, 0.8387, 0.4581, 0.8537]}, {"w": "the", "b": [0.4643, 0.8387, 0.4897, 0.8537]}, {"w": "latter,", "b": [0.4959, 0.8387, 0.5447, 0.8537]}, {"w": "we", "b": [0.5509, 0.8387, 0.5717, 0.8537]}, {"w": "analyze", "b": [0.5778, 0.8387, 0.6373, 0.8537]}, {"w": "the", "b": [0.6435, 0.8387, 0.6689, 0.8537]}, {"w": "properties", "b": [0.675, 0.8387, 0.755, 0.8537]}, {"w": "of", "b": [0.7612, 0.8387, 0.7759, 0.8537]}, {"w": "all", "b": [0.7821, 0.8387, 0.8014, 0.8537]}, {"w": "existing", "b": [0.8075, 0.8387, 0.8691, 0.8537]}, {"w": "features", "b": [0.1312, 0.8567, 0.1937, 0.8716]}, {"w": "and", "b": [0.1998, 0.8567, 0.2291, 0.8716]}, {"w": "remove", "b": [0.2353, 0.8567, 0.2915, 0.8716]}, {"w": "those", "b": [0.2976, 0.8567, 0.3392, 0.8716]}, {"w": "that,", "b": [0.3454, 0.8567, 0.3839, 0.8716]}, {"w": "in", "b": [0.39, 0.8567, 0.4052, 0.8716]}, {"w": "our", "b": [0.4113, 0.8567, 0.4377, 0.8716]}, {"w": "opinion,", "b": [0.4438, 0.8567, 0.5076, 0.8716]}, {"w": "do", "b": [0.5137, 0.8567, 0.533, 0.8716]}, {"w": "not", "b": [0.5391, 0.8567, 0.5654, 0.8716]}, {"w": "contribute", "b": [0.5716, 0.8567, 0.6531, 0.8716]}, {"w": "much", "b": [0.6593, 0.8567, 0.7018, 0.8716]}, {"w": "to", "b": [0.7079, 0.8567, 0.7241, 0.8716]}, {"w": "the", "b": [0.7302, 0.8567, 0.7555, 0.8716]}, {"w": "quality", "b": [0.7617, 0.8567, 0.8168, 0.8716]}, {"w": "of", "b": [0.823, 0.8567, 0.8376, 0.8716]}, {"w": "the", "b": [0.8438, 0.8567, 0.8691, 0.8716]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 36", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "36", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 126, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "model. When we apply a dimensionality reduction technique to a dataset, we replace all features in the original feature vector with a new vector, of lower dimensionality, and of synthetic features.", "words": [{"w": "model.", "b": [0.1312, 0.0881, 0.1861, 0.1031]}, {"w": "When", "b": [0.1963, 0.0881, 0.245, 0.1031]}, {"w": "we", "b": [0.2518, 0.0881, 0.2733, 0.1031]}, {"w": "apply", "b": [0.2801, 0.0881, 0.3256, 0.1031]}, {"w": "a", "b": [0.3324, 0.0881, 0.3418, 0.1031]}, {"w": "dimensionality", "b": [0.3488, 0.0884, 0.4833, 0.1034]}, {"w": "reduction", "b": [0.4911, 0.0884, 0.5792, 0.1034]}, {"w": "technique", "b": [0.586, 0.0881, 0.6645, 0.1031]}, {"w": "to", "b": [0.6713, 0.0881, 0.688, 0.1031]}, {"w": "a", "b": [0.6949, 0.0881, 0.7043, 0.1031]}, {"w": "dataset,", "b": [0.7111, 0.0881, 0.7761, 0.1031]}, {"w": "we", "b": [0.7831, 0.0881, 0.8045, 0.1031]}, {"w": "replace", "b": [0.8113, 0.0881, 0.8689, 0.1031]}, {"w": "all", "b": [0.1312, 0.106, 0.1508, 0.121]}, {"w": "features", "b": [0.1569, 0.106, 0.2204, 0.121]}, {"w": "in", "b": [0.2266, 0.106, 0.242, 0.121]}, {"w": "the", "b": [0.2482, 0.106, 0.2739, 0.121]}, {"w": "original", "b": [0.2801, 0.106, 0.3409, 0.121]}, {"w": "feature", "b": [0.347, 0.106, 0.4032, 0.121]}, {"w": "vector", "b": [0.4094, 0.106, 0.4588, 0.121]}, {"w": "with", "b": [0.465, 0.106, 0.501, 0.121]}, {"w": "a", "b": [0.5072, 0.106, 0.5164, 0.121]}, {"w": "new", "b": [0.5226, 0.106, 0.5545, 0.121]}, {"w": "vector,", "b": [0.5607, 0.106, 0.6153, 0.121]}, {"w": "of", "b": [0.6214, 0.106, 0.6364, 0.121]}, {"w": "lower", "b": [0.6425, 0.106, 0.6848, 0.121]}, {"w": "dimensionality,", "b": [0.6909, 0.106, 0.812, 0.121]}, {"w": "and", "b": [0.8182, 0.106, 0.848, 0.121]}, {"w": "of", "b": [0.8542, 0.106, 0.8691, 0.121]}, {"w": "synthetic", "b": [0.1312, 0.124, 0.2042, 0.1389]}, {"w": "features.", "b": [0.2103, 0.124, 0.2787, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "Dimensionality reduction often results in increased learning speed and better generalization. In addition, it improves visualization of datasets: humans can only see in three dimensions.", "words": [{"w": "Dimensionality", "b": [0.1312, 0.1509, 0.2514, 0.1659]}, {"w": "reduction", "b": [0.2575, 0.1509, 0.333, 0.1659]}, {"w": "often", "b": [0.3391, 0.1509, 0.3794, 0.1659]}, {"w": "results", "b": [0.3856, 0.1509, 0.4378, 0.1659]}, {"w": "in", "b": [0.444, 0.1509, 0.4593, 0.1659]}, {"w": "increased", "b": [0.4654, 0.1509, 0.539, 0.1659]}, {"w": "learning", "b": [0.5451, 0.1509, 0.6094, 0.1659]}, {"w": "speed", "b": [0.6156, 0.1509, 0.66, 0.1659]}, {"w": "and", "b": [0.6662, 0.1509, 0.6957, 0.1659]}, {"w": "better", "b": [0.7019, 0.1509, 0.7504, 0.1659]}, {"w": "generalization.", "b": [0.7565, 0.1509, 0.8728, 0.1659]}, {"w": "In", "b": [0.1312, 0.1689, 0.1482, 0.1838]}, {"w": "addition,", "b": [0.1543, 0.1689, 0.2261, 0.1838]}, {"w": "it", "b": [0.2322, 0.1689, 0.2445, 0.1838]}, {"w": "improves", "b": [0.2507, 0.1689, 0.3221, 0.1838]}, {"w": "visualization", "b": [0.3283, 0.1689, 0.4294, 0.1838]}, {"w": "of", "b": [0.4355, 0.1689, 0.4504, 0.1838]}, {"w": "datasets:", "b": [0.4565, 0.1689, 0.5275, 0.1838]}, {"w": "humans", "b": [0.5357, 0.1689, 0.5979, 0.1838]}, {"w": "can", "b": [0.604, 0.1689, 0.6317, 0.1838]}, {"w": "only", "b": [0.6379, 0.1689, 0.6722, 0.1838]}, {"w": "see", "b": [0.6783, 0.1689, 0.7021, 0.1838]}, {"w": "in", "b": [0.7082, 0.1689, 0.7236, 0.1838]}, {"w": "three", "b": [0.7297, 0.1689, 0.7708, 0.1838]}, {"w": "dimensions.", "b": [0.777, 0.1689, 0.8705, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "There are several ways to reduce dimensionality. And depending on why we want to do that, some are more popular than others. The dimensionality reduction techniques are well described in the machine learning theory books, so I will only discuss when a data analyst should prefer one technique over the others.", "words": [{"w": "There", "b": [0.1306, 0.1958, 0.1787, 0.2107]}, {"w": "are", "b": [0.186, 0.1958, 0.2112, 0.2107]}, {"w": "several", "b": [0.2185, 0.1958, 0.2741, 0.2107]}, {"w": "ways", "b": [0.2814, 0.1958, 0.3208, 0.2107]}, {"w": "to", "b": [0.3281, 0.1958, 0.3448, 0.2107]}, {"w": "reduce", "b": [0.3521, 0.1958, 0.4055, 0.2107]}, {"w": "dimensionality.", "b": [0.4128, 0.1958, 0.5359, 0.2107]}, {"w": "And", "b": [0.5475, 0.1958, 0.5826, 0.2107]}, {"w": "depending", "b": [0.5899, 0.1958, 0.6741, 0.2107]}, {"w": "on", "b": [0.6814, 0.1958, 0.7013, 0.2107]}, {"w": "why", "b": [0.7086, 0.1958, 0.7421, 0.2107]}, {"w": "we", "b": [0.7494, 0.1958, 0.7708, 0.2107]}, {"w": "want", "b": [0.7781, 0.1958, 0.8179, 0.2107]}, {"w": "to", "b": [0.8252, 0.1958, 0.8419, 0.2107]}, {"w": "do", "b": [0.8492, 0.1958, 0.8691, 0.2107]}, {"w": "that,", "b": [0.1312, 0.2137, 0.1702, 0.2287]}, {"w": "some", "b": [0.1763, 0.2137, 0.2164, 0.2287]}, {"w": "are", "b": [0.2226, 0.2137, 0.2472, 0.2287]}, {"w": "more", "b": [0.2534, 0.2137, 0.2934, 0.2287]}, {"w": "popular", "b": [0.2995, 0.2137, 0.3616, 0.2287]}, {"w": "than", "b": [0.3678, 0.2137, 0.4047, 0.2287]}, {"w": "others.", "b": [0.4108, 0.2137, 0.4653, 0.2287]}, {"w": "The", "b": [0.4735, 0.2137, 0.5053, 0.2287]}, {"w": "dimensionality", "b": [0.5115, 0.2137, 0.6285, 0.2287]}, {"w": "reduction", "b": [0.6346, 0.2137, 0.7105, 0.2287]}, {"w": "techniques", "b": [0.7167, 0.2137, 0.8009, 0.2287]}, {"w": "are", "b": [0.807, 0.2137, 0.8317, 0.2287]}, {"w": "well", "b": [0.8378, 0.2137, 0.8691, 0.2287]}, {"w": "described", "b": [0.1312, 0.2317, 0.2077, 0.2466]}, {"w": "in", "b": [0.2139, 0.2317, 0.2294, 0.2466]}, {"w": "the", "b": [0.2356, 0.2317, 0.2616, 0.2466]}, {"w": "machine", "b": [0.2677, 0.2317, 0.3347, 0.2466]}, {"w": "learning", "b": [0.3408, 0.2317, 0.4063, 0.2466]}, {"w": "theory", "b": [0.4124, 0.2317, 0.4649, 0.2466]}, {"w": "books,", "b": [0.4711, 0.2317, 0.5235, 0.2466]}, {"w": "so", "b": [0.5297, 0.2317, 0.5464, 0.2466]}, {"w": "I", "b": [0.5526, 0.2317, 0.5593, 0.2466]}, {"w": "will", "b": [0.5655, 0.2317, 0.5945, 0.2466]}, {"w": "only", "b": [0.6007, 0.2317, 0.6355, 0.2466]}, {"w": "discuss", "b": [0.6417, 0.2317, 0.698, 0.2466]}, {"w": "when", "b": [0.7042, 0.2317, 0.7467, 0.2466]}, {"w": "a", "b": [0.7529, 0.2317, 0.7622, 0.2466]}, {"w": "data", "b": [0.7684, 0.2317, 0.8047, 0.2466]}, {"w": "analyst", "b": [0.8109, 0.2317, 0.8696, 0.2466]}, {"w": "should", "b": [0.1312, 0.2496, 0.1836, 0.2646]}, {"w": "prefer", "b": [0.1898, 0.2496, 0.2366, 0.2646]}, {"w": "one", "b": [0.2427, 0.2496, 0.2704, 0.2646]}, {"w": "technique", "b": [0.2766, 0.2496, 0.3535, 0.2646]}, {"w": "over", "b": [0.3597, 0.2496, 0.393, 0.2646]}, {"w": "the", "b": [0.3992, 0.2496, 0.4248, 0.2646]}, {"w": "others.", "b": [0.431, 0.2496, 0.4855, 0.2646]}]}, {"id": "b_3", "type": "paragraph", "text": "4.8.1 Fast Dimensionality Reduction with PCA", "words": [{"w": "4.8.1", "b": [0.1312, 0.2978, 0.1749, 0.3127]}, {"w": "Fast", "b": [0.1961, 0.2978, 0.2346, 0.3127]}, {"w": "Dimensionality", "b": [0.2417, 0.2978, 0.3807, 0.3127]}, {"w": "Reduction", "b": [0.3878, 0.2978, 0.483, 0.3127]}, {"w": "with", "b": [0.49, 0.2978, 0.5313, 0.3127]}, {"w": "PCA", "b": [0.5384, 0.2978, 0.5842, 0.3127]}]}, {"id": "b_4", "type": "paragraph", "text": "Principal Component Analysis (PCA) is the oldest of the techniques. It is also, by far, the fastest option. Performance comparison tests show a very weak dependence of the speed of the PCA algorithm on the size of the dataset. Therefore, you can effectively use PCA as a step preceding your model training, and find the optimal value of the reduced dimensionality experimentally as part of the hyperparameter tuning process.", "words": [{"w": "Principal", "b": [0.1312, 0.3344, 0.2155, 0.3493]}, {"w": "Component", "b": [0.2226, 0.3344, 0.3302, 0.3493]}, {"w": "Analysis", "b": [0.3372, 0.3344, 0.4151, 0.3493]}, {"w": "(PCA)", "b": [0.4212, 0.334, 0.4756, 0.349]}, {"w": "is", "b": [0.4818, 0.334, 0.4943, 0.349]}, {"w": "the", "b": [0.5004, 0.334, 0.5262, 0.349]}, {"w": "oldest", "b": [0.5324, 0.334, 0.5799, 0.349]}, {"w": "of", "b": [0.5861, 0.334, 0.6011, 0.349]}, {"w": "the", "b": [0.6072, 0.334, 0.633, 0.349]}, {"w": "techniques.", "b": [0.6392, 0.334, 0.7291, 0.349]}, {"w": "It", "b": [0.7373, 0.334, 0.7512, 0.349]}, {"w": "is", "b": [0.7574, 0.334, 0.7699, 0.349]}, {"w": "also,", "b": [0.776, 0.334, 0.8122, 0.349]}, {"w": "by", "b": [0.8184, 0.334, 0.838, 0.349]}, {"w": "far,", "b": [0.8442, 0.334, 0.8716, 0.349]}, {"w": "the", "b": [0.1312, 0.352, 0.1565, 0.3669]}, {"w": "fastest", "b": [0.1627, 0.352, 0.214, 0.3669]}, {"w": "option.", "b": [0.2201, 0.352, 0.2758, 0.3669]}, {"w": "Performance", "b": [0.284, 0.352, 0.3835, 0.3669]}, {"w": "comparison", "b": [0.3897, 0.352, 0.4799, 0.3669]}, {"w": "tests", "b": [0.486, 0.352, 0.5227, 0.3669]}, {"w": "show", "b": [0.5288, 0.352, 0.5679, 0.3669]}, {"w": "a", "b": [0.574, 0.352, 0.5831, 0.3669]}, {"w": "very", "b": [0.5893, 0.352, 0.6232, 0.3669]}, {"w": "weak", "b": [0.6294, 0.352, 0.6688, 0.3669]}, {"w": "dependence", "b": [0.675, 0.352, 0.7666, 0.3669]}, {"w": "of", "b": [0.7728, 0.352, 0.7874, 0.3669]}, {"w": "the", "b": [0.7936, 0.352, 0.8189, 0.3669]}, {"w": "speed", "b": [0.825, 0.352, 0.8692, 0.3669]}, {"w": "of", "b": [0.1312, 0.3699, 0.1458, 0.3849]}, {"w": "the", "b": [0.1518, 0.3699, 0.1769, 0.3849]}, {"w": "PCA", "b": [0.1829, 0.3699, 0.2219, 0.3849]}, {"w": "algorithm", "b": [0.2279, 0.3699, 0.3043, 0.3849]}, {"w": "on", "b": [0.3103, 0.3699, 0.3294, 0.3849]}, {"w": "the", "b": [0.3354, 0.3699, 0.3605, 0.3849]}, {"w": "size", "b": [0.3665, 0.3699, 0.3948, 0.3849]}, {"w": "of", "b": [0.4008, 0.3699, 0.4153, 0.3849]}, {"w": "the", "b": [0.4213, 0.3699, 0.4464, 0.3849]}, {"w": "dataset.", "b": [0.4524, 0.3699, 0.5149, 0.3849]}, {"w": "Therefore,", "b": [0.523, 0.3699, 0.604, 0.3849]}, {"w": "you", "b": [0.6101, 0.3699, 0.6382, 0.3849]}, {"w": "can", "b": [0.6442, 0.3699, 0.6713, 0.3849]}, {"w": "effectively", "b": [0.6773, 0.3699, 0.7557, 0.3849]}, {"w": "use", "b": [0.7617, 0.3699, 0.7869, 0.3849]}, {"w": "PCA", "b": [0.7929, 0.3699, 0.8319, 0.3849]}, {"w": "as", "b": [0.8379, 0.3699, 0.854, 0.3849]}, {"w": "a", "b": [0.86, 0.3699, 0.8691, 0.3849]}, {"w": "step", "b": [0.1312, 0.3879, 0.1635, 0.4028]}, {"w": "preceding", "b": [0.1696, 0.3879, 0.245, 0.4028]}, {"w": "your", "b": [0.2512, 0.3879, 0.2864, 0.4028]}, {"w": "model", "b": [0.2925, 0.3879, 0.3402, 0.4028]}, {"w": "training,", "b": [0.3463, 0.3879, 0.4137, 0.4028]}, {"w": "and", "b": [0.4198, 0.3879, 0.449, 0.4028]}, {"w": "find", "b": [0.4551, 0.3879, 0.4852, 0.4028]}, {"w": "the", "b": [0.4913, 0.3879, 0.5165, 0.4028]}, {"w": "optimal", "b": [0.5226, 0.3879, 0.5829, 0.4028]}, {"w": "value", "b": [0.589, 0.3879, 0.6297, 0.4028]}, {"w": "of", "b": [0.6358, 0.3879, 0.6503, 0.4028]}, {"w": "the", "b": [0.6564, 0.3879, 0.6816, 0.4028]}, {"w": "reduced", "b": [0.6877, 0.3879, 0.7491, 0.4028]}, {"w": "dimensionality", "b": [0.7552, 0.3879, 0.8698, 0.4028]}, {"w": "experimentally", "b": [0.1312, 0.4058, 0.2502, 0.4208]}, {"w": "as", "b": [0.2564, 0.4058, 0.2729, 0.4208]}, {"w": "part", "b": [0.279, 0.4058, 0.3129, 0.4208]}, {"w": "of", "b": [0.3191, 0.4058, 0.334, 0.4208]}, {"w": "the", "b": [0.3401, 0.4058, 0.3658, 0.4208]}, {"w": "hyperparameter", "b": [0.3719, 0.4058, 0.4997, 0.4208]}, {"w": "tuning", "b": [0.5059, 0.4058, 0.5582, 0.4208]}, {"w": "process.", "b": [0.5643, 0.4058, 0.6277, 0.4208]}]}, {"id": "b_5", "type": "paragraph", "text": "PCA’s most significant drawback is that the data must fit in memory entirely for the algorithm to work. There’s an out-of-core version of PCA, called Incremental PCA that allows running the algorithm on batches of the dataset, loading in memory one batch at a time. Still, Incremental PCA is an order of magnitude slower than PCA. PCA is also less practical for visualization purposes as compared to the other two techniques considered below.", "words": [{"w": "PCA’s", "b": [0.1312, 0.4328, 0.1844, 0.4477]}, {"w": "most", "b": [0.1932, 0.4328, 0.233, 0.4477]}, {"w": "significant", "b": [0.2418, 0.4328, 0.3251, 0.4477]}, {"w": "drawback", "b": [0.3338, 0.4328, 0.4118, 0.4477]}, {"w": "is", "b": [0.4206, 0.4328, 0.4333, 0.4477]}, {"w": "that", "b": [0.442, 0.4328, 0.4765, 0.4477]}, {"w": "the", "b": [0.4853, 0.4328, 0.5115, 0.4477]}, {"w": "data", "b": [0.5202, 0.4328, 0.5568, 0.4477]}, {"w": "must", "b": [0.5656, 0.4328, 0.606, 0.4477]}, {"w": "fit", "b": [0.6148, 0.4328, 0.6326, 0.4477]}, {"w": "in", "b": [0.6413, 0.4328, 0.657, 0.4477]}, {"w": "memory", "b": [0.6658, 0.4328, 0.7322, 0.4477]}, {"w": "entirely", "b": [0.741, 0.4328, 0.8028, 0.4477]}, {"w": "for", "b": [0.8116, 0.4328, 0.8341, 0.4477]}, {"w": "the", "b": [0.8429, 0.4328, 0.869, 0.4477]}, {"w": "algorithm", "b": [0.1312, 0.4507, 0.2098, 0.4657]}, {"w": "to", "b": [0.216, 0.4507, 0.2325, 0.4657]}, {"w": "work.", "b": [0.2387, 0.4507, 0.2832, 0.4657]}, {"w": "There’s", "b": [0.2914, 0.4507, 0.3515, 0.4657]}, {"w": "an", "b": [0.3577, 0.4507, 0.3773, 0.4657]}, {"w": "out-of-core", "b": [0.3835, 0.4507, 0.4709, 0.4657]}, {"w": "version", "b": [0.4771, 0.4507, 0.5341, 0.4657]}, {"w": "of", "b": [0.5402, 0.4507, 0.5552, 0.4657]}, {"w": "PCA,", "b": [0.5614, 0.4507, 0.6066, 0.4657]}, {"w": "called", "b": [0.6128, 0.4507, 0.6593, 0.4657]}, {"w": "Incremental", "b": [0.6653, 0.451, 0.7761, 0.466]}, {"w": "PCA", "b": [0.7831, 0.451, 0.829, 0.466]}, {"w": "that", "b": [0.8352, 0.4507, 0.8693, 0.4657]}, {"w": "allows", "b": [0.1312, 0.4686, 0.181, 0.4836]}, {"w": "running", "b": [0.1881, 0.4686, 0.252, 0.4836]}, {"w": "the", "b": [0.259, 0.4686, 0.2852, 0.4836]}, {"w": "algorithm", "b": [0.2923, 0.4686, 0.3718, 0.4836]}, {"w": "on", "b": [0.3789, 0.4686, 0.3987, 0.4836]}, {"w": "batches", "b": [0.4058, 0.4686, 0.4671, 0.4836]}, {"w": "of", "b": [0.4742, 0.4686, 0.4894, 0.4836]}, {"w": "the", "b": [0.4964, 0.4686, 0.5226, 0.4836]}, {"w": "dataset,", "b": [0.5297, 0.4686, 0.5946, 0.4836]}, {"w": "loading", "b": [0.6019, 0.4686, 0.6616, 0.4836]}, {"w": "in", "b": [0.6686, 0.4686, 0.6843, 0.4836]}, {"w": "memory", "b": [0.6914, 0.4686, 0.7578, 0.4836]}, {"w": "one", "b": [0.7649, 0.4686, 0.7932, 0.4836]}, {"w": "batch", "b": [0.8002, 0.4686, 0.8457, 0.4836]}, {"w": "at", "b": [0.8528, 0.4686, 0.8695, 0.4836]}, {"w": "a", "b": [0.1312, 0.4866, 0.1406, 0.5016]}, {"w": "time.", "b": [0.1479, 0.4866, 0.1898, 0.5016]}, {"w": "Still,", "b": [0.2014, 0.4866, 0.2401, 0.5016]}, {"w": "Incremental", "b": [0.2477, 0.4866, 0.345, 0.5016]}, {"w": "PCA", "b": [0.3523, 0.4866, 0.3928, 0.5016]}, {"w": "is", "b": [0.4001, 0.4866, 0.4128, 0.5016]}, {"w": "an", "b": [0.4201, 0.4866, 0.44, 0.5016]}, {"w": "order", "b": [0.4472, 0.4866, 0.4902, 0.5016]}, {"w": "of", "b": [0.4975, 0.4866, 0.5127, 0.5016]}, {"w": "magnitude", "b": [0.52, 0.4866, 0.6068, 0.5016]}, {"w": "slower", "b": [0.6141, 0.4866, 0.6645, 0.5016]}, {"w": "than", "b": [0.6718, 0.4866, 0.7094, 0.5016]}, {"w": "PCA.", "b": [0.7167, 0.4866, 0.7625, 0.5016]}, {"w": "PCA", "b": [0.7698, 0.4866, 0.8103, 0.5016]}, {"w": "is", "b": [0.8176, 0.4866, 0.8302, 0.5016]}, {"w": "also", "b": [0.8375, 0.4866, 0.869, 0.5016]}, {"w": "less", "b": [0.1312, 0.5045, 0.159, 0.5195]}, {"w": "practical", "b": [0.1652, 0.5045, 0.2346, 0.5195]}, {"w": "for", "b": [0.2408, 0.5045, 0.2628, 0.5195]}, {"w": "visualization", "b": [0.2689, 0.5045, 0.3696, 0.5195]}, {"w": "purposes", "b": [0.3757, 0.5045, 0.4459, 0.5195]}, {"w": "as", "b": [0.4521, 0.5045, 0.4685, 0.5195]}, {"w": "compared", "b": [0.4747, 0.5045, 0.5523, 0.5195]}, {"w": "to", "b": [0.5584, 0.5045, 0.5747, 0.5195]}, {"w": "the", "b": [0.5809, 0.5045, 0.6064, 0.5195]}, {"w": "other", "b": [0.6126, 0.5045, 0.6545, 0.5195]}, {"w": "two", "b": [0.6606, 0.5045, 0.6892, 0.5195]}, {"w": "techniques", "b": [0.6954, 0.5045, 0.7792, 0.5195]}, {"w": "considered", "b": [0.7853, 0.5045, 0.8692, 0.5195]}, {"w": "below.", "b": [0.1312, 0.5225, 0.1825, 0.5374]}]}, {"id": "b_6", "type": "paragraph", "text": "4.8.2 Dimensionality Reduction for Visualization", "words": [{"w": "4.8.2", "b": [0.1312, 0.5706, 0.1749, 0.5856]}, {"w": "Dimensionality", "b": [0.1961, 0.5706, 0.3351, 0.5856]}, {"w": "Reduction", "b": [0.3422, 0.5706, 0.4374, 0.5856]}, {"w": "for", "b": [0.4444, 0.5706, 0.4703, 0.5856]}, {"w": "Visualization", "b": [0.4773, 0.5706, 0.5979, 0.5856]}]}, {"id": "b_7", "type": "paragraph", "text": "If visualization is your goal, then you would prefer Uniform Manifold Approximation and Projection (UMAP) algorithm, or an autoencoder. Both can be specifically programmed to produce 2D or 3D feature vectors, while in PCA, the algorithm produces D so-called principal components (where D is the dimensionality of your data), and the analyst must pick the first two or three principal components as features for visualization. UMAP is generally much faster than autoencoder, but the two techniques produce very different looking visualizations, so you would prefer one over the other based on the properties of the specific dataset. Furthermore, like PCA, UMAP requires all data to be in memory, while autoencoder can be trained in batches.", "words": [{"w": "If", "b": [0.1312, 0.6069, 0.1438, 0.6219]}, {"w": "visualization", "b": [0.1501, 0.6069, 0.2533, 0.6219]}, {"w": "is", "b": [0.2596, 0.6069, 0.2723, 0.6219]}, {"w": "your", "b": [0.2786, 0.6069, 0.3153, 0.6219]}, {"w": "goal,", "b": [0.3217, 0.6069, 0.3604, 0.6219]}, {"w": "then", "b": [0.3668, 0.6069, 0.4034, 0.6219]}, {"w": "you", "b": [0.4097, 0.6069, 0.439, 0.6219]}, {"w": "would", "b": [0.4454, 0.6069, 0.494, 0.6219]}, {"w": "prefer", "b": [0.5004, 0.6069, 0.5481, 0.6219]}, {"w": "Uniform", "b": [0.5544, 0.6069, 0.6225, 0.6219]}, {"w": "Manifold", "b": [0.6288, 0.6069, 0.702, 0.6219]}, {"w": "Approximation", "b": [0.7084, 0.6069, 0.8324, 0.6219]}, {"w": "and", "b": [0.8387, 0.6069, 0.8691, 0.6219]}, {"w": "Projection", "b": [0.1312, 0.6249, 0.214, 0.6398]}, {"w": "(UMAP)", "b": [0.2201, 0.6249, 0.3013, 0.6401]}, {"w": "algorithm,", "b": [0.3074, 0.6249, 0.3898, 0.6398]}, {"w": "or", "b": [0.396, 0.6249, 0.4123, 0.6398]}, {"w": "an", "b": [0.4185, 0.6249, 0.4378, 0.6398]}, {"w": "autoencoder.", "b": [0.444, 0.6249, 0.5631, 0.6401]}, {"w": "Both", "b": [0.5713, 0.6249, 0.6107, 0.6398]}, {"w": "can", "b": [0.6168, 0.6249, 0.6443, 0.6398]}, {"w": "be", "b": [0.6504, 0.6249, 0.6692, 0.6398]}, {"w": "specifically", "b": [0.6754, 0.6249, 0.762, 0.6398]}, {"w": "programmed", "b": [0.7681, 0.6249, 0.8689, 0.6398]}, {"w": "to", "b": [0.1312, 0.6428, 0.148, 0.6578]}, {"w": "produce", "b": [0.1553, 0.6428, 0.2207, 0.6578]}, {"w": "2D", "b": [0.228, 0.6428, 0.2518, 0.6578]}, {"w": "or", "b": [0.2591, 0.6428, 0.2759, 0.6578]}, {"w": "3D", "b": [0.2832, 0.6428, 0.3069, 0.6578]}, {"w": "feature", "b": [0.3142, 0.6428, 0.3713, 0.6578]}, {"w": "vectors,", "b": [0.3786, 0.6428, 0.4416, 0.6578]}, {"w": "while", "b": [0.4491, 0.6428, 0.492, 0.6578]}, {"w": "in", "b": [0.4993, 0.6428, 0.515, 0.6578]}, {"w": "PCA,", "b": [0.5223, 0.6428, 0.5681, 0.6578]}, {"w": "the", "b": [0.5754, 0.6428, 0.6015, 0.6578]}, {"w": "algorithm", "b": [0.6088, 0.6428, 0.6883, 0.6578]}, {"w": "produces", "b": [0.6956, 0.6428, 0.7685, 0.6578]}, {"w": "D", "b": [0.7755, 0.6431, 0.7908, 0.658]}, {"w": "so-called", "b": [0.7986, 0.6428, 0.8688, 0.6578]}, {"w": "principal", "b": [0.1312, 0.6611, 0.2128, 0.676]}, {"w": "components", "b": [0.2197, 0.6611, 0.3297, 0.676]}, {"w": "(where", "b": [0.3357, 0.6608, 0.389, 0.6757]}, {"w": "D", "b": [0.3949, 0.661, 0.4102, 0.676]}, {"w": "is", "b": [0.4167, 0.6608, 0.4289, 0.6757]}, {"w": "the", "b": [0.4348, 0.6608, 0.46, 0.6757]}, {"w": "dimensionality", "b": [0.466, 0.6608, 0.5806, 0.6757]}, {"w": "of", "b": [0.5866, 0.6608, 0.6012, 0.6757]}, {"w": "your", "b": [0.6072, 0.6608, 0.6424, 0.6757]}, {"w": "data),", "b": [0.6483, 0.6608, 0.6956, 0.6757]}, {"w": "and", "b": [0.7016, 0.6608, 0.7307, 0.6757]}, {"w": "the", "b": [0.7367, 0.6608, 0.7618, 0.6757]}, {"w": "analyst", "b": [0.7678, 0.6608, 0.8247, 0.6757]}, {"w": "must", "b": [0.8307, 0.6608, 0.8695, 0.6757]}, {"w": "pick", "b": [0.1312, 0.6787, 0.1647, 0.6937]}, {"w": "the", "b": [0.1724, 0.6787, 0.1985, 0.6937]}, {"w": "first", "b": [0.2062, 0.6787, 0.2388, 0.6937]}, {"w": "two", "b": [0.2465, 0.6787, 0.2758, 0.6937]}, {"w": "or", "b": [0.2835, 0.6787, 0.3002, 0.6937]}, {"w": "three", "b": [0.3079, 0.6787, 0.3498, 0.6937]}, {"w": "principal", "b": [0.3575, 0.6787, 0.4297, 0.6937]}, {"w": "components", "b": [0.4374, 0.6787, 0.5348, 0.6937]}, {"w": "as", "b": [0.5424, 0.6787, 0.5593, 0.6937]}, {"w": "features", "b": [0.567, 0.6787, 0.6315, 0.6937]}, {"w": "for", "b": [0.6391, 0.6787, 0.6617, 0.6937]}, {"w": "visualization.", "b": [0.6694, 0.6787, 0.7777, 0.6937]}, {"w": "UMAP", "b": [0.7905, 0.6787, 0.8488, 0.6937]}, {"w": "is", "b": [0.8565, 0.6787, 0.8691, 0.6937]}, {"w": "generally", "b": [0.1312, 0.6967, 0.2021, 0.7116]}, {"w": "much", "b": [0.2072, 0.6967, 0.2494, 0.7116]}, {"w": "faster", "b": [0.2545, 0.6967, 0.2983, 0.7116]}, {"w": "than", "b": [0.3034, 0.6967, 0.3396, 0.7116]}, {"w": "autoencoder,", "b": [0.3447, 0.6967, 0.4462, 0.7116]}, {"w": "but", "b": [0.4515, 0.6967, 0.4787, 0.7116]}, {"w": "the", "b": [0.4837, 0.6967, 0.5089, 0.7116]}, {"w": "two", "b": [0.5139, 0.6967, 0.542, 0.7116]}, {"w": "techniques", "b": [0.5471, 0.6967, 0.6296, 0.7116]}, {"w": "produce", "b": [0.6347, 0.6967, 0.6976, 0.7116]}, {"w": "very", "b": [0.7027, 0.6967, 0.7364, 0.7116]}, {"w": "different", "b": [0.7414, 0.6967, 0.8068, 0.7116]}, {"w": "looking", "b": [0.8119, 0.6967, 0.8692, 0.7116]}, {"w": "visualizations,", "b": [0.1308, 0.7146, 0.2434, 0.7296]}, {"w": "so", "b": [0.2495, 0.7146, 0.2659, 0.7296]}, {"w": "you", "b": [0.272, 0.7146, 0.3005, 0.7296]}, {"w": "would", "b": [0.3066, 0.7146, 0.3539, 0.7296]}, {"w": "prefer", "b": [0.3601, 0.7146, 0.4065, 0.7296]}, {"w": "one", "b": [0.4126, 0.7146, 0.4401, 0.7296]}, {"w": "over", "b": [0.4462, 0.7146, 0.4793, 0.7296]}, {"w": "the", "b": [0.4854, 0.7146, 0.5109, 0.7296]}, {"w": "other", "b": [0.517, 0.7146, 0.5588, 0.7296]}, {"w": "based", "b": [0.5649, 0.7146, 0.6098, 0.7296]}, {"w": "on", "b": [0.6159, 0.7146, 0.6352, 0.7296]}, {"w": "the", "b": [0.6414, 0.7146, 0.6668, 0.7296]}, {"w": "properties", "b": [0.6729, 0.7146, 0.753, 0.7296]}, {"w": "of", "b": [0.7591, 0.7146, 0.7739, 0.7296]}, {"w": "the", "b": [0.78, 0.7146, 0.8054, 0.7296]}, {"w": "specific", "b": [0.8116, 0.7146, 0.8692, 0.7296]}, {"w": "dataset.", "b": [0.1312, 0.7325, 0.1936, 0.7475]}, {"w": "Furthermore,", "b": [0.2016, 0.7325, 0.3055, 0.7475]}, {"w": "like", "b": [0.3111, 0.7325, 0.3382, 0.7475]}, {"w": "PCA,", "b": [0.3437, 0.7325, 0.3876, 0.7475]}, {"w": "UMAP", "b": [0.3931, 0.7325, 0.4491, 0.7475]}, {"w": "requires", "b": [0.4545, 0.7325, 0.5166, 0.7475]}, {"w": "all", "b": [0.522, 0.7325, 0.5411, 0.7475]}, {"w": "data", "b": [0.5466, 0.7325, 0.5817, 0.7475]}, {"w": "to", "b": [0.5872, 0.7325, 0.6033, 0.7475]}, {"w": "be", "b": [0.6087, 0.7325, 0.6273, 0.7475]}, {"w": "in", "b": [0.6328, 0.7325, 0.6479, 0.7475]}, {"w": "memory,", "b": [0.6533, 0.7325, 0.7206, 0.7475]}, {"w": "while", "b": [0.7262, 0.7325, 0.7674, 0.7475]}, {"w": "autoencoder", "b": [0.7729, 0.7325, 0.8695, 0.7475]}, {"w": "can", "b": [0.1312, 0.7505, 0.1589, 0.7654]}, {"w": "be", "b": [0.1651, 0.7505, 0.1841, 0.7654]}, {"w": "trained", "b": [0.1902, 0.7505, 0.2477, 0.7654]}, {"w": "in", "b": [0.2538, 0.7505, 0.2692, 0.7654]}, {"w": "batches.", "b": [0.2754, 0.7505, 0.3406, 0.7654]}]}, {"id": "b_8", "type": "paragraph", "text": "Dimensionality reduction can also be task-specific. For example, we can reduce the dimen- sionality of pictures by using an image editor. Similarly, we can reduce the bit rate and the number of channels of the sound sequences.", "words": [{"w": "Dimensionality", "b": [0.1312, 0.7774, 0.2535, 0.7924]}, {"w": "reduction", "b": [0.2597, 0.7774, 0.3365, 0.7924]}, {"w": "can", "b": [0.3427, 0.7774, 0.3707, 0.7924]}, {"w": "also", "b": [0.3768, 0.7774, 0.408, 0.7924]}, {"w": "be", "b": [0.4142, 0.7774, 0.4334, 0.7924]}, {"w": "task-specific.", "b": [0.4395, 0.7774, 0.5435, 0.7924]}, {"w": "For", "b": [0.5517, 0.7774, 0.579, 0.7924]}, {"w": "example,", "b": [0.5852, 0.7774, 0.6573, 0.7924]}, {"w": "we", "b": [0.6634, 0.7774, 0.6847, 0.7924]}, {"w": "can", "b": [0.6908, 0.7774, 0.7188, 0.7924]}, {"w": "reduce", "b": [0.725, 0.7774, 0.778, 0.7924]}, {"w": "the", "b": [0.7841, 0.7774, 0.8101, 0.7924]}, {"w": "dimen-", "b": [0.8162, 0.7774, 0.8722, 0.7924]}, {"w": "sionality", "b": [0.1312, 0.7954, 0.1988, 0.8103]}, {"w": "of", "b": [0.205, 0.7954, 0.2198, 0.8103]}, {"w": "pictures", "b": [0.2259, 0.7954, 0.2895, 0.8103]}, {"w": "by", "b": [0.2956, 0.7954, 0.3151, 0.8103]}, {"w": "using", "b": [0.3212, 0.7954, 0.3632, 0.8103]}, {"w": "an", "b": [0.3694, 0.7954, 0.3888, 0.8103]}, {"w": "image", "b": [0.3949, 0.7954, 0.4419, 0.8103]}, {"w": "editor.", "b": [0.4481, 0.7954, 0.5003, 0.8103]}, {"w": "Similarly,", "b": [0.5085, 0.7954, 0.5842, 0.8103]}, {"w": "we", "b": [0.5903, 0.7954, 0.6113, 0.8103]}, {"w": "can", "b": [0.6174, 0.7954, 0.645, 0.8103]}, {"w": "reduce", "b": [0.6512, 0.7954, 0.7034, 0.8103]}, {"w": "the", "b": [0.7095, 0.7954, 0.7351, 0.8103]}, {"w": "bit", "b": [0.7412, 0.7954, 0.7637, 0.8103]}, {"w": "rate", "b": [0.7699, 0.7954, 0.8016, 0.8103]}, {"w": "and", "b": [0.8078, 0.7954, 0.8374, 0.8103]}, {"w": "the", "b": [0.8436, 0.7954, 0.8691, 0.8103]}, {"w": "number", "b": [0.1312, 0.8133, 0.1923, 0.8283]}, {"w": "of", "b": [0.1984, 0.8133, 0.2133, 0.8283]}, {"w": "channels", "b": [0.2195, 0.8133, 0.2878, 0.8283]}, {"w": "of", "b": [0.2939, 0.8133, 0.3088, 0.8283]}, {"w": "the", "b": [0.315, 0.8133, 0.3406, 0.8283]}, {"w": "sound", "b": [0.3467, 0.8133, 0.394, 0.8283]}, {"w": "sequences.", "b": [0.4002, 0.8133, 0.483, 0.8283]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 37", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "37", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 127, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "4.9 Scaling Features", "words": [{"w": "4.9", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Scaling", "b": [0.188, 0.0861, 0.2652, 0.104]}, {"w": "Features", "b": [0.2735, 0.0861, 0.3654, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "Once all your features are numerical, you are almost ready to start working on your model. The only remaining step that might be helpful is scaling your features.", "words": [{"w": "Once", "b": [0.1312, 0.1247, 0.1724, 0.1396]}, {"w": "all", "b": [0.1786, 0.1247, 0.1981, 0.1396]}, {"w": "your", "b": [0.2043, 0.1247, 0.2403, 0.1396]}, {"w": "features", "b": [0.2465, 0.1247, 0.31, 0.1396]}, {"w": "are", "b": [0.3161, 0.1247, 0.3409, 0.1396]}, {"w": "numerical,", "b": [0.347, 0.1247, 0.431, 0.1396]}, {"w": "you", "b": [0.4371, 0.1247, 0.4659, 0.1396]}, {"w": "are", "b": [0.4721, 0.1247, 0.4968, 0.1396]}, {"w": "almost", "b": [0.503, 0.1247, 0.5566, 0.1396]}, {"w": "ready", "b": [0.5627, 0.1247, 0.6076, 0.1396]}, {"w": "to", "b": [0.6137, 0.1247, 0.6302, 0.1396]}, {"w": "start", "b": [0.6363, 0.1247, 0.6746, 0.1396]}, {"w": "working", "b": [0.6807, 0.1247, 0.7446, 0.1396]}, {"w": "on", "b": [0.7507, 0.1247, 0.7703, 0.1396]}, {"w": "your", "b": [0.7764, 0.1247, 0.8125, 0.1396]}, {"w": "model.", "b": [0.8186, 0.1247, 0.8727, 0.1396]}, {"w": "The", "b": [0.1306, 0.1426, 0.1624, 0.1576]}, {"w": "only", "b": [0.1685, 0.1426, 0.2029, 0.1576]}, {"w": "remaining", "b": [0.209, 0.1426, 0.289, 0.1576]}, {"w": "step", "b": [0.2952, 0.1426, 0.3281, 0.1576]}, {"w": "that", "b": [0.3343, 0.1426, 0.3681, 0.1576]}, {"w": "might", "b": [0.3742, 0.1426, 0.4209, 0.1576]}, {"w": "be", "b": [0.427, 0.1426, 0.446, 0.1576]}, {"w": "helpful", "b": [0.4522, 0.1426, 0.507, 0.1576]}, {"w": "is", "b": [0.5132, 0.1426, 0.5256, 0.1576]}, {"w": "scaling", "b": [0.5318, 0.1426, 0.5862, 0.1576]}, {"w": "your", "b": [0.5924, 0.1426, 0.6283, 0.1576]}, {"w": "features.", "b": [0.6345, 0.1426, 0.7028, 0.1576]}]}, {"id": "b_2", "type": "paragraph", "text": "Feature scaling is bringing all your features to the same, or very similar, ranges of values or distributions. Multiple experiments demonstrated that a learning algorithm applied to scaled features might produce a better model. While there’s no guarantee that scaling will have a positive impact on the quality of your model, it’s considered a best practice. Scaling can also increase the training speed of deep neural networks. It also assures that no individual feature dominates, especially in the initial iterations of gradient descent or other iterative optimization algorithms. Finally, scaling reduces the risk of numerical overflow, the problem that computers have when working with very small or very big numbers.", "words": [{"w": "Feature", "b": [0.1312, 0.1699, 0.2014, 0.1848]}, {"w": "scaling", "b": [0.2084, 0.1699, 0.2707, 0.1848]}, {"w": "is", "b": [0.277, 0.1695, 0.2895, 0.1845]}, {"w": "bringing", "b": [0.2956, 0.1695, 0.3625, 0.1845]}, {"w": "all", "b": [0.3687, 0.1695, 0.3882, 0.1845]}, {"w": "your", "b": [0.3944, 0.1695, 0.4304, 0.1845]}, {"w": "features", "b": [0.4366, 0.1695, 0.5, 0.1845]}, {"w": "to", "b": [0.5061, 0.1695, 0.5226, 0.1845]}, {"w": "the", "b": [0.5287, 0.1695, 0.5544, 0.1845]}, {"w": "same,", "b": [0.5606, 0.1695, 0.6059, 0.1845]}, {"w": "or", "b": [0.6121, 0.1695, 0.6286, 0.1845]}, {"w": "very", "b": [0.6347, 0.1695, 0.6692, 0.1845]}, {"w": "similar,", "b": [0.6754, 0.1695, 0.7352, 0.1845]}, {"w": "ranges", "b": [0.7413, 0.1695, 0.7929, 0.1845]}, {"w": "of", "b": [0.799, 0.1695, 0.8139, 0.1845]}, {"w": "values", "b": [0.8201, 0.1695, 0.869, 0.1845]}, {"w": "or", "b": [0.1312, 0.1875, 0.148, 0.2024]}, {"w": "distributions.", "b": [0.1543, 0.1875, 0.2634, 0.2024]}, {"w": "Multiple", "b": [0.2721, 0.1875, 0.3417, 0.2024]}, {"w": "experiments", "b": [0.348, 0.1875, 0.447, 0.2024]}, {"w": "demonstrated", "b": [0.4533, 0.1875, 0.5654, 0.2024]}, {"w": "that", "b": [0.5717, 0.1875, 0.6063, 0.2024]}, {"w": "a", "b": [0.6126, 0.1875, 0.622, 0.2024]}, {"w": "learning", "b": [0.6283, 0.1875, 0.6943, 0.2024]}, {"w": "algorithm", "b": [0.7006, 0.1875, 0.7801, 0.2024]}, {"w": "applied", "b": [0.7864, 0.1875, 0.8461, 0.2024]}, {"w": "to", "b": [0.8524, 0.1875, 0.8691, 0.2024]}, {"w": "scaled", "b": [0.1312, 0.2054, 0.1805, 0.2204]}, {"w": "features", "b": [0.1887, 0.2054, 0.2532, 0.2204]}, {"w": "might", "b": [0.2613, 0.2054, 0.3089, 0.2204]}, {"w": "produce", "b": [0.317, 0.2054, 0.3825, 0.2204]}, {"w": "a", "b": [0.3906, 0.2054, 0.4, 0.2204]}, {"w": "better", "b": [0.4082, 0.2054, 0.4579, 0.2204]}, {"w": "model.", "b": [0.4661, 0.2054, 0.521, 0.2204]}, {"w": "While", "b": [0.5352, 0.2054, 0.5838, 0.2204]}, {"w": "there’s", "b": [0.592, 0.2054, 0.6465, 0.2204]}, {"w": "no", "b": [0.6547, 0.2054, 0.6746, 0.2204]}, {"w": "guarantee", "b": [0.6827, 0.2054, 0.7628, 0.2204]}, {"w": "that", "b": [0.7709, 0.2054, 0.8054, 0.2204]}, {"w": "scaling", "b": [0.8136, 0.2054, 0.8691, 0.2204]}, {"w": "will", "b": [0.1306, 0.2234, 0.1598, 0.2383]}, {"w": "have", "b": [0.1673, 0.2234, 0.2044, 0.2383]}, {"w": "a", "b": [0.2119, 0.2234, 0.2213, 0.2383]}, {"w": "positive", "b": [0.2287, 0.2234, 0.2921, 0.2383]}, {"w": "impact", "b": [0.2995, 0.2234, 0.356, 0.2383]}, {"w": "on", "b": [0.3634, 0.2234, 0.3833, 0.2383]}, {"w": "the", "b": [0.3907, 0.2234, 0.4169, 0.2383]}, {"w": "quality", "b": [0.4243, 0.2234, 0.4813, 0.2383]}, {"w": "of", "b": [0.4888, 0.2234, 0.5039, 0.2383]}, {"w": "your", "b": [0.5114, 0.2234, 0.5481, 0.2383]}, {"w": "model,", "b": [0.5555, 0.2234, 0.6104, 0.2383]}, {"w": "it’s", "b": [0.6181, 0.2234, 0.6433, 0.2383]}, {"w": "considered", "b": [0.6508, 0.2234, 0.7367, 0.2383]}, {"w": "a", "b": [0.7442, 0.2234, 0.7536, 0.2383]}, {"w": "best", "b": [0.761, 0.2234, 0.7951, 0.2383]}, {"w": "practice.", "b": [0.8025, 0.2234, 0.8727, 0.2383]}, {"w": "Scaling", "b": [0.1312, 0.2413, 0.1883, 0.2563]}, {"w": "can", "b": [0.1945, 0.2413, 0.222, 0.2563]}, {"w": "also", "b": [0.2282, 0.2413, 0.2589, 0.2563]}, {"w": "increase", "b": [0.265, 0.2413, 0.3284, 0.2563]}, {"w": "the", "b": [0.3346, 0.2413, 0.3601, 0.2563]}, {"w": "training", "b": [0.3662, 0.2413, 0.4295, 0.2563]}, {"w": "speed", "b": [0.4356, 0.2413, 0.4801, 0.2563]}, {"w": "of", "b": [0.4863, 0.2413, 0.501, 0.2563]}, {"w": "deep", "b": [0.5072, 0.2413, 0.5439, 0.2563]}, {"w": "neural", "b": [0.5501, 0.2413, 0.6001, 0.2563]}, {"w": "networks.", "b": [0.6063, 0.2413, 0.6824, 0.2563]}, {"w": "It", "b": [0.6906, 0.2413, 0.7044, 0.2563]}, {"w": "also", "b": [0.7105, 0.2413, 0.7412, 0.2563]}, {"w": "assures", "b": [0.7474, 0.2413, 0.8038, 0.2563]}, {"w": "that", "b": [0.81, 0.2413, 0.8436, 0.2563]}, {"w": "no", "b": [0.8498, 0.2413, 0.8692, 0.2563]}, {"w": "individual", "b": [0.1312, 0.2593, 0.2118, 0.2742]}, {"w": "feature", "b": [0.218, 0.2593, 0.274, 0.2742]}, {"w": "dominates,", "b": [0.2802, 0.2593, 0.3675, 0.2742]}, {"w": "especially", "b": [0.3737, 0.2593, 0.4508, 0.2742]}, {"w": "in", "b": [0.4569, 0.2593, 0.4723, 0.2742]}, {"w": "the", "b": [0.4785, 0.2593, 0.5042, 0.2742]}, {"w": "initial", "b": [0.5103, 0.2593, 0.5575, 0.2742]}, {"w": "iterations", "b": [0.5637, 0.2593, 0.6398, 0.2742]}, {"w": "of", "b": [0.646, 0.2593, 0.6609, 0.2742]}, {"w": "gradient", "b": [0.667, 0.2593, 0.7333, 0.2742]}, {"w": "descent", "b": [0.7394, 0.2593, 0.7986, 0.2742]}, {"w": "or", "b": [0.8048, 0.2593, 0.8212, 0.2742]}, {"w": "other", "b": [0.8274, 0.2593, 0.8695, 0.2742]}, {"w": "iterative", "b": [0.1312, 0.2772, 0.1979, 0.2922]}, {"w": "optimization", "b": [0.204, 0.2772, 0.3054, 0.2922]}, {"w": "algorithms.", "b": [0.3116, 0.2772, 0.4019, 0.2922]}, {"w": "Finally,", "b": [0.4101, 0.2772, 0.4703, 0.2922]}, {"w": "scaling", "b": [0.4764, 0.2772, 0.5308, 0.2922]}, {"w": "reduces", "b": [0.537, 0.2772, 0.5966, 0.2922]}, {"w": "the", "b": [0.6027, 0.2772, 0.6283, 0.2922]}, {"w": "risk", "b": [0.6345, 0.2772, 0.6639, 0.2922]}, {"w": "of", "b": [0.67, 0.2772, 0.6849, 0.2922]}, {"w": "numerical", "b": [0.6922, 0.2775, 0.7829, 0.2925]}, {"w": "overflow,", "b": [0.79, 0.2772, 0.8713, 0.2925]}, {"w": "the", "b": [0.1312, 0.2952, 0.1569, 0.3101]}, {"w": "problem", "b": [0.163, 0.2952, 0.2287, 0.3101]}, {"w": "that", "b": [0.2348, 0.2952, 0.2687, 0.3101]}, {"w": "computers", "b": [0.2748, 0.2952, 0.358, 0.3101]}, {"w": "have", "b": [0.3642, 0.2952, 0.4006, 0.3101]}, {"w": "when", "b": [0.4068, 0.2952, 0.4488, 0.3101]}, {"w": "working", "b": [0.455, 0.2952, 0.5186, 0.3101]}, {"w": "with", "b": [0.5247, 0.2952, 0.5606, 0.3101]}, {"w": "very", "b": [0.5667, 0.2952, 0.6012, 0.3101]}, {"w": "small", "b": [0.6073, 0.2952, 0.6495, 0.3101]}, {"w": "or", "b": [0.6556, 0.2952, 0.6721, 0.3101]}, {"w": "very", "b": [0.6782, 0.2952, 0.7126, 0.3101]}, {"w": "big", "b": [0.7188, 0.2952, 0.7434, 0.3101]}, {"w": "numbers.", "b": [0.7495, 0.2952, 0.823, 0.3101]}]}, {"id": "b_3", "type": "paragraph", "text": "4.9.1 Normalization", "words": [{"w": "4.9.1", "b": [0.1312, 0.343, 0.1749, 0.3579]}, {"w": "Normalization", "b": [0.1961, 0.343, 0.3281, 0.3579]}]}, {"id": "b_4", "type": "paragraph", "text": "Normalization is the process of converting an actual range of values, which a numerical feature can take, into a predefined and artificial range of values, typically in the interval [−1, 1] or [0, 1].", "words": [{"w": "Normalization", "b": [0.1312, 0.3795, 0.2633, 0.3945]}, {"w": "is", "b": [0.2698, 0.3792, 0.2825, 0.3942]}, {"w": "the", "b": [0.289, 0.3792, 0.3152, 0.3942]}, {"w": "process", "b": [0.3216, 0.3792, 0.381, 0.3942]}, {"w": "of", "b": [0.3875, 0.3792, 0.4027, 0.3942]}, {"w": "converting", "b": [0.4092, 0.3792, 0.4945, 0.3942]}, {"w": "an", "b": [0.501, 0.3792, 0.5209, 0.3942]}, {"w": "actual", "b": [0.5274, 0.3792, 0.5776, 0.3942]}, {"w": "range", "b": [0.5841, 0.3792, 0.6291, 0.3942]}, {"w": "of", "b": [0.6357, 0.3792, 0.6508, 0.3942]}, {"w": "values,", "b": [0.6573, 0.3792, 0.7124, 0.3942]}, {"w": "which", "b": [0.719, 0.3792, 0.7666, 0.3942]}, {"w": "a", "b": [0.7731, 0.3792, 0.7825, 0.3942]}, {"w": "numerical", "b": [0.789, 0.3792, 0.8691, 0.3942]}, {"w": "feature", "b": [0.1312, 0.3972, 0.1883, 0.4121]}, {"w": "can", "b": [0.1953, 0.3972, 0.2236, 0.4121]}, {"w": "take,", "b": [0.2306, 0.3972, 0.2704, 0.4121]}, {"w": "into", "b": [0.2776, 0.3972, 0.3095, 0.4121]}, {"w": "a", "b": [0.3166, 0.3972, 0.326, 0.4121]}, {"w": "predefined", "b": [0.333, 0.3972, 0.4178, 0.4121]}, {"w": "and", "b": [0.4248, 0.3972, 0.4552, 0.4121]}, {"w": "artificial", "b": [0.4622, 0.3972, 0.5302, 0.4121]}, {"w": "range", "b": [0.5373, 0.3972, 0.5823, 0.4121]}, {"w": "of", "b": [0.5893, 0.3972, 0.6045, 0.4121]}, {"w": "values,", "b": [0.6115, 0.3972, 0.6666, 0.4121]}, {"w": "typically", "b": [0.6738, 0.3972, 0.7444, 0.4121]}, {"w": "in", "b": [0.7514, 0.3972, 0.7671, 0.4121]}, {"w": "the", "b": [0.7742, 0.3972, 0.8003, 0.4121]}, {"w": "interval", "b": [0.8074, 0.3972, 0.8692, 0.4121]}, {"w": "[−1,", "b": [0.1312, 0.4151, 0.1652, 0.4304]}, {"w": "1]", "b": [0.1682, 0.4151, 0.1826, 0.4301]}, {"w": "or", "b": [0.1887, 0.4151, 0.2052, 0.4301]}, {"w": "[0,", "b": [0.2113, 0.4151, 0.2309, 0.4304]}, {"w": "1].", "b": [0.234, 0.4151, 0.2534, 0.4301]}]}, {"id": "b_5", "type": "paragraph", "text": "For example, let the natural range of a feature be 350 to 1450. By subtracting 350 from every value of the feature, and dividing the result by 1100, we normalize those values to the range [0, 1]. More generally, the normalization formula looks like this:", "words": [{"w": "For", "b": [0.1312, 0.442, 0.1588, 0.457]}, {"w": "example,", "b": [0.1657, 0.442, 0.2383, 0.457]}, {"w": "let", "b": [0.2454, 0.442, 0.2663, 0.457]}, {"w": "the", "b": [0.2733, 0.442, 0.2994, 0.457]}, {"w": "natural", "b": [0.3063, 0.442, 0.366, 0.457]}, {"w": "range", "b": [0.3729, 0.442, 0.4179, 0.457]}, {"w": "of", "b": [0.4248, 0.442, 0.4399, 0.457]}, {"w": "a", "b": [0.4468, 0.442, 0.4562, 0.457]}, {"w": "feature", "b": [0.4631, 0.442, 0.5202, 0.457]}, {"w": "be", "b": [0.5271, 0.442, 0.5465, 0.457]}, {"w": "350", "b": [0.5532, 0.442, 0.5814, 0.457]}, {"w": "to", "b": [0.5883, 0.442, 0.605, 0.457]}, {"w": "1450.", "b": [0.6119, 0.442, 0.6548, 0.457]}, {"w": "By", "b": [0.6652, 0.442, 0.6884, 0.457]}, {"w": "subtracting", "b": [0.6953, 0.442, 0.7886, 0.457]}, {"w": "350", "b": [0.7954, 0.442, 0.8237, 0.457]}, {"w": "from", "b": [0.8306, 0.442, 0.8688, 0.457]}, {"w": "every", "b": [0.1312, 0.46, 0.1735, 0.4749]}, {"w": "value", "b": [0.1796, 0.46, 0.2208, 0.4749]}, {"w": "of", "b": [0.2269, 0.46, 0.2417, 0.4749]}, {"w": "the", "b": [0.2478, 0.46, 0.2733, 0.4749]}, {"w": "feature,", "b": [0.2794, 0.46, 0.34, 0.4749]}, {"w": "and", "b": [0.3461, 0.46, 0.3756, 0.4749]}, {"w": "dividing", "b": [0.3818, 0.46, 0.4463, 0.4749]}, {"w": "the", "b": [0.4525, 0.46, 0.4779, 0.4749]}, {"w": "result", "b": [0.484, 0.46, 0.5289, 0.4749]}, {"w": "by", "b": [0.5351, 0.46, 0.5544, 0.4749]}, {"w": "1100,", "b": [0.5603, 0.46, 0.602, 0.4749]}, {"w": "we", "b": [0.6081, 0.46, 0.629, 0.4749]}, {"w": "normalize", "b": [0.6351, 0.46, 0.7124, 0.4749]}, {"w": "those", "b": [0.7186, 0.46, 0.7604, 0.4749]}, {"w": "values", "b": [0.7665, 0.46, 0.8149, 0.4749]}, {"w": "to", "b": [0.8211, 0.46, 0.8373, 0.4749]}, {"w": "the", "b": [0.8435, 0.46, 0.8689, 0.4749]}, {"w": "range", "b": [0.1312, 0.4779, 0.1754, 0.4929]}, {"w": "[0,", "b": [0.1815, 0.4779, 0.2011, 0.4932]}, {"w": "1].", "b": [0.2042, 0.4779, 0.2236, 0.4929]}, {"w": "More", "b": [0.2318, 0.4779, 0.2734, 0.4929]}, {"w": "generally,", "b": [0.2796, 0.4779, 0.3555, 0.4929]}, {"w": "the", "b": [0.3616, 0.4779, 0.3873, 0.4929]}, {"w": "normalization", "b": [0.3935, 0.4779, 0.5042, 0.4929]}, {"w": "formula", "b": [0.5104, 0.4779, 0.5719, 0.4929]}, {"w": "looks", "b": [0.5781, 0.4779, 0.6192, 0.4929]}, {"w": "like", "b": [0.6254, 0.4779, 0.6531, 0.4929]}, {"w": "this:", "b": [0.6592, 0.4779, 0.6942, 0.4929]}]}, {"id": "b_6", "type": "paragraph", "text": "¯x(j) ← x(j) −min(j)", "words": [{"w": "¯x(j)", "b": [0.4028, 0.5276, 0.4318, 0.5453]}, {"w": "←", "b": [0.4378, 0.5301, 0.4563, 0.5451]}, {"w": "x(j)", "b": [0.4755, 0.5183, 0.5044, 0.5352]}, {"w": "−min(j)", "b": [0.5094, 0.518, 0.577, 0.535]}]}, {"id": "b_7", "type": "paragraph", "text": "max(j) −min(j) ,", "words": [{"w": "max(j)", "b": [0.4636, 0.5414, 0.5163, 0.5569]}, {"w": "−min(j)", "b": [0.5213, 0.54, 0.5889, 0.557]}, {"w": ",", "b": [0.592, 0.5303, 0.5972, 0.5453]}]}, {"id": "b_8", "type": "paragraph", "text": "where x(j) is an original value of feature j in some example; min(j) and max(j) are, respectively, the minimum and the maximum value of the feature j in the training data.", "words": [{"w": "where", "b": [0.1306, 0.5749, 0.1769, 0.5899]}, {"w": "x(j)", "b": [0.1813, 0.5733, 0.2103, 0.5902]}, {"w": "is", "b": [0.2157, 0.5749, 0.2279, 0.5899]}, {"w": "an", "b": [0.2324, 0.5749, 0.2515, 0.5899]}, {"w": "original", "b": [0.256, 0.5749, 0.3154, 0.5899]}, {"w": "value", "b": [0.3199, 0.5749, 0.3606, 0.5899]}, {"w": "of", "b": [0.3651, 0.5749, 0.3797, 0.5899]}, {"w": "feature", "b": [0.3842, 0.5749, 0.439, 0.5899]}, {"w": "j", "b": [0.4434, 0.5752, 0.451, 0.5902]}, {"w": "in", "b": [0.4566, 0.5749, 0.4717, 0.5899]}, {"w": "some", "b": [0.4762, 0.5749, 0.5155, 0.5899]}, {"w": "example;", "b": [0.52, 0.5749, 0.5899, 0.5899]}, {"w": "min(j)", "b": [0.5949, 0.573, 0.644, 0.5899]}, {"w": "and", "b": [0.6494, 0.5749, 0.6786, 0.5899]}, {"w": "max(j)", "b": [0.6831, 0.5733, 0.7358, 0.5899]}, {"w": "are,", "b": [0.7413, 0.5749, 0.7705, 0.5899]}, {"w": "respectively,", "b": [0.7753, 0.5749, 0.8714, 0.5899]}, {"w": "the", "b": [0.1312, 0.5929, 0.1569, 0.6078]}, {"w": "minimum", "b": [0.163, 0.5929, 0.2394, 0.6078]}, {"w": "and", "b": [0.2455, 0.5929, 0.2753, 0.6078]}, {"w": "the", "b": [0.2814, 0.5929, 0.3071, 0.6078]}, {"w": "maximum", "b": [0.3132, 0.5929, 0.3932, 0.6078]}, {"w": "value", "b": [0.3993, 0.5929, 0.4408, 0.6078]}, {"w": "of", "b": [0.447, 0.5929, 0.4619, 0.6078]}, {"w": "the", "b": [0.468, 0.5929, 0.4937, 0.6078]}, {"w": "feature", "b": [0.4998, 0.5929, 0.5558, 0.6078]}, {"w": "j", "b": [0.5618, 0.5932, 0.5694, 0.6081]}, {"w": "in", "b": [0.5766, 0.5929, 0.592, 0.6078]}, {"w": "the", "b": [0.5981, 0.5929, 0.6237, 0.6078]}, {"w": "training", "b": [0.6299, 0.5929, 0.6935, 0.6078]}, {"w": "data.", "b": [0.6997, 0.5929, 0.7407, 0.6078]}]}, {"id": "b_9", "type": "paragraph", "text": "If you prefer the range of [−1, 1] then the normalization formula would look like this:", "words": [{"w": "If", "b": [0.1312, 0.6198, 0.1435, 0.6348]}, {"w": "you", "b": [0.1497, 0.6198, 0.1784, 0.6348]}, {"w": "prefer", "b": [0.1846, 0.6198, 0.2313, 0.6348]}, {"w": "the", "b": [0.2375, 0.6198, 0.2631, 0.6348]}, {"w": "range", "b": [0.2693, 0.6198, 0.3134, 0.6348]}, {"w": "of", "b": [0.3196, 0.6198, 0.3344, 0.6348]}, {"w": "[−1,", "b": [0.3405, 0.6198, 0.3744, 0.635]}, {"w": "1]", "b": [0.3775, 0.6198, 0.3918, 0.6348]}, {"w": "then", "b": [0.398, 0.6198, 0.4339, 0.6348]}, {"w": "the", "b": [0.44, 0.6198, 0.4657, 0.6348]}, {"w": "normalization", "b": [0.4718, 0.6198, 0.5826, 0.6348]}, {"w": "formula", "b": [0.5888, 0.6198, 0.6503, 0.6348]}, {"w": "would", "b": [0.6565, 0.6198, 0.7041, 0.6348]}, {"w": "look", "b": [0.7103, 0.6198, 0.7441, 0.6348]}, {"w": "like", "b": [0.7503, 0.6198, 0.778, 0.6348]}, {"w": "this:", "b": [0.7841, 0.6198, 0.8191, 0.6348]}]}, {"id": "b_10", "type": "paragraph", "text": "¯x(j) ←2 × x(j) −max(j) −min(j)", "words": [{"w": "¯x(j)", "b": [0.3607, 0.6695, 0.3897, 0.6871]}, {"w": "←2", "b": [0.3957, 0.6618, 0.4307, 0.6869]}, {"w": "×", "b": [0.4348, 0.6619, 0.4492, 0.6768]}, {"w": "x(j)", "b": [0.4533, 0.6601, 0.4822, 0.677]}, {"w": "−max(j)", "b": [0.4872, 0.6601, 0.5584, 0.6768]}, {"w": "−min(j)", "b": [0.5634, 0.6599, 0.631, 0.6768]}]}, {"id": "b_11", "type": "paragraph", "text": "max(j) −min(j) ,", "words": [{"w": "max(j)", "b": [0.4636, 0.6833, 0.5163, 0.6988]}, {"w": "−min(j)", "b": [0.5213, 0.6819, 0.5889, 0.6989]}, {"w": ",", "b": [0.6341, 0.6722, 0.6393, 0.6871]}]}, {"id": "b_12", "type": "paragraph", "text": "A drawback of normalization is that the values max(j) and min(j) are usually outliers, so normalization will “squeeze” the normal feature values into a very small range. One solution to this problem is to apply clipping, that is to pick “reasonable” values for max(j) and min(j) instead of using extreme values from the training data. Let a reasonable range for a feature be estimated as [a, b]. Before calculating the scaled value by using one of the above two formulas, the value x(j) of the feature is set (“clipped”) to a if x(j) is below a, or to b if it’s above b. A frequent way to estimate the values for a and b is winsorization. The technique is named after the engineer and biostatistician Charles Winsor (1895—1951). Winsorization consists of setting all outliers to a specified percentile of the data; for example,", "words": [{"w": "A", "b": [0.1305, 0.7168, 0.1446, 0.7318]}, {"w": "drawback", "b": [0.1514, 0.7168, 0.2294, 0.7318]}, {"w": "of", "b": [0.2362, 0.7168, 0.2513, 0.7318]}, {"w": "normalization", "b": [0.2581, 0.7168, 0.3711, 0.7318]}, {"w": "is", "b": [0.3778, 0.7168, 0.3905, 0.7318]}, {"w": "that", "b": [0.3973, 0.7168, 0.4318, 0.7318]}, {"w": "the", "b": [0.4386, 0.7168, 0.4647, 0.7318]}, {"w": "values", "b": [0.4715, 0.7168, 0.5213, 0.7318]}, {"w": "max(j)", "b": [0.5279, 0.7152, 0.5806, 0.7318]}, {"w": "and", "b": [0.5883, 0.7168, 0.6186, 0.7318]}, {"w": "min(j)", "b": [0.6254, 0.7149, 0.6745, 0.7318]}, {"w": "are", "b": [0.6822, 0.7168, 0.7074, 0.7318]}, {"w": "usually", "b": [0.7141, 0.7168, 0.7723, 0.7318]}, {"w": "outliers,", "b": [0.779, 0.7168, 0.8451, 0.7318]}, {"w": "so", "b": [0.852, 0.7168, 0.8689, 0.7318]}, {"w": "normalization", "b": [0.1312, 0.7347, 0.2402, 0.7497]}, {"w": "will", "b": [0.2464, 0.7347, 0.2746, 0.7497]}, {"w": "“squeeze”", "b": [0.2808, 0.7347, 0.3571, 0.7497]}, {"w": "the", "b": [0.3632, 0.7347, 0.3884, 0.7497]}, {"w": "normal", "b": [0.3946, 0.7347, 0.4501, 0.7497]}, {"w": "feature", "b": [0.4562, 0.7347, 0.5113, 0.7497]}, {"w": "values", "b": [0.5174, 0.7347, 0.5655, 0.7497]}, {"w": "into", "b": [0.5716, 0.7347, 0.6024, 0.7497]}, {"w": "a", "b": [0.6085, 0.7347, 0.6176, 0.7497]}, {"w": "very", "b": [0.6237, 0.7347, 0.6576, 0.7497]}, {"w": "small", "b": [0.6637, 0.7347, 0.7052, 0.7497]}, {"w": "range.", "b": [0.7113, 0.7347, 0.7598, 0.7497]}, {"w": "One", "b": [0.768, 0.7347, 0.8003, 0.7497]}, {"w": "solution", "b": [0.8064, 0.7347, 0.8691, 0.7497]}, {"w": "to", "b": [0.1312, 0.7527, 0.148, 0.7677]}, {"w": "this", "b": [0.1555, 0.7527, 0.1859, 0.7677]}, {"w": "problem", "b": [0.1934, 0.7527, 0.2604, 0.7677]}, {"w": "is", "b": [0.2679, 0.7527, 0.2805, 0.7677]}, {"w": "to", "b": [0.288, 0.7527, 0.3047, 0.7677]}, {"w": "apply", "b": [0.3122, 0.7527, 0.3577, 0.7677]}, {"w": "clipping,", "b": [0.3653, 0.7527, 0.4438, 0.768]}, {"w": "that", "b": [0.4516, 0.7527, 0.4861, 0.7677]}, {"w": "is", "b": [0.4936, 0.7527, 0.5063, 0.7677]}, {"w": "to", "b": [0.5137, 0.7527, 0.5305, 0.7677]}, {"w": "pick", "b": [0.538, 0.7527, 0.5715, 0.7677]}, {"w": "“reasonable”", "b": [0.579, 0.7527, 0.6826, 0.7677]}, {"w": "values", "b": [0.6901, 0.7527, 0.74, 0.7677]}, {"w": "for", "b": [0.7475, 0.7527, 0.77, 0.7677]}, {"w": "max(j)", "b": [0.7773, 0.751, 0.83, 0.7677]}, {"w": "and", "b": [0.8384, 0.7527, 0.8688, 0.7677]}, {"w": "min(j)", "b": [0.1312, 0.7687, 0.1804, 0.7856]}, {"w": "instead", "b": [0.1878, 0.7706, 0.2465, 0.7856]}, {"w": "of", "b": [0.2531, 0.7706, 0.2682, 0.7856]}, {"w": "using", "b": [0.2748, 0.7706, 0.3178, 0.7856]}, {"w": "extreme", "b": [0.3243, 0.7706, 0.3898, 0.7856]}, {"w": "values", "b": [0.3963, 0.7706, 0.4461, 0.7856]}, {"w": "from", "b": [0.4527, 0.7706, 0.4909, 0.7856]}, {"w": "the", "b": [0.4975, 0.7706, 0.5236, 0.7856]}, {"w": "training", "b": [0.5302, 0.7706, 0.5951, 0.7856]}, {"w": "data.", "b": [0.6016, 0.7706, 0.6435, 0.7856]}, {"w": "Let", "b": [0.6529, 0.7706, 0.6803, 0.7856]}, {"w": "a", "b": [0.6869, 0.7706, 0.6963, 0.7856]}, {"w": "reasonable", "b": [0.7028, 0.7706, 0.7888, 0.7856]}, {"w": "range", "b": [0.7953, 0.7706, 0.8404, 0.7856]}, {"w": "for", "b": [0.8469, 0.7706, 0.8695, 0.7856]}, {"w": "a", "b": [0.1312, 0.7886, 0.1406, 0.8035]}, {"w": "feature", "b": [0.1484, 0.7886, 0.2055, 0.8035]}, {"w": "be", "b": [0.2133, 0.7886, 0.2326, 0.8035]}, {"w": "estimated", "b": [0.2404, 0.7886, 0.32, 0.8035]}, {"w": "as", "b": [0.3278, 0.7886, 0.3447, 0.8035]}, {"w": "[a,", "b": [0.3523, 0.7886, 0.3726, 0.8038]}, {"w": "b].", "b": [0.3756, 0.7886, 0.394, 0.8038]}, {"w": "Before", "b": [0.4071, 0.7886, 0.4597, 0.8035]}, {"w": "calculating", "b": [0.4675, 0.7886, 0.5564, 0.8035]}, {"w": "the", "b": [0.5642, 0.7886, 0.5904, 0.8035]}, {"w": "scaled", "b": [0.5981, 0.7886, 0.6474, 0.8035]}, {"w": "value", "b": [0.6552, 0.7886, 0.6976, 0.8035]}, {"w": "by", "b": [0.7054, 0.7886, 0.7253, 0.8035]}, {"w": "using", "b": [0.7331, 0.7886, 0.7761, 0.8035]}, {"w": "one", "b": [0.7839, 0.7886, 0.8121, 0.8035]}, {"w": "of", "b": [0.8199, 0.7886, 0.8351, 0.8035]}, {"w": "the", "b": [0.8429, 0.7886, 0.869, 0.8035]}, {"w": "above", "b": [0.1312, 0.8065, 0.1783, 0.8215]}, {"w": "two", "b": [0.1851, 0.8065, 0.2144, 0.8215]}, {"w": "formulas,", "b": [0.2212, 0.8065, 0.2967, 0.8215]}, {"w": "the", "b": [0.3036, 0.8065, 0.3298, 0.8215]}, {"w": "value", "b": [0.3366, 0.8065, 0.379, 0.8215]}, {"w": "x(j)", "b": [0.3856, 0.8049, 0.4146, 0.8218]}, {"w": "of", "b": [0.4223, 0.8065, 0.4375, 0.8215]}, {"w": "the", "b": [0.4443, 0.8065, 0.4704, 0.8215]}, {"w": "feature", "b": [0.4772, 0.8065, 0.5343, 0.8215]}, {"w": "is", "b": [0.5411, 0.8065, 0.5537, 0.8215]}, {"w": "set", "b": [0.5605, 0.8065, 0.5836, 0.8215]}, {"w": "(“clipped”)", "b": [0.5904, 0.8065, 0.6819, 0.8215]}, {"w": "to", "b": [0.6887, 0.8065, 0.7055, 0.8215]}, {"w": "a", "b": [0.7121, 0.8068, 0.7219, 0.8218]}, {"w": "if", "b": [0.7287, 0.8065, 0.7396, 0.8215]}, {"w": "x(j)", "b": [0.7464, 0.8049, 0.7753, 0.8218]}, {"w": "is", "b": [0.7831, 0.8065, 0.7957, 0.8215]}, {"w": "below", "b": [0.8025, 0.8065, 0.8496, 0.8215]}, {"w": "a,", "b": [0.8564, 0.8065, 0.8713, 0.8218]}, {"w": "or", "b": [0.1312, 0.8245, 0.1479, 0.8394]}, {"w": "to", "b": [0.1541, 0.8245, 0.1707, 0.8394]}, {"w": "b", "b": [0.1769, 0.8248, 0.1848, 0.8397]}, {"w": "if", "b": [0.191, 0.8245, 0.2019, 0.8394]}, {"w": "it’s", "b": [0.2081, 0.8245, 0.2331, 0.8394]}, {"w": "above", "b": [0.2393, 0.8245, 0.2861, 0.8394]}, {"w": "b.", "b": [0.2922, 0.8245, 0.3054, 0.8397]}, {"w": "A", "b": [0.3136, 0.8245, 0.3276, 0.8394]}, {"w": "frequent", "b": [0.3338, 0.8245, 0.401, 0.8394]}, {"w": "way", "b": [0.4071, 0.8245, 0.4389, 0.8394]}, {"w": "to", "b": [0.445, 0.8245, 0.4617, 0.8394]}, {"w": "estimate", "b": [0.4678, 0.8245, 0.5366, 0.8394]}, {"w": "the", "b": [0.5428, 0.8245, 0.5688, 0.8394]}, {"w": "values", "b": [0.575, 0.8245, 0.6245, 0.8394]}, {"w": "for", "b": [0.6307, 0.8245, 0.6531, 0.8394]}, {"w": "a", "b": [0.6591, 0.8248, 0.6689, 0.8397]}, {"w": "and", "b": [0.675, 0.8245, 0.7052, 0.8394]}, {"w": "b", "b": [0.7114, 0.8248, 0.7193, 0.8397]}, {"w": "is", "b": [0.7254, 0.8245, 0.738, 0.8394]}, {"w": "winsorization.", "b": [0.7442, 0.8245, 0.8724, 0.8397]}, {"w": "The", "b": [0.1306, 0.8424, 0.1622, 0.8574]}, {"w": "technique", "b": [0.1684, 0.8424, 0.2449, 0.8574]}, {"w": "is", "b": [0.2511, 0.8424, 0.2635, 0.8574]}, {"w": "named", "b": [0.2696, 0.8424, 0.3227, 0.8574]}, {"w": "after", "b": [0.3289, 0.8424, 0.3662, 0.8574]}, {"w": "the", "b": [0.3723, 0.8424, 0.3978, 0.8574]}, {"w": "engineer", "b": [0.404, 0.8424, 0.4704, 0.8574]}, {"w": "and", "b": [0.4766, 0.8424, 0.5062, 0.8574]}, {"w": "biostatistician", "b": [0.5124, 0.8424, 0.6248, 0.8574]}, {"w": "Charles", "b": [0.631, 0.8424, 0.6914, 0.8574]}, {"w": "Winsor", "b": [0.6975, 0.8424, 0.7553, 0.8574]}, {"w": "(1895—1951).", "b": [0.7615, 0.8424, 0.8727, 0.8574]}, {"w": "Winsorization", "b": [0.1303, 0.8604, 0.2405, 0.8753]}, {"w": "consists", "b": [0.2466, 0.8604, 0.3072, 0.8753]}, {"w": "of", "b": [0.3133, 0.8604, 0.3279, 0.8753]}, {"w": "setting", "b": [0.3339, 0.8604, 0.3873, 0.8753]}, {"w": "all", "b": [0.3934, 0.8604, 0.4125, 0.8753]}, {"w": "outliers", "b": [0.4186, 0.8604, 0.477, 0.8753]}, {"w": "to", "b": [0.4831, 0.8604, 0.4992, 0.8753]}, {"w": "a", "b": [0.5053, 0.8604, 0.5143, 0.8753]}, {"w": "specified", "b": [0.5204, 0.8604, 0.5873, 0.8753]}, {"w": "percentile", "b": [0.5934, 0.8604, 0.6699, 0.8753]}, {"w": "of", "b": [0.676, 0.8604, 0.6905, 0.8753]}, {"w": "the", "b": [0.6966, 0.8604, 0.7218, 0.8753]}, {"w": "data;", "b": [0.7278, 0.8604, 0.768, 0.8753]}, {"w": "for", "b": [0.7741, 0.8604, 0.7958, 0.8753]}, {"w": "example,", "b": [0.8019, 0.8604, 0.8717, 0.8753]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 38", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "38", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 128, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "a 90% winsorization would see all data below the 5th percentile set to the 5th percentile, and data above the 95th percentile set to the 95th percentile. In Python, winsorization could be applied to a list of numbers as follows:", "words": [{"w": "a", "b": [0.1312, 0.0881, 0.1403, 0.1031]}, {"w": "90%", "b": [0.1461, 0.0881, 0.1793, 0.1031]}, {"w": "winsorization", "b": [0.1851, 0.0881, 0.2898, 0.1031]}, {"w": "would", "b": [0.2957, 0.0881, 0.3424, 0.1031]}, {"w": "see", "b": [0.3482, 0.0881, 0.3714, 0.1031]}, {"w": "all", "b": [0.3773, 0.0881, 0.3964, 0.1031]}, {"w": "data", "b": [0.4022, 0.0881, 0.4374, 0.1031]}, {"w": "below", "b": [0.4433, 0.0881, 0.4885, 0.1031]}, {"w": "the", "b": [0.4943, 0.0881, 0.5195, 0.1031]}, {"w": "5th", "b": [0.5253, 0.0881, 0.5514, 0.1031]}, {"w": "percentile", "b": [0.5573, 0.0881, 0.6338, 0.1031]}, {"w": "set", "b": [0.6396, 0.0881, 0.6618, 0.1031]}, {"w": "to", "b": [0.6677, 0.0881, 0.6837, 0.1031]}, {"w": "the", "b": [0.6896, 0.0881, 0.7147, 0.1031]}, {"w": "5th", "b": [0.7206, 0.0881, 0.7467, 0.1031]}, {"w": "percentile,", "b": [0.7526, 0.0881, 0.834, 0.1031]}, {"w": "and", "b": [0.84, 0.0881, 0.8691, 0.1031]}, {"w": "data", "b": [0.1312, 0.106, 0.1668, 0.121]}, {"w": "above", "b": [0.173, 0.106, 0.2187, 0.121]}, {"w": "the", "b": [0.2248, 0.106, 0.2503, 0.121]}, {"w": "95th", "b": [0.2564, 0.106, 0.292, 0.121]}, {"w": "percentile", "b": [0.2981, 0.106, 0.3755, 0.121]}, {"w": "set", "b": [0.3816, 0.106, 0.4041, 0.121]}, {"w": "to", "b": [0.4103, 0.106, 0.4265, 0.121]}, {"w": "the", "b": [0.4327, 0.106, 0.4581, 0.121]}, {"w": "95th", "b": [0.4642, 0.106, 0.4998, 0.121]}, {"w": "percentile.", "b": [0.506, 0.106, 0.5884, 0.121]}, {"w": "In", "b": [0.5966, 0.106, 0.6134, 0.121]}, {"w": "Python,", "b": [0.6195, 0.106, 0.6833, 0.121]}, {"w": "winsorization", "b": [0.6895, 0.106, 0.7953, 0.121]}, {"w": "could", "b": [0.8015, 0.106, 0.8442, 0.121]}, {"w": "be", "b": [0.8503, 0.106, 0.8691, 0.121]}, {"w": "applied", "b": [0.1312, 0.124, 0.1897, 0.1389]}, {"w": "to", "b": [0.1958, 0.124, 0.2122, 0.1389]}, {"w": "a", "b": [0.2184, 0.124, 0.2276, 0.1389]}, {"w": "list", "b": [0.2338, 0.124, 0.2585, 0.1389]}, {"w": "of", "b": [0.2646, 0.124, 0.2795, 0.1389]}, {"w": "numbers", "b": [0.2857, 0.124, 0.354, 0.1389]}, {"w": "as", "b": [0.3602, 0.124, 0.3767, 0.1389]}, {"w": "follows:", "b": [0.3828, 0.124, 0.4424, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "1 from scipy.stats.mstats import winsorize", "words": [{"w": "1", "b": [0.1028, 0.157, 0.1091, 0.1645]}, {"w": "from", "b": [0.1312, 0.152, 0.17, 0.1669]}, {"w": "scipy.stats.mstats", "b": [0.1797, 0.152, 0.354, 0.1669]}, {"w": "import", "b": [0.3637, 0.152, 0.4218, 0.1669]}, {"w": "winsorize", "b": [0.4315, 0.152, 0.5187, 0.1669]}]}, {"id": "b_2", "type": "equation", "text": "2 winsorize(list_of_numbers, limits=[0.05, 0.05])", "words": [{"w": "2", "b": [0.1028, 0.175, 0.1091, 0.1825]}, {"w": "winsorize(list_of_numbers,", "b": [0.1312, 0.1699, 0.3831, 0.1849]}, {"w": "limits=[0.05,", "b": [0.3928, 0.1699, 0.5187, 0.1849]}, {"w": "0.05])", "b": [0.5284, 0.1699, 0.5865, 0.1849]}]}, {"id": "b_3", "type": "paragraph", "text": "The output of the winsorize function will be a list of numbers of the same length as the input, with the values of outliers “clipped.” A corresponding code in R is shown below:", "words": [{"w": "The", "b": [0.1306, 0.1958, 0.163, 0.2107]}, {"w": "output", "b": [0.1695, 0.1958, 0.2249, 0.2107]}, {"w": "of", "b": [0.2314, 0.1958, 0.2465, 0.2107]}, {"w": "the", "b": [0.253, 0.1958, 0.2792, 0.2107]}, {"w": "winsorize", "b": [0.2856, 0.1968, 0.3728, 0.2118]}, {"w": "function", "b": [0.3792, 0.1958, 0.4467, 0.2107]}, {"w": "will", "b": [0.4532, 0.1958, 0.4825, 0.2107]}, {"w": "be", "b": [0.4889, 0.1958, 0.5083, 0.2107]}, {"w": "a", "b": [0.5148, 0.1958, 0.5242, 0.2107]}, {"w": "list", "b": [0.5306, 0.1958, 0.5559, 0.2107]}, {"w": "of", "b": [0.5623, 0.1958, 0.5775, 0.2107]}, {"w": "numbers", "b": [0.584, 0.1958, 0.6537, 0.2107]}, {"w": "of", "b": [0.6602, 0.1958, 0.6753, 0.2107]}, {"w": "the", "b": [0.6818, 0.1958, 0.708, 0.2107]}, {"w": "same", "b": [0.7144, 0.1958, 0.7553, 0.2107]}, {"w": "length", "b": [0.7618, 0.1958, 0.8131, 0.2107]}, {"w": "as", "b": [0.8195, 0.1958, 0.8364, 0.2107]}, {"w": "the", "b": [0.8428, 0.1958, 0.869, 0.2107]}, {"w": "input,", "b": [0.1312, 0.2137, 0.1794, 0.2287]}, {"w": "with", "b": [0.1856, 0.2137, 0.2215, 0.2287]}, {"w": "the", "b": [0.2276, 0.2137, 0.2533, 0.2287]}, {"w": "values", "b": [0.2594, 0.2137, 0.3082, 0.2287]}, {"w": "of", "b": [0.3144, 0.2137, 0.3292, 0.2287]}, {"w": "outliers", "b": [0.3354, 0.2137, 0.395, 0.2287]}, {"w": "“clipped.”", "b": [0.4012, 0.2137, 0.4791, 0.2287]}, {"w": "A", "b": [0.4873, 0.2137, 0.5012, 0.2287]}, {"w": "corresponding", "b": [0.5073, 0.2137, 0.6198, 0.2287]}, {"w": "code", "b": [0.626, 0.2137, 0.6624, 0.2287]}, {"w": "in", "b": [0.6685, 0.2137, 0.6839, 0.2287]}, {"w": "R", "b": [0.6901, 0.2137, 0.7037, 0.2287]}, {"w": "is", "b": [0.7098, 0.2137, 0.7222, 0.2287]}, {"w": "shown", "b": [0.7284, 0.2137, 0.7782, 0.2287]}, {"w": "below:", "b": [0.7844, 0.2137, 0.8356, 0.2287]}]}, {"id": "b_4", "type": "paragraph", "text": "1 library(DescTools)", "words": [{"w": "1", "b": [0.1028, 0.2468, 0.1091, 0.2543]}, {"w": "library(DescTools)", "b": [0.1312, 0.2416, 0.3056, 0.2567]}]}, {"id": "b_5", "type": "equation", "text": "2 DescTools::Winsorize(vector_of_numbers, probs = c(0.05, 0.95))", "words": [{"w": "2", "b": [0.1028, 0.2647, 0.1091, 0.2722]}, {"w": "DescTools::Winsorize(vector_of_numbers,", "b": [0.1312, 0.2596, 0.509, 0.2746]}, {"w": "probs", "b": [0.5187, 0.2596, 0.5671, 0.2746]}, {"w": "=", "b": [0.5768, 0.2596, 0.5865, 0.2746]}, {"w": "c(0.05,", "b": [0.5962, 0.2596, 0.664, 0.2746]}, {"w": "0.95))", "b": [0.6736, 0.2596, 0.7318, 0.2746]}]}, {"id": "b_6", "type": "paragraph", "text": "Sometimes, the mean normalization is used:", "words": [{"w": "Sometimes,", "b": [0.1312, 0.2855, 0.2226, 0.3005]}, {"w": "the", "b": [0.2287, 0.2855, 0.2544, 0.3005]}, {"w": "mean", "b": [0.2605, 0.2858, 0.31, 0.3008]}, {"w": "normalization", "b": [0.317, 0.2858, 0.4443, 0.3008]}, {"w": "is", "b": [0.4505, 0.2855, 0.4629, 0.3005]}, {"w": "used:", "b": [0.469, 0.2855, 0.5102, 0.3005]}]}, {"id": "b_7", "type": "paragraph", "text": "¯x(j) ← x(j) −µ(j)", "words": [{"w": "¯x(j)", "b": [0.4028, 0.3349, 0.4318, 0.3526]}, {"w": "←", "b": [0.4378, 0.3374, 0.4563, 0.3524]}, {"w": "x(j)", "b": [0.4853, 0.3256, 0.5142, 0.3424]}, {"w": "−µ(j)", "b": [0.5193, 0.3256, 0.5672, 0.3424]}]}, {"id": "b_8", "type": "paragraph", "text": "max(j) −min(j) ,", "words": [{"w": "max(j)", "b": [0.4636, 0.3487, 0.5163, 0.3642]}, {"w": "−min(j)", "b": [0.5213, 0.3473, 0.5889, 0.3643]}, {"w": ",", "b": [0.592, 0.3376, 0.5972, 0.3526]}]}, {"id": "b_9", "type": "paragraph", "text": "where µ(j) is the sample mean of the values of feature j.", "words": [{"w": "where", "b": [0.1306, 0.3832, 0.1778, 0.3982]}, {"w": "µ(j)", "b": [0.1839, 0.3816, 0.2134, 0.3985]}, {"w": "is", "b": [0.2205, 0.3832, 0.2329, 0.3982]}, {"w": "the", "b": [0.239, 0.3832, 0.2647, 0.3982]}, {"w": "sample", "b": [0.2709, 0.3832, 0.3263, 0.3982]}, {"w": "mean", "b": [0.3325, 0.3832, 0.3755, 0.3982]}, {"w": "of", "b": [0.3817, 0.3832, 0.3966, 0.3982]}, {"w": "the", "b": [0.4027, 0.3832, 0.4283, 0.3982]}, {"w": "values", "b": [0.4345, 0.3832, 0.4833, 0.3982]}, {"w": "of", "b": [0.4895, 0.3832, 0.5043, 0.3982]}, {"w": "feature", "b": [0.5105, 0.3832, 0.5664, 0.3982]}, {"w": "j.", "b": [0.5724, 0.3832, 0.5862, 0.3985]}]}, {"id": "b_10", "type": "paragraph", "text": "4.9.2 Standardization", "words": [{"w": "4.9.2", "b": [0.1312, 0.4314, 0.1749, 0.4463]}, {"w": "Standardization", "b": [0.1961, 0.4314, 0.343, 0.4463]}]}, {"id": "b_11", "type": "paragraph", "text": "Standardization (or z-score normalization) is the procedure during which the feature values are rescaled so that they have the properties of a standard normal distribution, with µ = 0 and σ = 1, where µ is the sample mean (the average value of the feature, averaged over all examples in the training data) and σ is the standard deviation from the sample mean.", "words": [{"w": "Standardization", "b": [0.1312, 0.468, 0.2782, 0.4829]}, {"w": "(or", "b": [0.2846, 0.4676, 0.3087, 0.4826]}, {"w": "z-score", "b": [0.315, 0.468, 0.3784, 0.4829]}, {"w": "normalization)", "b": [0.3857, 0.4676, 0.5203, 0.4829]}, {"w": "is", "b": [0.5266, 0.4676, 0.5393, 0.4826]}, {"w": "the", "b": [0.5457, 0.4676, 0.5718, 0.4826]}, {"w": "procedure", "b": [0.5782, 0.4676, 0.6594, 0.4826]}, {"w": "during", "b": [0.6657, 0.4676, 0.7191, 0.4826]}, {"w": "which", "b": [0.7254, 0.4676, 0.7731, 0.4826]}, {"w": "the", "b": [0.7794, 0.4676, 0.8056, 0.4826]}, {"w": "feature", "b": [0.8119, 0.4676, 0.869, 0.4826]}, {"w": "values", "b": [0.1308, 0.4856, 0.1806, 0.5006]}, {"w": "are", "b": [0.1868, 0.4856, 0.2119, 0.5006]}, {"w": "rescaled", "b": [0.2181, 0.4856, 0.2831, 0.5006]}, {"w": "so", "b": [0.2893, 0.4856, 0.3062, 0.5006]}, {"w": "that", "b": [0.3123, 0.4856, 0.3468, 0.5006]}, {"w": "they", "b": [0.353, 0.4856, 0.3891, 0.5006]}, {"w": "have", "b": [0.3953, 0.4856, 0.4325, 0.5006]}, {"w": "the", "b": [0.4387, 0.4856, 0.4648, 0.5006]}, {"w": "properties", "b": [0.471, 0.4856, 0.5533, 0.5006]}, {"w": "of", "b": [0.5595, 0.4856, 0.5747, 0.5006]}, {"w": "a", "b": [0.5808, 0.4856, 0.5903, 0.5006]}, {"w": "standard", "b": [0.5964, 0.4859, 0.6778, 0.5009]}, {"w": "normal", "b": [0.6849, 0.4859, 0.7499, 0.5009]}, {"w": "distribution,", "b": [0.757, 0.4856, 0.8713, 0.5009]}, {"w": "with", "b": [0.1306, 0.5035, 0.1672, 0.5185]}, {"w": "µ", "b": [0.1748, 0.5038, 0.1859, 0.5188]}, {"w": "=", "b": [0.1935, 0.5035, 0.2081, 0.5185]}, {"w": "0", "b": [0.2157, 0.5035, 0.2251, 0.5185]}, {"w": "and", "b": [0.2327, 0.5035, 0.2631, 0.5185]}, {"w": "σ", "b": [0.2707, 0.5038, 0.2812, 0.5188]}, {"w": "=", "b": [0.2895, 0.5035, 0.3041, 0.5185]}, {"w": "1,", "b": [0.3117, 0.5035, 0.3263, 0.5185]}, {"w": "where", "b": [0.3343, 0.5035, 0.3825, 0.5185]}, {"w": "µ", "b": [0.3901, 0.5038, 0.4012, 0.5188]}, {"w": "is", "b": [0.4088, 0.5035, 0.4215, 0.5185]}, {"w": "the", "b": [0.4291, 0.5035, 0.4553, 0.5185]}, {"w": "sample", "b": [0.4629, 0.5038, 0.5266, 0.5188]}, {"w": "mean", "b": [0.5354, 0.5038, 0.5849, 0.5188]}, {"w": "(the", "b": [0.5926, 0.5035, 0.6261, 0.5185]}, {"w": "average", "b": [0.6337, 0.5035, 0.695, 0.5185]}, {"w": "value", "b": [0.7026, 0.5035, 0.745, 0.5185]}, {"w": "of", "b": [0.7526, 0.5035, 0.7678, 0.5185]}, {"w": "the", "b": [0.7754, 0.5035, 0.8015, 0.5185]}, {"w": "feature,", "b": [0.8092, 0.5035, 0.8715, 0.5185]}, {"w": "averaged", "b": [0.1312, 0.5215, 0.2029, 0.5364]}, {"w": "over", "b": [0.2092, 0.5215, 0.2433, 0.5364]}, {"w": "all", "b": [0.2495, 0.5215, 0.2694, 0.5364]}, {"w": "examples", "b": [0.2756, 0.5215, 0.3505, 0.5364]}, {"w": "in", "b": [0.3568, 0.5215, 0.3725, 0.5364]}, {"w": "the", "b": [0.3787, 0.5215, 0.4049, 0.5364]}, {"w": "training", "b": [0.4111, 0.5215, 0.476, 0.5364]}, {"w": "data)", "b": [0.4823, 0.5215, 0.5262, 0.5364]}, {"w": "and", "b": [0.5325, 0.5215, 0.5628, 0.5364]}, {"w": "σ", "b": [0.5688, 0.5218, 0.5794, 0.5367]}, {"w": "is", "b": [0.5863, 0.5215, 0.599, 0.5364]}, {"w": "the", "b": [0.6052, 0.5215, 0.6314, 0.5364]}, {"w": "standard", "b": [0.6376, 0.5215, 0.71, 0.5364]}, {"w": "deviation", "b": [0.7162, 0.5215, 0.792, 0.5364]}, {"w": "from", "b": [0.7983, 0.5215, 0.8365, 0.5364]}, {"w": "the", "b": [0.8428, 0.5215, 0.8689, 0.5364]}, {"w": "sample", "b": [0.1312, 0.5394, 0.1867, 0.5544]}, {"w": "mean.", "b": [0.1929, 0.5394, 0.241, 0.5544]}]}, {"id": "b_12", "type": "equation", "text": "Standard scores (or z-scores) of features are calculated as follows:", "words": [{"w": "Standard", "b": [0.1312, 0.5664, 0.2051, 0.5813]}, {"w": "scores", "b": [0.2113, 0.5664, 0.2587, 0.5813]}, {"w": "(or", "b": [0.2649, 0.5664, 0.2885, 0.5813]}, {"w": "z-scores)", "b": [0.2946, 0.5664, 0.3735, 0.5816]}, {"w": "of", "b": [0.3796, 0.5664, 0.3945, 0.5813]}, {"w": "features", "b": [0.4007, 0.5664, 0.4639, 0.5813]}, {"w": "are", "b": [0.47, 0.5664, 0.4947, 0.5813]}, {"w": "calculated", "b": [0.5009, 0.5664, 0.5819, 0.5813]}, {"w": "as", "b": [0.588, 0.5664, 0.6045, 0.5813]}, {"w": "follows:", "b": [0.6107, 0.5664, 0.6703, 0.5813]}]}, {"id": "b_13", "type": "paragraph", "text": "ˆx(j) ←x(j) −µ(j)", "words": [{"w": "ˆx(j)", "b": [0.4245, 0.6158, 0.4535, 0.6334]}, {"w": "←x(j)", "b": [0.4595, 0.6064, 0.5142, 0.6332]}, {"w": "−µ(j)", "b": [0.5193, 0.6064, 0.5672, 0.6233]}]}, {"id": "b_14", "type": "paragraph", "text": "σ(j) ,", "words": [{"w": "σ(j)", "b": [0.5115, 0.6282, 0.541, 0.6439]}, {"w": ",", "b": [0.5703, 0.6184, 0.5755, 0.6334]}]}, {"id": "b_15", "type": "paragraph", "text": "where µ(j) is the sample mean of the values of feature j, and σ(j) is the standard deviation of the values of feature j from the sample mean.", "words": [{"w": "where", "b": [0.1306, 0.6614, 0.1769, 0.6764]}, {"w": "µ(j)", "b": [0.1823, 0.6598, 0.2118, 0.6766]}, {"w": "is", "b": [0.2181, 0.6614, 0.2303, 0.6764]}, {"w": "the", "b": [0.2357, 0.6614, 0.2609, 0.6764]}, {"w": "sample", "b": [0.2663, 0.6614, 0.3207, 0.6764]}, {"w": "mean", "b": [0.3261, 0.6614, 0.3683, 0.6764]}, {"w": "of", "b": [0.3738, 0.6614, 0.3883, 0.6764]}, {"w": "the", "b": [0.3938, 0.6614, 0.4189, 0.6764]}, {"w": "values", "b": [0.4244, 0.6614, 0.4722, 0.6764]}, {"w": "of", "b": [0.4776, 0.6614, 0.4922, 0.6764]}, {"w": "feature", "b": [0.4977, 0.6614, 0.5525, 0.6764]}, {"w": "j,", "b": [0.5578, 0.6614, 0.5714, 0.6766]}, {"w": "and", "b": [0.577, 0.6614, 0.6062, 0.6764]}, {"w": "σ(j)", "b": [0.6116, 0.6598, 0.6412, 0.6766]}, {"w": "is", "b": [0.6475, 0.6614, 0.6597, 0.6764]}, {"w": "the", "b": [0.6652, 0.6614, 0.6903, 0.6764]}, {"w": "standard", "b": [0.6957, 0.6617, 0.7771, 0.6767]}, {"w": "deviation", "b": [0.7833, 0.6617, 0.8688, 0.6767]}, {"w": "of", "b": [0.1312, 0.6794, 0.1461, 0.6943]}, {"w": "the", "b": [0.1522, 0.6794, 0.1779, 0.6943]}, {"w": "values", "b": [0.1841, 0.6794, 0.2329, 0.6943]}, {"w": "of", "b": [0.239, 0.6794, 0.2539, 0.6943]}, {"w": "feature", "b": [0.26, 0.6794, 0.316, 0.6943]}, {"w": "j", "b": [0.322, 0.6796, 0.3296, 0.6946]}, {"w": "from", "b": [0.3368, 0.6794, 0.3743, 0.6943]}, {"w": "the", "b": [0.3804, 0.6794, 0.4061, 0.6943]}, {"w": "sample", "b": [0.4122, 0.6794, 0.4677, 0.6943]}, {"w": "mean.", "b": [0.4739, 0.6794, 0.5221, 0.6943]}]}, {"id": "b_16", "type": "paragraph", "text": "In addition, sometimes it’s helpful to apply simple mathematical transformations to the feature values prior to applying the scaling techniques described above. Such transformations include taking the logarithm of the feature, squaring it, or extracting the square root of the feature. The idea is to obtain a distribution as close to a normal distribution as possible.", "words": [{"w": "In", "b": [0.1312, 0.7063, 0.1485, 0.7212]}, {"w": "addition,", "b": [0.1559, 0.7063, 0.2292, 0.7212]}, {"w": "sometimes", "b": [0.237, 0.7063, 0.3219, 0.7212]}, {"w": "it’s", "b": [0.3293, 0.7063, 0.3545, 0.7212]}, {"w": "helpful", "b": [0.362, 0.7063, 0.418, 0.7212]}, {"w": "to", "b": [0.4254, 0.7063, 0.4422, 0.7212]}, {"w": "apply", "b": [0.4496, 0.7063, 0.4951, 0.7212]}, {"w": "simple", "b": [0.5026, 0.7063, 0.555, 0.7212]}, {"w": "mathematical", "b": [0.5624, 0.7063, 0.6743, 0.7212]}, {"w": "transformations", "b": [0.6818, 0.7063, 0.8113, 0.7212]}, {"w": "to", "b": [0.8187, 0.7063, 0.8354, 0.7212]}, {"w": "the", "b": [0.8429, 0.7063, 0.8691, 0.7212]}, {"w": "feature", "b": [0.1312, 0.7242, 0.1861, 0.7392]}, {"w": "values", "b": [0.1918, 0.7242, 0.2397, 0.7392]}, {"w": "prior", "b": [0.2454, 0.7242, 0.2837, 0.7392]}, {"w": "to", "b": [0.2895, 0.7242, 0.3055, 0.7392]}, {"w": "applying", "b": [0.3113, 0.7242, 0.3791, 0.7392]}, {"w": "the", "b": [0.3849, 0.7242, 0.41, 0.7392]}, {"w": "scaling", "b": [0.4158, 0.7242, 0.4692, 0.7392]}, {"w": "techniques", "b": [0.4749, 0.7242, 0.5574, 0.7392]}, {"w": "described", "b": [0.5632, 0.7242, 0.6373, 0.7392]}, {"w": "above.", "b": [0.643, 0.7242, 0.6933, 0.7392]}, {"w": "Such", "b": [0.7013, 0.7242, 0.739, 0.7392]}, {"w": "transformations", "b": [0.7448, 0.7242, 0.8692, 0.7392]}, {"w": "include", "b": [0.1312, 0.7422, 0.1884, 0.7571]}, {"w": "taking", "b": [0.1945, 0.7422, 0.245, 0.7571]}, {"w": "the", "b": [0.2512, 0.7422, 0.2767, 0.7571]}, {"w": "logarithm", "b": [0.2829, 0.7422, 0.3605, 0.7571]}, {"w": "of", "b": [0.3666, 0.7422, 0.3814, 0.7571]}, {"w": "the", "b": [0.3876, 0.7422, 0.4131, 0.7571]}, {"w": "feature,", "b": [0.4193, 0.7422, 0.48, 0.7571]}, {"w": "squaring", "b": [0.4862, 0.7422, 0.5542, 0.7571]}, {"w": "it,", "b": [0.5604, 0.7422, 0.5777, 0.7571]}, {"w": "or", "b": [0.5839, 0.7422, 0.6003, 0.7571]}, {"w": "extracting", "b": [0.6064, 0.7422, 0.6876, 0.7571]}, {"w": "the", "b": [0.6937, 0.7422, 0.7193, 0.7571]}, {"w": "square", "b": [0.7254, 0.7422, 0.7771, 0.7571]}, {"w": "root", "b": [0.7833, 0.7422, 0.8165, 0.7571]}, {"w": "of", "b": [0.8227, 0.7422, 0.8374, 0.7571]}, {"w": "the", "b": [0.8436, 0.7422, 0.8691, 0.7571]}, {"w": "feature.", "b": [0.1312, 0.7601, 0.1923, 0.7751]}, {"w": "The", "b": [0.2005, 0.7601, 0.2323, 0.7751]}, {"w": "idea", "b": [0.2384, 0.7601, 0.2713, 0.7751]}, {"w": "is", "b": [0.2774, 0.7601, 0.2898, 0.7751]}, {"w": "to", "b": [0.296, 0.7601, 0.3124, 0.7751]}, {"w": "obtain", "b": [0.3185, 0.7601, 0.3698, 0.7751]}, {"w": "a", "b": [0.3759, 0.7601, 0.3852, 0.7751]}, {"w": "distribution", "b": [0.3913, 0.7601, 0.4858, 0.7751]}, {"w": "as", "b": [0.492, 0.7601, 0.5085, 0.7751]}, {"w": "close", "b": [0.5146, 0.7601, 0.5527, 0.7751]}, {"w": "to", "b": [0.5589, 0.7601, 0.5753, 0.7751]}, {"w": "a", "b": [0.5814, 0.7601, 0.5906, 0.7751]}, {"w": "normal", "b": [0.5968, 0.7601, 0.6532, 0.7751]}, {"w": "distribution", "b": [0.6594, 0.7601, 0.7539, 0.7751]}, {"w": "as", "b": [0.76, 0.7601, 0.7765, 0.7751]}, {"w": "possible.", "b": [0.7827, 0.7601, 0.8511, 0.7751]}]}, {"id": "b_17", "type": "paragraph", "text": "You may wonder when you should use normalization, or when to use standardization. There’s no definitive answer to this question. In theory, normalization would work better for uniformly distributed data, while standardization tends to work best for normally distributed data. However, in practice, data is rarely distributed following a perfect curve. Usually, if your", "words": [{"w": "You", "b": [0.1305, 0.787, 0.1616, 0.802]}, {"w": "may", "b": [0.1671, 0.787, 0.2002, 0.802]}, {"w": "wonder", "b": [0.2056, 0.787, 0.2624, 0.802]}, {"w": "when", "b": [0.2679, 0.787, 0.3091, 0.802]}, {"w": "you", "b": [0.3145, 0.787, 0.3426, 0.802]}, {"w": "should", "b": [0.348, 0.787, 0.3994, 0.802]}, {"w": "use", "b": [0.4048, 0.787, 0.43, 0.802]}, {"w": "normalization,", "b": [0.4354, 0.787, 0.549, 0.802]}, {"w": "or", "b": [0.5546, 0.787, 0.5707, 0.802]}, {"w": "when", "b": [0.5761, 0.787, 0.6173, 0.802]}, {"w": "to", "b": [0.6228, 0.787, 0.6388, 0.802]}, {"w": "use", "b": [0.6442, 0.787, 0.6695, 0.802]}, {"w": "standardization.", "b": [0.6749, 0.787, 0.8027, 0.802]}, {"w": "There’s", "b": [0.8106, 0.787, 0.8691, 0.802]}, {"w": "no", "b": [0.1312, 0.805, 0.1503, 0.8199]}, {"w": "definitive", "b": [0.1552, 0.805, 0.2276, 0.8199]}, {"w": "answer", "b": [0.2325, 0.805, 0.2864, 0.8199]}, {"w": "to", "b": [0.2912, 0.805, 0.3073, 0.8199]}, {"w": "this", "b": [0.3122, 0.805, 0.3415, 0.8199]}, {"w": "question.", "b": [0.3463, 0.805, 0.4173, 0.8199]}, {"w": "In", "b": [0.4251, 0.805, 0.4417, 0.8199]}, {"w": "theory,", "b": [0.4465, 0.805, 0.5008, 0.8199]}, {"w": "normalization", "b": [0.506, 0.805, 0.6145, 0.8199]}, {"w": "would", "b": [0.6194, 0.805, 0.6661, 0.8199]}, {"w": "work", "b": [0.671, 0.805, 0.7092, 0.8199]}, {"w": "better", "b": [0.7141, 0.805, 0.7619, 0.8199]}, {"w": "for", "b": [0.7668, 0.805, 0.7885, 0.8199]}, {"w": "uniformly", "b": [0.7934, 0.805, 0.8698, 0.8199]}, {"w": "distributed", "b": [0.1312, 0.8229, 0.2214, 0.8379]}, {"w": "data,", "b": [0.2283, 0.8229, 0.2702, 0.8379]}, {"w": "while", "b": [0.2774, 0.8229, 0.3202, 0.8379]}, {"w": "standardization", "b": [0.3272, 0.8229, 0.455, 0.8379]}, {"w": "tends", "b": [0.462, 0.8229, 0.506, 0.8379]}, {"w": "to", "b": [0.513, 0.8229, 0.5297, 0.8379]}, {"w": "work", "b": [0.5367, 0.8229, 0.5765, 0.8379]}, {"w": "best", "b": [0.5835, 0.8229, 0.6176, 0.8379]}, {"w": "for", "b": [0.6245, 0.8229, 0.6471, 0.8379]}, {"w": "normally", "b": [0.654, 0.8229, 0.7268, 0.8379]}, {"w": "distributed", "b": [0.7338, 0.8229, 0.8239, 0.8379]}, {"w": "data.", "b": [0.8309, 0.8229, 0.8727, 0.8379]}, {"w": "However,", "b": [0.1312, 0.8409, 0.2061, 0.8558]}, {"w": "in", "b": [0.2128, 0.8409, 0.2285, 0.8558]}, {"w": "practice,", "b": [0.2351, 0.8409, 0.3052, 0.8558]}, {"w": "data", "b": [0.3119, 0.8409, 0.3485, 0.8558]}, {"w": "is", "b": [0.3551, 0.8409, 0.3678, 0.8558]}, {"w": "rarely", "b": [0.3744, 0.8409, 0.4221, 0.8558]}, {"w": "distributed", "b": [0.4287, 0.8409, 0.5188, 0.8558]}, {"w": "following", "b": [0.5254, 0.8409, 0.5986, 0.8558]}, {"w": "a", "b": [0.6052, 0.8409, 0.6146, 0.8558]}, {"w": "perfect", "b": [0.6212, 0.8409, 0.6777, 0.8558]}, {"w": "curve.", "b": [0.6843, 0.8409, 0.7335, 0.8558]}, {"w": "Usually,", "b": [0.7431, 0.8409, 0.8086, 0.8558]}, {"w": "if", "b": [0.8153, 0.8409, 0.8263, 0.8558]}, {"w": "your", "b": [0.8329, 0.8409, 0.8695, 0.8558]}]}, {"id": "b_18", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 39", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "39", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 129, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "dataset is not too big and you have time, you can try both and see which one performs better for your task. Feature scaling is usually beneficial to most learning algorithms.", "words": [{"w": "dataset", "b": [0.1312, 0.0881, 0.1886, 0.1031]}, {"w": "is", "b": [0.1942, 0.0881, 0.2064, 0.1031]}, {"w": "not", "b": [0.2121, 0.0881, 0.2382, 0.1031]}, {"w": "too", "b": [0.2438, 0.0881, 0.2694, 0.1031]}, {"w": "big", "b": [0.2751, 0.0881, 0.2992, 0.1031]}, {"w": "and", "b": [0.3048, 0.0881, 0.334, 0.1031]}, {"w": "you", "b": [0.3396, 0.0881, 0.3677, 0.1031]}, {"w": "have", "b": [0.3733, 0.0881, 0.409, 0.1031]}, {"w": "time,", "b": [0.4146, 0.0881, 0.4548, 0.1031]}, {"w": "you", "b": [0.4606, 0.0881, 0.4887, 0.1031]}, {"w": "can", "b": [0.4943, 0.0881, 0.5215, 0.1031]}, {"w": "try", "b": [0.5271, 0.0881, 0.5508, 0.1031]}, {"w": "both", "b": [0.5564, 0.0881, 0.5931, 0.1031]}, {"w": "and", "b": [0.5987, 0.0881, 0.6279, 0.1031]}, {"w": "see", "b": [0.6335, 0.0881, 0.6567, 0.1031]}, {"w": "which", "b": [0.6624, 0.0881, 0.7081, 0.1031]}, {"w": "one", "b": [0.7137, 0.0881, 0.7408, 0.1031]}, {"w": "performs", "b": [0.7465, 0.0881, 0.816, 0.1031]}, {"w": "better", "b": [0.8217, 0.0881, 0.8695, 0.1031]}, {"w": "for", "b": [0.1312, 0.106, 0.1533, 0.121]}, {"w": "your", "b": [0.1595, 0.106, 0.1954, 0.121]}, {"w": "task.", "b": [0.2016, 0.106, 0.2401, 0.121]}, {"w": "Feature", "b": [0.2483, 0.106, 0.3092, 0.121]}, {"w": "scaling", "b": [0.3153, 0.106, 0.3698, 0.121]}, {"w": "is", "b": [0.3759, 0.106, 0.3883, 0.121]}, {"w": "usually", "b": [0.3945, 0.106, 0.4515, 0.121]}, {"w": "beneficial", "b": [0.4577, 0.106, 0.533, 0.121]}, {"w": "to", "b": [0.5392, 0.106, 0.5556, 0.121]}, {"w": "most", "b": [0.5617, 0.106, 0.6008, 0.121]}, {"w": "learning", "b": [0.6069, 0.106, 0.6716, 0.121]}, {"w": "algorithms.", "b": [0.6778, 0.106, 0.7681, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "4.10 Data Leakage in Feature Engineering", "words": [{"w": "4.10", "b": [0.1312, 0.1549, 0.1756, 0.1728]}, {"w": "Data", "b": [0.2005, 0.1549, 0.2535, 0.1728]}, {"w": "Leakage", "b": [0.2618, 0.1549, 0.3493, 0.1728]}, {"w": "in", "b": [0.3576, 0.1549, 0.3784, 0.1728]}, {"w": "Feature", "b": [0.3867, 0.1549, 0.4688, 0.1728]}, {"w": "Engineering", "b": [0.4771, 0.1549, 0.6066, 0.1728]}]}, {"id": "b_2", "type": "paragraph", "text": "Data leakage during feature engineering can happen in several situations, including feature discretization and scaling.", "words": [{"w": "Data", "b": [0.1312, 0.1935, 0.1711, 0.2084]}, {"w": "leakage", "b": [0.1773, 0.1935, 0.2364, 0.2084]}, {"w": "during", "b": [0.2426, 0.1935, 0.2951, 0.2084]}, {"w": "feature", "b": [0.3013, 0.1935, 0.3574, 0.2084]}, {"w": "engineering", "b": [0.3636, 0.1935, 0.4552, 0.2084]}, {"w": "can", "b": [0.4614, 0.1935, 0.4891, 0.2084]}, {"w": "happen", "b": [0.4953, 0.1935, 0.5545, 0.2084]}, {"w": "in", "b": [0.5606, 0.1935, 0.5761, 0.2084]}, {"w": "several", "b": [0.5822, 0.1935, 0.6369, 0.2084]}, {"w": "situations,", "b": [0.6431, 0.1935, 0.7266, 0.2084]}, {"w": "including", "b": [0.7328, 0.1935, 0.8069, 0.2084]}, {"w": "feature", "b": [0.8131, 0.1935, 0.8692, 0.2084]}, {"w": "discretization", "b": [0.1312, 0.2114, 0.2391, 0.2264]}, {"w": "and", "b": [0.2452, 0.2114, 0.275, 0.2264]}, {"w": "scaling.", "b": [0.2811, 0.2114, 0.3407, 0.2264]}]}, {"id": "b_3", "type": "paragraph", "text": "4.10.1 Possible Problems", "words": [{"w": "4.10.1", "b": [0.1312, 0.2596, 0.1855, 0.2745]}, {"w": "Possible", "b": [0.2067, 0.2596, 0.2813, 0.2745]}, {"w": "Problems", "b": [0.2883, 0.2596, 0.3757, 0.2745]}]}, {"id": "b_4", "type": "paragraph", "text": "Imagine that you use your entire dataset to calculate the ranges of each bin or the feature scaling factors. Then you split the dataset into training, validation, and test sets. If you proceed like that, the values of features in the training data will, in part, be obtained by using the examples that belong to the holdout sets. When your dataset is small enough, it might result in an overly optimistic performance of your model on the holdout data.", "words": [{"w": "Imagine", "b": [0.1312, 0.2958, 0.1962, 0.3108]}, {"w": "that", "b": [0.2023, 0.2958, 0.2367, 0.3108]}, {"w": "you", "b": [0.2428, 0.2958, 0.2719, 0.3108]}, {"w": "use", "b": [0.2781, 0.2958, 0.3042, 0.3108]}, {"w": "your", "b": [0.3103, 0.2958, 0.3468, 0.3108]}, {"w": "entire", "b": [0.3529, 0.2958, 0.3993, 0.3108]}, {"w": "dataset", "b": [0.4054, 0.2958, 0.4648, 0.3108]}, {"w": "to", "b": [0.4709, 0.2958, 0.4875, 0.3108]}, {"w": "calculate", "b": [0.4937, 0.2958, 0.5654, 0.3108]}, {"w": "the", "b": [0.5716, 0.2958, 0.5976, 0.3108]}, {"w": "ranges", "b": [0.6037, 0.2958, 0.6559, 0.3108]}, {"w": "of", "b": [0.662, 0.2958, 0.6771, 0.3108]}, {"w": "each", "b": [0.6832, 0.2958, 0.7191, 0.3108]}, {"w": "bin", "b": [0.7253, 0.2958, 0.7513, 0.3108]}, {"w": "or", "b": [0.7574, 0.2958, 0.7741, 0.3108]}, {"w": "the", "b": [0.7803, 0.2958, 0.8063, 0.3108]}, {"w": "feature", "b": [0.8124, 0.2958, 0.8691, 0.3108]}, {"w": "scaling", "b": [0.1312, 0.3138, 0.1868, 0.3287]}, {"w": "factors.", "b": [0.1935, 0.3138, 0.2539, 0.3287]}, {"w": "Then", "b": [0.2639, 0.3138, 0.3068, 0.3287]}, {"w": "you", "b": [0.3135, 0.3138, 0.3428, 0.3287]}, {"w": "split", "b": [0.3496, 0.3138, 0.3853, 0.3287]}, {"w": "the", "b": [0.392, 0.3138, 0.4182, 0.3287]}, {"w": "dataset", "b": [0.4249, 0.3138, 0.4847, 0.3287]}, {"w": "into", "b": [0.4914, 0.3138, 0.5233, 0.3287]}, {"w": "training,", "b": [0.5301, 0.3138, 0.6002, 0.3287]}, {"w": "validation,", "b": [0.6072, 0.3138, 0.6935, 0.3287]}, {"w": "and", "b": [0.7004, 0.3138, 0.7307, 0.3287]}, {"w": "test", "b": [0.7375, 0.3138, 0.7679, 0.3287]}, {"w": "sets.", "b": [0.7747, 0.3138, 0.8105, 0.3287]}, {"w": "If", "b": [0.8205, 0.3138, 0.8331, 0.3287]}, {"w": "you", "b": [0.8398, 0.3138, 0.8691, 0.3287]}, {"w": "proceed", "b": [0.1312, 0.3317, 0.1946, 0.3467]}, {"w": "like", "b": [0.2013, 0.3317, 0.2296, 0.3467]}, {"w": "that,", "b": [0.2363, 0.3317, 0.276, 0.3467]}, {"w": "the", "b": [0.2829, 0.3317, 0.309, 0.3467]}, {"w": "values", "b": [0.3157, 0.3317, 0.3656, 0.3467]}, {"w": "of", "b": [0.3723, 0.3317, 0.3874, 0.3467]}, {"w": "features", "b": [0.3942, 0.3317, 0.4587, 0.3467]}, {"w": "in", "b": [0.4654, 0.3317, 0.4811, 0.3467]}, {"w": "the", "b": [0.4878, 0.3317, 0.5139, 0.3467]}, {"w": "training", "b": [0.5207, 0.3317, 0.5856, 0.3467]}, {"w": "data", "b": [0.5923, 0.3317, 0.6289, 0.3467]}, {"w": "will,", "b": [0.6356, 0.3317, 0.6701, 0.3467]}, {"w": "in", "b": [0.677, 0.3317, 0.6927, 0.3467]}, {"w": "part,", "b": [0.6994, 0.3317, 0.7392, 0.3467]}, {"w": "be", "b": [0.746, 0.3317, 0.7654, 0.3467]}, {"w": "obtained", "b": [0.7721, 0.3317, 0.8432, 0.3467]}, {"w": "by", "b": [0.8499, 0.3317, 0.8698, 0.3467]}, {"w": "using", "b": [0.1312, 0.3497, 0.1738, 0.3646]}, {"w": "the", "b": [0.1799, 0.3497, 0.2058, 0.3646]}, {"w": "examples", "b": [0.212, 0.3497, 0.2861, 0.3646]}, {"w": "that", "b": [0.2922, 0.3497, 0.3264, 0.3646]}, {"w": "belong", "b": [0.3325, 0.3497, 0.3858, 0.3646]}, {"w": "to", "b": [0.392, 0.3497, 0.4085, 0.3646]}, {"w": "the", "b": [0.4147, 0.3497, 0.4405, 0.3646]}, {"w": "holdout", "b": [0.4467, 0.3497, 0.5088, 0.3646]}, {"w": "sets.", "b": [0.515, 0.3497, 0.5504, 0.3646]}, {"w": "When", "b": [0.5586, 0.3497, 0.6067, 0.3646]}, {"w": "your", "b": [0.6129, 0.3497, 0.6491, 0.3646]}, {"w": "dataset", "b": [0.6553, 0.3497, 0.7144, 0.3646]}, {"w": "is", "b": [0.7205, 0.3497, 0.7331, 0.3646]}, {"w": "small", "b": [0.7392, 0.3497, 0.7817, 0.3646]}, {"w": "enough,", "b": [0.7879, 0.3497, 0.851, 0.3646]}, {"w": "it", "b": [0.8572, 0.3497, 0.8696, 0.3646]}, {"w": "might", "b": [0.1312, 0.3676, 0.1779, 0.3826]}, {"w": "result", "b": [0.184, 0.3676, 0.2293, 0.3826]}, {"w": "in", "b": [0.2355, 0.3676, 0.2509, 0.3826]}, {"w": "an", "b": [0.257, 0.3676, 0.2765, 0.3826]}, {"w": "overly", "b": [0.2826, 0.3676, 0.3309, 0.3826]}, {"w": "optimistic", "b": [0.337, 0.3676, 0.4171, 0.3826]}, {"w": "performance", "b": [0.4233, 0.3676, 0.5228, 0.3826]}, {"w": "of", "b": [0.529, 0.3676, 0.5439, 0.3826]}, {"w": "your", "b": [0.55, 0.3676, 0.586, 0.3826]}, {"w": "model", "b": [0.5921, 0.3676, 0.6408, 0.3826]}, {"w": "on", "b": [0.647, 0.3676, 0.6664, 0.3826]}, {"w": "the", "b": [0.6726, 0.3676, 0.6982, 0.3826]}, {"w": "holdout", "b": [0.7044, 0.3676, 0.7659, 0.3826]}, {"w": "data.", "b": [0.772, 0.3676, 0.8131, 0.3826]}]}, {"id": "b_5", "type": "paragraph", "text": "Now imagine you are working with text, and that you use bag-of-words to create features with the entire dataset. After building the vocabulary, you split your data into the three sets. In this situation, the learning algorithm will be exposed to features based on tokens only present in the holdout sets. Again, the model will display artificially better performance than had you divided your data before feature engineering.", "words": [{"w": "Now", "b": [0.1312, 0.3945, 0.167, 0.4095]}, {"w": "imagine", "b": [0.1732, 0.3945, 0.2356, 0.4095]}, {"w": "you", "b": [0.2417, 0.3945, 0.2704, 0.4095]}, {"w": "are", "b": [0.2765, 0.3945, 0.3011, 0.4095]}, {"w": "working", "b": [0.3073, 0.3945, 0.3708, 0.4095]}, {"w": "with", "b": [0.3769, 0.3945, 0.4127, 0.4095]}, {"w": "text,", "b": [0.4189, 0.3945, 0.4562, 0.4095]}, {"w": "and", "b": [0.4624, 0.3945, 0.4921, 0.4095]}, {"w": "that", "b": [0.4982, 0.3945, 0.532, 0.4095]}, {"w": "you", "b": [0.5381, 0.3945, 0.5668, 0.4095]}, {"w": "use", "b": [0.5729, 0.3945, 0.5986, 0.4095]}, {"w": "bag-of-words", "b": [0.6046, 0.3948, 0.7228, 0.4098]}, {"w": "to", "b": [0.7289, 0.3945, 0.7453, 0.4095]}, {"w": "create", "b": [0.7514, 0.3945, 0.7996, 0.4095]}, {"w": "features", "b": [0.8057, 0.3945, 0.8689, 0.4095]}, {"w": "with", "b": [0.1306, 0.4125, 0.1672, 0.4274]}, {"w": "the", "b": [0.1738, 0.4125, 0.2, 0.4274]}, {"w": "entire", "b": [0.2066, 0.4125, 0.2532, 0.4274]}, {"w": "dataset.", "b": [0.2599, 0.4125, 0.3248, 0.4274]}, {"w": "After", "b": [0.3346, 0.4125, 0.3775, 0.4274]}, {"w": "building", "b": [0.3841, 0.4125, 0.4511, 0.4274]}, {"w": "the", "b": [0.4577, 0.4125, 0.4839, 0.4274]}, {"w": "vocabulary,", "b": [0.4905, 0.4125, 0.5842, 0.4274]}, {"w": "you", "b": [0.591, 0.4125, 0.6203, 0.4274]}, {"w": "split", "b": [0.627, 0.4125, 0.6626, 0.4274]}, {"w": "your", "b": [0.6693, 0.4125, 0.706, 0.4274]}, {"w": "data", "b": [0.7126, 0.4125, 0.7492, 0.4274]}, {"w": "into", "b": [0.7559, 0.4125, 0.7878, 0.4274]}, {"w": "the", "b": [0.7944, 0.4125, 0.8206, 0.4274]}, {"w": "three", "b": [0.8272, 0.4125, 0.8691, 0.4274]}, {"w": "sets.", "b": [0.1312, 0.4304, 0.167, 0.4454]}, {"w": "In", "b": [0.1759, 0.4304, 0.1932, 0.4454]}, {"w": "this", "b": [0.1996, 0.4304, 0.23, 0.4454]}, {"w": "situation,", "b": [0.2364, 0.4304, 0.3139, 0.4454]}, {"w": "the", "b": [0.3204, 0.4304, 0.3465, 0.4454]}, {"w": "learning", "b": [0.3529, 0.4304, 0.4189, 0.4454]}, {"w": "algorithm", "b": [0.4252, 0.4304, 0.5048, 0.4454]}, {"w": "will", "b": [0.5112, 0.4304, 0.5405, 0.4454]}, {"w": "be", "b": [0.5468, 0.4304, 0.5662, 0.4454]}, {"w": "exposed", "b": [0.5726, 0.4304, 0.6375, 0.4454]}, {"w": "to", "b": [0.6439, 0.4304, 0.6606, 0.4454]}, {"w": "features", "b": [0.667, 0.4304, 0.7315, 0.4454]}, {"w": "based", "b": [0.7379, 0.4304, 0.7841, 0.4454]}, {"w": "on", "b": [0.7905, 0.4304, 0.8103, 0.4454]}, {"w": "tokens", "b": [0.8167, 0.4304, 0.8691, 0.4454]}, {"w": "only", "b": [0.1312, 0.4484, 0.1649, 0.4633]}, {"w": "present", "b": [0.1708, 0.4484, 0.2277, 0.4633]}, {"w": "in", "b": [0.2336, 0.4484, 0.2487, 0.4633]}, {"w": "the", "b": [0.2546, 0.4484, 0.2797, 0.4633]}, {"w": "holdout", "b": [0.2856, 0.4484, 0.3459, 0.4633]}, {"w": "sets.", "b": [0.3518, 0.4484, 0.3862, 0.4633]}, {"w": "Again,", "b": [0.3943, 0.4484, 0.4461, 0.4633]}, {"w": "the", "b": [0.452, 0.4484, 0.4772, 0.4633]}, {"w": "model", "b": [0.4831, 0.4484, 0.5308, 0.4633]}, {"w": "will", "b": [0.5367, 0.4484, 0.5648, 0.4633]}, {"w": "display", "b": [0.5707, 0.4484, 0.6261, 0.4633]}, {"w": "artificially", "b": [0.632, 0.4484, 0.7119, 0.4633]}, {"w": "better", "b": [0.7178, 0.4484, 0.7656, 0.4633]}, {"w": "performance", "b": [0.7715, 0.4484, 0.8691, 0.4633]}, {"w": "than", "b": [0.1312, 0.4663, 0.1682, 0.4813]}, {"w": "had", "b": [0.1743, 0.4663, 0.204, 0.4813]}, {"w": "you", "b": [0.2102, 0.4663, 0.2389, 0.4813]}, {"w": "divided", "b": [0.245, 0.4663, 0.304, 0.4813]}, {"w": "your", "b": [0.3102, 0.4663, 0.3461, 0.4813]}, {"w": "data", "b": [0.3523, 0.4663, 0.3882, 0.4813]}, {"w": "before", "b": [0.3943, 0.4663, 0.4436, 0.4813]}, {"w": "feature", "b": [0.4497, 0.4663, 0.5057, 0.4813]}, {"w": "engineering.", "b": [0.5118, 0.4663, 0.6083, 0.4813]}]}, {"id": "b_6", "type": "paragraph", "text": "4.10.2 Solution", "words": [{"w": "4.10.2", "b": [0.1312, 0.5145, 0.1855, 0.5294]}, {"w": "Solution", "b": [0.2067, 0.5145, 0.2833, 0.5294]}]}, {"id": "b_7", "type": "paragraph", "text": "A solution, as you might have guessed, is first to split the entire dataset into training and holdout sets, and only do feature engineering on the training data. This also applies when you use mean encoding to transform a categorical feature to a number: split the data first and then compute the sample mean of the label, based on the training data only.", "words": [{"w": "A", "b": [0.1305, 0.5508, 0.1446, 0.5657]}, {"w": "solution,", "b": [0.1508, 0.5508, 0.221, 0.5657]}, {"w": "as", "b": [0.2272, 0.5508, 0.244, 0.5657]}, {"w": "you", "b": [0.2502, 0.5508, 0.2795, 0.5657]}, {"w": "might", "b": [0.2857, 0.5508, 0.3333, 0.5657]}, {"w": "have", "b": [0.3395, 0.5508, 0.3766, 0.5657]}, {"w": "guessed,", "b": [0.3828, 0.5508, 0.45, 0.5657]}, {"w": "is", "b": [0.4562, 0.5508, 0.4688, 0.5657]}, {"w": "first", "b": [0.475, 0.5508, 0.5076, 0.5657]}, {"w": "to", "b": [0.5138, 0.5508, 0.5305, 0.5657]}, {"w": "split", "b": [0.5367, 0.5508, 0.5724, 0.5657]}, {"w": "the", "b": [0.5786, 0.5508, 0.6047, 0.5657]}, {"w": "entire", "b": [0.6109, 0.5508, 0.6575, 0.5657]}, {"w": "dataset", "b": [0.6637, 0.5508, 0.7234, 0.5657]}, {"w": "into", "b": [0.7296, 0.5508, 0.7615, 0.5657]}, {"w": "training", "b": [0.7677, 0.5508, 0.8326, 0.5657]}, {"w": "and", "b": [0.8388, 0.5508, 0.8691, 0.5657]}, {"w": "holdout", "b": [0.1312, 0.5687, 0.1936, 0.5837]}, {"w": "sets,", "b": [0.1997, 0.5687, 0.2352, 0.5837]}, {"w": "and", "b": [0.2414, 0.5687, 0.2715, 0.5837]}, {"w": "only", "b": [0.2776, 0.5687, 0.3124, 0.5837]}, {"w": "do", "b": [0.3186, 0.5687, 0.3383, 0.5837]}, {"w": "feature", "b": [0.3444, 0.5687, 0.4011, 0.5837]}, {"w": "engineering", "b": [0.4072, 0.5687, 0.4998, 0.5837]}, {"w": "on", "b": [0.5059, 0.5687, 0.5256, 0.5837]}, {"w": "the", "b": [0.5318, 0.5687, 0.5577, 0.5837]}, {"w": "training", "b": [0.5639, 0.5687, 0.6283, 0.5837]}, {"w": "data.", "b": [0.6345, 0.5687, 0.676, 0.5837]}, {"w": "This", "b": [0.6842, 0.5687, 0.7207, 0.5837]}, {"w": "also", "b": [0.7268, 0.5687, 0.7581, 0.5837]}, {"w": "applies", "b": [0.7642, 0.5687, 0.8204, 0.5837]}, {"w": "when", "b": [0.8265, 0.5687, 0.8691, 0.5837]}, {"w": "you", "b": [0.1308, 0.5867, 0.1589, 0.6016]}, {"w": "use", "b": [0.1651, 0.5867, 0.1904, 0.6016]}, {"w": "mean", "b": [0.1965, 0.587, 0.246, 0.6019]}, {"w": "encoding", "b": [0.253, 0.587, 0.3353, 0.6019]}, {"w": "to", "b": [0.3416, 0.5867, 0.3577, 0.6016]}, {"w": "transform", "b": [0.3638, 0.5867, 0.4411, 0.6016]}, {"w": "a", "b": [0.4472, 0.5867, 0.4563, 0.6016]}, {"w": "categorical", "b": [0.4624, 0.5867, 0.5471, 0.6016]}, {"w": "feature", "b": [0.5532, 0.5867, 0.6081, 0.6016]}, {"w": "to", "b": [0.6143, 0.5867, 0.6304, 0.6016]}, {"w": "a", "b": [0.6365, 0.5867, 0.6456, 0.6016]}, {"w": "number:", "b": [0.6517, 0.5867, 0.7167, 0.6016]}, {"w": "split", "b": [0.7249, 0.5867, 0.7593, 0.6016]}, {"w": "the", "b": [0.7654, 0.5867, 0.7906, 0.6016]}, {"w": "data", "b": [0.7967, 0.5867, 0.832, 0.6016]}, {"w": "first", "b": [0.8381, 0.5867, 0.8695, 0.6016]}, {"w": "and", "b": [0.1312, 0.6046, 0.161, 0.6196]}, {"w": "then", "b": [0.1671, 0.6046, 0.203, 0.6196]}, {"w": "compute", "b": [0.2092, 0.6046, 0.2779, 0.6196]}, {"w": "the", "b": [0.284, 0.6046, 0.3097, 0.6196]}, {"w": "sample", "b": [0.3158, 0.6046, 0.3713, 0.6196]}, {"w": "mean", "b": [0.3774, 0.6046, 0.4205, 0.6196]}, {"w": "of", "b": [0.4266, 0.6046, 0.4415, 0.6196]}, {"w": "the", "b": [0.4477, 0.6046, 0.4733, 0.6196]}, {"w": "label,", "b": [0.4795, 0.6046, 0.523, 0.6196]}, {"w": "based", "b": [0.5292, 0.6046, 0.5744, 0.6196]}, {"w": "on", "b": [0.5806, 0.6046, 0.6001, 0.6196]}, {"w": "the", "b": [0.6062, 0.6046, 0.6319, 0.6196]}, {"w": "training", "b": [0.638, 0.6046, 0.7016, 0.6196]}, {"w": "data", "b": [0.7078, 0.6046, 0.7437, 0.6196]}, {"w": "only.", "b": [0.7498, 0.6046, 0.7878, 0.6196]}]}, {"id": "b_8", "type": "paragraph", "text": "4.11 Storing and Documenting Features", "words": [{"w": "4.11", "b": [0.1312, 0.6534, 0.1756, 0.6714]}, {"w": "Storing", "b": [0.2005, 0.6534, 0.2799, 0.6714]}, {"w": "and", "b": [0.2882, 0.6534, 0.328, 0.6714]}, {"w": "Documenting", "b": [0.3363, 0.6534, 0.4816, 0.6714]}, {"w": "Features", "b": [0.4899, 0.6534, 0.5819, 0.6714]}]}, {"id": "b_9", "type": "paragraph", "text": "Even if you plan to train the model right after you finish engineering features, it’s advised to design a schema file that provides a description of the features’ expected properties.", "words": [{"w": "Even", "b": [0.1312, 0.692, 0.1707, 0.707]}, {"w": "if", "b": [0.1768, 0.692, 0.1874, 0.707]}, {"w": "you", "b": [0.1935, 0.692, 0.2216, 0.707]}, {"w": "plan", "b": [0.2277, 0.692, 0.2619, 0.707]}, {"w": "to", "b": [0.268, 0.692, 0.284, 0.707]}, {"w": "train", "b": [0.2902, 0.692, 0.3284, 0.707]}, {"w": "the", "b": [0.3345, 0.692, 0.3596, 0.707]}, {"w": "model", "b": [0.3658, 0.692, 0.4135, 0.707]}, {"w": "right", "b": [0.4196, 0.692, 0.4573, 0.707]}, {"w": "after", "b": [0.4635, 0.692, 0.5002, 0.707]}, {"w": "you", "b": [0.5063, 0.692, 0.5344, 0.707]}, {"w": "finish", "b": [0.5405, 0.692, 0.5829, 0.707]}, {"w": "engineering", "b": [0.589, 0.692, 0.6785, 0.707]}, {"w": "features,", "b": [0.6846, 0.692, 0.7516, 0.707]}, {"w": "it’s", "b": [0.7577, 0.692, 0.7819, 0.707]}, {"w": "advised", "b": [0.7881, 0.692, 0.847, 0.707]}, {"w": "to", "b": [0.8531, 0.692, 0.8691, 0.707]}, {"w": "design", "b": [0.1312, 0.71, 0.1816, 0.7249]}, {"w": "a", "b": [0.1877, 0.71, 0.197, 0.7249]}, {"w": "schema", "b": [0.2033, 0.7103, 0.27, 0.7252]}, {"w": "file", "b": [0.2771, 0.7103, 0.3045, 0.7252]}, {"w": "that", "b": [0.3106, 0.71, 0.3445, 0.7249]}, {"w": "provides", "b": [0.3506, 0.71, 0.4174, 0.7249]}, {"w": "a", "b": [0.4236, 0.71, 0.4328, 0.7249]}, {"w": "description", "b": [0.439, 0.71, 0.5273, 0.7249]}, {"w": "of", "b": [0.5335, 0.71, 0.5483, 0.7249]}, {"w": "the", "b": [0.5545, 0.71, 0.5801, 0.7249]}, {"w": "features’", "b": [0.5863, 0.71, 0.6546, 0.7249]}, {"w": "expected", "b": [0.6608, 0.71, 0.7316, 0.7249]}, {"w": "properties.", "b": [0.7377, 0.71, 0.8236, 0.7249]}]}, {"id": "b_10", "type": "paragraph", "text": "4.11.1 Schema File", "words": [{"w": "4.11.1", "b": [0.1312, 0.7581, 0.1855, 0.7731]}, {"w": "Schema", "b": [0.2067, 0.7581, 0.2768, 0.7731]}, {"w": "File", "b": [0.2839, 0.7581, 0.3188, 0.7731]}]}, {"id": "b_11", "type": "paragraph", "text": "A schema file is a document that describes features. This file is machine-readable, versioned, and updated each time someone makes significant updates to features. Here are several examples of the properties that can be encoded in the schema:", "words": [{"w": "A", "b": [0.1305, 0.7944, 0.1442, 0.8093]}, {"w": "schema", "b": [0.1503, 0.7944, 0.2076, 0.8093]}, {"w": "file", "b": [0.2137, 0.7944, 0.237, 0.8093]}, {"w": "is", "b": [0.2431, 0.7944, 0.2554, 0.8093]}, {"w": "a", "b": [0.2615, 0.7944, 0.2706, 0.8093]}, {"w": "document", "b": [0.2768, 0.7944, 0.3547, 0.8093]}, {"w": "that", "b": [0.3608, 0.7944, 0.3942, 0.8093]}, {"w": "describes", "b": [0.4003, 0.7944, 0.472, 0.8093]}, {"w": "features.", "b": [0.4781, 0.7944, 0.5456, 0.8093]}, {"w": "This", "b": [0.5538, 0.7944, 0.5893, 0.8093]}, {"w": "file", "b": [0.5954, 0.7944, 0.6187, 0.8093]}, {"w": "is", "b": [0.6248, 0.7944, 0.6371, 0.8093]}, {"w": "machine-readable,", "b": [0.6432, 0.7944, 0.7865, 0.8093]}, {"w": "versioned,", "b": [0.7926, 0.7944, 0.8717, 0.8093]}, {"w": "and", "b": [0.1312, 0.8123, 0.1616, 0.8273]}, {"w": "updated", "b": [0.1691, 0.8123, 0.2365, 0.8273]}, {"w": "each", "b": [0.244, 0.8123, 0.2801, 0.8273]}, {"w": "time", "b": [0.2876, 0.8123, 0.3242, 0.8273]}, {"w": "someone", "b": [0.3317, 0.8123, 0.4009, 0.8273]}, {"w": "makes", "b": [0.4084, 0.8123, 0.4587, 0.8273]}, {"w": "significant", "b": [0.4662, 0.8123, 0.5495, 0.8273]}, {"w": "updates", "b": [0.557, 0.8123, 0.6214, 0.8273]}, {"w": "to", "b": [0.6289, 0.8123, 0.6456, 0.8273]}, {"w": "features.", "b": [0.6531, 0.8123, 0.7229, 0.8273]}, {"w": "Here", "b": [0.7351, 0.8123, 0.7733, 0.8273]}, {"w": "are", "b": [0.7809, 0.8123, 0.806, 0.8273]}, {"w": "several", "b": [0.8135, 0.8123, 0.8691, 0.8273]}, {"w": "examples", "b": [0.1312, 0.8303, 0.2047, 0.8452]}, {"w": "of", "b": [0.2108, 0.8303, 0.2257, 0.8452]}, {"w": "the", "b": [0.2318, 0.8303, 0.2575, 0.8452]}, {"w": "properties", "b": [0.2636, 0.8303, 0.3443, 0.8452]}, {"w": "that", "b": [0.3505, 0.8303, 0.3843, 0.8452]}, {"w": "can", "b": [0.3905, 0.8303, 0.4182, 0.8452]}, {"w": "be", "b": [0.4243, 0.8303, 0.4433, 0.8452]}, {"w": "encoded", "b": [0.4494, 0.8303, 0.5146, 0.8452]}, {"w": "in", "b": [0.5207, 0.8303, 0.5361, 0.8452]}, {"w": "the", "b": [0.5423, 0.8303, 0.5679, 0.8452]}, {"w": "schema:", "b": [0.5741, 0.8303, 0.6372, 0.8452]}]}, {"id": "b_12", "type": "paragraph", "text": "• names of features;", "words": [{"w": "•", "b": [0.1538, 0.8572, 0.1681, 0.8722]}, {"w": "names", "b": [0.1774, 0.8572, 0.2277, 0.8722]}, {"w": "of", "b": [0.2338, 0.8572, 0.2487, 0.8722]}, {"w": "features;", "b": [0.2549, 0.8572, 0.3232, 0.8722]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 40", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "40", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 130, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• for each feature:", "words": [{"w": "•", "b": [0.1538, 0.0881, 0.1681, 0.1031]}, {"w": "for", "b": [0.1774, 0.0881, 0.1995, 0.1031]}, {"w": "each", "b": [0.2056, 0.0881, 0.241, 0.1031]}, {"w": "feature:", "b": [0.2472, 0.0881, 0.3082, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "– its type (categorical, numerical), – the fraction of examples that are expected to have that feature present, – minimum and maximum values, – sample mean and variance, – whether it allows zeros, – whether it allows undefined values.", "words": [{"w": "–", "b": [0.1981, 0.1138, 0.2087, 0.1288]}, {"w": "its", "b": [0.2179, 0.1135, 0.2375, 0.1285]}, {"w": "type", "b": [0.2437, 0.1135, 0.2791, 0.1285]}, {"w": "(categorical,", "b": [0.2852, 0.1135, 0.3837, 0.1285]}, {"w": "numerical),", "b": [0.3899, 0.1135, 0.4807, 0.1285]}, {"w": "–", "b": [0.1981, 0.1318, 0.2087, 0.1467]}, {"w": "the", "b": [0.2179, 0.1315, 0.2436, 0.1464]}, {"w": "fraction", "b": [0.2497, 0.1315, 0.3118, 0.1464]}, {"w": "of", "b": [0.318, 0.1315, 0.3328, 0.1464]}, {"w": "examples", "b": [0.339, 0.1315, 0.4124, 0.1464]}, {"w": "that", "b": [0.4186, 0.1315, 0.4524, 0.1464]}, {"w": "are", "b": [0.4586, 0.1315, 0.4832, 0.1464]}, {"w": "expected", "b": [0.4894, 0.1315, 0.5602, 0.1464]}, {"w": "to", "b": [0.5663, 0.1315, 0.5827, 0.1464]}, {"w": "have", "b": [0.5889, 0.1315, 0.6253, 0.1464]}, {"w": "that", "b": [0.6314, 0.1315, 0.6652, 0.1464]}, {"w": "feature", "b": [0.6714, 0.1315, 0.7273, 0.1464]}, {"w": "present,", "b": [0.7335, 0.1315, 0.7968, 0.1464]}, {"w": "–", "b": [0.1981, 0.1497, 0.2087, 0.1647]}, {"w": "minimum", "b": [0.2179, 0.1494, 0.2943, 0.1644]}, {"w": "and", "b": [0.3005, 0.1494, 0.3302, 0.1644]}, {"w": "maximum", "b": [0.3364, 0.1494, 0.4163, 0.1644]}, {"w": "values,", "b": [0.4224, 0.1494, 0.4764, 0.1644]}, {"w": "–", "b": [0.1981, 0.1677, 0.2087, 0.1826]}, {"w": "sample", "b": [0.2179, 0.1674, 0.2734, 0.1823]}, {"w": "mean", "b": [0.2796, 0.1674, 0.3226, 0.1823]}, {"w": "and", "b": [0.3288, 0.1674, 0.3585, 0.1823]}, {"w": "variance,", "b": [0.3647, 0.1674, 0.436, 0.1823]}, {"w": "–", "b": [0.1981, 0.1856, 0.2087, 0.2006]}, {"w": "whether", "b": [0.2179, 0.1853, 0.2826, 0.2003]}, {"w": "it", "b": [0.2888, 0.1853, 0.3011, 0.2003]}, {"w": "allows", "b": [0.3072, 0.1853, 0.356, 0.2003]}, {"w": "zeros,", "b": [0.3622, 0.1853, 0.4075, 0.2003]}, {"w": "–", "b": [0.1981, 0.2036, 0.2087, 0.2185]}, {"w": "whether", "b": [0.2179, 0.2033, 0.2826, 0.2182]}, {"w": "it", "b": [0.2888, 0.2033, 0.3011, 0.2182]}, {"w": "allows", "b": [0.3072, 0.2033, 0.356, 0.2182]}, {"w": "undefined", "b": [0.3622, 0.2033, 0.4401, 0.2182]}, {"w": "values.", "b": [0.4463, 0.2033, 0.5002, 0.2182]}]}, {"id": "b_2", "type": "equation", "text": "An example of a schema file for a four-dimensional dataset is shown below:", "words": [{"w": "An", "b": [0.1305, 0.2302, 0.1546, 0.2451]}, {"w": "example", "b": [0.1608, 0.2302, 0.2269, 0.2451]}, {"w": "of", "b": [0.2331, 0.2302, 0.2479, 0.2451]}, {"w": "a", "b": [0.2541, 0.2302, 0.2633, 0.2451]}, {"w": "schema", "b": [0.2695, 0.2302, 0.3275, 0.2451]}, {"w": "file", "b": [0.3336, 0.2302, 0.3572, 0.2451]}, {"w": "for", "b": [0.3634, 0.2302, 0.3855, 0.2451]}, {"w": "a", "b": [0.3916, 0.2302, 0.4009, 0.2451]}, {"w": "four-dimensional", "b": [0.407, 0.2302, 0.541, 0.2451]}, {"w": "dataset", "b": [0.5471, 0.2302, 0.6057, 0.2451]}, {"w": "is", "b": [0.6118, 0.2302, 0.6243, 0.2451]}, {"w": "shown", "b": [0.6304, 0.2302, 0.6802, 0.2451]}, {"w": "below:", "b": [0.6864, 0.2302, 0.7377, 0.2451]}]}, {"id": "b_3", "type": "equation", "text": "1 feature {", "words": [{"w": "1", "b": [0.1028, 0.2632, 0.1091, 0.2707]}, {"w": "feature", "b": [0.1312, 0.2581, 0.199, 0.273]}, {"w": "{", "b": [0.2087, 0.2582, 0.2184, 0.2731]}]}, {"id": "b_4", "type": "paragraph", "text": "2 name : \"height\"", "words": [{"w": "2", "b": [0.1028, 0.2812, 0.1091, 0.2887]}, {"w": "name", "b": [0.17, 0.276, 0.2087, 0.291]}, {"w": ":", "b": [0.2184, 0.2761, 0.2281, 0.2911]}, {"w": "\"height\"", "b": [0.2378, 0.2761, 0.3153, 0.2911]}]}, {"id": "b_5", "type": "paragraph", "text": "3 type : float", "words": [{"w": "3", "b": [0.1028, 0.2991, 0.1091, 0.3066]}, {"w": "type", "b": [0.17, 0.294, 0.2087, 0.3089]}, {"w": ":", "b": [0.2184, 0.294, 0.2281, 0.3089]}, {"w": "float", "b": [0.2378, 0.294, 0.2862, 0.3089]}]}, {"id": "b_6", "type": "paragraph", "text": "4 min : 50.0", "words": [{"w": "4", "b": [0.1028, 0.3171, 0.1091, 0.3245]}, {"w": "min", "b": [0.17, 0.3119, 0.199, 0.3269]}, {"w": ":", "b": [0.2087, 0.3119, 0.2184, 0.3269]}, {"w": "50.0", "b": [0.2281, 0.312, 0.2668, 0.3269]}]}, {"id": "b_7", "type": "paragraph", "text": "5 max : 300.0", "words": [{"w": "5", "b": [0.1028, 0.335, 0.1091, 0.3425]}, {"w": "max", "b": [0.17, 0.3299, 0.199, 0.3448]}, {"w": ":", "b": [0.2087, 0.3299, 0.2184, 0.3448]}, {"w": "300.0", "b": [0.2281, 0.3299, 0.2765, 0.3449]}]}, {"id": "b_8", "type": "paragraph", "text": "6 mean : 160.0", "words": [{"w": "6", "b": [0.1028, 0.353, 0.1091, 0.3604]}, {"w": "mean", "b": [0.17, 0.3478, 0.2087, 0.3628]}, {"w": ":", "b": [0.2184, 0.3478, 0.2281, 0.3628]}, {"w": "160.0", "b": [0.2378, 0.3479, 0.2862, 0.3628]}]}, {"id": "b_9", "type": "paragraph", "text": "7 variance : 17.0", "words": [{"w": "7", "b": [0.1028, 0.3709, 0.1091, 0.3784]}, {"w": "variance", "b": [0.17, 0.3658, 0.2475, 0.3807]}, {"w": ":", "b": [0.2572, 0.3658, 0.2668, 0.3807]}, {"w": "17.0", "b": [0.2765, 0.3658, 0.3153, 0.3808]}]}, {"id": "b_10", "type": "paragraph", "text": "8 zeroes : false", "words": [{"w": "8", "b": [0.1028, 0.3889, 0.1091, 0.3963]}, {"w": "zeroes", "b": [0.17, 0.3837, 0.2281, 0.3987]}, {"w": ":", "b": [0.2378, 0.3837, 0.2475, 0.3987]}, {"w": "false", "b": [0.2572, 0.3837, 0.3056, 0.3987]}]}, {"id": "b_11", "type": "paragraph", "text": "9 undefined : false", "words": [{"w": "9", "b": [0.1028, 0.4068, 0.1091, 0.4143]}, {"w": "undefined", "b": [0.17, 0.4017, 0.2572, 0.4166]}, {"w": ":", "b": [0.2668, 0.4017, 0.2765, 0.4166]}, {"w": "false", "b": [0.2862, 0.4017, 0.3346, 0.4166]}]}, {"id": "b_12", "type": "paragraph", "text": "10 popularity : 1.0", "words": [{"w": "10", "b": [0.0965, 0.4247, 0.1091, 0.4322]}, {"w": "popularity", "b": [0.17, 0.4196, 0.2668, 0.4346]}, {"w": ":", "b": [0.2765, 0.4196, 0.2862, 0.4346]}, {"w": "1.0", "b": [0.2959, 0.4197, 0.325, 0.4346]}]}, {"id": "b_13", "type": "equation", "text": "11 }", "words": [{"w": "11", "b": [0.0965, 0.4427, 0.1091, 0.4502]}, {"w": "}", "b": [0.1312, 0.4376, 0.1409, 0.4526]}]}, {"id": "b_15", "type": "equation", "text": "13 feature {", "words": [{"w": "13", "b": [0.0965, 0.4786, 0.1091, 0.4861]}, {"w": "feature", "b": [0.1312, 0.4734, 0.199, 0.4884]}, {"w": "{", "b": [0.2087, 0.4735, 0.2184, 0.4885]}]}, {"id": "b_16", "type": "equation", "text": "14 name : \"color_red\"", "words": [{"w": "14", "b": [0.0965, 0.4965, 0.1091, 0.504]}, {"w": "name", "b": [0.17, 0.4914, 0.2087, 0.5063]}, {"w": ":", "b": [0.2184, 0.4915, 0.2281, 0.5064]}, {"w": "\"color_red\"", "b": [0.2378, 0.4915, 0.3443, 0.5064]}]}, {"id": "b_17", "type": "paragraph", "text": "15 type : binary", "words": [{"w": "15", "b": [0.0965, 0.5145, 0.1091, 0.522]}, {"w": "type", "b": [0.17, 0.5093, 0.2087, 0.5243]}, {"w": ":", "b": [0.2184, 0.5093, 0.2281, 0.5243]}, {"w": "binary", "b": [0.2378, 0.5093, 0.2959, 0.5243]}]}, {"id": "b_18", "type": "paragraph", "text": "16 zeroes : true", "words": [{"w": "16", "b": [0.0965, 0.5324, 0.1091, 0.5399]}, {"w": "zeroes", "b": [0.17, 0.5273, 0.2281, 0.5422]}, {"w": ":", "b": [0.2378, 0.5273, 0.2475, 0.5422]}, {"w": "true", "b": [0.2572, 0.5273, 0.2959, 0.5422]}]}, {"id": "b_19", "type": "paragraph", "text": "17 undefined : false", "words": [{"w": "17", "b": [0.0965, 0.5504, 0.1091, 0.5579]}, {"w": "undefined", "b": [0.17, 0.5452, 0.2572, 0.5602]}, {"w": ":", "b": [0.2668, 0.5452, 0.2765, 0.5602]}, {"w": "false", "b": [0.2862, 0.5452, 0.3346, 0.5602]}]}, {"id": "b_20", "type": "paragraph", "text": "18 popularity : 0.76", "words": [{"w": "18", "b": [0.0965, 0.5683, 0.1091, 0.5758]}, {"w": "popularity", "b": [0.17, 0.5632, 0.2668, 0.5781]}, {"w": ":", "b": [0.2765, 0.5632, 0.2862, 0.5781]}, {"w": "0.76", "b": [0.2959, 0.5632, 0.3346, 0.5782]}]}, {"id": "b_21", "type": "equation", "text": "19 }", "words": [{"w": "19", "b": [0.0965, 0.5863, 0.1091, 0.5937]}, {"w": "}", "b": [0.1312, 0.5812, 0.1409, 0.5962]}]}, {"id": "b_23", "type": "equation", "text": "21 feature {", "words": [{"w": "21", "b": [0.0965, 0.6222, 0.1091, 0.6296]}, {"w": "feature", "b": [0.1312, 0.617, 0.199, 0.632]}, {"w": "{", "b": [0.2087, 0.6171, 0.2184, 0.632]}]}, {"id": "b_24", "type": "equation", "text": "22 name : \"color_green\"", "words": [{"w": "22", "b": [0.0965, 0.6401, 0.1091, 0.6476]}, {"w": "name", "b": [0.17, 0.635, 0.2087, 0.6499]}, {"w": ":", "b": [0.2184, 0.635, 0.2281, 0.65]}, {"w": "\"color_green\"", "b": [0.2378, 0.635, 0.3637, 0.65]}]}, {"id": "b_25", "type": "paragraph", "text": "23 type : binary", "words": [{"w": "23", "b": [0.0965, 0.6581, 0.1091, 0.6655]}, {"w": "type", "b": [0.17, 0.6529, 0.2087, 0.6679]}, {"w": ":", "b": [0.2184, 0.6529, 0.2281, 0.6679]}, {"w": "binary", "b": [0.2378, 0.6529, 0.2959, 0.6679]}]}, {"id": "b_26", "type": "paragraph", "text": "24 zeroes : true", "words": [{"w": "24", "b": [0.0965, 0.676, 0.1091, 0.6835]}, {"w": "zeroes", "b": [0.17, 0.6709, 0.2281, 0.6858]}, {"w": ":", "b": [0.2378, 0.6709, 0.2475, 0.6858]}, {"w": "true", "b": [0.2572, 0.6709, 0.2959, 0.6858]}]}, {"id": "b_27", "type": "paragraph", "text": "25 undefined : false", "words": [{"w": "25", "b": [0.0965, 0.694, 0.1091, 0.7014]}, {"w": "undefined", "b": [0.17, 0.6888, 0.2572, 0.7038]}, {"w": ":", "b": [0.2668, 0.6888, 0.2765, 0.7038]}, {"w": "false", "b": [0.2862, 0.6888, 0.3346, 0.7038]}]}, {"id": "b_28", "type": "paragraph", "text": "26 popularity : 0.65", "words": [{"w": "26", "b": [0.0965, 0.7119, 0.1091, 0.7194]}, {"w": "popularity", "b": [0.17, 0.7068, 0.2668, 0.7217]}, {"w": ":", "b": [0.2765, 0.7068, 0.2862, 0.7217]}, {"w": "0.65", "b": [0.2959, 0.7068, 0.3346, 0.7218]}]}, {"id": "b_29", "type": "equation", "text": "27 }", "words": [{"w": "27", "b": [0.0965, 0.7298, 0.1091, 0.7373]}, {"w": "}", "b": [0.1312, 0.7248, 0.1409, 0.7397]}]}, {"id": "b_31", "type": "equation", "text": "29 feature {", "words": [{"w": "29", "b": [0.0965, 0.7657, 0.1091, 0.7732]}, {"w": "feature", "b": [0.1312, 0.7606, 0.199, 0.7755]}, {"w": "{", "b": [0.2087, 0.7607, 0.2184, 0.7756]}]}, {"id": "b_32", "type": "equation", "text": "30 name : \"color_blue\"", "words": [{"w": "30", "b": [0.0965, 0.7837, 0.1091, 0.7912]}, {"w": "name", "b": [0.17, 0.7785, 0.2087, 0.7935]}, {"w": ":", "b": [0.2184, 0.7786, 0.2281, 0.7936]}, {"w": "\"color_blue\"", "b": [0.2378, 0.7786, 0.354, 0.7936]}]}, {"id": "b_33", "type": "paragraph", "text": "31 type : binary", "words": [{"w": "31", "b": [0.0965, 0.8016, 0.1091, 0.8091]}, {"w": "type", "b": [0.17, 0.7965, 0.2087, 0.8114]}, {"w": ":", "b": [0.2184, 0.7965, 0.2281, 0.8114]}, {"w": "binary", "b": [0.2378, 0.7965, 0.2959, 0.8114]}]}, {"id": "b_34", "type": "paragraph", "text": "32 zeroes : true", "words": [{"w": "32", "b": [0.0965, 0.8196, 0.1091, 0.8271]}, {"w": "zeroes", "b": [0.17, 0.8144, 0.2281, 0.8294]}, {"w": ":", "b": [0.2378, 0.8144, 0.2475, 0.8294]}, {"w": "true", "b": [0.2572, 0.8144, 0.2959, 0.8294]}]}, {"id": "b_35", "type": "paragraph", "text": "33 undefined : false", "words": [{"w": "33", "b": [0.0965, 0.8375, 0.1091, 0.845]}, {"w": "undefined", "b": [0.17, 0.8324, 0.2572, 0.8473]}, {"w": ":", "b": [0.2668, 0.8324, 0.2765, 0.8473]}, {"w": "false", "b": [0.2862, 0.8324, 0.3346, 0.8473]}]}, {"id": "b_36", "type": "paragraph", "text": "34 popularity : 0.81", "words": [{"w": "34", "b": [0.0965, 0.8555, 0.1091, 0.863]}, {"w": "popularity", "b": [0.17, 0.8503, 0.2668, 0.8653]}, {"w": ":", "b": [0.2765, 0.8503, 0.2862, 0.8653]}, {"w": "0.81", "b": [0.2959, 0.8504, 0.3346, 0.8654]}]}, {"id": "b_37", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 41", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "41", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 131, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "35 }", "words": [{"w": "35", "b": [0.0965, 0.0942, 0.1091, 0.1017]}, {"w": "}", "b": [0.1312, 0.0892, 0.1409, 0.1041]}]}, {"id": "b_1", "type": "paragraph", "text": "4.11.2 Feature Store", "words": [{"w": "4.11.2", "b": [0.1312, 0.1363, 0.1855, 0.1512]}, {"w": "Feature", "b": [0.2067, 0.1363, 0.2768, 0.1512]}, {"w": "Store", "b": [0.2839, 0.1363, 0.333, 0.1512]}]}, {"id": "b_2", "type": "paragraph", "text": "Large and distributed organizations may use a feature store that allows keeping, document- ing, reusing, and sharing features across multiple data science teams and projects. The ways features are maintained and served can differ significantly across projects and teams. This introduces infrastructure complexity and often results in duplicated work. Large distributed organizations face some of these challenges:", "words": [{"w": "Large", "b": [0.1312, 0.1725, 0.1757, 0.1875]}, {"w": "and", "b": [0.1814, 0.1725, 0.2106, 0.1875]}, {"w": "distributed", "b": [0.2162, 0.1725, 0.3028, 0.1875]}, {"w": "organizations", "b": [0.3085, 0.1725, 0.4131, 0.1875]}, {"w": "may", "b": [0.4188, 0.1725, 0.4519, 0.1875]}, {"w": "use", "b": [0.4576, 0.1725, 0.4829, 0.1875]}, {"w": "a", "b": [0.4885, 0.1725, 0.4976, 0.1875]}, {"w": "feature", "b": [0.5033, 0.1728, 0.5683, 0.1878]}, {"w": "store", "b": [0.5748, 0.1728, 0.6205, 0.1878]}, {"w": "that", "b": [0.6262, 0.1725, 0.6593, 0.1875]}, {"w": "allows", "b": [0.665, 0.1725, 0.7128, 0.1875]}, {"w": "keeping,", "b": [0.7185, 0.1725, 0.7828, 0.1875]}, {"w": "document-", "b": [0.7885, 0.1725, 0.8719, 0.1875]}, {"w": "ing,", "b": [0.1312, 0.1905, 0.1605, 0.2054]}, {"w": "reusing,", "b": [0.1667, 0.1905, 0.2284, 0.2054]}, {"w": "and", "b": [0.2346, 0.1905, 0.2638, 0.2054]}, {"w": "sharing", "b": [0.27, 0.1905, 0.3277, 0.2054]}, {"w": "features", "b": [0.3339, 0.1905, 0.3961, 0.2054]}, {"w": "across", "b": [0.4022, 0.1905, 0.4499, 0.2054]}, {"w": "multiple", "b": [0.4561, 0.1905, 0.5212, 0.2054]}, {"w": "data", "b": [0.5274, 0.1905, 0.5627, 0.2054]}, {"w": "science", "b": [0.5688, 0.1905, 0.6234, 0.2054]}, {"w": "teams", "b": [0.6296, 0.1905, 0.6761, 0.2054]}, {"w": "and", "b": [0.6823, 0.1905, 0.7116, 0.2054]}, {"w": "projects.", "b": [0.7177, 0.1905, 0.7855, 0.2054]}, {"w": "The", "b": [0.7938, 0.1905, 0.8251, 0.2054]}, {"w": "ways", "b": [0.8312, 0.1905, 0.8692, 0.2054]}, {"w": "features", "b": [0.1312, 0.2084, 0.1953, 0.2234]}, {"w": "are", "b": [0.2014, 0.2084, 0.2264, 0.2234]}, {"w": "maintained", "b": [0.2325, 0.2084, 0.3234, 0.2234]}, {"w": "and", "b": [0.3295, 0.2084, 0.3597, 0.2234]}, {"w": "served", "b": [0.3658, 0.2084, 0.4169, 0.2234]}, {"w": "can", "b": [0.423, 0.2084, 0.451, 0.2234]}, {"w": "differ", "b": [0.4572, 0.2084, 0.4993, 0.2234]}, {"w": "significantly", "b": [0.5054, 0.2084, 0.6032, 0.2234]}, {"w": "across", "b": [0.6093, 0.2084, 0.6584, 0.2234]}, {"w": "projects", "b": [0.6645, 0.2084, 0.7291, 0.2234]}, {"w": "and", "b": [0.7352, 0.2084, 0.7653, 0.2234]}, {"w": "teams.", "b": [0.7714, 0.2084, 0.8245, 0.2234]}, {"w": "This", "b": [0.8327, 0.2084, 0.8692, 0.2234]}, {"w": "introduces", "b": [0.1312, 0.2264, 0.2136, 0.2413]}, {"w": "infrastructure", "b": [0.2197, 0.2264, 0.329, 0.2413]}, {"w": "complexity", "b": [0.3352, 0.2264, 0.4219, 0.2413]}, {"w": "and", "b": [0.4281, 0.2264, 0.4575, 0.2413]}, {"w": "often", "b": [0.4637, 0.2264, 0.5037, 0.2413]}, {"w": "results", "b": [0.5099, 0.2264, 0.5619, 0.2413]}, {"w": "in", "b": [0.5681, 0.2264, 0.5833, 0.2413]}, {"w": "duplicated", "b": [0.5895, 0.2264, 0.6726, 0.2413]}, {"w": "work.", "b": [0.6788, 0.2264, 0.7224, 0.2413]}, {"w": "Large", "b": [0.7307, 0.2264, 0.7756, 0.2413]}, {"w": "distributed", "b": [0.7818, 0.2264, 0.8692, 0.2413]}, {"w": "organizations", "b": [0.1312, 0.2443, 0.238, 0.2593]}, {"w": "face", "b": [0.2442, 0.2443, 0.2755, 0.2593]}, {"w": "some", "b": [0.2816, 0.2443, 0.3217, 0.2593]}, {"w": "of", "b": [0.3279, 0.2443, 0.3427, 0.2593]}, {"w": "these", "b": [0.3489, 0.2443, 0.39, 0.2593]}, {"w": "challenges:", "b": [0.3962, 0.2443, 0.4819, 0.2593]}]}, {"id": "b_3", "type": "paragraph", "text": "Features not being reused", "words": [{"w": "Features", "b": [0.1312, 0.2715, 0.2097, 0.2865]}, {"w": "not", "b": [0.2168, 0.2715, 0.2475, 0.2865]}, {"w": "being", "b": [0.2545, 0.2715, 0.3049, 0.2865]}, {"w": "reused", "b": [0.312, 0.2715, 0.3721, 0.2865]}]}, {"id": "b_4", "type": "paragraph", "text": "Features representing the same attribute of an entity are being implemented several times by different engineers and teams, when existing work from other teams and existing machine learning pipelines could have been reused.", "words": [{"w": "Features", "b": [0.1774, 0.2892, 0.2469, 0.3041]}, {"w": "representing", "b": [0.2531, 0.2892, 0.3533, 0.3041]}, {"w": "the", "b": [0.3595, 0.2892, 0.3857, 0.3041]}, {"w": "same", "b": [0.3919, 0.2892, 0.4328, 0.3041]}, {"w": "attribute", "b": [0.4391, 0.2892, 0.5123, 0.3041]}, {"w": "of", "b": [0.5186, 0.2892, 0.5338, 0.3041]}, {"w": "an", "b": [0.54, 0.2892, 0.5599, 0.3041]}, {"w": "entity", "b": [0.5661, 0.2892, 0.6138, 0.3041]}, {"w": "are", "b": [0.62, 0.2892, 0.6452, 0.3041]}, {"w": "being", "b": [0.6514, 0.2892, 0.6959, 0.3041]}, {"w": "implemented", "b": [0.7021, 0.2892, 0.8073, 0.3041]}, {"w": "several", "b": [0.8135, 0.2892, 0.8691, 0.3041]}, {"w": "times", "b": [0.1774, 0.3071, 0.2214, 0.3221]}, {"w": "by", "b": [0.2292, 0.3071, 0.2491, 0.3221]}, {"w": "different", "b": [0.257, 0.3071, 0.325, 0.3221]}, {"w": "engineers", "b": [0.3329, 0.3071, 0.4084, 0.3221]}, {"w": "and", "b": [0.4162, 0.3071, 0.4466, 0.3221]}, {"w": "teams,", "b": [0.4544, 0.3071, 0.5079, 0.3221]}, {"w": "when", "b": [0.5162, 0.3071, 0.559, 0.3221]}, {"w": "existing", "b": [0.5669, 0.3071, 0.6303, 0.3221]}, {"w": "work", "b": [0.6381, 0.3071, 0.6779, 0.3221]}, {"w": "from", "b": [0.6858, 0.3071, 0.724, 0.3221]}, {"w": "other", "b": [0.7319, 0.3071, 0.7748, 0.3221]}, {"w": "teams", "b": [0.7827, 0.3071, 0.8309, 0.3221]}, {"w": "and", "b": [0.8387, 0.3071, 0.8691, 0.3221]}, {"w": "existing", "b": [0.1774, 0.3251, 0.2395, 0.34]}, {"w": "machine", "b": [0.2457, 0.3251, 0.3118, 0.34]}, {"w": "learning", "b": [0.3179, 0.3251, 0.3826, 0.34]}, {"w": "pipelines", "b": [0.3888, 0.3251, 0.4591, 0.34]}, {"w": "could", "b": [0.4653, 0.3251, 0.5084, 0.34]}, {"w": "have", "b": [0.5145, 0.3251, 0.5509, 0.34]}, {"w": "been", "b": [0.5571, 0.3251, 0.5945, 0.34]}, {"w": "reused.", "b": [0.6007, 0.3251, 0.6572, 0.34]}]}, {"id": "b_5", "type": "paragraph", "text": "Feature definitions vary", "words": [{"w": "Feature", "b": [0.1312, 0.3523, 0.2014, 0.3673]}, {"w": "definitions", "b": [0.2084, 0.3523, 0.3043, 0.3673]}, {"w": "vary", "b": [0.3114, 0.3523, 0.3517, 0.3673]}]}, {"id": "b_6", "type": "paragraph", "text": "Different teams define features differently, and it’s not always possible to access the documentation of a feature.", "words": [{"w": "Different", "b": [0.1774, 0.3699, 0.2493, 0.3849]}, {"w": "teams", "b": [0.2559, 0.3699, 0.3041, 0.3849]}, {"w": "define", "b": [0.3106, 0.3699, 0.3587, 0.3849]}, {"w": "features", "b": [0.3653, 0.3699, 0.4298, 0.3849]}, {"w": "differently,", "b": [0.4363, 0.3699, 0.5232, 0.3849]}, {"w": "and", "b": [0.5299, 0.3699, 0.5602, 0.3849]}, {"w": "it’s", "b": [0.5667, 0.3699, 0.5919, 0.3849]}, {"w": "not", "b": [0.5985, 0.3699, 0.6257, 0.3849]}, {"w": "always", "b": [0.6322, 0.3699, 0.6862, 0.3849]}, {"w": "possible", "b": [0.6927, 0.3699, 0.7573, 0.3849]}, {"w": "to", "b": [0.7638, 0.3699, 0.7805, 0.3849]}, {"w": "access", "b": [0.787, 0.3699, 0.8364, 0.3849]}, {"w": "the", "b": [0.843, 0.3699, 0.8691, 0.3849]}, {"w": "documentation", "b": [0.1774, 0.3879, 0.2973, 0.4028]}, {"w": "of", "b": [0.3035, 0.3879, 0.3183, 0.4028]}, {"w": "a", "b": [0.3245, 0.3879, 0.3337, 0.4028]}, {"w": "feature.", "b": [0.3399, 0.3879, 0.4009, 0.4028]}]}, {"id": "b_7", "type": "paragraph", "text": "Computationally intensive features", "words": [{"w": "Computationally", "b": [0.1312, 0.4151, 0.2869, 0.4301]}, {"w": "intensive", "b": [0.2939, 0.4151, 0.3754, 0.4301]}, {"w": "features", "b": [0.3825, 0.4151, 0.4558, 0.4301]}]}, {"id": "b_8", "type": "paragraph", "text": "Some real-time machine learning models aren’t based on informative but computationally intensive features. Having those features available in a fast store would allow using such features in real-time, and not only in batch mode.", "words": [{"w": "Some", "b": [0.1774, 0.4328, 0.2196, 0.4477]}, {"w": "real-time", "b": [0.2237, 0.4328, 0.2941, 0.4477]}, {"w": "machine", "b": [0.2983, 0.4328, 0.3631, 0.4477]}, {"w": "learning", "b": [0.3673, 0.4328, 0.4307, 0.4477]}, {"w": "models", "b": [0.4348, 0.4328, 0.4897, 0.4477]}, {"w": "aren’t", "b": [0.4939, 0.4328, 0.5402, 0.4477]}, {"w": "based", "b": [0.5444, 0.4328, 0.5887, 0.4477]}, {"w": "on", "b": [0.5929, 0.4328, 0.612, 0.4477]}, {"w": "informative", "b": [0.6161, 0.4328, 0.7061, 0.4477]}, {"w": "but", "b": [0.7103, 0.4328, 0.7374, 0.4477]}, {"w": "computationally", "b": [0.7416, 0.4328, 0.8697, 0.4477]}, {"w": "intensive", "b": [0.1774, 0.4507, 0.2491, 0.4657]}, {"w": "features.", "b": [0.2559, 0.4507, 0.3257, 0.4657]}, {"w": "Having", "b": [0.3357, 0.4507, 0.3938, 0.4657]}, {"w": "those", "b": [0.4006, 0.4507, 0.4436, 0.4657]}, {"w": "features", "b": [0.4503, 0.4507, 0.5148, 0.4657]}, {"w": "available", "b": [0.5216, 0.4507, 0.5928, 0.4657]}, {"w": "in", "b": [0.5995, 0.4507, 0.6152, 0.4657]}, {"w": "a", "b": [0.622, 0.4507, 0.6314, 0.4657]}, {"w": "fast", "b": [0.6382, 0.4507, 0.6681, 0.4657]}, {"w": "store", "b": [0.6749, 0.4507, 0.7148, 0.4657]}, {"w": "would", "b": [0.7216, 0.4507, 0.7702, 0.4657]}, {"w": "allow", "b": [0.777, 0.4507, 0.8193, 0.4657]}, {"w": "using", "b": [0.8261, 0.4507, 0.8691, 0.4657]}, {"w": "such", "b": [0.1774, 0.4686, 0.2129, 0.4836]}, {"w": "features", "b": [0.219, 0.4686, 0.2822, 0.4836]}, {"w": "in", "b": [0.2884, 0.4686, 0.3038, 0.4836]}, {"w": "real-time,", "b": [0.3099, 0.4686, 0.3869, 0.4836]}, {"w": "and", "b": [0.393, 0.4686, 0.4228, 0.4836]}, {"w": "not", "b": [0.4289, 0.4686, 0.4556, 0.4836]}, {"w": "only", "b": [0.4617, 0.4686, 0.4961, 0.4836]}, {"w": "in", "b": [0.5022, 0.4686, 0.5176, 0.4836]}, {"w": "batch", "b": [0.5238, 0.4686, 0.5684, 0.4836]}, {"w": "mode.", "b": [0.5745, 0.4686, 0.6232, 0.4836]}]}, {"id": "b_9", "type": "paragraph", "text": "Inconsistency between training and serving", "words": [{"w": "Inconsistency", "b": [0.1312, 0.4959, 0.2559, 0.5108]}, {"w": "between", "b": [0.263, 0.4959, 0.3387, 0.5108]}, {"w": "training", "b": [0.3458, 0.4959, 0.4191, 0.5108]}, {"w": "and", "b": [0.4262, 0.4959, 0.4601, 0.5108]}, {"w": "serving", "b": [0.4671, 0.4959, 0.5335, 0.5108]}]}, {"id": "b_10", "type": "paragraph", "text": "The model is usually trained using the historical data, but when served, is exposed to the real-time online data. The values of some features might depend on the entire historical dataset unavailable at the service time. For the model to work correctly, each feature must have the same value for the same input data entity, both in the offline (development) and online (production) mode.", "words": [{"w": "The", "b": [0.1767, 0.5135, 0.2091, 0.5285]}, {"w": "model", "b": [0.2159, 0.5135, 0.2656, 0.5285]}, {"w": "is", "b": [0.2724, 0.5135, 0.2851, 0.5285]}, {"w": "usually", "b": [0.2919, 0.5135, 0.3501, 0.5285]}, {"w": "trained", "b": [0.3569, 0.5135, 0.4155, 0.5285]}, {"w": "using", "b": [0.4223, 0.5135, 0.4653, 0.5285]}, {"w": "the", "b": [0.4722, 0.5135, 0.4983, 0.5285]}, {"w": "historical", "b": [0.5051, 0.5135, 0.5806, 0.5285]}, {"w": "data,", "b": [0.5874, 0.5135, 0.6293, 0.5285]}, {"w": "but", "b": [0.6363, 0.5135, 0.6645, 0.5285]}, {"w": "when", "b": [0.6713, 0.5135, 0.7142, 0.5285]}, {"w": "served,", "b": [0.721, 0.5135, 0.7777, 0.5285]}, {"w": "is", "b": [0.7847, 0.5135, 0.7974, 0.5285]}, {"w": "exposed", "b": [0.8042, 0.5135, 0.8691, 0.5285]}, {"w": "to", "b": [0.1774, 0.5315, 0.1939, 0.5464]}, {"w": "the", "b": [0.2001, 0.5315, 0.226, 0.5464]}, {"w": "real-time", "b": [0.2321, 0.5315, 0.3047, 0.5464]}, {"w": "online", "b": [0.3109, 0.5315, 0.3596, 0.5464]}, {"w": "data.", "b": [0.3657, 0.5315, 0.4072, 0.5464]}, {"w": "The", "b": [0.4154, 0.5315, 0.4475, 0.5464]}, {"w": "values", "b": [0.4536, 0.5315, 0.503, 0.5464]}, {"w": "of", "b": [0.5091, 0.5315, 0.5242, 0.5464]}, {"w": "some", "b": [0.5303, 0.5315, 0.5708, 0.5464]}, {"w": "features", "b": [0.5769, 0.5315, 0.6409, 0.5464]}, {"w": "might", "b": [0.647, 0.5315, 0.6942, 0.5464]}, {"w": "depend", "b": [0.7003, 0.5315, 0.7589, 0.5464]}, {"w": "on", "b": [0.765, 0.5315, 0.7847, 0.5464]}, {"w": "the", "b": [0.7908, 0.5315, 0.8168, 0.5464]}, {"w": "entire", "b": [0.8229, 0.5315, 0.8691, 0.5464]}, {"w": "historical", "b": [0.1774, 0.5494, 0.2499, 0.5644]}, {"w": "dataset", "b": [0.2557, 0.5494, 0.3131, 0.5644]}, {"w": "unavailable", "b": [0.319, 0.5494, 0.4074, 0.5644]}, {"w": "at", "b": [0.4132, 0.5494, 0.4293, 0.5644]}, {"w": "the", "b": [0.4352, 0.5494, 0.4603, 0.5644]}, {"w": "service", "b": [0.4662, 0.5494, 0.5191, 0.5644]}, {"w": "time.", "b": [0.5249, 0.5494, 0.5651, 0.5644]}, {"w": "For", "b": [0.5732, 0.5494, 0.5996, 0.5644]}, {"w": "the", "b": [0.6055, 0.5494, 0.6306, 0.5644]}, {"w": "model", "b": [0.6365, 0.5494, 0.6842, 0.5644]}, {"w": "to", "b": [0.6901, 0.5494, 0.7061, 0.5644]}, {"w": "work", "b": [0.712, 0.5494, 0.7502, 0.5644]}, {"w": "correctly,", "b": [0.7561, 0.5494, 0.8285, 0.5644]}, {"w": "each", "b": [0.8344, 0.5494, 0.8691, 0.5644]}, {"w": "feature", "b": [0.1774, 0.5674, 0.2344, 0.5823]}, {"w": "must", "b": [0.2409, 0.5674, 0.2813, 0.5823]}, {"w": "have", "b": [0.2877, 0.5674, 0.3249, 0.5823]}, {"w": "the", "b": [0.3314, 0.5674, 0.3575, 0.5823]}, {"w": "same", "b": [0.364, 0.5674, 0.4049, 0.5823]}, {"w": "value", "b": [0.4113, 0.5674, 0.4537, 0.5823]}, {"w": "for", "b": [0.4602, 0.5674, 0.4827, 0.5823]}, {"w": "the", "b": [0.4892, 0.5674, 0.5154, 0.5823]}, {"w": "same", "b": [0.5218, 0.5674, 0.5627, 0.5823]}, {"w": "input", "b": [0.5692, 0.5674, 0.6131, 0.5823]}, {"w": "data", "b": [0.6196, 0.5674, 0.6562, 0.5823]}, {"w": "entity,", "b": [0.6627, 0.5674, 0.714, 0.5823]}, {"w": "both", "b": [0.7205, 0.5674, 0.7587, 0.5823]}, {"w": "in", "b": [0.7651, 0.5674, 0.7808, 0.5823]}, {"w": "the", "b": [0.7873, 0.5674, 0.8135, 0.5823]}, {"w": "offline", "b": [0.8199, 0.5674, 0.8691, 0.5823]}, {"w": "(development)", "b": [0.1752, 0.5853, 0.2906, 0.6003]}, {"w": "and", "b": [0.2967, 0.5853, 0.3264, 0.6003]}, {"w": "online", "b": [0.3326, 0.5853, 0.3808, 0.6003]}, {"w": "(production)", "b": [0.387, 0.5853, 0.489, 0.6003]}, {"w": "mode.", "b": [0.4952, 0.5853, 0.5439, 0.6003]}]}, {"id": "b_11", "type": "paragraph", "text": "Feature expiration is unknown", "words": [{"w": "Feature", "b": [0.1312, 0.6125, 0.2014, 0.6275]}, {"w": "expiration", "b": [0.2084, 0.6125, 0.3026, 0.6275]}, {"w": "is", "b": [0.3097, 0.6125, 0.324, 0.6275]}, {"w": "unknown", "b": [0.3311, 0.6125, 0.4148, 0.6275]}]}, {"id": "b_12", "type": "paragraph", "text": "When a new input example comes into the production environment, there is no way to", "words": [{"w": "When", "b": [0.1764, 0.6302, 0.2233, 0.6451]}, {"w": "a", "b": [0.2295, 0.6302, 0.2386, 0.6451]}, {"w": "new", "b": [0.2447, 0.6302, 0.276, 0.6451]}, {"w": "input", "b": [0.2821, 0.6302, 0.3245, 0.6451]}, {"w": "example", "b": [0.3306, 0.6302, 0.3957, 0.6451]}, {"w": "comes", "b": [0.4018, 0.6302, 0.4494, 0.6451]}, {"w": "into", "b": [0.4555, 0.6302, 0.4863, 0.6451]}, {"w": "the", "b": [0.4924, 0.6302, 0.5176, 0.6451]}, {"w": "production", "b": [0.5238, 0.6302, 0.6101, 0.6451]}, {"w": "environment,", "b": [0.6162, 0.6302, 0.7197, 0.6451]}, {"w": "there", "b": [0.7258, 0.6302, 0.7663, 0.6451]}, {"w": "is", "b": [0.7724, 0.6302, 0.7846, 0.6451]}, {"w": "no", "b": [0.7908, 0.6302, 0.8099, 0.6451]}, {"w": "way", "b": [0.8161, 0.6302, 0.8468, 0.6451]}, {"w": "to", "b": [0.8529, 0.6302, 0.8691, 0.6451]}]}, {"id": "b_13", "type": "paragraph", "text": "know exactly which features need to be recomputed; rather the entire pipeline needs to be run to compute the values of all features needed for prediction.", "words": [{"w": "know", "b": [0.1774, 0.6481, 0.2185, 0.6631]}, {"w": "exactly", "b": [0.2246, 0.6481, 0.2809, 0.6631]}, {"w": "which", "b": [0.2869, 0.6481, 0.3326, 0.6631]}, {"w": "features", "b": [0.3387, 0.6481, 0.4007, 0.6631]}, {"w": "need", "b": [0.4067, 0.6481, 0.4429, 0.6631]}, {"w": "to", "b": [0.449, 0.6481, 0.4651, 0.6631]}, {"w": "be", "b": [0.4711, 0.6481, 0.4897, 0.6631]}, {"w": "recomputed;", "b": [0.4958, 0.6481, 0.5933, 0.6631]}, {"w": "rather", "b": [0.5994, 0.6481, 0.6477, 0.6631]}, {"w": "the", "b": [0.6538, 0.6481, 0.6789, 0.6631]}, {"w": "entire", "b": [0.685, 0.6481, 0.7297, 0.6631]}, {"w": "pipeline", "b": [0.7358, 0.6481, 0.7976, 0.6631]}, {"w": "needs", "b": [0.8037, 0.6481, 0.847, 0.6631]}, {"w": "to", "b": [0.8531, 0.6481, 0.8692, 0.6631]}, {"w": "be", "b": [0.1774, 0.6661, 0.1963, 0.681]}, {"w": "run", "b": [0.2025, 0.6661, 0.2302, 0.681]}, {"w": "to", "b": [0.2364, 0.6661, 0.2528, 0.681]}, {"w": "compute", "b": [0.2589, 0.6661, 0.3276, 0.681]}, {"w": "the", "b": [0.3338, 0.6661, 0.3594, 0.681]}, {"w": "values", "b": [0.3656, 0.6661, 0.4144, 0.681]}, {"w": "of", "b": [0.4206, 0.6661, 0.4354, 0.681]}, {"w": "all", "b": [0.4416, 0.6661, 0.4611, 0.681]}, {"w": "features", "b": [0.4672, 0.6661, 0.5304, 0.681]}, {"w": "needed", "b": [0.5366, 0.6661, 0.592, 0.681]}, {"w": "for", "b": [0.5981, 0.6661, 0.6202, 0.681]}, {"w": "prediction.", "b": [0.6264, 0.6661, 0.7126, 0.681]}]}, {"id": "b_14", "type": "paragraph", "text": "A feature store is a central vault for storing documented, curated, and access-controlled features within an organization. Each feature is described by four elements: 1) name, 2) description, 3) metadata, and 4) definition.", "words": [{"w": "A", "b": [0.1305, 0.693, 0.1446, 0.7079]}, {"w": "feature", "b": [0.1521, 0.693, 0.2092, 0.7079]}, {"w": "store", "b": [0.2166, 0.693, 0.2565, 0.7079]}, {"w": "is", "b": [0.264, 0.693, 0.2767, 0.7079]}, {"w": "a", "b": [0.2841, 0.693, 0.2935, 0.7079]}, {"w": "central", "b": [0.301, 0.693, 0.357, 0.7079]}, {"w": "vault", "b": [0.3645, 0.693, 0.4058, 0.7079]}, {"w": "for", "b": [0.4133, 0.693, 0.4358, 0.7079]}, {"w": "storing", "b": [0.4433, 0.693, 0.4999, 0.7079]}, {"w": "documented,", "b": [0.5074, 0.693, 0.612, 0.7079]}, {"w": "curated,", "b": [0.6198, 0.693, 0.6868, 0.7079]}, {"w": "and", "b": [0.6946, 0.693, 0.7249, 0.7079]}, {"w": "access-controlled", "b": [0.7324, 0.693, 0.8691, 0.7079]}, {"w": "features", "b": [0.1312, 0.7109, 0.1957, 0.7259]}, {"w": "within", "b": [0.2044, 0.7109, 0.2567, 0.7259]}, {"w": "an", "b": [0.2653, 0.7109, 0.2851, 0.7259]}, {"w": "organization.", "b": [0.2938, 0.7109, 0.4005, 0.7259]}, {"w": "Each", "b": [0.4161, 0.7109, 0.4567, 0.7259]}, {"w": "feature", "b": [0.4653, 0.7109, 0.5224, 0.7259]}, {"w": "is", "b": [0.531, 0.7109, 0.5437, 0.7259]}, {"w": "described", "b": [0.5523, 0.7109, 0.6293, 0.7259]}, {"w": "by", "b": [0.638, 0.7109, 0.6578, 0.7259]}, {"w": "four", "b": [0.6665, 0.7109, 0.6995, 0.7259]}, {"w": "elements:", "b": [0.7081, 0.7109, 0.7841, 0.7259]}, {"w": "1)", "b": [0.7972, 0.7109, 0.8139, 0.7259]}, {"w": "name,", "b": [0.8225, 0.7109, 0.8717, 0.7259]}, {"w": "2)", "b": [0.1308, 0.7289, 0.1472, 0.7438]}, {"w": "description,", "b": [0.1533, 0.7289, 0.2468, 0.7438]}, {"w": "3)", "b": [0.253, 0.7289, 0.2694, 0.7438]}, {"w": "metadata,", "b": [0.2755, 0.7289, 0.3565, 0.7438]}, {"w": "and", "b": [0.3627, 0.7289, 0.3924, 0.7438]}, {"w": "4)", "b": [0.3985, 0.7289, 0.4149, 0.7438]}, {"w": "definition.", "b": [0.4211, 0.7289, 0.5021, 0.7438]}]}, {"id": "b_15", "type": "paragraph", "text": "The feature name is a string that uniquely identifies the feature, for example: “aver- age_session_length” or “document_length.”", "words": [{"w": "The", "b": [0.1306, 0.7558, 0.163, 0.7708]}, {"w": "feature", "b": [0.1724, 0.7558, 0.2295, 0.7708]}, {"w": "name", "b": [0.2389, 0.7558, 0.2828, 0.7708]}, {"w": "is", "b": [0.2922, 0.7558, 0.3049, 0.7708]}, {"w": "a", "b": [0.3143, 0.7558, 0.3237, 0.7708]}, {"w": "string", "b": [0.3331, 0.7558, 0.3804, 0.7708]}, {"w": "that", "b": [0.3898, 0.7558, 0.4243, 0.7708]}, {"w": "uniquely", "b": [0.4337, 0.7558, 0.5038, 0.7708]}, {"w": "identifies", "b": [0.5132, 0.7558, 0.5861, 0.7708]}, {"w": "the", "b": [0.5955, 0.7558, 0.6216, 0.7708]}, {"w": "feature,", "b": [0.6311, 0.7558, 0.6934, 0.7708]}, {"w": "for", "b": [0.7036, 0.7558, 0.7261, 0.7708]}, {"w": "example:", "b": [0.7356, 0.7558, 0.8083, 0.7708]}, {"w": "“aver-", "b": [0.823, 0.7558, 0.8722, 0.7708]}, {"w": "age_session_length”", "b": [0.1312, 0.7737, 0.2992, 0.7887]}, {"w": "or", "b": [0.3054, 0.7737, 0.3218, 0.7887]}, {"w": "“document_length.”", "b": [0.328, 0.7737, 0.491, 0.7887]}]}, {"id": "b_16", "type": "paragraph", "text": "The feature description is a natural language textual description of the object’s property it represents, for example, “The average length of the session for a user.” or “The number of words in the document.”", "words": [{"w": "The", "b": [0.1306, 0.8007, 0.1625, 0.8156]}, {"w": "feature", "b": [0.1687, 0.8007, 0.2249, 0.8156]}, {"w": "description", "b": [0.231, 0.8007, 0.3198, 0.8156]}, {"w": "is", "b": [0.326, 0.8007, 0.3384, 0.8156]}, {"w": "a", "b": [0.3446, 0.8007, 0.3538, 0.8156]}, {"w": "natural", "b": [0.36, 0.8007, 0.4188, 0.8156]}, {"w": "language", "b": [0.4249, 0.8007, 0.496, 0.8156]}, {"w": "textual", "b": [0.5021, 0.8007, 0.5593, 0.8156]}, {"w": "description", "b": [0.5655, 0.8007, 0.6543, 0.8156]}, {"w": "of", "b": [0.6604, 0.8007, 0.6754, 0.8156]}, {"w": "the", "b": [0.6815, 0.8007, 0.7073, 0.8156]}, {"w": "object’s", "b": [0.7134, 0.8007, 0.7753, 0.8156]}, {"w": "property", "b": [0.7815, 0.8007, 0.8512, 0.8156]}, {"w": "it", "b": [0.8573, 0.8007, 0.8697, 0.8156]}, {"w": "represents,", "b": [0.1312, 0.8186, 0.2186, 0.8336]}, {"w": "for", "b": [0.2247, 0.8186, 0.2472, 0.8336]}, {"w": "example,", "b": [0.2533, 0.8186, 0.3257, 0.8336]}, {"w": "“The", "b": [0.3318, 0.8186, 0.373, 0.8336]}, {"w": "average", "b": [0.3791, 0.8186, 0.4401, 0.8336]}, {"w": "length", "b": [0.4462, 0.8186, 0.4973, 0.8336]}, {"w": "of", "b": [0.5034, 0.8186, 0.5185, 0.8336]}, {"w": "the", "b": [0.5246, 0.8186, 0.5507, 0.8336]}, {"w": "session", "b": [0.5568, 0.8186, 0.6124, 0.8336]}, {"w": "for", "b": [0.6185, 0.8186, 0.6409, 0.8336]}, {"w": "a", "b": [0.6471, 0.8186, 0.6564, 0.8336]}, {"w": "user.”", "b": [0.6626, 0.8186, 0.7076, 0.8336]}, {"w": "or", "b": [0.7158, 0.8186, 0.7325, 0.8336]}, {"w": "“The", "b": [0.7386, 0.8186, 0.7797, 0.8336]}, {"w": "number", "b": [0.7859, 0.8186, 0.8479, 0.8336]}, {"w": "of", "b": [0.854, 0.8186, 0.8691, 0.8336]}, {"w": "words", "b": [0.1306, 0.8366, 0.1774, 0.8515]}, {"w": "in", "b": [0.1835, 0.8366, 0.1989, 0.8515]}, {"w": "the", "b": [0.2051, 0.8366, 0.2307, 0.8515]}, {"w": "document.”", "b": [0.2369, 0.8366, 0.3271, 0.8515]}]}, {"id": "b_17", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 42", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "42", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 132, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "In addition to those attributes in the schema file, the feature metadata may supply: why the feature was added to the model, how it contributes to generalization, the person’s name in the organization responsible for maintaining the feature’s data source,8 the input type (e.g., numerical, string, image), the output type (e.g., numerical scalar, categorical, numerical", "words": [{"w": "In", "b": [0.1312, 0.0881, 0.1485, 0.1031]}, {"w": "addition", "b": [0.1551, 0.0881, 0.223, 0.1031]}, {"w": "to", "b": [0.2296, 0.0881, 0.2464, 0.1031]}, {"w": "those", "b": [0.2529, 0.0881, 0.2959, 0.1031]}, {"w": "attributes", "b": [0.3025, 0.0881, 0.3832, 0.1031]}, {"w": "in", "b": [0.3898, 0.0881, 0.4055, 0.1031]}, {"w": "the", "b": [0.4121, 0.0881, 0.4382, 0.1031]}, {"w": "schema", "b": [0.4448, 0.0881, 0.504, 0.1031]}, {"w": "file,", "b": [0.5106, 0.0881, 0.5399, 0.1031]}, {"w": "the", "b": [0.5466, 0.0881, 0.5727, 0.1031]}, {"w": "feature", "b": [0.5793, 0.0881, 0.6364, 0.1031]}, {"w": "metadata", "b": [0.643, 0.0881, 0.7204, 0.1031]}, {"w": "may", "b": [0.7269, 0.0881, 0.7614, 0.1031]}, {"w": "supply:", "b": [0.768, 0.0881, 0.8272, 0.1031]}, {"w": "why", "b": [0.8363, 0.0881, 0.8698, 0.1031]}, {"w": "the", "b": [0.1312, 0.106, 0.1567, 0.121]}, {"w": "feature", "b": [0.1628, 0.106, 0.2183, 0.121]}, {"w": "was", "b": [0.2245, 0.106, 0.2536, 0.121]}, {"w": "added", "b": [0.2597, 0.106, 0.3076, 0.121]}, {"w": "to", "b": [0.3137, 0.106, 0.33, 0.121]}, {"w": "the", "b": [0.3361, 0.106, 0.3616, 0.121]}, {"w": "model,", "b": [0.3677, 0.106, 0.4211, 0.121]}, {"w": "how", "b": [0.4273, 0.106, 0.4593, 0.121]}, {"w": "it", "b": [0.4655, 0.106, 0.4777, 0.121]}, {"w": "contributes", "b": [0.4838, 0.106, 0.573, 0.121]}, {"w": "to", "b": [0.5792, 0.106, 0.5954, 0.121]}, {"w": "generalization,", "b": [0.6016, 0.106, 0.7176, 0.121]}, {"w": "the", "b": [0.7238, 0.106, 0.7492, 0.121]}, {"w": "person’s", "b": [0.7554, 0.106, 0.8203, 0.121]}, {"w": "name", "b": [0.8264, 0.106, 0.8691, 0.121]}, {"w": "in", "b": [0.1312, 0.124, 0.1469, 0.1389]}, {"w": "the", "b": [0.1536, 0.124, 0.1797, 0.1389]}, {"w": "organization", "b": [0.1864, 0.124, 0.2879, 0.1389]}, {"w": "responsible", "b": [0.2945, 0.124, 0.3853, 0.1389]}, {"w": "for", "b": [0.3919, 0.124, 0.4145, 0.1389]}, {"w": "maintaining", "b": [0.4211, 0.124, 0.5189, 0.1389]}, {"w": "the", "b": [0.5256, 0.124, 0.5517, 0.1389]}, {"w": "feature’s", "b": [0.5584, 0.124, 0.6281, 0.1389]}, {"w": "data", "b": [0.6347, 0.124, 0.6713, 0.1389]}, {"w": "source,8", "b": [0.678, 0.1224, 0.7417, 0.1389]}, {"w": "the", "b": [0.7494, 0.124, 0.7755, 0.1389]}, {"w": "input", "b": [0.7822, 0.124, 0.8261, 0.1389]}, {"w": "type", "b": [0.8327, 0.124, 0.8688, 0.1389]}, {"w": "(e.g.,", "b": [0.1291, 0.1419, 0.1683, 0.1569]}, {"w": "numerical,", "b": [0.1741, 0.1419, 0.2561, 0.1569]}, {"w": "string,", "b": [0.2619, 0.1419, 0.3124, 0.1569]}, {"w": "image),", "b": [0.3182, 0.1419, 0.3765, 0.1569]}, {"w": "the", "b": [0.3823, 0.1419, 0.4075, 0.1569]}, {"w": "output", "b": [0.4133, 0.1419, 0.4665, 0.1569]}, {"w": "type", "b": [0.4723, 0.1419, 0.507, 0.1569]}, {"w": "(e.g.,", "b": [0.5128, 0.1419, 0.552, 0.1569]}, {"w": "numerical", "b": [0.5578, 0.1419, 0.6348, 0.1569]}, {"w": "scalar,", "b": [0.6406, 0.1419, 0.691, 0.1569]}, {"w": "categorical,", "b": [0.6968, 0.1419, 0.7863, 0.1569]}, {"w": "numerical", "b": [0.7922, 0.1419, 0.8691, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "vector), whether the feature store must cache the value of the feature, and if yes, for how long. A feature can also be marked as available online and offline, or just for offline processing. Features available for online processing must be implemented in such a way that their value can be either: 1) read fast from a cache or a value store or 2) computed in real-time. Features that can be computed in real-time include, for example, squaring the input number, determining the shape of the word, or doing a search in the organization’s intranet.", "words": [{"w": "vector),", "b": [0.1308, 0.1599, 0.1911, 0.1748]}, {"w": "whether", "b": [0.1967, 0.1599, 0.26, 0.1748]}, {"w": "the", "b": [0.2655, 0.1599, 0.2906, 0.1748]}, {"w": "feature", "b": [0.296, 0.1599, 0.3508, 0.1748]}, {"w": "store", "b": [0.3563, 0.1599, 0.3946, 0.1748]}, {"w": "must", "b": [0.4, 0.1599, 0.4388, 0.1748]}, {"w": "cache", "b": [0.4442, 0.1599, 0.487, 0.1748]}, {"w": "the", "b": [0.4924, 0.1599, 0.5175, 0.1748]}, {"w": "value", "b": [0.523, 0.1599, 0.5636, 0.1748]}, {"w": "of", "b": [0.5691, 0.1599, 0.5836, 0.1748]}, {"w": "the", "b": [0.5891, 0.1599, 0.6142, 0.1748]}, {"w": "feature,", "b": [0.6196, 0.1599, 0.6795, 0.1748]}, {"w": "and", "b": [0.685, 0.1599, 0.7142, 0.1748]}, {"w": "if", "b": [0.7196, 0.1599, 0.7302, 0.1748]}, {"w": "yes,", "b": [0.7356, 0.1599, 0.7648, 0.1748]}, {"w": "for", "b": [0.7704, 0.1599, 0.7921, 0.1748]}, {"w": "how", "b": [0.7975, 0.1599, 0.8291, 0.1748]}, {"w": "long.", "b": [0.8345, 0.1599, 0.8727, 0.1748]}, {"w": "A", "b": [0.1305, 0.1778, 0.1446, 0.1928]}, {"w": "feature", "b": [0.1513, 0.1778, 0.2084, 0.1928]}, {"w": "can", "b": [0.215, 0.1778, 0.2433, 0.1928]}, {"w": "also", "b": [0.25, 0.1778, 0.2814, 0.1928]}, {"w": "be", "b": [0.2881, 0.1778, 0.3075, 0.1928]}, {"w": "marked", "b": [0.3141, 0.1778, 0.3749, 0.1928]}, {"w": "as", "b": [0.3815, 0.1778, 0.3984, 0.1928]}, {"w": "available", "b": [0.405, 0.1778, 0.4762, 0.1928]}, {"w": "online", "b": [0.4828, 0.1778, 0.532, 0.1928]}, {"w": "and", "b": [0.5387, 0.1778, 0.569, 0.1928]}, {"w": "offline,", "b": [0.5757, 0.1778, 0.6301, 0.1928]}, {"w": "or", "b": [0.6369, 0.1778, 0.6536, 0.1928]}, {"w": "just", "b": [0.6603, 0.1778, 0.6913, 0.1928]}, {"w": "for", "b": [0.698, 0.1778, 0.7205, 0.1928]}, {"w": "offline", "b": [0.7272, 0.1778, 0.7763, 0.1928]}, {"w": "processing.", "b": [0.783, 0.1778, 0.8727, 0.1928]}, {"w": "Features", "b": [0.1312, 0.1958, 0.2007, 0.2107]}, {"w": "available", "b": [0.2092, 0.1958, 0.2803, 0.2107]}, {"w": "for", "b": [0.2888, 0.1958, 0.3114, 0.2107]}, {"w": "online", "b": [0.3198, 0.1958, 0.369, 0.2107]}, {"w": "processing", "b": [0.3775, 0.1958, 0.4619, 0.2107]}, {"w": "must", "b": [0.4704, 0.1958, 0.5108, 0.2107]}, {"w": "be", "b": [0.5192, 0.1958, 0.5386, 0.2107]}, {"w": "implemented", "b": [0.5471, 0.1958, 0.6522, 0.2107]}, {"w": "in", "b": [0.6606, 0.1958, 0.6763, 0.2107]}, {"w": "such", "b": [0.6848, 0.1958, 0.721, 0.2107]}, {"w": "a", "b": [0.7295, 0.1958, 0.7389, 0.2107]}, {"w": "way", "b": [0.7474, 0.1958, 0.7793, 0.2107]}, {"w": "that", "b": [0.7877, 0.1958, 0.8223, 0.2107]}, {"w": "their", "b": [0.8307, 0.1958, 0.8695, 0.2107]}, {"w": "value", "b": [0.1308, 0.2137, 0.1728, 0.2287]}, {"w": "can", "b": [0.179, 0.2137, 0.207, 0.2287]}, {"w": "be", "b": [0.2132, 0.2137, 0.2324, 0.2287]}, {"w": "either:", "b": [0.2386, 0.2137, 0.2906, 0.2287]}, {"w": "1)", "b": [0.2988, 0.2137, 0.3154, 0.2287]}, {"w": "read", "b": [0.3216, 0.2137, 0.3569, 0.2287]}, {"w": "fast", "b": [0.3631, 0.2137, 0.3928, 0.2287]}, {"w": "from", "b": [0.399, 0.2137, 0.4369, 0.2287]}, {"w": "a", "b": [0.4431, 0.2137, 0.4524, 0.2287]}, {"w": "cache", "b": [0.4586, 0.2137, 0.5027, 0.2287]}, {"w": "or", "b": [0.5089, 0.2137, 0.5256, 0.2287]}, {"w": "a", "b": [0.5317, 0.2137, 0.5411, 0.2287]}, {"w": "value", "b": [0.5472, 0.2137, 0.5893, 0.2287]}, {"w": "store", "b": [0.5955, 0.2137, 0.6351, 0.2287]}, {"w": "or", "b": [0.6412, 0.2137, 0.6579, 0.2287]}, {"w": "2)", "b": [0.6641, 0.2137, 0.6807, 0.2287]}, {"w": "computed", "b": [0.6868, 0.2137, 0.7668, 0.2287]}, {"w": "in", "b": [0.773, 0.2137, 0.7886, 0.2287]}, {"w": "real-time.", "b": [0.7947, 0.2137, 0.8727, 0.2287]}, {"w": "Features", "b": [0.1312, 0.2317, 0.1979, 0.2466]}, {"w": "that", "b": [0.2041, 0.2317, 0.2373, 0.2466]}, {"w": "can", "b": [0.2434, 0.2317, 0.2705, 0.2466]}, {"w": "be", "b": [0.2767, 0.2317, 0.2953, 0.2466]}, {"w": "computed", "b": [0.3015, 0.2317, 0.3788, 0.2466]}, {"w": "in", "b": [0.385, 0.2317, 0.4001, 0.2466]}, {"w": "real-time", "b": [0.4062, 0.2317, 0.4766, 0.2466]}, {"w": "include,", "b": [0.4828, 0.2317, 0.5441, 0.2466]}, {"w": "for", "b": [0.5502, 0.2317, 0.5719, 0.2466]}, {"w": "example,", "b": [0.5781, 0.2317, 0.6479, 0.2466]}, {"w": "squaring", "b": [0.654, 0.2317, 0.721, 0.2466]}, {"w": "the", "b": [0.7272, 0.2317, 0.7523, 0.2466]}, {"w": "input", "b": [0.7585, 0.2317, 0.8007, 0.2466]}, {"w": "number,", "b": [0.8068, 0.2317, 0.8717, 0.2466]}, {"w": "determining", "b": [0.1312, 0.2496, 0.2277, 0.2646]}, {"w": "the", "b": [0.2338, 0.2496, 0.2595, 0.2646]}, {"w": "shape", "b": [0.2656, 0.2496, 0.3114, 0.2646]}, {"w": "of", "b": [0.3175, 0.2496, 0.3324, 0.2646]}, {"w": "the", "b": [0.3385, 0.2496, 0.3642, 0.2646]}, {"w": "word,", "b": [0.3703, 0.2496, 0.415, 0.2646]}, {"w": "or", "b": [0.4211, 0.2496, 0.4376, 0.2646]}, {"w": "doing", "b": [0.4437, 0.2496, 0.4878, 0.2646]}, {"w": "a", "b": [0.494, 0.2496, 0.5032, 0.2646]}, {"w": "search", "b": [0.5094, 0.2496, 0.5593, 0.2646]}, {"w": "in", "b": [0.5654, 0.2496, 0.5808, 0.2646]}, {"w": "the", "b": [0.5869, 0.2496, 0.6126, 0.2646]}, {"w": "organization’s", "b": [0.6187, 0.2496, 0.7307, 0.2646]}, {"w": "intranet.", "b": [0.7368, 0.2496, 0.8061, 0.2646]}]}, {"id": "b_2", "type": "paragraph", "text": "The definition of the feature is the versioned code, such as Python or Java. It will be executed in a runtime environment and applied to the input to compute the feature value.", "words": [{"w": "The", "b": [0.1306, 0.2765, 0.1617, 0.2915]}, {"w": "definition", "b": [0.167, 0.2765, 0.2414, 0.2915]}, {"w": "of", "b": [0.2466, 0.2765, 0.2612, 0.2915]}, {"w": "the", "b": [0.2665, 0.2765, 0.2916, 0.2915]}, {"w": "feature", "b": [0.2969, 0.2765, 0.3517, 0.2915]}, {"w": "is", "b": [0.357, 0.2765, 0.3691, 0.2915]}, {"w": "the", "b": [0.3744, 0.2765, 0.3995, 0.2915]}, {"w": "versioned", "b": [0.4048, 0.2765, 0.4783, 0.2915]}, {"w": "code,", "b": [0.4836, 0.2765, 0.5243, 0.2915]}, {"w": "such", "b": [0.5297, 0.2765, 0.5645, 0.2915]}, {"w": "as", "b": [0.5698, 0.2765, 0.5859, 0.2915]}, {"w": "Python", "b": [0.5912, 0.2765, 0.6492, 0.2915]}, {"w": "or", "b": [0.6545, 0.2765, 0.6706, 0.2915]}, {"w": "Java.", "b": [0.6759, 0.2765, 0.7163, 0.2915]}, {"w": "It", "b": [0.7242, 0.2765, 0.7378, 0.2915]}, {"w": "will", "b": [0.743, 0.2765, 0.7712, 0.2915]}, {"w": "be", "b": [0.7764, 0.2765, 0.795, 0.2915]}, {"w": "executed", "b": [0.8003, 0.2765, 0.8692, 0.2915]}, {"w": "in", "b": [0.1312, 0.2945, 0.1466, 0.3094]}, {"w": "a", "b": [0.1528, 0.2945, 0.162, 0.3094]}, {"w": "runtime", "b": [0.1682, 0.2945, 0.2313, 0.3094]}, {"w": "environment", "b": [0.2374, 0.2945, 0.3374, 0.3094]}, {"w": "and", "b": [0.3436, 0.2945, 0.3733, 0.3094]}, {"w": "applied", "b": [0.3795, 0.2945, 0.438, 0.3094]}, {"w": "to", "b": [0.4441, 0.2945, 0.4605, 0.3094]}, {"w": "the", "b": [0.4666, 0.2945, 0.4923, 0.3094]}, {"w": "input", "b": [0.4984, 0.2945, 0.5415, 0.3094]}, {"w": "to", "b": [0.5477, 0.2945, 0.5641, 0.3094]}, {"w": "compute", "b": [0.5702, 0.2945, 0.6389, 0.3094]}, {"w": "the", "b": [0.6451, 0.2945, 0.6707, 0.3094]}, {"w": "feature", "b": [0.6769, 0.2945, 0.7328, 0.3094]}, {"w": "value.", "b": [0.739, 0.2945, 0.7856, 0.3094]}]}, {"id": "b_3", "type": "paragraph", "text": "A feature store allows data engineers to insert features. In turn, data analysts and machine learning engineers use an API to get feature values which they deem relevant. A feature store can provide features for a single online input. Or, the analyst working on a model offline may want to convert the training data into a collection of feature vectors, and will send to the feature store a batch of inputs.", "words": [{"w": "A", "b": [0.1305, 0.3214, 0.1443, 0.3364]}, {"w": "feature", "b": [0.1505, 0.3214, 0.2063, 0.3364]}, {"w": "store", "b": [0.2125, 0.3214, 0.2515, 0.3364]}, {"w": "allows", "b": [0.2577, 0.3214, 0.3064, 0.3364]}, {"w": "data", "b": [0.3125, 0.3214, 0.3484, 0.3364]}, {"w": "engineers", "b": [0.3545, 0.3214, 0.4284, 0.3364]}, {"w": "to", "b": [0.4345, 0.3214, 0.4509, 0.3364]}, {"w": "insert", "b": [0.457, 0.3214, 0.5022, 0.3364]}, {"w": "features.", "b": [0.5084, 0.3214, 0.5766, 0.3364]}, {"w": "In", "b": [0.5848, 0.3214, 0.6017, 0.3364]}, {"w": "turn,", "b": [0.6079, 0.3214, 0.6478, 0.3364]}, {"w": "data", "b": [0.654, 0.3214, 0.6898, 0.3364]}, {"w": "analysts", "b": [0.6959, 0.3214, 0.7611, 0.3364]}, {"w": "and", "b": [0.7673, 0.3214, 0.797, 0.3364]}, {"w": "machine", "b": [0.8031, 0.3214, 0.8691, 0.3364]}, {"w": "learning", "b": [0.1312, 0.3394, 0.1946, 0.3543]}, {"w": "engineers", "b": [0.2002, 0.3394, 0.2728, 0.3543]}, {"w": "use", "b": [0.2784, 0.3394, 0.3036, 0.3543]}, {"w": "an", "b": [0.3092, 0.3394, 0.3283, 0.3543]}, {"w": "API", "b": [0.3339, 0.3394, 0.3663, 0.3543]}, {"w": "to", "b": [0.372, 0.3394, 0.388, 0.3543]}, {"w": "get", "b": [0.3937, 0.3394, 0.4178, 0.3543]}, {"w": "feature", "b": [0.4234, 0.3394, 0.4782, 0.3543]}, {"w": "values", "b": [0.4839, 0.3394, 0.5317, 0.3543]}, {"w": "which", "b": [0.5373, 0.3394, 0.583, 0.3543]}, {"w": "they", "b": [0.5887, 0.3394, 0.6233, 0.3543]}, {"w": "deem", "b": [0.629, 0.3394, 0.6702, 0.3543]}, {"w": "relevant.", "b": [0.6758, 0.3394, 0.7431, 0.3543]}, {"w": "A", "b": [0.7512, 0.3394, 0.7647, 0.3543]}, {"w": "feature", "b": [0.7704, 0.3394, 0.8252, 0.3543]}, {"w": "store", "b": [0.8308, 0.3394, 0.8692, 0.3543]}, {"w": "can", "b": [0.1312, 0.3573, 0.1595, 0.3723]}, {"w": "provide", "b": [0.1661, 0.3573, 0.2268, 0.3723]}, {"w": "features", "b": [0.2335, 0.3573, 0.2979, 0.3723]}, {"w": "for", "b": [0.3046, 0.3573, 0.3271, 0.3723]}, {"w": "a", "b": [0.3337, 0.3573, 0.3431, 0.3723]}, {"w": "single", "b": [0.3498, 0.3573, 0.3959, 0.3723]}, {"w": "online", "b": [0.4025, 0.3573, 0.4517, 0.3723]}, {"w": "input.", "b": [0.4583, 0.3573, 0.5075, 0.3723]}, {"w": "Or,", "b": [0.5171, 0.3573, 0.5443, 0.3723]}, {"w": "the", "b": [0.551, 0.3573, 0.5772, 0.3723]}, {"w": "analyst", "b": [0.5838, 0.3573, 0.643, 0.3723]}, {"w": "working", "b": [0.6496, 0.3573, 0.7145, 0.3723]}, {"w": "on", "b": [0.7211, 0.3573, 0.741, 0.3723]}, {"w": "a", "b": [0.7476, 0.3573, 0.7571, 0.3723]}, {"w": "model", "b": [0.7637, 0.3573, 0.8133, 0.3723]}, {"w": "offline", "b": [0.8199, 0.3573, 0.8691, 0.3723]}, {"w": "may", "b": [0.1312, 0.3752, 0.1654, 0.3902]}, {"w": "want", "b": [0.1715, 0.3752, 0.2109, 0.3902]}, {"w": "to", "b": [0.217, 0.3752, 0.2336, 0.3902]}, {"w": "convert", "b": [0.2398, 0.3752, 0.2994, 0.3902]}, {"w": "the", "b": [0.3055, 0.3752, 0.3314, 0.3902]}, {"w": "training", "b": [0.3376, 0.3752, 0.4018, 0.3902]}, {"w": "data", "b": [0.408, 0.3752, 0.4442, 0.3902]}, {"w": "into", "b": [0.4504, 0.3752, 0.482, 0.3902]}, {"w": "a", "b": [0.4881, 0.3752, 0.4974, 0.3902]}, {"w": "collection", "b": [0.5036, 0.3752, 0.5802, 0.3902]}, {"w": "of", "b": [0.5864, 0.3752, 0.6014, 0.3902]}, {"w": "feature", "b": [0.6075, 0.3752, 0.6641, 0.3902]}, {"w": "vectors,", "b": [0.6702, 0.3752, 0.7325, 0.3902]}, {"w": "and", "b": [0.7387, 0.3752, 0.7687, 0.3902]}, {"w": "will", "b": [0.7749, 0.3752, 0.8039, 0.3902]}, {"w": "send", "b": [0.81, 0.3752, 0.8464, 0.3902]}, {"w": "to", "b": [0.8525, 0.3752, 0.8691, 0.3902]}, {"w": "the", "b": [0.1312, 0.3932, 0.1569, 0.4082]}, {"w": "feature", "b": [0.163, 0.3932, 0.219, 0.4082]}, {"w": "store", "b": [0.2251, 0.3932, 0.2643, 0.4082]}, {"w": "a", "b": [0.2704, 0.3932, 0.2796, 0.4082]}, {"w": "batch", "b": [0.2858, 0.3932, 0.3304, 0.4082]}, {"w": "of", "b": [0.3365, 0.3932, 0.3514, 0.4082]}, {"w": "inputs.", "b": [0.3576, 0.3932, 0.413, 0.4082]}]}, {"id": "b_4", "type": "paragraph", "text": "For reproducibility, feature values in a feature store are versioned. With feature value versioning, the data analyst is able to rebuild the model with the same feature values as those used to train the previous model version. After the feature value for a given input is updated, the previous value is not erased. Rather, it is saved with a timestamp indicating when that value was generated. Furthermore, a feature j used by model mB can itself be the output of some model mA. Once model mA changes, it is important to keep its older versions: model mB still might expect as input the outputs generated by an older version of mA.", "words": [{"w": "For", "b": [0.1312, 0.4201, 0.1588, 0.4351]}, {"w": "reproducibility,", "b": [0.1659, 0.4201, 0.3086, 0.4354]}, {"w": "feature", "b": [0.3159, 0.4201, 0.373, 0.4351]}, {"w": "values", "b": [0.3802, 0.4201, 0.43, 0.4351]}, {"w": "in", "b": [0.4371, 0.4201, 0.4528, 0.4351]}, {"w": "a", "b": [0.46, 0.4201, 0.4694, 0.4351]}, {"w": "feature", "b": [0.4765, 0.4201, 0.5336, 0.4351]}, {"w": "store", "b": [0.5407, 0.4201, 0.5806, 0.4351]}, {"w": "are", "b": [0.5877, 0.4201, 0.6129, 0.4351]}, {"w": "versioned.", "b": [0.6201, 0.4201, 0.7018, 0.4351]}, {"w": "With", "b": [0.713, 0.4201, 0.7553, 0.4351]}, {"w": "feature", "b": [0.7625, 0.4201, 0.8196, 0.4351]}, {"w": "value", "b": [0.8267, 0.4201, 0.8691, 0.4351]}, {"w": "versioning,", "b": [0.1308, 0.4381, 0.2153, 0.453]}, {"w": "the", "b": [0.221, 0.4381, 0.2461, 0.453]}, {"w": "data", "b": [0.2516, 0.4381, 0.2868, 0.453]}, {"w": "analyst", "b": [0.2923, 0.4381, 0.3492, 0.453]}, {"w": "is", "b": [0.3547, 0.4381, 0.3668, 0.453]}, {"w": "able", "b": [0.3723, 0.4381, 0.4045, 0.453]}, {"w": "to", "b": [0.41, 0.4381, 0.4261, 0.453]}, {"w": "rebuild", "b": [0.4316, 0.4381, 0.4869, 0.453]}, {"w": "the", "b": [0.4924, 0.4381, 0.5176, 0.453]}, {"w": "model", "b": [0.5231, 0.4381, 0.5708, 0.453]}, {"w": "with", "b": [0.5763, 0.4381, 0.6115, 0.453]}, {"w": "the", "b": [0.617, 0.4381, 0.6421, 0.453]}, {"w": "same", "b": [0.6477, 0.4381, 0.6869, 0.453]}, {"w": "feature", "b": [0.6925, 0.4381, 0.7473, 0.453]}, {"w": "values", "b": [0.7528, 0.4381, 0.8006, 0.453]}, {"w": "as", "b": [0.8061, 0.4381, 0.8223, 0.453]}, {"w": "those", "b": [0.8278, 0.4381, 0.8691, 0.453]}, {"w": "used", "b": [0.1312, 0.456, 0.1665, 0.471]}, {"w": "to", "b": [0.1722, 0.456, 0.1883, 0.471]}, {"w": "train", "b": [0.194, 0.456, 0.2322, 0.471]}, {"w": "the", "b": [0.2379, 0.456, 0.2631, 0.471]}, {"w": "previous", "b": [0.2688, 0.456, 0.3347, 0.471]}, {"w": "model", "b": [0.3405, 0.456, 0.3882, 0.471]}, {"w": "version.", "b": [0.3939, 0.456, 0.4543, 0.471]}, {"w": "After", "b": [0.4624, 0.456, 0.5037, 0.471]}, {"w": "the", "b": [0.5093, 0.456, 0.5345, 0.471]}, {"w": "feature", "b": [0.5402, 0.456, 0.595, 0.471]}, {"w": "value", "b": [0.6007, 0.456, 0.6414, 0.471]}, {"w": "for", "b": [0.6471, 0.456, 0.6687, 0.471]}, {"w": "a", "b": [0.6745, 0.456, 0.6835, 0.471]}, {"w": "given", "b": [0.6892, 0.456, 0.7304, 0.471]}, {"w": "input", "b": [0.7361, 0.456, 0.7783, 0.471]}, {"w": "is", "b": [0.784, 0.456, 0.7962, 0.471]}, {"w": "updated,", "b": [0.8019, 0.456, 0.8717, 0.471]}, {"w": "the", "b": [0.1312, 0.474, 0.1569, 0.4889]}, {"w": "previous", "b": [0.163, 0.474, 0.2303, 0.4889]}, {"w": "value", "b": [0.2364, 0.474, 0.2779, 0.4889]}, {"w": "is", "b": [0.2841, 0.474, 0.2965, 0.4889]}, {"w": "not", "b": [0.3027, 0.474, 0.3293, 0.4889]}, {"w": "erased.", "b": [0.3354, 0.474, 0.3909, 0.4889]}, {"w": "Rather,", "b": [0.3992, 0.474, 0.4599, 0.4889]}, {"w": "it", "b": [0.4661, 0.474, 0.4784, 0.4889]}, {"w": "is", "b": [0.4845, 0.474, 0.4969, 0.4889]}, {"w": "saved", "b": [0.5031, 0.474, 0.5468, 0.4889]}, {"w": "with", "b": [0.5529, 0.474, 0.5888, 0.4889]}, {"w": "a", "b": [0.5949, 0.474, 0.6041, 0.4889]}, {"w": "timestamp", "b": [0.6103, 0.474, 0.6954, 0.4889]}, {"w": "indicating", "b": [0.7016, 0.474, 0.7815, 0.4889]}, {"w": "when", "b": [0.7876, 0.474, 0.8296, 0.4889]}, {"w": "that", "b": [0.8358, 0.474, 0.8696, 0.4889]}, {"w": "value", "b": [0.1308, 0.4919, 0.1717, 0.5069]}, {"w": "was", "b": [0.1778, 0.4919, 0.2067, 0.5069]}, {"w": "generated.", "b": [0.2128, 0.4919, 0.2947, 0.5069]}, {"w": "Furthermore,", "b": [0.3029, 0.4919, 0.4073, 0.5069]}, {"w": "a", "b": [0.4135, 0.4919, 0.4226, 0.5069]}, {"w": "feature", "b": [0.4287, 0.4919, 0.4838, 0.5069]}, {"w": "j", "b": [0.4898, 0.4922, 0.4974, 0.5071]}, {"w": "used", "b": [0.5046, 0.4919, 0.5401, 0.5069]}, {"w": "by", "b": [0.5462, 0.4919, 0.5654, 0.5069]}, {"w": "model", "b": [0.5716, 0.4919, 0.6196, 0.5069]}, {"w": "mB", "b": [0.6257, 0.4922, 0.653, 0.5084]}, {"w": "can", "b": [0.6607, 0.4919, 0.688, 0.5069]}, {"w": "itself", "b": [0.6941, 0.4919, 0.7321, 0.5069]}, {"w": "be", "b": [0.7383, 0.4919, 0.757, 0.5069]}, {"w": "the", "b": [0.7631, 0.4919, 0.7884, 0.5069]}, {"w": "output", "b": [0.7946, 0.4919, 0.8481, 0.5069]}, {"w": "of", "b": [0.8542, 0.4919, 0.8689, 0.5069]}, {"w": "some", "b": [0.1312, 0.5098, 0.1712, 0.5248]}, {"w": "model", "b": [0.1774, 0.5098, 0.226, 0.5248]}, {"w": "mA.", "b": [0.2321, 0.5098, 0.2654, 0.5263]}, {"w": "Once", "b": [0.2736, 0.5098, 0.3146, 0.5248]}, {"w": "model", "b": [0.3207, 0.5098, 0.3693, 0.5248]}, {"w": "mA", "b": [0.3754, 0.5101, 0.4027, 0.5263]}, {"w": "changes,", "b": [0.4098, 0.5098, 0.4769, 0.5248]}, {"w": "it", "b": [0.4831, 0.5098, 0.4954, 0.5248]}, {"w": "is", "b": [0.5015, 0.5098, 0.5139, 0.5248]}, {"w": "important", "b": [0.52, 0.5098, 0.6009, 0.5248]}, {"w": "to", "b": [0.6071, 0.5098, 0.6234, 0.5248]}, {"w": "keep", "b": [0.6296, 0.5098, 0.6654, 0.5248]}, {"w": "its", "b": [0.6715, 0.5098, 0.6911, 0.5248]}, {"w": "older", "b": [0.6972, 0.5098, 0.7372, 0.5248]}, {"w": "versions:", "b": [0.7434, 0.5098, 0.8122, 0.5248]}, {"w": "model", "b": [0.8204, 0.5098, 0.869, 0.5248]}, {"w": "mB", "b": [0.1312, 0.5281, 0.1586, 0.5443]}, {"w": "still", "b": [0.1663, 0.5278, 0.1961, 0.5428]}, {"w": "might", "b": [0.2023, 0.5278, 0.2489, 0.5428]}, {"w": "expect", "b": [0.2551, 0.5278, 0.3074, 0.5428]}, {"w": "as", "b": [0.3135, 0.5278, 0.3301, 0.5428]}, {"w": "input", "b": [0.3362, 0.5278, 0.3793, 0.5428]}, {"w": "the", "b": [0.3854, 0.5278, 0.4111, 0.5428]}, {"w": "outputs", "b": [0.4172, 0.5278, 0.4788, 0.5428]}, {"w": "generated", "b": [0.485, 0.5278, 0.563, 0.5428]}, {"w": "by", "b": [0.5692, 0.5278, 0.5886, 0.5428]}, {"w": "an", "b": [0.5948, 0.5278, 0.6143, 0.5428]}, {"w": "older", "b": [0.6204, 0.5278, 0.6605, 0.5428]}, {"w": "version", "b": [0.6666, 0.5278, 0.7232, 0.5428]}, {"w": "of", "b": [0.7293, 0.5278, 0.7442, 0.5428]}, {"w": "mA.", "b": [0.75, 0.5278, 0.7834, 0.5443]}]}, {"id": "b_5", "type": "paragraph", "text": "The feature store is located in the overall machine learning pipeline as shown in Figure 21. The architecture was inspired by Uber’s Michelangelo machine learning platform. It contains two feature stores, online and offline, whose data is in sync. At Uber, the online feature store is updated frequently, in near real-time, by using the real-time data. In contrast, the offline feature store is updated in batch-mode by using values of some features computed online, as well as with historical data from logs and offline databases. An example of a feature computed online is “restaurant’s average meal preparation time over the last hour.” An example of a feature computed offline is “restaurant’s average meal preparation time over the last seven days.” At Uber, the features from the offline store are synced to the online store once or several times a day.", "words": [{"w": "The", "b": [0.1306, 0.5547, 0.1627, 0.5697]}, {"w": "feature", "b": [0.1689, 0.5547, 0.2255, 0.5697]}, {"w": "store", "b": [0.2316, 0.5547, 0.2712, 0.5697]}, {"w": "is", "b": [0.2774, 0.5547, 0.2899, 0.5697]}, {"w": "located", "b": [0.2961, 0.5547, 0.3547, 0.5697]}, {"w": "in", "b": [0.3608, 0.5547, 0.3764, 0.5697]}, {"w": "the", "b": [0.3825, 0.5547, 0.4085, 0.5697]}, {"w": "overall", "b": [0.4146, 0.5547, 0.4681, 0.5697]}, {"w": "machine", "b": [0.4743, 0.5547, 0.5412, 0.5697]}, {"w": "learning", "b": [0.5473, 0.5547, 0.6128, 0.5697]}, {"w": "pipeline", "b": [0.6189, 0.5547, 0.6828, 0.5697]}, {"w": "as", "b": [0.6889, 0.5547, 0.7056, 0.5697]}, {"w": "shown", "b": [0.7117, 0.5547, 0.7622, 0.5697]}, {"w": "in", "b": [0.7683, 0.5547, 0.7839, 0.5697]}, {"w": "Figure", "b": [0.79, 0.5547, 0.8427, 0.5697]}, {"w": "21.", "b": [0.8489, 0.5547, 0.8727, 0.5697]}, {"w": "The", "b": [0.1306, 0.5727, 0.1617, 0.5876]}, {"w": "architecture", "b": [0.1679, 0.5727, 0.2619, 0.5876]}, {"w": "was", "b": [0.2681, 0.5727, 0.2968, 0.5876]}, {"w": "inspired", "b": [0.3029, 0.5727, 0.3654, 0.5876]}, {"w": "by", "b": [0.3715, 0.5727, 0.3906, 0.5876]}, {"w": "Uber’s", "b": [0.3968, 0.5727, 0.4482, 0.5876]}, {"w": "Michelangelo", "b": [0.4543, 0.5727, 0.5568, 0.5876]}, {"w": "machine", "b": [0.563, 0.5727, 0.6278, 0.5876]}, {"w": "learning", "b": [0.6339, 0.5727, 0.6973, 0.5876]}, {"w": "platform.", "b": [0.7034, 0.5727, 0.7763, 0.5876]}, {"w": "It", "b": [0.7845, 0.5727, 0.7981, 0.5876]}, {"w": "contains", "b": [0.8042, 0.5727, 0.8691, 0.5876]}, {"w": "two", "b": [0.1312, 0.5906, 0.1605, 0.6056]}, {"w": "feature", "b": [0.1676, 0.5906, 0.2246, 0.6056]}, {"w": "stores,", "b": [0.2317, 0.5906, 0.2842, 0.6056]}, {"w": "online", "b": [0.2915, 0.5906, 0.3407, 0.6056]}, {"w": "and", "b": [0.3477, 0.5906, 0.378, 0.6056]}, {"w": "offline,", "b": [0.3851, 0.5906, 0.4395, 0.6056]}, {"w": "whose", "b": [0.4467, 0.5906, 0.496, 0.6056]}, {"w": "data", "b": [0.503, 0.5906, 0.5396, 0.6056]}, {"w": "is", "b": [0.5466, 0.5906, 0.5593, 0.6056]}, {"w": "in", "b": [0.5663, 0.5906, 0.582, 0.6056]}, {"w": "sync.", "b": [0.5891, 0.5906, 0.6305, 0.6056]}, {"w": "At", "b": [0.6414, 0.5906, 0.6623, 0.6056]}, {"w": "Uber,", "b": [0.6693, 0.5906, 0.7154, 0.6056]}, {"w": "the", "b": [0.7227, 0.5906, 0.7488, 0.6056]}, {"w": "online", "b": [0.7558, 0.5906, 0.805, 0.6056]}, {"w": "feature", "b": [0.8121, 0.5906, 0.8691, 0.6056]}, {"w": "store", "b": [0.1312, 0.6086, 0.1708, 0.6235]}, {"w": "is", "b": [0.1769, 0.6086, 0.1895, 0.6235]}, {"w": "updated", "b": [0.1956, 0.6086, 0.2625, 0.6235]}, {"w": "frequently,", "b": [0.2686, 0.6086, 0.3543, 0.6235]}, {"w": "in", "b": [0.3604, 0.6086, 0.376, 0.6235]}, {"w": "near", "b": [0.3821, 0.6086, 0.4174, 0.6235]}, {"w": "real-time,", "b": [0.4236, 0.6086, 0.5014, 0.6235]}, {"w": "by", "b": [0.5075, 0.6086, 0.5272, 0.6235]}, {"w": "using", "b": [0.5334, 0.6086, 0.576, 0.6235]}, {"w": "the", "b": [0.5821, 0.6086, 0.6081, 0.6235]}, {"w": "real-time", "b": [0.6142, 0.6086, 0.6868, 0.6235]}, {"w": "data.", "b": [0.693, 0.6086, 0.7344, 0.6235]}, {"w": "In", "b": [0.7426, 0.6086, 0.7597, 0.6235]}, {"w": "contrast,", "b": [0.7659, 0.6086, 0.8371, 0.6235]}, {"w": "the", "b": [0.8432, 0.6086, 0.8691, 0.6235]}, {"w": "offline", "b": [0.1312, 0.6265, 0.1804, 0.6415]}, {"w": "feature", "b": [0.187, 0.6265, 0.2441, 0.6415]}, {"w": "store", "b": [0.2507, 0.6265, 0.2906, 0.6415]}, {"w": "is", "b": [0.2972, 0.6265, 0.3099, 0.6415]}, {"w": "updated", "b": [0.3165, 0.6265, 0.3839, 0.6415]}, {"w": "in", "b": [0.3905, 0.6265, 0.4062, 0.6415]}, {"w": "batch-mode", "b": [0.4128, 0.6265, 0.5091, 0.6415]}, {"w": "by", "b": [0.5157, 0.6265, 0.5356, 0.6415]}, {"w": "using", "b": [0.5422, 0.6265, 0.5852, 0.6415]}, {"w": "values", "b": [0.5918, 0.6265, 0.6416, 0.6415]}, {"w": "of", "b": [0.6482, 0.6265, 0.6634, 0.6415]}, {"w": "some", "b": [0.67, 0.6265, 0.7109, 0.6415]}, {"w": "features", "b": [0.7175, 0.6265, 0.782, 0.6415]}, {"w": "computed", "b": [0.7886, 0.6265, 0.8691, 0.6415]}, {"w": "online,", "b": [0.1312, 0.6445, 0.1856, 0.6594]}, {"w": "as", "b": [0.1935, 0.6445, 0.2104, 0.6594]}, {"w": "well", "b": [0.2179, 0.6445, 0.2498, 0.6594]}, {"w": "as", "b": [0.2574, 0.6445, 0.2742, 0.6594]}, {"w": "with", "b": [0.2818, 0.6445, 0.3184, 0.6594]}, {"w": "historical", "b": [0.3259, 0.6445, 0.4014, 0.6594]}, {"w": "data", "b": [0.4089, 0.6445, 0.4455, 0.6594]}, {"w": "from", "b": [0.4531, 0.6445, 0.4913, 0.6594]}, {"w": "logs", "b": [0.4988, 0.6445, 0.5303, 0.6594]}, {"w": "and", "b": [0.5379, 0.6445, 0.5682, 0.6594]}, {"w": "offline", "b": [0.5758, 0.6445, 0.6249, 0.6594]}, {"w": "databases.", "b": [0.6325, 0.6445, 0.7174, 0.6594]}, {"w": "An", "b": [0.7298, 0.6445, 0.7544, 0.6594]}, {"w": "example", "b": [0.7619, 0.6445, 0.8294, 0.6594]}, {"w": "of", "b": [0.8369, 0.6445, 0.8521, 0.6594]}, {"w": "a", "b": [0.8596, 0.6445, 0.869, 0.6594]}, {"w": "feature", "b": [0.1312, 0.6624, 0.1876, 0.6774]}, {"w": "computed", "b": [0.1937, 0.6624, 0.2732, 0.6774]}, {"w": "online", "b": [0.2794, 0.6624, 0.328, 0.6774]}, {"w": "is", "b": [0.3341, 0.6624, 0.3466, 0.6774]}, {"w": "“restaurant’s", "b": [0.3528, 0.6624, 0.4574, 0.6774]}, {"w": "average", "b": [0.4635, 0.6624, 0.524, 0.6774]}, {"w": "meal", "b": [0.5302, 0.6624, 0.5684, 0.6774]}, {"w": "preparation", "b": [0.5745, 0.6624, 0.6686, 0.6774]}, {"w": "time", "b": [0.6748, 0.6624, 0.7109, 0.6774]}, {"w": "over", "b": [0.7171, 0.6624, 0.7507, 0.6774]}, {"w": "the", "b": [0.7568, 0.6624, 0.7827, 0.6774]}, {"w": "last", "b": [0.7888, 0.6624, 0.8179, 0.6774]}, {"w": "hour.”", "b": [0.824, 0.6624, 0.8726, 0.6774]}, {"w": "An", "b": [0.1305, 0.6803, 0.1541, 0.6953]}, {"w": "example", "b": [0.1601, 0.6803, 0.225, 0.6953]}, {"w": "of", "b": [0.231, 0.6803, 0.2455, 0.6953]}, {"w": "a", "b": [0.2515, 0.6803, 0.2606, 0.6953]}, {"w": "feature", "b": [0.2666, 0.6803, 0.3214, 0.6953]}, {"w": "computed", "b": [0.3274, 0.6803, 0.4048, 0.6953]}, {"w": "offline", "b": [0.4108, 0.6803, 0.458, 0.6953]}, {"w": "is", "b": [0.464, 0.6803, 0.4762, 0.6953]}, {"w": "“restaurant’s", "b": [0.4822, 0.6803, 0.584, 0.6953]}, {"w": "average", "b": [0.59, 0.6803, 0.6488, 0.6953]}, {"w": "meal", "b": [0.6548, 0.6803, 0.692, 0.6953]}, {"w": "preparation", "b": [0.698, 0.6803, 0.7896, 0.6953]}, {"w": "time", "b": [0.7956, 0.6803, 0.8307, 0.6953]}, {"w": "over", "b": [0.8367, 0.6803, 0.8695, 0.6953]}, {"w": "the", "b": [0.1312, 0.6983, 0.1574, 0.7132]}, {"w": "last", "b": [0.1639, 0.6983, 0.1933, 0.7132]}, {"w": "seven", "b": [0.1998, 0.6983, 0.2438, 0.7132]}, {"w": "days.”", "b": [0.2503, 0.6983, 0.2986, 0.7132]}, {"w": "At", "b": [0.3078, 0.6983, 0.3287, 0.7132]}, {"w": "Uber,", "b": [0.3352, 0.6983, 0.3813, 0.7132]}, {"w": "the", "b": [0.3879, 0.6983, 0.414, 0.7132]}, {"w": "features", "b": [0.4205, 0.6983, 0.485, 0.7132]}, {"w": "from", "b": [0.4915, 0.6983, 0.5297, 0.7132]}, {"w": "the", "b": [0.5362, 0.6983, 0.5624, 0.7132]}, {"w": "offline", "b": [0.5689, 0.6983, 0.618, 0.7132]}, {"w": "store", "b": [0.6245, 0.6983, 0.6644, 0.7132]}, {"w": "are", "b": [0.6709, 0.6983, 0.6961, 0.7132]}, {"w": "synced", "b": [0.7026, 0.6983, 0.7576, 0.7132]}, {"w": "to", "b": [0.7641, 0.6983, 0.7808, 0.7132]}, {"w": "the", "b": [0.7873, 0.6983, 0.8135, 0.7132]}, {"w": "online", "b": [0.82, 0.6983, 0.8692, 0.7132]}, {"w": "store", "b": [0.1312, 0.7162, 0.1704, 0.7312]}, {"w": "once", "b": [0.1765, 0.7162, 0.2124, 0.7312]}, {"w": "or", "b": [0.2186, 0.7162, 0.235, 0.7312]}, {"w": "several", "b": [0.2412, 0.7162, 0.2957, 0.7312]}, {"w": "times", "b": [0.3018, 0.7162, 0.345, 0.7312]}, {"w": "a", "b": [0.3511, 0.7162, 0.3604, 0.7312]}, {"w": "day.", "b": [0.3665, 0.7162, 0.3988, 0.7312]}]}, {"id": "b_6", "type": "paragraph", "text": "4.12 Feature Engineering Best Practices", "words": [{"w": "4.12", "b": [0.1312, 0.7645, 0.1756, 0.7825]}, {"w": "Feature", "b": [0.2005, 0.7645, 0.2826, 0.7825]}, {"w": "Engineering", "b": [0.2909, 0.7645, 0.4204, 0.7825]}, {"w": "Best", "b": [0.4287, 0.7645, 0.4773, 0.7825]}, {"w": "Practices", "b": [0.4856, 0.7645, 0.5849, 0.7825]}]}, {"id": "b_7", "type": "paragraph", "text": "Throughout the years, analysts and engineers have invented, experimented with, and validated various best practices. Today, they are recommended for nearly every machine learning", "words": [{"w": "Throughout", "b": [0.1306, 0.8031, 0.2251, 0.8181]}, {"w": "the", "b": [0.2299, 0.8031, 0.255, 0.8181]}, {"w": "years,", "b": [0.2598, 0.8031, 0.3052, 0.8181]}, {"w": "analysts", "b": [0.3103, 0.8031, 0.3743, 0.8181]}, {"w": "and", "b": [0.3791, 0.8031, 0.4082, 0.8181]}, {"w": "engineers", "b": [0.413, 0.8031, 0.4856, 0.8181]}, {"w": "have", "b": [0.4903, 0.8031, 0.526, 0.8181]}, {"w": "invented,", "b": [0.5308, 0.8031, 0.6022, 0.8181]}, {"w": "experimented", "b": [0.6072, 0.8031, 0.7133, 0.8181]}, {"w": "with,", "b": [0.7181, 0.8031, 0.7583, 0.8181]}, {"w": "and", "b": [0.7634, 0.8031, 0.7925, 0.8181]}, {"w": "validated", "b": [0.7973, 0.8031, 0.8692, 0.8181]}, {"w": "various", "b": [0.1308, 0.8211, 0.189, 0.836]}, {"w": "best", "b": [0.1966, 0.8211, 0.2307, 0.836]}, {"w": "practices.", "b": [0.2383, 0.8211, 0.3159, 0.836]}, {"w": "Today,", "b": [0.3285, 0.8211, 0.3834, 0.836]}, {"w": "they", "b": [0.3914, 0.8211, 0.4275, 0.836]}, {"w": "are", "b": [0.4351, 0.8211, 0.4602, 0.836]}, {"w": "recommended", "b": [0.4678, 0.8211, 0.5809, 0.836]}, {"w": "for", "b": [0.5885, 0.8211, 0.611, 0.836]}, {"w": "nearly", "b": [0.6186, 0.8211, 0.6694, 0.836]}, {"w": "every", "b": [0.677, 0.8211, 0.7205, 0.836]}, {"w": "machine", "b": [0.7281, 0.8211, 0.7956, 0.836]}, {"w": "learning", "b": [0.8032, 0.8211, 0.8691, 0.836]}]}, {"id": "b_8", "type": "paragraph", "text": "8If the person responsible for the feature leaves the company, the product owner must be alerted automat- ically.", "words": [{"w": "8If", "b": [0.1518, 0.8469, 0.1697, 0.8607]}, {"w": "the", "b": [0.1749, 0.8489, 0.1962, 0.8607]}, {"w": "person", "b": [0.2014, 0.8489, 0.2455, 0.8607]}, {"w": "responsible", "b": [0.2507, 0.8489, 0.3247, 0.8607]}, {"w": "for", "b": [0.3299, 0.8489, 0.3482, 0.8607]}, {"w": "the", "b": [0.3534, 0.8489, 0.3748, 0.8607]}, {"w": "feature", "b": [0.38, 0.8489, 0.4265, 0.8607]}, {"w": "leaves", "b": [0.4317, 0.8489, 0.4706, 0.8607]}, {"w": "the", "b": [0.4758, 0.8489, 0.4971, 0.8607]}, {"w": "company,", "b": [0.5023, 0.8489, 0.565, 0.8607]}, {"w": "the", "b": [0.5702, 0.8489, 0.5915, 0.8607]}, {"w": "product", "b": [0.5967, 0.8489, 0.6492, 0.8607]}, {"w": "owner", "b": [0.6544, 0.8489, 0.6941, 0.8607]}, {"w": "must", "b": [0.6993, 0.8489, 0.7322, 0.8607]}, {"w": "be", "b": [0.7374, 0.8489, 0.7532, 0.8607]}, {"w": "alerted", "b": [0.7584, 0.8489, 0.8045, 0.8607]}, {"w": "automat-", "b": [0.8097, 0.8489, 0.8711, 0.8607]}, {"w": "ically.", "b": [0.1312, 0.863, 0.1704, 0.875]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 43", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "43", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 133, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 21: The place of the feature store in the overall machine learning pipeline.", "words": [{"w": "Figure", "b": [0.1707, 0.4201, 0.2228, 0.4351]}, {"w": "21:", "b": [0.2289, 0.4201, 0.2525, 0.4351]}, {"w": "The", "b": [0.2607, 0.4201, 0.2925, 0.4351]}, {"w": "place", "b": [0.2986, 0.4201, 0.3397, 0.4351]}, {"w": "of", "b": [0.3458, 0.4201, 0.3607, 0.4351]}, {"w": "the", "b": [0.3668, 0.4201, 0.3925, 0.4351]}, {"w": "feature", "b": [0.3986, 0.4201, 0.4546, 0.4351]}, {"w": "store", "b": [0.4607, 0.4201, 0.4999, 0.4351]}, {"w": "in", "b": [0.506, 0.4201, 0.5214, 0.4351]}, {"w": "the", "b": [0.5275, 0.4201, 0.5532, 0.4351]}, {"w": "overall", "b": [0.5593, 0.4201, 0.6122, 0.4351]}, {"w": "machine", "b": [0.6184, 0.4201, 0.6845, 0.4351]}, {"w": "learning", "b": [0.6906, 0.4201, 0.7553, 0.4351]}, {"w": "pipeline.", "b": [0.7614, 0.4201, 0.8297, 0.4351]}]}, {"id": "b_1", "type": "paragraph", "text": "project. Using those best practices might not significantly improve each project, but they will definitely not hurt. One best practice already considered in this chapter is to normalize or standardize the features.", "words": [{"w": "project.", "b": [0.1312, 0.4704, 0.194, 0.4853]}, {"w": "Using", "b": [0.2026, 0.4704, 0.2493, 0.4853]}, {"w": "those", "b": [0.2556, 0.4704, 0.2986, 0.4853]}, {"w": "best", "b": [0.3049, 0.4704, 0.339, 0.4853]}, {"w": "practices", "b": [0.3453, 0.4704, 0.4176, 0.4853]}, {"w": "might", "b": [0.4239, 0.4704, 0.4715, 0.4853]}, {"w": "not", "b": [0.4778, 0.4704, 0.5049, 0.4853]}, {"w": "significantly", "b": [0.5112, 0.4704, 0.6097, 0.4853]}, {"w": "improve", "b": [0.616, 0.4704, 0.6814, 0.4853]}, {"w": "each", "b": [0.6877, 0.4704, 0.7238, 0.4853]}, {"w": "project,", "b": [0.7301, 0.4704, 0.7929, 0.4853]}, {"w": "but", "b": [0.7992, 0.4704, 0.8275, 0.4853]}, {"w": "they", "b": [0.8337, 0.4704, 0.8698, 0.4853]}, {"w": "will", "b": [0.1306, 0.4883, 0.1591, 0.5033]}, {"w": "definitely", "b": [0.1652, 0.4883, 0.2392, 0.5033]}, {"w": "not", "b": [0.2453, 0.4883, 0.2718, 0.5033]}, {"w": "hurt.", "b": [0.2779, 0.4883, 0.3172, 0.5033]}, {"w": "One", "b": [0.3254, 0.4883, 0.3581, 0.5033]}, {"w": "best", "b": [0.3642, 0.4883, 0.3974, 0.5033]}, {"w": "practice", "b": [0.4036, 0.4883, 0.4668, 0.5033]}, {"w": "already", "b": [0.473, 0.4883, 0.5316, 0.5033]}, {"w": "considered", "b": [0.5378, 0.4883, 0.6215, 0.5033]}, {"w": "in", "b": [0.6277, 0.4883, 0.643, 0.5033]}, {"w": "this", "b": [0.6491, 0.4883, 0.6788, 0.5033]}, {"w": "chapter", "b": [0.6849, 0.4883, 0.7446, 0.5033]}, {"w": "is", "b": [0.7507, 0.4883, 0.7631, 0.5033]}, {"w": "to", "b": [0.7692, 0.4883, 0.7855, 0.5033]}, {"w": "normalize", "b": [0.7917, 0.4883, 0.8692, 0.5033]}, {"w": "or", "b": [0.1312, 0.5063, 0.1477, 0.5212]}, {"w": "standardize", "b": [0.1538, 0.5063, 0.2463, 0.5212]}, {"w": "the", "b": [0.2524, 0.5063, 0.2781, 0.5212]}, {"w": "features.", "b": [0.2843, 0.5063, 0.3526, 0.5212]}]}, {"id": "b_2", "type": "paragraph", "text": "4.12.1 Generate Many Simple Features", "words": [{"w": "4.12.1", "b": [0.1312, 0.5544, 0.1855, 0.5694]}, {"w": "Generate", "b": [0.2067, 0.5544, 0.2916, 0.5694]}, {"w": "Many", "b": [0.2987, 0.5544, 0.3516, 0.5694]}, {"w": "Simple", "b": [0.3586, 0.5544, 0.4214, 0.5694]}, {"w": "Features", "b": [0.4285, 0.5544, 0.507, 0.5694]}]}, {"id": "b_3", "type": "paragraph", "text": "At the beginning of the modeling process, try to engineer as many “simple” features as possible. A feature is simple when it doesn’t take significant time to code. For example, the bag-of-words approach in document classification generates thousands of features with just a couple lines of code. As long as your hardware has the capacity, use anything measurable as a feature. You cannot know in advance whether some quantity, in combination with other quantities, will be useful for prediction.", "words": [{"w": "At", "b": [0.1305, 0.5907, 0.1515, 0.6057]}, {"w": "the", "b": [0.1591, 0.5907, 0.1853, 0.6057]}, {"w": "beginning", "b": [0.193, 0.5907, 0.273, 0.6057]}, {"w": "of", "b": [0.2807, 0.5907, 0.2959, 0.6057]}, {"w": "the", "b": [0.3035, 0.5907, 0.3297, 0.6057]}, {"w": "modeling", "b": [0.3374, 0.5907, 0.4122, 0.6057]}, {"w": "process,", "b": [0.4198, 0.5907, 0.4844, 0.6057]}, {"w": "try", "b": [0.4925, 0.5907, 0.5172, 0.6057]}, {"w": "to", "b": [0.5249, 0.5907, 0.5416, 0.6057]}, {"w": "engineer", "b": [0.5493, 0.5907, 0.6173, 0.6057]}, {"w": "as", "b": [0.625, 0.5907, 0.6419, 0.6057]}, {"w": "many", "b": [0.6496, 0.5907, 0.6945, 0.6057]}, {"w": "“simple”", "b": [0.7022, 0.5907, 0.7724, 0.6057]}, {"w": "features", "b": [0.7801, 0.5907, 0.8446, 0.6057]}, {"w": "as", "b": [0.8523, 0.5907, 0.8691, 0.6057]}, {"w": "possible.", "b": [0.1312, 0.6086, 0.199, 0.6236]}, {"w": "A", "b": [0.2072, 0.6086, 0.2209, 0.6236]}, {"w": "feature", "b": [0.2271, 0.6086, 0.2825, 0.6236]}, {"w": "is", "b": [0.2887, 0.6086, 0.301, 0.6236]}, {"w": "simple", "b": [0.3071, 0.6086, 0.358, 0.6236]}, {"w": "when", "b": [0.3642, 0.6086, 0.4058, 0.6236]}, {"w": "it", "b": [0.412, 0.6086, 0.4241, 0.6236]}, {"w": "doesn’t", "b": [0.4303, 0.6086, 0.4878, 0.6236]}, {"w": "take", "b": [0.494, 0.6086, 0.5275, 0.6236]}, {"w": "significant", "b": [0.5336, 0.6086, 0.6145, 0.6236]}, {"w": "time", "b": [0.6207, 0.6086, 0.6562, 0.6236]}, {"w": "to", "b": [0.6623, 0.6086, 0.6786, 0.6236]}, {"w": "code.", "b": [0.6847, 0.6086, 0.7259, 0.6236]}, {"w": "For", "b": [0.7341, 0.6086, 0.7608, 0.6236]}, {"w": "example,", "b": [0.767, 0.6086, 0.8376, 0.6236]}, {"w": "the", "b": [0.8437, 0.6086, 0.8691, 0.6236]}, {"w": "bag-of-words", "b": [0.1312, 0.6266, 0.2322, 0.6415]}, {"w": "approach", "b": [0.2383, 0.6266, 0.3104, 0.6415]}, {"w": "in", "b": [0.3165, 0.6266, 0.3317, 0.6415]}, {"w": "document", "b": [0.3378, 0.6266, 0.4154, 0.6415]}, {"w": "classification", "b": [0.4216, 0.6266, 0.5216, 0.6415]}, {"w": "generates", "b": [0.5277, 0.6266, 0.6015, 0.6415]}, {"w": "thousands", "b": [0.6076, 0.6266, 0.6875, 0.6415]}, {"w": "of", "b": [0.6936, 0.6266, 0.7082, 0.6415]}, {"w": "features", "b": [0.7143, 0.6266, 0.7765, 0.6415]}, {"w": "with", "b": [0.7827, 0.6266, 0.8179, 0.6415]}, {"w": "just", "b": [0.8241, 0.6266, 0.8539, 0.6415]}, {"w": "a", "b": [0.86, 0.6266, 0.8691, 0.6415]}, {"w": "couple", "b": [0.1312, 0.6445, 0.1819, 0.6595]}, {"w": "lines", "b": [0.188, 0.6445, 0.2236, 0.6595]}, {"w": "of", "b": [0.2298, 0.6445, 0.2444, 0.6595]}, {"w": "code.", "b": [0.2506, 0.6445, 0.2916, 0.6595]}, {"w": "As", "b": [0.2998, 0.6445, 0.3207, 0.6595]}, {"w": "long", "b": [0.3268, 0.6445, 0.3603, 0.6595]}, {"w": "as", "b": [0.3664, 0.6445, 0.3827, 0.6595]}, {"w": "your", "b": [0.3888, 0.6445, 0.4244, 0.6595]}, {"w": "hardware", "b": [0.4305, 0.6445, 0.504, 0.6595]}, {"w": "has", "b": [0.5102, 0.6445, 0.5366, 0.6595]}, {"w": "the", "b": [0.5428, 0.6445, 0.5681, 0.6595]}, {"w": "capacity,", "b": [0.5742, 0.6445, 0.6436, 0.6595]}, {"w": "use", "b": [0.6498, 0.6445, 0.6752, 0.6595]}, {"w": "anything", "b": [0.6813, 0.6445, 0.7512, 0.6595]}, {"w": "measurable", "b": [0.7574, 0.6445, 0.8467, 0.6595]}, {"w": "as", "b": [0.8528, 0.6445, 0.8691, 0.6595]}, {"w": "a", "b": [0.1312, 0.6625, 0.1406, 0.6774]}, {"w": "feature.", "b": [0.1468, 0.6625, 0.2088, 0.6774]}, {"w": "You", "b": [0.217, 0.6625, 0.2493, 0.6774]}, {"w": "cannot", "b": [0.2554, 0.6625, 0.3106, 0.6774]}, {"w": "know", "b": [0.3168, 0.6625, 0.3594, 0.6774]}, {"w": "in", "b": [0.3656, 0.6625, 0.3812, 0.6774]}, {"w": "advance", "b": [0.3873, 0.6625, 0.4524, 0.6774]}, {"w": "whether", "b": [0.4586, 0.6625, 0.5242, 0.6774]}, {"w": "some", "b": [0.5304, 0.6625, 0.5711, 0.6774]}, {"w": "quantity,", "b": [0.5772, 0.6625, 0.6496, 0.6774]}, {"w": "in", "b": [0.6557, 0.6625, 0.6714, 0.6774]}, {"w": "combination", "b": [0.6775, 0.6625, 0.778, 0.6774]}, {"w": "with", "b": [0.7841, 0.6625, 0.8205, 0.6774]}, {"w": "other", "b": [0.8267, 0.6625, 0.8694, 0.6774]}, {"w": "quantities,", "b": [0.1312, 0.6804, 0.2154, 0.6954]}, {"w": "will", "b": [0.2216, 0.6804, 0.2503, 0.6954]}, {"w": "be", "b": [0.2564, 0.6804, 0.2754, 0.6954]}, {"w": "useful", "b": [0.2816, 0.6804, 0.3283, 0.6954]}, {"w": "for", "b": [0.3345, 0.6804, 0.3566, 0.6954]}, {"w": "prediction.", "b": [0.3628, 0.6804, 0.449, 0.6954]}]}, {"id": "b_4", "type": "paragraph", "text": "4.12.2 Reuse Legacy Systems", "words": [{"w": "4.12.2", "b": [0.1312, 0.7286, 0.1855, 0.7435]}, {"w": "Reuse", "b": [0.2067, 0.7286, 0.2622, 0.7435]}, {"w": "Legacy", "b": [0.2693, 0.7286, 0.3333, 0.7435]}, {"w": "Systems", "b": [0.3404, 0.7286, 0.4158, 0.7435]}]}, {"id": "b_5", "type": "paragraph", "text": "When replacing an old, non-machine-learning-based algorithm with a statistical model, use", "words": [{"w": "When", "b": [0.1303, 0.7649, 0.1782, 0.7798]}, {"w": "replacing", "b": [0.1843, 0.7649, 0.2575, 0.7798]}, {"w": "an", "b": [0.2636, 0.7649, 0.2831, 0.7798]}, {"w": "old,", "b": [0.2893, 0.7649, 0.3191, 0.7798]}, {"w": "non-machine-learning-based", "b": [0.3253, 0.7649, 0.5504, 0.7798]}, {"w": "algorithm", "b": [0.5565, 0.7649, 0.6348, 0.7798]}, {"w": "with", "b": [0.6409, 0.7649, 0.6769, 0.7798]}, {"w": "a", "b": [0.6831, 0.7649, 0.6923, 0.7798]}, {"w": "statistical", "b": [0.6985, 0.7649, 0.7769, 0.7798]}, {"w": "model,", "b": [0.783, 0.7649, 0.8371, 0.7798]}, {"w": "use", "b": [0.8432, 0.7649, 0.8691, 0.7798]}]}, {"id": "b_6", "type": "paragraph", "text": "the output of the old algorithm as a feature for the new model. Make sure that the old algorithm doesn’t change anymore; otherwise, your model’s performance might be negatively affected over time. If the old algorithm is too slow to be a feature, use the old algorithm’s inputs as features for the new model.", "words": [{"w": "the", "b": [0.1312, 0.7828, 0.1574, 0.7978]}, {"w": "output", "b": [0.1646, 0.7828, 0.2201, 0.7978]}, {"w": "of", "b": [0.2273, 0.7828, 0.2424, 0.7978]}, {"w": "the", "b": [0.2497, 0.7828, 0.2758, 0.7978]}, {"w": "old", "b": [0.2831, 0.7828, 0.3082, 0.7978]}, {"w": "algorithm", "b": [0.3154, 0.7828, 0.3949, 0.7978]}, {"w": "as", "b": [0.4021, 0.7828, 0.419, 0.7978]}, {"w": "a", "b": [0.4262, 0.7828, 0.4356, 0.7978]}, {"w": "feature", "b": [0.4428, 0.7828, 0.4999, 0.7978]}, {"w": "for", "b": [0.5071, 0.7828, 0.5297, 0.7978]}, {"w": "the", "b": [0.5369, 0.7828, 0.5631, 0.7978]}, {"w": "new", "b": [0.5703, 0.7828, 0.6027, 0.7978]}, {"w": "model.", "b": [0.61, 0.7828, 0.6648, 0.7978]}, {"w": "Make", "b": [0.6763, 0.7828, 0.7208, 0.7978]}, {"w": "sure", "b": [0.728, 0.7828, 0.7616, 0.7978]}, {"w": "that", "b": [0.7689, 0.7828, 0.8034, 0.7978]}, {"w": "the", "b": [0.8106, 0.7828, 0.8367, 0.7978]}, {"w": "old", "b": [0.844, 0.7828, 0.8691, 0.7978]}, {"w": "algorithm", "b": [0.1312, 0.8008, 0.2078, 0.8157]}, {"w": "doesn’t", "b": [0.2139, 0.8008, 0.2709, 0.8157]}, {"w": "change", "b": [0.2771, 0.8008, 0.3309, 0.8157]}, {"w": "anymore;", "b": [0.337, 0.8008, 0.4096, 0.8157]}, {"w": "otherwise,", "b": [0.4157, 0.8008, 0.4954, 0.8157]}, {"w": "your", "b": [0.5015, 0.8008, 0.5368, 0.8157]}, {"w": "model’s", "b": [0.543, 0.8008, 0.603, 0.8157]}, {"w": "performance", "b": [0.6091, 0.8008, 0.7069, 0.8157]}, {"w": "might", "b": [0.713, 0.8008, 0.7588, 0.8157]}, {"w": "be", "b": [0.765, 0.8008, 0.7836, 0.8157]}, {"w": "negatively", "b": [0.7897, 0.8008, 0.8698, 0.8157]}, {"w": "affected", "b": [0.1312, 0.8187, 0.1942, 0.8337]}, {"w": "over", "b": [0.2004, 0.8187, 0.2342, 0.8337]}, {"w": "time.", "b": [0.2404, 0.8187, 0.282, 0.8337]}, {"w": "If", "b": [0.2902, 0.8187, 0.3027, 0.8337]}, {"w": "the", "b": [0.3088, 0.8187, 0.3349, 0.8337]}, {"w": "old", "b": [0.341, 0.8187, 0.366, 0.8337]}, {"w": "algorithm", "b": [0.3721, 0.8187, 0.4513, 0.8337]}, {"w": "is", "b": [0.4574, 0.8187, 0.47, 0.8337]}, {"w": "too", "b": [0.4761, 0.8187, 0.5027, 0.8337]}, {"w": "slow", "b": [0.5088, 0.8187, 0.5438, 0.8337]}, {"w": "to", "b": [0.5499, 0.8187, 0.5666, 0.8337]}, {"w": "be", "b": [0.5727, 0.8187, 0.592, 0.8337]}, {"w": "a", "b": [0.5981, 0.8187, 0.6075, 0.8337]}, {"w": "feature,", "b": [0.6136, 0.8187, 0.6756, 0.8337]}, {"w": "use", "b": [0.6818, 0.8187, 0.7079, 0.8337]}, {"w": "the", "b": [0.714, 0.8187, 0.7401, 0.8337]}, {"w": "old", "b": [0.7462, 0.8187, 0.7712, 0.8337]}, {"w": "algorithm’s", "b": [0.7773, 0.8187, 0.8691, 0.8337]}, {"w": "inputs", "b": [0.1312, 0.8366, 0.1816, 0.8516]}, {"w": "as", "b": [0.1877, 0.8366, 0.2043, 0.8516]}, {"w": "features", "b": [0.2104, 0.8366, 0.2736, 0.8516]}, {"w": "for", "b": [0.2798, 0.8366, 0.3019, 0.8516]}, {"w": "the", "b": [0.3081, 0.8366, 0.3337, 0.8516]}, {"w": "new", "b": [0.3398, 0.8366, 0.3716, 0.8516]}, {"w": "model.", "b": [0.3778, 0.8366, 0.4316, 0.8516]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 44", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "44", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 134, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Use an external system as a feature source only if you control the external system’s behavior. Otherwise, there’s a chance that the external system evolves with time, unbeknownst to you. Furthermore, an external system’s owner might decide to use the output of your model as the input for their model. This creates the hidden feedback loop, a situation where you influence the phenomenon from which you learn.", "words": [{"w": "Use", "b": [0.1312, 0.0881, 0.16, 0.1031]}, {"w": "an", "b": [0.1661, 0.0881, 0.1851, 0.1031]}, {"w": "external", "b": [0.1912, 0.0881, 0.2551, 0.1031]}, {"w": "system", "b": [0.2612, 0.0881, 0.3151, 0.1031]}, {"w": "as", "b": [0.3212, 0.0881, 0.3374, 0.1031]}, {"w": "a", "b": [0.3435, 0.0881, 0.3525, 0.1031]}, {"w": "feature", "b": [0.3586, 0.0881, 0.4134, 0.1031]}, {"w": "source", "b": [0.4195, 0.0881, 0.4689, 0.1031]}, {"w": "only", "b": [0.475, 0.0881, 0.5086, 0.1031]}, {"w": "if", "b": [0.5147, 0.0881, 0.5253, 0.1031]}, {"w": "you", "b": [0.5313, 0.0881, 0.5595, 0.1031]}, {"w": "control", "b": [0.5656, 0.0881, 0.6204, 0.1031]}, {"w": "the", "b": [0.6265, 0.0881, 0.6516, 0.1031]}, {"w": "external", "b": [0.6577, 0.0881, 0.7215, 0.1031]}, {"w": "system’s", "b": [0.7276, 0.0881, 0.7937, 0.1031]}, {"w": "behavior.", "b": [0.7998, 0.0881, 0.8727, 0.1031]}, {"w": "Otherwise,", "b": [0.1312, 0.106, 0.2162, 0.121]}, {"w": "there’s", "b": [0.2223, 0.106, 0.275, 0.121]}, {"w": "a", "b": [0.2811, 0.106, 0.2902, 0.121]}, {"w": "chance", "b": [0.2964, 0.106, 0.3494, 0.121]}, {"w": "that", "b": [0.3556, 0.106, 0.3889, 0.121]}, {"w": "the", "b": [0.395, 0.106, 0.4203, 0.121]}, {"w": "external", "b": [0.4264, 0.106, 0.4906, 0.121]}, {"w": "system", "b": [0.4967, 0.106, 0.5509, 0.121]}, {"w": "evolves", "b": [0.5571, 0.106, 0.6127, 0.121]}, {"w": "with", "b": [0.6189, 0.106, 0.6542, 0.121]}, {"w": "time,", "b": [0.6604, 0.106, 0.7007, 0.121]}, {"w": "unbeknownst", "b": [0.7069, 0.106, 0.8109, 0.121]}, {"w": "to", "b": [0.8171, 0.106, 0.8333, 0.121]}, {"w": "you.", "b": [0.8394, 0.106, 0.8727, 0.121]}, {"w": "Furthermore,", "b": [0.1312, 0.124, 0.2391, 0.1389]}, {"w": "an", "b": [0.2452, 0.124, 0.2651, 0.1389]}, {"w": "external", "b": [0.2712, 0.124, 0.3375, 0.1389]}, {"w": "system’s", "b": [0.3436, 0.124, 0.4122, 0.1389]}, {"w": "owner", "b": [0.4184, 0.124, 0.4669, 0.1389]}, {"w": "might", "b": [0.4731, 0.124, 0.5205, 0.1389]}, {"w": "decide", "b": [0.5267, 0.124, 0.5778, 0.1389]}, {"w": "to", "b": [0.5839, 0.124, 0.6006, 0.1389]}, {"w": "use", "b": [0.6067, 0.124, 0.6329, 0.1389]}, {"w": "the", "b": [0.6391, 0.124, 0.6652, 0.1389]}, {"w": "output", "b": [0.6713, 0.124, 0.7266, 0.1389]}, {"w": "of", "b": [0.7327, 0.124, 0.7478, 0.1389]}, {"w": "your", "b": [0.754, 0.124, 0.7905, 0.1389]}, {"w": "model", "b": [0.7967, 0.124, 0.8462, 0.1389]}, {"w": "as", "b": [0.8523, 0.124, 0.8691, 0.1389]}, {"w": "the", "b": [0.1312, 0.1419, 0.1571, 0.1569]}, {"w": "input", "b": [0.1633, 0.1419, 0.2068, 0.1569]}, {"w": "for", "b": [0.2129, 0.1419, 0.2353, 0.1569]}, {"w": "their", "b": [0.2414, 0.1419, 0.2798, 0.1569]}, {"w": "model.", "b": [0.286, 0.1419, 0.3403, 0.1569]}, {"w": "This", "b": [0.3485, 0.1419, 0.3849, 0.1569]}, {"w": "creates", "b": [0.3911, 0.1419, 0.4472, 0.1569]}, {"w": "the", "b": [0.4533, 0.1419, 0.4792, 0.1569]}, {"w": "hidden", "b": [0.4852, 0.1422, 0.548, 0.1572]}, {"w": "feedback", "b": [0.555, 0.1422, 0.6349, 0.1572]}, {"w": "loop,", "b": [0.642, 0.1419, 0.6866, 0.1572]}, {"w": "a", "b": [0.6928, 0.1419, 0.7021, 0.1569]}, {"w": "situation", "b": [0.7083, 0.1419, 0.7798, 0.1569]}, {"w": "where", "b": [0.786, 0.1419, 0.8337, 0.1569]}, {"w": "you", "b": [0.8398, 0.1419, 0.8689, 0.1569]}, {"w": "influence", "b": [0.1312, 0.1599, 0.202, 0.1748]}, {"w": "the", "b": [0.2082, 0.1599, 0.2338, 0.1748]}, {"w": "phenomenon", "b": [0.24, 0.1599, 0.3415, 0.1748]}, {"w": "from", "b": [0.3476, 0.1599, 0.3851, 0.1748]}, {"w": "which", "b": [0.3912, 0.1599, 0.4379, 0.1748]}, {"w": "you", "b": [0.4441, 0.1599, 0.4728, 0.1748]}, {"w": "learn.", "b": [0.4789, 0.1599, 0.5241, 0.1748]}]}, {"id": "b_1", "type": "paragraph", "text": "4.12.3 Use IDs as Features when Needed. . .", "words": [{"w": "4.12.3", "b": [0.1312, 0.208, 0.1855, 0.223]}, {"w": "Use", "b": [0.2067, 0.208, 0.2411, 0.223]}, {"w": "IDs", "b": [0.2482, 0.208, 0.2809, 0.223]}, {"w": "as", "b": [0.288, 0.208, 0.3066, 0.223]}, {"w": "Features", "b": [0.3137, 0.208, 0.3922, 0.223]}, {"w": "when", "b": [0.3993, 0.208, 0.4479, 0.223]}, {"w": "Needed.", "b": [0.455, 0.208, 0.5303, 0.223]}, {"w": ".", "b": [0.5338, 0.208, 0.5397, 0.223]}, {"w": ".", "b": [0.5432, 0.208, 0.5491, 0.223]}]}, {"id": "b_2", "type": "paragraph", "text": "Use IDs as features when needed. This might seem counter-intuitive because unique IDs don’t contribute to generalization. However, the use of IDs allows creating one model that has one behavior in a general case, and different behaviors in other cases.", "words": [{"w": "Use", "b": [0.1312, 0.2443, 0.1612, 0.2593]}, {"w": "IDs", "b": [0.168, 0.2443, 0.1966, 0.2593]}, {"w": "as", "b": [0.2036, 0.2443, 0.2204, 0.2593]}, {"w": "features", "b": [0.2273, 0.2443, 0.2918, 0.2593]}, {"w": "when", "b": [0.2987, 0.2443, 0.3416, 0.2593]}, {"w": "needed.", "b": [0.3485, 0.2443, 0.4102, 0.2593]}, {"w": "This", "b": [0.4206, 0.2443, 0.4574, 0.2593]}, {"w": "might", "b": [0.4642, 0.2443, 0.5118, 0.2593]}, {"w": "seem", "b": [0.5187, 0.2443, 0.5586, 0.2593]}, {"w": "counter-intuitive", "b": [0.5655, 0.2443, 0.7015, 0.2593]}, {"w": "because", "b": [0.7084, 0.2443, 0.7718, 0.2593]}, {"w": "unique", "b": [0.7787, 0.2443, 0.8337, 0.2593]}, {"w": "IDs", "b": [0.8405, 0.2443, 0.8692, 0.2593]}, {"w": "don’t", "b": [0.1312, 0.2623, 0.1737, 0.2772]}, {"w": "contribute", "b": [0.1799, 0.2623, 0.2634, 0.2772]}, {"w": "to", "b": [0.2695, 0.2623, 0.2861, 0.2772]}, {"w": "generalization.", "b": [0.2923, 0.2623, 0.4105, 0.2772]}, {"w": "However,", "b": [0.4187, 0.2623, 0.4929, 0.2772]}, {"w": "the", "b": [0.499, 0.2623, 0.5249, 0.2772]}, {"w": "use", "b": [0.5311, 0.2623, 0.5571, 0.2772]}, {"w": "of", "b": [0.5633, 0.2623, 0.5783, 0.2772]}, {"w": "IDs", "b": [0.5844, 0.2623, 0.6128, 0.2772]}, {"w": "allows", "b": [0.6189, 0.2623, 0.6682, 0.2772]}, {"w": "creating", "b": [0.6744, 0.2623, 0.7398, 0.2772]}, {"w": "one", "b": [0.7459, 0.2623, 0.7739, 0.2772]}, {"w": "model", "b": [0.78, 0.2623, 0.8293, 0.2772]}, {"w": "that", "b": [0.8354, 0.2623, 0.8696, 0.2772]}, {"w": "has", "b": [0.1312, 0.2802, 0.158, 0.2952]}, {"w": "one", "b": [0.1641, 0.2802, 0.1918, 0.2952]}, {"w": "behavior", "b": [0.198, 0.2802, 0.2673, 0.2952]}, {"w": "in", "b": [0.2734, 0.2802, 0.2888, 0.2952]}, {"w": "a", "b": [0.295, 0.2802, 0.3042, 0.2952]}, {"w": "general", "b": [0.3103, 0.2802, 0.3678, 0.2952]}, {"w": "case,", "b": [0.374, 0.2802, 0.412, 0.2952]}, {"w": "and", "b": [0.4182, 0.2802, 0.4479, 0.2952]}, {"w": "different", "b": [0.4541, 0.2802, 0.5208, 0.2952]}, {"w": "behaviors", "b": [0.5269, 0.2802, 0.6035, 0.2952]}, {"w": "in", "b": [0.6096, 0.2802, 0.625, 0.2952]}, {"w": "other", "b": [0.6312, 0.2802, 0.6733, 0.2952]}, {"w": "cases.", "b": [0.6794, 0.2802, 0.7247, 0.2952]}]}, {"id": "b_3", "type": "paragraph", "text": "For example, you want to make predictions about some location (city or village), and you have some properties of the location as features. By using location ID as a feature, you can add the training examples for one general location, and train the model to behave differently in other specific locations.", "words": [{"w": "For", "b": [0.1312, 0.3071, 0.1587, 0.3221]}, {"w": "example,", "b": [0.1649, 0.3071, 0.2375, 0.3221]}, {"w": "you", "b": [0.2437, 0.3071, 0.2729, 0.3221]}, {"w": "want", "b": [0.2791, 0.3071, 0.3188, 0.3221]}, {"w": "to", "b": [0.3249, 0.3071, 0.3417, 0.3221]}, {"w": "make", "b": [0.3478, 0.3071, 0.3907, 0.3221]}, {"w": "predictions", "b": [0.3968, 0.3071, 0.4869, 0.3221]}, {"w": "about", "b": [0.493, 0.3071, 0.5405, 0.3221]}, {"w": "some", "b": [0.5467, 0.3071, 0.5875, 0.3221]}, {"w": "location", "b": [0.5937, 0.3071, 0.659, 0.3221]}, {"w": "(city", "b": [0.6651, 0.3071, 0.7028, 0.3221]}, {"w": "or", "b": [0.7089, 0.3071, 0.7257, 0.3221]}, {"w": "village),", "b": [0.7318, 0.3071, 0.7972, 0.3221]}, {"w": "and", "b": [0.8033, 0.3071, 0.8336, 0.3221]}, {"w": "you", "b": [0.8398, 0.3071, 0.869, 0.3221]}, {"w": "have", "b": [0.1312, 0.3251, 0.1675, 0.34]}, {"w": "some", "b": [0.1737, 0.3251, 0.2136, 0.34]}, {"w": "properties", "b": [0.2197, 0.3251, 0.3002, 0.34]}, {"w": "of", "b": [0.3063, 0.3251, 0.3211, 0.34]}, {"w": "the", "b": [0.3273, 0.3251, 0.3528, 0.34]}, {"w": "location", "b": [0.359, 0.3251, 0.4228, 0.34]}, {"w": "as", "b": [0.429, 0.3251, 0.4454, 0.34]}, {"w": "features.", "b": [0.4516, 0.3251, 0.5197, 0.34]}, {"w": "By", "b": [0.5279, 0.3251, 0.5507, 0.34]}, {"w": "using", "b": [0.5568, 0.3251, 0.5988, 0.34]}, {"w": "location", "b": [0.605, 0.3251, 0.6688, 0.34]}, {"w": "ID", "b": [0.675, 0.3251, 0.6956, 0.34]}, {"w": "as", "b": [0.7018, 0.3251, 0.7182, 0.34]}, {"w": "a", "b": [0.7244, 0.3251, 0.7336, 0.34]}, {"w": "feature,", "b": [0.7398, 0.3251, 0.8006, 0.34]}, {"w": "you", "b": [0.8068, 0.3251, 0.8354, 0.34]}, {"w": "can", "b": [0.8415, 0.3251, 0.8691, 0.34]}, {"w": "add", "b": [0.1312, 0.343, 0.1604, 0.358]}, {"w": "the", "b": [0.1665, 0.343, 0.1917, 0.358]}, {"w": "training", "b": [0.1978, 0.343, 0.2602, 0.358]}, {"w": "examples", "b": [0.2664, 0.343, 0.3384, 0.358]}, {"w": "for", "b": [0.3445, 0.343, 0.3662, 0.358]}, {"w": "one", "b": [0.3723, 0.343, 0.3995, 0.358]}, {"w": "general", "b": [0.4056, 0.343, 0.462, 0.358]}, {"w": "location,", "b": [0.4681, 0.343, 0.5361, 0.358]}, {"w": "and", "b": [0.5422, 0.343, 0.5714, 0.358]}, {"w": "train", "b": [0.5775, 0.343, 0.6158, 0.358]}, {"w": "the", "b": [0.6219, 0.343, 0.647, 0.358]}, {"w": "model", "b": [0.6532, 0.343, 0.701, 0.358]}, {"w": "to", "b": [0.7071, 0.343, 0.7232, 0.358]}, {"w": "behave", "b": [0.7293, 0.343, 0.7836, 0.358]}, {"w": "differently", "b": [0.7898, 0.343, 0.8698, 0.358]}, {"w": "in", "b": [0.1312, 0.361, 0.1466, 0.3759]}, {"w": "other", "b": [0.1528, 0.361, 0.1949, 0.3759]}, {"w": "specific", "b": [0.201, 0.361, 0.2591, 0.3759]}, {"w": "locations.", "b": [0.2652, 0.361, 0.3417, 0.3759]}]}, {"id": "b_4", "type": "paragraph", "text": "However, avoid using example ID as a feature.", "words": [{"w": "However,", "b": [0.1312, 0.3879, 0.2046, 0.4028]}, {"w": "avoid", "b": [0.2107, 0.3879, 0.2533, 0.4028]}, {"w": "using", "b": [0.2595, 0.3879, 0.3016, 0.4028]}, {"w": "example", "b": [0.3078, 0.3879, 0.3739, 0.4028]}, {"w": "ID", "b": [0.38, 0.3879, 0.4008, 0.4028]}, {"w": "as", "b": [0.4069, 0.3879, 0.4235, 0.4028]}, {"w": "a", "b": [0.4296, 0.3879, 0.4388, 0.4028]}, {"w": "feature.", "b": [0.445, 0.3879, 0.5061, 0.4028]}]}, {"id": "b_5", "type": "paragraph", "text": "4.12.4 . . . But Reduce the Cardinality When Possible", "words": [{"w": "4.12.4", "b": [0.1312, 0.436, 0.1855, 0.451]}, {"w": ".", "b": [0.2067, 0.436, 0.2126, 0.451]}, {"w": ".", "b": [0.2161, 0.436, 0.222, 0.451]}, {"w": ".", "b": [0.2256, 0.436, 0.2315, 0.451]}, {"w": "But", "b": [0.235, 0.436, 0.2701, 0.451]}, {"w": "Reduce", "b": [0.2772, 0.436, 0.3456, 0.451]}, {"w": "the", "b": [0.3526, 0.436, 0.3824, 0.451]}, {"w": "Cardinality", "b": [0.3895, 0.436, 0.4943, 0.451]}, {"w": "When", "b": [0.5014, 0.436, 0.5566, 0.451]}, {"w": "Possible", "b": [0.5637, 0.436, 0.6383, 0.451]}]}, {"id": "b_6", "type": "paragraph", "text": "Use categorical features with many values (more than a dozen) only when you want the model to have different “modes” of behavior that depend on that categorical feature. Typical examples of this are zip code (postal code) or country. You might consider using the categorical feature “Country” if you want the model to behave differently in Russia versus the United States, for otherwise similar inputs.9", "words": [{"w": "Use", "b": [0.1312, 0.4723, 0.1612, 0.4873]}, {"w": "categorical", "b": [0.1684, 0.4723, 0.2563, 0.4873]}, {"w": "features", "b": [0.2635, 0.4723, 0.3281, 0.4873]}, {"w": "with", "b": [0.3353, 0.4723, 0.3719, 0.4873]}, {"w": "many", "b": [0.3791, 0.4723, 0.4241, 0.4873]}, {"w": "values", "b": [0.4313, 0.4723, 0.4812, 0.4873]}, {"w": "(more", "b": [0.4884, 0.4723, 0.5366, 0.4873]}, {"w": "than", "b": [0.5438, 0.4723, 0.5814, 0.4873]}, {"w": "a", "b": [0.5887, 0.4723, 0.5981, 0.4873]}, {"w": "dozen)", "b": [0.6053, 0.4723, 0.6597, 0.4873]}, {"w": "only", "b": [0.667, 0.4723, 0.702, 0.4873]}, {"w": "when", "b": [0.7093, 0.4723, 0.7521, 0.4873]}, {"w": "you", "b": [0.7594, 0.4723, 0.7887, 0.4873]}, {"w": "want", "b": [0.7959, 0.4723, 0.8357, 0.4873]}, {"w": "the", "b": [0.8429, 0.4723, 0.8691, 0.4873]}, {"w": "model", "b": [0.1312, 0.4903, 0.179, 0.5052]}, {"w": "to", "b": [0.1848, 0.4903, 0.2009, 0.5052]}, {"w": "have", "b": [0.2067, 0.4903, 0.2423, 0.5052]}, {"w": "different", "b": [0.2481, 0.4903, 0.3135, 0.5052]}, {"w": "“modes”", "b": [0.3193, 0.4903, 0.3862, 0.5052]}, {"w": "of", "b": [0.392, 0.4903, 0.4066, 0.5052]}, {"w": "behavior", "b": [0.4124, 0.4903, 0.4803, 0.5052]}, {"w": "that", "b": [0.4861, 0.4903, 0.5193, 0.5052]}, {"w": "depend", "b": [0.5251, 0.4903, 0.5819, 0.5052]}, {"w": "on", "b": [0.5877, 0.4903, 0.6068, 0.5052]}, {"w": "that", "b": [0.6126, 0.4903, 0.6458, 0.5052]}, {"w": "categorical", "b": [0.6516, 0.4903, 0.7361, 0.5052]}, {"w": "feature.", "b": [0.7419, 0.4903, 0.8017, 0.5052]}, {"w": "Typical", "b": [0.8098, 0.4903, 0.8691, 0.5052]}, {"w": "examples", "b": [0.1312, 0.5082, 0.2032, 0.5232]}, {"w": "of", "b": [0.2076, 0.5082, 0.2222, 0.5232]}, {"w": "this", "b": [0.2266, 0.5082, 0.2558, 0.5232]}, {"w": "are", "b": [0.2602, 0.5082, 0.2844, 0.5232]}, {"w": "zip", "b": [0.2888, 0.5082, 0.3119, 0.5232]}, {"w": "code", "b": [0.3164, 0.5082, 0.352, 0.5232]}, {"w": "(postal", "b": [0.3565, 0.5082, 0.4113, 0.5232]}, {"w": "code)", "b": [0.4157, 0.5082, 0.4585, 0.5232]}, {"w": "or", "b": [0.4629, 0.5082, 0.479, 0.5232]}, {"w": "country.", "b": [0.4834, 0.5082, 0.5473, 0.5232]}, {"w": "You", "b": [0.5549, 0.5082, 0.586, 0.5232]}, {"w": "might", "b": [0.5904, 0.5082, 0.6361, 0.5232]}, {"w": "consider", "b": [0.6405, 0.5082, 0.705, 0.5232]}, {"w": "using", "b": [0.7094, 0.5082, 0.7507, 0.5232]}, {"w": "the", "b": [0.7551, 0.5082, 0.7803, 0.5232]}, {"w": "categorical", "b": [0.7847, 0.5082, 0.8691, 0.5232]}, {"w": "feature", "b": [0.1312, 0.5262, 0.1879, 0.5411]}, {"w": "“Country”", "b": [0.194, 0.5262, 0.2791, 0.5411]}, {"w": "if", "b": [0.2853, 0.5262, 0.2962, 0.5411]}, {"w": "you", "b": [0.3024, 0.5262, 0.3314, 0.5411]}, {"w": "want", "b": [0.3376, 0.5262, 0.377, 0.5411]}, {"w": "the", "b": [0.3832, 0.5262, 0.4091, 0.5411]}, {"w": "model", "b": [0.4153, 0.5262, 0.4646, 0.5411]}, {"w": "to", "b": [0.4707, 0.5262, 0.4873, 0.5411]}, {"w": "behave", "b": [0.4935, 0.5262, 0.5495, 0.5411]}, {"w": "differently", "b": [0.5557, 0.5262, 0.6383, 0.5411]}, {"w": "in", "b": [0.6444, 0.5262, 0.66, 0.5411]}, {"w": "Russia", "b": [0.6662, 0.5262, 0.7191, 0.5411]}, {"w": "versus", "b": [0.7252, 0.5262, 0.7753, 0.5411]}, {"w": "the", "b": [0.7815, 0.5262, 0.8074, 0.5411]}, {"w": "United", "b": [0.8136, 0.5262, 0.8691, 0.5411]}, {"w": "States,", "b": [0.1312, 0.5441, 0.1857, 0.5591]}, {"w": "for", "b": [0.1918, 0.5441, 0.2139, 0.5591]}, {"w": "otherwise", "b": [0.2201, 0.5441, 0.2961, 0.5591]}, {"w": "similar", "b": [0.3023, 0.5441, 0.3568, 0.5591]}, {"w": "inputs.9", "b": [0.3629, 0.5425, 0.4256, 0.5591]}]}, {"id": "b_7", "type": "paragraph", "text": "If you have a categorical feature with many values, but you do not need a model that has several modes depending on that feature, try to reduce the cardinality (i.e., the number of distinct values) of that feature. There are several ways to do that. We already considered one of them, feature hashing, in Section 4.2.4. Other techniques are briefly discussed below:", "words": [{"w": "If", "b": [0.1312, 0.571, 0.1438, 0.586]}, {"w": "you", "b": [0.1499, 0.571, 0.1792, 0.586]}, {"w": "have", "b": [0.1854, 0.571, 0.2225, 0.586]}, {"w": "a", "b": [0.2287, 0.571, 0.2381, 0.586]}, {"w": "categorical", "b": [0.2443, 0.571, 0.3322, 0.586]}, {"w": "feature", "b": [0.3383, 0.571, 0.3954, 0.586]}, {"w": "with", "b": [0.4016, 0.571, 0.4382, 0.586]}, {"w": "many", "b": [0.4443, 0.571, 0.4893, 0.586]}, {"w": "values,", "b": [0.4954, 0.571, 0.5505, 0.586]}, {"w": "but", "b": [0.5567, 0.571, 0.5849, 0.586]}, {"w": "you", "b": [0.5911, 0.571, 0.6204, 0.586]}, {"w": "do", "b": [0.6265, 0.571, 0.6464, 0.586]}, {"w": "not", "b": [0.6525, 0.571, 0.6797, 0.586]}, {"w": "need", "b": [0.6859, 0.571, 0.7236, 0.586]}, {"w": "a", "b": [0.7297, 0.571, 0.7391, 0.586]}, {"w": "model", "b": [0.7453, 0.571, 0.7949, 0.586]}, {"w": "that", "b": [0.8011, 0.571, 0.8356, 0.586]}, {"w": "has", "b": [0.8418, 0.571, 0.8691, 0.586]}, {"w": "several", "b": [0.1312, 0.589, 0.1864, 0.6039]}, {"w": "modes", "b": [0.1925, 0.589, 0.2439, 0.6039]}, {"w": "depending", "b": [0.2501, 0.589, 0.3336, 0.6039]}, {"w": "on", "b": [0.3397, 0.589, 0.3594, 0.6039]}, {"w": "that", "b": [0.3656, 0.589, 0.3998, 0.6039]}, {"w": "feature,", "b": [0.4059, 0.589, 0.4677, 0.6039]}, {"w": "try", "b": [0.4739, 0.589, 0.4983, 0.6039]}, {"w": "to", "b": [0.5044, 0.589, 0.521, 0.6039]}, {"w": "reduce", "b": [0.5272, 0.589, 0.5801, 0.6039]}, {"w": "the", "b": [0.5863, 0.589, 0.6122, 0.6039]}, {"w": "cardinality", "b": [0.6184, 0.589, 0.7055, 0.6039]}, {"w": "(i.e.,", "b": [0.7117, 0.589, 0.748, 0.6039]}, {"w": "the", "b": [0.7541, 0.589, 0.7801, 0.6039]}, {"w": "number", "b": [0.7862, 0.589, 0.848, 0.6039]}, {"w": "of", "b": [0.8541, 0.589, 0.8692, 0.6039]}, {"w": "distinct", "b": [0.1312, 0.6069, 0.1906, 0.6219]}, {"w": "values)", "b": [0.1962, 0.6069, 0.2511, 0.6219]}, {"w": "of", "b": [0.2566, 0.6069, 0.2712, 0.6219]}, {"w": "that", "b": [0.2768, 0.6069, 0.3099, 0.6219]}, {"w": "feature.", "b": [0.3155, 0.6069, 0.3754, 0.6219]}, {"w": "There", "b": [0.3834, 0.6069, 0.4297, 0.6219]}, {"w": "are", "b": [0.4352, 0.6069, 0.4594, 0.6219]}, {"w": "several", "b": [0.465, 0.6069, 0.5184, 0.6219]}, {"w": "ways", "b": [0.524, 0.6069, 0.5617, 0.6219]}, {"w": "to", "b": [0.5673, 0.6069, 0.5834, 0.6219]}, {"w": "do", "b": [0.5889, 0.6069, 0.608, 0.6219]}, {"w": "that.", "b": [0.6136, 0.6069, 0.6518, 0.6219]}, {"w": "We", "b": [0.6598, 0.6069, 0.6849, 0.6219]}, {"w": "already", "b": [0.6904, 0.6069, 0.7483, 0.6219]}, {"w": "considered", "b": [0.7538, 0.6069, 0.8364, 0.6219]}, {"w": "one", "b": [0.842, 0.6069, 0.8691, 0.6219]}, {"w": "of", "b": [0.1312, 0.6249, 0.1461, 0.6398]}, {"w": "them,", "b": [0.1522, 0.6249, 0.1984, 0.6398]}, {"w": "feature", "b": [0.2045, 0.6252, 0.2695, 0.6401]}, {"w": "hashing,", "b": [0.2766, 0.6249, 0.3525, 0.6401]}, {"w": "in", "b": [0.3586, 0.6249, 0.374, 0.6398]}, {"w": "Section", "b": [0.3802, 0.6249, 0.4386, 0.6398]}, {"w": "4.2.4.", "b": [0.4448, 0.6249, 0.4878, 0.6398]}, {"w": "Other", "b": [0.496, 0.6249, 0.5433, 0.6398]}, {"w": "techniques", "b": [0.5494, 0.6249, 0.6336, 0.6398]}, {"w": "are", "b": [0.6398, 0.6249, 0.6644, 0.6398]}, {"w": "briefly", "b": [0.6706, 0.6249, 0.7214, 0.6398]}, {"w": "discussed", "b": [0.7276, 0.6249, 0.8018, 0.6398]}, {"w": "below:", "b": [0.8079, 0.6249, 0.8592, 0.6398]}]}, {"id": "b_8", "type": "paragraph", "text": "Group similar values", "words": [{"w": "Group", "b": [0.1312, 0.6521, 0.1908, 0.667]}, {"w": "similar", "b": [0.1979, 0.6521, 0.2607, 0.667]}, {"w": "values", "b": [0.2678, 0.6521, 0.3239, 0.667]}]}, {"id": "b_9", "type": "paragraph", "text": "Try to group some values into the same category. For example, if you think it’s unlikely that, within one region, different locations might need different predictions, then group all postal codes from the same state into one state code. Group states into regions.", "words": [{"w": "Try", "b": [0.1767, 0.6697, 0.2048, 0.6847]}, {"w": "to", "b": [0.2106, 0.6697, 0.2266, 0.6847]}, {"w": "group", "b": [0.2324, 0.6697, 0.2777, 0.6847]}, {"w": "some", "b": [0.2834, 0.6697, 0.3227, 0.6847]}, {"w": "values", "b": [0.3284, 0.6697, 0.3762, 0.6847]}, {"w": "into", "b": [0.3819, 0.6697, 0.4126, 0.6847]}, {"w": "the", "b": [0.4183, 0.6697, 0.4434, 0.6847]}, {"w": "same", "b": [0.4492, 0.6697, 0.4885, 0.6847]}, {"w": "category.", "b": [0.4942, 0.6697, 0.5646, 0.6847]}, {"w": "For", "b": [0.5726, 0.6697, 0.599, 0.6847]}, {"w": "example,", "b": [0.6047, 0.6697, 0.6746, 0.6847]}, {"w": "if", "b": [0.6804, 0.6697, 0.6909, 0.6847]}, {"w": "you", "b": [0.6967, 0.6697, 0.7248, 0.6847]}, {"w": "think", "b": [0.7305, 0.6697, 0.7723, 0.6847]}, {"w": "it’s", "b": [0.778, 0.6697, 0.8022, 0.6847]}, {"w": "unlikely", "b": [0.8079, 0.6697, 0.8697, 0.6847]}, {"w": "that,", "b": [0.1774, 0.6877, 0.2156, 0.7026]}, {"w": "within", "b": [0.2217, 0.6877, 0.272, 0.7026]}, {"w": "one", "b": [0.2782, 0.6877, 0.3053, 0.7026]}, {"w": "region,", "b": [0.3115, 0.6877, 0.3648, 0.7026]}, {"w": "different", "b": [0.371, 0.6877, 0.4364, 0.7026]}, {"w": "locations", "b": [0.4426, 0.6877, 0.5126, 0.7026]}, {"w": "might", "b": [0.5187, 0.6877, 0.5645, 0.7026]}, {"w": "need", "b": [0.5706, 0.6877, 0.6069, 0.7026]}, {"w": "different", "b": [0.613, 0.6877, 0.6784, 0.7026]}, {"w": "predictions,", "b": [0.6846, 0.6877, 0.7763, 0.7026]}, {"w": "then", "b": [0.7824, 0.6877, 0.8177, 0.7026]}, {"w": "group", "b": [0.8238, 0.6877, 0.8691, 0.7026]}, {"w": "all", "b": [0.1774, 0.7056, 0.1968, 0.7206]}, {"w": "postal", "b": [0.203, 0.7056, 0.2518, 0.7206]}, {"w": "codes", "b": [0.2579, 0.7056, 0.3017, 0.7206]}, {"w": "from", "b": [0.3078, 0.7056, 0.3453, 0.7206]}, {"w": "the", "b": [0.3514, 0.7056, 0.3771, 0.7206]}, {"w": "same", "b": [0.3832, 0.7056, 0.4233, 0.7206]}, {"w": "state", "b": [0.4294, 0.7056, 0.4685, 0.7206]}, {"w": "into", "b": [0.4747, 0.7056, 0.5059, 0.7206]}, {"w": "one", "b": [0.5121, 0.7056, 0.5398, 0.7206]}, {"w": "state", "b": [0.5459, 0.7056, 0.585, 0.7206]}, {"w": "code.", "b": [0.5912, 0.7056, 0.6327, 0.7206]}, {"w": "Group", "b": [0.6409, 0.7056, 0.6923, 0.7206]}, {"w": "states", "b": [0.6985, 0.7056, 0.7449, 0.7206]}, {"w": "into", "b": [0.751, 0.7056, 0.7823, 0.7206]}, {"w": "regions.", "b": [0.7884, 0.7056, 0.8501, 0.7206]}]}, {"id": "b_10", "type": "paragraph", "text": "Group the long tail", "words": [{"w": "Group", "b": [0.1312, 0.7328, 0.1908, 0.7478]}, {"w": "the", "b": [0.1979, 0.7328, 0.2277, 0.7478]}, {"w": "long", "b": [0.2348, 0.7328, 0.2737, 0.7478]}, {"w": "tail", "b": [0.2807, 0.7328, 0.3111, 0.7478]}]}, {"id": "b_11", "type": "paragraph", "text": "Likewise, try to group the long tail of infrequent values under the name \"Other,\" or merge them with similar frequent values.", "words": [{"w": "Likewise,", "b": [0.1774, 0.7505, 0.252, 0.7654]}, {"w": "try", "b": [0.2586, 0.7505, 0.2832, 0.7654]}, {"w": "to", "b": [0.2898, 0.7505, 0.3065, 0.7654]}, {"w": "group", "b": [0.313, 0.7505, 0.3601, 0.7654]}, {"w": "the", "b": [0.3667, 0.7505, 0.3928, 0.7654]}, {"w": "long", "b": [0.3994, 0.7505, 0.4339, 0.7654]}, {"w": "tail", "b": [0.4404, 0.7505, 0.4676, 0.7654]}, {"w": "of", "b": [0.4741, 0.7505, 0.4893, 0.7654]}, {"w": "infrequent", "b": [0.4958, 0.7505, 0.579, 0.7654]}, {"w": "values", "b": [0.5856, 0.7505, 0.6354, 0.7654]}, {"w": "under", "b": [0.6419, 0.7505, 0.689, 0.7654]}, {"w": "the", "b": [0.6956, 0.7505, 0.7217, 0.7654]}, {"w": "name", "b": [0.7282, 0.7505, 0.7722, 0.7654]}, {"w": "\"Other,\"", "b": [0.7787, 0.7505, 0.8462, 0.7654]}, {"w": "or", "b": [0.8527, 0.7505, 0.8695, 0.7654]}, {"w": "merge", "b": [0.1774, 0.7684, 0.2256, 0.7834]}, {"w": "them", "b": [0.2317, 0.7684, 0.2728, 0.7834]}, {"w": "with", "b": [0.2789, 0.7684, 0.3148, 0.7834]}, {"w": "similar", "b": [0.3209, 0.7684, 0.3754, 0.7834]}, {"w": "frequent", "b": [0.3816, 0.7684, 0.4478, 0.7834]}, {"w": "values.", "b": [0.4539, 0.7684, 0.5079, 0.7834]}]}, {"id": "b_12", "type": "paragraph", "text": "9Often, what you want your model to do and what the data dictates are two very different things. Even if you think that the model must make similar predictions independently of the country, in reality, you might get poor model performance because the distribution of labels in the training data is different for different countries.", "words": [{"w": "9Often,", "b": [0.1518, 0.7955, 0.2017, 0.8093]}, {"w": "what", "b": [0.2069, 0.7975, 0.2401, 0.8093]}, {"w": "you", "b": [0.2453, 0.7975, 0.2692, 0.8093]}, {"w": "want", "b": [0.2743, 0.7975, 0.3067, 0.8093]}, {"w": "your", "b": [0.3118, 0.7975, 0.3417, 0.8093]}, {"w": "model", "b": [0.3469, 0.7975, 0.3874, 0.8093]}, {"w": "to", "b": [0.3925, 0.7975, 0.4062, 0.8093]}, {"w": "do", "b": [0.4113, 0.7975, 0.4275, 0.8093]}, {"w": "and", "b": [0.4327, 0.7975, 0.4574, 0.8093]}, {"w": "what", "b": [0.4625, 0.7975, 0.4958, 0.8093]}, {"w": "the", "b": [0.5009, 0.7975, 0.5223, 0.8093]}, {"w": "data", "b": [0.5274, 0.7975, 0.5573, 0.8093]}, {"w": "dictates", "b": [0.5624, 0.7975, 0.6146, 0.8093]}, {"w": "are", "b": [0.6197, 0.7975, 0.6402, 0.8093]}, {"w": "two", "b": [0.6453, 0.7975, 0.6692, 0.8093]}, {"w": "very", "b": [0.6743, 0.7975, 0.7029, 0.8093]}, {"w": "different", "b": [0.7081, 0.7975, 0.7636, 0.8093]}, {"w": "things.", "b": [0.7687, 0.7975, 0.814, 0.8093]}, {"w": "Even", "b": [0.8209, 0.7975, 0.8544, 0.8093]}, {"w": "if", "b": [0.8596, 0.7975, 0.8685, 0.8093]}, {"w": "you", "b": [0.1308, 0.8116, 0.1553, 0.8236]}, {"w": "think", "b": [0.1605, 0.8116, 0.1968, 0.8236]}, {"w": "that", "b": [0.202, 0.8116, 0.2308, 0.8236]}, {"w": "the", "b": [0.236, 0.8116, 0.2579, 0.8236]}, {"w": "model", "b": [0.2631, 0.8116, 0.3046, 0.8236]}, {"w": "must", "b": [0.3098, 0.8116, 0.3435, 0.8236]}, {"w": "make", "b": [0.3487, 0.8116, 0.3845, 0.8236]}, {"w": "similar", "b": [0.3898, 0.8116, 0.4362, 0.8236]}, {"w": "predictions", "b": [0.4414, 0.8116, 0.5166, 0.8236]}, {"w": "independently", "b": [0.5218, 0.8116, 0.6183, 0.8236]}, {"w": "of", "b": [0.6236, 0.8116, 0.6362, 0.8236]}, {"w": "the", "b": [0.6415, 0.8116, 0.6633, 0.8236]}, {"w": "country,", "b": [0.6685, 0.8116, 0.724, 0.8236]}, {"w": "in", "b": [0.7292, 0.8116, 0.7423, 0.8236]}, {"w": "reality,", "b": [0.7475, 0.8116, 0.7943, 0.8236]}, {"w": "you", "b": [0.7995, 0.8116, 0.824, 0.8236]}, {"w": "might", "b": [0.8292, 0.8116, 0.869, 0.8236]}, {"w": "get", "b": [0.1312, 0.8257, 0.1524, 0.8378]}, {"w": "poor", "b": [0.1576, 0.8257, 0.1894, 0.8378]}, {"w": "model", "b": [0.1946, 0.8257, 0.2364, 0.8378]}, {"w": "performance", "b": [0.2417, 0.8257, 0.3272, 0.8378]}, {"w": "because", "b": [0.3324, 0.8257, 0.3858, 0.8378]}, {"w": "the", "b": [0.3911, 0.8257, 0.4131, 0.8378]}, {"w": "distribution", "b": [0.4183, 0.8257, 0.4995, 0.8378]}, {"w": "of", "b": [0.5047, 0.8257, 0.5175, 0.8378]}, {"w": "labels", "b": [0.5228, 0.8257, 0.562, 0.8378]}, {"w": "in", "b": [0.5673, 0.8257, 0.5805, 0.8378]}, {"w": "the", "b": [0.5857, 0.8257, 0.6078, 0.8378]}, {"w": "training", "b": [0.613, 0.8257, 0.6677, 0.8378]}, {"w": "data", "b": [0.6729, 0.8257, 0.7037, 0.8378]}, {"w": "is", "b": [0.709, 0.8257, 0.7196, 0.8378]}, {"w": "different", "b": [0.7249, 0.8257, 0.7822, 0.8378]}, {"w": "for", "b": [0.7874, 0.8257, 0.8064, 0.8378]}, {"w": "different", "b": [0.8116, 0.8257, 0.8689, 0.8378]}, {"w": "countries.", "b": [0.1312, 0.84, 0.1971, 0.852]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 45", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "45", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 135, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Remove the feature", "words": [{"w": "Remove", "b": [0.1312, 0.0884, 0.2049, 0.1034]}, {"w": "the", "b": [0.212, 0.0884, 0.2417, 0.1034]}, {"w": "feature", "b": [0.2488, 0.0884, 0.3138, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "If all, or almost all, values of a categorical feature are unique, or one value dominates all other values, consider removing the feature entirely.", "words": [{"w": "If", "b": [0.1774, 0.106, 0.1897, 0.121]}, {"w": "all,", "b": [0.1958, 0.106, 0.2205, 0.121]}, {"w": "or", "b": [0.2267, 0.106, 0.2432, 0.121]}, {"w": "almost", "b": [0.2493, 0.106, 0.3029, 0.121]}, {"w": "all,", "b": [0.309, 0.106, 0.3337, 0.121]}, {"w": "values", "b": [0.3398, 0.106, 0.3888, 0.121]}, {"w": "of", "b": [0.3949, 0.106, 0.4098, 0.121]}, {"w": "a", "b": [0.416, 0.106, 0.4252, 0.121]}, {"w": "categorical", "b": [0.4314, 0.106, 0.5178, 0.121]}, {"w": "feature", "b": [0.5239, 0.106, 0.5801, 0.121]}, {"w": "are", "b": [0.5862, 0.106, 0.6109, 0.121]}, {"w": "unique,", "b": [0.6171, 0.106, 0.6762, 0.121]}, {"w": "or", "b": [0.6823, 0.106, 0.6989, 0.121]}, {"w": "one", "b": [0.705, 0.106, 0.7328, 0.121]}, {"w": "value", "b": [0.7389, 0.106, 0.7806, 0.121]}, {"w": "dominates", "b": [0.7867, 0.106, 0.8691, 0.121]}, {"w": "all", "b": [0.1774, 0.124, 0.1968, 0.1389]}, {"w": "other", "b": [0.203, 0.124, 0.2451, 0.1389]}, {"w": "values,", "b": [0.2512, 0.124, 0.3052, 0.1389]}, {"w": "consider", "b": [0.3113, 0.124, 0.3771, 0.1389]}, {"w": "removing", "b": [0.3833, 0.124, 0.4572, 0.1389]}, {"w": "the", "b": [0.4633, 0.124, 0.4889, 0.1389]}, {"w": "feature", "b": [0.4951, 0.124, 0.5511, 0.1389]}, {"w": "entirely.", "b": [0.5572, 0.124, 0.6214, 0.1389]}]}, {"id": "b_2", "type": "paragraph", "text": "The reduction of a feature’s granularity should be made with care. Categorical features often have functional dependencies with other categorical features, and their predictive power often comes from their combinations. Take state and city as an example. If we decide to group or remove some values in the state feature, we might inadvertently destroy the information that would allow the model to distinguish one “Springfield” from another.", "words": [{"w": "The", "b": [0.1306, 0.1509, 0.1617, 0.1659]}, {"w": "reduction", "b": [0.1677, 0.1509, 0.2421, 0.1659]}, {"w": "of", "b": [0.2481, 0.1509, 0.2626, 0.1659]}, {"w": "a", "b": [0.2686, 0.1509, 0.2776, 0.1659]}, {"w": "feature’s", "b": [0.2836, 0.1509, 0.3506, 0.1659]}, {"w": "granularity", "b": [0.3566, 0.1509, 0.4436, 0.1659]}, {"w": "should", "b": [0.4495, 0.1509, 0.5009, 0.1659]}, {"w": "be", "b": [0.5068, 0.1509, 0.5254, 0.1659]}, {"w": "made", "b": [0.5314, 0.1509, 0.5736, 0.1659]}, {"w": "with", "b": [0.5796, 0.1509, 0.6147, 0.1659]}, {"w": "care.", "b": [0.6207, 0.1509, 0.6579, 0.1659]}, {"w": "Categorical", "b": [0.6661, 0.1509, 0.7555, 0.1659]}, {"w": "features", "b": [0.7615, 0.1509, 0.8235, 0.1659]}, {"w": "often", "b": [0.8294, 0.1509, 0.8691, 0.1659]}, {"w": "have", "b": [0.1312, 0.1689, 0.1669, 0.1838]}, {"w": "functional", "b": [0.1725, 0.1689, 0.2514, 0.1838]}, {"w": "dependencies", "b": [0.2571, 0.1689, 0.3602, 0.1838]}, {"w": "with", "b": [0.3658, 0.1689, 0.401, 0.1838]}, {"w": "other", "b": [0.4067, 0.1689, 0.4479, 0.1838]}, {"w": "categorical", "b": [0.4535, 0.1689, 0.538, 0.1838]}, {"w": "features,", "b": [0.5436, 0.1689, 0.6106, 0.1838]}, {"w": "and", "b": [0.6164, 0.1689, 0.6455, 0.1838]}, {"w": "their", "b": [0.6512, 0.1689, 0.6884, 0.1838]}, {"w": "predictive", "b": [0.694, 0.1689, 0.7715, 0.1838]}, {"w": "power", "b": [0.7771, 0.1689, 0.8239, 0.1838]}, {"w": "often", "b": [0.8295, 0.1689, 0.8692, 0.1838]}, {"w": "comes", "b": [0.1312, 0.1868, 0.1791, 0.2018]}, {"w": "from", "b": [0.1852, 0.1868, 0.2223, 0.2018]}, {"w": "their", "b": [0.2285, 0.1868, 0.2661, 0.2018]}, {"w": "combinations.", "b": [0.2722, 0.1868, 0.3825, 0.2018]}, {"w": "Take", "b": [0.3907, 0.1868, 0.4287, 0.2018]}, {"w": "state", "b": [0.4349, 0.1868, 0.4736, 0.2018]}, {"w": "and", "b": [0.4797, 0.1868, 0.5092, 0.2018]}, {"w": "city", "b": [0.5153, 0.1868, 0.5448, 0.2018]}, {"w": "as", "b": [0.5509, 0.1868, 0.5673, 0.2018]}, {"w": "an", "b": [0.5734, 0.1868, 0.5927, 0.2018]}, {"w": "example.", "b": [0.5989, 0.1868, 0.6694, 0.2018]}, {"w": "If", "b": [0.6776, 0.1868, 0.6898, 0.2018]}, {"w": "we", "b": [0.696, 0.1868, 0.7168, 0.2018]}, {"w": "decide", "b": [0.7229, 0.1868, 0.7727, 0.2018]}, {"w": "to", "b": [0.7789, 0.1868, 0.7951, 0.2018]}, {"w": "group", "b": [0.8013, 0.1868, 0.847, 0.2018]}, {"w": "or", "b": [0.8531, 0.1868, 0.8694, 0.2018]}, {"w": "remove", "b": [0.1312, 0.2048, 0.187, 0.2197]}, {"w": "some", "b": [0.1931, 0.2048, 0.2324, 0.2197]}, {"w": "values", "b": [0.2384, 0.2048, 0.2862, 0.2197]}, {"w": "in", "b": [0.2923, 0.2048, 0.3073, 0.2197]}, {"w": "the", "b": [0.3134, 0.2048, 0.3385, 0.2197]}, {"w": "state", "b": [0.3445, 0.2048, 0.3828, 0.2197]}, {"w": "feature,", "b": [0.3889, 0.2048, 0.4487, 0.2197]}, {"w": "we", "b": [0.4548, 0.2048, 0.4754, 0.2197]}, {"w": "might", "b": [0.4814, 0.2048, 0.5271, 0.2197]}, {"w": "inadvertently", "b": [0.5332, 0.2048, 0.6377, 0.2197]}, {"w": "destroy", "b": [0.6438, 0.2048, 0.7012, 0.2197]}, {"w": "the", "b": [0.7072, 0.2048, 0.7324, 0.2197]}, {"w": "information", "b": [0.7384, 0.2048, 0.8304, 0.2197]}, {"w": "that", "b": [0.8364, 0.2048, 0.8696, 0.2197]}, {"w": "would", "b": [0.1306, 0.2227, 0.1782, 0.2377]}, {"w": "allow", "b": [0.1844, 0.2227, 0.2259, 0.2377]}, {"w": "the", "b": [0.2321, 0.2227, 0.2577, 0.2377]}, {"w": "model", "b": [0.2638, 0.2227, 0.3126, 0.2377]}, {"w": "to", "b": [0.3187, 0.2227, 0.3351, 0.2377]}, {"w": "distinguish", "b": [0.3413, 0.2227, 0.4286, 0.2377]}, {"w": "one", "b": [0.4348, 0.2227, 0.4625, 0.2377]}, {"w": "“Springfield”", "b": [0.4686, 0.2227, 0.5722, 0.2377]}, {"w": "from", "b": [0.5784, 0.2227, 0.6159, 0.2377]}, {"w": "another.", "b": [0.622, 0.2227, 0.6887, 0.2377]}]}, {"id": "b_3", "type": "paragraph", "text": "4.12.5 Use Counts with Caution", "words": [{"w": "4.12.5", "b": [0.1312, 0.2709, 0.1855, 0.2858]}, {"w": "Use", "b": [0.2067, 0.2709, 0.2411, 0.2858]}, {"w": "Counts", "b": [0.2482, 0.2709, 0.3137, 0.2858]}, {"w": "with", "b": [0.3208, 0.2709, 0.3621, 0.2858]}, {"w": "Caution", "b": [0.3692, 0.2709, 0.4431, 0.2858]}]}, {"id": "b_4", "type": "paragraph", "text": "Use features based on counts with caution. Some counts remain roughly in the same bounds over time. For example, in bag-of-words, if you use the count of each token instead of the binary value, then it’s not a problem, as long as the input document length doesn’t grow or shrink with time. But, if you have a feature like “Number of calls since subscription” for a customer of a growing mobile phone provider, some oldtimers can have a very high number of calls, compared to the newer customer base. On the other hand, the training data could have been built when the company was still young and didn’t have any oldtimers.", "words": [{"w": "Use", "b": [0.1312, 0.3071, 0.1601, 0.3221]}, {"w": "features", "b": [0.1663, 0.3071, 0.2285, 0.3221]}, {"w": "based", "b": [0.2346, 0.3071, 0.2791, 0.3221]}, {"w": "on", "b": [0.2853, 0.3071, 0.3045, 0.3221]}, {"w": "counts", "b": [0.3106, 0.3071, 0.3617, 0.3221]}, {"w": "with", "b": [0.3678, 0.3071, 0.4031, 0.3221]}, {"w": "caution.", "b": [0.4093, 0.3071, 0.4729, 0.3221]}, {"w": "Some", "b": [0.4811, 0.3071, 0.5234, 0.3221]}, {"w": "counts", "b": [0.5296, 0.3071, 0.5806, 0.3221]}, {"w": "remain", "b": [0.5868, 0.3071, 0.6413, 0.3221]}, {"w": "roughly", "b": [0.6475, 0.3071, 0.7076, 0.3221]}, {"w": "in", "b": [0.7137, 0.3071, 0.7289, 0.3221]}, {"w": "the", "b": [0.735, 0.3071, 0.7602, 0.3221]}, {"w": "same", "b": [0.7664, 0.3071, 0.8058, 0.3221]}, {"w": "bounds", "b": [0.812, 0.3071, 0.8691, 0.3221]}, {"w": "over", "b": [0.1312, 0.3251, 0.1653, 0.34]}, {"w": "time.", "b": [0.1715, 0.3251, 0.2133, 0.34]}, {"w": "For", "b": [0.2217, 0.3251, 0.2493, 0.34]}, {"w": "example,", "b": [0.2555, 0.3251, 0.3282, 0.34]}, {"w": "in", "b": [0.3344, 0.3251, 0.3501, 0.34]}, {"w": "bag-of-words,", "b": [0.3563, 0.3251, 0.4663, 0.34]}, {"w": "if", "b": [0.4725, 0.3251, 0.4835, 0.34]}, {"w": "you", "b": [0.4897, 0.3251, 0.519, 0.34]}, {"w": "use", "b": [0.5252, 0.3251, 0.5515, 0.34]}, {"w": "the", "b": [0.5577, 0.3251, 0.5838, 0.34]}, {"w": "count", "b": [0.59, 0.3251, 0.6356, 0.34]}, {"w": "of", "b": [0.6418, 0.3251, 0.6569, 0.34]}, {"w": "each", "b": [0.6632, 0.3251, 0.6992, 0.34]}, {"w": "token", "b": [0.7055, 0.3251, 0.7504, 0.34]}, {"w": "instead", "b": [0.7567, 0.3251, 0.8154, 0.34]}, {"w": "of", "b": [0.8216, 0.3251, 0.8367, 0.34]}, {"w": "the", "b": [0.8429, 0.3251, 0.8691, 0.34]}, {"w": "binary", "b": [0.1312, 0.343, 0.1828, 0.358]}, {"w": "value,", "b": [0.1889, 0.343, 0.2353, 0.358]}, {"w": "then", "b": [0.2414, 0.343, 0.2771, 0.358]}, {"w": "it’s", "b": [0.2833, 0.343, 0.3079, 0.358]}, {"w": "not", "b": [0.314, 0.343, 0.3405, 0.358]}, {"w": "a", "b": [0.3467, 0.343, 0.3558, 0.358]}, {"w": "problem,", "b": [0.362, 0.343, 0.4324, 0.358]}, {"w": "as", "b": [0.4385, 0.343, 0.4549, 0.358]}, {"w": "long", "b": [0.4611, 0.343, 0.4947, 0.358]}, {"w": "as", "b": [0.5009, 0.343, 0.5173, 0.358]}, {"w": "the", "b": [0.5235, 0.343, 0.5489, 0.358]}, {"w": "input", "b": [0.5551, 0.343, 0.5979, 0.358]}, {"w": "document", "b": [0.6041, 0.343, 0.6826, 0.358]}, {"w": "length", "b": [0.6887, 0.343, 0.7387, 0.358]}, {"w": "doesn’t", "b": [0.7448, 0.343, 0.8025, 0.358]}, {"w": "grow", "b": [0.8087, 0.343, 0.847, 0.358]}, {"w": "or", "b": [0.8531, 0.343, 0.8695, 0.358]}, {"w": "shrink", "b": [0.1312, 0.361, 0.1816, 0.3759]}, {"w": "with", "b": [0.1877, 0.361, 0.2239, 0.3759]}, {"w": "time.", "b": [0.2301, 0.361, 0.2715, 0.3759]}, {"w": "But,", "b": [0.2797, 0.361, 0.3156, 0.3759]}, {"w": "if", "b": [0.3218, 0.361, 0.3326, 0.3759]}, {"w": "you", "b": [0.3388, 0.361, 0.3678, 0.3759]}, {"w": "have", "b": [0.3739, 0.361, 0.4107, 0.3759]}, {"w": "a", "b": [0.4168, 0.361, 0.4261, 0.3759]}, {"w": "feature", "b": [0.4323, 0.361, 0.4887, 0.3759]}, {"w": "like", "b": [0.4949, 0.361, 0.5228, 0.3759]}, {"w": "“Number", "b": [0.529, 0.361, 0.6035, 0.3759]}, {"w": "of", "b": [0.6097, 0.361, 0.6247, 0.3759]}, {"w": "calls", "b": [0.6308, 0.361, 0.6661, 0.3759]}, {"w": "since", "b": [0.6722, 0.361, 0.7117, 0.3759]}, {"w": "subscription”", "b": [0.7178, 0.361, 0.8252, 0.3759]}, {"w": "for", "b": [0.8314, 0.361, 0.8537, 0.3759]}, {"w": "a", "b": [0.8598, 0.361, 0.8691, 0.3759]}, {"w": "customer", "b": [0.1312, 0.3789, 0.2042, 0.3939]}, {"w": "of", "b": [0.2103, 0.3789, 0.2252, 0.3939]}, {"w": "a", "b": [0.2313, 0.3789, 0.2406, 0.3939]}, {"w": "growing", "b": [0.2467, 0.3789, 0.3098, 0.3939]}, {"w": "mobile", "b": [0.3159, 0.3789, 0.3692, 0.3939]}, {"w": "phone", "b": [0.3754, 0.3789, 0.4236, 0.3939]}, {"w": "provider,", "b": [0.4297, 0.3789, 0.5016, 0.3939]}, {"w": "some", "b": [0.5077, 0.3789, 0.5478, 0.3939]}, {"w": "oldtimers", "b": [0.554, 0.3789, 0.629, 0.3939]}, {"w": "can", "b": [0.6351, 0.3789, 0.6628, 0.3939]}, {"w": "have", "b": [0.6689, 0.3789, 0.7053, 0.3939]}, {"w": "a", "b": [0.7115, 0.3789, 0.7207, 0.3939]}, {"w": "very", "b": [0.7268, 0.3789, 0.7612, 0.3939]}, {"w": "high", "b": [0.7674, 0.3789, 0.8023, 0.3939]}, {"w": "number", "b": [0.8084, 0.3789, 0.8694, 0.3939]}, {"w": "of", "b": [0.1312, 0.3969, 0.1462, 0.4118]}, {"w": "calls,", "b": [0.1523, 0.3969, 0.1926, 0.4118]}, {"w": "compared", "b": [0.1988, 0.3969, 0.2771, 0.4118]}, {"w": "to", "b": [0.2833, 0.3969, 0.2998, 0.4118]}, {"w": "the", "b": [0.3059, 0.3969, 0.3317, 0.4118]}, {"w": "newer", "b": [0.3378, 0.3969, 0.3848, 0.4118]}, {"w": "customer", "b": [0.3909, 0.3969, 0.4642, 0.4118]}, {"w": "base.", "b": [0.4704, 0.3969, 0.5107, 0.4118]}, {"w": "On", "b": [0.5189, 0.3969, 0.5436, 0.4118]}, {"w": "the", "b": [0.5498, 0.3969, 0.5755, 0.4118]}, {"w": "other", "b": [0.5817, 0.3969, 0.624, 0.4118]}, {"w": "hand,", "b": [0.6301, 0.3969, 0.6755, 0.4118]}, {"w": "the", "b": [0.6816, 0.3969, 0.7074, 0.4118]}, {"w": "training", "b": [0.7135, 0.3969, 0.7775, 0.4118]}, {"w": "data", "b": [0.7836, 0.3969, 0.8197, 0.4118]}, {"w": "could", "b": [0.8258, 0.3969, 0.8691, 0.4118]}, {"w": "have", "b": [0.1312, 0.4148, 0.1676, 0.4298]}, {"w": "been", "b": [0.1738, 0.4148, 0.2112, 0.4298]}, {"w": "built", "b": [0.2174, 0.4148, 0.2553, 0.4298]}, {"w": "when", "b": [0.2615, 0.4148, 0.3035, 0.4298]}, {"w": "the", "b": [0.3097, 0.4148, 0.3353, 0.4298]}, {"w": "company", "b": [0.3415, 0.4148, 0.4132, 0.4298]}, {"w": "was", "b": [0.4194, 0.4148, 0.4487, 0.4298]}, {"w": "still", "b": [0.4549, 0.4148, 0.4847, 0.4298]}, {"w": "young", "b": [0.4908, 0.4148, 0.5391, 0.4298]}, {"w": "and", "b": [0.5452, 0.4148, 0.5749, 0.4298]}, {"w": "didn’t", "b": [0.5811, 0.4148, 0.6293, 0.4298]}, {"w": "have", "b": [0.6354, 0.4148, 0.6719, 0.4298]}, {"w": "any", "b": [0.678, 0.4148, 0.7067, 0.4298]}, {"w": "oldtimers.", "b": [0.7128, 0.4148, 0.793, 0.4298]}]}, {"id": "b_5", "type": "paragraph", "text": "The same caution must be applied when you group feature values in bins based on how common those values are in the dataset. Infrequent values today may become more frequent over time, as more data is added. It is considered a best practice to re-evaluate the model and the features from time to time.", "words": [{"w": "The", "b": [0.1306, 0.4417, 0.163, 0.4567]}, {"w": "same", "b": [0.1704, 0.4417, 0.2113, 0.4567]}, {"w": "caution", "b": [0.2187, 0.4417, 0.2794, 0.4567]}, {"w": "must", "b": [0.2868, 0.4417, 0.3272, 0.4567]}, {"w": "be", "b": [0.3347, 0.4417, 0.354, 0.4567]}, {"w": "applied", "b": [0.3614, 0.4417, 0.421, 0.4567]}, {"w": "when", "b": [0.4285, 0.4417, 0.4714, 0.4567]}, {"w": "you", "b": [0.4788, 0.4417, 0.5081, 0.4567]}, {"w": "group", "b": [0.5155, 0.4417, 0.5626, 0.4567]}, {"w": "feature", "b": [0.5701, 0.4417, 0.6271, 0.4567]}, {"w": "values", "b": [0.6346, 0.4417, 0.6844, 0.4567]}, {"w": "in", "b": [0.6918, 0.4417, 0.7075, 0.4567]}, {"w": "bins", "b": [0.7149, 0.4417, 0.7485, 0.4567]}, {"w": "based", "b": [0.756, 0.4417, 0.8021, 0.4567]}, {"w": "on", "b": [0.8095, 0.4417, 0.8294, 0.4567]}, {"w": "how", "b": [0.8368, 0.4417, 0.8698, 0.4567]}, {"w": "common", "b": [0.1312, 0.4597, 0.1979, 0.4746]}, {"w": "those", "b": [0.2041, 0.4597, 0.2457, 0.4746]}, {"w": "values", "b": [0.2518, 0.4597, 0.2999, 0.4746]}, {"w": "are", "b": [0.3061, 0.4597, 0.3304, 0.4746]}, {"w": "in", "b": [0.3366, 0.4597, 0.3517, 0.4746]}, {"w": "the", "b": [0.3579, 0.4597, 0.3832, 0.4746]}, {"w": "dataset.", "b": [0.3893, 0.4597, 0.4521, 0.4746]}, {"w": "Infrequent", "b": [0.4603, 0.4597, 0.5423, 0.4746]}, {"w": "values", "b": [0.5485, 0.4597, 0.5966, 0.4746]}, {"w": "today", "b": [0.6027, 0.4597, 0.6477, 0.4746]}, {"w": "may", "b": [0.6539, 0.4597, 0.6872, 0.4746]}, {"w": "become", "b": [0.6934, 0.4597, 0.7525, 0.4746]}, {"w": "more", "b": [0.7587, 0.4597, 0.7982, 0.4746]}, {"w": "frequent", "b": [0.8043, 0.4597, 0.8696, 0.4746]}, {"w": "over", "b": [0.1312, 0.4776, 0.1651, 0.4926]}, {"w": "time,", "b": [0.1713, 0.4776, 0.2129, 0.4926]}, {"w": "as", "b": [0.2191, 0.4776, 0.2358, 0.4926]}, {"w": "more", "b": [0.242, 0.4776, 0.2826, 0.4926]}, {"w": "data", "b": [0.2888, 0.4776, 0.3252, 0.4926]}, {"w": "is", "b": [0.3314, 0.4776, 0.344, 0.4926]}, {"w": "added.", "b": [0.3501, 0.4776, 0.4042, 0.4926]}, {"w": "It", "b": [0.4125, 0.4776, 0.4265, 0.4926]}, {"w": "is", "b": [0.4327, 0.4776, 0.4453, 0.4926]}, {"w": "considered", "b": [0.4514, 0.4776, 0.537, 0.4926]}, {"w": "a", "b": [0.5431, 0.4776, 0.5525, 0.4926]}, {"w": "best", "b": [0.5586, 0.4776, 0.5926, 0.4926]}, {"w": "practice", "b": [0.5987, 0.4776, 0.6633, 0.4926]}, {"w": "to", "b": [0.6695, 0.4776, 0.6861, 0.4926]}, {"w": "re-evaluate", "b": [0.6923, 0.4776, 0.7813, 0.4926]}, {"w": "the", "b": [0.7875, 0.4776, 0.8135, 0.4926]}, {"w": "model", "b": [0.8197, 0.4776, 0.8691, 0.4926]}, {"w": "and", "b": [0.1312, 0.4956, 0.161, 0.5105]}, {"w": "the", "b": [0.1671, 0.4956, 0.1928, 0.5105]}, {"w": "features", "b": [0.1989, 0.4956, 0.2621, 0.5105]}, {"w": "from", "b": [0.2683, 0.4956, 0.3058, 0.5105]}, {"w": "time", "b": [0.3119, 0.4956, 0.3478, 0.5105]}, {"w": "to", "b": [0.354, 0.4956, 0.3704, 0.5105]}, {"w": "time.", "b": [0.3765, 0.4956, 0.4175, 0.5105]}]}, {"id": "b_6", "type": "paragraph", "text": "4.12.6 Make Feature Selection When Necessary", "words": [{"w": "4.12.6", "b": [0.1312, 0.5437, 0.1855, 0.5587]}, {"w": "Make", "b": [0.2067, 0.5437, 0.2575, 0.5587]}, {"w": "Feature", "b": [0.2645, 0.5437, 0.3347, 0.5587]}, {"w": "Selection", "b": [0.3418, 0.5437, 0.4249, 0.5587]}, {"w": "When", "b": [0.4319, 0.5437, 0.4872, 0.5587]}, {"w": "Necessary", "b": [0.4942, 0.5437, 0.5867, 0.5587]}]}, {"id": "b_7", "type": "paragraph", "text": "Make feature selection when it’s necessary. The reasons could be:", "words": [{"w": "Make", "b": [0.1312, 0.58, 0.1748, 0.595]}, {"w": "feature", "b": [0.181, 0.58, 0.2369, 0.595]}, {"w": "selection", "b": [0.2431, 0.58, 0.3119, 0.595]}, {"w": "when", "b": [0.3181, 0.58, 0.3601, 0.595]}, {"w": "it’s", "b": [0.3662, 0.58, 0.391, 0.595]}, {"w": "necessary.", "b": [0.3971, 0.58, 0.4763, 0.595]}, {"w": "The", "b": [0.4846, 0.58, 0.5163, 0.595]}, {"w": "reasons", "b": [0.5225, 0.58, 0.5812, 0.595]}, {"w": "could", "b": [0.5874, 0.58, 0.6304, 0.595]}, {"w": "be:", "b": [0.6366, 0.58, 0.6607, 0.595]}]}, {"id": "b_8", "type": "paragraph", "text": "• the need to have an explainable model (so you keep the most significant predictors), • strict hardware requirements, such as RAM, hard drive space, or • short time available to experiment and/or rebuild the model in production, • you expect a significant distribution shift between two model trainings.", "words": [{"w": "•", "b": [0.1538, 0.6069, 0.1681, 0.6219]}, {"w": "the", "b": [0.1774, 0.6069, 0.203, 0.6219]}, {"w": "need", "b": [0.2091, 0.6069, 0.2461, 0.6219]}, {"w": "to", "b": [0.2522, 0.6069, 0.2686, 0.6219]}, {"w": "have", "b": [0.2748, 0.6069, 0.3112, 0.6219]}, {"w": "an", "b": [0.3173, 0.6069, 0.3368, 0.6219]}, {"w": "explainable", "b": [0.343, 0.6069, 0.4337, 0.6219]}, {"w": "model", "b": [0.4399, 0.6069, 0.4886, 0.6219]}, {"w": "(so", "b": [0.4947, 0.6069, 0.5184, 0.6219]}, {"w": "you", "b": [0.5246, 0.6069, 0.5533, 0.6219]}, {"w": "keep", "b": [0.5594, 0.6069, 0.5953, 0.6219]}, {"w": "the", "b": [0.6015, 0.6069, 0.6271, 0.6219]}, {"w": "most", "b": [0.6333, 0.6069, 0.6723, 0.6219]}, {"w": "significant", "b": [0.6785, 0.6069, 0.7601, 0.6219]}, {"w": "predictors),", "b": [0.7663, 0.6069, 0.8588, 0.6219]}, {"w": "•", "b": [0.1538, 0.6249, 0.1681, 0.6398]}, {"w": "strict", "b": [0.1774, 0.6249, 0.2196, 0.6398]}, {"w": "hardware", "b": [0.2257, 0.6249, 0.3002, 0.6398]}, {"w": "requirements,", "b": [0.3063, 0.6249, 0.4152, 0.6398]}, {"w": "such", "b": [0.4214, 0.6249, 0.4569, 0.6398]}, {"w": "as", "b": [0.463, 0.6249, 0.4795, 0.6398]}, {"w": "RAM,", "b": [0.4857, 0.6249, 0.5351, 0.6398]}, {"w": "hard", "b": [0.5413, 0.6249, 0.5783, 0.6398]}, {"w": "drive", "b": [0.5844, 0.6249, 0.6245, 0.6398]}, {"w": "space,", "b": [0.6306, 0.6249, 0.6789, 0.6398]}, {"w": "or", "b": [0.6851, 0.6249, 0.7015, 0.6398]}, {"w": "•", "b": [0.1538, 0.6428, 0.1681, 0.6578]}, {"w": "short", "b": [0.1774, 0.6428, 0.2185, 0.6578]}, {"w": "time", "b": [0.2247, 0.6428, 0.2606, 0.6578]}, {"w": "available", "b": [0.2667, 0.6428, 0.3364, 0.6578]}, {"w": "to", "b": [0.3426, 0.6428, 0.359, 0.6578]}, {"w": "experiment", "b": [0.3652, 0.6428, 0.4549, 0.6578]}, {"w": "and/or", "b": [0.4611, 0.6428, 0.5165, 0.6578]}, {"w": "rebuild", "b": [0.5227, 0.6428, 0.5791, 0.6578]}, {"w": "the", "b": [0.5853, 0.6428, 0.6109, 0.6578]}, {"w": "model", "b": [0.6171, 0.6428, 0.6658, 0.6578]}, {"w": "in", "b": [0.6719, 0.6428, 0.6873, 0.6578]}, {"w": "production,", "b": [0.6934, 0.6428, 0.7863, 0.6578]}, {"w": "•", "b": [0.1538, 0.6608, 0.1681, 0.6757]}, {"w": "you", "b": [0.1774, 0.6608, 0.2061, 0.6757]}, {"w": "expect", "b": [0.2122, 0.6608, 0.2645, 0.6757]}, {"w": "a", "b": [0.2707, 0.6608, 0.2799, 0.6757]}, {"w": "significant", "b": [0.2861, 0.6608, 0.3677, 0.6757]}, {"w": "distribution", "b": [0.3737, 0.6611, 0.4828, 0.676]}, {"w": "shift", "b": [0.4899, 0.6611, 0.5307, 0.676]}, {"w": "between", "b": [0.5368, 0.6608, 0.6019, 0.6757]}, {"w": "two", "b": [0.6081, 0.6608, 0.6368, 0.6757]}, {"w": "model", "b": [0.6429, 0.6608, 0.6916, 0.6757]}, {"w": "trainings.", "b": [0.6978, 0.6608, 0.7738, 0.6757]}]}, {"id": "b_9", "type": "paragraph", "text": "If you decide to do feature selection, start with Boruta.", "words": [{"w": "If", "b": [0.1312, 0.6877, 0.1435, 0.7026]}, {"w": "you", "b": [0.1497, 0.6877, 0.1784, 0.7026]}, {"w": "decide", "b": [0.1846, 0.6877, 0.2348, 0.7026]}, {"w": "to", "b": [0.241, 0.6877, 0.2574, 0.7026]}, {"w": "do", "b": [0.2635, 0.6877, 0.283, 0.7026]}, {"w": "feature", "b": [0.2892, 0.6877, 0.3451, 0.7026]}, {"w": "selection,", "b": [0.3513, 0.6877, 0.4252, 0.7026]}, {"w": "start", "b": [0.4314, 0.6877, 0.4695, 0.7026]}, {"w": "with", "b": [0.4756, 0.6877, 0.5115, 0.7026]}, {"w": "Boruta.", "b": [0.5176, 0.6877, 0.5789, 0.7026]}]}, {"id": "b_10", "type": "paragraph", "text": "4.12.7 Test the Code Carefully", "words": [{"w": "4.12.7", "b": [0.1312, 0.7358, 0.1855, 0.7508]}, {"w": "Test", "b": [0.2067, 0.7358, 0.246, 0.7508]}, {"w": "the", "b": [0.2531, 0.7358, 0.2828, 0.7508]}, {"w": "Code", "b": [0.2899, 0.7358, 0.338, 0.7508]}, {"w": "Carefully", "b": [0.345, 0.7358, 0.4304, 0.7508]}]}, {"id": "b_11", "type": "paragraph", "text": "The feature engineering code must be carefully tested. Unit tests should cover each feature extractor. Check that each feature is generated correctly using as many inputs as possible. For each boolean feature, check that it is true when it should be true and is false when it should be false. Check numerical features for a reasonable value range. Check for NaNs (Not-a-Number values), nulls, zeros, and empty values. A broken extractor for one feature", "words": [{"w": "The", "b": [0.1306, 0.7721, 0.1624, 0.7871]}, {"w": "feature", "b": [0.1686, 0.7721, 0.2246, 0.7871]}, {"w": "engineering", "b": [0.2308, 0.7721, 0.3223, 0.7871]}, {"w": "code", "b": [0.3285, 0.7721, 0.365, 0.7871]}, {"w": "must", "b": [0.3711, 0.7721, 0.4108, 0.7871]}, {"w": "be", "b": [0.417, 0.7721, 0.436, 0.7871]}, {"w": "carefully", "b": [0.4421, 0.7721, 0.5111, 0.7871]}, {"w": "tested.", "b": [0.5172, 0.7721, 0.5708, 0.7871]}, {"w": "Unit", "b": [0.579, 0.7721, 0.6155, 0.7871]}, {"w": "tests", "b": [0.6216, 0.7721, 0.6588, 0.7871]}, {"w": "should", "b": [0.665, 0.7721, 0.7175, 0.7871]}, {"w": "cover", "b": [0.7237, 0.7721, 0.7654, 0.7871]}, {"w": "each", "b": [0.7715, 0.7721, 0.807, 0.7871]}, {"w": "feature", "b": [0.8131, 0.7721, 0.8692, 0.7871]}, {"w": "extractor.", "b": [0.1312, 0.7901, 0.2107, 0.805]}, {"w": "Check", "b": [0.2189, 0.7901, 0.2687, 0.805]}, {"w": "that", "b": [0.2749, 0.7901, 0.3091, 0.805]}, {"w": "each", "b": [0.3153, 0.7901, 0.3511, 0.805]}, {"w": "feature", "b": [0.3572, 0.7901, 0.4139, 0.805]}, {"w": "is", "b": [0.42, 0.7901, 0.4326, 0.805]}, {"w": "generated", "b": [0.4387, 0.7901, 0.5176, 0.805]}, {"w": "correctly", "b": [0.5238, 0.7901, 0.595, 0.805]}, {"w": "using", "b": [0.6011, 0.7901, 0.6438, 0.805]}, {"w": "as", "b": [0.6499, 0.7901, 0.6667, 0.805]}, {"w": "many", "b": [0.6728, 0.7901, 0.7174, 0.805]}, {"w": "inputs", "b": [0.7235, 0.7901, 0.7745, 0.805]}, {"w": "as", "b": [0.7807, 0.7901, 0.7974, 0.805]}, {"w": "possible.", "b": [0.8035, 0.7901, 0.8727, 0.805]}, {"w": "For", "b": [0.1312, 0.808, 0.1588, 0.823]}, {"w": "each", "b": [0.1651, 0.808, 0.2012, 0.823]}, {"w": "boolean", "b": [0.2076, 0.808, 0.2714, 0.823]}, {"w": "feature,", "b": [0.2777, 0.808, 0.34, 0.823]}, {"w": "check", "b": [0.3465, 0.808, 0.3909, 0.823]}, {"w": "that", "b": [0.3973, 0.808, 0.4318, 0.823]}, {"w": "it", "b": [0.4382, 0.808, 0.4507, 0.823]}, {"w": "is", "b": [0.4571, 0.808, 0.4698, 0.823]}, {"w": "true", "b": [0.4761, 0.808, 0.5096, 0.823]}, {"w": "when", "b": [0.516, 0.808, 0.5589, 0.823]}, {"w": "it", "b": [0.5653, 0.808, 0.5778, 0.823]}, {"w": "should", "b": [0.5842, 0.808, 0.6376, 0.823]}, {"w": "be", "b": [0.644, 0.808, 0.6633, 0.823]}, {"w": "true", "b": [0.6697, 0.808, 0.7032, 0.823]}, {"w": "and", "b": [0.7096, 0.808, 0.7399, 0.823]}, {"w": "is", "b": [0.7463, 0.808, 0.7589, 0.823]}, {"w": "false", "b": [0.7653, 0.808, 0.8015, 0.823]}, {"w": "when", "b": [0.8079, 0.808, 0.8507, 0.823]}, {"w": "it", "b": [0.8571, 0.808, 0.8697, 0.823]}, {"w": "should", "b": [0.1312, 0.8259, 0.1847, 0.8409]}, {"w": "be", "b": [0.1918, 0.8259, 0.2112, 0.8409]}, {"w": "false.", "b": [0.2183, 0.8259, 0.2597, 0.8409]}, {"w": "Check", "b": [0.2708, 0.8259, 0.321, 0.8409]}, {"w": "numerical", "b": [0.3281, 0.8259, 0.4082, 0.8409]}, {"w": "features", "b": [0.4154, 0.8259, 0.4798, 0.8409]}, {"w": "for", "b": [0.487, 0.8259, 0.5095, 0.8409]}, {"w": "a", "b": [0.5166, 0.8259, 0.526, 0.8409]}, {"w": "reasonable", "b": [0.5332, 0.8259, 0.6191, 0.8409]}, {"w": "value", "b": [0.6262, 0.8259, 0.6686, 0.8409]}, {"w": "range.", "b": [0.6757, 0.8259, 0.726, 0.8409]}, {"w": "Check", "b": [0.7371, 0.8259, 0.7873, 0.8409]}, {"w": "for", "b": [0.7944, 0.8259, 0.817, 0.8409]}, {"w": "NaNs", "b": [0.8241, 0.8259, 0.8691, 0.8409]}, {"w": "(Not-a-Number", "b": [0.1291, 0.8439, 0.255, 0.8588]}, {"w": "values),", "b": [0.2612, 0.8439, 0.3232, 0.8588]}, {"w": "nulls,", "b": [0.3294, 0.8439, 0.3727, 0.8588]}, {"w": "zeros,", "b": [0.3788, 0.8439, 0.4248, 0.8588]}, {"w": "and", "b": [0.4309, 0.8439, 0.4611, 0.8588]}, {"w": "empty", "b": [0.4672, 0.8439, 0.5182, 0.8588]}, {"w": "values.", "b": [0.5243, 0.8439, 0.5791, 0.8588]}, {"w": "A", "b": [0.5873, 0.8439, 0.6014, 0.8588]}, {"w": "broken", "b": [0.6075, 0.8439, 0.6627, 0.8588]}, {"w": "extractor", "b": [0.6689, 0.8439, 0.7434, 0.8588]}, {"w": "for", "b": [0.7495, 0.8439, 0.7719, 0.8588]}, {"w": "one", "b": [0.7781, 0.8439, 0.8062, 0.8588]}, {"w": "feature", "b": [0.8123, 0.8439, 0.8691, 0.8588]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 46", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "46", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 136, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "can result in arbitrarily poor performance of the model. Feature extractors are the first place to look for a problem if the model’s behavior is strange.", "words": [{"w": "can", "b": [0.1312, 0.0881, 0.1584, 0.1031]}, {"w": "result", "b": [0.1642, 0.0881, 0.2086, 0.1031]}, {"w": "in", "b": [0.2145, 0.0881, 0.2296, 0.1031]}, {"w": "arbitrarily", "b": [0.2354, 0.0881, 0.3165, 0.1031]}, {"w": "poor", "b": [0.3224, 0.0881, 0.3586, 0.1031]}, {"w": "performance", "b": [0.3645, 0.0881, 0.4621, 0.1031]}, {"w": "of", "b": [0.468, 0.0881, 0.4825, 0.1031]}, {"w": "the", "b": [0.4884, 0.0881, 0.5135, 0.1031]}, {"w": "model.", "b": [0.5194, 0.0881, 0.5722, 0.1031]}, {"w": "Feature", "b": [0.5803, 0.0881, 0.6398, 0.1031]}, {"w": "extractors", "b": [0.6457, 0.0881, 0.7248, 0.1031]}, {"w": "are", "b": [0.7307, 0.0881, 0.7549, 0.1031]}, {"w": "the", "b": [0.7608, 0.0881, 0.7859, 0.1031]}, {"w": "first", "b": [0.7918, 0.0881, 0.8231, 0.1031]}, {"w": "place", "b": [0.8289, 0.0881, 0.8691, 0.1031]}, {"w": "to", "b": [0.1312, 0.106, 0.1476, 0.121]}, {"w": "look", "b": [0.1538, 0.106, 0.1876, 0.121]}, {"w": "for", "b": [0.1938, 0.106, 0.2159, 0.121]}, {"w": "a", "b": [0.222, 0.106, 0.2312, 0.121]}, {"w": "problem", "b": [0.2374, 0.106, 0.3031, 0.121]}, {"w": "if", "b": [0.3092, 0.106, 0.32, 0.121]}, {"w": "the", "b": [0.3261, 0.106, 0.3518, 0.121]}, {"w": "model’s", "b": [0.3579, 0.106, 0.419, 0.121]}, {"w": "behavior", "b": [0.4252, 0.106, 0.4945, 0.121]}, {"w": "is", "b": [0.5006, 0.106, 0.513, 0.121]}, {"w": "strange.", "b": [0.5192, 0.106, 0.5829, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "Each feature has to be tested for speed, memory consumption, and compatibility with the production environment. What works reasonably well in your local environment may perform poorly when deployed in production.", "words": [{"w": "Each", "b": [0.1312, 0.133, 0.1715, 0.1479]}, {"w": "feature", "b": [0.1777, 0.133, 0.2344, 0.1479]}, {"w": "has", "b": [0.2406, 0.133, 0.2677, 0.1479]}, {"w": "to", "b": [0.2738, 0.133, 0.2905, 0.1479]}, {"w": "be", "b": [0.2966, 0.133, 0.3159, 0.1479]}, {"w": "tested", "b": [0.322, 0.133, 0.371, 0.1479]}, {"w": "for", "b": [0.3771, 0.133, 0.3995, 0.1479]}, {"w": "speed,", "b": [0.4057, 0.133, 0.4562, 0.1479]}, {"w": "memory", "b": [0.4624, 0.133, 0.5284, 0.1479]}, {"w": "consumption,", "b": [0.5346, 0.133, 0.6439, 0.1479]}, {"w": "and", "b": [0.65, 0.133, 0.6802, 0.1479]}, {"w": "compatibility", "b": [0.6863, 0.133, 0.7944, 0.1479]}, {"w": "with", "b": [0.8006, 0.133, 0.837, 0.1479]}, {"w": "the", "b": [0.8431, 0.133, 0.8691, 0.1479]}, {"w": "production", "b": [0.1312, 0.1509, 0.2172, 0.1659]}, {"w": "environment.", "b": [0.2228, 0.1509, 0.3258, 0.1659]}, {"w": "What", "b": [0.3338, 0.1509, 0.3785, 0.1659]}, {"w": "works", "b": [0.3841, 0.1509, 0.4294, 0.1659]}, {"w": "reasonably", "b": [0.435, 0.1509, 0.519, 0.1659]}, {"w": "well", "b": [0.5246, 0.1509, 0.5552, 0.1659]}, {"w": "in", "b": [0.5608, 0.1509, 0.5759, 0.1659]}, {"w": "your", "b": [0.5814, 0.1509, 0.6166, 0.1659]}, {"w": "local", "b": [0.6222, 0.1509, 0.6589, 0.1659]}, {"w": "environment", "b": [0.6644, 0.1509, 0.7624, 0.1659]}, {"w": "may", "b": [0.768, 0.1509, 0.8011, 0.1659]}, {"w": "perform", "b": [0.8067, 0.1509, 0.8691, 0.1659]}, {"w": "poorly", "b": [0.1312, 0.1689, 0.1831, 0.1838]}, {"w": "when", "b": [0.1892, 0.1689, 0.2313, 0.1838]}, {"w": "deployed", "b": [0.2374, 0.1689, 0.3077, 0.1838]}, {"w": "in", "b": [0.3138, 0.1689, 0.3292, 0.1838]}, {"w": "production.", "b": [0.3354, 0.1689, 0.4282, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "Once the model is deployed in the production environment, and each time it is loaded, you must rerun feature extractor tests. If a feature consumes some external resources like a database or an API, these resources might be unavailable on a specific production runtime instance. The feature extractor has to throw an exception and die if any resource during feature extraction is unavailable. Avoid silent failures that may remain unnoticed for a long time with model performance degrading or becoming completely wrong.", "words": [{"w": "Once", "b": [0.1312, 0.1958, 0.1724, 0.2107]}, {"w": "the", "b": [0.1785, 0.1958, 0.2043, 0.2107]}, {"w": "model", "b": [0.2104, 0.1958, 0.2592, 0.2107]}, {"w": "is", "b": [0.2654, 0.1958, 0.2778, 0.2107]}, {"w": "deployed", "b": [0.284, 0.1958, 0.3544, 0.2107]}, {"w": "in", "b": [0.3606, 0.1958, 0.376, 0.2107]}, {"w": "the", "b": [0.3822, 0.1958, 0.4079, 0.2107]}, {"w": "production", "b": [0.414, 0.1958, 0.502, 0.2107]}, {"w": "environment,", "b": [0.5082, 0.1958, 0.6136, 0.2107]}, {"w": "and", "b": [0.6198, 0.1958, 0.6496, 0.2107]}, {"w": "each", "b": [0.6557, 0.1958, 0.6912, 0.2107]}, {"w": "time", "b": [0.6974, 0.1958, 0.7334, 0.2107]}, {"w": "it", "b": [0.7395, 0.1958, 0.7519, 0.2107]}, {"w": "is", "b": [0.758, 0.1958, 0.7705, 0.2107]}, {"w": "loaded,", "b": [0.7766, 0.1958, 0.8342, 0.2107]}, {"w": "you", "b": [0.8403, 0.1958, 0.8691, 0.2107]}, {"w": "must", "b": [0.1312, 0.2137, 0.1716, 0.2287]}, {"w": "rerun", "b": [0.1791, 0.2137, 0.2232, 0.2287]}, {"w": "feature", "b": [0.2307, 0.2137, 0.2877, 0.2287]}, {"w": "extractor", "b": [0.2952, 0.2137, 0.3701, 0.2287]}, {"w": "tests.", "b": [0.3776, 0.2137, 0.4207, 0.2287]}, {"w": "If", "b": [0.4329, 0.2137, 0.4455, 0.2287]}, {"w": "a", "b": [0.453, 0.2137, 0.4624, 0.2287]}, {"w": "feature", "b": [0.4699, 0.2137, 0.5269, 0.2287]}, {"w": "consumes", "b": [0.5344, 0.2137, 0.6121, 0.2287]}, {"w": "some", "b": [0.6195, 0.2137, 0.6604, 0.2287]}, {"w": "external", "b": [0.6679, 0.2137, 0.7344, 0.2287]}, {"w": "resources", "b": [0.7419, 0.2137, 0.8165, 0.2287]}, {"w": "like", "b": [0.824, 0.2137, 0.8523, 0.2287]}, {"w": "a", "b": [0.8598, 0.2137, 0.8692, 0.2287]}, {"w": "database", "b": [0.1312, 0.2317, 0.2027, 0.2466]}, {"w": "or", "b": [0.2088, 0.2317, 0.2254, 0.2466]}, {"w": "an", "b": [0.2315, 0.2317, 0.2512, 0.2466]}, {"w": "API,", "b": [0.2573, 0.2317, 0.2958, 0.2466]}, {"w": "these", "b": [0.302, 0.2317, 0.3434, 0.2466]}, {"w": "resources", "b": [0.3496, 0.2317, 0.4233, 0.2466]}, {"w": "might", "b": [0.4295, 0.2317, 0.4765, 0.2466]}, {"w": "be", "b": [0.4826, 0.2317, 0.5018, 0.2466]}, {"w": "unavailable", "b": [0.5079, 0.2317, 0.5989, 0.2466]}, {"w": "on", "b": [0.605, 0.2317, 0.6247, 0.2466]}, {"w": "a", "b": [0.6308, 0.2317, 0.6401, 0.2466]}, {"w": "specific", "b": [0.6463, 0.2317, 0.7048, 0.2466]}, {"w": "production", "b": [0.7109, 0.2317, 0.7994, 0.2466]}, {"w": "runtime", "b": [0.8055, 0.2317, 0.8691, 0.2466]}, {"w": "instance.", "b": [0.1312, 0.2496, 0.2035, 0.2646]}, {"w": "The", "b": [0.2133, 0.2496, 0.2457, 0.2646]}, {"w": "feature", "b": [0.2524, 0.2496, 0.3095, 0.2646]}, {"w": "extractor", "b": [0.3161, 0.2496, 0.391, 0.2646]}, {"w": "has", "b": [0.3977, 0.2496, 0.425, 0.2646]}, {"w": "to", "b": [0.4317, 0.2496, 0.4484, 0.2646]}, {"w": "throw", "b": [0.4551, 0.2496, 0.5027, 0.2646]}, {"w": "an", "b": [0.5094, 0.2496, 0.5293, 0.2646]}, {"w": "exception", "b": [0.5359, 0.2496, 0.6139, 0.2646]}, {"w": "and", "b": [0.6205, 0.2496, 0.6509, 0.2646]}, {"w": "die", "b": [0.6575, 0.2496, 0.6816, 0.2646]}, {"w": "if", "b": [0.6883, 0.2496, 0.6993, 0.2646]}, {"w": "any", "b": [0.7059, 0.2496, 0.7352, 0.2646]}, {"w": "resource", "b": [0.7419, 0.2496, 0.8091, 0.2646]}, {"w": "during", "b": [0.8157, 0.2496, 0.8692, 0.2646]}, {"w": "feature", "b": [0.1312, 0.2676, 0.1869, 0.2825]}, {"w": "extraction", "b": [0.1931, 0.2676, 0.2743, 0.2825]}, {"w": "is", "b": [0.2804, 0.2676, 0.2928, 0.2825]}, {"w": "unavailable.", "b": [0.2989, 0.2676, 0.3938, 0.2825]}, {"w": "Avoid", "b": [0.4021, 0.2676, 0.4475, 0.2825]}, {"w": "silent", "b": [0.4536, 0.2676, 0.4961, 0.2825]}, {"w": "failures", "b": [0.5022, 0.2676, 0.5601, 0.2825]}, {"w": "that", "b": [0.5662, 0.2676, 0.5999, 0.2825]}, {"w": "may", "b": [0.6061, 0.2676, 0.6397, 0.2825]}, {"w": "remain", "b": [0.6459, 0.2676, 0.701, 0.2825]}, {"w": "unnoticed", "b": [0.7072, 0.2676, 0.7858, 0.2825]}, {"w": "for", "b": [0.7919, 0.2676, 0.8139, 0.2825]}, {"w": "a", "b": [0.8201, 0.2676, 0.8293, 0.2825]}, {"w": "long", "b": [0.8354, 0.2676, 0.8691, 0.2825]}, {"w": "time", "b": [0.1312, 0.2855, 0.1671, 0.3005]}, {"w": "with", "b": [0.1733, 0.2855, 0.2091, 0.3005]}, {"w": "model", "b": [0.2153, 0.2855, 0.264, 0.3005]}, {"w": "performance", "b": [0.2702, 0.2855, 0.3697, 0.3005]}, {"w": "degrading", "b": [0.3759, 0.2855, 0.4549, 0.3005]}, {"w": "or", "b": [0.461, 0.2855, 0.4775, 0.3005]}, {"w": "becoming", "b": [0.4837, 0.2855, 0.56, 0.3005]}, {"w": "completely", "b": [0.5662, 0.2855, 0.6528, 0.3005]}, {"w": "wrong.", "b": [0.659, 0.2855, 0.7134, 0.3005]}]}, {"id": "b_3", "type": "paragraph", "text": "It is also recommended to perform regular runs of feature extractors on a fixed test data to make sure that the feature value distribution remains the same.", "words": [{"w": "It", "b": [0.1312, 0.3124, 0.1451, 0.3274]}, {"w": "is", "b": [0.1512, 0.3124, 0.1636, 0.3274]}, {"w": "also", "b": [0.1697, 0.3124, 0.2006, 0.3274]}, {"w": "recommended", "b": [0.2067, 0.3124, 0.3174, 0.3274]}, {"w": "to", "b": [0.3235, 0.3124, 0.3399, 0.3274]}, {"w": "perform", "b": [0.346, 0.3124, 0.4096, 0.3274]}, {"w": "regular", "b": [0.4158, 0.3124, 0.4722, 0.3274]}, {"w": "runs", "b": [0.4784, 0.3124, 0.5134, 0.3274]}, {"w": "of", "b": [0.5195, 0.3124, 0.5344, 0.3274]}, {"w": "feature", "b": [0.5405, 0.3124, 0.5964, 0.3274]}, {"w": "extractors", "b": [0.6025, 0.3124, 0.6831, 0.3274]}, {"w": "on", "b": [0.6893, 0.3124, 0.7087, 0.3274]}, {"w": "a", "b": [0.7149, 0.3124, 0.7241, 0.3274]}, {"w": "fixed", "b": [0.7302, 0.3124, 0.7686, 0.3274]}, {"w": "test", "b": [0.7748, 0.3124, 0.8046, 0.3274]}, {"w": "data", "b": [0.8107, 0.3124, 0.8466, 0.3274]}, {"w": "to", "b": [0.8527, 0.3124, 0.8691, 0.3274]}, {"w": "make", "b": [0.1312, 0.3304, 0.1733, 0.3453]}, {"w": "sure", "b": [0.1794, 0.3304, 0.2124, 0.3453]}, {"w": "that", "b": [0.2186, 0.3304, 0.2524, 0.3453]}, {"w": "the", "b": [0.2585, 0.3304, 0.2842, 0.3453]}, {"w": "feature", "b": [0.2903, 0.3304, 0.3463, 0.3453]}, {"w": "value", "b": [0.3524, 0.3304, 0.394, 0.3453]}, {"w": "distribution", "b": [0.4001, 0.3304, 0.4946, 0.3453]}, {"w": "remains", "b": [0.5008, 0.3304, 0.5635, 0.3453]}, {"w": "the", "b": [0.5696, 0.3304, 0.5953, 0.3453]}, {"w": "same.", "b": [0.6014, 0.3304, 0.6466, 0.3453]}]}, {"id": "b_4", "type": "paragraph", "text": "4.12.8 Keep Code, Model, and Data in Sync", "words": [{"w": "4.12.8", "b": [0.1312, 0.3785, 0.1855, 0.3935]}, {"w": "Keep", "b": [0.2067, 0.3785, 0.2545, 0.3935]}, {"w": "Code,", "b": [0.2616, 0.3785, 0.3156, 0.3935]}, {"w": "Model,", "b": [0.3226, 0.3785, 0.3873, 0.3935]}, {"w": "and", "b": [0.3944, 0.3785, 0.4283, 0.3935]}, {"w": "Data", "b": [0.4353, 0.3785, 0.4805, 0.3935]}, {"w": "in", "b": [0.4875, 0.3785, 0.5052, 0.3935]}, {"w": "Sync", "b": [0.5123, 0.3785, 0.5565, 0.3935]}]}, {"id": "b_5", "type": "paragraph", "text": "The version of the feature extraction code must be in sync with the model’s version and the data used to build it. The three have to be deployed or rolled back at the same time. Each time the model is loaded in production, it’s useful to check that the three elements are in sync (that is, their versions are the same).", "words": [{"w": "The", "b": [0.1306, 0.4148, 0.162, 0.4298]}, {"w": "version", "b": [0.1682, 0.4148, 0.2242, 0.4298]}, {"w": "of", "b": [0.2303, 0.4148, 0.245, 0.4298]}, {"w": "the", "b": [0.2512, 0.4148, 0.2766, 0.4298]}, {"w": "feature", "b": [0.2827, 0.4148, 0.3381, 0.4298]}, {"w": "extraction", "b": [0.3442, 0.4148, 0.425, 0.4298]}, {"w": "code", "b": [0.4311, 0.4148, 0.4672, 0.4298]}, {"w": "must", "b": [0.4733, 0.4148, 0.5125, 0.4298]}, {"w": "be", "b": [0.5186, 0.4148, 0.5374, 0.4298]}, {"w": "in", "b": [0.5436, 0.4148, 0.5588, 0.4298]}, {"w": "sync", "b": [0.5649, 0.4148, 0.6001, 0.4298]}, {"w": "with", "b": [0.6062, 0.4148, 0.6417, 0.4298]}, {"w": "the", "b": [0.6479, 0.4148, 0.6733, 0.4298]}, {"w": "model’s", "b": [0.6794, 0.4148, 0.7399, 0.4298]}, {"w": "version", "b": [0.7461, 0.4148, 0.802, 0.4298]}, {"w": "and", "b": [0.8082, 0.4148, 0.8376, 0.4298]}, {"w": "the", "b": [0.8438, 0.4148, 0.8691, 0.4298]}, {"w": "data", "b": [0.1312, 0.4328, 0.1671, 0.4477]}, {"w": "used", "b": [0.1733, 0.4328, 0.2093, 0.4477]}, {"w": "to", "b": [0.2154, 0.4328, 0.2318, 0.4477]}, {"w": "build", "b": [0.238, 0.4328, 0.279, 0.4477]}, {"w": "it.", "b": [0.2852, 0.4328, 0.3026, 0.4477]}, {"w": "The", "b": [0.3108, 0.4328, 0.3426, 0.4477]}, {"w": "three", "b": [0.3487, 0.4328, 0.3898, 0.4477]}, {"w": "have", "b": [0.3959, 0.4328, 0.4323, 0.4477]}, {"w": "to", "b": [0.4385, 0.4328, 0.4549, 0.4477]}, {"w": "be", "b": [0.4611, 0.4328, 0.48, 0.4477]}, {"w": "deployed", "b": [0.4862, 0.4328, 0.5564, 0.4477]}, {"w": "or", "b": [0.5626, 0.4328, 0.579, 0.4477]}, {"w": "rolled", "b": [0.5852, 0.4328, 0.6304, 0.4477]}, {"w": "back", "b": [0.6365, 0.4328, 0.6734, 0.4477]}, {"w": "at", "b": [0.6796, 0.4328, 0.696, 0.4477]}, {"w": "the", "b": [0.7021, 0.4328, 0.7278, 0.4477]}, {"w": "same", "b": [0.7339, 0.4328, 0.774, 0.4477]}, {"w": "time.", "b": [0.7801, 0.4328, 0.8212, 0.4477]}, {"w": "Each", "b": [0.8294, 0.4328, 0.8691, 0.4477]}, {"w": "time", "b": [0.1312, 0.4507, 0.1678, 0.4657]}, {"w": "the", "b": [0.1741, 0.4507, 0.2003, 0.4657]}, {"w": "model", "b": [0.2066, 0.4507, 0.2562, 0.4657]}, {"w": "is", "b": [0.2625, 0.4507, 0.2752, 0.4657]}, {"w": "loaded", "b": [0.2815, 0.4507, 0.3348, 0.4657]}, {"w": "in", "b": [0.3412, 0.4507, 0.3568, 0.4657]}, {"w": "production,", "b": [0.3631, 0.4507, 0.4578, 0.4657]}, {"w": "it’s", "b": [0.4642, 0.4507, 0.4894, 0.4657]}, {"w": "useful", "b": [0.4957, 0.4507, 0.5434, 0.4657]}, {"w": "to", "b": [0.5497, 0.4507, 0.5664, 0.4657]}, {"w": "check", "b": [0.5727, 0.4507, 0.6172, 0.4657]}, {"w": "that", "b": [0.6235, 0.4507, 0.658, 0.4657]}, {"w": "the", "b": [0.6643, 0.4507, 0.6905, 0.4657]}, {"w": "three", "b": [0.6968, 0.4507, 0.7387, 0.4657]}, {"w": "elements", "b": [0.745, 0.4507, 0.8157, 0.4657]}, {"w": "are", "b": [0.822, 0.4507, 0.8472, 0.4657]}, {"w": "in", "b": [0.8535, 0.4507, 0.8692, 0.4657]}, {"w": "sync", "b": [0.1312, 0.4686, 0.1667, 0.4836]}, {"w": "(that", "b": [0.1729, 0.4686, 0.2139, 0.4836]}, {"w": "is,", "b": [0.22, 0.4686, 0.2376, 0.4836]}, {"w": "their", "b": [0.2437, 0.4686, 0.2817, 0.4836]}, {"w": "versions", "b": [0.2879, 0.4686, 0.3517, 0.4836]}, {"w": "are", "b": [0.3579, 0.4686, 0.3825, 0.4836]}, {"w": "the", "b": [0.3887, 0.4686, 0.4143, 0.4836]}, {"w": "same).", "b": [0.4205, 0.4686, 0.4729, 0.4836]}]}, {"id": "b_6", "type": "paragraph", "text": "4.12.9 Isolate Feature Extraction Code", "words": [{"w": "4.12.9", "b": [0.1312, 0.5168, 0.1855, 0.5318]}, {"w": "Isolate", "b": [0.2067, 0.5168, 0.2679, 0.5318]}, {"w": "Feature", "b": [0.275, 0.5168, 0.3451, 0.5318]}, {"w": "Extraction", "b": [0.3522, 0.5168, 0.4506, 0.5318]}, {"w": "Code", "b": [0.4577, 0.5168, 0.5057, 0.5318]}]}, {"id": "b_7", "type": "paragraph", "text": "The feature extraction code must be independent of the remaining code that supports the model. It should be possible to update the code responsible for each feature without affecting other features, the data processing pipeline, or the way the model is called. The only exception is when many features are generated in bulk, like in one-hot encoding and bag-of-words.", "words": [{"w": "The", "b": [0.1306, 0.5531, 0.1628, 0.568]}, {"w": "feature", "b": [0.169, 0.5531, 0.2258, 0.568]}, {"w": "extraction", "b": [0.232, 0.5531, 0.3148, 0.568]}, {"w": "code", "b": [0.3209, 0.5531, 0.3579, 0.568]}, {"w": "must", "b": [0.3641, 0.5531, 0.4042, 0.568]}, {"w": "be", "b": [0.4104, 0.5531, 0.4297, 0.568]}, {"w": "independent", "b": [0.4358, 0.5531, 0.5358, 0.568]}, {"w": "of", "b": [0.5419, 0.5531, 0.557, 0.568]}, {"w": "the", "b": [0.5632, 0.5531, 0.5892, 0.568]}, {"w": "remaining", "b": [0.5954, 0.5531, 0.6766, 0.568]}, {"w": "code", "b": [0.6828, 0.5531, 0.7198, 0.568]}, {"w": "that", "b": [0.7259, 0.5531, 0.7603, 0.568]}, {"w": "supports", "b": [0.7664, 0.5531, 0.837, 0.568]}, {"w": "the", "b": [0.8431, 0.5531, 0.8692, 0.568]}, {"w": "model.", "b": [0.1312, 0.571, 0.184, 0.586]}, {"w": "It", "b": [0.192, 0.571, 0.2056, 0.586]}, {"w": "should", "b": [0.2112, 0.571, 0.2626, 0.586]}, {"w": "be", "b": [0.2682, 0.571, 0.2869, 0.586]}, {"w": "possible", "b": [0.2925, 0.571, 0.3545, 0.586]}, {"w": "to", "b": [0.3602, 0.571, 0.3762, 0.586]}, {"w": "update", "b": [0.3819, 0.571, 0.4367, 0.586]}, {"w": "the", "b": [0.4423, 0.571, 0.4675, 0.586]}, {"w": "code", "b": [0.4731, 0.571, 0.5088, 0.586]}, {"w": "responsible", "b": [0.5144, 0.571, 0.6017, 0.586]}, {"w": "for", "b": [0.6073, 0.571, 0.629, 0.586]}, {"w": "each", "b": [0.6346, 0.571, 0.6693, 0.586]}, {"w": "feature", "b": [0.6749, 0.571, 0.7297, 0.586]}, {"w": "without", "b": [0.7354, 0.571, 0.7967, 0.586]}, {"w": "affecting", "b": [0.8023, 0.571, 0.8691, 0.586]}, {"w": "other", "b": [0.1312, 0.589, 0.1725, 0.6039]}, {"w": "features,", "b": [0.1772, 0.589, 0.2442, 0.6039]}, {"w": "the", "b": [0.2492, 0.589, 0.2744, 0.6039]}, {"w": "data", "b": [0.2791, 0.589, 0.3143, 0.6039]}, {"w": "processing", "b": [0.319, 0.589, 0.4002, 0.6039]}, {"w": "pipeline,", "b": [0.4049, 0.589, 0.4717, 0.6039]}, {"w": "or", "b": [0.4768, 0.589, 0.4929, 0.6039]}, {"w": "the", "b": [0.4976, 0.589, 0.5227, 0.6039]}, {"w": "way", "b": [0.5275, 0.589, 0.5581, 0.6039]}, {"w": "the", "b": [0.5628, 0.589, 0.5879, 0.6039]}, {"w": "model", "b": [0.5927, 0.589, 0.6404, 0.6039]}, {"w": "is", "b": [0.6451, 0.589, 0.6573, 0.6039]}, {"w": "called.", "b": [0.662, 0.589, 0.7123, 0.6039]}, {"w": "The", "b": [0.72, 0.589, 0.7512, 0.6039]}, {"w": "only", "b": [0.7559, 0.589, 0.7896, 0.6039]}, {"w": "exception", "b": [0.7943, 0.589, 0.8692, 0.6039]}, {"w": "is", "b": [0.1312, 0.6069, 0.1436, 0.6219]}, {"w": "when", "b": [0.1498, 0.6069, 0.1918, 0.6219]}, {"w": "many", "b": [0.198, 0.6069, 0.2421, 0.6219]}, {"w": "features", "b": [0.2482, 0.6069, 0.3115, 0.6219]}, {"w": "are", "b": [0.3176, 0.6069, 0.3423, 0.6219]}, {"w": "generated", "b": [0.3484, 0.6069, 0.4264, 0.6219]}, {"w": "in", "b": [0.4326, 0.6069, 0.448, 0.6219]}, {"w": "bulk,", "b": [0.4541, 0.6069, 0.4946, 0.6219]}, {"w": "like", "b": [0.5008, 0.6069, 0.5285, 0.6219]}, {"w": "in", "b": [0.5346, 0.6069, 0.55, 0.6219]}, {"w": "one-hot", "b": [0.5562, 0.6069, 0.6166, 0.6219]}, {"w": "encoding", "b": [0.6228, 0.6069, 0.6941, 0.6219]}, {"w": "and", "b": [0.7002, 0.6069, 0.73, 0.6219]}, {"w": "bag-of-words.", "b": [0.7361, 0.6069, 0.8439, 0.6219]}]}, {"id": "b_8", "type": "paragraph", "text": "4.12.10 Serialize Together Model and Feature Extractor", "words": [{"w": "4.12.10", "b": [0.1312, 0.6551, 0.1961, 0.67]}, {"w": "Serialize", "b": [0.2173, 0.6551, 0.2947, 0.67]}, {"w": "Together", "b": [0.3018, 0.6551, 0.3842, 0.67]}, {"w": "Model", "b": [0.3913, 0.6551, 0.4501, 0.67]}, {"w": "and", "b": [0.4571, 0.6551, 0.491, 0.67]}, {"w": "Feature", "b": [0.4981, 0.6551, 0.5682, 0.67]}, {"w": "Extractor", "b": [0.5753, 0.6551, 0.6648, 0.67]}]}, {"id": "b_9", "type": "paragraph", "text": "When possible, jointly serialize (pickle in Python, RDS in R) the model and the feature", "words": [{"w": "When", "b": [0.1303, 0.6913, 0.1789, 0.7063]}, {"w": "possible,", "b": [0.1862, 0.6913, 0.2559, 0.7063]}, {"w": "jointly", "b": [0.2635, 0.6913, 0.3163, 0.7063]}, {"w": "serialize", "b": [0.3235, 0.6913, 0.3886, 0.7063]}, {"w": "(pickle", "b": [0.3958, 0.6913, 0.4502, 0.7063]}, {"w": "in", "b": [0.4575, 0.6913, 0.4732, 0.7063]}, {"w": "Python,", "b": [0.4804, 0.6913, 0.546, 0.7063]}, {"w": "RDS", "b": [0.5535, 0.6913, 0.5922, 0.7063]}, {"w": "in", "b": [0.5995, 0.6913, 0.6152, 0.7063]}, {"w": "R)", "b": [0.6224, 0.6913, 0.6436, 0.7063]}, {"w": "the", "b": [0.6508, 0.6913, 0.677, 0.7063]}, {"w": "model", "b": [0.6842, 0.6913, 0.7339, 0.7063]}, {"w": "and", "b": [0.7411, 0.6913, 0.7714, 0.7063]}, {"w": "the", "b": [0.7787, 0.6913, 0.8048, 0.7063]}, {"w": "feature", "b": [0.8121, 0.6913, 0.8691, 0.7063]}]}, {"id": "b_10", "type": "paragraph", "text": "extractor object that was used when the model was built. In the production environment, deserialize both and use them. When possible, avoid having several versions of the feature extraction code.", "words": [{"w": "extractor", "b": [0.1312, 0.7093, 0.2061, 0.7242]}, {"w": "object", "b": [0.2122, 0.7093, 0.2624, 0.7242]}, {"w": "that", "b": [0.2685, 0.7093, 0.303, 0.7242]}, {"w": "was", "b": [0.3092, 0.7093, 0.339, 0.7242]}, {"w": "used", "b": [0.3452, 0.7093, 0.3819, 0.7242]}, {"w": "when", "b": [0.3881, 0.7093, 0.4309, 0.7242]}, {"w": "the", "b": [0.437, 0.7093, 0.4632, 0.7242]}, {"w": "model", "b": [0.4693, 0.7093, 0.519, 0.7242]}, {"w": "was", "b": [0.5251, 0.7093, 0.555, 0.7242]}, {"w": "built.", "b": [0.5611, 0.7093, 0.605, 0.7242]}, {"w": "In", "b": [0.6133, 0.7093, 0.6305, 0.7242]}, {"w": "the", "b": [0.6367, 0.7093, 0.6628, 0.7242]}, {"w": "production", "b": [0.6689, 0.7093, 0.7583, 0.7242]}, {"w": "environment,", "b": [0.7645, 0.7093, 0.8717, 0.7242]}, {"w": "deserialize", "b": [0.1312, 0.7272, 0.2144, 0.7422]}, {"w": "both", "b": [0.2206, 0.7272, 0.2585, 0.7422]}, {"w": "and", "b": [0.2646, 0.7272, 0.2947, 0.7422]}, {"w": "use", "b": [0.3009, 0.7272, 0.3269, 0.7422]}, {"w": "them.", "b": [0.3331, 0.7272, 0.3798, 0.7422]}, {"w": "When", "b": [0.388, 0.7272, 0.4363, 0.7422]}, {"w": "possible,", "b": [0.4424, 0.7272, 0.5116, 0.7422]}, {"w": "avoid", "b": [0.5178, 0.7272, 0.5609, 0.7422]}, {"w": "having", "b": [0.567, 0.7272, 0.621, 0.7422]}, {"w": "several", "b": [0.6271, 0.7272, 0.6823, 0.7422]}, {"w": "versions", "b": [0.6885, 0.7272, 0.7531, 0.7422]}, {"w": "of", "b": [0.7593, 0.7272, 0.7743, 0.7422]}, {"w": "the", "b": [0.7805, 0.7272, 0.8064, 0.7422]}, {"w": "feature", "b": [0.8126, 0.7272, 0.8692, 0.7422]}, {"w": "extraction", "b": [0.1312, 0.7452, 0.2128, 0.7601]}, {"w": "code.", "b": [0.219, 0.7452, 0.2605, 0.7601]}]}, {"id": "b_11", "type": "paragraph", "text": "If your production environment doesn’t let you deserialize both the model and the feature extraction code, use the same feature extraction code when you train the model and serve it. Even a tiny difference between the code a data scientist used to train the model, and the optimized code the IT team might have written for the production environment, may result in significant prediction error.", "words": [{"w": "If", "b": [0.1312, 0.7721, 0.1437, 0.7871]}, {"w": "your", "b": [0.1499, 0.7721, 0.1863, 0.7871]}, {"w": "production", "b": [0.1925, 0.7721, 0.2815, 0.7871]}, {"w": "environment", "b": [0.2876, 0.7721, 0.3891, 0.7871]}, {"w": "doesn’t", "b": [0.3953, 0.7721, 0.4541, 0.7871]}, {"w": "let", "b": [0.4603, 0.7721, 0.4811, 0.7871]}, {"w": "you", "b": [0.4873, 0.7721, 0.5164, 0.7871]}, {"w": "deserialize", "b": [0.5225, 0.7721, 0.6059, 0.7871]}, {"w": "both", "b": [0.6121, 0.7721, 0.65, 0.7871]}, {"w": "the", "b": [0.6562, 0.7721, 0.6822, 0.7871]}, {"w": "model", "b": [0.6884, 0.7721, 0.7378, 0.7871]}, {"w": "and", "b": [0.7439, 0.7721, 0.7741, 0.7871]}, {"w": "the", "b": [0.7802, 0.7721, 0.8062, 0.7871]}, {"w": "feature", "b": [0.8124, 0.7721, 0.8692, 0.7871]}, {"w": "extraction", "b": [0.1312, 0.7901, 0.2115, 0.805]}, {"w": "code,", "b": [0.2176, 0.7901, 0.2585, 0.805]}, {"w": "use", "b": [0.2647, 0.7901, 0.29, 0.805]}, {"w": "the", "b": [0.2961, 0.7901, 0.3214, 0.805]}, {"w": "same", "b": [0.3275, 0.7901, 0.367, 0.805]}, {"w": "feature", "b": [0.3731, 0.7901, 0.4281, 0.805]}, {"w": "extraction", "b": [0.4343, 0.7901, 0.5146, 0.805]}, {"w": "code", "b": [0.5207, 0.7901, 0.5565, 0.805]}, {"w": "when", "b": [0.5627, 0.7901, 0.604, 0.805]}, {"w": "you", "b": [0.6102, 0.7901, 0.6384, 0.805]}, {"w": "train", "b": [0.6446, 0.7901, 0.683, 0.805]}, {"w": "the", "b": [0.6891, 0.7901, 0.7143, 0.805]}, {"w": "model", "b": [0.7205, 0.7901, 0.7684, 0.805]}, {"w": "and", "b": [0.7745, 0.7901, 0.8038, 0.805]}, {"w": "serve", "b": [0.8099, 0.7901, 0.8494, 0.805]}, {"w": "it.", "b": [0.8556, 0.7901, 0.8727, 0.805]}, {"w": "Even", "b": [0.1312, 0.808, 0.1723, 0.823]}, {"w": "a", "b": [0.1788, 0.808, 0.1882, 0.823]}, {"w": "tiny", "b": [0.1947, 0.808, 0.2271, 0.823]}, {"w": "difference", "b": [0.2336, 0.808, 0.3116, 0.823]}, {"w": "between", "b": [0.3181, 0.808, 0.3845, 0.823]}, {"w": "the", "b": [0.391, 0.808, 0.4172, 0.823]}, {"w": "code", "b": [0.4236, 0.808, 0.4608, 0.823]}, {"w": "a", "b": [0.4673, 0.808, 0.4767, 0.823]}, {"w": "data", "b": [0.4831, 0.808, 0.5197, 0.823]}, {"w": "scientist", "b": [0.5262, 0.808, 0.5929, 0.823]}, {"w": "used", "b": [0.5994, 0.808, 0.6361, 0.823]}, {"w": "to", "b": [0.6426, 0.808, 0.6593, 0.823]}, {"w": "train", "b": [0.6658, 0.808, 0.7056, 0.823]}, {"w": "the", "b": [0.7121, 0.808, 0.7382, 0.823]}, {"w": "model,", "b": [0.7447, 0.808, 0.7996, 0.823]}, {"w": "and", "b": [0.8062, 0.808, 0.8365, 0.823]}, {"w": "the", "b": [0.843, 0.808, 0.8692, 0.823]}, {"w": "optimized", "b": [0.1312, 0.8259, 0.2097, 0.8409]}, {"w": "code", "b": [0.2159, 0.8259, 0.2521, 0.8409]}, {"w": "the", "b": [0.2582, 0.8259, 0.2837, 0.8409]}, {"w": "IT", "b": [0.2899, 0.8259, 0.3097, 0.8409]}, {"w": "team", "b": [0.3159, 0.8259, 0.3556, 0.8409]}, {"w": "might", "b": [0.3618, 0.8259, 0.4081, 0.8409]}, {"w": "have", "b": [0.4143, 0.8259, 0.4505, 0.8409]}, {"w": "written", "b": [0.4567, 0.8259, 0.5148, 0.8409]}, {"w": "for", "b": [0.5209, 0.8259, 0.5429, 0.8409]}, {"w": "the", "b": [0.5491, 0.8259, 0.5746, 0.8409]}, {"w": "production", "b": [0.5807, 0.8259, 0.6679, 0.8409]}, {"w": "environment,", "b": [0.6741, 0.8259, 0.7786, 0.8409]}, {"w": "may", "b": [0.7848, 0.8259, 0.8184, 0.8409]}, {"w": "result", "b": [0.8245, 0.8259, 0.8696, 0.8409]}, {"w": "in", "b": [0.1312, 0.8439, 0.1466, 0.8588]}, {"w": "significant", "b": [0.1528, 0.8439, 0.2344, 0.8588]}, {"w": "prediction", "b": [0.2406, 0.8439, 0.3216, 0.8588]}, {"w": "error.", "b": [0.3278, 0.8439, 0.372, 0.8588]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 47", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "47", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 137, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Once the production code for feature extraction is ready, use it to retrain the model. Always completely retrain the model after any change in the feature extraction code.", "words": [{"w": "Once", "b": [0.1312, 0.0881, 0.1714, 0.1031]}, {"w": "the", "b": [0.1776, 0.0881, 0.2027, 0.1031]}, {"w": "production", "b": [0.2088, 0.0881, 0.2948, 0.1031]}, {"w": "code", "b": [0.301, 0.0881, 0.3366, 0.1031]}, {"w": "for", "b": [0.3428, 0.0881, 0.3645, 0.1031]}, {"w": "feature", "b": [0.3706, 0.0881, 0.4254, 0.1031]}, {"w": "extraction", "b": [0.4315, 0.0881, 0.5115, 0.1031]}, {"w": "is", "b": [0.5176, 0.0881, 0.5298, 0.1031]}, {"w": "ready,", "b": [0.5359, 0.0881, 0.5832, 0.1031]}, {"w": "use", "b": [0.5893, 0.0881, 0.6146, 0.1031]}, {"w": "it", "b": [0.6207, 0.0881, 0.6327, 0.1031]}, {"w": "to", "b": [0.6389, 0.0881, 0.6549, 0.1031]}, {"w": "retrain", "b": [0.6611, 0.0881, 0.7144, 0.1031]}, {"w": "the", "b": [0.7206, 0.0881, 0.7457, 0.1031]}, {"w": "model.", "b": [0.7518, 0.0881, 0.8046, 0.1031]}, {"w": "Always", "b": [0.8128, 0.0881, 0.8691, 0.1031]}, {"w": "completely", "b": [0.1312, 0.106, 0.2179, 0.121]}, {"w": "retrain", "b": [0.224, 0.106, 0.2785, 0.121]}, {"w": "the", "b": [0.2846, 0.106, 0.3103, 0.121]}, {"w": "model", "b": [0.3164, 0.106, 0.3651, 0.121]}, {"w": "after", "b": [0.3713, 0.106, 0.4088, 0.121]}, {"w": "any", "b": [0.4149, 0.106, 0.4436, 0.121]}, {"w": "change", "b": [0.4498, 0.106, 0.5046, 0.121]}, {"w": "in", "b": [0.5108, 0.106, 0.5262, 0.121]}, {"w": "the", "b": [0.5323, 0.106, 0.558, 0.121]}, {"w": "feature", "b": [0.5641, 0.106, 0.6201, 0.121]}, {"w": "extraction", "b": [0.6262, 0.106, 0.7078, 0.121]}, {"w": "code.", "b": [0.714, 0.106, 0.7555, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "4.12.11 Log the Values of Features", "words": [{"w": "4.12.11", "b": [0.1312, 0.1538, 0.1961, 0.1688]}, {"w": "Log", "b": [0.2173, 0.1538, 0.2513, 0.1688]}, {"w": "the", "b": [0.2583, 0.1538, 0.2881, 0.1688]}, {"w": "Values", "b": [0.2952, 0.1538, 0.3556, 0.1688]}, {"w": "of", "b": [0.3626, 0.1538, 0.3797, 0.1688]}, {"w": "Features", "b": [0.3868, 0.1538, 0.4653, 0.1688]}]}, {"id": "b_2", "type": "paragraph", "text": "Log the feature values extracted in production for a random sample of online examples. When you work on a new version of the model, these values will be useful to control the quality of the training data. They will allow you to compare and ensure that the feature values logged in the production environment are the same as those you observed in the training data.", "words": [{"w": "Log", "b": [0.1312, 0.1901, 0.1606, 0.205]}, {"w": "the", "b": [0.1658, 0.1901, 0.1909, 0.205]}, {"w": "feature", "b": [0.196, 0.1901, 0.2509, 0.205]}, {"w": "values", "b": [0.256, 0.1901, 0.3038, 0.205]}, {"w": "extracted", "b": [0.309, 0.1901, 0.3829, 0.205]}, {"w": "in", "b": [0.3881, 0.1901, 0.4031, 0.205]}, {"w": "production", "b": [0.4083, 0.1901, 0.4943, 0.205]}, {"w": "for", "b": [0.4994, 0.1901, 0.5211, 0.205]}, {"w": "a", "b": [0.5263, 0.1901, 0.5353, 0.205]}, {"w": "random", "b": [0.5404, 0.1901, 0.6008, 0.205]}, {"w": "sample", "b": [0.6059, 0.1901, 0.6603, 0.205]}, {"w": "of", "b": [0.6654, 0.1901, 0.68, 0.205]}, {"w": "online", "b": [0.6851, 0.1901, 0.7324, 0.205]}, {"w": "examples.", "b": [0.7375, 0.1901, 0.8145, 0.205]}, {"w": "When", "b": [0.8224, 0.1901, 0.8691, 0.205]}, {"w": "you", "b": [0.1308, 0.208, 0.1593, 0.223]}, {"w": "work", "b": [0.1654, 0.208, 0.2041, 0.223]}, {"w": "on", "b": [0.2103, 0.208, 0.2296, 0.223]}, {"w": "a", "b": [0.2357, 0.208, 0.2449, 0.223]}, {"w": "new", "b": [0.251, 0.208, 0.2826, 0.223]}, {"w": "version", "b": [0.2887, 0.208, 0.3449, 0.223]}, {"w": "of", "b": [0.3511, 0.208, 0.3658, 0.223]}, {"w": "the", "b": [0.372, 0.208, 0.3974, 0.223]}, {"w": "model,", "b": [0.4036, 0.208, 0.457, 0.223]}, {"w": "these", "b": [0.4632, 0.208, 0.504, 0.223]}, {"w": "values", "b": [0.5101, 0.208, 0.5586, 0.223]}, {"w": "will", "b": [0.5648, 0.208, 0.5933, 0.223]}, {"w": "be", "b": [0.5994, 0.208, 0.6183, 0.223]}, {"w": "useful", "b": [0.6244, 0.208, 0.6708, 0.223]}, {"w": "to", "b": [0.677, 0.208, 0.6933, 0.223]}, {"w": "control", "b": [0.6994, 0.208, 0.755, 0.223]}, {"w": "the", "b": [0.7611, 0.208, 0.7866, 0.223]}, {"w": "quality", "b": [0.7927, 0.208, 0.8482, 0.223]}, {"w": "of", "b": [0.8543, 0.208, 0.8691, 0.223]}, {"w": "the", "b": [0.1312, 0.226, 0.1566, 0.2409]}, {"w": "training", "b": [0.1627, 0.226, 0.2256, 0.2409]}, {"w": "data.", "b": [0.2317, 0.226, 0.2722, 0.2409]}, {"w": "They", "b": [0.2804, 0.226, 0.3215, 0.2409]}, {"w": "will", "b": [0.3276, 0.226, 0.3559, 0.2409]}, {"w": "allow", "b": [0.3621, 0.226, 0.4031, 0.2409]}, {"w": "you", "b": [0.4092, 0.226, 0.4376, 0.2409]}, {"w": "to", "b": [0.4437, 0.226, 0.4599, 0.2409]}, {"w": "compare", "b": [0.4661, 0.226, 0.533, 0.2409]}, {"w": "and", "b": [0.5391, 0.226, 0.5685, 0.2409]}, {"w": "ensure", "b": [0.5746, 0.226, 0.6255, 0.2409]}, {"w": "that", "b": [0.6316, 0.226, 0.665, 0.2409]}, {"w": "the", "b": [0.6712, 0.226, 0.6965, 0.2409]}, {"w": "feature", "b": [0.7026, 0.226, 0.7579, 0.2409]}, {"w": "values", "b": [0.7641, 0.226, 0.8123, 0.2409]}, {"w": "logged", "b": [0.8184, 0.226, 0.8691, 0.2409]}, {"w": "in", "b": [0.1312, 0.2439, 0.1466, 0.2589]}, {"w": "the", "b": [0.1528, 0.2439, 0.1784, 0.2589]}, {"w": "production", "b": [0.1846, 0.2439, 0.2723, 0.2589]}, {"w": "environment", "b": [0.2784, 0.2439, 0.3785, 0.2589]}, {"w": "are", "b": [0.3846, 0.2439, 0.4093, 0.2589]}, {"w": "the", "b": [0.4154, 0.2439, 0.4411, 0.2589]}, {"w": "same", "b": [0.4472, 0.2439, 0.4873, 0.2589]}, {"w": "as", "b": [0.4935, 0.2439, 0.51, 0.2589]}, {"w": "those", "b": [0.5161, 0.2439, 0.5583, 0.2589]}, {"w": "you", "b": [0.5644, 0.2439, 0.5931, 0.2589]}, {"w": "observed", "b": [0.5993, 0.2439, 0.6692, 0.2589]}, {"w": "in", "b": [0.6754, 0.2439, 0.6907, 0.2589]}, {"w": "the", "b": [0.6969, 0.2439, 0.7225, 0.2589]}, {"w": "training", "b": [0.7287, 0.2439, 0.7923, 0.2589]}, {"w": "data.", "b": [0.7985, 0.2439, 0.8395, 0.2589]}]}, {"id": "b_3", "type": "paragraph", "text": "4.13 Summary", "words": [{"w": "4.13", "b": [0.1312, 0.2923, 0.1756, 0.3103]}, {"w": "Summary", "b": [0.2005, 0.2923, 0.3051, 0.3103]}]}, {"id": "b_4", "type": "paragraph", "text": "Features are values extracted from the data entities your model is designed to work with. Each feature represents a specific property of a data entity. Features are organized in feature vectors, and the model learns to perform mathematical operations on those feature vectors to generate the desired output.", "words": [{"w": "Features", "b": [0.1312, 0.3309, 0.2007, 0.3459]}, {"w": "are", "b": [0.2073, 0.3309, 0.2325, 0.3459]}, {"w": "values", "b": [0.2391, 0.3309, 0.2889, 0.3459]}, {"w": "extracted", "b": [0.2955, 0.3309, 0.3724, 0.3459]}, {"w": "from", "b": [0.379, 0.3309, 0.4172, 0.3459]}, {"w": "the", "b": [0.4238, 0.3309, 0.45, 0.3459]}, {"w": "data", "b": [0.4566, 0.3309, 0.4932, 0.3459]}, {"w": "entities", "b": [0.4998, 0.3309, 0.559, 0.3459]}, {"w": "your", "b": [0.5656, 0.3309, 0.6023, 0.3459]}, {"w": "model", "b": [0.6088, 0.3309, 0.6585, 0.3459]}, {"w": "is", "b": [0.6651, 0.3309, 0.6778, 0.3459]}, {"w": "designed", "b": [0.6844, 0.3309, 0.7546, 0.3459]}, {"w": "to", "b": [0.7612, 0.3309, 0.7779, 0.3459]}, {"w": "work", "b": [0.7845, 0.3309, 0.8243, 0.3459]}, {"w": "with.", "b": [0.8309, 0.3309, 0.8727, 0.3459]}, {"w": "Each", "b": [0.1312, 0.3489, 0.1702, 0.3638]}, {"w": "feature", "b": [0.1762, 0.3489, 0.2311, 0.3638]}, {"w": "represents", "b": [0.2371, 0.3489, 0.3163, 0.3638]}, {"w": "a", "b": [0.3224, 0.3489, 0.3314, 0.3638]}, {"w": "specific", "b": [0.3375, 0.3489, 0.3944, 0.3638]}, {"w": "property", "b": [0.4004, 0.3489, 0.4684, 0.3638]}, {"w": "of", "b": [0.4745, 0.3489, 0.489, 0.3638]}, {"w": "a", "b": [0.4951, 0.3489, 0.5041, 0.3638]}, {"w": "data", "b": [0.5102, 0.3489, 0.5453, 0.3638]}, {"w": "entity.", "b": [0.5514, 0.3489, 0.6006, 0.3638]}, {"w": "Features", "b": [0.6088, 0.3489, 0.6755, 0.3638]}, {"w": "are", "b": [0.6815, 0.3489, 0.7057, 0.3638]}, {"w": "organized", "b": [0.7118, 0.3489, 0.7872, 0.3638]}, {"w": "in", "b": [0.7932, 0.3489, 0.8083, 0.3638]}, {"w": "feature", "b": [0.8144, 0.3489, 0.8692, 0.3638]}, {"w": "vectors,", "b": [0.1308, 0.3668, 0.1928, 0.3818]}, {"w": "and", "b": [0.199, 0.3668, 0.2289, 0.3818]}, {"w": "the", "b": [0.235, 0.3668, 0.2608, 0.3818]}, {"w": "model", "b": [0.2669, 0.3668, 0.3159, 0.3818]}, {"w": "learns", "b": [0.3221, 0.3668, 0.3697, 0.3818]}, {"w": "to", "b": [0.3758, 0.3668, 0.3923, 0.3818]}, {"w": "perform", "b": [0.3985, 0.3668, 0.4625, 0.3818]}, {"w": "mathematical", "b": [0.4687, 0.3668, 0.579, 0.3818]}, {"w": "operations", "b": [0.5851, 0.3668, 0.6694, 0.3818]}, {"w": "on", "b": [0.6755, 0.3668, 0.6951, 0.3818]}, {"w": "those", "b": [0.7012, 0.3668, 0.7436, 0.3818]}, {"w": "feature", "b": [0.7498, 0.3668, 0.8061, 0.3818]}, {"w": "vectors", "b": [0.8122, 0.3668, 0.8691, 0.3818]}, {"w": "to", "b": [0.1312, 0.3848, 0.1476, 0.3997]}, {"w": "generate", "b": [0.1538, 0.3848, 0.2215, 0.3997]}, {"w": "the", "b": [0.2277, 0.3848, 0.2533, 0.3997]}, {"w": "desired", "b": [0.2595, 0.3848, 0.316, 0.3997]}, {"w": "output.", "b": [0.3222, 0.3848, 0.3817, 0.3997]}]}, {"id": "b_5", "type": "paragraph", "text": "For text, features can be generated in bulk by using techniques like bag-of-words. Numbers in the bag-of-words feature vectors mean the presence or absence of specific vocabulary words in the text document. Those numbers can be binary or contain more information, such as the frequency of each word in the document, or a TF-IDF value.", "words": [{"w": "For", "b": [0.1312, 0.4117, 0.1582, 0.4267]}, {"w": "text,", "b": [0.1643, 0.4117, 0.2017, 0.4267]}, {"w": "features", "b": [0.2078, 0.4117, 0.271, 0.4267]}, {"w": "can", "b": [0.2771, 0.4117, 0.3048, 0.4267]}, {"w": "be", "b": [0.3109, 0.4117, 0.3299, 0.4267]}, {"w": "generated", "b": [0.336, 0.4117, 0.4139, 0.4267]}, {"w": "in", "b": [0.42, 0.4117, 0.4354, 0.4267]}, {"w": "bulk", "b": [0.4415, 0.4117, 0.4769, 0.4267]}, {"w": "by", "b": [0.483, 0.4117, 0.5025, 0.4267]}, {"w": "using", "b": [0.5086, 0.4117, 0.5507, 0.4267]}, {"w": "techniques", "b": [0.5568, 0.4117, 0.641, 0.4267]}, {"w": "like", "b": [0.6471, 0.4117, 0.6748, 0.4267]}, {"w": "bag-of-words.", "b": [0.6809, 0.4117, 0.7886, 0.4267]}, {"w": "Numbers", "b": [0.7968, 0.4117, 0.8691, 0.4267]}, {"w": "in", "b": [0.1312, 0.4297, 0.1463, 0.4446]}, {"w": "the", "b": [0.1519, 0.4297, 0.177, 0.4446]}, {"w": "bag-of-words", "b": [0.1826, 0.4297, 0.2832, 0.4446]}, {"w": "feature", "b": [0.2888, 0.4297, 0.3436, 0.4446]}, {"w": "vectors", "b": [0.3492, 0.4297, 0.4047, 0.4446]}, {"w": "mean", "b": [0.4102, 0.4297, 0.4524, 0.4446]}, {"w": "the", "b": [0.458, 0.4297, 0.4832, 0.4446]}, {"w": "presence", "b": [0.4888, 0.4297, 0.5553, 0.4446]}, {"w": "or", "b": [0.5609, 0.4297, 0.577, 0.4446]}, {"w": "absence", "b": [0.5826, 0.4297, 0.643, 0.4446]}, {"w": "of", "b": [0.6486, 0.4297, 0.6632, 0.4446]}, {"w": "specific", "b": [0.6687, 0.4297, 0.7257, 0.4446]}, {"w": "vocabulary", "b": [0.7312, 0.4297, 0.8177, 0.4446]}, {"w": "words", "b": [0.8233, 0.4297, 0.8692, 0.4446]}, {"w": "in", "b": [0.1312, 0.4476, 0.1469, 0.4626]}, {"w": "the", "b": [0.153, 0.4476, 0.1791, 0.4626]}, {"w": "text", "b": [0.1852, 0.4476, 0.2181, 0.4626]}, {"w": "document.", "b": [0.2242, 0.4476, 0.3097, 0.4626]}, {"w": "Those", "b": [0.3179, 0.4476, 0.367, 0.4626]}, {"w": "numbers", "b": [0.3732, 0.4476, 0.4427, 0.4626]}, {"w": "can", "b": [0.4488, 0.4476, 0.477, 0.4626]}, {"w": "be", "b": [0.4831, 0.4476, 0.5024, 0.4626]}, {"w": "binary", "b": [0.5086, 0.4476, 0.5613, 0.4626]}, {"w": "or", "b": [0.5674, 0.4476, 0.5842, 0.4626]}, {"w": "contain", "b": [0.5903, 0.4476, 0.6503, 0.4626]}, {"w": "more", "b": [0.6564, 0.4476, 0.6971, 0.4626]}, {"w": "information,", "b": [0.7033, 0.4476, 0.8039, 0.4626]}, {"w": "such", "b": [0.8101, 0.4476, 0.8462, 0.4626]}, {"w": "as", "b": [0.8523, 0.4476, 0.8691, 0.4626]}, {"w": "the", "b": [0.1312, 0.4655, 0.1569, 0.4805]}, {"w": "frequency", "b": [0.163, 0.4655, 0.2405, 0.4805]}, {"w": "of", "b": [0.2467, 0.4655, 0.2615, 0.4805]}, {"w": "each", "b": [0.2677, 0.4655, 0.3031, 0.4805]}, {"w": "word", "b": [0.3092, 0.4655, 0.3488, 0.4805]}, {"w": "in", "b": [0.3549, 0.4655, 0.3703, 0.4805]}, {"w": "the", "b": [0.3764, 0.4655, 0.4021, 0.4805]}, {"w": "document,", "b": [0.4082, 0.4655, 0.4923, 0.4805]}, {"w": "or", "b": [0.4985, 0.4655, 0.5149, 0.4805]}, {"w": "a", "b": [0.5211, 0.4655, 0.5303, 0.4805]}, {"w": "TF-IDF", "b": [0.5365, 0.4655, 0.6008, 0.4805]}, {"w": "value.", "b": [0.6069, 0.4655, 0.6536, 0.4805]}]}, {"id": "b_6", "type": "paragraph", "text": "Most machine learning algorithms and libraries require that all features are numerical. To convert categorical features to numbers, techniques such as one-hot encoding and mean encoding are used. If the categorical feature’s values are cyclical, like days of the week or hours in a day, a better alternative is to convert that cyclical feature into two features, using the sine-cosine transformation.", "words": [{"w": "Most", "b": [0.1312, 0.4925, 0.1724, 0.5074]}, {"w": "machine", "b": [0.1785, 0.4925, 0.2456, 0.5074]}, {"w": "learning", "b": [0.2517, 0.4925, 0.3173, 0.5074]}, {"w": "algorithms", "b": [0.3234, 0.4925, 0.4099, 0.5074]}, {"w": "and", "b": [0.416, 0.4925, 0.4462, 0.5074]}, {"w": "libraries", "b": [0.4523, 0.4925, 0.518, 0.5074]}, {"w": "require", "b": [0.5241, 0.4925, 0.5809, 0.5074]}, {"w": "that", "b": [0.5871, 0.4925, 0.6214, 0.5074]}, {"w": "all", "b": [0.6275, 0.4925, 0.6473, 0.5074]}, {"w": "features", "b": [0.6534, 0.4925, 0.7175, 0.5074]}, {"w": "are", "b": [0.7236, 0.4925, 0.7487, 0.5074]}, {"w": "numerical.", "b": [0.7548, 0.4925, 0.8396, 0.5074]}, {"w": "To", "b": [0.8478, 0.4925, 0.8691, 0.5074]}, {"w": "convert", "b": [0.1312, 0.5104, 0.1915, 0.5254]}, {"w": "categorical", "b": [0.1992, 0.5104, 0.2871, 0.5254]}, {"w": "features", "b": [0.2949, 0.5104, 0.3594, 0.5254]}, {"w": "to", "b": [0.3672, 0.5104, 0.3839, 0.5254]}, {"w": "numbers,", "b": [0.3917, 0.5104, 0.4667, 0.5254]}, {"w": "techniques", "b": [0.4749, 0.5104, 0.5608, 0.5254]}, {"w": "such", "b": [0.5686, 0.5104, 0.6048, 0.5254]}, {"w": "as", "b": [0.6125, 0.5104, 0.6294, 0.5254]}, {"w": "one-hot", "b": [0.6372, 0.5104, 0.6989, 0.5254]}, {"w": "encoding", "b": [0.7066, 0.5104, 0.7793, 0.5254]}, {"w": "and", "b": [0.7871, 0.5104, 0.8175, 0.5254]}, {"w": "mean", "b": [0.8252, 0.5104, 0.8692, 0.5254]}, {"w": "encoding", "b": [0.1312, 0.5284, 0.2039, 0.5433]}, {"w": "are", "b": [0.2103, 0.5284, 0.2355, 0.5433]}, {"w": "used.", "b": [0.2419, 0.5284, 0.2839, 0.5433]}, {"w": "If", "b": [0.2929, 0.5284, 0.3054, 0.5433]}, {"w": "the", "b": [0.3119, 0.5284, 0.338, 0.5433]}, {"w": "categorical", "b": [0.3444, 0.5284, 0.4323, 0.5433]}, {"w": "feature’s", "b": [0.4388, 0.5284, 0.5085, 0.5433]}, {"w": "values", "b": [0.5149, 0.5284, 0.5647, 0.5433]}, {"w": "are", "b": [0.5711, 0.5284, 0.5963, 0.5433]}, {"w": "cyclical,", "b": [0.6027, 0.5284, 0.6681, 0.5433]}, {"w": "like", "b": [0.6746, 0.5284, 0.7029, 0.5433]}, {"w": "days", "b": [0.7093, 0.5284, 0.746, 0.5433]}, {"w": "of", "b": [0.7524, 0.5284, 0.7676, 0.5433]}, {"w": "the", "b": [0.774, 0.5284, 0.8002, 0.5433]}, {"w": "week", "b": [0.8066, 0.5284, 0.8463, 0.5433]}, {"w": "or", "b": [0.8528, 0.5284, 0.8695, 0.5433]}, {"w": "hours", "b": [0.1312, 0.5463, 0.1746, 0.5613]}, {"w": "in", "b": [0.1808, 0.5463, 0.1959, 0.5613]}, {"w": "a", "b": [0.202, 0.5463, 0.211, 0.5613]}, {"w": "day,", "b": [0.2172, 0.5463, 0.2488, 0.5613]}, {"w": "a", "b": [0.255, 0.5463, 0.264, 0.5613]}, {"w": "better", "b": [0.2702, 0.5463, 0.318, 0.5613]}, {"w": "alternative", "b": [0.3241, 0.5463, 0.4086, 0.5613]}, {"w": "is", "b": [0.4148, 0.5463, 0.4269, 0.5613]}, {"w": "to", "b": [0.4331, 0.5463, 0.4492, 0.5613]}, {"w": "convert", "b": [0.4553, 0.5463, 0.5132, 0.5613]}, {"w": "that", "b": [0.5193, 0.5463, 0.5525, 0.5613]}, {"w": "cyclical", "b": [0.5586, 0.5463, 0.6164, 0.5613]}, {"w": "feature", "b": [0.6226, 0.5463, 0.6774, 0.5613]}, {"w": "into", "b": [0.6836, 0.5463, 0.7142, 0.5613]}, {"w": "two", "b": [0.7204, 0.5463, 0.7485, 0.5613]}, {"w": "features,", "b": [0.7547, 0.5463, 0.8217, 0.5613]}, {"w": "using", "b": [0.8278, 0.5463, 0.8691, 0.5613]}, {"w": "the", "b": [0.1312, 0.5643, 0.1569, 0.5792]}, {"w": "sine-cosine", "b": [0.163, 0.5643, 0.2484, 0.5792]}, {"w": "transformation.", "b": [0.2545, 0.5643, 0.3793, 0.5792]}]}, {"id": "b_7", "type": "paragraph", "text": "Feature hashing is a way to convert text data, or categorical attributes with many values, into a feature vector of an arbitrary dimensionality. That can be useful when one-hot encoding or bag-of-words generate feature vectors with impractical dimensions.", "words": [{"w": "Feature", "b": [0.1312, 0.5912, 0.1908, 0.6061]}, {"w": "hashing", "b": [0.1961, 0.5912, 0.2565, 0.6061]}, {"w": "is", "b": [0.2619, 0.5912, 0.274, 0.6061]}, {"w": "a", "b": [0.2794, 0.5912, 0.2884, 0.6061]}, {"w": "way", "b": [0.2937, 0.5912, 0.3244, 0.6061]}, {"w": "to", "b": [0.3297, 0.5912, 0.3458, 0.6061]}, {"w": "convert", "b": [0.3511, 0.5912, 0.4089, 0.6061]}, {"w": "text", "b": [0.4143, 0.5912, 0.4459, 0.6061]}, {"w": "data,", "b": [0.4513, 0.5912, 0.4914, 0.6061]}, {"w": "or", "b": [0.4969, 0.5912, 0.5131, 0.6061]}, {"w": "categorical", "b": [0.5184, 0.5912, 0.6029, 0.6061]}, {"w": "attributes", "b": [0.6082, 0.5912, 0.6857, 0.6061]}, {"w": "with", "b": [0.6911, 0.5912, 0.7262, 0.6061]}, {"w": "many", "b": [0.7316, 0.5912, 0.7747, 0.6061]}, {"w": "values,", "b": [0.7801, 0.5912, 0.8329, 0.6061]}, {"w": "into", "b": [0.8384, 0.5912, 0.8691, 0.6061]}, {"w": "a", "b": [0.1312, 0.6091, 0.1403, 0.6241]}, {"w": "feature", "b": [0.1463, 0.6091, 0.2011, 0.6241]}, {"w": "vector", "b": [0.2071, 0.6091, 0.2554, 0.6241]}, {"w": "of", "b": [0.2614, 0.6091, 0.2759, 0.6241]}, {"w": "an", "b": [0.2819, 0.6091, 0.301, 0.6241]}, {"w": "arbitrary", "b": [0.307, 0.6091, 0.378, 0.6241]}, {"w": "dimensionality.", "b": [0.384, 0.6091, 0.5022, 0.6241]}, {"w": "That", "b": [0.5103, 0.6091, 0.5495, 0.6241]}, {"w": "can", "b": [0.5555, 0.6091, 0.5826, 0.6241]}, {"w": "be", "b": [0.5886, 0.6091, 0.6072, 0.6241]}, {"w": "useful", "b": [0.6132, 0.6091, 0.659, 0.6241]}, {"w": "when", "b": [0.665, 0.6091, 0.7062, 0.6241]}, {"w": "one-hot", "b": [0.7122, 0.6091, 0.7715, 0.6241]}, {"w": "encoding", "b": [0.7775, 0.6091, 0.8474, 0.6241]}, {"w": "or", "b": [0.8534, 0.6091, 0.8695, 0.6241]}, {"w": "bag-of-words", "b": [0.1312, 0.6271, 0.2339, 0.642]}, {"w": "generate", "b": [0.24, 0.6271, 0.3078, 0.642]}, {"w": "feature", "b": [0.314, 0.6271, 0.3699, 0.642]}, {"w": "vectors", "b": [0.3761, 0.6271, 0.4326, 0.642]}, {"w": "with", "b": [0.4388, 0.6271, 0.4746, 0.642]}, {"w": "impractical", "b": [0.4808, 0.6271, 0.5711, 0.642]}, {"w": "dimensions.", "b": [0.5772, 0.6271, 0.6708, 0.642]}]}, {"id": "b_8", "type": "paragraph", "text": "Topic modeling is a family of algorithmic techniques, such as LDA and LSA, that allow us to learn a model that converts any document into a vector of topics of a required dimensionality.", "words": [{"w": "Topic", "b": [0.1306, 0.654, 0.1743, 0.6689]}, {"w": "modeling", "b": [0.1802, 0.654, 0.2521, 0.6689]}, {"w": "is", "b": [0.2581, 0.654, 0.2702, 0.6689]}, {"w": "a", "b": [0.2762, 0.654, 0.2852, 0.6689]}, {"w": "family", "b": [0.2912, 0.654, 0.3404, 0.6689]}, {"w": "of", "b": [0.3464, 0.654, 0.361, 0.6689]}, {"w": "algorithmic", "b": [0.367, 0.654, 0.4564, 0.6689]}, {"w": "techniques,", "b": [0.4624, 0.654, 0.5499, 0.6689]}, {"w": "such", "b": [0.556, 0.654, 0.5907, 0.6689]}, {"w": "as", "b": [0.5967, 0.654, 0.6129, 0.6689]}, {"w": "LDA", "b": [0.6189, 0.654, 0.657, 0.6689]}, {"w": "and", "b": [0.663, 0.654, 0.6921, 0.6689]}, {"w": "LSA,", "b": [0.6981, 0.654, 0.738, 0.6689]}, {"w": "that", "b": [0.744, 0.654, 0.7772, 0.6689]}, {"w": "allow", "b": [0.7832, 0.654, 0.8238, 0.6689]}, {"w": "us", "b": [0.8298, 0.654, 0.847, 0.6689]}, {"w": "to", "b": [0.853, 0.654, 0.869, 0.6689]}, {"w": "learn", "b": [0.1312, 0.6719, 0.1705, 0.6869]}, {"w": "a", "b": [0.1762, 0.6719, 0.1853, 0.6869]}, {"w": "model", "b": [0.191, 0.6719, 0.2388, 0.6869]}, {"w": "that", "b": [0.2445, 0.6719, 0.2777, 0.6869]}, {"w": "converts", "b": [0.2834, 0.6719, 0.3484, 0.6869]}, {"w": "any", "b": [0.3541, 0.6719, 0.3823, 0.6869]}, {"w": "document", "b": [0.388, 0.6719, 0.4654, 0.6869]}, {"w": "into", "b": [0.4711, 0.6719, 0.5018, 0.6869]}, {"w": "a", "b": [0.5075, 0.6719, 0.5166, 0.6869]}, {"w": "vector", "b": [0.5223, 0.6719, 0.5706, 0.6869]}, {"w": "of", "b": [0.5763, 0.6719, 0.5909, 0.6869]}, {"w": "topics", "b": [0.5967, 0.6719, 0.643, 0.6869]}, {"w": "of", "b": [0.6487, 0.6719, 0.6633, 0.6869]}, {"w": "a", "b": [0.6691, 0.6719, 0.6781, 0.6869]}, {"w": "required", "b": [0.6839, 0.6719, 0.7488, 0.6869]}, {"w": "dimensionality.", "b": [0.7545, 0.6719, 0.8727, 0.6869]}]}, {"id": "b_9", "type": "paragraph", "text": "A time series is an ordered sequence of observations. Each observation is marked with a time-related attribute, such as timestamp, date, year, and so on. Before neural networks reached their modern capacity to learn, analysts worked with time-series data using the shallow machine learning toolkit. The time-series had to be converted into “flat” feature vectors. Nowadays, analysts use neural network architectures adapted to work with sequences, such as LSTM, CNN, and Transformer.", "words": [{"w": "A", "b": [0.1305, 0.6989, 0.1446, 0.7138]}, {"w": "time", "b": [0.1517, 0.6989, 0.1883, 0.7138]}, {"w": "series", "b": [0.1953, 0.6989, 0.2395, 0.7138]}, {"w": "is", "b": [0.2465, 0.6989, 0.2592, 0.7138]}, {"w": "an", "b": [0.2662, 0.6989, 0.2861, 0.7138]}, {"w": "ordered", "b": [0.2931, 0.6989, 0.355, 0.7138]}, {"w": "sequence", "b": [0.362, 0.6989, 0.4338, 0.7138]}, {"w": "of", "b": [0.4408, 0.6989, 0.456, 0.7138]}, {"w": "observations.", "b": [0.463, 0.6989, 0.5695, 0.7138]}, {"w": "Each", "b": [0.5803, 0.6989, 0.6208, 0.7138]}, {"w": "observation", "b": [0.6278, 0.6989, 0.7217, 0.7138]}, {"w": "is", "b": [0.7287, 0.6989, 0.7413, 0.7138]}, {"w": "marked", "b": [0.7484, 0.6989, 0.8091, 0.7138]}, {"w": "with", "b": [0.8161, 0.6989, 0.8527, 0.7138]}, {"w": "a", "b": [0.8597, 0.6989, 0.8691, 0.7138]}, {"w": "time-related", "b": [0.1312, 0.7168, 0.2307, 0.7318]}, {"w": "attribute,", "b": [0.2374, 0.7168, 0.3159, 0.7318]}, {"w": "such", "b": [0.3228, 0.7168, 0.359, 0.7318]}, {"w": "as", "b": [0.3658, 0.7168, 0.3827, 0.7318]}, {"w": "timestamp,", "b": [0.3894, 0.7168, 0.4816, 0.7318]}, {"w": "date,", "b": [0.4885, 0.7168, 0.5293, 0.7318]}, {"w": "year,", "b": [0.5362, 0.7168, 0.576, 0.7318]}, {"w": "and", "b": [0.5829, 0.7168, 0.6132, 0.7318]}, {"w": "so", "b": [0.62, 0.7168, 0.6369, 0.7318]}, {"w": "on.", "b": [0.6436, 0.7168, 0.6687, 0.7318]}, {"w": "Before", "b": [0.6788, 0.7168, 0.7314, 0.7318]}, {"w": "neural", "b": [0.7381, 0.7168, 0.7895, 0.7318]}, {"w": "networks", "b": [0.7962, 0.7168, 0.8691, 0.7318]}, {"w": "reached", "b": [0.1312, 0.7347, 0.1936, 0.7497]}, {"w": "their", "b": [0.201, 0.7347, 0.2397, 0.7497]}, {"w": "modern", "b": [0.2472, 0.7347, 0.3095, 0.7497]}, {"w": "capacity", "b": [0.3169, 0.7347, 0.3849, 0.7497]}, {"w": "to", "b": [0.3923, 0.7347, 0.409, 0.7497]}, {"w": "learn,", "b": [0.4165, 0.7347, 0.4626, 0.7497]}, {"w": "analysts", "b": [0.4703, 0.7347, 0.537, 0.7497]}, {"w": "worked", "b": [0.5444, 0.7347, 0.6025, 0.7497]}, {"w": "with", "b": [0.6099, 0.7347, 0.6465, 0.7497]}, {"w": "time-series", "b": [0.654, 0.7347, 0.7411, 0.7497]}, {"w": "data", "b": [0.7485, 0.7347, 0.7851, 0.7497]}, {"w": "using", "b": [0.7925, 0.7347, 0.8355, 0.7497]}, {"w": "the", "b": [0.843, 0.7347, 0.8691, 0.7497]}, {"w": "shallow", "b": [0.1312, 0.7527, 0.1915, 0.7677]}, {"w": "machine", "b": [0.1983, 0.7527, 0.2658, 0.7677]}, {"w": "learning", "b": [0.2727, 0.7527, 0.3386, 0.7677]}, {"w": "toolkit.", "b": [0.3455, 0.7527, 0.4051, 0.7677]}, {"w": "The", "b": [0.4154, 0.7527, 0.4478, 0.7677]}, {"w": "time-series", "b": [0.4546, 0.7527, 0.5417, 0.7677]}, {"w": "had", "b": [0.5486, 0.7527, 0.5789, 0.7677]}, {"w": "to", "b": [0.5858, 0.7527, 0.6025, 0.7677]}, {"w": "be", "b": [0.6093, 0.7527, 0.6287, 0.7677]}, {"w": "converted", "b": [0.6355, 0.7527, 0.7146, 0.7677]}, {"w": "into", "b": [0.7214, 0.7527, 0.7534, 0.7677]}, {"w": "“flat”", "b": [0.7602, 0.7527, 0.8052, 0.7677]}, {"w": "feature", "b": [0.812, 0.7527, 0.8691, 0.7677]}, {"w": "vectors.", "b": [0.1308, 0.7706, 0.1912, 0.7856]}, {"w": "Nowadays,", "b": [0.1991, 0.7706, 0.283, 0.7856]}, {"w": "analysts", "b": [0.2884, 0.7706, 0.3525, 0.7856]}, {"w": "use", "b": [0.3576, 0.7706, 0.3829, 0.7856]}, {"w": "neural", "b": [0.3881, 0.7706, 0.4374, 0.7856]}, {"w": "network", "b": [0.4426, 0.7706, 0.5054, 0.7856]}, {"w": "architectures", "b": [0.5106, 0.7706, 0.6118, 0.7856]}, {"w": "adapted", "b": [0.617, 0.7706, 0.6803, 0.7856]}, {"w": "to", "b": [0.6855, 0.7706, 0.7016, 0.7856]}, {"w": "work", "b": [0.7068, 0.7706, 0.745, 0.7856]}, {"w": "with", "b": [0.7502, 0.7706, 0.7854, 0.7856]}, {"w": "sequences,", "b": [0.7906, 0.7706, 0.8717, 0.7856]}, {"w": "such", "b": [0.1312, 0.7886, 0.1667, 0.8035]}, {"w": "as", "b": [0.1729, 0.7886, 0.1894, 0.8035]}, {"w": "LSTM,", "b": [0.1955, 0.7886, 0.2527, 0.8035]}, {"w": "CNN,", "b": [0.2588, 0.7886, 0.305, 0.8035]}, {"w": "and", "b": [0.3111, 0.7886, 0.3409, 0.8035]}, {"w": "Transformer.", "b": [0.347, 0.7886, 0.4508, 0.8035]}]}, {"id": "b_10", "type": "paragraph", "text": "Good features have high predictive power, can be computed fast, are reliable and uncorrelated.", "words": [{"w": "Good", "b": [0.1312, 0.8155, 0.1746, 0.8305]}, {"w": "features", "b": [0.1796, 0.8155, 0.2416, 0.8305]}, {"w": "have", "b": [0.2466, 0.8155, 0.2823, 0.8305]}, {"w": "high", "b": [0.2873, 0.8155, 0.3215, 0.8305]}, {"w": "predictive", "b": [0.3265, 0.8155, 0.404, 0.8305]}, {"w": "power,", "b": [0.409, 0.8155, 0.4608, 0.8305]}, {"w": "can", "b": [0.4661, 0.8155, 0.4932, 0.8305]}, {"w": "be", "b": [0.4982, 0.8155, 0.5169, 0.8305]}, {"w": "computed", "b": [0.5219, 0.8155, 0.5993, 0.8305]}, {"w": "fast,", "b": [0.6043, 0.8155, 0.6381, 0.8305]}, {"w": "are", "b": [0.6434, 0.8155, 0.6675, 0.8305]}, {"w": "reliable", "b": [0.6726, 0.8155, 0.7299, 0.8305]}, {"w": "and", "b": [0.735, 0.8155, 0.7641, 0.8305]}, {"w": "uncorrelated.", "b": [0.7691, 0.8155, 0.8728, 0.8305]}]}, {"id": "b_11", "type": "paragraph", "text": "It is important that the distribution of feature values in the training set is similar to the distribution of values the production model will receive. Furthermore, good features are", "words": [{"w": "It", "b": [0.1312, 0.8424, 0.1453, 0.8574]}, {"w": "is", "b": [0.1521, 0.8424, 0.1648, 0.8574]}, {"w": "important", "b": [0.1715, 0.8424, 0.2542, 0.8574]}, {"w": "that", "b": [0.261, 0.8424, 0.2955, 0.8574]}, {"w": "the", "b": [0.3023, 0.8424, 0.3284, 0.8574]}, {"w": "distribution", "b": [0.3352, 0.8424, 0.4316, 0.8574]}, {"w": "of", "b": [0.4383, 0.8424, 0.4535, 0.8574]}, {"w": "feature", "b": [0.4603, 0.8424, 0.5174, 0.8574]}, {"w": "values", "b": [0.5241, 0.8424, 0.574, 0.8574]}, {"w": "in", "b": [0.5807, 0.8424, 0.5964, 0.8574]}, {"w": "the", "b": [0.6032, 0.8424, 0.6293, 0.8574]}, {"w": "training", "b": [0.6361, 0.8424, 0.701, 0.8574]}, {"w": "set", "b": [0.7078, 0.8424, 0.7309, 0.8574]}, {"w": "is", "b": [0.7377, 0.8424, 0.7503, 0.8574]}, {"w": "similar", "b": [0.7571, 0.8424, 0.8127, 0.8574]}, {"w": "to", "b": [0.8195, 0.8424, 0.8362, 0.8574]}, {"w": "the", "b": [0.843, 0.8424, 0.8691, 0.8574]}, {"w": "distribution", "b": [0.1312, 0.8604, 0.2276, 0.8753]}, {"w": "of", "b": [0.2348, 0.8604, 0.25, 0.8753]}, {"w": "values", "b": [0.2572, 0.8604, 0.307, 0.8753]}, {"w": "the", "b": [0.3142, 0.8604, 0.3404, 0.8753]}, {"w": "production", "b": [0.3476, 0.8604, 0.4371, 0.8753]}, {"w": "model", "b": [0.4443, 0.8604, 0.4939, 0.8753]}, {"w": "will", "b": [0.5011, 0.8604, 0.5304, 0.8753]}, {"w": "receive.", "b": [0.5376, 0.8604, 0.5984, 0.8753]}, {"w": "Furthermore,", "b": [0.6097, 0.8604, 0.7179, 0.8753]}, {"w": "good", "b": [0.7254, 0.8604, 0.7651, 0.8753]}, {"w": "features", "b": [0.7723, 0.8604, 0.8368, 0.8753]}, {"w": "are", "b": [0.844, 0.8604, 0.8691, 0.8753]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 48", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "48", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 138, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "unitary, easy to understand and maintain. The property of being unitary means that the feature represents a simple-to-understand and -explain quantity.", "words": [{"w": "unitary,", "b": [0.1312, 0.0881, 0.1951, 0.1031]}, {"w": "easy", "b": [0.2017, 0.0881, 0.2368, 0.1031]}, {"w": "to", "b": [0.2433, 0.0881, 0.26, 0.1031]}, {"w": "understand", "b": [0.2664, 0.0881, 0.3587, 0.1031]}, {"w": "and", "b": [0.3651, 0.0881, 0.3955, 0.1031]}, {"w": "maintain.", "b": [0.4019, 0.0881, 0.4798, 0.1031]}, {"w": "The", "b": [0.4889, 0.0881, 0.5214, 0.1031]}, {"w": "property", "b": [0.5278, 0.0881, 0.5985, 0.1031]}, {"w": "of", "b": [0.605, 0.0881, 0.6202, 0.1031]}, {"w": "being", "b": [0.6266, 0.0881, 0.6711, 0.1031]}, {"w": "unitary", "b": [0.6775, 0.0881, 0.7377, 0.1031]}, {"w": "means", "b": [0.7442, 0.0881, 0.7955, 0.1031]}, {"w": "that", "b": [0.802, 0.0881, 0.8365, 0.1031]}, {"w": "the", "b": [0.8429, 0.0881, 0.8691, 0.1031]}, {"w": "feature", "b": [0.1312, 0.106, 0.1872, 0.121]}, {"w": "represents", "b": [0.1933, 0.106, 0.2742, 0.121]}, {"w": "a", "b": [0.2803, 0.106, 0.2895, 0.121]}, {"w": "simple-to-understand", "b": [0.2957, 0.106, 0.4662, 0.121]}, {"w": "and", "b": [0.4723, 0.106, 0.5021, 0.121]}, {"w": "-explain", "b": [0.5082, 0.106, 0.5723, 0.121]}, {"w": "quantity.", "b": [0.5785, 0.106, 0.6497, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "To increase the predictive power of the data, additional features can be synthesized by discretizing an existing numerical feature, clustering training examples, or applying simple transformations to existing features or combining pairs of features.", "words": [{"w": "To", "b": [0.1306, 0.133, 0.152, 0.1479]}, {"w": "increase", "b": [0.1602, 0.133, 0.2252, 0.1479]}, {"w": "the", "b": [0.2333, 0.133, 0.2595, 0.1479]}, {"w": "predictive", "b": [0.2676, 0.133, 0.3482, 0.1479]}, {"w": "power", "b": [0.3564, 0.133, 0.4051, 0.1479]}, {"w": "of", "b": [0.4132, 0.133, 0.4284, 0.1479]}, {"w": "the", "b": [0.4365, 0.133, 0.4627, 0.1479]}, {"w": "data,", "b": [0.4708, 0.133, 0.5126, 0.1479]}, {"w": "additional", "b": [0.5212, 0.133, 0.6039, 0.1479]}, {"w": "features", "b": [0.612, 0.133, 0.6765, 0.1479]}, {"w": "can", "b": [0.6846, 0.133, 0.7129, 0.1479]}, {"w": "be", "b": [0.721, 0.133, 0.7404, 0.1479]}, {"w": "synthesized", "b": [0.7485, 0.133, 0.8418, 0.1479]}, {"w": "by", "b": [0.85, 0.133, 0.8698, 0.1479]}, {"w": "discretizing", "b": [0.1312, 0.1509, 0.2236, 0.1659]}, {"w": "an", "b": [0.2297, 0.1509, 0.2494, 0.1659]}, {"w": "existing", "b": [0.2555, 0.1509, 0.3183, 0.1659]}, {"w": "numerical", "b": [0.3244, 0.1509, 0.4037, 0.1659]}, {"w": "feature,", "b": [0.4098, 0.1509, 0.4715, 0.1659]}, {"w": "clustering", "b": [0.4776, 0.1509, 0.5565, 0.1659]}, {"w": "training", "b": [0.5626, 0.1509, 0.6269, 0.1659]}, {"w": "examples,", "b": [0.633, 0.1509, 0.7124, 0.1659]}, {"w": "or", "b": [0.7185, 0.1509, 0.7351, 0.1659]}, {"w": "applying", "b": [0.7412, 0.1509, 0.8112, 0.1659]}, {"w": "simple", "b": [0.8173, 0.1509, 0.8692, 0.1659]}, {"w": "transformations", "b": [0.1312, 0.1689, 0.2582, 0.1838]}, {"w": "to", "b": [0.2643, 0.1689, 0.2807, 0.1838]}, {"w": "existing", "b": [0.2869, 0.1689, 0.349, 0.1838]}, {"w": "features", "b": [0.3552, 0.1689, 0.4184, 0.1838]}, {"w": "or", "b": [0.4246, 0.1689, 0.441, 0.1838]}, {"w": "combining", "b": [0.4472, 0.1689, 0.5297, 0.1838]}, {"w": "pairs", "b": [0.5359, 0.1689, 0.575, 0.1838]}, {"w": "of", "b": [0.5811, 0.1689, 0.596, 0.1838]}, {"w": "features.", "b": [0.6022, 0.1689, 0.6705, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "For text, features can be learned from unlabeled data in the form of word and document embeddings. More generally, embeddings can be trained for any type of data if we manage to formulate an appropriate prediction problem and train a deep model. Embedding vectors are then extracted from several rightmost (i.e., closest to the output) fully-connected layers.", "words": [{"w": "For", "b": [0.1312, 0.1958, 0.1588, 0.2107]}, {"w": "text,", "b": [0.1655, 0.1958, 0.2036, 0.2107]}, {"w": "features", "b": [0.2105, 0.1958, 0.275, 0.2107]}, {"w": "can", "b": [0.2817, 0.1958, 0.3099, 0.2107]}, {"w": "be", "b": [0.3166, 0.1958, 0.336, 0.2107]}, {"w": "learned", "b": [0.3427, 0.1958, 0.4024, 0.2107]}, {"w": "from", "b": [0.4091, 0.1958, 0.4473, 0.2107]}, {"w": "unlabeled", "b": [0.454, 0.1958, 0.533, 0.2107]}, {"w": "data", "b": [0.5397, 0.1958, 0.5763, 0.2107]}, {"w": "in", "b": [0.583, 0.1958, 0.5987, 0.2107]}, {"w": "the", "b": [0.6054, 0.1958, 0.6315, 0.2107]}, {"w": "form", "b": [0.6382, 0.1958, 0.6764, 0.2107]}, {"w": "of", "b": [0.6831, 0.1958, 0.6983, 0.2107]}, {"w": "word", "b": [0.705, 0.1958, 0.7453, 0.2107]}, {"w": "and", "b": [0.752, 0.1958, 0.7824, 0.2107]}, {"w": "document", "b": [0.7891, 0.1958, 0.8696, 0.2107]}, {"w": "embeddings.", "b": [0.1312, 0.2137, 0.2314, 0.2287]}, {"w": "More", "b": [0.2396, 0.2137, 0.2814, 0.2287]}, {"w": "generally,", "b": [0.2876, 0.2137, 0.364, 0.2287]}, {"w": "embeddings", "b": [0.3701, 0.2137, 0.4652, 0.2287]}, {"w": "can", "b": [0.4713, 0.2137, 0.4991, 0.2287]}, {"w": "be", "b": [0.5053, 0.2137, 0.5244, 0.2287]}, {"w": "trained", "b": [0.5305, 0.2137, 0.5883, 0.2287]}, {"w": "for", "b": [0.5945, 0.2137, 0.6167, 0.2287]}, {"w": "any", "b": [0.6229, 0.2137, 0.6517, 0.2287]}, {"w": "type", "b": [0.6579, 0.2137, 0.6935, 0.2287]}, {"w": "of", "b": [0.6996, 0.2137, 0.7146, 0.2287]}, {"w": "data", "b": [0.7207, 0.2137, 0.7568, 0.2287]}, {"w": "if", "b": [0.763, 0.2137, 0.7738, 0.2287]}, {"w": "we", "b": [0.7799, 0.2137, 0.8011, 0.2287]}, {"w": "manage", "b": [0.8072, 0.2137, 0.8691, 0.2287]}, {"w": "to", "b": [0.1312, 0.2317, 0.1474, 0.2466]}, {"w": "formulate", "b": [0.1536, 0.2317, 0.2296, 0.2466]}, {"w": "an", "b": [0.2358, 0.2317, 0.255, 0.2466]}, {"w": "appropriate", "b": [0.2612, 0.2317, 0.3535, 0.2466]}, {"w": "prediction", "b": [0.3597, 0.2317, 0.4398, 0.2466]}, {"w": "problem", "b": [0.4459, 0.2317, 0.5108, 0.2466]}, {"w": "and", "b": [0.517, 0.2317, 0.5464, 0.2466]}, {"w": "train", "b": [0.5526, 0.2317, 0.5911, 0.2466]}, {"w": "a", "b": [0.5973, 0.2317, 0.6064, 0.2466]}, {"w": "deep", "b": [0.6125, 0.2317, 0.649, 0.2466]}, {"w": "model.", "b": [0.6552, 0.2317, 0.7084, 0.2466]}, {"w": "Embedding", "b": [0.7166, 0.2317, 0.8071, 0.2466]}, {"w": "vectors", "b": [0.8132, 0.2317, 0.8691, 0.2466]}, {"w": "are", "b": [0.1312, 0.2496, 0.1558, 0.2646]}, {"w": "then", "b": [0.1619, 0.2496, 0.1977, 0.2646]}, {"w": "extracted", "b": [0.2038, 0.2496, 0.279, 0.2646]}, {"w": "from", "b": [0.2851, 0.2496, 0.3224, 0.2646]}, {"w": "several", "b": [0.3286, 0.2496, 0.3829, 0.2646]}, {"w": "rightmost", "b": [0.389, 0.2496, 0.4663, 0.2646]}, {"w": "(i.e.,", "b": [0.4724, 0.2496, 0.5082, 0.2646]}, {"w": "closest", "b": [0.5143, 0.2496, 0.5666, 0.2646]}, {"w": "to", "b": [0.5727, 0.2496, 0.5891, 0.2646]}, {"w": "the", "b": [0.5952, 0.2496, 0.6208, 0.2646]}, {"w": "output)", "b": [0.6269, 0.2496, 0.6882, 0.2646]}, {"w": "fully-connected", "b": [0.6943, 0.2496, 0.8159, 0.2646]}, {"w": "layers.", "b": [0.822, 0.2496, 0.8727, 0.2646]}]}, {"id": "b_3", "type": "paragraph", "text": "Wise use of feature selection techniques remove features that don’t contribute to a model’s", "words": [{"w": "Wise", "b": [0.1303, 0.2765, 0.1702, 0.2915]}, {"w": "use", "b": [0.1763, 0.2765, 0.2022, 0.2915]}, {"w": "of", "b": [0.2083, 0.2765, 0.2233, 0.2915]}, {"w": "feature", "b": [0.2294, 0.2765, 0.2858, 0.2915]}, {"w": "selection", "b": [0.2919, 0.2765, 0.3612, 0.2915]}, {"w": "techniques", "b": [0.3674, 0.2765, 0.4522, 0.2915]}, {"w": "remove", "b": [0.4583, 0.2765, 0.5157, 0.2915]}, {"w": "features", "b": [0.5218, 0.2765, 0.5855, 0.2915]}, {"w": "that", "b": [0.5916, 0.2765, 0.6257, 0.2915]}, {"w": "don’t", "b": [0.6318, 0.2765, 0.6741, 0.2915]}, {"w": "contribute", "b": [0.6803, 0.2765, 0.7634, 0.2915]}, {"w": "to", "b": [0.7696, 0.2765, 0.7861, 0.2915]}, {"w": "a", "b": [0.7922, 0.2765, 0.8015, 0.2915]}, {"w": "model’s", "b": [0.8076, 0.2765, 0.8692, 0.2915]}]}, {"id": "b_4", "type": "paragraph", "text": "quality. Two common techniques are cutting the long tail and Boruta. L1 regularization also works as a features selection technique.", "words": [{"w": "quality.", "b": [0.1312, 0.2945, 0.1895, 0.3094]}, {"w": "Two", "b": [0.1977, 0.2945, 0.2308, 0.3094]}, {"w": "common", "b": [0.237, 0.2945, 0.3033, 0.3094]}, {"w": "techniques", "b": [0.3095, 0.2945, 0.392, 0.3094]}, {"w": "are", "b": [0.3982, 0.2945, 0.4223, 0.3094]}, {"w": "cutting", "b": [0.4285, 0.2945, 0.4848, 0.3094]}, {"w": "the", "b": [0.4909, 0.2945, 0.5161, 0.3094]}, {"w": "long", "b": [0.5222, 0.2945, 0.5554, 0.3094]}, {"w": "tail", "b": [0.5615, 0.2945, 0.5877, 0.3094]}, {"w": "and", "b": [0.5938, 0.2945, 0.623, 0.3094]}, {"w": "Boruta.", "b": [0.6291, 0.2945, 0.6892, 0.3094]}, {"w": "L1", "b": [0.6975, 0.2945, 0.7178, 0.3094]}, {"w": "regularization", "b": [0.724, 0.2945, 0.8326, 0.3094]}, {"w": "also", "b": [0.8388, 0.2945, 0.869, 0.3094]}, {"w": "works", "b": [0.1306, 0.3124, 0.1769, 0.3274]}, {"w": "as", "b": [0.183, 0.3124, 0.1995, 0.3274]}, {"w": "a", "b": [0.2057, 0.3124, 0.2149, 0.3274]}, {"w": "features", "b": [0.221, 0.3124, 0.2843, 0.3274]}, {"w": "selection", "b": [0.2904, 0.3124, 0.3593, 0.3274]}, {"w": "technique.", "b": [0.3654, 0.3124, 0.4475, 0.3274]}]}, {"id": "b_5", "type": "paragraph", "text": "Dimensionality reduction can improve visualization of high-dimensional datasets. It can also improve the model’s predictive quality. Presently, such techniques as PCA, UMAP, and autoencoders are used for dimensionality reduction. PCA is very fast, but UMAP and autoencoders produce better visualizations.", "words": [{"w": "Dimensionality", "b": [0.1312, 0.3394, 0.2545, 0.3543]}, {"w": "reduction", "b": [0.2619, 0.3394, 0.3394, 0.3543]}, {"w": "can", "b": [0.3468, 0.3394, 0.375, 0.3543]}, {"w": "improve", "b": [0.3824, 0.3394, 0.4479, 0.3543]}, {"w": "visualization", "b": [0.4553, 0.3394, 0.5584, 0.3543]}, {"w": "of", "b": [0.5658, 0.3394, 0.581, 0.3543]}, {"w": "high-dimensional", "b": [0.5884, 0.3394, 0.7276, 0.3543]}, {"w": "datasets.", "b": [0.735, 0.3394, 0.8074, 0.3543]}, {"w": "It", "b": [0.8193, 0.3394, 0.8335, 0.3543]}, {"w": "can", "b": [0.8409, 0.3394, 0.8691, 0.3543]}, {"w": "also", "b": [0.1312, 0.3573, 0.1627, 0.3723]}, {"w": "improve", "b": [0.1701, 0.3573, 0.2356, 0.3723]}, {"w": "the", "b": [0.243, 0.3573, 0.2692, 0.3723]}, {"w": "model’s", "b": [0.2766, 0.3573, 0.3389, 0.3723]}, {"w": "predictive", "b": [0.3463, 0.3573, 0.4269, 0.3723]}, {"w": "quality.", "b": [0.4344, 0.3573, 0.4951, 0.3723]}, {"w": "Presently,", "b": [0.5071, 0.3573, 0.5876, 0.3723]}, {"w": "such", "b": [0.5953, 0.3573, 0.6315, 0.3723]}, {"w": "techniques", "b": [0.6389, 0.3573, 0.7249, 0.3723]}, {"w": "as", "b": [0.7323, 0.3573, 0.7491, 0.3723]}, {"w": "PCA,", "b": [0.7565, 0.3573, 0.8023, 0.3723]}, {"w": "UMAP,", "b": [0.8097, 0.3573, 0.8717, 0.3723]}, {"w": "and", "b": [0.1312, 0.3752, 0.1612, 0.3902]}, {"w": "autoencoders", "b": [0.1673, 0.3752, 0.2737, 0.3902]}, {"w": "are", "b": [0.2799, 0.3752, 0.3047, 0.3902]}, {"w": "used", "b": [0.3108, 0.3752, 0.3471, 0.3902]}, {"w": "for", "b": [0.3532, 0.3752, 0.3754, 0.3902]}, {"w": "dimensionality", "b": [0.3816, 0.3752, 0.4993, 0.3902]}, {"w": "reduction.", "b": [0.5055, 0.3752, 0.587, 0.3902]}, {"w": "PCA", "b": [0.5952, 0.3752, 0.6352, 0.3902]}, {"w": "is", "b": [0.6413, 0.3752, 0.6538, 0.3902]}, {"w": "very", "b": [0.66, 0.3752, 0.6946, 0.3902]}, {"w": "fast,", "b": [0.7007, 0.3752, 0.7354, 0.3902]}, {"w": "but", "b": [0.7416, 0.3752, 0.7694, 0.3902]}, {"w": "UMAP", "b": [0.7756, 0.3752, 0.8331, 0.3902]}, {"w": "and", "b": [0.8392, 0.3752, 0.8691, 0.3902]}, {"w": "autoencoders", "b": [0.1312, 0.3932, 0.237, 0.4082]}, {"w": "produce", "b": [0.2432, 0.3932, 0.3073, 0.4082]}, {"w": "better", "b": [0.3135, 0.3932, 0.3623, 0.4082]}, {"w": "visualizations.", "b": [0.3684, 0.3932, 0.4819, 0.4082]}]}, {"id": "b_6", "type": "paragraph", "text": "It is considered best practices to scale features before training the model, store and document features in schema files or feature stores, and keep code, model, and training data in sync.", "words": [{"w": "It", "b": [0.1312, 0.4201, 0.1448, 0.4351]}, {"w": "is", "b": [0.1504, 0.4201, 0.1626, 0.4351]}, {"w": "considered", "b": [0.1682, 0.4201, 0.2508, 0.4351]}, {"w": "best", "b": [0.2565, 0.4201, 0.2893, 0.4351]}, {"w": "practices", "b": [0.2949, 0.4201, 0.3644, 0.4351]}, {"w": "to", "b": [0.37, 0.4201, 0.3861, 0.4351]}, {"w": "scale", "b": [0.3918, 0.4201, 0.4291, 0.4351]}, {"w": "features", "b": [0.4347, 0.4201, 0.4967, 0.4351]}, {"w": "before", "b": [0.5023, 0.4201, 0.5506, 0.4351]}, {"w": "training", "b": [0.5563, 0.4201, 0.6186, 0.4351]}, {"w": "the", "b": [0.6243, 0.4201, 0.6494, 0.4351]}, {"w": "model,", "b": [0.655, 0.4201, 0.7078, 0.4351]}, {"w": "store", "b": [0.7135, 0.4201, 0.7519, 0.4351]}, {"w": "and", "b": [0.7575, 0.4201, 0.7867, 0.4351]}, {"w": "document", "b": [0.7923, 0.4201, 0.8697, 0.4351]}, {"w": "features", "b": [0.1312, 0.4381, 0.1945, 0.453]}, {"w": "in", "b": [0.2006, 0.4381, 0.216, 0.453]}, {"w": "schema", "b": [0.2222, 0.4381, 0.2802, 0.453]}, {"w": "files", "b": [0.2864, 0.4381, 0.3172, 0.453]}, {"w": "or", "b": [0.3234, 0.4381, 0.3398, 0.453]}, {"w": "feature", "b": [0.346, 0.4381, 0.4019, 0.453]}, {"w": "stores,", "b": [0.4081, 0.4381, 0.4596, 0.453]}, {"w": "and", "b": [0.4658, 0.4381, 0.4955, 0.453]}, {"w": "keep", "b": [0.5017, 0.4381, 0.5376, 0.453]}, {"w": "code,", "b": [0.5437, 0.4381, 0.5853, 0.453]}, {"w": "model,", "b": [0.5914, 0.4381, 0.6452, 0.453]}, {"w": "and", "b": [0.6514, 0.4381, 0.6811, 0.453]}, {"w": "training", "b": [0.6873, 0.4381, 0.7509, 0.453]}, {"w": "data", "b": [0.7571, 0.4381, 0.7929, 0.453]}, {"w": "in", "b": [0.7991, 0.4381, 0.8145, 0.453]}, {"w": "sync.", "b": [0.8206, 0.4381, 0.8613, 0.453]}]}, {"id": "b_7", "type": "paragraph", "text": "Feature extraction code is one of the most important parts of a machine learning system. It must be extensively and systematically tested.", "words": [{"w": "Feature", "b": [0.1312, 0.465, 0.1915, 0.4799]}, {"w": "extraction", "b": [0.1977, 0.465, 0.2785, 0.4799]}, {"w": "code", "b": [0.2847, 0.465, 0.3208, 0.4799]}, {"w": "is", "b": [0.3269, 0.465, 0.3392, 0.4799]}, {"w": "one", "b": [0.3454, 0.465, 0.3728, 0.4799]}, {"w": "of", "b": [0.379, 0.465, 0.3937, 0.4799]}, {"w": "the", "b": [0.3999, 0.465, 0.4253, 0.4799]}, {"w": "most", "b": [0.4315, 0.465, 0.4702, 0.4799]}, {"w": "important", "b": [0.4763, 0.465, 0.5567, 0.4799]}, {"w": "parts", "b": [0.5628, 0.465, 0.6036, 0.4799]}, {"w": "of", "b": [0.6098, 0.465, 0.6245, 0.4799]}, {"w": "a", "b": [0.6307, 0.465, 0.6399, 0.4799]}, {"w": "machine", "b": [0.646, 0.465, 0.7116, 0.4799]}, {"w": "learning", "b": [0.7177, 0.465, 0.7818, 0.4799]}, {"w": "system.", "b": [0.788, 0.465, 0.8476, 0.4799]}, {"w": "It", "b": [0.8559, 0.465, 0.8696, 0.4799]}, {"w": "must", "b": [0.1312, 0.4829, 0.1708, 0.4979]}, {"w": "be", "b": [0.177, 0.4829, 0.1959, 0.4979]}, {"w": "extensively", "b": [0.2021, 0.4829, 0.2904, 0.4979]}, {"w": "and", "b": [0.2966, 0.4829, 0.3263, 0.4979]}, {"w": "systematically", "b": [0.3324, 0.4829, 0.4465, 0.4979]}, {"w": "tested.", "b": [0.4526, 0.4829, 0.5061, 0.4979]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 49", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "49", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 139, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 140, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 141, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "5 Supervised Model Training (Part 1)", "words": [{"w": "5", "b": [0.1312, 0.0845, 0.1462, 0.106]}, {"w": "Supervised", "b": [0.1761, 0.0845, 0.3187, 0.106]}, {"w": "Model", "b": [0.3287, 0.0845, 0.4114, 0.106]}, {"w": "Training", "b": [0.4213, 0.0845, 0.5311, 0.106]}, {"w": "(Part", "b": [0.5411, 0.0845, 0.6107, 0.106]}, {"w": "1)", "b": [0.6207, 0.0845, 0.6473, 0.106]}]}, {"id": "b_1", "type": "paragraph", "text": "Model training (or modeling) is the fourth stage in the machine learning project life cycle:", "words": [{"w": "Model", "b": [0.1312, 0.131, 0.1815, 0.146]}, {"w": "training", "b": [0.1876, 0.131, 0.2513, 0.146]}, {"w": "(or", "b": [0.2574, 0.131, 0.281, 0.146]}, {"w": "modeling)", "b": [0.2872, 0.131, 0.3677, 0.146]}, {"w": "is", "b": [0.3738, 0.131, 0.3862, 0.146]}, {"w": "the", "b": [0.3924, 0.131, 0.418, 0.146]}, {"w": "fourth", "b": [0.4242, 0.131, 0.474, 0.146]}, {"w": "stage", "b": [0.4801, 0.131, 0.5213, 0.146]}, {"w": "in", "b": [0.5274, 0.131, 0.5428, 0.146]}, {"w": "the", "b": [0.5489, 0.131, 0.5746, 0.146]}, {"w": "machine", "b": [0.5807, 0.131, 0.6469, 0.146]}, {"w": "learning", "b": [0.653, 0.131, 0.7177, 0.146]}, {"w": "project", "b": [0.7238, 0.131, 0.7803, 0.146]}, {"w": "life", "b": [0.7864, 0.131, 0.8106, 0.146]}, {"w": "cycle:", "b": [0.8167, 0.131, 0.8613, 0.146]}]}, {"id": "b_2", "type": "paragraph", "text": "Figure 1: Machine learning project life cycle.", "words": [{"w": "Figure", "b": [0.3186, 0.4503, 0.3707, 0.4652]}, {"w": "1:", "b": [0.3769, 0.4503, 0.3912, 0.4652]}, {"w": "Machine", "b": [0.3994, 0.4503, 0.4671, 0.4652]}, {"w": "learning", "b": [0.4733, 0.4503, 0.5379, 0.4652]}, {"w": "project", "b": [0.5441, 0.4503, 0.6006, 0.4652]}, {"w": "life", "b": [0.6067, 0.4503, 0.6308, 0.4652]}, {"w": "cycle.", "b": [0.637, 0.4503, 0.6816, 0.4652]}]}, {"id": "b_3", "type": "paragraph", "text": "It’s clear that without training, no model will be built. However, model training is one of the most overrated activities in machine learning. On average, a machine learning engineer spends only 5 −10% of their time on modeling, if at all. Successful data collection, preparation, and feature engineering are more important. Usually, modeling is simply applying an algorithm from scikit-learn or R to your data, and randomly trying several combinations of hyperparameters. So, if you skipped the preceding two chapters and jumped directly into modeling, please go back and read those chapters, they are important.", "words": [{"w": "It’s", "b": [0.1312, 0.5005, 0.157, 0.5155]}, {"w": "clear", "b": [0.1628, 0.5005, 0.2001, 0.5155]}, {"w": "that", "b": [0.2059, 0.5005, 0.2391, 0.5155]}, {"w": "without", "b": [0.245, 0.5005, 0.3063, 0.5155]}, {"w": "training,", "b": [0.3121, 0.5005, 0.3795, 0.5155]}, {"w": "no", "b": [0.3854, 0.5005, 0.4045, 0.5155]}, {"w": "model", "b": [0.4104, 0.5005, 0.4581, 0.5155]}, {"w": "will", "b": [0.464, 0.5005, 0.4922, 0.5155]}, {"w": "be", "b": [0.498, 0.5005, 0.5166, 0.5155]}, {"w": "built.", "b": [0.5225, 0.5005, 0.5647, 0.5155]}, {"w": "However,", "b": [0.5728, 0.5005, 0.6447, 0.5155]}, {"w": "model", "b": [0.6506, 0.5005, 0.6983, 0.5155]}, {"w": "training", "b": [0.7042, 0.5005, 0.7666, 0.5155]}, {"w": "is", "b": [0.7725, 0.5005, 0.7846, 0.5155]}, {"w": "one", "b": [0.7905, 0.5005, 0.8176, 0.5155]}, {"w": "of", "b": [0.8235, 0.5005, 0.8381, 0.5155]}, {"w": "the", "b": [0.8439, 0.5005, 0.8691, 0.5155]}, {"w": "most", "b": [0.1312, 0.5185, 0.1695, 0.5334]}, {"w": "overrated", "b": [0.1745, 0.5185, 0.2484, 0.5334]}, {"w": "activities", "b": [0.2534, 0.5185, 0.3244, 0.5334]}, {"w": "in", "b": [0.3294, 0.5185, 0.3445, 0.5334]}, {"w": "machine", "b": [0.3494, 0.5185, 0.4142, 0.5334]}, {"w": "learning.", "b": [0.4192, 0.5185, 0.4876, 0.5334]}, {"w": "On", "b": [0.4954, 0.5185, 0.5196, 0.5334]}, {"w": "average,", "b": [0.5245, 0.5185, 0.5884, 0.5334]}, {"w": "a", "b": [0.5936, 0.5185, 0.6026, 0.5334]}, {"w": "machine", "b": [0.6076, 0.5185, 0.6724, 0.5334]}, {"w": "learning", "b": [0.6774, 0.5185, 0.7408, 0.5334]}, {"w": "engineer", "b": [0.7458, 0.5185, 0.8112, 0.5334]}, {"w": "spends", "b": [0.8162, 0.5185, 0.8691, 0.5334]}, {"w": "only", "b": [0.1312, 0.5364, 0.1663, 0.5514]}, {"w": "5", "b": [0.1731, 0.5364, 0.1825, 0.5514]}, {"w": "−10%", "b": [0.1871, 0.5364, 0.2405, 0.5515]}, {"w": "of", "b": [0.2473, 0.5364, 0.2625, 0.5514]}, {"w": "their", "b": [0.2693, 0.5364, 0.3081, 0.5514]}, {"w": "time", "b": [0.3149, 0.5364, 0.3515, 0.5514]}, {"w": "on", "b": [0.3584, 0.5364, 0.3782, 0.5514]}, {"w": "modeling,", "b": [0.3851, 0.5364, 0.4651, 0.5514]}, {"w": "if", "b": [0.4721, 0.5364, 0.4831, 0.5514]}, {"w": "at", "b": [0.4899, 0.5364, 0.5066, 0.5514]}, {"w": "all.", "b": [0.5135, 0.5364, 0.5386, 0.5514]}, {"w": "Successful", "b": [0.5488, 0.5364, 0.6312, 0.5514]}, {"w": "data", "b": [0.638, 0.5364, 0.6746, 0.5514]}, {"w": "collection,", "b": [0.6815, 0.5364, 0.7641, 0.5514]}, {"w": "preparation,", "b": [0.7711, 0.5364, 0.8716, 0.5514]}, {"w": "and", "b": [0.1312, 0.5544, 0.1616, 0.5693]}, {"w": "feature", "b": [0.1705, 0.5544, 0.2275, 0.5693]}, {"w": "engineering", "b": [0.2364, 0.5544, 0.3296, 0.5693]}, {"w": "are", "b": [0.3385, 0.5544, 0.3636, 0.5693]}, {"w": "more", "b": [0.3725, 0.5544, 0.4134, 0.5693]}, {"w": "important.", "b": [0.4222, 0.5544, 0.5101, 0.5693]}, {"w": "Usually,", "b": [0.5266, 0.5544, 0.5921, 0.5693]}, {"w": "modeling", "b": [0.6017, 0.5544, 0.6764, 0.5693]}, {"w": "is", "b": [0.6853, 0.5544, 0.698, 0.5693]}, {"w": "simply", "b": [0.7068, 0.5544, 0.7608, 0.5693]}, {"w": "applying", "b": [0.7697, 0.5544, 0.8403, 0.5693]}, {"w": "an", "b": [0.8492, 0.5544, 0.8691, 0.5693]}, {"w": "algorithm", "b": [0.1312, 0.5723, 0.2091, 0.5873]}, {"w": "from", "b": [0.2153, 0.5723, 0.2527, 0.5873]}, {"w": "scikit-learn", "b": [0.2589, 0.5723, 0.3477, 0.5873]}, {"w": "or", "b": [0.3538, 0.5723, 0.3703, 0.5873]}, {"w": "R", "b": [0.3765, 0.5723, 0.39, 0.5873]}, {"w": "to", "b": [0.3962, 0.5723, 0.4126, 0.5873]}, {"w": "your", "b": [0.4187, 0.5723, 0.4546, 0.5873]}, {"w": "data,", "b": [0.4608, 0.5723, 0.5018, 0.5873]}, {"w": "and", "b": [0.508, 0.5723, 0.5377, 0.5873]}, {"w": "randomly", "b": [0.5438, 0.5723, 0.6202, 0.5873]}, {"w": "trying", "b": [0.6264, 0.5723, 0.6751, 0.5873]}, {"w": "several", "b": [0.6812, 0.5723, 0.7357, 0.5873]}, {"w": "combinations", "b": [0.7419, 0.5723, 0.848, 0.5873]}, {"w": "of", "b": [0.8542, 0.5723, 0.869, 0.5873]}, {"w": "hyperparameters.", "b": [0.1312, 0.5903, 0.2743, 0.6052]}, {"w": "So,", "b": [0.2829, 0.5903, 0.308, 0.6052]}, {"w": "if", "b": [0.3143, 0.5903, 0.3253, 0.6052]}, {"w": "you", "b": [0.3316, 0.5903, 0.3609, 0.6052]}, {"w": "skipped", "b": [0.3671, 0.5903, 0.43, 0.6052]}, {"w": "the", "b": [0.4363, 0.5903, 0.4624, 0.6052]}, {"w": "preceding", "b": [0.4687, 0.5903, 0.5472, 0.6052]}, {"w": "two", "b": [0.5535, 0.5903, 0.5828, 0.6052]}, {"w": "chapters", "b": [0.5891, 0.5903, 0.6578, 0.6052]}, {"w": "and", "b": [0.6641, 0.5903, 0.6944, 0.6052]}, {"w": "jumped", "b": [0.7007, 0.5903, 0.7624, 0.6052]}, {"w": "directly", "b": [0.7687, 0.5903, 0.831, 0.6052]}, {"w": "into", "b": [0.8373, 0.5903, 0.8692, 0.6052]}, {"w": "modeling,", "b": [0.1312, 0.6082, 0.2097, 0.6232]}, {"w": "please", "b": [0.2158, 0.6082, 0.2641, 0.6232]}, {"w": "go", "b": [0.2703, 0.6082, 0.2887, 0.6232]}, {"w": "back", "b": [0.2949, 0.6082, 0.3318, 0.6232]}, {"w": "and", "b": [0.338, 0.6082, 0.3677, 0.6232]}, {"w": "read", "b": [0.3738, 0.6082, 0.4088, 0.6232]}, {"w": "those", "b": [0.4149, 0.6082, 0.4571, 0.6232]}, {"w": "chapters,", "b": [0.4632, 0.6082, 0.5357, 0.6232]}, {"w": "they", "b": [0.5418, 0.6082, 0.5772, 0.6232]}, {"w": "are", "b": [0.5834, 0.6082, 0.608, 0.6232]}, {"w": "important.", "b": [0.6142, 0.6082, 0.7004, 0.6232]}]}, {"id": "b_4", "type": "paragraph", "text": "As indicated by this chapter’s title, I have divided supervised model training into two parts. In this first part, we will consider learning preparation, choosing the learning algorithm, a shallow learning strategy, assessing model performance, bias-variance tradeoff, regularization, the concept of the machine learning pipeline, and hyperparameter tuning.", "words": [{"w": "As", "b": [0.1305, 0.6351, 0.1515, 0.6501]}, {"w": "indicated", "b": [0.1577, 0.6351, 0.2311, 0.6501]}, {"w": "by", "b": [0.2373, 0.6351, 0.2566, 0.6501]}, {"w": "this", "b": [0.2628, 0.6351, 0.2925, 0.6501]}, {"w": "chapter’s", "b": [0.2987, 0.6351, 0.3707, 0.6501]}, {"w": "title,", "b": [0.3769, 0.6351, 0.4146, 0.6501]}, {"w": "I", "b": [0.4208, 0.6351, 0.4274, 0.6501]}, {"w": "have", "b": [0.4336, 0.6351, 0.4697, 0.6501]}, {"w": "divided", "b": [0.4759, 0.6351, 0.5345, 0.6501]}, {"w": "supervised", "b": [0.5407, 0.6351, 0.6246, 0.6501]}, {"w": "model", "b": [0.6308, 0.6351, 0.6792, 0.6501]}, {"w": "training", "b": [0.6853, 0.6351, 0.7486, 0.6501]}, {"w": "into", "b": [0.7548, 0.6351, 0.7858, 0.6501]}, {"w": "two", "b": [0.792, 0.6351, 0.8205, 0.6501]}, {"w": "parts.", "b": [0.8267, 0.6351, 0.8727, 0.6501]}, {"w": "In", "b": [0.1312, 0.6531, 0.1484, 0.668]}, {"w": "this", "b": [0.1546, 0.6531, 0.1849, 0.668]}, {"w": "first", "b": [0.191, 0.6531, 0.2235, 0.668]}, {"w": "part,", "b": [0.2296, 0.6531, 0.2692, 0.668]}, {"w": "we", "b": [0.2754, 0.6531, 0.2968, 0.668]}, {"w": "will", "b": [0.3029, 0.6531, 0.3321, 0.668]}, {"w": "consider", "b": [0.3382, 0.6531, 0.405, 0.668]}, {"w": "learning", "b": [0.4112, 0.6531, 0.4768, 0.668]}, {"w": "preparation,", "b": [0.483, 0.6531, 0.583, 0.668]}, {"w": "choosing", "b": [0.5892, 0.6531, 0.6591, 0.668]}, {"w": "the", "b": [0.6652, 0.6531, 0.6913, 0.668]}, {"w": "learning", "b": [0.6974, 0.6531, 0.763, 0.668]}, {"w": "algorithm,", "b": [0.7692, 0.6531, 0.8536, 0.668]}, {"w": "a", "b": [0.8597, 0.6531, 0.8691, 0.668]}, {"w": "shallow", "b": [0.1312, 0.671, 0.1892, 0.686]}, {"w": "learning", "b": [0.1953, 0.671, 0.2588, 0.686]}, {"w": "strategy,", "b": [0.2649, 0.671, 0.3324, 0.686]}, {"w": "assessing", "b": [0.3386, 0.671, 0.4084, 0.686]}, {"w": "model", "b": [0.4146, 0.671, 0.4624, 0.686]}, {"w": "performance,", "b": [0.4685, 0.671, 0.5712, 0.686]}, {"w": "bias-variance", "b": [0.5774, 0.671, 0.6797, 0.686]}, {"w": "tradeoff,", "b": [0.6858, 0.671, 0.7517, 0.686]}, {"w": "regularization,", "b": [0.7579, 0.671, 0.8717, 0.686]}, {"w": "the", "b": [0.1312, 0.689, 0.1569, 0.7039]}, {"w": "concept", "b": [0.163, 0.689, 0.2246, 0.7039]}, {"w": "of", "b": [0.2307, 0.689, 0.2456, 0.7039]}, {"w": "the", "b": [0.2517, 0.689, 0.2774, 0.7039]}, {"w": "machine", "b": [0.2835, 0.689, 0.3497, 0.7039]}, {"w": "learning", "b": [0.3558, 0.689, 0.4205, 0.7039]}, {"w": "pipeline,", "b": [0.4266, 0.689, 0.4948, 0.7039]}, {"w": "and", "b": [0.501, 0.689, 0.5307, 0.7039]}, {"w": "hyperparameter", "b": [0.5369, 0.689, 0.6647, 0.7039]}, {"w": "tuning.", "b": [0.6709, 0.689, 0.7283, 0.7039]}]}, {"id": "b_5", "type": "paragraph", "text": "5.1 Before You Start Working on the Model", "words": [{"w": "5.1", "b": [0.1312, 0.7378, 0.1631, 0.7558]}, {"w": "Before", "b": [0.188, 0.7378, 0.2587, 0.7558]}, {"w": "You", "b": [0.267, 0.7378, 0.31, 0.7558]}, {"w": "Start", "b": [0.3183, 0.7378, 0.3739, 0.7558]}, {"w": "Working", "b": [0.3822, 0.7378, 0.4749, 0.7558]}, {"w": "on", "b": [0.4832, 0.7378, 0.5095, 0.7558]}, {"w": "the", "b": [0.5178, 0.7378, 0.5527, 0.7558]}, {"w": "Model", "b": [0.561, 0.7378, 0.6299, 0.7558]}]}, {"id": "b_6", "type": "paragraph", "text": "Before working on the model, you should validate schema conformity, define an achievable level of performance, choose a performance metric, and make several other decisions.", "words": [{"w": "Before", "b": [0.1312, 0.7764, 0.1835, 0.7914]}, {"w": "working", "b": [0.1896, 0.7764, 0.2541, 0.7914]}, {"w": "on", "b": [0.2602, 0.7764, 0.28, 0.7914]}, {"w": "the", "b": [0.2861, 0.7764, 0.3121, 0.7914]}, {"w": "model,", "b": [0.3183, 0.7764, 0.3728, 0.7914]}, {"w": "you", "b": [0.379, 0.7764, 0.408, 0.7914]}, {"w": "should", "b": [0.4142, 0.7764, 0.4673, 0.7914]}, {"w": "validate", "b": [0.4734, 0.7764, 0.5373, 0.7914]}, {"w": "schema", "b": [0.5435, 0.7764, 0.6023, 0.7914]}, {"w": "conformity,", "b": [0.6085, 0.7764, 0.7, 0.7914]}, {"w": "define", "b": [0.7061, 0.7764, 0.7539, 0.7914]}, {"w": "an", "b": [0.7601, 0.7764, 0.7798, 0.7914]}, {"w": "achievable", "b": [0.786, 0.7764, 0.8691, 0.7914]}, {"w": "level", "b": [0.1312, 0.7944, 0.1671, 0.8093]}, {"w": "of", "b": [0.1733, 0.7944, 0.1881, 0.8093]}, {"w": "performance,", "b": [0.1943, 0.7944, 0.299, 0.8093]}, {"w": "choose", "b": [0.3052, 0.7944, 0.3576, 0.8093]}, {"w": "a", "b": [0.3637, 0.7944, 0.373, 0.8093]}, {"w": "performance", "b": [0.3791, 0.7944, 0.4787, 0.8093]}, {"w": "metric,", "b": [0.4848, 0.7944, 0.5413, 0.8093]}, {"w": "and", "b": [0.5474, 0.7944, 0.5772, 0.8093]}, {"w": "make", "b": [0.5833, 0.7944, 0.6253, 0.8093]}, {"w": "several", "b": [0.6315, 0.7944, 0.686, 0.8093]}, {"w": "other", "b": [0.6922, 0.7944, 0.7343, 0.8093]}, {"w": "decisions.", "b": [0.7404, 0.7944, 0.8165, 0.8093]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "3", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 142, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "5.1.1 Validate Schema Conformity", "words": [{"w": "5.1.1", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Validate", "b": [0.1961, 0.0884, 0.2725, 0.1034]}, {"w": "Schema", "b": [0.2796, 0.0884, 0.3497, 0.1034]}, {"w": "Conformity", "b": [0.3568, 0.0884, 0.4628, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "First, ensure the data conforms to the schema, as defined by the schema file. Even if you initially prepared the data, it’s likely the original data and the current data are not the same. This difference can be explained by various factors, most probably:", "words": [{"w": "First,", "b": [0.1312, 0.1247, 0.1755, 0.1396]}, {"w": "ensure", "b": [0.1817, 0.1247, 0.2335, 0.1396]}, {"w": "the", "b": [0.2397, 0.1247, 0.2655, 0.1396]}, {"w": "data", "b": [0.2716, 0.1247, 0.3078, 0.1396]}, {"w": "conforms", "b": [0.3139, 0.1247, 0.3869, 0.1396]}, {"w": "to", "b": [0.393, 0.1247, 0.4095, 0.1396]}, {"w": "the", "b": [0.4157, 0.1247, 0.4415, 0.1396]}, {"w": "schema,", "b": [0.4476, 0.1247, 0.5113, 0.1396]}, {"w": "as", "b": [0.5174, 0.1247, 0.5341, 0.1396]}, {"w": "defined", "b": [0.5402, 0.1247, 0.598, 0.1396]}, {"w": "by", "b": [0.6042, 0.1247, 0.6238, 0.1396]}, {"w": "the", "b": [0.63, 0.1247, 0.6558, 0.1396]}, {"w": "schema", "b": [0.6617, 0.125, 0.7284, 0.1399]}, {"w": "file.", "b": [0.7354, 0.1247, 0.768, 0.1399]}, {"w": "Even", "b": [0.7762, 0.1247, 0.8168, 0.1396]}, {"w": "if", "b": [0.8229, 0.1247, 0.8338, 0.1396]}, {"w": "you", "b": [0.8399, 0.1247, 0.8688, 0.1396]}, {"w": "initially", "b": [0.1312, 0.1426, 0.192, 0.1576]}, {"w": "prepared", "b": [0.1979, 0.1426, 0.2674, 0.1576]}, {"w": "the", "b": [0.2733, 0.1426, 0.2984, 0.1576]}, {"w": "data,", "b": [0.3043, 0.1426, 0.3445, 0.1576]}, {"w": "it’s", "b": [0.3504, 0.1426, 0.3746, 0.1576]}, {"w": "likely", "b": [0.3805, 0.1426, 0.4222, 0.1576]}, {"w": "the", "b": [0.4281, 0.1426, 0.4533, 0.1576]}, {"w": "original", "b": [0.4591, 0.1426, 0.5185, 0.1576]}, {"w": "data", "b": [0.5244, 0.1426, 0.5595, 0.1576]}, {"w": "and", "b": [0.5654, 0.1426, 0.5946, 0.1576]}, {"w": "the", "b": [0.6005, 0.1426, 0.6256, 0.1576]}, {"w": "current", "b": [0.6315, 0.1426, 0.6884, 0.1576]}, {"w": "data", "b": [0.6942, 0.1426, 0.7294, 0.1576]}, {"w": "are", "b": [0.7353, 0.1426, 0.7595, 0.1576]}, {"w": "not", "b": [0.7654, 0.1426, 0.7915, 0.1576]}, {"w": "the", "b": [0.7974, 0.1426, 0.8225, 0.1576]}, {"w": "same.", "b": [0.8284, 0.1426, 0.8727, 0.1576]}, {"w": "This", "b": [0.1306, 0.1606, 0.1666, 0.1755]}, {"w": "difference", "b": [0.1727, 0.1606, 0.2492, 0.1755]}, {"w": "can", "b": [0.2553, 0.1606, 0.283, 0.1755]}, {"w": "be", "b": [0.2892, 0.1606, 0.3081, 0.1755]}, {"w": "explained", "b": [0.3143, 0.1606, 0.3907, 0.1755]}, {"w": "by", "b": [0.3969, 0.1606, 0.4163, 0.1755]}, {"w": "various", "b": [0.4225, 0.1606, 0.4796, 0.1755]}, {"w": "factors,", "b": [0.4857, 0.1606, 0.5448, 0.1755]}, {"w": "most", "b": [0.551, 0.1606, 0.59, 0.1755]}, {"w": "probably:", "b": [0.5962, 0.1606, 0.6726, 0.1755]}]}, {"id": "b_2", "type": "paragraph", "text": "• the method used to persist the data, to hard drive or to database, contains an error; • the method you used to read the data, from where it was persisted, contains an error; • someone else may have changed the data, or the schema, without informing you.", "words": [{"w": "•", "b": [0.1538, 0.1875, 0.1681, 0.2024]}, {"w": "the", "b": [0.1774, 0.1875, 0.203, 0.2024]}, {"w": "method", "b": [0.2091, 0.1875, 0.2702, 0.2024]}, {"w": "used", "b": [0.2763, 0.1875, 0.3123, 0.2024]}, {"w": "to", "b": [0.3185, 0.1875, 0.3349, 0.2024]}, {"w": "persist", "b": [0.341, 0.1875, 0.3941, 0.2024]}, {"w": "the", "b": [0.4003, 0.1875, 0.4259, 0.2024]}, {"w": "data,", "b": [0.432, 0.1875, 0.4731, 0.2024]}, {"w": "to", "b": [0.4792, 0.1875, 0.4956, 0.2024]}, {"w": "hard", "b": [0.5018, 0.1875, 0.5387, 0.2024]}, {"w": "drive", "b": [0.5449, 0.1875, 0.5849, 0.2024]}, {"w": "or", "b": [0.5911, 0.1875, 0.6075, 0.2024]}, {"w": "to", "b": [0.6137, 0.1875, 0.6301, 0.2024]}, {"w": "database,", "b": [0.6362, 0.1875, 0.7122, 0.2024]}, {"w": "contains", "b": [0.7184, 0.1875, 0.7846, 0.2024]}, {"w": "an", "b": [0.7908, 0.1875, 0.8103, 0.2024]}, {"w": "error;", "b": [0.8164, 0.1875, 0.8607, 0.2024]}, {"w": "•", "b": [0.1538, 0.2054, 0.1681, 0.2204]}, {"w": "the", "b": [0.1774, 0.2054, 0.203, 0.2204]}, {"w": "method", "b": [0.2091, 0.2054, 0.2701, 0.2204]}, {"w": "you", "b": [0.2763, 0.2054, 0.305, 0.2204]}, {"w": "used", "b": [0.3111, 0.2054, 0.3471, 0.2204]}, {"w": "to", "b": [0.3533, 0.2054, 0.3697, 0.2204]}, {"w": "read", "b": [0.3758, 0.2054, 0.4107, 0.2204]}, {"w": "the", "b": [0.4168, 0.2054, 0.4425, 0.2204]}, {"w": "data,", "b": [0.4486, 0.2054, 0.4896, 0.2204]}, {"w": "from", "b": [0.4958, 0.2054, 0.5332, 0.2204]}, {"w": "where", "b": [0.5394, 0.2054, 0.5866, 0.2204]}, {"w": "it", "b": [0.5927, 0.2054, 0.605, 0.2204]}, {"w": "was", "b": [0.6111, 0.2054, 0.6405, 0.2204]}, {"w": "persisted,", "b": [0.6466, 0.2054, 0.7233, 0.2204]}, {"w": "contains", "b": [0.7294, 0.2054, 0.7957, 0.2204]}, {"w": "an", "b": [0.8018, 0.2054, 0.8213, 0.2204]}, {"w": "error;", "b": [0.8274, 0.2054, 0.8717, 0.2204]}, {"w": "•", "b": [0.1538, 0.2234, 0.1681, 0.2383]}, {"w": "someone", "b": [0.1774, 0.2234, 0.2451, 0.2383]}, {"w": "else", "b": [0.2513, 0.2234, 0.2801, 0.2383]}, {"w": "may", "b": [0.2863, 0.2234, 0.3201, 0.2383]}, {"w": "have", "b": [0.3262, 0.2234, 0.3626, 0.2383]}, {"w": "changed", "b": [0.3688, 0.2234, 0.4339, 0.2383]}, {"w": "the", "b": [0.4401, 0.2234, 0.4657, 0.2383]}, {"w": "data,", "b": [0.4719, 0.2234, 0.5129, 0.2383]}, {"w": "or", "b": [0.519, 0.2234, 0.5355, 0.2383]}, {"w": "the", "b": [0.5416, 0.2234, 0.5673, 0.2383]}, {"w": "schema,", "b": [0.5734, 0.2234, 0.6366, 0.2383]}, {"w": "without", "b": [0.6427, 0.2234, 0.7053, 0.2383]}, {"w": "informing", "b": [0.7114, 0.2234, 0.7889, 0.2383]}, {"w": "you.", "b": [0.7951, 0.2234, 0.8289, 0.2383]}]}, {"id": "b_3", "type": "paragraph", "text": "These schema errors must be detected, identified, and corrected just as when a programming code error is detected. If needed, the entire data collection and preparation pipeline should be run from scratch, as we discussed at the end of Chapter 3 when talked about reproducibility.", "words": [{"w": "These", "b": [0.1306, 0.2503, 0.1769, 0.2653]}, {"w": "schema", "b": [0.1831, 0.2503, 0.2399, 0.2653]}, {"w": "errors", "b": [0.2461, 0.2503, 0.2916, 0.2653]}, {"w": "must", "b": [0.2977, 0.2503, 0.3365, 0.2653]}, {"w": "be", "b": [0.3426, 0.2503, 0.3612, 0.2653]}, {"w": "detected,", "b": [0.3673, 0.2503, 0.4387, 0.2653]}, {"w": "identified,", "b": [0.4449, 0.2503, 0.5228, 0.2653]}, {"w": "and", "b": [0.5289, 0.2503, 0.5581, 0.2653]}, {"w": "corrected", "b": [0.5642, 0.2503, 0.6367, 0.2653]}, {"w": "just", "b": [0.6428, 0.2503, 0.6726, 0.2653]}, {"w": "as", "b": [0.6787, 0.2503, 0.6949, 0.2653]}, {"w": "when", "b": [0.701, 0.2503, 0.7422, 0.2653]}, {"w": "a", "b": [0.7484, 0.2503, 0.7574, 0.2653]}, {"w": "programming", "b": [0.7636, 0.2503, 0.8691, 0.2653]}, {"w": "code", "b": [0.1312, 0.2683, 0.1669, 0.2832]}, {"w": "error", "b": [0.1722, 0.2683, 0.2106, 0.2832]}, {"w": "is", "b": [0.2159, 0.2683, 0.2281, 0.2832]}, {"w": "detected.", "b": [0.2334, 0.2683, 0.3047, 0.2832]}, {"w": "If", "b": [0.3127, 0.2683, 0.3247, 0.2832]}, {"w": "needed,", "b": [0.33, 0.2683, 0.3893, 0.2832]}, {"w": "the", "b": [0.3948, 0.2683, 0.4199, 0.2832]}, {"w": "entire", "b": [0.4253, 0.2683, 0.47, 0.2832]}, {"w": "data", "b": [0.4753, 0.2683, 0.5105, 0.2832]}, {"w": "collection", "b": [0.5158, 0.2683, 0.5902, 0.2832]}, {"w": "and", "b": [0.5955, 0.2683, 0.6246, 0.2832]}, {"w": "preparation", "b": [0.6299, 0.2683, 0.7215, 0.2832]}, {"w": "pipeline", "b": [0.7268, 0.2683, 0.7886, 0.2832]}, {"w": "should", "b": [0.7939, 0.2683, 0.8453, 0.2832]}, {"w": "be", "b": [0.8506, 0.2683, 0.8692, 0.2832]}, {"w": "run", "b": [0.1312, 0.2862, 0.1584, 0.3012]}, {"w": "from", "b": [0.1632, 0.2862, 0.1999, 0.3012]}, {"w": "scratch,", "b": [0.2047, 0.2862, 0.2657, 0.3012]}, {"w": "as", "b": [0.2707, 0.2862, 0.2869, 0.3012]}, {"w": "we", "b": [0.2917, 0.2862, 0.3123, 0.3012]}, {"w": "discussed", "b": [0.3171, 0.2862, 0.3898, 0.3012]}, {"w": "at", "b": [0.3946, 0.2862, 0.4106, 0.3012]}, {"w": "the", "b": [0.4155, 0.2862, 0.4406, 0.3012]}, {"w": "end", "b": [0.4454, 0.2862, 0.4735, 0.3012]}, {"w": "of", "b": [0.4783, 0.2862, 0.4929, 0.3012]}, {"w": "Chapter", "b": [0.4977, 0.2862, 0.562, 0.3012]}, {"w": "3", "b": [0.5668, 0.2862, 0.5759, 0.3012]}, {"w": "when", "b": [0.5807, 0.2862, 0.6219, 0.3012]}, {"w": "talked", "b": [0.6267, 0.2862, 0.6749, 0.3012]}, {"w": "about", "b": [0.6797, 0.2862, 0.7254, 0.3012]}, {"w": "reproducibility.", "b": [0.7299, 0.2862, 0.8724, 0.3015]}]}, {"id": "b_4", "type": "paragraph", "text": "5.1.2 Define an Achievable Performance Level", "words": [{"w": "5.1.2", "b": [0.1312, 0.3344, 0.1749, 0.3493]}, {"w": "Define", "b": [0.1961, 0.3344, 0.2554, 0.3493]}, {"w": "an", "b": [0.2624, 0.3344, 0.2845, 0.3493]}, {"w": "Achievable", "b": [0.2916, 0.3344, 0.3911, 0.3493]}, {"w": "Performance", "b": [0.3981, 0.3344, 0.5153, 0.3493]}, {"w": "Level", "b": [0.5223, 0.3344, 0.5711, 0.3493]}]}, {"id": "b_5", "type": "paragraph", "text": "Defining an achievable performance level is a crucial step. It gives you an idea of when to stop trying to improve the model. Here are some guidelines:", "words": [{"w": "Defining", "b": [0.1312, 0.3706, 0.2, 0.3856]}, {"w": "an", "b": [0.2062, 0.3706, 0.226, 0.3856]}, {"w": "achievable", "b": [0.2322, 0.3706, 0.3159, 0.3856]}, {"w": "performance", "b": [0.3221, 0.3706, 0.4236, 0.3856]}, {"w": "level", "b": [0.4298, 0.3706, 0.4664, 0.3856]}, {"w": "is", "b": [0.4726, 0.3706, 0.4852, 0.3856]}, {"w": "a", "b": [0.4914, 0.3706, 0.5008, 0.3856]}, {"w": "crucial", "b": [0.507, 0.3706, 0.5614, 0.3856]}, {"w": "step.", "b": [0.5676, 0.3706, 0.6064, 0.3856]}, {"w": "It", "b": [0.6146, 0.3706, 0.6287, 0.3856]}, {"w": "gives", "b": [0.6349, 0.3706, 0.6748, 0.3856]}, {"w": "you", "b": [0.6809, 0.3706, 0.7102, 0.3856]}, {"w": "an", "b": [0.7164, 0.3706, 0.7362, 0.3856]}, {"w": "idea", "b": [0.7424, 0.3706, 0.7759, 0.3856]}, {"w": "of", "b": [0.782, 0.3706, 0.7972, 0.3856]}, {"w": "when", "b": [0.8034, 0.3706, 0.8463, 0.3856]}, {"w": "to", "b": [0.8524, 0.3706, 0.8691, 0.3856]}, {"w": "stop", "b": [0.1312, 0.3886, 0.1652, 0.4035]}, {"w": "trying", "b": [0.1713, 0.3886, 0.2201, 0.4035]}, {"w": "to", "b": [0.2262, 0.3886, 0.2426, 0.4035]}, {"w": "improve", "b": [0.2488, 0.3886, 0.3129, 0.4035]}, {"w": "the", "b": [0.3191, 0.3886, 0.3447, 0.4035]}, {"w": "model.", "b": [0.3509, 0.3886, 0.4047, 0.4035]}, {"w": "Here", "b": [0.4129, 0.3886, 0.4504, 0.4035]}, {"w": "are", "b": [0.4565, 0.3886, 0.4812, 0.4035]}, {"w": "some", "b": [0.4873, 0.3886, 0.5274, 0.4035]}, {"w": "guidelines:", "b": [0.5336, 0.3886, 0.6178, 0.4035]}]}, {"id": "b_6", "type": "paragraph", "text": "• if a human can label examples without too much effort, math, or complex logic derivations, then you can hope to achieve human-level performance with your model; • if the information needed to make a labeling decision is fully contained in the features, you can expect to have near-zero error; • if the input feature vector has a high number of signals (such as pixels in an image, or words in a document), you can expect to come close to near-zero error; • if you have a computer program solving the same classification or regression problem, you can expect your model to perform at least as well. Often the machine learning model performance can improve as more labeled data comes in; and, • if you observe a similar, but different system, you can expect to get a similar, but different machine learning model performance.", "words": [{"w": "•", "b": [0.1538, 0.4155, 0.1681, 0.4304]}, {"w": "if", "b": [0.1774, 0.4155, 0.1883, 0.4304]}, {"w": "a", "b": [0.1975, 0.4155, 0.2069, 0.4304]}, {"w": "human", "b": [0.216, 0.4155, 0.2719, 0.4304]}, {"w": "can", "b": [0.281, 0.4155, 0.3093, 0.4304]}, {"w": "label", "b": [0.3184, 0.4155, 0.3576, 0.4304]}, {"w": "examples", "b": [0.3667, 0.4155, 0.4416, 0.4304]}, {"w": "without", "b": [0.4507, 0.4155, 0.5145, 0.4304]}, {"w": "too", "b": [0.5236, 0.4155, 0.5502, 0.4304]}, {"w": "much", "b": [0.5593, 0.4155, 0.6033, 0.4304]}, {"w": "effort,", "b": [0.6124, 0.4155, 0.6611, 0.4304]}, {"w": "math,", "b": [0.6709, 0.4155, 0.719, 0.4304]}, {"w": "or", "b": [0.7289, 0.4155, 0.7457, 0.4304]}, {"w": "complex", "b": [0.7548, 0.4155, 0.8222, 0.4304]}, {"w": "logic", "b": [0.8313, 0.4155, 0.869, 0.4304]}, {"w": "derivations,", "b": [0.1774, 0.4334, 0.2703, 0.4484]}, {"w": "then", "b": [0.2765, 0.4334, 0.3124, 0.4484]}, {"w": "you", "b": [0.3185, 0.4334, 0.3472, 0.4484]}, {"w": "can", "b": [0.3534, 0.4334, 0.3811, 0.4484]}, {"w": "hope", "b": [0.3872, 0.4334, 0.4257, 0.4484]}, {"w": "to", "b": [0.4318, 0.4334, 0.4482, 0.4484]}, {"w": "achieve", "b": [0.4544, 0.4334, 0.5123, 0.4484]}, {"w": "human-level", "b": [0.5185, 0.4334, 0.6154, 0.4484]}, {"w": "performance", "b": [0.6215, 0.4334, 0.7211, 0.4484]}, {"w": "with", "b": [0.7273, 0.4334, 0.7632, 0.4484]}, {"w": "your", "b": [0.7693, 0.4334, 0.8052, 0.4484]}, {"w": "model;", "b": [0.8114, 0.4334, 0.8652, 0.4484]}, {"w": "•", "b": [0.1538, 0.4514, 0.1681, 0.4663]}, {"w": "if", "b": [0.1774, 0.4514, 0.188, 0.4663]}, {"w": "the", "b": [0.1941, 0.4514, 0.2195, 0.4663]}, {"w": "information", "b": [0.2256, 0.4514, 0.3185, 0.4663]}, {"w": "needed", "b": [0.3246, 0.4514, 0.3794, 0.4663]}, {"w": "to", "b": [0.3855, 0.4514, 0.4018, 0.4663]}, {"w": "make", "b": [0.4079, 0.4514, 0.4494, 0.4663]}, {"w": "a", "b": [0.4556, 0.4514, 0.4647, 0.4663]}, {"w": "labeling", "b": [0.4708, 0.4514, 0.5332, 0.4663]}, {"w": "decision", "b": [0.5393, 0.4514, 0.6024, 0.4663]}, {"w": "is", "b": [0.6085, 0.4514, 0.6208, 0.4663]}, {"w": "fully", "b": [0.6269, 0.4514, 0.6624, 0.4663]}, {"w": "contained", "b": [0.6685, 0.4514, 0.7451, 0.4663]}, {"w": "in", "b": [0.7512, 0.4514, 0.7665, 0.4663]}, {"w": "the", "b": [0.7726, 0.4514, 0.798, 0.4663]}, {"w": "features,", "b": [0.8041, 0.4514, 0.8717, 0.4663]}, {"w": "you", "b": [0.1769, 0.4693, 0.2056, 0.4843]}, {"w": "can", "b": [0.2117, 0.4693, 0.2394, 0.4843]}, {"w": "expect", "b": [0.2456, 0.4693, 0.2979, 0.4843]}, {"w": "to", "b": [0.304, 0.4693, 0.3204, 0.4843]}, {"w": "have", "b": [0.3266, 0.4693, 0.363, 0.4843]}, {"w": "near-zero", "b": [0.3692, 0.4693, 0.4431, 0.4843]}, {"w": "error;", "b": [0.4492, 0.4693, 0.4935, 0.4843]}, {"w": "•", "b": [0.1538, 0.4873, 0.1681, 0.5022]}, {"w": "if", "b": [0.1774, 0.4873, 0.188, 0.5022]}, {"w": "the", "b": [0.1942, 0.4873, 0.2195, 0.5022]}, {"w": "input", "b": [0.2257, 0.4873, 0.2684, 0.5022]}, {"w": "feature", "b": [0.2745, 0.4873, 0.3299, 0.5022]}, {"w": "vector", "b": [0.336, 0.4873, 0.3848, 0.5022]}, {"w": "has", "b": [0.391, 0.4873, 0.4175, 0.5022]}, {"w": "a", "b": [0.4236, 0.4873, 0.4327, 0.5022]}, {"w": "high", "b": [0.4389, 0.4873, 0.4734, 0.5022]}, {"w": "number", "b": [0.4795, 0.4873, 0.54, 0.5022]}, {"w": "of", "b": [0.5461, 0.4873, 0.5609, 0.5022]}, {"w": "signals", "b": [0.567, 0.4873, 0.62, 0.5022]}, {"w": "(such", "b": [0.6262, 0.4873, 0.6684, 0.5022]}, {"w": "as", "b": [0.6745, 0.4873, 0.6909, 0.5022]}, {"w": "pixels", "b": [0.697, 0.4873, 0.7423, 0.5022]}, {"w": "in", "b": [0.7485, 0.4873, 0.7637, 0.5022]}, {"w": "an", "b": [0.7698, 0.4873, 0.7891, 0.5022]}, {"w": "image,", "b": [0.7953, 0.4873, 0.8471, 0.5022]}, {"w": "or", "b": [0.8532, 0.4873, 0.8695, 0.5022]}, {"w": "words", "b": [0.1767, 0.5052, 0.2235, 0.5202]}, {"w": "in", "b": [0.2296, 0.5052, 0.245, 0.5202]}, {"w": "a", "b": [0.2512, 0.5052, 0.2604, 0.5202]}, {"w": "document),", "b": [0.2666, 0.5052, 0.3578, 0.5202]}, {"w": "you", "b": [0.364, 0.5052, 0.3927, 0.5202]}, {"w": "can", "b": [0.3988, 0.5052, 0.4265, 0.5202]}, {"w": "expect", "b": [0.4327, 0.5052, 0.485, 0.5202]}, {"w": "to", "b": [0.4911, 0.5052, 0.5075, 0.5202]}, {"w": "come", "b": [0.5137, 0.5052, 0.5547, 0.5202]}, {"w": "close", "b": [0.5608, 0.5052, 0.5989, 0.5202]}, {"w": "to", "b": [0.6051, 0.5052, 0.6215, 0.5202]}, {"w": "near-zero", "b": [0.6276, 0.5052, 0.7016, 0.5202]}, {"w": "error;", "b": [0.7077, 0.5052, 0.752, 0.5202]}, {"w": "•", "b": [0.1538, 0.5232, 0.1681, 0.5381]}, {"w": "if", "b": [0.1774, 0.5232, 0.1882, 0.5381]}, {"w": "you", "b": [0.1943, 0.5232, 0.2231, 0.5381]}, {"w": "have", "b": [0.2292, 0.5232, 0.2658, 0.5381]}, {"w": "a", "b": [0.2719, 0.5232, 0.2811, 0.5381]}, {"w": "computer", "b": [0.2873, 0.5232, 0.3634, 0.5381]}, {"w": "program", "b": [0.3696, 0.5232, 0.4375, 0.5381]}, {"w": "solving", "b": [0.4437, 0.5232, 0.4998, 0.5381]}, {"w": "the", "b": [0.5059, 0.5232, 0.5317, 0.5381]}, {"w": "same", "b": [0.5378, 0.5232, 0.578, 0.5381]}, {"w": "classification", "b": [0.5841, 0.5232, 0.6862, 0.5381]}, {"w": "or", "b": [0.6923, 0.5232, 0.7088, 0.5381]}, {"w": "regression", "b": [0.715, 0.5232, 0.7945, 0.5381]}, {"w": "problem,", "b": [0.8006, 0.5232, 0.8717, 0.5381]}, {"w": "you", "b": [0.1769, 0.5411, 0.2062, 0.5561]}, {"w": "can", "b": [0.213, 0.5411, 0.2412, 0.5561]}, {"w": "expect", "b": [0.248, 0.5411, 0.3014, 0.5561]}, {"w": "your", "b": [0.3082, 0.5411, 0.3449, 0.5561]}, {"w": "model", "b": [0.3517, 0.5411, 0.4013, 0.5561]}, {"w": "to", "b": [0.4081, 0.5411, 0.4249, 0.5561]}, {"w": "perform", "b": [0.4317, 0.5411, 0.4966, 0.5561]}, {"w": "at", "b": [0.5034, 0.5411, 0.5202, 0.5561]}, {"w": "least", "b": [0.527, 0.5411, 0.5647, 0.5561]}, {"w": "as", "b": [0.5715, 0.5411, 0.5884, 0.5561]}, {"w": "well.", "b": [0.5952, 0.5411, 0.6323, 0.5561]}, {"w": "Often", "b": [0.6425, 0.5411, 0.6891, 0.5561]}, {"w": "the", "b": [0.6959, 0.5411, 0.722, 0.5561]}, {"w": "machine", "b": [0.7288, 0.5411, 0.7963, 0.5561]}, {"w": "learning", "b": [0.8031, 0.5411, 0.8691, 0.5561]}, {"w": "model", "b": [0.1774, 0.5591, 0.2261, 0.574]}, {"w": "performance", "b": [0.2322, 0.5591, 0.3318, 0.574]}, {"w": "can", "b": [0.3379, 0.5591, 0.3656, 0.574]}, {"w": "improve", "b": [0.3718, 0.5591, 0.4359, 0.574]}, {"w": "as", "b": [0.4421, 0.5591, 0.4586, 0.574]}, {"w": "more", "b": [0.4647, 0.5591, 0.5048, 0.574]}, {"w": "labeled", "b": [0.5109, 0.5591, 0.5678, 0.574]}, {"w": "data", "b": [0.574, 0.5591, 0.6099, 0.574]}, {"w": "comes", "b": [0.616, 0.5591, 0.6643, 0.574]}, {"w": "in;", "b": [0.6705, 0.5591, 0.691, 0.574]}, {"w": "and,", "b": [0.6971, 0.5591, 0.732, 0.574]}, {"w": "•", "b": [0.1538, 0.577, 0.1681, 0.592]}, {"w": "if", "b": [0.1774, 0.577, 0.1883, 0.592]}, {"w": "you", "b": [0.1957, 0.577, 0.225, 0.592]}, {"w": "observe", "b": [0.2324, 0.577, 0.2933, 0.592]}, {"w": "a", "b": [0.3007, 0.577, 0.3101, 0.592]}, {"w": "similar,", "b": [0.3175, 0.577, 0.3783, 0.592]}, {"w": "but", "b": [0.386, 0.577, 0.4143, 0.592]}, {"w": "different", "b": [0.4217, 0.577, 0.4897, 0.592]}, {"w": "system,", "b": [0.4971, 0.577, 0.5585, 0.592]}, {"w": "you", "b": [0.5663, 0.577, 0.5956, 0.592]}, {"w": "can", "b": [0.603, 0.577, 0.6312, 0.592]}, {"w": "expect", "b": [0.6386, 0.577, 0.6919, 0.592]}, {"w": "to", "b": [0.6994, 0.577, 0.7161, 0.592]}, {"w": "get", "b": [0.7235, 0.577, 0.7486, 0.592]}, {"w": "a", "b": [0.756, 0.577, 0.7654, 0.592]}, {"w": "similar,", "b": [0.7728, 0.577, 0.8336, 0.592]}, {"w": "but", "b": [0.8413, 0.577, 0.8696, 0.592]}, {"w": "different", "b": [0.1774, 0.595, 0.2441, 0.6099]}, {"w": "machine", "b": [0.2502, 0.595, 0.3164, 0.6099]}, {"w": "learning", "b": [0.3225, 0.595, 0.3872, 0.6099]}, {"w": "model", "b": [0.3933, 0.595, 0.442, 0.6099]}, {"w": "performance.", "b": [0.4482, 0.595, 0.5529, 0.6099]}]}, {"id": "b_7", "type": "paragraph", "text": "5.1.3 Choose a Performance Metric", "words": [{"w": "5.1.3", "b": [0.1312, 0.6431, 0.1749, 0.6581]}, {"w": "Choose", "b": [0.1961, 0.6431, 0.2631, 0.6581]}, {"w": "a", "b": [0.2702, 0.6431, 0.2805, 0.6581]}, {"w": "Performance", "b": [0.2876, 0.6431, 0.4047, 0.6581]}, {"w": "Metric", "b": [0.4118, 0.6431, 0.474, 0.6581]}]}, {"id": "b_8", "type": "paragraph", "text": "We will talk about assessing the model performance later. For now, there are several ways —", "words": [{"w": "We", "b": [0.1303, 0.6794, 0.1554, 0.6943]}, {"w": "will", "b": [0.1616, 0.6794, 0.1897, 0.6943]}, {"w": "talk", "b": [0.1959, 0.6794, 0.2265, 0.6943]}, {"w": "about", "b": [0.2327, 0.6794, 0.2784, 0.6943]}, {"w": "assessing", "b": [0.2846, 0.6794, 0.3543, 0.6943]}, {"w": "the", "b": [0.3605, 0.6794, 0.3856, 0.6943]}, {"w": "model", "b": [0.3918, 0.6794, 0.4396, 0.6943]}, {"w": "performance", "b": [0.4457, 0.6794, 0.5433, 0.6943]}, {"w": "later.", "b": [0.5495, 0.6794, 0.5907, 0.6943]}, {"w": "For", "b": [0.599, 0.6794, 0.6254, 0.6943]}, {"w": "now,", "b": [0.6316, 0.6794, 0.6682, 0.6943]}, {"w": "there", "b": [0.6744, 0.6794, 0.7147, 0.6943]}, {"w": "are", "b": [0.7208, 0.6794, 0.745, 0.6943]}, {"w": "several", "b": [0.7512, 0.6794, 0.8046, 0.6943]}, {"w": "ways", "b": [0.8108, 0.6794, 0.8485, 0.6943]}, {"w": "—", "b": [0.8547, 0.6794, 0.8728, 0.6943]}]}, {"id": "b_9", "type": "paragraph", "text": "metrics — to estimate the level of model performance (its quality). There’s no single best metric you can use for every project. You will choose based on your data and the problem.", "words": [{"w": "metrics", "b": [0.1312, 0.6973, 0.1909, 0.7123]}, {"w": "—", "b": [0.197, 0.6973, 0.2158, 0.7123]}, {"w": "to", "b": [0.222, 0.6973, 0.2387, 0.7123]}, {"w": "estimate", "b": [0.2448, 0.6973, 0.3138, 0.7123]}, {"w": "the", "b": [0.32, 0.6973, 0.3461, 0.7123]}, {"w": "level", "b": [0.3523, 0.6973, 0.3888, 0.7123]}, {"w": "of", "b": [0.395, 0.6973, 0.4101, 0.7123]}, {"w": "model", "b": [0.4162, 0.6973, 0.4658, 0.7123]}, {"w": "performance", "b": [0.472, 0.6973, 0.5733, 0.7123]}, {"w": "(its", "b": [0.5795, 0.6973, 0.6067, 0.7123]}, {"w": "quality).", "b": [0.6129, 0.6973, 0.6823, 0.7123]}, {"w": "There’s", "b": [0.6905, 0.6973, 0.7512, 0.7123]}, {"w": "no", "b": [0.7574, 0.6973, 0.7772, 0.7123]}, {"w": "single", "b": [0.7834, 0.6973, 0.8294, 0.7123]}, {"w": "best", "b": [0.8356, 0.6973, 0.8696, 0.7123]}, {"w": "metric", "b": [0.1312, 0.7153, 0.1826, 0.7302]}, {"w": "you", "b": [0.1887, 0.7153, 0.2174, 0.7302]}, {"w": "can", "b": [0.2236, 0.7153, 0.2513, 0.7302]}, {"w": "use", "b": [0.2574, 0.7153, 0.2832, 0.7302]}, {"w": "for", "b": [0.2893, 0.7153, 0.3114, 0.7302]}, {"w": "every", "b": [0.3176, 0.7153, 0.3602, 0.7302]}, {"w": "project.", "b": [0.3663, 0.7153, 0.4279, 0.7302]}, {"w": "You", "b": [0.4361, 0.7153, 0.4679, 0.7302]}, {"w": "will", "b": [0.4741, 0.7153, 0.5028, 0.7302]}, {"w": "choose", "b": [0.5089, 0.7153, 0.5613, 0.7302]}, {"w": "based", "b": [0.5675, 0.7153, 0.6127, 0.7302]}, {"w": "on", "b": [0.6188, 0.7153, 0.6383, 0.7302]}, {"w": "your", "b": [0.6445, 0.7153, 0.6804, 0.7302]}, {"w": "data", "b": [0.6866, 0.7153, 0.7225, 0.7302]}, {"w": "and", "b": [0.7286, 0.7153, 0.7583, 0.7302]}, {"w": "the", "b": [0.7645, 0.7153, 0.7901, 0.7302]}, {"w": "problem.", "b": [0.7963, 0.7153, 0.8671, 0.7302]}]}, {"id": "b_10", "type": "paragraph", "text": "It is recommended to choose one, and only one, performance metric before you start working on the model. Then, compare different models and track the overall progress by using this one metric.", "words": [{"w": "It", "b": [0.1312, 0.7422, 0.1453, 0.7572]}, {"w": "is", "b": [0.1531, 0.7422, 0.1657, 0.7572]}, {"w": "recommended", "b": [0.1734, 0.7422, 0.2865, 0.7572]}, {"w": "to", "b": [0.2942, 0.7422, 0.3109, 0.7572]}, {"w": "choose", "b": [0.3186, 0.7422, 0.3721, 0.7572]}, {"w": "one,", "b": [0.3798, 0.7422, 0.4133, 0.7572]}, {"w": "and", "b": [0.4214, 0.7422, 0.4517, 0.7572]}, {"w": "only", "b": [0.4594, 0.7422, 0.4945, 0.7572]}, {"w": "one,", "b": [0.5022, 0.7422, 0.5357, 0.7572]}, {"w": "performance", "b": [0.5436, 0.7425, 0.6592, 0.7575]}, {"w": "metric", "b": [0.6681, 0.7425, 0.7278, 0.7575]}, {"w": "before", "b": [0.7355, 0.7422, 0.7858, 0.7572]}, {"w": "you", "b": [0.7935, 0.7422, 0.8228, 0.7572]}, {"w": "start", "b": [0.8305, 0.7422, 0.8693, 0.7572]}, {"w": "working", "b": [0.1306, 0.7601, 0.1955, 0.7751]}, {"w": "on", "b": [0.2022, 0.7601, 0.2221, 0.7751]}, {"w": "the", "b": [0.2289, 0.7601, 0.2551, 0.7751]}, {"w": "model.", "b": [0.2618, 0.7601, 0.3167, 0.7751]}, {"w": "Then,", "b": [0.3268, 0.7601, 0.3749, 0.7751]}, {"w": "compare", "b": [0.3818, 0.7601, 0.4509, 0.7751]}, {"w": "different", "b": [0.4577, 0.7601, 0.5258, 0.7751]}, {"w": "models", "b": [0.5325, 0.7601, 0.5896, 0.7751]}, {"w": "and", "b": [0.5964, 0.7601, 0.6267, 0.7751]}, {"w": "track", "b": [0.6335, 0.7601, 0.6754, 0.7751]}, {"w": "the", "b": [0.6822, 0.7601, 0.7083, 0.7751]}, {"w": "overall", "b": [0.7151, 0.7601, 0.7691, 0.7751]}, {"w": "progress", "b": [0.7758, 0.7601, 0.8431, 0.7751]}, {"w": "by", "b": [0.8499, 0.7601, 0.8698, 0.7751]}, {"w": "using", "b": [0.1312, 0.7781, 0.1734, 0.7931]}, {"w": "this", "b": [0.1795, 0.7781, 0.2094, 0.7931]}, {"w": "one", "b": [0.2155, 0.7781, 0.2432, 0.7931]}, {"w": "metric.", "b": [0.2494, 0.7781, 0.3058, 0.7931]}]}, {"id": "b_11", "type": "paragraph", "text": "In Section 5.5, you will read about the most popular and handy model performance metrics, and about the approaches allowing us to combine multiple metrics to obtain a single number.", "words": [{"w": "In", "b": [0.1312, 0.805, 0.148, 0.82]}, {"w": "Section", "b": [0.1541, 0.805, 0.212, 0.82]}, {"w": "5.5,", "b": [0.2181, 0.805, 0.2465, 0.82]}, {"w": "you", "b": [0.2527, 0.805, 0.2811, 0.82]}, {"w": "will", "b": [0.2872, 0.805, 0.3156, 0.82]}, {"w": "read", "b": [0.3218, 0.805, 0.3563, 0.82]}, {"w": "about", "b": [0.3625, 0.805, 0.4086, 0.82]}, {"w": "the", "b": [0.4148, 0.805, 0.4401, 0.82]}, {"w": "most", "b": [0.4463, 0.805, 0.4849, 0.82]}, {"w": "popular", "b": [0.4911, 0.805, 0.5525, 0.82]}, {"w": "and", "b": [0.5587, 0.805, 0.5881, 0.82]}, {"w": "handy", "b": [0.5943, 0.805, 0.6434, 0.82]}, {"w": "model", "b": [0.6496, 0.805, 0.6978, 0.82]}, {"w": "performance", "b": [0.7039, 0.805, 0.8024, 0.82]}, {"w": "metrics,", "b": [0.8086, 0.805, 0.8716, 0.82]}, {"w": "and", "b": [0.1312, 0.823, 0.1604, 0.8379]}, {"w": "about", "b": [0.1664, 0.823, 0.2122, 0.8379]}, {"w": "the", "b": [0.2182, 0.823, 0.2433, 0.8379]}, {"w": "approaches", "b": [0.2494, 0.823, 0.3365, 0.8379]}, {"w": "allowing", "b": [0.3425, 0.823, 0.4073, 0.8379]}, {"w": "us", "b": [0.4134, 0.823, 0.4306, 0.8379]}, {"w": "to", "b": [0.4366, 0.823, 0.4527, 0.8379]}, {"w": "combine", "b": [0.4587, 0.823, 0.5235, 0.8379]}, {"w": "multiple", "b": [0.5296, 0.823, 0.5944, 0.8379]}, {"w": "metrics", "b": [0.6004, 0.823, 0.6579, 0.8379]}, {"w": "to", "b": [0.6639, 0.823, 0.68, 0.8379]}, {"w": "obtain", "b": [0.686, 0.823, 0.7363, 0.8379]}, {"w": "a", "b": [0.7423, 0.823, 0.7514, 0.8379]}, {"w": "single", "b": [0.7574, 0.823, 0.8018, 0.8379]}, {"w": "number.", "b": [0.8078, 0.823, 0.8727, 0.8379]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "4", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 143, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Training epoch", "words": [{"w": "Training", "b": [0.2484, 0.34, 0.3019, 0.3541]}, {"w": "epoch", "b": [0.3058, 0.34, 0.3433, 0.3541]}]}, {"id": "b_1", "type": "paragraph", "text": "Error (%)", "words": [{"w": "Error", "b": [0.0776, 0.1972, 0.095, 0.224]}, {"w": "(%)", "b": [0.0776, 0.175, 0.095, 0.194]}]}, {"id": "b_2", "type": "paragraph", "text": "20 40 60 80", "words": [{"w": "20", "b": [0.1605, 0.32, 0.1762, 0.334]}, {"w": "40", "b": [0.2513, 0.32, 0.267, 0.334]}, {"w": "60", "b": [0.3256, 0.32, 0.3412, 0.334]}, {"w": "80", "b": [0.3916, 0.32, 0.4072, 0.334]}]}, {"id": "b_3", "type": "paragraph", "text": "20 40 60 80", "words": [{"w": "20", "b": [0.1024, 0.2667, 0.1197, 0.2794]}, {"w": "40", "b": [0.1024, 0.2132, 0.1197, 0.2259]}, {"w": "60", "b": [0.1024, 0.1597, 0.1197, 0.1724]}, {"w": "80", "b": [0.1024, 0.1062, 0.1197, 0.1189]}]}, {"id": "b_4", "type": "paragraph", "text": "Human performance Our model (training) Our model (validation)", "words": [{"w": "Human", "b": [0.3185, 0.1331, 0.3574, 0.145]}, {"w": "performance", "b": [0.3607, 0.1331, 0.4274, 0.145]}, {"w": "Our", "b": [0.3185, 0.1191, 0.3391, 0.1309]}, {"w": "model", "b": [0.3424, 0.1191, 0.3754, 0.1309]}, {"w": "(training)", "b": [0.3787, 0.1191, 0.4286, 0.1309]}, {"w": "Our", "b": [0.3185, 0.105, 0.3391, 0.1169]}, {"w": "model", "b": [0.3424, 0.105, 0.3754, 0.1169]}, {"w": "(validation)", "b": [0.3787, 0.105, 0.4403, 0.1169]}]}, {"id": "b_5", "type": "paragraph", "text": "(a)", "words": [{"w": "(a)", "b": [0.2762, 0.362, 0.2998, 0.3769]}]}, {"id": "b_6", "type": "paragraph", "text": "Training epoch", "words": [{"w": "Training", "b": [0.6725, 0.34, 0.726, 0.3541]}, {"w": "epoch", "b": [0.7299, 0.34, 0.7673, 0.3541]}]}, {"id": "b_7", "type": "paragraph", "text": "Error (%)", "words": [{"w": "Error", "b": [0.5017, 0.1972, 0.5191, 0.224]}, {"w": "(%)", "b": [0.5017, 0.175, 0.5191, 0.194]}]}, {"id": "b_8", "type": "paragraph", "text": "20 40 60 80", "words": [{"w": "20", "b": [0.5846, 0.32, 0.6003, 0.334]}, {"w": "40", "b": [0.6754, 0.32, 0.691, 0.334]}, {"w": "60", "b": [0.7496, 0.32, 0.7653, 0.334]}, {"w": "80", "b": [0.8157, 0.32, 0.8313, 0.334]}]}, {"id": "b_9", "type": "paragraph", "text": "20 40 60 80", "words": [{"w": "20", "b": [0.5265, 0.2667, 0.5438, 0.2794]}, {"w": "40", "b": [0.5265, 0.2132, 0.5438, 0.2259]}, {"w": "60", "b": [0.5265, 0.1597, 0.5438, 0.1724]}, {"w": "80", "b": [0.5265, 0.1062, 0.5438, 0.1189]}]}, {"id": "b_10", "type": "paragraph", "text": "Human performance Our model (training) Our model (validation)", "words": [{"w": "Human", "b": [0.7426, 0.1331, 0.7815, 0.145]}, {"w": "performance", "b": [0.7848, 0.1331, 0.8515, 0.145]}, {"w": "Our", "b": [0.7426, 0.1191, 0.7631, 0.1309]}, {"w": "model", "b": [0.7665, 0.1191, 0.7995, 0.1309]}, {"w": "(training)", "b": [0.8028, 0.1191, 0.8526, 0.1309]}, {"w": "Our", "b": [0.7426, 0.105, 0.7631, 0.1169]}, {"w": "model", "b": [0.7665, 0.105, 0.7995, 0.1169]}, {"w": "(validation)", "b": [0.8028, 0.105, 0.8644, 0.1169]}]}, {"id": "b_11", "type": "paragraph", "text": "(b)", "words": [{"w": "(b)", "b": [0.6997, 0.362, 0.7244, 0.3769]}]}, {"id": "b_12", "type": "paragraph", "text": "Figure 2: A model performance compared to a human-performance baseline: (a) the model looks good, so we can decide to regularize it or add more training examples; (b) the model isn’t performing well, so we need to add more features, or increase the model complexity.", "words": [{"w": "Figure", "b": [0.1312, 0.3932, 0.1834, 0.4082]}, {"w": "2:", "b": [0.1895, 0.3932, 0.2039, 0.4082]}, {"w": "A", "b": [0.2121, 0.3932, 0.2259, 0.4082]}, {"w": "model", "b": [0.232, 0.3932, 0.2808, 0.4082]}, {"w": "performance", "b": [0.2869, 0.3932, 0.3866, 0.4082]}, {"w": "compared", "b": [0.3927, 0.3932, 0.4708, 0.4082]}, {"w": "to", "b": [0.4769, 0.3932, 0.4933, 0.4082]}, {"w": "a", "b": [0.4995, 0.3932, 0.5087, 0.4082]}, {"w": "human-performance", "b": [0.5148, 0.3932, 0.6756, 0.4082]}, {"w": "baseline:", "b": [0.6817, 0.3932, 0.7506, 0.4082]}, {"w": "(a)", "b": [0.7588, 0.3932, 0.7824, 0.4082]}, {"w": "the", "b": [0.7885, 0.3932, 0.8142, 0.4082]}, {"w": "model", "b": [0.8203, 0.3932, 0.8691, 0.4082]}, {"w": "looks", "b": [0.1312, 0.4112, 0.1726, 0.4261]}, {"w": "good,", "b": [0.1788, 0.4112, 0.2232, 0.4261]}, {"w": "so", "b": [0.2293, 0.4112, 0.246, 0.4261]}, {"w": "we", "b": [0.2521, 0.4112, 0.2733, 0.4261]}, {"w": "can", "b": [0.2795, 0.4112, 0.3074, 0.4261]}, {"w": "decide", "b": [0.3135, 0.4112, 0.3641, 0.4261]}, {"w": "to", "b": [0.3703, 0.4112, 0.3868, 0.4261]}, {"w": "regularize", "b": [0.393, 0.4112, 0.4716, 0.4261]}, {"w": "it", "b": [0.4777, 0.4112, 0.4901, 0.4261]}, {"w": "or", "b": [0.4963, 0.4112, 0.5129, 0.4261]}, {"w": "add", "b": [0.519, 0.4112, 0.549, 0.4261]}, {"w": "more", "b": [0.5551, 0.4112, 0.5955, 0.4261]}, {"w": "training", "b": [0.6016, 0.4112, 0.6657, 0.4261]}, {"w": "examples;", "b": [0.6718, 0.4112, 0.751, 0.4261]}, {"w": "(b)", "b": [0.7571, 0.4112, 0.7819, 0.4261]}, {"w": "the", "b": [0.7881, 0.4112, 0.8139, 0.4261]}, {"w": "model", "b": [0.82, 0.4112, 0.8691, 0.4261]}, {"w": "isn’t", "b": [0.1312, 0.4291, 0.1662, 0.4441]}, {"w": "performing", "b": [0.1724, 0.4291, 0.2607, 0.4441]}, {"w": "well,", "b": [0.2668, 0.4291, 0.3032, 0.4441]}, {"w": "so", "b": [0.3093, 0.4291, 0.3259, 0.4441]}, {"w": "we", "b": [0.332, 0.4291, 0.353, 0.4441]}, {"w": "need", "b": [0.3592, 0.4291, 0.3961, 0.4441]}, {"w": "to", "b": [0.4023, 0.4291, 0.4187, 0.4441]}, {"w": "add", "b": [0.4248, 0.4291, 0.4546, 0.4441]}, {"w": "more", "b": [0.4607, 0.4291, 0.5007, 0.4441]}, {"w": "features,", "b": [0.5069, 0.4291, 0.5753, 0.4441]}, {"w": "or", "b": [0.5814, 0.4291, 0.5979, 0.4441]}, {"w": "increase", "b": [0.604, 0.4291, 0.6678, 0.4441]}, {"w": "the", "b": [0.6739, 0.4291, 0.6996, 0.4441]}, {"w": "model", "b": [0.7057, 0.4291, 0.7544, 0.4441]}, {"w": "complexity.", "b": [0.7606, 0.4291, 0.8518, 0.4441]}]}, {"id": "b_13", "type": "paragraph", "text": "5.1.4 Choose the Right Baseline", "words": [{"w": "5.1.4", "b": [0.1312, 0.4797, 0.1749, 0.4946]}, {"w": "Choose", "b": [0.1961, 0.4797, 0.2631, 0.4946]}, {"w": "the", "b": [0.2702, 0.4797, 0.2999, 0.4946]}, {"w": "Right", "b": [0.307, 0.4797, 0.3589, 0.4946]}, {"w": "Baseline", "b": [0.366, 0.4797, 0.4428, 0.4946]}]}, {"id": "b_14", "type": "paragraph", "text": "Before you start working on a predictive model, it is important to establish baseline perfor- mance on your problem. A baseline is a model or an algorithm that provides a reference point for comparison.", "words": [{"w": "Before", "b": [0.1312, 0.516, 0.1829, 0.5309]}, {"w": "you", "b": [0.189, 0.516, 0.2178, 0.5309]}, {"w": "start", "b": [0.2239, 0.516, 0.2621, 0.5309]}, {"w": "working", "b": [0.2682, 0.516, 0.332, 0.5309]}, {"w": "on", "b": [0.3381, 0.516, 0.3576, 0.5309]}, {"w": "a", "b": [0.3638, 0.516, 0.373, 0.5309]}, {"w": "predictive", "b": [0.3791, 0.516, 0.4583, 0.5309]}, {"w": "model,", "b": [0.4644, 0.516, 0.5184, 0.5309]}, {"w": "it", "b": [0.5245, 0.516, 0.5369, 0.5309]}, {"w": "is", "b": [0.543, 0.516, 0.5554, 0.5309]}, {"w": "important", "b": [0.5615, 0.516, 0.6427, 0.5309]}, {"w": "to", "b": [0.6489, 0.516, 0.6653, 0.5309]}, {"w": "establish", "b": [0.6714, 0.516, 0.7415, 0.5309]}, {"w": "baseline", "b": [0.7477, 0.516, 0.8115, 0.5309]}, {"w": "perfor-", "b": [0.8176, 0.516, 0.8722, 0.5309]}, {"w": "mance", "b": [0.1312, 0.5339, 0.1835, 0.5489]}, {"w": "on", "b": [0.1898, 0.5339, 0.2097, 0.5489]}, {"w": "your", "b": [0.2159, 0.5339, 0.2526, 0.5489]}, {"w": "problem.", "b": [0.2589, 0.5339, 0.3311, 0.5489]}, {"w": "A", "b": [0.3396, 0.5339, 0.3538, 0.5489]}, {"w": "baseline", "b": [0.3599, 0.5342, 0.4335, 0.5492]}, {"w": "is", "b": [0.4397, 0.5339, 0.4524, 0.5489]}, {"w": "a", "b": [0.4586, 0.5339, 0.468, 0.5489]}, {"w": "model", "b": [0.4743, 0.5339, 0.524, 0.5489]}, {"w": "or", "b": [0.5302, 0.5339, 0.547, 0.5489]}, {"w": "an", "b": [0.5533, 0.5339, 0.5732, 0.5489]}, {"w": "algorithm", "b": [0.5794, 0.5339, 0.659, 0.5489]}, {"w": "that", "b": [0.6652, 0.5339, 0.6997, 0.5489]}, {"w": "provides", "b": [0.706, 0.5339, 0.7742, 0.5489]}, {"w": "a", "b": [0.7804, 0.5339, 0.7899, 0.5489]}, {"w": "reference", "b": [0.7961, 0.5339, 0.869, 0.5489]}, {"w": "point", "b": [0.1312, 0.5519, 0.1733, 0.5668]}, {"w": "for", "b": [0.1794, 0.5519, 0.2015, 0.5668]}, {"w": "comparison.", "b": [0.2077, 0.5519, 0.3042, 0.5668]}]}, {"id": "b_15", "type": "paragraph", "text": "Having a baseline gives an analyst confidence that the machine-learning-based solution works. If the value of the performance metric for the machine learning model is better than the value obtained using the baseline, then machine learning provides value.", "words": [{"w": "Having", "b": [0.1312, 0.5788, 0.187, 0.5937]}, {"w": "a", "b": [0.1927, 0.5788, 0.2017, 0.5937]}, {"w": "baseline", "b": [0.2075, 0.5788, 0.2699, 0.5937]}, {"w": "gives", "b": [0.2756, 0.5788, 0.3139, 0.5937]}, {"w": "an", "b": [0.3196, 0.5788, 0.3387, 0.5937]}, {"w": "analyst", "b": [0.3444, 0.5788, 0.4013, 0.5937]}, {"w": "confidence", "b": [0.407, 0.5788, 0.4885, 0.5937]}, {"w": "that", "b": [0.4942, 0.5788, 0.5273, 0.5937]}, {"w": "the", "b": [0.5331, 0.5788, 0.5582, 0.5937]}, {"w": "machine-learning-based", "b": [0.5639, 0.5788, 0.7485, 0.5937]}, {"w": "solution", "b": [0.7542, 0.5788, 0.8166, 0.5937]}, {"w": "works.", "b": [0.8223, 0.5788, 0.8727, 0.5937]}, {"w": "If", "b": [0.1312, 0.5967, 0.1438, 0.6117]}, {"w": "the", "b": [0.1507, 0.5967, 0.1768, 0.6117]}, {"w": "value", "b": [0.1838, 0.5967, 0.2261, 0.6117]}, {"w": "of", "b": [0.233, 0.5967, 0.2482, 0.6117]}, {"w": "the", "b": [0.2551, 0.5967, 0.2813, 0.6117]}, {"w": "performance", "b": [0.2882, 0.5967, 0.3897, 0.6117]}, {"w": "metric", "b": [0.3966, 0.5967, 0.449, 0.6117]}, {"w": "for", "b": [0.4559, 0.5967, 0.4784, 0.6117]}, {"w": "the", "b": [0.4853, 0.5967, 0.5115, 0.6117]}, {"w": "machine", "b": [0.5184, 0.5967, 0.5859, 0.6117]}, {"w": "learning", "b": [0.5928, 0.5967, 0.6587, 0.6117]}, {"w": "model", "b": [0.6656, 0.5967, 0.7153, 0.6117]}, {"w": "is", "b": [0.7222, 0.5967, 0.7349, 0.6117]}, {"w": "better", "b": [0.7418, 0.5967, 0.7915, 0.6117]}, {"w": "than", "b": [0.7984, 0.5967, 0.8361, 0.6117]}, {"w": "the", "b": [0.843, 0.5967, 0.8691, 0.6117]}, {"w": "value", "b": [0.1308, 0.6147, 0.1723, 0.6296]}, {"w": "obtained", "b": [0.1784, 0.6147, 0.2482, 0.6296]}, {"w": "using", "b": [0.2543, 0.6147, 0.2965, 0.6296]}, {"w": "the", "b": [0.3026, 0.6147, 0.3283, 0.6296]}, {"w": "baseline,", "b": [0.3344, 0.6147, 0.4032, 0.6296]}, {"w": "then", "b": [0.4094, 0.6147, 0.4453, 0.6296]}, {"w": "machine", "b": [0.4514, 0.6147, 0.5176, 0.6296]}, {"w": "learning", "b": [0.5237, 0.6147, 0.5884, 0.6296]}, {"w": "provides", "b": [0.5945, 0.6147, 0.6614, 0.6296]}, {"w": "value.", "b": [0.6675, 0.6147, 0.7142, 0.6296]}]}, {"id": "b_16", "type": "paragraph", "text": "Comparing your current model’s performance to a baseline can orient the work in different directions. Let’s say we know that human-level performance is achievable on our problem. We then take human performance as a baseline, as shown in Figure 2. In Figure 2a, the", "words": [{"w": "Comparing", "b": [0.1312, 0.6416, 0.221, 0.6565]}, {"w": "your", "b": [0.2272, 0.6416, 0.2633, 0.6565]}, {"w": "current", "b": [0.2695, 0.6416, 0.3279, 0.6565]}, {"w": "model’s", "b": [0.334, 0.6416, 0.3955, 0.6565]}, {"w": "performance", "b": [0.4017, 0.6416, 0.5019, 0.6565]}, {"w": "to", "b": [0.508, 0.6416, 0.5245, 0.6565]}, {"w": "a", "b": [0.5307, 0.6416, 0.5399, 0.6565]}, {"w": "baseline", "b": [0.5461, 0.6416, 0.6102, 0.6565]}, {"w": "can", "b": [0.6163, 0.6416, 0.6442, 0.6565]}, {"w": "orient", "b": [0.6503, 0.6416, 0.6973, 0.6565]}, {"w": "the", "b": [0.7035, 0.6416, 0.7293, 0.6565]}, {"w": "work", "b": [0.7355, 0.6416, 0.7747, 0.6565]}, {"w": "in", "b": [0.7809, 0.6416, 0.7963, 0.6565]}, {"w": "different", "b": [0.8025, 0.6416, 0.8696, 0.6565]}, {"w": "directions.", "b": [0.1312, 0.6595, 0.2161, 0.6745]}, {"w": "Let’s", "b": [0.2243, 0.6595, 0.2643, 0.6745]}, {"w": "say", "b": [0.2705, 0.6595, 0.2967, 0.6745]}, {"w": "we", "b": [0.3029, 0.6595, 0.3243, 0.6745]}, {"w": "know", "b": [0.3304, 0.6595, 0.3733, 0.6745]}, {"w": "that", "b": [0.3794, 0.6595, 0.4139, 0.6745]}, {"w": "human-level", "b": [0.4201, 0.6595, 0.5188, 0.6745]}, {"w": "performance", "b": [0.525, 0.6595, 0.6264, 0.6745]}, {"w": "is", "b": [0.6326, 0.6595, 0.6452, 0.6745]}, {"w": "achievable", "b": [0.6514, 0.6595, 0.735, 0.6745]}, {"w": "on", "b": [0.7412, 0.6595, 0.761, 0.6745]}, {"w": "our", "b": [0.7672, 0.6595, 0.7944, 0.6745]}, {"w": "problem.", "b": [0.8005, 0.6595, 0.8727, 0.6745]}, {"w": "We", "b": [0.1303, 0.6775, 0.1565, 0.6924]}, {"w": "then", "b": [0.1635, 0.6775, 0.2001, 0.6924]}, {"w": "take", "b": [0.2071, 0.6775, 0.2416, 0.6924]}, {"w": "human", "b": [0.2485, 0.6775, 0.3045, 0.6924]}, {"w": "performance", "b": [0.3115, 0.6775, 0.413, 0.6924]}, {"w": "as", "b": [0.42, 0.6775, 0.4369, 0.6924]}, {"w": "a", "b": [0.4438, 0.6775, 0.4533, 0.6924]}, {"w": "baseline,", "b": [0.4602, 0.6775, 0.5304, 0.6924]}, {"w": "as", "b": [0.5376, 0.6775, 0.5545, 0.6924]}, {"w": "shown", "b": [0.5614, 0.6775, 0.6123, 0.6924]}, {"w": "in", "b": [0.6192, 0.6775, 0.6349, 0.6924]}, {"w": "Figure", "b": [0.6419, 0.6775, 0.6951, 0.6924]}, {"w": "2.", "b": [0.702, 0.6775, 0.7167, 0.6924]}, {"w": "In", "b": [0.7274, 0.6775, 0.7446, 0.6924]}, {"w": "Figure", "b": [0.7516, 0.6775, 0.8047, 0.6924]}, {"w": "2a,", "b": [0.8117, 0.6775, 0.8358, 0.6924]}, {"w": "the", "b": [0.8429, 0.6775, 0.8691, 0.6924]}]}, {"id": "b_17", "type": "paragraph", "text": "model looks good, so we can decide to regularize it or add more training examples. On the other hand, in Figure 2b, the model isn’t performing well, so we should add more features, or increase the model complexity.", "words": [{"w": "model", "b": [0.1312, 0.6954, 0.1801, 0.7104]}, {"w": "looks", "b": [0.1863, 0.6954, 0.2276, 0.7104]}, {"w": "good,", "b": [0.2337, 0.6954, 0.278, 0.7104]}, {"w": "so", "b": [0.2841, 0.6954, 0.3007, 0.7104]}, {"w": "we", "b": [0.3069, 0.6954, 0.3279, 0.7104]}, {"w": "can", "b": [0.3341, 0.6954, 0.3619, 0.7104]}, {"w": "decide", "b": [0.3681, 0.6954, 0.4185, 0.7104]}, {"w": "to", "b": [0.4247, 0.6954, 0.4411, 0.7104]}, {"w": "regularize", "b": [0.4473, 0.6954, 0.5257, 0.7104]}, {"w": "it", "b": [0.5318, 0.6954, 0.5442, 0.7104]}, {"w": "or", "b": [0.5503, 0.6954, 0.5669, 0.7104]}, {"w": "add", "b": [0.573, 0.6954, 0.6029, 0.7104]}, {"w": "more", "b": [0.609, 0.6954, 0.6492, 0.7104]}, {"w": "training", "b": [0.6554, 0.6954, 0.7192, 0.7104]}, {"w": "examples.", "b": [0.7254, 0.6954, 0.8043, 0.7104]}, {"w": "On", "b": [0.8125, 0.6954, 0.8372, 0.7104]}, {"w": "the", "b": [0.8433, 0.6954, 0.8691, 0.7104]}, {"w": "other", "b": [0.1312, 0.7134, 0.1725, 0.7283]}, {"w": "hand,", "b": [0.1783, 0.7134, 0.2225, 0.7283]}, {"w": "in", "b": [0.2284, 0.7134, 0.2435, 0.7283]}, {"w": "Figure", "b": [0.2494, 0.7134, 0.3004, 0.7283]}, {"w": "2b,", "b": [0.3062, 0.7134, 0.3304, 0.7283]}, {"w": "the", "b": [0.3362, 0.7134, 0.3614, 0.7283]}, {"w": "model", "b": [0.3672, 0.7134, 0.4149, 0.7283]}, {"w": "isn’t", "b": [0.4208, 0.7134, 0.4551, 0.7283]}, {"w": "performing", "b": [0.4609, 0.7134, 0.5474, 0.7283]}, {"w": "well,", "b": [0.5532, 0.7134, 0.5889, 0.7283]}, {"w": "so", "b": [0.5948, 0.7134, 0.611, 0.7283]}, {"w": "we", "b": [0.6168, 0.7134, 0.6374, 0.7283]}, {"w": "should", "b": [0.6432, 0.7134, 0.6946, 0.7283]}, {"w": "add", "b": [0.7004, 0.7134, 0.7296, 0.7283]}, {"w": "more", "b": [0.7354, 0.7134, 0.7746, 0.7283]}, {"w": "features,", "b": [0.7805, 0.7134, 0.8475, 0.7283]}, {"w": "or", "b": [0.8534, 0.7134, 0.8695, 0.7283]}, {"w": "increase", "b": [0.1312, 0.7313, 0.195, 0.7463]}, {"w": "the", "b": [0.2011, 0.7313, 0.2268, 0.7463]}, {"w": "model", "b": [0.2329, 0.7316, 0.2891, 0.7466]}, {"w": "complexity.", "b": [0.2962, 0.7313, 0.4024, 0.7466]}]}, {"id": "b_18", "type": "paragraph", "text": "The baseline is a model or an algorithm that gets an input, and outputs a prediction. The baseline’s prediction output must be of the same nature as the model’s prediction. Otherwise, you cannot compare them.", "words": [{"w": "The", "b": [0.1306, 0.7582, 0.1627, 0.7732]}, {"w": "baseline", "b": [0.1688, 0.7582, 0.2332, 0.7732]}, {"w": "is", "b": [0.2393, 0.7582, 0.2519, 0.7732]}, {"w": "a", "b": [0.258, 0.7582, 0.2673, 0.7732]}, {"w": "model", "b": [0.2735, 0.7582, 0.3226, 0.7732]}, {"w": "or", "b": [0.3288, 0.7582, 0.3454, 0.7732]}, {"w": "an", "b": [0.3516, 0.7582, 0.3712, 0.7732]}, {"w": "algorithm", "b": [0.3774, 0.7582, 0.4561, 0.7732]}, {"w": "that", "b": [0.4623, 0.7582, 0.4965, 0.7732]}, {"w": "gets", "b": [0.5026, 0.7582, 0.5348, 0.7732]}, {"w": "an", "b": [0.541, 0.7582, 0.5607, 0.7732]}, {"w": "input,", "b": [0.5668, 0.7582, 0.6155, 0.7732]}, {"w": "and", "b": [0.6216, 0.7582, 0.6517, 0.7732]}, {"w": "outputs", "b": [0.6578, 0.7582, 0.7201, 0.7732]}, {"w": "a", "b": [0.7262, 0.7582, 0.7356, 0.7732]}, {"w": "prediction.", "b": [0.7417, 0.7582, 0.8288, 0.7732]}, {"w": "The", "b": [0.837, 0.7582, 0.8691, 0.7732]}, {"w": "baseline’s", "b": [0.1312, 0.7762, 0.2058, 0.7911]}, {"w": "prediction", "b": [0.2114, 0.7762, 0.2909, 0.7911]}, {"w": "output", "b": [0.2965, 0.7762, 0.3498, 0.7911]}, {"w": "must", "b": [0.3554, 0.7762, 0.3941, 0.7911]}, {"w": "be", "b": [0.3997, 0.7762, 0.4183, 0.7911]}, {"w": "of", "b": [0.4239, 0.7762, 0.4385, 0.7911]}, {"w": "the", "b": [0.4441, 0.7762, 0.4692, 0.7911]}, {"w": "same", "b": [0.4748, 0.7762, 0.5141, 0.7911]}, {"w": "nature", "b": [0.5197, 0.7762, 0.571, 0.7911]}, {"w": "as", "b": [0.5766, 0.7762, 0.5928, 0.7911]}, {"w": "the", "b": [0.5984, 0.7762, 0.6236, 0.7911]}, {"w": "model’s", "b": [0.6291, 0.7762, 0.689, 0.7911]}, {"w": "prediction.", "b": [0.6947, 0.7762, 0.7791, 0.7911]}, {"w": "Otherwise,", "b": [0.7872, 0.7762, 0.8717, 0.7911]}, {"w": "you", "b": [0.1308, 0.7941, 0.1595, 0.8091]}, {"w": "cannot", "b": [0.1656, 0.7941, 0.22, 0.8091]}, {"w": "compare", "b": [0.2261, 0.7941, 0.2938, 0.8091]}, {"w": "them.", "b": [0.3, 0.7941, 0.3461, 0.8091]}]}, {"id": "b_19", "type": "paragraph", "text": "A baseline doesn’t have to be the result of any learning algorithm. It can be a rule-based or heuristic algorithm, a simple statistic applied to the training data, or something else.", "words": [{"w": "A", "b": [0.1305, 0.8211, 0.1442, 0.836]}, {"w": "baseline", "b": [0.1504, 0.8211, 0.2135, 0.836]}, {"w": "doesn’t", "b": [0.2197, 0.8211, 0.2772, 0.836]}, {"w": "have", "b": [0.2834, 0.8211, 0.3194, 0.836]}, {"w": "to", "b": [0.3256, 0.8211, 0.3419, 0.836]}, {"w": "be", "b": [0.348, 0.8211, 0.3668, 0.836]}, {"w": "the", "b": [0.373, 0.8211, 0.3984, 0.836]}, {"w": "result", "b": [0.4045, 0.8211, 0.4494, 0.836]}, {"w": "of", "b": [0.4556, 0.8211, 0.4703, 0.836]}, {"w": "any", "b": [0.4765, 0.8211, 0.5049, 0.836]}, {"w": "learning", "b": [0.511, 0.8211, 0.5751, 0.836]}, {"w": "algorithm.", "b": [0.5813, 0.8211, 0.6636, 0.836]}, {"w": "It", "b": [0.6718, 0.8211, 0.6856, 0.836]}, {"w": "can", "b": [0.6917, 0.8211, 0.7191, 0.836]}, {"w": "be", "b": [0.7253, 0.8211, 0.7441, 0.836]}, {"w": "a", "b": [0.7503, 0.8211, 0.7594, 0.836]}, {"w": "rule-based", "b": [0.7656, 0.8211, 0.847, 0.836]}, {"w": "or", "b": [0.8532, 0.8211, 0.8695, 0.836]}, {"w": "heuristic", "b": [0.1312, 0.839, 0.2001, 0.854]}, {"w": "algorithm,", "b": [0.2063, 0.839, 0.2894, 0.854]}, {"w": "a", "b": [0.2955, 0.839, 0.3047, 0.854]}, {"w": "simple", "b": [0.3109, 0.839, 0.3623, 0.854]}, {"w": "statistic", "b": [0.3684, 0.839, 0.4322, 0.854]}, {"w": "applied", "b": [0.4384, 0.839, 0.4968, 0.854]}, {"w": "to", "b": [0.503, 0.839, 0.5194, 0.854]}, {"w": "the", "b": [0.5255, 0.839, 0.5512, 0.854]}, {"w": "training", "b": [0.5573, 0.839, 0.6209, 0.854]}, {"w": "data,", "b": [0.6271, 0.839, 0.6681, 0.854]}, {"w": "or", "b": [0.6743, 0.839, 0.6907, 0.854]}, {"w": "something", "b": [0.6969, 0.839, 0.779, 0.854]}, {"w": "else.", "b": [0.7851, 0.839, 0.8191, 0.854]}]}, {"id": "b_20", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "5", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 144, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "The two most commonly used baseline algorithms are:", "words": [{"w": "The", "b": [0.1306, 0.0881, 0.1624, 0.1031]}, {"w": "two", "b": [0.1685, 0.0881, 0.1972, 0.1031]}, {"w": "most", "b": [0.2034, 0.0881, 0.2424, 0.1031]}, {"w": "commonly", "b": [0.2486, 0.0881, 0.3311, 0.1031]}, {"w": "used", "b": [0.3372, 0.0881, 0.3732, 0.1031]}, {"w": "baseline", "b": [0.3794, 0.0881, 0.4431, 0.1031]}, {"w": "algorithms", "b": [0.4492, 0.0881, 0.5345, 0.1031]}, {"w": "are:", "b": [0.5406, 0.0881, 0.5704, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "• random prediction, and • zero rule.", "words": [{"w": "•", "b": [0.1538, 0.115, 0.1681, 0.13]}, {"w": "random", "b": [0.1774, 0.115, 0.2389, 0.13]}, {"w": "prediction,", "b": [0.2451, 0.115, 0.3313, 0.13]}, {"w": "and", "b": [0.3374, 0.115, 0.3672, 0.13]}, {"w": "•", "b": [0.1538, 0.133, 0.1681, 0.1479]}, {"w": "zero", "b": [0.1774, 0.133, 0.2102, 0.1479]}, {"w": "rule.", "b": [0.2164, 0.133, 0.2523, 0.1479]}]}, {"id": "b_2", "type": "paragraph", "text": "The random prediction algorithm makes a prediction by randomly choosing a label from the collection of labels assigned to the training examples. In the classification problem, it corresponds to randomly picking one class from all classes in the problem. In the regression problem it means selecting from all unique target values in the training data.", "words": [{"w": "The", "b": [0.1306, 0.1599, 0.1617, 0.1748]}, {"w": "random", "b": [0.1675, 0.1602, 0.2384, 0.1751]}, {"w": "prediction", "b": [0.245, 0.1602, 0.3389, 0.1751]}, {"w": "algorithm", "b": [0.3456, 0.1602, 0.4354, 0.1751]}, {"w": "makes", "b": [0.4411, 0.1599, 0.4895, 0.1748]}, {"w": "a", "b": [0.4952, 0.1599, 0.5043, 0.1748]}, {"w": "prediction", "b": [0.51, 0.1599, 0.5895, 0.1748]}, {"w": "by", "b": [0.5952, 0.1599, 0.6143, 0.1748]}, {"w": "randomly", "b": [0.6201, 0.1599, 0.695, 0.1748]}, {"w": "choosing", "b": [0.7008, 0.1599, 0.7682, 0.1748]}, {"w": "a", "b": [0.774, 0.1599, 0.783, 0.1748]}, {"w": "label", "b": [0.7888, 0.1599, 0.8265, 0.1748]}, {"w": "from", "b": [0.8322, 0.1599, 0.8689, 0.1748]}, {"w": "the", "b": [0.1312, 0.1778, 0.1574, 0.1928]}, {"w": "collection", "b": [0.1637, 0.1778, 0.2412, 0.1928]}, {"w": "of", "b": [0.2475, 0.1778, 0.2627, 0.1928]}, {"w": "labels", "b": [0.269, 0.1778, 0.3157, 0.1928]}, {"w": "assigned", "b": [0.322, 0.1778, 0.3902, 0.1928]}, {"w": "to", "b": [0.3966, 0.1778, 0.4133, 0.1928]}, {"w": "the", "b": [0.4196, 0.1778, 0.4458, 0.1928]}, {"w": "training", "b": [0.4521, 0.1778, 0.517, 0.1928]}, {"w": "examples.", "b": [0.5234, 0.1778, 0.6035, 0.1928]}, {"w": "In", "b": [0.6123, 0.1778, 0.6295, 0.1928]}, {"w": "the", "b": [0.6359, 0.1778, 0.662, 0.1928]}, {"w": "classification", "b": [0.6684, 0.1778, 0.7721, 0.1928]}, {"w": "problem,", "b": [0.7785, 0.1778, 0.8507, 0.1928]}, {"w": "it", "b": [0.8571, 0.1778, 0.8696, 0.1928]}, {"w": "corresponds", "b": [0.1312, 0.1958, 0.2259, 0.2107]}, {"w": "to", "b": [0.232, 0.1958, 0.2483, 0.2107]}, {"w": "randomly", "b": [0.2545, 0.1958, 0.3304, 0.2107]}, {"w": "picking", "b": [0.3366, 0.1958, 0.3937, 0.2107]}, {"w": "one", "b": [0.3999, 0.1958, 0.4274, 0.2107]}, {"w": "class", "b": [0.4335, 0.1958, 0.4704, 0.2107]}, {"w": "from", "b": [0.4766, 0.1958, 0.5138, 0.2107]}, {"w": "all", "b": [0.52, 0.1958, 0.5394, 0.2107]}, {"w": "classes", "b": [0.5455, 0.1958, 0.5978, 0.2107]}, {"w": "in", "b": [0.604, 0.1958, 0.6193, 0.2107]}, {"w": "the", "b": [0.6255, 0.1958, 0.6509, 0.2107]}, {"w": "problem.", "b": [0.6571, 0.1958, 0.7275, 0.2107]}, {"w": "In", "b": [0.7357, 0.1958, 0.7525, 0.2107]}, {"w": "the", "b": [0.7587, 0.1958, 0.7842, 0.2107]}, {"w": "regression", "b": [0.7903, 0.1958, 0.8692, 0.2107]}, {"w": "problem", "b": [0.1312, 0.2137, 0.1969, 0.2287]}, {"w": "it", "b": [0.2031, 0.2137, 0.2154, 0.2287]}, {"w": "means", "b": [0.2215, 0.2137, 0.2719, 0.2287]}, {"w": "selecting", "b": [0.278, 0.2137, 0.3468, 0.2287]}, {"w": "from", "b": [0.353, 0.2137, 0.3905, 0.2287]}, {"w": "all", "b": [0.3966, 0.2137, 0.4161, 0.2287]}, {"w": "unique", "b": [0.4222, 0.2137, 0.4761, 0.2287]}, {"w": "target", "b": [0.4822, 0.2137, 0.5305, 0.2287]}, {"w": "values", "b": [0.5366, 0.2137, 0.5855, 0.2287]}, {"w": "in", "b": [0.5916, 0.2137, 0.607, 0.2287]}, {"w": "the", "b": [0.6131, 0.2137, 0.6388, 0.2287]}, {"w": "training", "b": [0.6449, 0.2137, 0.7086, 0.2287]}, {"w": "data.", "b": [0.7147, 0.2137, 0.7557, 0.2287]}]}, {"id": "b_3", "type": "paragraph", "text": "The zero rule algorithm yields a tighter baseline than the random prediction algorithm. This means that it usually improves the value of the metric as compared to random prediction. To make predictions, the zero rule algorithm uses more information about the problem.", "words": [{"w": "The", "b": [0.1306, 0.2406, 0.163, 0.2556]}, {"w": "zero", "b": [0.1691, 0.241, 0.2076, 0.2559]}, {"w": "rule", "b": [0.2147, 0.241, 0.2508, 0.2559]}, {"w": "algorithm", "b": [0.2579, 0.241, 0.3477, 0.2559]}, {"w": "yields", "b": [0.3538, 0.2406, 0.4005, 0.2556]}, {"w": "a", "b": [0.4066, 0.2406, 0.416, 0.2556]}, {"w": "tighter", "b": [0.4221, 0.2406, 0.4771, 0.2556]}, {"w": "baseline", "b": [0.4832, 0.2406, 0.5481, 0.2556]}, {"w": "than", "b": [0.5543, 0.2406, 0.5919, 0.2556]}, {"w": "the", "b": [0.598, 0.2406, 0.6241, 0.2556]}, {"w": "random", "b": [0.6303, 0.2406, 0.693, 0.2556]}, {"w": "prediction", "b": [0.6992, 0.2406, 0.7818, 0.2556]}, {"w": "algorithm.", "b": [0.7879, 0.2406, 0.8726, 0.2556]}, {"w": "This", "b": [0.1306, 0.2586, 0.1658, 0.2735]}, {"w": "means", "b": [0.171, 0.2586, 0.2203, 0.2735]}, {"w": "that", "b": [0.2255, 0.2586, 0.2586, 0.2735]}, {"w": "it", "b": [0.2638, 0.2586, 0.2758, 0.2735]}, {"w": "usually", "b": [0.281, 0.2586, 0.3368, 0.2735]}, {"w": "improves", "b": [0.342, 0.2586, 0.412, 0.2735]}, {"w": "the", "b": [0.4171, 0.2586, 0.4422, 0.2735]}, {"w": "value", "b": [0.4474, 0.2586, 0.4881, 0.2735]}, {"w": "of", "b": [0.4932, 0.2586, 0.5078, 0.2735]}, {"w": "the", "b": [0.5129, 0.2586, 0.538, 0.2735]}, {"w": "metric", "b": [0.5432, 0.2586, 0.5935, 0.2735]}, {"w": "as", "b": [0.5986, 0.2586, 0.6148, 0.2735]}, {"w": "compared", "b": [0.6199, 0.2586, 0.6964, 0.2735]}, {"w": "to", "b": [0.7015, 0.2586, 0.7176, 0.2735]}, {"w": "random", "b": [0.7227, 0.2586, 0.7831, 0.2735]}, {"w": "prediction.", "b": [0.7882, 0.2586, 0.8727, 0.2735]}, {"w": "To", "b": [0.1306, 0.2765, 0.1516, 0.2915]}, {"w": "make", "b": [0.1577, 0.2765, 0.1998, 0.2915]}, {"w": "predictions,", "b": [0.2059, 0.2765, 0.2994, 0.2915]}, {"w": "the", "b": [0.3056, 0.2765, 0.3312, 0.2915]}, {"w": "zero", "b": [0.3373, 0.2765, 0.3702, 0.2915]}, {"w": "rule", "b": [0.3764, 0.2765, 0.4072, 0.2915]}, {"w": "algorithm", "b": [0.4133, 0.2765, 0.4913, 0.2915]}, {"w": "uses", "b": [0.4975, 0.2765, 0.5305, 0.2915]}, {"w": "more", "b": [0.5367, 0.2765, 0.5767, 0.2915]}, {"w": "information", "b": [0.5828, 0.2765, 0.6767, 0.2915]}, {"w": "about", "b": [0.6828, 0.2765, 0.7295, 0.2915]}, {"w": "the", "b": [0.7356, 0.2765, 0.7613, 0.2915]}, {"w": "problem.", "b": [0.7674, 0.2765, 0.8382, 0.2915]}]}, {"id": "b_4", "type": "paragraph", "text": "In classification, the zero rule algorithm strategy is to always predict the class most common in the training set, independently of the input value. It can look ineffective, but consider the following problem. Let the training data for your classification problem contain 800 examples of the positive class, and 200 examples of the negative class. The zero rule algorithm will predict the positive class all the time, and the accuracy (one of the popular performance metrics that we will consider in Section 5.5.2) of the baseline will be 800/1000 = 0.8 or 80%, which is not bad for such a simple classifier. Now you know that your statistical model, independently of how close it is to the optimum, must have an accuracy of at least 80%.", "words": [{"w": "In", "b": [0.1312, 0.3035, 0.1478, 0.3184]}, {"w": "classification,", "b": [0.154, 0.3035, 0.2588, 0.3184]}, {"w": "the", "b": [0.265, 0.3035, 0.2902, 0.3184]}, {"w": "zero", "b": [0.2963, 0.3035, 0.3286, 0.3184]}, {"w": "rule", "b": [0.3348, 0.3035, 0.365, 0.3184]}, {"w": "algorithm", "b": [0.3712, 0.3035, 0.4477, 0.3184]}, {"w": "strategy", "b": [0.4538, 0.3035, 0.5179, 0.3184]}, {"w": "is", "b": [0.524, 0.3035, 0.5362, 0.3184]}, {"w": "to", "b": [0.5424, 0.3035, 0.5585, 0.3184]}, {"w": "always", "b": [0.5647, 0.3035, 0.6166, 0.3184]}, {"w": "predict", "b": [0.6227, 0.3035, 0.6781, 0.3184]}, {"w": "the", "b": [0.6843, 0.3035, 0.7095, 0.3184]}, {"w": "class", "b": [0.7156, 0.3035, 0.7521, 0.3184]}, {"w": "most", "b": [0.7582, 0.3035, 0.7965, 0.3184]}, {"w": "common", "b": [0.8027, 0.3035, 0.8691, 0.3184]}, {"w": "in", "b": [0.1312, 0.3214, 0.1463, 0.3364]}, {"w": "the", "b": [0.1525, 0.3214, 0.1776, 0.3364]}, {"w": "training", "b": [0.1838, 0.3214, 0.2462, 0.3364]}, {"w": "set,", "b": [0.2523, 0.3214, 0.2796, 0.3364]}, {"w": "independently", "b": [0.2858, 0.3214, 0.3969, 0.3364]}, {"w": "of", "b": [0.4031, 0.3214, 0.4177, 0.3364]}, {"w": "the", "b": [0.4238, 0.3214, 0.449, 0.3364]}, {"w": "input", "b": [0.4551, 0.3214, 0.4974, 0.3364]}, {"w": "value.", "b": [0.5035, 0.3214, 0.5493, 0.3364]}, {"w": "It", "b": [0.5575, 0.3214, 0.5711, 0.3364]}, {"w": "can", "b": [0.5772, 0.3214, 0.6044, 0.3364]}, {"w": "look", "b": [0.6105, 0.3214, 0.6437, 0.3364]}, {"w": "ineffective,", "b": [0.6499, 0.3214, 0.7339, 0.3364]}, {"w": "but", "b": [0.74, 0.3214, 0.7672, 0.3364]}, {"w": "consider", "b": [0.7733, 0.3214, 0.8379, 0.3364]}, {"w": "the", "b": [0.844, 0.3214, 0.8692, 0.3364]}, {"w": "following", "b": [0.1312, 0.3394, 0.2016, 0.3543]}, {"w": "problem.", "b": [0.2073, 0.3394, 0.2767, 0.3543]}, {"w": "Let", "b": [0.2848, 0.3394, 0.3111, 0.3543]}, {"w": "the", "b": [0.3169, 0.3394, 0.342, 0.3543]}, {"w": "training", "b": [0.3478, 0.3394, 0.4101, 0.3543]}, {"w": "data", "b": [0.4159, 0.3394, 0.451, 0.3543]}, {"w": "for", "b": [0.4568, 0.3394, 0.4784, 0.3543]}, {"w": "your", "b": [0.4842, 0.3394, 0.5194, 0.3543]}, {"w": "classification", "b": [0.5251, 0.3394, 0.6249, 0.3543]}, {"w": "problem", "b": [0.6306, 0.3394, 0.695, 0.3543]}, {"w": "contain", "b": [0.7007, 0.3394, 0.7585, 0.3543]}, {"w": "800", "b": [0.764, 0.3394, 0.7911, 0.3543]}, {"w": "examples", "b": [0.7968, 0.3394, 0.8688, 0.3543]}, {"w": "of", "b": [0.1312, 0.3573, 0.1464, 0.3723]}, {"w": "the", "b": [0.1528, 0.3573, 0.1789, 0.3723]}, {"w": "positive", "b": [0.1853, 0.3573, 0.2487, 0.3723]}, {"w": "class,", "b": [0.255, 0.3573, 0.2982, 0.3723]}, {"w": "and", "b": [0.3046, 0.3573, 0.3349, 0.3723]}, {"w": "200", "b": [0.3411, 0.3573, 0.3694, 0.3723]}, {"w": "examples", "b": [0.3757, 0.3573, 0.4506, 0.3723]}, {"w": "of", "b": [0.457, 0.3573, 0.4722, 0.3723]}, {"w": "the", "b": [0.4785, 0.3573, 0.5047, 0.3723]}, {"w": "negative", "b": [0.511, 0.3573, 0.579, 0.3723]}, {"w": "class.", "b": [0.5854, 0.3573, 0.6285, 0.3723]}, {"w": "The", "b": [0.6373, 0.3573, 0.6698, 0.3723]}, {"w": "zero", "b": [0.6761, 0.3573, 0.7097, 0.3723]}, {"w": "rule", "b": [0.716, 0.3573, 0.7475, 0.3723]}, {"w": "algorithm", "b": [0.7538, 0.3573, 0.8334, 0.3723]}, {"w": "will", "b": [0.8397, 0.3573, 0.869, 0.3723]}, {"w": "predict", "b": [0.1312, 0.3752, 0.1888, 0.3902]}, {"w": "the", "b": [0.195, 0.3752, 0.2211, 0.3902]}, {"w": "positive", "b": [0.2273, 0.3752, 0.2907, 0.3902]}, {"w": "class", "b": [0.2968, 0.3752, 0.3347, 0.3902]}, {"w": "all", "b": [0.3408, 0.3752, 0.3607, 0.3902]}, {"w": "the", "b": [0.3669, 0.3752, 0.393, 0.3902]}, {"w": "time,", "b": [0.3992, 0.3752, 0.441, 0.3902]}, {"w": "and", "b": [0.4472, 0.3752, 0.4775, 0.3902]}, {"w": "the", "b": [0.4836, 0.3752, 0.5098, 0.3902]}, {"w": "accuracy", "b": [0.5157, 0.3756, 0.5964, 0.3905]}, {"w": "(one", "b": [0.6025, 0.3752, 0.6381, 0.3902]}, {"w": "of", "b": [0.6443, 0.3752, 0.6594, 0.3902]}, {"w": "the", "b": [0.6656, 0.3752, 0.6917, 0.3902]}, {"w": "popular", "b": [0.6979, 0.3752, 0.7612, 0.3902]}, {"w": "performance", "b": [0.7673, 0.3752, 0.8689, 0.3902]}, {"w": "metrics", "b": [0.1312, 0.3932, 0.1891, 0.4082]}, {"w": "that", "b": [0.1952, 0.3932, 0.2286, 0.4082]}, {"w": "we", "b": [0.2348, 0.3932, 0.2555, 0.4082]}, {"w": "will", "b": [0.2617, 0.3932, 0.29, 0.4082]}, {"w": "consider", "b": [0.2962, 0.3932, 0.3611, 0.4082]}, {"w": "in", "b": [0.3673, 0.3932, 0.3825, 0.4082]}, {"w": "Section", "b": [0.3886, 0.3932, 0.4463, 0.4082]}, {"w": "5.5.2)", "b": [0.4525, 0.3932, 0.497, 0.4082]}, {"w": "of", "b": [0.5032, 0.3932, 0.5178, 0.4082]}, {"w": "the", "b": [0.524, 0.3932, 0.5493, 0.4082]}, {"w": "baseline", "b": [0.5555, 0.3932, 0.6183, 0.4082]}, {"w": "will", "b": [0.6245, 0.3932, 0.6528, 0.4082]}, {"w": "be", "b": [0.659, 0.3932, 0.6777, 0.4082]}, {"w": "800/1000", "b": [0.6836, 0.3932, 0.7566, 0.4084]}, {"w": "=", "b": [0.7617, 0.3932, 0.7759, 0.4082]}, {"w": "0.8", "b": [0.781, 0.3932, 0.8043, 0.4084]}, {"w": "or", "b": [0.8105, 0.3932, 0.8267, 0.4082]}, {"w": "80%,", "b": [0.8329, 0.3932, 0.8713, 0.4082]}, {"w": "which", "b": [0.1306, 0.4111, 0.1782, 0.4261]}, {"w": "is", "b": [0.1855, 0.4111, 0.1981, 0.4261]}, {"w": "not", "b": [0.2054, 0.4111, 0.2326, 0.4261]}, {"w": "bad", "b": [0.2399, 0.4111, 0.2702, 0.4261]}, {"w": "for", "b": [0.2775, 0.4111, 0.3, 0.4261]}, {"w": "such", "b": [0.3073, 0.4111, 0.3436, 0.4261]}, {"w": "a", "b": [0.3508, 0.4111, 0.3602, 0.4261]}, {"w": "simple", "b": [0.3675, 0.4111, 0.4199, 0.4261]}, {"w": "classifier.", "b": [0.4272, 0.4111, 0.5018, 0.4261]}, {"w": "Now", "b": [0.5134, 0.4111, 0.55, 0.4261]}, {"w": "you", "b": [0.5573, 0.4111, 0.5866, 0.4261]}, {"w": "know", "b": [0.5938, 0.4111, 0.6367, 0.4261]}, {"w": "that", "b": [0.644, 0.4111, 0.6785, 0.4261]}, {"w": "your", "b": [0.6858, 0.4111, 0.7225, 0.4261]}, {"w": "statistical", "b": [0.7297, 0.4111, 0.8095, 0.4261]}, {"w": "model,", "b": [0.8167, 0.4111, 0.8716, 0.4261]}, {"w": "independently", "b": [0.1312, 0.4291, 0.2446, 0.444]}, {"w": "of", "b": [0.2507, 0.4291, 0.2656, 0.444]}, {"w": "how", "b": [0.2717, 0.4291, 0.304, 0.444]}, {"w": "close", "b": [0.3102, 0.4291, 0.3483, 0.444]}, {"w": "it", "b": [0.3544, 0.4291, 0.3667, 0.444]}, {"w": "is", "b": [0.3728, 0.4291, 0.3853, 0.444]}, {"w": "to", "b": [0.3914, 0.4291, 0.4078, 0.444]}, {"w": "the", "b": [0.414, 0.4291, 0.4396, 0.444]}, {"w": "optimum,", "b": [0.4458, 0.4291, 0.5232, 0.444]}, {"w": "must", "b": [0.5293, 0.4291, 0.5689, 0.444]}, {"w": "have", "b": [0.575, 0.4291, 0.6114, 0.444]}, {"w": "an", "b": [0.6176, 0.4291, 0.6371, 0.444]}, {"w": "accuracy", "b": [0.6432, 0.4291, 0.7135, 0.444]}, {"w": "of", "b": [0.7197, 0.4291, 0.7345, 0.444]}, {"w": "at", "b": [0.7407, 0.4291, 0.7571, 0.444]}, {"w": "least", "b": [0.7632, 0.4291, 0.8003, 0.444]}, {"w": "80%.", "b": [0.8061, 0.4291, 0.8451, 0.444]}]}, {"id": "b_5", "type": "paragraph", "text": "Now, let’s consider the zero rule algorithm for regression. According to the zero rule algorithm, the strategy for regression is to predict the sample average of the target values observed in the training data. This strategy will likely have a lower error rate than random prediction.", "words": [{"w": "Now,", "b": [0.1312, 0.456, 0.1714, 0.471]}, {"w": "let’s", "b": [0.1765, 0.456, 0.2088, 0.471]}, {"w": "consider", "b": [0.2136, 0.456, 0.2781, 0.471]}, {"w": "the", "b": [0.2829, 0.456, 0.308, 0.471]}, {"w": "zero", "b": [0.3128, 0.456, 0.3451, 0.471]}, {"w": "rule", "b": [0.3499, 0.456, 0.3801, 0.471]}, {"w": "algorithm", "b": [0.3849, 0.456, 0.4613, 0.471]}, {"w": "for", "b": [0.4661, 0.456, 0.4878, 0.471]}, {"w": "regression.", "b": [0.4926, 0.456, 0.5753, 0.471]}, {"w": "According", "b": [0.5831, 0.456, 0.6625, 0.471]}, {"w": "to", "b": [0.6673, 0.456, 0.6834, 0.471]}, {"w": "the", "b": [0.6883, 0.456, 0.7134, 0.471]}, {"w": "zero", "b": [0.7182, 0.456, 0.7504, 0.471]}, {"w": "rule", "b": [0.7552, 0.456, 0.7855, 0.471]}, {"w": "algorithm,", "b": [0.7903, 0.456, 0.8717, 0.471]}, {"w": "the", "b": [0.1312, 0.474, 0.157, 0.4889]}, {"w": "strategy", "b": [0.1632, 0.474, 0.2289, 0.4889]}, {"w": "for", "b": [0.235, 0.474, 0.2573, 0.4889]}, {"w": "regression", "b": [0.2634, 0.474, 0.3432, 0.4889]}, {"w": "is", "b": [0.3493, 0.474, 0.3618, 0.4889]}, {"w": "to", "b": [0.368, 0.474, 0.3845, 0.4889]}, {"w": "predict", "b": [0.3907, 0.474, 0.4475, 0.4889]}, {"w": "the", "b": [0.4536, 0.474, 0.4794, 0.4889]}, {"w": "sample", "b": [0.4856, 0.474, 0.5414, 0.4889]}, {"w": "average", "b": [0.5476, 0.474, 0.608, 0.4889]}, {"w": "of", "b": [0.6141, 0.474, 0.6291, 0.4889]}, {"w": "the", "b": [0.6352, 0.474, 0.661, 0.4889]}, {"w": "target", "b": [0.6672, 0.474, 0.7157, 0.4889]}, {"w": "values", "b": [0.7219, 0.474, 0.771, 0.4889]}, {"w": "observed", "b": [0.7772, 0.474, 0.8475, 0.4889]}, {"w": "in", "b": [0.8537, 0.474, 0.8692, 0.4889]}, {"w": "the", "b": [0.1312, 0.4919, 0.1569, 0.5069]}, {"w": "training", "b": [0.163, 0.4919, 0.2267, 0.5069]}, {"w": "data.", "b": [0.2328, 0.4919, 0.2738, 0.5069]}, {"w": "This", "b": [0.282, 0.4919, 0.318, 0.5069]}, {"w": "strategy", "b": [0.3242, 0.4919, 0.3894, 0.5069]}, {"w": "will", "b": [0.3956, 0.4919, 0.4243, 0.5069]}, {"w": "likely", "b": [0.4304, 0.4919, 0.473, 0.5069]}, {"w": "have", "b": [0.4791, 0.4919, 0.5155, 0.5069]}, {"w": "a", "b": [0.5217, 0.4919, 0.5309, 0.5069]}, {"w": "lower", "b": [0.5371, 0.4919, 0.5792, 0.5069]}, {"w": "error", "b": [0.5853, 0.4919, 0.6245, 0.5069]}, {"w": "rate", "b": [0.6306, 0.4919, 0.6624, 0.5069]}, {"w": "than", "b": [0.6686, 0.4919, 0.7055, 0.5069]}, {"w": "random", "b": [0.7116, 0.4919, 0.7732, 0.5069]}, {"w": "prediction.", "b": [0.7794, 0.4919, 0.8656, 0.5069]}]}, {"id": "b_6", "type": "paragraph", "text": "If you work on a standard, so-called classical, prediction problem, you can use a state-of-the-art algorithm found in a popular library such as Python’s scikit-learn. For text classification, for example, represent the text as bag-of-words, and then train a support vector machine model with a linear kernel. Then try to beat that result with your own more advanced approach. This approach would also work well with image classification, machine translation, and other well-studies, so-called benchmark problems.", "words": [{"w": "If", "b": [0.1312, 0.5188, 0.1433, 0.5338]}, {"w": "you", "b": [0.1478, 0.5188, 0.1759, 0.5338]}, {"w": "work", "b": [0.1804, 0.5188, 0.2186, 0.5338]}, {"w": "on", "b": [0.2231, 0.5188, 0.2422, 0.5338]}, {"w": "a", "b": [0.2466, 0.5188, 0.2557, 0.5338]}, {"w": "standard,", "b": [0.2602, 0.5188, 0.3347, 0.5338]}, {"w": "so-called", "b": [0.3395, 0.5188, 0.4069, 0.5338]}, {"w": "classical,", "b": [0.4114, 0.5188, 0.48, 0.5338]}, {"w": "prediction", "b": [0.4848, 0.5188, 0.5642, 0.5338]}, {"w": "problem,", "b": [0.5687, 0.5188, 0.6381, 0.5338]}, {"w": "you", "b": [0.6429, 0.5188, 0.671, 0.5338]}, {"w": "can", "b": [0.6755, 0.5188, 0.7027, 0.5338]}, {"w": "use", "b": [0.7071, 0.5188, 0.7324, 0.5338]}, {"w": "a", "b": [0.7369, 0.5188, 0.7459, 0.5338]}, {"w": "state-of-the-art", "b": [0.7504, 0.5188, 0.8696, 0.5338]}, {"w": "algorithm", "b": [0.1312, 0.5368, 0.2076, 0.5517]}, {"w": "found", "b": [0.2138, 0.5368, 0.2585, 0.5517]}, {"w": "in", "b": [0.2646, 0.5368, 0.2797, 0.5517]}, {"w": "a", "b": [0.2858, 0.5368, 0.2948, 0.5517]}, {"w": "popular", "b": [0.3009, 0.5368, 0.3618, 0.5517]}, {"w": "library", "b": [0.3679, 0.5368, 0.4208, 0.5517]}, {"w": "such", "b": [0.4269, 0.5368, 0.4617, 0.5517]}, {"w": "as", "b": [0.4678, 0.5368, 0.484, 0.5517]}, {"w": "Python’s", "b": [0.4901, 0.5368, 0.5603, 0.5517]}, {"w": "scikit-learn.", "b": [0.5664, 0.5368, 0.6585, 0.5517]}, {"w": "For", "b": [0.6667, 0.5368, 0.6931, 0.5517]}, {"w": "text", "b": [0.6992, 0.5368, 0.7309, 0.5517]}, {"w": "classification,", "b": [0.737, 0.5368, 0.8417, 0.5517]}, {"w": "for", "b": [0.8478, 0.5368, 0.8695, 0.5517]}, {"w": "example,", "b": [0.1312, 0.5547, 0.2025, 0.5697]}, {"w": "represent", "b": [0.2087, 0.5547, 0.2822, 0.5697]}, {"w": "the", "b": [0.2884, 0.5547, 0.314, 0.5697]}, {"w": "text", "b": [0.3202, 0.5547, 0.3525, 0.5697]}, {"w": "as", "b": [0.3586, 0.5547, 0.3752, 0.5697]}, {"w": "bag-of-words,", "b": [0.3812, 0.5547, 0.5045, 0.57]}, {"w": "and", "b": [0.5106, 0.5547, 0.5404, 0.5697]}, {"w": "then", "b": [0.5465, 0.5547, 0.5824, 0.5697]}, {"w": "train", "b": [0.5886, 0.5547, 0.6276, 0.5697]}, {"w": "a", "b": [0.6338, 0.5547, 0.643, 0.5697]}, {"w": "support", "b": [0.6493, 0.555, 0.7212, 0.57]}, {"w": "vector", "b": [0.7283, 0.555, 0.7857, 0.57]}, {"w": "machine", "b": [0.7928, 0.555, 0.8688, 0.57]}, {"w": "model", "b": [0.1312, 0.5727, 0.1809, 0.5876]}, {"w": "with", "b": [0.1876, 0.5727, 0.2242, 0.5876]}, {"w": "a", "b": [0.2308, 0.5727, 0.2402, 0.5876]}, {"w": "linear", "b": [0.247, 0.573, 0.2994, 0.5879]}, {"w": "kernel.", "b": [0.3071, 0.5727, 0.3688, 0.5879]}, {"w": "Then", "b": [0.3785, 0.5727, 0.4214, 0.5876]}, {"w": "try", "b": [0.428, 0.5727, 0.4526, 0.5876]}, {"w": "to", "b": [0.4593, 0.5727, 0.476, 0.5876]}, {"w": "beat", "b": [0.4827, 0.5727, 0.5188, 0.5876]}, {"w": "that", "b": [0.5254, 0.5727, 0.5599, 0.5876]}, {"w": "result", "b": [0.5666, 0.5727, 0.6128, 0.5876]}, {"w": "with", "b": [0.6194, 0.5727, 0.656, 0.5876]}, {"w": "your", "b": [0.6627, 0.5727, 0.6994, 0.5876]}, {"w": "own", "b": [0.706, 0.5727, 0.7389, 0.5876]}, {"w": "more", "b": [0.7456, 0.5727, 0.7864, 0.5876]}, {"w": "advanced", "b": [0.7931, 0.5727, 0.869, 0.5876]}, {"w": "approach.", "b": [0.1312, 0.5906, 0.2081, 0.6056]}, {"w": "This", "b": [0.2163, 0.5906, 0.2516, 0.6056]}, {"w": "approach", "b": [0.2577, 0.5906, 0.3296, 0.6056]}, {"w": "would", "b": [0.3356, 0.5906, 0.3824, 0.6056]}, {"w": "also", "b": [0.3884, 0.5906, 0.4187, 0.6056]}, {"w": "work", "b": [0.4248, 0.5906, 0.463, 0.6056]}, {"w": "well", "b": [0.4691, 0.5906, 0.4997, 0.6056]}, {"w": "with", "b": [0.5058, 0.5906, 0.541, 0.6056]}, {"w": "image", "b": [0.547, 0.5906, 0.5932, 0.6056]}, {"w": "classification,", "b": [0.5993, 0.5906, 0.7041, 0.6056]}, {"w": "machine", "b": [0.7101, 0.5906, 0.7749, 0.6056]}, {"w": "translation,", "b": [0.781, 0.5906, 0.8716, 0.6056]}, {"w": "and", "b": [0.1312, 0.6086, 0.161, 0.6235]}, {"w": "other", "b": [0.1671, 0.6086, 0.2092, 0.6235]}, {"w": "well-studies,", "b": [0.2154, 0.6086, 0.3135, 0.6235]}, {"w": "so-called", "b": [0.3197, 0.6086, 0.3885, 0.6235]}, {"w": "benchmark", "b": [0.3946, 0.6086, 0.4834, 0.6235]}, {"w": "problems.", "b": [0.4895, 0.6086, 0.5676, 0.6235]}]}, {"id": "b_7", "type": "paragraph", "text": "For a general numerical dataset, a linear model such as linear or logistic regression, or k-nearest neighbors, for k = 5, would be a decent baseline. For image classification, a simple convolutional neural network (CNN), with three convolutional layers (32−64−32 units per layer, each convolutional layer followed by a max pooling layer and a dropout layer) and two fully connected layers at the end (one with 128 units, and one with the number of units corresponding to the number of desired outputs) would be a good baseline.", "words": [{"w": "For", "b": [0.1312, 0.6355, 0.1588, 0.6504]}, {"w": "a", "b": [0.167, 0.6355, 0.1764, 0.6504]}, {"w": "general", "b": [0.1846, 0.6355, 0.2432, 0.6504]}, {"w": "numerical", "b": [0.2514, 0.6355, 0.3315, 0.6504]}, {"w": "dataset,", "b": [0.3397, 0.6355, 0.4047, 0.6504]}, {"w": "a", "b": [0.4134, 0.6355, 0.4228, 0.6504]}, {"w": "linear", "b": [0.4311, 0.6355, 0.4771, 0.6504]}, {"w": "model", "b": [0.4854, 0.6355, 0.535, 0.6504]}, {"w": "such", "b": [0.5432, 0.6355, 0.5794, 0.6504]}, {"w": "as", "b": [0.5877, 0.6355, 0.6045, 0.6504]}, {"w": "linear", "b": [0.6127, 0.6355, 0.6588, 0.6504]}, {"w": "or", "b": [0.667, 0.6355, 0.6838, 0.6504]}, {"w": "logistic", "b": [0.692, 0.6355, 0.7497, 0.6504]}, {"w": "regression,", "b": [0.7579, 0.6355, 0.844, 0.6504]}, {"w": "or", "b": [0.8527, 0.6355, 0.8695, 0.6504]}, {"w": "k-nearest", "b": [0.1312, 0.6537, 0.2164, 0.6687]}, {"w": "neighbors,", "b": [0.2244, 0.6534, 0.3189, 0.6687]}, {"w": "for", "b": [0.3261, 0.6534, 0.3486, 0.6684]}, {"w": "k", "b": [0.3556, 0.6537, 0.3652, 0.6687]}, {"w": "=", "b": [0.3722, 0.6534, 0.3868, 0.6684]}, {"w": "5,", "b": [0.3933, 0.6534, 0.4079, 0.6684]}, {"w": "would", "b": [0.4151, 0.6534, 0.4637, 0.6684]}, {"w": "be", "b": [0.4706, 0.6534, 0.49, 0.6684]}, {"w": "a", "b": [0.497, 0.6534, 0.5064, 0.6684]}, {"w": "decent", "b": [0.5133, 0.6534, 0.5661, 0.6684]}, {"w": "baseline.", "b": [0.5731, 0.6534, 0.6433, 0.6684]}, {"w": "For", "b": [0.6539, 0.6534, 0.6814, 0.6684]}, {"w": "image", "b": [0.6884, 0.6534, 0.7365, 0.6684]}, {"w": "classification,", "b": [0.7434, 0.6534, 0.8524, 0.6684]}, {"w": "a", "b": [0.8596, 0.6534, 0.869, 0.6684]}, {"w": "simple", "b": [0.1312, 0.6714, 0.1816, 0.6863]}, {"w": "convolutional", "b": [0.1868, 0.6717, 0.3097, 0.6866]}, {"w": "neural", "b": [0.3157, 0.6717, 0.3739, 0.6866]}, {"w": "network", "b": [0.38, 0.6717, 0.4544, 0.6866]}, {"w": "(CNN),", "b": [0.4597, 0.6714, 0.519, 0.6863]}, {"w": "with", "b": [0.5242, 0.6714, 0.5594, 0.6863]}, {"w": "three", "b": [0.5646, 0.6714, 0.6049, 0.6863]}, {"w": "convolutional", "b": [0.6101, 0.6714, 0.7151, 0.6863]}, {"w": "layers", "b": [0.7203, 0.6714, 0.7652, 0.6863]}, {"w": "(32−64−32", "b": [0.7704, 0.6714, 0.8692, 0.6864]}, {"w": "units", "b": [0.1312, 0.6893, 0.1705, 0.7043]}, {"w": "per", "b": [0.1764, 0.6893, 0.2021, 0.7043]}, {"w": "layer,", "b": [0.2079, 0.6893, 0.2506, 0.7043]}, {"w": "each", "b": [0.2565, 0.6893, 0.2912, 0.7043]}, {"w": "convolutional", "b": [0.297, 0.6893, 0.402, 0.7043]}, {"w": "layer", "b": [0.4078, 0.6893, 0.4456, 0.7043]}, {"w": "followed", "b": [0.4514, 0.6893, 0.5152, 0.7043]}, {"w": "by", "b": [0.521, 0.6893, 0.5401, 0.7043]}, {"w": "a", "b": [0.5459, 0.6893, 0.555, 0.7043]}, {"w": "max", "b": [0.5608, 0.6893, 0.5944, 0.7043]}, {"w": "pooling", "b": [0.6003, 0.6893, 0.6586, 0.7043]}, {"w": "layer", "b": [0.6644, 0.6893, 0.7021, 0.7043]}, {"w": "and", "b": [0.708, 0.6893, 0.7371, 0.7043]}, {"w": "a", "b": [0.7429, 0.6893, 0.752, 0.7043]}, {"w": "dropout", "b": [0.7578, 0.6893, 0.8207, 0.7043]}, {"w": "layer)", "b": [0.8265, 0.6893, 0.8712, 0.7043]}, {"w": "and", "b": [0.1312, 0.7073, 0.1612, 0.7222]}, {"w": "two", "b": [0.1673, 0.7073, 0.1962, 0.7222]}, {"w": "fully", "b": [0.2023, 0.7073, 0.2385, 0.7222]}, {"w": "connected", "b": [0.2446, 0.7073, 0.3251, 0.7222]}, {"w": "layers", "b": [0.3313, 0.7073, 0.3773, 0.7222]}, {"w": "at", "b": [0.3835, 0.7073, 0.4, 0.7222]}, {"w": "the", "b": [0.4061, 0.7073, 0.4319, 0.7222]}, {"w": "end", "b": [0.4381, 0.7073, 0.467, 0.7222]}, {"w": "(one", "b": [0.4731, 0.7073, 0.5082, 0.7222]}, {"w": "with", "b": [0.5144, 0.7073, 0.5505, 0.7222]}, {"w": "128", "b": [0.5564, 0.7073, 0.5842, 0.7222]}, {"w": "units,", "b": [0.5904, 0.7073, 0.6359, 0.7222]}, {"w": "and", "b": [0.6421, 0.7073, 0.672, 0.7222]}, {"w": "one", "b": [0.6781, 0.7073, 0.706, 0.7222]}, {"w": "with", "b": [0.7121, 0.7073, 0.7482, 0.7222]}, {"w": "the", "b": [0.7544, 0.7073, 0.7802, 0.7222]}, {"w": "number", "b": [0.7863, 0.7073, 0.8478, 0.7222]}, {"w": "of", "b": [0.8539, 0.7073, 0.8689, 0.7222]}, {"w": "units", "b": [0.1312, 0.7252, 0.1713, 0.7402]}, {"w": "corresponding", "b": [0.1775, 0.7252, 0.29, 0.7402]}, {"w": "to", "b": [0.2962, 0.7252, 0.3126, 0.7402]}, {"w": "the", "b": [0.3187, 0.7252, 0.3443, 0.7402]}, {"w": "number", "b": [0.3505, 0.7252, 0.4116, 0.7402]}, {"w": "of", "b": [0.4177, 0.7252, 0.4326, 0.7402]}, {"w": "desired", "b": [0.4387, 0.7252, 0.4953, 0.7402]}, {"w": "outputs)", "b": [0.5015, 0.7252, 0.5703, 0.7402]}, {"w": "would", "b": [0.5764, 0.7252, 0.6241, 0.7402]}, {"w": "be", "b": [0.6302, 0.7252, 0.6492, 0.7402]}, {"w": "a", "b": [0.6554, 0.7252, 0.6646, 0.7402]}, {"w": "good", "b": [0.6707, 0.7252, 0.7097, 0.7402]}, {"w": "baseline.", "b": [0.7159, 0.7252, 0.7847, 0.7402]}]}, {"id": "b_8", "type": "paragraph", "text": "You could also use an existing rule-based system, or build your own simple rule-based system. For example, if the problem is to build a model that predicts whether a given website visitor will like a recommended article, a simple rule-based system could work as follows. Take all articles liked by the user, find the top ten words in those articles according to their TF-IDF score, and then predict that the user will like an article if at least five of those ten can be found in the recommended article. Additionally, multiple specialized machine learning", "words": [{"w": "You", "b": [0.1305, 0.7521, 0.1616, 0.7671]}, {"w": "could", "b": [0.1674, 0.7521, 0.2096, 0.7671]}, {"w": "also", "b": [0.2154, 0.7521, 0.2456, 0.7671]}, {"w": "use", "b": [0.2514, 0.7521, 0.2766, 0.7671]}, {"w": "an", "b": [0.2824, 0.7521, 0.3015, 0.7671]}, {"w": "existing", "b": [0.3072, 0.7521, 0.3681, 0.7671]}, {"w": "rule-based", "b": [0.3739, 0.7521, 0.4545, 0.7671]}, {"w": "system,", "b": [0.4602, 0.7521, 0.5192, 0.7671]}, {"w": "or", "b": [0.5251, 0.7521, 0.5412, 0.7671]}, {"w": "build", "b": [0.547, 0.7521, 0.5872, 0.7671]}, {"w": "your", "b": [0.5929, 0.7521, 0.6281, 0.7671]}, {"w": "own", "b": [0.6339, 0.7521, 0.6655, 0.7671]}, {"w": "simple", "b": [0.6713, 0.7521, 0.7216, 0.7671]}, {"w": "rule-based", "b": [0.7274, 0.7521, 0.808, 0.7671]}, {"w": "system.", "b": [0.8137, 0.7521, 0.8727, 0.7671]}, {"w": "For", "b": [0.1312, 0.7701, 0.1577, 0.785]}, {"w": "example,", "b": [0.1638, 0.7701, 0.2338, 0.785]}, {"w": "if", "b": [0.24, 0.7701, 0.2506, 0.785]}, {"w": "the", "b": [0.2567, 0.7701, 0.2819, 0.785]}, {"w": "problem", "b": [0.288, 0.7701, 0.3525, 0.785]}, {"w": "is", "b": [0.3587, 0.7701, 0.3709, 0.785]}, {"w": "to", "b": [0.377, 0.7701, 0.3931, 0.785]}, {"w": "build", "b": [0.3993, 0.7701, 0.4396, 0.785]}, {"w": "a", "b": [0.4457, 0.7701, 0.4548, 0.785]}, {"w": "model", "b": [0.4609, 0.7701, 0.5088, 0.785]}, {"w": "that", "b": [0.5149, 0.7701, 0.5481, 0.785]}, {"w": "predicts", "b": [0.5543, 0.7701, 0.6169, 0.785]}, {"w": "whether", "b": [0.623, 0.7701, 0.6865, 0.785]}, {"w": "a", "b": [0.6927, 0.7701, 0.7017, 0.785]}, {"w": "given", "b": [0.7079, 0.7701, 0.7492, 0.785]}, {"w": "website", "b": [0.7553, 0.7701, 0.8133, 0.785]}, {"w": "visitor", "b": [0.8195, 0.7701, 0.8695, 0.785]}, {"w": "will", "b": [0.1306, 0.788, 0.1595, 0.803]}, {"w": "like", "b": [0.1656, 0.788, 0.1935, 0.803]}, {"w": "a", "b": [0.1997, 0.788, 0.209, 0.803]}, {"w": "recommended", "b": [0.2151, 0.788, 0.3267, 0.803]}, {"w": "article,", "b": [0.3328, 0.788, 0.3887, 0.803]}, {"w": "a", "b": [0.3948, 0.788, 0.4041, 0.803]}, {"w": "simple", "b": [0.4102, 0.788, 0.462, 0.803]}, {"w": "rule-based", "b": [0.4681, 0.788, 0.5509, 0.803]}, {"w": "system", "b": [0.5571, 0.788, 0.6125, 0.803]}, {"w": "could", "b": [0.6187, 0.788, 0.662, 0.803]}, {"w": "work", "b": [0.6682, 0.788, 0.7075, 0.803]}, {"w": "as", "b": [0.7136, 0.788, 0.7302, 0.803]}, {"w": "follows.", "b": [0.7364, 0.788, 0.7964, 0.803]}, {"w": "Take", "b": [0.8046, 0.788, 0.8433, 0.803]}, {"w": "all", "b": [0.8495, 0.788, 0.8691, 0.803]}, {"w": "articles", "b": [0.1312, 0.806, 0.1877, 0.8209]}, {"w": "liked", "b": [0.1937, 0.806, 0.2309, 0.8209]}, {"w": "by", "b": [0.2368, 0.806, 0.2559, 0.8209]}, {"w": "the", "b": [0.2619, 0.806, 0.287, 0.8209]}, {"w": "user,", "b": [0.293, 0.806, 0.3304, 0.8209]}, {"w": "find", "b": [0.3364, 0.806, 0.3666, 0.8209]}, {"w": "the", "b": [0.3726, 0.806, 0.3977, 0.8209]}, {"w": "top", "b": [0.4037, 0.806, 0.4298, 0.8209]}, {"w": "ten", "b": [0.4358, 0.806, 0.4609, 0.8209]}, {"w": "words", "b": [0.4669, 0.806, 0.5128, 0.8209]}, {"w": "in", "b": [0.5188, 0.806, 0.5338, 0.8209]}, {"w": "those", "b": [0.5398, 0.806, 0.5811, 0.8209]}, {"w": "articles", "b": [0.5871, 0.806, 0.6436, 0.8209]}, {"w": "according", "b": [0.6496, 0.806, 0.725, 0.8209]}, {"w": "to", "b": [0.731, 0.806, 0.7471, 0.8209]}, {"w": "their", "b": [0.7531, 0.806, 0.7903, 0.8209]}, {"w": "TF-IDF", "b": [0.7959, 0.8063, 0.8688, 0.8212]}, {"w": "score,", "b": [0.1312, 0.8239, 0.1774, 0.8389]}, {"w": "and", "b": [0.1854, 0.8239, 0.2158, 0.8389]}, {"w": "then", "b": [0.2234, 0.8239, 0.26, 0.8389]}, {"w": "predict", "b": [0.2677, 0.8239, 0.3253, 0.8389]}, {"w": "that", "b": [0.3329, 0.8239, 0.3674, 0.8389]}, {"w": "the", "b": [0.375, 0.8239, 0.4012, 0.8389]}, {"w": "user", "b": [0.4088, 0.8239, 0.4425, 0.8389]}, {"w": "will", "b": [0.4501, 0.8239, 0.4794, 0.8389]}, {"w": "like", "b": [0.487, 0.8239, 0.5153, 0.8389]}, {"w": "an", "b": [0.5229, 0.8239, 0.5428, 0.8389]}, {"w": "article", "b": [0.5504, 0.8239, 0.6017, 0.8389]}, {"w": "if", "b": [0.6094, 0.8239, 0.6204, 0.8389]}, {"w": "at", "b": [0.628, 0.8239, 0.6447, 0.8389]}, {"w": "least", "b": [0.6524, 0.8239, 0.6902, 0.8389]}, {"w": "five", "b": [0.6978, 0.8239, 0.726, 0.8389]}, {"w": "of", "b": [0.7337, 0.8239, 0.7488, 0.8389]}, {"w": "those", "b": [0.7565, 0.8239, 0.7995, 0.8389]}, {"w": "ten", "b": [0.8071, 0.8239, 0.8333, 0.8389]}, {"w": "can", "b": [0.8409, 0.8239, 0.8692, 0.8389]}, {"w": "be", "b": [0.1312, 0.8419, 0.1506, 0.8568]}, {"w": "found", "b": [0.157, 0.8419, 0.2035, 0.8568]}, {"w": "in", "b": [0.2099, 0.8419, 0.2256, 0.8568]}, {"w": "the", "b": [0.232, 0.8419, 0.2582, 0.8568]}, {"w": "recommended", "b": [0.2646, 0.8419, 0.3776, 0.8568]}, {"w": "article.", "b": [0.384, 0.8419, 0.4405, 0.8568]}, {"w": "Additionally,", "b": [0.4495, 0.8419, 0.5552, 0.8568]}, {"w": "multiple", "b": [0.5616, 0.8419, 0.6291, 0.8568]}, {"w": "specialized", "b": [0.6355, 0.8419, 0.7229, 0.8568]}, {"w": "machine", "b": [0.7293, 0.8419, 0.7968, 0.8568]}, {"w": "learning", "b": [0.8032, 0.8419, 0.8692, 0.8568]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "6", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 145, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "libraries and APIs are available online. If they can be used directly, or repurposed to solve your problem, you should definitely consider them as a baseline.", "words": [{"w": "libraries", "b": [0.1312, 0.0881, 0.1966, 0.1031]}, {"w": "and", "b": [0.2027, 0.0881, 0.2327, 0.1031]}, {"w": "APIs", "b": [0.2389, 0.0881, 0.2795, 0.1031]}, {"w": "are", "b": [0.2857, 0.0881, 0.3105, 0.1031]}, {"w": "available", "b": [0.3167, 0.0881, 0.387, 0.1031]}, {"w": "online.", "b": [0.3931, 0.0881, 0.4469, 0.1031]}, {"w": "If", "b": [0.4551, 0.0881, 0.4675, 0.1031]}, {"w": "they", "b": [0.4736, 0.0881, 0.5093, 0.1031]}, {"w": "can", "b": [0.5154, 0.0881, 0.5434, 0.1031]}, {"w": "be", "b": [0.5495, 0.0881, 0.5686, 0.1031]}, {"w": "used", "b": [0.5748, 0.0881, 0.6111, 0.1031]}, {"w": "directly,", "b": [0.6172, 0.0881, 0.6824, 0.1031]}, {"w": "or", "b": [0.6886, 0.0881, 0.7052, 0.1031]}, {"w": "repurposed", "b": [0.7113, 0.0881, 0.8009, 0.1031]}, {"w": "to", "b": [0.8071, 0.0881, 0.8236, 0.1031]}, {"w": "solve", "b": [0.8298, 0.0881, 0.8692, 0.1031]}, {"w": "your", "b": [0.1308, 0.106, 0.1667, 0.121]}, {"w": "problem,", "b": [0.1728, 0.106, 0.2436, 0.121]}, {"w": "you", "b": [0.2498, 0.106, 0.2785, 0.121]}, {"w": "should", "b": [0.2847, 0.106, 0.3371, 0.121]}, {"w": "definitely", "b": [0.3432, 0.106, 0.4176, 0.121]}, {"w": "consider", "b": [0.4237, 0.106, 0.4895, 0.121]}, {"w": "them", "b": [0.4957, 0.106, 0.5367, 0.121]}, {"w": "as", "b": [0.5429, 0.106, 0.5594, 0.121]}, {"w": "a", "b": [0.5655, 0.106, 0.5747, 0.121]}, {"w": "baseline.", "b": [0.5809, 0.106, 0.6497, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "Finding a good human baseline is not always simple. You might use Amazon Mechanical Turk service. Mechanical Turk (MT) is a web-platform where people solve simple tasks for a reward. MT provides an API that you can call to get human predictions. The quality of such predictions can vary from very low to relatively high, depending on the task and the reward. MT is relatively inexpensive, so you can get predictions fast and in large numbers.", "words": [{"w": "Finding", "b": [0.1312, 0.133, 0.194, 0.1479]}, {"w": "a", "b": [0.2001, 0.133, 0.2094, 0.1479]}, {"w": "good", "b": [0.2155, 0.133, 0.2548, 0.1479]}, {"w": "human", "b": [0.2609, 0.133, 0.3161, 0.1479]}, {"w": "baseline", "b": [0.3223, 0.133, 0.3864, 0.1479]}, {"w": "is", "b": [0.3926, 0.133, 0.4051, 0.1479]}, {"w": "not", "b": [0.4112, 0.133, 0.438, 0.1479]}, {"w": "always", "b": [0.4442, 0.133, 0.4975, 0.1479]}, {"w": "simple.", "b": [0.5036, 0.133, 0.5605, 0.1479]}, {"w": "You", "b": [0.5687, 0.133, 0.6007, 0.1479]}, {"w": "might", "b": [0.6068, 0.133, 0.6538, 0.1479]}, {"w": "use", "b": [0.6599, 0.133, 0.6859, 0.1479]}, {"w": "Amazon", "b": [0.692, 0.133, 0.7586, 0.1479]}, {"w": "Mechanical", "b": [0.7646, 0.1333, 0.8688, 0.1482]}, {"w": "Turk", "b": [0.1312, 0.1512, 0.176, 0.1662]}, {"w": "service.", "b": [0.1823, 0.1509, 0.2412, 0.1659]}, {"w": "Mechanical", "b": [0.2494, 0.1509, 0.3393, 0.1659]}, {"w": "Turk", "b": [0.3455, 0.1509, 0.3843, 0.1659]}, {"w": "(MT)", "b": [0.3905, 0.1509, 0.4349, 0.1659]}, {"w": "is", "b": [0.4411, 0.1509, 0.4534, 0.1659]}, {"w": "a", "b": [0.4596, 0.1509, 0.4688, 0.1659]}, {"w": "web-platform", "b": [0.4749, 0.1509, 0.5812, 0.1659]}, {"w": "where", "b": [0.5873, 0.1509, 0.6344, 0.1659]}, {"w": "people", "b": [0.6405, 0.1509, 0.6921, 0.1659]}, {"w": "solve", "b": [0.6983, 0.1509, 0.7372, 0.1659]}, {"w": "simple", "b": [0.7434, 0.1509, 0.7946, 0.1659]}, {"w": "tasks", "b": [0.8007, 0.1509, 0.8413, 0.1659]}, {"w": "for", "b": [0.8474, 0.1509, 0.8695, 0.1659]}, {"w": "a", "b": [0.1312, 0.1689, 0.1406, 0.1838]}, {"w": "reward.", "b": [0.1467, 0.1689, 0.2074, 0.1838]}, {"w": "MT", "b": [0.2156, 0.1689, 0.2462, 0.1838]}, {"w": "provides", "b": [0.2524, 0.1689, 0.3198, 0.1838]}, {"w": "an", "b": [0.326, 0.1689, 0.3457, 0.1838]}, {"w": "API", "b": [0.3519, 0.1689, 0.3852, 0.1838]}, {"w": "that", "b": [0.3914, 0.1689, 0.4256, 0.1838]}, {"w": "you", "b": [0.4317, 0.1689, 0.4608, 0.1838]}, {"w": "can", "b": [0.4669, 0.1689, 0.4949, 0.1838]}, {"w": "call", "b": [0.501, 0.1689, 0.529, 0.1838]}, {"w": "to", "b": [0.5352, 0.1689, 0.5517, 0.1838]}, {"w": "get", "b": [0.5579, 0.1689, 0.5827, 0.1838]}, {"w": "human", "b": [0.5889, 0.1689, 0.6443, 0.1838]}, {"w": "predictions.", "b": [0.6505, 0.1689, 0.7449, 0.1838]}, {"w": "The", "b": [0.7532, 0.1689, 0.7853, 0.1838]}, {"w": "quality", "b": [0.7914, 0.1689, 0.8479, 0.1838]}, {"w": "of", "b": [0.854, 0.1689, 0.8691, 0.1838]}, {"w": "such", "b": [0.1312, 0.1868, 0.1675, 0.2018]}, {"w": "predictions", "b": [0.1736, 0.1868, 0.2638, 0.2018]}, {"w": "can", "b": [0.2699, 0.1868, 0.2982, 0.2018]}, {"w": "vary", "b": [0.3043, 0.1868, 0.3399, 0.2018]}, {"w": "from", "b": [0.3461, 0.1868, 0.3843, 0.2018]}, {"w": "very", "b": [0.3905, 0.1868, 0.4256, 0.2018]}, {"w": "low", "b": [0.4317, 0.1868, 0.4594, 0.2018]}, {"w": "to", "b": [0.4656, 0.1868, 0.4823, 0.2018]}, {"w": "relatively", "b": [0.4885, 0.1868, 0.5644, 0.2018]}, {"w": "high,", "b": [0.5706, 0.1868, 0.6114, 0.2018]}, {"w": "depending", "b": [0.6175, 0.1868, 0.7017, 0.2018]}, {"w": "on", "b": [0.7079, 0.1868, 0.7278, 0.2018]}, {"w": "the", "b": [0.7339, 0.1868, 0.7601, 0.2018]}, {"w": "task", "b": [0.7662, 0.1868, 0.8003, 0.2018]}, {"w": "and", "b": [0.8065, 0.1868, 0.8368, 0.2018]}, {"w": "the", "b": [0.843, 0.1868, 0.8691, 0.2018]}, {"w": "reward.", "b": [0.1312, 0.2048, 0.1913, 0.2197]}, {"w": "MT", "b": [0.1995, 0.2048, 0.2298, 0.2197]}, {"w": "is", "b": [0.2359, 0.2048, 0.2483, 0.2197]}, {"w": "relatively", "b": [0.2545, 0.2048, 0.3289, 0.2197]}, {"w": "inexpensive,", "b": [0.335, 0.2048, 0.4326, 0.2197]}, {"w": "so", "b": [0.4387, 0.2048, 0.4552, 0.2197]}, {"w": "you", "b": [0.4614, 0.2048, 0.4901, 0.2197]}, {"w": "can", "b": [0.4963, 0.2048, 0.5239, 0.2197]}, {"w": "get", "b": [0.5301, 0.2048, 0.5547, 0.2197]}, {"w": "predictions", "b": [0.5609, 0.2048, 0.6492, 0.2197]}, {"w": "fast", "b": [0.6554, 0.2048, 0.6847, 0.2197]}, {"w": "and", "b": [0.6909, 0.2048, 0.7206, 0.2197]}, {"w": "in", "b": [0.7267, 0.2048, 0.7421, 0.2197]}, {"w": "large", "b": [0.7483, 0.2048, 0.7873, 0.2197]}, {"w": "numbers.", "b": [0.7935, 0.2048, 0.8669, 0.2197]}]}, {"id": "b_2", "type": "paragraph", "text": "To increase the quality of the predictions provided by turkers (this is how MT human workers are called), some analysts use an ensemble of turkers. You can ask three or five turkers to label the same example, and then pick the majority class among the labels (or average labels for regression). A more expensive alternative is to ask domain experts (or an ensemble, for even better quality) to label your data.", "words": [{"w": "To", "b": [0.1306, 0.2317, 0.1511, 0.2466]}, {"w": "increase", "b": [0.1567, 0.2317, 0.2191, 0.2466]}, {"w": "the", "b": [0.2247, 0.2317, 0.2498, 0.2466]}, {"w": "quality", "b": [0.2553, 0.2317, 0.3101, 0.2466]}, {"w": "of", "b": [0.3156, 0.2317, 0.3302, 0.2466]}, {"w": "the", "b": [0.3357, 0.2317, 0.3608, 0.2466]}, {"w": "predictions", "b": [0.3664, 0.2317, 0.453, 0.2466]}, {"w": "provided", "b": [0.4585, 0.2317, 0.5269, 0.2466]}, {"w": "by", "b": [0.5324, 0.2317, 0.5515, 0.2466]}, {"w": "turkers", "b": [0.557, 0.2317, 0.6125, 0.2466]}, {"w": "(this", "b": [0.618, 0.2317, 0.6543, 0.2466]}, {"w": "is", "b": [0.6599, 0.2317, 0.672, 0.2466]}, {"w": "how", "b": [0.6776, 0.2317, 0.7092, 0.2466]}, {"w": "MT", "b": [0.7147, 0.2317, 0.7444, 0.2466]}, {"w": "human", "b": [0.7499, 0.2317, 0.8036, 0.2466]}, {"w": "workers", "b": [0.8092, 0.2317, 0.8691, 0.2466]}, {"w": "are", "b": [0.1312, 0.2496, 0.1554, 0.2646]}, {"w": "called),", "b": [0.1612, 0.2496, 0.2185, 0.2646]}, {"w": "some", "b": [0.2244, 0.2496, 0.2637, 0.2646]}, {"w": "analysts", "b": [0.2695, 0.2496, 0.3335, 0.2646]}, {"w": "use", "b": [0.3393, 0.2496, 0.3646, 0.2646]}, {"w": "an", "b": [0.3704, 0.2496, 0.3895, 0.2646]}, {"w": "ensemble", "b": [0.3953, 0.2499, 0.4794, 0.2649]}, {"w": "of", "b": [0.4861, 0.2499, 0.5032, 0.2649]}, {"w": "turkers.", "b": [0.5098, 0.2496, 0.5811, 0.2649]}, {"w": "You", "b": [0.5892, 0.2496, 0.6203, 0.2646]}, {"w": "can", "b": [0.6261, 0.2496, 0.6532, 0.2646]}, {"w": "ask", "b": [0.659, 0.2496, 0.6848, 0.2646]}, {"w": "three", "b": [0.6906, 0.2496, 0.7308, 0.2646]}, {"w": "or", "b": [0.7367, 0.2496, 0.7528, 0.2646]}, {"w": "five", "b": [0.7586, 0.2496, 0.7857, 0.2646]}, {"w": "turkers", "b": [0.7915, 0.2496, 0.847, 0.2646]}, {"w": "to", "b": [0.8528, 0.2496, 0.8689, 0.2646]}, {"w": "label", "b": [0.1312, 0.2676, 0.1689, 0.2825]}, {"w": "the", "b": [0.175, 0.2676, 0.2002, 0.2825]}, {"w": "same", "b": [0.2063, 0.2676, 0.2456, 0.2825]}, {"w": "example,", "b": [0.2516, 0.2676, 0.3215, 0.2825]}, {"w": "and", "b": [0.3276, 0.2676, 0.3567, 0.2825]}, {"w": "then", "b": [0.3628, 0.2676, 0.398, 0.2825]}, {"w": "pick", "b": [0.4041, 0.2676, 0.4363, 0.2825]}, {"w": "the", "b": [0.4424, 0.2676, 0.4675, 0.2825]}, {"w": "majority", "b": [0.4736, 0.2676, 0.541, 0.2825]}, {"w": "class", "b": [0.5471, 0.2676, 0.5835, 0.2825]}, {"w": "among", "b": [0.5896, 0.2676, 0.6418, 0.2825]}, {"w": "the", "b": [0.6479, 0.2676, 0.673, 0.2825]}, {"w": "labels", "b": [0.6791, 0.2676, 0.724, 0.2825]}, {"w": "(or", "b": [0.7301, 0.2676, 0.7532, 0.2825]}, {"w": "average", "b": [0.7593, 0.2676, 0.8182, 0.2825]}, {"w": "labels", "b": [0.8243, 0.2676, 0.8691, 0.2825]}, {"w": "for", "b": [0.1312, 0.2855, 0.1534, 0.3005]}, {"w": "regression).", "b": [0.1596, 0.2855, 0.2517, 0.3005]}, {"w": "A", "b": [0.2599, 0.2855, 0.2738, 0.3005]}, {"w": "more", "b": [0.28, 0.2855, 0.3202, 0.3005]}, {"w": "expensive", "b": [0.3263, 0.2855, 0.4038, 0.3005]}, {"w": "alternative", "b": [0.4099, 0.2855, 0.4966, 0.3005]}, {"w": "is", "b": [0.5027, 0.2855, 0.5152, 0.3005]}, {"w": "to", "b": [0.5214, 0.2855, 0.5378, 0.3005]}, {"w": "ask", "b": [0.544, 0.2855, 0.5704, 0.3005]}, {"w": "domain", "b": [0.5765, 0.2855, 0.6363, 0.3005]}, {"w": "experts", "b": [0.6425, 0.2855, 0.7014, 0.3005]}, {"w": "(or", "b": [0.7075, 0.2855, 0.7313, 0.3005]}, {"w": "an", "b": [0.7374, 0.2855, 0.757, 0.3005]}, {"w": "ensemble,", "b": [0.7632, 0.2855, 0.8411, 0.3005]}, {"w": "for", "b": [0.8473, 0.2855, 0.8695, 0.3005]}, {"w": "even", "b": [0.1312, 0.3035, 0.1671, 0.3184]}, {"w": "better", "b": [0.1733, 0.3035, 0.2221, 0.3184]}, {"w": "quality)", "b": [0.2282, 0.3035, 0.2913, 0.3184]}, {"w": "to", "b": [0.2974, 0.3035, 0.3138, 0.3184]}, {"w": "label", "b": [0.32, 0.3035, 0.3584, 0.3184]}, {"w": "your", "b": [0.3646, 0.3035, 0.4005, 0.3184]}, {"w": "data.", "b": [0.4067, 0.3035, 0.4477, 0.3184]}]}, {"id": "b_3", "type": "paragraph", "text": "5.1.5 Split Data Into Three Sets", "words": [{"w": "5.1.5", "b": [0.1312, 0.3516, 0.1749, 0.3666]}, {"w": "Split", "b": [0.1961, 0.3516, 0.2397, 0.3666]}, {"w": "Data", "b": [0.2468, 0.3516, 0.2919, 0.3666]}, {"w": "Into", "b": [0.299, 0.3516, 0.3371, 0.3666]}, {"w": "Three", "b": [0.3442, 0.3516, 0.3989, 0.3666]}, {"w": "Sets", "b": [0.406, 0.3516, 0.4441, 0.3666]}]}, {"id": "b_4", "type": "paragraph", "text": "Recall that three sets are generally needed to build a solid model. The first, the training set, is used to train the model. It is the data the machine learning algorithm “sees.” The second and third are the holdout sets. The validation set is not seen by the machine learning algorithm. The data analyst uses it to estimate the performance of different machine learning algorithms (or the same algorithm configured with different values of hyperparameters) or models when applied to new data. The remaining test set, which is also not seen by the learning algorithm, is used at the end of the project to evaluate and report the performance of the model the best performing on the validation data.", "words": [{"w": "Recall", "b": [0.1312, 0.3879, 0.1797, 0.4028]}, {"w": "that", "b": [0.185, 0.3879, 0.2182, 0.4028]}, {"w": "three", "b": [0.2235, 0.3879, 0.2637, 0.4028]}, {"w": "sets", "b": [0.269, 0.3879, 0.2984, 0.4028]}, {"w": "are", "b": [0.3036, 0.3879, 0.3278, 0.4028]}, {"w": "generally", "b": [0.3331, 0.3879, 0.404, 0.4028]}, {"w": "needed", "b": [0.4093, 0.3879, 0.4636, 0.4028]}, {"w": "to", "b": [0.4689, 0.3879, 0.4849, 0.4028]}, {"w": "build", "b": [0.4902, 0.3879, 0.5304, 0.4028]}, {"w": "a", "b": [0.5357, 0.3879, 0.5448, 0.4028]}, {"w": "solid", "b": [0.55, 0.3879, 0.5863, 0.4028]}, {"w": "model.", "b": [0.5916, 0.3879, 0.6444, 0.4028]}, {"w": "The", "b": [0.6523, 0.3879, 0.6834, 0.4028]}, {"w": "first,", "b": [0.6887, 0.3879, 0.7251, 0.4028]}, {"w": "the", "b": [0.7305, 0.3879, 0.7557, 0.4028]}, {"w": "training", "b": [0.7606, 0.3882, 0.8339, 0.4031]}, {"w": "set,", "b": [0.84, 0.3879, 0.8713, 0.4031]}, {"w": "is", "b": [0.1312, 0.4058, 0.1435, 0.4208]}, {"w": "used", "b": [0.1497, 0.4058, 0.1853, 0.4208]}, {"w": "to", "b": [0.1915, 0.4058, 0.2077, 0.4208]}, {"w": "train", "b": [0.2139, 0.4058, 0.2525, 0.4208]}, {"w": "the", "b": [0.2587, 0.4058, 0.2841, 0.4208]}, {"w": "model.", "b": [0.2902, 0.4058, 0.3435, 0.4208]}, {"w": "It", "b": [0.3517, 0.4058, 0.3654, 0.4208]}, {"w": "is", "b": [0.3716, 0.4058, 0.3839, 0.4208]}, {"w": "the", "b": [0.39, 0.4058, 0.4154, 0.4208]}, {"w": "data", "b": [0.4216, 0.4058, 0.4571, 0.4208]}, {"w": "the", "b": [0.4632, 0.4058, 0.4886, 0.4208]}, {"w": "machine", "b": [0.4948, 0.4058, 0.5603, 0.4208]}, {"w": "learning", "b": [0.5664, 0.4058, 0.6304, 0.4208]}, {"w": "algorithm", "b": [0.6366, 0.4058, 0.7138, 0.4208]}, {"w": "“sees.”", "b": [0.7199, 0.4058, 0.7704, 0.4208]}, {"w": "The", "b": [0.7786, 0.4058, 0.81, 0.4208]}, {"w": "second", "b": [0.8162, 0.4058, 0.8691, 0.4208]}, {"w": "and", "b": [0.1312, 0.4238, 0.1616, 0.4387]}, {"w": "third", "b": [0.1688, 0.4238, 0.2096, 0.4387]}, {"w": "are", "b": [0.2168, 0.4238, 0.242, 0.4387]}, {"w": "the", "b": [0.2492, 0.4238, 0.2753, 0.4387]}, {"w": "holdout", "b": [0.2826, 0.4238, 0.3453, 0.4387]}, {"w": "sets.", "b": [0.3525, 0.4238, 0.3883, 0.4387]}, {"w": "The", "b": [0.3997, 0.4238, 0.4321, 0.4387]}, {"w": "validation", "b": [0.4391, 0.4241, 0.5299, 0.439]}, {"w": "set", "b": [0.5382, 0.4241, 0.5646, 0.439]}, {"w": "is", "b": [0.5717, 0.4238, 0.5844, 0.4387]}, {"w": "not", "b": [0.5916, 0.4238, 0.6188, 0.4387]}, {"w": "seen", "b": [0.626, 0.4238, 0.6606, 0.4387]}, {"w": "by", "b": [0.6678, 0.4238, 0.6877, 0.4387]}, {"w": "the", "b": [0.6949, 0.4238, 0.7211, 0.4387]}, {"w": "machine", "b": [0.7283, 0.4238, 0.7958, 0.4387]}, {"w": "learning", "b": [0.803, 0.4238, 0.8689, 0.4387]}, {"w": "algorithm.", "b": [0.1312, 0.4417, 0.2127, 0.4567]}, {"w": "The", "b": [0.2207, 0.4417, 0.2518, 0.4567]}, {"w": "data", "b": [0.2575, 0.4417, 0.2926, 0.4567]}, {"w": "analyst", "b": [0.2982, 0.4417, 0.3551, 0.4567]}, {"w": "uses", "b": [0.3607, 0.4417, 0.3931, 0.4567]}, {"w": "it", "b": [0.3987, 0.4417, 0.4108, 0.4567]}, {"w": "to", "b": [0.4164, 0.4417, 0.4325, 0.4567]}, {"w": "estimate", "b": [0.4381, 0.4417, 0.5045, 0.4567]}, {"w": "the", "b": [0.5101, 0.4417, 0.5353, 0.4567]}, {"w": "performance", "b": [0.5409, 0.4417, 0.6385, 0.4567]}, {"w": "of", "b": [0.6441, 0.4417, 0.6587, 0.4567]}, {"w": "different", "b": [0.6643, 0.4417, 0.7297, 0.4567]}, {"w": "machine", "b": [0.7353, 0.4417, 0.8001, 0.4567]}, {"w": "learning", "b": [0.8057, 0.4417, 0.8691, 0.4567]}, {"w": "algorithms", "b": [0.1312, 0.4597, 0.2178, 0.4746]}, {"w": "(or", "b": [0.2239, 0.4597, 0.2479, 0.4746]}, {"w": "the", "b": [0.254, 0.4597, 0.2801, 0.4746]}, {"w": "same", "b": [0.2862, 0.4597, 0.3269, 0.4746]}, {"w": "algorithm", "b": [0.333, 0.4597, 0.4122, 0.4746]}, {"w": "configured", "b": [0.4183, 0.4597, 0.5027, 0.4746]}, {"w": "with", "b": [0.5088, 0.4597, 0.5452, 0.4746]}, {"w": "different", "b": [0.5514, 0.4597, 0.6191, 0.4746]}, {"w": "values", "b": [0.6252, 0.4597, 0.6748, 0.4746]}, {"w": "of", "b": [0.681, 0.4597, 0.696, 0.4746]}, {"w": "hyperparameters)", "b": [0.7022, 0.4597, 0.8466, 0.4746]}, {"w": "or", "b": [0.8527, 0.4597, 0.8694, 0.4746]}, {"w": "models", "b": [0.1312, 0.4776, 0.1883, 0.4926]}, {"w": "when", "b": [0.1948, 0.4776, 0.2377, 0.4926]}, {"w": "applied", "b": [0.2441, 0.4776, 0.3038, 0.4926]}, {"w": "to", "b": [0.3102, 0.4776, 0.327, 0.4926]}, {"w": "new", "b": [0.3334, 0.4776, 0.3659, 0.4926]}, {"w": "data.", "b": [0.3723, 0.4776, 0.4141, 0.4926]}, {"w": "The", "b": [0.4233, 0.4776, 0.4557, 0.4926]}, {"w": "remaining", "b": [0.4622, 0.4776, 0.5438, 0.4926]}, {"w": "test", "b": [0.5503, 0.4779, 0.5849, 0.4929]}, {"w": "set,", "b": [0.5924, 0.4776, 0.6239, 0.4929]}, {"w": "which", "b": [0.6305, 0.4776, 0.6781, 0.4926]}, {"w": "is", "b": [0.6846, 0.4776, 0.6972, 0.4926]}, {"w": "also", "b": [0.7037, 0.4776, 0.7352, 0.4926]}, {"w": "not", "b": [0.7416, 0.4776, 0.7688, 0.4926]}, {"w": "seen", "b": [0.7753, 0.4776, 0.8099, 0.4926]}, {"w": "by", "b": [0.8164, 0.4776, 0.8363, 0.4926]}, {"w": "the", "b": [0.8427, 0.4776, 0.8689, 0.4926]}, {"w": "learning", "b": [0.1312, 0.4956, 0.1953, 0.5105]}, {"w": "algorithm,", "b": [0.2015, 0.4956, 0.2838, 0.5105]}, {"w": "is", "b": [0.29, 0.4956, 0.3023, 0.5105]}, {"w": "used", "b": [0.3085, 0.4956, 0.3441, 0.5105]}, {"w": "at", "b": [0.3503, 0.4956, 0.3666, 0.5105]}, {"w": "the", "b": [0.3727, 0.4956, 0.3981, 0.5105]}, {"w": "end", "b": [0.4043, 0.4956, 0.4328, 0.5105]}, {"w": "of", "b": [0.4389, 0.4956, 0.4537, 0.5105]}, {"w": "the", "b": [0.4598, 0.4956, 0.4853, 0.5105]}, {"w": "project", "b": [0.4914, 0.4956, 0.5474, 0.5105]}, {"w": "to", "b": [0.5535, 0.4956, 0.5698, 0.5105]}, {"w": "evaluate", "b": [0.576, 0.4956, 0.6415, 0.5105]}, {"w": "and", "b": [0.6477, 0.4956, 0.6771, 0.5105]}, {"w": "report", "b": [0.6833, 0.4956, 0.7327, 0.5105]}, {"w": "the", "b": [0.7389, 0.4956, 0.7643, 0.5105]}, {"w": "performance", "b": [0.7705, 0.4956, 0.8691, 0.5105]}, {"w": "of", "b": [0.1312, 0.5135, 0.1461, 0.5285]}, {"w": "the", "b": [0.1522, 0.5135, 0.1779, 0.5285]}, {"w": "model", "b": [0.1841, 0.5135, 0.2327, 0.5285]}, {"w": "the", "b": [0.2389, 0.5135, 0.2645, 0.5285]}, {"w": "best", "b": [0.2707, 0.5135, 0.3041, 0.5285]}, {"w": "performing", "b": [0.3103, 0.5135, 0.3986, 0.5285]}, {"w": "on", "b": [0.4047, 0.5135, 0.4242, 0.5285]}, {"w": "the", "b": [0.4304, 0.5135, 0.456, 0.5285]}, {"w": "validation", "b": [0.4621, 0.5135, 0.5416, 0.5285]}, {"w": "data.", "b": [0.5478, 0.5135, 0.5888, 0.5285]}]}, {"id": "b_5", "type": "paragraph", "text": "The process of splitting the entire dataset into three sets is described in Section ?? of Chapter 3. Here, I only reiterate the two most important properties of that process:", "words": [{"w": "The", "b": [0.1306, 0.5404, 0.163, 0.5554]}, {"w": "process", "b": [0.1714, 0.5404, 0.2308, 0.5554]}, {"w": "of", "b": [0.2392, 0.5404, 0.2544, 0.5554]}, {"w": "splitting", "b": [0.2628, 0.5404, 0.3309, 0.5554]}, {"w": "the", "b": [0.3393, 0.5404, 0.3655, 0.5554]}, {"w": "entire", "b": [0.3739, 0.5404, 0.4206, 0.5554]}, {"w": "dataset", "b": [0.429, 0.5404, 0.4887, 0.5554]}, {"w": "into", "b": [0.4971, 0.5404, 0.529, 0.5554]}, {"w": "three", "b": [0.5375, 0.5404, 0.5794, 0.5554]}, {"w": "sets", "b": [0.5878, 0.5404, 0.6184, 0.5554]}, {"w": "is", "b": [0.6268, 0.5404, 0.6395, 0.5554]}, {"w": "described", "b": [0.6479, 0.5404, 0.7249, 0.5554]}, {"w": "in", "b": [0.7334, 0.5404, 0.7491, 0.5554]}, {"w": "Section", "b": [0.7575, 0.5404, 0.8171, 0.5554]}, {"w": "??", "b": [0.8251, 0.5407, 0.8452, 0.5557]}, {"w": "of", "b": [0.8536, 0.5404, 0.8688, 0.5554]}, {"w": "Chapter", "b": [0.1312, 0.5584, 0.1969, 0.5733]}, {"w": "3.", "b": [0.203, 0.5584, 0.2174, 0.5733]}, {"w": "Here,", "b": [0.2256, 0.5584, 0.2682, 0.5733]}, {"w": "I", "b": [0.2744, 0.5584, 0.281, 0.5733]}, {"w": "only", "b": [0.2872, 0.5584, 0.3215, 0.5733]}, {"w": "reiterate", "b": [0.3277, 0.5584, 0.3955, 0.5733]}, {"w": "the", "b": [0.4016, 0.5584, 0.4272, 0.5733]}, {"w": "two", "b": [0.4334, 0.5584, 0.4621, 0.5733]}, {"w": "most", "b": [0.4682, 0.5584, 0.5073, 0.5733]}, {"w": "important", "b": [0.5135, 0.5584, 0.5945, 0.5733]}, {"w": "properties", "b": [0.6007, 0.5584, 0.6814, 0.5733]}, {"w": "of", "b": [0.6875, 0.5584, 0.7024, 0.5733]}, {"w": "that", "b": [0.7085, 0.5584, 0.7424, 0.5733]}, {"w": "process:", "b": [0.7485, 0.5584, 0.8119, 0.5733]}]}, {"id": "b_6", "type": "paragraph", "text": "1. Validation and test sets must come from the same statistical distribution. That is, their properties have to be maximally similar, but the examples belonging to the two sets must be, obviously and ideally, different and obtained independently of one another.", "words": [{"w": "1.", "b": [0.1538, 0.5853, 0.1681, 0.6003]}, {"w": "Validation", "b": [0.1774, 0.5853, 0.2587, 0.6003]}, {"w": "and", "b": [0.2643, 0.5853, 0.2934, 0.6003]}, {"w": "test", "b": [0.299, 0.5853, 0.3283, 0.6003]}, {"w": "sets", "b": [0.3338, 0.5853, 0.3632, 0.6003]}, {"w": "must", "b": [0.3688, 0.5853, 0.4075, 0.6003]}, {"w": "come", "b": [0.4131, 0.5853, 0.4533, 0.6003]}, {"w": "from", "b": [0.4589, 0.5853, 0.4956, 0.6003]}, {"w": "the", "b": [0.5012, 0.5853, 0.5263, 0.6003]}, {"w": "same", "b": [0.5319, 0.5853, 0.5712, 0.6003]}, {"w": "statistical", "b": [0.5768, 0.5853, 0.6533, 0.6003]}, {"w": "distribution.", "b": [0.6589, 0.5853, 0.7566, 0.6003]}, {"w": "That", "b": [0.7646, 0.5853, 0.8037, 0.6003]}, {"w": "is,", "b": [0.8093, 0.5853, 0.8265, 0.6003]}, {"w": "their", "b": [0.8322, 0.5853, 0.8695, 0.6003]}, {"w": "properties", "b": [0.1774, 0.6032, 0.2595, 0.6182]}, {"w": "have", "b": [0.2657, 0.6032, 0.3027, 0.6182]}, {"w": "to", "b": [0.3089, 0.6032, 0.3256, 0.6182]}, {"w": "be", "b": [0.3317, 0.6032, 0.351, 0.6182]}, {"w": "maximally", "b": [0.3572, 0.6032, 0.4427, 0.6182]}, {"w": "similar,", "b": [0.4489, 0.6032, 0.5096, 0.6182]}, {"w": "but", "b": [0.5157, 0.6032, 0.5439, 0.6182]}, {"w": "the", "b": [0.55, 0.6032, 0.5761, 0.6182]}, {"w": "examples", "b": [0.5823, 0.6032, 0.657, 0.6182]}, {"w": "belonging", "b": [0.6632, 0.6032, 0.742, 0.6182]}, {"w": "to", "b": [0.7481, 0.6032, 0.7648, 0.6182]}, {"w": "the", "b": [0.7709, 0.6032, 0.797, 0.6182]}, {"w": "two", "b": [0.8032, 0.6032, 0.8324, 0.6182]}, {"w": "sets", "b": [0.8386, 0.6032, 0.8691, 0.6182]}, {"w": "must", "b": [0.1774, 0.6212, 0.2169, 0.6362]}, {"w": "be,", "b": [0.2231, 0.6212, 0.2472, 0.6362]}, {"w": "obviously", "b": [0.2533, 0.6212, 0.3288, 0.6362]}, {"w": "and", "b": [0.335, 0.6212, 0.3647, 0.6362]}, {"w": "ideally,", "b": [0.3709, 0.6212, 0.4273, 0.6362]}, {"w": "different", "b": [0.4334, 0.6212, 0.5001, 0.6362]}, {"w": "and", "b": [0.5063, 0.6212, 0.536, 0.6362]}, {"w": "obtained", "b": [0.5422, 0.6212, 0.6119, 0.6362]}, {"w": "independently", "b": [0.6181, 0.6212, 0.7314, 0.6362]}, {"w": "of", "b": [0.7375, 0.6212, 0.7524, 0.6362]}, {"w": "one", "b": [0.7586, 0.6212, 0.7863, 0.6362]}, {"w": "another.", "b": [0.7924, 0.6212, 0.8591, 0.6362]}]}, {"id": "b_7", "type": "paragraph", "text": "2. Draw validation and test data from a distribution that looks much like the data you expect to observe once the model is deployed in production. It can be different from the distribution of the training data.", "words": [{"w": "2.", "b": [0.1538, 0.6481, 0.1681, 0.6631]}, {"w": "Draw", "b": [0.1774, 0.6481, 0.2215, 0.6631]}, {"w": "validation", "b": [0.2276, 0.6481, 0.3084, 0.6631]}, {"w": "and", "b": [0.3146, 0.6481, 0.3448, 0.6631]}, {"w": "test", "b": [0.351, 0.6481, 0.3813, 0.6631]}, {"w": "data", "b": [0.3875, 0.6481, 0.424, 0.6631]}, {"w": "from", "b": [0.4301, 0.6481, 0.4682, 0.6631]}, {"w": "a", "b": [0.4744, 0.6481, 0.4838, 0.6631]}, {"w": "distribution", "b": [0.4899, 0.6481, 0.586, 0.6631]}, {"w": "that", "b": [0.5922, 0.6481, 0.6266, 0.6631]}, {"w": "looks", "b": [0.6327, 0.6481, 0.6745, 0.6631]}, {"w": "much", "b": [0.6807, 0.6481, 0.7245, 0.6631]}, {"w": "like", "b": [0.7306, 0.6481, 0.7588, 0.6631]}, {"w": "the", "b": [0.765, 0.6481, 0.791, 0.6631]}, {"w": "data", "b": [0.7972, 0.6481, 0.8337, 0.6631]}, {"w": "you", "b": [0.8398, 0.6481, 0.869, 0.6631]}, {"w": "expect", "b": [0.1774, 0.6661, 0.2305, 0.681]}, {"w": "to", "b": [0.2366, 0.6661, 0.2533, 0.681]}, {"w": "observe", "b": [0.2594, 0.6661, 0.3201, 0.681]}, {"w": "once", "b": [0.3262, 0.6661, 0.3627, 0.681]}, {"w": "the", "b": [0.3688, 0.6661, 0.3949, 0.681]}, {"w": "model", "b": [0.401, 0.6661, 0.4505, 0.681]}, {"w": "is", "b": [0.4566, 0.6661, 0.4692, 0.681]}, {"w": "deployed", "b": [0.4754, 0.6661, 0.5468, 0.681]}, {"w": "in", "b": [0.5529, 0.6661, 0.5686, 0.681]}, {"w": "production.", "b": [0.5747, 0.6661, 0.669, 0.681]}, {"w": "It", "b": [0.6772, 0.6661, 0.6913, 0.681]}, {"w": "can", "b": [0.6974, 0.6661, 0.7256, 0.681]}, {"w": "be", "b": [0.7317, 0.6661, 0.751, 0.681]}, {"w": "different", "b": [0.7571, 0.6661, 0.8249, 0.681]}, {"w": "from", "b": [0.8311, 0.6661, 0.8691, 0.681]}, {"w": "the", "b": [0.1774, 0.684, 0.203, 0.699]}, {"w": "distribution", "b": [0.2091, 0.684, 0.3037, 0.699]}, {"w": "of", "b": [0.3098, 0.684, 0.3247, 0.699]}, {"w": "the", "b": [0.3308, 0.684, 0.3565, 0.699]}, {"w": "training", "b": [0.3626, 0.684, 0.4263, 0.699]}, {"w": "data.", "b": [0.4324, 0.684, 0.4734, 0.699]}]}, {"id": "b_8", "type": "paragraph", "text": "A couple of words about the latter point. Most of the time, the analyst simply shuffles the entire dataset, and then randomly fills the three sets from this shuffled data. In practice, however, it’s common to have many examples that do not look like the production data. Sometimes, these examples are abundant and/or inexpensive. Using this data in the project may result in distribution shift, and the analyst may or may not be aware of it.", "words": [{"w": "A", "b": [0.1305, 0.7109, 0.1445, 0.7259]}, {"w": "couple", "b": [0.1506, 0.7109, 0.2023, 0.7259]}, {"w": "of", "b": [0.2085, 0.7109, 0.2235, 0.7259]}, {"w": "words", "b": [0.2296, 0.7109, 0.2768, 0.7259]}, {"w": "about", "b": [0.283, 0.7109, 0.33, 0.7259]}, {"w": "the", "b": [0.3362, 0.7109, 0.362, 0.7259]}, {"w": "latter", "b": [0.3682, 0.7109, 0.4126, 0.7259]}, {"w": "point.", "b": [0.4188, 0.7109, 0.4664, 0.7259]}, {"w": "Most", "b": [0.4746, 0.7109, 0.5155, 0.7259]}, {"w": "of", "b": [0.5217, 0.7109, 0.5367, 0.7259]}, {"w": "the", "b": [0.5428, 0.7109, 0.5687, 0.7259]}, {"w": "time,", "b": [0.5748, 0.7109, 0.6162, 0.7259]}, {"w": "the", "b": [0.6223, 0.7109, 0.6482, 0.7259]}, {"w": "analyst", "b": [0.6543, 0.7109, 0.7128, 0.7259]}, {"w": "simply", "b": [0.719, 0.7109, 0.7723, 0.7259]}, {"w": "shuffles", "b": [0.7785, 0.7109, 0.8371, 0.7259]}, {"w": "the", "b": [0.8432, 0.7109, 0.8691, 0.7259]}, {"w": "entire", "b": [0.1312, 0.7289, 0.1779, 0.7438]}, {"w": "dataset,", "b": [0.1845, 0.7289, 0.2495, 0.7438]}, {"w": "and", "b": [0.2563, 0.7289, 0.2866, 0.7438]}, {"w": "then", "b": [0.2933, 0.7289, 0.3299, 0.7438]}, {"w": "randomly", "b": [0.3366, 0.7289, 0.4146, 0.7438]}, {"w": "fills", "b": [0.4213, 0.7289, 0.4496, 0.7438]}, {"w": "the", "b": [0.4563, 0.7289, 0.4825, 0.7438]}, {"w": "three", "b": [0.4891, 0.7289, 0.531, 0.7438]}, {"w": "sets", "b": [0.5377, 0.7289, 0.5683, 0.7438]}, {"w": "from", "b": [0.5749, 0.7289, 0.6132, 0.7438]}, {"w": "this", "b": [0.6198, 0.7289, 0.6503, 0.7438]}, {"w": "shuffled", "b": [0.657, 0.7289, 0.7193, 0.7438]}, {"w": "data.", "b": [0.726, 0.7289, 0.7678, 0.7438]}, {"w": "In", "b": [0.7776, 0.7289, 0.7949, 0.7438]}, {"w": "practice,", "b": [0.8016, 0.7289, 0.8717, 0.7438]}, {"w": "however,", "b": [0.1312, 0.7468, 0.2024, 0.7618]}, {"w": "it’s", "b": [0.2099, 0.7468, 0.2351, 0.7618]}, {"w": "common", "b": [0.2422, 0.7468, 0.3112, 0.7618]}, {"w": "to", "b": [0.3184, 0.7468, 0.3351, 0.7618]}, {"w": "have", "b": [0.3423, 0.7468, 0.3794, 0.7618]}, {"w": "many", "b": [0.3866, 0.7468, 0.4315, 0.7618]}, {"w": "examples", "b": [0.4387, 0.7468, 0.5136, 0.7618]}, {"w": "that", "b": [0.5207, 0.7468, 0.5552, 0.7618]}, {"w": "do", "b": [0.5624, 0.7468, 0.5823, 0.7618]}, {"w": "not", "b": [0.5894, 0.7468, 0.6166, 0.7618]}, {"w": "look", "b": [0.6238, 0.7468, 0.6583, 0.7618]}, {"w": "like", "b": [0.6654, 0.7468, 0.6937, 0.7618]}, {"w": "the", "b": [0.7008, 0.7468, 0.727, 0.7618]}, {"w": "production", "b": [0.7342, 0.7468, 0.8236, 0.7618]}, {"w": "data.", "b": [0.8308, 0.7468, 0.8726, 0.7618]}, {"w": "Sometimes,", "b": [0.1312, 0.7648, 0.2217, 0.7797]}, {"w": "these", "b": [0.2279, 0.7648, 0.2686, 0.7797]}, {"w": "examples", "b": [0.2748, 0.7648, 0.3475, 0.7797]}, {"w": "are", "b": [0.3536, 0.7648, 0.378, 0.7797]}, {"w": "abundant", "b": [0.3842, 0.7648, 0.4598, 0.7797]}, {"w": "and/or", "b": [0.466, 0.7648, 0.5209, 0.7797]}, {"w": "inexpensive.", "b": [0.527, 0.7648, 0.6236, 0.7797]}, {"w": "Using", "b": [0.6319, 0.7648, 0.6772, 0.7797]}, {"w": "this", "b": [0.6833, 0.7648, 0.7129, 0.7797]}, {"w": "data", "b": [0.7191, 0.7648, 0.7546, 0.7797]}, {"w": "in", "b": [0.7608, 0.7648, 0.776, 0.7797]}, {"w": "the", "b": [0.7822, 0.7648, 0.8076, 0.7797]}, {"w": "project", "b": [0.8137, 0.7648, 0.8696, 0.7797]}, {"w": "may", "b": [0.1312, 0.7827, 0.1651, 0.7977]}, {"w": "result", "b": [0.1712, 0.7827, 0.2165, 0.7977]}, {"w": "in", "b": [0.2226, 0.7827, 0.238, 0.7977]}, {"w": "distribution", "b": [0.2443, 0.783, 0.3534, 0.798]}, {"w": "shift,", "b": [0.3604, 0.7827, 0.4063, 0.798]}, {"w": "and", "b": [0.4124, 0.7827, 0.4422, 0.7977]}, {"w": "the", "b": [0.4483, 0.7827, 0.474, 0.7977]}, {"w": "analyst", "b": [0.4801, 0.7827, 0.5382, 0.7977]}, {"w": "may", "b": [0.5443, 0.7827, 0.5781, 0.7977]}, {"w": "or", "b": [0.5843, 0.7827, 0.6008, 0.7977]}, {"w": "may", "b": [0.6069, 0.7827, 0.6407, 0.7977]}, {"w": "not", "b": [0.6469, 0.7827, 0.6735, 0.7977]}, {"w": "be", "b": [0.6797, 0.7827, 0.6986, 0.7977]}, {"w": "aware", "b": [0.7048, 0.7827, 0.751, 0.7977]}, {"w": "of", "b": [0.7571, 0.7827, 0.772, 0.7977]}, {"w": "it.", "b": [0.7782, 0.7827, 0.7956, 0.7977]}]}, {"id": "b_9", "type": "paragraph", "text": "If you are aware of distribution shift, you will place all those easily available examples into your training set, but will avoid using them in the validation and test sets. This way, you evaluate the models against the data that is similar to that in your production setting. Doing", "words": [{"w": "If", "b": [0.1312, 0.8096, 0.1436, 0.8246]}, {"w": "you", "b": [0.1498, 0.8096, 0.1787, 0.8246]}, {"w": "are", "b": [0.1848, 0.8096, 0.2097, 0.8246]}, {"w": "aware", "b": [0.2158, 0.8096, 0.2623, 0.8246]}, {"w": "of", "b": [0.2685, 0.8096, 0.2835, 0.8246]}, {"w": "distribution", "b": [0.2896, 0.8096, 0.3848, 0.8246]}, {"w": "shift,", "b": [0.3909, 0.8096, 0.4319, 0.8246]}, {"w": "you", "b": [0.438, 0.8096, 0.4669, 0.8246]}, {"w": "will", "b": [0.4731, 0.8096, 0.502, 0.8246]}, {"w": "place", "b": [0.5081, 0.8096, 0.5494, 0.8246]}, {"w": "all", "b": [0.5556, 0.8096, 0.5752, 0.8246]}, {"w": "those", "b": [0.5814, 0.8096, 0.6238, 0.8246]}, {"w": "easily", "b": [0.63, 0.8096, 0.675, 0.8246]}, {"w": "available", "b": [0.6811, 0.8096, 0.7514, 0.8246]}, {"w": "examples", "b": [0.7575, 0.8096, 0.8315, 0.8246]}, {"w": "into", "b": [0.8376, 0.8096, 0.8691, 0.8246]}, {"w": "your", "b": [0.1308, 0.8276, 0.1674, 0.8425]}, {"w": "training", "b": [0.1736, 0.8276, 0.2385, 0.8425]}, {"w": "set,", "b": [0.2447, 0.8276, 0.2731, 0.8425]}, {"w": "but", "b": [0.2793, 0.8276, 0.3076, 0.8425]}, {"w": "will", "b": [0.3138, 0.8276, 0.3431, 0.8425]}, {"w": "avoid", "b": [0.3493, 0.8276, 0.3927, 0.8425]}, {"w": "using", "b": [0.3989, 0.8276, 0.4419, 0.8425]}, {"w": "them", "b": [0.4481, 0.8276, 0.4899, 0.8425]}, {"w": "in", "b": [0.4961, 0.8276, 0.5118, 0.8425]}, {"w": "the", "b": [0.518, 0.8276, 0.5442, 0.8425]}, {"w": "validation", "b": [0.5504, 0.8276, 0.6315, 0.8425]}, {"w": "and", "b": [0.6377, 0.8276, 0.668, 0.8425]}, {"w": "test", "b": [0.6742, 0.8276, 0.7047, 0.8425]}, {"w": "sets.", "b": [0.7109, 0.8276, 0.7467, 0.8425]}, {"w": "This", "b": [0.755, 0.8276, 0.7918, 0.8425]}, {"w": "way,", "b": [0.798, 0.8276, 0.8336, 0.8425]}, {"w": "you", "b": [0.8398, 0.8276, 0.8691, 0.8425]}, {"w": "evaluate", "b": [0.1312, 0.8455, 0.196, 0.8605]}, {"w": "the", "b": [0.2017, 0.8455, 0.2268, 0.8605]}, {"w": "models", "b": [0.2324, 0.8455, 0.2873, 0.8605]}, {"w": "against", "b": [0.2929, 0.8455, 0.3493, 0.8605]}, {"w": "the", "b": [0.3549, 0.8455, 0.38, 0.8605]}, {"w": "data", "b": [0.3857, 0.8455, 0.4208, 0.8605]}, {"w": "that", "b": [0.4264, 0.8455, 0.4596, 0.8605]}, {"w": "is", "b": [0.4652, 0.8455, 0.4774, 0.8605]}, {"w": "similar", "b": [0.483, 0.8455, 0.5364, 0.8605]}, {"w": "to", "b": [0.5421, 0.8455, 0.5581, 0.8605]}, {"w": "that", "b": [0.5637, 0.8455, 0.5969, 0.8605]}, {"w": "in", "b": [0.6025, 0.8455, 0.6176, 0.8605]}, {"w": "your", "b": [0.6232, 0.8455, 0.6584, 0.8605]}, {"w": "production", "b": [0.6641, 0.8455, 0.75, 0.8605]}, {"w": "setting.", "b": [0.7557, 0.8455, 0.8141, 0.8605]}, {"w": "Doing", "b": [0.8221, 0.8455, 0.8691, 0.8605]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "7", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 146, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "otherwise might result in achieving overly optimistic values of the performance metric during model testing, and selecting for production a suboptimal model.", "words": [{"w": "otherwise", "b": [0.1312, 0.0881, 0.2058, 0.1031]}, {"w": "might", "b": [0.2118, 0.0881, 0.2575, 0.1031]}, {"w": "result", "b": [0.2635, 0.0881, 0.3079, 0.1031]}, {"w": "in", "b": [0.3139, 0.0881, 0.329, 0.1031]}, {"w": "achieving", "b": [0.335, 0.0881, 0.4084, 0.1031]}, {"w": "overly", "b": [0.4144, 0.0881, 0.4617, 0.1031]}, {"w": "optimistic", "b": [0.4677, 0.0881, 0.5462, 0.1031]}, {"w": "values", "b": [0.5523, 0.0881, 0.6001, 0.1031]}, {"w": "of", "b": [0.6061, 0.0881, 0.6207, 0.1031]}, {"w": "the", "b": [0.6267, 0.0881, 0.6518, 0.1031]}, {"w": "performance", "b": [0.6579, 0.0881, 0.7555, 0.1031]}, {"w": "metric", "b": [0.7615, 0.0881, 0.8118, 0.1031]}, {"w": "during", "b": [0.8178, 0.0881, 0.8691, 0.1031]}, {"w": "model", "b": [0.1312, 0.106, 0.1799, 0.121]}, {"w": "testing,", "b": [0.1861, 0.106, 0.2457, 0.121]}, {"w": "and", "b": [0.2518, 0.106, 0.2816, 0.121]}, {"w": "selecting", "b": [0.2877, 0.106, 0.3565, 0.121]}, {"w": "for", "b": [0.3627, 0.106, 0.3848, 0.121]}, {"w": "production", "b": [0.3909, 0.106, 0.4787, 0.121]}, {"w": "a", "b": [0.4848, 0.106, 0.4941, 0.121]}, {"w": "suboptimal", "b": [0.5002, 0.106, 0.59, 0.121]}, {"w": "model.", "b": [0.5962, 0.106, 0.65, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "The distribution shift can be a hard problem to tackle. Using a different data distribution for training could be a conscious choice because of the data availability. However, the analyst may be unaware that the statistical properties of the training and development data are different. This often happens when the model is frequently updated after production deployment, and new examples are added to the training set. The properties of the data used to train the model, and that of the data used to validate and test it, can diverge over time. Section ?? in the next chapter provides guidance on how to handle that problem.", "words": [{"w": "The", "b": [0.1306, 0.133, 0.1617, 0.1479]}, {"w": "distribution", "b": [0.1675, 0.133, 0.2601, 0.1479]}, {"w": "shift", "b": [0.2659, 0.133, 0.3007, 0.1479]}, {"w": "can", "b": [0.3065, 0.133, 0.3336, 0.1479]}, {"w": "be", "b": [0.3394, 0.133, 0.358, 0.1479]}, {"w": "a", "b": [0.3638, 0.133, 0.3728, 0.1479]}, {"w": "hard", "b": [0.3786, 0.133, 0.4148, 0.1479]}, {"w": "problem", "b": [0.4206, 0.133, 0.485, 0.1479]}, {"w": "to", "b": [0.4907, 0.133, 0.5068, 0.1479]}, {"w": "tackle.", "b": [0.5126, 0.133, 0.5638, 0.1479]}, {"w": "Using", "b": [0.5719, 0.133, 0.6167, 0.1479]}, {"w": "a", "b": [0.6225, 0.133, 0.6316, 0.1479]}, {"w": "different", "b": [0.6373, 0.133, 0.7027, 0.1479]}, {"w": "data", "b": [0.7085, 0.133, 0.7437, 0.1479]}, {"w": "distribution", "b": [0.7494, 0.133, 0.842, 0.1479]}, {"w": "for", "b": [0.8478, 0.133, 0.8695, 0.1479]}, {"w": "training", "b": [0.1312, 0.1509, 0.1936, 0.1659]}, {"w": "could", "b": [0.1985, 0.1509, 0.2407, 0.1659]}, {"w": "be", "b": [0.2457, 0.1509, 0.2643, 0.1659]}, {"w": "a", "b": [0.2693, 0.1509, 0.2783, 0.1659]}, {"w": "conscious", "b": [0.2832, 0.1509, 0.3568, 0.1659]}, {"w": "choice", "b": [0.3618, 0.1509, 0.4095, 0.1659]}, {"w": "because", "b": [0.4145, 0.1509, 0.4754, 0.1659]}, {"w": "of", "b": [0.4803, 0.1509, 0.4949, 0.1659]}, {"w": "the", "b": [0.4999, 0.1509, 0.525, 0.1659]}, {"w": "data", "b": [0.5299, 0.1509, 0.5651, 0.1659]}, {"w": "availability.", "b": [0.57, 0.1509, 0.6599, 0.1659]}, {"w": "However,", "b": [0.6677, 0.1509, 0.7396, 0.1659]}, {"w": "the", "b": [0.7448, 0.1509, 0.7699, 0.1659]}, {"w": "analyst", "b": [0.7748, 0.1509, 0.8317, 0.1659]}, {"w": "may", "b": [0.8367, 0.1509, 0.8698, 0.1659]}, {"w": "be", "b": [0.1312, 0.1689, 0.1499, 0.1838]}, {"w": "unaware", "b": [0.1561, 0.1689, 0.2218, 0.1838]}, {"w": "that", "b": [0.228, 0.1689, 0.2613, 0.1838]}, {"w": "the", "b": [0.2675, 0.1689, 0.2927, 0.1838]}, {"w": "statistical", "b": [0.2989, 0.1689, 0.3759, 0.1838]}, {"w": "properties", "b": [0.3821, 0.1689, 0.4616, 0.1838]}, {"w": "of", "b": [0.4677, 0.1689, 0.4824, 0.1838]}, {"w": "the", "b": [0.4886, 0.1689, 0.5138, 0.1838]}, {"w": "training", "b": [0.52, 0.1689, 0.5827, 0.1838]}, {"w": "and", "b": [0.5888, 0.1689, 0.6181, 0.1838]}, {"w": "development", "b": [0.6243, 0.1689, 0.7238, 0.1838]}, {"w": "data", "b": [0.73, 0.1689, 0.7653, 0.1838]}, {"w": "are", "b": [0.7715, 0.1689, 0.7958, 0.1838]}, {"w": "different.", "b": [0.8019, 0.1689, 0.8727, 0.1838]}, {"w": "This", "b": [0.1306, 0.1868, 0.1662, 0.2018]}, {"w": "often", "b": [0.1723, 0.1868, 0.2124, 0.2018]}, {"w": "happens", "b": [0.2186, 0.1868, 0.2842, 0.2018]}, {"w": "when", "b": [0.2903, 0.1868, 0.3319, 0.2018]}, {"w": "the", "b": [0.3381, 0.1868, 0.3635, 0.2018]}, {"w": "model", "b": [0.3696, 0.1868, 0.4178, 0.2018]}, {"w": "is", "b": [0.4239, 0.1868, 0.4362, 0.2018]}, {"w": "frequently", "b": [0.4424, 0.1868, 0.5226, 0.2018]}, {"w": "updated", "b": [0.5288, 0.1868, 0.5943, 0.2018]}, {"w": "after", "b": [0.6004, 0.1868, 0.6375, 0.2018]}, {"w": "production", "b": [0.6436, 0.1868, 0.7305, 0.2018]}, {"w": "deployment,", "b": [0.7366, 0.1868, 0.8336, 0.2018]}, {"w": "and", "b": [0.8397, 0.1868, 0.8692, 0.2018]}, {"w": "new", "b": [0.1312, 0.2048, 0.1637, 0.2197]}, {"w": "examples", "b": [0.1702, 0.2048, 0.2451, 0.2197]}, {"w": "are", "b": [0.2517, 0.2048, 0.2768, 0.2197]}, {"w": "added", "b": [0.2834, 0.2048, 0.3326, 0.2197]}, {"w": "to", "b": [0.3392, 0.2048, 0.3559, 0.2197]}, {"w": "the", "b": [0.3625, 0.2048, 0.3886, 0.2197]}, {"w": "training", "b": [0.3952, 0.2048, 0.4601, 0.2197]}, {"w": "set.", "b": [0.4666, 0.2048, 0.495, 0.2197]}, {"w": "The", "b": [0.5045, 0.2048, 0.5369, 0.2197]}, {"w": "properties", "b": [0.5435, 0.2048, 0.6258, 0.2197]}, {"w": "of", "b": [0.6324, 0.2048, 0.6475, 0.2197]}, {"w": "the", "b": [0.6541, 0.2048, 0.6803, 0.2197]}, {"w": "data", "b": [0.6868, 0.2048, 0.7234, 0.2197]}, {"w": "used", "b": [0.73, 0.2048, 0.7667, 0.2197]}, {"w": "to", "b": [0.7733, 0.2048, 0.79, 0.2197]}, {"w": "train", "b": [0.7966, 0.2048, 0.8364, 0.2197]}, {"w": "the", "b": [0.843, 0.2048, 0.8691, 0.2197]}, {"w": "model,", "b": [0.1312, 0.2227, 0.184, 0.2377]}, {"w": "and", "b": [0.19, 0.2227, 0.2192, 0.2377]}, {"w": "that", "b": [0.2252, 0.2227, 0.2584, 0.2377]}, {"w": "of", "b": [0.2644, 0.2227, 0.2789, 0.2377]}, {"w": "the", "b": [0.285, 0.2227, 0.3101, 0.2377]}, {"w": "data", "b": [0.3161, 0.2227, 0.3513, 0.2377]}, {"w": "used", "b": [0.3573, 0.2227, 0.3926, 0.2377]}, {"w": "to", "b": [0.3986, 0.2227, 0.4147, 0.2377]}, {"w": "validate", "b": [0.4207, 0.2227, 0.4825, 0.2377]}, {"w": "and", "b": [0.4885, 0.2227, 0.5177, 0.2377]}, {"w": "test", "b": [0.5237, 0.2227, 0.5529, 0.2377]}, {"w": "it,", "b": [0.5589, 0.2227, 0.576, 0.2377]}, {"w": "can", "b": [0.5821, 0.2227, 0.6092, 0.2377]}, {"w": "diverge", "b": [0.6152, 0.2227, 0.6716, 0.2377]}, {"w": "over", "b": [0.6776, 0.2227, 0.7103, 0.2377]}, {"w": "time.", "b": [0.7163, 0.2227, 0.7565, 0.2377]}, {"w": "Section", "b": [0.7646, 0.2227, 0.8219, 0.2377]}, {"w": "??", "b": [0.8276, 0.223, 0.8477, 0.238]}, {"w": "in", "b": [0.8537, 0.2227, 0.8688, 0.2377]}, {"w": "the", "b": [0.1312, 0.2406, 0.1569, 0.2556]}, {"w": "next", "b": [0.163, 0.2406, 0.1984, 0.2556]}, {"w": "chapter", "b": [0.2046, 0.2406, 0.2646, 0.2556]}, {"w": "provides", "b": [0.2708, 0.2406, 0.3376, 0.2556]}, {"w": "guidance", "b": [0.3437, 0.2406, 0.4145, 0.2556]}, {"w": "on", "b": [0.4206, 0.2406, 0.4401, 0.2556]}, {"w": "how", "b": [0.4463, 0.2406, 0.4786, 0.2556]}, {"w": "to", "b": [0.4847, 0.2406, 0.5011, 0.2556]}, {"w": "handle", "b": [0.5073, 0.2406, 0.5606, 0.2556]}, {"w": "that", "b": [0.5667, 0.2406, 0.6006, 0.2556]}, {"w": "problem.", "b": [0.6067, 0.2406, 0.6776, 0.2556]}]}, {"id": "b_2", "type": "paragraph", "text": "5.1.6 Preconditions for Supervised Learning", "words": [{"w": "5.1.6", "b": [0.1312, 0.2888, 0.1749, 0.3038]}, {"w": "Preconditions", "b": [0.1961, 0.2888, 0.3235, 0.3038]}, {"w": "for", "b": [0.3306, 0.2888, 0.3564, 0.3038]}, {"w": "Supervised", "b": [0.3635, 0.2888, 0.4649, 0.3038]}, {"w": "Learning", "b": [0.472, 0.2888, 0.5536, 0.3038]}]}, {"id": "b_3", "type": "paragraph", "text": "Before you start working on your model, make sure the following conditions are satisfied:", "words": [{"w": "Before", "b": [0.1312, 0.3251, 0.1828, 0.34]}, {"w": "you", "b": [0.189, 0.3251, 0.2177, 0.34]}, {"w": "start", "b": [0.2238, 0.3251, 0.2619, 0.34]}, {"w": "working", "b": [0.2681, 0.3251, 0.3317, 0.34]}, {"w": "on", "b": [0.3378, 0.3251, 0.3573, 0.34]}, {"w": "your", "b": [0.3635, 0.3251, 0.3994, 0.34]}, {"w": "model,", "b": [0.4056, 0.3251, 0.4594, 0.34]}, {"w": "make", "b": [0.4655, 0.3251, 0.5076, 0.34]}, {"w": "sure", "b": [0.5137, 0.3251, 0.5467, 0.34]}, {"w": "the", "b": [0.5529, 0.3251, 0.5785, 0.34]}, {"w": "following", "b": [0.5846, 0.3251, 0.6564, 0.34]}, {"w": "conditions", "b": [0.6626, 0.3251, 0.7447, 0.34]}, {"w": "are", "b": [0.7509, 0.3251, 0.7755, 0.34]}, {"w": "satisfied:", "b": [0.7817, 0.3251, 0.8516, 0.34]}]}, {"id": "b_4", "type": "paragraph", "text": "1. You have a labeled dataset. 2. You have split the dataset into three subsets: training, validation, and test. 3. Examples in the validation and test sets are statistically similar. 4. You engineered features and filled missed values using only the training data. 5. You converted all examples into numerical feature vectors.1", "words": [{"w": "1.", "b": [0.1538, 0.352, 0.1681, 0.3669]}, {"w": "You", "b": [0.1774, 0.352, 0.2091, 0.3669]}, {"w": "have", "b": [0.2153, 0.352, 0.2517, 0.3669]}, {"w": "a", "b": [0.2579, 0.352, 0.2671, 0.3669]}, {"w": "labeled", "b": [0.2732, 0.352, 0.3302, 0.3669]}, {"w": "dataset.", "b": [0.3363, 0.352, 0.4, 0.3669]}, {"w": "2.", "b": [0.1538, 0.3699, 0.1681, 0.3849]}, {"w": "You", "b": [0.1774, 0.3699, 0.2091, 0.3849]}, {"w": "have", "b": [0.2153, 0.3699, 0.2517, 0.3849]}, {"w": "split", "b": [0.2579, 0.3699, 0.2928, 0.3849]}, {"w": "the", "b": [0.299, 0.3699, 0.3246, 0.3849]}, {"w": "dataset", "b": [0.3308, 0.3699, 0.3893, 0.3849]}, {"w": "into", "b": [0.3955, 0.3699, 0.4267, 0.3849]}, {"w": "three", "b": [0.4329, 0.3699, 0.474, 0.3849]}, {"w": "subsets:", "b": [0.4801, 0.3699, 0.543, 0.3849]}, {"w": "training,", "b": [0.5512, 0.3699, 0.62, 0.3849]}, {"w": "validation,", "b": [0.6261, 0.3699, 0.7107, 0.3849]}, {"w": "and", "b": [0.7169, 0.3699, 0.7466, 0.3849]}, {"w": "test.", "b": [0.7528, 0.3699, 0.7877, 0.3849]}, {"w": "3.", "b": [0.1538, 0.3879, 0.1681, 0.4028]}, {"w": "Examples", "b": [0.1774, 0.3879, 0.2551, 0.4028]}, {"w": "in", "b": [0.2613, 0.3879, 0.2767, 0.4028]}, {"w": "the", "b": [0.2828, 0.3879, 0.3085, 0.4028]}, {"w": "validation", "b": [0.3146, 0.3879, 0.3941, 0.4028]}, {"w": "and", "b": [0.4002, 0.3879, 0.43, 0.4028]}, {"w": "test", "b": [0.4361, 0.3879, 0.466, 0.4028]}, {"w": "sets", "b": [0.4721, 0.3879, 0.5021, 0.4028]}, {"w": "are", "b": [0.5082, 0.3879, 0.5329, 0.4028]}, {"w": "statistically", "b": [0.539, 0.3879, 0.6321, 0.4028]}, {"w": "similar.", "b": [0.6382, 0.3879, 0.6978, 0.4028]}, {"w": "4.", "b": [0.1538, 0.4058, 0.1681, 0.4208]}, {"w": "You", "b": [0.1774, 0.4058, 0.2091, 0.4208]}, {"w": "engineered", "b": [0.2153, 0.4058, 0.3005, 0.4208]}, {"w": "features", "b": [0.3066, 0.4058, 0.3699, 0.4208]}, {"w": "and", "b": [0.376, 0.4058, 0.4058, 0.4208]}, {"w": "filled", "b": [0.4119, 0.4058, 0.4509, 0.4208]}, {"w": "missed", "b": [0.457, 0.4058, 0.5106, 0.4208]}, {"w": "values", "b": [0.5167, 0.4058, 0.5656, 0.4208]}, {"w": "using", "b": [0.5717, 0.4058, 0.6139, 0.4208]}, {"w": "only", "b": [0.62, 0.4058, 0.6543, 0.4208]}, {"w": "the", "b": [0.6605, 0.4058, 0.6861, 0.4208]}, {"w": "training", "b": [0.6923, 0.4058, 0.7559, 0.4208]}, {"w": "data.", "b": [0.7621, 0.4058, 0.8031, 0.4208]}, {"w": "5.", "b": [0.1538, 0.4238, 0.1681, 0.4387]}, {"w": "You", "b": [0.1774, 0.4238, 0.2091, 0.4387]}, {"w": "converted", "b": [0.2153, 0.4238, 0.2928, 0.4387]}, {"w": "all", "b": [0.2989, 0.4238, 0.3184, 0.4387]}, {"w": "examples", "b": [0.3246, 0.4238, 0.398, 0.4387]}, {"w": "into", "b": [0.4041, 0.4238, 0.4354, 0.4387]}, {"w": "numerical", "b": [0.4416, 0.4238, 0.5201, 0.4387]}, {"w": "feature", "b": [0.5262, 0.4238, 0.5822, 0.4387]}, {"w": "vectors.1", "b": [0.5883, 0.4221, 0.6571, 0.4387]}]}, {"id": "b_5", "type": "paragraph", "text": "6. You have selected a performance metric that returns a single number (see Section 5.5). 7. You have a baseline.", "words": [{"w": "6.", "b": [0.1538, 0.4417, 0.1681, 0.4567]}, {"w": "You", "b": [0.1774, 0.4417, 0.2087, 0.4567]}, {"w": "have", "b": [0.2149, 0.4417, 0.2508, 0.4567]}, {"w": "selected", "b": [0.2569, 0.4417, 0.3188, 0.4567]}, {"w": "a", "b": [0.3249, 0.4417, 0.334, 0.4567]}, {"w": "performance", "b": [0.3402, 0.4417, 0.4385, 0.4567]}, {"w": "metric", "b": [0.4446, 0.4417, 0.4953, 0.4567]}, {"w": "that", "b": [0.5014, 0.4417, 0.5348, 0.4567]}, {"w": "returns", "b": [0.541, 0.4417, 0.5979, 0.4567]}, {"w": "a", "b": [0.604, 0.4417, 0.6131, 0.4567]}, {"w": "single", "b": [0.6193, 0.4417, 0.6639, 0.4567]}, {"w": "number", "b": [0.6701, 0.4417, 0.7304, 0.4567]}, {"w": "(see", "b": [0.7365, 0.4417, 0.767, 0.4567]}, {"w": "Section", "b": [0.7731, 0.4417, 0.8308, 0.4567]}, {"w": "5.5).", "b": [0.837, 0.4417, 0.8724, 0.4567]}, {"w": "7.", "b": [0.1538, 0.4597, 0.1681, 0.4746]}, {"w": "You", "b": [0.1774, 0.4597, 0.2091, 0.4746]}, {"w": "have", "b": [0.2153, 0.4597, 0.2517, 0.4746]}, {"w": "a", "b": [0.2579, 0.4597, 0.2671, 0.4746]}, {"w": "baseline.", "b": [0.2732, 0.4597, 0.3421, 0.4746]}]}, {"id": "b_6", "type": "paragraph", "text": "5.2 Representing Labels for Machine Learning", "words": [{"w": "5.2", "b": [0.1312, 0.5085, 0.1631, 0.5264]}, {"w": "Representing", "b": [0.188, 0.5085, 0.3306, 0.5264]}, {"w": "Labels", "b": [0.3389, 0.5085, 0.4086, 0.5264]}, {"w": "for", "b": [0.4169, 0.5085, 0.4472, 0.5264]}, {"w": "Machine", "b": [0.4555, 0.5085, 0.5475, 0.5264]}, {"w": "Learning", "b": [0.5558, 0.5085, 0.6515, 0.5264]}]}, {"id": "b_7", "type": "paragraph", "text": "In the classical formulation of classification, labels look like values of a categorical feature. For example, in image classification, the labels could be “cat,” “dog,” “car,” “building,” and so on.", "words": [{"w": "In", "b": [0.1312, 0.5471, 0.1485, 0.562]}, {"w": "the", "b": [0.1546, 0.5471, 0.1807, 0.562]}, {"w": "classical", "b": [0.1868, 0.5471, 0.2528, 0.562]}, {"w": "formulation", "b": [0.259, 0.5471, 0.354, 0.562]}, {"w": "of", "b": [0.3602, 0.5471, 0.3753, 0.562]}, {"w": "classification,", "b": [0.3814, 0.5471, 0.4902, 0.562]}, {"w": "labels", "b": [0.4964, 0.5471, 0.5429, 0.562]}, {"w": "look", "b": [0.5491, 0.5471, 0.5835, 0.562]}, {"w": "like", "b": [0.5896, 0.5471, 0.6178, 0.562]}, {"w": "values", "b": [0.624, 0.5471, 0.6737, 0.562]}, {"w": "of", "b": [0.6799, 0.5471, 0.695, 0.562]}, {"w": "a", "b": [0.7011, 0.5471, 0.7105, 0.562]}, {"w": "categorical", "b": [0.7166, 0.5471, 0.8044, 0.562]}, {"w": "feature.", "b": [0.8105, 0.5471, 0.8727, 0.562]}, {"w": "For", "b": [0.1312, 0.565, 0.1588, 0.58]}, {"w": "example,", "b": [0.1664, 0.565, 0.2391, 0.58]}, {"w": "in", "b": [0.2472, 0.565, 0.2628, 0.58]}, {"w": "image", "b": [0.2705, 0.565, 0.3186, 0.58]}, {"w": "classification,", "b": [0.3262, 0.565, 0.4353, 0.58]}, {"w": "the", "b": [0.4433, 0.565, 0.4695, 0.58]}, {"w": "labels", "b": [0.4771, 0.565, 0.5237, 0.58]}, {"w": "could", "b": [0.5314, 0.565, 0.5753, 0.58]}, {"w": "be", "b": [0.583, 0.565, 0.6023, 0.58]}, {"w": "“cat,”", "b": [0.61, 0.565, 0.6581, 0.58]}, {"w": "“dog,”", "b": [0.6661, 0.565, 0.7184, 0.58]}, {"w": "“car,”", "b": [0.7264, 0.565, 0.7746, 0.58]}, {"w": "“building,”", "b": [0.7826, 0.565, 0.8726, 0.58]}, {"w": "and", "b": [0.1312, 0.583, 0.161, 0.5979]}, {"w": "so", "b": [0.1671, 0.583, 0.1836, 0.5979]}, {"w": "on.", "b": [0.1898, 0.583, 0.2144, 0.5979]}]}, {"id": "b_8", "type": "paragraph", "text": "Some machine learning algorithms, like those you find in scikit-learn, accept labels in their natural form: strings. The library take care of transforming strings to numbers that are accepted by a specific learning algorithm.", "words": [{"w": "Some", "b": [0.1312, 0.6099, 0.1746, 0.6249]}, {"w": "machine", "b": [0.1808, 0.6099, 0.2474, 0.6249]}, {"w": "learning", "b": [0.2536, 0.6099, 0.3187, 0.6249]}, {"w": "algorithms,", "b": [0.3249, 0.6099, 0.416, 0.6249]}, {"w": "like", "b": [0.4221, 0.6099, 0.45, 0.6249]}, {"w": "those", "b": [0.4562, 0.6099, 0.4987, 0.6249]}, {"w": "you", "b": [0.5048, 0.6099, 0.5337, 0.6249]}, {"w": "find", "b": [0.5398, 0.6099, 0.5709, 0.6249]}, {"w": "in", "b": [0.577, 0.6099, 0.5925, 0.6249]}, {"w": "scikit-learn,", "b": [0.5986, 0.6099, 0.6934, 0.6249]}, {"w": "accept", "b": [0.6995, 0.6099, 0.7512, 0.6249]}, {"w": "labels", "b": [0.7573, 0.6099, 0.8034, 0.6249]}, {"w": "in", "b": [0.8096, 0.6099, 0.8251, 0.6249]}, {"w": "their", "b": [0.8312, 0.6099, 0.8695, 0.6249]}, {"w": "natural", "b": [0.1312, 0.6279, 0.1909, 0.6428]}, {"w": "form:", "b": [0.1979, 0.6279, 0.2414, 0.6428]}, {"w": "strings.", "b": [0.2513, 0.6279, 0.3112, 0.6428]}, {"w": "The", "b": [0.3221, 0.6279, 0.3545, 0.6428]}, {"w": "library", "b": [0.3615, 0.6279, 0.4165, 0.6428]}, {"w": "take", "b": [0.4235, 0.6279, 0.4581, 0.6428]}, {"w": "care", "b": [0.4651, 0.6279, 0.4986, 0.6428]}, {"w": "of", "b": [0.5057, 0.6279, 0.5208, 0.6428]}, {"w": "transforming", "b": [0.5278, 0.6279, 0.6332, 0.6428]}, {"w": "strings", "b": [0.6402, 0.6279, 0.6949, 0.6428]}, {"w": "to", "b": [0.7019, 0.6279, 0.7186, 0.6428]}, {"w": "numbers", "b": [0.7256, 0.6279, 0.7954, 0.6428]}, {"w": "that", "b": [0.8024, 0.6279, 0.8369, 0.6428]}, {"w": "are", "b": [0.8439, 0.6279, 0.8691, 0.6428]}, {"w": "accepted", "b": [0.1312, 0.6458, 0.201, 0.6608]}, {"w": "by", "b": [0.2071, 0.6458, 0.2266, 0.6608]}, {"w": "a", "b": [0.2328, 0.6458, 0.242, 0.6608]}, {"w": "specific", "b": [0.2481, 0.6458, 0.3062, 0.6608]}, {"w": "learning", "b": [0.3124, 0.6458, 0.377, 0.6608]}, {"w": "algorithm.", "b": [0.3832, 0.6458, 0.4663, 0.6608]}]}, {"id": "b_9", "type": "paragraph", "text": "Some implementations, however, like those in neural networks, require the analyst to transform the labels to numbers.", "words": [{"w": "Some", "b": [0.1312, 0.6727, 0.1734, 0.6877]}, {"w": "implementations,", "b": [0.1779, 0.6727, 0.3131, 0.6877]}, {"w": "however,", "b": [0.3179, 0.6727, 0.3862, 0.6877]}, {"w": "like", "b": [0.391, 0.6727, 0.4181, 0.6877]}, {"w": "those", "b": [0.4226, 0.6727, 0.4639, 0.6877]}, {"w": "in", "b": [0.4683, 0.6727, 0.4834, 0.6877]}, {"w": "neural", "b": [0.4878, 0.6727, 0.5371, 0.6877]}, {"w": "networks,", "b": [0.5416, 0.6727, 0.6166, 0.6877]}, {"w": "require", "b": [0.6213, 0.6727, 0.6762, 0.6877]}, {"w": "the", "b": [0.6807, 0.6727, 0.7058, 0.6877]}, {"w": "analyst", "b": [0.7102, 0.6727, 0.7671, 0.6877]}, {"w": "to", "b": [0.7715, 0.6727, 0.7876, 0.6877]}, {"w": "transform", "b": [0.792, 0.6727, 0.8691, 0.6877]}, {"w": "the", "b": [0.1312, 0.6907, 0.1569, 0.7056]}, {"w": "labels", "b": [0.163, 0.6907, 0.2088, 0.7056]}, {"w": "to", "b": [0.2149, 0.6907, 0.2313, 0.7056]}, {"w": "numbers.", "b": [0.2375, 0.6907, 0.3109, 0.7056]}]}, {"id": "b_10", "type": "paragraph", "text": "5.2.1 Multiclass Classification", "words": [{"w": "5.2.1", "b": [0.1312, 0.7388, 0.1749, 0.7538]}, {"w": "Multiclass", "b": [0.1961, 0.7388, 0.2905, 0.7538]}, {"w": "Classification", "b": [0.2975, 0.7388, 0.4198, 0.7538]}]}, {"id": "b_11", "type": "paragraph", "text": "In the case of multiclass classification (that is, when the model predicts only one label given an input feature vector), one-hot encoding is typically used to convert labels to", "words": [{"w": "In", "b": [0.1312, 0.7751, 0.1485, 0.7901]}, {"w": "the", "b": [0.1549, 0.7751, 0.181, 0.7901]}, {"w": "case", "b": [0.1874, 0.7751, 0.221, 0.7901]}, {"w": "of", "b": [0.2274, 0.7751, 0.2426, 0.7901]}, {"w": "multiclass", "b": [0.2504, 0.7754, 0.3417, 0.7904]}, {"w": "classification", "b": [0.349, 0.7754, 0.4654, 0.7904]}, {"w": "(that", "b": [0.4718, 0.7751, 0.5136, 0.7901]}, {"w": "is,", "b": [0.52, 0.7751, 0.5379, 0.7901]}, {"w": "when", "b": [0.5444, 0.7751, 0.5873, 0.7901]}, {"w": "the", "b": [0.5937, 0.7751, 0.6198, 0.7901]}, {"w": "model", "b": [0.6262, 0.7751, 0.6759, 0.7901]}, {"w": "predicts", "b": [0.6823, 0.7751, 0.7473, 0.7901]}, {"w": "only", "b": [0.7537, 0.7751, 0.7887, 0.7901]}, {"w": "one", "b": [0.7951, 0.7751, 0.8234, 0.7901]}, {"w": "label", "b": [0.8297, 0.7751, 0.869, 0.7901]}, {"w": "given", "b": [0.1312, 0.793, 0.1741, 0.808]}, {"w": "an", "b": [0.1816, 0.793, 0.2015, 0.808]}, {"w": "input", "b": [0.209, 0.793, 0.2529, 0.808]}, {"w": "feature", "b": [0.2604, 0.793, 0.3174, 0.808]}, {"w": "vector),", "b": [0.3249, 0.793, 0.3877, 0.808]}, {"w": "one-hot", "b": [0.3954, 0.7933, 0.4652, 0.8083]}, {"w": "encoding", "b": [0.4738, 0.7933, 0.5561, 0.8083]}, {"w": "is", "b": [0.5637, 0.793, 0.5764, 0.808]}, {"w": "typically", "b": [0.5839, 0.793, 0.6545, 0.808]}, {"w": "used", "b": [0.662, 0.793, 0.6987, 0.808]}, {"w": "to", "b": [0.7062, 0.793, 0.7229, 0.808]}, {"w": "convert", "b": [0.7304, 0.793, 0.7906, 0.808]}, {"w": "labels", "b": [0.7981, 0.793, 0.8447, 0.808]}, {"w": "to", "b": [0.8522, 0.793, 0.8689, 0.808]}]}, {"id": "b_12", "type": "paragraph", "text": "1As mentioned in the previous chapter, most modern machine learning libraries and packages expect numerical feature vectors. However, some algorithms, like decision tree learning, can naturally work with categorical features.", "words": [{"w": "1As", "b": [0.1518, 0.8209, 0.1778, 0.8348]}, {"w": "mentioned", "b": [0.1839, 0.8227, 0.2563, 0.8348]}, {"w": "in", "b": [0.2624, 0.8227, 0.2758, 0.8348]}, {"w": "the", "b": [0.2819, 0.8227, 0.3041, 0.8348]}, {"w": "previous", "b": [0.3102, 0.8227, 0.3685, 0.8348]}, {"w": "chapter,", "b": [0.3747, 0.8227, 0.4311, 0.8348]}, {"w": "most", "b": [0.4375, 0.8227, 0.4713, 0.8348]}, {"w": "modern", "b": [0.4774, 0.8227, 0.5303, 0.8348]}, {"w": "machine", "b": [0.5364, 0.8227, 0.5937, 0.8348]}, {"w": "learning", "b": [0.5999, 0.8227, 0.6558, 0.8348]}, {"w": "libraries", "b": [0.662, 0.8227, 0.7181, 0.8348]}, {"w": "and", "b": [0.7242, 0.8227, 0.75, 0.8348]}, {"w": "packages", "b": [0.7561, 0.8227, 0.8175, 0.8348]}, {"w": "expect", "b": [0.8236, 0.8227, 0.8689, 0.8348]}, {"w": "numerical", "b": [0.1312, 0.8369, 0.1992, 0.849]}, {"w": "feature", "b": [0.2046, 0.8369, 0.253, 0.849]}, {"w": "vectors.", "b": [0.2584, 0.8369, 0.3118, 0.849]}, {"w": "However,", "b": [0.3193, 0.8369, 0.3829, 0.849]}, {"w": "some", "b": [0.3883, 0.8369, 0.423, 0.849]}, {"w": "algorithms,", "b": [0.4284, 0.8369, 0.5067, 0.849]}, {"w": "like", "b": [0.5121, 0.8369, 0.5361, 0.849]}, {"w": "decision", "b": [0.5415, 0.8369, 0.5967, 0.849]}, {"w": "tree", "b": [0.6021, 0.8369, 0.6287, 0.849]}, {"w": "learning,", "b": [0.6341, 0.8369, 0.6945, 0.849]}, {"w": "can", "b": [0.7, 0.8369, 0.7239, 0.849]}, {"w": "naturally", "b": [0.7293, 0.8369, 0.7929, 0.849]}, {"w": "work", "b": [0.7983, 0.8369, 0.832, 0.849]}, {"w": "with", "b": [0.8374, 0.8369, 0.8685, 0.849]}, {"w": "categorical", "b": [0.1312, 0.8512, 0.2044, 0.8632]}, {"w": "features.", "b": [0.2096, 0.8512, 0.2676, 0.8632]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "8", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 147, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "binary vectors. For example, let your classes be {dog, cat, other}, and you have the following data:", "words": [{"w": "binary", "b": [0.1312, 0.0881, 0.182, 0.1031]}, {"w": "vectors.", "b": [0.1881, 0.0881, 0.2486, 0.1031]}, {"w": "For", "b": [0.2567, 0.0881, 0.2831, 0.1031]}, {"w": "example,", "b": [0.2892, 0.0881, 0.3591, 0.1031]}, {"w": "let", "b": [0.3652, 0.0881, 0.3853, 0.1031]}, {"w": "your", "b": [0.3914, 0.0881, 0.4266, 0.1031]}, {"w": "classes", "b": [0.4326, 0.0881, 0.4842, 0.1031]}, {"w": "be", "b": [0.4903, 0.0881, 0.5089, 0.1031]}, {"w": "{dog,", "b": [0.5148, 0.0881, 0.5578, 0.1033]}, {"w": "cat,", "b": [0.5609, 0.0881, 0.5906, 0.1033]}, {"w": "other},", "b": [0.5937, 0.0881, 0.65, 0.1031]}, {"w": "and", "b": [0.6561, 0.0881, 0.6853, 0.1031]}, {"w": "you", "b": [0.6914, 0.0881, 0.7195, 0.1031]}, {"w": "have", "b": [0.7256, 0.0881, 0.7612, 0.1031]}, {"w": "the", "b": [0.7673, 0.0881, 0.7924, 0.1031]}, {"w": "following", "b": [0.7985, 0.0881, 0.8689, 0.1031]}, {"w": "data:", "b": [0.1312, 0.106, 0.1722, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "Image Label", "words": [{"w": "Image", "b": [0.4163, 0.1434, 0.465, 0.1584]}, {"w": "Label", "b": [0.5389, 0.1434, 0.5837, 0.1584]}]}, {"id": "b_2", "type": "paragraph", "text": "image_1.jpg dog image_2.jpg dog image_3.jpg cat image_4.jpg other image_5.jpg cat", "words": [{"w": "image_1.jpg", "b": [0.4163, 0.1689, 0.5168, 0.1838]}, {"w": "dog", "b": [0.5389, 0.1689, 0.5676, 0.1838]}, {"w": "image_2.jpg", "b": [0.4163, 0.1874, 0.5168, 0.2024]}, {"w": "dog", "b": [0.5389, 0.1874, 0.5676, 0.2024]}, {"w": "image_3.jpg", "b": [0.4163, 0.206, 0.5168, 0.2209]}, {"w": "cat", "b": [0.5389, 0.206, 0.5635, 0.2209]}, {"w": "image_4.jpg", "b": [0.4163, 0.2245, 0.5168, 0.2395]}, {"w": "other", "b": [0.5389, 0.2245, 0.581, 0.2395]}, {"w": "image_5.jpg", "b": [0.4163, 0.2431, 0.5168, 0.258]}, {"w": "cat", "b": [0.5389, 0.2431, 0.5635, 0.258]}]}, {"id": "b_3", "type": "equation", "text": "One-hot encoding would generate the following binary vectors for your classes:", "words": [{"w": "One-hot", "b": [0.1312, 0.2971, 0.1969, 0.312]}, {"w": "encoding", "b": [0.203, 0.2971, 0.2743, 0.312]}, {"w": "would", "b": [0.2804, 0.2971, 0.3281, 0.312]}, {"w": "generate", "b": [0.3343, 0.2971, 0.402, 0.312]}, {"w": "the", "b": [0.4082, 0.2971, 0.4338, 0.312]}, {"w": "following", "b": [0.4399, 0.2971, 0.5117, 0.312]}, {"w": "binary", "b": [0.5179, 0.2971, 0.5697, 0.312]}, {"w": "vectors", "b": [0.5758, 0.2971, 0.6324, 0.312]}, {"w": "for", "b": [0.6386, 0.2971, 0.6607, 0.312]}, {"w": "your", "b": [0.6668, 0.2971, 0.7028, 0.312]}, {"w": "classes:", "b": [0.7089, 0.2971, 0.7667, 0.312]}]}, {"id": "b_4", "type": "equation", "text": "dog = [1, 0, 0],", "words": [{"w": "dog", "b": [0.4503, 0.353, 0.479, 0.368]}, {"w": "=", "b": [0.4841, 0.353, 0.4984, 0.368]}, {"w": "[1,", "b": [0.5036, 0.353, 0.5231, 0.3683]}, {"w": "0,", "b": [0.5262, 0.353, 0.5406, 0.3683]}, {"w": "0],", "b": [0.5436, 0.353, 0.5631, 0.3683]}]}, {"id": "b_5", "type": "equation", "text": "cat = [0, 1, 0],", "words": [{"w": "cat", "b": [0.4544, 0.3755, 0.479, 0.3904]}, {"w": "=", "b": [0.4841, 0.3755, 0.4984, 0.3904]}, {"w": "[0,", "b": [0.5036, 0.3755, 0.5231, 0.3907]}, {"w": "1,", "b": [0.5262, 0.3755, 0.5406, 0.3907]}, {"w": "0],", "b": [0.5436, 0.3755, 0.5631, 0.3907]}]}, {"id": "b_6", "type": "equation", "text": "other = [0, 0, 1].", "words": [{"w": "other", "b": [0.4369, 0.3979, 0.479, 0.4128]}, {"w": "=", "b": [0.4841, 0.3979, 0.4984, 0.4128]}, {"w": "[0,", "b": [0.5036, 0.3979, 0.5231, 0.4131]}, {"w": "0,", "b": [0.5262, 0.3979, 0.5406, 0.4131]}, {"w": "1].", "b": [0.5436, 0.3979, 0.5631, 0.4131]}]}, {"id": "b_7", "type": "paragraph", "text": "After you convert categorical labels into binary vectors, your data becomes:", "words": [{"w": "After", "b": [0.1305, 0.439, 0.1726, 0.454]}, {"w": "you", "b": [0.1788, 0.439, 0.2075, 0.454]}, {"w": "convert", "b": [0.2136, 0.439, 0.2727, 0.454]}, {"w": "categorical", "b": [0.2788, 0.439, 0.365, 0.454]}, {"w": "labels", "b": [0.3711, 0.439, 0.4169, 0.454]}, {"w": "into", "b": [0.423, 0.439, 0.4543, 0.454]}, {"w": "binary", "b": [0.4605, 0.439, 0.5123, 0.454]}, {"w": "vectors,", "b": [0.5185, 0.439, 0.5802, 0.454]}, {"w": "your", "b": [0.5863, 0.439, 0.6223, 0.454]}, {"w": "data", "b": [0.6284, 0.439, 0.6643, 0.454]}, {"w": "becomes:", "b": [0.6704, 0.439, 0.7428, 0.454]}]}, {"id": "b_8", "type": "paragraph", "text": "Image Label", "words": [{"w": "Image", "b": [0.4146, 0.4793, 0.4633, 0.4942]}, {"w": "Label", "b": [0.5372, 0.4793, 0.5821, 0.4942]}]}, {"id": "b_9", "type": "paragraph", "text": "image_1.jpg [1,0,0] image_2.jpg [1,0,0] image_3.jpg [0,1,0] image_4.jpg [0,0,1] image_5.jpg [0,1,0]", "words": [{"w": "image_1.jpg", "b": [0.4146, 0.5047, 0.5151, 0.5197]}, {"w": "[1,0,0]", "b": [0.5372, 0.5047, 0.5854, 0.5197]}, {"w": "image_2.jpg", "b": [0.4146, 0.5233, 0.5151, 0.5382]}, {"w": "[1,0,0]", "b": [0.5372, 0.5233, 0.5854, 0.5382]}, {"w": "image_3.jpg", "b": [0.4146, 0.5418, 0.5151, 0.5568]}, {"w": "[0,1,0]", "b": [0.5372, 0.5418, 0.5854, 0.5568]}, {"w": "image_4.jpg", "b": [0.4146, 0.5604, 0.5151, 0.5753]}, {"w": "[0,0,1]", "b": [0.5372, 0.5604, 0.5854, 0.5753]}, {"w": "image_5.jpg", "b": [0.4146, 0.5789, 0.5151, 0.5939]}, {"w": "[0,1,0]", "b": [0.5372, 0.5789, 0.5854, 0.5939]}]}, {"id": "b_10", "type": "equation", "text": "5.2.2 Multi-label Classification", "words": [{"w": "5.2.2", "b": [0.1312, 0.6362, 0.1749, 0.6512]}, {"w": "Multi-label", "b": [0.1961, 0.6362, 0.2994, 0.6512]}, {"w": "Classification", "b": [0.3064, 0.6362, 0.4287, 0.6512]}]}, {"id": "b_11", "type": "paragraph", "text": "In multi-label classification, the model may predict several labels for one input at the same time (for example, an image can contain both a dog and a cat). In this case, you can use bag-of-words to represent the labels assigned to each example. Let your data be as follows:", "words": [{"w": "In", "b": [0.1312, 0.6725, 0.1485, 0.6875]}, {"w": "multi-label", "b": [0.1555, 0.6728, 0.2557, 0.6878]}, {"w": "classification,", "b": [0.2636, 0.6725, 0.3853, 0.6878]}, {"w": "the", "b": [0.3923, 0.6725, 0.4185, 0.6875]}, {"w": "model", "b": [0.4254, 0.6725, 0.475, 0.6875]}, {"w": "may", "b": [0.4819, 0.6725, 0.5164, 0.6875]}, {"w": "predict", "b": [0.5233, 0.6725, 0.5809, 0.6875]}, {"w": "several", "b": [0.5878, 0.6725, 0.6434, 0.6875]}, {"w": "labels", "b": [0.6503, 0.6725, 0.697, 0.6875]}, {"w": "for", "b": [0.7038, 0.6725, 0.7264, 0.6875]}, {"w": "one", "b": [0.7333, 0.6725, 0.7615, 0.6875]}, {"w": "input", "b": [0.7684, 0.6725, 0.8123, 0.6875]}, {"w": "at", "b": [0.8192, 0.6725, 0.836, 0.6875]}, {"w": "the", "b": [0.8428, 0.6725, 0.869, 0.6875]}, {"w": "same", "b": [0.1312, 0.6905, 0.1705, 0.7054]}, {"w": "time", "b": [0.1758, 0.6905, 0.2109, 0.7054]}, {"w": "(for", "b": [0.2162, 0.6905, 0.2449, 0.7054]}, {"w": "example,", "b": [0.2501, 0.6905, 0.32, 0.7054]}, {"w": "an", "b": [0.3254, 0.6905, 0.3445, 0.7054]}, {"w": "image", "b": [0.3498, 0.6905, 0.396, 0.7054]}, {"w": "can", "b": [0.4012, 0.6905, 0.4283, 0.7054]}, {"w": "contain", "b": [0.4336, 0.6905, 0.4914, 0.7054]}, {"w": "both", "b": [0.4966, 0.6905, 0.5333, 0.7054]}, {"w": "a", "b": [0.5386, 0.6905, 0.5476, 0.7054]}, {"w": "dog", "b": [0.5528, 0.6905, 0.581, 0.7054]}, {"w": "and", "b": [0.5862, 0.6905, 0.6154, 0.7054]}, {"w": "a", "b": [0.6206, 0.6905, 0.6297, 0.7054]}, {"w": "cat).", "b": [0.6349, 0.6905, 0.6711, 0.7054]}, {"w": "In", "b": [0.679, 0.6905, 0.6956, 0.7054]}, {"w": "this", "b": [0.7008, 0.6905, 0.7301, 0.7054]}, {"w": "case,", "b": [0.7353, 0.6905, 0.7726, 0.7054]}, {"w": "you", "b": [0.7781, 0.6905, 0.8062, 0.7054]}, {"w": "can", "b": [0.8114, 0.6905, 0.8386, 0.7054]}, {"w": "use", "b": [0.8438, 0.6905, 0.8691, 0.7054]}, {"w": "bag-of-words", "b": [0.1312, 0.7087, 0.2494, 0.7237]}, {"w": "to", "b": [0.2556, 0.7084, 0.2716, 0.7234]}, {"w": "represent", "b": [0.2778, 0.7084, 0.3498, 0.7234]}, {"w": "the", "b": [0.356, 0.7084, 0.3811, 0.7234]}, {"w": "labels", "b": [0.3873, 0.7084, 0.4321, 0.7234]}, {"w": "assigned", "b": [0.4383, 0.7084, 0.5038, 0.7234]}, {"w": "to", "b": [0.5099, 0.7084, 0.526, 0.7234]}, {"w": "each", "b": [0.5321, 0.7084, 0.5668, 0.7234]}, {"w": "example.", "b": [0.573, 0.7084, 0.6428, 0.7234]}, {"w": "Let", "b": [0.651, 0.7084, 0.6774, 0.7234]}, {"w": "your", "b": [0.6835, 0.7084, 0.7187, 0.7234]}, {"w": "data", "b": [0.7249, 0.7084, 0.76, 0.7234]}, {"w": "be", "b": [0.7662, 0.7084, 0.7848, 0.7234]}, {"w": "as", "b": [0.7909, 0.7084, 0.8071, 0.7234]}, {"w": "follows:", "b": [0.8133, 0.7084, 0.8716, 0.7234]}]}, {"id": "b_12", "type": "paragraph", "text": "Image Labels", "words": [{"w": "Image", "b": [0.3997, 0.7487, 0.4484, 0.7637]}, {"w": "Labels", "b": [0.5223, 0.7487, 0.5745, 0.7637]}]}, {"id": "b_13", "type": "paragraph", "text": "image_1.jpg dog, cat image_2.jpg dog image_3.jpg cat, other image_4.jpg other image_5.jpg cat, dog", "words": [{"w": "image_1.jpg", "b": [0.3997, 0.7742, 0.5002, 0.7891]}, {"w": "dog,", "b": [0.5223, 0.7742, 0.5562, 0.7891]}, {"w": "cat", "b": [0.5623, 0.7742, 0.5869, 0.7891]}, {"w": "image_2.jpg", "b": [0.3997, 0.7927, 0.5002, 0.8077]}, {"w": "dog", "b": [0.5223, 0.7927, 0.551, 0.8077]}, {"w": "image_3.jpg", "b": [0.3997, 0.8112, 0.5002, 0.8262]}, {"w": "cat,", "b": [0.5223, 0.8112, 0.5521, 0.8262]}, {"w": "other", "b": [0.5582, 0.8112, 0.6003, 0.8262]}, {"w": "image_4.jpg", "b": [0.3997, 0.8298, 0.5002, 0.8447]}, {"w": "other", "b": [0.5223, 0.8298, 0.5644, 0.8447]}, {"w": "image_5.jpg", "b": [0.3997, 0.8483, 0.5002, 0.8633]}, {"w": "cat,", "b": [0.5223, 0.8483, 0.5521, 0.8633]}, {"w": "dog", "b": [0.5582, 0.8483, 0.5869, 0.8633]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "9", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 148, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "After you convert labels into binary vectors, your data becomes:", "words": [{"w": "After", "b": [0.1305, 0.0881, 0.1726, 0.1031]}, {"w": "you", "b": [0.1788, 0.0881, 0.2075, 0.1031]}, {"w": "convert", "b": [0.2136, 0.0881, 0.2727, 0.1031]}, {"w": "labels", "b": [0.2788, 0.0881, 0.3246, 0.1031]}, {"w": "into", "b": [0.3307, 0.0881, 0.362, 0.1031]}, {"w": "binary", "b": [0.3681, 0.0881, 0.42, 0.1031]}, {"w": "vectors,", "b": [0.4261, 0.0881, 0.4878, 0.1031]}, {"w": "your", "b": [0.494, 0.0881, 0.5299, 0.1031]}, {"w": "data", "b": [0.5361, 0.0881, 0.572, 0.1031]}, {"w": "becomes:", "b": [0.5781, 0.0881, 0.6505, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "Image Labels", "words": [{"w": "Image", "b": [0.4126, 0.1284, 0.4613, 0.1433]}, {"w": "Labels", "b": [0.5352, 0.1284, 0.5874, 0.1433]}]}, {"id": "b_2", "type": "paragraph", "text": "image_1.jpg [1,1,0] image_2.jpg [1,0,0] image_3.jpg [0,1,1] image_4.jpg [0,0,1] image_5.jpg [1,1,0]", "words": [{"w": "image_1.jpg", "b": [0.4126, 0.1538, 0.5131, 0.1688]}, {"w": "[1,1,0]", "b": [0.5352, 0.1538, 0.5834, 0.1688]}, {"w": "image_2.jpg", "b": [0.4126, 0.1724, 0.5131, 0.1873]}, {"w": "[1,0,0]", "b": [0.5352, 0.1724, 0.5834, 0.1873]}, {"w": "image_3.jpg", "b": [0.4126, 0.1909, 0.5131, 0.2059]}, {"w": "[0,1,1]", "b": [0.5352, 0.1909, 0.5834, 0.2059]}, {"w": "image_4.jpg", "b": [0.4126, 0.2095, 0.5131, 0.2244]}, {"w": "[0,0,1]", "b": [0.5352, 0.2095, 0.5834, 0.2244]}, {"w": "image_5.jpg", "b": [0.4126, 0.228, 0.5131, 0.243]}, {"w": "[1,1,0]", "b": [0.5352, 0.228, 0.5834, 0.243]}]}, {"id": "b_3", "type": "paragraph", "text": "Read the documentation of the specific implementation of a learning algorithm to know the format of the input expected by the learning algorithm.", "words": [{"w": "Read", "b": [0.1312, 0.282, 0.1723, 0.297]}, {"w": "the", "b": [0.1784, 0.282, 0.2039, 0.297]}, {"w": "documentation", "b": [0.21, 0.282, 0.3293, 0.297]}, {"w": "of", "b": [0.3355, 0.282, 0.3502, 0.297]}, {"w": "the", "b": [0.3564, 0.282, 0.3819, 0.297]}, {"w": "specific", "b": [0.388, 0.282, 0.4457, 0.297]}, {"w": "implementation", "b": [0.4519, 0.282, 0.5767, 0.297]}, {"w": "of", "b": [0.5829, 0.282, 0.5977, 0.297]}, {"w": "a", "b": [0.6038, 0.282, 0.613, 0.297]}, {"w": "learning", "b": [0.6191, 0.282, 0.6834, 0.297]}, {"w": "algorithm", "b": [0.6896, 0.282, 0.7671, 0.297]}, {"w": "to", "b": [0.7732, 0.282, 0.7895, 0.297]}, {"w": "know", "b": [0.7956, 0.282, 0.8374, 0.297]}, {"w": "the", "b": [0.8436, 0.282, 0.8691, 0.297]}, {"w": "format", "b": [0.1312, 0.3, 0.1851, 0.315]}, {"w": "of", "b": [0.1912, 0.3, 0.2061, 0.315]}, {"w": "the", "b": [0.2123, 0.3, 0.2379, 0.315]}, {"w": "input", "b": [0.2441, 0.3, 0.2871, 0.315]}, {"w": "expected", "b": [0.2933, 0.3, 0.3641, 0.315]}, {"w": "by", "b": [0.3702, 0.3, 0.3897, 0.315]}, {"w": "the", "b": [0.3959, 0.3, 0.4215, 0.315]}, {"w": "learning", "b": [0.4277, 0.3, 0.4923, 0.315]}, {"w": "algorithm.", "b": [0.4985, 0.3, 0.5816, 0.315]}]}, {"id": "b_4", "type": "paragraph", "text": "5.3 Selecting the Learning Algorithm", "words": [{"w": "5.3", "b": [0.1312, 0.3488, 0.1631, 0.3668]}, {"w": "Selecting", "b": [0.188, 0.3488, 0.2855, 0.3668]}, {"w": "the", "b": [0.2938, 0.3488, 0.3287, 0.3668]}, {"w": "Learning", "b": [0.337, 0.3488, 0.4327, 0.3668]}, {"w": "Algorithm", "b": [0.441, 0.3488, 0.5531, 0.3668]}]}, {"id": "b_5", "type": "paragraph", "text": "Choosing a machine learning algorithm can be a difficult task. If you had a lot of time, you could try all of them. However, usually, the time to solve a problem is limited. To make an informed choice, you can ask yourself several questions before starting to work on the problem. Depending on your answers, you can shortlist some algorithms and try them on your data.", "words": [{"w": "Choosing", "b": [0.1312, 0.3874, 0.2053, 0.4024]}, {"w": "a", "b": [0.2114, 0.3874, 0.2206, 0.4024]}, {"w": "machine", "b": [0.2268, 0.3874, 0.2926, 0.4024]}, {"w": "learning", "b": [0.2987, 0.3874, 0.363, 0.4024]}, {"w": "algorithm", "b": [0.3692, 0.3874, 0.4468, 0.4024]}, {"w": "can", "b": [0.4529, 0.3874, 0.4805, 0.4024]}, {"w": "be", "b": [0.4866, 0.3874, 0.5055, 0.4024]}, {"w": "a", "b": [0.5116, 0.3874, 0.5208, 0.4024]}, {"w": "difficult", "b": [0.5269, 0.3874, 0.5882, 0.4024]}, {"w": "task.", "b": [0.5943, 0.3874, 0.6327, 0.4024]}, {"w": "If", "b": [0.6409, 0.3874, 0.6531, 0.4024]}, {"w": "you", "b": [0.6593, 0.3874, 0.6878, 0.4024]}, {"w": "had", "b": [0.6939, 0.3874, 0.7235, 0.4024]}, {"w": "a", "b": [0.7297, 0.3874, 0.7389, 0.4024]}, {"w": "lot", "b": [0.745, 0.3874, 0.7664, 0.4024]}, {"w": "of", "b": [0.7726, 0.3874, 0.7874, 0.4024]}, {"w": "time,", "b": [0.7935, 0.3874, 0.8343, 0.4024]}, {"w": "you", "b": [0.8405, 0.3874, 0.869, 0.4024]}, {"w": "could", "b": [0.1312, 0.4054, 0.1743, 0.4203]}, {"w": "try", "b": [0.1804, 0.4054, 0.2045, 0.4203]}, {"w": "all", "b": [0.2107, 0.4054, 0.2301, 0.4203]}, {"w": "of", "b": [0.2363, 0.4054, 0.2511, 0.4203]}, {"w": "them.", "b": [0.2572, 0.4054, 0.3033, 0.4203]}, {"w": "However,", "b": [0.3115, 0.4054, 0.3848, 0.4203]}, {"w": "usually,", "b": [0.3909, 0.4054, 0.4515, 0.4203]}, {"w": "the", "b": [0.4576, 0.4054, 0.4833, 0.4203]}, {"w": "time", "b": [0.4894, 0.4054, 0.5252, 0.4203]}, {"w": "to", "b": [0.5314, 0.4054, 0.5478, 0.4203]}, {"w": "solve", "b": [0.5539, 0.4054, 0.5929, 0.4203]}, {"w": "a", "b": [0.5991, 0.4054, 0.6083, 0.4203]}, {"w": "problem", "b": [0.6144, 0.4054, 0.68, 0.4203]}, {"w": "is", "b": [0.6861, 0.4054, 0.6986, 0.4203]}, {"w": "limited.", "b": [0.7047, 0.4054, 0.7661, 0.4203]}, {"w": "To", "b": [0.7743, 0.4054, 0.7953, 0.4203]}, {"w": "make", "b": [0.8015, 0.4054, 0.8434, 0.4203]}, {"w": "an", "b": [0.8496, 0.4054, 0.869, 0.4203]}, {"w": "informed", "b": [0.1312, 0.4233, 0.2011, 0.4383]}, {"w": "choice,", "b": [0.2063, 0.4233, 0.2591, 0.4383]}, {"w": "you", "b": [0.2644, 0.4233, 0.2926, 0.4383]}, {"w": "can", "b": [0.2978, 0.4233, 0.3249, 0.4383]}, {"w": "ask", "b": [0.3301, 0.4233, 0.3558, 0.4383]}, {"w": "yourself", "b": [0.361, 0.4233, 0.4219, 0.4383]}, {"w": "several", "b": [0.4271, 0.4233, 0.4805, 0.4383]}, {"w": "questions", "b": [0.4857, 0.4233, 0.5588, 0.4383]}, {"w": "before", "b": [0.564, 0.4233, 0.6123, 0.4383]}, {"w": "starting", "b": [0.6175, 0.4233, 0.6789, 0.4383]}, {"w": "to", "b": [0.6841, 0.4233, 0.7002, 0.4383]}, {"w": "work", "b": [0.7054, 0.4233, 0.7436, 0.4383]}, {"w": "on", "b": [0.7487, 0.4233, 0.7678, 0.4383]}, {"w": "the", "b": [0.773, 0.4233, 0.7982, 0.4383]}, {"w": "problem.", "b": [0.8033, 0.4233, 0.8727, 0.4383]}, {"w": "Depending", "b": [0.1312, 0.4413, 0.2176, 0.4562]}, {"w": "on", "b": [0.2238, 0.4413, 0.2433, 0.4562]}, {"w": "your", "b": [0.2494, 0.4413, 0.2854, 0.4562]}, {"w": "answers,", "b": [0.2915, 0.4413, 0.359, 0.4562]}, {"w": "you", "b": [0.3651, 0.4413, 0.3938, 0.4562]}, {"w": "can", "b": [0.3999, 0.4413, 0.4276, 0.4562]}, {"w": "shortlist", "b": [0.4338, 0.4413, 0.4997, 0.4562]}, {"w": "some", "b": [0.5058, 0.4413, 0.5459, 0.4562]}, {"w": "algorithms", "b": [0.5521, 0.4413, 0.6373, 0.4562]}, {"w": "and", "b": [0.6435, 0.4413, 0.6732, 0.4562]}, {"w": "try", "b": [0.6794, 0.4413, 0.7035, 0.4562]}, {"w": "them", "b": [0.7097, 0.4413, 0.7507, 0.4562]}, {"w": "on", "b": [0.7568, 0.4413, 0.7763, 0.4562]}, {"w": "your", "b": [0.7825, 0.4413, 0.8184, 0.4562]}, {"w": "data.", "b": [0.8246, 0.4413, 0.8656, 0.4562]}]}, {"id": "b_6", "type": "paragraph", "text": "5.3.1 Main Properties of a Learning Algorithm", "words": [{"w": "5.3.1", "b": [0.1312, 0.4894, 0.1749, 0.5044]}, {"w": "Main", "b": [0.1961, 0.4894, 0.2442, 0.5044]}, {"w": "Properties", "b": [0.2513, 0.4894, 0.3483, 0.5044]}, {"w": "of", "b": [0.3553, 0.4894, 0.3724, 0.5044]}, {"w": "a", "b": [0.3795, 0.4894, 0.3898, 0.5044]}, {"w": "Learning", "b": [0.3969, 0.4894, 0.4785, 0.5044]}, {"w": "Algorithm", "b": [0.4856, 0.4894, 0.5811, 0.5044]}]}, {"id": "b_7", "type": "paragraph", "text": "Below are several questions and answers which may guide you in choosing a machine learning algorithm or model.", "words": [{"w": "Below", "b": [0.1312, 0.5257, 0.1787, 0.5406]}, {"w": "are", "b": [0.1844, 0.5257, 0.2086, 0.5406]}, {"w": "several", "b": [0.2144, 0.5257, 0.2678, 0.5406]}, {"w": "questions", "b": [0.2736, 0.5257, 0.3466, 0.5406]}, {"w": "and", "b": [0.3524, 0.5257, 0.3815, 0.5406]}, {"w": "answers", "b": [0.3873, 0.5257, 0.4483, 0.5406]}, {"w": "which", "b": [0.4541, 0.5257, 0.4998, 0.5406]}, {"w": "may", "b": [0.5056, 0.5257, 0.5387, 0.5406]}, {"w": "guide", "b": [0.5445, 0.5257, 0.5867, 0.5406]}, {"w": "you", "b": [0.5924, 0.5257, 0.6206, 0.5406]}, {"w": "in", "b": [0.6263, 0.5257, 0.6414, 0.5406]}, {"w": "choosing", "b": [0.6472, 0.5257, 0.7146, 0.5406]}, {"w": "a", "b": [0.7204, 0.5257, 0.7294, 0.5406]}, {"w": "machine", "b": [0.7352, 0.5257, 0.8, 0.5406]}, {"w": "learning", "b": [0.8057, 0.5257, 0.8691, 0.5406]}, {"w": "algorithm", "b": [0.1312, 0.5436, 0.2092, 0.5586]}, {"w": "or", "b": [0.2153, 0.5436, 0.2318, 0.5586]}, {"w": "model.", "b": [0.238, 0.5436, 0.2918, 0.5586]}]}, {"id": "b_8", "type": "paragraph", "text": "Explainability", "words": [{"w": "Explainability", "b": [0.1312, 0.5709, 0.2607, 0.5858]}]}, {"id": "b_9", "type": "paragraph", "text": "Do the model predictions require explanation for a non-technical audience? The most accurate machine learning algorithms and models are so-called “black boxes.” They make very few prediction errors, but it may be difficult to understand, and even harder to explain, why a model or an algorithm made a specific prediction. Examples of such models are deep neural networks and ensemble models.", "words": [{"w": "Do", "b": [0.1774, 0.5885, 0.2006, 0.6035]}, {"w": "the", "b": [0.2068, 0.5885, 0.2324, 0.6035]}, {"w": "model", "b": [0.2385, 0.5885, 0.2872, 0.6035]}, {"w": "predictions", "b": [0.2933, 0.5885, 0.3815, 0.6035]}, {"w": "require", "b": [0.3876, 0.5885, 0.4435, 0.6035]}, {"w": "explanation", "b": [0.4497, 0.5885, 0.5433, 0.6035]}, {"w": "for", "b": [0.5495, 0.5885, 0.5716, 0.6035]}, {"w": "a", "b": [0.5777, 0.5885, 0.5869, 0.6035]}, {"w": "non-technical", "b": [0.5931, 0.5885, 0.7, 0.6035]}, {"w": "audience?", "b": [0.7062, 0.5885, 0.7845, 0.6035]}, {"w": "The", "b": [0.7927, 0.5885, 0.8245, 0.6035]}, {"w": "most", "b": [0.8306, 0.5885, 0.8696, 0.6035]}, {"w": "accurate", "b": [0.1774, 0.6064, 0.2465, 0.6214]}, {"w": "machine", "b": [0.253, 0.6064, 0.3205, 0.6214]}, {"w": "learning", "b": [0.3271, 0.6064, 0.3931, 0.6214]}, {"w": "algorithms", "b": [0.3997, 0.6064, 0.4866, 0.6214]}, {"w": "and", "b": [0.4932, 0.6064, 0.5235, 0.6214]}, {"w": "models", "b": [0.5301, 0.6064, 0.5872, 0.6214]}, {"w": "are", "b": [0.5938, 0.6064, 0.619, 0.6214]}, {"w": "so-called", "b": [0.6256, 0.6064, 0.6957, 0.6214]}, {"w": "“black", "b": [0.7023, 0.6064, 0.7541, 0.6214]}, {"w": "boxes.”", "b": [0.7607, 0.6064, 0.8179, 0.6214]}, {"w": "They", "b": [0.8274, 0.6064, 0.8698, 0.6214]}, {"w": "make", "b": [0.1774, 0.6244, 0.2185, 0.6393]}, {"w": "very", "b": [0.2245, 0.6244, 0.2582, 0.6393]}, {"w": "few", "b": [0.2642, 0.6244, 0.2909, 0.6393]}, {"w": "prediction", "b": [0.2969, 0.6244, 0.3763, 0.6393]}, {"w": "errors,", "b": [0.3823, 0.6244, 0.4328, 0.6393]}, {"w": "but", "b": [0.4389, 0.6244, 0.466, 0.6393]}, {"w": "it", "b": [0.472, 0.6244, 0.4841, 0.6393]}, {"w": "may", "b": [0.4901, 0.6244, 0.5232, 0.6393]}, {"w": "be", "b": [0.5292, 0.6244, 0.5478, 0.6393]}, {"w": "difficult", "b": [0.5538, 0.6244, 0.6141, 0.6393]}, {"w": "to", "b": [0.6201, 0.6244, 0.6361, 0.6393]}, {"w": "understand,", "b": [0.6421, 0.6244, 0.7358, 0.6393]}, {"w": "and", "b": [0.7418, 0.6244, 0.771, 0.6393]}, {"w": "even", "b": [0.7769, 0.6244, 0.8121, 0.6393]}, {"w": "harder", "b": [0.8181, 0.6244, 0.8695, 0.6393]}, {"w": "to", "b": [0.1774, 0.6423, 0.1936, 0.6573]}, {"w": "explain,", "b": [0.1998, 0.6423, 0.2623, 0.6573]}, {"w": "why", "b": [0.2684, 0.6423, 0.301, 0.6573]}, {"w": "a", "b": [0.3071, 0.6423, 0.3163, 0.6573]}, {"w": "model", "b": [0.3224, 0.6423, 0.3707, 0.6573]}, {"w": "or", "b": [0.3768, 0.6423, 0.3932, 0.6573]}, {"w": "an", "b": [0.3993, 0.6423, 0.4186, 0.6573]}, {"w": "algorithm", "b": [0.4248, 0.6423, 0.502, 0.6573]}, {"w": "made", "b": [0.5082, 0.6423, 0.5509, 0.6573]}, {"w": "a", "b": [0.557, 0.6423, 0.5662, 0.6573]}, {"w": "specific", "b": [0.5724, 0.6423, 0.6299, 0.6573]}, {"w": "prediction.", "b": [0.6361, 0.6423, 0.7215, 0.6573]}, {"w": "Examples", "b": [0.7297, 0.6423, 0.8068, 0.6573]}, {"w": "of", "b": [0.813, 0.6423, 0.8277, 0.6573]}, {"w": "such", "b": [0.8339, 0.6423, 0.8691, 0.6573]}, {"w": "models", "b": [0.1774, 0.6603, 0.2334, 0.6752]}, {"w": "are", "b": [0.2395, 0.6603, 0.2642, 0.6752]}, {"w": "deep", "b": [0.2703, 0.6606, 0.3133, 0.6755]}, {"w": "neural", "b": [0.3204, 0.6606, 0.3786, 0.6755]}, {"w": "networks", "b": [0.3857, 0.6606, 0.4685, 0.6755]}, {"w": "and", "b": [0.4747, 0.6603, 0.5044, 0.6752]}, {"w": "ensemble", "b": [0.5105, 0.6606, 0.5946, 0.6755]}, {"w": "models.", "b": [0.6017, 0.6603, 0.6715, 0.6755]}]}, {"id": "b_10", "type": "paragraph", "text": "In contrast, kNN, linear regression, and decision tree learning algorithms are not always the most accurate. However, their predictions are easy to inter- pret by a non-expert.", "words": [{"w": "In", "b": [0.1774, 0.6872, 0.1946, 0.7022]}, {"w": "contrast,", "b": [0.205, 0.6872, 0.2768, 0.7022]}, {"w": "kNN,", "b": [0.2883, 0.6872, 0.3379, 0.7025]}, {"w": "linear", "b": [0.3483, 0.6875, 0.4007, 0.7025]}, {"w": "regression,", "b": [0.4126, 0.6872, 0.5105, 0.7025]}, {"w": "and", "b": [0.5219, 0.6872, 0.5523, 0.7022]}, {"w": "decision", "b": [0.5626, 0.6875, 0.6362, 0.7025]}, {"w": "tree", "b": [0.6481, 0.6875, 0.6846, 0.7025]}, {"w": "learning", "b": [0.6965, 0.6875, 0.7713, 0.7025]}, {"w": "algorithms", "b": [0.7818, 0.6872, 0.8688, 0.7022]}, {"w": "are", "b": [0.1774, 0.7051, 0.2025, 0.7201]}, {"w": "not", "b": [0.212, 0.7051, 0.2392, 0.7201]}, {"w": "always", "b": [0.2486, 0.7051, 0.3026, 0.7201]}, {"w": "the", "b": [0.312, 0.7051, 0.3382, 0.7201]}, {"w": "most", "b": [0.3476, 0.7051, 0.3875, 0.7201]}, {"w": "accurate.", "b": [0.3969, 0.7051, 0.4712, 0.7201]}, {"w": "However,", "b": [0.4893, 0.7051, 0.5642, 0.7201]}, {"w": "their", "b": [0.5745, 0.7051, 0.6132, 0.7201]}, {"w": "predictions", "b": [0.6227, 0.7051, 0.7128, 0.7201]}, {"w": "are", "b": [0.7222, 0.7051, 0.7474, 0.7201]}, {"w": "easy", "b": [0.7568, 0.7051, 0.792, 0.7201]}, {"w": "to", "b": [0.8014, 0.7051, 0.8182, 0.7201]}, {"w": "inter-", "b": [0.8276, 0.7051, 0.8721, 0.7201]}, {"w": "pret", "b": [0.1774, 0.7231, 0.2102, 0.7381]}, {"w": "by", "b": [0.2164, 0.7231, 0.2359, 0.7381]}, {"w": "a", "b": [0.242, 0.7231, 0.2512, 0.7381]}, {"w": "non-expert.", "b": [0.2574, 0.7231, 0.3497, 0.7381]}]}, {"id": "b_11", "type": "equation", "text": "In-memory vs. out-of-memory", "words": [{"w": "In-memory", "b": [0.1312, 0.7503, 0.2338, 0.7653]}, {"w": "vs.", "b": [0.2408, 0.7503, 0.2663, 0.7653]}, {"w": "out-of-memory", "b": [0.2757, 0.7503, 0.4132, 0.7653]}]}, {"id": "b_12", "type": "paragraph", "text": "Can your dataset be fully loaded into the RAM of your laptop or server? If yes, then you can choose from a wide variety of algorithms. Otherwise, you would prefer incremental learning algorithms that can improve the model by reading data gradually. Examples of such algorithms are Naïve Bayes and the algorithms for training neural networks.", "words": [{"w": "Can", "b": [0.1774, 0.768, 0.2095, 0.7829]}, {"w": "your", "b": [0.2144, 0.768, 0.2496, 0.7829]}, {"w": "dataset", "b": [0.2546, 0.768, 0.312, 0.7829]}, {"w": "be", "b": [0.3169, 0.768, 0.3355, 0.7829]}, {"w": "fully", "b": [0.3404, 0.768, 0.3756, 0.7829]}, {"w": "loaded", "b": [0.3806, 0.768, 0.4318, 0.7829]}, {"w": "into", "b": [0.4368, 0.768, 0.4674, 0.7829]}, {"w": "the", "b": [0.4723, 0.768, 0.4975, 0.7829]}, {"w": "RAM", "b": [0.5024, 0.768, 0.5458, 0.7829]}, {"w": "of", "b": [0.5508, 0.768, 0.5653, 0.7829]}, {"w": "your", "b": [0.5703, 0.768, 0.6055, 0.7829]}, {"w": "laptop", "b": [0.6104, 0.768, 0.6607, 0.7829]}, {"w": "or", "b": [0.6656, 0.768, 0.6817, 0.7829]}, {"w": "server?", "b": [0.6866, 0.768, 0.7416, 0.7829]}, {"w": "If", "b": [0.7494, 0.768, 0.7615, 0.7829]}, {"w": "yes,", "b": [0.7664, 0.768, 0.7956, 0.7829]}, {"w": "then", "b": [0.8008, 0.768, 0.836, 0.7829]}, {"w": "you", "b": [0.8409, 0.768, 0.8691, 0.7829]}, {"w": "can", "b": [0.1774, 0.7859, 0.2045, 0.8009]}, {"w": "choose", "b": [0.2093, 0.7859, 0.2606, 0.8009]}, {"w": "from", "b": [0.2654, 0.7859, 0.3021, 0.8009]}, {"w": "a", "b": [0.3069, 0.7859, 0.3159, 0.8009]}, {"w": "wide", "b": [0.3207, 0.7859, 0.3568, 0.8009]}, {"w": "variety", "b": [0.3616, 0.7859, 0.4154, 0.8009]}, {"w": "of", "b": [0.4202, 0.7859, 0.4347, 0.8009]}, {"w": "algorithms.", "b": [0.4395, 0.7859, 0.5281, 0.8009]}, {"w": "Otherwise,", "b": [0.5358, 0.7859, 0.6204, 0.8009]}, {"w": "you", "b": [0.6254, 0.7859, 0.6535, 0.8009]}, {"w": "would", "b": [0.6583, 0.7859, 0.705, 0.8009]}, {"w": "prefer", "b": [0.7098, 0.7859, 0.7556, 0.8009]}, {"w": "incremental", "b": [0.7601, 0.7862, 0.8688, 0.8012]}, {"w": "learning", "b": [0.1774, 0.8042, 0.2521, 0.8191]}, {"w": "algorithms", "b": [0.2576, 0.8042, 0.3558, 0.8191]}, {"w": "that", "b": [0.3606, 0.8039, 0.3937, 0.8188]}, {"w": "can", "b": [0.3985, 0.8039, 0.4257, 0.8188]}, {"w": "improve", "b": [0.4305, 0.8039, 0.4933, 0.8188]}, {"w": "the", "b": [0.4981, 0.8039, 0.5232, 0.8188]}, {"w": "model", "b": [0.5281, 0.8039, 0.5758, 0.8188]}, {"w": "by", "b": [0.5806, 0.8039, 0.5997, 0.8188]}, {"w": "reading", "b": [0.6045, 0.8039, 0.6628, 0.8188]}, {"w": "data", "b": [0.6676, 0.8039, 0.7028, 0.8188]}, {"w": "gradually.", "b": [0.7076, 0.8039, 0.785, 0.8188]}, {"w": "Examples", "b": [0.7927, 0.8039, 0.869, 0.8188]}, {"w": "of", "b": [0.1774, 0.8218, 0.1922, 0.8368]}, {"w": "such", "b": [0.1984, 0.8218, 0.2339, 0.8368]}, {"w": "algorithms", "b": [0.24, 0.8218, 0.3253, 0.8368]}, {"w": "are", "b": [0.3314, 0.8218, 0.3561, 0.8368]}, {"w": "Naïve", "b": [0.3622, 0.8221, 0.4153, 0.8371]}, {"w": "Bayes", "b": [0.4224, 0.8221, 0.4759, 0.8371]}, {"w": "and", "b": [0.482, 0.8218, 0.5118, 0.8368]}, {"w": "the", "b": [0.5179, 0.8218, 0.5436, 0.8368]}, {"w": "algorithms", "b": [0.5497, 0.8218, 0.635, 0.8368]}, {"w": "for", "b": [0.6411, 0.8218, 0.6632, 0.8368]}, {"w": "training", "b": [0.6694, 0.8218, 0.733, 0.8368]}, {"w": "neural", "b": [0.7391, 0.8218, 0.7895, 0.8368]}, {"w": "networks.", "b": [0.7956, 0.8218, 0.8722, 0.8368]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "10", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 149, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Number of features and examples", "words": [{"w": "Number", "b": [0.1312, 0.0884, 0.2076, 0.1034]}, {"w": "of", "b": [0.2146, 0.0884, 0.2317, 0.1034]}, {"w": "features", "b": [0.2388, 0.0884, 0.3122, 0.1034]}, {"w": "and", "b": [0.3192, 0.0884, 0.3531, 0.1034]}, {"w": "examples", "b": [0.3602, 0.0884, 0.4449, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "How many training examples do you have in your dataset? How many features does each example have? Some algorithms, including those used for training neural networks and random forests, can handle a huge number of examples and millions of features. Others, like the algorithms for training support vector machines (SVM), can be relatively modest in their capacity.", "words": [{"w": "How", "b": [0.1774, 0.106, 0.2125, 0.121]}, {"w": "many", "b": [0.2173, 0.106, 0.2605, 0.121]}, {"w": "training", "b": [0.2653, 0.106, 0.3276, 0.121]}, {"w": "examples", "b": [0.3324, 0.106, 0.4044, 0.121]}, {"w": "do", "b": [0.4092, 0.106, 0.4283, 0.121]}, {"w": "you", "b": [0.4331, 0.106, 0.4612, 0.121]}, {"w": "have", "b": [0.466, 0.106, 0.5017, 0.121]}, {"w": "in", "b": [0.5065, 0.106, 0.5216, 0.121]}, {"w": "your", "b": [0.5264, 0.106, 0.5616, 0.121]}, {"w": "dataset?", "b": [0.5664, 0.106, 0.6323, 0.121]}, {"w": "How", "b": [0.64, 0.106, 0.6752, 0.121]}, {"w": "many", "b": [0.68, 0.106, 0.7232, 0.121]}, {"w": "features", "b": [0.728, 0.106, 0.79, 0.121]}, {"w": "does", "b": [0.7948, 0.106, 0.8295, 0.121]}, {"w": "each", "b": [0.8344, 0.106, 0.869, 0.121]}, {"w": "example", "b": [0.1774, 0.124, 0.244, 0.1389]}, {"w": "have?", "b": [0.2501, 0.124, 0.2956, 0.1389]}, {"w": "Some", "b": [0.3038, 0.124, 0.3471, 0.1389]}, {"w": "algorithms,", "b": [0.3533, 0.124, 0.4443, 0.1389]}, {"w": "including", "b": [0.4504, 0.124, 0.5248, 0.1389]}, {"w": "those", "b": [0.531, 0.124, 0.5734, 0.1389]}, {"w": "used", "b": [0.5796, 0.124, 0.6158, 0.1389]}, {"w": "for", "b": [0.622, 0.124, 0.6443, 0.1389]}, {"w": "training", "b": [0.6504, 0.124, 0.7145, 0.1389]}, {"w": "neural", "b": [0.7206, 0.1243, 0.7789, 0.1393]}, {"w": "networks", "b": [0.786, 0.1243, 0.8688, 0.1393]}, {"w": "and", "b": [0.1774, 0.1419, 0.2068, 0.1569]}, {"w": "random", "b": [0.2129, 0.1422, 0.2839, 0.1572]}, {"w": "forests,", "b": [0.2909, 0.1419, 0.3565, 0.1572]}, {"w": "can", "b": [0.3627, 0.1419, 0.3901, 0.1569]}, {"w": "handle", "b": [0.3962, 0.1419, 0.4491, 0.1569]}, {"w": "a", "b": [0.4552, 0.1419, 0.4644, 0.1569]}, {"w": "huge", "b": [0.4705, 0.1419, 0.5076, 0.1569]}, {"w": "number", "b": [0.5137, 0.1419, 0.5743, 0.1569]}, {"w": "of", "b": [0.5804, 0.1419, 0.5951, 0.1569]}, {"w": "examples", "b": [0.6013, 0.1419, 0.674, 0.1569]}, {"w": "and", "b": [0.6802, 0.1419, 0.7096, 0.1569]}, {"w": "millions", "b": [0.7157, 0.1419, 0.7778, 0.1569]}, {"w": "of", "b": [0.784, 0.1419, 0.7987, 0.1569]}, {"w": "features.", "b": [0.8048, 0.1419, 0.8726, 0.1569]}, {"w": "Others,", "b": [0.1774, 0.1599, 0.2382, 0.1748]}, {"w": "like", "b": [0.2453, 0.1599, 0.2736, 0.1748]}, {"w": "the", "b": [0.2806, 0.1599, 0.3067, 0.1748]}, {"w": "algorithms", "b": [0.3137, 0.1599, 0.4006, 0.1748]}, {"w": "for", "b": [0.4076, 0.1599, 0.4301, 0.1748]}, {"w": "training", "b": [0.4371, 0.1599, 0.502, 0.1748]}, {"w": "support", "b": [0.509, 0.1602, 0.5809, 0.1751]}, {"w": "vector", "b": [0.5889, 0.1602, 0.6463, 0.1751]}, {"w": "machines", "b": [0.6543, 0.1602, 0.7387, 0.1751]}, {"w": "(SVM),", "b": [0.7456, 0.1599, 0.8073, 0.1748]}, {"w": "can", "b": [0.8143, 0.1599, 0.8425, 0.1748]}, {"w": "be", "b": [0.8495, 0.1599, 0.8688, 0.1748]}, {"w": "relatively", "b": [0.1774, 0.1778, 0.2518, 0.1928]}, {"w": "modest", "b": [0.2579, 0.1778, 0.3159, 0.1928]}, {"w": "in", "b": [0.3221, 0.1778, 0.3375, 0.1928]}, {"w": "their", "b": [0.3436, 0.1778, 0.3816, 0.1928]}, {"w": "capacity.", "b": [0.3878, 0.1778, 0.458, 0.1928]}]}, {"id": "b_2", "type": "paragraph", "text": "Nonlinearity of the data", "words": [{"w": "Nonlinearity", "b": [0.1312, 0.2051, 0.2474, 0.22]}, {"w": "of", "b": [0.2544, 0.2051, 0.2715, 0.22]}, {"w": "the", "b": [0.2786, 0.2051, 0.3084, 0.22]}, {"w": "data", "b": [0.3154, 0.2051, 0.3561, 0.22]}]}, {"id": "b_3", "type": "paragraph", "text": "Is your data linearly separable? Can it be modeled using a linear model? If yes, SVM with the linear kernel, linear and logistic regression can be good choices. Otherwise, deep neural networks or ensemble models might work better.", "words": [{"w": "Is", "b": [0.1774, 0.2227, 0.1912, 0.2377]}, {"w": "your", "b": [0.1974, 0.2227, 0.2332, 0.2377]}, {"w": "data", "b": [0.2393, 0.2227, 0.2751, 0.2377]}, {"w": "linearly", "b": [0.2812, 0.2227, 0.341, 0.2377]}, {"w": "separable?", "b": [0.3471, 0.2227, 0.4305, 0.2377]}, {"w": "Can", "b": [0.4387, 0.2227, 0.4714, 0.2377]}, {"w": "it", "b": [0.4775, 0.2227, 0.4898, 0.2377]}, {"w": "be", "b": [0.4959, 0.2227, 0.5148, 0.2377]}, {"w": "modeled", "b": [0.521, 0.2227, 0.5879, 0.2377]}, {"w": "using", "b": [0.594, 0.2227, 0.636, 0.2377]}, {"w": "a", "b": [0.6421, 0.2227, 0.6513, 0.2377]}, {"w": "linear", "b": [0.6574, 0.2227, 0.7024, 0.2377]}, {"w": "model?", "b": [0.7086, 0.2227, 0.7658, 0.2377]}, {"w": "If", "b": [0.774, 0.2227, 0.7862, 0.2377]}, {"w": "yes,", "b": [0.7923, 0.2227, 0.8221, 0.2377]}, {"w": "SVM", "b": [0.8282, 0.2227, 0.869, 0.2377]}, {"w": "with", "b": [0.1767, 0.2406, 0.2133, 0.2556]}, {"w": "the", "b": [0.2197, 0.2406, 0.2458, 0.2556]}, {"w": "linear", "b": [0.2522, 0.2406, 0.2983, 0.2556]}, {"w": "kernel,", "b": [0.3047, 0.2406, 0.3591, 0.2556]}, {"w": "linear", "b": [0.3656, 0.2406, 0.4116, 0.2556]}, {"w": "and", "b": [0.418, 0.2406, 0.4484, 0.2556]}, {"w": "logistic", "b": [0.4547, 0.2406, 0.5124, 0.2556]}, {"w": "regression", "b": [0.5188, 0.2406, 0.5996, 0.2556]}, {"w": "can", "b": [0.606, 0.2406, 0.6342, 0.2556]}, {"w": "be", "b": [0.6406, 0.2406, 0.66, 0.2556]}, {"w": "good", "b": [0.6663, 0.2406, 0.7061, 0.2556]}, {"w": "choices.", "b": [0.7124, 0.2406, 0.7748, 0.2556]}, {"w": "Otherwise,", "b": [0.7837, 0.2406, 0.8717, 0.2556]}, {"w": "deep", "b": [0.1774, 0.2586, 0.2143, 0.2735]}, {"w": "neural", "b": [0.2204, 0.2586, 0.2707, 0.2735]}, {"w": "networks", "b": [0.2769, 0.2586, 0.3483, 0.2735]}, {"w": "or", "b": [0.3545, 0.2586, 0.3709, 0.2735]}, {"w": "ensemble", "b": [0.3771, 0.2586, 0.4495, 0.2735]}, {"w": "models", "b": [0.4556, 0.2586, 0.5116, 0.2735]}, {"w": "might", "b": [0.5178, 0.2586, 0.5644, 0.2735]}, {"w": "work", "b": [0.5706, 0.2586, 0.6096, 0.2735]}, {"w": "better.", "b": [0.6157, 0.2586, 0.6696, 0.2735]}]}, {"id": "b_4", "type": "paragraph", "text": "Training speed", "words": [{"w": "Training", "b": [0.1312, 0.2858, 0.2093, 0.3008]}, {"w": "speed", "b": [0.2163, 0.2858, 0.2683, 0.3008]}]}, {"id": "b_5", "type": "paragraph", "text": "How much time is a learning algorithm allowed to use to build a model, and how often you will need to retrain the model on updated data? If training takes two days, and you need to retrain your model every 4 hours, then your model will never be up to date. Neural networks are slow to train. Simple algorithms like linear and logistic regression, or decision trees, are much faster.", "words": [{"w": "How", "b": [0.1774, 0.3035, 0.2126, 0.3184]}, {"w": "much", "b": [0.2187, 0.3035, 0.2611, 0.3184]}, {"w": "time", "b": [0.2672, 0.3035, 0.3025, 0.3184]}, {"w": "is", "b": [0.3086, 0.3035, 0.3208, 0.3184]}, {"w": "a", "b": [0.327, 0.3035, 0.336, 0.3184]}, {"w": "learning", "b": [0.3422, 0.3035, 0.4057, 0.3184]}, {"w": "algorithm", "b": [0.4119, 0.3035, 0.4885, 0.3184]}, {"w": "allowed", "b": [0.4946, 0.3035, 0.5531, 0.3184]}, {"w": "to", "b": [0.5592, 0.3035, 0.5753, 0.3184]}, {"w": "use", "b": [0.5815, 0.3035, 0.6068, 0.3184]}, {"w": "to", "b": [0.6129, 0.3035, 0.6291, 0.3184]}, {"w": "build", "b": [0.6352, 0.3035, 0.6755, 0.3184]}, {"w": "a", "b": [0.6817, 0.3035, 0.6907, 0.3184]}, {"w": "model,", "b": [0.6969, 0.3035, 0.7498, 0.3184]}, {"w": "and", "b": [0.7559, 0.3035, 0.7852, 0.3184]}, {"w": "how", "b": [0.7913, 0.3035, 0.823, 0.3184]}, {"w": "often", "b": [0.8292, 0.3035, 0.869, 0.3184]}, {"w": "you", "b": [0.1769, 0.3214, 0.2062, 0.3364]}, {"w": "will", "b": [0.2123, 0.3214, 0.2416, 0.3364]}, {"w": "need", "b": [0.2477, 0.3214, 0.2854, 0.3364]}, {"w": "to", "b": [0.2915, 0.3214, 0.3082, 0.3364]}, {"w": "retrain", "b": [0.3144, 0.3214, 0.3699, 0.3364]}, {"w": "the", "b": [0.3761, 0.3214, 0.4022, 0.3364]}, {"w": "model", "b": [0.4083, 0.3214, 0.458, 0.3364]}, {"w": "on", "b": [0.4641, 0.3214, 0.484, 0.3364]}, {"w": "updated", "b": [0.4901, 0.3214, 0.5576, 0.3364]}, {"w": "data?", "b": [0.5637, 0.3214, 0.6092, 0.3364]}, {"w": "If", "b": [0.6174, 0.3214, 0.6299, 0.3364]}, {"w": "training", "b": [0.6361, 0.3214, 0.701, 0.3364]}, {"w": "takes", "b": [0.7071, 0.3214, 0.7491, 0.3364]}, {"w": "two", "b": [0.7552, 0.3214, 0.7845, 0.3364]}, {"w": "days,", "b": [0.7906, 0.3214, 0.8326, 0.3364]}, {"w": "and", "b": [0.8387, 0.3214, 0.8691, 0.3364]}, {"w": "you", "b": [0.1769, 0.3394, 0.205, 0.3543]}, {"w": "need", "b": [0.2107, 0.3394, 0.2469, 0.3543]}, {"w": "to", "b": [0.2526, 0.3394, 0.2687, 0.3543]}, {"w": "retrain", "b": [0.2744, 0.3394, 0.3278, 0.3543]}, {"w": "your", "b": [0.3335, 0.3394, 0.3687, 0.3543]}, {"w": "model", "b": [0.3745, 0.3394, 0.4222, 0.3543]}, {"w": "every", "b": [0.4279, 0.3394, 0.4697, 0.3543]}, {"w": "4", "b": [0.4753, 0.3394, 0.4843, 0.3543]}, {"w": "hours,", "b": [0.49, 0.3394, 0.5384, 0.3543]}, {"w": "then", "b": [0.5442, 0.3394, 0.5794, 0.3543]}, {"w": "your", "b": [0.5851, 0.3394, 0.6204, 0.3543]}, {"w": "model", "b": [0.6261, 0.3394, 0.6738, 0.3543]}, {"w": "will", "b": [0.6795, 0.3394, 0.7077, 0.3543]}, {"w": "never", "b": [0.7134, 0.3394, 0.7556, 0.3543]}, {"w": "be", "b": [0.7614, 0.3394, 0.78, 0.3543]}, {"w": "up", "b": [0.7857, 0.3394, 0.8058, 0.3543]}, {"w": "to", "b": [0.8115, 0.3394, 0.8276, 0.3543]}, {"w": "date.", "b": [0.8333, 0.3394, 0.8725, 0.3543]}, {"w": "Neural", "b": [0.1774, 0.3573, 0.2304, 0.3723]}, {"w": "networks", "b": [0.2366, 0.3573, 0.3069, 0.3723]}, {"w": "are", "b": [0.313, 0.3573, 0.3373, 0.3723]}, {"w": "slow", "b": [0.3435, 0.3573, 0.3774, 0.3723]}, {"w": "to", "b": [0.3835, 0.3573, 0.3997, 0.3723]}, {"w": "train.", "b": [0.4058, 0.3573, 0.4493, 0.3723]}, {"w": "Simple", "b": [0.4575, 0.3573, 0.511, 0.3723]}, {"w": "algorithms", "b": [0.5171, 0.3573, 0.6011, 0.3723]}, {"w": "like", "b": [0.6072, 0.3573, 0.6345, 0.3723]}, {"w": "linear", "b": [0.6406, 0.3573, 0.6852, 0.3723]}, {"w": "and", "b": [0.6913, 0.3573, 0.7206, 0.3723]}, {"w": "logistic", "b": [0.7267, 0.3573, 0.7824, 0.3723]}, {"w": "regression,", "b": [0.7885, 0.3573, 0.8716, 0.3723]}, {"w": "or", "b": [0.1774, 0.3752, 0.1938, 0.3902]}, {"w": "decision", "b": [0.2, 0.3752, 0.2637, 0.3902]}, {"w": "trees,", "b": [0.2698, 0.3752, 0.3131, 0.3902]}, {"w": "are", "b": [0.3192, 0.3752, 0.3439, 0.3902]}, {"w": "much", "b": [0.35, 0.3752, 0.3931, 0.3902]}, {"w": "faster.", "b": [0.3992, 0.3752, 0.4491, 0.3902]}]}, {"id": "b_6", "type": "paragraph", "text": "Specialized libraries contain very efficient implementations of some algorithms. You may prefer to do research online to find such libraries. Some algorithms, such as random forest learning, benefit from multiple CPU cores, so their training time can be significantly reduced on a machine with dozens of cores. Some machine learning libraries leverage GPU (graphics processing unit) to speed up training.", "words": [{"w": "Specialized", "b": [0.1774, 0.4022, 0.2679, 0.4171]}, {"w": "libraries", "b": [0.2743, 0.4022, 0.3404, 0.4171]}, {"w": "contain", "b": [0.3468, 0.4022, 0.407, 0.4171]}, {"w": "very", "b": [0.4134, 0.4022, 0.4485, 0.4171]}, {"w": "efficient", "b": [0.4549, 0.4022, 0.5182, 0.4171]}, {"w": "implementations", "b": [0.5246, 0.4022, 0.6602, 0.4171]}, {"w": "of", "b": [0.6666, 0.4022, 0.6817, 0.4171]}, {"w": "some", "b": [0.6882, 0.4022, 0.7291, 0.4171]}, {"w": "algorithms.", "b": [0.7355, 0.4022, 0.8276, 0.4171]}, {"w": "You", "b": [0.8366, 0.4022, 0.8691, 0.4171]}, {"w": "may", "b": [0.1774, 0.4201, 0.2119, 0.4351]}, {"w": "prefer", "b": [0.22, 0.4201, 0.2677, 0.4351]}, {"w": "to", "b": [0.2759, 0.4201, 0.2926, 0.4351]}, {"w": "do", "b": [0.3007, 0.4201, 0.3206, 0.4351]}, {"w": "research", "b": [0.3287, 0.4201, 0.3954, 0.4351]}, {"w": "online", "b": [0.4035, 0.4201, 0.4527, 0.4351]}, {"w": "to", "b": [0.4608, 0.4201, 0.4775, 0.4351]}, {"w": "find", "b": [0.4857, 0.4201, 0.5171, 0.4351]}, {"w": "such", "b": [0.5252, 0.4201, 0.5614, 0.4351]}, {"w": "libraries.", "b": [0.5695, 0.4201, 0.6409, 0.4351]}, {"w": "Some", "b": [0.655, 0.4201, 0.699, 0.4351]}, {"w": "algorithms,", "b": [0.7071, 0.4201, 0.7993, 0.4351]}, {"w": "such", "b": [0.8079, 0.4201, 0.8441, 0.4351]}, {"w": "as", "b": [0.8523, 0.4201, 0.8691, 0.4351]}, {"w": "random", "b": [0.1774, 0.4381, 0.2402, 0.453]}, {"w": "forest", "b": [0.2467, 0.4381, 0.2923, 0.453]}, {"w": "learning,", "b": [0.2988, 0.4381, 0.37, 0.453]}, {"w": "benefit", "b": [0.3766, 0.4381, 0.4326, 0.453]}, {"w": "from", "b": [0.4391, 0.4381, 0.4773, 0.453]}, {"w": "multiple", "b": [0.4839, 0.4381, 0.5513, 0.453]}, {"w": "CPU", "b": [0.5578, 0.4381, 0.5984, 0.453]}, {"w": "cores,", "b": [0.6049, 0.4381, 0.6511, 0.453]}, {"w": "so", "b": [0.6577, 0.4381, 0.6745, 0.453]}, {"w": "their", "b": [0.681, 0.4381, 0.7198, 0.453]}, {"w": "training", "b": [0.7263, 0.4381, 0.7912, 0.453]}, {"w": "time", "b": [0.7977, 0.4381, 0.8343, 0.453]}, {"w": "can", "b": [0.8408, 0.4381, 0.8691, 0.453]}, {"w": "be", "b": [0.1774, 0.456, 0.1967, 0.471]}, {"w": "significantly", "b": [0.2034, 0.456, 0.3018, 0.471]}, {"w": "reduced", "b": [0.3085, 0.456, 0.3724, 0.471]}, {"w": "on", "b": [0.3791, 0.456, 0.399, 0.471]}, {"w": "a", "b": [0.4057, 0.456, 0.4151, 0.471]}, {"w": "machine", "b": [0.4218, 0.456, 0.4893, 0.471]}, {"w": "with", "b": [0.496, 0.456, 0.5326, 0.471]}, {"w": "dozens", "b": [0.5393, 0.456, 0.5938, 0.471]}, {"w": "of", "b": [0.6005, 0.456, 0.6156, 0.471]}, {"w": "cores.", "b": [0.6223, 0.456, 0.6685, 0.471]}, {"w": "Some", "b": [0.6784, 0.456, 0.7223, 0.471]}, {"w": "machine", "b": [0.729, 0.456, 0.7965, 0.471]}, {"w": "learning", "b": [0.8032, 0.456, 0.8691, 0.471]}, {"w": "libraries", "b": [0.1774, 0.474, 0.2422, 0.4889]}, {"w": "leverage", "b": [0.2483, 0.474, 0.313, 0.4889]}, {"w": "GPU", "b": [0.3191, 0.474, 0.36, 0.4889]}, {"w": "(graphics", "b": [0.3662, 0.474, 0.4402, 0.4889]}, {"w": "processing", "b": [0.4463, 0.474, 0.5291, 0.4889]}, {"w": "unit)", "b": [0.5353, 0.474, 0.5753, 0.4889]}, {"w": "to", "b": [0.5815, 0.474, 0.5979, 0.4889]}, {"w": "speed", "b": [0.604, 0.474, 0.6487, 0.4889]}, {"w": "up", "b": [0.6549, 0.474, 0.6754, 0.4889]}, {"w": "training.", "b": [0.6815, 0.474, 0.7503, 0.4889]}]}, {"id": "b_7", "type": "paragraph", "text": "Prediction speed", "words": [{"w": "Prediction", "b": [0.1312, 0.5012, 0.2279, 0.5161]}, {"w": "speed", "b": [0.2349, 0.5012, 0.2869, 0.5161]}]}, {"id": "b_8", "type": "paragraph", "text": "How fast must the model be when generating predictions? Will your model be used in a production environment where very high throughput is required? Models like SVMs and linear and logistic regression models, and not-very-deep feedforward neural networks, are extremely fast at prediction time. Others, like kNN, ensemble algorithms, and very deep or recurrent neural networks, are slower.", "words": [{"w": "How", "b": [0.1774, 0.5188, 0.214, 0.5338]}, {"w": "fast", "b": [0.2203, 0.5188, 0.2502, 0.5338]}, {"w": "must", "b": [0.2565, 0.5188, 0.2969, 0.5338]}, {"w": "the", "b": [0.3032, 0.5188, 0.3294, 0.5338]}, {"w": "model", "b": [0.3357, 0.5188, 0.3853, 0.5338]}, {"w": "be", "b": [0.3916, 0.5188, 0.411, 0.5338]}, {"w": "when", "b": [0.4173, 0.5188, 0.4602, 0.5338]}, {"w": "generating", "b": [0.4665, 0.5188, 0.5523, 0.5338]}, {"w": "predictions?", "b": [0.5587, 0.5188, 0.6577, 0.5338]}, {"w": "Will", "b": [0.6664, 0.5188, 0.7014, 0.5338]}, {"w": "your", "b": [0.7077, 0.5188, 0.7444, 0.5338]}, {"w": "model", "b": [0.7507, 0.5188, 0.8004, 0.5338]}, {"w": "be", "b": [0.8067, 0.5188, 0.826, 0.5338]}, {"w": "used", "b": [0.8323, 0.5188, 0.8691, 0.5338]}, {"w": "in", "b": [0.1774, 0.5368, 0.1931, 0.5517]}, {"w": "a", "b": [0.2005, 0.5368, 0.21, 0.5517]}, {"w": "production", "b": [0.2174, 0.5368, 0.3069, 0.5517]}, {"w": "environment", "b": [0.3144, 0.5368, 0.4164, 0.5517]}, {"w": "where", "b": [0.4239, 0.5368, 0.4721, 0.5517]}, {"w": "very", "b": [0.4796, 0.5368, 0.5147, 0.5517]}, {"w": "high", "b": [0.5222, 0.5368, 0.5577, 0.5517]}, {"w": "throughput", "b": [0.5652, 0.5368, 0.6584, 0.5517]}, {"w": "is", "b": [0.6659, 0.5368, 0.6785, 0.5517]}, {"w": "required?", "b": [0.686, 0.5368, 0.7625, 0.5517]}, {"w": "Models", "b": [0.7747, 0.5368, 0.8334, 0.5517]}, {"w": "like", "b": [0.8409, 0.5368, 0.8691, 0.5517]}, {"w": "SVMs", "b": [0.1774, 0.5547, 0.2254, 0.5697]}, {"w": "and", "b": [0.2315, 0.5547, 0.2611, 0.5697]}, {"w": "linear", "b": [0.2672, 0.5547, 0.3121, 0.5697]}, {"w": "and", "b": [0.3183, 0.5547, 0.3478, 0.5697]}, {"w": "logistic", "b": [0.354, 0.5547, 0.4101, 0.5697]}, {"w": "regression", "b": [0.4163, 0.5547, 0.4951, 0.5697]}, {"w": "models,", "b": [0.5012, 0.5547, 0.562, 0.5697]}, {"w": "and", "b": [0.5681, 0.5547, 0.5977, 0.5697]}, {"w": "not-very-deep", "b": [0.6038, 0.5547, 0.7134, 0.5697]}, {"w": "feedforward", "b": [0.7196, 0.5547, 0.813, 0.5697]}, {"w": "neural", "b": [0.8191, 0.5547, 0.8691, 0.5697]}, {"w": "networks,", "b": [0.1774, 0.5727, 0.2524, 0.5876]}, {"w": "are", "b": [0.2582, 0.5727, 0.2824, 0.5876]}, {"w": "extremely", "b": [0.2882, 0.5727, 0.3657, 0.5876]}, {"w": "fast", "b": [0.3715, 0.5727, 0.4002, 0.5876]}, {"w": "at", "b": [0.4061, 0.5727, 0.4221, 0.5876]}, {"w": "prediction", "b": [0.428, 0.5727, 0.5074, 0.5876]}, {"w": "time.", "b": [0.5132, 0.5727, 0.5534, 0.5876]}, {"w": "Others,", "b": [0.5615, 0.5727, 0.62, 0.5876]}, {"w": "like", "b": [0.6258, 0.5727, 0.653, 0.5876]}, {"w": "kNN,", "b": [0.6588, 0.5727, 0.7005, 0.5876]}, {"w": "ensemble", "b": [0.7063, 0.5727, 0.7773, 0.5876]}, {"w": "algorithms,", "b": [0.7831, 0.5727, 0.8717, 0.5876]}, {"w": "and", "b": [0.1774, 0.5906, 0.2071, 0.6056]}, {"w": "very", "b": [0.2132, 0.5906, 0.2476, 0.6056]}, {"w": "deep", "b": [0.2538, 0.5906, 0.2907, 0.6056]}, {"w": "or", "b": [0.2969, 0.5906, 0.3133, 0.6056]}, {"w": "recurrent", "b": [0.3195, 0.5906, 0.393, 0.6056]}, {"w": "neural", "b": [0.3991, 0.5906, 0.4494, 0.6056]}, {"w": "networks,", "b": [0.4556, 0.5906, 0.5322, 0.6056]}, {"w": "are", "b": [0.5383, 0.5906, 0.563, 0.6056]}, {"w": "slower.", "b": [0.5691, 0.5906, 0.6236, 0.6056]}]}, {"id": "b_9", "type": "paragraph", "text": "If you don’t want to guess the best algorithm for your data, a popular way to choose one is by testing several candidate algorithms on the validation set as a hyperparameter. We talk about hyperparameter tuning in Section 5.6.", "words": [{"w": "If", "b": [0.1312, 0.6175, 0.1435, 0.6325]}, {"w": "you", "b": [0.1497, 0.6175, 0.1783, 0.6325]}, {"w": "don’t", "b": [0.1845, 0.6175, 0.2264, 0.6325]}, {"w": "want", "b": [0.2326, 0.6175, 0.2715, 0.6325]}, {"w": "to", "b": [0.2776, 0.6175, 0.294, 0.6325]}, {"w": "guess", "b": [0.3001, 0.6175, 0.3423, 0.6325]}, {"w": "the", "b": [0.3485, 0.6175, 0.3741, 0.6325]}, {"w": "best", "b": [0.3802, 0.6175, 0.4136, 0.6325]}, {"w": "algorithm", "b": [0.4198, 0.6175, 0.4976, 0.6325]}, {"w": "for", "b": [0.5037, 0.6175, 0.5258, 0.6325]}, {"w": "your", "b": [0.5319, 0.6175, 0.5678, 0.6325]}, {"w": "data,", "b": [0.574, 0.6175, 0.6149, 0.6325]}, {"w": "a", "b": [0.621, 0.6175, 0.6302, 0.6325]}, {"w": "popular", "b": [0.6364, 0.6175, 0.6984, 0.6325]}, {"w": "way", "b": [0.7045, 0.6175, 0.7357, 0.6325]}, {"w": "to", "b": [0.7419, 0.6175, 0.7582, 0.6325]}, {"w": "choose", "b": [0.7644, 0.6175, 0.8167, 0.6325]}, {"w": "one", "b": [0.8229, 0.6175, 0.8505, 0.6325]}, {"w": "is", "b": [0.8567, 0.6175, 0.8691, 0.6325]}, {"w": "by", "b": [0.1312, 0.6355, 0.1503, 0.6504]}, {"w": "testing", "b": [0.1562, 0.6355, 0.2096, 0.6504]}, {"w": "several", "b": [0.2155, 0.6355, 0.2689, 0.6504]}, {"w": "candidate", "b": [0.2748, 0.6355, 0.3512, 0.6504]}, {"w": "algorithms", "b": [0.3571, 0.6355, 0.4407, 0.6504]}, {"w": "on", "b": [0.4466, 0.6355, 0.4657, 0.6504]}, {"w": "the", "b": [0.4716, 0.6355, 0.4967, 0.6504]}, {"w": "validation", "b": [0.5024, 0.6358, 0.5932, 0.6507]}, {"w": "set", "b": [0.6, 0.6358, 0.6264, 0.6507]}, {"w": "as", "b": [0.6322, 0.6355, 0.6484, 0.6504]}, {"w": "a", "b": [0.6543, 0.6355, 0.6634, 0.6504]}, {"w": "hyperparameter.", "b": [0.6693, 0.6355, 0.7996, 0.6504]}, {"w": "We", "b": [0.8077, 0.6355, 0.8328, 0.6504]}, {"w": "talk", "b": [0.8387, 0.6355, 0.8693, 0.6504]}, {"w": "about", "b": [0.1312, 0.6534, 0.1779, 0.6684]}, {"w": "hyperparameter", "b": [0.184, 0.6534, 0.3119, 0.6684]}, {"w": "tuning", "b": [0.318, 0.6534, 0.3703, 0.6684]}, {"w": "in", "b": [0.3765, 0.6534, 0.3918, 0.6684]}, {"w": "Section", "b": [0.398, 0.6534, 0.4565, 0.6684]}, {"w": "5.6.", "b": [0.4626, 0.6534, 0.4913, 0.6684]}]}, {"id": "b_10", "type": "equation", "text": "5.3.2 Algorithm Spot-Checking", "words": [{"w": "5.3.2", "b": [0.1312, 0.7016, 0.1749, 0.7165]}, {"w": "Algorithm", "b": [0.1961, 0.7016, 0.2916, 0.7165]}, {"w": "Spot-Checking", "b": [0.2987, 0.7016, 0.4339, 0.7165]}]}, {"id": "b_11", "type": "paragraph", "text": "Shortlisting candidate learning algorithms for a given problem is sometimes called algorithm spot-checking. For the most effective spot-checking, it is recommended to:", "words": [{"w": "Shortlisting", "b": [0.1312, 0.7379, 0.2228, 0.7528]}, {"w": "candidate", "b": [0.2281, 0.7379, 0.3045, 0.7528]}, {"w": "learning", "b": [0.3098, 0.7379, 0.3731, 0.7528]}, {"w": "algorithms", "b": [0.3784, 0.7379, 0.4619, 0.7528]}, {"w": "for", "b": [0.4672, 0.7379, 0.4889, 0.7528]}, {"w": "a", "b": [0.4941, 0.7379, 0.5032, 0.7528]}, {"w": "given", "b": [0.5084, 0.7379, 0.5496, 0.7528]}, {"w": "problem", "b": [0.5549, 0.7379, 0.6192, 0.7528]}, {"w": "is", "b": [0.6245, 0.7379, 0.6367, 0.7528]}, {"w": "sometimes", "b": [0.6419, 0.7379, 0.7235, 0.7528]}, {"w": "called", "b": [0.7288, 0.7379, 0.774, 0.7528]}, {"w": "algorithm", "b": [0.779, 0.7382, 0.8688, 0.7531]}, {"w": "spot-checking.", "b": [0.1312, 0.7558, 0.2619, 0.7711]}, {"w": "For", "b": [0.2701, 0.7558, 0.2971, 0.7708]}, {"w": "the", "b": [0.3032, 0.7558, 0.3289, 0.7708]}, {"w": "most", "b": [0.335, 0.7558, 0.3741, 0.7708]}, {"w": "effective", "b": [0.3802, 0.7558, 0.4454, 0.7708]}, {"w": "spot-checking,", "b": [0.4515, 0.7558, 0.5654, 0.7708]}, {"w": "it", "b": [0.5716, 0.7558, 0.5839, 0.7708]}, {"w": "is", "b": [0.5901, 0.7558, 0.6025, 0.7708]}, {"w": "recommended", "b": [0.6086, 0.7558, 0.7194, 0.7708]}, {"w": "to:", "b": [0.7256, 0.7558, 0.7471, 0.7708]}]}, {"id": "b_12", "type": "paragraph", "text": "• select algorithms based on different principles (sometimes called orthogonal), such as instance-based algorithms, kernel-based, shallow learning, deep learning, ensembles; • try each algorithm with 3 −5 different values of the most sensitive hyperparameters (such as the number of neighbors k in k-nearest neighbors, penalty C in support vector", "words": [{"w": "•", "b": [0.1538, 0.7827, 0.1681, 0.7977]}, {"w": "select", "b": [0.1774, 0.7827, 0.2219, 0.7977]}, {"w": "algorithms", "b": [0.2281, 0.7827, 0.314, 0.7977]}, {"w": "based", "b": [0.3202, 0.7827, 0.3658, 0.7977]}, {"w": "on", "b": [0.372, 0.7827, 0.3916, 0.7977]}, {"w": "different", "b": [0.3978, 0.7827, 0.465, 0.7977]}, {"w": "principles", "b": [0.4712, 0.7827, 0.5489, 0.7977]}, {"w": "(sometimes", "b": [0.5551, 0.7827, 0.6462, 0.7977]}, {"w": "called", "b": [0.6524, 0.7827, 0.6989, 0.7977]}, {"w": "orthogonal),", "b": [0.7051, 0.7827, 0.8044, 0.7977]}, {"w": "such", "b": [0.8105, 0.7827, 0.8463, 0.7977]}, {"w": "as", "b": [0.8525, 0.7827, 0.8691, 0.7977]}, {"w": "instance-based", "b": [0.1774, 0.8007, 0.2945, 0.8156]}, {"w": "algorithms,", "b": [0.3006, 0.8007, 0.391, 0.8156]}, {"w": "kernel-based,", "b": [0.3972, 0.8007, 0.5019, 0.8156]}, {"w": "shallow", "b": [0.5081, 0.8007, 0.5671, 0.8156]}, {"w": "learning,", "b": [0.5733, 0.8007, 0.6431, 0.8156]}, {"w": "deep", "b": [0.6492, 0.8007, 0.6862, 0.8156]}, {"w": "learning,", "b": [0.6923, 0.8007, 0.7621, 0.8156]}, {"w": "ensembles;", "b": [0.7683, 0.8007, 0.8531, 0.8156]}, {"w": "•", "b": [0.1538, 0.8186, 0.1681, 0.8336]}, {"w": "try", "b": [0.1774, 0.8186, 0.202, 0.8336]}, {"w": "each", "b": [0.2081, 0.8186, 0.2442, 0.8336]}, {"w": "algorithm", "b": [0.2504, 0.8186, 0.3299, 0.8336]}, {"w": "with", "b": [0.336, 0.8186, 0.3726, 0.8336]}, {"w": "3", "b": [0.3787, 0.8186, 0.3881, 0.8336]}, {"w": "−5", "b": [0.3921, 0.8186, 0.42, 0.8337]}, {"w": "different", "b": [0.4261, 0.8186, 0.4942, 0.8336]}, {"w": "values", "b": [0.5003, 0.8186, 0.5501, 0.8336]}, {"w": "of", "b": [0.5562, 0.8186, 0.5714, 0.8336]}, {"w": "the", "b": [0.5775, 0.8186, 0.6037, 0.8336]}, {"w": "most", "b": [0.6098, 0.8186, 0.6497, 0.8336]}, {"w": "sensitive", "b": [0.6558, 0.8186, 0.7251, 0.8336]}, {"w": "hyperparameters", "b": [0.7312, 0.8186, 0.869, 0.8336]}, {"w": "(such", "b": [0.1752, 0.8366, 0.217, 0.8515]}, {"w": "as", "b": [0.2231, 0.8366, 0.2393, 0.8515]}, {"w": "the", "b": [0.2453, 0.8366, 0.2705, 0.8515]}, {"w": "number", "b": [0.2766, 0.8366, 0.3364, 0.8515]}, {"w": "of", "b": [0.3425, 0.8366, 0.357, 0.8515]}, {"w": "neighbors", "b": [0.3631, 0.8366, 0.4387, 0.8515]}, {"w": "k", "b": [0.4446, 0.8368, 0.4542, 0.8518]}, {"w": "in", "b": [0.4609, 0.8366, 0.4759, 0.8515]}, {"w": "k-nearest", "b": [0.482, 0.8366, 0.5547, 0.8518]}, {"w": "neighbors,", "b": [0.5607, 0.8366, 0.6413, 0.8515]}, {"w": "penalty", "b": [0.6474, 0.8366, 0.7062, 0.8515]}, {"w": "C", "b": [0.7121, 0.8368, 0.7253, 0.8518]}, {"w": "in", "b": [0.7327, 0.8366, 0.7478, 0.8515]}, {"w": "support", "b": [0.7539, 0.8366, 0.8148, 0.8515]}, {"w": "vector", "b": [0.8209, 0.8366, 0.8692, 0.8515]}]}, {"id": "b_13", "type": "paragraph", "text": "machines, or decision threshold in logistic regression);", "words": [{"w": "machines,", "b": [0.1774, 0.8545, 0.2559, 0.8695]}, {"w": "or", "b": [0.2621, 0.8545, 0.2785, 0.8695]}, {"w": "decision", "b": [0.2847, 0.8545, 0.3484, 0.8695]}, {"w": "threshold", "b": [0.3545, 0.8545, 0.4295, 0.8695]}, {"w": "in", "b": [0.4357, 0.8545, 0.4511, 0.8695]}, {"w": "logistic", "b": [0.4572, 0.8545, 0.5137, 0.8695]}, {"w": "regression);", "b": [0.5199, 0.8545, 0.6115, 0.8695]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "11", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 150, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 3: Machine learning algorithm selection diagram for scikit-learn. Source: scikit-learn.org", "words": [{"w": "Figure", "b": [0.7969, 0.7497, 0.8154, 0.792]}, {"w": "3:", "b": [0.7969, 0.7331, 0.8154, 0.7447]}, {"w": "Machine", "b": [0.7969, 0.6716, 0.8154, 0.7265]}, {"w": "learning", "b": [0.7969, 0.6142, 0.8154, 0.6666]}, {"w": "algorithm", "b": [0.7969, 0.546, 0.8154, 0.6092]}, {"w": "selection", "b": [0.7969, 0.4852, 0.8154, 0.541]}, {"w": "diagram", "b": [0.7969, 0.427, 0.8154, 0.4802]}, {"w": "for", "b": [0.7969, 0.4041, 0.8154, 0.422]}, {"w": "scikit-learn.", "b": [0.7969, 0.3229, 0.8154, 0.3991]}, {"w": "Source:", "b": [0.7969, 0.2688, 0.8154, 0.3163]}, {"w": "scikit-learn.org", "b": [0.7969, 0.1652, 0.8154, 0.2622]}]}, {"id": "b_1", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "12", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 151, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• use the same training/validation split for all experiments, • if the learning algorithm is not deterministic (such as the learning algorithms for neural networks and random forests), run several experiments, and then average the results; • once the project is over, note which algorithms performed the best, and use this information when working on a similar problem in the future.", "words": [{"w": "•", "b": [0.1538, 0.0881, 0.1681, 0.1031]}, {"w": "use", "b": [0.1774, 0.0881, 0.2031, 0.1031]}, {"w": "the", "b": [0.2093, 0.0881, 0.2349, 0.1031]}, {"w": "same", "b": [0.241, 0.0881, 0.2811, 0.1031]}, {"w": "training/validation", "b": [0.2873, 0.0881, 0.4396, 0.1031]}, {"w": "split", "b": [0.4458, 0.0881, 0.4807, 0.1031]}, {"w": "for", "b": [0.4869, 0.0881, 0.509, 0.1031]}, {"w": "all", "b": [0.5151, 0.0881, 0.5346, 0.1031]}, {"w": "experiments,", "b": [0.5408, 0.0881, 0.643, 0.1031]}, {"w": "•", "b": [0.1538, 0.106, 0.1681, 0.121]}, {"w": "if", "b": [0.1774, 0.106, 0.1879, 0.121]}, {"w": "the", "b": [0.1936, 0.106, 0.2188, 0.121]}, {"w": "learning", "b": [0.2245, 0.106, 0.2878, 0.121]}, {"w": "algorithm", "b": [0.2936, 0.106, 0.37, 0.121]}, {"w": "is", "b": [0.3757, 0.106, 0.3878, 0.121]}, {"w": "not", "b": [0.3936, 0.106, 0.4197, 0.121]}, {"w": "deterministic", "b": [0.4254, 0.106, 0.5281, 0.121]}, {"w": "(such", "b": [0.5338, 0.106, 0.5756, 0.121]}, {"w": "as", "b": [0.5813, 0.106, 0.5975, 0.121]}, {"w": "the", "b": [0.6032, 0.106, 0.6284, 0.121]}, {"w": "learning", "b": [0.6341, 0.106, 0.6974, 0.121]}, {"w": "algorithms", "b": [0.7032, 0.106, 0.7867, 0.121]}, {"w": "for", "b": [0.7924, 0.106, 0.8141, 0.121]}, {"w": "neural", "b": [0.8198, 0.106, 0.8691, 0.121]}, {"w": "networks", "b": [0.1774, 0.124, 0.2488, 0.1389]}, {"w": "and", "b": [0.2549, 0.124, 0.2847, 0.1389]}, {"w": "random", "b": [0.2908, 0.124, 0.3524, 0.1389]}, {"w": "forests),", "b": [0.3585, 0.124, 0.4229, 0.1389]}, {"w": "run", "b": [0.429, 0.124, 0.4568, 0.1389]}, {"w": "several", "b": [0.4629, 0.124, 0.5175, 0.1389]}, {"w": "experiments,", "b": [0.5236, 0.124, 0.6258, 0.1389]}, {"w": "and", "b": [0.632, 0.124, 0.6617, 0.1389]}, {"w": "then", "b": [0.6678, 0.124, 0.7038, 0.1389]}, {"w": "average", "b": [0.7099, 0.124, 0.7699, 0.1389]}, {"w": "the", "b": [0.7761, 0.124, 0.8017, 0.1389]}, {"w": "results;", "b": [0.8079, 0.124, 0.8656, 0.1389]}, {"w": "•", "b": [0.1538, 0.1419, 0.1681, 0.1569]}, {"w": "once", "b": [0.1774, 0.1419, 0.214, 0.1569]}, {"w": "the", "b": [0.2226, 0.1419, 0.2487, 0.1569]}, {"w": "project", "b": [0.2573, 0.1419, 0.3149, 0.1569]}, {"w": "is", "b": [0.3235, 0.1419, 0.3362, 0.1569]}, {"w": "over,", "b": [0.3448, 0.1419, 0.3841, 0.1569]}, {"w": "note", "b": [0.3933, 0.1419, 0.4288, 0.1569]}, {"w": "which", "b": [0.4374, 0.1419, 0.4851, 0.1569]}, {"w": "algorithms", "b": [0.4937, 0.1419, 0.5806, 0.1569]}, {"w": "performed", "b": [0.5892, 0.1419, 0.673, 0.1569]}, {"w": "the", "b": [0.6816, 0.1419, 0.7077, 0.1569]}, {"w": "best,", "b": [0.7163, 0.1419, 0.7557, 0.1569]}, {"w": "and", "b": [0.7649, 0.1419, 0.7952, 0.1569]}, {"w": "use", "b": [0.8038, 0.1419, 0.8301, 0.1569]}, {"w": "this", "b": [0.8387, 0.1419, 0.8691, 0.1569]}, {"w": "information", "b": [0.1774, 0.1599, 0.2712, 0.1748]}, {"w": "when", "b": [0.2774, 0.1599, 0.3194, 0.1748]}, {"w": "working", "b": [0.3256, 0.1599, 0.3892, 0.1748]}, {"w": "on", "b": [0.3953, 0.1599, 0.4148, 0.1748]}, {"w": "a", "b": [0.421, 0.1599, 0.4302, 0.1748]}, {"w": "similar", "b": [0.4363, 0.1599, 0.4908, 0.1748]}, {"w": "problem", "b": [0.497, 0.1599, 0.5627, 0.1748]}, {"w": "in", "b": [0.5688, 0.1599, 0.5842, 0.1748]}, {"w": "the", "b": [0.5903, 0.1599, 0.616, 0.1748]}, {"w": "future.", "b": [0.6221, 0.1599, 0.676, 0.1748]}]}, {"id": "b_1", "type": "paragraph", "text": "While you don’t know your problem well, try to solve it using as many orthogonal approaches", "words": [{"w": "While", "b": [0.1303, 0.1868, 0.177, 0.2018]}, {"w": "you", "b": [0.1826, 0.1868, 0.2107, 0.2018]}, {"w": "don’t", "b": [0.2163, 0.1868, 0.2575, 0.2018]}, {"w": "know", "b": [0.2631, 0.1868, 0.3043, 0.2018]}, {"w": "your", "b": [0.3099, 0.1868, 0.3451, 0.2018]}, {"w": "problem", "b": [0.3507, 0.1868, 0.4151, 0.2018]}, {"w": "well,", "b": [0.4207, 0.1868, 0.4563, 0.2018]}, {"w": "try", "b": [0.462, 0.1868, 0.4857, 0.2018]}, {"w": "to", "b": [0.4913, 0.1868, 0.5074, 0.2018]}, {"w": "solve", "b": [0.5129, 0.1868, 0.5512, 0.2018]}, {"w": "it", "b": [0.5568, 0.1868, 0.5689, 0.2018]}, {"w": "using", "b": [0.5745, 0.1868, 0.6158, 0.2018]}, {"w": "as", "b": [0.6214, 0.1868, 0.6376, 0.2018]}, {"w": "many", "b": [0.6432, 0.1868, 0.6863, 0.2018]}, {"w": "orthogonal", "b": [0.6919, 0.1868, 0.7764, 0.2018]}, {"w": "approaches", "b": [0.782, 0.1868, 0.8691, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "as possible, rather than spending a lot of time on the most promising approach. It is generally a better idea to spend time experimenting with new algorithms and libraries, rather than trying to squeeze the maximum from the one with which you have the most experience.", "words": [{"w": "as", "b": [0.1312, 0.2048, 0.1474, 0.2197]}, {"w": "possible,", "b": [0.1527, 0.2048, 0.2198, 0.2197]}, {"w": "rather", "b": [0.2252, 0.2048, 0.2736, 0.2197]}, {"w": "than", "b": [0.2788, 0.2048, 0.315, 0.2197]}, {"w": "spending", "b": [0.3203, 0.2048, 0.3903, 0.2197]}, {"w": "a", "b": [0.3956, 0.2048, 0.4046, 0.2197]}, {"w": "lot", "b": [0.4099, 0.2048, 0.431, 0.2197]}, {"w": "of", "b": [0.4363, 0.2048, 0.4509, 0.2197]}, {"w": "time", "b": [0.4561, 0.2048, 0.4913, 0.2197]}, {"w": "on", "b": [0.4966, 0.2048, 0.5157, 0.2197]}, {"w": "the", "b": [0.521, 0.2048, 0.5461, 0.2197]}, {"w": "most", "b": [0.5514, 0.2048, 0.5897, 0.2197]}, {"w": "promising", "b": [0.5949, 0.2048, 0.6725, 0.2197]}, {"w": "approach.", "b": [0.6777, 0.2048, 0.7547, 0.2197]}, {"w": "It", "b": [0.7626, 0.2048, 0.7761, 0.2197]}, {"w": "is", "b": [0.7814, 0.2048, 0.7936, 0.2197]}, {"w": "generally", "b": [0.7989, 0.2048, 0.8698, 0.2197]}, {"w": "a", "b": [0.1312, 0.2227, 0.1406, 0.2377]}, {"w": "better", "b": [0.1469, 0.2227, 0.1967, 0.2377]}, {"w": "idea", "b": [0.203, 0.2227, 0.2364, 0.2377]}, {"w": "to", "b": [0.2428, 0.2227, 0.2595, 0.2377]}, {"w": "spend", "b": [0.2658, 0.2227, 0.3135, 0.2377]}, {"w": "time", "b": [0.3198, 0.2227, 0.3564, 0.2377]}, {"w": "experimenting", "b": [0.3627, 0.2227, 0.4794, 0.2377]}, {"w": "with", "b": [0.4857, 0.2227, 0.5223, 0.2377]}, {"w": "new", "b": [0.5285, 0.2227, 0.561, 0.2377]}, {"w": "algorithms", "b": [0.5673, 0.2227, 0.6542, 0.2377]}, {"w": "and", "b": [0.6605, 0.2227, 0.6909, 0.2377]}, {"w": "libraries,", "b": [0.6972, 0.2227, 0.7685, 0.2377]}, {"w": "rather", "b": [0.7748, 0.2227, 0.8252, 0.2377]}, {"w": "than", "b": [0.8314, 0.2227, 0.8691, 0.2377]}, {"w": "trying", "b": [0.1312, 0.2406, 0.18, 0.2556]}, {"w": "to", "b": [0.1861, 0.2406, 0.2025, 0.2556]}, {"w": "squeeze", "b": [0.2087, 0.2406, 0.2688, 0.2556]}, {"w": "the", "b": [0.275, 0.2406, 0.3006, 0.2556]}, {"w": "maximum", "b": [0.3068, 0.2406, 0.3867, 0.2556]}, {"w": "from", "b": [0.3928, 0.2406, 0.4303, 0.2556]}, {"w": "the", "b": [0.4365, 0.2406, 0.4621, 0.2556]}, {"w": "one", "b": [0.4683, 0.2406, 0.496, 0.2556]}, {"w": "with", "b": [0.5021, 0.2406, 0.538, 0.2556]}, {"w": "which", "b": [0.5441, 0.2406, 0.5908, 0.2556]}, {"w": "you", "b": [0.5969, 0.2406, 0.6257, 0.2556]}, {"w": "have", "b": [0.6318, 0.2406, 0.6682, 0.2556]}, {"w": "the", "b": [0.6744, 0.2406, 0.7, 0.2556]}, {"w": "most", "b": [0.7061, 0.2406, 0.7452, 0.2556]}, {"w": "experience.", "b": [0.7513, 0.2406, 0.8407, 0.2556]}]}, {"id": "b_3", "type": "paragraph", "text": "If you don’t have time to carefully spot-check algorithms, one simple “hack” is to find an efficient implementation of a learning algorithm or a model that most modern papers claim to beat, when applied to a problem similar to yours, and use it for solving your problem.", "words": [{"w": "If", "b": [0.1312, 0.2676, 0.1438, 0.2825]}, {"w": "you", "b": [0.1503, 0.2676, 0.1796, 0.2825]}, {"w": "don’t", "b": [0.1861, 0.2676, 0.229, 0.2825]}, {"w": "have", "b": [0.2355, 0.2676, 0.2726, 0.2825]}, {"w": "time", "b": [0.2791, 0.2676, 0.3157, 0.2825]}, {"w": "to", "b": [0.3222, 0.2676, 0.339, 0.2825]}, {"w": "carefully", "b": [0.3455, 0.2676, 0.4156, 0.2825]}, {"w": "spot-check", "b": [0.4221, 0.2676, 0.508, 0.2825]}, {"w": "algorithms,", "b": [0.5145, 0.2676, 0.6067, 0.2825]}, {"w": "one", "b": [0.6133, 0.2676, 0.6416, 0.2825]}, {"w": "simple", "b": [0.6481, 0.2676, 0.7005, 0.2825]}, {"w": "“hack”", "b": [0.707, 0.2676, 0.7624, 0.2825]}, {"w": "is", "b": [0.7689, 0.2676, 0.7816, 0.2825]}, {"w": "to", "b": [0.7881, 0.2676, 0.8048, 0.2825]}, {"w": "find", "b": [0.8113, 0.2676, 0.8427, 0.2825]}, {"w": "an", "b": [0.8492, 0.2676, 0.8691, 0.2825]}, {"w": "efficient", "b": [0.1312, 0.2855, 0.1932, 0.3005]}, {"w": "implementation", "b": [0.1994, 0.2855, 0.3248, 0.3005]}, {"w": "of", "b": [0.3309, 0.2855, 0.3458, 0.3005]}, {"w": "a", "b": [0.3519, 0.2855, 0.3612, 0.3005]}, {"w": "learning", "b": [0.3673, 0.2855, 0.4319, 0.3005]}, {"w": "algorithm", "b": [0.438, 0.2855, 0.5159, 0.3005]}, {"w": "or", "b": [0.522, 0.2855, 0.5385, 0.3005]}, {"w": "a", "b": [0.5446, 0.2855, 0.5538, 0.3005]}, {"w": "model", "b": [0.56, 0.2855, 0.6086, 0.3005]}, {"w": "that", "b": [0.6147, 0.2855, 0.6485, 0.3005]}, {"w": "most", "b": [0.6547, 0.2855, 0.6937, 0.3005]}, {"w": "modern", "b": [0.6998, 0.2855, 0.7608, 0.3005]}, {"w": "papers", "b": [0.7669, 0.2855, 0.8199, 0.3005]}, {"w": "claim", "b": [0.826, 0.2855, 0.869, 0.3005]}, {"w": "to", "b": [0.1312, 0.3035, 0.1476, 0.3184]}, {"w": "beat,", "b": [0.1538, 0.3035, 0.1943, 0.3184]}, {"w": "when", "b": [0.2004, 0.3035, 0.2425, 0.3184]}, {"w": "applied", "b": [0.2486, 0.3035, 0.3071, 0.3184]}, {"w": "to", "b": [0.3133, 0.3035, 0.3297, 0.3184]}, {"w": "a", "b": [0.3358, 0.3035, 0.345, 0.3184]}, {"w": "problem", "b": [0.3512, 0.3035, 0.4168, 0.3184]}, {"w": "similar", "b": [0.423, 0.3035, 0.4775, 0.3184]}, {"w": "to", "b": [0.4837, 0.3035, 0.5001, 0.3184]}, {"w": "yours,", "b": [0.5062, 0.3035, 0.5546, 0.3184]}, {"w": "and", "b": [0.5607, 0.3035, 0.5904, 0.3184]}, {"w": "use", "b": [0.5966, 0.3035, 0.6224, 0.3184]}, {"w": "it", "b": [0.6285, 0.3035, 0.6408, 0.3184]}, {"w": "for", "b": [0.6469, 0.3035, 0.669, 0.3184]}, {"w": "solving", "b": [0.6752, 0.3035, 0.7312, 0.3184]}, {"w": "your", "b": [0.7373, 0.3035, 0.7733, 0.3184]}, {"w": "problem.", "b": [0.7794, 0.3035, 0.8502, 0.3184]}]}, {"id": "b_4", "type": "paragraph", "text": "If you use scikit-learn, you could try their algorithm selection diagram shown in Figure 3.", "words": [{"w": "If", "b": [0.1312, 0.3304, 0.1435, 0.3453]}, {"w": "you", "b": [0.1497, 0.3304, 0.1784, 0.3453]}, {"w": "use", "b": [0.1846, 0.3304, 0.2103, 0.3453]}, {"w": "scikit-learn,", "b": [0.2165, 0.3304, 0.3104, 0.3453]}, {"w": "you", "b": [0.3166, 0.3304, 0.3453, 0.3453]}, {"w": "could", "b": [0.3515, 0.3304, 0.3945, 0.3453]}, {"w": "try", "b": [0.4007, 0.3304, 0.4248, 0.3453]}, {"w": "their", "b": [0.431, 0.3304, 0.469, 0.3453]}, {"w": "algorithm", "b": [0.4751, 0.3304, 0.5531, 0.3453]}, {"w": "selection", "b": [0.5592, 0.3304, 0.6281, 0.3453]}, {"w": "diagram", "b": [0.6342, 0.3304, 0.6999, 0.3453]}, {"w": "shown", "b": [0.706, 0.3304, 0.7559, 0.3453]}, {"w": "in", "b": [0.762, 0.3304, 0.7774, 0.3453]}, {"w": "Figure", "b": [0.7835, 0.3304, 0.8356, 0.3453]}, {"w": "3.", "b": [0.8418, 0.3304, 0.8562, 0.3453]}]}, {"id": "b_5", "type": "paragraph", "text": "5.4 Building a Pipeline", "words": [{"w": "5.4", "b": [0.1312, 0.3792, 0.1631, 0.3971]}, {"w": "Building", "b": [0.188, 0.3792, 0.2805, 0.3971]}, {"w": "a", "b": [0.2888, 0.3792, 0.3009, 0.3971]}, {"w": "Pipeline", "b": [0.3092, 0.3792, 0.3981, 0.3971]}]}, {"id": "b_6", "type": "paragraph", "text": "Many modern machine learning packages and frameworks support the notion of a pipeline. A pipeline is a sequence of transformations the training data goes through, before it becomes a model. An example of a pipeline used to train a document classification model out of a collection of labeled text documents is shown below:", "words": [{"w": "Many", "b": [0.1312, 0.4178, 0.1765, 0.4328]}, {"w": "modern", "b": [0.1827, 0.4178, 0.2433, 0.4328]}, {"w": "machine", "b": [0.2495, 0.4178, 0.3152, 0.4328]}, {"w": "learning", "b": [0.3213, 0.4178, 0.3855, 0.4328]}, {"w": "packages", "b": [0.3917, 0.4178, 0.4621, 0.4328]}, {"w": "and", "b": [0.4682, 0.4178, 0.4977, 0.4328]}, {"w": "frameworks", "b": [0.5039, 0.4178, 0.5952, 0.4328]}, {"w": "support", "b": [0.6014, 0.4178, 0.6632, 0.4328]}, {"w": "the", "b": [0.6693, 0.4178, 0.6948, 0.4328]}, {"w": "notion", "b": [0.7009, 0.4178, 0.7518, 0.4328]}, {"w": "of", "b": [0.758, 0.4178, 0.7728, 0.4328]}, {"w": "a", "b": [0.7789, 0.4178, 0.7881, 0.4328]}, {"w": "pipeline.", "b": [0.7942, 0.4178, 0.8724, 0.4331]}, {"w": "A", "b": [0.1305, 0.4357, 0.1441, 0.4507]}, {"w": "pipeline", "b": [0.1501, 0.4357, 0.2119, 0.4507]}, {"w": "is", "b": [0.2179, 0.4357, 0.2301, 0.4507]}, {"w": "a", "b": [0.2361, 0.4357, 0.2451, 0.4507]}, {"w": "sequence", "b": [0.2511, 0.4357, 0.3201, 0.4507]}, {"w": "of", "b": [0.3261, 0.4357, 0.3406, 0.4507]}, {"w": "transformations", "b": [0.3466, 0.4357, 0.471, 0.4507]}, {"w": "the", "b": [0.477, 0.4357, 0.5022, 0.4507]}, {"w": "training", "b": [0.5082, 0.4357, 0.5705, 0.4507]}, {"w": "data", "b": [0.5765, 0.4357, 0.6117, 0.4507]}, {"w": "goes", "b": [0.6177, 0.4357, 0.6514, 0.4507]}, {"w": "through,", "b": [0.6574, 0.4357, 0.7248, 0.4507]}, {"w": "before", "b": [0.7308, 0.4357, 0.7792, 0.4507]}, {"w": "it", "b": [0.7851, 0.4357, 0.7972, 0.4507]}, {"w": "becomes", "b": [0.8032, 0.4357, 0.8691, 0.4507]}, {"w": "a", "b": [0.1312, 0.4537, 0.1406, 0.4686]}, {"w": "model.", "b": [0.147, 0.4537, 0.2019, 0.4686]}, {"w": "An", "b": [0.2107, 0.4537, 0.2353, 0.4686]}, {"w": "example", "b": [0.2416, 0.4537, 0.3091, 0.4686]}, {"w": "of", "b": [0.3155, 0.4537, 0.3306, 0.4686]}, {"w": "a", "b": [0.337, 0.4537, 0.3464, 0.4686]}, {"w": "pipeline", "b": [0.3528, 0.4537, 0.4171, 0.4686]}, {"w": "used", "b": [0.4234, 0.4537, 0.4602, 0.4686]}, {"w": "to", "b": [0.4665, 0.4537, 0.4833, 0.4686]}, {"w": "train", "b": [0.4896, 0.4537, 0.5294, 0.4686]}, {"w": "a", "b": [0.5358, 0.4537, 0.5452, 0.4686]}, {"w": "document", "b": [0.5515, 0.4537, 0.6321, 0.4686]}, {"w": "classification", "b": [0.6384, 0.4537, 0.7422, 0.4686]}, {"w": "model", "b": [0.7486, 0.4537, 0.7982, 0.4686]}, {"w": "out", "b": [0.8046, 0.4537, 0.8318, 0.4686]}, {"w": "of", "b": [0.8381, 0.4537, 0.8533, 0.4686]}, {"w": "a", "b": [0.8597, 0.4537, 0.8691, 0.4686]}, {"w": "collection", "b": [0.1312, 0.4716, 0.2071, 0.4866]}, {"w": "of", "b": [0.2133, 0.4716, 0.2281, 0.4866]}, {"w": "labeled", "b": [0.2343, 0.4716, 0.2912, 0.4866]}, {"w": "text", "b": [0.2974, 0.4716, 0.3297, 0.4866]}, {"w": "documents", "b": [0.3358, 0.4716, 0.4221, 0.4866]}, {"w": "is", "b": [0.4282, 0.4716, 0.4406, 0.4866]}, {"w": "shown", "b": [0.4468, 0.4716, 0.4966, 0.4866]}, {"w": "below:", "b": [0.5028, 0.4716, 0.554, 0.4866]}]}, {"id": "b_7", "type": "paragraph", "text": "Tokenization Feature Extraction", "words": [{"w": "Tokenization", "b": [0.2001, 0.5245, 0.264, 0.5338]}, {"w": "Feature", "b": [0.3437, 0.5192, 0.3834, 0.5285]}, {"w": "Extraction", "b": [0.338, 0.5298, 0.3891, 0.5392]}]}, {"id": "b_8", "type": "paragraph", "text": "Feature selection", "words": [{"w": "Feature", "b": [0.4752, 0.5192, 0.5148, 0.5285]}, {"w": "selection", "b": [0.4723, 0.5298, 0.5177, 0.5392]}]}, {"id": "b_9", "type": "paragraph", "text": "Feature normalization", "words": [{"w": "Feature", "b": [0.6067, 0.5192, 0.6463, 0.5285]}, {"w": "normalization", "b": [0.5923, 0.5298, 0.6607, 0.5392]}]}, {"id": "b_10", "type": "paragraph", "text": "Model training Model", "words": [{"w": "Model", "b": [0.7423, 0.5192, 0.7736, 0.5285]}, {"w": "training", "b": [0.7391, 0.5298, 0.7768, 0.5392]}, {"w": "Model", "b": [0.8779, 0.5325, 0.9092, 0.5418]}]}, {"id": "b_11", "type": "paragraph", "text": "Figure 4: A pipeline used to produce a model starting with raw data.", "words": [{"w": "Figure", "b": [0.2188, 0.5695, 0.2709, 0.5845]}, {"w": "4:", "b": [0.2771, 0.5695, 0.2914, 0.5845]}, {"w": "A", "b": [0.2996, 0.5695, 0.3135, 0.5845]}, {"w": "pipeline", "b": [0.3196, 0.5695, 0.3827, 0.5845]}, {"w": "used", "b": [0.3889, 0.5695, 0.4249, 0.5845]}, {"w": "to", "b": [0.431, 0.5695, 0.4474, 0.5845]}, {"w": "produce", "b": [0.4536, 0.5695, 0.5177, 0.5845]}, {"w": "a", "b": [0.5239, 0.5695, 0.5331, 0.5845]}, {"w": "model", "b": [0.5392, 0.5695, 0.5879, 0.5845]}, {"w": "starting", "b": [0.5941, 0.5695, 0.6568, 0.5845]}, {"w": "with", "b": [0.663, 0.5695, 0.6988, 0.5845]}, {"w": "raw", "b": [0.705, 0.5695, 0.7342, 0.5845]}, {"w": "data.", "b": [0.7404, 0.5695, 0.7814, 0.5845]}]}, {"id": "b_12", "type": "paragraph", "text": "Every stage of a pipeline receives the output of the previous stage, except for the first stage, whose input is the training dataset.", "words": [{"w": "Every", "b": [0.1312, 0.6198, 0.1777, 0.6347]}, {"w": "stage", "b": [0.1839, 0.6198, 0.2246, 0.6347]}, {"w": "of", "b": [0.2307, 0.6198, 0.2454, 0.6347]}, {"w": "a", "b": [0.2516, 0.6198, 0.2607, 0.6347]}, {"w": "pipeline", "b": [0.2668, 0.6198, 0.3293, 0.6347]}, {"w": "receives", "b": [0.3354, 0.6198, 0.3965, 0.6347]}, {"w": "the", "b": [0.4027, 0.6198, 0.4281, 0.6347]}, {"w": "output", "b": [0.4342, 0.6198, 0.488, 0.6347]}, {"w": "of", "b": [0.4941, 0.6198, 0.5089, 0.6347]}, {"w": "the", "b": [0.515, 0.6198, 0.5404, 0.6347]}, {"w": "previous", "b": [0.5465, 0.6198, 0.6132, 0.6347]}, {"w": "stage,", "b": [0.6193, 0.6198, 0.6651, 0.6347]}, {"w": "except", "b": [0.6712, 0.6198, 0.7225, 0.6347]}, {"w": "for", "b": [0.7287, 0.6198, 0.7505, 0.6347]}, {"w": "the", "b": [0.7567, 0.6198, 0.7821, 0.6347]}, {"w": "first", "b": [0.7882, 0.6198, 0.8198, 0.6347]}, {"w": "stage,", "b": [0.826, 0.6198, 0.8718, 0.6347]}, {"w": "whose", "b": [0.1306, 0.6377, 0.1789, 0.6527]}, {"w": "input", "b": [0.185, 0.6377, 0.2281, 0.6527]}, {"w": "is", "b": [0.2342, 0.6377, 0.2467, 0.6527]}, {"w": "the", "b": [0.2528, 0.6377, 0.2785, 0.6527]}, {"w": "training", "b": [0.2846, 0.6377, 0.3482, 0.6527]}, {"w": "dataset.", "b": [0.3544, 0.6377, 0.4181, 0.6527]}]}, {"id": "b_13", "type": "paragraph", "text": "Below is a Python code fragment that constructs a simple scikit-learn pipeline. It consists of two steps: 1) dimensionality reduction using Principal Component Analysis (PCA), and 2) training a support vector machine (SVM) classifier:", "words": [{"w": "Below", "b": [0.1312, 0.6646, 0.1792, 0.6796]}, {"w": "is", "b": [0.1854, 0.6646, 0.1977, 0.6796]}, {"w": "a", "b": [0.2038, 0.6646, 0.213, 0.6796]}, {"w": "Python", "b": [0.2191, 0.6646, 0.2778, 0.6796]}, {"w": "code", "b": [0.284, 0.6646, 0.3201, 0.6796]}, {"w": "fragment", "b": [0.3262, 0.6646, 0.3974, 0.6796]}, {"w": "that", "b": [0.4035, 0.6646, 0.4371, 0.6796]}, {"w": "constructs", "b": [0.4432, 0.6646, 0.5248, 0.6796]}, {"w": "a", "b": [0.5309, 0.6646, 0.5401, 0.6796]}, {"w": "simple", "b": [0.5462, 0.6646, 0.5971, 0.6796]}, {"w": "scikit-learn", "b": [0.6031, 0.6649, 0.7057, 0.6799]}, {"w": "pipeline.", "b": [0.7119, 0.6646, 0.7795, 0.6796]}, {"w": "It", "b": [0.7877, 0.6646, 0.8014, 0.6796]}, {"w": "consists", "b": [0.8076, 0.6646, 0.8689, 0.6796]}, {"w": "of", "b": [0.1312, 0.6826, 0.1463, 0.6975]}, {"w": "two", "b": [0.1525, 0.6826, 0.1815, 0.6975]}, {"w": "steps:", "b": [0.1877, 0.6826, 0.2336, 0.6975]}, {"w": "1)", "b": [0.2419, 0.6826, 0.2585, 0.6975]}, {"w": "dimensionality", "b": [0.2647, 0.6826, 0.3832, 0.6975]}, {"w": "reduction", "b": [0.3893, 0.6826, 0.4663, 0.6975]}, {"w": "using", "b": [0.4725, 0.6826, 0.5151, 0.6975]}, {"w": "Principal", "b": [0.5214, 0.6829, 0.6056, 0.6978]}, {"w": "Component", "b": [0.6127, 0.6829, 0.7203, 0.6978]}, {"w": "Analysis", "b": [0.7274, 0.6829, 0.8053, 0.6978]}, {"w": "(PCA),", "b": [0.8114, 0.6826, 0.8713, 0.6975]}, {"w": "and", "b": [0.1312, 0.7005, 0.161, 0.7155]}, {"w": "2)", "b": [0.1671, 0.7005, 0.1835, 0.7155]}, {"w": "training", "b": [0.1897, 0.7005, 0.2533, 0.7155]}, {"w": "a", "b": [0.2595, 0.7005, 0.2687, 0.7155]}, {"w": "support", "b": [0.275, 0.7008, 0.3469, 0.7158]}, {"w": "vector", "b": [0.354, 0.7008, 0.4113, 0.7158]}, {"w": "machine", "b": [0.4184, 0.7008, 0.4945, 0.7158]}, {"w": "(SVM)", "b": [0.5006, 0.7005, 0.5559, 0.7155]}, {"w": "classifier:", "b": [0.5621, 0.7005, 0.6352, 0.7155]}]}, {"id": "b_14", "type": "paragraph", "text": "1 from sklearn.pipeline import Pipeline", "words": [{"w": "1", "b": [0.1028, 0.7336, 0.1091, 0.7411]}, {"w": "from", "b": [0.1312, 0.7275, 0.17, 0.7424]}, {"w": "sklearn.pipeline", "b": [0.1797, 0.7275, 0.3346, 0.7424]}, {"w": "import", "b": [0.3443, 0.7275, 0.4024, 0.7424]}, {"w": "Pipeline", "b": [0.4121, 0.7275, 0.4896, 0.7424]}]}, {"id": "b_15", "type": "paragraph", "text": "2 from sklearn.svm import SVC", "words": [{"w": "2", "b": [0.1028, 0.7515, 0.1091, 0.759]}, {"w": "from", "b": [0.1312, 0.7454, 0.17, 0.7604]}, {"w": "sklearn.svm", "b": [0.1797, 0.7454, 0.2862, 0.7604]}, {"w": "import", "b": [0.2959, 0.7454, 0.354, 0.7604]}, {"w": "SVC", "b": [0.3637, 0.7454, 0.3928, 0.7604]}]}, {"id": "b_16", "type": "paragraph", "text": "3 from sklearn.decomposition import PCA", "words": [{"w": "3", "b": [0.1028, 0.7695, 0.1091, 0.777]}, {"w": "from", "b": [0.1312, 0.7633, 0.17, 0.7783]}, {"w": "sklearn.decomposition", "b": [0.1797, 0.7633, 0.3831, 0.7783]}, {"w": "import", "b": [0.3928, 0.7633, 0.4509, 0.7783]}, {"w": "PCA", "b": [0.4606, 0.7633, 0.4896, 0.7783]}]}, {"id": "b_18", "type": "paragraph", "text": "5 # Define a pipeline", "words": [{"w": "5", "b": [0.1028, 0.8054, 0.1091, 0.8128]}, {"w": "#", "b": [0.1312, 0.8003, 0.1409, 0.8153]}, {"w": "Define", "b": [0.1506, 0.8003, 0.2087, 0.8153]}, {"w": "a", "b": [0.2184, 0.8003, 0.2281, 0.8153]}, {"w": "pipeline", "b": [0.2378, 0.8003, 0.3153, 0.8153]}]}, {"id": "b_19", "type": "equation", "text": "6 pipe = Pipeline([('dim_reduction', PCA()), ('model_training', SVC())])", "words": [{"w": "6", "b": [0.1028, 0.8233, 0.1091, 0.8308]}, {"w": "pipe", "b": [0.1312, 0.8172, 0.17, 0.8321]}, {"w": "=", "b": [0.1797, 0.8172, 0.1893, 0.8321]}, {"w": "Pipeline([('dim_reduction',", "b": [0.199, 0.8172, 0.4606, 0.8321]}, {"w": "PCA()),", "b": [0.4702, 0.8172, 0.538, 0.8321]}, {"w": "('model_training',", "b": [0.5477, 0.8172, 0.7221, 0.8321]}, {"w": "SVC())])", "b": [0.7318, 0.8172, 0.8092, 0.8321]}]}, {"id": "b_21", "type": "paragraph", "text": "8 # Train parameters of both PCA and SVC", "words": [{"w": "8", "b": [0.1028, 0.8592, 0.1091, 0.8667]}, {"w": "#", "b": [0.1312, 0.8541, 0.1409, 0.8691]}, {"w": "Train", "b": [0.1506, 0.8541, 0.199, 0.8691]}, {"w": "parameters", "b": [0.2087, 0.8541, 0.3056, 0.8691]}, {"w": "of", "b": [0.3153, 0.8541, 0.3346, 0.8691]}, {"w": "both", "b": [0.3443, 0.8541, 0.3831, 0.8691]}, {"w": "PCA", "b": [0.3928, 0.8541, 0.4218, 0.8691]}, {"w": "and", "b": [0.4315, 0.8541, 0.4606, 0.8691]}, {"w": "SVC", "b": [0.4702, 0.8541, 0.4993, 0.8691]}]}, {"id": "b_22", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "13", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 152, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "9 pipe.fit(X, y)", "words": [{"w": "9", "b": [0.1028, 0.0942, 0.1091, 0.1017]}, {"w": "pipe.fit(X,", "b": [0.1312, 0.0881, 0.2378, 0.1031]}, {"w": "y)", "b": [0.2475, 0.0881, 0.2668, 0.1031]}]}, {"id": "b_2", "type": "paragraph", "text": "11 # Make a prediction", "words": [{"w": "11", "b": [0.0965, 0.1301, 0.1091, 0.1376]}, {"w": "#", "b": [0.1312, 0.125, 0.1409, 0.14]}, {"w": "Make", "b": [0.1506, 0.125, 0.1893, 0.14]}, {"w": "a", "b": [0.199, 0.125, 0.2087, 0.14]}, {"w": "prediction", "b": [0.2184, 0.125, 0.3153, 0.14]}]}, {"id": "b_3", "type": "equation", "text": "12 pipe.predict(new_example)", "words": [{"w": "12", "b": [0.0965, 0.1481, 0.1091, 0.1555]}, {"w": "pipe.predict(new_example)", "b": [0.1312, 0.1419, 0.3734, 0.1569]}]}, {"id": "b_4", "type": "paragraph", "text": "When the command pipe.predict(new_example) is executed, the input example is first", "words": [{"w": "When", "b": [0.1303, 0.1689, 0.1789, 0.1838]}, {"w": "the", "b": [0.186, 0.1689, 0.2121, 0.1838]}, {"w": "command", "b": [0.2191, 0.1689, 0.2986, 0.1838]}, {"w": "pipe.predict(new_example)", "b": [0.3056, 0.1689, 0.5477, 0.1838]}, {"w": "is", "b": [0.5547, 0.1689, 0.5674, 0.1838]}, {"w": "executed,", "b": [0.5744, 0.1689, 0.6513, 0.1838]}, {"w": "the", "b": [0.6585, 0.1689, 0.6847, 0.1838]}, {"w": "input", "b": [0.6917, 0.1689, 0.7357, 0.1838]}, {"w": "example", "b": [0.7427, 0.1689, 0.8101, 0.1838]}, {"w": "is", "b": [0.8172, 0.1689, 0.8298, 0.1838]}, {"w": "first", "b": [0.8369, 0.1689, 0.8694, 0.1838]}]}, {"id": "b_5", "type": "paragraph", "text": "transformed into a reduced dimensionality vector using the PCA model. That reduced dimensionality vector is used as input to the SVM model. PCA and SVM models were trained, one after the other, when the command pipe.fit(X, y) were executed.", "words": [{"w": "transformed", "b": [0.1312, 0.1868, 0.2303, 0.2018]}, {"w": "into", "b": [0.2384, 0.1868, 0.2703, 0.2018]}, {"w": "a", "b": [0.2784, 0.1868, 0.2878, 0.2018]}, {"w": "reduced", "b": [0.2958, 0.1868, 0.3597, 0.2018]}, {"w": "dimensionality", "b": [0.3678, 0.1868, 0.4872, 0.2018]}, {"w": "vector", "b": [0.4952, 0.1868, 0.5455, 0.2018]}, {"w": "using", "b": [0.5536, 0.1868, 0.5966, 0.2018]}, {"w": "the", "b": [0.6047, 0.1868, 0.6308, 0.2018]}, {"w": "PCA", "b": [0.6389, 0.1868, 0.6794, 0.2018]}, {"w": "model.", "b": [0.6875, 0.1868, 0.7424, 0.2018]}, {"w": "That", "b": [0.7564, 0.1868, 0.7971, 0.2018]}, {"w": "reduced", "b": [0.8052, 0.1868, 0.8691, 0.2018]}, {"w": "dimensionality", "b": [0.1312, 0.2048, 0.2506, 0.2197]}, {"w": "vector", "b": [0.2582, 0.2048, 0.3085, 0.2197]}, {"w": "is", "b": [0.3161, 0.2048, 0.3287, 0.2197]}, {"w": "used", "b": [0.3364, 0.2048, 0.3731, 0.2197]}, {"w": "as", "b": [0.3807, 0.2048, 0.3975, 0.2197]}, {"w": "input", "b": [0.4051, 0.2048, 0.4491, 0.2197]}, {"w": "to", "b": [0.4567, 0.2048, 0.4734, 0.2197]}, {"w": "the", "b": [0.481, 0.2048, 0.5072, 0.2197]}, {"w": "SVM", "b": [0.5148, 0.2048, 0.5566, 0.2197]}, {"w": "model.", "b": [0.5642, 0.2048, 0.6191, 0.2197]}, {"w": "PCA", "b": [0.6317, 0.2048, 0.6722, 0.2197]}, {"w": "and", "b": [0.6798, 0.2048, 0.7101, 0.2197]}, {"w": "SVM", "b": [0.7177, 0.2048, 0.7596, 0.2197]}, {"w": "models", "b": [0.7672, 0.2048, 0.8243, 0.2197]}, {"w": "were", "b": [0.8319, 0.2048, 0.8691, 0.2197]}, {"w": "trained,", "b": [0.1312, 0.2227, 0.1939, 0.2377]}, {"w": "one", "b": [0.2, 0.2227, 0.2277, 0.2377]}, {"w": "after", "b": [0.2338, 0.2227, 0.2713, 0.2377]}, {"w": "the", "b": [0.2775, 0.2227, 0.3031, 0.2377]}, {"w": "other,", "b": [0.3093, 0.2227, 0.3565, 0.2377]}, {"w": "when", "b": [0.3626, 0.2227, 0.4047, 0.2377]}, {"w": "the", "b": [0.4108, 0.2227, 0.4365, 0.2377]}, {"w": "command", "b": [0.4426, 0.2227, 0.5205, 0.2377]}, {"w": "pipe.fit(X,", "b": [0.5265, 0.2227, 0.6331, 0.2377]}, {"w": "y)", "b": [0.6427, 0.2227, 0.6621, 0.2377]}, {"w": "were", "b": [0.6683, 0.2227, 0.7047, 0.2377]}, {"w": "executed.", "b": [0.7109, 0.2227, 0.7863, 0.2377]}]}, {"id": "b_6", "type": "paragraph", "text": "Unfortunately, defining and training pipelines in R is not as straightforward as in Python, so we don’t put the code in the book.", "words": [{"w": "Unfortunately,", "b": [0.1312, 0.2496, 0.2458, 0.2646]}, {"w": "defining", "b": [0.252, 0.2496, 0.3143, 0.2646]}, {"w": "and", "b": [0.3204, 0.2496, 0.3496, 0.2646]}, {"w": "training", "b": [0.3557, 0.2496, 0.418, 0.2646]}, {"w": "pipelines", "b": [0.4242, 0.2496, 0.4931, 0.2646]}, {"w": "in", "b": [0.4993, 0.2496, 0.5144, 0.2646]}, {"w": "R", "b": [0.5205, 0.2496, 0.5338, 0.2646]}, {"w": "is", "b": [0.5399, 0.2496, 0.5521, 0.2646]}, {"w": "not", "b": [0.5582, 0.2496, 0.5843, 0.2646]}, {"w": "as", "b": [0.5905, 0.2496, 0.6067, 0.2646]}, {"w": "straightforward", "b": [0.6128, 0.2496, 0.7341, 0.2646]}, {"w": "as", "b": [0.7402, 0.2496, 0.7564, 0.2646]}, {"w": "in", "b": [0.7625, 0.2496, 0.7776, 0.2646]}, {"w": "Python,", "b": [0.7838, 0.2496, 0.8468, 0.2646]}, {"w": "so", "b": [0.8529, 0.2496, 0.8691, 0.2646]}, {"w": "we", "b": [0.1306, 0.2676, 0.1516, 0.2825]}, {"w": "don’t", "b": [0.1577, 0.2676, 0.1998, 0.2825]}, {"w": "put", "b": [0.2059, 0.2676, 0.2336, 0.2825]}, {"w": "the", "b": [0.2398, 0.2676, 0.2654, 0.2825]}, {"w": "code", "b": [0.2716, 0.2676, 0.308, 0.2825]}, {"w": "in", "b": [0.3141, 0.2676, 0.3295, 0.2825]}, {"w": "the", "b": [0.3357, 0.2676, 0.3613, 0.2825]}, {"w": "book.", "b": [0.3675, 0.2676, 0.412, 0.2825]}]}, {"id": "b_7", "type": "paragraph", "text": "The pipeline can be saved to a file similar to saving a model. It will be deployed to production and used to generate predictions. In other words, during the scoring, the input example passes through the entire pipeline and “becomes” an output.", "words": [{"w": "The", "b": [0.1306, 0.2945, 0.1617, 0.3094]}, {"w": "pipeline", "b": [0.167, 0.2945, 0.2288, 0.3094]}, {"w": "can", "b": [0.234, 0.2945, 0.2612, 0.3094]}, {"w": "be", "b": [0.2664, 0.2945, 0.285, 0.3094]}, {"w": "saved", "b": [0.2903, 0.2945, 0.333, 0.3094]}, {"w": "to", "b": [0.3383, 0.2945, 0.3544, 0.3094]}, {"w": "a", "b": [0.3596, 0.2945, 0.3686, 0.3094]}, {"w": "file", "b": [0.3739, 0.2945, 0.397, 0.3094]}, {"w": "similar", "b": [0.4022, 0.2945, 0.4557, 0.3094]}, {"w": "to", "b": [0.4609, 0.2945, 0.477, 0.3094]}, {"w": "saving", "b": [0.4822, 0.2945, 0.5315, 0.3094]}, {"w": "a", "b": [0.5368, 0.2945, 0.5458, 0.3094]}, {"w": "model.", "b": [0.551, 0.2945, 0.6038, 0.3094]}, {"w": "It", "b": [0.6117, 0.2945, 0.6253, 0.3094]}, {"w": "will", "b": [0.6305, 0.2945, 0.6586, 0.3094]}, {"w": "be", "b": [0.6639, 0.2945, 0.6825, 0.3094]}, {"w": "deployed", "b": [0.6877, 0.2945, 0.7566, 0.3094]}, {"w": "to", "b": [0.7618, 0.2945, 0.7779, 0.3094]}, {"w": "production", "b": [0.7831, 0.2945, 0.8691, 0.3094]}, {"w": "and", "b": [0.1312, 0.3124, 0.1616, 0.3274]}, {"w": "used", "b": [0.1681, 0.3124, 0.2049, 0.3274]}, {"w": "to", "b": [0.2114, 0.3124, 0.2282, 0.3274]}, {"w": "generate", "b": [0.2347, 0.3124, 0.3038, 0.3274]}, {"w": "predictions.", "b": [0.3104, 0.3124, 0.4058, 0.3274]}, {"w": "In", "b": [0.4152, 0.3124, 0.4325, 0.3274]}, {"w": "other", "b": [0.439, 0.3124, 0.482, 0.3274]}, {"w": "words,", "b": [0.4885, 0.3124, 0.5415, 0.3274]}, {"w": "during", "b": [0.5482, 0.3124, 0.6016, 0.3274]}, {"w": "the", "b": [0.6082, 0.3124, 0.6343, 0.3274]}, {"w": "scoring,", "b": [0.6406, 0.3124, 0.7115, 0.3277]}, {"w": "the", "b": [0.7182, 0.3124, 0.7443, 0.3274]}, {"w": "input", "b": [0.7509, 0.3124, 0.7948, 0.3274]}, {"w": "example", "b": [0.8014, 0.3124, 0.8688, 0.3274]}, {"w": "passes", "b": [0.1312, 0.3304, 0.1808, 0.3453]}, {"w": "through", "b": [0.1869, 0.3304, 0.2506, 0.3453]}, {"w": "the", "b": [0.2567, 0.3304, 0.2824, 0.3453]}, {"w": "entire", "b": [0.2885, 0.3304, 0.3342, 0.3453]}, {"w": "pipeline", "b": [0.3404, 0.3304, 0.4034, 0.3453]}, {"w": "and", "b": [0.4096, 0.3304, 0.4393, 0.3453]}, {"w": "“becomes”", "b": [0.4455, 0.3304, 0.5302, 0.3453]}, {"w": "an", "b": [0.5363, 0.3304, 0.5558, 0.3453]}, {"w": "output.", "b": [0.5619, 0.3304, 0.6214, 0.3453]}]}, {"id": "b_8", "type": "paragraph", "text": "As you can see, the notion of a pipeline is a generalization of the notion of a model. From this point forward, unless stated otherwise, when I refer to model training, saving, deployment, serving, monitoring, or post-production maintenance, I mean the entire pipeline.", "words": [{"w": "As", "b": [0.1305, 0.3573, 0.1512, 0.3723]}, {"w": "you", "b": [0.1567, 0.3573, 0.1848, 0.3723]}, {"w": "can", "b": [0.1902, 0.3573, 0.2173, 0.3723]}, {"w": "see,", "b": [0.2228, 0.3573, 0.251, 0.3723]}, {"w": "the", "b": [0.2566, 0.3573, 0.2817, 0.3723]}, {"w": "notion", "b": [0.2871, 0.3573, 0.3374, 0.3723]}, {"w": "of", "b": [0.3428, 0.3573, 0.3574, 0.3723]}, {"w": "a", "b": [0.3628, 0.3573, 0.3718, 0.3723]}, {"w": "pipeline", "b": [0.3773, 0.3573, 0.4391, 0.3723]}, {"w": "is", "b": [0.4445, 0.3573, 0.4567, 0.3723]}, {"w": "a", "b": [0.4621, 0.3573, 0.4711, 0.3723]}, {"w": "generalization", "b": [0.4766, 0.3573, 0.5862, 0.3723]}, {"w": "of", "b": [0.5916, 0.3573, 0.6062, 0.3723]}, {"w": "the", "b": [0.6116, 0.3573, 0.6367, 0.3723]}, {"w": "notion", "b": [0.6421, 0.3573, 0.6924, 0.3723]}, {"w": "of", "b": [0.6978, 0.3573, 0.7124, 0.3723]}, {"w": "a", "b": [0.7178, 0.3573, 0.7268, 0.3723]}, {"w": "model.", "b": [0.7322, 0.3573, 0.785, 0.3723]}, {"w": "From", "b": [0.793, 0.3573, 0.8344, 0.3723]}, {"w": "this", "b": [0.8398, 0.3573, 0.8691, 0.3723]}, {"w": "point", "b": [0.1312, 0.3752, 0.1737, 0.3902]}, {"w": "forward,", "b": [0.1798, 0.3752, 0.2472, 0.3902]}, {"w": "unless", "b": [0.2534, 0.3752, 0.3023, 0.3902]}, {"w": "stated", "b": [0.3084, 0.3752, 0.3582, 0.3902]}, {"w": "otherwise,", "b": [0.3644, 0.3752, 0.4464, 0.3902]}, {"w": "when", "b": [0.4525, 0.3752, 0.495, 0.3902]}, {"w": "I", "b": [0.5011, 0.3752, 0.5078, 0.3902]}, {"w": "refer", "b": [0.514, 0.3752, 0.5509, 0.3902]}, {"w": "to", "b": [0.557, 0.3752, 0.5736, 0.3902]}, {"w": "model", "b": [0.5797, 0.3752, 0.6289, 0.3902]}, {"w": "training,", "b": [0.635, 0.3752, 0.7044, 0.3902]}, {"w": "saving,", "b": [0.7106, 0.3752, 0.7666, 0.3902]}, {"w": "deployment,", "b": [0.7728, 0.3752, 0.8717, 0.3902]}, {"w": "serving,", "b": [0.1312, 0.3932, 0.1934, 0.4082]}, {"w": "monitoring,", "b": [0.1996, 0.3932, 0.2929, 0.4082]}, {"w": "or", "b": [0.2991, 0.3932, 0.3155, 0.4082]}, {"w": "post-production", "b": [0.3217, 0.3932, 0.45, 0.4082]}, {"w": "maintenance,", "b": [0.4562, 0.3932, 0.5623, 0.4082]}, {"w": "I", "b": [0.5685, 0.3932, 0.5751, 0.4082]}, {"w": "mean", "b": [0.5813, 0.3932, 0.6243, 0.4082]}, {"w": "the", "b": [0.6305, 0.3932, 0.6561, 0.4082]}, {"w": "entire", "b": [0.6623, 0.3932, 0.708, 0.4082]}, {"w": "pipeline.", "b": [0.7141, 0.3932, 0.7823, 0.4082]}]}, {"id": "b_9", "type": "paragraph", "text": "Before we consider the challenge of training a model, we need to decide how to measure the model quality. Often, we have a choice between several competing models, so-called model candidates, but only one will be deployed in production.", "words": [{"w": "Before", "b": [0.1312, 0.4201, 0.1825, 0.4351]}, {"w": "we", "b": [0.1886, 0.4201, 0.2095, 0.4351]}, {"w": "consider", "b": [0.2157, 0.4201, 0.281, 0.4351]}, {"w": "the", "b": [0.2872, 0.4201, 0.3126, 0.4351]}, {"w": "challenge", "b": [0.3188, 0.4201, 0.3916, 0.4351]}, {"w": "of", "b": [0.3978, 0.4201, 0.4126, 0.4351]}, {"w": "training", "b": [0.4187, 0.4201, 0.4819, 0.4351]}, {"w": "a", "b": [0.4881, 0.4201, 0.4973, 0.4351]}, {"w": "model,", "b": [0.5034, 0.4201, 0.5569, 0.4351]}, {"w": "we", "b": [0.563, 0.4201, 0.5839, 0.4351]}, {"w": "need", "b": [0.5901, 0.4201, 0.6268, 0.4351]}, {"w": "to", "b": [0.6329, 0.4201, 0.6492, 0.4351]}, {"w": "decide", "b": [0.6554, 0.4201, 0.7053, 0.4351]}, {"w": "how", "b": [0.7115, 0.4201, 0.7435, 0.4351]}, {"w": "to", "b": [0.7497, 0.4201, 0.766, 0.4351]}, {"w": "measure", "b": [0.7722, 0.4201, 0.8375, 0.4351]}, {"w": "the", "b": [0.8436, 0.4201, 0.8691, 0.4351]}, {"w": "model", "b": [0.1312, 0.4381, 0.1804, 0.453]}, {"w": "quality.", "b": [0.1865, 0.4381, 0.2465, 0.453]}, {"w": "Often,", "b": [0.2547, 0.4381, 0.306, 0.453]}, {"w": "we", "b": [0.3121, 0.4381, 0.3333, 0.453]}, {"w": "have", "b": [0.3395, 0.4381, 0.3762, 0.453]}, {"w": "a", "b": [0.3824, 0.4381, 0.3917, 0.453]}, {"w": "choice", "b": [0.3978, 0.4381, 0.447, 0.453]}, {"w": "between", "b": [0.4531, 0.4381, 0.5188, 0.453]}, {"w": "several", "b": [0.525, 0.4381, 0.58, 0.453]}, {"w": "competing", "b": [0.5861, 0.4381, 0.6704, 0.453]}, {"w": "models,", "b": [0.6766, 0.4381, 0.7382, 0.453]}, {"w": "so-called", "b": [0.7444, 0.4381, 0.8138, 0.453]}, {"w": "model", "b": [0.82, 0.4381, 0.8691, 0.453]}, {"w": "candidates,", "b": [0.1312, 0.456, 0.2216, 0.471]}, {"w": "but", "b": [0.2277, 0.456, 0.2554, 0.471]}, {"w": "only", "b": [0.2616, 0.456, 0.2959, 0.471]}, {"w": "one", "b": [0.3021, 0.456, 0.3298, 0.471]}, {"w": "will", "b": [0.3359, 0.456, 0.3646, 0.471]}, {"w": "be", "b": [0.3708, 0.456, 0.3898, 0.471]}, {"w": "deployed", "b": [0.3959, 0.456, 0.4662, 0.471]}, {"w": "in", "b": [0.4723, 0.456, 0.4877, 0.471]}, {"w": "production.", "b": [0.4939, 0.456, 0.5867, 0.471]}]}, {"id": "b_10", "type": "paragraph", "text": "5.5 Assessing Model Performance", "words": [{"w": "5.5", "b": [0.1312, 0.5048, 0.1631, 0.5228]}, {"w": "Assessing", "b": [0.188, 0.5048, 0.2907, 0.5228]}, {"w": "Model", "b": [0.299, 0.5048, 0.3679, 0.5228]}, {"w": "Performance", "b": [0.3762, 0.5048, 0.5135, 0.5228]}]}, {"id": "b_11", "type": "paragraph", "text": "Remember, the holdout data consists of examples the learning algorithm didn’t see during training. If our model performs well on a holdout set, we can say our model generalizes well and is of good quality or, simply, that it’s good. The most common way to get a good model is to compare different models by calculating a performance metric on the holdout data.", "words": [{"w": "Remember,", "b": [0.1312, 0.5434, 0.2214, 0.5584]}, {"w": "the", "b": [0.2276, 0.5434, 0.2528, 0.5584]}, {"w": "holdout", "b": [0.2589, 0.5437, 0.3296, 0.5587]}, {"w": "data", "b": [0.3367, 0.5437, 0.3773, 0.5587]}, {"w": "consists", "b": [0.3839, 0.5434, 0.4448, 0.5584]}, {"w": "of", "b": [0.4509, 0.5434, 0.4656, 0.5584]}, {"w": "examples", "b": [0.4717, 0.5434, 0.5441, 0.5584]}, {"w": "the", "b": [0.5502, 0.5434, 0.5754, 0.5584]}, {"w": "learning", "b": [0.5816, 0.5434, 0.6453, 0.5584]}, {"w": "algorithm", "b": [0.6514, 0.5434, 0.7282, 0.5584]}, {"w": "didn’t", "b": [0.7343, 0.5434, 0.7818, 0.5584]}, {"w": "see", "b": [0.788, 0.5434, 0.8113, 0.5584]}, {"w": "during", "b": [0.8174, 0.5434, 0.869, 0.5584]}, {"w": "training.", "b": [0.1312, 0.5614, 0.1986, 0.5763]}, {"w": "If", "b": [0.2065, 0.5614, 0.2185, 0.5763]}, {"w": "our", "b": [0.2236, 0.5614, 0.2498, 0.5763]}, {"w": "model", "b": [0.2549, 0.5614, 0.3026, 0.5763]}, {"w": "performs", "b": [0.3077, 0.5614, 0.3773, 0.5763]}, {"w": "well", "b": [0.3824, 0.5614, 0.413, 0.5763]}, {"w": "on", "b": [0.4181, 0.5614, 0.4372, 0.5763]}, {"w": "a", "b": [0.4423, 0.5614, 0.4513, 0.5763]}, {"w": "holdout", "b": [0.4564, 0.5614, 0.5167, 0.5763]}, {"w": "set,", "b": [0.5218, 0.5614, 0.549, 0.5763]}, {"w": "we", "b": [0.5543, 0.5614, 0.5749, 0.5763]}, {"w": "can", "b": [0.58, 0.5614, 0.6071, 0.5763]}, {"w": "say", "b": [0.6122, 0.5614, 0.6374, 0.5763]}, {"w": "our", "b": [0.6425, 0.5614, 0.6687, 0.5763]}, {"w": "model", "b": [0.6738, 0.5614, 0.7215, 0.5763]}, {"w": "generalizes", "b": [0.7265, 0.5617, 0.8267, 0.5766]}, {"w": "well", "b": [0.8325, 0.5617, 0.8688, 0.5766]}, {"w": "and", "b": [0.1312, 0.5793, 0.1604, 0.5943]}, {"w": "is", "b": [0.1664, 0.5793, 0.1785, 0.5943]}, {"w": "of", "b": [0.1846, 0.5793, 0.1991, 0.5943]}, {"w": "good", "b": [0.2051, 0.5793, 0.2433, 0.5943]}, {"w": "quality", "b": [0.2493, 0.5793, 0.3041, 0.5943]}, {"w": "or,", "b": [0.3101, 0.5793, 0.3313, 0.5943]}, {"w": "simply,", "b": [0.3373, 0.5793, 0.3926, 0.5943]}, {"w": "that", "b": [0.3987, 0.5793, 0.4318, 0.5943]}, {"w": "it’s", "b": [0.4378, 0.5793, 0.462, 0.5943]}, {"w": "good.", "b": [0.4681, 0.5793, 0.5113, 0.5943]}, {"w": "The", "b": [0.5194, 0.5793, 0.5506, 0.5943]}, {"w": "most", "b": [0.5566, 0.5793, 0.5948, 0.5943]}, {"w": "common", "b": [0.6009, 0.5793, 0.6672, 0.5943]}, {"w": "way", "b": [0.6732, 0.5793, 0.7038, 0.5943]}, {"w": "to", "b": [0.7098, 0.5793, 0.7259, 0.5943]}, {"w": "get", "b": [0.7319, 0.5793, 0.756, 0.5943]}, {"w": "a", "b": [0.762, 0.5793, 0.771, 0.5943]}, {"w": "good", "b": [0.777, 0.5793, 0.8152, 0.5943]}, {"w": "model", "b": [0.8212, 0.5793, 0.869, 0.5943]}, {"w": "is", "b": [0.1312, 0.5973, 0.1436, 0.6122]}, {"w": "to", "b": [0.1498, 0.5973, 0.1662, 0.6122]}, {"w": "compare", "b": [0.1724, 0.5973, 0.2401, 0.6122]}, {"w": "different", "b": [0.2462, 0.5973, 0.3129, 0.6122]}, {"w": "models", "b": [0.3191, 0.5973, 0.3751, 0.6122]}, {"w": "by", "b": [0.3812, 0.5973, 0.4007, 0.6122]}, {"w": "calculating", "b": [0.4069, 0.5973, 0.494, 0.6122]}, {"w": "a", "b": [0.5002, 0.5973, 0.5094, 0.6122]}, {"w": "performance", "b": [0.5156, 0.5976, 0.6312, 0.6125]}, {"w": "metric", "b": [0.6383, 0.5976, 0.698, 0.6125]}, {"w": "on", "b": [0.7041, 0.5973, 0.7236, 0.6122]}, {"w": "the", "b": [0.7298, 0.5973, 0.7554, 0.6122]}, {"w": "holdout", "b": [0.7616, 0.5973, 0.8231, 0.6122]}, {"w": "data.", "b": [0.8292, 0.5973, 0.8702, 0.6122]}]}, {"id": "b_12", "type": "paragraph", "text": "5.5.1 Performance Metrics for Regression", "words": [{"w": "5.5.1", "b": [0.1312, 0.6454, 0.1749, 0.6604]}, {"w": "Performance", "b": [0.1961, 0.6454, 0.3132, 0.6604]}, {"w": "Metrics", "b": [0.3203, 0.6454, 0.3909, 0.6604]}, {"w": "for", "b": [0.3979, 0.6454, 0.4238, 0.6604]}, {"w": "Regression", "b": [0.4308, 0.6454, 0.5306, 0.6604]}]}, {"id": "b_13", "type": "paragraph", "text": "Regression and classification models are assessed using different metrics. Let’s first consider performance metrics for regression: mean squared error (MSE), median absolute error (MAE), and almost correct predictions error rate (ACPER).", "words": [{"w": "Regression", "b": [0.1312, 0.6817, 0.2164, 0.6966]}, {"w": "and", "b": [0.2225, 0.6817, 0.2521, 0.6966]}, {"w": "classification", "b": [0.2582, 0.6817, 0.3594, 0.6966]}, {"w": "models", "b": [0.3655, 0.6817, 0.4212, 0.6966]}, {"w": "are", "b": [0.4273, 0.6817, 0.4519, 0.6966]}, {"w": "assessed", "b": [0.458, 0.6817, 0.5227, 0.6966]}, {"w": "using", "b": [0.5289, 0.6817, 0.5708, 0.6966]}, {"w": "different", "b": [0.5769, 0.6817, 0.6432, 0.6966]}, {"w": "metrics.", "b": [0.6494, 0.6817, 0.7127, 0.6966]}, {"w": "Let’s", "b": [0.721, 0.6817, 0.7601, 0.6966]}, {"w": "first", "b": [0.7662, 0.6817, 0.798, 0.6966]}, {"w": "consider", "b": [0.8042, 0.6817, 0.8696, 0.6966]}, {"w": "performance", "b": [0.1312, 0.6996, 0.2288, 0.7146]}, {"w": "metrics", "b": [0.2339, 0.6996, 0.2914, 0.7146]}, {"w": "for", "b": [0.2965, 0.6996, 0.3182, 0.7146]}, {"w": "regression:", "b": [0.3233, 0.6996, 0.406, 0.7146]}, {"w": "mean", "b": [0.4137, 0.6996, 0.4559, 0.7146]}, {"w": "squared", "b": [0.461, 0.6996, 0.522, 0.7146]}, {"w": "error", "b": [0.5271, 0.6996, 0.5655, 0.7146]}, {"w": "(MSE),", "b": [0.5706, 0.6996, 0.6286, 0.7146]}, {"w": "median", "b": [0.6337, 0.6996, 0.691, 0.7146]}, {"w": "absolute", "b": [0.6961, 0.6996, 0.7616, 0.7146]}, {"w": "error", "b": [0.7667, 0.6996, 0.805, 0.7146]}, {"w": "(MAE),", "b": [0.8101, 0.6996, 0.8717, 0.7146]}, {"w": "and", "b": [0.1312, 0.7176, 0.161, 0.7325]}, {"w": "almost", "b": [0.1671, 0.7176, 0.2205, 0.7325]}, {"w": "correct", "b": [0.2267, 0.7176, 0.2822, 0.7325]}, {"w": "predictions", "b": [0.2883, 0.7176, 0.3767, 0.7325]}, {"w": "error", "b": [0.3828, 0.7176, 0.422, 0.7325]}, {"w": "rate", "b": [0.4281, 0.7176, 0.46, 0.7325]}, {"w": "(ACPER).", "b": [0.4661, 0.7176, 0.5509, 0.7325]}]}, {"id": "b_14", "type": "paragraph", "text": "The metric most often used to quantify the performance of a regression model is the same as the cost function: mean squared error (MSE), defined as,", "words": [{"w": "The", "b": [0.1306, 0.7445, 0.1617, 0.7595]}, {"w": "metric", "b": [0.1678, 0.7445, 0.2181, 0.7595]}, {"w": "most", "b": [0.2243, 0.7445, 0.2625, 0.7595]}, {"w": "often", "b": [0.2686, 0.7445, 0.3084, 0.7595]}, {"w": "used", "b": [0.3145, 0.7445, 0.3498, 0.7595]}, {"w": "to", "b": [0.3559, 0.7445, 0.3719, 0.7595]}, {"w": "quantify", "b": [0.3781, 0.7445, 0.4434, 0.7595]}, {"w": "the", "b": [0.4495, 0.7445, 0.4746, 0.7595]}, {"w": "performance", "b": [0.4807, 0.7445, 0.5783, 0.7595]}, {"w": "of", "b": [0.5845, 0.7445, 0.599, 0.7595]}, {"w": "a", "b": [0.6052, 0.7445, 0.6142, 0.7595]}, {"w": "regression", "b": [0.6203, 0.7445, 0.698, 0.7595]}, {"w": "model", "b": [0.7041, 0.7445, 0.7519, 0.7595]}, {"w": "is", "b": [0.758, 0.7445, 0.7702, 0.7595]}, {"w": "the", "b": [0.7763, 0.7445, 0.8014, 0.7595]}, {"w": "same", "b": [0.8075, 0.7445, 0.8468, 0.7595]}, {"w": "as", "b": [0.8529, 0.7445, 0.8691, 0.7595]}, {"w": "the", "b": [0.1312, 0.7625, 0.1569, 0.7774]}, {"w": "cost", "b": [0.163, 0.7628, 0.1997, 0.7777]}, {"w": "function:", "b": [0.2067, 0.7625, 0.288, 0.7777]}, {"w": "mean", "b": [0.2962, 0.7628, 0.3457, 0.7777]}, {"w": "squared", "b": [0.3527, 0.7628, 0.4247, 0.7777]}, {"w": "error", "b": [0.4317, 0.7628, 0.4783, 0.7777]}, {"w": "(MSE),", "b": [0.4844, 0.7625, 0.5436, 0.7774]}, {"w": "defined", "b": [0.5498, 0.7625, 0.6072, 0.7774]}, {"w": "as,", "b": [0.6134, 0.7625, 0.635, 0.7774]}]}, {"id": "b_15", "type": "paragraph", "text": "MSE(f)", "words": [{"w": "MSE(f)", "b": [0.3614, 0.8104, 0.4265, 0.8256]}]}, {"id": "b_16", "type": "equation", "text": "def = 1", "words": [{"w": "def", "b": [0.4316, 0.8055, 0.4509, 0.816]}, {"w": "=", "b": [0.434, 0.8104, 0.4484, 0.8254]}, {"w": "1", "b": [0.462, 0.8003, 0.4712, 0.8152]}]}, {"id": "b_19", "type": "equation", "text": "i=1...N", "words": [{"w": "i=1...N", "b": [0.4803, 0.8321, 0.529, 0.8425]}]}, {"id": "b_20", "type": "paragraph", "text": "(f(xi) −yi)2, (1)", "words": [{"w": "(f(xi)", "b": [0.5304, 0.8104, 0.5803, 0.8269]}, {"w": "−yi)2,", "b": [0.5844, 0.808, 0.6386, 0.8269]}, {"w": "(1)", "b": [0.8452, 0.8104, 0.8688, 0.8254]}]}, {"id": "b_21", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "14", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 153, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "where f is the model that takes a feature vector x as input and outputs a prediction, and i, ranging from 1 to N, denotes the index of an example from a dataset.", "words": [{"w": "where", "b": [0.1306, 0.0881, 0.1776, 0.1031]}, {"w": "f", "b": [0.1837, 0.0884, 0.1927, 0.1033]}, {"w": "is", "b": [0.2009, 0.0881, 0.2132, 0.1031]}, {"w": "the", "b": [0.2194, 0.0881, 0.2449, 0.1031]}, {"w": "model", "b": [0.251, 0.0881, 0.2995, 0.1031]}, {"w": "that", "b": [0.3056, 0.0881, 0.3393, 0.1031]}, {"w": "takes", "b": [0.3455, 0.0881, 0.3864, 0.1031]}, {"w": "a", "b": [0.3925, 0.0881, 0.4017, 0.1031]}, {"w": "feature", "b": [0.4079, 0.0881, 0.4636, 0.1031]}, {"w": "vector", "b": [0.4697, 0.0881, 0.5187, 0.1031]}, {"w": "x", "b": [0.5247, 0.0884, 0.5359, 0.1034]}, {"w": "as", "b": [0.5422, 0.0881, 0.5586, 0.1031]}, {"w": "input", "b": [0.5648, 0.0881, 0.6076, 0.1031]}, {"w": "and", "b": [0.6138, 0.0881, 0.6434, 0.1031]}, {"w": "outputs", "b": [0.6496, 0.0881, 0.7109, 0.1031]}, {"w": "a", "b": [0.717, 0.0881, 0.7262, 0.1031]}, {"w": "prediction,", "b": [0.7324, 0.0881, 0.8181, 0.1031]}, {"w": "and", "b": [0.8243, 0.0881, 0.8539, 0.1031]}, {"w": "i,", "b": [0.8599, 0.0881, 0.8713, 0.1033]}, {"w": "ranging", "b": [0.1312, 0.106, 0.1918, 0.121]}, {"w": "from", "b": [0.1979, 0.106, 0.2354, 0.121]}, {"w": "1", "b": [0.2415, 0.106, 0.2507, 0.121]}, {"w": "to", "b": [0.2569, 0.106, 0.2733, 0.121]}, {"w": "N,", "b": [0.2794, 0.106, 0.3014, 0.1213]}, {"w": "denotes", "b": [0.3076, 0.106, 0.3682, 0.121]}, {"w": "the", "b": [0.3743, 0.106, 0.4, 0.121]}, {"w": "index", "b": [0.4061, 0.106, 0.4497, 0.121]}, {"w": "of", "b": [0.4559, 0.106, 0.4707, 0.121]}, {"w": "an", "b": [0.4769, 0.106, 0.4964, 0.121]}, {"w": "example", "b": [0.5025, 0.106, 0.5686, 0.121]}, {"w": "from", "b": [0.5748, 0.106, 0.6123, 0.121]}, {"w": "a", "b": [0.6184, 0.106, 0.6276, 0.121]}, {"w": "dataset.", "b": [0.6338, 0.106, 0.6975, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "A well-fitting regression model predicts values close to the observed data values. The mean model, which always predicts the average of the training data labels, generally would be used if there were no informative features. Therefore, the regression model should fit better than that of the mean model. Thus, the mean model acts as a baseline. If the regression model MSE is greater than the baseline MSE, then we have a problem in our regression model. It may be overfitting or underfitting (we consider these in Section 5.8). It could also be that the problem was defined with an error, or the programming code contains a bug.", "words": [{"w": "A", "b": [0.1305, 0.133, 0.1441, 0.1479]}, {"w": "well-fitting", "b": [0.1496, 0.1333, 0.2495, 0.1482]}, {"w": "regression", "b": [0.2551, 0.133, 0.3328, 0.1479]}, {"w": "model", "b": [0.3383, 0.133, 0.386, 0.1479]}, {"w": "predicts", "b": [0.3915, 0.133, 0.454, 0.1479]}, {"w": "values", "b": [0.4594, 0.133, 0.5072, 0.1479]}, {"w": "close", "b": [0.5127, 0.133, 0.55, 0.1479]}, {"w": "to", "b": [0.5554, 0.133, 0.5715, 0.1479]}, {"w": "the", "b": [0.577, 0.133, 0.6021, 0.1479]}, {"w": "observed", "b": [0.6076, 0.133, 0.6761, 0.1479]}, {"w": "data", "b": [0.6815, 0.133, 0.7167, 0.1479]}, {"w": "values.", "b": [0.7222, 0.133, 0.775, 0.1479]}, {"w": "The", "b": [0.783, 0.133, 0.8141, 0.1479]}, {"w": "mean", "b": [0.8193, 0.1333, 0.8688, 0.1482]}, {"w": "model,", "b": [0.1312, 0.1509, 0.1928, 0.1662]}, {"w": "which", "b": [0.1995, 0.1509, 0.2471, 0.1659]}, {"w": "always", "b": [0.2536, 0.1509, 0.3076, 0.1659]}, {"w": "predicts", "b": [0.3142, 0.1509, 0.3792, 0.1659]}, {"w": "the", "b": [0.3858, 0.1509, 0.412, 0.1659]}, {"w": "average", "b": [0.4186, 0.1509, 0.4798, 0.1659]}, {"w": "of", "b": [0.4864, 0.1509, 0.5016, 0.1659]}, {"w": "the", "b": [0.5081, 0.1509, 0.5343, 0.1659]}, {"w": "training", "b": [0.5409, 0.1509, 0.6058, 0.1659]}, {"w": "data", "b": [0.6124, 0.1509, 0.649, 0.1659]}, {"w": "labels,", "b": [0.6556, 0.1509, 0.7075, 0.1659]}, {"w": "generally", "b": [0.7141, 0.1509, 0.7879, 0.1659]}, {"w": "would", "b": [0.7945, 0.1509, 0.8431, 0.1659]}, {"w": "be", "b": [0.8497, 0.1509, 0.8691, 0.1659]}, {"w": "used", "b": [0.1312, 0.1689, 0.1671, 0.1838]}, {"w": "if", "b": [0.1733, 0.1689, 0.184, 0.1838]}, {"w": "there", "b": [0.1901, 0.1689, 0.231, 0.1838]}, {"w": "were", "b": [0.2372, 0.1689, 0.2735, 0.1838]}, {"w": "no", "b": [0.2797, 0.1689, 0.2991, 0.1838]}, {"w": "informative", "b": [0.3052, 0.1689, 0.3967, 0.1838]}, {"w": "features.", "b": [0.4028, 0.1689, 0.4709, 0.1838]}, {"w": "Therefore,", "b": [0.4791, 0.1689, 0.5615, 0.1838]}, {"w": "the", "b": [0.5676, 0.1689, 0.5932, 0.1838]}, {"w": "regression", "b": [0.5993, 0.1689, 0.6783, 0.1838]}, {"w": "model", "b": [0.6844, 0.1689, 0.733, 0.1838]}, {"w": "should", "b": [0.7391, 0.1689, 0.7913, 0.1838]}, {"w": "fit", "b": [0.7975, 0.1689, 0.8148, 0.1838]}, {"w": "better", "b": [0.821, 0.1689, 0.8696, 0.1838]}, {"w": "than", "b": [0.1312, 0.1868, 0.1689, 0.2018]}, {"w": "that", "b": [0.175, 0.1868, 0.2095, 0.2018]}, {"w": "of", "b": [0.2156, 0.1868, 0.2308, 0.2018]}, {"w": "the", "b": [0.2369, 0.1868, 0.263, 0.2018]}, {"w": "mean", "b": [0.2692, 0.1868, 0.313, 0.2018]}, {"w": "model.", "b": [0.3192, 0.1868, 0.374, 0.2018]}, {"w": "Thus,", "b": [0.3822, 0.1868, 0.4288, 0.2018]}, {"w": "the", "b": [0.435, 0.1868, 0.4611, 0.2018]}, {"w": "mean", "b": [0.4673, 0.1868, 0.5111, 0.2018]}, {"w": "model", "b": [0.5173, 0.1868, 0.5669, 0.2018]}, {"w": "acts", "b": [0.573, 0.1868, 0.6055, 0.2018]}, {"w": "as", "b": [0.6117, 0.1868, 0.6285, 0.2018]}, {"w": "a", "b": [0.6346, 0.1868, 0.644, 0.2018]}, {"w": "baseline.", "b": [0.6502, 0.1868, 0.7289, 0.2021]}, {"w": "If", "b": [0.7371, 0.1868, 0.7496, 0.2018]}, {"w": "the", "b": [0.7558, 0.1868, 0.7819, 0.2018]}, {"w": "regression", "b": [0.7881, 0.1868, 0.8689, 0.2018]}, {"w": "model", "b": [0.1312, 0.2048, 0.1809, 0.2197]}, {"w": "MSE", "b": [0.1881, 0.2048, 0.2279, 0.2197]}, {"w": "is", "b": [0.2351, 0.2048, 0.2478, 0.2197]}, {"w": "greater", "b": [0.255, 0.2048, 0.3126, 0.2197]}, {"w": "than", "b": [0.3199, 0.2048, 0.3575, 0.2197]}, {"w": "the", "b": [0.3648, 0.2048, 0.3909, 0.2197]}, {"w": "baseline", "b": [0.3982, 0.2048, 0.4632, 0.2197]}, {"w": "MSE,", "b": [0.4703, 0.2048, 0.5152, 0.2197]}, {"w": "then", "b": [0.5228, 0.2048, 0.5594, 0.2197]}, {"w": "we", "b": [0.5666, 0.2048, 0.5881, 0.2197]}, {"w": "have", "b": [0.5953, 0.2048, 0.6325, 0.2197]}, {"w": "a", "b": [0.6397, 0.2048, 0.6491, 0.2197]}, {"w": "problem", "b": [0.6564, 0.2048, 0.7234, 0.2197]}, {"w": "in", "b": [0.7306, 0.2048, 0.7463, 0.2197]}, {"w": "our", "b": [0.7536, 0.2048, 0.7808, 0.2197]}, {"w": "regression", "b": [0.7881, 0.2048, 0.8689, 0.2197]}, {"w": "model.", "b": [0.1312, 0.2227, 0.1853, 0.2377]}, {"w": "It", "b": [0.1936, 0.2227, 0.2075, 0.2377]}, {"w": "may", "b": [0.2136, 0.2227, 0.2476, 0.2377]}, {"w": "be", "b": [0.2538, 0.2227, 0.2729, 0.2377]}, {"w": "overfitting", "b": [0.279, 0.223, 0.3747, 0.238]}, {"w": "or", "b": [0.381, 0.2227, 0.3975, 0.2377]}, {"w": "underfitting", "b": [0.4037, 0.223, 0.5141, 0.238]}, {"w": "(we", "b": [0.5205, 0.2227, 0.5488, 0.2377]}, {"w": "consider", "b": [0.555, 0.2227, 0.6211, 0.2377]}, {"w": "these", "b": [0.6273, 0.2227, 0.6686, 0.2377]}, {"w": "in", "b": [0.6748, 0.2227, 0.6902, 0.2377]}, {"w": "Section", "b": [0.6964, 0.2227, 0.7551, 0.2377]}, {"w": "5.8).", "b": [0.7613, 0.2227, 0.7974, 0.2377]}, {"w": "It", "b": [0.8056, 0.2227, 0.8195, 0.2377]}, {"w": "could", "b": [0.8257, 0.2227, 0.869, 0.2377]}, {"w": "also", "b": [0.1312, 0.2406, 0.1615, 0.2556]}, {"w": "be", "b": [0.1675, 0.2406, 0.1861, 0.2556]}, {"w": "that", "b": [0.1922, 0.2406, 0.2253, 0.2556]}, {"w": "the", "b": [0.2314, 0.2406, 0.2565, 0.2556]}, {"w": "problem", "b": [0.2625, 0.2406, 0.3269, 0.2556]}, {"w": "was", "b": [0.3329, 0.2406, 0.3616, 0.2556]}, {"w": "defined", "b": [0.3677, 0.2406, 0.424, 0.2556]}, {"w": "with", "b": [0.43, 0.2406, 0.4652, 0.2556]}, {"w": "an", "b": [0.4712, 0.2406, 0.4903, 0.2556]}, {"w": "error,", "b": [0.4963, 0.2406, 0.5397, 0.2556]}, {"w": "or", "b": [0.5458, 0.2406, 0.5619, 0.2556]}, {"w": "the", "b": [0.5679, 0.2406, 0.5931, 0.2556]}, {"w": "programming", "b": [0.5991, 0.2406, 0.7047, 0.2556]}, {"w": "code", "b": [0.7107, 0.2406, 0.7464, 0.2556]}, {"w": "contains", "b": [0.7525, 0.2406, 0.8174, 0.2556]}, {"w": "a", "b": [0.8234, 0.2406, 0.8324, 0.2556]}, {"w": "bug.", "b": [0.8385, 0.2406, 0.8727, 0.2556]}]}, {"id": "b_2", "type": "paragraph", "text": "If the data contains outliers, the examples very far from the “true” regression line, they can significantly affect the value of MSE. By definition, the squared error for such outlying examples will be high. In such situations, it is better to apply a different metric, the median absolute error, MdAE:", "words": [{"w": "If", "b": [0.1312, 0.2676, 0.1438, 0.2825]}, {"w": "the", "b": [0.1512, 0.2676, 0.1773, 0.2825]}, {"w": "data", "b": [0.1847, 0.2676, 0.2213, 0.2825]}, {"w": "contains", "b": [0.2286, 0.2676, 0.2962, 0.2825]}, {"w": "outliers,", "b": [0.3036, 0.2676, 0.3697, 0.2825]}, {"w": "the", "b": [0.3773, 0.2676, 0.4035, 0.2825]}, {"w": "examples", "b": [0.4109, 0.2676, 0.4858, 0.2825]}, {"w": "very", "b": [0.4931, 0.2676, 0.5282, 0.2825]}, {"w": "far", "b": [0.5356, 0.2676, 0.5581, 0.2825]}, {"w": "from", "b": [0.5655, 0.2676, 0.6037, 0.2825]}, {"w": "the", "b": [0.6111, 0.2676, 0.6373, 0.2825]}, {"w": "“true”", "b": [0.6446, 0.2676, 0.6959, 0.2825]}, {"w": "regression", "b": [0.7033, 0.2676, 0.7842, 0.2825]}, {"w": "line,", "b": [0.7915, 0.2676, 0.8261, 0.2825]}, {"w": "they", "b": [0.8337, 0.2676, 0.8698, 0.2825]}, {"w": "can", "b": [0.1312, 0.2855, 0.159, 0.3005]}, {"w": "significantly", "b": [0.1652, 0.2855, 0.2621, 0.3005]}, {"w": "affect", "b": [0.2682, 0.2855, 0.312, 0.3005]}, {"w": "the", "b": [0.3181, 0.2855, 0.3439, 0.3005]}, {"w": "value", "b": [0.35, 0.2855, 0.3917, 0.3005]}, {"w": "of", "b": [0.3979, 0.2855, 0.4128, 0.3005]}, {"w": "MSE.", "b": [0.419, 0.2855, 0.464, 0.3005]}, {"w": "By", "b": [0.4701, 0.2855, 0.493, 0.3005]}, {"w": "definition,", "b": [0.4992, 0.2855, 0.5805, 0.3005]}, {"w": "the", "b": [0.5867, 0.2855, 0.6124, 0.3005]}, {"w": "squared", "b": [0.6186, 0.2855, 0.681, 0.3005]}, {"w": "error", "b": [0.6872, 0.2855, 0.7265, 0.3005]}, {"w": "for", "b": [0.7326, 0.2855, 0.7548, 0.3005]}, {"w": "such", "b": [0.7609, 0.2855, 0.7966, 0.3005]}, {"w": "outlying", "b": [0.8027, 0.2855, 0.8691, 0.3005]}, {"w": "examples", "b": [0.1312, 0.3035, 0.2032, 0.3184]}, {"w": "will", "b": [0.2089, 0.3035, 0.237, 0.3184]}, {"w": "be", "b": [0.2426, 0.3035, 0.2612, 0.3184]}, {"w": "high.", "b": [0.2669, 0.3035, 0.3061, 0.3184]}, {"w": "In", "b": [0.3141, 0.3035, 0.3307, 0.3184]}, {"w": "such", "b": [0.3364, 0.3035, 0.3712, 0.3184]}, {"w": "situations,", "b": [0.3768, 0.3035, 0.4584, 0.3184]}, {"w": "it", "b": [0.4642, 0.3035, 0.4762, 0.3184]}, {"w": "is", "b": [0.4819, 0.3035, 0.4941, 0.3184]}, {"w": "better", "b": [0.4997, 0.3035, 0.5475, 0.3184]}, {"w": "to", "b": [0.5532, 0.3035, 0.5693, 0.3184]}, {"w": "apply", "b": [0.5749, 0.3035, 0.6186, 0.3184]}, {"w": "a", "b": [0.6243, 0.3035, 0.6333, 0.3184]}, {"w": "different", "b": [0.639, 0.3035, 0.7044, 0.3184]}, {"w": "metric,", "b": [0.71, 0.3035, 0.7654, 0.3184]}, {"w": "the", "b": [0.7711, 0.3035, 0.7962, 0.3184]}, {"w": "median", "b": [0.8016, 0.3038, 0.8688, 0.3187]}, {"w": "absolute", "b": [0.1312, 0.3217, 0.208, 0.3367]}, {"w": "error,", "b": [0.215, 0.3214, 0.2667, 0.3367]}, {"w": "MdAE:", "b": [0.2729, 0.3214, 0.3315, 0.3364]}]}, {"id": "b_3", "type": "paragraph", "text": "MdAE", "words": [{"w": "MdAE", "b": [0.3455, 0.3663, 0.3991, 0.3812]}]}, {"id": "b_4", "type": "equation", "text": "def = median", "words": [{"w": "def", "b": [0.4042, 0.3614, 0.4235, 0.3719]}, {"w": "=", "b": [0.4067, 0.3663, 0.421, 0.3812]}, {"w": "median", "b": [0.4286, 0.3663, 0.4871, 0.3812]}]}, {"id": "b_6", "type": "equation", "text": "{|f(xi) −yi|}N", "words": [{"w": "{|f(xi)", "b": [0.5013, 0.3663, 0.5583, 0.3828]}, {"w": "−yi|}N", "b": [0.5624, 0.3625, 0.6221, 0.3828]}]}, {"id": "b_7", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.6104, 0.3745, 0.6343, 0.385]}]}, {"id": "b_10", "type": "equation", "text": "where {|f(xi) −yi|}N", "words": [{"w": "where", "b": [0.1306, 0.4101, 0.1781, 0.4251]}, {"w": "{|f(xi)", "b": [0.1842, 0.4101, 0.2412, 0.4266]}, {"w": "−yi|}N", "b": [0.2453, 0.4064, 0.305, 0.4266]}]}, {"id": "b_11", "type": "paragraph", "text": "i=1 denotes the set of absolute error values for all examples, from i = 1 to N, on which the evaluation of the model is performed.", "words": [{"w": "i=1", "b": [0.2933, 0.4184, 0.3172, 0.4289]}, {"w": "denotes", "b": [0.3243, 0.4101, 0.3853, 0.4251]}, {"w": "the", "b": [0.3914, 0.4101, 0.4172, 0.4251]}, {"w": "set", "b": [0.4233, 0.4101, 0.4462, 0.4251]}, {"w": "of", "b": [0.4523, 0.4101, 0.4673, 0.4251]}, {"w": "absolute", "b": [0.4734, 0.4101, 0.5406, 0.4251]}, {"w": "error", "b": [0.5467, 0.4101, 0.586, 0.4251]}, {"w": "values", "b": [0.5922, 0.4101, 0.6413, 0.4251]}, {"w": "for", "b": [0.6474, 0.4101, 0.6697, 0.4251]}, {"w": "all", "b": [0.6758, 0.4101, 0.6954, 0.4251]}, {"w": "examples,", "b": [0.7016, 0.4101, 0.7806, 0.4251]}, {"w": "from", "b": [0.7867, 0.4101, 0.8244, 0.4251]}, {"w": "i", "b": [0.8303, 0.4104, 0.8367, 0.4253]}, {"w": "=", "b": [0.8418, 0.4101, 0.8562, 0.4251]}, {"w": "1", "b": [0.8613, 0.4101, 0.8706, 0.4251]}, {"w": "to", "b": [0.1312, 0.4281, 0.1476, 0.443]}, {"w": "N,", "b": [0.1538, 0.4281, 0.1757, 0.4433]}, {"w": "on", "b": [0.1819, 0.4281, 0.2014, 0.443]}, {"w": "which", "b": [0.2075, 0.4281, 0.2542, 0.443]}, {"w": "the", "b": [0.2603, 0.4281, 0.286, 0.443]}, {"w": "evaluation", "b": [0.2921, 0.4281, 0.3747, 0.443]}, {"w": "of", "b": [0.3808, 0.4281, 0.3957, 0.443]}, {"w": "the", "b": [0.4018, 0.4281, 0.4275, 0.443]}, {"w": "model", "b": [0.4336, 0.4281, 0.4823, 0.443]}, {"w": "is", "b": [0.4885, 0.4281, 0.5009, 0.443]}, {"w": "performed.", "b": [0.5071, 0.4281, 0.5943, 0.443]}]}, {"id": "b_12", "type": "paragraph", "text": "The almost correct predictions error rate (ACPER) is the percentage of predictions that is within p percentage of the true value. To calculate ACPER, proceed as follows:", "words": [{"w": "The", "b": [0.1306, 0.455, 0.163, 0.4699]}, {"w": "almost", "b": [0.17, 0.4553, 0.2311, 0.4702]}, {"w": "correct", "b": [0.2392, 0.4553, 0.3042, 0.4702]}, {"w": "predictions", "b": [0.3122, 0.4553, 0.4145, 0.4702]}, {"w": "error", "b": [0.4226, 0.4553, 0.4692, 0.4702]}, {"w": "rate", "b": [0.4773, 0.4553, 0.5143, 0.4702]}, {"w": "(ACPER)", "b": [0.5213, 0.455, 0.6017, 0.4699]}, {"w": "is", "b": [0.6087, 0.455, 0.6214, 0.4699]}, {"w": "the", "b": [0.6284, 0.455, 0.6546, 0.4699]}, {"w": "percentage", "b": [0.6616, 0.455, 0.7496, 0.4699]}, {"w": "of", "b": [0.7566, 0.455, 0.7718, 0.4699]}, {"w": "predictions", "b": [0.7788, 0.455, 0.8689, 0.4699]}, {"w": "that", "b": [0.1312, 0.4729, 0.1651, 0.4879]}, {"w": "is", "b": [0.1712, 0.4729, 0.1836, 0.4879]}, {"w": "within", "b": [0.1898, 0.4729, 0.241, 0.4879]}, {"w": "p", "b": [0.2472, 0.4732, 0.2564, 0.4882]}, {"w": "percentage", "b": [0.2626, 0.4729, 0.3488, 0.4879]}, {"w": "of", "b": [0.3549, 0.4729, 0.3698, 0.4879]}, {"w": "the", "b": [0.376, 0.4729, 0.4016, 0.4879]}, {"w": "true", "b": [0.4078, 0.4729, 0.4406, 0.4879]}, {"w": "value.", "b": [0.4468, 0.4729, 0.4934, 0.4879]}, {"w": "To", "b": [0.5017, 0.4729, 0.5226, 0.4879]}, {"w": "calculate", "b": [0.5288, 0.4729, 0.5996, 0.4879]}, {"w": "ACPER,", "b": [0.6055, 0.4729, 0.6764, 0.4879]}, {"w": "proceed", "b": [0.6826, 0.4729, 0.7447, 0.4879]}, {"w": "as", "b": [0.7509, 0.4729, 0.7674, 0.4879]}, {"w": "follows:", "b": [0.7735, 0.4729, 0.8331, 0.4879]}]}, {"id": "b_13", "type": "paragraph", "text": "1. Define a threshold percentage error that you consider acceptable (let’s say 2%). 2. For each true value of the target yi, the desired prediction should be between yi +0.02yi and yi −0.02yi. 3. By using all examples i = 1, . . . , N, calculate the percentage of predicted values fulfilling the above rule. This will give the value of the ACPER metric for your model.", "words": [{"w": "1.", "b": [0.1538, 0.4998, 0.1681, 0.5148]}, {"w": "Define", "b": [0.1774, 0.4998, 0.2284, 0.5148]}, {"w": "a", "b": [0.2345, 0.4998, 0.2438, 0.5148]}, {"w": "threshold", "b": [0.2499, 0.4998, 0.3249, 0.5148]}, {"w": "percentage", "b": [0.3311, 0.4998, 0.4173, 0.5148]}, {"w": "error", "b": [0.4235, 0.4998, 0.4626, 0.5148]}, {"w": "that", "b": [0.4687, 0.4998, 0.5026, 0.5148]}, {"w": "you", "b": [0.5087, 0.4998, 0.5374, 0.5148]}, {"w": "consider", "b": [0.5436, 0.4998, 0.6094, 0.5148]}, {"w": "acceptable", "b": [0.6155, 0.4998, 0.6996, 0.5148]}, {"w": "(let’s", "b": [0.7058, 0.4998, 0.7459, 0.5148]}, {"w": "say", "b": [0.752, 0.4998, 0.7778, 0.5148]}, {"w": "2%).", "b": [0.7836, 0.4998, 0.8205, 0.5148]}, {"w": "2.", "b": [0.1538, 0.5178, 0.1681, 0.5327]}, {"w": "For", "b": [0.1774, 0.5178, 0.2038, 0.5327]}, {"w": "each", "b": [0.2091, 0.5178, 0.2438, 0.5327]}, {"w": "true", "b": [0.2491, 0.5178, 0.2813, 0.5327]}, {"w": "value", "b": [0.2867, 0.5178, 0.3274, 0.5327]}, {"w": "of", "b": [0.3327, 0.5178, 0.3473, 0.5327]}, {"w": "the", "b": [0.3526, 0.5178, 0.3778, 0.5327]}, {"w": "target", "b": [0.3831, 0.5178, 0.4304, 0.5327]}, {"w": "yi,", "b": [0.4356, 0.5178, 0.4559, 0.5343]}, {"w": "the", "b": [0.4614, 0.5178, 0.4865, 0.5327]}, {"w": "desired", "b": [0.4919, 0.5178, 0.5473, 0.5327]}, {"w": "prediction", "b": [0.5526, 0.5178, 0.6321, 0.5327]}, {"w": "should", "b": [0.6375, 0.5178, 0.6888, 0.5327]}, {"w": "be", "b": [0.6942, 0.5178, 0.7128, 0.5327]}, {"w": "between", "b": [0.7181, 0.5178, 0.782, 0.5327]}, {"w": "yi", "b": [0.7871, 0.5181, 0.8013, 0.5343]}, {"w": "+0.02yi", "b": [0.8048, 0.5178, 0.8678, 0.5343]}, {"w": "and", "b": [0.1774, 0.5357, 0.2071, 0.5507]}, {"w": "yi", "b": [0.2132, 0.536, 0.2275, 0.5522]}, {"w": "−0.02yi.", "b": [0.2325, 0.5357, 0.3041, 0.5522]}, {"w": "3.", "b": [0.1538, 0.5537, 0.1681, 0.5686]}, {"w": "By", "b": [0.1774, 0.5537, 0.1997, 0.5686]}, {"w": "using", "b": [0.2047, 0.5537, 0.246, 0.5686]}, {"w": "all", "b": [0.2509, 0.5537, 0.27, 0.5686]}, {"w": "examples", "b": [0.275, 0.5537, 0.347, 0.5686]}, {"w": "i", "b": [0.3518, 0.554, 0.3582, 0.5689]}, {"w": "=", "b": [0.3633, 0.5537, 0.3774, 0.5686]}, {"w": "1,", "b": [0.3825, 0.5537, 0.3967, 0.5689]}, {"w": ".", "b": [0.3998, 0.554, 0.4049, 0.5689]}, {"w": ".", "b": [0.408, 0.554, 0.4131, 0.5689]}, {"w": ".", "b": [0.4162, 0.554, 0.4213, 0.5689]}, {"w": ",", "b": [0.4244, 0.554, 0.4295, 0.5689]}, {"w": "N,", "b": [0.4326, 0.5537, 0.4544, 0.5689]}, {"w": "calculate", "b": [0.4596, 0.5537, 0.529, 0.5686]}, {"w": "the", "b": [0.5339, 0.5537, 0.5591, 0.5686]}, {"w": "percentage", "b": [0.564, 0.5537, 0.6485, 0.5686]}, {"w": "of", "b": [0.6535, 0.5537, 0.6681, 0.5686]}, {"w": "predicted", "b": [0.673, 0.5537, 0.7465, 0.5686]}, {"w": "values", "b": [0.7514, 0.5537, 0.7992, 0.5686]}, {"w": "fulfilling", "b": [0.8042, 0.5537, 0.869, 0.5686]}, {"w": "the", "b": [0.1774, 0.5716, 0.203, 0.5866]}, {"w": "above", "b": [0.2091, 0.5716, 0.2553, 0.5866]}, {"w": "rule.", "b": [0.2614, 0.5716, 0.2974, 0.5866]}, {"w": "This", "b": [0.3056, 0.5716, 0.3416, 0.5866]}, {"w": "will", "b": [0.3477, 0.5716, 0.3764, 0.5866]}, {"w": "give", "b": [0.3826, 0.5716, 0.4144, 0.5866]}, {"w": "the", "b": [0.4205, 0.5716, 0.4462, 0.5866]}, {"w": "value", "b": [0.4523, 0.5716, 0.4939, 0.5866]}, {"w": "of", "b": [0.5, 0.5716, 0.5149, 0.5866]}, {"w": "the", "b": [0.521, 0.5716, 0.5467, 0.5866]}, {"w": "ACPER", "b": [0.5526, 0.5716, 0.618, 0.5866]}, {"w": "metric", "b": [0.6246, 0.5716, 0.6759, 0.5866]}, {"w": "for", "b": [0.682, 0.5716, 0.7041, 0.5866]}, {"w": "your", "b": [0.7103, 0.5716, 0.7462, 0.5866]}, {"w": "model.", "b": [0.7524, 0.5716, 0.8062, 0.5866]}]}, {"id": "b_14", "type": "paragraph", "text": "5.5.2 Performance Metrics for Classification", "words": [{"w": "5.5.2", "b": [0.1312, 0.6198, 0.1749, 0.6347]}, {"w": "Performance", "b": [0.1961, 0.6198, 0.3132, 0.6347]}, {"w": "Metrics", "b": [0.3203, 0.6198, 0.3909, 0.6347]}, {"w": "for", "b": [0.3979, 0.6198, 0.4238, 0.6347]}, {"w": "Classification", "b": [0.4308, 0.6198, 0.5531, 0.6347]}]}, {"id": "b_15", "type": "paragraph", "text": "For classification, things are a little more complicated. The most widely used metrics to assess a classification model are:", "words": [{"w": "For", "b": [0.1312, 0.6561, 0.1588, 0.671]}, {"w": "classification,", "b": [0.1658, 0.6561, 0.2748, 0.671]}, {"w": "things", "b": [0.282, 0.6561, 0.3323, 0.671]}, {"w": "are", "b": [0.3393, 0.6561, 0.3645, 0.671]}, {"w": "a", "b": [0.3715, 0.6561, 0.3809, 0.671]}, {"w": "little", "b": [0.3879, 0.6561, 0.4266, 0.671]}, {"w": "more", "b": [0.4336, 0.6561, 0.4744, 0.671]}, {"w": "complicated.", "b": [0.4814, 0.6561, 0.585, 0.671]}, {"w": "The", "b": [0.5957, 0.6561, 0.6282, 0.671]}, {"w": "most", "b": [0.6352, 0.6561, 0.675, 0.671]}, {"w": "widely", "b": [0.682, 0.6561, 0.7348, 0.671]}, {"w": "used", "b": [0.7418, 0.6561, 0.7786, 0.671]}, {"w": "metrics", "b": [0.7856, 0.6561, 0.8453, 0.671]}, {"w": "to", "b": [0.8524, 0.6561, 0.8691, 0.671]}, {"w": "assess", "b": [0.1312, 0.674, 0.1778, 0.689]}, {"w": "a", "b": [0.184, 0.674, 0.1932, 0.689]}, {"w": "classification", "b": [0.1993, 0.674, 0.3011, 0.689]}, {"w": "model", "b": [0.3072, 0.674, 0.3559, 0.689]}, {"w": "are:", "b": [0.3621, 0.674, 0.3919, 0.689]}]}, {"id": "b_16", "type": "paragraph", "text": "• precision-recall, • accuracy, • cost-sensitive accuracy, and • area under the ROC curve (AUC).", "words": [{"w": "•", "b": [0.1538, 0.7009, 0.1681, 0.7159]}, {"w": "precision-recall,", "b": [0.1774, 0.7009, 0.3027, 0.7159]}, {"w": "•", "b": [0.1538, 0.7189, 0.1681, 0.7338]}, {"w": "accuracy,", "b": [0.1774, 0.7189, 0.2512, 0.7338]}, {"w": "•", "b": [0.1538, 0.7368, 0.1681, 0.7518]}, {"w": "cost-sensitive", "b": [0.1774, 0.7368, 0.2833, 0.7518]}, {"w": "accuracy,", "b": [0.2895, 0.7368, 0.3634, 0.7518]}, {"w": "and", "b": [0.3695, 0.7368, 0.3992, 0.7518]}, {"w": "•", "b": [0.1538, 0.7548, 0.1681, 0.7697]}, {"w": "area", "b": [0.1774, 0.7548, 0.2112, 0.7697]}, {"w": "under", "b": [0.2174, 0.7548, 0.2636, 0.7697]}, {"w": "the", "b": [0.2698, 0.7548, 0.2954, 0.7697]}, {"w": "ROC", "b": [0.3016, 0.7548, 0.3423, 0.7697]}, {"w": "curve", "b": [0.3484, 0.7548, 0.3916, 0.7697]}, {"w": "(AUC).", "b": [0.3977, 0.7548, 0.4577, 0.7697]}]}, {"id": "b_17", "type": "paragraph", "text": "To simplify, I will illustrate with a binary classification problem. Where necessary, I show how to extend the approach to the multiclass case.", "words": [{"w": "To", "b": [0.1306, 0.7817, 0.152, 0.7966]}, {"w": "simplify,", "b": [0.1582, 0.7817, 0.2269, 0.7966]}, {"w": "I", "b": [0.2331, 0.7817, 0.2399, 0.7966]}, {"w": "will", "b": [0.2461, 0.7817, 0.2754, 0.7966]}, {"w": "illustrate", "b": [0.2816, 0.7817, 0.355, 0.7966]}, {"w": "with", "b": [0.3611, 0.7817, 0.3977, 0.7966]}, {"w": "a", "b": [0.404, 0.7817, 0.4134, 0.7966]}, {"w": "binary", "b": [0.4196, 0.7817, 0.4724, 0.7966]}, {"w": "classification", "b": [0.4786, 0.7817, 0.5824, 0.7966]}, {"w": "problem.", "b": [0.5886, 0.7817, 0.6608, 0.7966]}, {"w": "Where", "b": [0.6692, 0.7817, 0.7231, 0.7966]}, {"w": "necessary,", "b": [0.7293, 0.7817, 0.8102, 0.7966]}, {"w": "I", "b": [0.8164, 0.7817, 0.8232, 0.7966]}, {"w": "show", "b": [0.8294, 0.7817, 0.8698, 0.7966]}, {"w": "how", "b": [0.1312, 0.7996, 0.1635, 0.8146]}, {"w": "to", "b": [0.1697, 0.7996, 0.1861, 0.8146]}, {"w": "extend", "b": [0.1922, 0.7996, 0.2461, 0.8146]}, {"w": "the", "b": [0.2522, 0.7996, 0.2779, 0.8146]}, {"w": "approach", "b": [0.284, 0.7996, 0.3574, 0.8146]}, {"w": "to", "b": [0.3635, 0.7996, 0.3799, 0.8146]}, {"w": "the", "b": [0.3861, 0.7996, 0.4117, 0.8146]}, {"w": "multiclass", "b": [0.4179, 0.7996, 0.4976, 0.8146]}, {"w": "case.", "b": [0.5037, 0.7996, 0.5418, 0.8146]}]}, {"id": "b_18", "type": "paragraph", "text": "First, we need to understand the confusion matrix.", "words": [{"w": "First,", "b": [0.1312, 0.8266, 0.1752, 0.8415]}, {"w": "we", "b": [0.1814, 0.8266, 0.2024, 0.8415]}, {"w": "need", "b": [0.2086, 0.8266, 0.2455, 0.8415]}, {"w": "to", "b": [0.2516, 0.8266, 0.268, 0.8415]}, {"w": "understand", "b": [0.2742, 0.8266, 0.3646, 0.8415]}, {"w": "the", "b": [0.3707, 0.8266, 0.3964, 0.8415]}, {"w": "confusion", "b": [0.4025, 0.8266, 0.478, 0.8415]}, {"w": "matrix.", "b": [0.4842, 0.8266, 0.5432, 0.8415]}]}, {"id": "b_19", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 15", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "15", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 154, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "A confusion matrix is a table that summarizes how successful the classification model is at predicting examples belonging to various classes. One axis of the confusion matrix is the class that the model predicted; the other axis is the actual label. Let’s say, our model predicts classes “spam” and “not_spam”:", "words": [{"w": "A", "b": [0.1305, 0.0881, 0.1441, 0.1031]}, {"w": "confusion", "b": [0.1499, 0.0884, 0.2367, 0.1034]}, {"w": "matrix", "b": [0.2434, 0.0884, 0.3055, 0.1034]}, {"w": "is", "b": [0.3114, 0.0881, 0.3236, 0.1031]}, {"w": "a", "b": [0.3294, 0.0881, 0.3385, 0.1031]}, {"w": "table", "b": [0.3443, 0.0881, 0.3835, 0.1031]}, {"w": "that", "b": [0.3893, 0.0881, 0.4225, 0.1031]}, {"w": "summarizes", "b": [0.4283, 0.0881, 0.52, 0.1031]}, {"w": "how", "b": [0.5259, 0.0881, 0.5575, 0.1031]}, {"w": "successful", "b": [0.5633, 0.0881, 0.6396, 0.1031]}, {"w": "the", "b": [0.6454, 0.0881, 0.6705, 0.1031]}, {"w": "classification", "b": [0.6763, 0.0881, 0.7761, 0.1031]}, {"w": "model", "b": [0.7819, 0.0881, 0.8296, 0.1031]}, {"w": "is", "b": [0.8355, 0.0881, 0.8476, 0.1031]}, {"w": "at", "b": [0.8535, 0.0881, 0.8696, 0.1031]}, {"w": "predicting", "b": [0.1312, 0.106, 0.2107, 0.121]}, {"w": "examples", "b": [0.2162, 0.106, 0.2881, 0.121]}, {"w": "belonging", "b": [0.2936, 0.106, 0.3695, 0.121]}, {"w": "to", "b": [0.3749, 0.106, 0.391, 0.121]}, {"w": "various", "b": [0.3965, 0.106, 0.4524, 0.121]}, {"w": "classes.", "b": [0.4578, 0.106, 0.5144, 0.121]}, {"w": "One", "b": [0.5224, 0.106, 0.5545, 0.121]}, {"w": "axis", "b": [0.56, 0.106, 0.5908, 0.121]}, {"w": "of", "b": [0.5962, 0.106, 0.6108, 0.121]}, {"w": "the", "b": [0.6163, 0.106, 0.6414, 0.121]}, {"w": "confusion", "b": [0.6468, 0.106, 0.7208, 0.121]}, {"w": "matrix", "b": [0.7263, 0.106, 0.7791, 0.121]}, {"w": "is", "b": [0.7845, 0.106, 0.7967, 0.121]}, {"w": "the", "b": [0.8022, 0.106, 0.8273, 0.121]}, {"w": "class", "b": [0.8328, 0.106, 0.8692, 0.121]}, {"w": "that", "b": [0.1312, 0.124, 0.1657, 0.1389]}, {"w": "the", "b": [0.1722, 0.124, 0.1983, 0.1389]}, {"w": "model", "b": [0.2048, 0.124, 0.2544, 0.1389]}, {"w": "predicted;", "b": [0.2609, 0.124, 0.3425, 0.1389]}, {"w": "the", "b": [0.3491, 0.124, 0.3752, 0.1389]}, {"w": "other", "b": [0.3817, 0.124, 0.4246, 0.1389]}, {"w": "axis", "b": [0.4311, 0.124, 0.4631, 0.1389]}, {"w": "is", "b": [0.4695, 0.124, 0.4822, 0.1389]}, {"w": "the", "b": [0.4886, 0.124, 0.5147, 0.1389]}, {"w": "actual", "b": [0.5212, 0.124, 0.5714, 0.1389]}, {"w": "label.", "b": [0.5778, 0.124, 0.6223, 0.1389]}, {"w": "Let’s", "b": [0.6313, 0.124, 0.6714, 0.1389]}, {"w": "say,", "b": [0.6779, 0.124, 0.7078, 0.1389]}, {"w": "our", "b": [0.7143, 0.124, 0.7416, 0.1389]}, {"w": "model", "b": [0.748, 0.124, 0.7977, 0.1389]}, {"w": "predicts", "b": [0.8041, 0.124, 0.8692, 0.1389]}, {"w": "classes", "b": [0.1312, 0.1419, 0.1839, 0.1569]}, {"w": "“spam”", "b": [0.19, 0.1419, 0.2496, 0.1569]}, {"w": "and", "b": [0.2557, 0.1419, 0.2855, 0.1569]}, {"w": "“not_spam”:", "b": [0.2916, 0.1419, 0.3968, 0.1569]}]}, {"id": "b_1", "type": "equation", "text": "spam (predicted) not_spam (predicted)", "words": [{"w": "spam", "b": [0.4184, 0.1807, 0.4606, 0.1957]}, {"w": "(predicted)", "b": [0.4667, 0.1807, 0.556, 0.1957]}, {"w": "not_spam", "b": [0.5781, 0.1807, 0.6608, 0.1957]}, {"w": "(predicted)", "b": [0.6669, 0.1807, 0.7562, 0.1957]}]}, {"id": "b_2", "type": "equation", "text": "spam (actual) 23 (TP) 1 (FN) not_spam (actual) 12 (FP) 556 (TN)", "words": [{"w": "spam", "b": [0.244, 0.2062, 0.2861, 0.2211]}, {"w": "(actual)", "b": [0.2922, 0.2062, 0.3558, 0.2211]}, {"w": "23", "b": [0.4185, 0.2062, 0.4369, 0.2211]}, {"w": "(TP)", "b": [0.4431, 0.2062, 0.4833, 0.2211]}, {"w": "1", "b": [0.5781, 0.2062, 0.5873, 0.2211]}, {"w": "(FN)", "b": [0.5935, 0.2062, 0.6337, 0.2211]}, {"w": "not_spam", "b": [0.244, 0.2241, 0.3266, 0.2391]}, {"w": "(actual)", "b": [0.3327, 0.2241, 0.3963, 0.2391]}, {"w": "12", "b": [0.4185, 0.2241, 0.4369, 0.2391]}, {"w": "(FP)", "b": [0.4431, 0.2241, 0.482, 0.2391]}, {"w": "556", "b": [0.5781, 0.2241, 0.6058, 0.2391]}, {"w": "(TN)", "b": [0.6119, 0.2241, 0.6534, 0.2391]}]}, {"id": "b_3", "type": "paragraph", "text": "The above matrix shows that out of 24 actual spam examples, the model correctly classified 23. In this case, we say that we have 23 true positives or TP = 23. The model incorrectly classified 1 spam example as not_spam. In this case, we have 1 false negative, or FN = 1. Similarly, out of 568 actual not_spam examples, the model classified correctly 556 and incorrectly 12 examples (556 true negatives, TN = 556, and 12 false positives, FP = 12).", "words": [{"w": "The", "b": [0.1306, 0.2782, 0.1617, 0.2931]}, {"w": "above", "b": [0.1666, 0.2782, 0.2119, 0.2931]}, {"w": "matrix", "b": [0.2168, 0.2782, 0.2696, 0.2931]}, {"w": "shows", "b": [0.2745, 0.2782, 0.3204, 0.2931]}, {"w": "that", "b": [0.3253, 0.2782, 0.3585, 0.2931]}, {"w": "out", "b": [0.3634, 0.2782, 0.3895, 0.2931]}, {"w": "of", "b": [0.3945, 0.2782, 0.409, 0.2931]}, {"w": "24", "b": [0.4139, 0.2782, 0.4319, 0.2931]}, {"w": "actual", "b": [0.4369, 0.2782, 0.4851, 0.2931]}, {"w": "spam", "b": [0.49, 0.2782, 0.5313, 0.2931]}, {"w": "examples,", "b": [0.5362, 0.2782, 0.6132, 0.2931]}, {"w": "the", "b": [0.6184, 0.2782, 0.6435, 0.2931]}, {"w": "model", "b": [0.6484, 0.2782, 0.6962, 0.2931]}, {"w": "correctly", "b": [0.7011, 0.2782, 0.77, 0.2931]}, {"w": "classified", "b": [0.775, 0.2782, 0.8445, 0.2931]}, {"w": "23.", "b": [0.8492, 0.2782, 0.8724, 0.2931]}, {"w": "In", "b": [0.1312, 0.2961, 0.1485, 0.3111]}, {"w": "this", "b": [0.1555, 0.2961, 0.1859, 0.3111]}, {"w": "case,", "b": [0.1929, 0.2961, 0.2317, 0.3111]}, {"w": "we", "b": [0.2389, 0.2961, 0.2604, 0.3111]}, {"w": "say", "b": [0.2673, 0.2961, 0.2936, 0.3111]}, {"w": "that", "b": [0.3006, 0.2961, 0.3351, 0.3111]}, {"w": "we", "b": [0.3421, 0.2961, 0.3635, 0.3111]}, {"w": "have", "b": [0.3705, 0.2961, 0.4077, 0.3111]}, {"w": "23", "b": [0.4145, 0.2961, 0.4334, 0.3111]}, {"w": "true", "b": [0.4404, 0.2964, 0.4789, 0.3114]}, {"w": "positives", "b": [0.4869, 0.2964, 0.567, 0.3114]}, {"w": "or", "b": [0.574, 0.2961, 0.5907, 0.3111]}, {"w": "TP", "b": [0.5977, 0.2961, 0.6236, 0.3111]}, {"w": "=", "b": [0.6301, 0.2961, 0.6448, 0.3111]}, {"w": "23.", "b": [0.6513, 0.2961, 0.6753, 0.3111]}, {"w": "The", "b": [0.686, 0.2961, 0.7185, 0.3111]}, {"w": "model", "b": [0.7254, 0.2961, 0.7751, 0.3111]}, {"w": "incorrectly", "b": [0.7821, 0.2961, 0.8695, 0.3111]}, {"w": "classified", "b": [0.1312, 0.3141, 0.2019, 0.329]}, {"w": "1", "b": [0.208, 0.3141, 0.2171, 0.329]}, {"w": "spam", "b": [0.2233, 0.3141, 0.2652, 0.329]}, {"w": "example", "b": [0.2714, 0.3141, 0.3372, 0.329]}, {"w": "as", "b": [0.3434, 0.3141, 0.3598, 0.329]}, {"w": "not_spam.", "b": [0.3659, 0.3141, 0.4533, 0.329]}, {"w": "In", "b": [0.4615, 0.3141, 0.4783, 0.329]}, {"w": "this", "b": [0.4845, 0.3141, 0.5142, 0.329]}, {"w": "case,", "b": [0.5203, 0.3141, 0.5582, 0.329]}, {"w": "we", "b": [0.5644, 0.3141, 0.5853, 0.329]}, {"w": "have", "b": [0.5914, 0.3141, 0.6276, 0.329]}, {"w": "1", "b": [0.6336, 0.3141, 0.6428, 0.329]}, {"w": "false", "b": [0.649, 0.3144, 0.6898, 0.3293]}, {"w": "negative,", "b": [0.6969, 0.3141, 0.7789, 0.3293]}, {"w": "or", "b": [0.785, 0.3141, 0.8014, 0.329]}, {"w": "FN", "b": [0.8075, 0.3141, 0.8334, 0.329]}, {"w": "=", "b": [0.8386, 0.3141, 0.8529, 0.329]}, {"w": "1.", "b": [0.858, 0.3141, 0.8723, 0.329]}, {"w": "Similarly,", "b": [0.1312, 0.332, 0.2087, 0.347]}, {"w": "out", "b": [0.2171, 0.332, 0.2443, 0.347]}, {"w": "of", "b": [0.2523, 0.332, 0.2675, 0.347]}, {"w": "568", "b": [0.2754, 0.332, 0.3036, 0.347]}, {"w": "actual", "b": [0.3116, 0.332, 0.3618, 0.347]}, {"w": "not_spam", "b": [0.3698, 0.332, 0.4541, 0.347]}, {"w": "examples,", "b": [0.462, 0.332, 0.5422, 0.347]}, {"w": "the", "b": [0.5506, 0.332, 0.5767, 0.347]}, {"w": "model", "b": [0.5847, 0.332, 0.6344, 0.347]}, {"w": "classified", "b": [0.6423, 0.332, 0.7148, 0.347]}, {"w": "correctly", "b": [0.7227, 0.332, 0.7945, 0.347]}, {"w": "556", "b": [0.8022, 0.332, 0.8305, 0.347]}, {"w": "and", "b": [0.8384, 0.332, 0.8688, 0.347]}, {"w": "incorrectly", "b": [0.1312, 0.3499, 0.2153, 0.3649]}, {"w": "12", "b": [0.2213, 0.3499, 0.2393, 0.3649]}, {"w": "examples", "b": [0.2454, 0.3499, 0.3173, 0.3649]}, {"w": "(556", "b": [0.3234, 0.3499, 0.3575, 0.3649]}, {"w": "true", "b": [0.3636, 0.3503, 0.4021, 0.3652]}, {"w": "negatives,", "b": [0.409, 0.3499, 0.4993, 0.3652]}, {"w": "TN", "b": [0.5054, 0.3499, 0.5326, 0.3649]}, {"w": "=", "b": [0.5377, 0.3499, 0.5517, 0.3649]}, {"w": "556,", "b": [0.5569, 0.3499, 0.589, 0.3649]}, {"w": "and", "b": [0.5951, 0.3499, 0.6242, 0.3649]}, {"w": "12", "b": [0.6303, 0.3499, 0.6483, 0.3649]}, {"w": "false", "b": [0.6544, 0.3503, 0.6952, 0.3652]}, {"w": "positives,", "b": [0.7021, 0.3499, 0.7873, 0.3652]}, {"w": "FP", "b": [0.7933, 0.3499, 0.8179, 0.3649]}, {"w": "=", "b": [0.823, 0.3499, 0.8371, 0.3649]}, {"w": "12).", "b": [0.8422, 0.3499, 0.8724, 0.3649]}]}, {"id": "b_4", "type": "paragraph", "text": "The confusion matrix for multiclass classification has as many rows and columns as there are different classes. It can help you to determine mistake patterns. For example, a confusion matrix could reveal that a model trained to recognize different species of animals tends to mistakenly predict “cat” instead of “panther,” or “mouse” instead of “rat.” In this case, you can add more labeled examples of these species to help the learning algorithm “see” the difference between those animals. Alternatively, you might add features that would help the learning algorithm do better at distinguishing between those pairs of species.", "words": [{"w": "The", "b": [0.1306, 0.3769, 0.1617, 0.3918]}, {"w": "confusion", "b": [0.1678, 0.3769, 0.2418, 0.3918]}, {"w": "matrix", "b": [0.2479, 0.3769, 0.3007, 0.3918]}, {"w": "for", "b": [0.3068, 0.3769, 0.3285, 0.3918]}, {"w": "multiclass", "b": [0.3346, 0.3769, 0.4127, 0.3918]}, {"w": "classification", "b": [0.4188, 0.3769, 0.5185, 0.3918]}, {"w": "has", "b": [0.5246, 0.3769, 0.5508, 0.3918]}, {"w": "as", "b": [0.557, 0.3769, 0.5731, 0.3918]}, {"w": "many", "b": [0.5792, 0.3769, 0.6224, 0.3918]}, {"w": "rows", "b": [0.6286, 0.3769, 0.6644, 0.3918]}, {"w": "and", "b": [0.6705, 0.3769, 0.6996, 0.3918]}, {"w": "columns", "b": [0.7057, 0.3769, 0.7701, 0.3918]}, {"w": "as", "b": [0.7763, 0.3769, 0.7924, 0.3918]}, {"w": "there", "b": [0.7985, 0.3769, 0.8388, 0.3918]}, {"w": "are", "b": [0.8449, 0.3769, 0.8691, 0.3918]}, {"w": "different", "b": [0.1312, 0.3948, 0.1992, 0.4098]}, {"w": "classes.", "b": [0.2054, 0.3948, 0.2642, 0.4098]}, {"w": "It", "b": [0.2724, 0.3948, 0.2865, 0.4098]}, {"w": "can", "b": [0.2927, 0.3948, 0.3209, 0.4098]}, {"w": "help", "b": [0.3271, 0.3948, 0.3616, 0.4098]}, {"w": "you", "b": [0.3677, 0.3948, 0.397, 0.4098]}, {"w": "to", "b": [0.4031, 0.3948, 0.4198, 0.4098]}, {"w": "determine", "b": [0.426, 0.3948, 0.5076, 0.4098]}, {"w": "mistake", "b": [0.5137, 0.3948, 0.5765, 0.4098]}, {"w": "patterns.", "b": [0.5827, 0.3948, 0.656, 0.4098]}, {"w": "For", "b": [0.6642, 0.3948, 0.6917, 0.4098]}, {"w": "example,", "b": [0.6979, 0.3948, 0.7705, 0.4098]}, {"w": "a", "b": [0.7766, 0.3948, 0.786, 0.4098]}, {"w": "confusion", "b": [0.7922, 0.3948, 0.8691, 0.4098]}, {"w": "matrix", "b": [0.1312, 0.4128, 0.186, 0.4277]}, {"w": "could", "b": [0.1921, 0.4128, 0.2359, 0.4277]}, {"w": "reveal", "b": [0.242, 0.4128, 0.29, 0.4277]}, {"w": "that", "b": [0.2962, 0.4128, 0.3305, 0.4277]}, {"w": "a", "b": [0.3367, 0.4128, 0.346, 0.4277]}, {"w": "model", "b": [0.3522, 0.4128, 0.4017, 0.4277]}, {"w": "trained", "b": [0.4078, 0.4128, 0.4662, 0.4277]}, {"w": "to", "b": [0.4723, 0.4128, 0.489, 0.4277]}, {"w": "recognize", "b": [0.4952, 0.4128, 0.5702, 0.4277]}, {"w": "different", "b": [0.5764, 0.4128, 0.6442, 0.4277]}, {"w": "species", "b": [0.6503, 0.4128, 0.7063, 0.4277]}, {"w": "of", "b": [0.7124, 0.4128, 0.7275, 0.4277]}, {"w": "animals", "b": [0.7337, 0.4128, 0.7963, 0.4277]}, {"w": "tends", "b": [0.8024, 0.4128, 0.8463, 0.4277]}, {"w": "to", "b": [0.8524, 0.4128, 0.8691, 0.4277]}, {"w": "mistakenly", "b": [0.1312, 0.4307, 0.2171, 0.4457]}, {"w": "predict", "b": [0.2233, 0.4307, 0.2792, 0.4457]}, {"w": "“cat”", "b": [0.2854, 0.4307, 0.3269, 0.4457]}, {"w": "instead", "b": [0.3331, 0.4307, 0.3901, 0.4457]}, {"w": "of", "b": [0.3962, 0.4307, 0.411, 0.4457]}, {"w": "“panther,”", "b": [0.4171, 0.4307, 0.5009, 0.4457]}, {"w": "or", "b": [0.5071, 0.4307, 0.5234, 0.4457]}, {"w": "“mouse”", "b": [0.5296, 0.4307, 0.5966, 0.4457]}, {"w": "instead", "b": [0.6028, 0.4307, 0.6598, 0.4457]}, {"w": "of", "b": [0.6659, 0.4307, 0.6806, 0.4457]}, {"w": "“rat.”", "b": [0.6868, 0.4307, 0.73, 0.4457]}, {"w": "In", "b": [0.7382, 0.4307, 0.755, 0.4457]}, {"w": "this", "b": [0.7611, 0.4307, 0.7907, 0.4457]}, {"w": "case,", "b": [0.7968, 0.4307, 0.8345, 0.4457]}, {"w": "you", "b": [0.8407, 0.4307, 0.8691, 0.4457]}, {"w": "can", "b": [0.1312, 0.4487, 0.1595, 0.4636]}, {"w": "add", "b": [0.1667, 0.4487, 0.197, 0.4636]}, {"w": "more", "b": [0.2043, 0.4487, 0.2451, 0.4636]}, {"w": "labeled", "b": [0.2523, 0.4487, 0.3104, 0.4636]}, {"w": "examples", "b": [0.3176, 0.4487, 0.3925, 0.4636]}, {"w": "of", "b": [0.3998, 0.4487, 0.4149, 0.4636]}, {"w": "these", "b": [0.4221, 0.4487, 0.4641, 0.4636]}, {"w": "species", "b": [0.4713, 0.4487, 0.5275, 0.4636]}, {"w": "to", "b": [0.5348, 0.4487, 0.5515, 0.4636]}, {"w": "help", "b": [0.5587, 0.4487, 0.5933, 0.4636]}, {"w": "the", "b": [0.6005, 0.4487, 0.6266, 0.4636]}, {"w": "learning", "b": [0.6339, 0.4487, 0.6998, 0.4636]}, {"w": "algorithm", "b": [0.7071, 0.4487, 0.7866, 0.4636]}, {"w": "“see”", "b": [0.7938, 0.4487, 0.8358, 0.4636]}, {"w": "the", "b": [0.843, 0.4487, 0.8691, 0.4636]}, {"w": "difference", "b": [0.1312, 0.4666, 0.2069, 0.4816]}, {"w": "between", "b": [0.213, 0.4666, 0.2774, 0.4816]}, {"w": "those", "b": [0.2836, 0.4666, 0.3253, 0.4816]}, {"w": "animals.", "b": [0.3315, 0.4666, 0.3975, 0.4816]}, {"w": "Alternatively,", "b": [0.4058, 0.4666, 0.5138, 0.4816]}, {"w": "you", "b": [0.52, 0.4666, 0.5484, 0.4816]}, {"w": "might", "b": [0.5545, 0.4666, 0.6007, 0.4816]}, {"w": "add", "b": [0.6068, 0.4666, 0.6363, 0.4816]}, {"w": "features", "b": [0.6424, 0.4666, 0.705, 0.4816]}, {"w": "that", "b": [0.7112, 0.4666, 0.7446, 0.4816]}, {"w": "would", "b": [0.7508, 0.4666, 0.7979, 0.4816]}, {"w": "help", "b": [0.8041, 0.4666, 0.8376, 0.4816]}, {"w": "the", "b": [0.8438, 0.4666, 0.8691, 0.4816]}, {"w": "learning", "b": [0.1312, 0.4845, 0.1959, 0.4995]}, {"w": "algorithm", "b": [0.202, 0.4845, 0.28, 0.4995]}, {"w": "do", "b": [0.2862, 0.4845, 0.3056, 0.4995]}, {"w": "better", "b": [0.3118, 0.4845, 0.3606, 0.4995]}, {"w": "at", "b": [0.3667, 0.4845, 0.3831, 0.4995]}, {"w": "distinguishing", "b": [0.3893, 0.4845, 0.5013, 0.4995]}, {"w": "between", "b": [0.5074, 0.4845, 0.5725, 0.4995]}, {"w": "those", "b": [0.5787, 0.4845, 0.6208, 0.4995]}, {"w": "pairs", "b": [0.627, 0.4845, 0.6661, 0.4995]}, {"w": "of", "b": [0.6723, 0.4845, 0.6871, 0.4995]}, {"w": "species.", "b": [0.6933, 0.4845, 0.7535, 0.4995]}]}, {"id": "b_5", "type": "paragraph", "text": "The confusion matrix is used to calculate three performance metrics: precision, recall, and accuracy. Precision and recall are most frequently used to assess a binary model.", "words": [{"w": "The", "b": [0.1306, 0.5115, 0.1627, 0.5264]}, {"w": "confusion", "b": [0.1689, 0.5115, 0.2453, 0.5264]}, {"w": "matrix", "b": [0.2514, 0.5115, 0.3059, 0.5264]}, {"w": "is", "b": [0.312, 0.5115, 0.3246, 0.5264]}, {"w": "used", "b": [0.3307, 0.5115, 0.3671, 0.5264]}, {"w": "to", "b": [0.3733, 0.5115, 0.3899, 0.5264]}, {"w": "calculate", "b": [0.396, 0.5115, 0.4676, 0.5264]}, {"w": "three", "b": [0.4737, 0.5115, 0.5153, 0.5264]}, {"w": "performance", "b": [0.5214, 0.5115, 0.6222, 0.5264]}, {"w": "metrics:", "b": [0.6283, 0.5115, 0.6928, 0.5264]}, {"w": "precision,", "b": [0.701, 0.5115, 0.778, 0.5264]}, {"w": "recall,", "b": [0.7841, 0.5115, 0.8329, 0.5264]}, {"w": "and", "b": [0.8391, 0.5115, 0.8692, 0.5264]}, {"w": "accuracy.", "b": [0.1312, 0.5294, 0.2051, 0.5444]}, {"w": "Precision", "b": [0.2133, 0.5294, 0.2866, 0.5444]}, {"w": "and", "b": [0.2927, 0.5294, 0.3225, 0.5444]}, {"w": "recall", "b": [0.3286, 0.5294, 0.3717, 0.5444]}, {"w": "are", "b": [0.3779, 0.5294, 0.4025, 0.5444]}, {"w": "most", "b": [0.4087, 0.5294, 0.4478, 0.5444]}, {"w": "frequently", "b": [0.4539, 0.5294, 0.535, 0.5444]}, {"w": "used", "b": [0.5411, 0.5294, 0.5772, 0.5444]}, {"w": "to", "b": [0.5833, 0.5294, 0.5997, 0.5444]}, {"w": "assess", "b": [0.6059, 0.5294, 0.6524, 0.5444]}, {"w": "a", "b": [0.6586, 0.5294, 0.6678, 0.5444]}, {"w": "binary", "b": [0.674, 0.5294, 0.7258, 0.5444]}, {"w": "model.", "b": [0.7319, 0.5294, 0.7858, 0.5444]}]}, {"id": "b_6", "type": "paragraph", "text": "Precision is the ratio of true positive predictions to the overall number of positive predictions:", "words": [{"w": "Precision", "b": [0.1312, 0.5566, 0.2162, 0.5716]}, {"w": "is", "b": [0.221, 0.5563, 0.2332, 0.5713]}, {"w": "the", "b": [0.2379, 0.5563, 0.2631, 0.5713]}, {"w": "ratio", "b": [0.2678, 0.5563, 0.3051, 0.5713]}, {"w": "of", "b": [0.3098, 0.5563, 0.3244, 0.5713]}, {"w": "true", "b": [0.3292, 0.5563, 0.3614, 0.5713]}, {"w": "positive", "b": [0.3661, 0.5563, 0.4271, 0.5713]}, {"w": "predictions", "b": [0.4318, 0.5563, 0.5184, 0.5713]}, {"w": "to", "b": [0.5232, 0.5563, 0.5392, 0.5713]}, {"w": "the", "b": [0.544, 0.5563, 0.5692, 0.5713]}, {"w": "overall", "b": [0.5739, 0.5563, 0.6257, 0.5713]}, {"w": "number", "b": [0.6305, 0.5563, 0.6903, 0.5713]}, {"w": "of", "b": [0.6951, 0.5563, 0.7096, 0.5713]}, {"w": "positive", "b": [0.7144, 0.5563, 0.7753, 0.5713]}, {"w": "predictions:", "b": [0.7801, 0.5563, 0.8717, 0.5713]}]}, {"id": "b_7", "type": "paragraph", "text": "precision", "words": [{"w": "precision", "b": [0.4085, 0.6052, 0.4794, 0.6201]}]}, {"id": "b_8", "type": "equation", "text": "def = TP TP + FP.", "words": [{"w": "def", "b": [0.4845, 0.6003, 0.5038, 0.6107]}, {"w": "=", "b": [0.487, 0.6052, 0.5013, 0.6201]}, {"w": "TP", "b": [0.5347, 0.5951, 0.5606, 0.61]}, {"w": "TP", "b": [0.5111, 0.6154, 0.537, 0.6304]}, {"w": "+", "b": [0.5411, 0.6154, 0.5555, 0.6304]}, {"w": "FP.", "b": [0.5596, 0.6054, 0.5915, 0.6304]}]}, {"id": "b_9", "type": "paragraph", "text": "Recall is the ratio of true positive predictions to the overall number of positive examples:", "words": [{"w": "Recall", "b": [0.1312, 0.6469, 0.1884, 0.6618]}, {"w": "is", "b": [0.1946, 0.6466, 0.207, 0.6615]}, {"w": "the", "b": [0.2131, 0.6466, 0.2388, 0.6615]}, {"w": "ratio", "b": [0.2449, 0.6466, 0.2829, 0.6615]}, {"w": "of", "b": [0.2891, 0.6466, 0.3039, 0.6615]}, {"w": "true", "b": [0.3101, 0.6466, 0.343, 0.6615]}, {"w": "positive", "b": [0.3491, 0.6466, 0.4113, 0.6615]}, {"w": "predictions", "b": [0.4174, 0.6466, 0.5058, 0.6615]}, {"w": "to", "b": [0.5119, 0.6466, 0.5283, 0.6615]}, {"w": "the", "b": [0.5345, 0.6466, 0.5601, 0.6615]}, {"w": "overall", "b": [0.5663, 0.6466, 0.6191, 0.6615]}, {"w": "number", "b": [0.6253, 0.6466, 0.6864, 0.6615]}, {"w": "of", "b": [0.6925, 0.6466, 0.7074, 0.6615]}, {"w": "positive", "b": [0.7135, 0.6466, 0.7757, 0.6615]}, {"w": "examples:", "b": [0.7818, 0.6466, 0.8604, 0.6615]}]}, {"id": "b_10", "type": "paragraph", "text": "recall", "words": [{"w": "recall", "b": [0.4218, 0.6954, 0.4649, 0.7104]}]}, {"id": "b_11", "type": "equation", "text": "def = TP TP + FN.", "words": [{"w": "def", "b": [0.47, 0.6905, 0.4893, 0.701]}, {"w": "=", "b": [0.4724, 0.6954, 0.4868, 0.7104]}, {"w": "TP", "b": [0.5208, 0.6853, 0.5467, 0.7002]}, {"w": "TP", "b": [0.4966, 0.7057, 0.5225, 0.7206]}, {"w": "+", "b": [0.5266, 0.7057, 0.5409, 0.7206]}, {"w": "FN.", "b": [0.545, 0.6957, 0.5783, 0.7206]}]}, {"id": "b_12", "type": "paragraph", "text": "To understand the meaning and the importance of precision and recall for model assessment, it’s useful to think about the prediction problem as the problem of research of documents in a database using a query. The precision is the proportion of relevant documents actually found in the list of all returned documents. The recall is the ratio of the relevant documents returned by the search engine, compared to the total number of relevant documents that should have been returned.", "words": [{"w": "To", "b": [0.1306, 0.7367, 0.1512, 0.7516]}, {"w": "understand", "b": [0.1574, 0.7367, 0.2462, 0.7516]}, {"w": "the", "b": [0.2524, 0.7367, 0.2776, 0.7516]}, {"w": "meaning", "b": [0.2837, 0.7367, 0.3502, 0.7516]}, {"w": "and", "b": [0.3564, 0.7367, 0.3856, 0.7516]}, {"w": "the", "b": [0.3918, 0.7367, 0.417, 0.7516]}, {"w": "importance", "b": [0.4232, 0.7367, 0.5124, 0.7516]}, {"w": "of", "b": [0.5186, 0.7367, 0.5332, 0.7516]}, {"w": "precision", "b": [0.5393, 0.7367, 0.6091, 0.7516]}, {"w": "and", "b": [0.6152, 0.7367, 0.6444, 0.7516]}, {"w": "recall", "b": [0.6506, 0.7367, 0.693, 0.7516]}, {"w": "for", "b": [0.6992, 0.7367, 0.7209, 0.7516]}, {"w": "model", "b": [0.727, 0.7367, 0.7749, 0.7516]}, {"w": "assessment,", "b": [0.7811, 0.7367, 0.8717, 0.7516]}, {"w": "it’s", "b": [0.1312, 0.7546, 0.1564, 0.7696]}, {"w": "useful", "b": [0.1626, 0.7546, 0.2103, 0.7696]}, {"w": "to", "b": [0.2165, 0.7546, 0.2332, 0.7696]}, {"w": "think", "b": [0.2394, 0.7546, 0.2828, 0.7696]}, {"w": "about", "b": [0.289, 0.7546, 0.3366, 0.7696]}, {"w": "the", "b": [0.3428, 0.7546, 0.3689, 0.7696]}, {"w": "prediction", "b": [0.3751, 0.7546, 0.4578, 0.7696]}, {"w": "problem", "b": [0.464, 0.7546, 0.531, 0.7696]}, {"w": "as", "b": [0.5371, 0.7546, 0.554, 0.7696]}, {"w": "the", "b": [0.5602, 0.7546, 0.5863, 0.7696]}, {"w": "problem", "b": [0.5925, 0.7546, 0.6595, 0.7696]}, {"w": "of", "b": [0.6657, 0.7546, 0.6808, 0.7696]}, {"w": "research", "b": [0.687, 0.7546, 0.7537, 0.7696]}, {"w": "of", "b": [0.7598, 0.7546, 0.775, 0.7696]}, {"w": "documents", "b": [0.7812, 0.7546, 0.8692, 0.7696]}, {"w": "in", "b": [0.1312, 0.7725, 0.1466, 0.7875]}, {"w": "a", "b": [0.1528, 0.7725, 0.162, 0.7875]}, {"w": "database", "b": [0.1681, 0.7725, 0.2389, 0.7875]}, {"w": "using", "b": [0.2451, 0.7725, 0.2872, 0.7875]}, {"w": "a", "b": [0.2934, 0.7725, 0.3026, 0.7875]}, {"w": "query.", "b": [0.3087, 0.7725, 0.3575, 0.7875]}, {"w": "The", "b": [0.3657, 0.7725, 0.3974, 0.7875]}, {"w": "precision", "b": [0.4036, 0.7725, 0.4744, 0.7875]}, {"w": "is", "b": [0.4806, 0.7725, 0.493, 0.7875]}, {"w": "the", "b": [0.4991, 0.7725, 0.5248, 0.7875]}, {"w": "proportion", "b": [0.5309, 0.7725, 0.6166, 0.7875]}, {"w": "of", "b": [0.6227, 0.7725, 0.6376, 0.7875]}, {"w": "relevant", "b": [0.6437, 0.7725, 0.7073, 0.7875]}, {"w": "documents", "b": [0.7135, 0.7725, 0.7996, 0.7875]}, {"w": "actually", "b": [0.8058, 0.7725, 0.8698, 0.7875]}, {"w": "found", "b": [0.1312, 0.7905, 0.1762, 0.8054]}, {"w": "in", "b": [0.1823, 0.7905, 0.1975, 0.8054]}, {"w": "the", "b": [0.2036, 0.7905, 0.2289, 0.8054]}, {"w": "list", "b": [0.235, 0.7905, 0.2594, 0.8054]}, {"w": "of", "b": [0.2655, 0.7905, 0.2802, 0.8054]}, {"w": "all", "b": [0.2863, 0.7905, 0.3055, 0.8054]}, {"w": "returned", "b": [0.3117, 0.7905, 0.3795, 0.8054]}, {"w": "documents.", "b": [0.3856, 0.7905, 0.4756, 0.8054]}, {"w": "The", "b": [0.4838, 0.7905, 0.5151, 0.8054]}, {"w": "recall", "b": [0.5213, 0.7905, 0.5637, 0.8054]}, {"w": "is", "b": [0.5699, 0.7905, 0.5821, 0.8054]}, {"w": "the", "b": [0.5882, 0.7905, 0.6135, 0.8054]}, {"w": "ratio", "b": [0.6196, 0.7905, 0.6571, 0.8054]}, {"w": "of", "b": [0.6632, 0.7905, 0.6778, 0.8054]}, {"w": "the", "b": [0.684, 0.7905, 0.7092, 0.8054]}, {"w": "relevant", "b": [0.7154, 0.7905, 0.7781, 0.8054]}, {"w": "documents", "b": [0.7842, 0.7905, 0.8692, 0.8054]}, {"w": "returned", "b": [0.1312, 0.8084, 0.2014, 0.8234]}, {"w": "by", "b": [0.2082, 0.8084, 0.2281, 0.8234]}, {"w": "the", "b": [0.2348, 0.8084, 0.2609, 0.8234]}, {"w": "search", "b": [0.2677, 0.8084, 0.3186, 0.8234]}, {"w": "engine,", "b": [0.3253, 0.8084, 0.3829, 0.8234]}, {"w": "compared", "b": [0.3898, 0.8084, 0.4693, 0.8234]}, {"w": "to", "b": [0.476, 0.8084, 0.4928, 0.8234]}, {"w": "the", "b": [0.4995, 0.8084, 0.5256, 0.8234]}, {"w": "total", "b": [0.5324, 0.8084, 0.5711, 0.8234]}, {"w": "number", "b": [0.5778, 0.8084, 0.6401, 0.8234]}, {"w": "of", "b": [0.6468, 0.8084, 0.662, 0.8234]}, {"w": "relevant", "b": [0.6687, 0.8084, 0.7337, 0.8234]}, {"w": "documents", "b": [0.7404, 0.8084, 0.8284, 0.8234]}, {"w": "that", "b": [0.8351, 0.8084, 0.8696, 0.8234]}, {"w": "should", "b": [0.1312, 0.8264, 0.1836, 0.8413]}, {"w": "have", "b": [0.1898, 0.8264, 0.2262, 0.8413]}, {"w": "been", "b": [0.2324, 0.8264, 0.2698, 0.8413]}, {"w": "returned.", "b": [0.2759, 0.8264, 0.3499, 0.8413]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 16", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "16", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 155, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "In spam detection, we want to have high precision, to avoid wrongly placing a legitimate message in our spam folder. We are willing to tolerate lower recall, since we can deal with some spam messages in our inbox.", "words": [{"w": "In", "b": [0.1312, 0.0881, 0.1485, 0.1031]}, {"w": "spam", "b": [0.1552, 0.0881, 0.1981, 0.1031]}, {"w": "detection,", "b": [0.2048, 0.0881, 0.2854, 0.1031]}, {"w": "we", "b": [0.2922, 0.0881, 0.3136, 0.1031]}, {"w": "want", "b": [0.3203, 0.0881, 0.36, 0.1031]}, {"w": "to", "b": [0.3667, 0.0881, 0.3834, 0.1031]}, {"w": "have", "b": [0.3901, 0.0881, 0.4273, 0.1031]}, {"w": "high", "b": [0.4339, 0.0881, 0.4695, 0.1031]}, {"w": "precision,", "b": [0.4762, 0.0881, 0.5538, 0.1031]}, {"w": "to", "b": [0.5606, 0.0881, 0.5773, 0.1031]}, {"w": "avoid", "b": [0.584, 0.0881, 0.6274, 0.1031]}, {"w": "wrongly", "b": [0.6341, 0.0881, 0.6995, 0.1031]}, {"w": "placing", "b": [0.7061, 0.0881, 0.7647, 0.1031]}, {"w": "a", "b": [0.7714, 0.0881, 0.7808, 0.1031]}, {"w": "legitimate", "b": [0.7875, 0.0881, 0.869, 0.1031]}, {"w": "message", "b": [0.1312, 0.106, 0.197, 0.121]}, {"w": "in", "b": [0.2031, 0.106, 0.2187, 0.121]}, {"w": "our", "b": [0.2249, 0.106, 0.252, 0.121]}, {"w": "spam", "b": [0.2581, 0.106, 0.3009, 0.121]}, {"w": "folder.", "b": [0.307, 0.106, 0.3585, 0.121]}, {"w": "We", "b": [0.3668, 0.106, 0.3928, 0.121]}, {"w": "are", "b": [0.399, 0.106, 0.424, 0.121]}, {"w": "willing", "b": [0.4302, 0.106, 0.4842, 0.121]}, {"w": "to", "b": [0.4904, 0.106, 0.507, 0.121]}, {"w": "tolerate", "b": [0.5132, 0.106, 0.5756, 0.121]}, {"w": "lower", "b": [0.5818, 0.106, 0.6245, 0.121]}, {"w": "recall,", "b": [0.6306, 0.106, 0.6796, 0.121]}, {"w": "since", "b": [0.6857, 0.106, 0.7254, 0.121]}, {"w": "we", "b": [0.7315, 0.106, 0.7529, 0.121]}, {"w": "can", "b": [0.759, 0.106, 0.7871, 0.121]}, {"w": "deal", "b": [0.7933, 0.106, 0.8265, 0.121]}, {"w": "with", "b": [0.8327, 0.106, 0.8691, 0.121]}, {"w": "some", "b": [0.1312, 0.124, 0.1713, 0.1389]}, {"w": "spam", "b": [0.1775, 0.124, 0.2196, 0.1389]}, {"w": "messages", "b": [0.2257, 0.124, 0.2978, 0.1389]}, {"w": "in", "b": [0.304, 0.124, 0.3194, 0.1389]}, {"w": "our", "b": [0.3255, 0.124, 0.3523, 0.1389]}, {"w": "inbox.", "b": [0.3584, 0.124, 0.4076, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "In practice, we choose between high precision or high recall. It’s practically impossible to have both. This is called the precision-recall tradeoff. We can achieve either by various means:", "words": [{"w": "In", "b": [0.1312, 0.1509, 0.1478, 0.1659]}, {"w": "practice,", "b": [0.1529, 0.1509, 0.2203, 0.1659]}, {"w": "we", "b": [0.2256, 0.1509, 0.2462, 0.1659]}, {"w": "choose", "b": [0.2513, 0.1509, 0.3027, 0.1659]}, {"w": "between", "b": [0.3078, 0.1509, 0.3716, 0.1659]}, {"w": "high", "b": [0.3767, 0.1509, 0.4109, 0.1659]}, {"w": "precision", "b": [0.416, 0.1509, 0.4855, 0.1659]}, {"w": "or", "b": [0.4906, 0.1509, 0.5067, 0.1659]}, {"w": "high", "b": [0.5118, 0.1509, 0.546, 0.1659]}, {"w": "recall.", "b": [0.5511, 0.1509, 0.5984, 0.1659]}, {"w": "It’s", "b": [0.6062, 0.1509, 0.6319, 0.1659]}, {"w": "practically", "b": [0.637, 0.1509, 0.72, 0.1659]}, {"w": "impossible", "b": [0.7251, 0.1509, 0.8072, 0.1659]}, {"w": "to", "b": [0.8123, 0.1509, 0.8284, 0.1659]}, {"w": "have", "b": [0.8335, 0.1509, 0.8692, 0.1659]}, {"w": "both.", "b": [0.1312, 0.1689, 0.1729, 0.1838]}, {"w": "This", "b": [0.1805, 0.1689, 0.2158, 0.1838]}, {"w": "is", "b": [0.2199, 0.1689, 0.2321, 0.1838]}, {"w": "called", "b": [0.2362, 0.1689, 0.2814, 0.1838]}, {"w": "the", "b": [0.2856, 0.1689, 0.3107, 0.1838]}, {"w": "precision-recall", "b": [0.3148, 0.1692, 0.4541, 0.1841]}, {"w": "tradeoff.", "b": [0.4589, 0.1689, 0.5376, 0.1841]}, {"w": "We", "b": [0.5451, 0.1689, 0.5707, 0.1838]}, {"w": "can", "b": [0.5769, 0.1689, 0.6046, 0.1838]}, {"w": "achieve", "b": [0.6107, 0.1689, 0.6687, 0.1838]}, {"w": "either", "b": [0.6748, 0.1689, 0.721, 0.1838]}, {"w": "by", "b": [0.7272, 0.1689, 0.7467, 0.1838]}, {"w": "various", "b": [0.7528, 0.1689, 0.8099, 0.1838]}, {"w": "means:", "b": [0.816, 0.1689, 0.8715, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "• by assigning a higher weigh to the examples of a specific class. For example, SVM in scikit-learn accepts weights of classes as input; • by tuning hyperparameters to maximize either precision or recall on the validation set; • by varying the decision threshold for algorithms that return prediction scores. Let’s say we have a logistic regression model or a decision tree. To increase precision (at the cost of a lower recall), we can decide that the prediction will be positive only if the score returned by the model is higher than 0.9 (instead of the default value of 0.5).", "words": [{"w": "•", "b": [0.1538, 0.1958, 0.1681, 0.2107]}, {"w": "by", "b": [0.1774, 0.1958, 0.197, 0.2107]}, {"w": "assigning", "b": [0.2032, 0.1958, 0.2768, 0.2107]}, {"w": "a", "b": [0.283, 0.1958, 0.2923, 0.2107]}, {"w": "higher", "b": [0.2984, 0.1958, 0.3492, 0.2107]}, {"w": "weigh", "b": [0.3553, 0.1958, 0.4014, 0.2107]}, {"w": "to", "b": [0.4075, 0.1958, 0.4241, 0.2107]}, {"w": "the", "b": [0.4302, 0.1958, 0.4561, 0.2107]}, {"w": "examples", "b": [0.4622, 0.1958, 0.5363, 0.2107]}, {"w": "of", "b": [0.5425, 0.1958, 0.5575, 0.2107]}, {"w": "a", "b": [0.5636, 0.1958, 0.5729, 0.2107]}, {"w": "specific", "b": [0.5791, 0.1958, 0.6376, 0.2107]}, {"w": "class.", "b": [0.6438, 0.1958, 0.6864, 0.2107]}, {"w": "For", "b": [0.6946, 0.1958, 0.7219, 0.2107]}, {"w": "example,", "b": [0.728, 0.1958, 0.7999, 0.2107]}, {"w": "SVM", "b": [0.806, 0.1958, 0.8474, 0.2107]}, {"w": "in", "b": [0.8536, 0.1958, 0.8691, 0.2107]}, {"w": "scikit-learn", "b": [0.1774, 0.2137, 0.2662, 0.2287]}, {"w": "accepts", "b": [0.2724, 0.2137, 0.3309, 0.2287]}, {"w": "weights", "b": [0.3371, 0.2137, 0.3967, 0.2287]}, {"w": "of", "b": [0.4028, 0.2137, 0.4177, 0.2287]}, {"w": "classes", "b": [0.4238, 0.2137, 0.4765, 0.2287]}, {"w": "as", "b": [0.4826, 0.2137, 0.4991, 0.2287]}, {"w": "input;", "b": [0.5053, 0.2137, 0.5535, 0.2287]}, {"w": "•", "b": [0.1538, 0.2317, 0.1681, 0.2466]}, {"w": "by", "b": [0.1774, 0.2317, 0.1966, 0.2466]}, {"w": "tuning", "b": [0.2027, 0.2317, 0.2543, 0.2466]}, {"w": "hyperparameters", "b": [0.2605, 0.2317, 0.3938, 0.2466]}, {"w": "to", "b": [0.4, 0.2317, 0.4162, 0.2466]}, {"w": "maximize", "b": [0.4223, 0.2317, 0.4977, 0.2466]}, {"w": "either", "b": [0.5039, 0.2317, 0.5494, 0.2466]}, {"w": "precision", "b": [0.5556, 0.2317, 0.6256, 0.2466]}, {"w": "or", "b": [0.6318, 0.2317, 0.648, 0.2466]}, {"w": "recall", "b": [0.6541, 0.2317, 0.6967, 0.2466]}, {"w": "on", "b": [0.7028, 0.2317, 0.7221, 0.2466]}, {"w": "the", "b": [0.7282, 0.2317, 0.7535, 0.2466]}, {"w": "validation", "b": [0.7597, 0.2317, 0.8381, 0.2466]}, {"w": "set;", "b": [0.8442, 0.2317, 0.8717, 0.2466]}, {"w": "•", "b": [0.1538, 0.2496, 0.1681, 0.2646]}, {"w": "by", "b": [0.1774, 0.2496, 0.1972, 0.2646]}, {"w": "varying", "b": [0.2036, 0.2496, 0.2643, 0.2646]}, {"w": "the", "b": [0.2706, 0.2496, 0.2967, 0.2646]}, {"w": "decision", "b": [0.303, 0.2496, 0.368, 0.2646]}, {"w": "threshold", "b": [0.3743, 0.2496, 0.4508, 0.2646]}, {"w": "for", "b": [0.4571, 0.2496, 0.4797, 0.2646]}, {"w": "algorithms", "b": [0.486, 0.2496, 0.573, 0.2646]}, {"w": "that", "b": [0.5792, 0.2496, 0.6138, 0.2646]}, {"w": "return", "b": [0.6201, 0.2496, 0.6714, 0.2646]}, {"w": "prediction", "b": [0.6777, 0.2496, 0.7604, 0.2646]}, {"w": "scores.", "b": [0.7667, 0.2496, 0.8204, 0.2646]}, {"w": "Let’s", "b": [0.829, 0.2496, 0.8691, 0.2646]}, {"w": "say", "b": [0.1774, 0.2676, 0.2027, 0.2825]}, {"w": "we", "b": [0.2088, 0.2676, 0.2295, 0.2825]}, {"w": "have", "b": [0.2357, 0.2676, 0.2715, 0.2825]}, {"w": "a", "b": [0.2776, 0.2676, 0.2867, 0.2825]}, {"w": "logistic", "b": [0.2929, 0.2676, 0.3485, 0.2825]}, {"w": "regression", "b": [0.3546, 0.2676, 0.4326, 0.2825]}, {"w": "model", "b": [0.4388, 0.2676, 0.4867, 0.2825]}, {"w": "or", "b": [0.4929, 0.2676, 0.5091, 0.2825]}, {"w": "a", "b": [0.5152, 0.2676, 0.5243, 0.2825]}, {"w": "decision", "b": [0.5305, 0.2676, 0.5931, 0.2825]}, {"w": "tree.", "b": [0.5993, 0.2676, 0.6347, 0.2825]}, {"w": "To", "b": [0.6429, 0.2676, 0.6635, 0.2825]}, {"w": "increase", "b": [0.6697, 0.2676, 0.7324, 0.2825]}, {"w": "precision", "b": [0.7386, 0.2676, 0.8084, 0.2825]}, {"w": "(at", "b": [0.8145, 0.2676, 0.8377, 0.2825]}, {"w": "the", "b": [0.8439, 0.2676, 0.8691, 0.2825]}, {"w": "cost", "b": [0.1774, 0.2855, 0.2099, 0.3005]}, {"w": "of", "b": [0.2166, 0.2855, 0.2317, 0.3005]}, {"w": "a", "b": [0.2384, 0.2855, 0.2478, 0.3005]}, {"w": "lower", "b": [0.2544, 0.2855, 0.2974, 0.3005]}, {"w": "recall),", "b": [0.304, 0.2855, 0.3606, 0.3005]}, {"w": "we", "b": [0.3674, 0.2855, 0.3888, 0.3005]}, {"w": "can", "b": [0.3955, 0.2855, 0.4237, 0.3005]}, {"w": "decide", "b": [0.4304, 0.2855, 0.4816, 0.3005]}, {"w": "that", "b": [0.4883, 0.2855, 0.5228, 0.3005]}, {"w": "the", "b": [0.5295, 0.2855, 0.5556, 0.3005]}, {"w": "prediction", "b": [0.5623, 0.2855, 0.645, 0.3005]}, {"w": "will", "b": [0.6516, 0.2855, 0.6809, 0.3005]}, {"w": "be", "b": [0.6876, 0.2855, 0.7069, 0.3005]}, {"w": "positive", "b": [0.7136, 0.2855, 0.777, 0.3005]}, {"w": "only", "b": [0.7836, 0.2855, 0.8187, 0.3005]}, {"w": "if", "b": [0.8253, 0.2855, 0.8363, 0.3005]}, {"w": "the", "b": [0.843, 0.2855, 0.8691, 0.3005]}, {"w": "score", "b": [0.1774, 0.3035, 0.2175, 0.3184]}, {"w": "returned", "b": [0.2237, 0.3035, 0.2925, 0.3184]}, {"w": "by", "b": [0.2986, 0.3035, 0.3181, 0.3184]}, {"w": "the", "b": [0.3243, 0.3035, 0.3499, 0.3184]}, {"w": "model", "b": [0.3561, 0.3035, 0.4048, 0.3184]}, {"w": "is", "b": [0.4109, 0.3035, 0.4233, 0.3184]}, {"w": "higher", "b": [0.4295, 0.3035, 0.4798, 0.3184]}, {"w": "than", "b": [0.4859, 0.3035, 0.5229, 0.3184]}, {"w": "0.9", "b": [0.5288, 0.3035, 0.5524, 0.3187]}, {"w": "(instead", "b": [0.5585, 0.3035, 0.6233, 0.3184]}, {"w": "of", "b": [0.6294, 0.3035, 0.6443, 0.3184]}, {"w": "the", "b": [0.6504, 0.3035, 0.6761, 0.3184]}, {"w": "default", "b": [0.6822, 0.3035, 0.7381, 0.3184]}, {"w": "value", "b": [0.7443, 0.3035, 0.7858, 0.3184]}, {"w": "of", "b": [0.7919, 0.3035, 0.8068, 0.3184]}, {"w": "0.5).", "b": [0.8128, 0.3035, 0.8487, 0.3187]}]}, {"id": "b_3", "type": "paragraph", "text": "Even if precision and recall are defined for binary classification, you can also use them to assess a multiclass classification model. First select a class for which you want to assess these metrics. Then you consider all examples of the selected class as positives and all examples of the remaining classes as negatives.", "words": [{"w": "Even", "b": [0.1312, 0.3304, 0.1723, 0.3453]}, {"w": "if", "b": [0.1788, 0.3304, 0.1898, 0.3453]}, {"w": "precision", "b": [0.1962, 0.3304, 0.2686, 0.3453]}, {"w": "and", "b": [0.2751, 0.3304, 0.3054, 0.3453]}, {"w": "recall", "b": [0.3119, 0.3304, 0.3559, 0.3453]}, {"w": "are", "b": [0.3623, 0.3304, 0.3875, 0.3453]}, {"w": "defined", "b": [0.394, 0.3304, 0.4526, 0.3453]}, {"w": "for", "b": [0.459, 0.3304, 0.4816, 0.3453]}, {"w": "binary", "b": [0.488, 0.3304, 0.5409, 0.3453]}, {"w": "classification,", "b": [0.5474, 0.3304, 0.6564, 0.3453]}, {"w": "you", "b": [0.663, 0.3304, 0.6922, 0.3453]}, {"w": "can", "b": [0.6987, 0.3304, 0.727, 0.3453]}, {"w": "also", "b": [0.7334, 0.3304, 0.7649, 0.3453]}, {"w": "use", "b": [0.7714, 0.3304, 0.7977, 0.3453]}, {"w": "them", "b": [0.8041, 0.3304, 0.846, 0.3453]}, {"w": "to", "b": [0.8524, 0.3304, 0.8692, 0.3453]}, {"w": "assess", "b": [0.1312, 0.3483, 0.1781, 0.3633]}, {"w": "a", "b": [0.1842, 0.3483, 0.1935, 0.3633]}, {"w": "multiclass", "b": [0.1998, 0.3486, 0.2911, 0.3636]}, {"w": "classification", "b": [0.2982, 0.3486, 0.4146, 0.3636]}, {"w": "model.", "b": [0.4207, 0.3483, 0.4748, 0.3633]}, {"w": "First", "b": [0.483, 0.3483, 0.5221, 0.3633]}, {"w": "select", "b": [0.5283, 0.3483, 0.5727, 0.3633]}, {"w": "a", "b": [0.5789, 0.3483, 0.5881, 0.3633]}, {"w": "class", "b": [0.5943, 0.3483, 0.6316, 0.3633]}, {"w": "for", "b": [0.6378, 0.3483, 0.66, 0.3633]}, {"w": "which", "b": [0.6661, 0.3483, 0.7131, 0.3633]}, {"w": "you", "b": [0.7192, 0.3483, 0.7481, 0.3633]}, {"w": "want", "b": [0.7542, 0.3483, 0.7934, 0.3633]}, {"w": "to", "b": [0.7995, 0.3483, 0.816, 0.3633]}, {"w": "assess", "b": [0.8222, 0.3483, 0.869, 0.3633]}, {"w": "these", "b": [0.1312, 0.3663, 0.1732, 0.3812]}, {"w": "metrics.", "b": [0.1811, 0.3663, 0.2461, 0.3812]}, {"w": "Then", "b": [0.2595, 0.3663, 0.3024, 0.3812]}, {"w": "you", "b": [0.3103, 0.3663, 0.3396, 0.3812]}, {"w": "consider", "b": [0.3474, 0.3663, 0.4146, 0.3812]}, {"w": "all", "b": [0.4224, 0.3663, 0.4423, 0.3812]}, {"w": "examples", "b": [0.4502, 0.3663, 0.5251, 0.3812]}, {"w": "of", "b": [0.533, 0.3663, 0.5481, 0.3812]}, {"w": "the", "b": [0.556, 0.3663, 0.5822, 0.3812]}, {"w": "selected", "b": [0.5901, 0.3663, 0.654, 0.3812]}, {"w": "class", "b": [0.6619, 0.3663, 0.6998, 0.3812]}, {"w": "as", "b": [0.7077, 0.3663, 0.7245, 0.3812]}, {"w": "positives", "b": [0.7324, 0.3663, 0.8032, 0.3812]}, {"w": "and", "b": [0.8111, 0.3663, 0.8414, 0.3812]}, {"w": "all", "b": [0.8493, 0.3663, 0.8692, 0.3812]}, {"w": "examples", "b": [0.1312, 0.3842, 0.2047, 0.3992]}, {"w": "of", "b": [0.2108, 0.3842, 0.2257, 0.3992]}, {"w": "the", "b": [0.2318, 0.3842, 0.2575, 0.3992]}, {"w": "remaining", "b": [0.2636, 0.3842, 0.3436, 0.3992]}, {"w": "classes", "b": [0.3498, 0.3842, 0.4024, 0.3992]}, {"w": "as", "b": [0.4086, 0.3842, 0.4251, 0.3992]}, {"w": "negatives.", "b": [0.4312, 0.3842, 0.5103, 0.3992]}]}, {"id": "b_4", "type": "paragraph", "text": "In practice, to compare the performance of two models, you would prefer to have only one number that represents the performance of each model. For example, you would like to avoid situations where the first model has a higher precision, when the second model has a higher recall: if it’s the case, which model is better?", "words": [{"w": "In", "b": [0.1312, 0.4111, 0.1484, 0.4261]}, {"w": "practice,", "b": [0.1545, 0.4111, 0.2241, 0.4261]}, {"w": "to", "b": [0.2303, 0.4111, 0.2469, 0.4261]}, {"w": "compare", "b": [0.253, 0.4111, 0.3216, 0.4261]}, {"w": "the", "b": [0.3277, 0.4111, 0.3537, 0.4261]}, {"w": "performance", "b": [0.3599, 0.4111, 0.4606, 0.4261]}, {"w": "of", "b": [0.4668, 0.4111, 0.4818, 0.4261]}, {"w": "two", "b": [0.488, 0.4111, 0.517, 0.4261]}, {"w": "models,", "b": [0.5232, 0.4111, 0.585, 0.4261]}, {"w": "you", "b": [0.5912, 0.4111, 0.6203, 0.4261]}, {"w": "would", "b": [0.6264, 0.4111, 0.6747, 0.4261]}, {"w": "prefer", "b": [0.6809, 0.4111, 0.7282, 0.4261]}, {"w": "to", "b": [0.7344, 0.4111, 0.7509, 0.4261]}, {"w": "have", "b": [0.7571, 0.4111, 0.794, 0.4261]}, {"w": "only", "b": [0.8001, 0.4111, 0.8349, 0.4261]}, {"w": "one", "b": [0.8411, 0.4111, 0.8691, 0.4261]}, {"w": "number", "b": [0.1312, 0.4291, 0.1911, 0.444]}, {"w": "that", "b": [0.197, 0.4291, 0.2301, 0.444]}, {"w": "represents", "b": [0.236, 0.4291, 0.3153, 0.444]}, {"w": "the", "b": [0.3212, 0.4291, 0.3463, 0.444]}, {"w": "performance", "b": [0.3522, 0.4291, 0.4498, 0.444]}, {"w": "of", "b": [0.4557, 0.4291, 0.4703, 0.444]}, {"w": "each", "b": [0.4762, 0.4291, 0.5109, 0.444]}, {"w": "model.", "b": [0.5168, 0.4291, 0.5695, 0.444]}, {"w": "For", "b": [0.5777, 0.4291, 0.6041, 0.444]}, {"w": "example,", "b": [0.6099, 0.4291, 0.6798, 0.444]}, {"w": "you", "b": [0.6858, 0.4291, 0.7139, 0.444]}, {"w": "would", "b": [0.7198, 0.4291, 0.7665, 0.444]}, {"w": "like", "b": [0.7724, 0.4291, 0.7995, 0.444]}, {"w": "to", "b": [0.8054, 0.4291, 0.8215, 0.444]}, {"w": "avoid", "b": [0.8274, 0.4291, 0.8691, 0.444]}, {"w": "situations", "b": [0.1312, 0.447, 0.2089, 0.462]}, {"w": "where", "b": [0.215, 0.447, 0.262, 0.462]}, {"w": "the", "b": [0.2681, 0.447, 0.2936, 0.462]}, {"w": "first", "b": [0.2997, 0.447, 0.3315, 0.462]}, {"w": "model", "b": [0.3376, 0.447, 0.386, 0.462]}, {"w": "has", "b": [0.3922, 0.447, 0.4188, 0.462]}, {"w": "a", "b": [0.4249, 0.447, 0.4341, 0.462]}, {"w": "higher", "b": [0.4402, 0.447, 0.4902, 0.462]}, {"w": "precision,", "b": [0.4964, 0.447, 0.572, 0.462]}, {"w": "when", "b": [0.5781, 0.447, 0.6199, 0.462]}, {"w": "the", "b": [0.626, 0.447, 0.6515, 0.462]}, {"w": "second", "b": [0.6577, 0.447, 0.7108, 0.462]}, {"w": "model", "b": [0.7169, 0.447, 0.7653, 0.462]}, {"w": "has", "b": [0.7715, 0.447, 0.7981, 0.462]}, {"w": "a", "b": [0.8042, 0.447, 0.8134, 0.462]}, {"w": "higher", "b": [0.8195, 0.447, 0.8695, 0.462]}, {"w": "recall:", "b": [0.1312, 0.465, 0.1795, 0.4799]}, {"w": "if", "b": [0.1877, 0.465, 0.1985, 0.4799]}, {"w": "it’s", "b": [0.2046, 0.465, 0.2293, 0.4799]}, {"w": "the", "b": [0.2355, 0.465, 0.2611, 0.4799]}, {"w": "case,", "b": [0.2673, 0.465, 0.3053, 0.4799]}, {"w": "which", "b": [0.3115, 0.465, 0.3581, 0.4799]}, {"w": "model", "b": [0.3643, 0.465, 0.413, 0.4799]}, {"w": "is", "b": [0.4192, 0.465, 0.4316, 0.4799]}, {"w": "better?", "b": [0.4377, 0.465, 0.4952, 0.4799]}]}, {"id": "b_5", "type": "paragraph", "text": "One way to compare models based on one number is to threshold the minimum acceptable value for one metric, say recall, and then only compare models based on the value of another metric. For example, say you will accept any model whose recall is above 90%. Then you will give preference to the model whose precision is the highest (assuming that its recall is above 90%). This technique is known as optimizing and satisficing technique.", "words": [{"w": "One", "b": [0.1312, 0.4919, 0.1643, 0.5069]}, {"w": "way", "b": [0.1704, 0.4919, 0.2019, 0.5069]}, {"w": "to", "b": [0.208, 0.4919, 0.2245, 0.5069]}, {"w": "compare", "b": [0.2307, 0.4919, 0.2988, 0.5069]}, {"w": "models", "b": [0.305, 0.4919, 0.3613, 0.5069]}, {"w": "based", "b": [0.3675, 0.4919, 0.413, 0.5069]}, {"w": "on", "b": [0.4192, 0.4919, 0.4388, 0.5069]}, {"w": "one", "b": [0.4449, 0.4919, 0.4728, 0.5069]}, {"w": "number", "b": [0.4789, 0.4919, 0.5404, 0.5069]}, {"w": "is", "b": [0.5465, 0.4919, 0.559, 0.5069]}, {"w": "to", "b": [0.5652, 0.4919, 0.5817, 0.5069]}, {"w": "threshold", "b": [0.5879, 0.4919, 0.6633, 0.5069]}, {"w": "the", "b": [0.6695, 0.4919, 0.6953, 0.5069]}, {"w": "minimum", "b": [0.7015, 0.4919, 0.7783, 0.5069]}, {"w": "acceptable", "b": [0.7845, 0.4919, 0.8691, 0.5069]}, {"w": "value", "b": [0.1308, 0.5098, 0.1714, 0.5248]}, {"w": "for", "b": [0.1776, 0.5098, 0.1992, 0.5248]}, {"w": "one", "b": [0.2054, 0.5098, 0.2325, 0.5248]}, {"w": "metric,", "b": [0.2386, 0.5098, 0.2939, 0.5248]}, {"w": "say", "b": [0.3001, 0.5098, 0.3253, 0.5248]}, {"w": "recall,", "b": [0.3314, 0.5098, 0.3787, 0.5248]}, {"w": "and", "b": [0.3848, 0.5098, 0.414, 0.5248]}, {"w": "then", "b": [0.4201, 0.5098, 0.4553, 0.5248]}, {"w": "only", "b": [0.4614, 0.5098, 0.4951, 0.5248]}, {"w": "compare", "b": [0.5012, 0.5098, 0.5676, 0.5248]}, {"w": "models", "b": [0.5737, 0.5098, 0.6286, 0.5248]}, {"w": "based", "b": [0.6347, 0.5098, 0.679, 0.5248]}, {"w": "on", "b": [0.6851, 0.5098, 0.7042, 0.5248]}, {"w": "the", "b": [0.7104, 0.5098, 0.7355, 0.5248]}, {"w": "value", "b": [0.7416, 0.5098, 0.7823, 0.5248]}, {"w": "of", "b": [0.7884, 0.5098, 0.803, 0.5248]}, {"w": "another", "b": [0.8091, 0.5098, 0.8695, 0.5248]}, {"w": "metric.", "b": [0.1312, 0.5278, 0.1888, 0.5428]}, {"w": "For", "b": [0.1974, 0.5278, 0.225, 0.5428]}, {"w": "example,", "b": [0.2313, 0.5278, 0.3039, 0.5428]}, {"w": "say", "b": [0.3103, 0.5278, 0.3365, 0.5428]}, {"w": "you", "b": [0.3428, 0.5278, 0.3721, 0.5428]}, {"w": "will", "b": [0.3784, 0.5278, 0.4077, 0.5428]}, {"w": "accept", "b": [0.414, 0.5278, 0.4663, 0.5428]}, {"w": "any", "b": [0.4726, 0.5278, 0.5019, 0.5428]}, {"w": "model", "b": [0.5081, 0.5278, 0.5578, 0.5428]}, {"w": "whose", "b": [0.5641, 0.5278, 0.6134, 0.5428]}, {"w": "recall", "b": [0.6196, 0.5278, 0.6636, 0.5428]}, {"w": "is", "b": [0.6699, 0.5278, 0.6826, 0.5428]}, {"w": "above", "b": [0.6889, 0.5278, 0.736, 0.5428]}, {"w": "90%.", "b": [0.742, 0.5278, 0.7817, 0.5428]}, {"w": "Then", "b": [0.7903, 0.5278, 0.8332, 0.5428]}, {"w": "you", "b": [0.8395, 0.5278, 0.8688, 0.5428]}, {"w": "will", "b": [0.1306, 0.5457, 0.1596, 0.5607]}, {"w": "give", "b": [0.1658, 0.5457, 0.198, 0.5607]}, {"w": "preference", "b": [0.2042, 0.5457, 0.2869, 0.5607]}, {"w": "to", "b": [0.2931, 0.5457, 0.3097, 0.5607]}, {"w": "the", "b": [0.3158, 0.5457, 0.3418, 0.5607]}, {"w": "model", "b": [0.348, 0.5457, 0.3973, 0.5607]}, {"w": "whose", "b": [0.4034, 0.5457, 0.4524, 0.5607]}, {"w": "precision", "b": [0.4585, 0.5457, 0.5304, 0.5607]}, {"w": "is", "b": [0.5366, 0.5457, 0.5491, 0.5607]}, {"w": "the", "b": [0.5553, 0.5457, 0.5813, 0.5607]}, {"w": "highest", "b": [0.5874, 0.5457, 0.6457, 0.5607]}, {"w": "(assuming", "b": [0.6519, 0.5457, 0.7341, 0.5607]}, {"w": "that", "b": [0.7403, 0.5457, 0.7746, 0.5607]}, {"w": "its", "b": [0.7807, 0.5457, 0.8006, 0.5607]}, {"w": "recall", "b": [0.8067, 0.5457, 0.8504, 0.5607]}, {"w": "is", "b": [0.8566, 0.5457, 0.8692, 0.5607]}, {"w": "above", "b": [0.1312, 0.5637, 0.1774, 0.5786]}, {"w": "90%).", "b": [0.1835, 0.5637, 0.2296, 0.5786]}, {"w": "This", "b": [0.2378, 0.5637, 0.2738, 0.5786]}, {"w": "technique", "b": [0.28, 0.5637, 0.3569, 0.5786]}, {"w": "is", "b": [0.3631, 0.5637, 0.3755, 0.5786]}, {"w": "known", "b": [0.3816, 0.5637, 0.4339, 0.5786]}, {"w": "as", "b": [0.4401, 0.5637, 0.4566, 0.5786]}, {"w": "optimizing", "b": [0.4626, 0.564, 0.5605, 0.579]}, {"w": "and", "b": [0.5675, 0.564, 0.6014, 0.579]}, {"w": "satisficing", "b": [0.6085, 0.564, 0.6992, 0.579]}, {"w": "technique.", "b": [0.7063, 0.5637, 0.8004, 0.579]}]}, {"id": "b_6", "type": "paragraph", "text": "Some practitioners use a combination of precision and recall called F-measure, also known as F-score. The traditional F-measure, or F1-score, is the harmonic mean of precision and recall:", "words": [{"w": "Some", "b": [0.1312, 0.5906, 0.1734, 0.6056]}, {"w": "practitioners", "b": [0.1784, 0.5906, 0.2781, 0.6056]}, {"w": "use", "b": [0.283, 0.5906, 0.3083, 0.6056]}, {"w": "a", "b": [0.3132, 0.5906, 0.3223, 0.6056]}, {"w": "combination", "b": [0.3272, 0.5906, 0.4242, 0.6056]}, {"w": "of", "b": [0.4291, 0.5906, 0.4437, 0.6056]}, {"w": "precision", "b": [0.4486, 0.5906, 0.5181, 0.6056]}, {"w": "and", "b": [0.5231, 0.5906, 0.5522, 0.6056]}, {"w": "recall", "b": [0.5572, 0.5906, 0.5994, 0.6056]}, {"w": "called", "b": [0.6044, 0.5906, 0.6496, 0.6056]}, {"w": "F-measure,", "b": [0.6543, 0.5906, 0.7561, 0.6059]}, {"w": "also", "b": [0.7613, 0.5906, 0.7915, 0.6056]}, {"w": "known", "b": [0.7964, 0.5906, 0.8477, 0.6056]}, {"w": "as", "b": [0.8526, 0.5906, 0.8688, 0.6056]}, {"w": "F-score.", "b": [0.1312, 0.6086, 0.2036, 0.6238]}, {"w": "The", "b": [0.2113, 0.6086, 0.2425, 0.6235]}, {"w": "traditional", "b": [0.2473, 0.6086, 0.3307, 0.6235]}, {"w": "F-measure,", "b": [0.3355, 0.6086, 0.4228, 0.6235]}, {"w": "or", "b": [0.4279, 0.6086, 0.444, 0.6235]}, {"w": "F1-score,", "b": [0.4487, 0.6086, 0.5195, 0.6251]}, {"w": "is", "b": [0.5245, 0.6086, 0.5367, 0.6235]}, {"w": "the", "b": [0.5415, 0.6086, 0.5666, 0.6235]}, {"w": "harmonic", "b": [0.5714, 0.6086, 0.6448, 0.6235]}, {"w": "mean", "b": [0.6496, 0.6086, 0.6918, 0.6235]}, {"w": "of", "b": [0.6966, 0.6086, 0.7112, 0.6235]}, {"w": "precision", "b": [0.716, 0.6086, 0.7855, 0.6235]}, {"w": "and", "b": [0.7903, 0.6086, 0.8194, 0.6235]}, {"w": "recall:", "b": [0.8242, 0.6086, 0.8715, 0.6235]}]}, {"id": "b_7", "type": "equation", "text": "F1 =", "words": [{"w": "F1", "b": [0.2748, 0.6587, 0.2942, 0.6752]}, {"w": "=", "b": [0.3002, 0.6587, 0.3146, 0.6736]}]}, {"id": "b_8", "type": "equation", "text": "2 recall−1 + precision−1", "words": [{"w": "2", "b": [0.4191, 0.6485, 0.4283, 0.6635]}, {"w": "recall−1", "b": [0.3355, 0.6674, 0.3976, 0.6853]}, {"w": "+", "b": [0.4026, 0.6704, 0.417, 0.6853]}, {"w": "precision−1", "b": [0.421, 0.6683, 0.5109, 0.6853]}]}, {"id": "b_10", "type": "equation", "text": "= 2 × precision × recall", "words": [{"w": "=", "b": [0.5328, 0.6587, 0.5471, 0.6736]}, {"w": "2", "b": [0.5523, 0.6587, 0.5615, 0.6736]}, {"w": "×", "b": [0.5656, 0.6587, 0.5799, 0.6737]}, {"w": "precision", "b": [0.5862, 0.6485, 0.6572, 0.6635]}, {"w": "×", "b": [0.6614, 0.6486, 0.6757, 0.6636]}, {"w": "recall", "b": [0.6798, 0.6485, 0.7229, 0.6635]}]}, {"id": "b_11", "type": "equation", "text": "precision + recall", "words": [{"w": "precision", "b": [0.5862, 0.6689, 0.6572, 0.6839]}, {"w": "+", "b": [0.6614, 0.6689, 0.6758, 0.6839]}, {"w": "recall", "b": [0.6799, 0.6689, 0.723, 0.6839]}]}, {"id": "b_12", "type": "paragraph", "text": "More generally, F-measure is parametrized with a positive real β, chosen such that recall is considered β times as important as precision:", "words": [{"w": "More", "b": [0.1312, 0.7031, 0.1729, 0.7181]}, {"w": "generally,", "b": [0.179, 0.7031, 0.255, 0.7181]}, {"w": "F-measure", "b": [0.2612, 0.7031, 0.3453, 0.7181]}, {"w": "is", "b": [0.3514, 0.7031, 0.3639, 0.7181]}, {"w": "parametrized", "b": [0.37, 0.7031, 0.4758, 0.7181]}, {"w": "with", "b": [0.482, 0.7031, 0.5179, 0.7181]}, {"w": "a", "b": [0.5241, 0.7031, 0.5333, 0.7181]}, {"w": "positive", "b": [0.5395, 0.7031, 0.6017, 0.7181]}, {"w": "real", "b": [0.6078, 0.7031, 0.6377, 0.7181]}, {"w": "β,", "b": [0.6436, 0.7031, 0.6601, 0.7183]}, {"w": "chosen", "b": [0.6663, 0.7031, 0.7193, 0.7181]}, {"w": "such", "b": [0.7254, 0.7031, 0.761, 0.7181]}, {"w": "that", "b": [0.7671, 0.7031, 0.801, 0.7181]}, {"w": "recall", "b": [0.8071, 0.7031, 0.8503, 0.7181]}, {"w": "is", "b": [0.8565, 0.7031, 0.8689, 0.7181]}, {"w": "considered", "b": [0.1312, 0.721, 0.2155, 0.736]}, {"w": "β", "b": [0.2216, 0.7213, 0.232, 0.7363]}, {"w": "times", "b": [0.2391, 0.721, 0.2823, 0.736]}, {"w": "as", "b": [0.2885, 0.721, 0.305, 0.736]}, {"w": "important", "b": [0.3111, 0.721, 0.3922, 0.736]}, {"w": "as", "b": [0.3983, 0.721, 0.4148, 0.736]}, {"w": "precision:", "b": [0.421, 0.721, 0.497, 0.736]}]}, {"id": "b_13", "type": "equation", "text": "Fβ = (1 + β2) × precision × recall (β2 × precision) + recall", "words": [{"w": "Fβ", "b": [0.3336, 0.7699, 0.3541, 0.7864]}, {"w": "=", "b": [0.3608, 0.7699, 0.3751, 0.7848]}, {"w": "(1", "b": [0.3802, 0.7699, 0.3966, 0.7848]}, {"w": "+", "b": [0.4007, 0.7699, 0.4151, 0.7848]}, {"w": "β2)", "b": [0.4192, 0.7675, 0.446, 0.7851]}, {"w": "×", "b": [0.4501, 0.77, 0.4645, 0.7849]}, {"w": "precision", "b": [0.4991, 0.7598, 0.57, 0.7747]}, {"w": "×", "b": [0.5742, 0.7598, 0.5886, 0.7748]}, {"w": "recall", "b": [0.5927, 0.7598, 0.6358, 0.7747]}, {"w": "(β2", "b": [0.4708, 0.7796, 0.4967, 0.7954]}, {"w": "×", "b": [0.5018, 0.7802, 0.5161, 0.7952]}, {"w": "precision)", "b": [0.5202, 0.7801, 0.5985, 0.7951]}, {"w": "+", "b": [0.6026, 0.7801, 0.6169, 0.7951]}, {"w": "recall", "b": [0.621, 0.7801, 0.6641, 0.7951]}]}, {"id": "b_14", "type": "paragraph", "text": "Two commonly used values for β are 2, which weighs recall twice as high as precision, and 0.5, which weighs recall twice as low as precision.", "words": [{"w": "Two", "b": [0.1306, 0.8137, 0.1637, 0.8287]}, {"w": "commonly", "b": [0.1692, 0.8137, 0.25, 0.8287]}, {"w": "used", "b": [0.2555, 0.8137, 0.2908, 0.8287]}, {"w": "values", "b": [0.2963, 0.8137, 0.3442, 0.8287]}, {"w": "for", "b": [0.3496, 0.8137, 0.3713, 0.8287]}, {"w": "β", "b": [0.3767, 0.814, 0.3872, 0.8289]}, {"w": "are", "b": [0.3936, 0.8137, 0.4178, 0.8287]}, {"w": "2,", "b": [0.4233, 0.8137, 0.4373, 0.8287]}, {"w": "which", "b": [0.443, 0.8137, 0.4887, 0.8287]}, {"w": "weighs", "b": [0.4942, 0.8137, 0.546, 0.8287]}, {"w": "recall", "b": [0.5515, 0.8137, 0.5938, 0.8287]}, {"w": "twice", "b": [0.5993, 0.8137, 0.64, 0.8287]}, {"w": "as", "b": [0.6455, 0.8137, 0.6617, 0.8287]}, {"w": "high", "b": [0.6672, 0.8137, 0.7013, 0.8287]}, {"w": "as", "b": [0.7068, 0.8137, 0.723, 0.8287]}, {"w": "precision,", "b": [0.7285, 0.8137, 0.8031, 0.8287]}, {"w": "and", "b": [0.8087, 0.8137, 0.8378, 0.8287]}, {"w": "0.5,", "b": [0.8431, 0.8137, 0.8713, 0.8289]}, {"w": "which", "b": [0.1306, 0.8317, 0.1772, 0.8466]}, {"w": "weighs", "b": [0.1834, 0.8317, 0.2363, 0.8466]}, {"w": "recall", "b": [0.2424, 0.8317, 0.2856, 0.8466]}, {"w": "twice", "b": [0.2917, 0.8317, 0.3333, 0.8466]}, {"w": "as", "b": [0.3394, 0.8317, 0.3559, 0.8466]}, {"w": "low", "b": [0.3621, 0.8317, 0.3892, 0.8466]}, {"w": "as", "b": [0.3954, 0.8317, 0.4119, 0.8466]}, {"w": "precision.", "b": [0.418, 0.8317, 0.4941, 0.8466]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 17", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "17", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 156, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "You should find a way to combine the two metrics that works best for your problem. Besides F-score, there are other ways to obtain a single number by combining multiple metrics:", "words": [{"w": "You", "b": [0.1305, 0.0881, 0.1616, 0.1031]}, {"w": "should", "b": [0.1677, 0.0881, 0.2191, 0.1031]}, {"w": "find", "b": [0.2251, 0.0881, 0.2553, 0.1031]}, {"w": "a", "b": [0.2613, 0.0881, 0.2703, 0.1031]}, {"w": "way", "b": [0.2764, 0.0881, 0.307, 0.1031]}, {"w": "to", "b": [0.3131, 0.0881, 0.3291, 0.1031]}, {"w": "combine", "b": [0.3352, 0.0881, 0.4, 0.1031]}, {"w": "the", "b": [0.406, 0.0881, 0.4312, 0.1031]}, {"w": "two", "b": [0.4372, 0.0881, 0.4653, 0.1031]}, {"w": "metrics", "b": [0.4714, 0.0881, 0.5288, 0.1031]}, {"w": "that", "b": [0.5348, 0.0881, 0.568, 0.1031]}, {"w": "works", "b": [0.5741, 0.0881, 0.6194, 0.1031]}, {"w": "best", "b": [0.6255, 0.0881, 0.6582, 0.1031]}, {"w": "for", "b": [0.6643, 0.0881, 0.686, 0.1031]}, {"w": "your", "b": [0.692, 0.0881, 0.7272, 0.1031]}, {"w": "problem.", "b": [0.7333, 0.0881, 0.8026, 0.1031]}, {"w": "Besides", "b": [0.8108, 0.0881, 0.8691, 0.1031]}, {"w": "F-score,", "b": [0.1312, 0.106, 0.1947, 0.121]}, {"w": "there", "b": [0.2009, 0.106, 0.2419, 0.121]}, {"w": "are", "b": [0.2481, 0.106, 0.2728, 0.121]}, {"w": "other", "b": [0.2789, 0.106, 0.321, 0.121]}, {"w": "ways", "b": [0.3272, 0.106, 0.3657, 0.121]}, {"w": "to", "b": [0.3719, 0.106, 0.3883, 0.121]}, {"w": "obtain", "b": [0.3944, 0.106, 0.4457, 0.121]}, {"w": "a", "b": [0.4518, 0.106, 0.4611, 0.121]}, {"w": "single", "b": [0.4672, 0.106, 0.5124, 0.121]}, {"w": "number", "b": [0.5186, 0.106, 0.5797, 0.121]}, {"w": "by", "b": [0.5858, 0.106, 0.6053, 0.121]}, {"w": "combining", "b": [0.6114, 0.106, 0.694, 0.121]}, {"w": "multiple", "b": [0.7001, 0.106, 0.7663, 0.121]}, {"w": "metrics:", "b": [0.7724, 0.106, 0.8362, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "• simple average, or weighted average of metrics; • threshold n −1 metrics and optimize the nth (a generalization of the above optimizing and satisficing technique); • invent your own domain-specific “recipe.”", "words": [{"w": "•", "b": [0.1538, 0.133, 0.1681, 0.1479]}, {"w": "simple", "b": [0.1774, 0.133, 0.2287, 0.1479]}, {"w": "average,", "b": [0.2349, 0.133, 0.3, 0.1479]}, {"w": "or", "b": [0.3062, 0.133, 0.3227, 0.1479]}, {"w": "weighted", "b": [0.3288, 0.133, 0.3996, 0.1479]}, {"w": "average", "b": [0.4057, 0.133, 0.4658, 0.1479]}, {"w": "of", "b": [0.4719, 0.133, 0.4868, 0.1479]}, {"w": "metrics;", "b": [0.4929, 0.133, 0.5567, 0.1479]}, {"w": "•", "b": [0.1538, 0.1509, 0.1681, 0.1659]}, {"w": "threshold", "b": [0.1774, 0.1509, 0.2513, 0.1659]}, {"w": "n", "b": [0.2574, 0.1512, 0.2684, 0.1661]}, {"w": "−1", "b": [0.2725, 0.1509, 0.3, 0.166]}, {"w": "metrics", "b": [0.3062, 0.1509, 0.3639, 0.1659]}, {"w": "and", "b": [0.3701, 0.1509, 0.3994, 0.1659]}, {"w": "optimize", "b": [0.4055, 0.1509, 0.4732, 0.1659]}, {"w": "the", "b": [0.4793, 0.1509, 0.5046, 0.1659]}, {"w": "nth", "b": [0.5106, 0.1493, 0.5356, 0.1661]}, {"w": "(a", "b": [0.5427, 0.1509, 0.5588, 0.1659]}, {"w": "generalization", "b": [0.565, 0.1509, 0.6752, 0.1659]}, {"w": "of", "b": [0.6813, 0.1509, 0.6959, 0.1659]}, {"w": "the", "b": [0.7021, 0.1509, 0.7273, 0.1659]}, {"w": "above", "b": [0.7335, 0.1509, 0.7789, 0.1659]}, {"w": "optimizing", "b": [0.7851, 0.1509, 0.8689, 0.1659]}, {"w": "and", "b": [0.1774, 0.1689, 0.2071, 0.1838]}, {"w": "satisficing", "b": [0.2132, 0.1689, 0.2924, 0.1838]}, {"w": "technique);", "b": [0.2986, 0.1689, 0.3878, 0.1838]}, {"w": "•", "b": [0.1538, 0.1868, 0.1681, 0.2018]}, {"w": "invent", "b": [0.1774, 0.1868, 0.2266, 0.2018]}, {"w": "your", "b": [0.2327, 0.1868, 0.2687, 0.2018]}, {"w": "own", "b": [0.2748, 0.1868, 0.3071, 0.2018]}, {"w": "domain-specific", "b": [0.3133, 0.1868, 0.4369, 0.2018]}, {"w": "“recipe.”", "b": [0.4431, 0.1868, 0.5108, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "Accuracy is given by the number of correctly classified examples, divided by the total number of classified examples. In terms of the confusion matrix, it is given by:", "words": [{"w": "Accuracy", "b": [0.1312, 0.214, 0.217, 0.229]}, {"w": "is", "b": [0.225, 0.2137, 0.2376, 0.2287]}, {"w": "given", "b": [0.2456, 0.2137, 0.2885, 0.2287]}, {"w": "by", "b": [0.2964, 0.2137, 0.3163, 0.2287]}, {"w": "the", "b": [0.3243, 0.2137, 0.3504, 0.2287]}, {"w": "number", "b": [0.3584, 0.2137, 0.4207, 0.2287]}, {"w": "of", "b": [0.4286, 0.2137, 0.4438, 0.2287]}, {"w": "correctly", "b": [0.4518, 0.2137, 0.5235, 0.2287]}, {"w": "classified", "b": [0.5315, 0.2137, 0.6039, 0.2287]}, {"w": "examples,", "b": [0.6118, 0.2137, 0.692, 0.2287]}, {"w": "divided", "b": [0.7004, 0.2137, 0.7605, 0.2287]}, {"w": "by", "b": [0.7685, 0.2137, 0.7884, 0.2287]}, {"w": "the", "b": [0.7963, 0.2137, 0.8225, 0.2287]}, {"w": "total", "b": [0.8304, 0.2137, 0.8691, 0.2287]}, {"w": "number", "b": [0.1312, 0.2317, 0.1923, 0.2466]}, {"w": "of", "b": [0.1984, 0.2317, 0.2133, 0.2466]}, {"w": "classified", "b": [0.2195, 0.2317, 0.2905, 0.2466]}, {"w": "examples.", "b": [0.2966, 0.2317, 0.3752, 0.2466]}, {"w": "In", "b": [0.3834, 0.2317, 0.4003, 0.2466]}, {"w": "terms", "b": [0.4064, 0.2317, 0.4517, 0.2466]}, {"w": "of", "b": [0.4578, 0.2317, 0.4727, 0.2466]}, {"w": "the", "b": [0.4789, 0.2317, 0.5045, 0.2466]}, {"w": "confusion", "b": [0.5107, 0.2317, 0.5862, 0.2466]}, {"w": "matrix,", "b": [0.5923, 0.2317, 0.6513, 0.2466]}, {"w": "it", "b": [0.6574, 0.2317, 0.6697, 0.2466]}, {"w": "is", "b": [0.6759, 0.2317, 0.6883, 0.2466]}, {"w": "given", "b": [0.6945, 0.2317, 0.7365, 0.2466]}, {"w": "by:", "b": [0.7427, 0.2317, 0.7673, 0.2466]}]}, {"id": "b_3", "type": "paragraph", "text": "accuracy", "words": [{"w": "accuracy", "b": [0.3623, 0.2805, 0.4326, 0.2955]}]}, {"id": "b_4", "type": "equation", "text": "def = TP + TN TP + TN + FP + FN (2)", "words": [{"w": "def", "b": [0.4377, 0.2756, 0.457, 0.2861]}, {"w": "=", "b": [0.4402, 0.2805, 0.4545, 0.2955]}, {"w": "TP", "b": [0.5121, 0.2704, 0.538, 0.2853]}, {"w": "+", "b": [0.5421, 0.2704, 0.5564, 0.2853]}, {"w": "TN", "b": [0.5605, 0.2704, 0.5877, 0.2853]}, {"w": "TP", "b": [0.4643, 0.2908, 0.4902, 0.3057]}, {"w": "+", "b": [0.4943, 0.2908, 0.5086, 0.3057]}, {"w": "TN", "b": [0.5127, 0.2908, 0.5399, 0.3057]}, {"w": "+", "b": [0.544, 0.2908, 0.5584, 0.3057]}, {"w": "FP", "b": [0.5625, 0.2908, 0.5871, 0.3057]}, {"w": "+", "b": [0.5912, 0.2908, 0.6055, 0.3057]}, {"w": "FN", "b": [0.6096, 0.2908, 0.6355, 0.3057]}, {"w": "(2)", "b": [0.8452, 0.2805, 0.8688, 0.2955]}]}, {"id": "b_5", "type": "paragraph", "text": "Accuracy is a useful metric when errors in predicting all classes are judged to be equally important. It’s the case, for example, for object recognition for a domestic robot: a chair is no more important than a table. In the case of the spam/not spam prediction, this probably would not be so. Likely, you would tolerate false negatives more than false positives. Remember, a false positive is when your friend sends you an email, but the model places it in the spam folder and you don’t see it. A false negative, a situation in which a spam message gets to the inbox, is less of a problem.", "words": [{"w": "Accuracy", "b": [0.1305, 0.3218, 0.2064, 0.3367]}, {"w": "is", "b": [0.2134, 0.3218, 0.2261, 0.3367]}, {"w": "a", "b": [0.233, 0.3218, 0.2424, 0.3367]}, {"w": "useful", "b": [0.2494, 0.3218, 0.2971, 0.3367]}, {"w": "metric", "b": [0.3041, 0.3218, 0.3564, 0.3367]}, {"w": "when", "b": [0.3634, 0.3218, 0.4063, 0.3367]}, {"w": "errors", "b": [0.4132, 0.3218, 0.4605, 0.3367]}, {"w": "in", "b": [0.4675, 0.3218, 0.4832, 0.3367]}, {"w": "predicting", "b": [0.4902, 0.3218, 0.5729, 0.3367]}, {"w": "all", "b": [0.5798, 0.3218, 0.5997, 0.3367]}, {"w": "classes", "b": [0.6067, 0.3218, 0.6603, 0.3367]}, {"w": "are", "b": [0.6673, 0.3218, 0.6924, 0.3367]}, {"w": "judged", "b": [0.6994, 0.3218, 0.7543, 0.3367]}, {"w": "to", "b": [0.7613, 0.3218, 0.778, 0.3367]}, {"w": "be", "b": [0.785, 0.3218, 0.8043, 0.3367]}, {"w": "equally", "b": [0.8113, 0.3218, 0.8699, 0.3367]}, {"w": "important.", "b": [0.1312, 0.3397, 0.2191, 0.3547]}, {"w": "It’s", "b": [0.2283, 0.3397, 0.2551, 0.3547]}, {"w": "the", "b": [0.2615, 0.3397, 0.2877, 0.3547]}, {"w": "case,", "b": [0.2942, 0.3397, 0.333, 0.3547]}, {"w": "for", "b": [0.3396, 0.3397, 0.3621, 0.3547]}, {"w": "example,", "b": [0.3686, 0.3397, 0.4412, 0.3547]}, {"w": "for", "b": [0.4478, 0.3397, 0.4704, 0.3547]}, {"w": "object", "b": [0.4768, 0.3397, 0.527, 0.3547]}, {"w": "recognition", "b": [0.5335, 0.3397, 0.6246, 0.3547]}, {"w": "for", "b": [0.631, 0.3397, 0.6536, 0.3547]}, {"w": "a", "b": [0.66, 0.3397, 0.6695, 0.3547]}, {"w": "domestic", "b": [0.6759, 0.3397, 0.7482, 0.3547]}, {"w": "robot:", "b": [0.7547, 0.3397, 0.8044, 0.3547]}, {"w": "a", "b": [0.8132, 0.3397, 0.8227, 0.3547]}, {"w": "chair", "b": [0.8291, 0.3397, 0.8695, 0.3547]}, {"w": "is", "b": [0.1312, 0.3576, 0.1439, 0.3726]}, {"w": "no", "b": [0.1521, 0.3576, 0.172, 0.3726]}, {"w": "more", "b": [0.1801, 0.3576, 0.221, 0.3726]}, {"w": "important", "b": [0.2292, 0.3576, 0.3118, 0.3726]}, {"w": "than", "b": [0.32, 0.3576, 0.3577, 0.3726]}, {"w": "a", "b": [0.3659, 0.3576, 0.3753, 0.3726]}, {"w": "table.", "b": [0.3835, 0.3576, 0.4295, 0.3726]}, {"w": "In", "b": [0.4438, 0.3576, 0.461, 0.3726]}, {"w": "the", "b": [0.4692, 0.3576, 0.4954, 0.3726]}, {"w": "case", "b": [0.5036, 0.3576, 0.5372, 0.3726]}, {"w": "of", "b": [0.5453, 0.3576, 0.5605, 0.3726]}, {"w": "the", "b": [0.5687, 0.3576, 0.5949, 0.3726]}, {"w": "spam/not", "b": [0.603, 0.3576, 0.6826, 0.3726]}, {"w": "spam", "b": [0.6908, 0.3576, 0.7338, 0.3726]}, {"w": "prediction,", "b": [0.742, 0.3576, 0.8299, 0.3726]}, {"w": "this", "b": [0.8386, 0.3576, 0.8691, 0.3726]}, {"w": "probably", "b": [0.1312, 0.3756, 0.2011, 0.3906]}, {"w": "would", "b": [0.2068, 0.3756, 0.2535, 0.3906]}, {"w": "not", "b": [0.2592, 0.3756, 0.2853, 0.3906]}, {"w": "be", "b": [0.291, 0.3756, 0.3096, 0.3906]}, {"w": "so.", "b": [0.3152, 0.3756, 0.3364, 0.3906]}, {"w": "Likely,", "b": [0.3445, 0.3756, 0.3959, 0.3906]}, {"w": "you", "b": [0.4017, 0.3756, 0.4298, 0.3906]}, {"w": "would", "b": [0.4355, 0.3756, 0.4822, 0.3906]}, {"w": "tolerate", "b": [0.4879, 0.3756, 0.5482, 0.3906]}, {"w": "false", "b": [0.5539, 0.3756, 0.5886, 0.3906]}, {"w": "negatives", "b": [0.5943, 0.3756, 0.6668, 0.3906]}, {"w": "more", "b": [0.6724, 0.3756, 0.7117, 0.3906]}, {"w": "than", "b": [0.7173, 0.3756, 0.7535, 0.3906]}, {"w": "false", "b": [0.7592, 0.3756, 0.7939, 0.3906]}, {"w": "positives.", "b": [0.7996, 0.3756, 0.8727, 0.3906]}, {"w": "Remember,", "b": [0.1312, 0.3935, 0.221, 0.4085]}, {"w": "a", "b": [0.2268, 0.3935, 0.2358, 0.4085]}, {"w": "false", "b": [0.2416, 0.3935, 0.2763, 0.4085]}, {"w": "positive", "b": [0.2821, 0.3935, 0.343, 0.4085]}, {"w": "is", "b": [0.3487, 0.3935, 0.3609, 0.4085]}, {"w": "when", "b": [0.3666, 0.3935, 0.4078, 0.4085]}, {"w": "your", "b": [0.4136, 0.3935, 0.4488, 0.4085]}, {"w": "friend", "b": [0.4545, 0.3935, 0.5003, 0.4085]}, {"w": "sends", "b": [0.5061, 0.3935, 0.5485, 0.4085]}, {"w": "you", "b": [0.5542, 0.3935, 0.5823, 0.4085]}, {"w": "an", "b": [0.5881, 0.3935, 0.6072, 0.4085]}, {"w": "email,", "b": [0.6129, 0.3935, 0.6601, 0.4085]}, {"w": "but", "b": [0.666, 0.3935, 0.6931, 0.4085]}, {"w": "the", "b": [0.6988, 0.3935, 0.724, 0.4085]}, {"w": "model", "b": [0.7297, 0.3935, 0.7774, 0.4085]}, {"w": "places", "b": [0.7832, 0.3935, 0.8305, 0.4085]}, {"w": "it", "b": [0.8363, 0.3935, 0.8483, 0.4085]}, {"w": "in", "b": [0.854, 0.3935, 0.8691, 0.4085]}, {"w": "the", "b": [0.1312, 0.4115, 0.1567, 0.4264]}, {"w": "spam", "b": [0.1629, 0.4115, 0.2048, 0.4264]}, {"w": "folder", "b": [0.211, 0.4115, 0.2564, 0.4264]}, {"w": "and", "b": [0.2626, 0.4115, 0.2922, 0.4264]}, {"w": "you", "b": [0.2983, 0.4115, 0.3269, 0.4264]}, {"w": "don’t", "b": [0.333, 0.4115, 0.3748, 0.4264]}, {"w": "see", "b": [0.381, 0.4115, 0.4046, 0.4264]}, {"w": "it.", "b": [0.4107, 0.4115, 0.4281, 0.4264]}, {"w": "A", "b": [0.4363, 0.4115, 0.45, 0.4264]}, {"w": "false", "b": [0.4562, 0.4115, 0.4915, 0.4264]}, {"w": "negative,", "b": [0.4976, 0.4115, 0.5691, 0.4264]}, {"w": "a", "b": [0.5752, 0.4115, 0.5844, 0.4264]}, {"w": "situation", "b": [0.5905, 0.4115, 0.6611, 0.4264]}, {"w": "in", "b": [0.6672, 0.4115, 0.6825, 0.4264]}, {"w": "which", "b": [0.6886, 0.4115, 0.7351, 0.4264]}, {"w": "a", "b": [0.7412, 0.4115, 0.7504, 0.4264]}, {"w": "spam", "b": [0.7565, 0.4115, 0.7985, 0.4264]}, {"w": "message", "b": [0.8046, 0.4115, 0.8691, 0.4264]}, {"w": "gets", "b": [0.1312, 0.4294, 0.1631, 0.4444]}, {"w": "to", "b": [0.1693, 0.4294, 0.1857, 0.4444]}, {"w": "the", "b": [0.1918, 0.4294, 0.2175, 0.4444]}, {"w": "inbox,", "b": [0.2236, 0.4294, 0.2728, 0.4444]}, {"w": "is", "b": [0.279, 0.4294, 0.2914, 0.4444]}, {"w": "less", "b": [0.2976, 0.4294, 0.3255, 0.4444]}, {"w": "of", "b": [0.3316, 0.4294, 0.3465, 0.4444]}, {"w": "a", "b": [0.3526, 0.4294, 0.3619, 0.4444]}, {"w": "problem.", "b": [0.368, 0.4294, 0.4388, 0.4444]}]}, {"id": "b_6", "type": "paragraph", "text": "For dealing with the situations in which different classes have different importance, a useful metric is cost-sensitive accuracy. First, assign a cost (a positive number) to both types of mistakes: FP and FN. Then compute the counts TP, TN, FP, FN as usual, and multiply the counts for FP and FN by their corresponding costs before calculating the accuracy using Equation 2, above.", "words": [{"w": "For", "b": [0.1312, 0.4564, 0.1581, 0.4713]}, {"w": "dealing", "b": [0.1642, 0.4564, 0.2214, 0.4713]}, {"w": "with", "b": [0.2276, 0.4564, 0.2633, 0.4713]}, {"w": "the", "b": [0.2695, 0.4564, 0.295, 0.4713]}, {"w": "situations", "b": [0.3012, 0.4564, 0.379, 0.4713]}, {"w": "in", "b": [0.3852, 0.4564, 0.4005, 0.4713]}, {"w": "which", "b": [0.4067, 0.4564, 0.4531, 0.4713]}, {"w": "different", "b": [0.4593, 0.4564, 0.5257, 0.4713]}, {"w": "classes", "b": [0.5319, 0.4564, 0.5843, 0.4713]}, {"w": "have", "b": [0.5905, 0.4564, 0.6267, 0.4713]}, {"w": "different", "b": [0.6329, 0.4564, 0.6993, 0.4713]}, {"w": "importance,", "b": [0.7055, 0.4564, 0.801, 0.4713]}, {"w": "a", "b": [0.8072, 0.4564, 0.8164, 0.4713]}, {"w": "useful", "b": [0.8226, 0.4564, 0.8692, 0.4713]}, {"w": "metric", "b": [0.1312, 0.4743, 0.1833, 0.4893]}, {"w": "is", "b": [0.1894, 0.4743, 0.202, 0.4893]}, {"w": "cost-sensitive", "b": [0.2081, 0.4746, 0.3305, 0.4896]}, {"w": "accuracy.", "b": [0.3376, 0.4743, 0.4234, 0.4896]}, {"w": "First,", "b": [0.4316, 0.4743, 0.4762, 0.4893]}, {"w": "assign", "b": [0.4823, 0.4743, 0.5314, 0.4893]}, {"w": "a", "b": [0.5376, 0.4743, 0.5469, 0.4893]}, {"w": "cost", "b": [0.5531, 0.4743, 0.5854, 0.4893]}, {"w": "(a", "b": [0.5915, 0.4743, 0.6082, 0.4893]}, {"w": "positive", "b": [0.6143, 0.4743, 0.6774, 0.4893]}, {"w": "number)", "b": [0.6835, 0.4743, 0.7527, 0.4893]}, {"w": "to", "b": [0.7588, 0.4743, 0.7755, 0.4893]}, {"w": "both", "b": [0.7816, 0.4743, 0.8196, 0.4893]}, {"w": "types", "b": [0.8257, 0.4743, 0.869, 0.4893]}, {"w": "of", "b": [0.1312, 0.4922, 0.1459, 0.5072]}, {"w": "mistakes:", "b": [0.1521, 0.4922, 0.225, 0.5072]}, {"w": "FP", "b": [0.2332, 0.4922, 0.2578, 0.5072]}, {"w": "and", "b": [0.264, 0.4922, 0.2933, 0.5072]}, {"w": "FN.", "b": [0.2994, 0.4922, 0.3304, 0.5072]}, {"w": "Then", "b": [0.3386, 0.4922, 0.3801, 0.5072]}, {"w": "compute", "b": [0.3862, 0.4922, 0.454, 0.5072]}, {"w": "the", "b": [0.4601, 0.4922, 0.4854, 0.5072]}, {"w": "counts", "b": [0.4916, 0.4922, 0.5427, 0.5072]}, {"w": "TP,", "b": [0.5488, 0.4922, 0.5797, 0.5072]}, {"w": "TN,", "b": [0.5859, 0.4922, 0.6181, 0.5072]}, {"w": "FP,", "b": [0.6243, 0.4922, 0.6539, 0.5072]}, {"w": "FN", "b": [0.6601, 0.4922, 0.686, 0.5072]}, {"w": "as", "b": [0.6921, 0.4922, 0.7084, 0.5072]}, {"w": "usual,", "b": [0.7146, 0.4922, 0.7612, 0.5072]}, {"w": "and", "b": [0.7673, 0.4922, 0.7967, 0.5072]}, {"w": "multiply", "b": [0.8028, 0.4922, 0.8695, 0.5072]}, {"w": "the", "b": [0.1312, 0.5102, 0.1564, 0.5252]}, {"w": "counts", "b": [0.1625, 0.5102, 0.2134, 0.5252]}, {"w": "for", "b": [0.2196, 0.5102, 0.2413, 0.5252]}, {"w": "FP", "b": [0.2473, 0.5102, 0.2719, 0.5252]}, {"w": "and", "b": [0.2781, 0.5102, 0.3072, 0.5252]}, {"w": "FN", "b": [0.3134, 0.5102, 0.3393, 0.5252]}, {"w": "by", "b": [0.3454, 0.5102, 0.3645, 0.5252]}, {"w": "their", "b": [0.3706, 0.5102, 0.4079, 0.5252]}, {"w": "corresponding", "b": [0.4141, 0.5102, 0.5244, 0.5252]}, {"w": "costs", "b": [0.5306, 0.5102, 0.569, 0.5252]}, {"w": "before", "b": [0.5752, 0.5102, 0.6235, 0.5252]}, {"w": "calculating", "b": [0.6297, 0.5102, 0.7152, 0.5252]}, {"w": "the", "b": [0.7213, 0.5102, 0.7465, 0.5252]}, {"w": "accuracy", "b": [0.7526, 0.5102, 0.8216, 0.5252]}, {"w": "using", "b": [0.8277, 0.5102, 0.8691, 0.5252]}, {"w": "Equation", "b": [0.1312, 0.5281, 0.2048, 0.5431]}, {"w": "2,", "b": [0.211, 0.5281, 0.2253, 0.5431]}, {"w": "above.", "b": [0.2314, 0.5281, 0.2827, 0.5431]}]}, {"id": "b_7", "type": "paragraph", "text": "Accuracy measures the performance of the model for all classes at once, and it conveniently returns a single number. However, accuracy is not a good performance metric when the data is imbalanced. In an imbalanced dataset, examples belonging to some class or a few classes constitute the vast majority, while other classes include very few examples. Imbalanced training data can significantly and adversely affect the model. We will talk more about dealing with the imbalanced data in Section ?? of Chapter 6.", "words": [{"w": "Accuracy", "b": [0.1305, 0.5551, 0.2046, 0.57]}, {"w": "measures", "b": [0.2108, 0.5551, 0.2836, 0.57]}, {"w": "the", "b": [0.2898, 0.5551, 0.3153, 0.57]}, {"w": "performance", "b": [0.3215, 0.5551, 0.4206, 0.57]}, {"w": "of", "b": [0.4268, 0.5551, 0.4416, 0.57]}, {"w": "the", "b": [0.4478, 0.5551, 0.4733, 0.57]}, {"w": "model", "b": [0.4795, 0.5551, 0.528, 0.57]}, {"w": "for", "b": [0.5342, 0.5551, 0.5562, 0.57]}, {"w": "all", "b": [0.5623, 0.5551, 0.5817, 0.57]}, {"w": "classes", "b": [0.5879, 0.5551, 0.6403, 0.57]}, {"w": "at", "b": [0.6465, 0.5551, 0.6628, 0.57]}, {"w": "once,", "b": [0.669, 0.5551, 0.7099, 0.57]}, {"w": "and", "b": [0.716, 0.5551, 0.7457, 0.57]}, {"w": "it", "b": [0.7518, 0.5551, 0.7641, 0.57]}, {"w": "conveniently", "b": [0.7702, 0.5551, 0.8698, 0.57]}, {"w": "returns", "b": [0.1312, 0.573, 0.1877, 0.588]}, {"w": "a", "b": [0.1938, 0.573, 0.2029, 0.588]}, {"w": "single", "b": [0.209, 0.573, 0.2533, 0.588]}, {"w": "number.", "b": [0.2594, 0.573, 0.3243, 0.588]}, {"w": "However,", "b": [0.3324, 0.573, 0.4043, 0.588]}, {"w": "accuracy", "b": [0.4104, 0.573, 0.4793, 0.588]}, {"w": "is", "b": [0.4854, 0.573, 0.4976, 0.588]}, {"w": "not", "b": [0.5037, 0.573, 0.5298, 0.588]}, {"w": "a", "b": [0.5359, 0.573, 0.5449, 0.588]}, {"w": "good", "b": [0.551, 0.573, 0.5892, 0.588]}, {"w": "performance", "b": [0.5953, 0.573, 0.6929, 0.588]}, {"w": "metric", "b": [0.699, 0.573, 0.7493, 0.588]}, {"w": "when", "b": [0.7554, 0.573, 0.7966, 0.588]}, {"w": "the", "b": [0.8027, 0.573, 0.8278, 0.588]}, {"w": "data", "b": [0.8339, 0.573, 0.8691, 0.588]}, {"w": "is", "b": [0.1312, 0.591, 0.1434, 0.6059]}, {"w": "imbalanced.", "b": [0.1486, 0.591, 0.2426, 0.6059]}, {"w": "In", "b": [0.2505, 0.591, 0.2671, 0.6059]}, {"w": "an", "b": [0.2723, 0.591, 0.2914, 0.6059]}, {"w": "imbalanced", "b": [0.2967, 0.5913, 0.4007, 0.6062]}, {"w": "dataset,", "b": [0.4067, 0.591, 0.4787, 0.6062]}, {"w": "examples", "b": [0.4841, 0.591, 0.5561, 0.6059]}, {"w": "belonging", "b": [0.5613, 0.591, 0.6372, 0.6059]}, {"w": "to", "b": [0.6425, 0.591, 0.6585, 0.6059]}, {"w": "some", "b": [0.6638, 0.591, 0.703, 0.6059]}, {"w": "class", "b": [0.7083, 0.591, 0.7447, 0.6059]}, {"w": "or", "b": [0.7499, 0.591, 0.766, 0.6059]}, {"w": "a", "b": [0.7713, 0.591, 0.7803, 0.6059]}, {"w": "few", "b": [0.7855, 0.591, 0.8122, 0.6059]}, {"w": "classes", "b": [0.8174, 0.591, 0.869, 0.6059]}, {"w": "constitute", "b": [0.1312, 0.6089, 0.2129, 0.6239]}, {"w": "the", "b": [0.2205, 0.6089, 0.2466, 0.6239]}, {"w": "vast", "b": [0.2542, 0.6089, 0.2872, 0.6239]}, {"w": "majority,", "b": [0.2947, 0.6089, 0.3686, 0.6239]}, {"w": "while", "b": [0.3764, 0.6089, 0.4193, 0.6239]}, {"w": "other", "b": [0.4268, 0.6089, 0.4698, 0.6239]}, {"w": "classes", "b": [0.4773, 0.6089, 0.531, 0.6239]}, {"w": "include", "b": [0.5385, 0.6089, 0.5971, 0.6239]}, {"w": "very", "b": [0.6046, 0.6089, 0.6398, 0.6239]}, {"w": "few", "b": [0.6473, 0.6089, 0.675, 0.6239]}, {"w": "examples.", "b": [0.6825, 0.6089, 0.7627, 0.6239]}, {"w": "Imbalanced", "b": [0.775, 0.6089, 0.8691, 0.6239]}, {"w": "training", "b": [0.1312, 0.6269, 0.1961, 0.6418]}, {"w": "data", "b": [0.2036, 0.6269, 0.2402, 0.6418]}, {"w": "can", "b": [0.2478, 0.6269, 0.276, 0.6418]}, {"w": "significantly", "b": [0.2835, 0.6269, 0.382, 0.6418]}, {"w": "and", "b": [0.3895, 0.6269, 0.4198, 0.6418]}, {"w": "adversely", "b": [0.4274, 0.6269, 0.5034, 0.6418]}, {"w": "affect", "b": [0.5109, 0.6269, 0.5553, 0.6418]}, {"w": "the", "b": [0.5628, 0.6269, 0.589, 0.6418]}, {"w": "model.", "b": [0.5965, 0.6269, 0.6514, 0.6418]}, {"w": "We", "b": [0.6637, 0.6269, 0.6899, 0.6418]}, {"w": "will", "b": [0.6974, 0.6269, 0.7267, 0.6418]}, {"w": "talk", "b": [0.7342, 0.6269, 0.7661, 0.6418]}, {"w": "more", "b": [0.7736, 0.6269, 0.8145, 0.6418]}, {"w": "about", "b": [0.822, 0.6269, 0.8695, 0.6418]}, {"w": "dealing", "b": [0.1312, 0.6448, 0.1887, 0.6598]}, {"w": "with", "b": [0.1948, 0.6448, 0.2307, 0.6598]}, {"w": "the", "b": [0.2368, 0.6448, 0.2625, 0.6598]}, {"w": "imbalanced", "b": [0.2686, 0.6448, 0.3594, 0.6598]}, {"w": "data", "b": [0.3655, 0.6448, 0.4014, 0.6598]}, {"w": "in", "b": [0.4076, 0.6448, 0.423, 0.6598]}, {"w": "Section", "b": [0.4291, 0.6448, 0.4876, 0.6598]}, {"w": "??", "b": [0.4936, 0.6451, 0.5136, 0.6601]}, {"w": "of", "b": [0.5197, 0.6448, 0.5346, 0.6598]}, {"w": "Chapter", "b": [0.5408, 0.6448, 0.6064, 0.6598]}, {"w": "6.", "b": [0.6126, 0.6448, 0.6269, 0.6598]}]}, {"id": "b_8", "type": "paragraph", "text": "For imbalanced data, a better metric is per-class accuracy. First, calculate the accuracy of prediction for each class {1, . . . , C}, and then take an average of C individual accuracy measures. For the above confusion matrix of the spam detection problem, the accuracy for the class “spam” is 23/(23 + 1) = 0.96, the accuracy for the class “not_spam” is 556/(12 + 556) = 0.98. The per-class accuracy is then (0.96 + 0.98)/2 = 0.97.", "words": [{"w": "For", "b": [0.1312, 0.6717, 0.1584, 0.6867]}, {"w": "imbalanced", "b": [0.1646, 0.6717, 0.2562, 0.6867]}, {"w": "data,", "b": [0.2623, 0.6717, 0.3037, 0.6867]}, {"w": "a", "b": [0.3099, 0.6717, 0.3192, 0.6867]}, {"w": "better", "b": [0.3253, 0.6717, 0.3745, 0.6867]}, {"w": "metric", "b": [0.3807, 0.6717, 0.4325, 0.6867]}, {"w": "is", "b": [0.4386, 0.6717, 0.4511, 0.6867]}, {"w": "per-class", "b": [0.4571, 0.672, 0.5375, 0.687]}, {"w": "accuracy.", "b": [0.5445, 0.6717, 0.6303, 0.687]}, {"w": "First,", "b": [0.6385, 0.6717, 0.6829, 0.6867]}, {"w": "calculate", "b": [0.6891, 0.6717, 0.7605, 0.6867]}, {"w": "the", "b": [0.7666, 0.6717, 0.7925, 0.6867]}, {"w": "accuracy", "b": [0.7986, 0.6717, 0.8696, 0.6867]}, {"w": "of", "b": [0.1312, 0.6897, 0.1464, 0.7046]}, {"w": "prediction", "b": [0.1528, 0.6897, 0.2355, 0.7046]}, {"w": "for", "b": [0.2419, 0.6897, 0.2644, 0.7046]}, {"w": "each", "b": [0.2708, 0.6897, 0.3069, 0.7046]}, {"w": "class", "b": [0.3133, 0.6897, 0.3512, 0.7046]}, {"w": "{1,", "b": [0.3574, 0.6897, 0.3812, 0.7049]}, {"w": ".", "b": [0.3843, 0.6899, 0.3894, 0.7049]}, {"w": ".", "b": [0.3925, 0.6899, 0.3976, 0.7049]}, {"w": ".", "b": [0.4007, 0.6899, 0.4058, 0.7049]}, {"w": ",", "b": [0.4089, 0.6899, 0.414, 0.7049]}, {"w": "C},", "b": [0.4171, 0.6897, 0.446, 0.7049]}, {"w": "and", "b": [0.4524, 0.6897, 0.4828, 0.7046]}, {"w": "then", "b": [0.4892, 0.6897, 0.5258, 0.7046]}, {"w": "take", "b": [0.5322, 0.6897, 0.5667, 0.7046]}, {"w": "an", "b": [0.5731, 0.6897, 0.593, 0.7046]}, {"w": "average", "b": [0.5993, 0.6897, 0.6606, 0.7046]}, {"w": "of", "b": [0.667, 0.6897, 0.6822, 0.7046]}, {"w": "C", "b": [0.6884, 0.6899, 0.7016, 0.7049]}, {"w": "individual", "b": [0.7093, 0.6897, 0.7915, 0.7046]}, {"w": "accuracy", "b": [0.7978, 0.6897, 0.8695, 0.7046]}, {"w": "measures.", "b": [0.1312, 0.7076, 0.211, 0.7226]}, {"w": "For", "b": [0.2235, 0.7076, 0.251, 0.7226]}, {"w": "the", "b": [0.2587, 0.7076, 0.2848, 0.7226]}, {"w": "above", "b": [0.2924, 0.7076, 0.3395, 0.7226]}, {"w": "confusion", "b": [0.3471, 0.7076, 0.4241, 0.7226]}, {"w": "matrix", "b": [0.4316, 0.7076, 0.4866, 0.7226]}, {"w": "of", "b": [0.4942, 0.7076, 0.5093, 0.7226]}, {"w": "the", "b": [0.5169, 0.7076, 0.5431, 0.7226]}, {"w": "spam", "b": [0.5507, 0.7076, 0.5937, 0.7226]}, {"w": "detection", "b": [0.6013, 0.7076, 0.6766, 0.7226]}, {"w": "problem,", "b": [0.6842, 0.7076, 0.7564, 0.7226]}, {"w": "the", "b": [0.7643, 0.7076, 0.7905, 0.7226]}, {"w": "accuracy", "b": [0.7981, 0.7076, 0.8698, 0.7226]}, {"w": "for", "b": [0.1312, 0.7256, 0.1538, 0.7405]}, {"w": "the", "b": [0.1627, 0.7256, 0.1889, 0.7405]}, {"w": "class", "b": [0.1979, 0.7256, 0.2357, 0.7405]}, {"w": "“spam”", "b": [0.2447, 0.7256, 0.3055, 0.7405]}, {"w": "is", "b": [0.3144, 0.7256, 0.3271, 0.7405]}, {"w": "23/(23", "b": [0.336, 0.7256, 0.3901, 0.7408]}, {"w": "+", "b": [0.3961, 0.7256, 0.4108, 0.7405]}, {"w": "1)", "b": [0.4167, 0.7256, 0.4335, 0.7405]}, {"w": "=", "b": [0.4433, 0.7256, 0.4579, 0.7405]}, {"w": "0.96,", "b": [0.4677, 0.7256, 0.5063, 0.7408]}, {"w": "the", "b": [0.516, 0.7256, 0.5421, 0.7405]}, {"w": "accuracy", "b": [0.5511, 0.7256, 0.6228, 0.7405]}, {"w": "for", "b": [0.6318, 0.7256, 0.6543, 0.7405]}, {"w": "the", "b": [0.6633, 0.7256, 0.6895, 0.7405]}, {"w": "class", "b": [0.6984, 0.7256, 0.7363, 0.7405]}, {"w": "“not_spam”", "b": [0.7452, 0.7256, 0.8473, 0.7405]}, {"w": "is", "b": [0.8563, 0.7256, 0.8689, 0.7405]}, {"w": "556/(12", "b": [0.1312, 0.7435, 0.1938, 0.7587]}, {"w": "+", "b": [0.1979, 0.7435, 0.2122, 0.7585]}, {"w": "556)", "b": [0.2163, 0.7435, 0.2512, 0.7585]}, {"w": "=", "b": [0.2563, 0.7435, 0.2706, 0.7585]}, {"w": "0.98.", "b": [0.2758, 0.7435, 0.3137, 0.7587]}, {"w": "The", "b": [0.3219, 0.7435, 0.3537, 0.7585]}, {"w": "per-class", "b": [0.3598, 0.7435, 0.4293, 0.7585]}, {"w": "accuracy", "b": [0.4354, 0.7435, 0.5058, 0.7585]}, {"w": "is", "b": [0.5119, 0.7435, 0.5243, 0.7585]}, {"w": "then", "b": [0.5305, 0.7435, 0.5664, 0.7585]}, {"w": "(0.96", "b": [0.5724, 0.7435, 0.6124, 0.7587]}, {"w": "+", "b": [0.6164, 0.7435, 0.6308, 0.7585]}, {"w": "0.98)/2", "b": [0.6349, 0.7435, 0.6933, 0.7587]}, {"w": "=", "b": [0.6985, 0.7435, 0.7128, 0.7585]}, {"w": "0.97.", "b": [0.7179, 0.7435, 0.7559, 0.7587]}]}, {"id": "b_9", "type": "paragraph", "text": "Per-class accuracy will not be an appropriate model quality measure for a multiclass clas- sification problem where many classes have very few examples (roughly, less than a dozen examples per class). In that case, the accuracy values obtained for the binary classification problems corresponding to these minority classes will not be statistically reliable.", "words": [{"w": "Per-class", "b": [0.1312, 0.7704, 0.2034, 0.7854]}, {"w": "accuracy", "b": [0.2098, 0.7704, 0.2815, 0.7854]}, {"w": "will", "b": [0.2878, 0.7704, 0.3171, 0.7854]}, {"w": "not", "b": [0.3234, 0.7704, 0.3506, 0.7854]}, {"w": "be", "b": [0.3569, 0.7704, 0.3763, 0.7854]}, {"w": "an", "b": [0.3826, 0.7704, 0.4025, 0.7854]}, {"w": "appropriate", "b": [0.4088, 0.7704, 0.5041, 0.7854]}, {"w": "model", "b": [0.5105, 0.7704, 0.5601, 0.7854]}, {"w": "quality", "b": [0.5664, 0.7704, 0.6235, 0.7854]}, {"w": "measure", "b": [0.6298, 0.7704, 0.6969, 0.7854]}, {"w": "for", "b": [0.7032, 0.7704, 0.7258, 0.7854]}, {"w": "a", "b": [0.7321, 0.7704, 0.7415, 0.7854]}, {"w": "multiclass", "b": [0.7479, 0.7704, 0.8291, 0.7854]}, {"w": "clas-", "b": [0.8355, 0.7704, 0.8722, 0.7854]}, {"w": "sification", "b": [0.1312, 0.7884, 0.2046, 0.8033]}, {"w": "problem", "b": [0.2107, 0.7884, 0.2777, 0.8033]}, {"w": "where", "b": [0.2838, 0.7884, 0.332, 0.8033]}, {"w": "many", "b": [0.3382, 0.7884, 0.3832, 0.8033]}, {"w": "classes", "b": [0.3893, 0.7884, 0.443, 0.8033]}, {"w": "have", "b": [0.4491, 0.7884, 0.4863, 0.8033]}, {"w": "very", "b": [0.4924, 0.7884, 0.5275, 0.8033]}, {"w": "few", "b": [0.5337, 0.7884, 0.5614, 0.8033]}, {"w": "examples", "b": [0.5676, 0.7884, 0.6425, 0.8033]}, {"w": "(roughly,", "b": [0.6486, 0.7884, 0.7219, 0.8033]}, {"w": "less", "b": [0.7281, 0.7884, 0.7565, 0.8033]}, {"w": "than", "b": [0.7627, 0.7884, 0.8003, 0.8033]}, {"w": "a", "b": [0.8065, 0.7884, 0.8159, 0.8033]}, {"w": "dozen", "b": [0.8221, 0.7884, 0.8691, 0.8033]}, {"w": "examples", "b": [0.1312, 0.8063, 0.2049, 0.8213]}, {"w": "per", "b": [0.211, 0.8063, 0.2373, 0.8213]}, {"w": "class).", "b": [0.2435, 0.8063, 0.2931, 0.8213]}, {"w": "In", "b": [0.3013, 0.8063, 0.3183, 0.8213]}, {"w": "that", "b": [0.3245, 0.8063, 0.3584, 0.8213]}, {"w": "case,", "b": [0.3646, 0.8063, 0.4028, 0.8213]}, {"w": "the", "b": [0.4089, 0.8063, 0.4346, 0.8213]}, {"w": "accuracy", "b": [0.4408, 0.8063, 0.5113, 0.8213]}, {"w": "values", "b": [0.5175, 0.8063, 0.5665, 0.8213]}, {"w": "obtained", "b": [0.5726, 0.8063, 0.6426, 0.8213]}, {"w": "for", "b": [0.6487, 0.8063, 0.6709, 0.8213]}, {"w": "the", "b": [0.6771, 0.8063, 0.7028, 0.8213]}, {"w": "binary", "b": [0.709, 0.8063, 0.7609, 0.8213]}, {"w": "classification", "b": [0.7671, 0.8063, 0.8692, 0.8213]}, {"w": "problems", "b": [0.1312, 0.8243, 0.2042, 0.8392]}, {"w": "corresponding", "b": [0.2103, 0.8243, 0.3228, 0.8392]}, {"w": "to", "b": [0.329, 0.8243, 0.3454, 0.8392]}, {"w": "these", "b": [0.3516, 0.8243, 0.3927, 0.8392]}, {"w": "minority", "b": [0.3988, 0.8243, 0.4676, 0.8392]}, {"w": "classes", "b": [0.4737, 0.8243, 0.5264, 0.8392]}, {"w": "will", "b": [0.5325, 0.8243, 0.5612, 0.8392]}, {"w": "not", "b": [0.5674, 0.8243, 0.594, 0.8392]}, {"w": "be", "b": [0.6002, 0.8243, 0.6192, 0.8392]}, {"w": "statistically", "b": [0.6253, 0.8243, 0.7183, 0.8392]}, {"w": "reliable.", "b": [0.7245, 0.8243, 0.7881, 0.8392]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 18", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "18", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 157, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Cohen’s kappa statistic is a performance metric that applies to both multiclass and imbalanced learning problems. The advantage of this metric over accuracy is that Cohen’s kappa tells you how much better your classification model is performing, compared to a classifier that randomly guesses a class according to the frequency of each class.", "words": [{"w": "Cohen’s", "b": [0.1312, 0.0884, 0.2048, 0.1034]}, {"w": "kappa", "b": [0.2143, 0.0884, 0.2697, 0.1034]}, {"w": "statistic", "b": [0.2793, 0.0884, 0.3523, 0.1034]}, {"w": "is", "b": [0.3606, 0.0881, 0.3732, 0.1031]}, {"w": "a", "b": [0.3816, 0.0881, 0.391, 0.1031]}, {"w": "performance", "b": [0.3993, 0.0881, 0.5008, 0.1031]}, {"w": "metric", "b": [0.5091, 0.0881, 0.5615, 0.1031]}, {"w": "that", "b": [0.5698, 0.0881, 0.6043, 0.1031]}, {"w": "applies", "b": [0.6126, 0.0881, 0.6692, 0.1031]}, {"w": "to", "b": [0.6775, 0.0881, 0.6943, 0.1031]}, {"w": "both", "b": [0.7026, 0.0881, 0.7407, 0.1031]}, {"w": "multiclass", "b": [0.7491, 0.0881, 0.8304, 0.1031]}, {"w": "and", "b": [0.8387, 0.0881, 0.869, 0.1031]}, {"w": "imbalanced", "b": [0.1312, 0.106, 0.2228, 0.121]}, {"w": "learning", "b": [0.229, 0.106, 0.2942, 0.121]}, {"w": "problems.", "b": [0.3004, 0.106, 0.3792, 0.121]}, {"w": "The", "b": [0.3874, 0.106, 0.4195, 0.121]}, {"w": "advantage", "b": [0.4256, 0.106, 0.5074, 0.121]}, {"w": "of", "b": [0.5135, 0.106, 0.5285, 0.121]}, {"w": "this", "b": [0.5347, 0.106, 0.5648, 0.121]}, {"w": "metric", "b": [0.571, 0.106, 0.6228, 0.121]}, {"w": "over", "b": [0.6289, 0.106, 0.6626, 0.121]}, {"w": "accuracy", "b": [0.6688, 0.106, 0.7397, 0.121]}, {"w": "is", "b": [0.7459, 0.106, 0.7584, 0.121]}, {"w": "that", "b": [0.7645, 0.106, 0.7987, 0.121]}, {"w": "Cohen’s", "b": [0.8048, 0.106, 0.8691, 0.121]}, {"w": "kappa", "b": [0.1312, 0.124, 0.1809, 0.1389]}, {"w": "tells", "b": [0.1882, 0.124, 0.2218, 0.1389]}, {"w": "you", "b": [0.2291, 0.124, 0.2584, 0.1389]}, {"w": "how", "b": [0.2656, 0.124, 0.2986, 0.1389]}, {"w": "much", "b": [0.3059, 0.124, 0.3498, 0.1389]}, {"w": "better", "b": [0.3571, 0.124, 0.4068, 0.1389]}, {"w": "your", "b": [0.4141, 0.124, 0.4508, 0.1389]}, {"w": "classification", "b": [0.458, 0.124, 0.5618, 0.1389]}, {"w": "model", "b": [0.5691, 0.124, 0.6188, 0.1389]}, {"w": "is", "b": [0.6261, 0.124, 0.6387, 0.1389]}, {"w": "performing,", "b": [0.646, 0.124, 0.7413, 0.1389]}, {"w": "compared", "b": [0.7488, 0.124, 0.8284, 0.1389]}, {"w": "to", "b": [0.8357, 0.124, 0.8524, 0.1389]}, {"w": "a", "b": [0.8597, 0.124, 0.8691, 0.1389]}, {"w": "classifier", "b": [0.1312, 0.1419, 0.1992, 0.1569]}, {"w": "that", "b": [0.2053, 0.1419, 0.2392, 0.1569]}, {"w": "randomly", "b": [0.2453, 0.1419, 0.3218, 0.1569]}, {"w": "guesses", "b": [0.3279, 0.1419, 0.3857, 0.1569]}, {"w": "a", "b": [0.3918, 0.1419, 0.4011, 0.1569]}, {"w": "class", "b": [0.4072, 0.1419, 0.4443, 0.1569]}, {"w": "according", "b": [0.4505, 0.1419, 0.5274, 0.1569]}, {"w": "to", "b": [0.5336, 0.1419, 0.55, 0.1569]}, {"w": "the", "b": [0.5561, 0.1419, 0.5818, 0.1569]}, {"w": "frequency", "b": [0.5879, 0.1419, 0.6654, 0.1569]}, {"w": "of", "b": [0.6716, 0.1419, 0.6865, 0.1569]}, {"w": "each", "b": [0.6926, 0.1419, 0.728, 0.1569]}, {"w": "class.", "b": [0.7341, 0.1419, 0.7764, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "Cohen’s kappa is defined as:", "words": [{"w": "Cohen’s", "b": [0.1312, 0.1689, 0.1949, 0.1838]}, {"w": "kappa", "b": [0.2011, 0.1689, 0.2498, 0.1838]}, {"w": "is", "b": [0.2559, 0.1689, 0.2683, 0.1838]}, {"w": "defined", "b": [0.2745, 0.1689, 0.3319, 0.1838]}, {"w": "as:", "b": [0.3381, 0.1689, 0.3597, 0.1838]}]}, {"id": "b_3", "type": "equation", "text": "def = po −pe", "words": [{"w": "def", "b": [0.4623, 0.2112, 0.4816, 0.2217]}, {"w": "=", "b": [0.4647, 0.2161, 0.4791, 0.2311]}, {"w": "po", "b": [0.4889, 0.2063, 0.5055, 0.2225]}, {"w": "−pe", "b": [0.5105, 0.2061, 0.5452, 0.2225]}]}, {"id": "b_4", "type": "paragraph", "text": "1 −pe ,", "words": [{"w": "1", "b": [0.493, 0.2264, 0.5023, 0.2413]}, {"w": "−pe", "b": [0.5064, 0.2265, 0.5411, 0.2429]}, {"w": ",", "b": [0.5484, 0.2164, 0.5535, 0.2313]}]}, {"id": "b_5", "type": "paragraph", "text": "where po is called the observed agreement, and pe is the expected agreement.", "words": [{"w": "where", "b": [0.1306, 0.259, 0.1778, 0.274]}, {"w": "po", "b": [0.1839, 0.2593, 0.2005, 0.2755]}, {"w": "is", "b": [0.2076, 0.259, 0.22, 0.274]}, {"w": "called", "b": [0.2261, 0.259, 0.2723, 0.274]}, {"w": "the", "b": [0.2784, 0.259, 0.3041, 0.274]}, {"w": "observed", "b": [0.3102, 0.259, 0.3801, 0.274]}, {"w": "agreement,", "b": [0.3863, 0.259, 0.474, 0.274]}, {"w": "and", "b": [0.4801, 0.259, 0.5099, 0.274]}, {"w": "pe", "b": [0.5159, 0.2593, 0.5321, 0.2755]}, {"w": "is", "b": [0.5392, 0.259, 0.5516, 0.274]}, {"w": "the", "b": [0.5578, 0.259, 0.5834, 0.274]}, {"w": "expected", "b": [0.5896, 0.259, 0.6604, 0.274]}, {"w": "agreement.", "b": [0.6665, 0.259, 0.7542, 0.274]}]}, {"id": "b_6", "type": "paragraph", "text": "Let’s look once again at a confusion matrix:", "words": [{"w": "Let’s", "b": [0.1312, 0.2859, 0.1706, 0.3009]}, {"w": "look", "b": [0.1767, 0.2859, 0.2105, 0.3009]}, {"w": "once", "b": [0.2167, 0.2859, 0.2526, 0.3009]}, {"w": "again", "b": [0.2588, 0.2859, 0.3018, 0.3009]}, {"w": "at", "b": [0.308, 0.2859, 0.3244, 0.3009]}, {"w": "a", "b": [0.3305, 0.2859, 0.3397, 0.3009]}, {"w": "confusion", "b": [0.3459, 0.2859, 0.4214, 0.3009]}, {"w": "matrix:", "b": [0.4275, 0.2859, 0.4865, 0.3009]}]}, {"id": "b_7", "type": "paragraph", "text": "class1 (predicted) class2 (predicted)", "words": [{"w": "class1", "b": [0.4163, 0.3247, 0.4627, 0.3397]}, {"w": "(predicted)", "b": [0.4688, 0.3247, 0.5581, 0.3397]}, {"w": "class2", "b": [0.5803, 0.3247, 0.6266, 0.3397]}, {"w": "(predicted)", "b": [0.6328, 0.3247, 0.7221, 0.3397]}]}, {"id": "b_8", "type": "paragraph", "text": "class1 (actual) a b class2 (actual) c d", "words": [{"w": "class1", "b": [0.2781, 0.3502, 0.3245, 0.3652]}, {"w": "(actual)", "b": [0.3307, 0.3502, 0.3942, 0.3652]}, {"w": "a", "b": [0.4163, 0.3505, 0.4261, 0.3654]}, {"w": "b", "b": [0.5802, 0.3505, 0.5881, 0.3654]}, {"w": "class2", "b": [0.2781, 0.3681, 0.3245, 0.3831]}, {"w": "(actual)", "b": [0.3307, 0.3681, 0.3942, 0.3831]}, {"w": "c", "b": [0.4163, 0.3684, 0.4243, 0.3834]}, {"w": "d", "b": [0.5802, 0.3684, 0.5898, 0.3834]}]}, {"id": "b_9", "type": "paragraph", "text": "The observed agreement po is obtained from the confusion matrix as,", "words": [{"w": "The", "b": [0.1306, 0.4222, 0.1624, 0.4371]}, {"w": "observed", "b": [0.1685, 0.4222, 0.2384, 0.4371]}, {"w": "agreement", "b": [0.2446, 0.4222, 0.3272, 0.4371]}, {"w": "po", "b": [0.3332, 0.4224, 0.3498, 0.4387]}, {"w": "is", "b": [0.3568, 0.4222, 0.3693, 0.4371]}, {"w": "obtained", "b": [0.3754, 0.4222, 0.4451, 0.4371]}, {"w": "from", "b": [0.4513, 0.4222, 0.4888, 0.4371]}, {"w": "the", "b": [0.4949, 0.4222, 0.5206, 0.4371]}, {"w": "confusion", "b": [0.5267, 0.4222, 0.6022, 0.4371]}, {"w": "matrix", "b": [0.6083, 0.4222, 0.6622, 0.4371]}, {"w": "as,", "b": [0.6684, 0.4222, 0.69, 0.4371]}]}, {"id": "b_11", "type": "equation", "text": "def = a + d a + b + c + d.", "words": [{"w": "def", "b": [0.4429, 0.4662, 0.4622, 0.4767]}, {"w": "=", "b": [0.4453, 0.4711, 0.4597, 0.486]}, {"w": "a", "b": [0.5, 0.4612, 0.5098, 0.4762]}, {"w": "+", "b": [0.5138, 0.461, 0.5282, 0.4759]}, {"w": "d", "b": [0.5323, 0.4612, 0.5419, 0.4762]}, {"w": "a", "b": [0.4695, 0.4816, 0.4793, 0.4966]}, {"w": "+", "b": [0.4833, 0.4813, 0.4977, 0.4963]}, {"w": "b", "b": [0.5018, 0.4816, 0.5097, 0.4966]}, {"w": "+", "b": [0.5138, 0.4813, 0.5282, 0.4963]}, {"w": "c", "b": [0.5323, 0.4816, 0.5403, 0.4966]}, {"w": "+", "b": [0.5443, 0.4813, 0.5587, 0.4963]}, {"w": "d.", "b": [0.5628, 0.4714, 0.5797, 0.4966]}]}, {"id": "b_12", "type": "paragraph", "text": "The expected agreement pe, in turn, is obtained as pe", "words": [{"w": "The", "b": [0.1306, 0.5194, 0.1624, 0.5344]}, {"w": "expected", "b": [0.1685, 0.5194, 0.2393, 0.5344]}, {"w": "agreement", "b": [0.2454, 0.5194, 0.328, 0.5344]}, {"w": "pe,", "b": [0.3341, 0.5194, 0.3564, 0.5359]}, {"w": "in", "b": [0.3626, 0.5194, 0.3779, 0.5344]}, {"w": "turn,", "b": [0.3841, 0.5194, 0.4241, 0.5344]}, {"w": "is", "b": [0.4303, 0.5194, 0.4427, 0.5344]}, {"w": "obtained", "b": [0.4489, 0.5194, 0.5186, 0.5344]}, {"w": "as", "b": [0.5247, 0.5194, 0.5413, 0.5344]}, {"w": "pe", "b": [0.5473, 0.5197, 0.5636, 0.5359]}]}, {"id": "b_13", "type": "equation", "text": "def = pclass1 + pclass2, where,", "words": [{"w": "def", "b": [0.5696, 0.5145, 0.5889, 0.525]}, {"w": "=", "b": [0.5721, 0.5194, 0.5865, 0.5344]}, {"w": "pclass1", "b": [0.594, 0.5197, 0.6405, 0.5359]}, {"w": "+", "b": [0.6455, 0.5194, 0.6598, 0.5344]}, {"w": "pclass2,", "b": [0.6639, 0.5194, 0.7164, 0.5359]}, {"w": "where,", "b": [0.7225, 0.5194, 0.7749, 0.5344]}]}, {"id": "b_14", "type": "paragraph", "text": "pclass1", "words": [{"w": "pclass1", "b": [0.3404, 0.5686, 0.3868, 0.5849]}]}, {"id": "b_15", "type": "equation", "text": "def = a + b a + b + c + d × a + c a + b + c + d,", "words": [{"w": "def", "b": [0.3929, 0.5635, 0.4121, 0.5739]}, {"w": "=", "b": [0.3953, 0.5683, 0.4097, 0.5833]}, {"w": "a", "b": [0.4508, 0.5585, 0.4606, 0.5735]}, {"w": "+", "b": [0.4647, 0.5582, 0.479, 0.5732]}, {"w": "b", "b": [0.4831, 0.5585, 0.491, 0.5735]}, {"w": "a", "b": [0.4195, 0.5789, 0.4292, 0.5938]}, {"w": "+", "b": [0.4333, 0.5786, 0.4477, 0.5936]}, {"w": "b", "b": [0.4518, 0.5789, 0.4597, 0.5938]}, {"w": "+", "b": [0.4638, 0.5786, 0.4782, 0.5936]}, {"w": "c", "b": [0.4822, 0.5789, 0.4902, 0.5938]}, {"w": "+", "b": [0.4943, 0.5786, 0.5087, 0.5936]}, {"w": "d", "b": [0.5128, 0.5789, 0.5224, 0.5938]}, {"w": "×", "b": [0.5287, 0.5684, 0.5431, 0.5834]}, {"w": "a", "b": [0.5807, 0.5585, 0.5904, 0.5735]}, {"w": "+", "b": [0.5945, 0.5582, 0.6089, 0.5732]}, {"w": "c", "b": [0.613, 0.5585, 0.621, 0.5735]}, {"w": "a", "b": [0.5494, 0.5789, 0.5591, 0.5938]}, {"w": "+", "b": [0.5632, 0.5786, 0.5776, 0.5936]}, {"w": "b", "b": [0.5817, 0.5789, 0.5896, 0.5938]}, {"w": "+", "b": [0.5937, 0.5786, 0.608, 0.5936]}, {"w": "c", "b": [0.6121, 0.5789, 0.6201, 0.5938]}, {"w": "+", "b": [0.6242, 0.5786, 0.6386, 0.5936]}, {"w": "d,", "b": [0.6427, 0.5686, 0.6596, 0.5938]}]}, {"id": "b_16", "type": "paragraph", "text": "and", "words": [{"w": "and", "b": [0.1312, 0.6096, 0.161, 0.6245]}]}, {"id": "b_17", "type": "paragraph", "text": "pclass2", "words": [{"w": "pclass2", "b": [0.343, 0.6588, 0.3894, 0.675]}]}, {"id": "b_18", "type": "equation", "text": "def = c + d a + b + c + d × b + d a + b + c + d", "words": [{"w": "def", "b": [0.3954, 0.6536, 0.4147, 0.6641]}, {"w": "=", "b": [0.3979, 0.6585, 0.4122, 0.6735]}, {"w": "c", "b": [0.4534, 0.6487, 0.4614, 0.6636]}, {"w": "+", "b": [0.4655, 0.6484, 0.4799, 0.6634]}, {"w": "d", "b": [0.484, 0.6487, 0.4936, 0.6636]}, {"w": "a", "b": [0.422, 0.669, 0.4318, 0.684]}, {"w": "+", "b": [0.4359, 0.6688, 0.4502, 0.6837]}, {"w": "b", "b": [0.4543, 0.669, 0.4623, 0.684]}, {"w": "+", "b": [0.4664, 0.6688, 0.4807, 0.6837]}, {"w": "c", "b": [0.4848, 0.669, 0.4928, 0.684]}, {"w": "+", "b": [0.4969, 0.6688, 0.5112, 0.6837]}, {"w": "d", "b": [0.5153, 0.669, 0.525, 0.684]}, {"w": "×", "b": [0.5313, 0.6586, 0.5456, 0.6736]}, {"w": "b", "b": [0.5833, 0.6487, 0.5913, 0.6636]}, {"w": "+", "b": [0.5954, 0.6484, 0.6097, 0.6634]}, {"w": "d", "b": [0.6138, 0.6487, 0.6234, 0.6636]}, {"w": "a", "b": [0.5519, 0.669, 0.5617, 0.684]}, {"w": "+", "b": [0.5658, 0.6688, 0.5801, 0.6837]}, {"w": "b", "b": [0.5842, 0.669, 0.5921, 0.684]}, {"w": "+", "b": [0.5962, 0.6688, 0.6106, 0.6837]}, {"w": "c", "b": [0.6147, 0.669, 0.6227, 0.684]}, {"w": "+", "b": [0.6268, 0.6688, 0.6411, 0.6837]}, {"w": "d", "b": [0.6452, 0.669, 0.6548, 0.684]}]}, {"id": "b_19", "type": "paragraph", "text": "The value of Cohen’s kappa is always less than or equal to 1. Values of 0 or less indicate that the model has a problem. While there is no universally accepted way to interpret the values of Cohen’s kappa, it’s usually considered that values between 0.61 and 0.80 indicate that the model is good, and values 0.81 or higher suggest that the model is very good.", "words": [{"w": "The", "b": [0.1306, 0.6998, 0.1617, 0.7147]}, {"w": "value", "b": [0.1676, 0.6998, 0.2082, 0.7147]}, {"w": "of", "b": [0.2141, 0.6998, 0.2286, 0.7147]}, {"w": "Cohen’s", "b": [0.2345, 0.6998, 0.2969, 0.7147]}, {"w": "kappa", "b": [0.3027, 0.6998, 0.3504, 0.7147]}, {"w": "is", "b": [0.3563, 0.6998, 0.3685, 0.7147]}, {"w": "always", "b": [0.3743, 0.6998, 0.4261, 0.7147]}, {"w": "less", "b": [0.4319, 0.6998, 0.4593, 0.7147]}, {"w": "than", "b": [0.4651, 0.6998, 0.5013, 0.7147]}, {"w": "or", "b": [0.5071, 0.6998, 0.5233, 0.7147]}, {"w": "equal", "b": [0.5291, 0.6998, 0.5708, 0.7147]}, {"w": "to", "b": [0.5766, 0.6998, 0.5927, 0.7147]}, {"w": "1.", "b": [0.5983, 0.6998, 0.6124, 0.7147]}, {"w": "Values", "b": [0.6205, 0.6998, 0.6718, 0.7147]}, {"w": "of", "b": [0.6777, 0.6998, 0.6922, 0.7147]}, {"w": "0", "b": [0.698, 0.6998, 0.7071, 0.7147]}, {"w": "or", "b": [0.7129, 0.6998, 0.729, 0.7147]}, {"w": "less", "b": [0.7349, 0.6998, 0.7622, 0.7147]}, {"w": "indicate", "b": [0.768, 0.6998, 0.8304, 0.7147]}, {"w": "that", "b": [0.8362, 0.6998, 0.8693, 0.7147]}, {"w": "the", "b": [0.1312, 0.7177, 0.1566, 0.7327]}, {"w": "model", "b": [0.1627, 0.7177, 0.2109, 0.7327]}, {"w": "has", "b": [0.217, 0.7177, 0.2435, 0.7327]}, {"w": "a", "b": [0.2497, 0.7177, 0.2588, 0.7327]}, {"w": "problem.", "b": [0.2649, 0.7177, 0.335, 0.7327]}, {"w": "While", "b": [0.3432, 0.7177, 0.3903, 0.7327]}, {"w": "there", "b": [0.3965, 0.7177, 0.4371, 0.7327]}, {"w": "is", "b": [0.4432, 0.7177, 0.4555, 0.7327]}, {"w": "no", "b": [0.4617, 0.7177, 0.4809, 0.7327]}, {"w": "universally", "b": [0.4871, 0.7177, 0.5729, 0.7327]}, {"w": "accepted", "b": [0.5791, 0.7177, 0.6481, 0.7327]}, {"w": "way", "b": [0.6542, 0.7177, 0.6851, 0.7327]}, {"w": "to", "b": [0.6913, 0.7177, 0.7075, 0.7327]}, {"w": "interpret", "b": [0.7136, 0.7177, 0.7832, 0.7327]}, {"w": "the", "b": [0.7894, 0.7177, 0.8147, 0.7327]}, {"w": "values", "b": [0.8209, 0.7177, 0.8691, 0.7327]}, {"w": "of", "b": [0.1312, 0.7357, 0.1458, 0.7506]}, {"w": "Cohen’s", "b": [0.152, 0.7357, 0.2144, 0.7506]}, {"w": "kappa,", "b": [0.2205, 0.7357, 0.2733, 0.7506]}, {"w": "it’s", "b": [0.2795, 0.7357, 0.3037, 0.7506]}, {"w": "usually", "b": [0.3099, 0.7357, 0.3658, 0.7506]}, {"w": "considered", "b": [0.372, 0.7357, 0.4545, 0.7506]}, {"w": "that", "b": [0.4607, 0.7357, 0.4939, 0.7506]}, {"w": "values", "b": [0.5, 0.7357, 0.5479, 0.7506]}, {"w": "between", "b": [0.554, 0.7357, 0.6178, 0.7506]}, {"w": "0.61", "b": [0.6238, 0.7357, 0.656, 0.7509]}, {"w": "and", "b": [0.6622, 0.7357, 0.6913, 0.7506]}, {"w": "0.80", "b": [0.6975, 0.7357, 0.7297, 0.7509]}, {"w": "indicate", "b": [0.7359, 0.7357, 0.7982, 0.7506]}, {"w": "that", "b": [0.8044, 0.7357, 0.8375, 0.7506]}, {"w": "the", "b": [0.8437, 0.7357, 0.8688, 0.7506]}, {"w": "model", "b": [0.1312, 0.7536, 0.1799, 0.7686]}, {"w": "is", "b": [0.1861, 0.7536, 0.1985, 0.7686]}, {"w": "good,", "b": [0.2046, 0.7536, 0.2487, 0.7686]}, {"w": "and", "b": [0.2549, 0.7536, 0.2846, 0.7686]}, {"w": "values", "b": [0.2908, 0.7536, 0.3396, 0.7686]}, {"w": "0.81", "b": [0.3457, 0.7536, 0.3785, 0.7688]}, {"w": "or", "b": [0.3846, 0.7536, 0.4011, 0.7686]}, {"w": "higher", "b": [0.4072, 0.7536, 0.4575, 0.7686]}, {"w": "suggest", "b": [0.4637, 0.7536, 0.5223, 0.7686]}, {"w": "that", "b": [0.5285, 0.7536, 0.5623, 0.7686]}, {"w": "the", "b": [0.5685, 0.7536, 0.5941, 0.7686]}, {"w": "model", "b": [0.6003, 0.7536, 0.649, 0.7686]}, {"w": "is", "b": [0.6551, 0.7536, 0.6675, 0.7686]}, {"w": "very", "b": [0.6737, 0.7536, 0.7081, 0.7686]}, {"w": "good.", "b": [0.7142, 0.7536, 0.7583, 0.7686]}]}, {"id": "b_20", "type": "paragraph", "text": "The ROC curve (stands for “receiver operating characteristic;” the term comes from radar engineering) is a commonly-used method of assessing classification models. ROC curves use a combination of the true positive rate (defined exactly as recall) and false positive rate (the proportion of negative examples predicted incorrectly) to build up a summary picture of", "words": [{"w": "The", "b": [0.1306, 0.7805, 0.162, 0.7955]}, {"w": "ROC", "b": [0.1682, 0.7808, 0.2148, 0.7958]}, {"w": "curve", "b": [0.2218, 0.7808, 0.2721, 0.7958]}, {"w": "(stands", "b": [0.2782, 0.7805, 0.3363, 0.7955]}, {"w": "for", "b": [0.3425, 0.7805, 0.3643, 0.7955]}, {"w": "“receiver", "b": [0.3705, 0.7805, 0.4401, 0.7955]}, {"w": "operating", "b": [0.4463, 0.7805, 0.5219, 0.7955]}, {"w": "characteristic;”", "b": [0.5281, 0.7805, 0.6481, 0.7955]}, {"w": "the", "b": [0.6542, 0.7805, 0.6796, 0.7955]}, {"w": "term", "b": [0.6858, 0.7805, 0.7234, 0.7955]}, {"w": "comes", "b": [0.7295, 0.7805, 0.7773, 0.7955]}, {"w": "from", "b": [0.7835, 0.7805, 0.8206, 0.7955]}, {"w": "radar", "b": [0.8267, 0.7805, 0.8694, 0.7955]}, {"w": "engineering)", "b": [0.1312, 0.7985, 0.2278, 0.8134]}, {"w": "is", "b": [0.2335, 0.7985, 0.2456, 0.8134]}, {"w": "a", "b": [0.2513, 0.7985, 0.2604, 0.8134]}, {"w": "commonly-used", "b": [0.266, 0.7985, 0.3882, 0.8134]}, {"w": "method", "b": [0.3939, 0.7985, 0.4537, 0.8134]}, {"w": "of", "b": [0.4594, 0.7985, 0.474, 0.8134]}, {"w": "assessing", "b": [0.4797, 0.7985, 0.5494, 0.8134]}, {"w": "classification", "b": [0.5551, 0.7985, 0.6548, 0.8134]}, {"w": "models.", "b": [0.6605, 0.7985, 0.7204, 0.8134]}, {"w": "ROC", "b": [0.7285, 0.7985, 0.7684, 0.8134]}, {"w": "curves", "b": [0.7741, 0.7985, 0.8235, 0.8134]}, {"w": "use", "b": [0.8292, 0.7985, 0.8544, 0.8134]}, {"w": "a", "b": [0.8601, 0.7985, 0.8691, 0.8134]}, {"w": "combination", "b": [0.1312, 0.8164, 0.2282, 0.8314]}, {"w": "of", "b": [0.2342, 0.8164, 0.2488, 0.8314]}, {"w": "the", "b": [0.2549, 0.8164, 0.28, 0.8314]}, {"w": "true", "b": [0.286, 0.8167, 0.3245, 0.8317]}, {"w": "positive", "b": [0.3314, 0.8167, 0.4032, 0.8317]}, {"w": "rate", "b": [0.4101, 0.8167, 0.4472, 0.8317]}, {"w": "(defined", "b": [0.4532, 0.8164, 0.5165, 0.8314]}, {"w": "exactly", "b": [0.5226, 0.8164, 0.5788, 0.8314]}, {"w": "as", "b": [0.5849, 0.8164, 0.6011, 0.8314]}, {"w": "recall)", "b": [0.607, 0.8164, 0.6641, 0.8317]}, {"w": "and", "b": [0.6701, 0.8164, 0.6993, 0.8314]}, {"w": "false", "b": [0.7053, 0.8167, 0.7461, 0.8317]}, {"w": "positive", "b": [0.7531, 0.8167, 0.8248, 0.8317]}, {"w": "rate", "b": [0.8318, 0.8167, 0.8688, 0.8317]}, {"w": "(the", "b": [0.1291, 0.8344, 0.1612, 0.8493]}, {"w": "proportion", "b": [0.1673, 0.8344, 0.2514, 0.8493]}, {"w": "of", "b": [0.2574, 0.8344, 0.272, 0.8493]}, {"w": "negative", "b": [0.2781, 0.8344, 0.3434, 0.8493]}, {"w": "examples", "b": [0.3495, 0.8344, 0.4215, 0.8493]}, {"w": "predicted", "b": [0.4276, 0.8344, 0.501, 0.8493]}, {"w": "incorrectly)", "b": [0.5071, 0.8344, 0.5982, 0.8493]}, {"w": "to", "b": [0.6042, 0.8344, 0.6203, 0.8493]}, {"w": "build", "b": [0.6264, 0.8344, 0.6666, 0.8493]}, {"w": "up", "b": [0.6727, 0.8344, 0.6928, 0.8493]}, {"w": "a", "b": [0.6989, 0.8344, 0.708, 0.8493]}, {"w": "summary", "b": [0.714, 0.8344, 0.787, 0.8493]}, {"w": "picture", "b": [0.7931, 0.8344, 0.8485, 0.8493]}, {"w": "of", "b": [0.8546, 0.8344, 0.8691, 0.8493]}]}, {"id": "b_21", "type": "paragraph", "text": "the classification performance.", "words": [{"w": "the", "b": [0.1312, 0.8523, 0.1569, 0.8673]}, {"w": "classification", "b": [0.163, 0.8523, 0.2648, 0.8673]}, {"w": "performance.", "b": [0.2709, 0.8523, 0.3756, 0.8673]}]}, {"id": "b_22", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 19", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "19", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 158, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "The true positive rate (TPR) and the false positive rate (FPR) are respectively defined as,", "words": [{"w": "The", "b": [0.1306, 0.0881, 0.1624, 0.1031]}, {"w": "true", "b": [0.1685, 0.0881, 0.2014, 0.1031]}, {"w": "positive", "b": [0.2075, 0.0881, 0.2697, 0.1031]}, {"w": "rate", "b": [0.2758, 0.0881, 0.3077, 0.1031]}, {"w": "(TPR)", "b": [0.3138, 0.0881, 0.368, 0.1031]}, {"w": "and", "b": [0.3741, 0.0881, 0.4039, 0.1031]}, {"w": "the", "b": [0.41, 0.0881, 0.4357, 0.1031]}, {"w": "false", "b": [0.4418, 0.0881, 0.4773, 0.1031]}, {"w": "positive", "b": [0.4835, 0.0881, 0.5456, 0.1031]}, {"w": "rate", "b": [0.5518, 0.0881, 0.5836, 0.1031]}, {"w": "(FPR)", "b": [0.5897, 0.0881, 0.6426, 0.1031]}, {"w": "are", "b": [0.6487, 0.0881, 0.6734, 0.1031]}, {"w": "respectively", "b": [0.6796, 0.0881, 0.7741, 0.1031]}, {"w": "defined", "b": [0.7802, 0.0881, 0.8377, 0.1031]}, {"w": "as,", "b": [0.8438, 0.0881, 0.8655, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "TPR", "words": [{"w": "TPR", "b": [0.3289, 0.1369, 0.3684, 0.1519]}]}, {"id": "b_2", "type": "equation", "text": "def = TP TP + FN and FPR", "words": [{"w": "def", "b": [0.3739, 0.132, 0.3932, 0.1425]}, {"w": "=", "b": [0.3764, 0.1369, 0.3907, 0.1519]}, {"w": "TP", "b": [0.4237, 0.1268, 0.4496, 0.1418]}, {"w": "TP", "b": [0.4005, 0.1472, 0.4264, 0.1621]}, {"w": "+", "b": [0.4295, 0.1472, 0.4439, 0.1621]}, {"w": "FN", "b": [0.4469, 0.1472, 0.4728, 0.1621]}, {"w": "and", "b": [0.4842, 0.1369, 0.514, 0.1519]}, {"w": "FPR", "b": [0.5263, 0.1369, 0.5645, 0.1519]}]}, {"id": "b_3", "type": "equation", "text": "def = FP FP + TN", "words": [{"w": "def", "b": [0.57, 0.132, 0.5893, 0.1425]}, {"w": "=", "b": [0.5725, 0.1369, 0.5868, 0.1519]}, {"w": "FP", "b": [0.6205, 0.1268, 0.6451, 0.1418]}, {"w": "FP", "b": [0.5966, 0.1472, 0.6212, 0.1621]}, {"w": "+", "b": [0.6243, 0.1472, 0.6387, 0.1621]}, {"w": "TN", "b": [0.6417, 0.1472, 0.6689, 0.1621]}]}, {"id": "b_4", "type": "paragraph", "text": "ROC curves can only be used to assess classifiers that return a score (or a probability) of prediction. For example, logistic regression, neural networks, and decision trees (and ensemble models based on decision trees) can be assessed using ROC curves.", "words": [{"w": "ROC", "b": [0.1312, 0.1791, 0.1728, 0.194]}, {"w": "curves", "b": [0.1792, 0.1791, 0.2306, 0.194]}, {"w": "can", "b": [0.237, 0.1791, 0.2653, 0.194]}, {"w": "only", "b": [0.2717, 0.1791, 0.3067, 0.194]}, {"w": "be", "b": [0.3131, 0.1791, 0.3324, 0.194]}, {"w": "used", "b": [0.3388, 0.1791, 0.3756, 0.194]}, {"w": "to", "b": [0.3819, 0.1791, 0.3987, 0.194]}, {"w": "assess", "b": [0.4051, 0.1791, 0.4526, 0.194]}, {"w": "classifiers", "b": [0.459, 0.1791, 0.5357, 0.194]}, {"w": "that", "b": [0.5421, 0.1791, 0.5766, 0.194]}, {"w": "return", "b": [0.583, 0.1791, 0.6344, 0.194]}, {"w": "a", "b": [0.6408, 0.1791, 0.6502, 0.194]}, {"w": "score", "b": [0.6566, 0.1791, 0.6976, 0.194]}, {"w": "(or", "b": [0.7039, 0.1791, 0.7281, 0.194]}, {"w": "a", "b": [0.7345, 0.1791, 0.7439, 0.194]}, {"w": "probability)", "b": [0.7503, 0.1791, 0.8476, 0.194]}, {"w": "of", "b": [0.854, 0.1791, 0.8692, 0.194]}, {"w": "prediction.", "b": [0.1312, 0.197, 0.2157, 0.212]}, {"w": "For", "b": [0.2235, 0.197, 0.2499, 0.212]}, {"w": "example,", "b": [0.255, 0.197, 0.3248, 0.212]}, {"w": "logistic", "b": [0.3301, 0.197, 0.3854, 0.212]}, {"w": "regression,", "b": [0.3905, 0.197, 0.4732, 0.212]}, {"w": "neural", "b": [0.4784, 0.197, 0.5278, 0.212]}, {"w": "networks,", "b": [0.5328, 0.197, 0.6078, 0.212]}, {"w": "and", "b": [0.613, 0.197, 0.6422, 0.212]}, {"w": "decision", "b": [0.6472, 0.197, 0.7096, 0.212]}, {"w": "trees", "b": [0.7146, 0.197, 0.752, 0.212]}, {"w": "(and", "b": [0.757, 0.197, 0.7932, 0.212]}, {"w": "ensemble", "b": [0.7982, 0.197, 0.8692, 0.212]}, {"w": "models", "b": [0.1312, 0.215, 0.1872, 0.2299]}, {"w": "based", "b": [0.1934, 0.215, 0.2386, 0.2299]}, {"w": "on", "b": [0.2448, 0.215, 0.2642, 0.2299]}, {"w": "decision", "b": [0.2704, 0.215, 0.3341, 0.2299]}, {"w": "trees)", "b": [0.3402, 0.215, 0.3855, 0.2299]}, {"w": "can", "b": [0.3917, 0.215, 0.4194, 0.2299]}, {"w": "be", "b": [0.4255, 0.215, 0.4445, 0.2299]}, {"w": "assessed", "b": [0.4506, 0.215, 0.5157, 0.2299]}, {"w": "using", "b": [0.5218, 0.215, 0.564, 0.2299]}, {"w": "ROC", "b": [0.5701, 0.215, 0.6109, 0.2299]}, {"w": "curves.", "b": [0.617, 0.215, 0.6726, 0.2299]}]}, {"id": "b_5", "type": "paragraph", "text": "To draw a ROC curve, you first discretize the range of the score. For instance, you can discretize the range [0, 1] like this: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]. Then, use each discrete value as the prediction threshold for your model. For example, if you want to calculate TPR and FPR for the threshold equal to 0.7, you apply the model to each example and get the score. If the score is greater than or equal to 0.7, you predict the positive class. Otherwise, you predict the negative class.", "words": [{"w": "To", "b": [0.1306, 0.2419, 0.152, 0.2569]}, {"w": "draw", "b": [0.1593, 0.2419, 0.1997, 0.2569]}, {"w": "a", "b": [0.207, 0.2419, 0.2164, 0.2569]}, {"w": "ROC", "b": [0.2237, 0.2419, 0.2653, 0.2569]}, {"w": "curve,", "b": [0.2726, 0.2419, 0.3218, 0.2569]}, {"w": "you", "b": [0.3294, 0.2419, 0.3587, 0.2569]}, {"w": "first", "b": [0.3661, 0.2419, 0.3986, 0.2569]}, {"w": "discretize", "b": [0.406, 0.2419, 0.4825, 0.2569]}, {"w": "the", "b": [0.4898, 0.2419, 0.516, 0.2569]}, {"w": "range", "b": [0.5233, 0.2419, 0.5683, 0.2569]}, {"w": "of", "b": [0.5756, 0.2419, 0.5908, 0.2569]}, {"w": "the", "b": [0.5981, 0.2419, 0.6243, 0.2569]}, {"w": "score.", "b": [0.6316, 0.2419, 0.6778, 0.2569]}, {"w": "For", "b": [0.6895, 0.2419, 0.717, 0.2569]}, {"w": "instance,", "b": [0.7244, 0.2419, 0.7966, 0.2569]}, {"w": "you", "b": [0.8043, 0.2419, 0.8335, 0.2569]}, {"w": "can", "b": [0.8409, 0.2419, 0.8691, 0.2569]}, {"w": "discretize", "b": [0.1312, 0.2599, 0.2059, 0.2748]}, {"w": "the", "b": [0.2121, 0.2599, 0.2376, 0.2748]}, {"w": "range", "b": [0.2437, 0.2599, 0.2877, 0.2748]}, {"w": "[0,", "b": [0.2937, 0.2599, 0.3132, 0.2751]}, {"w": "1]", "b": [0.3163, 0.2599, 0.3306, 0.2748]}, {"w": "like", "b": [0.3367, 0.2599, 0.3643, 0.2748]}, {"w": "this:", "b": [0.3705, 0.2599, 0.4053, 0.2748]}, {"w": "[0,", "b": [0.4134, 0.2599, 0.4329, 0.2751]}, {"w": "0.1,", "b": [0.436, 0.2599, 0.4646, 0.2751]}, {"w": "0.2,", "b": [0.4677, 0.2599, 0.4963, 0.2751]}, {"w": "0.3,", "b": [0.4994, 0.2599, 0.528, 0.2751]}, {"w": "0.4,", "b": [0.531, 0.2599, 0.5597, 0.2751]}, {"w": "0.5,", "b": [0.5627, 0.2599, 0.5913, 0.2751]}, {"w": "0.6,", "b": [0.5944, 0.2599, 0.623, 0.2751]}, {"w": "0.7,", "b": [0.6261, 0.2599, 0.6547, 0.2751]}, {"w": "0.8,", "b": [0.6578, 0.2599, 0.6864, 0.2751]}, {"w": "0.9,", "b": [0.6895, 0.2599, 0.7181, 0.2751]}, {"w": "1].", "b": [0.7211, 0.2599, 0.7405, 0.2748]}, {"w": "Then,", "b": [0.7488, 0.2599, 0.7957, 0.2748]}, {"w": "use", "b": [0.8018, 0.2599, 0.8275, 0.2748]}, {"w": "each", "b": [0.8336, 0.2599, 0.8688, 0.2748]}, {"w": "discrete", "b": [0.1312, 0.2778, 0.1942, 0.2928]}, {"w": "value", "b": [0.2022, 0.2778, 0.2446, 0.2928]}, {"w": "as", "b": [0.2527, 0.2778, 0.2695, 0.2928]}, {"w": "the", "b": [0.2776, 0.2778, 0.3037, 0.2928]}, {"w": "prediction", "b": [0.3118, 0.2778, 0.3945, 0.2928]}, {"w": "threshold", "b": [0.4026, 0.2778, 0.4791, 0.2928]}, {"w": "for", "b": [0.4872, 0.2778, 0.5097, 0.2928]}, {"w": "your", "b": [0.5178, 0.2778, 0.5544, 0.2928]}, {"w": "model.", "b": [0.5625, 0.2778, 0.6174, 0.2928]}, {"w": "For", "b": [0.6313, 0.2778, 0.6589, 0.2928]}, {"w": "example,", "b": [0.6669, 0.2778, 0.7396, 0.2928]}, {"w": "if", "b": [0.7482, 0.2778, 0.7591, 0.2928]}, {"w": "you", "b": [0.7672, 0.2778, 0.7965, 0.2928]}, {"w": "want", "b": [0.8046, 0.2778, 0.8443, 0.2928]}, {"w": "to", "b": [0.8524, 0.2778, 0.8691, 0.2928]}, {"w": "calculate", "b": [0.1312, 0.2957, 0.2006, 0.3107]}, {"w": "TPR", "b": [0.2064, 0.2957, 0.2459, 0.3107]}, {"w": "and", "b": [0.2522, 0.2957, 0.2814, 0.3107]}, {"w": "FPR", "b": [0.2872, 0.2957, 0.3254, 0.3107]}, {"w": "for", "b": [0.3317, 0.2957, 0.3534, 0.3107]}, {"w": "the", "b": [0.3593, 0.2957, 0.3844, 0.3107]}, {"w": "threshold", "b": [0.3903, 0.2957, 0.4638, 0.3107]}, {"w": "equal", "b": [0.4697, 0.2957, 0.5114, 0.3107]}, {"w": "to", "b": [0.5173, 0.2957, 0.5334, 0.3107]}, {"w": "0.7,", "b": [0.5391, 0.2957, 0.5674, 0.311]}, {"w": "you", "b": [0.5733, 0.2957, 0.6014, 0.3107]}, {"w": "apply", "b": [0.6073, 0.2957, 0.651, 0.3107]}, {"w": "the", "b": [0.6569, 0.2957, 0.6821, 0.3107]}, {"w": "model", "b": [0.6879, 0.2957, 0.7357, 0.3107]}, {"w": "to", "b": [0.7416, 0.2957, 0.7576, 0.3107]}, {"w": "each", "b": [0.7635, 0.2957, 0.7982, 0.3107]}, {"w": "example", "b": [0.8041, 0.2957, 0.8689, 0.3107]}, {"w": "and", "b": [0.1312, 0.3137, 0.161, 0.3287]}, {"w": "get", "b": [0.1671, 0.3137, 0.1917, 0.3287]}, {"w": "the", "b": [0.1979, 0.3137, 0.2235, 0.3287]}, {"w": "score.", "b": [0.2297, 0.3137, 0.275, 0.3287]}, {"w": "If", "b": [0.2832, 0.3137, 0.2955, 0.3287]}, {"w": "the", "b": [0.3017, 0.3137, 0.3273, 0.3287]}, {"w": "score", "b": [0.3335, 0.3137, 0.3736, 0.3287]}, {"w": "is", "b": [0.3798, 0.3137, 0.3922, 0.3287]}, {"w": "greater", "b": [0.3984, 0.3137, 0.4549, 0.3287]}, {"w": "than", "b": [0.461, 0.3137, 0.4979, 0.3287]}, {"w": "or", "b": [0.5041, 0.3137, 0.5206, 0.3287]}, {"w": "equal", "b": [0.5267, 0.3137, 0.5693, 0.3287]}, {"w": "to", "b": [0.5754, 0.3137, 0.5918, 0.3287]}, {"w": "0.7,", "b": [0.5978, 0.3137, 0.6265, 0.3289]}, {"w": "you", "b": [0.6326, 0.3137, 0.6613, 0.3287]}, {"w": "predict", "b": [0.6675, 0.3137, 0.724, 0.3287]}, {"w": "the", "b": [0.7301, 0.3137, 0.7558, 0.3287]}, {"w": "positive", "b": [0.7619, 0.3137, 0.8241, 0.3287]}, {"w": "class.", "b": [0.8302, 0.3137, 0.8725, 0.3287]}, {"w": "Otherwise,", "b": [0.1312, 0.3316, 0.2175, 0.3466]}, {"w": "you", "b": [0.2237, 0.3316, 0.2524, 0.3466]}, {"w": "predict", "b": [0.2586, 0.3316, 0.315, 0.3466]}, {"w": "the", "b": [0.3212, 0.3316, 0.3468, 0.3466]}, {"w": "negative", "b": [0.353, 0.3316, 0.4196, 0.3466]}, {"w": "class.", "b": [0.4258, 0.3316, 0.468, 0.3466]}]}, {"id": "b_6", "type": "paragraph", "text": "Look at the illustration in Figure 5. It’s easy to see that if the threshold equals 0, all our predictions will be positive, so both TPR and FPR will equal 1 (the upper right corner). On the other hand, if the threshold equals 1, then no positive prediction will be possible. Both TPR and FPR will equal 0, which corresponds to the lower-left corner.", "words": [{"w": "Look", "b": [0.1312, 0.3586, 0.1723, 0.3735]}, {"w": "at", "b": [0.1786, 0.3586, 0.1954, 0.3735]}, {"w": "the", "b": [0.2017, 0.3586, 0.2279, 0.3735]}, {"w": "illustration", "b": [0.2342, 0.3586, 0.3244, 0.3735]}, {"w": "in", "b": [0.3307, 0.3586, 0.3464, 0.3735]}, {"w": "Figure", "b": [0.3528, 0.3586, 0.4059, 0.3735]}, {"w": "5.", "b": [0.4123, 0.3586, 0.4269, 0.3735]}, {"w": "It’s", "b": [0.4358, 0.3586, 0.4625, 0.3735]}, {"w": "easy", "b": [0.4689, 0.3586, 0.5041, 0.3735]}, {"w": "to", "b": [0.5104, 0.3586, 0.5272, 0.3735]}, {"w": "see", "b": [0.5335, 0.3586, 0.5577, 0.3735]}, {"w": "that", "b": [0.5641, 0.3586, 0.5986, 0.3735]}, {"w": "if", "b": [0.6049, 0.3586, 0.6159, 0.3735]}, {"w": "the", "b": [0.6223, 0.3586, 0.6485, 0.3735]}, {"w": "threshold", "b": [0.6548, 0.3586, 0.7313, 0.3735]}, {"w": "equals", "b": [0.7377, 0.3586, 0.7886, 0.3735]}, {"w": "0,", "b": [0.7946, 0.3586, 0.8093, 0.3735]}, {"w": "all", "b": [0.8157, 0.3586, 0.8355, 0.3735]}, {"w": "our", "b": [0.8419, 0.3586, 0.8692, 0.3735]}, {"w": "predictions", "b": [0.1312, 0.3765, 0.2178, 0.3915]}, {"w": "will", "b": [0.224, 0.3765, 0.2521, 0.3915]}, {"w": "be", "b": [0.2582, 0.3765, 0.2769, 0.3915]}, {"w": "positive,", "b": [0.283, 0.3765, 0.3489, 0.3915]}, {"w": "so", "b": [0.3551, 0.3765, 0.3713, 0.3915]}, {"w": "both", "b": [0.3774, 0.3765, 0.4141, 0.3915]}, {"w": "TPR", "b": [0.4202, 0.3765, 0.4589, 0.3915]}, {"w": "and", "b": [0.4651, 0.3765, 0.4942, 0.3915]}, {"w": "FPR", "b": [0.5004, 0.3765, 0.5378, 0.3915]}, {"w": "will", "b": [0.5439, 0.3765, 0.5721, 0.3915]}, {"w": "equal", "b": [0.5782, 0.3765, 0.6199, 0.3915]}, {"w": "1", "b": [0.6259, 0.3765, 0.6349, 0.3915]}, {"w": "(the", "b": [0.641, 0.3765, 0.6732, 0.3915]}, {"w": "upper", "b": [0.6793, 0.3765, 0.7251, 0.3915]}, {"w": "right", "b": [0.7313, 0.3765, 0.769, 0.3915]}, {"w": "corner).", "b": [0.7752, 0.3765, 0.8366, 0.3915]}, {"w": "On", "b": [0.8448, 0.3765, 0.8689, 0.3915]}, {"w": "the", "b": [0.1312, 0.3945, 0.1569, 0.4094]}, {"w": "other", "b": [0.1631, 0.3945, 0.2052, 0.4094]}, {"w": "hand,", "b": [0.2113, 0.3945, 0.2565, 0.4094]}, {"w": "if", "b": [0.2627, 0.3945, 0.2735, 0.4094]}, {"w": "the", "b": [0.2796, 0.3945, 0.3053, 0.4094]}, {"w": "threshold", "b": [0.3114, 0.3945, 0.3865, 0.4094]}, {"w": "equals", "b": [0.3927, 0.3945, 0.4426, 0.4094]}, {"w": "1,", "b": [0.4485, 0.3945, 0.4629, 0.4094]}, {"w": "then", "b": [0.4691, 0.3945, 0.505, 0.4094]}, {"w": "no", "b": [0.5112, 0.3945, 0.5307, 0.4094]}, {"w": "positive", "b": [0.5368, 0.3945, 0.599, 0.4094]}, {"w": "prediction", "b": [0.6052, 0.3945, 0.6863, 0.4094]}, {"w": "will", "b": [0.6925, 0.3945, 0.7212, 0.4094]}, {"w": "be", "b": [0.7274, 0.3945, 0.7464, 0.4094]}, {"w": "possible.", "b": [0.7525, 0.3945, 0.821, 0.4094]}, {"w": "Both", "b": [0.8292, 0.3945, 0.869, 0.4094]}, {"w": "TPR", "b": [0.1306, 0.4124, 0.17, 0.4274]}, {"w": "and", "b": [0.1762, 0.4124, 0.2059, 0.4274]}, {"w": "FPR", "b": [0.2121, 0.4124, 0.2503, 0.4274]}, {"w": "will", "b": [0.2564, 0.4124, 0.2851, 0.4274]}, {"w": "equal", "b": [0.2913, 0.4124, 0.3338, 0.4274]}, {"w": "0,", "b": [0.3399, 0.4124, 0.3543, 0.4274]}, {"w": "which", "b": [0.3604, 0.4124, 0.4071, 0.4274]}, {"w": "corresponds", "b": [0.4132, 0.4124, 0.5084, 0.4274]}, {"w": "to", "b": [0.5146, 0.4124, 0.531, 0.4274]}, {"w": "the", "b": [0.5371, 0.4124, 0.5628, 0.4274]}, {"w": "lower-left", "b": [0.5689, 0.4124, 0.6433, 0.4274]}, {"w": "corner.", "b": [0.6495, 0.4124, 0.7049, 0.4274]}]}, {"id": "b_7", "type": "paragraph", "text": "The greater the area under the ROC curve (AUC), the better the classifier. A classifier with an AUC greater than 0.5 is better than a model that classifies at random. If AUC is lower than 0.5, then something is wrong, most likely a bug in the code or wrong labels in the data. A perfect classifier would have an AUC of 1. In practice, you obtain a good classifier by selecting the value of the threshold that gives TPR close to 1 while keeping FPR near 0.", "words": [{"w": "The", "b": [0.1306, 0.4393, 0.1623, 0.4543]}, {"w": "greater", "b": [0.1684, 0.4393, 0.2247, 0.4543]}, {"w": "the", "b": [0.2309, 0.4393, 0.2564, 0.4543]}, {"w": "area", "b": [0.2625, 0.4396, 0.3016, 0.4546]}, {"w": "under", "b": [0.3087, 0.4396, 0.3625, 0.4546]}, {"w": "the", "b": [0.3696, 0.4396, 0.3993, 0.4546]}, {"w": "ROC", "b": [0.4064, 0.4396, 0.453, 0.4546]}, {"w": "curve", "b": [0.4601, 0.4396, 0.5104, 0.4546]}, {"w": "(AUC),", "b": [0.5165, 0.4393, 0.5762, 0.4543]}, {"w": "the", "b": [0.5824, 0.4393, 0.608, 0.4543]}, {"w": "better", "b": [0.6141, 0.4393, 0.6627, 0.4543]}, {"w": "the", "b": [0.6689, 0.4393, 0.6944, 0.4543]}, {"w": "classifier.", "b": [0.7006, 0.4393, 0.7734, 0.4543]}, {"w": "A", "b": [0.7816, 0.4393, 0.7954, 0.4543]}, {"w": "classifier", "b": [0.8016, 0.4393, 0.8693, 0.4543]}, {"w": "with", "b": [0.1306, 0.4573, 0.1672, 0.4722]}, {"w": "an", "b": [0.1733, 0.4573, 0.1932, 0.4722]}, {"w": "AUC", "b": [0.1994, 0.4573, 0.2407, 0.4722]}, {"w": "greater", "b": [0.2469, 0.4573, 0.3045, 0.4722]}, {"w": "than", "b": [0.3107, 0.4573, 0.3484, 0.4722]}, {"w": "0.5", "b": [0.3545, 0.4573, 0.3784, 0.4725]}, {"w": "is", "b": [0.3846, 0.4573, 0.3973, 0.4722]}, {"w": "better", "b": [0.4034, 0.4573, 0.4532, 0.4722]}, {"w": "than", "b": [0.4594, 0.4573, 0.497, 0.4722]}, {"w": "a", "b": [0.5032, 0.4573, 0.5126, 0.4722]}, {"w": "model", "b": [0.5188, 0.4573, 0.5684, 0.4722]}, {"w": "that", "b": [0.5746, 0.4573, 0.6091, 0.4722]}, {"w": "classifies", "b": [0.6153, 0.4573, 0.6847, 0.4722]}, {"w": "at", "b": [0.6909, 0.4573, 0.7076, 0.4722]}, {"w": "random.", "b": [0.7138, 0.4573, 0.7818, 0.4722]}, {"w": "If", "b": [0.7901, 0.4573, 0.8026, 0.4722]}, {"w": "AUC", "b": [0.8088, 0.4573, 0.8501, 0.4722]}, {"w": "is", "b": [0.8563, 0.4573, 0.869, 0.4722]}, {"w": "lower", "b": [0.1312, 0.4752, 0.1725, 0.4902]}, {"w": "than", "b": [0.1784, 0.4752, 0.2146, 0.4902]}, {"w": "0.5,", "b": [0.2205, 0.4752, 0.2488, 0.4904]}, {"w": "then", "b": [0.2548, 0.4752, 0.29, 0.4902]}, {"w": "something", "b": [0.2959, 0.4752, 0.3764, 0.4902]}, {"w": "is", "b": [0.3824, 0.4752, 0.3946, 0.4902]}, {"w": "wrong,", "b": [0.4005, 0.4752, 0.4538, 0.4902]}, {"w": "most", "b": [0.4598, 0.4752, 0.4981, 0.4902]}, {"w": "likely", "b": [0.5041, 0.4752, 0.5458, 0.4902]}, {"w": "a", "b": [0.5518, 0.4752, 0.5608, 0.4902]}, {"w": "bug", "b": [0.5668, 0.4752, 0.5959, 0.4902]}, {"w": "in", "b": [0.6019, 0.4752, 0.617, 0.4902]}, {"w": "the", "b": [0.6229, 0.4752, 0.6481, 0.4902]}, {"w": "code", "b": [0.654, 0.4752, 0.6897, 0.4902]}, {"w": "or", "b": [0.6957, 0.4752, 0.7118, 0.4902]}, {"w": "wrong", "b": [0.7178, 0.4752, 0.7661, 0.4902]}, {"w": "labels", "b": [0.772, 0.4752, 0.8169, 0.4902]}, {"w": "in", "b": [0.8228, 0.4752, 0.8379, 0.4902]}, {"w": "the", "b": [0.8439, 0.4752, 0.869, 0.4902]}, {"w": "data.", "b": [0.1312, 0.4932, 0.1724, 0.5081]}, {"w": "A", "b": [0.1806, 0.4932, 0.1945, 0.5081]}, {"w": "perfect", "b": [0.2006, 0.4932, 0.2563, 0.5081]}, {"w": "classifier", "b": [0.2625, 0.4932, 0.3307, 0.5081]}, {"w": "would", "b": [0.3368, 0.4932, 0.3847, 0.5081]}, {"w": "have", "b": [0.3908, 0.4932, 0.4274, 0.5081]}, {"w": "an", "b": [0.4335, 0.4932, 0.4531, 0.5081]}, {"w": "AUC", "b": [0.4592, 0.4932, 0.4999, 0.5081]}, {"w": "of", "b": [0.506, 0.4932, 0.5209, 0.5081]}, {"w": "1.", "b": [0.5269, 0.4932, 0.5413, 0.5081]}, {"w": "In", "b": [0.5495, 0.4932, 0.5665, 0.5081]}, {"w": "practice,", "b": [0.5726, 0.4932, 0.6417, 0.5081]}, {"w": "you", "b": [0.6478, 0.4932, 0.6766, 0.5081]}, {"w": "obtain", "b": [0.6828, 0.4932, 0.7343, 0.5081]}, {"w": "a", "b": [0.7404, 0.4932, 0.7497, 0.5081]}, {"w": "good", "b": [0.7558, 0.4932, 0.7949, 0.5081]}, {"w": "classifier", "b": [0.8011, 0.4932, 0.8693, 0.5081]}, {"w": "by", "b": [0.1312, 0.5111, 0.1507, 0.5261]}, {"w": "selecting", "b": [0.1568, 0.5111, 0.2255, 0.5261]}, {"w": "the", "b": [0.2317, 0.5111, 0.2573, 0.5261]}, {"w": "value", "b": [0.2634, 0.5111, 0.3049, 0.5261]}, {"w": "of", "b": [0.311, 0.5111, 0.3259, 0.5261]}, {"w": "the", "b": [0.332, 0.5111, 0.3576, 0.5261]}, {"w": "threshold", "b": [0.3637, 0.5111, 0.4386, 0.5261]}, {"w": "that", "b": [0.4448, 0.5111, 0.4785, 0.5261]}, {"w": "gives", "b": [0.4847, 0.5111, 0.5237, 0.5261]}, {"w": "TPR", "b": [0.5296, 0.5111, 0.5691, 0.5261]}, {"w": "close", "b": [0.5757, 0.5111, 0.6136, 0.5261]}, {"w": "to", "b": [0.6198, 0.5111, 0.6362, 0.5261]}, {"w": "1", "b": [0.6423, 0.5111, 0.6515, 0.5261]}, {"w": "while", "b": [0.6576, 0.5111, 0.6996, 0.5261]}, {"w": "keeping", "b": [0.7057, 0.5111, 0.7661, 0.5261]}, {"w": "FPR", "b": [0.7722, 0.5111, 0.8104, 0.5261]}, {"w": "near", "b": [0.817, 0.5111, 0.8518, 0.5261]}, {"w": "0.", "b": [0.858, 0.5111, 0.8723, 0.5261]}]}, {"id": "b_8", "type": "paragraph", "text": "ROC curves are popular because they are relatively simple to understand. They capture more than one aspect of the classification, by taking both false positives and false negatives into account. They allow the analyst to easily and visually compare different model performances.", "words": [{"w": "ROC", "b": [0.1312, 0.538, 0.1712, 0.553]}, {"w": "curves", "b": [0.1765, 0.538, 0.2258, 0.553]}, {"w": "are", "b": [0.2311, 0.538, 0.2553, 0.553]}, {"w": "popular", "b": [0.2606, 0.538, 0.3215, 0.553]}, {"w": "because", "b": [0.3268, 0.538, 0.3877, 0.553]}, {"w": "they", "b": [0.393, 0.538, 0.4277, 0.553]}, {"w": "are", "b": [0.433, 0.538, 0.4572, 0.553]}, {"w": "relatively", "b": [0.4625, 0.538, 0.5354, 0.553]}, {"w": "simple", "b": [0.5407, 0.538, 0.591, 0.553]}, {"w": "to", "b": [0.5963, 0.538, 0.6124, 0.553]}, {"w": "understand.", "b": [0.6177, 0.538, 0.7113, 0.553]}, {"w": "They", "b": [0.7193, 0.538, 0.76, 0.553]}, {"w": "capture", "b": [0.7653, 0.538, 0.8246, 0.553]}, {"w": "more", "b": [0.8299, 0.538, 0.8691, 0.553]}, {"w": "than", "b": [0.1312, 0.556, 0.1685, 0.5709]}, {"w": "one", "b": [0.1746, 0.556, 0.2026, 0.5709]}, {"w": "aspect", "b": [0.2087, 0.556, 0.2601, 0.5709]}, {"w": "of", "b": [0.2662, 0.556, 0.2812, 0.5709]}, {"w": "the", "b": [0.2874, 0.556, 0.3133, 0.5709]}, {"w": "classification,", "b": [0.3194, 0.556, 0.4272, 0.5709]}, {"w": "by", "b": [0.4334, 0.556, 0.4531, 0.5709]}, {"w": "taking", "b": [0.4592, 0.556, 0.5104, 0.5709]}, {"w": "both", "b": [0.5166, 0.556, 0.5543, 0.5709]}, {"w": "false", "b": [0.5605, 0.556, 0.5963, 0.5709]}, {"w": "positives", "b": [0.6025, 0.556, 0.6725, 0.5709]}, {"w": "and", "b": [0.6787, 0.556, 0.7087, 0.5709]}, {"w": "false", "b": [0.7149, 0.556, 0.7507, 0.5709]}, {"w": "negatives", "b": [0.7568, 0.556, 0.8314, 0.5709]}, {"w": "into", "b": [0.8376, 0.556, 0.8692, 0.5709]}, {"w": "account.", "b": [0.1312, 0.5739, 0.197, 0.5889]}, {"w": "They", "b": [0.2052, 0.5739, 0.2459, 0.5889]}, {"w": "allow", "b": [0.2518, 0.5739, 0.2925, 0.5889]}, {"w": "the", "b": [0.2985, 0.5739, 0.3236, 0.5889]}, {"w": "analyst", "b": [0.3295, 0.5739, 0.3864, 0.5889]}, {"w": "to", "b": [0.3923, 0.5739, 0.4084, 0.5889]}, {"w": "easily", "b": [0.4144, 0.5739, 0.4582, 0.5889]}, {"w": "and", "b": [0.4641, 0.5739, 0.4933, 0.5889]}, {"w": "visually", "b": [0.4992, 0.5739, 0.5596, 0.5889]}, {"w": "compare", "b": [0.5656, 0.5739, 0.632, 0.5889]}, {"w": "different", "b": [0.6379, 0.5739, 0.7033, 0.5889]}, {"w": "model", "b": [0.7092, 0.5739, 0.757, 0.5889]}, {"w": "performances.", "b": [0.7629, 0.5739, 0.8727, 0.5889]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 20", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "20", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 159, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 5: The area under the ROC curve (shown in grey).", "words": [{"w": "Figure", "b": [0.2648, 0.6328, 0.3169, 0.6478]}, {"w": "5:", "b": [0.3231, 0.6328, 0.3374, 0.6478]}, {"w": "The", "b": [0.3457, 0.6328, 0.3774, 0.6478]}, {"w": "area", "b": [0.3836, 0.6328, 0.4175, 0.6478]}, {"w": "under", "b": [0.4236, 0.6328, 0.4698, 0.6478]}, {"w": "the", "b": [0.476, 0.6328, 0.5016, 0.6478]}, {"w": "ROC", "b": [0.5078, 0.6328, 0.5485, 0.6478]}, {"w": "curve", "b": [0.5547, 0.6328, 0.5978, 0.6478]}, {"w": "(shown", "b": [0.6039, 0.6328, 0.661, 0.6478]}, {"w": "in", "b": [0.6671, 0.6328, 0.6825, 0.6478]}, {"w": "grey).", "b": [0.6886, 0.6328, 0.7354, 0.6478]}]}, {"id": "b_1", "type": "paragraph", "text": "5.5.3 Performance Metrics for Ranking", "words": [{"w": "5.5.3", "b": [0.1312, 0.6864, 0.1749, 0.7013]}, {"w": "Performance", "b": [0.1961, 0.6864, 0.3132, 0.7013]}, {"w": "Metrics", "b": [0.3203, 0.6864, 0.3909, 0.7013]}, {"w": "for", "b": [0.3979, 0.6864, 0.4238, 0.7013]}, {"w": "Ranking", "b": [0.4308, 0.6864, 0.5084, 0.7013]}]}, {"id": "b_2", "type": "paragraph", "text": "Precision and recall can be naturally applied to the ranking problem. Recall that it’s convenient to think of these two metrics as measuring the quality of document search results. Precision is the proportion of relevant documents actually found in the list of all returned documents. The recall is the ratio of the relevant documents returned by the search engine, compared to the total number of the relevant documents that should have been returned.", "words": [{"w": "Precision", "b": [0.1312, 0.7226, 0.2059, 0.7376]}, {"w": "and", "b": [0.2146, 0.7226, 0.2449, 0.7376]}, {"w": "recall", "b": [0.2535, 0.7226, 0.2975, 0.7376]}, {"w": "can", "b": [0.3061, 0.7226, 0.3344, 0.7376]}, {"w": "be", "b": [0.343, 0.7226, 0.3624, 0.7376]}, {"w": "naturally", "b": [0.371, 0.7226, 0.4458, 0.7376]}, {"w": "applied", "b": [0.4545, 0.7226, 0.5141, 0.7376]}, {"w": "to", "b": [0.5227, 0.7226, 0.5395, 0.7376]}, {"w": "the", "b": [0.5481, 0.7226, 0.5743, 0.7376]}, {"w": "ranking", "b": [0.5829, 0.7226, 0.6452, 0.7376]}, {"w": "problem.", "b": [0.6538, 0.7226, 0.726, 0.7376]}, {"w": "Recall", "b": [0.7417, 0.7226, 0.7921, 0.7376]}, {"w": "that", "b": [0.8007, 0.7226, 0.8353, 0.7376]}, {"w": "it’s", "b": [0.8439, 0.7226, 0.8691, 0.7376]}, {"w": "convenient", "b": [0.1312, 0.7406, 0.2146, 0.7555]}, {"w": "to", "b": [0.2208, 0.7406, 0.2368, 0.7555]}, {"w": "think", "b": [0.243, 0.7406, 0.2847, 0.7555]}, {"w": "of", "b": [0.2908, 0.7406, 0.3054, 0.7555]}, {"w": "these", "b": [0.3115, 0.7406, 0.3518, 0.7555]}, {"w": "two", "b": [0.358, 0.7406, 0.3861, 0.7555]}, {"w": "metrics", "b": [0.3922, 0.7406, 0.4496, 0.7555]}, {"w": "as", "b": [0.4558, 0.7406, 0.472, 0.7555]}, {"w": "measuring", "b": [0.4781, 0.7406, 0.5586, 0.7555]}, {"w": "the", "b": [0.5648, 0.7406, 0.5899, 0.7555]}, {"w": "quality", "b": [0.596, 0.7406, 0.6508, 0.7555]}, {"w": "of", "b": [0.6569, 0.7406, 0.6715, 0.7555]}, {"w": "document", "b": [0.6776, 0.7406, 0.755, 0.7555]}, {"w": "search", "b": [0.7611, 0.7406, 0.81, 0.7555]}, {"w": "results.", "b": [0.8162, 0.7406, 0.8727, 0.7555]}, {"w": "Precision", "b": [0.1312, 0.7585, 0.2058, 0.7735]}, {"w": "is", "b": [0.2119, 0.7585, 0.2246, 0.7735]}, {"w": "the", "b": [0.2307, 0.7585, 0.2568, 0.7735]}, {"w": "proportion", "b": [0.2629, 0.7585, 0.3502, 0.7735]}, {"w": "of", "b": [0.3563, 0.7585, 0.3715, 0.7735]}, {"w": "relevant", "b": [0.3776, 0.7585, 0.4424, 0.7735]}, {"w": "documents", "b": [0.4486, 0.7585, 0.5364, 0.7735]}, {"w": "actually", "b": [0.5425, 0.7585, 0.6078, 0.7735]}, {"w": "found", "b": [0.6139, 0.7585, 0.6604, 0.7735]}, {"w": "in", "b": [0.6665, 0.7585, 0.6822, 0.7735]}, {"w": "the", "b": [0.6883, 0.7585, 0.7144, 0.7735]}, {"w": "list", "b": [0.7206, 0.7585, 0.7457, 0.7735]}, {"w": "of", "b": [0.7518, 0.7585, 0.767, 0.7735]}, {"w": "all", "b": [0.7731, 0.7585, 0.793, 0.7735]}, {"w": "returned", "b": [0.7991, 0.7585, 0.8692, 0.7735]}, {"w": "documents.", "b": [0.1312, 0.7765, 0.2225, 0.7914]}, {"w": "The", "b": [0.2307, 0.7765, 0.2625, 0.7914]}, {"w": "recall", "b": [0.2686, 0.7765, 0.3117, 0.7914]}, {"w": "is", "b": [0.3179, 0.7765, 0.3303, 0.7914]}, {"w": "the", "b": [0.3364, 0.7765, 0.362, 0.7914]}, {"w": "ratio", "b": [0.3682, 0.7765, 0.4061, 0.7914]}, {"w": "of", "b": [0.4123, 0.7765, 0.4271, 0.7914]}, {"w": "the", "b": [0.4333, 0.7765, 0.4589, 0.7914]}, {"w": "relevant", "b": [0.4651, 0.7765, 0.5286, 0.7914]}, {"w": "documents", "b": [0.5348, 0.7765, 0.6209, 0.7914]}, {"w": "returned", "b": [0.6271, 0.7765, 0.6958, 0.7914]}, {"w": "by", "b": [0.702, 0.7765, 0.7215, 0.7914]}, {"w": "the", "b": [0.7276, 0.7765, 0.7532, 0.7914]}, {"w": "search", "b": [0.7594, 0.7765, 0.8092, 0.7914]}, {"w": "engine,", "b": [0.8154, 0.7765, 0.8717, 0.7914]}, {"w": "compared", "b": [0.1312, 0.7944, 0.2092, 0.8094]}, {"w": "to", "b": [0.2154, 0.7944, 0.2318, 0.8094]}, {"w": "the", "b": [0.2379, 0.7944, 0.2636, 0.8094]}, {"w": "total", "b": [0.2697, 0.7944, 0.3076, 0.8094]}, {"w": "number", "b": [0.3138, 0.7944, 0.3749, 0.8094]}, {"w": "of", "b": [0.381, 0.7944, 0.3959, 0.8094]}, {"w": "the", "b": [0.402, 0.7944, 0.4277, 0.8094]}, {"w": "relevant", "b": [0.4338, 0.7944, 0.4975, 0.8094]}, {"w": "documents", "b": [0.5036, 0.7944, 0.5898, 0.8094]}, {"w": "that", "b": [0.596, 0.7944, 0.6298, 0.8094]}, {"w": "should", "b": [0.636, 0.7944, 0.6884, 0.8094]}, {"w": "have", "b": [0.6945, 0.7944, 0.731, 0.8094]}, {"w": "been", "b": [0.7371, 0.7944, 0.7745, 0.8094]}, {"w": "returned.", "b": [0.7807, 0.7944, 0.8546, 0.8094]}]}, {"id": "b_3", "type": "paragraph", "text": "The drawback of measuring the quality of ranking models with precision and recall is that these metrics treat all retrieved documents equally. A relevant document listed at position k is worth just as much as a relevant document at the top of the list. This is usually not what", "words": [{"w": "The", "b": [0.1306, 0.8213, 0.1628, 0.8363]}, {"w": "drawback", "b": [0.1689, 0.8213, 0.2463, 0.8363]}, {"w": "of", "b": [0.2525, 0.8213, 0.2676, 0.8363]}, {"w": "measuring", "b": [0.2737, 0.8213, 0.3569, 0.8363]}, {"w": "the", "b": [0.3631, 0.8213, 0.3891, 0.8363]}, {"w": "quality", "b": [0.3952, 0.8213, 0.4518, 0.8363]}, {"w": "of", "b": [0.458, 0.8213, 0.473, 0.8363]}, {"w": "ranking", "b": [0.4792, 0.8213, 0.541, 0.8363]}, {"w": "models", "b": [0.5472, 0.8213, 0.6039, 0.8363]}, {"w": "with", "b": [0.61, 0.8213, 0.6464, 0.8363]}, {"w": "precision", "b": [0.6525, 0.8213, 0.7244, 0.8363]}, {"w": "and", "b": [0.7305, 0.8213, 0.7606, 0.8363]}, {"w": "recall", "b": [0.7668, 0.8213, 0.8105, 0.8363]}, {"w": "is", "b": [0.8166, 0.8213, 0.8292, 0.8363]}, {"w": "that", "b": [0.8353, 0.8213, 0.8696, 0.8363]}, {"w": "these", "b": [0.1312, 0.8393, 0.1717, 0.8542]}, {"w": "metrics", "b": [0.1778, 0.8393, 0.2355, 0.8542]}, {"w": "treat", "b": [0.2416, 0.8393, 0.28, 0.8542]}, {"w": "all", "b": [0.2861, 0.8393, 0.3053, 0.8542]}, {"w": "retrieved", "b": [0.3115, 0.8393, 0.3811, 0.8542]}, {"w": "documents", "b": [0.3873, 0.8393, 0.4721, 0.8542]}, {"w": "equally.", "b": [0.4783, 0.8393, 0.5382, 0.8542]}, {"w": "A", "b": [0.5465, 0.8393, 0.5601, 0.8542]}, {"w": "relevant", "b": [0.5663, 0.8393, 0.6288, 0.8542]}, {"w": "document", "b": [0.635, 0.8393, 0.7126, 0.8542]}, {"w": "listed", "b": [0.7188, 0.8393, 0.7612, 0.8542]}, {"w": "at", "b": [0.7674, 0.8393, 0.7835, 0.8542]}, {"w": "position", "b": [0.7897, 0.8393, 0.8528, 0.8542]}, {"w": "k", "b": [0.8586, 0.8396, 0.8682, 0.8545]}, {"w": "is", "b": [0.1312, 0.8572, 0.1435, 0.8722]}, {"w": "worth", "b": [0.1496, 0.8572, 0.1956, 0.8722]}, {"w": "just", "b": [0.2018, 0.8572, 0.2317, 0.8722]}, {"w": "as", "b": [0.2379, 0.8572, 0.2541, 0.8722]}, {"w": "much", "b": [0.2603, 0.8572, 0.3027, 0.8722]}, {"w": "as", "b": [0.3089, 0.8572, 0.3251, 0.8722]}, {"w": "a", "b": [0.3313, 0.8572, 0.3404, 0.8722]}, {"w": "relevant", "b": [0.3465, 0.8572, 0.4092, 0.8722]}, {"w": "document", "b": [0.4154, 0.8572, 0.4932, 0.8722]}, {"w": "at", "b": [0.4994, 0.8572, 0.5156, 0.8722]}, {"w": "the", "b": [0.5217, 0.8572, 0.547, 0.8722]}, {"w": "top", "b": [0.5531, 0.8572, 0.5794, 0.8722]}, {"w": "of", "b": [0.5855, 0.8572, 0.6002, 0.8722]}, {"w": "the", "b": [0.6063, 0.8572, 0.6316, 0.8722]}, {"w": "list.", "b": [0.6377, 0.8572, 0.6672, 0.8722]}, {"w": "This", "b": [0.6754, 0.8572, 0.7109, 0.8722]}, {"w": "is", "b": [0.717, 0.8572, 0.7292, 0.8722]}, {"w": "usually", "b": [0.7354, 0.8572, 0.7916, 0.8722]}, {"w": "not", "b": [0.7977, 0.8572, 0.824, 0.8722]}, {"w": "what", "b": [0.8302, 0.8572, 0.8696, 0.8722]}]}, {"id": "b_4", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 21", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "21", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 160, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "we want in document retrieval. When a human looks at search results, the few top-most results matter more than the results shown at the bottom of the list.", "words": [{"w": "we", "b": [0.1306, 0.0881, 0.152, 0.1031]}, {"w": "want", "b": [0.1588, 0.0881, 0.1986, 0.1031]}, {"w": "in", "b": [0.2054, 0.0881, 0.2211, 0.1031]}, {"w": "document", "b": [0.2279, 0.0881, 0.3085, 0.1031]}, {"w": "retrieval.", "b": [0.3153, 0.0881, 0.3881, 0.1031]}, {"w": "When", "b": [0.3984, 0.0881, 0.447, 0.1031]}, {"w": "a", "b": [0.4538, 0.0881, 0.4632, 0.1031]}, {"w": "human", "b": [0.4701, 0.0881, 0.526, 0.1031]}, {"w": "looks", "b": [0.5328, 0.0881, 0.5748, 0.1031]}, {"w": "at", "b": [0.5816, 0.0881, 0.5983, 0.1031]}, {"w": "search", "b": [0.6052, 0.0881, 0.6561, 0.1031]}, {"w": "results,", "b": [0.6629, 0.0881, 0.7218, 0.1031]}, {"w": "the", "b": [0.7287, 0.0881, 0.7549, 0.1031]}, {"w": "few", "b": [0.7617, 0.0881, 0.7895, 0.1031]}, {"w": "top-most", "b": [0.7963, 0.0881, 0.8696, 0.1031]}, {"w": "results", "b": [0.1312, 0.106, 0.1838, 0.121]}, {"w": "matter", "b": [0.19, 0.106, 0.2443, 0.121]}, {"w": "more", "b": [0.2505, 0.106, 0.2905, 0.121]}, {"w": "than", "b": [0.2967, 0.106, 0.3336, 0.121]}, {"w": "the", "b": [0.3397, 0.106, 0.3654, 0.121]}, {"w": "results", "b": [0.3715, 0.106, 0.4241, 0.121]}, {"w": "shown", "b": [0.4303, 0.106, 0.4801, 0.121]}, {"w": "at", "b": [0.4863, 0.106, 0.5027, 0.121]}, {"w": "the", "b": [0.5088, 0.106, 0.5344, 0.121]}, {"w": "bottom", "b": [0.5406, 0.106, 0.5995, 0.121]}, {"w": "of", "b": [0.6057, 0.106, 0.6205, 0.121]}, {"w": "the", "b": [0.6267, 0.106, 0.6523, 0.121]}, {"w": "list.", "b": [0.6585, 0.106, 0.6883, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "Discounted cumulative gain (DCG) is a popular measure of ranking quality in search engines. DCG measures the usefulness, or gain, of a document based on its position in the result list. The gain is accumulated from the top of the result list to the bottom, with the gain of each result discounted at lower positions.", "words": [{"w": "Discounted", "b": [0.1312, 0.1333, 0.2346, 0.1482]}, {"w": "cumulative", "b": [0.2425, 0.1333, 0.3433, 0.1482]}, {"w": "gain", "b": [0.3512, 0.1333, 0.3898, 0.1482]}, {"w": "(DCG)", "b": [0.3968, 0.133, 0.4533, 0.1479]}, {"w": "is", "b": [0.4602, 0.133, 0.4729, 0.1479]}, {"w": "a", "b": [0.4798, 0.133, 0.4892, 0.1479]}, {"w": "popular", "b": [0.4961, 0.133, 0.5594, 0.1479]}, {"w": "measure", "b": [0.5663, 0.133, 0.6334, 0.1479]}, {"w": "of", "b": [0.6403, 0.133, 0.6555, 0.1479]}, {"w": "ranking", "b": [0.6624, 0.133, 0.7246, 0.1479]}, {"w": "quality", "b": [0.7316, 0.133, 0.7886, 0.1479]}, {"w": "in", "b": [0.7955, 0.133, 0.8112, 0.1479]}, {"w": "search", "b": [0.8181, 0.133, 0.869, 0.1479]}, {"w": "engines.", "b": [0.1312, 0.1509, 0.1956, 0.1659]}, {"w": "DCG", "b": [0.2038, 0.1509, 0.2457, 0.1659]}, {"w": "measures", "b": [0.2518, 0.1509, 0.3257, 0.1659]}, {"w": "the", "b": [0.3318, 0.1509, 0.3578, 0.1659]}, {"w": "usefulness,", "b": [0.3639, 0.1509, 0.4498, 0.1659]}, {"w": "or", "b": [0.4559, 0.1509, 0.4725, 0.1659]}, {"w": "gain,", "b": [0.4787, 0.1509, 0.5181, 0.1659]}, {"w": "of", "b": [0.5242, 0.1509, 0.5392, 0.1659]}, {"w": "a", "b": [0.5454, 0.1509, 0.5547, 0.1659]}, {"w": "document", "b": [0.5608, 0.1509, 0.6407, 0.1659]}, {"w": "based", "b": [0.6468, 0.1509, 0.6925, 0.1659]}, {"w": "on", "b": [0.6987, 0.1509, 0.7184, 0.1659]}, {"w": "its", "b": [0.7245, 0.1509, 0.7443, 0.1659]}, {"w": "position", "b": [0.7505, 0.1509, 0.8153, 0.1659]}, {"w": "in", "b": [0.8215, 0.1509, 0.837, 0.1659]}, {"w": "the", "b": [0.8432, 0.1509, 0.8691, 0.1659]}, {"w": "result", "b": [0.1312, 0.1689, 0.1772, 0.1838]}, {"w": "list.", "b": [0.1833, 0.1689, 0.2136, 0.1838]}, {"w": "The", "b": [0.2218, 0.1689, 0.2541, 0.1838]}, {"w": "gain", "b": [0.2602, 0.1689, 0.2946, 0.1838]}, {"w": "is", "b": [0.3007, 0.1689, 0.3133, 0.1838]}, {"w": "accumulated", "b": [0.3194, 0.1689, 0.422, 0.1838]}, {"w": "from", "b": [0.4281, 0.1689, 0.4661, 0.1838]}, {"w": "the", "b": [0.4723, 0.1689, 0.4983, 0.1838]}, {"w": "top", "b": [0.5045, 0.1689, 0.5315, 0.1838]}, {"w": "of", "b": [0.5377, 0.1689, 0.5528, 0.1838]}, {"w": "the", "b": [0.5589, 0.1689, 0.5849, 0.1838]}, {"w": "result", "b": [0.5911, 0.1689, 0.637, 0.1838]}, {"w": "list", "b": [0.6432, 0.1689, 0.6683, 0.1838]}, {"w": "to", "b": [0.6744, 0.1689, 0.691, 0.1838]}, {"w": "the", "b": [0.6972, 0.1689, 0.7232, 0.1838]}, {"w": "bottom,", "b": [0.7293, 0.1689, 0.7944, 0.1838]}, {"w": "with", "b": [0.8005, 0.1689, 0.8369, 0.1838]}, {"w": "the", "b": [0.8431, 0.1689, 0.8691, 0.1838]}, {"w": "gain", "b": [0.1312, 0.1868, 0.1651, 0.2018]}, {"w": "of", "b": [0.1712, 0.1868, 0.1861, 0.2018]}, {"w": "each", "b": [0.1922, 0.1868, 0.2276, 0.2018]}, {"w": "result", "b": [0.2338, 0.1868, 0.2791, 0.2018]}, {"w": "discounted", "b": [0.2852, 0.1868, 0.371, 0.2018]}, {"w": "at", "b": [0.3771, 0.1868, 0.3935, 0.2018]}, {"w": "lower", "b": [0.3997, 0.1868, 0.4418, 0.2018]}, {"w": "positions.", "b": [0.4479, 0.1868, 0.5245, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "To understand discounted cumulative gain, we introduce a measure called cumulative gain.", "words": [{"w": "To", "b": [0.1306, 0.2137, 0.1516, 0.2287]}, {"w": "understand", "b": [0.1577, 0.2137, 0.2481, 0.2287]}, {"w": "discounted", "b": [0.2543, 0.2137, 0.34, 0.2287]}, {"w": "cumulative", "b": [0.3462, 0.2137, 0.4339, 0.2287]}, {"w": "gain,", "b": [0.44, 0.2137, 0.479, 0.2287]}, {"w": "we", "b": [0.4851, 0.2137, 0.5061, 0.2287]}, {"w": "introduce", "b": [0.5123, 0.2137, 0.5882, 0.2287]}, {"w": "a", "b": [0.5944, 0.2137, 0.6036, 0.2287]}, {"w": "measure", "b": [0.6098, 0.2137, 0.6756, 0.2287]}, {"w": "called", "b": [0.6817, 0.2137, 0.7279, 0.2287]}, {"w": "cumulative", "b": [0.734, 0.2137, 0.8217, 0.2287]}, {"w": "gain.", "b": [0.8278, 0.2137, 0.8668, 0.2287]}]}, {"id": "b_3", "type": "paragraph", "text": "Cumulative gain (CG) is the sum of the graded relevance values of all results in a search result list. The CG at a particular rank position p is defined as:", "words": [{"w": "Cumulative", "b": [0.1312, 0.241, 0.2379, 0.2559]}, {"w": "gain", "b": [0.245, 0.241, 0.2836, 0.2559]}, {"w": "(CG)", "b": [0.2898, 0.2406, 0.332, 0.2556]}, {"w": "is", "b": [0.3382, 0.2406, 0.3506, 0.2556]}, {"w": "the", "b": [0.3568, 0.2406, 0.3825, 0.2556]}, {"w": "sum", "b": [0.3887, 0.2406, 0.4216, 0.2556]}, {"w": "of", "b": [0.4278, 0.2406, 0.4427, 0.2556]}, {"w": "the", "b": [0.4489, 0.2406, 0.4746, 0.2556]}, {"w": "graded", "b": [0.4807, 0.2406, 0.5353, 0.2556]}, {"w": "relevance", "b": [0.5415, 0.2406, 0.6151, 0.2556]}, {"w": "values", "b": [0.6212, 0.2406, 0.6702, 0.2556]}, {"w": "of", "b": [0.6764, 0.2406, 0.6913, 0.2556]}, {"w": "all", "b": [0.6974, 0.2406, 0.717, 0.2556]}, {"w": "results", "b": [0.7231, 0.2406, 0.7759, 0.2556]}, {"w": "in", "b": [0.782, 0.2406, 0.7975, 0.2556]}, {"w": "a", "b": [0.8036, 0.2406, 0.8129, 0.2556]}, {"w": "search", "b": [0.819, 0.2406, 0.8691, 0.2556]}, {"w": "result", "b": [0.1312, 0.2586, 0.1765, 0.2735]}, {"w": "list.", "b": [0.1827, 0.2586, 0.2125, 0.2735]}, {"w": "The", "b": [0.2207, 0.2586, 0.2525, 0.2735]}, {"w": "CG", "b": [0.2586, 0.2586, 0.2864, 0.2735]}, {"w": "at", "b": [0.2925, 0.2586, 0.3089, 0.2735]}, {"w": "a", "b": [0.3151, 0.2586, 0.3243, 0.2735]}, {"w": "particular", "b": [0.3305, 0.2586, 0.4095, 0.2735]}, {"w": "rank", "b": [0.4157, 0.2586, 0.4521, 0.2735]}, {"w": "position", "b": [0.4583, 0.2586, 0.5225, 0.2735]}, {"w": "p", "b": [0.5285, 0.2589, 0.5378, 0.2738]}, {"w": "is", "b": [0.544, 0.2586, 0.5564, 0.2735]}, {"w": "defined", "b": [0.5625, 0.2586, 0.62, 0.2735]}, {"w": "as:", "b": [0.6261, 0.2586, 0.6478, 0.2735]}]}, {"id": "b_4", "type": "paragraph", "text": "CGp", "words": [{"w": "CGp", "b": [0.4351, 0.3124, 0.4705, 0.3289]}]}, {"id": "b_5", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.4766, 0.3075, 0.4958, 0.318]}, {"w": "=", "b": [0.479, 0.3124, 0.4934, 0.3274]}]}, {"id": "b_6", "type": "paragraph", "text": "p X", "words": [{"w": "p", "b": [0.5105, 0.2968, 0.5181, 0.3073]}, {"w": "X", "b": [0.501, 0.3092, 0.5276, 0.3242]}]}, {"id": "b_7", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.5023, 0.3338, 0.5262, 0.3443]}]}, {"id": "b_8", "type": "paragraph", "text": "reli,", "words": [{"w": "reli,", "b": [0.5307, 0.3127, 0.5649, 0.3289]}]}, {"id": "b_9", "type": "paragraph", "text": "where reli is the graded relevance of the result at position i. Generally, graded relevance reflects the relevance of a document to a query on a scale using numbers, letters, or descriptions (such as “not relevant,” “somewhat relevant,” “relevant,” or “very relevant”). To use it in the", "words": [{"w": "where", "b": [0.1306, 0.3614, 0.1787, 0.3763]}, {"w": "reli", "b": [0.1854, 0.3617, 0.2136, 0.3779]}, {"w": "is", "b": [0.2213, 0.3614, 0.2339, 0.3763]}, {"w": "the", "b": [0.2407, 0.3614, 0.2668, 0.3763]}, {"w": "graded", "b": [0.2735, 0.3614, 0.329, 0.3763]}, {"w": "relevance", "b": [0.3358, 0.3614, 0.4106, 0.3763]}, {"w": "of", "b": [0.4174, 0.3614, 0.4325, 0.3763]}, {"w": "the", "b": [0.4393, 0.3614, 0.4654, 0.3763]}, {"w": "result", "b": [0.4722, 0.3614, 0.5184, 0.3763]}, {"w": "at", "b": [0.5251, 0.3614, 0.5418, 0.3763]}, {"w": "position", "b": [0.5486, 0.3614, 0.614, 0.3763]}, {"w": "i.", "b": [0.6205, 0.3614, 0.6321, 0.3766]}, {"w": "Generally,", "b": [0.6421, 0.3614, 0.7249, 0.3763]}, {"w": "graded", "b": [0.7318, 0.3614, 0.7873, 0.3763]}, {"w": "relevance", "b": [0.794, 0.3614, 0.8689, 0.3763]}, {"w": "reflects", "b": [0.1312, 0.3793, 0.1867, 0.3943]}, {"w": "the", "b": [0.1911, 0.3793, 0.2163, 0.3943]}, {"w": "relevance", "b": [0.2207, 0.3793, 0.2926, 0.3943]}, {"w": "of", "b": [0.2971, 0.3793, 0.3117, 0.3943]}, {"w": "a", "b": [0.3161, 0.3793, 0.3252, 0.3943]}, {"w": "document", "b": [0.3296, 0.3793, 0.407, 0.3943]}, {"w": "to", "b": [0.4115, 0.3793, 0.4276, 0.3943]}, {"w": "a", "b": [0.432, 0.3793, 0.4411, 0.3943]}, {"w": "query", "b": [0.4455, 0.3793, 0.4898, 0.3943]}, {"w": "on", "b": [0.4942, 0.3793, 0.5133, 0.3943]}, {"w": "a", "b": [0.5178, 0.3793, 0.5268, 0.3943]}, {"w": "scale", "b": [0.5313, 0.3793, 0.5686, 0.3943]}, {"w": "using", "b": [0.5731, 0.3793, 0.6144, 0.3943]}, {"w": "numbers,", "b": [0.6188, 0.3793, 0.6908, 0.3943]}, {"w": "letters,", "b": [0.6956, 0.3793, 0.7501, 0.3943]}, {"w": "or", "b": [0.7549, 0.3793, 0.771, 0.3943]}, {"w": "descriptions", "b": [0.7755, 0.3793, 0.8692, 0.3943]}, {"w": "(such", "b": [0.1291, 0.3973, 0.1709, 0.4122]}, {"w": "as", "b": [0.1768, 0.3973, 0.193, 0.4122]}, {"w": "“not", "b": [0.1988, 0.3973, 0.2335, 0.4122]}, {"w": "relevant,”", "b": [0.2394, 0.3973, 0.3153, 0.4122]}, {"w": "“somewhat", "b": [0.3212, 0.3973, 0.4082, 0.4122]}, {"w": "relevant,”", "b": [0.4141, 0.3973, 0.49, 0.4122]}, {"w": "“relevant,”", "b": [0.4959, 0.3973, 0.5804, 0.4122]}, {"w": "or", "b": [0.5863, 0.3973, 0.6024, 0.4122]}, {"w": "“very", "b": [0.6083, 0.3973, 0.6506, 0.4122]}, {"w": "relevant”).", "b": [0.6564, 0.3973, 0.7394, 0.4122]}, {"w": "To", "b": [0.7475, 0.3973, 0.7681, 0.4122]}, {"w": "use", "b": [0.7739, 0.3973, 0.7992, 0.4122]}, {"w": "it", "b": [0.8051, 0.3973, 0.8171, 0.4122]}, {"w": "in", "b": [0.823, 0.3973, 0.8381, 0.4122]}, {"w": "the", "b": [0.844, 0.3973, 0.8691, 0.4122]}]}, {"id": "b_10", "type": "paragraph", "text": "above formula, reli must be numeric, for example, ranging from 0 (the document at position i is entirely irrelevant to the query) to 1 (the document at position i is maximally relevant to the query). Alternatively, reli can be binary: 0 when the document is not relevant to the query, and 1 when relevant. Notice that CGp is independent of the position each document holds in the ranked result list. It only characterizes the documents ranked up to position p as relevant or irrelevant to the query.", "words": [{"w": "above", "b": [0.1312, 0.4152, 0.1766, 0.4302]}, {"w": "formula,", "b": [0.1827, 0.4152, 0.2483, 0.4302]}, {"w": "reli", "b": [0.2544, 0.4155, 0.2825, 0.4317]}, {"w": "must", "b": [0.2896, 0.4152, 0.3285, 0.4302]}, {"w": "be", "b": [0.3346, 0.4152, 0.3533, 0.4302]}, {"w": "numeric,", "b": [0.3594, 0.4152, 0.4275, 0.4302]}, {"w": "for", "b": [0.4336, 0.4152, 0.4553, 0.4302]}, {"w": "example,", "b": [0.4615, 0.4152, 0.5315, 0.4302]}, {"w": "ranging", "b": [0.5377, 0.4152, 0.5972, 0.4302]}, {"w": "from", "b": [0.6033, 0.4152, 0.6402, 0.4302]}, {"w": "0", "b": [0.6461, 0.4152, 0.6552, 0.4302]}, {"w": "(the", "b": [0.6613, 0.4152, 0.6936, 0.4302]}, {"w": "document", "b": [0.6997, 0.4152, 0.7774, 0.4302]}, {"w": "at", "b": [0.7835, 0.4152, 0.7996, 0.4302]}, {"w": "position", "b": [0.8057, 0.4152, 0.8689, 0.4302]}, {"w": "i", "b": [0.1312, 0.4334, 0.1376, 0.4484]}, {"w": "is", "b": [0.1435, 0.4332, 0.1556, 0.4481]}, {"w": "entirely", "b": [0.1615, 0.4332, 0.2209, 0.4481]}, {"w": "irrelevant", "b": [0.2268, 0.4332, 0.3012, 0.4481]}, {"w": "to", "b": [0.3071, 0.4332, 0.3232, 0.4481]}, {"w": "the", "b": [0.3291, 0.4332, 0.3542, 0.4481]}, {"w": "query)", "b": [0.3601, 0.4332, 0.4114, 0.4481]}, {"w": "to", "b": [0.4173, 0.4332, 0.4333, 0.4481]}, {"w": "1", "b": [0.4391, 0.4332, 0.4481, 0.4481]}, {"w": "(the", "b": [0.454, 0.4332, 0.4862, 0.4481]}, {"w": "document", "b": [0.492, 0.4332, 0.5694, 0.4481]}, {"w": "at", "b": [0.5753, 0.4332, 0.5914, 0.4481]}, {"w": "position", "b": [0.5973, 0.4332, 0.6602, 0.4481]}, {"w": "i", "b": [0.666, 0.4334, 0.6723, 0.4484]}, {"w": "is", "b": [0.6782, 0.4332, 0.6904, 0.4481]}, {"w": "maximally", "b": [0.6963, 0.4332, 0.7786, 0.4481]}, {"w": "relevant", "b": [0.7845, 0.4332, 0.8469, 0.4481]}, {"w": "to", "b": [0.8528, 0.4332, 0.8688, 0.4481]}, {"w": "the", "b": [0.1312, 0.4511, 0.1574, 0.4661]}, {"w": "query).", "b": [0.1638, 0.4511, 0.2224, 0.4661]}, {"w": "Alternatively,", "b": [0.2312, 0.4511, 0.3427, 0.4661]}, {"w": "reli", "b": [0.349, 0.4514, 0.3771, 0.4676]}, {"w": "can", "b": [0.3844, 0.4511, 0.4127, 0.4661]}, {"w": "be", "b": [0.419, 0.4511, 0.4384, 0.4661]}, {"w": "binary:", "b": [0.4447, 0.4511, 0.5029, 0.4661]}, {"w": "0", "b": [0.5114, 0.4511, 0.5208, 0.4661]}, {"w": "when", "b": [0.5272, 0.4511, 0.57, 0.4661]}, {"w": "the", "b": [0.5764, 0.4511, 0.6026, 0.4661]}, {"w": "document", "b": [0.6089, 0.4511, 0.6894, 0.4661]}, {"w": "is", "b": [0.6958, 0.4511, 0.7085, 0.4661]}, {"w": "not", "b": [0.7148, 0.4511, 0.742, 0.4661]}, {"w": "relevant", "b": [0.7484, 0.4511, 0.8133, 0.4661]}, {"w": "to", "b": [0.8197, 0.4511, 0.8364, 0.4661]}, {"w": "the", "b": [0.8428, 0.4511, 0.8689, 0.4661]}, {"w": "query,", "b": [0.1312, 0.4691, 0.18, 0.484]}, {"w": "and", "b": [0.1861, 0.4691, 0.2159, 0.484]}, {"w": "1", "b": [0.222, 0.4691, 0.2312, 0.484]}, {"w": "when", "b": [0.2373, 0.4691, 0.2794, 0.484]}, {"w": "relevant.", "b": [0.2855, 0.4691, 0.3543, 0.484]}, {"w": "Notice", "b": [0.3625, 0.4691, 0.4143, 0.484]}, {"w": "that", "b": [0.4204, 0.4691, 0.4542, 0.484]}, {"w": "CGp", "b": [0.4603, 0.4691, 0.4957, 0.4856]}, {"w": "is", "b": [0.5027, 0.4691, 0.5151, 0.484]}, {"w": "independent", "b": [0.5213, 0.4691, 0.6197, 0.484]}, {"w": "of", "b": [0.6259, 0.4691, 0.6408, 0.484]}, {"w": "the", "b": [0.6469, 0.4691, 0.6725, 0.484]}, {"w": "position", "b": [0.6787, 0.4691, 0.7429, 0.484]}, {"w": "each", "b": [0.749, 0.4691, 0.7844, 0.484]}, {"w": "document", "b": [0.7905, 0.4691, 0.8695, 0.484]}, {"w": "holds", "b": [0.1312, 0.487, 0.1736, 0.502]}, {"w": "in", "b": [0.1797, 0.487, 0.1952, 0.502]}, {"w": "the", "b": [0.2013, 0.487, 0.2271, 0.502]}, {"w": "ranked", "b": [0.2332, 0.487, 0.2879, 0.502]}, {"w": "result", "b": [0.294, 0.487, 0.3395, 0.502]}, {"w": "list.", "b": [0.3457, 0.487, 0.3756, 0.502]}, {"w": "It", "b": [0.3839, 0.487, 0.3977, 0.502]}, {"w": "only", "b": [0.4039, 0.487, 0.4384, 0.502]}, {"w": "characterizes", "b": [0.4446, 0.487, 0.5483, 0.502]}, {"w": "the", "b": [0.5544, 0.487, 0.5802, 0.502]}, {"w": "documents", "b": [0.5863, 0.487, 0.6729, 0.502]}, {"w": "ranked", "b": [0.6791, 0.487, 0.7337, 0.502]}, {"w": "up", "b": [0.7399, 0.487, 0.7605, 0.502]}, {"w": "to", "b": [0.7666, 0.487, 0.7831, 0.502]}, {"w": "position", "b": [0.7893, 0.487, 0.8537, 0.502]}, {"w": "p", "b": [0.8595, 0.4873, 0.8688, 0.5022]}, {"w": "as", "b": [0.1312, 0.505, 0.1477, 0.5199]}, {"w": "relevant", "b": [0.1539, 0.505, 0.2175, 0.5199]}, {"w": "or", "b": [0.2237, 0.505, 0.2401, 0.5199]}, {"w": "irrelevant", "b": [0.2463, 0.505, 0.3223, 0.5199]}, {"w": "to", "b": [0.3284, 0.505, 0.3448, 0.5199]}, {"w": "the", "b": [0.351, 0.505, 0.3766, 0.5199]}, {"w": "query.", "b": [0.3828, 0.505, 0.4316, 0.5199]}]}, {"id": "b_11", "type": "paragraph", "text": "Discounted cumulative gain is based on two assumptions:", "words": [{"w": "Discounted", "b": [0.1312, 0.5319, 0.2208, 0.5468]}, {"w": "cumulative", "b": [0.227, 0.5319, 0.3147, 0.5468]}, {"w": "gain", "b": [0.3208, 0.5319, 0.3546, 0.5468]}, {"w": "is", "b": [0.3608, 0.5319, 0.3732, 0.5468]}, {"w": "based", "b": [0.3793, 0.5319, 0.4246, 0.5468]}, {"w": "on", "b": [0.4307, 0.5319, 0.4502, 0.5468]}, {"w": "two", "b": [0.4564, 0.5319, 0.4851, 0.5468]}, {"w": "assumptions:", "b": [0.4912, 0.5319, 0.5951, 0.5468]}]}, {"id": "b_12", "type": "paragraph", "text": "1. Highly relevant documents are more useful when appearing earlier in the result list. 2. Highly relevant documents are more useful than marginally relevant documents, while the latter, in turn, are more useful than non-relevant documents.", "words": [{"w": "1.", "b": [0.1538, 0.5588, 0.1681, 0.5738]}, {"w": "Highly", "b": [0.1774, 0.5588, 0.2307, 0.5738]}, {"w": "relevant", "b": [0.2368, 0.5588, 0.3005, 0.5738]}, {"w": "documents", "b": [0.3066, 0.5588, 0.3929, 0.5738]}, {"w": "are", "b": [0.399, 0.5588, 0.4237, 0.5738]}, {"w": "more", "b": [0.4298, 0.5588, 0.4699, 0.5738]}, {"w": "useful", "b": [0.476, 0.5588, 0.5228, 0.5738]}, {"w": "when", "b": [0.5289, 0.5588, 0.571, 0.5738]}, {"w": "appearing", "b": [0.5771, 0.5588, 0.6567, 0.5738]}, {"w": "earlier", "b": [0.6628, 0.5588, 0.7132, 0.5738]}, {"w": "in", "b": [0.7193, 0.5588, 0.7347, 0.5738]}, {"w": "the", "b": [0.7409, 0.5588, 0.7665, 0.5738]}, {"w": "result", "b": [0.7726, 0.5588, 0.8179, 0.5738]}, {"w": "list.", "b": [0.8241, 0.5588, 0.8539, 0.5738]}, {"w": "2.", "b": [0.1538, 0.5767, 0.1681, 0.5917]}, {"w": "Highly", "b": [0.1774, 0.5767, 0.2304, 0.5917]}, {"w": "relevant", "b": [0.2365, 0.5767, 0.2997, 0.5917]}, {"w": "documents", "b": [0.3059, 0.5767, 0.3916, 0.5917]}, {"w": "are", "b": [0.3977, 0.5767, 0.4222, 0.5917]}, {"w": "more", "b": [0.4283, 0.5767, 0.4681, 0.5917]}, {"w": "useful", "b": [0.4743, 0.5767, 0.5208, 0.5917]}, {"w": "than", "b": [0.5269, 0.5767, 0.5636, 0.5917]}, {"w": "marginally", "b": [0.5697, 0.5767, 0.6548, 0.5917]}, {"w": "relevant", "b": [0.661, 0.5767, 0.7242, 0.5917]}, {"w": "documents,", "b": [0.7303, 0.5767, 0.8212, 0.5917]}, {"w": "while", "b": [0.8273, 0.5767, 0.8691, 0.5917]}, {"w": "the", "b": [0.1774, 0.5947, 0.203, 0.6096]}, {"w": "latter,", "b": [0.2091, 0.5947, 0.2584, 0.6096]}, {"w": "in", "b": [0.2646, 0.5947, 0.28, 0.6096]}, {"w": "turn,", "b": [0.2861, 0.5947, 0.3262, 0.6096]}, {"w": "are", "b": [0.3323, 0.5947, 0.357, 0.6096]}, {"w": "more", "b": [0.3631, 0.5947, 0.4032, 0.6096]}, {"w": "useful", "b": [0.4093, 0.5947, 0.4561, 0.6096]}, {"w": "than", "b": [0.4622, 0.5947, 0.4991, 0.6096]}, {"w": "non-relevant", "b": [0.5053, 0.5947, 0.6048, 0.6096]}, {"w": "documents.", "b": [0.611, 0.5947, 0.7023, 0.6096]}]}, {"id": "b_13", "type": "paragraph", "text": "For a given search result, DCG accumulated at a particular rank position p is often defined as:", "words": [{"w": "For", "b": [0.1312, 0.6216, 0.1576, 0.6366]}, {"w": "a", "b": [0.1629, 0.6216, 0.172, 0.6366]}, {"w": "given", "b": [0.1772, 0.6216, 0.2184, 0.6366]}, {"w": "search", "b": [0.2237, 0.6216, 0.2726, 0.6366]}, {"w": "result,", "b": [0.2779, 0.6216, 0.3273, 0.6366]}, {"w": "DCG", "b": [0.3327, 0.6216, 0.3746, 0.6366]}, {"w": "accumulated", "b": [0.3798, 0.6216, 0.4788, 0.6366]}, {"w": "at", "b": [0.4841, 0.6216, 0.5002, 0.6366]}, {"w": "a", "b": [0.5055, 0.6216, 0.5145, 0.6366]}, {"w": "particular", "b": [0.5198, 0.6216, 0.5973, 0.6366]}, {"w": "rank", "b": [0.6026, 0.6216, 0.6383, 0.6366]}, {"w": "position", "b": [0.6436, 0.6216, 0.7065, 0.6366]}, {"w": "p", "b": [0.7116, 0.6219, 0.7209, 0.6368]}, {"w": "is", "b": [0.7262, 0.6216, 0.7384, 0.6366]}, {"w": "often", "b": [0.7436, 0.6216, 0.7834, 0.6366]}, {"w": "defined", "b": [0.7886, 0.6216, 0.8449, 0.6366]}, {"w": "as:", "b": [0.8502, 0.6216, 0.8714, 0.6366]}]}, {"id": "b_14", "type": "paragraph", "text": "DCGp", "words": [{"w": "DCGp", "b": [0.2996, 0.6754, 0.3491, 0.6919]}]}, {"id": "b_15", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.3551, 0.6705, 0.3744, 0.681]}, {"w": "=", "b": [0.3576, 0.6754, 0.3719, 0.6904]}]}, {"id": "b_16", "type": "paragraph", "text": "p X", "words": [{"w": "p", "b": [0.389, 0.6598, 0.3966, 0.6703]}, {"w": "X", "b": [0.3795, 0.6723, 0.4062, 0.6872]}]}, {"id": "b_17", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.3809, 0.6969, 0.4048, 0.7073]}]}, {"id": "b_18", "type": "equation", "text": "reli log2(i + 1) = rel1 +", "words": [{"w": "reli", "b": [0.4392, 0.6656, 0.4674, 0.6818]}, {"w": "log2(i", "b": [0.4115, 0.6857, 0.4571, 0.7036]}, {"w": "+", "b": [0.4612, 0.6857, 0.4755, 0.7006]}, {"w": "1)", "b": [0.4796, 0.6857, 0.496, 0.7006]}, {"w": "=", "b": [0.5034, 0.6754, 0.5177, 0.6904]}, {"w": "rel1", "b": [0.5228, 0.6757, 0.5531, 0.6919]}, {"w": "+", "b": [0.5581, 0.6754, 0.5725, 0.6904]}]}, {"id": "b_19", "type": "paragraph", "text": "p X", "words": [{"w": "p", "b": [0.5861, 0.6598, 0.5937, 0.6703]}, {"w": "X", "b": [0.5766, 0.6723, 0.6033, 0.6872]}]}, {"id": "b_20", "type": "equation", "text": "i=2", "words": [{"w": "i=2", "b": [0.578, 0.6969, 0.6019, 0.7073]}]}, {"id": "b_21", "type": "equation", "text": "reli log2(i + 1).", "words": [{"w": "reli", "b": [0.6363, 0.6656, 0.6644, 0.6818]}, {"w": "log2(i", "b": [0.6085, 0.6857, 0.6542, 0.7036]}, {"w": "+", "b": [0.6582, 0.6857, 0.6726, 0.7006]}, {"w": "1).", "b": [0.6767, 0.6757, 0.7004, 0.7006]}]}, {"id": "b_22", "type": "paragraph", "text": "An alternative formulation of DCG, commonly used in industry and data science competitions such as Kaggle, places a stronger emphasis on retrieving relevant documents:", "words": [{"w": "An", "b": [0.1305, 0.7243, 0.1541, 0.7393]}, {"w": "alternative", "b": [0.1592, 0.7243, 0.2436, 0.7393]}, {"w": "formulation", "b": [0.2487, 0.7243, 0.3401, 0.7393]}, {"w": "of", "b": [0.3451, 0.7243, 0.3597, 0.7393]}, {"w": "DCG,", "b": [0.3646, 0.7243, 0.4116, 0.7393]}, {"w": "commonly", "b": [0.4168, 0.7243, 0.4977, 0.7393]}, {"w": "used", "b": [0.5027, 0.7243, 0.538, 0.7393]}, {"w": "in", "b": [0.543, 0.7243, 0.5581, 0.7393]}, {"w": "industry", "b": [0.5631, 0.7243, 0.6291, 0.7393]}, {"w": "and", "b": [0.6341, 0.7243, 0.6633, 0.7393]}, {"w": "data", "b": [0.6683, 0.7243, 0.7035, 0.7393]}, {"w": "science", "b": [0.7085, 0.7243, 0.7629, 0.7393]}, {"w": "competitions", "b": [0.7679, 0.7243, 0.869, 0.7393]}, {"w": "such", "b": [0.1312, 0.7423, 0.1667, 0.7572]}, {"w": "as", "b": [0.1729, 0.7423, 0.1894, 0.7572]}, {"w": "Kaggle,", "b": [0.1955, 0.7423, 0.256, 0.7572]}, {"w": "places", "b": [0.2622, 0.7423, 0.3105, 0.7572]}, {"w": "a", "b": [0.3166, 0.7423, 0.3259, 0.7572]}, {"w": "stronger", "b": [0.332, 0.7423, 0.3979, 0.7572]}, {"w": "emphasis", "b": [0.404, 0.7423, 0.477, 0.7572]}, {"w": "on", "b": [0.4832, 0.7423, 0.5027, 0.7572]}, {"w": "retrieving", "b": [0.5088, 0.7423, 0.5864, 0.7572]}, {"w": "relevant", "b": [0.5925, 0.7423, 0.6561, 0.7572]}, {"w": "documents:", "b": [0.6623, 0.7423, 0.7537, 0.7572]}]}, {"id": "b_23", "type": "paragraph", "text": "DCGp", "words": [{"w": "DCGp", "b": [0.3981, 0.7961, 0.4476, 0.8126]}]}, {"id": "b_24", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.4536, 0.7912, 0.4729, 0.8017]}, {"w": "=", "b": [0.4561, 0.7961, 0.4705, 0.811]}]}, {"id": "b_25", "type": "paragraph", "text": "p X", "words": [{"w": "p", "b": [0.4876, 0.7805, 0.4952, 0.7909]}, {"w": "X", "b": [0.4781, 0.7929, 0.5047, 0.8079]}]}, {"id": "b_26", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.4794, 0.8175, 0.5033, 0.828]}]}, {"id": "b_27", "type": "equation", "text": "2reli −1 log2(i + 1).", "words": [{"w": "2reli", "b": [0.5189, 0.7843, 0.552, 0.8009]}, {"w": "−1", "b": [0.5579, 0.786, 0.5856, 0.801]}, {"w": "log2(i", "b": [0.51, 0.8063, 0.5556, 0.8243]}, {"w": "+", "b": [0.5597, 0.8063, 0.5741, 0.8213]}, {"w": "1).", "b": [0.5782, 0.7964, 0.6019, 0.8213]}]}, {"id": "b_28", "type": "paragraph", "text": "For a query, the normalized discounted cumulative gain (nDCG), is defined as:", "words": [{"w": "For", "b": [0.1312, 0.8459, 0.1582, 0.8608]}, {"w": "a", "b": [0.1643, 0.8459, 0.1736, 0.8608]}, {"w": "query,", "b": [0.1797, 0.8459, 0.2285, 0.8608]}, {"w": "the", "b": [0.2346, 0.8459, 0.2603, 0.8608]}, {"w": "normalized", "b": [0.2664, 0.8462, 0.3683, 0.8611]}, {"w": "discounted", "b": [0.3753, 0.8462, 0.4742, 0.8611]}, {"w": "cumulative", "b": [0.4813, 0.8462, 0.582, 0.8611]}, {"w": "gain", "b": [0.5891, 0.8462, 0.6277, 0.8611]}, {"w": "(nDCG),", "b": [0.6339, 0.8459, 0.7055, 0.8608]}, {"w": "is", "b": [0.7117, 0.8459, 0.7241, 0.8608]}, {"w": "defined", "b": [0.7302, 0.8459, 0.7877, 0.8608]}, {"w": "as:", "b": [0.7938, 0.8459, 0.8155, 0.8608]}]}, {"id": "b_29", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 22", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "22", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 161, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "nDCGp", "words": [{"w": "nDCGp", "b": [0.4216, 0.11, 0.4813, 0.1265]}]}, {"id": "b_1", "type": "equation", "text": "def = DCGp", "words": [{"w": "def", "b": [0.4874, 0.1051, 0.5067, 0.1156]}, {"w": "=", "b": [0.4898, 0.11, 0.5042, 0.125]}, {"w": "DCGp", "b": [0.5173, 0.0999, 0.5668, 0.1164]}]}, {"id": "b_2", "type": "paragraph", "text": "IDCGp", "words": [{"w": "IDCGp", "b": [0.514, 0.1203, 0.5702, 0.1368]}]}, {"id": "b_4", "type": "paragraph", "text": "where IDCG is the ideal discounted cumulative gain,", "words": [{"w": "where", "b": [0.1306, 0.1453, 0.1778, 0.1603]}, {"w": "IDCG", "b": [0.1839, 0.1453, 0.2325, 0.1603]}, {"w": "is", "b": [0.2386, 0.1453, 0.251, 0.1603]}, {"w": "the", "b": [0.2572, 0.1453, 0.2828, 0.1603]}, {"w": "ideal", "b": [0.289, 0.1453, 0.3269, 0.1603]}, {"w": "discounted", "b": [0.3331, 0.1453, 0.4188, 0.1603]}, {"w": "cumulative", "b": [0.425, 0.1453, 0.5127, 0.1603]}, {"w": "gain,", "b": [0.5188, 0.1453, 0.5578, 0.1603]}]}, {"id": "b_5", "type": "paragraph", "text": "IDCGp", "words": [{"w": "IDCGp", "b": [0.3847, 0.2034, 0.4414, 0.2199]}]}, {"id": "b_6", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.4474, 0.1985, 0.4667, 0.209]}, {"w": "=", "b": [0.4499, 0.2034, 0.4643, 0.2184]}]}, {"id": "b_7", "type": "paragraph", "text": "|RELp| X", "words": [{"w": "|RELp|", "b": [0.4719, 0.1867, 0.5181, 0.1982]}, {"w": "X", "b": [0.4817, 0.2002, 0.5083, 0.2152]}]}, {"id": "b_8", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.483, 0.2248, 0.5069, 0.2353]}]}, {"id": "b_9", "type": "equation", "text": "2reli −1 log2(i + 1),", "words": [{"w": "2reli", "b": [0.5323, 0.1916, 0.5654, 0.2082]}, {"w": "−1", "b": [0.5714, 0.1933, 0.599, 0.2083]}, {"w": "log2(i", "b": [0.5234, 0.2137, 0.569, 0.2316]}, {"w": "+", "b": [0.5731, 0.2137, 0.5875, 0.2286]}, {"w": "1),", "b": [0.5916, 0.2037, 0.6153, 0.2286]}]}, {"id": "b_10", "type": "paragraph", "text": "and RELp represents the list of the documents relevant to the query in the corpus up to position p (ordered by their relevance). So, RELp is the ideal ranking, up to position p, that the search engine ranking algorithm (or model) should have returned for the query. The nDCG values for all queries are usually averaged to obtain a performance measure for a search engine ranking algorithm or model.", "words": [{"w": "and", "b": [0.1312, 0.2523, 0.1616, 0.2672]}, {"w": "RELp", "b": [0.1685, 0.2523, 0.2138, 0.2688]}, {"w": "represents", "b": [0.2217, 0.2523, 0.3041, 0.2672]}, {"w": "the", "b": [0.3111, 0.2523, 0.3372, 0.2672]}, {"w": "list", "b": [0.3442, 0.2523, 0.3694, 0.2672]}, {"w": "of", "b": [0.3764, 0.2523, 0.3915, 0.2672]}, {"w": "the", "b": [0.3985, 0.2523, 0.4247, 0.2672]}, {"w": "documents", "b": [0.4316, 0.2523, 0.5196, 0.2672]}, {"w": "relevant", "b": [0.5265, 0.2523, 0.5915, 0.2672]}, {"w": "to", "b": [0.5984, 0.2523, 0.6152, 0.2672]}, {"w": "the", "b": [0.6221, 0.2523, 0.6483, 0.2672]}, {"w": "query", "b": [0.6552, 0.2523, 0.7013, 0.2672]}, {"w": "in", "b": [0.7083, 0.2523, 0.724, 0.2672]}, {"w": "the", "b": [0.7309, 0.2523, 0.7571, 0.2672]}, {"w": "corpus", "b": [0.764, 0.2523, 0.8176, 0.2672]}, {"w": "up", "b": [0.8245, 0.2523, 0.8455, 0.2672]}, {"w": "to", "b": [0.8524, 0.2523, 0.8691, 0.2672]}, {"w": "position", "b": [0.1312, 0.2702, 0.1945, 0.2852]}, {"w": "p", "b": [0.2006, 0.2705, 0.2099, 0.2855]}, {"w": "(ordered", "b": [0.216, 0.2702, 0.2828, 0.2852]}, {"w": "by", "b": [0.2889, 0.2702, 0.3081, 0.2852]}, {"w": "their", "b": [0.3142, 0.2702, 0.3517, 0.2852]}, {"w": "relevance).", "b": [0.3578, 0.2702, 0.4422, 0.2852]}, {"w": "So,", "b": [0.4504, 0.2702, 0.4747, 0.2852]}, {"w": "RELp", "b": [0.4806, 0.2702, 0.5259, 0.2867]}, {"w": "is", "b": [0.533, 0.2702, 0.5452, 0.2852]}, {"w": "the", "b": [0.5513, 0.2702, 0.5766, 0.2852]}, {"w": "ideal", "b": [0.5827, 0.2702, 0.6201, 0.2852]}, {"w": "ranking,", "b": [0.6262, 0.2702, 0.6915, 0.2852]}, {"w": "up", "b": [0.6976, 0.2702, 0.7178, 0.2852]}, {"w": "to", "b": [0.7239, 0.2702, 0.7401, 0.2852]}, {"w": "position", "b": [0.7462, 0.2702, 0.8095, 0.2852]}, {"w": "p,", "b": [0.8155, 0.2702, 0.8298, 0.2855]}, {"w": "that", "b": [0.836, 0.2702, 0.8693, 0.2852]}, {"w": "the", "b": [0.1312, 0.2882, 0.1574, 0.3031]}, {"w": "search", "b": [0.1643, 0.2882, 0.2152, 0.3031]}, {"w": "engine", "b": [0.2222, 0.2882, 0.2745, 0.3031]}, {"w": "ranking", "b": [0.2814, 0.2882, 0.3437, 0.3031]}, {"w": "algorithm", "b": [0.3507, 0.2882, 0.4302, 0.3031]}, {"w": "(or", "b": [0.4371, 0.2882, 0.4612, 0.3031]}, {"w": "model)", "b": [0.4682, 0.2882, 0.5252, 0.3031]}, {"w": "should", "b": [0.5321, 0.2882, 0.5856, 0.3031]}, {"w": "have", "b": [0.5925, 0.2882, 0.6297, 0.3031]}, {"w": "returned", "b": [0.6366, 0.2882, 0.7068, 0.3031]}, {"w": "for", "b": [0.7138, 0.2882, 0.7363, 0.3031]}, {"w": "the", "b": [0.7432, 0.2882, 0.7694, 0.3031]}, {"w": "query.", "b": [0.7763, 0.2882, 0.8261, 0.3031]}, {"w": "The", "b": [0.8367, 0.2882, 0.8691, 0.3031]}, {"w": "nDCG", "b": [0.1312, 0.3061, 0.1834, 0.3211]}, {"w": "values", "b": [0.1907, 0.3061, 0.2405, 0.3211]}, {"w": "for", "b": [0.2478, 0.3061, 0.2703, 0.3211]}, {"w": "all", "b": [0.2776, 0.3061, 0.2975, 0.3211]}, {"w": "queries", "b": [0.3048, 0.3061, 0.362, 0.3211]}, {"w": "are", "b": [0.3693, 0.3061, 0.3945, 0.3211]}, {"w": "usually", "b": [0.4017, 0.3061, 0.4599, 0.3211]}, {"w": "averaged", "b": [0.4672, 0.3061, 0.5389, 0.3211]}, {"w": "to", "b": [0.5462, 0.3061, 0.563, 0.3211]}, {"w": "obtain", "b": [0.5703, 0.3061, 0.6226, 0.3211]}, {"w": "a", "b": [0.6299, 0.3061, 0.6393, 0.3211]}, {"w": "performance", "b": [0.6466, 0.3061, 0.7481, 0.3211]}, {"w": "measure", "b": [0.7554, 0.3061, 0.8225, 0.3211]}, {"w": "for", "b": [0.8298, 0.3061, 0.8524, 0.3211]}, {"w": "a", "b": [0.8597, 0.3061, 0.8691, 0.3211]}, {"w": "search", "b": [0.1312, 0.3241, 0.1811, 0.339]}, {"w": "engine", "b": [0.1873, 0.3241, 0.2386, 0.339]}, {"w": "ranking", "b": [0.2447, 0.3241, 0.3058, 0.339]}, {"w": "algorithm", "b": [0.3119, 0.3241, 0.3899, 0.339]}, {"w": "or", "b": [0.3961, 0.3241, 0.4125, 0.339]}, {"w": "model.", "b": [0.4187, 0.3241, 0.4725, 0.339]}]}, {"id": "b_11", "type": "paragraph", "text": "Let’s consider the following example. Let a search engine return a list of documents in response to a search query. We ask a ranker (a human) to judge each document’s relevance. The ranker must assign a score from 0 to 3, where 0 means not relevant, 3 means highly relevant, while 1 and 2 mean “somewhere in between.” Say the documents appeared in this order:", "words": [{"w": "Let’s", "b": [0.1312, 0.351, 0.1698, 0.366]}, {"w": "consider", "b": [0.1743, 0.351, 0.2388, 0.366]}, {"w": "the", "b": [0.2433, 0.351, 0.2685, 0.366]}, {"w": "following", "b": [0.273, 0.351, 0.3433, 0.366]}, {"w": "example.", "b": [0.3479, 0.351, 0.4177, 0.366]}, {"w": "Let", "b": [0.4254, 0.351, 0.4517, 0.366]}, {"w": "a", "b": [0.4563, 0.351, 0.4653, 0.366]}, {"w": "search", "b": [0.4698, 0.351, 0.5187, 0.366]}, {"w": "engine", "b": [0.5233, 0.351, 0.5735, 0.366]}, {"w": "return", "b": [0.5781, 0.351, 0.6274, 0.366]}, {"w": "a", "b": [0.6319, 0.351, 0.641, 0.366]}, {"w": "list", "b": [0.6455, 0.351, 0.6698, 0.366]}, {"w": "of", "b": [0.6743, 0.351, 0.6889, 0.366]}, {"w": "documents", "b": [0.6934, 0.351, 0.7779, 0.366]}, {"w": "in", "b": [0.7824, 0.351, 0.7975, 0.366]}, {"w": "response", "b": [0.802, 0.351, 0.8692, 0.366]}, {"w": "to", "b": [0.1312, 0.3689, 0.148, 0.3839]}, {"w": "a", "b": [0.155, 0.3689, 0.1644, 0.3839]}, {"w": "search", "b": [0.1714, 0.3689, 0.2224, 0.3839]}, {"w": "query.", "b": [0.2294, 0.3689, 0.2792, 0.3839]}, {"w": "We", "b": [0.29, 0.3689, 0.3162, 0.3839]}, {"w": "ask", "b": [0.3233, 0.3689, 0.35, 0.3839]}, {"w": "a", "b": [0.3571, 0.3689, 0.3665, 0.3839]}, {"w": "ranker", "b": [0.3735, 0.3689, 0.4259, 0.3839]}, {"w": "(a", "b": [0.433, 0.3689, 0.4497, 0.3839]}, {"w": "human)", "b": [0.4568, 0.3689, 0.52, 0.3839]}, {"w": "to", "b": [0.5271, 0.3689, 0.5438, 0.3839]}, {"w": "judge", "b": [0.5508, 0.3689, 0.5953, 0.3839]}, {"w": "each", "b": [0.6023, 0.3689, 0.6384, 0.3839]}, {"w": "document’s", "b": [0.6455, 0.3689, 0.7387, 0.3839]}, {"w": "relevance.", "b": [0.7457, 0.3689, 0.8258, 0.3839]}, {"w": "The", "b": [0.8367, 0.3689, 0.8691, 0.3839]}, {"w": "ranker", "b": [0.1312, 0.3869, 0.1818, 0.4018]}, {"w": "must", "b": [0.1879, 0.3869, 0.2269, 0.4018]}, {"w": "assign", "b": [0.233, 0.3869, 0.2806, 0.4018]}, {"w": "a", "b": [0.2868, 0.3869, 0.2958, 0.4018]}, {"w": "score", "b": [0.302, 0.3869, 0.3415, 0.4018]}, {"w": "from", "b": [0.3476, 0.3869, 0.3845, 0.4018]}, {"w": "0", "b": [0.3905, 0.3869, 0.3996, 0.4018]}, {"w": "to", "b": [0.4057, 0.3869, 0.4219, 0.4018]}, {"w": "3,", "b": [0.428, 0.3869, 0.4421, 0.4018]}, {"w": "where", "b": [0.4483, 0.3869, 0.4947, 0.4018]}, {"w": "0", "b": [0.5008, 0.3869, 0.5099, 0.4018]}, {"w": "means", "b": [0.5161, 0.3869, 0.5656, 0.4018]}, {"w": "not", "b": [0.5717, 0.3869, 0.598, 0.4018]}, {"w": "relevant,", "b": [0.6041, 0.3869, 0.6717, 0.4018]}, {"w": "3", "b": [0.6778, 0.3869, 0.6869, 0.4018]}, {"w": "means", "b": [0.693, 0.3869, 0.7426, 0.4018]}, {"w": "highly", "b": [0.7487, 0.3869, 0.7976, 0.4018]}, {"w": "relevant,", "b": [0.8038, 0.3869, 0.8714, 0.4018]}, {"w": "while", "b": [0.1306, 0.4048, 0.1726, 0.4198]}, {"w": "1", "b": [0.1787, 0.4048, 0.188, 0.4198]}, {"w": "and", "b": [0.1941, 0.4048, 0.2239, 0.4198]}, {"w": "2", "b": [0.23, 0.4048, 0.2392, 0.4198]}, {"w": "mean", "b": [0.2454, 0.4048, 0.2884, 0.4198]}, {"w": "“somewhere", "b": [0.2946, 0.4048, 0.3906, 0.4198]}, {"w": "in", "b": [0.3967, 0.4048, 0.4121, 0.4198]}, {"w": "between.”", "b": [0.4183, 0.4048, 0.4947, 0.4198]}, {"w": "Say", "b": [0.5029, 0.4048, 0.5316, 0.4198]}, {"w": "the", "b": [0.5377, 0.4048, 0.5634, 0.4198]}, {"w": "documents", "b": [0.5695, 0.4048, 0.6558, 0.4198]}, {"w": "appeared", "b": [0.6619, 0.4048, 0.7353, 0.4198]}, {"w": "in", "b": [0.7415, 0.4048, 0.7569, 0.4198]}, {"w": "this", "b": [0.763, 0.4048, 0.7928, 0.4198]}, {"w": "order:", "b": [0.799, 0.4048, 0.8463, 0.4198]}]}, {"id": "b_12", "type": "paragraph", "text": "D1, D2, D3, D4, D5.", "words": [{"w": "D1,", "b": [0.4222, 0.45, 0.4508, 0.4662]}, {"w": "D2,", "b": [0.4539, 0.45, 0.4826, 0.4662]}, {"w": "D3,", "b": [0.4857, 0.45, 0.5143, 0.4662]}, {"w": "D4,", "b": [0.5174, 0.45, 0.5461, 0.4662]}, {"w": "D5.", "b": [0.5492, 0.45, 0.5778, 0.4662]}]}, {"id": "b_13", "type": "paragraph", "text": "Our ranker provides the following relevance scores:", "words": [{"w": "Our", "b": [0.1312, 0.4856, 0.1631, 0.5006]}, {"w": "ranker", "b": [0.1692, 0.4856, 0.2206, 0.5006]}, {"w": "provides", "b": [0.2268, 0.4856, 0.2936, 0.5006]}, {"w": "the", "b": [0.2997, 0.4856, 0.3254, 0.5006]}, {"w": "following", "b": [0.3315, 0.4856, 0.4033, 0.5006]}, {"w": "relevance", "b": [0.4094, 0.4856, 0.4828, 0.5006]}, {"w": "scores:", "b": [0.489, 0.4856, 0.5416, 0.5006]}]}, {"id": "b_14", "type": "paragraph", "text": "3, 1, 0, 3, 2.", "words": [{"w": "3,", "b": [0.458, 0.5305, 0.4723, 0.5457]}, {"w": "1,", "b": [0.4754, 0.5305, 0.4898, 0.5457]}, {"w": "0,", "b": [0.4928, 0.5305, 0.5072, 0.5457]}, {"w": "3,", "b": [0.5102, 0.5305, 0.5246, 0.5457]}, {"w": "2.", "b": [0.5277, 0.5305, 0.542, 0.5457]}]}, {"id": "b_15", "type": "paragraph", "text": "This means that document D1 has a relevance of 3, D2 has a relevance of 1, D3 has a relevance of 0, and so on. The cumulative gain of this search result, up to position p = 5, is,", "words": [{"w": "This", "b": [0.1306, 0.5664, 0.1658, 0.5813]}, {"w": "means", "b": [0.1708, 0.5664, 0.2201, 0.5813]}, {"w": "that", "b": [0.225, 0.5664, 0.2582, 0.5813]}, {"w": "document", "b": [0.2631, 0.5664, 0.3405, 0.5813]}, {"w": "D1", "b": [0.3453, 0.5666, 0.3679, 0.5829]}, {"w": "has", "b": [0.3738, 0.5664, 0.4, 0.5813]}, {"w": "a", "b": [0.4049, 0.5664, 0.414, 0.5813]}, {"w": "relevance", "b": [0.4189, 0.5664, 0.4908, 0.5813]}, {"w": "of", "b": [0.4957, 0.5664, 0.5103, 0.5813]}, {"w": "3,", "b": [0.5151, 0.5664, 0.5292, 0.5813]}, {"w": "D2", "b": [0.5343, 0.5666, 0.557, 0.5829]}, {"w": "has", "b": [0.5628, 0.5664, 0.589, 0.5813]}, {"w": "a", "b": [0.594, 0.5664, 0.603, 0.5813]}, {"w": "relevance", "b": [0.6079, 0.5664, 0.6798, 0.5813]}, {"w": "of", "b": [0.6847, 0.5664, 0.6993, 0.5813]}, {"w": "1,", "b": [0.7041, 0.5664, 0.7182, 0.5813]}, {"w": "D3", "b": [0.7234, 0.5666, 0.746, 0.5829]}, {"w": "has", "b": [0.7518, 0.5664, 0.7781, 0.5813]}, {"w": "a", "b": [0.783, 0.5664, 0.792, 0.5813]}, {"w": "relevance", "b": [0.7969, 0.5664, 0.8688, 0.5813]}, {"w": "of", "b": [0.1312, 0.5843, 0.1461, 0.5993]}, {"w": "0,", "b": [0.1522, 0.5843, 0.1666, 0.5993]}, {"w": "and", "b": [0.1727, 0.5843, 0.2025, 0.5993]}, {"w": "so", "b": [0.2086, 0.5843, 0.2251, 0.5993]}, {"w": "on.", "b": [0.2313, 0.5843, 0.2559, 0.5993]}, {"w": "The", "b": [0.2641, 0.5843, 0.2959, 0.5993]}, {"w": "cumulative", "b": [0.302, 0.5843, 0.3897, 0.5993]}, {"w": "gain", "b": [0.3959, 0.5843, 0.4297, 0.5993]}, {"w": "of", "b": [0.4358, 0.5843, 0.4507, 0.5993]}, {"w": "this", "b": [0.4569, 0.5843, 0.4867, 0.5993]}, {"w": "search", "b": [0.4929, 0.5843, 0.5428, 0.5993]}, {"w": "result,", "b": [0.5489, 0.5843, 0.5993, 0.5993]}, {"w": "up", "b": [0.6055, 0.5843, 0.626, 0.5993]}, {"w": "to", "b": [0.6321, 0.5843, 0.6485, 0.5993]}, {"w": "position", "b": [0.6547, 0.5843, 0.7189, 0.5993]}, {"w": "p", "b": [0.7248, 0.5846, 0.7341, 0.5995]}, {"w": "=", "b": [0.7392, 0.5843, 0.7535, 0.5993]}, {"w": "5,", "b": [0.7587, 0.5843, 0.773, 0.5993]}, {"w": "is,", "b": [0.7792, 0.5843, 0.7967, 0.5993]}]}, {"id": "b_16", "type": "equation", "text": "CG5 =", "words": [{"w": "CG5", "b": [0.3403, 0.6397, 0.3755, 0.6562]}, {"w": "=", "b": [0.3815, 0.6397, 0.3959, 0.6546]}]}, {"id": "b_17", "type": "paragraph", "text": "5 X", "words": [{"w": "5", "b": [0.4107, 0.6248, 0.418, 0.6352]}, {"w": "X", "b": [0.401, 0.6365, 0.4277, 0.6514]}]}, {"id": "b_18", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.4024, 0.6611, 0.4263, 0.6716]}]}, {"id": "b_19", "type": "equation", "text": "reli = 3 + 1 + 0 + 3 + 2 = 9.", "words": [{"w": "reli", "b": [0.4307, 0.6399, 0.4589, 0.6562]}, {"w": "=", "b": [0.4649, 0.6397, 0.4793, 0.6546]}, {"w": "3", "b": [0.4844, 0.6397, 0.4936, 0.6546]}, {"w": "+", "b": [0.4977, 0.6397, 0.5121, 0.6546]}, {"w": "1", "b": [0.5162, 0.6397, 0.5254, 0.6546]}, {"w": "+", "b": [0.5295, 0.6397, 0.5439, 0.6546]}, {"w": "0", "b": [0.548, 0.6397, 0.5572, 0.6546]}, {"w": "+", "b": [0.5613, 0.6397, 0.5756, 0.6546]}, {"w": "3", "b": [0.5797, 0.6397, 0.589, 0.6546]}, {"w": "+", "b": [0.5931, 0.6397, 0.6074, 0.6546]}, {"w": "2", "b": [0.6115, 0.6397, 0.6208, 0.6546]}, {"w": "=", "b": [0.6259, 0.6397, 0.6402, 0.6546]}, {"w": "9.", "b": [0.6453, 0.6397, 0.6597, 0.6549]}]}, {"id": "b_20", "type": "paragraph", "text": "You can see that changing the order of any documents will not affect the value of cumulative gain. Now we will calculate the discounted cumulative gain designed, with the presence of the logarithmic discounting, to have a higher value if highly relevant documents appear early in the result list. To calculate DCG5, let’s calculate the value of the expression reli log2(i+1) for each i:", "words": [{"w": "You", "b": [0.1305, 0.6885, 0.1616, 0.7035]}, {"w": "can", "b": [0.1677, 0.6885, 0.1949, 0.7035]}, {"w": "see", "b": [0.2009, 0.6885, 0.2242, 0.7035]}, {"w": "that", "b": [0.2302, 0.6885, 0.2634, 0.7035]}, {"w": "changing", "b": [0.2695, 0.6885, 0.3393, 0.7035]}, {"w": "the", "b": [0.3454, 0.6885, 0.3705, 0.7035]}, {"w": "order", "b": [0.3766, 0.6885, 0.4179, 0.7035]}, {"w": "of", "b": [0.424, 0.6885, 0.4385, 0.7035]}, {"w": "any", "b": [0.4446, 0.6885, 0.4727, 0.7035]}, {"w": "documents", "b": [0.4788, 0.6885, 0.5633, 0.7035]}, {"w": "will", "b": [0.5694, 0.6885, 0.5975, 0.7035]}, {"w": "not", "b": [0.6036, 0.6885, 0.6297, 0.7035]}, {"w": "affect", "b": [0.6358, 0.6885, 0.6785, 0.7035]}, {"w": "the", "b": [0.6846, 0.6885, 0.7097, 0.7035]}, {"w": "value", "b": [0.7158, 0.6885, 0.7565, 0.7035]}, {"w": "of", "b": [0.7625, 0.6885, 0.7771, 0.7035]}, {"w": "cumulative", "b": [0.7832, 0.6885, 0.8691, 0.7035]}, {"w": "gain.", "b": [0.1312, 0.7065, 0.1694, 0.7214]}, {"w": "Now", "b": [0.1774, 0.7065, 0.2125, 0.7214]}, {"w": "we", "b": [0.218, 0.7065, 0.2386, 0.7214]}, {"w": "will", "b": [0.2441, 0.7065, 0.2722, 0.7214]}, {"w": "calculate", "b": [0.2777, 0.7065, 0.347, 0.7214]}, {"w": "the", "b": [0.3525, 0.7065, 0.3776, 0.7214]}, {"w": "discounted", "b": [0.3831, 0.7065, 0.4671, 0.7214]}, {"w": "cumulative", "b": [0.4726, 0.7065, 0.5585, 0.7214]}, {"w": "gain", "b": [0.564, 0.7065, 0.5972, 0.7214]}, {"w": "designed,", "b": [0.6026, 0.7065, 0.6751, 0.7214]}, {"w": "with", "b": [0.6807, 0.7065, 0.7159, 0.7214]}, {"w": "the", "b": [0.7214, 0.7065, 0.7465, 0.7214]}, {"w": "presence", "b": [0.752, 0.7065, 0.8185, 0.7214]}, {"w": "of", "b": [0.824, 0.7065, 0.8385, 0.7214]}, {"w": "the", "b": [0.844, 0.7065, 0.8691, 0.7214]}, {"w": "logarithmic", "b": [0.1312, 0.7244, 0.2207, 0.7394]}, {"w": "discounting,", "b": [0.2252, 0.7244, 0.3203, 0.7394]}, {"w": "to", "b": [0.3252, 0.7244, 0.3412, 0.7394]}, {"w": "have", "b": [0.3458, 0.7244, 0.3814, 0.7394]}, {"w": "a", "b": [0.3859, 0.7244, 0.395, 0.7394]}, {"w": "higher", "b": [0.3995, 0.7244, 0.4488, 0.7394]}, {"w": "value", "b": [0.4533, 0.7244, 0.494, 0.7394]}, {"w": "if", "b": [0.4985, 0.7244, 0.5091, 0.7394]}, {"w": "highly", "b": [0.5136, 0.7244, 0.5624, 0.7394]}, {"w": "relevant", "b": [0.5669, 0.7244, 0.6292, 0.7394]}, {"w": "documents", "b": [0.6337, 0.7244, 0.7183, 0.7394]}, {"w": "appear", "b": [0.7228, 0.7244, 0.7766, 0.7394]}, {"w": "early", "b": [0.7811, 0.7244, 0.8199, 0.7394]}, {"w": "in", "b": [0.8244, 0.7244, 0.8395, 0.7394]}, {"w": "the", "b": [0.844, 0.7244, 0.8691, 0.7394]}, {"w": "result", "b": [0.1312, 0.7424, 0.1761, 0.7573]}, {"w": "list.", "b": [0.1822, 0.7424, 0.2118, 0.7573]}, {"w": "To", "b": [0.22, 0.7424, 0.2407, 0.7573]}, {"w": "calculate", "b": [0.2469, 0.7424, 0.317, 0.7573]}, {"w": "DCG5,", "b": [0.323, 0.7424, 0.3783, 0.7589]}, {"w": "let’s", "b": [0.3844, 0.7424, 0.417, 0.7573]}, {"w": "calculate", "b": [0.4232, 0.7424, 0.4932, 0.7573]}, {"w": "the", "b": [0.4994, 0.7424, 0.5248, 0.7573]}, {"w": "value", "b": [0.5309, 0.7424, 0.572, 0.7573]}, {"w": "of", "b": [0.5782, 0.7424, 0.5929, 0.7573]}, {"w": "the", "b": [0.599, 0.7424, 0.6244, 0.7573]}, {"w": "expression", "b": [0.6306, 0.7424, 0.7126, 0.7573]}, {"w": "reli", "b": [0.7391, 0.74, 0.763, 0.7513]}, {"w": "log2(i+1)", "b": [0.7207, 0.7513, 0.7823, 0.7639]}, {"w": "for", "b": [0.7907, 0.7424, 0.8125, 0.7573]}, {"w": "each", "b": [0.8187, 0.7424, 0.8537, 0.7573]}, {"w": "i:", "b": [0.8598, 0.7424, 0.8713, 0.7576]}]}, {"id": "b_21", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 23", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "23", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 162, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "i reli log2(i + 1) reli log2(i+1)", "words": [{"w": "i", "b": [0.3738, 0.0922, 0.3802, 0.1072]}, {"w": "reli", "b": [0.4037, 0.0922, 0.4319, 0.1084]}, {"w": "log2(i", "b": [0.4549, 0.0919, 0.5006, 0.1098]}, {"w": "+", "b": [0.5047, 0.0919, 0.519, 0.1069]}, {"w": "1)", "b": [0.5231, 0.0919, 0.5395, 0.1069]}, {"w": "reli", "b": [0.5823, 0.0896, 0.6061, 0.1009]}, {"w": "log2(i+1)", "b": [0.5639, 0.1009, 0.6254, 0.1135]}]}, {"id": "b_1", "type": "paragraph", "text": "1 3 1.00 3.00 2 1 1.58 0.63 3 0 2.00 0.00 4 3 2.32 1.29 5 2 2.58 0.77", "words": [{"w": "1", "b": [0.3724, 0.1199, 0.3816, 0.1349]}, {"w": "3", "b": [0.4137, 0.1199, 0.4229, 0.1349]}, {"w": "1.00", "b": [0.4808, 0.1199, 0.5136, 0.1352]}, {"w": "3.00", "b": [0.5782, 0.1199, 0.611, 0.1352]}, {"w": "2", "b": [0.3724, 0.1379, 0.3816, 0.1528]}, {"w": "1", "b": [0.4137, 0.1379, 0.4229, 0.1528]}, {"w": "1.58", "b": [0.4808, 0.1379, 0.5136, 0.1531]}, {"w": "0.63", "b": [0.5782, 0.1379, 0.611, 0.1531]}, {"w": "3", "b": [0.3724, 0.1558, 0.3816, 0.1708]}, {"w": "0", "b": [0.4137, 0.1558, 0.4229, 0.1708]}, {"w": "2.00", "b": [0.4808, 0.1558, 0.5136, 0.1711]}, {"w": "0.00", "b": [0.5782, 0.1558, 0.611, 0.1711]}, {"w": "4", "b": [0.3724, 0.1738, 0.3816, 0.1887]}, {"w": "3", "b": [0.4137, 0.1738, 0.4229, 0.1887]}, {"w": "2.32", "b": [0.4808, 0.1738, 0.5136, 0.189]}, {"w": "1.29", "b": [0.5782, 0.1738, 0.611, 0.189]}, {"w": "5", "b": [0.3724, 0.1917, 0.3816, 0.2067]}, {"w": "2", "b": [0.4137, 0.1917, 0.4229, 0.2067]}, {"w": "2.58", "b": [0.4808, 0.1917, 0.5136, 0.207]}, {"w": "0.77", "b": [0.5782, 0.1917, 0.611, 0.207]}]}, {"id": "b_2", "type": "equation", "text": "So DCG5 of this ranking is given by 3.00 + 0.63 + 0.00 + 1.29 + 0.77 = 5.70.", "words": [{"w": "So", "b": [0.1312, 0.2445, 0.1507, 0.2595]}, {"w": "DCG5", "b": [0.1569, 0.2445, 0.2061, 0.261]}, {"w": "of", "b": [0.2132, 0.2445, 0.228, 0.2595]}, {"w": "this", "b": [0.2342, 0.2445, 0.264, 0.2595]}, {"w": "ranking", "b": [0.2702, 0.2445, 0.3313, 0.2595]}, {"w": "is", "b": [0.3374, 0.2445, 0.3498, 0.2595]}, {"w": "given", "b": [0.356, 0.2445, 0.398, 0.2595]}, {"w": "by", "b": [0.4042, 0.2445, 0.4237, 0.2595]}, {"w": "3.00", "b": [0.4297, 0.2445, 0.4625, 0.2598]}, {"w": "+", "b": [0.4666, 0.2445, 0.481, 0.2595]}, {"w": "0.63", "b": [0.485, 0.2445, 0.5178, 0.2598]}, {"w": "+", "b": [0.5219, 0.2445, 0.5363, 0.2595]}, {"w": "0.00", "b": [0.5404, 0.2445, 0.5732, 0.2598]}, {"w": "+", "b": [0.5773, 0.2445, 0.5916, 0.2595]}, {"w": "1.29", "b": [0.5957, 0.2445, 0.6285, 0.2598]}, {"w": "+", "b": [0.6326, 0.2445, 0.647, 0.2595]}, {"w": "0.77", "b": [0.6511, 0.2445, 0.6839, 0.2598]}, {"w": "=", "b": [0.689, 0.2445, 0.7034, 0.2595]}, {"w": "5.70.", "b": [0.7085, 0.2445, 0.7464, 0.2598]}]}, {"id": "b_3", "type": "paragraph", "text": "Now, if we switch the positions of D1 and D2, the value of DCG5 will become lower. This is because a less relevant document is now placed higher in the ranking, while a more relevant document is discounted more by being placed in a lower position.", "words": [{"w": "Now,", "b": [0.1312, 0.2714, 0.1715, 0.2864]}, {"w": "if", "b": [0.1777, 0.2714, 0.1883, 0.2864]}, {"w": "we", "b": [0.1944, 0.2714, 0.2151, 0.2864]}, {"w": "switch", "b": [0.2212, 0.2714, 0.2712, 0.2864]}, {"w": "the", "b": [0.2774, 0.2714, 0.3026, 0.2864]}, {"w": "positions", "b": [0.3087, 0.2714, 0.379, 0.2864]}, {"w": "of", "b": [0.3852, 0.2714, 0.3998, 0.2864]}, {"w": "D1", "b": [0.4058, 0.2717, 0.4284, 0.288]}, {"w": "and", "b": [0.4355, 0.2714, 0.4648, 0.2864]}, {"w": "D2,", "b": [0.4709, 0.2714, 0.4995, 0.288]}, {"w": "the", "b": [0.5056, 0.2714, 0.5308, 0.2864]}, {"w": "value", "b": [0.537, 0.2714, 0.5778, 0.2864]}, {"w": "of", "b": [0.584, 0.2714, 0.5986, 0.2864]}, {"w": "DCG5", "b": [0.6047, 0.2714, 0.6539, 0.288]}, {"w": "will", "b": [0.661, 0.2714, 0.6892, 0.2864]}, {"w": "become", "b": [0.6954, 0.2714, 0.7543, 0.2864]}, {"w": "lower.", "b": [0.7605, 0.2714, 0.8069, 0.2864]}, {"w": "This", "b": [0.8151, 0.2714, 0.8505, 0.2864]}, {"w": "is", "b": [0.8567, 0.2714, 0.8689, 0.2864]}, {"w": "because", "b": [0.1312, 0.2894, 0.193, 0.3044]}, {"w": "a", "b": [0.1992, 0.2894, 0.2083, 0.3044]}, {"w": "less", "b": [0.2145, 0.2894, 0.2422, 0.3044]}, {"w": "relevant", "b": [0.2483, 0.2894, 0.3116, 0.3044]}, {"w": "document", "b": [0.3177, 0.2894, 0.3962, 0.3044]}, {"w": "is", "b": [0.4023, 0.2894, 0.4147, 0.3044]}, {"w": "now", "b": [0.4208, 0.2894, 0.4529, 0.3044]}, {"w": "placed", "b": [0.459, 0.2894, 0.51, 0.3044]}, {"w": "higher", "b": [0.5161, 0.2894, 0.5661, 0.3044]}, {"w": "in", "b": [0.5723, 0.2894, 0.5876, 0.3044]}, {"w": "the", "b": [0.5937, 0.2894, 0.6192, 0.3044]}, {"w": "ranking,", "b": [0.6253, 0.2894, 0.6911, 0.3044]}, {"w": "while", "b": [0.6972, 0.2894, 0.739, 0.3044]}, {"w": "a", "b": [0.7452, 0.2894, 0.7543, 0.3044]}, {"w": "more", "b": [0.7605, 0.2894, 0.8003, 0.3044]}, {"w": "relevant", "b": [0.8064, 0.2894, 0.8696, 0.3044]}, {"w": "document", "b": [0.1312, 0.3073, 0.2102, 0.3223]}, {"w": "is", "b": [0.2163, 0.3073, 0.2288, 0.3223]}, {"w": "discounted", "b": [0.2349, 0.3073, 0.3207, 0.3223]}, {"w": "more", "b": [0.3268, 0.3073, 0.3668, 0.3223]}, {"w": "by", "b": [0.373, 0.3073, 0.3925, 0.3223]}, {"w": "being", "b": [0.3986, 0.3073, 0.4422, 0.3223]}, {"w": "placed", "b": [0.4484, 0.3073, 0.4996, 0.3223]}, {"w": "in", "b": [0.5058, 0.3073, 0.5212, 0.3223]}, {"w": "a", "b": [0.5273, 0.3073, 0.5366, 0.3223]}, {"w": "lower", "b": [0.5427, 0.3073, 0.5848, 0.3223]}, {"w": "position.", "b": [0.591, 0.3073, 0.6603, 0.3223]}]}, {"id": "b_4", "type": "paragraph", "text": "To calculate the normalized discounted cumulative gain, nDCG5, we first need to find the value of the discounted cumulative gain of the ideal ordering, IDCG5. The ideal ordering, according to the relevance scores, is 3, 3, 2, 1, 0. The value of IDCG5 is then equal to 3.00 + 1.89 + 1.00 + 0.43 + 0.0 = 6.32. Finally, nDCG5 is given by,", "words": [{"w": "To", "b": [0.1306, 0.3343, 0.152, 0.3492]}, {"w": "calculate", "b": [0.1582, 0.3343, 0.2304, 0.3492]}, {"w": "the", "b": [0.2366, 0.3343, 0.2627, 0.3492]}, {"w": "normalized", "b": [0.2689, 0.3343, 0.3589, 0.3492]}, {"w": "discounted", "b": [0.3651, 0.3343, 0.4526, 0.3492]}, {"w": "cumulative", "b": [0.4588, 0.3343, 0.5482, 0.3492]}, {"w": "gain,", "b": [0.5544, 0.3343, 0.5942, 0.3492]}, {"w": "nDCG5,", "b": [0.6001, 0.3343, 0.6658, 0.3508]}, {"w": "we", "b": [0.672, 0.3343, 0.6934, 0.3492]}, {"w": "first", "b": [0.6996, 0.3343, 0.7322, 0.3492]}, {"w": "need", "b": [0.7384, 0.3343, 0.776, 0.3492]}, {"w": "to", "b": [0.7822, 0.3343, 0.799, 0.3492]}, {"w": "find", "b": [0.8051, 0.3343, 0.8365, 0.3492]}, {"w": "the", "b": [0.8427, 0.3343, 0.8689, 0.3492]}, {"w": "value", "b": [0.1308, 0.3522, 0.1731, 0.3672]}, {"w": "of", "b": [0.1796, 0.3522, 0.1947, 0.3672]}, {"w": "the", "b": [0.2011, 0.3522, 0.2273, 0.3672]}, {"w": "discounted", "b": [0.2337, 0.3522, 0.3212, 0.3672]}, {"w": "cumulative", "b": [0.3276, 0.3522, 0.417, 0.3672]}, {"w": "gain", "b": [0.4234, 0.3522, 0.4579, 0.3672]}, {"w": "of", "b": [0.4643, 0.3522, 0.4795, 0.3672]}, {"w": "the", "b": [0.4859, 0.3522, 0.5121, 0.3672]}, {"w": "ideal", "b": [0.5185, 0.3522, 0.5572, 0.3672]}, {"w": "ordering,", "b": [0.5636, 0.3522, 0.6369, 0.3672]}, {"w": "IDCG5.", "b": [0.6431, 0.3522, 0.7052, 0.3687]}, {"w": "The", "b": [0.7141, 0.3522, 0.7466, 0.3672]}, {"w": "ideal", "b": [0.753, 0.3522, 0.7917, 0.3672]}, {"w": "ordering,", "b": [0.7981, 0.3522, 0.8714, 0.3672]}, {"w": "according", "b": [0.1312, 0.3702, 0.2097, 0.3851]}, {"w": "to", "b": [0.2187, 0.3702, 0.2354, 0.3851]}, {"w": "the", "b": [0.2444, 0.3702, 0.2706, 0.3851]}, {"w": "relevance", "b": [0.2795, 0.3702, 0.3544, 0.3851]}, {"w": "scores,", "b": [0.3634, 0.3702, 0.417, 0.3851]}, {"w": "is", "b": [0.4267, 0.3702, 0.4393, 0.3851]}, {"w": "3,", "b": [0.4481, 0.3702, 0.4627, 0.3854]}, {"w": "3,", "b": [0.4657, 0.3702, 0.4803, 0.3854]}, {"w": "2,", "b": [0.4834, 0.3702, 0.4979, 0.3854]}, {"w": "1,", "b": [0.501, 0.3702, 0.5155, 0.3854]}, {"w": "0.", "b": [0.5186, 0.3702, 0.5332, 0.3851]}, {"w": "The", "b": [0.5499, 0.3702, 0.5823, 0.3851]}, {"w": "value", "b": [0.5913, 0.3702, 0.6336, 0.3851]}, {"w": "of", "b": [0.6426, 0.3702, 0.6578, 0.3851]}, {"w": "IDCG5", "b": [0.6667, 0.3702, 0.7226, 0.3867]}, {"w": "is", "b": [0.7325, 0.3702, 0.7452, 0.3851]}, {"w": "then", "b": [0.7541, 0.3702, 0.7907, 0.3851]}, {"w": "equal", "b": [0.7997, 0.3702, 0.8431, 0.3851]}, {"w": "to", "b": [0.8521, 0.3702, 0.8688, 0.3851]}, {"w": "3.00", "b": [0.1308, 0.3881, 0.1636, 0.4033]}, {"w": "+", "b": [0.1677, 0.3881, 0.182, 0.4031]}, {"w": "1.89", "b": [0.1861, 0.3881, 0.2189, 0.4033]}, {"w": "+", "b": [0.223, 0.3881, 0.2374, 0.4031]}, {"w": "1.00", "b": [0.2415, 0.3881, 0.2743, 0.4033]}, {"w": "+", "b": [0.2784, 0.3881, 0.2927, 0.4031]}, {"w": "0.43", "b": [0.2968, 0.3881, 0.3296, 0.4033]}, {"w": "+", "b": [0.3337, 0.3881, 0.3481, 0.4031]}, {"w": "0.0", "b": [0.3522, 0.3881, 0.3757, 0.4033]}, {"w": "=", "b": [0.3809, 0.3881, 0.3952, 0.4031]}, {"w": "6.32.", "b": [0.4004, 0.3881, 0.4383, 0.4033]}, {"w": "Finally,", "b": [0.4465, 0.3881, 0.5067, 0.4031]}, {"w": "nDCG5", "b": [0.5128, 0.3881, 0.5723, 0.4046]}, {"w": "is", "b": [0.5794, 0.3881, 0.5918, 0.4031]}, {"w": "given", "b": [0.598, 0.3881, 0.64, 0.4031]}, {"w": "by,", "b": [0.6462, 0.3881, 0.6692, 0.4031]}]}, {"id": "b_5", "type": "equation", "text": "nDCG5 = DCG5", "words": [{"w": "nDCG5", "b": [0.3647, 0.4369, 0.4242, 0.4534]}, {"w": "=", "b": [0.4302, 0.4369, 0.4446, 0.4519]}, {"w": "DCG5", "b": [0.4553, 0.4268, 0.5045, 0.4433]}]}, {"id": "b_6", "type": "paragraph", "text": "IDCG5", "words": [{"w": "IDCG5", "b": [0.4519, 0.4472, 0.5078, 0.4637]}]}, {"id": "b_7", "type": "equation", "text": "= 5.70", "words": [{"w": "=", "b": [0.5161, 0.4369, 0.5304, 0.4519]}, {"w": "5.70", "b": [0.5378, 0.4268, 0.5706, 0.4421]}]}, {"id": "b_8", "type": "equation", "text": "6.32 = 0.90.", "words": [{"w": "6.32", "b": [0.5378, 0.4472, 0.5706, 0.4624]}, {"w": "=", "b": [0.5779, 0.4369, 0.5923, 0.4519]}, {"w": "0.90.", "b": [0.5974, 0.4369, 0.6353, 0.4522]}]}, {"id": "b_9", "type": "paragraph", "text": "To obtain nDCG for a collection of test queries and the corresponding lists of search results, we average the values of nDCGp obtained for each individual query. The advantage of using the normalized discounted cumulative gain over other measures is that the values of nDCGp obtained for different values of p are comparable. This property is useful when the number p of relevance scores, provided by the rankers, is different for different queries.", "words": [{"w": "To", "b": [0.1306, 0.4774, 0.1514, 0.4923]}, {"w": "obtain", "b": [0.1575, 0.4774, 0.2083, 0.4923]}, {"w": "nDCG", "b": [0.2144, 0.4774, 0.2666, 0.4923]}, {"w": "for", "b": [0.2727, 0.4774, 0.2946, 0.4923]}, {"w": "a", "b": [0.3007, 0.4774, 0.3099, 0.4923]}, {"w": "collection", "b": [0.316, 0.4774, 0.3912, 0.4923]}, {"w": "of", "b": [0.3973, 0.4774, 0.4121, 0.4923]}, {"w": "test", "b": [0.4182, 0.4774, 0.4478, 0.4923]}, {"w": "queries", "b": [0.4539, 0.4774, 0.5094, 0.4923]}, {"w": "and", "b": [0.5156, 0.4774, 0.545, 0.4923]}, {"w": "the", "b": [0.5512, 0.4774, 0.5766, 0.4923]}, {"w": "corresponding", "b": [0.5827, 0.4774, 0.6941, 0.4923]}, {"w": "lists", "b": [0.7003, 0.4774, 0.732, 0.4923]}, {"w": "of", "b": [0.7381, 0.4774, 0.7529, 0.4923]}, {"w": "search", "b": [0.759, 0.4774, 0.8084, 0.4923]}, {"w": "results,", "b": [0.8146, 0.4774, 0.8717, 0.4923]}, {"w": "we", "b": [0.1306, 0.4953, 0.1513, 0.5103]}, {"w": "average", "b": [0.1575, 0.4953, 0.2168, 0.5103]}, {"w": "the", "b": [0.223, 0.4953, 0.2483, 0.5103]}, {"w": "values", "b": [0.2545, 0.4953, 0.3027, 0.5103]}, {"w": "of", "b": [0.3089, 0.4953, 0.3235, 0.5103]}, {"w": "nDCGp", "b": [0.3296, 0.4953, 0.3894, 0.5118]}, {"w": "obtained", "b": [0.3965, 0.4953, 0.4654, 0.5103]}, {"w": "for", "b": [0.4715, 0.4953, 0.4934, 0.5103]}, {"w": "each", "b": [0.4995, 0.4953, 0.5345, 0.5103]}, {"w": "individual", "b": [0.5406, 0.4953, 0.6202, 0.5103]}, {"w": "query.", "b": [0.6263, 0.4953, 0.6745, 0.5103]}, {"w": "The", "b": [0.6828, 0.4953, 0.7142, 0.5103]}, {"w": "advantage", "b": [0.7203, 0.4953, 0.8003, 0.5103]}, {"w": "of", "b": [0.8065, 0.4953, 0.8212, 0.5103]}, {"w": "using", "b": [0.8274, 0.4953, 0.869, 0.5103]}, {"w": "the", "b": [0.1312, 0.5133, 0.1565, 0.5282]}, {"w": "normalized", "b": [0.1627, 0.5133, 0.2498, 0.5282]}, {"w": "discounted", "b": [0.2559, 0.5133, 0.3406, 0.5282]}, {"w": "cumulative", "b": [0.3467, 0.5133, 0.4332, 0.5282]}, {"w": "gain", "b": [0.4394, 0.5133, 0.4728, 0.5282]}, {"w": "over", "b": [0.4789, 0.5133, 0.5118, 0.5282]}, {"w": "other", "b": [0.518, 0.5133, 0.5595, 0.5282]}, {"w": "measures", "b": [0.5657, 0.5133, 0.6378, 0.5282]}, {"w": "is", "b": [0.6439, 0.5133, 0.6562, 0.5282]}, {"w": "that", "b": [0.6623, 0.5133, 0.6957, 0.5282]}, {"w": "the", "b": [0.7018, 0.5133, 0.7272, 0.5282]}, {"w": "values", "b": [0.7333, 0.5133, 0.7815, 0.5282]}, {"w": "of", "b": [0.7876, 0.5133, 0.8023, 0.5282]}, {"w": "nDCGp", "b": [0.8081, 0.5133, 0.8678, 0.5297]}, {"w": "obtained", "b": [0.1312, 0.5312, 0.1996, 0.5462]}, {"w": "for", "b": [0.2057, 0.5312, 0.2274, 0.5462]}, {"w": "different", "b": [0.2335, 0.5312, 0.2989, 0.5462]}, {"w": "values", "b": [0.3051, 0.5312, 0.3529, 0.5462]}, {"w": "of", "b": [0.3591, 0.5312, 0.3736, 0.5462]}, {"w": "p", "b": [0.3797, 0.5315, 0.389, 0.5464]}, {"w": "are", "b": [0.3951, 0.5312, 0.4193, 0.5462]}, {"w": "comparable.", "b": [0.4255, 0.5312, 0.521, 0.5462]}, {"w": "This", "b": [0.5292, 0.5312, 0.5645, 0.5462]}, {"w": "property", "b": [0.5706, 0.5312, 0.6386, 0.5462]}, {"w": "is", "b": [0.6447, 0.5312, 0.6569, 0.5462]}, {"w": "useful", "b": [0.6631, 0.5312, 0.7089, 0.5462]}, {"w": "when", "b": [0.7151, 0.5312, 0.7563, 0.5462]}, {"w": "the", "b": [0.7624, 0.5312, 0.7876, 0.5462]}, {"w": "number", "b": [0.7937, 0.5312, 0.8536, 0.5462]}, {"w": "p", "b": [0.8595, 0.5315, 0.8688, 0.5464]}, {"w": "of", "b": [0.1312, 0.5491, 0.1461, 0.5641]}, {"w": "relevance", "b": [0.1522, 0.5491, 0.2257, 0.5641]}, {"w": "scores,", "b": [0.2318, 0.5491, 0.2844, 0.5641]}, {"w": "provided", "b": [0.2905, 0.5491, 0.3603, 0.5641]}, {"w": "by", "b": [0.3665, 0.5491, 0.3859, 0.5641]}, {"w": "the", "b": [0.3921, 0.5491, 0.4178, 0.5641]}, {"w": "rankers,", "b": [0.4239, 0.5491, 0.4877, 0.5641]}, {"w": "is", "b": [0.4938, 0.5491, 0.5063, 0.5641]}, {"w": "different", "b": [0.5124, 0.5491, 0.5791, 0.5641]}, {"w": "for", "b": [0.5853, 0.5491, 0.6074, 0.5641]}, {"w": "different", "b": [0.6135, 0.5491, 0.6802, 0.5641]}, {"w": "queries.", "b": [0.6864, 0.5491, 0.7476, 0.5641]}]}, {"id": "b_10", "type": "paragraph", "text": "Now that we have a performance metric, we can use it to compare models in the process known as hyperparameter tuning.", "words": [{"w": "Now", "b": [0.1312, 0.5761, 0.1678, 0.591]}, {"w": "that", "b": [0.1745, 0.5761, 0.209, 0.591]}, {"w": "we", "b": [0.2157, 0.5761, 0.2371, 0.591]}, {"w": "have", "b": [0.2438, 0.5761, 0.281, 0.591]}, {"w": "a", "b": [0.2877, 0.5761, 0.2971, 0.591]}, {"w": "performance", "b": [0.3037, 0.5761, 0.4053, 0.591]}, {"w": "metric,", "b": [0.412, 0.5761, 0.4695, 0.591]}, {"w": "we", "b": [0.4764, 0.5761, 0.4978, 0.591]}, {"w": "can", "b": [0.5045, 0.5761, 0.5327, 0.591]}, {"w": "use", "b": [0.5394, 0.5761, 0.5657, 0.591]}, {"w": "it", "b": [0.5724, 0.5761, 0.5849, 0.591]}, {"w": "to", "b": [0.5916, 0.5761, 0.6083, 0.591]}, {"w": "compare", "b": [0.615, 0.5761, 0.6841, 0.591]}, {"w": "models", "b": [0.6907, 0.5761, 0.7478, 0.591]}, {"w": "in", "b": [0.7545, 0.5761, 0.7702, 0.591]}, {"w": "the", "b": [0.7769, 0.5761, 0.803, 0.591]}, {"w": "process", "b": [0.8097, 0.5761, 0.8691, 0.591]}, {"w": "known", "b": [0.1312, 0.594, 0.1835, 0.609]}, {"w": "as", "b": [0.1897, 0.594, 0.2062, 0.609]}, {"w": "hyperparameter", "b": [0.2123, 0.594, 0.3402, 0.609]}, {"w": "tuning.", "b": [0.3463, 0.594, 0.4037, 0.609]}]}, {"id": "b_11", "type": "paragraph", "text": "5.6 Hyperparameter Tuning", "words": [{"w": "5.6", "b": [0.1312, 0.6423, 0.1631, 0.6603]}, {"w": "Hyperparameter", "b": [0.188, 0.6423, 0.3683, 0.6603]}, {"w": "Tuning", "b": [0.3766, 0.6423, 0.4528, 0.6603]}]}, {"id": "b_12", "type": "paragraph", "text": "Hyperparameters play an important role in the model training process. Some hyperparameters influence the speed of training, but the most important hyperparameters control the two tradeoffs: bias-variance and precision-recall.", "words": [{"w": "Hyperparameters", "b": [0.1312, 0.6809, 0.2677, 0.6959]}, {"w": "play", "b": [0.2723, 0.6809, 0.3054, 0.6959]}, {"w": "an", "b": [0.31, 0.6809, 0.3291, 0.6959]}, {"w": "important", "b": [0.3337, 0.6809, 0.4131, 0.6959]}, {"w": "role", "b": [0.4177, 0.6809, 0.4469, 0.6959]}, {"w": "in", "b": [0.4515, 0.6809, 0.4666, 0.6959]}, {"w": "the", "b": [0.4711, 0.6809, 0.4963, 0.6959]}, {"w": "model", "b": [0.5009, 0.6809, 0.5486, 0.6959]}, {"w": "training", "b": [0.5532, 0.6809, 0.6155, 0.6959]}, {"w": "process.", "b": [0.6201, 0.6809, 0.6822, 0.6959]}, {"w": "Some", "b": [0.6899, 0.6809, 0.7321, 0.6959]}, {"w": "hyperparameters", "b": [0.7367, 0.6809, 0.8691, 0.6959]}, {"w": "influence", "b": [0.1312, 0.6989, 0.2034, 0.7138]}, {"w": "the", "b": [0.2102, 0.6989, 0.2364, 0.7138]}, {"w": "speed", "b": [0.2431, 0.6989, 0.2887, 0.7138]}, {"w": "of", "b": [0.2955, 0.6989, 0.3107, 0.7138]}, {"w": "training,", "b": [0.3174, 0.6989, 0.3876, 0.7138]}, {"w": "but", "b": [0.3945, 0.6989, 0.4227, 0.7138]}, {"w": "the", "b": [0.4295, 0.6989, 0.4557, 0.7138]}, {"w": "most", "b": [0.4624, 0.6989, 0.5023, 0.7138]}, {"w": "important", "b": [0.509, 0.6989, 0.5917, 0.7138]}, {"w": "hyperparameters", "b": [0.5985, 0.6989, 0.7363, 0.7138]}, {"w": "control", "b": [0.7431, 0.6989, 0.8001, 0.7138]}, {"w": "the", "b": [0.8069, 0.6989, 0.8331, 0.7138]}, {"w": "two", "b": [0.8398, 0.6989, 0.8691, 0.7138]}, {"w": "tradeoffs:", "b": [0.1312, 0.7168, 0.2057, 0.7318]}, {"w": "bias-variance", "b": [0.2139, 0.7168, 0.3182, 0.7318]}, {"w": "and", "b": [0.3243, 0.7168, 0.3541, 0.7318]}, {"w": "precision-recall.", "b": [0.3602, 0.7168, 0.4856, 0.7318]}]}, {"id": "b_13", "type": "paragraph", "text": "Hyperparameters aren’t optimized by the learning algorithm itself. The data analyst “tunes” hyperparameters by experimenting with combinations of values, one per hyperparameter. Each machine learning model and each learning algorithm have a unique set of hyperparameters. Furthermore, every step in your entire machine learning pipeline, data pre-processing, feature extraction, model training, and making predictions, can have its own hyperparameters.", "words": [{"w": "Hyperparameters", "b": [0.1312, 0.7437, 0.2681, 0.7587]}, {"w": "aren’t", "b": [0.2742, 0.7437, 0.3207, 0.7587]}, {"w": "optimized", "b": [0.3268, 0.7437, 0.4044, 0.7587]}, {"w": "by", "b": [0.4106, 0.7437, 0.4297, 0.7587]}, {"w": "the", "b": [0.4359, 0.7437, 0.4611, 0.7587]}, {"w": "learning", "b": [0.4673, 0.7437, 0.5308, 0.7587]}, {"w": "algorithm", "b": [0.537, 0.7437, 0.6136, 0.7587]}, {"w": "itself.", "b": [0.6198, 0.7437, 0.6627, 0.7587]}, {"w": "The", "b": [0.671, 0.7437, 0.7022, 0.7587]}, {"w": "data", "b": [0.7084, 0.7437, 0.7436, 0.7587]}, {"w": "analyst", "b": [0.7498, 0.7437, 0.8069, 0.7587]}, {"w": "“tunes”", "b": [0.813, 0.7437, 0.8726, 0.7587]}, {"w": "hyperparameters", "b": [0.1312, 0.7617, 0.2637, 0.7766]}, {"w": "by", "b": [0.2678, 0.7617, 0.2869, 0.7766]}, {"w": "experimenting", "b": [0.2911, 0.7617, 0.4032, 0.7766]}, {"w": "with", "b": [0.4074, 0.7617, 0.4425, 0.7766]}, {"w": "combinations", "b": [0.4467, 0.7617, 0.5508, 0.7766]}, {"w": "of", "b": [0.555, 0.7617, 0.5696, 0.7766]}, {"w": "values,", "b": [0.5737, 0.7617, 0.6266, 0.7766]}, {"w": "one", "b": [0.6312, 0.7617, 0.6583, 0.7766]}, {"w": "per", "b": [0.6625, 0.7617, 0.6882, 0.7766]}, {"w": "hyperparameter.", "b": [0.6924, 0.7617, 0.8227, 0.7766]}, {"w": "Each", "b": [0.8302, 0.7617, 0.8691, 0.7766]}, {"w": "machine", "b": [0.1312, 0.7796, 0.1977, 0.7946]}, {"w": "learning", "b": [0.2038, 0.7796, 0.2688, 0.7946]}, {"w": "model", "b": [0.275, 0.7796, 0.3239, 0.7946]}, {"w": "and", "b": [0.33, 0.7796, 0.3599, 0.7946]}, {"w": "each", "b": [0.3661, 0.7796, 0.4016, 0.7946]}, {"w": "learning", "b": [0.4078, 0.7796, 0.4727, 0.7946]}, {"w": "algorithm", "b": [0.4789, 0.7796, 0.5572, 0.7946]}, {"w": "have", "b": [0.5634, 0.7796, 0.6, 0.7946]}, {"w": "a", "b": [0.6061, 0.7796, 0.6154, 0.7946]}, {"w": "unique", "b": [0.6215, 0.7796, 0.6756, 0.7946]}, {"w": "set", "b": [0.6817, 0.7796, 0.7045, 0.7946]}, {"w": "of", "b": [0.7107, 0.7796, 0.7256, 0.7946]}, {"w": "hyperparameters.", "b": [0.7317, 0.7796, 0.8727, 0.7946]}, {"w": "Furthermore,", "b": [0.1312, 0.7976, 0.2351, 0.8125]}, {"w": "every", "b": [0.2409, 0.7976, 0.2826, 0.8125]}, {"w": "step", "b": [0.2883, 0.7976, 0.3206, 0.8125]}, {"w": "in", "b": [0.3262, 0.7976, 0.3413, 0.8125]}, {"w": "your", "b": [0.3469, 0.7976, 0.3822, 0.8125]}, {"w": "entire", "b": [0.3878, 0.7976, 0.4326, 0.8125]}, {"w": "machine", "b": [0.4383, 0.7976, 0.5031, 0.8125]}, {"w": "learning", "b": [0.5087, 0.7976, 0.5721, 0.8125]}, {"w": "pipeline,", "b": [0.5777, 0.7976, 0.6446, 0.8125]}, {"w": "data", "b": [0.6504, 0.7976, 0.6855, 0.8125]}, {"w": "pre-processing,", "b": [0.6912, 0.7976, 0.8086, 0.8125]}, {"w": "feature", "b": [0.8144, 0.7976, 0.8692, 0.8125]}, {"w": "extraction,", "b": [0.1312, 0.8155, 0.2179, 0.8305]}, {"w": "model", "b": [0.2241, 0.8155, 0.2728, 0.8305]}, {"w": "training,", "b": [0.2789, 0.8155, 0.3477, 0.8305]}, {"w": "and", "b": [0.3538, 0.8155, 0.3836, 0.8305]}, {"w": "making", "b": [0.3897, 0.8155, 0.4487, 0.8305]}, {"w": "predictions,", "b": [0.4548, 0.8155, 0.5483, 0.8305]}, {"w": "can", "b": [0.5545, 0.8155, 0.5822, 0.8305]}, {"w": "have", "b": [0.5883, 0.8155, 0.6247, 0.8305]}, {"w": "its", "b": [0.6309, 0.8155, 0.6505, 0.8305]}, {"w": "own", "b": [0.6566, 0.8155, 0.6889, 0.8305]}, {"w": "hyperparameters.", "b": [0.695, 0.8155, 0.8353, 0.8305]}]}, {"id": "b_14", "type": "paragraph", "text": "For example, in data pre-processing, the hyperparameters could specify whether to use data-augmentation or using which technique to fill missing values. In feature engineering,", "words": [{"w": "For", "b": [0.1312, 0.8424, 0.1588, 0.8574]}, {"w": "example,", "b": [0.1669, 0.8424, 0.2396, 0.8574]}, {"w": "in", "b": [0.2482, 0.8424, 0.2639, 0.8574]}, {"w": "data", "b": [0.272, 0.8424, 0.3086, 0.8574]}, {"w": "pre-processing,", "b": [0.3167, 0.8424, 0.4389, 0.8574]}, {"w": "the", "b": [0.4475, 0.8424, 0.4737, 0.8574]}, {"w": "hyperparameters", "b": [0.4818, 0.8424, 0.6196, 0.8574]}, {"w": "could", "b": [0.6277, 0.8424, 0.6717, 0.8574]}, {"w": "specify", "b": [0.6798, 0.8424, 0.7358, 0.8574]}, {"w": "whether", "b": [0.744, 0.8424, 0.8099, 0.8574]}, {"w": "to", "b": [0.818, 0.8424, 0.8348, 0.8574]}, {"w": "use", "b": [0.8429, 0.8424, 0.8692, 0.8574]}, {"w": "data-augmentation", "b": [0.1312, 0.8604, 0.2865, 0.8753]}, {"w": "or", "b": [0.2929, 0.8604, 0.3097, 0.8753]}, {"w": "using", "b": [0.3161, 0.8604, 0.3591, 0.8753]}, {"w": "which", "b": [0.3655, 0.8604, 0.4131, 0.8753]}, {"w": "technique", "b": [0.4195, 0.8604, 0.498, 0.8753]}, {"w": "to", "b": [0.5044, 0.8604, 0.5211, 0.8753]}, {"w": "fill", "b": [0.5275, 0.8604, 0.5485, 0.8753]}, {"w": "missing", "b": [0.5549, 0.8604, 0.6157, 0.8753]}, {"w": "values.", "b": [0.6221, 0.8604, 0.6772, 0.8753]}, {"w": "In", "b": [0.6862, 0.8604, 0.7034, 0.8753]}, {"w": "feature", "b": [0.7098, 0.8604, 0.7669, 0.8753]}, {"w": "engineering,", "b": [0.7733, 0.8604, 0.8717, 0.8753]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 24", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "24", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 163, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Hyperparameter 1 (e.g. learning rate)", "words": [{"w": "Hyperparameter", "b": [0.3804, 0.3993, 0.4968, 0.4154]}, {"w": "1", "b": [0.5012, 0.3993, 0.5102, 0.4154]}, {"w": "(e.g.", "b": [0.5147, 0.3993, 0.5465, 0.4154]}, {"w": "learning", "b": [0.551, 0.3993, 0.6097, 0.4154]}, {"w": "rate)", "b": [0.6142, 0.3993, 0.647, 0.4154]}]}, {"id": "b_1", "type": "paragraph", "text": "Hyperparameter 2 (e.g. number of trees)", "words": [{"w": "Hyperparameter", "b": [0.2803, 0.2539, 0.3002, 0.3483]}, {"w": "2", "b": [0.2803, 0.243, 0.3002, 0.2503]}, {"w": "(e.g.", "b": [0.2803, 0.2136, 0.3002, 0.2394]}, {"w": "number", "b": [0.2803, 0.1656, 0.3002, 0.2099]}, {"w": "of", "b": [0.2803, 0.1498, 0.3002, 0.1619]}, {"w": "trees)", "b": [0.2803, 0.1139, 0.3002, 0.1462]}]}, {"id": "b_2", "type": "paragraph", "text": "pairs of discrete", "words": [{"w": "pairs", "b": [0.7259, 0.1041, 0.7606, 0.1171]}, {"w": "of", "b": [0.765, 0.1041, 0.7784, 0.1171]}, {"w": "discrete", "b": [0.7829, 0.1041, 0.839, 0.1171]}]}, {"id": "b_3", "type": "paragraph", "text": "values", "words": [{"w": "values", "b": [0.7593, 0.1194, 0.8056, 0.1324]}]}, {"id": "b_4", "type": "paragraph", "text": "Figure 6: Grid search for two hyperparameters: each green circle represents a pair of hyperparameter values.", "words": [{"w": "Figure", "b": [0.1312, 0.4325, 0.1844, 0.4475]}, {"w": "6:", "b": [0.1932, 0.4325, 0.2078, 0.4475]}, {"w": "Grid", "b": [0.2213, 0.4325, 0.2592, 0.4475]}, {"w": "search", "b": [0.268, 0.4325, 0.3189, 0.4475]}, {"w": "for", "b": [0.3277, 0.4325, 0.3503, 0.4475]}, {"w": "two", "b": [0.3591, 0.4325, 0.3883, 0.4475]}, {"w": "hyperparameters:", "b": [0.3972, 0.4325, 0.5402, 0.4475]}, {"w": "each", "b": [0.5537, 0.4325, 0.5898, 0.4475]}, {"w": "green", "b": [0.5986, 0.4325, 0.6426, 0.4475]}, {"w": "circle", "b": [0.6514, 0.4325, 0.6944, 0.4475]}, {"w": "represents", "b": [0.7032, 0.4325, 0.7857, 0.4475]}, {"w": "a", "b": [0.7945, 0.4325, 0.8039, 0.4475]}, {"w": "pair", "b": [0.8127, 0.4325, 0.8452, 0.4475]}, {"w": "of", "b": [0.854, 0.4325, 0.8692, 0.4475]}, {"w": "hyperparameter", "b": [0.1312, 0.4505, 0.2591, 0.4654]}, {"w": "values.", "b": [0.2652, 0.4505, 0.3192, 0.4654]}]}, {"id": "b_5", "type": "paragraph", "text": "a hyperparameter could define which feature selection technique to apply. When making predictions with a model that returns a score, a hyperparameter could specify the decision threshold for each class.", "words": [{"w": "a", "b": [0.1312, 0.5007, 0.1406, 0.5157]}, {"w": "hyperparameter", "b": [0.1474, 0.5007, 0.2778, 0.5157]}, {"w": "could", "b": [0.2846, 0.5007, 0.3285, 0.5157]}, {"w": "define", "b": [0.3353, 0.5007, 0.3835, 0.5157]}, {"w": "which", "b": [0.3902, 0.5007, 0.4379, 0.5157]}, {"w": "feature", "b": [0.4447, 0.5007, 0.5017, 0.5157]}, {"w": "selection", "b": [0.5085, 0.5007, 0.5787, 0.5157]}, {"w": "technique", "b": [0.5855, 0.5007, 0.664, 0.5157]}, {"w": "to", "b": [0.6708, 0.5007, 0.6875, 0.5157]}, {"w": "apply.", "b": [0.6943, 0.5007, 0.7435, 0.5157]}, {"w": "When", "b": [0.7536, 0.5007, 0.8022, 0.5157]}, {"w": "making", "b": [0.809, 0.5007, 0.8692, 0.5157]}, {"w": "predictions", "b": [0.1312, 0.5187, 0.2203, 0.5336]}, {"w": "with", "b": [0.2265, 0.5187, 0.2626, 0.5336]}, {"w": "a", "b": [0.2688, 0.5187, 0.2781, 0.5336]}, {"w": "model", "b": [0.2842, 0.5187, 0.3333, 0.5336]}, {"w": "that", "b": [0.3395, 0.5187, 0.3736, 0.5336]}, {"w": "returns", "b": [0.3798, 0.5187, 0.4379, 0.5336]}, {"w": "a", "b": [0.444, 0.5187, 0.4533, 0.5336]}, {"w": "score,", "b": [0.4595, 0.5187, 0.5051, 0.5336]}, {"w": "a", "b": [0.5113, 0.5187, 0.5206, 0.5336]}, {"w": "hyperparameter", "b": [0.5268, 0.5187, 0.6556, 0.5336]}, {"w": "could", "b": [0.6618, 0.5187, 0.7052, 0.5336]}, {"w": "specify", "b": [0.7114, 0.5187, 0.7668, 0.5336]}, {"w": "the", "b": [0.773, 0.5187, 0.7988, 0.5336]}, {"w": "decision", "b": [0.805, 0.5187, 0.8692, 0.5336]}, {"w": "threshold", "b": [0.1312, 0.5366, 0.2063, 0.5516]}, {"w": "for", "b": [0.2124, 0.5366, 0.2345, 0.5516]}, {"w": "each", "b": [0.2407, 0.5366, 0.276, 0.5516]}, {"w": "class.", "b": [0.2822, 0.5366, 0.3245, 0.5516]}]}, {"id": "b_6", "type": "paragraph", "text": "Below, we consider several popular hyperparameter tuning techniques.", "words": [{"w": "Below,", "b": [0.1312, 0.5635, 0.1848, 0.5785]}, {"w": "we", "b": [0.1909, 0.5635, 0.212, 0.5785]}, {"w": "consider", "b": [0.2181, 0.5635, 0.2839, 0.5785]}, {"w": "several", "b": [0.2901, 0.5635, 0.3446, 0.5785]}, {"w": "popular", "b": [0.3507, 0.5635, 0.4128, 0.5785]}, {"w": "hyperparameter", "b": [0.4188, 0.5638, 0.5674, 0.5788]}, {"w": "tuning", "b": [0.5744, 0.5638, 0.6345, 0.5788]}, {"w": "techniques.", "b": [0.6416, 0.5635, 0.7441, 0.5788]}]}, {"id": "b_7", "type": "paragraph", "text": "5.6.1 Grid Search", "words": [{"w": "5.6.1", "b": [0.1312, 0.6117, 0.1749, 0.6266]}, {"w": "Grid", "b": [0.1961, 0.6117, 0.2392, 0.6266]}, {"w": "Search", "b": [0.2463, 0.6117, 0.3075, 0.6266]}]}, {"id": "b_8", "type": "paragraph", "text": "Grid search is the simplest hyperparameter tuning technique. It’s used when the number of hyperparameters and their range is not too large.", "words": [{"w": "Grid", "b": [0.1312, 0.6483, 0.1743, 0.6632]}, {"w": "search", "b": [0.1814, 0.6483, 0.2392, 0.6632]}, {"w": "is", "b": [0.2454, 0.648, 0.2579, 0.6629]}, {"w": "the", "b": [0.2641, 0.648, 0.2899, 0.6629]}, {"w": "simplest", "b": [0.296, 0.648, 0.3622, 0.6629]}, {"w": "hyperparameter", "b": [0.3684, 0.648, 0.497, 0.6629]}, {"w": "tuning", "b": [0.5032, 0.648, 0.5558, 0.6629]}, {"w": "technique.", "b": [0.5619, 0.648, 0.6445, 0.6629]}, {"w": "It’s", "b": [0.6527, 0.648, 0.6791, 0.6629]}, {"w": "used", "b": [0.6853, 0.648, 0.7215, 0.6629]}, {"w": "when", "b": [0.7276, 0.648, 0.7699, 0.6629]}, {"w": "the", "b": [0.7761, 0.648, 0.8019, 0.6629]}, {"w": "number", "b": [0.808, 0.648, 0.8695, 0.6629]}, {"w": "of", "b": [0.1312, 0.6659, 0.1461, 0.6809]}, {"w": "hyperparameters", "b": [0.1522, 0.6659, 0.2874, 0.6809]}, {"w": "and", "b": [0.2935, 0.6659, 0.3233, 0.6809]}, {"w": "their", "b": [0.3294, 0.6659, 0.3674, 0.6809]}, {"w": "range", "b": [0.3736, 0.6659, 0.4177, 0.6809]}, {"w": "is", "b": [0.4239, 0.6659, 0.4363, 0.6809]}, {"w": "not", "b": [0.4424, 0.6659, 0.4691, 0.6809]}, {"w": "too", "b": [0.4752, 0.6659, 0.5014, 0.6809]}, {"w": "large.", "b": [0.5075, 0.6659, 0.5517, 0.6809]}]}, {"id": "b_9", "type": "paragraph", "text": "We explain it for the problem of tuning two numerical hyperparameters. The technique", "words": [{"w": "We", "b": [0.1303, 0.6928, 0.1565, 0.7078]}, {"w": "explain", "b": [0.1639, 0.6928, 0.223, 0.7078]}, {"w": "it", "b": [0.2304, 0.6928, 0.2429, 0.7078]}, {"w": "for", "b": [0.2504, 0.6928, 0.2729, 0.7078]}, {"w": "the", "b": [0.2803, 0.6928, 0.3065, 0.7078]}, {"w": "problem", "b": [0.3139, 0.6928, 0.3809, 0.7078]}, {"w": "of", "b": [0.3883, 0.6928, 0.4034, 0.7078]}, {"w": "tuning", "b": [0.4108, 0.6928, 0.4642, 0.7078]}, {"w": "two", "b": [0.4716, 0.6928, 0.5009, 0.7078]}, {"w": "numerical", "b": [0.5083, 0.6928, 0.5884, 0.7078]}, {"w": "hyperparameters.", "b": [0.5958, 0.6928, 0.7388, 0.7078]}, {"w": "The", "b": [0.7508, 0.6928, 0.7832, 0.7078]}, {"w": "technique", "b": [0.7906, 0.6928, 0.8691, 0.7078]}]}, {"id": "b_10", "type": "paragraph", "text": "consists of discretizing each of the two hyperparameters, and then evaluating each pair of discrete values, as shown in Figure 6.", "words": [{"w": "consists", "b": [0.1312, 0.7108, 0.1943, 0.7257]}, {"w": "of", "b": [0.2006, 0.7108, 0.2158, 0.7257]}, {"w": "discretizing", "b": [0.2221, 0.7108, 0.3153, 0.7257]}, {"w": "each", "b": [0.3216, 0.7108, 0.3577, 0.7257]}, {"w": "of", "b": [0.364, 0.7108, 0.3792, 0.7257]}, {"w": "the", "b": [0.3854, 0.7108, 0.4116, 0.7257]}, {"w": "two", "b": [0.4179, 0.7108, 0.4472, 0.7257]}, {"w": "hyperparameters,", "b": [0.4535, 0.7108, 0.5965, 0.7257]}, {"w": "and", "b": [0.6028, 0.7108, 0.6332, 0.7257]}, {"w": "then", "b": [0.6394, 0.7108, 0.6761, 0.7257]}, {"w": "evaluating", "b": [0.6823, 0.7108, 0.7666, 0.7257]}, {"w": "each", "b": [0.7728, 0.7108, 0.809, 0.7257]}, {"w": "pair", "b": [0.8152, 0.7108, 0.8477, 0.7257]}, {"w": "of", "b": [0.854, 0.7108, 0.8692, 0.7257]}, {"w": "discrete", "b": [0.1312, 0.7287, 0.1929, 0.7437]}, {"w": "values,", "b": [0.1991, 0.7287, 0.253, 0.7437]}, {"w": "as", "b": [0.2592, 0.7287, 0.2757, 0.7437]}, {"w": "shown", "b": [0.2819, 0.7287, 0.3317, 0.7437]}, {"w": "in", "b": [0.3378, 0.7287, 0.3532, 0.7437]}, {"w": "Figure", "b": [0.3594, 0.7287, 0.4115, 0.7437]}, {"w": "6.", "b": [0.4176, 0.7287, 0.432, 0.7437]}]}, {"id": "b_11", "type": "paragraph", "text": "Each evaluation consists of:", "words": [{"w": "Each", "b": [0.1312, 0.7556, 0.171, 0.7706]}, {"w": "evaluation", "b": [0.1771, 0.7556, 0.2597, 0.7706]}, {"w": "consists", "b": [0.2658, 0.7556, 0.3277, 0.7706]}, {"w": "of:", "b": [0.3338, 0.7556, 0.3538, 0.7706]}]}, {"id": "b_12", "type": "paragraph", "text": "1) configuring a pipeline with a pair of hyperparameter values, 2) applying the pipeline to the training data and training a model, and 3) computing the performance metric for the model on the validation data.", "words": [{"w": "1)", "b": [0.1517, 0.7826, 0.1681, 0.7975]}, {"w": "configuring", "b": [0.1774, 0.7826, 0.2666, 0.7975]}, {"w": "a", "b": [0.2728, 0.7826, 0.282, 0.7975]}, {"w": "pipeline", "b": [0.2881, 0.7826, 0.3512, 0.7975]}, {"w": "with", "b": [0.3574, 0.7826, 0.3933, 0.7975]}, {"w": "a", "b": [0.3994, 0.7826, 0.4086, 0.7975]}, {"w": "pair", "b": [0.4148, 0.7826, 0.4466, 0.7975]}, {"w": "of", "b": [0.4528, 0.7826, 0.4677, 0.7975]}, {"w": "hyperparameter", "b": [0.4738, 0.7826, 0.6016, 0.7975]}, {"w": "values,", "b": [0.6078, 0.7826, 0.6617, 0.7975]}, {"w": "2)", "b": [0.1517, 0.8005, 0.1681, 0.8155]}, {"w": "applying", "b": [0.1774, 0.8005, 0.2466, 0.8155]}, {"w": "the", "b": [0.2527, 0.8005, 0.2784, 0.8155]}, {"w": "pipeline", "b": [0.2845, 0.8005, 0.3476, 0.8155]}, {"w": "to", "b": [0.3538, 0.8005, 0.3702, 0.8155]}, {"w": "the", "b": [0.3763, 0.8005, 0.4019, 0.8155]}, {"w": "training", "b": [0.4081, 0.8005, 0.4717, 0.8155]}, {"w": "data", "b": [0.4779, 0.8005, 0.5138, 0.8155]}, {"w": "and", "b": [0.5199, 0.8005, 0.5496, 0.8155]}, {"w": "training", "b": [0.5558, 0.8005, 0.6194, 0.8155]}, {"w": "a", "b": [0.6256, 0.8005, 0.6348, 0.8155]}, {"w": "model,", "b": [0.641, 0.8005, 0.6948, 0.8155]}, {"w": "and", "b": [0.7009, 0.8005, 0.7307, 0.8155]}, {"w": "3)", "b": [0.1517, 0.8184, 0.1681, 0.8334]}, {"w": "computing", "b": [0.1774, 0.8184, 0.2625, 0.8334]}, {"w": "the", "b": [0.2686, 0.8184, 0.2943, 0.8334]}, {"w": "performance", "b": [0.3004, 0.8184, 0.4, 0.8334]}, {"w": "metric", "b": [0.4061, 0.8184, 0.4575, 0.8334]}, {"w": "for", "b": [0.4636, 0.8184, 0.4857, 0.8334]}, {"w": "the", "b": [0.4919, 0.8184, 0.5175, 0.8334]}, {"w": "model", "b": [0.5237, 0.8184, 0.5723, 0.8334]}, {"w": "on", "b": [0.5785, 0.8184, 0.598, 0.8334]}, {"w": "the", "b": [0.6041, 0.8184, 0.6298, 0.8334]}, {"w": "validation", "b": [0.6359, 0.8184, 0.7154, 0.8334]}, {"w": "data.", "b": [0.7215, 0.8184, 0.7626, 0.8334]}]}, {"id": "b_13", "type": "paragraph", "text": "The pair of hyperparameter values that results in the best performing model is then selected", "words": [{"w": "The", "b": [0.1306, 0.8454, 0.1618, 0.8603]}, {"w": "pair", "b": [0.1679, 0.8454, 0.1992, 0.8603]}, {"w": "of", "b": [0.2054, 0.8454, 0.22, 0.8603]}, {"w": "hyperparameter", "b": [0.2261, 0.8454, 0.3518, 0.8603]}, {"w": "values", "b": [0.3579, 0.8454, 0.4059, 0.8603]}, {"w": "that", "b": [0.412, 0.8454, 0.4453, 0.8603]}, {"w": "results", "b": [0.4514, 0.8454, 0.5031, 0.8603]}, {"w": "in", "b": [0.5092, 0.8454, 0.5244, 0.8603]}, {"w": "the", "b": [0.5305, 0.8454, 0.5557, 0.8603]}, {"w": "best", "b": [0.5618, 0.8454, 0.5947, 0.8603]}, {"w": "performing", "b": [0.6008, 0.8454, 0.6876, 0.8603]}, {"w": "model", "b": [0.6938, 0.8454, 0.7416, 0.8603]}, {"w": "is", "b": [0.7478, 0.8454, 0.76, 0.8603]}, {"w": "then", "b": [0.7661, 0.8454, 0.8014, 0.8603]}, {"w": "selected", "b": [0.8075, 0.8454, 0.8692, 0.8603]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 25", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "25", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 164, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "for training the final model.", "words": [{"w": "for", "b": [0.1312, 0.0881, 0.1533, 0.1031]}, {"w": "training", "b": [0.1595, 0.0881, 0.2231, 0.1031]}, {"w": "the", "b": [0.2293, 0.0881, 0.2549, 0.1031]}, {"w": "final", "b": [0.2611, 0.0881, 0.2959, 0.1031]}, {"w": "model.", "b": [0.3021, 0.0881, 0.3559, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "The Python code below uses grid search with cross-validation.2 It shows how to optimize the hyperparameters of the simple two-stage scikit-learn pipeline considered above:", "words": [{"w": "The", "b": [0.1306, 0.115, 0.1617, 0.13]}, {"w": "Python", "b": [0.1677, 0.115, 0.2257, 0.13]}, {"w": "code", "b": [0.2317, 0.115, 0.2673, 0.13]}, {"w": "below", "b": [0.2733, 0.115, 0.3185, 0.13]}, {"w": "uses", "b": [0.3245, 0.115, 0.3568, 0.13]}, {"w": "grid", "b": [0.3628, 0.115, 0.394, 0.13]}, {"w": "search", "b": [0.4, 0.115, 0.4489, 0.13]}, {"w": "with", "b": [0.4548, 0.115, 0.49, 0.13]}, {"w": "cross-validation.2", "b": [0.4959, 0.1134, 0.6304, 0.13]}, {"w": "It", "b": [0.6394, 0.115, 0.653, 0.13]}, {"w": "shows", "b": [0.659, 0.115, 0.7049, 0.13]}, {"w": "how", "b": [0.7108, 0.115, 0.7424, 0.13]}, {"w": "to", "b": [0.7484, 0.115, 0.7645, 0.13]}, {"w": "optimize", "b": [0.7704, 0.115, 0.8378, 0.13]}, {"w": "the", "b": [0.8437, 0.115, 0.8688, 0.13]}, {"w": "hyperparameters", "b": [0.1312, 0.133, 0.2664, 0.1479]}, {"w": "of", "b": [0.2725, 0.133, 0.2874, 0.1479]}, {"w": "the", "b": [0.2935, 0.133, 0.3192, 0.1479]}, {"w": "simple", "b": [0.3253, 0.133, 0.3767, 0.1479]}, {"w": "two-stage", "b": [0.3828, 0.133, 0.4588, 0.1479]}, {"w": "scikit-learn", "b": [0.4649, 0.133, 0.5538, 0.1479]}, {"w": "pipeline", "b": [0.56, 0.133, 0.6231, 0.1479]}, {"w": "considered", "b": [0.6292, 0.133, 0.7135, 0.1479]}, {"w": "above:", "b": [0.7196, 0.133, 0.7709, 0.1479]}]}, {"id": "b_2", "type": "paragraph", "text": "1 from sklearn.pipeline import Pipeline", "words": [{"w": "1", "b": [0.1028, 0.166, 0.1091, 0.1735]}, {"w": "from", "b": [0.1312, 0.1599, 0.17, 0.1748]}, {"w": "sklearn.pipeline", "b": [0.1797, 0.1599, 0.3346, 0.1748]}, {"w": "import", "b": [0.3443, 0.1599, 0.4024, 0.1748]}, {"w": "Pipeline", "b": [0.4121, 0.1599, 0.4896, 0.1748]}]}, {"id": "b_3", "type": "paragraph", "text": "2 from sklearn.svm import SVC", "words": [{"w": "2", "b": [0.1028, 0.184, 0.1091, 0.1914]}, {"w": "from", "b": [0.1312, 0.1778, 0.17, 0.1928]}, {"w": "sklearn.svm", "b": [0.1797, 0.1778, 0.2862, 0.1928]}, {"w": "import", "b": [0.2959, 0.1778, 0.354, 0.1928]}, {"w": "SVC", "b": [0.3637, 0.1778, 0.3928, 0.1928]}]}, {"id": "b_4", "type": "paragraph", "text": "3 from sklearn.decomposition import PCA", "words": [{"w": "3", "b": [0.1028, 0.2019, 0.1091, 0.2094]}, {"w": "from", "b": [0.1312, 0.1958, 0.17, 0.2107]}, {"w": "sklearn.decomposition", "b": [0.1797, 0.1958, 0.3831, 0.2107]}, {"w": "import", "b": [0.3928, 0.1958, 0.4509, 0.2107]}, {"w": "PCA", "b": [0.4606, 0.1958, 0.4896, 0.2107]}]}, {"id": "b_5", "type": "equation", "text": "4 from sklearn.model_selection import GridSearchCV", "words": [{"w": "4", "b": [0.1028, 0.2199, 0.1091, 0.2273]}, {"w": "from", "b": [0.1312, 0.2137, 0.17, 0.2287]}, {"w": "sklearn.model_selection", "b": [0.1797, 0.2137, 0.4024, 0.2287]}, {"w": "import", "b": [0.4121, 0.2137, 0.4702, 0.2287]}, {"w": "GridSearchCV", "b": [0.4799, 0.2137, 0.5962, 0.2287]}]}, {"id": "b_7", "type": "paragraph", "text": "6 # Define a pipeline", "words": [{"w": "6", "b": [0.1028, 0.2557, 0.1091, 0.2632]}, {"w": "#", "b": [0.1312, 0.2507, 0.1409, 0.2656]}, {"w": "Define", "b": [0.1506, 0.2507, 0.2087, 0.2656]}, {"w": "a", "b": [0.2184, 0.2507, 0.2281, 0.2656]}, {"w": "pipeline", "b": [0.2378, 0.2507, 0.3153, 0.2656]}]}, {"id": "b_8", "type": "equation", "text": "7 pipe = Pipeline([('dim_reduction', PCA()), ('model_training', SVC())])", "words": [{"w": "7", "b": [0.1028, 0.2737, 0.1091, 0.2812]}, {"w": "pipe", "b": [0.1312, 0.2676, 0.17, 0.2825]}, {"w": "=", "b": [0.1797, 0.2676, 0.1893, 0.2825]}, {"w": "Pipeline([('dim_reduction',", "b": [0.199, 0.2676, 0.4606, 0.2825]}, {"w": "PCA()),", "b": [0.4702, 0.2676, 0.538, 0.2825]}, {"w": "('model_training',", "b": [0.5477, 0.2676, 0.7221, 0.2825]}, {"w": "SVC())])", "b": [0.7318, 0.2676, 0.8092, 0.2825]}]}, {"id": "b_10", "type": "paragraph", "text": "9 # Define hyperparamer values to try", "words": [{"w": "9", "b": [0.1028, 0.3096, 0.1091, 0.3171]}, {"w": "#", "b": [0.1312, 0.3045, 0.1409, 0.3195]}, {"w": "Define", "b": [0.1506, 0.3045, 0.2087, 0.3195]}, {"w": "hyperparamer", "b": [0.2184, 0.3045, 0.3346, 0.3195]}, {"w": "values", "b": [0.3443, 0.3045, 0.4024, 0.3195]}, {"w": "to", "b": [0.4121, 0.3045, 0.4315, 0.3195]}, {"w": "try", "b": [0.4412, 0.3045, 0.4702, 0.3195]}]}, {"id": "b_11", "type": "equation", "text": "10 param_grid = dict(dim_reduction__n_components=[2, 5, 10], \\", "words": [{"w": "10", "b": [0.0965, 0.3275, 0.1091, 0.335]}, {"w": "param_grid", "b": [0.1312, 0.3214, 0.2281, 0.3364]}, {"w": "=", "b": [0.2378, 0.3214, 0.2475, 0.3364]}, {"w": "dict(dim_reduction__n_components=[2,", "b": [0.2571, 0.3214, 0.6058, 0.3364]}, {"w": "5,", "b": [0.6155, 0.3214, 0.6349, 0.3364]}, {"w": "10],", "b": [0.6446, 0.3214, 0.6833, 0.3364]}, {"w": "\\", "b": [0.693, 0.3214, 0.7027, 0.3364]}]}, {"id": "b_12", "type": "equation", "text": "11 model_training__C=[0.1, 10, 100])", "words": [{"w": "11", "b": [0.0965, 0.3455, 0.1091, 0.353]}, {"w": "model_training__C=[0.1,", "b": [0.1312, 0.3394, 0.354, 0.3543]}, {"w": "10,", "b": [0.3637, 0.3394, 0.3928, 0.3543]}, {"w": "100])", "b": [0.4024, 0.3394, 0.4509, 0.3543]}]}, {"id": "b_14", "type": "equation", "text": "13 grid_search = GridSearchCV(pipe, param_grid=param_grid)", "words": [{"w": "13", "b": [0.0965, 0.3814, 0.1091, 0.3889]}, {"w": "grid_search", "b": [0.1312, 0.3752, 0.2378, 0.3902]}, {"w": "=", "b": [0.2475, 0.3752, 0.2571, 0.3902]}, {"w": "GridSearchCV(pipe,", "b": [0.2668, 0.3752, 0.4412, 0.3902]}, {"w": "param_grid=param_grid)", "b": [0.4509, 0.3752, 0.664, 0.3902]}]}, {"id": "b_16", "type": "paragraph", "text": "15 # Make a prediction", "words": [{"w": "15", "b": [0.0965, 0.4173, 0.1091, 0.4247]}, {"w": "#", "b": [0.1312, 0.4122, 0.1409, 0.4272]}, {"w": "Make", "b": [0.1506, 0.4122, 0.1893, 0.4272]}, {"w": "a", "b": [0.199, 0.4122, 0.2087, 0.4272]}, {"w": "prediction", "b": [0.2184, 0.4122, 0.3153, 0.4272]}]}, {"id": "b_17", "type": "equation", "text": "16 pipe.predict(new_example)", "words": [{"w": "16", "b": [0.0965, 0.4352, 0.1091, 0.4427]}, {"w": "pipe.predict(new_example)", "b": [0.1312, 0.4291, 0.3734, 0.444]}]}, {"id": "b_18", "type": "paragraph", "text": "In the above example, we use grid search to try the values [2, 5, 10] of the hyperparameter n_components of PCA, and the values [0.1, 10, 100] of the hyperparameter C of SVM.", "words": [{"w": "In", "b": [0.1312, 0.456, 0.1484, 0.471]}, {"w": "the", "b": [0.1546, 0.456, 0.1807, 0.471]}, {"w": "above", "b": [0.1868, 0.456, 0.2338, 0.471]}, {"w": "example,", "b": [0.2399, 0.456, 0.3124, 0.471]}, {"w": "we", "b": [0.3185, 0.456, 0.3399, 0.471]}, {"w": "use", "b": [0.346, 0.456, 0.3722, 0.471]}, {"w": "grid", "b": [0.3784, 0.456, 0.4108, 0.471]}, {"w": "search", "b": [0.4169, 0.456, 0.4677, 0.471]}, {"w": "to", "b": [0.4738, 0.456, 0.4905, 0.471]}, {"w": "try", "b": [0.4966, 0.456, 0.5212, 0.471]}, {"w": "the", "b": [0.5273, 0.456, 0.5534, 0.471]}, {"w": "values", "b": [0.5596, 0.456, 0.6092, 0.471]}, {"w": "[2,", "b": [0.6152, 0.456, 0.635, 0.4712]}, {"w": "5,", "b": [0.638, 0.456, 0.6525, 0.4712]}, {"w": "10]", "b": [0.6556, 0.456, 0.6796, 0.471]}, {"w": "of", "b": [0.6857, 0.456, 0.7009, 0.471]}, {"w": "the", "b": [0.707, 0.456, 0.7331, 0.471]}, {"w": "hyperparameter", "b": [0.7392, 0.456, 0.8692, 0.471]}, {"w": "n_components", "b": [0.1312, 0.474, 0.2475, 0.4889]}, {"w": "of", "b": [0.2536, 0.474, 0.2685, 0.4889]}, {"w": "PCA,", "b": [0.2746, 0.474, 0.3195, 0.4889]}, {"w": "and", "b": [0.3256, 0.474, 0.3554, 0.4889]}, {"w": "the", "b": [0.3615, 0.474, 0.3872, 0.4889]}, {"w": "values", "b": [0.3933, 0.474, 0.4421, 0.4889]}, {"w": "[0.1,", "b": [0.4482, 0.474, 0.4821, 0.4892]}, {"w": "10,", "b": [0.4852, 0.474, 0.5088, 0.4892]}, {"w": "100]", "b": [0.5118, 0.474, 0.5446, 0.4889]}, {"w": "of", "b": [0.5508, 0.474, 0.5657, 0.4889]}, {"w": "the", "b": [0.5718, 0.474, 0.5974, 0.4889]}, {"w": "hyperparameter", "b": [0.6036, 0.474, 0.7314, 0.4889]}, {"w": "C", "b": [0.7375, 0.474, 0.7472, 0.4889]}, {"w": "of", "b": [0.7533, 0.474, 0.7682, 0.4889]}, {"w": "SVM.", "b": [0.7743, 0.474, 0.8205, 0.4889]}]}, {"id": "b_19", "type": "paragraph", "text": "Trying multiple combinations of hyperparameters could be time-consuming for large datasets. There are more efficient techniques, such as random search, coarse-to-fine search, and Bayesian hyperparameter optimization.", "words": [{"w": "Trying", "b": [0.1306, 0.5009, 0.1828, 0.5158]}, {"w": "multiple", "b": [0.1887, 0.5009, 0.2536, 0.5158]}, {"w": "combinations", "b": [0.2594, 0.5009, 0.3635, 0.5158]}, {"w": "of", "b": [0.3694, 0.5009, 0.384, 0.5158]}, {"w": "hyperparameters", "b": [0.3899, 0.5009, 0.5223, 0.5158]}, {"w": "could", "b": [0.5282, 0.5009, 0.5704, 0.5158]}, {"w": "be", "b": [0.5763, 0.5009, 0.5949, 0.5158]}, {"w": "time-consuming", "b": [0.6008, 0.5009, 0.7255, 0.5158]}, {"w": "for", "b": [0.7314, 0.5009, 0.7531, 0.5158]}, {"w": "large", "b": [0.759, 0.5009, 0.7972, 0.5158]}, {"w": "datasets.", "b": [0.8031, 0.5009, 0.8727, 0.5158]}, {"w": "There", "b": [0.1306, 0.5188, 0.1769, 0.5338]}, {"w": "are", "b": [0.1816, 0.5188, 0.2058, 0.5338]}, {"w": "more", "b": [0.2105, 0.5188, 0.2498, 0.5338]}, {"w": "efficient", "b": [0.2545, 0.5188, 0.3153, 0.5338]}, {"w": "techniques,", "b": [0.3201, 0.5188, 0.4076, 0.5338]}, {"w": "such", "b": [0.4127, 0.5188, 0.4474, 0.5338]}, {"w": "as", "b": [0.4522, 0.5188, 0.4684, 0.5338]}, {"w": "random", "b": [0.4732, 0.5188, 0.5335, 0.5338]}, {"w": "search,", "b": [0.5382, 0.5188, 0.5922, 0.5338]}, {"w": "coarse-to-fine", "b": [0.5972, 0.5188, 0.7019, 0.5338]}, {"w": "search,", "b": [0.7066, 0.5188, 0.7605, 0.5338]}, {"w": "and", "b": [0.7656, 0.5188, 0.7947, 0.5338]}, {"w": "Bayesian", "b": [0.7995, 0.5188, 0.8691, 0.5338]}, {"w": "hyperparameter", "b": [0.1312, 0.5368, 0.2591, 0.5517]}, {"w": "optimization.", "b": [0.2652, 0.5368, 0.3718, 0.5517]}]}, {"id": "b_20", "type": "paragraph", "text": "5.6.2 Random Search", "words": [{"w": "5.6.2", "b": [0.1312, 0.5849, 0.1749, 0.5999]}, {"w": "Random", "b": [0.1961, 0.5849, 0.2742, 0.5999]}, {"w": "Search", "b": [0.2812, 0.5849, 0.3424, 0.5999]}]}, {"id": "b_21", "type": "paragraph", "text": "Random search differs from grid search in that you do not provide a discrete set of values to explore for each hyperparameter. Instead, you provide a statistical distribution for each hyperparameter from which values are randomly sampled. Then set the total number of combinations you want to evaluate, as shown in Figure 7.", "words": [{"w": "Random", "b": [0.1312, 0.6215, 0.2093, 0.6365]}, {"w": "search", "b": [0.2164, 0.6215, 0.2742, 0.6365]}, {"w": "differs", "b": [0.2804, 0.6212, 0.3287, 0.6362]}, {"w": "from", "b": [0.3348, 0.6212, 0.3718, 0.6362]}, {"w": "grid", "b": [0.378, 0.6212, 0.4094, 0.6362]}, {"w": "search", "b": [0.4156, 0.6212, 0.4648, 0.6362]}, {"w": "in", "b": [0.471, 0.6212, 0.4861, 0.6362]}, {"w": "that", "b": [0.4923, 0.6212, 0.5257, 0.6362]}, {"w": "you", "b": [0.5319, 0.6212, 0.5602, 0.6362]}, {"w": "do", "b": [0.5664, 0.6212, 0.5856, 0.6362]}, {"w": "not", "b": [0.5918, 0.6212, 0.6181, 0.6362]}, {"w": "provide", "b": [0.6242, 0.6212, 0.683, 0.6362]}, {"w": "a", "b": [0.6892, 0.6212, 0.6983, 0.6362]}, {"w": "discrete", "b": [0.7044, 0.6212, 0.7653, 0.6362]}, {"w": "set", "b": [0.7715, 0.6212, 0.7939, 0.6362]}, {"w": "of", "b": [0.8, 0.6212, 0.8147, 0.6362]}, {"w": "values", "b": [0.8209, 0.6212, 0.8691, 0.6362]}, {"w": "to", "b": [0.1312, 0.6391, 0.1478, 0.6541]}, {"w": "explore", "b": [0.1539, 0.6391, 0.2124, 0.6541]}, {"w": "for", "b": [0.2185, 0.6391, 0.2408, 0.6541]}, {"w": "each", "b": [0.247, 0.6391, 0.2827, 0.6541]}, {"w": "hyperparameter.", "b": [0.2888, 0.6391, 0.4228, 0.6541]}, {"w": "Instead,", "b": [0.4311, 0.6391, 0.4958, 0.6541]}, {"w": "you", "b": [0.5019, 0.6391, 0.5309, 0.6541]}, {"w": "provide", "b": [0.5371, 0.6391, 0.5971, 0.6541]}, {"w": "a", "b": [0.6032, 0.6391, 0.6125, 0.6541]}, {"w": "statistical", "b": [0.6187, 0.6391, 0.6975, 0.6541]}, {"w": "distribution", "b": [0.7036, 0.6391, 0.7989, 0.6541]}, {"w": "for", "b": [0.805, 0.6391, 0.8273, 0.6541]}, {"w": "each", "b": [0.8335, 0.6391, 0.8691, 0.6541]}, {"w": "hyperparameter", "b": [0.1312, 0.6571, 0.2616, 0.672]}, {"w": "from", "b": [0.2686, 0.6571, 0.3069, 0.672]}, {"w": "which", "b": [0.3139, 0.6571, 0.3615, 0.672]}, {"w": "values", "b": [0.3685, 0.6571, 0.4183, 0.672]}, {"w": "are", "b": [0.4254, 0.6571, 0.4505, 0.672]}, {"w": "randomly", "b": [0.4575, 0.6571, 0.5355, 0.672]}, {"w": "sampled.", "b": [0.5425, 0.6571, 0.6148, 0.672]}, {"w": "Then", "b": [0.6256, 0.6571, 0.6685, 0.672]}, {"w": "set", "b": [0.6756, 0.6571, 0.6987, 0.672]}, {"w": "the", "b": [0.7057, 0.6571, 0.7319, 0.672]}, {"w": "total", "b": [0.7389, 0.6571, 0.7776, 0.672]}, {"w": "number", "b": [0.7846, 0.6571, 0.8469, 0.672]}, {"w": "of", "b": [0.8539, 0.6571, 0.8691, 0.672]}, {"w": "combinations", "b": [0.1312, 0.675, 0.2375, 0.69]}, {"w": "you", "b": [0.2436, 0.675, 0.2723, 0.69]}, {"w": "want", "b": [0.2785, 0.675, 0.3174, 0.69]}, {"w": "to", "b": [0.3236, 0.675, 0.34, 0.69]}, {"w": "evaluate,", "b": [0.3461, 0.675, 0.4174, 0.69]}, {"w": "as", "b": [0.4235, 0.675, 0.4401, 0.69]}, {"w": "shown", "b": [0.4462, 0.675, 0.496, 0.69]}, {"w": "in", "b": [0.5022, 0.675, 0.5176, 0.69]}, {"w": "Figure", "b": [0.5237, 0.675, 0.5758, 0.69]}, {"w": "7.", "b": [0.582, 0.675, 0.5963, 0.69]}]}, {"id": "b_22", "type": "equation", "text": "2We talk about cross-validation in Subsection 5.6.5.", "words": [{"w": "2We", "b": [0.1518, 0.7021, 0.1812, 0.7159]}, {"w": "talk", "b": [0.1865, 0.704, 0.213, 0.7159]}, {"w": "about", "b": [0.2182, 0.704, 0.2579, 0.7159]}, {"w": "cross-validation", "b": [0.2631, 0.704, 0.3691, 0.7159]}, {"w": "in", "b": [0.3743, 0.704, 0.3874, 0.7159]}, {"w": "Subsection", "b": [0.3926, 0.704, 0.4659, 0.7159]}, {"w": "5.6.5.", "b": [0.4711, 0.704, 0.5077, 0.7159]}]}, {"id": "b_23", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 26", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "26", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 165, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Hyperparameter 1", "words": [{"w": "Hyperparameter", "b": [0.445, 0.4007, 0.5732, 0.4184]}, {"w": "1", "b": [0.5781, 0.4007, 0.588, 0.4184]}]}, {"id": "b_1", "type": "paragraph", "text": "Hyperparameter 2", "words": [{"w": "Hyperparameter", "b": [0.2804, 0.1824, 0.3023, 0.2863]}, {"w": "2", "b": [0.2804, 0.1704, 0.3023, 0.1784]}]}, {"id": "b_2", "type": "paragraph", "text": "Figure 7: Random search for two hyperparameters and 16 pairs to test.", "words": [{"w": "Figure", "b": [0.2108, 0.4372, 0.2629, 0.4522]}, {"w": "7:", "b": [0.2691, 0.4372, 0.2834, 0.4522]}, {"w": "Random", "b": [0.2916, 0.4372, 0.3595, 0.4522]}, {"w": "search", "b": [0.3657, 0.4372, 0.4156, 0.4522]}, {"w": "for", "b": [0.4217, 0.4372, 0.4438, 0.4522]}, {"w": "two", "b": [0.45, 0.4372, 0.4787, 0.4522]}, {"w": "hyperparameters", "b": [0.4848, 0.4372, 0.62, 0.4522]}, {"w": "and", "b": [0.6261, 0.4372, 0.6558, 0.4522]}, {"w": "16", "b": [0.6618, 0.4372, 0.6803, 0.4522]}, {"w": "pairs", "b": [0.6864, 0.4372, 0.7255, 0.4522]}, {"w": "to", "b": [0.7317, 0.4372, 0.7481, 0.4522]}, {"w": "test.", "b": [0.7542, 0.4372, 0.7892, 0.4522]}]}, {"id": "b_3", "type": "paragraph", "text": "Hyperparameter 1", "words": [{"w": "Hyperparameter", "b": [0.4478, 0.7997, 0.5747, 0.8172]}, {"w": "1", "b": [0.5795, 0.7997, 0.5893, 0.8172]}]}, {"id": "b_4", "type": "paragraph", "text": "Hyperparameter 2", "words": [{"w": "Hyperparameter", "b": [0.2799, 0.5897, 0.3016, 0.6926]}, {"w": "2", "b": [0.2799, 0.5779, 0.3016, 0.5858]}]}, {"id": "b_5", "type": "paragraph", "text": "Figure 8: Coarse-to-fine search for two hyperparameters: 16 coarse random search pairs to test and one grid search in the region of the highest value found using the random search.", "words": [{"w": "Figure", "b": [0.1312, 0.837, 0.1838, 0.852]}, {"w": "8:", "b": [0.1899, 0.837, 0.2044, 0.852]}, {"w": "Coarse-to-fine", "b": [0.2126, 0.837, 0.3255, 0.852]}, {"w": "search", "b": [0.3317, 0.837, 0.382, 0.852]}, {"w": "for", "b": [0.3882, 0.837, 0.4105, 0.852]}, {"w": "two", "b": [0.4166, 0.837, 0.4456, 0.852]}, {"w": "hyperparameters:", "b": [0.4517, 0.837, 0.5932, 0.852]}, {"w": "16", "b": [0.6012, 0.837, 0.6198, 0.852]}, {"w": "coarse", "b": [0.626, 0.837, 0.6758, 0.852]}, {"w": "random", "b": [0.682, 0.837, 0.7441, 0.852]}, {"w": "search", "b": [0.7502, 0.837, 0.8006, 0.852]}, {"w": "pairs", "b": [0.8067, 0.837, 0.8462, 0.852]}, {"w": "to", "b": [0.8523, 0.837, 0.8689, 0.852]}, {"w": "test", "b": [0.1312, 0.855, 0.1611, 0.8699]}, {"w": "and", "b": [0.1672, 0.855, 0.197, 0.8699]}, {"w": "one", "b": [0.2031, 0.855, 0.2308, 0.8699]}, {"w": "grid", "b": [0.237, 0.855, 0.2688, 0.8699]}, {"w": "search", "b": [0.275, 0.855, 0.3249, 0.8699]}, {"w": "in", "b": [0.331, 0.855, 0.3464, 0.8699]}, {"w": "the", "b": [0.3526, 0.855, 0.3782, 0.8699]}, {"w": "region", "b": [0.3843, 0.855, 0.4336, 0.8699]}, {"w": "of", "b": [0.4398, 0.855, 0.4546, 0.8699]}, {"w": "the", "b": [0.4608, 0.855, 0.4864, 0.8699]}, {"w": "highest", "b": [0.4926, 0.855, 0.5501, 0.8699]}, {"w": "value", "b": [0.5563, 0.855, 0.5978, 0.8699]}, {"w": "found", "b": [0.6039, 0.855, 0.6496, 0.8699]}, {"w": "using", "b": [0.6557, 0.855, 0.6979, 0.8699]}, {"w": "the", "b": [0.704, 0.855, 0.7297, 0.8699]}, {"w": "random", "b": [0.7358, 0.855, 0.7974, 0.8699]}, {"w": "search.", "b": [0.8035, 0.855, 0.8586, 0.8699]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 27", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "27", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 166, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "5.6.3 Coarse-to-Fine Search", "words": [{"w": "5.6.3", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Coarse-to-Fine", "b": [0.1961, 0.0884, 0.3329, 0.1034]}, {"w": "Search", "b": [0.34, 0.0884, 0.4012, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "In practice, analysts often use a combination of grid search and random search called coarse- to-fine search. This technique uses a coarse random search to first find the regions of high potential. Then, using a fine grid search in these regions, one finds the best values for hyperparameters, as shown in Figure 8.", "words": [{"w": "In", "b": [0.1312, 0.1247, 0.1478, 0.1396]}, {"w": "practice,", "b": [0.1533, 0.1247, 0.2207, 0.1396]}, {"w": "analysts", "b": [0.2262, 0.1247, 0.2903, 0.1396]}, {"w": "often", "b": [0.2957, 0.1247, 0.3354, 0.1396]}, {"w": "use", "b": [0.3409, 0.1247, 0.3661, 0.1396]}, {"w": "a", "b": [0.3716, 0.1247, 0.3806, 0.1396]}, {"w": "combination", "b": [0.386, 0.1247, 0.483, 0.1396]}, {"w": "of", "b": [0.4884, 0.1247, 0.503, 0.1396]}, {"w": "grid", "b": [0.5085, 0.1247, 0.5397, 0.1396]}, {"w": "search", "b": [0.5451, 0.1247, 0.594, 0.1396]}, {"w": "and", "b": [0.5995, 0.1247, 0.6286, 0.1396]}, {"w": "random", "b": [0.634, 0.1247, 0.6944, 0.1396]}, {"w": "search", "b": [0.6998, 0.1247, 0.7487, 0.1396]}, {"w": "called", "b": [0.7542, 0.1247, 0.7994, 0.1396]}, {"w": "coarse-", "b": [0.8045, 0.125, 0.8688, 0.1399]}, {"w": "to-fine", "b": [0.1312, 0.1429, 0.1905, 0.1579]}, {"w": "search.", "b": [0.1993, 0.1426, 0.2623, 0.1579]}, {"w": "This", "b": [0.2751, 0.1426, 0.3118, 0.1576]}, {"w": "technique", "b": [0.3194, 0.1426, 0.3979, 0.1576]}, {"w": "uses", "b": [0.4056, 0.1426, 0.4393, 0.1576]}, {"w": "a", "b": [0.4469, 0.1426, 0.4563, 0.1576]}, {"w": "coarse", "b": [0.464, 0.1426, 0.5144, 0.1576]}, {"w": "random", "b": [0.522, 0.1426, 0.5848, 0.1576]}, {"w": "search", "b": [0.5925, 0.1426, 0.6434, 0.1576]}, {"w": "to", "b": [0.6511, 0.1426, 0.6678, 0.1576]}, {"w": "first", "b": [0.6755, 0.1426, 0.708, 0.1576]}, {"w": "find", "b": [0.7157, 0.1426, 0.7471, 0.1576]}, {"w": "the", "b": [0.7547, 0.1426, 0.7809, 0.1576]}, {"w": "regions", "b": [0.7886, 0.1426, 0.8463, 0.1576]}, {"w": "of", "b": [0.8539, 0.1426, 0.8691, 0.1576]}, {"w": "high", "b": [0.1312, 0.1606, 0.1663, 0.1755]}, {"w": "potential.", "b": [0.1724, 0.1606, 0.2497, 0.1755]}, {"w": "Then,", "b": [0.2579, 0.1606, 0.3053, 0.1755]}, {"w": "using", "b": [0.3115, 0.1606, 0.3538, 0.1755]}, {"w": "a", "b": [0.36, 0.1606, 0.3693, 0.1755]}, {"w": "fine", "b": [0.3754, 0.1606, 0.4043, 0.1755]}, {"w": "grid", "b": [0.4104, 0.1606, 0.4424, 0.1755]}, {"w": "search", "b": [0.4486, 0.1606, 0.4987, 0.1755]}, {"w": "in", "b": [0.5048, 0.1606, 0.5203, 0.1755]}, {"w": "these", "b": [0.5265, 0.1606, 0.5678, 0.1755]}, {"w": "regions,", "b": [0.5739, 0.1606, 0.636, 0.1755]}, {"w": "one", "b": [0.6421, 0.1606, 0.6699, 0.1755]}, {"w": "finds", "b": [0.6761, 0.1606, 0.7143, 0.1755]}, {"w": "the", "b": [0.7205, 0.1606, 0.7462, 0.1755]}, {"w": "best", "b": [0.7524, 0.1606, 0.786, 0.1755]}, {"w": "values", "b": [0.7921, 0.1606, 0.8412, 0.1755]}, {"w": "for", "b": [0.8473, 0.1606, 0.8696, 0.1755]}, {"w": "hyperparameters,", "b": [0.1312, 0.1785, 0.2715, 0.1935]}, {"w": "as", "b": [0.2776, 0.1785, 0.2941, 0.1935]}, {"w": "shown", "b": [0.3003, 0.1785, 0.3501, 0.1935]}, {"w": "in", "b": [0.3563, 0.1785, 0.3717, 0.1935]}, {"w": "Figure", "b": [0.3778, 0.1785, 0.4299, 0.1935]}, {"w": "8.", "b": [0.4361, 0.1785, 0.4504, 0.1935]}]}, {"id": "b_2", "type": "paragraph", "text": "You can decide to only explore one high-potential region or several such regions, depending on the available time and computational resources.", "words": [{"w": "You", "b": [0.1305, 0.2054, 0.1623, 0.2204]}, {"w": "can", "b": [0.1684, 0.2054, 0.1961, 0.2204]}, {"w": "decide", "b": [0.2023, 0.2054, 0.2525, 0.2204]}, {"w": "to", "b": [0.2586, 0.2054, 0.275, 0.2204]}, {"w": "only", "b": [0.2812, 0.2054, 0.3155, 0.2204]}, {"w": "explore", "b": [0.3216, 0.2054, 0.3797, 0.2204]}, {"w": "one", "b": [0.3858, 0.2054, 0.4135, 0.2204]}, {"w": "high-potential", "b": [0.4196, 0.2054, 0.5324, 0.2204]}, {"w": "region", "b": [0.5385, 0.2054, 0.5878, 0.2204]}, {"w": "or", "b": [0.5939, 0.2054, 0.6104, 0.2204]}, {"w": "several", "b": [0.6165, 0.2054, 0.671, 0.2204]}, {"w": "such", "b": [0.6771, 0.2054, 0.7126, 0.2204]}, {"w": "regions,", "b": [0.7188, 0.2054, 0.7805, 0.2204]}, {"w": "depending", "b": [0.7866, 0.2054, 0.8692, 0.2204]}, {"w": "on", "b": [0.1312, 0.2234, 0.1507, 0.2383]}, {"w": "the", "b": [0.1569, 0.2234, 0.1825, 0.2383]}, {"w": "available", "b": [0.1887, 0.2234, 0.2584, 0.2383]}, {"w": "time", "b": [0.2645, 0.2234, 0.3004, 0.2383]}, {"w": "and", "b": [0.3066, 0.2234, 0.3363, 0.2383]}, {"w": "computational", "b": [0.3425, 0.2234, 0.4583, 0.2383]}, {"w": "resources.", "b": [0.4645, 0.2234, 0.5427, 0.2383]}]}, {"id": "b_3", "type": "paragraph", "text": "5.6.4 Other Techniques", "words": [{"w": "5.6.4", "b": [0.1312, 0.2715, 0.1749, 0.2865]}, {"w": "Other", "b": [0.1961, 0.2715, 0.2505, 0.2865]}, {"w": "Techniques", "b": [0.2576, 0.2715, 0.3597, 0.2865]}]}, {"id": "b_4", "type": "paragraph", "text": "Bayesian techniques differ from random and grid searches in that they use past evaluation results to choose the next values to evaluate. In practice, this allows Bayesian hyperparameter optimization techniques to find better values of hyperparameters in less time.", "words": [{"w": "Bayesian", "b": [0.1312, 0.3081, 0.2128, 0.3231]}, {"w": "techniques", "b": [0.2193, 0.3081, 0.3166, 0.3231]}, {"w": "differ", "b": [0.3223, 0.3078, 0.363, 0.3228]}, {"w": "from", "b": [0.3687, 0.3078, 0.4054, 0.3228]}, {"w": "random", "b": [0.411, 0.3078, 0.4714, 0.3228]}, {"w": "and", "b": [0.477, 0.3078, 0.5062, 0.3228]}, {"w": "grid", "b": [0.5118, 0.3078, 0.543, 0.3228]}, {"w": "searches", "b": [0.5487, 0.3078, 0.6128, 0.3228]}, {"w": "in", "b": [0.6184, 0.3078, 0.6335, 0.3228]}, {"w": "that", "b": [0.6392, 0.3078, 0.6723, 0.3228]}, {"w": "they", "b": [0.678, 0.3078, 0.7127, 0.3228]}, {"w": "use", "b": [0.7183, 0.3078, 0.7436, 0.3228]}, {"w": "past", "b": [0.7492, 0.3078, 0.7825, 0.3228]}, {"w": "evaluation", "b": [0.7881, 0.3078, 0.869, 0.3228]}, {"w": "results", "b": [0.1312, 0.3258, 0.1828, 0.3407]}, {"w": "to", "b": [0.1879, 0.3258, 0.204, 0.3407]}, {"w": "choose", "b": [0.2091, 0.3258, 0.2605, 0.3407]}, {"w": "the", "b": [0.2656, 0.3258, 0.2908, 0.3407]}, {"w": "next", "b": [0.2959, 0.3258, 0.3306, 0.3407]}, {"w": "values", "b": [0.3357, 0.3258, 0.3835, 0.3407]}, {"w": "to", "b": [0.3887, 0.3258, 0.4048, 0.3407]}, {"w": "evaluate.", "b": [0.4099, 0.3258, 0.4797, 0.3407]}, {"w": "In", "b": [0.4876, 0.3258, 0.5042, 0.3407]}, {"w": "practice,", "b": [0.5093, 0.3258, 0.5767, 0.3407]}, {"w": "this", "b": [0.5821, 0.3258, 0.6113, 0.3407]}, {"w": "allows", "b": [0.6165, 0.3258, 0.6643, 0.3407]}, {"w": "Bayesian", "b": [0.6694, 0.3258, 0.7391, 0.3407]}, {"w": "hyperparameter", "b": [0.7442, 0.3258, 0.8695, 0.3407]}, {"w": "optimization", "b": [0.1312, 0.3437, 0.2327, 0.3587]}, {"w": "techniques", "b": [0.2389, 0.3437, 0.3231, 0.3587]}, {"w": "to", "b": [0.3292, 0.3437, 0.3457, 0.3587]}, {"w": "find", "b": [0.3518, 0.3437, 0.3826, 0.3587]}, {"w": "better", "b": [0.3887, 0.3437, 0.4375, 0.3587]}, {"w": "values", "b": [0.4437, 0.3437, 0.4925, 0.3587]}, {"w": "of", "b": [0.4986, 0.3437, 0.5135, 0.3587]}, {"w": "hyperparameters", "b": [0.5196, 0.3437, 0.6547, 0.3587]}, {"w": "in", "b": [0.6609, 0.3437, 0.6763, 0.3587]}, {"w": "less", "b": [0.6824, 0.3437, 0.7104, 0.3587]}, {"w": "time.", "b": [0.7165, 0.3437, 0.7575, 0.3587]}]}, {"id": "b_5", "type": "paragraph", "text": "There are also gradient-based techniques, evolutionary optimization techniques, and other algorithmic hyperparameter tuning methods. Most modern machine learning libraries imple- ment one or more such techniques. There are also hyperparameter tuning libraries that can be used to tune hyperparameters of virtually any learning algorithm, including the algorithms you programmed yourself.", "words": [{"w": "There", "b": [0.1306, 0.3706, 0.1786, 0.3856]}, {"w": "are", "b": [0.1847, 0.3706, 0.2098, 0.3856]}, {"w": "also", "b": [0.2159, 0.3706, 0.2473, 0.3856]}, {"w": "gradient-based", "b": [0.2534, 0.3706, 0.373, 0.3856]}, {"w": "techniques,", "b": [0.3791, 0.3706, 0.47, 0.3856]}, {"w": "evolutionary", "b": [0.4761, 0.3706, 0.5779, 0.3856]}, {"w": "optimization", "b": [0.584, 0.3706, 0.6872, 0.3856]}, {"w": "techniques,", "b": [0.6933, 0.3706, 0.7842, 0.3856]}, {"w": "and", "b": [0.7903, 0.3706, 0.8206, 0.3856]}, {"w": "other", "b": [0.8267, 0.3706, 0.8695, 0.3856]}, {"w": "algorithmic", "b": [0.1312, 0.3886, 0.2214, 0.4035]}, {"w": "hyperparameter", "b": [0.2275, 0.3886, 0.3537, 0.4035]}, {"w": "tuning", "b": [0.3598, 0.3886, 0.4115, 0.4035]}, {"w": "methods.", "b": [0.4176, 0.3886, 0.4901, 0.4035]}, {"w": "Most", "b": [0.4983, 0.3886, 0.5384, 0.4035]}, {"w": "modern", "b": [0.5446, 0.3886, 0.6049, 0.4035]}, {"w": "machine", "b": [0.611, 0.3886, 0.6763, 0.4035]}, {"w": "learning", "b": [0.6825, 0.3886, 0.7463, 0.4035]}, {"w": "libraries", "b": [0.7524, 0.3886, 0.8164, 0.4035]}, {"w": "imple-", "b": [0.8226, 0.3886, 0.8722, 0.4035]}, {"w": "ment", "b": [0.1312, 0.4065, 0.1716, 0.4215]}, {"w": "one", "b": [0.1777, 0.4065, 0.2053, 0.4215]}, {"w": "or", "b": [0.2114, 0.4065, 0.2278, 0.4215]}, {"w": "more", "b": [0.2339, 0.4065, 0.2738, 0.4215]}, {"w": "such", "b": [0.2799, 0.4065, 0.3153, 0.4215]}, {"w": "techniques.", "b": [0.3214, 0.4065, 0.4104, 0.4215]}, {"w": "There", "b": [0.4186, 0.4065, 0.4656, 0.4215]}, {"w": "are", "b": [0.4718, 0.4065, 0.4964, 0.4215]}, {"w": "also", "b": [0.5025, 0.4065, 0.5332, 0.4215]}, {"w": "hyperparameter", "b": [0.5394, 0.4065, 0.6667, 0.4215]}, {"w": "tuning", "b": [0.6728, 0.4065, 0.7249, 0.4215]}, {"w": "libraries", "b": [0.731, 0.4065, 0.7956, 0.4215]}, {"w": "that", "b": [0.8017, 0.4065, 0.8354, 0.4215]}, {"w": "can", "b": [0.8416, 0.4065, 0.8691, 0.4215]}, {"w": "be", "b": [0.1312, 0.4245, 0.1498, 0.4394]}, {"w": "used", "b": [0.1552, 0.4245, 0.1905, 0.4394]}, {"w": "to", "b": [0.1958, 0.4245, 0.2119, 0.4394]}, {"w": "tune", "b": [0.2173, 0.4245, 0.2524, 0.4394]}, {"w": "hyperparameters", "b": [0.2578, 0.4245, 0.3902, 0.4394]}, {"w": "of", "b": [0.3956, 0.4245, 0.4101, 0.4394]}, {"w": "virtually", "b": [0.4155, 0.4245, 0.4829, 0.4394]}, {"w": "any", "b": [0.4882, 0.4245, 0.5163, 0.4394]}, {"w": "learning", "b": [0.5217, 0.4245, 0.5851, 0.4394]}, {"w": "algorithm,", "b": [0.5904, 0.4245, 0.6719, 0.4394]}, {"w": "including", "b": [0.6774, 0.4245, 0.7497, 0.4394]}, {"w": "the", "b": [0.7551, 0.4245, 0.7802, 0.4394]}, {"w": "algorithms", "b": [0.7856, 0.4245, 0.8691, 0.4394]}, {"w": "you", "b": [0.1308, 0.4424, 0.1595, 0.4574]}, {"w": "programmed", "b": [0.1656, 0.4424, 0.2672, 0.4574]}, {"w": "yourself.", "b": [0.2734, 0.4424, 0.3407, 0.4574]}]}, {"id": "b_6", "type": "equation", "text": "5.6.5 Cross-Validation", "words": [{"w": "5.6.5", "b": [0.1312, 0.4906, 0.1749, 0.5055]}, {"w": "Cross-Validation", "b": [0.1961, 0.4906, 0.3496, 0.5055]}]}, {"id": "b_7", "type": "paragraph", "text": "Grid search and other techniques of hyperparameter tuning discussed above are used when you have a good-sized validation set.3 When you don’t, a common technique of model evaluation is cross-validation. Indeed, when you have few training examples, it could be prohibitive to have both validation and test sets. You would prefer to use more data to train the model. In such a case, you should only split your data in two: a training and a test set. Then use cross-validation on the training set to simulate a validation set.", "words": [{"w": "Grid", "b": [0.1312, 0.5268, 0.1685, 0.5418]}, {"w": "search", "b": [0.1747, 0.5268, 0.2248, 0.5418]}, {"w": "and", "b": [0.2309, 0.5268, 0.2608, 0.5418]}, {"w": "other", "b": [0.267, 0.5268, 0.3093, 0.5418]}, {"w": "techniques", "b": [0.3154, 0.5268, 0.4, 0.5418]}, {"w": "of", "b": [0.4062, 0.5268, 0.4211, 0.5418]}, {"w": "hyperparameter", "b": [0.4272, 0.5268, 0.5557, 0.5418]}, {"w": "tuning", "b": [0.5618, 0.5268, 0.6144, 0.5418]}, {"w": "discussed", "b": [0.6205, 0.5268, 0.6951, 0.5418]}, {"w": "above", "b": [0.7012, 0.5268, 0.7476, 0.5418]}, {"w": "are", "b": [0.7537, 0.5268, 0.7785, 0.5418]}, {"w": "used", "b": [0.7846, 0.5268, 0.8208, 0.5418]}, {"w": "when", "b": [0.8269, 0.5268, 0.8692, 0.5418]}, {"w": "you", "b": [0.1308, 0.5448, 0.1601, 0.5597]}, {"w": "have", "b": [0.1681, 0.5448, 0.2053, 0.5597]}, {"w": "a", "b": [0.2133, 0.5448, 0.2227, 0.5597]}, {"w": "good-sized", "b": [0.2308, 0.5448, 0.3166, 0.5597]}, {"w": "validation", "b": [0.3247, 0.5448, 0.4058, 0.5597]}, {"w": "set.3", "b": [0.4138, 0.5432, 0.4494, 0.5597]}, {"w": "When", "b": [0.4643, 0.5448, 0.5129, 0.5597]}, {"w": "you", "b": [0.521, 0.5448, 0.5503, 0.5597]}, {"w": "don’t,", "b": [0.5583, 0.5448, 0.6064, 0.5597]}, {"w": "a", "b": [0.615, 0.5448, 0.6244, 0.5597]}, {"w": "common", "b": [0.6324, 0.5448, 0.7014, 0.5597]}, {"w": "technique", "b": [0.7095, 0.5448, 0.788, 0.5597]}, {"w": "of", "b": [0.796, 0.5448, 0.8112, 0.5597]}, {"w": "model", "b": [0.8192, 0.5448, 0.8689, 0.5597]}, {"w": "evaluation", "b": [0.1312, 0.5627, 0.2152, 0.5777]}, {"w": "is", "b": [0.2214, 0.5627, 0.234, 0.5777]}, {"w": "cross-validation.", "b": [0.2401, 0.5627, 0.3887, 0.578]}, {"w": "Indeed,", "b": [0.3969, 0.5627, 0.4569, 0.5777]}, {"w": "when", "b": [0.463, 0.5627, 0.5058, 0.5777]}, {"w": "you", "b": [0.5119, 0.5627, 0.5411, 0.5777]}, {"w": "have", "b": [0.5473, 0.5627, 0.5843, 0.5777]}, {"w": "few", "b": [0.5904, 0.5627, 0.6181, 0.5777]}, {"w": "training", "b": [0.6242, 0.5627, 0.6889, 0.5777]}, {"w": "examples,", "b": [0.6951, 0.5627, 0.775, 0.5777]}, {"w": "it", "b": [0.7811, 0.5627, 0.7936, 0.5777]}, {"w": "could", "b": [0.7997, 0.5627, 0.8436, 0.5777]}, {"w": "be", "b": [0.8497, 0.5627, 0.869, 0.5777]}, {"w": "prohibitive", "b": [0.1312, 0.5807, 0.2167, 0.5956]}, {"w": "to", "b": [0.2228, 0.5807, 0.2389, 0.5956]}, {"w": "have", "b": [0.245, 0.5807, 0.2806, 0.5956]}, {"w": "both", "b": [0.2867, 0.5807, 0.3234, 0.5956]}, {"w": "validation", "b": [0.3295, 0.5807, 0.4074, 0.5956]}, {"w": "and", "b": [0.4135, 0.5807, 0.4426, 0.5956]}, {"w": "test", "b": [0.4487, 0.5807, 0.478, 0.5956]}, {"w": "sets.", "b": [0.4841, 0.5807, 0.5184, 0.5956]}, {"w": "You", "b": [0.5266, 0.5807, 0.5577, 0.5956]}, {"w": "would", "b": [0.5638, 0.5807, 0.6105, 0.5956]}, {"w": "prefer", "b": [0.6166, 0.5807, 0.6625, 0.5956]}, {"w": "to", "b": [0.6686, 0.5807, 0.6847, 0.5956]}, {"w": "use", "b": [0.6907, 0.5807, 0.716, 0.5956]}, {"w": "more", "b": [0.7221, 0.5807, 0.7613, 0.5956]}, {"w": "data", "b": [0.7674, 0.5807, 0.8026, 0.5956]}, {"w": "to", "b": [0.8087, 0.5807, 0.8248, 0.5956]}, {"w": "train", "b": [0.8308, 0.5807, 0.8691, 0.5956]}, {"w": "the", "b": [0.1312, 0.5986, 0.1569, 0.6136]}, {"w": "model.", "b": [0.163, 0.5986, 0.2169, 0.6136]}, {"w": "In", "b": [0.2251, 0.5986, 0.2421, 0.6136]}, {"w": "such", "b": [0.2482, 0.5986, 0.2837, 0.6136]}, {"w": "a", "b": [0.2899, 0.5986, 0.2991, 0.6136]}, {"w": "case,", "b": [0.3052, 0.5986, 0.3433, 0.6136]}, {"w": "you", "b": [0.3494, 0.5986, 0.3782, 0.6136]}, {"w": "should", "b": [0.3843, 0.5986, 0.4368, 0.6136]}, {"w": "only", "b": [0.4429, 0.5986, 0.4773, 0.6136]}, {"w": "split", "b": [0.4834, 0.5986, 0.5185, 0.6136]}, {"w": "your", "b": [0.5246, 0.5986, 0.5606, 0.6136]}, {"w": "data", "b": [0.5667, 0.5986, 0.6026, 0.6136]}, {"w": "in", "b": [0.6088, 0.5986, 0.6242, 0.6136]}, {"w": "two:", "b": [0.6303, 0.5986, 0.6642, 0.6136]}, {"w": "a", "b": [0.6724, 0.5986, 0.6816, 0.6136]}, {"w": "training", "b": [0.6877, 0.5986, 0.7514, 0.6136]}, {"w": "and", "b": [0.7575, 0.5986, 0.7873, 0.6136]}, {"w": "a", "b": [0.7934, 0.5986, 0.8027, 0.6136]}, {"w": "test", "b": [0.8088, 0.5986, 0.8387, 0.6136]}, {"w": "set.", "b": [0.8448, 0.5986, 0.8727, 0.6136]}, {"w": "Then", "b": [0.1306, 0.6166, 0.1726, 0.6315]}, {"w": "use", "b": [0.1788, 0.6166, 0.2045, 0.6315]}, {"w": "cross-validation", "b": [0.2107, 0.6166, 0.3355, 0.6315]}, {"w": "on", "b": [0.3417, 0.6166, 0.3611, 0.6315]}, {"w": "the", "b": [0.3673, 0.6166, 0.3929, 0.6315]}, {"w": "training", "b": [0.3991, 0.6166, 0.4627, 0.6315]}, {"w": "set", "b": [0.4689, 0.6166, 0.4915, 0.6315]}, {"w": "to", "b": [0.4977, 0.6166, 0.5141, 0.6315]}, {"w": "simulate", "b": [0.5202, 0.6166, 0.5875, 0.6315]}, {"w": "a", "b": [0.5937, 0.6166, 0.6029, 0.6315]}, {"w": "validation", "b": [0.609, 0.6166, 0.6885, 0.6315]}, {"w": "set.", "b": [0.6947, 0.6166, 0.7224, 0.6315]}]}, {"id": "b_8", "type": "paragraph", "text": "Cross-validation works as follows. First, you fix the values of the hyperparameters to evaluate. Then you split your training set into several subsets of the same size. Each subset is called a fold. Typically, five-fold cross-validation is used, and you randomly split your training data into five folds: {F1, F2, . . . , F5}. Each Fk, k = 1, . . . , 5, contains 20% of your training data. Then you train five models in a specific manner. To train the first model, f1, you use all examples from folds F2, F3, F4, and F5 as the training set, and the examples from F1 as the validation set. To train the second model, f2, you use the examples from folds F1, F3, F4, and F5 to train, and the examples from F2 to validate. You continue training models fk iteratively4 for all remaining folds, and compute the value of the metric of interest on each", "words": [{"w": "Cross-validation", "b": [0.1312, 0.6435, 0.2586, 0.6585]}, {"w": "works", "b": [0.2639, 0.6435, 0.3093, 0.6585]}, {"w": "as", "b": [0.3146, 0.6435, 0.3308, 0.6585]}, {"w": "follows.", "b": [0.3362, 0.6435, 0.3946, 0.6585]}, {"w": "First,", "b": [0.4025, 0.6435, 0.4456, 0.6585]}, {"w": "you", "b": [0.4511, 0.6435, 0.4792, 0.6585]}, {"w": "fix", "b": [0.4846, 0.6435, 0.5042, 0.6585]}, {"w": "the", "b": [0.5096, 0.6435, 0.5347, 0.6585]}, {"w": "values", "b": [0.54, 0.6435, 0.5879, 0.6585]}, {"w": "of", "b": [0.5932, 0.6435, 0.6078, 0.6585]}, {"w": "the", "b": [0.6132, 0.6435, 0.6383, 0.6585]}, {"w": "hyperparameters", "b": [0.6436, 0.6435, 0.7761, 0.6585]}, {"w": "to", "b": [0.7814, 0.6435, 0.7975, 0.6585]}, {"w": "evaluate.", "b": [0.8028, 0.6435, 0.8727, 0.6585]}, {"w": "Then", "b": [0.1306, 0.6614, 0.1718, 0.6764]}, {"w": "you", "b": [0.178, 0.6614, 0.2061, 0.6764]}, {"w": "split", "b": [0.2123, 0.6614, 0.2466, 0.6764]}, {"w": "your", "b": [0.2528, 0.6614, 0.288, 0.6764]}, {"w": "training", "b": [0.2942, 0.6614, 0.3566, 0.6764]}, {"w": "set", "b": [0.3628, 0.6614, 0.385, 0.6764]}, {"w": "into", "b": [0.3912, 0.6614, 0.4218, 0.6764]}, {"w": "several", "b": [0.428, 0.6614, 0.4814, 0.6764]}, {"w": "subsets", "b": [0.4876, 0.6614, 0.5443, 0.6764]}, {"w": "of", "b": [0.5504, 0.6614, 0.565, 0.6764]}, {"w": "the", "b": [0.5712, 0.6614, 0.5963, 0.6764]}, {"w": "same", "b": [0.6025, 0.6614, 0.6418, 0.6764]}, {"w": "size.", "b": [0.648, 0.6614, 0.6813, 0.6764]}, {"w": "Each", "b": [0.6895, 0.6614, 0.7285, 0.6764]}, {"w": "subset", "b": [0.7347, 0.6614, 0.7842, 0.6764]}, {"w": "is", "b": [0.7903, 0.6614, 0.8025, 0.6764]}, {"w": "called", "b": [0.8087, 0.6614, 0.854, 0.6764]}, {"w": "a", "b": [0.8601, 0.6614, 0.8692, 0.6764]}, {"w": "fold.", "b": [0.1312, 0.6794, 0.1673, 0.6943]}, {"w": "Typically,", "b": [0.1763, 0.6794, 0.2569, 0.6943]}, {"w": "five-fold", "b": [0.2633, 0.6797, 0.3373, 0.6946]}, {"w": "cross-validation", "b": [0.3447, 0.6797, 0.4881, 0.6946]}, {"w": "is", "b": [0.4945, 0.6794, 0.5072, 0.6943]}, {"w": "used,", "b": [0.5136, 0.6794, 0.5555, 0.6943]}, {"w": "and", "b": [0.562, 0.6794, 0.5924, 0.6943]}, {"w": "you", "b": [0.5988, 0.6794, 0.6281, 0.6943]}, {"w": "randomly", "b": [0.6345, 0.6794, 0.7124, 0.6943]}, {"w": "split", "b": [0.7189, 0.6794, 0.7545, 0.6943]}, {"w": "your", "b": [0.7609, 0.6794, 0.7976, 0.6943]}, {"w": "training", "b": [0.804, 0.6794, 0.8689, 0.6943]}, {"w": "data", "b": [0.1312, 0.6973, 0.1678, 0.7123]}, {"w": "into", "b": [0.174, 0.6973, 0.2059, 0.7123]}, {"w": "five", "b": [0.2121, 0.6973, 0.2404, 0.7123]}, {"w": "folds:", "b": [0.2466, 0.6973, 0.2901, 0.7123]}, {"w": "{F1,", "b": [0.2983, 0.6974, 0.3327, 0.7138]}, {"w": "F2,", "b": [0.3358, 0.6976, 0.3611, 0.7138]}, {"w": ".", "b": [0.3642, 0.6976, 0.3693, 0.7126]}, {"w": ".", "b": [0.3724, 0.6976, 0.3775, 0.7126]}, {"w": ".", "b": [0.3806, 0.6976, 0.3857, 0.7126]}, {"w": ",", "b": [0.3888, 0.6976, 0.3939, 0.7126]}, {"w": "F5}.", "b": [0.397, 0.6973, 0.4316, 0.7138]}, {"w": "Each", "b": [0.4399, 0.6973, 0.4804, 0.7123]}, {"w": "Fk,", "b": [0.4865, 0.6973, 0.5127, 0.7138]}, {"w": "k", "b": [0.5189, 0.6976, 0.5285, 0.7126]}, {"w": "=", "b": [0.5343, 0.6973, 0.5489, 0.7123]}, {"w": "1,", "b": [0.5541, 0.6973, 0.5686, 0.7126]}, {"w": ".", "b": [0.5717, 0.6976, 0.5768, 0.7126]}, {"w": ".", "b": [0.5799, 0.6976, 0.585, 0.7126]}, {"w": ".", "b": [0.5881, 0.6976, 0.5932, 0.7126]}, {"w": ",", "b": [0.5963, 0.6976, 0.6014, 0.7126]}, {"w": "5,", "b": [0.6045, 0.6973, 0.6191, 0.7123]}, {"w": "contains", "b": [0.6253, 0.6973, 0.6929, 0.7123]}, {"w": "20%", "b": [0.699, 0.6973, 0.7335, 0.7123]}, {"w": "of", "b": [0.7397, 0.6973, 0.7549, 0.7123]}, {"w": "your", "b": [0.7611, 0.6973, 0.7977, 0.7123]}, {"w": "training", "b": [0.8039, 0.6973, 0.8688, 0.7123]}, {"w": "data.", "b": [0.1312, 0.7153, 0.1721, 0.7302]}, {"w": "Then", "b": [0.1803, 0.7153, 0.2222, 0.7302]}, {"w": "you", "b": [0.2284, 0.7153, 0.257, 0.7302]}, {"w": "train", "b": [0.2631, 0.7153, 0.302, 0.7302]}, {"w": "five", "b": [0.3082, 0.7153, 0.3358, 0.7302]}, {"w": "models", "b": [0.3419, 0.7153, 0.3978, 0.7302]}, {"w": "in", "b": [0.4039, 0.7153, 0.4192, 0.7302]}, {"w": "a", "b": [0.4254, 0.7153, 0.4346, 0.7302]}, {"w": "specific", "b": [0.4407, 0.7153, 0.4986, 0.7302]}, {"w": "manner.", "b": [0.5048, 0.7153, 0.5702, 0.7302]}, {"w": "To", "b": [0.5784, 0.7153, 0.5994, 0.7302]}, {"w": "train", "b": [0.6055, 0.7153, 0.6444, 0.7302]}, {"w": "the", "b": [0.6506, 0.7153, 0.6761, 0.7302]}, {"w": "first", "b": [0.6823, 0.7153, 0.7141, 0.7302]}, {"w": "model,", "b": [0.7203, 0.7153, 0.7739, 0.7302]}, {"w": "f1,", "b": [0.7798, 0.7153, 0.8022, 0.7318]}, {"w": "you", "b": [0.8084, 0.7153, 0.837, 0.7302]}, {"w": "use", "b": [0.8431, 0.7153, 0.8688, 0.7302]}, {"w": "all", "b": [0.1312, 0.7332, 0.1506, 0.7482]}, {"w": "examples", "b": [0.1568, 0.7332, 0.2297, 0.7482]}, {"w": "from", "b": [0.2359, 0.7332, 0.2731, 0.7482]}, {"w": "folds", "b": [0.2793, 0.7332, 0.3166, 0.7482]}, {"w": "F2,", "b": [0.3227, 0.7332, 0.3479, 0.7497]}, {"w": "F3,", "b": [0.3541, 0.7332, 0.3793, 0.7497]}, {"w": "F4,", "b": [0.3855, 0.7332, 0.4107, 0.7497]}, {"w": "and", "b": [0.4169, 0.7332, 0.4465, 0.7482]}, {"w": "F5", "b": [0.4526, 0.7335, 0.4718, 0.7497]}, {"w": "as", "b": [0.4789, 0.7332, 0.4953, 0.7482]}, {"w": "the", "b": [0.5015, 0.7332, 0.527, 0.7482]}, {"w": "training", "b": [0.5331, 0.7332, 0.5963, 0.7482]}, {"w": "set,", "b": [0.6025, 0.7332, 0.6301, 0.7482]}, {"w": "and", "b": [0.6363, 0.7332, 0.6659, 0.7482]}, {"w": "the", "b": [0.672, 0.7332, 0.6975, 0.7482]}, {"w": "examples", "b": [0.7037, 0.7332, 0.7767, 0.7482]}, {"w": "from", "b": [0.7828, 0.7332, 0.8201, 0.7482]}, {"w": "F1", "b": [0.8261, 0.7335, 0.8453, 0.7497]}, {"w": "as", "b": [0.8524, 0.7332, 0.8688, 0.7482]}, {"w": "the", "b": [0.1312, 0.7512, 0.1574, 0.7661]}, {"w": "validation", "b": [0.1636, 0.7512, 0.2447, 0.7661]}, {"w": "set.", "b": [0.2509, 0.7512, 0.2792, 0.7661]}, {"w": "To", "b": [0.2876, 0.7512, 0.3091, 0.7661]}, {"w": "train", "b": [0.3153, 0.7512, 0.3551, 0.7661]}, {"w": "the", "b": [0.3613, 0.7512, 0.3875, 0.7661]}, {"w": "second", "b": [0.3937, 0.7512, 0.4482, 0.7661]}, {"w": "model,", "b": [0.4544, 0.7512, 0.5093, 0.7661]}, {"w": "f2,", "b": [0.5153, 0.7512, 0.5379, 0.7677]}, {"w": "you", "b": [0.5441, 0.7512, 0.5734, 0.7661]}, {"w": "use", "b": [0.5796, 0.7512, 0.6059, 0.7661]}, {"w": "the", "b": [0.6121, 0.7512, 0.6382, 0.7661]}, {"w": "examples", "b": [0.6445, 0.7512, 0.7194, 0.7661]}, {"w": "from", "b": [0.7256, 0.7512, 0.7638, 0.7661]}, {"w": "folds", "b": [0.77, 0.7512, 0.8083, 0.7661]}, {"w": "F1,", "b": [0.8144, 0.7512, 0.8397, 0.7677]}, {"w": "F3,", "b": [0.846, 0.7512, 0.8713, 0.7677]}, {"w": "F4,", "b": [0.1312, 0.7691, 0.1564, 0.7856]}, {"w": "and", "b": [0.1626, 0.7691, 0.192, 0.7841]}, {"w": "F5", "b": [0.1981, 0.7694, 0.2173, 0.7856]}, {"w": "to", "b": [0.2244, 0.7691, 0.2406, 0.7841]}, {"w": "train,", "b": [0.2468, 0.7691, 0.2904, 0.7841]}, {"w": "and", "b": [0.2966, 0.7691, 0.326, 0.7841]}, {"w": "the", "b": [0.3321, 0.7691, 0.3575, 0.7841]}, {"w": "examples", "b": [0.3636, 0.7691, 0.4362, 0.7841]}, {"w": "from", "b": [0.4424, 0.7691, 0.4794, 0.7841]}, {"w": "F2", "b": [0.4854, 0.7694, 0.5046, 0.7856]}, {"w": "to", "b": [0.5117, 0.7691, 0.5279, 0.7841]}, {"w": "validate.", "b": [0.5341, 0.7691, 0.6015, 0.7841]}, {"w": "You", "b": [0.6097, 0.7691, 0.6411, 0.7841]}, {"w": "continue", "b": [0.6473, 0.7691, 0.7141, 0.7841]}, {"w": "training", "b": [0.7203, 0.7691, 0.7831, 0.7841]}, {"w": "models", "b": [0.7893, 0.7691, 0.8446, 0.7841]}, {"w": "fk", "b": [0.8507, 0.7694, 0.8675, 0.7856]}, {"w": "iteratively4", "b": [0.1312, 0.7854, 0.2207, 0.802]}, {"w": "for", "b": [0.2278, 0.7871, 0.25, 0.802]}, {"w": "all", "b": [0.2561, 0.7871, 0.2758, 0.802]}, {"w": "remaining", "b": [0.2819, 0.7871, 0.3625, 0.802]}, {"w": "folds,", "b": [0.3686, 0.7871, 0.4116, 0.802]}, {"w": "and", "b": [0.4177, 0.7871, 0.4476, 0.802]}, {"w": "compute", "b": [0.4538, 0.7871, 0.523, 0.802]}, {"w": "the", "b": [0.5291, 0.7871, 0.5549, 0.802]}, {"w": "value", "b": [0.561, 0.7871, 0.6029, 0.802]}, {"w": "of", "b": [0.609, 0.7871, 0.624, 0.802]}, {"w": "the", "b": [0.6301, 0.7871, 0.6559, 0.802]}, {"w": "metric", "b": [0.6621, 0.7871, 0.7137, 0.802]}, {"w": "of", "b": [0.7199, 0.7871, 0.7348, 0.802]}, {"w": "interest", "b": [0.741, 0.7871, 0.8016, 0.802]}, {"w": "on", "b": [0.8077, 0.7871, 0.8273, 0.802]}, {"w": "each", "b": [0.8334, 0.7871, 0.8691, 0.802]}]}, {"id": "b_9", "type": "paragraph", "text": "3A decent validation set contains at least a hundred examples, and each class in the set is represented by at least a couple of dozen examples.", "words": [{"w": "3A", "b": [0.1518, 0.8141, 0.1711, 0.828]}, {"w": "decent", "b": [0.1763, 0.8161, 0.2199, 0.828]}, {"w": "validation", "b": [0.2252, 0.8161, 0.2921, 0.828]}, {"w": "set", "b": [0.2973, 0.8161, 0.3164, 0.828]}, {"w": "contains", "b": [0.3216, 0.8161, 0.3774, 0.828]}, {"w": "at", "b": [0.3826, 0.8161, 0.3964, 0.828]}, {"w": "least", "b": [0.4016, 0.8161, 0.4328, 0.828]}, {"w": "a", "b": [0.438, 0.8161, 0.4458, 0.828]}, {"w": "hundred", "b": [0.4511, 0.8161, 0.5067, 0.828]}, {"w": "examples,", "b": [0.512, 0.8161, 0.5781, 0.828]}, {"w": "and", "b": [0.5833, 0.8161, 0.6084, 0.828]}, {"w": "each", "b": [0.6136, 0.8161, 0.6434, 0.828]}, {"w": "class", "b": [0.6486, 0.8161, 0.6798, 0.828]}, {"w": "in", "b": [0.6851, 0.8161, 0.698, 0.828]}, {"w": "the", "b": [0.7033, 0.8161, 0.7249, 0.828]}, {"w": "set", "b": [0.7301, 0.8161, 0.7492, 0.828]}, {"w": "is", "b": [0.7544, 0.8161, 0.7649, 0.828]}, {"w": "represented", "b": [0.7701, 0.8161, 0.8475, 0.828]}, {"w": "by", "b": [0.8527, 0.8161, 0.8691, 0.828]}, {"w": "at", "b": [0.1312, 0.8302, 0.1452, 0.8422]}, {"w": "least", "b": [0.1504, 0.8302, 0.1818, 0.8422]}, {"w": "a", "b": [0.1871, 0.8302, 0.1949, 0.8422]}, {"w": "couple", "b": [0.2001, 0.8302, 0.2437, 0.8422]}, {"w": "of", "b": [0.2489, 0.8302, 0.2615, 0.8422]}, {"w": "dozen", "b": [0.2668, 0.8302, 0.3059, 0.8422]}, {"w": "examples.", "b": [0.3112, 0.8302, 0.3779, 0.8422]}]}, {"id": "b_10", "type": "paragraph", "text": "4The process of cross-validation is easier to illustrate as an iterative process; though, one can, of course, build all five models F1 to F5 in parallel.", "words": [{"w": "4The", "b": [0.1518, 0.8425, 0.1866, 0.8564]}, {"w": "process", "b": [0.1919, 0.8444, 0.2416, 0.8564]}, {"w": "of", "b": [0.2468, 0.8444, 0.2595, 0.8564]}, {"w": "cross-validation", "b": [0.2648, 0.8444, 0.3715, 0.8564]}, {"w": "is", "b": [0.3767, 0.8444, 0.3874, 0.8564]}, {"w": "easier", "b": [0.3926, 0.8444, 0.4313, 0.8564]}, {"w": "to", "b": [0.4365, 0.8444, 0.4505, 0.8564]}, {"w": "illustrate", "b": [0.4558, 0.8444, 0.5172, 0.8564]}, {"w": "as", "b": [0.5225, 0.8444, 0.5366, 0.8564]}, {"w": "an", "b": [0.5418, 0.8444, 0.5585, 0.8564]}, {"w": "iterative", "b": [0.5637, 0.8444, 0.6207, 0.8564]}, {"w": "process;", "b": [0.6259, 0.8444, 0.68, 0.8564]}, {"w": "though,", "b": [0.6853, 0.8444, 0.7379, 0.8564]}, {"w": "one", "b": [0.7431, 0.8444, 0.7668, 0.8564]}, {"w": "can,", "b": [0.772, 0.8444, 0.8001, 0.8564]}, {"w": "of", "b": [0.8053, 0.8444, 0.818, 0.8564]}, {"w": "course,", "b": [0.8232, 0.8444, 0.8707, 0.8564]}, {"w": "build", "b": [0.1312, 0.8586, 0.1661, 0.8706]}, {"w": "all", "b": [0.1713, 0.8586, 0.1878, 0.8706]}, {"w": "five", "b": [0.1931, 0.8586, 0.2166, 0.8706]}, {"w": "models", "b": [0.2218, 0.8586, 0.2694, 0.8706]}, {"w": "F1", "b": [0.2746, 0.8586, 0.2913, 0.8716]}, {"w": "to", "b": [0.2975, 0.8586, 0.3114, 0.8706]}, {"w": "F5", "b": [0.3166, 0.8586, 0.3333, 0.8716]}, {"w": "in", "b": [0.3395, 0.8586, 0.3525, 0.8706]}, {"w": "parallel.", "b": [0.3578, 0.8586, 0.4126, 0.8706]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 28", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "28", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 167, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "validation set, from F1 to F5. Then you average the five values of the metric to get the final value. More generally, in n-fold cross-validation, you train model fn on all folds, except for the n-th fold Fn.", "words": [{"w": "validation", "b": [0.1308, 0.0881, 0.2093, 0.1031]}, {"w": "set,", "b": [0.2154, 0.0881, 0.2429, 0.1031]}, {"w": "from", "b": [0.249, 0.0881, 0.286, 0.1031]}, {"w": "F1", "b": [0.2921, 0.0884, 0.3113, 0.1046]}, {"w": "to", "b": [0.3184, 0.0881, 0.3346, 0.1031]}, {"w": "F5.", "b": [0.3407, 0.0881, 0.3659, 0.1046]}, {"w": "Then", "b": [0.3741, 0.0881, 0.4157, 0.1031]}, {"w": "you", "b": [0.4218, 0.0881, 0.4502, 0.1031]}, {"w": "average", "b": [0.4563, 0.0881, 0.5156, 0.1031]}, {"w": "the", "b": [0.5218, 0.0881, 0.5471, 0.1031]}, {"w": "five", "b": [0.5533, 0.0881, 0.5806, 0.1031]}, {"w": "values", "b": [0.5867, 0.0881, 0.635, 0.1031]}, {"w": "of", "b": [0.6411, 0.0881, 0.6558, 0.1031]}, {"w": "the", "b": [0.6619, 0.0881, 0.6873, 0.1031]}, {"w": "metric", "b": [0.6934, 0.0881, 0.7441, 0.1031]}, {"w": "to", "b": [0.7503, 0.0881, 0.7665, 0.1031]}, {"w": "get", "b": [0.7726, 0.0881, 0.7969, 0.1031]}, {"w": "the", "b": [0.8031, 0.0881, 0.8284, 0.1031]}, {"w": "final", "b": [0.8345, 0.0881, 0.869, 0.1031]}, {"w": "value.", "b": [0.1308, 0.106, 0.1776, 0.121]}, {"w": "More", "b": [0.1858, 0.106, 0.2276, 0.121]}, {"w": "generally,", "b": [0.2337, 0.106, 0.31, 0.121]}, {"w": "in", "b": [0.3161, 0.106, 0.3316, 0.121]}, {"w": "n-fold", "b": [0.3376, 0.106, 0.3852, 0.1213]}, {"w": "cross-validation,", "b": [0.3914, 0.106, 0.5219, 0.121]}, {"w": "you", "b": [0.528, 0.106, 0.5569, 0.121]}, {"w": "train", "b": [0.563, 0.106, 0.6022, 0.121]}, {"w": "model", "b": [0.6083, 0.106, 0.6572, 0.121]}, {"w": "fn", "b": [0.6633, 0.1063, 0.6814, 0.1225]}, {"w": "on", "b": [0.6885, 0.106, 0.708, 0.121]}, {"w": "all", "b": [0.7142, 0.106, 0.7337, 0.121]}, {"w": "folds,", "b": [0.7399, 0.106, 0.7827, 0.121]}, {"w": "except", "b": [0.7889, 0.106, 0.8409, 0.121]}, {"w": "for", "b": [0.8471, 0.106, 0.8692, 0.121]}, {"w": "the", "b": [0.1312, 0.124, 0.1569, 0.1389]}, {"w": "n-th", "b": [0.163, 0.124, 0.1977, 0.1392]}, {"w": "fold", "b": [0.2038, 0.124, 0.2341, 0.1389]}, {"w": "Fn.", "b": [0.2402, 0.124, 0.2672, 0.1405]}]}, {"id": "b_1", "type": "paragraph", "text": "You can use grid search, random search, or any other such technique with cross-validation to find the best values of hyperparameters. Once you have found those values, you typically use the entire training set to train the final model by using the best values of hyperparameters found via cross-validation. Finally, you assess the final model using the test set.", "words": [{"w": "You", "b": [0.1305, 0.1509, 0.1616, 0.1659]}, {"w": "can", "b": [0.1678, 0.1509, 0.195, 0.1659]}, {"w": "use", "b": [0.2011, 0.1509, 0.2264, 0.1659]}, {"w": "grid", "b": [0.2326, 0.1509, 0.2637, 0.1659]}, {"w": "search,", "b": [0.2699, 0.1509, 0.3238, 0.1659]}, {"w": "random", "b": [0.33, 0.1509, 0.3904, 0.1659]}, {"w": "search,", "b": [0.3965, 0.1509, 0.4505, 0.1659]}, {"w": "or", "b": [0.4566, 0.1509, 0.4728, 0.1659]}, {"w": "any", "b": [0.479, 0.1509, 0.5071, 0.1659]}, {"w": "other", "b": [0.5133, 0.1509, 0.5545, 0.1659]}, {"w": "such", "b": [0.5607, 0.1509, 0.5955, 0.1659]}, {"w": "technique", "b": [0.6017, 0.1509, 0.677, 0.1659]}, {"w": "with", "b": [0.6832, 0.1509, 0.7184, 0.1659]}, {"w": "cross-validation", "b": [0.7245, 0.1509, 0.8469, 0.1659]}, {"w": "to", "b": [0.8531, 0.1509, 0.8691, 0.1659]}, {"w": "find", "b": [0.1312, 0.1689, 0.1614, 0.1838]}, {"w": "the", "b": [0.1674, 0.1689, 0.1925, 0.1838]}, {"w": "best", "b": [0.1985, 0.1689, 0.2313, 0.1838]}, {"w": "values", "b": [0.2373, 0.1689, 0.2851, 0.1838]}, {"w": "of", "b": [0.2911, 0.1689, 0.3056, 0.1838]}, {"w": "hyperparameters.", "b": [0.3116, 0.1689, 0.449, 0.1838]}, {"w": "Once", "b": [0.4572, 0.1689, 0.4974, 0.1838]}, {"w": "you", "b": [0.5034, 0.1689, 0.5315, 0.1838]}, {"w": "have", "b": [0.5375, 0.1689, 0.5732, 0.1838]}, {"w": "found", "b": [0.5791, 0.1689, 0.6239, 0.1838]}, {"w": "those", "b": [0.6299, 0.1689, 0.6712, 0.1838]}, {"w": "values,", "b": [0.6771, 0.1689, 0.73, 0.1838]}, {"w": "you", "b": [0.736, 0.1689, 0.7641, 0.1838]}, {"w": "typically", "b": [0.7701, 0.1689, 0.838, 0.1838]}, {"w": "use", "b": [0.8439, 0.1689, 0.8692, 0.1838]}, {"w": "the", "b": [0.1312, 0.1868, 0.157, 0.2018]}, {"w": "entire", "b": [0.1632, 0.1868, 0.2092, 0.2018]}, {"w": "training", "b": [0.2153, 0.1868, 0.2793, 0.2018]}, {"w": "set", "b": [0.2855, 0.1868, 0.3083, 0.2018]}, {"w": "to", "b": [0.3144, 0.1868, 0.3309, 0.2018]}, {"w": "train", "b": [0.3371, 0.1868, 0.3763, 0.2018]}, {"w": "the", "b": [0.3825, 0.1868, 0.4083, 0.2018]}, {"w": "final", "b": [0.4144, 0.1868, 0.4495, 0.2018]}, {"w": "model", "b": [0.4557, 0.1868, 0.5046, 0.2018]}, {"w": "by", "b": [0.5108, 0.1868, 0.5304, 0.2018]}, {"w": "using", "b": [0.5365, 0.1868, 0.579, 0.2018]}, {"w": "the", "b": [0.5851, 0.1868, 0.6109, 0.2018]}, {"w": "best", "b": [0.6171, 0.1868, 0.6507, 0.2018]}, {"w": "values", "b": [0.6568, 0.1868, 0.706, 0.2018]}, {"w": "of", "b": [0.7121, 0.1868, 0.7271, 0.2018]}, {"w": "hyperparameters", "b": [0.7332, 0.1868, 0.8691, 0.2018]}, {"w": "found", "b": [0.1312, 0.2048, 0.1769, 0.2197]}, {"w": "via", "b": [0.183, 0.2048, 0.2071, 0.2197]}, {"w": "cross-validation.", "b": [0.2133, 0.2048, 0.3433, 0.2197]}, {"w": "Finally,", "b": [0.3514, 0.2048, 0.4117, 0.2197]}, {"w": "you", "b": [0.4178, 0.2048, 0.4465, 0.2197]}, {"w": "assess", "b": [0.4527, 0.2048, 0.4993, 0.2197]}, {"w": "the", "b": [0.5054, 0.2048, 0.5311, 0.2197]}, {"w": "final", "b": [0.5372, 0.2048, 0.5721, 0.2197]}, {"w": "model", "b": [0.5782, 0.2048, 0.6269, 0.2197]}, {"w": "using", "b": [0.6331, 0.2048, 0.6752, 0.2197]}, {"w": "the", "b": [0.6814, 0.2048, 0.707, 0.2197]}, {"w": "test", "b": [0.7132, 0.2048, 0.743, 0.2197]}, {"w": "set.", "b": [0.7492, 0.2048, 0.777, 0.2197]}]}, {"id": "b_2", "type": "paragraph", "text": "While finding the best values of hyperparameters is tempting, it might be unrealistic to try", "words": [{"w": "While", "b": [0.1303, 0.2317, 0.178, 0.2466]}, {"w": "finding", "b": [0.1842, 0.2317, 0.2396, 0.2466]}, {"w": "the", "b": [0.2457, 0.2317, 0.2714, 0.2466]}, {"w": "best", "b": [0.2775, 0.2317, 0.311, 0.2466]}, {"w": "values", "b": [0.3171, 0.2317, 0.366, 0.2466]}, {"w": "of", "b": [0.3721, 0.2317, 0.387, 0.2466]}, {"w": "hyperparameters", "b": [0.3932, 0.2317, 0.5284, 0.2466]}, {"w": "is", "b": [0.5345, 0.2317, 0.547, 0.2466]}, {"w": "tempting,", "b": [0.5531, 0.2317, 0.6311, 0.2466]}, {"w": "it", "b": [0.6372, 0.2317, 0.6495, 0.2466]}, {"w": "might", "b": [0.6557, 0.2317, 0.7024, 0.2466]}, {"w": "be", "b": [0.7085, 0.2317, 0.7275, 0.2466]}, {"w": "unrealistic", "b": [0.7336, 0.2317, 0.817, 0.2466]}, {"w": "to", "b": [0.8231, 0.2317, 0.8395, 0.2466]}, {"w": "try", "b": [0.8456, 0.2317, 0.8698, 0.2466]}]}, {"id": "b_3", "type": "paragraph", "text": "all of them. Remember that time is precious, and perfect is often an enemy of good. Deploy a “good enough” model to production, then continue to run the search of the ideal values for hyperparameters (for weeks if it is what it takes).", "words": [{"w": "all", "b": [0.1312, 0.2496, 0.1505, 0.2646]}, {"w": "of", "b": [0.1566, 0.2496, 0.1713, 0.2646]}, {"w": "them.", "b": [0.1774, 0.2496, 0.223, 0.2646]}, {"w": "Remember", "b": [0.2312, 0.2496, 0.3166, 0.2646]}, {"w": "that", "b": [0.3228, 0.2496, 0.3562, 0.2646]}, {"w": "time", "b": [0.3623, 0.2496, 0.3978, 0.2646]}, {"w": "is", "b": [0.4039, 0.2496, 0.4162, 0.2646]}, {"w": "precious,", "b": [0.4223, 0.2496, 0.4924, 0.2646]}, {"w": "and", "b": [0.4985, 0.2496, 0.5279, 0.2646]}, {"w": "perfect", "b": [0.5341, 0.2496, 0.5888, 0.2646]}, {"w": "is", "b": [0.595, 0.2496, 0.6073, 0.2646]}, {"w": "often", "b": [0.6134, 0.2496, 0.6534, 0.2646]}, {"w": "an", "b": [0.6595, 0.2496, 0.6788, 0.2646]}, {"w": "enemy", "b": [0.6849, 0.2496, 0.7356, 0.2646]}, {"w": "of", "b": [0.7417, 0.2496, 0.7564, 0.2646]}, {"w": "good.", "b": [0.7625, 0.2496, 0.8061, 0.2646]}, {"w": "Deploy", "b": [0.8143, 0.2496, 0.8698, 0.2646]}, {"w": "a", "b": [0.1312, 0.2676, 0.1403, 0.2825]}, {"w": "“good", "b": [0.1464, 0.2676, 0.1931, 0.2825]}, {"w": "enough”", "b": [0.1992, 0.2676, 0.264, 0.2825]}, {"w": "model", "b": [0.2701, 0.2676, 0.3179, 0.2825]}, {"w": "to", "b": [0.324, 0.2676, 0.34, 0.2825]}, {"w": "production,", "b": [0.3462, 0.2676, 0.4372, 0.2825]}, {"w": "then", "b": [0.4433, 0.2676, 0.4785, 0.2825]}, {"w": "continue", "b": [0.4846, 0.2676, 0.5509, 0.2825]}, {"w": "to", "b": [0.557, 0.2676, 0.5731, 0.2825]}, {"w": "run", "b": [0.5792, 0.2676, 0.6064, 0.2825]}, {"w": "the", "b": [0.6125, 0.2676, 0.6376, 0.2825]}, {"w": "search", "b": [0.6437, 0.2676, 0.6926, 0.2825]}, {"w": "of", "b": [0.6987, 0.2676, 0.7133, 0.2825]}, {"w": "the", "b": [0.7194, 0.2676, 0.7445, 0.2825]}, {"w": "ideal", "b": [0.7506, 0.2676, 0.7878, 0.2825]}, {"w": "values", "b": [0.7939, 0.2676, 0.8417, 0.2825]}, {"w": "for", "b": [0.8478, 0.2676, 0.8695, 0.2825]}, {"w": "hyperparameters", "b": [0.1312, 0.2855, 0.2664, 0.3005]}, {"w": "(for", "b": [0.2725, 0.2855, 0.3018, 0.3005]}, {"w": "weeks", "b": [0.3079, 0.2855, 0.3542, 0.3005]}, {"w": "if", "b": [0.3603, 0.2855, 0.3711, 0.3005]}, {"w": "it", "b": [0.3773, 0.2855, 0.3896, 0.3005]}, {"w": "is", "b": [0.3957, 0.2855, 0.4081, 0.3005]}, {"w": "what", "b": [0.4143, 0.2855, 0.4542, 0.3005]}, {"w": "it", "b": [0.4604, 0.2855, 0.4727, 0.3005]}, {"w": "takes).", "b": [0.4789, 0.2855, 0.5323, 0.3005]}]}, {"id": "b_4", "type": "paragraph", "text": "Now, let’s consider the challenge of training a shallow model.", "words": [{"w": "Now,", "b": [0.1312, 0.3124, 0.1722, 0.3274]}, {"w": "let’s", "b": [0.1784, 0.3124, 0.2113, 0.3274]}, {"w": "consider", "b": [0.2175, 0.3124, 0.2833, 0.3274]}, {"w": "the", "b": [0.2894, 0.3124, 0.3151, 0.3274]}, {"w": "challenge", "b": [0.3212, 0.3124, 0.3945, 0.3274]}, {"w": "of", "b": [0.4007, 0.3124, 0.4156, 0.3274]}, {"w": "training", "b": [0.4217, 0.3124, 0.4853, 0.3274]}, {"w": "a", "b": [0.4915, 0.3124, 0.5007, 0.3274]}, {"w": "shallow", "b": [0.5069, 0.3124, 0.5659, 0.3274]}, {"w": "model.", "b": [0.5721, 0.3124, 0.6259, 0.3274]}]}, {"id": "b_5", "type": "paragraph", "text": "5.7 Shallow Model Training", "words": [{"w": "5.7", "b": [0.1312, 0.3609, 0.1631, 0.3788]}, {"w": "Shallow", "b": [0.188, 0.3609, 0.2714, 0.3788]}, {"w": "Model", "b": [0.2797, 0.3609, 0.3486, 0.3788]}, {"w": "Training", "b": [0.3569, 0.3609, 0.4484, 0.3788]}]}, {"id": "b_6", "type": "paragraph", "text": "Shallow models make predictions based directly on the values in the input feature vector. Most popular machine learning algorithms produce shallow models. The only kind of deep models commonly used are deep neural networks. We consider a strategy to train them in Section ?? of the next chapter.", "words": [{"w": "Shallow", "b": [0.1312, 0.3995, 0.1945, 0.4144]}, {"w": "models", "b": [0.2011, 0.3995, 0.2582, 0.4144]}, {"w": "make", "b": [0.2647, 0.3995, 0.3076, 0.4144]}, {"w": "predictions", "b": [0.3142, 0.3995, 0.4043, 0.4144]}, {"w": "based", "b": [0.4109, 0.3995, 0.4571, 0.4144]}, {"w": "directly", "b": [0.4636, 0.3995, 0.5259, 0.4144]}, {"w": "on", "b": [0.5325, 0.3995, 0.5524, 0.4144]}, {"w": "the", "b": [0.559, 0.3995, 0.5851, 0.4144]}, {"w": "values", "b": [0.5917, 0.3995, 0.6415, 0.4144]}, {"w": "in", "b": [0.6481, 0.3995, 0.6638, 0.4144]}, {"w": "the", "b": [0.6703, 0.3995, 0.6965, 0.4144]}, {"w": "input", "b": [0.7031, 0.3995, 0.747, 0.4144]}, {"w": "feature", "b": [0.7536, 0.3995, 0.8106, 0.4144]}, {"w": "vector.", "b": [0.8172, 0.3995, 0.8727, 0.4144]}, {"w": "Most", "b": [0.1312, 0.4174, 0.1722, 0.4324]}, {"w": "popular", "b": [0.1783, 0.4174, 0.241, 0.4324]}, {"w": "machine", "b": [0.2471, 0.4174, 0.3138, 0.4324]}, {"w": "learning", "b": [0.32, 0.4174, 0.3852, 0.4324]}, {"w": "algorithms", "b": [0.3913, 0.4174, 0.4773, 0.4324]}, {"w": "produce", "b": [0.4835, 0.4174, 0.5482, 0.4324]}, {"w": "shallow", "b": [0.5543, 0.4174, 0.6139, 0.4324]}, {"w": "models.", "b": [0.6201, 0.4174, 0.6817, 0.4324]}, {"w": "The", "b": [0.6899, 0.4174, 0.722, 0.4324]}, {"w": "only", "b": [0.7281, 0.4174, 0.7628, 0.4324]}, {"w": "kind", "b": [0.7689, 0.4174, 0.8046, 0.4324]}, {"w": "of", "b": [0.8107, 0.4174, 0.8257, 0.4324]}, {"w": "deep", "b": [0.8318, 0.4174, 0.8691, 0.4324]}, {"w": "models", "b": [0.1312, 0.4354, 0.188, 0.4503]}, {"w": "commonly", "b": [0.1941, 0.4354, 0.2778, 0.4503]}, {"w": "used", "b": [0.284, 0.4354, 0.3205, 0.4503]}, {"w": "are", "b": [0.3266, 0.4354, 0.3516, 0.4503]}, {"w": "deep", "b": [0.3578, 0.4354, 0.3953, 0.4503]}, {"w": "neural", "b": [0.4014, 0.4354, 0.4524, 0.4503]}, {"w": "networks.", "b": [0.4586, 0.4354, 0.5362, 0.4503]}, {"w": "We", "b": [0.5444, 0.4354, 0.5704, 0.4503]}, {"w": "consider", "b": [0.5766, 0.4354, 0.6433, 0.4503]}, {"w": "a", "b": [0.6494, 0.4354, 0.6588, 0.4503]}, {"w": "strategy", "b": [0.6649, 0.4354, 0.7311, 0.4503]}, {"w": "to", "b": [0.7373, 0.4354, 0.7539, 0.4503]}, {"w": "train", "b": [0.7601, 0.4354, 0.7996, 0.4503]}, {"w": "them", "b": [0.8058, 0.4354, 0.8473, 0.4503]}, {"w": "in", "b": [0.8535, 0.4354, 0.8691, 0.4503]}, {"w": "Section", "b": [0.1312, 0.4533, 0.1897, 0.4683]}, {"w": "??", "b": [0.1958, 0.4536, 0.2158, 0.4686]}, {"w": "of", "b": [0.222, 0.4533, 0.2369, 0.4683]}, {"w": "the", "b": [0.243, 0.4533, 0.2687, 0.4683]}, {"w": "next", "b": [0.2748, 0.4533, 0.3102, 0.4683]}, {"w": "chapter.", "b": [0.3163, 0.4533, 0.3815, 0.4683]}]}, {"id": "b_7", "type": "paragraph", "text": "5.7.1 Shallow Model Training Strategy", "words": [{"w": "5.7.1", "b": [0.1312, 0.5011, 0.1749, 0.516]}, {"w": "Shallow", "b": [0.1961, 0.5011, 0.2671, 0.516]}, {"w": "Model", "b": [0.2742, 0.5011, 0.333, 0.516]}, {"w": "Training", "b": [0.34, 0.5011, 0.4181, 0.516]}, {"w": "Strategy", "b": [0.4251, 0.5011, 0.504, 0.516]}]}, {"id": "b_8", "type": "paragraph", "text": "A typical model training strategy for shallow learning algorithms looks as follows:", "words": [{"w": "A", "b": [0.1305, 0.5373, 0.1444, 0.5523]}, {"w": "typical", "b": [0.1505, 0.5373, 0.2049, 0.5523]}, {"w": "model", "b": [0.211, 0.5373, 0.2597, 0.5523]}, {"w": "training", "b": [0.2659, 0.5373, 0.3295, 0.5523]}, {"w": "strategy", "b": [0.3357, 0.5373, 0.4009, 0.5523]}, {"w": "for", "b": [0.4071, 0.5373, 0.4292, 0.5523]}, {"w": "shallow", "b": [0.4353, 0.5373, 0.4944, 0.5523]}, {"w": "learning", "b": [0.5005, 0.5373, 0.5652, 0.5523]}, {"w": "algorithms", "b": [0.5713, 0.5373, 0.6566, 0.5523]}, {"w": "looks", "b": [0.6627, 0.5373, 0.7039, 0.5523]}, {"w": "as", "b": [0.71, 0.5373, 0.7265, 0.5523]}, {"w": "follows:", "b": [0.7327, 0.5373, 0.7922, 0.5523]}]}, {"id": "b_9", "type": "paragraph", "text": "1. Define a performance metric P. 2. Shortlist learning algorithms. 3. Choose a hyperparameter tuning strategy T. 4. Pick a learning algorithm A. 5. Pick a combination H of hyperparameter values for algorithm A using strategy T. 6. Use the training set and train a model M using algorithm A parametrized with hyperparameter values H. 7. Use the validation set and calculate the value of metric P for model M. 8. Decide: a. If there are still untested hyperparameter values, pick another combination H of", "words": [{"w": "1.", "b": [0.1538, 0.5643, 0.1681, 0.5792]}, {"w": "Define", "b": [0.1774, 0.5643, 0.2284, 0.5792]}, {"w": "a", "b": [0.2345, 0.5643, 0.2438, 0.5792]}, {"w": "performance", "b": [0.2499, 0.5643, 0.3495, 0.5792]}, {"w": "metric", "b": [0.3556, 0.5643, 0.407, 0.5792]}, {"w": "P.", "b": [0.413, 0.5643, 0.4325, 0.5795]}, {"w": "2.", "b": [0.1538, 0.5822, 0.1681, 0.5972]}, {"w": "Shortlist", "b": [0.1774, 0.5822, 0.2462, 0.5972]}, {"w": "learning", "b": [0.2524, 0.5822, 0.317, 0.5972]}, {"w": "algorithms.", "b": [0.3232, 0.5822, 0.4136, 0.5972]}, {"w": "3.", "b": [0.1538, 0.6001, 0.1681, 0.6151]}, {"w": "Choose", "b": [0.1774, 0.6001, 0.2354, 0.6151]}, {"w": "a", "b": [0.2415, 0.6001, 0.2508, 0.6151]}, {"w": "hyperparameter", "b": [0.2569, 0.6001, 0.3847, 0.6151]}, {"w": "tuning", "b": [0.3909, 0.6001, 0.4432, 0.6151]}, {"w": "strategy", "b": [0.4493, 0.6001, 0.5146, 0.6151]}, {"w": "T.", "b": [0.5206, 0.6001, 0.5391, 0.6154]}, {"w": "4.", "b": [0.1538, 0.6181, 0.1681, 0.633]}, {"w": "Pick", "b": [0.1774, 0.6181, 0.2125, 0.633]}, {"w": "a", "b": [0.2186, 0.6181, 0.2279, 0.633]}, {"w": "learning", "b": [0.234, 0.6181, 0.2987, 0.633]}, {"w": "algorithm", "b": [0.3048, 0.6181, 0.3828, 0.633]}, {"w": "A.", "b": [0.3889, 0.6181, 0.4078, 0.6333]}, {"w": "5.", "b": [0.1538, 0.636, 0.1681, 0.651]}, {"w": "Pick", "b": [0.1774, 0.636, 0.2125, 0.651]}, {"w": "a", "b": [0.2186, 0.636, 0.2279, 0.651]}, {"w": "combination", "b": [0.234, 0.636, 0.333, 0.651]}, {"w": "H", "b": [0.339, 0.6363, 0.3544, 0.6513]}, {"w": "of", "b": [0.362, 0.636, 0.3769, 0.651]}, {"w": "hyperparameter", "b": [0.383, 0.636, 0.5109, 0.651]}, {"w": "values", "b": [0.517, 0.636, 0.5659, 0.651]}, {"w": "for", "b": [0.572, 0.636, 0.5941, 0.651]}, {"w": "algorithm", "b": [0.6002, 0.636, 0.6782, 0.651]}, {"w": "A", "b": [0.6842, 0.6363, 0.6981, 0.6513]}, {"w": "using", "b": [0.7042, 0.636, 0.7464, 0.651]}, {"w": "strategy", "b": [0.7525, 0.636, 0.8178, 0.651]}, {"w": "T.", "b": [0.8239, 0.636, 0.8424, 0.6513]}, {"w": "6.", "b": [0.1538, 0.654, 0.1681, 0.6689]}, {"w": "Use", "b": [0.1774, 0.654, 0.2073, 0.6689]}, {"w": "the", "b": [0.2163, 0.654, 0.2425, 0.6689]}, {"w": "training", "b": [0.2515, 0.654, 0.3164, 0.6689]}, {"w": "set", "b": [0.3255, 0.654, 0.3486, 0.6689]}, {"w": "and", "b": [0.3577, 0.654, 0.388, 0.6689]}, {"w": "train", "b": [0.397, 0.654, 0.4368, 0.6689]}, {"w": "a", "b": [0.4459, 0.654, 0.4553, 0.6689]}, {"w": "model", "b": [0.4643, 0.654, 0.514, 0.6689]}, {"w": "M", "b": [0.5229, 0.6543, 0.5408, 0.6692]}, {"w": "using", "b": [0.5519, 0.654, 0.5949, 0.6689]}, {"w": "algorithm", "b": [0.6039, 0.654, 0.6835, 0.6689]}, {"w": "A", "b": [0.6925, 0.6543, 0.7063, 0.6692]}, {"w": "parametrized", "b": [0.7153, 0.654, 0.8232, 0.6689]}, {"w": "with", "b": [0.8322, 0.654, 0.8688, 0.6689]}, {"w": "hyperparameter", "b": [0.1774, 0.6719, 0.3052, 0.6869]}, {"w": "values", "b": [0.3113, 0.6719, 0.3602, 0.6869]}, {"w": "H.", "b": [0.3662, 0.6719, 0.3882, 0.6872]}, {"w": "7.", "b": [0.1538, 0.6899, 0.1681, 0.7048]}, {"w": "Use", "b": [0.1774, 0.6899, 0.2067, 0.7048]}, {"w": "the", "b": [0.2128, 0.6899, 0.2385, 0.7048]}, {"w": "validation", "b": [0.2446, 0.6899, 0.3241, 0.7048]}, {"w": "set", "b": [0.3303, 0.6899, 0.3529, 0.7048]}, {"w": "and", "b": [0.3591, 0.6899, 0.3888, 0.7048]}, {"w": "calculate", "b": [0.395, 0.6899, 0.4657, 0.7048]}, {"w": "the", "b": [0.4719, 0.6899, 0.4975, 0.7048]}, {"w": "value", "b": [0.5037, 0.6899, 0.5452, 0.7048]}, {"w": "of", "b": [0.5514, 0.6899, 0.5662, 0.7048]}, {"w": "metric", "b": [0.5724, 0.6899, 0.6237, 0.7048]}, {"w": "P", "b": [0.6296, 0.6902, 0.6415, 0.7051]}, {"w": "for", "b": [0.6502, 0.6899, 0.6723, 0.7048]}, {"w": "model", "b": [0.6784, 0.6899, 0.7271, 0.7048]}, {"w": "M.", "b": [0.7333, 0.6899, 0.7583, 0.7051]}, {"w": "8.", "b": [0.1538, 0.7078, 0.1681, 0.7228]}, {"w": "Decide:", "b": [0.1774, 0.7078, 0.2366, 0.7228]}, {"w": "a.", "b": [0.1944, 0.7258, 0.2087, 0.7407]}, {"w": "If", "b": [0.2179, 0.7258, 0.2303, 0.7407]}, {"w": "there", "b": [0.2364, 0.7258, 0.2775, 0.7407]}, {"w": "are", "b": [0.2837, 0.7258, 0.3084, 0.7407]}, {"w": "still", "b": [0.3145, 0.7258, 0.3444, 0.7407]}, {"w": "untested", "b": [0.3505, 0.7258, 0.4189, 0.7407]}, {"w": "hyperparameter", "b": [0.425, 0.7258, 0.553, 0.7407]}, {"w": "values,", "b": [0.5591, 0.7258, 0.6131, 0.7407]}, {"w": "pick", "b": [0.6193, 0.7258, 0.6521, 0.7407]}, {"w": "another", "b": [0.6583, 0.7258, 0.7199, 0.7407]}, {"w": "combination", "b": [0.726, 0.7258, 0.8251, 0.7407]}, {"w": "H", "b": [0.8309, 0.7261, 0.8462, 0.741]}, {"w": "of", "b": [0.8539, 0.7258, 0.8688, 0.7407]}]}, {"id": "b_10", "type": "paragraph", "text": "hyperparameter values using strategy T and go back to step 6. b. Otherwise, pick a different learning algorithm A and go back to step 5, or proceed", "words": [{"w": "hyperparameter", "b": [0.2179, 0.7437, 0.3458, 0.7587]}, {"w": "values", "b": [0.3519, 0.7437, 0.4007, 0.7587]}, {"w": "using", "b": [0.4069, 0.7437, 0.449, 0.7587]}, {"w": "strategy", "b": [0.4552, 0.7437, 0.5205, 0.7587]}, {"w": "T", "b": [0.5265, 0.744, 0.5372, 0.759]}, {"w": "and", "b": [0.546, 0.7437, 0.5757, 0.7587]}, {"w": "go", "b": [0.5818, 0.7437, 0.6003, 0.7587]}, {"w": "back", "b": [0.6064, 0.7437, 0.6434, 0.7587]}, {"w": "to", "b": [0.6495, 0.7437, 0.6659, 0.7587]}, {"w": "step", "b": [0.6721, 0.7437, 0.705, 0.7587]}, {"w": "6.", "b": [0.7111, 0.7437, 0.7254, 0.7587]}, {"w": "b.", "b": [0.1933, 0.7617, 0.2087, 0.7766]}, {"w": "Otherwise,", "b": [0.2179, 0.7617, 0.3025, 0.7766]}, {"w": "pick", "b": [0.3085, 0.7617, 0.3407, 0.7766]}, {"w": "a", "b": [0.3466, 0.7617, 0.3557, 0.7766]}, {"w": "different", "b": [0.3616, 0.7617, 0.427, 0.7766]}, {"w": "learning", "b": [0.433, 0.7617, 0.4963, 0.7766]}, {"w": "algorithm", "b": [0.5023, 0.7617, 0.5787, 0.7766]}, {"w": "A", "b": [0.5845, 0.7619, 0.5983, 0.7769]}, {"w": "and", "b": [0.6043, 0.7617, 0.6334, 0.7766]}, {"w": "go", "b": [0.6394, 0.7617, 0.6575, 0.7766]}, {"w": "back", "b": [0.6634, 0.7617, 0.6996, 0.7766]}, {"w": "to", "b": [0.7056, 0.7617, 0.7217, 0.7766]}, {"w": "step", "b": [0.7276, 0.7617, 0.7599, 0.7766]}, {"w": "5,", "b": [0.7658, 0.7617, 0.7799, 0.7766]}, {"w": "or", "b": [0.7859, 0.7617, 0.802, 0.7766]}, {"w": "proceed", "b": [0.808, 0.7617, 0.8688, 0.7766]}]}, {"id": "b_11", "type": "paragraph", "text": "to step 9 if there are no more learning algorithms to try. 9. Return the model for which the value of metric P is maximized.", "words": [{"w": "to", "b": [0.2179, 0.7796, 0.2343, 0.7946]}, {"w": "step", "b": [0.2405, 0.7796, 0.2734, 0.7946]}, {"w": "9", "b": [0.2795, 0.7796, 0.2888, 0.7946]}, {"w": "if", "b": [0.2949, 0.7796, 0.3057, 0.7946]}, {"w": "there", "b": [0.3118, 0.7796, 0.3529, 0.7946]}, {"w": "are", "b": [0.3591, 0.7796, 0.3837, 0.7946]}, {"w": "no", "b": [0.3899, 0.7796, 0.4094, 0.7946]}, {"w": "more", "b": [0.4155, 0.7796, 0.4556, 0.7946]}, {"w": "learning", "b": [0.4617, 0.7796, 0.5264, 0.7946]}, {"w": "algorithms", "b": [0.5325, 0.7796, 0.6178, 0.7946]}, {"w": "to", "b": [0.6239, 0.7796, 0.6403, 0.7946]}, {"w": "try.", "b": [0.6465, 0.7796, 0.6742, 0.7946]}, {"w": "9.", "b": [0.1538, 0.7976, 0.1681, 0.8125]}, {"w": "Return", "b": [0.1774, 0.7976, 0.2341, 0.8125]}, {"w": "the", "b": [0.2402, 0.7976, 0.2659, 0.8125]}, {"w": "model", "b": [0.272, 0.7976, 0.3207, 0.8125]}, {"w": "for", "b": [0.3269, 0.7976, 0.349, 0.8125]}, {"w": "which", "b": [0.3551, 0.7976, 0.4018, 0.8125]}, {"w": "the", "b": [0.4079, 0.7976, 0.4336, 0.8125]}, {"w": "value", "b": [0.4397, 0.7976, 0.4813, 0.8125]}, {"w": "of", "b": [0.4874, 0.7976, 0.5023, 0.8125]}, {"w": "metric", "b": [0.5084, 0.7976, 0.5597, 0.8125]}, {"w": "P", "b": [0.5657, 0.7978, 0.5776, 0.8128]}, {"w": "is", "b": [0.5863, 0.7976, 0.5987, 0.8125]}, {"w": "maximized.", "b": [0.6048, 0.7976, 0.6966, 0.8125]}]}, {"id": "b_12", "type": "paragraph", "text": "In the above strategy, step 1, you define the performance metric for your problem. As we have seen in Section 5.5, it is a mathematical function or a subroutine that takes a model and a dataset as input, and produces a numerical value that reflects how well the model works.", "words": [{"w": "In", "b": [0.1312, 0.8245, 0.1485, 0.8394]}, {"w": "the", "b": [0.1548, 0.8245, 0.181, 0.8394]}, {"w": "above", "b": [0.1873, 0.8245, 0.2343, 0.8394]}, {"w": "strategy,", "b": [0.2406, 0.8245, 0.3109, 0.8394]}, {"w": "step", "b": [0.3172, 0.8245, 0.3508, 0.8394]}, {"w": "1,", "b": [0.357, 0.8245, 0.3717, 0.8394]}, {"w": "you", "b": [0.378, 0.8245, 0.4073, 0.8394]}, {"w": "define", "b": [0.4136, 0.8245, 0.4617, 0.8394]}, {"w": "the", "b": [0.468, 0.8245, 0.4942, 0.8394]}, {"w": "performance", "b": [0.5005, 0.8245, 0.6021, 0.8394]}, {"w": "metric", "b": [0.6084, 0.8245, 0.6607, 0.8394]}, {"w": "for", "b": [0.667, 0.8245, 0.6896, 0.8394]}, {"w": "your", "b": [0.6958, 0.8245, 0.7325, 0.8394]}, {"w": "problem.", "b": [0.7388, 0.8245, 0.811, 0.8394]}, {"w": "As", "b": [0.8197, 0.8245, 0.8413, 0.8394]}, {"w": "we", "b": [0.8476, 0.8245, 0.869, 0.8394]}, {"w": "have", "b": [0.1312, 0.8424, 0.1669, 0.8574]}, {"w": "seen", "b": [0.1725, 0.8424, 0.2057, 0.8574]}, {"w": "in", "b": [0.2113, 0.8424, 0.2264, 0.8574]}, {"w": "Section", "b": [0.2319, 0.8424, 0.2892, 0.8574]}, {"w": "5.5,", "b": [0.2948, 0.8424, 0.3229, 0.8574]}, {"w": "it", "b": [0.3286, 0.8424, 0.3407, 0.8574]}, {"w": "is", "b": [0.3462, 0.8424, 0.3584, 0.8574]}, {"w": "a", "b": [0.364, 0.8424, 0.373, 0.8574]}, {"w": "mathematical", "b": [0.3786, 0.8424, 0.4861, 0.8574]}, {"w": "function", "b": [0.4916, 0.8424, 0.5565, 0.8574]}, {"w": "or", "b": [0.562, 0.8424, 0.5782, 0.8574]}, {"w": "a", "b": [0.5837, 0.8424, 0.5928, 0.8574]}, {"w": "subroutine", "b": [0.5983, 0.8424, 0.6819, 0.8574]}, {"w": "that", "b": [0.6875, 0.8424, 0.7206, 0.8574]}, {"w": "takes", "b": [0.7262, 0.8424, 0.7665, 0.8574]}, {"w": "a", "b": [0.772, 0.8424, 0.7811, 0.8574]}, {"w": "model", "b": [0.7866, 0.8424, 0.8344, 0.8574]}, {"w": "and", "b": [0.8399, 0.8424, 0.8691, 0.8574]}, {"w": "a", "b": [0.1312, 0.8604, 0.1405, 0.8753]}, {"w": "dataset", "b": [0.1466, 0.8604, 0.2052, 0.8753]}, {"w": "as", "b": [0.2113, 0.8604, 0.2278, 0.8753]}, {"w": "input,", "b": [0.234, 0.8604, 0.2822, 0.8753]}, {"w": "and", "b": [0.2883, 0.8604, 0.3181, 0.8753]}, {"w": "produces", "b": [0.3242, 0.8604, 0.3957, 0.8753]}, {"w": "a", "b": [0.4018, 0.8604, 0.411, 0.8753]}, {"w": "numerical", "b": [0.4172, 0.8604, 0.4957, 0.8753]}, {"w": "value", "b": [0.5018, 0.8604, 0.5434, 0.8753]}, {"w": "that", "b": [0.5495, 0.8604, 0.5834, 0.8753]}, {"w": "reflects", "b": [0.5895, 0.8604, 0.6461, 0.8753]}, {"w": "how", "b": [0.6522, 0.8604, 0.6845, 0.8753]}, {"w": "well", "b": [0.6907, 0.8604, 0.7219, 0.8753]}, {"w": "the", "b": [0.7281, 0.8604, 0.7537, 0.8753]}, {"w": "model", "b": [0.7599, 0.8604, 0.8086, 0.8753]}, {"w": "works.", "b": [0.8147, 0.8604, 0.8662, 0.8753]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 29", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "29", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 168, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "In step 2, you choose candidate algorithms and then shortlist some of them (usually, two or three). To do that, you can use the selection criteria considered in Section 5.3.", "words": [{"w": "In", "b": [0.1312, 0.0881, 0.1481, 0.1031]}, {"w": "step", "b": [0.1542, 0.0881, 0.187, 0.1031]}, {"w": "2,", "b": [0.1932, 0.0881, 0.2075, 0.1031]}, {"w": "you", "b": [0.2136, 0.0881, 0.2422, 0.1031]}, {"w": "choose", "b": [0.2484, 0.0881, 0.3005, 0.1031]}, {"w": "candidate", "b": [0.3067, 0.0881, 0.3842, 0.1031]}, {"w": "algorithms", "b": [0.3904, 0.0881, 0.4752, 0.1031]}, {"w": "and", "b": [0.4814, 0.0881, 0.511, 0.1031]}, {"w": "then", "b": [0.5171, 0.0881, 0.5529, 0.1031]}, {"w": "shortlist", "b": [0.559, 0.0881, 0.6246, 0.1031]}, {"w": "some", "b": [0.6307, 0.0881, 0.6706, 0.1031]}, {"w": "of", "b": [0.6768, 0.0881, 0.6916, 0.1031]}, {"w": "them", "b": [0.6978, 0.0881, 0.7386, 0.1031]}, {"w": "(usually,", "b": [0.7447, 0.0881, 0.8122, 0.1031]}, {"w": "two", "b": [0.8184, 0.0881, 0.8469, 0.1031]}, {"w": "or", "b": [0.8531, 0.0881, 0.8694, 0.1031]}, {"w": "three).", "b": [0.1312, 0.106, 0.1846, 0.121]}, {"w": "To", "b": [0.1928, 0.106, 0.2138, 0.121]}, {"w": "do", "b": [0.22, 0.106, 0.2395, 0.121]}, {"w": "that,", "b": [0.2456, 0.106, 0.2846, 0.121]}, {"w": "you", "b": [0.2907, 0.106, 0.3194, 0.121]}, {"w": "can", "b": [0.3256, 0.106, 0.3533, 0.121]}, {"w": "use", "b": [0.3594, 0.106, 0.3852, 0.121]}, {"w": "the", "b": [0.3913, 0.106, 0.417, 0.121]}, {"w": "selection", "b": [0.4231, 0.106, 0.492, 0.121]}, {"w": "criteria", "b": [0.4981, 0.106, 0.5556, 0.121]}, {"w": "considered", "b": [0.5618, 0.106, 0.6461, 0.121]}, {"w": "in", "b": [0.6522, 0.106, 0.6676, 0.121]}, {"w": "Section", "b": [0.6737, 0.106, 0.7322, 0.121]}, {"w": "5.3.", "b": [0.7384, 0.106, 0.7671, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "In step 3, you choose a hyperparameter tuning strategy. It is a sequence of actions that generates the combinations of hyperparameter values to test. We have considered several hyperparameter-tuning strategies in Section 5.6.", "words": [{"w": "In", "b": [0.1312, 0.133, 0.1485, 0.1479]}, {"w": "step", "b": [0.1556, 0.133, 0.1892, 0.1479]}, {"w": "3,", "b": [0.1964, 0.133, 0.211, 0.1479]}, {"w": "you", "b": [0.2184, 0.133, 0.2477, 0.1479]}, {"w": "choose", "b": [0.2548, 0.133, 0.3083, 0.1479]}, {"w": "a", "b": [0.3154, 0.133, 0.3249, 0.1479]}, {"w": "hyperparameter", "b": [0.332, 0.133, 0.4624, 0.1479]}, {"w": "tuning", "b": [0.4695, 0.133, 0.5229, 0.1479]}, {"w": "strategy.", "b": [0.53, 0.133, 0.6003, 0.1479]}, {"w": "It", "b": [0.6115, 0.133, 0.6256, 0.1479]}, {"w": "is", "b": [0.6327, 0.133, 0.6454, 0.1479]}, {"w": "a", "b": [0.6525, 0.133, 0.6619, 0.1479]}, {"w": "sequence", "b": [0.6691, 0.133, 0.7409, 0.1479]}, {"w": "of", "b": [0.748, 0.133, 0.7632, 0.1479]}, {"w": "actions", "b": [0.7703, 0.133, 0.828, 0.1479]}, {"w": "that", "b": [0.8351, 0.133, 0.8696, 0.1479]}, {"w": "generates", "b": [0.1312, 0.1509, 0.2078, 0.1659]}, {"w": "the", "b": [0.2143, 0.1509, 0.2404, 0.1659]}, {"w": "combinations", "b": [0.2469, 0.1509, 0.3553, 0.1659]}, {"w": "of", "b": [0.3618, 0.1509, 0.3769, 0.1659]}, {"w": "hyperparameter", "b": [0.3834, 0.1509, 0.5138, 0.1659]}, {"w": "values", "b": [0.5203, 0.1509, 0.5701, 0.1659]}, {"w": "to", "b": [0.5766, 0.1509, 0.5934, 0.1659]}, {"w": "test.", "b": [0.5998, 0.1509, 0.6355, 0.1659]}, {"w": "We", "b": [0.6448, 0.1509, 0.6709, 0.1659]}, {"w": "have", "b": [0.6775, 0.1509, 0.7146, 0.1659]}, {"w": "considered", "b": [0.7211, 0.1509, 0.8071, 0.1659]}, {"w": "several", "b": [0.8135, 0.1509, 0.8692, 0.1659]}, {"w": "hyperparameter-tuning", "b": [0.1312, 0.1689, 0.3175, 0.1838]}, {"w": "strategies", "b": [0.3237, 0.1689, 0.3998, 0.1838]}, {"w": "in", "b": [0.406, 0.1689, 0.4213, 0.1838]}, {"w": "Section", "b": [0.4275, 0.1689, 0.486, 0.1838]}, {"w": "5.6.", "b": [0.4921, 0.1689, 0.5208, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "5.7.2 Saving and Restoring the Model", "words": [{"w": "5.7.2", "b": [0.1312, 0.217, 0.1749, 0.232]}, {"w": "Saving", "b": [0.1961, 0.217, 0.2571, 0.232]}, {"w": "and", "b": [0.2642, 0.217, 0.2981, 0.232]}, {"w": "Restoring", "b": [0.3051, 0.217, 0.3951, 0.232]}, {"w": "the", "b": [0.4021, 0.217, 0.4319, 0.232]}, {"w": "Model", "b": [0.4389, 0.217, 0.4977, 0.232]}]}, {"id": "b_3", "type": "paragraph", "text": "Once you trained a model or a pipeline, you must save it to a file so that it can be deployed to production and then used for scoring. Both model and pipeline can be serialized. In Python, Pickle is typically used for serialization (saving) and deserialization (restoring) of objects. In R, it’s RDS.", "words": [{"w": "Once", "b": [0.1312, 0.2533, 0.1714, 0.2682]}, {"w": "you", "b": [0.1768, 0.2533, 0.2049, 0.2682]}, {"w": "trained", "b": [0.2103, 0.2533, 0.2666, 0.2682]}, {"w": "a", "b": [0.2719, 0.2533, 0.281, 0.2682]}, {"w": "model", "b": [0.2863, 0.2533, 0.3341, 0.2682]}, {"w": "or", "b": [0.3394, 0.2533, 0.3555, 0.2682]}, {"w": "a", "b": [0.3609, 0.2533, 0.3699, 0.2682]}, {"w": "pipeline,", "b": [0.3753, 0.2533, 0.4421, 0.2682]}, {"w": "you", "b": [0.4476, 0.2533, 0.4758, 0.2682]}, {"w": "must", "b": [0.4811, 0.2533, 0.5199, 0.2682]}, {"w": "save", "b": [0.5252, 0.2533, 0.558, 0.2682]}, {"w": "it", "b": [0.5633, 0.2533, 0.5754, 0.2682]}, {"w": "to", "b": [0.5807, 0.2533, 0.5968, 0.2682]}, {"w": "a", "b": [0.6021, 0.2533, 0.6112, 0.2682]}, {"w": "file", "b": [0.6165, 0.2533, 0.6396, 0.2682]}, {"w": "so", "b": [0.645, 0.2533, 0.6611, 0.2682]}, {"w": "that", "b": [0.6665, 0.2533, 0.6997, 0.2682]}, {"w": "it", "b": [0.705, 0.2533, 0.7171, 0.2682]}, {"w": "can", "b": [0.7224, 0.2533, 0.7495, 0.2682]}, {"w": "be", "b": [0.7549, 0.2533, 0.7735, 0.2682]}, {"w": "deployed", "b": [0.7789, 0.2533, 0.8477, 0.2682]}, {"w": "to", "b": [0.853, 0.2533, 0.8691, 0.2682]}, {"w": "production", "b": [0.1312, 0.2712, 0.2175, 0.2862]}, {"w": "and", "b": [0.2236, 0.2712, 0.2529, 0.2862]}, {"w": "then", "b": [0.259, 0.2712, 0.2943, 0.2862]}, {"w": "used", "b": [0.3005, 0.2712, 0.3359, 0.2862]}, {"w": "for", "b": [0.342, 0.2712, 0.3637, 0.2862]}, {"w": "scoring.", "b": [0.3699, 0.2712, 0.4305, 0.2862]}, {"w": "Both", "b": [0.4387, 0.2712, 0.4778, 0.2862]}, {"w": "model", "b": [0.4839, 0.2712, 0.5318, 0.2862]}, {"w": "and", "b": [0.5379, 0.2712, 0.5672, 0.2862]}, {"w": "pipeline", "b": [0.5733, 0.2712, 0.6353, 0.2862]}, {"w": "can", "b": [0.6415, 0.2712, 0.6687, 0.2862]}, {"w": "be", "b": [0.6749, 0.2712, 0.6935, 0.2862]}, {"w": "serialized.", "b": [0.6997, 0.2712, 0.7775, 0.2862]}, {"w": "In", "b": [0.7857, 0.2712, 0.8023, 0.2862]}, {"w": "Python,", "b": [0.8085, 0.2712, 0.8717, 0.2862]}, {"w": "Pickle", "b": [0.1312, 0.2895, 0.1873, 0.3044]}, {"w": "is", "b": [0.1934, 0.2892, 0.206, 0.3041]}, {"w": "typically", "b": [0.2122, 0.2892, 0.2826, 0.3041]}, {"w": "used", "b": [0.2887, 0.2892, 0.3253, 0.3041]}, {"w": "for", "b": [0.3315, 0.2892, 0.354, 0.3041]}, {"w": "serialization", "b": [0.3601, 0.2892, 0.4583, 0.3041]}, {"w": "(saving)", "b": [0.4644, 0.2892, 0.5302, 0.3041]}, {"w": "and", "b": [0.5364, 0.2892, 0.5666, 0.3041]}, {"w": "deserialization", "b": [0.5728, 0.2892, 0.6897, 0.3041]}, {"w": "(restoring)", "b": [0.6959, 0.2892, 0.7826, 0.3041]}, {"w": "of", "b": [0.7888, 0.2892, 0.8039, 0.3041]}, {"w": "objects.", "b": [0.81, 0.2892, 0.8727, 0.3041]}, {"w": "In", "b": [0.1312, 0.3071, 0.1482, 0.3221]}, {"w": "R,", "b": [0.1543, 0.3071, 0.173, 0.3221]}, {"w": "it’s", "b": [0.1792, 0.3071, 0.2039, 0.3221]}, {"w": "RDS.", "b": [0.21, 0.3071, 0.2531, 0.3221]}]}, {"id": "b_4", "type": "equation", "text": "Here’s how model serialization/deserialization is done in Python:", "words": [{"w": "Here’s", "b": [0.1312, 0.334, 0.1811, 0.349]}, {"w": "how", "b": [0.1873, 0.334, 0.2196, 0.349]}, {"w": "model", "b": [0.2257, 0.334, 0.2744, 0.349]}, {"w": "serialization/deserialization", "b": [0.2806, 0.334, 0.5014, 0.349]}, {"w": "is", "b": [0.5075, 0.334, 0.5199, 0.349]}, {"w": "done", "b": [0.5261, 0.334, 0.564, 0.349]}, {"w": "in", "b": [0.5702, 0.334, 0.5856, 0.349]}, {"w": "Python:", "b": [0.5917, 0.334, 0.6561, 0.349]}]}, {"id": "b_5", "type": "paragraph", "text": "1 import pickle", "words": [{"w": "1", "b": [0.1028, 0.3671, 0.1091, 0.3746]}, {"w": "import", "b": [0.1312, 0.361, 0.1893, 0.3759]}, {"w": "pickle", "b": [0.199, 0.361, 0.2571, 0.3759]}]}, {"id": "b_6", "type": "paragraph", "text": "2 from sklearn.svm import SVC", "words": [{"w": "2", "b": [0.1028, 0.385, 0.1091, 0.3925]}, {"w": "from", "b": [0.1312, 0.3789, 0.17, 0.3939]}, {"w": "sklearn.svm", "b": [0.1797, 0.3789, 0.2862, 0.3939]}, {"w": "import", "b": [0.2959, 0.3789, 0.354, 0.3939]}, {"w": "SVC", "b": [0.3637, 0.3789, 0.3928, 0.3939]}]}, {"id": "b_7", "type": "paragraph", "text": "3 from sklearn import datasets", "words": [{"w": "3", "b": [0.1028, 0.403, 0.1091, 0.4105]}, {"w": "from", "b": [0.1312, 0.3969, 0.17, 0.4118]}, {"w": "sklearn", "b": [0.1797, 0.3969, 0.2475, 0.4118]}, {"w": "import", "b": [0.2571, 0.3969, 0.3153, 0.4118]}, {"w": "datasets", "b": [0.325, 0.3969, 0.4024, 0.4118]}]}, {"id": "b_9", "type": "paragraph", "text": "5 # Prepare data", "words": [{"w": "5", "b": [0.1028, 0.4389, 0.1091, 0.4464]}, {"w": "#", "b": [0.1312, 0.4338, 0.1409, 0.4488]}, {"w": "Prepare", "b": [0.1506, 0.4338, 0.2184, 0.4488]}, {"w": "data", "b": [0.2281, 0.4338, 0.2668, 0.4488]}]}, {"id": "b_10", "type": "equation", "text": "6 X, y = datasets.load_iris(return_X_y=True)", "words": [{"w": "6", "b": [0.1028, 0.4568, 0.1091, 0.4643]}, {"w": "X,", "b": [0.1312, 0.4507, 0.1506, 0.4657]}, {"w": "y", "b": [0.1603, 0.4507, 0.17, 0.4657]}, {"w": "=", "b": [0.1797, 0.4507, 0.1893, 0.4657]}, {"w": "datasets.load_iris(return_X_y=True)", "b": [0.199, 0.4507, 0.538, 0.4657]}]}, {"id": "b_12", "type": "paragraph", "text": "8 # Instantiate the model", "words": [{"w": "8", "b": [0.1028, 0.4927, 0.1091, 0.5002]}, {"w": "#", "b": [0.1312, 0.4876, 0.1409, 0.5026]}, {"w": "Instantiate", "b": [0.1506, 0.4876, 0.2571, 0.5026]}, {"w": "the", "b": [0.2668, 0.4876, 0.2959, 0.5026]}, {"w": "model", "b": [0.3056, 0.4876, 0.354, 0.5026]}]}, {"id": "b_13", "type": "equation", "text": "9 model = SVC()", "words": [{"w": "9", "b": [0.1028, 0.5107, 0.1091, 0.5181]}, {"w": "model", "b": [0.1312, 0.5045, 0.1797, 0.5195]}, {"w": "=", "b": [0.1893, 0.5045, 0.199, 0.5195]}, {"w": "SVC()", "b": [0.2087, 0.5045, 0.2571, 0.5195]}]}, {"id": "b_15", "type": "paragraph", "text": "11 # Train the model", "words": [{"w": "11", "b": [0.0965, 0.5466, 0.1091, 0.554]}, {"w": "#", "b": [0.1312, 0.5415, 0.1409, 0.5564]}, {"w": "Train", "b": [0.1506, 0.5415, 0.199, 0.5564]}, {"w": "the", "b": [0.2087, 0.5415, 0.2378, 0.5564]}, {"w": "model", "b": [0.2475, 0.5415, 0.2959, 0.5564]}]}, {"id": "b_16", "type": "paragraph", "text": "12 model.fit(X, y)", "words": [{"w": "12", "b": [0.0965, 0.5645, 0.1091, 0.572]}, {"w": "model.fit(X,", "b": [0.1312, 0.5584, 0.2475, 0.5733]}, {"w": "y)", "b": [0.2571, 0.5584, 0.2765, 0.5733]}]}, {"id": "b_18", "type": "paragraph", "text": "14 # Save the model to file", "words": [{"w": "14", "b": [0.0965, 0.6004, 0.1091, 0.6079]}, {"w": "#", "b": [0.1312, 0.5953, 0.1409, 0.6103]}, {"w": "Save", "b": [0.1506, 0.5953, 0.1893, 0.6103]}, {"w": "the", "b": [0.199, 0.5953, 0.2281, 0.6103]}, {"w": "model", "b": [0.2378, 0.5953, 0.2862, 0.6103]}, {"w": "to", "b": [0.2959, 0.5953, 0.3153, 0.6103]}, {"w": "file", "b": [0.325, 0.5953, 0.3637, 0.6103]}]}, {"id": "b_19", "type": "equation", "text": "15 pickle.dump(model, open(\"model_file.pkl\", \"wb\"))", "words": [{"w": "15", "b": [0.0965, 0.6184, 0.1091, 0.6258]}, {"w": "pickle.dump(model,", "b": [0.1312, 0.6122, 0.3056, 0.6272]}, {"w": "open(\"model_file.pkl\",", "b": [0.3153, 0.6122, 0.5284, 0.6272]}, {"w": "\"wb\"))", "b": [0.538, 0.6122, 0.5962, 0.6272]}]}, {"id": "b_21", "type": "paragraph", "text": "17 # Restore the model from file", "words": [{"w": "17", "b": [0.0965, 0.6542, 0.1091, 0.6617]}, {"w": "#", "b": [0.1312, 0.6492, 0.1409, 0.6641]}, {"w": "Restore", "b": [0.1506, 0.6492, 0.2184, 0.6641]}, {"w": "the", "b": [0.2281, 0.6492, 0.2571, 0.6641]}, {"w": "model", "b": [0.2668, 0.6492, 0.3153, 0.6641]}, {"w": "from", "b": [0.325, 0.6492, 0.3637, 0.6641]}, {"w": "file", "b": [0.3734, 0.6492, 0.4121, 0.6641]}]}, {"id": "b_22", "type": "equation", "text": "18 restored_model = pickle.load(open(\"model_file.pkl\", \"rb\"))", "words": [{"w": "18", "b": [0.0965, 0.6722, 0.1091, 0.6797]}, {"w": "restored_model", "b": [0.1312, 0.6661, 0.2668, 0.681]}, {"w": "=", "b": [0.2765, 0.6661, 0.2862, 0.681]}, {"w": "pickle.load(open(\"model_file.pkl\",", "b": [0.2959, 0.6661, 0.6252, 0.681]}, {"w": "\"rb\"))", "b": [0.6349, 0.6661, 0.693, 0.681]}]}, {"id": "b_24", "type": "paragraph", "text": "20 # Make a prediction", "words": [{"w": "20", "b": [0.0965, 0.7081, 0.1091, 0.7156]}, {"w": "#", "b": [0.1312, 0.703, 0.1409, 0.718]}, {"w": "Make", "b": [0.1506, 0.703, 0.1893, 0.718]}, {"w": "a", "b": [0.199, 0.703, 0.2087, 0.718]}, {"w": "prediction", "b": [0.2184, 0.703, 0.3153, 0.718]}]}, {"id": "b_25", "type": "equation", "text": "21 prediction = restored_model.predict(new_example)", "words": [{"w": "21", "b": [0.0965, 0.726, 0.1091, 0.7335]}, {"w": "prediction", "b": [0.1312, 0.7199, 0.2281, 0.7349]}, {"w": "=", "b": [0.2378, 0.7199, 0.2475, 0.7349]}, {"w": "restored_model.predict(new_example)", "b": [0.2571, 0.7199, 0.5962, 0.7349]}]}, {"id": "b_26", "type": "paragraph", "text": "A similar code in R would look as follows:", "words": [{"w": "A", "b": [0.1305, 0.7468, 0.1444, 0.7618]}, {"w": "similar", "b": [0.1505, 0.7468, 0.205, 0.7618]}, {"w": "code", "b": [0.2112, 0.7468, 0.2476, 0.7618]}, {"w": "in", "b": [0.2537, 0.7468, 0.2691, 0.7618]}, {"w": "R", "b": [0.2753, 0.7468, 0.2888, 0.7618]}, {"w": "would", "b": [0.295, 0.7468, 0.3427, 0.7618]}, {"w": "look", "b": [0.3488, 0.7468, 0.3826, 0.7618]}, {"w": "as", "b": [0.3888, 0.7468, 0.4053, 0.7618]}, {"w": "follows:", "b": [0.4115, 0.7468, 0.471, 0.7618]}]}, {"id": "b_27", "type": "paragraph", "text": "1 library(\"e1071\")", "words": [{"w": "1", "b": [0.1028, 0.7799, 0.1091, 0.7874]}, {"w": "library(\"e1071\")", "b": [0.1312, 0.7737, 0.2862, 0.7897]}]}, {"id": "b_29", "type": "paragraph", "text": "3 # Prepare data", "words": [{"w": "3", "b": [0.1028, 0.8158, 0.1091, 0.8232]}, {"w": "#", "b": [0.1312, 0.8107, 0.1409, 0.8256]}, {"w": "Prepare", "b": [0.1506, 0.8107, 0.2184, 0.8256]}, {"w": "data", "b": [0.2281, 0.8107, 0.2668, 0.8256]}]}, {"id": "b_30", "type": "paragraph", "text": "4 attach(iris)", "words": [{"w": "4", "b": [0.1028, 0.8337, 0.1091, 0.8412]}, {"w": "attach(iris)", "b": [0.1312, 0.8276, 0.2475, 0.8435]}]}, {"id": "b_31", "type": "equation", "text": "5 X <- subset(iris, select=-Species)", "words": [{"w": "5", "b": [0.1028, 0.8517, 0.1091, 0.8591]}, {"w": "X", "b": [0.1312, 0.8455, 0.1409, 0.8605]}, {"w": "<-", "b": [0.1506, 0.8455, 0.17, 0.8605]}, {"w": "subset(iris,", "b": [0.1797, 0.8455, 0.2959, 0.8615]}, {"w": "select=-Species)", "b": [0.3056, 0.8455, 0.4606, 0.8605]}]}, {"id": "b_32", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 30", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "30", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 169, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "6 y <- Species", "words": [{"w": "6", "b": [0.1028, 0.0942, 0.1091, 0.1017]}, {"w": "y", "b": [0.1312, 0.0881, 0.1409, 0.1031]}, {"w": "<-", "b": [0.1506, 0.0881, 0.17, 0.1031]}, {"w": "Species", "b": [0.1797, 0.0881, 0.2475, 0.1031]}]}, {"id": "b_2", "type": "paragraph", "text": "8 # Train the model", "words": [{"w": "8", "b": [0.1028, 0.1301, 0.1091, 0.1376]}, {"w": "#", "b": [0.1312, 0.125, 0.1409, 0.14]}, {"w": "Train", "b": [0.1506, 0.125, 0.199, 0.14]}, {"w": "the", "b": [0.2087, 0.125, 0.2378, 0.14]}, {"w": "model", "b": [0.2475, 0.125, 0.2959, 0.14]}]}, {"id": "b_3", "type": "equation", "text": "9 model <- svm(X,y)", "words": [{"w": "9", "b": [0.1028, 0.1481, 0.1091, 0.1555]}, {"w": "model", "b": [0.1312, 0.1419, 0.1797, 0.1569]}, {"w": "<-", "b": [0.1893, 0.1419, 0.2087, 0.1569]}, {"w": "svm(X,y)", "b": [0.2184, 0.1419, 0.2959, 0.1579]}]}, {"id": "b_5", "type": "paragraph", "text": "11 # Save the model to file", "words": [{"w": "11", "b": [0.0965, 0.184, 0.1091, 0.1914]}, {"w": "#", "b": [0.1312, 0.1789, 0.1409, 0.1938]}, {"w": "Save", "b": [0.1506, 0.1789, 0.1893, 0.1938]}, {"w": "the", "b": [0.199, 0.1789, 0.2281, 0.1938]}, {"w": "model", "b": [0.2378, 0.1789, 0.2862, 0.1938]}, {"w": "to", "b": [0.2959, 0.1789, 0.3153, 0.1938]}, {"w": "file", "b": [0.325, 0.1789, 0.3637, 0.1938]}]}, {"id": "b_6", "type": "equation", "text": "12 saveRDS(model, \"./model_file.rds\")", "words": [{"w": "12", "b": [0.0965, 0.2019, 0.1091, 0.2094]}, {"w": "saveRDS(model,", "b": [0.1312, 0.1958, 0.2668, 0.2117]}, {"w": "\"./model_file.rds\")", "b": [0.2765, 0.1958, 0.4606, 0.2107]}]}, {"id": "b_8", "type": "paragraph", "text": "14 # Restore the model from file", "words": [{"w": "14", "b": [0.0965, 0.2378, 0.1091, 0.2453]}, {"w": "#", "b": [0.1312, 0.2327, 0.1409, 0.2477]}, {"w": "Restore", "b": [0.1506, 0.2327, 0.2184, 0.2477]}, {"w": "the", "b": [0.2281, 0.2327, 0.2571, 0.2477]}, {"w": "model", "b": [0.2668, 0.2327, 0.3153, 0.2477]}, {"w": "from", "b": [0.325, 0.2327, 0.3637, 0.2477]}, {"w": "file", "b": [0.3734, 0.2327, 0.4121, 0.2477]}]}, {"id": "b_9", "type": "equation", "text": "15 restored_model <- readRDS(\"./model_file.rds\")", "words": [{"w": "15", "b": [0.0965, 0.2557, 0.1091, 0.2632]}, {"w": "restored_model", "b": [0.1312, 0.2496, 0.2668, 0.2646]}, {"w": "<-", "b": [0.2765, 0.2496, 0.2959, 0.2646]}, {"w": "readRDS(\"./model_file.rds\")", "b": [0.3056, 0.2496, 0.5671, 0.2656]}]}, {"id": "b_11", "type": "paragraph", "text": "17 # Make a prediction", "words": [{"w": "17", "b": [0.0965, 0.2916, 0.1091, 0.2991]}, {"w": "#", "b": [0.1312, 0.2866, 0.1409, 0.3015]}, {"w": "Make", "b": [0.1506, 0.2866, 0.1893, 0.3015]}, {"w": "a", "b": [0.199, 0.2866, 0.2087, 0.3015]}, {"w": "prediction", "b": [0.2184, 0.2866, 0.3153, 0.3015]}]}, {"id": "b_12", "type": "equation", "text": "18 prediction <- predict(restored_model, new_example)", "words": [{"w": "18", "b": [0.0965, 0.3096, 0.1091, 0.3171]}, {"w": "prediction", "b": [0.1312, 0.3035, 0.2281, 0.3184]}, {"w": "<-", "b": [0.2378, 0.3035, 0.2571, 0.3184]}, {"w": "predict(restored_model,", "b": [0.2668, 0.3035, 0.4896, 0.3194]}, {"w": "new_example)", "b": [0.4993, 0.3035, 0.6155, 0.3184]}]}, {"id": "b_13", "type": "paragraph", "text": "Now, let’s talk about the particularities of the model training process that analysts must take care of in practice to produce an optimal model.", "words": [{"w": "Now,", "b": [0.1312, 0.3304, 0.1731, 0.3453]}, {"w": "let’s", "b": [0.1798, 0.3304, 0.2134, 0.3453]}, {"w": "talk", "b": [0.22, 0.3304, 0.2519, 0.3453]}, {"w": "about", "b": [0.2586, 0.3304, 0.3061, 0.3453]}, {"w": "the", "b": [0.3128, 0.3304, 0.3389, 0.3453]}, {"w": "particularities", "b": [0.3455, 0.3304, 0.4598, 0.3453]}, {"w": "of", "b": [0.4664, 0.3304, 0.4816, 0.3453]}, {"w": "the", "b": [0.4882, 0.3304, 0.5144, 0.3453]}, {"w": "model", "b": [0.521, 0.3304, 0.5707, 0.3453]}, {"w": "training", "b": [0.5773, 0.3304, 0.6422, 0.3453]}, {"w": "process", "b": [0.6488, 0.3304, 0.7082, 0.3453]}, {"w": "that", "b": [0.7148, 0.3304, 0.7493, 0.3453]}, {"w": "analysts", "b": [0.756, 0.3304, 0.8226, 0.3453]}, {"w": "must", "b": [0.8292, 0.3304, 0.8696, 0.3453]}, {"w": "take", "b": [0.1312, 0.3483, 0.1651, 0.3633]}, {"w": "care", "b": [0.1712, 0.3483, 0.2041, 0.3633]}, {"w": "of", "b": [0.2103, 0.3483, 0.2251, 0.3633]}, {"w": "in", "b": [0.2313, 0.3483, 0.2467, 0.3633]}, {"w": "practice", "b": [0.2528, 0.3483, 0.3164, 0.3633]}, {"w": "to", "b": [0.3226, 0.3483, 0.339, 0.3633]}, {"w": "produce", "b": [0.3452, 0.3483, 0.4093, 0.3633]}, {"w": "an", "b": [0.4155, 0.3483, 0.4349, 0.3633]}, {"w": "optimal", "b": [0.4411, 0.3483, 0.5026, 0.3633]}, {"w": "model.", "b": [0.5087, 0.3483, 0.5626, 0.3633]}]}, {"id": "b_14", "type": "equation", "text": "5.8 Bias-Variance Tradeoff", "words": [{"w": "5.8", "b": [0.1312, 0.3972, 0.1631, 0.4151]}, {"w": "Bias-Variance", "b": [0.188, 0.3972, 0.3372, 0.4151]}, {"w": "Tradeoff", "b": [0.3455, 0.3972, 0.4352, 0.4151]}]}, {"id": "b_15", "type": "paragraph", "text": "Developing a model includes both searching for an optimal algorithm, as well as finding the best performing hyperparameters. Tweaking the hyperparameters actually controls two tradeoffs. We already discussed the first one: the precision-recall tradeoff. The second one, equally important, is the bias-variance tradeoff.", "words": [{"w": "Developing", "b": [0.1312, 0.4357, 0.222, 0.4507]}, {"w": "a", "b": [0.2293, 0.4357, 0.2387, 0.4507]}, {"w": "model", "b": [0.2461, 0.4357, 0.2958, 0.4507]}, {"w": "includes", "b": [0.3031, 0.4357, 0.3691, 0.4507]}, {"w": "both", "b": [0.3765, 0.4357, 0.4146, 0.4507]}, {"w": "searching", "b": [0.422, 0.4357, 0.498, 0.4507]}, {"w": "for", "b": [0.5054, 0.4357, 0.5279, 0.4507]}, {"w": "an", "b": [0.5352, 0.4357, 0.5551, 0.4507]}, {"w": "optimal", "b": [0.5625, 0.4357, 0.6252, 0.4507]}, {"w": "algorithm,", "b": [0.6326, 0.4357, 0.7173, 0.4507]}, {"w": "as", "b": [0.7249, 0.4357, 0.7418, 0.4507]}, {"w": "well", "b": [0.7491, 0.4357, 0.781, 0.4507]}, {"w": "as", "b": [0.7884, 0.4357, 0.8052, 0.4507]}, {"w": "finding", "b": [0.8126, 0.4357, 0.8691, 0.4507]}, {"w": "the", "b": [0.1312, 0.4537, 0.1569, 0.4686]}, {"w": "best", "b": [0.163, 0.4537, 0.1964, 0.4686]}, {"w": "performing", "b": [0.2025, 0.4537, 0.2908, 0.4686]}, {"w": "hyperparameters.", "b": [0.2969, 0.4537, 0.4372, 0.4686]}, {"w": "Tweaking", "b": [0.4454, 0.4537, 0.5218, 0.4686]}, {"w": "the", "b": [0.5279, 0.4537, 0.5535, 0.4686]}, {"w": "hyperparameters", "b": [0.5596, 0.4537, 0.6947, 0.4686]}, {"w": "actually", "b": [0.7009, 0.4537, 0.7649, 0.4686]}, {"w": "controls", "b": [0.7711, 0.4537, 0.8343, 0.4686]}, {"w": "two", "b": [0.8404, 0.4537, 0.8691, 0.4686]}, {"w": "tradeoffs.", "b": [0.1312, 0.4716, 0.2064, 0.4866]}, {"w": "We", "b": [0.2146, 0.4716, 0.2405, 0.4866]}, {"w": "already", "b": [0.2466, 0.4716, 0.3062, 0.4866]}, {"w": "discussed", "b": [0.3123, 0.4716, 0.3871, 0.4866]}, {"w": "the", "b": [0.3933, 0.4716, 0.4191, 0.4866]}, {"w": "first", "b": [0.4253, 0.4716, 0.4575, 0.4866]}, {"w": "one:", "b": [0.4636, 0.4716, 0.4967, 0.4866]}, {"w": "the", "b": [0.5049, 0.4716, 0.5308, 0.4866]}, {"w": "precision-recall", "b": [0.5369, 0.4716, 0.6582, 0.4866]}, {"w": "tradeoff.", "b": [0.6644, 0.4716, 0.7322, 0.4866]}, {"w": "The", "b": [0.7404, 0.4716, 0.7724, 0.4866]}, {"w": "second", "b": [0.7786, 0.4716, 0.8325, 0.4866]}, {"w": "one,", "b": [0.8386, 0.4716, 0.8717, 0.4866]}, {"w": "equally", "b": [0.1312, 0.4896, 0.1887, 0.5045]}, {"w": "important,", "b": [0.1948, 0.4896, 0.281, 0.5045]}, {"w": "is", "b": [0.2871, 0.4896, 0.2995, 0.5045]}, {"w": "the", "b": [0.3057, 0.4896, 0.3314, 0.5045]}, {"w": "bias-variance", "b": [0.3374, 0.4899, 0.4571, 0.5048]}, {"w": "tradeoff.", "b": [0.4642, 0.4896, 0.543, 0.5048]}]}, {"id": "b_16", "type": "paragraph", "text": "5.8.1 Underfitting", "words": [{"w": "5.8.1", "b": [0.1312, 0.5377, 0.1749, 0.5527]}, {"w": "Underfitting", "b": [0.1961, 0.5377, 0.311, 0.5527]}]}, {"id": "b_17", "type": "paragraph", "text": "The model is said to have a low bias if it ablely predicts the training data labels. If the model makes too many mistakes on the training data, we say that it has a high bias, or that the model underfits the training data. There could be several reasons for underfitting:", "words": [{"w": "The", "b": [0.1306, 0.574, 0.163, 0.589]}, {"w": "model", "b": [0.1697, 0.574, 0.2194, 0.589]}, {"w": "is", "b": [0.2261, 0.574, 0.2387, 0.589]}, {"w": "said", "b": [0.2454, 0.574, 0.2779, 0.589]}, {"w": "to", "b": [0.2846, 0.574, 0.3014, 0.589]}, {"w": "have", "b": [0.3081, 0.574, 0.3452, 0.589]}, {"w": "a", "b": [0.3519, 0.574, 0.3613, 0.589]}, {"w": "low", "b": [0.3681, 0.5743, 0.3994, 0.5893]}, {"w": "bias", "b": [0.4071, 0.5743, 0.4435, 0.5893]}, {"w": "if", "b": [0.4501, 0.574, 0.4611, 0.589]}, {"w": "it", "b": [0.4678, 0.574, 0.4804, 0.589]}, {"w": "ablely", "b": [0.487, 0.574, 0.5357, 0.589]}, {"w": "predicts", "b": [0.5424, 0.574, 0.6074, 0.589]}, {"w": "the", "b": [0.6141, 0.574, 0.6403, 0.589]}, {"w": "training", "b": [0.647, 0.574, 0.7119, 0.589]}, {"w": "data", "b": [0.7186, 0.574, 0.7552, 0.589]}, {"w": "labels.", "b": [0.7619, 0.574, 0.8138, 0.589]}, {"w": "If", "b": [0.8236, 0.574, 0.8361, 0.589]}, {"w": "the", "b": [0.8428, 0.574, 0.869, 0.589]}, {"w": "model", "b": [0.1312, 0.592, 0.1809, 0.6069]}, {"w": "makes", "b": [0.1875, 0.592, 0.2378, 0.6069]}, {"w": "too", "b": [0.2444, 0.592, 0.2711, 0.6069]}, {"w": "many", "b": [0.2776, 0.592, 0.3226, 0.6069]}, {"w": "mistakes", "b": [0.3292, 0.592, 0.3995, 0.6069]}, {"w": "on", "b": [0.4061, 0.592, 0.426, 0.6069]}, {"w": "the", "b": [0.4326, 0.592, 0.4587, 0.6069]}, {"w": "training", "b": [0.4653, 0.592, 0.5302, 0.6069]}, {"w": "data,", "b": [0.5368, 0.592, 0.5786, 0.6069]}, {"w": "we", "b": [0.5853, 0.592, 0.6068, 0.6069]}, {"w": "say", "b": [0.6134, 0.592, 0.6396, 0.6069]}, {"w": "that", "b": [0.6463, 0.592, 0.6808, 0.6069]}, {"w": "it", "b": [0.6874, 0.592, 0.6999, 0.6069]}, {"w": "has", "b": [0.7065, 0.592, 0.7338, 0.6069]}, {"w": "a", "b": [0.7404, 0.592, 0.7498, 0.6069]}, {"w": "high", "b": [0.7564, 0.5923, 0.7965, 0.6072]}, {"w": "bias,", "b": [0.8041, 0.592, 0.8457, 0.6072]}, {"w": "or", "b": [0.8524, 0.592, 0.8691, 0.6069]}, {"w": "that", "b": [0.1312, 0.6099, 0.1646, 0.6249]}, {"w": "the", "b": [0.1708, 0.6099, 0.1961, 0.6249]}, {"w": "model", "b": [0.2022, 0.6099, 0.2503, 0.6249]}, {"w": "underfits", "b": [0.2565, 0.6102, 0.3388, 0.6252]}, {"w": "the", "b": [0.3449, 0.6099, 0.3702, 0.6249]}, {"w": "training", "b": [0.3764, 0.6099, 0.4391, 0.6249]}, {"w": "data.", "b": [0.4453, 0.6099, 0.4858, 0.6249]}, {"w": "There", "b": [0.494, 0.6099, 0.5406, 0.6249]}, {"w": "could", "b": [0.5467, 0.6099, 0.5893, 0.6249]}, {"w": "be", "b": [0.5954, 0.6099, 0.6142, 0.6249]}, {"w": "several", "b": [0.6203, 0.6099, 0.6741, 0.6249]}, {"w": "reasons", "b": [0.6803, 0.6099, 0.7382, 0.6249]}, {"w": "for", "b": [0.7444, 0.6099, 0.7662, 0.6249]}, {"w": "underfitting:", "b": [0.7723, 0.6099, 0.8716, 0.6249]}]}, {"id": "b_18", "type": "paragraph", "text": "• the model is too simple for the data (for example linear models often underfit); • the features are not informative enough; • you regularize too much (we talk about regularization in the next section).", "words": [{"w": "•", "b": [0.1538, 0.6368, 0.1681, 0.6518]}, {"w": "the", "b": [0.1774, 0.6368, 0.203, 0.6518]}, {"w": "model", "b": [0.2091, 0.6368, 0.2579, 0.6518]}, {"w": "is", "b": [0.264, 0.6368, 0.2764, 0.6518]}, {"w": "too", "b": [0.2826, 0.6368, 0.3087, 0.6518]}, {"w": "simple", "b": [0.3149, 0.6368, 0.3662, 0.6518]}, {"w": "for", "b": [0.3724, 0.6368, 0.3945, 0.6518]}, {"w": "the", "b": [0.4006, 0.6368, 0.4263, 0.6518]}, {"w": "data", "b": [0.4324, 0.6368, 0.4683, 0.6518]}, {"w": "(for", "b": [0.4745, 0.6368, 0.5037, 0.6518]}, {"w": "example", "b": [0.5099, 0.6368, 0.576, 0.6518]}, {"w": "linear", "b": [0.5822, 0.6368, 0.6274, 0.6518]}, {"w": "models", "b": [0.6335, 0.6368, 0.6895, 0.6518]}, {"w": "often", "b": [0.6956, 0.6368, 0.7361, 0.6518]}, {"w": "underfit);", "b": [0.7423, 0.6368, 0.8182, 0.6518]}, {"w": "•", "b": [0.1538, 0.6548, 0.1681, 0.6697]}, {"w": "the", "b": [0.1774, 0.6548, 0.203, 0.6697]}, {"w": "features", "b": [0.2091, 0.6548, 0.2724, 0.6697]}, {"w": "are", "b": [0.2785, 0.6548, 0.3032, 0.6697]}, {"w": "not", "b": [0.3094, 0.6548, 0.336, 0.6697]}, {"w": "informative", "b": [0.3422, 0.6548, 0.434, 0.6697]}, {"w": "enough;", "b": [0.4401, 0.6548, 0.5027, 0.6697]}, {"w": "•", "b": [0.1538, 0.6727, 0.1681, 0.6877]}, {"w": "you", "b": [0.1774, 0.6727, 0.2061, 0.6877]}, {"w": "regularize", "b": [0.2122, 0.6727, 0.2903, 0.6877]}, {"w": "too", "b": [0.2964, 0.6727, 0.3226, 0.6877]}, {"w": "much", "b": [0.3287, 0.6727, 0.3718, 0.6877]}, {"w": "(we", "b": [0.3779, 0.6727, 0.4061, 0.6877]}, {"w": "talk", "b": [0.4123, 0.6727, 0.4435, 0.6877]}, {"w": "about", "b": [0.4497, 0.6727, 0.4963, 0.6877]}, {"w": "regularization", "b": [0.5025, 0.6727, 0.6134, 0.6877]}, {"w": "in", "b": [0.6195, 0.6727, 0.6349, 0.6877]}, {"w": "the", "b": [0.641, 0.6727, 0.6667, 0.6877]}, {"w": "next", "b": [0.6728, 0.6727, 0.7082, 0.6877]}, {"w": "section).", "b": [0.7144, 0.6727, 0.7822, 0.6877]}]}, {"id": "b_19", "type": "paragraph", "text": "An example of underfitting in regression is shown in Figure 9 (left). The regression line doesn’t repeat the bends of the line to which the data seemingly belongs. The model oversimplifies the data. The possible solutions to the problem of underfitting include:", "words": [{"w": "An", "b": [0.1305, 0.6996, 0.1541, 0.7146]}, {"w": "example", "b": [0.159, 0.6996, 0.2238, 0.7146]}, {"w": "of", "b": [0.2286, 0.6996, 0.2431, 0.7146]}, {"w": "underfitting", "b": [0.2479, 0.6996, 0.3415, 0.7146]}, {"w": "in", "b": [0.3463, 0.6996, 0.3614, 0.7146]}, {"w": "regression", "b": [0.3662, 0.6996, 0.4439, 0.7146]}, {"w": "is", "b": [0.4487, 0.6996, 0.4608, 0.7146]}, {"w": "shown", "b": [0.4656, 0.6996, 0.5145, 0.7146]}, {"w": "in", "b": [0.5193, 0.6996, 0.5344, 0.7146]}, {"w": "Figure", "b": [0.5392, 0.6996, 0.5902, 0.7146]}, {"w": "9", "b": [0.595, 0.6996, 0.6041, 0.7146]}, {"w": "(left).", "b": [0.6089, 0.6996, 0.6536, 0.7146]}, {"w": "The", "b": [0.6614, 0.6996, 0.6925, 0.7146]}, {"w": "regression", "b": [0.6973, 0.6996, 0.775, 0.7146]}, {"w": "line", "b": [0.7798, 0.6996, 0.808, 0.7146]}, {"w": "doesn’t", "b": [0.8128, 0.6996, 0.8697, 0.7146]}, {"w": "repeat", "b": [0.1312, 0.7176, 0.1822, 0.7325]}, {"w": "the", "b": [0.1883, 0.7176, 0.214, 0.7325]}, {"w": "bends", "b": [0.2201, 0.7176, 0.267, 0.7325]}, {"w": "of", "b": [0.2731, 0.7176, 0.288, 0.7325]}, {"w": "the", "b": [0.2941, 0.7176, 0.3198, 0.7325]}, {"w": "line", "b": [0.3259, 0.7176, 0.3547, 0.7325]}, {"w": "to", "b": [0.3608, 0.7176, 0.3773, 0.7325]}, {"w": "which", "b": [0.3834, 0.7176, 0.4302, 0.7325]}, {"w": "the", "b": [0.4363, 0.7176, 0.462, 0.7325]}, {"w": "data", "b": [0.4681, 0.7176, 0.5041, 0.7325]}, {"w": "seemingly", "b": [0.5102, 0.7176, 0.5889, 0.7325]}, {"w": "belongs.", "b": [0.595, 0.7176, 0.6604, 0.7325]}, {"w": "The", "b": [0.6686, 0.7176, 0.7004, 0.7325]}, {"w": "model", "b": [0.7066, 0.7176, 0.7554, 0.7325]}, {"w": "oversimplifies", "b": [0.7615, 0.7176, 0.8691, 0.7325]}, {"w": "the", "b": [0.1312, 0.7355, 0.1569, 0.7505]}, {"w": "data.", "b": [0.163, 0.7355, 0.204, 0.7505]}, {"w": "The", "b": [0.2122, 0.7355, 0.244, 0.7505]}, {"w": "possible", "b": [0.2502, 0.7355, 0.3135, 0.7505]}, {"w": "solutions", "b": [0.3196, 0.7355, 0.3906, 0.7505]}, {"w": "to", "b": [0.3967, 0.7355, 0.4131, 0.7505]}, {"w": "the", "b": [0.4193, 0.7355, 0.4449, 0.7505]}, {"w": "problem", "b": [0.4511, 0.7355, 0.5167, 0.7505]}, {"w": "of", "b": [0.5229, 0.7355, 0.5378, 0.7505]}, {"w": "underfitting", "b": [0.5439, 0.7355, 0.6393, 0.7505]}, {"w": "include:", "b": [0.6455, 0.7355, 0.7081, 0.7505]}]}, {"id": "b_20", "type": "paragraph", "text": "• trying a more complex model, • engineering features with higher predictive power, • adding more training data, when possible, and • reducing regularization.", "words": [{"w": "•", "b": [0.1538, 0.7625, 0.1681, 0.7774]}, {"w": "trying", "b": [0.1774, 0.7625, 0.2261, 0.7774]}, {"w": "a", "b": [0.2323, 0.7625, 0.2415, 0.7774]}, {"w": "more", "b": [0.2476, 0.7625, 0.2877, 0.7774]}, {"w": "complex", "b": [0.2938, 0.7625, 0.36, 0.7774]}, {"w": "model,", "b": [0.3661, 0.7625, 0.4199, 0.7774]}, {"w": "•", "b": [0.1538, 0.7804, 0.1681, 0.7954]}, {"w": "engineering", "b": [0.1774, 0.7804, 0.2687, 0.7954]}, {"w": "features", "b": [0.2748, 0.7804, 0.3381, 0.7954]}, {"w": "with", "b": [0.3442, 0.7804, 0.3801, 0.7954]}, {"w": "higher", "b": [0.3863, 0.7804, 0.4366, 0.7954]}, {"w": "predictive", "b": [0.4426, 0.7807, 0.5344, 0.7957]}, {"w": "power,", "b": [0.5415, 0.7804, 0.6022, 0.7957]}, {"w": "•", "b": [0.1538, 0.7983, 0.1681, 0.8133]}, {"w": "adding", "b": [0.1774, 0.7983, 0.2317, 0.8133]}, {"w": "more", "b": [0.2379, 0.7983, 0.2779, 0.8133]}, {"w": "training", "b": [0.284, 0.7983, 0.3477, 0.8133]}, {"w": "data,", "b": [0.3538, 0.7983, 0.3948, 0.8133]}, {"w": "when", "b": [0.401, 0.7983, 0.443, 0.8133]}, {"w": "possible,", "b": [0.4492, 0.7983, 0.5176, 0.8133]}, {"w": "and", "b": [0.5237, 0.7983, 0.5535, 0.8133]}, {"w": "•", "b": [0.1538, 0.8163, 0.1681, 0.8313]}, {"w": "reducing", "b": [0.1774, 0.8163, 0.2461, 0.8313]}, {"w": "regularization.", "b": [0.2523, 0.8163, 0.3683, 0.8313]}]}, {"id": "b_21", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 31", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "31", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 170, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "4 2 0 2 10", "words": [{"w": "4", "b": [0.1419, 0.2355, 0.1494, 0.2532]}, {"w": "2", "b": [0.2126, 0.2355, 0.22, 0.2532]}, {"w": "0", "b": [0.2781, 0.2355, 0.2855, 0.2532]}, {"w": "2", "b": [0.3487, 0.2355, 0.3562, 0.2532]}, {"w": "10", "b": [0.0861, 0.228, 0.101, 0.2457]}]}, {"id": "b_4", "type": "paragraph", "text": "30 degree 1 (underfit) training examples", "words": [{"w": "30", "b": [0.0861, 0.081, 0.101, 0.0987]}, {"w": "degree", "b": [0.2273, 0.0962, 0.267, 0.1139]}, {"w": "1", "b": [0.2708, 0.0962, 0.2782, 0.1139]}, {"w": "(underfit)", "b": [0.2819, 0.0962, 0.3391, 0.1139]}, {"w": "training", "b": [0.2273, 0.1133, 0.2737, 0.1311]}, {"w": "examples", "b": [0.2774, 0.1133, 0.3337, 0.1311]}]}, {"id": "b_5", "type": "paragraph", "text": "Underfitting", "words": [{"w": "Underfitting", "b": [0.1666, 0.2565, 0.2656, 0.2714]}]}, {"id": "b_6", "type": "paragraph", "text": "4 2 0 2 10", "words": [{"w": "4", "b": [0.4259, 0.2355, 0.4333, 0.2532]}, {"w": "2", "b": [0.4965, 0.2355, 0.504, 0.2532]}, {"w": "0", "b": [0.562, 0.2355, 0.5695, 0.2532]}, {"w": "2", "b": [0.6327, 0.2355, 0.6401, 0.2532]}, {"w": "10", "b": [0.3701, 0.228, 0.385, 0.2457]}]}, {"id": "b_10", "type": "paragraph", "text": "30 degree 2 (fit) training examples", "words": [{"w": "30", "b": [0.3701, 0.081, 0.385, 0.0987]}, {"w": "degree", "b": [0.5166, 0.0962, 0.5563, 0.1139]}, {"w": "2", "b": [0.5601, 0.0962, 0.5675, 0.1139]}, {"w": "(fit)", "b": [0.5712, 0.0962, 0.5944, 0.1139]}, {"w": "training", "b": [0.5166, 0.1133, 0.563, 0.1311]}, {"w": "examples", "b": [0.5667, 0.1133, 0.623, 0.1311]}]}, {"id": "b_11", "type": "paragraph", "text": "Good fit", "words": [{"w": "Good", "b": [0.4664, 0.2565, 0.5106, 0.2714]}, {"w": "fit", "b": [0.5167, 0.2565, 0.5342, 0.2714]}]}, {"id": "b_12", "type": "paragraph", "text": "4 2 0 2 10", "words": [{"w": "4", "b": [0.7098, 0.2355, 0.7173, 0.2532]}, {"w": "2", "b": [0.7804, 0.2355, 0.7879, 0.2532]}, {"w": "0", "b": [0.846, 0.2355, 0.8534, 0.2532]}, {"w": "2", "b": [0.9166, 0.2355, 0.9241, 0.2532]}, {"w": "10", "b": [0.654, 0.228, 0.6689, 0.2457]}]}, {"id": "b_16", "type": "paragraph", "text": "30 degree 15 (overfit) training examples", "words": [{"w": "30", "b": [0.654, 0.081, 0.6689, 0.0987]}, {"w": "degree", "b": [0.7952, 0.0962, 0.8349, 0.1139]}, {"w": "15", "b": [0.8387, 0.0962, 0.8536, 0.1139]}, {"w": "(overfit)", "b": [0.8573, 0.0962, 0.9069, 0.1139]}, {"w": "training", "b": [0.7952, 0.1133, 0.8416, 0.1311]}, {"w": "examples", "b": [0.8453, 0.1133, 0.9016, 0.1311]}]}, {"id": "b_17", "type": "paragraph", "text": "Overfitting", "words": [{"w": "Overfitting", "b": [0.7398, 0.2565, 0.8281, 0.2714]}]}, {"id": "b_18", "type": "paragraph", "text": "Figure 9: Examples of underfitting (linear model), good fit (quadratic model), and overfitting (polynomial of degree 15).", "words": [{"w": "Figure", "b": [0.1312, 0.2869, 0.1823, 0.3018]}, {"w": "9:", "b": [0.1879, 0.2869, 0.202, 0.3018]}, {"w": "Examples", "b": [0.2099, 0.2869, 0.2862, 0.3018]}, {"w": "of", "b": [0.2918, 0.2869, 0.3064, 0.3018]}, {"w": "underfitting", "b": [0.312, 0.2869, 0.4055, 0.3018]}, {"w": "(linear", "b": [0.4112, 0.2869, 0.4625, 0.3018]}, {"w": "model),", "b": [0.4681, 0.2869, 0.5279, 0.3018]}, {"w": "good", "b": [0.5337, 0.2869, 0.5719, 0.3018]}, {"w": "fit", "b": [0.5775, 0.2869, 0.5946, 0.3018]}, {"w": "(quadratic", "b": [0.6002, 0.2869, 0.6822, 0.3018]}, {"w": "model),", "b": [0.6878, 0.2869, 0.7476, 0.3018]}, {"w": "and", "b": [0.7534, 0.2869, 0.7825, 0.3018]}, {"w": "overfitting", "b": [0.7881, 0.2869, 0.8691, 0.3018]}, {"w": "(polynomial", "b": [0.1291, 0.3048, 0.2255, 0.3198]}, {"w": "of", "b": [0.2316, 0.3048, 0.2465, 0.3198]}, {"w": "degree", "b": [0.2526, 0.3048, 0.304, 0.3198]}, {"w": "15).", "b": [0.3101, 0.3048, 0.3409, 0.3198]}]}, {"id": "b_19", "type": "paragraph", "text": "5.8.2 Overfitting", "words": [{"w": "5.8.2", "b": [0.1312, 0.3554, 0.1749, 0.3703]}, {"w": "Overfitting", "b": [0.1961, 0.3554, 0.2977, 0.3703]}]}, {"id": "b_20", "type": "paragraph", "text": "Overfitting is another problem a model can exhibit. The model that overfits usually predicts the training data labels very well, but works poorly on the holdout data.", "words": [{"w": "Overfitting", "b": [0.1312, 0.392, 0.2328, 0.4069]}, {"w": "is", "b": [0.238, 0.3917, 0.2502, 0.4066]}, {"w": "another", "b": [0.2552, 0.3917, 0.3156, 0.4066]}, {"w": "problem", "b": [0.3206, 0.3917, 0.385, 0.4066]}, {"w": "a", "b": [0.39, 0.3917, 0.399, 0.4066]}, {"w": "model", "b": [0.4041, 0.3917, 0.4518, 0.4066]}, {"w": "can", "b": [0.4568, 0.3917, 0.484, 0.4066]}, {"w": "exhibit.", "b": [0.489, 0.3917, 0.5488, 0.4066]}, {"w": "The", "b": [0.5566, 0.3917, 0.5878, 0.4066]}, {"w": "model", "b": [0.5928, 0.3917, 0.6405, 0.4066]}, {"w": "that", "b": [0.6456, 0.3917, 0.6787, 0.4066]}, {"w": "overfits", "b": [0.6837, 0.3917, 0.7407, 0.4066]}, {"w": "usually", "b": [0.7457, 0.3917, 0.8016, 0.4066]}, {"w": "predicts", "b": [0.8066, 0.3917, 0.8691, 0.4066]}, {"w": "the", "b": [0.1312, 0.4096, 0.1569, 0.4246]}, {"w": "training", "b": [0.163, 0.4096, 0.2267, 0.4246]}, {"w": "data", "b": [0.2328, 0.4096, 0.2687, 0.4246]}, {"w": "labels", "b": [0.2748, 0.4096, 0.3206, 0.4246]}, {"w": "very", "b": [0.3267, 0.4096, 0.3611, 0.4246]}, {"w": "well,", "b": [0.3673, 0.4096, 0.4037, 0.4246]}, {"w": "but", "b": [0.4099, 0.4096, 0.4375, 0.4246]}, {"w": "works", "b": [0.4437, 0.4096, 0.49, 0.4246]}, {"w": "poorly", "b": [0.4961, 0.4096, 0.548, 0.4246]}, {"w": "on", "b": [0.5541, 0.4096, 0.5736, 0.4246]}, {"w": "the", "b": [0.5797, 0.4096, 0.6054, 0.4246]}, {"w": "holdout", "b": [0.6115, 0.4096, 0.6731, 0.4246]}, {"w": "data.", "b": [0.6792, 0.4096, 0.7202, 0.4246]}]}, {"id": "b_21", "type": "paragraph", "text": "An example of overfitting in regression is shown in Figure 9 (right). The regression line predicts almost perfectly the targets for almost all training examples, but will likely make significant errors on new data if you decide to use it for predictions.", "words": [{"w": "An", "b": [0.1305, 0.4365, 0.1551, 0.4515]}, {"w": "example", "b": [0.1624, 0.4365, 0.2299, 0.4515]}, {"w": "of", "b": [0.2372, 0.4365, 0.2524, 0.4515]}, {"w": "overfitting", "b": [0.2597, 0.4365, 0.344, 0.4515]}, {"w": "in", "b": [0.3513, 0.4365, 0.367, 0.4515]}, {"w": "regression", "b": [0.3744, 0.4365, 0.4552, 0.4515]}, {"w": "is", "b": [0.4626, 0.4365, 0.4752, 0.4515]}, {"w": "shown", "b": [0.4826, 0.4365, 0.5334, 0.4515]}, {"w": "in", "b": [0.5407, 0.4365, 0.5564, 0.4515]}, {"w": "Figure", "b": [0.5637, 0.4365, 0.6169, 0.4515]}, {"w": "9", "b": [0.6242, 0.4365, 0.6336, 0.4515]}, {"w": "(right).", "b": [0.641, 0.4365, 0.7001, 0.4515]}, {"w": "The", "b": [0.7119, 0.4365, 0.7443, 0.4515]}, {"w": "regression", "b": [0.7516, 0.4365, 0.8325, 0.4515]}, {"w": "line", "b": [0.8398, 0.4365, 0.8691, 0.4515]}, {"w": "predicts", "b": [0.1312, 0.4545, 0.1961, 0.4694]}, {"w": "almost", "b": [0.2022, 0.4545, 0.2566, 0.4694]}, {"w": "perfectly", "b": [0.2627, 0.4545, 0.3342, 0.4694]}, {"w": "the", "b": [0.3404, 0.4545, 0.3664, 0.4694]}, {"w": "targets", "b": [0.3726, 0.4545, 0.4291, 0.4694]}, {"w": "for", "b": [0.4352, 0.4545, 0.4577, 0.4694]}, {"w": "almost", "b": [0.4639, 0.4545, 0.5182, 0.4694]}, {"w": "all", "b": [0.5243, 0.4545, 0.5441, 0.4694]}, {"w": "training", "b": [0.5503, 0.4545, 0.615, 0.4694]}, {"w": "examples,", "b": [0.6212, 0.4545, 0.7011, 0.4694]}, {"w": "but", "b": [0.7072, 0.4545, 0.7354, 0.4694]}, {"w": "will", "b": [0.7415, 0.4545, 0.7707, 0.4694]}, {"w": "likely", "b": [0.7769, 0.4545, 0.8202, 0.4694]}, {"w": "make", "b": [0.8263, 0.4545, 0.8691, 0.4694]}, {"w": "significant", "b": [0.1312, 0.4724, 0.2129, 0.4874]}, {"w": "errors", "b": [0.219, 0.4724, 0.2654, 0.4874]}, {"w": "on", "b": [0.2716, 0.4724, 0.2911, 0.4874]}, {"w": "new", "b": [0.2972, 0.4724, 0.329, 0.4874]}, {"w": "data", "b": [0.3352, 0.4724, 0.371, 0.4874]}, {"w": "if", "b": [0.3772, 0.4724, 0.388, 0.4874]}, {"w": "you", "b": [0.3941, 0.4724, 0.4228, 0.4874]}, {"w": "decide", "b": [0.429, 0.4724, 0.4792, 0.4874]}, {"w": "to", "b": [0.4854, 0.4724, 0.5018, 0.4874]}, {"w": "use", "b": [0.5079, 0.4724, 0.5337, 0.4874]}, {"w": "it", "b": [0.5398, 0.4724, 0.5522, 0.4874]}, {"w": "for", "b": [0.5583, 0.4724, 0.5804, 0.4874]}, {"w": "predictions.", "b": [0.5865, 0.4724, 0.68, 0.4874]}]}, {"id": "b_22", "type": "paragraph", "text": "You will find another name for overfitting in the literature: high variance. The model is unduly sensitive to small fluctuations in the training set. If you sampled the training data differently, the result would be a significantly different model. These overfitting models perform poorly on the holdout data, since holdout and training data are sampled from the dataset independently of one another. So, the small fluctuations in the training and holdout data are likely to be different.", "words": [{"w": "You", "b": [0.1305, 0.4993, 0.163, 0.5143]}, {"w": "will", "b": [0.1704, 0.4993, 0.1996, 0.5143]}, {"w": "find", "b": [0.207, 0.4993, 0.2384, 0.5143]}, {"w": "another", "b": [0.2458, 0.4993, 0.3086, 0.5143]}, {"w": "name", "b": [0.3159, 0.4993, 0.3599, 0.5143]}, {"w": "for", "b": [0.3672, 0.4993, 0.3898, 0.5143]}, {"w": "overfitting", "b": [0.3971, 0.4993, 0.4814, 0.5143]}, {"w": "in", "b": [0.4888, 0.4993, 0.5045, 0.5143]}, {"w": "the", "b": [0.5118, 0.4993, 0.538, 0.5143]}, {"w": "literature:", "b": [0.5454, 0.4993, 0.6271, 0.5143]}, {"w": "high", "b": [0.6375, 0.4996, 0.6776, 0.5146]}, {"w": "variance.", "b": [0.686, 0.4993, 0.7675, 0.5146]}, {"w": "The", "b": [0.7793, 0.4993, 0.8118, 0.5143]}, {"w": "model", "b": [0.8191, 0.4993, 0.8688, 0.5143]}, {"w": "is", "b": [0.1312, 0.5173, 0.1439, 0.5322]}, {"w": "unduly", "b": [0.1513, 0.5173, 0.2083, 0.5322]}, {"w": "sensitive", "b": [0.2157, 0.5173, 0.285, 0.5322]}, {"w": "to", "b": [0.2923, 0.5173, 0.3091, 0.5322]}, {"w": "small", "b": [0.3164, 0.5173, 0.3594, 0.5322]}, {"w": "fluctuations", "b": [0.3668, 0.5173, 0.4631, 0.5322]}, {"w": "in", "b": [0.4705, 0.5173, 0.4862, 0.5322]}, {"w": "the", "b": [0.4936, 0.5173, 0.5198, 0.5322]}, {"w": "training", "b": [0.5271, 0.5173, 0.592, 0.5322]}, {"w": "set.", "b": [0.5994, 0.5173, 0.6278, 0.5322]}, {"w": "If", "b": [0.6397, 0.5173, 0.6522, 0.5322]}, {"w": "you", "b": [0.6596, 0.5173, 0.6889, 0.5322]}, {"w": "sampled", "b": [0.6963, 0.5173, 0.7633, 0.5322]}, {"w": "the", "b": [0.7707, 0.5173, 0.7969, 0.5322]}, {"w": "training", "b": [0.8042, 0.5173, 0.8691, 0.5322]}, {"w": "data", "b": [0.1312, 0.5352, 0.1667, 0.5502]}, {"w": "differently,", "b": [0.1728, 0.5352, 0.2568, 0.5502]}, {"w": "the", "b": [0.263, 0.5352, 0.2883, 0.5502]}, {"w": "result", "b": [0.2944, 0.5352, 0.3391, 0.5502]}, {"w": "would", "b": [0.3453, 0.5352, 0.3924, 0.5502]}, {"w": "be", "b": [0.3985, 0.5352, 0.4172, 0.5502]}, {"w": "a", "b": [0.4234, 0.5352, 0.4325, 0.5502]}, {"w": "significantly", "b": [0.4386, 0.5352, 0.5339, 0.5502]}, {"w": "different", "b": [0.54, 0.5352, 0.6059, 0.5502]}, {"w": "model.", "b": [0.612, 0.5352, 0.6652, 0.5502]}, {"w": "These", "b": [0.6734, 0.5352, 0.72, 0.5502]}, {"w": "overfitting", "b": [0.7262, 0.5352, 0.8077, 0.5502]}, {"w": "models", "b": [0.8138, 0.5352, 0.8691, 0.5502]}, {"w": "perform", "b": [0.1312, 0.5532, 0.1954, 0.5681]}, {"w": "poorly", "b": [0.2016, 0.5532, 0.2538, 0.5681]}, {"w": "on", "b": [0.26, 0.5532, 0.2796, 0.5681]}, {"w": "the", "b": [0.2858, 0.5532, 0.3116, 0.5681]}, {"w": "holdout", "b": [0.3178, 0.5532, 0.3798, 0.5681]}, {"w": "data,", "b": [0.3859, 0.5532, 0.4273, 0.5681]}, {"w": "since", "b": [0.4334, 0.5532, 0.4728, 0.5681]}, {"w": "holdout", "b": [0.479, 0.5532, 0.541, 0.5681]}, {"w": "and", "b": [0.5471, 0.5532, 0.5771, 0.5681]}, {"w": "training", "b": [0.5833, 0.5532, 0.6474, 0.5681]}, {"w": "data", "b": [0.6536, 0.5532, 0.6897, 0.5681]}, {"w": "are", "b": [0.6959, 0.5532, 0.7208, 0.5681]}, {"w": "sampled", "b": [0.7269, 0.5532, 0.7932, 0.5681]}, {"w": "from", "b": [0.7993, 0.5532, 0.8371, 0.5681]}, {"w": "the", "b": [0.8432, 0.5532, 0.8691, 0.5681]}, {"w": "dataset", "b": [0.1312, 0.5711, 0.1891, 0.5861]}, {"w": "independently", "b": [0.1953, 0.5711, 0.3074, 0.5861]}, {"w": "of", "b": [0.3135, 0.5711, 0.3282, 0.5861]}, {"w": "one", "b": [0.3343, 0.5711, 0.3617, 0.5861]}, {"w": "another.", "b": [0.3679, 0.5711, 0.4338, 0.5861]}, {"w": "So,", "b": [0.442, 0.5711, 0.4664, 0.5861]}, {"w": "the", "b": [0.4725, 0.5711, 0.4979, 0.5861]}, {"w": "small", "b": [0.504, 0.5711, 0.5457, 0.5861]}, {"w": "fluctuations", "b": [0.5518, 0.5711, 0.6452, 0.5861]}, {"w": "in", "b": [0.6513, 0.5711, 0.6666, 0.5861]}, {"w": "the", "b": [0.6727, 0.5711, 0.6981, 0.5861]}, {"w": "training", "b": [0.7042, 0.5711, 0.7671, 0.5861]}, {"w": "and", "b": [0.7732, 0.5711, 0.8026, 0.5861]}, {"w": "holdout", "b": [0.8088, 0.5711, 0.8696, 0.5861]}, {"w": "data", "b": [0.1312, 0.5891, 0.1671, 0.604]}, {"w": "are", "b": [0.1733, 0.5891, 0.1979, 0.604]}, {"w": "likely", "b": [0.2041, 0.5891, 0.2467, 0.604]}, {"w": "to", "b": [0.2528, 0.5891, 0.2692, 0.604]}, {"w": "be", "b": [0.2753, 0.5891, 0.2943, 0.604]}, {"w": "different.", "b": [0.3005, 0.5891, 0.3723, 0.604]}]}, {"id": "b_23", "type": "paragraph", "text": "Several reasons can lead to overfitting:", "words": [{"w": "Several", "b": [0.1312, 0.616, 0.1887, 0.631]}, {"w": "reasons", "b": [0.1949, 0.616, 0.2536, 0.631]}, {"w": "can", "b": [0.2597, 0.616, 0.2874, 0.631]}, {"w": "lead", "b": [0.2936, 0.616, 0.3264, 0.631]}, {"w": "to", "b": [0.3326, 0.616, 0.349, 0.631]}, {"w": "overfitting:", "b": [0.3551, 0.616, 0.4428, 0.631]}]}, {"id": "b_24", "type": "paragraph", "text": "• the model is too complex for the data. Very tall decision trees or a very deep neural network often overfit; • there are too many features and few training examples; and • you don’t regularize enough.", "words": [{"w": "•", "b": [0.1538, 0.6429, 0.1681, 0.6579]}, {"w": "the", "b": [0.1774, 0.6429, 0.2035, 0.6579]}, {"w": "model", "b": [0.2096, 0.6429, 0.2592, 0.6579]}, {"w": "is", "b": [0.2653, 0.6429, 0.2779, 0.6579]}, {"w": "too", "b": [0.2841, 0.6429, 0.3107, 0.6579]}, {"w": "complex", "b": [0.3168, 0.6429, 0.3841, 0.6579]}, {"w": "for", "b": [0.3903, 0.6429, 0.4128, 0.6579]}, {"w": "the", "b": [0.4189, 0.6429, 0.445, 0.6579]}, {"w": "data.", "b": [0.4511, 0.6429, 0.4929, 0.6579]}, {"w": "Very", "b": [0.5011, 0.6429, 0.5393, 0.6579]}, {"w": "tall", "b": [0.5454, 0.6429, 0.5725, 0.6579]}, {"w": "decision", "b": [0.5787, 0.6429, 0.6435, 0.6579]}, {"w": "trees", "b": [0.6496, 0.6429, 0.6884, 0.6579]}, {"w": "or", "b": [0.6946, 0.6429, 0.7113, 0.6579]}, {"w": "a", "b": [0.7175, 0.6429, 0.7268, 0.6579]}, {"w": "very", "b": [0.733, 0.6429, 0.768, 0.6579]}, {"w": "deep", "b": [0.7742, 0.6429, 0.8118, 0.6579]}, {"w": "neural", "b": [0.8179, 0.6429, 0.8691, 0.6579]}, {"w": "network", "b": [0.1774, 0.6609, 0.2415, 0.6758]}, {"w": "often", "b": [0.2476, 0.6609, 0.2882, 0.6758]}, {"w": "overfit;", "b": [0.2943, 0.6609, 0.3502, 0.6758]}, {"w": "•", "b": [0.1538, 0.6788, 0.1681, 0.6938]}, {"w": "there", "b": [0.1774, 0.6788, 0.2184, 0.6938]}, {"w": "are", "b": [0.2246, 0.6788, 0.2493, 0.6938]}, {"w": "too", "b": [0.2554, 0.6788, 0.2815, 0.6938]}, {"w": "many", "b": [0.2877, 0.6788, 0.3318, 0.6938]}, {"w": "features", "b": [0.3379, 0.6788, 0.4012, 0.6938]}, {"w": "and", "b": [0.4073, 0.6788, 0.437, 0.6938]}, {"w": "few", "b": [0.4432, 0.6788, 0.4704, 0.6938]}, {"w": "training", "b": [0.4765, 0.6788, 0.5401, 0.6938]}, {"w": "examples;", "b": [0.5463, 0.6788, 0.6249, 0.6938]}, {"w": "and", "b": [0.631, 0.6788, 0.6607, 0.6938]}, {"w": "•", "b": [0.1538, 0.6968, 0.1681, 0.7117]}, {"w": "you", "b": [0.1774, 0.6968, 0.2061, 0.7117]}, {"w": "don’t", "b": [0.2122, 0.6968, 0.2543, 0.7117]}, {"w": "regularize", "b": [0.2604, 0.6968, 0.3385, 0.7117]}, {"w": "enough.", "b": [0.3446, 0.6968, 0.4072, 0.7117]}]}, {"id": "b_25", "type": "paragraph", "text": "Several solutions to overfitting are possible:", "words": [{"w": "Several", "b": [0.1312, 0.7237, 0.1887, 0.7386]}, {"w": "solutions", "b": [0.1949, 0.7237, 0.2658, 0.7386]}, {"w": "to", "b": [0.272, 0.7237, 0.2884, 0.7386]}, {"w": "overfitting", "b": [0.2945, 0.7237, 0.3771, 0.7386]}, {"w": "are", "b": [0.3833, 0.7237, 0.408, 0.7386]}, {"w": "possible:", "b": [0.4141, 0.7237, 0.4825, 0.7386]}]}, {"id": "b_26", "type": "paragraph", "text": "• use a simpler model. Try linear instead of polynomial regression, or SVM with a linear kernel instead of radial basis function (RBF), or a neural network with fewer layers/units;5", "words": [{"w": "•", "b": [0.1538, 0.7506, 0.1681, 0.7656]}, {"w": "use", "b": [0.1774, 0.7506, 0.2036, 0.7656]}, {"w": "a", "b": [0.2116, 0.7506, 0.221, 0.7656]}, {"w": "simpler", "b": [0.2291, 0.7506, 0.2888, 0.7656]}, {"w": "model.", "b": [0.2968, 0.7506, 0.3517, 0.7656]}, {"w": "Try", "b": [0.3655, 0.7506, 0.3949, 0.7656]}, {"w": "linear", "b": [0.4029, 0.7506, 0.449, 0.7656]}, {"w": "instead", "b": [0.457, 0.7506, 0.5157, 0.7656]}, {"w": "of", "b": [0.5237, 0.7506, 0.5388, 0.7656]}, {"w": "polynomial", "b": [0.5468, 0.7506, 0.6378, 0.7656]}, {"w": "regression,", "b": [0.6458, 0.7506, 0.7319, 0.7656]}, {"w": "or", "b": [0.7404, 0.7506, 0.7572, 0.7656]}, {"w": "SVM", "b": [0.7652, 0.7506, 0.807, 0.7656]}, {"w": "with", "b": [0.815, 0.7506, 0.8516, 0.7656]}, {"w": "a", "b": [0.8596, 0.7506, 0.869, 0.7656]}, {"w": "linear", "b": [0.1774, 0.7685, 0.2218, 0.7835]}, {"w": "kernel", "b": [0.228, 0.7685, 0.2754, 0.7835]}, {"w": "instead", "b": [0.2816, 0.7685, 0.3382, 0.7835]}, {"w": "of", "b": [0.3444, 0.7685, 0.359, 0.7835]}, {"w": "radial", "b": [0.3665, 0.7689, 0.4194, 0.7838]}, {"w": "basis", "b": [0.4265, 0.7689, 0.4713, 0.7838]}, {"w": "function", "b": [0.4783, 0.7689, 0.5544, 0.7838]}, {"w": "(RBF),", "b": [0.5605, 0.7685, 0.6178, 0.7835]}, {"w": "or", "b": [0.6239, 0.7685, 0.6401, 0.7835]}, {"w": "a", "b": [0.6463, 0.7685, 0.6553, 0.7835]}, {"w": "neural", "b": [0.6615, 0.7685, 0.711, 0.7835]}, {"w": "network", "b": [0.7171, 0.7685, 0.7802, 0.7835]}, {"w": "with", "b": [0.7864, 0.7685, 0.8217, 0.7835]}, {"w": "fewer", "b": [0.8278, 0.7685, 0.8692, 0.7835]}, {"w": "layers/units;5", "b": [0.1774, 0.7849, 0.2849, 0.8014]}]}, {"id": "b_27", "type": "paragraph", "text": "5While reducing the number of model parameters is generally recommended to reduce overfitting and improve the generalization of the model, the phenomenon of deep double descent sometimes proves otherwise. The phenomenon was observed in various architectures, including CNN and transformers: validation performance first improves, then gets worse, and then improves again with increasing model size.", "words": [{"w": "5While", "b": [0.1518, 0.8144, 0.2008, 0.8283]}, {"w": "reducing", "b": [0.2065, 0.8162, 0.266, 0.8283]}, {"w": "the", "b": [0.2718, 0.8162, 0.294, 0.8283]}, {"w": "number", "b": [0.2997, 0.8162, 0.3526, 0.8283]}, {"w": "of", "b": [0.3583, 0.8162, 0.3712, 0.8283]}, {"w": "model", "b": [0.3769, 0.8162, 0.4191, 0.8283]}, {"w": "parameters", "b": [0.4248, 0.8162, 0.5022, 0.8283]}, {"w": "is", "b": [0.5079, 0.8162, 0.5187, 0.8283]}, {"w": "generally", "b": [0.5244, 0.8162, 0.5871, 0.8283]}, {"w": "recommended", "b": [0.5928, 0.8162, 0.6888, 0.8283]}, {"w": "to", "b": [0.6945, 0.8162, 0.7087, 0.8283]}, {"w": "reduce", "b": [0.7144, 0.8162, 0.7597, 0.8283]}, {"w": "overfitting", "b": [0.7655, 0.8162, 0.837, 0.8283]}, {"w": "and", "b": [0.8427, 0.8162, 0.8685, 0.8283]}, {"w": "improve", "b": [0.1312, 0.8304, 0.1868, 0.8425]}, {"w": "the", "b": [0.1938, 0.8304, 0.216, 0.8425]}, {"w": "generalization", "b": [0.2229, 0.8304, 0.3198, 0.8425]}, {"w": "of", "b": [0.3267, 0.8304, 0.3396, 0.8425]}, {"w": "the", "b": [0.3466, 0.8304, 0.3688, 0.8425]}, {"w": "model,", "b": [0.3757, 0.8304, 0.4224, 0.8425]}, {"w": "the", "b": [0.4298, 0.8304, 0.452, 0.8425]}, {"w": "phenomenon", "b": [0.4589, 0.8304, 0.5469, 0.8425]}, {"w": "of", "b": [0.5538, 0.8304, 0.5667, 0.8425]}, {"w": "deep", "b": [0.575, 0.8304, 0.6117, 0.8424]}, {"w": "double", "b": [0.6197, 0.8304, 0.6722, 0.8424]}, {"w": "descent", "b": [0.6802, 0.8304, 0.7386, 0.8424]}, {"w": "sometimes", "b": [0.7455, 0.8304, 0.8177, 0.8425]}, {"w": "proves", "b": [0.8246, 0.8304, 0.8687, 0.8425]}, {"w": "otherwise.", "b": [0.1312, 0.8446, 0.2015, 0.8567]}, {"w": "The", "b": [0.2121, 0.8446, 0.2396, 0.8567]}, {"w": "phenomenon", "b": [0.2461, 0.8446, 0.334, 0.8567]}, {"w": "was", "b": [0.3404, 0.8446, 0.3658, 0.8567]}, {"w": "observed", "b": [0.3723, 0.8446, 0.4328, 0.8567]}, {"w": "in", "b": [0.4392, 0.8446, 0.4525, 0.8567]}, {"w": "various", "b": [0.459, 0.8446, 0.5084, 0.8567]}, {"w": "architectures,", "b": [0.5148, 0.8446, 0.6087, 0.8567]}, {"w": "including", "b": [0.6154, 0.8446, 0.6794, 0.8567]}, {"w": "CNN", "b": [0.6862, 0.8446, 0.7274, 0.8566]}, {"w": "and", "b": [0.7338, 0.8446, 0.7596, 0.8567]}, {"w": "transformers:", "b": [0.766, 0.8446, 0.8709, 0.8567]}, {"w": "validation", "b": [0.1308, 0.8589, 0.1985, 0.8709]}, {"w": "performance", "b": [0.2037, 0.8589, 0.2885, 0.8709]}, {"w": "first", "b": [0.2937, 0.8589, 0.3209, 0.8709]}, {"w": "improves,", "b": [0.3261, 0.8589, 0.3913, 0.8709]}, {"w": "then", "b": [0.3965, 0.8589, 0.4271, 0.8709]}, {"w": "gets", "b": [0.4323, 0.8589, 0.4595, 0.8709]}, {"w": "worse,", "b": [0.4647, 0.8589, 0.5072, 0.8709]}, {"w": "and", "b": [0.5124, 0.8589, 0.5377, 0.8709]}, {"w": "then", "b": [0.5429, 0.8589, 0.5735, 0.8709]}, {"w": "improves", "b": [0.5787, 0.8589, 0.6396, 0.8709]}, {"w": "again", "b": [0.6448, 0.8589, 0.6815, 0.8709]}, {"w": "with", "b": [0.6867, 0.8589, 0.7172, 0.8709]}, {"w": "increasing", "b": [0.7225, 0.8589, 0.7907, 0.8709]}, {"w": "model", "b": [0.7959, 0.8589, 0.8374, 0.8709]}, {"w": "size.", "b": [0.8426, 0.8589, 0.8715, 0.8709]}]}, {"id": "b_28", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 32", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "32", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 171, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• reduce the dimensionality of examples in the dataset; • add more training data, if possible; and, • regularize the model.", "words": [{"w": "•", "b": [0.1538, 0.0881, 0.1681, 0.1031]}, {"w": "reduce", "b": [0.1774, 0.0881, 0.2297, 0.1031]}, {"w": "the", "b": [0.2359, 0.0881, 0.2615, 0.1031]}, {"w": "dimensionality", "b": [0.2677, 0.0881, 0.3847, 0.1031]}, {"w": "of", "b": [0.3908, 0.0881, 0.4057, 0.1031]}, {"w": "examples", "b": [0.4118, 0.0881, 0.4853, 0.1031]}, {"w": "in", "b": [0.4914, 0.0881, 0.5068, 0.1031]}, {"w": "the", "b": [0.5129, 0.0881, 0.5386, 0.1031]}, {"w": "dataset;", "b": [0.5447, 0.0881, 0.6084, 0.1031]}, {"w": "•", "b": [0.1538, 0.106, 0.1681, 0.121]}, {"w": "add", "b": [0.1774, 0.106, 0.2071, 0.121]}, {"w": "more", "b": [0.2132, 0.106, 0.2533, 0.121]}, {"w": "training", "b": [0.2594, 0.106, 0.3231, 0.121]}, {"w": "data,", "b": [0.3292, 0.106, 0.3702, 0.121]}, {"w": "if", "b": [0.3764, 0.106, 0.3871, 0.121]}, {"w": "possible;", "b": [0.3933, 0.106, 0.4617, 0.121]}, {"w": "and,", "b": [0.4679, 0.106, 0.5027, 0.121]}, {"w": "•", "b": [0.1538, 0.124, 0.1681, 0.1389]}, {"w": "regularize", "b": [0.1774, 0.124, 0.2554, 0.1389]}, {"w": "the", "b": [0.2616, 0.124, 0.2872, 0.1389]}, {"w": "model.", "b": [0.2933, 0.124, 0.3472, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "5.8.3 The Tradeoff", "words": [{"w": "5.8.3", "b": [0.1312, 0.1721, 0.1749, 0.1871]}, {"w": "The", "b": [0.1961, 0.1721, 0.2324, 0.1871]}, {"w": "Tradeoff", "b": [0.2394, 0.1721, 0.316, 0.1871]}]}, {"id": "b_2", "type": "paragraph", "text": "In practice, by trying to reduce variance, you increase bias, and vice versa. In other words, reducing overfitting leads to underfitting, and the other way around. This is called the bias-variance tradeoff: by trying too hard to build a model that performs perfectly on the training data, you end up with a model that performs poorly on the holdout data.", "words": [{"w": "In", "b": [0.1312, 0.2084, 0.1483, 0.2234]}, {"w": "practice,", "b": [0.1544, 0.2084, 0.2237, 0.2234]}, {"w": "by", "b": [0.2298, 0.2084, 0.2494, 0.2234]}, {"w": "trying", "b": [0.2556, 0.2084, 0.3047, 0.2234]}, {"w": "to", "b": [0.3108, 0.2084, 0.3273, 0.2234]}, {"w": "reduce", "b": [0.3335, 0.2084, 0.3862, 0.2234]}, {"w": "variance,", "b": [0.3924, 0.2084, 0.4642, 0.2234]}, {"w": "you", "b": [0.4703, 0.2084, 0.4992, 0.2234]}, {"w": "increase", "b": [0.5054, 0.2084, 0.5696, 0.2234]}, {"w": "bias,", "b": [0.5757, 0.2084, 0.613, 0.2234]}, {"w": "and", "b": [0.6191, 0.2084, 0.6491, 0.2234]}, {"w": "vice", "b": [0.6552, 0.2084, 0.6867, 0.2234]}, {"w": "versa.", "b": [0.6929, 0.2084, 0.7395, 0.2234]}, {"w": "In", "b": [0.7477, 0.2084, 0.7648, 0.2234]}, {"w": "other", "b": [0.7709, 0.2084, 0.8133, 0.2234]}, {"w": "words,", "b": [0.8194, 0.2084, 0.8717, 0.2234]}, {"w": "reducing", "b": [0.1312, 0.2264, 0.2014, 0.2413]}, {"w": "overfitting", "b": [0.2091, 0.2264, 0.2934, 0.2413]}, {"w": "leads", "b": [0.3012, 0.2264, 0.3421, 0.2413]}, {"w": "to", "b": [0.3498, 0.2264, 0.3666, 0.2413]}, {"w": "underfitting,", "b": [0.3743, 0.2264, 0.4769, 0.2413]}, {"w": "and", "b": [0.4851, 0.2264, 0.5154, 0.2413]}, {"w": "the", "b": [0.5231, 0.2264, 0.5493, 0.2413]}, {"w": "other", "b": [0.5571, 0.2264, 0.6, 0.2413]}, {"w": "way", "b": [0.6077, 0.2264, 0.6397, 0.2413]}, {"w": "around.", "b": [0.6474, 0.2264, 0.7102, 0.2413]}, {"w": "This", "b": [0.7233, 0.2264, 0.76, 0.2413]}, {"w": "is", "b": [0.7677, 0.2264, 0.7804, 0.2413]}, {"w": "called", "b": [0.7881, 0.2264, 0.8352, 0.2413]}, {"w": "the", "b": [0.843, 0.2264, 0.8691, 0.2413]}, {"w": "bias-variance", "b": [0.1312, 0.2446, 0.2509, 0.2596]}, {"w": "tradeoff:", "b": [0.2585, 0.2443, 0.3374, 0.2596]}, {"w": "by", "b": [0.3465, 0.2443, 0.3663, 0.2593]}, {"w": "trying", "b": [0.3729, 0.2443, 0.4227, 0.2593]}, {"w": "too", "b": [0.4292, 0.2443, 0.4559, 0.2593]}, {"w": "hard", "b": [0.4625, 0.2443, 0.5002, 0.2593]}, {"w": "to", "b": [0.5068, 0.2443, 0.5235, 0.2593]}, {"w": "build", "b": [0.5301, 0.2443, 0.5719, 0.2593]}, {"w": "a", "b": [0.5785, 0.2443, 0.5879, 0.2593]}, {"w": "model", "b": [0.5945, 0.2443, 0.6442, 0.2593]}, {"w": "that", "b": [0.6508, 0.2443, 0.6853, 0.2593]}, {"w": "performs", "b": [0.6919, 0.2443, 0.7642, 0.2593]}, {"w": "perfectly", "b": [0.7708, 0.2443, 0.8425, 0.2593]}, {"w": "on", "b": [0.8491, 0.2443, 0.869, 0.2593]}, {"w": "the", "b": [0.1312, 0.2623, 0.1569, 0.2772]}, {"w": "training", "b": [0.163, 0.2623, 0.2267, 0.2772]}, {"w": "data,", "b": [0.2328, 0.2623, 0.2738, 0.2772]}, {"w": "you", "b": [0.28, 0.2623, 0.3087, 0.2772]}, {"w": "end", "b": [0.3148, 0.2623, 0.3435, 0.2772]}, {"w": "up", "b": [0.3497, 0.2623, 0.3702, 0.2772]}, {"w": "with", "b": [0.3764, 0.2623, 0.4123, 0.2772]}, {"w": "a", "b": [0.4184, 0.2623, 0.4276, 0.2772]}, {"w": "model", "b": [0.4338, 0.2623, 0.4825, 0.2772]}, {"w": "that", "b": [0.4886, 0.2623, 0.5224, 0.2772]}, {"w": "performs", "b": [0.5286, 0.2623, 0.5996, 0.2772]}, {"w": "poorly", "b": [0.6057, 0.2623, 0.6576, 0.2772]}, {"w": "on", "b": [0.6637, 0.2623, 0.6832, 0.2772]}, {"w": "the", "b": [0.6893, 0.2623, 0.715, 0.2772]}, {"w": "holdout", "b": [0.7211, 0.2623, 0.7827, 0.2772]}, {"w": "data.", "b": [0.7888, 0.2623, 0.8298, 0.2772]}]}, {"id": "b_3", "type": "paragraph", "text": "While many factors determine whether the model performs well on the training data, the", "words": [{"w": "While", "b": [0.1303, 0.2892, 0.1789, 0.3041]}, {"w": "many", "b": [0.1854, 0.2892, 0.2303, 0.3041]}, {"w": "factors", "b": [0.2367, 0.2892, 0.2918, 0.3041]}, {"w": "determine", "b": [0.2982, 0.2892, 0.3799, 0.3041]}, {"w": "whether", "b": [0.3863, 0.2892, 0.4523, 0.3041]}, {"w": "the", "b": [0.4587, 0.2892, 0.4848, 0.3041]}, {"w": "model", "b": [0.4912, 0.2892, 0.5409, 0.3041]}, {"w": "performs", "b": [0.5473, 0.2892, 0.6197, 0.3041]}, {"w": "well", "b": [0.6261, 0.2892, 0.658, 0.3041]}, {"w": "on", "b": [0.6644, 0.2892, 0.6843, 0.3041]}, {"w": "the", "b": [0.6907, 0.2892, 0.7169, 0.3041]}, {"w": "training", "b": [0.7233, 0.2892, 0.7882, 0.3041]}, {"w": "data,", "b": [0.7946, 0.2892, 0.8364, 0.3041]}, {"w": "the", "b": [0.8429, 0.2892, 0.8691, 0.3041]}]}, {"id": "b_4", "type": "paragraph", "text": "most important factor is the complexity of the model. A sufficiently complex model will learn to memorize all training examples and their labels and, thus, will not make prediction errors when applied to the training data. It will have low bias. However, a model relying on memorization will not be able to correctly predict labels of previously unseen data. It will have high variance.", "words": [{"w": "most", "b": [0.1312, 0.3071, 0.1711, 0.3221]}, {"w": "important", "b": [0.1781, 0.3071, 0.2607, 0.3221]}, {"w": "factor", "b": [0.2677, 0.3071, 0.3154, 0.3221]}, {"w": "is", "b": [0.3224, 0.3071, 0.335, 0.3221]}, {"w": "the", "b": [0.342, 0.3071, 0.3682, 0.3221]}, {"w": "complexity", "b": [0.3752, 0.3071, 0.4646, 0.3221]}, {"w": "of", "b": [0.4716, 0.3071, 0.4868, 0.3221]}, {"w": "the", "b": [0.4938, 0.3071, 0.5199, 0.3221]}, {"w": "model.", "b": [0.5269, 0.3071, 0.5818, 0.3221]}, {"w": "A", "b": [0.5925, 0.3071, 0.6067, 0.3221]}, {"w": "sufficiently", "b": [0.6137, 0.3071, 0.7017, 0.3221]}, {"w": "complex", "b": [0.7086, 0.3071, 0.7761, 0.3221]}, {"w": "model", "b": [0.7831, 0.3071, 0.8328, 0.3221]}, {"w": "will", "b": [0.8398, 0.3071, 0.869, 0.3221]}, {"w": "learn", "b": [0.1312, 0.3251, 0.171, 0.34]}, {"w": "to", "b": [0.1772, 0.3251, 0.1934, 0.34]}, {"w": "memorize", "b": [0.1996, 0.3251, 0.276, 0.34]}, {"w": "all", "b": [0.2822, 0.3251, 0.3015, 0.34]}, {"w": "training", "b": [0.3076, 0.3251, 0.3708, 0.34]}, {"w": "examples", "b": [0.377, 0.3251, 0.4499, 0.34]}, {"w": "and", "b": [0.456, 0.3251, 0.4856, 0.34]}, {"w": "their", "b": [0.4917, 0.3251, 0.5295, 0.34]}, {"w": "labels", "b": [0.5356, 0.3251, 0.581, 0.34]}, {"w": "and,", "b": [0.5872, 0.3251, 0.6218, 0.34]}, {"w": "thus,", "b": [0.628, 0.3251, 0.6673, 0.34]}, {"w": "will", "b": [0.6734, 0.3251, 0.7019, 0.34]}, {"w": "not", "b": [0.7081, 0.3251, 0.7346, 0.34]}, {"w": "make", "b": [0.7407, 0.3251, 0.7824, 0.34]}, {"w": "prediction", "b": [0.7886, 0.3251, 0.8691, 0.34]}, {"w": "errors", "b": [0.1312, 0.343, 0.1771, 0.358]}, {"w": "when", "b": [0.1833, 0.343, 0.2249, 0.358]}, {"w": "applied", "b": [0.231, 0.343, 0.2888, 0.358]}, {"w": "to", "b": [0.295, 0.343, 0.3112, 0.358]}, {"w": "the", "b": [0.3173, 0.343, 0.3427, 0.358]}, {"w": "training", "b": [0.3489, 0.343, 0.4118, 0.358]}, {"w": "data.", "b": [0.4179, 0.343, 0.4585, 0.358]}, {"w": "It", "b": [0.4667, 0.343, 0.4804, 0.358]}, {"w": "will", "b": [0.4865, 0.343, 0.5149, 0.358]}, {"w": "have", "b": [0.5211, 0.343, 0.5571, 0.358]}, {"w": "low", "b": [0.5632, 0.343, 0.5901, 0.358]}, {"w": "bias.", "b": [0.5962, 0.343, 0.6328, 0.358]}, {"w": "However,", "b": [0.641, 0.343, 0.7136, 0.358]}, {"w": "a", "b": [0.7197, 0.343, 0.7289, 0.358]}, {"w": "model", "b": [0.735, 0.343, 0.7832, 0.358]}, {"w": "relying", "b": [0.7893, 0.343, 0.8436, 0.358]}, {"w": "on", "b": [0.8498, 0.343, 0.8691, 0.358]}, {"w": "memorization", "b": [0.1312, 0.361, 0.2425, 0.3759]}, {"w": "will", "b": [0.2487, 0.361, 0.2778, 0.3759]}, {"w": "not", "b": [0.2839, 0.361, 0.3109, 0.3759]}, {"w": "be", "b": [0.3171, 0.361, 0.3363, 0.3759]}, {"w": "able", "b": [0.3424, 0.361, 0.3757, 0.3759]}, {"w": "to", "b": [0.3818, 0.361, 0.3985, 0.3759]}, {"w": "correctly", "b": [0.4046, 0.361, 0.476, 0.3759]}, {"w": "predict", "b": [0.4821, 0.361, 0.5393, 0.3759]}, {"w": "labels", "b": [0.5455, 0.361, 0.5919, 0.3759]}, {"w": "of", "b": [0.598, 0.361, 0.6131, 0.3759]}, {"w": "previously", "b": [0.6192, 0.361, 0.7026, 0.3759]}, {"w": "unseen", "b": [0.7087, 0.361, 0.7639, 0.3759]}, {"w": "data.", "b": [0.7701, 0.361, 0.8116, 0.3759]}, {"w": "It", "b": [0.8198, 0.361, 0.8339, 0.3759]}, {"w": "will", "b": [0.84, 0.361, 0.8691, 0.3759]}, {"w": "have", "b": [0.1312, 0.3789, 0.1676, 0.3939]}, {"w": "high", "b": [0.1738, 0.3789, 0.2087, 0.3939]}, {"w": "variance.", "b": [0.2148, 0.3789, 0.2861, 0.3939]}]}, {"id": "b_5", "type": "paragraph", "text": "As the model complexity grows, the typical evolution of the average prediction error of a model when applied to the training and holdout data is shown in Figure 10.", "words": [{"w": "As", "b": [0.1305, 0.4058, 0.1521, 0.4208]}, {"w": "the", "b": [0.1587, 0.4058, 0.1849, 0.4208]}, {"w": "model", "b": [0.1915, 0.4058, 0.2412, 0.4208]}, {"w": "complexity", "b": [0.2478, 0.4058, 0.3373, 0.4208]}, {"w": "grows,", "b": [0.3439, 0.4058, 0.3958, 0.4208]}, {"w": "the", "b": [0.4026, 0.4058, 0.4288, 0.4208]}, {"w": "typical", "b": [0.4354, 0.4058, 0.4908, 0.4208]}, {"w": "evolution", "b": [0.4975, 0.4058, 0.5728, 0.4208]}, {"w": "of", "b": [0.5795, 0.4058, 0.5946, 0.4208]}, {"w": "the", "b": [0.6013, 0.4058, 0.6274, 0.4208]}, {"w": "average", "b": [0.6341, 0.4058, 0.6953, 0.4208]}, {"w": "prediction", "b": [0.702, 0.4058, 0.7847, 0.4208]}, {"w": "error", "b": [0.7913, 0.4058, 0.8312, 0.4208]}, {"w": "of", "b": [0.8379, 0.4058, 0.853, 0.4208]}, {"w": "a", "b": [0.8597, 0.4058, 0.8691, 0.4208]}, {"w": "model", "b": [0.1312, 0.4238, 0.1799, 0.4387]}, {"w": "when", "b": [0.1861, 0.4238, 0.2281, 0.4387]}, {"w": "applied", "b": [0.2343, 0.4238, 0.2927, 0.4387]}, {"w": "to", "b": [0.2989, 0.4238, 0.3153, 0.4387]}, {"w": "the", "b": [0.3214, 0.4238, 0.3471, 0.4387]}, {"w": "training", "b": [0.3532, 0.4238, 0.4169, 0.4387]}, {"w": "and", "b": [0.423, 0.4238, 0.4527, 0.4387]}, {"w": "holdout", "b": [0.4589, 0.4238, 0.5204, 0.4387]}, {"w": "data", "b": [0.5266, 0.4238, 0.5624, 0.4387]}, {"w": "is", "b": [0.5686, 0.4238, 0.581, 0.4387]}, {"w": "shown", "b": [0.5872, 0.4238, 0.637, 0.4387]}, {"w": "in", "b": [0.6431, 0.4238, 0.6585, 0.4387]}, {"w": "Figure", "b": [0.6647, 0.4238, 0.7168, 0.4387]}, {"w": "10.", "b": [0.7229, 0.4238, 0.7465, 0.4387]}]}, {"id": "b_6", "type": "paragraph", "text": "The zone you would like to be in is the “zone of solutions,” the light-blue rectangle where both bias and variance are low. Once in this zone, you can fine-tune the hyperparameters to reach the needed precision-recall ratio, or optimize another model performance metric appropriate for your problem.", "words": [{"w": "The", "b": [0.1306, 0.4507, 0.163, 0.4657]}, {"w": "zone", "b": [0.1692, 0.4507, 0.2058, 0.4657]}, {"w": "you", "b": [0.212, 0.4507, 0.2413, 0.4657]}, {"w": "would", "b": [0.2475, 0.4507, 0.2961, 0.4657]}, {"w": "like", "b": [0.3023, 0.4507, 0.3306, 0.4657]}, {"w": "to", "b": [0.3367, 0.4507, 0.3535, 0.4657]}, {"w": "be", "b": [0.3596, 0.4507, 0.379, 0.4657]}, {"w": "in", "b": [0.3852, 0.4507, 0.4009, 0.4657]}, {"w": "is", "b": [0.4071, 0.4507, 0.4197, 0.4657]}, {"w": "the", "b": [0.4259, 0.4507, 0.4521, 0.4657]}, {"w": "“zone", "b": [0.4583, 0.4507, 0.5038, 0.4657]}, {"w": "of", "b": [0.5099, 0.4507, 0.5251, 0.4657]}, {"w": "solutions,”", "b": [0.5313, 0.4507, 0.6178, 0.4657]}, {"w": "the", "b": [0.624, 0.4507, 0.6501, 0.4657]}, {"w": "light-blue", "b": [0.6563, 0.4507, 0.7343, 0.4657]}, {"w": "rectangle", "b": [0.7404, 0.4507, 0.8148, 0.4657]}, {"w": "where", "b": [0.821, 0.4507, 0.8691, 0.4657]}, {"w": "both", "b": [0.1312, 0.4686, 0.1694, 0.4836]}, {"w": "bias", "b": [0.1755, 0.4686, 0.208, 0.4836]}, {"w": "and", "b": [0.2142, 0.4686, 0.2445, 0.4836]}, {"w": "variance", "b": [0.2506, 0.4686, 0.3181, 0.4836]}, {"w": "are", "b": [0.3243, 0.4686, 0.3494, 0.4836]}, {"w": "low.", "b": [0.3556, 0.4686, 0.3885, 0.4836]}, {"w": "Once", "b": [0.3967, 0.4686, 0.4385, 0.4836]}, {"w": "in", "b": [0.4447, 0.4686, 0.4604, 0.4836]}, {"w": "this", "b": [0.4665, 0.4686, 0.497, 0.4836]}, {"w": "zone,", "b": [0.5031, 0.4686, 0.5449, 0.4836]}, {"w": "you", "b": [0.5511, 0.4686, 0.5804, 0.4836]}, {"w": "can", "b": [0.5865, 0.4686, 0.6147, 0.4836]}, {"w": "fine-tune", "b": [0.6209, 0.4686, 0.693, 0.4836]}, {"w": "the", "b": [0.6992, 0.4686, 0.7253, 0.4836]}, {"w": "hyperparameters", "b": [0.7315, 0.4686, 0.8691, 0.4836]}, {"w": "to", "b": [0.1312, 0.4866, 0.148, 0.5016]}, {"w": "reach", "b": [0.1548, 0.4866, 0.1983, 0.5016]}, {"w": "the", "b": [0.2051, 0.4866, 0.2312, 0.5016]}, {"w": "needed", "b": [0.2381, 0.4866, 0.2946, 0.5016]}, {"w": "precision-recall", "b": [0.3014, 0.4866, 0.424, 0.5016]}, {"w": "ratio,", "b": [0.4308, 0.4866, 0.4748, 0.5016]}, {"w": "or", "b": [0.4818, 0.4866, 0.4986, 0.5016]}, {"w": "optimize", "b": [0.5054, 0.4866, 0.5755, 0.5016]}, {"w": "another", "b": [0.5823, 0.4866, 0.6451, 0.5016]}, {"w": "model", "b": [0.6519, 0.4866, 0.7016, 0.5016]}, {"w": "performance", "b": [0.7084, 0.4866, 0.81, 0.5016]}, {"w": "metric", "b": [0.8168, 0.4866, 0.8691, 0.5016]}, {"w": "appropriate", "b": [0.1312, 0.5045, 0.2247, 0.5195]}, {"w": "for", "b": [0.2308, 0.5045, 0.2529, 0.5195]}, {"w": "your", "b": [0.259, 0.5045, 0.295, 0.5195]}, {"w": "problem.", "b": [0.3012, 0.5045, 0.372, 0.5195]}]}, {"id": "b_7", "type": "paragraph", "text": "To reach the zone of solutions, you can either,", "words": [{"w": "To", "b": [0.1306, 0.5315, 0.1516, 0.5464]}, {"w": "reach", "b": [0.1577, 0.5315, 0.2003, 0.5464]}, {"w": "the", "b": [0.2065, 0.5315, 0.2321, 0.5464]}, {"w": "zone", "b": [0.2383, 0.5315, 0.2742, 0.5464]}, {"w": "of", "b": [0.2803, 0.5315, 0.2952, 0.5464]}, {"w": "solutions,", "b": [0.3014, 0.5315, 0.3775, 0.5464]}, {"w": "you", "b": [0.3836, 0.5315, 0.4123, 0.5464]}, {"w": "can", "b": [0.4185, 0.5315, 0.4462, 0.5464]}, {"w": "either,", "b": [0.4523, 0.5315, 0.5036, 0.5464]}]}, {"id": "b_8", "type": "paragraph", "text": "• move to the right by increasing the complexity of the model, and, by so doing, reducing its bias, or • move to the left by regularizing the model to reduce variance by making the model simpler (we talk about regularization in the next section).", "words": [{"w": "•", "b": [0.1538, 0.5584, 0.1681, 0.5733]}, {"w": "move", "b": [0.1774, 0.5584, 0.218, 0.5733]}, {"w": "to", "b": [0.2237, 0.5584, 0.2398, 0.5733]}, {"w": "the", "b": [0.2455, 0.5584, 0.2707, 0.5733]}, {"w": "right", "b": [0.2764, 0.5584, 0.3141, 0.5733]}, {"w": "by", "b": [0.3198, 0.5584, 0.3389, 0.5733]}, {"w": "increasing", "b": [0.3446, 0.5584, 0.4231, 0.5733]}, {"w": "the", "b": [0.4289, 0.5584, 0.454, 0.5733]}, {"w": "complexity", "b": [0.4597, 0.5584, 0.5456, 0.5733]}, {"w": "of", "b": [0.5513, 0.5584, 0.5659, 0.5733]}, {"w": "the", "b": [0.5716, 0.5584, 0.5967, 0.5733]}, {"w": "model,", "b": [0.6024, 0.5584, 0.6552, 0.5733]}, {"w": "and,", "b": [0.661, 0.5584, 0.6952, 0.5733]}, {"w": "by", "b": [0.701, 0.5584, 0.7201, 0.5733]}, {"w": "so", "b": [0.7258, 0.5584, 0.7419, 0.5733]}, {"w": "doing,", "b": [0.7476, 0.5584, 0.7959, 0.5733]}, {"w": "reducing", "b": [0.8017, 0.5584, 0.8691, 0.5733]}, {"w": "its", "b": [0.1774, 0.5763, 0.197, 0.5913]}, {"w": "bias,", "b": [0.2031, 0.5763, 0.2401, 0.5913]}, {"w": "or", "b": [0.2463, 0.5763, 0.2627, 0.5913]}, {"w": "•", "b": [0.1538, 0.5943, 0.1681, 0.6092]}, {"w": "move", "b": [0.1774, 0.5943, 0.2197, 0.6092]}, {"w": "to", "b": [0.2265, 0.5943, 0.2432, 0.6092]}, {"w": "the", "b": [0.2499, 0.5943, 0.2761, 0.6092]}, {"w": "left", "b": [0.2828, 0.5943, 0.3095, 0.6092]}, {"w": "by", "b": [0.3162, 0.5943, 0.3361, 0.6092]}, {"w": "regularizing", "b": [0.3428, 0.5943, 0.4392, 0.6092]}, {"w": "the", "b": [0.4459, 0.5943, 0.4721, 0.6092]}, {"w": "model", "b": [0.4788, 0.5943, 0.5284, 0.6092]}, {"w": "to", "b": [0.5352, 0.5943, 0.5519, 0.6092]}, {"w": "reduce", "b": [0.5586, 0.5943, 0.612, 0.6092]}, {"w": "variance", "b": [0.6188, 0.5943, 0.6863, 0.6092]}, {"w": "by", "b": [0.6931, 0.5943, 0.7129, 0.6092]}, {"w": "making", "b": [0.7197, 0.5943, 0.7798, 0.6092]}, {"w": "the", "b": [0.7865, 0.5943, 0.8127, 0.6092]}, {"w": "model", "b": [0.8194, 0.5943, 0.8691, 0.6092]}, {"w": "simpler", "b": [0.1774, 0.6122, 0.236, 0.6272]}, {"w": "(we", "b": [0.2421, 0.6122, 0.2703, 0.6272]}, {"w": "talk", "b": [0.2765, 0.6122, 0.3077, 0.6272]}, {"w": "about", "b": [0.3139, 0.6122, 0.3605, 0.6272]}, {"w": "regularization", "b": [0.3667, 0.6122, 0.4775, 0.6272]}, {"w": "in", "b": [0.4837, 0.6122, 0.4991, 0.6272]}, {"w": "the", "b": [0.5052, 0.6122, 0.5309, 0.6272]}, {"w": "next", "b": [0.537, 0.6122, 0.5724, 0.6272]}, {"w": "section).", "b": [0.5786, 0.6122, 0.6463, 0.6272]}]}, {"id": "b_9", "type": "paragraph", "text": "If you work with shallow models, like linear regression, you can increase the complexity by switching to higher-order polynomial regression. Similarly, you can increase the depth of the decision tree, or use polynomial or RBF kernels, in support vector machine (SVM) instead of the linear kernel. Ensemble learning algorithms, based on the idea of boosting, allow bias reduction by combining several (usually, hundreds of) high-bias “weak” models.", "words": [{"w": "If", "b": [0.1312, 0.6391, 0.1437, 0.6541]}, {"w": "you", "b": [0.1498, 0.6391, 0.1788, 0.6541]}, {"w": "work", "b": [0.1849, 0.6391, 0.2243, 0.6541]}, {"w": "with", "b": [0.2304, 0.6391, 0.2667, 0.6541]}, {"w": "shallow", "b": [0.2728, 0.6391, 0.3325, 0.6541]}, {"w": "models,", "b": [0.3386, 0.6391, 0.4003, 0.6541]}, {"w": "like", "b": [0.4064, 0.6391, 0.4344, 0.6541]}, {"w": "linear", "b": [0.4405, 0.6391, 0.4862, 0.6541]}, {"w": "regression,", "b": [0.4923, 0.6391, 0.5775, 0.6541]}, {"w": "you", "b": [0.5837, 0.6391, 0.6127, 0.6541]}, {"w": "can", "b": [0.6188, 0.6391, 0.6468, 0.6541]}, {"w": "increase", "b": [0.6529, 0.6391, 0.7173, 0.6541]}, {"w": "the", "b": [0.7234, 0.6391, 0.7493, 0.6541]}, {"w": "complexity", "b": [0.7554, 0.6391, 0.844, 0.6541]}, {"w": "by", "b": [0.8501, 0.6391, 0.8698, 0.6541]}, {"w": "switching", "b": [0.1312, 0.6571, 0.2055, 0.672]}, {"w": "to", "b": [0.2117, 0.6571, 0.2278, 0.672]}, {"w": "higher-order", "b": [0.234, 0.6571, 0.331, 0.672]}, {"w": "polynomial", "b": [0.3372, 0.6571, 0.425, 0.672]}, {"w": "regression.", "b": [0.4311, 0.6571, 0.5142, 0.672]}, {"w": "Similarly,", "b": [0.5225, 0.6571, 0.5972, 0.672]}, {"w": "you", "b": [0.6033, 0.6571, 0.6316, 0.672]}, {"w": "can", "b": [0.6378, 0.6571, 0.665, 0.672]}, {"w": "increase", "b": [0.6712, 0.6571, 0.7339, 0.672]}, {"w": "the", "b": [0.7401, 0.6571, 0.7653, 0.672]}, {"w": "depth", "b": [0.7715, 0.6571, 0.8169, 0.672]}, {"w": "of", "b": [0.8231, 0.6571, 0.8377, 0.672]}, {"w": "the", "b": [0.8439, 0.6571, 0.8691, 0.672]}, {"w": "decision", "b": [0.1312, 0.675, 0.1937, 0.69]}, {"w": "tree,", "b": [0.1996, 0.675, 0.2349, 0.69]}, {"w": "or", "b": [0.2409, 0.675, 0.257, 0.69]}, {"w": "use", "b": [0.2629, 0.675, 0.2882, 0.69]}, {"w": "polynomial", "b": [0.2942, 0.675, 0.3816, 0.69]}, {"w": "or", "b": [0.3875, 0.675, 0.4037, 0.69]}, {"w": "RBF", "b": [0.4096, 0.675, 0.4475, 0.69]}, {"w": "kernels,", "b": [0.4535, 0.675, 0.513, 0.69]}, {"w": "in", "b": [0.519, 0.675, 0.534, 0.69]}, {"w": "support", "b": [0.54, 0.675, 0.601, 0.69]}, {"w": "vector", "b": [0.6069, 0.675, 0.6552, 0.69]}, {"w": "machine", "b": [0.6612, 0.675, 0.726, 0.69]}, {"w": "(SVM)", "b": [0.732, 0.675, 0.7862, 0.69]}, {"w": "instead", "b": [0.7922, 0.675, 0.8486, 0.69]}, {"w": "of", "b": [0.8546, 0.675, 0.8691, 0.69]}, {"w": "the", "b": [0.1312, 0.693, 0.1574, 0.7079]}, {"w": "linear", "b": [0.1636, 0.693, 0.2097, 0.7079]}, {"w": "kernel.", "b": [0.216, 0.693, 0.2705, 0.7079]}, {"w": "Ensemble", "b": [0.279, 0.693, 0.3573, 0.7079]}, {"w": "learning", "b": [0.3635, 0.693, 0.4295, 0.7079]}, {"w": "algorithms,", "b": [0.4358, 0.693, 0.5279, 0.7079]}, {"w": "based", "b": [0.5342, 0.693, 0.5803, 0.7079]}, {"w": "on", "b": [0.5866, 0.693, 0.6065, 0.7079]}, {"w": "the", "b": [0.6127, 0.693, 0.6389, 0.7079]}, {"w": "idea", "b": [0.6451, 0.693, 0.6786, 0.7079]}, {"w": "of", "b": [0.6849, 0.693, 0.7001, 0.7079]}, {"w": "boosting,", "b": [0.7063, 0.693, 0.7817, 0.7079]}, {"w": "allow", "b": [0.788, 0.693, 0.8303, 0.7079]}, {"w": "bias", "b": [0.8366, 0.693, 0.8691, 0.7079]}, {"w": "reduction", "b": [0.1312, 0.7109, 0.2072, 0.7259]}, {"w": "by", "b": [0.2133, 0.7109, 0.2328, 0.7259]}, {"w": "combining", "b": [0.239, 0.7109, 0.3215, 0.7259]}, {"w": "several", "b": [0.3277, 0.7109, 0.3822, 0.7259]}, {"w": "(usually,", "b": [0.3883, 0.7109, 0.4561, 0.7259]}, {"w": "hundreds", "b": [0.4623, 0.7109, 0.5358, 0.7259]}, {"w": "of)", "b": [0.5419, 0.7109, 0.5645, 0.7259]}, {"w": "high-bias", "b": [0.5706, 0.7109, 0.6435, 0.7259]}, {"w": "“weak”", "b": [0.6497, 0.7109, 0.7071, 0.7259]}, {"w": "models.", "b": [0.7132, 0.7109, 0.7744, 0.7259]}]}, {"id": "b_10", "type": "paragraph", "text": "As of July 2020, we don’t yet fully understand why it happens.", "words": [{"w": "As", "b": [0.1307, 0.7407, 0.1486, 0.7527]}, {"w": "of", "b": [0.1538, 0.7407, 0.1664, 0.7527]}, {"w": "July", "b": [0.1717, 0.7407, 0.2011, 0.7527]}, {"w": "2020,", "b": [0.2063, 0.7407, 0.242, 0.7527]}, {"w": "we", "b": [0.2472, 0.7407, 0.2651, 0.7527]}, {"w": "don’t", "b": [0.2703, 0.7407, 0.306, 0.7527]}, {"w": "yet", "b": [0.3112, 0.7407, 0.3321, 0.7527]}, {"w": "fully", "b": [0.3374, 0.7407, 0.3679, 0.7527]}, {"w": "understand", "b": [0.3731, 0.7407, 0.4498, 0.7527]}, {"w": "why", "b": [0.4551, 0.7407, 0.4829, 0.7527]}, {"w": "it", "b": [0.4882, 0.7407, 0.4986, 0.7527]}, {"w": "happens.", "b": [0.5038, 0.7407, 0.5644, 0.7527]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 33", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "33", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 172, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "average", "words": [{"w": "average", "b": [0.2295, 0.306, 0.295, 0.3254]}]}, {"id": "b_1", "type": "paragraph", "text": "error", "words": [{"w": "error", "b": [0.2535, 0.3217, 0.2951, 0.3411]}]}, {"id": "b_2", "type": "paragraph", "text": "lower model complexity", "words": [{"w": "lower", "b": [0.2941, 0.4613, 0.3391, 0.4808]}, {"w": "model", "b": [0.2941, 0.477, 0.3444, 0.4965]}, {"w": "complexity", "b": [0.3494, 0.477, 0.4382, 0.4965]}]}, {"id": "b_3", "type": "paragraph", "text": "higher model complexity", "words": [{"w": "higher", "b": [0.6813, 0.4613, 0.7339, 0.4808]}, {"w": "model", "b": [0.5898, 0.477, 0.6401, 0.4965]}, {"w": "complexity", "b": [0.6451, 0.477, 0.7339, 0.4965]}]}, {"id": "b_4", "type": "paragraph", "text": "holdout error", "words": [{"w": "holdout", "b": [0.704, 0.2791, 0.7691, 0.2996]}, {"w": "error", "b": [0.704, 0.2948, 0.7472, 0.3153]}]}, {"id": "b_5", "type": "paragraph", "text": "training error", "words": [{"w": "training", "b": [0.704, 0.3793, 0.7704, 0.3998]}, {"w": "error", "b": [0.704, 0.395, 0.7472, 0.4155]}]}, {"id": "b_6", "type": "paragraph", "text": "high bias (underfitting)", "words": [{"w": "high", "b": [0.3751, 0.1302, 0.4086, 0.1485]}, {"w": "bias", "b": [0.4132, 0.1302, 0.4447, 0.1485]}, {"w": "(underfitting)", "b": [0.3429, 0.1472, 0.4447, 0.1657]}]}, {"id": "b_7", "type": "paragraph", "text": "high variance (overfitting) zone of solutions", "words": [{"w": "high", "b": [0.5822, 0.1302, 0.6157, 0.1485]}, {"w": "variance", "b": [0.6203, 0.1302, 0.6855, 0.1485]}, {"w": "(overfitting)", "b": [0.5822, 0.1472, 0.673, 0.1657]}, {"w": "zone", "b": [0.4836, 0.1283, 0.5235, 0.1488]}, {"w": "of", "b": [0.5279, 0.1283, 0.5444, 0.1488]}, {"w": "solutions", "b": [0.4753, 0.1449, 0.5527, 0.1654]}]}, {"id": "b_8", "type": "equation", "text": "Figure 10: Bias-variance tradeoff.", "words": [{"w": "Figure", "b": [0.3648, 0.5396, 0.4169, 0.5545]}, {"w": "10:", "b": [0.4231, 0.5396, 0.4467, 0.5545]}, {"w": "Bias-variance", "b": [0.4549, 0.5396, 0.5619, 0.5545]}, {"w": "tradeoff.", "b": [0.5681, 0.5396, 0.6353, 0.5545]}]}, {"id": "b_9", "type": "paragraph", "text": "If you work with neural networks, you can increase the model’s complexity by increasing its size: the number of units per layer, and the number of layers. Training a neural network model longer (i.e., for more epochs) also usually results in lower bias. The advantage of using neural networks, with respect to the bias-variance tradeoff, is that you can slightly increase the size of the network and observe a slight decrease in bias. Most popular shallow models and the associated learning algorithms cannot provide you such flexibility.", "words": [{"w": "If", "b": [0.1312, 0.5898, 0.1435, 0.6048]}, {"w": "you", "b": [0.1496, 0.5898, 0.1781, 0.6048]}, {"w": "work", "b": [0.1842, 0.5898, 0.223, 0.6048]}, {"w": "with", "b": [0.2291, 0.5898, 0.2647, 0.6048]}, {"w": "neural", "b": [0.2709, 0.5898, 0.3208, 0.6048]}, {"w": "networks,", "b": [0.3269, 0.5898, 0.403, 0.6048]}, {"w": "you", "b": [0.4091, 0.5898, 0.4376, 0.6048]}, {"w": "can", "b": [0.4437, 0.5898, 0.4712, 0.6048]}, {"w": "increase", "b": [0.4774, 0.5898, 0.5407, 0.6048]}, {"w": "the", "b": [0.5468, 0.5898, 0.5723, 0.6048]}, {"w": "model’s", "b": [0.5784, 0.5898, 0.6391, 0.6048]}, {"w": "complexity", "b": [0.6453, 0.5898, 0.7323, 0.6048]}, {"w": "by", "b": [0.7384, 0.5898, 0.7578, 0.6048]}, {"w": "increasing", "b": [0.7639, 0.5898, 0.8435, 0.6048]}, {"w": "its", "b": [0.8497, 0.5898, 0.8691, 0.6048]}, {"w": "size:", "b": [0.1312, 0.6078, 0.1659, 0.6227]}, {"w": "the", "b": [0.1752, 0.6078, 0.2013, 0.6227]}, {"w": "number", "b": [0.208, 0.6078, 0.2703, 0.6227]}, {"w": "of", "b": [0.277, 0.6078, 0.2922, 0.6227]}, {"w": "units", "b": [0.2988, 0.6078, 0.3398, 0.6227]}, {"w": "per", "b": [0.3465, 0.6078, 0.3732, 0.6227]}, {"w": "layer,", "b": [0.3799, 0.6078, 0.4244, 0.6227]}, {"w": "and", "b": [0.4312, 0.6078, 0.4616, 0.6227]}, {"w": "the", "b": [0.4682, 0.6078, 0.4944, 0.6227]}, {"w": "number", "b": [0.5011, 0.6078, 0.5634, 0.6227]}, {"w": "of", "b": [0.5701, 0.6078, 0.5853, 0.6227]}, {"w": "layers.", "b": [0.592, 0.6078, 0.6439, 0.6227]}, {"w": "Training", "b": [0.6537, 0.6078, 0.7234, 0.6227]}, {"w": "a", "b": [0.7301, 0.6078, 0.7395, 0.6227]}, {"w": "neural", "b": [0.7462, 0.6078, 0.7975, 0.6227]}, {"w": "network", "b": [0.8042, 0.6078, 0.8696, 0.6227]}, {"w": "model", "b": [0.1312, 0.6257, 0.179, 0.6407]}, {"w": "longer", "b": [0.1848, 0.6257, 0.233, 0.6407]}, {"w": "(i.e.,", "b": [0.2388, 0.6257, 0.274, 0.6407]}, {"w": "for", "b": [0.2799, 0.6257, 0.3015, 0.6407]}, {"w": "more", "b": [0.3073, 0.6257, 0.3466, 0.6407]}, {"w": "epochs)", "b": [0.3524, 0.6257, 0.4123, 0.6407]}, {"w": "also", "b": [0.4181, 0.6257, 0.4483, 0.6407]}, {"w": "usually", "b": [0.4541, 0.6257, 0.51, 0.6407]}, {"w": "results", "b": [0.5158, 0.6257, 0.5673, 0.6407]}, {"w": "in", "b": [0.5731, 0.6257, 0.5882, 0.6407]}, {"w": "lower", "b": [0.594, 0.6257, 0.6352, 0.6407]}, {"w": "bias.", "b": [0.641, 0.6257, 0.6773, 0.6407]}, {"w": "The", "b": [0.6854, 0.6257, 0.7165, 0.6407]}, {"w": "advantage", "b": [0.7223, 0.6257, 0.8017, 0.6407]}, {"w": "of", "b": [0.8074, 0.6257, 0.822, 0.6407]}, {"w": "using", "b": [0.8278, 0.6257, 0.8691, 0.6407]}, {"w": "neural", "b": [0.1312, 0.6436, 0.1815, 0.6586]}, {"w": "networks,", "b": [0.1877, 0.6436, 0.2641, 0.6586]}, {"w": "with", "b": [0.2703, 0.6436, 0.3062, 0.6586]}, {"w": "respect", "b": [0.3123, 0.6436, 0.3694, 0.6586]}, {"w": "to", "b": [0.3756, 0.6436, 0.3919, 0.6586]}, {"w": "the", "b": [0.3981, 0.6436, 0.4237, 0.6586]}, {"w": "bias-variance", "b": [0.4299, 0.6436, 0.534, 0.6586]}, {"w": "tradeoff,", "b": [0.5402, 0.6436, 0.6073, 0.6586]}, {"w": "is", "b": [0.6135, 0.6436, 0.6259, 0.6586]}, {"w": "that", "b": [0.6321, 0.6436, 0.6659, 0.6586]}, {"w": "you", "b": [0.6721, 0.6436, 0.7008, 0.6586]}, {"w": "can", "b": [0.7069, 0.6436, 0.7346, 0.6586]}, {"w": "slightly", "b": [0.7408, 0.6436, 0.7993, 0.6586]}, {"w": "increase", "b": [0.8054, 0.6436, 0.8691, 0.6586]}, {"w": "the", "b": [0.1312, 0.6616, 0.1571, 0.6766]}, {"w": "size", "b": [0.1632, 0.6616, 0.1923, 0.6766]}, {"w": "of", "b": [0.1985, 0.6616, 0.2135, 0.6766]}, {"w": "the", "b": [0.2196, 0.6616, 0.2454, 0.6766]}, {"w": "network", "b": [0.2516, 0.6616, 0.3163, 0.6766]}, {"w": "and", "b": [0.3224, 0.6616, 0.3524, 0.6766]}, {"w": "observe", "b": [0.3585, 0.6616, 0.4187, 0.6766]}, {"w": "a", "b": [0.4248, 0.6616, 0.4341, 0.6766]}, {"w": "slight", "b": [0.4403, 0.6616, 0.4843, 0.6766]}, {"w": "decrease", "b": [0.4905, 0.6616, 0.5578, 0.6766]}, {"w": "in", "b": [0.564, 0.6616, 0.5795, 0.6766]}, {"w": "bias.", "b": [0.5857, 0.6616, 0.623, 0.6766]}, {"w": "Most", "b": [0.6312, 0.6616, 0.6721, 0.6766]}, {"w": "popular", "b": [0.6783, 0.6616, 0.7409, 0.6766]}, {"w": "shallow", "b": [0.747, 0.6616, 0.8066, 0.6766]}, {"w": "models", "b": [0.8127, 0.6616, 0.8691, 0.6766]}, {"w": "and", "b": [0.1312, 0.6795, 0.161, 0.6945]}, {"w": "the", "b": [0.1671, 0.6795, 0.1928, 0.6945]}, {"w": "associated", "b": [0.1989, 0.6795, 0.2807, 0.6945]}, {"w": "learning", "b": [0.2868, 0.6795, 0.3515, 0.6945]}, {"w": "algorithms", "b": [0.3576, 0.6795, 0.4429, 0.6945]}, {"w": "cannot", "b": [0.449, 0.6795, 0.5034, 0.6945]}, {"w": "provide", "b": [0.5095, 0.6795, 0.5691, 0.6945]}, {"w": "you", "b": [0.5752, 0.6795, 0.6039, 0.6945]}, {"w": "such", "b": [0.6101, 0.6795, 0.6456, 0.6945]}, {"w": "flexibility.", "b": [0.6517, 0.6795, 0.7307, 0.6945]}]}, {"id": "b_10", "type": "paragraph", "text": "If, by increasing the complexity of your model, you find yourself in the right-hand side of the graph in Figure 10, you have to reduce the variance of the model. The most common way to do that is to apply regularization.", "words": [{"w": "If,", "b": [0.1312, 0.7065, 0.1483, 0.7214]}, {"w": "by", "b": [0.1544, 0.7065, 0.1735, 0.7214]}, {"w": "increasing", "b": [0.1796, 0.7065, 0.2581, 0.7214]}, {"w": "the", "b": [0.2642, 0.7065, 0.2893, 0.7214]}, {"w": "complexity", "b": [0.2954, 0.7065, 0.3813, 0.7214]}, {"w": "of", "b": [0.3874, 0.7065, 0.402, 0.7214]}, {"w": "your", "b": [0.408, 0.7065, 0.4432, 0.7214]}, {"w": "model,", "b": [0.4493, 0.7065, 0.5021, 0.7214]}, {"w": "you", "b": [0.5082, 0.7065, 0.5363, 0.7214]}, {"w": "find", "b": [0.5424, 0.7065, 0.5725, 0.7214]}, {"w": "yourself", "b": [0.5786, 0.7065, 0.6396, 0.7214]}, {"w": "in", "b": [0.6456, 0.7065, 0.6607, 0.7214]}, {"w": "the", "b": [0.6668, 0.7065, 0.6919, 0.7214]}, {"w": "right-hand", "b": [0.698, 0.7065, 0.7809, 0.7214]}, {"w": "side", "b": [0.787, 0.7065, 0.8173, 0.7214]}, {"w": "of", "b": [0.8233, 0.7065, 0.8379, 0.7214]}, {"w": "the", "b": [0.844, 0.7065, 0.8691, 0.7214]}, {"w": "graph", "b": [0.1312, 0.7244, 0.1766, 0.7394]}, {"w": "in", "b": [0.1827, 0.7244, 0.1978, 0.7394]}, {"w": "Figure", "b": [0.2039, 0.7244, 0.255, 0.7394]}, {"w": "10,", "b": [0.2612, 0.7244, 0.2843, 0.7394]}, {"w": "you", "b": [0.2905, 0.7244, 0.3186, 0.7394]}, {"w": "have", "b": [0.3248, 0.7244, 0.3605, 0.7394]}, {"w": "to", "b": [0.3666, 0.7244, 0.3827, 0.7394]}, {"w": "reduce", "b": [0.3889, 0.7244, 0.4403, 0.7394]}, {"w": "the", "b": [0.4464, 0.7244, 0.4716, 0.7394]}, {"w": "variance", "b": [0.4777, 0.7244, 0.5426, 0.7394]}, {"w": "of", "b": [0.5488, 0.7244, 0.5634, 0.7394]}, {"w": "the", "b": [0.5695, 0.7244, 0.5947, 0.7394]}, {"w": "model.", "b": [0.6008, 0.7244, 0.6536, 0.7394]}, {"w": "The", "b": [0.6618, 0.7244, 0.693, 0.7394]}, {"w": "most", "b": [0.6992, 0.7244, 0.7375, 0.7394]}, {"w": "common", "b": [0.7436, 0.7244, 0.81, 0.7394]}, {"w": "way", "b": [0.8161, 0.7244, 0.8468, 0.7394]}, {"w": "to", "b": [0.8529, 0.7244, 0.869, 0.7394]}, {"w": "do", "b": [0.1312, 0.7424, 0.1507, 0.7573]}, {"w": "that", "b": [0.1569, 0.7424, 0.1907, 0.7573]}, {"w": "is", "b": [0.1969, 0.7424, 0.2093, 0.7573]}, {"w": "to", "b": [0.2154, 0.7424, 0.2318, 0.7573]}, {"w": "apply", "b": [0.238, 0.7424, 0.2826, 0.7573]}, {"w": "regularization.", "b": [0.2887, 0.7424, 0.4047, 0.7573]}]}, {"id": "b_11", "type": "paragraph", "text": "5.9 Regularization", "words": [{"w": "5.9", "b": [0.1312, 0.7912, 0.1631, 0.8091]}, {"w": "Regularization", "b": [0.188, 0.7912, 0.3465, 0.8091]}]}, {"id": "b_12", "type": "paragraph", "text": "Regularization is an umbrella term for methods that force a learning algorithm to train a less complex model. In practice, it leads to higher bias, but significantly reduces the variance.", "words": [{"w": "Regularization", "b": [0.1312, 0.8301, 0.2664, 0.845]}, {"w": "is", "b": [0.2726, 0.8298, 0.285, 0.8447]}, {"w": "an", "b": [0.2911, 0.8298, 0.3105, 0.8447]}, {"w": "umbrella", "b": [0.3166, 0.8298, 0.3865, 0.8447]}, {"w": "term", "b": [0.3927, 0.8298, 0.4304, 0.8447]}, {"w": "for", "b": [0.4366, 0.8298, 0.4586, 0.8447]}, {"w": "methods", "b": [0.4647, 0.8298, 0.5326, 0.8447]}, {"w": "that", "b": [0.5387, 0.8298, 0.5724, 0.8447]}, {"w": "force", "b": [0.5785, 0.8298, 0.6168, 0.8447]}, {"w": "a", "b": [0.623, 0.8298, 0.6322, 0.8447]}, {"w": "learning", "b": [0.6383, 0.8298, 0.7026, 0.8447]}, {"w": "algorithm", "b": [0.7087, 0.8298, 0.7862, 0.8447]}, {"w": "to", "b": [0.7924, 0.8298, 0.8087, 0.8447]}, {"w": "train", "b": [0.8149, 0.8298, 0.8537, 0.8447]}, {"w": "a", "b": [0.8598, 0.8298, 0.869, 0.8447]}, {"w": "less", "b": [0.1312, 0.8477, 0.1586, 0.8627]}, {"w": "complex", "b": [0.1644, 0.8477, 0.2293, 0.8627]}, {"w": "model.", "b": [0.2351, 0.8477, 0.2879, 0.8627]}, {"w": "In", "b": [0.296, 0.8477, 0.3126, 0.8627]}, {"w": "practice,", "b": [0.3184, 0.8477, 0.3858, 0.8627]}, {"w": "it", "b": [0.3918, 0.8477, 0.4038, 0.8627]}, {"w": "leads", "b": [0.4097, 0.8477, 0.449, 0.8627]}, {"w": "to", "b": [0.4548, 0.8477, 0.4709, 0.8627]}, {"w": "higher", "b": [0.4768, 0.8477, 0.5261, 0.8627]}, {"w": "bias,", "b": [0.5319, 0.8477, 0.5682, 0.8627]}, {"w": "but", "b": [0.5741, 0.8477, 0.6013, 0.8627]}, {"w": "significantly", "b": [0.6071, 0.8477, 0.7017, 0.8627]}, {"w": "reduces", "b": [0.7076, 0.8477, 0.766, 0.8627]}, {"w": "the", "b": [0.7719, 0.8477, 0.797, 0.8627]}, {"w": "variance.", "b": [0.8029, 0.8477, 0.8728, 0.8627]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 34", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "34", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 173, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "The two most widely used types of regularization are L1 and L2 regularization. The idea is quite simple. To create a regularized model, we modify the objective function. This is the expression optimized by the learning algorithm when training the model. Regularization adds a penalizing term whose value is higher when the model is more complex.", "words": [{"w": "The", "b": [0.1306, 0.0881, 0.162, 0.1031]}, {"w": "two", "b": [0.1682, 0.0881, 0.1965, 0.1031]}, {"w": "most", "b": [0.2027, 0.0881, 0.2413, 0.1031]}, {"w": "widely", "b": [0.2475, 0.0881, 0.2987, 0.1031]}, {"w": "used", "b": [0.3048, 0.0881, 0.3404, 0.1031]}, {"w": "types", "b": [0.3466, 0.0881, 0.3888, 0.1031]}, {"w": "of", "b": [0.3949, 0.0881, 0.4096, 0.1031]}, {"w": "regularization", "b": [0.4158, 0.0881, 0.5254, 0.1031]}, {"w": "are", "b": [0.5316, 0.0881, 0.556, 0.1031]}, {"w": "L1", "b": [0.5619, 0.0884, 0.5853, 0.1034]}, {"w": "and", "b": [0.5914, 0.0881, 0.6209, 0.1031]}, {"w": "L2", "b": [0.627, 0.0884, 0.6504, 0.1034]}, {"w": "regularization.", "b": [0.6574, 0.0881, 0.7906, 0.1034]}, {"w": "The", "b": [0.7988, 0.0881, 0.8302, 0.1031]}, {"w": "idea", "b": [0.8363, 0.0881, 0.8688, 0.1031]}, {"w": "is", "b": [0.1312, 0.106, 0.1439, 0.121]}, {"w": "quite", "b": [0.1507, 0.106, 0.192, 0.121]}, {"w": "simple.", "b": [0.1987, 0.106, 0.2564, 0.121]}, {"w": "To", "b": [0.2664, 0.106, 0.2879, 0.121]}, {"w": "create", "b": [0.2946, 0.106, 0.3438, 0.121]}, {"w": "a", "b": [0.3506, 0.106, 0.36, 0.121]}, {"w": "regularized", "b": [0.3668, 0.106, 0.4568, 0.121]}, {"w": "model,", "b": [0.4636, 0.106, 0.5185, 0.121]}, {"w": "we", "b": [0.5254, 0.106, 0.5469, 0.121]}, {"w": "modify", "b": [0.5536, 0.106, 0.6106, 0.121]}, {"w": "the", "b": [0.6173, 0.106, 0.6435, 0.121]}, {"w": "objective", "b": [0.6503, 0.106, 0.7235, 0.121]}, {"w": "function.", "b": [0.7303, 0.106, 0.803, 0.121]}, {"w": "This", "b": [0.813, 0.106, 0.8497, 0.121]}, {"w": "is", "b": [0.8565, 0.106, 0.8691, 0.121]}, {"w": "the", "b": [0.1312, 0.124, 0.1565, 0.1389]}, {"w": "expression", "b": [0.1627, 0.124, 0.2443, 0.1389]}, {"w": "optimized", "b": [0.2505, 0.124, 0.3284, 0.1389]}, {"w": "by", "b": [0.3345, 0.124, 0.3537, 0.1389]}, {"w": "the", "b": [0.3599, 0.124, 0.3852, 0.1389]}, {"w": "learning", "b": [0.3913, 0.124, 0.4551, 0.1389]}, {"w": "algorithm", "b": [0.4612, 0.124, 0.5381, 0.1389]}, {"w": "when", "b": [0.5443, 0.124, 0.5857, 0.1389]}, {"w": "training", "b": [0.5919, 0.124, 0.6546, 0.1389]}, {"w": "the", "b": [0.6608, 0.124, 0.6861, 0.1389]}, {"w": "model.", "b": [0.6922, 0.124, 0.7453, 0.1389]}, {"w": "Regularization", "b": [0.7535, 0.124, 0.8691, 0.1389]}, {"w": "adds", "b": [0.1312, 0.1419, 0.1683, 0.1569]}, {"w": "a", "b": [0.1744, 0.1419, 0.1836, 0.1569]}, {"w": "penalizing", "b": [0.1898, 0.1419, 0.2713, 0.1569]}, {"w": "term", "b": [0.2775, 0.1419, 0.3154, 0.1569]}, {"w": "whose", "b": [0.3216, 0.1419, 0.3699, 0.1569]}, {"w": "value", "b": [0.3761, 0.1419, 0.4176, 0.1569]}, {"w": "is", "b": [0.4237, 0.1419, 0.4361, 0.1569]}, {"w": "higher", "b": [0.4423, 0.1419, 0.4926, 0.1569]}, {"w": "when", "b": [0.4988, 0.1419, 0.5408, 0.1569]}, {"w": "the", "b": [0.547, 0.1419, 0.5726, 0.1569]}, {"w": "model", "b": [0.5787, 0.1419, 0.6274, 0.1569]}, {"w": "is", "b": [0.6336, 0.1419, 0.646, 0.1569]}, {"w": "more", "b": [0.6522, 0.1419, 0.6922, 0.1569]}, {"w": "complex.", "b": [0.6983, 0.1419, 0.7696, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "For simplicity, we will illustrate regularization using linear regression, but same principle can be applied to a wide variety of models.", "words": [{"w": "For", "b": [0.1312, 0.1689, 0.1576, 0.1838]}, {"w": "simplicity,", "b": [0.1637, 0.1689, 0.2437, 0.1838]}, {"w": "we", "b": [0.2498, 0.1689, 0.2704, 0.1838]}, {"w": "will", "b": [0.2765, 0.1689, 0.3047, 0.1838]}, {"w": "illustrate", "b": [0.3108, 0.1689, 0.3813, 0.1838]}, {"w": "regularization", "b": [0.3874, 0.1689, 0.496, 0.1838]}, {"w": "using", "b": [0.5022, 0.1689, 0.5435, 0.1838]}, {"w": "linear", "b": [0.5496, 0.1689, 0.5939, 0.1838]}, {"w": "regression,", "b": [0.6, 0.1689, 0.6827, 0.1838]}, {"w": "but", "b": [0.6888, 0.1689, 0.716, 0.1838]}, {"w": "same", "b": [0.7221, 0.1689, 0.7614, 0.1838]}, {"w": "principle", "b": [0.7675, 0.1689, 0.8359, 0.1838]}, {"w": "can", "b": [0.842, 0.1689, 0.8691, 0.1838]}, {"w": "be", "b": [0.1312, 0.1868, 0.1502, 0.2018]}, {"w": "applied", "b": [0.1564, 0.1868, 0.2148, 0.2018]}, {"w": "to", "b": [0.221, 0.1868, 0.2374, 0.2018]}, {"w": "a", "b": [0.2435, 0.1868, 0.2527, 0.2018]}, {"w": "wide", "b": [0.2589, 0.1868, 0.2958, 0.2018]}, {"w": "variety", "b": [0.302, 0.1868, 0.3569, 0.2018]}, {"w": "of", "b": [0.363, 0.1868, 0.3779, 0.2018]}, {"w": "models.", "b": [0.384, 0.1868, 0.4452, 0.2018]}]}, {"id": "b_2", "type": "equation", "text": "Let x be a two-dimensional feature vector", "words": [{"w": "Let", "b": [0.1312, 0.2137, 0.1579, 0.2287]}, {"w": "x", "b": [0.164, 0.214, 0.1752, 0.229]}, {"w": "be", "b": [0.1815, 0.2137, 0.2003, 0.2287]}, {"w": "a", "b": [0.2065, 0.2137, 0.2156, 0.2287]}, {"w": "two-dimensional", "b": [0.2218, 0.2137, 0.3509, 0.2287]}, {"w": "feature", "b": [0.357, 0.2137, 0.4125, 0.2287]}, {"w": "vector", "b": [0.4186, 0.2137, 0.4675, 0.2287]}]}, {"id": "b_4", "type": "paragraph", "text": "x(1), x(2)", "words": [{"w": "x(1),", "b": [0.4812, 0.2121, 0.5167, 0.229]}, {"w": "x(2)", "b": [0.5197, 0.2121, 0.5491, 0.229]}]}, {"id": "b_5", "type": "paragraph", "text": ". Recall the linear regression objective:", "words": [{"w": ".", "b": [0.5578, 0.2137, 0.5628, 0.2287]}, {"w": "Recall", "b": [0.571, 0.2137, 0.6201, 0.2287]}, {"w": "the", "b": [0.6262, 0.2137, 0.6517, 0.2287]}, {"w": "linear", "b": [0.6577, 0.2137, 0.7029, 0.2287]}, {"w": "regression", "b": [0.7091, 0.2137, 0.7884, 0.2287]}, {"w": "objective:", "b": [0.7945, 0.2137, 0.8713, 0.2287]}]}, {"id": "b_6", "type": "paragraph", "text": "min w(1),w(2),b", "words": [{"w": "min", "b": [0.3952, 0.2695, 0.4259, 0.2844]}, {"w": "w(1),w(2),b", "b": [0.3748, 0.2837, 0.4464, 0.2948]}]}, {"id": "b_8", "type": "paragraph", "text": "1 N ×", "words": [{"w": "1", "b": [0.4663, 0.2594, 0.4755, 0.2743]}, {"w": "N", "b": [0.4625, 0.28, 0.4773, 0.295]}, {"w": "×", "b": [0.4856, 0.2696, 0.5, 0.2845]}]}, {"id": "b_9", "type": "paragraph", "text": "N X", "words": [{"w": "N", "b": [0.5109, 0.2546, 0.5226, 0.265]}, {"w": "X", "b": [0.5041, 0.2663, 0.5307, 0.2813]}]}, {"id": "b_10", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.5055, 0.2909, 0.5294, 0.3014]}]}, {"id": "b_11", "type": "paragraph", "text": "(fi −yi)2", "words": [{"w": "(fi", "b": [0.5307, 0.2695, 0.5522, 0.286]}, {"w": "−yi)2", "b": [0.5572, 0.2671, 0.6054, 0.286]}]}, {"id": "b_13", "type": "paragraph", "text": ", (3)", "words": [{"w": ",", "b": [0.6201, 0.2698, 0.6252, 0.2847]}, {"w": "(3)", "b": [0.8452, 0.2695, 0.8688, 0.2844]}]}, {"id": "b_14", "type": "paragraph", "text": "In the above equation, fi", "words": [{"w": "In", "b": [0.1312, 0.3255, 0.1478, 0.3404]}, {"w": "the", "b": [0.1537, 0.3255, 0.1789, 0.3404]}, {"w": "above", "b": [0.1848, 0.3255, 0.23, 0.3404]}, {"w": "equation,", "b": [0.2359, 0.3255, 0.3088, 0.3404]}, {"w": "fi", "b": [0.3146, 0.3257, 0.3289, 0.342]}]}, {"id": "b_15", "type": "paragraph", "text": "def = f(xi), and f is the equation of the regression line. The equation of the linear regression line f will have the form f = w(1)x(1) + w(2)x(2) + b. The learning algorithm will deduce the values of parameters w(1), w(2), and b from the training data by minimizing the objective. A model is considered less complex if some of the parameters w(·)", "words": [{"w": "def", "b": [0.335, 0.3206, 0.3542, 0.331]}, {"w": "=", "b": [0.3374, 0.3255, 0.3518, 0.3404]}, {"w": "f(xi),", "b": [0.3594, 0.3255, 0.4068, 0.342]}, {"w": "and", "b": [0.4128, 0.3255, 0.4419, 0.3404]}, {"w": "f", "b": [0.4478, 0.3257, 0.4569, 0.3407]}, {"w": "is", "b": [0.4647, 0.3255, 0.4769, 0.3404]}, {"w": "the", "b": [0.4828, 0.3255, 0.508, 0.3404]}, {"w": "equation", "b": [0.5139, 0.3255, 0.5817, 0.3404]}, {"w": "of", "b": [0.5876, 0.3255, 0.6022, 0.3404]}, {"w": "the", "b": [0.6081, 0.3255, 0.6333, 0.3404]}, {"w": "regression", "b": [0.6392, 0.3255, 0.7169, 0.3404]}, {"w": "line.", "b": [0.7228, 0.3255, 0.756, 0.3404]}, {"w": "The", "b": [0.7641, 0.3255, 0.7952, 0.3404]}, {"w": "equation", "b": [0.8011, 0.3255, 0.869, 0.3404]}, {"w": "of", "b": [0.1312, 0.3434, 0.1464, 0.3584]}, {"w": "the", "b": [0.1526, 0.3434, 0.1788, 0.3584]}, {"w": "linear", "b": [0.185, 0.3434, 0.2311, 0.3584]}, {"w": "regression", "b": [0.2373, 0.3434, 0.3182, 0.3584]}, {"w": "line", "b": [0.3245, 0.3434, 0.3538, 0.3584]}, {"w": "f", "b": [0.3598, 0.3437, 0.3689, 0.3586]}, {"w": "will", "b": [0.3771, 0.3434, 0.4064, 0.3584]}, {"w": "have", "b": [0.4126, 0.3434, 0.4498, 0.3584]}, {"w": "the", "b": [0.456, 0.3434, 0.4822, 0.3584]}, {"w": "form", "b": [0.4884, 0.3434, 0.5266, 0.3584]}, {"w": "f", "b": [0.5328, 0.3437, 0.5418, 0.3586]}, {"w": "=", "b": [0.5491, 0.3434, 0.5637, 0.3584]}, {"w": "w(1)x(1)", "b": [0.569, 0.3418, 0.6319, 0.3586]}, {"w": "+", "b": [0.637, 0.3434, 0.6516, 0.3584]}, {"w": "w(2)x(2)", "b": [0.6558, 0.3418, 0.7187, 0.3586]}, {"w": "+", "b": [0.7238, 0.3434, 0.7385, 0.3584]}, {"w": "b.", "b": [0.7426, 0.3434, 0.7558, 0.3586]}, {"w": "The", "b": [0.7642, 0.3434, 0.7966, 0.3584]}, {"w": "learning", "b": [0.8029, 0.3434, 0.8688, 0.3584]}, {"w": "algorithm", "b": [0.1312, 0.3614, 0.2104, 0.3763]}, {"w": "will", "b": [0.2165, 0.3614, 0.2456, 0.3763]}, {"w": "deduce", "b": [0.2518, 0.3614, 0.308, 0.3763]}, {"w": "the", "b": [0.3142, 0.3614, 0.3402, 0.3763]}, {"w": "values", "b": [0.3463, 0.3614, 0.3959, 0.3763]}, {"w": "of", "b": [0.402, 0.3614, 0.4171, 0.3763]}, {"w": "parameters", "b": [0.4233, 0.3614, 0.514, 0.3763]}, {"w": "w(1),", "b": [0.52, 0.3597, 0.5587, 0.3766]}, {"w": "w(2),", "b": [0.5649, 0.3597, 0.6036, 0.3766]}, {"w": "and", "b": [0.6097, 0.3614, 0.6399, 0.3763]}, {"w": "b", "b": [0.646, 0.3616, 0.654, 0.3766]}, {"w": "from", "b": [0.6601, 0.3614, 0.6981, 0.3763]}, {"w": "the", "b": [0.7043, 0.3614, 0.7303, 0.3763]}, {"w": "training", "b": [0.7364, 0.3614, 0.801, 0.3763]}, {"w": "data", "b": [0.8072, 0.3614, 0.8436, 0.3763]}, {"w": "by", "b": [0.8497, 0.3614, 0.8695, 0.3763]}, {"w": "minimizing", "b": [0.1312, 0.3793, 0.2195, 0.3943]}, {"w": "the", "b": [0.2256, 0.3793, 0.251, 0.3943]}, {"w": "objective.", "b": [0.2571, 0.3793, 0.3332, 0.3943]}, {"w": "A", "b": [0.3415, 0.3793, 0.3552, 0.3943]}, {"w": "model", "b": [0.3613, 0.3793, 0.4095, 0.3943]}, {"w": "is", "b": [0.4157, 0.3793, 0.4279, 0.3943]}, {"w": "considered", "b": [0.4341, 0.3793, 0.5174, 0.3943]}, {"w": "less", "b": [0.5236, 0.3793, 0.5512, 0.3943]}, {"w": "complex", "b": [0.5574, 0.3793, 0.6228, 0.3943]}, {"w": "if", "b": [0.6289, 0.3793, 0.6396, 0.3943]}, {"w": "some", "b": [0.6458, 0.3793, 0.6854, 0.3943]}, {"w": "of", "b": [0.6916, 0.3793, 0.7063, 0.3943]}, {"w": "the", "b": [0.7125, 0.3793, 0.7378, 0.3943]}, {"w": "parameters", "b": [0.744, 0.3793, 0.8324, 0.3943]}, {"w": "w(·)", "b": [0.8382, 0.3775, 0.8678, 0.3945]}]}, {"id": "b_16", "type": "paragraph", "text": "are close to or equal to zero.", "words": [{"w": "are", "b": [0.1312, 0.3973, 0.1559, 0.4122]}, {"w": "close", "b": [0.162, 0.3973, 0.2001, 0.4122]}, {"w": "to", "b": [0.2062, 0.3973, 0.2226, 0.4122]}, {"w": "or", "b": [0.2288, 0.3973, 0.2453, 0.4122]}, {"w": "equal", "b": [0.2514, 0.3973, 0.294, 0.4122]}, {"w": "to", "b": [0.3001, 0.3973, 0.3165, 0.4122]}, {"w": "zero.", "b": [0.3227, 0.3973, 0.3607, 0.4122]}]}, {"id": "b_17", "type": "paragraph", "text": "5.9.1 L1 and L2 Regularization", "words": [{"w": "5.9.1", "b": [0.1312, 0.4454, 0.1749, 0.4604]}, {"w": "L1", "b": [0.1961, 0.4454, 0.2195, 0.4604]}, {"w": "and", "b": [0.2265, 0.4454, 0.2604, 0.4604]}, {"w": "L2", "b": [0.2675, 0.4454, 0.2909, 0.4604]}, {"w": "Regularization", "b": [0.2979, 0.4454, 0.4331, 0.4604]}]}, {"id": "b_18", "type": "equation", "text": "An L1-regularized objective in Equation 3 looks like this:", "words": [{"w": "An", "b": [0.1305, 0.4817, 0.1546, 0.4966]}, {"w": "L1-regularized", "b": [0.1608, 0.4817, 0.276, 0.4966]}, {"w": "objective", "b": [0.2821, 0.4817, 0.3539, 0.4966]}, {"w": "in", "b": [0.3601, 0.4817, 0.3755, 0.4966]}, {"w": "Equation", "b": [0.3816, 0.4817, 0.4552, 0.4966]}, {"w": "3", "b": [0.4613, 0.4817, 0.4706, 0.4966]}, {"w": "looks", "b": [0.4767, 0.4817, 0.5178, 0.4966]}, {"w": "like", "b": [0.524, 0.4817, 0.5517, 0.4966]}, {"w": "this:", "b": [0.5578, 0.4817, 0.5928, 0.4966]}]}, {"id": "b_19", "type": "paragraph", "text": "min w(1),w(2),b", "words": [{"w": "min", "b": [0.2993, 0.5374, 0.3301, 0.5524]}, {"w": "w(1),w(2),b", "b": [0.2789, 0.5517, 0.3506, 0.5628]}]}, {"id": "b_21", "type": "paragraph", "text": "C ×", "words": [{"w": "C", "b": [0.3644, 0.5377, 0.3776, 0.5527]}, {"w": "×", "b": [0.383, 0.5375, 0.3974, 0.5525]}]}, {"id": "b_23", "type": "equation", "text": "|w(1)| + |w(2)|", "words": [{"w": "|w(1)|", "b": [0.4125, 0.5351, 0.4563, 0.5527]}, {"w": "+", "b": [0.4604, 0.5374, 0.4747, 0.5524]}, {"w": "|w(2)|", "b": [0.4788, 0.5351, 0.5226, 0.5527]}]}, {"id": "b_25", "type": "equation", "text": "+ 1", "words": [{"w": "+", "b": [0.5377, 0.5374, 0.552, 0.5524]}, {"w": "1", "b": [0.5622, 0.5273, 0.5714, 0.5423]}]}, {"id": "b_26", "type": "paragraph", "text": "N ×", "words": [{"w": "N", "b": [0.5584, 0.548, 0.5732, 0.5629]}, {"w": "×", "b": [0.5815, 0.5375, 0.5959, 0.5525]}]}, {"id": "b_27", "type": "paragraph", "text": "N X", "words": [{"w": "N", "b": [0.6067, 0.5225, 0.6184, 0.533]}, {"w": "X", "b": [0.5999, 0.5343, 0.6266, 0.5492]}]}, {"id": "b_28", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.6013, 0.5589, 0.6252, 0.5694]}]}, {"id": "b_29", "type": "paragraph", "text": "(fi −yi)2", "words": [{"w": "(fi", "b": [0.6266, 0.5374, 0.648, 0.5539]}, {"w": "−yi)2", "b": [0.653, 0.5351, 0.7012, 0.5539]}]}, {"id": "b_31", "type": "paragraph", "text": ", (4)", "words": [{"w": ",", "b": [0.716, 0.5377, 0.7211, 0.5527]}, {"w": "(4)", "b": [0.8452, 0.5374, 0.8688, 0.5524]}]}, {"id": "b_32", "type": "paragraph", "text": "where C is a hyperparameter that controls the importance of regularization. If we set C to zero, the model becomes a standard non-regularized linear regression model. On the other hand, if we set C to a high value, the learning algorithm will try to set most w(·) to a value close or equal to zero to minimize the objective. The model will become very simple, which can lead to underfitting. The role of the data analyst is to find such a value of the hyperparameter C that doesn’t increase the bias too much, but reduces the variance to a level reasonable for the problem at hand.", "words": [{"w": "where", "b": [0.1306, 0.5865, 0.1787, 0.6014]}, {"w": "C", "b": [0.1859, 0.5868, 0.1991, 0.6017]}, {"w": "is", "b": [0.2075, 0.5865, 0.2202, 0.6014]}, {"w": "a", "b": [0.2274, 0.5865, 0.2368, 0.6014]}, {"w": "hyperparameter", "b": [0.2441, 0.5868, 0.3926, 0.6017]}, {"w": "that", "b": [0.3998, 0.5865, 0.4343, 0.6014]}, {"w": "controls", "b": [0.4414, 0.5865, 0.5059, 0.6014]}, {"w": "the", "b": [0.5131, 0.5865, 0.5393, 0.6014]}, {"w": "importance", "b": [0.5464, 0.5865, 0.639, 0.6014]}, {"w": "of", "b": [0.6462, 0.5865, 0.6613, 0.6014]}, {"w": "regularization.", "b": [0.6685, 0.5865, 0.7868, 0.6014]}, {"w": "If", "b": [0.798, 0.5865, 0.8106, 0.6014]}, {"w": "we", "b": [0.8177, 0.5865, 0.8392, 0.6014]}, {"w": "set", "b": [0.8463, 0.5865, 0.8695, 0.6014]}, {"w": "C", "b": [0.1312, 0.6047, 0.1444, 0.6197]}, {"w": "to", "b": [0.1519, 0.6044, 0.1686, 0.6194]}, {"w": "zero,", "b": [0.1748, 0.6044, 0.2135, 0.6194]}, {"w": "the", "b": [0.2197, 0.6044, 0.2458, 0.6194]}, {"w": "model", "b": [0.252, 0.6044, 0.3016, 0.6194]}, {"w": "becomes", "b": [0.3078, 0.6044, 0.3764, 0.6194]}, {"w": "a", "b": [0.3825, 0.6044, 0.3919, 0.6194]}, {"w": "standard", "b": [0.3981, 0.6044, 0.4704, 0.6194]}, {"w": "non-regularized", "b": [0.4766, 0.6044, 0.6032, 0.6194]}, {"w": "linear", "b": [0.6094, 0.6044, 0.6555, 0.6194]}, {"w": "regression", "b": [0.6616, 0.6044, 0.7425, 0.6194]}, {"w": "model.", "b": [0.7486, 0.6044, 0.8035, 0.6194]}, {"w": "On", "b": [0.8117, 0.6044, 0.8368, 0.6194]}, {"w": "the", "b": [0.843, 0.6044, 0.8691, 0.6194]}, {"w": "other", "b": [0.1312, 0.6224, 0.173, 0.6373]}, {"w": "hand,", "b": [0.1792, 0.6224, 0.224, 0.6373]}, {"w": "if", "b": [0.2301, 0.6224, 0.2408, 0.6373]}, {"w": "we", "b": [0.247, 0.6224, 0.2679, 0.6373]}, {"w": "set", "b": [0.274, 0.6224, 0.2965, 0.6373]}, {"w": "C", "b": [0.3026, 0.6226, 0.3158, 0.6376]}, {"w": "to", "b": [0.3233, 0.6224, 0.3395, 0.6373]}, {"w": "a", "b": [0.3457, 0.6224, 0.3549, 0.6373]}, {"w": "high", "b": [0.361, 0.6224, 0.3956, 0.6373]}, {"w": "value,", "b": [0.4018, 0.6224, 0.4481, 0.6373]}, {"w": "the", "b": [0.4543, 0.6224, 0.4797, 0.6373]}, {"w": "learning", "b": [0.4859, 0.6224, 0.5501, 0.6373]}, {"w": "algorithm", "b": [0.5562, 0.6224, 0.6337, 0.6373]}, {"w": "will", "b": [0.6398, 0.6224, 0.6683, 0.6373]}, {"w": "try", "b": [0.6745, 0.6224, 0.6985, 0.6373]}, {"w": "to", "b": [0.7046, 0.6224, 0.7209, 0.6373]}, {"w": "set", "b": [0.727, 0.6224, 0.7495, 0.6373]}, {"w": "most", "b": [0.7557, 0.6224, 0.7945, 0.6373]}, {"w": "w(·)", "b": [0.8005, 0.6206, 0.8301, 0.6376]}, {"w": "to", "b": [0.8372, 0.6224, 0.8535, 0.6373]}, {"w": "a", "b": [0.8596, 0.6224, 0.8688, 0.6373]}, {"w": "value", "b": [0.1308, 0.6403, 0.1728, 0.6553]}, {"w": "close", "b": [0.1789, 0.6403, 0.2174, 0.6553]}, {"w": "or", "b": [0.2235, 0.6403, 0.2401, 0.6553]}, {"w": "equal", "b": [0.2463, 0.6403, 0.2893, 0.6553]}, {"w": "to", "b": [0.2955, 0.6403, 0.312, 0.6553]}, {"w": "zero", "b": [0.3182, 0.6403, 0.3514, 0.6553]}, {"w": "to", "b": [0.3575, 0.6403, 0.3741, 0.6553]}, {"w": "minimize", "b": [0.3803, 0.6403, 0.4539, 0.6553]}, {"w": "the", "b": [0.46, 0.6403, 0.4859, 0.6553]}, {"w": "objective.", "b": [0.492, 0.6403, 0.5698, 0.6553]}, {"w": "The", "b": [0.578, 0.6403, 0.6102, 0.6553]}, {"w": "model", "b": [0.6163, 0.6403, 0.6655, 0.6553]}, {"w": "will", "b": [0.6717, 0.6403, 0.7007, 0.6553]}, {"w": "become", "b": [0.7068, 0.6403, 0.7675, 0.6553]}, {"w": "very", "b": [0.7736, 0.6403, 0.8084, 0.6553]}, {"w": "simple,", "b": [0.8145, 0.6403, 0.8717, 0.6553]}, {"w": "which", "b": [0.1306, 0.6583, 0.1782, 0.6732]}, {"w": "can", "b": [0.1847, 0.6583, 0.2129, 0.6732]}, {"w": "lead", "b": [0.2194, 0.6583, 0.2529, 0.6732]}, {"w": "to", "b": [0.2594, 0.6583, 0.2761, 0.6732]}, {"w": "underfitting.", "b": [0.2826, 0.6583, 0.3852, 0.6732]}, {"w": "The", "b": [0.3945, 0.6583, 0.4269, 0.6732]}, {"w": "role", "b": [0.4334, 0.6583, 0.4638, 0.6732]}, {"w": "of", "b": [0.4703, 0.6583, 0.4855, 0.6732]}, {"w": "the", "b": [0.492, 0.6583, 0.5181, 0.6732]}, {"w": "data", "b": [0.5246, 0.6583, 0.5612, 0.6732]}, {"w": "analyst", "b": [0.5678, 0.6583, 0.627, 0.6732]}, {"w": "is", "b": [0.6334, 0.6583, 0.6461, 0.6732]}, {"w": "to", "b": [0.6526, 0.6583, 0.6694, 0.6732]}, {"w": "find", "b": [0.6759, 0.6583, 0.7073, 0.6732]}, {"w": "such", "b": [0.7137, 0.6583, 0.75, 0.6732]}, {"w": "a", "b": [0.7565, 0.6583, 0.7659, 0.6732]}, {"w": "value", "b": [0.7724, 0.6583, 0.8148, 0.6732]}, {"w": "of", "b": [0.8213, 0.6583, 0.8364, 0.6732]}, {"w": "the", "b": [0.843, 0.6583, 0.8691, 0.6732]}, {"w": "hyperparameter", "b": [0.1312, 0.6762, 0.2616, 0.6912]}, {"w": "C", "b": [0.268, 0.6765, 0.2812, 0.6914]}, {"w": "that", "b": [0.289, 0.6762, 0.3235, 0.6912]}, {"w": "doesn’t", "b": [0.33, 0.6762, 0.3892, 0.6912]}, {"w": "increase", "b": [0.3957, 0.6762, 0.4607, 0.6912]}, {"w": "the", "b": [0.4672, 0.6762, 0.4934, 0.6912]}, {"w": "bias", "b": [0.4998, 0.6762, 0.5324, 0.6912]}, {"w": "too", "b": [0.5388, 0.6762, 0.5655, 0.6912]}, {"w": "much,", "b": [0.572, 0.6762, 0.6212, 0.6912]}, {"w": "but", "b": [0.6277, 0.6762, 0.656, 0.6912]}, {"w": "reduces", "b": [0.6624, 0.6762, 0.7233, 0.6912]}, {"w": "the", "b": [0.7298, 0.6762, 0.7559, 0.6912]}, {"w": "variance", "b": [0.7624, 0.6762, 0.83, 0.6912]}, {"w": "to", "b": [0.8365, 0.6762, 0.8532, 0.6912]}, {"w": "a", "b": [0.8597, 0.6762, 0.8691, 0.6912]}, {"w": "level", "b": [0.1312, 0.6942, 0.1671, 0.7091]}, {"w": "reasonable", "b": [0.1733, 0.6942, 0.2575, 0.7091]}, {"w": "for", "b": [0.2637, 0.6942, 0.2858, 0.7091]}, {"w": "the", "b": [0.2919, 0.6942, 0.3176, 0.7091]}, {"w": "problem", "b": [0.3237, 0.6942, 0.3894, 0.7091]}, {"w": "at", "b": [0.3956, 0.6942, 0.412, 0.7091]}, {"w": "hand.", "b": [0.4181, 0.6942, 0.4632, 0.7091]}]}, {"id": "b_33", "type": "equation", "text": "An L2-regularized objective in our two-dimensional setting looks like this:", "words": [{"w": "An", "b": [0.1305, 0.7211, 0.1546, 0.736]}, {"w": "L2-regularized", "b": [0.1608, 0.7211, 0.276, 0.736]}, {"w": "objective", "b": [0.2821, 0.7211, 0.3539, 0.736]}, {"w": "in", "b": [0.3601, 0.7211, 0.3755, 0.736]}, {"w": "our", "b": [0.3816, 0.7211, 0.4083, 0.736]}, {"w": "two-dimensional", "b": [0.4145, 0.7211, 0.5448, 0.736]}, {"w": "setting", "b": [0.5509, 0.7211, 0.6054, 0.736]}, {"w": "looks", "b": [0.6116, 0.7211, 0.6527, 0.736]}, {"w": "like", "b": [0.6588, 0.7211, 0.6865, 0.736]}, {"w": "this:", "b": [0.6927, 0.7211, 0.7276, 0.736]}]}, {"id": "b_34", "type": "paragraph", "text": "min w(1),w(2),b", "words": [{"w": "min", "b": [0.2869, 0.7678, 0.3177, 0.7827]}, {"w": "w(1),w(2),b", "b": [0.2665, 0.782, 0.3382, 0.7931]}]}, {"id": "b_36", "type": "paragraph", "text": "C ×", "words": [{"w": "C", "b": [0.352, 0.7681, 0.3652, 0.783]}, {"w": "×", "b": [0.3707, 0.7679, 0.385, 0.7828]}]}, {"id": "b_38", "type": "equation", "text": "(w(1))2 + (w(2))2", "words": [{"w": "(w(1))2", "b": [0.4001, 0.7654, 0.4553, 0.783]}, {"w": "+", "b": [0.4604, 0.7678, 0.4747, 0.7827]}, {"w": "(w(2))2", "b": [0.4788, 0.7654, 0.534, 0.783]}]}, {"id": "b_39", "type": "equation", "text": "+ 1", "words": [{"w": "+", "b": [0.5501, 0.7678, 0.5644, 0.7827]}, {"w": "1", "b": [0.5745, 0.7577, 0.5838, 0.7726]}]}, {"id": "b_40", "type": "paragraph", "text": "N ×", "words": [{"w": "N", "b": [0.5707, 0.7783, 0.5856, 0.7933]}, {"w": "×", "b": [0.5939, 0.7679, 0.6082, 0.7828]}]}, {"id": "b_41", "type": "paragraph", "text": "N X", "words": [{"w": "N", "b": [0.6191, 0.7529, 0.6308, 0.7633]}, {"w": "X", "b": [0.6123, 0.7646, 0.639, 0.7796]}]}, {"id": "b_42", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.6137, 0.7892, 0.6376, 0.7997]}]}, {"id": "b_43", "type": "paragraph", "text": "(fi −yi)2", "words": [{"w": "(fi", "b": [0.639, 0.7678, 0.6604, 0.7843]}, {"w": "−yi)2", "b": [0.6654, 0.7654, 0.7136, 0.7843]}]}, {"id": "b_45", "type": "paragraph", "text": ", (5)", "words": [{"w": ",", "b": [0.7283, 0.7681, 0.7335, 0.783]}, {"w": "(5)", "b": [0.8452, 0.7678, 0.8688, 0.7827]}]}, {"id": "b_46", "type": "paragraph", "text": "In practice, L1 regularization produces a sparse model, assuming the value of hyperpa- rameter C is great enough. This is a model where most of its parameters equal exactly zero. So, as discussed in the previous chapter, L1 implicitly performs feature selection by", "words": [{"w": "In", "b": [0.1312, 0.8228, 0.1485, 0.8378]}, {"w": "practice,", "b": [0.1555, 0.8228, 0.2257, 0.8378]}, {"w": "L1", "b": [0.2329, 0.8228, 0.2541, 0.8378]}, {"w": "regularization", "b": [0.2612, 0.8228, 0.3742, 0.8378]}, {"w": "produces", "b": [0.3813, 0.8228, 0.4541, 0.8378]}, {"w": "a", "b": [0.4612, 0.8228, 0.4706, 0.8378]}, {"w": "sparse", "b": [0.4776, 0.8231, 0.535, 0.8381]}, {"w": "model,", "b": [0.5431, 0.8228, 0.6046, 0.8381]}, {"w": "assuming", "b": [0.6118, 0.8228, 0.6874, 0.8378]}, {"w": "the", "b": [0.6944, 0.8228, 0.7206, 0.8378]}, {"w": "value", "b": [0.7276, 0.8228, 0.77, 0.8378]}, {"w": "of", "b": [0.777, 0.8228, 0.7922, 0.8378]}, {"w": "hyperpa-", "b": [0.7992, 0.8228, 0.872, 0.8378]}, {"w": "rameter", "b": [0.1312, 0.8408, 0.1951, 0.8557]}, {"w": "C", "b": [0.2026, 0.841, 0.2158, 0.856]}, {"w": "is", "b": [0.2246, 0.8408, 0.2372, 0.8557]}, {"w": "great", "b": [0.2447, 0.8408, 0.2866, 0.8557]}, {"w": "enough.", "b": [0.2941, 0.8408, 0.3579, 0.8557]}, {"w": "This", "b": [0.3701, 0.8408, 0.4068, 0.8557]}, {"w": "is", "b": [0.4143, 0.8408, 0.427, 0.8557]}, {"w": "a", "b": [0.4344, 0.8408, 0.4438, 0.8557]}, {"w": "model", "b": [0.4513, 0.8408, 0.501, 0.8557]}, {"w": "where", "b": [0.5085, 0.8408, 0.5566, 0.8557]}, {"w": "most", "b": [0.5641, 0.8408, 0.604, 0.8557]}, {"w": "of", "b": [0.6114, 0.8408, 0.6266, 0.8557]}, {"w": "its", "b": [0.6341, 0.8408, 0.6541, 0.8557]}, {"w": "parameters", "b": [0.6616, 0.8408, 0.7528, 0.8557]}, {"w": "equal", "b": [0.7602, 0.8408, 0.8037, 0.8557]}, {"w": "exactly", "b": [0.8111, 0.8408, 0.8697, 0.8557]}, {"w": "zero.", "b": [0.1312, 0.8587, 0.169, 0.8737]}, {"w": "So,", "b": [0.1772, 0.8587, 0.2016, 0.8737]}, {"w": "as", "b": [0.2078, 0.8587, 0.2242, 0.8737]}, {"w": "discussed", "b": [0.2303, 0.8587, 0.304, 0.8737]}, {"w": "in", "b": [0.3101, 0.8587, 0.3254, 0.8737]}, {"w": "the", "b": [0.3315, 0.8587, 0.357, 0.8737]}, {"w": "previous", "b": [0.3631, 0.8587, 0.43, 0.8737]}, {"w": "chapter,", "b": [0.4362, 0.8587, 0.5009, 0.8737]}, {"w": "L1", "b": [0.507, 0.8587, 0.5276, 0.8737]}, {"w": "implicitly", "b": [0.5338, 0.8587, 0.6097, 0.8737]}, {"w": "performs", "b": [0.6158, 0.8587, 0.6863, 0.8737]}, {"w": "feature", "b": [0.6921, 0.859, 0.7571, 0.874]}, {"w": "selection", "b": [0.7642, 0.859, 0.8439, 0.874]}, {"w": "by", "b": [0.8501, 0.8587, 0.8695, 0.8737]}]}, {"id": "b_47", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 35", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "35", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 174, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "deciding which features are essential for prediction, and which are not. This property of L1 regularization is useful when we want to increase model explainability. However, if our goal is to maximize the model performance on the holdout data, then L2 usually gives better results.", "words": [{"w": "deciding", "b": [0.1312, 0.0881, 0.198, 0.1031]}, {"w": "which", "b": [0.2041, 0.0881, 0.2508, 0.1031]}, {"w": "features", "b": [0.257, 0.0881, 0.3203, 0.1031]}, {"w": "are", "b": [0.3265, 0.0881, 0.3512, 0.1031]}, {"w": "essential", "b": [0.3573, 0.0881, 0.4248, 0.1031]}, {"w": "for", "b": [0.4309, 0.0881, 0.4531, 0.1031]}, {"w": "prediction,", "b": [0.4592, 0.0881, 0.5455, 0.1031]}, {"w": "and", "b": [0.5517, 0.0881, 0.5815, 0.1031]}, {"w": "which", "b": [0.5876, 0.0881, 0.6343, 0.1031]}, {"w": "are", "b": [0.6405, 0.0881, 0.6652, 0.1031]}, {"w": "not.", "b": [0.6714, 0.0881, 0.7032, 0.1031]}, {"w": "This", "b": [0.7114, 0.0881, 0.7474, 0.1031]}, {"w": "property", "b": [0.7536, 0.0881, 0.823, 0.1031]}, {"w": "of", "b": [0.8292, 0.0881, 0.8441, 0.1031]}, {"w": "L1", "b": [0.8502, 0.0881, 0.871, 0.1031]}, {"w": "regularization", "b": [0.1312, 0.106, 0.2443, 0.121]}, {"w": "is", "b": [0.2511, 0.106, 0.2638, 0.121]}, {"w": "useful", "b": [0.2706, 0.106, 0.3183, 0.121]}, {"w": "when", "b": [0.3252, 0.106, 0.3681, 0.121]}, {"w": "we", "b": [0.3749, 0.106, 0.3963, 0.121]}, {"w": "want", "b": [0.4032, 0.106, 0.4429, 0.121]}, {"w": "to", "b": [0.4498, 0.106, 0.4665, 0.121]}, {"w": "increase", "b": [0.4733, 0.106, 0.5383, 0.121]}, {"w": "model", "b": [0.5452, 0.106, 0.5948, 0.121]}, {"w": "explainability.", "b": [0.6015, 0.106, 0.732, 0.1213]}, {"w": "However,", "b": [0.7423, 0.106, 0.8171, 0.121]}, {"w": "if", "b": [0.8241, 0.106, 0.8351, 0.121]}, {"w": "our", "b": [0.8419, 0.106, 0.8692, 0.121]}, {"w": "goal", "b": [0.1312, 0.124, 0.1634, 0.1389]}, {"w": "is", "b": [0.1694, 0.124, 0.1816, 0.1389]}, {"w": "to", "b": [0.1876, 0.124, 0.2037, 0.1389]}, {"w": "maximize", "b": [0.2097, 0.124, 0.2845, 0.1389]}, {"w": "the", "b": [0.2905, 0.124, 0.3157, 0.1389]}, {"w": "model", "b": [0.3217, 0.124, 0.3694, 0.1389]}, {"w": "performance", "b": [0.3754, 0.124, 0.473, 0.1389]}, {"w": "on", "b": [0.4791, 0.124, 0.4982, 0.1389]}, {"w": "the", "b": [0.5042, 0.124, 0.5293, 0.1389]}, {"w": "holdout", "b": [0.5353, 0.124, 0.5956, 0.1389]}, {"w": "data,", "b": [0.6016, 0.124, 0.6418, 0.1389]}, {"w": "then", "b": [0.6479, 0.124, 0.6831, 0.1389]}, {"w": "L2", "b": [0.6891, 0.124, 0.7094, 0.1389]}, {"w": "usually", "b": [0.7154, 0.124, 0.7713, 0.1389]}, {"w": "gives", "b": [0.7773, 0.124, 0.8156, 0.1389]}, {"w": "better", "b": [0.8216, 0.124, 0.8695, 0.1389]}, {"w": "results.", "b": [0.1312, 0.1419, 0.1889, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "In the literature, you will also see the names lasso for L1 and ridge regularization for L2.", "words": [{"w": "In", "b": [0.1312, 0.1689, 0.1478, 0.1838]}, {"w": "the", "b": [0.154, 0.1689, 0.1792, 0.1838]}, {"w": "literature,", "b": [0.1853, 0.1689, 0.264, 0.1838]}, {"w": "you", "b": [0.2701, 0.1689, 0.2983, 0.1838]}, {"w": "will", "b": [0.3045, 0.1689, 0.3327, 0.1838]}, {"w": "also", "b": [0.3388, 0.1689, 0.3691, 0.1838]}, {"w": "see", "b": [0.3753, 0.1689, 0.3986, 0.1838]}, {"w": "the", "b": [0.4047, 0.1689, 0.4299, 0.1838]}, {"w": "names", "b": [0.436, 0.1689, 0.4855, 0.1838]}, {"w": "lasso", "b": [0.4914, 0.1692, 0.535, 0.1841]}, {"w": "for", "b": [0.5411, 0.1689, 0.5629, 0.1838]}, {"w": "L1", "b": [0.569, 0.1689, 0.5894, 0.1838]}, {"w": "and", "b": [0.5955, 0.1689, 0.6247, 0.1838]}, {"w": "ridge", "b": [0.6309, 0.1692, 0.6776, 0.1841]}, {"w": "regularization", "b": [0.6847, 0.1692, 0.8127, 0.1841]}, {"w": "for", "b": [0.8189, 0.1689, 0.8406, 0.1838]}, {"w": "L2.", "b": [0.8467, 0.1689, 0.8721, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "5.9.2 Other Forms of Regularization", "words": [{"w": "5.9.2", "b": [0.1312, 0.217, 0.1749, 0.232]}, {"w": "Other", "b": [0.1961, 0.217, 0.2505, 0.232]}, {"w": "Forms", "b": [0.2576, 0.217, 0.3146, 0.232]}, {"w": "of", "b": [0.3217, 0.217, 0.3388, 0.232]}, {"w": "Regularization", "b": [0.3458, 0.217, 0.481, 0.232]}]}, {"id": "b_3", "type": "paragraph", "text": "L1 and L2 regularization methods can be combined in what’s called elastic net regularization.", "words": [{"w": "L1", "b": [0.1312, 0.2533, 0.1516, 0.2682]}, {"w": "and", "b": [0.1557, 0.2533, 0.1848, 0.2682]}, {"w": "L2", "b": [0.1889, 0.2533, 0.2092, 0.2682]}, {"w": "regularization", "b": [0.2134, 0.2533, 0.322, 0.2682]}, {"w": "methods", "b": [0.3261, 0.2533, 0.393, 0.2682]}, {"w": "can", "b": [0.3971, 0.2533, 0.4243, 0.2682]}, {"w": "be", "b": [0.4284, 0.2533, 0.447, 0.2682]}, {"w": "combined", "b": [0.4511, 0.2533, 0.5259, 0.2682]}, {"w": "in", "b": [0.53, 0.2533, 0.5451, 0.2682]}, {"w": "what’s", "b": [0.5492, 0.2533, 0.6006, 0.2682]}, {"w": "called", "b": [0.6047, 0.2533, 0.6499, 0.2682]}, {"w": "elastic", "b": [0.6538, 0.2536, 0.7117, 0.2685]}, {"w": "net", "b": [0.7187, 0.2536, 0.7485, 0.2685]}, {"w": "regularization.", "b": [0.7556, 0.2533, 0.8886, 0.2685]}]}, {"id": "b_4", "type": "paragraph", "text": "In addition to being widely used with linear models, L1 and L2 are often used with neural networks and many other types of models that directly minimize an objective function.", "words": [{"w": "In", "b": [0.1312, 0.2802, 0.1484, 0.2952]}, {"w": "addition", "b": [0.1545, 0.2802, 0.2219, 0.2952]}, {"w": "to", "b": [0.2281, 0.2802, 0.2447, 0.2952]}, {"w": "being", "b": [0.2508, 0.2802, 0.2949, 0.2952]}, {"w": "widely", "b": [0.301, 0.2802, 0.3535, 0.2952]}, {"w": "used", "b": [0.3596, 0.2802, 0.396, 0.2952]}, {"w": "with", "b": [0.4022, 0.2802, 0.4385, 0.2952]}, {"w": "linear", "b": [0.4446, 0.2802, 0.4903, 0.2952]}, {"w": "models,", "b": [0.4965, 0.2802, 0.5583, 0.2952]}, {"w": "L1", "b": [0.5644, 0.2802, 0.5854, 0.2952]}, {"w": "and", "b": [0.5916, 0.2802, 0.6217, 0.2952]}, {"w": "L2", "b": [0.6278, 0.2802, 0.6488, 0.2952]}, {"w": "are", "b": [0.6549, 0.2802, 0.6799, 0.2952]}, {"w": "often", "b": [0.686, 0.2802, 0.727, 0.2952]}, {"w": "used", "b": [0.7332, 0.2802, 0.7696, 0.2952]}, {"w": "with", "b": [0.7757, 0.2802, 0.812, 0.2952]}, {"w": "neural", "b": [0.8182, 0.2802, 0.8691, 0.2952]}, {"w": "networks", "b": [0.1312, 0.2982, 0.2027, 0.3131]}, {"w": "and", "b": [0.2088, 0.2982, 0.2386, 0.3131]}, {"w": "many", "b": [0.2447, 0.2982, 0.2888, 0.3131]}, {"w": "other", "b": [0.2949, 0.2982, 0.337, 0.3131]}, {"w": "types", "b": [0.3432, 0.2982, 0.3858, 0.3131]}, {"w": "of", "b": [0.392, 0.2982, 0.4069, 0.3131]}, {"w": "models", "b": [0.413, 0.2982, 0.469, 0.3131]}, {"w": "that", "b": [0.4751, 0.2982, 0.509, 0.3131]}, {"w": "directly", "b": [0.5151, 0.2982, 0.5762, 0.3131]}, {"w": "minimize", "b": [0.5824, 0.2982, 0.6552, 0.3131]}, {"w": "an", "b": [0.6613, 0.2982, 0.6808, 0.3131]}, {"w": "objective", "b": [0.6869, 0.2982, 0.7587, 0.3131]}, {"w": "function.", "b": [0.7649, 0.2982, 0.8362, 0.3131]}]}, {"id": "b_5", "type": "paragraph", "text": "Neural networks can also benefit from two other regularization techniques: dropout and batch-normalization. There are also non-mathematical methods that have a regularization effect: data augmentation and early stopping. We will talk about these techniques in more detail in the next chapter, when we consider training neural networks.", "words": [{"w": "Neural", "b": [0.1312, 0.3251, 0.1862, 0.34]}, {"w": "networks", "b": [0.1928, 0.3251, 0.2657, 0.34]}, {"w": "can", "b": [0.2723, 0.3251, 0.3005, 0.34]}, {"w": "also", "b": [0.3071, 0.3251, 0.3386, 0.34]}, {"w": "benefit", "b": [0.3452, 0.3251, 0.4012, 0.34]}, {"w": "from", "b": [0.4078, 0.3251, 0.446, 0.34]}, {"w": "two", "b": [0.4526, 0.3251, 0.4819, 0.34]}, {"w": "other", "b": [0.4885, 0.3251, 0.5314, 0.34]}, {"w": "regularization", "b": [0.538, 0.3251, 0.6511, 0.34]}, {"w": "techniques:", "b": [0.6577, 0.3251, 0.7489, 0.34]}, {"w": "dropout", "b": [0.7577, 0.3254, 0.8319, 0.3403]}, {"w": "and", "b": [0.8384, 0.3251, 0.8688, 0.34]}, {"w": "batch-normalization.", "b": [0.1312, 0.343, 0.3216, 0.3583]}, {"w": "There", "b": [0.3295, 0.343, 0.3758, 0.358]}, {"w": "are", "b": [0.3811, 0.343, 0.4053, 0.358]}, {"w": "also", "b": [0.4106, 0.343, 0.4409, 0.358]}, {"w": "non-mathematical", "b": [0.4462, 0.343, 0.5889, 0.358]}, {"w": "methods", "b": [0.5942, 0.343, 0.6611, 0.358]}, {"w": "that", "b": [0.6665, 0.343, 0.6996, 0.358]}, {"w": "have", "b": [0.705, 0.343, 0.7406, 0.358]}, {"w": "a", "b": [0.746, 0.343, 0.755, 0.358]}, {"w": "regularization", "b": [0.7603, 0.343, 0.869, 0.358]}, {"w": "effect:", "b": [0.1312, 0.361, 0.1799, 0.3759]}, {"w": "data", "b": [0.1884, 0.3613, 0.2291, 0.3762]}, {"w": "augmentation", "b": [0.2364, 0.3613, 0.3628, 0.3762]}, {"w": "and", "b": [0.3692, 0.361, 0.3996, 0.3759]}, {"w": "early", "b": [0.4059, 0.3613, 0.4518, 0.3762]}, {"w": "stopping.", "b": [0.4591, 0.361, 0.5436, 0.3762]}, {"w": "We", "b": [0.5524, 0.361, 0.5785, 0.3759]}, {"w": "will", "b": [0.5849, 0.361, 0.6142, 0.3759]}, {"w": "talk", "b": [0.6205, 0.361, 0.6524, 0.3759]}, {"w": "about", "b": [0.6588, 0.361, 0.7063, 0.3759]}, {"w": "these", "b": [0.7127, 0.361, 0.7546, 0.3759]}, {"w": "techniques", "b": [0.761, 0.361, 0.8469, 0.3759]}, {"w": "in", "b": [0.8532, 0.361, 0.8689, 0.3759]}, {"w": "more", "b": [0.1312, 0.3789, 0.1713, 0.3939]}, {"w": "detail", "b": [0.1774, 0.3789, 0.2225, 0.3939]}, {"w": "in", "b": [0.2287, 0.3789, 0.2441, 0.3939]}, {"w": "the", "b": [0.2502, 0.3789, 0.2759, 0.3939]}, {"w": "next", "b": [0.282, 0.3789, 0.3174, 0.3939]}, {"w": "chapter,", "b": [0.3235, 0.3789, 0.3887, 0.3939]}, {"w": "when", "b": [0.3949, 0.3789, 0.4369, 0.3939]}, {"w": "we", "b": [0.4431, 0.3789, 0.4641, 0.3939]}, {"w": "consider", "b": [0.4702, 0.3789, 0.536, 0.3939]}, {"w": "training", "b": [0.5422, 0.3789, 0.6058, 0.3939]}, {"w": "neural", "b": [0.612, 0.3789, 0.6623, 0.3939]}, {"w": "networks.", "b": [0.6684, 0.3789, 0.745, 0.3939]}]}, {"id": "b_6", "type": "paragraph", "text": "5.10 Summary", "words": [{"w": "5.10", "b": [0.1312, 0.4277, 0.1756, 0.4457]}, {"w": "Summary", "b": [0.2005, 0.4277, 0.3051, 0.4457]}]}, {"id": "b_7", "type": "paragraph", "text": "Before starting to work on the model, you should make several checks and decisions. First, make sure that the data conforms to the schema, as defined by the schema file. Then, define an achievable level of performance, and choose a performance metric. Ideally, it should represent the model performance as a single number. Furthermore, it is important to establish a baseline that provides a reference point to compare your machine learning models. Finally, split your data into three sets: train, validation, and test.", "words": [{"w": "Before", "b": [0.1312, 0.4663, 0.1832, 0.4813]}, {"w": "starting", "b": [0.1894, 0.4663, 0.2526, 0.4813]}, {"w": "to", "b": [0.2587, 0.4663, 0.2753, 0.4813]}, {"w": "work", "b": [0.2814, 0.4663, 0.3208, 0.4813]}, {"w": "on", "b": [0.3269, 0.4663, 0.3465, 0.4813]}, {"w": "the", "b": [0.3527, 0.4663, 0.3785, 0.4813]}, {"w": "model,", "b": [0.3847, 0.4663, 0.439, 0.4813]}, {"w": "you", "b": [0.4451, 0.4663, 0.474, 0.4813]}, {"w": "should", "b": [0.4802, 0.4663, 0.533, 0.4813]}, {"w": "make", "b": [0.5392, 0.4663, 0.5816, 0.4813]}, {"w": "several", "b": [0.5877, 0.4663, 0.6427, 0.4813]}, {"w": "checks", "b": [0.6488, 0.4663, 0.7001, 0.4813]}, {"w": "and", "b": [0.7063, 0.4663, 0.7362, 0.4813]}, {"w": "decisions.", "b": [0.7424, 0.4663, 0.8191, 0.4813]}, {"w": "First,", "b": [0.8273, 0.4663, 0.8717, 0.4813]}, {"w": "make", "b": [0.1312, 0.4843, 0.1741, 0.4992]}, {"w": "sure", "b": [0.1822, 0.4843, 0.2158, 0.4992]}, {"w": "that", "b": [0.2239, 0.4843, 0.2584, 0.4992]}, {"w": "the", "b": [0.2665, 0.4843, 0.2926, 0.4992]}, {"w": "data", "b": [0.3007, 0.4843, 0.3373, 0.4992]}, {"w": "conforms", "b": [0.3453, 0.4843, 0.4192, 0.4992]}, {"w": "to", "b": [0.4273, 0.4843, 0.444, 0.4992]}, {"w": "the", "b": [0.4521, 0.4843, 0.4783, 0.4992]}, {"w": "schema,", "b": [0.4863, 0.4843, 0.5508, 0.4992]}, {"w": "as", "b": [0.5593, 0.4843, 0.5762, 0.4992]}, {"w": "defined", "b": [0.5842, 0.4843, 0.6428, 0.4992]}, {"w": "by", "b": [0.6509, 0.4843, 0.6708, 0.4992]}, {"w": "the", "b": [0.6788, 0.4843, 0.705, 0.4992]}, {"w": "schema", "b": [0.713, 0.4843, 0.7722, 0.4992]}, {"w": "file.", "b": [0.7803, 0.4843, 0.8096, 0.4992]}, {"w": "Then,", "b": [0.8236, 0.4843, 0.8717, 0.4992]}, {"w": "define", "b": [0.1312, 0.5022, 0.1775, 0.5172]}, {"w": "an", "b": [0.1832, 0.5022, 0.2023, 0.5172]}, {"w": "achievable", "b": [0.2081, 0.5022, 0.2884, 0.5172]}, {"w": "level", "b": [0.2942, 0.5022, 0.3294, 0.5172]}, {"w": "of", "b": [0.3351, 0.5022, 0.3497, 0.5172]}, {"w": "performance,", "b": [0.3554, 0.5022, 0.4581, 0.5172]}, {"w": "and", "b": [0.4639, 0.5022, 0.493, 0.5172]}, {"w": "choose", "b": [0.4988, 0.5022, 0.5501, 0.5172]}, {"w": "a", "b": [0.5559, 0.5022, 0.5649, 0.5172]}, {"w": "performance", "b": [0.5707, 0.5022, 0.6683, 0.5172]}, {"w": "metric.", "b": [0.674, 0.5022, 0.7293, 0.5172]}, {"w": "Ideally,", "b": [0.7374, 0.5022, 0.7942, 0.5172]}, {"w": "it", "b": [0.8, 0.5022, 0.812, 0.5172]}, {"w": "should", "b": [0.8178, 0.5022, 0.8692, 0.5172]}, {"w": "represent", "b": [0.1312, 0.5202, 0.2033, 0.5351]}, {"w": "the", "b": [0.2084, 0.5202, 0.2335, 0.5351]}, {"w": "model", "b": [0.2386, 0.5202, 0.2863, 0.5351]}, {"w": "performance", "b": [0.2914, 0.5202, 0.3889, 0.5351]}, {"w": "as", "b": [0.394, 0.5202, 0.4102, 0.5351]}, {"w": "a", "b": [0.4153, 0.5202, 0.4243, 0.5351]}, {"w": "single", "b": [0.4294, 0.5202, 0.4737, 0.5351]}, {"w": "number.", "b": [0.4788, 0.5202, 0.5436, 0.5351]}, {"w": "Furthermore,", "b": [0.5515, 0.5202, 0.6553, 0.5351]}, {"w": "it", "b": [0.6606, 0.5202, 0.6727, 0.5351]}, {"w": "is", "b": [0.6777, 0.5202, 0.6899, 0.5351]}, {"w": "important", "b": [0.695, 0.5202, 0.7744, 0.5351]}, {"w": "to", "b": [0.7794, 0.5202, 0.7955, 0.5351]}, {"w": "establish", "b": [0.8006, 0.5202, 0.8691, 0.5351]}, {"w": "a", "b": [0.1312, 0.5381, 0.1403, 0.5531]}, {"w": "baseline", "b": [0.1465, 0.5381, 0.2092, 0.5531]}, {"w": "that", "b": [0.2154, 0.5381, 0.2487, 0.5531]}, {"w": "provides", "b": [0.2548, 0.5381, 0.3207, 0.5531]}, {"w": "a", "b": [0.3268, 0.5381, 0.3359, 0.5531]}, {"w": "reference", "b": [0.3421, 0.5381, 0.4124, 0.5531]}, {"w": "point", "b": [0.4185, 0.5381, 0.46, 0.5531]}, {"w": "to", "b": [0.4661, 0.5381, 0.4823, 0.5531]}, {"w": "compare", "b": [0.4884, 0.5381, 0.5551, 0.5531]}, {"w": "your", "b": [0.5613, 0.5381, 0.5967, 0.5531]}, {"w": "machine", "b": [0.6028, 0.5381, 0.668, 0.5531]}, {"w": "learning", "b": [0.6741, 0.5381, 0.7378, 0.5531]}, {"w": "models.", "b": [0.744, 0.5381, 0.8042, 0.5531]}, {"w": "Finally,", "b": [0.8124, 0.5381, 0.8717, 0.5531]}, {"w": "split", "b": [0.1312, 0.5561, 0.1662, 0.571]}, {"w": "your", "b": [0.1724, 0.5561, 0.2083, 0.571]}, {"w": "data", "b": [0.2145, 0.5561, 0.2503, 0.571]}, {"w": "into", "b": [0.2565, 0.5561, 0.2878, 0.571]}, {"w": "three", "b": [0.2939, 0.5561, 0.335, 0.571]}, {"w": "sets:", "b": [0.3411, 0.5561, 0.3762, 0.571]}, {"w": "train,", "b": [0.3844, 0.5561, 0.4286, 0.571]}, {"w": "validation,", "b": [0.4347, 0.5561, 0.5193, 0.571]}, {"w": "and", "b": [0.5255, 0.5561, 0.5552, 0.571]}, {"w": "test.", "b": [0.5614, 0.5561, 0.5963, 0.571]}]}, {"id": "b_8", "type": "paragraph", "text": "Most modern implementations of classification learning algorithms require that the training examples have numerical labels, so you typically must transform your labels into numerical vectors. Two popular ways to do that are one-hot encoding (for binary and multiclass problems) and bag-of-words (for multi-label problems).", "words": [{"w": "Most", "b": [0.1312, 0.583, 0.1716, 0.5979]}, {"w": "modern", "b": [0.1778, 0.583, 0.2385, 0.5979]}, {"w": "implementations", "b": [0.2446, 0.583, 0.3767, 0.5979]}, {"w": "of", "b": [0.3829, 0.583, 0.3977, 0.5979]}, {"w": "classification", "b": [0.4039, 0.583, 0.505, 0.5979]}, {"w": "learning", "b": [0.5112, 0.583, 0.5754, 0.5979]}, {"w": "algorithms", "b": [0.5816, 0.583, 0.6664, 0.5979]}, {"w": "require", "b": [0.6725, 0.583, 0.7282, 0.5979]}, {"w": "that", "b": [0.7344, 0.583, 0.768, 0.5979]}, {"w": "the", "b": [0.7742, 0.583, 0.7997, 0.5979]}, {"w": "training", "b": [0.8059, 0.583, 0.8691, 0.5979]}, {"w": "examples", "b": [0.1312, 0.6009, 0.2047, 0.6159]}, {"w": "have", "b": [0.2109, 0.6009, 0.2473, 0.6159]}, {"w": "numerical", "b": [0.2535, 0.6009, 0.3321, 0.6159]}, {"w": "labels,", "b": [0.3382, 0.6009, 0.3892, 0.6159]}, {"w": "so", "b": [0.3953, 0.6009, 0.4118, 0.6159]}, {"w": "you", "b": [0.418, 0.6009, 0.4467, 0.6159]}, {"w": "typically", "b": [0.4529, 0.6009, 0.5222, 0.6159]}, {"w": "must", "b": [0.5283, 0.6009, 0.5679, 0.6159]}, {"w": "transform", "b": [0.5741, 0.6009, 0.6528, 0.6159]}, {"w": "your", "b": [0.659, 0.6009, 0.695, 0.6159]}, {"w": "labels", "b": [0.7011, 0.6009, 0.7469, 0.6159]}, {"w": "into", "b": [0.7531, 0.6009, 0.7844, 0.6159]}, {"w": "numerical", "b": [0.7905, 0.6009, 0.8691, 0.6159]}, {"w": "vectors.", "b": [0.1308, 0.6189, 0.1937, 0.6338]}, {"w": "Two", "b": [0.2081, 0.6189, 0.2426, 0.6338]}, {"w": "popular", "b": [0.2509, 0.6189, 0.3142, 0.6338]}, {"w": "ways", "b": [0.3224, 0.6189, 0.3618, 0.6338]}, {"w": "to", "b": [0.37, 0.6189, 0.3867, 0.6338]}, {"w": "do", "b": [0.3949, 0.6189, 0.4148, 0.6338]}, {"w": "that", "b": [0.423, 0.6189, 0.4576, 0.6338]}, {"w": "are", "b": [0.4658, 0.6189, 0.4909, 0.6338]}, {"w": "one-hot", "b": [0.4992, 0.6189, 0.5609, 0.6338]}, {"w": "encoding", "b": [0.5691, 0.6189, 0.6418, 0.6338]}, {"w": "(for", "b": [0.65, 0.6189, 0.6799, 0.6338]}, {"w": "binary", "b": [0.6881, 0.6189, 0.741, 0.6338]}, {"w": "and", "b": [0.7492, 0.6189, 0.7795, 0.6338]}, {"w": "multiclass", "b": [0.7878, 0.6189, 0.8691, 0.6338]}, {"w": "problems)", "b": [0.1312, 0.6368, 0.2114, 0.6518]}, {"w": "and", "b": [0.2175, 0.6368, 0.2473, 0.6518]}, {"w": "bag-of-words", "b": [0.2534, 0.6368, 0.3561, 0.6518]}, {"w": "(for", "b": [0.3622, 0.6368, 0.3915, 0.6518]}, {"w": "multi-label", "b": [0.3977, 0.6368, 0.4848, 0.6518]}, {"w": "problems).", "b": [0.491, 0.6368, 0.5762, 0.6518]}]}, {"id": "b_9", "type": "paragraph", "text": "To choose a machine learning algorithm that would work best for your problem, ask yourself the following questions:", "words": [{"w": "To", "b": [0.1306, 0.6637, 0.1512, 0.6787]}, {"w": "choose", "b": [0.1574, 0.6637, 0.209, 0.6787]}, {"w": "a", "b": [0.2151, 0.6637, 0.2242, 0.6787]}, {"w": "machine", "b": [0.2304, 0.6637, 0.2955, 0.6787]}, {"w": "learning", "b": [0.3017, 0.6637, 0.3653, 0.6787]}, {"w": "algorithm", "b": [0.3715, 0.6637, 0.4482, 0.6787]}, {"w": "that", "b": [0.4543, 0.6637, 0.4876, 0.6787]}, {"w": "would", "b": [0.4938, 0.6637, 0.5407, 0.6787]}, {"w": "work", "b": [0.5469, 0.6637, 0.5853, 0.6787]}, {"w": "best", "b": [0.5914, 0.6637, 0.6244, 0.6787]}, {"w": "for", "b": [0.6305, 0.6637, 0.6523, 0.6787]}, {"w": "your", "b": [0.6585, 0.6637, 0.6938, 0.6787]}, {"w": "problem,", "b": [0.7, 0.6637, 0.7697, 0.6787]}, {"w": "ask", "b": [0.7758, 0.6637, 0.8017, 0.6787]}, {"w": "yourself", "b": [0.8078, 0.6637, 0.8691, 0.6787]}, {"w": "the", "b": [0.1312, 0.6817, 0.1569, 0.6966]}, {"w": "following", "b": [0.163, 0.6817, 0.2348, 0.6966]}, {"w": "questions:", "b": [0.241, 0.6817, 0.3206, 0.6966]}]}, {"id": "b_10", "type": "paragraph", "text": "• Do the model’s predictions have to be explainable to a non-technical audience? If yes, you would prefer using less accurate, but more explainable algorithms, such as kNN, linear regression, and decision tree learning. • Can your dataset be fully loaded into the RAM of your laptop or server? If not, you would prefer incremental learning algorithms. • How many training examples do you have in your dataset, and how many features does each example have? Some algorithms, including those used for training neural networks and random forests, can handle a huge number of examples and millions of features. Others are relatively modest in their capacity.", "words": [{"w": "•", "b": [0.1538, 0.7086, 0.1681, 0.7236]}, {"w": "Do", "b": [0.1774, 0.7086, 0.2006, 0.7236]}, {"w": "the", "b": [0.2067, 0.7086, 0.2323, 0.7236]}, {"w": "model’s", "b": [0.2384, 0.7086, 0.2994, 0.7236]}, {"w": "predictions", "b": [0.3055, 0.7086, 0.3936, 0.7236]}, {"w": "have", "b": [0.3997, 0.7086, 0.436, 0.7236]}, {"w": "to", "b": [0.4422, 0.7086, 0.4585, 0.7236]}, {"w": "be", "b": [0.4646, 0.7086, 0.4836, 0.7236]}, {"w": "explainable", "b": [0.4897, 0.7086, 0.5802, 0.7236]}, {"w": "to", "b": [0.5863, 0.7086, 0.6027, 0.7236]}, {"w": "a", "b": [0.6088, 0.7086, 0.618, 0.7236]}, {"w": "non-technical", "b": [0.6241, 0.7086, 0.731, 0.7236]}, {"w": "audience?", "b": [0.7371, 0.7086, 0.8153, 0.7236]}, {"w": "If", "b": [0.8235, 0.7086, 0.8358, 0.7236]}, {"w": "yes,", "b": [0.8419, 0.7086, 0.8717, 0.7236]}, {"w": "you", "b": [0.1769, 0.7266, 0.2061, 0.7415]}, {"w": "would", "b": [0.2123, 0.7266, 0.2609, 0.7415]}, {"w": "prefer", "b": [0.267, 0.7266, 0.3147, 0.7415]}, {"w": "using", "b": [0.3208, 0.7266, 0.3638, 0.7415]}, {"w": "less", "b": [0.3699, 0.7266, 0.3984, 0.7415]}, {"w": "accurate,", "b": [0.4045, 0.7266, 0.4787, 0.7415]}, {"w": "but", "b": [0.4849, 0.7266, 0.5131, 0.7415]}, {"w": "more", "b": [0.5192, 0.7266, 0.56, 0.7415]}, {"w": "explainable", "b": [0.5662, 0.7266, 0.6587, 0.7415]}, {"w": "algorithms,", "b": [0.6648, 0.7266, 0.7569, 0.7415]}, {"w": "such", "b": [0.763, 0.7266, 0.7992, 0.7415]}, {"w": "as", "b": [0.8054, 0.7266, 0.8222, 0.7415]}, {"w": "kNN,", "b": [0.8283, 0.7266, 0.8717, 0.7415]}, {"w": "linear", "b": [0.1774, 0.7445, 0.2225, 0.7595]}, {"w": "regression,", "b": [0.2287, 0.7445, 0.3131, 0.7595]}, {"w": "and", "b": [0.3193, 0.7445, 0.349, 0.7595]}, {"w": "decision", "b": [0.3551, 0.7445, 0.4188, 0.7595]}, {"w": "tree", "b": [0.425, 0.7445, 0.4558, 0.7595]}, {"w": "learning.", "b": [0.462, 0.7445, 0.5317, 0.7595]}, {"w": "•", "b": [0.1538, 0.7625, 0.1681, 0.7774]}, {"w": "Can", "b": [0.1774, 0.7625, 0.2106, 0.7774]}, {"w": "your", "b": [0.2168, 0.7625, 0.2532, 0.7774]}, {"w": "dataset", "b": [0.2594, 0.7625, 0.3187, 0.7774]}, {"w": "be", "b": [0.3249, 0.7625, 0.3441, 0.7774]}, {"w": "fully", "b": [0.3503, 0.7625, 0.3867, 0.7774]}, {"w": "loaded", "b": [0.3928, 0.7625, 0.4458, 0.7774]}, {"w": "into", "b": [0.452, 0.7625, 0.4837, 0.7774]}, {"w": "the", "b": [0.4898, 0.7625, 0.5158, 0.7774]}, {"w": "RAM", "b": [0.522, 0.7625, 0.5669, 0.7774]}, {"w": "of", "b": [0.5731, 0.7625, 0.5881, 0.7774]}, {"w": "your", "b": [0.5943, 0.7625, 0.6307, 0.7774]}, {"w": "laptop", "b": [0.6369, 0.7625, 0.6889, 0.7774]}, {"w": "or", "b": [0.695, 0.7625, 0.7117, 0.7774]}, {"w": "server?", "b": [0.7178, 0.7625, 0.7747, 0.7774]}, {"w": "If", "b": [0.7829, 0.7625, 0.7954, 0.7774]}, {"w": "not,", "b": [0.8016, 0.7625, 0.8338, 0.7774]}, {"w": "you", "b": [0.8399, 0.7625, 0.8691, 0.7774]}, {"w": "would", "b": [0.1767, 0.7804, 0.2244, 0.7954]}, {"w": "prefer", "b": [0.2305, 0.7804, 0.2773, 0.7954]}, {"w": "incremental", "b": [0.2835, 0.7804, 0.3773, 0.7954]}, {"w": "learning", "b": [0.3835, 0.7804, 0.4482, 0.7954]}, {"w": "algorithms.", "b": [0.4543, 0.7804, 0.5447, 0.7954]}, {"w": "•", "b": [0.1538, 0.7983, 0.1681, 0.8133]}, {"w": "How", "b": [0.1774, 0.7983, 0.2125, 0.8133]}, {"w": "many", "b": [0.2184, 0.7983, 0.2616, 0.8133]}, {"w": "training", "b": [0.2675, 0.7983, 0.3298, 0.8133]}, {"w": "examples", "b": [0.3358, 0.7983, 0.4077, 0.8133]}, {"w": "do", "b": [0.4136, 0.7983, 0.4327, 0.8133]}, {"w": "you", "b": [0.4386, 0.7983, 0.4668, 0.8133]}, {"w": "have", "b": [0.4726, 0.7983, 0.5083, 0.8133]}, {"w": "in", "b": [0.5142, 0.7983, 0.5293, 0.8133]}, {"w": "your", "b": [0.5352, 0.7983, 0.5704, 0.8133]}, {"w": "dataset,", "b": [0.5763, 0.7983, 0.6387, 0.8133]}, {"w": "and", "b": [0.6447, 0.7983, 0.6738, 0.8133]}, {"w": "how", "b": [0.6797, 0.7983, 0.7114, 0.8133]}, {"w": "many", "b": [0.7173, 0.7983, 0.7604, 0.8133]}, {"w": "features", "b": [0.7664, 0.7983, 0.8283, 0.8133]}, {"w": "does", "b": [0.8342, 0.7983, 0.869, 0.8133]}, {"w": "each", "b": [0.1774, 0.8163, 0.212, 0.8313]}, {"w": "example", "b": [0.2177, 0.8163, 0.2825, 0.8313]}, {"w": "have?", "b": [0.2882, 0.8163, 0.3324, 0.8313]}, {"w": "Some", "b": [0.3405, 0.8163, 0.3827, 0.8313]}, {"w": "algorithms,", "b": [0.3883, 0.8163, 0.4769, 0.8313]}, {"w": "including", "b": [0.4827, 0.8163, 0.5551, 0.8313]}, {"w": "those", "b": [0.5607, 0.8163, 0.6021, 0.8313]}, {"w": "used", "b": [0.6078, 0.8163, 0.6431, 0.8313]}, {"w": "for", "b": [0.6487, 0.8163, 0.6704, 0.8313]}, {"w": "training", "b": [0.6761, 0.8163, 0.7384, 0.8313]}, {"w": "neural", "b": [0.7441, 0.8163, 0.7934, 0.8313]}, {"w": "networks", "b": [0.7991, 0.8163, 0.8691, 0.8313]}, {"w": "and", "b": [0.1774, 0.8342, 0.2077, 0.8492]}, {"w": "random", "b": [0.214, 0.8342, 0.2768, 0.8492]}, {"w": "forests,", "b": [0.2831, 0.8342, 0.3415, 0.8492]}, {"w": "can", "b": [0.3478, 0.8342, 0.376, 0.8492]}, {"w": "handle", "b": [0.3824, 0.8342, 0.4367, 0.8492]}, {"w": "a", "b": [0.4431, 0.8342, 0.4525, 0.8492]}, {"w": "huge", "b": [0.4588, 0.8342, 0.497, 0.8492]}, {"w": "number", "b": [0.5033, 0.8342, 0.5656, 0.8492]}, {"w": "of", "b": [0.5719, 0.8342, 0.5871, 0.8492]}, {"w": "examples", "b": [0.5934, 0.8342, 0.6683, 0.8492]}, {"w": "and", "b": [0.6746, 0.8342, 0.7049, 0.8492]}, {"w": "millions", "b": [0.7112, 0.8342, 0.7752, 0.8492]}, {"w": "of", "b": [0.7815, 0.8342, 0.7966, 0.8492]}, {"w": "features.", "b": [0.803, 0.8342, 0.8727, 0.8492]}, {"w": "Others", "b": [0.1774, 0.8522, 0.2319, 0.8671]}, {"w": "are", "b": [0.238, 0.8522, 0.2627, 0.8671]}, {"w": "relatively", "b": [0.2688, 0.8522, 0.3432, 0.8671]}, {"w": "modest", "b": [0.3494, 0.8522, 0.4074, 0.8671]}, {"w": "in", "b": [0.4136, 0.8522, 0.429, 0.8671]}, {"w": "their", "b": [0.4351, 0.8522, 0.4731, 0.8671]}, {"w": "capacity.", "b": [0.4793, 0.8522, 0.5495, 0.8671]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 36", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "36", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 175, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• Is your data linearly separable, or can it be modeled using a linear model? If yes, SVM with the linear kernel, linear and logistic regression, can be good choices. Otherwise, deep neural networks or ensemble models might work better. • How much time is a learning algorithm allowed to use to train a model? Neural networks are known to be slow to train. Simple algorithms like linear and logistic regression, or decision trees are much faster. • How fast must the scoring perform in production? Models like SVM, linear and logistic regression, as well as not very deep feedforward neural networks, are extremely fast at the prediction time. The scoring using deep and recurrent neural networks, as well as gradient boosting models, is slower.", "words": [{"w": "•", "b": [0.1538, 0.0881, 0.1681, 0.1031]}, {"w": "Is", "b": [0.1774, 0.0881, 0.191, 0.1031]}, {"w": "your", "b": [0.197, 0.0881, 0.2322, 0.1031]}, {"w": "data", "b": [0.2382, 0.0881, 0.2734, 0.1031]}, {"w": "linearly", "b": [0.2794, 0.0881, 0.3382, 0.1031]}, {"w": "separable,", "b": [0.3442, 0.0881, 0.4228, 0.1031]}, {"w": "or", "b": [0.4288, 0.0881, 0.4449, 0.1031]}, {"w": "can", "b": [0.4509, 0.0881, 0.4781, 0.1031]}, {"w": "it", "b": [0.4841, 0.0881, 0.4961, 0.1031]}, {"w": "be", "b": [0.5021, 0.0881, 0.5207, 0.1031]}, {"w": "modeled", "b": [0.5267, 0.0881, 0.5925, 0.1031]}, {"w": "using", "b": [0.5985, 0.0881, 0.6399, 0.1031]}, {"w": "a", "b": [0.6458, 0.0881, 0.6549, 0.1031]}, {"w": "linear", "b": [0.6609, 0.0881, 0.7052, 0.1031]}, {"w": "model?", "b": [0.7111, 0.0881, 0.7674, 0.1031]}, {"w": "If", "b": [0.7756, 0.0881, 0.7876, 0.1031]}, {"w": "yes,", "b": [0.7936, 0.0881, 0.8229, 0.1031]}, {"w": "SVM", "b": [0.8289, 0.0881, 0.8691, 0.1031]}, {"w": "with", "b": [0.1767, 0.106, 0.2132, 0.121]}, {"w": "the", "b": [0.2193, 0.106, 0.2454, 0.121]}, {"w": "linear", "b": [0.2515, 0.106, 0.2975, 0.121]}, {"w": "kernel,", "b": [0.3036, 0.106, 0.3579, 0.121]}, {"w": "linear", "b": [0.3641, 0.106, 0.41, 0.121]}, {"w": "and", "b": [0.4161, 0.106, 0.4464, 0.121]}, {"w": "logistic", "b": [0.4525, 0.106, 0.51, 0.121]}, {"w": "regression,", "b": [0.5161, 0.106, 0.602, 0.121]}, {"w": "can", "b": [0.6081, 0.106, 0.6363, 0.121]}, {"w": "be", "b": [0.6424, 0.106, 0.6617, 0.121]}, {"w": "good", "b": [0.6678, 0.106, 0.7074, 0.121]}, {"w": "choices.", "b": [0.7136, 0.106, 0.7758, 0.121]}, {"w": "Otherwise,", "b": [0.784, 0.106, 0.8717, 0.121]}, {"w": "deep", "b": [0.1774, 0.124, 0.2143, 0.1389]}, {"w": "neural", "b": [0.2204, 0.124, 0.2707, 0.1389]}, {"w": "networks", "b": [0.2769, 0.124, 0.3483, 0.1389]}, {"w": "or", "b": [0.3545, 0.124, 0.3709, 0.1389]}, {"w": "ensemble", "b": [0.3771, 0.124, 0.4495, 0.1389]}, {"w": "models", "b": [0.4556, 0.124, 0.5116, 0.1389]}, {"w": "might", "b": [0.5178, 0.124, 0.5644, 0.1389]}, {"w": "work", "b": [0.5706, 0.124, 0.6096, 0.1389]}, {"w": "better.", "b": [0.6157, 0.124, 0.6696, 0.1389]}, {"w": "•", "b": [0.1538, 0.1419, 0.1681, 0.1569]}, {"w": "How", "b": [0.1774, 0.1419, 0.2125, 0.1569]}, {"w": "much", "b": [0.2174, 0.1419, 0.2596, 0.1569]}, {"w": "time", "b": [0.2645, 0.1419, 0.2996, 0.1569]}, {"w": "is", "b": [0.3045, 0.1419, 0.3167, 0.1569]}, {"w": "a", "b": [0.3216, 0.1419, 0.3306, 0.1569]}, {"w": "learning", "b": [0.3355, 0.1419, 0.3989, 0.1569]}, {"w": "algorithm", "b": [0.4037, 0.1419, 0.4801, 0.1569]}, {"w": "allowed", "b": [0.485, 0.1419, 0.5433, 0.1569]}, {"w": "to", "b": [0.5482, 0.1419, 0.5643, 0.1569]}, {"w": "use", "b": [0.5691, 0.1419, 0.5944, 0.1569]}, {"w": "to", "b": [0.5993, 0.1419, 0.6153, 0.1569]}, {"w": "train", "b": [0.6202, 0.1419, 0.6585, 0.1569]}, {"w": "a", "b": [0.6633, 0.1419, 0.6724, 0.1569]}, {"w": "model?", "b": [0.6773, 0.1419, 0.7335, 0.1569]}, {"w": "Neural", "b": [0.7413, 0.1419, 0.7941, 0.1569]}, {"w": "networks", "b": [0.799, 0.1419, 0.869, 0.1569]}, {"w": "are", "b": [0.1774, 0.1599, 0.2019, 0.1748]}, {"w": "known", "b": [0.2081, 0.1599, 0.2601, 0.1748]}, {"w": "to", "b": [0.2662, 0.1599, 0.2825, 0.1748]}, {"w": "be", "b": [0.2887, 0.1599, 0.3076, 0.1748]}, {"w": "slow", "b": [0.3137, 0.1599, 0.348, 0.1748]}, {"w": "to", "b": [0.3542, 0.1599, 0.3705, 0.1748]}, {"w": "train.", "b": [0.3766, 0.1599, 0.4206, 0.1748]}, {"w": "Simple", "b": [0.4288, 0.1599, 0.4829, 0.1748]}, {"w": "algorithms", "b": [0.489, 0.1599, 0.5738, 0.1748]}, {"w": "like", "b": [0.58, 0.1599, 0.6075, 0.1748]}, {"w": "linear", "b": [0.6137, 0.1599, 0.6586, 0.1748]}, {"w": "and", "b": [0.6648, 0.1599, 0.6944, 0.1748]}, {"w": "logistic", "b": [0.7005, 0.1599, 0.7568, 0.1748]}, {"w": "regression,", "b": [0.7629, 0.1599, 0.8469, 0.1748]}, {"w": "or", "b": [0.8531, 0.1599, 0.8694, 0.1748]}, {"w": "decision", "b": [0.1774, 0.1778, 0.2411, 0.1928]}, {"w": "trees", "b": [0.2472, 0.1778, 0.2853, 0.1928]}, {"w": "are", "b": [0.2915, 0.1778, 0.3161, 0.1928]}, {"w": "much", "b": [0.3223, 0.1778, 0.3654, 0.1928]}, {"w": "faster.", "b": [0.3715, 0.1778, 0.4214, 0.1928]}, {"w": "•", "b": [0.1538, 0.1958, 0.1681, 0.2107]}, {"w": "How", "b": [0.1774, 0.1958, 0.2125, 0.2107]}, {"w": "fast", "b": [0.2184, 0.1958, 0.2471, 0.2107]}, {"w": "must", "b": [0.253, 0.1958, 0.2918, 0.2107]}, {"w": "the", "b": [0.2977, 0.1958, 0.3228, 0.2107]}, {"w": "scoring", "b": [0.3288, 0.1958, 0.3842, 0.2107]}, {"w": "perform", "b": [0.3901, 0.1958, 0.4525, 0.2107]}, {"w": "in", "b": [0.4584, 0.1958, 0.4735, 0.2107]}, {"w": "production?", "b": [0.4794, 0.1958, 0.5739, 0.2107]}, {"w": "Models", "b": [0.582, 0.1958, 0.6384, 0.2107]}, {"w": "like", "b": [0.6443, 0.1958, 0.6715, 0.2107]}, {"w": "SVM,", "b": [0.6773, 0.1958, 0.7226, 0.2107]}, {"w": "linear", "b": [0.7285, 0.1958, 0.7728, 0.2107]}, {"w": "and", "b": [0.7787, 0.1958, 0.8078, 0.2107]}, {"w": "logistic", "b": [0.8137, 0.1958, 0.8691, 0.2107]}, {"w": "regression,", "b": [0.1774, 0.2137, 0.2612, 0.2287]}, {"w": "as", "b": [0.2673, 0.2137, 0.2837, 0.2287]}, {"w": "well", "b": [0.2898, 0.2137, 0.3209, 0.2287]}, {"w": "as", "b": [0.327, 0.2137, 0.3434, 0.2287]}, {"w": "not", "b": [0.3495, 0.2137, 0.376, 0.2287]}, {"w": "very", "b": [0.3821, 0.2137, 0.4163, 0.2287]}, {"w": "deep", "b": [0.4224, 0.2137, 0.4591, 0.2287]}, {"w": "feedforward", "b": [0.4652, 0.2137, 0.5585, 0.2287]}, {"w": "neural", "b": [0.5646, 0.2137, 0.6146, 0.2287]}, {"w": "networks,", "b": [0.6207, 0.2137, 0.6967, 0.2287]}, {"w": "are", "b": [0.7029, 0.2137, 0.7274, 0.2287]}, {"w": "extremely", "b": [0.7335, 0.2137, 0.8119, 0.2287]}, {"w": "fast", "b": [0.8181, 0.2137, 0.8472, 0.2287]}, {"w": "at", "b": [0.8533, 0.2137, 0.8696, 0.2287]}, {"w": "the", "b": [0.1774, 0.2317, 0.203, 0.2466]}, {"w": "prediction", "b": [0.2092, 0.2317, 0.2902, 0.2466]}, {"w": "time.", "b": [0.2964, 0.2317, 0.3374, 0.2466]}, {"w": "The", "b": [0.3457, 0.2317, 0.3775, 0.2466]}, {"w": "scoring", "b": [0.3836, 0.2317, 0.4402, 0.2466]}, {"w": "using", "b": [0.4463, 0.2317, 0.4885, 0.2466]}, {"w": "deep", "b": [0.4947, 0.2317, 0.5316, 0.2466]}, {"w": "and", "b": [0.5378, 0.2317, 0.5675, 0.2466]}, {"w": "recurrent", "b": [0.5737, 0.2317, 0.6471, 0.2466]}, {"w": "neural", "b": [0.6533, 0.2317, 0.7036, 0.2466]}, {"w": "networks,", "b": [0.7098, 0.2317, 0.7863, 0.2466]}, {"w": "as", "b": [0.7925, 0.2317, 0.809, 0.2466]}, {"w": "well", "b": [0.8152, 0.2317, 0.8465, 0.2466]}, {"w": "as", "b": [0.8526, 0.2317, 0.8691, 0.2466]}, {"w": "gradient", "b": [0.1774, 0.2496, 0.2436, 0.2646]}, {"w": "boosting", "b": [0.2497, 0.2496, 0.3185, 0.2646]}, {"w": "models,", "b": [0.3247, 0.2496, 0.3858, 0.2646]}, {"w": "is", "b": [0.3919, 0.2496, 0.4043, 0.2646]}, {"w": "slower.", "b": [0.4105, 0.2496, 0.465, 0.2646]}]}, {"id": "b_1", "type": "paragraph", "text": "If you don’t want to guess the best algorithm for your problem, a recommended approach is to spot-check several algorithms, and then test them on the validation set as a hyperparameter.", "words": [{"w": "If", "b": [0.1312, 0.2765, 0.1433, 0.2915]}, {"w": "you", "b": [0.1484, 0.2765, 0.1766, 0.2915]}, {"w": "don’t", "b": [0.1817, 0.2765, 0.2229, 0.2915]}, {"w": "want", "b": [0.2281, 0.2765, 0.2662, 0.2915]}, {"w": "to", "b": [0.2713, 0.2765, 0.2874, 0.2915]}, {"w": "guess", "b": [0.2926, 0.2765, 0.334, 0.2915]}, {"w": "the", "b": [0.3391, 0.2765, 0.3643, 0.2915]}, {"w": "best", "b": [0.3694, 0.2765, 0.4022, 0.2915]}, {"w": "algorithm", "b": [0.4073, 0.2765, 0.4837, 0.2915]}, {"w": "for", "b": [0.4889, 0.2765, 0.5105, 0.2915]}, {"w": "your", "b": [0.5157, 0.2765, 0.5509, 0.2915]}, {"w": "problem,", "b": [0.556, 0.2765, 0.6254, 0.2915]}, {"w": "a", "b": [0.6307, 0.2765, 0.6398, 0.2915]}, {"w": "recommended", "b": [0.6449, 0.2765, 0.7535, 0.2915]}, {"w": "approach", "b": [0.7587, 0.2765, 0.8305, 0.2915]}, {"w": "is", "b": [0.8357, 0.2765, 0.8478, 0.2915]}, {"w": "to", "b": [0.853, 0.2765, 0.8691, 0.2915]}, {"w": "spot-check", "b": [0.1312, 0.2945, 0.2142, 0.3094]}, {"w": "several", "b": [0.2203, 0.2945, 0.274, 0.3094]}, {"w": "algorithms,", "b": [0.2802, 0.2945, 0.3692, 0.3094]}, {"w": "and", "b": [0.3753, 0.2945, 0.4046, 0.3094]}, {"w": "then", "b": [0.4108, 0.2945, 0.4461, 0.3094]}, {"w": "test", "b": [0.4523, 0.2945, 0.4817, 0.3094]}, {"w": "them", "b": [0.4878, 0.2945, 0.5282, 0.3094]}, {"w": "on", "b": [0.5344, 0.2945, 0.5536, 0.3094]}, {"w": "the", "b": [0.5597, 0.2945, 0.585, 0.3094]}, {"w": "validation", "b": [0.5911, 0.2945, 0.6694, 0.3094]}, {"w": "set", "b": [0.6755, 0.2945, 0.6979, 0.3094]}, {"w": "as", "b": [0.704, 0.2945, 0.7203, 0.3094]}, {"w": "a", "b": [0.7264, 0.2945, 0.7355, 0.3094]}, {"w": "hyperparameter.", "b": [0.7417, 0.2945, 0.8726, 0.3094]}]}, {"id": "b_2", "type": "paragraph", "text": "A typical way to know how good is the model, is to calculate the value of a performance metric on the holdout data. There are performance metrics defined for classification and regressions models, as well as for ranking models.", "words": [{"w": "A", "b": [0.1305, 0.3214, 0.1446, 0.3364]}, {"w": "typical", "b": [0.1514, 0.3214, 0.2068, 0.3364]}, {"w": "way", "b": [0.2136, 0.3214, 0.2455, 0.3364]}, {"w": "to", "b": [0.2522, 0.3214, 0.269, 0.3364]}, {"w": "know", "b": [0.2757, 0.3214, 0.3186, 0.3364]}, {"w": "how", "b": [0.3253, 0.3214, 0.3583, 0.3364]}, {"w": "good", "b": [0.365, 0.3214, 0.4047, 0.3364]}, {"w": "is", "b": [0.4115, 0.3214, 0.4242, 0.3364]}, {"w": "the", "b": [0.4309, 0.3214, 0.457, 0.3364]}, {"w": "model,", "b": [0.4638, 0.3214, 0.5187, 0.3364]}, {"w": "is", "b": [0.5256, 0.3214, 0.5382, 0.3364]}, {"w": "to", "b": [0.545, 0.3214, 0.5617, 0.3364]}, {"w": "calculate", "b": [0.5685, 0.3214, 0.6406, 0.3364]}, {"w": "the", "b": [0.6474, 0.3214, 0.6735, 0.3364]}, {"w": "value", "b": [0.6803, 0.3214, 0.7227, 0.3364]}, {"w": "of", "b": [0.7294, 0.3214, 0.7446, 0.3364]}, {"w": "a", "b": [0.7513, 0.3214, 0.7607, 0.3364]}, {"w": "performance", "b": [0.7675, 0.3214, 0.869, 0.3364]}, {"w": "metric", "b": [0.1312, 0.3394, 0.1836, 0.3543]}, {"w": "on", "b": [0.1904, 0.3394, 0.2103, 0.3543]}, {"w": "the", "b": [0.2171, 0.3394, 0.2432, 0.3543]}, {"w": "holdout", "b": [0.25, 0.3394, 0.3128, 0.3543]}, {"w": "data.", "b": [0.3196, 0.3394, 0.3614, 0.3543]}, {"w": "There", "b": [0.3716, 0.3394, 0.4198, 0.3543]}, {"w": "are", "b": [0.4266, 0.3394, 0.4517, 0.3543]}, {"w": "performance", "b": [0.4585, 0.3394, 0.5601, 0.3543]}, {"w": "metrics", "b": [0.5669, 0.3394, 0.6267, 0.3543]}, {"w": "defined", "b": [0.6335, 0.3394, 0.6921, 0.3543]}, {"w": "for", "b": [0.6989, 0.3394, 0.7214, 0.3543]}, {"w": "classification", "b": [0.7282, 0.3394, 0.832, 0.3543]}, {"w": "and", "b": [0.8388, 0.3394, 0.8691, 0.3543]}, {"w": "regressions", "b": [0.1312, 0.3573, 0.2178, 0.3723]}, {"w": "models,", "b": [0.224, 0.3573, 0.2851, 0.3723]}, {"w": "as", "b": [0.2912, 0.3573, 0.3077, 0.3723]}, {"w": "well", "b": [0.3139, 0.3573, 0.3452, 0.3723]}, {"w": "as", "b": [0.3513, 0.3573, 0.3678, 0.3723]}, {"w": "for", "b": [0.374, 0.3573, 0.3961, 0.3723]}, {"w": "ranking", "b": [0.4022, 0.3573, 0.4633, 0.3723]}, {"w": "models.", "b": [0.4694, 0.3573, 0.5305, 0.3723]}]}, {"id": "b_3", "type": "paragraph", "text": "Tweaking the values of hyperparameters controls two tradeoffs: precision-recall and bias- variance. By varying the complexity of the model, we can reach the so-called “zone of solutions,” a situation in which both bias and variance of the model are relatively low. The solution that optimizes the performance metric is usually found inside that zone.", "words": [{"w": "Tweaking", "b": [0.1306, 0.3842, 0.2085, 0.3992]}, {"w": "the", "b": [0.2155, 0.3842, 0.2417, 0.3992]}, {"w": "values", "b": [0.2487, 0.3842, 0.2985, 0.3992]}, {"w": "of", "b": [0.3056, 0.3842, 0.3207, 0.3992]}, {"w": "hyperparameters", "b": [0.3278, 0.3842, 0.4656, 0.3992]}, {"w": "controls", "b": [0.4726, 0.3842, 0.5371, 0.3992]}, {"w": "two", "b": [0.5441, 0.3842, 0.5734, 0.3992]}, {"w": "tradeoffs:", "b": [0.5804, 0.3842, 0.6564, 0.3992]}, {"w": "precision-recall", "b": [0.6664, 0.3842, 0.789, 0.3992]}, {"w": "and", "b": [0.796, 0.3842, 0.8264, 0.3992]}, {"w": "bias-", "b": [0.8334, 0.3842, 0.8722, 0.3992]}, {"w": "variance.", "b": [0.1308, 0.4022, 0.2035, 0.4171]}, {"w": "By", "b": [0.2175, 0.4022, 0.2408, 0.4171]}, {"w": "varying", "b": [0.2489, 0.4022, 0.3096, 0.4171]}, {"w": "the", "b": [0.3177, 0.4022, 0.3439, 0.4171]}, {"w": "complexity", "b": [0.3519, 0.4022, 0.4414, 0.4171]}, {"w": "of", "b": [0.4494, 0.4022, 0.4646, 0.4171]}, {"w": "the", "b": [0.4727, 0.4022, 0.4989, 0.4171]}, {"w": "model,", "b": [0.5069, 0.4022, 0.5618, 0.4171]}, {"w": "we", "b": [0.5704, 0.4022, 0.5918, 0.4171]}, {"w": "can", "b": [0.5999, 0.4022, 0.6282, 0.4171]}, {"w": "reach", "b": [0.6362, 0.4022, 0.6797, 0.4171]}, {"w": "the", "b": [0.6878, 0.4022, 0.714, 0.4171]}, {"w": "so-called", "b": [0.7221, 0.4022, 0.7923, 0.4171]}, {"w": "“zone", "b": [0.8003, 0.4022, 0.8458, 0.4171]}, {"w": "of", "b": [0.8539, 0.4022, 0.8691, 0.4171]}, {"w": "solutions,”", "b": [0.1312, 0.4201, 0.2159, 0.4351]}, {"w": "a", "b": [0.222, 0.4201, 0.2312, 0.4351]}, {"w": "situation", "b": [0.2374, 0.4201, 0.3081, 0.4351]}, {"w": "in", "b": [0.3143, 0.4201, 0.3297, 0.4351]}, {"w": "which", "b": [0.3358, 0.4201, 0.3824, 0.4351]}, {"w": "both", "b": [0.3885, 0.4201, 0.4259, 0.4351]}, {"w": "bias", "b": [0.4321, 0.4201, 0.4639, 0.4351]}, {"w": "and", "b": [0.4701, 0.4201, 0.4998, 0.4351]}, {"w": "variance", "b": [0.5059, 0.4201, 0.572, 0.4351]}, {"w": "of", "b": [0.5782, 0.4201, 0.593, 0.4351]}, {"w": "the", "b": [0.5992, 0.4201, 0.6247, 0.4351]}, {"w": "model", "b": [0.6309, 0.4201, 0.6795, 0.4351]}, {"w": "are", "b": [0.6857, 0.4201, 0.7103, 0.4351]}, {"w": "relatively", "b": [0.7165, 0.4201, 0.7907, 0.4351]}, {"w": "low.", "b": [0.7969, 0.4201, 0.8291, 0.4351]}, {"w": "The", "b": [0.8374, 0.4201, 0.8691, 0.4351]}, {"w": "solution", "b": [0.1312, 0.4381, 0.1949, 0.453]}, {"w": "that", "b": [0.2011, 0.4381, 0.2349, 0.453]}, {"w": "optimizes", "b": [0.241, 0.4381, 0.317, 0.453]}, {"w": "the", "b": [0.3232, 0.4381, 0.3488, 0.453]}, {"w": "performance", "b": [0.355, 0.4381, 0.4546, 0.453]}, {"w": "metric", "b": [0.4607, 0.4381, 0.512, 0.453]}, {"w": "is", "b": [0.5182, 0.4381, 0.5306, 0.453]}, {"w": "usually", "b": [0.5367, 0.4381, 0.5938, 0.453]}, {"w": "found", "b": [0.5999, 0.4381, 0.6456, 0.453]}, {"w": "inside", "b": [0.6517, 0.4381, 0.698, 0.453]}, {"w": "that", "b": [0.7041, 0.4381, 0.738, 0.453]}, {"w": "zone.", "b": [0.7441, 0.4381, 0.7851, 0.453]}]}, {"id": "b_4", "type": "paragraph", "text": "Regularization is an umbrella term for methods that force the learning algorithm to build a less complex model. In practice, that often leads to slightly higher bias, but significantly reduces the variance. Two popular techniques of regularization are L1 and L2. In addition, neural networks benefit from two other regularization techniques: dropout and batch normalization.", "words": [{"w": "Regularization", "b": [0.1312, 0.465, 0.2461, 0.4799]}, {"w": "is", "b": [0.2507, 0.465, 0.2628, 0.4799]}, {"w": "an", "b": [0.2674, 0.465, 0.2865, 0.4799]}, {"w": "umbrella", "b": [0.2911, 0.465, 0.3599, 0.4799]}, {"w": "term", "b": [0.3645, 0.465, 0.4017, 0.4799]}, {"w": "for", "b": [0.4063, 0.465, 0.428, 0.4799]}, {"w": "methods", "b": [0.4325, 0.465, 0.4995, 0.4799]}, {"w": "that", "b": [0.504, 0.465, 0.5372, 0.4799]}, {"w": "force", "b": [0.5418, 0.465, 0.5795, 0.4799]}, {"w": "the", "b": [0.5841, 0.465, 0.6092, 0.4799]}, {"w": "learning", "b": [0.6138, 0.465, 0.6772, 0.4799]}, {"w": "algorithm", "b": [0.6817, 0.465, 0.7581, 0.4799]}, {"w": "to", "b": [0.7627, 0.465, 0.7788, 0.4799]}, {"w": "build", "b": [0.7834, 0.465, 0.8236, 0.4799]}, {"w": "a", "b": [0.8281, 0.465, 0.8372, 0.4799]}, {"w": "less", "b": [0.8417, 0.465, 0.8691, 0.4799]}, {"w": "complex", "b": [0.1312, 0.4829, 0.1963, 0.4979]}, {"w": "model.", "b": [0.2025, 0.4829, 0.2555, 0.4979]}, {"w": "In", "b": [0.2637, 0.4829, 0.2804, 0.4979]}, {"w": "practice,", "b": [0.2865, 0.4829, 0.3542, 0.4979]}, {"w": "that", "b": [0.3604, 0.4829, 0.3937, 0.4979]}, {"w": "often", "b": [0.3999, 0.4829, 0.4397, 0.4979]}, {"w": "leads", "b": [0.4459, 0.4829, 0.4853, 0.4979]}, {"w": "to", "b": [0.4915, 0.4829, 0.5077, 0.4979]}, {"w": "slightly", "b": [0.5138, 0.4829, 0.5715, 0.4979]}, {"w": "higher", "b": [0.5776, 0.4829, 0.6271, 0.4979]}, {"w": "bias,", "b": [0.6333, 0.4829, 0.6697, 0.4979]}, {"w": "but", "b": [0.6759, 0.4829, 0.7031, 0.4979]}, {"w": "significantly", "b": [0.7093, 0.4829, 0.8043, 0.4979]}, {"w": "reduces", "b": [0.8105, 0.4829, 0.8692, 0.4979]}, {"w": "the", "b": [0.1312, 0.5009, 0.1573, 0.5158]}, {"w": "variance.", "b": [0.1635, 0.5009, 0.236, 0.5158]}, {"w": "Two", "b": [0.2442, 0.5009, 0.2786, 0.5158]}, {"w": "popular", "b": [0.2848, 0.5009, 0.3479, 0.5158]}, {"w": "techniques", "b": [0.3541, 0.5009, 0.4397, 0.5158]}, {"w": "of", "b": [0.4459, 0.5009, 0.461, 0.5158]}, {"w": "regularization", "b": [0.4671, 0.5009, 0.5799, 0.5158]}, {"w": "are", "b": [0.586, 0.5009, 0.6111, 0.5158]}, {"w": "L1", "b": [0.6173, 0.5009, 0.6384, 0.5158]}, {"w": "and", "b": [0.6445, 0.5009, 0.6748, 0.5158]}, {"w": "L2.", "b": [0.6809, 0.5009, 0.7072, 0.5158]}, {"w": "In", "b": [0.7154, 0.5009, 0.7326, 0.5158]}, {"w": "addition,", "b": [0.7388, 0.5009, 0.8118, 0.5158]}, {"w": "neural", "b": [0.8179, 0.5009, 0.8691, 0.5158]}, {"w": "networks", "b": [0.1312, 0.5188, 0.2015, 0.5338]}, {"w": "benefit", "b": [0.2076, 0.5188, 0.2616, 0.5338]}, {"w": "from", "b": [0.2678, 0.5188, 0.3046, 0.5338]}, {"w": "two", "b": [0.3108, 0.5188, 0.339, 0.5338]}, {"w": "other", "b": [0.3451, 0.5188, 0.3865, 0.5338]}, {"w": "regularization", "b": [0.3927, 0.5188, 0.5017, 0.5338]}, {"w": "techniques:", "b": [0.5079, 0.5188, 0.5958, 0.5338]}, {"w": "dropout", "b": [0.604, 0.5188, 0.6671, 0.5338]}, {"w": "and", "b": [0.6732, 0.5188, 0.7025, 0.5338]}, {"w": "batch", "b": [0.7086, 0.5188, 0.7525, 0.5338]}, {"w": "normalization.", "b": [0.7586, 0.5188, 0.8727, 0.5338]}]}, {"id": "b_5", "type": "paragraph", "text": "Most modern machine learning packages and frameworks support the notion of a pipeline. A pipeline is a sequence of transformations the training data undergoes before it becomes a model. In a pipeline, each stage applies some transformation to the input it receives. Every stage receives the output of the previous stage, except for the first stage. The first stage receives the training dataset as input. The pipeline can be saved to a file similar to saving a model. It can be deployed to production and used to generate predictions.", "words": [{"w": "Most", "b": [0.1312, 0.5457, 0.171, 0.5607]}, {"w": "modern", "b": [0.1772, 0.5457, 0.237, 0.5607]}, {"w": "machine", "b": [0.2431, 0.5457, 0.3079, 0.5607]}, {"w": "learning", "b": [0.3141, 0.5457, 0.3774, 0.5607]}, {"w": "packages", "b": [0.3835, 0.5457, 0.453, 0.5607]}, {"w": "and", "b": [0.4591, 0.5457, 0.4882, 0.5607]}, {"w": "frameworks", "b": [0.4944, 0.5457, 0.5845, 0.5607]}, {"w": "support", "b": [0.5906, 0.5457, 0.6516, 0.5607]}, {"w": "the", "b": [0.6577, 0.5457, 0.6828, 0.5607]}, {"w": "notion", "b": [0.689, 0.5457, 0.7392, 0.5607]}, {"w": "of", "b": [0.7453, 0.5457, 0.7599, 0.5607]}, {"w": "a", "b": [0.766, 0.5457, 0.7751, 0.5607]}, {"w": "pipeline.", "b": [0.7812, 0.5457, 0.848, 0.5607]}, {"w": "A", "b": [0.8562, 0.5457, 0.8698, 0.5607]}, {"w": "pipeline", "b": [0.1312, 0.5637, 0.1956, 0.5786]}, {"w": "is", "b": [0.2021, 0.5637, 0.2147, 0.5786]}, {"w": "a", "b": [0.2212, 0.5637, 0.2306, 0.5786]}, {"w": "sequence", "b": [0.2371, 0.5637, 0.3089, 0.5786]}, {"w": "of", "b": [0.3154, 0.5637, 0.3305, 0.5786]}, {"w": "transformations", "b": [0.337, 0.5637, 0.4665, 0.5786]}, {"w": "the", "b": [0.473, 0.5637, 0.4991, 0.5786]}, {"w": "training", "b": [0.5056, 0.5637, 0.5705, 0.5786]}, {"w": "data", "b": [0.577, 0.5637, 0.6136, 0.5786]}, {"w": "undergoes", "b": [0.6201, 0.5637, 0.7024, 0.5786]}, {"w": "before", "b": [0.7089, 0.5637, 0.7591, 0.5786]}, {"w": "it", "b": [0.7656, 0.5637, 0.7782, 0.5786]}, {"w": "becomes", "b": [0.7847, 0.5637, 0.8533, 0.5786]}, {"w": "a", "b": [0.8597, 0.5637, 0.8692, 0.5786]}, {"w": "model.", "b": [0.1312, 0.5816, 0.1849, 0.5966]}, {"w": "In", "b": [0.193, 0.5816, 0.2099, 0.5966]}, {"w": "a", "b": [0.216, 0.5816, 0.2252, 0.5966]}, {"w": "pipeline,", "b": [0.2313, 0.5816, 0.2993, 0.5966]}, {"w": "each", "b": [0.3054, 0.5816, 0.3407, 0.5966]}, {"w": "stage", "b": [0.3468, 0.5816, 0.3878, 0.5966]}, {"w": "applies", "b": [0.3939, 0.5816, 0.4492, 0.5966]}, {"w": "some", "b": [0.4553, 0.5816, 0.4952, 0.5966]}, {"w": "transformation", "b": [0.5014, 0.5816, 0.6206, 0.5966]}, {"w": "to", "b": [0.6267, 0.5816, 0.643, 0.5966]}, {"w": "the", "b": [0.6492, 0.5816, 0.6747, 0.5966]}, {"w": "input", "b": [0.6808, 0.5816, 0.7237, 0.5966]}, {"w": "it", "b": [0.7299, 0.5816, 0.7421, 0.5966]}, {"w": "receives.", "b": [0.7483, 0.5816, 0.8148, 0.5966]}, {"w": "Every", "b": [0.823, 0.5816, 0.8698, 0.5966]}, {"w": "stage", "b": [0.1312, 0.5996, 0.1732, 0.6145]}, {"w": "receives", "b": [0.18, 0.5996, 0.243, 0.6145]}, {"w": "the", "b": [0.2498, 0.5996, 0.2759, 0.6145]}, {"w": "output", "b": [0.2828, 0.5996, 0.3382, 0.6145]}, {"w": "of", "b": [0.345, 0.5996, 0.3602, 0.6145]}, {"w": "the", "b": [0.367, 0.5996, 0.3932, 0.6145]}, {"w": "previous", "b": [0.4, 0.5996, 0.4687, 0.6145]}, {"w": "stage,", "b": [0.4755, 0.5996, 0.5227, 0.6145]}, {"w": "except", "b": [0.5297, 0.5996, 0.5825, 0.6145]}, {"w": "for", "b": [0.5894, 0.5996, 0.6119, 0.6145]}, {"w": "the", "b": [0.6187, 0.5996, 0.6449, 0.6145]}, {"w": "first", "b": [0.6517, 0.5996, 0.6843, 0.6145]}, {"w": "stage.", "b": [0.6912, 0.5996, 0.7383, 0.6145]}, {"w": "The", "b": [0.7485, 0.5996, 0.781, 0.6145]}, {"w": "first", "b": [0.7878, 0.5996, 0.8204, 0.6145]}, {"w": "stage", "b": [0.8272, 0.5996, 0.8692, 0.6145]}, {"w": "receives", "b": [0.1312, 0.6175, 0.1922, 0.6325]}, {"w": "the", "b": [0.1983, 0.6175, 0.2237, 0.6325]}, {"w": "training", "b": [0.2298, 0.6175, 0.2927, 0.6325]}, {"w": "dataset", "b": [0.2988, 0.6175, 0.3567, 0.6325]}, {"w": "as", "b": [0.3628, 0.6175, 0.3791, 0.6325]}, {"w": "input.", "b": [0.3853, 0.6175, 0.4329, 0.6325]}, {"w": "The", "b": [0.4411, 0.6175, 0.4725, 0.6325]}, {"w": "pipeline", "b": [0.4786, 0.6175, 0.541, 0.6325]}, {"w": "can", "b": [0.5471, 0.6175, 0.5744, 0.6325]}, {"w": "be", "b": [0.5806, 0.6175, 0.5993, 0.6325]}, {"w": "saved", "b": [0.6055, 0.6175, 0.6486, 0.6325]}, {"w": "to", "b": [0.6548, 0.6175, 0.671, 0.6325]}, {"w": "a", "b": [0.6771, 0.6175, 0.6862, 0.6325]}, {"w": "file", "b": [0.6924, 0.6175, 0.7157, 0.6325]}, {"w": "similar", "b": [0.7218, 0.6175, 0.7757, 0.6325]}, {"w": "to", "b": [0.7818, 0.6175, 0.798, 0.6325]}, {"w": "saving", "b": [0.8041, 0.6175, 0.8539, 0.6325]}, {"w": "a", "b": [0.86, 0.6175, 0.8691, 0.6325]}, {"w": "model.", "b": [0.1312, 0.6355, 0.1851, 0.6504]}, {"w": "It", "b": [0.1933, 0.6355, 0.2071, 0.6504]}, {"w": "can", "b": [0.2132, 0.6355, 0.2409, 0.6504]}, {"w": "be", "b": [0.2471, 0.6355, 0.2661, 0.6504]}, {"w": "deployed", "b": [0.2722, 0.6355, 0.3425, 0.6504]}, {"w": "to", "b": [0.3486, 0.6355, 0.365, 0.6504]}, {"w": "production", "b": [0.3712, 0.6355, 0.4589, 0.6504]}, {"w": "and", "b": [0.4651, 0.6355, 0.4948, 0.6504]}, {"w": "used", "b": [0.501, 0.6355, 0.537, 0.6504]}, {"w": "to", "b": [0.5431, 0.6355, 0.5595, 0.6504]}, {"w": "generate", "b": [0.5657, 0.6355, 0.6334, 0.6504]}, {"w": "predictions.", "b": [0.6395, 0.6355, 0.733, 0.6504]}]}, {"id": "b_6", "type": "paragraph", "text": "Hyperparameters aren’t optimized by the learning algorithm itself. A data analyst must “tune” hyperparameters by experimenting with different combinations of values. Grid search", "words": [{"w": "Hyperparameters", "b": [0.1312, 0.6624, 0.2732, 0.6774]}, {"w": "aren’t", "b": [0.2803, 0.6624, 0.3284, 0.6774]}, {"w": "optimized", "b": [0.3355, 0.6624, 0.416, 0.6774]}, {"w": "by", "b": [0.423, 0.6624, 0.4429, 0.6774]}, {"w": "the", "b": [0.45, 0.6624, 0.4761, 0.6774]}, {"w": "learning", "b": [0.4832, 0.6624, 0.5491, 0.6774]}, {"w": "algorithm", "b": [0.5561, 0.6624, 0.6357, 0.6774]}, {"w": "itself.", "b": [0.6427, 0.6624, 0.6873, 0.6774]}, {"w": "A", "b": [0.6982, 0.6624, 0.7123, 0.6774]}, {"w": "data", "b": [0.7193, 0.6624, 0.7559, 0.6774]}, {"w": "analyst", "b": [0.763, 0.6624, 0.8222, 0.6774]}, {"w": "must", "b": [0.8292, 0.6624, 0.8696, 0.6774]}, {"w": "“tune”", "b": [0.1286, 0.6803, 0.1811, 0.6953]}, {"w": "hyperparameters", "b": [0.1873, 0.6803, 0.3204, 0.6953]}, {"w": "by", "b": [0.3266, 0.6803, 0.3458, 0.6953]}, {"w": "experimenting", "b": [0.3519, 0.6803, 0.4646, 0.6953]}, {"w": "with", "b": [0.4708, 0.6803, 0.5061, 0.6953]}, {"w": "different", "b": [0.5123, 0.6803, 0.578, 0.6953]}, {"w": "combinations", "b": [0.5842, 0.6803, 0.6888, 0.6953]}, {"w": "of", "b": [0.695, 0.6803, 0.7097, 0.6953]}, {"w": "values.", "b": [0.7158, 0.6803, 0.769, 0.6953]}, {"w": "Grid", "b": [0.7773, 0.6803, 0.8138, 0.6953]}, {"w": "search", "b": [0.82, 0.6803, 0.8691, 0.6953]}]}, {"id": "b_7", "type": "paragraph", "text": "is the simplest and the most widely used hyperparameter tuning technique. It consists of discretizing the values of hyperparameters, and trying all combinations of values by 1) training a model for each combination of hyperparameters, and 2) computing the performance metric by applying each trained model to the validation set.", "words": [{"w": "is", "b": [0.1312, 0.6983, 0.1439, 0.7132]}, {"w": "the", "b": [0.1503, 0.6983, 0.1765, 0.7132]}, {"w": "simplest", "b": [0.1829, 0.6983, 0.2501, 0.7132]}, {"w": "and", "b": [0.2565, 0.6983, 0.2868, 0.7132]}, {"w": "the", "b": [0.2933, 0.6983, 0.3194, 0.7132]}, {"w": "most", "b": [0.3259, 0.6983, 0.3657, 0.7132]}, {"w": "widely", "b": [0.3721, 0.6983, 0.4249, 0.7132]}, {"w": "used", "b": [0.4314, 0.6983, 0.4681, 0.7132]}, {"w": "hyperparameter", "b": [0.4746, 0.6983, 0.6049, 0.7132]}, {"w": "tuning", "b": [0.6114, 0.6983, 0.6647, 0.7132]}, {"w": "technique.", "b": [0.6711, 0.6983, 0.7549, 0.7132]}, {"w": "It", "b": [0.7639, 0.6983, 0.778, 0.7132]}, {"w": "consists", "b": [0.7845, 0.6983, 0.8476, 0.7132]}, {"w": "of", "b": [0.854, 0.6983, 0.8692, 0.7132]}, {"w": "discretizing", "b": [0.1312, 0.7162, 0.2209, 0.7312]}, {"w": "the", "b": [0.2257, 0.7162, 0.2508, 0.7312]}, {"w": "values", "b": [0.2557, 0.7162, 0.3035, 0.7312]}, {"w": "of", "b": [0.3083, 0.7162, 0.3229, 0.7312]}, {"w": "hyperparameters,", "b": [0.3278, 0.7162, 0.4652, 0.7312]}, {"w": "and", "b": [0.4703, 0.7162, 0.4995, 0.7312]}, {"w": "trying", "b": [0.5043, 0.7162, 0.5521, 0.7312]}, {"w": "all", "b": [0.557, 0.7162, 0.576, 0.7312]}, {"w": "combinations", "b": [0.5809, 0.7162, 0.685, 0.7312]}, {"w": "of", "b": [0.6898, 0.7162, 0.7044, 0.7312]}, {"w": "values", "b": [0.7093, 0.7162, 0.7571, 0.7312]}, {"w": "by", "b": [0.7619, 0.7162, 0.781, 0.7312]}, {"w": "1)", "b": [0.7859, 0.7162, 0.8019, 0.7312]}, {"w": "training", "b": [0.8068, 0.7162, 0.8691, 0.7312]}, {"w": "a", "b": [0.1312, 0.7342, 0.1403, 0.7491]}, {"w": "model", "b": [0.1465, 0.7342, 0.1942, 0.7491]}, {"w": "for", "b": [0.2004, 0.7342, 0.222, 0.7491]}, {"w": "each", "b": [0.2282, 0.7342, 0.2629, 0.7491]}, {"w": "combination", "b": [0.269, 0.7342, 0.366, 0.7491]}, {"w": "of", "b": [0.3722, 0.7342, 0.3867, 0.7491]}, {"w": "hyperparameters,", "b": [0.3929, 0.7342, 0.5304, 0.7491]}, {"w": "and", "b": [0.5366, 0.7342, 0.5657, 0.7491]}, {"w": "2)", "b": [0.5719, 0.7342, 0.5879, 0.7491]}, {"w": "computing", "b": [0.5941, 0.7342, 0.6775, 0.7491]}, {"w": "the", "b": [0.6837, 0.7342, 0.7088, 0.7491]}, {"w": "performance", "b": [0.715, 0.7342, 0.8126, 0.7491]}, {"w": "metric", "b": [0.8188, 0.7342, 0.8691, 0.7491]}, {"w": "by", "b": [0.1312, 0.7521, 0.1507, 0.7671]}, {"w": "applying", "b": [0.1569, 0.7521, 0.2261, 0.7671]}, {"w": "each", "b": [0.2322, 0.7521, 0.2676, 0.7671]}, {"w": "trained", "b": [0.2738, 0.7521, 0.3313, 0.7671]}, {"w": "model", "b": [0.3374, 0.7521, 0.3861, 0.7671]}, {"w": "to", "b": [0.3923, 0.7521, 0.4087, 0.7671]}, {"w": "the", "b": [0.4148, 0.7521, 0.4405, 0.7671]}, {"w": "validation", "b": [0.4466, 0.7521, 0.5261, 0.7671]}, {"w": "set.", "b": [0.5322, 0.7521, 0.56, 0.7671]}]}, {"id": "b_8", "type": "paragraph", "text": "A decent validation set contains at least a hundred examples, and each class in the set is represented by at least a couple of dozen examples. When you don’t have a decent validation set to tune your hyperparameters, you can use cross-validation.", "words": [{"w": "A", "b": [0.1305, 0.7791, 0.1446, 0.794]}, {"w": "decent", "b": [0.1513, 0.7791, 0.2041, 0.794]}, {"w": "validation", "b": [0.2108, 0.7791, 0.2918, 0.794]}, {"w": "set", "b": [0.2985, 0.7791, 0.3216, 0.794]}, {"w": "contains", "b": [0.3283, 0.7791, 0.3959, 0.794]}, {"w": "at", "b": [0.4025, 0.7791, 0.4192, 0.794]}, {"w": "least", "b": [0.4258, 0.7791, 0.4636, 0.794]}, {"w": "a", "b": [0.4703, 0.7791, 0.4797, 0.794]}, {"w": "hundred", "b": [0.4863, 0.7791, 0.5538, 0.794]}, {"w": "examples,", "b": [0.5605, 0.7791, 0.6406, 0.794]}, {"w": "and", "b": [0.6474, 0.7791, 0.6777, 0.794]}, {"w": "each", "b": [0.6844, 0.7791, 0.7204, 0.794]}, {"w": "class", "b": [0.7271, 0.7791, 0.765, 0.794]}, {"w": "in", "b": [0.7716, 0.7791, 0.7873, 0.794]}, {"w": "the", "b": [0.7939, 0.7791, 0.8201, 0.794]}, {"w": "set", "b": [0.8267, 0.7791, 0.8499, 0.794]}, {"w": "is", "b": [0.8565, 0.7791, 0.8692, 0.794]}, {"w": "represented", "b": [0.1312, 0.797, 0.2214, 0.812]}, {"w": "by", "b": [0.2273, 0.797, 0.2464, 0.812]}, {"w": "at", "b": [0.2523, 0.797, 0.2684, 0.812]}, {"w": "least", "b": [0.2743, 0.797, 0.3106, 0.812]}, {"w": "a", "b": [0.3165, 0.797, 0.3255, 0.812]}, {"w": "couple", "b": [0.3314, 0.797, 0.3817, 0.812]}, {"w": "of", "b": [0.3876, 0.797, 0.4022, 0.812]}, {"w": "dozen", "b": [0.4081, 0.797, 0.4533, 0.812]}, {"w": "examples.", "b": [0.4592, 0.797, 0.5362, 0.812]}, {"w": "When", "b": [0.5443, 0.797, 0.5911, 0.812]}, {"w": "you", "b": [0.597, 0.797, 0.6251, 0.812]}, {"w": "don’t", "b": [0.631, 0.797, 0.6722, 0.812]}, {"w": "have", "b": [0.6781, 0.797, 0.7138, 0.812]}, {"w": "a", "b": [0.7197, 0.797, 0.7287, 0.812]}, {"w": "decent", "b": [0.7346, 0.797, 0.7854, 0.812]}, {"w": "validation", "b": [0.7913, 0.797, 0.8691, 0.812]}, {"w": "set", "b": [0.1312, 0.8149, 0.1539, 0.8299]}, {"w": "to", "b": [0.1601, 0.8149, 0.1765, 0.8299]}, {"w": "tune", "b": [0.1826, 0.8149, 0.2185, 0.8299]}, {"w": "your", "b": [0.2247, 0.8149, 0.2606, 0.8299]}, {"w": "hyperparameters,", "b": [0.2667, 0.8149, 0.407, 0.8299]}, {"w": "you", "b": [0.4131, 0.8149, 0.4418, 0.8299]}, {"w": "can", "b": [0.448, 0.8149, 0.4757, 0.8299]}, {"w": "use", "b": [0.4818, 0.8149, 0.5076, 0.8299]}, {"w": "cross-validation.", "b": [0.5137, 0.8149, 0.6437, 0.8299]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 37", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "37", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 176, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 177, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 178, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "6 Supervised Model Training (Part 2)", "words": [{"w": "6", "b": [0.1312, 0.0845, 0.1462, 0.106]}, {"w": "Supervised", "b": [0.1761, 0.0845, 0.3187, 0.106]}, {"w": "Model", "b": [0.3287, 0.0845, 0.4114, 0.106]}, {"w": "Training", "b": [0.4213, 0.0845, 0.5311, 0.106]}, {"w": "(Part", "b": [0.5411, 0.0845, 0.6107, 0.106]}, {"w": "2)", "b": [0.6207, 0.0845, 0.6473, 0.106]}]}, {"id": "b_1", "type": "paragraph", "text": "In this second part of our conversation about supervised model training, we consider such topics as training deep models, stacking models, handling imbalanced datasets, distribution shift, model calibration, troubleshooting and error analysis, and other best practices.", "words": [{"w": "In", "b": [0.1312, 0.131, 0.1485, 0.146]}, {"w": "this", "b": [0.1546, 0.131, 0.185, 0.146]}, {"w": "second", "b": [0.1911, 0.131, 0.2455, 0.146]}, {"w": "part", "b": [0.2516, 0.131, 0.2861, 0.146]}, {"w": "of", "b": [0.2922, 0.131, 0.3074, 0.146]}, {"w": "our", "b": [0.3135, 0.131, 0.3407, 0.146]}, {"w": "conversation", "b": [0.3468, 0.131, 0.4488, 0.146]}, {"w": "about", "b": [0.4549, 0.131, 0.5024, 0.146]}, {"w": "supervised", "b": [0.5085, 0.131, 0.5944, 0.146]}, {"w": "model", "b": [0.6006, 0.131, 0.6501, 0.146]}, {"w": "training,", "b": [0.6562, 0.131, 0.7262, 0.146]}, {"w": "we", "b": [0.7324, 0.131, 0.7538, 0.146]}, {"w": "consider", "b": [0.7599, 0.131, 0.8269, 0.146]}, {"w": "such", "b": [0.833, 0.131, 0.8692, 0.146]}, {"w": "topics", "b": [0.1312, 0.149, 0.1784, 0.1639]}, {"w": "as", "b": [0.1845, 0.149, 0.201, 0.1639]}, {"w": "training", "b": [0.2072, 0.149, 0.2706, 0.1639]}, {"w": "deep", "b": [0.2768, 0.149, 0.3136, 0.1639]}, {"w": "models,", "b": [0.3198, 0.149, 0.3807, 0.1639]}, {"w": "stacking", "b": [0.3869, 0.149, 0.4524, 0.1639]}, {"w": "models,", "b": [0.4586, 0.149, 0.5195, 0.1639]}, {"w": "handling", "b": [0.5257, 0.149, 0.5952, 0.1639]}, {"w": "imbalanced", "b": [0.6013, 0.149, 0.6918, 0.1639]}, {"w": "datasets,", "b": [0.698, 0.149, 0.7687, 0.1639]}, {"w": "distribution", "b": [0.7749, 0.149, 0.8691, 0.1639]}, {"w": "shift,", "b": [0.1312, 0.1669, 0.1719, 0.1819]}, {"w": "model", "b": [0.178, 0.1669, 0.2267, 0.1819]}, {"w": "calibration,", "b": [0.2329, 0.1669, 0.3242, 0.1819]}, {"w": "troubleshooting", "b": [0.3303, 0.1669, 0.4561, 0.1819]}, {"w": "and", "b": [0.4622, 0.1669, 0.492, 0.1819]}, {"w": "error", "b": [0.4981, 0.1669, 0.5373, 0.1819]}, {"w": "analysis,", "b": [0.5434, 0.1669, 0.6118, 0.1819]}, {"w": "and", "b": [0.618, 0.1669, 0.6477, 0.1819]}, {"w": "other", "b": [0.6539, 0.1669, 0.696, 0.1819]}, {"w": "best", "b": [0.7021, 0.1669, 0.7356, 0.1819]}, {"w": "practices.", "b": [0.7417, 0.1669, 0.8178, 0.1819]}]}, {"id": "b_2", "type": "paragraph", "text": "Compared to shallow models, the model training strategy for deep neural networks has more moving parts. On the other hand, it’s more principled and better amenable to automation.", "words": [{"w": "Compared", "b": [0.1312, 0.1938, 0.2127, 0.2088]}, {"w": "to", "b": [0.2189, 0.1938, 0.235, 0.2088]}, {"w": "shallow", "b": [0.2412, 0.1938, 0.2991, 0.2088]}, {"w": "models,", "b": [0.3053, 0.1938, 0.3652, 0.2088]}, {"w": "the", "b": [0.3714, 0.1938, 0.3965, 0.2088]}, {"w": "model", "b": [0.4027, 0.1938, 0.4505, 0.2088]}, {"w": "training", "b": [0.4566, 0.1938, 0.5191, 0.2088]}, {"w": "strategy", "b": [0.5252, 0.1938, 0.5893, 0.2088]}, {"w": "for", "b": [0.5954, 0.1938, 0.6171, 0.2088]}, {"w": "deep", "b": [0.6232, 0.1938, 0.6595, 0.2088]}, {"w": "neural", "b": [0.6657, 0.1938, 0.715, 0.2088]}, {"w": "networks", "b": [0.7212, 0.1938, 0.7912, 0.2088]}, {"w": "has", "b": [0.7974, 0.1938, 0.8236, 0.2088]}, {"w": "more", "b": [0.8298, 0.1938, 0.8691, 0.2088]}, {"w": "moving", "b": [0.1312, 0.2118, 0.1897, 0.2267]}, {"w": "parts.", "b": [0.1958, 0.2118, 0.2421, 0.2267]}, {"w": "On", "b": [0.2503, 0.2118, 0.2749, 0.2267]}, {"w": "the", "b": [0.2811, 0.2118, 0.3067, 0.2267]}, {"w": "other", "b": [0.3129, 0.2118, 0.355, 0.2267]}, {"w": "hand,", "b": [0.3611, 0.2118, 0.4062, 0.2267]}, {"w": "it’s", "b": [0.4124, 0.2118, 0.4371, 0.2267]}, {"w": "more", "b": [0.4433, 0.2118, 0.4833, 0.2267]}, {"w": "principled", "b": [0.4894, 0.2118, 0.5695, 0.2267]}, {"w": "and", "b": [0.5757, 0.2118, 0.6054, 0.2267]}, {"w": "better", "b": [0.6115, 0.2118, 0.6603, 0.2267]}, {"w": "amenable", "b": [0.6665, 0.2118, 0.7423, 0.2267]}, {"w": "to", "b": [0.7485, 0.2118, 0.7649, 0.2267]}, {"w": "automation.", "b": [0.7711, 0.2118, 0.8684, 0.2267]}]}, {"id": "b_3", "type": "paragraph", "text": "6.1 Deep Model Training Strategy", "words": [{"w": "6.1", "b": [0.1312, 0.2606, 0.1631, 0.2786]}, {"w": "Deep", "b": [0.188, 0.2606, 0.2436, 0.2786]}, {"w": "Model", "b": [0.2519, 0.2606, 0.3208, 0.2786]}, {"w": "Training", "b": [0.3291, 0.2606, 0.4207, 0.2786]}, {"w": "Strategy", "b": [0.429, 0.2606, 0.5215, 0.2786]}]}, {"id": "b_4", "type": "paragraph", "text": "Model training starts with shortlisting several network architectures, also known as network topologies. If you work with image data and you want to build your model from scratch, then a convolutional neural network (CNN) with at least one convolutional layer, followed by a max-pooling layer, and one fully connected layer may be your default topology choice.", "words": [{"w": "Model", "b": [0.1312, 0.2992, 0.1805, 0.3142]}, {"w": "training", "b": [0.1862, 0.2992, 0.2486, 0.3142]}, {"w": "starts", "b": [0.2543, 0.2992, 0.2988, 0.3142]}, {"w": "with", "b": [0.3046, 0.2992, 0.3397, 0.3142]}, {"w": "shortlisting", "b": [0.3455, 0.2992, 0.4342, 0.3142]}, {"w": "several", "b": [0.4399, 0.2992, 0.4933, 0.3142]}, {"w": "network", "b": [0.4991, 0.2992, 0.5619, 0.3142]}, {"w": "architectures,", "b": [0.5677, 0.2992, 0.6739, 0.3142]}, {"w": "also", "b": [0.6797, 0.2992, 0.71, 0.3142]}, {"w": "known", "b": [0.7157, 0.2992, 0.767, 0.3142]}, {"w": "as", "b": [0.7727, 0.2992, 0.7889, 0.3142]}, {"w": "network", "b": [0.7943, 0.2995, 0.8688, 0.3145]}, {"w": "topologies.", "b": [0.1312, 0.3172, 0.2294, 0.3324]}, {"w": "If", "b": [0.2376, 0.3172, 0.2501, 0.3321]}, {"w": "you", "b": [0.2563, 0.3172, 0.2855, 0.3321]}, {"w": "work", "b": [0.2917, 0.3172, 0.3314, 0.3321]}, {"w": "with", "b": [0.3375, 0.3172, 0.374, 0.3321]}, {"w": "image", "b": [0.3802, 0.3172, 0.4282, 0.3321]}, {"w": "data", "b": [0.4344, 0.3172, 0.4709, 0.3321]}, {"w": "and", "b": [0.477, 0.3172, 0.5073, 0.3321]}, {"w": "you", "b": [0.5135, 0.3172, 0.5427, 0.3321]}, {"w": "want", "b": [0.5488, 0.3172, 0.5885, 0.3321]}, {"w": "to", "b": [0.5947, 0.3172, 0.6114, 0.3321]}, {"w": "build", "b": [0.6175, 0.3172, 0.6593, 0.3321]}, {"w": "your", "b": [0.6654, 0.3172, 0.702, 0.3321]}, {"w": "model", "b": [0.7082, 0.3172, 0.7578, 0.3321]}, {"w": "from", "b": [0.7639, 0.3172, 0.802, 0.3321]}, {"w": "scratch,", "b": [0.8082, 0.3172, 0.8715, 0.3321]}, {"w": "then", "b": [0.1312, 0.3351, 0.1679, 0.3501]}, {"w": "a", "b": [0.1757, 0.3351, 0.1851, 0.3501]}, {"w": "convolutional", "b": [0.1931, 0.3354, 0.316, 0.3504]}, {"w": "neural", "b": [0.325, 0.3354, 0.3833, 0.3504]}, {"w": "network", "b": [0.3923, 0.3354, 0.4667, 0.3504]}, {"w": "(CNN)", "b": [0.4746, 0.3351, 0.5311, 0.3501]}, {"w": "with", "b": [0.5389, 0.3351, 0.5755, 0.3501]}, {"w": "at", "b": [0.5834, 0.3351, 0.6001, 0.3501]}, {"w": "least", "b": [0.6079, 0.3351, 0.6457, 0.3501]}, {"w": "one", "b": [0.6535, 0.3351, 0.6818, 0.3501]}, {"w": "convolutional", "b": [0.6895, 0.3354, 0.8124, 0.3504]}, {"w": "layer,", "b": [0.8214, 0.3351, 0.8713, 0.3504]}, {"w": "followed", "b": [0.1312, 0.353, 0.1977, 0.368]}, {"w": "by", "b": [0.2046, 0.353, 0.2245, 0.368]}, {"w": "a", "b": [0.2314, 0.353, 0.2408, 0.368]}, {"w": "max-pooling", "b": [0.2478, 0.3534, 0.3625, 0.3683]}, {"w": "layer,", "b": [0.3704, 0.353, 0.4203, 0.3683]}, {"w": "and", "b": [0.4274, 0.353, 0.4578, 0.368]}, {"w": "one", "b": [0.4647, 0.353, 0.4929, 0.368]}, {"w": "fully", "b": [0.4998, 0.3534, 0.5411, 0.3683]}, {"w": "connected", "b": [0.549, 0.3534, 0.6415, 0.3683]}, {"w": "layer", "b": [0.6495, 0.3534, 0.6942, 0.3683]}, {"w": "may", "b": [0.7011, 0.353, 0.7356, 0.368]}, {"w": "be", "b": [0.7425, 0.353, 0.7618, 0.368]}, {"w": "your", "b": [0.7687, 0.353, 0.8054, 0.368]}, {"w": "default", "b": [0.8123, 0.353, 0.8693, 0.368]}, {"w": "topology", "b": [0.1312, 0.371, 0.201, 0.3859]}, {"w": "choice.", "b": [0.2071, 0.371, 0.261, 0.3859]}]}, {"id": "b_5", "type": "paragraph", "text": "If you work with text or other sequence data, such as time series, you have a choice between a CNN, a gated recurrent neural network (such as Long Short Term Memory, LSTM, or gated recurrent units, GRU), or a Transformer.", "words": [{"w": "If", "b": [0.1312, 0.3979, 0.1434, 0.4129]}, {"w": "you", "b": [0.1495, 0.3979, 0.1778, 0.4129]}, {"w": "work", "b": [0.184, 0.3979, 0.2224, 0.4129]}, {"w": "with", "b": [0.2285, 0.3979, 0.2639, 0.4129]}, {"w": "text", "b": [0.2701, 0.3979, 0.3019, 0.4129]}, {"w": "or", "b": [0.3081, 0.3979, 0.3243, 0.4129]}, {"w": "other", "b": [0.3304, 0.3979, 0.3719, 0.4129]}, {"w": "sequence", "b": [0.3781, 0.3979, 0.4474, 0.4129]}, {"w": "data,", "b": [0.4536, 0.3979, 0.494, 0.4129]}, {"w": "such", "b": [0.5001, 0.3979, 0.5351, 0.4129]}, {"w": "as", "b": [0.5412, 0.3979, 0.5575, 0.4129]}, {"w": "time", "b": [0.5637, 0.3979, 0.599, 0.4129]}, {"w": "series,", "b": [0.6052, 0.3979, 0.6529, 0.4129]}, {"w": "you", "b": [0.6591, 0.3979, 0.6874, 0.4129]}, {"w": "have", "b": [0.6936, 0.3979, 0.7294, 0.4129]}, {"w": "a", "b": [0.7356, 0.3979, 0.7447, 0.4129]}, {"w": "choice", "b": [0.7508, 0.3979, 0.7988, 0.4129]}, {"w": "between", "b": [0.805, 0.3979, 0.8691, 0.4129]}, {"w": "a", "b": [0.1312, 0.4159, 0.1405, 0.4308]}, {"w": "CNN,", "b": [0.1466, 0.4159, 0.1928, 0.4308]}, {"w": "a", "b": [0.1989, 0.4159, 0.2082, 0.4308]}, {"w": "gated", "b": [0.2145, 0.4162, 0.2652, 0.4311]}, {"w": "recurrent", "b": [0.2723, 0.4162, 0.3586, 0.4311]}, {"w": "neural", "b": [0.3657, 0.4162, 0.4239, 0.4311]}, {"w": "network", "b": [0.431, 0.4162, 0.5055, 0.4311]}, {"w": "(such", "b": [0.5117, 0.4159, 0.5544, 0.4308]}, {"w": "as", "b": [0.5606, 0.4159, 0.5771, 0.4308]}, {"w": "Long", "b": [0.5833, 0.4159, 0.6235, 0.4308]}, {"w": "Short", "b": [0.6297, 0.4159, 0.6739, 0.4308]}, {"w": "Term", "b": [0.68, 0.4159, 0.7227, 0.4308]}, {"w": "Memory,", "b": [0.7288, 0.4159, 0.8007, 0.4308]}, {"w": "LSTM,", "b": [0.8068, 0.4159, 0.8713, 0.4311]}, {"w": "or", "b": [0.1312, 0.4338, 0.1477, 0.4488]}, {"w": "gated", "b": [0.1538, 0.4338, 0.1979, 0.4488]}, {"w": "recurrent", "b": [0.2041, 0.4338, 0.2776, 0.4488]}, {"w": "units,", "b": [0.2837, 0.4338, 0.329, 0.4488]}, {"w": "GRU),", "b": [0.335, 0.4338, 0.3956, 0.4491]}, {"w": "or", "b": [0.4018, 0.4338, 0.4182, 0.4488]}, {"w": "a", "b": [0.4244, 0.4338, 0.4336, 0.4488]}, {"w": "Transformer.", "b": [0.4399, 0.4338, 0.5592, 0.4491]}]}, {"id": "b_6", "type": "paragraph", "text": "Instead of training your model from scratch, you can also start with a pre-trained model. Companies like Google and Microsoft have trained very deep neural networks with architec- tures optimized for image or natural language processing tasks.", "words": [{"w": "Instead", "b": [0.1312, 0.4607, 0.1899, 0.4757]}, {"w": "of", "b": [0.196, 0.4607, 0.2108, 0.4757]}, {"w": "training", "b": [0.217, 0.4607, 0.2801, 0.4757]}, {"w": "your", "b": [0.2863, 0.4607, 0.322, 0.4757]}, {"w": "model", "b": [0.3281, 0.4607, 0.3765, 0.4757]}, {"w": "from", "b": [0.3826, 0.4607, 0.4198, 0.4757]}, {"w": "scratch,", "b": [0.426, 0.4607, 0.4878, 0.4757]}, {"w": "you", "b": [0.4939, 0.4607, 0.5224, 0.4757]}, {"w": "can", "b": [0.5286, 0.4607, 0.5561, 0.4757]}, {"w": "also", "b": [0.5622, 0.4607, 0.5929, 0.4757]}, {"w": "start", "b": [0.599, 0.4607, 0.6369, 0.4757]}, {"w": "with", "b": [0.643, 0.4607, 0.6786, 0.4757]}, {"w": "a", "b": [0.6848, 0.4607, 0.6939, 0.4757]}, {"w": "pre-trained", "b": [0.7001, 0.461, 0.8039, 0.476]}, {"w": "model.", "b": [0.811, 0.4607, 0.8724, 0.476]}, {"w": "Companies", "b": [0.1312, 0.4787, 0.2192, 0.4936]}, {"w": "like", "b": [0.2253, 0.4787, 0.2529, 0.4936]}, {"w": "Google", "b": [0.259, 0.4787, 0.3148, 0.4936]}, {"w": "and", "b": [0.321, 0.4787, 0.3506, 0.4936]}, {"w": "Microsoft", "b": [0.3567, 0.4787, 0.4325, 0.4936]}, {"w": "have", "b": [0.4386, 0.4787, 0.4749, 0.4936]}, {"w": "trained", "b": [0.481, 0.4787, 0.5383, 0.4936]}, {"w": "very", "b": [0.5444, 0.4787, 0.5787, 0.4936]}, {"w": "deep", "b": [0.5849, 0.4787, 0.6216, 0.4936]}, {"w": "neural", "b": [0.6278, 0.4787, 0.6779, 0.4936]}, {"w": "networks", "b": [0.684, 0.4787, 0.7552, 0.4936]}, {"w": "with", "b": [0.7613, 0.4787, 0.797, 0.4936]}, {"w": "architec-", "b": [0.8032, 0.4787, 0.8722, 0.4936]}, {"w": "tures", "b": [0.1312, 0.4966, 0.1714, 0.5116]}, {"w": "optimized", "b": [0.1775, 0.4966, 0.2565, 0.5116]}, {"w": "for", "b": [0.2626, 0.4966, 0.2847, 0.5116]}, {"w": "image", "b": [0.2909, 0.4966, 0.3381, 0.5116]}, {"w": "or", "b": [0.3442, 0.4966, 0.3607, 0.5116]}, {"w": "natural", "b": [0.3668, 0.4966, 0.4253, 0.5116]}, {"w": "language", "b": [0.4315, 0.4966, 0.5022, 0.5116]}, {"w": "processing", "b": [0.5084, 0.4966, 0.5912, 0.5116]}, {"w": "tasks.", "b": [0.5973, 0.4966, 0.6432, 0.5116]}]}, {"id": "b_7", "type": "paragraph", "text": "Among the most used pre-trained models for image processing tasks are VGG16 and VGG19 (based on the Visual Geometry Group, VGG, architecture), InceptionV3 (based on the", "words": [{"w": "Among", "b": [0.1305, 0.5235, 0.1873, 0.5385]}, {"w": "the", "b": [0.1918, 0.5235, 0.2169, 0.5385]}, {"w": "most", "b": [0.2214, 0.5235, 0.2597, 0.5385]}, {"w": "used", "b": [0.2641, 0.5235, 0.2994, 0.5385]}, {"w": "pre-trained", "b": [0.3039, 0.5235, 0.3915, 0.5385]}, {"w": "models", "b": [0.396, 0.5235, 0.4508, 0.5385]}, {"w": "for", "b": [0.4553, 0.5235, 0.477, 0.5385]}, {"w": "image", "b": [0.4815, 0.5235, 0.5277, 0.5385]}, {"w": "processing", "b": [0.5322, 0.5235, 0.6133, 0.5385]}, {"w": "tasks", "b": [0.6178, 0.5235, 0.6577, 0.5385]}, {"w": "are", "b": [0.6622, 0.5235, 0.6864, 0.5385]}, {"w": "VGG16", "b": [0.6906, 0.5238, 0.7606, 0.5388]}, {"w": "and", "b": [0.7651, 0.5235, 0.7943, 0.5385]}, {"w": "VGG19", "b": [0.7987, 0.5238, 0.8688, 0.5388]}, {"w": "(based", "b": [0.1291, 0.5415, 0.1825, 0.5564]}, {"w": "on", "b": [0.1892, 0.5415, 0.2091, 0.5564]}, {"w": "the", "b": [0.2157, 0.5415, 0.2419, 0.5564]}, {"w": "Visual", "b": [0.2485, 0.5415, 0.3004, 0.5564]}, {"w": "Geometry", "b": [0.3071, 0.5415, 0.3883, 0.5564]}, {"w": "Group,", "b": [0.3949, 0.5415, 0.4527, 0.5564]}, {"w": "VGG,", "b": [0.4593, 0.5415, 0.5133, 0.5567]}, {"w": "architecture),", "b": [0.52, 0.5415, 0.6305, 0.5564]}, {"w": "InceptionV3", "b": [0.6372, 0.5418, 0.7494, 0.5567]}, {"w": "(based", "b": [0.756, 0.5415, 0.8095, 0.5564]}, {"w": "on", "b": [0.8161, 0.5415, 0.836, 0.5564]}, {"w": "the", "b": [0.8427, 0.5415, 0.8688, 0.5564]}]}, {"id": "b_8", "type": "paragraph", "text": "GoogLeNet architecture), and ResNet50 (based on the residual network architecture).", "words": [{"w": "GoogLeNet", "b": [0.1312, 0.5597, 0.2374, 0.5747]}, {"w": "architecture),", "b": [0.2435, 0.5594, 0.3512, 0.5744]}, {"w": "and", "b": [0.3574, 0.5594, 0.3869, 0.5744]}, {"w": "ResNet50", "b": [0.393, 0.5597, 0.4828, 0.5747]}, {"w": "(based", "b": [0.4889, 0.5594, 0.541, 0.5744]}, {"w": "on", "b": [0.5472, 0.5594, 0.5665, 0.5744]}, {"w": "the", "b": [0.5727, 0.5594, 0.5982, 0.5744]}, {"w": "residual", "b": [0.6043, 0.5597, 0.6768, 0.5747]}, {"w": "network", "b": [0.6839, 0.5597, 0.7583, 0.5747]}, {"w": "architecture).", "b": [0.7646, 0.5594, 0.8723, 0.5744]}]}, {"id": "b_9", "type": "paragraph", "text": "For natural language text processing, such pre-trained models as Bi-directional Encoder Representations from Transformer, BERT, (based on the Transformer architecture) and Em- beddings from Language Models, ELMo (based on the bi-directional LSTM architecture) often improve the quality of the model, compared to training a model from scratch.", "words": [{"w": "For", "b": [0.1312, 0.5864, 0.1588, 0.6013]}, {"w": "natural", "b": [0.1663, 0.5864, 0.2259, 0.6013]}, {"w": "language", "b": [0.2335, 0.5864, 0.3056, 0.6013]}, {"w": "text", "b": [0.3131, 0.5864, 0.3461, 0.6013]}, {"w": "processing,", "b": [0.3536, 0.5864, 0.4433, 0.6013]}, {"w": "such", "b": [0.4512, 0.5864, 0.4874, 0.6013]}, {"w": "pre-trained", "b": [0.4949, 0.5864, 0.586, 0.6013]}, {"w": "models", "b": [0.5935, 0.5864, 0.6506, 0.6013]}, {"w": "as", "b": [0.6581, 0.5864, 0.675, 0.6013]}, {"w": "Bi-directional", "b": [0.6825, 0.5864, 0.7942, 0.6013]}, {"w": "Encoder", "b": [0.8017, 0.5864, 0.8695, 0.6013]}, {"w": "Representations", "b": [0.1312, 0.6043, 0.2569, 0.6193]}, {"w": "from", "b": [0.2627, 0.6043, 0.2994, 0.6193]}, {"w": "Transformer,", "b": [0.3052, 0.6043, 0.4069, 0.6193]}, {"w": "BERT,", "b": [0.4126, 0.6043, 0.4756, 0.6196]}, {"w": "(based", "b": [0.4814, 0.6043, 0.5327, 0.6193]}, {"w": "on", "b": [0.5385, 0.6043, 0.5576, 0.6193]}, {"w": "the", "b": [0.5634, 0.6043, 0.5885, 0.6193]}, {"w": "Transformer", "b": [0.5943, 0.6043, 0.691, 0.6193]}, {"w": "architecture)", "b": [0.6968, 0.6043, 0.7979, 0.6193]}, {"w": "and", "b": [0.8037, 0.6043, 0.8328, 0.6193]}, {"w": "Em-", "b": [0.8386, 0.6043, 0.872, 0.6193]}, {"w": "beddings", "b": [0.1312, 0.6222, 0.2012, 0.6372]}, {"w": "from", "b": [0.2071, 0.6222, 0.2438, 0.6372]}, {"w": "Language", "b": [0.2496, 0.6222, 0.3253, 0.6372]}, {"w": "Models,", "b": [0.3311, 0.6222, 0.3925, 0.6372]}, {"w": "ELMo", "b": [0.3983, 0.6226, 0.4558, 0.6375]}, {"w": "(based", "b": [0.4617, 0.6222, 0.513, 0.6372]}, {"w": "on", "b": [0.5189, 0.6222, 0.538, 0.6372]}, {"w": "the", "b": [0.5438, 0.6222, 0.569, 0.6372]}, {"w": "bi-directional", "b": [0.5748, 0.6226, 0.6979, 0.6375]}, {"w": "LSTM", "b": [0.7046, 0.6226, 0.7641, 0.6375]}, {"w": "architecture)", "b": [0.7699, 0.6222, 0.871, 0.6372]}, {"w": "often", "b": [0.1312, 0.6402, 0.1717, 0.6551]}, {"w": "improve", "b": [0.1779, 0.6402, 0.242, 0.6551]}, {"w": "the", "b": [0.2482, 0.6402, 0.2738, 0.6551]}, {"w": "quality", "b": [0.28, 0.6402, 0.3359, 0.6551]}, {"w": "of", "b": [0.342, 0.6402, 0.3569, 0.6551]}, {"w": "the", "b": [0.363, 0.6402, 0.3887, 0.6551]}, {"w": "model,", "b": [0.3948, 0.6402, 0.4487, 0.6551]}, {"w": "compared", "b": [0.4548, 0.6402, 0.5328, 0.6551]}, {"w": "to", "b": [0.5389, 0.6402, 0.5553, 0.6551]}, {"w": "training", "b": [0.5615, 0.6402, 0.6251, 0.6551]}, {"w": "a", "b": [0.6313, 0.6402, 0.6405, 0.6551]}, {"w": "model", "b": [0.6466, 0.6402, 0.6953, 0.6551]}, {"w": "from", "b": [0.7015, 0.6402, 0.739, 0.6551]}, {"w": "scratch.", "b": [0.7451, 0.6402, 0.8073, 0.6551]}]}, {"id": "b_10", "type": "paragraph", "text": "An advantage of using pre-trained models is that these were trained on huge quantities of data available to its creators, but likely unavailable to you. Even if your dataset is smaller and not exactly similar to the one used to pre-train the model, the parameters learned by the pre-trained models may still be useful.", "words": [{"w": "An", "b": [0.1305, 0.6671, 0.1551, 0.6821]}, {"w": "advantage", "b": [0.1613, 0.6671, 0.2439, 0.6821]}, {"w": "of", "b": [0.2501, 0.6671, 0.2652, 0.6821]}, {"w": "using", "b": [0.2714, 0.6671, 0.3144, 0.6821]}, {"w": "pre-trained", "b": [0.3205, 0.6671, 0.4116, 0.6821]}, {"w": "models", "b": [0.4178, 0.6671, 0.4749, 0.6821]}, {"w": "is", "b": [0.481, 0.6671, 0.4937, 0.6821]}, {"w": "that", "b": [0.4999, 0.6671, 0.5344, 0.6821]}, {"w": "these", "b": [0.5405, 0.6671, 0.5825, 0.6821]}, {"w": "were", "b": [0.5886, 0.6671, 0.6258, 0.6821]}, {"w": "trained", "b": [0.632, 0.6671, 0.6906, 0.6821]}, {"w": "on", "b": [0.6968, 0.6671, 0.7166, 0.6821]}, {"w": "huge", "b": [0.7228, 0.6671, 0.761, 0.6821]}, {"w": "quantities", "b": [0.7671, 0.6671, 0.8478, 0.6821]}, {"w": "of", "b": [0.854, 0.6671, 0.8691, 0.6821]}, {"w": "data", "b": [0.1312, 0.6851, 0.1675, 0.7]}, {"w": "available", "b": [0.1737, 0.6851, 0.2442, 0.7]}, {"w": "to", "b": [0.2503, 0.6851, 0.2669, 0.7]}, {"w": "its", "b": [0.2731, 0.6851, 0.2929, 0.7]}, {"w": "creators,", "b": [0.299, 0.6851, 0.3687, 0.7]}, {"w": "but", "b": [0.3749, 0.6851, 0.4029, 0.7]}, {"w": "likely", "b": [0.409, 0.6851, 0.4521, 0.7]}, {"w": "unavailable", "b": [0.4582, 0.6851, 0.5495, 0.7]}, {"w": "to", "b": [0.5556, 0.6851, 0.5722, 0.7]}, {"w": "you.", "b": [0.5784, 0.6851, 0.6126, 0.7]}, {"w": "Even", "b": [0.6208, 0.6851, 0.6615, 0.7]}, {"w": "if", "b": [0.6677, 0.6851, 0.6785, 0.7]}, {"w": "your", "b": [0.6847, 0.6851, 0.7211, 0.7]}, {"w": "dataset", "b": [0.7272, 0.6851, 0.7864, 0.7]}, {"w": "is", "b": [0.7925, 0.6851, 0.8051, 0.7]}, {"w": "smaller", "b": [0.8113, 0.6851, 0.8695, 0.7]}, {"w": "and", "b": [0.1312, 0.703, 0.1616, 0.718]}, {"w": "not", "b": [0.1677, 0.703, 0.1949, 0.718]}, {"w": "exactly", "b": [0.201, 0.703, 0.2596, 0.718]}, {"w": "similar", "b": [0.2657, 0.703, 0.3213, 0.718]}, {"w": "to", "b": [0.3275, 0.703, 0.3442, 0.718]}, {"w": "the", "b": [0.3503, 0.703, 0.3765, 0.718]}, {"w": "one", "b": [0.3826, 0.703, 0.4109, 0.718]}, {"w": "used", "b": [0.417, 0.703, 0.4537, 0.718]}, {"w": "to", "b": [0.4599, 0.703, 0.4766, 0.718]}, {"w": "pre-train", "b": [0.4827, 0.703, 0.555, 0.718]}, {"w": "the", "b": [0.5611, 0.703, 0.5873, 0.718]}, {"w": "model,", "b": [0.5934, 0.703, 0.6483, 0.718]}, {"w": "the", "b": [0.6545, 0.703, 0.6806, 0.718]}, {"w": "parameters", "b": [0.6867, 0.703, 0.7779, 0.718]}, {"w": "learned", "b": [0.7841, 0.703, 0.8438, 0.718]}, {"w": "by", "b": [0.8499, 0.703, 0.8698, 0.718]}, {"w": "the", "b": [0.1312, 0.721, 0.1569, 0.7359]}, {"w": "pre-trained", "b": [0.163, 0.721, 0.2524, 0.7359]}, {"w": "models", "b": [0.2585, 0.721, 0.3145, 0.7359]}, {"w": "may", "b": [0.3206, 0.721, 0.3545, 0.7359]}, {"w": "still", "b": [0.3606, 0.721, 0.3905, 0.7359]}, {"w": "be", "b": [0.3966, 0.721, 0.4156, 0.7359]}, {"w": "useful.", "b": [0.4217, 0.721, 0.4737, 0.7359]}]}, {"id": "b_11", "type": "equation", "text": "You can use a pre-trained model in two ways:", "words": [{"w": "You", "b": [0.1305, 0.7479, 0.1623, 0.7628]}, {"w": "can", "b": [0.1685, 0.7479, 0.1962, 0.7628]}, {"w": "use", "b": [0.2023, 0.7479, 0.2281, 0.7628]}, {"w": "a", "b": [0.2342, 0.7479, 0.2434, 0.7628]}, {"w": "pre-trained", "b": [0.2496, 0.7479, 0.3389, 0.7628]}, {"w": "model", "b": [0.3451, 0.7479, 0.3937, 0.7628]}, {"w": "in", "b": [0.3999, 0.7479, 0.4153, 0.7628]}, {"w": "two", "b": [0.4214, 0.7479, 0.4501, 0.7628]}, {"w": "ways:", "b": [0.4563, 0.7479, 0.5, 0.7628]}]}, {"id": "b_12", "type": "paragraph", "text": "1) use its learned parameters to initialize your own model, or 2) use the pre-trained model as a feature extractor for your model.", "words": [{"w": "1)", "b": [0.1517, 0.7748, 0.1681, 0.7898]}, {"w": "use", "b": [0.1774, 0.7748, 0.2031, 0.7898]}, {"w": "its", "b": [0.2093, 0.7748, 0.2289, 0.7898]}, {"w": "learned", "b": [0.235, 0.7748, 0.2935, 0.7898]}, {"w": "parameters", "b": [0.2997, 0.7748, 0.3891, 0.7898]}, {"w": "to", "b": [0.3952, 0.7748, 0.4116, 0.7898]}, {"w": "initialize", "b": [0.4178, 0.7748, 0.4865, 0.7898]}, {"w": "your", "b": [0.4927, 0.7748, 0.5286, 0.7898]}, {"w": "own", "b": [0.5347, 0.7748, 0.567, 0.7898]}, {"w": "model,", "b": [0.5732, 0.7748, 0.627, 0.7898]}, {"w": "or", "b": [0.6332, 0.7748, 0.6496, 0.7898]}, {"w": "2)", "b": [0.1517, 0.7927, 0.1681, 0.8077]}, {"w": "use", "b": [0.1774, 0.7927, 0.2031, 0.8077]}, {"w": "the", "b": [0.2093, 0.7927, 0.2349, 0.8077]}, {"w": "pre-trained", "b": [0.241, 0.7927, 0.3304, 0.8077]}, {"w": "model", "b": [0.3365, 0.7927, 0.3852, 0.8077]}, {"w": "as", "b": [0.3914, 0.7927, 0.4079, 0.8077]}, {"w": "a", "b": [0.414, 0.7927, 0.4233, 0.8077]}, {"w": "feature", "b": [0.4294, 0.7927, 0.4854, 0.8077]}, {"w": "extractor", "b": [0.4915, 0.7927, 0.5649, 0.8077]}, {"w": "for", "b": [0.5711, 0.7927, 0.5932, 0.8077]}, {"w": "your", "b": [0.5993, 0.7927, 0.6353, 0.8077]}, {"w": "model.", "b": [0.6414, 0.7927, 0.6953, 0.8077]}]}, {"id": "b_13", "type": "paragraph", "text": "If you use the pre-trained model the former way, it gives you more flexibility. The downside is you end up training a very deep neural network. That requires significant computational", "words": [{"w": "If", "b": [0.1312, 0.8197, 0.1435, 0.8346]}, {"w": "you", "b": [0.1496, 0.8197, 0.1781, 0.8346]}, {"w": "use", "b": [0.1843, 0.8197, 0.2098, 0.8346]}, {"w": "the", "b": [0.216, 0.8197, 0.2414, 0.8346]}, {"w": "pre-trained", "b": [0.2476, 0.8197, 0.3363, 0.8346]}, {"w": "model", "b": [0.3424, 0.8197, 0.3908, 0.8346]}, {"w": "the", "b": [0.3969, 0.8197, 0.4224, 0.8346]}, {"w": "former", "b": [0.4286, 0.8197, 0.4811, 0.8346]}, {"w": "way,", "b": [0.4872, 0.8197, 0.5218, 0.8346]}, {"w": "it", "b": [0.528, 0.8197, 0.5402, 0.8346]}, {"w": "gives", "b": [0.5463, 0.8197, 0.5852, 0.8346]}, {"w": "you", "b": [0.5913, 0.8197, 0.6198, 0.8346]}, {"w": "more", "b": [0.626, 0.8197, 0.6657, 0.8346]}, {"w": "flexibility.", "b": [0.6719, 0.8197, 0.7503, 0.8346]}, {"w": "The", "b": [0.7585, 0.8197, 0.79, 0.8346]}, {"w": "downside", "b": [0.7962, 0.8197, 0.8691, 0.8346]}, {"w": "is", "b": [0.1312, 0.8376, 0.1437, 0.8526]}, {"w": "you", "b": [0.1498, 0.8376, 0.1786, 0.8526]}, {"w": "end", "b": [0.1847, 0.8376, 0.2135, 0.8526]}, {"w": "up", "b": [0.2196, 0.8376, 0.2402, 0.8526]}, {"w": "training", "b": [0.2463, 0.8376, 0.31, 0.8526]}, {"w": "a", "b": [0.3162, 0.8376, 0.3254, 0.8526]}, {"w": "very", "b": [0.3315, 0.8376, 0.366, 0.8526]}, {"w": "deep", "b": [0.3721, 0.8376, 0.4091, 0.8526]}, {"w": "neural", "b": [0.4153, 0.8376, 0.4657, 0.8526]}, {"w": "network.", "b": [0.4718, 0.8376, 0.5412, 0.8526]}, {"w": "That", "b": [0.5494, 0.8376, 0.5894, 0.8526]}, {"w": "requires", "b": [0.5956, 0.8376, 0.659, 0.8526]}, {"w": "significant", "b": [0.6651, 0.8376, 0.7469, 0.8526]}, {"w": "computational", "b": [0.753, 0.8376, 0.8691, 0.8526]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "3", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 179, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "resources. In the latter case, you “freeze” the parameters of the pre-trained model and only train the parameters of added layers.", "words": [{"w": "resources.", "b": [0.1312, 0.0881, 0.2093, 0.1031]}, {"w": "In", "b": [0.2175, 0.0881, 0.2343, 0.1031]}, {"w": "the", "b": [0.2405, 0.0881, 0.266, 0.1031]}, {"w": "latter", "b": [0.2722, 0.0881, 0.3162, 0.1031]}, {"w": "case,", "b": [0.3223, 0.0881, 0.3603, 0.1031]}, {"w": "you", "b": [0.3664, 0.0881, 0.395, 0.1031]}, {"w": "“freeze”", "b": [0.4012, 0.0881, 0.4641, 0.1031]}, {"w": "the", "b": [0.4703, 0.0881, 0.4958, 0.1031]}, {"w": "parameters", "b": [0.502, 0.0881, 0.5911, 0.1031]}, {"w": "of", "b": [0.5972, 0.0881, 0.6121, 0.1031]}, {"w": "the", "b": [0.6182, 0.0881, 0.6438, 0.1031]}, {"w": "pre-trained", "b": [0.6499, 0.0881, 0.739, 0.1031]}, {"w": "model", "b": [0.7451, 0.0881, 0.7937, 0.1031]}, {"w": "and", "b": [0.7998, 0.0881, 0.8294, 0.1031]}, {"w": "only", "b": [0.8356, 0.0881, 0.8698, 0.1031]}, {"w": "train", "b": [0.1312, 0.106, 0.1703, 0.121]}, {"w": "the", "b": [0.1764, 0.106, 0.202, 0.121]}, {"w": "parameters", "b": [0.2082, 0.106, 0.2976, 0.121]}, {"w": "of", "b": [0.3038, 0.106, 0.3186, 0.121]}, {"w": "added", "b": [0.3248, 0.106, 0.373, 0.121]}, {"w": "layers.", "b": [0.3791, 0.106, 0.4301, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "6.1.1 Neural Network Training Strategy", "words": [{"w": "6.1.1", "b": [0.1312, 0.1542, 0.1749, 0.1692]}, {"w": "Neural", "b": [0.1961, 0.1542, 0.2592, 0.1692]}, {"w": "Network", "b": [0.2662, 0.1542, 0.3455, 0.1692]}, {"w": "Training", "b": [0.3526, 0.1542, 0.4306, 0.1692]}, {"w": "Strategy", "b": [0.4377, 0.1542, 0.5166, 0.1692]}]}, {"id": "b_2", "type": "paragraph", "text": "Using an existing model to create a new model is called transfer learning. We will talk more on this topic in Section 6.1.10. For the moment, assume you are building a model from scratch, based on the architecture of your choice. A common strategy to build a neural network looks as follows:", "words": [{"w": "Using", "b": [0.1312, 0.1905, 0.1779, 0.2054]}, {"w": "an", "b": [0.1844, 0.1905, 0.2043, 0.2054]}, {"w": "existing", "b": [0.2108, 0.1905, 0.2742, 0.2054]}, {"w": "model", "b": [0.2807, 0.1905, 0.3304, 0.2054]}, {"w": "to", "b": [0.3369, 0.1905, 0.3536, 0.2054]}, {"w": "create", "b": [0.3601, 0.1905, 0.4094, 0.2054]}, {"w": "a", "b": [0.4159, 0.1905, 0.4253, 0.2054]}, {"w": "new", "b": [0.4318, 0.1905, 0.4642, 0.2054]}, {"w": "model", "b": [0.4707, 0.1905, 0.5204, 0.2054]}, {"w": "is", "b": [0.5269, 0.1905, 0.5396, 0.2054]}, {"w": "called", "b": [0.5461, 0.1905, 0.5932, 0.2054]}, {"w": "transfer", "b": [0.5995, 0.1908, 0.6719, 0.2057]}, {"w": "learning.", "b": [0.6794, 0.1905, 0.7596, 0.2057]}, {"w": "We", "b": [0.7689, 0.1905, 0.7951, 0.2054]}, {"w": "will", "b": [0.8016, 0.1905, 0.8309, 0.2054]}, {"w": "talk", "b": [0.8374, 0.1905, 0.8693, 0.2054]}, {"w": "more", "b": [0.1312, 0.2084, 0.1721, 0.2234]}, {"w": "on", "b": [0.1793, 0.2084, 0.1991, 0.2234]}, {"w": "this", "b": [0.2064, 0.2084, 0.2368, 0.2234]}, {"w": "topic", "b": [0.244, 0.2084, 0.2848, 0.2234]}, {"w": "in", "b": [0.292, 0.2084, 0.3077, 0.2234]}, {"w": "Section", "b": [0.3149, 0.2084, 0.3746, 0.2234]}, {"w": "6.1.10.", "b": [0.3818, 0.2084, 0.4351, 0.2234]}, {"w": "For", "b": [0.4465, 0.2084, 0.474, 0.2234]}, {"w": "the", "b": [0.4812, 0.2084, 0.5074, 0.2234]}, {"w": "moment,", "b": [0.5146, 0.2084, 0.5862, 0.2234]}, {"w": "assume", "b": [0.5937, 0.2084, 0.6525, 0.2234]}, {"w": "you", "b": [0.6597, 0.2084, 0.689, 0.2234]}, {"w": "are", "b": [0.6962, 0.2084, 0.7214, 0.2234]}, {"w": "building", "b": [0.7286, 0.2084, 0.7956, 0.2234]}, {"w": "a", "b": [0.8028, 0.2084, 0.8122, 0.2234]}, {"w": "model", "b": [0.8194, 0.2084, 0.869, 0.2234]}, {"w": "from", "b": [0.1312, 0.2264, 0.1681, 0.2413]}, {"w": "scratch,", "b": [0.1742, 0.2264, 0.2354, 0.2413]}, {"w": "based", "b": [0.2416, 0.2264, 0.286, 0.2413]}, {"w": "on", "b": [0.2922, 0.2264, 0.3113, 0.2413]}, {"w": "the", "b": [0.3175, 0.2264, 0.3427, 0.2413]}, {"w": "architecture", "b": [0.3489, 0.2264, 0.4432, 0.2413]}, {"w": "of", "b": [0.4494, 0.2264, 0.464, 0.2413]}, {"w": "your", "b": [0.4702, 0.2264, 0.5055, 0.2413]}, {"w": "choice.", "b": [0.5117, 0.2264, 0.5646, 0.2413]}, {"w": "A", "b": [0.5729, 0.2264, 0.5865, 0.2413]}, {"w": "common", "b": [0.5926, 0.2264, 0.6591, 0.2413]}, {"w": "strategy", "b": [0.6653, 0.2264, 0.7295, 0.2413]}, {"w": "to", "b": [0.7356, 0.2264, 0.7518, 0.2413]}, {"w": "build", "b": [0.7579, 0.2264, 0.7983, 0.2413]}, {"w": "a", "b": [0.8044, 0.2264, 0.8135, 0.2413]}, {"w": "neural", "b": [0.8197, 0.2264, 0.8691, 0.2413]}, {"w": "network", "b": [0.1312, 0.2443, 0.1954, 0.2593]}, {"w": "looks", "b": [0.2015, 0.2443, 0.2426, 0.2593]}, {"w": "as", "b": [0.2488, 0.2443, 0.2653, 0.2593]}, {"w": "follows:", "b": [0.2714, 0.2443, 0.331, 0.2593]}]}, {"id": "b_3", "type": "paragraph", "text": "1. Define a performance metric P. 2. Define the cost function C. 3. Pick a parameter-initialization strategy W. 4. Pick a cost-function optimization algorithm A. 5. Choose a hyperparameter tuning strategy T. 6. Pick a combination H of hyperparameter values using the tuning strategy T. 7. Train model M, using algorithm A, parametrized with hyperparameters H, to optimize cost function C. 8. If there are still untested hyperparameter values, pick another combination H of hyperparameter values using strategy T, and repeat step 7. 9. Return the model for which the metric P was optimized.", "words": [{"w": "1.", "b": [0.1538, 0.2712, 0.1681, 0.2862]}, {"w": "Define", "b": [0.1774, 0.2712, 0.2284, 0.2862]}, {"w": "a", "b": [0.2345, 0.2712, 0.2438, 0.2862]}, {"w": "performance", "b": [0.2499, 0.2712, 0.3495, 0.2862]}, {"w": "metric", "b": [0.3556, 0.2712, 0.407, 0.2862]}, {"w": "P.", "b": [0.413, 0.2712, 0.4325, 0.2865]}, {"w": "2.", "b": [0.1538, 0.2892, 0.1681, 0.3041]}, {"w": "Define", "b": [0.1774, 0.2892, 0.2284, 0.3041]}, {"w": "the", "b": [0.2345, 0.2892, 0.2602, 0.3041]}, {"w": "cost", "b": [0.2663, 0.2892, 0.2982, 0.3041]}, {"w": "function", "b": [0.3044, 0.2892, 0.3705, 0.3041]}, {"w": "C.", "b": [0.3766, 0.2892, 0.3962, 0.3044]}, {"w": "3.", "b": [0.1538, 0.3071, 0.1681, 0.3221]}, {"w": "Pick", "b": [0.1774, 0.3071, 0.2125, 0.3221]}, {"w": "a", "b": [0.2186, 0.3071, 0.2279, 0.3221]}, {"w": "parameter-initialization", "b": [0.234, 0.3071, 0.4238, 0.3221]}, {"w": "strategy", "b": [0.43, 0.3071, 0.4952, 0.3221]}, {"w": "W.", "b": [0.5012, 0.3071, 0.5264, 0.3224]}, {"w": "4.", "b": [0.1538, 0.3251, 0.1681, 0.34]}, {"w": "Pick", "b": [0.1774, 0.3251, 0.2125, 0.34]}, {"w": "a", "b": [0.2186, 0.3251, 0.2279, 0.34]}, {"w": "cost-function", "b": [0.234, 0.3251, 0.3382, 0.34]}, {"w": "optimization", "b": [0.3444, 0.3251, 0.4459, 0.34]}, {"w": "algorithm", "b": [0.452, 0.3251, 0.53, 0.34]}, {"w": "A.", "b": [0.536, 0.3251, 0.555, 0.3403]}, {"w": "5.", "b": [0.1538, 0.343, 0.1681, 0.358]}, {"w": "Choose", "b": [0.1774, 0.343, 0.2354, 0.358]}, {"w": "a", "b": [0.2415, 0.343, 0.2508, 0.358]}, {"w": "hyperparameter", "b": [0.2569, 0.343, 0.3847, 0.358]}, {"w": "tuning", "b": [0.3909, 0.343, 0.4432, 0.358]}, {"w": "strategy", "b": [0.4493, 0.343, 0.5146, 0.358]}, {"w": "T.", "b": [0.5206, 0.343, 0.5391, 0.3583]}, {"w": "6.", "b": [0.1538, 0.361, 0.1681, 0.3759]}, {"w": "Pick", "b": [0.1774, 0.361, 0.2125, 0.3759]}, {"w": "a", "b": [0.2186, 0.361, 0.2279, 0.3759]}, {"w": "combination", "b": [0.234, 0.361, 0.333, 0.3759]}, {"w": "H", "b": [0.339, 0.3612, 0.3544, 0.3762]}, {"w": "of", "b": [0.362, 0.361, 0.3769, 0.3759]}, {"w": "hyperparameter", "b": [0.383, 0.361, 0.5109, 0.3759]}, {"w": "values", "b": [0.517, 0.361, 0.5659, 0.3759]}, {"w": "using", "b": [0.572, 0.361, 0.6142, 0.3759]}, {"w": "the", "b": [0.6203, 0.361, 0.6459, 0.3759]}, {"w": "tuning", "b": [0.6521, 0.361, 0.7044, 0.3759]}, {"w": "strategy", "b": [0.7105, 0.361, 0.7758, 0.3759]}, {"w": "T.", "b": [0.7818, 0.361, 0.8002, 0.3762]}, {"w": "7.", "b": [0.1538, 0.3789, 0.1681, 0.3939]}, {"w": "Train", "b": [0.1774, 0.3789, 0.2201, 0.3939]}, {"w": "model", "b": [0.2258, 0.3789, 0.2735, 0.3939]}, {"w": "M,", "b": [0.2792, 0.3789, 0.3042, 0.3941]}, {"w": "using", "b": [0.31, 0.3789, 0.3513, 0.3939]}, {"w": "algorithm", "b": [0.357, 0.3789, 0.4334, 0.3939]}, {"w": "A,", "b": [0.4391, 0.3789, 0.458, 0.3941]}, {"w": "parametrized", "b": [0.4638, 0.3789, 0.5674, 0.3939]}, {"w": "with", "b": [0.5731, 0.3789, 0.6083, 0.3939]}, {"w": "hyperparameters", "b": [0.614, 0.3789, 0.7464, 0.3939]}, {"w": "H,", "b": [0.752, 0.3789, 0.7739, 0.3941]}, {"w": "to", "b": [0.7797, 0.3789, 0.7957, 0.3939]}, {"w": "optimize", "b": [0.8015, 0.3789, 0.8688, 0.3939]}, {"w": "cost", "b": [0.1774, 0.3969, 0.2093, 0.4118]}, {"w": "function", "b": [0.2154, 0.3969, 0.2816, 0.4118]}, {"w": "C.", "b": [0.2876, 0.3969, 0.3073, 0.4121]}, {"w": "8.", "b": [0.1538, 0.4148, 0.1681, 0.4298]}, {"w": "If", "b": [0.1774, 0.4148, 0.1899, 0.4298]}, {"w": "there", "b": [0.1987, 0.4148, 0.2406, 0.4298]}, {"w": "are", "b": [0.2494, 0.4148, 0.2746, 0.4298]}, {"w": "still", "b": [0.2833, 0.4148, 0.3138, 0.4298]}, {"w": "untested", "b": [0.3226, 0.4148, 0.3923, 0.4298]}, {"w": "hyperparameter", "b": [0.401, 0.4148, 0.5314, 0.4298]}, {"w": "values,", "b": [0.5402, 0.4148, 0.5953, 0.4298]}, {"w": "pick", "b": [0.6047, 0.4148, 0.6382, 0.4298]}, {"w": "another", "b": [0.647, 0.4148, 0.7098, 0.4298]}, {"w": "combination", "b": [0.7186, 0.4148, 0.8195, 0.4298]}, {"w": "H", "b": [0.828, 0.4151, 0.8433, 0.43]}, {"w": "of", "b": [0.8536, 0.4148, 0.8688, 0.4298]}, {"w": "hyperparameter", "b": [0.1774, 0.4328, 0.3052, 0.4477]}, {"w": "values", "b": [0.3113, 0.4328, 0.3602, 0.4477]}, {"w": "using", "b": [0.3663, 0.4328, 0.4085, 0.4477]}, {"w": "strategy", "b": [0.4146, 0.4328, 0.4799, 0.4477]}, {"w": "T,", "b": [0.4859, 0.4328, 0.5043, 0.448]}, {"w": "and", "b": [0.5105, 0.4328, 0.5402, 0.4477]}, {"w": "repeat", "b": [0.5464, 0.4328, 0.5972, 0.4477]}, {"w": "step", "b": [0.6033, 0.4328, 0.6363, 0.4477]}, {"w": "7.", "b": [0.6424, 0.4328, 0.6568, 0.4477]}, {"w": "9.", "b": [0.1538, 0.4507, 0.1681, 0.4657]}, {"w": "Return", "b": [0.1774, 0.4507, 0.2341, 0.4657]}, {"w": "the", "b": [0.2402, 0.4507, 0.2659, 0.4657]}, {"w": "model", "b": [0.272, 0.4507, 0.3207, 0.4657]}, {"w": "for", "b": [0.3269, 0.4507, 0.349, 0.4657]}, {"w": "which", "b": [0.3551, 0.4507, 0.4018, 0.4657]}, {"w": "the", "b": [0.4079, 0.4507, 0.4336, 0.4657]}, {"w": "metric", "b": [0.4397, 0.4507, 0.491, 0.4657]}, {"w": "P", "b": [0.497, 0.451, 0.5089, 0.4659]}, {"w": "was", "b": [0.5176, 0.4507, 0.5469, 0.4657]}, {"w": "optimized.", "b": [0.5531, 0.4507, 0.6371, 0.4657]}]}, {"id": "b_4", "type": "paragraph", "text": "Now let’s discuss some of the steps of the above strategy in detail.", "words": [{"w": "Now", "b": [0.1312, 0.4776, 0.1671, 0.4926]}, {"w": "let’s", "b": [0.1733, 0.4776, 0.2062, 0.4926]}, {"w": "discuss", "b": [0.2123, 0.4776, 0.2681, 0.4926]}, {"w": "some", "b": [0.2742, 0.4776, 0.3143, 0.4926]}, {"w": "of", "b": [0.3204, 0.4776, 0.3353, 0.4926]}, {"w": "the", "b": [0.3414, 0.4776, 0.3671, 0.4926]}, {"w": "steps", "b": [0.3733, 0.4776, 0.4135, 0.4926]}, {"w": "of", "b": [0.4196, 0.4776, 0.4345, 0.4926]}, {"w": "the", "b": [0.4406, 0.4776, 0.4663, 0.4926]}, {"w": "above", "b": [0.4724, 0.4776, 0.5186, 0.4926]}, {"w": "strategy", "b": [0.5247, 0.4776, 0.59, 0.4926]}, {"w": "in", "b": [0.5961, 0.4776, 0.6115, 0.4926]}, {"w": "detail.", "b": [0.6177, 0.4776, 0.6679, 0.4926]}]}, {"id": "b_5", "type": "paragraph", "text": "6.1.2 Performance Metric and Cost Function", "words": [{"w": "6.1.2", "b": [0.1312, 0.5258, 0.1749, 0.5407]}, {"w": "Performance", "b": [0.1961, 0.5258, 0.3132, 0.5407]}, {"w": "Metric", "b": [0.3203, 0.5258, 0.3825, 0.5407]}, {"w": "and", "b": [0.3896, 0.5258, 0.4235, 0.5407]}, {"w": "Cost", "b": [0.4305, 0.5258, 0.4731, 0.5407]}, {"w": "Function", "b": [0.4801, 0.5258, 0.5613, 0.5407]}]}, {"id": "b_6", "type": "paragraph", "text": "Step 1 is similar to step 1 of the shallow model training strategy (Section ??): we define a metric that would allow comparing the performance of two models on the holdout data, and select the better of the two. An example of a performance metric is F-score or Cohen’s kappa.", "words": [{"w": "Step", "b": [0.1312, 0.562, 0.1679, 0.577]}, {"w": "1", "b": [0.1747, 0.562, 0.1841, 0.577]}, {"w": "is", "b": [0.1909, 0.562, 0.2036, 0.577]}, {"w": "similar", "b": [0.2104, 0.562, 0.266, 0.577]}, {"w": "to", "b": [0.2728, 0.562, 0.2895, 0.577]}, {"w": "step", "b": [0.2964, 0.562, 0.33, 0.577]}, {"w": "1", "b": [0.3367, 0.562, 0.3461, 0.577]}, {"w": "of", "b": [0.353, 0.562, 0.3681, 0.577]}, {"w": "the", "b": [0.375, 0.562, 0.4011, 0.577]}, {"w": "shallow", "b": [0.4079, 0.562, 0.4682, 0.577]}, {"w": "model", "b": [0.475, 0.562, 0.5247, 0.577]}, {"w": "training", "b": [0.5315, 0.562, 0.5964, 0.577]}, {"w": "strategy", "b": [0.6032, 0.562, 0.6698, 0.577]}, {"w": "(Section", "b": [0.6766, 0.562, 0.7436, 0.577]}, {"w": "??):", "b": [0.7503, 0.562, 0.7828, 0.5773]}, {"w": "we", "b": [0.7924, 0.562, 0.8139, 0.577]}, {"w": "define", "b": [0.8207, 0.562, 0.8688, 0.577]}, {"w": "a", "b": [0.1312, 0.58, 0.1406, 0.595]}, {"w": "metric", "b": [0.1469, 0.58, 0.1992, 0.595]}, {"w": "that", "b": [0.2055, 0.58, 0.24, 0.595]}, {"w": "would", "b": [0.2462, 0.58, 0.2949, 0.595]}, {"w": "allow", "b": [0.3011, 0.58, 0.3435, 0.595]}, {"w": "comparing", "b": [0.3497, 0.58, 0.4355, 0.595]}, {"w": "the", "b": [0.4418, 0.58, 0.4679, 0.595]}, {"w": "performance", "b": [0.4742, 0.58, 0.5757, 0.595]}, {"w": "of", "b": [0.582, 0.58, 0.5971, 0.595]}, {"w": "two", "b": [0.6034, 0.58, 0.6327, 0.595]}, {"w": "models", "b": [0.6389, 0.58, 0.696, 0.595]}, {"w": "on", "b": [0.7022, 0.58, 0.7221, 0.595]}, {"w": "the", "b": [0.7284, 0.58, 0.7545, 0.595]}, {"w": "holdout", "b": [0.7608, 0.58, 0.8235, 0.595]}, {"w": "data,", "b": [0.8297, 0.58, 0.8716, 0.595]}, {"w": "and", "b": [0.1312, 0.5979, 0.1616, 0.6129]}, {"w": "select", "b": [0.1706, 0.5979, 0.2157, 0.6129]}, {"w": "the", "b": [0.2248, 0.5979, 0.2509, 0.6129]}, {"w": "better", "b": [0.26, 0.5979, 0.3097, 0.6129]}, {"w": "of", "b": [0.3188, 0.5979, 0.334, 0.6129]}, {"w": "the", "b": [0.343, 0.5979, 0.3692, 0.6129]}, {"w": "two.", "b": [0.3782, 0.5979, 0.4128, 0.6129]}, {"w": "An", "b": [0.4297, 0.5979, 0.4543, 0.6129]}, {"w": "example", "b": [0.4633, 0.5979, 0.5308, 0.6129]}, {"w": "of", "b": [0.5398, 0.5979, 0.555, 0.6129]}, {"w": "a", "b": [0.5641, 0.5979, 0.5735, 0.6129]}, {"w": "performance", "b": [0.5825, 0.5979, 0.6841, 0.6129]}, {"w": "metric", "b": [0.6931, 0.5979, 0.7455, 0.6129]}, {"w": "is", "b": [0.7546, 0.5979, 0.7672, 0.6129]}, {"w": "F-score", "b": [0.776, 0.5982, 0.8433, 0.6132]}, {"w": "or", "b": [0.8524, 0.5979, 0.8691, 0.6129]}, {"w": "Cohen’s", "b": [0.1312, 0.6162, 0.2048, 0.6312]}, {"w": "kappa.", "b": [0.2118, 0.6159, 0.2727, 0.6312]}]}, {"id": "b_7", "type": "paragraph", "text": "In step 2, we define what our learning algorithm will optimize in order to train a model. If our neural network is a regression model, then, in most cases, the cost function is the mean squared error (MSE) defined in Equation ?? in the previous chapter. Let’s repeat it here:", "words": [{"w": "In", "b": [0.1312, 0.6428, 0.1485, 0.6578]}, {"w": "step", "b": [0.1556, 0.6428, 0.1892, 0.6578]}, {"w": "2,", "b": [0.1963, 0.6428, 0.2109, 0.6578]}, {"w": "we", "b": [0.2182, 0.6428, 0.2397, 0.6578]}, {"w": "define", "b": [0.2468, 0.6428, 0.2949, 0.6578]}, {"w": "what", "b": [0.302, 0.6428, 0.3428, 0.6578]}, {"w": "our", "b": [0.3499, 0.6428, 0.3772, 0.6578]}, {"w": "learning", "b": [0.3843, 0.6428, 0.4502, 0.6578]}, {"w": "algorithm", "b": [0.4573, 0.6428, 0.5369, 0.6578]}, {"w": "will", "b": [0.544, 0.6428, 0.5732, 0.6578]}, {"w": "optimize", "b": [0.5804, 0.6428, 0.6504, 0.6578]}, {"w": "in", "b": [0.6575, 0.6428, 0.6732, 0.6578]}, {"w": "order", "b": [0.6803, 0.6428, 0.7233, 0.6578]}, {"w": "to", "b": [0.7304, 0.6428, 0.7472, 0.6578]}, {"w": "train", "b": [0.7543, 0.6428, 0.7941, 0.6578]}, {"w": "a", "b": [0.8012, 0.6428, 0.8106, 0.6578]}, {"w": "model.", "b": [0.8177, 0.6428, 0.8726, 0.6578]}, {"w": "If", "b": [0.1312, 0.6608, 0.1438, 0.6757]}, {"w": "our", "b": [0.1501, 0.6608, 0.1773, 0.6757]}, {"w": "neural", "b": [0.1837, 0.6608, 0.235, 0.6757]}, {"w": "network", "b": [0.2413, 0.6608, 0.3067, 0.6757]}, {"w": "is", "b": [0.313, 0.6608, 0.3257, 0.6757]}, {"w": "a", "b": [0.332, 0.6608, 0.3414, 0.6757]}, {"w": "regression", "b": [0.3477, 0.6608, 0.4286, 0.6757]}, {"w": "model,", "b": [0.4349, 0.6608, 0.4898, 0.6757]}, {"w": "then,", "b": [0.4962, 0.6608, 0.538, 0.6757]}, {"w": "in", "b": [0.5444, 0.6608, 0.5601, 0.6757]}, {"w": "most", "b": [0.5664, 0.6608, 0.6062, 0.6757]}, {"w": "cases,", "b": [0.6125, 0.6608, 0.6588, 0.6757]}, {"w": "the", "b": [0.6651, 0.6608, 0.6913, 0.6757]}, {"w": "cost", "b": [0.6973, 0.6611, 0.734, 0.676]}, {"w": "function", "b": [0.7413, 0.6611, 0.8173, 0.676]}, {"w": "is", "b": [0.8237, 0.6608, 0.8363, 0.6757]}, {"w": "the", "b": [0.8426, 0.6608, 0.8688, 0.6757]}, {"w": "mean", "b": [0.1312, 0.679, 0.1807, 0.694]}, {"w": "squared", "b": [0.1878, 0.679, 0.2598, 0.694]}, {"w": "error", "b": [0.2668, 0.679, 0.3134, 0.694]}, {"w": "(MSE)", "b": [0.3195, 0.6787, 0.3737, 0.6937]}, {"w": "defined", "b": [0.3798, 0.6787, 0.4376, 0.6937]}, {"w": "in", "b": [0.4437, 0.6787, 0.4592, 0.6937]}, {"w": "Equation", "b": [0.4653, 0.6787, 0.5393, 0.6937]}, {"w": "??", "b": [0.5454, 0.679, 0.5654, 0.694]}, {"w": "in", "b": [0.5716, 0.6787, 0.587, 0.6937]}, {"w": "the", "b": [0.5932, 0.6787, 0.6189, 0.6937]}, {"w": "previous", "b": [0.6251, 0.6787, 0.6928, 0.6937]}, {"w": "chapter.", "b": [0.6989, 0.6787, 0.7645, 0.6937]}, {"w": "Let’s", "b": [0.7727, 0.6787, 0.8122, 0.6937]}, {"w": "repeat", "b": [0.8184, 0.6787, 0.8694, 0.6937]}, {"w": "it", "b": [0.1312, 0.6967, 0.1435, 0.7116]}, {"w": "here:", "b": [0.1497, 0.6967, 0.1887, 0.7116]}]}, {"id": "b_8", "type": "paragraph", "text": "MSE(f)", "words": [{"w": "MSE(f)", "b": [0.3614, 0.7446, 0.4265, 0.7598]}]}, {"id": "b_9", "type": "equation", "text": "def = 1", "words": [{"w": "def", "b": [0.4316, 0.7397, 0.4509, 0.7502]}, {"w": "=", "b": [0.434, 0.7446, 0.4484, 0.7596]}, {"w": "1", "b": [0.462, 0.7345, 0.4712, 0.7494]}]}, {"id": "b_12", "type": "equation", "text": "i=1...N", "words": [{"w": "i=1...N", "b": [0.4803, 0.7663, 0.529, 0.7767]}]}, {"id": "b_13", "type": "paragraph", "text": "(f(xi) −yi)2.", "words": [{"w": "(f(xi)", "b": [0.5304, 0.7446, 0.5803, 0.7611]}, {"w": "−yi)2.", "b": [0.5844, 0.7422, 0.6386, 0.7611]}]}, {"id": "b_14", "type": "paragraph", "text": "For classification, a typical choice for the cost function is either categorical cross-entropy (for multiclass classification) or binary cross-entropy (for binary and multi-label classifica-", "words": [{"w": "For", "b": [0.1312, 0.7939, 0.1576, 0.8088]}, {"w": "classification,", "b": [0.1637, 0.7939, 0.2684, 0.8088]}, {"w": "a", "b": [0.2745, 0.7939, 0.2835, 0.8088]}, {"w": "typical", "b": [0.2896, 0.7939, 0.3428, 0.8088]}, {"w": "choice", "b": [0.3489, 0.7939, 0.3967, 0.8088]}, {"w": "for", "b": [0.4027, 0.7939, 0.4244, 0.8088]}, {"w": "the", "b": [0.4304, 0.7939, 0.4556, 0.8088]}, {"w": "cost", "b": [0.4616, 0.7939, 0.4929, 0.8088]}, {"w": "function", "b": [0.4989, 0.7939, 0.5637, 0.8088]}, {"w": "is", "b": [0.5698, 0.7939, 0.582, 0.8088]}, {"w": "either", "b": [0.588, 0.7939, 0.6333, 0.8088]}, {"w": "categorical", "b": [0.6391, 0.7942, 0.7383, 0.8091]}, {"w": "cross-entropy", "b": [0.7453, 0.7942, 0.8688, 0.8091]}, {"w": "(for", "b": [0.1291, 0.8118, 0.1578, 0.8268]}, {"w": "multiclass", "b": [0.1638, 0.8118, 0.2419, 0.8268]}, {"w": "classification)", "b": [0.248, 0.8118, 0.3547, 0.8268]}, {"w": "or", "b": [0.3608, 0.8118, 0.3769, 0.8268]}, {"w": "binary", "b": [0.3828, 0.8121, 0.4426, 0.8271]}, {"w": "cross-entropy", "b": [0.4495, 0.8121, 0.5731, 0.8271]}, {"w": "(for", "b": [0.5791, 0.8118, 0.6078, 0.8268]}, {"w": "binary", "b": [0.6139, 0.8118, 0.6647, 0.8268]}, {"w": "and", "b": [0.6707, 0.8118, 0.6999, 0.8268]}, {"w": "multi-label", "b": [0.7059, 0.8118, 0.7913, 0.8268]}, {"w": "classifica-", "b": [0.7974, 0.8118, 0.872, 0.8268]}]}, {"id": "b_15", "type": "paragraph", "text": "tion).", "words": [{"w": "tion).", "b": [0.1312, 0.8298, 0.1753, 0.8447]}]}, {"id": "b_16", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "4", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 180, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Recall that when we train a neural network for multiclass classification, we should represent labels using the one-hot encoding. Let C be the number of classes in our classification problem. Let yi be a one-hot encoded label of example i, where i spans from 1 to N. Let yi,j denote the value in position j (where j spans from 1 to C) in example i. The categorical cross-entropy loss for classification of example i is defined as,", "words": [{"w": "Recall", "b": [0.1312, 0.0881, 0.1797, 0.1031]}, {"w": "that", "b": [0.184, 0.0881, 0.2172, 0.1031]}, {"w": "when", "b": [0.2215, 0.0881, 0.2627, 0.1031]}, {"w": "we", "b": [0.267, 0.0881, 0.2876, 0.1031]}, {"w": "train", "b": [0.2919, 0.0881, 0.3302, 0.1031]}, {"w": "a", "b": [0.3345, 0.0881, 0.3435, 0.1031]}, {"w": "neural", "b": [0.3478, 0.0881, 0.3971, 0.1031]}, {"w": "network", "b": [0.4014, 0.0881, 0.4642, 0.1031]}, {"w": "for", "b": [0.4686, 0.0881, 0.4902, 0.1031]}, {"w": "multiclass", "b": [0.4944, 0.0884, 0.5857, 0.1034]}, {"w": "classification,", "b": [0.5906, 0.0881, 0.7121, 0.1034]}, {"w": "we", "b": [0.7167, 0.0881, 0.7373, 0.1031]}, {"w": "should", "b": [0.7416, 0.0881, 0.793, 0.1031]}, {"w": "represent", "b": [0.7973, 0.0881, 0.8694, 0.1031]}, {"w": "labels", "b": [0.1312, 0.106, 0.1779, 0.121]}, {"w": "using", "b": [0.1847, 0.106, 0.2277, 0.121]}, {"w": "the", "b": [0.2344, 0.106, 0.2606, 0.121]}, {"w": "one-hot", "b": [0.2673, 0.1064, 0.3371, 0.1213]}, {"w": "encoding.", "b": [0.3449, 0.106, 0.4326, 0.1213]}, {"w": "Let", "b": [0.4427, 0.106, 0.4701, 0.121]}, {"w": "C", "b": [0.4769, 0.1063, 0.4901, 0.1213]}, {"w": "be", "b": [0.4982, 0.106, 0.5175, 0.121]}, {"w": "the", "b": [0.5243, 0.106, 0.5504, 0.121]}, {"w": "number", "b": [0.5572, 0.106, 0.6195, 0.121]}, {"w": "of", "b": [0.6263, 0.106, 0.6415, 0.121]}, {"w": "classes", "b": [0.6482, 0.106, 0.7019, 0.121]}, {"w": "in", "b": [0.7087, 0.106, 0.7244, 0.121]}, {"w": "our", "b": [0.7312, 0.106, 0.7584, 0.121]}, {"w": "classification", "b": [0.7652, 0.106, 0.869, 0.121]}, {"w": "problem.", "b": [0.1312, 0.124, 0.2035, 0.1389]}, {"w": "Let", "b": [0.212, 0.124, 0.2395, 0.1389]}, {"w": "yi", "b": [0.2457, 0.1243, 0.2621, 0.1405]}, {"w": "be", "b": [0.2693, 0.124, 0.2886, 0.1389]}, {"w": "a", "b": [0.2949, 0.124, 0.3043, 0.1389]}, {"w": "one-hot", "b": [0.3106, 0.124, 0.3723, 0.1389]}, {"w": "encoded", "b": [0.3785, 0.124, 0.445, 0.1389]}, {"w": "label", "b": [0.4512, 0.124, 0.4905, 0.1389]}, {"w": "of", "b": [0.4967, 0.124, 0.5119, 0.1389]}, {"w": "example", "b": [0.5182, 0.124, 0.5856, 0.1389]}, {"w": "i,", "b": [0.5917, 0.124, 0.6033, 0.1392]}, {"w": "where", "b": [0.6096, 0.124, 0.6578, 0.1389]}, {"w": "i", "b": [0.664, 0.1243, 0.6704, 0.1392]}, {"w": "spans", "b": [0.6766, 0.124, 0.7218, 0.1389]}, {"w": "from", "b": [0.7281, 0.124, 0.7663, 0.1389]}, {"w": "1", "b": [0.7725, 0.124, 0.782, 0.1389]}, {"w": "to", "b": [0.7882, 0.124, 0.8049, 0.1389]}, {"w": "N.", "b": [0.8112, 0.124, 0.8333, 0.1392]}, {"w": "Let", "b": [0.8418, 0.124, 0.8693, 0.1389]}, {"w": "yi,j", "b": [0.1312, 0.1422, 0.156, 0.1584]}, {"w": "denote", "b": [0.1637, 0.1419, 0.216, 0.1569]}, {"w": "the", "b": [0.222, 0.1419, 0.2471, 0.1569]}, {"w": "value", "b": [0.2532, 0.1419, 0.2939, 0.1569]}, {"w": "in", "b": [0.2999, 0.1419, 0.315, 0.1569]}, {"w": "position", "b": [0.3211, 0.1419, 0.384, 0.1569]}, {"w": "j", "b": [0.3899, 0.1422, 0.3975, 0.1572]}, {"w": "(where", "b": [0.4046, 0.1419, 0.4579, 0.1569]}, {"w": "j", "b": [0.464, 0.1422, 0.4716, 0.1572]}, {"w": "spans", "b": [0.4787, 0.1419, 0.5221, 0.1569]}, {"w": "from", "b": [0.5281, 0.1419, 0.5648, 0.1569]}, {"w": "1", "b": [0.5709, 0.1419, 0.5799, 0.1569]}, {"w": "to", "b": [0.5859, 0.1419, 0.602, 0.1569]}, {"w": "C)", "b": [0.6081, 0.1419, 0.6296, 0.1572]}, {"w": "in", "b": [0.6357, 0.1419, 0.6507, 0.1569]}, {"w": "example", "b": [0.6568, 0.1419, 0.7216, 0.1569]}, {"w": "i.", "b": [0.7276, 0.1419, 0.739, 0.1572]}, {"w": "The", "b": [0.7472, 0.1419, 0.7783, 0.1569]}, {"w": "categorical", "b": [0.7844, 0.1419, 0.8688, 0.1569]}, {"w": "cross-entropy", "b": [0.1312, 0.1599, 0.2377, 0.1748]}, {"w": "loss", "b": [0.2438, 0.1599, 0.2728, 0.1748]}, {"w": "for", "b": [0.2789, 0.1599, 0.301, 0.1748]}, {"w": "classification", "b": [0.3072, 0.1599, 0.4089, 0.1748]}, {"w": "of", "b": [0.4151, 0.1599, 0.4299, 0.1748]}, {"w": "example", "b": [0.4361, 0.1599, 0.5022, 0.1748]}, {"w": "i", "b": [0.5082, 0.1602, 0.5145, 0.1751]}, {"w": "is", "b": [0.5207, 0.1599, 0.5331, 0.1748]}, {"w": "defined", "b": [0.5392, 0.1599, 0.5967, 0.1748]}, {"w": "as,", "b": [0.6028, 0.1599, 0.6245, 0.1748]}]}, {"id": "b_1", "type": "paragraph", "text": "CCEi", "words": [{"w": "CCEi", "b": [0.3688, 0.2156, 0.4132, 0.2321]}]}, {"id": "b_2", "type": "equation", "text": "def = −", "words": [{"w": "def", "b": [0.4193, 0.2108, 0.4386, 0.2212]}, {"w": "=", "b": [0.4217, 0.2156, 0.4361, 0.2306]}, {"w": "−", "b": [0.4437, 0.2157, 0.458, 0.2307]}]}, {"id": "b_3", "type": "paragraph", "text": "C X", "words": [{"w": "C", "b": [0.4687, 0.2007, 0.4793, 0.2112]}, {"w": "X", "b": [0.4611, 0.2125, 0.4878, 0.2274]}]}, {"id": "b_4", "type": "equation", "text": "j=1", "words": [{"w": "j=1", "b": [0.4617, 0.2371, 0.4872, 0.2476]}]}, {"id": "b_5", "type": "paragraph", "text": "[yi,j × log2(ˆyi,j)] ,", "words": [{"w": "[yi,j", "b": [0.4908, 0.2156, 0.5208, 0.2321]}, {"w": "×", "b": [0.5266, 0.2157, 0.5409, 0.2307]}, {"w": "log2(ˆyi,j)]", "b": [0.545, 0.2156, 0.623, 0.2336]}, {"w": ",", "b": [0.6261, 0.2159, 0.6312, 0.2309]}]}, {"id": "b_6", "type": "paragraph", "text": "where ˆyi is the C-dimensional vector of prediction issued by the neural network for the input xi. The cost function is typically defined as the sum of losses of individual examples:", "words": [{"w": "where", "b": [0.1306, 0.2637, 0.1787, 0.2787]}, {"w": "ˆyi", "b": [0.1864, 0.2637, 0.2028, 0.2802]}, {"w": "is", "b": [0.2113, 0.2637, 0.224, 0.2787]}, {"w": "the", "b": [0.2317, 0.2637, 0.2578, 0.2787]}, {"w": "C-dimensional", "b": [0.2654, 0.2637, 0.3836, 0.279]}, {"w": "vector", "b": [0.3912, 0.2637, 0.4415, 0.2787]}, {"w": "of", "b": [0.4491, 0.2637, 0.4643, 0.2787]}, {"w": "prediction", "b": [0.472, 0.2637, 0.5547, 0.2787]}, {"w": "issued", "b": [0.5623, 0.2637, 0.6117, 0.2787]}, {"w": "by", "b": [0.6193, 0.2637, 0.6392, 0.2787]}, {"w": "the", "b": [0.6469, 0.2637, 0.673, 0.2787]}, {"w": "neural", "b": [0.6807, 0.2637, 0.732, 0.2787]}, {"w": "network", "b": [0.7396, 0.2637, 0.8051, 0.2787]}, {"w": "for", "b": [0.8127, 0.2637, 0.8353, 0.2787]}, {"w": "the", "b": [0.8429, 0.2637, 0.8691, 0.2787]}, {"w": "input", "b": [0.1312, 0.2817, 0.1743, 0.2967]}, {"w": "xi.", "b": [0.1804, 0.2817, 0.2029, 0.2982]}, {"w": "The", "b": [0.2111, 0.2817, 0.2429, 0.2967]}, {"w": "cost", "b": [0.249, 0.2817, 0.2809, 0.2967]}, {"w": "function", "b": [0.2871, 0.2817, 0.3532, 0.2967]}, {"w": "is", "b": [0.3594, 0.2817, 0.3718, 0.2967]}, {"w": "typically", "b": [0.3779, 0.2817, 0.4472, 0.2967]}, {"w": "defined", "b": [0.4533, 0.2817, 0.5108, 0.2967]}, {"w": "as", "b": [0.5169, 0.2817, 0.5334, 0.2967]}, {"w": "the", "b": [0.5396, 0.2817, 0.5652, 0.2967]}, {"w": "sum", "b": [0.5714, 0.2817, 0.6043, 0.2967]}, {"w": "of", "b": [0.6104, 0.2817, 0.6253, 0.2967]}, {"w": "losses", "b": [0.6315, 0.2817, 0.6759, 0.2967]}, {"w": "of", "b": [0.682, 0.2817, 0.6969, 0.2967]}, {"w": "individual", "b": [0.703, 0.2817, 0.7836, 0.2967]}, {"w": "examples:", "b": [0.7897, 0.2817, 0.8683, 0.2967]}]}, {"id": "b_7", "type": "paragraph", "text": "CCE", "words": [{"w": "CCE", "b": [0.424, 0.3375, 0.4632, 0.3524]}]}, {"id": "b_8", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.4683, 0.3326, 0.4876, 0.343]}, {"w": "=", "b": [0.4708, 0.3375, 0.4851, 0.3524]}]}, {"id": "b_9", "type": "paragraph", "text": "N X", "words": [{"w": "N", "b": [0.4995, 0.3225, 0.5112, 0.333]}, {"w": "X", "b": [0.4927, 0.3343, 0.5194, 0.3492]}]}, {"id": "b_10", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.4941, 0.3589, 0.518, 0.3694]}]}, {"id": "b_11", "type": "paragraph", "text": "CCEi .", "words": [{"w": "CCEi", "b": [0.5225, 0.3375, 0.5669, 0.3539]}, {"w": ".", "b": [0.5709, 0.3377, 0.576, 0.3527]}]}, {"id": "b_12", "type": "paragraph", "text": "In binary classification, the output of the neural network for the input feature vector xi, is a single value ˆyi, while the label of the example is a single value yi, just like in logistic regression. The binary cross-entropy loss for classification of example i is defined as,", "words": [{"w": "In", "b": [0.1312, 0.3836, 0.1482, 0.3986]}, {"w": "binary", "b": [0.1545, 0.3839, 0.2142, 0.3989]}, {"w": "classification,", "b": [0.2213, 0.3836, 0.3428, 0.3989]}, {"w": "the", "b": [0.349, 0.3836, 0.3747, 0.3986]}, {"w": "output", "b": [0.3809, 0.3836, 0.4354, 0.3986]}, {"w": "of", "b": [0.4416, 0.3836, 0.4565, 0.3986]}, {"w": "the", "b": [0.4626, 0.3836, 0.4884, 0.3986]}, {"w": "neural", "b": [0.4945, 0.3836, 0.545, 0.3986]}, {"w": "network", "b": [0.5512, 0.3836, 0.6155, 0.3986]}, {"w": "for", "b": [0.6217, 0.3836, 0.6438, 0.3986]}, {"w": "the", "b": [0.65, 0.3836, 0.6757, 0.3986]}, {"w": "input", "b": [0.6819, 0.3836, 0.7251, 0.3986]}, {"w": "feature", "b": [0.7312, 0.3836, 0.7873, 0.3986]}, {"w": "vector", "b": [0.7935, 0.3836, 0.843, 0.3986]}, {"w": "xi,", "b": [0.8488, 0.3836, 0.8713, 0.4001]}, {"w": "is", "b": [0.1312, 0.4016, 0.1439, 0.4165]}, {"w": "a", "b": [0.1505, 0.4016, 0.1599, 0.4165]}, {"w": "single", "b": [0.1666, 0.4016, 0.2127, 0.4165]}, {"w": "value", "b": [0.2193, 0.4016, 0.2617, 0.4165]}, {"w": "ˆyi,", "b": [0.2683, 0.4016, 0.2887, 0.4181]}, {"w": "while", "b": [0.2955, 0.4016, 0.3384, 0.4165]}, {"w": "the", "b": [0.345, 0.4016, 0.3711, 0.4165]}, {"w": "label", "b": [0.3778, 0.4016, 0.417, 0.4165]}, {"w": "of", "b": [0.4236, 0.4016, 0.4388, 0.4165]}, {"w": "the", "b": [0.4454, 0.4016, 0.4716, 0.4165]}, {"w": "example", "b": [0.4782, 0.4016, 0.5457, 0.4165]}, {"w": "is", "b": [0.5523, 0.4016, 0.565, 0.4165]}, {"w": "a", "b": [0.5716, 0.4016, 0.581, 0.4165]}, {"w": "single", "b": [0.5876, 0.4016, 0.6338, 0.4165]}, {"w": "value", "b": [0.6404, 0.4016, 0.6828, 0.4165]}, {"w": "yi,", "b": [0.6892, 0.4016, 0.7096, 0.4181]}, {"w": "just", "b": [0.7164, 0.4016, 0.7474, 0.4165]}, {"w": "like", "b": [0.754, 0.4016, 0.7823, 0.4165]}, {"w": "in", "b": [0.7889, 0.4016, 0.8046, 0.4165]}, {"w": "logistic", "b": [0.8112, 0.4016, 0.8689, 0.4165]}, {"w": "regression.", "b": [0.1312, 0.4195, 0.2157, 0.4345]}, {"w": "The", "b": [0.2238, 0.4195, 0.2556, 0.4345]}, {"w": "binary", "b": [0.2618, 0.4195, 0.3136, 0.4345]}, {"w": "cross-entropy", "b": [0.3198, 0.4195, 0.4262, 0.4345]}, {"w": "loss", "b": [0.4324, 0.4195, 0.4613, 0.4345]}, {"w": "for", "b": [0.4675, 0.4195, 0.4896, 0.4345]}, {"w": "classification", "b": [0.4957, 0.4195, 0.5974, 0.4345]}, {"w": "of", "b": [0.6036, 0.4195, 0.6185, 0.4345]}, {"w": "example", "b": [0.6246, 0.4195, 0.6908, 0.4345]}, {"w": "i", "b": [0.6966, 0.4198, 0.703, 0.4348]}, {"w": "is", "b": [0.7091, 0.4195, 0.7215, 0.4345]}, {"w": "defined", "b": [0.7277, 0.4195, 0.7851, 0.4345]}, {"w": "as,", "b": [0.7913, 0.4195, 0.8129, 0.4345]}]}, {"id": "b_13", "type": "paragraph", "text": "BCEi", "words": [{"w": "BCEi", "b": [0.3034, 0.4644, 0.3475, 0.4809]}]}, {"id": "b_14", "type": "equation", "text": "def = −yi × log2(ˆyi) −(1 −yi) × log2(1 −ˆyi).", "words": [{"w": "def", "b": [0.3536, 0.4595, 0.3729, 0.47]}, {"w": "=", "b": [0.356, 0.4644, 0.3704, 0.4794]}, {"w": "−yi", "b": [0.378, 0.4645, 0.4066, 0.4809]}, {"w": "×", "b": [0.4116, 0.4645, 0.426, 0.4794]}, {"w": "log2(ˆyi)", "b": [0.4301, 0.4644, 0.4917, 0.4823]}, {"w": "−(1", "b": [0.4958, 0.4644, 0.5306, 0.4794]}, {"w": "−yi)", "b": [0.5347, 0.4644, 0.5756, 0.4809]}, {"w": "×", "b": [0.5797, 0.4645, 0.594, 0.4794]}, {"w": "log2(1", "b": [0.5981, 0.4644, 0.6466, 0.4823]}, {"w": "−ˆyi).", "b": [0.6507, 0.4644, 0.6966, 0.4809]}]}, {"id": "b_15", "type": "paragraph", "text": "Similarly, the cost function for classification of the training set is typically defined as the sum of losses of individual examples:", "words": [{"w": "Similarly,", "b": [0.1312, 0.4974, 0.2056, 0.5124]}, {"w": "the", "b": [0.2115, 0.4974, 0.2366, 0.5124]}, {"w": "cost", "b": [0.2424, 0.4974, 0.2736, 0.5124]}, {"w": "function", "b": [0.2794, 0.4974, 0.3443, 0.5124]}, {"w": "for", "b": [0.35, 0.4974, 0.3717, 0.5124]}, {"w": "classification", "b": [0.3775, 0.4974, 0.4772, 0.5124]}, {"w": "of", "b": [0.483, 0.4974, 0.4975, 0.5124]}, {"w": "the", "b": [0.5033, 0.4974, 0.5285, 0.5124]}, {"w": "training", "b": [0.5342, 0.4974, 0.5966, 0.5124]}, {"w": "set", "b": [0.6024, 0.4974, 0.6246, 0.5124]}, {"w": "is", "b": [0.6304, 0.4974, 0.6425, 0.5124]}, {"w": "typically", "b": [0.6483, 0.4974, 0.7162, 0.5124]}, {"w": "defined", "b": [0.722, 0.4974, 0.7782, 0.5124]}, {"w": "as", "b": [0.784, 0.4974, 0.8002, 0.5124]}, {"w": "the", "b": [0.806, 0.4974, 0.8311, 0.5124]}, {"w": "sum", "b": [0.8369, 0.4974, 0.8692, 0.5124]}, {"w": "of", "b": [0.1312, 0.5154, 0.1461, 0.5303]}, {"w": "losses", "b": [0.1522, 0.5154, 0.1967, 0.5303]}, {"w": "of", "b": [0.2028, 0.5154, 0.2177, 0.5303]}, {"w": "individual", "b": [0.2238, 0.5154, 0.3043, 0.5303]}, {"w": "examples:", "b": [0.3105, 0.5154, 0.3891, 0.5303]}]}, {"id": "b_16", "type": "paragraph", "text": "BCE", "words": [{"w": "BCE", "b": [0.4243, 0.5711, 0.4632, 0.5861]}]}, {"id": "b_17", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.4683, 0.5663, 0.4876, 0.5767]}, {"w": "=", "b": [0.4708, 0.5711, 0.4851, 0.5861]}]}, {"id": "b_18", "type": "paragraph", "text": "N X", "words": [{"w": "N", "b": [0.4995, 0.5562, 0.5112, 0.5667]}, {"w": "X", "b": [0.4927, 0.568, 0.5194, 0.5829]}]}, {"id": "b_19", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.4941, 0.5926, 0.518, 0.6031]}]}, {"id": "b_20", "type": "paragraph", "text": "BCEi .", "words": [{"w": "BCEi", "b": [0.5225, 0.5711, 0.5666, 0.5876]}, {"w": ".", "b": [0.5706, 0.5714, 0.5757, 0.5864]}]}, {"id": "b_21", "type": "paragraph", "text": "Binary cross-entropy is also used in multi-label classification. The labels are now C- dimensional bag-of-words vectors yi, while the predictions are C-dimensional vectors ˆyi, whose values ˆyi,j in each dimension j range between 0 and 1. The loss for the prediction of one label ˆyi is defined as,", "words": [{"w": "Binary", "b": [0.1312, 0.6173, 0.187, 0.6323]}, {"w": "cross-entropy", "b": [0.1948, 0.6173, 0.3034, 0.6323]}, {"w": "is", "b": [0.3112, 0.6173, 0.3238, 0.6323]}, {"w": "also", "b": [0.3316, 0.6173, 0.3631, 0.6323]}, {"w": "used", "b": [0.3709, 0.6173, 0.4076, 0.6323]}, {"w": "in", "b": [0.4154, 0.6173, 0.4311, 0.6323]}, {"w": "multi-label", "b": [0.4389, 0.6176, 0.5391, 0.6326]}, {"w": "classification.", "b": [0.5481, 0.6173, 0.6697, 0.6326]}, {"w": "The", "b": [0.6828, 0.6173, 0.7152, 0.6323]}, {"w": "labels", "b": [0.723, 0.6173, 0.7697, 0.6323]}, {"w": "are", "b": [0.7775, 0.6173, 0.8026, 0.6323]}, {"w": "now", "b": [0.8104, 0.6173, 0.8433, 0.6323]}, {"w": "C-", "b": [0.8511, 0.6173, 0.8718, 0.6326]}, {"w": "dimensional", "b": [0.1312, 0.6353, 0.2286, 0.6502]}, {"w": "bag-of-words", "b": [0.2348, 0.6356, 0.353, 0.6505]}, {"w": "vectors", "b": [0.3592, 0.6353, 0.4169, 0.6502]}, {"w": "yi,", "b": [0.423, 0.6353, 0.4456, 0.6518]}, {"w": "while", "b": [0.4518, 0.6353, 0.4946, 0.6502]}, {"w": "the", "b": [0.5008, 0.6353, 0.527, 0.6502]}, {"w": "predictions", "b": [0.5331, 0.6353, 0.6233, 0.6502]}, {"w": "are", "b": [0.6294, 0.6353, 0.6546, 0.6502]}, {"w": "C-dimensional", "b": [0.6606, 0.6353, 0.7788, 0.6505]}, {"w": "vectors", "b": [0.785, 0.6353, 0.8427, 0.6502]}, {"w": "ˆyi,", "b": [0.8488, 0.6353, 0.8713, 0.6518]}, {"w": "whose", "b": [0.1306, 0.6532, 0.1789, 0.6682]}, {"w": "values", "b": [0.1851, 0.6532, 0.234, 0.6682]}, {"w": "ˆyi,j", "b": [0.2401, 0.6532, 0.2648, 0.6697]}, {"w": "in", "b": [0.2726, 0.6532, 0.288, 0.6682]}, {"w": "each", "b": [0.2942, 0.6532, 0.3296, 0.6682]}, {"w": "dimension", "b": [0.3358, 0.6532, 0.417, 0.6682]}, {"w": "j", "b": [0.4231, 0.6535, 0.4307, 0.6685]}, {"w": "range", "b": [0.4379, 0.6532, 0.4821, 0.6682]}, {"w": "between", "b": [0.4883, 0.6532, 0.5534, 0.6682]}, {"w": "0", "b": [0.5595, 0.6532, 0.5688, 0.6682]}, {"w": "and", "b": [0.5749, 0.6532, 0.6047, 0.6682]}, {"w": "1.", "b": [0.6109, 0.6532, 0.6252, 0.6682]}, {"w": "The", "b": [0.6335, 0.6532, 0.6653, 0.6682]}, {"w": "loss", "b": [0.6715, 0.6532, 0.7004, 0.6682]}, {"w": "for", "b": [0.7066, 0.6532, 0.7287, 0.6682]}, {"w": "the", "b": [0.7349, 0.6532, 0.7605, 0.6682]}, {"w": "prediction", "b": [0.7667, 0.6532, 0.8479, 0.6682]}, {"w": "of", "b": [0.854, 0.6532, 0.8689, 0.6682]}, {"w": "one", "b": [0.1312, 0.6712, 0.1589, 0.6861]}, {"w": "label", "b": [0.1651, 0.6712, 0.2035, 0.6861]}, {"w": "ˆyi", "b": [0.2096, 0.6711, 0.2261, 0.6877]}, {"w": "is", "b": [0.2331, 0.6712, 0.2455, 0.6861]}, {"w": "defined", "b": [0.2517, 0.6712, 0.3091, 0.6861]}, {"w": "as,", "b": [0.3153, 0.6712, 0.3369, 0.6861]}]}, {"id": "b_22", "type": "paragraph", "text": "BCEMi", "words": [{"w": "BCEMi", "b": [0.2509, 0.7269, 0.312, 0.7434]}]}, {"id": "b_23", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.318, 0.722, 0.3373, 0.7325]}, {"w": "=", "b": [0.3205, 0.7269, 0.3348, 0.7419]}]}, {"id": "b_24", "type": "paragraph", "text": "C X", "words": [{"w": "C", "b": [0.35, 0.712, 0.3606, 0.7225]}, {"w": "X", "b": [0.3424, 0.7238, 0.3691, 0.7387]}]}, {"id": "b_25", "type": "equation", "text": "j=1", "words": [{"w": "j=1", "b": [0.343, 0.7484, 0.3685, 0.7588]}]}, {"id": "b_26", "type": "paragraph", "text": "[−yi,j × log2(ˆyi,j) −(1 −yi,j) × log2(1 −ˆyi,j)] .", "words": [{"w": "[−yi,j", "b": [0.3721, 0.7269, 0.4165, 0.7434]}, {"w": "×", "b": [0.4222, 0.727, 0.4366, 0.742]}, {"w": "log2(ˆyi,j)", "b": [0.4407, 0.7269, 0.5135, 0.7449]}, {"w": "−(1", "b": [0.5176, 0.7269, 0.5525, 0.742]}, {"w": "−yi,j)", "b": [0.5566, 0.7269, 0.6086, 0.7434]}, {"w": "×", "b": [0.6127, 0.727, 0.6271, 0.742]}, {"w": "log2(1", "b": [0.6312, 0.7269, 0.6797, 0.7449]}, {"w": "−ˆyi,j)]", "b": [0.6838, 0.7269, 0.7409, 0.7434]}, {"w": ".", "b": [0.744, 0.7272, 0.7491, 0.7422]}]}, {"id": "b_27", "type": "paragraph", "text": "The cost function for the classification of the entire training set is typically defined as the sum of losses of individual examples,", "words": [{"w": "The", "b": [0.1306, 0.775, 0.163, 0.79]}, {"w": "cost", "b": [0.1692, 0.775, 0.2017, 0.79]}, {"w": "function", "b": [0.2079, 0.775, 0.2754, 0.79]}, {"w": "for", "b": [0.2816, 0.775, 0.3041, 0.79]}, {"w": "the", "b": [0.3103, 0.775, 0.3365, 0.79]}, {"w": "classification", "b": [0.3427, 0.775, 0.4464, 0.79]}, {"w": "of", "b": [0.4526, 0.775, 0.4678, 0.79]}, {"w": "the", "b": [0.474, 0.775, 0.5001, 0.79]}, {"w": "entire", "b": [0.5063, 0.775, 0.5529, 0.79]}, {"w": "training", "b": [0.5591, 0.775, 0.624, 0.79]}, {"w": "set", "b": [0.6302, 0.775, 0.6534, 0.79]}, {"w": "is", "b": [0.6595, 0.775, 0.6722, 0.79]}, {"w": "typically", "b": [0.6784, 0.775, 0.749, 0.79]}, {"w": "defined", "b": [0.7552, 0.775, 0.8138, 0.79]}, {"w": "as", "b": [0.82, 0.775, 0.8368, 0.79]}, {"w": "the", "b": [0.843, 0.775, 0.8692, 0.79]}, {"w": "sum", "b": [0.1312, 0.793, 0.1641, 0.8079]}, {"w": "of", "b": [0.1703, 0.793, 0.1852, 0.8079]}, {"w": "losses", "b": [0.1913, 0.793, 0.2357, 0.8079]}, {"w": "of", "b": [0.2419, 0.793, 0.2568, 0.8079]}, {"w": "individual", "b": [0.2629, 0.793, 0.3434, 0.8079]}, {"w": "examples,", "b": [0.3496, 0.793, 0.4281, 0.8079]}]}, {"id": "b_28", "type": "paragraph", "text": "BCEM", "words": [{"w": "BCEM", "b": [0.4073, 0.8487, 0.4632, 0.8637]}]}, {"id": "b_29", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.4683, 0.8438, 0.4876, 0.8543]}, {"w": "=", "b": [0.4708, 0.8487, 0.4851, 0.8637]}]}, {"id": "b_30", "type": "paragraph", "text": "N X", "words": [{"w": "N", "b": [0.4995, 0.8338, 0.5112, 0.8443]}, {"w": "X", "b": [0.4927, 0.8455, 0.5194, 0.8605]}]}, {"id": "b_31", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.4941, 0.8701, 0.518, 0.8806]}]}, {"id": "b_32", "type": "paragraph", "text": "BCEMi .", "words": [{"w": "BCEMi", "b": [0.5225, 0.8487, 0.5835, 0.8652]}, {"w": ".", "b": [0.5875, 0.849, 0.5927, 0.8639]}]}, {"id": "b_33", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "5", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 181, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Note that the output layers in multiclass and multi-label classification are different. In multiclass classification, one softmax unit is used. It generates a C-dimensional vector whose values are bounded by the range (0, 1), and whose sum equals 1. In multi-label classification, the output layer contains C logistic units whose values also lie in the range (0, 1), but their sum lies in the range (0, C).", "words": [{"w": "Note", "b": [0.1312, 0.0881, 0.1705, 0.1031]}, {"w": "that", "b": [0.1783, 0.0881, 0.2128, 0.1031]}, {"w": "the", "b": [0.2207, 0.0881, 0.2469, 0.1031]}, {"w": "output", "b": [0.2548, 0.0881, 0.3102, 0.1031]}, {"w": "layers", "b": [0.3181, 0.0881, 0.3648, 0.1031]}, {"w": "in", "b": [0.3727, 0.0881, 0.3884, 0.1031]}, {"w": "multiclass", "b": [0.3963, 0.0881, 0.4776, 0.1031]}, {"w": "and", "b": [0.4854, 0.0881, 0.5158, 0.1031]}, {"w": "multi-label", "b": [0.5237, 0.0881, 0.6126, 0.1031]}, {"w": "classification", "b": [0.6205, 0.0881, 0.7242, 0.1031]}, {"w": "are", "b": [0.7321, 0.0881, 0.7573, 0.1031]}, {"w": "different.", "b": [0.7651, 0.0881, 0.8384, 0.1031]}, {"w": "In", "b": [0.8518, 0.0881, 0.8691, 0.1031]}, {"w": "multiclass", "b": [0.1312, 0.106, 0.2093, 0.121]}, {"w": "classification,", "b": [0.2144, 0.106, 0.3192, 0.121]}, {"w": "one", "b": [0.3245, 0.106, 0.3516, 0.121]}, {"w": "softmax", "b": [0.3566, 0.1064, 0.4295, 0.1213]}, {"w": "unit", "b": [0.4348, 0.106, 0.4669, 0.121]}, {"w": "is", "b": [0.4721, 0.106, 0.4842, 0.121]}, {"w": "used.", "b": [0.4894, 0.106, 0.5297, 0.121]}, {"w": "It", "b": [0.5375, 0.106, 0.5511, 0.121]}, {"w": "generates", "b": [0.5562, 0.106, 0.6297, 0.121]}, {"w": "a", "b": [0.6349, 0.106, 0.6439, 0.121]}, {"w": "C-dimensional", "b": [0.6489, 0.106, 0.763, 0.1213]}, {"w": "vector", "b": [0.7681, 0.106, 0.8164, 0.121]}, {"w": "whose", "b": [0.8215, 0.106, 0.8689, 0.121]}, {"w": "values", "b": [0.1308, 0.124, 0.1787, 0.1389]}, {"w": "are", "b": [0.1849, 0.124, 0.2091, 0.1389]}, {"w": "bounded", "b": [0.2152, 0.124, 0.2833, 0.1389]}, {"w": "by", "b": [0.2894, 0.124, 0.3086, 0.1389]}, {"w": "the", "b": [0.3147, 0.124, 0.3399, 0.1389]}, {"w": "range", "b": [0.346, 0.124, 0.3894, 0.1389]}, {"w": "(0,", "b": [0.3954, 0.124, 0.4167, 0.1392]}, {"w": "1),", "b": [0.4197, 0.124, 0.4409, 0.1389]}, {"w": "and", "b": [0.447, 0.124, 0.4763, 0.1389]}, {"w": "whose", "b": [0.4824, 0.124, 0.5299, 0.1389]}, {"w": "sum", "b": [0.536, 0.124, 0.5684, 0.1389]}, {"w": "equals", "b": [0.5745, 0.124, 0.6235, 0.1389]}, {"w": "1.", "b": [0.6295, 0.124, 0.6436, 0.1389]}, {"w": "In", "b": [0.6518, 0.124, 0.6685, 0.1389]}, {"w": "multi-label", "b": [0.6746, 0.124, 0.7602, 0.1389]}, {"w": "classification,", "b": [0.7664, 0.124, 0.8714, 0.1389]}, {"w": "the", "b": [0.1312, 0.1419, 0.1569, 0.1569]}, {"w": "output", "b": [0.1631, 0.1419, 0.2175, 0.1569]}, {"w": "layer", "b": [0.2236, 0.1419, 0.2622, 0.1569]}, {"w": "contains", "b": [0.2683, 0.1419, 0.3346, 0.1569]}, {"w": "C", "b": [0.3406, 0.1422, 0.3538, 0.1572]}, {"w": "logistic", "b": [0.3613, 0.1419, 0.4179, 0.1569]}, {"w": "units", "b": [0.424, 0.1419, 0.4641, 0.1569]}, {"w": "whose", "b": [0.4703, 0.1419, 0.5186, 0.1569]}, {"w": "values", "b": [0.5248, 0.1419, 0.5737, 0.1569]}, {"w": "also", "b": [0.5798, 0.1419, 0.6107, 0.1569]}, {"w": "lie", "b": [0.6168, 0.1419, 0.6353, 0.1569]}, {"w": "in", "b": [0.6415, 0.1419, 0.6569, 0.1569]}, {"w": "the", "b": [0.663, 0.1419, 0.6887, 0.1569]}, {"w": "range", "b": [0.6948, 0.1419, 0.739, 0.1569]}, {"w": "(0,", "b": [0.745, 0.1419, 0.7665, 0.1572]}, {"w": "1),", "b": [0.7696, 0.1419, 0.7911, 0.1569]}, {"w": "but", "b": [0.7973, 0.1419, 0.825, 0.1569]}, {"w": "their", "b": [0.8311, 0.1419, 0.8692, 0.1569]}, {"w": "sum", "b": [0.1312, 0.1599, 0.1641, 0.1748]}, {"w": "lies", "b": [0.1703, 0.1599, 0.196, 0.1748]}, {"w": "in", "b": [0.2022, 0.1599, 0.2176, 0.1748]}, {"w": "the", "b": [0.2237, 0.1599, 0.2494, 0.1748]}, {"w": "range", "b": [0.2555, 0.1599, 0.2997, 0.1748]}, {"w": "(0,", "b": [0.3057, 0.1599, 0.3273, 0.1751]}, {"w": "C).", "b": [0.3303, 0.1599, 0.3571, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "Neural Network Output", "words": [{"w": "Neural", "b": [0.1312, 0.1871, 0.1943, 0.2021]}, {"w": "Network", "b": [0.2014, 0.1871, 0.2807, 0.2021]}, {"w": "Output", "b": [0.2877, 0.1871, 0.3555, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "The curious reader may wish to better understand the logic behind choosing a specific loss function. This block will mathematically describe the output of a neural network.", "words": [{"w": "The", "b": [0.1767, 0.2257, 0.2082, 0.2406]}, {"w": "curious", "b": [0.2143, 0.2257, 0.2713, 0.2406]}, {"w": "reader", "b": [0.2775, 0.2257, 0.3273, 0.2406]}, {"w": "may", "b": [0.3335, 0.2257, 0.367, 0.2406]}, {"w": "wish", "b": [0.3731, 0.2257, 0.4087, 0.2406]}, {"w": "to", "b": [0.4149, 0.2257, 0.4311, 0.2406]}, {"w": "better", "b": [0.4373, 0.2257, 0.4856, 0.2406]}, {"w": "understand", "b": [0.4917, 0.2257, 0.5812, 0.2406]}, {"w": "the", "b": [0.5874, 0.2257, 0.6128, 0.2406]}, {"w": "logic", "b": [0.6189, 0.2257, 0.6555, 0.2406]}, {"w": "behind", "b": [0.6616, 0.2257, 0.7159, 0.2406]}, {"w": "choosing", "b": [0.7221, 0.2257, 0.7902, 0.2406]}, {"w": "a", "b": [0.7964, 0.2257, 0.8055, 0.2406]}, {"w": "specific", "b": [0.8116, 0.2257, 0.8691, 0.2406]}, {"w": "loss", "b": [0.1774, 0.2436, 0.2062, 0.2586]}, {"w": "function.", "b": [0.2124, 0.2436, 0.2835, 0.2586]}, {"w": "This", "b": [0.2917, 0.2436, 0.3276, 0.2586]}, {"w": "block", "b": [0.3337, 0.2436, 0.3762, 0.2586]}, {"w": "will", "b": [0.3823, 0.2436, 0.411, 0.2586]}, {"w": "mathematically", "b": [0.4171, 0.2436, 0.5414, 0.2586]}, {"w": "describe", "b": [0.5475, 0.2436, 0.6127, 0.2586]}, {"w": "the", "b": [0.6188, 0.2436, 0.6444, 0.2586]}, {"w": "output", "b": [0.6506, 0.2436, 0.7048, 0.2586]}, {"w": "of", "b": [0.7109, 0.2436, 0.7258, 0.2586]}, {"w": "a", "b": [0.7319, 0.2436, 0.7411, 0.2586]}, {"w": "neural", "b": [0.7472, 0.2436, 0.7974, 0.2586]}, {"w": "network.", "b": [0.8035, 0.2436, 0.8727, 0.2586]}]}, {"id": "b_3", "type": "paragraph", "text": "In regression, the output layer contains only one unit. If the output value can be any number, from minus infinity to infinity, then the output unit will not contain non-linearity. On the other hand, if the neural network must predict a positive number, then the ReLU (rectified linear unit) non-linearity can be used. Let the output value of the output unit before non-linearity for the input example i be denoted as zi. Then the output after applying the ReLU non-linearity is given by max(0, zi).", "words": [{"w": "In", "b": [0.1774, 0.2706, 0.1946, 0.2855]}, {"w": "regression,", "b": [0.2023, 0.2706, 0.2884, 0.2855]}, {"w": "the", "b": [0.2966, 0.2706, 0.3227, 0.2855]}, {"w": "output", "b": [0.3305, 0.2706, 0.3859, 0.2855]}, {"w": "layer", "b": [0.3936, 0.2706, 0.4329, 0.2855]}, {"w": "contains", "b": [0.4406, 0.2706, 0.5082, 0.2855]}, {"w": "only", "b": [0.516, 0.2706, 0.551, 0.2855]}, {"w": "one", "b": [0.5587, 0.2706, 0.587, 0.2855]}, {"w": "unit.", "b": [0.5947, 0.2706, 0.6334, 0.2855]}, {"w": "If", "b": [0.6463, 0.2706, 0.6589, 0.2855]}, {"w": "the", "b": [0.6666, 0.2706, 0.6928, 0.2855]}, {"w": "output", "b": [0.7005, 0.2706, 0.7559, 0.2855]}, {"w": "value", "b": [0.7637, 0.2706, 0.8061, 0.2855]}, {"w": "can", "b": [0.8138, 0.2706, 0.842, 0.2855]}, {"w": "be", "b": [0.8498, 0.2706, 0.8691, 0.2855]}, {"w": "any", "b": [0.1774, 0.2885, 0.2067, 0.3035]}, {"w": "number,", "b": [0.2144, 0.2885, 0.282, 0.3035]}, {"w": "from", "b": [0.2902, 0.2885, 0.3284, 0.3035]}, {"w": "minus", "b": [0.3362, 0.2885, 0.3849, 0.3035]}, {"w": "infinity", "b": [0.3927, 0.2885, 0.4513, 0.3035]}, {"w": "to", "b": [0.4591, 0.2885, 0.4758, 0.3035]}, {"w": "infinity,", "b": [0.4836, 0.2885, 0.5459, 0.3035]}, {"w": "then", "b": [0.5541, 0.2885, 0.5907, 0.3035]}, {"w": "the", "b": [0.5985, 0.2885, 0.6246, 0.3035]}, {"w": "output", "b": [0.6324, 0.2885, 0.6878, 0.3035]}, {"w": "unit", "b": [0.6956, 0.2885, 0.7291, 0.3035]}, {"w": "will", "b": [0.7369, 0.2885, 0.7661, 0.3035]}, {"w": "not", "b": [0.7739, 0.2885, 0.8011, 0.3035]}, {"w": "contain", "b": [0.8089, 0.2885, 0.8691, 0.3035]}, {"w": "non-linearity.", "b": [0.1774, 0.3065, 0.2814, 0.3214]}, {"w": "On", "b": [0.2895, 0.3065, 0.3136, 0.3214]}, {"w": "the", "b": [0.3195, 0.3065, 0.3446, 0.3214]}, {"w": "other", "b": [0.3505, 0.3065, 0.3918, 0.3214]}, {"w": "hand,", "b": [0.3977, 0.3065, 0.4419, 0.3214]}, {"w": "if", "b": [0.4478, 0.3065, 0.4584, 0.3214]}, {"w": "the", "b": [0.4643, 0.3065, 0.4894, 0.3214]}, {"w": "neural", "b": [0.4953, 0.3065, 0.5446, 0.3214]}, {"w": "network", "b": [0.5505, 0.3065, 0.6133, 0.3214]}, {"w": "must", "b": [0.6192, 0.3065, 0.658, 0.3214]}, {"w": "predict", "b": [0.6639, 0.3065, 0.7192, 0.3214]}, {"w": "a", "b": [0.7251, 0.3065, 0.7341, 0.3214]}, {"w": "positive", "b": [0.74, 0.3065, 0.8009, 0.3214]}, {"w": "number,", "b": [0.8068, 0.3065, 0.8717, 0.3214]}, {"w": "then", "b": [0.1774, 0.3244, 0.2131, 0.3394]}, {"w": "the", "b": [0.2193, 0.3244, 0.2448, 0.3394]}, {"w": "ReLU", "b": [0.2509, 0.3247, 0.3056, 0.3397]}, {"w": "(rectified", "b": [0.3117, 0.3244, 0.3833, 0.3394]}, {"w": "linear", "b": [0.3895, 0.3244, 0.4345, 0.3394]}, {"w": "unit)", "b": [0.4406, 0.3244, 0.4804, 0.3394]}, {"w": "non-linearity", "b": [0.4866, 0.3244, 0.5887, 0.3394]}, {"w": "can", "b": [0.5949, 0.3244, 0.6225, 0.3394]}, {"w": "be", "b": [0.6286, 0.3244, 0.6475, 0.3394]}, {"w": "used.", "b": [0.6536, 0.3244, 0.6946, 0.3394]}, {"w": "Let", "b": [0.7028, 0.3244, 0.7296, 0.3394]}, {"w": "the", "b": [0.7358, 0.3244, 0.7613, 0.3394]}, {"w": "output", "b": [0.7674, 0.3244, 0.8216, 0.3394]}, {"w": "value", "b": [0.8277, 0.3244, 0.8691, 0.3394]}, {"w": "of", "b": [0.1774, 0.3423, 0.1921, 0.3573]}, {"w": "the", "b": [0.1982, 0.3423, 0.2236, 0.3573]}, {"w": "output", "b": [0.2297, 0.3423, 0.2835, 0.3573]}, {"w": "unit", "b": [0.2896, 0.3423, 0.3221, 0.3573]}, {"w": "before", "b": [0.3282, 0.3423, 0.377, 0.3573]}, {"w": "non-linearity", "b": [0.3831, 0.3423, 0.4846, 0.3573]}, {"w": "for", "b": [0.4907, 0.3423, 0.5126, 0.3573]}, {"w": "the", "b": [0.5187, 0.3423, 0.5441, 0.3573]}, {"w": "input", "b": [0.5503, 0.3423, 0.5929, 0.3573]}, {"w": "example", "b": [0.599, 0.3423, 0.6644, 0.3573]}, {"w": "i", "b": [0.6703, 0.3426, 0.6767, 0.3576]}, {"w": "be", "b": [0.6828, 0.3423, 0.7016, 0.3573]}, {"w": "denoted", "b": [0.7078, 0.3423, 0.7707, 0.3573]}, {"w": "as", "b": [0.7768, 0.3423, 0.7931, 0.3573]}, {"w": "zi.", "b": [0.7992, 0.3423, 0.819, 0.3588]}, {"w": "Then", "b": [0.8272, 0.3423, 0.8688, 0.3573]}, {"w": "the", "b": [0.1774, 0.3603, 0.203, 0.3752]}, {"w": "output", "b": [0.2091, 0.3603, 0.2635, 0.3752]}, {"w": "after", "b": [0.2696, 0.3603, 0.3071, 0.3752]}, {"w": "applying", "b": [0.3133, 0.3603, 0.3825, 0.3752]}, {"w": "the", "b": [0.3887, 0.3603, 0.4143, 0.3752]}, {"w": "ReLU", "b": [0.4204, 0.3603, 0.4676, 0.3752]}, {"w": "non-linearity", "b": [0.4737, 0.3603, 0.5763, 0.3752]}, {"w": "is", "b": [0.5825, 0.3603, 0.5949, 0.3752]}, {"w": "given", "b": [0.6011, 0.3603, 0.6431, 0.3752]}, {"w": "by", "b": [0.6493, 0.3603, 0.6687, 0.3752]}, {"w": "max(0,", "b": [0.6747, 0.3603, 0.7308, 0.3755]}, {"w": "zi).", "b": [0.7339, 0.3603, 0.7609, 0.3768]}]}, {"id": "b_4", "type": "paragraph", "text": "In a binary classification, the output layer contains only one logistic unit. Let the output value of the output unit before non-linearity for the input example i be denoted as zi. The output ˆyi after applying the logistic nonlinearity is given by,", "words": [{"w": "In", "b": [0.1774, 0.3872, 0.1946, 0.4022]}, {"w": "a", "b": [0.202, 0.3872, 0.2115, 0.4022]}, {"w": "binary", "b": [0.2189, 0.3872, 0.2717, 0.4022]}, {"w": "classification,", "b": [0.2792, 0.3872, 0.3882, 0.4022]}, {"w": "the", "b": [0.3959, 0.3872, 0.4221, 0.4022]}, {"w": "output", "b": [0.4295, 0.3872, 0.4849, 0.4022]}, {"w": "layer", "b": [0.4924, 0.3872, 0.5317, 0.4022]}, {"w": "contains", "b": [0.5391, 0.3872, 0.6067, 0.4022]}, {"w": "only", "b": [0.6141, 0.3872, 0.6491, 0.4022]}, {"w": "one", "b": [0.6566, 0.3872, 0.6848, 0.4022]}, {"w": "logistic", "b": [0.6923, 0.3872, 0.7499, 0.4022]}, {"w": "unit.", "b": [0.7573, 0.3872, 0.796, 0.4022]}, {"w": "Let", "b": [0.8081, 0.3872, 0.8355, 0.4022]}, {"w": "the", "b": [0.8429, 0.3872, 0.8691, 0.4022]}, {"w": "output", "b": [0.1774, 0.4052, 0.2306, 0.4201]}, {"w": "value", "b": [0.2365, 0.4052, 0.2772, 0.4201]}, {"w": "of", "b": [0.2831, 0.4052, 0.2977, 0.4201]}, {"w": "the", "b": [0.3036, 0.4052, 0.3287, 0.4201]}, {"w": "output", "b": [0.3346, 0.4052, 0.3879, 0.4201]}, {"w": "unit", "b": [0.3938, 0.4052, 0.426, 0.4201]}, {"w": "before", "b": [0.4319, 0.4052, 0.4802, 0.4201]}, {"w": "non-linearity", "b": [0.4861, 0.4052, 0.5866, 0.4201]}, {"w": "for", "b": [0.5926, 0.4052, 0.6142, 0.4201]}, {"w": "the", "b": [0.6201, 0.4052, 0.6453, 0.4201]}, {"w": "input", "b": [0.6512, 0.4052, 0.6934, 0.4201]}, {"w": "example", "b": [0.6993, 0.4052, 0.7641, 0.4201]}, {"w": "i", "b": [0.7697, 0.4054, 0.7761, 0.4204]}, {"w": "be", "b": [0.782, 0.4052, 0.8006, 0.4201]}, {"w": "denoted", "b": [0.8065, 0.4052, 0.8688, 0.4201]}, {"w": "as", "b": [0.1774, 0.4231, 0.1939, 0.4381]}, {"w": "zi.", "b": [0.2, 0.4231, 0.2199, 0.4396]}, {"w": "The", "b": [0.2281, 0.4231, 0.2598, 0.4381]}, {"w": "output", "b": [0.266, 0.4231, 0.3203, 0.4381]}, {"w": "ˆyi", "b": [0.3265, 0.4231, 0.3407, 0.4396]}, {"w": "after", "b": [0.3478, 0.4231, 0.3853, 0.4381]}, {"w": "applying", "b": [0.3914, 0.4231, 0.4606, 0.4381]}, {"w": "the", "b": [0.4668, 0.4231, 0.4924, 0.4381]}, {"w": "logistic", "b": [0.4986, 0.4231, 0.5551, 0.4381]}, {"w": "nonlinearity", "b": [0.5612, 0.4231, 0.6577, 0.4381]}, {"w": "is", "b": [0.6638, 0.4231, 0.6763, 0.4381]}, {"w": "given", "b": [0.6824, 0.4231, 0.7244, 0.4381]}, {"w": "by,", "b": [0.7306, 0.4231, 0.7537, 0.4381]}]}, {"id": "b_5", "type": "paragraph", "text": "ˆyi", "words": [{"w": "ˆyi", "b": [0.4631, 0.4711, 0.4773, 0.4876]}]}, {"id": "b_6", "type": "equation", "text": "def = 1 1 + e−zi ,", "words": [{"w": "def", "b": [0.4834, 0.4662, 0.5027, 0.4766]}, {"w": "=", "b": [0.4858, 0.4711, 0.5002, 0.486]}, {"w": "1", "b": [0.5382, 0.4609, 0.5475, 0.4759]}, {"w": "1", "b": [0.51, 0.4813, 0.5192, 0.4963]}, {"w": "+", "b": [0.5233, 0.4813, 0.5377, 0.4963]}, {"w": "e−zi", "b": [0.5418, 0.4806, 0.5739, 0.4965]}, {"w": ",", "b": [0.5779, 0.4713, 0.5831, 0.4863]}]}, {"id": "b_7", "type": "paragraph", "text": "where e is the base of the natural logarithm, also known as Euler’s number.", "words": [{"w": "where", "b": [0.1767, 0.5125, 0.2239, 0.5274]}, {"w": "e", "b": [0.23, 0.5127, 0.2386, 0.5277]}, {"w": "is", "b": [0.2448, 0.5125, 0.2572, 0.5274]}, {"w": "the", "b": [0.2633, 0.5125, 0.289, 0.5274]}, {"w": "base", "b": [0.2951, 0.5125, 0.3301, 0.5274]}, {"w": "of", "b": [0.3363, 0.5125, 0.3511, 0.5274]}, {"w": "the", "b": [0.3573, 0.5125, 0.3829, 0.5274]}, {"w": "natural", "b": [0.3891, 0.5125, 0.4476, 0.5274]}, {"w": "logarithm,", "b": [0.4537, 0.5125, 0.5368, 0.5274]}, {"w": "also", "b": [0.543, 0.5125, 0.5738, 0.5274]}, {"w": "known", "b": [0.58, 0.5125, 0.6323, 0.5274]}, {"w": "as", "b": [0.6384, 0.5125, 0.6549, 0.5274]}, {"w": "Euler’s", "b": [0.6609, 0.5128, 0.7253, 0.5277]}, {"w": "number.", "b": [0.7324, 0.5125, 0.8084, 0.5277]}]}, {"id": "b_8", "type": "paragraph", "text": "Binary and multi-label classification models are defined in a similar way. The only difference is that in multi-label classification, the output layer contains C logistic units, one per class. If ˆyi,j denotes the output, after nonlinearity, of the logistic unit for class j, when input example is i, then the sum of ˆyi,j, for all j = 1, . . . , C, lies between 0 and C.", "words": [{"w": "Binary", "b": [0.1774, 0.5394, 0.2331, 0.5543]}, {"w": "and", "b": [0.2402, 0.5394, 0.2705, 0.5543]}, {"w": "multi-label", "b": [0.2776, 0.5394, 0.3665, 0.5543]}, {"w": "classification", "b": [0.3736, 0.5394, 0.4774, 0.5543]}, {"w": "models", "b": [0.4845, 0.5394, 0.5416, 0.5543]}, {"w": "are", "b": [0.5487, 0.5394, 0.5738, 0.5543]}, {"w": "defined", "b": [0.5809, 0.5394, 0.6395, 0.5543]}, {"w": "in", "b": [0.6466, 0.5394, 0.6623, 0.5543]}, {"w": "a", "b": [0.6694, 0.5394, 0.6788, 0.5543]}, {"w": "similar", "b": [0.6859, 0.5394, 0.7415, 0.5543]}, {"w": "way.", "b": [0.7485, 0.5394, 0.7842, 0.5543]}, {"w": "The", "b": [0.7952, 0.5394, 0.8276, 0.5543]}, {"w": "only", "b": [0.8347, 0.5394, 0.8697, 0.5543]}, {"w": "difference", "b": [0.1774, 0.5573, 0.2523, 0.5723]}, {"w": "is", "b": [0.2584, 0.5573, 0.2706, 0.5723]}, {"w": "that", "b": [0.2767, 0.5573, 0.3099, 0.5723]}, {"w": "in", "b": [0.316, 0.5573, 0.3311, 0.5723]}, {"w": "multi-label", "b": [0.3372, 0.5573, 0.4226, 0.5723]}, {"w": "classification,", "b": [0.4288, 0.5573, 0.5335, 0.5723]}, {"w": "the", "b": [0.5396, 0.5573, 0.5648, 0.5723]}, {"w": "output", "b": [0.5709, 0.5573, 0.6242, 0.5723]}, {"w": "layer", "b": [0.6303, 0.5573, 0.668, 0.5723]}, {"w": "contains", "b": [0.6741, 0.5573, 0.7391, 0.5723]}, {"w": "C", "b": [0.7449, 0.5576, 0.7581, 0.5726]}, {"w": "logistic", "b": [0.7656, 0.5573, 0.8209, 0.5723]}, {"w": "units,", "b": [0.8271, 0.5573, 0.8714, 0.5723]}, {"w": "one", "b": [0.1774, 0.5753, 0.2056, 0.5902]}, {"w": "per", "b": [0.2131, 0.5753, 0.2399, 0.5902]}, {"w": "class.", "b": [0.2474, 0.5753, 0.2905, 0.5902]}, {"w": "If", "b": [0.3029, 0.5753, 0.3154, 0.5902]}, {"w": "ˆyi,j", "b": [0.3229, 0.5753, 0.3477, 0.5918]}, {"w": "denotes", "b": [0.3569, 0.5753, 0.4187, 0.5902]}, {"w": "the", "b": [0.4263, 0.5753, 0.4524, 0.5902]}, {"w": "output,", "b": [0.4599, 0.5753, 0.5206, 0.5902]}, {"w": "after", "b": [0.5285, 0.5753, 0.5667, 0.5902]}, {"w": "nonlinearity,", "b": [0.5743, 0.5753, 0.6764, 0.5902]}, {"w": "of", "b": [0.6843, 0.5753, 0.6994, 0.5902]}, {"w": "the", "b": [0.707, 0.5753, 0.7331, 0.5902]}, {"w": "logistic", "b": [0.7407, 0.5753, 0.7983, 0.5902]}, {"w": "unit", "b": [0.8058, 0.5753, 0.8393, 0.5902]}, {"w": "for", "b": [0.8469, 0.5753, 0.8694, 0.5902]}, {"w": "class", "b": [0.1774, 0.5932, 0.2138, 0.6082]}, {"w": "j,", "b": [0.2199, 0.5932, 0.2336, 0.6084]}, {"w": "when", "b": [0.2397, 0.5932, 0.281, 0.6082]}, {"w": "input", "b": [0.2871, 0.5932, 0.3294, 0.6082]}, {"w": "example", "b": [0.3355, 0.5932, 0.4004, 0.6082]}, {"w": "is", "b": [0.4066, 0.5932, 0.4188, 0.6082]}, {"w": "i,", "b": [0.4248, 0.5932, 0.4362, 0.6084]}, {"w": "then", "b": [0.4424, 0.5932, 0.4776, 0.6082]}, {"w": "the", "b": [0.4837, 0.5932, 0.5089, 0.6082]}, {"w": "sum", "b": [0.515, 0.5932, 0.5473, 0.6082]}, {"w": "of", "b": [0.5535, 0.5932, 0.5681, 0.6082]}, {"w": "ˆyi,j,", "b": [0.5741, 0.5932, 0.6056, 0.6097]}, {"w": "for", "b": [0.6118, 0.5932, 0.6334, 0.6082]}, {"w": "all", "b": [0.6396, 0.5932, 0.6587, 0.6082]}, {"w": "j", "b": [0.6648, 0.5935, 0.6724, 0.6084]}, {"w": "=", "b": [0.6786, 0.5932, 0.6927, 0.6082]}, {"w": "1,", "b": [0.6978, 0.5932, 0.712, 0.6084]}, {"w": ".", "b": [0.7151, 0.5935, 0.7202, 0.6084]}, {"w": ".", "b": [0.7233, 0.5935, 0.7284, 0.6084]}, {"w": ".", "b": [0.7315, 0.5935, 0.7366, 0.6084]}, {"w": ",", "b": [0.7397, 0.5935, 0.7448, 0.6084]}, {"w": "C,", "b": [0.7479, 0.5932, 0.7674, 0.6084]}, {"w": "lies", "b": [0.7735, 0.5932, 0.7988, 0.6082]}, {"w": "between", "b": [0.805, 0.5932, 0.8688, 0.6082]}, {"w": "0", "b": [0.1774, 0.6112, 0.1866, 0.6261]}, {"w": "and", "b": [0.1927, 0.6112, 0.2225, 0.6261]}, {"w": "C.", "b": [0.2286, 0.6112, 0.2482, 0.6264]}]}, {"id": "b_9", "type": "paragraph", "text": "In the multiclass classification, the output layer also produces C outputs. However, in this case, the output of each unit of the output layer is controlled by the softmax function. Let the output of the output unit j, before nonlinearity, for the input example i, be zi,j. Then the output ˆyi,j after nonlinearity is given by,", "words": [{"w": "In", "b": [0.1774, 0.6381, 0.1942, 0.653]}, {"w": "the", "b": [0.2003, 0.6381, 0.2258, 0.653]}, {"w": "multiclass", "b": [0.232, 0.6381, 0.3111, 0.653]}, {"w": "classification,", "b": [0.3172, 0.6381, 0.4234, 0.653]}, {"w": "the", "b": [0.4295, 0.6381, 0.455, 0.653]}, {"w": "output", "b": [0.4612, 0.6381, 0.5151, 0.653]}, {"w": "layer", "b": [0.5213, 0.6381, 0.5595, 0.653]}, {"w": "also", "b": [0.5657, 0.6381, 0.5963, 0.653]}, {"w": "produces", "b": [0.6025, 0.6381, 0.6734, 0.653]}, {"w": "C", "b": [0.6793, 0.6384, 0.6925, 0.6533]}, {"w": "outputs.", "b": [0.7, 0.6381, 0.7663, 0.653]}, {"w": "However,", "b": [0.7746, 0.6381, 0.8474, 0.653]}, {"w": "in", "b": [0.8536, 0.6381, 0.8689, 0.653]}, {"w": "this", "b": [0.1774, 0.656, 0.2066, 0.671]}, {"w": "case,", "b": [0.2111, 0.656, 0.2484, 0.671]}, {"w": "the", "b": [0.2532, 0.656, 0.2783, 0.671]}, {"w": "output", "b": [0.2828, 0.656, 0.336, 0.671]}, {"w": "of", "b": [0.3405, 0.656, 0.3551, 0.671]}, {"w": "each", "b": [0.3595, 0.656, 0.3942, 0.671]}, {"w": "unit", "b": [0.3987, 0.656, 0.4308, 0.671]}, {"w": "of", "b": [0.4353, 0.656, 0.4499, 0.671]}, {"w": "the", "b": [0.4543, 0.656, 0.4795, 0.671]}, {"w": "output", "b": [0.4839, 0.656, 0.5372, 0.671]}, {"w": "layer", "b": [0.5416, 0.656, 0.5794, 0.671]}, {"w": "is", "b": [0.5838, 0.656, 0.596, 0.671]}, {"w": "controlled", "b": [0.6005, 0.656, 0.6784, 0.671]}, {"w": "by", "b": [0.6829, 0.656, 0.7019, 0.671]}, {"w": "the", "b": [0.7064, 0.656, 0.7315, 0.671]}, {"w": "softmax", "b": [0.736, 0.656, 0.7984, 0.671]}, {"w": "function.", "b": [0.8029, 0.656, 0.8727, 0.671]}, {"w": "Let", "b": [0.1774, 0.674, 0.2048, 0.6889]}, {"w": "the", "b": [0.2112, 0.674, 0.2373, 0.6889]}, {"w": "output", "b": [0.2436, 0.674, 0.2991, 0.6889]}, {"w": "of", "b": [0.3054, 0.674, 0.3206, 0.6889]}, {"w": "the", "b": [0.3269, 0.674, 0.3531, 0.6889]}, {"w": "output", "b": [0.3594, 0.674, 0.4148, 0.6889]}, {"w": "unit", "b": [0.4212, 0.674, 0.4547, 0.6889]}, {"w": "j,", "b": [0.4609, 0.674, 0.4748, 0.6892]}, {"w": "before", "b": [0.4811, 0.674, 0.5314, 0.6889]}, {"w": "nonlinearity,", "b": [0.5377, 0.674, 0.6398, 0.6889]}, {"w": "for", "b": [0.6462, 0.674, 0.6688, 0.6889]}, {"w": "the", "b": [0.6751, 0.674, 0.7013, 0.6889]}, {"w": "input", "b": [0.7076, 0.674, 0.7515, 0.6889]}, {"w": "example", "b": [0.7579, 0.674, 0.8253, 0.6889]}, {"w": "i,", "b": [0.8315, 0.674, 0.8431, 0.6892]}, {"w": "be", "b": [0.8494, 0.674, 0.8688, 0.6889]}, {"w": "zi,j.", "b": [0.1774, 0.6919, 0.2084, 0.7084]}, {"w": "Then", "b": [0.2166, 0.6919, 0.2587, 0.7069]}, {"w": "the", "b": [0.2648, 0.6919, 0.2905, 0.7069]}, {"w": "output", "b": [0.2966, 0.6919, 0.351, 0.7069]}, {"w": "ˆyi,j", "b": [0.3571, 0.6919, 0.3818, 0.7084]}, {"w": "after", "b": [0.3896, 0.6919, 0.4271, 0.7069]}, {"w": "nonlinearity", "b": [0.4333, 0.6919, 0.5297, 0.7069]}, {"w": "is", "b": [0.5359, 0.6919, 0.5483, 0.7069]}, {"w": "given", "b": [0.5544, 0.6919, 0.5965, 0.7069]}, {"w": "by,", "b": [0.6026, 0.6919, 0.6257, 0.7069]}]}, {"id": "b_10", "type": "paragraph", "text": "ˆyi,j", "words": [{"w": "ˆyi,j", "b": [0.4483, 0.7404, 0.473, 0.7569]}]}, {"id": "b_11", "type": "equation", "text": "def = ezi,j PC", "words": [{"w": "def", "b": [0.4798, 0.7355, 0.4991, 0.746]}, {"w": "=", "b": [0.4823, 0.7404, 0.4966, 0.7553]}, {"w": "ezi,j", "b": [0.5322, 0.7286, 0.5624, 0.7455]}, {"w": "PC", "b": [0.5064, 0.7497, 0.5365, 0.7682]}]}, {"id": "b_12", "type": "equation", "text": "k=1 ezi,k .", "words": [{"w": "k=1", "b": [0.5259, 0.7617, 0.5527, 0.7722]}, {"w": "ezi,k", "b": [0.5567, 0.7526, 0.5885, 0.7687]}, {"w": ".", "b": [0.5927, 0.7407, 0.5979, 0.7556]}]}, {"id": "b_13", "type": "equation", "text": "The sum of ˆyi,j, for all j = 1, . . . C, equals 1.", "words": [{"w": "The", "b": [0.1767, 0.7877, 0.2085, 0.8026]}, {"w": "sum", "b": [0.2146, 0.7877, 0.2475, 0.8026]}, {"w": "of", "b": [0.2537, 0.7877, 0.2686, 0.8026]}, {"w": "ˆyi,j,", "b": [0.2747, 0.7877, 0.3062, 0.8041]}, {"w": "for", "b": [0.3124, 0.7877, 0.3345, 0.8026]}, {"w": "all", "b": [0.3406, 0.7877, 0.3601, 0.8026]}, {"w": "j", "b": [0.3662, 0.7879, 0.3738, 0.8029]}, {"w": "=", "b": [0.38, 0.7877, 0.3944, 0.8026]}, {"w": "1,", "b": [0.3995, 0.7877, 0.4138, 0.8029]}, {"w": ".", "b": [0.4169, 0.7879, 0.4221, 0.8029]}, {"w": ".", "b": [0.4251, 0.7879, 0.4302, 0.8029]}, {"w": ".", "b": [0.4333, 0.7879, 0.4385, 0.8029]}, {"w": "C,", "b": [0.4415, 0.7877, 0.4611, 0.8029]}, {"w": "equals", "b": [0.4673, 0.7877, 0.5171, 0.8026]}, {"w": "1.", "b": [0.5233, 0.7877, 0.5376, 0.8026]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "6", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 182, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "6.1.3 Parameter-Initialization Strategies", "words": [{"w": "6.1.3", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Parameter-Initialization", "b": [0.1961, 0.0884, 0.4188, 0.1034]}, {"w": "Strategies", "b": [0.4259, 0.0884, 0.5176, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "In step 3, we select a parameter-initialization strategy. Before the training starts, the parameter values in all units are unknown. We must initialize them with some values. Training algorithms for neural networks, such as gradient descent and its stochastic variants that we consider in a few moments, are iterative in nature and require the analyst to specify some initial point from which to begin the iterations. This initialization might affect the properties of the training model. You will likely choose from one of these strategies:", "words": [{"w": "In", "b": [0.1312, 0.1247, 0.1484, 0.1396]}, {"w": "step", "b": [0.1546, 0.1247, 0.1881, 0.1396]}, {"w": "3,", "b": [0.1942, 0.1247, 0.2088, 0.1396]}, {"w": "we", "b": [0.215, 0.1247, 0.2363, 0.1396]}, {"w": "select", "b": [0.2425, 0.1247, 0.2875, 0.1396]}, {"w": "a", "b": [0.2936, 0.1247, 0.303, 0.1396]}, {"w": "parameter-initialization", "b": [0.3092, 0.125, 0.5277, 0.1399]}, {"w": "strategy.", "b": [0.5348, 0.1247, 0.6154, 0.1399]}, {"w": "Before", "b": [0.6236, 0.1247, 0.6761, 0.1396]}, {"w": "the", "b": [0.6822, 0.1247, 0.7083, 0.1396]}, {"w": "training", "b": [0.7144, 0.1247, 0.7792, 0.1396]}, {"w": "starts,", "b": [0.7853, 0.1247, 0.8367, 0.1396]}, {"w": "the", "b": [0.8428, 0.1247, 0.8689, 0.1396]}, {"w": "parameter", "b": [0.1312, 0.1426, 0.2117, 0.1576]}, {"w": "values", "b": [0.2163, 0.1426, 0.2641, 0.1576]}, {"w": "in", "b": [0.2687, 0.1426, 0.2837, 0.1576]}, {"w": "all", "b": [0.2883, 0.1426, 0.3074, 0.1576]}, {"w": "units", "b": [0.3119, 0.1426, 0.3512, 0.1576]}, {"w": "are", "b": [0.3558, 0.1426, 0.38, 0.1576]}, {"w": "unknown.", "b": [0.3845, 0.1426, 0.4609, 0.1576]}, {"w": "We", "b": [0.4686, 0.1426, 0.4937, 0.1576]}, {"w": "must", "b": [0.4982, 0.1426, 0.537, 0.1576]}, {"w": "initialize", "b": [0.5415, 0.1426, 0.6089, 0.1576]}, {"w": "them", "b": [0.6134, 0.1426, 0.6536, 0.1576]}, {"w": "with", "b": [0.6582, 0.1426, 0.6933, 0.1576]}, {"w": "some", "b": [0.6979, 0.1426, 0.7372, 0.1576]}, {"w": "values.", "b": [0.7417, 0.1426, 0.7946, 0.1576]}, {"w": "Training", "b": [0.8022, 0.1426, 0.8691, 0.1576]}, {"w": "algorithms", "b": [0.1312, 0.1606, 0.2175, 0.1755]}, {"w": "for", "b": [0.2237, 0.1606, 0.246, 0.1755]}, {"w": "neural", "b": [0.2522, 0.1606, 0.3031, 0.1755]}, {"w": "networks,", "b": [0.3093, 0.1606, 0.3867, 0.1755]}, {"w": "such", "b": [0.3929, 0.1606, 0.4288, 0.1755]}, {"w": "as", "b": [0.435, 0.1606, 0.4517, 0.1755]}, {"w": "gradient", "b": [0.4577, 0.1609, 0.5342, 0.1758]}, {"w": "descent", "b": [0.5413, 0.1609, 0.6098, 0.1758]}, {"w": "and", "b": [0.6159, 0.1606, 0.646, 0.1755]}, {"w": "its", "b": [0.6522, 0.1606, 0.672, 0.1755]}, {"w": "stochastic", "b": [0.6782, 0.1606, 0.7583, 0.1755]}, {"w": "variants", "b": [0.7645, 0.1606, 0.829, 0.1755]}, {"w": "that", "b": [0.8352, 0.1606, 0.8694, 0.1755]}, {"w": "we", "b": [0.1306, 0.1785, 0.1512, 0.1935]}, {"w": "consider", "b": [0.1571, 0.1785, 0.2216, 0.1935]}, {"w": "in", "b": [0.2276, 0.1785, 0.2427, 0.1935]}, {"w": "a", "b": [0.2486, 0.1785, 0.2577, 0.1935]}, {"w": "few", "b": [0.2636, 0.1785, 0.2903, 0.1935]}, {"w": "moments,", "b": [0.2962, 0.1785, 0.3722, 0.1935]}, {"w": "are", "b": [0.3782, 0.1785, 0.4024, 0.1935]}, {"w": "iterative", "b": [0.4083, 0.1785, 0.4737, 0.1935]}, {"w": "in", "b": [0.4797, 0.1785, 0.4948, 0.1935]}, {"w": "nature", "b": [0.5007, 0.1785, 0.552, 0.1935]}, {"w": "and", "b": [0.558, 0.1785, 0.5871, 0.1935]}, {"w": "require", "b": [0.5931, 0.1785, 0.648, 0.1935]}, {"w": "the", "b": [0.654, 0.1785, 0.6791, 0.1935]}, {"w": "analyst", "b": [0.6851, 0.1785, 0.742, 0.1935]}, {"w": "to", "b": [0.7479, 0.1785, 0.764, 0.1935]}, {"w": "specify", "b": [0.77, 0.1785, 0.8239, 0.1935]}, {"w": "some", "b": [0.8298, 0.1785, 0.8691, 0.1935]}, {"w": "initial", "b": [0.1312, 0.1965, 0.1775, 0.2114]}, {"w": "point", "b": [0.1832, 0.1965, 0.2244, 0.2114]}, {"w": "from", "b": [0.2302, 0.1965, 0.2669, 0.2114]}, {"w": "which", "b": [0.2726, 0.1965, 0.3184, 0.2114]}, {"w": "to", "b": [0.3241, 0.1965, 0.3402, 0.2114]}, {"w": "begin", "b": [0.3459, 0.1965, 0.3887, 0.2114]}, {"w": "the", "b": [0.3944, 0.1965, 0.4195, 0.2114]}, {"w": "iterations.", "b": [0.4253, 0.1965, 0.5048, 0.2114]}, {"w": "This", "b": [0.5129, 0.1965, 0.5482, 0.2114]}, {"w": "initialization", "b": [0.5539, 0.1965, 0.6534, 0.2114]}, {"w": "might", "b": [0.6592, 0.1965, 0.7049, 0.2114]}, {"w": "affect", "b": [0.7106, 0.1965, 0.7533, 0.2114]}, {"w": "the", "b": [0.7591, 0.1965, 0.7842, 0.2114]}, {"w": "properties", "b": [0.79, 0.1965, 0.8691, 0.2114]}, {"w": "of", "b": [0.1312, 0.2144, 0.1461, 0.2294]}, {"w": "the", "b": [0.1522, 0.2144, 0.1779, 0.2294]}, {"w": "training", "b": [0.1841, 0.2144, 0.2477, 0.2294]}, {"w": "model.", "b": [0.2538, 0.2144, 0.3076, 0.2294]}, {"w": "You", "b": [0.3159, 0.2144, 0.3476, 0.2294]}, {"w": "will", "b": [0.3538, 0.2144, 0.3825, 0.2294]}, {"w": "likely", "b": [0.3886, 0.2144, 0.4312, 0.2294]}, {"w": "choose", "b": [0.4373, 0.2144, 0.4898, 0.2294]}, {"w": "from", "b": [0.4959, 0.2144, 0.5334, 0.2294]}, {"w": "one", "b": [0.5395, 0.2144, 0.5672, 0.2294]}, {"w": "of", "b": [0.5734, 0.2144, 0.5882, 0.2294]}, {"w": "these", "b": [0.5944, 0.2144, 0.6355, 0.2294]}, {"w": "strategies:", "b": [0.6417, 0.2144, 0.723, 0.2294]}]}, {"id": "b_2", "type": "paragraph", "text": "• ones — all parameters are initialized to 1; • zeros — all parameters are initialized to 0; • random normal — parameters are initialized to values sampled from the normal distribution, typically with mean of 0 and standard deviation of 0.05; • random uniform — parameters are initialized to values sampled from the uniform distribution with the range [−0.05, 0.05]; • Xavier normal — parameters are initialized to values sampled from the truncated normal distribution, centered on 0, with standard deviation equal to", "words": [{"w": "•", "b": [0.1538, 0.2413, 0.1681, 0.2563]}, {"w": "ones", "b": [0.1774, 0.2416, 0.2179, 0.2566]}, {"w": "—", "b": [0.224, 0.2413, 0.2424, 0.2563]}, {"w": "all", "b": [0.2486, 0.2413, 0.2681, 0.2563]}, {"w": "parameters", "b": [0.2742, 0.2413, 0.3636, 0.2563]}, {"w": "are", "b": [0.3698, 0.2413, 0.3945, 0.2563]}, {"w": "initialized", "b": [0.4006, 0.2413, 0.4796, 0.2563]}, {"w": "to", "b": [0.4857, 0.2413, 0.5021, 0.2563]}, {"w": "1;", "b": [0.5082, 0.2413, 0.5225, 0.2563]}, {"w": "•", "b": [0.1538, 0.2593, 0.1681, 0.2742]}, {"w": "zeros", "b": [0.1774, 0.2596, 0.2242, 0.2745]}, {"w": "—", "b": [0.2304, 0.2593, 0.2488, 0.2742]}, {"w": "all", "b": [0.255, 0.2593, 0.2745, 0.2742]}, {"w": "parameters", "b": [0.2806, 0.2593, 0.37, 0.2742]}, {"w": "are", "b": [0.3762, 0.2593, 0.4008, 0.2742]}, {"w": "initialized", "b": [0.407, 0.2593, 0.486, 0.2742]}, {"w": "to", "b": [0.4921, 0.2593, 0.5085, 0.2742]}, {"w": "0;", "b": [0.5145, 0.2593, 0.5289, 0.2742]}, {"w": "•", "b": [0.1538, 0.2772, 0.1681, 0.2922]}, {"w": "random", "b": [0.1774, 0.2775, 0.2483, 0.2925]}, {"w": "normal", "b": [0.2562, 0.2775, 0.3212, 0.2925]}, {"w": "—", "b": [0.3282, 0.2772, 0.347, 0.2922]}, {"w": "parameters", "b": [0.3539, 0.2772, 0.4451, 0.2922]}, {"w": "are", "b": [0.452, 0.2772, 0.4771, 0.2922]}, {"w": "initialized", "b": [0.484, 0.2772, 0.5646, 0.2922]}, {"w": "to", "b": [0.5715, 0.2772, 0.5882, 0.2922]}, {"w": "values", "b": [0.5951, 0.2772, 0.6449, 0.2922]}, {"w": "sampled", "b": [0.6518, 0.2772, 0.7189, 0.2922]}, {"w": "from", "b": [0.7258, 0.2772, 0.764, 0.2922]}, {"w": "the", "b": [0.7709, 0.2772, 0.7971, 0.2922]}, {"w": "normal", "b": [0.8037, 0.2775, 0.8688, 0.2925]}, {"w": "distribution,", "b": [0.1774, 0.2952, 0.2916, 0.3104]}, {"w": "typically", "b": [0.2977, 0.2952, 0.367, 0.3101]}, {"w": "with", "b": [0.3731, 0.2952, 0.409, 0.3101]}, {"w": "mean", "b": [0.4152, 0.2952, 0.4582, 0.3101]}, {"w": "of", "b": [0.4644, 0.2952, 0.4792, 0.3101]}, {"w": "0", "b": [0.4853, 0.2952, 0.4945, 0.3101]}, {"w": "and", "b": [0.5007, 0.2952, 0.5304, 0.3101]}, {"w": "standard", "b": [0.5366, 0.2952, 0.6075, 0.3101]}, {"w": "deviation", "b": [0.6136, 0.2952, 0.688, 0.3101]}, {"w": "of", "b": [0.6941, 0.2952, 0.709, 0.3101]}, {"w": "0.05;", "b": [0.7151, 0.2952, 0.753, 0.3104]}, {"w": "•", "b": [0.1538, 0.3131, 0.1681, 0.3281]}, {"w": "random", "b": [0.1774, 0.3134, 0.2483, 0.3284]}, {"w": "uniform", "b": [0.2554, 0.3134, 0.3283, 0.3284]}, {"w": "—", "b": [0.3346, 0.3131, 0.353, 0.3281]}, {"w": "parameters", "b": [0.3592, 0.3131, 0.4487, 0.3281]}, {"w": "are", "b": [0.4549, 0.3131, 0.4796, 0.3281]}, {"w": "initialized", "b": [0.4857, 0.3131, 0.5648, 0.3281]}, {"w": "to", "b": [0.5709, 0.3131, 0.5873, 0.3281]}, {"w": "values", "b": [0.5935, 0.3131, 0.6424, 0.3281]}, {"w": "sampled", "b": [0.6485, 0.3131, 0.7143, 0.3281]}, {"w": "from", "b": [0.7205, 0.3131, 0.758, 0.3281]}, {"w": "the", "b": [0.7642, 0.3131, 0.7898, 0.3281]}, {"w": "uniform", "b": [0.7958, 0.3134, 0.8688, 0.3284]}, {"w": "distribution", "b": [0.1774, 0.3314, 0.2864, 0.3463]}, {"w": "with", "b": [0.2926, 0.3311, 0.3285, 0.346]}, {"w": "the", "b": [0.3347, 0.3311, 0.3603, 0.346]}, {"w": "range", "b": [0.3665, 0.3311, 0.4106, 0.346]}, {"w": "[−0.05,", "b": [0.4167, 0.3311, 0.4742, 0.3463]}, {"w": "0.05];", "b": [0.4773, 0.3311, 0.5203, 0.3463]}, {"w": "•", "b": [0.1538, 0.349, 0.1681, 0.364]}, {"w": "Xavier", "b": [0.1774, 0.3493, 0.2387, 0.3643]}, {"w": "normal", "b": [0.2461, 0.3493, 0.3112, 0.3643]}, {"w": "—", "b": [0.3176, 0.349, 0.3364, 0.364]}, {"w": "parameters", "b": [0.3429, 0.349, 0.4341, 0.364]}, {"w": "are", "b": [0.4405, 0.349, 0.4657, 0.364]}, {"w": "initialized", "b": [0.4722, 0.349, 0.5527, 0.364]}, {"w": "to", "b": [0.5592, 0.349, 0.5759, 0.364]}, {"w": "values", "b": [0.5824, 0.349, 0.6322, 0.364]}, {"w": "sampled", "b": [0.6387, 0.349, 0.7057, 0.364]}, {"w": "from", "b": [0.7122, 0.349, 0.7504, 0.364]}, {"w": "the", "b": [0.7568, 0.349, 0.783, 0.364]}, {"w": "truncated", "b": [0.7895, 0.349, 0.869, 0.364]}, {"w": "normal", "b": [0.1774, 0.367, 0.2349, 0.3819]}, {"w": "distribution,", "b": [0.2418, 0.367, 0.3434, 0.3819]}, {"w": "centered", "b": [0.3504, 0.367, 0.419, 0.3819]}, {"w": "on", "b": [0.4258, 0.367, 0.4457, 0.3819]}, {"w": "0,", "b": [0.4524, 0.367, 0.467, 0.3819]}, {"w": "with", "b": [0.474, 0.367, 0.5106, 0.3819]}, {"w": "standard", "b": [0.5174, 0.367, 0.5898, 0.3819]}, {"w": "deviation", "b": [0.5966, 0.367, 0.6724, 0.3819]}, {"w": "equal", "b": [0.6793, 0.367, 0.7227, 0.3819]}, {"w": "to", "b": [0.7295, 0.367, 0.7462, 0.3819]}]}, {"id": "b_4", "type": "paragraph", "text": "2/(in + out) where “in” is the number of units in the preceding layer to which the current unit is connected (the one whose parameters you initialize); and “out” is the number of units on the subsequent layer to which the current unit is connected; and, • Xavier uniform — parameters are initialized to values sampled from a uniform distribution within [−limit, limit], where “limit” is", "words": [{"w": "2/(in", "b": [0.7714, 0.367, 0.8124, 0.3822]}, {"w": "+", "b": [0.8165, 0.367, 0.8308, 0.3819]}, {"w": "out)", "b": [0.8349, 0.367, 0.8688, 0.3819]}, {"w": "where", "b": [0.1767, 0.3849, 0.2249, 0.3999]}, {"w": "“in”", "b": [0.231, 0.3849, 0.2641, 0.3999]}, {"w": "is", "b": [0.2703, 0.3849, 0.2829, 0.3999]}, {"w": "the", "b": [0.2891, 0.3849, 0.3153, 0.3999]}, {"w": "number", "b": [0.3214, 0.3849, 0.3837, 0.3999]}, {"w": "of", "b": [0.3898, 0.3849, 0.405, 0.3999]}, {"w": "units", "b": [0.4112, 0.3849, 0.4521, 0.3999]}, {"w": "in", "b": [0.4582, 0.3849, 0.4739, 0.3999]}, {"w": "the", "b": [0.4801, 0.3849, 0.5062, 0.3999]}, {"w": "preceding", "b": [0.5124, 0.3849, 0.5909, 0.3999]}, {"w": "layer", "b": [0.597, 0.3849, 0.6363, 0.3999]}, {"w": "to", "b": [0.6425, 0.3849, 0.6592, 0.3999]}, {"w": "which", "b": [0.6654, 0.3849, 0.713, 0.3999]}, {"w": "the", "b": [0.7191, 0.3849, 0.7453, 0.3999]}, {"w": "current", "b": [0.7514, 0.3849, 0.8107, 0.3999]}, {"w": "unit", "b": [0.8168, 0.3849, 0.8503, 0.3999]}, {"w": "is", "b": [0.8564, 0.3849, 0.8691, 0.3999]}, {"w": "connected", "b": [0.1774, 0.4029, 0.2568, 0.4178]}, {"w": "(the", "b": [0.263, 0.4029, 0.2956, 0.4178]}, {"w": "one", "b": [0.3017, 0.4029, 0.3292, 0.4178]}, {"w": "whose", "b": [0.3354, 0.4029, 0.3833, 0.4178]}, {"w": "parameters", "b": [0.3895, 0.4029, 0.4783, 0.4178]}, {"w": "you", "b": [0.4844, 0.4029, 0.5129, 0.4178]}, {"w": "initialize);", "b": [0.5191, 0.4029, 0.5995, 0.4178]}, {"w": "and", "b": [0.6057, 0.4029, 0.6352, 0.4178]}, {"w": "“out”", "b": [0.6414, 0.4029, 0.6851, 0.4178]}, {"w": "is", "b": [0.6912, 0.4029, 0.7036, 0.4178]}, {"w": "the", "b": [0.7097, 0.4029, 0.7352, 0.4178]}, {"w": "number", "b": [0.7413, 0.4029, 0.802, 0.4178]}, {"w": "of", "b": [0.8081, 0.4029, 0.8229, 0.4178]}, {"w": "units", "b": [0.829, 0.4029, 0.8689, 0.4178]}, {"w": "on", "b": [0.1774, 0.4208, 0.1968, 0.4358]}, {"w": "the", "b": [0.203, 0.4208, 0.2286, 0.4358]}, {"w": "subsequent", "b": [0.2348, 0.4208, 0.3232, 0.4358]}, {"w": "layer", "b": [0.3294, 0.4208, 0.3679, 0.4358]}, {"w": "to", "b": [0.374, 0.4208, 0.3904, 0.4358]}, {"w": "which", "b": [0.3966, 0.4208, 0.4432, 0.4358]}, {"w": "the", "b": [0.4494, 0.4208, 0.475, 0.4358]}, {"w": "current", "b": [0.4812, 0.4208, 0.5392, 0.4358]}, {"w": "unit", "b": [0.5454, 0.4208, 0.5782, 0.4358]}, {"w": "is", "b": [0.5843, 0.4208, 0.5968, 0.4358]}, {"w": "connected;", "b": [0.6029, 0.4208, 0.6881, 0.4358]}, {"w": "and,", "b": [0.6942, 0.4208, 0.7291, 0.4358]}, {"w": "•", "b": [0.1538, 0.4387, 0.1681, 0.4537]}, {"w": "Xavier", "b": [0.1774, 0.4391, 0.2387, 0.454]}, {"w": "uniform", "b": [0.2486, 0.4391, 0.3216, 0.454]}, {"w": "—", "b": [0.3302, 0.4387, 0.349, 0.4537]}, {"w": "parameters", "b": [0.3576, 0.4387, 0.4489, 0.4537]}, {"w": "are", "b": [0.4575, 0.4387, 0.4826, 0.4537]}, {"w": "initialized", "b": [0.4912, 0.4387, 0.5718, 0.4537]}, {"w": "to", "b": [0.5804, 0.4387, 0.5971, 0.4537]}, {"w": "values", "b": [0.6057, 0.4387, 0.6555, 0.4537]}, {"w": "sampled", "b": [0.6641, 0.4387, 0.7312, 0.4537]}, {"w": "from", "b": [0.7398, 0.4387, 0.778, 0.4537]}, {"w": "a", "b": [0.7866, 0.4387, 0.796, 0.4537]}, {"w": "uniform", "b": [0.8046, 0.4387, 0.869, 0.4537]}, {"w": "distribution", "b": [0.1774, 0.4567, 0.2723, 0.4716]}, {"w": "within", "b": [0.2785, 0.4567, 0.33, 0.4716]}, {"w": "[−limit,", "b": [0.3361, 0.4567, 0.3987, 0.4719]}, {"w": "limit],", "b": [0.4018, 0.4567, 0.45, 0.4716]}, {"w": "where", "b": [0.4562, 0.4567, 0.5036, 0.4716]}, {"w": "“limit”", "b": [0.5098, 0.4567, 0.5652, 0.4716]}, {"w": "is", "b": [0.5713, 0.4567, 0.5838, 0.4716]}]}, {"id": "b_6", "type": "equation", "text": "6/(in + out), and “in” and “out” are defined as in Xavier normal, above.", "words": [{"w": "6/(in", "b": [0.6084, 0.4567, 0.6494, 0.4719]}, {"w": "+", "b": [0.6535, 0.4567, 0.6678, 0.4716]}, {"w": "out),", "b": [0.6719, 0.4567, 0.7109, 0.4716]}, {"w": "and", "b": [0.717, 0.4567, 0.7469, 0.4716]}, {"w": "“in”", "b": [0.7531, 0.4567, 0.7859, 0.4716]}, {"w": "and", "b": [0.7921, 0.4567, 0.822, 0.4716]}, {"w": "“out”", "b": [0.8281, 0.4567, 0.8723, 0.4716]}, {"w": "are", "b": [0.1774, 0.4746, 0.202, 0.4896]}, {"w": "defined", "b": [0.2082, 0.4746, 0.2656, 0.4896]}, {"w": "as", "b": [0.2718, 0.4746, 0.2883, 0.4896]}, {"w": "in", "b": [0.2944, 0.4746, 0.3098, 0.4896]}, {"w": "Xavier", "b": [0.316, 0.4746, 0.3688, 0.4896]}, {"w": "normal,", "b": [0.375, 0.4746, 0.4365, 0.4896]}, {"w": "above.", "b": [0.4427, 0.4746, 0.494, 0.4896]}]}, {"id": "b_7", "type": "paragraph", "text": "There are other initialization strategies. If you work with a neural network training module such as TensorFlow, Keras, or PyTorch, they provide some parameter initializers, and also recommend default choices.", "words": [{"w": "There", "b": [0.1306, 0.5016, 0.1776, 0.5165]}, {"w": "are", "b": [0.1838, 0.5016, 0.2083, 0.5165]}, {"w": "other", "b": [0.2145, 0.5016, 0.2564, 0.5165]}, {"w": "initialization", "b": [0.2626, 0.5016, 0.3637, 0.5165]}, {"w": "strategies.", "b": [0.3699, 0.5016, 0.4508, 0.5165]}, {"w": "If", "b": [0.4591, 0.5016, 0.4713, 0.5165]}, {"w": "you", "b": [0.4775, 0.5016, 0.5061, 0.5165]}, {"w": "work", "b": [0.5122, 0.5016, 0.5511, 0.5165]}, {"w": "with", "b": [0.5572, 0.5016, 0.593, 0.5165]}, {"w": "a", "b": [0.5992, 0.5016, 0.6083, 0.5165]}, {"w": "neural", "b": [0.6145, 0.5016, 0.6646, 0.5165]}, {"w": "network", "b": [0.6708, 0.5016, 0.7346, 0.5165]}, {"w": "training", "b": [0.7408, 0.5016, 0.8042, 0.5165]}, {"w": "module", "b": [0.8104, 0.5016, 0.8691, 0.5165]}, {"w": "such", "b": [0.1312, 0.5195, 0.167, 0.5345]}, {"w": "as", "b": [0.1732, 0.5195, 0.1899, 0.5345]}, {"w": "TensorFlow,", "b": [0.196, 0.5195, 0.2953, 0.5345]}, {"w": "Keras,", "b": [0.3014, 0.5195, 0.3533, 0.5345]}, {"w": "or", "b": [0.3595, 0.5195, 0.3761, 0.5345]}, {"w": "PyTorch,", "b": [0.3823, 0.5195, 0.4566, 0.5345]}, {"w": "they", "b": [0.4627, 0.5195, 0.4984, 0.5345]}, {"w": "provide", "b": [0.5046, 0.5195, 0.5647, 0.5345]}, {"w": "some", "b": [0.5708, 0.5195, 0.6113, 0.5345]}, {"w": "parameter", "b": [0.6174, 0.5195, 0.7003, 0.5345]}, {"w": "initializers,", "b": [0.7065, 0.5195, 0.7956, 0.5345]}, {"w": "and", "b": [0.8018, 0.5195, 0.8318, 0.5345]}, {"w": "also", "b": [0.838, 0.5195, 0.8691, 0.5345]}, {"w": "recommend", "b": [0.1312, 0.5375, 0.2236, 0.5524]}, {"w": "default", "b": [0.2297, 0.5375, 0.2856, 0.5524]}, {"w": "choices.", "b": [0.2918, 0.5375, 0.3529, 0.5524]}]}, {"id": "b_8", "type": "paragraph", "text": "The bias term is usually initialized with a zero.", "words": [{"w": "The", "b": [0.1306, 0.5644, 0.1624, 0.5793]}, {"w": "bias", "b": [0.1685, 0.5644, 0.2004, 0.5793]}, {"w": "term", "b": [0.2066, 0.5644, 0.2445, 0.5793]}, {"w": "is", "b": [0.2507, 0.5644, 0.2631, 0.5793]}, {"w": "usually", "b": [0.2693, 0.5644, 0.3263, 0.5793]}, {"w": "initialized", "b": [0.3324, 0.5644, 0.4114, 0.5793]}, {"w": "with", "b": [0.4175, 0.5644, 0.4534, 0.5793]}, {"w": "a", "b": [0.4596, 0.5644, 0.4688, 0.5793]}, {"w": "zero.", "b": [0.475, 0.5644, 0.513, 0.5793]}]}, {"id": "b_9", "type": "paragraph", "text": "While we know the parameter initialization affects the model properties, we cannot predict which strategy will provide the best result for your problem. Random and Xavier initializers are the most common. It’s recommended to start your experiments with one of those two.", "words": [{"w": "While", "b": [0.1303, 0.5913, 0.1782, 0.6063]}, {"w": "we", "b": [0.1843, 0.5913, 0.2054, 0.6063]}, {"w": "know", "b": [0.2116, 0.5913, 0.2538, 0.6063]}, {"w": "the", "b": [0.2599, 0.5913, 0.2857, 0.6063]}, {"w": "parameter", "b": [0.2918, 0.5913, 0.3743, 0.6063]}, {"w": "initialization", "b": [0.3804, 0.5913, 0.4823, 0.6063]}, {"w": "affects", "b": [0.4885, 0.5913, 0.5395, 0.6063]}, {"w": "the", "b": [0.5457, 0.5913, 0.5714, 0.6063]}, {"w": "model", "b": [0.5776, 0.5913, 0.6265, 0.6063]}, {"w": "properties,", "b": [0.6326, 0.5913, 0.7188, 0.6063]}, {"w": "we", "b": [0.725, 0.5913, 0.7461, 0.6063]}, {"w": "cannot", "b": [0.7522, 0.5913, 0.8068, 0.6063]}, {"w": "predict", "b": [0.8129, 0.5913, 0.8696, 0.6063]}, {"w": "which", "b": [0.1306, 0.6092, 0.1765, 0.6242]}, {"w": "strategy", "b": [0.1826, 0.6092, 0.2469, 0.6242]}, {"w": "will", "b": [0.253, 0.6092, 0.2813, 0.6242]}, {"w": "provide", "b": [0.2874, 0.6092, 0.346, 0.6242]}, {"w": "the", "b": [0.3522, 0.6092, 0.3774, 0.6242]}, {"w": "best", "b": [0.3835, 0.6092, 0.4165, 0.6242]}, {"w": "result", "b": [0.4226, 0.6092, 0.4672, 0.6242]}, {"w": "for", "b": [0.4733, 0.6092, 0.4951, 0.6242]}, {"w": "your", "b": [0.5012, 0.6092, 0.5366, 0.6242]}, {"w": "problem.", "b": [0.5428, 0.6092, 0.6124, 0.6242]}, {"w": "Random", "b": [0.6206, 0.6092, 0.6875, 0.6242]}, {"w": "and", "b": [0.6936, 0.6092, 0.7229, 0.6242]}, {"w": "Xavier", "b": [0.729, 0.6092, 0.781, 0.6242]}, {"w": "initializers", "b": [0.7872, 0.6092, 0.8691, 0.6242]}, {"w": "are", "b": [0.1312, 0.6272, 0.1559, 0.6421]}, {"w": "the", "b": [0.162, 0.6272, 0.1877, 0.6421]}, {"w": "most", "b": [0.1939, 0.6272, 0.2329, 0.6421]}, {"w": "common.", "b": [0.2391, 0.6272, 0.3118, 0.6421]}, {"w": "It’s", "b": [0.32, 0.6272, 0.3463, 0.6421]}, {"w": "recommended", "b": [0.3524, 0.6272, 0.4632, 0.6421]}, {"w": "to", "b": [0.4694, 0.6272, 0.4858, 0.6421]}, {"w": "start", "b": [0.4919, 0.6272, 0.53, 0.6421]}, {"w": "your", "b": [0.5362, 0.6272, 0.5721, 0.6421]}, {"w": "experiments", "b": [0.5783, 0.6272, 0.6753, 0.6421]}, {"w": "with", "b": [0.6815, 0.6272, 0.7174, 0.6421]}, {"w": "one", "b": [0.7235, 0.6272, 0.7512, 0.6421]}, {"w": "of", "b": [0.7574, 0.6272, 0.7722, 0.6421]}, {"w": "those", "b": [0.7784, 0.6272, 0.8205, 0.6421]}, {"w": "two.", "b": [0.8267, 0.6272, 0.8605, 0.6421]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "7", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 183, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 1: A local and a global minima of a function.", "words": [{"w": "Figure", "b": [0.2879, 0.3873, 0.34, 0.4022]}, {"w": "1:", "b": [0.3462, 0.3873, 0.3605, 0.4022]}, {"w": "A", "b": [0.3687, 0.3873, 0.3826, 0.4022]}, {"w": "local", "b": [0.3887, 0.3873, 0.4262, 0.4022]}, {"w": "and", "b": [0.4323, 0.3873, 0.462, 0.4022]}, {"w": "a", "b": [0.4682, 0.3873, 0.4774, 0.4022]}, {"w": "global", "b": [0.4836, 0.3873, 0.5317, 0.4022]}, {"w": "minima", "b": [0.5379, 0.3873, 0.5984, 0.4022]}, {"w": "of", "b": [0.6045, 0.3873, 0.6194, 0.4022]}, {"w": "a", "b": [0.6255, 0.3873, 0.6348, 0.4022]}, {"w": "function.", "b": [0.6409, 0.3873, 0.7122, 0.4022]}]}, {"id": "b_1", "type": "paragraph", "text": "6.1.4 Optimization Algorithms", "words": [{"w": "6.1.4", "b": [0.1312, 0.4408, 0.1749, 0.4558]}, {"w": "Optimization", "b": [0.1961, 0.4408, 0.3178, 0.4558]}, {"w": "Algorithms", "b": [0.3249, 0.4408, 0.4288, 0.4558]}]}, {"id": "b_2", "type": "paragraph", "text": "In step 4, we select a cost-function optimization algorithm. When the cost function is differentiable (and it’s the case for all cost functions we considered above) gradient descent and stochastic gradient descent are two most frequently used optimization algorithms.", "words": [{"w": "In", "b": [0.1312, 0.4771, 0.1485, 0.492]}, {"w": "step", "b": [0.1568, 0.4771, 0.1903, 0.492]}, {"w": "4,", "b": [0.1986, 0.4771, 0.2133, 0.492]}, {"w": "we", "b": [0.2221, 0.4771, 0.2435, 0.492]}, {"w": "select", "b": [0.2518, 0.4771, 0.2969, 0.492]}, {"w": "a", "b": [0.3052, 0.4771, 0.3146, 0.492]}, {"w": "cost-function", "b": [0.3228, 0.4771, 0.4291, 0.492]}, {"w": "optimization", "b": [0.4374, 0.4771, 0.5409, 0.492]}, {"w": "algorithm.", "b": [0.5492, 0.4771, 0.634, 0.492]}, {"w": "When", "b": [0.6485, 0.4771, 0.6972, 0.492]}, {"w": "the", "b": [0.7054, 0.4771, 0.7316, 0.492]}, {"w": "cost", "b": [0.7399, 0.4771, 0.7724, 0.492]}, {"w": "function", "b": [0.7807, 0.4771, 0.8482, 0.492]}, {"w": "is", "b": [0.8564, 0.4771, 0.8691, 0.492]}, {"w": "differentiable", "b": [0.1312, 0.495, 0.2338, 0.51]}, {"w": "(and", "b": [0.2394, 0.495, 0.2755, 0.51]}, {"w": "it’s", "b": [0.2811, 0.495, 0.3053, 0.51]}, {"w": "the", "b": [0.3109, 0.495, 0.336, 0.51]}, {"w": "case", "b": [0.3416, 0.495, 0.3738, 0.51]}, {"w": "for", "b": [0.3794, 0.495, 0.401, 0.51]}, {"w": "all", "b": [0.4066, 0.495, 0.4257, 0.51]}, {"w": "cost", "b": [0.4313, 0.495, 0.4625, 0.51]}, {"w": "functions", "b": [0.4681, 0.495, 0.54, 0.51]}, {"w": "we", "b": [0.5456, 0.495, 0.5662, 0.51]}, {"w": "considered", "b": [0.5718, 0.495, 0.6544, 0.51]}, {"w": "above)", "b": [0.6599, 0.495, 0.7122, 0.51]}, {"w": "gradient", "b": [0.7174, 0.4953, 0.7939, 0.5103]}, {"w": "descent", "b": [0.8003, 0.4953, 0.8688, 0.5103]}, {"w": "and", "b": [0.1312, 0.513, 0.161, 0.5279]}, {"w": "stochastic", "b": [0.1671, 0.5133, 0.2578, 0.5282]}, {"w": "gradient", "b": [0.2649, 0.5133, 0.3414, 0.5282]}, {"w": "descent", "b": [0.3485, 0.5133, 0.417, 0.5282]}, {"w": "are", "b": [0.4231, 0.513, 0.4478, 0.5279]}, {"w": "two", "b": [0.4539, 0.513, 0.4826, 0.5279]}, {"w": "most", "b": [0.4888, 0.513, 0.5278, 0.5279]}, {"w": "frequently", "b": [0.534, 0.513, 0.615, 0.5279]}, {"w": "used", "b": [0.6212, 0.513, 0.6572, 0.5279]}, {"w": "optimization", "b": [0.6634, 0.513, 0.7649, 0.5279]}, {"w": "algorithms.", "b": [0.771, 0.513, 0.8614, 0.5279]}]}, {"id": "b_3", "type": "paragraph", "text": "Gradient descent is an iterative optimization algorithm for finding a local minimum of any differentiable function. We say that f(x) has a local minimum at x = c if f(x) ≥f(c) for every x in some open interval around x = c. An interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set. An open interval does not include its endpoints and is denoted using parentheses. For example, (0, 1) means “all numbers greater than 0 and less than 1.” The minimal value among all the local minima is called the global minimum. The difference between a local and a global minimum of a function is shown in Figure 1.", "words": [{"w": "Gradient", "b": [0.1312, 0.5399, 0.2012, 0.5549]}, {"w": "descent", "b": [0.2073, 0.5399, 0.2652, 0.5549]}, {"w": "is", "b": [0.2712, 0.5399, 0.2834, 0.5549]}, {"w": "an", "b": [0.2895, 0.5399, 0.3086, 0.5549]}, {"w": "iterative", "b": [0.3146, 0.5399, 0.38, 0.5549]}, {"w": "optimization", "b": [0.386, 0.5399, 0.4855, 0.5549]}, {"w": "algorithm", "b": [0.4916, 0.5399, 0.568, 0.5549]}, {"w": "for", "b": [0.574, 0.5399, 0.5957, 0.5549]}, {"w": "finding", "b": [0.6017, 0.5399, 0.656, 0.5549]}, {"w": "a", "b": [0.662, 0.5399, 0.6711, 0.5549]}, {"w": "local", "b": [0.6771, 0.5402, 0.7198, 0.5552]}, {"w": "minimum", "b": [0.7268, 0.5402, 0.8146, 0.5552]}, {"w": "of", "b": [0.8207, 0.5399, 0.8353, 0.5549]}, {"w": "any", "b": [0.8413, 0.5399, 0.8695, 0.5549]}, {"w": "differentiable", "b": [0.1312, 0.5578, 0.2356, 0.5728]}, {"w": "function.", "b": [0.2417, 0.5578, 0.3128, 0.5728]}, {"w": "We", "b": [0.321, 0.5578, 0.3466, 0.5728]}, {"w": "say", "b": [0.3527, 0.5578, 0.3784, 0.5728]}, {"w": "that", "b": [0.3845, 0.5578, 0.4183, 0.5728]}, {"w": "f(x)", "b": [0.4243, 0.5578, 0.4601, 0.5731]}, {"w": "has", "b": [0.4663, 0.5578, 0.493, 0.5728]}, {"w": "a", "b": [0.4991, 0.5578, 0.5083, 0.5728]}, {"w": "local", "b": [0.5147, 0.5582, 0.5574, 0.5731]}, {"w": "minimum", "b": [0.5645, 0.5582, 0.6523, 0.5731]}, {"w": "at", "b": [0.6585, 0.5578, 0.6749, 0.5728]}, {"w": "x", "b": [0.681, 0.5581, 0.6916, 0.5731]}, {"w": "=", "b": [0.6967, 0.5578, 0.711, 0.5728]}, {"w": "c", "b": [0.7161, 0.5581, 0.7241, 0.5731]}, {"w": "if", "b": [0.7303, 0.5578, 0.741, 0.5728]}, {"w": "f(x)", "b": [0.7472, 0.5578, 0.783, 0.5731]}, {"w": "≥f(c)", "b": [0.7882, 0.5578, 0.841, 0.5731]}, {"w": "for", "b": [0.8471, 0.5578, 0.8692, 0.5728]}, {"w": "every", "b": [0.1312, 0.5758, 0.1747, 0.5908]}, {"w": "x", "b": [0.1814, 0.5761, 0.192, 0.591]}, {"w": "in", "b": [0.1987, 0.5758, 0.2144, 0.5908]}, {"w": "some", "b": [0.2212, 0.5758, 0.2621, 0.5908]}, {"w": "open", "b": [0.2688, 0.5761, 0.3133, 0.5911]}, {"w": "interval", "b": [0.3211, 0.5761, 0.3912, 0.5911]}, {"w": "around", "b": [0.3979, 0.5758, 0.4555, 0.5908]}, {"w": "x", "b": [0.4622, 0.5761, 0.4728, 0.591]}, {"w": "=", "b": [0.4789, 0.5758, 0.4936, 0.5908]}, {"w": "c.", "b": [0.4997, 0.5758, 0.5129, 0.591]}, {"w": "An", "b": [0.5229, 0.5758, 0.5475, 0.5908]}, {"w": "interval", "b": [0.5544, 0.5761, 0.6245, 0.5911]}, {"w": "is", "b": [0.6312, 0.5758, 0.6439, 0.5908]}, {"w": "a", "b": [0.6506, 0.5758, 0.6601, 0.5908]}, {"w": "set", "b": [0.6668, 0.5758, 0.6899, 0.5908]}, {"w": "of", "b": [0.6967, 0.5758, 0.7119, 0.5908]}, {"w": "real", "b": [0.7186, 0.5758, 0.749, 0.5908]}, {"w": "numbers", "b": [0.7558, 0.5758, 0.8255, 0.5908]}, {"w": "with", "b": [0.8323, 0.5758, 0.8689, 0.5908]}, {"w": "the", "b": [0.1312, 0.5937, 0.1572, 0.6087]}, {"w": "property", "b": [0.1634, 0.5937, 0.2337, 0.6087]}, {"w": "that", "b": [0.2399, 0.5937, 0.2742, 0.6087]}, {"w": "any", "b": [0.2803, 0.5937, 0.3095, 0.6087]}, {"w": "number", "b": [0.3156, 0.5937, 0.3776, 0.6087]}, {"w": "that", "b": [0.3837, 0.5937, 0.418, 0.6087]}, {"w": "lies", "b": [0.4242, 0.5937, 0.4503, 0.6087]}, {"w": "between", "b": [0.4565, 0.5937, 0.5225, 0.6087]}, {"w": "two", "b": [0.5287, 0.5937, 0.5578, 0.6087]}, {"w": "numbers", "b": [0.5639, 0.5937, 0.6333, 0.6087]}, {"w": "in", "b": [0.6394, 0.5937, 0.655, 0.6087]}, {"w": "the", "b": [0.6612, 0.5937, 0.6872, 0.6087]}, {"w": "set", "b": [0.6934, 0.5937, 0.7163, 0.6087]}, {"w": "is", "b": [0.7225, 0.5937, 0.7351, 0.6087]}, {"w": "also", "b": [0.7413, 0.5937, 0.7726, 0.6087]}, {"w": "included", "b": [0.7787, 0.5937, 0.8474, 0.6087]}, {"w": "in", "b": [0.8535, 0.5937, 0.8691, 0.6087]}, {"w": "the", "b": [0.1312, 0.6117, 0.1574, 0.6266]}, {"w": "set.", "b": [0.1636, 0.6117, 0.1919, 0.6266]}, {"w": "An", "b": [0.2003, 0.6117, 0.2248, 0.6266]}, {"w": "open", "b": [0.231, 0.6117, 0.2703, 0.6266]}, {"w": "interval", "b": [0.2765, 0.6117, 0.3383, 0.6266]}, {"w": "does", "b": [0.3444, 0.6117, 0.3806, 0.6266]}, {"w": "not", "b": [0.3868, 0.6117, 0.414, 0.6266]}, {"w": "include", "b": [0.4202, 0.6117, 0.4788, 0.6266]}, {"w": "its", "b": [0.485, 0.6117, 0.505, 0.6266]}, {"w": "endpoints", "b": [0.5112, 0.6117, 0.5908, 0.6266]}, {"w": "and", "b": [0.597, 0.6117, 0.6273, 0.6266]}, {"w": "is", "b": [0.6335, 0.6117, 0.6462, 0.6266]}, {"w": "denoted", "b": [0.6523, 0.6117, 0.7172, 0.6266]}, {"w": "using", "b": [0.7234, 0.6117, 0.7664, 0.6266]}, {"w": "parentheses.", "b": [0.7726, 0.6117, 0.8728, 0.6266]}, {"w": "For", "b": [0.1312, 0.6296, 0.1582, 0.6446]}, {"w": "example,", "b": [0.1644, 0.6296, 0.2357, 0.6446]}, {"w": "(0,", "b": [0.2418, 0.6296, 0.2634, 0.6449]}, {"w": "1)", "b": [0.2665, 0.6296, 0.2829, 0.6446]}, {"w": "means", "b": [0.289, 0.6296, 0.3394, 0.6446]}, {"w": "“all", "b": [0.3456, 0.6296, 0.3738, 0.6446]}, {"w": "numbers", "b": [0.38, 0.6296, 0.4484, 0.6446]}, {"w": "greater", "b": [0.4545, 0.6296, 0.5111, 0.6446]}, {"w": "than", "b": [0.5172, 0.6296, 0.5542, 0.6446]}, {"w": "0", "b": [0.5604, 0.6296, 0.5696, 0.6446]}, {"w": "and", "b": [0.5758, 0.6296, 0.6055, 0.6446]}, {"w": "less", "b": [0.6117, 0.6296, 0.6396, 0.6446]}, {"w": "than", "b": [0.6458, 0.6296, 0.6827, 0.6446]}, {"w": "1.”", "b": [0.6889, 0.6296, 0.7094, 0.6446]}, {"w": "The", "b": [0.7176, 0.6296, 0.7494, 0.6446]}, {"w": "minimal", "b": [0.7556, 0.6296, 0.8213, 0.6446]}, {"w": "value", "b": [0.8274, 0.6296, 0.869, 0.6446]}, {"w": "among", "b": [0.1312, 0.6476, 0.1845, 0.6625]}, {"w": "all", "b": [0.1907, 0.6476, 0.2102, 0.6625]}, {"w": "the", "b": [0.2163, 0.6476, 0.242, 0.6625]}, {"w": "local", "b": [0.2481, 0.6476, 0.2855, 0.6625]}, {"w": "minima", "b": [0.2917, 0.6476, 0.3522, 0.6625]}, {"w": "is", "b": [0.3583, 0.6476, 0.3707, 0.6625]}, {"w": "called", "b": [0.3769, 0.6476, 0.423, 0.6625]}, {"w": "the", "b": [0.4292, 0.6476, 0.4548, 0.6625]}, {"w": "global", "b": [0.4609, 0.6479, 0.516, 0.6628]}, {"w": "minimum.", "b": [0.5231, 0.6476, 0.6161, 0.6628]}, {"w": "The", "b": [0.6243, 0.6476, 0.656, 0.6625]}, {"w": "difference", "b": [0.6622, 0.6476, 0.7387, 0.6625]}, {"w": "between", "b": [0.7448, 0.6476, 0.8099, 0.6625]}, {"w": "a", "b": [0.8161, 0.6476, 0.8253, 0.6625]}, {"w": "local", "b": [0.8315, 0.6476, 0.8689, 0.6625]}, {"w": "and", "b": [0.1312, 0.6655, 0.161, 0.6805]}, {"w": "a", "b": [0.1671, 0.6655, 0.1763, 0.6805]}, {"w": "global", "b": [0.1825, 0.6655, 0.2307, 0.6805]}, {"w": "minimum", "b": [0.2368, 0.6655, 0.3132, 0.6805]}, {"w": "of", "b": [0.3193, 0.6655, 0.3342, 0.6805]}, {"w": "a", "b": [0.3404, 0.6655, 0.3496, 0.6805]}, {"w": "function", "b": [0.3557, 0.6655, 0.4219, 0.6805]}, {"w": "is", "b": [0.428, 0.6655, 0.4405, 0.6805]}, {"w": "shown", "b": [0.4466, 0.6655, 0.4964, 0.6805]}, {"w": "in", "b": [0.5026, 0.6655, 0.518, 0.6805]}, {"w": "Figure", "b": [0.5241, 0.6655, 0.5762, 0.6805]}, {"w": "1.", "b": [0.5824, 0.6655, 0.5967, 0.6805]}]}, {"id": "b_4", "type": "paragraph", "text": "Functions and optimization", "words": [{"w": "Functions", "b": [0.1312, 0.6928, 0.2207, 0.7077]}, {"w": "and", "b": [0.2278, 0.6928, 0.2617, 0.7077]}, {"w": "optimization", "b": [0.2688, 0.6928, 0.3852, 0.7077]}]}, {"id": "b_5", "type": "paragraph", "text": "In this block, for the curious reader, we explain the basics of mathematical function and function optimization. If you only want to know the mechanics of training neural networks, you can safely skip it.", "words": [{"w": "In", "b": [0.1774, 0.7313, 0.1946, 0.7463]}, {"w": "this", "b": [0.2009, 0.7313, 0.2313, 0.7463]}, {"w": "block,", "b": [0.2376, 0.7313, 0.2863, 0.7463]}, {"w": "for", "b": [0.2926, 0.7313, 0.3151, 0.7463]}, {"w": "the", "b": [0.3214, 0.7313, 0.3476, 0.7463]}, {"w": "curious", "b": [0.3539, 0.7313, 0.4126, 0.7463]}, {"w": "reader,", "b": [0.4189, 0.7313, 0.4755, 0.7463]}, {"w": "we", "b": [0.4818, 0.7313, 0.5033, 0.7463]}, {"w": "explain", "b": [0.5096, 0.7313, 0.5687, 0.7463]}, {"w": "the", "b": [0.5749, 0.7313, 0.6011, 0.7463]}, {"w": "basics", "b": [0.6074, 0.7313, 0.6557, 0.7463]}, {"w": "of", "b": [0.662, 0.7313, 0.6772, 0.7463]}, {"w": "mathematical", "b": [0.6835, 0.7313, 0.7953, 0.7463]}, {"w": "function", "b": [0.8016, 0.7313, 0.8691, 0.7463]}, {"w": "and", "b": [0.1774, 0.7493, 0.207, 0.7642]}, {"w": "function", "b": [0.2132, 0.7493, 0.2791, 0.7642]}, {"w": "optimization.", "b": [0.2853, 0.7493, 0.3916, 0.7642]}, {"w": "If", "b": [0.3998, 0.7493, 0.4121, 0.7642]}, {"w": "you", "b": [0.4183, 0.7493, 0.4469, 0.7642]}, {"w": "only", "b": [0.453, 0.7493, 0.4873, 0.7642]}, {"w": "want", "b": [0.4935, 0.7493, 0.5323, 0.7642]}, {"w": "to", "b": [0.5384, 0.7493, 0.5548, 0.7642]}, {"w": "know", "b": [0.561, 0.7493, 0.6029, 0.7642]}, {"w": "the", "b": [0.609, 0.7493, 0.6346, 0.7642]}, {"w": "mechanics", "b": [0.6408, 0.7493, 0.7221, 0.7642]}, {"w": "of", "b": [0.7283, 0.7493, 0.7431, 0.7642]}, {"w": "training", "b": [0.7493, 0.7493, 0.8127, 0.7642]}, {"w": "neural", "b": [0.8189, 0.7493, 0.869, 0.7642]}, {"w": "networks,", "b": [0.1774, 0.7672, 0.2539, 0.7822]}, {"w": "you", "b": [0.2601, 0.7672, 0.2888, 0.7822]}, {"w": "can", "b": [0.2949, 0.7672, 0.3226, 0.7822]}, {"w": "safely", "b": [0.3288, 0.7672, 0.374, 0.7822]}, {"w": "skip", "b": [0.3801, 0.7672, 0.4125, 0.7822]}, {"w": "it.", "b": [0.4187, 0.7672, 0.4361, 0.7822]}]}, {"id": "b_6", "type": "paragraph", "text": "A function is a relation that associates each element x of a set X, the domain of the function, to a single element y of another set Y, the codomain of the function. A function usually has a name. If the function is called f, this relation is denoted y = f(x), read “y equals f of x.” The element x is the argument, or input of the", "words": [{"w": "A", "b": [0.1767, 0.7941, 0.1908, 0.8091]}, {"w": "function", "b": [0.1979, 0.7945, 0.2739, 0.8094]}, {"w": "is", "b": [0.2811, 0.7941, 0.2938, 0.8091]}, {"w": "a", "b": [0.3009, 0.7941, 0.3103, 0.8091]}, {"w": "relation", "b": [0.3174, 0.7941, 0.3802, 0.8091]}, {"w": "that", "b": [0.3874, 0.7941, 0.4219, 0.8091]}, {"w": "associates", "b": [0.429, 0.7941, 0.5093, 0.8091]}, {"w": "each", "b": [0.5165, 0.7941, 0.5526, 0.8091]}, {"w": "element", "b": [0.5597, 0.7941, 0.623, 0.8091]}, {"w": "x", "b": [0.6299, 0.7944, 0.6405, 0.8094]}, {"w": "of", "b": [0.6476, 0.7941, 0.6628, 0.8091]}, {"w": "a", "b": [0.6699, 0.7941, 0.6793, 0.8091]}, {"w": "set", "b": [0.6864, 0.7941, 0.7095, 0.8091]}, {"w": "X,", "b": [0.7166, 0.7941, 0.7377, 0.8092]}, {"w": "the", "b": [0.7451, 0.7941, 0.7712, 0.8091]}, {"w": "domain", "b": [0.7783, 0.7945, 0.8464, 0.8094]}, {"w": "of", "b": [0.8536, 0.7941, 0.8688, 0.8091]}, {"w": "the", "b": [0.1774, 0.8121, 0.2035, 0.8271]}, {"w": "function,", "b": [0.2103, 0.8121, 0.283, 0.8271]}, {"w": "to", "b": [0.2899, 0.8121, 0.3067, 0.8271]}, {"w": "a", "b": [0.3135, 0.8121, 0.3229, 0.8271]}, {"w": "single", "b": [0.3296, 0.8121, 0.3758, 0.8271]}, {"w": "element", "b": [0.3826, 0.8121, 0.4459, 0.8271]}, {"w": "y", "b": [0.4525, 0.8124, 0.4615, 0.8273]}, {"w": "of", "b": [0.469, 0.8121, 0.4841, 0.8271]}, {"w": "another", "b": [0.4909, 0.8121, 0.5537, 0.8271]}, {"w": "set", "b": [0.5605, 0.8121, 0.5836, 0.8271]}, {"w": "Y,", "b": [0.5904, 0.8121, 0.6094, 0.8271]}, {"w": "the", "b": [0.6164, 0.8121, 0.6425, 0.8271]}, {"w": "codomain", "b": [0.6493, 0.8124, 0.738, 0.8274]}, {"w": "of", "b": [0.7448, 0.8121, 0.76, 0.8271]}, {"w": "the", "b": [0.7668, 0.8121, 0.7929, 0.8271]}, {"w": "function.", "b": [0.7997, 0.8121, 0.8724, 0.8271]}, {"w": "A", "b": [0.1767, 0.83, 0.1908, 0.845]}, {"w": "function", "b": [0.1981, 0.83, 0.2655, 0.845]}, {"w": "usually", "b": [0.2728, 0.83, 0.331, 0.845]}, {"w": "has", "b": [0.3383, 0.83, 0.3656, 0.845]}, {"w": "a", "b": [0.3729, 0.83, 0.3823, 0.845]}, {"w": "name.", "b": [0.3895, 0.83, 0.4387, 0.845]}, {"w": "If", "b": [0.4503, 0.83, 0.4629, 0.845]}, {"w": "the", "b": [0.4701, 0.83, 0.4963, 0.845]}, {"w": "function", "b": [0.5036, 0.83, 0.571, 0.845]}, {"w": "is", "b": [0.5784, 0.83, 0.591, 0.845]}, {"w": "called", "b": [0.5983, 0.83, 0.6454, 0.845]}, {"w": "f,", "b": [0.6524, 0.83, 0.6687, 0.8453]}, {"w": "this", "b": [0.6762, 0.83, 0.7067, 0.845]}, {"w": "relation", "b": [0.714, 0.83, 0.7768, 0.845]}, {"w": "is", "b": [0.7841, 0.83, 0.7967, 0.845]}, {"w": "denoted", "b": [0.804, 0.83, 0.8689, 0.845]}, {"w": "y", "b": [0.1774, 0.8483, 0.1864, 0.8632]}, {"w": "=", "b": [0.1946, 0.848, 0.2092, 0.8629]}, {"w": "f(x),", "b": [0.2168, 0.848, 0.2582, 0.8632]}, {"w": "read", "b": [0.2662, 0.848, 0.3018, 0.8629]}, {"w": "“y", "b": [0.3094, 0.848, 0.3273, 0.8632]}, {"w": "equals", "b": [0.3355, 0.848, 0.3864, 0.8629]}, {"w": "f", "b": [0.3939, 0.8483, 0.403, 0.8632]}, {"w": "of", "b": [0.4125, 0.848, 0.4277, 0.8629]}, {"w": "x.”", "b": [0.4353, 0.848, 0.4574, 0.8632]}, {"w": "The", "b": [0.4699, 0.848, 0.5023, 0.8629]}, {"w": "element", "b": [0.5099, 0.848, 0.5732, 0.8629]}, {"w": "x", "b": [0.5808, 0.8483, 0.5913, 0.8632]}, {"w": "is", "b": [0.5989, 0.848, 0.6116, 0.8629]}, {"w": "the", "b": [0.6191, 0.848, 0.6453, 0.8629]}, {"w": "argument,", "b": [0.6529, 0.848, 0.7361, 0.8629]}, {"w": "or", "b": [0.7441, 0.848, 0.7608, 0.8629]}, {"w": "input", "b": [0.7685, 0.848, 0.8124, 0.8629]}, {"w": "of", "b": [0.82, 0.848, 0.8351, 0.8629]}, {"w": "the", "b": [0.8427, 0.848, 0.8689, 0.8629]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "8", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 184, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "function, and y is the value of the function, or the output. The symbol that is used for representing the input is the variable of the function. We often say that f is a function of the variable x.", "words": [{"w": "function,", "b": [0.1774, 0.0881, 0.2473, 0.1031]}, {"w": "and", "b": [0.2534, 0.0881, 0.2826, 0.1031]}, {"w": "y", "b": [0.2887, 0.0884, 0.2977, 0.1033]}, {"w": "is", "b": [0.3045, 0.0881, 0.3167, 0.1031]}, {"w": "the", "b": [0.3228, 0.0881, 0.348, 0.1031]}, {"w": "value", "b": [0.3541, 0.0881, 0.3949, 0.1031]}, {"w": "of", "b": [0.401, 0.0881, 0.4156, 0.1031]}, {"w": "the", "b": [0.4217, 0.0881, 0.4469, 0.1031]}, {"w": "function,", "b": [0.453, 0.0881, 0.523, 0.1031]}, {"w": "or", "b": [0.5291, 0.0881, 0.5452, 0.1031]}, {"w": "the", "b": [0.5514, 0.0881, 0.5766, 0.1031]}, {"w": "output.", "b": [0.5827, 0.0881, 0.641, 0.1031]}, {"w": "The", "b": [0.6492, 0.0881, 0.6804, 0.1031]}, {"w": "symbol", "b": [0.6866, 0.0881, 0.7425, 0.1031]}, {"w": "that", "b": [0.7486, 0.0881, 0.7818, 0.1031]}, {"w": "is", "b": [0.7879, 0.0881, 0.8001, 0.1031]}, {"w": "used", "b": [0.8063, 0.0881, 0.8416, 0.1031]}, {"w": "for", "b": [0.8477, 0.0881, 0.8694, 0.1031]}, {"w": "representing", "b": [0.1774, 0.106, 0.2735, 0.121]}, {"w": "the", "b": [0.2796, 0.106, 0.3048, 0.121]}, {"w": "input", "b": [0.3108, 0.106, 0.353, 0.121]}, {"w": "is", "b": [0.3591, 0.106, 0.3713, 0.121]}, {"w": "the", "b": [0.3774, 0.106, 0.4025, 0.121]}, {"w": "variable", "b": [0.4086, 0.106, 0.4704, 0.121]}, {"w": "of", "b": [0.4765, 0.106, 0.4911, 0.121]}, {"w": "the", "b": [0.4971, 0.106, 0.5223, 0.121]}, {"w": "function.", "b": [0.5283, 0.106, 0.5982, 0.121]}, {"w": "We", "b": [0.6064, 0.106, 0.6315, 0.121]}, {"w": "often", "b": [0.6376, 0.106, 0.6772, 0.121]}, {"w": "say", "b": [0.6833, 0.106, 0.7085, 0.121]}, {"w": "that", "b": [0.7146, 0.106, 0.7478, 0.121]}, {"w": "f", "b": [0.7535, 0.1063, 0.7626, 0.1213]}, {"w": "is", "b": [0.7706, 0.106, 0.7828, 0.121]}, {"w": "a", "b": [0.7889, 0.106, 0.7979, 0.121]}, {"w": "function", "b": [0.804, 0.106, 0.8688, 0.121]}, {"w": "of", "b": [0.1774, 0.124, 0.1922, 0.1389]}, {"w": "the", "b": [0.1984, 0.124, 0.224, 0.1389]}, {"w": "variable", "b": [0.2302, 0.124, 0.2933, 0.1389]}, {"w": "x.", "b": [0.2994, 0.124, 0.3151, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "A derivative f ′ of a function f is a function or a value that describes how fast f increases or decreases. If the derivative is a constant value, like 5 or −3, then the function increases or decreases constantly, at any point x of its domain. If the derivative f ′ is itself a function, then the function f can grow at a different pace in different regions of its domain. If the derivative f ′ is positive at some point x, then the function f increases at this point. If the derivative of f is negative at some x, then the function decreases at this point. The derivative of zero at x means that the function neither decreases nor increases at x; the function’s slope at x is horizontal.", "words": [{"w": "A", "b": [0.1767, 0.1509, 0.1908, 0.1659]}, {"w": "derivative", "b": [0.1983, 0.1512, 0.2892, 0.1662]}, {"w": "f", "b": [0.2967, 0.1512, 0.3058, 0.1661]}, {"w": "′", "b": [0.3077, 0.1491, 0.312, 0.1596]}, {"w": "of", "b": [0.3204, 0.1509, 0.3356, 0.1659]}, {"w": "a", "b": [0.3431, 0.1509, 0.3525, 0.1659]}, {"w": "function", "b": [0.36, 0.1509, 0.4275, 0.1659]}, {"w": "f", "b": [0.4349, 0.1512, 0.4439, 0.1661]}, {"w": "is", "b": [0.4534, 0.1509, 0.4661, 0.1659]}, {"w": "a", "b": [0.4736, 0.1509, 0.483, 0.1659]}, {"w": "function", "b": [0.4905, 0.1509, 0.558, 0.1659]}, {"w": "or", "b": [0.5655, 0.1509, 0.5823, 0.1659]}, {"w": "a", "b": [0.5898, 0.1509, 0.5992, 0.1659]}, {"w": "value", "b": [0.6067, 0.1509, 0.649, 0.1659]}, {"w": "that", "b": [0.6565, 0.1509, 0.6911, 0.1659]}, {"w": "describes", "b": [0.6985, 0.1509, 0.7726, 0.1659]}, {"w": "how", "b": [0.7801, 0.1509, 0.813, 0.1659]}, {"w": "fast", "b": [0.8205, 0.1509, 0.8504, 0.1659]}, {"w": "f", "b": [0.8577, 0.1512, 0.8668, 0.1661]}, {"w": "increases", "b": [0.1774, 0.1689, 0.2498, 0.1838]}, {"w": "or", "b": [0.2573, 0.1689, 0.2741, 0.1838]}, {"w": "decreases.", "b": [0.2815, 0.1689, 0.3624, 0.1838]}, {"w": "If", "b": [0.3745, 0.1689, 0.3871, 0.1838]}, {"w": "the", "b": [0.3945, 0.1689, 0.4207, 0.1838]}, {"w": "derivative", "b": [0.4281, 0.1689, 0.5083, 0.1838]}, {"w": "is", "b": [0.5157, 0.1689, 0.5284, 0.1838]}, {"w": "a", "b": [0.5358, 0.1689, 0.5453, 0.1838]}, {"w": "constant", "b": [0.5527, 0.1689, 0.6224, 0.1838]}, {"w": "value,", "b": [0.6299, 0.1689, 0.6775, 0.1838]}, {"w": "like", "b": [0.6853, 0.1689, 0.7135, 0.1838]}, {"w": "5", "b": [0.7207, 0.1689, 0.7301, 0.1838]}, {"w": "or", "b": [0.7376, 0.1689, 0.7543, 0.1838]}, {"w": "−3,", "b": [0.7618, 0.1689, 0.7908, 0.1839]}, {"w": "then", "b": [0.7986, 0.1689, 0.8352, 0.1838]}, {"w": "the", "b": [0.8427, 0.1689, 0.8688, 0.1838]}, {"w": "function", "b": [0.1774, 0.1868, 0.2422, 0.2018]}, {"w": "increases", "b": [0.2475, 0.1868, 0.3171, 0.2018]}, {"w": "or", "b": [0.3223, 0.1868, 0.3385, 0.2018]}, {"w": "decreases", "b": [0.3437, 0.1868, 0.4164, 0.2018]}, {"w": "constantly,", "b": [0.4216, 0.1868, 0.5066, 0.2018]}, {"w": "at", "b": [0.512, 0.1868, 0.5281, 0.2018]}, {"w": "any", "b": [0.5334, 0.1868, 0.5615, 0.2018]}, {"w": "point", "b": [0.5668, 0.1868, 0.608, 0.2018]}, {"w": "x", "b": [0.613, 0.1871, 0.6235, 0.202]}, {"w": "of", "b": [0.6288, 0.1868, 0.6433, 0.2018]}, {"w": "its", "b": [0.6486, 0.1868, 0.6678, 0.2018]}, {"w": "domain.", "b": [0.6731, 0.1868, 0.7364, 0.2018]}, {"w": "If", "b": [0.7443, 0.1868, 0.7563, 0.2018]}, {"w": "the", "b": [0.7616, 0.1868, 0.7867, 0.2018]}, {"w": "derivative", "b": [0.792, 0.1868, 0.8689, 0.2018]}, {"w": "f", "b": [0.1774, 0.205, 0.1864, 0.22]}, {"w": "′", "b": [0.1884, 0.203, 0.1926, 0.2134]}, {"w": "is", "b": [0.2009, 0.2048, 0.2136, 0.2197]}, {"w": "itself", "b": [0.221, 0.2048, 0.2604, 0.2197]}, {"w": "a", "b": [0.2677, 0.2048, 0.2771, 0.2197]}, {"w": "function,", "b": [0.2845, 0.2048, 0.3572, 0.2197]}, {"w": "then", "b": [0.3649, 0.2048, 0.4016, 0.2197]}, {"w": "the", "b": [0.409, 0.2048, 0.4351, 0.2197]}, {"w": "function", "b": [0.4425, 0.2048, 0.51, 0.2197]}, {"w": "f", "b": [0.5172, 0.205, 0.5262, 0.22]}, {"w": "can", "b": [0.5356, 0.2048, 0.5638, 0.2197]}, {"w": "grow", "b": [0.5712, 0.2048, 0.6105, 0.2197]}, {"w": "at", "b": [0.6179, 0.2048, 0.6346, 0.2197]}, {"w": "a", "b": [0.642, 0.2048, 0.6514, 0.2197]}, {"w": "different", "b": [0.6588, 0.2048, 0.7269, 0.2197]}, {"w": "pace", "b": [0.7343, 0.2048, 0.7709, 0.2197]}, {"w": "in", "b": [0.7783, 0.2048, 0.794, 0.2197]}, {"w": "different", "b": [0.8013, 0.2048, 0.8694, 0.2197]}, {"w": "regions", "b": [0.1774, 0.2227, 0.2328, 0.2377]}, {"w": "of", "b": [0.2388, 0.2227, 0.2534, 0.2377]}, {"w": "its", "b": [0.2594, 0.2227, 0.2786, 0.2377]}, {"w": "domain.", "b": [0.2846, 0.2227, 0.3479, 0.2377]}, {"w": "If", "b": [0.3561, 0.2227, 0.3682, 0.2377]}, {"w": "the", "b": [0.3742, 0.2227, 0.3993, 0.2377]}, {"w": "derivative", "b": [0.4053, 0.2227, 0.4822, 0.2377]}, {"w": "f", "b": [0.4881, 0.223, 0.4972, 0.2379]}, {"w": "′", "b": [0.4991, 0.2209, 0.5034, 0.2314]}, {"w": "is", "b": [0.5104, 0.2227, 0.5225, 0.2377]}, {"w": "positive", "b": [0.5285, 0.2227, 0.5895, 0.2377]}, {"w": "at", "b": [0.5955, 0.2227, 0.6115, 0.2377]}, {"w": "some", "b": [0.6176, 0.2227, 0.6569, 0.2377]}, {"w": "point", "b": [0.6629, 0.2227, 0.7041, 0.2377]}, {"w": "x,", "b": [0.71, 0.2227, 0.7256, 0.2379]}, {"w": "then", "b": [0.7317, 0.2227, 0.7669, 0.2377]}, {"w": "the", "b": [0.7729, 0.2227, 0.798, 0.2377]}, {"w": "function", "b": [0.804, 0.2227, 0.8689, 0.2377]}, {"w": "f", "b": [0.1774, 0.2409, 0.1864, 0.2559]}, {"w": "increases", "b": [0.1945, 0.2406, 0.2641, 0.2556]}, {"w": "at", "b": [0.2703, 0.2406, 0.2863, 0.2556]}, {"w": "this", "b": [0.2925, 0.2406, 0.3217, 0.2556]}, {"w": "point.", "b": [0.3278, 0.2406, 0.3741, 0.2556]}, {"w": "If", "b": [0.3823, 0.2406, 0.3943, 0.2556]}, {"w": "the", "b": [0.4005, 0.2406, 0.4256, 0.2556]}, {"w": "derivative", "b": [0.4317, 0.2406, 0.5086, 0.2556]}, {"w": "of", "b": [0.5148, 0.2406, 0.5293, 0.2556]}, {"w": "f", "b": [0.5353, 0.2409, 0.5443, 0.2559]}, {"w": "is", "b": [0.5524, 0.2406, 0.5646, 0.2556]}, {"w": "negative", "b": [0.5707, 0.2406, 0.6361, 0.2556]}, {"w": "at", "b": [0.6422, 0.2406, 0.6583, 0.2556]}, {"w": "some", "b": [0.6644, 0.2406, 0.7037, 0.2556]}, {"w": "x,", "b": [0.7097, 0.2406, 0.7253, 0.2559]}, {"w": "then", "b": [0.7314, 0.2406, 0.7666, 0.2556]}, {"w": "the", "b": [0.7728, 0.2406, 0.7979, 0.2556]}, {"w": "function", "b": [0.804, 0.2406, 0.8689, 0.2556]}, {"w": "decreases", "b": [0.1774, 0.2586, 0.253, 0.2735]}, {"w": "at", "b": [0.2596, 0.2586, 0.2763, 0.2735]}, {"w": "this", "b": [0.2829, 0.2586, 0.3134, 0.2735]}, {"w": "point.", "b": [0.32, 0.2586, 0.3681, 0.2735]}, {"w": "The", "b": [0.3777, 0.2586, 0.4101, 0.2735]}, {"w": "derivative", "b": [0.4167, 0.2586, 0.4969, 0.2735]}, {"w": "of", "b": [0.5035, 0.2586, 0.5186, 0.2735]}, {"w": "zero", "b": [0.5253, 0.2586, 0.5588, 0.2735]}, {"w": "at", "b": [0.5654, 0.2586, 0.5821, 0.2735]}, {"w": "x", "b": [0.5885, 0.2589, 0.5991, 0.2738]}, {"w": "means", "b": [0.6057, 0.2586, 0.6571, 0.2735]}, {"w": "that", "b": [0.6637, 0.2586, 0.6982, 0.2735]}, {"w": "the", "b": [0.7048, 0.2586, 0.731, 0.2735]}, {"w": "function", "b": [0.7376, 0.2586, 0.8051, 0.2735]}, {"w": "neither", "b": [0.8117, 0.2586, 0.8693, 0.2735]}, {"w": "decreases", "b": [0.1774, 0.2765, 0.2515, 0.2915]}, {"w": "nor", "b": [0.2576, 0.2765, 0.2843, 0.2915]}, {"w": "increases", "b": [0.2905, 0.2765, 0.3615, 0.2915]}, {"w": "at", "b": [0.3677, 0.2765, 0.3841, 0.2915]}, {"w": "x;", "b": [0.3901, 0.2765, 0.4058, 0.2918]}, {"w": "the", "b": [0.4119, 0.2765, 0.4376, 0.2915]}, {"w": "function’s", "b": [0.4437, 0.2765, 0.5223, 0.2915]}, {"w": "slope", "b": [0.5284, 0.2765, 0.569, 0.2915]}, {"w": "at", "b": [0.5752, 0.2765, 0.5916, 0.2915]}, {"w": "x", "b": [0.5976, 0.2768, 0.6082, 0.2918]}, {"w": "is", "b": [0.6143, 0.2765, 0.6267, 0.2915]}, {"w": "horizontal.", "b": [0.6329, 0.2765, 0.7186, 0.2915]}]}, {"id": "b_2", "type": "paragraph", "text": "The process of finding a derivative is called differentiation.", "words": [{"w": "The", "b": [0.1767, 0.3035, 0.2085, 0.3184]}, {"w": "process", "b": [0.2146, 0.3035, 0.2729, 0.3184]}, {"w": "of", "b": [0.279, 0.3035, 0.2939, 0.3184]}, {"w": "finding", "b": [0.3, 0.3035, 0.3554, 0.3184]}, {"w": "a", "b": [0.3616, 0.3035, 0.3708, 0.3184]}, {"w": "derivative", "b": [0.3769, 0.3035, 0.4554, 0.3184]}, {"w": "is", "b": [0.4616, 0.3035, 0.474, 0.3184]}, {"w": "called", "b": [0.4801, 0.3035, 0.5263, 0.3184]}, {"w": "differentiation.", "b": [0.5323, 0.3035, 0.6679, 0.3187]}]}, {"id": "b_3", "type": "paragraph", "text": "Derivatives for basic functions are known. For example if f(x) = x2, then f ′(x) = 2x; if f(x) = 2x then f ′(x) = 2; if f(x) = 2 then f ′(x) = 0. The derivative of any function f(x) = c, where c is a constant value, is zero.", "words": [{"w": "Derivatives", "b": [0.1774, 0.3304, 0.2675, 0.3453]}, {"w": "for", "b": [0.2736, 0.3304, 0.2958, 0.3453]}, {"w": "basic", "b": [0.3019, 0.3304, 0.3422, 0.3453]}, {"w": "functions", "b": [0.3483, 0.3304, 0.4221, 0.3453]}, {"w": "are", "b": [0.4283, 0.3304, 0.4531, 0.3453]}, {"w": "known.", "b": [0.4592, 0.3304, 0.5169, 0.3453]}, {"w": "For", "b": [0.5251, 0.3304, 0.5522, 0.3453]}, {"w": "example", "b": [0.5583, 0.3304, 0.6248, 0.3453]}, {"w": "if", "b": [0.6309, 0.3304, 0.6417, 0.3453]}, {"w": "f(x)", "b": [0.6476, 0.3304, 0.6836, 0.3456]}, {"w": "=", "b": [0.6887, 0.3304, 0.7031, 0.3453]}, {"w": "x2,", "b": [0.7083, 0.3287, 0.7322, 0.3456]}, {"w": "then", "b": [0.7384, 0.3304, 0.7744, 0.3453]}, {"w": "f", "b": [0.7805, 0.3307, 0.7896, 0.3456]}, {"w": "′(x)", "b": [0.7916, 0.3286, 0.8217, 0.3456]}, {"w": "=", "b": [0.8268, 0.3304, 0.8412, 0.3453]}, {"w": "2x;", "b": [0.8464, 0.3304, 0.8713, 0.3456]}, {"w": "if", "b": [0.1774, 0.3483, 0.188, 0.3633]}, {"w": "f(x)", "b": [0.1941, 0.3483, 0.2298, 0.3636]}, {"w": "=", "b": [0.2349, 0.3483, 0.249, 0.3633]}, {"w": "2x", "b": [0.2542, 0.3483, 0.2738, 0.3636]}, {"w": "then", "b": [0.2799, 0.3483, 0.3152, 0.3633]}, {"w": "f", "b": [0.3214, 0.3486, 0.3304, 0.3636]}, {"w": "′(x)", "b": [0.3324, 0.3465, 0.3622, 0.3636]}, {"w": "=", "b": [0.3673, 0.3483, 0.3815, 0.3633]}, {"w": "2;", "b": [0.3866, 0.3483, 0.4007, 0.3633]}, {"w": "if", "b": [0.4069, 0.3483, 0.4174, 0.3633]}, {"w": "f(x)", "b": [0.4236, 0.3483, 0.4593, 0.3636]}, {"w": "=", "b": [0.4644, 0.3483, 0.4785, 0.3633]}, {"w": "2", "b": [0.4836, 0.3483, 0.4927, 0.3633]}, {"w": "then", "b": [0.4988, 0.3483, 0.5342, 0.3633]}, {"w": "f", "b": [0.5403, 0.3486, 0.5493, 0.3636]}, {"w": "′(x)", "b": [0.5513, 0.3465, 0.5812, 0.3636]}, {"w": "=", "b": [0.5863, 0.3483, 0.6004, 0.3633]}, {"w": "0.", "b": [0.6055, 0.3483, 0.6196, 0.3633]}, {"w": "The", "b": [0.6279, 0.3483, 0.6591, 0.3633]}, {"w": "derivative", "b": [0.6653, 0.3483, 0.7425, 0.3633]}, {"w": "of", "b": [0.7486, 0.3483, 0.7633, 0.3633]}, {"w": "any", "b": [0.7694, 0.3483, 0.7976, 0.3633]}, {"w": "function", "b": [0.8038, 0.3483, 0.8689, 0.3633]}, {"w": "f(x)", "b": [0.1774, 0.3663, 0.2133, 0.3815]}, {"w": "=", "b": [0.2184, 0.3663, 0.2328, 0.3812]}, {"w": "c,", "b": [0.2379, 0.3663, 0.251, 0.3815]}, {"w": "where", "b": [0.2571, 0.3663, 0.3044, 0.3812]}, {"w": "c", "b": [0.3105, 0.3666, 0.3185, 0.3815]}, {"w": "is", "b": [0.3246, 0.3663, 0.337, 0.3812]}, {"w": "a", "b": [0.3432, 0.3663, 0.3524, 0.3812]}, {"w": "constant", "b": [0.3586, 0.3663, 0.4269, 0.3812]}, {"w": "value,", "b": [0.433, 0.3663, 0.4797, 0.3812]}, {"w": "is", "b": [0.4858, 0.3663, 0.4982, 0.3812]}, {"w": "zero.", "b": [0.5044, 0.3663, 0.5424, 0.3812]}]}, {"id": "b_4", "type": "paragraph", "text": "If the function we want to differentiate is not basic, we can find its derivative using the chain rule. For instance if F(x) = f(g(x)), where f and g are some functions, then F ′(x) = f ′(g(x))g′(x). For example if F(x) = (5x + 1)2 then g(x) = 5x + 1 and f(g(x)) = (g(x))2. By applying the chain rule, we find F ′(x) = 2(5x + 1)g′(x) = 2(5x + 1)5 = 50x + 10.", "words": [{"w": "If", "b": [0.1774, 0.3932, 0.1899, 0.4082]}, {"w": "the", "b": [0.1965, 0.3932, 0.2227, 0.4082]}, {"w": "function", "b": [0.2293, 0.3932, 0.2967, 0.4082]}, {"w": "we", "b": [0.3033, 0.3932, 0.3248, 0.4082]}, {"w": "want", "b": [0.3314, 0.3932, 0.3711, 0.4082]}, {"w": "to", "b": [0.3777, 0.3932, 0.3945, 0.4082]}, {"w": "differentiate", "b": [0.401, 0.3932, 0.4995, 0.4082]}, {"w": "is", "b": [0.506, 0.3932, 0.5187, 0.4082]}, {"w": "not", "b": [0.5253, 0.3932, 0.5525, 0.4082]}, {"w": "basic,", "b": [0.5591, 0.3932, 0.6052, 0.4082]}, {"w": "we", "b": [0.6119, 0.3932, 0.6334, 0.4082]}, {"w": "can", "b": [0.64, 0.3932, 0.6682, 0.4082]}, {"w": "find", "b": [0.6748, 0.3932, 0.7062, 0.4082]}, {"w": "its", "b": [0.7128, 0.3932, 0.7328, 0.4082]}, {"w": "derivative", "b": [0.7394, 0.3932, 0.8195, 0.4082]}, {"w": "using", "b": [0.8261, 0.3932, 0.8691, 0.4082]}, {"w": "the", "b": [0.1774, 0.4111, 0.2035, 0.4261]}, {"w": "chain", "b": [0.2104, 0.4114, 0.259, 0.4264]}, {"w": "rule.", "b": [0.267, 0.4111, 0.3084, 0.4264]}, {"w": "For", "b": [0.3189, 0.4111, 0.3464, 0.4261]}, {"w": "instance", "b": [0.3533, 0.4111, 0.4204, 0.4261]}, {"w": "if", "b": [0.4273, 0.4111, 0.4383, 0.4261]}, {"w": "F(x)", "b": [0.4451, 0.4111, 0.4847, 0.4264]}, {"w": "=", "b": [0.4911, 0.4111, 0.5058, 0.4261]}, {"w": "f(g(x)),", "b": [0.5122, 0.4111, 0.5777, 0.4264]}, {"w": "where", "b": [0.5848, 0.4111, 0.633, 0.4261]}, {"w": "f", "b": [0.6399, 0.4114, 0.6489, 0.4264]}, {"w": "and", "b": [0.6578, 0.4111, 0.6881, 0.4261]}, {"w": "g", "b": [0.695, 0.4114, 0.7038, 0.4264]}, {"w": "are", "b": [0.7114, 0.4111, 0.7366, 0.4261]}, {"w": "some", "b": [0.7435, 0.4111, 0.7844, 0.4261]}, {"w": "functions,", "b": [0.7913, 0.4111, 0.8714, 0.4261]}, {"w": "then", "b": [0.1774, 0.4291, 0.2139, 0.444]}, {"w": "F", "b": [0.22, 0.4294, 0.2319, 0.4443]}, {"w": "′(x)", "b": [0.2345, 0.4273, 0.2648, 0.4443]}, {"w": "=", "b": [0.2699, 0.4291, 0.2845, 0.444]}, {"w": "f", "b": [0.2896, 0.4294, 0.2987, 0.4443]}, {"w": "′(g(x))g′(x).", "b": [0.3007, 0.4273, 0.4001, 0.4443]}, {"w": "For", "b": [0.4083, 0.4291, 0.4358, 0.444]}, {"w": "example", "b": [0.4419, 0.4291, 0.5092, 0.444]}, {"w": "if", "b": [0.5154, 0.4291, 0.5264, 0.444]}, {"w": "F(x)", "b": [0.5325, 0.4291, 0.572, 0.4443]}, {"w": "=", "b": [0.5772, 0.4291, 0.5918, 0.444]}, {"w": "(5x", "b": [0.5969, 0.4291, 0.6241, 0.4443]}, {"w": "+", "b": [0.6282, 0.4291, 0.6429, 0.444]}, {"w": "1)2", "b": [0.6469, 0.4275, 0.671, 0.444]}, {"w": "then", "b": [0.6781, 0.4291, 0.7146, 0.444]}, {"w": "g(x)", "b": [0.7207, 0.4291, 0.7554, 0.4443]}, {"w": "=", "b": [0.7605, 0.4291, 0.7751, 0.444]}, {"w": "5x", "b": [0.7802, 0.4291, 0.8002, 0.4443]}, {"w": "+", "b": [0.8043, 0.4291, 0.8189, 0.444]}, {"w": "1", "b": [0.823, 0.4291, 0.8324, 0.444]}, {"w": "and", "b": [0.8385, 0.4291, 0.8688, 0.444]}, {"w": "f(g(x))", "b": [0.1774, 0.447, 0.2377, 0.4623]}, {"w": "=", "b": [0.2456, 0.447, 0.2603, 0.462]}, {"w": "(g(x))2.", "b": [0.2682, 0.4454, 0.331, 0.4623]}, {"w": "By", "b": [0.3443, 0.447, 0.3676, 0.462]}, {"w": "applying", "b": [0.3754, 0.447, 0.446, 0.462]}, {"w": "the", "b": [0.4539, 0.447, 0.48, 0.462]}, {"w": "chain", "b": [0.4879, 0.447, 0.5313, 0.462]}, {"w": "rule,", "b": [0.5391, 0.447, 0.5758, 0.462]}, {"w": "we", "b": [0.5841, 0.447, 0.6056, 0.462]}, {"w": "find", "b": [0.6134, 0.447, 0.6448, 0.462]}, {"w": "F", "b": [0.6525, 0.4473, 0.6644, 0.4623]}, {"w": "′(x)", "b": [0.6669, 0.4453, 0.6973, 0.4623]}, {"w": "=", "b": [0.7052, 0.447, 0.7199, 0.462]}, {"w": "2(5x", "b": [0.7278, 0.447, 0.7645, 0.4623]}, {"w": "+", "b": [0.7698, 0.447, 0.7844, 0.462]}, {"w": "1)g′(x)", "b": [0.7896, 0.4453, 0.8462, 0.4623]}, {"w": "=", "b": [0.8541, 0.447, 0.8688, 0.462]}, {"w": "2(5x", "b": [0.1769, 0.465, 0.2131, 0.4802]}, {"w": "+", "b": [0.2172, 0.465, 0.2315, 0.4799]}, {"w": "1)5", "b": [0.2356, 0.465, 0.2612, 0.4799]}, {"w": "=", "b": [0.2664, 0.465, 0.2807, 0.4799]}, {"w": "50x", "b": [0.2859, 0.465, 0.3148, 0.4802]}, {"w": "+", "b": [0.3189, 0.465, 0.3333, 0.4799]}, {"w": "10.", "b": [0.3374, 0.465, 0.361, 0.4799]}]}, {"id": "b_5", "type": "paragraph", "text": "Gradient is the generalization of derivatives for functions that take several inputs, or one input in the form of a vector or some other complex structure. A gradient of a function is a vector of partial derivatives. Finding a partial derivative of a function is the process of finding the derivative by focusing on one of the function’s inputs and considering all other inputs as constant values.", "words": [{"w": "Gradient", "b": [0.1774, 0.4922, 0.26, 0.5072]}, {"w": "is", "b": [0.2661, 0.4919, 0.2784, 0.5069]}, {"w": "the", "b": [0.2845, 0.4919, 0.31, 0.5069]}, {"w": "generalization", "b": [0.3161, 0.4919, 0.427, 0.5069]}, {"w": "of", "b": [0.4332, 0.4919, 0.4479, 0.5069]}, {"w": "derivatives", "b": [0.4541, 0.4919, 0.5392, 0.5069]}, {"w": "for", "b": [0.5453, 0.4919, 0.5672, 0.5069]}, {"w": "functions", "b": [0.5734, 0.4919, 0.6462, 0.5069]}, {"w": "that", "b": [0.6523, 0.4919, 0.6859, 0.5069]}, {"w": "take", "b": [0.6921, 0.4919, 0.7256, 0.5069]}, {"w": "several", "b": [0.7317, 0.4919, 0.7858, 0.5069]}, {"w": "inputs,", "b": [0.792, 0.4919, 0.847, 0.5069]}, {"w": "or", "b": [0.8531, 0.4919, 0.8695, 0.5069]}, {"w": "one", "b": [0.1774, 0.5098, 0.2056, 0.5248]}, {"w": "input", "b": [0.2123, 0.5098, 0.2562, 0.5248]}, {"w": "in", "b": [0.263, 0.5098, 0.2787, 0.5248]}, {"w": "the", "b": [0.2854, 0.5098, 0.3115, 0.5248]}, {"w": "form", "b": [0.3182, 0.5098, 0.3565, 0.5248]}, {"w": "of", "b": [0.3632, 0.5098, 0.3783, 0.5248]}, {"w": "a", "b": [0.3851, 0.5098, 0.3945, 0.5248]}, {"w": "vector", "b": [0.4012, 0.5098, 0.4514, 0.5248]}, {"w": "or", "b": [0.4582, 0.5098, 0.4749, 0.5248]}, {"w": "some", "b": [0.4817, 0.5098, 0.5226, 0.5248]}, {"w": "other", "b": [0.5293, 0.5098, 0.5722, 0.5248]}, {"w": "complex", "b": [0.5789, 0.5098, 0.6464, 0.5248]}, {"w": "structure.", "b": [0.6531, 0.5098, 0.7328, 0.5248]}, {"w": "A", "b": [0.7427, 0.5098, 0.7568, 0.5248]}, {"w": "gradient", "b": [0.7635, 0.5098, 0.8311, 0.5248]}, {"w": "of", "b": [0.8378, 0.5098, 0.853, 0.5248]}, {"w": "a", "b": [0.8597, 0.5098, 0.8691, 0.5248]}, {"w": "function", "b": [0.1774, 0.5278, 0.2429, 0.5428]}, {"w": "is", "b": [0.2491, 0.5278, 0.2614, 0.5428]}, {"w": "a", "b": [0.2675, 0.5278, 0.2767, 0.5428]}, {"w": "vector", "b": [0.2828, 0.5278, 0.3317, 0.5428]}, {"w": "of", "b": [0.3378, 0.5278, 0.3526, 0.5428]}, {"w": "partial", "b": [0.3601, 0.5281, 0.4213, 0.5431]}, {"w": "derivatives.", "b": [0.4284, 0.5278, 0.5328, 0.5431]}, {"w": "Finding", "b": [0.541, 0.5278, 0.6027, 0.5428]}, {"w": "a", "b": [0.6089, 0.5278, 0.618, 0.5428]}, {"w": "partial", "b": [0.6242, 0.5278, 0.6771, 0.5428]}, {"w": "derivative", "b": [0.6832, 0.5278, 0.761, 0.5428]}, {"w": "of", "b": [0.7672, 0.5278, 0.7819, 0.5428]}, {"w": "a", "b": [0.7881, 0.5278, 0.7972, 0.5428]}, {"w": "function", "b": [0.8034, 0.5278, 0.8689, 0.5428]}, {"w": "is", "b": [0.1774, 0.5457, 0.1897, 0.5607]}, {"w": "the", "b": [0.1959, 0.5457, 0.2214, 0.5607]}, {"w": "process", "b": [0.2275, 0.5457, 0.2855, 0.5607]}, {"w": "of", "b": [0.2916, 0.5457, 0.3064, 0.5607]}, {"w": "finding", "b": [0.3126, 0.5457, 0.3677, 0.5607]}, {"w": "the", "b": [0.3739, 0.5457, 0.3994, 0.5607]}, {"w": "derivative", "b": [0.4055, 0.5457, 0.4837, 0.5607]}, {"w": "by", "b": [0.4899, 0.5457, 0.5093, 0.5607]}, {"w": "focusing", "b": [0.5154, 0.5457, 0.5809, 0.5607]}, {"w": "on", "b": [0.587, 0.5457, 0.6064, 0.5607]}, {"w": "one", "b": [0.6125, 0.5457, 0.6401, 0.5607]}, {"w": "of", "b": [0.6463, 0.5457, 0.6611, 0.5607]}, {"w": "the", "b": [0.6672, 0.5457, 0.6927, 0.5607]}, {"w": "function’s", "b": [0.6989, 0.5457, 0.7771, 0.5607]}, {"w": "inputs", "b": [0.7833, 0.5457, 0.8334, 0.5607]}, {"w": "and", "b": [0.8396, 0.5457, 0.8692, 0.5607]}, {"w": "considering", "b": [0.1774, 0.5637, 0.2678, 0.5786]}, {"w": "all", "b": [0.2739, 0.5637, 0.2934, 0.5786]}, {"w": "other", "b": [0.2995, 0.5637, 0.3416, 0.5786]}, {"w": "inputs", "b": [0.3478, 0.5637, 0.3982, 0.5786]}, {"w": "as", "b": [0.4043, 0.5637, 0.4208, 0.5786]}, {"w": "constant", "b": [0.427, 0.5637, 0.4953, 0.5786]}, {"w": "values.", "b": [0.5014, 0.5637, 0.5554, 0.5786]}]}, {"id": "b_6", "type": "paragraph", "text": "For example, if our function is defined as f([x(1), x(2)]) = ax(1) + bx(2) + c, then the partial derivative of function f with respect to x(1), denoted as ∂f ∂x(1) , is given by,", "words": [{"w": "For", "b": [0.1774, 0.5906, 0.2049, 0.6056]}, {"w": "example,", "b": [0.2114, 0.5906, 0.2841, 0.6056]}, {"w": "if", "b": [0.2907, 0.5906, 0.3017, 0.6056]}, {"w": "our", "b": [0.3082, 0.5906, 0.3355, 0.6056]}, {"w": "function", "b": [0.342, 0.5906, 0.4095, 0.6056]}, {"w": "is", "b": [0.416, 0.5906, 0.4286, 0.6056]}, {"w": "defined", "b": [0.4352, 0.5906, 0.4937, 0.6056]}, {"w": "as", "b": [0.5003, 0.5906, 0.5171, 0.6056]}, {"w": "f([x(1),", "b": [0.5235, 0.589, 0.5826, 0.6058]}, {"w": "x(2)])", "b": [0.5857, 0.589, 0.6286, 0.6058]}, {"w": "=", "b": [0.6343, 0.5906, 0.6489, 0.6056]}, {"w": "ax(1)", "b": [0.6547, 0.589, 0.6938, 0.6058]}, {"w": "+", "b": [0.6991, 0.5906, 0.7138, 0.6056]}, {"w": "bx(2)", "b": [0.7181, 0.589, 0.7554, 0.6058]}, {"w": "+", "b": [0.7607, 0.5906, 0.7754, 0.6056]}, {"w": "c,", "b": [0.7797, 0.5906, 0.7929, 0.6058]}, {"w": "then", "b": [0.7995, 0.5906, 0.8361, 0.6056]}, {"w": "the", "b": [0.8427, 0.5906, 0.8688, 0.6056]}, {"w": "partial", "b": [0.1774, 0.6086, 0.2307, 0.6235]}, {"w": "derivative", "b": [0.2369, 0.6086, 0.3154, 0.6235]}, {"w": "of", "b": [0.3215, 0.6086, 0.3364, 0.6235]}, {"w": "function", "b": [0.3426, 0.6086, 0.4087, 0.6235]}, {"w": "f", "b": [0.4147, 0.6088, 0.4238, 0.6238]}, {"w": "with", "b": [0.4319, 0.6086, 0.4678, 0.6235]}, {"w": "respect", "b": [0.4739, 0.6086, 0.531, 0.6235]}, {"w": "to", "b": [0.5372, 0.6086, 0.5536, 0.6235]}, {"w": "x(1),", "b": [0.5597, 0.6069, 0.5951, 0.6238]}, {"w": "denoted", "b": [0.6013, 0.6086, 0.6649, 0.6235]}, {"w": "as", "b": [0.671, 0.6086, 0.6875, 0.6235]}, {"w": "∂f", "b": [0.7043, 0.6057, 0.7202, 0.6161]}, {"w": "∂x(1)", "b": [0.6959, 0.6175, 0.7292, 0.6286]}, {"w": ",", "b": [0.7323, 0.6086, 0.7374, 0.6235]}, {"w": "is", "b": [0.7436, 0.6086, 0.756, 0.6235]}, {"w": "given", "b": [0.7622, 0.6086, 0.8042, 0.6235]}, {"w": "by,", "b": [0.8103, 0.6086, 0.8334, 0.6235]}]}, {"id": "b_7", "type": "equation", "text": "∂f ∂x(1) = a + 0 + 0 = a,", "words": [{"w": "∂f", "b": [0.4435, 0.6476, 0.4633, 0.6626]}, {"w": "∂x(1)", "b": [0.4338, 0.6675, 0.474, 0.6832]}, {"w": "=", "b": [0.4823, 0.6575, 0.4967, 0.6724]}, {"w": "a", "b": [0.5018, 0.6578, 0.5115, 0.6727]}, {"w": "+", "b": [0.5156, 0.6575, 0.53, 0.6724]}, {"w": "0", "b": [0.5341, 0.6575, 0.5433, 0.6724]}, {"w": "+", "b": [0.5474, 0.6575, 0.5617, 0.6724]}, {"w": "0", "b": [0.5659, 0.6575, 0.5751, 0.6724]}, {"w": "=", "b": [0.5802, 0.6575, 0.5946, 0.6724]}, {"w": "a,", "b": [0.5997, 0.6578, 0.6146, 0.6727]}]}, {"id": "b_8", "type": "paragraph", "text": "where a is the derivative of the function ax(1). The two zeros are respectively derivatives of bx(2) and c, because x(2) is considered constant when we calculate the derivative with respect to x(1), and the derivative of any constant is zero.", "words": [{"w": "where", "b": [0.1767, 0.7007, 0.223, 0.7157]}, {"w": "a", "b": [0.228, 0.701, 0.2377, 0.716]}, {"w": "is", "b": [0.2427, 0.7007, 0.2549, 0.7157]}, {"w": "the", "b": [0.2599, 0.7007, 0.2851, 0.7157]}, {"w": "derivative", "b": [0.2901, 0.7007, 0.367, 0.7157]}, {"w": "of", "b": [0.372, 0.7007, 0.3866, 0.7157]}, {"w": "the", "b": [0.3916, 0.7007, 0.4167, 0.7157]}, {"w": "function", "b": [0.4217, 0.7007, 0.4866, 0.7157]}, {"w": "ax(1).", "b": [0.4914, 0.6991, 0.5366, 0.716]}, {"w": "The", "b": [0.5444, 0.7007, 0.5756, 0.7157]}, {"w": "two", "b": [0.5806, 0.7007, 0.6087, 0.7157]}, {"w": "zeros", "b": [0.6137, 0.7007, 0.653, 0.7157]}, {"w": "are", "b": [0.6581, 0.7007, 0.6822, 0.7157]}, {"w": "respectively", "b": [0.6873, 0.7007, 0.7799, 0.7157]}, {"w": "derivatives", "b": [0.7849, 0.7007, 0.869, 0.7157]}, {"w": "of", "b": [0.1774, 0.7187, 0.1925, 0.7336]}, {"w": "bx(2)", "b": [0.1994, 0.717, 0.2367, 0.7339]}, {"w": "and", "b": [0.2446, 0.7187, 0.2749, 0.7336]}, {"w": "c,", "b": [0.2818, 0.7187, 0.295, 0.7339]}, {"w": "because", "b": [0.3021, 0.7187, 0.3655, 0.7336]}, {"w": "x(2)", "b": [0.3724, 0.717, 0.4018, 0.7339]}, {"w": "is", "b": [0.4096, 0.7187, 0.4223, 0.7336]}, {"w": "considered", "b": [0.4292, 0.7187, 0.5151, 0.7336]}, {"w": "constant", "b": [0.522, 0.7187, 0.5917, 0.7336]}, {"w": "when", "b": [0.5986, 0.7187, 0.6415, 0.7336]}, {"w": "we", "b": [0.6484, 0.7187, 0.6699, 0.7336]}, {"w": "calculate", "b": [0.6768, 0.7187, 0.749, 0.7336]}, {"w": "the", "b": [0.7559, 0.7187, 0.782, 0.7336]}, {"w": "derivative", "b": [0.7889, 0.7187, 0.869, 0.7336]}, {"w": "with", "b": [0.1767, 0.7366, 0.2126, 0.7516]}, {"w": "respect", "b": [0.2187, 0.7366, 0.2758, 0.7516]}, {"w": "to", "b": [0.282, 0.7366, 0.2984, 0.7516]}, {"w": "x(1),", "b": [0.3045, 0.735, 0.3399, 0.7519]}, {"w": "and", "b": [0.3461, 0.7366, 0.3758, 0.7516]}, {"w": "the", "b": [0.382, 0.7366, 0.4076, 0.7516]}, {"w": "derivative", "b": [0.4138, 0.7366, 0.4923, 0.7516]}, {"w": "of", "b": [0.4984, 0.7366, 0.5133, 0.7516]}, {"w": "any", "b": [0.5194, 0.7366, 0.5482, 0.7516]}, {"w": "constant", "b": [0.5543, 0.7366, 0.6226, 0.7516]}, {"w": "is", "b": [0.6288, 0.7366, 0.6412, 0.7516]}, {"w": "zero.", "b": [0.6473, 0.7366, 0.6853, 0.7516]}]}, {"id": "b_9", "type": "paragraph", "text": "Similarly, the partial derivative of function f with respect to x(2), ∂f ∂x(2) , is given by,", "words": [{"w": "Similarly,", "b": [0.1774, 0.7635, 0.2533, 0.7785]}, {"w": "the", "b": [0.2594, 0.7635, 0.2851, 0.7785]}, {"w": "partial", "b": [0.2912, 0.7635, 0.3446, 0.7785]}, {"w": "derivative", "b": [0.3507, 0.7635, 0.4293, 0.7785]}, {"w": "of", "b": [0.4354, 0.7635, 0.4503, 0.7785]}, {"w": "function", "b": [0.4564, 0.7635, 0.5226, 0.7785]}, {"w": "f", "b": [0.5286, 0.7638, 0.5376, 0.7788]}, {"w": "with", "b": [0.5457, 0.7635, 0.5816, 0.7785]}, {"w": "respect", "b": [0.5878, 0.7635, 0.6449, 0.7785]}, {"w": "to", "b": [0.651, 0.7635, 0.6674, 0.7785]}, {"w": "x(2),", "b": [0.6735, 0.7619, 0.709, 0.7788]}, {"w": "∂f", "b": [0.7258, 0.7606, 0.7416, 0.7711]}, {"w": "∂x(2)", "b": [0.7173, 0.7724, 0.7507, 0.7836]}, {"w": ",", "b": [0.7538, 0.7635, 0.7589, 0.7785]}, {"w": "is", "b": [0.7651, 0.7635, 0.7775, 0.7785]}, {"w": "given", "b": [0.7836, 0.7635, 0.8257, 0.7785]}, {"w": "by,", "b": [0.8318, 0.7635, 0.8549, 0.7785]}]}, {"id": "b_10", "type": "equation", "text": "∂f ∂x(2) = 0 + b + 0 = b.", "words": [{"w": "∂f", "b": [0.4453, 0.8026, 0.4652, 0.8176]}, {"w": "∂x(2)", "b": [0.4356, 0.8225, 0.4759, 0.8382]}, {"w": "=", "b": [0.4841, 0.8125, 0.4985, 0.8274]}, {"w": "0", "b": [0.5036, 0.8125, 0.5128, 0.8274]}, {"w": "+", "b": [0.5169, 0.8125, 0.5313, 0.8274]}, {"w": "b", "b": [0.5354, 0.8127, 0.5433, 0.8277]}, {"w": "+", "b": [0.5474, 0.8125, 0.5618, 0.8274]}, {"w": "0", "b": [0.5658, 0.8125, 0.5751, 0.8274]}, {"w": "=", "b": [0.5802, 0.8125, 0.5946, 0.8274]}, {"w": "b.", "b": [0.5997, 0.8127, 0.6127, 0.8277]}]}, {"id": "b_11", "type": "paragraph", "text": "The gradient of function f, denoted as ∇f is given by the vector [ ∂f ∂x(1) , ∂f ∂x(2) ].", "words": [{"w": "The", "b": [0.1767, 0.8564, 0.2085, 0.8713]}, {"w": "gradient", "b": [0.2146, 0.8564, 0.2808, 0.8713]}, {"w": "of", "b": [0.287, 0.8564, 0.3019, 0.8713]}, {"w": "function", "b": [0.308, 0.8564, 0.3742, 0.8713]}, {"w": "f,", "b": [0.3802, 0.8564, 0.3963, 0.8716]}, {"w": "denoted", "b": [0.4025, 0.8564, 0.4661, 0.8713]}, {"w": "as", "b": [0.4722, 0.8564, 0.4887, 0.8713]}, {"w": "∇f", "b": [0.4948, 0.8565, 0.5193, 0.8716]}, {"w": "is", "b": [0.5274, 0.8564, 0.5398, 0.8713]}, {"w": "given", "b": [0.5459, 0.8564, 0.588, 0.8713]}, {"w": "by", "b": [0.5942, 0.8564, 0.6136, 0.8713]}, {"w": "the", "b": [0.6198, 0.8564, 0.6454, 0.8713]}, {"w": "vector", "b": [0.6516, 0.8564, 0.7009, 0.8713]}, {"w": "[", "b": [0.7069, 0.8564, 0.712, 0.8713]}, {"w": "∂f", "b": [0.7228, 0.8535, 0.7387, 0.864]}, {"w": "∂x(1)", "b": [0.7143, 0.8653, 0.7477, 0.8764]}, {"w": ",", "b": [0.7508, 0.8566, 0.7559, 0.8716]}, {"w": "∂f", "b": [0.7697, 0.8535, 0.7855, 0.864]}, {"w": "∂x(2)", "b": [0.7612, 0.8653, 0.7945, 0.8764]}, {"w": "].", "b": [0.7976, 0.8564, 0.8079, 0.8713]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "9", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 185, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 2: The influence of the learning rate on the convergence: (a) too small, the convergence will be slow; (b) too large, no convergence; (c) the right value of learning rate.", "words": [{"w": "Figure", "b": [0.1312, 0.3871, 0.1823, 0.4021]}, {"w": "2:", "b": [0.1873, 0.3871, 0.2014, 0.4021]}, {"w": "The", "b": [0.209, 0.3871, 0.2401, 0.4021]}, {"w": "influence", "b": [0.2451, 0.3871, 0.3145, 0.4021]}, {"w": "of", "b": [0.3195, 0.3871, 0.3341, 0.4021]}, {"w": "the", "b": [0.3391, 0.3871, 0.3642, 0.4021]}, {"w": "learning", "b": [0.3692, 0.3871, 0.4326, 0.4021]}, {"w": "rate", "b": [0.4376, 0.3871, 0.4688, 0.4021]}, {"w": "on", "b": [0.4738, 0.3871, 0.4929, 0.4021]}, {"w": "the", "b": [0.4979, 0.3871, 0.523, 0.4021]}, {"w": "convergence:", "b": [0.528, 0.3871, 0.6271, 0.4021]}, {"w": "(a)", "b": [0.6347, 0.3871, 0.6578, 0.4021]}, {"w": "too", "b": [0.6628, 0.3871, 0.6884, 0.4021]}, {"w": "small,", "b": [0.6935, 0.3871, 0.7398, 0.4021]}, {"w": "the", "b": [0.745, 0.3871, 0.7701, 0.4021]}, {"w": "convergence", "b": [0.7751, 0.3871, 0.8692, 0.4021]}, {"w": "will", "b": [0.1306, 0.4051, 0.1593, 0.42]}, {"w": "be", "b": [0.1654, 0.4051, 0.1844, 0.42]}, {"w": "slow;", "b": [0.1905, 0.4051, 0.2301, 0.42]}, {"w": "(b)", "b": [0.2363, 0.4051, 0.2609, 0.42]}, {"w": "too", "b": [0.267, 0.4051, 0.2932, 0.42]}, {"w": "large,", "b": [0.2993, 0.4051, 0.3435, 0.42]}, {"w": "no", "b": [0.3496, 0.4051, 0.3691, 0.42]}, {"w": "convergence;", "b": [0.3753, 0.4051, 0.4763, 0.42]}, {"w": "(c)", "b": [0.4825, 0.4051, 0.5051, 0.42]}, {"w": "the", "b": [0.5112, 0.4051, 0.5368, 0.42]}, {"w": "right", "b": [0.543, 0.4051, 0.5815, 0.42]}, {"w": "value", "b": [0.5876, 0.4051, 0.6292, 0.42]}, {"w": "of", "b": [0.6353, 0.4051, 0.6502, 0.42]}, {"w": "learning", "b": [0.6564, 0.4051, 0.721, 0.42]}, {"w": "rate.", "b": [0.7272, 0.4051, 0.7641, 0.42]}]}, {"id": "b_1", "type": "paragraph", "text": "The chain rule works with partial derivatives too.", "words": [{"w": "The", "b": [0.1767, 0.4553, 0.2085, 0.4703]}, {"w": "chain", "b": [0.2146, 0.4553, 0.2572, 0.4703]}, {"w": "rule", "b": [0.2633, 0.4553, 0.2942, 0.4703]}, {"w": "works", "b": [0.3003, 0.4553, 0.3466, 0.4703]}, {"w": "with", "b": [0.3528, 0.4553, 0.3886, 0.4703]}, {"w": "partial", "b": [0.3948, 0.4553, 0.4482, 0.4703]}, {"w": "derivatives", "b": [0.4543, 0.4553, 0.5401, 0.4703]}, {"w": "too.", "b": [0.5463, 0.4553, 0.5775, 0.4703]}]}, {"id": "b_2", "type": "paragraph", "text": "To find a local minimum of a function using gradient descent, we start at some random point in the domain of the function. Then we move proportionally to the negative of the gradient (or approximate gradient) of the function at the current point.", "words": [{"w": "To", "b": [0.1306, 0.4822, 0.152, 0.4972]}, {"w": "find", "b": [0.1582, 0.4822, 0.1896, 0.4972]}, {"w": "a", "b": [0.1958, 0.4822, 0.2052, 0.4972]}, {"w": "local", "b": [0.2114, 0.4822, 0.2496, 0.4972]}, {"w": "minimum", "b": [0.2558, 0.4822, 0.3337, 0.4972]}, {"w": "of", "b": [0.3398, 0.4822, 0.355, 0.4972]}, {"w": "a", "b": [0.3612, 0.4822, 0.3706, 0.4972]}, {"w": "function", "b": [0.3768, 0.4822, 0.4443, 0.4972]}, {"w": "using", "b": [0.4505, 0.4822, 0.4935, 0.4972]}, {"w": "gradient", "b": [0.4998, 0.4825, 0.5763, 0.4975]}, {"w": "descent,", "b": [0.5834, 0.4822, 0.6571, 0.4975]}, {"w": "we", "b": [0.6633, 0.4822, 0.6848, 0.4972]}, {"w": "start", "b": [0.691, 0.4822, 0.7298, 0.4972]}, {"w": "at", "b": [0.736, 0.4822, 0.7527, 0.4972]}, {"w": "some", "b": [0.7589, 0.4822, 0.7998, 0.4972]}, {"w": "random", "b": [0.806, 0.4822, 0.8688, 0.4972]}, {"w": "point", "b": [0.1312, 0.5002, 0.1741, 0.5151]}, {"w": "in", "b": [0.1807, 0.5002, 0.1964, 0.5151]}, {"w": "the", "b": [0.203, 0.5002, 0.2292, 0.5151]}, {"w": "domain", "b": [0.2358, 0.5002, 0.2965, 0.5151]}, {"w": "of", "b": [0.3031, 0.5002, 0.3183, 0.5151]}, {"w": "the", "b": [0.3249, 0.5002, 0.351, 0.5151]}, {"w": "function.", "b": [0.3577, 0.5002, 0.4304, 0.5151]}, {"w": "Then", "b": [0.44, 0.5002, 0.4829, 0.5151]}, {"w": "we", "b": [0.4895, 0.5002, 0.5109, 0.5151]}, {"w": "move", "b": [0.5175, 0.5002, 0.5599, 0.5151]}, {"w": "proportionally", "b": [0.5665, 0.5002, 0.6838, 0.5151]}, {"w": "to", "b": [0.6904, 0.5002, 0.7071, 0.5151]}, {"w": "the", "b": [0.7137, 0.5002, 0.7399, 0.5151]}, {"w": "negative", "b": [0.7465, 0.5002, 0.8145, 0.5151]}, {"w": "of", "b": [0.8211, 0.5002, 0.8363, 0.5151]}, {"w": "the", "b": [0.8429, 0.5002, 0.8691, 0.5151]}, {"w": "gradient", "b": [0.1312, 0.5181, 0.1974, 0.5331]}, {"w": "(or", "b": [0.2036, 0.5181, 0.2272, 0.5331]}, {"w": "approximate", "b": [0.2334, 0.5181, 0.3339, 0.5331]}, {"w": "gradient)", "b": [0.34, 0.5181, 0.4134, 0.5331]}, {"w": "of", "b": [0.4196, 0.5181, 0.4344, 0.5331]}, {"w": "the", "b": [0.4406, 0.5181, 0.4662, 0.5331]}, {"w": "function", "b": [0.4724, 0.5181, 0.5385, 0.5331]}, {"w": "at", "b": [0.5447, 0.5181, 0.5611, 0.5331]}, {"w": "the", "b": [0.5672, 0.5181, 0.5929, 0.5331]}, {"w": "current", "b": [0.599, 0.5181, 0.6571, 0.5331]}, {"w": "point.", "b": [0.6632, 0.5181, 0.7104, 0.5331]}]}, {"id": "b_3", "type": "paragraph", "text": "Gradient descent in machine learning proceeds in epochs. An epoch consists of using the training set entirely to update each parameter. In the first epoch, we initialize the parameters of our neural network using one of the parameter-initialization strategies discussed above. The backpropagation algorithm computes the partial derivatives of each parameter using the chain rule for derivatives of complex functions.1 At each epoch, gradient descent updates all parameters using partial derivatives. The learning rate controls the significance of an update. The process continues until convergence, the state when the values of parameters don’t change much after each epoch. Then the algorithm stops.", "words": [{"w": "Gradient", "b": [0.1312, 0.545, 0.2041, 0.56]}, {"w": "descent", "b": [0.2103, 0.545, 0.2706, 0.56]}, {"w": "in", "b": [0.2767, 0.545, 0.2924, 0.56]}, {"w": "machine", "b": [0.2985, 0.545, 0.366, 0.56]}, {"w": "learning", "b": [0.3722, 0.545, 0.4381, 0.56]}, {"w": "proceeds", "b": [0.4443, 0.545, 0.515, 0.56]}, {"w": "in", "b": [0.5212, 0.545, 0.5369, 0.56]}, {"w": "epochs.", "b": [0.5429, 0.545, 0.6104, 0.5603]}, {"w": "An", "b": [0.6186, 0.545, 0.6432, 0.56]}, {"w": "epoch", "b": [0.6493, 0.545, 0.6969, 0.56]}, {"w": "consists", "b": [0.7031, 0.545, 0.7662, 0.56]}, {"w": "of", "b": [0.7723, 0.545, 0.7875, 0.56]}, {"w": "using", "b": [0.7936, 0.545, 0.8366, 0.56]}, {"w": "the", "b": [0.8428, 0.545, 0.8689, 0.56]}, {"w": "training", "b": [0.1312, 0.563, 0.1936, 0.5779]}, {"w": "set", "b": [0.199, 0.563, 0.2212, 0.5779]}, {"w": "entirely", "b": [0.2266, 0.563, 0.286, 0.5779]}, {"w": "to", "b": [0.2914, 0.563, 0.3075, 0.5779]}, {"w": "update", "b": [0.3129, 0.563, 0.3677, 0.5779]}, {"w": "each", "b": [0.3731, 0.563, 0.4078, 0.5779]}, {"w": "parameter.", "b": [0.4132, 0.563, 0.4987, 0.5779]}, {"w": "In", "b": [0.5066, 0.563, 0.5232, 0.5779]}, {"w": "the", "b": [0.5286, 0.563, 0.5538, 0.5779]}, {"w": "first", "b": [0.5592, 0.563, 0.5905, 0.5779]}, {"w": "epoch,", "b": [0.5959, 0.563, 0.6467, 0.5779]}, {"w": "we", "b": [0.6522, 0.563, 0.6728, 0.5779]}, {"w": "initialize", "b": [0.6782, 0.563, 0.7456, 0.5779]}, {"w": "the", "b": [0.751, 0.563, 0.7761, 0.5779]}, {"w": "parameters", "b": [0.7815, 0.563, 0.8691, 0.5779]}, {"w": "of", "b": [0.1312, 0.5809, 0.1464, 0.5959]}, {"w": "our", "b": [0.1528, 0.5809, 0.1801, 0.5959]}, {"w": "neural", "b": [0.1865, 0.5809, 0.2378, 0.5959]}, {"w": "network", "b": [0.2442, 0.5809, 0.3096, 0.5959]}, {"w": "using", "b": [0.316, 0.5809, 0.359, 0.5959]}, {"w": "one", "b": [0.3654, 0.5809, 0.3937, 0.5959]}, {"w": "of", "b": [0.4001, 0.5809, 0.4153, 0.5959]}, {"w": "the", "b": [0.4217, 0.5809, 0.4478, 0.5959]}, {"w": "parameter-initialization", "b": [0.4542, 0.5809, 0.6479, 0.5959]}, {"w": "strategies", "b": [0.6542, 0.5809, 0.7319, 0.5959]}, {"w": "discussed", "b": [0.7383, 0.5809, 0.814, 0.5959]}, {"w": "above.", "b": [0.8204, 0.5809, 0.8727, 0.5959]}, {"w": "The", "b": [0.1306, 0.5989, 0.1623, 0.6138]}, {"w": "backpropagation", "b": [0.1684, 0.5992, 0.3213, 0.6141]}, {"w": "algorithm", "b": [0.3275, 0.5989, 0.4053, 0.6138]}, {"w": "computes", "b": [0.4114, 0.5989, 0.4873, 0.6138]}, {"w": "the", "b": [0.4934, 0.5989, 0.519, 0.6138]}, {"w": "partial", "b": [0.5252, 0.5989, 0.5784, 0.6138]}, {"w": "derivatives", "b": [0.5846, 0.5989, 0.6702, 0.6138]}, {"w": "of", "b": [0.6764, 0.5989, 0.6912, 0.6138]}, {"w": "each", "b": [0.6974, 0.5989, 0.7327, 0.6138]}, {"w": "parameter", "b": [0.7388, 0.5989, 0.8208, 0.6138]}, {"w": "using", "b": [0.8269, 0.5989, 0.869, 0.6138]}, {"w": "the", "b": [0.1312, 0.6168, 0.1564, 0.6318]}, {"w": "chain", "b": [0.1624, 0.6168, 0.2041, 0.6318]}, {"w": "rule", "b": [0.2101, 0.6168, 0.2403, 0.6318]}, {"w": "for", "b": [0.2463, 0.6168, 0.268, 0.6318]}, {"w": "derivatives", "b": [0.274, 0.6168, 0.358, 0.6318]}, {"w": "of", "b": [0.3641, 0.6168, 0.3786, 0.6318]}, {"w": "complex", "b": [0.3846, 0.6168, 0.4494, 0.6318]}, {"w": "functions.1", "b": [0.4555, 0.6152, 0.5396, 0.6318]}, {"w": "At", "b": [0.5487, 0.6168, 0.5687, 0.6318]}, {"w": "each", "b": [0.5747, 0.6168, 0.6094, 0.6318]}, {"w": "epoch,", "b": [0.6154, 0.6168, 0.6662, 0.6318]}, {"w": "gradient", "b": [0.6722, 0.6168, 0.7371, 0.6318]}, {"w": "descent", "b": [0.7431, 0.6168, 0.801, 0.6318]}, {"w": "updates", "b": [0.807, 0.6168, 0.869, 0.6318]}, {"w": "all", "b": [0.1312, 0.6348, 0.151, 0.6497]}, {"w": "parameters", "b": [0.1571, 0.6348, 0.2478, 0.6497]}, {"w": "using", "b": [0.254, 0.6348, 0.2967, 0.6497]}, {"w": "partial", "b": [0.3028, 0.6348, 0.357, 0.6497]}, {"w": "derivatives.", "b": [0.3631, 0.6348, 0.4553, 0.6497]}, {"w": "The", "b": [0.4635, 0.6348, 0.4957, 0.6497]}, {"w": "learning", "b": [0.5017, 0.6351, 0.5765, 0.65]}, {"w": "rate", "b": [0.5836, 0.6351, 0.6206, 0.65]}, {"w": "controls", "b": [0.6267, 0.6348, 0.6908, 0.6497]}, {"w": "the", "b": [0.697, 0.6348, 0.723, 0.6497]}, {"w": "significance", "b": [0.7291, 0.6348, 0.8218, 0.6497]}, {"w": "of", "b": [0.8279, 0.6348, 0.843, 0.6497]}, {"w": "an", "b": [0.8492, 0.6348, 0.8689, 0.6497]}, {"w": "update.", "b": [0.1312, 0.6527, 0.1918, 0.6677]}, {"w": "The", "b": [0.2001, 0.6527, 0.2316, 0.6677]}, {"w": "process", "b": [0.2378, 0.6527, 0.2956, 0.6677]}, {"w": "continues", "b": [0.3018, 0.6527, 0.3762, 0.6677]}, {"w": "until", "b": [0.3824, 0.6527, 0.4195, 0.6677]}, {"w": "convergence,", "b": [0.4256, 0.6527, 0.5423, 0.668]}, {"w": "the", "b": [0.5484, 0.6527, 0.5739, 0.6677]}, {"w": "state", "b": [0.5801, 0.6527, 0.6189, 0.6677]}, {"w": "when", "b": [0.625, 0.6527, 0.6668, 0.6677]}, {"w": "the", "b": [0.673, 0.6527, 0.6984, 0.6677]}, {"w": "values", "b": [0.7046, 0.6527, 0.753, 0.6677]}, {"w": "of", "b": [0.7592, 0.6527, 0.774, 0.6677]}, {"w": "parameters", "b": [0.7801, 0.6527, 0.8689, 0.6677]}, {"w": "don’t", "b": [0.1312, 0.6707, 0.1733, 0.6856]}, {"w": "change", "b": [0.1794, 0.6707, 0.2343, 0.6856]}, {"w": "much", "b": [0.2405, 0.6707, 0.2835, 0.6856]}, {"w": "after", "b": [0.2897, 0.6707, 0.3271, 0.6856]}, {"w": "each", "b": [0.3333, 0.6707, 0.3687, 0.6856]}, {"w": "epoch.", "b": [0.3748, 0.6707, 0.4266, 0.6856]}, {"w": "Then", "b": [0.4348, 0.6707, 0.4769, 0.6856]}, {"w": "the", "b": [0.483, 0.6707, 0.5087, 0.6856]}, {"w": "algorithm", "b": [0.5148, 0.6707, 0.5928, 0.6856]}, {"w": "stops.", "b": [0.5989, 0.6707, 0.6453, 0.6856]}]}, {"id": "b_4", "type": "paragraph", "text": "Gradient descent is sensitive to the choice of the learning rate α. Picking the right learning rate for your problem is not easy. If you select a value that is too high, you might not reach convergence at all. On the other hand, too small values of α can slow down the learning to the point of no observable progress. In Figure 2, you can see an illustration of gradient descent for one parameter of a neural network and three values of the learning rate. The value of the parameter at each iteration is shown as a blue circle. The number inside the", "words": [{"w": "Gradient", "b": [0.1312, 0.6976, 0.2026, 0.7125]}, {"w": "descent", "b": [0.2088, 0.6976, 0.2678, 0.7125]}, {"w": "is", "b": [0.274, 0.6976, 0.2864, 0.7125]}, {"w": "sensitive", "b": [0.2925, 0.6976, 0.3604, 0.7125]}, {"w": "to", "b": [0.3665, 0.6976, 0.3829, 0.7125]}, {"w": "the", "b": [0.389, 0.6976, 0.4147, 0.7125]}, {"w": "choice", "b": [0.4208, 0.6976, 0.4695, 0.7125]}, {"w": "of", "b": [0.4756, 0.6976, 0.4905, 0.7125]}, {"w": "the", "b": [0.4967, 0.6976, 0.5223, 0.7125]}, {"w": "learning", "b": [0.5284, 0.6976, 0.593, 0.7125]}, {"w": "rate", "b": [0.5992, 0.6976, 0.631, 0.7125]}, {"w": "α.", "b": [0.6368, 0.6976, 0.6538, 0.7128]}, {"w": "Picking", "b": [0.6621, 0.6976, 0.7217, 0.7125]}, {"w": "the", "b": [0.7279, 0.6976, 0.7535, 0.7125]}, {"w": "right", "b": [0.7597, 0.6976, 0.7981, 0.7125]}, {"w": "learning", "b": [0.8043, 0.6976, 0.8689, 0.7125]}, {"w": "rate", "b": [0.1312, 0.7155, 0.1627, 0.7305]}, {"w": "for", "b": [0.1689, 0.7155, 0.1907, 0.7305]}, {"w": "your", "b": [0.1969, 0.7155, 0.2324, 0.7305]}, {"w": "problem", "b": [0.2386, 0.7155, 0.3036, 0.7305]}, {"w": "is", "b": [0.3097, 0.7155, 0.322, 0.7305]}, {"w": "not", "b": [0.3281, 0.7155, 0.3545, 0.7305]}, {"w": "easy.", "b": [0.3607, 0.7155, 0.3983, 0.7305]}, {"w": "If", "b": [0.4065, 0.7155, 0.4187, 0.7305]}, {"w": "you", "b": [0.4248, 0.7155, 0.4532, 0.7305]}, {"w": "select", "b": [0.4594, 0.7155, 0.5031, 0.7305]}, {"w": "a", "b": [0.5093, 0.7155, 0.5184, 0.7305]}, {"w": "value", "b": [0.5246, 0.7155, 0.5656, 0.7305]}, {"w": "that", "b": [0.5718, 0.7155, 0.6053, 0.7305]}, {"w": "is", "b": [0.6114, 0.7155, 0.6237, 0.7305]}, {"w": "too", "b": [0.6299, 0.7155, 0.6557, 0.7305]}, {"w": "high,", "b": [0.6619, 0.7155, 0.7014, 0.7305]}, {"w": "you", "b": [0.7076, 0.7155, 0.736, 0.7305]}, {"w": "might", "b": [0.7421, 0.7155, 0.7882, 0.7305]}, {"w": "not", "b": [0.7944, 0.7155, 0.8208, 0.7305]}, {"w": "reach", "b": [0.8269, 0.7155, 0.8691, 0.7305]}, {"w": "convergence", "b": [0.1312, 0.7335, 0.2291, 0.7484]}, {"w": "at", "b": [0.2359, 0.7335, 0.2527, 0.7484]}, {"w": "all.", "b": [0.2595, 0.7335, 0.2846, 0.7484]}, {"w": "On", "b": [0.2948, 0.7335, 0.3199, 0.7484]}, {"w": "the", "b": [0.3267, 0.7335, 0.3528, 0.7484]}, {"w": "other", "b": [0.3596, 0.7335, 0.4026, 0.7484]}, {"w": "hand,", "b": [0.4094, 0.7335, 0.4554, 0.7484]}, {"w": "too", "b": [0.4624, 0.7335, 0.489, 0.7484]}, {"w": "small", "b": [0.4959, 0.7335, 0.5388, 0.7484]}, {"w": "values", "b": [0.5456, 0.7335, 0.5955, 0.7484]}, {"w": "of", "b": [0.6023, 0.7335, 0.6174, 0.7484]}, {"w": "α", "b": [0.624, 0.7338, 0.6358, 0.7487]}, {"w": "can", "b": [0.6427, 0.7335, 0.671, 0.7484]}, {"w": "slow", "b": [0.6778, 0.7335, 0.7129, 0.7484]}, {"w": "down", "b": [0.7197, 0.7335, 0.7631, 0.7484]}, {"w": "the", "b": [0.7699, 0.7335, 0.7961, 0.7484]}, {"w": "learning", "b": [0.8029, 0.7335, 0.8689, 0.7484]}, {"w": "to", "b": [0.1312, 0.7514, 0.148, 0.7664]}, {"w": "the", "b": [0.1541, 0.7514, 0.1803, 0.7664]}, {"w": "point", "b": [0.1864, 0.7514, 0.2293, 0.7664]}, {"w": "of", "b": [0.2354, 0.7514, 0.2506, 0.7664]}, {"w": "no", "b": [0.2567, 0.7514, 0.2766, 0.7664]}, {"w": "observable", "b": [0.2827, 0.7514, 0.3682, 0.7664]}, {"w": "progress.", "b": [0.3743, 0.7514, 0.4468, 0.7664]}, {"w": "In", "b": [0.455, 0.7514, 0.4722, 0.7664]}, {"w": "Figure", "b": [0.4784, 0.7514, 0.5315, 0.7664]}, {"w": "2,", "b": [0.5376, 0.7514, 0.5523, 0.7664]}, {"w": "you", "b": [0.5584, 0.7514, 0.5877, 0.7664]}, {"w": "can", "b": [0.5938, 0.7514, 0.6221, 0.7664]}, {"w": "see", "b": [0.6282, 0.7514, 0.6524, 0.7664]}, {"w": "an", "b": [0.6585, 0.7514, 0.6784, 0.7664]}, {"w": "illustration", "b": [0.6845, 0.7514, 0.7747, 0.7664]}, {"w": "of", "b": [0.7808, 0.7514, 0.796, 0.7664]}, {"w": "gradient", "b": [0.8021, 0.7514, 0.8696, 0.7664]}, {"w": "descent", "b": [0.1312, 0.7694, 0.1915, 0.7843]}, {"w": "for", "b": [0.1981, 0.7694, 0.2207, 0.7843]}, {"w": "one", "b": [0.2273, 0.7694, 0.2555, 0.7843]}, {"w": "parameter", "b": [0.2622, 0.7694, 0.3459, 0.7843]}, {"w": "of", "b": [0.3526, 0.7694, 0.3677, 0.7843]}, {"w": "a", "b": [0.3743, 0.7694, 0.3837, 0.7843]}, {"w": "neural", "b": [0.3904, 0.7694, 0.4417, 0.7843]}, {"w": "network", "b": [0.4483, 0.7694, 0.5137, 0.7843]}, {"w": "and", "b": [0.5204, 0.7694, 0.5507, 0.7843]}, {"w": "three", "b": [0.5573, 0.7694, 0.5992, 0.7843]}, {"w": "values", "b": [0.6058, 0.7694, 0.6556, 0.7843]}, {"w": "of", "b": [0.6623, 0.7694, 0.6774, 0.7843]}, {"w": "the", "b": [0.6841, 0.7694, 0.7102, 0.7843]}, {"w": "learning", "b": [0.7168, 0.7694, 0.7828, 0.7843]}, {"w": "rate.", "b": [0.7894, 0.7694, 0.8271, 0.7843]}, {"w": "The", "b": [0.8367, 0.7694, 0.8691, 0.7843]}, {"w": "value", "b": [0.1308, 0.7873, 0.1731, 0.8023]}, {"w": "of", "b": [0.1797, 0.7873, 0.1948, 0.8023]}, {"w": "the", "b": [0.2014, 0.7873, 0.2275, 0.8023]}, {"w": "parameter", "b": [0.2341, 0.7873, 0.3178, 0.8023]}, {"w": "at", "b": [0.3244, 0.7873, 0.3411, 0.8023]}, {"w": "each", "b": [0.3477, 0.7873, 0.3837, 0.8023]}, {"w": "iteration", "b": [0.3903, 0.7873, 0.4604, 0.8023]}, {"w": "is", "b": [0.467, 0.7873, 0.4796, 0.8023]}, {"w": "shown", "b": [0.4862, 0.7873, 0.537, 0.8023]}, {"w": "as", "b": [0.5435, 0.7873, 0.5604, 0.8023]}, {"w": "a", "b": [0.5669, 0.7873, 0.5763, 0.8023]}, {"w": "blue", "b": [0.5828, 0.7873, 0.6174, 0.8023]}, {"w": "circle.", "b": [0.6239, 0.7873, 0.6721, 0.8023]}, {"w": "The", "b": [0.6815, 0.7873, 0.7139, 0.8023]}, {"w": "number", "b": [0.7204, 0.7873, 0.7827, 0.8023]}, {"w": "inside", "b": [0.7893, 0.7873, 0.8364, 0.8023]}, {"w": "the", "b": [0.843, 0.7873, 0.8691, 0.8023]}]}, {"id": "b_5", "type": "paragraph", "text": "1The explanation of backpropagation is beyond the scope of this book. You should only know that every modern software library for training neural networks contains an implementation of this algorithm. The curious reader can find the explanation of backpropagation in the extended version of The Hundred-Page Machine Learning Book on its companion wiki.", "words": [{"w": "1The", "b": [0.1518, 0.8144, 0.1863, 0.8282]}, {"w": "explanation", "b": [0.1915, 0.8163, 0.2707, 0.8282]}, {"w": "of", "b": [0.2759, 0.8163, 0.2885, 0.8282]}, {"w": "backpropagation", "b": [0.2937, 0.8163, 0.4062, 0.8282]}, {"w": "is", "b": [0.4114, 0.8163, 0.4219, 0.8282]}, {"w": "beyond", "b": [0.4271, 0.8163, 0.476, 0.8282]}, {"w": "the", "b": [0.4813, 0.8163, 0.5029, 0.8282]}, {"w": "scope", "b": [0.5081, 0.8163, 0.545, 0.8282]}, {"w": "of", "b": [0.5502, 0.8163, 0.5628, 0.8282]}, {"w": "this", "b": [0.568, 0.8163, 0.5932, 0.8282]}, {"w": "book.", "b": [0.5984, 0.8163, 0.636, 0.8282]}, {"w": "You", "b": [0.643, 0.8163, 0.6698, 0.8282]}, {"w": "should", "b": [0.675, 0.8163, 0.7193, 0.8282]}, {"w": "only", "b": [0.7245, 0.8163, 0.7535, 0.8282]}, {"w": "know", "b": [0.7587, 0.8163, 0.7942, 0.8282]}, {"w": "that", "b": [0.7994, 0.8163, 0.828, 0.8282]}, {"w": "every", "b": [0.8332, 0.8163, 0.8691, 0.8282]}, {"w": "modern", "b": [0.1312, 0.8304, 0.1841, 0.8425]}, {"w": "software", "b": [0.19, 0.8304, 0.2474, 0.8425]}, {"w": "library", "b": [0.2533, 0.8304, 0.2999, 0.8425]}, {"w": "for", "b": [0.3058, 0.8304, 0.3249, 0.8425]}, {"w": "training", "b": [0.3308, 0.8304, 0.3859, 0.8425]}, {"w": "neural", "b": [0.3918, 0.8304, 0.4353, 0.8425]}, {"w": "networks", "b": [0.4412, 0.8304, 0.503, 0.8425]}, {"w": "contains", "b": [0.5089, 0.8304, 0.5663, 0.8425]}, {"w": "an", "b": [0.5722, 0.8304, 0.589, 0.8425]}, {"w": "implementation", "b": [0.5949, 0.8304, 0.7037, 0.8425]}, {"w": "of", "b": [0.7096, 0.8304, 0.7225, 0.8425]}, {"w": "this", "b": [0.7284, 0.8304, 0.7542, 0.8425]}, {"w": "algorithm.", "b": [0.7601, 0.8304, 0.8321, 0.8425]}, {"w": "The", "b": [0.841, 0.8304, 0.8685, 0.8425]}, {"w": "curious", "b": [0.1312, 0.8446, 0.1811, 0.8567]}, {"w": "reader", "b": [0.1864, 0.8446, 0.2299, 0.8567]}, {"w": "can", "b": [0.2352, 0.8446, 0.2592, 0.8567]}, {"w": "find", "b": [0.2645, 0.8446, 0.2911, 0.8567]}, {"w": "the", "b": [0.2964, 0.8446, 0.3186, 0.8567]}, {"w": "explanation", "b": [0.3239, 0.8446, 0.4052, 0.8567]}, {"w": "of", "b": [0.4105, 0.8446, 0.4234, 0.8567]}, {"w": "backpropagation", "b": [0.4287, 0.8446, 0.5442, 0.8567]}, {"w": "in", "b": [0.5495, 0.8446, 0.5628, 0.8567]}, {"w": "the", "b": [0.5681, 0.8446, 0.5903, 0.8567]}, {"w": "extended", "b": [0.5956, 0.8446, 0.6582, 0.8567]}, {"w": "version", "b": [0.6635, 0.8446, 0.7125, 0.8567]}, {"w": "of", "b": [0.7178, 0.8446, 0.7307, 0.8567]}, {"w": "The", "b": [0.736, 0.8446, 0.7635, 0.8567]}, {"w": "Hundred-Page", "b": [0.7688, 0.8446, 0.8685, 0.8567]}, {"w": "Machine", "b": [0.1312, 0.8589, 0.1887, 0.8709]}, {"w": "Learning", "b": [0.1939, 0.8589, 0.2543, 0.8709]}, {"w": "Book", "b": [0.2595, 0.8589, 0.295, 0.8709]}, {"w": "on", "b": [0.3002, 0.8589, 0.3167, 0.8709]}, {"w": "its", "b": [0.322, 0.8589, 0.3386, 0.8709]}, {"w": "companion", "b": [0.3438, 0.8589, 0.4178, 0.8709]}, {"w": "wiki.", "b": [0.4231, 0.8589, 0.4557, 0.8709]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "10", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 186, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "circle indicates the epoch. The red arrows indicate the direction of the gradient along the horizontal axis — the direction away from the minimum. The green arrows show the change in the value of the cost function after each epoch.", "words": [{"w": "circle", "b": [0.1312, 0.0881, 0.1742, 0.1031]}, {"w": "indicates", "b": [0.1804, 0.0881, 0.2527, 0.1031]}, {"w": "the", "b": [0.2589, 0.0881, 0.285, 0.1031]}, {"w": "epoch.", "b": [0.2912, 0.0881, 0.344, 0.1031]}, {"w": "The", "b": [0.3524, 0.0881, 0.3848, 0.1031]}, {"w": "red", "b": [0.391, 0.0881, 0.4172, 0.1031]}, {"w": "arrows", "b": [0.4234, 0.0881, 0.4775, 0.1031]}, {"w": "indicate", "b": [0.4836, 0.0881, 0.5485, 0.1031]}, {"w": "the", "b": [0.5547, 0.0881, 0.5809, 0.1031]}, {"w": "direction", "b": [0.587, 0.0881, 0.6593, 0.1031]}, {"w": "of", "b": [0.6655, 0.0881, 0.6807, 0.1031]}, {"w": "the", "b": [0.6868, 0.0881, 0.713, 0.1031]}, {"w": "gradient", "b": [0.7192, 0.0881, 0.7867, 0.1031]}, {"w": "along", "b": [0.7929, 0.0881, 0.8368, 0.1031]}, {"w": "the", "b": [0.843, 0.0881, 0.8692, 0.1031]}, {"w": "horizontal", "b": [0.1312, 0.106, 0.2106, 0.121]}, {"w": "axis", "b": [0.2167, 0.106, 0.2476, 0.121]}, {"w": "—", "b": [0.2538, 0.106, 0.272, 0.121]}, {"w": "the", "b": [0.2781, 0.106, 0.3034, 0.121]}, {"w": "direction", "b": [0.3096, 0.106, 0.3793, 0.121]}, {"w": "away", "b": [0.3855, 0.106, 0.4248, 0.121]}, {"w": "from", "b": [0.431, 0.106, 0.4679, 0.121]}, {"w": "the", "b": [0.4741, 0.106, 0.4993, 0.121]}, {"w": "minimum.", "b": [0.5055, 0.106, 0.5857, 0.121]}, {"w": "The", "b": [0.594, 0.106, 0.6253, 0.121]}, {"w": "green", "b": [0.6314, 0.106, 0.6739, 0.121]}, {"w": "arrows", "b": [0.6801, 0.106, 0.7323, 0.121]}, {"w": "show", "b": [0.7385, 0.106, 0.7774, 0.121]}, {"w": "the", "b": [0.7836, 0.106, 0.8089, 0.121]}, {"w": "change", "b": [0.815, 0.106, 0.869, 0.121]}, {"w": "in", "b": [0.1312, 0.124, 0.1466, 0.1389]}, {"w": "the", "b": [0.1528, 0.124, 0.1784, 0.1389]}, {"w": "value", "b": [0.1846, 0.124, 0.2261, 0.1389]}, {"w": "of", "b": [0.2322, 0.124, 0.2471, 0.1389]}, {"w": "the", "b": [0.2533, 0.124, 0.2789, 0.1389]}, {"w": "cost", "b": [0.2851, 0.124, 0.317, 0.1389]}, {"w": "function", "b": [0.3231, 0.124, 0.3893, 0.1389]}, {"w": "after", "b": [0.3954, 0.124, 0.4329, 0.1389]}, {"w": "each", "b": [0.439, 0.124, 0.4744, 0.1389]}, {"w": "epoch.", "b": [0.4806, 0.124, 0.5324, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "Therefore, at each epoch, gradient descent moves the parameter value towards the minimum. If the learning rate is too small, the movement towards the minimum will be very slow (Figure 2a). If the learning rate is too large, the value of the parameter will oscillate away", "words": [{"w": "Therefore,", "b": [0.1306, 0.1509, 0.2119, 0.1659]}, {"w": "at", "b": [0.2181, 0.1509, 0.2342, 0.1659]}, {"w": "each", "b": [0.2403, 0.1509, 0.2751, 0.1659]}, {"w": "epoch,", "b": [0.2813, 0.1509, 0.3322, 0.1659]}, {"w": "gradient", "b": [0.3384, 0.1509, 0.4035, 0.1659]}, {"w": "descent", "b": [0.4096, 0.1509, 0.4678, 0.1659]}, {"w": "moves", "b": [0.4739, 0.1509, 0.5219, 0.1659]}, {"w": "the", "b": [0.528, 0.1509, 0.5533, 0.1659]}, {"w": "parameter", "b": [0.5594, 0.1509, 0.6402, 0.1659]}, {"w": "value", "b": [0.6463, 0.1509, 0.6872, 0.1659]}, {"w": "towards", "b": [0.6933, 0.1509, 0.755, 0.1659]}, {"w": "the", "b": [0.7612, 0.1509, 0.7864, 0.1659]}, {"w": "minimum.", "b": [0.7925, 0.1509, 0.8727, 0.1659]}, {"w": "If", "b": [0.1312, 0.1689, 0.1438, 0.1838]}, {"w": "the", "b": [0.1516, 0.1689, 0.1777, 0.1838]}, {"w": "learning", "b": [0.1855, 0.1689, 0.2514, 0.1838]}, {"w": "rate", "b": [0.2592, 0.1689, 0.2917, 0.1838]}, {"w": "is", "b": [0.2995, 0.1689, 0.3121, 0.1838]}, {"w": "too", "b": [0.3199, 0.1689, 0.3466, 0.1838]}, {"w": "small,", "b": [0.3543, 0.1689, 0.4026, 0.1838]}, {"w": "the", "b": [0.4107, 0.1689, 0.4369, 0.1838]}, {"w": "movement", "b": [0.4447, 0.1689, 0.5284, 0.1838]}, {"w": "towards", "b": [0.5361, 0.1689, 0.6001, 0.1838]}, {"w": "the", "b": [0.6079, 0.1689, 0.634, 0.1838]}, {"w": "minimum", "b": [0.6418, 0.1689, 0.7197, 0.1838]}, {"w": "will", "b": [0.7275, 0.1689, 0.7568, 0.1838]}, {"w": "be", "b": [0.7645, 0.1689, 0.7839, 0.1838]}, {"w": "very", "b": [0.7916, 0.1689, 0.8268, 0.1838]}, {"w": "slow", "b": [0.8345, 0.1689, 0.8697, 0.1838]}, {"w": "(Figure", "b": [0.1291, 0.1868, 0.1893, 0.2018]}, {"w": "2a).", "b": [0.1954, 0.1868, 0.2267, 0.2018]}, {"w": "If", "b": [0.2349, 0.1868, 0.2474, 0.2018]}, {"w": "the", "b": [0.2535, 0.1868, 0.2796, 0.2018]}, {"w": "learning", "b": [0.2857, 0.1868, 0.3514, 0.2018]}, {"w": "rate", "b": [0.3575, 0.1868, 0.3899, 0.2018]}, {"w": "is", "b": [0.396, 0.1868, 0.4086, 0.2018]}, {"w": "too", "b": [0.4147, 0.1868, 0.4413, 0.2018]}, {"w": "large,", "b": [0.4474, 0.1868, 0.4923, 0.2018]}, {"w": "the", "b": [0.4984, 0.1868, 0.5245, 0.2018]}, {"w": "value", "b": [0.5306, 0.1868, 0.5728, 0.2018]}, {"w": "of", "b": [0.5789, 0.1868, 0.5941, 0.2018]}, {"w": "the", "b": [0.6002, 0.1868, 0.6262, 0.2018]}, {"w": "parameter", "b": [0.6324, 0.1868, 0.7158, 0.2018]}, {"w": "will", "b": [0.7219, 0.1868, 0.7511, 0.2018]}, {"w": "oscillate", "b": [0.7572, 0.1868, 0.823, 0.2018]}, {"w": "away", "b": [0.8291, 0.1868, 0.8698, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "from the minimum (Figure 2b).", "words": [{"w": "from", "b": [0.1312, 0.2048, 0.1687, 0.2197]}, {"w": "the", "b": [0.1748, 0.2048, 0.2005, 0.2197]}, {"w": "minimum", "b": [0.2067, 0.2048, 0.283, 0.2197]}, {"w": "(Figure", "b": [0.2892, 0.2048, 0.3484, 0.2197]}, {"w": "2b).", "b": [0.3546, 0.2048, 0.3864, 0.2197]}]}, {"id": "b_3", "type": "paragraph", "text": "Gradient descent is rather slow for large datasets because it uses the entire dataset to compute the gradient of each parameter at each epoch. Fortunately, several significant improvements to this algorithm have been proposed.", "words": [{"w": "Gradient", "b": [0.1312, 0.2317, 0.2012, 0.2466]}, {"w": "descent", "b": [0.2063, 0.2317, 0.2642, 0.2466]}, {"w": "is", "b": [0.2692, 0.2317, 0.2814, 0.2466]}, {"w": "rather", "b": [0.2864, 0.2317, 0.3347, 0.2466]}, {"w": "slow", "b": [0.3397, 0.2317, 0.3735, 0.2466]}, {"w": "for", "b": [0.3785, 0.2317, 0.4002, 0.2466]}, {"w": "large", "b": [0.4052, 0.2317, 0.4434, 0.2466]}, {"w": "datasets", "b": [0.4484, 0.2317, 0.513, 0.2466]}, {"w": "because", "b": [0.518, 0.2317, 0.5789, 0.2466]}, {"w": "it", "b": [0.5839, 0.2317, 0.596, 0.2466]}, {"w": "uses", "b": [0.601, 0.2317, 0.6334, 0.2466]}, {"w": "the", "b": [0.6384, 0.2317, 0.6635, 0.2466]}, {"w": "entire", "b": [0.6686, 0.2317, 0.7133, 0.2466]}, {"w": "dataset", "b": [0.7184, 0.2317, 0.7757, 0.2466]}, {"w": "to", "b": [0.7808, 0.2317, 0.7968, 0.2466]}, {"w": "compute", "b": [0.8018, 0.2317, 0.8692, 0.2466]}, {"w": "the", "b": [0.1312, 0.2496, 0.1567, 0.2646]}, {"w": "gradient", "b": [0.1628, 0.2496, 0.2285, 0.2646]}, {"w": "of", "b": [0.2346, 0.2496, 0.2494, 0.2646]}, {"w": "each", "b": [0.2555, 0.2496, 0.2906, 0.2646]}, {"w": "parameter", "b": [0.2968, 0.2496, 0.3783, 0.2646]}, {"w": "at", "b": [0.3844, 0.2496, 0.4007, 0.2646]}, {"w": "each", "b": [0.4068, 0.2496, 0.4419, 0.2646]}, {"w": "epoch.", "b": [0.4481, 0.2496, 0.4995, 0.2646]}, {"w": "Fortunately,", "b": [0.5077, 0.2496, 0.6046, 0.2646]}, {"w": "several", "b": [0.6108, 0.2496, 0.6648, 0.2646]}, {"w": "significant", "b": [0.671, 0.2496, 0.752, 0.2646]}, {"w": "improvements", "b": [0.7581, 0.2496, 0.8691, 0.2646]}, {"w": "to", "b": [0.1312, 0.2676, 0.1476, 0.2825]}, {"w": "this", "b": [0.1538, 0.2676, 0.1836, 0.2825]}, {"w": "algorithm", "b": [0.1898, 0.2676, 0.2677, 0.2825]}, {"w": "have", "b": [0.2739, 0.2676, 0.3103, 0.2825]}, {"w": "been", "b": [0.3164, 0.2676, 0.3539, 0.2825]}, {"w": "proposed.", "b": [0.36, 0.2676, 0.4376, 0.2825]}]}, {"id": "b_4", "type": "paragraph", "text": "Minibatch stochastic gradient descent (minibatch SGD) is a variant of the gradient descent algorithm. It approximates the gradient using small subsets of the training data called minibatches. This effectively speeds up the computation. The size of the minibatch is a hyperparameter, and you can tune it. Powers of two, between 32 and a few hundred, are recommended: 32, 64, 128, 256, and so on.", "words": [{"w": "Minibatch", "b": [0.1312, 0.2948, 0.226, 0.3097]}, {"w": "stochastic", "b": [0.2343, 0.2948, 0.325, 0.3097]}, {"w": "gradient", "b": [0.3333, 0.2948, 0.4099, 0.3097]}, {"w": "descent", "b": [0.4182, 0.2948, 0.4867, 0.3097]}, {"w": "(minibatch", "b": [0.4938, 0.2945, 0.5833, 0.3094]}, {"w": "SGD)", "b": [0.5905, 0.2945, 0.6374, 0.3094]}, {"w": "is", "b": [0.6447, 0.2945, 0.6574, 0.3094]}, {"w": "a", "b": [0.6646, 0.2945, 0.674, 0.3094]}, {"w": "variant", "b": [0.6812, 0.2945, 0.7388, 0.3094]}, {"w": "of", "b": [0.7461, 0.2945, 0.7612, 0.3094]}, {"w": "the", "b": [0.7685, 0.2945, 0.7947, 0.3094]}, {"w": "gradient", "b": [0.8019, 0.2945, 0.8694, 0.3094]}, {"w": "descent", "b": [0.1312, 0.3124, 0.1915, 0.3274]}, {"w": "algorithm.", "b": [0.1985, 0.3124, 0.2832, 0.3274]}, {"w": "It", "b": [0.2939, 0.3124, 0.308, 0.3274]}, {"w": "approximates", "b": [0.315, 0.3124, 0.425, 0.3274]}, {"w": "the", "b": [0.4319, 0.3124, 0.4581, 0.3274]}, {"w": "gradient", "b": [0.4651, 0.3124, 0.5326, 0.3274]}, {"w": "using", "b": [0.5396, 0.3124, 0.5826, 0.3274]}, {"w": "small", "b": [0.5895, 0.3124, 0.6325, 0.3274]}, {"w": "subsets", "b": [0.6395, 0.3124, 0.6984, 0.3274]}, {"w": "of", "b": [0.7054, 0.3124, 0.7205, 0.3274]}, {"w": "the", "b": [0.7275, 0.3124, 0.7537, 0.3274]}, {"w": "training", "b": [0.7606, 0.3124, 0.8255, 0.3274]}, {"w": "data", "b": [0.8325, 0.3124, 0.8691, 0.3274]}, {"w": "called", "b": [0.1312, 0.3304, 0.1771, 0.3453]}, {"w": "minibatches.", "b": [0.1832, 0.3304, 0.2986, 0.3456]}, {"w": "This", "b": [0.3068, 0.3304, 0.3425, 0.3453]}, {"w": "effectively", "b": [0.3487, 0.3304, 0.4281, 0.3453]}, {"w": "speeds", "b": [0.4342, 0.3304, 0.4859, 0.3453]}, {"w": "up", "b": [0.492, 0.3304, 0.5124, 0.3453]}, {"w": "the", "b": [0.5185, 0.3304, 0.544, 0.3453]}, {"w": "computation.", "b": [0.5501, 0.3304, 0.656, 0.3453]}, {"w": "The", "b": [0.6642, 0.3304, 0.6957, 0.3453]}, {"w": "size", "b": [0.7019, 0.3304, 0.7305, 0.3453]}, {"w": "of", "b": [0.7366, 0.3304, 0.7514, 0.3453]}, {"w": "the", "b": [0.7575, 0.3304, 0.783, 0.3453]}, {"w": "minibatch", "b": [0.7891, 0.3304, 0.8691, 0.3453]}, {"w": "is", "b": [0.1312, 0.3483, 0.1434, 0.3633]}, {"w": "a", "b": [0.1495, 0.3483, 0.1586, 0.3633]}, {"w": "hyperparameter,", "b": [0.1647, 0.3483, 0.295, 0.3633]}, {"w": "and", "b": [0.3011, 0.3483, 0.3302, 0.3633]}, {"w": "you", "b": [0.3364, 0.3483, 0.3645, 0.3633]}, {"w": "can", "b": [0.3706, 0.3483, 0.3977, 0.3633]}, {"w": "tune", "b": [0.4038, 0.3483, 0.439, 0.3633]}, {"w": "it.", "b": [0.4451, 0.3483, 0.4622, 0.3633]}, {"w": "Powers", "b": [0.4704, 0.3483, 0.5256, 0.3633]}, {"w": "of", "b": [0.5317, 0.3483, 0.5462, 0.3633]}, {"w": "two,", "b": [0.5524, 0.3483, 0.5855, 0.3633]}, {"w": "between", "b": [0.5916, 0.3483, 0.6554, 0.3633]}, {"w": "32", "b": [0.6613, 0.3483, 0.6794, 0.3633]}, {"w": "and", "b": [0.6855, 0.3483, 0.7146, 0.3633]}, {"w": "a", "b": [0.7208, 0.3483, 0.7298, 0.3633]}, {"w": "few", "b": [0.7359, 0.3483, 0.7625, 0.3633]}, {"w": "hundred,", "b": [0.7687, 0.3483, 0.8386, 0.3633]}, {"w": "are", "b": [0.8447, 0.3483, 0.8689, 0.3633]}, {"w": "recommended:", "b": [0.1312, 0.3663, 0.2472, 0.3812]}, {"w": "32,", "b": [0.2553, 0.3663, 0.2789, 0.3812]}, {"w": "64,", "b": [0.285, 0.3663, 0.3086, 0.3812]}, {"w": "128,", "b": [0.3148, 0.3663, 0.3476, 0.3812]}, {"w": "256,", "b": [0.3537, 0.3663, 0.3865, 0.3812]}, {"w": "and", "b": [0.3926, 0.3663, 0.4224, 0.3812]}, {"w": "so", "b": [0.4285, 0.3663, 0.4451, 0.3812]}, {"w": "on.", "b": [0.4512, 0.3663, 0.4758, 0.3812]}]}, {"id": "b_5", "type": "paragraph", "text": "The problem of choosing a value for the learning rate α is still present in the “vanilla” minibatch SGD. Learning can still stagnate at later epochs. Instead of reaching a local minimum, the gradient descent might keep oscillating around it due to too large updates. There are many learning rate decay schedules that allow updating the learning rate, as the learning progresses, by reducing it later in the epoch count. The benefits of using a learning rate decay schedule include faster gradient descent convergence (faster learning) and higher model quality. Below, we consider several popular learning rate decay schedules.", "words": [{"w": "The", "b": [0.1306, 0.3932, 0.163, 0.4082]}, {"w": "problem", "b": [0.1712, 0.3932, 0.2381, 0.4082]}, {"w": "of", "b": [0.2463, 0.3932, 0.2615, 0.4082]}, {"w": "choosing", "b": [0.2696, 0.3932, 0.3398, 0.4082]}, {"w": "a", "b": [0.348, 0.3932, 0.3574, 0.4082]}, {"w": "value", "b": [0.3656, 0.3932, 0.4079, 0.4082]}, {"w": "for", "b": [0.4161, 0.3932, 0.4386, 0.4082]}, {"w": "the", "b": [0.4468, 0.3932, 0.4729, 0.4082]}, {"w": "learning", "b": [0.4811, 0.3932, 0.5471, 0.4082]}, {"w": "rate", "b": [0.5552, 0.3932, 0.5877, 0.4082]}, {"w": "α", "b": [0.5957, 0.3935, 0.6075, 0.4084]}, {"w": "is", "b": [0.6157, 0.3932, 0.6284, 0.4082]}, {"w": "still", "b": [0.6365, 0.3932, 0.667, 0.4082]}, {"w": "present", "b": [0.6751, 0.3932, 0.7344, 0.4082]}, {"w": "in", "b": [0.7426, 0.3932, 0.7583, 0.4082]}, {"w": "the", "b": [0.7664, 0.3932, 0.7926, 0.4082]}, {"w": "“vanilla”", "b": [0.8007, 0.3932, 0.8724, 0.4082]}, {"w": "minibatch", "b": [0.1312, 0.4111, 0.2134, 0.4261]}, {"w": "SGD.", "b": [0.221, 0.4111, 0.2658, 0.4261]}, {"w": "Learning", "b": [0.2735, 0.4111, 0.346, 0.4261]}, {"w": "can", "b": [0.3536, 0.4111, 0.3818, 0.4261]}, {"w": "still", "b": [0.3895, 0.4111, 0.4199, 0.4261]}, {"w": "stagnate", "b": [0.4276, 0.4111, 0.4967, 0.4261]}, {"w": "at", "b": [0.5043, 0.4111, 0.5211, 0.4261]}, {"w": "later", "b": [0.5287, 0.4111, 0.5664, 0.4261]}, {"w": "epochs.", "b": [0.574, 0.4111, 0.6343, 0.4261]}, {"w": "Instead", "b": [0.647, 0.4111, 0.7072, 0.4261]}, {"w": "of", "b": [0.7149, 0.4111, 0.73, 0.4261]}, {"w": "reaching", "b": [0.7377, 0.4111, 0.8062, 0.4261]}, {"w": "a", "b": [0.8139, 0.4111, 0.8233, 0.4261]}, {"w": "local", "b": [0.8309, 0.4111, 0.8691, 0.4261]}, {"w": "minimum,", "b": [0.1312, 0.4291, 0.2144, 0.444]}, {"w": "the", "b": [0.221, 0.4291, 0.2472, 0.444]}, {"w": "gradient", "b": [0.2537, 0.4291, 0.3212, 0.444]}, {"w": "descent", "b": [0.3278, 0.4291, 0.388, 0.444]}, {"w": "might", "b": [0.3946, 0.4291, 0.4422, 0.444]}, {"w": "keep", "b": [0.4487, 0.4291, 0.4854, 0.444]}, {"w": "oscillating", "b": [0.4919, 0.4291, 0.5746, 0.444]}, {"w": "around", "b": [0.5812, 0.4291, 0.6387, 0.444]}, {"w": "it", "b": [0.6453, 0.4291, 0.6578, 0.444]}, {"w": "due", "b": [0.6644, 0.4291, 0.6937, 0.444]}, {"w": "to", "b": [0.7002, 0.4291, 0.7169, 0.444]}, {"w": "too", "b": [0.7235, 0.4291, 0.7501, 0.444]}, {"w": "large", "b": [0.7567, 0.4291, 0.7965, 0.444]}, {"w": "updates.", "b": [0.803, 0.4291, 0.8727, 0.444]}, {"w": "There", "b": [0.1306, 0.447, 0.1776, 0.462]}, {"w": "are", "b": [0.1837, 0.447, 0.2083, 0.462]}, {"w": "many", "b": [0.2145, 0.447, 0.2584, 0.462]}, {"w": "learning", "b": [0.2646, 0.4473, 0.3394, 0.4623]}, {"w": "rate", "b": [0.3464, 0.4473, 0.3834, 0.4623]}, {"w": "decay", "b": [0.3905, 0.4473, 0.4424, 0.4623]}, {"w": "schedules", "b": [0.4494, 0.4473, 0.5357, 0.4623]}, {"w": "that", "b": [0.5418, 0.447, 0.5755, 0.462]}, {"w": "allow", "b": [0.5817, 0.447, 0.623, 0.462]}, {"w": "updating", "b": [0.6291, 0.447, 0.7011, 0.462]}, {"w": "the", "b": [0.7073, 0.447, 0.7328, 0.462]}, {"w": "learning", "b": [0.7389, 0.447, 0.8034, 0.462]}, {"w": "rate,", "b": [0.8095, 0.447, 0.8463, 0.462]}, {"w": "as", "b": [0.8525, 0.447, 0.8689, 0.462]}, {"w": "the", "b": [0.1312, 0.465, 0.1574, 0.4799]}, {"w": "learning", "b": [0.1647, 0.465, 0.2306, 0.4799]}, {"w": "progresses,", "b": [0.2379, 0.465, 0.3262, 0.4799]}, {"w": "by", "b": [0.3338, 0.465, 0.3536, 0.4799]}, {"w": "reducing", "b": [0.3609, 0.465, 0.431, 0.4799]}, {"w": "it", "b": [0.4383, 0.465, 0.4509, 0.4799]}, {"w": "later", "b": [0.4581, 0.465, 0.4959, 0.4799]}, {"w": "in", "b": [0.5031, 0.465, 0.5188, 0.4799]}, {"w": "the", "b": [0.5261, 0.465, 0.5523, 0.4799]}, {"w": "epoch", "b": [0.5595, 0.465, 0.6071, 0.4799]}, {"w": "count.", "b": [0.6144, 0.465, 0.6651, 0.4799]}, {"w": "The", "b": [0.6767, 0.465, 0.7091, 0.4799]}, {"w": "benefits", "b": [0.7164, 0.465, 0.7798, 0.4799]}, {"w": "of", "b": [0.7871, 0.465, 0.8022, 0.4799]}, {"w": "using", "b": [0.8095, 0.465, 0.8525, 0.4799]}, {"w": "a", "b": [0.8598, 0.465, 0.8692, 0.4799]}, {"w": "learning", "b": [0.1312, 0.4829, 0.1946, 0.4979]}, {"w": "rate", "b": [0.2006, 0.4829, 0.2318, 0.4979]}, {"w": "decay", "b": [0.2378, 0.4829, 0.282, 0.4979]}, {"w": "schedule", "b": [0.288, 0.4829, 0.3539, 0.4979]}, {"w": "include", "b": [0.3599, 0.4829, 0.4162, 0.4979]}, {"w": "faster", "b": [0.4222, 0.4829, 0.4661, 0.4979]}, {"w": "gradient", "b": [0.4721, 0.4829, 0.5369, 0.4979]}, {"w": "descent", "b": [0.5429, 0.4829, 0.6008, 0.4979]}, {"w": "convergence", "b": [0.6068, 0.4829, 0.7008, 0.4979]}, {"w": "(faster", "b": [0.7068, 0.4829, 0.7577, 0.4979]}, {"w": "learning)", "b": [0.7637, 0.4829, 0.8341, 0.4979]}, {"w": "and", "b": [0.8401, 0.4829, 0.8692, 0.4979]}, {"w": "higher", "b": [0.1312, 0.5009, 0.1815, 0.5158]}, {"w": "model", "b": [0.1877, 0.5009, 0.2364, 0.5158]}, {"w": "quality.", "b": [0.2425, 0.5009, 0.302, 0.5158]}, {"w": "Below,", "b": [0.3102, 0.5009, 0.3638, 0.5158]}, {"w": "we", "b": [0.3699, 0.5009, 0.3909, 0.5158]}, {"w": "consider", "b": [0.3971, 0.5009, 0.4629, 0.5158]}, {"w": "several", "b": [0.469, 0.5009, 0.5236, 0.5158]}, {"w": "popular", "b": [0.5297, 0.5009, 0.5918, 0.5158]}, {"w": "learning", "b": [0.598, 0.5009, 0.6626, 0.5158]}, {"w": "rate", "b": [0.6688, 0.5009, 0.7006, 0.5158]}, {"w": "decay", "b": [0.7068, 0.5009, 0.7519, 0.5158]}, {"w": "schedules.", "b": [0.758, 0.5009, 0.8377, 0.5158]}]}, {"id": "b_6", "type": "paragraph", "text": "6.1.5 Learning Rate Decay Schedules", "words": [{"w": "6.1.5", "b": [0.1312, 0.549, 0.1749, 0.564]}, {"w": "Learning", "b": [0.1961, 0.549, 0.2777, 0.564]}, {"w": "Rate", "b": [0.2848, 0.549, 0.329, 0.564]}, {"w": "Decay", "b": [0.3361, 0.549, 0.3924, 0.564]}, {"w": "Schedules", "b": [0.3995, 0.549, 0.4892, 0.564]}]}, {"id": "b_7", "type": "paragraph", "text": "Learning rate decay consists of gradually reducing the value of the learning rate α as the epochs progress. Consequently, the parameter updates become finer. There are several techniques, known as schedules, to control α.", "words": [{"w": "Learning", "b": [0.1312, 0.5853, 0.2037, 0.6003]}, {"w": "rate", "b": [0.2116, 0.5853, 0.244, 0.6003]}, {"w": "decay", "b": [0.2519, 0.5853, 0.2979, 0.6003]}, {"w": "consists", "b": [0.3058, 0.5853, 0.3689, 0.6003]}, {"w": "of", "b": [0.3768, 0.5853, 0.3919, 0.6003]}, {"w": "gradually", "b": [0.3998, 0.5853, 0.4767, 0.6003]}, {"w": "reducing", "b": [0.4845, 0.5853, 0.5547, 0.6003]}, {"w": "the", "b": [0.5625, 0.5853, 0.5887, 0.6003]}, {"w": "value", "b": [0.5966, 0.5853, 0.6389, 0.6003]}, {"w": "of", "b": [0.6468, 0.5853, 0.662, 0.6003]}, {"w": "the", "b": [0.6698, 0.5853, 0.696, 0.6003]}, {"w": "learning", "b": [0.7035, 0.5856, 0.7783, 0.6006]}, {"w": "rate", "b": [0.7874, 0.5856, 0.8244, 0.6006]}, {"w": "α", "b": [0.8322, 0.5856, 0.844, 0.6005]}, {"w": "as", "b": [0.8519, 0.5853, 0.8688, 0.6003]}, {"w": "the", "b": [0.1312, 0.6032, 0.1571, 0.6182]}, {"w": "epochs", "b": [0.1632, 0.6032, 0.2176, 0.6182]}, {"w": "progress.", "b": [0.2238, 0.6032, 0.2954, 0.6182]}, {"w": "Consequently,", "b": [0.3036, 0.6032, 0.4164, 0.6182]}, {"w": "the", "b": [0.4225, 0.6032, 0.4484, 0.6182]}, {"w": "parameter", "b": [0.4545, 0.6032, 0.5373, 0.6182]}, {"w": "updates", "b": [0.5435, 0.6032, 0.6071, 0.6182]}, {"w": "become", "b": [0.6133, 0.6032, 0.6737, 0.6182]}, {"w": "finer.", "b": [0.6799, 0.6032, 0.7213, 0.6182]}, {"w": "There", "b": [0.7295, 0.6032, 0.7771, 0.6182]}, {"w": "are", "b": [0.7832, 0.6032, 0.8081, 0.6182]}, {"w": "several", "b": [0.8142, 0.6032, 0.8692, 0.6182]}, {"w": "techniques,", "b": [0.1312, 0.6212, 0.2206, 0.6362]}, {"w": "known", "b": [0.2267, 0.6212, 0.279, 0.6362]}, {"w": "as", "b": [0.2852, 0.6212, 0.3017, 0.6362]}, {"w": "schedules,", "b": [0.3078, 0.6212, 0.3875, 0.6362]}, {"w": "to", "b": [0.3937, 0.6212, 0.4101, 0.6362]}, {"w": "control", "b": [0.4162, 0.6212, 0.4722, 0.6362]}, {"w": "α.", "b": [0.4781, 0.6212, 0.4951, 0.6364]}]}, {"id": "b_8", "type": "paragraph", "text": "Time-based learning rate decay schedules alter the learning rate depending on the learning rate of the previous epoch. The mathematical formula for the learning rate update, according to a popular time-based learning rate decay schedule, is:", "words": [{"w": "Time-based", "b": [0.1312, 0.6484, 0.2383, 0.6634]}, {"w": "learning", "b": [0.2471, 0.6484, 0.3219, 0.6634]}, {"w": "rate", "b": [0.3306, 0.6484, 0.3676, 0.6634]}, {"w": "decay", "b": [0.3764, 0.6484, 0.4282, 0.6634]}, {"w": "schedules", "b": [0.437, 0.6484, 0.5233, 0.6634]}, {"w": "alter", "b": [0.5308, 0.6481, 0.5685, 0.6631]}, {"w": "the", "b": [0.5761, 0.6481, 0.6023, 0.6631]}, {"w": "learning", "b": [0.6099, 0.6481, 0.6758, 0.6631]}, {"w": "rate", "b": [0.6834, 0.6481, 0.7159, 0.6631]}, {"w": "depending", "b": [0.7235, 0.6481, 0.8077, 0.6631]}, {"w": "on", "b": [0.8153, 0.6481, 0.8352, 0.6631]}, {"w": "the", "b": [0.8428, 0.6481, 0.8689, 0.6631]}, {"w": "learning", "b": [0.1312, 0.6661, 0.1953, 0.681]}, {"w": "rate", "b": [0.2015, 0.6661, 0.233, 0.681]}, {"w": "of", "b": [0.2392, 0.6661, 0.2539, 0.681]}, {"w": "the", "b": [0.26, 0.6661, 0.2855, 0.681]}, {"w": "previous", "b": [0.2916, 0.6661, 0.3583, 0.681]}, {"w": "epoch.", "b": [0.3645, 0.6661, 0.4158, 0.681]}, {"w": "The", "b": [0.424, 0.6661, 0.4555, 0.681]}, {"w": "mathematical", "b": [0.4616, 0.6661, 0.5704, 0.681]}, {"w": "formula", "b": [0.5765, 0.6661, 0.6375, 0.681]}, {"w": "for", "b": [0.6437, 0.6661, 0.6656, 0.681]}, {"w": "the", "b": [0.6717, 0.6661, 0.6971, 0.681]}, {"w": "learning", "b": [0.7033, 0.6661, 0.7673, 0.681]}, {"w": "rate", "b": [0.7735, 0.6661, 0.805, 0.681]}, {"w": "update,", "b": [0.8112, 0.6661, 0.8717, 0.681]}, {"w": "according", "b": [0.1312, 0.684, 0.2082, 0.699]}, {"w": "to", "b": [0.2143, 0.684, 0.2307, 0.699]}, {"w": "a", "b": [0.2369, 0.684, 0.2461, 0.699]}, {"w": "popular", "b": [0.2523, 0.684, 0.3144, 0.699]}, {"w": "time-based", "b": [0.3205, 0.684, 0.4078, 0.699]}, {"w": "learning", "b": [0.4139, 0.684, 0.4786, 0.699]}, {"w": "rate", "b": [0.4847, 0.684, 0.5166, 0.699]}, {"w": "decay", "b": [0.5227, 0.684, 0.5679, 0.699]}, {"w": "schedule,", "b": [0.574, 0.684, 0.6464, 0.699]}, {"w": "is:", "b": [0.6526, 0.684, 0.6701, 0.699]}]}, {"id": "b_9", "type": "equation", "text": "αn ← αn−1 1 + d × n,", "words": [{"w": "αn", "b": [0.4325, 0.7292, 0.4534, 0.7454]}, {"w": "←", "b": [0.4594, 0.729, 0.4779, 0.7439]}, {"w": "αn−1", "b": [0.5023, 0.719, 0.5421, 0.7353]}, {"w": "1", "b": [0.4852, 0.7391, 0.4944, 0.7541]}, {"w": "+", "b": [0.4985, 0.7391, 0.5129, 0.7541]}, {"w": "d", "b": [0.517, 0.7394, 0.5266, 0.7544]}, {"w": "×", "b": [0.5307, 0.7392, 0.545, 0.7542]}, {"w": "n,", "b": [0.5491, 0.7292, 0.5676, 0.7544]}]}, {"id": "b_10", "type": "paragraph", "text": "where αn is the new value of the learning rate, αn−1 is the value of the learning at the previous epoch n −1, and d is the decay rate, a hyperparameter. For example, if the initial value of the learning rate α0 = 0.3, then the values of the learning rate at the first five epochs are shown in the table below:", "words": [{"w": "where", "b": [0.1306, 0.7701, 0.1787, 0.7851]}, {"w": "αn", "b": [0.1863, 0.7704, 0.2073, 0.7866]}, {"w": "is", "b": [0.2158, 0.7701, 0.2285, 0.7851]}, {"w": "the", "b": [0.2361, 0.7701, 0.2623, 0.7851]}, {"w": "new", "b": [0.2699, 0.7701, 0.3023, 0.7851]}, {"w": "value", "b": [0.31, 0.7701, 0.3524, 0.7851]}, {"w": "of", "b": [0.36, 0.7701, 0.3752, 0.7851]}, {"w": "the", "b": [0.3828, 0.7701, 0.409, 0.7851]}, {"w": "learning", "b": [0.4166, 0.7701, 0.4825, 0.7851]}, {"w": "rate,", "b": [0.4902, 0.7701, 0.5279, 0.7851]}, {"w": "αn−1", "b": [0.5357, 0.7704, 0.5755, 0.7866]}, {"w": "is", "b": [0.5841, 0.7701, 0.5968, 0.7851]}, {"w": "the", "b": [0.6044, 0.7701, 0.6306, 0.7851]}, {"w": "value", "b": [0.6382, 0.7701, 0.6806, 0.7851]}, {"w": "of", "b": [0.6882, 0.7701, 0.7034, 0.7851]}, {"w": "the", "b": [0.711, 0.7701, 0.7372, 0.7851]}, {"w": "learning", "b": [0.7448, 0.7701, 0.8107, 0.7851]}, {"w": "at", "b": [0.8184, 0.7701, 0.8351, 0.7851]}, {"w": "the", "b": [0.8428, 0.7701, 0.8689, 0.7851]}, {"w": "previous", "b": [0.1312, 0.7881, 0.1972, 0.803]}, {"w": "epoch", "b": [0.2031, 0.7881, 0.2489, 0.803]}, {"w": "n", "b": [0.2547, 0.7884, 0.2658, 0.8033]}, {"w": "−1,", "b": [0.2694, 0.7881, 0.3014, 0.8031]}, {"w": "and", "b": [0.3074, 0.7881, 0.3365, 0.803]}, {"w": "d", "b": [0.3424, 0.7884, 0.3521, 0.8033]}, {"w": "is", "b": [0.358, 0.7881, 0.3701, 0.803]}, {"w": "the", "b": [0.376, 0.7881, 0.4012, 0.803]}, {"w": "decay", "b": [0.407, 0.7884, 0.4589, 0.8033]}, {"w": "rate,", "b": [0.4657, 0.7881, 0.5078, 0.8033]}, {"w": "a", "b": [0.5137, 0.7881, 0.5228, 0.803]}, {"w": "hyperparameter.", "b": [0.5287, 0.7881, 0.659, 0.803]}, {"w": "For", "b": [0.6671, 0.7881, 0.6935, 0.803]}, {"w": "example,", "b": [0.6994, 0.7881, 0.7692, 0.803]}, {"w": "if", "b": [0.7752, 0.7881, 0.7857, 0.803]}, {"w": "the", "b": [0.7917, 0.7881, 0.8168, 0.803]}, {"w": "initial", "b": [0.8227, 0.7881, 0.8689, 0.803]}, {"w": "value", "b": [0.1308, 0.806, 0.1714, 0.821]}, {"w": "of", "b": [0.1771, 0.806, 0.1916, 0.821]}, {"w": "the", "b": [0.1973, 0.806, 0.2224, 0.821]}, {"w": "learning", "b": [0.228, 0.806, 0.2914, 0.821]}, {"w": "rate", "b": [0.297, 0.806, 0.3282, 0.821]}, {"w": "α0", "b": [0.3338, 0.8063, 0.3529, 0.8225]}, {"w": "=", "b": [0.359, 0.806, 0.373, 0.821]}, {"w": "0.3,", "b": [0.3782, 0.806, 0.4064, 0.8213]}, {"w": "then", "b": [0.4121, 0.806, 0.4473, 0.821]}, {"w": "the", "b": [0.453, 0.806, 0.4781, 0.821]}, {"w": "values", "b": [0.4837, 0.806, 0.5315, 0.821]}, {"w": "of", "b": [0.5372, 0.806, 0.5517, 0.821]}, {"w": "the", "b": [0.5574, 0.806, 0.5825, 0.821]}, {"w": "learning", "b": [0.5881, 0.806, 0.6515, 0.821]}, {"w": "rate", "b": [0.6571, 0.806, 0.6883, 0.821]}, {"w": "at", "b": [0.694, 0.806, 0.71, 0.821]}, {"w": "the", "b": [0.7157, 0.806, 0.7408, 0.821]}, {"w": "first", "b": [0.7464, 0.806, 0.7777, 0.821]}, {"w": "five", "b": [0.7834, 0.806, 0.8105, 0.821]}, {"w": "epochs", "b": [0.8161, 0.806, 0.869, 0.821]}, {"w": "are", "b": [0.1312, 0.824, 0.1559, 0.8389]}, {"w": "shown", "b": [0.162, 0.824, 0.2119, 0.8389]}, {"w": "in", "b": [0.218, 0.824, 0.2334, 0.8389]}, {"w": "the", "b": [0.2396, 0.824, 0.2652, 0.8389]}, {"w": "table", "b": [0.2714, 0.824, 0.3114, 0.8389]}, {"w": "below:", "b": [0.3175, 0.824, 0.3688, 0.8389]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "11", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 187, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "learning rate epoch", "words": [{"w": "learning", "b": [0.4143, 0.0911, 0.479, 0.106]}, {"w": "rate", "b": [0.4851, 0.0911, 0.517, 0.106]}, {"w": "epoch", "b": [0.5391, 0.0911, 0.5857, 0.106]}]}, {"id": "b_1", "type": "paragraph", "text": "0.15 1 0.10 2 0.08 3 0.06 4 0.05 5", "words": [{"w": "0.15", "b": [0.4143, 0.1165, 0.4471, 0.1318]}, {"w": "1", "b": [0.5391, 0.1165, 0.5483, 0.1315]}, {"w": "0.10", "b": [0.4143, 0.1351, 0.4471, 0.1503]}, {"w": "2", "b": [0.5391, 0.1351, 0.5483, 0.15]}, {"w": "0.08", "b": [0.4143, 0.1536, 0.4471, 0.1689]}, {"w": "3", "b": [0.5391, 0.1536, 0.5483, 0.1686]}, {"w": "0.06", "b": [0.4143, 0.1722, 0.4471, 0.1874]}, {"w": "4", "b": [0.5391, 0.1722, 0.5483, 0.1871]}, {"w": "0.05", "b": [0.4143, 0.1907, 0.4471, 0.206]}, {"w": "5", "b": [0.5391, 0.1907, 0.5483, 0.2057]}]}, {"id": "b_2", "type": "paragraph", "text": "Step-based learning rate decay schedules change the learning rate according to some pre-defined drop steps. The mathematical formula for the learning rate update, according to a popular step-based learning rate decay schedule, is:", "words": [{"w": "Step-based", "b": [0.1312, 0.245, 0.2318, 0.26]}, {"w": "learning", "b": [0.2389, 0.245, 0.3137, 0.26]}, {"w": "rate", "b": [0.3208, 0.245, 0.3578, 0.26]}, {"w": "decay", "b": [0.3649, 0.245, 0.4167, 0.26]}, {"w": "schedules", "b": [0.4238, 0.245, 0.5101, 0.26]}, {"w": "change", "b": [0.5162, 0.2447, 0.5721, 0.2597]}, {"w": "the", "b": [0.5782, 0.2447, 0.6043, 0.2597]}, {"w": "learning", "b": [0.6104, 0.2447, 0.6762, 0.2597]}, {"w": "rate", "b": [0.6824, 0.2447, 0.7147, 0.2597]}, {"w": "according", "b": [0.7209, 0.2447, 0.7992, 0.2597]}, {"w": "to", "b": [0.8053, 0.2447, 0.822, 0.2597]}, {"w": "some", "b": [0.8282, 0.2447, 0.8689, 0.2597]}, {"w": "pre-defined", "b": [0.1312, 0.2627, 0.219, 0.2776]}, {"w": "drop", "b": [0.2252, 0.2627, 0.2615, 0.2776]}, {"w": "steps.", "b": [0.2677, 0.2627, 0.3122, 0.2776]}, {"w": "The", "b": [0.3205, 0.2627, 0.3517, 0.2776]}, {"w": "mathematical", "b": [0.3579, 0.2627, 0.4657, 0.2776]}, {"w": "formula", "b": [0.4719, 0.2627, 0.5324, 0.2776]}, {"w": "for", "b": [0.5386, 0.2627, 0.5603, 0.2776]}, {"w": "the", "b": [0.5665, 0.2627, 0.5917, 0.2776]}, {"w": "learning", "b": [0.5978, 0.2627, 0.6614, 0.2776]}, {"w": "rate", "b": [0.6675, 0.2627, 0.6988, 0.2776]}, {"w": "update,", "b": [0.705, 0.2627, 0.765, 0.2776]}, {"w": "according", "b": [0.7712, 0.2627, 0.8468, 0.2776]}, {"w": "to", "b": [0.853, 0.2627, 0.8691, 0.2776]}, {"w": "a", "b": [0.1312, 0.2806, 0.1405, 0.2956]}, {"w": "popular", "b": [0.1466, 0.2806, 0.2087, 0.2956]}, {"w": "step-based", "b": [0.2148, 0.2806, 0.2992, 0.2956]}, {"w": "learning", "b": [0.3053, 0.2806, 0.37, 0.2956]}, {"w": "rate", "b": [0.3761, 0.2806, 0.408, 0.2956]}, {"w": "decay", "b": [0.4141, 0.2806, 0.4592, 0.2956]}, {"w": "schedule,", "b": [0.4654, 0.2806, 0.5378, 0.2956]}, {"w": "is:", "b": [0.544, 0.2806, 0.5615, 0.2956]}]}, {"id": "b_3", "type": "equation", "text": "αn ←α0dfloor( 1+n", "words": [{"w": "αn", "b": [0.4209, 0.3258, 0.4418, 0.342]}, {"w": "←α0dfloor(", "b": [0.4479, 0.3202, 0.5375, 0.342]}, {"w": "1+n", "b": [0.5398, 0.3204, 0.5636, 0.3279]}]}, {"id": "b_4", "type": "paragraph", "text": "r ),", "words": [{"w": "r", "b": [0.5484, 0.3288, 0.5546, 0.3362]}, {"w": "),", "b": [0.5659, 0.3202, 0.5791, 0.3407]}]}, {"id": "b_5", "type": "paragraph", "text": "where αn is the learning rate at epoch n, α0 is the initial value of the learning rate, d is the decay rate that reflects how much the learning rate should change at each drop step (0.5 corresponds to halving), and r is the so-called drop rate defining the length of drop steps (10 corresponds to a drop every 10 epochs). The floor operator in the above formula equals 0", "words": [{"w": "where", "b": [0.1306, 0.3614, 0.1775, 0.3764]}, {"w": "αn", "b": [0.1836, 0.3617, 0.2045, 0.3779]}, {"w": "is", "b": [0.2116, 0.3614, 0.2239, 0.3764]}, {"w": "the", "b": [0.23, 0.3614, 0.2555, 0.3764]}, {"w": "learning", "b": [0.2617, 0.3614, 0.3259, 0.3764]}, {"w": "rate", "b": [0.332, 0.3614, 0.3636, 0.3764]}, {"w": "at", "b": [0.3698, 0.3614, 0.3861, 0.3764]}, {"w": "epoch", "b": [0.3922, 0.3614, 0.4385, 0.3764]}, {"w": "n,", "b": [0.4446, 0.3614, 0.4607, 0.3766]}, {"w": "α0", "b": [0.4669, 0.3617, 0.486, 0.3779]}, {"w": "is", "b": [0.4931, 0.3614, 0.5054, 0.3764]}, {"w": "the", "b": [0.5116, 0.3614, 0.537, 0.3764]}, {"w": "initial", "b": [0.5432, 0.3614, 0.59, 0.3764]}, {"w": "value", "b": [0.5962, 0.3614, 0.6374, 0.3764]}, {"w": "of", "b": [0.6435, 0.3614, 0.6583, 0.3764]}, {"w": "the", "b": [0.6644, 0.3614, 0.6899, 0.3764]}, {"w": "learning", "b": [0.6961, 0.3614, 0.7603, 0.3764]}, {"w": "rate,", "b": [0.7664, 0.3614, 0.8031, 0.3764]}, {"w": "d", "b": [0.8091, 0.3617, 0.8187, 0.3766]}, {"w": "is", "b": [0.8249, 0.3614, 0.8372, 0.3764]}, {"w": "the", "b": [0.8433, 0.3614, 0.8688, 0.3764]}, {"w": "decay", "b": [0.1312, 0.3793, 0.1773, 0.3943]}, {"w": "rate", "b": [0.184, 0.3793, 0.2165, 0.3943]}, {"w": "that", "b": [0.2233, 0.3793, 0.2578, 0.3943]}, {"w": "reflects", "b": [0.2645, 0.3793, 0.3222, 0.3943]}, {"w": "how", "b": [0.329, 0.3793, 0.3619, 0.3943]}, {"w": "much", "b": [0.3687, 0.3793, 0.4126, 0.3943]}, {"w": "the", "b": [0.4194, 0.3793, 0.4455, 0.3943]}, {"w": "learning", "b": [0.4523, 0.3793, 0.5182, 0.3943]}, {"w": "rate", "b": [0.525, 0.3793, 0.5575, 0.3943]}, {"w": "should", "b": [0.5642, 0.3793, 0.6177, 0.3943]}, {"w": "change", "b": [0.6244, 0.3793, 0.6804, 0.3943]}, {"w": "at", "b": [0.6872, 0.3793, 0.7039, 0.3943]}, {"w": "each", "b": [0.7107, 0.3793, 0.7468, 0.3943]}, {"w": "drop", "b": [0.7535, 0.3793, 0.7912, 0.3943]}, {"w": "step", "b": [0.798, 0.3793, 0.8316, 0.3943]}, {"w": "(0.5", "b": [0.8383, 0.3793, 0.8692, 0.3946]}, {"w": "corresponds", "b": [0.1312, 0.3973, 0.2273, 0.4122]}, {"w": "to", "b": [0.2334, 0.3973, 0.25, 0.4122]}, {"w": "halving),", "b": [0.2561, 0.3973, 0.328, 0.4122]}, {"w": "and", "b": [0.3342, 0.3973, 0.3642, 0.4122]}, {"w": "r", "b": [0.3702, 0.3976, 0.3785, 0.4125]}, {"w": "is", "b": [0.3852, 0.3973, 0.3977, 0.4122]}, {"w": "the", "b": [0.4039, 0.3973, 0.4297, 0.4122]}, {"w": "so-called", "b": [0.4359, 0.3973, 0.5053, 0.4122]}, {"w": "drop", "b": [0.5114, 0.3976, 0.5543, 0.4126]}, {"w": "rate", "b": [0.5614, 0.3976, 0.5984, 0.4126]}, {"w": "defining", "b": [0.6046, 0.3973, 0.6687, 0.4122]}, {"w": "the", "b": [0.6749, 0.3973, 0.7007, 0.4122]}, {"w": "length", "b": [0.7069, 0.3973, 0.7576, 0.4122]}, {"w": "of", "b": [0.7637, 0.3973, 0.7787, 0.4122]}, {"w": "drop", "b": [0.7849, 0.3973, 0.8222, 0.4122]}, {"w": "steps", "b": [0.8284, 0.3973, 0.8689, 0.4122]}, {"w": "(10", "b": [0.1291, 0.4152, 0.1542, 0.4302]}, {"w": "corresponds", "b": [0.1602, 0.4152, 0.2535, 0.4302]}, {"w": "to", "b": [0.2594, 0.4152, 0.2755, 0.4302]}, {"w": "a", "b": [0.2815, 0.4152, 0.2905, 0.4302]}, {"w": "drop", "b": [0.2965, 0.4152, 0.3327, 0.4302]}, {"w": "every", "b": [0.3387, 0.4152, 0.3805, 0.4302]}, {"w": "10", "b": [0.3863, 0.4152, 0.4044, 0.4302]}, {"w": "epochs).", "b": [0.4104, 0.4152, 0.4753, 0.4302]}, {"w": "The", "b": [0.4834, 0.4152, 0.5146, 0.4302]}, {"w": "floor", "b": [0.5205, 0.4152, 0.557, 0.4302]}, {"w": "operator", "b": [0.5629, 0.4152, 0.6299, 0.4302]}, {"w": "in", "b": [0.6359, 0.4152, 0.6509, 0.4302]}, {"w": "the", "b": [0.6569, 0.4152, 0.682, 0.4302]}, {"w": "above", "b": [0.688, 0.4152, 0.7332, 0.4302]}, {"w": "formula", "b": [0.7392, 0.4152, 0.7995, 0.4302]}, {"w": "equals", "b": [0.8055, 0.4152, 0.8543, 0.4302]}, {"w": "0", "b": [0.8602, 0.4152, 0.8692, 0.4302]}]}, {"id": "b_6", "type": "paragraph", "text": "if the value of its argument is less than 1.", "words": [{"w": "if", "b": [0.1312, 0.4332, 0.142, 0.4481]}, {"w": "the", "b": [0.1482, 0.4332, 0.1738, 0.4481]}, {"w": "value", "b": [0.18, 0.4332, 0.2215, 0.4481]}, {"w": "of", "b": [0.2276, 0.4332, 0.2425, 0.4481]}, {"w": "its", "b": [0.2486, 0.4332, 0.2682, 0.4481]}, {"w": "argument", "b": [0.2744, 0.4332, 0.3508, 0.4481]}, {"w": "is", "b": [0.357, 0.4332, 0.3694, 0.4481]}, {"w": "less", "b": [0.3755, 0.4332, 0.4035, 0.4481]}, {"w": "than", "b": [0.4096, 0.4332, 0.4465, 0.4481]}, {"w": "1.", "b": [0.4525, 0.4332, 0.4669, 0.4481]}]}, {"id": "b_7", "type": "paragraph", "text": "Exponential learning rate decay schedules are similar to step-based. However, instead of drop steps, a decreasing exponential function is used. The mathematical formula for the learning rate update, according to a popular exponential learning rate decay schedule, is:", "words": [{"w": "Exponential", "b": [0.1312, 0.4604, 0.2424, 0.4754]}, {"w": "learning", "b": [0.2495, 0.4604, 0.3243, 0.4754]}, {"w": "rate", "b": [0.3313, 0.4604, 0.3683, 0.4754]}, {"w": "decay", "b": [0.3754, 0.4604, 0.4273, 0.4754]}, {"w": "schedules", "b": [0.4343, 0.4604, 0.5206, 0.4754]}, {"w": "are", "b": [0.5267, 0.4601, 0.5508, 0.4751]}, {"w": "similar", "b": [0.557, 0.4601, 0.6104, 0.4751]}, {"w": "to", "b": [0.6165, 0.4601, 0.6326, 0.4751]}, {"w": "step-based.", "b": [0.6387, 0.4601, 0.7264, 0.4751]}, {"w": "However,", "b": [0.7345, 0.4601, 0.8064, 0.4751]}, {"w": "instead", "b": [0.8125, 0.4601, 0.8689, 0.4751]}, {"w": "of", "b": [0.1312, 0.4781, 0.1462, 0.493]}, {"w": "drop", "b": [0.1523, 0.4781, 0.1895, 0.493]}, {"w": "steps,", "b": [0.1956, 0.4781, 0.2411, 0.493]}, {"w": "a", "b": [0.2473, 0.4781, 0.2566, 0.493]}, {"w": "decreasing", "b": [0.2627, 0.4781, 0.3463, 0.493]}, {"w": "exponential", "b": [0.3525, 0.4781, 0.4457, 0.493]}, {"w": "function", "b": [0.4519, 0.4781, 0.5183, 0.493]}, {"w": "is", "b": [0.5245, 0.4781, 0.5369, 0.493]}, {"w": "used.", "b": [0.5431, 0.4781, 0.5844, 0.493]}, {"w": "The", "b": [0.5926, 0.4781, 0.6245, 0.493]}, {"w": "mathematical", "b": [0.6307, 0.4781, 0.7409, 0.493]}, {"w": "formula", "b": [0.747, 0.4781, 0.8089, 0.493]}, {"w": "for", "b": [0.815, 0.4781, 0.8372, 0.493]}, {"w": "the", "b": [0.8434, 0.4781, 0.8691, 0.493]}, {"w": "learning", "b": [0.1312, 0.496, 0.1959, 0.511]}, {"w": "rate", "b": [0.202, 0.496, 0.2339, 0.511]}, {"w": "update,", "b": [0.24, 0.496, 0.3011, 0.511]}, {"w": "according", "b": [0.3072, 0.496, 0.3842, 0.511]}, {"w": "to", "b": [0.3903, 0.496, 0.4067, 0.511]}, {"w": "a", "b": [0.4129, 0.496, 0.4221, 0.511]}, {"w": "popular", "b": [0.4282, 0.496, 0.4903, 0.511]}, {"w": "exponential", "b": [0.4965, 0.496, 0.5893, 0.511]}, {"w": "learning", "b": [0.5955, 0.496, 0.6601, 0.511]}, {"w": "rate", "b": [0.6663, 0.496, 0.6981, 0.511]}, {"w": "decay", "b": [0.7042, 0.496, 0.7494, 0.511]}, {"w": "schedule,", "b": [0.7555, 0.496, 0.828, 0.511]}, {"w": "is:", "b": [0.8341, 0.496, 0.8517, 0.511]}]}, {"id": "b_8", "type": "paragraph", "text": "αn ←α0e−d×n", "words": [{"w": "αn", "b": [0.44, 0.5411, 0.4609, 0.5574]}, {"w": "←α0e−d×n", "b": [0.467, 0.5383, 0.5591, 0.5574]}]}, {"id": "b_9", "type": "paragraph", "text": "where d is the decay rate and e is Euler’s number.", "words": [{"w": "where", "b": [0.1306, 0.5768, 0.1778, 0.5917]}, {"w": "d", "b": [0.1839, 0.577, 0.1935, 0.592]}, {"w": "is", "b": [0.1997, 0.5768, 0.2121, 0.5917]}, {"w": "the", "b": [0.2182, 0.5768, 0.2439, 0.5917]}, {"w": "decay", "b": [0.25, 0.5768, 0.2952, 0.5917]}, {"w": "rate", "b": [0.3013, 0.5768, 0.3332, 0.5917]}, {"w": "and", "b": [0.3393, 0.5768, 0.369, 0.5917]}, {"w": "e", "b": [0.3751, 0.577, 0.3837, 0.592]}, {"w": "is", "b": [0.3898, 0.5768, 0.4023, 0.5917]}, {"w": "Euler’s", "b": [0.4084, 0.5771, 0.4728, 0.592]}, {"w": "number.", "b": [0.4798, 0.5768, 0.5558, 0.592]}]}, {"id": "b_10", "type": "paragraph", "text": "There are several popular upgrades to minibatch SGD, such as Momentum, Root Mean Squared Propagation (RMSProp), and Adam. These algorithms update the learning rate automatically based on the performance of the learning process. You don’t have to worry about choosing the initial learning rate value, the decay schedule and rate, or other related hyperparameters. These algorithms have demonstrated good performance in practice, and practitioners often use them instead of manually tuning the learning rate.", "words": [{"w": "There", "b": [0.1306, 0.6037, 0.1787, 0.6186]}, {"w": "are", "b": [0.185, 0.6037, 0.2101, 0.6186]}, {"w": "several", "b": [0.2163, 0.6037, 0.2719, 0.6186]}, {"w": "popular", "b": [0.2781, 0.6037, 0.3415, 0.6186]}, {"w": "upgrades", "b": [0.3477, 0.6037, 0.4211, 0.6186]}, {"w": "to", "b": [0.4273, 0.6037, 0.444, 0.6186]}, {"w": "minibatch", "b": [0.45, 0.604, 0.5423, 0.6189]}, {"w": "SGD,", "b": [0.5494, 0.6037, 0.5994, 0.6189]}, {"w": "such", "b": [0.6056, 0.6037, 0.6418, 0.6186]}, {"w": "as", "b": [0.648, 0.6037, 0.6649, 0.6186]}, {"w": "Momentum,", "b": [0.6711, 0.6037, 0.7704, 0.6186]}, {"w": "Root", "b": [0.7767, 0.6037, 0.8172, 0.6186]}, {"w": "Mean", "b": [0.8234, 0.6037, 0.8689, 0.6186]}, {"w": "Squared", "b": [0.1312, 0.6216, 0.1977, 0.6366]}, {"w": "Propagation", "b": [0.2042, 0.6216, 0.3049, 0.6366]}, {"w": "(RMSProp),", "b": [0.3114, 0.6216, 0.4129, 0.6366]}, {"w": "and", "b": [0.4195, 0.6216, 0.4498, 0.6366]}, {"w": "Adam.", "b": [0.4563, 0.6216, 0.5107, 0.6366]}, {"w": "These", "b": [0.5199, 0.6216, 0.5681, 0.6366]}, {"w": "algorithms", "b": [0.5746, 0.6216, 0.6615, 0.6366]}, {"w": "update", "b": [0.668, 0.6216, 0.725, 0.6366]}, {"w": "the", "b": [0.7315, 0.6216, 0.7577, 0.6366]}, {"w": "learning", "b": [0.7641, 0.6216, 0.8301, 0.6366]}, {"w": "rate", "b": [0.8366, 0.6216, 0.8691, 0.6366]}, {"w": "automatically", "b": [0.1312, 0.6396, 0.2437, 0.6545]}, {"w": "based", "b": [0.2499, 0.6396, 0.2961, 0.6545]}, {"w": "on", "b": [0.3024, 0.6396, 0.3222, 0.6545]}, {"w": "the", "b": [0.3285, 0.6396, 0.3547, 0.6545]}, {"w": "performance", "b": [0.361, 0.6396, 0.4625, 0.6545]}, {"w": "of", "b": [0.4688, 0.6396, 0.484, 0.6545]}, {"w": "the", "b": [0.4903, 0.6396, 0.5165, 0.6545]}, {"w": "learning", "b": [0.5227, 0.6396, 0.5887, 0.6545]}, {"w": "process.", "b": [0.595, 0.6396, 0.6596, 0.6545]}, {"w": "You", "b": [0.6682, 0.6396, 0.7007, 0.6545]}, {"w": "don’t", "b": [0.707, 0.6396, 0.7498, 0.6545]}, {"w": "have", "b": [0.7561, 0.6396, 0.7933, 0.6545]}, {"w": "to", "b": [0.7996, 0.6396, 0.8163, 0.6545]}, {"w": "worry", "b": [0.8226, 0.6396, 0.8698, 0.6545]}, {"w": "about", "b": [0.1312, 0.6575, 0.178, 0.6725]}, {"w": "choosing", "b": [0.1841, 0.6575, 0.2531, 0.6725]}, {"w": "the", "b": [0.2593, 0.6575, 0.285, 0.6725]}, {"w": "initial", "b": [0.2911, 0.6575, 0.3384, 0.6725]}, {"w": "learning", "b": [0.3446, 0.6575, 0.4094, 0.6725]}, {"w": "rate", "b": [0.4155, 0.6575, 0.4474, 0.6725]}, {"w": "value,", "b": [0.4536, 0.6575, 0.5004, 0.6725]}, {"w": "the", "b": [0.5065, 0.6575, 0.5322, 0.6725]}, {"w": "decay", "b": [0.5384, 0.6575, 0.5836, 0.6725]}, {"w": "schedule", "b": [0.5898, 0.6575, 0.6572, 0.6725]}, {"w": "and", "b": [0.6634, 0.6575, 0.6932, 0.6725]}, {"w": "rate,", "b": [0.6994, 0.6575, 0.7364, 0.6725]}, {"w": "or", "b": [0.7426, 0.6575, 0.7591, 0.6725]}, {"w": "other", "b": [0.7653, 0.6575, 0.8074, 0.6725]}, {"w": "related", "b": [0.8136, 0.6575, 0.8692, 0.6725]}, {"w": "hyperparameters.", "b": [0.1312, 0.6755, 0.2733, 0.6904]}, {"w": "These", "b": [0.2816, 0.6755, 0.3295, 0.6904]}, {"w": "algorithms", "b": [0.3356, 0.6755, 0.422, 0.6904]}, {"w": "have", "b": [0.4282, 0.6755, 0.4651, 0.6904]}, {"w": "demonstrated", "b": [0.4712, 0.6755, 0.5826, 0.6904]}, {"w": "good", "b": [0.5887, 0.6755, 0.6282, 0.6904]}, {"w": "performance", "b": [0.6343, 0.6755, 0.7352, 0.6904]}, {"w": "in", "b": [0.7414, 0.6755, 0.757, 0.6904]}, {"w": "practice,", "b": [0.7631, 0.6755, 0.8328, 0.6904]}, {"w": "and", "b": [0.839, 0.6755, 0.8691, 0.6904]}, {"w": "practitioners", "b": [0.1312, 0.6934, 0.233, 0.7084]}, {"w": "often", "b": [0.2391, 0.6934, 0.2796, 0.7084]}, {"w": "use", "b": [0.2858, 0.6934, 0.3115, 0.7084]}, {"w": "them", "b": [0.3177, 0.6934, 0.3587, 0.7084]}, {"w": "instead", "b": [0.3649, 0.6934, 0.4224, 0.7084]}, {"w": "of", "b": [0.4285, 0.6934, 0.4434, 0.7084]}, {"w": "manually", "b": [0.4496, 0.6934, 0.5234, 0.7084]}, {"w": "tuning", "b": [0.5295, 0.6934, 0.5818, 0.7084]}, {"w": "the", "b": [0.588, 0.6934, 0.6136, 0.7084]}, {"w": "learning", "b": [0.6198, 0.6934, 0.6844, 0.7084]}, {"w": "rate.", "b": [0.6906, 0.6934, 0.7276, 0.7084]}]}, {"id": "b_11", "type": "paragraph", "text": "Momentum helps accelerate minibatch SGD by orienting the gradient descent to the relevant direction, and reducing oscillations. Instead of using only the current gradient’s epoch to guide the search, Momentum accumulates the gradient of past epochs to determine the direction to go. Momentum removes the need to manually adjust the learning rate.", "words": [{"w": "Momentum", "b": [0.1312, 0.7206, 0.2383, 0.7356]}, {"w": "helps", "b": [0.2431, 0.7203, 0.2834, 0.7353]}, {"w": "accelerate", "b": [0.288, 0.7203, 0.3655, 0.7353]}, {"w": "minibatch", "b": [0.3702, 0.7203, 0.4491, 0.7353]}, {"w": "SGD", "b": [0.4537, 0.7203, 0.4918, 0.7353]}, {"w": "by", "b": [0.4965, 0.7203, 0.5156, 0.7353]}, {"w": "orienting", "b": [0.5202, 0.7203, 0.5901, 0.7353]}, {"w": "the", "b": [0.5948, 0.7203, 0.6199, 0.7353]}, {"w": "gradient", "b": [0.6246, 0.7203, 0.6895, 0.7353]}, {"w": "descent", "b": [0.6941, 0.7203, 0.752, 0.7353]}, {"w": "to", "b": [0.7567, 0.7203, 0.7728, 0.7353]}, {"w": "the", "b": [0.7775, 0.7203, 0.8026, 0.7353]}, {"w": "relevant", "b": [0.8073, 0.7203, 0.8696, 0.7353]}, {"w": "direction,", "b": [0.1312, 0.7383, 0.2087, 0.7532]}, {"w": "and", "b": [0.2153, 0.7383, 0.2457, 0.7532]}, {"w": "reducing", "b": [0.2522, 0.7383, 0.3223, 0.7532]}, {"w": "oscillations.", "b": [0.3289, 0.7383, 0.4243, 0.7532]}, {"w": "Instead", "b": [0.4336, 0.7383, 0.4939, 0.7532]}, {"w": "of", "b": [0.5004, 0.7383, 0.5155, 0.7532]}, {"w": "using", "b": [0.5221, 0.7383, 0.5651, 0.7532]}, {"w": "only", "b": [0.5716, 0.7383, 0.6066, 0.7532]}, {"w": "the", "b": [0.6132, 0.7383, 0.6393, 0.7532]}, {"w": "current", "b": [0.6459, 0.7383, 0.7051, 0.7532]}, {"w": "gradient’s", "b": [0.7116, 0.7383, 0.7918, 0.7532]}, {"w": "epoch", "b": [0.7983, 0.7383, 0.8459, 0.7532]}, {"w": "to", "b": [0.8524, 0.7383, 0.8692, 0.7532]}, {"w": "guide", "b": [0.1312, 0.7562, 0.1752, 0.7712]}, {"w": "the", "b": [0.183, 0.7562, 0.2092, 0.7712]}, {"w": "search,", "b": [0.217, 0.7562, 0.2731, 0.7712]}, {"w": "Momentum", "b": [0.2814, 0.7562, 0.3755, 0.7712]}, {"w": "accumulates", "b": [0.3834, 0.7562, 0.4834, 0.7712]}, {"w": "the", "b": [0.4912, 0.7562, 0.5174, 0.7712]}, {"w": "gradient", "b": [0.5252, 0.7562, 0.5928, 0.7712]}, {"w": "of", "b": [0.6006, 0.7562, 0.6157, 0.7712]}, {"w": "past", "b": [0.6236, 0.7562, 0.6582, 0.7712]}, {"w": "epochs", "b": [0.666, 0.7562, 0.7211, 0.7712]}, {"w": "to", "b": [0.7289, 0.7562, 0.7456, 0.7712]}, {"w": "determine", "b": [0.7535, 0.7562, 0.8351, 0.7712]}, {"w": "the", "b": [0.843, 0.7562, 0.8691, 0.7712]}, {"w": "direction", "b": [0.1312, 0.7742, 0.2021, 0.7891]}, {"w": "to", "b": [0.2082, 0.7742, 0.2246, 0.7891]}, {"w": "go.", "b": [0.2307, 0.7742, 0.2543, 0.7891]}, {"w": "Momentum", "b": [0.2625, 0.7742, 0.3548, 0.7891]}, {"w": "removes", "b": [0.3609, 0.7742, 0.4252, 0.7891]}, {"w": "the", "b": [0.4313, 0.7742, 0.457, 0.7891]}, {"w": "need", "b": [0.4631, 0.7742, 0.5001, 0.7891]}, {"w": "to", "b": [0.5062, 0.7742, 0.5226, 0.7891]}, {"w": "manually", "b": [0.5288, 0.7742, 0.6026, 0.7891]}, {"w": "adjust", "b": [0.6087, 0.7742, 0.6586, 0.7891]}, {"w": "the", "b": [0.6647, 0.7742, 0.6904, 0.7891]}, {"w": "learning", "b": [0.6965, 0.7742, 0.7612, 0.7891]}, {"w": "rate.", "b": [0.7673, 0.7742, 0.8043, 0.7891]}]}, {"id": "b_12", "type": "paragraph", "text": "More recent advancements in neural network cost function optimization algorithms include RMSProp and Adam, the latter being the most recent and versatile. It’s recommended to start training the model with Adam. Then, if the quality of the model doesn’t reach the acceptable level, try a different cost function optimization algorithm.", "words": [{"w": "More", "b": [0.1312, 0.8011, 0.1729, 0.8161]}, {"w": "recent", "b": [0.1791, 0.8011, 0.228, 0.8161]}, {"w": "advancements", "b": [0.2342, 0.8011, 0.3464, 0.8161]}, {"w": "in", "b": [0.3525, 0.8011, 0.368, 0.8161]}, {"w": "neural", "b": [0.3741, 0.8011, 0.4246, 0.8161]}, {"w": "network", "b": [0.4307, 0.8011, 0.4951, 0.8161]}, {"w": "cost", "b": [0.5012, 0.8011, 0.5332, 0.8161]}, {"w": "function", "b": [0.5394, 0.8011, 0.6057, 0.8161]}, {"w": "optimization", "b": [0.6119, 0.8011, 0.7137, 0.8161]}, {"w": "algorithms", "b": [0.7198, 0.8011, 0.8054, 0.8161]}, {"w": "include", "b": [0.8115, 0.8011, 0.8691, 0.8161]}, {"w": "RMSProp", "b": [0.1312, 0.8193, 0.2247, 0.8343]}, {"w": "and", "b": [0.231, 0.819, 0.2614, 0.834]}, {"w": "Adam,", "b": [0.2677, 0.819, 0.3283, 0.8343]}, {"w": "the", "b": [0.3346, 0.819, 0.3608, 0.834]}, {"w": "latter", "b": [0.3671, 0.819, 0.4122, 0.834]}, {"w": "being", "b": [0.4185, 0.819, 0.463, 0.834]}, {"w": "the", "b": [0.4693, 0.819, 0.4955, 0.834]}, {"w": "most", "b": [0.5018, 0.819, 0.5416, 0.834]}, {"w": "recent", "b": [0.548, 0.819, 0.5977, 0.834]}, {"w": "and", "b": [0.6041, 0.819, 0.6344, 0.834]}, {"w": "versatile.", "b": [0.6407, 0.819, 0.7141, 0.834]}, {"w": "It’s", "b": [0.7229, 0.819, 0.7497, 0.834]}, {"w": "recommended", "b": [0.756, 0.819, 0.8691, 0.834]}, {"w": "to", "b": [0.1312, 0.837, 0.1477, 0.8519]}, {"w": "start", "b": [0.1538, 0.837, 0.1919, 0.8519]}, {"w": "training", "b": [0.1981, 0.837, 0.2618, 0.8519]}, {"w": "the", "b": [0.2679, 0.837, 0.2936, 0.8519]}, {"w": "model", "b": [0.2998, 0.837, 0.3485, 0.8519]}, {"w": "with", "b": [0.3547, 0.837, 0.3906, 0.8519]}, {"w": "Adam.", "b": [0.3967, 0.837, 0.4501, 0.8519]}, {"w": "Then,", "b": [0.4583, 0.837, 0.5055, 0.8519]}, {"w": "if", "b": [0.5117, 0.837, 0.5225, 0.8519]}, {"w": "the", "b": [0.5286, 0.837, 0.5543, 0.8519]}, {"w": "quality", "b": [0.5605, 0.837, 0.6164, 0.8519]}, {"w": "of", "b": [0.6225, 0.837, 0.6374, 0.8519]}, {"w": "the", "b": [0.6436, 0.837, 0.6693, 0.8519]}, {"w": "model", "b": [0.6754, 0.837, 0.7242, 0.8519]}, {"w": "doesn’t", "b": [0.7303, 0.837, 0.7884, 0.8519]}, {"w": "reach", "b": [0.7946, 0.837, 0.8373, 0.8519]}, {"w": "the", "b": [0.8434, 0.837, 0.8691, 0.8519]}, {"w": "acceptable", "b": [0.1312, 0.8549, 0.2153, 0.8699]}, {"w": "level,", "b": [0.2215, 0.8549, 0.2625, 0.8699]}, {"w": "try", "b": [0.2687, 0.8549, 0.2928, 0.8699]}, {"w": "a", "b": [0.299, 0.8549, 0.3082, 0.8699]}, {"w": "different", "b": [0.3143, 0.8549, 0.3811, 0.8699]}, {"w": "cost", "b": [0.3872, 0.8549, 0.4191, 0.8699]}, {"w": "function", "b": [0.4253, 0.8549, 0.4914, 0.8699]}, {"w": "optimization", "b": [0.4976, 0.8549, 0.5991, 0.8699]}, {"w": "algorithm.", "b": [0.6052, 0.8549, 0.6883, 0.8699]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "12", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 188, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "6.1.6 Regularization", "words": [{"w": "6.1.6", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Regularization", "b": [0.1961, 0.0884, 0.3313, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "In neural networks, besides L1 and L2 regularization, you can use neural network-specific regularizers: dropout, early stopping, and batch-normalization. The latter is technically not a regularization technique, but it often has a regularization effect on the model.", "words": [{"w": "In", "b": [0.1312, 0.1247, 0.1479, 0.1396]}, {"w": "neural", "b": [0.154, 0.1247, 0.2035, 0.1396]}, {"w": "networks,", "b": [0.2097, 0.1247, 0.2849, 0.1396]}, {"w": "besides", "b": [0.291, 0.1247, 0.3472, 0.1396]}, {"w": "L1", "b": [0.3533, 0.125, 0.3766, 0.1399]}, {"w": "and", "b": [0.3828, 0.1247, 0.412, 0.1396]}, {"w": "L2", "b": [0.4182, 0.125, 0.4416, 0.1399]}, {"w": "regularization,", "b": [0.4486, 0.1247, 0.5817, 0.1399]}, {"w": "you", "b": [0.5879, 0.1247, 0.6161, 0.1396]}, {"w": "can", "b": [0.6223, 0.1247, 0.6495, 0.1396]}, {"w": "use", "b": [0.6557, 0.1247, 0.681, 0.1396]}, {"w": "neural", "b": [0.6872, 0.1247, 0.7366, 0.1396]}, {"w": "network-specific", "b": [0.7428, 0.1247, 0.8689, 0.1396]}, {"w": "regularizers:", "b": [0.1312, 0.1426, 0.2282, 0.1576]}, {"w": "dropout,", "b": [0.2364, 0.1426, 0.3051, 0.1576]}, {"w": "early", "b": [0.3113, 0.1426, 0.3505, 0.1576]}, {"w": "stopping,", "b": [0.3567, 0.1426, 0.43, 0.1576]}, {"w": "and", "b": [0.4362, 0.1426, 0.4657, 0.1576]}, {"w": "batch-normalization.", "b": [0.4718, 0.1426, 0.6372, 0.1576]}, {"w": "The", "b": [0.6454, 0.1426, 0.677, 0.1576]}, {"w": "latter", "b": [0.6831, 0.1426, 0.7269, 0.1576]}, {"w": "is", "b": [0.7331, 0.1426, 0.7454, 0.1576]}, {"w": "technically", "b": [0.7515, 0.1426, 0.837, 0.1576]}, {"w": "not", "b": [0.8432, 0.1426, 0.8696, 0.1576]}, {"w": "a", "b": [0.1312, 0.1606, 0.1405, 0.1755]}, {"w": "regularization", "b": [0.1466, 0.1606, 0.2575, 0.1755]}, {"w": "technique,", "b": [0.2636, 0.1606, 0.3457, 0.1755]}, {"w": "but", "b": [0.3518, 0.1606, 0.3795, 0.1755]}, {"w": "it", "b": [0.3857, 0.1606, 0.398, 0.1755]}, {"w": "often", "b": [0.4041, 0.1606, 0.4446, 0.1755]}, {"w": "has", "b": [0.4508, 0.1606, 0.4775, 0.1755]}, {"w": "a", "b": [0.4837, 0.1606, 0.4929, 0.1755]}, {"w": "regularization", "b": [0.4991, 0.1606, 0.6099, 0.1755]}, {"w": "effect", "b": [0.6161, 0.1606, 0.6586, 0.1755]}, {"w": "on", "b": [0.6648, 0.1606, 0.6843, 0.1755]}, {"w": "the", "b": [0.6904, 0.1606, 0.7161, 0.1755]}, {"w": "model.", "b": [0.7222, 0.1606, 0.776, 0.1755]}]}, {"id": "b_2", "type": "paragraph", "text": "The concept of dropout is very simple. Each time you “run” a training example through the network, you temporarily exclude at random some units from the computation. The higher the percentage of units excluded, the stronger the regularization effect. Popular neural network libraries allow you to add a dropout layer between two successive layers, or you can specify the dropout hyperparameter for a layer. The dropout hyperparameter varies in the range [0, 1] and characterizes the fraction of units to randomly exclude from computation. The value of the hyperparameter has to be found experimentally. While simple, dropout’s flexibility and regularizing effect are phenomenal.", "words": [{"w": "The", "b": [0.1306, 0.1875, 0.163, 0.2024]}, {"w": "concept", "b": [0.1691, 0.1875, 0.2319, 0.2024]}, {"w": "of", "b": [0.238, 0.1875, 0.2532, 0.2024]}, {"w": "dropout", "b": [0.2607, 0.1878, 0.3349, 0.2028]}, {"w": "is", "b": [0.341, 0.1875, 0.3537, 0.2024]}, {"w": "very", "b": [0.3598, 0.1875, 0.3949, 0.2024]}, {"w": "simple.", "b": [0.401, 0.1875, 0.4587, 0.2024]}, {"w": "Each", "b": [0.4669, 0.1875, 0.5074, 0.2024]}, {"w": "time", "b": [0.5136, 0.1875, 0.5502, 0.2024]}, {"w": "you", "b": [0.5563, 0.1875, 0.5856, 0.2024]}, {"w": "“run”", "b": [0.5917, 0.1875, 0.6378, 0.2024]}, {"w": "a", "b": [0.6439, 0.1875, 0.6533, 0.2024]}, {"w": "training", "b": [0.6595, 0.1875, 0.7244, 0.2024]}, {"w": "example", "b": [0.7305, 0.1875, 0.798, 0.2024]}, {"w": "through", "b": [0.8041, 0.1875, 0.869, 0.2024]}, {"w": "the", "b": [0.1312, 0.2054, 0.1574, 0.2204]}, {"w": "network,", "b": [0.1643, 0.2054, 0.235, 0.2204]}, {"w": "you", "b": [0.2422, 0.2054, 0.2715, 0.2204]}, {"w": "temporarily", "b": [0.2784, 0.2054, 0.3747, 0.2204]}, {"w": "exclude", "b": [0.3817, 0.2054, 0.4429, 0.2204]}, {"w": "at", "b": [0.4498, 0.2054, 0.4666, 0.2204]}, {"w": "random", "b": [0.4735, 0.2054, 0.5363, 0.2204]}, {"w": "some", "b": [0.5433, 0.2054, 0.5842, 0.2204]}, {"w": "units", "b": [0.5911, 0.2054, 0.632, 0.2204]}, {"w": "from", "b": [0.639, 0.2054, 0.6772, 0.2204]}, {"w": "the", "b": [0.6842, 0.2054, 0.7103, 0.2204]}, {"w": "computation.", "b": [0.7173, 0.2054, 0.826, 0.2204]}, {"w": "The", "b": [0.8366, 0.2054, 0.869, 0.2204]}, {"w": "higher", "b": [0.1312, 0.2234, 0.1805, 0.2383]}, {"w": "the", "b": [0.1861, 0.2234, 0.2113, 0.2383]}, {"w": "percentage", "b": [0.2169, 0.2234, 0.3014, 0.2383]}, {"w": "of", "b": [0.307, 0.2234, 0.3215, 0.2383]}, {"w": "units", "b": [0.3271, 0.2234, 0.3664, 0.2383]}, {"w": "excluded,", "b": [0.372, 0.2234, 0.4459, 0.2383]}, {"w": "the", "b": [0.4516, 0.2234, 0.4767, 0.2383]}, {"w": "stronger", "b": [0.4824, 0.2234, 0.5469, 0.2383]}, {"w": "the", "b": [0.5525, 0.2234, 0.5776, 0.2383]}, {"w": "regularization", "b": [0.5832, 0.2234, 0.6918, 0.2383]}, {"w": "effect.", "b": [0.6974, 0.2234, 0.7442, 0.2383]}, {"w": "Popular", "b": [0.7522, 0.2234, 0.8143, 0.2383]}, {"w": "neural", "b": [0.8199, 0.2234, 0.8692, 0.2383]}, {"w": "network", "b": [0.1312, 0.2413, 0.1945, 0.2563]}, {"w": "libraries", "b": [0.2007, 0.2413, 0.2647, 0.2563]}, {"w": "allow", "b": [0.2708, 0.2413, 0.3118, 0.2563]}, {"w": "you", "b": [0.3179, 0.2413, 0.3463, 0.2563]}, {"w": "to", "b": [0.3524, 0.2413, 0.3686, 0.2563]}, {"w": "add", "b": [0.3748, 0.2413, 0.4041, 0.2563]}, {"w": "a", "b": [0.4103, 0.2413, 0.4194, 0.2563]}, {"w": "dropout", "b": [0.4255, 0.2413, 0.4888, 0.2563]}, {"w": "layer", "b": [0.495, 0.2413, 0.533, 0.2563]}, {"w": "between", "b": [0.5392, 0.2413, 0.6034, 0.2563]}, {"w": "two", "b": [0.6096, 0.2413, 0.6379, 0.2563]}, {"w": "successive", "b": [0.644, 0.2413, 0.7223, 0.2563]}, {"w": "layers,", "b": [0.7285, 0.2413, 0.7787, 0.2563]}, {"w": "or", "b": [0.7849, 0.2413, 0.8011, 0.2563]}, {"w": "you", "b": [0.8073, 0.2413, 0.8356, 0.2563]}, {"w": "can", "b": [0.8418, 0.2413, 0.8691, 0.2563]}, {"w": "specify", "b": [0.1312, 0.2593, 0.1865, 0.2742]}, {"w": "the", "b": [0.1927, 0.2593, 0.2185, 0.2742]}, {"w": "dropout", "b": [0.2246, 0.2593, 0.2892, 0.2742]}, {"w": "hyperparameter", "b": [0.2953, 0.2593, 0.4239, 0.2742]}, {"w": "for", "b": [0.43, 0.2593, 0.4523, 0.2742]}, {"w": "a", "b": [0.4584, 0.2593, 0.4677, 0.2742]}, {"w": "layer.", "b": [0.4739, 0.2593, 0.5178, 0.2742]}, {"w": "The", "b": [0.526, 0.2593, 0.5579, 0.2742]}, {"w": "dropout", "b": [0.5641, 0.2593, 0.6286, 0.2742]}, {"w": "hyperparameter", "b": [0.6347, 0.2593, 0.7633, 0.2742]}, {"w": "varies", "b": [0.7695, 0.2593, 0.8156, 0.2742]}, {"w": "in", "b": [0.8217, 0.2593, 0.8372, 0.2742]}, {"w": "the", "b": [0.8433, 0.2593, 0.8691, 0.2742]}, {"w": "range", "b": [0.1312, 0.2772, 0.1763, 0.2922]}, {"w": "[0,", "b": [0.1825, 0.2772, 0.2023, 0.2925]}, {"w": "1]", "b": [0.2054, 0.2772, 0.22, 0.2922]}, {"w": "and", "b": [0.2263, 0.2772, 0.2566, 0.2922]}, {"w": "characterizes", "b": [0.2628, 0.2772, 0.3682, 0.2922]}, {"w": "the", "b": [0.3744, 0.2772, 0.4006, 0.2922]}, {"w": "fraction", "b": [0.4068, 0.2772, 0.4701, 0.2922]}, {"w": "of", "b": [0.4763, 0.2772, 0.4915, 0.2922]}, {"w": "units", "b": [0.4977, 0.2772, 0.5387, 0.2922]}, {"w": "to", "b": [0.5449, 0.2772, 0.5616, 0.2922]}, {"w": "randomly", "b": [0.5678, 0.2772, 0.6458, 0.2922]}, {"w": "exclude", "b": [0.652, 0.2772, 0.7132, 0.2922]}, {"w": "from", "b": [0.7194, 0.2772, 0.7577, 0.2922]}, {"w": "computation.", "b": [0.7639, 0.2772, 0.8727, 0.2922]}, {"w": "The", "b": [0.1306, 0.2952, 0.1628, 0.3101]}, {"w": "value", "b": [0.169, 0.2952, 0.2112, 0.3101]}, {"w": "of", "b": [0.2173, 0.2952, 0.2324, 0.3101]}, {"w": "the", "b": [0.2386, 0.2952, 0.2646, 0.3101]}, {"w": "hyperparameter", "b": [0.2708, 0.2952, 0.4005, 0.3101]}, {"w": "has", "b": [0.4066, 0.2952, 0.4338, 0.3101]}, {"w": "to", "b": [0.44, 0.2952, 0.4566, 0.3101]}, {"w": "be", "b": [0.4628, 0.2952, 0.482, 0.3101]}, {"w": "found", "b": [0.4882, 0.2952, 0.5345, 0.3101]}, {"w": "experimentally.", "b": [0.5407, 0.2952, 0.6651, 0.3101]}, {"w": "While", "b": [0.6734, 0.2952, 0.7218, 0.3101]}, {"w": "simple,", "b": [0.7279, 0.2952, 0.7853, 0.3101]}, {"w": "dropout’s", "b": [0.7914, 0.2952, 0.8691, 0.3101]}, {"w": "flexibility", "b": [0.1312, 0.3131, 0.2066, 0.3281]}, {"w": "and", "b": [0.2128, 0.3131, 0.2425, 0.3281]}, {"w": "regularizing", "b": [0.2487, 0.3131, 0.3431, 0.3281]}, {"w": "effect", "b": [0.3493, 0.3131, 0.3918, 0.3281]}, {"w": "are", "b": [0.398, 0.3131, 0.4226, 0.3281]}, {"w": "phenomenal.", "b": [0.4288, 0.3131, 0.5303, 0.3281]}]}, {"id": "b_3", "type": "paragraph", "text": "Early stopping trains a neural network by saving the preliminary model after every epoch. Models saved after each epoch are called checkpoints. Then it assesses each checkpoint’s performance on the validation set. You’ll find during gradient descent that the cost decreases as the number of epochs increases. After some epoch, the model can start overfitting, and the model’s performance on the validation data can deteriorate. Remember the bias-variance illustration in Figure ?? in Chapter 5. By keeping a version of the model after each epoch, you can stop the training once you start observing a decreased performance on the validation set. Alternatively, you can keep running the training process for a fixed number of epochs, and then pick the best checkpoint. Some machine learning practitioners rely on this technique. Others try to properly regularize the model using appropriate techniques.", "words": [{"w": "Early", "b": [0.1312, 0.3403, 0.1813, 0.3553]}, {"w": "stopping", "b": [0.1884, 0.3403, 0.2675, 0.3553]}, {"w": "trains", "b": [0.2738, 0.34, 0.3194, 0.355]}, {"w": "a", "b": [0.3256, 0.34, 0.3347, 0.355]}, {"w": "neural", "b": [0.3408, 0.34, 0.3904, 0.355]}, {"w": "network", "b": [0.3965, 0.34, 0.4598, 0.355]}, {"w": "by", "b": [0.4659, 0.34, 0.4851, 0.355]}, {"w": "saving", "b": [0.4912, 0.34, 0.5409, 0.355]}, {"w": "the", "b": [0.547, 0.34, 0.5723, 0.355]}, {"w": "preliminary", "b": [0.5784, 0.34, 0.67, 0.355]}, {"w": "model", "b": [0.6762, 0.34, 0.7242, 0.355]}, {"w": "after", "b": [0.7303, 0.34, 0.7673, 0.355]}, {"w": "every", "b": [0.7734, 0.34, 0.8154, 0.355]}, {"w": "epoch.", "b": [0.8216, 0.34, 0.8726, 0.355]}, {"w": "Models", "b": [0.1312, 0.358, 0.1896, 0.3729]}, {"w": "saved", "b": [0.1958, 0.358, 0.2401, 0.3729]}, {"w": "after", "b": [0.2463, 0.358, 0.2844, 0.3729]}, {"w": "each", "b": [0.2905, 0.358, 0.3265, 0.3729]}, {"w": "epoch", "b": [0.3326, 0.358, 0.38, 0.3729]}, {"w": "are", "b": [0.3861, 0.358, 0.4112, 0.3729]}, {"w": "called", "b": [0.4173, 0.358, 0.4642, 0.3729]}, {"w": "checkpoints.", "b": [0.4701, 0.358, 0.5824, 0.3732]}, {"w": "Then", "b": [0.5907, 0.358, 0.6334, 0.3729]}, {"w": "it", "b": [0.6395, 0.358, 0.652, 0.3729]}, {"w": "assesses", "b": [0.6582, 0.358, 0.7212, 0.3729]}, {"w": "each", "b": [0.7273, 0.358, 0.7633, 0.3729]}, {"w": "checkpoint’s", "b": [0.7694, 0.358, 0.869, 0.3729]}, {"w": "performance", "b": [0.1312, 0.3759, 0.2288, 0.3909]}, {"w": "on", "b": [0.2347, 0.3759, 0.2538, 0.3909]}, {"w": "the", "b": [0.2596, 0.3759, 0.2848, 0.3909]}, {"w": "validation", "b": [0.2906, 0.3759, 0.3685, 0.3909]}, {"w": "set.", "b": [0.3743, 0.3759, 0.4016, 0.3909]}, {"w": "You’ll", "b": [0.4097, 0.3759, 0.4559, 0.3909]}, {"w": "find", "b": [0.4617, 0.3759, 0.4919, 0.3909]}, {"w": "during", "b": [0.4978, 0.3759, 0.5491, 0.3909]}, {"w": "gradient", "b": [0.5549, 0.3759, 0.6198, 0.3909]}, {"w": "descent", "b": [0.6257, 0.3759, 0.6836, 0.3909]}, {"w": "that", "b": [0.6894, 0.3759, 0.7226, 0.3909]}, {"w": "the", "b": [0.7284, 0.3759, 0.7536, 0.3909]}, {"w": "cost", "b": [0.7594, 0.3759, 0.7907, 0.3909]}, {"w": "decreases", "b": [0.7965, 0.3759, 0.8692, 0.3909]}, {"w": "as", "b": [0.1312, 0.3939, 0.148, 0.4088]}, {"w": "the", "b": [0.1541, 0.3939, 0.1802, 0.4088]}, {"w": "number", "b": [0.1863, 0.3939, 0.2484, 0.4088]}, {"w": "of", "b": [0.2545, 0.3939, 0.2696, 0.4088]}, {"w": "epochs", "b": [0.2757, 0.3939, 0.3305, 0.4088]}, {"w": "increases.", "b": [0.3367, 0.3939, 0.4141, 0.4088]}, {"w": "After", "b": [0.4223, 0.3939, 0.465, 0.4088]}, {"w": "some", "b": [0.4712, 0.3939, 0.5119, 0.4088]}, {"w": "epoch,", "b": [0.518, 0.3939, 0.5706, 0.4088]}, {"w": "the", "b": [0.5768, 0.3939, 0.6028, 0.4088]}, {"w": "model", "b": [0.609, 0.3939, 0.6584, 0.4088]}, {"w": "can", "b": [0.6646, 0.3939, 0.6927, 0.4088]}, {"w": "start", "b": [0.6988, 0.3939, 0.7375, 0.4088]}, {"w": "overfitting,", "b": [0.7437, 0.3939, 0.8328, 0.4088]}, {"w": "and", "b": [0.8389, 0.3939, 0.8691, 0.4088]}, {"w": "the", "b": [0.1312, 0.4118, 0.1564, 0.4268]}, {"w": "model’s", "b": [0.1624, 0.4118, 0.2223, 0.4268]}, {"w": "performance", "b": [0.2283, 0.4118, 0.3259, 0.4268]}, {"w": "on", "b": [0.3319, 0.4118, 0.351, 0.4268]}, {"w": "the", "b": [0.357, 0.4118, 0.3822, 0.4268]}, {"w": "validation", "b": [0.3882, 0.4118, 0.466, 0.4268]}, {"w": "data", "b": [0.472, 0.4118, 0.5072, 0.4268]}, {"w": "can", "b": [0.5132, 0.4118, 0.5404, 0.4268]}, {"w": "deteriorate.", "b": [0.5464, 0.4118, 0.6369, 0.4268]}, {"w": "Remember", "b": [0.6451, 0.4118, 0.7298, 0.4268]}, {"w": "the", "b": [0.7358, 0.4118, 0.761, 0.4268]}, {"w": "bias-variance", "b": [0.767, 0.4118, 0.8691, 0.4268]}, {"w": "illustration", "b": [0.1312, 0.4298, 0.2204, 0.4447]}, {"w": "in", "b": [0.2265, 0.4298, 0.2421, 0.4447]}, {"w": "Figure", "b": [0.2482, 0.4298, 0.3008, 0.4447]}, {"w": "??", "b": [0.3069, 0.4301, 0.3269, 0.445]}, {"w": "in", "b": [0.3331, 0.4298, 0.3486, 0.4447]}, {"w": "Chapter", "b": [0.3547, 0.4298, 0.421, 0.4447]}, {"w": "5.", "b": [0.4272, 0.4298, 0.4417, 0.4447]}, {"w": "By", "b": [0.4499, 0.4298, 0.4729, 0.4447]}, {"w": "keeping", "b": [0.4791, 0.4298, 0.5401, 0.4447]}, {"w": "a", "b": [0.5463, 0.4298, 0.5556, 0.4447]}, {"w": "version", "b": [0.5617, 0.4298, 0.6188, 0.4447]}, {"w": "of", "b": [0.625, 0.4298, 0.64, 0.4447]}, {"w": "the", "b": [0.6461, 0.4298, 0.672, 0.4447]}, {"w": "model", "b": [0.6782, 0.4298, 0.7273, 0.4447]}, {"w": "after", "b": [0.7335, 0.4298, 0.7713, 0.4447]}, {"w": "each", "b": [0.7775, 0.4298, 0.8132, 0.4447]}, {"w": "epoch,", "b": [0.8193, 0.4298, 0.8716, 0.4447]}, {"w": "you", "b": [0.1308, 0.4477, 0.1589, 0.4627]}, {"w": "can", "b": [0.1648, 0.4477, 0.1919, 0.4627]}, {"w": "stop", "b": [0.1978, 0.4477, 0.2311, 0.4627]}, {"w": "the", "b": [0.2369, 0.4477, 0.2621, 0.4627]}, {"w": "training", "b": [0.268, 0.4477, 0.3303, 0.4627]}, {"w": "once", "b": [0.3362, 0.4477, 0.3714, 0.4627]}, {"w": "you", "b": [0.3773, 0.4477, 0.4054, 0.4627]}, {"w": "start", "b": [0.4113, 0.4477, 0.4486, 0.4627]}, {"w": "observing", "b": [0.4545, 0.4477, 0.5295, 0.4627]}, {"w": "a", "b": [0.5354, 0.4477, 0.5445, 0.4627]}, {"w": "decreased", "b": [0.5504, 0.4477, 0.6259, 0.4627]}, {"w": "performance", "b": [0.6318, 0.4477, 0.7294, 0.4627]}, {"w": "on", "b": [0.7353, 0.4477, 0.7544, 0.4627]}, {"w": "the", "b": [0.7603, 0.4477, 0.7854, 0.4627]}, {"w": "validation", "b": [0.7913, 0.4477, 0.8691, 0.4627]}, {"w": "set.", "b": [0.1312, 0.4657, 0.1594, 0.4806]}, {"w": "Alternatively,", "b": [0.1676, 0.4657, 0.2783, 0.4806]}, {"w": "you", "b": [0.2844, 0.4657, 0.3135, 0.4806]}, {"w": "can", "b": [0.3196, 0.4657, 0.3477, 0.4806]}, {"w": "keep", "b": [0.3538, 0.4657, 0.3902, 0.4806]}, {"w": "running", "b": [0.3963, 0.4657, 0.4598, 0.4806]}, {"w": "the", "b": [0.4659, 0.4657, 0.4918, 0.4806]}, {"w": "training", "b": [0.498, 0.4657, 0.5624, 0.4806]}, {"w": "process", "b": [0.5686, 0.4657, 0.6275, 0.4806]}, {"w": "for", "b": [0.6336, 0.4657, 0.656, 0.4806]}, {"w": "a", "b": [0.6622, 0.4657, 0.6715, 0.4806]}, {"w": "fixed", "b": [0.6776, 0.4657, 0.7166, 0.4806]}, {"w": "number", "b": [0.7227, 0.4657, 0.7846, 0.4806]}, {"w": "of", "b": [0.7907, 0.4657, 0.8058, 0.4806]}, {"w": "epochs,", "b": [0.8119, 0.4657, 0.8717, 0.4806]}, {"w": "and", "b": [0.1312, 0.4836, 0.1604, 0.4986]}, {"w": "then", "b": [0.1655, 0.4836, 0.2007, 0.4986]}, {"w": "pick", "b": [0.2059, 0.4836, 0.238, 0.4986]}, {"w": "the", "b": [0.2432, 0.4836, 0.2683, 0.4986]}, {"w": "best", "b": [0.2735, 0.4836, 0.3062, 0.4986]}, {"w": "checkpoint.", "b": [0.3114, 0.4836, 0.4003, 0.4986]}, {"w": "Some", "b": [0.4082, 0.4836, 0.4504, 0.4986]}, {"w": "machine", "b": [0.4555, 0.4836, 0.5203, 0.4986]}, {"w": "learning", "b": [0.5255, 0.4836, 0.5889, 0.4986]}, {"w": "practitioners", "b": [0.594, 0.4836, 0.6937, 0.4986]}, {"w": "rely", "b": [0.6989, 0.4836, 0.7286, 0.4986]}, {"w": "on", "b": [0.7337, 0.4836, 0.7528, 0.4986]}, {"w": "this", "b": [0.758, 0.4836, 0.7872, 0.4986]}, {"w": "technique.", "b": [0.7924, 0.4836, 0.8728, 0.4986]}, {"w": "Others", "b": [0.1312, 0.5016, 0.1858, 0.5165]}, {"w": "try", "b": [0.1919, 0.5016, 0.216, 0.5165]}, {"w": "to", "b": [0.2222, 0.5016, 0.2386, 0.5165]}, {"w": "properly", "b": [0.2448, 0.5016, 0.3125, 0.5165]}, {"w": "regularize", "b": [0.3187, 0.5016, 0.3967, 0.5165]}, {"w": "the", "b": [0.4029, 0.5016, 0.4285, 0.5165]}, {"w": "model", "b": [0.4347, 0.5016, 0.4834, 0.5165]}, {"w": "using", "b": [0.4895, 0.5016, 0.5317, 0.5165]}, {"w": "appropriate", "b": [0.5378, 0.5016, 0.6313, 0.5165]}, {"w": "techniques.", "b": [0.6374, 0.5016, 0.7268, 0.5165]}]}, {"id": "b_4", "type": "paragraph", "text": "Batch normalization (which rather should be called batch standardization) consists of standardizing the outputs of each layer before the next layer receives them as input. In practice, batch normalization results in faster and more stable training, as well as some regularization effect. So, it’s always a good idea to use batch normalization. In popular neural network libraries, you can often insert a batch normalization layer between two subse- quent layers.", "words": [{"w": "Batch", "b": [0.1312, 0.5288, 0.1855, 0.5437]}, {"w": "normalization", "b": [0.1937, 0.5288, 0.3209, 0.5437]}, {"w": "(which", "b": [0.3281, 0.5285, 0.383, 0.5434]}, {"w": "rather", "b": [0.3901, 0.5285, 0.4405, 0.5434]}, {"w": "should", "b": [0.4476, 0.5285, 0.501, 0.5434]}, {"w": "be", "b": [0.5082, 0.5285, 0.5275, 0.5434]}, {"w": "called", "b": [0.5346, 0.5285, 0.5817, 0.5434]}, {"w": "batch", "b": [0.5888, 0.5285, 0.6343, 0.5434]}, {"w": "standardization)", "b": [0.6415, 0.5285, 0.7766, 0.5434]}, {"w": "consists", "b": [0.7837, 0.5285, 0.8468, 0.5434]}, {"w": "of", "b": [0.8539, 0.5285, 0.8691, 0.5434]}, {"w": "standardizing", "b": [0.1312, 0.5467, 0.2562, 0.5617]}, {"w": "the", "b": [0.2629, 0.5464, 0.289, 0.5614]}, {"w": "outputs", "b": [0.2955, 0.5464, 0.3583, 0.5614]}, {"w": "of", "b": [0.3648, 0.5464, 0.38, 0.5614]}, {"w": "each", "b": [0.3865, 0.5464, 0.4226, 0.5614]}, {"w": "layer", "b": [0.429, 0.5464, 0.4683, 0.5614]}, {"w": "before", "b": [0.4748, 0.5464, 0.5251, 0.5614]}, {"w": "the", "b": [0.5315, 0.5464, 0.5577, 0.5614]}, {"w": "next", "b": [0.5642, 0.5464, 0.6003, 0.5614]}, {"w": "layer", "b": [0.6067, 0.5464, 0.646, 0.5614]}, {"w": "receives", "b": [0.6525, 0.5464, 0.7154, 0.5614]}, {"w": "them", "b": [0.7219, 0.5464, 0.7637, 0.5614]}, {"w": "as", "b": [0.7702, 0.5464, 0.7871, 0.5614]}, {"w": "input.", "b": [0.7935, 0.5464, 0.8427, 0.5614]}, {"w": "In", "b": [0.8519, 0.5464, 0.8691, 0.5614]}, {"w": "practice,", "b": [0.1312, 0.5644, 0.2014, 0.5793]}, {"w": "batch", "b": [0.2092, 0.5644, 0.2547, 0.5793]}, {"w": "normalization", "b": [0.2622, 0.5644, 0.3752, 0.5793]}, {"w": "results", "b": [0.3827, 0.5644, 0.4364, 0.5793]}, {"w": "in", "b": [0.4439, 0.5644, 0.4596, 0.5793]}, {"w": "faster", "b": [0.4671, 0.5644, 0.5127, 0.5793]}, {"w": "and", "b": [0.5202, 0.5644, 0.5506, 0.5793]}, {"w": "more", "b": [0.5581, 0.5644, 0.5989, 0.5793]}, {"w": "stable", "b": [0.6064, 0.5644, 0.6546, 0.5793]}, {"w": "training,", "b": [0.6622, 0.5644, 0.7323, 0.5793]}, {"w": "as", "b": [0.7401, 0.5644, 0.757, 0.5793]}, {"w": "well", "b": [0.7645, 0.5644, 0.7964, 0.5793]}, {"w": "as", "b": [0.8039, 0.5644, 0.8207, 0.5793]}, {"w": "some", "b": [0.8282, 0.5644, 0.8691, 0.5793]}, {"w": "regularization", "b": [0.1312, 0.5823, 0.2443, 0.5973]}, {"w": "effect.", "b": [0.2515, 0.5823, 0.3001, 0.5973]}, {"w": "So,", "b": [0.3115, 0.5823, 0.3366, 0.5973]}, {"w": "it’s", "b": [0.3441, 0.5823, 0.3693, 0.5973]}, {"w": "always", "b": [0.3765, 0.5823, 0.4305, 0.5973]}, {"w": "a", "b": [0.4377, 0.5823, 0.4471, 0.5973]}, {"w": "good", "b": [0.4543, 0.5823, 0.494, 0.5973]}, {"w": "idea", "b": [0.5012, 0.5823, 0.5347, 0.5973]}, {"w": "to", "b": [0.5419, 0.5823, 0.5587, 0.5973]}, {"w": "use", "b": [0.5659, 0.5823, 0.5921, 0.5973]}, {"w": "batch", "b": [0.5993, 0.5823, 0.6448, 0.5973]}, {"w": "normalization.", "b": [0.652, 0.5823, 0.7703, 0.5973]}, {"w": "In", "b": [0.7816, 0.5823, 0.7989, 0.5973]}, {"w": "popular", "b": [0.8061, 0.5823, 0.8694, 0.5973]}, {"w": "neural", "b": [0.1312, 0.6003, 0.1806, 0.6152]}, {"w": "network", "b": [0.1868, 0.6003, 0.2498, 0.6152]}, {"w": "libraries,", "b": [0.2559, 0.6003, 0.3246, 0.6152]}, {"w": "you", "b": [0.3308, 0.6003, 0.359, 0.6152]}, {"w": "can", "b": [0.3651, 0.6003, 0.3923, 0.6152]}, {"w": "often", "b": [0.3985, 0.6003, 0.4383, 0.6152]}, {"w": "insert", "b": [0.4445, 0.6003, 0.4889, 0.6152]}, {"w": "a", "b": [0.4951, 0.6003, 0.5042, 0.6152]}, {"w": "batch", "b": [0.5103, 0.6003, 0.5541, 0.6152]}, {"w": "normalization", "b": [0.5603, 0.6003, 0.6691, 0.6152]}, {"w": "layer", "b": [0.6752, 0.6003, 0.713, 0.6152]}, {"w": "between", "b": [0.7192, 0.6003, 0.7832, 0.6152]}, {"w": "two", "b": [0.7893, 0.6003, 0.8175, 0.6152]}, {"w": "subse-", "b": [0.8237, 0.6003, 0.8722, 0.6152]}, {"w": "quent", "b": [0.1312, 0.6182, 0.1764, 0.6332]}, {"w": "layers.", "b": [0.1825, 0.6182, 0.2334, 0.6332]}]}, {"id": "b_5", "type": "paragraph", "text": "Another regularization technique that can be applied to any learning algorithm is data augmentation. This technique is often used to regularize models that work with images. In practice, applying data augmentation often results in an increased model performance.", "words": [{"w": "Another", "b": [0.1305, 0.6451, 0.1981, 0.6601]}, {"w": "regularization", "b": [0.2058, 0.6451, 0.3189, 0.6601]}, {"w": "technique", "b": [0.3266, 0.6451, 0.4051, 0.6601]}, {"w": "that", "b": [0.4128, 0.6451, 0.4473, 0.6601]}, {"w": "can", "b": [0.4551, 0.6451, 0.4833, 0.6601]}, {"w": "be", "b": [0.4911, 0.6451, 0.5104, 0.6601]}, {"w": "applied", "b": [0.5182, 0.6451, 0.5778, 0.6601]}, {"w": "to", "b": [0.5855, 0.6451, 0.6023, 0.6601]}, {"w": "any", "b": [0.61, 0.6451, 0.6393, 0.6601]}, {"w": "learning", "b": [0.6471, 0.6451, 0.713, 0.6601]}, {"w": "algorithm", "b": [0.7207, 0.6451, 0.8003, 0.6601]}, {"w": "is", "b": [0.808, 0.6451, 0.8207, 0.6601]}, {"w": "data", "b": [0.8281, 0.6454, 0.8688, 0.6604]}, {"w": "augmentation.", "b": [0.1312, 0.6631, 0.263, 0.6783]}, {"w": "This", "b": [0.2718, 0.6631, 0.3085, 0.678]}, {"w": "technique", "b": [0.3148, 0.6631, 0.3933, 0.678]}, {"w": "is", "b": [0.3996, 0.6631, 0.4123, 0.678]}, {"w": "often", "b": [0.4187, 0.6631, 0.46, 0.678]}, {"w": "used", "b": [0.4663, 0.6631, 0.5031, 0.678]}, {"w": "to", "b": [0.5094, 0.6631, 0.5261, 0.678]}, {"w": "regularize", "b": [0.5325, 0.6631, 0.6121, 0.678]}, {"w": "models", "b": [0.6185, 0.6631, 0.6756, 0.678]}, {"w": "that", "b": [0.6819, 0.6631, 0.7164, 0.678]}, {"w": "work", "b": [0.7228, 0.6631, 0.7626, 0.678]}, {"w": "with", "b": [0.7689, 0.6631, 0.8055, 0.678]}, {"w": "images.", "b": [0.8119, 0.6631, 0.8726, 0.678]}, {"w": "In", "b": [0.1312, 0.681, 0.1482, 0.696]}, {"w": "practice,", "b": [0.1543, 0.681, 0.2231, 0.696]}, {"w": "applying", "b": [0.2292, 0.681, 0.2984, 0.696]}, {"w": "data", "b": [0.3046, 0.681, 0.3405, 0.696]}, {"w": "augmentation", "b": [0.3466, 0.681, 0.4568, 0.696]}, {"w": "often", "b": [0.463, 0.681, 0.5035, 0.696]}, {"w": "results", "b": [0.5096, 0.681, 0.5622, 0.696]}, {"w": "in", "b": [0.5684, 0.681, 0.5838, 0.696]}, {"w": "an", "b": [0.5899, 0.681, 0.6094, 0.696]}, {"w": "increased", "b": [0.6155, 0.681, 0.6896, 0.696]}, {"w": "model", "b": [0.6957, 0.681, 0.7444, 0.696]}, {"w": "performance.", "b": [0.7506, 0.681, 0.8553, 0.696]}]}, {"id": "b_6", "type": "paragraph", "text": "6.1.7 Network Size Search and Hyperparameter Tuning", "words": [{"w": "6.1.7", "b": [0.1312, 0.7292, 0.1749, 0.7441]}, {"w": "Network", "b": [0.1961, 0.7292, 0.2754, 0.7441]}, {"w": "Size", "b": [0.2824, 0.7292, 0.3193, 0.7441]}, {"w": "Search", "b": [0.3264, 0.7292, 0.3875, 0.7441]}, {"w": "and", "b": [0.3946, 0.7292, 0.4285, 0.7441]}, {"w": "Hyperparameter", "b": [0.4356, 0.7292, 0.5895, 0.7441]}, {"w": "Tuning", "b": [0.5966, 0.7292, 0.6614, 0.7441]}]}, {"id": "b_7", "type": "paragraph", "text": "Step 5 of the deep model training strategy is similar to that in the shallow model training strategy — choose a hyperparameter tuning strategy T.", "words": [{"w": "Step", "b": [0.1312, 0.7655, 0.1677, 0.7804]}, {"w": "5", "b": [0.1738, 0.7655, 0.1832, 0.7804]}, {"w": "of", "b": [0.1894, 0.7655, 0.2045, 0.7804]}, {"w": "the", "b": [0.2106, 0.7655, 0.2367, 0.7804]}, {"w": "deep", "b": [0.2428, 0.7655, 0.2803, 0.7804]}, {"w": "model", "b": [0.2865, 0.7655, 0.3359, 0.7804]}, {"w": "training", "b": [0.3421, 0.7655, 0.4067, 0.7804]}, {"w": "strategy", "b": [0.4128, 0.7655, 0.4791, 0.7804]}, {"w": "is", "b": [0.4852, 0.7655, 0.4978, 0.7804]}, {"w": "similar", "b": [0.504, 0.7655, 0.5593, 0.7804]}, {"w": "to", "b": [0.5655, 0.7655, 0.5821, 0.7804]}, {"w": "that", "b": [0.5883, 0.7655, 0.6226, 0.7804]}, {"w": "in", "b": [0.6288, 0.7655, 0.6444, 0.7804]}, {"w": "the", "b": [0.6506, 0.7655, 0.6766, 0.7804]}, {"w": "shallow", "b": [0.6828, 0.7655, 0.7427, 0.7804]}, {"w": "model", "b": [0.7489, 0.7655, 0.7983, 0.7804]}, {"w": "training", "b": [0.8045, 0.7655, 0.8691, 0.7804]}, {"w": "strategy", "b": [0.1312, 0.7834, 0.1965, 0.7984]}, {"w": "—", "b": [0.2027, 0.7834, 0.2211, 0.7984]}, {"w": "choose", "b": [0.2273, 0.7834, 0.2797, 0.7984]}, {"w": "a", "b": [0.2858, 0.7834, 0.295, 0.7984]}, {"w": "hyperparameter", "b": [0.3012, 0.7834, 0.429, 0.7984]}, {"w": "tuning", "b": [0.4352, 0.7834, 0.4875, 0.7984]}, {"w": "strategy", "b": [0.4936, 0.7834, 0.5589, 0.7984]}, {"w": "T.", "b": [0.5648, 0.7834, 0.5833, 0.7986]}]}, {"id": "b_8", "type": "paragraph", "text": "It step 6, we pick a combination of hyperparameter values using strategy T. Typical parameters include the size of the minibatch, the value of the learning rate (if you use the vanilla minibatch SGD), or an algorithm that automatically updates the learning rate, such", "words": [{"w": "It", "b": [0.1312, 0.8103, 0.1453, 0.8253]}, {"w": "step", "b": [0.1543, 0.8103, 0.1879, 0.8253]}, {"w": "6,", "b": [0.1969, 0.8103, 0.2115, 0.8253]}, {"w": "we", "b": [0.2212, 0.8103, 0.2426, 0.8253]}, {"w": "pick", "b": [0.2516, 0.8103, 0.2851, 0.8253]}, {"w": "a", "b": [0.294, 0.8103, 0.3035, 0.8253]}, {"w": "combination", "b": [0.3124, 0.8103, 0.4134, 0.8253]}, {"w": "of", "b": [0.4223, 0.8103, 0.4375, 0.8253]}, {"w": "hyperparameter", "b": [0.4465, 0.8103, 0.5768, 0.8253]}, {"w": "values", "b": [0.5858, 0.8103, 0.6356, 0.8253]}, {"w": "using", "b": [0.6446, 0.8103, 0.6876, 0.8253]}, {"w": "strategy", "b": [0.6966, 0.8103, 0.7632, 0.8253]}, {"w": "T.", "b": [0.7719, 0.8103, 0.7904, 0.8256]}, {"w": "Typical", "b": [0.8071, 0.8103, 0.8688, 0.8253]}, {"w": "parameters", "b": [0.1312, 0.8283, 0.2221, 0.8432]}, {"w": "include", "b": [0.2282, 0.8283, 0.2866, 0.8432]}, {"w": "the", "b": [0.2927, 0.8283, 0.3188, 0.8432]}, {"w": "size", "b": [0.3249, 0.8283, 0.3542, 0.8432]}, {"w": "of", "b": [0.3603, 0.8283, 0.3754, 0.8432]}, {"w": "the", "b": [0.3816, 0.8283, 0.4076, 0.8432]}, {"w": "minibatch,", "b": [0.4137, 0.8283, 0.5007, 0.8432]}, {"w": "the", "b": [0.5069, 0.8283, 0.5329, 0.8432]}, {"w": "value", "b": [0.5391, 0.8283, 0.5813, 0.8432]}, {"w": "of", "b": [0.5874, 0.8283, 0.6025, 0.8432]}, {"w": "the", "b": [0.6087, 0.8283, 0.6347, 0.8432]}, {"w": "learning", "b": [0.6408, 0.8283, 0.7065, 0.8432]}, {"w": "rate", "b": [0.7127, 0.8283, 0.745, 0.8432]}, {"w": "(if", "b": [0.7511, 0.8283, 0.7694, 0.8432]}, {"w": "you", "b": [0.7755, 0.8283, 0.8047, 0.8432]}, {"w": "use", "b": [0.8108, 0.8283, 0.837, 0.8432]}, {"w": "the", "b": [0.8431, 0.8283, 0.8692, 0.8432]}, {"w": "vanilla", "b": [0.1308, 0.8462, 0.1832, 0.8612]}, {"w": "minibatch", "b": [0.1894, 0.8462, 0.2694, 0.8612]}, {"w": "SGD),", "b": [0.2756, 0.8462, 0.3264, 0.8612]}, {"w": "or", "b": [0.3326, 0.8462, 0.3489, 0.8612]}, {"w": "an", "b": [0.3551, 0.8462, 0.3745, 0.8612]}, {"w": "algorithm", "b": [0.3806, 0.8462, 0.4581, 0.8612]}, {"w": "that", "b": [0.4643, 0.8462, 0.4979, 0.8612]}, {"w": "automatically", "b": [0.5041, 0.8462, 0.6136, 0.8612]}, {"w": "updates", "b": [0.6198, 0.8462, 0.6826, 0.8612]}, {"w": "the", "b": [0.6888, 0.8462, 0.7143, 0.8612]}, {"w": "learning", "b": [0.7204, 0.8462, 0.7847, 0.8612]}, {"w": "rate,", "b": [0.7909, 0.8462, 0.8276, 0.8612]}, {"w": "such", "b": [0.8338, 0.8462, 0.8691, 0.8612]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "13", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 189, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 3: The neural network model training flowchart.", "words": [{"w": "Figure", "b": [0.2758, 0.3334, 0.3279, 0.3483]}, {"w": "3:", "b": [0.334, 0.3334, 0.3484, 0.3483]}, {"w": "The", "b": [0.3566, 0.3334, 0.3884, 0.3483]}, {"w": "neural", "b": [0.3945, 0.3334, 0.4448, 0.3483]}, {"w": "network", "b": [0.451, 0.3334, 0.5151, 0.3483]}, {"w": "model", "b": [0.5213, 0.3334, 0.57, 0.3483]}, {"w": "training", "b": [0.5761, 0.3334, 0.6397, 0.3483]}, {"w": "flowchart.", "b": [0.6459, 0.3334, 0.7244, 0.3483]}]}, {"id": "b_1", "type": "paragraph", "text": "as Adam. You also decide the initial number of layers and units per layer. It’s recommended to start with something reasonable that would allow us to build the first model fast enough. For example, two hidden layers and 128 units per layer might be a good starting point.", "words": [{"w": "as", "b": [0.1312, 0.3836, 0.1474, 0.3986]}, {"w": "Adam.", "b": [0.1536, 0.3836, 0.2059, 0.3986]}, {"w": "You", "b": [0.2141, 0.3836, 0.2452, 0.3986]}, {"w": "also", "b": [0.2514, 0.3836, 0.2816, 0.3986]}, {"w": "decide", "b": [0.2878, 0.3836, 0.3371, 0.3986]}, {"w": "the", "b": [0.3433, 0.3836, 0.3684, 0.3986]}, {"w": "initial", "b": [0.3746, 0.3836, 0.4208, 0.3986]}, {"w": "number", "b": [0.427, 0.3836, 0.4869, 0.3986]}, {"w": "of", "b": [0.493, 0.3836, 0.5076, 0.3986]}, {"w": "layers", "b": [0.5138, 0.3836, 0.5587, 0.3986]}, {"w": "and", "b": [0.5648, 0.3836, 0.594, 0.3986]}, {"w": "units", "b": [0.6002, 0.3836, 0.6395, 0.3986]}, {"w": "per", "b": [0.6457, 0.3836, 0.6714, 0.3986]}, {"w": "layer.", "b": [0.6775, 0.3836, 0.7203, 0.3986]}, {"w": "It’s", "b": [0.7285, 0.3836, 0.7543, 0.3986]}, {"w": "recommended", "b": [0.7604, 0.3836, 0.8691, 0.3986]}, {"w": "to", "b": [0.1312, 0.4016, 0.1475, 0.4165]}, {"w": "start", "b": [0.1537, 0.4016, 0.1916, 0.4165]}, {"w": "with", "b": [0.1977, 0.4016, 0.2334, 0.4165]}, {"w": "something", "b": [0.2395, 0.4016, 0.3212, 0.4165]}, {"w": "reasonable", "b": [0.3273, 0.4016, 0.4111, 0.4165]}, {"w": "that", "b": [0.4173, 0.4016, 0.4509, 0.4165]}, {"w": "would", "b": [0.457, 0.4016, 0.5044, 0.4165]}, {"w": "allow", "b": [0.5106, 0.4016, 0.5518, 0.4165]}, {"w": "us", "b": [0.558, 0.4016, 0.5754, 0.4165]}, {"w": "to", "b": [0.5816, 0.4016, 0.5979, 0.4165]}, {"w": "build", "b": [0.6041, 0.4016, 0.6449, 0.4165]}, {"w": "the", "b": [0.651, 0.4016, 0.6765, 0.4165]}, {"w": "first", "b": [0.6827, 0.4016, 0.7144, 0.4165]}, {"w": "model", "b": [0.7206, 0.4016, 0.769, 0.4165]}, {"w": "fast", "b": [0.7752, 0.4016, 0.8043, 0.4165]}, {"w": "enough.", "b": [0.8105, 0.4016, 0.8726, 0.4165]}, {"w": "For", "b": [0.1312, 0.4195, 0.1582, 0.4345]}, {"w": "example,", "b": [0.1643, 0.4195, 0.2356, 0.4345]}, {"w": "two", "b": [0.2418, 0.4195, 0.2705, 0.4345]}, {"w": "hidden", "b": [0.2766, 0.4195, 0.331, 0.4345]}, {"w": "layers", "b": [0.3371, 0.4195, 0.3829, 0.4345]}, {"w": "and", "b": [0.3891, 0.4195, 0.4188, 0.4345]}, {"w": "128", "b": [0.4248, 0.4195, 0.4525, 0.4345]}, {"w": "units", "b": [0.4587, 0.4195, 0.4988, 0.4345]}, {"w": "per", "b": [0.5049, 0.4195, 0.5311, 0.4345]}, {"w": "layer", "b": [0.5373, 0.4195, 0.5758, 0.4345]}, {"w": "might", "b": [0.5819, 0.4195, 0.6286, 0.4345]}, {"w": "be", "b": [0.6347, 0.4195, 0.6537, 0.4345]}, {"w": "a", "b": [0.6598, 0.4195, 0.6691, 0.4345]}, {"w": "good", "b": [0.6752, 0.4195, 0.7142, 0.4345]}, {"w": "starting", "b": [0.7203, 0.4195, 0.783, 0.4345]}, {"w": "point.", "b": [0.7892, 0.4195, 0.8364, 0.4345]}]}, {"id": "b_2", "type": "paragraph", "text": "Step 7 reads, “Build the training model M, using algorithm A, parametrized with hyper- parameters H, to optimize the cost function C.” This is the main difference with shallow learning. When you work with a shallow learning algorithm or a model, you can only tweak some built-in hyperparameters. You don’t have much control over the model architecture and complexity. With neural networks, you have all the control, and training a model is more a process than a single action. To build a deep model, you start with a reasonably-sized model, and then you follow the flowchart shown in Figure 3.", "words": [{"w": "Step", "b": [0.1312, 0.4465, 0.1679, 0.4614]}, {"w": "7", "b": [0.1746, 0.4465, 0.184, 0.4614]}, {"w": "reads,", "b": [0.1908, 0.4465, 0.239, 0.4614]}, {"w": "“Build", "b": [0.2459, 0.4465, 0.2995, 0.4614]}, {"w": "the", "b": [0.3063, 0.4465, 0.3325, 0.4614]}, {"w": "training", "b": [0.3392, 0.4465, 0.4041, 0.4614]}, {"w": "model", "b": [0.4109, 0.4465, 0.4605, 0.4614]}, {"w": "M,", "b": [0.4671, 0.4465, 0.4923, 0.4617]}, {"w": "using", "b": [0.4992, 0.4465, 0.5422, 0.4614]}, {"w": "algorithm", "b": [0.5489, 0.4465, 0.6284, 0.4614]}, {"w": "A,", "b": [0.6351, 0.4465, 0.6542, 0.4617]}, {"w": "parametrized", "b": [0.6611, 0.4465, 0.769, 0.4614]}, {"w": "with", "b": [0.7757, 0.4465, 0.8123, 0.4614]}, {"w": "hyper-", "b": [0.8191, 0.4465, 0.8719, 0.4614]}, {"w": "parameters", "b": [0.1312, 0.4644, 0.2224, 0.4794]}, {"w": "H,", "b": [0.229, 0.4644, 0.251, 0.4796]}, {"w": "to", "b": [0.2577, 0.4644, 0.2744, 0.4794]}, {"w": "optimize", "b": [0.281, 0.4644, 0.3511, 0.4794]}, {"w": "the", "b": [0.3577, 0.4644, 0.3838, 0.4794]}, {"w": "cost", "b": [0.3904, 0.4644, 0.4229, 0.4794]}, {"w": "function", "b": [0.4295, 0.4644, 0.497, 0.4794]}, {"w": "C.”", "b": [0.5034, 0.4644, 0.5295, 0.4796]}, {"w": "This", "b": [0.539, 0.4644, 0.5757, 0.4794]}, {"w": "is", "b": [0.5823, 0.4644, 0.5949, 0.4794]}, {"w": "the", "b": [0.6015, 0.4644, 0.6277, 0.4794]}, {"w": "main", "b": [0.6342, 0.4644, 0.675, 0.4794]}, {"w": "difference", "b": [0.6816, 0.4644, 0.7596, 0.4794]}, {"w": "with", "b": [0.7661, 0.4644, 0.8027, 0.4794]}, {"w": "shallow", "b": [0.8093, 0.4644, 0.8696, 0.4794]}, {"w": "learning.", "b": [0.1312, 0.4824, 0.2005, 0.4973]}, {"w": "When", "b": [0.2087, 0.4824, 0.256, 0.4973]}, {"w": "you", "b": [0.2622, 0.4824, 0.2907, 0.4973]}, {"w": "work", "b": [0.2968, 0.4824, 0.3355, 0.4973]}, {"w": "with", "b": [0.3417, 0.4824, 0.3773, 0.4973]}, {"w": "a", "b": [0.3834, 0.4824, 0.3926, 0.4973]}, {"w": "shallow", "b": [0.3988, 0.4824, 0.4574, 0.4973]}, {"w": "learning", "b": [0.4635, 0.4824, 0.5276, 0.4973]}, {"w": "algorithm", "b": [0.5338, 0.4824, 0.6112, 0.4973]}, {"w": "or", "b": [0.6173, 0.4824, 0.6337, 0.4973]}, {"w": "a", "b": [0.6398, 0.4824, 0.649, 0.4973]}, {"w": "model,", "b": [0.6551, 0.4824, 0.7085, 0.4973]}, {"w": "you", "b": [0.7147, 0.4824, 0.7432, 0.4973]}, {"w": "can", "b": [0.7494, 0.4824, 0.7768, 0.4973]}, {"w": "only", "b": [0.783, 0.4824, 0.8171, 0.4973]}, {"w": "tweak", "b": [0.8232, 0.4824, 0.8695, 0.4973]}, {"w": "some", "b": [0.1312, 0.5003, 0.1721, 0.5153]}, {"w": "built-in", "b": [0.1784, 0.5003, 0.2391, 0.5153]}, {"w": "hyperparameters.", "b": [0.2454, 0.5003, 0.3885, 0.5153]}, {"w": "You", "b": [0.3972, 0.5003, 0.4297, 0.5153]}, {"w": "don’t", "b": [0.436, 0.5003, 0.4789, 0.5153]}, {"w": "have", "b": [0.4852, 0.5003, 0.5223, 0.5153]}, {"w": "much", "b": [0.5287, 0.5003, 0.5726, 0.5153]}, {"w": "control", "b": [0.5789, 0.5003, 0.636, 0.5153]}, {"w": "over", "b": [0.6423, 0.5003, 0.6764, 0.5153]}, {"w": "the", "b": [0.6827, 0.5003, 0.7089, 0.5153]}, {"w": "model", "b": [0.7152, 0.5003, 0.7648, 0.5153]}, {"w": "architecture", "b": [0.7712, 0.5003, 0.8691, 0.5153]}, {"w": "and", "b": [0.1312, 0.5182, 0.1604, 0.5332]}, {"w": "complexity.", "b": [0.166, 0.5182, 0.2554, 0.5332]}, {"w": "With", "b": [0.2634, 0.5182, 0.3041, 0.5332]}, {"w": "neural", "b": [0.3097, 0.5182, 0.359, 0.5332]}, {"w": "networks,", "b": [0.3646, 0.5182, 0.4396, 0.5332]}, {"w": "you", "b": [0.4453, 0.5182, 0.4735, 0.5332]}, {"w": "have", "b": [0.4791, 0.5182, 0.5147, 0.5332]}, {"w": "all", "b": [0.5203, 0.5182, 0.5394, 0.5332]}, {"w": "the", "b": [0.5451, 0.5182, 0.5702, 0.5332]}, {"w": "control,", "b": [0.5758, 0.5182, 0.6356, 0.5332]}, {"w": "and", "b": [0.6414, 0.5182, 0.6705, 0.5332]}, {"w": "training", "b": [0.6761, 0.5182, 0.7385, 0.5332]}, {"w": "a", "b": [0.7441, 0.5182, 0.7531, 0.5332]}, {"w": "model", "b": [0.7587, 0.5182, 0.8065, 0.5332]}, {"w": "is", "b": [0.8121, 0.5182, 0.8242, 0.5332]}, {"w": "more", "b": [0.8298, 0.5182, 0.8691, 0.5332]}, {"w": "a", "b": [0.1312, 0.5362, 0.1406, 0.5511]}, {"w": "process", "b": [0.1475, 0.5362, 0.2069, 0.5511]}, {"w": "than", "b": [0.2138, 0.5362, 0.2515, 0.5511]}, {"w": "a", "b": [0.2584, 0.5362, 0.2678, 0.5511]}, {"w": "single", "b": [0.2747, 0.5362, 0.3208, 0.5511]}, {"w": "action.", "b": [0.3278, 0.5362, 0.3832, 0.5511]}, {"w": "To", "b": [0.3937, 0.5362, 0.4151, 0.5511]}, {"w": "build", "b": [0.422, 0.5362, 0.4639, 0.5511]}, {"w": "a", "b": [0.4708, 0.5362, 0.4802, 0.5511]}, {"w": "deep", "b": [0.4871, 0.5362, 0.5248, 0.5511]}, {"w": "model,", "b": [0.5317, 0.5362, 0.5866, 0.5511]}, {"w": "you", "b": [0.5937, 0.5362, 0.623, 0.5511]}, {"w": "start", "b": [0.6299, 0.5362, 0.6687, 0.5511]}, {"w": "with", "b": [0.6756, 0.5362, 0.7122, 0.5511]}, {"w": "a", "b": [0.7191, 0.5362, 0.7285, 0.5511]}, {"w": "reasonably-sized", "b": [0.7354, 0.5362, 0.8691, 0.5511]}, {"w": "model,", "b": [0.1312, 0.5541, 0.1851, 0.5691]}, {"w": "and", "b": [0.1912, 0.5541, 0.221, 0.5691]}, {"w": "then", "b": [0.2271, 0.5541, 0.263, 0.5691]}, {"w": "you", "b": [0.2691, 0.5541, 0.2979, 0.5691]}, {"w": "follow", "b": [0.304, 0.5541, 0.3512, 0.5691]}, {"w": "the", "b": [0.3573, 0.5541, 0.383, 0.5691]}, {"w": "flowchart", "b": [0.3891, 0.5541, 0.4625, 0.5691]}, {"w": "shown", "b": [0.4686, 0.5541, 0.5185, 0.5691]}, {"w": "in", "b": [0.5246, 0.5541, 0.54, 0.5691]}, {"w": "Figure", "b": [0.5461, 0.5541, 0.5982, 0.5691]}, {"w": "3.", "b": [0.6044, 0.5541, 0.6187, 0.5691]}]}, {"id": "b_3", "type": "paragraph", "text": "Observe that you start with some model, and then increase its size until it fits the training data well. Then you evaluate the model on the validation data. If it performs well, according to the performance metric, you stop and return the model. Otherwise, you regularize and retrain the model.", "words": [{"w": "Observe", "b": [0.1312, 0.5811, 0.1963, 0.596]}, {"w": "that", "b": [0.2024, 0.5811, 0.2364, 0.596]}, {"w": "you", "b": [0.2426, 0.5811, 0.2714, 0.596]}, {"w": "start", "b": [0.2775, 0.5811, 0.3158, 0.596]}, {"w": "with", "b": [0.322, 0.5811, 0.358, 0.596]}, {"w": "some", "b": [0.3641, 0.5811, 0.4044, 0.596]}, {"w": "model,", "b": [0.4106, 0.5811, 0.4646, 0.596]}, {"w": "and", "b": [0.4708, 0.5811, 0.5006, 0.596]}, {"w": "then", "b": [0.5068, 0.5811, 0.5428, 0.596]}, {"w": "increase", "b": [0.549, 0.5811, 0.613, 0.596]}, {"w": "its", "b": [0.6192, 0.5811, 0.6388, 0.596]}, {"w": "size", "b": [0.645, 0.5811, 0.6739, 0.596]}, {"w": "until", "b": [0.6801, 0.5811, 0.7177, 0.596]}, {"w": "it", "b": [0.7238, 0.5811, 0.7362, 0.596]}, {"w": "fits", "b": [0.7424, 0.5811, 0.7672, 0.596]}, {"w": "the", "b": [0.7733, 0.5811, 0.7991, 0.596]}, {"w": "training", "b": [0.8053, 0.5811, 0.8691, 0.596]}, {"w": "data", "b": [0.1312, 0.599, 0.1664, 0.614]}, {"w": "well.", "b": [0.1723, 0.599, 0.208, 0.614]}, {"w": "Then", "b": [0.2161, 0.599, 0.2573, 0.614]}, {"w": "you", "b": [0.2632, 0.599, 0.2913, 0.614]}, {"w": "evaluate", "b": [0.2972, 0.599, 0.362, 0.614]}, {"w": "the", "b": [0.3679, 0.599, 0.393, 0.614]}, {"w": "model", "b": [0.3989, 0.599, 0.4467, 0.614]}, {"w": "on", "b": [0.4526, 0.599, 0.4717, 0.614]}, {"w": "the", "b": [0.4776, 0.599, 0.5027, 0.614]}, {"w": "validation", "b": [0.5086, 0.599, 0.5864, 0.614]}, {"w": "data.", "b": [0.5924, 0.599, 0.6325, 0.614]}, {"w": "If", "b": [0.6406, 0.599, 0.6527, 0.614]}, {"w": "it", "b": [0.6586, 0.599, 0.6707, 0.614]}, {"w": "performs", "b": [0.6766, 0.599, 0.7461, 0.614]}, {"w": "well,", "b": [0.752, 0.599, 0.7877, 0.614]}, {"w": "according", "b": [0.7936, 0.599, 0.8691, 0.614]}, {"w": "to", "b": [0.1312, 0.617, 0.148, 0.6319]}, {"w": "the", "b": [0.1541, 0.617, 0.1803, 0.6319]}, {"w": "performance", "b": [0.1864, 0.617, 0.288, 0.6319]}, {"w": "metric,", "b": [0.2941, 0.617, 0.3517, 0.6319]}, {"w": "you", "b": [0.3578, 0.617, 0.3871, 0.6319]}, {"w": "stop", "b": [0.3933, 0.617, 0.4279, 0.6319]}, {"w": "and", "b": [0.434, 0.617, 0.4644, 0.6319]}, {"w": "return", "b": [0.4705, 0.617, 0.5219, 0.6319]}, {"w": "the", "b": [0.528, 0.617, 0.5542, 0.6319]}, {"w": "model.", "b": [0.5603, 0.617, 0.6152, 0.6319]}, {"w": "Otherwise,", "b": [0.6234, 0.617, 0.7115, 0.6319]}, {"w": "you", "b": [0.7176, 0.617, 0.7469, 0.6319]}, {"w": "regularize", "b": [0.753, 0.617, 0.8326, 0.6319]}, {"w": "and", "b": [0.8388, 0.617, 0.8691, 0.6319]}, {"w": "retrain", "b": [0.1312, 0.6349, 0.1857, 0.6499]}, {"w": "the", "b": [0.1918, 0.6349, 0.2175, 0.6499]}, {"w": "model.", "b": [0.2236, 0.6349, 0.2775, 0.6499]}]}, {"id": "b_4", "type": "paragraph", "text": "As we have seen, regularization in neural networks is usually achieved in several ways. The most effective is dropout, where you randomly remove some units from the network and make it simpler and “dumber.” A simpler model would work better on the holdout data, and this is your goal.", "words": [{"w": "As", "b": [0.1305, 0.6618, 0.1517, 0.6768]}, {"w": "we", "b": [0.1579, 0.6618, 0.1789, 0.6768]}, {"w": "have", "b": [0.1851, 0.6618, 0.2216, 0.6768]}, {"w": "seen,", "b": [0.2277, 0.6618, 0.2669, 0.6768]}, {"w": "regularization", "b": [0.2731, 0.6618, 0.3843, 0.6768]}, {"w": "in", "b": [0.3904, 0.6618, 0.4059, 0.6768]}, {"w": "neural", "b": [0.412, 0.6618, 0.4625, 0.6768]}, {"w": "networks", "b": [0.4686, 0.6618, 0.5402, 0.6768]}, {"w": "is", "b": [0.5464, 0.6618, 0.5588, 0.6768]}, {"w": "usually", "b": [0.565, 0.6618, 0.6222, 0.6768]}, {"w": "achieved", "b": [0.6283, 0.6618, 0.6967, 0.6768]}, {"w": "in", "b": [0.7029, 0.6618, 0.7183, 0.6768]}, {"w": "several", "b": [0.7244, 0.6618, 0.7791, 0.6768]}, {"w": "ways.", "b": [0.7853, 0.6618, 0.8291, 0.6768]}, {"w": "The", "b": [0.8373, 0.6618, 0.8691, 0.6768]}, {"w": "most", "b": [0.1312, 0.6798, 0.1711, 0.6947]}, {"w": "effective", "b": [0.1775, 0.6798, 0.244, 0.6947]}, {"w": "is", "b": [0.2504, 0.6798, 0.2631, 0.6947]}, {"w": "dropout,", "b": [0.2695, 0.6798, 0.3489, 0.695]}, {"w": "where", "b": [0.3554, 0.6798, 0.4036, 0.6947]}, {"w": "you", "b": [0.41, 0.6798, 0.4393, 0.6947]}, {"w": "randomly", "b": [0.4458, 0.6798, 0.5237, 0.6947]}, {"w": "remove", "b": [0.5302, 0.6798, 0.5883, 0.6947]}, {"w": "some", "b": [0.5948, 0.6798, 0.6357, 0.6947]}, {"w": "units", "b": [0.6421, 0.6798, 0.683, 0.6947]}, {"w": "from", "b": [0.6895, 0.6798, 0.7277, 0.6947]}, {"w": "the", "b": [0.7341, 0.6798, 0.7603, 0.6947]}, {"w": "network", "b": [0.7667, 0.6798, 0.8322, 0.6947]}, {"w": "and", "b": [0.8386, 0.6798, 0.869, 0.6947]}, {"w": "make", "b": [0.1312, 0.6977, 0.1724, 0.7127]}, {"w": "it", "b": [0.1785, 0.6977, 0.1905, 0.7127]}, {"w": "simpler", "b": [0.1966, 0.6977, 0.254, 0.7127]}, {"w": "and", "b": [0.26, 0.6977, 0.2892, 0.7127]}, {"w": "“dumber.”", "b": [0.2952, 0.6977, 0.3751, 0.7127]}, {"w": "A", "b": [0.3833, 0.6977, 0.3968, 0.7127]}, {"w": "simpler", "b": [0.4029, 0.6977, 0.4603, 0.7127]}, {"w": "model", "b": [0.4664, 0.6977, 0.5141, 0.7127]}, {"w": "would", "b": [0.5201, 0.6977, 0.5668, 0.7127]}, {"w": "work", "b": [0.5729, 0.6977, 0.6111, 0.7127]}, {"w": "better", "b": [0.6171, 0.6977, 0.6649, 0.7127]}, {"w": "on", "b": [0.671, 0.6977, 0.6901, 0.7127]}, {"w": "the", "b": [0.6961, 0.6977, 0.7213, 0.7127]}, {"w": "holdout", "b": [0.7273, 0.6977, 0.7876, 0.7127]}, {"w": "data,", "b": [0.7936, 0.6977, 0.8338, 0.7127]}, {"w": "and", "b": [0.8399, 0.6977, 0.869, 0.7127]}, {"w": "this", "b": [0.1312, 0.7157, 0.1611, 0.7306]}, {"w": "is", "b": [0.1672, 0.7157, 0.1796, 0.7306]}, {"w": "your", "b": [0.1858, 0.7157, 0.2217, 0.7306]}, {"w": "goal.", "b": [0.2279, 0.7157, 0.2658, 0.7306]}]}, {"id": "b_5", "type": "paragraph", "text": "Suppose, after several loops of regularization and model retrains, you don’t see any improve- ment in the model performance on the validation data. Check if it still fits the training data. If it doesn’t, increase the size of the model, by increasing the size of individual layers, or by adding another layer. Continue until the model fits the training data again. Then evaluate it again on the validation data. The process continues until a larger model doesn’t result in better validation data performance, no matter your actions. Then you stop and return the model, if validation data performance is satisfactory.", "words": [{"w": "Suppose,", "b": [0.1312, 0.7426, 0.2017, 0.7575]}, {"w": "after", "b": [0.2079, 0.7426, 0.2449, 0.7575]}, {"w": "several", "b": [0.251, 0.7426, 0.3048, 0.7575]}, {"w": "loops", "b": [0.311, 0.7426, 0.3521, 0.7575]}, {"w": "of", "b": [0.3583, 0.7426, 0.3729, 0.7575]}, {"w": "regularization", "b": [0.3791, 0.7426, 0.4885, 0.7575]}, {"w": "and", "b": [0.4947, 0.7426, 0.524, 0.7575]}, {"w": "model", "b": [0.5302, 0.7426, 0.5783, 0.7575]}, {"w": "retrains,", "b": [0.5845, 0.7426, 0.6505, 0.7575]}, {"w": "you", "b": [0.6566, 0.7426, 0.685, 0.7575]}, {"w": "don’t", "b": [0.6911, 0.7426, 0.7326, 0.7575]}, {"w": "see", "b": [0.7388, 0.7426, 0.7622, 0.7575]}, {"w": "any", "b": [0.7684, 0.7426, 0.7967, 0.7575]}, {"w": "improve-", "b": [0.8029, 0.7426, 0.8722, 0.7575]}, {"w": "ment", "b": [0.1312, 0.7605, 0.171, 0.7755]}, {"w": "in", "b": [0.1772, 0.7605, 0.1923, 0.7755]}, {"w": "the", "b": [0.1984, 0.7605, 0.2236, 0.7755]}, {"w": "model", "b": [0.2298, 0.7605, 0.2776, 0.7755]}, {"w": "performance", "b": [0.2838, 0.7605, 0.3816, 0.7755]}, {"w": "on", "b": [0.3877, 0.7605, 0.4068, 0.7755]}, {"w": "the", "b": [0.413, 0.7605, 0.4382, 0.7755]}, {"w": "validation", "b": [0.4444, 0.7605, 0.5224, 0.7755]}, {"w": "data.", "b": [0.5285, 0.7605, 0.5688, 0.7755]}, {"w": "Check", "b": [0.577, 0.7605, 0.6254, 0.7755]}, {"w": "if", "b": [0.6315, 0.7605, 0.6421, 0.7755]}, {"w": "it", "b": [0.6483, 0.7605, 0.6603, 0.7755]}, {"w": "still", "b": [0.6665, 0.7605, 0.6958, 0.7755]}, {"w": "fits", "b": [0.702, 0.7605, 0.7263, 0.7755]}, {"w": "the", "b": [0.7324, 0.7605, 0.7576, 0.7755]}, {"w": "training", "b": [0.7637, 0.7605, 0.8262, 0.7755]}, {"w": "data.", "b": [0.8324, 0.7605, 0.8727, 0.7755]}, {"w": "If", "b": [0.1312, 0.7785, 0.1435, 0.7934]}, {"w": "it", "b": [0.1496, 0.7785, 0.1619, 0.7934]}, {"w": "doesn’t,", "b": [0.168, 0.7785, 0.231, 0.7934]}, {"w": "increase", "b": [0.2371, 0.7785, 0.3006, 0.7934]}, {"w": "the", "b": [0.3068, 0.7785, 0.3323, 0.7934]}, {"w": "size", "b": [0.3384, 0.7785, 0.3672, 0.7934]}, {"w": "of", "b": [0.3733, 0.7785, 0.3881, 0.7934]}, {"w": "the", "b": [0.3943, 0.7785, 0.4198, 0.7934]}, {"w": "model,", "b": [0.4259, 0.7785, 0.4796, 0.7934]}, {"w": "by", "b": [0.4857, 0.7785, 0.5051, 0.7934]}, {"w": "increasing", "b": [0.5113, 0.7785, 0.5911, 0.7934]}, {"w": "the", "b": [0.5972, 0.7785, 0.6228, 0.7934]}, {"w": "size", "b": [0.6289, 0.7785, 0.6576, 0.7934]}, {"w": "of", "b": [0.6638, 0.7785, 0.6786, 0.7934]}, {"w": "individual", "b": [0.6847, 0.7785, 0.7649, 0.7934]}, {"w": "layers,", "b": [0.7711, 0.7785, 0.8218, 0.7934]}, {"w": "or", "b": [0.8279, 0.7785, 0.8443, 0.7934]}, {"w": "by", "b": [0.8505, 0.7785, 0.8699, 0.7934]}, {"w": "adding", "b": [0.1312, 0.7964, 0.1845, 0.8114]}, {"w": "another", "b": [0.1906, 0.7964, 0.2509, 0.8114]}, {"w": "layer.", "b": [0.2569, 0.7964, 0.2997, 0.8114]}, {"w": "Continue", "b": [0.3079, 0.7964, 0.3792, 0.8114]}, {"w": "until", "b": [0.3852, 0.7964, 0.4219, 0.8114]}, {"w": "the", "b": [0.428, 0.7964, 0.4531, 0.8114]}, {"w": "model", "b": [0.4592, 0.7964, 0.5069, 0.8114]}, {"w": "fits", "b": [0.5129, 0.7964, 0.5372, 0.8114]}, {"w": "the", "b": [0.5432, 0.7964, 0.5683, 0.8114]}, {"w": "training", "b": [0.5744, 0.7964, 0.6368, 0.8114]}, {"w": "data", "b": [0.6428, 0.7964, 0.678, 0.8114]}, {"w": "again.", "b": [0.684, 0.7964, 0.7312, 0.8114]}, {"w": "Then", "b": [0.7394, 0.7964, 0.7806, 0.8114]}, {"w": "evaluate", "b": [0.7867, 0.7964, 0.8515, 0.8114]}, {"w": "it", "b": [0.8575, 0.7964, 0.8696, 0.8114]}, {"w": "again", "b": [0.1312, 0.8144, 0.1752, 0.8293]}, {"w": "on", "b": [0.1815, 0.8144, 0.2014, 0.8293]}, {"w": "the", "b": [0.2077, 0.8144, 0.2339, 0.8293]}, {"w": "validation", "b": [0.2402, 0.8144, 0.3213, 0.8293]}, {"w": "data.", "b": [0.3276, 0.8144, 0.3695, 0.8293]}, {"w": "The", "b": [0.3782, 0.8144, 0.4106, 0.8293]}, {"w": "process", "b": [0.417, 0.8144, 0.4764, 0.8293]}, {"w": "continues", "b": [0.4827, 0.8144, 0.5592, 0.8293]}, {"w": "until", "b": [0.5655, 0.8144, 0.6037, 0.8293]}, {"w": "a", "b": [0.6101, 0.8144, 0.6195, 0.8293]}, {"w": "larger", "b": [0.6258, 0.8144, 0.673, 0.8293]}, {"w": "model", "b": [0.6794, 0.8144, 0.729, 0.8293]}, {"w": "doesn’t", "b": [0.7354, 0.8144, 0.7946, 0.8293]}, {"w": "result", "b": [0.8009, 0.8144, 0.8471, 0.8293]}, {"w": "in", "b": [0.8534, 0.8144, 0.8691, 0.8293]}, {"w": "better", "b": [0.1312, 0.8323, 0.1804, 0.8473]}, {"w": "validation", "b": [0.1865, 0.8323, 0.2667, 0.8473]}, {"w": "data", "b": [0.2728, 0.8323, 0.309, 0.8473]}, {"w": "performance,", "b": [0.3151, 0.8323, 0.4206, 0.8473]}, {"w": "no", "b": [0.4268, 0.8323, 0.4464, 0.8473]}, {"w": "matter", "b": [0.4526, 0.8323, 0.5074, 0.8473]}, {"w": "your", "b": [0.5135, 0.8323, 0.5498, 0.8473]}, {"w": "actions.", "b": [0.5559, 0.8323, 0.618, 0.8473]}, {"w": "Then", "b": [0.6262, 0.8323, 0.6686, 0.8473]}, {"w": "you", "b": [0.6748, 0.8323, 0.7037, 0.8473]}, {"w": "stop", "b": [0.7099, 0.8323, 0.7441, 0.8473]}, {"w": "and", "b": [0.7502, 0.8323, 0.7802, 0.8473]}, {"w": "return", "b": [0.7863, 0.8323, 0.8371, 0.8473]}, {"w": "the", "b": [0.8433, 0.8323, 0.8691, 0.8473]}, {"w": "model,", "b": [0.1312, 0.8503, 0.1851, 0.8652]}, {"w": "if", "b": [0.1912, 0.8503, 0.202, 0.8652]}, {"w": "validation", "b": [0.2081, 0.8503, 0.2876, 0.8652]}, {"w": "data", "b": [0.2938, 0.8503, 0.3296, 0.8652]}, {"w": "performance", "b": [0.3358, 0.8503, 0.4354, 0.8652]}, {"w": "is", "b": [0.4415, 0.8503, 0.4539, 0.8652]}, {"w": "satisfactory.", "b": [0.4601, 0.8503, 0.5562, 0.8652]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "14", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 190, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "If you are not satisfied with this performance, you can pick a different combination of hyperparameters for step 8, and build a different model. You will continue to test different values of hyperparameters until there are no more values to test. Then you keep the best model among those you trained in the process. If the performance of the best model is still not satisfactory, try a different network architecture, add more labeled data, or try transfer learning. We talk more on transfer learning in Section 6.1.10.", "words": [{"w": "If", "b": [0.1312, 0.0881, 0.1438, 0.1031]}, {"w": "you", "b": [0.1523, 0.0881, 0.1816, 0.1031]}, {"w": "are", "b": [0.19, 0.0881, 0.2152, 0.1031]}, {"w": "not", "b": [0.2236, 0.0881, 0.2508, 0.1031]}, {"w": "satisfied", "b": [0.2593, 0.0881, 0.3254, 0.1031]}, {"w": "with", "b": [0.3339, 0.0881, 0.3705, 0.1031]}, {"w": "this", "b": [0.3789, 0.0881, 0.4094, 0.1031]}, {"w": "performance,", "b": [0.4179, 0.0881, 0.5246, 0.1031]}, {"w": "you", "b": [0.5337, 0.0881, 0.563, 0.1031]}, {"w": "can", "b": [0.5714, 0.0881, 0.5997, 0.1031]}, {"w": "pick", "b": [0.6082, 0.0881, 0.6417, 0.1031]}, {"w": "a", "b": [0.6501, 0.0881, 0.6595, 0.1031]}, {"w": "different", "b": [0.668, 0.0881, 0.7361, 0.1031]}, {"w": "combination", "b": [0.7445, 0.0881, 0.8455, 0.1031]}, {"w": "of", "b": [0.8539, 0.0881, 0.8691, 0.1031]}, {"w": "hyperparameters", "b": [0.1312, 0.106, 0.2672, 0.121]}, {"w": "for", "b": [0.2733, 0.106, 0.2955, 0.121]}, {"w": "step", "b": [0.3017, 0.106, 0.3348, 0.121]}, {"w": "8,", "b": [0.3409, 0.106, 0.3553, 0.121]}, {"w": "and", "b": [0.3615, 0.106, 0.3914, 0.121]}, {"w": "build", "b": [0.3976, 0.106, 0.4388, 0.121]}, {"w": "a", "b": [0.445, 0.106, 0.4543, 0.121]}, {"w": "different", "b": [0.4604, 0.106, 0.5276, 0.121]}, {"w": "model.", "b": [0.5337, 0.106, 0.5879, 0.121]}, {"w": "You", "b": [0.5961, 0.106, 0.6281, 0.121]}, {"w": "will", "b": [0.6342, 0.106, 0.6631, 0.121]}, {"w": "continue", "b": [0.6693, 0.106, 0.7374, 0.121]}, {"w": "to", "b": [0.7435, 0.106, 0.76, 0.121]}, {"w": "test", "b": [0.7662, 0.106, 0.7962, 0.121]}, {"w": "different", "b": [0.8024, 0.106, 0.8695, 0.121]}, {"w": "values", "b": [0.1308, 0.124, 0.1806, 0.1389]}, {"w": "of", "b": [0.187, 0.124, 0.2022, 0.1389]}, {"w": "hyperparameters", "b": [0.2086, 0.124, 0.3464, 0.1389]}, {"w": "until", "b": [0.3528, 0.124, 0.391, 0.1389]}, {"w": "there", "b": [0.3974, 0.124, 0.4393, 0.1389]}, {"w": "are", "b": [0.4457, 0.124, 0.4709, 0.1389]}, {"w": "no", "b": [0.4773, 0.124, 0.4972, 0.1389]}, {"w": "more", "b": [0.5036, 0.124, 0.5444, 0.1389]}, {"w": "values", "b": [0.5509, 0.124, 0.6007, 0.1389]}, {"w": "to", "b": [0.6071, 0.124, 0.6238, 0.1389]}, {"w": "test.", "b": [0.6302, 0.124, 0.6659, 0.1389]}, {"w": "Then", "b": [0.6749, 0.124, 0.7178, 0.1389]}, {"w": "you", "b": [0.7242, 0.124, 0.7535, 0.1389]}, {"w": "keep", "b": [0.7599, 0.124, 0.7966, 0.1389]}, {"w": "the", "b": [0.803, 0.124, 0.8291, 0.1389]}, {"w": "best", "b": [0.8355, 0.124, 0.8697, 0.1389]}, {"w": "model", "b": [0.1312, 0.1419, 0.1799, 0.1569]}, {"w": "among", "b": [0.1861, 0.1419, 0.2394, 0.1569]}, {"w": "those", "b": [0.2456, 0.1419, 0.2877, 0.1569]}, {"w": "you", "b": [0.2939, 0.1419, 0.3226, 0.1569]}, {"w": "trained", "b": [0.3288, 0.1419, 0.3862, 0.1569]}, {"w": "in", "b": [0.3924, 0.1419, 0.4078, 0.1569]}, {"w": "the", "b": [0.4139, 0.1419, 0.4396, 0.1569]}, {"w": "process.", "b": [0.4458, 0.1419, 0.5091, 0.1569]}, {"w": "If", "b": [0.5174, 0.1419, 0.5297, 0.1569]}, {"w": "the", "b": [0.5358, 0.1419, 0.5615, 0.1569]}, {"w": "performance", "b": [0.5676, 0.1419, 0.6672, 0.1569]}, {"w": "of", "b": [0.6734, 0.1419, 0.6883, 0.1569]}, {"w": "the", "b": [0.6944, 0.1419, 0.7201, 0.1569]}, {"w": "best", "b": [0.7262, 0.1419, 0.7597, 0.1569]}, {"w": "model", "b": [0.7658, 0.1419, 0.8145, 0.1569]}, {"w": "is", "b": [0.8207, 0.1419, 0.8331, 0.1569]}, {"w": "still", "b": [0.8393, 0.1419, 0.8691, 0.1569]}, {"w": "not", "b": [0.1312, 0.1599, 0.1574, 0.1748]}, {"w": "satisfactory,", "b": [0.1636, 0.1599, 0.2579, 0.1748]}, {"w": "try", "b": [0.264, 0.1599, 0.2877, 0.1748]}, {"w": "a", "b": [0.2939, 0.1599, 0.3029, 0.1748]}, {"w": "different", "b": [0.3091, 0.1599, 0.3745, 0.1748]}, {"w": "network", "b": [0.3807, 0.1599, 0.4436, 0.1748]}, {"w": "architecture,", "b": [0.4498, 0.1599, 0.549, 0.1748]}, {"w": "add", "b": [0.5551, 0.1599, 0.5843, 0.1748]}, {"w": "more", "b": [0.5905, 0.1599, 0.6297, 0.1748]}, {"w": "labeled", "b": [0.6359, 0.1599, 0.6918, 0.1748]}, {"w": "data,", "b": [0.6979, 0.1599, 0.7382, 0.1748]}, {"w": "or", "b": [0.7443, 0.1599, 0.7605, 0.1748]}, {"w": "try", "b": [0.7667, 0.1599, 0.7904, 0.1748]}, {"w": "transfer", "b": [0.7964, 0.1602, 0.8688, 0.1751]}, {"w": "learning.", "b": [0.1312, 0.1778, 0.2113, 0.1931]}, {"w": "We", "b": [0.2195, 0.1778, 0.2451, 0.1928]}, {"w": "talk", "b": [0.2513, 0.1778, 0.2826, 0.1928]}, {"w": "more", "b": [0.2887, 0.1778, 0.3288, 0.1928]}, {"w": "on", "b": [0.3349, 0.1778, 0.3544, 0.1928]}, {"w": "transfer", "b": [0.3605, 0.1778, 0.4228, 0.1928]}, {"w": "learning", "b": [0.4289, 0.1778, 0.4936, 0.1928]}, {"w": "in", "b": [0.4997, 0.1778, 0.5151, 0.1928]}, {"w": "Section", "b": [0.5213, 0.1778, 0.5798, 0.1928]}, {"w": "6.1.10.", "b": [0.5859, 0.1778, 0.6382, 0.1928]}]}, {"id": "b_1", "type": "paragraph", "text": "The properties of a trained neural network depend a lot on the choice of the values of hyperparameters. But before you choose specific values of hyperparameters, train a model, and validate its properties on the validation data, you must decide which hyperparameters are important enough for you to spend the time on.", "words": [{"w": "The", "b": [0.1306, 0.2048, 0.163, 0.2197]}, {"w": "properties", "b": [0.1712, 0.2048, 0.2535, 0.2197]}, {"w": "of", "b": [0.2617, 0.2048, 0.2769, 0.2197]}, {"w": "a", "b": [0.2851, 0.2048, 0.2945, 0.2197]}, {"w": "trained", "b": [0.3027, 0.2048, 0.3614, 0.2197]}, {"w": "neural", "b": [0.3696, 0.2048, 0.4209, 0.2197]}, {"w": "network", "b": [0.4291, 0.2048, 0.4945, 0.2197]}, {"w": "depend", "b": [0.5027, 0.2048, 0.5618, 0.2197]}, {"w": "a", "b": [0.57, 0.2048, 0.5795, 0.2197]}, {"w": "lot", "b": [0.5877, 0.2048, 0.6096, 0.2197]}, {"w": "on", "b": [0.6178, 0.2048, 0.6377, 0.2197]}, {"w": "the", "b": [0.6459, 0.2048, 0.6721, 0.2197]}, {"w": "choice", "b": [0.6803, 0.2048, 0.73, 0.2197]}, {"w": "of", "b": [0.7382, 0.2048, 0.7534, 0.2197]}, {"w": "the", "b": [0.7616, 0.2048, 0.7877, 0.2197]}, {"w": "values", "b": [0.7959, 0.2048, 0.8458, 0.2197]}, {"w": "of", "b": [0.854, 0.2048, 0.8691, 0.2197]}, {"w": "hyperparameters.", "b": [0.1312, 0.2227, 0.2726, 0.2377]}, {"w": "But", "b": [0.2808, 0.2227, 0.3116, 0.2377]}, {"w": "before", "b": [0.3178, 0.2227, 0.3674, 0.2377]}, {"w": "you", "b": [0.3736, 0.2227, 0.4025, 0.2377]}, {"w": "choose", "b": [0.4087, 0.2227, 0.4616, 0.2377]}, {"w": "specific", "b": [0.4677, 0.2227, 0.5262, 0.2377]}, {"w": "values", "b": [0.5324, 0.2227, 0.5816, 0.2377]}, {"w": "of", "b": [0.5878, 0.2227, 0.6028, 0.2377]}, {"w": "hyperparameters,", "b": [0.6089, 0.2227, 0.7503, 0.2377]}, {"w": "train", "b": [0.7565, 0.2227, 0.7958, 0.2377]}, {"w": "a", "b": [0.802, 0.2227, 0.8113, 0.2377]}, {"w": "model,", "b": [0.8175, 0.2227, 0.8717, 0.2377]}, {"w": "and", "b": [0.1312, 0.2406, 0.1612, 0.2556]}, {"w": "validate", "b": [0.1673, 0.2406, 0.2309, 0.2556]}, {"w": "its", "b": [0.237, 0.2406, 0.2568, 0.2556]}, {"w": "properties", "b": [0.2629, 0.2406, 0.3443, 0.2556]}, {"w": "on", "b": [0.3504, 0.2406, 0.3701, 0.2556]}, {"w": "the", "b": [0.3762, 0.2406, 0.402, 0.2556]}, {"w": "validation", "b": [0.4082, 0.2406, 0.4883, 0.2556]}, {"w": "data,", "b": [0.4944, 0.2406, 0.5357, 0.2556]}, {"w": "you", "b": [0.5419, 0.2406, 0.5708, 0.2556]}, {"w": "must", "b": [0.5769, 0.2406, 0.6168, 0.2556]}, {"w": "decide", "b": [0.623, 0.2406, 0.6736, 0.2556]}, {"w": "which", "b": [0.6798, 0.2406, 0.7268, 0.2556]}, {"w": "hyperparameters", "b": [0.7329, 0.2406, 0.8691, 0.2556]}, {"w": "are", "b": [0.1312, 0.2586, 0.1559, 0.2735]}, {"w": "important", "b": [0.162, 0.2586, 0.2431, 0.2735]}, {"w": "enough", "b": [0.2492, 0.2586, 0.3067, 0.2735]}, {"w": "for", "b": [0.3128, 0.2586, 0.3349, 0.2735]}, {"w": "you", "b": [0.3411, 0.2586, 0.3698, 0.2735]}, {"w": "to", "b": [0.3759, 0.2586, 0.3923, 0.2735]}, {"w": "spend", "b": [0.3985, 0.2586, 0.4453, 0.2735]}, {"w": "the", "b": [0.4514, 0.2586, 0.4771, 0.2735]}, {"w": "time", "b": [0.4832, 0.2586, 0.5191, 0.2735]}, {"w": "on.", "b": [0.5252, 0.2586, 0.5498, 0.2735]}]}, {"id": "b_2", "type": "paragraph", "text": "Obviously, if you had infinite time and computing resources, you would tune all hyperpa- rameters. However, in practice, you have finite time and, often, relatively modest resources. Which hyperparameters to tune?", "words": [{"w": "Obviously,", "b": [0.1312, 0.2855, 0.2172, 0.3005]}, {"w": "if", "b": [0.2239, 0.2855, 0.2349, 0.3005]}, {"w": "you", "b": [0.2415, 0.2855, 0.2708, 0.3005]}, {"w": "had", "b": [0.2774, 0.2855, 0.3077, 0.3005]}, {"w": "infinite", "b": [0.3143, 0.2855, 0.3719, 0.3005]}, {"w": "time", "b": [0.3785, 0.2855, 0.4151, 0.3005]}, {"w": "and", "b": [0.4217, 0.2855, 0.452, 0.3005]}, {"w": "computing", "b": [0.4586, 0.2855, 0.5454, 0.3005]}, {"w": "resources,", "b": [0.552, 0.2855, 0.6319, 0.3005]}, {"w": "you", "b": [0.6386, 0.2855, 0.6679, 0.3005]}, {"w": "would", "b": [0.6745, 0.2855, 0.7231, 0.3005]}, {"w": "tune", "b": [0.7297, 0.2855, 0.7664, 0.3005]}, {"w": "all", "b": [0.773, 0.2855, 0.7928, 0.3005]}, {"w": "hyperpa-", "b": [0.7995, 0.2855, 0.8722, 0.3005]}, {"w": "rameters.", "b": [0.1312, 0.3035, 0.2063, 0.3184]}, {"w": "However,", "b": [0.2145, 0.3035, 0.2878, 0.3184]}, {"w": "in", "b": [0.294, 0.3035, 0.3094, 0.3184]}, {"w": "practice,", "b": [0.3155, 0.3035, 0.3843, 0.3184]}, {"w": "you", "b": [0.3904, 0.3035, 0.4191, 0.3184]}, {"w": "have", "b": [0.4253, 0.3035, 0.4617, 0.3184]}, {"w": "finite", "b": [0.4678, 0.3035, 0.5088, 0.3184]}, {"w": "time", "b": [0.515, 0.3035, 0.5508, 0.3184]}, {"w": "and,", "b": [0.557, 0.3035, 0.5918, 0.3184]}, {"w": "often,", "b": [0.598, 0.3035, 0.6436, 0.3184]}, {"w": "relatively", "b": [0.6497, 0.3035, 0.7242, 0.3184]}, {"w": "modest", "b": [0.7303, 0.3035, 0.7883, 0.3184]}, {"w": "resources.", "b": [0.7944, 0.3035, 0.8727, 0.3184]}, {"w": "Which", "b": [0.1303, 0.3214, 0.1826, 0.3364]}, {"w": "hyperparameters", "b": [0.1887, 0.3214, 0.3239, 0.3364]}, {"w": "to", "b": [0.33, 0.3214, 0.3464, 0.3364]}, {"w": "tune?", "b": [0.3526, 0.3214, 0.3972, 0.3364]}]}, {"id": "b_3", "type": "paragraph", "text": "While there is no definitive answer to that question, there are several observations that might", "words": [{"w": "While", "b": [0.1303, 0.3483, 0.177, 0.3633]}, {"w": "there", "b": [0.1828, 0.3483, 0.223, 0.3633]}, {"w": "is", "b": [0.2288, 0.3483, 0.241, 0.3633]}, {"w": "no", "b": [0.2467, 0.3483, 0.2658, 0.3633]}, {"w": "definitive", "b": [0.2716, 0.3483, 0.3439, 0.3633]}, {"w": "answer", "b": [0.3497, 0.3483, 0.4036, 0.3633]}, {"w": "to", "b": [0.4094, 0.3483, 0.4255, 0.3633]}, {"w": "that", "b": [0.4312, 0.3483, 0.4644, 0.3633]}, {"w": "question,", "b": [0.4701, 0.3483, 0.5411, 0.3633]}, {"w": "there", "b": [0.5469, 0.3483, 0.5872, 0.3633]}, {"w": "are", "b": [0.5929, 0.3483, 0.6171, 0.3633]}, {"w": "several", "b": [0.6229, 0.3483, 0.6763, 0.3633]}, {"w": "observations", "b": [0.682, 0.3483, 0.7793, 0.3633]}, {"w": "that", "b": [0.785, 0.3483, 0.8182, 0.3633]}, {"w": "might", "b": [0.8239, 0.3483, 0.8696, 0.3633]}]}, {"id": "b_4", "type": "paragraph", "text": "help you in choosing the hyperparameters to tune when you work on a specific model:", "words": [{"w": "help", "b": [0.1312, 0.3663, 0.1651, 0.3812]}, {"w": "you", "b": [0.1712, 0.3663, 0.1999, 0.3812]}, {"w": "in", "b": [0.2061, 0.3663, 0.2215, 0.3812]}, {"w": "choosing", "b": [0.2276, 0.3663, 0.2964, 0.3812]}, {"w": "the", "b": [0.3026, 0.3663, 0.3282, 0.3812]}, {"w": "hyperparameters", "b": [0.3344, 0.3663, 0.4695, 0.3812]}, {"w": "to", "b": [0.4756, 0.3663, 0.492, 0.3812]}, {"w": "tune", "b": [0.4982, 0.3663, 0.5341, 0.3812]}, {"w": "when", "b": [0.5403, 0.3663, 0.5823, 0.3812]}, {"w": "you", "b": [0.5884, 0.3663, 0.6171, 0.3812]}, {"w": "work", "b": [0.6233, 0.3663, 0.6623, 0.3812]}, {"w": "on", "b": [0.6685, 0.3663, 0.6879, 0.3812]}, {"w": "a", "b": [0.6941, 0.3663, 0.7033, 0.3812]}, {"w": "specific", "b": [0.7095, 0.3663, 0.7675, 0.3812]}, {"w": "model:", "b": [0.7737, 0.3663, 0.8275, 0.3812]}]}, {"id": "b_5", "type": "paragraph", "text": "• your model is more sensitive to some hyperparameters than to others; and • the choice is often between using the default value of a hyperparameter or changing it.", "words": [{"w": "•", "b": [0.1538, 0.3932, 0.1681, 0.4082]}, {"w": "your", "b": [0.1774, 0.3932, 0.2133, 0.4082]}, {"w": "model", "b": [0.2194, 0.3932, 0.2681, 0.4082]}, {"w": "is", "b": [0.2743, 0.3932, 0.2867, 0.4082]}, {"w": "more", "b": [0.2929, 0.3932, 0.3329, 0.4082]}, {"w": "sensitive", "b": [0.339, 0.3932, 0.407, 0.4082]}, {"w": "to", "b": [0.4131, 0.3932, 0.4295, 0.4082]}, {"w": "some", "b": [0.4357, 0.3932, 0.4758, 0.4082]}, {"w": "hyperparameters", "b": [0.4819, 0.3932, 0.617, 0.4082]}, {"w": "than", "b": [0.6232, 0.3932, 0.6601, 0.4082]}, {"w": "to", "b": [0.6662, 0.3932, 0.6826, 0.4082]}, {"w": "others;", "b": [0.6888, 0.3932, 0.7433, 0.4082]}, {"w": "and", "b": [0.7494, 0.3932, 0.7792, 0.4082]}, {"w": "•", "b": [0.1538, 0.4111, 0.1681, 0.4261]}, {"w": "the", "b": [0.1774, 0.4111, 0.2028, 0.4261]}, {"w": "choice", "b": [0.2089, 0.4111, 0.2572, 0.4261]}, {"w": "is", "b": [0.2633, 0.4111, 0.2756, 0.4261]}, {"w": "often", "b": [0.2818, 0.4111, 0.322, 0.4261]}, {"w": "between", "b": [0.3281, 0.4111, 0.3926, 0.4261]}, {"w": "using", "b": [0.3988, 0.4111, 0.4406, 0.4261]}, {"w": "the", "b": [0.4467, 0.4111, 0.4721, 0.4261]}, {"w": "default", "b": [0.4783, 0.4111, 0.5337, 0.4261]}, {"w": "value", "b": [0.5398, 0.4111, 0.581, 0.4261]}, {"w": "of", "b": [0.5871, 0.4111, 0.6019, 0.4261]}, {"w": "a", "b": [0.608, 0.4111, 0.6171, 0.4261]}, {"w": "hyperparameter", "b": [0.6233, 0.4111, 0.75, 0.4261]}, {"w": "or", "b": [0.7561, 0.4111, 0.7724, 0.4261]}, {"w": "changing", "b": [0.7786, 0.4111, 0.8492, 0.4261]}, {"w": "it.", "b": [0.8554, 0.4111, 0.8726, 0.4261]}]}, {"id": "b_6", "type": "paragraph", "text": "The libraries for training neural networks often come with default values for hyperparameters: stochastic gradient descent version (often, Adam), the parameter initialization strategy (often, random normal or random uniform), minibatch size (often, 32), and so on. Those", "words": [{"w": "The", "b": [0.1306, 0.4381, 0.1617, 0.453]}, {"w": "libraries", "b": [0.1673, 0.4381, 0.2308, 0.453]}, {"w": "for", "b": [0.2363, 0.4381, 0.258, 0.453]}, {"w": "training", "b": [0.2635, 0.4381, 0.3259, 0.453]}, {"w": "neural", "b": [0.3314, 0.4381, 0.3807, 0.453]}, {"w": "networks", "b": [0.3862, 0.4381, 0.4562, 0.453]}, {"w": "often", "b": [0.4617, 0.4381, 0.5014, 0.453]}, {"w": "come", "b": [0.507, 0.4381, 0.5472, 0.453]}, {"w": "with", "b": [0.5527, 0.4381, 0.5879, 0.453]}, {"w": "default", "b": [0.5934, 0.4381, 0.6482, 0.453]}, {"w": "values", "b": [0.6537, 0.4381, 0.7015, 0.453]}, {"w": "for", "b": [0.7071, 0.4381, 0.7287, 0.453]}, {"w": "hyperparameters:", "b": [0.7343, 0.4381, 0.8717, 0.453]}, {"w": "stochastic", "b": [0.1312, 0.456, 0.212, 0.471]}, {"w": "gradient", "b": [0.2197, 0.456, 0.2873, 0.471]}, {"w": "descent", "b": [0.295, 0.456, 0.3553, 0.471]}, {"w": "version", "b": [0.363, 0.456, 0.4208, 0.471]}, {"w": "(often,", "b": [0.4285, 0.456, 0.4824, 0.471]}, {"w": "Adam),", "b": [0.4903, 0.456, 0.5582, 0.4713]}, {"w": "the", "b": [0.5663, 0.456, 0.5925, 0.471]}, {"w": "parameter", "b": [0.6002, 0.456, 0.684, 0.471]}, {"w": "initialization", "b": [0.6917, 0.456, 0.7953, 0.471]}, {"w": "strategy", "b": [0.803, 0.456, 0.8696, 0.471]}, {"w": "(often,", "b": [0.1291, 0.474, 0.1808, 0.4889]}, {"w": "random", "b": [0.1863, 0.4743, 0.2572, 0.4892]}, {"w": "normal", "b": [0.2634, 0.4743, 0.3284, 0.4892]}, {"w": "or", "b": [0.3337, 0.474, 0.3499, 0.4889]}, {"w": "random", "b": [0.3552, 0.4743, 0.4261, 0.4892]}, {"w": "uniform),", "b": [0.4323, 0.474, 0.5174, 0.4892]}, {"w": "minibatch", "b": [0.5229, 0.474, 0.6017, 0.4889]}, {"w": "size", "b": [0.6071, 0.474, 0.6353, 0.4889]}, {"w": "(often,", "b": [0.6407, 0.474, 0.6924, 0.4889]}, {"w": "32),", "b": [0.6978, 0.474, 0.728, 0.4889]}, {"w": "and", "b": [0.7335, 0.474, 0.7626, 0.4889]}, {"w": "so", "b": [0.7679, 0.474, 0.7841, 0.4889]}, {"w": "on.", "b": [0.7894, 0.474, 0.8136, 0.4889]}, {"w": "Those", "b": [0.8215, 0.474, 0.8688, 0.4889]}]}, {"id": "b_7", "type": "paragraph", "text": "defaults were chosen based on observations from practical experience. Open-source libraries and modules are often the fruit of the collaboration of many scientists and engineers. These talented and experienced people established “good” defaults for many hyperparameters when working with various datasets and practical problems.", "words": [{"w": "defaults", "b": [0.1312, 0.4919, 0.1941, 0.5069]}, {"w": "were", "b": [0.2002, 0.4919, 0.2365, 0.5069]}, {"w": "chosen", "b": [0.2426, 0.4919, 0.2953, 0.5069]}, {"w": "based", "b": [0.3014, 0.4919, 0.3464, 0.5069]}, {"w": "on", "b": [0.3525, 0.4919, 0.3719, 0.5069]}, {"w": "observations", "b": [0.3781, 0.4919, 0.4768, 0.5069]}, {"w": "from", "b": [0.4829, 0.4919, 0.5202, 0.5069]}, {"w": "practical", "b": [0.5263, 0.4919, 0.5958, 0.5069]}, {"w": "experience.", "b": [0.6019, 0.4919, 0.6907, 0.5069]}, {"w": "Open-source", "b": [0.6989, 0.4919, 0.7986, 0.5069]}, {"w": "libraries", "b": [0.8047, 0.4919, 0.8692, 0.5069]}, {"w": "and", "b": [0.1312, 0.5098, 0.1607, 0.5248]}, {"w": "modules", "b": [0.1668, 0.5098, 0.2325, 0.5248]}, {"w": "are", "b": [0.2387, 0.5098, 0.2631, 0.5248]}, {"w": "often", "b": [0.2693, 0.5098, 0.3094, 0.5248]}, {"w": "the", "b": [0.3155, 0.5098, 0.341, 0.5248]}, {"w": "fruit", "b": [0.3471, 0.5098, 0.3822, 0.5248]}, {"w": "of", "b": [0.3884, 0.5098, 0.4031, 0.5248]}, {"w": "the", "b": [0.4093, 0.5098, 0.4347, 0.5248]}, {"w": "collaboration", "b": [0.4408, 0.5098, 0.5451, 0.5248]}, {"w": "of", "b": [0.5512, 0.5098, 0.5659, 0.5248]}, {"w": "many", "b": [0.5721, 0.5098, 0.6158, 0.5248]}, {"w": "scientists", "b": [0.6219, 0.5098, 0.6939, 0.5248]}, {"w": "and", "b": [0.7, 0.5098, 0.7295, 0.5248]}, {"w": "engineers.", "b": [0.7357, 0.5098, 0.8141, 0.5248]}, {"w": "These", "b": [0.8223, 0.5098, 0.8691, 0.5248]}, {"w": "talented", "b": [0.1312, 0.5278, 0.1951, 0.5428]}, {"w": "and", "b": [0.201, 0.5278, 0.2301, 0.5428]}, {"w": "experienced", "b": [0.2361, 0.5278, 0.3286, 0.5428]}, {"w": "people", "b": [0.3345, 0.5278, 0.3853, 0.5428]}, {"w": "established", "b": [0.3913, 0.5278, 0.4779, 0.5428]}, {"w": "“good”", "b": [0.4838, 0.5278, 0.5391, 0.5428]}, {"w": "defaults", "b": [0.545, 0.5278, 0.607, 0.5428]}, {"w": "for", "b": [0.6129, 0.5278, 0.6346, 0.5428]}, {"w": "many", "b": [0.6405, 0.5278, 0.6837, 0.5428]}, {"w": "hyperparameters", "b": [0.6896, 0.5278, 0.822, 0.5428]}, {"w": "when", "b": [0.828, 0.5278, 0.8692, 0.5428]}, {"w": "working", "b": [0.1306, 0.5457, 0.1942, 0.5607]}, {"w": "with", "b": [0.2003, 0.5457, 0.2362, 0.5607]}, {"w": "various", "b": [0.2424, 0.5457, 0.2994, 0.5607]}, {"w": "datasets", "b": [0.3056, 0.5457, 0.3714, 0.5607]}, {"w": "and", "b": [0.3776, 0.5457, 0.4073, 0.5607]}, {"w": "practical", "b": [0.4135, 0.5457, 0.4833, 0.5607]}, {"w": "problems.", "b": [0.4894, 0.5457, 0.5675, 0.5607]}]}, {"id": "b_8", "type": "paragraph", "text": "If you decide to tune a hyperparameter, as opposed to using the default value, it makes more sense to tune the hyperparameters to which the model is sensitive. Table 1 shows2 several hyperparameters and approximate sensitivity of a neural network to those hyperparameters.", "words": [{"w": "If", "b": [0.1312, 0.5727, 0.1433, 0.5876]}, {"w": "you", "b": [0.1492, 0.5727, 0.1774, 0.5876]}, {"w": "decide", "b": [0.1833, 0.5727, 0.2326, 0.5876]}, {"w": "to", "b": [0.2385, 0.5727, 0.2546, 0.5876]}, {"w": "tune", "b": [0.2605, 0.5727, 0.2957, 0.5876]}, {"w": "a", "b": [0.3016, 0.5727, 0.3107, 0.5876]}, {"w": "hyperparameter,", "b": [0.3166, 0.5727, 0.4469, 0.5876]}, {"w": "as", "b": [0.4529, 0.5727, 0.4691, 0.5876]}, {"w": "opposed", "b": [0.475, 0.5727, 0.5389, 0.5876]}, {"w": "to", "b": [0.5449, 0.5727, 0.5609, 0.5876]}, {"w": "using", "b": [0.5669, 0.5727, 0.6082, 0.5876]}, {"w": "the", "b": [0.6141, 0.5727, 0.6393, 0.5876]}, {"w": "default", "b": [0.6452, 0.5727, 0.7, 0.5876]}, {"w": "value,", "b": [0.7059, 0.5727, 0.7516, 0.5876]}, {"w": "it", "b": [0.7576, 0.5727, 0.7697, 0.5876]}, {"w": "makes", "b": [0.7756, 0.5727, 0.8239, 0.5876]}, {"w": "more", "b": [0.8299, 0.5727, 0.8691, 0.5876]}, {"w": "sense", "b": [0.1312, 0.5906, 0.1731, 0.6056]}, {"w": "to", "b": [0.1792, 0.5906, 0.1958, 0.6056]}, {"w": "tune", "b": [0.202, 0.5906, 0.2384, 0.6056]}, {"w": "the", "b": [0.2446, 0.5906, 0.2706, 0.6056]}, {"w": "hyperparameters", "b": [0.2767, 0.5906, 0.4138, 0.6056]}, {"w": "to", "b": [0.4199, 0.5906, 0.4366, 0.6056]}, {"w": "which", "b": [0.4427, 0.5906, 0.49, 0.6056]}, {"w": "the", "b": [0.4962, 0.5906, 0.5222, 0.6056]}, {"w": "model", "b": [0.5284, 0.5906, 0.5777, 0.6056]}, {"w": "is", "b": [0.5839, 0.5906, 0.5965, 0.6056]}, {"w": "sensitive.", "b": [0.6026, 0.5906, 0.6767, 0.6056]}, {"w": "Table", "b": [0.685, 0.5906, 0.7302, 0.6056]}, {"w": "1", "b": [0.7364, 0.5906, 0.7457, 0.6056]}, {"w": "shows2", "b": [0.7519, 0.589, 0.8064, 0.6056]}, {"w": "several", "b": [0.8135, 0.5906, 0.8688, 0.6056]}, {"w": "hyperparameters", "b": [0.1312, 0.6086, 0.2654, 0.6235]}, {"w": "and", "b": [0.2715, 0.6086, 0.3011, 0.6235]}, {"w": "approximate", "b": [0.3072, 0.6086, 0.4071, 0.6235]}, {"w": "sensitivity", "b": [0.4132, 0.6086, 0.4944, 0.6235]}, {"w": "of", "b": [0.5005, 0.6086, 0.5153, 0.6235]}, {"w": "a", "b": [0.5214, 0.6086, 0.5306, 0.6235]}, {"w": "neural", "b": [0.5367, 0.6086, 0.5867, 0.6235]}, {"w": "network", "b": [0.5929, 0.6086, 0.6565, 0.6235]}, {"w": "to", "b": [0.6627, 0.6086, 0.679, 0.6235]}, {"w": "those", "b": [0.6851, 0.6086, 0.727, 0.6235]}, {"w": "hyperparameters.", "b": [0.7331, 0.6086, 0.8724, 0.6235]}]}, {"id": "b_9", "type": "paragraph", "text": "6.1.8 Handling Multiple Inputs", "words": [{"w": "6.1.8", "b": [0.1312, 0.6567, 0.1749, 0.6717]}, {"w": "Handling", "b": [0.1961, 0.6567, 0.2808, 0.6717]}, {"w": "Multiple", "b": [0.2878, 0.6567, 0.3673, 0.6717]}, {"w": "Inputs", "b": [0.3743, 0.6567, 0.4344, 0.6717]}]}, {"id": "b_10", "type": "paragraph", "text": "In practice, machine learning engineers often work with multimodal data. For example, the input could be an image and a text, and the binary output could indicate whether the text describes the given image.", "words": [{"w": "In", "b": [0.1312, 0.693, 0.1481, 0.7079]}, {"w": "practice,", "b": [0.1543, 0.693, 0.2229, 0.7079]}, {"w": "machine", "b": [0.2291, 0.693, 0.2951, 0.7079]}, {"w": "learning", "b": [0.3013, 0.693, 0.3658, 0.7079]}, {"w": "engineers", "b": [0.372, 0.693, 0.4458, 0.7079]}, {"w": "often", "b": [0.452, 0.693, 0.4924, 0.7079]}, {"w": "work", "b": [0.4986, 0.693, 0.5375, 0.7079]}, {"w": "with", "b": [0.5437, 0.693, 0.5795, 0.7079]}, {"w": "multimodal", "b": [0.5857, 0.693, 0.6777, 0.7079]}, {"w": "data.", "b": [0.6839, 0.693, 0.7248, 0.7079]}, {"w": "For", "b": [0.7331, 0.693, 0.76, 0.7079]}, {"w": "example,", "b": [0.7662, 0.693, 0.8373, 0.7079]}, {"w": "the", "b": [0.8435, 0.693, 0.8691, 0.7079]}, {"w": "input", "b": [0.1312, 0.7109, 0.1744, 0.7259]}, {"w": "could", "b": [0.1805, 0.7109, 0.2237, 0.7259]}, {"w": "be", "b": [0.2298, 0.7109, 0.2488, 0.7259]}, {"w": "an", "b": [0.255, 0.7109, 0.2745, 0.7259]}, {"w": "image", "b": [0.2806, 0.7109, 0.3279, 0.7259]}, {"w": "and", "b": [0.334, 0.7109, 0.3638, 0.7259]}, {"w": "a", "b": [0.3699, 0.7109, 0.3792, 0.7259]}, {"w": "text,", "b": [0.3853, 0.7109, 0.4228, 0.7259]}, {"w": "and", "b": [0.4289, 0.7109, 0.4587, 0.7259]}, {"w": "the", "b": [0.4649, 0.7109, 0.4906, 0.7259]}, {"w": "binary", "b": [0.4967, 0.7109, 0.5486, 0.7259]}, {"w": "output", "b": [0.5548, 0.7109, 0.6092, 0.7259]}, {"w": "could", "b": [0.6154, 0.7109, 0.6585, 0.7259]}, {"w": "indicate", "b": [0.6647, 0.7109, 0.7284, 0.7259]}, {"w": "whether", "b": [0.7345, 0.7109, 0.7993, 0.7259]}, {"w": "the", "b": [0.8054, 0.7109, 0.8311, 0.7259]}, {"w": "text", "b": [0.8372, 0.7109, 0.8696, 0.7259]}, {"w": "describes", "b": [0.1312, 0.7289, 0.2038, 0.7438]}, {"w": "the", "b": [0.21, 0.7289, 0.2356, 0.7438]}, {"w": "given", "b": [0.2418, 0.7289, 0.2838, 0.7438]}, {"w": "image.", "b": [0.29, 0.7289, 0.3422, 0.7438]}]}, {"id": "b_11", "type": "paragraph", "text": "It’s hard to adapt shallow learning algorithms to work with multimodal data. For example, you can try to vectorize each input, by applying the corresponding feature engineering method. Then, concatenate two feature vectors to form one wider feature vector. If your image has features [i(1), i(2), i(3)], and your text has features [t(1), t(2), t(3), t(4)], your concatenated feature vector will be [i(1), i(2), i(3), t(1), t(2), t(3), t(4)].", "words": [{"w": "It’s", "b": [0.1312, 0.7558, 0.157, 0.7708]}, {"w": "hard", "b": [0.1624, 0.7558, 0.1987, 0.7708]}, {"w": "to", "b": [0.2042, 0.7558, 0.2202, 0.7708]}, {"w": "adapt", "b": [0.2257, 0.7558, 0.2709, 0.7708]}, {"w": "shallow", "b": [0.2764, 0.7561, 0.344, 0.7711]}, {"w": "learning", "b": [0.3503, 0.7561, 0.4251, 0.7711]}, {"w": "algorithms", "b": [0.4307, 0.7558, 0.5143, 0.7708]}, {"w": "to", "b": [0.5197, 0.7558, 0.5358, 0.7708]}, {"w": "work", "b": [0.5413, 0.7558, 0.5795, 0.7708]}, {"w": "with", "b": [0.585, 0.7558, 0.6202, 0.7708]}, {"w": "multimodal", "b": [0.6257, 0.7558, 0.7161, 0.7708]}, {"w": "data.", "b": [0.7215, 0.7558, 0.7617, 0.7708]}, {"w": "For", "b": [0.7697, 0.7558, 0.7961, 0.7708]}, {"w": "example,", "b": [0.8016, 0.7558, 0.8714, 0.7708]}, {"w": "you", "b": [0.1308, 0.7737, 0.1589, 0.7887]}, {"w": "can", "b": [0.1638, 0.7737, 0.1909, 0.7887]}, {"w": "try", "b": [0.1959, 0.7737, 0.2195, 0.7887]}, {"w": "to", "b": [0.2244, 0.7737, 0.2405, 0.7887]}, {"w": "vectorize", "b": [0.2454, 0.7737, 0.3148, 0.7887]}, {"w": "each", "b": [0.3197, 0.7737, 0.3544, 0.7887]}, {"w": "input,", "b": [0.3593, 0.7737, 0.4066, 0.7887]}, {"w": "by", "b": [0.4117, 0.7737, 0.4308, 0.7887]}, {"w": "applying", "b": [0.4357, 0.7737, 0.5036, 0.7887]}, {"w": "the", "b": [0.5085, 0.7737, 0.5336, 0.7887]}, {"w": "corresponding", "b": [0.5386, 0.7737, 0.6488, 0.7887]}, {"w": "feature", "b": [0.6537, 0.7737, 0.7086, 0.7887]}, {"w": "engineering", "b": [0.7135, 0.7737, 0.803, 0.7887]}, {"w": "method.", "b": [0.8079, 0.7737, 0.8728, 0.7887]}, {"w": "Then,", "b": [0.1306, 0.7917, 0.1784, 0.8066]}, {"w": "concatenate", "b": [0.1845, 0.7917, 0.2811, 0.8066]}, {"w": "two", "b": [0.2873, 0.7917, 0.3164, 0.8066]}, {"w": "feature", "b": [0.3225, 0.7917, 0.3792, 0.8066]}, {"w": "vectors", "b": [0.3853, 0.7917, 0.4426, 0.8066]}, {"w": "to", "b": [0.4488, 0.7917, 0.4654, 0.8066]}, {"w": "form", "b": [0.4716, 0.7917, 0.5095, 0.8066]}, {"w": "one", "b": [0.5157, 0.7917, 0.5437, 0.8066]}, {"w": "wider", "b": [0.5499, 0.7917, 0.5946, 0.8066]}, {"w": "feature", "b": [0.6007, 0.7917, 0.6574, 0.8066]}, {"w": "vector.", "b": [0.6636, 0.7917, 0.7187, 0.8066]}, {"w": "If", "b": [0.7269, 0.7917, 0.7393, 0.8066]}, {"w": "your", "b": [0.7455, 0.7917, 0.7819, 0.8066]}, {"w": "image", "b": [0.7881, 0.7917, 0.8358, 0.8066]}, {"w": "has", "b": [0.842, 0.7917, 0.8691, 0.8066]}, {"w": "features", "b": [0.1312, 0.8096, 0.1957, 0.8246]}, {"w": "[i(1),", "b": [0.2045, 0.808, 0.2411, 0.8249]}, {"w": "i(2),", "b": [0.2441, 0.808, 0.2754, 0.8249]}, {"w": "i(3)],", "b": [0.2785, 0.808, 0.3151, 0.8249]}, {"w": "and", "b": [0.3245, 0.8096, 0.3549, 0.8246]}, {"w": "your", "b": [0.3636, 0.8096, 0.4003, 0.8246]}, {"w": "text", "b": [0.4091, 0.8096, 0.442, 0.8246]}, {"w": "has", "b": [0.4508, 0.8096, 0.4781, 0.8246]}, {"w": "features", "b": [0.4869, 0.8096, 0.5514, 0.8246]}, {"w": "[t(1),", "b": [0.56, 0.808, 0.5969, 0.8249]}, {"w": "t(2),", "b": [0.6, 0.808, 0.6316, 0.8249]}, {"w": "t(3),", "b": [0.6347, 0.808, 0.6663, 0.8249]}, {"w": "t(4)],", "b": [0.6693, 0.808, 0.7063, 0.8249]}, {"w": "your", "b": [0.7157, 0.8096, 0.7523, 0.8246]}, {"w": "concatenated", "b": [0.7611, 0.8096, 0.8689, 0.8246]}, {"w": "feature", "b": [0.1312, 0.8276, 0.1872, 0.8425]}, {"w": "vector", "b": [0.1933, 0.8276, 0.2426, 0.8425]}, {"w": "will", "b": [0.2488, 0.8276, 0.2775, 0.8425]}, {"w": "be", "b": [0.2836, 0.8276, 0.3026, 0.8425]}, {"w": "[i(1),", "b": [0.3087, 0.826, 0.3452, 0.8428]}, {"w": "i(2),", "b": [0.3482, 0.826, 0.3795, 0.8428]}, {"w": "i(3),", "b": [0.3826, 0.826, 0.4139, 0.8428]}, {"w": "t(1),", "b": [0.417, 0.826, 0.4486, 0.8428]}, {"w": "t(2),", "b": [0.4516, 0.826, 0.4832, 0.8428]}, {"w": "t(3),", "b": [0.4863, 0.826, 0.5179, 0.8428]}, {"w": "t(4)].", "b": [0.521, 0.826, 0.5577, 0.8428]}]}, {"id": "b_12", "type": "paragraph", "text": "2Taken from the talk “Troubleshooting Deep Neural Networks” by Josh Tobin et al., January 2019.", "words": [{"w": "2Taken", "b": [0.1518, 0.8555, 0.2008, 0.8693]}, {"w": "from", "b": [0.2061, 0.8574, 0.2379, 0.8693]}, {"w": "the", "b": [0.2431, 0.8574, 0.2649, 0.8693]}, {"w": "talk", "b": [0.2701, 0.8574, 0.2967, 0.8693]}, {"w": "“Troubleshooting", "b": [0.3019, 0.8574, 0.42, 0.8693]}, {"w": "Deep", "b": [0.4252, 0.8574, 0.4598, 0.8693]}, {"w": "Neural", "b": [0.4651, 0.8574, 0.5108, 0.8693]}, {"w": "Networks”", "b": [0.516, 0.8574, 0.5871, 0.8693]}, {"w": "by", "b": [0.5923, 0.8574, 0.6089, 0.8693]}, {"w": "Josh", "b": [0.6141, 0.8574, 0.6449, 0.8693]}, {"w": "Tobin", "b": [0.6501, 0.8574, 0.6897, 0.8693]}, {"w": "et", "b": [0.695, 0.8574, 0.708, 0.8693]}, {"w": "al.,", "b": [0.7133, 0.8574, 0.7341, 0.8693]}, {"w": "January", "b": [0.7394, 0.8574, 0.7945, 0.8693]}, {"w": "2019.", "b": [0.7997, 0.8574, 0.8354, 0.8693]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 15", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "15", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 191, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Hyperparameter Sensitivity", "words": [{"w": "Hyperparameter", "b": [0.3086, 0.0914, 0.4626, 0.1063]}, {"w": "Sensitivity", "b": [0.5937, 0.0914, 0.6914, 0.1063]}]}, {"id": "b_1", "type": "paragraph", "text": "Learning rate High Learning rate schedule High Loss function High Units per layer High Parameter initialization strategy Medium Number of layers Medium Layer properties Medium Degree of regularization Medium Choice of optimizer Low Optimizer properties Low Size of minibatch Low Choice of non-linearity Low", "words": [{"w": "Learning", "b": [0.3086, 0.1165, 0.3797, 0.1315]}, {"w": "rate", "b": [0.3859, 0.1165, 0.4177, 0.1315]}, {"w": "High", "b": [0.5937, 0.1165, 0.6321, 0.1315]}, {"w": "Learning", "b": [0.3086, 0.1351, 0.3797, 0.15]}, {"w": "rate", "b": [0.3859, 0.1351, 0.4177, 0.15]}, {"w": "schedule", "b": [0.4238, 0.1351, 0.4911, 0.15]}, {"w": "High", "b": [0.5937, 0.1351, 0.6321, 0.15]}, {"w": "Loss", "b": [0.3086, 0.1536, 0.344, 0.1686]}, {"w": "function", "b": [0.3501, 0.1536, 0.4163, 0.1686]}, {"w": "High", "b": [0.5937, 0.1536, 0.6321, 0.1686]}, {"w": "Units", "b": [0.3086, 0.1722, 0.3523, 0.1871]}, {"w": "per", "b": [0.3585, 0.1722, 0.3847, 0.1871]}, {"w": "layer", "b": [0.3908, 0.1722, 0.4294, 0.1871]}, {"w": "High", "b": [0.5937, 0.1722, 0.6321, 0.1871]}, {"w": "Parameter", "b": [0.3086, 0.1907, 0.3926, 0.2057]}, {"w": "initialization", "b": [0.3987, 0.1907, 0.5002, 0.2057]}, {"w": "strategy", "b": [0.5064, 0.1907, 0.5717, 0.2057]}, {"w": "Medium", "b": [0.5937, 0.1907, 0.6598, 0.2057]}, {"w": "Number", "b": [0.3086, 0.2093, 0.3738, 0.2242]}, {"w": "of", "b": [0.3799, 0.2093, 0.3948, 0.2242]}, {"w": "layers", "b": [0.401, 0.2093, 0.4468, 0.2242]}, {"w": "Medium", "b": [0.5937, 0.2093, 0.6598, 0.2242]}, {"w": "Layer", "b": [0.3086, 0.2278, 0.3535, 0.2428]}, {"w": "properties", "b": [0.3597, 0.2278, 0.4404, 0.2428]}, {"w": "Medium", "b": [0.5937, 0.2278, 0.6598, 0.2428]}, {"w": "Degree", "b": [0.3086, 0.2464, 0.3638, 0.2613]}, {"w": "of", "b": [0.37, 0.2464, 0.3848, 0.2613]}, {"w": "regularization", "b": [0.391, 0.2464, 0.5018, 0.2613]}, {"w": "Medium", "b": [0.5937, 0.2464, 0.6598, 0.2613]}, {"w": "Choice", "b": [0.3086, 0.2649, 0.363, 0.2799]}, {"w": "of", "b": [0.3691, 0.2649, 0.384, 0.2799]}, {"w": "optimizer", "b": [0.3902, 0.2649, 0.4661, 0.2799]}, {"w": "Low", "b": [0.5937, 0.2649, 0.6272, 0.2799]}, {"w": "Optimizer", "b": [0.3086, 0.2834, 0.3897, 0.2984]}, {"w": "properties", "b": [0.3959, 0.2834, 0.4766, 0.2984]}, {"w": "Low", "b": [0.5937, 0.2834, 0.6272, 0.2984]}, {"w": "Size", "b": [0.3086, 0.302, 0.3404, 0.3169]}, {"w": "of", "b": [0.3466, 0.302, 0.3615, 0.3169]}, {"w": "minibatch", "b": [0.3676, 0.302, 0.4481, 0.3169]}, {"w": "Low", "b": [0.5937, 0.302, 0.6272, 0.3169]}, {"w": "Choice", "b": [0.3086, 0.3205, 0.363, 0.3355]}, {"w": "of", "b": [0.3691, 0.3205, 0.384, 0.3355]}, {"w": "non-linearity", "b": [0.3902, 0.3205, 0.4927, 0.3355]}, {"w": "Low", "b": [0.5937, 0.3205, 0.6272, 0.3355]}]}, {"id": "b_2", "type": "paragraph", "text": "Table 1: Approximate sensitivity of a model to some hyperparameters.", "words": [{"w": "Table", "b": [0.2134, 0.3572, 0.258, 0.3722]}, {"w": "1:", "b": [0.2642, 0.3572, 0.2785, 0.3722]}, {"w": "Approximate", "b": [0.2867, 0.3572, 0.3918, 0.3722]}, {"w": "sensitivity", "b": [0.398, 0.3572, 0.4797, 0.3722]}, {"w": "of", "b": [0.4859, 0.3572, 0.5008, 0.3722]}, {"w": "a", "b": [0.5069, 0.3572, 0.5161, 0.3722]}, {"w": "model", "b": [0.5223, 0.3572, 0.571, 0.3722]}, {"w": "to", "b": [0.5771, 0.3572, 0.5935, 0.3722]}, {"w": "some", "b": [0.5997, 0.3572, 0.6398, 0.3722]}, {"w": "hyperparameters.", "b": [0.6459, 0.3572, 0.7862, 0.3722]}]}, {"id": "b_3", "type": "paragraph", "text": "With neural networks, you have substantially more flexibility. You can build two subnet-", "words": [{"w": "With", "b": [0.1303, 0.4075, 0.1725, 0.4224]}, {"w": "neural", "b": [0.1786, 0.4075, 0.2298, 0.4224]}, {"w": "networks,", "b": [0.2359, 0.4075, 0.3138, 0.4224]}, {"w": "you", "b": [0.3199, 0.4075, 0.3491, 0.4224]}, {"w": "have", "b": [0.3552, 0.4075, 0.3923, 0.4224]}, {"w": "substantially", "b": [0.3984, 0.4075, 0.5029, 0.4224]}, {"w": "more", "b": [0.509, 0.4075, 0.5497, 0.4224]}, {"w": "flexibility.", "b": [0.5559, 0.4075, 0.6362, 0.4224]}, {"w": "You", "b": [0.6444, 0.4075, 0.6767, 0.4224]}, {"w": "can", "b": [0.6828, 0.4075, 0.711, 0.4224]}, {"w": "build", "b": [0.7171, 0.4075, 0.7588, 0.4224]}, {"w": "two", "b": [0.765, 0.4075, 0.7942, 0.4224]}, {"w": "subnet-", "b": [0.8, 0.4078, 0.8688, 0.4227]}]}, {"id": "b_4", "type": "paragraph", "text": "works, one for each input type. For example, a CNN subnetwork reads the image, while an RNN subnetwork reads the text. Both subnetworks have, as their last layer, an embedding. CNN has an image embedding, and RNN has a text embedding. You then concatenate the two embeddings, and finally add a classification layer, such as softmax or logistic sigmoid, on top of the concatenated embeddings.", "words": [{"w": "works,", "b": [0.1312, 0.4254, 0.1899, 0.4407]}, {"w": "one", "b": [0.1959, 0.4254, 0.223, 0.4404]}, {"w": "for", "b": [0.229, 0.4254, 0.2507, 0.4404]}, {"w": "each", "b": [0.2566, 0.4254, 0.2913, 0.4404]}, {"w": "input", "b": [0.2972, 0.4254, 0.3394, 0.4404]}, {"w": "type.", "b": [0.3454, 0.4254, 0.3851, 0.4404]}, {"w": "For", "b": [0.3932, 0.4254, 0.4196, 0.4404]}, {"w": "example,", "b": [0.4256, 0.4254, 0.4954, 0.4404]}, {"w": "a", "b": [0.5014, 0.4254, 0.5105, 0.4404]}, {"w": "CNN", "b": [0.5165, 0.4257, 0.565, 0.4407]}, {"w": "subnetwork", "b": [0.571, 0.4254, 0.661, 0.4404]}, {"w": "reads", "b": [0.667, 0.4254, 0.7084, 0.4404]}, {"w": "the", "b": [0.7143, 0.4254, 0.7395, 0.4404]}, {"w": "image,", "b": [0.7454, 0.4254, 0.7967, 0.4404]}, {"w": "while", "b": [0.8027, 0.4254, 0.8439, 0.4404]}, {"w": "an", "b": [0.8498, 0.4254, 0.8689, 0.4404]}, {"w": "RNN", "b": [0.1312, 0.4437, 0.1804, 0.4586]}, {"w": "subnetwork", "b": [0.1857, 0.4434, 0.2758, 0.4583]}, {"w": "reads", "b": [0.2811, 0.4434, 0.3225, 0.4583]}, {"w": "the", "b": [0.3279, 0.4434, 0.353, 0.4583]}, {"w": "text.", "b": [0.3584, 0.4434, 0.395, 0.4583]}, {"w": "Both", "b": [0.403, 0.4434, 0.4419, 0.4583]}, {"w": "subnetworks", "b": [0.4473, 0.4434, 0.5445, 0.4583]}, {"w": "have,", "b": [0.5498, 0.4434, 0.5905, 0.4583]}, {"w": "as", "b": [0.596, 0.4434, 0.6122, 0.4583]}, {"w": "their", "b": [0.6176, 0.4434, 0.6548, 0.4583]}, {"w": "last", "b": [0.6602, 0.4434, 0.6884, 0.4583]}, {"w": "layer,", "b": [0.6938, 0.4434, 0.7365, 0.4583]}, {"w": "an", "b": [0.742, 0.4434, 0.7611, 0.4583]}, {"w": "embedding.", "b": [0.7663, 0.4434, 0.8724, 0.4586]}, {"w": "CNN", "b": [0.1312, 0.4613, 0.1724, 0.4763]}, {"w": "has", "b": [0.1785, 0.4613, 0.2054, 0.4763]}, {"w": "an", "b": [0.2116, 0.4613, 0.2311, 0.4763]}, {"w": "image", "b": [0.2373, 0.4613, 0.2846, 0.4763]}, {"w": "embedding,", "b": [0.2908, 0.4613, 0.3835, 0.4763]}, {"w": "and", "b": [0.3896, 0.4613, 0.4195, 0.4763]}, {"w": "RNN", "b": [0.4256, 0.4613, 0.467, 0.4763]}, {"w": "has", "b": [0.4732, 0.4613, 0.5001, 0.4763]}, {"w": "a", "b": [0.5062, 0.4613, 0.5155, 0.4763]}, {"w": "text", "b": [0.5216, 0.4613, 0.5541, 0.4763]}, {"w": "embedding.", "b": [0.5602, 0.4613, 0.6529, 0.4763]}, {"w": "You", "b": [0.6611, 0.4613, 0.693, 0.4763]}, {"w": "then", "b": [0.6992, 0.4613, 0.7352, 0.4763]}, {"w": "concatenate", "b": [0.7414, 0.4613, 0.8371, 0.4763]}, {"w": "the", "b": [0.8433, 0.4613, 0.869, 0.4763]}, {"w": "two", "b": [0.1312, 0.4792, 0.1593, 0.4942]}, {"w": "embeddings,", "b": [0.165, 0.4792, 0.2626, 0.4942]}, {"w": "and", "b": [0.2684, 0.4792, 0.2976, 0.4942]}, {"w": "finally", "b": [0.3033, 0.4792, 0.352, 0.4942]}, {"w": "add", "b": [0.3577, 0.4792, 0.3869, 0.4942]}, {"w": "a", "b": [0.3926, 0.4792, 0.4016, 0.4942]}, {"w": "classification", "b": [0.4073, 0.4792, 0.507, 0.4942]}, {"w": "layer,", "b": [0.5127, 0.4792, 0.5555, 0.4942]}, {"w": "such", "b": [0.5613, 0.4792, 0.5961, 0.4942]}, {"w": "as", "b": [0.6018, 0.4792, 0.618, 0.4942]}, {"w": "softmax", "b": [0.6234, 0.4796, 0.6963, 0.4945]}, {"w": "or", "b": [0.7021, 0.4792, 0.7183, 0.4942]}, {"w": "logistic", "b": [0.724, 0.4796, 0.7889, 0.4945]}, {"w": "sigmoid,", "b": [0.7955, 0.4792, 0.8713, 0.4945]}, {"w": "on", "b": [0.1312, 0.4972, 0.1507, 0.5122]}, {"w": "top", "b": [0.1569, 0.4972, 0.1835, 0.5122]}, {"w": "of", "b": [0.1897, 0.4972, 0.2046, 0.5122]}, {"w": "the", "b": [0.2107, 0.4972, 0.2363, 0.5122]}, {"w": "concatenated", "b": [0.2425, 0.4972, 0.3481, 0.5122]}, {"w": "embeddings.", "b": [0.3543, 0.4972, 0.4539, 0.5122]}]}, {"id": "b_5", "type": "paragraph", "text": "Neural network libraries provide simple-to-use tools that allow concatenating or averaging layers from several subnetworks.", "words": [{"w": "Neural", "b": [0.1312, 0.5241, 0.1859, 0.5391]}, {"w": "network", "b": [0.1921, 0.5241, 0.2571, 0.5391]}, {"w": "libraries", "b": [0.2633, 0.5241, 0.329, 0.5391]}, {"w": "provide", "b": [0.3352, 0.5241, 0.3955, 0.5391]}, {"w": "simple-to-use", "b": [0.4017, 0.5241, 0.509, 0.5391]}, {"w": "tools", "b": [0.5152, 0.5241, 0.5543, 0.5391]}, {"w": "that", "b": [0.5604, 0.5241, 0.5947, 0.5391]}, {"w": "allow", "b": [0.6009, 0.5241, 0.643, 0.5391]}, {"w": "concatenating", "b": [0.6492, 0.5241, 0.7625, 0.5391]}, {"w": "or", "b": [0.7687, 0.5241, 0.7854, 0.5391]}, {"w": "averaging", "b": [0.7916, 0.5241, 0.8691, 0.5391]}, {"w": "layers", "b": [0.1312, 0.5421, 0.177, 0.557]}, {"w": "from", "b": [0.1832, 0.5421, 0.2207, 0.557]}, {"w": "several", "b": [0.2268, 0.5421, 0.2813, 0.557]}, {"w": "subnetworks.", "b": [0.2875, 0.5421, 0.3918, 0.557]}]}, {"id": "b_6", "type": "paragraph", "text": "6.1.9 Handling Multiple Outputs", "words": [{"w": "6.1.9", "b": [0.1312, 0.5902, 0.1749, 0.6052]}, {"w": "Handling", "b": [0.1961, 0.5902, 0.2808, 0.6052]}, {"w": "Multiple", "b": [0.2878, 0.5902, 0.3673, 0.6052]}, {"w": "Outputs", "b": [0.3743, 0.5902, 0.4505, 0.6052]}]}, {"id": "b_7", "type": "paragraph", "text": "Sometimes, you would like to predict multiple outputs for one input. Some problems with multiple outputs can be effectively converted into a multi-label classification problem. Those with labels of the same nature (like tags in social networks), or fake labels can be created as a full enumeration of combinations of original labels.", "words": [{"w": "Sometimes,", "b": [0.1312, 0.6265, 0.224, 0.6414]}, {"w": "you", "b": [0.2301, 0.6265, 0.2593, 0.6414]}, {"w": "would", "b": [0.2654, 0.6265, 0.3138, 0.6414]}, {"w": "like", "b": [0.32, 0.6265, 0.3481, 0.6414]}, {"w": "to", "b": [0.3543, 0.6265, 0.3709, 0.6414]}, {"w": "predict", "b": [0.3771, 0.6265, 0.4344, 0.6414]}, {"w": "multiple", "b": [0.4405, 0.6265, 0.5077, 0.6414]}, {"w": "outputs", "b": [0.5138, 0.6265, 0.5764, 0.6414]}, {"w": "for", "b": [0.5826, 0.6265, 0.605, 0.6414]}, {"w": "one", "b": [0.6112, 0.6265, 0.6393, 0.6414]}, {"w": "input.", "b": [0.6454, 0.6265, 0.6943, 0.6414]}, {"w": "Some", "b": [0.7026, 0.6265, 0.7463, 0.6414]}, {"w": "problems", "b": [0.7524, 0.6265, 0.8265, 0.6414]}, {"w": "with", "b": [0.8327, 0.6265, 0.8691, 0.6414]}, {"w": "multiple", "b": [0.1312, 0.6444, 0.1962, 0.6594]}, {"w": "outputs", "b": [0.2023, 0.6444, 0.2629, 0.6594]}, {"w": "can", "b": [0.269, 0.6444, 0.2962, 0.6594]}, {"w": "be", "b": [0.3024, 0.6444, 0.321, 0.6594]}, {"w": "effectively", "b": [0.3272, 0.6444, 0.4057, 0.6594]}, {"w": "converted", "b": [0.4119, 0.6444, 0.4879, 0.6594]}, {"w": "into", "b": [0.4941, 0.6444, 0.5248, 0.6594]}, {"w": "a", "b": [0.5309, 0.6444, 0.54, 0.6594]}, {"w": "multi-label", "b": [0.5462, 0.6444, 0.6317, 0.6594]}, {"w": "classification", "b": [0.6379, 0.6444, 0.7378, 0.6594]}, {"w": "problem.", "b": [0.744, 0.6444, 0.8135, 0.6594]}, {"w": "Those", "b": [0.8217, 0.6444, 0.8691, 0.6594]}, {"w": "with", "b": [0.1306, 0.6624, 0.166, 0.6773]}, {"w": "labels", "b": [0.1721, 0.6624, 0.2173, 0.6773]}, {"w": "of", "b": [0.2234, 0.6624, 0.2381, 0.6773]}, {"w": "the", "b": [0.2443, 0.6624, 0.2696, 0.6773]}, {"w": "same", "b": [0.2757, 0.6624, 0.3153, 0.6773]}, {"w": "nature", "b": [0.3214, 0.6624, 0.3731, 0.6773]}, {"w": "(like", "b": [0.3793, 0.6624, 0.4137, 0.6773]}, {"w": "tags", "b": [0.4198, 0.6624, 0.4523, 0.6773]}, {"w": "in", "b": [0.4584, 0.6624, 0.4736, 0.6773]}, {"w": "social", "b": [0.4798, 0.6624, 0.5239, 0.6773]}, {"w": "networks),", "b": [0.5301, 0.6624, 0.6127, 0.6773]}, {"w": "or", "b": [0.6188, 0.6624, 0.6351, 0.6773]}, {"w": "fake", "b": [0.6412, 0.6624, 0.6731, 0.6773]}, {"w": "labels", "b": [0.6793, 0.6624, 0.7244, 0.6773]}, {"w": "can", "b": [0.7306, 0.6624, 0.7579, 0.6773]}, {"w": "be", "b": [0.764, 0.6624, 0.7828, 0.6773]}, {"w": "created", "b": [0.7889, 0.6624, 0.8467, 0.6773]}, {"w": "as", "b": [0.8528, 0.6624, 0.8691, 0.6773]}, {"w": "a", "b": [0.1312, 0.6803, 0.1405, 0.6953]}, {"w": "full", "b": [0.1466, 0.6803, 0.1728, 0.6953]}, {"w": "enumeration", "b": [0.1789, 0.6803, 0.279, 0.6953]}, {"w": "of", "b": [0.2851, 0.6803, 0.3, 0.6953]}, {"w": "combinations", "b": [0.3061, 0.6803, 0.4123, 0.6953]}, {"w": "of", "b": [0.4185, 0.6803, 0.4334, 0.6953]}, {"w": "original", "b": [0.4395, 0.6803, 0.5001, 0.6953]}, {"w": "labels.", "b": [0.5062, 0.6803, 0.5571, 0.6953]}]}, {"id": "b_8", "type": "paragraph", "text": "However, in many cases, the outputs are multimodal, and their combinations cannot be effectively enumerated. Consider the following example: you want to build a model that detects an object on an image, and returns its coordinates. In addition, the model has to return a tag describing the object, such as “person,” “cat,” or “hamster.” Your training example will be a feature vector representing an image and a label. The label could be represented as a vector of coordinates of the object, and another vector with a one-hot encoded tag.", "words": [{"w": "However,", "b": [0.1312, 0.7072, 0.2061, 0.7222]}, {"w": "in", "b": [0.2139, 0.7072, 0.2296, 0.7222]}, {"w": "many", "b": [0.237, 0.7072, 0.282, 0.7222]}, {"w": "cases,", "b": [0.2894, 0.7072, 0.3357, 0.7222]}, {"w": "the", "b": [0.3434, 0.7072, 0.3696, 0.7222]}, {"w": "outputs", "b": [0.377, 0.7072, 0.4399, 0.7222]}, {"w": "are", "b": [0.4473, 0.7072, 0.4725, 0.7222]}, {"w": "multimodal,", "b": [0.48, 0.7072, 0.5793, 0.7222]}, {"w": "and", "b": [0.587, 0.7072, 0.6174, 0.7222]}, {"w": "their", "b": [0.6248, 0.7072, 0.6636, 0.7222]}, {"w": "combinations", "b": [0.671, 0.7072, 0.7794, 0.7222]}, {"w": "cannot", "b": [0.7868, 0.7072, 0.8423, 0.7222]}, {"w": "be", "b": [0.8497, 0.7072, 0.8691, 0.7222]}, {"w": "effectively", "b": [0.1312, 0.7252, 0.2128, 0.7402]}, {"w": "enumerated.", "b": [0.2198, 0.7252, 0.3208, 0.7402]}, {"w": "Consider", "b": [0.3315, 0.7252, 0.4038, 0.7402]}, {"w": "the", "b": [0.4107, 0.7252, 0.4369, 0.7402]}, {"w": "following", "b": [0.4439, 0.7252, 0.5171, 0.7402]}, {"w": "example:", "b": [0.524, 0.7252, 0.5967, 0.7402]}, {"w": "you", "b": [0.6066, 0.7252, 0.6359, 0.7402]}, {"w": "want", "b": [0.6428, 0.7252, 0.6826, 0.7402]}, {"w": "to", "b": [0.6895, 0.7252, 0.7063, 0.7402]}, {"w": "build", "b": [0.7132, 0.7252, 0.7551, 0.7402]}, {"w": "a", "b": [0.762, 0.7252, 0.7714, 0.7402]}, {"w": "model", "b": [0.7784, 0.7252, 0.8281, 0.7402]}, {"w": "that", "b": [0.8351, 0.7252, 0.8695, 0.7402]}, {"w": "detects", "b": [0.1312, 0.7431, 0.1889, 0.7581]}, {"w": "an", "b": [0.1953, 0.7431, 0.2152, 0.7581]}, {"w": "object", "b": [0.2216, 0.7431, 0.2718, 0.7581]}, {"w": "on", "b": [0.2782, 0.7431, 0.298, 0.7581]}, {"w": "an", "b": [0.3044, 0.7431, 0.3243, 0.7581]}, {"w": "image,", "b": [0.3307, 0.7431, 0.384, 0.7581]}, {"w": "and", "b": [0.3905, 0.7431, 0.4208, 0.7581]}, {"w": "returns", "b": [0.4272, 0.7431, 0.486, 0.7581]}, {"w": "its", "b": [0.4924, 0.7431, 0.5124, 0.7581]}, {"w": "coordinates.", "b": [0.5188, 0.7431, 0.6178, 0.7581]}, {"w": "In", "b": [0.6267, 0.7431, 0.644, 0.7581]}, {"w": "addition,", "b": [0.6504, 0.7431, 0.7236, 0.7581]}, {"w": "the", "b": [0.7301, 0.7431, 0.7562, 0.7581]}, {"w": "model", "b": [0.7626, 0.7431, 0.8123, 0.7581]}, {"w": "has", "b": [0.8187, 0.7431, 0.846, 0.7581]}, {"w": "to", "b": [0.8524, 0.7431, 0.8691, 0.7581]}, {"w": "return", "b": [0.1312, 0.7611, 0.1826, 0.776]}, {"w": "a", "b": [0.1899, 0.7611, 0.1993, 0.776]}, {"w": "tag", "b": [0.2066, 0.7611, 0.2328, 0.776]}, {"w": "describing", "b": [0.2401, 0.7611, 0.3229, 0.776]}, {"w": "the", "b": [0.3302, 0.7611, 0.3564, 0.776]}, {"w": "object,", "b": [0.3637, 0.7611, 0.4192, 0.776]}, {"w": "such", "b": [0.4268, 0.7611, 0.463, 0.776]}, {"w": "as", "b": [0.4703, 0.7611, 0.4871, 0.776]}, {"w": "“person,”", "b": [0.4944, 0.7611, 0.5715, 0.776]}, {"w": "“cat,”", "b": [0.5791, 0.7611, 0.6272, 0.776]}, {"w": "or", "b": [0.6348, 0.7611, 0.6516, 0.776]}, {"w": "“hamster.”", "b": [0.6589, 0.7611, 0.7454, 0.776]}, {"w": "Your", "b": [0.7571, 0.7611, 0.7969, 0.776]}, {"w": "training", "b": [0.8042, 0.7611, 0.8691, 0.776]}, {"w": "example", "b": [0.1312, 0.779, 0.1987, 0.794]}, {"w": "will", "b": [0.2062, 0.779, 0.2355, 0.794]}, {"w": "be", "b": [0.243, 0.779, 0.2624, 0.794]}, {"w": "a", "b": [0.2699, 0.779, 0.2793, 0.794]}, {"w": "feature", "b": [0.2869, 0.779, 0.3439, 0.794]}, {"w": "vector", "b": [0.3515, 0.779, 0.4017, 0.794]}, {"w": "representing", "b": [0.4093, 0.779, 0.5094, 0.794]}, {"w": "an", "b": [0.517, 0.779, 0.5368, 0.794]}, {"w": "image", "b": [0.5444, 0.779, 0.5924, 0.794]}, {"w": "and", "b": [0.6, 0.779, 0.6303, 0.794]}, {"w": "a", "b": [0.6378, 0.779, 0.6472, 0.794]}, {"w": "label.", "b": [0.6548, 0.779, 0.6992, 0.794]}, {"w": "The", "b": [0.7116, 0.779, 0.744, 0.794]}, {"w": "label", "b": [0.7515, 0.779, 0.7908, 0.794]}, {"w": "could", "b": [0.7983, 0.779, 0.8422, 0.794]}, {"w": "be", "b": [0.8498, 0.779, 0.8691, 0.794]}, {"w": "represented", "b": [0.1312, 0.797, 0.2251, 0.8119]}, {"w": "as", "b": [0.2324, 0.797, 0.2492, 0.8119]}, {"w": "a", "b": [0.2565, 0.797, 0.2659, 0.8119]}, {"w": "vector", "b": [0.2732, 0.797, 0.3235, 0.8119]}, {"w": "of", "b": [0.3308, 0.797, 0.3459, 0.8119]}, {"w": "coordinates", "b": [0.3532, 0.797, 0.447, 0.8119]}, {"w": "of", "b": [0.4543, 0.797, 0.4695, 0.8119]}, {"w": "the", "b": [0.4767, 0.797, 0.5029, 0.8119]}, {"w": "object,", "b": [0.5102, 0.797, 0.5656, 0.8119]}, {"w": "and", "b": [0.5732, 0.797, 0.6035, 0.8119]}, {"w": "another", "b": [0.6108, 0.797, 0.6736, 0.8119]}, {"w": "vector", "b": [0.6809, 0.797, 0.7312, 0.8119]}, {"w": "with", "b": [0.7385, 0.797, 0.7751, 0.8119]}, {"w": "a", "b": [0.7824, 0.797, 0.7918, 0.8119]}, {"w": "one-hot", "b": [0.7989, 0.7973, 0.8688, 0.8122]}, {"w": "encoded", "b": [0.1312, 0.8152, 0.2067, 0.8302]}, {"w": "tag.", "b": [0.2128, 0.8149, 0.2436, 0.8299]}]}, {"id": "b_9", "type": "paragraph", "text": "For this, you can create one subnetwork that works as an encoder. It will read the input image using, for example, one or several convolution layers. The encoder’s last layer is the", "words": [{"w": "For", "b": [0.1312, 0.8419, 0.1588, 0.8568]}, {"w": "this,", "b": [0.1655, 0.8419, 0.2011, 0.8568]}, {"w": "you", "b": [0.208, 0.8419, 0.2373, 0.8568]}, {"w": "can", "b": [0.2439, 0.8419, 0.2722, 0.8568]}, {"w": "create", "b": [0.2789, 0.8419, 0.3281, 0.8568]}, {"w": "one", "b": [0.3348, 0.8419, 0.363, 0.8568]}, {"w": "subnetwork", "b": [0.3697, 0.8419, 0.4635, 0.8568]}, {"w": "that", "b": [0.4702, 0.8419, 0.5047, 0.8568]}, {"w": "works", "b": [0.5114, 0.8419, 0.5586, 0.8568]}, {"w": "as", "b": [0.5653, 0.8419, 0.5821, 0.8568]}, {"w": "an", "b": [0.5888, 0.8419, 0.6087, 0.8568]}, {"w": "encoder.", "b": [0.6154, 0.8419, 0.6839, 0.8568]}, {"w": "It", "b": [0.6937, 0.8419, 0.7079, 0.8568]}, {"w": "will", "b": [0.7146, 0.8419, 0.7438, 0.8568]}, {"w": "read", "b": [0.7505, 0.8419, 0.7861, 0.8568]}, {"w": "the", "b": [0.7928, 0.8419, 0.819, 0.8568]}, {"w": "input", "b": [0.8257, 0.8419, 0.8696, 0.8568]}, {"w": "image", "b": [0.1312, 0.8598, 0.179, 0.8748]}, {"w": "using,", "b": [0.1851, 0.8598, 0.233, 0.8748]}, {"w": "for", "b": [0.2391, 0.8598, 0.2615, 0.8748]}, {"w": "example,", "b": [0.2676, 0.8598, 0.3398, 0.8748]}, {"w": "one", "b": [0.3459, 0.8598, 0.374, 0.8748]}, {"w": "or", "b": [0.3801, 0.8598, 0.3968, 0.8748]}, {"w": "several", "b": [0.4029, 0.8598, 0.4581, 0.8748]}, {"w": "convolution", "b": [0.4642, 0.8598, 0.5582, 0.8748]}, {"w": "layers.", "b": [0.5643, 0.8598, 0.6159, 0.8748]}, {"w": "The", "b": [0.6241, 0.8598, 0.6563, 0.8748]}, {"w": "encoder’s", "b": [0.6624, 0.8598, 0.7378, 0.8748]}, {"w": "last", "b": [0.744, 0.8598, 0.7732, 0.8748]}, {"w": "layer", "b": [0.7793, 0.8598, 0.8183, 0.8748]}, {"w": "is", "b": [0.8245, 0.8598, 0.837, 0.8748]}, {"w": "the", "b": [0.8432, 0.8598, 0.8691, 0.8748]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 16", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "16", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 192, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "image embedding. Then you add two other subnetworks on top of the embedding layer: 1) one takes the embedding vector as input, and predicts the coordinates of the object, and 2) the other takes the embedding vector as input, and predicts the tag.", "words": [{"w": "image", "b": [0.1312, 0.0881, 0.1788, 0.1031]}, {"w": "embedding.", "b": [0.185, 0.0881, 0.2781, 0.1031]}, {"w": "Then", "b": [0.2863, 0.0881, 0.3287, 0.1031]}, {"w": "you", "b": [0.3349, 0.0881, 0.3639, 0.1031]}, {"w": "add", "b": [0.37, 0.0881, 0.4, 0.1031]}, {"w": "two", "b": [0.4062, 0.0881, 0.4352, 0.1031]}, {"w": "other", "b": [0.4413, 0.0881, 0.4838, 0.1031]}, {"w": "subnetworks", "b": [0.49, 0.0881, 0.5901, 0.1031]}, {"w": "on", "b": [0.5962, 0.0881, 0.6159, 0.1031]}, {"w": "top", "b": [0.6221, 0.0881, 0.649, 0.1031]}, {"w": "of", "b": [0.6551, 0.0881, 0.6701, 0.1031]}, {"w": "the", "b": [0.6763, 0.0881, 0.7021, 0.1031]}, {"w": "embedding", "b": [0.7083, 0.0881, 0.7963, 0.1031]}, {"w": "layer:", "b": [0.8024, 0.0881, 0.8465, 0.1031]}, {"w": "1)", "b": [0.8547, 0.0881, 0.8712, 0.1031]}, {"w": "one", "b": [0.1312, 0.106, 0.1589, 0.121]}, {"w": "takes", "b": [0.1651, 0.106, 0.2062, 0.121]}, {"w": "the", "b": [0.2124, 0.106, 0.238, 0.121]}, {"w": "embedding", "b": [0.2442, 0.106, 0.3313, 0.121]}, {"w": "vector", "b": [0.3375, 0.106, 0.3868, 0.121]}, {"w": "as", "b": [0.3929, 0.106, 0.4094, 0.121]}, {"w": "input,", "b": [0.4156, 0.106, 0.4638, 0.121]}, {"w": "and", "b": [0.47, 0.106, 0.4997, 0.121]}, {"w": "predicts", "b": [0.5059, 0.106, 0.5696, 0.121]}, {"w": "the", "b": [0.5758, 0.106, 0.6014, 0.121]}, {"w": "coordinates", "b": [0.6076, 0.106, 0.6995, 0.121]}, {"w": "of", "b": [0.7057, 0.106, 0.7205, 0.121]}, {"w": "the", "b": [0.7267, 0.106, 0.7523, 0.121]}, {"w": "object,", "b": [0.7585, 0.106, 0.8129, 0.121]}, {"w": "and", "b": [0.819, 0.106, 0.8488, 0.121]}, {"w": "2)", "b": [0.8549, 0.106, 0.8713, 0.121]}, {"w": "the", "b": [0.1312, 0.124, 0.1569, 0.1389]}, {"w": "other", "b": [0.163, 0.124, 0.2051, 0.1389]}, {"w": "takes", "b": [0.2113, 0.124, 0.2524, 0.1389]}, {"w": "the", "b": [0.2586, 0.124, 0.2842, 0.1389]}, {"w": "embedding", "b": [0.2903, 0.124, 0.3775, 0.1389]}, {"w": "vector", "b": [0.3837, 0.124, 0.4329, 0.1389]}, {"w": "as", "b": [0.4391, 0.124, 0.4556, 0.1389]}, {"w": "input,", "b": [0.4618, 0.124, 0.51, 0.1389]}, {"w": "and", "b": [0.5161, 0.124, 0.5458, 0.1389]}, {"w": "predicts", "b": [0.552, 0.124, 0.6157, 0.1389]}, {"w": "the", "b": [0.6219, 0.124, 0.6475, 0.1389]}, {"w": "tag.", "b": [0.6537, 0.124, 0.6845, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "The first subnetwork can have a ReLU as the last layer, which is good for predicting positive real numbers, such as coordinates. This subnetwork can use the mean squared error cost C1. The second subnetwork will take the same embedding vector as input, and will predict the probabilities for each tag. It can have a softmax as the last layer, which is appropriate for the multiclass classification, and use the averaged negative log-likelihood cost C2 (also called cross-entropy cost). Alternatively, the coordinates could be in the range [0, 1] (in which case the layer that predicts coordinates will have four logistic sigmoid outputs", "words": [{"w": "The", "b": [0.1306, 0.1509, 0.1617, 0.1659]}, {"w": "first", "b": [0.1673, 0.1509, 0.1986, 0.1659]}, {"w": "subnetwork", "b": [0.2041, 0.1509, 0.2942, 0.1659]}, {"w": "can", "b": [0.2997, 0.1509, 0.3269, 0.1659]}, {"w": "have", "b": [0.3324, 0.1509, 0.3681, 0.1659]}, {"w": "a", "b": [0.3736, 0.1509, 0.3827, 0.1659]}, {"w": "ReLU", "b": [0.3883, 0.1512, 0.443, 0.1662]}, {"w": "as", "b": [0.4486, 0.1509, 0.4647, 0.1659]}, {"w": "the", "b": [0.4703, 0.1509, 0.4954, 0.1659]}, {"w": "last", "b": [0.501, 0.1509, 0.5292, 0.1659]}, {"w": "layer,", "b": [0.5347, 0.1509, 0.5775, 0.1659]}, {"w": "which", "b": [0.5831, 0.1509, 0.6289, 0.1659]}, {"w": "is", "b": [0.6344, 0.1509, 0.6466, 0.1659]}, {"w": "good", "b": [0.6521, 0.1509, 0.6903, 0.1659]}, {"w": "for", "b": [0.6959, 0.1509, 0.7175, 0.1659]}, {"w": "predicting", "b": [0.7231, 0.1509, 0.8025, 0.1659]}, {"w": "positive", "b": [0.8081, 0.1509, 0.869, 0.1659]}, {"w": "real", "b": [0.1312, 0.1689, 0.1616, 0.1838]}, {"w": "numbers,", "b": [0.1683, 0.1689, 0.2433, 0.1838]}, {"w": "such", "b": [0.2501, 0.1689, 0.2863, 0.1838]}, {"w": "as", "b": [0.293, 0.1689, 0.3098, 0.1838]}, {"w": "coordinates.", "b": [0.3165, 0.1689, 0.4155, 0.1838]}, {"w": "This", "b": [0.4253, 0.1689, 0.462, 0.1838]}, {"w": "subnetwork", "b": [0.4686, 0.1689, 0.5624, 0.1838]}, {"w": "can", "b": [0.5691, 0.1689, 0.5974, 0.1838]}, {"w": "use", "b": [0.604, 0.1689, 0.6303, 0.1838]}, {"w": "the", "b": [0.637, 0.1689, 0.6631, 0.1838]}, {"w": "mean", "b": [0.6698, 0.1689, 0.7137, 0.1838]}, {"w": "squared", "b": [0.7204, 0.1689, 0.7839, 0.1838]}, {"w": "error", "b": [0.7905, 0.1689, 0.8304, 0.1838]}, {"w": "cost", "b": [0.8371, 0.1689, 0.8697, 0.1838]}, {"w": "C1.", "b": [0.1312, 0.1868, 0.1578, 0.2033]}, {"w": "The", "b": [0.1661, 0.1868, 0.198, 0.2018]}, {"w": "second", "b": [0.2041, 0.1868, 0.2577, 0.2018]}, {"w": "subnetwork", "b": [0.2639, 0.1868, 0.3561, 0.2018]}, {"w": "will", "b": [0.3623, 0.1868, 0.3911, 0.2018]}, {"w": "take", "b": [0.3972, 0.1868, 0.4312, 0.2018]}, {"w": "the", "b": [0.4373, 0.1868, 0.4631, 0.2018]}, {"w": "same", "b": [0.4692, 0.1868, 0.5094, 0.2018]}, {"w": "embedding", "b": [0.5156, 0.1868, 0.603, 0.2018]}, {"w": "vector", "b": [0.6092, 0.1868, 0.6586, 0.2018]}, {"w": "as", "b": [0.6648, 0.1868, 0.6813, 0.2018]}, {"w": "input,", "b": [0.6875, 0.1868, 0.7359, 0.2018]}, {"w": "and", "b": [0.742, 0.1868, 0.7718, 0.2018]}, {"w": "will", "b": [0.778, 0.1868, 0.8068, 0.2018]}, {"w": "predict", "b": [0.813, 0.1868, 0.8696, 0.2018]}, {"w": "the", "b": [0.1312, 0.2048, 0.1567, 0.2197]}, {"w": "probabilities", "b": [0.1629, 0.2048, 0.2619, 0.2197]}, {"w": "for", "b": [0.268, 0.2048, 0.29, 0.2197]}, {"w": "each", "b": [0.2962, 0.2048, 0.3313, 0.2197]}, {"w": "tag.", "b": [0.3375, 0.2048, 0.368, 0.2197]}, {"w": "It", "b": [0.3762, 0.2048, 0.39, 0.2197]}, {"w": "can", "b": [0.3961, 0.2048, 0.4236, 0.2197]}, {"w": "have", "b": [0.4298, 0.2048, 0.466, 0.2197]}, {"w": "a", "b": [0.4721, 0.2048, 0.4813, 0.2197]}, {"w": "softmax", "b": [0.4874, 0.2051, 0.5603, 0.22]}, {"w": "as", "b": [0.5666, 0.2048, 0.583, 0.2197]}, {"w": "the", "b": [0.5891, 0.2048, 0.6146, 0.2197]}, {"w": "last", "b": [0.6208, 0.2048, 0.6494, 0.2197]}, {"w": "layer,", "b": [0.6556, 0.2048, 0.6989, 0.2197]}, {"w": "which", "b": [0.7051, 0.2048, 0.7514, 0.2197]}, {"w": "is", "b": [0.7576, 0.2048, 0.7699, 0.2197]}, {"w": "appropriate", "b": [0.7761, 0.2048, 0.8689, 0.2197]}, {"w": "for", "b": [0.1312, 0.2227, 0.1529, 0.2377]}, {"w": "the", "b": [0.1591, 0.2227, 0.1842, 0.2377]}, {"w": "multiclass", "b": [0.1903, 0.223, 0.2817, 0.238]}, {"w": "classification,", "b": [0.2888, 0.2227, 0.4102, 0.238]}, {"w": "and", "b": [0.4163, 0.2227, 0.4455, 0.2377]}, {"w": "use", "b": [0.4516, 0.2227, 0.4769, 0.2377]}, {"w": "the", "b": [0.4831, 0.2227, 0.5082, 0.2377]}, {"w": "averaged", "b": [0.5144, 0.2227, 0.5833, 0.2377]}, {"w": "negative", "b": [0.5894, 0.223, 0.6663, 0.238]}, {"w": "log-likelihood", "b": [0.6734, 0.223, 0.7975, 0.238]}, {"w": "cost", "b": [0.8045, 0.223, 0.8412, 0.238]}, {"w": "C2", "b": [0.8473, 0.223, 0.8678, 0.2392]}, {"w": "(also", "b": [0.1291, 0.2406, 0.1672, 0.2556]}, {"w": "called", "b": [0.1734, 0.2406, 0.2196, 0.2556]}, {"w": "cross-entropy", "b": [0.2257, 0.241, 0.3492, 0.2559]}, {"w": "cost).", "b": [0.3554, 0.2406, 0.3997, 0.2556]}, {"w": "Alternatively,", "b": [0.4079, 0.2406, 0.5174, 0.2556]}, {"w": "the", "b": [0.5235, 0.2406, 0.5492, 0.2556]}, {"w": "coordinates", "b": [0.5554, 0.2406, 0.6475, 0.2556]}, {"w": "could", "b": [0.6537, 0.2406, 0.6968, 0.2556]}, {"w": "be", "b": [0.703, 0.2406, 0.722, 0.2556]}, {"w": "in", "b": [0.7281, 0.2406, 0.7436, 0.2556]}, {"w": "the", "b": [0.7497, 0.2406, 0.7754, 0.2556]}, {"w": "range", "b": [0.7816, 0.2406, 0.8258, 0.2556]}, {"w": "[0,", "b": [0.8317, 0.2406, 0.8513, 0.2559]}, {"w": "1]", "b": [0.8544, 0.2406, 0.8688, 0.2556]}, {"w": "(in", "b": [0.1291, 0.2586, 0.152, 0.2735]}, {"w": "which", "b": [0.1582, 0.2586, 0.2056, 0.2735]}, {"w": "case", "b": [0.2117, 0.2586, 0.2452, 0.2735]}, {"w": "the", "b": [0.2513, 0.2586, 0.2774, 0.2735]}, {"w": "layer", "b": [0.2836, 0.2586, 0.3227, 0.2735]}, {"w": "that", "b": [0.3289, 0.2586, 0.3632, 0.2735]}, {"w": "predicts", "b": [0.3694, 0.2586, 0.4342, 0.2735]}, {"w": "coordinates", "b": [0.4403, 0.2586, 0.5337, 0.2735]}, {"w": "will", "b": [0.5399, 0.2586, 0.5691, 0.2735]}, {"w": "have", "b": [0.5752, 0.2586, 0.6122, 0.2735]}, {"w": "four", "b": [0.6184, 0.2586, 0.6513, 0.2735]}, {"w": "logistic", "b": [0.6571, 0.2589, 0.7221, 0.2739]}, {"w": "sigmoid", "b": [0.7292, 0.2589, 0.8001, 0.2739]}, {"w": "outputs", "b": [0.8062, 0.2586, 0.8688, 0.2735]}]}, {"id": "b_2", "type": "paragraph", "text": "and average four binary cross-entropy cost functions), while the layer that predicts tags might solve a multi-label classification problem (in which case it would also have several sigmoid outputs and average several binary cross entropy costs, one per tag).", "words": [{"w": "and", "b": [0.1312, 0.2765, 0.1612, 0.2915]}, {"w": "average", "b": [0.1673, 0.2765, 0.2278, 0.2915]}, {"w": "four", "b": [0.234, 0.2765, 0.2665, 0.2915]}, {"w": "binary", "b": [0.2726, 0.2768, 0.3324, 0.2918]}, {"w": "cross-entropy", "b": [0.3394, 0.2768, 0.463, 0.2918]}, {"w": "cost", "b": [0.4691, 0.2765, 0.5012, 0.2915]}, {"w": "functions),", "b": [0.5074, 0.2765, 0.5937, 0.2915]}, {"w": "while", "b": [0.5999, 0.2765, 0.6422, 0.2915]}, {"w": "the", "b": [0.6484, 0.2765, 0.6742, 0.2915]}, {"w": "layer", "b": [0.6803, 0.2765, 0.7191, 0.2915]}, {"w": "that", "b": [0.7253, 0.2765, 0.7593, 0.2915]}, {"w": "predicts", "b": [0.7655, 0.2765, 0.8297, 0.2915]}, {"w": "tags", "b": [0.8358, 0.2765, 0.869, 0.2915]}, {"w": "might", "b": [0.1312, 0.2945, 0.1774, 0.3094]}, {"w": "solve", "b": [0.1836, 0.2945, 0.2222, 0.3094]}, {"w": "a", "b": [0.2284, 0.2945, 0.2375, 0.3094]}, {"w": "multi-label", "b": [0.2438, 0.2948, 0.3441, 0.3097]}, {"w": "classification", "b": [0.3511, 0.2948, 0.4675, 0.3097]}, {"w": "problem", "b": [0.4737, 0.2945, 0.5387, 0.3094]}, {"w": "(in", "b": [0.5448, 0.2945, 0.5672, 0.3094]}, {"w": "which", "b": [0.5733, 0.2945, 0.6195, 0.3094]}, {"w": "case", "b": [0.6257, 0.2945, 0.6583, 0.3094]}, {"w": "it", "b": [0.6644, 0.2945, 0.6766, 0.3094]}, {"w": "would", "b": [0.6827, 0.2945, 0.7299, 0.3094]}, {"w": "also", "b": [0.7361, 0.2945, 0.7666, 0.3094]}, {"w": "have", "b": [0.7728, 0.2945, 0.8088, 0.3094]}, {"w": "several", "b": [0.815, 0.2945, 0.8689, 0.3094]}, {"w": "sigmoid", "b": [0.1312, 0.3124, 0.1929, 0.3274]}, {"w": "outputs", "b": [0.199, 0.3124, 0.2606, 0.3274]}, {"w": "and", "b": [0.2668, 0.3124, 0.2965, 0.3274]}, {"w": "average", "b": [0.3027, 0.3124, 0.3627, 0.3274]}, {"w": "several", "b": [0.3689, 0.3124, 0.4234, 0.3274]}, {"w": "binary", "b": [0.4295, 0.3124, 0.4814, 0.3274]}, {"w": "cross", "b": [0.4875, 0.3124, 0.5268, 0.3274]}, {"w": "entropy", "b": [0.5329, 0.3124, 0.594, 0.3274]}, {"w": "costs,", "b": [0.6001, 0.3124, 0.6444, 0.3274]}, {"w": "one", "b": [0.6506, 0.3124, 0.6783, 0.3274]}, {"w": "per", "b": [0.6844, 0.3124, 0.7107, 0.3274]}, {"w": "tag).", "b": [0.7168, 0.3124, 0.7547, 0.3274]}]}, {"id": "b_3", "type": "paragraph", "text": "Obviously, you are interested in accurate predictions of both the coordinates and the tags. However, it is impossible to optimize two cost functions at once. By trying to improve one, you risk hurting the other one, and vice-versa. What you can do is add another hyperparameter γ, in the range (0, 1), and define the combined cost function as γ × C1 + (1 −γ) × C2. Then you tune the value for γ on the validation data, just like any other hyperparameter.", "words": [{"w": "Obviously,", "b": [0.1312, 0.3394, 0.2168, 0.3543]}, {"w": "you", "b": [0.223, 0.3394, 0.2522, 0.3543]}, {"w": "are", "b": [0.2583, 0.3394, 0.2834, 0.3543]}, {"w": "interested", "b": [0.2895, 0.3394, 0.3694, 0.3543]}, {"w": "in", "b": [0.3756, 0.3394, 0.3912, 0.3543]}, {"w": "accurate", "b": [0.3974, 0.3394, 0.4662, 0.3543]}, {"w": "predictions", "b": [0.4724, 0.3394, 0.5621, 0.3543]}, {"w": "of", "b": [0.5683, 0.3394, 0.5834, 0.3543]}, {"w": "both", "b": [0.5896, 0.3394, 0.6276, 0.3543]}, {"w": "the", "b": [0.6337, 0.3394, 0.6598, 0.3543]}, {"w": "coordinates", "b": [0.666, 0.3394, 0.7594, 0.3543]}, {"w": "and", "b": [0.7655, 0.3394, 0.7957, 0.3543]}, {"w": "the", "b": [0.8019, 0.3394, 0.8279, 0.3543]}, {"w": "tags.", "b": [0.8341, 0.3394, 0.8727, 0.3543]}, {"w": "However,", "b": [0.1312, 0.3573, 0.2031, 0.3723]}, {"w": "it", "b": [0.2081, 0.3573, 0.2202, 0.3723]}, {"w": "is", "b": [0.2249, 0.3573, 0.2371, 0.3723]}, {"w": "impossible", "b": [0.2418, 0.3573, 0.3239, 0.3723]}, {"w": "to", "b": [0.3287, 0.3573, 0.3447, 0.3723]}, {"w": "optimize", "b": [0.3495, 0.3573, 0.4168, 0.3723]}, {"w": "two", "b": [0.4215, 0.3573, 0.4496, 0.3723]}, {"w": "cost", "b": [0.4544, 0.3573, 0.4856, 0.3723]}, {"w": "functions", "b": [0.4903, 0.3573, 0.5623, 0.3723]}, {"w": "at", "b": [0.5671, 0.3573, 0.5831, 0.3723]}, {"w": "once.", "b": [0.5879, 0.3573, 0.6281, 0.3723]}, {"w": "By", "b": [0.6358, 0.3573, 0.6581, 0.3723]}, {"w": "trying", "b": [0.6629, 0.3573, 0.7107, 0.3723]}, {"w": "to", "b": [0.7154, 0.3573, 0.7315, 0.3723]}, {"w": "improve", "b": [0.7362, 0.3573, 0.799, 0.3723]}, {"w": "one,", "b": [0.8038, 0.3573, 0.8359, 0.3723]}, {"w": "you", "b": [0.8409, 0.3573, 0.8691, 0.3723]}, {"w": "risk", "b": [0.1312, 0.3752, 0.1604, 0.3902]}, {"w": "hurting", "b": [0.1665, 0.3752, 0.2251, 0.3902]}, {"w": "the", "b": [0.2312, 0.3752, 0.2566, 0.3902]}, {"w": "other", "b": [0.2628, 0.3752, 0.3046, 0.3902]}, {"w": "one,", "b": [0.3107, 0.3752, 0.3432, 0.3902]}, {"w": "and", "b": [0.3494, 0.3752, 0.3789, 0.3902]}, {"w": "vice-versa.", "b": [0.385, 0.3752, 0.4681, 0.3902]}, {"w": "What", "b": [0.4763, 0.3752, 0.5215, 0.3902]}, {"w": "you", "b": [0.5277, 0.3752, 0.5562, 0.3902]}, {"w": "can", "b": [0.5623, 0.3752, 0.5898, 0.3902]}, {"w": "do", "b": [0.5959, 0.3752, 0.6152, 0.3902]}, {"w": "is", "b": [0.6214, 0.3752, 0.6337, 0.3902]}, {"w": "add", "b": [0.6398, 0.3752, 0.6693, 0.3902]}, {"w": "another", "b": [0.6755, 0.3752, 0.7365, 0.3902]}, {"w": "hyperparameter", "b": [0.7427, 0.3752, 0.8695, 0.3902]}, {"w": "γ,", "b": [0.1312, 0.3932, 0.1468, 0.4084]}, {"w": "in", "b": [0.153, 0.3932, 0.1681, 0.4082]}, {"w": "the", "b": [0.1742, 0.3932, 0.1994, 0.4082]}, {"w": "range", "b": [0.2055, 0.3932, 0.2488, 0.4082]}, {"w": "(0,", "b": [0.2549, 0.3932, 0.2761, 0.4084]}, {"w": "1),", "b": [0.2792, 0.3932, 0.3003, 0.4082]}, {"w": "and", "b": [0.3065, 0.3932, 0.3357, 0.4082]}, {"w": "define", "b": [0.3418, 0.3932, 0.3881, 0.4082]}, {"w": "the", "b": [0.3942, 0.3932, 0.4194, 0.4082]}, {"w": "combined", "b": [0.4255, 0.3932, 0.5005, 0.4082]}, {"w": "cost", "b": [0.5066, 0.3932, 0.5379, 0.4082]}, {"w": "function", "b": [0.5441, 0.3932, 0.609, 0.4082]}, {"w": "as", "b": [0.6151, 0.3932, 0.6313, 0.4082]}, {"w": "γ", "b": [0.6373, 0.3935, 0.6468, 0.4084]}, {"w": "×", "b": [0.6519, 0.3933, 0.6663, 0.4082]}, {"w": "C1", "b": [0.6704, 0.3935, 0.6909, 0.4097]}, {"w": "+", "b": [0.6959, 0.3932, 0.71, 0.4082]}, {"w": "(1", "b": [0.7141, 0.3932, 0.7302, 0.4082]}, {"w": "−γ)", "b": [0.7343, 0.3932, 0.7703, 0.4084]}, {"w": "×", "b": [0.7744, 0.3933, 0.7888, 0.4082]}, {"w": "C2.", "b": [0.7929, 0.3932, 0.8193, 0.4097]}, {"w": "Then", "b": [0.8275, 0.3932, 0.8688, 0.4082]}, {"w": "you", "b": [0.1308, 0.4111, 0.1595, 0.4261]}, {"w": "tune", "b": [0.1656, 0.4111, 0.2015, 0.4261]}, {"w": "the", "b": [0.2077, 0.4111, 0.2333, 0.4261]}, {"w": "value", "b": [0.2395, 0.4111, 0.281, 0.4261]}, {"w": "for", "b": [0.2871, 0.4111, 0.3093, 0.4261]}, {"w": "γ", "b": [0.3153, 0.4114, 0.3249, 0.4264]}, {"w": "on", "b": [0.332, 0.4111, 0.3515, 0.4261]}, {"w": "the", "b": [0.3577, 0.4111, 0.3833, 0.4261]}, {"w": "validation", "b": [0.3895, 0.4111, 0.4689, 0.4261]}, {"w": "data,", "b": [0.4751, 0.4111, 0.5161, 0.4261]}, {"w": "just", "b": [0.5222, 0.4111, 0.5526, 0.4261]}, {"w": "like", "b": [0.5587, 0.4111, 0.5864, 0.4261]}, {"w": "any", "b": [0.5926, 0.4111, 0.6213, 0.4261]}, {"w": "other", "b": [0.6275, 0.4111, 0.6695, 0.4261]}, {"w": "hyperparameter.", "b": [0.6757, 0.4111, 0.8086, 0.4261]}]}, {"id": "b_4", "type": "paragraph", "text": "6.1.10 Transfer Learning", "words": [{"w": "6.1.10", "b": [0.1312, 0.4593, 0.1855, 0.4743]}, {"w": "Transfer", "b": [0.2067, 0.4593, 0.2838, 0.4743]}, {"w": "Learning", "b": [0.2909, 0.4593, 0.3725, 0.4743]}]}, {"id": "b_5", "type": "paragraph", "text": "Recall, transfer learning consists of using a pre-trained model to build a new model. Pre-trained models are usually created using big data available to its creators, usually large organizations, but not necessarily available to you. The parameters learned by the pre-trained models can be useful for your task.", "words": [{"w": "Recall,", "b": [0.1312, 0.4956, 0.1869, 0.5105]}, {"w": "transfer", "b": [0.1959, 0.4959, 0.2683, 0.5108]}, {"w": "learning", "b": [0.278, 0.4959, 0.3528, 0.5108]}, {"w": "consists", "b": [0.3614, 0.4956, 0.4245, 0.5105]}, {"w": "of", "b": [0.4329, 0.4956, 0.4481, 0.5105]}, {"w": "using", "b": [0.4566, 0.4956, 0.4996, 0.5105]}, {"w": "a", "b": [0.508, 0.4956, 0.5174, 0.5105]}, {"w": "pre-trained", "b": [0.5258, 0.4956, 0.6169, 0.5105]}, {"w": "model", "b": [0.6254, 0.4956, 0.6751, 0.5105]}, {"w": "to", "b": [0.6835, 0.4956, 0.7002, 0.5105]}, {"w": "build", "b": [0.7087, 0.4956, 0.7505, 0.5105]}, {"w": "a", "b": [0.7589, 0.4956, 0.7684, 0.5105]}, {"w": "new", "b": [0.7768, 0.4956, 0.8092, 0.5105]}, {"w": "model.", "b": [0.8177, 0.4956, 0.8726, 0.5105]}, {"w": "Pre-trained", "b": [0.1312, 0.5135, 0.2224, 0.5285]}, {"w": "models", "b": [0.2286, 0.5135, 0.2843, 0.5285]}, {"w": "are", "b": [0.2904, 0.5135, 0.315, 0.5285]}, {"w": "usually", "b": [0.3211, 0.5135, 0.3779, 0.5285]}, {"w": "created", "b": [0.384, 0.5135, 0.4423, 0.5285]}, {"w": "using", "b": [0.4484, 0.5135, 0.4904, 0.5285]}, {"w": "big", "b": [0.4965, 0.5135, 0.521, 0.5285]}, {"w": "data", "b": [0.5272, 0.5135, 0.5629, 0.5285]}, {"w": "available", "b": [0.569, 0.5135, 0.6384, 0.5285]}, {"w": "to", "b": [0.6446, 0.5135, 0.6609, 0.5285]}, {"w": "its", "b": [0.667, 0.5135, 0.6865, 0.5285]}, {"w": "creators,", "b": [0.6927, 0.5135, 0.7612, 0.5285]}, {"w": "usually", "b": [0.7674, 0.5135, 0.8241, 0.5285]}, {"w": "large", "b": [0.8303, 0.5135, 0.8691, 0.5285]}, {"w": "organizations,", "b": [0.1312, 0.5315, 0.2409, 0.5464]}, {"w": "but", "b": [0.2463, 0.5315, 0.2735, 0.5464]}, {"w": "not", "b": [0.2787, 0.5315, 0.3048, 0.5464]}, {"w": "necessarily", "b": [0.31, 0.5315, 0.3942, 0.5464]}, {"w": "available", "b": [0.3994, 0.5315, 0.4677, 0.5464]}, {"w": "to", "b": [0.4729, 0.5315, 0.489, 0.5464]}, {"w": "you.", "b": [0.4942, 0.5315, 0.5273, 0.5464]}, {"w": "The", "b": [0.5352, 0.5315, 0.5664, 0.5464]}, {"w": "parameters", "b": [0.5716, 0.5315, 0.6592, 0.5464]}, {"w": "learned", "b": [0.6644, 0.5315, 0.7218, 0.5464]}, {"w": "by", "b": [0.727, 0.5315, 0.7461, 0.5464]}, {"w": "the", "b": [0.7513, 0.5315, 0.7764, 0.5464]}, {"w": "pre-trained", "b": [0.7816, 0.5315, 0.8691, 0.5464]}, {"w": "models", "b": [0.1312, 0.5494, 0.1872, 0.5644]}, {"w": "can", "b": [0.1934, 0.5494, 0.2211, 0.5644]}, {"w": "be", "b": [0.2272, 0.5494, 0.2462, 0.5644]}, {"w": "useful", "b": [0.2523, 0.5494, 0.2991, 0.5644]}, {"w": "for", "b": [0.3053, 0.5494, 0.3274, 0.5644]}, {"w": "your", "b": [0.3335, 0.5494, 0.3695, 0.5644]}, {"w": "task.", "b": [0.3756, 0.5494, 0.4142, 0.5644]}]}, {"id": "b_6", "type": "equation", "text": "A pre-trained model can be used in two ways:", "words": [{"w": "A", "b": [0.1305, 0.5763, 0.1444, 0.5913]}, {"w": "pre-trained", "b": [0.1505, 0.5763, 0.2398, 0.5913]}, {"w": "model", "b": [0.246, 0.5763, 0.2947, 0.5913]}, {"w": "can", "b": [0.3008, 0.5763, 0.3285, 0.5913]}, {"w": "be", "b": [0.3347, 0.5763, 0.3537, 0.5913]}, {"w": "used", "b": [0.3598, 0.5763, 0.3958, 0.5913]}, {"w": "in", "b": [0.402, 0.5763, 0.4174, 0.5913]}, {"w": "two", "b": [0.4235, 0.5763, 0.4522, 0.5913]}, {"w": "ways:", "b": [0.4584, 0.5763, 0.502, 0.5913]}]}, {"id": "b_7", "type": "paragraph", "text": "1) its learned parameters can be used to initialize your own model, or 2) it can be used as a feature extractor for your model.", "words": [{"w": "1)", "b": [0.1517, 0.6032, 0.1681, 0.6182]}, {"w": "its", "b": [0.1774, 0.6032, 0.197, 0.6182]}, {"w": "learned", "b": [0.2031, 0.6032, 0.2616, 0.6182]}, {"w": "parameters", "b": [0.2678, 0.6032, 0.3572, 0.6182]}, {"w": "can", "b": [0.3633, 0.6032, 0.391, 0.6182]}, {"w": "be", "b": [0.3972, 0.6032, 0.4161, 0.6182]}, {"w": "used", "b": [0.4223, 0.6032, 0.4583, 0.6182]}, {"w": "to", "b": [0.4645, 0.6032, 0.4809, 0.6182]}, {"w": "initialize", "b": [0.487, 0.6032, 0.5557, 0.6182]}, {"w": "your", "b": [0.5619, 0.6032, 0.5978, 0.6182]}, {"w": "own", "b": [0.604, 0.6032, 0.6363, 0.6182]}, {"w": "model,", "b": [0.6424, 0.6032, 0.6962, 0.6182]}, {"w": "or", "b": [0.7024, 0.6032, 0.7188, 0.6182]}, {"w": "2)", "b": [0.1517, 0.6212, 0.1681, 0.6362]}, {"w": "it", "b": [0.1774, 0.6212, 0.1897, 0.6362]}, {"w": "can", "b": [0.1958, 0.6212, 0.2235, 0.6362]}, {"w": "be", "b": [0.2297, 0.6212, 0.2486, 0.6362]}, {"w": "used", "b": [0.2548, 0.6212, 0.2908, 0.6362]}, {"w": "as", "b": [0.2969, 0.6212, 0.3135, 0.6362]}, {"w": "a", "b": [0.3196, 0.6212, 0.3288, 0.6362]}, {"w": "feature", "b": [0.335, 0.6212, 0.3909, 0.6362]}, {"w": "extractor", "b": [0.3971, 0.6212, 0.4705, 0.6362]}, {"w": "for", "b": [0.4767, 0.6212, 0.4988, 0.6362]}, {"w": "your", "b": [0.5049, 0.6212, 0.5408, 0.6362]}, {"w": "model.", "b": [0.547, 0.6212, 0.6008, 0.6362]}]}, {"id": "b_8", "type": "equation", "text": "Using Pre-Trained Model as Initializer", "words": [{"w": "Using", "b": [0.1312, 0.6461, 0.1934, 0.664]}, {"w": "Pre-Trained", "b": [0.2017, 0.6461, 0.3321, 0.664]}, {"w": "Model", "b": [0.3404, 0.6461, 0.4093, 0.664]}, {"w": "as", "b": [0.4176, 0.6461, 0.4396, 0.664]}, {"w": "Initializer", "b": [0.4479, 0.6461, 0.5531, 0.664]}]}, {"id": "b_9", "type": "paragraph", "text": "As discussed, the choice of parameter initialization strategy affects the properties of the learned model. Pre-trained models, whether available on the Internet, or trained by you, usually perform well for solving the original learning problem.", "words": [{"w": "As", "b": [0.1305, 0.6765, 0.1521, 0.6915]}, {"w": "discussed,", "b": [0.1595, 0.6765, 0.2404, 0.6915]}, {"w": "the", "b": [0.2482, 0.6765, 0.2743, 0.6915]}, {"w": "choice", "b": [0.2818, 0.6765, 0.3315, 0.6915]}, {"w": "of", "b": [0.3389, 0.6765, 0.3541, 0.6915]}, {"w": "parameter", "b": [0.3615, 0.6765, 0.4453, 0.6915]}, {"w": "initialization", "b": [0.4527, 0.6765, 0.5563, 0.6915]}, {"w": "strategy", "b": [0.5637, 0.6765, 0.6303, 0.6915]}, {"w": "affects", "b": [0.6377, 0.6765, 0.6896, 0.6915]}, {"w": "the", "b": [0.697, 0.6765, 0.7232, 0.6915]}, {"w": "properties", "b": [0.7306, 0.6765, 0.813, 0.6915]}, {"w": "of", "b": [0.8204, 0.6765, 0.8356, 0.6915]}, {"w": "the", "b": [0.843, 0.6765, 0.8692, 0.6915]}, {"w": "learned", "b": [0.1312, 0.6945, 0.1909, 0.7094]}, {"w": "model.", "b": [0.1978, 0.6945, 0.2527, 0.7094]}, {"w": "Pre-trained", "b": [0.2629, 0.6945, 0.3564, 0.7094]}, {"w": "models,", "b": [0.3632, 0.6945, 0.4256, 0.7094]}, {"w": "whether", "b": [0.4326, 0.6945, 0.4985, 0.7094]}, {"w": "available", "b": [0.5054, 0.6945, 0.5765, 0.7094]}, {"w": "on", "b": [0.5834, 0.6945, 0.6033, 0.7094]}, {"w": "the", "b": [0.6101, 0.6945, 0.6363, 0.7094]}, {"w": "Internet,", "b": [0.6431, 0.6945, 0.7143, 0.7094]}, {"w": "or", "b": [0.7213, 0.6945, 0.7381, 0.7094]}, {"w": "trained", "b": [0.745, 0.6945, 0.8036, 0.7094]}, {"w": "by", "b": [0.8104, 0.6945, 0.8303, 0.7094]}, {"w": "you,", "b": [0.8372, 0.6945, 0.8717, 0.7094]}, {"w": "usually", "b": [0.1312, 0.7124, 0.1883, 0.7274]}, {"w": "perform", "b": [0.1944, 0.7124, 0.2581, 0.7274]}, {"w": "well", "b": [0.2642, 0.7124, 0.2955, 0.7274]}, {"w": "for", "b": [0.3017, 0.7124, 0.3238, 0.7274]}, {"w": "solving", "b": [0.3299, 0.7124, 0.3859, 0.7274]}, {"w": "the", "b": [0.3921, 0.7124, 0.4177, 0.7274]}, {"w": "original", "b": [0.4238, 0.7124, 0.4844, 0.7274]}, {"w": "learning", "b": [0.4905, 0.7124, 0.5552, 0.7274]}, {"w": "problem.", "b": [0.5614, 0.7124, 0.6321, 0.7274]}]}, {"id": "b_10", "type": "paragraph", "text": "If your current problem is similar to the one solved by the pre-trained model, chances are high that the optimal parameters for your current problem will not be too different from the pre- trained parameters, especially in the initial neural network layers (those closest to the input).", "words": [{"w": "If", "b": [0.1312, 0.7393, 0.1433, 0.7543]}, {"w": "your", "b": [0.1486, 0.7393, 0.1838, 0.7543]}, {"w": "current", "b": [0.189, 0.7393, 0.2459, 0.7543]}, {"w": "problem", "b": [0.2512, 0.7393, 0.3155, 0.7543]}, {"w": "is", "b": [0.3208, 0.7393, 0.333, 0.7543]}, {"w": "similar", "b": [0.3382, 0.7393, 0.3916, 0.7543]}, {"w": "to", "b": [0.3969, 0.7393, 0.413, 0.7543]}, {"w": "the", "b": [0.4182, 0.7393, 0.4434, 0.7543]}, {"w": "one", "b": [0.4486, 0.7393, 0.4758, 0.7543]}, {"w": "solved", "b": [0.481, 0.7393, 0.5294, 0.7543]}, {"w": "by", "b": [0.5346, 0.7393, 0.5537, 0.7543]}, {"w": "the", "b": [0.559, 0.7393, 0.5841, 0.7543]}, {"w": "pre-trained", "b": [0.5894, 0.7393, 0.6769, 0.7543]}, {"w": "model,", "b": [0.6822, 0.7393, 0.7349, 0.7543]}, {"w": "chances", "b": [0.7404, 0.7393, 0.8003, 0.7543]}, {"w": "are", "b": [0.8055, 0.7393, 0.8297, 0.7543]}, {"w": "high", "b": [0.835, 0.7393, 0.8691, 0.7543]}, {"w": "that", "b": [0.1312, 0.7573, 0.1648, 0.7722]}, {"w": "the", "b": [0.1709, 0.7573, 0.1963, 0.7722]}, {"w": "optimal", "b": [0.2025, 0.7573, 0.2635, 0.7722]}, {"w": "parameters", "b": [0.2696, 0.7573, 0.3582, 0.7722]}, {"w": "for", "b": [0.3644, 0.7573, 0.3863, 0.7722]}, {"w": "your", "b": [0.3925, 0.7573, 0.4281, 0.7722]}, {"w": "current", "b": [0.4343, 0.7573, 0.4918, 0.7722]}, {"w": "problem", "b": [0.4979, 0.7573, 0.563, 0.7722]}, {"w": "will", "b": [0.5692, 0.7573, 0.5976, 0.7722]}, {"w": "not", "b": [0.6038, 0.7573, 0.6302, 0.7722]}, {"w": "be", "b": [0.6364, 0.7573, 0.6552, 0.7722]}, {"w": "too", "b": [0.6614, 0.7573, 0.6873, 0.7722]}, {"w": "different", "b": [0.6934, 0.7573, 0.7596, 0.7722]}, {"w": "from", "b": [0.7657, 0.7573, 0.8028, 0.7722]}, {"w": "the", "b": [0.809, 0.7573, 0.8344, 0.7722]}, {"w": "pre-", "b": [0.8406, 0.7573, 0.8721, 0.7722]}, {"w": "trained", "b": [0.1312, 0.7752, 0.1876, 0.7902]}, {"w": "parameters,", "b": [0.1936, 0.7752, 0.2863, 0.7902]}, {"w": "especially", "b": [0.2923, 0.7752, 0.3678, 0.7902]}, {"w": "in", "b": [0.3738, 0.7752, 0.3889, 0.7902]}, {"w": "the", "b": [0.3949, 0.7752, 0.42, 0.7902]}, {"w": "initial", "b": [0.4261, 0.7752, 0.4723, 0.7902]}, {"w": "neural", "b": [0.4783, 0.7752, 0.5276, 0.7902]}, {"w": "network", "b": [0.5336, 0.7752, 0.5965, 0.7902]}, {"w": "layers", "b": [0.6025, 0.7752, 0.6474, 0.7902]}, {"w": "(those", "b": [0.6534, 0.7752, 0.7017, 0.7902]}, {"w": "closest", "b": [0.7077, 0.7752, 0.7592, 0.7902]}, {"w": "to", "b": [0.7652, 0.7752, 0.7813, 0.7902]}, {"w": "the", "b": [0.7873, 0.7752, 0.8124, 0.7902]}, {"w": "input).", "b": [0.8185, 0.7752, 0.8727, 0.7902]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 17", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "17", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 193, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "input layer", "words": [{"w": "input", "b": [0.2135, 0.1078, 0.2503, 0.1249]}, {"w": "layer", "b": [0.2142, 0.121, 0.2497, 0.1381]}]}, {"id": "b_1", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.2253, 0.2016, 0.2386, 0.2189]}]}, {"id": "b_2", "type": "paragraph", "text": "output", "words": [{"w": "output", "b": [0.6694, 0.1078, 0.7165, 0.1249]}]}, {"id": "b_3", "type": "paragraph", "text": "layer", "words": [{"w": "layer", "b": [0.6752, 0.121, 0.7106, 0.1381]}]}, {"id": "b_4", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.6863, 0.2016, 0.6995, 0.2189]}]}, {"id": "b_5", "type": "paragraph", "text": "... ... ...", "words": [{"w": "...", "b": [0.3406, 0.2272, 0.3538, 0.2446]}, {"w": "...", "b": [0.4558, 0.2272, 0.469, 0.2446]}, {"w": "...", "b": [0.5711, 0.2272, 0.5843, 0.2446]}]}, {"id": "b_6", "type": "paragraph", "text": "(a)", "words": [{"w": "(a)", "b": [0.1491, 0.101, 0.1705, 0.1184]}]}, {"id": "b_7", "type": "paragraph", "text": "input layer", "words": [{"w": "input", "b": [0.2135, 0.3295, 0.2503, 0.3467]}, {"w": "layer", "b": [0.2142, 0.3427, 0.2497, 0.3599]}]}, {"id": "b_8", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.2253, 0.4233, 0.2386, 0.4407]}]}, {"id": "b_9", "type": "paragraph", "text": "output", "words": [{"w": "output", "b": [0.7846, 0.3295, 0.8317, 0.3467]}]}, {"id": "b_10", "type": "paragraph", "text": "layer", "words": [{"w": "layer", "b": [0.7905, 0.3427, 0.8259, 0.3599]}]}, {"id": "b_11", "type": "paragraph", "text": "...", "words": [{"w": "...", "b": [0.8016, 0.4233, 0.8148, 0.4407]}]}, {"id": "b_12", "type": "paragraph", "text": "... ... ... ...", "words": [{"w": "...", "b": [0.3406, 0.449, 0.3538, 0.4663]}, {"w": "...", "b": [0.4558, 0.449, 0.469, 0.4663]}, {"w": "...", "b": [0.6863, 0.449, 0.6995, 0.4663]}, {"w": "...", "b": [0.571, 0.449, 0.5842, 0.4663]}]}, {"id": "b_13", "type": "paragraph", "text": "(b)", "words": [{"w": "(b)", "b": [0.1491, 0.3227, 0.1711, 0.3401]}]}, {"id": "b_14", "type": "paragraph", "text": "Figure 4: An illustration of transfer learning: (a) a pre-trained model and (b) your model, where you used the left part of the pre-trained model, and added new layers, including a different output layer tailored for your problem.", "words": [{"w": "Figure", "b": [0.1312, 0.5542, 0.1841, 0.5692]}, {"w": "4:", "b": [0.1903, 0.5542, 0.2048, 0.5692]}, {"w": "An", "b": [0.213, 0.5542, 0.2375, 0.5692]}, {"w": "illustration", "b": [0.2436, 0.5542, 0.3333, 0.5692]}, {"w": "of", "b": [0.3394, 0.5542, 0.3545, 0.5692]}, {"w": "transfer", "b": [0.3606, 0.5542, 0.4238, 0.5692]}, {"w": "learning:", "b": [0.43, 0.5542, 0.5008, 0.5692]}, {"w": "(a)", "b": [0.509, 0.5542, 0.5329, 0.5692]}, {"w": "a", "b": [0.5391, 0.5542, 0.5484, 0.5692]}, {"w": "pre-trained", "b": [0.5546, 0.5542, 0.6453, 0.5692]}, {"w": "model", "b": [0.6514, 0.5542, 0.7008, 0.5692]}, {"w": "and", "b": [0.7069, 0.5542, 0.7371, 0.5692]}, {"w": "(b)", "b": [0.7433, 0.5542, 0.7683, 0.5692]}, {"w": "your", "b": [0.7744, 0.5542, 0.8109, 0.5692]}, {"w": "model,", "b": [0.817, 0.5542, 0.8716, 0.5692]}, {"w": "where", "b": [0.1306, 0.5721, 0.1787, 0.5871]}, {"w": "you", "b": [0.1855, 0.5721, 0.2148, 0.5871]}, {"w": "used", "b": [0.2215, 0.5721, 0.2582, 0.5871]}, {"w": "the", "b": [0.2649, 0.5721, 0.2911, 0.5871]}, {"w": "left", "b": [0.2978, 0.5721, 0.3245, 0.5871]}, {"w": "part", "b": [0.3312, 0.5721, 0.3657, 0.5871]}, {"w": "of", "b": [0.3725, 0.5721, 0.3876, 0.5871]}, {"w": "the", "b": [0.3943, 0.5721, 0.4205, 0.5871]}, {"w": "pre-trained", "b": [0.4272, 0.5721, 0.5183, 0.5871]}, {"w": "model,", "b": [0.5251, 0.5721, 0.5799, 0.5871]}, {"w": "and", "b": [0.5868, 0.5721, 0.6171, 0.5871]}, {"w": "added", "b": [0.6239, 0.5721, 0.673, 0.5871]}, {"w": "new", "b": [0.6797, 0.5721, 0.7121, 0.5871]}, {"w": "layers,", "b": [0.7189, 0.5721, 0.7708, 0.5871]}, {"w": "including", "b": [0.7777, 0.5721, 0.853, 0.5871]}, {"w": "a", "b": [0.8597, 0.5721, 0.8691, 0.5871]}, {"w": "different", "b": [0.1312, 0.5901, 0.1979, 0.6051]}, {"w": "output", "b": [0.2041, 0.5901, 0.2584, 0.6051]}, {"w": "layer", "b": [0.2646, 0.5901, 0.3031, 0.6051]}, {"w": "tailored", "b": [0.3093, 0.5901, 0.3708, 0.6051]}, {"w": "for", "b": [0.377, 0.5901, 0.3991, 0.6051]}, {"w": "your", "b": [0.4052, 0.5901, 0.4412, 0.6051]}, {"w": "problem.", "b": [0.4473, 0.5901, 0.5181, 0.6051]}]}, {"id": "b_15", "type": "paragraph", "text": "The learning might go faster for your problem because gradient descent will search for the optimal parameter values in a smaller region of potentially good values.", "words": [{"w": "The", "b": [0.1306, 0.6403, 0.1628, 0.6553]}, {"w": "learning", "b": [0.1689, 0.6403, 0.2344, 0.6553]}, {"w": "might", "b": [0.2406, 0.6403, 0.2879, 0.6553]}, {"w": "go", "b": [0.294, 0.6403, 0.3127, 0.6553]}, {"w": "faster", "b": [0.3189, 0.6403, 0.3642, 0.6553]}, {"w": "for", "b": [0.3704, 0.6403, 0.3928, 0.6553]}, {"w": "your", "b": [0.399, 0.6403, 0.4354, 0.6553]}, {"w": "problem", "b": [0.4415, 0.6403, 0.5081, 0.6553]}, {"w": "because", "b": [0.5142, 0.6403, 0.5772, 0.6553]}, {"w": "gradient", "b": [0.5834, 0.6403, 0.6504, 0.6553]}, {"w": "descent", "b": [0.6566, 0.6403, 0.7165, 0.6553]}, {"w": "will", "b": [0.7226, 0.6403, 0.7517, 0.6553]}, {"w": "search", "b": [0.7579, 0.6403, 0.8084, 0.6553]}, {"w": "for", "b": [0.8146, 0.6403, 0.837, 0.6553]}, {"w": "the", "b": [0.8432, 0.6403, 0.8691, 0.6553]}, {"w": "optimal", "b": [0.1312, 0.6583, 0.1927, 0.6733]}, {"w": "parameter", "b": [0.1989, 0.6583, 0.281, 0.6733]}, {"w": "values", "b": [0.2872, 0.6583, 0.336, 0.6733]}, {"w": "in", "b": [0.3421, 0.6583, 0.3575, 0.6733]}, {"w": "a", "b": [0.3637, 0.6583, 0.3729, 0.6733]}, {"w": "smaller", "b": [0.3791, 0.6583, 0.4366, 0.6733]}, {"w": "region", "b": [0.4428, 0.6583, 0.4921, 0.6733]}, {"w": "of", "b": [0.4982, 0.6583, 0.5131, 0.6733]}, {"w": "potentially", "b": [0.5192, 0.6583, 0.6059, 0.6733]}, {"w": "good", "b": [0.612, 0.6583, 0.651, 0.6733]}, {"w": "values.", "b": [0.6571, 0.6583, 0.7111, 0.6733]}]}, {"id": "b_16", "type": "paragraph", "text": "If the pre-trained model was built using a training set much bigger than yours, searching in a region of potentially good values might also lead to a better generalization. Indeed, if some behavior of the model you want to build is not reflected in your training examples, this behavior could still be “inherited” from the pre-trained model.", "words": [{"w": "If", "b": [0.1312, 0.6852, 0.1438, 0.7002]}, {"w": "the", "b": [0.1504, 0.6852, 0.1765, 0.7002]}, {"w": "pre-trained", "b": [0.1831, 0.6852, 0.2742, 0.7002]}, {"w": "model", "b": [0.2808, 0.6852, 0.3304, 0.7002]}, {"w": "was", "b": [0.337, 0.6852, 0.3669, 0.7002]}, {"w": "built", "b": [0.3735, 0.6852, 0.4122, 0.7002]}, {"w": "using", "b": [0.4188, 0.6852, 0.4618, 0.7002]}, {"w": "a", "b": [0.4683, 0.6852, 0.4778, 0.7002]}, {"w": "training", "b": [0.4843, 0.6852, 0.5492, 0.7002]}, {"w": "set", "b": [0.5558, 0.6852, 0.5789, 0.7002]}, {"w": "much", "b": [0.5855, 0.6852, 0.6294, 0.7002]}, {"w": "bigger", "b": [0.636, 0.6852, 0.6863, 0.7002]}, {"w": "than", "b": [0.6929, 0.6852, 0.7305, 0.7002]}, {"w": "yours,", "b": [0.7371, 0.6852, 0.7864, 0.7002]}, {"w": "searching", "b": [0.7931, 0.6852, 0.8691, 0.7002]}, {"w": "in", "b": [0.1312, 0.7032, 0.1468, 0.7181]}, {"w": "a", "b": [0.153, 0.7032, 0.1623, 0.7181]}, {"w": "region", "b": [0.1685, 0.7032, 0.2185, 0.7181]}, {"w": "of", "b": [0.2246, 0.7032, 0.2397, 0.7181]}, {"w": "potentially", "b": [0.2458, 0.7032, 0.3337, 0.7181]}, {"w": "good", "b": [0.3399, 0.7032, 0.3794, 0.7181]}, {"w": "values", "b": [0.3855, 0.7032, 0.435, 0.7181]}, {"w": "might", "b": [0.4412, 0.7032, 0.4885, 0.7181]}, {"w": "also", "b": [0.4946, 0.7032, 0.5259, 0.7181]}, {"w": "lead", "b": [0.5321, 0.7032, 0.5654, 0.7181]}, {"w": "to", "b": [0.5715, 0.7032, 0.5881, 0.7181]}, {"w": "a", "b": [0.5943, 0.7032, 0.6037, 0.7181]}, {"w": "better", "b": [0.6098, 0.7032, 0.6593, 0.7181]}, {"w": "generalization.", "b": [0.6654, 0.7032, 0.784, 0.7181]}, {"w": "Indeed,", "b": [0.7922, 0.7032, 0.852, 0.7181]}, {"w": "if", "b": [0.8582, 0.7032, 0.8691, 0.7181]}, {"w": "some", "b": [0.1312, 0.7211, 0.1705, 0.7361]}, {"w": "behavior", "b": [0.1766, 0.7211, 0.2445, 0.7361]}, {"w": "of", "b": [0.2505, 0.7211, 0.2651, 0.7361]}, {"w": "the", "b": [0.2712, 0.7211, 0.2963, 0.7361]}, {"w": "model", "b": [0.3024, 0.7211, 0.3501, 0.7361]}, {"w": "you", "b": [0.3562, 0.7211, 0.3843, 0.7361]}, {"w": "want", "b": [0.3904, 0.7211, 0.4285, 0.7361]}, {"w": "to", "b": [0.4346, 0.7211, 0.4507, 0.7361]}, {"w": "build", "b": [0.4568, 0.7211, 0.497, 0.7361]}, {"w": "is", "b": [0.503, 0.7211, 0.5152, 0.7361]}, {"w": "not", "b": [0.5213, 0.7211, 0.5474, 0.7361]}, {"w": "reflected", "b": [0.5535, 0.7211, 0.6199, 0.7361]}, {"w": "in", "b": [0.6259, 0.7211, 0.641, 0.7361]}, {"w": "your", "b": [0.6471, 0.7211, 0.6823, 0.7361]}, {"w": "training", "b": [0.6884, 0.7211, 0.7507, 0.7361]}, {"w": "examples,", "b": [0.7568, 0.7211, 0.8338, 0.7361]}, {"w": "this", "b": [0.8399, 0.7211, 0.8691, 0.7361]}, {"w": "behavior", "b": [0.1312, 0.7391, 0.2005, 0.754]}, {"w": "could", "b": [0.2067, 0.7391, 0.2497, 0.754]}, {"w": "still", "b": [0.2559, 0.7391, 0.2857, 0.754]}, {"w": "be", "b": [0.2919, 0.7391, 0.3109, 0.754]}, {"w": "“inherited”", "b": [0.317, 0.7391, 0.4063, 0.754]}, {"w": "from", "b": [0.4124, 0.7391, 0.4499, 0.754]}, {"w": "the", "b": [0.4561, 0.7391, 0.4817, 0.754]}, {"w": "pre-trained", "b": [0.4878, 0.7391, 0.5772, 0.754]}, {"w": "model.", "b": [0.5833, 0.7391, 0.6371, 0.754]}]}, {"id": "b_17", "type": "equation", "text": "Using Pre-Trained Model as Feature Extractor", "words": [{"w": "Using", "b": [0.1312, 0.764, 0.1934, 0.7819]}, {"w": "Pre-Trained", "b": [0.2017, 0.764, 0.3321, 0.7819]}, {"w": "Model", "b": [0.3404, 0.764, 0.4093, 0.7819]}, {"w": "as", "b": [0.4176, 0.764, 0.4396, 0.7819]}, {"w": "Feature", "b": [0.4479, 0.764, 0.53, 0.7819]}, {"w": "Extractor", "b": [0.5383, 0.764, 0.6432, 0.7819]}]}, {"id": "b_18", "type": "paragraph", "text": "If you use a pre-trained model as an initializer for your model, it gives you more flexibility. The gradient descent will modify the parameters in all layers, and, potentially, reach a better performance for your problem. The downside of that is you will often end up training a very deep neural network.", "words": [{"w": "If", "b": [0.1312, 0.7929, 0.1437, 0.8079]}, {"w": "you", "b": [0.1498, 0.7929, 0.1788, 0.8079]}, {"w": "use", "b": [0.1849, 0.7929, 0.2109, 0.8079]}, {"w": "a", "b": [0.2171, 0.7929, 0.2264, 0.8079]}, {"w": "pre-trained", "b": [0.2325, 0.7929, 0.3227, 0.8079]}, {"w": "model", "b": [0.3289, 0.7929, 0.3781, 0.8079]}, {"w": "as", "b": [0.3842, 0.7929, 0.4009, 0.8079]}, {"w": "an", "b": [0.407, 0.7929, 0.4267, 0.8079]}, {"w": "initializer", "b": [0.4328, 0.7929, 0.5095, 0.8079]}, {"w": "for", "b": [0.5156, 0.7929, 0.538, 0.8079]}, {"w": "your", "b": [0.5441, 0.7929, 0.5804, 0.8079]}, {"w": "model,", "b": [0.5865, 0.7929, 0.6409, 0.8079]}, {"w": "it", "b": [0.647, 0.7929, 0.6595, 0.8079]}, {"w": "gives", "b": [0.6656, 0.7929, 0.7051, 0.8079]}, {"w": "you", "b": [0.7112, 0.7929, 0.7402, 0.8079]}, {"w": "more", "b": [0.7463, 0.7929, 0.7868, 0.8079]}, {"w": "flexibility.", "b": [0.7929, 0.7929, 0.8727, 0.8079]}, {"w": "The", "b": [0.1306, 0.8108, 0.1617, 0.8258]}, {"w": "gradient", "b": [0.1677, 0.8108, 0.2326, 0.8258]}, {"w": "descent", "b": [0.2386, 0.8108, 0.2965, 0.8258]}, {"w": "will", "b": [0.3025, 0.8108, 0.3306, 0.8258]}, {"w": "modify", "b": [0.3366, 0.8108, 0.3914, 0.8258]}, {"w": "the", "b": [0.3974, 0.8108, 0.4225, 0.8258]}, {"w": "parameters", "b": [0.4285, 0.8108, 0.5161, 0.8258]}, {"w": "in", "b": [0.5222, 0.8108, 0.5372, 0.8258]}, {"w": "all", "b": [0.5432, 0.8108, 0.5623, 0.8258]}, {"w": "layers,", "b": [0.5683, 0.8108, 0.6182, 0.8258]}, {"w": "and,", "b": [0.6243, 0.8108, 0.6584, 0.8258]}, {"w": "potentially,", "b": [0.6644, 0.8108, 0.7529, 0.8258]}, {"w": "reach", "b": [0.7589, 0.8108, 0.8006, 0.8258]}, {"w": "a", "b": [0.8066, 0.8108, 0.8157, 0.8258]}, {"w": "better", "b": [0.8217, 0.8108, 0.8695, 0.8258]}, {"w": "performance", "b": [0.1312, 0.8288, 0.2291, 0.8437]}, {"w": "for", "b": [0.2353, 0.8288, 0.257, 0.8437]}, {"w": "your", "b": [0.2632, 0.8288, 0.2985, 0.8437]}, {"w": "problem.", "b": [0.3046, 0.8288, 0.3742, 0.8437]}, {"w": "The", "b": [0.3824, 0.8288, 0.4137, 0.8437]}, {"w": "downside", "b": [0.4198, 0.8288, 0.492, 0.8437]}, {"w": "of", "b": [0.4981, 0.8288, 0.5128, 0.8437]}, {"w": "that", "b": [0.5189, 0.8288, 0.5522, 0.8437]}, {"w": "is", "b": [0.5583, 0.8288, 0.5705, 0.8437]}, {"w": "you", "b": [0.5767, 0.8288, 0.6049, 0.8437]}, {"w": "will", "b": [0.611, 0.8288, 0.6392, 0.8437]}, {"w": "often", "b": [0.6454, 0.8288, 0.6852, 0.8437]}, {"w": "end", "b": [0.6914, 0.8288, 0.7196, 0.8437]}, {"w": "up", "b": [0.7257, 0.8288, 0.7459, 0.8437]}, {"w": "training", "b": [0.7521, 0.8288, 0.8146, 0.8437]}, {"w": "a", "b": [0.8207, 0.8288, 0.8298, 0.8437]}, {"w": "very", "b": [0.836, 0.8288, 0.8698, 0.8437]}, {"w": "deep", "b": [0.1312, 0.8467, 0.1682, 0.8617]}, {"w": "neural", "b": [0.1743, 0.8467, 0.2246, 0.8617]}, {"w": "network.", "b": [0.2308, 0.8467, 0.3, 0.8617]}]}, {"id": "b_19", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 18", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "18", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 194, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Some pre-trained models contain hundreds of layers and millions of parameters. Training a large network like that can be challenging. It will definitely require a significant amount of computational resources. In addition, the problem of the vanishing gradient is more severe in a deep neural network than one with a couple hidden layers.", "words": [{"w": "Some", "b": [0.1312, 0.0881, 0.1744, 0.1031]}, {"w": "pre-trained", "b": [0.1805, 0.0881, 0.27, 0.1031]}, {"w": "models", "b": [0.2762, 0.0881, 0.3323, 0.1031]}, {"w": "contain", "b": [0.3384, 0.0881, 0.3975, 0.1031]}, {"w": "hundreds", "b": [0.4036, 0.0881, 0.4773, 0.1031]}, {"w": "of", "b": [0.4834, 0.0881, 0.4983, 0.1031]}, {"w": "layers", "b": [0.5045, 0.0881, 0.5504, 0.1031]}, {"w": "and", "b": [0.5565, 0.0881, 0.5863, 0.1031]}, {"w": "millions", "b": [0.5924, 0.0881, 0.6552, 0.1031]}, {"w": "of", "b": [0.6614, 0.0881, 0.6763, 0.1031]}, {"w": "parameters.", "b": [0.6824, 0.0881, 0.7771, 0.1031]}, {"w": "Training", "b": [0.7853, 0.0881, 0.8537, 0.1031]}, {"w": "a", "b": [0.8599, 0.0881, 0.8691, 0.1031]}, {"w": "large", "b": [0.1312, 0.106, 0.1705, 0.121]}, {"w": "network", "b": [0.1766, 0.106, 0.2412, 0.121]}, {"w": "like", "b": [0.2473, 0.106, 0.2752, 0.121]}, {"w": "that", "b": [0.2813, 0.106, 0.3154, 0.121]}, {"w": "can", "b": [0.3215, 0.106, 0.3494, 0.121]}, {"w": "be", "b": [0.3555, 0.106, 0.3746, 0.121]}, {"w": "challenging.", "b": [0.3808, 0.106, 0.4762, 0.121]}, {"w": "It", "b": [0.4844, 0.106, 0.4983, 0.121]}, {"w": "will", "b": [0.5045, 0.106, 0.5333, 0.121]}, {"w": "definitely", "b": [0.5395, 0.106, 0.6143, 0.121]}, {"w": "require", "b": [0.6204, 0.106, 0.6768, 0.121]}, {"w": "a", "b": [0.6829, 0.106, 0.6922, 0.121]}, {"w": "significant", "b": [0.6984, 0.106, 0.7805, 0.121]}, {"w": "amount", "b": [0.7866, 0.106, 0.848, 0.121]}, {"w": "of", "b": [0.8541, 0.106, 0.8691, 0.121]}, {"w": "computational", "b": [0.1312, 0.124, 0.2448, 0.1389]}, {"w": "resources.", "b": [0.2507, 0.124, 0.3274, 0.1389]}, {"w": "In", "b": [0.3355, 0.124, 0.3521, 0.1389]}, {"w": "addition,", "b": [0.358, 0.124, 0.4283, 0.1389]}, {"w": "the", "b": [0.4342, 0.124, 0.4594, 0.1389]}, {"w": "problem", "b": [0.4653, 0.124, 0.5296, 0.1389]}, {"w": "of", "b": [0.5355, 0.124, 0.5501, 0.1389]}, {"w": "the", "b": [0.556, 0.124, 0.5811, 0.1389]}, {"w": "vanishing", "b": [0.587, 0.124, 0.6609, 0.1389]}, {"w": "gradient", "b": [0.6668, 0.124, 0.7317, 0.1389]}, {"w": "is", "b": [0.7376, 0.124, 0.7498, 0.1389]}, {"w": "more", "b": [0.7557, 0.124, 0.7949, 0.1389]}, {"w": "severe", "b": [0.8008, 0.124, 0.8482, 0.1389]}, {"w": "in", "b": [0.854, 0.124, 0.8691, 0.1389]}, {"w": "a", "b": [0.1312, 0.1419, 0.1405, 0.1569]}, {"w": "deep", "b": [0.1466, 0.1419, 0.1835, 0.1569]}, {"w": "neural", "b": [0.1897, 0.1419, 0.24, 0.1569]}, {"w": "network", "b": [0.2462, 0.1419, 0.3103, 0.1569]}, {"w": "than", "b": [0.3164, 0.1419, 0.3533, 0.1569]}, {"w": "one", "b": [0.3595, 0.1419, 0.3872, 0.1569]}, {"w": "with", "b": [0.3933, 0.1419, 0.4292, 0.1569]}, {"w": "a", "b": [0.4354, 0.1419, 0.4446, 0.1569]}, {"w": "couple", "b": [0.4507, 0.1419, 0.502, 0.1569]}, {"w": "hidden", "b": [0.5082, 0.1419, 0.5625, 0.1569]}, {"w": "layers.", "b": [0.5687, 0.1419, 0.6196, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "If you have a limited amount of computational resources, you might prefer using some layers of the pre-trained model as feature extractors for your model. In practice, it means that you only keep several initial layers of the pre-trained model, those closest to and including the input layer. You keep their parameters “frozen,” that is, unchanged and unchangeable. Then you add new layers on top of the frozen layers, including the output layer appropriate for your task. Only the parameters of the new layers will be updated by gradient descent during training on your data.", "words": [{"w": "If", "b": [0.1312, 0.1689, 0.1433, 0.1838]}, {"w": "you", "b": [0.1495, 0.1689, 0.1777, 0.1838]}, {"w": "have", "b": [0.1838, 0.1689, 0.2196, 0.1838]}, {"w": "a", "b": [0.2257, 0.1689, 0.2348, 0.1838]}, {"w": "limited", "b": [0.241, 0.1689, 0.2964, 0.1838]}, {"w": "amount", "b": [0.3025, 0.1689, 0.3625, 0.1838]}, {"w": "of", "b": [0.3686, 0.1689, 0.3832, 0.1838]}, {"w": "computational", "b": [0.3894, 0.1689, 0.5033, 0.1838]}, {"w": "resources,", "b": [0.5094, 0.1689, 0.5863, 0.1838]}, {"w": "you", "b": [0.5925, 0.1689, 0.6207, 0.1838]}, {"w": "might", "b": [0.6268, 0.1689, 0.6727, 0.1838]}, {"w": "prefer", "b": [0.6788, 0.1689, 0.7248, 0.1838]}, {"w": "using", "b": [0.731, 0.1689, 0.7724, 0.1838]}, {"w": "some", "b": [0.7785, 0.1689, 0.8179, 0.1838]}, {"w": "layers", "b": [0.8241, 0.1689, 0.8691, 0.1838]}, {"w": "of", "b": [0.1312, 0.1868, 0.1461, 0.2018]}, {"w": "the", "b": [0.1523, 0.1868, 0.178, 0.2018]}, {"w": "pre-trained", "b": [0.1842, 0.1868, 0.2738, 0.2018]}, {"w": "model", "b": [0.2799, 0.1868, 0.3288, 0.2018]}, {"w": "as", "b": [0.3349, 0.1868, 0.3515, 0.2018]}, {"w": "feature", "b": [0.3575, 0.1871, 0.4225, 0.2021]}, {"w": "extractors", "b": [0.4296, 0.1871, 0.5232, 0.2021]}, {"w": "for", "b": [0.5294, 0.1868, 0.5515, 0.2018]}, {"w": "your", "b": [0.5577, 0.1868, 0.5938, 0.2018]}, {"w": "model.", "b": [0.5999, 0.1868, 0.6539, 0.2018]}, {"w": "In", "b": [0.6621, 0.1868, 0.6791, 0.2018]}, {"w": "practice,", "b": [0.6852, 0.1868, 0.7542, 0.2018]}, {"w": "it", "b": [0.7603, 0.1868, 0.7727, 0.2018]}, {"w": "means", "b": [0.7788, 0.1868, 0.8293, 0.2018]}, {"w": "that", "b": [0.8355, 0.1868, 0.8694, 0.2018]}, {"w": "you", "b": [0.1308, 0.2048, 0.1598, 0.2197]}, {"w": "only", "b": [0.1659, 0.2048, 0.2007, 0.2197]}, {"w": "keep", "b": [0.2068, 0.2048, 0.2432, 0.2197]}, {"w": "several", "b": [0.2493, 0.2048, 0.3045, 0.2197]}, {"w": "initial", "b": [0.3106, 0.2048, 0.3584, 0.2197]}, {"w": "layers", "b": [0.3645, 0.2048, 0.4109, 0.2197]}, {"w": "of", "b": [0.417, 0.2048, 0.432, 0.2197]}, {"w": "the", "b": [0.4382, 0.2048, 0.4641, 0.2197]}, {"w": "pre-trained", "b": [0.4703, 0.2048, 0.5606, 0.2197]}, {"w": "model,", "b": [0.5668, 0.2048, 0.6213, 0.2197]}, {"w": "those", "b": [0.6274, 0.2048, 0.6701, 0.2197]}, {"w": "closest", "b": [0.6762, 0.2048, 0.7293, 0.2197]}, {"w": "to", "b": [0.7355, 0.2048, 0.7521, 0.2197]}, {"w": "and", "b": [0.7582, 0.2048, 0.7883, 0.2197]}, {"w": "including", "b": [0.7944, 0.2048, 0.8692, 0.2197]}, {"w": "the", "b": [0.1312, 0.2227, 0.1571, 0.2377]}, {"w": "input", "b": [0.1633, 0.2227, 0.2068, 0.2377]}, {"w": "layer.", "b": [0.213, 0.2227, 0.257, 0.2377]}, {"w": "You", "b": [0.2653, 0.2227, 0.2974, 0.2377]}, {"w": "keep", "b": [0.3036, 0.2227, 0.3398, 0.2377]}, {"w": "their", "b": [0.346, 0.2227, 0.3844, 0.2377]}, {"w": "parameters", "b": [0.3905, 0.2227, 0.4808, 0.2377]}, {"w": "“frozen,”", "b": [0.487, 0.2227, 0.559, 0.2377]}, {"w": "that", "b": [0.5652, 0.2227, 0.5994, 0.2377]}, {"w": "is,", "b": [0.6055, 0.2227, 0.6233, 0.2377]}, {"w": "unchanged", "b": [0.6294, 0.2227, 0.7159, 0.2377]}, {"w": "and", "b": [0.7221, 0.2227, 0.7521, 0.2377]}, {"w": "unchangeable.", "b": [0.7583, 0.2227, 0.8727, 0.2377]}, {"w": "Then", "b": [0.1306, 0.2406, 0.1724, 0.2556]}, {"w": "you", "b": [0.1785, 0.2406, 0.207, 0.2556]}, {"w": "add", "b": [0.2132, 0.2406, 0.2428, 0.2556]}, {"w": "new", "b": [0.2489, 0.2406, 0.2805, 0.2556]}, {"w": "layers", "b": [0.2867, 0.2406, 0.3322, 0.2556]}, {"w": "on", "b": [0.3383, 0.2406, 0.3577, 0.2556]}, {"w": "top", "b": [0.3639, 0.2406, 0.3904, 0.2556]}, {"w": "of", "b": [0.3965, 0.2406, 0.4113, 0.2556]}, {"w": "the", "b": [0.4174, 0.2406, 0.4429, 0.2556]}, {"w": "frozen", "b": [0.4491, 0.2406, 0.4976, 0.2556]}, {"w": "layers,", "b": [0.5037, 0.2406, 0.5543, 0.2556]}, {"w": "including", "b": [0.5605, 0.2406, 0.6339, 0.2556]}, {"w": "the", "b": [0.64, 0.2406, 0.6655, 0.2556]}, {"w": "output", "b": [0.6717, 0.2406, 0.7257, 0.2556]}, {"w": "layer", "b": [0.7319, 0.2406, 0.7701, 0.2556]}, {"w": "appropriate", "b": [0.7763, 0.2406, 0.8691, 0.2556]}, {"w": "for", "b": [0.1312, 0.2586, 0.1538, 0.2735]}, {"w": "your", "b": [0.1601, 0.2586, 0.1968, 0.2735]}, {"w": "task.", "b": [0.2032, 0.2586, 0.2425, 0.2735]}, {"w": "Only", "b": [0.2514, 0.2586, 0.2916, 0.2735]}, {"w": "the", "b": [0.298, 0.2586, 0.3241, 0.2735]}, {"w": "parameters", "b": [0.3305, 0.2586, 0.4217, 0.2735]}, {"w": "of", "b": [0.4281, 0.2586, 0.4432, 0.2735]}, {"w": "the", "b": [0.4496, 0.2586, 0.4758, 0.2735]}, {"w": "new", "b": [0.4821, 0.2586, 0.5146, 0.2735]}, {"w": "layers", "b": [0.5209, 0.2586, 0.5676, 0.2735]}, {"w": "will", "b": [0.574, 0.2586, 0.6033, 0.2735]}, {"w": "be", "b": [0.6097, 0.2586, 0.629, 0.2735]}, {"w": "updated", "b": [0.6354, 0.2586, 0.7028, 0.2735]}, {"w": "by", "b": [0.7092, 0.2586, 0.7291, 0.2735]}, {"w": "gradient", "b": [0.7354, 0.2586, 0.803, 0.2735]}, {"w": "descent", "b": [0.8093, 0.2586, 0.8696, 0.2735]}, {"w": "during", "b": [0.1312, 0.2765, 0.1836, 0.2915]}, {"w": "training", "b": [0.1897, 0.2765, 0.2534, 0.2915]}, {"w": "on", "b": [0.2595, 0.2765, 0.279, 0.2915]}, {"w": "your", "b": [0.2852, 0.2765, 0.3211, 0.2915]}, {"w": "data.", "b": [0.3272, 0.2765, 0.3683, 0.2915]}]}, {"id": "b_2", "type": "paragraph", "text": "An illustration of the process is shown in Figure 4. The blue neural network is a pre-trained model. Some of the blue layers are reused in the new model with their parameters frozen; the green layers are added by the analyst and tailored to the problem at hand.", "words": [{"w": "An", "b": [0.1305, 0.3035, 0.1543, 0.3184]}, {"w": "illustration", "b": [0.1605, 0.3035, 0.2477, 0.3184]}, {"w": "of", "b": [0.2538, 0.3035, 0.2685, 0.3184]}, {"w": "the", "b": [0.2747, 0.3035, 0.3, 0.3184]}, {"w": "process", "b": [0.3062, 0.3035, 0.3636, 0.3184]}, {"w": "is", "b": [0.3698, 0.3035, 0.382, 0.3184]}, {"w": "shown", "b": [0.3882, 0.3035, 0.4374, 0.3184]}, {"w": "in", "b": [0.4436, 0.3035, 0.4587, 0.3184]}, {"w": "Figure", "b": [0.4649, 0.3035, 0.5163, 0.3184]}, {"w": "4.", "b": [0.5225, 0.3035, 0.5367, 0.3184]}, {"w": "The", "b": [0.5449, 0.3035, 0.5763, 0.3184]}, {"w": "blue", "b": [0.5824, 0.3035, 0.6159, 0.3184]}, {"w": "neural", "b": [0.622, 0.3035, 0.6717, 0.3184]}, {"w": "network", "b": [0.6778, 0.3035, 0.7411, 0.3184]}, {"w": "is", "b": [0.7473, 0.3035, 0.7595, 0.3184]}, {"w": "a", "b": [0.7657, 0.3035, 0.7748, 0.3184]}, {"w": "pre-trained", "b": [0.781, 0.3035, 0.8691, 0.3184]}, {"w": "model.", "b": [0.1312, 0.3214, 0.1861, 0.3364]}, {"w": "Some", "b": [0.1946, 0.3214, 0.2385, 0.3364]}, {"w": "of", "b": [0.2448, 0.3214, 0.26, 0.3364]}, {"w": "the", "b": [0.2662, 0.3214, 0.2924, 0.3364]}, {"w": "blue", "b": [0.2986, 0.3214, 0.3331, 0.3364]}, {"w": "layers", "b": [0.3394, 0.3214, 0.3861, 0.3364]}, {"w": "are", "b": [0.3924, 0.3214, 0.4175, 0.3364]}, {"w": "reused", "b": [0.4238, 0.3214, 0.4762, 0.3364]}, {"w": "in", "b": [0.4825, 0.3214, 0.4982, 0.3364]}, {"w": "the", "b": [0.5044, 0.3214, 0.5306, 0.3364]}, {"w": "new", "b": [0.5368, 0.3214, 0.5692, 0.3364]}, {"w": "model", "b": [0.5755, 0.3214, 0.6252, 0.3364]}, {"w": "with", "b": [0.6314, 0.3214, 0.668, 0.3364]}, {"w": "their", "b": [0.6743, 0.3214, 0.713, 0.3364]}, {"w": "parameters", "b": [0.7193, 0.3214, 0.8105, 0.3364]}, {"w": "frozen;", "b": [0.8167, 0.3214, 0.8717, 0.3364]}, {"w": "the", "b": [0.1312, 0.3394, 0.1569, 0.3543]}, {"w": "green", "b": [0.163, 0.3394, 0.2062, 0.3543]}, {"w": "layers", "b": [0.2123, 0.3394, 0.2581, 0.3543]}, {"w": "are", "b": [0.2643, 0.3394, 0.2889, 0.3543]}, {"w": "added", "b": [0.2951, 0.3394, 0.3433, 0.3543]}, {"w": "by", "b": [0.3494, 0.3394, 0.3689, 0.3543]}, {"w": "the", "b": [0.3751, 0.3394, 0.4007, 0.3543]}, {"w": "analyst", "b": [0.4068, 0.3394, 0.4649, 0.3543]}, {"w": "and", "b": [0.471, 0.3394, 0.5008, 0.3543]}, {"w": "tailored", "b": [0.5069, 0.3394, 0.5685, 0.3543]}, {"w": "to", "b": [0.5747, 0.3394, 0.5911, 0.3543]}, {"w": "the", "b": [0.5972, 0.3394, 0.6229, 0.3543]}, {"w": "problem", "b": [0.629, 0.3394, 0.6947, 0.3543]}, {"w": "at", "b": [0.7008, 0.3394, 0.7172, 0.3543]}, {"w": "hand.", "b": [0.7234, 0.3394, 0.7685, 0.3543]}]}, {"id": "b_3", "type": "paragraph", "text": "The analyst might decide to freeze the parameters of the entire blue part of the new network, and only train the parameters of the green part. Alternatively, several right-most blue layers could be set as trainable.", "words": [{"w": "The", "b": [0.1306, 0.3663, 0.1617, 0.3812]}, {"w": "analyst", "b": [0.1677, 0.3663, 0.2245, 0.3812]}, {"w": "might", "b": [0.2305, 0.3663, 0.2762, 0.3812]}, {"w": "decide", "b": [0.2821, 0.3663, 0.3314, 0.3812]}, {"w": "to", "b": [0.3373, 0.3663, 0.3534, 0.3812]}, {"w": "freeze", "b": [0.3593, 0.3663, 0.4041, 0.3812]}, {"w": "the", "b": [0.41, 0.3663, 0.4352, 0.3812]}, {"w": "parameters", "b": [0.4411, 0.3663, 0.5287, 0.3812]}, {"w": "of", "b": [0.5347, 0.3663, 0.5492, 0.3812]}, {"w": "the", "b": [0.5552, 0.3663, 0.5803, 0.3812]}, {"w": "entire", "b": [0.5862, 0.3663, 0.631, 0.3812]}, {"w": "blue", "b": [0.6369, 0.3663, 0.6701, 0.3812]}, {"w": "part", "b": [0.6761, 0.3663, 0.7093, 0.3812]}, {"w": "of", "b": [0.7152, 0.3663, 0.7298, 0.3812]}, {"w": "the", "b": [0.7357, 0.3663, 0.7608, 0.3812]}, {"w": "new", "b": [0.7668, 0.3663, 0.7979, 0.3812]}, {"w": "network,", "b": [0.8038, 0.3663, 0.8717, 0.3812]}, {"w": "and", "b": [0.1312, 0.3842, 0.1604, 0.3992]}, {"w": "only", "b": [0.1666, 0.3842, 0.2003, 0.3992]}, {"w": "train", "b": [0.2065, 0.3842, 0.2448, 0.3992]}, {"w": "the", "b": [0.2509, 0.3842, 0.2761, 0.3992]}, {"w": "parameters", "b": [0.2823, 0.3842, 0.3701, 0.3992]}, {"w": "of", "b": [0.3762, 0.3842, 0.3908, 0.3992]}, {"w": "the", "b": [0.397, 0.3842, 0.4222, 0.3992]}, {"w": "green", "b": [0.4283, 0.3842, 0.4707, 0.3992]}, {"w": "part.", "b": [0.4768, 0.3842, 0.5151, 0.3992]}, {"w": "Alternatively,", "b": [0.5233, 0.3842, 0.6306, 0.3992]}, {"w": "several", "b": [0.6368, 0.3842, 0.6903, 0.3992]}, {"w": "right-most", "b": [0.6964, 0.3842, 0.7786, 0.3992]}, {"w": "blue", "b": [0.7848, 0.3842, 0.818, 0.3992]}, {"w": "layers", "b": [0.8242, 0.3842, 0.8691, 0.3992]}, {"w": "could", "b": [0.1312, 0.4022, 0.1743, 0.4171]}, {"w": "be", "b": [0.1805, 0.4022, 0.1994, 0.4171]}, {"w": "set", "b": [0.2056, 0.4022, 0.2283, 0.4171]}, {"w": "as", "b": [0.2344, 0.4022, 0.2509, 0.4171]}, {"w": "trainable.", "b": [0.2571, 0.4022, 0.334, 0.4171]}]}, {"id": "b_4", "type": "paragraph", "text": "How many layers of the pre-trained model to use in the new model? Freeze how many layers? This is up to the analyst: it’s part of the decisions you’ll make about the architecture that will work best for your problem.", "words": [{"w": "How", "b": [0.1312, 0.4291, 0.1664, 0.444]}, {"w": "many", "b": [0.1721, 0.4291, 0.2153, 0.444]}, {"w": "layers", "b": [0.2211, 0.4291, 0.266, 0.444]}, {"w": "of", "b": [0.2718, 0.4291, 0.2863, 0.444]}, {"w": "the", "b": [0.2921, 0.4291, 0.3172, 0.444]}, {"w": "pre-trained", "b": [0.323, 0.4291, 0.4105, 0.444]}, {"w": "model", "b": [0.4163, 0.4291, 0.4641, 0.444]}, {"w": "to", "b": [0.4698, 0.4291, 0.4859, 0.444]}, {"w": "use", "b": [0.4917, 0.4291, 0.5169, 0.444]}, {"w": "in", "b": [0.5227, 0.4291, 0.5378, 0.444]}, {"w": "the", "b": [0.5435, 0.4291, 0.5687, 0.444]}, {"w": "new", "b": [0.5744, 0.4291, 0.6056, 0.444]}, {"w": "model?", "b": [0.6114, 0.4291, 0.6676, 0.444]}, {"w": "Freeze", "b": [0.6757, 0.4291, 0.7252, 0.444]}, {"w": "how", "b": [0.731, 0.4291, 0.7627, 0.444]}, {"w": "many", "b": [0.7684, 0.4291, 0.8116, 0.444]}, {"w": "layers?", "b": [0.8174, 0.4291, 0.8708, 0.444]}, {"w": "This", "b": [0.1306, 0.447, 0.1669, 0.462]}, {"w": "is", "b": [0.1731, 0.447, 0.1856, 0.462]}, {"w": "up", "b": [0.1917, 0.447, 0.2124, 0.462]}, {"w": "to", "b": [0.2186, 0.447, 0.2351, 0.462]}, {"w": "the", "b": [0.2413, 0.447, 0.2672, 0.462]}, {"w": "analyst:", "b": [0.2733, 0.447, 0.3371, 0.462]}, {"w": "it’s", "b": [0.3453, 0.447, 0.3703, 0.462]}, {"w": "part", "b": [0.3764, 0.447, 0.4106, 0.462]}, {"w": "of", "b": [0.4168, 0.447, 0.4318, 0.462]}, {"w": "the", "b": [0.4379, 0.447, 0.4638, 0.462]}, {"w": "decisions", "b": [0.47, 0.447, 0.5417, 0.462]}, {"w": "you’ll", "b": [0.5478, 0.447, 0.5923, 0.462]}, {"w": "make", "b": [0.5985, 0.447, 0.6409, 0.462]}, {"w": "about", "b": [0.6471, 0.447, 0.6942, 0.462]}, {"w": "the", "b": [0.7003, 0.447, 0.7262, 0.462]}, {"w": "architecture", "b": [0.7323, 0.447, 0.8293, 0.462]}, {"w": "that", "b": [0.8354, 0.447, 0.8696, 0.462]}, {"w": "will", "b": [0.1306, 0.465, 0.1593, 0.4799]}, {"w": "work", "b": [0.1654, 0.465, 0.2044, 0.4799]}, {"w": "best", "b": [0.2106, 0.465, 0.244, 0.4799]}, {"w": "for", "b": [0.2502, 0.465, 0.2723, 0.4799]}, {"w": "your", "b": [0.2784, 0.465, 0.3144, 0.4799]}, {"w": "problem.", "b": [0.3205, 0.465, 0.3913, 0.4799]}]}, {"id": "b_5", "type": "paragraph", "text": "6.2 Stacking Models", "words": [{"w": "6.2", "b": [0.1312, 0.5138, 0.1631, 0.5318]}, {"w": "Stacking", "b": [0.188, 0.5138, 0.2804, 0.5318]}, {"w": "Models", "b": [0.2887, 0.5138, 0.3674, 0.5318]}]}, {"id": "b_6", "type": "paragraph", "text": "Ensemble learning is training an ensemble model, which is a combination of several base models, each individually performing worse than the ensemble model.", "words": [{"w": "Ensemble", "b": [0.1312, 0.5527, 0.2196, 0.5677]}, {"w": "learning", "b": [0.2266, 0.5527, 0.3014, 0.5677]}, {"w": "is", "b": [0.3077, 0.5524, 0.32, 0.5674]}, {"w": "training", "b": [0.3261, 0.5524, 0.3891, 0.5674]}, {"w": "an", "b": [0.3952, 0.5524, 0.4145, 0.5674]}, {"w": "ensemble", "b": [0.4206, 0.5524, 0.4923, 0.5674]}, {"w": "model,", "b": [0.4984, 0.5524, 0.5517, 0.5674]}, {"w": "which", "b": [0.5578, 0.5524, 0.6039, 0.5674]}, {"w": "is", "b": [0.6101, 0.5524, 0.6224, 0.5674]}, {"w": "a", "b": [0.6285, 0.5524, 0.6376, 0.5674]}, {"w": "combination", "b": [0.6438, 0.5524, 0.7417, 0.5674]}, {"w": "of", "b": [0.7478, 0.5524, 0.7625, 0.5674]}, {"w": "several", "b": [0.7687, 0.5524, 0.8226, 0.5674]}, {"w": "base", "b": [0.8286, 0.5527, 0.8688, 0.5677]}, {"w": "models,", "b": [0.1312, 0.5703, 0.201, 0.5856]}, {"w": "each", "b": [0.2072, 0.5703, 0.2425, 0.5853]}, {"w": "individually", "b": [0.2487, 0.5703, 0.3441, 0.5853]}, {"w": "performing", "b": [0.3502, 0.5703, 0.4385, 0.5853]}, {"w": "worse", "b": [0.4447, 0.5703, 0.4894, 0.5853]}, {"w": "than", "b": [0.4956, 0.5703, 0.5325, 0.5853]}, {"w": "the", "b": [0.5386, 0.5703, 0.5643, 0.5853]}, {"w": "ensemble", "b": [0.5704, 0.5703, 0.6428, 0.5853]}, {"w": "model.", "b": [0.649, 0.5703, 0.7028, 0.5853]}]}, {"id": "b_7", "type": "paragraph", "text": "6.2.1 Types of Ensemble Learning", "words": [{"w": "6.2.1", "b": [0.1312, 0.6185, 0.1749, 0.6335]}, {"w": "Types", "b": [0.1961, 0.6185, 0.2519, 0.6335]}, {"w": "of", "b": [0.259, 0.6185, 0.2761, 0.6335]}, {"w": "Ensemble", "b": [0.2832, 0.6185, 0.3715, 0.6335]}, {"w": "Learning", "b": [0.3786, 0.6185, 0.4602, 0.6335]}]}, {"id": "b_8", "type": "paragraph", "text": "There are ensemble learning algorithms, such as random forest learning and gradient boosting. They train an ensemble of several hundred to thousands of weak models, and obtain a strong model that has a significantly better performance than the performance of each weak model. We will not discuss these algorithms here. If you are missing this knowledge, it can easily be found in a specialized machine learning book.3", "words": [{"w": "There", "b": [0.1306, 0.6548, 0.1787, 0.6697]}, {"w": "are", "b": [0.1862, 0.6548, 0.2114, 0.6697]}, {"w": "ensemble", "b": [0.2188, 0.6548, 0.2927, 0.6697]}, {"w": "learning", "b": [0.3002, 0.6548, 0.3661, 0.6697]}, {"w": "algorithms,", "b": [0.3736, 0.6548, 0.4658, 0.6697]}, {"w": "such", "b": [0.4735, 0.6548, 0.5098, 0.6697]}, {"w": "as", "b": [0.5172, 0.6548, 0.5341, 0.6697]}, {"w": "random", "b": [0.5413, 0.6551, 0.6123, 0.67]}, {"w": "forest", "b": [0.6208, 0.6551, 0.673, 0.67]}, {"w": "learning", "b": [0.6816, 0.6551, 0.7564, 0.67]}, {"w": "and", "b": [0.764, 0.6548, 0.7943, 0.6697]}, {"w": "gradient", "b": [0.8018, 0.6548, 0.8693, 0.6697]}, {"w": "boosting.", "b": [0.1312, 0.6727, 0.2066, 0.6877]}, {"w": "They", "b": [0.2154, 0.6727, 0.2577, 0.6877]}, {"w": "train", "b": [0.2641, 0.6727, 0.3039, 0.6877]}, {"w": "an", "b": [0.3102, 0.6727, 0.3301, 0.6877]}, {"w": "ensemble", "b": [0.3364, 0.6727, 0.4103, 0.6877]}, {"w": "of", "b": [0.4167, 0.6727, 0.4318, 0.6877]}, {"w": "several", "b": [0.4381, 0.6727, 0.4938, 0.6877]}, {"w": "hundred", "b": [0.5001, 0.6727, 0.5676, 0.6877]}, {"w": "to", "b": [0.574, 0.6727, 0.5907, 0.6877]}, {"w": "thousands", "b": [0.5971, 0.6727, 0.6799, 0.6877]}, {"w": "of", "b": [0.6862, 0.6727, 0.7014, 0.6877]}, {"w": "weak", "b": [0.7089, 0.673, 0.7549, 0.688]}, {"w": "models,", "b": [0.7622, 0.6727, 0.8321, 0.688]}, {"w": "and", "b": [0.8384, 0.6727, 0.8688, 0.6877]}, {"w": "obtain", "b": [0.1312, 0.6907, 0.1835, 0.7056]}, {"w": "a", "b": [0.1897, 0.6907, 0.1991, 0.7056]}, {"w": "strong", "b": [0.2054, 0.691, 0.2638, 0.7059]}, {"w": "model", "b": [0.2709, 0.691, 0.3272, 0.7059]}, {"w": "that", "b": [0.3334, 0.6907, 0.3679, 0.7056]}, {"w": "has", "b": [0.3741, 0.6907, 0.4014, 0.7056]}, {"w": "a", "b": [0.4075, 0.6907, 0.4169, 0.7056]}, {"w": "significantly", "b": [0.4231, 0.6907, 0.5215, 0.7056]}, {"w": "better", "b": [0.5277, 0.6907, 0.5774, 0.7056]}, {"w": "performance", "b": [0.5836, 0.6907, 0.6852, 0.7056]}, {"w": "than", "b": [0.6913, 0.6907, 0.729, 0.7056]}, {"w": "the", "b": [0.7352, 0.6907, 0.7613, 0.7056]}, {"w": "performance", "b": [0.7675, 0.6907, 0.869, 0.7056]}, {"w": "of", "b": [0.1312, 0.7086, 0.1464, 0.7236]}, {"w": "each", "b": [0.154, 0.7086, 0.1901, 0.7236]}, {"w": "weak", "b": [0.1978, 0.7086, 0.2386, 0.7236]}, {"w": "model.", "b": [0.2462, 0.7086, 0.3011, 0.7236]}, {"w": "We", "b": [0.3137, 0.7086, 0.3399, 0.7236]}, {"w": "will", "b": [0.3475, 0.7086, 0.3768, 0.7236]}, {"w": "not", "b": [0.3844, 0.7086, 0.4116, 0.7236]}, {"w": "discuss", "b": [0.4192, 0.7086, 0.476, 0.7236]}, {"w": "these", "b": [0.4837, 0.7086, 0.5256, 0.7236]}, {"w": "algorithms", "b": [0.5332, 0.7086, 0.6202, 0.7236]}, {"w": "here.", "b": [0.6278, 0.7086, 0.6676, 0.7236]}, {"w": "If", "b": [0.6803, 0.7086, 0.6928, 0.7236]}, {"w": "you", "b": [0.7004, 0.7086, 0.7297, 0.7236]}, {"w": "are", "b": [0.7374, 0.7086, 0.7625, 0.7236]}, {"w": "missing", "b": [0.7702, 0.7086, 0.831, 0.7236]}, {"w": "this", "b": [0.8386, 0.7086, 0.8691, 0.7236]}, {"w": "knowledge,", "b": [0.1312, 0.7266, 0.2194, 0.7415]}, {"w": "it", "b": [0.2256, 0.7266, 0.2379, 0.7415]}, {"w": "can", "b": [0.244, 0.7266, 0.2717, 0.7415]}, {"w": "easily", "b": [0.2779, 0.7266, 0.3226, 0.7415]}, {"w": "be", "b": [0.3287, 0.7266, 0.3477, 0.7415]}, {"w": "found", "b": [0.3539, 0.7266, 0.3995, 0.7415]}, {"w": "in", "b": [0.4056, 0.7266, 0.421, 0.7415]}, {"w": "a", "b": [0.4272, 0.7266, 0.4364, 0.7415]}, {"w": "specialized", "b": [0.4426, 0.7266, 0.5283, 0.7415]}, {"w": "machine", "b": [0.5345, 0.7266, 0.6006, 0.7415]}, {"w": "learning", "b": [0.6068, 0.7266, 0.6714, 0.7415]}, {"w": "book.3", "b": [0.6776, 0.7249, 0.7292, 0.7415]}]}, {"id": "b_9", "type": "paragraph", "text": "The reason why combining multiple models can bring better performance is that, when several uncorrelated models agree, they are more likely to agree on the correct outcome. The key word here is “uncorrelated.” Ideally, base models should be obtained by using different features, or be of a different nature — for example, SVM and random forest. Combining", "words": [{"w": "The", "b": [0.1306, 0.7535, 0.163, 0.7684]}, {"w": "reason", "b": [0.1708, 0.7535, 0.2232, 0.7684]}, {"w": "why", "b": [0.231, 0.7535, 0.2645, 0.7684]}, {"w": "combining", "b": [0.2722, 0.7535, 0.3564, 0.7684]}, {"w": "multiple", "b": [0.3642, 0.7535, 0.4317, 0.7684]}, {"w": "models", "b": [0.4395, 0.7535, 0.4965, 0.7684]}, {"w": "can", "b": [0.5043, 0.7535, 0.5325, 0.7684]}, {"w": "bring", "b": [0.5403, 0.7535, 0.5833, 0.7684]}, {"w": "better", "b": [0.591, 0.7535, 0.6408, 0.7684]}, {"w": "performance", "b": [0.6485, 0.7535, 0.7501, 0.7684]}, {"w": "is", "b": [0.7579, 0.7535, 0.7705, 0.7684]}, {"w": "that,", "b": [0.7783, 0.7535, 0.818, 0.7684]}, {"w": "when", "b": [0.8262, 0.7535, 0.8691, 0.7684]}, {"w": "several", "b": [0.1312, 0.7714, 0.1846, 0.7864]}, {"w": "uncorrelated", "b": [0.1907, 0.7714, 0.2893, 0.7864]}, {"w": "models", "b": [0.2953, 0.7714, 0.3502, 0.7864]}, {"w": "agree,", "b": [0.3562, 0.7714, 0.4025, 0.7864]}, {"w": "they", "b": [0.4085, 0.7714, 0.4432, 0.7864]}, {"w": "are", "b": [0.4492, 0.7714, 0.4734, 0.7864]}, {"w": "more", "b": [0.4794, 0.7714, 0.5187, 0.7864]}, {"w": "likely", "b": [0.5247, 0.7714, 0.5664, 0.7864]}, {"w": "to", "b": [0.5724, 0.7714, 0.5885, 0.7864]}, {"w": "agree", "b": [0.5945, 0.7714, 0.6358, 0.7864]}, {"w": "on", "b": [0.6418, 0.7714, 0.6609, 0.7864]}, {"w": "the", "b": [0.6669, 0.7714, 0.692, 0.7864]}, {"w": "correct", "b": [0.6981, 0.7714, 0.7525, 0.7864]}, {"w": "outcome.", "b": [0.7585, 0.7714, 0.8298, 0.7864]}, {"w": "The", "b": [0.838, 0.7714, 0.8691, 0.7864]}, {"w": "key", "b": [0.1312, 0.7894, 0.1586, 0.8043]}, {"w": "word", "b": [0.1647, 0.7894, 0.2045, 0.8043]}, {"w": "here", "b": [0.2107, 0.7894, 0.2448, 0.8043]}, {"w": "is", "b": [0.251, 0.7894, 0.2635, 0.8043]}, {"w": "“uncorrelated.”", "b": [0.2696, 0.7894, 0.3911, 0.8043]}, {"w": "Ideally,", "b": [0.3992, 0.7894, 0.4576, 0.8043]}, {"w": "base", "b": [0.4637, 0.7894, 0.499, 0.8043]}, {"w": "models", "b": [0.5051, 0.7894, 0.5615, 0.8043]}, {"w": "should", "b": [0.5676, 0.7894, 0.6204, 0.8043]}, {"w": "be", "b": [0.6265, 0.7894, 0.6456, 0.8043]}, {"w": "obtained", "b": [0.6518, 0.7894, 0.722, 0.8043]}, {"w": "by", "b": [0.7281, 0.7894, 0.7478, 0.8043]}, {"w": "using", "b": [0.7539, 0.7894, 0.7963, 0.8043]}, {"w": "different", "b": [0.8025, 0.7894, 0.8697, 0.8043]}, {"w": "features,", "b": [0.1312, 0.8073, 0.201, 0.8223]}, {"w": "or", "b": [0.2078, 0.8073, 0.2246, 0.8223]}, {"w": "be", "b": [0.2312, 0.8073, 0.2506, 0.8223]}, {"w": "of", "b": [0.2572, 0.8073, 0.2724, 0.8223]}, {"w": "a", "b": [0.2791, 0.8073, 0.2885, 0.8223]}, {"w": "different", "b": [0.2951, 0.8073, 0.3632, 0.8223]}, {"w": "nature", "b": [0.3698, 0.8073, 0.4232, 0.8223]}, {"w": "—", "b": [0.4299, 0.8073, 0.4487, 0.8223]}, {"w": "for", "b": [0.4554, 0.8073, 0.4779, 0.8223]}, {"w": "example,", "b": [0.4846, 0.8073, 0.5573, 0.8223]}, {"w": "SVM", "b": [0.5641, 0.8073, 0.6059, 0.8223]}, {"w": "and", "b": [0.6126, 0.8073, 0.6429, 0.8223]}, {"w": "random", "b": [0.6496, 0.8073, 0.7124, 0.8223]}, {"w": "forest.", "b": [0.719, 0.8073, 0.7699, 0.8223]}, {"w": "Combining", "b": [0.7797, 0.8073, 0.8691, 0.8223]}]}, {"id": "b_10", "type": "paragraph", "text": "3You can read about ensemble learning algorithms in Chapter 7 of The Hundred-Page Machine Learning Book.", "words": [{"w": "3You", "b": [0.1518, 0.8344, 0.1863, 0.8482]}, {"w": "can", "b": [0.1915, 0.8363, 0.2148, 0.8482]}, {"w": "read", "b": [0.2201, 0.8363, 0.2495, 0.8482]}, {"w": "about", "b": [0.2547, 0.8363, 0.294, 0.8482]}, {"w": "ensemble", "b": [0.2993, 0.8363, 0.3603, 0.8482]}, {"w": "learning", "b": [0.3656, 0.8363, 0.4201, 0.8482]}, {"w": "algorithms", "b": [0.4253, 0.8363, 0.4972, 0.8482]}, {"w": "in", "b": [0.5024, 0.8363, 0.5154, 0.8482]}, {"w": "Chapter", "b": [0.5206, 0.8363, 0.576, 0.8482]}, {"w": "7", "b": [0.5812, 0.8363, 0.589, 0.8482]}, {"w": "of", "b": [0.5942, 0.8363, 0.6068, 0.8482]}, {"w": "The", "b": [0.612, 0.8363, 0.6388, 0.8482]}, {"w": "Hundred-Page", "b": [0.644, 0.8363, 0.7411, 0.8482]}, {"w": "Machine", "b": [0.7463, 0.8363, 0.8034, 0.8482]}, {"w": "Learning", "b": [0.8086, 0.8363, 0.8685, 0.8482]}, {"w": "Book.", "b": [0.1312, 0.8505, 0.1711, 0.8624]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 19", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "19", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 195, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "different versions of the decision tree learning algorithm, or several SVMs with different hyperparameters, may not result in a significant performance boost.", "words": [{"w": "different", "b": [0.1312, 0.0881, 0.1993, 0.1031]}, {"w": "versions", "b": [0.2068, 0.0881, 0.2719, 0.1031]}, {"w": "of", "b": [0.2794, 0.0881, 0.2946, 0.1031]}, {"w": "the", "b": [0.3021, 0.0881, 0.3283, 0.1031]}, {"w": "decision", "b": [0.3358, 0.0881, 0.4007, 0.1031]}, {"w": "tree", "b": [0.4083, 0.0881, 0.4397, 0.1031]}, {"w": "learning", "b": [0.4472, 0.0881, 0.5132, 0.1031]}, {"w": "algorithm,", "b": [0.5207, 0.0881, 0.6054, 0.1031]}, {"w": "or", "b": [0.6133, 0.0881, 0.6301, 0.1031]}, {"w": "several", "b": [0.6376, 0.0881, 0.6932, 0.1031]}, {"w": "SVMs", "b": [0.7007, 0.0881, 0.75, 0.1031]}, {"w": "with", "b": [0.7575, 0.0881, 0.7941, 0.1031]}, {"w": "different", "b": [0.8016, 0.0881, 0.8696, 0.1031]}, {"w": "hyperparameters,", "b": [0.1312, 0.106, 0.2715, 0.121]}, {"w": "may", "b": [0.2776, 0.106, 0.3114, 0.121]}, {"w": "not", "b": [0.3176, 0.106, 0.3442, 0.121]}, {"w": "result", "b": [0.3504, 0.106, 0.3957, 0.121]}, {"w": "in", "b": [0.4018, 0.106, 0.4172, 0.121]}, {"w": "a", "b": [0.4234, 0.106, 0.4326, 0.121]}, {"w": "significant", "b": [0.4387, 0.106, 0.5204, 0.121]}, {"w": "performance", "b": [0.5265, 0.106, 0.6261, 0.121]}, {"w": "boost.", "b": [0.6323, 0.106, 0.6816, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "The goal of ensemble learning is to learn to combine the strengths of each base model. There are three ways to combine weakly correlated models into an ensemble model: 1) averaging, 2) majority vote, and 3) model stacking.", "words": [{"w": "The", "b": [0.1306, 0.133, 0.1617, 0.1479]}, {"w": "goal", "b": [0.1677, 0.133, 0.1998, 0.1479]}, {"w": "of", "b": [0.2058, 0.133, 0.2204, 0.1479]}, {"w": "ensemble", "b": [0.2263, 0.133, 0.2973, 0.1479]}, {"w": "learning", "b": [0.3033, 0.133, 0.3666, 0.1479]}, {"w": "is", "b": [0.3726, 0.133, 0.3848, 0.1479]}, {"w": "to", "b": [0.3907, 0.133, 0.4068, 0.1479]}, {"w": "learn", "b": [0.4128, 0.133, 0.452, 0.1479]}, {"w": "to", "b": [0.458, 0.133, 0.4741, 0.1479]}, {"w": "combine", "b": [0.48, 0.133, 0.5448, 0.1479]}, {"w": "the", "b": [0.5508, 0.133, 0.5759, 0.1479]}, {"w": "strengths", "b": [0.5819, 0.133, 0.6545, 0.1479]}, {"w": "of", "b": [0.6605, 0.133, 0.6751, 0.1479]}, {"w": "each", "b": [0.6811, 0.133, 0.7157, 0.1479]}, {"w": "base", "b": [0.7217, 0.133, 0.756, 0.1479]}, {"w": "model.", "b": [0.7619, 0.133, 0.8147, 0.1479]}, {"w": "There", "b": [0.8228, 0.133, 0.8691, 0.1479]}, {"w": "are", "b": [0.1312, 0.1509, 0.1554, 0.1659]}, {"w": "three", "b": [0.1613, 0.1509, 0.2015, 0.1659]}, {"w": "ways", "b": [0.2074, 0.1509, 0.2451, 0.1659]}, {"w": "to", "b": [0.251, 0.1509, 0.2671, 0.1659]}, {"w": "combine", "b": [0.2729, 0.1509, 0.3377, 0.1659]}, {"w": "weakly", "b": [0.3436, 0.1509, 0.3974, 0.1659]}, {"w": "correlated", "b": [0.4032, 0.1509, 0.4817, 0.1659]}, {"w": "models", "b": [0.4876, 0.1509, 0.5425, 0.1659]}, {"w": "into", "b": [0.5483, 0.1509, 0.5789, 0.1659]}, {"w": "an", "b": [0.5848, 0.1509, 0.6039, 0.1659]}, {"w": "ensemble", "b": [0.6097, 0.1509, 0.6807, 0.1659]}, {"w": "model:", "b": [0.6866, 0.1509, 0.7393, 0.1659]}, {"w": "1)", "b": [0.7474, 0.1509, 0.7635, 0.1659]}, {"w": "averaging,", "b": [0.7693, 0.1509, 0.8492, 0.1659]}, {"w": "2)", "b": [0.8552, 0.1509, 0.8712, 0.1659]}, {"w": "majority", "b": [0.1312, 0.1689, 0.2, 0.1838]}, {"w": "vote,", "b": [0.2061, 0.1689, 0.2451, 0.1838]}, {"w": "and", "b": [0.2512, 0.1689, 0.281, 0.1838]}, {"w": "3)", "b": [0.2871, 0.1689, 0.3035, 0.1838]}, {"w": "model", "b": [0.3097, 0.1689, 0.3584, 0.1838]}, {"w": "stacking.", "b": [0.3645, 0.1689, 0.4354, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "Averaging works for regression, as well as those classification models that return classification scores. It consists of applying all your base models to the input x, and then averaging the predictions. To see if the averaged model works better than each individual algorithm, you can test it on the validation set using a metric of your choice.", "words": [{"w": "Averaging", "b": [0.1312, 0.1961, 0.2232, 0.211]}, {"w": "works", "b": [0.2279, 0.1958, 0.2733, 0.2107]}, {"w": "for", "b": [0.2778, 0.1958, 0.2995, 0.2107]}, {"w": "regression,", "b": [0.304, 0.1958, 0.3868, 0.2107]}, {"w": "as", "b": [0.3916, 0.1958, 0.4078, 0.2107]}, {"w": "well", "b": [0.4124, 0.1958, 0.443, 0.2107]}, {"w": "as", "b": [0.4475, 0.1958, 0.4637, 0.2107]}, {"w": "those", "b": [0.4683, 0.1958, 0.5096, 0.2107]}, {"w": "classification", "b": [0.5141, 0.1958, 0.6138, 0.2107]}, {"w": "models", "b": [0.6184, 0.1958, 0.6733, 0.2107]}, {"w": "that", "b": [0.6778, 0.1958, 0.711, 0.2107]}, {"w": "return", "b": [0.7155, 0.1958, 0.7649, 0.2107]}, {"w": "classification", "b": [0.7694, 0.1958, 0.8691, 0.2107]}, {"w": "scores.", "b": [0.1312, 0.2137, 0.1846, 0.2287]}, {"w": "It", "b": [0.1928, 0.2137, 0.2069, 0.2287]}, {"w": "consists", "b": [0.213, 0.2137, 0.2758, 0.2287]}, {"w": "of", "b": [0.282, 0.2137, 0.2971, 0.2287]}, {"w": "applying", "b": [0.3032, 0.2137, 0.3735, 0.2287]}, {"w": "all", "b": [0.3796, 0.2137, 0.3994, 0.2287]}, {"w": "your", "b": [0.4056, 0.2137, 0.442, 0.2287]}, {"w": "base", "b": [0.4482, 0.2137, 0.4837, 0.2287]}, {"w": "models", "b": [0.4899, 0.2137, 0.5467, 0.2287]}, {"w": "to", "b": [0.5528, 0.2137, 0.5695, 0.2287]}, {"w": "the", "b": [0.5757, 0.2137, 0.6017, 0.2287]}, {"w": "input", "b": [0.6078, 0.2137, 0.6516, 0.2287]}, {"w": "x,", "b": [0.6575, 0.2137, 0.674, 0.229]}, {"w": "and", "b": [0.6801, 0.2137, 0.7103, 0.2287]}, {"w": "then", "b": [0.7165, 0.2137, 0.7529, 0.2287]}, {"w": "averaging", "b": [0.7591, 0.2137, 0.8367, 0.2287]}, {"w": "the", "b": [0.8428, 0.2137, 0.8689, 0.2287]}, {"w": "predictions.", "b": [0.1312, 0.2317, 0.2251, 0.2466]}, {"w": "To", "b": [0.2333, 0.2317, 0.2544, 0.2466]}, {"w": "see", "b": [0.2605, 0.2317, 0.2843, 0.2466]}, {"w": "if", "b": [0.2905, 0.2317, 0.3013, 0.2466]}, {"w": "the", "b": [0.3074, 0.2317, 0.3332, 0.2466]}, {"w": "averaged", "b": [0.3393, 0.2317, 0.4099, 0.2466]}, {"w": "model", "b": [0.4161, 0.2317, 0.465, 0.2466]}, {"w": "works", "b": [0.4711, 0.2317, 0.5176, 0.2466]}, {"w": "better", "b": [0.5237, 0.2317, 0.5727, 0.2466]}, {"w": "than", "b": [0.5788, 0.2317, 0.6159, 0.2466]}, {"w": "each", "b": [0.6221, 0.2317, 0.6576, 0.2466]}, {"w": "individual", "b": [0.6637, 0.2317, 0.7446, 0.2466]}, {"w": "algorithm,", "b": [0.7507, 0.2317, 0.8341, 0.2466]}, {"w": "you", "b": [0.8403, 0.2317, 0.8691, 0.2466]}, {"w": "can", "b": [0.1312, 0.2496, 0.1589, 0.2646]}, {"w": "test", "b": [0.1651, 0.2496, 0.1949, 0.2646]}, {"w": "it", "b": [0.2011, 0.2496, 0.2134, 0.2646]}, {"w": "on", "b": [0.2195, 0.2496, 0.239, 0.2646]}, {"w": "the", "b": [0.2452, 0.2496, 0.2708, 0.2646]}, {"w": "validation", "b": [0.2769, 0.2496, 0.3564, 0.2646]}, {"w": "set", "b": [0.3626, 0.2496, 0.3852, 0.2646]}, {"w": "using", "b": [0.3914, 0.2496, 0.4335, 0.2646]}, {"w": "a", "b": [0.4397, 0.2496, 0.4489, 0.2646]}, {"w": "metric", "b": [0.4551, 0.2496, 0.5064, 0.2646]}, {"w": "of", "b": [0.5125, 0.2496, 0.5274, 0.2646]}, {"w": "your", "b": [0.5336, 0.2496, 0.5695, 0.2646]}, {"w": "choice.", "b": [0.5757, 0.2496, 0.6295, 0.2646]}]}, {"id": "b_3", "type": "paragraph", "text": "Majority vote works for classification models. It consists of applying all your base models to the input x, and then returning the majority class among all predictions. In the case of a tie, you can either randomly pick one of the classes, or return an error message if misclassifying would incur a significant loss for the business.", "words": [{"w": "Majority", "b": [0.1312, 0.2768, 0.2129, 0.2918]}, {"w": "vote", "b": [0.2187, 0.2768, 0.2579, 0.2918]}, {"w": "works", "b": [0.2629, 0.2765, 0.3083, 0.2915]}, {"w": "for", "b": [0.3133, 0.2765, 0.335, 0.2915]}, {"w": "classification", "b": [0.34, 0.2765, 0.4397, 0.2915]}, {"w": "models.", "b": [0.4448, 0.2765, 0.5047, 0.2915]}, {"w": "It", "b": [0.5125, 0.2765, 0.5261, 0.2915]}, {"w": "consists", "b": [0.5311, 0.2765, 0.5918, 0.2915]}, {"w": "of", "b": [0.5968, 0.2765, 0.6114, 0.2915]}, {"w": "applying", "b": [0.6164, 0.2765, 0.6843, 0.2915]}, {"w": "all", "b": [0.6893, 0.2765, 0.7084, 0.2915]}, {"w": "your", "b": [0.7135, 0.2765, 0.7487, 0.2915]}, {"w": "base", "b": [0.7537, 0.2765, 0.788, 0.2915]}, {"w": "models", "b": [0.793, 0.2765, 0.8479, 0.2915]}, {"w": "to", "b": [0.853, 0.2765, 0.8691, 0.2915]}, {"w": "the", "b": [0.1312, 0.2945, 0.1564, 0.3094]}, {"w": "input", "b": [0.1624, 0.2945, 0.2046, 0.3094]}, {"w": "x,", "b": [0.2106, 0.2945, 0.2269, 0.3097]}, {"w": "and", "b": [0.2329, 0.2945, 0.2621, 0.3094]}, {"w": "then", "b": [0.2681, 0.2945, 0.3033, 0.3094]}, {"w": "returning", "b": [0.3093, 0.2945, 0.3828, 0.3094]}, {"w": "the", "b": [0.3888, 0.2945, 0.4139, 0.3094]}, {"w": "majority", "b": [0.4199, 0.2945, 0.4873, 0.3094]}, {"w": "class", "b": [0.4933, 0.2945, 0.5297, 0.3094]}, {"w": "among", "b": [0.5357, 0.2945, 0.5879, 0.3094]}, {"w": "all", "b": [0.594, 0.2945, 0.6131, 0.3094]}, {"w": "predictions.", "b": [0.6191, 0.2945, 0.7107, 0.3094]}, {"w": "In", "b": [0.7188, 0.2945, 0.7354, 0.3094]}, {"w": "the", "b": [0.7414, 0.2945, 0.7666, 0.3094]}, {"w": "case", "b": [0.7726, 0.2945, 0.8048, 0.3094]}, {"w": "of", "b": [0.8109, 0.2945, 0.8254, 0.3094]}, {"w": "a", "b": [0.8314, 0.2945, 0.8405, 0.3094]}, {"w": "tie,", "b": [0.8465, 0.2945, 0.8716, 0.3094]}, {"w": "you", "b": [0.1308, 0.3124, 0.1593, 0.3274]}, {"w": "can", "b": [0.1655, 0.3124, 0.1931, 0.3274]}, {"w": "either", "b": [0.1992, 0.3124, 0.2452, 0.3274]}, {"w": "randomly", "b": [0.2514, 0.3124, 0.3275, 0.3274]}, {"w": "pick", "b": [0.3336, 0.3124, 0.3663, 0.3274]}, {"w": "one", "b": [0.3725, 0.3124, 0.4001, 0.3274]}, {"w": "of", "b": [0.4062, 0.3124, 0.421, 0.3274]}, {"w": "the", "b": [0.4271, 0.3124, 0.4527, 0.3274]}, {"w": "classes,", "b": [0.4588, 0.3124, 0.5164, 0.3274]}, {"w": "or", "b": [0.5225, 0.3124, 0.5389, 0.3274]}, {"w": "return", "b": [0.545, 0.3124, 0.5952, 0.3274]}, {"w": "an", "b": [0.6013, 0.3124, 0.6207, 0.3274]}, {"w": "error", "b": [0.6269, 0.3124, 0.6658, 0.3274]}, {"w": "message", "b": [0.672, 0.3124, 0.7365, 0.3274]}, {"w": "if", "b": [0.7427, 0.3124, 0.7534, 0.3274]}, {"w": "misclassifying", "b": [0.7595, 0.3124, 0.8692, 0.3274]}, {"w": "would", "b": [0.1306, 0.3304, 0.1782, 0.3453]}, {"w": "incur", "b": [0.1844, 0.3304, 0.2255, 0.3453]}, {"w": "a", "b": [0.2316, 0.3304, 0.2409, 0.3453]}, {"w": "significant", "b": [0.247, 0.3304, 0.3286, 0.3453]}, {"w": "loss", "b": [0.3348, 0.3304, 0.3637, 0.3453]}, {"w": "for", "b": [0.3699, 0.3304, 0.392, 0.3453]}, {"w": "the", "b": [0.3981, 0.3304, 0.4238, 0.3453]}, {"w": "business.", "b": [0.4299, 0.3304, 0.501, 0.3453]}]}, {"id": "b_4", "type": "paragraph", "text": "Model stacking is an ensemble learning method that trains a strong model by inputting the outputs of other strong models. Let’s go into more detail about model stacking.", "words": [{"w": "Model", "b": [0.1312, 0.3576, 0.19, 0.3726]}, {"w": "stacking", "b": [0.1971, 0.3576, 0.2724, 0.3726]}, {"w": "is", "b": [0.2787, 0.3573, 0.2913, 0.3723]}, {"w": "an", "b": [0.2975, 0.3573, 0.3174, 0.3723]}, {"w": "ensemble", "b": [0.3235, 0.3573, 0.3973, 0.3723]}, {"w": "learning", "b": [0.4035, 0.3573, 0.4694, 0.3723]}, {"w": "method", "b": [0.4755, 0.3573, 0.5377, 0.3723]}, {"w": "that", "b": [0.5439, 0.3573, 0.5783, 0.3723]}, {"w": "trains", "b": [0.5845, 0.3573, 0.6317, 0.3723]}, {"w": "a", "b": [0.6378, 0.3573, 0.6472, 0.3723]}, {"w": "strong", "b": [0.6534, 0.3573, 0.7048, 0.3723]}, {"w": "model", "b": [0.7109, 0.3573, 0.7605, 0.3723]}, {"w": "by", "b": [0.7667, 0.3573, 0.7866, 0.3723]}, {"w": "inputting", "b": [0.7928, 0.3573, 0.869, 0.3723]}, {"w": "the", "b": [0.1312, 0.3752, 0.1569, 0.3902]}, {"w": "outputs", "b": [0.163, 0.3752, 0.2247, 0.3902]}, {"w": "of", "b": [0.2308, 0.3752, 0.2457, 0.3902]}, {"w": "other", "b": [0.2518, 0.3752, 0.2939, 0.3902]}, {"w": "strong", "b": [0.3001, 0.3752, 0.3505, 0.3902]}, {"w": "models.", "b": [0.3566, 0.3752, 0.4178, 0.3902]}, {"w": "Let’s", "b": [0.4259, 0.3752, 0.4653, 0.3902]}, {"w": "go", "b": [0.4714, 0.3752, 0.4899, 0.3902]}, {"w": "into", "b": [0.496, 0.3752, 0.5273, 0.3902]}, {"w": "more", "b": [0.5334, 0.3752, 0.5735, 0.3902]}, {"w": "detail", "b": [0.5796, 0.3752, 0.6248, 0.3902]}, {"w": "about", "b": [0.6309, 0.3752, 0.6776, 0.3902]}, {"w": "model", "b": [0.6837, 0.3752, 0.7324, 0.3902]}, {"w": "stacking.", "b": [0.7386, 0.3752, 0.8094, 0.3902]}]}, {"id": "b_5", "type": "paragraph", "text": "6.2.2 An Algorithm of Model Stacking", "words": [{"w": "6.2.2", "b": [0.1312, 0.4234, 0.1749, 0.4384]}, {"w": "An", "b": [0.1961, 0.4234, 0.2239, 0.4384]}, {"w": "Algorithm", "b": [0.231, 0.4234, 0.3265, 0.4384]}, {"w": "of", "b": [0.3336, 0.4234, 0.3507, 0.4384]}, {"w": "Model", "b": [0.3577, 0.4234, 0.4165, 0.4384]}, {"w": "Stacking", "b": [0.4235, 0.4234, 0.5022, 0.4384]}]}, {"id": "b_6", "type": "paragraph", "text": "Say you want to combine classifiers f1, f2, and f3, all predicting the same set of classes. To create a synthetic training example (ˆxi, ˆyi) for the stacked model from the original training example (xi, yi), set ˆxi ←[f1(x), f2(x), f3(x)], and ˆyi ←yi. This is illustrated in Figure 5.", "words": [{"w": "Say", "b": [0.1312, 0.4597, 0.1598, 0.4746]}, {"w": "you", "b": [0.166, 0.4597, 0.1946, 0.4746]}, {"w": "want", "b": [0.2007, 0.4597, 0.2395, 0.4746]}, {"w": "to", "b": [0.2456, 0.4597, 0.262, 0.4746]}, {"w": "combine", "b": [0.2681, 0.4597, 0.334, 0.4746]}, {"w": "classifiers", "b": [0.3401, 0.4597, 0.4151, 0.4746]}, {"w": "f1,", "b": [0.4211, 0.4597, 0.4435, 0.4762]}, {"w": "f2,", "b": [0.4496, 0.4597, 0.472, 0.4762]}, {"w": "and", "b": [0.4782, 0.4597, 0.5078, 0.4746]}, {"w": "f3,", "b": [0.5139, 0.4597, 0.5363, 0.4762]}, {"w": "all", "b": [0.5425, 0.4597, 0.5619, 0.4746]}, {"w": "predicting", "b": [0.568, 0.4597, 0.6488, 0.4746]}, {"w": "the", "b": [0.6549, 0.4597, 0.6804, 0.4746]}, {"w": "same", "b": [0.6866, 0.4597, 0.7265, 0.4746]}, {"w": "set", "b": [0.7326, 0.4597, 0.7552, 0.4746]}, {"w": "of", "b": [0.7614, 0.4597, 0.7762, 0.4746]}, {"w": "classes.", "b": [0.7823, 0.4597, 0.8398, 0.4746]}, {"w": "To", "b": [0.848, 0.4597, 0.8689, 0.4746]}, {"w": "create", "b": [0.1312, 0.4776, 0.1795, 0.4926]}, {"w": "a", "b": [0.1856, 0.4776, 0.1948, 0.4926]}, {"w": "synthetic", "b": [0.201, 0.4776, 0.2739, 0.4926]}, {"w": "training", "b": [0.2801, 0.4776, 0.3437, 0.4926]}, {"w": "example", "b": [0.3498, 0.4776, 0.416, 0.4926]}, {"w": "(ˆxi,", "b": [0.422, 0.4776, 0.4516, 0.4941]}, {"w": "ˆyi)", "b": [0.4547, 0.4776, 0.477, 0.4941]}, {"w": "for", "b": [0.4832, 0.4776, 0.5053, 0.4926]}, {"w": "the", "b": [0.5114, 0.4776, 0.5371, 0.4926]}, {"w": "stacked", "b": [0.5432, 0.4776, 0.6023, 0.4926]}, {"w": "model", "b": [0.6084, 0.4776, 0.6571, 0.4926]}, {"w": "from", "b": [0.6632, 0.4776, 0.7007, 0.4926]}, {"w": "the", "b": [0.7068, 0.4776, 0.7325, 0.4926]}, {"w": "original", "b": [0.7386, 0.4776, 0.7992, 0.4926]}, {"w": "training", "b": [0.8053, 0.4776, 0.8689, 0.4926]}, {"w": "example", "b": [0.1312, 0.4956, 0.1974, 0.5105]}, {"w": "(xi,", "b": [0.2035, 0.4956, 0.2331, 0.5121]}, {"w": "yi),", "b": [0.2362, 0.4956, 0.2637, 0.5121]}, {"w": "set", "b": [0.2698, 0.4956, 0.2925, 0.5105]}, {"w": "ˆxi", "b": [0.2986, 0.4955, 0.3151, 0.5121]}, {"w": "←[f1(x),", "b": [0.3211, 0.4956, 0.398, 0.5121]}, {"w": "f2(x),", "b": [0.4011, 0.4956, 0.4492, 0.5121]}, {"w": "f3(x)],", "b": [0.4522, 0.4956, 0.5054, 0.5121]}, {"w": "and", "b": [0.5116, 0.4956, 0.5413, 0.5105]}, {"w": "ˆyi", "b": [0.5475, 0.4956, 0.5617, 0.5121]}, {"w": "←yi.", "b": [0.5678, 0.4956, 0.6117, 0.5121]}, {"w": "This", "b": [0.6199, 0.4956, 0.6559, 0.5105]}, {"w": "is", "b": [0.662, 0.4956, 0.6744, 0.5105]}, {"w": "illustrated", "b": [0.6806, 0.4956, 0.7628, 0.5105]}, {"w": "in", "b": [0.7689, 0.4956, 0.7843, 0.5105]}, {"w": "Figure", "b": [0.7905, 0.4956, 0.8426, 0.5105]}, {"w": "5.", "b": [0.8487, 0.4956, 0.8631, 0.5105]}]}, {"id": "b_7", "type": "paragraph", "text": "If some of your base models return a class plus a class score, you can use those scores as additional input features for the stacked model.", "words": [{"w": "If", "b": [0.1312, 0.5225, 0.1438, 0.5374]}, {"w": "some", "b": [0.1506, 0.5225, 0.1915, 0.5374]}, {"w": "of", "b": [0.1982, 0.5225, 0.2134, 0.5374]}, {"w": "your", "b": [0.2202, 0.5225, 0.2568, 0.5374]}, {"w": "base", "b": [0.2636, 0.5225, 0.2993, 0.5374]}, {"w": "models", "b": [0.3061, 0.5225, 0.3632, 0.5374]}, {"w": "return", "b": [0.3699, 0.5225, 0.4213, 0.5374]}, {"w": "a", "b": [0.4281, 0.5225, 0.4375, 0.5374]}, {"w": "class", "b": [0.4443, 0.5225, 0.4821, 0.5374]}, {"w": "plus", "b": [0.4889, 0.5225, 0.5225, 0.5374]}, {"w": "a", "b": [0.5293, 0.5225, 0.5387, 0.5374]}, {"w": "class", "b": [0.5455, 0.5225, 0.5833, 0.5374]}, {"w": "score,", "b": [0.5901, 0.5225, 0.6363, 0.5374]}, {"w": "you", "b": [0.6432, 0.5225, 0.6725, 0.5374]}, {"w": "can", "b": [0.6793, 0.5225, 0.7076, 0.5374]}, {"w": "use", "b": [0.7143, 0.5225, 0.7406, 0.5374]}, {"w": "those", "b": [0.7474, 0.5225, 0.7904, 0.5374]}, {"w": "scores", "b": [0.7972, 0.5225, 0.8456, 0.5374]}, {"w": "as", "b": [0.8523, 0.5225, 0.8692, 0.5374]}, {"w": "additional", "b": [0.1312, 0.5404, 0.2122, 0.5554]}, {"w": "input", "b": [0.2184, 0.5404, 0.2615, 0.5554]}, {"w": "features", "b": [0.2676, 0.5404, 0.3309, 0.5554]}, {"w": "for", "b": [0.337, 0.5404, 0.3591, 0.5554]}, {"w": "the", "b": [0.3653, 0.5404, 0.3909, 0.5554]}, {"w": "stacked", "b": [0.3971, 0.5404, 0.4561, 0.5554]}, {"w": "model.", "b": [0.4623, 0.5404, 0.5161, 0.5554]}]}, {"id": "b_8", "type": "paragraph", "text": "To train the stacked model, use synthetic examples, and tune the hyperparameters of the stacked model using cross-validation. Make sure your stacked model performs better on the validation set than each of the stacked base models.", "words": [{"w": "To", "b": [0.1306, 0.5674, 0.152, 0.5823]}, {"w": "train", "b": [0.1584, 0.5674, 0.1982, 0.5823]}, {"w": "the", "b": [0.2046, 0.5674, 0.2307, 0.5823]}, {"w": "stacked", "b": [0.2371, 0.5674, 0.2974, 0.5823]}, {"w": "model,", "b": [0.3038, 0.5674, 0.3586, 0.5823]}, {"w": "use", "b": [0.3651, 0.5674, 0.3914, 0.5823]}, {"w": "synthetic", "b": [0.3977, 0.5674, 0.4721, 0.5823]}, {"w": "examples,", "b": [0.4785, 0.5674, 0.5586, 0.5823]}, {"w": "and", "b": [0.565, 0.5674, 0.5954, 0.5823]}, {"w": "tune", "b": [0.6017, 0.5674, 0.6384, 0.5823]}, {"w": "the", "b": [0.6447, 0.5674, 0.6709, 0.5823]}, {"w": "hyperparameters", "b": [0.6773, 0.5674, 0.8151, 0.5823]}, {"w": "of", "b": [0.8214, 0.5674, 0.8366, 0.5823]}, {"w": "the", "b": [0.843, 0.5674, 0.8691, 0.5823]}, {"w": "stacked", "b": [0.1312, 0.5853, 0.19, 0.6003]}, {"w": "model", "b": [0.1962, 0.5853, 0.2446, 0.6003]}, {"w": "using", "b": [0.2508, 0.5853, 0.2928, 0.6003]}, {"w": "cross-validation.", "b": [0.2989, 0.5853, 0.4282, 0.6003]}, {"w": "Make", "b": [0.4365, 0.5853, 0.4799, 0.6003]}, {"w": "sure", "b": [0.4861, 0.5853, 0.5189, 0.6003]}, {"w": "your", "b": [0.525, 0.5853, 0.5608, 0.6003]}, {"w": "stacked", "b": [0.567, 0.5853, 0.6258, 0.6003]}, {"w": "model", "b": [0.6319, 0.5853, 0.6804, 0.6003]}, {"w": "performs", "b": [0.6866, 0.5853, 0.7572, 0.6003]}, {"w": "better", "b": [0.7634, 0.5853, 0.8119, 0.6003]}, {"w": "on", "b": [0.8181, 0.5853, 0.8374, 0.6003]}, {"w": "the", "b": [0.8436, 0.5853, 0.8691, 0.6003]}, {"w": "validation", "b": [0.1308, 0.6032, 0.2102, 0.6182]}, {"w": "set", "b": [0.2164, 0.6032, 0.2391, 0.6182]}, {"w": "than", "b": [0.2452, 0.6032, 0.2821, 0.6182]}, {"w": "each", "b": [0.2883, 0.6032, 0.3236, 0.6182]}, {"w": "of", "b": [0.3298, 0.6032, 0.3447, 0.6182]}, {"w": "the", "b": [0.3508, 0.6032, 0.3765, 0.6182]}, {"w": "stacked", "b": [0.3826, 0.6032, 0.4417, 0.6182]}, {"w": "base", "b": [0.4478, 0.6032, 0.4828, 0.6182]}, {"w": "models.", "b": [0.489, 0.6032, 0.5501, 0.6182]}]}, {"id": "b_9", "type": "paragraph", "text": "In addition to using different machine learning algorithms and models, some base models, to be weakly correlated, can be trained by randomly sampling the examples and features of the original training set. Furthermore, the same learning algorithm, trained with very different hyperparameter values, could produce sufficiently uncorrelated models.", "words": [{"w": "In", "b": [0.1312, 0.6302, 0.1479, 0.6451]}, {"w": "addition", "b": [0.1541, 0.6302, 0.2196, 0.6451]}, {"w": "to", "b": [0.2258, 0.6302, 0.2419, 0.6451]}, {"w": "using", "b": [0.2481, 0.6302, 0.2896, 0.6451]}, {"w": "different", "b": [0.2958, 0.6302, 0.3614, 0.6451]}, {"w": "machine", "b": [0.3676, 0.6302, 0.4326, 0.6451]}, {"w": "learning", "b": [0.4388, 0.6302, 0.5024, 0.6451]}, {"w": "algorithms", "b": [0.5086, 0.6302, 0.5925, 0.6451]}, {"w": "and", "b": [0.5987, 0.6302, 0.6279, 0.6451]}, {"w": "models,", "b": [0.6341, 0.6302, 0.6942, 0.6451]}, {"w": "some", "b": [0.7004, 0.6302, 0.7399, 0.6451]}, {"w": "base", "b": [0.746, 0.6302, 0.7804, 0.6451]}, {"w": "models,", "b": [0.7866, 0.6302, 0.8468, 0.6451]}, {"w": "to", "b": [0.8529, 0.6302, 0.8691, 0.6451]}, {"w": "be", "b": [0.1312, 0.6481, 0.1499, 0.6631]}, {"w": "weakly", "b": [0.156, 0.6481, 0.2099, 0.6631]}, {"w": "correlated,", "b": [0.2161, 0.6481, 0.2998, 0.6631]}, {"w": "can", "b": [0.3059, 0.6481, 0.3331, 0.6631]}, {"w": "be", "b": [0.3393, 0.6481, 0.3579, 0.6631]}, {"w": "trained", "b": [0.3641, 0.6481, 0.4205, 0.6631]}, {"w": "by", "b": [0.4267, 0.6481, 0.4458, 0.6631]}, {"w": "randomly", "b": [0.452, 0.6481, 0.527, 0.6631]}, {"w": "sampling", "b": [0.5332, 0.6481, 0.6038, 0.6631]}, {"w": "the", "b": [0.6099, 0.6481, 0.6351, 0.6631]}, {"w": "examples", "b": [0.6413, 0.6481, 0.7134, 0.6631]}, {"w": "and", "b": [0.7196, 0.6481, 0.7488, 0.6631]}, {"w": "features", "b": [0.7549, 0.6481, 0.817, 0.6631]}, {"w": "of", "b": [0.8232, 0.6481, 0.8378, 0.6631]}, {"w": "the", "b": [0.8439, 0.6481, 0.8691, 0.6631]}, {"w": "original", "b": [0.1312, 0.6661, 0.192, 0.681]}, {"w": "training", "b": [0.1982, 0.6661, 0.2621, 0.681]}, {"w": "set.", "b": [0.2682, 0.6661, 0.2961, 0.681]}, {"w": "Furthermore,", "b": [0.3043, 0.6661, 0.4108, 0.681]}, {"w": "the", "b": [0.4169, 0.6661, 0.4427, 0.681]}, {"w": "same", "b": [0.4488, 0.6661, 0.4891, 0.681]}, {"w": "learning", "b": [0.4952, 0.6661, 0.5602, 0.681]}, {"w": "algorithm,", "b": [0.5663, 0.6661, 0.6497, 0.681]}, {"w": "trained", "b": [0.6559, 0.6661, 0.7136, 0.681]}, {"w": "with", "b": [0.7197, 0.6661, 0.7558, 0.681]}, {"w": "very", "b": [0.7619, 0.6661, 0.7965, 0.681]}, {"w": "different", "b": [0.8026, 0.6661, 0.8696, 0.681]}, {"w": "hyperparameter", "b": [0.1312, 0.684, 0.2591, 0.699]}, {"w": "values,", "b": [0.2652, 0.684, 0.3192, 0.699]}, {"w": "could", "b": [0.3253, 0.684, 0.3684, 0.699]}, {"w": "produce", "b": [0.3745, 0.684, 0.4387, 0.699]}, {"w": "sufficiently", "b": [0.4449, 0.684, 0.5311, 0.699]}, {"w": "uncorrelated", "b": [0.5372, 0.684, 0.6379, 0.699]}, {"w": "models.", "b": [0.644, 0.684, 0.7051, 0.699]}]}, {"id": "b_10", "type": "paragraph", "text": "6.2.3 Data Leakage in Model Stacking", "words": [{"w": "6.2.3", "b": [0.1312, 0.7322, 0.1749, 0.7471]}, {"w": "Data", "b": [0.1961, 0.7322, 0.2412, 0.7471]}, {"w": "Leakage", "b": [0.2483, 0.7322, 0.3229, 0.7471]}, {"w": "in", "b": [0.33, 0.7322, 0.3477, 0.7471]}, {"w": "Model", "b": [0.3548, 0.7322, 0.4135, 0.7471]}, {"w": "Stacking", "b": [0.4206, 0.7322, 0.4993, 0.7471]}]}, {"id": "b_11", "type": "paragraph", "text": "To avoid data leakage, be careful when training a stacked model. To create the synthetic training set for the stacked model, follow a process similar to cross-validation. First, split all training data into ten or more blocks. The more blocks the better, but the process of training the model will be slower.", "words": [{"w": "To", "b": [0.1306, 0.7684, 0.1517, 0.7834]}, {"w": "avoid", "b": [0.1579, 0.7684, 0.2007, 0.7834]}, {"w": "data", "b": [0.2069, 0.7687, 0.2475, 0.7837]}, {"w": "leakage,", "b": [0.2546, 0.7684, 0.3275, 0.7837]}, {"w": "be", "b": [0.3337, 0.7684, 0.3528, 0.7834]}, {"w": "careful", "b": [0.3589, 0.7684, 0.4132, 0.7834]}, {"w": "when", "b": [0.4194, 0.7684, 0.4617, 0.7834]}, {"w": "training", "b": [0.4679, 0.7684, 0.5319, 0.7834]}, {"w": "a", "b": [0.5381, 0.7684, 0.5474, 0.7834]}, {"w": "stacked", "b": [0.5535, 0.7684, 0.613, 0.7834]}, {"w": "model.", "b": [0.6192, 0.7684, 0.6734, 0.7834]}, {"w": "To", "b": [0.6816, 0.7684, 0.7027, 0.7834]}, {"w": "create", "b": [0.7089, 0.7684, 0.7575, 0.7834]}, {"w": "the", "b": [0.7636, 0.7684, 0.7894, 0.7834]}, {"w": "synthetic", "b": [0.7956, 0.7684, 0.8691, 0.7834]}, {"w": "training", "b": [0.1312, 0.7864, 0.1961, 0.8013]}, {"w": "set", "b": [0.2024, 0.7864, 0.2256, 0.8013]}, {"w": "for", "b": [0.2318, 0.7864, 0.2544, 0.8013]}, {"w": "the", "b": [0.2607, 0.7864, 0.2868, 0.8013]}, {"w": "stacked", "b": [0.2931, 0.7864, 0.3534, 0.8013]}, {"w": "model,", "b": [0.3597, 0.7864, 0.4146, 0.8013]}, {"w": "follow", "b": [0.4209, 0.7864, 0.469, 0.8013]}, {"w": "a", "b": [0.4753, 0.7864, 0.4847, 0.8013]}, {"w": "process", "b": [0.491, 0.7864, 0.5504, 0.8013]}, {"w": "similar", "b": [0.5566, 0.7864, 0.6122, 0.8013]}, {"w": "to", "b": [0.6185, 0.7864, 0.6352, 0.8013]}, {"w": "cross-validation.", "b": [0.6415, 0.7864, 0.7741, 0.8013]}, {"w": "First,", "b": [0.7827, 0.7864, 0.8276, 0.8013]}, {"w": "split", "b": [0.8339, 0.7864, 0.8696, 0.8013]}, {"w": "all", "b": [0.1312, 0.8043, 0.1511, 0.8193]}, {"w": "training", "b": [0.1578, 0.8043, 0.2227, 0.8193]}, {"w": "data", "b": [0.2294, 0.8043, 0.266, 0.8193]}, {"w": "into", "b": [0.2727, 0.8043, 0.3046, 0.8193]}, {"w": "ten", "b": [0.3113, 0.8043, 0.3375, 0.8193]}, {"w": "or", "b": [0.3442, 0.8043, 0.361, 0.8193]}, {"w": "more", "b": [0.3677, 0.8043, 0.4085, 0.8193]}, {"w": "blocks.", "b": [0.4152, 0.8043, 0.4713, 0.8193]}, {"w": "The", "b": [0.4812, 0.8043, 0.5136, 0.8193]}, {"w": "more", "b": [0.5203, 0.8043, 0.5611, 0.8193]}, {"w": "blocks", "b": [0.5678, 0.8043, 0.6187, 0.8193]}, {"w": "the", "b": [0.6254, 0.8043, 0.6515, 0.8193]}, {"w": "better,", "b": [0.6582, 0.8043, 0.7132, 0.8193]}, {"w": "but", "b": [0.7201, 0.8043, 0.7483, 0.8193]}, {"w": "the", "b": [0.755, 0.8043, 0.7812, 0.8193]}, {"w": "process", "b": [0.7879, 0.8043, 0.8472, 0.8193]}, {"w": "of", "b": [0.8539, 0.8043, 0.8691, 0.8193]}, {"w": "training", "b": [0.1312, 0.8223, 0.1949, 0.8372]}, {"w": "the", "b": [0.201, 0.8223, 0.2267, 0.8372]}, {"w": "model", "b": [0.2328, 0.8223, 0.2815, 0.8372]}, {"w": "will", "b": [0.2876, 0.8223, 0.3164, 0.8372]}, {"w": "be", "b": [0.3225, 0.8223, 0.3415, 0.8372]}, {"w": "slower.", "b": [0.3476, 0.8223, 0.4021, 0.8372]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 20", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "20", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 196, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Base model 1", "words": [{"w": "Base", "b": [0.27, 0.143, 0.3071, 0.1562]}, {"w": "model", "b": [0.3116, 0.143, 0.3559, 0.1562]}, {"w": "1", "b": [0.3605, 0.143, 0.3695, 0.1562]}]}, {"id": "b_1", "type": "paragraph", "text": "(e.g. SVM)", "words": [{"w": "(e.g.", "b": [0.2809, 0.1582, 0.3135, 0.1714]}, {"w": "SVM)", "b": [0.318, 0.1582, 0.3587, 0.1714]}]}, {"id": "b_2", "type": "paragraph", "text": "Base model 2", "words": [{"w": "Base", "b": [0.4499, 0.1353, 0.4869, 0.1485]}, {"w": "model", "b": [0.4915, 0.1353, 0.5358, 0.1485]}, {"w": "2", "b": [0.5403, 0.1353, 0.5493, 0.1485]}]}, {"id": "b_3", "type": "paragraph", "text": "(e.g. gradient", "words": [{"w": "(e.g.", "b": [0.4517, 0.1506, 0.4842, 0.1638]}, {"w": "gradient", "b": [0.4887, 0.1506, 0.5475, 0.1638]}]}, {"id": "b_4", "type": "paragraph", "text": "boosting)", "words": [{"w": "boosting)", "b": [0.4661, 0.1659, 0.5331, 0.1791]}]}, {"id": "b_5", "type": "paragraph", "text": "Base model 3", "words": [{"w": "Base", "b": [0.6297, 0.1353, 0.6668, 0.1485]}, {"w": "model", "b": [0.6713, 0.1353, 0.7156, 0.1485]}, {"w": "3", "b": [0.7201, 0.1353, 0.7292, 0.1485]}]}, {"id": "b_6", "type": "paragraph", "text": "(e.g. neural", "words": [{"w": "(e.g.", "b": [0.6383, 0.1506, 0.6708, 0.1638]}, {"w": "neural", "b": [0.6754, 0.1506, 0.7206, 0.1638]}]}, {"id": "b_7", "type": "paragraph", "text": "network)", "words": [{"w": "network)", "b": [0.6482, 0.1659, 0.7106, 0.1791]}]}, {"id": "b_8", "type": "paragraph", "text": "Stacking model", "words": [{"w": "Stacking", "b": [0.444, 0.3436, 0.5064, 0.3568]}, {"w": "model", "b": [0.5109, 0.3436, 0.5552, 0.3568]}]}, {"id": "b_9", "type": "paragraph", "text": "(e.g. logistic", "words": [{"w": "(e.g.", "b": [0.4562, 0.3589, 0.4888, 0.372]}, {"w": "logistic", "b": [0.4933, 0.3589, 0.543, 0.372]}]}, {"id": "b_10", "type": "paragraph", "text": "regression)", "words": [{"w": "regression)", "b": [0.4589, 0.3741, 0.5403, 0.3873]}]}, {"id": "b_11", "type": "paragraph", "text": "Figure 5: A stacking of three weakly correlated strong models.", "words": [{"w": "Figure", "b": [0.2472, 0.4545, 0.2993, 0.4694]}, {"w": "5:", "b": [0.3054, 0.4545, 0.3198, 0.4694]}, {"w": "A", "b": [0.328, 0.4545, 0.3418, 0.4694]}, {"w": "stacking", "b": [0.348, 0.4545, 0.4137, 0.4694]}, {"w": "of", "b": [0.4199, 0.4545, 0.4347, 0.4694]}, {"w": "three", "b": [0.4409, 0.4545, 0.482, 0.4694]}, {"w": "weakly", "b": [0.4881, 0.4545, 0.543, 0.4694]}, {"w": "correlated", "b": [0.5491, 0.4545, 0.6292, 0.4694]}, {"w": "strong", "b": [0.6354, 0.4545, 0.6858, 0.4694]}, {"w": "models.", "b": [0.6919, 0.4545, 0.753, 0.4694]}]}, {"id": "b_12", "type": "paragraph", "text": "Temporarily exclude one block from the training data, and train the base models on the remaining blocks. Then apply the base models to the examples in the excluded block. Obtain the predictions, and build the synthetic training examples for the excluded block by using the predictions from the base models.", "words": [{"w": "Temporarily", "b": [0.1306, 0.5047, 0.2316, 0.5197]}, {"w": "exclude", "b": [0.2386, 0.5047, 0.2998, 0.5197]}, {"w": "one", "b": [0.3069, 0.5047, 0.3351, 0.5197]}, {"w": "block", "b": [0.3421, 0.5047, 0.3855, 0.5197]}, {"w": "from", "b": [0.3925, 0.5047, 0.4308, 0.5197]}, {"w": "the", "b": [0.4378, 0.5047, 0.4639, 0.5197]}, {"w": "training", "b": [0.4709, 0.5047, 0.5358, 0.5197]}, {"w": "data,", "b": [0.5429, 0.5047, 0.5847, 0.5197]}, {"w": "and", "b": [0.5919, 0.5047, 0.6223, 0.5197]}, {"w": "train", "b": [0.6293, 0.5047, 0.6691, 0.5197]}, {"w": "the", "b": [0.6761, 0.5047, 0.7022, 0.5197]}, {"w": "base", "b": [0.7092, 0.5047, 0.7449, 0.5197]}, {"w": "models", "b": [0.7519, 0.5047, 0.809, 0.5197]}, {"w": "on", "b": [0.816, 0.5047, 0.8359, 0.5197]}, {"w": "the", "b": [0.8429, 0.5047, 0.8691, 0.5197]}, {"w": "remaining", "b": [0.1312, 0.5227, 0.2097, 0.5376]}, {"w": "blocks.", "b": [0.2152, 0.5227, 0.2691, 0.5376]}, {"w": "Then", "b": [0.277, 0.5227, 0.3182, 0.5376]}, {"w": "apply", "b": [0.3238, 0.5227, 0.3675, 0.5376]}, {"w": "the", "b": [0.373, 0.5227, 0.3981, 0.5376]}, {"w": "base", "b": [0.4036, 0.5227, 0.4379, 0.5376]}, {"w": "models", "b": [0.4434, 0.5227, 0.4983, 0.5376]}, {"w": "to", "b": [0.5038, 0.5227, 0.5199, 0.5376]}, {"w": "the", "b": [0.5254, 0.5227, 0.5505, 0.5376]}, {"w": "examples", "b": [0.556, 0.5227, 0.628, 0.5376]}, {"w": "in", "b": [0.6335, 0.5227, 0.6486, 0.5376]}, {"w": "the", "b": [0.6541, 0.5227, 0.6792, 0.5376]}, {"w": "excluded", "b": [0.6848, 0.5227, 0.7536, 0.5376]}, {"w": "block.", "b": [0.7591, 0.5227, 0.8059, 0.5376]}, {"w": "Obtain", "b": [0.8139, 0.5227, 0.8691, 0.5376]}, {"w": "the", "b": [0.1312, 0.5406, 0.1573, 0.5556]}, {"w": "predictions,", "b": [0.1634, 0.5406, 0.2584, 0.5556]}, {"w": "and", "b": [0.2646, 0.5406, 0.2948, 0.5556]}, {"w": "build", "b": [0.3009, 0.5406, 0.3426, 0.5556]}, {"w": "the", "b": [0.3487, 0.5406, 0.3748, 0.5556]}, {"w": "synthetic", "b": [0.3809, 0.5406, 0.455, 0.5556]}, {"w": "training", "b": [0.4612, 0.5406, 0.5258, 0.5556]}, {"w": "examples", "b": [0.532, 0.5406, 0.6066, 0.5556]}, {"w": "for", "b": [0.6127, 0.5406, 0.6352, 0.5556]}, {"w": "the", "b": [0.6413, 0.5406, 0.6674, 0.5556]}, {"w": "excluded", "b": [0.6735, 0.5406, 0.7449, 0.5556]}, {"w": "block", "b": [0.751, 0.5406, 0.7943, 0.5556]}, {"w": "by", "b": [0.8004, 0.5406, 0.8202, 0.5556]}, {"w": "using", "b": [0.8264, 0.5406, 0.8692, 0.5556]}, {"w": "the", "b": [0.1312, 0.5586, 0.1569, 0.5735]}, {"w": "predictions", "b": [0.163, 0.5586, 0.2514, 0.5735]}, {"w": "from", "b": [0.2575, 0.5586, 0.295, 0.5735]}, {"w": "the", "b": [0.3012, 0.5586, 0.3268, 0.5735]}, {"w": "base", "b": [0.333, 0.5586, 0.3679, 0.5735]}, {"w": "models.", "b": [0.3741, 0.5586, 0.4352, 0.5735]}]}, {"id": "b_13", "type": "paragraph", "text": "Repeat the same process for each of the remaining blocks, and you will end up with the training set for the stacking model. The new synthetic training set will be of the same size as that of the original training set.", "words": [{"w": "Repeat", "b": [0.1312, 0.5855, 0.1895, 0.6004]}, {"w": "the", "b": [0.1966, 0.5855, 0.2228, 0.6004]}, {"w": "same", "b": [0.2299, 0.5855, 0.2708, 0.6004]}, {"w": "process", "b": [0.2778, 0.5855, 0.3372, 0.6004]}, {"w": "for", "b": [0.3443, 0.5855, 0.3668, 0.6004]}, {"w": "each", "b": [0.3739, 0.5855, 0.41, 0.6004]}, {"w": "of", "b": [0.4171, 0.5855, 0.4323, 0.6004]}, {"w": "the", "b": [0.4394, 0.5855, 0.4655, 0.6004]}, {"w": "remaining", "b": [0.4726, 0.5855, 0.5542, 0.6004]}, {"w": "blocks,", "b": [0.5613, 0.5855, 0.6174, 0.6004]}, {"w": "and", "b": [0.6247, 0.5855, 0.655, 0.6004]}, {"w": "you", "b": [0.6621, 0.5855, 0.6914, 0.6004]}, {"w": "will", "b": [0.6985, 0.5855, 0.7278, 0.6004]}, {"w": "end", "b": [0.7349, 0.5855, 0.7642, 0.6004]}, {"w": "up", "b": [0.7713, 0.5855, 0.7922, 0.6004]}, {"w": "with", "b": [0.7993, 0.5855, 0.8359, 0.6004]}, {"w": "the", "b": [0.843, 0.5855, 0.8691, 0.6004]}, {"w": "training", "b": [0.1312, 0.6034, 0.1936, 0.6184]}, {"w": "set", "b": [0.1994, 0.6034, 0.2216, 0.6184]}, {"w": "for", "b": [0.2274, 0.6034, 0.2491, 0.6184]}, {"w": "the", "b": [0.2549, 0.6034, 0.28, 0.6184]}, {"w": "stacking", "b": [0.2858, 0.6034, 0.3502, 0.6184]}, {"w": "model.", "b": [0.356, 0.6034, 0.4088, 0.6184]}, {"w": "The", "b": [0.4168, 0.6034, 0.448, 0.6184]}, {"w": "new", "b": [0.4538, 0.6034, 0.4849, 0.6184]}, {"w": "synthetic", "b": [0.4907, 0.6034, 0.5622, 0.6184]}, {"w": "training", "b": [0.568, 0.6034, 0.6304, 0.6184]}, {"w": "set", "b": [0.6362, 0.6034, 0.6584, 0.6184]}, {"w": "will", "b": [0.6642, 0.6034, 0.6923, 0.6184]}, {"w": "be", "b": [0.6981, 0.6034, 0.7167, 0.6184]}, {"w": "of", "b": [0.7225, 0.6034, 0.7371, 0.6184]}, {"w": "the", "b": [0.7429, 0.6034, 0.768, 0.6184]}, {"w": "same", "b": [0.7738, 0.6034, 0.8131, 0.6184]}, {"w": "size", "b": [0.8189, 0.6034, 0.8471, 0.6184]}, {"w": "as", "b": [0.8529, 0.6034, 0.8691, 0.6184]}, {"w": "that", "b": [0.1312, 0.6214, 0.1651, 0.6363]}, {"w": "of", "b": [0.1712, 0.6214, 0.1861, 0.6363]}, {"w": "the", "b": [0.1922, 0.6214, 0.2179, 0.6363]}, {"w": "original", "b": [0.224, 0.6214, 0.2846, 0.6363]}, {"w": "training", "b": [0.2907, 0.6214, 0.3544, 0.6363]}, {"w": "set.", "b": [0.3605, 0.6214, 0.3883, 0.6363]}]}, {"id": "b_14", "type": "paragraph", "text": "6.3 Dealing With Distribution Shift", "words": [{"w": "6.3", "b": [0.1312, 0.6702, 0.1631, 0.6881]}, {"w": "Dealing", "b": [0.188, 0.6702, 0.2707, 0.6881]}, {"w": "With", "b": [0.279, 0.6702, 0.3352, 0.6881]}, {"w": "Distribution", "b": [0.3435, 0.6702, 0.4768, 0.6881]}, {"w": "Shift", "b": [0.4851, 0.6702, 0.537, 0.6881]}]}, {"id": "b_15", "type": "paragraph", "text": "Recall that the holdout data must resemble the data you will observe in production. Some- times, however, it is not available in sufficiently large quantities. At the same time, you might have access to labeled data that is similar to the production data, but not exactly the same. For example, you might have lots of labeled images from the Web crawl collection, but your goal is to train a classifier for Instagram photos. You might not have enough labeled Instagram photos for training, so you hope to train the model by using the Web crawl data, and then be able to use that model to classify the Instagram photos.", "words": [{"w": "Recall", "b": [0.1312, 0.7088, 0.1808, 0.7237]}, {"w": "that", "b": [0.187, 0.7088, 0.2209, 0.7237]}, {"w": "the", "b": [0.227, 0.7088, 0.2527, 0.7237]}, {"w": "holdout", "b": [0.2589, 0.7088, 0.3205, 0.7237]}, {"w": "data", "b": [0.3267, 0.7088, 0.3626, 0.7237]}, {"w": "must", "b": [0.3688, 0.7088, 0.4085, 0.7237]}, {"w": "resemble", "b": [0.4146, 0.7088, 0.4841, 0.7237]}, {"w": "the", "b": [0.4903, 0.7088, 0.516, 0.7237]}, {"w": "data", "b": [0.5221, 0.7088, 0.5581, 0.7237]}, {"w": "you", "b": [0.5643, 0.7088, 0.593, 0.7237]}, {"w": "will", "b": [0.5992, 0.7088, 0.6279, 0.7237]}, {"w": "observe", "b": [0.6341, 0.7088, 0.6939, 0.7237]}, {"w": "in", "b": [0.7, 0.7088, 0.7154, 0.7237]}, {"w": "production.", "b": [0.7216, 0.7088, 0.8146, 0.7237]}, {"w": "Some-", "b": [0.8229, 0.7088, 0.8722, 0.7237]}, {"w": "times,", "b": [0.1312, 0.7267, 0.1805, 0.7417]}, {"w": "however,", "b": [0.1879, 0.7267, 0.2591, 0.7417]}, {"w": "it", "b": [0.2666, 0.7267, 0.2791, 0.7417]}, {"w": "is", "b": [0.2863, 0.7267, 0.299, 0.7417]}, {"w": "not", "b": [0.3061, 0.7267, 0.3333, 0.7417]}, {"w": "available", "b": [0.3405, 0.7267, 0.4117, 0.7417]}, {"w": "in", "b": [0.4188, 0.7267, 0.4345, 0.7417]}, {"w": "sufficiently", "b": [0.4417, 0.7267, 0.5297, 0.7417]}, {"w": "large", "b": [0.5369, 0.7267, 0.5767, 0.7417]}, {"w": "quantities.", "b": [0.5838, 0.7267, 0.6697, 0.7417]}, {"w": "At", "b": [0.681, 0.7267, 0.7019, 0.7417]}, {"w": "the", "b": [0.7091, 0.7267, 0.7353, 0.7417]}, {"w": "same", "b": [0.7425, 0.7267, 0.7833, 0.7417]}, {"w": "time,", "b": [0.7905, 0.7267, 0.8323, 0.7417]}, {"w": "you", "b": [0.8398, 0.7267, 0.8691, 0.7417]}, {"w": "might", "b": [0.1312, 0.7447, 0.1771, 0.7596]}, {"w": "have", "b": [0.1833, 0.7447, 0.2191, 0.7596]}, {"w": "access", "b": [0.2253, 0.7447, 0.2729, 0.7596]}, {"w": "to", "b": [0.2791, 0.7447, 0.2952, 0.7596]}, {"w": "labeled", "b": [0.3014, 0.7447, 0.3574, 0.7596]}, {"w": "data", "b": [0.3636, 0.7447, 0.3989, 0.7596]}, {"w": "that", "b": [0.405, 0.7447, 0.4383, 0.7596]}, {"w": "is", "b": [0.4445, 0.7447, 0.4567, 0.7596]}, {"w": "similar", "b": [0.4629, 0.7447, 0.5165, 0.7596]}, {"w": "to", "b": [0.5227, 0.7447, 0.5388, 0.7596]}, {"w": "the", "b": [0.545, 0.7447, 0.5702, 0.7596]}, {"w": "production", "b": [0.5764, 0.7447, 0.6627, 0.7596]}, {"w": "data,", "b": [0.6688, 0.7447, 0.7092, 0.7596]}, {"w": "but", "b": [0.7154, 0.7447, 0.7426, 0.7596]}, {"w": "not", "b": [0.7488, 0.7447, 0.775, 0.7596]}, {"w": "exactly", "b": [0.7812, 0.7447, 0.8377, 0.7596]}, {"w": "the", "b": [0.8439, 0.7447, 0.8691, 0.7596]}, {"w": "same.", "b": [0.1312, 0.7626, 0.1755, 0.7776]}, {"w": "For", "b": [0.1837, 0.7626, 0.2101, 0.7776]}, {"w": "example,", "b": [0.216, 0.7626, 0.2858, 0.7776]}, {"w": "you", "b": [0.2918, 0.7626, 0.3199, 0.7776]}, {"w": "might", "b": [0.3258, 0.7626, 0.3715, 0.7776]}, {"w": "have", "b": [0.3775, 0.7626, 0.4131, 0.7776]}, {"w": "lots", "b": [0.419, 0.7626, 0.4473, 0.7776]}, {"w": "of", "b": [0.4532, 0.7626, 0.4677, 0.7776]}, {"w": "labeled", "b": [0.4737, 0.7626, 0.5295, 0.7776]}, {"w": "images", "b": [0.5354, 0.7626, 0.5887, 0.7776]}, {"w": "from", "b": [0.5946, 0.7626, 0.6314, 0.7776]}, {"w": "the", "b": [0.6373, 0.7626, 0.6624, 0.7776]}, {"w": "Web", "b": [0.6683, 0.7626, 0.7035, 0.7776]}, {"w": "crawl", "b": [0.7094, 0.7626, 0.7511, 0.7776]}, {"w": "collection,", "b": [0.7571, 0.7626, 0.8365, 0.7776]}, {"w": "but", "b": [0.8424, 0.7626, 0.8696, 0.7776]}, {"w": "your", "b": [0.1308, 0.7806, 0.1674, 0.7955]}, {"w": "goal", "b": [0.1735, 0.7806, 0.207, 0.7955]}, {"w": "is", "b": [0.2131, 0.7806, 0.2258, 0.7955]}, {"w": "to", "b": [0.2319, 0.7806, 0.2486, 0.7955]}, {"w": "train", "b": [0.2548, 0.7806, 0.2945, 0.7955]}, {"w": "a", "b": [0.3007, 0.7806, 0.3101, 0.7955]}, {"w": "classifier", "b": [0.3163, 0.7806, 0.3855, 0.7955]}, {"w": "for", "b": [0.3917, 0.7806, 0.4142, 0.7955]}, {"w": "Instagram", "b": [0.4203, 0.7806, 0.5035, 0.7955]}, {"w": "photos.", "b": [0.5097, 0.7806, 0.5694, 0.7955]}, {"w": "You", "b": [0.5775, 0.7806, 0.61, 0.7955]}, {"w": "might", "b": [0.6161, 0.7806, 0.6637, 0.7955]}, {"w": "not", "b": [0.6698, 0.7806, 0.697, 0.7955]}, {"w": "have", "b": [0.7031, 0.7806, 0.7402, 0.7955]}, {"w": "enough", "b": [0.7464, 0.7806, 0.8049, 0.7955]}, {"w": "labeled", "b": [0.8111, 0.7806, 0.8691, 0.7955]}, {"w": "Instagram", "b": [0.1312, 0.7985, 0.2124, 0.8135]}, {"w": "photos", "b": [0.2185, 0.7985, 0.2716, 0.8135]}, {"w": "for", "b": [0.2778, 0.7985, 0.2997, 0.8135]}, {"w": "training,", "b": [0.3059, 0.7985, 0.3742, 0.8135]}, {"w": "so", "b": [0.3803, 0.7985, 0.3968, 0.8135]}, {"w": "you", "b": [0.4029, 0.7985, 0.4314, 0.8135]}, {"w": "hope", "b": [0.4376, 0.7985, 0.4758, 0.8135]}, {"w": "to", "b": [0.4819, 0.7985, 0.4982, 0.8135]}, {"w": "train", "b": [0.5043, 0.7985, 0.5431, 0.8135]}, {"w": "the", "b": [0.5493, 0.7985, 0.5748, 0.8135]}, {"w": "model", "b": [0.5809, 0.7985, 0.6293, 0.8135]}, {"w": "by", "b": [0.6354, 0.7985, 0.6548, 0.8135]}, {"w": "using", "b": [0.6609, 0.7985, 0.7028, 0.8135]}, {"w": "the", "b": [0.709, 0.7985, 0.7344, 0.8135]}, {"w": "Web", "b": [0.7406, 0.7985, 0.7763, 0.8135]}, {"w": "crawl", "b": [0.7824, 0.7985, 0.8247, 0.8135]}, {"w": "data,", "b": [0.8309, 0.7985, 0.8716, 0.8135]}, {"w": "and", "b": [0.1312, 0.8165, 0.161, 0.8314]}, {"w": "then", "b": [0.1671, 0.8165, 0.203, 0.8314]}, {"w": "be", "b": [0.2092, 0.8165, 0.2281, 0.8314]}, {"w": "able", "b": [0.2343, 0.8165, 0.2671, 0.8314]}, {"w": "to", "b": [0.2733, 0.8165, 0.2897, 0.8314]}, {"w": "use", "b": [0.2958, 0.8165, 0.3216, 0.8314]}, {"w": "that", "b": [0.3277, 0.8165, 0.3616, 0.8314]}, {"w": "model", "b": [0.3677, 0.8165, 0.4164, 0.8314]}, {"w": "to", "b": [0.4225, 0.8165, 0.4389, 0.8314]}, {"w": "classify", "b": [0.4451, 0.8165, 0.5028, 0.8314]}, {"w": "the", "b": [0.5089, 0.8165, 0.5346, 0.8314]}, {"w": "Instagram", "b": [0.5407, 0.8165, 0.6224, 0.8314]}, {"w": "photos.", "b": [0.6285, 0.8165, 0.6871, 0.8314]}]}, {"id": "b_16", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 21", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "21", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 197, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "6.3.1 Types of Distribution Shift", "words": [{"w": "6.3.1", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Types", "b": [0.1961, 0.0884, 0.2519, 0.1034]}, {"w": "of", "b": [0.259, 0.0884, 0.2761, 0.1034]}, {"w": "Distribution", "b": [0.2832, 0.0884, 0.3967, 0.1034]}, {"w": "Shift", "b": [0.4038, 0.0884, 0.448, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "When the distributions of the training data and test data are not the same, we call it", "words": [{"w": "When", "b": [0.1303, 0.1247, 0.1789, 0.1396]}, {"w": "the", "b": [0.1873, 0.1247, 0.2134, 0.1396]}, {"w": "distributions", "b": [0.2217, 0.1247, 0.3256, 0.1396]}, {"w": "of", "b": [0.3339, 0.1247, 0.349, 0.1396]}, {"w": "the", "b": [0.3574, 0.1247, 0.3835, 0.1396]}, {"w": "training", "b": [0.3918, 0.1247, 0.4567, 0.1396]}, {"w": "data", "b": [0.465, 0.1247, 0.5016, 0.1396]}, {"w": "and", "b": [0.51, 0.1247, 0.5403, 0.1396]}, {"w": "test", "b": [0.5486, 0.1247, 0.5791, 0.1396]}, {"w": "data", "b": [0.5874, 0.1247, 0.624, 0.1396]}, {"w": "are", "b": [0.6323, 0.1247, 0.6574, 0.1396]}, {"w": "not", "b": [0.6657, 0.1247, 0.6929, 0.1396]}, {"w": "the", "b": [0.7013, 0.1247, 0.7274, 0.1396]}, {"w": "same,", "b": [0.7357, 0.1247, 0.7819, 0.1396]}, {"w": "we", "b": [0.7907, 0.1247, 0.8122, 0.1396]}, {"w": "call", "b": [0.8205, 0.1247, 0.8487, 0.1396]}, {"w": "it", "b": [0.857, 0.1247, 0.8696, 0.1396]}]}, {"id": "b_2", "type": "paragraph", "text": "distribution shift. Dealing with a distribution shift is currently an open research area. Researchers distinguish three types of distribution shift:", "words": [{"w": "distribution", "b": [0.1312, 0.1429, 0.2403, 0.1579]}, {"w": "shift.", "b": [0.2487, 0.1426, 0.2947, 0.1579]}, {"w": "Dealing", "b": [0.3062, 0.1426, 0.3687, 0.1576]}, {"w": "with", "b": [0.376, 0.1426, 0.4126, 0.1576]}, {"w": "a", "b": [0.4199, 0.1426, 0.4293, 0.1576]}, {"w": "distribution", "b": [0.4365, 0.1426, 0.5329, 0.1576]}, {"w": "shift", "b": [0.5402, 0.1426, 0.5764, 0.1576]}, {"w": "is", "b": [0.5837, 0.1426, 0.5963, 0.1576]}, {"w": "currently", "b": [0.6036, 0.1426, 0.678, 0.1576]}, {"w": "an", "b": [0.6853, 0.1426, 0.7052, 0.1576]}, {"w": "open", "b": [0.7124, 0.1426, 0.7516, 0.1576]}, {"w": "research", "b": [0.7589, 0.1426, 0.8256, 0.1576]}, {"w": "area.", "b": [0.8329, 0.1426, 0.8727, 0.1576]}, {"w": "Researchers", "b": [0.1312, 0.1606, 0.2257, 0.1755]}, {"w": "distinguish", "b": [0.2318, 0.1606, 0.3192, 0.1755]}, {"w": "three", "b": [0.3253, 0.1606, 0.3664, 0.1755]}, {"w": "types", "b": [0.3726, 0.1606, 0.4152, 0.1755]}, {"w": "of", "b": [0.4214, 0.1606, 0.4363, 0.1755]}, {"w": "distribution", "b": [0.4424, 0.1606, 0.5369, 0.1755]}, {"w": "shift:", "b": [0.5431, 0.1606, 0.5837, 0.1755]}]}, {"id": "b_3", "type": "paragraph", "text": "• covariate shift — shift in the values of features; • prior probability shift — shift in the values of the target; and • concept drift — shift in the relationship between the features and the label.", "words": [{"w": "•", "b": [0.1538, 0.1875, 0.1681, 0.2024]}, {"w": "covariate", "b": [0.1774, 0.1878, 0.2601, 0.2028]}, {"w": "shift", "b": [0.2671, 0.1878, 0.3079, 0.2028]}, {"w": "—", "b": [0.3141, 0.1875, 0.3325, 0.2024]}, {"w": "shift", "b": [0.3387, 0.1875, 0.3742, 0.2024]}, {"w": "in", "b": [0.3803, 0.1875, 0.3957, 0.2024]}, {"w": "the", "b": [0.4018, 0.1875, 0.4275, 0.2024]}, {"w": "values", "b": [0.4336, 0.1875, 0.4824, 0.2024]}, {"w": "of", "b": [0.4886, 0.1875, 0.5035, 0.2024]}, {"w": "features;", "b": [0.5096, 0.1875, 0.578, 0.2024]}, {"w": "•", "b": [0.1538, 0.2054, 0.1681, 0.2204]}, {"w": "prior", "b": [0.1774, 0.2057, 0.2231, 0.2207]}, {"w": "probability", "b": [0.2302, 0.2057, 0.3318, 0.2207]}, {"w": "shift", "b": [0.3389, 0.2057, 0.3797, 0.2207]}, {"w": "—", "b": [0.3858, 0.2054, 0.4042, 0.2204]}, {"w": "shift", "b": [0.4104, 0.2054, 0.4458, 0.2204]}, {"w": "in", "b": [0.452, 0.2054, 0.4674, 0.2204]}, {"w": "the", "b": [0.4735, 0.2054, 0.4992, 0.2204]}, {"w": "values", "b": [0.5053, 0.2054, 0.5541, 0.2204]}, {"w": "of", "b": [0.5603, 0.2054, 0.5752, 0.2204]}, {"w": "the", "b": [0.5813, 0.2054, 0.607, 0.2204]}, {"w": "target;", "b": [0.6131, 0.2054, 0.6665, 0.2204]}, {"w": "and", "b": [0.6726, 0.2054, 0.7024, 0.2204]}, {"w": "•", "b": [0.1538, 0.2234, 0.1681, 0.2383]}, {"w": "concept", "b": [0.1774, 0.2237, 0.2484, 0.2386]}, {"w": "drift", "b": [0.2554, 0.2237, 0.2966, 0.2386]}, {"w": "—", "b": [0.3027, 0.2234, 0.3212, 0.2383]}, {"w": "shift", "b": [0.3273, 0.2234, 0.3628, 0.2383]}, {"w": "in", "b": [0.369, 0.2234, 0.3844, 0.2383]}, {"w": "the", "b": [0.3905, 0.2234, 0.4162, 0.2383]}, {"w": "relationship", "b": [0.4223, 0.2234, 0.5168, 0.2383]}, {"w": "between", "b": [0.523, 0.2234, 0.5881, 0.2383]}, {"w": "the", "b": [0.5942, 0.2234, 0.6199, 0.2383]}, {"w": "features", "b": [0.6261, 0.2234, 0.6893, 0.2383]}, {"w": "and", "b": [0.6954, 0.2234, 0.7252, 0.2383]}, {"w": "the", "b": [0.7313, 0.2234, 0.757, 0.2383]}, {"w": "label.", "b": [0.7631, 0.2234, 0.8067, 0.2383]}]}, {"id": "b_4", "type": "paragraph", "text": "You may know your data is affected by a distribution shift, but you don’t usually know what type of shift it is.", "words": [{"w": "You", "b": [0.1305, 0.2503, 0.1616, 0.2653]}, {"w": "may", "b": [0.1677, 0.2503, 0.2008, 0.2653]}, {"w": "know", "b": [0.2069, 0.2503, 0.2481, 0.2653]}, {"w": "your", "b": [0.2541, 0.2503, 0.2894, 0.2653]}, {"w": "data", "b": [0.2954, 0.2503, 0.3306, 0.2653]}, {"w": "is", "b": [0.3366, 0.2503, 0.3488, 0.2653]}, {"w": "affected", "b": [0.3549, 0.2503, 0.4157, 0.2653]}, {"w": "by", "b": [0.4217, 0.2503, 0.4408, 0.2653]}, {"w": "a", "b": [0.4469, 0.2503, 0.4559, 0.2653]}, {"w": "distribution", "b": [0.462, 0.2503, 0.5546, 0.2653]}, {"w": "shift,", "b": [0.5606, 0.2503, 0.6005, 0.2653]}, {"w": "but", "b": [0.6065, 0.2503, 0.6337, 0.2653]}, {"w": "you", "b": [0.6397, 0.2503, 0.6679, 0.2653]}, {"w": "don’t", "b": [0.6739, 0.2503, 0.7151, 0.2653]}, {"w": "usually", "b": [0.7212, 0.2503, 0.7771, 0.2653]}, {"w": "know", "b": [0.7831, 0.2503, 0.8243, 0.2653]}, {"w": "what", "b": [0.8304, 0.2503, 0.8695, 0.2653]}, {"w": "type", "b": [0.1312, 0.2683, 0.1666, 0.2832]}, {"w": "of", "b": [0.1728, 0.2683, 0.1876, 0.2832]}, {"w": "shift", "b": [0.1938, 0.2683, 0.2293, 0.2832]}, {"w": "it", "b": [0.2354, 0.2683, 0.2477, 0.2832]}, {"w": "is.", "b": [0.2539, 0.2683, 0.2714, 0.2832]}]}, {"id": "b_5", "type": "paragraph", "text": "If the number of examples in the test set is relatively high compared to the size of the training set, you could randomly pick a certain fraction of test examples and transfer some to the training set and some to the validation set. Then you would train the model as usual. However, often you have a very high number of training examples and relatively few test examples. In that case, a more effective approach is to use adversarial validation.", "words": [{"w": "If", "b": [0.1312, 0.2952, 0.1438, 0.3101]}, {"w": "the", "b": [0.1517, 0.2952, 0.1778, 0.3101]}, {"w": "number", "b": [0.1857, 0.2952, 0.248, 0.3101]}, {"w": "of", "b": [0.2559, 0.2952, 0.2711, 0.3101]}, {"w": "examples", "b": [0.279, 0.2952, 0.3539, 0.3101]}, {"w": "in", "b": [0.3617, 0.2952, 0.3774, 0.3101]}, {"w": "the", "b": [0.3853, 0.2952, 0.4115, 0.3101]}, {"w": "test", "b": [0.4194, 0.2952, 0.4498, 0.3101]}, {"w": "set", "b": [0.4577, 0.2952, 0.4808, 0.3101]}, {"w": "is", "b": [0.4887, 0.2952, 0.5014, 0.3101]}, {"w": "relatively", "b": [0.5093, 0.2952, 0.5852, 0.3101]}, {"w": "high", "b": [0.5931, 0.2952, 0.6286, 0.3101]}, {"w": "compared", "b": [0.6365, 0.2952, 0.7161, 0.3101]}, {"w": "to", "b": [0.724, 0.2952, 0.7407, 0.3101]}, {"w": "the", "b": [0.7486, 0.2952, 0.7747, 0.3101]}, {"w": "size", "b": [0.7826, 0.2952, 0.812, 0.3101]}, {"w": "of", "b": [0.8199, 0.2952, 0.8351, 0.3101]}, {"w": "the", "b": [0.843, 0.2952, 0.8691, 0.3101]}, {"w": "training", "b": [0.1312, 0.3131, 0.1951, 0.3281]}, {"w": "set,", "b": [0.2013, 0.3131, 0.2292, 0.3281]}, {"w": "you", "b": [0.2353, 0.3131, 0.2641, 0.3281]}, {"w": "could", "b": [0.2702, 0.3131, 0.3135, 0.3281]}, {"w": "randomly", "b": [0.3196, 0.3131, 0.3964, 0.3281]}, {"w": "pick", "b": [0.4025, 0.3131, 0.4355, 0.3281]}, {"w": "a", "b": [0.4416, 0.3131, 0.4508, 0.3281]}, {"w": "certain", "b": [0.457, 0.3131, 0.5126, 0.3281]}, {"w": "fraction", "b": [0.5188, 0.3131, 0.5811, 0.3281]}, {"w": "of", "b": [0.5872, 0.3131, 0.6022, 0.3281]}, {"w": "test", "b": [0.6083, 0.3131, 0.6383, 0.3281]}, {"w": "examples", "b": [0.6444, 0.3131, 0.7181, 0.3281]}, {"w": "and", "b": [0.7242, 0.3131, 0.7541, 0.3281]}, {"w": "transfer", "b": [0.7602, 0.3131, 0.8227, 0.3281]}, {"w": "some", "b": [0.8289, 0.3131, 0.8691, 0.3281]}, {"w": "to", "b": [0.1312, 0.3311, 0.1474, 0.346]}, {"w": "the", "b": [0.1536, 0.3311, 0.1789, 0.346]}, {"w": "training", "b": [0.185, 0.3311, 0.2478, 0.346]}, {"w": "set", "b": [0.254, 0.3311, 0.2764, 0.346]}, {"w": "and", "b": [0.2825, 0.3311, 0.3119, 0.346]}, {"w": "some", "b": [0.318, 0.3311, 0.3576, 0.346]}, {"w": "to", "b": [0.3638, 0.3311, 0.38, 0.346]}, {"w": "the", "b": [0.3861, 0.3311, 0.4114, 0.346]}, {"w": "validation", "b": [0.4176, 0.3311, 0.496, 0.346]}, {"w": "set.", "b": [0.5022, 0.3311, 0.5296, 0.346]}, {"w": "Then", "b": [0.5378, 0.3311, 0.5793, 0.346]}, {"w": "you", "b": [0.5855, 0.3311, 0.6138, 0.346]}, {"w": "would", "b": [0.62, 0.3311, 0.667, 0.346]}, {"w": "train", "b": [0.6732, 0.3311, 0.7117, 0.346]}, {"w": "the", "b": [0.7178, 0.3311, 0.7431, 0.346]}, {"w": "model", "b": [0.7493, 0.3311, 0.7974, 0.346]}, {"w": "as", "b": [0.8035, 0.3311, 0.8198, 0.346]}, {"w": "usual.", "b": [0.826, 0.3311, 0.8726, 0.346]}, {"w": "However,", "b": [0.1312, 0.349, 0.2061, 0.364]}, {"w": "often", "b": [0.2129, 0.349, 0.2543, 0.364]}, {"w": "you", "b": [0.261, 0.349, 0.2903, 0.364]}, {"w": "have", "b": [0.297, 0.349, 0.3341, 0.364]}, {"w": "a", "b": [0.3408, 0.349, 0.3502, 0.364]}, {"w": "very", "b": [0.3569, 0.349, 0.392, 0.364]}, {"w": "high", "b": [0.3988, 0.349, 0.4343, 0.364]}, {"w": "number", "b": [0.441, 0.349, 0.5033, 0.364]}, {"w": "of", "b": [0.51, 0.349, 0.5252, 0.364]}, {"w": "training", "b": [0.5319, 0.349, 0.5968, 0.364]}, {"w": "examples", "b": [0.6035, 0.349, 0.6784, 0.364]}, {"w": "and", "b": [0.6851, 0.349, 0.7154, 0.364]}, {"w": "relatively", "b": [0.7221, 0.349, 0.798, 0.364]}, {"w": "few", "b": [0.8047, 0.349, 0.8324, 0.364]}, {"w": "test", "b": [0.8392, 0.349, 0.8696, 0.364]}, {"w": "examples.", "b": [0.1312, 0.367, 0.2098, 0.3819]}, {"w": "In", "b": [0.218, 0.367, 0.2349, 0.3819]}, {"w": "that", "b": [0.2411, 0.367, 0.2749, 0.3819]}, {"w": "case,", "b": [0.281, 0.367, 0.3191, 0.3819]}, {"w": "a", "b": [0.3252, 0.367, 0.3345, 0.3819]}, {"w": "more", "b": [0.3406, 0.367, 0.3806, 0.3819]}, {"w": "effective", "b": [0.3868, 0.367, 0.4519, 0.3819]}, {"w": "approach", "b": [0.4581, 0.367, 0.5315, 0.3819]}, {"w": "is", "b": [0.5376, 0.367, 0.55, 0.3819]}, {"w": "to", "b": [0.5562, 0.367, 0.5726, 0.3819]}, {"w": "use", "b": [0.5787, 0.367, 0.6045, 0.3819]}, {"w": "adversarial", "b": [0.6104, 0.3673, 0.7111, 0.3822]}, {"w": "validation.", "b": [0.7182, 0.367, 0.8141, 0.3822]}]}, {"id": "b_6", "type": "paragraph", "text": "6.3.2 Adversarial Validation", "words": [{"w": "6.3.2", "b": [0.1312, 0.4151, 0.1749, 0.4301]}, {"w": "Adversarial", "b": [0.1961, 0.4151, 0.3019, 0.4301]}, {"w": "Validation", "b": [0.309, 0.4151, 0.404, 0.4301]}]}, {"id": "b_7", "type": "paragraph", "text": "We prepare for adversarial validation as follows. We assume that the feature vectors in", "words": [{"w": "We", "b": [0.1303, 0.4514, 0.1565, 0.4663]}, {"w": "prepare", "b": [0.1641, 0.4514, 0.2259, 0.4663]}, {"w": "for", "b": [0.2336, 0.4514, 0.2561, 0.4663]}, {"w": "adversarial", "b": [0.2638, 0.4514, 0.3529, 0.4663]}, {"w": "validation", "b": [0.3605, 0.4514, 0.4416, 0.4663]}, {"w": "as", "b": [0.4493, 0.4514, 0.4661, 0.4663]}, {"w": "follows.", "b": [0.4737, 0.4514, 0.5345, 0.4663]}, {"w": "We", "b": [0.5472, 0.4514, 0.5734, 0.4663]}, {"w": "assume", "b": [0.581, 0.4514, 0.6398, 0.4663]}, {"w": "that", "b": [0.6474, 0.4514, 0.6819, 0.4663]}, {"w": "the", "b": [0.6896, 0.4514, 0.7157, 0.4663]}, {"w": "feature", "b": [0.7234, 0.4514, 0.7804, 0.4663]}, {"w": "vectors", "b": [0.7881, 0.4514, 0.8458, 0.4663]}, {"w": "in", "b": [0.8534, 0.4514, 0.8691, 0.4663]}]}, {"id": "b_8", "type": "paragraph", "text": "a training and a test examples contain the same number of features, and those features represent the same information. Split your original training set into two subsets: Training Set 1 and Training Set 2.", "words": [{"w": "a", "b": [0.1312, 0.4693, 0.1406, 0.4843]}, {"w": "training", "b": [0.1482, 0.4693, 0.2131, 0.4843]}, {"w": "and", "b": [0.2207, 0.4693, 0.251, 0.4843]}, {"w": "a", "b": [0.2586, 0.4693, 0.268, 0.4843]}, {"w": "test", "b": [0.2756, 0.4693, 0.306, 0.4843]}, {"w": "examples", "b": [0.3136, 0.4693, 0.3884, 0.4843]}, {"w": "contain", "b": [0.396, 0.4693, 0.4562, 0.4843]}, {"w": "the", "b": [0.4637, 0.4693, 0.4899, 0.4843]}, {"w": "same", "b": [0.4975, 0.4693, 0.5383, 0.4843]}, {"w": "number", "b": [0.5459, 0.4693, 0.6082, 0.4843]}, {"w": "of", "b": [0.6158, 0.4693, 0.6309, 0.4843]}, {"w": "features,", "b": [0.6385, 0.4693, 0.7082, 0.4843]}, {"w": "and", "b": [0.7162, 0.4693, 0.7465, 0.4843]}, {"w": "those", "b": [0.7541, 0.4693, 0.7971, 0.4843]}, {"w": "features", "b": [0.8046, 0.4693, 0.8691, 0.4843]}, {"w": "represent", "b": [0.1312, 0.4873, 0.2059, 0.5022]}, {"w": "the", "b": [0.2121, 0.4873, 0.2381, 0.5022]}, {"w": "same", "b": [0.2442, 0.4873, 0.2849, 0.5022]}, {"w": "information.", "b": [0.2911, 0.4873, 0.3916, 0.5022]}, {"w": "Split", "b": [0.3998, 0.4873, 0.4383, 0.5022]}, {"w": "your", "b": [0.4444, 0.4873, 0.4809, 0.5022]}, {"w": "original", "b": [0.4871, 0.4873, 0.5485, 0.5022]}, {"w": "training", "b": [0.5547, 0.4873, 0.6193, 0.5022]}, {"w": "set", "b": [0.6254, 0.4873, 0.6484, 0.5022]}, {"w": "into", "b": [0.6546, 0.4873, 0.6863, 0.5022]}, {"w": "two", "b": [0.6925, 0.4873, 0.7216, 0.5022]}, {"w": "subsets:", "b": [0.7278, 0.4873, 0.7916, 0.5022]}, {"w": "Training", "b": [0.7998, 0.4873, 0.8691, 0.5022]}, {"w": "Set", "b": [0.1312, 0.5052, 0.1569, 0.5202]}, {"w": "1", "b": [0.163, 0.5052, 0.1722, 0.5202]}, {"w": "and", "b": [0.1784, 0.5052, 0.2081, 0.5202]}, {"w": "Training", "b": [0.2143, 0.5052, 0.2825, 0.5202]}, {"w": "Set", "b": [0.2887, 0.5052, 0.3143, 0.5202]}, {"w": "2.", "b": [0.3204, 0.5052, 0.3347, 0.5202]}]}, {"id": "b_9", "type": "paragraph", "text": "Create a Modified Training Set 1 by transforming the examples from Training Set 1 as follows. To each example in Training Set 1, add the original label as an additional feature, then assign the new label “Training” to that example.", "words": [{"w": "Create", "b": [0.1312, 0.5321, 0.1835, 0.5471]}, {"w": "a", "b": [0.1889, 0.5321, 0.1979, 0.5471]}, {"w": "Modified", "b": [0.2032, 0.5321, 0.2726, 0.5471]}, {"w": "Training", "b": [0.2779, 0.5321, 0.3448, 0.5471]}, {"w": "Set", "b": [0.3501, 0.5321, 0.3752, 0.5471]}, {"w": "1", "b": [0.3805, 0.5321, 0.3895, 0.5471]}, {"w": "by", "b": [0.3949, 0.5321, 0.414, 0.5471]}, {"w": "transforming", "b": [0.4193, 0.5321, 0.5205, 0.5471]}, {"w": "the", "b": [0.5258, 0.5321, 0.5509, 0.5471]}, {"w": "examples", "b": [0.5563, 0.5321, 0.6282, 0.5471]}, {"w": "from", "b": [0.6336, 0.5321, 0.6703, 0.5471]}, {"w": "Training", "b": [0.6756, 0.5321, 0.7425, 0.5471]}, {"w": "Set", "b": [0.7478, 0.5321, 0.7729, 0.5471]}, {"w": "1", "b": [0.7781, 0.5321, 0.7872, 0.5471]}, {"w": "as", "b": [0.7925, 0.5321, 0.8087, 0.5471]}, {"w": "follows.", "b": [0.814, 0.5321, 0.8724, 0.5471]}, {"w": "To", "b": [0.1306, 0.5501, 0.1511, 0.565]}, {"w": "each", "b": [0.1567, 0.5501, 0.1913, 0.565]}, {"w": "example", "b": [0.1969, 0.5501, 0.2617, 0.565]}, {"w": "in", "b": [0.2672, 0.5501, 0.2823, 0.565]}, {"w": "Training", "b": [0.2879, 0.5501, 0.3547, 0.565]}, {"w": "Set", "b": [0.3602, 0.5501, 0.3854, 0.565]}, {"w": "1,", "b": [0.3908, 0.5501, 0.4049, 0.565]}, {"w": "add", "b": [0.4105, 0.5501, 0.4397, 0.565]}, {"w": "the", "b": [0.4452, 0.5501, 0.4704, 0.565]}, {"w": "original", "b": [0.4759, 0.5501, 0.5352, 0.565]}, {"w": "label", "b": [0.5408, 0.5501, 0.5785, 0.565]}, {"w": "as", "b": [0.584, 0.5501, 0.6002, 0.565]}, {"w": "an", "b": [0.6058, 0.5501, 0.6248, 0.565]}, {"w": "additional", "b": [0.6304, 0.5501, 0.7098, 0.565]}, {"w": "feature,", "b": [0.7153, 0.5501, 0.7752, 0.565]}, {"w": "then", "b": [0.7808, 0.5501, 0.816, 0.565]}, {"w": "assign", "b": [0.8216, 0.5501, 0.869, 0.565]}, {"w": "the", "b": [0.1312, 0.568, 0.1569, 0.583]}, {"w": "new", "b": [0.163, 0.568, 0.1948, 0.583]}, {"w": "label", "b": [0.201, 0.568, 0.2394, 0.583]}, {"w": "“Training”", "b": [0.2456, 0.568, 0.3312, 0.583]}, {"w": "to", "b": [0.3374, 0.568, 0.3538, 0.583]}, {"w": "that", "b": [0.3599, 0.568, 0.3938, 0.583]}, {"w": "example.", "b": [0.3999, 0.568, 0.4712, 0.583]}]}, {"id": "b_10", "type": "paragraph", "text": "Create a Modified Test Set by transforming the examples from the original test set as follows. To each example in the test set, add the original label as an additional feature, then assign the new label “Test” to that example.", "words": [{"w": "Create", "b": [0.1312, 0.595, 0.1835, 0.6099]}, {"w": "a", "b": [0.1894, 0.595, 0.1984, 0.6099]}, {"w": "Modified", "b": [0.2042, 0.595, 0.2736, 0.6099]}, {"w": "Test", "b": [0.2794, 0.595, 0.3131, 0.6099]}, {"w": "Set", "b": [0.3189, 0.595, 0.3441, 0.6099]}, {"w": "by", "b": [0.3499, 0.595, 0.369, 0.6099]}, {"w": "transforming", "b": [0.3748, 0.595, 0.476, 0.6099]}, {"w": "the", "b": [0.4818, 0.595, 0.5069, 0.6099]}, {"w": "examples", "b": [0.5128, 0.595, 0.5847, 0.6099]}, {"w": "from", "b": [0.5905, 0.595, 0.6273, 0.6099]}, {"w": "the", "b": [0.6331, 0.595, 0.6582, 0.6099]}, {"w": "original", "b": [0.664, 0.595, 0.7234, 0.6099]}, {"w": "test", "b": [0.7292, 0.595, 0.7584, 0.6099]}, {"w": "set", "b": [0.7643, 0.595, 0.7865, 0.6099]}, {"w": "as", "b": [0.7923, 0.595, 0.8085, 0.6099]}, {"w": "follows.", "b": [0.8143, 0.595, 0.8727, 0.6099]}, {"w": "To", "b": [0.1306, 0.6129, 0.1516, 0.6279]}, {"w": "each", "b": [0.1578, 0.6129, 0.1933, 0.6279]}, {"w": "example", "b": [0.1995, 0.6129, 0.2658, 0.6279]}, {"w": "in", "b": [0.272, 0.6129, 0.2874, 0.6279]}, {"w": "the", "b": [0.2936, 0.6129, 0.3193, 0.6279]}, {"w": "test", "b": [0.3255, 0.6129, 0.3554, 0.6279]}, {"w": "set,", "b": [0.3616, 0.6129, 0.3894, 0.6279]}, {"w": "add", "b": [0.3956, 0.6129, 0.4254, 0.6279]}, {"w": "the", "b": [0.4316, 0.6129, 0.4573, 0.6279]}, {"w": "original", "b": [0.4635, 0.6129, 0.5242, 0.6279]}, {"w": "label", "b": [0.5304, 0.6129, 0.569, 0.6279]}, {"w": "as", "b": [0.5751, 0.6129, 0.5917, 0.6279]}, {"w": "an", "b": [0.5978, 0.6129, 0.6174, 0.6279]}, {"w": "additional", "b": [0.6235, 0.6129, 0.7048, 0.6279]}, {"w": "feature,", "b": [0.711, 0.6129, 0.7722, 0.6279]}, {"w": "then", "b": [0.7784, 0.6129, 0.8144, 0.6279]}, {"w": "assign", "b": [0.8206, 0.6129, 0.8691, 0.6279]}, {"w": "the", "b": [0.1312, 0.6309, 0.1569, 0.6458]}, {"w": "new", "b": [0.163, 0.6309, 0.1948, 0.6458]}, {"w": "label", "b": [0.201, 0.6309, 0.2394, 0.6458]}, {"w": "“Test”", "b": [0.2456, 0.6309, 0.2974, 0.6458]}, {"w": "to", "b": [0.3036, 0.6309, 0.32, 0.6458]}, {"w": "that", "b": [0.3261, 0.6309, 0.36, 0.6458]}, {"w": "example.", "b": [0.3661, 0.6309, 0.4374, 0.6458]}]}, {"id": "b_11", "type": "paragraph", "text": "Merge the Modified Training Set 1 and the Modified Test Set to obtain a new Synthetic Training Set. You will use it for solving a binary classification problem of distinguishing the “Training” examples from the “Test” examples. Use that Synthetic Training Set, and train a", "words": [{"w": "Merge", "b": [0.1312, 0.6578, 0.182, 0.6727]}, {"w": "the", "b": [0.189, 0.6578, 0.2152, 0.6727]}, {"w": "Modified", "b": [0.2222, 0.6578, 0.2944, 0.6727]}, {"w": "Training", "b": [0.3014, 0.6578, 0.371, 0.6727]}, {"w": "Set", "b": [0.3781, 0.6578, 0.4042, 0.6727]}, {"w": "1", "b": [0.4112, 0.6578, 0.4206, 0.6727]}, {"w": "and", "b": [0.4277, 0.6578, 0.458, 0.6727]}, {"w": "the", "b": [0.465, 0.6578, 0.4912, 0.6727]}, {"w": "Modified", "b": [0.4982, 0.6578, 0.5704, 0.6727]}, {"w": "Test", "b": [0.5774, 0.6578, 0.6125, 0.6727]}, {"w": "Set", "b": [0.6196, 0.6578, 0.6457, 0.6727]}, {"w": "to", "b": [0.6527, 0.6578, 0.6695, 0.6727]}, {"w": "obtain", "b": [0.6765, 0.6578, 0.7288, 0.6727]}, {"w": "a", "b": [0.7358, 0.6578, 0.7452, 0.6727]}, {"w": "new", "b": [0.7522, 0.6578, 0.7847, 0.6727]}, {"w": "Synthetic", "b": [0.7917, 0.6578, 0.8691, 0.6727]}, {"w": "Training", "b": [0.1306, 0.6757, 0.1981, 0.6907]}, {"w": "Set.", "b": [0.2043, 0.6757, 0.2348, 0.6907]}, {"w": "You", "b": [0.243, 0.6757, 0.2745, 0.6907]}, {"w": "will", "b": [0.2806, 0.6757, 0.3091, 0.6907]}, {"w": "use", "b": [0.3152, 0.6757, 0.3407, 0.6907]}, {"w": "it", "b": [0.3469, 0.6757, 0.3591, 0.6907]}, {"w": "for", "b": [0.3652, 0.6757, 0.3871, 0.6907]}, {"w": "solving", "b": [0.3933, 0.6757, 0.4487, 0.6907]}, {"w": "a", "b": [0.4549, 0.6757, 0.464, 0.6907]}, {"w": "binary", "b": [0.4702, 0.6757, 0.5215, 0.6907]}, {"w": "classification", "b": [0.5277, 0.6757, 0.6284, 0.6907]}, {"w": "problem", "b": [0.6346, 0.6757, 0.6996, 0.6907]}, {"w": "of", "b": [0.7058, 0.6757, 0.7205, 0.6907]}, {"w": "distinguishing", "b": [0.7267, 0.6757, 0.8376, 0.6907]}, {"w": "the", "b": [0.8437, 0.6757, 0.8691, 0.6907]}, {"w": "“Training”", "b": [0.1286, 0.6937, 0.213, 0.7086]}, {"w": "examples", "b": [0.2191, 0.6937, 0.2914, 0.7086]}, {"w": "from", "b": [0.2976, 0.6937, 0.3345, 0.7086]}, {"w": "the", "b": [0.3406, 0.6937, 0.3659, 0.7086]}, {"w": "“Test”", "b": [0.372, 0.6937, 0.4231, 0.7086]}, {"w": "examples.", "b": [0.4292, 0.6937, 0.5066, 0.7086]}, {"w": "Use", "b": [0.5148, 0.6937, 0.5437, 0.7086]}, {"w": "that", "b": [0.5498, 0.6937, 0.5832, 0.7086]}, {"w": "Synthetic", "b": [0.5893, 0.6937, 0.664, 0.7086]}, {"w": "Training", "b": [0.6702, 0.6937, 0.7374, 0.7086]}, {"w": "Set,", "b": [0.7435, 0.6937, 0.7738, 0.7086]}, {"w": "and", "b": [0.78, 0.6937, 0.8093, 0.7086]}, {"w": "train", "b": [0.8154, 0.6937, 0.8538, 0.7086]}, {"w": "a", "b": [0.86, 0.6937, 0.8691, 0.7086]}]}, {"id": "b_12", "type": "paragraph", "text": "binary classifier that returns a prediction score.", "words": [{"w": "binary", "b": [0.1312, 0.7116, 0.1831, 0.7266]}, {"w": "classifier", "b": [0.1892, 0.7116, 0.2572, 0.7266]}, {"w": "that", "b": [0.2633, 0.7116, 0.2972, 0.7266]}, {"w": "returns", "b": [0.3033, 0.7116, 0.361, 0.7266]}, {"w": "a", "b": [0.3671, 0.7116, 0.3764, 0.7266]}, {"w": "prediction", "b": [0.3825, 0.7116, 0.4636, 0.7266]}, {"w": "score.", "b": [0.4697, 0.7116, 0.515, 0.7266]}]}, {"id": "b_13", "type": "paragraph", "text": "Observe that the binary classifier we have trained will predict, for a given original example, whether it’s a training or a test example. Apply that binary classifier to the examples from Training Set 2. Identify the examples predicted as “Test,” which the binary model is most certain about. Use those examples as validation data for your original problem.", "words": [{"w": "Observe", "b": [0.1312, 0.7385, 0.196, 0.7535]}, {"w": "that", "b": [0.2022, 0.7385, 0.236, 0.7535]}, {"w": "the", "b": [0.2421, 0.7385, 0.2678, 0.7535]}, {"w": "binary", "b": [0.2739, 0.7385, 0.3258, 0.7535]}, {"w": "classifier", "b": [0.3319, 0.7385, 0.3999, 0.7535]}, {"w": "we", "b": [0.406, 0.7385, 0.427, 0.7535]}, {"w": "have", "b": [0.4332, 0.7385, 0.4696, 0.7535]}, {"w": "trained", "b": [0.4757, 0.7385, 0.5332, 0.7535]}, {"w": "will", "b": [0.5393, 0.7385, 0.5681, 0.7535]}, {"w": "predict,", "b": [0.5742, 0.7385, 0.6358, 0.7535]}, {"w": "for", "b": [0.6419, 0.7385, 0.664, 0.7535]}, {"w": "a", "b": [0.6702, 0.7385, 0.6794, 0.7535]}, {"w": "given", "b": [0.6856, 0.7385, 0.7276, 0.7535]}, {"w": "original", "b": [0.7337, 0.7385, 0.7943, 0.7535]}, {"w": "example,", "b": [0.8004, 0.7385, 0.8717, 0.7535]}, {"w": "whether", "b": [0.1306, 0.7565, 0.1952, 0.7714]}, {"w": "it’s", "b": [0.2013, 0.7565, 0.226, 0.7714]}, {"w": "a", "b": [0.2322, 0.7565, 0.2414, 0.7714]}, {"w": "training", "b": [0.2475, 0.7565, 0.3111, 0.7714]}, {"w": "or", "b": [0.3173, 0.7565, 0.3337, 0.7714]}, {"w": "a", "b": [0.3399, 0.7565, 0.3491, 0.7714]}, {"w": "test", "b": [0.3552, 0.7565, 0.385, 0.7714]}, {"w": "example.", "b": [0.3912, 0.7565, 0.4624, 0.7714]}, {"w": "Apply", "b": [0.4706, 0.7565, 0.5198, 0.7714]}, {"w": "that", "b": [0.5259, 0.7565, 0.5597, 0.7714]}, {"w": "binary", "b": [0.5659, 0.7565, 0.6177, 0.7714]}, {"w": "classifier", "b": [0.6238, 0.7565, 0.6917, 0.7714]}, {"w": "to", "b": [0.6979, 0.7565, 0.7142, 0.7714]}, {"w": "the", "b": [0.7204, 0.7565, 0.746, 0.7714]}, {"w": "examples", "b": [0.7522, 0.7565, 0.8255, 0.7714]}, {"w": "from", "b": [0.8317, 0.7565, 0.8691, 0.7714]}, {"w": "Training", "b": [0.1306, 0.7744, 0.1997, 0.7894]}, {"w": "Set", "b": [0.2058, 0.7744, 0.2318, 0.7894]}, {"w": "2.", "b": [0.238, 0.7744, 0.2525, 0.7894]}, {"w": "Identify", "b": [0.2607, 0.7744, 0.3241, 0.7894]}, {"w": "the", "b": [0.3302, 0.7744, 0.3562, 0.7894]}, {"w": "examples", "b": [0.3623, 0.7744, 0.4367, 0.7894]}, {"w": "predicted", "b": [0.4429, 0.7744, 0.5188, 0.7894]}, {"w": "as", "b": [0.5249, 0.7744, 0.5416, 0.7894]}, {"w": "“Test,”", "b": [0.5478, 0.7744, 0.6055, 0.7894]}, {"w": "which", "b": [0.6117, 0.7744, 0.6589, 0.7894]}, {"w": "the", "b": [0.6651, 0.7744, 0.6911, 0.7894]}, {"w": "binary", "b": [0.6972, 0.7744, 0.7497, 0.7894]}, {"w": "model", "b": [0.7558, 0.7744, 0.8052, 0.7894]}, {"w": "is", "b": [0.8113, 0.7744, 0.8239, 0.7894]}, {"w": "most", "b": [0.83, 0.7744, 0.8696, 0.7894]}, {"w": "certain", "b": [0.1312, 0.7924, 0.1867, 0.8073]}, {"w": "about.", "b": [0.1928, 0.7924, 0.2446, 0.8073]}, {"w": "Use", "b": [0.2528, 0.7924, 0.2821, 0.8073]}, {"w": "those", "b": [0.2883, 0.7924, 0.3304, 0.8073]}, {"w": "examples", "b": [0.3366, 0.7924, 0.41, 0.8073]}, {"w": "as", "b": [0.4162, 0.7924, 0.4327, 0.8073]}, {"w": "validation", "b": [0.4388, 0.7924, 0.5183, 0.8073]}, {"w": "data", "b": [0.5244, 0.7924, 0.5603, 0.8073]}, {"w": "for", "b": [0.5665, 0.7924, 0.5886, 0.8073]}, {"w": "your", "b": [0.5947, 0.7924, 0.6307, 0.8073]}, {"w": "original", "b": [0.6368, 0.7924, 0.6974, 0.8073]}, {"w": "problem.", "b": [0.7035, 0.7924, 0.7743, 0.8073]}]}, {"id": "b_14", "type": "paragraph", "text": "Remove the examples from Training Set 1 which the binary model predicted “Training” with the highest certainty. Use the remaining examples in Training Set 1 as the training data for your original problem.", "words": [{"w": "Remove", "b": [0.1312, 0.8193, 0.1932, 0.8343]}, {"w": "the", "b": [0.1993, 0.8193, 0.2245, 0.8343]}, {"w": "examples", "b": [0.2305, 0.8193, 0.3025, 0.8343]}, {"w": "from", "b": [0.3086, 0.8193, 0.3453, 0.8343]}, {"w": "Training", "b": [0.3514, 0.8193, 0.4182, 0.8343]}, {"w": "Set", "b": [0.4243, 0.8193, 0.4494, 0.8343]}, {"w": "1", "b": [0.4555, 0.8193, 0.4646, 0.8343]}, {"w": "which", "b": [0.4707, 0.8193, 0.5164, 0.8343]}, {"w": "the", "b": [0.5225, 0.8193, 0.5476, 0.8343]}, {"w": "binary", "b": [0.5537, 0.8193, 0.6045, 0.8343]}, {"w": "model", "b": [0.6106, 0.8193, 0.6583, 0.8343]}, {"w": "predicted", "b": [0.6644, 0.8193, 0.7378, 0.8343]}, {"w": "“Training”", "b": [0.7439, 0.8193, 0.8278, 0.8343]}, {"w": "with", "b": [0.8339, 0.8193, 0.8691, 0.8343]}, {"w": "the", "b": [0.1312, 0.8372, 0.1567, 0.8522]}, {"w": "highest", "b": [0.1628, 0.8372, 0.22, 0.8522]}, {"w": "certainty.", "b": [0.2261, 0.8372, 0.3005, 0.8522]}, {"w": "Use", "b": [0.3087, 0.8372, 0.3378, 0.8522]}, {"w": "the", "b": [0.3439, 0.8372, 0.3694, 0.8522]}, {"w": "remaining", "b": [0.3755, 0.8372, 0.455, 0.8522]}, {"w": "examples", "b": [0.4611, 0.8372, 0.534, 0.8522]}, {"w": "in", "b": [0.5402, 0.8372, 0.5554, 0.8522]}, {"w": "Training", "b": [0.5616, 0.8372, 0.6293, 0.8522]}, {"w": "Set", "b": [0.6354, 0.8372, 0.6609, 0.8522]}, {"w": "1", "b": [0.667, 0.8372, 0.6762, 0.8522]}, {"w": "as", "b": [0.6823, 0.8372, 0.6987, 0.8522]}, {"w": "the", "b": [0.7049, 0.8372, 0.7303, 0.8522]}, {"w": "training", "b": [0.7365, 0.8372, 0.7996, 0.8522]}, {"w": "data", "b": [0.8058, 0.8372, 0.8414, 0.8522]}, {"w": "for", "b": [0.8475, 0.8372, 0.8695, 0.8522]}, {"w": "your", "b": [0.1308, 0.8552, 0.1667, 0.8701]}, {"w": "original", "b": [0.1728, 0.8552, 0.2334, 0.8701]}, {"w": "problem.", "b": [0.2395, 0.8552, 0.3103, 0.8701]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 22", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "22", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 198, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "You must experiment to find out what is the ideal way to split the original training set into Training Set 1 and Training Set 2. You also must find out how many examples from Training Set 1 to use for training, and how many of them to use for validation.", "words": [{"w": "You", "b": [0.1305, 0.0881, 0.1621, 0.1031]}, {"w": "must", "b": [0.1683, 0.0881, 0.2077, 0.1031]}, {"w": "experiment", "b": [0.2138, 0.0881, 0.3031, 0.1031]}, {"w": "to", "b": [0.3093, 0.0881, 0.3256, 0.1031]}, {"w": "find", "b": [0.3317, 0.0881, 0.3624, 0.1031]}, {"w": "out", "b": [0.3685, 0.0881, 0.395, 0.1031]}, {"w": "what", "b": [0.4012, 0.0881, 0.4409, 0.1031]}, {"w": "is", "b": [0.4471, 0.0881, 0.4594, 0.1031]}, {"w": "the", "b": [0.4656, 0.0881, 0.4911, 0.1031]}, {"w": "ideal", "b": [0.4972, 0.0881, 0.535, 0.1031]}, {"w": "way", "b": [0.5411, 0.0881, 0.5722, 0.1031]}, {"w": "to", "b": [0.5784, 0.0881, 0.5947, 0.1031]}, {"w": "split", "b": [0.6008, 0.0881, 0.6356, 0.1031]}, {"w": "the", "b": [0.6418, 0.0881, 0.6673, 0.1031]}, {"w": "original", "b": [0.6734, 0.0881, 0.7337, 0.1031]}, {"w": "training", "b": [0.7398, 0.0881, 0.8031, 0.1031]}, {"w": "set", "b": [0.8092, 0.0881, 0.8318, 0.1031]}, {"w": "into", "b": [0.8379, 0.0881, 0.8691, 0.1031]}, {"w": "Training", "b": [0.1306, 0.106, 0.1974, 0.121]}, {"w": "Set", "b": [0.2032, 0.106, 0.2284, 0.121]}, {"w": "1", "b": [0.2342, 0.106, 0.2432, 0.121]}, {"w": "and", "b": [0.2491, 0.106, 0.2782, 0.121]}, {"w": "Training", "b": [0.284, 0.106, 0.3509, 0.121]}, {"w": "Set", "b": [0.3567, 0.106, 0.3818, 0.121]}, {"w": "2.", "b": [0.3877, 0.106, 0.4017, 0.121]}, {"w": "You", "b": [0.4098, 0.106, 0.4409, 0.121]}, {"w": "also", "b": [0.4468, 0.106, 0.477, 0.121]}, {"w": "must", "b": [0.4828, 0.106, 0.5216, 0.121]}, {"w": "find", "b": [0.5274, 0.106, 0.5576, 0.121]}, {"w": "out", "b": [0.5634, 0.106, 0.5895, 0.121]}, {"w": "how", "b": [0.5954, 0.106, 0.627, 0.121]}, {"w": "many", "b": [0.6328, 0.106, 0.676, 0.121]}, {"w": "examples", "b": [0.6818, 0.106, 0.7538, 0.121]}, {"w": "from", "b": [0.7596, 0.106, 0.7963, 0.121]}, {"w": "Training", "b": [0.8022, 0.106, 0.869, 0.121]}, {"w": "Set", "b": [0.1312, 0.124, 0.1569, 0.1389]}, {"w": "1", "b": [0.163, 0.124, 0.1722, 0.1389]}, {"w": "to", "b": [0.1784, 0.124, 0.1948, 0.1389]}, {"w": "use", "b": [0.201, 0.124, 0.2267, 0.1389]}, {"w": "for", "b": [0.2329, 0.124, 0.255, 0.1389]}, {"w": "training,", "b": [0.2611, 0.124, 0.3299, 0.1389]}, {"w": "and", "b": [0.336, 0.124, 0.3657, 0.1389]}, {"w": "how", "b": [0.3719, 0.124, 0.4042, 0.1389]}, {"w": "many", "b": [0.4103, 0.124, 0.4544, 0.1389]}, {"w": "of", "b": [0.4606, 0.124, 0.4754, 0.1389]}, {"w": "them", "b": [0.4816, 0.124, 0.5226, 0.1389]}, {"w": "to", "b": [0.5287, 0.124, 0.5451, 0.1389]}, {"w": "use", "b": [0.5513, 0.124, 0.5771, 0.1389]}, {"w": "for", "b": [0.5832, 0.124, 0.6053, 0.1389]}, {"w": "validation.", "b": [0.6114, 0.124, 0.696, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "6.4 Handling Imbalanced Datasets", "words": [{"w": "6.4", "b": [0.1312, 0.1728, 0.1631, 0.1908]}, {"w": "Handling", "b": [0.188, 0.1728, 0.2874, 0.1908]}, {"w": "Imbalanced", "b": [0.2957, 0.1728, 0.4202, 0.1908]}, {"w": "Datasets", "b": [0.4285, 0.1728, 0.5222, 0.1908]}]}, {"id": "b_2", "type": "paragraph", "text": "In Section ?? of Chapter 3, we considered some techniques to handle imbalanced datasets, such as over- and undersampling, and generating synthetic data.", "words": [{"w": "In", "b": [0.1312, 0.2114, 0.1478, 0.2264]}, {"w": "Section", "b": [0.1536, 0.2114, 0.2109, 0.2264]}, {"w": "??", "b": [0.2166, 0.2117, 0.2366, 0.2267]}, {"w": "of", "b": [0.2424, 0.2114, 0.2569, 0.2264]}, {"w": "Chapter", "b": [0.2627, 0.2114, 0.327, 0.2264]}, {"w": "3,", "b": [0.3328, 0.2114, 0.3469, 0.2264]}, {"w": "we", "b": [0.3527, 0.2114, 0.3733, 0.2264]}, {"w": "considered", "b": [0.379, 0.2114, 0.4616, 0.2264]}, {"w": "some", "b": [0.4674, 0.2114, 0.5067, 0.2264]}, {"w": "techniques", "b": [0.5124, 0.2114, 0.5949, 0.2264]}, {"w": "to", "b": [0.6007, 0.2114, 0.6167, 0.2264]}, {"w": "handle", "b": [0.6225, 0.2114, 0.6748, 0.2264]}, {"w": "imbalanced", "b": [0.6803, 0.2117, 0.7843, 0.2267]}, {"w": "datasets,", "b": [0.7909, 0.2114, 0.8713, 0.2267]}, {"w": "such", "b": [0.1312, 0.2294, 0.1667, 0.2443]}, {"w": "as", "b": [0.1729, 0.2294, 0.1894, 0.2443]}, {"w": "over-", "b": [0.1955, 0.2294, 0.2351, 0.2443]}, {"w": "and", "b": [0.2412, 0.2294, 0.2709, 0.2443]}, {"w": "undersampling,", "b": [0.2771, 0.2294, 0.4003, 0.2443]}, {"w": "and", "b": [0.4065, 0.2294, 0.4362, 0.2443]}, {"w": "generating", "b": [0.4424, 0.2294, 0.5265, 0.2443]}, {"w": "synthetic", "b": [0.5327, 0.2294, 0.6056, 0.2443]}, {"w": "data.", "b": [0.6117, 0.2294, 0.6527, 0.2443]}]}, {"id": "b_3", "type": "paragraph", "text": "In this section, we will consider additional techniques that are applied during learning, as opposed to in the data collection and preparation stage.", "words": [{"w": "In", "b": [0.1312, 0.2563, 0.1485, 0.2712]}, {"w": "this", "b": [0.1547, 0.2563, 0.1852, 0.2712]}, {"w": "section,", "b": [0.1914, 0.2563, 0.2533, 0.2712]}, {"w": "we", "b": [0.2595, 0.2563, 0.281, 0.2712]}, {"w": "will", "b": [0.2872, 0.2563, 0.3165, 0.2712]}, {"w": "consider", "b": [0.3228, 0.2563, 0.3899, 0.2712]}, {"w": "additional", "b": [0.3961, 0.2563, 0.4787, 0.2712]}, {"w": "techniques", "b": [0.485, 0.2563, 0.5709, 0.2712]}, {"w": "that", "b": [0.5772, 0.2563, 0.6117, 0.2712]}, {"w": "are", "b": [0.6179, 0.2563, 0.6431, 0.2712]}, {"w": "applied", "b": [0.6493, 0.2563, 0.709, 0.2712]}, {"w": "during", "b": [0.7152, 0.2563, 0.7686, 0.2712]}, {"w": "learning,", "b": [0.7749, 0.2563, 0.846, 0.2712]}, {"w": "as", "b": [0.8523, 0.2563, 0.8692, 0.2712]}, {"w": "opposed", "b": [0.1312, 0.2742, 0.1965, 0.2892]}, {"w": "to", "b": [0.2026, 0.2742, 0.219, 0.2892]}, {"w": "in", "b": [0.2252, 0.2742, 0.2405, 0.2892]}, {"w": "the", "b": [0.2467, 0.2742, 0.2723, 0.2892]}, {"w": "data", "b": [0.2785, 0.2742, 0.3144, 0.2892]}, {"w": "collection", "b": [0.3205, 0.2742, 0.3964, 0.2892]}, {"w": "and", "b": [0.4026, 0.2742, 0.4323, 0.2892]}, {"w": "preparation", "b": [0.4385, 0.2742, 0.5319, 0.2892]}, {"w": "stage.", "b": [0.538, 0.2742, 0.5843, 0.2892]}]}, {"id": "b_4", "type": "paragraph", "text": "6.4.1 Class Weighting", "words": [{"w": "6.4.1", "b": [0.1312, 0.3224, 0.1749, 0.3373]}, {"w": "Class", "b": [0.1961, 0.3224, 0.2444, 0.3373]}, {"w": "Weighting", "b": [0.2514, 0.3224, 0.3456, 0.3373]}]}, {"id": "b_5", "type": "paragraph", "text": "Some algorithms and models, such as support vector machine (SVM), decision trees, and random forests, allow the data analyst to provide weights for each class. The loss in the cost function is typically multiplied by the weight. The data analyst may, for example, provide greater weight to the minority class. This makes it harder for the learning algorithm to disregard examples of the minority class, because it would result in much higher cost than without class weighting.", "words": [{"w": "Some", "b": [0.1312, 0.3587, 0.1752, 0.3736]}, {"w": "algorithms", "b": [0.1815, 0.3587, 0.2685, 0.3736]}, {"w": "and", "b": [0.2749, 0.3587, 0.3052, 0.3736]}, {"w": "models,", "b": [0.3116, 0.3587, 0.3739, 0.3736]}, {"w": "such", "b": [0.3803, 0.3587, 0.4166, 0.3736]}, {"w": "as", "b": [0.423, 0.3587, 0.4398, 0.3736]}, {"w": "support", "b": [0.446, 0.359, 0.518, 0.3739]}, {"w": "vector", "b": [0.5253, 0.359, 0.5827, 0.3739]}, {"w": "machine", "b": [0.59, 0.359, 0.666, 0.3739]}, {"w": "(SVM),", "b": [0.6724, 0.3587, 0.7341, 0.3736]}, {"w": "decision", "b": [0.7405, 0.359, 0.814, 0.3739]}, {"w": "trees,", "b": [0.8213, 0.3587, 0.8713, 0.3739]}, {"w": "and", "b": [0.1312, 0.3766, 0.1612, 0.3916]}, {"w": "random", "b": [0.1673, 0.3769, 0.2382, 0.3919]}, {"w": "forests,", "b": [0.2453, 0.3766, 0.311, 0.3919]}, {"w": "allow", "b": [0.3171, 0.3766, 0.359, 0.3916]}, {"w": "the", "b": [0.3651, 0.3766, 0.391, 0.3916]}, {"w": "data", "b": [0.3971, 0.3766, 0.4333, 0.3916]}, {"w": "analyst", "b": [0.4394, 0.3766, 0.4979, 0.3916]}, {"w": "to", "b": [0.504, 0.3766, 0.5206, 0.3916]}, {"w": "provide", "b": [0.5267, 0.3766, 0.5867, 0.3916]}, {"w": "weights", "b": [0.5928, 0.3766, 0.6529, 0.3916]}, {"w": "for", "b": [0.659, 0.3766, 0.6813, 0.3916]}, {"w": "each", "b": [0.6874, 0.3766, 0.7231, 0.3916]}, {"w": "class.", "b": [0.7292, 0.3766, 0.7718, 0.3916]}, {"w": "The", "b": [0.7801, 0.3766, 0.8121, 0.3916]}, {"w": "loss", "b": [0.8182, 0.3766, 0.8474, 0.3916]}, {"w": "in", "b": [0.8535, 0.3766, 0.869, 0.3916]}, {"w": "the", "b": [0.1312, 0.3945, 0.1571, 0.4095]}, {"w": "cost", "b": [0.1633, 0.3945, 0.1955, 0.4095]}, {"w": "function", "b": [0.2016, 0.3945, 0.2685, 0.4095]}, {"w": "is", "b": [0.2746, 0.3945, 0.2871, 0.4095]}, {"w": "typically", "b": [0.2933, 0.3945, 0.3632, 0.4095]}, {"w": "multiplied", "b": [0.3693, 0.3945, 0.4517, 0.4095]}, {"w": "by", "b": [0.4578, 0.3945, 0.4775, 0.4095]}, {"w": "the", "b": [0.4836, 0.3945, 0.5095, 0.4095]}, {"w": "weight.", "b": [0.5157, 0.3945, 0.5737, 0.4095]}, {"w": "The", "b": [0.5819, 0.3945, 0.614, 0.4095]}, {"w": "data", "b": [0.6201, 0.3945, 0.6564, 0.4095]}, {"w": "analyst", "b": [0.6625, 0.3945, 0.7211, 0.4095]}, {"w": "may,", "b": [0.7273, 0.3945, 0.7651, 0.4095]}, {"w": "for", "b": [0.7712, 0.3945, 0.7935, 0.4095]}, {"w": "example,", "b": [0.7997, 0.3945, 0.8716, 0.4095]}, {"w": "provide", "b": [0.1312, 0.4125, 0.1897, 0.4274]}, {"w": "greater", "b": [0.1958, 0.4125, 0.2513, 0.4274]}, {"w": "weight", "b": [0.2575, 0.4125, 0.3088, 0.4274]}, {"w": "to", "b": [0.3149, 0.4125, 0.331, 0.4274]}, {"w": "the", "b": [0.3372, 0.4125, 0.3624, 0.4274]}, {"w": "minority", "b": [0.3685, 0.4125, 0.436, 0.4274]}, {"w": "class.", "b": [0.4421, 0.4125, 0.4836, 0.4274]}, {"w": "This", "b": [0.4918, 0.4125, 0.5272, 0.4274]}, {"w": "makes", "b": [0.5333, 0.4125, 0.5818, 0.4274]}, {"w": "it", "b": [0.5879, 0.4125, 0.6, 0.4274]}, {"w": "harder", "b": [0.6061, 0.4125, 0.6576, 0.4274]}, {"w": "for", "b": [0.6637, 0.4125, 0.6854, 0.4274]}, {"w": "the", "b": [0.6916, 0.4125, 0.7167, 0.4274]}, {"w": "learning", "b": [0.7229, 0.4125, 0.7864, 0.4274]}, {"w": "algorithm", "b": [0.7925, 0.4125, 0.8691, 0.4274]}, {"w": "to", "b": [0.1312, 0.4304, 0.1473, 0.4454]}, {"w": "disregard", "b": [0.1534, 0.4304, 0.2259, 0.4454]}, {"w": "examples", "b": [0.232, 0.4304, 0.3039, 0.4454]}, {"w": "of", "b": [0.31, 0.4304, 0.3245, 0.4454]}, {"w": "the", "b": [0.3306, 0.4304, 0.3557, 0.4454]}, {"w": "minority", "b": [0.3618, 0.4304, 0.4291, 0.4454]}, {"w": "class,", "b": [0.4352, 0.4304, 0.4766, 0.4454]}, {"w": "because", "b": [0.4827, 0.4304, 0.5436, 0.4454]}, {"w": "it", "b": [0.5496, 0.4304, 0.5617, 0.4454]}, {"w": "would", "b": [0.5677, 0.4304, 0.6145, 0.4454]}, {"w": "result", "b": [0.6205, 0.4304, 0.6649, 0.4454]}, {"w": "in", "b": [0.6709, 0.4304, 0.686, 0.4454]}, {"w": "much", "b": [0.6921, 0.4304, 0.7342, 0.4454]}, {"w": "higher", "b": [0.7403, 0.4304, 0.7896, 0.4454]}, {"w": "cost", "b": [0.7956, 0.4304, 0.8269, 0.4454]}, {"w": "than", "b": [0.833, 0.4304, 0.8691, 0.4454]}, {"w": "without", "b": [0.1306, 0.4484, 0.1931, 0.4633]}, {"w": "class", "b": [0.1993, 0.4484, 0.2364, 0.4633]}, {"w": "weighting.", "b": [0.2425, 0.4484, 0.3246, 0.4633]}]}, {"id": "b_6", "type": "paragraph", "text": "Let’s see how it works in support vector machines. Our problem is distinguishing between genuine and fraudulent e-commerce transactions. The examples of genuine transactions are much more frequent. If you use SVM with soft margin, you can define a cost for misclassified examples. The SVM algorithm tries to move the hyperplane to reduce the number of misclassified examples. If the misclassification cost is the same for both classes, the “fraudulent” examples, in the minority, risk being misclassified to allow classifying more of the majority class correctly. This situation is illustrated in Figure 6a. This problem is observed for most learning algorithms applied to imbalanced datasets.", "words": [{"w": "Let’s", "b": [0.1312, 0.4753, 0.1712, 0.4903]}, {"w": "see", "b": [0.1773, 0.4753, 0.2013, 0.4903]}, {"w": "how", "b": [0.2075, 0.4753, 0.2403, 0.4903]}, {"w": "it", "b": [0.2464, 0.4753, 0.2589, 0.4903]}, {"w": "works", "b": [0.265, 0.4753, 0.312, 0.4903]}, {"w": "in", "b": [0.3181, 0.4753, 0.3338, 0.4903]}, {"w": "support", "b": [0.3399, 0.4753, 0.403, 0.4903]}, {"w": "vector", "b": [0.4091, 0.4753, 0.4592, 0.4903]}, {"w": "machines.", "b": [0.4653, 0.4753, 0.545, 0.4903]}, {"w": "Our", "b": [0.5532, 0.4753, 0.5856, 0.4903]}, {"w": "problem", "b": [0.5917, 0.4753, 0.6584, 0.4903]}, {"w": "is", "b": [0.6645, 0.4753, 0.6771, 0.4903]}, {"w": "distinguishing", "b": [0.6832, 0.4753, 0.7969, 0.4903]}, {"w": "between", "b": [0.803, 0.4753, 0.8692, 0.4903]}, {"w": "genuine", "b": [0.1312, 0.4933, 0.1935, 0.5082]}, {"w": "and", "b": [0.2012, 0.4933, 0.2316, 0.5082]}, {"w": "fraudulent", "b": [0.2393, 0.4933, 0.3241, 0.5082]}, {"w": "e-commerce", "b": [0.3319, 0.4933, 0.4281, 0.5082]}, {"w": "transactions.", "b": [0.4359, 0.4933, 0.5408, 0.5082]}, {"w": "The", "b": [0.5538, 0.4933, 0.5862, 0.5082]}, {"w": "examples", "b": [0.5939, 0.4933, 0.6688, 0.5082]}, {"w": "of", "b": [0.6766, 0.4933, 0.6918, 0.5082]}, {"w": "genuine", "b": [0.6995, 0.4933, 0.7618, 0.5082]}, {"w": "transactions", "b": [0.7695, 0.4933, 0.8691, 0.5082]}, {"w": "are", "b": [0.1312, 0.5112, 0.1564, 0.5262]}, {"w": "much", "b": [0.1644, 0.5112, 0.2083, 0.5262]}, {"w": "more", "b": [0.2163, 0.5112, 0.2571, 0.5262]}, {"w": "frequent.", "b": [0.265, 0.5112, 0.3378, 0.5262]}, {"w": "If", "b": [0.3514, 0.5112, 0.364, 0.5262]}, {"w": "you", "b": [0.3719, 0.5112, 0.4012, 0.5262]}, {"w": "use", "b": [0.4092, 0.5112, 0.4354, 0.5262]}, {"w": "SVM", "b": [0.4434, 0.5112, 0.4852, 0.5262]}, {"w": "with", "b": [0.4932, 0.5112, 0.5298, 0.5262]}, {"w": "soft", "b": [0.5377, 0.5115, 0.5714, 0.5265]}, {"w": "margin,", "b": [0.5806, 0.5112, 0.6509, 0.5265]}, {"w": "you", "b": [0.6593, 0.5112, 0.6886, 0.5262]}, {"w": "can", "b": [0.6966, 0.5112, 0.7248, 0.5262]}, {"w": "define", "b": [0.7328, 0.5112, 0.7809, 0.5262]}, {"w": "a", "b": [0.7888, 0.5112, 0.7983, 0.5262]}, {"w": "cost", "b": [0.8062, 0.5112, 0.8387, 0.5262]}, {"w": "for", "b": [0.8467, 0.5112, 0.8693, 0.5262]}, {"w": "misclassified", "b": [0.1312, 0.5291, 0.232, 0.5441]}, {"w": "examples.", "b": [0.2395, 0.5291, 0.3196, 0.5441]}, {"w": "The", "b": [0.332, 0.5291, 0.3645, 0.5441]}, {"w": "SVM", "b": [0.372, 0.5291, 0.4138, 0.5441]}, {"w": "algorithm", "b": [0.4214, 0.5291, 0.5009, 0.5441]}, {"w": "tries", "b": [0.5084, 0.5291, 0.5442, 0.5441]}, {"w": "to", "b": [0.5517, 0.5291, 0.5685, 0.5441]}, {"w": "move", "b": [0.576, 0.5291, 0.6184, 0.5441]}, {"w": "the", "b": [0.6259, 0.5291, 0.6521, 0.5441]}, {"w": "hyperplane", "b": [0.6596, 0.5291, 0.7502, 0.5441]}, {"w": "to", "b": [0.7577, 0.5291, 0.7744, 0.5441]}, {"w": "reduce", "b": [0.782, 0.5291, 0.8354, 0.5441]}, {"w": "the", "b": [0.843, 0.5291, 0.8691, 0.5441]}, {"w": "number", "b": [0.1312, 0.5471, 0.1933, 0.562]}, {"w": "of", "b": [0.1994, 0.5471, 0.2146, 0.562]}, {"w": "misclassified", "b": [0.2207, 0.5471, 0.3211, 0.562]}, {"w": "examples.", "b": [0.3272, 0.5471, 0.407, 0.562]}, {"w": "If", "b": [0.4152, 0.5471, 0.4277, 0.562]}, {"w": "the", "b": [0.4339, 0.5471, 0.4599, 0.562]}, {"w": "misclassification", "b": [0.4661, 0.5471, 0.5977, 0.562]}, {"w": "cost", "b": [0.6038, 0.5471, 0.6362, 0.562]}, {"w": "is", "b": [0.6424, 0.5471, 0.655, 0.562]}, {"w": "the", "b": [0.6612, 0.5471, 0.6872, 0.562]}, {"w": "same", "b": [0.6934, 0.5471, 0.7341, 0.562]}, {"w": "for", "b": [0.7403, 0.5471, 0.7627, 0.562]}, {"w": "both", "b": [0.7689, 0.5471, 0.8069, 0.562]}, {"w": "classes,", "b": [0.813, 0.5471, 0.8717, 0.562]}, {"w": "the", "b": [0.1312, 0.565, 0.1566, 0.58]}, {"w": "“fraudulent”", "b": [0.1628, 0.565, 0.2624, 0.58]}, {"w": "examples,", "b": [0.2686, 0.565, 0.3464, 0.58]}, {"w": "in", "b": [0.3526, 0.565, 0.3679, 0.58]}, {"w": "the", "b": [0.374, 0.565, 0.3994, 0.58]}, {"w": "minority,", "b": [0.4056, 0.565, 0.4772, 0.58]}, {"w": "risk", "b": [0.4834, 0.565, 0.5125, 0.58]}, {"w": "being", "b": [0.5187, 0.565, 0.5619, 0.58]}, {"w": "misclassified", "b": [0.568, 0.565, 0.6659, 0.58]}, {"w": "to", "b": [0.6721, 0.565, 0.6883, 0.58]}, {"w": "allow", "b": [0.6945, 0.565, 0.7356, 0.58]}, {"w": "classifying", "b": [0.7418, 0.565, 0.8233, 0.58]}, {"w": "more", "b": [0.8295, 0.565, 0.8691, 0.58]}, {"w": "of", "b": [0.1312, 0.583, 0.1464, 0.5979]}, {"w": "the", "b": [0.153, 0.583, 0.1792, 0.5979]}, {"w": "majority", "b": [0.1858, 0.583, 0.2559, 0.5979]}, {"w": "class", "b": [0.2625, 0.583, 0.3004, 0.5979]}, {"w": "correctly.", "b": [0.307, 0.583, 0.3824, 0.5979]}, {"w": "This", "b": [0.392, 0.583, 0.4287, 0.5979]}, {"w": "situation", "b": [0.4353, 0.583, 0.5076, 0.5979]}, {"w": "is", "b": [0.5142, 0.583, 0.5268, 0.5979]}, {"w": "illustrated", "b": [0.5335, 0.583, 0.6173, 0.5979]}, {"w": "in", "b": [0.6239, 0.583, 0.6396, 0.5979]}, {"w": "Figure", "b": [0.6462, 0.583, 0.6993, 0.5979]}, {"w": "6a.", "b": [0.7059, 0.583, 0.73, 0.5979]}, {"w": "This", "b": [0.7396, 0.583, 0.7763, 0.5979]}, {"w": "problem", "b": [0.7829, 0.583, 0.8498, 0.5979]}, {"w": "is", "b": [0.8565, 0.583, 0.8691, 0.5979]}, {"w": "observed", "b": [0.1312, 0.6009, 0.2011, 0.6159]}, {"w": "for", "b": [0.2073, 0.6009, 0.2294, 0.6159]}, {"w": "most", "b": [0.2355, 0.6009, 0.2746, 0.6159]}, {"w": "learning", "b": [0.2807, 0.6009, 0.3454, 0.6159]}, {"w": "algorithms", "b": [0.3516, 0.6009, 0.4368, 0.6159]}, {"w": "applied", "b": [0.443, 0.6009, 0.5014, 0.6159]}, {"w": "to", "b": [0.5076, 0.6009, 0.524, 0.6159]}, {"w": "imbalanced", "b": [0.5301, 0.6009, 0.6209, 0.6159]}, {"w": "datasets.", "b": [0.627, 0.6009, 0.698, 0.6159]}]}, {"id": "b_7", "type": "paragraph", "text": "If you set higher the loss of minority misclassification, then the model will try harder to avoid misclassifying those examples. But this will incur the cost of misclassification of some majority class examples, as illustrated in Figure 6b.", "words": [{"w": "If", "b": [0.1312, 0.6279, 0.1438, 0.6428]}, {"w": "you", "b": [0.1509, 0.6279, 0.1802, 0.6428]}, {"w": "set", "b": [0.1873, 0.6279, 0.2104, 0.6428]}, {"w": "higher", "b": [0.2175, 0.6279, 0.2688, 0.6428]}, {"w": "the", "b": [0.2759, 0.6279, 0.3021, 0.6428]}, {"w": "loss", "b": [0.3092, 0.6279, 0.3387, 0.6428]}, {"w": "of", "b": [0.3458, 0.6279, 0.3609, 0.6428]}, {"w": "minority", "b": [0.368, 0.6279, 0.4382, 0.6428]}, {"w": "misclassification,", "b": [0.4453, 0.6279, 0.5826, 0.6428]}, {"w": "then", "b": [0.59, 0.6279, 0.6266, 0.6428]}, {"w": "the", "b": [0.6337, 0.6279, 0.6598, 0.6428]}, {"w": "model", "b": [0.6669, 0.6279, 0.7166, 0.6428]}, {"w": "will", "b": [0.7237, 0.6279, 0.753, 0.6428]}, {"w": "try", "b": [0.7601, 0.6279, 0.7847, 0.6428]}, {"w": "harder", "b": [0.7918, 0.6279, 0.8453, 0.6428]}, {"w": "to", "b": [0.8524, 0.6279, 0.8691, 0.6428]}, {"w": "avoid", "b": [0.1312, 0.6458, 0.1735, 0.6608]}, {"w": "misclassifying", "b": [0.1796, 0.6458, 0.2889, 0.6608]}, {"w": "those", "b": [0.2951, 0.6458, 0.3369, 0.6608]}, {"w": "examples.", "b": [0.3431, 0.6458, 0.4211, 0.6608]}, {"w": "But", "b": [0.4293, 0.6458, 0.4596, 0.6608]}, {"w": "this", "b": [0.4658, 0.6458, 0.4954, 0.6608]}, {"w": "will", "b": [0.5016, 0.6458, 0.5301, 0.6608]}, {"w": "incur", "b": [0.5363, 0.6458, 0.5771, 0.6608]}, {"w": "the", "b": [0.5832, 0.6458, 0.6087, 0.6608]}, {"w": "cost", "b": [0.6148, 0.6458, 0.6465, 0.6608]}, {"w": "of", "b": [0.6527, 0.6458, 0.6674, 0.6608]}, {"w": "misclassification", "b": [0.6736, 0.6458, 0.8022, 0.6608]}, {"w": "of", "b": [0.8084, 0.6458, 0.8231, 0.6608]}, {"w": "some", "b": [0.8293, 0.6458, 0.8691, 0.6608]}, {"w": "majority", "b": [0.1312, 0.6637, 0.2, 0.6787]}, {"w": "class", "b": [0.2061, 0.6637, 0.2433, 0.6787]}, {"w": "examples,", "b": [0.2494, 0.6637, 0.328, 0.6787]}, {"w": "as", "b": [0.3341, 0.6637, 0.3506, 0.6787]}, {"w": "illustrated", "b": [0.3568, 0.6637, 0.439, 0.6787]}, {"w": "in", "b": [0.4451, 0.6637, 0.4605, 0.6787]}, {"w": "Figure", "b": [0.4667, 0.6637, 0.5188, 0.6787]}, {"w": "6b.", "b": [0.5249, 0.6637, 0.5495, 0.6787]}]}, {"id": "b_8", "type": "paragraph", "text": "6.4.2 Ensemble of Resampled Datasets", "words": [{"w": "6.4.2", "b": [0.1312, 0.7119, 0.1749, 0.7269]}, {"w": "Ensemble", "b": [0.1961, 0.7119, 0.2844, 0.7269]}, {"w": "of", "b": [0.2915, 0.7119, 0.3086, 0.7269]}, {"w": "Resampled", "b": [0.3157, 0.7119, 0.4169, 0.7269]}, {"w": "Datasets", "b": [0.4239, 0.7119, 0.5038, 0.7269]}]}, {"id": "b_9", "type": "paragraph", "text": "Ensemble learning is another way of mitigating the class imbalance problem. The analyst randomly chunks majority examples into H subsets, then creates H training sets. After training H models, the analyst then makes predictions by averaging (or taking the majority) of the outputs of H models.", "words": [{"w": "Ensemble", "b": [0.1312, 0.7482, 0.2096, 0.7631]}, {"w": "learning", "b": [0.2158, 0.7482, 0.2817, 0.7631]}, {"w": "is", "b": [0.2879, 0.7482, 0.3006, 0.7631]}, {"w": "another", "b": [0.3068, 0.7482, 0.3696, 0.7631]}, {"w": "way", "b": [0.3759, 0.7482, 0.4078, 0.7631]}, {"w": "of", "b": [0.414, 0.7482, 0.4291, 0.7631]}, {"w": "mitigating", "b": [0.4354, 0.7482, 0.5201, 0.7631]}, {"w": "the", "b": [0.5263, 0.7482, 0.5524, 0.7631]}, {"w": "class", "b": [0.5587, 0.7482, 0.5966, 0.7631]}, {"w": "imbalance", "b": [0.6028, 0.7482, 0.6849, 0.7631]}, {"w": "problem.", "b": [0.6911, 0.7482, 0.7633, 0.7631]}, {"w": "The", "b": [0.7717, 0.7482, 0.8042, 0.7631]}, {"w": "analyst", "b": [0.8104, 0.7482, 0.8696, 0.7631]}, {"w": "randomly", "b": [0.1312, 0.7661, 0.2092, 0.7811]}, {"w": "chunks", "b": [0.2165, 0.7661, 0.2726, 0.7811]}, {"w": "majority", "b": [0.2799, 0.7661, 0.3501, 0.7811]}, {"w": "examples", "b": [0.3574, 0.7661, 0.4323, 0.7811]}, {"w": "into", "b": [0.4396, 0.7661, 0.4715, 0.7811]}, {"w": "H", "b": [0.4787, 0.7664, 0.494, 0.7814]}, {"w": "subsets,", "b": [0.5028, 0.7661, 0.567, 0.7811]}, {"w": "then", "b": [0.5746, 0.7661, 0.6112, 0.7811]}, {"w": "creates", "b": [0.6185, 0.7661, 0.6752, 0.7811]}, {"w": "H", "b": [0.6824, 0.7664, 0.6977, 0.7814]}, {"w": "training", "b": [0.7066, 0.7661, 0.7715, 0.7811]}, {"w": "sets.", "b": [0.7788, 0.7661, 0.8146, 0.7811]}, {"w": "After", "b": [0.8263, 0.7661, 0.8692, 0.7811]}, {"w": "training", "b": [0.1312, 0.7841, 0.1938, 0.799]}, {"w": "H", "b": [0.1999, 0.7843, 0.2153, 0.7993]}, {"w": "models,", "b": [0.2229, 0.7841, 0.2831, 0.799]}, {"w": "the", "b": [0.2892, 0.7841, 0.3144, 0.799]}, {"w": "analyst", "b": [0.3206, 0.7841, 0.3777, 0.799]}, {"w": "then", "b": [0.3838, 0.7841, 0.4191, 0.799]}, {"w": "makes", "b": [0.4253, 0.7841, 0.4738, 0.799]}, {"w": "predictions", "b": [0.4799, 0.7841, 0.5669, 0.799]}, {"w": "by", "b": [0.573, 0.7841, 0.5922, 0.799]}, {"w": "averaging", "b": [0.5983, 0.7841, 0.6735, 0.799]}, {"w": "(or", "b": [0.6797, 0.7841, 0.7029, 0.799]}, {"w": "taking", "b": [0.7091, 0.7841, 0.759, 0.799]}, {"w": "the", "b": [0.7651, 0.7841, 0.7904, 0.799]}, {"w": "majority)", "b": [0.7965, 0.7841, 0.8712, 0.799]}, {"w": "of", "b": [0.1312, 0.802, 0.1461, 0.817]}, {"w": "the", "b": [0.1522, 0.802, 0.1779, 0.817]}, {"w": "outputs", "b": [0.1841, 0.802, 0.2457, 0.817]}, {"w": "of", "b": [0.2518, 0.802, 0.2667, 0.817]}, {"w": "H", "b": [0.2728, 0.8023, 0.2881, 0.8172]}, {"w": "models.", "b": [0.2958, 0.802, 0.3569, 0.817]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 23", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "23", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 199, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "(a) (b)", "words": [{"w": "(a)", "b": [0.2731, 0.3647, 0.2967, 0.3797]}, {"w": "(b)", "b": [0.7028, 0.3647, 0.7274, 0.3797]}]}, {"id": "b_1", "type": "paragraph", "text": "Figure 6: An illustration of an imbalanced problem. (a) Both classes have the same weight; (b) examples of the minority class have a higher weight.", "words": [{"w": "Figure", "b": [0.1312, 0.396, 0.1833, 0.4109]}, {"w": "6:", "b": [0.1895, 0.396, 0.2038, 0.4109]}, {"w": "An", "b": [0.212, 0.396, 0.2361, 0.4109]}, {"w": "illustration", "b": [0.2423, 0.396, 0.3306, 0.4109]}, {"w": "of", "b": [0.3368, 0.396, 0.3516, 0.4109]}, {"w": "an", "b": [0.3578, 0.396, 0.3773, 0.4109]}, {"w": "imbalanced", "b": [0.3834, 0.396, 0.4741, 0.4109]}, {"w": "problem.", "b": [0.4803, 0.396, 0.5511, 0.4109]}, {"w": "(a)", "b": [0.5593, 0.396, 0.5829, 0.4109]}, {"w": "Both", "b": [0.589, 0.396, 0.6287, 0.4109]}, {"w": "classes", "b": [0.6349, 0.396, 0.6875, 0.4109]}, {"w": "have", "b": [0.6937, 0.396, 0.7301, 0.4109]}, {"w": "the", "b": [0.7362, 0.396, 0.7618, 0.4109]}, {"w": "same", "b": [0.768, 0.396, 0.8081, 0.4109]}, {"w": "weight;", "b": [0.8142, 0.396, 0.8716, 0.4109]}, {"w": "(b)", "b": [0.1291, 0.4139, 0.1537, 0.4289]}, {"w": "examples", "b": [0.1598, 0.4139, 0.2333, 0.4289]}, {"w": "of", "b": [0.2394, 0.4139, 0.2543, 0.4289]}, {"w": "the", "b": [0.2604, 0.4139, 0.2861, 0.4289]}, {"w": "minority", "b": [0.2922, 0.4139, 0.361, 0.4289]}, {"w": "class", "b": [0.3671, 0.4139, 0.4042, 0.4289]}, {"w": "have", "b": [0.4104, 0.4139, 0.4468, 0.4289]}, {"w": "a", "b": [0.453, 0.4139, 0.4622, 0.4289]}, {"w": "higher", "b": [0.4683, 0.4139, 0.5186, 0.4289]}, {"w": "weight.", "b": [0.5248, 0.4139, 0.5822, 0.4289]}]}, {"id": "b_2", "type": "paragraph", "text": "A B", "words": [{"w": "A", "b": [0.2634, 0.701, 0.2755, 0.7157]}, {"w": "B", "b": [0.3356, 0.701, 0.3477, 0.7157]}]}, {"id": "b_3", "type": "paragraph", "text": "Original data Resampled data", "words": [{"w": "Original", "b": [0.2479, 0.4719, 0.307, 0.4858]}, {"w": "data", "b": [0.3117, 0.4719, 0.3451, 0.4858]}, {"w": "Resampled", "b": [0.4552, 0.4719, 0.5419, 0.4858]}, {"w": "data", "b": [0.5467, 0.4719, 0.5801, 0.4858]}]}, {"id": "b_7", "type": "paragraph", "text": "A B", "words": [{"w": "A", "b": [0.6244, 0.701, 0.6365, 0.7157]}, {"w": "B", "b": [0.5613, 0.701, 0.5733, 0.7157]}]}, {"id": "b_8", "type": "paragraph", "text": "A D", "words": [{"w": "A", "b": [0.5252, 0.6132, 0.5372, 0.6279]}, {"w": "D", "b": [0.4615, 0.6132, 0.4745, 0.6279]}]}, {"id": "b_9", "type": "paragraph", "text": "A E", "words": [{"w": "A", "b": [0.6244, 0.5254, 0.6365, 0.5401]}, {"w": "E", "b": [0.5613, 0.5254, 0.5733, 0.5401]}]}, {"id": "b_10", "type": "paragraph", "text": "A C", "words": [{"w": "A", "b": [0.7237, 0.6132, 0.7358, 0.6279]}, {"w": "C", "b": [0.66, 0.6132, 0.6731, 0.6279]}]}, {"id": "b_11", "type": "paragraph", "text": "Figure 7: An ensemble of resampled datasets.", "words": [{"w": "Figure", "b": [0.3156, 0.7655, 0.3677, 0.7805]}, {"w": "7:", "b": [0.3739, 0.7655, 0.3882, 0.7805]}, {"w": "An", "b": [0.3964, 0.7655, 0.4205, 0.7805]}, {"w": "ensemble", "b": [0.4267, 0.7655, 0.4991, 0.7805]}, {"w": "of", "b": [0.5052, 0.7655, 0.5201, 0.7805]}, {"w": "resampled", "b": [0.5263, 0.7655, 0.6074, 0.7805]}, {"w": "datasets.", "b": [0.6136, 0.7655, 0.6845, 0.7805]}]}, {"id": "b_12", "type": "paragraph", "text": "The process for H = 4 is illustrated in Figure 7. Here, we transformed our imbalanced binary learning problem into four balanced problems by chunking the examples of the majority class into four subsets. The examples of the minority class are copied four times in their entirety.", "words": [{"w": "The", "b": [0.1306, 0.8158, 0.1617, 0.8308]}, {"w": "process", "b": [0.1675, 0.8158, 0.2245, 0.8308]}, {"w": "for", "b": [0.2303, 0.8158, 0.2519, 0.8308]}, {"w": "H", "b": [0.2576, 0.8161, 0.2729, 0.831]}, {"w": "=", "b": [0.2796, 0.8158, 0.2936, 0.8308]}, {"w": "4", "b": [0.2987, 0.8158, 0.3078, 0.8308]}, {"w": "is", "b": [0.3135, 0.8158, 0.3257, 0.8308]}, {"w": "illustrated", "b": [0.3314, 0.8158, 0.412, 0.8308]}, {"w": "in", "b": [0.4177, 0.8158, 0.4328, 0.8308]}, {"w": "Figure", "b": [0.4386, 0.8158, 0.4896, 0.8308]}, {"w": "7.", "b": [0.4954, 0.8158, 0.5094, 0.8308]}, {"w": "Here,", "b": [0.5175, 0.8158, 0.5593, 0.8308]}, {"w": "we", "b": [0.5651, 0.8158, 0.5857, 0.8308]}, {"w": "transformed", "b": [0.5914, 0.8158, 0.6866, 0.8308]}, {"w": "our", "b": [0.6923, 0.8158, 0.7185, 0.8308]}, {"w": "imbalanced", "b": [0.7242, 0.8158, 0.8132, 0.8308]}, {"w": "binary", "b": [0.8189, 0.8158, 0.8697, 0.8308]}, {"w": "learning", "b": [0.1312, 0.8337, 0.1946, 0.8487]}, {"w": "problem", "b": [0.2005, 0.8337, 0.2648, 0.8487]}, {"w": "into", "b": [0.2707, 0.8337, 0.3014, 0.8487]}, {"w": "four", "b": [0.3072, 0.8337, 0.339, 0.8487]}, {"w": "balanced", "b": [0.3449, 0.8337, 0.4142, 0.8487]}, {"w": "problems", "b": [0.4201, 0.8337, 0.4916, 0.8487]}, {"w": "by", "b": [0.4975, 0.8337, 0.5166, 0.8487]}, {"w": "chunking", "b": [0.5224, 0.8337, 0.5933, 0.8487]}, {"w": "the", "b": [0.5992, 0.8337, 0.6243, 0.8487]}, {"w": "examples", "b": [0.6302, 0.8337, 0.7021, 0.8487]}, {"w": "of", "b": [0.708, 0.8337, 0.7226, 0.8487]}, {"w": "the", "b": [0.7285, 0.8337, 0.7536, 0.8487]}, {"w": "majority", "b": [0.7595, 0.8337, 0.8269, 0.8487]}, {"w": "class", "b": [0.8327, 0.8337, 0.8691, 0.8487]}, {"w": "into", "b": [0.1312, 0.8517, 0.1624, 0.8666]}, {"w": "four", "b": [0.1686, 0.8517, 0.2009, 0.8666]}, {"w": "subsets.", "b": [0.207, 0.8517, 0.2698, 0.8666]}, {"w": "The", "b": [0.278, 0.8517, 0.3097, 0.8666]}, {"w": "examples", "b": [0.3158, 0.8517, 0.3891, 0.8666]}, {"w": "of", "b": [0.3952, 0.8517, 0.4101, 0.8666]}, {"w": "the", "b": [0.4162, 0.8517, 0.4418, 0.8666]}, {"w": "minority", "b": [0.4479, 0.8517, 0.5166, 0.8666]}, {"w": "class", "b": [0.5227, 0.8517, 0.5598, 0.8666]}, {"w": "are", "b": [0.5659, 0.8517, 0.5905, 0.8666]}, {"w": "copied", "b": [0.5966, 0.8517, 0.6478, 0.8666]}, {"w": "four", "b": [0.654, 0.8517, 0.6863, 0.8666]}, {"w": "times", "b": [0.6924, 0.8517, 0.7355, 0.8666]}, {"w": "in", "b": [0.7416, 0.8517, 0.757, 0.8666]}, {"w": "their", "b": [0.7631, 0.8517, 0.801, 0.8666]}, {"w": "entirety.", "b": [0.8072, 0.8517, 0.8727, 0.8666]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 24", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "24", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 200, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "This approach is simple and scalable: you can train and run your models on different CPU cores or cluster nodes. Ensemble models also tend to produce a better prediction than each individual model in the ensemble.", "words": [{"w": "This", "b": [0.1306, 0.0881, 0.1667, 0.1031]}, {"w": "approach", "b": [0.1729, 0.0881, 0.2465, 0.1031]}, {"w": "is", "b": [0.2527, 0.0881, 0.2652, 0.1031]}, {"w": "simple", "b": [0.2713, 0.0881, 0.3229, 0.1031]}, {"w": "and", "b": [0.3291, 0.0881, 0.3589, 0.1031]}, {"w": "scalable:", "b": [0.3651, 0.0881, 0.4332, 0.1031]}, {"w": "you", "b": [0.4414, 0.0881, 0.4702, 0.1031]}, {"w": "can", "b": [0.4764, 0.0881, 0.5042, 0.1031]}, {"w": "train", "b": [0.5103, 0.0881, 0.5495, 0.1031]}, {"w": "and", "b": [0.5557, 0.0881, 0.5856, 0.1031]}, {"w": "run", "b": [0.5917, 0.0881, 0.6196, 0.1031]}, {"w": "your", "b": [0.6257, 0.0881, 0.6618, 0.1031]}, {"w": "models", "b": [0.668, 0.0881, 0.7242, 0.1031]}, {"w": "on", "b": [0.7303, 0.0881, 0.7499, 0.1031]}, {"w": "different", "b": [0.7561, 0.0881, 0.8231, 0.1031]}, {"w": "CPU", "b": [0.8292, 0.0881, 0.8691, 0.1031]}, {"w": "cores", "b": [0.1312, 0.106, 0.1712, 0.121]}, {"w": "or", "b": [0.1774, 0.106, 0.1938, 0.121]}, {"w": "cluster", "b": [0.1999, 0.106, 0.2532, 0.121]}, {"w": "nodes.", "b": [0.2593, 0.106, 0.31, 0.121]}, {"w": "Ensemble", "b": [0.3182, 0.106, 0.3947, 0.121]}, {"w": "models", "b": [0.4008, 0.106, 0.4566, 0.121]}, {"w": "also", "b": [0.4627, 0.106, 0.4935, 0.121]}, {"w": "tend", "b": [0.4996, 0.106, 0.5354, 0.121]}, {"w": "to", "b": [0.5415, 0.106, 0.5579, 0.121]}, {"w": "produce", "b": [0.564, 0.106, 0.6279, 0.121]}, {"w": "a", "b": [0.6341, 0.106, 0.6432, 0.121]}, {"w": "better", "b": [0.6494, 0.106, 0.698, 0.121]}, {"w": "prediction", "b": [0.7041, 0.106, 0.7849, 0.121]}, {"w": "than", "b": [0.791, 0.106, 0.8278, 0.121]}, {"w": "each", "b": [0.8339, 0.106, 0.8692, 0.121]}, {"w": "individual", "b": [0.1312, 0.124, 0.2117, 0.1389]}, {"w": "model", "b": [0.2179, 0.124, 0.2666, 0.1389]}, {"w": "in", "b": [0.2727, 0.124, 0.2881, 0.1389]}, {"w": "the", "b": [0.2943, 0.124, 0.3199, 0.1389]}, {"w": "ensemble.", "b": [0.3261, 0.124, 0.4036, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "6.4.3 Other Techniques", "words": [{"w": "6.4.3", "b": [0.1312, 0.1721, 0.1749, 0.1871]}, {"w": "Other", "b": [0.1961, 0.1721, 0.2505, 0.1871]}, {"w": "Techniques", "b": [0.2576, 0.1721, 0.3597, 0.1871]}]}, {"id": "b_2", "type": "paragraph", "text": "If you use stochastic gradient descent, the class imbalance can be tackled in several ways. First, you can have different learning rates for different classes: a lower value for the examples of the majority class, and a higher value otherwise. Second, you can make several consecutive updates of the model parameters each time you encounter an example of a minority class.", "words": [{"w": "If", "b": [0.1312, 0.2084, 0.1438, 0.2234]}, {"w": "you", "b": [0.1503, 0.2084, 0.1796, 0.2234]}, {"w": "use", "b": [0.1861, 0.2084, 0.2124, 0.2234]}, {"w": "stochastic", "b": [0.2189, 0.2084, 0.2997, 0.2234]}, {"w": "gradient", "b": [0.3062, 0.2084, 0.3737, 0.2234]}, {"w": "descent,", "b": [0.3802, 0.2084, 0.4458, 0.2234]}, {"w": "the", "b": [0.4524, 0.2084, 0.4785, 0.2234]}, {"w": "class", "b": [0.4851, 0.2084, 0.5229, 0.2234]}, {"w": "imbalance", "b": [0.5294, 0.2084, 0.6116, 0.2234]}, {"w": "can", "b": [0.6181, 0.2084, 0.6463, 0.2234]}, {"w": "be", "b": [0.6529, 0.2084, 0.6722, 0.2234]}, {"w": "tackled", "b": [0.6787, 0.2084, 0.7373, 0.2234]}, {"w": "in", "b": [0.7438, 0.2084, 0.7595, 0.2234]}, {"w": "several", "b": [0.766, 0.2084, 0.8217, 0.2234]}, {"w": "ways.", "b": [0.8282, 0.2084, 0.8728, 0.2234]}, {"w": "First,", "b": [0.1312, 0.2264, 0.1744, 0.2413]}, {"w": "you", "b": [0.1799, 0.2264, 0.208, 0.2413]}, {"w": "can", "b": [0.2134, 0.2264, 0.2405, 0.2413]}, {"w": "have", "b": [0.246, 0.2264, 0.2816, 0.2413]}, {"w": "different", "b": [0.287, 0.2264, 0.3524, 0.2413]}, {"w": "learning", "b": [0.3578, 0.2264, 0.4211, 0.2413]}, {"w": "rates", "b": [0.4265, 0.2264, 0.4649, 0.2413]}, {"w": "for", "b": [0.4703, 0.2264, 0.4919, 0.2413]}, {"w": "different", "b": [0.4973, 0.2264, 0.5627, 0.2413]}, {"w": "classes:", "b": [0.5681, 0.2264, 0.6247, 0.2413]}, {"w": "a", "b": [0.6325, 0.2264, 0.6415, 0.2413]}, {"w": "lower", "b": [0.6469, 0.2264, 0.6881, 0.2413]}, {"w": "value", "b": [0.6935, 0.2264, 0.7342, 0.2413]}, {"w": "for", "b": [0.7396, 0.2264, 0.7613, 0.2413]}, {"w": "the", "b": [0.7667, 0.2264, 0.7918, 0.2413]}, {"w": "examples", "b": [0.7972, 0.2264, 0.8691, 0.2413]}, {"w": "of", "b": [0.1312, 0.2443, 0.1458, 0.2593]}, {"w": "the", "b": [0.1515, 0.2443, 0.1766, 0.2593]}, {"w": "majority", "b": [0.1823, 0.2443, 0.2496, 0.2593]}, {"w": "class,", "b": [0.2553, 0.2443, 0.2967, 0.2593]}, {"w": "and", "b": [0.3025, 0.2443, 0.3317, 0.2593]}, {"w": "a", "b": [0.3373, 0.2443, 0.3464, 0.2593]}, {"w": "higher", "b": [0.352, 0.2443, 0.4013, 0.2593]}, {"w": "value", "b": [0.407, 0.2443, 0.4477, 0.2593]}, {"w": "otherwise.", "b": [0.4534, 0.2443, 0.5329, 0.2593]}, {"w": "Second,", "b": [0.541, 0.2443, 0.6013, 0.2593]}, {"w": "you", "b": [0.607, 0.2443, 0.6352, 0.2593]}, {"w": "can", "b": [0.6408, 0.2443, 0.668, 0.2593]}, {"w": "make", "b": [0.6736, 0.2443, 0.7148, 0.2593]}, {"w": "several", "b": [0.7205, 0.2443, 0.7739, 0.2593]}, {"w": "consecutive", "b": [0.7796, 0.2443, 0.8691, 0.2593]}, {"w": "updates", "b": [0.1312, 0.2623, 0.1944, 0.2772]}, {"w": "of", "b": [0.2006, 0.2623, 0.2154, 0.2772]}, {"w": "the", "b": [0.2216, 0.2623, 0.2472, 0.2772]}, {"w": "model", "b": [0.2534, 0.2623, 0.3021, 0.2772]}, {"w": "parameters", "b": [0.3082, 0.2623, 0.3976, 0.2772]}, {"w": "each", "b": [0.4038, 0.2623, 0.4392, 0.2772]}, {"w": "time", "b": [0.4453, 0.2623, 0.4812, 0.2772]}, {"w": "you", "b": [0.4874, 0.2623, 0.5161, 0.2772]}, {"w": "encounter", "b": [0.5222, 0.2623, 0.6007, 0.2772]}, {"w": "an", "b": [0.6069, 0.2623, 0.6264, 0.2772]}, {"w": "example", "b": [0.6325, 0.2623, 0.6987, 0.2772]}, {"w": "of", "b": [0.7048, 0.2623, 0.7197, 0.2772]}, {"w": "a", "b": [0.7258, 0.2623, 0.7351, 0.2772]}, {"w": "minority", "b": [0.7412, 0.2623, 0.8099, 0.2772]}, {"w": "class.", "b": [0.8161, 0.2623, 0.8584, 0.2772]}]}, {"id": "b_3", "type": "paragraph", "text": "For imbalanced learning problems, the performance of the model is measured using adapted performance metrics such as per-class accuracy and Cohen’s kappa statistic that we considered in Section ?? in the previous chapter.", "words": [{"w": "For", "b": [0.1312, 0.2892, 0.1579, 0.3041]}, {"w": "imbalanced", "b": [0.1641, 0.2892, 0.254, 0.3041]}, {"w": "learning", "b": [0.2602, 0.2892, 0.3242, 0.3041]}, {"w": "problems,", "b": [0.3304, 0.2892, 0.4078, 0.3041]}, {"w": "the", "b": [0.4139, 0.2892, 0.4394, 0.3041]}, {"w": "performance", "b": [0.4455, 0.2892, 0.5442, 0.3041]}, {"w": "of", "b": [0.5503, 0.2892, 0.5651, 0.3041]}, {"w": "the", "b": [0.5712, 0.2892, 0.5967, 0.3041]}, {"w": "model", "b": [0.6028, 0.2892, 0.6511, 0.3041]}, {"w": "is", "b": [0.6572, 0.2892, 0.6695, 0.3041]}, {"w": "measured", "b": [0.6757, 0.2892, 0.751, 0.3041]}, {"w": "using", "b": [0.7572, 0.2892, 0.799, 0.3041]}, {"w": "adapted", "b": [0.8051, 0.2892, 0.8691, 0.3041]}, {"w": "performance", "b": [0.1312, 0.3071, 0.2328, 0.3221]}, {"w": "metrics", "b": [0.2393, 0.3071, 0.2991, 0.3221]}, {"w": "such", "b": [0.3055, 0.3071, 0.3418, 0.3221]}, {"w": "as", "b": [0.3482, 0.3071, 0.3651, 0.3221]}, {"w": "per-class", "b": [0.3714, 0.3074, 0.4517, 0.3224]}, {"w": "accuracy", "b": [0.4592, 0.3074, 0.5398, 0.3224]}, {"w": "and", "b": [0.5463, 0.3071, 0.5766, 0.3221]}, {"w": "Cohen’s", "b": [0.5831, 0.3074, 0.6566, 0.3224]}, {"w": "kappa", "b": [0.664, 0.3074, 0.7194, 0.3224]}, {"w": "statistic", "b": [0.7269, 0.3074, 0.7999, 0.3224]}, {"w": "that", "b": [0.8063, 0.3071, 0.8409, 0.3221]}, {"w": "we", "b": [0.8473, 0.3071, 0.8688, 0.3221]}, {"w": "considered", "b": [0.1312, 0.3251, 0.2155, 0.34]}, {"w": "in", "b": [0.2217, 0.3251, 0.237, 0.34]}, {"w": "Section", "b": [0.2432, 0.3251, 0.3016, 0.34]}, {"w": "??", "b": [0.3077, 0.3254, 0.3277, 0.3403]}, {"w": "in", "b": [0.3339, 0.3251, 0.3493, 0.34]}, {"w": "the", "b": [0.3554, 0.3251, 0.381, 0.34]}, {"w": "previous", "b": [0.3872, 0.3251, 0.4545, 0.34]}, {"w": "chapter.", "b": [0.4607, 0.3251, 0.5259, 0.34]}]}, {"id": "b_4", "type": "paragraph", "text": "6.5 Model Calibration", "words": [{"w": "6.5", "b": [0.1312, 0.3739, 0.1631, 0.3918]}, {"w": "Model", "b": [0.188, 0.3739, 0.2569, 0.3918]}, {"w": "Calibration", "b": [0.2652, 0.3739, 0.3882, 0.3918]}]}, {"id": "b_5", "type": "paragraph", "text": "Sometimes it is important that the classification model returns not just the predicted class, but also the probability that the predicted class is correct. Some models return a score along with the predicted class. Even if its value ranges between 0 and 1, it’s not always a probability.", "words": [{"w": "Sometimes", "b": [0.1312, 0.4125, 0.2176, 0.4274]}, {"w": "it", "b": [0.2238, 0.4125, 0.2361, 0.4274]}, {"w": "is", "b": [0.2422, 0.4125, 0.2547, 0.4274]}, {"w": "important", "b": [0.2608, 0.4125, 0.342, 0.4274]}, {"w": "that", "b": [0.3481, 0.4125, 0.3821, 0.4274]}, {"w": "the", "b": [0.3882, 0.4125, 0.4139, 0.4274]}, {"w": "classification", "b": [0.42, 0.4125, 0.522, 0.4274]}, {"w": "model", "b": [0.5281, 0.4125, 0.5769, 0.4274]}, {"w": "returns", "b": [0.583, 0.4125, 0.6408, 0.4274]}, {"w": "not", "b": [0.6469, 0.4125, 0.6736, 0.4274]}, {"w": "just", "b": [0.6798, 0.4125, 0.7102, 0.4274]}, {"w": "the", "b": [0.7163, 0.4125, 0.742, 0.4274]}, {"w": "predicted", "b": [0.7481, 0.4125, 0.8232, 0.4274]}, {"w": "class,", "b": [0.8294, 0.4125, 0.8717, 0.4274]}, {"w": "but", "b": [0.1312, 0.4304, 0.1595, 0.4454]}, {"w": "also", "b": [0.167, 0.4304, 0.1985, 0.4454]}, {"w": "the", "b": [0.206, 0.4304, 0.2321, 0.4454]}, {"w": "probability", "b": [0.2396, 0.4304, 0.3296, 0.4454]}, {"w": "that", "b": [0.3371, 0.4304, 0.3717, 0.4454]}, {"w": "the", "b": [0.3792, 0.4304, 0.4053, 0.4454]}, {"w": "predicted", "b": [0.4128, 0.4304, 0.4893, 0.4454]}, {"w": "class", "b": [0.4967, 0.4304, 0.5346, 0.4454]}, {"w": "is", "b": [0.5421, 0.4304, 0.5548, 0.4454]}, {"w": "correct.", "b": [0.5623, 0.4304, 0.6241, 0.4454]}, {"w": "Some", "b": [0.6364, 0.4304, 0.6803, 0.4454]}, {"w": "models", "b": [0.6878, 0.4304, 0.7449, 0.4454]}, {"w": "return", "b": [0.7524, 0.4304, 0.8038, 0.4454]}, {"w": "a", "b": [0.8113, 0.4304, 0.8207, 0.4454]}, {"w": "score", "b": [0.8282, 0.4304, 0.8692, 0.4454]}, {"w": "along", "b": [0.1312, 0.4484, 0.1752, 0.4633]}, {"w": "with", "b": [0.1814, 0.4484, 0.218, 0.4633]}, {"w": "the", "b": [0.2242, 0.4484, 0.2504, 0.4633]}, {"w": "predicted", "b": [0.2566, 0.4484, 0.333, 0.4633]}, {"w": "class.", "b": [0.3393, 0.4484, 0.3824, 0.4633]}, {"w": "Even", "b": [0.3908, 0.4484, 0.4319, 0.4633]}, {"w": "if", "b": [0.4381, 0.4484, 0.4491, 0.4633]}, {"w": "its", "b": [0.4553, 0.4484, 0.4753, 0.4633]}, {"w": "value", "b": [0.4816, 0.4484, 0.524, 0.4633]}, {"w": "ranges", "b": [0.5302, 0.4484, 0.5826, 0.4633]}, {"w": "between", "b": [0.5889, 0.4484, 0.6553, 0.4633]}, {"w": "0", "b": [0.6612, 0.4484, 0.6707, 0.4633]}, {"w": "and", "b": [0.6769, 0.4484, 0.7072, 0.4633]}, {"w": "1,", "b": [0.7134, 0.4484, 0.7281, 0.4633]}, {"w": "it’s", "b": [0.7343, 0.4484, 0.7595, 0.4633]}, {"w": "not", "b": [0.7658, 0.4484, 0.793, 0.4633]}, {"w": "always", "b": [0.7992, 0.4484, 0.8532, 0.4633]}, {"w": "a", "b": [0.8594, 0.4484, 0.8688, 0.4633]}, {"w": "probability.", "b": [0.1312, 0.4663, 0.2231, 0.4813]}]}, {"id": "b_6", "type": "equation", "text": "6.5.1 Well-Calibrated Models", "words": [{"w": "6.5.1", "b": [0.1312, 0.5145, 0.1749, 0.5294]}, {"w": "Well-Calibrated", "b": [0.1961, 0.5145, 0.3429, 0.5294]}, {"w": "Models", "b": [0.35, 0.5145, 0.4171, 0.5294]}]}, {"id": "b_7", "type": "paragraph", "text": "We say that the model is well-calibrated when, for input example x and predicted label ˆy,", "words": [{"w": "We", "b": [0.1303, 0.5508, 0.1556, 0.5657]}, {"w": "say", "b": [0.1618, 0.5508, 0.1872, 0.5657]}, {"w": "that", "b": [0.1933, 0.5508, 0.2267, 0.5657]}, {"w": "the", "b": [0.2329, 0.5508, 0.2582, 0.5657]}, {"w": "model", "b": [0.2644, 0.5508, 0.3125, 0.5657]}, {"w": "is", "b": [0.3186, 0.5508, 0.3309, 0.5657]}, {"w": "well-calibrated", "b": [0.337, 0.5511, 0.4724, 0.566]}, {"w": "when,", "b": [0.4785, 0.5508, 0.5251, 0.5657]}, {"w": "for", "b": [0.5313, 0.5508, 0.5531, 0.5657]}, {"w": "input", "b": [0.5593, 0.5508, 0.6018, 0.5657]}, {"w": "example", "b": [0.608, 0.5508, 0.6733, 0.5657]}, {"w": "x", "b": [0.6794, 0.5511, 0.6906, 0.566]}, {"w": "and", "b": [0.6968, 0.5508, 0.7262, 0.5657]}, {"w": "predicted", "b": [0.7323, 0.5508, 0.8064, 0.5657]}, {"w": "label", "b": [0.8125, 0.5508, 0.8505, 0.5657]}, {"w": "ˆy,", "b": [0.8566, 0.5508, 0.8713, 0.566]}]}, {"id": "b_8", "type": "paragraph", "text": "it returns the score that can be interpreted as the true probability for x to belong to class ˆy.", "words": [{"w": "it", "b": [0.1312, 0.5687, 0.1434, 0.5837]}, {"w": "returns", "b": [0.1495, 0.5687, 0.2064, 0.5837]}, {"w": "the", "b": [0.2125, 0.5687, 0.2378, 0.5837]}, {"w": "score", "b": [0.2439, 0.5687, 0.2835, 0.5837]}, {"w": "that", "b": [0.2897, 0.5687, 0.3231, 0.5837]}, {"w": "can", "b": [0.3292, 0.5687, 0.3565, 0.5837]}, {"w": "be", "b": [0.3627, 0.5687, 0.3814, 0.5837]}, {"w": "interpreted", "b": [0.3875, 0.5687, 0.4751, 0.5837]}, {"w": "as", "b": [0.4812, 0.5687, 0.4975, 0.5837]}, {"w": "the", "b": [0.5037, 0.5687, 0.529, 0.5837]}, {"w": "true", "b": [0.5351, 0.5687, 0.5675, 0.5837]}, {"w": "probability", "b": [0.5737, 0.5687, 0.6607, 0.5837]}, {"w": "for", "b": [0.6668, 0.5687, 0.6886, 0.5837]}, {"w": "x", "b": [0.6944, 0.569, 0.7056, 0.584]}, {"w": "to", "b": [0.7119, 0.5687, 0.7281, 0.5837]}, {"w": "belong", "b": [0.7342, 0.5687, 0.7863, 0.5837]}, {"w": "to", "b": [0.7925, 0.5687, 0.8086, 0.5837]}, {"w": "class", "b": [0.8148, 0.5687, 0.8514, 0.5837]}, {"w": "ˆy.", "b": [0.8575, 0.5687, 0.8722, 0.5839]}]}, {"id": "b_9", "type": "paragraph", "text": "For instance, a well-calibrated binary classifier would generate a score of 0.8 for approximately 80% of the examples actually belonging to the positive class.", "words": [{"w": "For", "b": [0.1312, 0.5956, 0.1576, 0.6106]}, {"w": "instance,", "b": [0.1628, 0.5956, 0.2322, 0.6106]}, {"w": "a", "b": [0.2376, 0.5956, 0.2466, 0.6106]}, {"w": "well-calibrated", "b": [0.2518, 0.5956, 0.3669, 0.6106]}, {"w": "binary", "b": [0.372, 0.5956, 0.4228, 0.6106]}, {"w": "classifier", "b": [0.428, 0.5956, 0.4946, 0.6106]}, {"w": "would", "b": [0.4997, 0.5956, 0.5464, 0.6106]}, {"w": "generate", "b": [0.5516, 0.5956, 0.618, 0.6106]}, {"w": "a", "b": [0.6231, 0.5956, 0.6322, 0.6106]}, {"w": "score", "b": [0.6373, 0.5956, 0.6767, 0.6106]}, {"w": "of", "b": [0.6818, 0.5956, 0.6964, 0.6106]}, {"w": "0.8", "b": [0.7013, 0.5956, 0.7245, 0.6109]}, {"w": "for", "b": [0.7296, 0.5956, 0.7513, 0.6106]}, {"w": "approximately", "b": [0.7564, 0.5956, 0.8695, 0.6106]}, {"w": "80%", "b": [0.1312, 0.6136, 0.1651, 0.6285]}, {"w": "of", "b": [0.1712, 0.6136, 0.1861, 0.6285]}, {"w": "the", "b": [0.1922, 0.6136, 0.2179, 0.6285]}, {"w": "examples", "b": [0.224, 0.6136, 0.2974, 0.6285]}, {"w": "actually", "b": [0.3036, 0.6136, 0.3677, 0.6285]}, {"w": "belonging", "b": [0.3738, 0.6136, 0.4512, 0.6285]}, {"w": "to", "b": [0.4574, 0.6136, 0.4738, 0.6285]}, {"w": "the", "b": [0.48, 0.6136, 0.5056, 0.6285]}, {"w": "positive", "b": [0.5117, 0.6136, 0.5739, 0.6285]}, {"w": "class.", "b": [0.5801, 0.6136, 0.6223, 0.6285]}]}, {"id": "b_10", "type": "paragraph", "text": "Most machine learning algorithms train models that are not well-calibrated, as shown4 by the calibration plots in Figure 8.", "words": [{"w": "Most", "b": [0.1312, 0.6405, 0.1725, 0.6554]}, {"w": "machine", "b": [0.1787, 0.6405, 0.246, 0.6554]}, {"w": "learning", "b": [0.2521, 0.6405, 0.3179, 0.6554]}, {"w": "algorithms", "b": [0.3241, 0.6405, 0.4108, 0.6554]}, {"w": "train", "b": [0.4169, 0.6405, 0.4566, 0.6554]}, {"w": "models", "b": [0.4628, 0.6405, 0.5197, 0.6554]}, {"w": "that", "b": [0.5259, 0.6405, 0.5603, 0.6554]}, {"w": "are", "b": [0.5664, 0.6405, 0.5915, 0.6554]}, {"w": "not", "b": [0.5977, 0.6405, 0.6248, 0.6554]}, {"w": "well-calibrated,", "b": [0.631, 0.6405, 0.7557, 0.6554]}, {"w": "as", "b": [0.7618, 0.6405, 0.7786, 0.6554]}, {"w": "shown4", "b": [0.7848, 0.6389, 0.8425, 0.6554]}, {"w": "by", "b": [0.8496, 0.6405, 0.8695, 0.6554]}, {"w": "the", "b": [0.1312, 0.6584, 0.1569, 0.6734]}, {"w": "calibration", "b": [0.163, 0.6587, 0.262, 0.6737]}, {"w": "plots", "b": [0.269, 0.6587, 0.3139, 0.6737]}, {"w": "in", "b": [0.32, 0.6584, 0.3354, 0.6734]}, {"w": "Figure", "b": [0.3416, 0.6584, 0.3937, 0.6734]}, {"w": "8.", "b": [0.3998, 0.6584, 0.4142, 0.6734]}]}, {"id": "b_11", "type": "paragraph", "text": "A calibration plot for a binary model allows seeing how well the model is calibrated. On the X-axis, there are bins that group examples by the predicted score. For example, if we have 10 bins, the left-most bin groups all examples for which the predicted score is in the range [0, 0.1) while the right-most bin groups all examples for which the predicted score is in the range [0.9, 1.0]. On the Y-axis, there are the fractions of positive examples in each bin.", "words": [{"w": "A", "b": [0.1305, 0.6854, 0.1442, 0.7003]}, {"w": "calibration", "b": [0.1503, 0.6854, 0.2354, 0.7003]}, {"w": "plot", "b": [0.2416, 0.6854, 0.2729, 0.7003]}, {"w": "for", "b": [0.2791, 0.6854, 0.3009, 0.7003]}, {"w": "a", "b": [0.307, 0.6854, 0.3161, 0.7003]}, {"w": "binary", "b": [0.3223, 0.6854, 0.3734, 0.7003]}, {"w": "model", "b": [0.3796, 0.6854, 0.4277, 0.7003]}, {"w": "allows", "b": [0.4338, 0.6854, 0.482, 0.7003]}, {"w": "seeing", "b": [0.4881, 0.6854, 0.5358, 0.7003]}, {"w": "how", "b": [0.542, 0.6854, 0.5738, 0.7003]}, {"w": "well", "b": [0.58, 0.6854, 0.6108, 0.7003]}, {"w": "the", "b": [0.617, 0.6854, 0.6423, 0.7003]}, {"w": "model", "b": [0.6484, 0.6854, 0.6965, 0.7003]}, {"w": "is", "b": [0.7027, 0.6854, 0.7149, 0.7003]}, {"w": "calibrated.", "b": [0.721, 0.6854, 0.8051, 0.7003]}, {"w": "On", "b": [0.8133, 0.6854, 0.8376, 0.7003]}, {"w": "the", "b": [0.8438, 0.6854, 0.8691, 0.7003]}, {"w": "X-axis,", "b": [0.1305, 0.7033, 0.1874, 0.7183]}, {"w": "there", "b": [0.1935, 0.7033, 0.2348, 0.7183]}, {"w": "are", "b": [0.241, 0.7033, 0.2658, 0.7183]}, {"w": "bins", "b": [0.272, 0.7033, 0.3051, 0.7183]}, {"w": "that", "b": [0.3112, 0.7033, 0.3453, 0.7183]}, {"w": "group", "b": [0.3514, 0.7033, 0.3979, 0.7183]}, {"w": "examples", "b": [0.4041, 0.7033, 0.4779, 0.7183]}, {"w": "by", "b": [0.4841, 0.7033, 0.5037, 0.7183]}, {"w": "the", "b": [0.5098, 0.7033, 0.5356, 0.7183]}, {"w": "predicted", "b": [0.5418, 0.7033, 0.6172, 0.7183]}, {"w": "score.", "b": [0.6233, 0.7033, 0.6689, 0.7183]}, {"w": "For", "b": [0.6771, 0.7033, 0.7042, 0.7183]}, {"w": "example,", "b": [0.7104, 0.7033, 0.7821, 0.7183]}, {"w": "if", "b": [0.7882, 0.7033, 0.799, 0.7183]}, {"w": "we", "b": [0.8052, 0.7033, 0.8263, 0.7183]}, {"w": "have", "b": [0.8325, 0.7033, 0.8691, 0.7183]}, {"w": "10", "b": [0.1303, 0.7213, 0.149, 0.7362]}, {"w": "bins,", "b": [0.1551, 0.7213, 0.1937, 0.7362]}, {"w": "the", "b": [0.1998, 0.7213, 0.2258, 0.7362]}, {"w": "left-most", "b": [0.2319, 0.7213, 0.3042, 0.7362]}, {"w": "bin", "b": [0.3103, 0.7213, 0.3363, 0.7362]}, {"w": "groups", "b": [0.3424, 0.7213, 0.3966, 0.7362]}, {"w": "all", "b": [0.4027, 0.7213, 0.4224, 0.7362]}, {"w": "examples", "b": [0.4286, 0.7213, 0.5029, 0.7362]}, {"w": "for", "b": [0.5091, 0.7213, 0.5314, 0.7362]}, {"w": "which", "b": [0.5376, 0.7213, 0.5848, 0.7362]}, {"w": "the", "b": [0.591, 0.7213, 0.6169, 0.7362]}, {"w": "predicted", "b": [0.6231, 0.7213, 0.6989, 0.7362]}, {"w": "score", "b": [0.7051, 0.7213, 0.7457, 0.7362]}, {"w": "is", "b": [0.7519, 0.7213, 0.7645, 0.7362]}, {"w": "in", "b": [0.7706, 0.7213, 0.7862, 0.7362]}, {"w": "the", "b": [0.7924, 0.7213, 0.8183, 0.7362]}, {"w": "range", "b": [0.8245, 0.7213, 0.8691, 0.7362]}, {"w": "[0,", "b": [0.1312, 0.7392, 0.1509, 0.7544]}, {"w": "0.1)", "b": [0.154, 0.7392, 0.185, 0.7544]}, {"w": "while", "b": [0.1911, 0.7392, 0.2336, 0.7542]}, {"w": "the", "b": [0.2397, 0.7392, 0.2656, 0.7542]}, {"w": "right-most", "b": [0.2718, 0.7392, 0.3562, 0.7542]}, {"w": "bin", "b": [0.3624, 0.7392, 0.3883, 0.7542]}, {"w": "groups", "b": [0.3944, 0.7392, 0.4484, 0.7542]}, {"w": "all", "b": [0.4546, 0.7392, 0.4742, 0.7542]}, {"w": "examples", "b": [0.4804, 0.7392, 0.5545, 0.7542]}, {"w": "for", "b": [0.5606, 0.7392, 0.5829, 0.7542]}, {"w": "which", "b": [0.5891, 0.7392, 0.6362, 0.7542]}, {"w": "the", "b": [0.6424, 0.7392, 0.6682, 0.7542]}, {"w": "predicted", "b": [0.6744, 0.7392, 0.75, 0.7542]}, {"w": "score", "b": [0.7562, 0.7392, 0.7967, 0.7542]}, {"w": "is", "b": [0.8028, 0.7392, 0.8154, 0.7542]}, {"w": "in", "b": [0.8216, 0.7392, 0.8371, 0.7542]}, {"w": "the", "b": [0.8432, 0.7392, 0.8691, 0.7542]}, {"w": "range", "b": [0.1312, 0.7571, 0.1754, 0.7721]}, {"w": "[0.9,", "b": [0.1815, 0.7571, 0.2154, 0.7724]}, {"w": "1.0].", "b": [0.2185, 0.7571, 0.2523, 0.7724]}, {"w": "On", "b": [0.2605, 0.7571, 0.2851, 0.7721]}, {"w": "the", "b": [0.2913, 0.7571, 0.3169, 0.7721]}, {"w": "Y-axis,", "b": [0.3231, 0.7571, 0.3796, 0.7721]}, {"w": "there", "b": [0.3857, 0.7571, 0.4268, 0.7721]}, {"w": "are", "b": [0.4329, 0.7571, 0.4576, 0.7721]}, {"w": "the", "b": [0.4638, 0.7571, 0.4894, 0.7721]}, {"w": "fractions", "b": [0.4956, 0.7571, 0.5649, 0.7721]}, {"w": "of", "b": [0.5711, 0.7571, 0.586, 0.7721]}, {"w": "positive", "b": [0.5921, 0.7571, 0.6543, 0.7721]}, {"w": "examples", "b": [0.6604, 0.7571, 0.7338, 0.7721]}, {"w": "in", "b": [0.74, 0.7571, 0.7554, 0.7721]}, {"w": "each", "b": [0.7615, 0.7571, 0.7969, 0.7721]}, {"w": "bin.", "b": [0.8031, 0.7571, 0.8338, 0.7721]}]}, {"id": "b_12", "type": "paragraph", "text": "4The graph is adapted from https://scikit-learn.org/stable/modules/calibration.html.", "words": [{"w": "4The", "b": [0.1518, 0.785, 0.1865, 0.7989]}, {"w": "graph", "b": [0.1917, 0.7869, 0.2309, 0.7989]}, {"w": "is", "b": [0.2361, 0.7869, 0.2466, 0.7989]}, {"w": "adapted", "b": [0.2519, 0.7869, 0.3067, 0.7989]}, {"w": "from", "b": [0.312, 0.7869, 0.3438, 0.7989]}, {"w": "https://scikit-learn.org/stable/modules/calibration.html.", "b": [0.349, 0.7869, 0.7395, 0.7989]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 25", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "25", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 201, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 8: Calibration plots for models trained by several machine learning algorithms applied to a random binary dataset.", "words": [{"w": "Figure", "b": [0.1312, 0.4816, 0.1823, 0.4965]}, {"w": "8:", "b": [0.188, 0.4816, 0.2021, 0.4965]}, {"w": "Calibration", "b": [0.21, 0.4816, 0.2995, 0.4965]}, {"w": "plots", "b": [0.3052, 0.4816, 0.3435, 0.4965]}, {"w": "for", "b": [0.3492, 0.4816, 0.3708, 0.4965]}, {"w": "models", "b": [0.3765, 0.4816, 0.4314, 0.4965]}, {"w": "trained", "b": [0.4371, 0.4816, 0.4934, 0.4965]}, {"w": "by", "b": [0.4991, 0.4816, 0.5182, 0.4965]}, {"w": "several", "b": [0.5239, 0.4816, 0.5773, 0.4965]}, {"w": "machine", "b": [0.583, 0.4816, 0.6478, 0.4965]}, {"w": "learning", "b": [0.6535, 0.4816, 0.7169, 0.4965]}, {"w": "algorithms", "b": [0.7226, 0.4816, 0.8061, 0.4965]}, {"w": "applied", "b": [0.8118, 0.4816, 0.8691, 0.4965]}, {"w": "to", "b": [0.1312, 0.4995, 0.1476, 0.5145]}, {"w": "a", "b": [0.1538, 0.4995, 0.163, 0.5145]}, {"w": "random", "b": [0.1692, 0.4995, 0.2307, 0.5145]}, {"w": "binary", "b": [0.2369, 0.4995, 0.2887, 0.5145]}, {"w": "dataset.", "b": [0.2949, 0.4995, 0.3585, 0.5145]}]}, {"id": "b_1", "type": "paragraph", "text": "For multiclass classification, we would have one calibration plot per class in a one-versus- rest way. One-versus-rest is common strategy for converting a binary classification learning algorithm for solving multiclass classification problems. The idea is to transform a multiclass problem into C binary classification problems and build C binary classifiers. For example, if we have three classes, y ∈{1, 2, 3}, we create three original dataset copies, and modify them. In the first copy, we replace all labels not equal to 1 with a 0. In the second copy, we replace all labels not equal to 2 with a 0. In the third copy, we replace all labels not equal to 3 with a 0. Now we have three binary classification problems where we want to learn to distinguish between labels 1 and 0, 2 and 0, and 3 and 0. As you can see, in each of the three binary classification problems, the label 0 denotes the “rest” in “one-versus-rest.”", "words": [{"w": "For", "b": [0.1312, 0.5498, 0.1583, 0.5647]}, {"w": "multiclass", "b": [0.1644, 0.5498, 0.2444, 0.5647]}, {"w": "classification,", "b": [0.2505, 0.5498, 0.3577, 0.5647]}, {"w": "we", "b": [0.3638, 0.5498, 0.3849, 0.5647]}, {"w": "would", "b": [0.3911, 0.5498, 0.4389, 0.5647]}, {"w": "have", "b": [0.445, 0.5498, 0.4815, 0.5647]}, {"w": "one", "b": [0.4877, 0.5498, 0.5154, 0.5647]}, {"w": "calibration", "b": [0.5216, 0.5498, 0.608, 0.5647]}, {"w": "plot", "b": [0.6142, 0.5498, 0.6461, 0.5647]}, {"w": "per", "b": [0.6522, 0.5498, 0.6785, 0.5647]}, {"w": "class", "b": [0.6847, 0.5498, 0.7219, 0.5647]}, {"w": "in", "b": [0.728, 0.5498, 0.7435, 0.5647]}, {"w": "a", "b": [0.7496, 0.5498, 0.7589, 0.5647]}, {"w": "one-versus-", "b": [0.7649, 0.5501, 0.8688, 0.565]}, {"w": "rest", "b": [0.1312, 0.568, 0.1663, 0.583]}, {"w": "way.", "b": [0.1725, 0.5677, 0.207, 0.5827]}, {"w": "One-versus-rest", "b": [0.2153, 0.5677, 0.3388, 0.5827]}, {"w": "is", "b": [0.345, 0.5677, 0.3573, 0.5827]}, {"w": "common", "b": [0.3635, 0.5677, 0.4306, 0.5827]}, {"w": "strategy", "b": [0.4368, 0.5677, 0.5015, 0.5827]}, {"w": "for", "b": [0.5077, 0.5677, 0.5296, 0.5827]}, {"w": "converting", "b": [0.5358, 0.5677, 0.6187, 0.5827]}, {"w": "a", "b": [0.6249, 0.5677, 0.6341, 0.5827]}, {"w": "binary", "b": [0.6402, 0.5677, 0.6917, 0.5827]}, {"w": "classification", "b": [0.6978, 0.5677, 0.7988, 0.5827]}, {"w": "learning", "b": [0.8049, 0.5677, 0.8691, 0.5827]}, {"w": "algorithm", "b": [0.1312, 0.5856, 0.2076, 0.6006]}, {"w": "for", "b": [0.2137, 0.5856, 0.2354, 0.6006]}, {"w": "solving", "b": [0.2414, 0.5856, 0.2963, 0.6006]}, {"w": "multiclass", "b": [0.3024, 0.5856, 0.3804, 0.6006]}, {"w": "classification", "b": [0.3865, 0.5856, 0.4862, 0.6006]}, {"w": "problems.", "b": [0.4923, 0.5856, 0.5688, 0.6006]}, {"w": "The", "b": [0.577, 0.5856, 0.6081, 0.6006]}, {"w": "idea", "b": [0.6142, 0.5856, 0.6463, 0.6006]}, {"w": "is", "b": [0.6524, 0.5856, 0.6646, 0.6006]}, {"w": "to", "b": [0.6706, 0.5856, 0.6867, 0.6006]}, {"w": "transform", "b": [0.6928, 0.5856, 0.7698, 0.6006]}, {"w": "a", "b": [0.7759, 0.5856, 0.7849, 0.6006]}, {"w": "multiclass", "b": [0.791, 0.5856, 0.8691, 0.6006]}, {"w": "problem", "b": [0.1312, 0.6036, 0.196, 0.6185]}, {"w": "into", "b": [0.2022, 0.6036, 0.233, 0.6185]}, {"w": "C", "b": [0.2391, 0.6039, 0.2523, 0.6188]}, {"w": "binary", "b": [0.2598, 0.6036, 0.3109, 0.6185]}, {"w": "classification", "b": [0.3171, 0.6036, 0.4174, 0.6185]}, {"w": "problems", "b": [0.4236, 0.6036, 0.4955, 0.6185]}, {"w": "and", "b": [0.5017, 0.6036, 0.531, 0.6185]}, {"w": "build", "b": [0.5372, 0.6036, 0.5776, 0.6185]}, {"w": "C", "b": [0.5836, 0.6039, 0.5968, 0.6188]}, {"w": "binary", "b": [0.6043, 0.6036, 0.6554, 0.6185]}, {"w": "classifiers.", "b": [0.6616, 0.6036, 0.7408, 0.6185]}, {"w": "For", "b": [0.7491, 0.6036, 0.7757, 0.6185]}, {"w": "example,", "b": [0.7819, 0.6036, 0.8521, 0.6185]}, {"w": "if", "b": [0.8583, 0.6036, 0.8689, 0.6185]}, {"w": "we", "b": [0.1306, 0.6215, 0.1513, 0.6365]}, {"w": "have", "b": [0.1574, 0.6215, 0.1933, 0.6365]}, {"w": "three", "b": [0.1994, 0.6215, 0.24, 0.6365]}, {"w": "classes,", "b": [0.2461, 0.6215, 0.303, 0.6365]}, {"w": "y", "b": [0.3091, 0.6218, 0.3181, 0.6368]}, {"w": "∈{1,", "b": [0.3239, 0.6215, 0.3648, 0.6368]}, {"w": "2,", "b": [0.3678, 0.6215, 0.3821, 0.6368]}, {"w": "3},", "b": [0.3851, 0.6215, 0.4085, 0.6366]}, {"w": "we", "b": [0.4146, 0.6215, 0.4354, 0.6365]}, {"w": "create", "b": [0.4415, 0.6215, 0.4891, 0.6365]}, {"w": "three", "b": [0.4952, 0.6215, 0.5357, 0.6365]}, {"w": "original", "b": [0.5418, 0.6215, 0.6015, 0.6365]}, {"w": "dataset", "b": [0.6077, 0.6215, 0.6654, 0.6365]}, {"w": "copies,", "b": [0.6715, 0.6215, 0.7242, 0.6365]}, {"w": "and", "b": [0.7304, 0.6215, 0.7597, 0.6365]}, {"w": "modify", "b": [0.7658, 0.6215, 0.8209, 0.6365]}, {"w": "them.", "b": [0.8271, 0.6215, 0.8726, 0.6365]}, {"w": "In", "b": [0.1312, 0.6395, 0.1478, 0.6544]}, {"w": "the", "b": [0.1539, 0.6395, 0.1791, 0.6544]}, {"w": "first", "b": [0.1852, 0.6395, 0.2165, 0.6544]}, {"w": "copy,", "b": [0.2226, 0.6395, 0.2623, 0.6544]}, {"w": "we", "b": [0.2684, 0.6395, 0.289, 0.6544]}, {"w": "replace", "b": [0.2951, 0.6395, 0.3504, 0.6544]}, {"w": "all", "b": [0.3565, 0.6395, 0.3756, 0.6544]}, {"w": "labels", "b": [0.3818, 0.6395, 0.4266, 0.6544]}, {"w": "not", "b": [0.4327, 0.6395, 0.4588, 0.6544]}, {"w": "equal", "b": [0.465, 0.6395, 0.5067, 0.6544]}, {"w": "to", "b": [0.5128, 0.6395, 0.5289, 0.6544]}, {"w": "1", "b": [0.5348, 0.6395, 0.5438, 0.6544]}, {"w": "with", "b": [0.55, 0.6395, 0.5851, 0.6544]}, {"w": "a", "b": [0.5912, 0.6395, 0.6003, 0.6544]}, {"w": "0.", "b": [0.6064, 0.6395, 0.6205, 0.6544]}, {"w": "In", "b": [0.6286, 0.6395, 0.6452, 0.6544]}, {"w": "the", "b": [0.6513, 0.6395, 0.6765, 0.6544]}, {"w": "second", "b": [0.6826, 0.6395, 0.735, 0.6544]}, {"w": "copy,", "b": [0.7411, 0.6395, 0.7807, 0.6544]}, {"w": "we", "b": [0.7869, 0.6395, 0.8075, 0.6544]}, {"w": "replace", "b": [0.8136, 0.6395, 0.8689, 0.6544]}, {"w": "all", "b": [0.1312, 0.6574, 0.1504, 0.6724]}, {"w": "labels", "b": [0.1566, 0.6574, 0.2016, 0.6724]}, {"w": "not", "b": [0.2078, 0.6574, 0.234, 0.6724]}, {"w": "equal", "b": [0.2402, 0.6574, 0.2821, 0.6724]}, {"w": "to", "b": [0.2882, 0.6574, 0.3044, 0.6724]}, {"w": "2", "b": [0.3105, 0.6574, 0.3195, 0.6724]}, {"w": "with", "b": [0.3257, 0.6574, 0.361, 0.6724]}, {"w": "a", "b": [0.3672, 0.6574, 0.3763, 0.6724]}, {"w": "0.", "b": [0.3824, 0.6574, 0.3965, 0.6724]}, {"w": "In", "b": [0.4047, 0.6574, 0.4214, 0.6724]}, {"w": "the", "b": [0.4275, 0.6574, 0.4528, 0.6724]}, {"w": "third", "b": [0.4589, 0.6574, 0.4984, 0.6724]}, {"w": "copy,", "b": [0.5045, 0.6574, 0.5444, 0.6724]}, {"w": "we", "b": [0.5505, 0.6574, 0.5712, 0.6724]}, {"w": "replace", "b": [0.5774, 0.6574, 0.633, 0.6724]}, {"w": "all", "b": [0.6391, 0.6574, 0.6583, 0.6724]}, {"w": "labels", "b": [0.6644, 0.6574, 0.7095, 0.6724]}, {"w": "not", "b": [0.7156, 0.6574, 0.7419, 0.6724]}, {"w": "equal", "b": [0.748, 0.6574, 0.79, 0.6724]}, {"w": "to", "b": [0.7961, 0.6574, 0.8123, 0.6724]}, {"w": "3", "b": [0.8182, 0.6574, 0.8273, 0.6724]}, {"w": "with", "b": [0.8334, 0.6574, 0.8688, 0.6724]}, {"w": "a", "b": [0.1312, 0.6754, 0.1403, 0.6903]}, {"w": "0.", "b": [0.1465, 0.6754, 0.1607, 0.6903]}, {"w": "Now", "b": [0.1689, 0.6754, 0.2043, 0.6903]}, {"w": "we", "b": [0.2104, 0.6754, 0.2312, 0.6903]}, {"w": "have", "b": [0.2373, 0.6754, 0.2733, 0.6903]}, {"w": "three", "b": [0.2794, 0.6754, 0.32, 0.6903]}, {"w": "binary", "b": [0.3261, 0.6754, 0.3773, 0.6903]}, {"w": "classification", "b": [0.3834, 0.6754, 0.4839, 0.6903]}, {"w": "problems", "b": [0.49, 0.6754, 0.562, 0.6903]}, {"w": "where", "b": [0.5682, 0.6754, 0.6148, 0.6903]}, {"w": "we", "b": [0.621, 0.6754, 0.6417, 0.6903]}, {"w": "want", "b": [0.6479, 0.6754, 0.6863, 0.6903]}, {"w": "to", "b": [0.6925, 0.6754, 0.7086, 0.6903]}, {"w": "learn", "b": [0.7148, 0.6754, 0.7543, 0.6903]}, {"w": "to", "b": [0.7605, 0.6754, 0.7767, 0.6903]}, {"w": "distinguish", "b": [0.7828, 0.6754, 0.8691, 0.6903]}, {"w": "between", "b": [0.1312, 0.6933, 0.1977, 0.7083]}, {"w": "labels", "b": [0.204, 0.6933, 0.2507, 0.7083]}, {"w": "1", "b": [0.2569, 0.6933, 0.2663, 0.7083]}, {"w": "and", "b": [0.2727, 0.6933, 0.303, 0.7083]}, {"w": "0,", "b": [0.3093, 0.6933, 0.324, 0.7083]}, {"w": "2", "b": [0.3303, 0.6933, 0.3397, 0.7083]}, {"w": "and", "b": [0.3461, 0.6933, 0.3764, 0.7083]}, {"w": "0,", "b": [0.3827, 0.6933, 0.3974, 0.7083]}, {"w": "and", "b": [0.4037, 0.6933, 0.4341, 0.7083]}, {"w": "3", "b": [0.4404, 0.6933, 0.4498, 0.7083]}, {"w": "and", "b": [0.4561, 0.6933, 0.4865, 0.7083]}, {"w": "0.", "b": [0.4928, 0.6933, 0.5074, 0.7083]}, {"w": "As", "b": [0.5162, 0.6933, 0.5377, 0.7083]}, {"w": "you", "b": [0.5441, 0.6933, 0.5734, 0.7083]}, {"w": "can", "b": [0.5797, 0.6933, 0.6079, 0.7083]}, {"w": "see,", "b": [0.6143, 0.6933, 0.6437, 0.7083]}, {"w": "in", "b": [0.6501, 0.6933, 0.6658, 0.7083]}, {"w": "each", "b": [0.6721, 0.6933, 0.7082, 0.7083]}, {"w": "of", "b": [0.7145, 0.6933, 0.7297, 0.7083]}, {"w": "the", "b": [0.736, 0.6933, 0.7622, 0.7083]}, {"w": "three", "b": [0.7685, 0.6933, 0.8104, 0.7083]}, {"w": "binary", "b": [0.8168, 0.6933, 0.8697, 0.7083]}, {"w": "classification", "b": [0.1312, 0.7113, 0.233, 0.7262]}, {"w": "problems,", "b": [0.2391, 0.7113, 0.3172, 0.7262]}, {"w": "the", "b": [0.3234, 0.7113, 0.349, 0.7262]}, {"w": "label", "b": [0.3552, 0.7113, 0.3936, 0.7262]}, {"w": "0", "b": [0.3996, 0.7113, 0.4088, 0.7262]}, {"w": "denotes", "b": [0.415, 0.7113, 0.4756, 0.7262]}, {"w": "the", "b": [0.4818, 0.7113, 0.5074, 0.7262]}, {"w": "“rest”", "b": [0.5136, 0.7113, 0.5609, 0.7262]}, {"w": "in", "b": [0.567, 0.7113, 0.5824, 0.7262]}, {"w": "“one-versus-rest.”", "b": [0.5886, 0.7113, 0.7279, 0.7262]}]}, {"id": "b_2", "type": "paragraph", "text": "When the model is well-calibrated, the calibration plot oscillates around the diagonal (shown", "words": [{"w": "When", "b": [0.1303, 0.7382, 0.177, 0.7532]}, {"w": "the", "b": [0.1831, 0.7382, 0.2082, 0.7532]}, {"w": "model", "b": [0.2143, 0.7382, 0.2621, 0.7532]}, {"w": "is", "b": [0.2681, 0.7382, 0.2803, 0.7532]}, {"w": "well-calibrated,", "b": [0.2864, 0.7382, 0.4065, 0.7532]}, {"w": "the", "b": [0.4126, 0.7382, 0.4377, 0.7532]}, {"w": "calibration", "b": [0.4438, 0.7382, 0.5283, 0.7532]}, {"w": "plot", "b": [0.5344, 0.7382, 0.5655, 0.7532]}, {"w": "oscillates", "b": [0.5716, 0.7382, 0.6422, 0.7532]}, {"w": "around", "b": [0.6482, 0.7382, 0.7036, 0.7532]}, {"w": "the", "b": [0.7096, 0.7382, 0.7348, 0.7532]}, {"w": "diagonal", "b": [0.7408, 0.7382, 0.8072, 0.7532]}, {"w": "(shown", "b": [0.8132, 0.7382, 0.8691, 0.7532]}]}, {"id": "b_3", "type": "paragraph", "text": "as a dotted line in Figure 8). The closer the calibration plot is to the diagonal, the better the model is calibrated. Because a logistic regression model returns the true probabilities of the positive class, its calibration plot is closest to the diagonal. When the model is not well-calibrated, the calibration plot usually has a sigmoid-shape, as shown by the support vector machine and random forest models.", "words": [{"w": "as", "b": [0.1312, 0.7561, 0.1481, 0.7711]}, {"w": "a", "b": [0.1543, 0.7561, 0.1637, 0.7711]}, {"w": "dotted", "b": [0.1699, 0.7561, 0.2233, 0.7711]}, {"w": "line", "b": [0.2295, 0.7561, 0.2588, 0.7711]}, {"w": "in", "b": [0.265, 0.7561, 0.2807, 0.7711]}, {"w": "Figure", "b": [0.2869, 0.7561, 0.34, 0.7711]}, {"w": "8).", "b": [0.3462, 0.7561, 0.3682, 0.7711]}, {"w": "The", "b": [0.3766, 0.7561, 0.409, 0.7711]}, {"w": "closer", "b": [0.4152, 0.7561, 0.4614, 0.7711]}, {"w": "the", "b": [0.4676, 0.7561, 0.4938, 0.7711]}, {"w": "calibration", "b": [0.5, 0.7561, 0.5879, 0.7711]}, {"w": "plot", "b": [0.5941, 0.7561, 0.6265, 0.7711]}, {"w": "is", "b": [0.6327, 0.7561, 0.6454, 0.7711]}, {"w": "to", "b": [0.6516, 0.7561, 0.6683, 0.7711]}, {"w": "the", "b": [0.6745, 0.7561, 0.7007, 0.7711]}, {"w": "diagonal,", "b": [0.7069, 0.7561, 0.7812, 0.7711]}, {"w": "the", "b": [0.7874, 0.7561, 0.8135, 0.7711]}, {"w": "better", "b": [0.8198, 0.7561, 0.8695, 0.7711]}, {"w": "the", "b": [0.1312, 0.7741, 0.1574, 0.789]}, {"w": "model", "b": [0.1638, 0.7741, 0.2134, 0.789]}, {"w": "is", "b": [0.2198, 0.7741, 0.2325, 0.789]}, {"w": "calibrated.", "b": [0.2389, 0.7741, 0.3257, 0.789]}, {"w": "Because", "b": [0.3346, 0.7741, 0.4004, 0.789]}, {"w": "a", "b": [0.4068, 0.7741, 0.4162, 0.789]}, {"w": "logistic", "b": [0.4226, 0.7741, 0.4802, 0.789]}, {"w": "regression", "b": [0.4866, 0.7741, 0.5675, 0.789]}, {"w": "model", "b": [0.5739, 0.7741, 0.6235, 0.789]}, {"w": "returns", "b": [0.6299, 0.7741, 0.6887, 0.789]}, {"w": "the", "b": [0.6951, 0.7741, 0.7212, 0.789]}, {"w": "true", "b": [0.7276, 0.7741, 0.7612, 0.789]}, {"w": "probabilities", "b": [0.7675, 0.7741, 0.8692, 0.789]}, {"w": "of", "b": [0.1312, 0.792, 0.1464, 0.807]}, {"w": "the", "b": [0.1527, 0.792, 0.1788, 0.807]}, {"w": "positive", "b": [0.1851, 0.792, 0.2485, 0.807]}, {"w": "class,", "b": [0.2547, 0.792, 0.2979, 0.807]}, {"w": "its", "b": [0.3042, 0.792, 0.3241, 0.807]}, {"w": "calibration", "b": [0.3304, 0.792, 0.4183, 0.807]}, {"w": "plot", "b": [0.4246, 0.792, 0.457, 0.807]}, {"w": "is", "b": [0.4633, 0.792, 0.4759, 0.807]}, {"w": "closest", "b": [0.4822, 0.792, 0.5358, 0.807]}, {"w": "to", "b": [0.542, 0.792, 0.5588, 0.807]}, {"w": "the", "b": [0.565, 0.792, 0.5912, 0.807]}, {"w": "diagonal.", "b": [0.5975, 0.792, 0.6717, 0.807]}, {"w": "When", "b": [0.6803, 0.792, 0.7289, 0.807]}, {"w": "the", "b": [0.7351, 0.792, 0.7613, 0.807]}, {"w": "model", "b": [0.7676, 0.792, 0.8172, 0.807]}, {"w": "is", "b": [0.8235, 0.792, 0.8362, 0.807]}, {"w": "not", "b": [0.8424, 0.792, 0.8696, 0.807]}, {"w": "well-calibrated,", "b": [0.1306, 0.81, 0.2539, 0.8249]}, {"w": "the", "b": [0.26, 0.81, 0.2858, 0.8249]}, {"w": "calibration", "b": [0.292, 0.81, 0.3787, 0.8249]}, {"w": "plot", "b": [0.3848, 0.81, 0.4168, 0.8249]}, {"w": "usually", "b": [0.4229, 0.81, 0.4803, 0.8249]}, {"w": "has", "b": [0.4865, 0.81, 0.5134, 0.8249]}, {"w": "a", "b": [0.5195, 0.81, 0.5288, 0.8249]}, {"w": "sigmoid-shape,", "b": [0.535, 0.81, 0.6543, 0.8249]}, {"w": "as", "b": [0.6604, 0.81, 0.677, 0.8249]}, {"w": "shown", "b": [0.6832, 0.81, 0.7333, 0.8249]}, {"w": "by", "b": [0.7395, 0.81, 0.7591, 0.8249]}, {"w": "the", "b": [0.7652, 0.81, 0.791, 0.8249]}, {"w": "support", "b": [0.7969, 0.8103, 0.8688, 0.8252]}, {"w": "vector", "b": [0.1312, 0.8282, 0.1886, 0.8432]}, {"w": "machine", "b": [0.1957, 0.8282, 0.2717, 0.8432]}, {"w": "and", "b": [0.2778, 0.8279, 0.3076, 0.8429]}, {"w": "random", "b": [0.3137, 0.8282, 0.3846, 0.8432]}, {"w": "forest", "b": [0.3917, 0.8282, 0.4439, 0.8432]}, {"w": "models.", "b": [0.45, 0.8279, 0.5111, 0.8429]}]}, {"id": "b_4", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 26", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "26", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 202, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "6.5.2 Calibration Techniques", "words": [{"w": "6.5.2", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Calibration", "b": [0.1961, 0.0884, 0.3009, 0.1034]}, {"w": "Techniques", "b": [0.308, 0.0884, 0.4101, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "There are two techniques often used to calibrate a binary model: Platt scaling and isotonic regression. The two are based on similar principles.", "words": [{"w": "There", "b": [0.1306, 0.1247, 0.1769, 0.1396]}, {"w": "are", "b": [0.182, 0.1247, 0.2062, 0.1396]}, {"w": "two", "b": [0.2114, 0.1247, 0.2394, 0.1396]}, {"w": "techniques", "b": [0.2446, 0.1247, 0.3272, 0.1396]}, {"w": "often", "b": [0.3323, 0.1247, 0.372, 0.1396]}, {"w": "used", "b": [0.3772, 0.1247, 0.4125, 0.1396]}, {"w": "to", "b": [0.4176, 0.1247, 0.4337, 0.1396]}, {"w": "calibrate", "b": [0.4389, 0.1247, 0.5073, 0.1396]}, {"w": "a", "b": [0.5124, 0.1247, 0.5215, 0.1396]}, {"w": "binary", "b": [0.5266, 0.1247, 0.5774, 0.1396]}, {"w": "model:", "b": [0.5826, 0.1247, 0.6354, 0.1396]}, {"w": "Platt", "b": [0.6428, 0.125, 0.69, 0.1399]}, {"w": "scaling", "b": [0.696, 0.125, 0.7583, 0.1399]}, {"w": "and", "b": [0.7636, 0.1247, 0.7928, 0.1396]}, {"w": "isotonic", "b": [0.7979, 0.125, 0.8688, 0.1399]}, {"w": "regression.", "b": [0.1312, 0.1426, 0.229, 0.1579]}, {"w": "The", "b": [0.2372, 0.1426, 0.269, 0.1576]}, {"w": "two", "b": [0.2751, 0.1426, 0.3038, 0.1576]}, {"w": "are", "b": [0.31, 0.1426, 0.3346, 0.1576]}, {"w": "based", "b": [0.3408, 0.1426, 0.386, 0.1576]}, {"w": "on", "b": [0.3922, 0.1426, 0.4117, 0.1576]}, {"w": "similar", "b": [0.4178, 0.1426, 0.4723, 0.1576]}, {"w": "principles.", "b": [0.4784, 0.1426, 0.5607, 0.1576]}]}, {"id": "b_2", "type": "paragraph", "text": "Let us have a model f that we want to calibrate. First of all, we need a holdout dataset specifically set aside for calibration. To avoid overfitting, we cannot use training or validation data for calibration. Let this calibration dataset be of size M. Then, we apply the model f to each example i = 1, . . . , M and obtain, for each example i, the prediction fi. We build a new dataset Z, where each example is a pair (fi, yi), yi is the true label of example i, and labels have the values in the set {0, 1}.", "words": [{"w": "Let", "b": [0.1312, 0.1695, 0.1587, 0.1845]}, {"w": "us", "b": [0.1655, 0.1695, 0.1834, 0.1845]}, {"w": "have", "b": [0.1902, 0.1695, 0.2273, 0.1845]}, {"w": "a", "b": [0.2341, 0.1695, 0.2435, 0.1845]}, {"w": "model", "b": [0.2504, 0.1695, 0.3, 0.1845]}, {"w": "f", "b": [0.3068, 0.1698, 0.3158, 0.1848]}, {"w": "that", "b": [0.3246, 0.1695, 0.3591, 0.1845]}, {"w": "we", "b": [0.3659, 0.1695, 0.3873, 0.1845]}, {"w": "want", "b": [0.3941, 0.1695, 0.4339, 0.1845]}, {"w": "to", "b": [0.4407, 0.1695, 0.4574, 0.1845]}, {"w": "calibrate.", "b": [0.4642, 0.1695, 0.5406, 0.1845]}, {"w": "First", "b": [0.5508, 0.1695, 0.5904, 0.1845]}, {"w": "of", "b": [0.5972, 0.1695, 0.6124, 0.1845]}, {"w": "all,", "b": [0.6192, 0.1695, 0.6443, 0.1845]}, {"w": "we", "b": [0.6513, 0.1695, 0.6727, 0.1845]}, {"w": "need", "b": [0.6795, 0.1695, 0.7172, 0.1845]}, {"w": "a", "b": [0.724, 0.1695, 0.7334, 0.1845]}, {"w": "holdout", "b": [0.7402, 0.1695, 0.8029, 0.1845]}, {"w": "dataset", "b": [0.8097, 0.1695, 0.8695, 0.1845]}, {"w": "specifically", "b": [0.1312, 0.1875, 0.2168, 0.2024]}, {"w": "set", "b": [0.2224, 0.1875, 0.2447, 0.2024]}, {"w": "aside", "b": [0.2503, 0.1875, 0.2896, 0.2024]}, {"w": "for", "b": [0.2953, 0.1875, 0.317, 0.2024]}, {"w": "calibration.", "b": [0.3226, 0.1875, 0.4121, 0.2024]}, {"w": "To", "b": [0.4201, 0.1875, 0.4407, 0.2024]}, {"w": "avoid", "b": [0.4464, 0.1875, 0.488, 0.2024]}, {"w": "overfitting,", "b": [0.4937, 0.1875, 0.5796, 0.2024]}, {"w": "we", "b": [0.5854, 0.1875, 0.606, 0.2024]}, {"w": "cannot", "b": [0.6116, 0.1875, 0.6649, 0.2024]}, {"w": "use", "b": [0.6706, 0.1875, 0.6958, 0.2024]}, {"w": "training", "b": [0.7014, 0.1875, 0.7638, 0.2024]}, {"w": "or", "b": [0.7695, 0.1875, 0.7856, 0.2024]}, {"w": "validation", "b": [0.7913, 0.1875, 0.8691, 0.2024]}, {"w": "data", "b": [0.1312, 0.2054, 0.167, 0.2204]}, {"w": "for", "b": [0.1732, 0.2054, 0.1952, 0.2204]}, {"w": "calibration.", "b": [0.2014, 0.2054, 0.2925, 0.2204]}, {"w": "Let", "b": [0.3007, 0.2054, 0.3276, 0.2204]}, {"w": "this", "b": [0.3337, 0.2054, 0.3635, 0.2204]}, {"w": "calibration", "b": [0.3697, 0.2054, 0.4557, 0.2204]}, {"w": "dataset", "b": [0.4618, 0.2054, 0.5202, 0.2204]}, {"w": "be", "b": [0.5264, 0.2054, 0.5453, 0.2204]}, {"w": "of", "b": [0.5515, 0.2054, 0.5663, 0.2204]}, {"w": "size", "b": [0.5724, 0.2054, 0.6012, 0.2204]}, {"w": "M.", "b": [0.6071, 0.2054, 0.6322, 0.2207]}, {"w": "Then,", "b": [0.6404, 0.2054, 0.6874, 0.2204]}, {"w": "we", "b": [0.6936, 0.2054, 0.7146, 0.2204]}, {"w": "apply", "b": [0.7207, 0.2054, 0.7652, 0.2204]}, {"w": "the", "b": [0.7714, 0.2054, 0.797, 0.2204]}, {"w": "model", "b": [0.8031, 0.2054, 0.8517, 0.2204]}, {"w": "f", "b": [0.8577, 0.2057, 0.8668, 0.2207]}, {"w": "to", "b": [0.1312, 0.2234, 0.1477, 0.2383]}, {"w": "each", "b": [0.1538, 0.2234, 0.1892, 0.2383]}, {"w": "example", "b": [0.1954, 0.2234, 0.2615, 0.2383]}, {"w": "i", "b": [0.2676, 0.2237, 0.274, 0.2386]}, {"w": "=", "b": [0.2791, 0.2234, 0.2935, 0.2383]}, {"w": "1,", "b": [0.2986, 0.2234, 0.313, 0.2386]}, {"w": ".", "b": [0.316, 0.2237, 0.3212, 0.2386]}, {"w": ".", "b": [0.3242, 0.2237, 0.3294, 0.2386]}, {"w": ".", "b": [0.3324, 0.2237, 0.3376, 0.2386]}, {"w": ",", "b": [0.3407, 0.2237, 0.3458, 0.2386]}, {"w": "M", "b": [0.3488, 0.2237, 0.3667, 0.2386]}, {"w": "and", "b": [0.3749, 0.2234, 0.4046, 0.2383]}, {"w": "obtain,", "b": [0.4108, 0.2234, 0.4672, 0.2383]}, {"w": "for", "b": [0.4734, 0.2234, 0.4955, 0.2383]}, {"w": "each", "b": [0.5016, 0.2234, 0.5371, 0.2383]}, {"w": "example", "b": [0.5432, 0.2234, 0.6094, 0.2383]}, {"w": "i,", "b": [0.6154, 0.2234, 0.6269, 0.2386]}, {"w": "the", "b": [0.633, 0.2234, 0.6587, 0.2383]}, {"w": "prediction", "b": [0.6648, 0.2234, 0.746, 0.2383]}, {"w": "fi.", "b": [0.7521, 0.2234, 0.7724, 0.2399]}, {"w": "We", "b": [0.7806, 0.2234, 0.8062, 0.2383]}, {"w": "build", "b": [0.8124, 0.2234, 0.8534, 0.2383]}, {"w": "a", "b": [0.8596, 0.2234, 0.8688, 0.2383]}, {"w": "new", "b": [0.1312, 0.2413, 0.1636, 0.2563]}, {"w": "dataset", "b": [0.1697, 0.2413, 0.2293, 0.2563]}, {"w": "Z,", "b": [0.2355, 0.2413, 0.2555, 0.2564]}, {"w": "where", "b": [0.2617, 0.2413, 0.3097, 0.2563]}, {"w": "each", "b": [0.3159, 0.2413, 0.3519, 0.2563]}, {"w": "example", "b": [0.3581, 0.2413, 0.4254, 0.2563]}, {"w": "is", "b": [0.4316, 0.2413, 0.4442, 0.2563]}, {"w": "a", "b": [0.4503, 0.2413, 0.4597, 0.2563]}, {"w": "pair", "b": [0.4659, 0.2413, 0.4983, 0.2563]}, {"w": "(fi,", "b": [0.5043, 0.2413, 0.5319, 0.2578]}, {"w": "yi),", "b": [0.535, 0.2413, 0.5627, 0.2578]}, {"w": "yi", "b": [0.5689, 0.2416, 0.5831, 0.2578]}, {"w": "is", "b": [0.5902, 0.2413, 0.6028, 0.2563]}, {"w": "the", "b": [0.609, 0.2413, 0.6351, 0.2563]}, {"w": "true", "b": [0.6412, 0.2413, 0.6747, 0.2563]}, {"w": "label", "b": [0.6809, 0.2413, 0.72, 0.2563]}, {"w": "of", "b": [0.7261, 0.2413, 0.7413, 0.2563]}, {"w": "example", "b": [0.7474, 0.2413, 0.8148, 0.2563]}, {"w": "i,", "b": [0.8208, 0.2413, 0.8324, 0.2566]}, {"w": "and", "b": [0.8385, 0.2413, 0.8688, 0.2563]}, {"w": "labels", "b": [0.1312, 0.2593, 0.177, 0.2742]}, {"w": "have", "b": [0.1831, 0.2593, 0.2195, 0.2742]}, {"w": "the", "b": [0.2257, 0.2593, 0.2513, 0.2742]}, {"w": "values", "b": [0.2575, 0.2593, 0.3063, 0.2742]}, {"w": "in", "b": [0.3124, 0.2593, 0.3278, 0.2742]}, {"w": "the", "b": [0.334, 0.2593, 0.3596, 0.2742]}, {"w": "set", "b": [0.3658, 0.2593, 0.3885, 0.2742]}, {"w": "{0,", "b": [0.3944, 0.2593, 0.418, 0.2745]}, {"w": "1}.", "b": [0.4211, 0.2593, 0.4447, 0.2743]}]}, {"id": "b_3", "type": "paragraph", "text": "The only difference between Platt scaling and isotonic regression is that the former builds a logistic regression model by using the dataset Z, while the latter builds the isotonic regression of Z, that is, a non-decreasing function as close to the examples as possible. Once we have the calibration model z, obtained either using Platt scaling or isotonic regression, we can predict the calibrated probability for an input x as z(f(x)).", "words": [{"w": "The", "b": [0.1306, 0.2862, 0.1622, 0.3012]}, {"w": "only", "b": [0.1683, 0.2862, 0.2025, 0.3012]}, {"w": "difference", "b": [0.2086, 0.2862, 0.2846, 0.3012]}, {"w": "between", "b": [0.2908, 0.2862, 0.3555, 0.3012]}, {"w": "Platt", "b": [0.3616, 0.2862, 0.4027, 0.3012]}, {"w": "scaling", "b": [0.4088, 0.2862, 0.4629, 0.3012]}, {"w": "and", "b": [0.4691, 0.2862, 0.4986, 0.3012]}, {"w": "isotonic", "b": [0.5048, 0.2862, 0.5661, 0.3012]}, {"w": "regression", "b": [0.5722, 0.2862, 0.651, 0.3012]}, {"w": "is", "b": [0.6572, 0.2862, 0.6695, 0.3012]}, {"w": "that", "b": [0.6756, 0.2862, 0.7093, 0.3012]}, {"w": "the", "b": [0.7154, 0.2862, 0.7409, 0.3012]}, {"w": "former", "b": [0.7471, 0.2862, 0.7997, 0.3012]}, {"w": "builds", "b": [0.8058, 0.2862, 0.8538, 0.3012]}, {"w": "a", "b": [0.86, 0.2862, 0.8692, 0.3012]}, {"w": "logistic", "b": [0.1312, 0.3041, 0.1866, 0.3191]}, {"w": "regression", "b": [0.1919, 0.3041, 0.2696, 0.3191]}, {"w": "model", "b": [0.2749, 0.3041, 0.3226, 0.3191]}, {"w": "by", "b": [0.3279, 0.3041, 0.347, 0.3191]}, {"w": "using", "b": [0.3523, 0.3041, 0.3936, 0.3191]}, {"w": "the", "b": [0.3989, 0.3041, 0.424, 0.3191]}, {"w": "dataset", "b": [0.4293, 0.3041, 0.4867, 0.3191]}, {"w": "Z,", "b": [0.4918, 0.3041, 0.5116, 0.3192]}, {"w": "while", "b": [0.5171, 0.3041, 0.5583, 0.3191]}, {"w": "the", "b": [0.5636, 0.3041, 0.5887, 0.3191]}, {"w": "latter", "b": [0.594, 0.3041, 0.6373, 0.3191]}, {"w": "builds", "b": [0.6425, 0.3041, 0.6899, 0.3191]}, {"w": "the", "b": [0.6952, 0.3041, 0.7203, 0.3191]}, {"w": "isotonic", "b": [0.7256, 0.3041, 0.786, 0.3191]}, {"w": "regression", "b": [0.7913, 0.3041, 0.869, 0.3191]}, {"w": "of", "b": [0.1312, 0.3221, 0.1462, 0.337]}, {"w": "Z,", "b": [0.1523, 0.3221, 0.1723, 0.3371]}, {"w": "that", "b": [0.1785, 0.3221, 0.2125, 0.337]}, {"w": "is,", "b": [0.2187, 0.3221, 0.2363, 0.337]}, {"w": "a", "b": [0.2424, 0.3221, 0.2517, 0.337]}, {"w": "non-decreasing", "b": [0.2579, 0.3221, 0.3776, 0.337]}, {"w": "function", "b": [0.3838, 0.3221, 0.4502, 0.337]}, {"w": "as", "b": [0.4564, 0.3221, 0.473, 0.337]}, {"w": "close", "b": [0.4792, 0.3221, 0.5174, 0.337]}, {"w": "to", "b": [0.5236, 0.3221, 0.5401, 0.337]}, {"w": "the", "b": [0.5462, 0.3221, 0.572, 0.337]}, {"w": "examples", "b": [0.5781, 0.3221, 0.6519, 0.337]}, {"w": "as", "b": [0.6581, 0.3221, 0.6747, 0.337]}, {"w": "possible.", "b": [0.6809, 0.3221, 0.7496, 0.337]}, {"w": "Once", "b": [0.7578, 0.3221, 0.7991, 0.337]}, {"w": "we", "b": [0.8053, 0.3221, 0.8264, 0.337]}, {"w": "have", "b": [0.8325, 0.3221, 0.8691, 0.337]}, {"w": "the", "b": [0.1312, 0.34, 0.1574, 0.355]}, {"w": "calibration", "b": [0.1639, 0.34, 0.2518, 0.355]}, {"w": "model", "b": [0.2584, 0.34, 0.308, 0.355]}, {"w": "z,", "b": [0.3145, 0.34, 0.3291, 0.3553]}, {"w": "obtained", "b": [0.3358, 0.34, 0.4069, 0.355]}, {"w": "either", "b": [0.4134, 0.34, 0.4606, 0.355]}, {"w": "using", "b": [0.4671, 0.34, 0.5101, 0.355]}, {"w": "Platt", "b": [0.5166, 0.34, 0.5587, 0.355]}, {"w": "scaling", "b": [0.5653, 0.34, 0.6208, 0.355]}, {"w": "or", "b": [0.6274, 0.34, 0.6441, 0.355]}, {"w": "isotonic", "b": [0.6507, 0.34, 0.7135, 0.355]}, {"w": "regression,", "b": [0.7201, 0.34, 0.8062, 0.355]}, {"w": "we", "b": [0.8128, 0.34, 0.8343, 0.355]}, {"w": "can", "b": [0.8408, 0.34, 0.8691, 0.355]}, {"w": "predict", "b": [0.1312, 0.358, 0.1877, 0.3729]}, {"w": "the", "b": [0.1939, 0.358, 0.2195, 0.3729]}, {"w": "calibrated", "b": [0.2256, 0.358, 0.3057, 0.3729]}, {"w": "probability", "b": [0.3118, 0.358, 0.4001, 0.3729]}, {"w": "for", "b": [0.4062, 0.358, 0.4283, 0.3729]}, {"w": "an", "b": [0.4345, 0.358, 0.454, 0.3729]}, {"w": "input", "b": [0.4601, 0.358, 0.5032, 0.3729]}, {"w": "x", "b": [0.5091, 0.3583, 0.5203, 0.3732]}, {"w": "as", "b": [0.5266, 0.358, 0.5431, 0.3729]}, {"w": "z(f(x)).", "b": [0.5492, 0.358, 0.6148, 0.3732]}]}, {"id": "b_4", "type": "paragraph", "text": "Notice that a calibrated model may or may not result in better quality prediction for your problem. That depends on the chosen model performance metric.", "words": [{"w": "Notice", "b": [0.1312, 0.3849, 0.1836, 0.3999]}, {"w": "that", "b": [0.1897, 0.3849, 0.224, 0.3999]}, {"w": "a", "b": [0.2301, 0.3849, 0.2394, 0.3999]}, {"w": "calibrated", "b": [0.2456, 0.3849, 0.3265, 0.3999]}, {"w": "model", "b": [0.3327, 0.3849, 0.3819, 0.3999]}, {"w": "may", "b": [0.3881, 0.3849, 0.4223, 0.3999]}, {"w": "or", "b": [0.4284, 0.3849, 0.4451, 0.3999]}, {"w": "may", "b": [0.4512, 0.3849, 0.4854, 0.3999]}, {"w": "not", "b": [0.4916, 0.3849, 0.5185, 0.3999]}, {"w": "result", "b": [0.5247, 0.3849, 0.5705, 0.3999]}, {"w": "in", "b": [0.5766, 0.3849, 0.5922, 0.3999]}, {"w": "better", "b": [0.5983, 0.3849, 0.6476, 0.3999]}, {"w": "quality", "b": [0.6538, 0.3849, 0.7103, 0.3999]}, {"w": "prediction", "b": [0.7165, 0.3849, 0.7984, 0.3999]}, {"w": "for", "b": [0.8046, 0.3849, 0.8269, 0.3999]}, {"w": "your", "b": [0.8331, 0.3849, 0.8694, 0.3999]}, {"w": "problem.", "b": [0.1312, 0.4029, 0.202, 0.4178]}, {"w": "That", "b": [0.2102, 0.4029, 0.2502, 0.4178]}, {"w": "depends", "b": [0.2564, 0.4029, 0.3216, 0.4178]}, {"w": "on", "b": [0.3278, 0.4029, 0.3472, 0.4178]}, {"w": "the", "b": [0.3534, 0.4029, 0.379, 0.4178]}, {"w": "chosen", "b": [0.3852, 0.4029, 0.4381, 0.4178]}, {"w": "model", "b": [0.4443, 0.4029, 0.493, 0.4178]}, {"w": "performance", "b": [0.4991, 0.4029, 0.5987, 0.4178]}, {"w": "metric.", "b": [0.6048, 0.4029, 0.6613, 0.4178]}]}, {"id": "b_5", "type": "paragraph", "text": "According to experiments:5 Platt scaling is most effective when the distortion in the predicted probabilities is sigmoid-shaped. Isotonic regression can correct a wider range of distortions. Unfortunately, this extra power comes at a price. Analysis has shown that isotonic regression is more prone to overfitting, and thus performs worse than Platt scaling when data is scarce.", "words": [{"w": "According", "b": [0.1305, 0.4298, 0.21, 0.4447]}, {"w": "to", "b": [0.2152, 0.4298, 0.2312, 0.4447]}, {"w": "experiments:5", "b": [0.2364, 0.4281, 0.3438, 0.4447]}, {"w": "Platt", "b": [0.3525, 0.4298, 0.3929, 0.4447]}, {"w": "scaling", "b": [0.3981, 0.4298, 0.4515, 0.4447]}, {"w": "is", "b": [0.4567, 0.4298, 0.4689, 0.4447]}, {"w": "most", "b": [0.4741, 0.4298, 0.5123, 0.4447]}, {"w": "effective", "b": [0.5175, 0.4298, 0.5813, 0.4447]}, {"w": "when", "b": [0.5865, 0.4298, 0.6277, 0.4447]}, {"w": "the", "b": [0.6329, 0.4298, 0.6581, 0.4447]}, {"w": "distortion", "b": [0.6633, 0.4298, 0.7398, 0.4447]}, {"w": "in", "b": [0.745, 0.4298, 0.7601, 0.4447]}, {"w": "the", "b": [0.7653, 0.4298, 0.7904, 0.4447]}, {"w": "predicted", "b": [0.7956, 0.4298, 0.869, 0.4447]}, {"w": "probabilities", "b": [0.1312, 0.4477, 0.2312, 0.4627]}, {"w": "is", "b": [0.2373, 0.4477, 0.2498, 0.4627]}, {"w": "sigmoid-shaped.", "b": [0.256, 0.4477, 0.3852, 0.4627]}, {"w": "Isotonic", "b": [0.3935, 0.4477, 0.4569, 0.4627]}, {"w": "regression", "b": [0.4631, 0.4477, 0.5426, 0.4627]}, {"w": "can", "b": [0.5488, 0.4477, 0.5765, 0.4627]}, {"w": "correct", "b": [0.5827, 0.4477, 0.6384, 0.4627]}, {"w": "a", "b": [0.6445, 0.4477, 0.6538, 0.4627]}, {"w": "wider", "b": [0.66, 0.4477, 0.7042, 0.4627]}, {"w": "range", "b": [0.7104, 0.4477, 0.7547, 0.4627]}, {"w": "of", "b": [0.7609, 0.4477, 0.7758, 0.4627]}, {"w": "distortions.", "b": [0.7819, 0.4477, 0.8727, 0.4627]}, {"w": "Unfortunately,", "b": [0.1312, 0.4657, 0.2458, 0.4806]}, {"w": "this", "b": [0.2517, 0.4657, 0.281, 0.4806]}, {"w": "extra", "b": [0.2868, 0.4657, 0.3275, 0.4806]}, {"w": "power", "b": [0.3333, 0.4657, 0.3801, 0.4806]}, {"w": "comes", "b": [0.3859, 0.4657, 0.4332, 0.4806]}, {"w": "at", "b": [0.4391, 0.4657, 0.4551, 0.4806]}, {"w": "a", "b": [0.461, 0.4657, 0.47, 0.4806]}, {"w": "price.", "b": [0.4758, 0.4657, 0.5191, 0.4806]}, {"w": "Analysis", "b": [0.5272, 0.4657, 0.5937, 0.4806]}, {"w": "has", "b": [0.5995, 0.4657, 0.6258, 0.4806]}, {"w": "shown", "b": [0.6316, 0.4657, 0.6804, 0.4806]}, {"w": "that", "b": [0.6862, 0.4657, 0.7194, 0.4806]}, {"w": "isotonic", "b": [0.7252, 0.4657, 0.7856, 0.4806]}, {"w": "regression", "b": [0.7914, 0.4657, 0.8691, 0.4806]}, {"w": "is", "b": [0.1312, 0.4836, 0.1435, 0.4986]}, {"w": "more", "b": [0.1496, 0.4836, 0.1891, 0.4986]}, {"w": "prone", "b": [0.1952, 0.4836, 0.2398, 0.4986]}, {"w": "to", "b": [0.2459, 0.4836, 0.2621, 0.4986]}, {"w": "overfitting,", "b": [0.2683, 0.4836, 0.3547, 0.4986]}, {"w": "and", "b": [0.3609, 0.4836, 0.3902, 0.4986]}, {"w": "thus", "b": [0.3964, 0.4836, 0.4303, 0.4986]}, {"w": "performs", "b": [0.4365, 0.4836, 0.5065, 0.4986]}, {"w": "worse", "b": [0.5126, 0.4836, 0.5568, 0.4986]}, {"w": "than", "b": [0.5629, 0.4836, 0.5993, 0.4986]}, {"w": "Platt", "b": [0.6055, 0.4836, 0.6461, 0.4986]}, {"w": "scaling", "b": [0.6523, 0.4836, 0.706, 0.4986]}, {"w": "when", "b": [0.7121, 0.4836, 0.7536, 0.4986]}, {"w": "data", "b": [0.7597, 0.4836, 0.7951, 0.4986]}, {"w": "is", "b": [0.8013, 0.4836, 0.8135, 0.4986]}, {"w": "scarce.", "b": [0.8197, 0.4836, 0.8724, 0.4986]}]}, {"id": "b_6", "type": "paragraph", "text": "Experiments with eight classification problems also suggested that random forests, neural networks, and bagged decision trees are the best learning methods for predicting well- calibrated probabilities prior to calibration, but after calibration, the best methods are boosted trees, random forest, and SVM.", "words": [{"w": "Experiments", "b": [0.1312, 0.5105, 0.2347, 0.5255]}, {"w": "with", "b": [0.2409, 0.5105, 0.2775, 0.5255]}, {"w": "eight", "b": [0.2837, 0.5105, 0.324, 0.5255]}, {"w": "classification", "b": [0.3302, 0.5105, 0.434, 0.5255]}, {"w": "problems", "b": [0.4402, 0.5105, 0.5147, 0.5255]}, {"w": "also", "b": [0.5209, 0.5105, 0.5524, 0.5255]}, {"w": "suggested", "b": [0.5586, 0.5105, 0.6373, 0.5255]}, {"w": "that", "b": [0.6435, 0.5105, 0.678, 0.5255]}, {"w": "random", "b": [0.6842, 0.5105, 0.747, 0.5255]}, {"w": "forests,", "b": [0.7533, 0.5105, 0.8116, 0.5255]}, {"w": "neural", "b": [0.8178, 0.5105, 0.8691, 0.5255]}, {"w": "networks,", "b": [0.1312, 0.5285, 0.2093, 0.5434]}, {"w": "and", "b": [0.2189, 0.5285, 0.2492, 0.5434]}, {"w": "bagged", "b": [0.258, 0.5285, 0.3155, 0.5434]}, {"w": "decision", "b": [0.3244, 0.5285, 0.3894, 0.5434]}, {"w": "trees", "b": [0.3982, 0.5285, 0.4371, 0.5434]}, {"w": "are", "b": [0.4459, 0.5285, 0.4711, 0.5434]}, {"w": "the", "b": [0.4799, 0.5285, 0.5061, 0.5434]}, {"w": "best", "b": [0.5149, 0.5285, 0.549, 0.5434]}, {"w": "learning", "b": [0.5578, 0.5285, 0.6238, 0.5434]}, {"w": "methods", "b": [0.6326, 0.5285, 0.7023, 0.5434]}, {"w": "for", "b": [0.7111, 0.5285, 0.7337, 0.5434]}, {"w": "predicting", "b": [0.7425, 0.5285, 0.8252, 0.5434]}, {"w": "well-", "b": [0.834, 0.5285, 0.8722, 0.5434]}, {"w": "calibrated", "b": [0.1312, 0.5464, 0.2129, 0.5614]}, {"w": "probabilities", "b": [0.221, 0.5464, 0.3226, 0.5614]}, {"w": "prior", "b": [0.3307, 0.5464, 0.3706, 0.5614]}, {"w": "to", "b": [0.3787, 0.5464, 0.3954, 0.5614]}, {"w": "calibration,", "b": [0.4035, 0.5464, 0.4967, 0.5614]}, {"w": "but", "b": [0.5053, 0.5464, 0.5335, 0.5614]}, {"w": "after", "b": [0.5416, 0.5464, 0.5799, 0.5614]}, {"w": "calibration,", "b": [0.588, 0.5464, 0.6811, 0.5614]}, {"w": "the", "b": [0.6897, 0.5464, 0.7159, 0.5614]}, {"w": "best", "b": [0.724, 0.5464, 0.7581, 0.5614]}, {"w": "methods", "b": [0.7662, 0.5464, 0.8359, 0.5614]}, {"w": "are", "b": [0.844, 0.5464, 0.8691, 0.5614]}, {"w": "boosted", "b": [0.1312, 0.5644, 0.1939, 0.5793]}, {"w": "trees,", "b": [0.2, 0.5644, 0.2433, 0.5793]}, {"w": "random", "b": [0.2494, 0.5644, 0.311, 0.5793]}, {"w": "forest,", "b": [0.3171, 0.5644, 0.3671, 0.5793]}, {"w": "and", "b": [0.3732, 0.5644, 0.4029, 0.5793]}, {"w": "SVM.", "b": [0.4091, 0.5644, 0.4552, 0.5793]}]}, {"id": "b_7", "type": "paragraph", "text": "6.6 Troubleshooting and Error Analysis", "words": [{"w": "6.6", "b": [0.1312, 0.6132, 0.1631, 0.6311]}, {"w": "Troubleshooting", "b": [0.188, 0.6132, 0.3641, 0.6311]}, {"w": "and", "b": [0.3724, 0.6132, 0.4122, 0.6311]}, {"w": "Error", "b": [0.4205, 0.6132, 0.4798, 0.6311]}, {"w": "Analysis", "b": [0.4881, 0.6132, 0.5796, 0.6311]}]}, {"id": "b_8", "type": "paragraph", "text": "Troubleshooting a machine learning pipeline is hard. It’s difficult to differentiate whether the model performs poorly because your code contains a bug, or if there are problems with your training data, learning algorithm, or the way you designed your pipeline. Moreover, the same degradation in performance can be explained by various reasons. The results of the learning can be sensitive to small changes in hyperparameters or dataset makeup.", "words": [{"w": "Troubleshooting", "b": [0.1306, 0.6518, 0.2583, 0.6667]}, {"w": "a", "b": [0.2642, 0.6518, 0.2733, 0.6667]}, {"w": "machine", "b": [0.2792, 0.6518, 0.344, 0.6667]}, {"w": "learning", "b": [0.3499, 0.6518, 0.4133, 0.6667]}, {"w": "pipeline", "b": [0.4192, 0.6518, 0.4811, 0.6667]}, {"w": "is", "b": [0.487, 0.6518, 0.4991, 0.6667]}, {"w": "hard.", "b": [0.505, 0.6518, 0.5463, 0.6667]}, {"w": "It’s", "b": [0.5544, 0.6518, 0.5802, 0.6667]}, {"w": "difficult", "b": [0.5861, 0.6518, 0.6464, 0.6667]}, {"w": "to", "b": [0.6523, 0.6518, 0.6684, 0.6667]}, {"w": "differentiate", "b": [0.6743, 0.6518, 0.7688, 0.6667]}, {"w": "whether", "b": [0.7747, 0.6518, 0.8381, 0.6667]}, {"w": "the", "b": [0.844, 0.6518, 0.8691, 0.6667]}, {"w": "model", "b": [0.1312, 0.6697, 0.1794, 0.6847]}, {"w": "performs", "b": [0.1855, 0.6697, 0.2556, 0.6847]}, {"w": "poorly", "b": [0.2617, 0.6697, 0.313, 0.6847]}, {"w": "because", "b": [0.3191, 0.6697, 0.3805, 0.6847]}, {"w": "your", "b": [0.3866, 0.6697, 0.4222, 0.6847]}, {"w": "code", "b": [0.4283, 0.6697, 0.4643, 0.6847]}, {"w": "contains", "b": [0.4704, 0.6697, 0.5358, 0.6847]}, {"w": "a", "b": [0.542, 0.6697, 0.5511, 0.6847]}, {"w": "bug,", "b": [0.5572, 0.6697, 0.5917, 0.6847]}, {"w": "or", "b": [0.5978, 0.6697, 0.6141, 0.6847]}, {"w": "if", "b": [0.6202, 0.6697, 0.6308, 0.6847]}, {"w": "there", "b": [0.637, 0.6697, 0.6776, 0.6847]}, {"w": "are", "b": [0.6837, 0.6697, 0.7081, 0.6847]}, {"w": "problems", "b": [0.7142, 0.6697, 0.7863, 0.6847]}, {"w": "with", "b": [0.7924, 0.6697, 0.8278, 0.6847]}, {"w": "your", "b": [0.834, 0.6697, 0.8695, 0.6847]}, {"w": "training", "b": [0.1312, 0.6877, 0.1936, 0.7026]}, {"w": "data,", "b": [0.1994, 0.6877, 0.2396, 0.7026]}, {"w": "learning", "b": [0.2455, 0.6877, 0.3089, 0.7026]}, {"w": "algorithm,", "b": [0.3147, 0.6877, 0.3961, 0.7026]}, {"w": "or", "b": [0.402, 0.6877, 0.4181, 0.7026]}, {"w": "the", "b": [0.4239, 0.6877, 0.4491, 0.7026]}, {"w": "way", "b": [0.4549, 0.6877, 0.4855, 0.7026]}, {"w": "you", "b": [0.4913, 0.6877, 0.5194, 0.7026]}, {"w": "designed", "b": [0.5253, 0.6877, 0.5927, 0.7026]}, {"w": "your", "b": [0.5985, 0.6877, 0.6337, 0.7026]}, {"w": "pipeline.", "b": [0.6396, 0.6877, 0.7064, 0.7026]}, {"w": "Moreover,", "b": [0.7145, 0.6877, 0.793, 0.7026]}, {"w": "the", "b": [0.7989, 0.6877, 0.824, 0.7026]}, {"w": "same", "b": [0.8298, 0.6877, 0.8691, 0.7026]}, {"w": "degradation", "b": [0.1312, 0.7056, 0.2256, 0.7206]}, {"w": "in", "b": [0.2317, 0.7056, 0.247, 0.7206]}, {"w": "performance", "b": [0.2531, 0.7056, 0.3516, 0.7206]}, {"w": "can", "b": [0.3577, 0.7056, 0.3851, 0.7206]}, {"w": "be", "b": [0.3912, 0.7056, 0.41, 0.7206]}, {"w": "explained", "b": [0.4161, 0.7056, 0.4917, 0.7206]}, {"w": "by", "b": [0.4979, 0.7056, 0.5171, 0.7206]}, {"w": "various", "b": [0.5233, 0.7056, 0.5797, 0.7206]}, {"w": "reasons.", "b": [0.5858, 0.7056, 0.649, 0.7206]}, {"w": "The", "b": [0.6572, 0.7056, 0.6886, 0.7206]}, {"w": "results", "b": [0.6947, 0.7056, 0.7467, 0.7206]}, {"w": "of", "b": [0.7529, 0.7056, 0.7676, 0.7206]}, {"w": "the", "b": [0.7737, 0.7056, 0.7991, 0.7206]}, {"w": "learning", "b": [0.8052, 0.7056, 0.8692, 0.7206]}, {"w": "can", "b": [0.1312, 0.7236, 0.1589, 0.7385]}, {"w": "be", "b": [0.1651, 0.7236, 0.1841, 0.7385]}, {"w": "sensitive", "b": [0.1902, 0.7236, 0.2581, 0.7385]}, {"w": "to", "b": [0.2643, 0.7236, 0.2807, 0.7385]}, {"w": "small", "b": [0.2868, 0.7236, 0.329, 0.7385]}, {"w": "changes", "b": [0.3351, 0.7236, 0.3973, 0.7385]}, {"w": "in", "b": [0.4034, 0.7236, 0.4188, 0.7385]}, {"w": "hyperparameters", "b": [0.4249, 0.7236, 0.56, 0.7385]}, {"w": "or", "b": [0.5662, 0.7236, 0.5827, 0.7385]}, {"w": "dataset", "b": [0.5888, 0.7236, 0.6474, 0.7385]}, {"w": "makeup.", "b": [0.6535, 0.7236, 0.7212, 0.7385]}]}, {"id": "b_9", "type": "paragraph", "text": "Because of these challenges, model training is usually an iterative process, where an analyst trains a model, observes its behavior, and makes adjustments based on observations.", "words": [{"w": "Because", "b": [0.1312, 0.7505, 0.1953, 0.7655]}, {"w": "of", "b": [0.2015, 0.7505, 0.2163, 0.7655]}, {"w": "these", "b": [0.2224, 0.7505, 0.2633, 0.7655]}, {"w": "challenges,", "b": [0.2695, 0.7505, 0.3547, 0.7655]}, {"w": "model", "b": [0.3609, 0.7505, 0.4093, 0.7655]}, {"w": "training", "b": [0.4154, 0.7505, 0.4787, 0.7655]}, {"w": "is", "b": [0.4849, 0.7505, 0.4972, 0.7655]}, {"w": "usually", "b": [0.5034, 0.7505, 0.56, 0.7655]}, {"w": "an", "b": [0.5662, 0.7505, 0.5856, 0.7655]}, {"w": "iterative", "b": [0.5917, 0.7505, 0.658, 0.7655]}, {"w": "process,", "b": [0.6642, 0.7505, 0.7272, 0.7655]}, {"w": "where", "b": [0.7333, 0.7505, 0.7803, 0.7655]}, {"w": "an", "b": [0.7864, 0.7505, 0.8058, 0.7655]}, {"w": "analyst", "b": [0.812, 0.7505, 0.8697, 0.7655]}, {"w": "trains", "b": [0.1312, 0.7684, 0.1775, 0.7834]}, {"w": "a", "b": [0.1837, 0.7684, 0.1929, 0.7834]}, {"w": "model,", "b": [0.1991, 0.7684, 0.2529, 0.7834]}, {"w": "observes", "b": [0.259, 0.7684, 0.326, 0.7834]}, {"w": "its", "b": [0.3321, 0.7684, 0.3517, 0.7834]}, {"w": "behavior,", "b": [0.3579, 0.7684, 0.4323, 0.7834]}, {"w": "and", "b": [0.4384, 0.7684, 0.4682, 0.7834]}, {"w": "makes", "b": [0.4743, 0.7684, 0.5236, 0.7834]}, {"w": "adjustments", "b": [0.5298, 0.7684, 0.6274, 0.7834]}, {"w": "based", "b": [0.6336, 0.7684, 0.6788, 0.7834]}, {"w": "on", "b": [0.6849, 0.7684, 0.7044, 0.7834]}, {"w": "observations.", "b": [0.7106, 0.7684, 0.8149, 0.7834]}]}, {"id": "b_10", "type": "paragraph", "text": "5Alexandru Niculescu-Mizil and Rich Caruana, “Predicting Good Probabilities With Supervised Learning”, appearing in Proceedings of the 22nd International Conference on Machine Learning, Bonn, Germany, 2005.", "words": [{"w": "5Alexandru", "b": [0.1518, 0.7955, 0.2295, 0.8093]}, {"w": "Niculescu-Mizil", "b": [0.234, 0.7975, 0.3365, 0.8093]}, {"w": "and", "b": [0.3411, 0.7975, 0.3659, 0.8093]}, {"w": "Rich", "b": [0.3705, 0.7975, 0.401, 0.8093]}, {"w": "Caruana,", "b": [0.4055, 0.7975, 0.467, 0.8093]}, {"w": "“Predicting", "b": [0.4717, 0.7975, 0.5483, 0.8093]}, {"w": "Good", "b": [0.5529, 0.7975, 0.5897, 0.8093]}, {"w": "Probabilities", "b": [0.5943, 0.7975, 0.6791, 0.8093]}, {"w": "With", "b": [0.6837, 0.7975, 0.7183, 0.8093]}, {"w": "Supervised", "b": [0.7229, 0.7975, 0.7955, 0.8093]}, {"w": "Learning”,", "b": [0.8001, 0.7975, 0.8707, 0.8093]}, {"w": "appearing", "b": [0.1312, 0.8116, 0.1982, 0.8236]}, {"w": "in", "b": [0.2034, 0.8116, 0.2164, 0.8236]}, {"w": "Proceedings", "b": [0.2216, 0.8116, 0.3027, 0.8236]}, {"w": "of", "b": [0.3079, 0.8116, 0.3204, 0.8236]}, {"w": "the", "b": [0.3256, 0.8116, 0.3472, 0.8236]}, {"w": "22nd", "b": [0.3524, 0.8116, 0.3853, 0.8236]}, {"w": "International", "b": [0.3905, 0.8116, 0.4786, 0.8236]}, {"w": "Conference", "b": [0.4838, 0.8116, 0.5585, 0.8236]}, {"w": "on", "b": [0.5637, 0.8116, 0.5802, 0.8236]}, {"w": "Machine", "b": [0.5854, 0.8116, 0.6424, 0.8236]}, {"w": "Learning,", "b": [0.6476, 0.8116, 0.7117, 0.8236]}, {"w": "Bonn,", "b": [0.717, 0.8116, 0.7573, 0.8236]}, {"w": "Germany,", "b": [0.7626, 0.8116, 0.8279, 0.8236]}, {"w": "2005.", "b": [0.8331, 0.8116, 0.8685, 0.8236]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 27", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "27", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 203, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "6.6.1 Reasons for Poor Model Behavior", "words": [{"w": "6.6.1", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Reasons", "b": [0.1961, 0.0884, 0.2712, 0.1034]}, {"w": "for", "b": [0.2783, 0.0884, 0.3041, 0.1034]}, {"w": "Poor", "b": [0.3112, 0.0884, 0.3556, 0.1034]}, {"w": "Model", "b": [0.3627, 0.0884, 0.4215, 0.1034]}, {"w": "Behavior", "b": [0.4285, 0.0884, 0.5113, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "If your model does poorly on the training data (underfits it), common reasons are:", "words": [{"w": "If", "b": [0.1312, 0.1247, 0.1435, 0.1396]}, {"w": "your", "b": [0.1497, 0.1247, 0.1856, 0.1396]}, {"w": "model", "b": [0.1918, 0.1247, 0.2405, 0.1396]}, {"w": "does", "b": [0.2466, 0.1247, 0.2821, 0.1396]}, {"w": "poorly", "b": [0.2883, 0.1247, 0.3401, 0.1396]}, {"w": "on", "b": [0.3463, 0.1247, 0.3657, 0.1396]}, {"w": "the", "b": [0.3719, 0.1247, 0.3975, 0.1396]}, {"w": "training", "b": [0.4037, 0.1247, 0.4673, 0.1396]}, {"w": "data", "b": [0.4734, 0.1247, 0.5093, 0.1396]}, {"w": "(underfits", "b": [0.5155, 0.1247, 0.5936, 0.1396]}, {"w": "it),", "b": [0.5998, 0.1247, 0.6244, 0.1396]}, {"w": "common", "b": [0.6305, 0.1247, 0.6982, 0.1396]}, {"w": "reasons", "b": [0.7043, 0.1247, 0.763, 0.1396]}, {"w": "are:", "b": [0.7692, 0.1247, 0.799, 0.1396]}]}, {"id": "b_2", "type": "paragraph", "text": "• the model architecture or learning algorithm are not expressive enough (try more advanced learning algorithm, an ensemble method, or a deeper neural network); • you regularize too much (reduce regularization); • you have chosen suboptimal values for hyperparameters (tune hyperparameters); • the features you engineered don’t have enough predictive power (add more informative features); • you don’t have enough data for the model to generalize (try to get more data, use data augmentation, or transfer learning); or • you have a bug in your code (debug the code that defines and trains the model).", "words": [{"w": "•", "b": [0.1538, 0.1516, 0.1681, 0.1666]}, {"w": "the", "b": [0.1774, 0.1516, 0.2035, 0.1666]}, {"w": "model", "b": [0.2117, 0.1516, 0.2613, 0.1666]}, {"w": "architecture", "b": [0.2695, 0.1516, 0.3674, 0.1666]}, {"w": "or", "b": [0.3756, 0.1516, 0.3923, 0.1666]}, {"w": "learning", "b": [0.4005, 0.1516, 0.4664, 0.1666]}, {"w": "algorithm", "b": [0.4746, 0.1516, 0.5541, 0.1666]}, {"w": "are", "b": [0.5622, 0.1516, 0.5874, 0.1666]}, {"w": "not", "b": [0.5955, 0.1516, 0.6227, 0.1666]}, {"w": "expressive", "b": [0.6309, 0.1516, 0.7133, 0.1666]}, {"w": "enough", "b": [0.7214, 0.1516, 0.78, 0.1666]}, {"w": "(try", "b": [0.7882, 0.1516, 0.8201, 0.1666]}, {"w": "more", "b": [0.8282, 0.1516, 0.8691, 0.1666]}, {"w": "advanced", "b": [0.1774, 0.1695, 0.2517, 0.1845]}, {"w": "learning", "b": [0.2579, 0.1695, 0.3225, 0.1845]}, {"w": "algorithm,", "b": [0.3287, 0.1695, 0.4118, 0.1845]}, {"w": "an", "b": [0.4179, 0.1695, 0.4374, 0.1845]}, {"w": "ensemble", "b": [0.4436, 0.1699, 0.5277, 0.1848]}, {"w": "method,", "b": [0.5347, 0.1695, 0.6103, 0.1848]}, {"w": "or", "b": [0.6164, 0.1695, 0.6329, 0.1845]}, {"w": "a", "b": [0.6391, 0.1695, 0.6483, 0.1845]}, {"w": "deeper", "b": [0.6544, 0.1695, 0.7073, 0.1845]}, {"w": "neural", "b": [0.7134, 0.1699, 0.7717, 0.1848]}, {"w": "network);", "b": [0.7787, 0.1695, 0.8656, 0.1848]}, {"w": "•", "b": [0.1538, 0.1875, 0.1681, 0.2024]}, {"w": "you", "b": [0.1774, 0.1875, 0.2061, 0.2024]}, {"w": "regularize", "b": [0.2122, 0.1875, 0.2903, 0.2024]}, {"w": "too", "b": [0.2964, 0.1875, 0.3226, 0.2024]}, {"w": "much", "b": [0.3287, 0.1875, 0.3718, 0.2024]}, {"w": "(reduce", "b": [0.3779, 0.1875, 0.4375, 0.2024]}, {"w": "regularization);", "b": [0.4435, 0.1875, 0.5838, 0.2028]}, {"w": "•", "b": [0.1538, 0.2054, 0.1681, 0.2204]}, {"w": "you", "b": [0.1774, 0.2054, 0.2061, 0.2204]}, {"w": "have", "b": [0.2122, 0.2054, 0.2486, 0.2204]}, {"w": "chosen", "b": [0.2548, 0.2054, 0.3077, 0.2204]}, {"w": "suboptimal", "b": [0.3138, 0.2054, 0.4037, 0.2204]}, {"w": "values", "b": [0.4098, 0.2054, 0.4587, 0.2204]}, {"w": "for", "b": [0.4648, 0.2054, 0.4869, 0.2204]}, {"w": "hyperparameters", "b": [0.493, 0.2054, 0.6282, 0.2204]}, {"w": "(tune", "b": [0.6343, 0.2054, 0.6828, 0.2207]}, {"w": "hyperparameters);", "b": [0.6899, 0.2054, 0.8591, 0.2207]}, {"w": "•", "b": [0.1538, 0.2234, 0.1681, 0.2383]}, {"w": "the", "b": [0.1774, 0.2234, 0.2025, 0.2383]}, {"w": "features", "b": [0.2067, 0.2234, 0.2687, 0.2383]}, {"w": "you", "b": [0.2729, 0.2234, 0.301, 0.2383]}, {"w": "engineered", "b": [0.3052, 0.2234, 0.3887, 0.2383]}, {"w": "don’t", "b": [0.3929, 0.2234, 0.4341, 0.2383]}, {"w": "have", "b": [0.4383, 0.2234, 0.474, 0.2383]}, {"w": "enough", "b": [0.4782, 0.2234, 0.5344, 0.2383]}, {"w": "predictive", "b": [0.5386, 0.2237, 0.6304, 0.2386]}, {"w": "power", "b": [0.6353, 0.2237, 0.6909, 0.2386]}, {"w": "(add", "b": [0.695, 0.2234, 0.7312, 0.2383]}, {"w": "more", "b": [0.7354, 0.2234, 0.7746, 0.2383]}, {"w": "informative", "b": [0.7789, 0.2234, 0.8688, 0.2383]}, {"w": "features);", "b": [0.1774, 0.2413, 0.2529, 0.2563]}, {"w": "•", "b": [0.1538, 0.2593, 0.1681, 0.2742]}, {"w": "you", "b": [0.1774, 0.2593, 0.2055, 0.2742]}, {"w": "don’t", "b": [0.2112, 0.2593, 0.2524, 0.2742]}, {"w": "have", "b": [0.258, 0.2593, 0.2937, 0.2742]}, {"w": "enough", "b": [0.2994, 0.2593, 0.3557, 0.2742]}, {"w": "data", "b": [0.3613, 0.2593, 0.3965, 0.2742]}, {"w": "for", "b": [0.4022, 0.2593, 0.4238, 0.2742]}, {"w": "the", "b": [0.4295, 0.2593, 0.4547, 0.2742]}, {"w": "model", "b": [0.4603, 0.2593, 0.5081, 0.2742]}, {"w": "to", "b": [0.5138, 0.2593, 0.5298, 0.2742]}, {"w": "generalize", "b": [0.5355, 0.2593, 0.613, 0.2742]}, {"w": "(try", "b": [0.6186, 0.2593, 0.6493, 0.2742]}, {"w": "to", "b": [0.655, 0.2593, 0.6711, 0.2742]}, {"w": "get", "b": [0.6768, 0.2593, 0.7009, 0.2742]}, {"w": "more", "b": [0.7066, 0.2593, 0.7458, 0.2742]}, {"w": "data,", "b": [0.7515, 0.2593, 0.7917, 0.2742]}, {"w": "use", "b": [0.7975, 0.2593, 0.8227, 0.2742]}, {"w": "data", "b": [0.8281, 0.2596, 0.8688, 0.2745]}, {"w": "augmentation,", "b": [0.1774, 0.2772, 0.309, 0.2925]}, {"w": "or", "b": [0.3151, 0.2772, 0.3316, 0.2922]}, {"w": "transfer", "b": [0.3377, 0.2775, 0.4101, 0.2925]}, {"w": "learning);", "b": [0.4172, 0.2772, 0.5044, 0.2925]}, {"w": "or", "b": [0.5106, 0.2772, 0.527, 0.2922]}, {"w": "•", "b": [0.1538, 0.2952, 0.1681, 0.3101]}, {"w": "you", "b": [0.1774, 0.2952, 0.2061, 0.3101]}, {"w": "have", "b": [0.2122, 0.2952, 0.2486, 0.3101]}, {"w": "a", "b": [0.2548, 0.2952, 0.264, 0.3101]}, {"w": "bug", "b": [0.2702, 0.2952, 0.2999, 0.3101]}, {"w": "in", "b": [0.306, 0.2952, 0.3214, 0.3101]}, {"w": "your", "b": [0.3276, 0.2952, 0.3635, 0.3101]}, {"w": "code", "b": [0.3697, 0.2952, 0.4061, 0.3101]}, {"w": "(debug", "b": [0.4122, 0.2952, 0.4676, 0.3101]}, {"w": "the", "b": [0.4738, 0.2952, 0.4994, 0.3101]}, {"w": "code", "b": [0.5056, 0.2952, 0.542, 0.3101]}, {"w": "that", "b": [0.5481, 0.2952, 0.5819, 0.3101]}, {"w": "defines", "b": [0.5881, 0.2952, 0.6426, 0.3101]}, {"w": "and", "b": [0.6487, 0.2952, 0.6785, 0.3101]}, {"w": "trains", "b": [0.6846, 0.2952, 0.7309, 0.3101]}, {"w": "the", "b": [0.7371, 0.2952, 0.7627, 0.3101]}, {"w": "model).", "b": [0.7689, 0.2952, 0.8299, 0.3101]}]}, {"id": "b_3", "type": "paragraph", "text": "If your model does well on the training data, but poorly on the holdout data (overfits the training data), common reasons are:", "words": [{"w": "If", "b": [0.1312, 0.3221, 0.1438, 0.337]}, {"w": "your", "b": [0.15, 0.3221, 0.1866, 0.337]}, {"w": "model", "b": [0.1928, 0.3221, 0.2425, 0.337]}, {"w": "does", "b": [0.2487, 0.3221, 0.2848, 0.337]}, {"w": "well", "b": [0.291, 0.3221, 0.3229, 0.337]}, {"w": "on", "b": [0.3291, 0.3221, 0.349, 0.337]}, {"w": "the", "b": [0.3552, 0.3221, 0.3813, 0.337]}, {"w": "training", "b": [0.3875, 0.3221, 0.4524, 0.337]}, {"w": "data,", "b": [0.4586, 0.3221, 0.5004, 0.337]}, {"w": "but", "b": [0.5066, 0.3221, 0.5348, 0.337]}, {"w": "poorly", "b": [0.541, 0.3221, 0.5939, 0.337]}, {"w": "on", "b": [0.6, 0.3221, 0.6199, 0.337]}, {"w": "the", "b": [0.6261, 0.3221, 0.6522, 0.337]}, {"w": "holdout", "b": [0.6584, 0.3221, 0.7212, 0.337]}, {"w": "data", "b": [0.7274, 0.3221, 0.764, 0.337]}, {"w": "(overfits", "b": [0.7701, 0.3221, 0.8367, 0.337]}, {"w": "the", "b": [0.8429, 0.3221, 0.8691, 0.337]}, {"w": "training", "b": [0.1312, 0.34, 0.1949, 0.355]}, {"w": "data),", "b": [0.201, 0.34, 0.2492, 0.355]}, {"w": "common", "b": [0.2553, 0.34, 0.323, 0.355]}, {"w": "reasons", "b": [0.3292, 0.34, 0.3879, 0.355]}, {"w": "are:", "b": [0.394, 0.34, 0.4238, 0.355]}]}, {"id": "b_4", "type": "paragraph", "text": "• you don’t have enough data for generalization (add more data or use data augmentation); • your model is under-regularized (add regularization or, for neural networks, both regularization and batch normalization); • your training data distribution is different from the holdout data distribution (reduce the distribution shift); • you have chosen suboptimal values for hyperparameters (tune hyperparameters); or • your features have low predictive power (add features with high predictive power).", "words": [{"w": "•", "b": [0.1538, 0.367, 0.1681, 0.3819]}, {"w": "you", "b": [0.1774, 0.367, 0.2055, 0.3819]}, {"w": "don’t", "b": [0.21, 0.367, 0.2513, 0.3819]}, {"w": "have", "b": [0.2558, 0.367, 0.2915, 0.3819]}, {"w": "enough", "b": [0.2961, 0.367, 0.3523, 0.3819]}, {"w": "data", "b": [0.3569, 0.367, 0.3921, 0.3819]}, {"w": "for", "b": [0.3966, 0.367, 0.4183, 0.3819]}, {"w": "generalization", "b": [0.4229, 0.367, 0.5325, 0.3819]}, {"w": "(add", "b": [0.537, 0.367, 0.5732, 0.3819]}, {"w": "more", "b": [0.5778, 0.367, 0.617, 0.3819]}, {"w": "data", "b": [0.6216, 0.367, 0.6567, 0.3819]}, {"w": "or", "b": [0.6613, 0.367, 0.6774, 0.3819]}, {"w": "use", "b": [0.682, 0.367, 0.7072, 0.3819]}, {"w": "data", "b": [0.7118, 0.367, 0.747, 0.3819]}, {"w": "augmentation);", "b": [0.7516, 0.367, 0.8716, 0.3819]}, {"w": "•", "b": [0.1538, 0.3849, 0.1681, 0.3999]}, {"w": "your", "b": [0.1774, 0.3849, 0.214, 0.3999]}, {"w": "model", "b": [0.2225, 0.3849, 0.2722, 0.3999]}, {"w": "is", "b": [0.2807, 0.3849, 0.2934, 0.3999]}, {"w": "under-regularized", "b": [0.3019, 0.3849, 0.4454, 0.3999]}, {"w": "(add", "b": [0.4539, 0.3849, 0.4916, 0.3999]}, {"w": "regularization", "b": [0.5001, 0.3849, 0.6132, 0.3999]}, {"w": "or,", "b": [0.6217, 0.3849, 0.6437, 0.3999]}, {"w": "for", "b": [0.6528, 0.3849, 0.6754, 0.3999]}, {"w": "neural", "b": [0.6839, 0.3849, 0.7352, 0.3999]}, {"w": "networks,", "b": [0.7437, 0.3849, 0.8218, 0.3999]}, {"w": "both", "b": [0.8309, 0.3849, 0.8691, 0.3999]}, {"w": "regularization", "b": [0.1774, 0.4029, 0.2882, 0.4178]}, {"w": "and", "b": [0.2944, 0.4029, 0.3241, 0.4178]}, {"w": "batch", "b": [0.3302, 0.4032, 0.3812, 0.4181]}, {"w": "normalization);", "b": [0.3882, 0.4029, 0.5278, 0.4181]}, {"w": "•", "b": [0.1538, 0.4208, 0.1681, 0.4358]}, {"w": "your", "b": [0.1774, 0.4208, 0.2133, 0.4358]}, {"w": "training", "b": [0.2195, 0.4208, 0.2832, 0.4358]}, {"w": "data", "b": [0.2893, 0.4208, 0.3252, 0.4358]}, {"w": "distribution", "b": [0.3313, 0.4208, 0.426, 0.4358]}, {"w": "is", "b": [0.4321, 0.4208, 0.4445, 0.4358]}, {"w": "different", "b": [0.4506, 0.4208, 0.5174, 0.4358]}, {"w": "from", "b": [0.5236, 0.4208, 0.5611, 0.4358]}, {"w": "the", "b": [0.5672, 0.4208, 0.5929, 0.4358]}, {"w": "holdout", "b": [0.599, 0.4208, 0.6606, 0.4358]}, {"w": "data", "b": [0.6667, 0.4208, 0.7026, 0.4358]}, {"w": "distribution", "b": [0.7088, 0.4208, 0.8034, 0.4358]}, {"w": "(reduce", "b": [0.8095, 0.4208, 0.8691, 0.4358]}, {"w": "the", "b": [0.1774, 0.4387, 0.203, 0.4537]}, {"w": "distribution", "b": [0.2091, 0.4391, 0.3182, 0.454]}, {"w": "shift);", "b": [0.3253, 0.4387, 0.3783, 0.454]}, {"w": "•", "b": [0.1538, 0.4567, 0.1681, 0.4716]}, {"w": "you", "b": [0.1774, 0.4567, 0.2061, 0.4716]}, {"w": "have", "b": [0.2122, 0.4567, 0.2486, 0.4716]}, {"w": "chosen", "b": [0.2548, 0.4567, 0.3077, 0.4716]}, {"w": "suboptimal", "b": [0.3138, 0.4567, 0.4037, 0.4716]}, {"w": "values", "b": [0.4098, 0.4567, 0.4587, 0.4716]}, {"w": "for", "b": [0.4648, 0.4567, 0.4869, 0.4716]}, {"w": "hyperparameters", "b": [0.493, 0.4567, 0.6282, 0.4716]}, {"w": "(tune", "b": [0.6343, 0.4567, 0.6774, 0.4716]}, {"w": "hyperparameters);", "b": [0.6835, 0.4567, 0.831, 0.4716]}, {"w": "or", "b": [0.8371, 0.4567, 0.8536, 0.4716]}, {"w": "•", "b": [0.1538, 0.4746, 0.1681, 0.4896]}, {"w": "your", "b": [0.1774, 0.4746, 0.2133, 0.4896]}, {"w": "features", "b": [0.2194, 0.4746, 0.2827, 0.4896]}, {"w": "have", "b": [0.2888, 0.4746, 0.3252, 0.4896]}, {"w": "low", "b": [0.3314, 0.4746, 0.3585, 0.4896]}, {"w": "predictive", "b": [0.3647, 0.4746, 0.4437, 0.4896]}, {"w": "power", "b": [0.4499, 0.4746, 0.4976, 0.4896]}, {"w": "(add", "b": [0.5038, 0.4746, 0.5407, 0.4896]}, {"w": "features", "b": [0.5468, 0.4746, 0.6101, 0.4896]}, {"w": "with", "b": [0.6162, 0.4746, 0.6521, 0.4896]}, {"w": "high", "b": [0.6583, 0.4746, 0.6931, 0.4896]}, {"w": "predictive", "b": [0.6993, 0.4746, 0.7783, 0.4896]}, {"w": "power).", "b": [0.7844, 0.4746, 0.8445, 0.4896]}]}, {"id": "b_5", "type": "paragraph", "text": "6.6.2 Iterative Model Refinement", "words": [{"w": "6.6.2", "b": [0.1312, 0.5228, 0.1749, 0.5378]}, {"w": "Iterative", "b": [0.1961, 0.5228, 0.2756, 0.5378]}, {"w": "Model", "b": [0.2827, 0.5228, 0.3415, 0.5378]}, {"w": "Refinement", "b": [0.3485, 0.5228, 0.4543, 0.5378]}]}, {"id": "b_6", "type": "paragraph", "text": "If you have access to new labeled data (for example, you can label examples yourself, or easily request the help of a labeler) then, you can refine the model using a simple iterative process:", "words": [{"w": "If", "b": [0.1312, 0.5591, 0.1433, 0.574]}, {"w": "you", "b": [0.1488, 0.5591, 0.1769, 0.574]}, {"w": "have", "b": [0.1823, 0.5591, 0.218, 0.574]}, {"w": "access", "b": [0.2235, 0.5591, 0.2709, 0.574]}, {"w": "to", "b": [0.2764, 0.5591, 0.2925, 0.574]}, {"w": "new", "b": [0.2979, 0.5591, 0.3291, 0.574]}, {"w": "labeled", "b": [0.3345, 0.5591, 0.3903, 0.574]}, {"w": "data", "b": [0.3958, 0.5591, 0.431, 0.574]}, {"w": "(for", "b": [0.4364, 0.5591, 0.4651, 0.574]}, {"w": "example,", "b": [0.4706, 0.5591, 0.5404, 0.574]}, {"w": "you", "b": [0.546, 0.5591, 0.5742, 0.574]}, {"w": "can", "b": [0.5796, 0.5591, 0.6068, 0.574]}, {"w": "label", "b": [0.6122, 0.5591, 0.6499, 0.574]}, {"w": "examples", "b": [0.6554, 0.5591, 0.7273, 0.574]}, {"w": "yourself,", "b": [0.7328, 0.5591, 0.7988, 0.574]}, {"w": "or", "b": [0.8044, 0.5591, 0.8205, 0.574]}, {"w": "easily", "b": [0.826, 0.5591, 0.8698, 0.574]}, {"w": "request", "b": [0.1312, 0.577, 0.1885, 0.592]}, {"w": "the", "b": [0.1947, 0.577, 0.22, 0.592]}, {"w": "help", "b": [0.2261, 0.577, 0.2595, 0.592]}, {"w": "of", "b": [0.2656, 0.577, 0.2803, 0.592]}, {"w": "a", "b": [0.2864, 0.577, 0.2955, 0.592]}, {"w": "labeler)", "b": [0.3016, 0.577, 0.3618, 0.592]}, {"w": "then,", "b": [0.368, 0.577, 0.4084, 0.592]}, {"w": "you", "b": [0.4146, 0.577, 0.4428, 0.592]}, {"w": "can", "b": [0.449, 0.577, 0.4763, 0.592]}, {"w": "refine", "b": [0.4824, 0.577, 0.526, 0.592]}, {"w": "the", "b": [0.5321, 0.577, 0.5574, 0.592]}, {"w": "model", "b": [0.5635, 0.577, 0.6115, 0.592]}, {"w": "using", "b": [0.6177, 0.577, 0.6592, 0.592]}, {"w": "a", "b": [0.6654, 0.577, 0.6745, 0.592]}, {"w": "simple", "b": [0.6806, 0.577, 0.7312, 0.592]}, {"w": "iterative", "b": [0.7374, 0.577, 0.8032, 0.592]}, {"w": "process:", "b": [0.8093, 0.577, 0.8717, 0.592]}]}, {"id": "b_7", "type": "paragraph", "text": "1. Train the model using the best values of hyperparameters identified so far. 2. Test the model by applying it to a small subset of the validation set (100−300 examples). 3. Find the most frequent error patterns on that small validation set. Remove those examples from the validation set, because your model will now overfit to them. 4. Generate new features, or add more training data to fix the observed error patterns. 5. Repeat until no frequent error patterns are observed (most errors look dissimilar).", "words": [{"w": "1.", "b": [0.1538, 0.6039, 0.1681, 0.6189]}, {"w": "Train", "b": [0.1774, 0.6039, 0.221, 0.6189]}, {"w": "the", "b": [0.2271, 0.6039, 0.2528, 0.6189]}, {"w": "model", "b": [0.2589, 0.6039, 0.3076, 0.6189]}, {"w": "using", "b": [0.3138, 0.6039, 0.3559, 0.6189]}, {"w": "the", "b": [0.3621, 0.6039, 0.3877, 0.6189]}, {"w": "best", "b": [0.3939, 0.6039, 0.4273, 0.6189]}, {"w": "values", "b": [0.4335, 0.6039, 0.4823, 0.6189]}, {"w": "of", "b": [0.4884, 0.6039, 0.5033, 0.6189]}, {"w": "hyperparameters", "b": [0.5094, 0.6039, 0.6446, 0.6189]}, {"w": "identified", "b": [0.6507, 0.6039, 0.7251, 0.6189]}, {"w": "so", "b": [0.7312, 0.6039, 0.7477, 0.6189]}, {"w": "far.", "b": [0.7539, 0.6039, 0.7811, 0.6189]}, {"w": "2.", "b": [0.1538, 0.6219, 0.1681, 0.6368]}, {"w": "Test", "b": [0.1774, 0.6219, 0.2111, 0.6368]}, {"w": "the", "b": [0.2159, 0.6219, 0.241, 0.6368]}, {"w": "model", "b": [0.2458, 0.6219, 0.2935, 0.6368]}, {"w": "by", "b": [0.2983, 0.6219, 0.3174, 0.6368]}, {"w": "applying", "b": [0.3222, 0.6219, 0.39, 0.6368]}, {"w": "it", "b": [0.3948, 0.6219, 0.4068, 0.6368]}, {"w": "to", "b": [0.4116, 0.6219, 0.4277, 0.6368]}, {"w": "a", "b": [0.4325, 0.6219, 0.4415, 0.6368]}, {"w": "small", "b": [0.4463, 0.6219, 0.4876, 0.6368]}, {"w": "subset", "b": [0.4924, 0.6219, 0.5418, 0.6368]}, {"w": "of", "b": [0.5466, 0.6219, 0.5612, 0.6368]}, {"w": "the", "b": [0.5659, 0.6219, 0.5911, 0.6368]}, {"w": "validation", "b": [0.5959, 0.6219, 0.6737, 0.6368]}, {"w": "set", "b": [0.6785, 0.6219, 0.7007, 0.6368]}, {"w": "(100−300", "b": [0.7055, 0.6219, 0.7836, 0.6369]}, {"w": "examples).", "b": [0.7884, 0.6219, 0.8724, 0.6368]}, {"w": "3.", "b": [0.1538, 0.6398, 0.1681, 0.6548]}, {"w": "Find", "b": [0.1774, 0.6398, 0.2158, 0.6548]}, {"w": "the", "b": [0.2235, 0.6398, 0.2496, 0.6548]}, {"w": "most", "b": [0.2573, 0.6398, 0.2972, 0.6548]}, {"w": "frequent", "b": [0.3048, 0.6398, 0.3724, 0.6548]}, {"w": "error", "b": [0.3801, 0.6398, 0.42, 0.6548]}, {"w": "patterns", "b": [0.4277, 0.6398, 0.4958, 0.6548]}, {"w": "on", "b": [0.5035, 0.6398, 0.5234, 0.6548]}, {"w": "that", "b": [0.531, 0.6398, 0.5656, 0.6548]}, {"w": "small", "b": [0.5732, 0.6398, 0.6162, 0.6548]}, {"w": "validation", "b": [0.6239, 0.6398, 0.705, 0.6548]}, {"w": "set.", "b": [0.7126, 0.6398, 0.741, 0.6548]}, {"w": "Remove", "b": [0.7538, 0.6398, 0.8184, 0.6548]}, {"w": "those", "b": [0.8261, 0.6398, 0.8691, 0.6548]}, {"w": "examples", "b": [0.1774, 0.6578, 0.2508, 0.6727]}, {"w": "from", "b": [0.2569, 0.6578, 0.2944, 0.6727]}, {"w": "the", "b": [0.3005, 0.6578, 0.3262, 0.6727]}, {"w": "validation", "b": [0.3323, 0.6578, 0.4118, 0.6727]}, {"w": "set,", "b": [0.418, 0.6578, 0.4458, 0.6727]}, {"w": "because", "b": [0.4519, 0.6578, 0.5141, 0.6727]}, {"w": "your", "b": [0.5202, 0.6578, 0.5562, 0.6727]}, {"w": "model", "b": [0.5623, 0.6578, 0.611, 0.6727]}, {"w": "will", "b": [0.6172, 0.6578, 0.6459, 0.6727]}, {"w": "now", "b": [0.652, 0.6578, 0.6843, 0.6727]}, {"w": "overfit", "b": [0.6905, 0.6578, 0.7413, 0.6727]}, {"w": "to", "b": [0.7474, 0.6578, 0.7638, 0.6727]}, {"w": "them.", "b": [0.77, 0.6578, 0.8161, 0.6727]}, {"w": "4.", "b": [0.1538, 0.6757, 0.1681, 0.6907]}, {"w": "Generate", "b": [0.1774, 0.6757, 0.2504, 0.6907]}, {"w": "new", "b": [0.2565, 0.6757, 0.2883, 0.6907]}, {"w": "features,", "b": [0.2944, 0.6757, 0.3628, 0.6907]}, {"w": "or", "b": [0.369, 0.6757, 0.3854, 0.6907]}, {"w": "add", "b": [0.3916, 0.6757, 0.4213, 0.6907]}, {"w": "more", "b": [0.4275, 0.6757, 0.4675, 0.6907]}, {"w": "training", "b": [0.4736, 0.6757, 0.5373, 0.6907]}, {"w": "data", "b": [0.5434, 0.6757, 0.5793, 0.6907]}, {"w": "to", "b": [0.5855, 0.6757, 0.6019, 0.6907]}, {"w": "fix", "b": [0.608, 0.6757, 0.628, 0.6907]}, {"w": "the", "b": [0.6341, 0.6757, 0.6598, 0.6907]}, {"w": "observed", "b": [0.6659, 0.6757, 0.7358, 0.6907]}, {"w": "error", "b": [0.742, 0.6757, 0.7811, 0.6907]}, {"w": "patterns.", "b": [0.7873, 0.6757, 0.8592, 0.6907]}, {"w": "5.", "b": [0.1538, 0.6937, 0.1681, 0.7086]}, {"w": "Repeat", "b": [0.1774, 0.6937, 0.2345, 0.7086]}, {"w": "until", "b": [0.2407, 0.6937, 0.2781, 0.7086]}, {"w": "no", "b": [0.2843, 0.6937, 0.3037, 0.7086]}, {"w": "frequent", "b": [0.3099, 0.6937, 0.3761, 0.7086]}, {"w": "error", "b": [0.3823, 0.6937, 0.4214, 0.7086]}, {"w": "patterns", "b": [0.4275, 0.6937, 0.4944, 0.7086]}, {"w": "are", "b": [0.5005, 0.6937, 0.5252, 0.7086]}, {"w": "observed", "b": [0.5313, 0.6937, 0.6012, 0.7086]}, {"w": "(most", "b": [0.6074, 0.6937, 0.6536, 0.7086]}, {"w": "errors", "b": [0.6598, 0.6937, 0.7062, 0.7086]}, {"w": "look", "b": [0.7123, 0.6937, 0.7462, 0.7086]}, {"w": "dissimilar).", "b": [0.7523, 0.6937, 0.8418, 0.7086]}]}, {"id": "b_8", "type": "paragraph", "text": "Iterative model refinement is a simplified version of error analysis. A more principled approach is described below.", "words": [{"w": "Iterative", "b": [0.1312, 0.7206, 0.2009, 0.7355]}, {"w": "model", "b": [0.2084, 0.7206, 0.2581, 0.7355]}, {"w": "refinement", "b": [0.2656, 0.7206, 0.352, 0.7355]}, {"w": "is", "b": [0.3596, 0.7206, 0.3722, 0.7355]}, {"w": "a", "b": [0.3798, 0.7206, 0.3892, 0.7355]}, {"w": "simplified", "b": [0.3967, 0.7206, 0.4753, 0.7355]}, {"w": "version", "b": [0.4829, 0.7206, 0.5406, 0.7355]}, {"w": "of", "b": [0.5481, 0.7206, 0.5633, 0.7355]}, {"w": "error", "b": [0.5721, 0.7209, 0.6187, 0.7359]}, {"w": "analysis.", "b": [0.6274, 0.7206, 0.7047, 0.7359]}, {"w": "A", "b": [0.7171, 0.7206, 0.7312, 0.7355]}, {"w": "more", "b": [0.7388, 0.7206, 0.7796, 0.7355]}, {"w": "principled", "b": [0.7872, 0.7206, 0.8689, 0.7355]}, {"w": "approach", "b": [0.1312, 0.7385, 0.2046, 0.7535]}, {"w": "is", "b": [0.2107, 0.7385, 0.2232, 0.7535]}, {"w": "described", "b": [0.2293, 0.7385, 0.3049, 0.7535]}, {"w": "below.", "b": [0.311, 0.7385, 0.3623, 0.7535]}]}, {"id": "b_9", "type": "paragraph", "text": "6.6.3 Error Analysis", "words": [{"w": "6.6.3", "b": [0.1312, 0.7867, 0.1749, 0.8016]}, {"w": "Error", "b": [0.1961, 0.7867, 0.2469, 0.8016]}, {"w": "Analysis", "b": [0.2539, 0.7867, 0.3318, 0.8016]}]}, {"id": "b_10", "type": "paragraph", "text": "Errors can be:", "words": [{"w": "Errors", "b": [0.1312, 0.823, 0.182, 0.8379]}, {"w": "can", "b": [0.1881, 0.823, 0.2158, 0.8379]}, {"w": "be:", "b": [0.222, 0.823, 0.2461, 0.8379]}]}, {"id": "b_11", "type": "paragraph", "text": "• uniform, and appear with the same rate in all use cases, or", "words": [{"w": "•", "b": [0.1538, 0.8499, 0.1681, 0.8648]}, {"w": "uniform,", "b": [0.1774, 0.8499, 0.2456, 0.8648]}, {"w": "and", "b": [0.2517, 0.8499, 0.2815, 0.8648]}, {"w": "appear", "b": [0.2876, 0.8499, 0.3426, 0.8648]}, {"w": "with", "b": [0.3487, 0.8499, 0.3846, 0.8648]}, {"w": "the", "b": [0.3907, 0.8499, 0.4164, 0.8648]}, {"w": "same", "b": [0.4225, 0.8499, 0.4626, 0.8648]}, {"w": "rate", "b": [0.4688, 0.8499, 0.5006, 0.8648]}, {"w": "in", "b": [0.5068, 0.8499, 0.5221, 0.8648]}, {"w": "all", "b": [0.5283, 0.8499, 0.5478, 0.8648]}, {"w": "use", "b": [0.5539, 0.8499, 0.5797, 0.8648]}, {"w": "cases,", "b": [0.5858, 0.8499, 0.6312, 0.8648]}, {"w": "or", "b": [0.6373, 0.8499, 0.6538, 0.8648]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 28", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "28", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 204, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• focused, and appear more frequently in certain types of use cases.", "words": [{"w": "•", "b": [0.1538, 0.0881, 0.1681, 0.1031]}, {"w": "focused,", "b": [0.1774, 0.0881, 0.2421, 0.1031]}, {"w": "and", "b": [0.2482, 0.0881, 0.278, 0.1031]}, {"w": "appear", "b": [0.2841, 0.0881, 0.339, 0.1031]}, {"w": "more", "b": [0.3452, 0.0881, 0.3852, 0.1031]}, {"w": "frequently", "b": [0.3914, 0.0881, 0.4725, 0.1031]}, {"w": "in", "b": [0.4786, 0.0881, 0.494, 0.1031]}, {"w": "certain", "b": [0.5001, 0.0881, 0.5556, 0.1031]}, {"w": "types", "b": [0.5617, 0.0881, 0.6044, 0.1031]}, {"w": "of", "b": [0.6105, 0.0881, 0.6254, 0.1031]}, {"w": "use", "b": [0.6316, 0.0881, 0.6573, 0.1031]}, {"w": "cases.", "b": [0.6635, 0.0881, 0.7088, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "Focused errors following a specific pattern are those that merit special attention. By fixing an error pattern, you fix it once for many examples. Focused errors, or error trends, usually happen when some use cases aren’t well-represented in the training data. For example, a face detection system developed by a major web camera provider worked better for white users than for black users. In another case, a human presence detection system equipped with a night vision system worked better during the day than at night, simply because the night training examples were less frequent in the training data.", "words": [{"w": "Focused", "b": [0.1312, 0.1153, 0.2051, 0.1303]}, {"w": "errors", "b": [0.2117, 0.1153, 0.2667, 0.1303]}, {"w": "following", "b": [0.2723, 0.115, 0.3427, 0.13]}, {"w": "a", "b": [0.3484, 0.115, 0.3574, 0.13]}, {"w": "specific", "b": [0.3632, 0.115, 0.4201, 0.13]}, {"w": "pattern", "b": [0.4258, 0.115, 0.4842, 0.13]}, {"w": "are", "b": [0.4899, 0.115, 0.5141, 0.13]}, {"w": "those", "b": [0.5198, 0.115, 0.5611, 0.13]}, {"w": "that", "b": [0.5668, 0.115, 0.6, 0.13]}, {"w": "merit", "b": [0.6057, 0.115, 0.648, 0.13]}, {"w": "special", "b": [0.6537, 0.115, 0.7066, 0.13]}, {"w": "attention.", "b": [0.7123, 0.115, 0.7892, 0.13]}, {"w": "By", "b": [0.7973, 0.115, 0.8196, 0.13]}, {"w": "fixing", "b": [0.8253, 0.115, 0.869, 0.13]}, {"w": "an", "b": [0.1312, 0.133, 0.1506, 0.1479]}, {"w": "error", "b": [0.1567, 0.133, 0.1956, 0.1479]}, {"w": "pattern,", "b": [0.2017, 0.133, 0.2659, 0.1479]}, {"w": "you", "b": [0.272, 0.133, 0.3005, 0.1479]}, {"w": "fix", "b": [0.3067, 0.133, 0.3265, 0.1479]}, {"w": "it", "b": [0.3327, 0.133, 0.3449, 0.1479]}, {"w": "once", "b": [0.351, 0.133, 0.3867, 0.1479]}, {"w": "for", "b": [0.3928, 0.133, 0.4148, 0.1479]}, {"w": "many", "b": [0.4209, 0.133, 0.4647, 0.1479]}, {"w": "examples.", "b": [0.4708, 0.133, 0.5488, 0.1479]}, {"w": "Focused", "b": [0.557, 0.133, 0.621, 0.1479]}, {"w": "errors,", "b": [0.6271, 0.133, 0.6783, 0.1479]}, {"w": "or", "b": [0.6844, 0.133, 0.7008, 0.1479]}, {"w": "error", "b": [0.7069, 0.133, 0.7458, 0.1479]}, {"w": "trends,", "b": [0.7519, 0.133, 0.8071, 0.1479]}, {"w": "usually", "b": [0.8132, 0.133, 0.8698, 0.1479]}, {"w": "happen", "b": [0.1312, 0.1509, 0.1914, 0.1659]}, {"w": "when", "b": [0.1979, 0.1509, 0.2408, 0.1659]}, {"w": "some", "b": [0.2474, 0.1509, 0.2883, 0.1659]}, {"w": "use", "b": [0.2948, 0.1509, 0.3211, 0.1659]}, {"w": "cases", "b": [0.3277, 0.1509, 0.3687, 0.1659]}, {"w": "aren’t", "b": [0.3752, 0.1509, 0.4234, 0.1659]}, {"w": "well-represented", "b": [0.43, 0.1509, 0.562, 0.1659]}, {"w": "in", "b": [0.5686, 0.1509, 0.5843, 0.1659]}, {"w": "the", "b": [0.5908, 0.1509, 0.617, 0.1659]}, {"w": "training", "b": [0.6236, 0.1509, 0.6885, 0.1659]}, {"w": "data.", "b": [0.695, 0.1509, 0.7368, 0.1659]}, {"w": "For", "b": [0.7463, 0.1509, 0.7738, 0.1659]}, {"w": "example,", "b": [0.7804, 0.1509, 0.8531, 0.1659]}, {"w": "a", "b": [0.8597, 0.1509, 0.8691, 0.1659]}, {"w": "face", "b": [0.1312, 0.1689, 0.1631, 0.1838]}, {"w": "detection", "b": [0.1695, 0.1689, 0.2448, 0.1838]}, {"w": "system", "b": [0.2511, 0.1689, 0.3072, 0.1838]}, {"w": "developed", "b": [0.3135, 0.1689, 0.3946, 0.1838]}, {"w": "by", "b": [0.4009, 0.1689, 0.4208, 0.1838]}, {"w": "a", "b": [0.4271, 0.1689, 0.4365, 0.1838]}, {"w": "major", "b": [0.4428, 0.1689, 0.491, 0.1838]}, {"w": "web", "b": [0.4973, 0.1689, 0.5292, 0.1838]}, {"w": "camera", "b": [0.5355, 0.1689, 0.5941, 0.1838]}, {"w": "provider", "b": [0.6004, 0.1689, 0.6685, 0.1838]}, {"w": "worked", "b": [0.6748, 0.1689, 0.7329, 0.1838]}, {"w": "better", "b": [0.7393, 0.1689, 0.789, 0.1838]}, {"w": "for", "b": [0.7953, 0.1689, 0.8178, 0.1838]}, {"w": "white", "b": [0.8241, 0.1689, 0.8691, 0.1838]}, {"w": "users", "b": [0.1312, 0.1868, 0.1723, 0.2018]}, {"w": "than", "b": [0.1789, 0.1868, 0.2165, 0.2018]}, {"w": "for", "b": [0.2231, 0.1868, 0.2456, 0.2018]}, {"w": "black", "b": [0.2522, 0.1868, 0.2951, 0.2018]}, {"w": "users.", "b": [0.3016, 0.1868, 0.3479, 0.2018]}, {"w": "In", "b": [0.3574, 0.1868, 0.3746, 0.2018]}, {"w": "another", "b": [0.3812, 0.1868, 0.444, 0.2018]}, {"w": "case,", "b": [0.4506, 0.1868, 0.4894, 0.2018]}, {"w": "a", "b": [0.496, 0.1868, 0.5055, 0.2018]}, {"w": "human", "b": [0.512, 0.1868, 0.568, 0.2018]}, {"w": "presence", "b": [0.5745, 0.1868, 0.6437, 0.2018]}, {"w": "detection", "b": [0.6503, 0.1868, 0.7256, 0.2018]}, {"w": "system", "b": [0.7322, 0.1868, 0.7884, 0.2018]}, {"w": "equipped", "b": [0.7949, 0.1868, 0.8692, 0.2018]}, {"w": "with", "b": [0.1306, 0.2048, 0.1667, 0.2197]}, {"w": "a", "b": [0.1729, 0.2048, 0.1822, 0.2197]}, {"w": "night", "b": [0.1883, 0.2048, 0.2301, 0.2197]}, {"w": "vision", "b": [0.2363, 0.2048, 0.2834, 0.2197]}, {"w": "system", "b": [0.2896, 0.2048, 0.345, 0.2197]}, {"w": "worked", "b": [0.3512, 0.2048, 0.4085, 0.2197]}, {"w": "better", "b": [0.4147, 0.2048, 0.4638, 0.2197]}, {"w": "during", "b": [0.47, 0.2048, 0.5227, 0.2197]}, {"w": "the", "b": [0.5289, 0.2048, 0.5547, 0.2197]}, {"w": "day", "b": [0.5608, 0.2048, 0.5898, 0.2197]}, {"w": "than", "b": [0.5959, 0.2048, 0.6331, 0.2197]}, {"w": "at", "b": [0.6392, 0.2048, 0.6558, 0.2197]}, {"w": "night,", "b": [0.6619, 0.2048, 0.7089, 0.2197]}, {"w": "simply", "b": [0.7151, 0.2048, 0.7684, 0.2197]}, {"w": "because", "b": [0.7745, 0.2048, 0.8371, 0.2197]}, {"w": "the", "b": [0.8433, 0.2048, 0.8691, 0.2197]}, {"w": "night", "b": [0.1312, 0.2227, 0.1728, 0.2377]}, {"w": "training", "b": [0.1789, 0.2227, 0.2425, 0.2377]}, {"w": "examples", "b": [0.2487, 0.2227, 0.3221, 0.2377]}, {"w": "were", "b": [0.3283, 0.2227, 0.3647, 0.2377]}, {"w": "less", "b": [0.3709, 0.2227, 0.3988, 0.2377]}, {"w": "frequent", "b": [0.4049, 0.2227, 0.4711, 0.2377]}, {"w": "in", "b": [0.4773, 0.2227, 0.4927, 0.2377]}, {"w": "the", "b": [0.4988, 0.2227, 0.5245, 0.2377]}, {"w": "training", "b": [0.5306, 0.2227, 0.5943, 0.2377]}, {"w": "data.", "b": [0.6004, 0.2227, 0.6414, 0.2377]}]}, {"id": "b_2", "type": "paragraph", "text": "Uniform errors cannot be entirely avoided, but important focused errors should be discovered before the model is deployed in production. This can be done by clustering test examples, and by testing the model on examples coming from different clusters. The distribution of the production (online) data can be significantly different from the offline data distribution used for model training/pre-deployment tests. So, the clusters that contain few examples in the offline data might represent much more frequent use cases in the online scenario.", "words": [{"w": "Uniform", "b": [0.1312, 0.2496, 0.1966, 0.2646]}, {"w": "errors", "b": [0.2024, 0.2496, 0.2479, 0.2646]}, {"w": "cannot", "b": [0.2537, 0.2496, 0.3069, 0.2646]}, {"w": "be", "b": [0.3127, 0.2496, 0.3313, 0.2646]}, {"w": "entirely", "b": [0.3371, 0.2496, 0.3965, 0.2646]}, {"w": "avoided,", "b": [0.4023, 0.2496, 0.4671, 0.2646]}, {"w": "but", "b": [0.4729, 0.2496, 0.5001, 0.2646]}, {"w": "important", "b": [0.5059, 0.2496, 0.5853, 0.2646]}, {"w": "focused", "b": [0.5911, 0.2496, 0.6495, 0.2646]}, {"w": "errors", "b": [0.6553, 0.2496, 0.7008, 0.2646]}, {"w": "should", "b": [0.7066, 0.2496, 0.7579, 0.2646]}, {"w": "be", "b": [0.7637, 0.2496, 0.7823, 0.2646]}, {"w": "discovered", "b": [0.7881, 0.2496, 0.8692, 0.2646]}, {"w": "before", "b": [0.1312, 0.2676, 0.1813, 0.2825]}, {"w": "the", "b": [0.1875, 0.2676, 0.2136, 0.2825]}, {"w": "model", "b": [0.2198, 0.2676, 0.2693, 0.2825]}, {"w": "is", "b": [0.2755, 0.2676, 0.2881, 0.2825]}, {"w": "deployed", "b": [0.2942, 0.2676, 0.3657, 0.2825]}, {"w": "in", "b": [0.3719, 0.2676, 0.3875, 0.2825]}, {"w": "production.", "b": [0.3937, 0.2676, 0.4881, 0.2825]}, {"w": "This", "b": [0.4964, 0.2676, 0.533, 0.2825]}, {"w": "can", "b": [0.5392, 0.2676, 0.5673, 0.2825]}, {"w": "be", "b": [0.5735, 0.2676, 0.5928, 0.2825]}, {"w": "done", "b": [0.599, 0.2676, 0.6375, 0.2825]}, {"w": "by", "b": [0.6437, 0.2676, 0.6636, 0.2825]}, {"w": "clustering", "b": [0.6697, 0.2676, 0.7492, 0.2825]}, {"w": "test", "b": [0.7553, 0.2676, 0.7857, 0.2825]}, {"w": "examples,", "b": [0.7919, 0.2676, 0.8717, 0.2825]}, {"w": "and", "b": [0.1312, 0.2855, 0.1604, 0.3005]}, {"w": "by", "b": [0.1664, 0.2855, 0.1855, 0.3005]}, {"w": "testing", "b": [0.1914, 0.2855, 0.2448, 0.3005]}, {"w": "the", "b": [0.2508, 0.2855, 0.2759, 0.3005]}, {"w": "model", "b": [0.2819, 0.2855, 0.3296, 0.3005]}, {"w": "on", "b": [0.3356, 0.2855, 0.3547, 0.3005]}, {"w": "examples", "b": [0.3607, 0.2855, 0.4326, 0.3005]}, {"w": "coming", "b": [0.4386, 0.2855, 0.4949, 0.3005]}, {"w": "from", "b": [0.5009, 0.2855, 0.5376, 0.3005]}, {"w": "different", "b": [0.5436, 0.2855, 0.609, 0.3005]}, {"w": "clusters.", "b": [0.615, 0.2855, 0.6795, 0.3005]}, {"w": "The", "b": [0.6877, 0.2855, 0.7188, 0.3005]}, {"w": "distribution", "b": [0.7248, 0.2855, 0.8174, 0.3005]}, {"w": "of", "b": [0.8234, 0.2855, 0.838, 0.3005]}, {"w": "the", "b": [0.844, 0.2855, 0.8691, 0.3005]}, {"w": "production", "b": [0.1312, 0.3035, 0.2177, 0.3184]}, {"w": "(online)", "b": [0.2239, 0.3035, 0.2856, 0.3184]}, {"w": "data", "b": [0.2917, 0.3035, 0.3271, 0.3184]}, {"w": "can", "b": [0.3332, 0.3035, 0.3605, 0.3184]}, {"w": "be", "b": [0.3666, 0.3035, 0.3854, 0.3184]}, {"w": "significantly", "b": [0.3915, 0.3035, 0.4866, 0.3184]}, {"w": "different", "b": [0.4928, 0.3035, 0.5585, 0.3184]}, {"w": "from", "b": [0.5647, 0.3035, 0.6016, 0.3184]}, {"w": "the", "b": [0.6077, 0.3035, 0.633, 0.3184]}, {"w": "offline", "b": [0.6391, 0.3035, 0.6867, 0.3184]}, {"w": "data", "b": [0.6928, 0.3035, 0.7282, 0.3184]}, {"w": "distribution", "b": [0.7343, 0.3035, 0.8275, 0.3184]}, {"w": "used", "b": [0.8336, 0.3035, 0.8691, 0.3184]}, {"w": "for", "b": [0.1312, 0.3214, 0.1535, 0.3364]}, {"w": "model", "b": [0.1597, 0.3214, 0.2088, 0.3364]}, {"w": "training/pre-deployment", "b": [0.215, 0.3214, 0.4143, 0.3364]}, {"w": "tests.", "b": [0.4204, 0.3214, 0.4631, 0.3364]}, {"w": "So,", "b": [0.4713, 0.3214, 0.4961, 0.3364]}, {"w": "the", "b": [0.5023, 0.3214, 0.5281, 0.3364]}, {"w": "clusters", "b": [0.5343, 0.3214, 0.5956, 0.3364]}, {"w": "that", "b": [0.6018, 0.3214, 0.6359, 0.3364]}, {"w": "contain", "b": [0.6421, 0.3214, 0.7016, 0.3364]}, {"w": "few", "b": [0.7077, 0.3214, 0.7352, 0.3364]}, {"w": "examples", "b": [0.7413, 0.3214, 0.8154, 0.3364]}, {"w": "in", "b": [0.8216, 0.3214, 0.8371, 0.3364]}, {"w": "the", "b": [0.8433, 0.3214, 0.8691, 0.3364]}, {"w": "offline", "b": [0.1312, 0.3394, 0.1794, 0.3543]}, {"w": "data", "b": [0.1856, 0.3394, 0.2215, 0.3543]}, {"w": "might", "b": [0.2276, 0.3394, 0.2743, 0.3543]}, {"w": "represent", "b": [0.2804, 0.3394, 0.354, 0.3543]}, {"w": "much", "b": [0.3601, 0.3394, 0.4032, 0.3543]}, {"w": "more", "b": [0.4093, 0.3394, 0.4494, 0.3543]}, {"w": "frequent", "b": [0.4555, 0.3394, 0.5217, 0.3543]}, {"w": "use", "b": [0.5279, 0.3394, 0.5536, 0.3543]}, {"w": "cases", "b": [0.5598, 0.3394, 0.6, 0.3543]}, {"w": "in", "b": [0.6061, 0.3394, 0.6215, 0.3543]}, {"w": "the", "b": [0.6277, 0.3394, 0.6533, 0.3543]}, {"w": "online", "b": [0.6595, 0.3394, 0.7077, 0.3543]}, {"w": "scenario.", "b": [0.7138, 0.3394, 0.7837, 0.3543]}]}, {"id": "b_3", "type": "paragraph", "text": "In Section ?? of Chapter 4, we discussed several techniques for dimensionality reduction. In addition to using clustering for spotting error trends, uniform manifold approximation and projection (UMAP) or autoencoder can be used. Use those techniques to reduce the dimen- sionality of the data to 2D, and then visually inspect the distribution of errors across a dataset.", "words": [{"w": "In", "b": [0.1312, 0.3663, 0.148, 0.3812]}, {"w": "Section", "b": [0.1541, 0.3663, 0.2121, 0.3812]}, {"w": "??", "b": [0.2182, 0.3666, 0.2383, 0.3815]}, {"w": "of", "b": [0.2444, 0.3663, 0.2591, 0.3812]}, {"w": "Chapter", "b": [0.2653, 0.3663, 0.3304, 0.3812]}, {"w": "4,", "b": [0.3365, 0.3663, 0.3508, 0.3812]}, {"w": "we", "b": [0.3569, 0.3663, 0.3778, 0.3812]}, {"w": "discussed", "b": [0.3839, 0.3663, 0.4575, 0.3812]}, {"w": "several", "b": [0.4636, 0.3663, 0.5177, 0.3812]}, {"w": "techniques", "b": [0.5238, 0.3663, 0.6073, 0.3812]}, {"w": "for", "b": [0.6135, 0.3663, 0.6354, 0.3812]}, {"w": "dimensionality", "b": [0.6415, 0.3663, 0.7576, 0.3812]}, {"w": "reduction.", "b": [0.7637, 0.3663, 0.8442, 0.3812]}, {"w": "In", "b": [0.8523, 0.3663, 0.8691, 0.3812]}, {"w": "addition", "b": [0.1312, 0.3842, 0.1983, 0.3992]}, {"w": "to", "b": [0.2044, 0.3842, 0.2209, 0.3992]}, {"w": "using", "b": [0.2271, 0.3842, 0.2695, 0.3992]}, {"w": "clustering", "b": [0.2756, 0.3842, 0.3542, 0.3992]}, {"w": "for", "b": [0.3603, 0.3842, 0.3826, 0.3992]}, {"w": "spotting", "b": [0.3887, 0.3842, 0.4553, 0.3992]}, {"w": "error", "b": [0.4615, 0.3842, 0.5008, 0.3992]}, {"w": "trends,", "b": [0.507, 0.3842, 0.5628, 0.3992]}, {"w": "uniform", "b": [0.569, 0.3842, 0.6325, 0.3992]}, {"w": "manifold", "b": [0.6386, 0.3842, 0.7093, 0.3992]}, {"w": "approximation", "b": [0.7154, 0.3842, 0.833, 0.3992]}, {"w": "and", "b": [0.8392, 0.3842, 0.8691, 0.3992]}, {"w": "projection", "b": [0.1312, 0.4022, 0.2107, 0.4171]}, {"w": "(UMAP)", "b": [0.2155, 0.4022, 0.2965, 0.4174]}, {"w": "or", "b": [0.3012, 0.4022, 0.3174, 0.4171]}, {"w": "autoencoder", "b": [0.3221, 0.4025, 0.4361, 0.4174]}, {"w": "can", "b": [0.4408, 0.4022, 0.468, 0.4171]}, {"w": "be", "b": [0.4727, 0.4022, 0.4913, 0.4171]}, {"w": "used.", "b": [0.4961, 0.4022, 0.5364, 0.4171]}, {"w": "Use", "b": [0.5442, 0.4022, 0.5729, 0.4171]}, {"w": "those", "b": [0.5777, 0.4022, 0.619, 0.4171]}, {"w": "techniques", "b": [0.6238, 0.4022, 0.7063, 0.4171]}, {"w": "to", "b": [0.711, 0.4022, 0.7271, 0.4171]}, {"w": "reduce", "b": [0.7319, 0.4022, 0.7832, 0.4171]}, {"w": "the", "b": [0.788, 0.4022, 0.8131, 0.4171]}, {"w": "dimen-", "b": [0.8179, 0.4022, 0.8721, 0.4171]}, {"w": "sionality", "b": [0.1312, 0.4201, 0.1977, 0.4351]}, {"w": "of", "b": [0.2026, 0.4201, 0.2172, 0.4351]}, {"w": "the", "b": [0.2221, 0.4201, 0.2472, 0.4351]}, {"w": "data", "b": [0.2521, 0.4201, 0.2873, 0.4351]}, {"w": "to", "b": [0.2922, 0.4201, 0.3083, 0.4351]}, {"w": "2D,", "b": [0.3132, 0.4201, 0.3411, 0.4351]}, {"w": "and", "b": [0.346, 0.4201, 0.3752, 0.4351]}, {"w": "then", "b": [0.3801, 0.4201, 0.4153, 0.4351]}, {"w": "visually", "b": [0.4202, 0.4201, 0.4806, 0.4351]}, {"w": "inspect", "b": [0.4856, 0.4201, 0.5415, 0.4351]}, {"w": "the", "b": [0.5464, 0.4201, 0.5715, 0.4351]}, {"w": "distribution", "b": [0.5765, 0.4201, 0.6691, 0.4351]}, {"w": "of", "b": [0.674, 0.4201, 0.6886, 0.4351]}, {"w": "errors", "b": [0.6935, 0.4201, 0.739, 0.4351]}, {"w": "across", "b": [0.7439, 0.4201, 0.7914, 0.4351]}, {"w": "a", "b": [0.7963, 0.4201, 0.8054, 0.4351]}, {"w": "dataset.", "b": [0.8103, 0.4201, 0.8727, 0.4351]}]}, {"id": "b_4", "type": "paragraph", "text": "More specifically, you can visualize the data on a 2D scatter plot, using different colors for examples of different classes. To identify error trends on a scatter plot, use different markers depending on whether a model’s prediction was correct or not. For example, use circles to denote examples whose label was predicted correctly, and squares otherwise. This will allow you to see the regions of poor model performance. If you work with perceptive data, such as images or text, it is also helpful to visually examine some examples from those poor performance regions.", "words": [{"w": "More", "b": [0.1312, 0.447, 0.1732, 0.462]}, {"w": "specifically,", "b": [0.1794, 0.447, 0.2712, 0.462]}, {"w": "you", "b": [0.2774, 0.447, 0.3064, 0.462]}, {"w": "can", "b": [0.3125, 0.447, 0.3405, 0.462]}, {"w": "visualize", "b": [0.3467, 0.447, 0.4156, 0.462]}, {"w": "the", "b": [0.4218, 0.447, 0.4477, 0.462]}, {"w": "data", "b": [0.4539, 0.447, 0.4901, 0.462]}, {"w": "on", "b": [0.4963, 0.447, 0.5159, 0.462]}, {"w": "a", "b": [0.5221, 0.447, 0.5314, 0.462]}, {"w": "2D", "b": [0.5376, 0.447, 0.5611, 0.462]}, {"w": "scatter", "b": [0.5673, 0.447, 0.6224, 0.462]}, {"w": "plot,", "b": [0.6285, 0.447, 0.6658, 0.462]}, {"w": "using", "b": [0.672, 0.447, 0.7145, 0.462]}, {"w": "different", "b": [0.7207, 0.447, 0.7881, 0.462]}, {"w": "colors", "b": [0.7943, 0.447, 0.841, 0.462]}, {"w": "for", "b": [0.8472, 0.447, 0.8695, 0.462]}, {"w": "examples", "b": [0.1312, 0.465, 0.2034, 0.4799]}, {"w": "of", "b": [0.2096, 0.465, 0.2242, 0.4799]}, {"w": "different", "b": [0.2304, 0.465, 0.2959, 0.4799]}, {"w": "classes.", "b": [0.3021, 0.465, 0.3589, 0.4799]}, {"w": "To", "b": [0.3671, 0.465, 0.3878, 0.4799]}, {"w": "identify", "b": [0.3939, 0.465, 0.4539, 0.4799]}, {"w": "error", "b": [0.4601, 0.465, 0.4986, 0.4799]}, {"w": "trends", "b": [0.5047, 0.465, 0.5543, 0.4799]}, {"w": "on", "b": [0.5605, 0.465, 0.5796, 0.4799]}, {"w": "a", "b": [0.5858, 0.465, 0.5949, 0.4799]}, {"w": "scatter", "b": [0.601, 0.465, 0.6546, 0.4799]}, {"w": "plot,", "b": [0.6608, 0.465, 0.6971, 0.4799]}, {"w": "use", "b": [0.7032, 0.465, 0.7286, 0.4799]}, {"w": "different", "b": [0.7347, 0.465, 0.8003, 0.4799]}, {"w": "markers", "b": [0.8065, 0.465, 0.8692, 0.4799]}, {"w": "depending", "b": [0.1312, 0.4829, 0.2154, 0.4979]}, {"w": "on", "b": [0.2228, 0.4829, 0.2427, 0.4979]}, {"w": "whether", "b": [0.2501, 0.4829, 0.316, 0.4979]}, {"w": "a", "b": [0.3234, 0.4829, 0.3328, 0.4979]}, {"w": "model’s", "b": [0.3402, 0.4829, 0.4025, 0.4979]}, {"w": "prediction", "b": [0.4099, 0.4829, 0.4926, 0.4979]}, {"w": "was", "b": [0.5, 0.4829, 0.5299, 0.4979]}, {"w": "correct", "b": [0.5373, 0.4829, 0.5939, 0.4979]}, {"w": "or", "b": [0.6013, 0.4829, 0.6181, 0.4979]}, {"w": "not.", "b": [0.6255, 0.4829, 0.6579, 0.4979]}, {"w": "For", "b": [0.6698, 0.4829, 0.6973, 0.4979]}, {"w": "example,", "b": [0.7047, 0.4829, 0.7774, 0.4979]}, {"w": "use", "b": [0.7851, 0.4829, 0.8114, 0.4979]}, {"w": "circles", "b": [0.8188, 0.4829, 0.8691, 0.4979]}, {"w": "to", "b": [0.1312, 0.5009, 0.148, 0.5158]}, {"w": "denote", "b": [0.1545, 0.5009, 0.209, 0.5158]}, {"w": "examples", "b": [0.2155, 0.5009, 0.2904, 0.5158]}, {"w": "whose", "b": [0.297, 0.5009, 0.3463, 0.5158]}, {"w": "label", "b": [0.3529, 0.5009, 0.3921, 0.5158]}, {"w": "was", "b": [0.3987, 0.5009, 0.4286, 0.5158]}, {"w": "predicted", "b": [0.4352, 0.5009, 0.5116, 0.5158]}, {"w": "correctly,", "b": [0.5182, 0.5009, 0.5937, 0.5158]}, {"w": "and", "b": [0.6003, 0.5009, 0.6307, 0.5158]}, {"w": "squares", "b": [0.6373, 0.5009, 0.6977, 0.5158]}, {"w": "otherwise.", "b": [0.7043, 0.5009, 0.787, 0.5158]}, {"w": "This", "b": [0.7966, 0.5009, 0.8333, 0.5158]}, {"w": "will", "b": [0.8399, 0.5009, 0.8691, 0.5158]}, {"w": "allow", "b": [0.1312, 0.5188, 0.1733, 0.5338]}, {"w": "you", "b": [0.1795, 0.5188, 0.2086, 0.5338]}, {"w": "to", "b": [0.2147, 0.5188, 0.2314, 0.5338]}, {"w": "see", "b": [0.2375, 0.5188, 0.2616, 0.5338]}, {"w": "the", "b": [0.2677, 0.5188, 0.2937, 0.5338]}, {"w": "regions", "b": [0.2998, 0.5188, 0.3572, 0.5338]}, {"w": "of", "b": [0.3633, 0.5188, 0.3784, 0.5338]}, {"w": "poor", "b": [0.3845, 0.5188, 0.422, 0.5338]}, {"w": "model", "b": [0.4281, 0.5188, 0.4775, 0.5338]}, {"w": "performance.", "b": [0.4837, 0.5188, 0.5898, 0.5338]}, {"w": "If", "b": [0.598, 0.5188, 0.6105, 0.5338]}, {"w": "you", "b": [0.6166, 0.5188, 0.6458, 0.5338]}, {"w": "work", "b": [0.6519, 0.5188, 0.6915, 0.5338]}, {"w": "with", "b": [0.6976, 0.5188, 0.734, 0.5338]}, {"w": "perceptive", "b": [0.7401, 0.5188, 0.8239, 0.5338]}, {"w": "data,", "b": [0.8301, 0.5188, 0.8716, 0.5338]}, {"w": "such", "b": [0.1312, 0.5368, 0.1664, 0.5517]}, {"w": "as", "b": [0.1726, 0.5368, 0.189, 0.5517]}, {"w": "images", "b": [0.1951, 0.5368, 0.2491, 0.5517]}, {"w": "or", "b": [0.2553, 0.5368, 0.2716, 0.5517]}, {"w": "text,", "b": [0.2777, 0.5368, 0.3149, 0.5517]}, {"w": "it", "b": [0.321, 0.5368, 0.3332, 0.5517]}, {"w": "is", "b": [0.3394, 0.5368, 0.3517, 0.5517]}, {"w": "also", "b": [0.3578, 0.5368, 0.3884, 0.5517]}, {"w": "helpful", "b": [0.3946, 0.5368, 0.449, 0.5517]}, {"w": "to", "b": [0.4552, 0.5368, 0.4714, 0.5517]}, {"w": "visually", "b": [0.4776, 0.5368, 0.5387, 0.5517]}, {"w": "examine", "b": [0.5449, 0.5368, 0.6105, 0.5517]}, {"w": "some", "b": [0.6166, 0.5368, 0.6564, 0.5517]}, {"w": "examples", "b": [0.6625, 0.5368, 0.7354, 0.5517]}, {"w": "from", "b": [0.7415, 0.5368, 0.7787, 0.5517]}, {"w": "those", "b": [0.7848, 0.5368, 0.8266, 0.5517]}, {"w": "poor", "b": [0.8328, 0.5368, 0.8694, 0.5517]}, {"w": "performance", "b": [0.1312, 0.5547, 0.2308, 0.5697]}, {"w": "regions.", "b": [0.237, 0.5547, 0.2987, 0.5697]}]}, {"id": "b_5", "type": "paragraph", "text": "Whether you are satisfied or dissatisfied by the model’s performance on the holdout data, you can always improve the model by analyzing individual errors. As discussed, the best way is to work iteratively, by considering 100 −300 examples at a time. By considering a small number of examples at a time, you can iterate quickly, by retraining the model after each iteration, but still consider enough examples to spot obvious patterns.", "words": [{"w": "Whether", "b": [0.1303, 0.5816, 0.202, 0.5966]}, {"w": "you", "b": [0.2084, 0.5816, 0.2377, 0.5966]}, {"w": "are", "b": [0.244, 0.5816, 0.2692, 0.5966]}, {"w": "satisfied", "b": [0.2755, 0.5816, 0.3416, 0.5966]}, {"w": "or", "b": [0.348, 0.5816, 0.3648, 0.5966]}, {"w": "dissatisfied", "b": [0.3711, 0.5816, 0.4604, 0.5966]}, {"w": "by", "b": [0.4667, 0.5816, 0.4866, 0.5966]}, {"w": "the", "b": [0.493, 0.5816, 0.5191, 0.5966]}, {"w": "model’s", "b": [0.5255, 0.5816, 0.5878, 0.5966]}, {"w": "performance", "b": [0.5941, 0.5816, 0.6957, 0.5966]}, {"w": "on", "b": [0.702, 0.5816, 0.7219, 0.5966]}, {"w": "the", "b": [0.7283, 0.5816, 0.7544, 0.5966]}, {"w": "holdout", "b": [0.7608, 0.5816, 0.8235, 0.5966]}, {"w": "data,", "b": [0.8299, 0.5816, 0.8717, 0.5966]}, {"w": "you", "b": [0.1308, 0.5996, 0.1589, 0.6145]}, {"w": "can", "b": [0.1649, 0.5996, 0.192, 0.6145]}, {"w": "always", "b": [0.198, 0.5996, 0.2498, 0.6145]}, {"w": "improve", "b": [0.2558, 0.5996, 0.3186, 0.6145]}, {"w": "the", "b": [0.3246, 0.5996, 0.3497, 0.6145]}, {"w": "model", "b": [0.3557, 0.5996, 0.4035, 0.6145]}, {"w": "by", "b": [0.4094, 0.5996, 0.4285, 0.6145]}, {"w": "analyzing", "b": [0.4345, 0.5996, 0.5094, 0.6145]}, {"w": "individual", "b": [0.5154, 0.5996, 0.5942, 0.6145]}, {"w": "errors.", "b": [0.6002, 0.5996, 0.6507, 0.6145]}, {"w": "As", "b": [0.6589, 0.5996, 0.6796, 0.6145]}, {"w": "discussed,", "b": [0.6856, 0.5996, 0.7633, 0.6145]}, {"w": "the", "b": [0.7693, 0.5996, 0.7944, 0.6145]}, {"w": "best", "b": [0.8004, 0.5996, 0.8332, 0.6145]}, {"w": "way", "b": [0.8392, 0.5996, 0.8698, 0.6145]}, {"w": "is", "b": [0.1312, 0.6175, 0.1437, 0.6325]}, {"w": "to", "b": [0.1499, 0.6175, 0.1664, 0.6325]}, {"w": "work", "b": [0.1725, 0.6175, 0.2118, 0.6325]}, {"w": "iteratively,", "b": [0.218, 0.6175, 0.3037, 0.6325]}, {"w": "by", "b": [0.3099, 0.6175, 0.3295, 0.6325]}, {"w": "considering", "b": [0.3357, 0.6175, 0.4267, 0.6325]}, {"w": "100", "b": [0.4327, 0.6175, 0.4606, 0.6325]}, {"w": "−300", "b": [0.4646, 0.6175, 0.5109, 0.6326]}, {"w": "examples", "b": [0.5171, 0.6175, 0.591, 0.6325]}, {"w": "at", "b": [0.5972, 0.6175, 0.6137, 0.6325]}, {"w": "a", "b": [0.6198, 0.6175, 0.6291, 0.6325]}, {"w": "time.", "b": [0.6352, 0.6175, 0.6765, 0.6325]}, {"w": "By", "b": [0.6847, 0.6175, 0.7077, 0.6325]}, {"w": "considering", "b": [0.7138, 0.6175, 0.8049, 0.6325]}, {"w": "a", "b": [0.811, 0.6175, 0.8203, 0.6325]}, {"w": "small", "b": [0.8265, 0.6175, 0.8689, 0.6325]}, {"w": "number", "b": [0.1312, 0.6355, 0.1935, 0.6504]}, {"w": "of", "b": [0.1998, 0.6355, 0.2149, 0.6504]}, {"w": "examples", "b": [0.2212, 0.6355, 0.2961, 0.6504]}, {"w": "at", "b": [0.3023, 0.6355, 0.319, 0.6504]}, {"w": "a", "b": [0.3253, 0.6355, 0.3347, 0.6504]}, {"w": "time,", "b": [0.3409, 0.6355, 0.3828, 0.6504]}, {"w": "you", "b": [0.389, 0.6355, 0.4183, 0.6504]}, {"w": "can", "b": [0.4245, 0.6355, 0.4528, 0.6504]}, {"w": "iterate", "b": [0.459, 0.6355, 0.5124, 0.6504]}, {"w": "quickly,", "b": [0.5187, 0.6355, 0.581, 0.6504]}, {"w": "by", "b": [0.5872, 0.6355, 0.6071, 0.6504]}, {"w": "retraining", "b": [0.6133, 0.6355, 0.694, 0.6504]}, {"w": "the", "b": [0.7002, 0.6355, 0.7264, 0.6504]}, {"w": "model", "b": [0.7326, 0.6355, 0.7823, 0.6504]}, {"w": "after", "b": [0.7885, 0.6355, 0.8268, 0.6504]}, {"w": "each", "b": [0.833, 0.6355, 0.8691, 0.6504]}, {"w": "iteration,", "b": [0.1312, 0.6534, 0.2051, 0.6684]}, {"w": "but", "b": [0.2113, 0.6534, 0.239, 0.6684]}, {"w": "still", "b": [0.2451, 0.6534, 0.275, 0.6684]}, {"w": "consider", "b": [0.2811, 0.6534, 0.3469, 0.6684]}, {"w": "enough", "b": [0.3531, 0.6534, 0.4105, 0.6684]}, {"w": "examples", "b": [0.4166, 0.6534, 0.4901, 0.6684]}, {"w": "to", "b": [0.4962, 0.6534, 0.5126, 0.6684]}, {"w": "spot", "b": [0.5188, 0.6534, 0.5532, 0.6684]}, {"w": "obvious", "b": [0.5594, 0.6534, 0.62, 0.6684]}, {"w": "patterns.", "b": [0.6261, 0.6534, 0.6981, 0.6684]}]}, {"id": "b_6", "type": "paragraph", "text": "How do you decide whether an error pattern is worth spending time to fix it? You can base that decision on the error pattern frequencies. Let’s see how it works.", "words": [{"w": "How", "b": [0.1312, 0.6803, 0.1668, 0.6953]}, {"w": "do", "b": [0.173, 0.6803, 0.1924, 0.6953]}, {"w": "you", "b": [0.1985, 0.6803, 0.227, 0.6953]}, {"w": "decide", "b": [0.2332, 0.6803, 0.2831, 0.6953]}, {"w": "whether", "b": [0.2893, 0.6803, 0.3535, 0.6953]}, {"w": "an", "b": [0.3597, 0.6803, 0.379, 0.6953]}, {"w": "error", "b": [0.3852, 0.6803, 0.424, 0.6953]}, {"w": "pattern", "b": [0.4302, 0.6803, 0.4893, 0.6953]}, {"w": "is", "b": [0.4955, 0.6803, 0.5078, 0.6953]}, {"w": "worth", "b": [0.514, 0.6803, 0.5603, 0.6953]}, {"w": "spending", "b": [0.5665, 0.6803, 0.6374, 0.6953]}, {"w": "time", "b": [0.6436, 0.6803, 0.6792, 0.6953]}, {"w": "to", "b": [0.6854, 0.6803, 0.7016, 0.6953]}, {"w": "fix", "b": [0.7078, 0.6803, 0.7277, 0.6953]}, {"w": "it?", "b": [0.7339, 0.6803, 0.7547, 0.6953]}, {"w": "You", "b": [0.763, 0.6803, 0.7945, 0.6953]}, {"w": "can", "b": [0.8007, 0.6803, 0.8282, 0.6953]}, {"w": "base", "b": [0.8343, 0.6803, 0.8691, 0.6953]}, {"w": "that", "b": [0.1312, 0.6983, 0.1651, 0.7132]}, {"w": "decision", "b": [0.1712, 0.6983, 0.2349, 0.7132]}, {"w": "on", "b": [0.2411, 0.6983, 0.2605, 0.7132]}, {"w": "the", "b": [0.2667, 0.6983, 0.2924, 0.7132]}, {"w": "error", "b": [0.2984, 0.6986, 0.345, 0.7136]}, {"w": "pattern", "b": [0.352, 0.6986, 0.4209, 0.7136]}, {"w": "frequencies.", "b": [0.428, 0.6983, 0.5359, 0.7136]}, {"w": "Let’s", "b": [0.5441, 0.6983, 0.5835, 0.7132]}, {"w": "see", "b": [0.5896, 0.6983, 0.6133, 0.7132]}, {"w": "how", "b": [0.6195, 0.6983, 0.6518, 0.7132]}, {"w": "it", "b": [0.6579, 0.6983, 0.6702, 0.7132]}, {"w": "works.", "b": [0.6764, 0.6983, 0.7278, 0.7132]}]}, {"id": "b_7", "type": "paragraph", "text": "Let your model have an accuracy of 80%, which corresponds to an error rate of 20%. If you fix all error patterns, you can improve the model’s performance by at most 20 percentage points. If your small error-analysis batch was of 300 examples, your model made 0.2×300 = 60 errors.", "words": [{"w": "Let", "b": [0.1312, 0.7252, 0.1576, 0.7402]}, {"w": "your", "b": [0.1628, 0.7252, 0.198, 0.7402]}, {"w": "model", "b": [0.2032, 0.7252, 0.2509, 0.7402]}, {"w": "have", "b": [0.2561, 0.7252, 0.2918, 0.7402]}, {"w": "an", "b": [0.297, 0.7252, 0.3161, 0.7402]}, {"w": "accuracy", "b": [0.3213, 0.7252, 0.3902, 0.7402]}, {"w": "of", "b": [0.3954, 0.7252, 0.4099, 0.7402]}, {"w": "80%,", "b": [0.415, 0.7252, 0.4532, 0.7402]}, {"w": "which", "b": [0.4586, 0.7252, 0.5043, 0.7402]}, {"w": "corresponds", "b": [0.5095, 0.7252, 0.6028, 0.7402]}, {"w": "to", "b": [0.608, 0.7252, 0.624, 0.7402]}, {"w": "an", "b": [0.6292, 0.7252, 0.6483, 0.7402]}, {"w": "error", "b": [0.6535, 0.7252, 0.6919, 0.7402]}, {"w": "rate", "b": [0.6971, 0.7252, 0.7283, 0.7402]}, {"w": "of", "b": [0.7334, 0.7252, 0.748, 0.7402]}, {"w": "20%.", "b": [0.7531, 0.7252, 0.7912, 0.7402]}, {"w": "If", "b": [0.7991, 0.7252, 0.8112, 0.7402]}, {"w": "you", "b": [0.8164, 0.7252, 0.8445, 0.7402]}, {"w": "fix", "b": [0.8497, 0.7252, 0.8693, 0.7402]}, {"w": "all", "b": [0.1312, 0.7432, 0.1503, 0.7581]}, {"w": "error", "b": [0.1563, 0.7432, 0.1946, 0.7581]}, {"w": "patterns,", "b": [0.2006, 0.7432, 0.2711, 0.7581]}, {"w": "you", "b": [0.2771, 0.7432, 0.3052, 0.7581]}, {"w": "can", "b": [0.3112, 0.7432, 0.3383, 0.7581]}, {"w": "improve", "b": [0.3443, 0.7432, 0.4071, 0.7581]}, {"w": "the", "b": [0.413, 0.7432, 0.4382, 0.7581]}, {"w": "model’s", "b": [0.4441, 0.7432, 0.504, 0.7581]}, {"w": "performance", "b": [0.51, 0.7432, 0.6076, 0.7581]}, {"w": "by", "b": [0.6135, 0.7432, 0.6326, 0.7581]}, {"w": "at", "b": [0.6386, 0.7432, 0.6547, 0.7581]}, {"w": "most", "b": [0.6606, 0.7432, 0.6989, 0.7581]}, {"w": "20", "b": [0.7046, 0.7432, 0.7227, 0.7581]}, {"w": "percentage", "b": [0.7286, 0.7432, 0.8131, 0.7581]}, {"w": "points.", "b": [0.8191, 0.7432, 0.8724, 0.7581]}, {"w": "If", "b": [0.1312, 0.7611, 0.1433, 0.7761]}, {"w": "your", "b": [0.1485, 0.7611, 0.1837, 0.7761]}, {"w": "small", "b": [0.1889, 0.7611, 0.2302, 0.7761]}, {"w": "error-analysis", "b": [0.2355, 0.7611, 0.3418, 0.7761]}, {"w": "batch", "b": [0.3471, 0.7611, 0.3908, 0.7761]}, {"w": "was", "b": [0.396, 0.7611, 0.4247, 0.7761]}, {"w": "of", "b": [0.43, 0.7611, 0.4445, 0.7761]}, {"w": "300", "b": [0.4496, 0.7611, 0.4767, 0.7761]}, {"w": "examples,", "b": [0.482, 0.7611, 0.5589, 0.7761]}, {"w": "your", "b": [0.5644, 0.7611, 0.5996, 0.7761]}, {"w": "model", "b": [0.6048, 0.7611, 0.6525, 0.7761]}, {"w": "made", "b": [0.6578, 0.7611, 0.6999, 0.7761]}, {"w": "0.2×300", "b": [0.7051, 0.7611, 0.7743, 0.7763]}, {"w": "=", "b": [0.7794, 0.7611, 0.7934, 0.7761]}, {"w": "60", "b": [0.7986, 0.7611, 0.8167, 0.7761]}, {"w": "errors.", "b": [0.8219, 0.7611, 0.8724, 0.7761]}]}, {"id": "b_8", "type": "paragraph", "text": "Observe the errors one by one, and try to get an idea of what particularities in the input led to a misclassification of those 60 examples. To be even more concrete, let our classification problem be to detect pedestrians-on-the-street images. Assume that in 60 out of the 300 images, the model failed to detect a pedestrian. After closer analysis, you discover two", "words": [{"w": "Observe", "b": [0.1312, 0.788, 0.1948, 0.803]}, {"w": "the", "b": [0.201, 0.788, 0.2262, 0.803]}, {"w": "errors", "b": [0.2323, 0.788, 0.2779, 0.803]}, {"w": "one", "b": [0.2841, 0.788, 0.3113, 0.803]}, {"w": "by", "b": [0.3174, 0.788, 0.3365, 0.803]}, {"w": "one,", "b": [0.3427, 0.788, 0.3749, 0.803]}, {"w": "and", "b": [0.3811, 0.788, 0.4103, 0.803]}, {"w": "try", "b": [0.4165, 0.788, 0.4402, 0.803]}, {"w": "to", "b": [0.4463, 0.788, 0.4624, 0.803]}, {"w": "get", "b": [0.4686, 0.788, 0.4928, 0.803]}, {"w": "an", "b": [0.4989, 0.788, 0.5181, 0.803]}, {"w": "idea", "b": [0.5242, 0.788, 0.5564, 0.803]}, {"w": "of", "b": [0.5626, 0.788, 0.5772, 0.803]}, {"w": "what", "b": [0.5833, 0.788, 0.6226, 0.803]}, {"w": "particularities", "b": [0.6288, 0.788, 0.7387, 0.803]}, {"w": "in", "b": [0.7449, 0.788, 0.76, 0.803]}, {"w": "the", "b": [0.7662, 0.788, 0.7914, 0.803]}, {"w": "input", "b": [0.7975, 0.788, 0.8398, 0.803]}, {"w": "led", "b": [0.846, 0.788, 0.8691, 0.803]}, {"w": "to", "b": [0.1312, 0.806, 0.1477, 0.8209]}, {"w": "a", "b": [0.1539, 0.806, 0.1632, 0.8209]}, {"w": "misclassification", "b": [0.1693, 0.806, 0.2996, 0.8209]}, {"w": "of", "b": [0.3058, 0.806, 0.3207, 0.8209]}, {"w": "those", "b": [0.3269, 0.806, 0.3693, 0.8209]}, {"w": "60", "b": [0.3753, 0.806, 0.3939, 0.8209]}, {"w": "examples.", "b": [0.4, 0.806, 0.479, 0.8209]}, {"w": "To", "b": [0.4872, 0.806, 0.5084, 0.8209]}, {"w": "be", "b": [0.5145, 0.806, 0.5336, 0.8209]}, {"w": "even", "b": [0.5397, 0.806, 0.5759, 0.8209]}, {"w": "more", "b": [0.582, 0.806, 0.6223, 0.8209]}, {"w": "concrete,", "b": [0.6284, 0.806, 0.7007, 0.8209]}, {"w": "let", "b": [0.7069, 0.806, 0.7275, 0.8209]}, {"w": "our", "b": [0.7336, 0.806, 0.7605, 0.8209]}, {"w": "classification", "b": [0.7667, 0.806, 0.869, 0.8209]}, {"w": "problem", "b": [0.1312, 0.8239, 0.1982, 0.8389]}, {"w": "be", "b": [0.205, 0.8239, 0.2243, 0.8389]}, {"w": "to", "b": [0.2311, 0.8239, 0.2478, 0.8389]}, {"w": "detect", "b": [0.2546, 0.8239, 0.3048, 0.8389]}, {"w": "pedestrians-on-the-street", "b": [0.3115, 0.8239, 0.5154, 0.8389]}, {"w": "images.", "b": [0.5222, 0.8239, 0.5829, 0.8389]}, {"w": "Assume", "b": [0.593, 0.8239, 0.6565, 0.8389]}, {"w": "that", "b": [0.6632, 0.8239, 0.6977, 0.8389]}, {"w": "in", "b": [0.7045, 0.8239, 0.7202, 0.8389]}, {"w": "60", "b": [0.7267, 0.8239, 0.7455, 0.8389]}, {"w": "out", "b": [0.7522, 0.8239, 0.7794, 0.8389]}, {"w": "of", "b": [0.7862, 0.8239, 0.8014, 0.8389]}, {"w": "the", "b": [0.8081, 0.8239, 0.8343, 0.8389]}, {"w": "300", "b": [0.841, 0.8239, 0.8692, 0.8389]}, {"w": "images,", "b": [0.1312, 0.8419, 0.192, 0.8568]}, {"w": "the", "b": [0.2001, 0.8419, 0.2263, 0.8568]}, {"w": "model", "b": [0.234, 0.8419, 0.2837, 0.8568]}, {"w": "failed", "b": [0.2915, 0.8419, 0.3359, 0.8568]}, {"w": "to", "b": [0.3437, 0.8419, 0.3604, 0.8568]}, {"w": "detect", "b": [0.3682, 0.8419, 0.4184, 0.8568]}, {"w": "a", "b": [0.4261, 0.8419, 0.4355, 0.8568]}, {"w": "pedestrian.", "b": [0.4433, 0.8419, 0.5339, 0.8568]}, {"w": "After", "b": [0.5469, 0.8419, 0.5899, 0.8568]}, {"w": "closer", "b": [0.5976, 0.8419, 0.6438, 0.8568]}, {"w": "analysis,", "b": [0.6516, 0.8419, 0.7213, 0.8568]}, {"w": "you", "b": [0.7295, 0.8419, 0.7588, 0.8568]}, {"w": "discover", "b": [0.7665, 0.8419, 0.8321, 0.8568]}, {"w": "two", "b": [0.8398, 0.8419, 0.8691, 0.8568]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 29", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "29", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 205, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "patterns: 1) the image is blurry in 40 examples, and 2) the picture was taken during the nighttime in 5 examples. Now, should you spend time addressing both problems?", "words": [{"w": "patterns:", "b": [0.1312, 0.0881, 0.2046, 0.1031]}, {"w": "1)", "b": [0.2139, 0.0881, 0.2307, 0.1031]}, {"w": "the", "b": [0.2374, 0.0881, 0.2635, 0.1031]}, {"w": "image", "b": [0.2702, 0.0881, 0.3183, 0.1031]}, {"w": "is", "b": [0.325, 0.0881, 0.3377, 0.1031]}, {"w": "blurry", "b": [0.3444, 0.0881, 0.3953, 0.1031]}, {"w": "in", "b": [0.402, 0.0881, 0.4177, 0.1031]}, {"w": "40", "b": [0.4242, 0.0881, 0.4431, 0.1031]}, {"w": "examples,", "b": [0.4498, 0.0881, 0.5299, 0.1031]}, {"w": "and", "b": [0.5367, 0.0881, 0.5671, 0.1031]}, {"w": "2)", "b": [0.5738, 0.0881, 0.5905, 0.1031]}, {"w": "the", "b": [0.5972, 0.0881, 0.6234, 0.1031]}, {"w": "picture", "b": [0.6301, 0.0881, 0.6877, 0.1031]}, {"w": "was", "b": [0.6944, 0.0881, 0.7243, 0.1031]}, {"w": "taken", "b": [0.731, 0.0881, 0.776, 0.1031]}, {"w": "during", "b": [0.7827, 0.0881, 0.8361, 0.1031]}, {"w": "the", "b": [0.8428, 0.0881, 0.869, 0.1031]}, {"w": "nighttime", "b": [0.1312, 0.106, 0.2086, 0.121]}, {"w": "in", "b": [0.2148, 0.106, 0.2302, 0.121]}, {"w": "5", "b": [0.2363, 0.106, 0.2455, 0.121]}, {"w": "examples.", "b": [0.2517, 0.106, 0.3302, 0.121]}, {"w": "Now,", "b": [0.3384, 0.106, 0.3794, 0.121]}, {"w": "should", "b": [0.3856, 0.106, 0.438, 0.121]}, {"w": "you", "b": [0.4441, 0.106, 0.4728, 0.121]}, {"w": "spend", "b": [0.479, 0.106, 0.5258, 0.121]}, {"w": "time", "b": [0.5319, 0.106, 0.5678, 0.121]}, {"w": "addressing", "b": [0.5739, 0.106, 0.6583, 0.121]}, {"w": "both", "b": [0.6645, 0.106, 0.7019, 0.121]}, {"w": "problems?", "b": [0.708, 0.106, 0.7897, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "If you address the blurry-image problem (for example, by adding more labeled blurry images to your training data), you can hope to decrease your error by (40/60) × 20 = 13 percentage points. In the best-case scenario, after you solve the blurry-image misclassification problem, your error becomes 20 −13 = 7 percent, a significant decrease from the initial 20% error.", "words": [{"w": "If", "b": [0.1312, 0.133, 0.1433, 0.1479]}, {"w": "you", "b": [0.1494, 0.133, 0.1776, 0.1479]}, {"w": "address", "b": [0.1837, 0.133, 0.2423, 0.1479]}, {"w": "the", "b": [0.2485, 0.133, 0.2736, 0.1479]}, {"w": "blurry-image", "b": [0.2798, 0.133, 0.381, 0.1479]}, {"w": "problem", "b": [0.3871, 0.133, 0.4515, 0.1479]}, {"w": "(for", "b": [0.4577, 0.133, 0.4864, 0.1479]}, {"w": "example,", "b": [0.4925, 0.133, 0.5624, 0.1479]}, {"w": "by", "b": [0.5686, 0.133, 0.5877, 0.1479]}, {"w": "adding", "b": [0.5938, 0.133, 0.6471, 0.1479]}, {"w": "more", "b": [0.6533, 0.133, 0.6925, 0.1479]}, {"w": "labeled", "b": [0.6987, 0.133, 0.7545, 0.1479]}, {"w": "blurry", "b": [0.7607, 0.133, 0.8095, 0.1479]}, {"w": "images", "b": [0.8157, 0.133, 0.8691, 0.1479]}, {"w": "to", "b": [0.1312, 0.1509, 0.1474, 0.1659]}, {"w": "your", "b": [0.1535, 0.1509, 0.1889, 0.1659]}, {"w": "training", "b": [0.1951, 0.1509, 0.2577, 0.1659]}, {"w": "data),", "b": [0.2639, 0.1509, 0.3113, 0.1659]}, {"w": "you", "b": [0.3175, 0.1509, 0.3457, 0.1659]}, {"w": "can", "b": [0.3519, 0.1509, 0.3791, 0.1659]}, {"w": "hope", "b": [0.3853, 0.1509, 0.4232, 0.1659]}, {"w": "to", "b": [0.4293, 0.1509, 0.4455, 0.1659]}, {"w": "decrease", "b": [0.4516, 0.1509, 0.5174, 0.1659]}, {"w": "your", "b": [0.5236, 0.1509, 0.559, 0.1659]}, {"w": "error", "b": [0.5651, 0.1509, 0.6036, 0.1659]}, {"w": "by", "b": [0.6098, 0.1509, 0.6289, 0.1659]}, {"w": "(40/60)", "b": [0.6349, 0.1509, 0.6946, 0.1661]}, {"w": "×", "b": [0.6986, 0.151, 0.713, 0.166]}, {"w": "20", "b": [0.717, 0.1509, 0.7352, 0.1659]}, {"w": "=", "b": [0.7403, 0.1509, 0.7545, 0.1659]}, {"w": "13", "b": [0.7596, 0.1509, 0.7778, 0.1659]}, {"w": "percentage", "b": [0.7839, 0.1509, 0.8688, 0.1659]}, {"w": "points.", "b": [0.1312, 0.1689, 0.1854, 0.1838]}, {"w": "In", "b": [0.1937, 0.1689, 0.2105, 0.1838]}, {"w": "the", "b": [0.2167, 0.1689, 0.2422, 0.1838]}, {"w": "best-case", "b": [0.2484, 0.1689, 0.3205, 0.1838]}, {"w": "scenario,", "b": [0.3267, 0.1689, 0.3963, 0.1838]}, {"w": "after", "b": [0.4024, 0.1689, 0.4397, 0.1838]}, {"w": "you", "b": [0.4459, 0.1689, 0.4745, 0.1838]}, {"w": "solve", "b": [0.4807, 0.1689, 0.5195, 0.1838]}, {"w": "the", "b": [0.5257, 0.1689, 0.5512, 0.1838]}, {"w": "blurry-image", "b": [0.5574, 0.1689, 0.66, 0.1838]}, {"w": "misclassification", "b": [0.6662, 0.1689, 0.7951, 0.1838]}, {"w": "problem,", "b": [0.8012, 0.1689, 0.8717, 0.1838]}, {"w": "your", "b": [0.1308, 0.1868, 0.1667, 0.2018]}, {"w": "error", "b": [0.1728, 0.1868, 0.212, 0.2018]}, {"w": "becomes", "b": [0.2181, 0.1868, 0.2854, 0.2018]}, {"w": "20", "b": [0.2915, 0.1868, 0.3099, 0.2018]}, {"w": "−13", "b": [0.314, 0.1868, 0.3509, 0.2018]}, {"w": "=", "b": [0.356, 0.1868, 0.3704, 0.2018]}, {"w": "7", "b": [0.3755, 0.1868, 0.3848, 0.2018]}, {"w": "percent,", "b": [0.3909, 0.1868, 0.4556, 0.2018]}, {"w": "a", "b": [0.4617, 0.1868, 0.4709, 0.2018]}, {"w": "significant", "b": [0.4771, 0.1868, 0.5587, 0.2018]}, {"w": "decrease", "b": [0.5649, 0.1868, 0.6317, 0.2018]}, {"w": "from", "b": [0.6379, 0.1868, 0.6753, 0.2018]}, {"w": "the", "b": [0.6815, 0.1868, 0.7071, 0.2018]}, {"w": "initial", "b": [0.7133, 0.1868, 0.7604, 0.2018]}, {"w": "20%", "b": [0.7664, 0.1868, 0.8002, 0.2018]}, {"w": "error.", "b": [0.8064, 0.1868, 0.8506, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "On the other hand, if you solve the nighttime image problem, you can hope to decrease your error by 5/60 × 20 = 1.7 percentage points. So, in the best-case scenario, your model will make 20 −1.7 = 18.3 percent errors, which might be significant for some problems, or insignificant for others. The cost of gathering additional labeled night-time images can be significant and might not be worth the effort.", "words": [{"w": "On", "b": [0.1312, 0.2137, 0.1563, 0.2287]}, {"w": "the", "b": [0.1637, 0.2137, 0.1898, 0.2287]}, {"w": "other", "b": [0.1971, 0.2137, 0.2401, 0.2287]}, {"w": "hand,", "b": [0.2474, 0.2137, 0.2934, 0.2287]}, {"w": "if", "b": [0.301, 0.2137, 0.312, 0.2287]}, {"w": "you", "b": [0.3193, 0.2137, 0.3486, 0.2287]}, {"w": "solve", "b": [0.356, 0.2137, 0.3958, 0.2287]}, {"w": "the", "b": [0.4031, 0.2137, 0.4293, 0.2287]}, {"w": "nighttime", "b": [0.4366, 0.2137, 0.5156, 0.2287]}, {"w": "image", "b": [0.5229, 0.2137, 0.571, 0.2287]}, {"w": "problem,", "b": [0.5783, 0.2137, 0.6505, 0.2287]}, {"w": "you", "b": [0.6582, 0.2137, 0.6875, 0.2287]}, {"w": "can", "b": [0.6948, 0.2137, 0.723, 0.2287]}, {"w": "hope", "b": [0.7303, 0.2137, 0.7696, 0.2287]}, {"w": "to", "b": [0.7769, 0.2137, 0.7936, 0.2287]}, {"w": "decrease", "b": [0.8009, 0.2137, 0.8691, 0.2287]}, {"w": "your", "b": [0.1308, 0.2317, 0.1672, 0.2466]}, {"w": "error", "b": [0.1734, 0.2317, 0.213, 0.2466]}, {"w": "by", "b": [0.2192, 0.2317, 0.2389, 0.2466]}, {"w": "5/60", "b": [0.245, 0.2317, 0.2823, 0.2469]}, {"w": "×", "b": [0.2864, 0.2318, 0.3008, 0.2467]}, {"w": "20", "b": [0.3049, 0.2317, 0.3236, 0.2466]}, {"w": "=", "b": [0.3287, 0.2317, 0.3433, 0.2466]}, {"w": "1.7", "b": [0.3484, 0.2317, 0.3722, 0.2469]}, {"w": "percentage", "b": [0.3784, 0.2317, 0.4658, 0.2466]}, {"w": "points.", "b": [0.4719, 0.2317, 0.5271, 0.2466]}, {"w": "So,", "b": [0.5354, 0.2317, 0.5603, 0.2466]}, {"w": "in", "b": [0.5665, 0.2317, 0.5821, 0.2466]}, {"w": "the", "b": [0.5882, 0.2317, 0.6142, 0.2466]}, {"w": "best-case", "b": [0.6203, 0.2317, 0.6939, 0.2466]}, {"w": "scenario,", "b": [0.7, 0.2317, 0.7709, 0.2466]}, {"w": "your", "b": [0.7771, 0.2317, 0.8135, 0.2466]}, {"w": "model", "b": [0.8197, 0.2317, 0.869, 0.2466]}, {"w": "will", "b": [0.1306, 0.2496, 0.1598, 0.2646]}, {"w": "make", "b": [0.1659, 0.2496, 0.2087, 0.2646]}, {"w": "20", "b": [0.2148, 0.2496, 0.2336, 0.2646]}, {"w": "−1.7", "b": [0.2377, 0.2496, 0.28, 0.2649]}, {"w": "=", "b": [0.2852, 0.2496, 0.2998, 0.2646]}, {"w": "18.3", "b": [0.3049, 0.2496, 0.3382, 0.2649]}, {"w": "percent", "b": [0.3443, 0.2496, 0.4049, 0.2646]}, {"w": "errors,", "b": [0.4111, 0.2496, 0.4635, 0.2646]}, {"w": "which", "b": [0.4696, 0.2496, 0.5171, 0.2646]}, {"w": "might", "b": [0.5233, 0.2496, 0.5707, 0.2646]}, {"w": "be", "b": [0.5769, 0.2496, 0.5962, 0.2646]}, {"w": "significant", "b": [0.6023, 0.2496, 0.6854, 0.2646]}, {"w": "for", "b": [0.6915, 0.2496, 0.714, 0.2646]}, {"w": "some", "b": [0.7201, 0.2496, 0.7609, 0.2646]}, {"w": "problems,", "b": [0.7671, 0.2496, 0.8465, 0.2646]}, {"w": "or", "b": [0.8527, 0.2496, 0.8694, 0.2646]}, {"w": "insignificant", "b": [0.1312, 0.2676, 0.2299, 0.2825]}, {"w": "for", "b": [0.2361, 0.2676, 0.2586, 0.2825]}, {"w": "others.", "b": [0.2647, 0.2676, 0.3202, 0.2825]}, {"w": "The", "b": [0.3284, 0.2676, 0.3607, 0.2825]}, {"w": "cost", "b": [0.3669, 0.2676, 0.3994, 0.2825]}, {"w": "of", "b": [0.4055, 0.2676, 0.4206, 0.2825]}, {"w": "gathering", "b": [0.4268, 0.2676, 0.504, 0.2825]}, {"w": "additional", "b": [0.5102, 0.2676, 0.5926, 0.2825]}, {"w": "labeled", "b": [0.5987, 0.2676, 0.6566, 0.2825]}, {"w": "night-time", "b": [0.6628, 0.2676, 0.7478, 0.2825]}, {"w": "images", "b": [0.754, 0.2676, 0.8093, 0.2825]}, {"w": "can", "b": [0.8155, 0.2676, 0.8436, 0.2825]}, {"w": "be", "b": [0.8498, 0.2676, 0.8691, 0.2825]}, {"w": "significant", "b": [0.1312, 0.2855, 0.2129, 0.3005]}, {"w": "and", "b": [0.219, 0.2855, 0.2488, 0.3005]}, {"w": "might", "b": [0.2549, 0.2855, 0.3016, 0.3005]}, {"w": "not", "b": [0.3077, 0.2855, 0.3344, 0.3005]}, {"w": "be", "b": [0.3405, 0.2855, 0.3595, 0.3005]}, {"w": "worth", "b": [0.3656, 0.2855, 0.4123, 0.3005]}, {"w": "the", "b": [0.4185, 0.2855, 0.4441, 0.3005]}, {"w": "effort.", "b": [0.4503, 0.2855, 0.498, 0.3005]}]}, {"id": "b_3", "type": "paragraph", "text": "To fix an error pattern, you can use one or a combination of techniques:", "words": [{"w": "To", "b": [0.1306, 0.3124, 0.1516, 0.3274]}, {"w": "fix", "b": [0.1577, 0.3124, 0.1777, 0.3274]}, {"w": "an", "b": [0.1839, 0.3124, 0.2034, 0.3274]}, {"w": "error", "b": [0.2095, 0.3124, 0.2486, 0.3274]}, {"w": "pattern,", "b": [0.2548, 0.3124, 0.3195, 0.3274]}, {"w": "you", "b": [0.3256, 0.3124, 0.3543, 0.3274]}, {"w": "can", "b": [0.3604, 0.3124, 0.3881, 0.3274]}, {"w": "use", "b": [0.3943, 0.3124, 0.4201, 0.3274]}, {"w": "one", "b": [0.4262, 0.3124, 0.4539, 0.3274]}, {"w": "or", "b": [0.46, 0.3124, 0.4765, 0.3274]}, {"w": "a", "b": [0.4826, 0.3124, 0.4919, 0.3274]}, {"w": "combination", "b": [0.498, 0.3124, 0.597, 0.3274]}, {"w": "of", "b": [0.6031, 0.3124, 0.618, 0.3274]}, {"w": "techniques:", "b": [0.6241, 0.3124, 0.7135, 0.3274]}]}, {"id": "b_4", "type": "paragraph", "text": "• preprocessing the input (e.g. image background removal, text spelling correction); • data augmentation (e.g., blurring or cropping of images); • labeling more training examples; and • engineering new features that would allow the learning algorithm to distinguish between “hard” cases.", "words": [{"w": "•", "b": [0.1538, 0.3394, 0.1681, 0.3543]}, {"w": "preprocessing", "b": [0.1774, 0.3394, 0.2859, 0.3543]}, {"w": "the", "b": [0.292, 0.3394, 0.3177, 0.3543]}, {"w": "input", "b": [0.3238, 0.3394, 0.3669, 0.3543]}, {"w": "(e.g.", "b": [0.373, 0.3394, 0.4079, 0.3543]}, {"w": "image", "b": [0.4141, 0.3394, 0.4612, 0.3543]}, {"w": "background", "b": [0.4674, 0.3394, 0.5608, 0.3543]}, {"w": "removal,", "b": [0.5669, 0.3394, 0.6346, 0.3543]}, {"w": "text", "b": [0.6408, 0.3394, 0.6731, 0.3543]}, {"w": "spelling", "b": [0.6792, 0.3394, 0.7404, 0.3543]}, {"w": "correction);", "b": [0.7465, 0.3394, 0.8389, 0.3543]}, {"w": "•", "b": [0.1538, 0.3573, 0.1681, 0.3723]}, {"w": "data", "b": [0.1774, 0.3573, 0.2132, 0.3723]}, {"w": "augmentation", "b": [0.2194, 0.3573, 0.3296, 0.3723]}, {"w": "(e.g.,", "b": [0.3358, 0.3573, 0.3758, 0.3723]}, {"w": "blurring", "b": [0.3819, 0.3573, 0.4466, 0.3723]}, {"w": "or", "b": [0.4528, 0.3573, 0.4692, 0.3723]}, {"w": "cropping", "b": [0.4754, 0.3573, 0.5452, 0.3723]}, {"w": "of", "b": [0.5513, 0.3573, 0.5662, 0.3723]}, {"w": "images);", "b": [0.5723, 0.3573, 0.6391, 0.3723]}, {"w": "•", "b": [0.1538, 0.3752, 0.1681, 0.3902]}, {"w": "labeling", "b": [0.1774, 0.3752, 0.2404, 0.3902]}, {"w": "more", "b": [0.2466, 0.3752, 0.2866, 0.3902]}, {"w": "training", "b": [0.2928, 0.3752, 0.3564, 0.3902]}, {"w": "examples;", "b": [0.3625, 0.3752, 0.4411, 0.3902]}, {"w": "and", "b": [0.4472, 0.3752, 0.477, 0.3902]}, {"w": "•", "b": [0.1538, 0.3932, 0.1681, 0.4082]}, {"w": "engineering", "b": [0.1774, 0.3932, 0.2669, 0.4082]}, {"w": "new", "b": [0.272, 0.3932, 0.3032, 0.4082]}, {"w": "features", "b": [0.3083, 0.3932, 0.3703, 0.4082]}, {"w": "that", "b": [0.3755, 0.3932, 0.4086, 0.4082]}, {"w": "would", "b": [0.4138, 0.3932, 0.4605, 0.4082]}, {"w": "allow", "b": [0.4657, 0.3932, 0.5064, 0.4082]}, {"w": "the", "b": [0.5115, 0.3932, 0.5366, 0.4082]}, {"w": "learning", "b": [0.5418, 0.3932, 0.6052, 0.4082]}, {"w": "algorithm", "b": [0.6103, 0.3932, 0.6868, 0.4082]}, {"w": "to", "b": [0.6919, 0.3932, 0.708, 0.4082]}, {"w": "distinguish", "b": [0.7132, 0.3932, 0.7988, 0.4082]}, {"w": "between", "b": [0.8037, 0.3932, 0.8688, 0.4082]}, {"w": "“hard”", "b": [0.1747, 0.4111, 0.2291, 0.4261]}, {"w": "cases.", "b": [0.2353, 0.4111, 0.2806, 0.4261]}]}, {"id": "b_5", "type": "paragraph", "text": "6.6.4 Error Analysis in Complex Systems", "words": [{"w": "6.6.4", "b": [0.1312, 0.4593, 0.1749, 0.4743]}, {"w": "Error", "b": [0.1961, 0.4593, 0.2469, 0.4743]}, {"w": "Analysis", "b": [0.2539, 0.4593, 0.3318, 0.4743]}, {"w": "in", "b": [0.3389, 0.4593, 0.3566, 0.4743]}, {"w": "Complex", "b": [0.3637, 0.4593, 0.4459, 0.4743]}, {"w": "Systems", "b": [0.453, 0.4593, 0.5284, 0.4743]}]}, {"id": "b_6", "type": "paragraph", "text": "Let’s say you work on a complex document classification system that consists of three chained models as shown below:", "words": [{"w": "Let’s", "b": [0.1312, 0.4956, 0.1698, 0.5105]}, {"w": "say", "b": [0.1752, 0.4956, 0.2004, 0.5105]}, {"w": "you", "b": [0.2058, 0.4956, 0.2339, 0.5105]}, {"w": "work", "b": [0.2393, 0.4956, 0.2775, 0.5105]}, {"w": "on", "b": [0.2829, 0.4956, 0.302, 0.5105]}, {"w": "a", "b": [0.3074, 0.4956, 0.3164, 0.5105]}, {"w": "complex", "b": [0.3218, 0.4956, 0.3866, 0.5105]}, {"w": "document", "b": [0.392, 0.4956, 0.4694, 0.5105]}, {"w": "classification", "b": [0.4747, 0.4956, 0.5744, 0.5105]}, {"w": "system", "b": [0.5798, 0.4956, 0.6338, 0.5105]}, {"w": "that", "b": [0.6392, 0.4956, 0.6723, 0.5105]}, {"w": "consists", "b": [0.6777, 0.4956, 0.7383, 0.5105]}, {"w": "of", "b": [0.7437, 0.4956, 0.7583, 0.5105]}, {"w": "three", "b": [0.7637, 0.4956, 0.8039, 0.5105]}, {"w": "chained", "b": [0.8093, 0.4956, 0.8691, 0.5105]}, {"w": "models", "b": [0.1312, 0.5135, 0.1872, 0.5285]}, {"w": "as", "b": [0.1934, 0.5135, 0.2099, 0.5285]}, {"w": "shown", "b": [0.216, 0.5135, 0.2659, 0.5285]}, {"w": "below:", "b": [0.272, 0.5135, 0.3233, 0.5285]}]}, {"id": "b_7", "type": "paragraph", "text": "Detect language Translate Classify Input Output", "words": [{"w": "Detect", "b": [0.3204, 0.5611, 0.3672, 0.5742]}, {"w": "language", "b": [0.3105, 0.5762, 0.377, 0.5894]}, {"w": "Translate", "b": [0.4551, 0.5686, 0.5219, 0.5818]}, {"w": "Classify", "b": [0.6049, 0.5686, 0.6616, 0.5818]}, {"w": "Input", "b": [0.2052, 0.5666, 0.2412, 0.5797]}, {"w": "Output", "b": [0.7413, 0.5673, 0.7898, 0.5804]}]}, {"id": "b_8", "type": "paragraph", "text": "Figure 9: A complex document classification system.", "words": [{"w": "Figure", "b": [0.287, 0.6181, 0.3391, 0.6331]}, {"w": "9:", "b": [0.3452, 0.6181, 0.3596, 0.6331]}, {"w": "A", "b": [0.3678, 0.6181, 0.3816, 0.6331]}, {"w": "complex", "b": [0.3877, 0.6181, 0.4539, 0.6331]}, {"w": "document", "b": [0.46, 0.6181, 0.539, 0.6331]}, {"w": "classification", "b": [0.5451, 0.6181, 0.6469, 0.6331]}, {"w": "system.", "b": [0.653, 0.6181, 0.7132, 0.6331]}]}, {"id": "b_9", "type": "paragraph", "text": "Let the accuracy of the entire system be 73%. If the classification is binary, the accuracy of 73% doesn’t seem high. On the other hand, if the classification model (the rightmost block in Figure 9) supports thousands of classes, then the accuracy of 73% doesn’t seem too low. For some business cases, however, the user might expect human-like, or even superhuman performance.", "words": [{"w": "Let", "b": [0.1312, 0.6684, 0.158, 0.6833]}, {"w": "the", "b": [0.1642, 0.6684, 0.1897, 0.6833]}, {"w": "accuracy", "b": [0.1959, 0.6684, 0.2658, 0.6833]}, {"w": "of", "b": [0.272, 0.6684, 0.2868, 0.6833]}, {"w": "the", "b": [0.2929, 0.6684, 0.3185, 0.6833]}, {"w": "entire", "b": [0.3246, 0.6684, 0.3701, 0.6833]}, {"w": "system", "b": [0.3762, 0.6684, 0.431, 0.6833]}, {"w": "be", "b": [0.4372, 0.6684, 0.4561, 0.6833]}, {"w": "73%.", "b": [0.4621, 0.6684, 0.5008, 0.6833]}, {"w": "If", "b": [0.5091, 0.6684, 0.5213, 0.6833]}, {"w": "the", "b": [0.5275, 0.6684, 0.553, 0.6833]}, {"w": "classification", "b": [0.5591, 0.6684, 0.6604, 0.6833]}, {"w": "is", "b": [0.6666, 0.6684, 0.6789, 0.6833]}, {"w": "binary,", "b": [0.6851, 0.6684, 0.7402, 0.6833]}, {"w": "the", "b": [0.7464, 0.6684, 0.7719, 0.6833]}, {"w": "accuracy", "b": [0.7781, 0.6684, 0.848, 0.6833]}, {"w": "of", "b": [0.8542, 0.6684, 0.869, 0.6833]}, {"w": "73%", "b": [0.1308, 0.6863, 0.1647, 0.7013]}, {"w": "doesn’t", "b": [0.1709, 0.6863, 0.2291, 0.7013]}, {"w": "seem", "b": [0.2353, 0.6863, 0.2745, 0.7013]}, {"w": "high.", "b": [0.2807, 0.6863, 0.3208, 0.7013]}, {"w": "On", "b": [0.329, 0.6863, 0.3537, 0.7013]}, {"w": "the", "b": [0.3599, 0.6863, 0.3856, 0.7013]}, {"w": "other", "b": [0.3917, 0.6863, 0.434, 0.7013]}, {"w": "hand,", "b": [0.4401, 0.6863, 0.4854, 0.7013]}, {"w": "if", "b": [0.4916, 0.6863, 0.5024, 0.7013]}, {"w": "the", "b": [0.5085, 0.6863, 0.5343, 0.7013]}, {"w": "classification", "b": [0.5404, 0.6863, 0.6426, 0.7013]}, {"w": "model", "b": [0.6487, 0.6863, 0.6976, 0.7013]}, {"w": "(the", "b": [0.7038, 0.6863, 0.7367, 0.7013]}, {"w": "rightmost", "b": [0.7428, 0.6863, 0.8207, 0.7013]}, {"w": "block", "b": [0.8269, 0.6863, 0.8696, 0.7013]}, {"w": "in", "b": [0.1312, 0.7043, 0.1468, 0.7192]}, {"w": "Figure", "b": [0.1529, 0.7043, 0.2055, 0.7192]}, {"w": "9)", "b": [0.2116, 0.7043, 0.2282, 0.7192]}, {"w": "supports", "b": [0.2343, 0.7043, 0.3045, 0.7192]}, {"w": "thousands", "b": [0.3106, 0.7043, 0.3926, 0.7192]}, {"w": "of", "b": [0.3987, 0.7043, 0.4137, 0.7192]}, {"w": "classes,", "b": [0.4199, 0.7043, 0.4782, 0.7192]}, {"w": "then", "b": [0.4843, 0.7043, 0.5206, 0.7192]}, {"w": "the", "b": [0.5267, 0.7043, 0.5526, 0.7192]}, {"w": "accuracy", "b": [0.5588, 0.7043, 0.6297, 0.7192]}, {"w": "of", "b": [0.6358, 0.7043, 0.6508, 0.7192]}, {"w": "73%", "b": [0.6567, 0.7043, 0.6908, 0.7192]}, {"w": "doesn’t", "b": [0.697, 0.7043, 0.7556, 0.7192]}, {"w": "seem", "b": [0.7617, 0.7043, 0.8011, 0.7192]}, {"w": "too", "b": [0.8073, 0.7043, 0.8337, 0.7192]}, {"w": "low.", "b": [0.8398, 0.7043, 0.8724, 0.7192]}, {"w": "For", "b": [0.1312, 0.7222, 0.1588, 0.7372]}, {"w": "some", "b": [0.165, 0.7222, 0.2058, 0.7372]}, {"w": "business", "b": [0.212, 0.7222, 0.2793, 0.7372]}, {"w": "cases,", "b": [0.2855, 0.7222, 0.3318, 0.7372]}, {"w": "however,", "b": [0.338, 0.7222, 0.4092, 0.7372]}, {"w": "the", "b": [0.4154, 0.7222, 0.4415, 0.7372]}, {"w": "user", "b": [0.4477, 0.7222, 0.4814, 0.7372]}, {"w": "might", "b": [0.4876, 0.7222, 0.5351, 0.7372]}, {"w": "expect", "b": [0.5413, 0.7222, 0.5947, 0.7372]}, {"w": "human-like,", "b": [0.6009, 0.7222, 0.6966, 0.7372]}, {"w": "or", "b": [0.7028, 0.7222, 0.7196, 0.7372]}, {"w": "even", "b": [0.7258, 0.7222, 0.7624, 0.7372]}, {"w": "superhuman", "b": [0.7686, 0.7222, 0.8692, 0.7372]}, {"w": "performance.", "b": [0.1312, 0.7401, 0.2359, 0.7551]}]}, {"id": "b_10", "type": "paragraph", "text": "Imagine that you are in a position, where the business expects a higher than 73% performance from the document classification system you have built. To get the most out of your additional effort, you must decide which part of the system needs improvement in the first place.", "words": [{"w": "Imagine", "b": [0.1312, 0.7671, 0.194, 0.782]}, {"w": "that", "b": [0.1992, 0.7671, 0.2324, 0.782]}, {"w": "you", "b": [0.2375, 0.7671, 0.2657, 0.782]}, {"w": "are", "b": [0.2708, 0.7671, 0.295, 0.782]}, {"w": "in", "b": [0.3002, 0.7671, 0.3153, 0.782]}, {"w": "a", "b": [0.3204, 0.7671, 0.3295, 0.782]}, {"w": "position,", "b": [0.3347, 0.7671, 0.4026, 0.782]}, {"w": "where", "b": [0.408, 0.7671, 0.4543, 0.782]}, {"w": "the", "b": [0.4594, 0.7671, 0.4846, 0.782]}, {"w": "business", "b": [0.4897, 0.7671, 0.5544, 0.782]}, {"w": "expects", "b": [0.5596, 0.7671, 0.618, 0.782]}, {"w": "a", "b": [0.6232, 0.7671, 0.6322, 0.782]}, {"w": "higher", "b": [0.6374, 0.7671, 0.6867, 0.782]}, {"w": "than", "b": [0.6918, 0.7671, 0.728, 0.782]}, {"w": "73%", "b": [0.7329, 0.7671, 0.766, 0.782]}, {"w": "performance", "b": [0.7712, 0.7671, 0.8688, 0.782]}, {"w": "from", "b": [0.1312, 0.785, 0.168, 0.8]}, {"w": "the", "b": [0.1728, 0.785, 0.1979, 0.8]}, {"w": "document", "b": [0.2028, 0.785, 0.2801, 0.8]}, {"w": "classification", "b": [0.285, 0.785, 0.3847, 0.8]}, {"w": "system", "b": [0.3895, 0.785, 0.4435, 0.8]}, {"w": "you", "b": [0.4483, 0.785, 0.4765, 0.8]}, {"w": "have", "b": [0.4813, 0.785, 0.517, 0.8]}, {"w": "built.", "b": [0.5218, 0.785, 0.564, 0.8]}, {"w": "To", "b": [0.5718, 0.785, 0.5924, 0.8]}, {"w": "get", "b": [0.5972, 0.785, 0.6213, 0.8]}, {"w": "the", "b": [0.6262, 0.785, 0.6513, 0.8]}, {"w": "most", "b": [0.6561, 0.785, 0.6944, 0.8]}, {"w": "out", "b": [0.6992, 0.785, 0.7254, 0.8]}, {"w": "of", "b": [0.7302, 0.785, 0.7448, 0.8]}, {"w": "your", "b": [0.7496, 0.785, 0.7848, 0.8]}, {"w": "additional", "b": [0.7897, 0.785, 0.8691, 0.8]}, {"w": "effort,", "b": [0.1312, 0.803, 0.179, 0.8179]}, {"w": "you", "b": [0.1851, 0.803, 0.2138, 0.8179]}, {"w": "must", "b": [0.22, 0.803, 0.2595, 0.8179]}, {"w": "decide", "b": [0.2657, 0.803, 0.316, 0.8179]}, {"w": "which", "b": [0.3221, 0.803, 0.3688, 0.8179]}, {"w": "part", "b": [0.3749, 0.803, 0.4088, 0.8179]}, {"w": "of", "b": [0.415, 0.803, 0.4298, 0.8179]}, {"w": "the", "b": [0.436, 0.803, 0.4616, 0.8179]}, {"w": "system", "b": [0.4678, 0.803, 0.5228, 0.8179]}, {"w": "needs", "b": [0.529, 0.803, 0.5732, 0.8179]}, {"w": "improvement", "b": [0.5794, 0.803, 0.684, 0.8179]}, {"w": "in", "b": [0.6902, 0.803, 0.7055, 0.8179]}, {"w": "the", "b": [0.7117, 0.803, 0.7373, 0.8179]}, {"w": "first", "b": [0.7435, 0.803, 0.7754, 0.8179]}, {"w": "place.", "b": [0.7816, 0.803, 0.8277, 0.8179]}]}, {"id": "b_11", "type": "paragraph", "text": "When the decision about something is made on several chained levels, like in the problem shown", "words": [{"w": "When", "b": [0.1303, 0.8299, 0.177, 0.8448]}, {"w": "the", "b": [0.1813, 0.8299, 0.2064, 0.8448]}, {"w": "decision", "b": [0.2106, 0.8299, 0.273, 0.8448]}, {"w": "about", "b": [0.2773, 0.8299, 0.323, 0.8448]}, {"w": "something", "b": [0.3272, 0.8299, 0.4077, 0.8448]}, {"w": "is", "b": [0.4119, 0.8299, 0.4241, 0.8448]}, {"w": "made", "b": [0.4283, 0.8299, 0.4705, 0.8448]}, {"w": "on", "b": [0.4748, 0.8299, 0.4939, 0.8448]}, {"w": "several", "b": [0.4981, 0.8299, 0.5515, 0.8448]}, {"w": "chained", "b": [0.5557, 0.8299, 0.6155, 0.8448]}, {"w": "levels,", "b": [0.6198, 0.8299, 0.6671, 0.8448]}, {"w": "like", "b": [0.6717, 0.8299, 0.6988, 0.8448]}, {"w": "in", "b": [0.7031, 0.8299, 0.7182, 0.8448]}, {"w": "the", "b": [0.7224, 0.8299, 0.7475, 0.8448]}, {"w": "problem", "b": [0.7517, 0.8299, 0.8161, 0.8448]}, {"w": "shown", "b": [0.8203, 0.8299, 0.8692, 0.8448]}]}, {"id": "b_12", "type": "paragraph", "text": "in Figure 9, and when those decisions are independent of one another, the accuracy multiplies.", "words": [{"w": "in", "b": [0.1312, 0.8478, 0.1463, 0.8628]}, {"w": "Figure", "b": [0.1517, 0.8478, 0.2028, 0.8628]}, {"w": "9,", "b": [0.2082, 0.8478, 0.2223, 0.8628]}, {"w": "and", "b": [0.2279, 0.8478, 0.257, 0.8628]}, {"w": "when", "b": [0.2624, 0.8478, 0.3036, 0.8628]}, {"w": "those", "b": [0.3091, 0.8478, 0.3504, 0.8628]}, {"w": "decisions", "b": [0.3558, 0.8478, 0.4254, 0.8628]}, {"w": "are", "b": [0.4308, 0.8478, 0.455, 0.8628]}, {"w": "independent", "b": [0.4604, 0.8478, 0.5569, 0.8628]}, {"w": "of", "b": [0.5624, 0.8478, 0.5769, 0.8628]}, {"w": "one", "b": [0.5824, 0.8478, 0.6095, 0.8628]}, {"w": "another,", "b": [0.6149, 0.8478, 0.6803, 0.8628]}, {"w": "the", "b": [0.6859, 0.8478, 0.711, 0.8628]}, {"w": "accuracy", "b": [0.7164, 0.8478, 0.7853, 0.8628]}, {"w": "multiplies.", "b": [0.7908, 0.8478, 0.8728, 0.8628]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 30", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "30", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 206, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "For example, if the language predictor accuracy was 95%, the machine translation model accuracy6 was 90%, and the classifier accuracy was 85%, then, in the case of independence of the three models, the overall accuracy of the entire three-stage system would be 0.95 × 0.90 × 0.85 = 0.73, or 73 percent. At first glance, it seems obvious that the most gain in the entire system’s accuracy would come from maximizing the accuracy of the third model — the classifier. However, in practice, some errors made by a given model might not significantly affect the overall performance of the system. For example, if the language predictor often confuses Spanish and Portuguese, the machine translation model could still be capable of generating an adequate translation for the third-stage classification model.", "words": [{"w": "For", "b": [0.1312, 0.0881, 0.1588, 0.1031]}, {"w": "example,", "b": [0.1654, 0.0881, 0.2381, 0.1031]}, {"w": "if", "b": [0.2449, 0.0881, 0.2559, 0.1031]}, {"w": "the", "b": [0.2626, 0.0881, 0.2887, 0.1031]}, {"w": "language", "b": [0.2954, 0.0881, 0.3676, 0.1031]}, {"w": "predictor", "b": [0.3742, 0.0881, 0.4486, 0.1031]}, {"w": "accuracy", "b": [0.4553, 0.0881, 0.527, 0.1031]}, {"w": "was", "b": [0.5336, 0.0881, 0.5635, 0.1031]}, {"w": "95%,", "b": [0.57, 0.0881, 0.6097, 0.1031]}, {"w": "the", "b": [0.6165, 0.0881, 0.6427, 0.1031]}, {"w": "machine", "b": [0.6494, 0.0881, 0.7168, 0.1031]}, {"w": "translation", "b": [0.7235, 0.0881, 0.8125, 0.1031]}, {"w": "model", "b": [0.8192, 0.0881, 0.8689, 0.1031]}, {"w": "accuracy6", "b": [0.1312, 0.1044, 0.2094, 0.121]}, {"w": "was", "b": [0.2165, 0.106, 0.246, 0.121]}, {"w": "90%,", "b": [0.2522, 0.106, 0.2914, 0.121]}, {"w": "and", "b": [0.2976, 0.106, 0.3275, 0.121]}, {"w": "the", "b": [0.3337, 0.106, 0.3595, 0.121]}, {"w": "classifier", "b": [0.3657, 0.106, 0.4342, 0.121]}, {"w": "accuracy", "b": [0.4403, 0.106, 0.5112, 0.121]}, {"w": "was", "b": [0.5173, 0.106, 0.5469, 0.121]}, {"w": "85%,", "b": [0.5529, 0.106, 0.5921, 0.121]}, {"w": "then,", "b": [0.5983, 0.106, 0.6396, 0.121]}, {"w": "in", "b": [0.6458, 0.106, 0.6613, 0.121]}, {"w": "the", "b": [0.6674, 0.106, 0.6933, 0.121]}, {"w": "case", "b": [0.6994, 0.106, 0.7326, 0.121]}, {"w": "of", "b": [0.7387, 0.106, 0.7537, 0.121]}, {"w": "independence", "b": [0.7599, 0.106, 0.869, 0.121]}, {"w": "of", "b": [0.1312, 0.124, 0.1464, 0.1389]}, {"w": "the", "b": [0.1526, 0.124, 0.1787, 0.1389]}, {"w": "three", "b": [0.1849, 0.124, 0.2268, 0.1389]}, {"w": "models,", "b": [0.233, 0.124, 0.2953, 0.1389]}, {"w": "the", "b": [0.3015, 0.124, 0.3277, 0.1389]}, {"w": "overall", "b": [0.3338, 0.124, 0.3878, 0.1389]}, {"w": "accuracy", "b": [0.394, 0.124, 0.4657, 0.1389]}, {"w": "of", "b": [0.4718, 0.124, 0.487, 0.1389]}, {"w": "the", "b": [0.4932, 0.124, 0.5193, 0.1389]}, {"w": "entire", "b": [0.5255, 0.124, 0.5721, 0.1389]}, {"w": "three-stage", "b": [0.5783, 0.124, 0.6684, 0.1389]}, {"w": "system", "b": [0.6746, 0.124, 0.7308, 0.1389]}, {"w": "would", "b": [0.737, 0.124, 0.7856, 0.1389]}, {"w": "be", "b": [0.7918, 0.124, 0.8111, 0.1389]}, {"w": "0.95", "b": [0.8169, 0.124, 0.8503, 0.1392]}, {"w": "×", "b": [0.8544, 0.1241, 0.8688, 0.139]}, {"w": "0.90", "b": [0.1312, 0.1419, 0.1637, 0.1572]}, {"w": "×", "b": [0.1678, 0.142, 0.1822, 0.157]}, {"w": "0.85", "b": [0.1862, 0.1419, 0.2187, 0.1572]}, {"w": "=", "b": [0.2238, 0.1419, 0.238, 0.1569]}, {"w": "0.73,", "b": [0.2431, 0.1419, 0.2807, 0.1572]}, {"w": "or", "b": [0.2868, 0.1419, 0.3031, 0.1569]}, {"w": "73", "b": [0.3092, 0.1419, 0.3274, 0.1569]}, {"w": "percent.", "b": [0.3336, 0.1419, 0.3975, 0.1569]}, {"w": "At", "b": [0.4057, 0.1419, 0.4259, 0.1569]}, {"w": "first", "b": [0.4321, 0.1419, 0.4637, 0.1569]}, {"w": "glance,", "b": [0.4698, 0.1419, 0.5245, 0.1569]}, {"w": "it", "b": [0.5307, 0.1419, 0.5428, 0.1569]}, {"w": "seems", "b": [0.549, 0.1419, 0.5948, 0.1569]}, {"w": "obvious", "b": [0.6009, 0.1419, 0.6608, 0.1569]}, {"w": "that", "b": [0.667, 0.1419, 0.7004, 0.1569]}, {"w": "the", "b": [0.7065, 0.1419, 0.7319, 0.1569]}, {"w": "most", "b": [0.738, 0.1419, 0.7766, 0.1569]}, {"w": "gain", "b": [0.7827, 0.1419, 0.8162, 0.1569]}, {"w": "in", "b": [0.8223, 0.1419, 0.8375, 0.1569]}, {"w": "the", "b": [0.8437, 0.1419, 0.869, 0.1569]}, {"w": "entire", "b": [0.1312, 0.1599, 0.176, 0.1748]}, {"w": "system’s", "b": [0.1817, 0.1599, 0.2478, 0.1748]}, {"w": "accuracy", "b": [0.2535, 0.1599, 0.3224, 0.1748]}, {"w": "would", "b": [0.3281, 0.1599, 0.3748, 0.1748]}, {"w": "come", "b": [0.3805, 0.1599, 0.4207, 0.1748]}, {"w": "from", "b": [0.4264, 0.1599, 0.4631, 0.1748]}, {"w": "maximizing", "b": [0.4688, 0.1599, 0.5597, 0.1748]}, {"w": "the", "b": [0.5654, 0.1599, 0.5905, 0.1748]}, {"w": "accuracy", "b": [0.5962, 0.1599, 0.6651, 0.1748]}, {"w": "of", "b": [0.6708, 0.1599, 0.6853, 0.1748]}, {"w": "the", "b": [0.691, 0.1599, 0.7161, 0.1748]}, {"w": "third", "b": [0.7218, 0.1599, 0.7611, 0.1748]}, {"w": "model", "b": [0.7668, 0.1599, 0.8145, 0.1748]}, {"w": "—", "b": [0.8202, 0.1599, 0.8383, 0.1748]}, {"w": "the", "b": [0.844, 0.1599, 0.8691, 0.1748]}, {"w": "classifier.", "b": [0.1312, 0.1778, 0.2051, 0.1928]}, {"w": "However,", "b": [0.2133, 0.1778, 0.2875, 0.1928]}, {"w": "in", "b": [0.2937, 0.1778, 0.3092, 0.1928]}, {"w": "practice,", "b": [0.3153, 0.1778, 0.3849, 0.1928]}, {"w": "some", "b": [0.391, 0.1778, 0.4316, 0.1928]}, {"w": "errors", "b": [0.4377, 0.1778, 0.4846, 0.1928]}, {"w": "made", "b": [0.4908, 0.1778, 0.5343, 0.1928]}, {"w": "by", "b": [0.5405, 0.1778, 0.5602, 0.1928]}, {"w": "a", "b": [0.5663, 0.1778, 0.5756, 0.1928]}, {"w": "given", "b": [0.5818, 0.1778, 0.6243, 0.1928]}, {"w": "model", "b": [0.6304, 0.1778, 0.6797, 0.1928]}, {"w": "might", "b": [0.6858, 0.1778, 0.733, 0.1928]}, {"w": "not", "b": [0.7391, 0.1778, 0.7661, 0.1928]}, {"w": "significantly", "b": [0.7722, 0.1778, 0.8698, 0.1928]}, {"w": "affect", "b": [0.1312, 0.1958, 0.1757, 0.2107]}, {"w": "the", "b": [0.1819, 0.1958, 0.2081, 0.2107]}, {"w": "overall", "b": [0.2144, 0.1958, 0.2683, 0.2107]}, {"w": "performance", "b": [0.2746, 0.1958, 0.3762, 0.2107]}, {"w": "of", "b": [0.3824, 0.1958, 0.3976, 0.2107]}, {"w": "the", "b": [0.4039, 0.1958, 0.43, 0.2107]}, {"w": "system.", "b": [0.4363, 0.1958, 0.4977, 0.2107]}, {"w": "For", "b": [0.5062, 0.1958, 0.5338, 0.2107]}, {"w": "example,", "b": [0.54, 0.1958, 0.6127, 0.2107]}, {"w": "if", "b": [0.619, 0.1958, 0.63, 0.2107]}, {"w": "the", "b": [0.6363, 0.1958, 0.6624, 0.2107]}, {"w": "language", "b": [0.6687, 0.1958, 0.7409, 0.2107]}, {"w": "predictor", "b": [0.7471, 0.1958, 0.8215, 0.2107]}, {"w": "often", "b": [0.8278, 0.1958, 0.8691, 0.2107]}, {"w": "confuses", "b": [0.1312, 0.2137, 0.1989, 0.2287]}, {"w": "Spanish", "b": [0.2053, 0.2137, 0.2693, 0.2287]}, {"w": "and", "b": [0.2757, 0.2137, 0.306, 0.2287]}, {"w": "Portuguese,", "b": [0.3124, 0.2137, 0.4085, 0.2287]}, {"w": "the", "b": [0.415, 0.2137, 0.4412, 0.2287]}, {"w": "machine", "b": [0.4475, 0.2137, 0.515, 0.2287]}, {"w": "translation", "b": [0.5214, 0.2137, 0.6105, 0.2287]}, {"w": "model", "b": [0.6169, 0.2137, 0.6666, 0.2287]}, {"w": "could", "b": [0.673, 0.2137, 0.7169, 0.2287]}, {"w": "still", "b": [0.7233, 0.2137, 0.7537, 0.2287]}, {"w": "be", "b": [0.7601, 0.2137, 0.7795, 0.2287]}, {"w": "capable", "b": [0.7859, 0.2137, 0.8476, 0.2287]}, {"w": "of", "b": [0.854, 0.2137, 0.8692, 0.2287]}, {"w": "generating", "b": [0.1312, 0.2317, 0.2154, 0.2466]}, {"w": "an", "b": [0.2215, 0.2317, 0.241, 0.2466]}, {"w": "adequate", "b": [0.2472, 0.2317, 0.3195, 0.2466]}, {"w": "translation", "b": [0.3256, 0.2317, 0.4129, 0.2466]}, {"w": "for", "b": [0.4191, 0.2317, 0.4412, 0.2466]}, {"w": "the", "b": [0.4473, 0.2317, 0.473, 0.2466]}, {"w": "third-stage", "b": [0.4791, 0.2317, 0.5664, 0.2466]}, {"w": "classification", "b": [0.5726, 0.2317, 0.6743, 0.2466]}, {"w": "model.", "b": [0.6805, 0.2317, 0.7343, 0.2466]}]}, {"id": "b_1", "type": "paragraph", "text": "While working on the third-stage classifier, you might have concluded that you reached its", "words": [{"w": "While", "b": [0.1303, 0.2586, 0.1785, 0.2735]}, {"w": "working", "b": [0.1846, 0.2586, 0.249, 0.2735]}, {"w": "on", "b": [0.2551, 0.2586, 0.2748, 0.2735]}, {"w": "the", "b": [0.2809, 0.2586, 0.3069, 0.2735]}, {"w": "third-stage", "b": [0.313, 0.2586, 0.4013, 0.2735]}, {"w": "classifier,", "b": [0.4074, 0.2586, 0.4813, 0.2735]}, {"w": "you", "b": [0.4874, 0.2586, 0.5165, 0.2735]}, {"w": "might", "b": [0.5226, 0.2586, 0.5698, 0.2735]}, {"w": "have", "b": [0.5759, 0.2586, 0.6127, 0.2735]}, {"w": "concluded", "b": [0.6189, 0.2586, 0.6998, 0.2735]}, {"w": "that", "b": [0.7059, 0.2586, 0.7401, 0.2735]}, {"w": "you", "b": [0.7462, 0.2586, 0.7753, 0.2735]}, {"w": "reached", "b": [0.7814, 0.2586, 0.8432, 0.2735]}, {"w": "its", "b": [0.8493, 0.2586, 0.8691, 0.2735]}]}, {"id": "b_2", "type": "paragraph", "text": "maximum performance, so it doesn’t make sense to continue. Now, which of the previous two models, the language detector and/or the machine translator, should you improve to increase the quality of the entire three-stage system?", "words": [{"w": "maximum", "b": [0.1312, 0.2765, 0.2128, 0.2915]}, {"w": "performance,", "b": [0.2192, 0.2765, 0.3259, 0.2915]}, {"w": "so", "b": [0.3324, 0.2765, 0.3492, 0.2915]}, {"w": "it", "b": [0.3556, 0.2765, 0.3682, 0.2915]}, {"w": "doesn’t", "b": [0.3745, 0.2765, 0.4337, 0.2915]}, {"w": "make", "b": [0.4401, 0.2765, 0.483, 0.2915]}, {"w": "sense", "b": [0.4894, 0.2765, 0.5314, 0.2915]}, {"w": "to", "b": [0.5378, 0.2765, 0.5545, 0.2915]}, {"w": "continue.", "b": [0.5609, 0.2765, 0.6352, 0.2915]}, {"w": "Now,", "b": [0.6441, 0.2765, 0.6859, 0.2915]}, {"w": "which", "b": [0.6924, 0.2765, 0.7399, 0.2915]}, {"w": "of", "b": [0.7463, 0.2765, 0.7615, 0.2915]}, {"w": "the", "b": [0.7679, 0.2765, 0.794, 0.2915]}, {"w": "previous", "b": [0.8004, 0.2765, 0.8691, 0.2915]}, {"w": "two", "b": [0.1312, 0.2945, 0.1605, 0.3094]}, {"w": "models,", "b": [0.1672, 0.2945, 0.2295, 0.3094]}, {"w": "the", "b": [0.2362, 0.2945, 0.2624, 0.3094]}, {"w": "language", "b": [0.269, 0.2945, 0.3412, 0.3094]}, {"w": "detector", "b": [0.3478, 0.2945, 0.4148, 0.3094]}, {"w": "and/or", "b": [0.4215, 0.2945, 0.478, 0.3094]}, {"w": "the", "b": [0.4846, 0.2945, 0.5108, 0.3094]}, {"w": "machine", "b": [0.5174, 0.2945, 0.5849, 0.3094]}, {"w": "translator,", "b": [0.5915, 0.2945, 0.6775, 0.3094]}, {"w": "should", "b": [0.6842, 0.2945, 0.7377, 0.3094]}, {"w": "you", "b": [0.7443, 0.2945, 0.7736, 0.3094]}, {"w": "improve", "b": [0.7803, 0.2945, 0.8457, 0.3094]}, {"w": "to", "b": [0.8523, 0.2945, 0.8691, 0.3094]}, {"w": "increase", "b": [0.1312, 0.3124, 0.195, 0.3274]}, {"w": "the", "b": [0.2011, 0.3124, 0.2268, 0.3274]}, {"w": "quality", "b": [0.2329, 0.3124, 0.2888, 0.3274]}, {"w": "of", "b": [0.295, 0.3124, 0.3098, 0.3274]}, {"w": "the", "b": [0.316, 0.3124, 0.3416, 0.3274]}, {"w": "entire", "b": [0.3478, 0.3124, 0.3935, 0.3274]}, {"w": "three-stage", "b": [0.3996, 0.3124, 0.488, 0.3274]}, {"w": "system?", "b": [0.4941, 0.3124, 0.5579, 0.3274]}]}, {"id": "b_3", "type": "paragraph", "text": "One way to determine the upper bound of an entire system’s potential is to perform the error analysis by parts. You replace one model’s predictions with perfect labels, such as human-provided labels. Then you calculate how the entire system performs. For example, instead of using the machine translation system at stage two in Figure 9, you can ask a professional human translator to translate the text from the predicted language (if the prediction of the language was correct), or keep the original text (if the prediction of the language was wrong).", "words": [{"w": "One", "b": [0.1312, 0.3394, 0.1647, 0.3543]}, {"w": "way", "b": [0.1717, 0.3394, 0.2036, 0.3543]}, {"w": "to", "b": [0.2105, 0.3394, 0.2273, 0.3543]}, {"w": "determine", "b": [0.2342, 0.3394, 0.3159, 0.3543]}, {"w": "the", "b": [0.3228, 0.3394, 0.349, 0.3543]}, {"w": "upper", "b": [0.3559, 0.3394, 0.4036, 0.3543]}, {"w": "bound", "b": [0.4105, 0.3394, 0.4623, 0.3543]}, {"w": "of", "b": [0.4693, 0.3394, 0.4844, 0.3543]}, {"w": "an", "b": [0.4914, 0.3394, 0.5112, 0.3543]}, {"w": "entire", "b": [0.5182, 0.3394, 0.5648, 0.3543]}, {"w": "system’s", "b": [0.5718, 0.3394, 0.6406, 0.3543]}, {"w": "potential", "b": [0.6476, 0.3394, 0.7208, 0.3543]}, {"w": "is", "b": [0.7278, 0.3394, 0.7404, 0.3543]}, {"w": "to", "b": [0.7474, 0.3394, 0.7641, 0.3543]}, {"w": "perform", "b": [0.7711, 0.3394, 0.836, 0.3543]}, {"w": "the", "b": [0.843, 0.3394, 0.8691, 0.3543]}, {"w": "error", "b": [0.1312, 0.3576, 0.1778, 0.3726]}, {"w": "analysis", "b": [0.1848, 0.3576, 0.257, 0.3726]}, {"w": "by", "b": [0.2641, 0.3576, 0.2865, 0.3726]}, {"w": "parts.", "b": [0.2935, 0.3573, 0.3461, 0.3726]}, {"w": "You", "b": [0.3542, 0.3573, 0.386, 0.3723]}, {"w": "replace", "b": [0.3922, 0.3573, 0.4486, 0.3723]}, {"w": "one", "b": [0.4548, 0.3573, 0.4824, 0.3723]}, {"w": "model’s", "b": [0.4886, 0.3573, 0.5497, 0.3723]}, {"w": "predictions", "b": [0.5558, 0.3573, 0.6442, 0.3723]}, {"w": "with", "b": [0.6503, 0.3573, 0.6862, 0.3723]}, {"w": "perfect", "b": [0.6923, 0.3573, 0.7478, 0.3723]}, {"w": "labels,", "b": [0.7539, 0.3573, 0.8048, 0.3723]}, {"w": "such", "b": [0.8109, 0.3573, 0.8464, 0.3723]}, {"w": "as", "b": [0.8526, 0.3573, 0.8691, 0.3723]}, {"w": "human-provided", "b": [0.1312, 0.3752, 0.2645, 0.3902]}, {"w": "labels.", "b": [0.2707, 0.3752, 0.3225, 0.3902]}, {"w": "Then", "b": [0.3307, 0.3752, 0.3735, 0.3902]}, {"w": "you", "b": [0.3797, 0.3752, 0.409, 0.3902]}, {"w": "calculate", "b": [0.4151, 0.3752, 0.4872, 0.3902]}, {"w": "how", "b": [0.4934, 0.3752, 0.5263, 0.3902]}, {"w": "the", "b": [0.5324, 0.3752, 0.5586, 0.3902]}, {"w": "entire", "b": [0.5647, 0.3752, 0.6113, 0.3902]}, {"w": "system", "b": [0.6174, 0.3752, 0.6735, 0.3902]}, {"w": "performs.", "b": [0.6797, 0.3752, 0.7572, 0.3902]}, {"w": "For", "b": [0.7654, 0.3752, 0.7929, 0.3902]}, {"w": "example,", "b": [0.7991, 0.3752, 0.8717, 0.3902]}, {"w": "instead", "b": [0.1312, 0.3932, 0.1899, 0.4082]}, {"w": "of", "b": [0.1972, 0.3932, 0.2124, 0.4082]}, {"w": "using", "b": [0.2197, 0.3932, 0.2627, 0.4082]}, {"w": "the", "b": [0.27, 0.3932, 0.2961, 0.4082]}, {"w": "machine", "b": [0.3034, 0.3932, 0.3709, 0.4082]}, {"w": "translation", "b": [0.3782, 0.3932, 0.4672, 0.4082]}, {"w": "system", "b": [0.4745, 0.3932, 0.5307, 0.4082]}, {"w": "at", "b": [0.538, 0.3932, 0.5547, 0.4082]}, {"w": "stage", "b": [0.562, 0.3932, 0.604, 0.4082]}, {"w": "two", "b": [0.6112, 0.3932, 0.6405, 0.4082]}, {"w": "in", "b": [0.6478, 0.3932, 0.6635, 0.4082]}, {"w": "Figure", "b": [0.6708, 0.3932, 0.724, 0.4082]}, {"w": "9,", "b": [0.7313, 0.3932, 0.7459, 0.4082]}, {"w": "you", "b": [0.7535, 0.3932, 0.7828, 0.4082]}, {"w": "can", "b": [0.7901, 0.3932, 0.8183, 0.4082]}, {"w": "ask", "b": [0.8256, 0.3932, 0.8524, 0.4082]}, {"w": "a", "b": [0.8597, 0.3932, 0.8691, 0.4082]}, {"w": "professional", "b": [0.1312, 0.4111, 0.2272, 0.4261]}, {"w": "human", "b": [0.2355, 0.4111, 0.2915, 0.4261]}, {"w": "translator", "b": [0.2998, 0.4111, 0.3805, 0.4261]}, {"w": "to", "b": [0.3888, 0.4111, 0.4055, 0.4261]}, {"w": "translate", "b": [0.4138, 0.4111, 0.4862, 0.4261]}, {"w": "the", "b": [0.4945, 0.4111, 0.5206, 0.4261]}, {"w": "text", "b": [0.5289, 0.4111, 0.5619, 0.4261]}, {"w": "from", "b": [0.5702, 0.4111, 0.6084, 0.4261]}, {"w": "the", "b": [0.6167, 0.4111, 0.6428, 0.4261]}, {"w": "predicted", "b": [0.6511, 0.4111, 0.7276, 0.4261]}, {"w": "language", "b": [0.7359, 0.4111, 0.8081, 0.4261]}, {"w": "(if", "b": [0.8163, 0.4111, 0.8347, 0.4261]}, {"w": "the", "b": [0.843, 0.4111, 0.8691, 0.4261]}, {"w": "prediction", "b": [0.1312, 0.4291, 0.2139, 0.444]}, {"w": "of", "b": [0.2206, 0.4291, 0.2357, 0.444]}, {"w": "the", "b": [0.2424, 0.4291, 0.2686, 0.444]}, {"w": "language", "b": [0.2752, 0.4291, 0.3474, 0.444]}, {"w": "was", "b": [0.354, 0.4291, 0.3839, 0.444]}, {"w": "correct),", "b": [0.3906, 0.4291, 0.4597, 0.444]}, {"w": "or", "b": [0.4665, 0.4291, 0.4833, 0.444]}, {"w": "keep", "b": [0.4899, 0.4291, 0.5266, 0.444]}, {"w": "the", "b": [0.5332, 0.4291, 0.5594, 0.444]}, {"w": "original", "b": [0.566, 0.4291, 0.6278, 0.444]}, {"w": "text", "b": [0.6345, 0.4291, 0.6674, 0.444]}, {"w": "(if", "b": [0.674, 0.4291, 0.6924, 0.444]}, {"w": "the", "b": [0.699, 0.4291, 0.7252, 0.444]}, {"w": "prediction", "b": [0.7318, 0.4291, 0.8145, 0.444]}, {"w": "of", "b": [0.8212, 0.4291, 0.8363, 0.444]}, {"w": "the", "b": [0.843, 0.4291, 0.8691, 0.444]}, {"w": "language", "b": [0.1312, 0.447, 0.202, 0.462]}, {"w": "was", "b": [0.2081, 0.447, 0.2374, 0.462]}, {"w": "wrong).", "b": [0.2436, 0.447, 0.3052, 0.462]}]}, {"id": "b_4", "type": "paragraph", "text": "Let’s say you asked a professional for a hundred translations. Now you can measure how perfect translations affect the overall system performance. Let the accuracy of the entire system’s output become 74%. So, the potential gain from improved translation in overall system performance is only one percentage point. Reaching the human-level performance for a machine translation model can turn out to be a daunting task, not worth the effort, especially when what we can achieve in the end is one percentage point gain for the entire system. So, you might prefer spending more time on building a better language predictor in stage 1, if the potential gain in overall system performance prediction quality is higher.", "words": [{"w": "Let’s", "b": [0.1312, 0.474, 0.1714, 0.4889]}, {"w": "say", "b": [0.1781, 0.474, 0.2043, 0.4889]}, {"w": "you", "b": [0.211, 0.474, 0.2403, 0.4889]}, {"w": "asked", "b": [0.247, 0.474, 0.2921, 0.4889]}, {"w": "a", "b": [0.2988, 0.474, 0.3082, 0.4889]}, {"w": "professional", "b": [0.3149, 0.474, 0.4109, 0.4889]}, {"w": "for", "b": [0.4176, 0.474, 0.4402, 0.4889]}, {"w": "a", "b": [0.4469, 0.474, 0.4563, 0.4889]}, {"w": "hundred", "b": [0.463, 0.474, 0.5305, 0.4889]}, {"w": "translations.", "b": [0.5372, 0.474, 0.6389, 0.4889]}, {"w": "Now", "b": [0.6488, 0.474, 0.6854, 0.4889]}, {"w": "you", "b": [0.6921, 0.474, 0.7214, 0.4889]}, {"w": "can", "b": [0.7281, 0.474, 0.7563, 0.4889]}, {"w": "measure", "b": [0.763, 0.474, 0.8301, 0.4889]}, {"w": "how", "b": [0.8368, 0.474, 0.8698, 0.4889]}, {"w": "perfect", "b": [0.1312, 0.4919, 0.1878, 0.5069]}, {"w": "translations", "b": [0.1945, 0.4919, 0.291, 0.5069]}, {"w": "affect", "b": [0.2978, 0.4919, 0.3422, 0.5069]}, {"w": "the", "b": [0.3489, 0.4919, 0.3751, 0.5069]}, {"w": "overall", "b": [0.3818, 0.4919, 0.4358, 0.5069]}, {"w": "system", "b": [0.4425, 0.4919, 0.4987, 0.5069]}, {"w": "performance.", "b": [0.5054, 0.4919, 0.6122, 0.5069]}, {"w": "Let", "b": [0.6222, 0.4919, 0.6496, 0.5069]}, {"w": "the", "b": [0.6564, 0.4919, 0.6825, 0.5069]}, {"w": "accuracy", "b": [0.6893, 0.4919, 0.761, 0.5069]}, {"w": "of", "b": [0.7677, 0.4919, 0.7829, 0.5069]}, {"w": "the", "b": [0.7896, 0.4919, 0.8158, 0.5069]}, {"w": "entire", "b": [0.8225, 0.4919, 0.8692, 0.5069]}, {"w": "system’s", "b": [0.1312, 0.5098, 0.2001, 0.5248]}, {"w": "output", "b": [0.2066, 0.5098, 0.262, 0.5248]}, {"w": "become", "b": [0.2685, 0.5098, 0.3297, 0.5248]}, {"w": "74%.", "b": [0.3361, 0.5098, 0.3758, 0.5248]}, {"w": "So,", "b": [0.3851, 0.5098, 0.4102, 0.5248]}, {"w": "the", "b": [0.4168, 0.5098, 0.4429, 0.5248]}, {"w": "potential", "b": [0.4494, 0.5098, 0.5226, 0.5248]}, {"w": "gain", "b": [0.5291, 0.5098, 0.5636, 0.5248]}, {"w": "from", "b": [0.5702, 0.5098, 0.6084, 0.5248]}, {"w": "improved", "b": [0.6149, 0.5098, 0.6908, 0.5248]}, {"w": "translation", "b": [0.6973, 0.5098, 0.7863, 0.5248]}, {"w": "in", "b": [0.7928, 0.5098, 0.8085, 0.5248]}, {"w": "overall", "b": [0.815, 0.5098, 0.869, 0.5248]}, {"w": "system", "b": [0.1312, 0.5278, 0.1874, 0.5428]}, {"w": "performance", "b": [0.1938, 0.5278, 0.2954, 0.5428]}, {"w": "is", "b": [0.3018, 0.5278, 0.3144, 0.5428]}, {"w": "only", "b": [0.3208, 0.5278, 0.3559, 0.5428]}, {"w": "one", "b": [0.3623, 0.5278, 0.3905, 0.5428]}, {"w": "percentage", "b": [0.3969, 0.5278, 0.4848, 0.5428]}, {"w": "point.", "b": [0.4912, 0.5278, 0.5394, 0.5428]}, {"w": "Reaching", "b": [0.5483, 0.5278, 0.6234, 0.5428]}, {"w": "the", "b": [0.6298, 0.5278, 0.6559, 0.5428]}, {"w": "human-level", "b": [0.6623, 0.5278, 0.7612, 0.5428]}, {"w": "performance", "b": [0.7676, 0.5278, 0.8691, 0.5428]}, {"w": "for", "b": [0.1312, 0.5457, 0.1538, 0.5607]}, {"w": "a", "b": [0.1603, 0.5457, 0.1697, 0.5607]}, {"w": "machine", "b": [0.1762, 0.5457, 0.2437, 0.5607]}, {"w": "translation", "b": [0.2501, 0.5457, 0.3392, 0.5607]}, {"w": "model", "b": [0.3457, 0.5457, 0.3954, 0.5607]}, {"w": "can", "b": [0.4019, 0.5457, 0.4301, 0.5607]}, {"w": "turn", "b": [0.4366, 0.5457, 0.4722, 0.5607]}, {"w": "out", "b": [0.4787, 0.5457, 0.5059, 0.5607]}, {"w": "to", "b": [0.5124, 0.5457, 0.5291, 0.5607]}, {"w": "be", "b": [0.5356, 0.5457, 0.555, 0.5607]}, {"w": "a", "b": [0.5615, 0.5457, 0.5709, 0.5607]}, {"w": "daunting", "b": [0.5774, 0.5457, 0.6501, 0.5607]}, {"w": "task,", "b": [0.6565, 0.5457, 0.6959, 0.5607]}, {"w": "not", "b": [0.7025, 0.5457, 0.7297, 0.5607]}, {"w": "worth", "b": [0.7361, 0.5457, 0.7838, 0.5607]}, {"w": "the", "b": [0.7903, 0.5457, 0.8164, 0.5607]}, {"w": "effort,", "b": [0.8229, 0.5457, 0.8716, 0.5607]}, {"w": "especially", "b": [0.1312, 0.5637, 0.2093, 0.5786]}, {"w": "when", "b": [0.2154, 0.5637, 0.258, 0.5786]}, {"w": "what", "b": [0.2642, 0.5637, 0.3047, 0.5786]}, {"w": "we", "b": [0.3108, 0.5637, 0.3321, 0.5786]}, {"w": "can", "b": [0.3383, 0.5637, 0.3663, 0.5786]}, {"w": "achieve", "b": [0.3725, 0.5637, 0.4312, 0.5786]}, {"w": "in", "b": [0.4374, 0.5637, 0.453, 0.5786]}, {"w": "the", "b": [0.4591, 0.5637, 0.4851, 0.5786]}, {"w": "end", "b": [0.4913, 0.5637, 0.5204, 0.5786]}, {"w": "is", "b": [0.5265, 0.5637, 0.5391, 0.5786]}, {"w": "one", "b": [0.5453, 0.5637, 0.5733, 0.5786]}, {"w": "percentage", "b": [0.5795, 0.5637, 0.6668, 0.5786]}, {"w": "point", "b": [0.673, 0.5637, 0.7156, 0.5786]}, {"w": "gain", "b": [0.7217, 0.5637, 0.756, 0.5786]}, {"w": "for", "b": [0.7622, 0.5637, 0.7846, 0.5786]}, {"w": "the", "b": [0.7907, 0.5637, 0.8167, 0.5786]}, {"w": "entire", "b": [0.8229, 0.5637, 0.8692, 0.5786]}, {"w": "system.", "b": [0.1312, 0.5816, 0.1908, 0.5966]}, {"w": "So,", "b": [0.199, 0.5816, 0.2234, 0.5966]}, {"w": "you", "b": [0.2295, 0.5816, 0.258, 0.5966]}, {"w": "might", "b": [0.2641, 0.5816, 0.3103, 0.5966]}, {"w": "prefer", "b": [0.3164, 0.5816, 0.3627, 0.5966]}, {"w": "spending", "b": [0.3689, 0.5816, 0.4395, 0.5966]}, {"w": "more", "b": [0.4457, 0.5816, 0.4853, 0.5966]}, {"w": "time", "b": [0.4915, 0.5816, 0.527, 0.5966]}, {"w": "on", "b": [0.5331, 0.5816, 0.5524, 0.5966]}, {"w": "building", "b": [0.5585, 0.5816, 0.6235, 0.5966]}, {"w": "a", "b": [0.6297, 0.5816, 0.6388, 0.5966]}, {"w": "better", "b": [0.6449, 0.5816, 0.6932, 0.5966]}, {"w": "language", "b": [0.6994, 0.5816, 0.7694, 0.5966]}, {"w": "predictor", "b": [0.7755, 0.5816, 0.8477, 0.5966]}, {"w": "in", "b": [0.8539, 0.5816, 0.8691, 0.5966]}, {"w": "stage", "b": [0.1312, 0.5996, 0.1724, 0.6145]}, {"w": "1,", "b": [0.1785, 0.5996, 0.1928, 0.6145]}, {"w": "if", "b": [0.199, 0.5996, 0.2098, 0.6145]}, {"w": "the", "b": [0.2159, 0.5996, 0.2416, 0.6145]}, {"w": "potential", "b": [0.2477, 0.5996, 0.3195, 0.6145]}, {"w": "gain", "b": [0.3256, 0.5996, 0.3595, 0.6145]}, {"w": "in", "b": [0.3656, 0.5996, 0.381, 0.6145]}, {"w": "overall", "b": [0.3872, 0.5996, 0.44, 0.6145]}, {"w": "system", "b": [0.4462, 0.5996, 0.5012, 0.6145]}, {"w": "performance", "b": [0.5074, 0.5996, 0.607, 0.6145]}, {"w": "prediction", "b": [0.6131, 0.5996, 0.6942, 0.6145]}, {"w": "quality", "b": [0.7003, 0.5996, 0.7562, 0.6145]}, {"w": "is", "b": [0.7624, 0.5996, 0.7748, 0.6145]}, {"w": "higher.", "b": [0.7809, 0.5996, 0.8364, 0.6145]}]}, {"id": "b_5", "type": "paragraph", "text": "6.6.5 Using Sliced Metrics", "words": [{"w": "6.6.5", "b": [0.1312, 0.6477, 0.1749, 0.6627]}, {"w": "Using", "b": [0.1961, 0.6477, 0.2491, 0.6627]}, {"w": "Sliced", "b": [0.2562, 0.6477, 0.3107, 0.6627]}, {"w": "Metrics", "b": [0.3178, 0.6477, 0.3883, 0.6627]}]}, {"id": "b_6", "type": "paragraph", "text": "If the model will be applied to different segments of the use cases, it should be separately tested for each segment. For example, if you want to predict the solvency of borrowers, you would want your model to be equally accurate for both male and female borrowers. To achieve that, you can split your validation data into several subsets, one subset per segment. Then compute the performance metric by separately applying your model to each subset.", "words": [{"w": "If", "b": [0.1312, 0.684, 0.1438, 0.699]}, {"w": "the", "b": [0.1501, 0.684, 0.1762, 0.699]}, {"w": "model", "b": [0.1825, 0.684, 0.2322, 0.699]}, {"w": "will", "b": [0.2385, 0.684, 0.2678, 0.699]}, {"w": "be", "b": [0.274, 0.684, 0.2934, 0.699]}, {"w": "applied", "b": [0.2997, 0.684, 0.3593, 0.699]}, {"w": "to", "b": [0.3656, 0.684, 0.3823, 0.699]}, {"w": "different", "b": [0.3886, 0.684, 0.4567, 0.699]}, {"w": "segments", "b": [0.463, 0.684, 0.537, 0.699]}, {"w": "of", "b": [0.5432, 0.684, 0.5584, 0.699]}, {"w": "the", "b": [0.5647, 0.684, 0.5909, 0.699]}, {"w": "use", "b": [0.5971, 0.684, 0.6234, 0.699]}, {"w": "cases,", "b": [0.6297, 0.684, 0.6759, 0.699]}, {"w": "it", "b": [0.6823, 0.684, 0.6948, 0.699]}, {"w": "should", "b": [0.7011, 0.684, 0.7546, 0.699]}, {"w": "be", "b": [0.7609, 0.684, 0.7802, 0.699]}, {"w": "separately", "b": [0.7865, 0.684, 0.8698, 0.699]}, {"w": "tested", "b": [0.1312, 0.702, 0.1794, 0.7169]}, {"w": "for", "b": [0.1855, 0.702, 0.2075, 0.7169]}, {"w": "each", "b": [0.2137, 0.702, 0.2489, 0.7169]}, {"w": "segment.", "b": [0.2551, 0.702, 0.3251, 0.7169]}, {"w": "For", "b": [0.3334, 0.702, 0.3602, 0.7169]}, {"w": "example,", "b": [0.3664, 0.702, 0.4374, 0.7169]}, {"w": "if", "b": [0.4435, 0.702, 0.4543, 0.7169]}, {"w": "you", "b": [0.4604, 0.702, 0.489, 0.7169]}, {"w": "want", "b": [0.4952, 0.702, 0.534, 0.7169]}, {"w": "to", "b": [0.5401, 0.702, 0.5565, 0.7169]}, {"w": "predict", "b": [0.5626, 0.702, 0.6189, 0.7169]}, {"w": "the", "b": [0.625, 0.702, 0.6506, 0.7169]}, {"w": "solvency", "b": [0.6567, 0.702, 0.7237, 0.7169]}, {"w": "of", "b": [0.7299, 0.702, 0.7447, 0.7169]}, {"w": "borrowers,", "b": [0.7509, 0.702, 0.8344, 0.7169]}, {"w": "you", "b": [0.8405, 0.702, 0.8691, 0.7169]}, {"w": "would", "b": [0.1306, 0.7199, 0.1792, 0.7349]}, {"w": "want", "b": [0.1868, 0.7199, 0.2265, 0.7349]}, {"w": "your", "b": [0.2341, 0.7199, 0.2707, 0.7349]}, {"w": "model", "b": [0.2783, 0.7199, 0.3279, 0.7349]}, {"w": "to", "b": [0.3355, 0.7199, 0.3522, 0.7349]}, {"w": "be", "b": [0.3597, 0.7199, 0.3791, 0.7349]}, {"w": "equally", "b": [0.3866, 0.7199, 0.4452, 0.7349]}, {"w": "accurate", "b": [0.4528, 0.7199, 0.5219, 0.7349]}, {"w": "for", "b": [0.5294, 0.7199, 0.5519, 0.7349]}, {"w": "both", "b": [0.5595, 0.7199, 0.5977, 0.7349]}, {"w": "male", "b": [0.6052, 0.7199, 0.6439, 0.7349]}, {"w": "and", "b": [0.6514, 0.7199, 0.6818, 0.7349]}, {"w": "female", "b": [0.6893, 0.7199, 0.7421, 0.7349]}, {"w": "borrowers.", "b": [0.7497, 0.7199, 0.8352, 0.7349]}, {"w": "To", "b": [0.8476, 0.7199, 0.869, 0.7349]}, {"w": "achieve", "b": [0.1312, 0.7379, 0.1885, 0.7528]}, {"w": "that,", "b": [0.1947, 0.7379, 0.2332, 0.7528]}, {"w": "you", "b": [0.2393, 0.7379, 0.2677, 0.7528]}, {"w": "can", "b": [0.2739, 0.7379, 0.3013, 0.7528]}, {"w": "split", "b": [0.3074, 0.7379, 0.342, 0.7528]}, {"w": "your", "b": [0.3481, 0.7379, 0.3837, 0.7528]}, {"w": "validation", "b": [0.3898, 0.7379, 0.4684, 0.7528]}, {"w": "data", "b": [0.4745, 0.7379, 0.51, 0.7528]}, {"w": "into", "b": [0.5161, 0.7379, 0.547, 0.7528]}, {"w": "several", "b": [0.5532, 0.7379, 0.6071, 0.7528]}, {"w": "subsets,", "b": [0.6132, 0.7379, 0.6754, 0.7528]}, {"w": "one", "b": [0.6815, 0.7379, 0.7089, 0.7528]}, {"w": "subset", "b": [0.7151, 0.7379, 0.765, 0.7528]}, {"w": "per", "b": [0.7711, 0.7379, 0.797, 0.7528]}, {"w": "segment.", "b": [0.8032, 0.7379, 0.8727, 0.7528]}, {"w": "Then", "b": [0.1306, 0.7558, 0.1726, 0.7708]}, {"w": "compute", "b": [0.1788, 0.7558, 0.2475, 0.7708]}, {"w": "the", "b": [0.2536, 0.7558, 0.2793, 0.7708]}, {"w": "performance", "b": [0.2854, 0.7558, 0.385, 0.7708]}, {"w": "metric", "b": [0.3911, 0.7558, 0.4425, 0.7708]}, {"w": "by", "b": [0.4486, 0.7558, 0.4681, 0.7708]}, {"w": "separately", "b": [0.4742, 0.7558, 0.5559, 0.7708]}, {"w": "applying", "b": [0.5621, 0.7558, 0.6313, 0.7708]}, {"w": "your", "b": [0.6374, 0.7558, 0.6734, 0.7708]}, {"w": "model", "b": [0.6795, 0.7558, 0.7283, 0.7708]}, {"w": "to", "b": [0.7344, 0.7558, 0.7508, 0.7708]}, {"w": "each", "b": [0.7569, 0.7558, 0.7923, 0.7708]}, {"w": "subset.", "b": [0.7985, 0.7558, 0.8541, 0.7708]}]}, {"id": "b_7", "type": "paragraph", "text": "Alternatively, you can separately evaluate the model on each class by applying precision and recall metrics. Remember these metrics are defined only for binary classification. By isolating", "words": [{"w": "Alternatively,", "b": [0.1305, 0.7827, 0.238, 0.7977]}, {"w": "you", "b": [0.2442, 0.7827, 0.2724, 0.7977]}, {"w": "can", "b": [0.2786, 0.7827, 0.3058, 0.7977]}, {"w": "separately", "b": [0.312, 0.7827, 0.3924, 0.7977]}, {"w": "evaluate", "b": [0.3986, 0.7827, 0.4636, 0.7977]}, {"w": "the", "b": [0.4698, 0.7827, 0.495, 0.7977]}, {"w": "model", "b": [0.5012, 0.7827, 0.5491, 0.7977]}, {"w": "on", "b": [0.5553, 0.7827, 0.5745, 0.7977]}, {"w": "each", "b": [0.5806, 0.7827, 0.6154, 0.7977]}, {"w": "class", "b": [0.6216, 0.7827, 0.6581, 0.7977]}, {"w": "by", "b": [0.6643, 0.7827, 0.6835, 0.7977]}, {"w": "applying", "b": [0.6896, 0.7827, 0.7578, 0.7977]}, {"w": "precision", "b": [0.7639, 0.7827, 0.8337, 0.7977]}, {"w": "and", "b": [0.8399, 0.7827, 0.8692, 0.7977]}, {"w": "recall", "b": [0.1312, 0.8007, 0.1735, 0.8156]}, {"w": "metrics.", "b": [0.179, 0.8007, 0.2414, 0.8156]}, {"w": "Remember", "b": [0.2494, 0.8007, 0.3341, 0.8156]}, {"w": "these", "b": [0.3396, 0.8007, 0.3799, 0.8156]}, {"w": "metrics", "b": [0.3854, 0.8007, 0.4428, 0.8156]}, {"w": "are", "b": [0.4483, 0.8007, 0.4724, 0.8156]}, {"w": "defined", "b": [0.4779, 0.8007, 0.5342, 0.8156]}, {"w": "only", "b": [0.5397, 0.8007, 0.5733, 0.8156]}, {"w": "for", "b": [0.5788, 0.8007, 0.6005, 0.8156]}, {"w": "binary", "b": [0.6059, 0.8007, 0.6567, 0.8156]}, {"w": "classification.", "b": [0.6622, 0.8007, 0.7669, 0.8156]}, {"w": "By", "b": [0.7749, 0.8007, 0.7972, 0.8156]}, {"w": "isolating", "b": [0.8027, 0.8007, 0.8691, 0.8156]}]}, {"id": "b_8", "type": "paragraph", "text": "6Measuring the error of the machine translation system in practice is tricky as a translation is rarely entirely accurate or inaccurate. Instead, measures, such as BLEU (for Bilingual Evaluation Understudy Score) score, are used.", "words": [{"w": "6Measuring", "b": [0.1518, 0.8277, 0.2319, 0.8416]}, {"w": "the", "b": [0.238, 0.8295, 0.2602, 0.8416]}, {"w": "error", "b": [0.2662, 0.8295, 0.3, 0.8416]}, {"w": "of", "b": [0.3061, 0.8295, 0.319, 0.8416]}, {"w": "the", "b": [0.325, 0.8295, 0.3472, 0.8416]}, {"w": "machine", "b": [0.3533, 0.8295, 0.4106, 0.8416]}, {"w": "translation", "b": [0.4166, 0.8295, 0.4922, 0.8416]}, {"w": "system", "b": [0.4983, 0.8295, 0.546, 0.8416]}, {"w": "in", "b": [0.552, 0.8295, 0.5654, 0.8416]}, {"w": "practice", "b": [0.5714, 0.8295, 0.6265, 0.8416]}, {"w": "is", "b": [0.6325, 0.8295, 0.6433, 0.8416]}, {"w": "tricky", "b": [0.6493, 0.8295, 0.6898, 0.8416]}, {"w": "as", "b": [0.6958, 0.8295, 0.7101, 0.8416]}, {"w": "a", "b": [0.7162, 0.8295, 0.7242, 0.8416]}, {"w": "translation", "b": [0.7302, 0.8295, 0.8058, 0.8416]}, {"w": "is", "b": [0.8119, 0.8295, 0.8226, 0.8416]}, {"w": "rarely", "b": [0.8287, 0.8295, 0.8691, 0.8416]}, {"w": "entirely", "b": [0.1312, 0.8439, 0.1816, 0.8558]}, {"w": "accurate", "b": [0.1863, 0.8439, 0.2427, 0.8558]}, {"w": "or", "b": [0.2474, 0.8439, 0.2611, 0.8558]}, {"w": "inaccurate.", "b": [0.2658, 0.8439, 0.3392, 0.8558]}, {"w": "Instead,", "b": [0.346, 0.8439, 0.3994, 0.8558]}, {"w": "measures,", "b": [0.4042, 0.8439, 0.4693, 0.8558]}, {"w": "such", "b": [0.4741, 0.8439, 0.5036, 0.8558]}, {"w": "as", "b": [0.5084, 0.8439, 0.5221, 0.8558]}, {"w": "BLEU", "b": [0.5268, 0.8439, 0.5693, 0.8558]}, {"w": "(for", "b": [0.574, 0.8439, 0.5983, 0.8558]}, {"w": "Bilingual", "b": [0.6031, 0.8439, 0.6634, 0.8558]}, {"w": "Evaluation", "b": [0.6682, 0.8439, 0.7405, 0.8558]}, {"w": "Understudy", "b": [0.7452, 0.8439, 0.8238, 0.8558]}, {"w": "Score)", "b": [0.8286, 0.8439, 0.8704, 0.8558]}, {"w": "score,", "b": [0.1312, 0.858, 0.1697, 0.87]}, {"w": "are", "b": [0.1749, 0.858, 0.1958, 0.87]}, {"w": "used.", "b": [0.201, 0.858, 0.2359, 0.87]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 31", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "31", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 207, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "one class in your multiclass classification problem, and labeling the other classes “Other,” you can individually compute the precision and recall for each class.", "words": [{"w": "one", "b": [0.1312, 0.0881, 0.1595, 0.1031]}, {"w": "class", "b": [0.1659, 0.0881, 0.2038, 0.1031]}, {"w": "in", "b": [0.2102, 0.0881, 0.2259, 0.1031]}, {"w": "your", "b": [0.2323, 0.0881, 0.269, 0.1031]}, {"w": "multiclass", "b": [0.2754, 0.0881, 0.3567, 0.1031]}, {"w": "classification", "b": [0.3631, 0.0881, 0.4669, 0.1031]}, {"w": "problem,", "b": [0.4733, 0.0881, 0.5455, 0.1031]}, {"w": "and", "b": [0.552, 0.0881, 0.5823, 0.1031]}, {"w": "labeling", "b": [0.5887, 0.0881, 0.653, 0.1031]}, {"w": "the", "b": [0.6595, 0.0881, 0.6856, 0.1031]}, {"w": "other", "b": [0.692, 0.0881, 0.735, 0.1031]}, {"w": "classes", "b": [0.7414, 0.0881, 0.7951, 0.1031]}, {"w": "“Other,”", "b": [0.8015, 0.0881, 0.8727, 0.1031]}, {"w": "you", "b": [0.1308, 0.106, 0.1595, 0.121]}, {"w": "can", "b": [0.1656, 0.106, 0.1933, 0.121]}, {"w": "individually", "b": [0.1995, 0.106, 0.2948, 0.121]}, {"w": "compute", "b": [0.301, 0.106, 0.3697, 0.121]}, {"w": "the", "b": [0.3758, 0.106, 0.4015, 0.121]}, {"w": "precision", "b": [0.4076, 0.106, 0.4786, 0.121]}, {"w": "and", "b": [0.4847, 0.106, 0.5144, 0.121]}, {"w": "recall", "b": [0.5206, 0.106, 0.5637, 0.121]}, {"w": "for", "b": [0.5699, 0.106, 0.592, 0.121]}, {"w": "each", "b": [0.5981, 0.106, 0.6335, 0.121]}, {"w": "class.", "b": [0.6397, 0.106, 0.6819, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "If you see that the value of the performance metric changes between segments or classes, you can try to fix the problem by adding more labeled data to the segments or classes, where the performance of the model is unsatisfactory, or engineer additional features.", "words": [{"w": "If", "b": [0.1312, 0.133, 0.1433, 0.1479]}, {"w": "you", "b": [0.1494, 0.133, 0.1775, 0.1479]}, {"w": "see", "b": [0.1836, 0.133, 0.2068, 0.1479]}, {"w": "that", "b": [0.2129, 0.133, 0.2461, 0.1479]}, {"w": "the", "b": [0.2522, 0.133, 0.2773, 0.1479]}, {"w": "value", "b": [0.2834, 0.133, 0.3241, 0.1479]}, {"w": "of", "b": [0.3302, 0.133, 0.3447, 0.1479]}, {"w": "the", "b": [0.3508, 0.133, 0.3759, 0.1479]}, {"w": "performance", "b": [0.382, 0.133, 0.4796, 0.1479]}, {"w": "metric", "b": [0.4857, 0.133, 0.536, 0.1479]}, {"w": "changes", "b": [0.5421, 0.133, 0.603, 0.1479]}, {"w": "between", "b": [0.6091, 0.133, 0.6729, 0.1479]}, {"w": "segments", "b": [0.679, 0.133, 0.75, 0.1479]}, {"w": "or", "b": [0.7561, 0.133, 0.7722, 0.1479]}, {"w": "classes,", "b": [0.7783, 0.133, 0.8349, 0.1479]}, {"w": "you", "b": [0.841, 0.133, 0.8692, 0.1479]}, {"w": "can", "b": [0.1312, 0.1509, 0.1584, 0.1659]}, {"w": "try", "b": [0.1644, 0.1509, 0.1881, 0.1659]}, {"w": "to", "b": [0.1942, 0.1509, 0.2102, 0.1659]}, {"w": "fix", "b": [0.2163, 0.1509, 0.2359, 0.1659]}, {"w": "the", "b": [0.2419, 0.1509, 0.2671, 0.1659]}, {"w": "problem", "b": [0.2731, 0.1509, 0.3375, 0.1659]}, {"w": "by", "b": [0.3435, 0.1509, 0.3626, 0.1659]}, {"w": "adding", "b": [0.3687, 0.1509, 0.4219, 0.1659]}, {"w": "more", "b": [0.428, 0.1509, 0.4672, 0.1659]}, {"w": "labeled", "b": [0.4733, 0.1509, 0.5291, 0.1659]}, {"w": "data", "b": [0.5351, 0.1509, 0.5703, 0.1659]}, {"w": "to", "b": [0.5764, 0.1509, 0.5924, 0.1659]}, {"w": "the", "b": [0.5985, 0.1509, 0.6236, 0.1659]}, {"w": "segments", "b": [0.6297, 0.1509, 0.7007, 0.1659]}, {"w": "or", "b": [0.7068, 0.1509, 0.7229, 0.1659]}, {"w": "classes,", "b": [0.729, 0.1509, 0.7856, 0.1659]}, {"w": "where", "b": [0.7916, 0.1509, 0.8379, 0.1659]}, {"w": "the", "b": [0.844, 0.1509, 0.8691, 0.1659]}, {"w": "performance", "b": [0.1312, 0.1689, 0.2308, 0.1838]}, {"w": "of", "b": [0.237, 0.1689, 0.2518, 0.1838]}, {"w": "the", "b": [0.258, 0.1689, 0.2836, 0.1838]}, {"w": "model", "b": [0.2898, 0.1689, 0.3385, 0.1838]}, {"w": "is", "b": [0.3446, 0.1689, 0.357, 0.1838]}, {"w": "unsatisfactory,", "b": [0.3632, 0.1689, 0.4799, 0.1838]}, {"w": "or", "b": [0.486, 0.1689, 0.5025, 0.1838]}, {"w": "engineer", "b": [0.5086, 0.1689, 0.5753, 0.1838]}, {"w": "additional", "b": [0.5815, 0.1689, 0.6625, 0.1838]}, {"w": "features.", "b": [0.6686, 0.1689, 0.737, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "6.6.6 Fixing Wrong Labels", "words": [{"w": "6.6.6", "b": [0.1312, 0.217, 0.1749, 0.232]}, {"w": "Fixing", "b": [0.1961, 0.217, 0.2548, 0.232]}, {"w": "Wrong", "b": [0.2619, 0.217, 0.3238, 0.232]}, {"w": "Labels", "b": [0.3309, 0.217, 0.3904, 0.232]}]}, {"id": "b_3", "type": "paragraph", "text": "When humans label the training examples, the assigned labels can be wrong. This can cause", "words": [{"w": "When", "b": [0.1303, 0.2533, 0.1771, 0.2682]}, {"w": "humans", "b": [0.1833, 0.2533, 0.2443, 0.2682]}, {"w": "label", "b": [0.2505, 0.2533, 0.2882, 0.2682]}, {"w": "the", "b": [0.2944, 0.2533, 0.3196, 0.2682]}, {"w": "training", "b": [0.3258, 0.2533, 0.3882, 0.2682]}, {"w": "examples,", "b": [0.3944, 0.2533, 0.4715, 0.2682]}, {"w": "the", "b": [0.4777, 0.2533, 0.5029, 0.2682]}, {"w": "assigned", "b": [0.5091, 0.2533, 0.5747, 0.2682]}, {"w": "labels", "b": [0.5809, 0.2533, 0.6259, 0.2682]}, {"w": "can", "b": [0.632, 0.2533, 0.6592, 0.2682]}, {"w": "be", "b": [0.6654, 0.2533, 0.684, 0.2682]}, {"w": "wrong.", "b": [0.6902, 0.2533, 0.7436, 0.2682]}, {"w": "This", "b": [0.7519, 0.2533, 0.7872, 0.2682]}, {"w": "can", "b": [0.7934, 0.2533, 0.8206, 0.2682]}, {"w": "cause", "b": [0.8267, 0.2533, 0.8691, 0.2682]}]}, {"id": "b_4", "type": "paragraph", "text": "poor model performance on the model on both training and holdout data. Indeed, if similar examples have conflicting labels — some correct and some incorrect — the learning algorithm can learn to predict the wrong label.", "words": [{"w": "poor", "b": [0.1312, 0.2712, 0.1679, 0.2862]}, {"w": "model", "b": [0.174, 0.2712, 0.2223, 0.2862]}, {"w": "performance", "b": [0.2284, 0.2712, 0.3271, 0.2862]}, {"w": "on", "b": [0.3332, 0.2712, 0.3525, 0.2862]}, {"w": "the", "b": [0.3587, 0.2712, 0.3841, 0.2862]}, {"w": "model", "b": [0.3902, 0.2712, 0.4385, 0.2862]}, {"w": "on", "b": [0.4446, 0.2712, 0.4639, 0.2862]}, {"w": "both", "b": [0.4701, 0.2712, 0.5072, 0.2862]}, {"w": "training", "b": [0.5133, 0.2712, 0.5764, 0.2862]}, {"w": "and", "b": [0.5825, 0.2712, 0.612, 0.2862]}, {"w": "holdout", "b": [0.6181, 0.2712, 0.6791, 0.2862]}, {"w": "data.", "b": [0.6852, 0.2712, 0.7258, 0.2862]}, {"w": "Indeed,", "b": [0.734, 0.2712, 0.7925, 0.2862]}, {"w": "if", "b": [0.7986, 0.2712, 0.8093, 0.2862]}, {"w": "similar", "b": [0.8154, 0.2712, 0.8694, 0.2862]}, {"w": "examples", "b": [0.1312, 0.2892, 0.2032, 0.3041]}, {"w": "have", "b": [0.2087, 0.2892, 0.2443, 0.3041]}, {"w": "conflicting", "b": [0.2498, 0.2892, 0.3312, 0.3041]}, {"w": "labels", "b": [0.3367, 0.2892, 0.3816, 0.3041]}, {"w": "—", "b": [0.3871, 0.2892, 0.4051, 0.3041]}, {"w": "some", "b": [0.4106, 0.2892, 0.4499, 0.3041]}, {"w": "correct", "b": [0.4554, 0.2892, 0.5098, 0.3041]}, {"w": "and", "b": [0.5153, 0.2892, 0.5444, 0.3041]}, {"w": "some", "b": [0.5499, 0.2892, 0.5892, 0.3041]}, {"w": "incorrect", "b": [0.5947, 0.2892, 0.6641, 0.3041]}, {"w": "—", "b": [0.6696, 0.2892, 0.6877, 0.3041]}, {"w": "the", "b": [0.6932, 0.2892, 0.7184, 0.3041]}, {"w": "learning", "b": [0.7238, 0.2892, 0.7872, 0.3041]}, {"w": "algorithm", "b": [0.7927, 0.2892, 0.8691, 0.3041]}, {"w": "can", "b": [0.1312, 0.3071, 0.1589, 0.3221]}, {"w": "learn", "b": [0.1651, 0.3071, 0.2051, 0.3221]}, {"w": "to", "b": [0.2113, 0.3071, 0.2277, 0.3221]}, {"w": "predict", "b": [0.2338, 0.3071, 0.2903, 0.3221]}, {"w": "the", "b": [0.2964, 0.3071, 0.3221, 0.3221]}, {"w": "wrong", "b": [0.3282, 0.3071, 0.3775, 0.3221]}, {"w": "label.", "b": [0.3836, 0.3071, 0.4272, 0.3221]}]}, {"id": "b_5", "type": "paragraph", "text": "Here is a simple way to identify the examples that have wrong labels. Apply the model to the training data from which it was built, and analyze the examples for which it made a different prediction as compared to the labels provided by humans. If you see that some predictions are indeed correct, change those labels.", "words": [{"w": "Here", "b": [0.1312, 0.334, 0.1692, 0.349]}, {"w": "is", "b": [0.1754, 0.334, 0.188, 0.349]}, {"w": "a", "b": [0.1941, 0.334, 0.2035, 0.349]}, {"w": "simple", "b": [0.2096, 0.334, 0.2617, 0.349]}, {"w": "way", "b": [0.2679, 0.334, 0.2996, 0.349]}, {"w": "to", "b": [0.3057, 0.334, 0.3224, 0.349]}, {"w": "identify", "b": [0.3285, 0.334, 0.3904, 0.349]}, {"w": "the", "b": [0.3965, 0.334, 0.4225, 0.349]}, {"w": "examples", "b": [0.4287, 0.334, 0.5032, 0.349]}, {"w": "that", "b": [0.5093, 0.334, 0.5436, 0.349]}, {"w": "have", "b": [0.5498, 0.334, 0.5867, 0.349]}, {"w": "wrong", "b": [0.5928, 0.334, 0.6428, 0.349]}, {"w": "labels.", "b": [0.6489, 0.334, 0.7005, 0.349]}, {"w": "Apply", "b": [0.7087, 0.334, 0.7586, 0.349]}, {"w": "the", "b": [0.7648, 0.334, 0.7908, 0.349]}, {"w": "model", "b": [0.7969, 0.334, 0.8463, 0.349]}, {"w": "to", "b": [0.8524, 0.334, 0.8691, 0.349]}, {"w": "the", "b": [0.1312, 0.352, 0.1574, 0.3669]}, {"w": "training", "b": [0.1642, 0.352, 0.2291, 0.3669]}, {"w": "data", "b": [0.2359, 0.352, 0.2725, 0.3669]}, {"w": "from", "b": [0.2794, 0.352, 0.3176, 0.3669]}, {"w": "which", "b": [0.3244, 0.352, 0.372, 0.3669]}, {"w": "it", "b": [0.3788, 0.352, 0.3914, 0.3669]}, {"w": "was", "b": [0.3982, 0.352, 0.4281, 0.3669]}, {"w": "built,", "b": [0.4349, 0.352, 0.4789, 0.3669]}, {"w": "and", "b": [0.4859, 0.352, 0.5162, 0.3669]}, {"w": "analyze", "b": [0.523, 0.352, 0.5842, 0.3669]}, {"w": "the", "b": [0.591, 0.352, 0.6172, 0.3669]}, {"w": "examples", "b": [0.624, 0.352, 0.6989, 0.3669]}, {"w": "for", "b": [0.7057, 0.352, 0.7283, 0.3669]}, {"w": "which", "b": [0.7351, 0.352, 0.7827, 0.3669]}, {"w": "it", "b": [0.7895, 0.352, 0.8021, 0.3669]}, {"w": "made", "b": [0.8089, 0.352, 0.8528, 0.3669]}, {"w": "a", "b": [0.8597, 0.352, 0.8691, 0.3669]}, {"w": "different", "b": [0.1312, 0.3699, 0.1993, 0.3849]}, {"w": "prediction", "b": [0.2062, 0.3699, 0.2889, 0.3849]}, {"w": "as", "b": [0.2958, 0.3699, 0.3126, 0.3849]}, {"w": "compared", "b": [0.3195, 0.3699, 0.3991, 0.3849]}, {"w": "to", "b": [0.406, 0.3699, 0.4227, 0.3849]}, {"w": "the", "b": [0.4296, 0.3699, 0.4557, 0.3849]}, {"w": "labels", "b": [0.4626, 0.3699, 0.5093, 0.3849]}, {"w": "provided", "b": [0.5162, 0.3699, 0.5874, 0.3849]}, {"w": "by", "b": [0.5943, 0.3699, 0.6141, 0.3849]}, {"w": "humans.", "b": [0.6211, 0.3699, 0.6897, 0.3849]}, {"w": "If", "b": [0.7001, 0.3699, 0.7127, 0.3849]}, {"w": "you", "b": [0.7195, 0.3699, 0.7488, 0.3849]}, {"w": "see", "b": [0.7557, 0.3699, 0.7799, 0.3849]}, {"w": "that", "b": [0.7868, 0.3699, 0.8213, 0.3849]}, {"w": "some", "b": [0.8282, 0.3699, 0.8691, 0.3849]}, {"w": "predictions", "b": [0.1312, 0.3879, 0.2196, 0.4028]}, {"w": "are", "b": [0.2257, 0.3879, 0.2504, 0.4028]}, {"w": "indeed", "b": [0.2566, 0.3879, 0.3089, 0.4028]}, {"w": "correct,", "b": [0.315, 0.3879, 0.3756, 0.4028]}, {"w": "change", "b": [0.3818, 0.3879, 0.4367, 0.4028]}, {"w": "those", "b": [0.4428, 0.3879, 0.485, 0.4028]}, {"w": "labels.", "b": [0.4911, 0.3879, 0.542, 0.4028]}]}, {"id": "b_6", "type": "paragraph", "text": "If you have time and resources, you could also examine the predictions with the score close to the decision threshold. Those are often mislabeled cases too.", "words": [{"w": "If", "b": [0.1312, 0.4148, 0.1436, 0.4298]}, {"w": "you", "b": [0.1497, 0.4148, 0.1785, 0.4298]}, {"w": "have", "b": [0.1847, 0.4148, 0.2212, 0.4298]}, {"w": "time", "b": [0.2273, 0.4148, 0.2633, 0.4298]}, {"w": "and", "b": [0.2694, 0.4148, 0.2993, 0.4298]}, {"w": "resources,", "b": [0.3054, 0.4148, 0.3839, 0.4298]}, {"w": "you", "b": [0.3901, 0.4148, 0.4189, 0.4298]}, {"w": "could", "b": [0.425, 0.4148, 0.4682, 0.4298]}, {"w": "also", "b": [0.4743, 0.4148, 0.5053, 0.4298]}, {"w": "examine", "b": [0.5114, 0.4148, 0.5778, 0.4298]}, {"w": "the", "b": [0.5839, 0.4148, 0.6097, 0.4298]}, {"w": "predictions", "b": [0.6158, 0.4148, 0.7044, 0.4298]}, {"w": "with", "b": [0.7106, 0.4148, 0.7465, 0.4298]}, {"w": "the", "b": [0.7527, 0.4148, 0.7784, 0.4298]}, {"w": "score", "b": [0.7846, 0.4148, 0.8248, 0.4298]}, {"w": "close", "b": [0.831, 0.4148, 0.8692, 0.4298]}, {"w": "to", "b": [0.1312, 0.4328, 0.1476, 0.4477]}, {"w": "the", "b": [0.1538, 0.4328, 0.1794, 0.4477]}, {"w": "decision", "b": [0.1856, 0.4328, 0.2493, 0.4477]}, {"w": "threshold.", "b": [0.2554, 0.4328, 0.3356, 0.4477]}, {"w": "Those", "b": [0.3438, 0.4328, 0.3921, 0.4477]}, {"w": "are", "b": [0.3982, 0.4328, 0.4229, 0.4477]}, {"w": "often", "b": [0.429, 0.4328, 0.4696, 0.4477]}, {"w": "mislabeled", "b": [0.4757, 0.4328, 0.5604, 0.4477]}, {"w": "cases", "b": [0.5666, 0.4328, 0.6068, 0.4477]}, {"w": "too.", "b": [0.6129, 0.4328, 0.6442, 0.4477]}]}, {"id": "b_7", "type": "paragraph", "text": "If wrong labels in the training data is a serious issue, you can avoid it by asking several individuals to provide labels for the same training example. Only accept it if all individuals assigned the same label to that example. In less demanding situations, you can accept a label if the majority of individuals assigned it.", "words": [{"w": "If", "b": [0.1312, 0.4597, 0.1438, 0.4746]}, {"w": "wrong", "b": [0.151, 0.4597, 0.2012, 0.4746]}, {"w": "labels", "b": [0.2084, 0.4597, 0.255, 0.4746]}, {"w": "in", "b": [0.2622, 0.4597, 0.2779, 0.4746]}, {"w": "the", "b": [0.2851, 0.4597, 0.3112, 0.4746]}, {"w": "training", "b": [0.3184, 0.4597, 0.3833, 0.4746]}, {"w": "data", "b": [0.3905, 0.4597, 0.4271, 0.4746]}, {"w": "is", "b": [0.4343, 0.4597, 0.4469, 0.4746]}, {"w": "a", "b": [0.4541, 0.4597, 0.4635, 0.4746]}, {"w": "serious", "b": [0.4707, 0.4597, 0.5264, 0.4746]}, {"w": "issue,", "b": [0.5336, 0.4597, 0.5777, 0.4746]}, {"w": "you", "b": [0.5852, 0.4597, 0.6145, 0.4746]}, {"w": "can", "b": [0.6216, 0.4597, 0.6499, 0.4746]}, {"w": "avoid", "b": [0.6571, 0.4597, 0.7005, 0.4746]}, {"w": "it", "b": [0.7077, 0.4597, 0.7202, 0.4746]}, {"w": "by", "b": [0.7274, 0.4597, 0.7473, 0.4746]}, {"w": "asking", "b": [0.7544, 0.4597, 0.8063, 0.4746]}, {"w": "several", "b": [0.8135, 0.4597, 0.8691, 0.4746]}, {"w": "individuals", "b": [0.1312, 0.4776, 0.2186, 0.4926]}, {"w": "to", "b": [0.2247, 0.4776, 0.241, 0.4926]}, {"w": "provide", "b": [0.2472, 0.4776, 0.3064, 0.4926]}, {"w": "labels", "b": [0.3125, 0.4776, 0.3581, 0.4926]}, {"w": "for", "b": [0.3642, 0.4776, 0.3862, 0.4926]}, {"w": "the", "b": [0.3923, 0.4776, 0.4178, 0.4926]}, {"w": "same", "b": [0.4239, 0.4776, 0.4638, 0.4926]}, {"w": "training", "b": [0.4699, 0.4776, 0.5333, 0.4926]}, {"w": "example.", "b": [0.5394, 0.4776, 0.6103, 0.4926]}, {"w": "Only", "b": [0.6185, 0.4776, 0.6578, 0.4926]}, {"w": "accept", "b": [0.6639, 0.4776, 0.7149, 0.4926]}, {"w": "it", "b": [0.721, 0.4776, 0.7333, 0.4926]}, {"w": "if", "b": [0.7394, 0.4776, 0.7501, 0.4926]}, {"w": "all", "b": [0.7563, 0.4776, 0.7757, 0.4926]}, {"w": "individuals", "b": [0.7818, 0.4776, 0.8691, 0.4926]}, {"w": "assigned", "b": [0.1312, 0.4956, 0.1994, 0.5105]}, {"w": "the", "b": [0.2063, 0.4956, 0.2325, 0.5105]}, {"w": "same", "b": [0.2393, 0.4956, 0.2802, 0.5105]}, {"w": "label", "b": [0.287, 0.4956, 0.3263, 0.5105]}, {"w": "to", "b": [0.3331, 0.4956, 0.3499, 0.5105]}, {"w": "that", "b": [0.3567, 0.4956, 0.3912, 0.5105]}, {"w": "example.", "b": [0.3981, 0.4956, 0.4708, 0.5105]}, {"w": "In", "b": [0.4811, 0.4956, 0.4983, 0.5105]}, {"w": "less", "b": [0.5052, 0.4956, 0.5337, 0.5105]}, {"w": "demanding", "b": [0.5405, 0.4956, 0.6305, 0.5105]}, {"w": "situations,", "b": [0.6373, 0.4956, 0.7223, 0.5105]}, {"w": "you", "b": [0.7293, 0.4956, 0.7586, 0.5105]}, {"w": "can", "b": [0.7654, 0.4956, 0.7937, 0.5105]}, {"w": "accept", "b": [0.8005, 0.4956, 0.8528, 0.5105]}, {"w": "a", "b": [0.8597, 0.4956, 0.8691, 0.5105]}, {"w": "label", "b": [0.1312, 0.5135, 0.1697, 0.5285]}, {"w": "if", "b": [0.1758, 0.5135, 0.1866, 0.5285]}, {"w": "the", "b": [0.1928, 0.5135, 0.2184, 0.5285]}, {"w": "majority", "b": [0.2245, 0.5135, 0.2933, 0.5285]}, {"w": "of", "b": [0.2995, 0.5135, 0.3143, 0.5285]}, {"w": "individuals", "b": [0.3205, 0.5135, 0.4083, 0.5285]}, {"w": "assigned", "b": [0.4144, 0.5135, 0.4813, 0.5285]}, {"w": "it.", "b": [0.4874, 0.5135, 0.5049, 0.5285]}]}, {"id": "b_8", "type": "paragraph", "text": "6.6.7 Finding Additional Examples to Label", "words": [{"w": "6.6.7", "b": [0.1312, 0.5617, 0.1749, 0.5766]}, {"w": "Finding", "b": [0.1961, 0.5617, 0.2672, 0.5766]}, {"w": "Additional", "b": [0.2743, 0.5617, 0.372, 0.5766]}, {"w": "Examples", "b": [0.379, 0.5617, 0.468, 0.5766]}, {"w": "to", "b": [0.4751, 0.5617, 0.4939, 0.5766]}, {"w": "Label", "b": [0.501, 0.5617, 0.5521, 0.5766]}]}, {"id": "b_9", "type": "paragraph", "text": "As discussed above, error analysis can reveal that more labeled data is needed from specific regions of feature space. You might have an abundance of unlabeled examples. How should you decide which examples to label so as to maximize the positive impact on the model?", "words": [{"w": "As", "b": [0.1305, 0.5979, 0.1516, 0.6129]}, {"w": "discussed", "b": [0.1578, 0.5979, 0.2318, 0.6129]}, {"w": "above,", "b": [0.2379, 0.5979, 0.2891, 0.6129]}, {"w": "error", "b": [0.2953, 0.5979, 0.3343, 0.6129]}, {"w": "analysis", "b": [0.3404, 0.5979, 0.4036, 0.6129]}, {"w": "can", "b": [0.4097, 0.5979, 0.4374, 0.6129]}, {"w": "reveal", "b": [0.4435, 0.5979, 0.4906, 0.6129]}, {"w": "that", "b": [0.4968, 0.5979, 0.5306, 0.6129]}, {"w": "more", "b": [0.5367, 0.5979, 0.5767, 0.6129]}, {"w": "labeled", "b": [0.5828, 0.5979, 0.6396, 0.6129]}, {"w": "data", "b": [0.6458, 0.5979, 0.6816, 0.6129]}, {"w": "is", "b": [0.6877, 0.5979, 0.7001, 0.6129]}, {"w": "needed", "b": [0.7063, 0.5979, 0.7615, 0.6129]}, {"w": "from", "b": [0.7677, 0.5979, 0.8051, 0.6129]}, {"w": "specific", "b": [0.8112, 0.5979, 0.8692, 0.6129]}, {"w": "regions", "b": [0.1312, 0.6159, 0.1877, 0.6308]}, {"w": "of", "b": [0.1938, 0.6159, 0.2087, 0.6308]}, {"w": "feature", "b": [0.2148, 0.6159, 0.2706, 0.6308]}, {"w": "space.", "b": [0.2768, 0.6159, 0.325, 0.6308]}, {"w": "You", "b": [0.3332, 0.6159, 0.3649, 0.6308]}, {"w": "might", "b": [0.371, 0.6159, 0.4176, 0.6308]}, {"w": "have", "b": [0.4237, 0.6159, 0.4601, 0.6308]}, {"w": "an", "b": [0.4662, 0.6159, 0.4856, 0.6308]}, {"w": "abundance", "b": [0.4918, 0.6159, 0.5778, 0.6308]}, {"w": "of", "b": [0.5839, 0.6159, 0.5987, 0.6308]}, {"w": "unlabeled", "b": [0.6049, 0.6159, 0.6821, 0.6308]}, {"w": "examples.", "b": [0.6883, 0.6159, 0.7667, 0.6308]}, {"w": "How", "b": [0.7749, 0.6159, 0.8107, 0.6308]}, {"w": "should", "b": [0.8168, 0.6159, 0.8691, 0.6308]}, {"w": "you", "b": [0.1308, 0.6338, 0.1595, 0.6488]}, {"w": "decide", "b": [0.1656, 0.6338, 0.2159, 0.6488]}, {"w": "which", "b": [0.222, 0.6338, 0.2687, 0.6488]}, {"w": "examples", "b": [0.2748, 0.6338, 0.3483, 0.6488]}, {"w": "to", "b": [0.3544, 0.6338, 0.3708, 0.6488]}, {"w": "label", "b": [0.377, 0.6338, 0.4154, 0.6488]}, {"w": "so", "b": [0.4216, 0.6338, 0.4381, 0.6488]}, {"w": "as", "b": [0.4442, 0.6338, 0.4608, 0.6488]}, {"w": "to", "b": [0.4669, 0.6338, 0.4833, 0.6488]}, {"w": "maximize", "b": [0.4894, 0.6338, 0.5658, 0.6488]}, {"w": "the", "b": [0.572, 0.6338, 0.5976, 0.6488]}, {"w": "positive", "b": [0.6038, 0.6338, 0.6659, 0.6488]}, {"w": "impact", "b": [0.6721, 0.6338, 0.7274, 0.6488]}, {"w": "on", "b": [0.7336, 0.6338, 0.7531, 0.6488]}, {"w": "the", "b": [0.7592, 0.6338, 0.7849, 0.6488]}, {"w": "model?", "b": [0.791, 0.6338, 0.8484, 0.6488]}]}, {"id": "b_10", "type": "paragraph", "text": "If your model returns a prediction score, an effective way is to use your best model to score the unlabeled examples. Then label those examples, whose prediction score is close to the prediction threshold.", "words": [{"w": "If", "b": [0.1312, 0.6608, 0.1435, 0.6757]}, {"w": "your", "b": [0.1496, 0.6608, 0.1855, 0.6757]}, {"w": "model", "b": [0.1916, 0.6608, 0.2402, 0.6757]}, {"w": "returns", "b": [0.2463, 0.6608, 0.3038, 0.6757]}, {"w": "a", "b": [0.31, 0.6608, 0.3192, 0.6757]}, {"w": "prediction", "b": [0.3253, 0.6608, 0.4061, 0.6757]}, {"w": "score,", "b": [0.4123, 0.6608, 0.4574, 0.6757]}, {"w": "an", "b": [0.4636, 0.6608, 0.483, 0.6757]}, {"w": "effective", "b": [0.4892, 0.6608, 0.5541, 0.6757]}, {"w": "way", "b": [0.5602, 0.6608, 0.5914, 0.6757]}, {"w": "is", "b": [0.5976, 0.6608, 0.6099, 0.6757]}, {"w": "to", "b": [0.6161, 0.6608, 0.6324, 0.6757]}, {"w": "use", "b": [0.6386, 0.6608, 0.6643, 0.6757]}, {"w": "your", "b": [0.6704, 0.6608, 0.7062, 0.6757]}, {"w": "best", "b": [0.7124, 0.6608, 0.7457, 0.6757]}, {"w": "model", "b": [0.7519, 0.6608, 0.8004, 0.6757]}, {"w": "to", "b": [0.8066, 0.6608, 0.8229, 0.6757]}, {"w": "score", "b": [0.8291, 0.6608, 0.8691, 0.6757]}, {"w": "the", "b": [0.1312, 0.6787, 0.1573, 0.6937]}, {"w": "unlabeled", "b": [0.1635, 0.6787, 0.2422, 0.6937]}, {"w": "examples.", "b": [0.2484, 0.6787, 0.3283, 0.6937]}, {"w": "Then", "b": [0.3365, 0.6787, 0.3792, 0.6937]}, {"w": "label", "b": [0.3854, 0.6787, 0.4245, 0.6937]}, {"w": "those", "b": [0.4307, 0.6787, 0.4735, 0.6937]}, {"w": "examples,", "b": [0.4797, 0.6787, 0.5596, 0.6937]}, {"w": "whose", "b": [0.5657, 0.6787, 0.6148, 0.6937]}, {"w": "prediction", "b": [0.621, 0.6787, 0.7035, 0.6937]}, {"w": "score", "b": [0.7096, 0.6787, 0.7505, 0.6937]}, {"w": "is", "b": [0.7566, 0.6787, 0.7692, 0.6937]}, {"w": "close", "b": [0.7754, 0.6787, 0.8141, 0.6937]}, {"w": "to", "b": [0.8203, 0.6787, 0.8369, 0.6937]}, {"w": "the", "b": [0.8431, 0.6787, 0.8692, 0.6937]}, {"w": "prediction", "b": [0.1312, 0.6967, 0.2123, 0.7116]}, {"w": "threshold.", "b": [0.2185, 0.6967, 0.2986, 0.7116]}]}, {"id": "b_11", "type": "paragraph", "text": "When the error analysis has revealed error patterns by means of visualization, then choose", "words": [{"w": "When", "b": [0.1303, 0.7236, 0.1784, 0.7385]}, {"w": "the", "b": [0.1845, 0.7236, 0.2104, 0.7385]}, {"w": "error", "b": [0.2165, 0.7236, 0.256, 0.7385]}, {"w": "analysis", "b": [0.2622, 0.7236, 0.326, 0.7385]}, {"w": "has", "b": [0.3321, 0.7236, 0.3591, 0.7385]}, {"w": "revealed", "b": [0.3653, 0.7236, 0.4315, 0.7385]}, {"w": "error", "b": [0.4377, 0.7236, 0.4771, 0.7385]}, {"w": "patterns", "b": [0.4833, 0.7236, 0.5506, 0.7385]}, {"w": "by", "b": [0.5568, 0.7236, 0.5764, 0.7385]}, {"w": "means", "b": [0.5826, 0.7236, 0.6334, 0.7385]}, {"w": "of", "b": [0.6395, 0.7236, 0.6545, 0.7385]}, {"w": "visualization,", "b": [0.6607, 0.7236, 0.7678, 0.7385]}, {"w": "then", "b": [0.774, 0.7236, 0.8102, 0.7385]}, {"w": "choose", "b": [0.8163, 0.7236, 0.8692, 0.7385]}]}, {"id": "b_12", "type": "paragraph", "text": "those examples which are surrounded by many examples with prediction errors.", "words": [{"w": "those", "b": [0.1312, 0.7415, 0.1734, 0.7565]}, {"w": "examples", "b": [0.1795, 0.7415, 0.253, 0.7565]}, {"w": "which", "b": [0.2591, 0.7415, 0.3058, 0.7565]}, {"w": "are", "b": [0.3119, 0.7415, 0.3366, 0.7565]}, {"w": "surrounded", "b": [0.3427, 0.7415, 0.4332, 0.7565]}, {"w": "by", "b": [0.4394, 0.7415, 0.4588, 0.7565]}, {"w": "many", "b": [0.465, 0.7415, 0.5091, 0.7565]}, {"w": "examples", "b": [0.5152, 0.7415, 0.5886, 0.7565]}, {"w": "with", "b": [0.5948, 0.7415, 0.6307, 0.7565]}, {"w": "prediction", "b": [0.6368, 0.7415, 0.7179, 0.7565]}, {"w": "errors.", "b": [0.724, 0.7415, 0.7756, 0.7565]}]}, {"id": "b_13", "type": "paragraph", "text": "6.6.8 Troubleshooting Deep Learning", "words": [{"w": "6.6.8", "b": [0.1312, 0.7897, 0.1749, 0.8046]}, {"w": "Troubleshooting", "b": [0.1961, 0.7897, 0.3461, 0.8046]}, {"w": "Deep", "b": [0.3532, 0.7897, 0.4007, 0.8046]}, {"w": "Learning", "b": [0.4078, 0.7897, 0.4894, 0.8046]}]}, {"id": "b_14", "type": "paragraph", "text": "To avoid problems when training a deep model, follow a workflow shown below:", "words": [{"w": "To", "b": [0.1306, 0.8259, 0.1516, 0.8409]}, {"w": "avoid", "b": [0.1577, 0.8259, 0.2003, 0.8409]}, {"w": "problems", "b": [0.2064, 0.8259, 0.2794, 0.8409]}, {"w": "when", "b": [0.2855, 0.8259, 0.3276, 0.8409]}, {"w": "training", "b": [0.3337, 0.8259, 0.3974, 0.8409]}, {"w": "a", "b": [0.4035, 0.8259, 0.4127, 0.8409]}, {"w": "deep", "b": [0.4189, 0.8259, 0.4558, 0.8409]}, {"w": "model,", "b": [0.462, 0.8259, 0.5158, 0.8409]}, {"w": "follow", "b": [0.522, 0.8259, 0.5691, 0.8409]}, {"w": "a", "b": [0.5753, 0.8259, 0.5845, 0.8409]}, {"w": "workflow", "b": [0.5906, 0.8259, 0.6619, 0.8409]}, {"w": "shown", "b": [0.6681, 0.8259, 0.7179, 0.8409]}, {"w": "below:", "b": [0.7241, 0.8259, 0.7753, 0.8409]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 32", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "32", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 208, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 10: A deep learning troubleshooting workflow.", "words": [{"w": "Figure", "b": [0.284, 0.3579, 0.3361, 0.3728]}, {"w": "10:", "b": [0.3422, 0.3579, 0.3658, 0.3728]}, {"w": "A", "b": [0.374, 0.3579, 0.3878, 0.3728]}, {"w": "deep", "b": [0.394, 0.3579, 0.4309, 0.3728]}, {"w": "learning", "b": [0.4371, 0.3579, 0.5017, 0.3728]}, {"w": "troubleshooting", "b": [0.5079, 0.3579, 0.6337, 0.3728]}, {"w": "workflow.", "b": [0.6398, 0.3579, 0.7162, 0.3728]}]}, {"id": "b_1", "type": "paragraph", "text": "When possible, start small, for example, with a simple model using a high-level library, such", "words": [{"w": "When", "b": [0.1303, 0.4081, 0.1774, 0.4231]}, {"w": "possible,", "b": [0.1835, 0.4081, 0.251, 0.4231]}, {"w": "start", "b": [0.2572, 0.4081, 0.2948, 0.4231]}, {"w": "small,", "b": [0.301, 0.4081, 0.3476, 0.4231]}, {"w": "for", "b": [0.3537, 0.4081, 0.3756, 0.4231]}, {"w": "example,", "b": [0.3817, 0.4081, 0.4521, 0.4231]}, {"w": "with", "b": [0.4582, 0.4081, 0.4936, 0.4231]}, {"w": "a", "b": [0.4998, 0.4081, 0.5089, 0.4231]}, {"w": "simple", "b": [0.515, 0.4081, 0.5657, 0.4231]}, {"w": "model", "b": [0.5719, 0.4081, 0.6199, 0.4231]}, {"w": "using", "b": [0.6261, 0.4081, 0.6677, 0.4231]}, {"w": "a", "b": [0.6739, 0.4081, 0.683, 0.4231]}, {"w": "high-level", "b": [0.6891, 0.4081, 0.765, 0.4231]}, {"w": "library,", "b": [0.7712, 0.4081, 0.8279, 0.4231]}, {"w": "such", "b": [0.8341, 0.4081, 0.8691, 0.4231]}]}, {"id": "b_2", "type": "paragraph", "text": "as Keras. It should be very easy to validate visually, ideally fitting on at most two screens.", "words": [{"w": "as", "b": [0.1312, 0.4261, 0.1477, 0.441]}, {"w": "Keras.", "b": [0.1539, 0.4261, 0.2128, 0.4413]}, {"w": "It", "b": [0.221, 0.4261, 0.2348, 0.441]}, {"w": "should", "b": [0.2409, 0.4261, 0.2933, 0.441]}, {"w": "be", "b": [0.2994, 0.4261, 0.3184, 0.441]}, {"w": "very", "b": [0.3245, 0.4261, 0.3589, 0.441]}, {"w": "easy", "b": [0.365, 0.4261, 0.3995, 0.441]}, {"w": "to", "b": [0.4056, 0.4261, 0.422, 0.441]}, {"w": "validate", "b": [0.4281, 0.4261, 0.4911, 0.441]}, {"w": "visually,", "b": [0.4973, 0.4261, 0.5624, 0.441]}, {"w": "ideally", "b": [0.5686, 0.4261, 0.6213, 0.441]}, {"w": "fitting", "b": [0.6275, 0.4261, 0.6766, 0.441]}, {"w": "on", "b": [0.6828, 0.4261, 0.7023, 0.441]}, {"w": "at", "b": [0.7084, 0.4261, 0.7248, 0.441]}, {"w": "most", "b": [0.7309, 0.4261, 0.7699, 0.441]}, {"w": "two", "b": [0.7761, 0.4261, 0.8048, 0.441]}, {"w": "screens.", "b": [0.8109, 0.4261, 0.8726, 0.441]}]}, {"id": "b_3", "type": "paragraph", "text": "Alternatively, reuse an existing open-source architecture that was proven to work (pay attention to the code license!). Start with:", "words": [{"w": "Alternatively,", "b": [0.1305, 0.453, 0.242, 0.468]}, {"w": "reuse", "b": [0.2512, 0.453, 0.2932, 0.468]}, {"w": "an", "b": [0.3018, 0.453, 0.3217, 0.468]}, {"w": "existing", "b": [0.3303, 0.453, 0.3937, 0.468]}, {"w": "open-source", "b": [0.4023, 0.453, 0.4992, 0.468]}, {"w": "architecture", "b": [0.5078, 0.453, 0.6057, 0.468]}, {"w": "that", "b": [0.6143, 0.453, 0.6488, 0.468]}, {"w": "was", "b": [0.6574, 0.453, 0.6873, 0.468]}, {"w": "proven", "b": [0.6959, 0.453, 0.7509, 0.468]}, {"w": "to", "b": [0.7595, 0.453, 0.7762, 0.468]}, {"w": "work", "b": [0.7848, 0.453, 0.8246, 0.468]}, {"w": "(pay", "b": [0.8332, 0.453, 0.8698, 0.468]}, {"w": "attention", "b": [0.1312, 0.4709, 0.2046, 0.4859]}, {"w": "to", "b": [0.2107, 0.4709, 0.2271, 0.4859]}, {"w": "the", "b": [0.2333, 0.4709, 0.2589, 0.4859]}, {"w": "code", "b": [0.265, 0.4709, 0.3015, 0.4859]}, {"w": "license!).", "b": [0.3076, 0.4709, 0.3775, 0.4859]}, {"w": "Start", "b": [0.3857, 0.4709, 0.4267, 0.4859]}, {"w": "with:", "b": [0.4329, 0.4709, 0.4739, 0.4859]}]}, {"id": "b_4", "type": "paragraph", "text": "• a small, normalized dataset fitting in memory, • the most simple to use cost-function optimizer (e.g., Adam), • an initialization strategy (e.g., random normal), • the default values of the sensitive hyperparameters of both the cost-function optimizer and the layers, and • no regularization.", "words": [{"w": "•", "b": [0.1538, 0.4979, 0.1681, 0.5128]}, {"w": "a", "b": [0.1774, 0.4979, 0.1866, 0.5128]}, {"w": "small,", "b": [0.1927, 0.4979, 0.24, 0.5128]}, {"w": "normalized", "b": [0.2462, 0.4979, 0.3344, 0.5128]}, {"w": "dataset", "b": [0.3405, 0.4979, 0.3991, 0.5128]}, {"w": "fitting", "b": [0.4052, 0.4979, 0.4545, 0.5128]}, {"w": "in", "b": [0.4606, 0.4979, 0.476, 0.5128]}, {"w": "memory,", "b": [0.4821, 0.4979, 0.5509, 0.5128]}, {"w": "•", "b": [0.1538, 0.5158, 0.1681, 0.5308]}, {"w": "the", "b": [0.1774, 0.5158, 0.203, 0.5308]}, {"w": "most", "b": [0.2091, 0.5158, 0.2482, 0.5308]}, {"w": "simple", "b": [0.2544, 0.5158, 0.3057, 0.5308]}, {"w": "to", "b": [0.3119, 0.5158, 0.3283, 0.5308]}, {"w": "use", "b": [0.3344, 0.5158, 0.3602, 0.5308]}, {"w": "cost-function", "b": [0.3663, 0.5158, 0.4705, 0.5308]}, {"w": "optimizer", "b": [0.4767, 0.5158, 0.5526, 0.5308]}, {"w": "(e.g.,", "b": [0.5588, 0.5158, 0.5988, 0.5308]}, {"w": "Adam),", "b": [0.6047, 0.5158, 0.6723, 0.5311]}, {"w": "•", "b": [0.1538, 0.5338, 0.1681, 0.5487]}, {"w": "an", "b": [0.1774, 0.5338, 0.1968, 0.5487]}, {"w": "initialization", "b": [0.203, 0.5338, 0.3045, 0.5487]}, {"w": "strategy", "b": [0.3107, 0.5338, 0.3759, 0.5487]}, {"w": "(e.g.,", "b": [0.3821, 0.5338, 0.4221, 0.5487]}, {"w": "random", "b": [0.4281, 0.5341, 0.499, 0.549]}, {"w": "normal),", "b": [0.5061, 0.5338, 0.5835, 0.549]}, {"w": "•", "b": [0.1538, 0.5517, 0.1681, 0.5667]}, {"w": "the", "b": [0.1774, 0.5517, 0.2027, 0.5667]}, {"w": "default", "b": [0.2089, 0.5517, 0.2641, 0.5667]}, {"w": "values", "b": [0.2702, 0.5517, 0.3185, 0.5667]}, {"w": "of", "b": [0.3246, 0.5517, 0.3393, 0.5667]}, {"w": "the", "b": [0.3455, 0.5517, 0.3708, 0.5667]}, {"w": "sensitive", "b": [0.377, 0.5517, 0.4441, 0.5667]}, {"w": "hyperparameters", "b": [0.4502, 0.5517, 0.5837, 0.5667]}, {"w": "of", "b": [0.5899, 0.5517, 0.6046, 0.5667]}, {"w": "both", "b": [0.6107, 0.5517, 0.6477, 0.5667]}, {"w": "the", "b": [0.6539, 0.5517, 0.6792, 0.5667]}, {"w": "cost-function", "b": [0.6854, 0.5517, 0.7883, 0.5667]}, {"w": "optimizer", "b": [0.7945, 0.5517, 0.8695, 0.5667]}, {"w": "and", "b": [0.1774, 0.5697, 0.2071, 0.5846]}, {"w": "the", "b": [0.2132, 0.5697, 0.2389, 0.5846]}, {"w": "layers,", "b": [0.245, 0.5697, 0.296, 0.5846]}, {"w": "and", "b": [0.3021, 0.5697, 0.3319, 0.5846]}, {"w": "•", "b": [0.1538, 0.5876, 0.1681, 0.6026]}, {"w": "no", "b": [0.1774, 0.5876, 0.1968, 0.6026]}, {"w": "regularization.", "b": [0.203, 0.5876, 0.319, 0.6026]}]}, {"id": "b_5", "type": "paragraph", "text": "Once you have your first simplistic model architecture and dataset, temporarily reduce your training dataset even further, to the size of one minibatch. Then start the training. Make sure your simplistic model is capable of overfitting this training minibatch. If the overfitting of the minibatch doesn’t happen, it is a solid indicator that something is wrong with your code or data. Look for the following signs7 and their probable causes:", "words": [{"w": "Once", "b": [0.1312, 0.6145, 0.1719, 0.6295]}, {"w": "you", "b": [0.178, 0.6145, 0.2064, 0.6295]}, {"w": "have", "b": [0.2126, 0.6145, 0.2486, 0.6295]}, {"w": "your", "b": [0.2548, 0.6145, 0.2904, 0.6295]}, {"w": "first", "b": [0.2965, 0.6145, 0.3282, 0.6295]}, {"w": "simplistic", "b": [0.3343, 0.6145, 0.4097, 0.6295]}, {"w": "model", "b": [0.4158, 0.6145, 0.4641, 0.6295]}, {"w": "architecture", "b": [0.4702, 0.6145, 0.5653, 0.6295]}, {"w": "and", "b": [0.5714, 0.6145, 0.6009, 0.6295]}, {"w": "dataset,", "b": [0.607, 0.6145, 0.6701, 0.6295]}, {"w": "temporarily", "b": [0.6763, 0.6145, 0.7698, 0.6295]}, {"w": "reduce", "b": [0.7759, 0.6145, 0.8278, 0.6295]}, {"w": "your", "b": [0.8339, 0.6145, 0.8695, 0.6295]}, {"w": "training", "b": [0.1312, 0.6325, 0.1948, 0.6474]}, {"w": "dataset", "b": [0.201, 0.6325, 0.2594, 0.6474]}, {"w": "even", "b": [0.2656, 0.6325, 0.3015, 0.6474]}, {"w": "further,", "b": [0.3076, 0.6325, 0.3687, 0.6474]}, {"w": "to", "b": [0.3748, 0.6325, 0.3912, 0.6474]}, {"w": "the", "b": [0.3974, 0.6325, 0.423, 0.6474]}, {"w": "size", "b": [0.4291, 0.6325, 0.4579, 0.6474]}, {"w": "of", "b": [0.4641, 0.6325, 0.4789, 0.6474]}, {"w": "one", "b": [0.4851, 0.6325, 0.5128, 0.6474]}, {"w": "minibatch.", "b": [0.5187, 0.6325, 0.6161, 0.6477]}, {"w": "Then", "b": [0.6243, 0.6325, 0.6663, 0.6474]}, {"w": "start", "b": [0.6725, 0.6325, 0.7105, 0.6474]}, {"w": "the", "b": [0.7167, 0.6325, 0.7423, 0.6474]}, {"w": "training.", "b": [0.7485, 0.6325, 0.8171, 0.6474]}, {"w": "Make", "b": [0.8253, 0.6325, 0.8689, 0.6474]}, {"w": "sure", "b": [0.1312, 0.6504, 0.1636, 0.6654]}, {"w": "your", "b": [0.1688, 0.6504, 0.204, 0.6654]}, {"w": "simplistic", "b": [0.2093, 0.6504, 0.2839, 0.6654]}, {"w": "model", "b": [0.2891, 0.6504, 0.3369, 0.6654]}, {"w": "is", "b": [0.3421, 0.6504, 0.3543, 0.6654]}, {"w": "capable", "b": [0.3596, 0.6504, 0.4188, 0.6654]}, {"w": "of", "b": [0.4241, 0.6504, 0.4387, 0.6654]}, {"w": "overfitting", "b": [0.4452, 0.6507, 0.5409, 0.6657]}, {"w": "this", "b": [0.5464, 0.6504, 0.5756, 0.6654]}, {"w": "training", "b": [0.5809, 0.6504, 0.6432, 0.6654]}, {"w": "minibatch.", "b": [0.6485, 0.6504, 0.7324, 0.6654]}, {"w": "If", "b": [0.7403, 0.6504, 0.7523, 0.6654]}, {"w": "the", "b": [0.7576, 0.6504, 0.7827, 0.6654]}, {"w": "overfitting", "b": [0.788, 0.6504, 0.8689, 0.6654]}, {"w": "of", "b": [0.1312, 0.6684, 0.1464, 0.6833]}, {"w": "the", "b": [0.1525, 0.6684, 0.1786, 0.6833]}, {"w": "minibatch", "b": [0.1847, 0.6684, 0.2666, 0.6833]}, {"w": "doesn’t", "b": [0.2727, 0.6684, 0.3317, 0.6833]}, {"w": "happen,", "b": [0.3379, 0.6684, 0.4031, 0.6833]}, {"w": "it", "b": [0.4092, 0.6684, 0.4217, 0.6833]}, {"w": "is", "b": [0.4278, 0.6684, 0.4405, 0.6833]}, {"w": "a", "b": [0.4466, 0.6684, 0.456, 0.6833]}, {"w": "solid", "b": [0.4621, 0.6684, 0.4998, 0.6833]}, {"w": "indicator", "b": [0.5059, 0.6684, 0.579, 0.6833]}, {"w": "that", "b": [0.5851, 0.6684, 0.6195, 0.6833]}, {"w": "something", "b": [0.6256, 0.6684, 0.7091, 0.6833]}, {"w": "is", "b": [0.7153, 0.6684, 0.7279, 0.6833]}, {"w": "wrong", "b": [0.734, 0.6684, 0.7841, 0.6833]}, {"w": "with", "b": [0.7903, 0.6684, 0.8268, 0.6833]}, {"w": "your", "b": [0.8329, 0.6684, 0.8695, 0.6833]}, {"w": "code", "b": [0.1312, 0.6863, 0.1677, 0.7013]}, {"w": "or", "b": [0.1738, 0.6863, 0.1903, 0.7013]}, {"w": "data.", "b": [0.1964, 0.6863, 0.2374, 0.7013]}, {"w": "Look", "b": [0.2456, 0.6863, 0.2858, 0.7013]}, {"w": "for", "b": [0.292, 0.6863, 0.3141, 0.7013]}, {"w": "the", "b": [0.3202, 0.6863, 0.3459, 0.7013]}, {"w": "following", "b": [0.352, 0.6863, 0.4238, 0.7013]}, {"w": "signs7", "b": [0.43, 0.6847, 0.4764, 0.7013]}, {"w": "and", "b": [0.4834, 0.6863, 0.5132, 0.7013]}, {"w": "their", "b": [0.5193, 0.6863, 0.5573, 0.7013]}, {"w": "probable", "b": [0.5635, 0.6863, 0.6333, 0.7013]}, {"w": "causes:", "b": [0.6394, 0.6863, 0.695, 0.7013]}]}, {"id": "b_6", "type": "paragraph", "text": "7Adapted from the talk “Troubleshooting Deep Neural Networks” by Josh Tobin et al., January 2019.", "words": [{"w": "7Adapted", "b": [0.1518, 0.7134, 0.2178, 0.7272]}, {"w": "from", "b": [0.223, 0.7152, 0.2548, 0.7272]}, {"w": "the", "b": [0.2601, 0.7152, 0.2818, 0.7272]}, {"w": "talk", "b": [0.2871, 0.7152, 0.3136, 0.7272]}, {"w": "“Troubleshooting", "b": [0.3188, 0.7152, 0.437, 0.7272]}, {"w": "Deep", "b": [0.4422, 0.7152, 0.4768, 0.7272]}, {"w": "Neural", "b": [0.482, 0.7152, 0.5277, 0.7272]}, {"w": "Networks”", "b": [0.533, 0.7152, 0.6041, 0.7272]}, {"w": "by", "b": [0.6093, 0.7152, 0.6258, 0.7272]}, {"w": "Josh", "b": [0.6311, 0.7152, 0.6618, 0.7272]}, {"w": "Tobin", "b": [0.6671, 0.7152, 0.7067, 0.7272]}, {"w": "et", "b": [0.7119, 0.7152, 0.725, 0.7272]}, {"w": "al.,", "b": [0.7302, 0.7152, 0.7511, 0.7272]}, {"w": "January", "b": [0.7563, 0.7152, 0.8114, 0.7272]}, {"w": "2019.", "b": [0.8167, 0.7152, 0.8524, 0.7272]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 33", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "33", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 209, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Sign Probable causes Error goes up Flipped the sign of the loss function or gradient Learning rate too high Softmax taken over wrong dimension Error explodes Numerical issue Learning rate too high Error oscillates Data or labels corrupted (e.g. zeroed or incorrectly shuffled) Learning rate too high Error plateaus Learning rate too low Gradient not flowing through the whole model Too much regularization Incorrect input to loss function Data or labels corrupted", "words": [{"w": "Sign", "b": [0.1919, 0.0866, 0.232, 0.1016]}, {"w": "Probable", "b": [0.3356, 0.0866, 0.419, 0.1016]}, {"w": "causes", "b": [0.4261, 0.0866, 0.4841, 0.1016]}, {"w": "Error", "b": [0.1919, 0.1048, 0.2354, 0.1198]}, {"w": "goes", "b": [0.2416, 0.1048, 0.276, 0.1198]}, {"w": "up", "b": [0.2822, 0.1048, 0.3027, 0.1198]}, {"w": "Flipped", "b": [0.3356, 0.1048, 0.3974, 0.1198]}, {"w": "the", "b": [0.4036, 0.1048, 0.4292, 0.1198]}, {"w": "sign", "b": [0.4354, 0.1048, 0.4673, 0.1198]}, {"w": "of", "b": [0.4734, 0.1048, 0.4883, 0.1198]}, {"w": "the", "b": [0.4944, 0.1048, 0.5201, 0.1198]}, {"w": "loss", "b": [0.5262, 0.1048, 0.5552, 0.1198]}, {"w": "function", "b": [0.5613, 0.1048, 0.6275, 0.1198]}, {"w": "or", "b": [0.6336, 0.1048, 0.6501, 0.1198]}, {"w": "gradient", "b": [0.6562, 0.1048, 0.7224, 0.1198]}, {"w": "Learning", "b": [0.3356, 0.1228, 0.4067, 0.1378]}, {"w": "rate", "b": [0.4128, 0.1228, 0.4447, 0.1378]}, {"w": "too", "b": [0.4508, 0.1228, 0.477, 0.1378]}, {"w": "high", "b": [0.4831, 0.1228, 0.518, 0.1378]}, {"w": "Softmax", "b": [0.3356, 0.1407, 0.4023, 0.1557]}, {"w": "taken", "b": [0.4084, 0.1407, 0.4525, 0.1557]}, {"w": "over", "b": [0.4587, 0.1407, 0.492, 0.1557]}, {"w": "wrong", "b": [0.4982, 0.1407, 0.5474, 0.1557]}, {"w": "dimension", "b": [0.5536, 0.1407, 0.6347, 0.1557]}, {"w": "Error", "b": [0.1919, 0.1593, 0.2354, 0.1742]}, {"w": "explodes", "b": [0.2416, 0.1593, 0.3104, 0.1742]}, {"w": "Numerical", "b": [0.3356, 0.1593, 0.4182, 0.1742]}, {"w": "issue", "b": [0.4244, 0.1593, 0.4625, 0.1742]}, {"w": "Learning", "b": [0.3356, 0.1772, 0.4067, 0.1922]}, {"w": "rate", "b": [0.4128, 0.1772, 0.4447, 0.1922]}, {"w": "too", "b": [0.4508, 0.1772, 0.477, 0.1922]}, {"w": "high", "b": [0.4831, 0.1772, 0.518, 0.1922]}, {"w": "Error", "b": [0.1919, 0.1958, 0.2354, 0.2107]}, {"w": "oscillates", "b": [0.2416, 0.1958, 0.3136, 0.2107]}, {"w": "Data", "b": [0.3356, 0.1958, 0.3746, 0.2107]}, {"w": "or", "b": [0.3797, 0.1958, 0.3959, 0.2107]}, {"w": "labels", "b": [0.4011, 0.1958, 0.4459, 0.2107]}, {"w": "corrupted", "b": [0.4511, 0.1958, 0.5276, 0.2107]}, {"w": "(e.g.", "b": [0.5328, 0.1958, 0.5669, 0.2107]}, {"w": "zeroed", "b": [0.5748, 0.1958, 0.6257, 0.2107]}, {"w": "or", "b": [0.6309, 0.1958, 0.647, 0.2107]}, {"w": "incorrectly", "b": [0.6522, 0.1958, 0.7362, 0.2107]}, {"w": "shuffled)", "b": [0.7414, 0.1958, 0.8083, 0.2107]}, {"w": "Learning", "b": [0.3356, 0.2137, 0.4067, 0.2287]}, {"w": "rate", "b": [0.4128, 0.2137, 0.4447, 0.2287]}, {"w": "too", "b": [0.4508, 0.2137, 0.477, 0.2287]}, {"w": "high", "b": [0.4831, 0.2137, 0.518, 0.2287]}, {"w": "Error", "b": [0.1919, 0.2323, 0.2354, 0.2472]}, {"w": "plateaus", "b": [0.2416, 0.2323, 0.3083, 0.2472]}, {"w": "Learning", "b": [0.3356, 0.2323, 0.4067, 0.2472]}, {"w": "rate", "b": [0.4128, 0.2323, 0.4447, 0.2472]}, {"w": "too", "b": [0.4508, 0.2323, 0.477, 0.2472]}, {"w": "low", "b": [0.4831, 0.2323, 0.5103, 0.2472]}, {"w": "Gradient", "b": [0.3356, 0.2502, 0.4071, 0.2652]}, {"w": "not", "b": [0.4132, 0.2502, 0.4399, 0.2652]}, {"w": "flowing", "b": [0.446, 0.2502, 0.5029, 0.2652]}, {"w": "through", "b": [0.5091, 0.2502, 0.5727, 0.2652]}, {"w": "the", "b": [0.5789, 0.2502, 0.6045, 0.2652]}, {"w": "whole", "b": [0.6107, 0.2502, 0.6568, 0.2652]}, {"w": "model", "b": [0.663, 0.2502, 0.7116, 0.2652]}, {"w": "Too", "b": [0.335, 0.2682, 0.3657, 0.2831]}, {"w": "much", "b": [0.3719, 0.2682, 0.4149, 0.2831]}, {"w": "regularization", "b": [0.4211, 0.2682, 0.5319, 0.2831]}, {"w": "Incorrect", "b": [0.3356, 0.2861, 0.408, 0.3011]}, {"w": "input", "b": [0.4142, 0.2861, 0.4573, 0.3011]}, {"w": "to", "b": [0.4634, 0.2861, 0.4798, 0.3011]}, {"w": "loss", "b": [0.486, 0.2861, 0.5149, 0.3011]}, {"w": "function", "b": [0.521, 0.2861, 0.5872, 0.3011]}, {"w": "Data", "b": [0.3356, 0.3041, 0.3754, 0.319]}, {"w": "or", "b": [0.3815, 0.3041, 0.398, 0.319]}, {"w": "labels", "b": [0.4041, 0.3041, 0.4498, 0.319]}, {"w": "corrupted", "b": [0.456, 0.3041, 0.5341, 0.319]}]}, {"id": "b_1", "type": "paragraph", "text": "Table 2: Common issues and most common causes of problems with getting to overfit one minibatch by a neural network model.", "words": [{"w": "Table", "b": [0.1306, 0.3376, 0.176, 0.3525]}, {"w": "2:", "b": [0.1821, 0.3376, 0.1967, 0.3525]}, {"w": "Common", "b": [0.2049, 0.3376, 0.279, 0.3525]}, {"w": "issues", "b": [0.2851, 0.3376, 0.3314, 0.3525]}, {"w": "and", "b": [0.3375, 0.3376, 0.3678, 0.3525]}, {"w": "most", "b": [0.3739, 0.3376, 0.4137, 0.3525]}, {"w": "common", "b": [0.4198, 0.3376, 0.4887, 0.3525]}, {"w": "causes", "b": [0.4948, 0.3376, 0.5462, 0.3525]}, {"w": "of", "b": [0.5523, 0.3376, 0.5674, 0.3525]}, {"w": "problems", "b": [0.5736, 0.3376, 0.6478, 0.3525]}, {"w": "with", "b": [0.6539, 0.3376, 0.6905, 0.3525]}, {"w": "getting", "b": [0.6966, 0.3376, 0.754, 0.3525]}, {"w": "to", "b": [0.7601, 0.3376, 0.7768, 0.3525]}, {"w": "overfit", "b": [0.783, 0.3376, 0.8347, 0.3525]}, {"w": "one", "b": [0.8408, 0.3376, 0.869, 0.3525]}, {"w": "minibatch", "b": [0.1312, 0.3555, 0.2117, 0.3705]}, {"w": "by", "b": [0.2179, 0.3555, 0.2374, 0.3705]}, {"w": "a", "b": [0.2435, 0.3555, 0.2527, 0.3705]}, {"w": "neural", "b": [0.2589, 0.3555, 0.3092, 0.3705]}, {"w": "network", "b": [0.3153, 0.3555, 0.3795, 0.3705]}, {"w": "model.", "b": [0.3856, 0.3555, 0.4395, 0.3705]}]}, {"id": "b_2", "type": "paragraph", "text": "Once your model overfits one minibatch, get back to the entire dataset, and train, evaluate, then tune hyperparameters until no improvements on the validation data are possible.", "words": [{"w": "Once", "b": [0.1312, 0.4058, 0.1722, 0.4207]}, {"w": "your", "b": [0.1784, 0.4058, 0.2143, 0.4207]}, {"w": "model", "b": [0.2204, 0.4058, 0.269, 0.4207]}, {"w": "overfits", "b": [0.2752, 0.4058, 0.3332, 0.4207]}, {"w": "one", "b": [0.3394, 0.4058, 0.367, 0.4207]}, {"w": "minibatch,", "b": [0.3732, 0.4058, 0.4587, 0.4207]}, {"w": "get", "b": [0.4648, 0.4058, 0.4894, 0.4207]}, {"w": "back", "b": [0.4956, 0.4058, 0.5324, 0.4207]}, {"w": "to", "b": [0.5386, 0.4058, 0.555, 0.4207]}, {"w": "the", "b": [0.5611, 0.4058, 0.5867, 0.4207]}, {"w": "entire", "b": [0.5929, 0.4058, 0.6385, 0.4207]}, {"w": "dataset,", "b": [0.6446, 0.4058, 0.7082, 0.4207]}, {"w": "and", "b": [0.7144, 0.4058, 0.7441, 0.4207]}, {"w": "train,", "b": [0.7502, 0.4058, 0.7943, 0.4207]}, {"w": "evaluate,", "b": [0.8005, 0.4058, 0.8717, 0.4207]}, {"w": "then", "b": [0.1312, 0.4237, 0.1671, 0.4387]}, {"w": "tune", "b": [0.1733, 0.4237, 0.2092, 0.4387]}, {"w": "hyperparameters", "b": [0.2153, 0.4237, 0.3504, 0.4387]}, {"w": "until", "b": [0.3566, 0.4237, 0.394, 0.4387]}, {"w": "no", "b": [0.4002, 0.4237, 0.4197, 0.4387]}, {"w": "improvements", "b": [0.4258, 0.4237, 0.5377, 0.4387]}, {"w": "on", "b": [0.5439, 0.4237, 0.5634, 0.4387]}, {"w": "the", "b": [0.5695, 0.4237, 0.5952, 0.4387]}, {"w": "validation", "b": [0.6013, 0.4237, 0.6808, 0.4387]}, {"w": "data", "b": [0.6869, 0.4237, 0.7228, 0.4387]}, {"w": "are", "b": [0.729, 0.4237, 0.7536, 0.4387]}, {"w": "possible.", "b": [0.7598, 0.4237, 0.8282, 0.4387]}]}, {"id": "b_3", "type": "paragraph", "text": "If the performance of the model is still unsatisfactory, update the model (e.g., by increasing its depth or width), or the training data (e.g., by changing the pre-processing, or adding features). Debug the change by overfitting one minibatch once again, then train, evaluate, and tune the new model. Keep iterating until you’re satisfied with the quality of the model.", "words": [{"w": "If", "b": [0.1312, 0.4506, 0.1435, 0.4656]}, {"w": "the", "b": [0.1496, 0.4506, 0.1751, 0.4656]}, {"w": "performance", "b": [0.1813, 0.4506, 0.2803, 0.4656]}, {"w": "of", "b": [0.2864, 0.4506, 0.3012, 0.4656]}, {"w": "the", "b": [0.3074, 0.4506, 0.3329, 0.4656]}, {"w": "model", "b": [0.339, 0.4506, 0.3874, 0.4656]}, {"w": "is", "b": [0.3936, 0.4506, 0.4059, 0.4656]}, {"w": "still", "b": [0.4121, 0.4506, 0.4418, 0.4656]}, {"w": "unsatisfactory,", "b": [0.4479, 0.4506, 0.5639, 0.4656]}, {"w": "update", "b": [0.5701, 0.4506, 0.6256, 0.4656]}, {"w": "the", "b": [0.6318, 0.4506, 0.6573, 0.4656]}, {"w": "model", "b": [0.6634, 0.4506, 0.7119, 0.4656]}, {"w": "(e.g.,", "b": [0.718, 0.4506, 0.7578, 0.4656]}, {"w": "by", "b": [0.7639, 0.4506, 0.7833, 0.4656]}, {"w": "increasing", "b": [0.7895, 0.4506, 0.8691, 0.4656]}, {"w": "its", "b": [0.1312, 0.4686, 0.1512, 0.4835]}, {"w": "depth", "b": [0.158, 0.4686, 0.2051, 0.4835]}, {"w": "or", "b": [0.2119, 0.4686, 0.2287, 0.4835]}, {"w": "width),", "b": [0.2355, 0.4686, 0.2952, 0.4835]}, {"w": "or", "b": [0.3022, 0.4686, 0.3189, 0.4835]}, {"w": "the", "b": [0.3258, 0.4686, 0.3519, 0.4835]}, {"w": "training", "b": [0.3587, 0.4686, 0.4237, 0.4835]}, {"w": "data", "b": [0.4305, 0.4686, 0.4671, 0.4835]}, {"w": "(e.g.,", "b": [0.4739, 0.4686, 0.5147, 0.4835]}, {"w": "by", "b": [0.5217, 0.4686, 0.5416, 0.4835]}, {"w": "changing", "b": [0.5484, 0.4686, 0.6211, 0.4835]}, {"w": "the", "b": [0.6279, 0.4686, 0.6541, 0.4835]}, {"w": "pre-processing,", "b": [0.6609, 0.4686, 0.7831, 0.4835]}, {"w": "or", "b": [0.7901, 0.4686, 0.8068, 0.4835]}, {"w": "adding", "b": [0.8137, 0.4686, 0.8691, 0.4835]}, {"w": "features).", "b": [0.1312, 0.4865, 0.2081, 0.5015]}, {"w": "Debug", "b": [0.2162, 0.4865, 0.2692, 0.5015]}, {"w": "the", "b": [0.2753, 0.4865, 0.3014, 0.5015]}, {"w": "change", "b": [0.3075, 0.4865, 0.3633, 0.5015]}, {"w": "by", "b": [0.3694, 0.4865, 0.3892, 0.5015]}, {"w": "overfitting", "b": [0.3954, 0.4865, 0.4794, 0.5015]}, {"w": "one", "b": [0.4855, 0.4865, 0.5137, 0.5015]}, {"w": "minibatch", "b": [0.5198, 0.4865, 0.6017, 0.5015]}, {"w": "once", "b": [0.6078, 0.4865, 0.6443, 0.5015]}, {"w": "again,", "b": [0.6504, 0.4865, 0.6994, 0.5015]}, {"w": "then", "b": [0.7055, 0.4865, 0.7421, 0.5015]}, {"w": "train,", "b": [0.7482, 0.4865, 0.7931, 0.5015]}, {"w": "evaluate,", "b": [0.7992, 0.4865, 0.8717, 0.5015]}, {"w": "and", "b": [0.1312, 0.5045, 0.1609, 0.5194]}, {"w": "tune", "b": [0.167, 0.5045, 0.2028, 0.5194]}, {"w": "the", "b": [0.2089, 0.5045, 0.2344, 0.5194]}, {"w": "new", "b": [0.2405, 0.5045, 0.2722, 0.5194]}, {"w": "model.", "b": [0.2783, 0.5045, 0.332, 0.5194]}, {"w": "Keep", "b": [0.3402, 0.5045, 0.381, 0.5194]}, {"w": "iterating", "b": [0.3872, 0.5045, 0.4556, 0.5194]}, {"w": "until", "b": [0.4618, 0.5045, 0.4991, 0.5194]}, {"w": "you’re", "b": [0.5052, 0.5045, 0.5543, 0.5194]}, {"w": "satisfied", "b": [0.5604, 0.5045, 0.625, 0.5194]}, {"w": "with", "b": [0.6311, 0.5045, 0.6669, 0.5194]}, {"w": "the", "b": [0.673, 0.5045, 0.6985, 0.5194]}, {"w": "quality", "b": [0.7047, 0.5045, 0.7603, 0.5194]}, {"w": "of", "b": [0.7665, 0.5045, 0.7813, 0.5194]}, {"w": "the", "b": [0.7874, 0.5045, 0.8129, 0.5194]}, {"w": "model.", "b": [0.8191, 0.5045, 0.8727, 0.5194]}]}, {"id": "b_4", "type": "paragraph", "text": "While you are searching for the best architecture for your model, it’s convenient not just to", "words": [{"w": "While", "b": [0.1303, 0.5314, 0.1779, 0.5463]}, {"w": "you", "b": [0.184, 0.5314, 0.2127, 0.5463]}, {"w": "are", "b": [0.2188, 0.5314, 0.2435, 0.5463]}, {"w": "searching", "b": [0.2496, 0.5314, 0.324, 0.5463]}, {"w": "for", "b": [0.3301, 0.5314, 0.3522, 0.5463]}, {"w": "the", "b": [0.3583, 0.5314, 0.3839, 0.5463]}, {"w": "best", "b": [0.3901, 0.5314, 0.4234, 0.5463]}, {"w": "architecture", "b": [0.4296, 0.5314, 0.5254, 0.5463]}, {"w": "for", "b": [0.5316, 0.5314, 0.5536, 0.5463]}, {"w": "your", "b": [0.5598, 0.5314, 0.5956, 0.5463]}, {"w": "model,", "b": [0.6018, 0.5314, 0.6555, 0.5463]}, {"w": "it’s", "b": [0.6617, 0.5314, 0.6863, 0.5463]}, {"w": "convenient", "b": [0.6925, 0.5314, 0.7774, 0.5463]}, {"w": "not", "b": [0.7836, 0.5314, 0.8102, 0.5463]}, {"w": "just", "b": [0.8163, 0.5314, 0.8466, 0.5463]}, {"w": "to", "b": [0.8528, 0.5314, 0.8692, 0.5463]}]}, {"id": "b_5", "type": "paragraph", "text": "use a smaller training set, but also to simplify the problem by either,", "words": [{"w": "use", "b": [0.1312, 0.5493, 0.157, 0.5643]}, {"w": "a", "b": [0.1631, 0.5493, 0.1724, 0.5643]}, {"w": "smaller", "b": [0.1785, 0.5493, 0.2361, 0.5643]}, {"w": "training", "b": [0.2422, 0.5493, 0.3059, 0.5643]}, {"w": "set,", "b": [0.312, 0.5493, 0.3398, 0.5643]}, {"w": "but", "b": [0.346, 0.5493, 0.3737, 0.5643]}, {"w": "also", "b": [0.3798, 0.5493, 0.4107, 0.5643]}, {"w": "to", "b": [0.4168, 0.5493, 0.4332, 0.5643]}, {"w": "simplify", "b": [0.4394, 0.5493, 0.5031, 0.5643]}, {"w": "the", "b": [0.5092, 0.5493, 0.5348, 0.5643]}, {"w": "problem", "b": [0.541, 0.5493, 0.6067, 0.5643]}, {"w": "by", "b": [0.6128, 0.5493, 0.6323, 0.5643]}, {"w": "either,", "b": [0.6385, 0.5493, 0.6898, 0.5643]}]}, {"id": "b_6", "type": "paragraph", "text": "• creating a simple synthetic training set, or • reducing the number of classes or the resolution of input images (or video fragments), size of the texts, bitrate of the sound frequencies, and so on.", "words": [{"w": "•", "b": [0.1538, 0.5763, 0.1681, 0.5912]}, {"w": "creating", "b": [0.1774, 0.5763, 0.242, 0.5912]}, {"w": "a", "b": [0.2482, 0.5763, 0.2574, 0.5912]}, {"w": "simple", "b": [0.2635, 0.5763, 0.3149, 0.5912]}, {"w": "synthetic", "b": [0.3211, 0.5763, 0.394, 0.5912]}, {"w": "training", "b": [0.4002, 0.5763, 0.4638, 0.5912]}, {"w": "set,", "b": [0.4699, 0.5763, 0.4977, 0.5912]}, {"w": "or", "b": [0.5039, 0.5763, 0.5203, 0.5912]}, {"w": "•", "b": [0.1538, 0.5942, 0.1681, 0.6092]}, {"w": "reducing", "b": [0.1774, 0.5942, 0.2461, 0.6092]}, {"w": "the", "b": [0.2523, 0.5942, 0.2779, 0.6092]}, {"w": "number", "b": [0.2841, 0.5942, 0.3452, 0.6092]}, {"w": "of", "b": [0.3513, 0.5942, 0.3662, 0.6092]}, {"w": "classes", "b": [0.3724, 0.5942, 0.425, 0.6092]}, {"w": "or", "b": [0.4312, 0.5942, 0.4476, 0.6092]}, {"w": "the", "b": [0.4538, 0.5942, 0.4794, 0.6092]}, {"w": "resolution", "b": [0.4856, 0.5942, 0.5647, 0.6092]}, {"w": "of", "b": [0.5709, 0.5942, 0.5857, 0.6092]}, {"w": "input", "b": [0.5919, 0.5942, 0.635, 0.6092]}, {"w": "images", "b": [0.6411, 0.5942, 0.6956, 0.6092]}, {"w": "(or", "b": [0.7017, 0.5942, 0.7254, 0.6092]}, {"w": "video", "b": [0.7315, 0.5942, 0.7741, 0.6092]}, {"w": "fragments),", "b": [0.7803, 0.5942, 0.8717, 0.6092]}, {"w": "size", "b": [0.1774, 0.6121, 0.2062, 0.6271]}, {"w": "of", "b": [0.2123, 0.6121, 0.2272, 0.6271]}, {"w": "the", "b": [0.2334, 0.6121, 0.259, 0.6271]}, {"w": "texts,", "b": [0.2652, 0.6121, 0.3099, 0.6271]}, {"w": "bitrate", "b": [0.316, 0.6121, 0.3704, 0.6271]}, {"w": "of", "b": [0.3766, 0.6121, 0.3914, 0.6271]}, {"w": "the", "b": [0.3976, 0.6121, 0.4232, 0.6271]}, {"w": "sound", "b": [0.4294, 0.6121, 0.4767, 0.6271]}, {"w": "frequencies,", "b": [0.4828, 0.6121, 0.5763, 0.6271]}, {"w": "and", "b": [0.5825, 0.6121, 0.6122, 0.6271]}, {"w": "so", "b": [0.6184, 0.6121, 0.6349, 0.6271]}, {"w": "on.", "b": [0.641, 0.6121, 0.6656, 0.6271]}]}, {"id": "b_7", "type": "paragraph", "text": "At the evaluation step of the deep learning troubleshooting workflow shown in Figure 10, verify if the poor model performance could be caused by one of the reasons listed in Section 6.6.1. Choose the next step depending on whether the performance can be improved by tuning hyperparameters, updating the model, features, or the training data.", "words": [{"w": "At", "b": [0.1305, 0.6391, 0.1506, 0.654]}, {"w": "the", "b": [0.1553, 0.6391, 0.1805, 0.654]}, {"w": "evaluation", "b": [0.1852, 0.6391, 0.266, 0.654]}, {"w": "step", "b": [0.2707, 0.6391, 0.303, 0.654]}, {"w": "of", "b": [0.3077, 0.6391, 0.3223, 0.654]}, {"w": "the", "b": [0.327, 0.6391, 0.3521, 0.654]}, {"w": "deep", "b": [0.3568, 0.6391, 0.393, 0.654]}, {"w": "learning", "b": [0.3977, 0.6391, 0.4611, 0.654]}, {"w": "troubleshooting", "b": [0.4658, 0.6391, 0.5891, 0.654]}, {"w": "workflow", "b": [0.5938, 0.6391, 0.6636, 0.654]}, {"w": "shown", "b": [0.6683, 0.6391, 0.7172, 0.654]}, {"w": "in", "b": [0.7219, 0.6391, 0.7369, 0.654]}, {"w": "Figure", "b": [0.7417, 0.6391, 0.7927, 0.654]}, {"w": "10,", "b": [0.7974, 0.6391, 0.8205, 0.654]}, {"w": "verify", "b": [0.8255, 0.6391, 0.8698, 0.654]}, {"w": "if", "b": [0.1312, 0.657, 0.142, 0.672]}, {"w": "the", "b": [0.1482, 0.657, 0.1738, 0.672]}, {"w": "poor", "b": [0.1799, 0.657, 0.2168, 0.672]}, {"w": "model", "b": [0.223, 0.657, 0.2717, 0.672]}, {"w": "performance", "b": [0.2778, 0.657, 0.3773, 0.672]}, {"w": "could", "b": [0.3834, 0.657, 0.4265, 0.672]}, {"w": "be", "b": [0.4326, 0.657, 0.4516, 0.672]}, {"w": "caused", "b": [0.4578, 0.657, 0.5111, 0.672]}, {"w": "by", "b": [0.5173, 0.657, 0.5368, 0.672]}, {"w": "one", "b": [0.5429, 0.657, 0.5706, 0.672]}, {"w": "of", "b": [0.5767, 0.657, 0.5916, 0.672]}, {"w": "the", "b": [0.5978, 0.657, 0.6234, 0.672]}, {"w": "reasons", "b": [0.6295, 0.657, 0.6882, 0.672]}, {"w": "listed", "b": [0.6943, 0.657, 0.7375, 0.672]}, {"w": "in", "b": [0.7436, 0.657, 0.759, 0.672]}, {"w": "Section", "b": [0.7652, 0.657, 0.8236, 0.672]}, {"w": "6.6.1.", "b": [0.8297, 0.657, 0.8727, 0.672]}, {"w": "Choose", "b": [0.1312, 0.675, 0.1904, 0.6899]}, {"w": "the", "b": [0.1972, 0.675, 0.2234, 0.6899]}, {"w": "next", "b": [0.2302, 0.675, 0.2663, 0.6899]}, {"w": "step", "b": [0.2731, 0.675, 0.3067, 0.6899]}, {"w": "depending", "b": [0.3135, 0.675, 0.3977, 0.6899]}, {"w": "on", "b": [0.4045, 0.675, 0.4243, 0.6899]}, {"w": "whether", "b": [0.4311, 0.675, 0.4971, 0.6899]}, {"w": "the", "b": [0.5039, 0.675, 0.53, 0.6899]}, {"w": "performance", "b": [0.5369, 0.675, 0.6384, 0.6899]}, {"w": "can", "b": [0.6452, 0.675, 0.6735, 0.6899]}, {"w": "be", "b": [0.6803, 0.675, 0.6996, 0.6899]}, {"w": "improved", "b": [0.7064, 0.675, 0.7823, 0.6899]}, {"w": "by", "b": [0.7891, 0.675, 0.809, 0.6899]}, {"w": "tuning", "b": [0.8158, 0.675, 0.8692, 0.6899]}, {"w": "hyperparameters,", "b": [0.1312, 0.6929, 0.2715, 0.7079]}, {"w": "updating", "b": [0.2776, 0.6929, 0.3499, 0.7079]}, {"w": "the", "b": [0.3561, 0.6929, 0.3817, 0.7079]}, {"w": "model,", "b": [0.3879, 0.6929, 0.4417, 0.7079]}, {"w": "features,", "b": [0.4478, 0.6929, 0.5162, 0.7079]}, {"w": "or", "b": [0.5224, 0.6929, 0.5388, 0.7079]}, {"w": "the", "b": [0.545, 0.6929, 0.5706, 0.7079]}, {"w": "training", "b": [0.5768, 0.6929, 0.6404, 0.7079]}, {"w": "data.", "b": [0.6465, 0.6929, 0.6876, 0.7079]}]}, {"id": "b_8", "type": "paragraph", "text": "6.7 Best Practices", "words": [{"w": "6.7", "b": [0.1312, 0.7417, 0.1631, 0.7597]}, {"w": "Best", "b": [0.188, 0.7417, 0.2366, 0.7597]}, {"w": "Practices", "b": [0.2449, 0.7417, 0.3442, 0.7597]}]}, {"id": "b_9", "type": "paragraph", "text": "In this section, I gathered practical advice on training machine learning models. The best practices below aren’t strict prescriptions. They are rather recommendations that often save time, effort, and might lead to higher quality results.", "words": [{"w": "In", "b": [0.1312, 0.7803, 0.1485, 0.7953]}, {"w": "this", "b": [0.1546, 0.7803, 0.185, 0.7953]}, {"w": "section,", "b": [0.1912, 0.7803, 0.2529, 0.7953]}, {"w": "I", "b": [0.259, 0.7803, 0.2658, 0.7953]}, {"w": "gathered", "b": [0.272, 0.7803, 0.343, 0.7953]}, {"w": "practical", "b": [0.3492, 0.7803, 0.4202, 0.7953]}, {"w": "advice", "b": [0.4264, 0.7803, 0.4781, 0.7953]}, {"w": "on", "b": [0.4842, 0.7803, 0.5041, 0.7953]}, {"w": "training", "b": [0.5102, 0.7803, 0.575, 0.7953]}, {"w": "machine", "b": [0.5812, 0.7803, 0.6485, 0.7953]}, {"w": "learning", "b": [0.6547, 0.7803, 0.7205, 0.7953]}, {"w": "models.", "b": [0.7266, 0.7803, 0.7888, 0.7953]}, {"w": "The", "b": [0.7971, 0.7803, 0.8294, 0.7953]}, {"w": "best", "b": [0.8356, 0.7803, 0.8696, 0.7953]}, {"w": "practices", "b": [0.1312, 0.7983, 0.2011, 0.8132]}, {"w": "below", "b": [0.2072, 0.7983, 0.2527, 0.8132]}, {"w": "aren’t", "b": [0.2588, 0.7983, 0.3054, 0.8132]}, {"w": "strict", "b": [0.3115, 0.7983, 0.3531, 0.8132]}, {"w": "prescriptions.", "b": [0.3592, 0.7983, 0.4656, 0.8132]}, {"w": "They", "b": [0.4738, 0.7983, 0.5147, 0.8132]}, {"w": "are", "b": [0.5209, 0.7983, 0.5452, 0.8132]}, {"w": "rather", "b": [0.5513, 0.7983, 0.5999, 0.8132]}, {"w": "recommendations", "b": [0.606, 0.7983, 0.7446, 0.8132]}, {"w": "that", "b": [0.7507, 0.7983, 0.784, 0.8132]}, {"w": "often", "b": [0.7902, 0.7983, 0.8301, 0.8132]}, {"w": "save", "b": [0.8362, 0.7983, 0.8691, 0.8132]}, {"w": "time,", "b": [0.1312, 0.8162, 0.1722, 0.8312]}, {"w": "effort,", "b": [0.1784, 0.8162, 0.2261, 0.8312]}, {"w": "and", "b": [0.2323, 0.8162, 0.262, 0.8312]}, {"w": "might", "b": [0.2682, 0.8162, 0.3148, 0.8312]}, {"w": "lead", "b": [0.3209, 0.8162, 0.3538, 0.8312]}, {"w": "to", "b": [0.3599, 0.8162, 0.3763, 0.8312]}, {"w": "higher", "b": [0.3825, 0.8162, 0.4328, 0.8312]}, {"w": "quality", "b": [0.4389, 0.8162, 0.4948, 0.8312]}, {"w": "results.", "b": [0.501, 0.8162, 0.5587, 0.8312]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 34", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "34", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 210, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "6.7.1 Deliver a Good Model", "words": [{"w": "6.7.1", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Deliver", "b": [0.1961, 0.0884, 0.263, 0.1034]}, {"w": "a", "b": [0.27, 0.0884, 0.2803, 0.1034]}, {"w": "Good", "b": [0.2874, 0.0884, 0.3383, 0.1034]}, {"w": "Model", "b": [0.3454, 0.0884, 0.4041, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "What is a good model? A good model has two properties:", "words": [{"w": "What", "b": [0.1303, 0.1247, 0.1759, 0.1396]}, {"w": "is", "b": [0.1821, 0.1247, 0.1945, 0.1396]}, {"w": "a", "b": [0.2006, 0.1247, 0.2099, 0.1396]}, {"w": "good", "b": [0.216, 0.1247, 0.255, 0.1396]}, {"w": "model?", "b": [0.2611, 0.1247, 0.3185, 0.1396]}, {"w": "A", "b": [0.3267, 0.1247, 0.3406, 0.1396]}, {"w": "good", "b": [0.3467, 0.1247, 0.3857, 0.1396]}, {"w": "model", "b": [0.3918, 0.1247, 0.4405, 0.1396]}, {"w": "has", "b": [0.4467, 0.1247, 0.4734, 0.1396]}, {"w": "two", "b": [0.4796, 0.1247, 0.5083, 0.1396]}, {"w": "properties:", "b": [0.5144, 0.1247, 0.6003, 0.1396]}]}, {"id": "b_2", "type": "paragraph", "text": "• it has the desired quality according to the performance metric; and • it is safe to serve in a production environment.", "words": [{"w": "•", "b": [0.1538, 0.1516, 0.1681, 0.1666]}, {"w": "it", "b": [0.1774, 0.1516, 0.1897, 0.1666]}, {"w": "has", "b": [0.1958, 0.1516, 0.2226, 0.1666]}, {"w": "the", "b": [0.2287, 0.1516, 0.2544, 0.1666]}, {"w": "desired", "b": [0.2605, 0.1516, 0.3171, 0.1666]}, {"w": "quality", "b": [0.3233, 0.1516, 0.3791, 0.1666]}, {"w": "according", "b": [0.3853, 0.1516, 0.4623, 0.1666]}, {"w": "to", "b": [0.4684, 0.1516, 0.4848, 0.1666]}, {"w": "the", "b": [0.491, 0.1516, 0.5166, 0.1666]}, {"w": "performance", "b": [0.5227, 0.1516, 0.6223, 0.1666]}, {"w": "metric;", "b": [0.6285, 0.1516, 0.6849, 0.1666]}, {"w": "and", "b": [0.6911, 0.1516, 0.7208, 0.1666]}, {"w": "•", "b": [0.1538, 0.1695, 0.1681, 0.1845]}, {"w": "it", "b": [0.1774, 0.1695, 0.1897, 0.1845]}, {"w": "is", "b": [0.1958, 0.1695, 0.2082, 0.1845]}, {"w": "safe", "b": [0.2144, 0.1695, 0.2447, 0.1845]}, {"w": "to", "b": [0.2509, 0.1695, 0.2673, 0.1845]}, {"w": "serve", "b": [0.2734, 0.1695, 0.3136, 0.1845]}, {"w": "in", "b": [0.3197, 0.1695, 0.3351, 0.1845]}, {"w": "a", "b": [0.3413, 0.1695, 0.3505, 0.1845]}, {"w": "production", "b": [0.3567, 0.1695, 0.4444, 0.1845]}, {"w": "environment.", "b": [0.4506, 0.1695, 0.5557, 0.1845]}]}, {"id": "b_3", "type": "equation", "text": "For a model to be safe-to-serve means satisfying the following requirements:", "words": [{"w": "For", "b": [0.1312, 0.1965, 0.1582, 0.2114]}, {"w": "a", "b": [0.1643, 0.1965, 0.1736, 0.2114]}, {"w": "model", "b": [0.1797, 0.1965, 0.2284, 0.2114]}, {"w": "to", "b": [0.2346, 0.1965, 0.251, 0.2114]}, {"w": "be", "b": [0.2571, 0.1965, 0.2761, 0.2114]}, {"w": "safe-to-serve", "b": [0.2823, 0.1965, 0.3815, 0.2114]}, {"w": "means", "b": [0.3876, 0.1965, 0.438, 0.2114]}, {"w": "satisfying", "b": [0.4441, 0.1965, 0.5202, 0.2114]}, {"w": "the", "b": [0.5264, 0.1965, 0.552, 0.2114]}, {"w": "following", "b": [0.5582, 0.1965, 0.6299, 0.2114]}, {"w": "requirements:", "b": [0.6361, 0.1965, 0.745, 0.2114]}]}, {"id": "b_4", "type": "paragraph", "text": "• it will not crash or cause errors in the serving system when being loaded, or when loaded with bad or unexpected inputs; • it will not use an unreasonable amount of resources (such as CPU, GPU, or RAM).", "words": [{"w": "•", "b": [0.1538, 0.2234, 0.1681, 0.2383]}, {"w": "it", "b": [0.1774, 0.2234, 0.1899, 0.2383]}, {"w": "will", "b": [0.1972, 0.2234, 0.2265, 0.2383]}, {"w": "not", "b": [0.2338, 0.2234, 0.261, 0.2383]}, {"w": "crash", "b": [0.2682, 0.2234, 0.3113, 0.2383]}, {"w": "or", "b": [0.3186, 0.2234, 0.3354, 0.2383]}, {"w": "cause", "b": [0.3427, 0.2234, 0.3867, 0.2383]}, {"w": "errors", "b": [0.394, 0.2234, 0.4414, 0.2383]}, {"w": "in", "b": [0.4487, 0.2234, 0.4644, 0.2383]}, {"w": "the", "b": [0.4716, 0.2234, 0.4978, 0.2383]}, {"w": "serving", "b": [0.5051, 0.2234, 0.5633, 0.2383]}, {"w": "system", "b": [0.5706, 0.2234, 0.6268, 0.2383]}, {"w": "when", "b": [0.6341, 0.2234, 0.6769, 0.2383]}, {"w": "being", "b": [0.6842, 0.2234, 0.7287, 0.2383]}, {"w": "loaded,", "b": [0.736, 0.2234, 0.7946, 0.2383]}, {"w": "or", "b": [0.8021, 0.2234, 0.8189, 0.2383]}, {"w": "when", "b": [0.8262, 0.2234, 0.8691, 0.2383]}, {"w": "loaded", "b": [0.1774, 0.2413, 0.2297, 0.2563]}, {"w": "with", "b": [0.2358, 0.2413, 0.2717, 0.2563]}, {"w": "bad", "b": [0.2778, 0.2413, 0.3076, 0.2563]}, {"w": "or", "b": [0.3137, 0.2413, 0.3302, 0.2563]}, {"w": "unexpected", "b": [0.3363, 0.2413, 0.4276, 0.2563]}, {"w": "inputs;", "b": [0.4338, 0.2413, 0.4893, 0.2563]}, {"w": "•", "b": [0.1538, 0.2593, 0.1681, 0.2742]}, {"w": "it", "b": [0.1774, 0.2593, 0.1897, 0.2742]}, {"w": "will", "b": [0.1958, 0.2593, 0.2245, 0.2742]}, {"w": "not", "b": [0.2307, 0.2593, 0.2573, 0.2742]}, {"w": "use", "b": [0.2635, 0.2593, 0.2892, 0.2742]}, {"w": "an", "b": [0.2954, 0.2593, 0.3149, 0.2742]}, {"w": "unreasonable", "b": [0.321, 0.2593, 0.4258, 0.2742]}, {"w": "amount", "b": [0.4319, 0.2593, 0.4929, 0.2742]}, {"w": "of", "b": [0.4991, 0.2593, 0.5139, 0.2742]}, {"w": "resources", "b": [0.5201, 0.2593, 0.5932, 0.2742]}, {"w": "(such", "b": [0.5994, 0.2593, 0.6421, 0.2742]}, {"w": "as", "b": [0.6482, 0.2593, 0.6647, 0.2742]}, {"w": "CPU,", "b": [0.6709, 0.2593, 0.7157, 0.2742]}, {"w": "GPU,", "b": [0.7219, 0.2593, 0.7679, 0.2742]}, {"w": "or", "b": [0.774, 0.2593, 0.7905, 0.2742]}, {"w": "RAM).", "b": [0.7966, 0.2593, 0.8533, 0.2742]}]}, {"id": "b_5", "type": "paragraph", "text": "6.7.2 Trust Popular Open Source Implementations", "words": [{"w": "6.7.2", "b": [0.1312, 0.3074, 0.1749, 0.3224]}, {"w": "Trust", "b": [0.1961, 0.3074, 0.2462, 0.3224]}, {"w": "Popular", "b": [0.2533, 0.3074, 0.3264, 0.3224]}, {"w": "Open", "b": [0.3334, 0.3074, 0.3833, 0.3224]}, {"w": "Source", "b": [0.3903, 0.3074, 0.4524, 0.3224]}, {"w": "Implementations", "b": [0.4595, 0.3074, 0.6147, 0.3224]}]}, {"id": "b_6", "type": "paragraph", "text": "Modern open-source libraries and modules for machine learning in popular modern pro- gramming languages and platforms, such as Python, Java, and .NET, contain efficient, industry-standard implementations of popular machine learning algorithms. They usually have permissive licenses. Additionally, open-source libraries and modules exist specifically for training neural networks.", "words": [{"w": "Modern", "b": [0.1312, 0.3437, 0.1951, 0.3587]}, {"w": "open-source", "b": [0.2029, 0.3437, 0.2998, 0.3587]}, {"w": "libraries", "b": [0.3075, 0.3437, 0.3736, 0.3587]}, {"w": "and", "b": [0.3814, 0.3437, 0.4118, 0.3587]}, {"w": "modules", "b": [0.4195, 0.3437, 0.4871, 0.3587]}, {"w": "for", "b": [0.4948, 0.3437, 0.5174, 0.3587]}, {"w": "machine", "b": [0.5251, 0.3437, 0.5926, 0.3587]}, {"w": "learning", "b": [0.6004, 0.3437, 0.6663, 0.3587]}, {"w": "in", "b": [0.6741, 0.3437, 0.6898, 0.3587]}, {"w": "popular", "b": [0.6975, 0.3437, 0.7609, 0.3587]}, {"w": "modern", "b": [0.7686, 0.3437, 0.8309, 0.3587]}, {"w": "pro-", "b": [0.8387, 0.3437, 0.8722, 0.3587]}, {"w": "gramming", "b": [0.1312, 0.3617, 0.2139, 0.3766]}, {"w": "languages", "b": [0.2222, 0.3617, 0.3018, 0.3766]}, {"w": "and", "b": [0.3102, 0.3617, 0.3405, 0.3766]}, {"w": "platforms,", "b": [0.3489, 0.3617, 0.4322, 0.3766]}, {"w": "such", "b": [0.4411, 0.3617, 0.4774, 0.3766]}, {"w": "as", "b": [0.4857, 0.3617, 0.5026, 0.3766]}, {"w": "Python,", "b": [0.5109, 0.3617, 0.5765, 0.3766]}, {"w": "Java,", "b": [0.5855, 0.3617, 0.6276, 0.3766]}, {"w": "and", "b": [0.6365, 0.3617, 0.6669, 0.3766]}, {"w": ".NET,", "b": [0.6752, 0.3617, 0.7262, 0.3766]}, {"w": "contain", "b": [0.7346, 0.3617, 0.7947, 0.3766]}, {"w": "efficient,", "b": [0.8031, 0.3617, 0.8716, 0.3766]}, {"w": "industry-standard", "b": [0.1312, 0.3796, 0.2785, 0.3946]}, {"w": "implementations", "b": [0.2846, 0.3796, 0.4202, 0.3946]}, {"w": "of", "b": [0.4263, 0.3796, 0.4415, 0.3946]}, {"w": "popular", "b": [0.4476, 0.3796, 0.5109, 0.3946]}, {"w": "machine", "b": [0.5171, 0.3796, 0.5845, 0.3946]}, {"w": "learning", "b": [0.5907, 0.3796, 0.6566, 0.3946]}, {"w": "algorithms.", "b": [0.6628, 0.3796, 0.7549, 0.3946]}, {"w": "They", "b": [0.7631, 0.3796, 0.8055, 0.3946]}, {"w": "usually", "b": [0.8116, 0.3796, 0.8698, 0.3946]}, {"w": "have", "b": [0.1312, 0.3975, 0.1669, 0.4125]}, {"w": "permissive", "b": [0.1727, 0.3975, 0.2549, 0.4125]}, {"w": "licenses.", "b": [0.2608, 0.3975, 0.3243, 0.4125]}, {"w": "Additionally,", "b": [0.3324, 0.3975, 0.4338, 0.4125]}, {"w": "open-source", "b": [0.4398, 0.3975, 0.5329, 0.4125]}, {"w": "libraries", "b": [0.5387, 0.3975, 0.6023, 0.4125]}, {"w": "and", "b": [0.6081, 0.3975, 0.6373, 0.4125]}, {"w": "modules", "b": [0.6431, 0.3975, 0.708, 0.4125]}, {"w": "exist", "b": [0.7139, 0.3975, 0.7507, 0.4125]}, {"w": "specifically", "b": [0.7565, 0.3975, 0.8421, 0.4125]}, {"w": "for", "b": [0.8479, 0.3975, 0.8696, 0.4125]}, {"w": "training", "b": [0.1312, 0.4155, 0.1949, 0.4304]}, {"w": "neural", "b": [0.201, 0.4155, 0.2513, 0.4304]}, {"w": "networks.", "b": [0.2575, 0.4155, 0.334, 0.4304]}]}, {"id": "b_7", "type": "paragraph", "text": "It is only considered reasonable to create your own machine learning algorithms if you use an exotic or very new programming language. In addition, you might program from scratch if the model is intended to be executed in a very resource-constrained environment, or you need to run your model with a speed no existing implementation can provide.", "words": [{"w": "It", "b": [0.1312, 0.4424, 0.1453, 0.4574]}, {"w": "is", "b": [0.1514, 0.4424, 0.164, 0.4574]}, {"w": "only", "b": [0.1701, 0.4424, 0.2049, 0.4574]}, {"w": "considered", "b": [0.2111, 0.4424, 0.2965, 0.4574]}, {"w": "reasonable", "b": [0.3026, 0.4424, 0.388, 0.4574]}, {"w": "to", "b": [0.3941, 0.4424, 0.4107, 0.4574]}, {"w": "create", "b": [0.4169, 0.4424, 0.4658, 0.4574]}, {"w": "your", "b": [0.4719, 0.4424, 0.5083, 0.4574]}, {"w": "own", "b": [0.5145, 0.4424, 0.5472, 0.4574]}, {"w": "machine", "b": [0.5534, 0.4424, 0.6204, 0.4574]}, {"w": "learning", "b": [0.6265, 0.4424, 0.692, 0.4574]}, {"w": "algorithms", "b": [0.6982, 0.4424, 0.7846, 0.4574]}, {"w": "if", "b": [0.7907, 0.4424, 0.8016, 0.4574]}, {"w": "you", "b": [0.8078, 0.4424, 0.8369, 0.4574]}, {"w": "use", "b": [0.843, 0.4424, 0.8691, 0.4574]}, {"w": "an", "b": [0.1312, 0.4604, 0.1506, 0.4753]}, {"w": "exotic", "b": [0.1567, 0.4604, 0.2041, 0.4753]}, {"w": "or", "b": [0.2103, 0.4604, 0.2266, 0.4753]}, {"w": "very", "b": [0.2328, 0.4604, 0.267, 0.4753]}, {"w": "new", "b": [0.2731, 0.4604, 0.3047, 0.4753]}, {"w": "programming", "b": [0.3109, 0.4604, 0.418, 0.4753]}, {"w": "language.", "b": [0.4241, 0.4604, 0.4995, 0.4753]}, {"w": "In", "b": [0.5077, 0.4604, 0.5246, 0.4753]}, {"w": "addition,", "b": [0.5307, 0.4604, 0.6021, 0.4753]}, {"w": "you", "b": [0.6082, 0.4604, 0.6367, 0.4753]}, {"w": "might", "b": [0.6429, 0.4604, 0.6892, 0.4753]}, {"w": "program", "b": [0.6954, 0.4604, 0.7627, 0.4753]}, {"w": "from", "b": [0.7689, 0.4604, 0.8061, 0.4753]}, {"w": "scratch", "b": [0.8123, 0.4604, 0.869, 0.4753]}, {"w": "if", "b": [0.1312, 0.4783, 0.1421, 0.4933]}, {"w": "the", "b": [0.1482, 0.4783, 0.1741, 0.4933]}, {"w": "model", "b": [0.1802, 0.4783, 0.2294, 0.4933]}, {"w": "is", "b": [0.2355, 0.4783, 0.248, 0.4933]}, {"w": "intended", "b": [0.2542, 0.4783, 0.324, 0.4933]}, {"w": "to", "b": [0.3302, 0.4783, 0.3467, 0.4933]}, {"w": "be", "b": [0.3528, 0.4783, 0.372, 0.4933]}, {"w": "executed", "b": [0.3781, 0.4783, 0.449, 0.4933]}, {"w": "in", "b": [0.4552, 0.4783, 0.4707, 0.4933]}, {"w": "a", "b": [0.4768, 0.4783, 0.4861, 0.4933]}, {"w": "very", "b": [0.4923, 0.4783, 0.527, 0.4933]}, {"w": "resource-constrained", "b": [0.5331, 0.4783, 0.6991, 0.4933]}, {"w": "environment,", "b": [0.7052, 0.4783, 0.8113, 0.4933]}, {"w": "or", "b": [0.8174, 0.4783, 0.8341, 0.4933]}, {"w": "you", "b": [0.8402, 0.4783, 0.8692, 0.4933]}, {"w": "need", "b": [0.1312, 0.4963, 0.1682, 0.5112]}, {"w": "to", "b": [0.1743, 0.4963, 0.1907, 0.5112]}, {"w": "run", "b": [0.1969, 0.4963, 0.2246, 0.5112]}, {"w": "your", "b": [0.2308, 0.4963, 0.2667, 0.5112]}, {"w": "model", "b": [0.2728, 0.4963, 0.3216, 0.5112]}, {"w": "with", "b": [0.3277, 0.4963, 0.3636, 0.5112]}, {"w": "a", "b": [0.3697, 0.4963, 0.379, 0.5112]}, {"w": "speed", "b": [0.3851, 0.4963, 0.4298, 0.5112]}, {"w": "no", "b": [0.436, 0.4963, 0.4555, 0.5112]}, {"w": "existing", "b": [0.4616, 0.4963, 0.5238, 0.5112]}, {"w": "implementation", "b": [0.5299, 0.4963, 0.6555, 0.5112]}, {"w": "can", "b": [0.6617, 0.4963, 0.6894, 0.5112]}, {"w": "provide.", "b": [0.6955, 0.4963, 0.7602, 0.5112]}]}, {"id": "b_8", "type": "paragraph", "text": "Avoid using multiple programming languages in the same project. Using different programming languages increases the cost of testing, deployment, and maintenance. It also makes it difficult to transfer project ownership between employees.", "words": [{"w": "Avoid", "b": [0.1305, 0.5232, 0.1752, 0.5381]}, {"w": "using", "b": [0.1794, 0.5232, 0.2208, 0.5381]}, {"w": "multiple", "b": [0.225, 0.5232, 0.2898, 0.5381]}, {"w": "programming", "b": [0.2941, 0.5232, 0.3996, 0.5381]}, {"w": "languages", "b": [0.4039, 0.5232, 0.4804, 0.5381]}, {"w": "in", "b": [0.4846, 0.5232, 0.4997, 0.5381]}, {"w": "the", "b": [0.5039, 0.5232, 0.5291, 0.5381]}, {"w": "same", "b": [0.5333, 0.5232, 0.5726, 0.5381]}, {"w": "project.", "b": [0.5768, 0.5232, 0.6372, 0.5381]}, {"w": "Using", "b": [0.6448, 0.5232, 0.6896, 0.5381]}, {"w": "different", "b": [0.6939, 0.5232, 0.7592, 0.5381]}, {"w": "programming", "b": [0.7635, 0.5232, 0.8691, 0.5381]}, {"w": "languages", "b": [0.1312, 0.5411, 0.2077, 0.5561]}, {"w": "increases", "b": [0.2128, 0.5411, 0.2824, 0.5561]}, {"w": "the", "b": [0.2875, 0.5411, 0.3126, 0.5561]}, {"w": "cost", "b": [0.3177, 0.5411, 0.349, 0.5561]}, {"w": "of", "b": [0.3541, 0.5411, 0.3686, 0.5561]}, {"w": "testing,", "b": [0.3737, 0.5411, 0.4321, 0.5561]}, {"w": "deployment,", "b": [0.4374, 0.5411, 0.5334, 0.5561]}, {"w": "and", "b": [0.5387, 0.5411, 0.5678, 0.5561]}, {"w": "maintenance.", "b": [0.5729, 0.5411, 0.6769, 0.5561]}, {"w": "It", "b": [0.6848, 0.5411, 0.6983, 0.5561]}, {"w": "also", "b": [0.7034, 0.5411, 0.7337, 0.5561]}, {"w": "makes", "b": [0.7388, 0.5411, 0.7871, 0.5561]}, {"w": "it", "b": [0.7922, 0.5411, 0.8042, 0.5561]}, {"w": "difficult", "b": [0.8093, 0.5411, 0.8696, 0.5561]}, {"w": "to", "b": [0.1312, 0.5591, 0.1476, 0.574]}, {"w": "transfer", "b": [0.1538, 0.5591, 0.216, 0.574]}, {"w": "project", "b": [0.2222, 0.5591, 0.2787, 0.574]}, {"w": "ownership", "b": [0.2848, 0.5591, 0.3655, 0.574]}, {"w": "between", "b": [0.3716, 0.5591, 0.4368, 0.574]}, {"w": "employees.", "b": [0.4429, 0.5591, 0.5286, 0.574]}]}, {"id": "b_9", "type": "equation", "text": "6.7.3 Optimize a Business-Specific Performance Measure", "words": [{"w": "6.7.3", "b": [0.1312, 0.6072, 0.1749, 0.6222]}, {"w": "Optimize", "b": [0.1961, 0.6072, 0.2807, 0.6222]}, {"w": "a", "b": [0.2878, 0.6072, 0.2981, 0.6222]}, {"w": "Business-Specific", "b": [0.3051, 0.6072, 0.4621, 0.6222]}, {"w": "Performance", "b": [0.4692, 0.6072, 0.5863, 0.6222]}, {"w": "Measure", "b": [0.5934, 0.6072, 0.6722, 0.6222]}]}, {"id": "b_10", "type": "paragraph", "text": "Learning algorithms try to reduce training data error. The data analyst, in turn, wants to minimize test data error. However, your client or employer typically wants you to optimize a business-specific performance metric.", "words": [{"w": "Learning", "b": [0.1312, 0.6435, 0.2032, 0.6585]}, {"w": "algorithms", "b": [0.2093, 0.6435, 0.2956, 0.6585]}, {"w": "try", "b": [0.3017, 0.6435, 0.3262, 0.6585]}, {"w": "to", "b": [0.3323, 0.6435, 0.3489, 0.6585]}, {"w": "reduce", "b": [0.3551, 0.6435, 0.4081, 0.6585]}, {"w": "training", "b": [0.4142, 0.6435, 0.4786, 0.6585]}, {"w": "data", "b": [0.4848, 0.6435, 0.5211, 0.6585]}, {"w": "error.", "b": [0.5272, 0.6435, 0.572, 0.6585]}, {"w": "The", "b": [0.5802, 0.6435, 0.6124, 0.6585]}, {"w": "data", "b": [0.6186, 0.6435, 0.6549, 0.6585]}, {"w": "analyst,", "b": [0.661, 0.6435, 0.7249, 0.6585]}, {"w": "in", "b": [0.7311, 0.6435, 0.7467, 0.6585]}, {"w": "turn,", "b": [0.7528, 0.6435, 0.7934, 0.6585]}, {"w": "wants", "b": [0.7995, 0.6435, 0.8463, 0.6585]}, {"w": "to", "b": [0.8525, 0.6435, 0.8691, 0.6585]}, {"w": "minimize", "b": [0.1312, 0.6614, 0.2026, 0.6764]}, {"w": "test", "b": [0.2087, 0.6614, 0.238, 0.6764]}, {"w": "data", "b": [0.2441, 0.6614, 0.2793, 0.6764]}, {"w": "error.", "b": [0.2855, 0.6614, 0.3288, 0.6764]}, {"w": "However,", "b": [0.337, 0.6614, 0.4089, 0.6764]}, {"w": "your", "b": [0.4151, 0.6614, 0.4503, 0.6764]}, {"w": "client", "b": [0.4564, 0.6614, 0.4991, 0.6764]}, {"w": "or", "b": [0.5053, 0.6614, 0.5214, 0.6764]}, {"w": "employer", "b": [0.5276, 0.6614, 0.5984, 0.6764]}, {"w": "typically", "b": [0.6046, 0.6614, 0.6724, 0.6764]}, {"w": "wants", "b": [0.6786, 0.6614, 0.7239, 0.6764]}, {"w": "you", "b": [0.73, 0.6614, 0.7581, 0.6764]}, {"w": "to", "b": [0.7643, 0.6614, 0.7804, 0.6764]}, {"w": "optimize", "b": [0.7865, 0.6614, 0.8539, 0.6764]}, {"w": "a", "b": [0.86, 0.6614, 0.8691, 0.6764]}, {"w": "business-specific", "b": [0.1312, 0.6797, 0.2814, 0.6946]}, {"w": "performance", "b": [0.2885, 0.6797, 0.4041, 0.6946]}, {"w": "metric.", "b": [0.4112, 0.6794, 0.476, 0.6946]}]}, {"id": "b_11", "type": "paragraph", "text": "When you have minimized the validation error rate, focus on tuning hyperparameters that", "words": [{"w": "When", "b": [0.1303, 0.7063, 0.1785, 0.7213]}, {"w": "you", "b": [0.1846, 0.7063, 0.2136, 0.7213]}, {"w": "have", "b": [0.2198, 0.7063, 0.2565, 0.7213]}, {"w": "minimized", "b": [0.2627, 0.7063, 0.3466, 0.7213]}, {"w": "the", "b": [0.3527, 0.7063, 0.3786, 0.7213]}, {"w": "validation", "b": [0.3848, 0.7063, 0.465, 0.7213]}, {"w": "error", "b": [0.4712, 0.7063, 0.5107, 0.7213]}, {"w": "rate,", "b": [0.5168, 0.7063, 0.5542, 0.7213]}, {"w": "focus", "b": [0.5603, 0.7063, 0.6019, 0.7213]}, {"w": "on", "b": [0.608, 0.7063, 0.6277, 0.7213]}, {"w": "tuning", "b": [0.6339, 0.7063, 0.6867, 0.7213]}, {"w": "hyperparameters", "b": [0.6928, 0.7063, 0.8293, 0.7213]}, {"w": "that", "b": [0.8354, 0.7063, 0.8696, 0.7213]}]}, {"id": "b_12", "type": "paragraph", "text": "optimize a business-specific metric, even if it causes the validation error rate to increase.", "words": [{"w": "optimize", "b": [0.1312, 0.7243, 0.1999, 0.7392]}, {"w": "a", "b": [0.2061, 0.7243, 0.2153, 0.7392]}, {"w": "business-specific", "b": [0.2215, 0.7243, 0.3516, 0.7392]}, {"w": "metric,", "b": [0.3578, 0.7243, 0.4142, 0.7392]}, {"w": "even", "b": [0.4204, 0.7243, 0.4563, 0.7392]}, {"w": "if", "b": [0.4625, 0.7243, 0.4732, 0.7392]}, {"w": "it", "b": [0.4794, 0.7243, 0.4917, 0.7392]}, {"w": "causes", "b": [0.4978, 0.7243, 0.5483, 0.7392]}, {"w": "the", "b": [0.5544, 0.7243, 0.5801, 0.7392]}, {"w": "validation", "b": [0.5862, 0.7243, 0.6657, 0.7392]}, {"w": "error", "b": [0.6719, 0.7243, 0.711, 0.7392]}, {"w": "rate", "b": [0.7171, 0.7243, 0.749, 0.7392]}, {"w": "to", "b": [0.7551, 0.7243, 0.7715, 0.7392]}, {"w": "increase.", "b": [0.7777, 0.7243, 0.8466, 0.7392]}]}, {"id": "b_13", "type": "paragraph", "text": "6.7.4 Upgrade From Scratch", "words": [{"w": "6.7.4", "b": [0.1312, 0.7724, 0.1749, 0.7874]}, {"w": "Upgrade", "b": [0.1961, 0.7724, 0.2754, 0.7874]}, {"w": "From", "b": [0.2824, 0.7724, 0.3311, 0.7874]}, {"w": "Scratch", "b": [0.3381, 0.7724, 0.4073, 0.7874]}]}, {"id": "b_14", "type": "paragraph", "text": "Once deployed to production, some models have to be periodically updated with new data to adapt to the user’s needs. This new training data must be automatically collected by using scripts (as we discussed in Chapter 3 in Section ?? about reproducibility).", "words": [{"w": "Once", "b": [0.1312, 0.8087, 0.1714, 0.8236]}, {"w": "deployed", "b": [0.1774, 0.8087, 0.2462, 0.8236]}, {"w": "to", "b": [0.2521, 0.8087, 0.2682, 0.8236]}, {"w": "production,", "b": [0.2741, 0.8087, 0.3651, 0.8236]}, {"w": "some", "b": [0.3711, 0.8087, 0.4103, 0.8236]}, {"w": "models", "b": [0.4163, 0.8087, 0.4711, 0.8236]}, {"w": "have", "b": [0.477, 0.8087, 0.5127, 0.8236]}, {"w": "to", "b": [0.5186, 0.8087, 0.5347, 0.8236]}, {"w": "be", "b": [0.5406, 0.8087, 0.5592, 0.8236]}, {"w": "periodically", "b": [0.5651, 0.8087, 0.6572, 0.8236]}, {"w": "updated", "b": [0.6631, 0.8087, 0.7279, 0.8236]}, {"w": "with", "b": [0.7338, 0.8087, 0.769, 0.8236]}, {"w": "new", "b": [0.7749, 0.8087, 0.806, 0.8236]}, {"w": "data", "b": [0.812, 0.8087, 0.8471, 0.8236]}, {"w": "to", "b": [0.853, 0.8087, 0.8691, 0.8236]}, {"w": "adapt", "b": [0.1312, 0.8266, 0.1773, 0.8416]}, {"w": "to", "b": [0.1835, 0.8266, 0.1999, 0.8416]}, {"w": "the", "b": [0.206, 0.8266, 0.2316, 0.8416]}, {"w": "user’s", "b": [0.2378, 0.8266, 0.2831, 0.8416]}, {"w": "needs.", "b": [0.2893, 0.8266, 0.3386, 0.8416]}, {"w": "This", "b": [0.3468, 0.8266, 0.3827, 0.8416]}, {"w": "new", "b": [0.3889, 0.8266, 0.4206, 0.8416]}, {"w": "training", "b": [0.4268, 0.8266, 0.4904, 0.8416]}, {"w": "data", "b": [0.4965, 0.8266, 0.5324, 0.8416]}, {"w": "must", "b": [0.5385, 0.8266, 0.578, 0.8416]}, {"w": "be", "b": [0.5842, 0.8266, 0.6032, 0.8416]}, {"w": "automatically", "b": [0.6093, 0.8266, 0.7194, 0.8416]}, {"w": "collected", "b": [0.7256, 0.8266, 0.7952, 0.8416]}, {"w": "by", "b": [0.8014, 0.8266, 0.8209, 0.8416]}, {"w": "using", "b": [0.827, 0.8266, 0.8691, 0.8416]}, {"w": "scripts", "b": [0.1312, 0.8446, 0.1838, 0.8595]}, {"w": "(as", "b": [0.19, 0.8446, 0.2136, 0.8595]}, {"w": "we", "b": [0.2198, 0.8446, 0.2408, 0.8595]}, {"w": "discussed", "b": [0.247, 0.8446, 0.3212, 0.8595]}, {"w": "in", "b": [0.3273, 0.8446, 0.3427, 0.8595]}, {"w": "Chapter", "b": [0.3488, 0.8446, 0.4145, 0.8595]}, {"w": "3", "b": [0.4206, 0.8446, 0.4299, 0.8595]}, {"w": "in", "b": [0.436, 0.8446, 0.4514, 0.8595]}, {"w": "Section", "b": [0.4576, 0.8446, 0.516, 0.8595]}, {"w": "??", "b": [0.5219, 0.8449, 0.542, 0.8598]}, {"w": "about", "b": [0.5481, 0.8446, 0.5948, 0.8595]}, {"w": "reproducibility).", "b": [0.6009, 0.8446, 0.7507, 0.8598]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 35", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "35", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 211, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Each time the data is updated, the hyperparameters must be tuned from scratch. Otherwise, the new data may yield suboptimal performance with old hyperparameters.", "words": [{"w": "Each", "b": [0.1312, 0.0881, 0.1702, 0.1031]}, {"w": "time", "b": [0.1763, 0.0881, 0.2115, 0.1031]}, {"w": "the", "b": [0.2176, 0.0881, 0.2427, 0.1031]}, {"w": "data", "b": [0.2488, 0.0881, 0.284, 0.1031]}, {"w": "is", "b": [0.2901, 0.0881, 0.3023, 0.1031]}, {"w": "updated,", "b": [0.3084, 0.0881, 0.3783, 0.1031]}, {"w": "the", "b": [0.3844, 0.0881, 0.4095, 0.1031]}, {"w": "hyperparameters", "b": [0.4156, 0.0881, 0.548, 0.1031]}, {"w": "must", "b": [0.5542, 0.0881, 0.5929, 0.1031]}, {"w": "be", "b": [0.5991, 0.0881, 0.6177, 0.1031]}, {"w": "tuned", "b": [0.6238, 0.0881, 0.669, 0.1031]}, {"w": "from", "b": [0.6751, 0.0881, 0.7119, 0.1031]}, {"w": "scratch.", "b": [0.718, 0.0881, 0.7789, 0.1031]}, {"w": "Otherwise,", "b": [0.7871, 0.0881, 0.8717, 0.1031]}, {"w": "the", "b": [0.1312, 0.106, 0.1569, 0.121]}, {"w": "new", "b": [0.163, 0.106, 0.1948, 0.121]}, {"w": "data", "b": [0.201, 0.106, 0.2368, 0.121]}, {"w": "may", "b": [0.243, 0.106, 0.2768, 0.121]}, {"w": "yield", "b": [0.283, 0.106, 0.3214, 0.121]}, {"w": "suboptimal", "b": [0.3276, 0.106, 0.4174, 0.121]}, {"w": "performance", "b": [0.4235, 0.106, 0.5231, 0.121]}, {"w": "with", "b": [0.5293, 0.106, 0.5652, 0.121]}, {"w": "old", "b": [0.5713, 0.106, 0.5959, 0.121]}, {"w": "hyperparameters.", "b": [0.6021, 0.106, 0.7423, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "Some models, such as neural networks, may be iteratively upgraded. However, avoid the practice of warm-starting. It consists of iteratively upgrading the existing model by using only new training examples and running additional training iterations.", "words": [{"w": "Some", "b": [0.1312, 0.133, 0.1752, 0.1479]}, {"w": "models,", "b": [0.182, 0.133, 0.2443, 0.1479]}, {"w": "such", "b": [0.2513, 0.133, 0.2875, 0.1479]}, {"w": "as", "b": [0.2944, 0.133, 0.3112, 0.1479]}, {"w": "neural", "b": [0.3181, 0.133, 0.3694, 0.1479]}, {"w": "networks,", "b": [0.3762, 0.133, 0.4543, 0.1479]}, {"w": "may", "b": [0.4613, 0.133, 0.4958, 0.1479]}, {"w": "be", "b": [0.5027, 0.133, 0.522, 0.1479]}, {"w": "iteratively", "b": [0.5288, 0.133, 0.6121, 0.1479]}, {"w": "upgraded.", "b": [0.6189, 0.133, 0.7006, 0.1479]}, {"w": "However,", "b": [0.7108, 0.133, 0.7857, 0.1479]}, {"w": "avoid", "b": [0.7927, 0.133, 0.8361, 0.1479]}, {"w": "the", "b": [0.8429, 0.133, 0.8691, 0.1479]}, {"w": "practice", "b": [0.1312, 0.1509, 0.1942, 0.1659]}, {"w": "of", "b": [0.2004, 0.1509, 0.2151, 0.1659]}, {"w": "warm-starting.", "b": [0.2227, 0.1509, 0.3587, 0.1662]}, {"w": "It", "b": [0.3669, 0.1509, 0.3806, 0.1659]}, {"w": "consists", "b": [0.3867, 0.1509, 0.448, 0.1659]}, {"w": "of", "b": [0.4541, 0.1509, 0.4688, 0.1659]}, {"w": "iteratively", "b": [0.475, 0.1509, 0.5557, 0.1659]}, {"w": "upgrading", "b": [0.5619, 0.1509, 0.6421, 0.1659]}, {"w": "the", "b": [0.6483, 0.1509, 0.6737, 0.1659]}, {"w": "existing", "b": [0.6798, 0.1509, 0.7414, 0.1659]}, {"w": "model", "b": [0.7475, 0.1509, 0.7957, 0.1659]}, {"w": "by", "b": [0.8019, 0.1509, 0.8212, 0.1659]}, {"w": "using", "b": [0.8273, 0.1509, 0.869, 0.1659]}, {"w": "only", "b": [0.1312, 0.1689, 0.1656, 0.1838]}, {"w": "new", "b": [0.1717, 0.1689, 0.2035, 0.1838]}, {"w": "training", "b": [0.2097, 0.1689, 0.2733, 0.1838]}, {"w": "examples", "b": [0.2795, 0.1689, 0.3529, 0.1838]}, {"w": "and", "b": [0.359, 0.1689, 0.3888, 0.1838]}, {"w": "running", "b": [0.3949, 0.1689, 0.4575, 0.1838]}, {"w": "additional", "b": [0.4637, 0.1689, 0.5447, 0.1838]}, {"w": "training", "b": [0.5508, 0.1689, 0.6145, 0.1838]}, {"w": "iterations.", "b": [0.6206, 0.1689, 0.7018, 0.1838]}]}, {"id": "b_2", "type": "paragraph", "text": "Furthermore, frequent model upgrades without retraining from scratch can lead to catas- trophic forgetting. It’s a situation in which the model that was once capable of something, “forgets” that capability because of learning something new.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.1958, 0.2391, 0.2107]}, {"w": "frequent", "b": [0.2453, 0.1958, 0.3126, 0.2107]}, {"w": "model", "b": [0.3188, 0.1958, 0.3683, 0.2107]}, {"w": "upgrades", "b": [0.3745, 0.1958, 0.4476, 0.2107]}, {"w": "without", "b": [0.4538, 0.1958, 0.5174, 0.2107]}, {"w": "retraining", "b": [0.5236, 0.1958, 0.604, 0.2107]}, {"w": "from", "b": [0.6101, 0.1958, 0.6482, 0.2107]}, {"w": "scratch", "b": [0.6544, 0.1958, 0.7125, 0.2107]}, {"w": "can", "b": [0.7186, 0.1958, 0.7468, 0.2107]}, {"w": "lead", "b": [0.753, 0.1958, 0.7863, 0.2107]}, {"w": "to", "b": [0.7925, 0.1958, 0.8092, 0.2107]}, {"w": "catas-", "b": [0.815, 0.1961, 0.8688, 0.211]}, {"w": "trophic", "b": [0.1312, 0.214, 0.1977, 0.229]}, {"w": "forgetting.", "b": [0.2043, 0.2137, 0.3005, 0.229]}, {"w": "It’s", "b": [0.3086, 0.2137, 0.3343, 0.2287]}, {"w": "a", "b": [0.34, 0.2137, 0.349, 0.2287]}, {"w": "situation", "b": [0.3548, 0.2137, 0.4242, 0.2287]}, {"w": "in", "b": [0.4299, 0.2137, 0.445, 0.2287]}, {"w": "which", "b": [0.4507, 0.2137, 0.4965, 0.2287]}, {"w": "the", "b": [0.5022, 0.2137, 0.5273, 0.2287]}, {"w": "model", "b": [0.533, 0.2137, 0.5808, 0.2287]}, {"w": "that", "b": [0.5865, 0.2137, 0.6197, 0.2287]}, {"w": "was", "b": [0.6254, 0.2137, 0.6541, 0.2287]}, {"w": "once", "b": [0.6598, 0.2137, 0.695, 0.2287]}, {"w": "capable", "b": [0.7007, 0.2137, 0.76, 0.2287]}, {"w": "of", "b": [0.7657, 0.2137, 0.7803, 0.2287]}, {"w": "something,", "b": [0.7861, 0.2137, 0.8716, 0.2287]}, {"w": "“forgets”", "b": [0.1286, 0.2317, 0.2, 0.2466]}, {"w": "that", "b": [0.2062, 0.2317, 0.24, 0.2466]}, {"w": "capability", "b": [0.2462, 0.2317, 0.3251, 0.2466]}, {"w": "because", "b": [0.3313, 0.2317, 0.3934, 0.2466]}, {"w": "of", "b": [0.3996, 0.2317, 0.4145, 0.2466]}, {"w": "learning", "b": [0.4206, 0.2317, 0.4853, 0.2466]}, {"w": "something", "b": [0.4914, 0.2317, 0.5736, 0.2466]}, {"w": "new.", "b": [0.5797, 0.2317, 0.6166, 0.2466]}]}, {"id": "b_3", "type": "paragraph", "text": "Note that upgrading the model is not the same as transfer learning. Analysts use transfer learning when the data used to build the pre-trained model, or adequate computing resources, are not available.", "words": [{"w": "Note", "b": [0.1312, 0.2586, 0.1689, 0.2735]}, {"w": "that", "b": [0.1751, 0.2586, 0.2082, 0.2735]}, {"w": "upgrading", "b": [0.2143, 0.2586, 0.2938, 0.2735]}, {"w": "the", "b": [0.2999, 0.2586, 0.3251, 0.2735]}, {"w": "model", "b": [0.3312, 0.2586, 0.379, 0.2735]}, {"w": "is", "b": [0.3851, 0.2586, 0.3972, 0.2735]}, {"w": "not", "b": [0.4034, 0.2586, 0.4295, 0.2735]}, {"w": "the", "b": [0.4357, 0.2586, 0.4608, 0.2735]}, {"w": "same", "b": [0.4669, 0.2586, 0.5062, 0.2735]}, {"w": "as", "b": [0.5124, 0.2586, 0.5285, 0.2735]}, {"w": "transfer", "b": [0.5345, 0.2589, 0.6069, 0.2739]}, {"w": "learning.", "b": [0.614, 0.2586, 0.694, 0.2739]}, {"w": "Analysts", "b": [0.7022, 0.2586, 0.7707, 0.2735]}, {"w": "use", "b": [0.7769, 0.2586, 0.8021, 0.2735]}, {"w": "transfer", "b": [0.8082, 0.2586, 0.8692, 0.2735]}, {"w": "learning", "b": [0.1312, 0.2765, 0.1946, 0.2915]}, {"w": "when", "b": [0.2001, 0.2765, 0.2413, 0.2915]}, {"w": "the", "b": [0.2468, 0.2765, 0.2719, 0.2915]}, {"w": "data", "b": [0.2774, 0.2765, 0.3126, 0.2915]}, {"w": "used", "b": [0.3181, 0.2765, 0.3533, 0.2915]}, {"w": "to", "b": [0.3588, 0.2765, 0.3749, 0.2915]}, {"w": "build", "b": [0.3804, 0.2765, 0.4206, 0.2915]}, {"w": "the", "b": [0.4261, 0.2765, 0.4512, 0.2915]}, {"w": "pre-trained", "b": [0.4567, 0.2765, 0.5443, 0.2915]}, {"w": "model,", "b": [0.5498, 0.2765, 0.6025, 0.2915]}, {"w": "or", "b": [0.6081, 0.2765, 0.6243, 0.2915]}, {"w": "adequate", "b": [0.6298, 0.2765, 0.7006, 0.2915]}, {"w": "computing", "b": [0.7061, 0.2765, 0.7895, 0.2915]}, {"w": "resources,", "b": [0.795, 0.2765, 0.8717, 0.2915]}, {"w": "are", "b": [0.1312, 0.2945, 0.1559, 0.3094]}, {"w": "not", "b": [0.162, 0.2945, 0.1887, 0.3094]}, {"w": "available.", "b": [0.1949, 0.2945, 0.2697, 0.3094]}]}, {"id": "b_4", "type": "paragraph", "text": "6.7.5 Avoid Correction Cascades", "words": [{"w": "6.7.5", "b": [0.1312, 0.3426, 0.1749, 0.3576]}, {"w": "Avoid", "b": [0.1961, 0.3426, 0.2487, 0.3576]}, {"w": "Correction", "b": [0.2557, 0.3426, 0.3549, 0.3576]}, {"w": "Cascades", "b": [0.3619, 0.3426, 0.4456, 0.3576]}]}, {"id": "b_5", "type": "paragraph", "text": "You might have model mA that solves problem A, but you need a solution mB for a slightly different problem B. It can be tempting to use the output of mA as input for mB, and only train mB on a small sample of examples that “correct” the output of mA for solving problem B. Such technique is called correction cascading, and it is not recommended.", "words": [{"w": "You", "b": [0.1305, 0.3789, 0.1619, 0.3939]}, {"w": "might", "b": [0.1681, 0.3789, 0.2141, 0.3939]}, {"w": "have", "b": [0.2203, 0.3789, 0.2562, 0.3939]}, {"w": "model", "b": [0.2624, 0.3789, 0.3105, 0.3939]}, {"w": "mA", "b": [0.3166, 0.3792, 0.3439, 0.3954]}, {"w": "that", "b": [0.351, 0.3789, 0.3844, 0.3939]}, {"w": "solves", "b": [0.3905, 0.3789, 0.4363, 0.3939]}, {"w": "problem", "b": [0.4425, 0.3789, 0.5074, 0.3939]}, {"w": "A,", "b": [0.5134, 0.3789, 0.5323, 0.3941]}, {"w": "but", "b": [0.5385, 0.3789, 0.5658, 0.3939]}, {"w": "you", "b": [0.572, 0.3789, 0.6004, 0.3939]}, {"w": "need", "b": [0.6065, 0.3789, 0.643, 0.3939]}, {"w": "a", "b": [0.6491, 0.3789, 0.6582, 0.3939]}, {"w": "solution", "b": [0.6644, 0.3789, 0.7273, 0.3939]}, {"w": "mB", "b": [0.7334, 0.3792, 0.7607, 0.3954]}, {"w": "for", "b": [0.7684, 0.3789, 0.7902, 0.3939]}, {"w": "a", "b": [0.7964, 0.3789, 0.8055, 0.3939]}, {"w": "slightly", "b": [0.8116, 0.3789, 0.8695, 0.3939]}, {"w": "different", "b": [0.1312, 0.3969, 0.1993, 0.4118]}, {"w": "problem", "b": [0.2067, 0.3969, 0.2737, 0.4118]}, {"w": "B.", "b": [0.281, 0.3969, 0.3012, 0.4121]}, {"w": "It", "b": [0.3132, 0.3969, 0.3273, 0.4118]}, {"w": "can", "b": [0.3347, 0.3969, 0.3629, 0.4118]}, {"w": "be", "b": [0.3704, 0.3969, 0.3897, 0.4118]}, {"w": "tempting", "b": [0.3971, 0.3969, 0.4714, 0.4118]}, {"w": "to", "b": [0.4788, 0.3969, 0.4955, 0.4118]}, {"w": "use", "b": [0.5029, 0.3969, 0.5292, 0.4118]}, {"w": "the", "b": [0.5366, 0.3969, 0.5628, 0.4118]}, {"w": "output", "b": [0.5702, 0.3969, 0.6256, 0.4118]}, {"w": "of", "b": [0.633, 0.3969, 0.6482, 0.4118]}, {"w": "mA", "b": [0.6555, 0.3971, 0.6828, 0.4134]}, {"w": "as", "b": [0.6911, 0.3969, 0.7079, 0.4118]}, {"w": "input", "b": [0.7153, 0.3969, 0.7593, 0.4118]}, {"w": "for", "b": [0.7667, 0.3969, 0.7892, 0.4118]}, {"w": "mB,", "b": [0.7966, 0.3969, 0.8307, 0.4134]}, {"w": "and", "b": [0.8385, 0.3969, 0.8688, 0.4118]}, {"w": "only", "b": [0.1312, 0.4148, 0.1663, 0.4298]}, {"w": "train", "b": [0.1726, 0.4148, 0.2124, 0.4298]}, {"w": "mB", "b": [0.2187, 0.4151, 0.2461, 0.4313]}, {"w": "on", "b": [0.254, 0.4148, 0.2739, 0.4298]}, {"w": "a", "b": [0.2802, 0.4148, 0.2896, 0.4298]}, {"w": "small", "b": [0.296, 0.4148, 0.339, 0.4298]}, {"w": "sample", "b": [0.3453, 0.4148, 0.4019, 0.4298]}, {"w": "of", "b": [0.4082, 0.4148, 0.4234, 0.4298]}, {"w": "examples", "b": [0.4298, 0.4148, 0.5047, 0.4298]}, {"w": "that", "b": [0.511, 0.4148, 0.5455, 0.4298]}, {"w": "“correct”", "b": [0.5519, 0.4148, 0.6263, 0.4298]}, {"w": "the", "b": [0.6326, 0.4148, 0.6588, 0.4298]}, {"w": "output", "b": [0.6651, 0.4148, 0.7206, 0.4298]}, {"w": "of", "b": [0.7269, 0.4148, 0.7421, 0.4298]}, {"w": "mA", "b": [0.7482, 0.4151, 0.7755, 0.4313]}, {"w": "for", "b": [0.7828, 0.4148, 0.8053, 0.4298]}, {"w": "solving", "b": [0.8117, 0.4148, 0.8688, 0.4298]}, {"w": "problem", "b": [0.1312, 0.4328, 0.1969, 0.4477]}, {"w": "B.", "b": [0.203, 0.4328, 0.2231, 0.448]}, {"w": "Such", "b": [0.2313, 0.4328, 0.2697, 0.4477]}, {"w": "technique", "b": [0.2759, 0.4328, 0.3528, 0.4477]}, {"w": "is", "b": [0.359, 0.4328, 0.3714, 0.4477]}, {"w": "called", "b": [0.3775, 0.4328, 0.4237, 0.4477]}, {"w": "correction", "b": [0.4297, 0.4331, 0.5229, 0.448]}, {"w": "cascading,", "b": [0.53, 0.4328, 0.6232, 0.448]}, {"w": "and", "b": [0.6294, 0.4328, 0.6591, 0.4477]}, {"w": "it", "b": [0.6653, 0.4328, 0.6776, 0.4477]}, {"w": "is", "b": [0.6837, 0.4328, 0.6962, 0.4477]}, {"w": "not", "b": [0.7023, 0.4328, 0.729, 0.4477]}, {"w": "recommended.", "b": [0.7351, 0.4328, 0.851, 0.4477]}]}, {"id": "b_6", "type": "paragraph", "text": "Model cascading makes it impossible to update model mA, without also updating model mB (and the rest of the cascade). The effect a change in mA might have on mB is impossible to", "words": [{"w": "Model", "b": [0.1312, 0.4597, 0.1805, 0.4746]}, {"w": "cascading", "b": [0.1866, 0.4597, 0.2621, 0.4746]}, {"w": "makes", "b": [0.2682, 0.4597, 0.3166, 0.4746]}, {"w": "it", "b": [0.3227, 0.4597, 0.3347, 0.4746]}, {"w": "impossible", "b": [0.3409, 0.4597, 0.423, 0.4746]}, {"w": "to", "b": [0.4291, 0.4597, 0.4452, 0.4746]}, {"w": "update", "b": [0.4513, 0.4597, 0.5061, 0.4746]}, {"w": "model", "b": [0.5122, 0.4597, 0.56, 0.4746]}, {"w": "mA,", "b": [0.5659, 0.4597, 0.5992, 0.4762]}, {"w": "without", "b": [0.6053, 0.4597, 0.6666, 0.4746]}, {"w": "also", "b": [0.6727, 0.4597, 0.703, 0.4746]}, {"w": "updating", "b": [0.7091, 0.4597, 0.7799, 0.4746]}, {"w": "model", "b": [0.7861, 0.4597, 0.8338, 0.4746]}, {"w": "mB", "b": [0.8399, 0.46, 0.8672, 0.4762]}, {"w": "(and", "b": [0.1291, 0.4776, 0.1657, 0.4926]}, {"w": "the", "b": [0.1718, 0.4776, 0.1973, 0.4926]}, {"w": "rest", "b": [0.2034, 0.4776, 0.2331, 0.4926]}, {"w": "of", "b": [0.2392, 0.4776, 0.254, 0.4926]}, {"w": "the", "b": [0.2601, 0.4776, 0.2856, 0.4926]}, {"w": "cascade).", "b": [0.2917, 0.4776, 0.3641, 0.4926]}, {"w": "The", "b": [0.3723, 0.4776, 0.4038, 0.4926]}, {"w": "effect", "b": [0.4099, 0.4776, 0.4521, 0.4926]}, {"w": "a", "b": [0.4583, 0.4776, 0.4674, 0.4926]}, {"w": "change", "b": [0.4736, 0.4776, 0.528, 0.4926]}, {"w": "in", "b": [0.5341, 0.4776, 0.5494, 0.4926]}, {"w": "mA", "b": [0.5553, 0.4779, 0.5826, 0.4941]}, {"w": "might", "b": [0.5897, 0.4776, 0.636, 0.4926]}, {"w": "have", "b": [0.6421, 0.4776, 0.6782, 0.4926]}, {"w": "on", "b": [0.6844, 0.4776, 0.7037, 0.4926]}, {"w": "mB", "b": [0.7098, 0.4779, 0.7371, 0.4941]}, {"w": "is", "b": [0.7448, 0.4776, 0.7572, 0.4926]}, {"w": "impossible", "b": [0.7633, 0.4776, 0.8464, 0.4926]}, {"w": "to", "b": [0.8526, 0.4776, 0.8688, 0.4926]}]}, {"id": "b_7", "type": "paragraph", "text": "predict, but most likely it will be negative. Furthermore, the developer of model mB might not know about the change in model mA, and the developer of model mA might not know that model mB depends on it. The negative effect on mB of the change in model mA may go unnoticed for a long time.", "words": [{"w": "predict,", "b": [0.1312, 0.4956, 0.1928, 0.5105]}, {"w": "but", "b": [0.199, 0.4956, 0.2267, 0.5105]}, {"w": "most", "b": [0.2329, 0.4956, 0.2719, 0.5105]}, {"w": "likely", "b": [0.2781, 0.4956, 0.3207, 0.5105]}, {"w": "it", "b": [0.3268, 0.4956, 0.3391, 0.5105]}, {"w": "will", "b": [0.3453, 0.4956, 0.374, 0.5105]}, {"w": "be", "b": [0.3802, 0.4956, 0.3991, 0.5105]}, {"w": "negative.", "b": [0.4053, 0.4956, 0.4771, 0.5105]}, {"w": "Furthermore,", "b": [0.4853, 0.4956, 0.5914, 0.5105]}, {"w": "the", "b": [0.5975, 0.4956, 0.6232, 0.5105]}, {"w": "developer", "b": [0.6293, 0.4956, 0.7058, 0.5105]}, {"w": "of", "b": [0.712, 0.4956, 0.7268, 0.5105]}, {"w": "model", "b": [0.733, 0.4956, 0.7817, 0.5105]}, {"w": "mB", "b": [0.7876, 0.4958, 0.8149, 0.5121]}, {"w": "might", "b": [0.8226, 0.4956, 0.8693, 0.5105]}, {"w": "not", "b": [0.1312, 0.5135, 0.1583, 0.5285]}, {"w": "know", "b": [0.1644, 0.5135, 0.207, 0.5285]}, {"w": "about", "b": [0.2132, 0.5135, 0.2605, 0.5285]}, {"w": "the", "b": [0.2666, 0.5135, 0.2926, 0.5285]}, {"w": "change", "b": [0.2987, 0.5135, 0.3544, 0.5285]}, {"w": "in", "b": [0.3605, 0.5135, 0.3761, 0.5285]}, {"w": "model", "b": [0.3822, 0.5135, 0.4316, 0.5285]}, {"w": "mA,", "b": [0.4376, 0.5135, 0.471, 0.53]}, {"w": "and", "b": [0.4772, 0.5135, 0.5073, 0.5285]}, {"w": "the", "b": [0.5135, 0.5135, 0.5395, 0.5285]}, {"w": "developer", "b": [0.5456, 0.5135, 0.6231, 0.5285]}, {"w": "of", "b": [0.6293, 0.5135, 0.6444, 0.5285]}, {"w": "model", "b": [0.6505, 0.5135, 0.6999, 0.5285]}, {"w": "mA", "b": [0.7059, 0.5138, 0.7332, 0.53]}, {"w": "might", "b": [0.7402, 0.5135, 0.7875, 0.5285]}, {"w": "not", "b": [0.7937, 0.5135, 0.8207, 0.5285]}, {"w": "know", "b": [0.8268, 0.5135, 0.8695, 0.5285]}, {"w": "that", "b": [0.1312, 0.5315, 0.1655, 0.5464]}, {"w": "model", "b": [0.1717, 0.5315, 0.2211, 0.5464]}, {"w": "mB", "b": [0.2272, 0.5317, 0.2545, 0.548]}, {"w": "depends", "b": [0.2622, 0.5315, 0.3284, 0.5464]}, {"w": "on", "b": [0.3345, 0.5315, 0.3543, 0.5464]}, {"w": "it.", "b": [0.3604, 0.5315, 0.3781, 0.5464]}, {"w": "The", "b": [0.3863, 0.5315, 0.4185, 0.5464]}, {"w": "negative", "b": [0.4247, 0.5315, 0.4922, 0.5464]}, {"w": "effect", "b": [0.4984, 0.5315, 0.5416, 0.5464]}, {"w": "on", "b": [0.5477, 0.5315, 0.5674, 0.5464]}, {"w": "mB", "b": [0.5734, 0.5317, 0.6008, 0.548]}, {"w": "of", "b": [0.6085, 0.5315, 0.6235, 0.5464]}, {"w": "the", "b": [0.6297, 0.5315, 0.6557, 0.5464]}, {"w": "change", "b": [0.6618, 0.5315, 0.7175, 0.5464]}, {"w": "in", "b": [0.7236, 0.5315, 0.7392, 0.5464]}, {"w": "model", "b": [0.7453, 0.5315, 0.7947, 0.5464]}, {"w": "mA", "b": [0.8008, 0.5317, 0.8281, 0.548]}, {"w": "may", "b": [0.8351, 0.5315, 0.8695, 0.5464]}, {"w": "go", "b": [0.1312, 0.5494, 0.1497, 0.5644]}, {"w": "unnoticed", "b": [0.1558, 0.5494, 0.2348, 0.5644]}, {"w": "for", "b": [0.241, 0.5494, 0.2631, 0.5644]}, {"w": "a", "b": [0.2692, 0.5494, 0.2784, 0.5644]}, {"w": "long", "b": [0.2846, 0.5494, 0.3184, 0.5644]}, {"w": "time.", "b": [0.3246, 0.5494, 0.3656, 0.5644]}]}, {"id": "b_8", "type": "paragraph", "text": "Instead of building a correction cascade, it is recommended to update model mA to include the use cases for solving problem B. It would be wise to add features allowing the model to distinguish between the examples of problem B. One might also use transfer learning, or build an entirely independent model for solving problem B.", "words": [{"w": "Instead", "b": [0.1312, 0.5763, 0.1902, 0.5913]}, {"w": "of", "b": [0.1963, 0.5763, 0.2112, 0.5913]}, {"w": "building", "b": [0.2173, 0.5763, 0.2828, 0.5913]}, {"w": "a", "b": [0.2889, 0.5763, 0.2981, 0.5913]}, {"w": "correction", "b": [0.3043, 0.5763, 0.3842, 0.5913]}, {"w": "cascade,", "b": [0.3904, 0.5763, 0.456, 0.5913]}, {"w": "it", "b": [0.4621, 0.5763, 0.4744, 0.5913]}, {"w": "is", "b": [0.4805, 0.5763, 0.4929, 0.5913]}, {"w": "recommended", "b": [0.4991, 0.5763, 0.6096, 0.5913]}, {"w": "to", "b": [0.6158, 0.5763, 0.6321, 0.5913]}, {"w": "update", "b": [0.6383, 0.5763, 0.6941, 0.5913]}, {"w": "model", "b": [0.7002, 0.5763, 0.7488, 0.5913]}, {"w": "mA", "b": [0.7546, 0.5766, 0.7819, 0.5928]}, {"w": "to", "b": [0.789, 0.5763, 0.8054, 0.5913]}, {"w": "include", "b": [0.8115, 0.5763, 0.8688, 0.5913]}, {"w": "the", "b": [0.1312, 0.5943, 0.1567, 0.6092]}, {"w": "use", "b": [0.1628, 0.5943, 0.1884, 0.6092]}, {"w": "cases", "b": [0.1945, 0.5943, 0.2344, 0.6092]}, {"w": "for", "b": [0.2406, 0.5943, 0.2625, 0.6092]}, {"w": "solving", "b": [0.2687, 0.5943, 0.3242, 0.6092]}, {"w": "problem", "b": [0.3304, 0.5943, 0.3955, 0.6092]}, {"w": "B.", "b": [0.4015, 0.5943, 0.4215, 0.6095]}, {"w": "It", "b": [0.4297, 0.5943, 0.4435, 0.6092]}, {"w": "would", "b": [0.4496, 0.5943, 0.4969, 0.6092]}, {"w": "be", "b": [0.5031, 0.5943, 0.5219, 0.6092]}, {"w": "wise", "b": [0.5281, 0.5943, 0.5617, 0.6092]}, {"w": "to", "b": [0.5679, 0.5943, 0.5842, 0.6092]}, {"w": "add", "b": [0.5903, 0.5943, 0.6198, 0.6092]}, {"w": "features", "b": [0.626, 0.5943, 0.6887, 0.6092]}, {"w": "allowing", "b": [0.6949, 0.5943, 0.7605, 0.6092]}, {"w": "the", "b": [0.7666, 0.5943, 0.792, 0.6092]}, {"w": "model", "b": [0.7982, 0.5943, 0.8465, 0.6092]}, {"w": "to", "b": [0.8527, 0.5943, 0.8689, 0.6092]}, {"w": "distinguish", "b": [0.1312, 0.6122, 0.2204, 0.6272]}, {"w": "between", "b": [0.227, 0.6122, 0.2934, 0.6272]}, {"w": "the", "b": [0.3, 0.6122, 0.3262, 0.6272]}, {"w": "examples", "b": [0.3328, 0.6122, 0.4077, 0.6272]}, {"w": "of", "b": [0.4143, 0.6122, 0.4295, 0.6272]}, {"w": "problem", "b": [0.4361, 0.6122, 0.5031, 0.6272]}, {"w": "B.", "b": [0.5095, 0.6122, 0.5296, 0.6275]}, {"w": "One", "b": [0.5392, 0.6122, 0.5727, 0.6272]}, {"w": "might", "b": [0.5793, 0.6122, 0.6269, 0.6272]}, {"w": "also", "b": [0.6335, 0.6122, 0.665, 0.6272]}, {"w": "use", "b": [0.6716, 0.6122, 0.6979, 0.6272]}, {"w": "transfer", "b": [0.7045, 0.6122, 0.768, 0.6272]}, {"w": "learning,", "b": [0.7746, 0.6122, 0.8458, 0.6272]}, {"w": "or", "b": [0.8525, 0.6122, 0.8693, 0.6272]}, {"w": "build", "b": [0.1312, 0.6302, 0.1723, 0.6451]}, {"w": "an", "b": [0.1784, 0.6302, 0.1979, 0.6451]}, {"w": "entirely", "b": [0.204, 0.6302, 0.2646, 0.6451]}, {"w": "independent", "b": [0.2708, 0.6302, 0.3692, 0.6451]}, {"w": "model", "b": [0.3754, 0.6302, 0.4241, 0.6451]}, {"w": "for", "b": [0.4302, 0.6302, 0.4523, 0.6451]}, {"w": "solving", "b": [0.4585, 0.6302, 0.5145, 0.6451]}, {"w": "problem", "b": [0.5206, 0.6302, 0.5863, 0.6451]}, {"w": "B.", "b": [0.5922, 0.6302, 0.6123, 0.6454]}]}, {"id": "b_9", "type": "paragraph", "text": "6.7.6 Use Model Cascading With Caution", "words": [{"w": "6.7.6", "b": [0.1312, 0.6783, 0.1749, 0.6933]}, {"w": "Use", "b": [0.1961, 0.6783, 0.2305, 0.6933]}, {"w": "Model", "b": [0.2376, 0.6783, 0.2963, 0.6933]}, {"w": "Cascading", "b": [0.3034, 0.6783, 0.3973, 0.6933]}, {"w": "With", "b": [0.4043, 0.6783, 0.4522, 0.6933]}, {"w": "Caution", "b": [0.4593, 0.6783, 0.5333, 0.6933]}]}, {"id": "b_10", "type": "paragraph", "text": "It’s important to note that model cascading is not always a bad practice. Using the output of one model, as one of many inputs for another model, is common. It might significantly reduce time to market. However, cascading must be used with caution, because the update of one model in a cascade must involve an update of all models in the cascade, which can end up being costly in the long-term.", "words": [{"w": "It’s", "b": [0.1312, 0.7146, 0.157, 0.7296]}, {"w": "important", "b": [0.1625, 0.7146, 0.2419, 0.7296]}, {"w": "to", "b": [0.2475, 0.7146, 0.2635, 0.7296]}, {"w": "note", "b": [0.2691, 0.7146, 0.3032, 0.7296]}, {"w": "that", "b": [0.3088, 0.7146, 0.3419, 0.7296]}, {"w": "model", "b": [0.3474, 0.7149, 0.4037, 0.7299]}, {"w": "cascading", "b": [0.4101, 0.7149, 0.498, 0.7299]}, {"w": "is", "b": [0.5037, 0.7146, 0.5159, 0.7296]}, {"w": "not", "b": [0.5214, 0.7146, 0.5476, 0.7296]}, {"w": "always", "b": [0.5531, 0.7146, 0.6049, 0.7296]}, {"w": "a", "b": [0.6105, 0.7146, 0.6195, 0.7296]}, {"w": "bad", "b": [0.6251, 0.7146, 0.6542, 0.7296]}, {"w": "practice.", "b": [0.6597, 0.7146, 0.7271, 0.7296]}, {"w": "Using", "b": [0.7351, 0.7146, 0.78, 0.7296]}, {"w": "the", "b": [0.7855, 0.7146, 0.8106, 0.7296]}, {"w": "output", "b": [0.8162, 0.7146, 0.8694, 0.7296]}, {"w": "of", "b": [0.1312, 0.7325, 0.1464, 0.7475]}, {"w": "one", "b": [0.1527, 0.7325, 0.1809, 0.7475]}, {"w": "model,", "b": [0.1872, 0.7325, 0.2421, 0.7475]}, {"w": "as", "b": [0.2484, 0.7325, 0.2652, 0.7475]}, {"w": "one", "b": [0.2715, 0.7325, 0.2997, 0.7475]}, {"w": "of", "b": [0.306, 0.7325, 0.3211, 0.7475]}, {"w": "many", "b": [0.3274, 0.7325, 0.3724, 0.7475]}, {"w": "inputs", "b": [0.3786, 0.7325, 0.43, 0.7475]}, {"w": "for", "b": [0.4363, 0.7325, 0.4588, 0.7475]}, {"w": "another", "b": [0.4651, 0.7325, 0.5279, 0.7475]}, {"w": "model,", "b": [0.5342, 0.7325, 0.589, 0.7475]}, {"w": "is", "b": [0.5953, 0.7325, 0.608, 0.7475]}, {"w": "common.", "b": [0.6143, 0.7325, 0.6885, 0.7475]}, {"w": "It", "b": [0.697, 0.7325, 0.7112, 0.7475]}, {"w": "might", "b": [0.7174, 0.7325, 0.765, 0.7475]}, {"w": "significantly", "b": [0.7713, 0.7325, 0.8697, 0.7475]}, {"w": "reduce", "b": [0.1312, 0.7505, 0.1837, 0.7654]}, {"w": "time", "b": [0.1898, 0.7505, 0.2257, 0.7654]}, {"w": "to", "b": [0.2319, 0.7505, 0.2483, 0.7654]}, {"w": "market.", "b": [0.2544, 0.7505, 0.316, 0.7654]}, {"w": "However,", "b": [0.3242, 0.7505, 0.3977, 0.7654]}, {"w": "cascading", "b": [0.4038, 0.7505, 0.4809, 0.7654]}, {"w": "must", "b": [0.4871, 0.7505, 0.5267, 0.7654]}, {"w": "be", "b": [0.5328, 0.7505, 0.5518, 0.7654]}, {"w": "used", "b": [0.5579, 0.7505, 0.594, 0.7654]}, {"w": "with", "b": [0.6001, 0.7505, 0.636, 0.7654]}, {"w": "caution,", "b": [0.6422, 0.7505, 0.7069, 0.7654]}, {"w": "because", "b": [0.713, 0.7505, 0.7752, 0.7654]}, {"w": "the", "b": [0.7814, 0.7505, 0.807, 0.7654]}, {"w": "update", "b": [0.8132, 0.7505, 0.8691, 0.7654]}, {"w": "of", "b": [0.1312, 0.7684, 0.1464, 0.7834]}, {"w": "one", "b": [0.1527, 0.7684, 0.1809, 0.7834]}, {"w": "model", "b": [0.1872, 0.7684, 0.2369, 0.7834]}, {"w": "in", "b": [0.2431, 0.7684, 0.2588, 0.7834]}, {"w": "a", "b": [0.2651, 0.7684, 0.2745, 0.7834]}, {"w": "cascade", "b": [0.2808, 0.7684, 0.3426, 0.7834]}, {"w": "must", "b": [0.3489, 0.7684, 0.3893, 0.7834]}, {"w": "involve", "b": [0.3955, 0.7684, 0.4526, 0.7834]}, {"w": "an", "b": [0.4589, 0.7684, 0.4787, 0.7834]}, {"w": "update", "b": [0.485, 0.7684, 0.542, 0.7834]}, {"w": "of", "b": [0.5483, 0.7684, 0.5634, 0.7834]}, {"w": "all", "b": [0.5697, 0.7684, 0.5896, 0.7834]}, {"w": "models", "b": [0.5959, 0.7684, 0.653, 0.7834]}, {"w": "in", "b": [0.6592, 0.7684, 0.6749, 0.7834]}, {"w": "the", "b": [0.6812, 0.7684, 0.7074, 0.7834]}, {"w": "cascade,", "b": [0.7136, 0.7684, 0.7807, 0.7834]}, {"w": "which", "b": [0.787, 0.7684, 0.8346, 0.7834]}, {"w": "can", "b": [0.8409, 0.7684, 0.8691, 0.7834]}, {"w": "end", "b": [0.1312, 0.7864, 0.16, 0.8013]}, {"w": "up", "b": [0.1661, 0.7864, 0.1866, 0.8013]}, {"w": "being", "b": [0.1928, 0.7864, 0.2364, 0.8013]}, {"w": "costly", "b": [0.2425, 0.7864, 0.2893, 0.8013]}, {"w": "in", "b": [0.2954, 0.7864, 0.3108, 0.8013]}, {"w": "the", "b": [0.317, 0.7864, 0.3426, 0.8013]}, {"w": "long-term.", "b": [0.3488, 0.7864, 0.4318, 0.8013]}]}, {"id": "b_11", "type": "paragraph", "text": "To mitigate the negative effect of model cascading, two strategies are beneficial:", "words": [{"w": "To", "b": [0.1306, 0.8133, 0.1516, 0.8283]}, {"w": "mitigate", "b": [0.1577, 0.8133, 0.2244, 0.8283]}, {"w": "the", "b": [0.2305, 0.8133, 0.2562, 0.8283]}, {"w": "negative", "b": [0.2623, 0.8133, 0.329, 0.8283]}, {"w": "effect", "b": [0.3351, 0.8133, 0.3777, 0.8283]}, {"w": "of", "b": [0.3838, 0.8133, 0.3987, 0.8283]}, {"w": "model", "b": [0.4048, 0.8133, 0.4535, 0.8283]}, {"w": "cascading,", "b": [0.4597, 0.8133, 0.5418, 0.8283]}, {"w": "two", "b": [0.548, 0.8133, 0.5767, 0.8283]}, {"w": "strategies", "b": [0.5828, 0.8133, 0.659, 0.8283]}, {"w": "are", "b": [0.6651, 0.8133, 0.6898, 0.8283]}, {"w": "beneficial:", "b": [0.696, 0.8133, 0.7765, 0.8283]}]}, {"id": "b_12", "type": "paragraph", "text": "1. Analyze the information flow in your software system and update, or retrain, the entire chain. Model mA’s updated output must be reflected in the training data for model mB.", "words": [{"w": "1.", "b": [0.1538, 0.8402, 0.1681, 0.8552]}, {"w": "Analyze", "b": [0.1774, 0.8402, 0.2407, 0.8552]}, {"w": "the", "b": [0.2466, 0.8402, 0.2717, 0.8552]}, {"w": "information", "b": [0.2776, 0.8402, 0.3696, 0.8552]}, {"w": "flow", "b": [0.3756, 0.8402, 0.4072, 0.8552]}, {"w": "in", "b": [0.4131, 0.8402, 0.4282, 0.8552]}, {"w": "your", "b": [0.4341, 0.8402, 0.4693, 0.8552]}, {"w": "software", "b": [0.4752, 0.8402, 0.5402, 0.8552]}, {"w": "system", "b": [0.5461, 0.8402, 0.6001, 0.8552]}, {"w": "and", "b": [0.606, 0.8402, 0.6352, 0.8552]}, {"w": "update,", "b": [0.6411, 0.8402, 0.7009, 0.8552]}, {"w": "or", "b": [0.7068, 0.8402, 0.723, 0.8552]}, {"w": "retrain,", "b": [0.7289, 0.8402, 0.7873, 0.8552]}, {"w": "the", "b": [0.7933, 0.8402, 0.8184, 0.8552]}, {"w": "entire", "b": [0.8243, 0.8402, 0.8691, 0.8552]}, {"w": "chain.", "b": [0.1774, 0.8582, 0.2241, 0.8731]}, {"w": "Model", "b": [0.232, 0.8582, 0.2812, 0.8731]}, {"w": "mA’s", "b": [0.2864, 0.8582, 0.3268, 0.8747]}, {"w": "updated", "b": [0.332, 0.8582, 0.3969, 0.8731]}, {"w": "output", "b": [0.4021, 0.8582, 0.4554, 0.8731]}, {"w": "must", "b": [0.4606, 0.8582, 0.4994, 0.8731]}, {"w": "be", "b": [0.5046, 0.8582, 0.5232, 0.8731]}, {"w": "reflected", "b": [0.5285, 0.8582, 0.5949, 0.8731]}, {"w": "in", "b": [0.6001, 0.8582, 0.6152, 0.8731]}, {"w": "the", "b": [0.6204, 0.8582, 0.6456, 0.8731]}, {"w": "training", "b": [0.6508, 0.8582, 0.7132, 0.8731]}, {"w": "data", "b": [0.7184, 0.8582, 0.7536, 0.8731]}, {"w": "for", "b": [0.7588, 0.8582, 0.7805, 0.8731]}, {"w": "model", "b": [0.7857, 0.8582, 0.8334, 0.8731]}, {"w": "mB.", "b": [0.8384, 0.8582, 0.8724, 0.8747]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 36", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "36", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 212, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2. Control who can and who cannot make calls to model mA to prevent undeclared consumers from creating this issue. As Google’s engineers mentioned:8 “In the absence of barriers, engineers will naturally use the most convenient signal at hand, especially when working against deadline pressures.”", "words": [{"w": "2.", "b": [0.1538, 0.0881, 0.1681, 0.1031]}, {"w": "Control", "b": [0.1774, 0.0881, 0.2396, 0.1031]}, {"w": "who", "b": [0.248, 0.0881, 0.2814, 0.1031]}, {"w": "can", "b": [0.2898, 0.0881, 0.318, 0.1031]}, {"w": "and", "b": [0.3263, 0.0881, 0.3567, 0.1031]}, {"w": "who", "b": [0.365, 0.0881, 0.3985, 0.1031]}, {"w": "cannot", "b": [0.4068, 0.0881, 0.4622, 0.1031]}, {"w": "make", "b": [0.4705, 0.0881, 0.5134, 0.1031]}, {"w": "calls", "b": [0.5218, 0.0881, 0.5574, 0.1031]}, {"w": "to", "b": [0.5658, 0.0881, 0.5825, 0.1031]}, {"w": "model", "b": [0.5908, 0.0881, 0.6405, 0.1031]}, {"w": "mA", "b": [0.6487, 0.0884, 0.676, 0.1046]}, {"w": "to", "b": [0.6852, 0.0881, 0.702, 0.1031]}, {"w": "prevent", "b": [0.7103, 0.0881, 0.7716, 0.1031]}, {"w": "undeclared", "b": [0.7799, 0.0881, 0.8689, 0.1031]}, {"w": "consumers", "b": [0.1774, 0.106, 0.2591, 0.121]}, {"w": "from", "b": [0.2652, 0.106, 0.302, 0.121]}, {"w": "creating", "b": [0.3081, 0.106, 0.3716, 0.121]}, {"w": "this", "b": [0.3777, 0.106, 0.407, 0.121]}, {"w": "issue.", "b": [0.4131, 0.106, 0.4556, 0.121]}, {"w": "As", "b": [0.4638, 0.106, 0.4845, 0.121]}, {"w": "Google’s", "b": [0.4906, 0.106, 0.5578, 0.121]}, {"w": "engineers", "b": [0.5639, 0.106, 0.6365, 0.121]}, {"w": "mentioned:8", "b": [0.6426, 0.1044, 0.7367, 0.121]}, {"w": "“In", "b": [0.7458, 0.106, 0.7709, 0.121]}, {"w": "the", "b": [0.7771, 0.106, 0.8022, 0.121]}, {"w": "absence", "b": [0.8084, 0.106, 0.8688, 0.121]}, {"w": "of", "b": [0.1774, 0.124, 0.1922, 0.1389]}, {"w": "barriers,", "b": [0.1984, 0.124, 0.2654, 0.1389]}, {"w": "engineers", "b": [0.2715, 0.124, 0.3456, 0.1389]}, {"w": "will", "b": [0.3517, 0.124, 0.3804, 0.1389]}, {"w": "naturally", "b": [0.3866, 0.124, 0.46, 0.1389]}, {"w": "use", "b": [0.4662, 0.124, 0.4919, 0.1389]}, {"w": "the", "b": [0.4981, 0.124, 0.5237, 0.1389]}, {"w": "most", "b": [0.5299, 0.124, 0.569, 0.1389]}, {"w": "convenient", "b": [0.5751, 0.124, 0.6603, 0.1389]}, {"w": "signal", "b": [0.6664, 0.124, 0.7127, 0.1389]}, {"w": "at", "b": [0.7189, 0.124, 0.7353, 0.1389]}, {"w": "hand,", "b": [0.7414, 0.124, 0.7866, 0.1389]}, {"w": "especially", "b": [0.7927, 0.124, 0.8698, 0.1389]}, {"w": "when", "b": [0.1767, 0.1419, 0.2187, 0.1569]}, {"w": "working", "b": [0.2249, 0.1419, 0.2885, 0.1569]}, {"w": "against", "b": [0.2947, 0.1419, 0.3522, 0.1569]}, {"w": "deadline", "b": [0.3583, 0.1419, 0.425, 0.1569]}, {"w": "pressures.”", "b": [0.4311, 0.1419, 0.5157, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "Furthermore, a prediction output by a model should not be a plain number or a string. It should come with information about the production model, and how it should be consumed.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.1689, 0.2394, 0.1838]}, {"w": "a", "b": [0.2475, 0.1689, 0.2569, 0.1838]}, {"w": "prediction", "b": [0.2646, 0.1689, 0.3473, 0.1838]}, {"w": "output", "b": [0.3549, 0.1689, 0.4104, 0.1838]}, {"w": "by", "b": [0.4181, 0.1689, 0.438, 0.1838]}, {"w": "a", "b": [0.4456, 0.1689, 0.455, 0.1838]}, {"w": "model", "b": [0.4627, 0.1689, 0.5124, 0.1838]}, {"w": "should", "b": [0.5201, 0.1689, 0.5735, 0.1838]}, {"w": "not", "b": [0.5812, 0.1689, 0.6084, 0.1838]}, {"w": "be", "b": [0.6161, 0.1689, 0.6354, 0.1838]}, {"w": "a", "b": [0.6431, 0.1689, 0.6525, 0.1838]}, {"w": "plain", "b": [0.6602, 0.1689, 0.701, 0.1838]}, {"w": "number", "b": [0.7087, 0.1689, 0.771, 0.1838]}, {"w": "or", "b": [0.7786, 0.1689, 0.7954, 0.1838]}, {"w": "a", "b": [0.8031, 0.1689, 0.8125, 0.1838]}, {"w": "string.", "b": [0.8202, 0.1689, 0.8727, 0.1838]}, {"w": "It", "b": [0.1312, 0.1868, 0.1448, 0.2018]}, {"w": "should", "b": [0.1501, 0.1868, 0.2014, 0.2018]}, {"w": "come", "b": [0.2067, 0.1868, 0.2469, 0.2018]}, {"w": "with", "b": [0.2522, 0.1868, 0.2874, 0.2018]}, {"w": "information", "b": [0.2927, 0.1868, 0.3847, 0.2018]}, {"w": "about", "b": [0.3899, 0.1868, 0.4357, 0.2018]}, {"w": "the", "b": [0.441, 0.1868, 0.4661, 0.2018]}, {"w": "production", "b": [0.4714, 0.1868, 0.5574, 0.2018]}, {"w": "model,", "b": [0.5627, 0.1868, 0.6154, 0.2018]}, {"w": "and", "b": [0.6209, 0.1868, 0.65, 0.2018]}, {"w": "how", "b": [0.6553, 0.1868, 0.6869, 0.2018]}, {"w": "it", "b": [0.6922, 0.1868, 0.7043, 0.2018]}, {"w": "should", "b": [0.7096, 0.1868, 0.761, 0.2018]}, {"w": "be", "b": [0.7662, 0.1868, 0.7849, 0.2018]}, {"w": "consumed.", "b": [0.7901, 0.1868, 0.8727, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "6.7.7 Write Efficient Code, Compile, and Parallelize", "words": [{"w": "6.7.7", "b": [0.1312, 0.235, 0.1749, 0.2499]}, {"w": "Write", "b": [0.1961, 0.235, 0.2489, 0.2499]}, {"w": "Efficient", "b": [0.2559, 0.235, 0.3321, 0.2499]}, {"w": "Code,", "b": [0.3391, 0.235, 0.3931, 0.2499]}, {"w": "Compile,", "b": [0.4001, 0.235, 0.483, 0.2499]}, {"w": "and", "b": [0.4901, 0.235, 0.5239, 0.2499]}, {"w": "Parallelize", "b": [0.531, 0.235, 0.6268, 0.2499]}]}, {"id": "b_3", "type": "paragraph", "text": "By writing fast and efficient code, you can speed up the training by an order of magnitude, as compared to an inefficient quick-and-dirty script you implemented during experimentation, just “to make it work.” Modern datasets are large, so you might wait for hours, even days, for data preprocessing. Training also can take days, or sometimes weeks.", "words": [{"w": "By", "b": [0.1312, 0.2712, 0.1541, 0.2862]}, {"w": "writing", "b": [0.1603, 0.2712, 0.2179, 0.2862]}, {"w": "fast", "b": [0.2241, 0.2712, 0.2535, 0.2862]}, {"w": "and", "b": [0.2596, 0.2712, 0.2894, 0.2862]}, {"w": "efficient", "b": [0.2956, 0.2712, 0.3578, 0.2862]}, {"w": "code,", "b": [0.364, 0.2712, 0.4057, 0.2862]}, {"w": "you", "b": [0.4118, 0.2712, 0.4406, 0.2862]}, {"w": "can", "b": [0.4468, 0.2712, 0.4745, 0.2862]}, {"w": "speed", "b": [0.4807, 0.2712, 0.5255, 0.2862]}, {"w": "up", "b": [0.5317, 0.2712, 0.5523, 0.2862]}, {"w": "the", "b": [0.5584, 0.2712, 0.5842, 0.2862]}, {"w": "training", "b": [0.5903, 0.2712, 0.6541, 0.2862]}, {"w": "by", "b": [0.6603, 0.2712, 0.6798, 0.2862]}, {"w": "an", "b": [0.686, 0.2712, 0.7055, 0.2862]}, {"w": "order", "b": [0.7117, 0.2712, 0.754, 0.2862]}, {"w": "of", "b": [0.7601, 0.2712, 0.775, 0.2862]}, {"w": "magnitude,", "b": [0.7812, 0.2712, 0.8717, 0.2862]}, {"w": "as", "b": [0.1312, 0.2892, 0.1474, 0.3041]}, {"w": "compared", "b": [0.1532, 0.2892, 0.2296, 0.3041]}, {"w": "to", "b": [0.2354, 0.2892, 0.2514, 0.3041]}, {"w": "an", "b": [0.2572, 0.2892, 0.2763, 0.3041]}, {"w": "inefficient", "b": [0.2821, 0.2892, 0.3579, 0.3041]}, {"w": "quick-and-dirty", "b": [0.3637, 0.2892, 0.4848, 0.3041]}, {"w": "script", "b": [0.4906, 0.2892, 0.535, 0.3041]}, {"w": "you", "b": [0.5408, 0.2892, 0.5689, 0.3041]}, {"w": "implemented", "b": [0.5746, 0.2892, 0.6756, 0.3041]}, {"w": "during", "b": [0.6814, 0.2892, 0.7327, 0.3041]}, {"w": "experimentation,", "b": [0.7385, 0.2892, 0.8717, 0.3041]}, {"w": "just", "b": [0.1312, 0.3071, 0.162, 0.3221]}, {"w": "“to", "b": [0.1681, 0.3071, 0.1935, 0.3221]}, {"w": "make", "b": [0.1997, 0.3071, 0.2422, 0.3221]}, {"w": "it", "b": [0.2484, 0.3071, 0.2608, 0.3221]}, {"w": "work.”", "b": [0.267, 0.3071, 0.3179, 0.3221]}, {"w": "Modern", "b": [0.3262, 0.3071, 0.3895, 0.3221]}, {"w": "datasets", "b": [0.3957, 0.3071, 0.4623, 0.3221]}, {"w": "are", "b": [0.4685, 0.3071, 0.4934, 0.3221]}, {"w": "large,", "b": [0.4996, 0.3071, 0.5443, 0.3221]}, {"w": "so", "b": [0.5504, 0.3071, 0.5672, 0.3221]}, {"w": "you", "b": [0.5733, 0.3071, 0.6024, 0.3221]}, {"w": "might", "b": [0.6085, 0.3071, 0.6557, 0.3221]}, {"w": "wait", "b": [0.6619, 0.3071, 0.6967, 0.3221]}, {"w": "for", "b": [0.7028, 0.3071, 0.7252, 0.3221]}, {"w": "hours,", "b": [0.7313, 0.3071, 0.7813, 0.3221]}, {"w": "even", "b": [0.7875, 0.3071, 0.8238, 0.3221]}, {"w": "days,", "b": [0.83, 0.3071, 0.8716, 0.3221]}, {"w": "for", "b": [0.1312, 0.3251, 0.1533, 0.34]}, {"w": "data", "b": [0.1595, 0.3251, 0.1954, 0.34]}, {"w": "preprocessing.", "b": [0.2015, 0.3251, 0.3152, 0.34]}, {"w": "Training", "b": [0.3234, 0.3251, 0.3916, 0.34]}, {"w": "also", "b": [0.3978, 0.3251, 0.4286, 0.34]}, {"w": "can", "b": [0.4348, 0.3251, 0.4625, 0.34]}, {"w": "take", "b": [0.4686, 0.3251, 0.5025, 0.34]}, {"w": "days,", "b": [0.5086, 0.3251, 0.5497, 0.34]}, {"w": "or", "b": [0.5559, 0.3251, 0.5723, 0.34]}, {"w": "sometimes", "b": [0.5785, 0.3251, 0.6617, 0.34]}, {"w": "weeks.", "b": [0.6679, 0.3251, 0.7193, 0.34]}]}, {"id": "b_4", "type": "paragraph", "text": "Always write the code with efficiency in mind, even if it seems to be a function, a method, or a script that you will not run frequently. Some code that was supposed to run once might be called in a loop millions of times.", "words": [{"w": "Always", "b": [0.1305, 0.352, 0.1869, 0.3669]}, {"w": "write", "b": [0.1928, 0.352, 0.2331, 0.3669]}, {"w": "the", "b": [0.239, 0.352, 0.2642, 0.3669]}, {"w": "code", "b": [0.2701, 0.352, 0.3058, 0.3669]}, {"w": "with", "b": [0.3118, 0.352, 0.347, 0.3669]}, {"w": "efficiency", "b": [0.3529, 0.352, 0.4248, 0.3669]}, {"w": "in", "b": [0.4307, 0.352, 0.4458, 0.3669]}, {"w": "mind,", "b": [0.4518, 0.352, 0.497, 0.3669]}, {"w": "even", "b": [0.503, 0.352, 0.5382, 0.3669]}, {"w": "if", "b": [0.5441, 0.352, 0.5547, 0.3669]}, {"w": "it", "b": [0.5606, 0.352, 0.5727, 0.3669]}, {"w": "seems", "b": [0.5787, 0.352, 0.6241, 0.3669]}, {"w": "to", "b": [0.6301, 0.352, 0.6461, 0.3669]}, {"w": "be", "b": [0.6521, 0.352, 0.6707, 0.3669]}, {"w": "a", "b": [0.6766, 0.352, 0.6857, 0.3669]}, {"w": "function,", "b": [0.6917, 0.352, 0.7615, 0.3669]}, {"w": "a", "b": [0.7675, 0.352, 0.7766, 0.3669]}, {"w": "method,", "b": [0.7825, 0.352, 0.8473, 0.3669]}, {"w": "or", "b": [0.8533, 0.352, 0.8695, 0.3669]}, {"w": "a", "b": [0.1312, 0.3699, 0.1403, 0.3849]}, {"w": "script", "b": [0.1463, 0.3699, 0.1907, 0.3849]}, {"w": "that", "b": [0.1967, 0.3699, 0.2298, 0.3849]}, {"w": "you", "b": [0.2358, 0.3699, 0.2639, 0.3849]}, {"w": "will", "b": [0.2699, 0.3699, 0.2981, 0.3849]}, {"w": "not", "b": [0.3041, 0.3699, 0.3302, 0.3849]}, {"w": "run", "b": [0.3362, 0.3699, 0.3634, 0.3849]}, {"w": "frequently.", "b": [0.3694, 0.3699, 0.4523, 0.3849]}, {"w": "Some", "b": [0.4605, 0.3699, 0.5027, 0.3849]}, {"w": "code", "b": [0.5087, 0.3699, 0.5444, 0.3849]}, {"w": "that", "b": [0.5504, 0.3699, 0.5835, 0.3849]}, {"w": "was", "b": [0.5895, 0.3699, 0.6183, 0.3849]}, {"w": "supposed", "b": [0.6243, 0.3699, 0.6964, 0.3849]}, {"w": "to", "b": [0.7023, 0.3699, 0.7184, 0.3849]}, {"w": "run", "b": [0.7244, 0.3699, 0.7516, 0.3849]}, {"w": "once", "b": [0.7576, 0.3699, 0.7928, 0.3849]}, {"w": "might", "b": [0.7988, 0.3699, 0.8445, 0.3849]}, {"w": "be", "b": [0.8505, 0.3699, 0.8691, 0.3849]}, {"w": "called", "b": [0.1312, 0.3879, 0.1774, 0.4028]}, {"w": "in", "b": [0.1835, 0.3879, 0.1989, 0.4028]}, {"w": "a", "b": [0.2051, 0.3879, 0.2143, 0.4028]}, {"w": "loop", "b": [0.2205, 0.3879, 0.2548, 0.4028]}, {"w": "millions", "b": [0.261, 0.3879, 0.3236, 0.4028]}, {"w": "of", "b": [0.3297, 0.3879, 0.3446, 0.4028]}, {"w": "times.", "b": [0.3508, 0.3879, 0.3991, 0.4028]}]}, {"id": "b_5", "type": "paragraph", "text": "Avoid using loops. For example, if you need to compute a dot product of two vectors, or multiply a matrix by a vector, use fast and efficient dot-product or matrix-multiplication methods in scientific libraries and modules. Examples of such efficient implementations are Python’s NumPy and SciPy libraries. Talented and skilled software engineers and scientists created these libraries and modules. They rely on low-level programming languages such as C, as well as hardware acceleration, and work blazingly fast.", "words": [{"w": "Avoid", "b": [0.1305, 0.4148, 0.1769, 0.4298]}, {"w": "using", "b": [0.1831, 0.4148, 0.2259, 0.4298]}, {"w": "loops.", "b": [0.2321, 0.4148, 0.2796, 0.4298]}, {"w": "For", "b": [0.2877, 0.4148, 0.3152, 0.4298]}, {"w": "example,", "b": [0.3213, 0.4148, 0.3937, 0.4298]}, {"w": "if", "b": [0.3999, 0.4148, 0.4108, 0.4298]}, {"w": "you", "b": [0.417, 0.4148, 0.4461, 0.4298]}, {"w": "need", "b": [0.4523, 0.4148, 0.4898, 0.4298]}, {"w": "to", "b": [0.496, 0.4148, 0.5126, 0.4298]}, {"w": "compute", "b": [0.5188, 0.4148, 0.5886, 0.4298]}, {"w": "a", "b": [0.5947, 0.4148, 0.6041, 0.4298]}, {"w": "dot", "b": [0.6102, 0.4151, 0.6409, 0.4301]}, {"w": "product", "b": [0.6479, 0.4151, 0.7209, 0.4301]}, {"w": "of", "b": [0.7271, 0.4148, 0.7422, 0.4298]}, {"w": "two", "b": [0.7483, 0.4148, 0.7775, 0.4298]}, {"w": "vectors,", "b": [0.7836, 0.4148, 0.8463, 0.4298]}, {"w": "or", "b": [0.8525, 0.4148, 0.8692, 0.4298]}, {"w": "multiply", "b": [0.1312, 0.4328, 0.2003, 0.4477]}, {"w": "a", "b": [0.2069, 0.4328, 0.2163, 0.4477]}, {"w": "matrix", "b": [0.2229, 0.4328, 0.2778, 0.4477]}, {"w": "by", "b": [0.2845, 0.4328, 0.3043, 0.4477]}, {"w": "a", "b": [0.3109, 0.4328, 0.3204, 0.4477]}, {"w": "vector,", "b": [0.327, 0.4328, 0.3825, 0.4477]}, {"w": "use", "b": [0.3892, 0.4328, 0.4155, 0.4477]}, {"w": "fast", "b": [0.4221, 0.4328, 0.452, 0.4477]}, {"w": "and", "b": [0.4586, 0.4328, 0.4889, 0.4477]}, {"w": "efficient", "b": [0.4956, 0.4328, 0.5588, 0.4477]}, {"w": "dot-product", "b": [0.5654, 0.4328, 0.6633, 0.4477]}, {"w": "or", "b": [0.6699, 0.4328, 0.6867, 0.4477]}, {"w": "matrix-multiplication", "b": [0.6933, 0.4328, 0.869, 0.4477]}, {"w": "methods", "b": [0.1312, 0.4507, 0.1997, 0.4657]}, {"w": "in", "b": [0.2058, 0.4507, 0.2212, 0.4657]}, {"w": "scientific", "b": [0.2274, 0.4507, 0.2969, 0.4657]}, {"w": "libraries", "b": [0.3031, 0.4507, 0.368, 0.4657]}, {"w": "and", "b": [0.3742, 0.4507, 0.404, 0.4657]}, {"w": "modules.", "b": [0.4101, 0.4507, 0.4817, 0.4657]}, {"w": "Examples", "b": [0.4899, 0.4507, 0.5678, 0.4657]}, {"w": "of", "b": [0.574, 0.4507, 0.5889, 0.4657]}, {"w": "such", "b": [0.5951, 0.4507, 0.6306, 0.4657]}, {"w": "efficient", "b": [0.6368, 0.4507, 0.6989, 0.4657]}, {"w": "implementations", "b": [0.7051, 0.4507, 0.8383, 0.4657]}, {"w": "are", "b": [0.8444, 0.4507, 0.8691, 0.4657]}, {"w": "Python’s", "b": [0.1312, 0.4686, 0.2014, 0.4836]}, {"w": "NumPy", "b": [0.2066, 0.469, 0.2784, 0.4839]}, {"w": "and", "b": [0.2837, 0.4686, 0.3128, 0.4836]}, {"w": "SciPy", "b": [0.318, 0.469, 0.3708, 0.4839]}, {"w": "libraries.", "b": [0.3761, 0.4686, 0.4447, 0.4836]}, {"w": "Talented", "b": [0.4525, 0.4686, 0.5208, 0.4836]}, {"w": "and", "b": [0.5261, 0.4686, 0.5552, 0.4836]}, {"w": "skilled", "b": [0.5605, 0.4686, 0.6103, 0.4836]}, {"w": "software", "b": [0.6156, 0.4686, 0.6805, 0.4836]}, {"w": "engineers", "b": [0.6858, 0.4686, 0.7583, 0.4836]}, {"w": "and", "b": [0.7635, 0.4686, 0.7927, 0.4836]}, {"w": "scientists", "b": [0.7979, 0.4686, 0.8691, 0.4836]}, {"w": "created", "b": [0.1312, 0.4866, 0.1909, 0.5016]}, {"w": "these", "b": [0.1977, 0.4866, 0.2396, 0.5016]}, {"w": "libraries", "b": [0.2464, 0.4866, 0.3125, 0.5016]}, {"w": "and", "b": [0.3193, 0.4866, 0.3496, 0.5016]}, {"w": "modules.", "b": [0.3563, 0.4866, 0.4291, 0.5016]}, {"w": "They", "b": [0.4391, 0.4866, 0.4815, 0.5016]}, {"w": "rely", "b": [0.4882, 0.4866, 0.5192, 0.5016]}, {"w": "on", "b": [0.5259, 0.4866, 0.5458, 0.5016]}, {"w": "low-level", "b": [0.5525, 0.4866, 0.6231, 0.5016]}, {"w": "programming", "b": [0.6299, 0.4866, 0.7398, 0.5016]}, {"w": "languages", "b": [0.7466, 0.4866, 0.8261, 0.5016]}, {"w": "such", "b": [0.8329, 0.4866, 0.8691, 0.5016]}, {"w": "as", "b": [0.1312, 0.5045, 0.1477, 0.5195]}, {"w": "C,", "b": [0.1539, 0.5045, 0.1723, 0.5195]}, {"w": "as", "b": [0.1785, 0.5045, 0.195, 0.5195]}, {"w": "well", "b": [0.2012, 0.5045, 0.2324, 0.5195]}, {"w": "as", "b": [0.2386, 0.5045, 0.2551, 0.5195]}, {"w": "hardware", "b": [0.2612, 0.5045, 0.3357, 0.5195]}, {"w": "acceleration,", "b": [0.3418, 0.5045, 0.4424, 0.5195]}, {"w": "and", "b": [0.4485, 0.5045, 0.4783, 0.5195]}, {"w": "work", "b": [0.4844, 0.5045, 0.5234, 0.5195]}, {"w": "blazingly", "b": [0.5296, 0.5045, 0.6019, 0.5195]}, {"w": "fast.", "b": [0.608, 0.5045, 0.6425, 0.5195]}]}, {"id": "b_6", "type": "paragraph", "text": "Where possible, compile the code before executing it. Such libraries as PyPy and Numba", "words": [{"w": "Where", "b": [0.1303, 0.5315, 0.1832, 0.5464]}, {"w": "possible,", "b": [0.1894, 0.5315, 0.2578, 0.5464]}, {"w": "compile", "b": [0.264, 0.5315, 0.3256, 0.5464]}, {"w": "the", "b": [0.3317, 0.5315, 0.3574, 0.5464]}, {"w": "code", "b": [0.3635, 0.5315, 0.3999, 0.5464]}, {"w": "before", "b": [0.4061, 0.5315, 0.4554, 0.5464]}, {"w": "executing", "b": [0.4615, 0.5315, 0.538, 0.5464]}, {"w": "it.", "b": [0.5441, 0.5315, 0.5616, 0.5464]}, {"w": "Such", "b": [0.5698, 0.5315, 0.6083, 0.5464]}, {"w": "libraries", "b": [0.6144, 0.5315, 0.6793, 0.5464]}, {"w": "as", "b": [0.6855, 0.5315, 0.702, 0.5464]}, {"w": "PyPy", "b": [0.7078, 0.5318, 0.7592, 0.5467]}, {"w": "and", "b": [0.7653, 0.5315, 0.7951, 0.5464]}, {"w": "Numba", "b": [0.8012, 0.5318, 0.8688, 0.5467]}]}, {"id": "b_7", "type": "paragraph", "text": "for Python, or pqR for R, would compile the code into the OS (operating system) native binary code, which can significantly increase the speed of data processing and model training.", "words": [{"w": "for", "b": [0.1312, 0.5494, 0.1538, 0.5644]}, {"w": "Python,", "b": [0.1601, 0.5494, 0.2257, 0.5644]}, {"w": "or", "b": [0.232, 0.5494, 0.2488, 0.5644]}, {"w": "pqR", "b": [0.2551, 0.5497, 0.2946, 0.5647]}, {"w": "for", "b": [0.3013, 0.5494, 0.3238, 0.5644]}, {"w": "R,", "b": [0.3301, 0.5494, 0.3492, 0.5644]}, {"w": "would", "b": [0.3555, 0.5494, 0.4041, 0.5644]}, {"w": "compile", "b": [0.4104, 0.5494, 0.4732, 0.5644]}, {"w": "the", "b": [0.4795, 0.5494, 0.5057, 0.5644]}, {"w": "code", "b": [0.5119, 0.5494, 0.5491, 0.5644]}, {"w": "into", "b": [0.5554, 0.5494, 0.5873, 0.5644]}, {"w": "the", "b": [0.5936, 0.5494, 0.6197, 0.5644]}, {"w": "OS", "b": [0.626, 0.5494, 0.6511, 0.5644]}, {"w": "(operating", "b": [0.6574, 0.5494, 0.7427, 0.5644]}, {"w": "system)", "b": [0.749, 0.5494, 0.8125, 0.5644]}, {"w": "native", "b": [0.8188, 0.5494, 0.869, 0.5644]}, {"w": "binary", "b": [0.1312, 0.5674, 0.182, 0.5823]}, {"w": "code,", "b": [0.1879, 0.5674, 0.2286, 0.5823]}, {"w": "which", "b": [0.2345, 0.5674, 0.2802, 0.5823]}, {"w": "can", "b": [0.286, 0.5674, 0.3132, 0.5823]}, {"w": "significantly", "b": [0.319, 0.5674, 0.4136, 0.5823]}, {"w": "increase", "b": [0.4194, 0.5674, 0.4819, 0.5823]}, {"w": "the", "b": [0.4877, 0.5674, 0.5129, 0.5823]}, {"w": "speed", "b": [0.5187, 0.5674, 0.5626, 0.5823]}, {"w": "of", "b": [0.5684, 0.5674, 0.583, 0.5823]}, {"w": "data", "b": [0.5888, 0.5674, 0.624, 0.5823]}, {"w": "processing", "b": [0.6298, 0.5674, 0.711, 0.5823]}, {"w": "and", "b": [0.7168, 0.5674, 0.746, 0.5823]}, {"w": "model", "b": [0.7518, 0.5674, 0.7995, 0.5823]}, {"w": "training.", "b": [0.8054, 0.5674, 0.8727, 0.5823]}]}, {"id": "b_8", "type": "paragraph", "text": "Another important aspect is parallelization. If you work with modern libraries and modules, you can find learning algorithms that exploit multicore CPUs. Some allow GPUs to speed up the training of neural networks and many other models. Training of some models, such as SVM, cannot be effectively parallelized. In such cases, you can still exploit a multicore CPU by running multiple experiments in parallel. Run one experiment for each combination of hyperparameter values, geographical region, or user segment. Furthermore, compute each cross-validation fold in parallel with other folds.", "words": [{"w": "Another", "b": [0.1305, 0.5943, 0.196, 0.6092]}, {"w": "important", "b": [0.2022, 0.5943, 0.2823, 0.6092]}, {"w": "aspect", "b": [0.2885, 0.5943, 0.3388, 0.6092]}, {"w": "is", "b": [0.345, 0.5943, 0.3572, 0.6092]}, {"w": "parallelization.", "b": [0.3634, 0.5943, 0.4811, 0.6092]}, {"w": "If", "b": [0.4894, 0.5943, 0.5015, 0.6092]}, {"w": "you", "b": [0.5077, 0.5943, 0.5361, 0.6092]}, {"w": "work", "b": [0.5422, 0.5943, 0.5808, 0.6092]}, {"w": "with", "b": [0.587, 0.5943, 0.6225, 0.6092]}, {"w": "modern", "b": [0.6286, 0.5943, 0.689, 0.6092]}, {"w": "libraries", "b": [0.6952, 0.5943, 0.7593, 0.6092]}, {"w": "and", "b": [0.7655, 0.5943, 0.7949, 0.6092]}, {"w": "modules,", "b": [0.801, 0.5943, 0.8716, 0.6092]}, {"w": "you", "b": [0.1308, 0.6122, 0.1589, 0.6272]}, {"w": "can", "b": [0.1647, 0.6122, 0.1918, 0.6272]}, {"w": "find", "b": [0.1977, 0.6122, 0.2278, 0.6272]}, {"w": "learning", "b": [0.2337, 0.6122, 0.297, 0.6272]}, {"w": "algorithms", "b": [0.3029, 0.6122, 0.3864, 0.6272]}, {"w": "that", "b": [0.3923, 0.6122, 0.4254, 0.6272]}, {"w": "exploit", "b": [0.4312, 0.6122, 0.485, 0.6272]}, {"w": "multicore", "b": [0.4909, 0.6122, 0.5648, 0.6272]}, {"w": "CPUs.", "b": [0.5706, 0.6122, 0.6217, 0.6272]}, {"w": "Some", "b": [0.6298, 0.6122, 0.672, 0.6272]}, {"w": "allow", "b": [0.6778, 0.6122, 0.7185, 0.6272]}, {"w": "GPUs", "b": [0.7243, 0.6122, 0.7715, 0.6272]}, {"w": "to", "b": [0.7774, 0.6122, 0.7934, 0.6272]}, {"w": "speed", "b": [0.7993, 0.6122, 0.8431, 0.6272]}, {"w": "up", "b": [0.849, 0.6122, 0.8691, 0.6272]}, {"w": "the", "b": [0.1312, 0.6302, 0.1573, 0.6451]}, {"w": "training", "b": [0.1635, 0.6302, 0.2281, 0.6451]}, {"w": "of", "b": [0.2343, 0.6302, 0.2494, 0.6451]}, {"w": "neural", "b": [0.2555, 0.6302, 0.3066, 0.6451]}, {"w": "networks", "b": [0.3128, 0.6302, 0.3854, 0.6451]}, {"w": "and", "b": [0.3916, 0.6302, 0.4218, 0.6451]}, {"w": "many", "b": [0.4279, 0.6302, 0.4727, 0.6451]}, {"w": "other", "b": [0.4789, 0.6302, 0.5217, 0.6451]}, {"w": "models.", "b": [0.5278, 0.6302, 0.5899, 0.6451]}, {"w": "Training", "b": [0.5981, 0.6302, 0.6675, 0.6451]}, {"w": "of", "b": [0.6737, 0.6302, 0.6888, 0.6451]}, {"w": "some", "b": [0.6949, 0.6302, 0.7356, 0.6451]}, {"w": "models,", "b": [0.7418, 0.6302, 0.8039, 0.6451]}, {"w": "such", "b": [0.8101, 0.6302, 0.8461, 0.6451]}, {"w": "as", "b": [0.8523, 0.6302, 0.8691, 0.6451]}, {"w": "SVM,", "b": [0.1312, 0.6481, 0.1767, 0.6631]}, {"w": "cannot", "b": [0.1829, 0.6481, 0.2364, 0.6631]}, {"w": "be", "b": [0.2426, 0.6481, 0.2613, 0.6631]}, {"w": "effectively", "b": [0.2674, 0.6481, 0.3463, 0.6631]}, {"w": "parallelized.", "b": [0.3525, 0.6481, 0.4476, 0.6631]}, {"w": "In", "b": [0.4558, 0.6481, 0.4724, 0.6631]}, {"w": "such", "b": [0.4786, 0.6481, 0.5136, 0.6631]}, {"w": "cases,", "b": [0.5197, 0.6481, 0.5644, 0.6631]}, {"w": "you", "b": [0.5706, 0.6481, 0.5989, 0.6631]}, {"w": "can", "b": [0.605, 0.6481, 0.6323, 0.6631]}, {"w": "still", "b": [0.6384, 0.6481, 0.6679, 0.6631]}, {"w": "exploit", "b": [0.674, 0.6481, 0.7281, 0.6631]}, {"w": "a", "b": [0.7342, 0.6481, 0.7433, 0.6631]}, {"w": "multicore", "b": [0.7495, 0.6481, 0.8238, 0.6631]}, {"w": "CPU", "b": [0.83, 0.6481, 0.8691, 0.6631]}, {"w": "by", "b": [0.1312, 0.6661, 0.1511, 0.681]}, {"w": "running", "b": [0.1574, 0.6661, 0.2212, 0.681]}, {"w": "multiple", "b": [0.2275, 0.6661, 0.295, 0.681]}, {"w": "experiments", "b": [0.3012, 0.6661, 0.4002, 0.681]}, {"w": "in", "b": [0.4065, 0.6661, 0.4221, 0.681]}, {"w": "parallel.", "b": [0.4284, 0.6661, 0.4944, 0.681]}, {"w": "Run", "b": [0.5028, 0.6661, 0.5371, 0.681]}, {"w": "one", "b": [0.5433, 0.6661, 0.5716, 0.681]}, {"w": "experiment", "b": [0.5778, 0.6661, 0.6694, 0.681]}, {"w": "for", "b": [0.6756, 0.6661, 0.6982, 0.681]}, {"w": "each", "b": [0.7044, 0.6661, 0.7405, 0.681]}, {"w": "combination", "b": [0.7468, 0.6661, 0.8477, 0.681]}, {"w": "of", "b": [0.854, 0.6661, 0.8691, 0.681]}, {"w": "hyperparameter", "b": [0.1312, 0.684, 0.2616, 0.699]}, {"w": "values,", "b": [0.2678, 0.684, 0.3229, 0.699]}, {"w": "geographical", "b": [0.3291, 0.684, 0.4316, 0.699]}, {"w": "region,", "b": [0.4378, 0.684, 0.4933, 0.699]}, {"w": "or", "b": [0.4995, 0.684, 0.5163, 0.699]}, {"w": "user", "b": [0.5225, 0.684, 0.5561, 0.699]}, {"w": "segment.", "b": [0.5623, 0.684, 0.6341, 0.699]}, {"w": "Furthermore,", "b": [0.6424, 0.684, 0.7506, 0.699]}, {"w": "compute", "b": [0.7568, 0.684, 0.8268, 0.699]}, {"w": "each", "b": [0.833, 0.684, 0.8691, 0.699]}, {"w": "cross-validation", "b": [0.1312, 0.702, 0.2561, 0.7169]}, {"w": "fold", "b": [0.2622, 0.702, 0.2925, 0.7169]}, {"w": "in", "b": [0.2986, 0.702, 0.314, 0.7169]}, {"w": "parallel", "b": [0.3202, 0.702, 0.3797, 0.7169]}, {"w": "with", "b": [0.3859, 0.702, 0.4217, 0.7169]}, {"w": "other", "b": [0.4279, 0.702, 0.47, 0.7169]}, {"w": "folds.", "b": [0.4761, 0.702, 0.5188, 0.7169]}]}, {"id": "b_9", "type": "paragraph", "text": "Where possible, use a solid-state drive (SSD) to store the data. Use distributed computing;", "words": [{"w": "Where", "b": [0.1303, 0.7289, 0.1833, 0.7438]}, {"w": "possible,", "b": [0.1895, 0.7289, 0.2581, 0.7438]}, {"w": "use", "b": [0.2642, 0.7289, 0.29, 0.7438]}, {"w": "a", "b": [0.2962, 0.7289, 0.3054, 0.7438]}, {"w": "solid-state", "b": [0.3116, 0.7289, 0.3941, 0.7438]}, {"w": "drive", "b": [0.4002, 0.7289, 0.4404, 0.7438]}, {"w": "(SSD)", "b": [0.4465, 0.7289, 0.4956, 0.7438]}, {"w": "to", "b": [0.5018, 0.7289, 0.5182, 0.7438]}, {"w": "store", "b": [0.5243, 0.7289, 0.5636, 0.7438]}, {"w": "the", "b": [0.5697, 0.7289, 0.5954, 0.7438]}, {"w": "data.", "b": [0.6016, 0.7289, 0.6427, 0.7438]}, {"w": "Use", "b": [0.6509, 0.7289, 0.6803, 0.7438]}, {"w": "distributed", "b": [0.6864, 0.7289, 0.7751, 0.7438]}, {"w": "computing;", "b": [0.7812, 0.7289, 0.8717, 0.7438]}]}, {"id": "b_10", "type": "paragraph", "text": "some implementations of learning algorithms are designed to run in distributed computing environments, such as Spark. Try to put all the needed data into the RAM of your laptop or server. It’s not uncommon today for data analysts to work on a server with 512 gigabytes or even one or more terabytes of RAM.", "words": [{"w": "some", "b": [0.1312, 0.7468, 0.1717, 0.7618]}, {"w": "implementations", "b": [0.1778, 0.7468, 0.3119, 0.7618]}, {"w": "of", "b": [0.3181, 0.7468, 0.3331, 0.7618]}, {"w": "learning", "b": [0.3392, 0.7468, 0.4045, 0.7618]}, {"w": "algorithms", "b": [0.4106, 0.7468, 0.4966, 0.7618]}, {"w": "are", "b": [0.5028, 0.7468, 0.5277, 0.7618]}, {"w": "designed", "b": [0.5338, 0.7468, 0.6033, 0.7618]}, {"w": "to", "b": [0.6094, 0.7468, 0.626, 0.7618]}, {"w": "run", "b": [0.6321, 0.7468, 0.6601, 0.7618]}, {"w": "in", "b": [0.6663, 0.7468, 0.6818, 0.7618]}, {"w": "distributed", "b": [0.6879, 0.7468, 0.7771, 0.7618]}, {"w": "computing", "b": [0.7832, 0.7468, 0.8691, 0.7618]}, {"w": "environments,", "b": [0.1312, 0.7648, 0.2414, 0.7797]}, {"w": "such", "b": [0.2475, 0.7648, 0.2823, 0.7797]}, {"w": "as", "b": [0.2884, 0.7648, 0.3046, 0.7797]}, {"w": "Spark.", "b": [0.3107, 0.7648, 0.3615, 0.7797]}, {"w": "Try", "b": [0.3697, 0.7648, 0.3978, 0.7797]}, {"w": "to", "b": [0.4039, 0.7648, 0.42, 0.7797]}, {"w": "put", "b": [0.4261, 0.7648, 0.4533, 0.7797]}, {"w": "all", "b": [0.4594, 0.7648, 0.4784, 0.7797]}, {"w": "the", "b": [0.4846, 0.7648, 0.5097, 0.7797]}, {"w": "needed", "b": [0.5158, 0.7648, 0.5701, 0.7797]}, {"w": "data", "b": [0.5762, 0.7648, 0.6114, 0.7797]}, {"w": "into", "b": [0.6174, 0.7648, 0.6481, 0.7797]}, {"w": "the", "b": [0.6542, 0.7648, 0.6793, 0.7797]}, {"w": "RAM", "b": [0.6854, 0.7648, 0.7289, 0.7797]}, {"w": "of", "b": [0.735, 0.7648, 0.7496, 0.7797]}, {"w": "your", "b": [0.7557, 0.7648, 0.7909, 0.7797]}, {"w": "laptop", "b": [0.797, 0.7648, 0.8472, 0.7797]}, {"w": "or", "b": [0.8533, 0.7648, 0.8695, 0.7797]}, {"w": "server.", "b": [0.1312, 0.7827, 0.1829, 0.7977]}, {"w": "It’s", "b": [0.191, 0.7827, 0.2169, 0.7977]}, {"w": "not", "b": [0.223, 0.7827, 0.2492, 0.7977]}, {"w": "uncommon", "b": [0.2553, 0.7827, 0.342, 0.7977]}, {"w": "today", "b": [0.3481, 0.7827, 0.393, 0.7977]}, {"w": "for", "b": [0.3991, 0.7827, 0.4208, 0.7977]}, {"w": "data", "b": [0.427, 0.7827, 0.4622, 0.7977]}, {"w": "analysts", "b": [0.4684, 0.7827, 0.5326, 0.7977]}, {"w": "to", "b": [0.5387, 0.7827, 0.5549, 0.7977]}, {"w": "work", "b": [0.561, 0.7827, 0.5993, 0.7977]}, {"w": "on", "b": [0.6055, 0.7827, 0.6246, 0.7977]}, {"w": "a", "b": [0.6307, 0.7827, 0.6398, 0.7977]}, {"w": "server", "b": [0.6459, 0.7827, 0.6925, 0.7977]}, {"w": "with", "b": [0.6987, 0.7827, 0.7339, 0.7977]}, {"w": "512", "b": [0.7398, 0.7827, 0.7671, 0.7977]}, {"w": "gigabytes", "b": [0.7732, 0.7827, 0.8469, 0.7977]}, {"w": "or", "b": [0.853, 0.7827, 0.8692, 0.7977]}, {"w": "even", "b": [0.1312, 0.8007, 0.1671, 0.8156]}, {"w": "one", "b": [0.1733, 0.8007, 0.201, 0.8156]}, {"w": "or", "b": [0.2071, 0.8007, 0.2236, 0.8156]}, {"w": "more", "b": [0.2297, 0.8007, 0.2698, 0.8156]}, {"w": "terabytes", "b": [0.2759, 0.8007, 0.3499, 0.8156]}, {"w": "of", "b": [0.3561, 0.8007, 0.3709, 0.8156]}, {"w": "RAM.", "b": [0.3771, 0.8007, 0.4266, 0.8156]}]}, {"id": "b_11", "type": "paragraph", "text": "8“Hidden Technical Debt in Machine Learning Systems” by Sculley et al. (2015).", "words": [{"w": "8“Hidden", "b": [0.1518, 0.8277, 0.2161, 0.8416]}, {"w": "Technical", "b": [0.2213, 0.8296, 0.2857, 0.8416]}, {"w": "Debt", "b": [0.291, 0.8296, 0.3247, 0.8416]}, {"w": "in", "b": [0.3299, 0.8296, 0.343, 0.8416]}, {"w": "Machine", "b": [0.3482, 0.8296, 0.4057, 0.8416]}, {"w": "Learning", "b": [0.4109, 0.8296, 0.4712, 0.8416]}, {"w": "Systems”", "b": [0.4765, 0.8296, 0.5394, 0.8416]}, {"w": "by", "b": [0.5446, 0.8296, 0.5611, 0.8416]}, {"w": "Sculley", "b": [0.5664, 0.8296, 0.6147, 0.8416]}, {"w": "et", "b": [0.6199, 0.8296, 0.633, 0.8416]}, {"w": "al.", "b": [0.6382, 0.8296, 0.6548, 0.8416]}, {"w": "(2015).", "b": [0.66, 0.8296, 0.7079, 0.8416]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 37", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "37", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 213, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "By reducing to a minimum the time needed to train a model, you can spend more time tweaking your model, testing data pre-processing ideas, feature engineering, neural network architectures, and other creative activities. The greatest benefit for the machine learning project lies in the human touch and intuition. The more you, as a human, can work instead of waiting, the higher the chances that your machine learning project will be a success.", "words": [{"w": "By", "b": [0.1312, 0.0881, 0.1545, 0.1031]}, {"w": "reducing", "b": [0.1618, 0.0881, 0.232, 0.1031]}, {"w": "to", "b": [0.2393, 0.0881, 0.256, 0.1031]}, {"w": "a", "b": [0.2634, 0.0881, 0.2728, 0.1031]}, {"w": "minimum", "b": [0.2801, 0.0881, 0.358, 0.1031]}, {"w": "the", "b": [0.3653, 0.0881, 0.3915, 0.1031]}, {"w": "time", "b": [0.3988, 0.0881, 0.4354, 0.1031]}, {"w": "needed", "b": [0.4428, 0.0881, 0.4993, 0.1031]}, {"w": "to", "b": [0.5066, 0.0881, 0.5233, 0.1031]}, {"w": "train", "b": [0.5307, 0.0881, 0.5705, 0.1031]}, {"w": "a", "b": [0.5778, 0.0881, 0.5872, 0.1031]}, {"w": "model,", "b": [0.5945, 0.0881, 0.6494, 0.1031]}, {"w": "you", "b": [0.657, 0.0881, 0.6863, 0.1031]}, {"w": "can", "b": [0.6937, 0.0881, 0.7219, 0.1031]}, {"w": "spend", "b": [0.7292, 0.0881, 0.7769, 0.1031]}, {"w": "more", "b": [0.7843, 0.0881, 0.8251, 0.1031]}, {"w": "time", "b": [0.8324, 0.0881, 0.869, 0.1031]}, {"w": "tweaking", "b": [0.1312, 0.106, 0.2023, 0.121]}, {"w": "your", "b": [0.2085, 0.106, 0.2444, 0.121]}, {"w": "model,", "b": [0.2505, 0.106, 0.3043, 0.121]}, {"w": "testing", "b": [0.3104, 0.106, 0.3648, 0.121]}, {"w": "data", "b": [0.3709, 0.106, 0.4067, 0.121]}, {"w": "pre-processing", "b": [0.4129, 0.106, 0.5273, 0.121]}, {"w": "ideas,", "b": [0.5335, 0.106, 0.5787, 0.121]}, {"w": "feature", "b": [0.5848, 0.106, 0.6406, 0.121]}, {"w": "engineering,", "b": [0.6468, 0.106, 0.7431, 0.121]}, {"w": "neural", "b": [0.7492, 0.106, 0.7995, 0.121]}, {"w": "network", "b": [0.8056, 0.106, 0.8696, 0.121]}, {"w": "architectures,", "b": [0.1312, 0.124, 0.2418, 0.1389]}, {"w": "and", "b": [0.2485, 0.124, 0.2789, 0.1389]}, {"w": "other", "b": [0.2855, 0.124, 0.3284, 0.1389]}, {"w": "creative", "b": [0.335, 0.124, 0.3989, 0.1389]}, {"w": "activities.", "b": [0.4055, 0.124, 0.4846, 0.1389]}, {"w": "The", "b": [0.4941, 0.124, 0.5265, 0.1389]}, {"w": "greatest", "b": [0.5331, 0.124, 0.5981, 0.1389]}, {"w": "benefit", "b": [0.6047, 0.124, 0.6607, 0.1389]}, {"w": "for", "b": [0.6673, 0.124, 0.6898, 0.1389]}, {"w": "the", "b": [0.6964, 0.124, 0.7226, 0.1389]}, {"w": "machine", "b": [0.7292, 0.124, 0.7966, 0.1389]}, {"w": "learning", "b": [0.8032, 0.124, 0.8692, 0.1389]}, {"w": "project", "b": [0.1312, 0.1419, 0.1873, 0.1569]}, {"w": "lies", "b": [0.1934, 0.1419, 0.219, 0.1569]}, {"w": "in", "b": [0.2251, 0.1419, 0.2404, 0.1569]}, {"w": "the", "b": [0.2465, 0.1419, 0.272, 0.1569]}, {"w": "human", "b": [0.2781, 0.1419, 0.3325, 0.1569]}, {"w": "touch", "b": [0.3387, 0.1419, 0.383, 0.1569]}, {"w": "and", "b": [0.3891, 0.1419, 0.4186, 0.1569]}, {"w": "intuition.", "b": [0.4248, 0.1419, 0.4985, 0.1569]}, {"w": "The", "b": [0.5067, 0.1419, 0.5383, 0.1569]}, {"w": "more", "b": [0.5444, 0.1419, 0.5841, 0.1569]}, {"w": "you,", "b": [0.5903, 0.1419, 0.6239, 0.1569]}, {"w": "as", "b": [0.63, 0.1419, 0.6464, 0.1569]}, {"w": "a", "b": [0.6526, 0.1419, 0.6617, 0.1569]}, {"w": "human,", "b": [0.6679, 0.1419, 0.7274, 0.1569]}, {"w": "can", "b": [0.7335, 0.1419, 0.761, 0.1569]}, {"w": "work", "b": [0.7672, 0.1419, 0.8059, 0.1569]}, {"w": "instead", "b": [0.812, 0.1419, 0.8691, 0.1569]}, {"w": "of", "b": [0.1312, 0.1599, 0.1461, 0.1748]}, {"w": "waiting,", "b": [0.1522, 0.1599, 0.2163, 0.1748]}, {"w": "the", "b": [0.2225, 0.1599, 0.2481, 0.1748]}, {"w": "higher", "b": [0.2543, 0.1599, 0.3046, 0.1748]}, {"w": "the", "b": [0.3107, 0.1599, 0.3364, 0.1748]}, {"w": "chances", "b": [0.3425, 0.1599, 0.4037, 0.1748]}, {"w": "that", "b": [0.4098, 0.1599, 0.4437, 0.1748]}, {"w": "your", "b": [0.4498, 0.1599, 0.4857, 0.1748]}, {"w": "machine", "b": [0.4919, 0.1599, 0.558, 0.1748]}, {"w": "learning", "b": [0.5642, 0.1599, 0.6288, 0.1748]}, {"w": "project", "b": [0.635, 0.1599, 0.6914, 0.1748]}, {"w": "will", "b": [0.6976, 0.1599, 0.7263, 0.1748]}, {"w": "be", "b": [0.7325, 0.1599, 0.7514, 0.1748]}, {"w": "a", "b": [0.7576, 0.1599, 0.7668, 0.1748]}, {"w": "success.", "b": [0.773, 0.1599, 0.8348, 0.1748]}]}, {"id": "b_1", "type": "paragraph", "text": "Reduce glue code to a minimum. This how Google engineers put it. Machine learning researchers tend to develop general purpose solutions as self-contained packages. A wide variety of these are available as open-source packages or from in-house code, proprietary packages, and cloud-based platforms. Using generic packages often results in a glue-code system design pattern, in which a massive amount of supporting code is written to get data into and out of general-purpose packages.", "words": [{"w": "Reduce", "b": [0.1312, 0.1868, 0.1911, 0.2018]}, {"w": "glue", "b": [0.1984, 0.1871, 0.2364, 0.2021]}, {"w": "code", "b": [0.2449, 0.1871, 0.287, 0.2021]}, {"w": "to", "b": [0.2943, 0.1868, 0.3111, 0.2018]}, {"w": "a", "b": [0.3184, 0.1868, 0.3278, 0.2018]}, {"w": "minimum.", "b": [0.3351, 0.1868, 0.4182, 0.2018]}, {"w": "This", "b": [0.43, 0.1868, 0.4667, 0.2018]}, {"w": "how", "b": [0.474, 0.1868, 0.507, 0.2018]}, {"w": "Google", "b": [0.5143, 0.1868, 0.5714, 0.2018]}, {"w": "engineers", "b": [0.5787, 0.1868, 0.6542, 0.2018]}, {"w": "put", "b": [0.6616, 0.1868, 0.6898, 0.2018]}, {"w": "it.", "b": [0.6971, 0.1868, 0.7149, 0.2018]}, {"w": "Machine", "b": [0.7267, 0.1868, 0.7957, 0.2018]}, {"w": "learning", "b": [0.803, 0.1868, 0.869, 0.2018]}, {"w": "researchers", "b": [0.1312, 0.2048, 0.2211, 0.2197]}, {"w": "tend", "b": [0.228, 0.2048, 0.2646, 0.2197]}, {"w": "to", "b": [0.2715, 0.2048, 0.2882, 0.2197]}, {"w": "develop", "b": [0.2951, 0.2048, 0.3568, 0.2197]}, {"w": "general", "b": [0.3637, 0.2048, 0.4224, 0.2197]}, {"w": "purpose", "b": [0.4292, 0.2048, 0.4937, 0.2197]}, {"w": "solutions", "b": [0.5006, 0.2048, 0.573, 0.2197]}, {"w": "as", "b": [0.5799, 0.2048, 0.5968, 0.2197]}, {"w": "self-contained", "b": [0.6036, 0.2048, 0.7157, 0.2197]}, {"w": "packages.", "b": [0.7226, 0.2048, 0.8001, 0.2197]}, {"w": "A", "b": [0.8105, 0.2048, 0.8246, 0.2197]}, {"w": "wide", "b": [0.8315, 0.2048, 0.8692, 0.2197]}, {"w": "variety", "b": [0.1308, 0.2227, 0.1868, 0.2377]}, {"w": "of", "b": [0.1939, 0.2227, 0.2091, 0.2377]}, {"w": "these", "b": [0.2162, 0.2227, 0.2581, 0.2377]}, {"w": "are", "b": [0.2652, 0.2227, 0.2904, 0.2377]}, {"w": "available", "b": [0.2974, 0.2227, 0.3686, 0.2377]}, {"w": "as", "b": [0.3757, 0.2227, 0.3925, 0.2377]}, {"w": "open-source", "b": [0.3996, 0.2227, 0.4965, 0.2377]}, {"w": "packages", "b": [0.5036, 0.2227, 0.5759, 0.2377]}, {"w": "or", "b": [0.583, 0.2227, 0.5998, 0.2377]}, {"w": "from", "b": [0.6069, 0.2227, 0.6451, 0.2377]}, {"w": "in-house", "b": [0.6522, 0.2227, 0.7203, 0.2377]}, {"w": "code,", "b": [0.7274, 0.2227, 0.7697, 0.2377]}, {"w": "proprietary", "b": [0.7771, 0.2227, 0.8698, 0.2377]}, {"w": "packages,", "b": [0.1312, 0.2406, 0.2088, 0.2556]}, {"w": "and", "b": [0.2156, 0.2406, 0.2459, 0.2556]}, {"w": "cloud-based", "b": [0.2526, 0.2406, 0.349, 0.2556]}, {"w": "platforms.", "b": [0.3557, 0.2406, 0.439, 0.2556]}, {"w": "Using", "b": [0.4488, 0.2406, 0.4955, 0.2556]}, {"w": "generic", "b": [0.5022, 0.2406, 0.5597, 0.2556]}, {"w": "packages", "b": [0.5664, 0.2406, 0.6387, 0.2556]}, {"w": "often", "b": [0.6454, 0.2406, 0.6867, 0.2556]}, {"w": "results", "b": [0.6934, 0.2406, 0.7471, 0.2556]}, {"w": "in", "b": [0.7538, 0.2406, 0.7695, 0.2556]}, {"w": "a", "b": [0.7762, 0.2406, 0.7856, 0.2556]}, {"w": "glue-code", "b": [0.7923, 0.2406, 0.8692, 0.2556]}, {"w": "system", "b": [0.1312, 0.2586, 0.1859, 0.2735]}, {"w": "design", "b": [0.1921, 0.2586, 0.2421, 0.2735]}, {"w": "pattern,", "b": [0.2482, 0.2586, 0.3125, 0.2735]}, {"w": "in", "b": [0.3186, 0.2586, 0.3339, 0.2735]}, {"w": "which", "b": [0.3401, 0.2586, 0.3864, 0.2735]}, {"w": "a", "b": [0.3926, 0.2586, 0.4017, 0.2735]}, {"w": "massive", "b": [0.4079, 0.2586, 0.4692, 0.2735]}, {"w": "amount", "b": [0.4753, 0.2586, 0.5359, 0.2735]}, {"w": "of", "b": [0.542, 0.2586, 0.5568, 0.2735]}, {"w": "supporting", "b": [0.563, 0.2586, 0.6492, 0.2735]}, {"w": "code", "b": [0.6554, 0.2586, 0.6915, 0.2735]}, {"w": "is", "b": [0.6977, 0.2586, 0.71, 0.2735]}, {"w": "written", "b": [0.7162, 0.2586, 0.7743, 0.2735]}, {"w": "to", "b": [0.7804, 0.2586, 0.7967, 0.2735]}, {"w": "get", "b": [0.8028, 0.2586, 0.8273, 0.2735]}, {"w": "data", "b": [0.8335, 0.2586, 0.8691, 0.2735]}, {"w": "into", "b": [0.1312, 0.2765, 0.1625, 0.2915]}, {"w": "and", "b": [0.1687, 0.2765, 0.1984, 0.2915]}, {"w": "out", "b": [0.2046, 0.2765, 0.2312, 0.2915]}, {"w": "of", "b": [0.2374, 0.2765, 0.2522, 0.2915]}, {"w": "general-purpose", "b": [0.2584, 0.2765, 0.3852, 0.2915]}, {"w": "packages.", "b": [0.3914, 0.2765, 0.4674, 0.2915]}]}, {"id": "b_2", "type": "paragraph", "text": "Glue code is costly in the long term. It tends to freeze a system to the peculiarities of a specific package. Testing alternatives may become prohibitively expensive. Using a generic package this way inhibits improvements. It becomes harder to take advantage of domain-specific properties, or to tweak the objective function, and to achieve a domain-specific goal. A mature system might become (at most) 5% machine learning code and (at least) 95% glue code. It may be less costly to create a clean native solution, rather than re-use a generic package.", "words": [{"w": "Glue", "b": [0.1312, 0.3035, 0.1686, 0.3184]}, {"w": "code", "b": [0.1734, 0.3035, 0.2091, 0.3184]}, {"w": "is", "b": [0.2139, 0.3035, 0.2261, 0.3184]}, {"w": "costly", "b": [0.2309, 0.3035, 0.2767, 0.3184]}, {"w": "in", "b": [0.2816, 0.3035, 0.2966, 0.3184]}, {"w": "the", "b": [0.3015, 0.3035, 0.3266, 0.3184]}, {"w": "long", "b": [0.3314, 0.3035, 0.3646, 0.3184]}, {"w": "term.", "b": [0.3694, 0.3035, 0.4117, 0.3184]}, {"w": "It", "b": [0.4194, 0.3035, 0.433, 0.3184]}, {"w": "tends", "b": [0.4378, 0.3035, 0.4801, 0.3184]}, {"w": "to", "b": [0.485, 0.3035, 0.501, 0.3184]}, {"w": "freeze", "b": [0.5059, 0.3035, 0.5507, 0.3184]}, {"w": "a", "b": [0.5555, 0.3035, 0.5645, 0.3184]}, {"w": "system", "b": [0.5694, 0.3035, 0.6233, 0.3184]}, {"w": "to", "b": [0.6282, 0.3035, 0.6442, 0.3184]}, {"w": "the", "b": [0.6491, 0.3035, 0.6742, 0.3184]}, {"w": "peculiarities", "b": [0.679, 0.3035, 0.7742, 0.3184]}, {"w": "of", "b": [0.779, 0.3035, 0.7936, 0.3184]}, {"w": "a", "b": [0.7984, 0.3035, 0.8074, 0.3184]}, {"w": "specific", "b": [0.8123, 0.3035, 0.8692, 0.3184]}, {"w": "package.", "b": [0.1312, 0.3214, 0.1997, 0.3364]}, {"w": "Testing", "b": [0.2079, 0.3214, 0.2668, 0.3364]}, {"w": "alternatives", "b": [0.273, 0.3214, 0.3662, 0.3364]}, {"w": "may", "b": [0.3723, 0.3214, 0.406, 0.3364]}, {"w": "become", "b": [0.4122, 0.3214, 0.472, 0.3364]}, {"w": "prohibitively", "b": [0.4781, 0.3214, 0.5799, 0.3364]}, {"w": "expensive.", "b": [0.5861, 0.3214, 0.668, 0.3364]}, {"w": "Using", "b": [0.6762, 0.3214, 0.7218, 0.3364]}, {"w": "a", "b": [0.728, 0.3214, 0.7371, 0.3364]}, {"w": "generic", "b": [0.7433, 0.3214, 0.7996, 0.3364]}, {"w": "package", "b": [0.8057, 0.3214, 0.8691, 0.3364]}, {"w": "this", "b": [0.1312, 0.3394, 0.1617, 0.3543]}, {"w": "way", "b": [0.1688, 0.3394, 0.2007, 0.3543]}, {"w": "inhibits", "b": [0.2079, 0.3394, 0.2697, 0.3543]}, {"w": "improvements.", "b": [0.2769, 0.3394, 0.3963, 0.3543]}, {"w": "It", "b": [0.4076, 0.3394, 0.4217, 0.3543]}, {"w": "becomes", "b": [0.4288, 0.3394, 0.4974, 0.3543]}, {"w": "harder", "b": [0.5046, 0.3394, 0.5581, 0.3543]}, {"w": "to", "b": [0.5652, 0.3394, 0.5819, 0.3543]}, {"w": "take", "b": [0.5891, 0.3394, 0.6236, 0.3543]}, {"w": "advantage", "b": [0.6308, 0.3394, 0.7135, 0.3543]}, {"w": "of", "b": [0.7206, 0.3394, 0.7358, 0.3543]}, {"w": "domain-specific", "b": [0.7429, 0.3394, 0.8691, 0.3543]}, {"w": "properties,", "b": [0.1312, 0.3573, 0.2188, 0.3723]}, {"w": "or", "b": [0.2267, 0.3573, 0.2434, 0.3723]}, {"w": "to", "b": [0.251, 0.3573, 0.2677, 0.3723]}, {"w": "tweak", "b": [0.2752, 0.3573, 0.3228, 0.3723]}, {"w": "the", "b": [0.3303, 0.3573, 0.3565, 0.3723]}, {"w": "objective", "b": [0.364, 0.3573, 0.4373, 0.3723]}, {"w": "function,", "b": [0.4448, 0.3573, 0.5175, 0.3723]}, {"w": "and", "b": [0.5253, 0.3573, 0.5557, 0.3723]}, {"w": "to", "b": [0.5632, 0.3573, 0.5799, 0.3723]}, {"w": "achieve", "b": [0.5874, 0.3573, 0.6466, 0.3723]}, {"w": "a", "b": [0.6541, 0.3573, 0.6635, 0.3723]}, {"w": "domain-specific", "b": [0.671, 0.3573, 0.7972, 0.3723]}, {"w": "goal.", "b": [0.8047, 0.3573, 0.8434, 0.3723]}, {"w": "A", "b": [0.8557, 0.3573, 0.8698, 0.3723]}, {"w": "mature", "b": [0.1312, 0.3752, 0.1893, 0.3902]}, {"w": "system", "b": [0.1954, 0.3752, 0.2511, 0.3902]}, {"w": "might", "b": [0.2572, 0.3752, 0.3043, 0.3902]}, {"w": "become", "b": [0.3105, 0.3752, 0.3711, 0.3902]}, {"w": "(at", "b": [0.3773, 0.3752, 0.4011, 0.3902]}, {"w": "most)", "b": [0.4073, 0.3752, 0.454, 0.3902]}, {"w": "5%", "b": [0.46, 0.3752, 0.4849, 0.3902]}, {"w": "machine", "b": [0.491, 0.3752, 0.5578, 0.3902]}, {"w": "learning", "b": [0.564, 0.3752, 0.6293, 0.3902]}, {"w": "code", "b": [0.6355, 0.3752, 0.6723, 0.3902]}, {"w": "and", "b": [0.6784, 0.3752, 0.7085, 0.3902]}, {"w": "(at", "b": [0.7146, 0.3752, 0.7385, 0.3902]}, {"w": "least)", "b": [0.7446, 0.3752, 0.7893, 0.3902]}, {"w": "95%", "b": [0.7953, 0.3752, 0.8295, 0.3902]}, {"w": "glue", "b": [0.8356, 0.3752, 0.8688, 0.3902]}, {"w": "code.", "b": [0.1312, 0.3932, 0.1736, 0.4082]}, {"w": "It", "b": [0.1835, 0.3932, 0.1976, 0.4082]}, {"w": "may", "b": [0.2043, 0.3932, 0.2388, 0.4082]}, {"w": "be", "b": [0.2455, 0.3932, 0.2648, 0.4082]}, {"w": "less", "b": [0.2715, 0.3932, 0.3, 0.4082]}, {"w": "costly", "b": [0.3067, 0.3932, 0.3544, 0.4082]}, {"w": "to", "b": [0.3611, 0.3932, 0.3778, 0.4082]}, {"w": "create", "b": [0.3845, 0.3932, 0.4338, 0.4082]}, {"w": "a", "b": [0.4405, 0.3932, 0.4499, 0.4082]}, {"w": "clean", "b": [0.4566, 0.3932, 0.4984, 0.4082]}, {"w": "native", "b": [0.5051, 0.3932, 0.5553, 0.4082]}, {"w": "solution,", "b": [0.562, 0.3932, 0.6322, 0.4082]}, {"w": "rather", "b": [0.6391, 0.3932, 0.6894, 0.4082]}, {"w": "than", "b": [0.6961, 0.3932, 0.7337, 0.4082]}, {"w": "re-use", "b": [0.7404, 0.3932, 0.7887, 0.4082]}, {"w": "a", "b": [0.7954, 0.3932, 0.8048, 0.4082]}, {"w": "generic", "b": [0.8115, 0.3932, 0.8691, 0.4082]}, {"w": "package.", "b": [0.1312, 0.4111, 0.1999, 0.4261]}]}, {"id": "b_3", "type": "paragraph", "text": "An important strategy for combating glue code is to wrap black-box machine learning packages into common APIs used by the entire organization. Infrastructure becomes more reusable and it reduces the cost of changing packages.", "words": [{"w": "An", "b": [0.1305, 0.4381, 0.1541, 0.453]}, {"w": "important", "b": [0.1587, 0.4381, 0.2381, 0.453]}, {"w": "strategy", "b": [0.2427, 0.4381, 0.3066, 0.453]}, {"w": "for", "b": [0.3112, 0.4381, 0.3329, 0.453]}, {"w": "combating", "b": [0.3374, 0.4381, 0.4193, 0.453]}, {"w": "glue", "b": [0.4238, 0.4381, 0.456, 0.453]}, {"w": "code", "b": [0.4606, 0.4381, 0.4962, 0.453]}, {"w": "is", "b": [0.5008, 0.4381, 0.513, 0.453]}, {"w": "to", "b": [0.5175, 0.4381, 0.5336, 0.453]}, {"w": "wrap", "b": [0.5382, 0.4381, 0.5774, 0.453]}, {"w": "black-box", "b": [0.5819, 0.4381, 0.6578, 0.453]}, {"w": "machine", "b": [0.6623, 0.4381, 0.7271, 0.453]}, {"w": "learning", "b": [0.7317, 0.4381, 0.7951, 0.453]}, {"w": "packages", "b": [0.7996, 0.4381, 0.8691, 0.453]}, {"w": "into", "b": [0.1312, 0.456, 0.1631, 0.471]}, {"w": "common", "b": [0.1692, 0.456, 0.2382, 0.471]}, {"w": "APIs", "b": [0.2443, 0.456, 0.2854, 0.471]}, {"w": "used", "b": [0.2916, 0.456, 0.3283, 0.471]}, {"w": "by", "b": [0.3344, 0.456, 0.3542, 0.471]}, {"w": "the", "b": [0.3604, 0.456, 0.3865, 0.471]}, {"w": "entire", "b": [0.3926, 0.456, 0.4392, 0.471]}, {"w": "organization.", "b": [0.4453, 0.456, 0.552, 0.471]}, {"w": "Infrastructure", "b": [0.5602, 0.456, 0.6743, 0.471]}, {"w": "becomes", "b": [0.6805, 0.456, 0.749, 0.471]}, {"w": "more", "b": [0.7551, 0.456, 0.7959, 0.471]}, {"w": "reusable", "b": [0.8021, 0.456, 0.8691, 0.471]}, {"w": "and", "b": [0.1312, 0.474, 0.161, 0.4889]}, {"w": "it", "b": [0.1671, 0.474, 0.1794, 0.4889]}, {"w": "reduces", "b": [0.1856, 0.474, 0.2452, 0.4889]}, {"w": "the", "b": [0.2514, 0.474, 0.277, 0.4889]}, {"w": "cost", "b": [0.2832, 0.474, 0.3151, 0.4889]}, {"w": "of", "b": [0.3212, 0.474, 0.3361, 0.4889]}, {"w": "changing", "b": [0.3422, 0.474, 0.4135, 0.4889]}, {"w": "packages.", "b": [0.4197, 0.474, 0.4957, 0.4889]}]}, {"id": "b_4", "type": "paragraph", "text": "It is recommended to learn to switch between at least two programming languages: one for fast prototyping (like Python) and one for fast implementation (like C++). Modern languages like Go, Kotlin, and Julia may work well for both cases, but at the time of the writing of this book, these two languages have not developed an ecosystem of machine learning projects, as compared to more established counterparts.", "words": [{"w": "It", "b": [0.1312, 0.5009, 0.1451, 0.5158]}, {"w": "is", "b": [0.1513, 0.5009, 0.1637, 0.5158]}, {"w": "recommended", "b": [0.1698, 0.5009, 0.2809, 0.5158]}, {"w": "to", "b": [0.287, 0.5009, 0.3035, 0.5158]}, {"w": "learn", "b": [0.3096, 0.5009, 0.3497, 0.5158]}, {"w": "to", "b": [0.3559, 0.5009, 0.3723, 0.5158]}, {"w": "switch", "b": [0.3785, 0.5009, 0.4294, 0.5158]}, {"w": "between", "b": [0.4356, 0.5009, 0.5008, 0.5158]}, {"w": "at", "b": [0.507, 0.5009, 0.5234, 0.5158]}, {"w": "least", "b": [0.5296, 0.5009, 0.5667, 0.5158]}, {"w": "two", "b": [0.5728, 0.5009, 0.6016, 0.5158]}, {"w": "programming", "b": [0.6077, 0.5009, 0.7157, 0.5158]}, {"w": "languages:", "b": [0.7218, 0.5009, 0.8052, 0.5158]}, {"w": "one", "b": [0.8134, 0.5009, 0.8411, 0.5158]}, {"w": "for", "b": [0.8473, 0.5009, 0.8694, 0.5158]}, {"w": "fast", "b": [0.1312, 0.5188, 0.16, 0.5338]}, {"w": "prototyping", "b": [0.1649, 0.5188, 0.2574, 0.5338]}, {"w": "(like", "b": [0.2624, 0.5188, 0.2966, 0.5338]}, {"w": "Python)", "b": [0.3015, 0.5188, 0.3666, 0.5338]}, {"w": "and", "b": [0.3715, 0.5188, 0.4007, 0.5338]}, {"w": "one", "b": [0.4056, 0.5188, 0.4328, 0.5338]}, {"w": "for", "b": [0.4377, 0.5188, 0.4594, 0.5338]}, {"w": "fast", "b": [0.4644, 0.5188, 0.4931, 0.5338]}, {"w": "implementation", "b": [0.4981, 0.5188, 0.6211, 0.5338]}, {"w": "(like", "b": [0.6261, 0.5188, 0.6603, 0.5338]}, {"w": "C++).", "b": [0.6652, 0.5188, 0.7185, 0.5338]}, {"w": "Modern", "b": [0.7263, 0.5188, 0.7876, 0.5338]}, {"w": "languages", "b": [0.7926, 0.5188, 0.8691, 0.5338]}, {"w": "like", "b": [0.1312, 0.5368, 0.1584, 0.5517]}, {"w": "Go,", "b": [0.1642, 0.5368, 0.1925, 0.5517]}, {"w": "Kotlin,", "b": [0.1984, 0.5368, 0.2532, 0.5517]}, {"w": "and", "b": [0.2591, 0.5368, 0.2883, 0.5517]}, {"w": "Julia", "b": [0.2942, 0.5368, 0.3326, 0.5517]}, {"w": "may", "b": [0.3385, 0.5368, 0.3716, 0.5517]}, {"w": "work", "b": [0.3775, 0.5368, 0.4157, 0.5517]}, {"w": "well", "b": [0.4216, 0.5368, 0.4522, 0.5517]}, {"w": "for", "b": [0.4581, 0.5368, 0.4798, 0.5517]}, {"w": "both", "b": [0.4857, 0.5368, 0.5224, 0.5517]}, {"w": "cases,", "b": [0.5283, 0.5368, 0.5727, 0.5517]}, {"w": "but", "b": [0.5786, 0.5368, 0.6058, 0.5517]}, {"w": "at", "b": [0.6116, 0.5368, 0.6277, 0.5517]}, {"w": "the", "b": [0.6336, 0.5368, 0.6587, 0.5517]}, {"w": "time", "b": [0.6646, 0.5368, 0.6998, 0.5517]}, {"w": "of", "b": [0.7057, 0.5368, 0.7202, 0.5517]}, {"w": "the", "b": [0.7261, 0.5368, 0.7513, 0.5517]}, {"w": "writing", "b": [0.7571, 0.5368, 0.8135, 0.5517]}, {"w": "of", "b": [0.8194, 0.5368, 0.8339, 0.5517]}, {"w": "this", "b": [0.8398, 0.5368, 0.8691, 0.5517]}, {"w": "book,", "b": [0.1312, 0.5547, 0.1753, 0.5697]}, {"w": "these", "b": [0.1815, 0.5547, 0.2221, 0.5697]}, {"w": "two", "b": [0.2282, 0.5547, 0.2565, 0.5697]}, {"w": "languages", "b": [0.2627, 0.5547, 0.3397, 0.5697]}, {"w": "have", "b": [0.3459, 0.5547, 0.3818, 0.5697]}, {"w": "not", "b": [0.388, 0.5547, 0.4143, 0.5697]}, {"w": "developed", "b": [0.4205, 0.5547, 0.499, 0.5697]}, {"w": "an", "b": [0.5051, 0.5547, 0.5244, 0.5697]}, {"w": "ecosystem", "b": [0.5305, 0.5547, 0.6102, 0.5697]}, {"w": "of", "b": [0.6164, 0.5547, 0.631, 0.5697]}, {"w": "machine", "b": [0.6372, 0.5547, 0.7025, 0.5697]}, {"w": "learning", "b": [0.7087, 0.5547, 0.7725, 0.5697]}, {"w": "projects,", "b": [0.7787, 0.5547, 0.8466, 0.5697]}, {"w": "as", "b": [0.8528, 0.5547, 0.8691, 0.5697]}, {"w": "compared", "b": [0.1312, 0.5727, 0.2092, 0.5876]}, {"w": "to", "b": [0.2154, 0.5727, 0.2318, 0.5876]}, {"w": "more", "b": [0.2379, 0.5727, 0.2779, 0.5876]}, {"w": "established", "b": [0.2841, 0.5727, 0.3725, 0.5876]}, {"w": "counterparts.", "b": [0.3787, 0.5727, 0.485, 0.5876]}]}, {"id": "b_5", "type": "paragraph", "text": "6.7.8 Test on Both Newer and Older Data", "words": [{"w": "6.7.8", "b": [0.1312, 0.6208, 0.1749, 0.6358]}, {"w": "Test", "b": [0.1961, 0.6208, 0.2354, 0.6358]}, {"w": "on", "b": [0.2425, 0.6208, 0.2649, 0.6358]}, {"w": "Both", "b": [0.272, 0.6208, 0.3177, 0.6358]}, {"w": "Newer", "b": [0.3248, 0.6208, 0.3843, 0.6358]}, {"w": "and", "b": [0.3914, 0.6208, 0.4253, 0.6358]}, {"w": "Older", "b": [0.4323, 0.6208, 0.4844, 0.6358]}, {"w": "Data", "b": [0.4915, 0.6208, 0.5367, 0.6358]}]}, {"id": "b_6", "type": "paragraph", "text": "If you used a data dump from some time ago to create training, validation, and test sets, observe how your model behaves with data collected before and after this period. If it’s radically worse, there’s a problem.", "words": [{"w": "If", "b": [0.1312, 0.6571, 0.1438, 0.672]}, {"w": "you", "b": [0.1504, 0.6571, 0.1797, 0.672]}, {"w": "used", "b": [0.1863, 0.6571, 0.223, 0.672]}, {"w": "a", "b": [0.2296, 0.6571, 0.239, 0.672]}, {"w": "data", "b": [0.2456, 0.6571, 0.2822, 0.672]}, {"w": "dump", "b": [0.2888, 0.6571, 0.3359, 0.672]}, {"w": "from", "b": [0.3425, 0.6571, 0.3807, 0.672]}, {"w": "some", "b": [0.3873, 0.6571, 0.4282, 0.672]}, {"w": "time", "b": [0.4348, 0.6571, 0.4714, 0.672]}, {"w": "ago", "b": [0.478, 0.6571, 0.5062, 0.672]}, {"w": "to", "b": [0.5128, 0.6571, 0.5296, 0.672]}, {"w": "create", "b": [0.5361, 0.6571, 0.5854, 0.672]}, {"w": "training,", "b": [0.592, 0.6571, 0.6621, 0.672]}, {"w": "validation,", "b": [0.6688, 0.6571, 0.7551, 0.672]}, {"w": "and", "b": [0.7619, 0.6571, 0.7922, 0.672]}, {"w": "test", "b": [0.7988, 0.6571, 0.8292, 0.672]}, {"w": "sets,", "b": [0.8358, 0.6571, 0.8716, 0.672]}, {"w": "observe", "b": [0.1312, 0.675, 0.1921, 0.69]}, {"w": "how", "b": [0.1993, 0.675, 0.2322, 0.69]}, {"w": "your", "b": [0.2394, 0.675, 0.2761, 0.69]}, {"w": "model", "b": [0.2833, 0.675, 0.3329, 0.69]}, {"w": "behaves", "b": [0.3401, 0.675, 0.4041, 0.69]}, {"w": "with", "b": [0.4113, 0.675, 0.4479, 0.69]}, {"w": "data", "b": [0.4551, 0.675, 0.4917, 0.69]}, {"w": "collected", "b": [0.4989, 0.675, 0.57, 0.69]}, {"w": "before", "b": [0.5772, 0.675, 0.6275, 0.69]}, {"w": "and", "b": [0.6347, 0.675, 0.665, 0.69]}, {"w": "after", "b": [0.6722, 0.675, 0.7104, 0.69]}, {"w": "this", "b": [0.7176, 0.675, 0.7481, 0.69]}, {"w": "period.", "b": [0.7553, 0.675, 0.8128, 0.69]}, {"w": "If", "b": [0.8242, 0.675, 0.8367, 0.69]}, {"w": "it’s", "b": [0.8439, 0.675, 0.8691, 0.69]}, {"w": "radically", "b": [0.1312, 0.693, 0.2005, 0.7079]}, {"w": "worse,", "b": [0.2067, 0.693, 0.2565, 0.7079]}, {"w": "there’s", "b": [0.2627, 0.693, 0.3162, 0.7079]}, {"w": "a", "b": [0.3223, 0.693, 0.3316, 0.7079]}, {"w": "problem.", "b": [0.3377, 0.693, 0.4085, 0.7079]}]}, {"id": "b_7", "type": "paragraph", "text": "Data leakage and distribution shift could be among the most likely reasons. Recall that data leakage is when information unavailable in the future or in the past was used to engineer a feature. Distribution shift is when properties of the data change over time.", "words": [{"w": "Data", "b": [0.1312, 0.7202, 0.1764, 0.7352]}, {"w": "leakage", "b": [0.1835, 0.7202, 0.2512, 0.7352]}, {"w": "and", "b": [0.2574, 0.7199, 0.2865, 0.7349]}, {"w": "distribution", "b": [0.2927, 0.7202, 0.4018, 0.7352]}, {"w": "shift", "b": [0.4089, 0.7202, 0.4496, 0.7352]}, {"w": "could", "b": [0.4557, 0.7199, 0.498, 0.7349]}, {"w": "be", "b": [0.5041, 0.7199, 0.5227, 0.7349]}, {"w": "among", "b": [0.5289, 0.7199, 0.5811, 0.7349]}, {"w": "the", "b": [0.5873, 0.7199, 0.6124, 0.7349]}, {"w": "most", "b": [0.6186, 0.7199, 0.6568, 0.7349]}, {"w": "likely", "b": [0.663, 0.7199, 0.7047, 0.7349]}, {"w": "reasons.", "b": [0.7108, 0.7199, 0.7734, 0.7349]}, {"w": "Recall", "b": [0.7816, 0.7199, 0.8301, 0.7349]}, {"w": "that", "b": [0.8363, 0.7199, 0.8694, 0.7349]}, {"w": "data", "b": [0.1312, 0.7379, 0.1664, 0.7528]}, {"w": "leakage", "b": [0.1719, 0.7379, 0.2297, 0.7528]}, {"w": "is", "b": [0.2352, 0.7379, 0.2474, 0.7528]}, {"w": "when", "b": [0.2529, 0.7379, 0.2941, 0.7528]}, {"w": "information", "b": [0.2997, 0.7379, 0.3917, 0.7528]}, {"w": "unavailable", "b": [0.3972, 0.7379, 0.4856, 0.7528]}, {"w": "in", "b": [0.4911, 0.7379, 0.5062, 0.7528]}, {"w": "the", "b": [0.5117, 0.7379, 0.5368, 0.7528]}, {"w": "future", "b": [0.5424, 0.7379, 0.5902, 0.7528]}, {"w": "or", "b": [0.5957, 0.7379, 0.6118, 0.7528]}, {"w": "in", "b": [0.6174, 0.7379, 0.6324, 0.7528]}, {"w": "the", "b": [0.638, 0.7379, 0.6631, 0.7528]}, {"w": "past", "b": [0.6686, 0.7379, 0.7019, 0.7528]}, {"w": "was", "b": [0.7074, 0.7379, 0.7361, 0.7528]}, {"w": "used", "b": [0.7417, 0.7379, 0.777, 0.7528]}, {"w": "to", "b": [0.7825, 0.7379, 0.7986, 0.7528]}, {"w": "engineer", "b": [0.8041, 0.7379, 0.8695, 0.7528]}, {"w": "a", "b": [0.1312, 0.7558, 0.1405, 0.7708]}, {"w": "feature.", "b": [0.1466, 0.7558, 0.2077, 0.7708]}, {"w": "Distribution", "b": [0.2159, 0.7558, 0.3142, 0.7708]}, {"w": "shift", "b": [0.3204, 0.7558, 0.3559, 0.7708]}, {"w": "is", "b": [0.362, 0.7558, 0.3744, 0.7708]}, {"w": "when", "b": [0.3806, 0.7558, 0.4226, 0.7708]}, {"w": "properties", "b": [0.4288, 0.7558, 0.5095, 0.7708]}, {"w": "of", "b": [0.5157, 0.7558, 0.5305, 0.7708]}, {"w": "the", "b": [0.5367, 0.7558, 0.5623, 0.7708]}, {"w": "data", "b": [0.5685, 0.7558, 0.6043, 0.7708]}, {"w": "change", "b": [0.6105, 0.7558, 0.6654, 0.7708]}, {"w": "over", "b": [0.6715, 0.7558, 0.7049, 0.7708]}, {"w": "time.", "b": [0.7111, 0.7558, 0.7521, 0.7708]}]}, {"id": "b_8", "type": "paragraph", "text": "6.7.9 More Data Beats Cleverer Algorithm", "words": [{"w": "6.7.9", "b": [0.1312, 0.804, 0.1749, 0.8189]}, {"w": "More", "b": [0.1961, 0.804, 0.2453, 0.8189]}, {"w": "Data", "b": [0.2524, 0.804, 0.2975, 0.8189]}, {"w": "Beats", "b": [0.3046, 0.804, 0.3564, 0.8189]}, {"w": "Cleverer", "b": [0.3634, 0.804, 0.4419, 0.8189]}, {"w": "Algorithm", "b": [0.449, 0.804, 0.5445, 0.8189]}]}, {"id": "b_9", "type": "paragraph", "text": "When confronted to insufficient model performance, to improve the performance of the model,", "words": [{"w": "When", "b": [0.1303, 0.8402, 0.177, 0.8552]}, {"w": "confronted", "b": [0.1825, 0.8402, 0.2659, 0.8552]}, {"w": "to", "b": [0.2714, 0.8402, 0.2875, 0.8552]}, {"w": "insufficient", "b": [0.2929, 0.8402, 0.378, 0.8552]}, {"w": "model", "b": [0.3834, 0.8402, 0.4311, 0.8552]}, {"w": "performance,", "b": [0.4366, 0.8402, 0.5392, 0.8552]}, {"w": "to", "b": [0.5448, 0.8402, 0.5609, 0.8552]}, {"w": "improve", "b": [0.5664, 0.8402, 0.6292, 0.8552]}, {"w": "the", "b": [0.6347, 0.8402, 0.6598, 0.8552]}, {"w": "performance", "b": [0.6653, 0.8402, 0.7628, 0.8552]}, {"w": "of", "b": [0.7683, 0.8402, 0.7829, 0.8552]}, {"w": "the", "b": [0.7883, 0.8402, 0.8135, 0.8552]}, {"w": "model,", "b": [0.8189, 0.8402, 0.8717, 0.8552]}]}, {"id": "b_10", "type": "paragraph", "text": "analysts are often tempted into crafting a more sophisticated learning algorithm or a pipeline.", "words": [{"w": "analysts", "b": [0.1312, 0.8582, 0.1953, 0.8731]}, {"w": "are", "b": [0.2009, 0.8582, 0.2251, 0.8731]}, {"w": "often", "b": [0.2308, 0.8582, 0.2705, 0.8731]}, {"w": "tempted", "b": [0.2762, 0.8582, 0.3415, 0.8731]}, {"w": "into", "b": [0.3472, 0.8582, 0.3778, 0.8731]}, {"w": "crafting", "b": [0.3835, 0.8582, 0.4444, 0.8731]}, {"w": "a", "b": [0.4501, 0.8582, 0.4591, 0.8731]}, {"w": "more", "b": [0.4648, 0.8582, 0.504, 0.8731]}, {"w": "sophisticated", "b": [0.5097, 0.8582, 0.6124, 0.8731]}, {"w": "learning", "b": [0.6181, 0.8582, 0.6815, 0.8731]}, {"w": "algorithm", "b": [0.6872, 0.8582, 0.7636, 0.8731]}, {"w": "or", "b": [0.7693, 0.8582, 0.7854, 0.8731]}, {"w": "a", "b": [0.7911, 0.8582, 0.8001, 0.8731]}, {"w": "pipeline.", "b": [0.8058, 0.8582, 0.8727, 0.8731]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 38", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "38", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 214, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "In practice, however, better results often come from getting more data, specifically, more labeled examples. If designed well, the data labeling process can allow a labeler to produce several thousand training examples daily. It can also be less expensive, compared to the expertise needed to invent a more advanced machine learning algorithm.", "words": [{"w": "In", "b": [0.1312, 0.0881, 0.1485, 0.1031]}, {"w": "practice,", "b": [0.1552, 0.0881, 0.2253, 0.1031]}, {"w": "however,", "b": [0.2322, 0.0881, 0.3034, 0.1031]}, {"w": "better", "b": [0.3102, 0.0881, 0.3599, 0.1031]}, {"w": "results", "b": [0.3666, 0.0881, 0.4202, 0.1031]}, {"w": "often", "b": [0.4269, 0.0881, 0.4682, 0.1031]}, {"w": "come", "b": [0.4749, 0.0881, 0.5168, 0.1031]}, {"w": "from", "b": [0.5234, 0.0881, 0.5617, 0.1031]}, {"w": "getting", "b": [0.5683, 0.0881, 0.6259, 0.1031]}, {"w": "more", "b": [0.6326, 0.0881, 0.6734, 0.1031]}, {"w": "data,", "b": [0.6801, 0.0881, 0.7219, 0.1031]}, {"w": "specifically,", "b": [0.7287, 0.0881, 0.8215, 0.1031]}, {"w": "more", "b": [0.8283, 0.0881, 0.8691, 0.1031]}, {"w": "labeled", "b": [0.1312, 0.106, 0.1883, 0.121]}, {"w": "examples.", "b": [0.1944, 0.106, 0.2731, 0.121]}, {"w": "If", "b": [0.2813, 0.106, 0.2936, 0.121]}, {"w": "designed", "b": [0.2998, 0.106, 0.3687, 0.121]}, {"w": "well,", "b": [0.3749, 0.106, 0.4113, 0.121]}, {"w": "the", "b": [0.4175, 0.106, 0.4432, 0.121]}, {"w": "data", "b": [0.4493, 0.106, 0.4853, 0.121]}, {"w": "labeling", "b": [0.4914, 0.106, 0.5546, 0.121]}, {"w": "process", "b": [0.5607, 0.106, 0.619, 0.121]}, {"w": "can", "b": [0.6252, 0.106, 0.6529, 0.121]}, {"w": "allow", "b": [0.6591, 0.106, 0.7006, 0.121]}, {"w": "a", "b": [0.7068, 0.106, 0.716, 0.121]}, {"w": "labeler", "b": [0.7222, 0.106, 0.7762, 0.121]}, {"w": "to", "b": [0.7823, 0.106, 0.7987, 0.121]}, {"w": "produce", "b": [0.8049, 0.106, 0.8691, 0.121]}, {"w": "several", "b": [0.1312, 0.124, 0.1869, 0.1389]}, {"w": "thousand", "b": [0.1939, 0.124, 0.2693, 0.1389]}, {"w": "training", "b": [0.2763, 0.124, 0.3412, 0.1389]}, {"w": "examples", "b": [0.3482, 0.124, 0.4231, 0.1389]}, {"w": "daily.", "b": [0.4301, 0.124, 0.4741, 0.1389]}, {"w": "It", "b": [0.4849, 0.124, 0.499, 0.1389]}, {"w": "can", "b": [0.506, 0.124, 0.5343, 0.1389]}, {"w": "also", "b": [0.5413, 0.124, 0.5728, 0.1389]}, {"w": "be", "b": [0.5798, 0.124, 0.5991, 0.1389]}, {"w": "less", "b": [0.6061, 0.124, 0.6346, 0.1389]}, {"w": "expensive,", "b": [0.6416, 0.124, 0.7254, 0.1389]}, {"w": "compared", "b": [0.7327, 0.124, 0.8122, 0.1389]}, {"w": "to", "b": [0.8192, 0.124, 0.836, 0.1389]}, {"w": "the", "b": [0.843, 0.124, 0.8691, 0.1389]}, {"w": "expertise", "b": [0.1312, 0.1419, 0.2032, 0.1569]}, {"w": "needed", "b": [0.2093, 0.1419, 0.2648, 0.1569]}, {"w": "to", "b": [0.2709, 0.1419, 0.2873, 0.1569]}, {"w": "invent", "b": [0.2934, 0.1419, 0.3427, 0.1569]}, {"w": "a", "b": [0.3488, 0.1419, 0.358, 0.1569]}, {"w": "more", "b": [0.3642, 0.1419, 0.4042, 0.1569]}, {"w": "advanced", "b": [0.4104, 0.1419, 0.4847, 0.1569]}, {"w": "machine", "b": [0.4909, 0.1419, 0.557, 0.1569]}, {"w": "learning", "b": [0.5632, 0.1419, 0.6278, 0.1569]}, {"w": "algorithm.", "b": [0.634, 0.1419, 0.7171, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "6.7.10 New Data Beats Cleverer Features", "words": [{"w": "6.7.10", "b": [0.1312, 0.1901, 0.1855, 0.205]}, {"w": "New", "b": [0.2067, 0.1901, 0.2483, 0.205]}, {"w": "Data", "b": [0.2554, 0.1901, 0.3006, 0.205]}, {"w": "Beats", "b": [0.3076, 0.1901, 0.3594, 0.205]}, {"w": "Cleverer", "b": [0.3665, 0.1901, 0.445, 0.205]}, {"w": "Features", "b": [0.452, 0.1901, 0.5305, 0.205]}]}, {"id": "b_2", "type": "paragraph", "text": "If, despite adding more training examples and designing clever features, the performance of your model plateaus, think about different information sources.", "words": [{"w": "If,", "b": [0.1312, 0.2264, 0.1487, 0.2413]}, {"w": "despite", "b": [0.1548, 0.2264, 0.2113, 0.2413]}, {"w": "adding", "b": [0.2174, 0.2264, 0.2717, 0.2413]}, {"w": "more", "b": [0.2779, 0.2264, 0.3179, 0.2413]}, {"w": "training", "b": [0.324, 0.2264, 0.3876, 0.2413]}, {"w": "examples", "b": [0.3937, 0.2264, 0.4671, 0.2413]}, {"w": "and", "b": [0.4732, 0.2264, 0.5029, 0.2413]}, {"w": "designing", "b": [0.5091, 0.2264, 0.584, 0.2413]}, {"w": "clever", "b": [0.5901, 0.2264, 0.6363, 0.2413]}, {"w": "features,", "b": [0.6424, 0.2264, 0.7108, 0.2413]}, {"w": "the", "b": [0.7169, 0.2264, 0.7425, 0.2413]}, {"w": "performance", "b": [0.7487, 0.2264, 0.8482, 0.2413]}, {"w": "of", "b": [0.8543, 0.2264, 0.8692, 0.2413]}, {"w": "your", "b": [0.1308, 0.2443, 0.1667, 0.2593]}, {"w": "model", "b": [0.1728, 0.2443, 0.2215, 0.2593]}, {"w": "plateaus,", "b": [0.2277, 0.2443, 0.2996, 0.2593]}, {"w": "think", "b": [0.3057, 0.2443, 0.3483, 0.2593]}, {"w": "about", "b": [0.3545, 0.2443, 0.4011, 0.2593]}, {"w": "different", "b": [0.4073, 0.2443, 0.474, 0.2593]}, {"w": "information", "b": [0.4801, 0.2443, 0.574, 0.2593]}, {"w": "sources.", "b": [0.5801, 0.2443, 0.643, 0.2593]}]}, {"id": "b_3", "type": "paragraph", "text": "For example, if you want to predict whether user U will like a news article, try to add historical data about the user U as features. Or cluster all the users, and use the information on the k-nearest users to user U as new features. This is a simpler approach compared to programming very complex features, or combining existing features in a complex way.", "words": [{"w": "For", "b": [0.1312, 0.2712, 0.1588, 0.2862]}, {"w": "example,", "b": [0.1666, 0.2712, 0.2393, 0.2862]}, {"w": "if", "b": [0.2475, 0.2712, 0.2585, 0.2862]}, {"w": "you", "b": [0.2664, 0.2712, 0.2957, 0.2862]}, {"w": "want", "b": [0.3035, 0.2712, 0.3432, 0.2862]}, {"w": "to", "b": [0.3511, 0.2712, 0.3678, 0.2862]}, {"w": "predict", "b": [0.3756, 0.2712, 0.4332, 0.2862]}, {"w": "whether", "b": [0.4411, 0.2712, 0.507, 0.2862]}, {"w": "user", "b": [0.5149, 0.2712, 0.5485, 0.2862]}, {"w": "U", "b": [0.5562, 0.2715, 0.5688, 0.2865]}, {"w": "will", "b": [0.5786, 0.2712, 0.6079, 0.2862]}, {"w": "like", "b": [0.6157, 0.2712, 0.644, 0.2862]}, {"w": "a", "b": [0.6518, 0.2712, 0.6612, 0.2862]}, {"w": "news", "b": [0.669, 0.2712, 0.7089, 0.2862]}, {"w": "article,", "b": [0.7167, 0.2712, 0.7733, 0.2862]}, {"w": "try", "b": [0.7815, 0.2712, 0.8062, 0.2862]}, {"w": "to", "b": [0.814, 0.2712, 0.8307, 0.2862]}, {"w": "add", "b": [0.8385, 0.2712, 0.8689, 0.2862]}, {"w": "historical", "b": [0.1312, 0.2892, 0.2038, 0.3041]}, {"w": "data", "b": [0.2096, 0.2892, 0.2447, 0.3041]}, {"w": "about", "b": [0.2506, 0.2892, 0.2963, 0.3041]}, {"w": "the", "b": [0.3021, 0.2892, 0.3272, 0.3041]}, {"w": "user", "b": [0.3331, 0.2892, 0.3654, 0.3041]}, {"w": "U", "b": [0.3711, 0.2895, 0.3837, 0.3044]}, {"w": "as", "b": [0.3915, 0.2892, 0.4077, 0.3041]}, {"w": "features.", "b": [0.4135, 0.2892, 0.4805, 0.3041]}, {"w": "Or", "b": [0.4886, 0.2892, 0.5098, 0.3041]}, {"w": "cluster", "b": [0.5156, 0.2892, 0.568, 0.3041]}, {"w": "all", "b": [0.5738, 0.2892, 0.5929, 0.3041]}, {"w": "the", "b": [0.5988, 0.2892, 0.6239, 0.3041]}, {"w": "users,", "b": [0.6297, 0.2892, 0.6742, 0.3041]}, {"w": "and", "b": [0.6801, 0.2892, 0.7092, 0.3041]}, {"w": "use", "b": [0.715, 0.2892, 0.7403, 0.3041]}, {"w": "the", "b": [0.7461, 0.2892, 0.7712, 0.3041]}, {"w": "information", "b": [0.777, 0.2892, 0.869, 0.3041]}, {"w": "on", "b": [0.1312, 0.3071, 0.1511, 0.3221]}, {"w": "the", "b": [0.1573, 0.3071, 0.1835, 0.3221]}, {"w": "k-nearest", "b": [0.1897, 0.3071, 0.2649, 0.3224]}, {"w": "users", "b": [0.2711, 0.3071, 0.3122, 0.3221]}, {"w": "to", "b": [0.3184, 0.3071, 0.3352, 0.3221]}, {"w": "user", "b": [0.3414, 0.3071, 0.375, 0.3221]}, {"w": "U", "b": [0.3812, 0.3074, 0.3938, 0.3224]}, {"w": "as", "b": [0.402, 0.3071, 0.4188, 0.3221]}, {"w": "new", "b": [0.4251, 0.3071, 0.4575, 0.3221]}, {"w": "features.", "b": [0.4637, 0.3071, 0.5335, 0.3221]}, {"w": "This", "b": [0.5419, 0.3071, 0.5786, 0.3221]}, {"w": "is", "b": [0.5849, 0.3071, 0.5975, 0.3221]}, {"w": "a", "b": [0.6037, 0.3071, 0.6132, 0.3221]}, {"w": "simpler", "b": [0.6194, 0.3071, 0.6792, 0.3221]}, {"w": "approach", "b": [0.6854, 0.3071, 0.7602, 0.3221]}, {"w": "compared", "b": [0.7665, 0.3071, 0.846, 0.3221]}, {"w": "to", "b": [0.8522, 0.3071, 0.869, 0.3221]}, {"w": "programming", "b": [0.1312, 0.3251, 0.239, 0.34]}, {"w": "very", "b": [0.2451, 0.3251, 0.2795, 0.34]}, {"w": "complex", "b": [0.2857, 0.3251, 0.3518, 0.34]}, {"w": "features,", "b": [0.358, 0.3251, 0.4263, 0.34]}, {"w": "or", "b": [0.4325, 0.3251, 0.4489, 0.34]}, {"w": "combining", "b": [0.4551, 0.3251, 0.5376, 0.34]}, {"w": "existing", "b": [0.5438, 0.3251, 0.6059, 0.34]}, {"w": "features", "b": [0.6121, 0.3251, 0.6753, 0.34]}, {"w": "in", "b": [0.6815, 0.3251, 0.6969, 0.34]}, {"w": "a", "b": [0.703, 0.3251, 0.7122, 0.34]}, {"w": "complex", "b": [0.7184, 0.3251, 0.7845, 0.34]}, {"w": "way.", "b": [0.7907, 0.3251, 0.8255, 0.34]}]}, {"id": "b_4", "type": "paragraph", "text": "6.7.11 Embrace Tiny Progress", "words": [{"w": "6.7.11", "b": [0.1312, 0.3732, 0.1855, 0.3882]}, {"w": "Embrace", "b": [0.2067, 0.3732, 0.2877, 0.3882]}, {"w": "Tiny", "b": [0.2948, 0.3732, 0.3378, 0.3882]}, {"w": "Progress", "b": [0.3449, 0.3732, 0.4246, 0.3882]}]}, {"id": "b_5", "type": "paragraph", "text": "Many tiny improvements to your model may give the expected result faster than looking for one revolutionary idea.", "words": [{"w": "Many", "b": [0.1312, 0.4095, 0.1763, 0.4245]}, {"w": "tiny", "b": [0.1825, 0.4095, 0.2139, 0.4245]}, {"w": "improvements", "b": [0.22, 0.4095, 0.3306, 0.4245]}, {"w": "to", "b": [0.3368, 0.4095, 0.353, 0.4245]}, {"w": "your", "b": [0.3591, 0.4095, 0.3946, 0.4245]}, {"w": "model", "b": [0.4008, 0.4095, 0.4489, 0.4245]}, {"w": "may", "b": [0.4551, 0.4095, 0.4885, 0.4245]}, {"w": "give", "b": [0.4946, 0.4095, 0.526, 0.4245]}, {"w": "the", "b": [0.5322, 0.4095, 0.5575, 0.4245]}, {"w": "expected", "b": [0.5637, 0.4095, 0.6336, 0.4245]}, {"w": "result", "b": [0.6398, 0.4095, 0.6845, 0.4245]}, {"w": "faster", "b": [0.6907, 0.4095, 0.7349, 0.4245]}, {"w": "than", "b": [0.7411, 0.4095, 0.7776, 0.4245]}, {"w": "looking", "b": [0.7837, 0.4095, 0.8415, 0.4245]}, {"w": "for", "b": [0.8476, 0.4095, 0.8694, 0.4245]}, {"w": "one", "b": [0.1312, 0.4274, 0.1589, 0.4424]}, {"w": "revolutionary", "b": [0.1651, 0.4274, 0.2723, 0.4424]}, {"w": "idea.", "b": [0.2785, 0.4274, 0.3164, 0.4424]}]}, {"id": "b_6", "type": "paragraph", "text": "Furthermore, by trying different ideas, the analyst gets to know the data better, which might indeed help in finding that revolutionary idea.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.4544, 0.2351, 0.4693]}, {"w": "by", "b": [0.2411, 0.4544, 0.2602, 0.4693]}, {"w": "trying", "b": [0.2661, 0.4544, 0.3138, 0.4693]}, {"w": "different", "b": [0.3198, 0.4544, 0.3851, 0.4693]}, {"w": "ideas,", "b": [0.391, 0.4544, 0.4354, 0.4693]}, {"w": "the", "b": [0.4413, 0.4544, 0.4664, 0.4693]}, {"w": "analyst", "b": [0.4724, 0.4544, 0.5292, 0.4693]}, {"w": "gets", "b": [0.5351, 0.4544, 0.5664, 0.4693]}, {"w": "to", "b": [0.5723, 0.4544, 0.5884, 0.4693]}, {"w": "know", "b": [0.5943, 0.4544, 0.6355, 0.4693]}, {"w": "the", "b": [0.6414, 0.4544, 0.6665, 0.4693]}, {"w": "data", "b": [0.6724, 0.4544, 0.7076, 0.4693]}, {"w": "better,", "b": [0.7135, 0.4544, 0.7663, 0.4693]}, {"w": "which", "b": [0.7723, 0.4544, 0.818, 0.4693]}, {"w": "might", "b": [0.8239, 0.4544, 0.8696, 0.4693]}, {"w": "indeed", "b": [0.1312, 0.4723, 0.1836, 0.4873]}, {"w": "help", "b": [0.1897, 0.4723, 0.2236, 0.4873]}, {"w": "in", "b": [0.2297, 0.4723, 0.2451, 0.4873]}, {"w": "finding", "b": [0.2512, 0.4723, 0.3066, 0.4873]}, {"w": "that", "b": [0.3128, 0.4723, 0.3466, 0.4873]}, {"w": "revolutionary", "b": [0.3528, 0.4723, 0.46, 0.4873]}, {"w": "idea.", "b": [0.4662, 0.4723, 0.5041, 0.4873]}]}, {"id": "b_7", "type": "paragraph", "text": "6.7.12 Facilitate Reproducibility", "words": [{"w": "6.7.12", "b": [0.1312, 0.5205, 0.1855, 0.5354]}, {"w": "Facilitate", "b": [0.2067, 0.5205, 0.2923, 0.5354]}, {"w": "Reproducibility", "b": [0.2993, 0.5205, 0.444, 0.5354]}]}, {"id": "b_8", "type": "paragraph", "text": "Most machine learning algorithms are stochastic. For example, when we train a neural network, we initialize model parameters randomly; the minibatch stochastic gradient descent generates minibatches randomly; the decision trees in a random forest are built randomly; when we shuffle examples before splitting the data into three sets, we do it randomly; and so on. This means that when you train a model on the same data twice, you might end up having two different models. In order to facilitate reproducibility, it’s recommended to set the value of the random seed used to initialize the pseudorandom number generator. If your random seed remains the same, then, if your data doesn’t change, you will obtain exactly the same model each time you train.", "words": [{"w": "Most", "b": [0.1312, 0.5567, 0.1727, 0.5717]}, {"w": "machine", "b": [0.1805, 0.5567, 0.248, 0.5717]}, {"w": "learning", "b": [0.2558, 0.5567, 0.3217, 0.5717]}, {"w": "algorithms", "b": [0.3296, 0.5567, 0.4165, 0.5717]}, {"w": "are", "b": [0.4244, 0.5567, 0.4495, 0.5717]}, {"w": "stochastic.", "b": [0.4574, 0.5567, 0.5433, 0.5717]}, {"w": "For", "b": [0.5566, 0.5567, 0.5841, 0.5717]}, {"w": "example,", "b": [0.592, 0.5567, 0.6646, 0.5717]}, {"w": "when", "b": [0.6729, 0.5567, 0.7158, 0.5717]}, {"w": "we", "b": [0.7236, 0.5567, 0.7451, 0.5717]}, {"w": "train", "b": [0.7529, 0.5567, 0.7927, 0.5717]}, {"w": "a", "b": [0.8005, 0.5567, 0.8099, 0.5717]}, {"w": "neural", "b": [0.8178, 0.5567, 0.8691, 0.5717]}, {"w": "network,", "b": [0.1312, 0.5747, 0.1992, 0.5896]}, {"w": "we", "b": [0.2054, 0.5747, 0.226, 0.5896]}, {"w": "initialize", "b": [0.2322, 0.5747, 0.2997, 0.5896]}, {"w": "model", "b": [0.3058, 0.5747, 0.3536, 0.5896]}, {"w": "parameters", "b": [0.3598, 0.5747, 0.4476, 0.5896]}, {"w": "randomly;", "b": [0.4538, 0.5747, 0.5339, 0.5896]}, {"w": "the", "b": [0.54, 0.5747, 0.5652, 0.5896]}, {"w": "minibatch", "b": [0.5714, 0.5747, 0.6504, 0.5896]}, {"w": "stochastic", "b": [0.6565, 0.5747, 0.7343, 0.5896]}, {"w": "gradient", "b": [0.7404, 0.5747, 0.8054, 0.5896]}, {"w": "descent", "b": [0.8116, 0.5747, 0.8696, 0.5896]}, {"w": "generates", "b": [0.1312, 0.5926, 0.2076, 0.6076]}, {"w": "minibatches", "b": [0.2137, 0.5926, 0.3115, 0.6076]}, {"w": "randomly;", "b": [0.3176, 0.5926, 0.4006, 0.6076]}, {"w": "the", "b": [0.4068, 0.5926, 0.4329, 0.6076]}, {"w": "decision", "b": [0.439, 0.5926, 0.5038, 0.6076]}, {"w": "trees", "b": [0.51, 0.5926, 0.5487, 0.6076]}, {"w": "in", "b": [0.5549, 0.5926, 0.5705, 0.6076]}, {"w": "a", "b": [0.5767, 0.5926, 0.586, 0.6076]}, {"w": "random", "b": [0.5922, 0.5926, 0.6548, 0.6076]}, {"w": "forest", "b": [0.661, 0.5926, 0.7065, 0.6076]}, {"w": "are", "b": [0.7127, 0.5926, 0.7378, 0.6076]}, {"w": "built", "b": [0.7439, 0.5926, 0.7825, 0.6076]}, {"w": "randomly;", "b": [0.7887, 0.5926, 0.8717, 0.6076]}, {"w": "when", "b": [0.1306, 0.6106, 0.1732, 0.6255]}, {"w": "we", "b": [0.1794, 0.6106, 0.2008, 0.6255]}, {"w": "shuffle", "b": [0.2069, 0.6106, 0.2585, 0.6255]}, {"w": "examples", "b": [0.2647, 0.6106, 0.3392, 0.6255]}, {"w": "before", "b": [0.3454, 0.6106, 0.3954, 0.6255]}, {"w": "splitting", "b": [0.4016, 0.6106, 0.4694, 0.6255]}, {"w": "the", "b": [0.4755, 0.6106, 0.5015, 0.6255]}, {"w": "data", "b": [0.5077, 0.6106, 0.5441, 0.6255]}, {"w": "into", "b": [0.5503, 0.6106, 0.5821, 0.6255]}, {"w": "three", "b": [0.5882, 0.6106, 0.6299, 0.6255]}, {"w": "sets,", "b": [0.6361, 0.6106, 0.6717, 0.6255]}, {"w": "we", "b": [0.6779, 0.6106, 0.6992, 0.6255]}, {"w": "do", "b": [0.7054, 0.6106, 0.7251, 0.6255]}, {"w": "it", "b": [0.7313, 0.6106, 0.7438, 0.6255]}, {"w": "randomly;", "b": [0.75, 0.6106, 0.8328, 0.6255]}, {"w": "and", "b": [0.8389, 0.6106, 0.8691, 0.6255]}, {"w": "so", "b": [0.1312, 0.6285, 0.1481, 0.6435]}, {"w": "on.", "b": [0.1552, 0.6285, 0.1803, 0.6435]}, {"w": "This", "b": [0.1913, 0.6285, 0.2281, 0.6435]}, {"w": "means", "b": [0.2351, 0.6285, 0.2865, 0.6435]}, {"w": "that", "b": [0.2936, 0.6285, 0.3281, 0.6435]}, {"w": "when", "b": [0.3352, 0.6285, 0.3781, 0.6435]}, {"w": "you", "b": [0.3852, 0.6285, 0.4145, 0.6435]}, {"w": "train", "b": [0.4216, 0.6285, 0.4614, 0.6435]}, {"w": "a", "b": [0.4685, 0.6285, 0.4779, 0.6435]}, {"w": "model", "b": [0.485, 0.6285, 0.5347, 0.6435]}, {"w": "on", "b": [0.5418, 0.6285, 0.5616, 0.6435]}, {"w": "the", "b": [0.5687, 0.6285, 0.5949, 0.6435]}, {"w": "same", "b": [0.602, 0.6285, 0.6429, 0.6435]}, {"w": "data", "b": [0.65, 0.6285, 0.6866, 0.6435]}, {"w": "twice,", "b": [0.6937, 0.6285, 0.7413, 0.6435]}, {"w": "you", "b": [0.7486, 0.6285, 0.7779, 0.6435]}, {"w": "might", "b": [0.785, 0.6285, 0.8326, 0.6435]}, {"w": "end", "b": [0.8397, 0.6285, 0.869, 0.6435]}, {"w": "up", "b": [0.1312, 0.6465, 0.1521, 0.6614]}, {"w": "having", "b": [0.1583, 0.6465, 0.2126, 0.6614]}, {"w": "two", "b": [0.2187, 0.6465, 0.248, 0.6614]}, {"w": "different", "b": [0.2541, 0.6465, 0.322, 0.6614]}, {"w": "models.", "b": [0.3282, 0.6465, 0.3904, 0.6614]}, {"w": "In", "b": [0.3986, 0.6465, 0.4158, 0.6614]}, {"w": "order", "b": [0.422, 0.6465, 0.4649, 0.6614]}, {"w": "to", "b": [0.4711, 0.6465, 0.4878, 0.6614]}, {"w": "facilitate", "b": [0.4939, 0.6465, 0.5654, 0.6614]}, {"w": "reproducibility,", "b": [0.5716, 0.6465, 0.696, 0.6614]}, {"w": "it’s", "b": [0.7021, 0.6465, 0.7273, 0.6614]}, {"w": "recommended", "b": [0.7335, 0.6465, 0.8463, 0.6614]}, {"w": "to", "b": [0.8524, 0.6465, 0.8691, 0.6614]}, {"w": "set", "b": [0.1312, 0.6644, 0.1544, 0.6794]}, {"w": "the", "b": [0.1607, 0.6644, 0.1869, 0.6794]}, {"w": "value", "b": [0.1933, 0.6644, 0.2356, 0.6794]}, {"w": "of", "b": [0.242, 0.6644, 0.2572, 0.6794]}, {"w": "the", "b": [0.2636, 0.6644, 0.2897, 0.6794]}, {"w": "random", "b": [0.296, 0.6647, 0.3669, 0.6797]}, {"w": "seed", "b": [0.3742, 0.6647, 0.4138, 0.6797]}, {"w": "used", "b": [0.4202, 0.6644, 0.4569, 0.6794]}, {"w": "to", "b": [0.4633, 0.6644, 0.48, 0.6794]}, {"w": "initialize", "b": [0.4864, 0.6644, 0.5565, 0.6794]}, {"w": "the", "b": [0.5629, 0.6644, 0.589, 0.6794]}, {"w": "pseudorandom", "b": [0.5954, 0.6644, 0.7148, 0.6794]}, {"w": "number", "b": [0.7212, 0.6644, 0.7835, 0.6794]}, {"w": "generator.", "b": [0.7898, 0.6644, 0.8726, 0.6794]}, {"w": "If", "b": [0.1312, 0.6824, 0.1438, 0.6973]}, {"w": "your", "b": [0.1503, 0.6824, 0.1869, 0.6973]}, {"w": "random", "b": [0.1934, 0.6824, 0.2562, 0.6973]}, {"w": "seed", "b": [0.2627, 0.6824, 0.2974, 0.6973]}, {"w": "remains", "b": [0.3038, 0.6824, 0.3678, 0.6973]}, {"w": "the", "b": [0.3743, 0.6824, 0.4004, 0.6973]}, {"w": "same,", "b": [0.4069, 0.6824, 0.4531, 0.6973]}, {"w": "then,", "b": [0.4596, 0.6824, 0.5015, 0.6973]}, {"w": "if", "b": [0.5081, 0.6824, 0.519, 0.6973]}, {"w": "your", "b": [0.5255, 0.6824, 0.5622, 0.6973]}, {"w": "data", "b": [0.5687, 0.6824, 0.6053, 0.6973]}, {"w": "doesn’t", "b": [0.6118, 0.6824, 0.671, 0.6973]}, {"w": "change,", "b": [0.6775, 0.6824, 0.7387, 0.6973]}, {"w": "you", "b": [0.7453, 0.6824, 0.7745, 0.6973]}, {"w": "will", "b": [0.781, 0.6824, 0.8103, 0.6973]}, {"w": "obtain", "b": [0.8168, 0.6824, 0.8691, 0.6973]}, {"w": "exactly", "b": [0.1312, 0.7003, 0.1887, 0.7153]}, {"w": "the", "b": [0.1948, 0.7003, 0.2205, 0.7153]}, {"w": "same", "b": [0.2266, 0.7003, 0.2667, 0.7153]}, {"w": "model", "b": [0.2728, 0.7003, 0.3215, 0.7153]}, {"w": "each", "b": [0.3277, 0.7003, 0.3631, 0.7153]}, {"w": "time", "b": [0.3692, 0.7003, 0.4051, 0.7153]}, {"w": "you", "b": [0.4113, 0.7003, 0.44, 0.7153]}, {"w": "train.", "b": [0.4461, 0.7003, 0.4903, 0.7153]}]}, {"id": "b_9", "type": "paragraph", "text": "The random seed can be set as np.random.seed(15) (in NumPy and scikit-learn), tf.random.set_seed(15) in TensorFlow, torch.manual_seed(15) (in PyTorch), and set.seed(15) (in R). The seed value doesn’t matter as long as it remains constant.", "words": [{"w": "The", "b": [0.1306, 0.7272, 0.163, 0.7422]}, {"w": "random", "b": [0.1748, 0.7272, 0.2376, 0.7422]}, {"w": "seed", "b": [0.2494, 0.7272, 0.284, 0.7422]}, {"w": "can", "b": [0.2958, 0.7272, 0.324, 0.7422]}, {"w": "be", "b": [0.3358, 0.7272, 0.3552, 0.7422]}, {"w": "set", "b": [0.367, 0.7272, 0.3901, 0.7422]}, {"w": "as", "b": [0.4019, 0.7272, 0.4187, 0.7422]}, {"w": "np.random.seed(15)", "b": [0.4304, 0.7283, 0.6047, 0.7432]}, {"w": "(in", "b": [0.6165, 0.7272, 0.6395, 0.7422]}, {"w": "NumPy", "b": [0.6513, 0.7272, 0.7143, 0.7422]}, {"w": "and", "b": [0.7261, 0.7272, 0.7565, 0.7422]}, {"w": "scikit-learn),", "b": [0.7682, 0.7272, 0.8714, 0.7422]}, {"w": "tf.random.set_seed(15)", "b": [0.1312, 0.7462, 0.3443, 0.7612]}, {"w": "in", "b": [0.3555, 0.7452, 0.3712, 0.7601]}, {"w": "TensorFlow,", "b": [0.3823, 0.7452, 0.4826, 0.7601]}, {"w": "torch.manual_seed(15)", "b": [0.495, 0.7462, 0.6984, 0.7612]}, {"w": "(in", "b": [0.7095, 0.7452, 0.7325, 0.7601]}, {"w": "PyTorch),", "b": [0.7437, 0.7452, 0.8261, 0.7601]}, {"w": "and", "b": [0.8385, 0.7452, 0.8688, 0.7601]}, {"w": "set.seed(15)", "b": [0.1312, 0.7642, 0.2475, 0.7791]}, {"w": "(in", "b": [0.2536, 0.7631, 0.2762, 0.7781]}, {"w": "R).", "b": [0.2823, 0.7631, 0.3082, 0.7781]}, {"w": "The", "b": [0.3144, 0.7631, 0.3462, 0.7781]}, {"w": "seed", "b": [0.3523, 0.7631, 0.3863, 0.7781]}, {"w": "value", "b": [0.3924, 0.7631, 0.4339, 0.7781]}, {"w": "doesn’t", "b": [0.4401, 0.7631, 0.4981, 0.7781]}, {"w": "matter", "b": [0.5043, 0.7631, 0.5587, 0.7781]}, {"w": "as", "b": [0.5648, 0.7631, 0.5813, 0.7781]}, {"w": "long", "b": [0.5875, 0.7631, 0.6213, 0.7781]}, {"w": "as", "b": [0.6275, 0.7631, 0.644, 0.7781]}, {"w": "it", "b": [0.6501, 0.7631, 0.6624, 0.7781]}, {"w": "remains", "b": [0.6686, 0.7631, 0.7313, 0.7781]}, {"w": "constant.", "b": [0.7374, 0.7631, 0.8109, 0.7781]}]}, {"id": "b_10", "type": "paragraph", "text": "Even if a machine learning framework allows us to set the value of the random seed, there’s no guarantee that the code of the framework that uses randomization doesn’t change between versions of the framework. For reproducibility, each project’s dependencies should be isolated. It can be done in many ways: either by using tools such as virtualenv in Python and Packrat", "words": [{"w": "Even", "b": [0.1312, 0.7901, 0.1713, 0.805]}, {"w": "if", "b": [0.1774, 0.7901, 0.1881, 0.805]}, {"w": "a", "b": [0.1943, 0.7901, 0.2034, 0.805]}, {"w": "machine", "b": [0.2096, 0.7901, 0.2754, 0.805]}, {"w": "learning", "b": [0.2815, 0.7901, 0.3459, 0.805]}, {"w": "framework", "b": [0.352, 0.7901, 0.4363, 0.805]}, {"w": "allows", "b": [0.4424, 0.7901, 0.4909, 0.805]}, {"w": "us", "b": [0.4971, 0.7901, 0.5145, 0.805]}, {"w": "to", "b": [0.5207, 0.7901, 0.537, 0.805]}, {"w": "set", "b": [0.5431, 0.7901, 0.5657, 0.805]}, {"w": "the", "b": [0.5718, 0.7901, 0.5973, 0.805]}, {"w": "value", "b": [0.6034, 0.7901, 0.6448, 0.805]}, {"w": "of", "b": [0.6509, 0.7901, 0.6657, 0.805]}, {"w": "the", "b": [0.6718, 0.7901, 0.6973, 0.805]}, {"w": "random", "b": [0.7035, 0.7901, 0.7647, 0.805]}, {"w": "seed,", "b": [0.7708, 0.7901, 0.8097, 0.805]}, {"w": "there’s", "b": [0.8159, 0.7901, 0.8691, 0.805]}, {"w": "no", "b": [0.1312, 0.808, 0.1503, 0.823]}, {"w": "guarantee", "b": [0.1558, 0.808, 0.2328, 0.823]}, {"w": "that", "b": [0.2383, 0.808, 0.2714, 0.823]}, {"w": "the", "b": [0.2769, 0.808, 0.3021, 0.823]}, {"w": "code", "b": [0.3076, 0.808, 0.3433, 0.823]}, {"w": "of", "b": [0.3488, 0.808, 0.3633, 0.823]}, {"w": "the", "b": [0.3688, 0.808, 0.394, 0.823]}, {"w": "framework", "b": [0.3995, 0.808, 0.4825, 0.823]}, {"w": "that", "b": [0.488, 0.808, 0.5211, 0.823]}, {"w": "uses", "b": [0.5266, 0.808, 0.559, 0.823]}, {"w": "randomization", "b": [0.5645, 0.808, 0.6781, 0.823]}, {"w": "doesn’t", "b": [0.6836, 0.808, 0.7405, 0.823]}, {"w": "change", "b": [0.746, 0.808, 0.7998, 0.823]}, {"w": "between", "b": [0.8053, 0.808, 0.8691, 0.823]}, {"w": "versions", "b": [0.1308, 0.8259, 0.1933, 0.8409]}, {"w": "of", "b": [0.199, 0.8259, 0.2136, 0.8409]}, {"w": "the", "b": [0.2193, 0.8259, 0.2444, 0.8409]}, {"w": "framework.", "b": [0.2501, 0.8259, 0.3381, 0.8409]}, {"w": "For", "b": [0.3461, 0.8259, 0.3725, 0.8409]}, {"w": "reproducibility,", "b": [0.3782, 0.8259, 0.4979, 0.8409]}, {"w": "each", "b": [0.5036, 0.8259, 0.5383, 0.8409]}, {"w": "project’s", "b": [0.544, 0.8259, 0.6115, 0.8409]}, {"w": "dependencies", "b": [0.6172, 0.8259, 0.7204, 0.8409]}, {"w": "should", "b": [0.726, 0.8259, 0.7774, 0.8409]}, {"w": "be", "b": [0.7831, 0.8259, 0.8017, 0.8409]}, {"w": "isolated.", "b": [0.8074, 0.8259, 0.8728, 0.8409]}, {"w": "It", "b": [0.1312, 0.8439, 0.1448, 0.8588]}, {"w": "can", "b": [0.1492, 0.8439, 0.1763, 0.8588]}, {"w": "be", "b": [0.1807, 0.8439, 0.1993, 0.8588]}, {"w": "done", "b": [0.2038, 0.8439, 0.2409, 0.8588]}, {"w": "in", "b": [0.2453, 0.8439, 0.2604, 0.8588]}, {"w": "many", "b": [0.2648, 0.8439, 0.308, 0.8588]}, {"w": "ways:", "b": [0.3124, 0.8439, 0.3552, 0.8588]}, {"w": "either", "b": [0.3625, 0.8439, 0.4078, 0.8588]}, {"w": "by", "b": [0.4122, 0.8439, 0.4313, 0.8588]}, {"w": "using", "b": [0.4357, 0.8439, 0.477, 0.8588]}, {"w": "tools", "b": [0.4814, 0.8439, 0.5192, 0.8588]}, {"w": "such", "b": [0.5236, 0.8439, 0.5584, 0.8588]}, {"w": "as", "b": [0.5628, 0.8439, 0.579, 0.8588]}, {"w": "virtualenv", "b": [0.5832, 0.8442, 0.6774, 0.8592]}, {"w": "in", "b": [0.6818, 0.8439, 0.6969, 0.8588]}, {"w": "Python", "b": [0.7013, 0.8439, 0.7593, 0.8588]}, {"w": "and", "b": [0.7637, 0.8439, 0.7929, 0.8588]}, {"w": "Packrat", "b": [0.7972, 0.8442, 0.8688, 0.8592]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 39", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "39", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 215, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "in R, or by running machine learning experiments in standardized virtual machines or containers. We will talk more about virtualization in Section ?? in Chapter 8.", "words": [{"w": "in", "b": [0.1312, 0.0881, 0.1469, 0.1031]}, {"w": "R,", "b": [0.1541, 0.0881, 0.1731, 0.1031]}, {"w": "or", "b": [0.1803, 0.0881, 0.1971, 0.1031]}, {"w": "by", "b": [0.2042, 0.0881, 0.2241, 0.1031]}, {"w": "running", "b": [0.2312, 0.0881, 0.2951, 0.1031]}, {"w": "machine", "b": [0.3022, 0.0881, 0.3697, 0.1031]}, {"w": "learning", "b": [0.3768, 0.0881, 0.4428, 0.1031]}, {"w": "experiments", "b": [0.4499, 0.0881, 0.5489, 0.1031]}, {"w": "in", "b": [0.5561, 0.0881, 0.5718, 0.1031]}, {"w": "standardized", "b": [0.5789, 0.0881, 0.6837, 0.1031]}, {"w": "virtual", "b": [0.6905, 0.0884, 0.7526, 0.1034]}, {"w": "machines", "b": [0.7609, 0.0884, 0.8453, 0.1034]}, {"w": "or", "b": [0.8524, 0.0881, 0.8691, 0.1031]}, {"w": "containers.", "b": [0.1312, 0.106, 0.2307, 0.1213]}, {"w": "We", "b": [0.2389, 0.106, 0.2645, 0.121]}, {"w": "will", "b": [0.2707, 0.106, 0.2994, 0.121]}, {"w": "talk", "b": [0.3055, 0.106, 0.3368, 0.121]}, {"w": "more", "b": [0.3429, 0.106, 0.383, 0.121]}, {"w": "about", "b": [0.3891, 0.106, 0.4358, 0.121]}, {"w": "virtualization", "b": [0.4419, 0.106, 0.5502, 0.121]}, {"w": "in", "b": [0.5563, 0.106, 0.5717, 0.121]}, {"w": "Section", "b": [0.5779, 0.106, 0.6363, 0.121]}, {"w": "??", "b": [0.6423, 0.1064, 0.6623, 0.1213]}, {"w": "in", "b": [0.6685, 0.106, 0.6839, 0.121]}, {"w": "Chapter", "b": [0.69, 0.106, 0.7557, 0.121]}, {"w": "8.", "b": [0.7618, 0.106, 0.7762, 0.121]}]}, {"id": "b_1", "type": "paragraph", "text": "When delivering the model, make sure it’s accompanied by all relevant information for", "words": [{"w": "When", "b": [0.1303, 0.133, 0.1789, 0.1479]}, {"w": "delivering", "b": [0.1872, 0.133, 0.2668, 0.1479]}, {"w": "the", "b": [0.275, 0.133, 0.3012, 0.1479]}, {"w": "model,", "b": [0.3094, 0.133, 0.3643, 0.1479]}, {"w": "make", "b": [0.3731, 0.133, 0.416, 0.1479]}, {"w": "sure", "b": [0.4242, 0.133, 0.4579, 0.1479]}, {"w": "it’s", "b": [0.4661, 0.133, 0.4913, 0.1479]}, {"w": "accompanied", "b": [0.4996, 0.133, 0.6052, 0.1479]}, {"w": "by", "b": [0.6135, 0.133, 0.6334, 0.1479]}, {"w": "all", "b": [0.6416, 0.133, 0.6615, 0.1479]}, {"w": "relevant", "b": [0.6697, 0.133, 0.7347, 0.1479]}, {"w": "information", "b": [0.7429, 0.133, 0.8387, 0.1479]}, {"w": "for", "b": [0.8469, 0.133, 0.8695, 0.1479]}]}, {"id": "b_2", "type": "paragraph", "text": "reproducibility. Besides the description of the dataset and features, such as documentation and metadata considered in Sections ?? and ??, each model should contain the documentation with the following details:", "words": [{"w": "reproducibility.", "b": [0.1312, 0.1509, 0.2737, 0.1662]}, {"w": "Besides", "b": [0.2817, 0.1509, 0.3399, 0.1659]}, {"w": "the", "b": [0.3455, 0.1509, 0.3706, 0.1659]}, {"w": "description", "b": [0.3762, 0.1509, 0.4628, 0.1659]}, {"w": "of", "b": [0.4683, 0.1509, 0.4829, 0.1659]}, {"w": "the", "b": [0.4885, 0.1509, 0.5136, 0.1659]}, {"w": "dataset", "b": [0.5191, 0.1509, 0.5765, 0.1659]}, {"w": "and", "b": [0.5821, 0.1509, 0.6112, 0.1659]}, {"w": "features,", "b": [0.6168, 0.1509, 0.6838, 0.1659]}, {"w": "such", "b": [0.6895, 0.1509, 0.7242, 0.1659]}, {"w": "as", "b": [0.7298, 0.1509, 0.746, 0.1659]}, {"w": "documentation", "b": [0.7515, 0.1509, 0.8691, 0.1659]}, {"w": "and", "b": [0.1312, 0.1689, 0.1604, 0.1838]}, {"w": "metadata", "b": [0.1653, 0.1689, 0.2396, 0.1838]}, {"w": "considered", "b": [0.2445, 0.1689, 0.3271, 0.1838]}, {"w": "in", "b": [0.332, 0.1689, 0.3471, 0.1838]}, {"w": "Sections", "b": [0.3519, 0.1689, 0.4164, 0.1838]}, {"w": "??", "b": [0.4211, 0.1692, 0.4411, 0.1841]}, {"w": "and", "b": [0.446, 0.1689, 0.4752, 0.1838]}, {"w": "??,", "b": [0.48, 0.1689, 0.5051, 0.1841]}, {"w": "each", "b": [0.5102, 0.1689, 0.5449, 0.1838]}, {"w": "model", "b": [0.5498, 0.1689, 0.5975, 0.1838]}, {"w": "should", "b": [0.6024, 0.1689, 0.6538, 0.1838]}, {"w": "contain", "b": [0.6587, 0.1689, 0.7165, 0.1838]}, {"w": "the", "b": [0.7214, 0.1689, 0.7465, 0.1838]}, {"w": "documentation", "b": [0.7514, 0.1689, 0.8689, 0.1838]}, {"w": "with", "b": [0.1306, 0.1868, 0.1665, 0.2018]}, {"w": "the", "b": [0.1726, 0.1868, 0.1982, 0.2018]}, {"w": "following", "b": [0.2044, 0.1868, 0.2762, 0.2018]}, {"w": "details:", "b": [0.2823, 0.1868, 0.3399, 0.2018]}]}, {"id": "b_3", "type": "paragraph", "text": "• a specification of all hyperparameters, including the ranges considered, and the default values used, • the method used to select the best hyperparameter configuration, • the definition of the specific measure or statistics used to evaluate the candidate models, and the value of it for the best model, • a description of the computing infrastructure used, and • the average runtime for each trained model, and an estimated cost of the training.", "words": [{"w": "•", "b": [0.1538, 0.2137, 0.1681, 0.2287]}, {"w": "a", "b": [0.1774, 0.2137, 0.1864, 0.2287]}, {"w": "specification", "b": [0.1926, 0.2137, 0.2901, 0.2287]}, {"w": "of", "b": [0.2963, 0.2137, 0.3109, 0.2287]}, {"w": "all", "b": [0.3171, 0.2137, 0.3363, 0.2287]}, {"w": "hyperparameters,", "b": [0.3425, 0.2137, 0.4804, 0.2287]}, {"w": "including", "b": [0.4866, 0.2137, 0.5593, 0.2287]}, {"w": "the", "b": [0.5655, 0.2137, 0.5907, 0.2287]}, {"w": "ranges", "b": [0.5969, 0.2137, 0.6475, 0.2287]}, {"w": "considered,", "b": [0.6537, 0.2137, 0.7416, 0.2287]}, {"w": "and", "b": [0.7478, 0.2137, 0.7771, 0.2287]}, {"w": "the", "b": [0.7833, 0.2137, 0.8085, 0.2287]}, {"w": "default", "b": [0.8147, 0.2137, 0.8697, 0.2287]}, {"w": "values", "b": [0.1769, 0.2317, 0.2257, 0.2466]}, {"w": "used,", "b": [0.2319, 0.2317, 0.273, 0.2466]}, {"w": "•", "b": [0.1538, 0.2496, 0.1681, 0.2646]}, {"w": "the", "b": [0.1774, 0.2496, 0.203, 0.2646]}, {"w": "method", "b": [0.2091, 0.2496, 0.2702, 0.2646]}, {"w": "used", "b": [0.2763, 0.2496, 0.3123, 0.2646]}, {"w": "to", "b": [0.3185, 0.2496, 0.3349, 0.2646]}, {"w": "select", "b": [0.341, 0.2496, 0.3852, 0.2646]}, {"w": "the", "b": [0.3914, 0.2496, 0.417, 0.2646]}, {"w": "best", "b": [0.4232, 0.2496, 0.4566, 0.2646]}, {"w": "hyperparameter", "b": [0.4628, 0.2496, 0.5906, 0.2646]}, {"w": "configuration,", "b": [0.5967, 0.2496, 0.7076, 0.2646]}, {"w": "•", "b": [0.1538, 0.2676, 0.1681, 0.2825]}, {"w": "the", "b": [0.1774, 0.2676, 0.2025, 0.2825]}, {"w": "definition", "b": [0.2079, 0.2676, 0.2823, 0.2825]}, {"w": "of", "b": [0.2877, 0.2676, 0.3023, 0.2825]}, {"w": "the", "b": [0.3077, 0.2676, 0.3328, 0.2825]}, {"w": "specific", "b": [0.3382, 0.2676, 0.3952, 0.2825]}, {"w": "measure", "b": [0.4006, 0.2676, 0.465, 0.2825]}, {"w": "or", "b": [0.4704, 0.2676, 0.4866, 0.2825]}, {"w": "statistics", "b": [0.492, 0.2676, 0.5617, 0.2825]}, {"w": "used", "b": [0.5671, 0.2676, 0.6024, 0.2825]}, {"w": "to", "b": [0.6078, 0.2676, 0.6239, 0.2825]}, {"w": "evaluate", "b": [0.6293, 0.2676, 0.6941, 0.2825]}, {"w": "the", "b": [0.6995, 0.2676, 0.7246, 0.2825]}, {"w": "candidate", "b": [0.73, 0.2676, 0.8064, 0.2825]}, {"w": "models,", "b": [0.8118, 0.2676, 0.8717, 0.2825]}, {"w": "and", "b": [0.1774, 0.2855, 0.2071, 0.3005]}, {"w": "the", "b": [0.2132, 0.2855, 0.2389, 0.3005]}, {"w": "value", "b": [0.245, 0.2855, 0.2866, 0.3005]}, {"w": "of", "b": [0.2927, 0.2855, 0.3076, 0.3005]}, {"w": "it", "b": [0.3137, 0.2855, 0.326, 0.3005]}, {"w": "for", "b": [0.3322, 0.2855, 0.3543, 0.3005]}, {"w": "the", "b": [0.3604, 0.2855, 0.3861, 0.3005]}, {"w": "best", "b": [0.3922, 0.2855, 0.4257, 0.3005]}, {"w": "model,", "b": [0.4318, 0.2855, 0.4857, 0.3005]}, {"w": "•", "b": [0.1538, 0.3035, 0.1681, 0.3184]}, {"w": "a", "b": [0.1774, 0.3035, 0.1866, 0.3184]}, {"w": "description", "b": [0.1927, 0.3035, 0.2811, 0.3184]}, {"w": "of", "b": [0.2872, 0.3035, 0.3021, 0.3184]}, {"w": "the", "b": [0.3083, 0.3035, 0.3339, 0.3184]}, {"w": "computing", "b": [0.3401, 0.3035, 0.4252, 0.3184]}, {"w": "infrastructure", "b": [0.4313, 0.3035, 0.5418, 0.3184]}, {"w": "used,", "b": [0.548, 0.3035, 0.5891, 0.3184]}, {"w": "and", "b": [0.5953, 0.3035, 0.625, 0.3184]}, {"w": "•", "b": [0.1538, 0.3214, 0.1681, 0.3364]}, {"w": "the", "b": [0.1774, 0.3214, 0.203, 0.3364]}, {"w": "average", "b": [0.2091, 0.3214, 0.2692, 0.3364]}, {"w": "runtime", "b": [0.2753, 0.3214, 0.3385, 0.3364]}, {"w": "for", "b": [0.3446, 0.3214, 0.3667, 0.3364]}, {"w": "each", "b": [0.3728, 0.3214, 0.4082, 0.3364]}, {"w": "trained", "b": [0.4144, 0.3214, 0.4719, 0.3364]}, {"w": "model,", "b": [0.478, 0.3214, 0.5319, 0.3364]}, {"w": "and", "b": [0.538, 0.3214, 0.5677, 0.3364]}, {"w": "an", "b": [0.5739, 0.3214, 0.5934, 0.3364]}, {"w": "estimated", "b": [0.5995, 0.3214, 0.6776, 0.3364]}, {"w": "cost", "b": [0.6837, 0.3214, 0.7156, 0.3364]}, {"w": "of", "b": [0.7218, 0.3214, 0.7366, 0.3364]}, {"w": "the", "b": [0.7428, 0.3214, 0.7684, 0.3364]}, {"w": "training.", "b": [0.7746, 0.3214, 0.8433, 0.3364]}]}, {"id": "b_4", "type": "paragraph", "text": "6.8 Summary", "words": [{"w": "6.8", "b": [0.1312, 0.3702, 0.1631, 0.3882]}, {"w": "Summary", "b": [0.188, 0.3702, 0.2927, 0.3882]}]}, {"id": "b_5", "type": "paragraph", "text": "The deep model training strategy has more moving parts, as compared to training shallow models. At the same time, it’s more principled and amenable to automation.", "words": [{"w": "The", "b": [0.1306, 0.4088, 0.1627, 0.4238]}, {"w": "deep", "b": [0.1689, 0.4088, 0.2063, 0.4238]}, {"w": "model", "b": [0.2124, 0.4088, 0.2617, 0.4238]}, {"w": "training", "b": [0.2678, 0.4088, 0.3322, 0.4238]}, {"w": "strategy", "b": [0.3384, 0.4088, 0.4044, 0.4238]}, {"w": "has", "b": [0.4106, 0.4088, 0.4376, 0.4238]}, {"w": "more", "b": [0.4438, 0.4088, 0.4843, 0.4238]}, {"w": "moving", "b": [0.4904, 0.4088, 0.5496, 0.4238]}, {"w": "parts,", "b": [0.5557, 0.4088, 0.6026, 0.4238]}, {"w": "as", "b": [0.6087, 0.4088, 0.6255, 0.4238]}, {"w": "compared", "b": [0.6316, 0.4088, 0.7105, 0.4238]}, {"w": "to", "b": [0.7167, 0.4088, 0.7333, 0.4238]}, {"w": "training", "b": [0.7394, 0.4088, 0.8038, 0.4238]}, {"w": "shallow", "b": [0.8099, 0.4088, 0.8697, 0.4238]}, {"w": "models.", "b": [0.1312, 0.4268, 0.1924, 0.4417]}, {"w": "At", "b": [0.2005, 0.4268, 0.221, 0.4417]}, {"w": "the", "b": [0.2272, 0.4268, 0.2529, 0.4417]}, {"w": "same", "b": [0.259, 0.4268, 0.2991, 0.4417]}, {"w": "time,", "b": [0.3052, 0.4268, 0.3462, 0.4417]}, {"w": "it’s", "b": [0.3524, 0.4268, 0.3771, 0.4417]}, {"w": "more", "b": [0.3833, 0.4268, 0.4233, 0.4417]}, {"w": "principled", "b": [0.4294, 0.4268, 0.5095, 0.4417]}, {"w": "and", "b": [0.5157, 0.4268, 0.5454, 0.4417]}, {"w": "amenable", "b": [0.5515, 0.4268, 0.6274, 0.4417]}, {"w": "to", "b": [0.6336, 0.4268, 0.65, 0.4417]}, {"w": "automation.", "b": [0.6561, 0.4268, 0.7535, 0.4417]}]}, {"id": "b_6", "type": "paragraph", "text": "Instead of training your model from scratch, it can be useful to start with a pre-trained model. Organizations with access to big data have trained and open-sourced very deep neural networks with architectures optimized for image or natural language processing tasks.", "words": [{"w": "Instead", "b": [0.1312, 0.4537, 0.1915, 0.4686]}, {"w": "of", "b": [0.1987, 0.4537, 0.2139, 0.4686]}, {"w": "training", "b": [0.2211, 0.4537, 0.2861, 0.4686]}, {"w": "your", "b": [0.2933, 0.4537, 0.33, 0.4686]}, {"w": "model", "b": [0.3372, 0.4537, 0.3869, 0.4686]}, {"w": "from", "b": [0.3941, 0.4537, 0.4323, 0.4686]}, {"w": "scratch,", "b": [0.4396, 0.4537, 0.503, 0.4686]}, {"w": "it", "b": [0.5106, 0.4537, 0.5231, 0.4686]}, {"w": "can", "b": [0.5303, 0.4537, 0.5586, 0.4686]}, {"w": "be", "b": [0.5658, 0.4537, 0.5852, 0.4686]}, {"w": "useful", "b": [0.5924, 0.4537, 0.6402, 0.4686]}, {"w": "to", "b": [0.6474, 0.4537, 0.6641, 0.4686]}, {"w": "start", "b": [0.6714, 0.4537, 0.7102, 0.4686]}, {"w": "with", "b": [0.7175, 0.4537, 0.7541, 0.4686]}, {"w": "a", "b": [0.7613, 0.4537, 0.7707, 0.4686]}, {"w": "pre-trained", "b": [0.778, 0.4537, 0.8691, 0.4686]}, {"w": "model.", "b": [0.1312, 0.4716, 0.184, 0.4866]}, {"w": "Organizations", "b": [0.192, 0.4716, 0.3017, 0.4866]}, {"w": "with", "b": [0.3072, 0.4716, 0.3423, 0.4866]}, {"w": "access", "b": [0.3478, 0.4716, 0.3953, 0.4866]}, {"w": "to", "b": [0.4008, 0.4716, 0.4168, 0.4866]}, {"w": "big", "b": [0.4223, 0.4716, 0.4465, 0.4866]}, {"w": "data", "b": [0.452, 0.4716, 0.4871, 0.4866]}, {"w": "have", "b": [0.4926, 0.4716, 0.5283, 0.4866]}, {"w": "trained", "b": [0.5338, 0.4716, 0.5901, 0.4866]}, {"w": "and", "b": [0.5956, 0.4716, 0.6248, 0.4866]}, {"w": "open-sourced", "b": [0.6302, 0.4716, 0.7334, 0.4866]}, {"w": "very", "b": [0.7389, 0.4716, 0.7726, 0.4866]}, {"w": "deep", "b": [0.7781, 0.4716, 0.8143, 0.4866]}, {"w": "neural", "b": [0.8198, 0.4716, 0.8691, 0.4866]}, {"w": "networks", "b": [0.1312, 0.4896, 0.2027, 0.5045]}, {"w": "with", "b": [0.2088, 0.4896, 0.2447, 0.5045]}, {"w": "architectures", "b": [0.2508, 0.4896, 0.3541, 0.5045]}, {"w": "optimized", "b": [0.3603, 0.4896, 0.4392, 0.5045]}, {"w": "for", "b": [0.4454, 0.4896, 0.4675, 0.5045]}, {"w": "image", "b": [0.4736, 0.4896, 0.5208, 0.5045]}, {"w": "or", "b": [0.527, 0.4896, 0.5434, 0.5045]}, {"w": "natural", "b": [0.5496, 0.4896, 0.6081, 0.5045]}, {"w": "language", "b": [0.6142, 0.4896, 0.685, 0.5045]}, {"w": "processing", "b": [0.6911, 0.4896, 0.7739, 0.5045]}, {"w": "tasks.", "b": [0.7801, 0.4896, 0.8259, 0.5045]}]}, {"id": "b_7", "type": "paragraph", "text": "A pre-trained model can be used in two ways: 1) its learned parameters can be used to initialize your own model, or 2) it can be used as a feature extractor for your model.", "words": [{"w": "A", "b": [0.1305, 0.5165, 0.1446, 0.5315]}, {"w": "pre-trained", "b": [0.152, 0.5165, 0.2431, 0.5315]}, {"w": "model", "b": [0.2505, 0.5165, 0.3002, 0.5315]}, {"w": "can", "b": [0.3075, 0.5165, 0.3358, 0.5315]}, {"w": "be", "b": [0.3431, 0.5165, 0.3625, 0.5315]}, {"w": "used", "b": [0.3698, 0.5165, 0.4066, 0.5315]}, {"w": "in", "b": [0.4139, 0.5165, 0.4296, 0.5315]}, {"w": "two", "b": [0.437, 0.5165, 0.4663, 0.5315]}, {"w": "ways:", "b": [0.4737, 0.5165, 0.5182, 0.5315]}, {"w": "1)", "b": [0.5289, 0.5165, 0.5456, 0.5315]}, {"w": "its", "b": [0.553, 0.5165, 0.573, 0.5315]}, {"w": "learned", "b": [0.5803, 0.5165, 0.64, 0.5315]}, {"w": "parameters", "b": [0.6474, 0.5165, 0.7386, 0.5315]}, {"w": "can", "b": [0.7459, 0.5165, 0.7742, 0.5315]}, {"w": "be", "b": [0.7816, 0.5165, 0.8009, 0.5315]}, {"w": "used", "b": [0.8083, 0.5165, 0.845, 0.5315]}, {"w": "to", "b": [0.8524, 0.5165, 0.8691, 0.5315]}, {"w": "initialize", "b": [0.1312, 0.5345, 0.2, 0.5494]}, {"w": "your", "b": [0.2061, 0.5345, 0.242, 0.5494]}, {"w": "own", "b": [0.2482, 0.5345, 0.2805, 0.5494]}, {"w": "model,", "b": [0.2866, 0.5345, 0.3405, 0.5494]}, {"w": "or", "b": [0.3466, 0.5345, 0.3631, 0.5494]}, {"w": "2)", "b": [0.3692, 0.5345, 0.3856, 0.5494]}, {"w": "it", "b": [0.3918, 0.5345, 0.4041, 0.5494]}, {"w": "can", "b": [0.4102, 0.5345, 0.4379, 0.5494]}, {"w": "be", "b": [0.4441, 0.5345, 0.463, 0.5494]}, {"w": "used", "b": [0.4692, 0.5345, 0.5052, 0.5494]}, {"w": "as", "b": [0.5113, 0.5345, 0.5279, 0.5494]}, {"w": "a", "b": [0.534, 0.5345, 0.5432, 0.5494]}, {"w": "feature", "b": [0.5494, 0.5345, 0.6053, 0.5494]}, {"w": "extractor", "b": [0.6115, 0.5345, 0.6849, 0.5494]}, {"w": "for", "b": [0.6911, 0.5345, 0.7132, 0.5494]}, {"w": "your", "b": [0.7193, 0.5345, 0.7553, 0.5494]}, {"w": "model.", "b": [0.7614, 0.5345, 0.8152, 0.5494]}]}, {"id": "b_8", "type": "paragraph", "text": "Using a pre-trained model to build your own is called transfer learning. The fact that deep models allow for transfer learning is one of the most important properties of deep learning.", "words": [{"w": "Using", "b": [0.1312, 0.5614, 0.1771, 0.5763]}, {"w": "a", "b": [0.1832, 0.5614, 0.1925, 0.5763]}, {"w": "pre-trained", "b": [0.1986, 0.5614, 0.2881, 0.5763]}, {"w": "model", "b": [0.2943, 0.5614, 0.3431, 0.5763]}, {"w": "to", "b": [0.3493, 0.5614, 0.3657, 0.5763]}, {"w": "build", "b": [0.3718, 0.5614, 0.413, 0.5763]}, {"w": "your", "b": [0.4191, 0.5614, 0.4551, 0.5763]}, {"w": "own", "b": [0.4613, 0.5614, 0.4937, 0.5763]}, {"w": "is", "b": [0.4998, 0.5614, 0.5123, 0.5763]}, {"w": "called", "b": [0.5184, 0.5614, 0.5647, 0.5763]}, {"w": "transfer", "b": [0.5708, 0.5614, 0.6332, 0.5763]}, {"w": "learning.", "b": [0.6394, 0.5614, 0.7093, 0.5763]}, {"w": "The", "b": [0.7176, 0.5614, 0.7494, 0.5763]}, {"w": "fact", "b": [0.7556, 0.5614, 0.7859, 0.5763]}, {"w": "that", "b": [0.792, 0.5614, 0.8259, 0.5763]}, {"w": "deep", "b": [0.8321, 0.5614, 0.8691, 0.5763]}, {"w": "models", "b": [0.1312, 0.5793, 0.1872, 0.5943]}, {"w": "allow", "b": [0.1934, 0.5793, 0.2349, 0.5943]}, {"w": "for", "b": [0.241, 0.5793, 0.2631, 0.5943]}, {"w": "transfer", "b": [0.2693, 0.5793, 0.3316, 0.5943]}, {"w": "learning", "b": [0.3377, 0.5793, 0.4024, 0.5943]}, {"w": "is", "b": [0.4085, 0.5793, 0.4209, 0.5943]}, {"w": "one", "b": [0.4271, 0.5793, 0.4548, 0.5943]}, {"w": "of", "b": [0.4609, 0.5793, 0.4758, 0.5943]}, {"w": "the", "b": [0.4819, 0.5793, 0.5076, 0.5943]}, {"w": "most", "b": [0.5137, 0.5793, 0.5528, 0.5943]}, {"w": "important", "b": [0.5589, 0.5793, 0.64, 0.5943]}, {"w": "properties", "b": [0.6461, 0.5793, 0.7268, 0.5943]}, {"w": "of", "b": [0.733, 0.5793, 0.7479, 0.5943]}, {"w": "deep", "b": [0.754, 0.5793, 0.7909, 0.5943]}, {"w": "learning.", "b": [0.7971, 0.5793, 0.8669, 0.5943]}]}, {"id": "b_9", "type": "paragraph", "text": "Minibatch stochastic gradient descent and its variants are the most frequently used cost function optimization algorithms for deep models.", "words": [{"w": "Minibatch", "b": [0.1312, 0.6062, 0.2149, 0.6212]}, {"w": "stochastic", "b": [0.2218, 0.6062, 0.3026, 0.6212]}, {"w": "gradient", "b": [0.3095, 0.6062, 0.3771, 0.6212]}, {"w": "descent", "b": [0.384, 0.6062, 0.4443, 0.6212]}, {"w": "and", "b": [0.4512, 0.6062, 0.4815, 0.6212]}, {"w": "its", "b": [0.4884, 0.6062, 0.5084, 0.6212]}, {"w": "variants", "b": [0.5153, 0.6062, 0.5804, 0.6212]}, {"w": "are", "b": [0.5873, 0.6062, 0.6125, 0.6212]}, {"w": "the", "b": [0.6194, 0.6062, 0.6455, 0.6212]}, {"w": "most", "b": [0.6525, 0.6062, 0.6923, 0.6212]}, {"w": "frequently", "b": [0.6992, 0.6062, 0.7819, 0.6212]}, {"w": "used", "b": [0.7888, 0.6062, 0.8256, 0.6212]}, {"w": "cost", "b": [0.8321, 0.6065, 0.8688, 0.6215]}, {"w": "function", "b": [0.1312, 0.6245, 0.2073, 0.6394]}, {"w": "optimization", "b": [0.2135, 0.6242, 0.315, 0.6391]}, {"w": "algorithms", "b": [0.3211, 0.6242, 0.4064, 0.6391]}, {"w": "for", "b": [0.4125, 0.6242, 0.4346, 0.6391]}, {"w": "deep", "b": [0.4408, 0.6242, 0.4777, 0.6391]}, {"w": "models.", "b": [0.4839, 0.6242, 0.545, 0.6391]}]}, {"id": "b_10", "type": "paragraph", "text": "The backpropagation algorithm computes the partial derivatives of each deep model parameter, using the chain rule for derivatives of complex functions. At each epoch, gradient descent updates all parameters using partial derivatives. The learning rate controls the significance of an update. The process continues until convergence, the state where parameters’ values don’t change much after each epoch. Then the algorithm stops.", "words": [{"w": "The", "b": [0.1306, 0.6511, 0.1617, 0.6661]}, {"w": "backpropagation", "b": [0.1661, 0.6511, 0.2968, 0.6661]}, {"w": "algorithm", "b": [0.3012, 0.6511, 0.3776, 0.6661]}, {"w": "computes", "b": [0.382, 0.6511, 0.4564, 0.6661]}, {"w": "the", "b": [0.4608, 0.6511, 0.4859, 0.6661]}, {"w": "partial", "b": [0.4903, 0.6511, 0.5426, 0.6661]}, {"w": "derivatives", "b": [0.547, 0.6511, 0.631, 0.6661]}, {"w": "of", "b": [0.6354, 0.6511, 0.65, 0.6661]}, {"w": "each", "b": [0.6544, 0.6511, 0.6891, 0.6661]}, {"w": "deep", "b": [0.6934, 0.6511, 0.7296, 0.6661]}, {"w": "model", "b": [0.734, 0.6511, 0.7818, 0.6661]}, {"w": "parameter,", "b": [0.7861, 0.6511, 0.8717, 0.6661]}, {"w": "using", "b": [0.1312, 0.6691, 0.1742, 0.684]}, {"w": "the", "b": [0.1805, 0.6691, 0.2067, 0.684]}, {"w": "chain", "b": [0.2129, 0.6691, 0.2564, 0.684]}, {"w": "rule", "b": [0.2626, 0.6691, 0.2941, 0.684]}, {"w": "for", "b": [0.3004, 0.6691, 0.3229, 0.684]}, {"w": "derivatives", "b": [0.3292, 0.6691, 0.4167, 0.684]}, {"w": "of", "b": [0.423, 0.6691, 0.4382, 0.684]}, {"w": "complex", "b": [0.4444, 0.6691, 0.5119, 0.684]}, {"w": "functions.", "b": [0.5182, 0.6691, 0.5983, 0.684]}, {"w": "At", "b": [0.6069, 0.6691, 0.6278, 0.684]}, {"w": "each", "b": [0.6341, 0.6691, 0.6702, 0.684]}, {"w": "epoch,", "b": [0.6765, 0.6691, 0.7293, 0.684]}, {"w": "gradient", "b": [0.7356, 0.6691, 0.8031, 0.684]}, {"w": "descent", "b": [0.8094, 0.6691, 0.8697, 0.684]}, {"w": "updates", "b": [0.1312, 0.687, 0.1945, 0.702]}, {"w": "all", "b": [0.2007, 0.687, 0.2202, 0.702]}, {"w": "parameters", "b": [0.2263, 0.687, 0.3159, 0.702]}, {"w": "using", "b": [0.322, 0.687, 0.3643, 0.702]}, {"w": "partial", "b": [0.3704, 0.687, 0.4239, 0.702]}, {"w": "derivatives.", "b": [0.43, 0.687, 0.5211, 0.702]}, {"w": "The", "b": [0.5293, 0.687, 0.5612, 0.702]}, {"w": "learning", "b": [0.5673, 0.687, 0.6321, 0.702]}, {"w": "rate", "b": [0.6382, 0.687, 0.6701, 0.702]}, {"w": "controls", "b": [0.6763, 0.687, 0.7396, 0.702]}, {"w": "the", "b": [0.7458, 0.687, 0.7714, 0.702]}, {"w": "significance", "b": [0.7776, 0.687, 0.8692, 0.702]}, {"w": "of", "b": [0.1312, 0.7049, 0.1463, 0.7199]}, {"w": "an", "b": [0.1524, 0.7049, 0.1721, 0.7199]}, {"w": "update.", "b": [0.1783, 0.7049, 0.24, 0.7199]}, {"w": "The", "b": [0.2483, 0.7049, 0.2804, 0.7199]}, {"w": "process", "b": [0.2866, 0.7049, 0.3455, 0.7199]}, {"w": "continues", "b": [0.3516, 0.7049, 0.4275, 0.7199]}, {"w": "until", "b": [0.4337, 0.7049, 0.4716, 0.7199]}, {"w": "convergence,", "b": [0.4777, 0.7049, 0.58, 0.7199]}, {"w": "the", "b": [0.5862, 0.7049, 0.6121, 0.7199]}, {"w": "state", "b": [0.6183, 0.7049, 0.6578, 0.7199]}, {"w": "where", "b": [0.664, 0.7049, 0.7118, 0.7199]}, {"w": "parameters’", "b": [0.7179, 0.7049, 0.8136, 0.7199]}, {"w": "values", "b": [0.8198, 0.7049, 0.8692, 0.7199]}, {"w": "don’t", "b": [0.1312, 0.7229, 0.1733, 0.7379]}, {"w": "change", "b": [0.1794, 0.7229, 0.2343, 0.7379]}, {"w": "much", "b": [0.2405, 0.7229, 0.2835, 0.7379]}, {"w": "after", "b": [0.2897, 0.7229, 0.3271, 0.7379]}, {"w": "each", "b": [0.3333, 0.7229, 0.3687, 0.7379]}, {"w": "epoch.", "b": [0.3748, 0.7229, 0.4266, 0.7379]}, {"w": "Then", "b": [0.4348, 0.7229, 0.4769, 0.7379]}, {"w": "the", "b": [0.483, 0.7229, 0.5087, 0.7379]}, {"w": "algorithm", "b": [0.5148, 0.7229, 0.5928, 0.7379]}, {"w": "stops.", "b": [0.5989, 0.7229, 0.6453, 0.7379]}]}, {"id": "b_11", "type": "paragraph", "text": "There are several popular upgrades to minibatch stochastic gradient descent, such as Momen- tum, RMSProp, and Adam. These algorithms update the learning rate automatically, based on the performance of the learning process. You do not need to choose the initial value of the learning rate, the decay schedule and rate, or the values of other related hyperparameters. These algorithms have demonstrated good performance in practice, and practitioners often use them instead of trying to manually tune the learning rate.", "words": [{"w": "There", "b": [0.1306, 0.7498, 0.1769, 0.7648]}, {"w": "are", "b": [0.1827, 0.7498, 0.2069, 0.7648]}, {"w": "several", "b": [0.2127, 0.7498, 0.2662, 0.7648]}, {"w": "popular", "b": [0.272, 0.7498, 0.3329, 0.7648]}, {"w": "upgrades", "b": [0.3387, 0.7498, 0.4092, 0.7648]}, {"w": "to", "b": [0.4151, 0.7498, 0.4312, 0.7648]}, {"w": "minibatch", "b": [0.437, 0.7498, 0.5159, 0.7648]}, {"w": "stochastic", "b": [0.5218, 0.7498, 0.5994, 0.7648]}, {"w": "gradient", "b": [0.6052, 0.7498, 0.6701, 0.7648]}, {"w": "descent,", "b": [0.6759, 0.7498, 0.7388, 0.7648]}, {"w": "such", "b": [0.7448, 0.7498, 0.7795, 0.7648]}, {"w": "as", "b": [0.7854, 0.7498, 0.8016, 0.7648]}, {"w": "Momen-", "b": [0.8074, 0.7498, 0.8722, 0.7648]}, {"w": "tum,", "b": [0.1312, 0.7678, 0.1687, 0.7827]}, {"w": "RMSProp,", "b": [0.1749, 0.7678, 0.2591, 0.7827]}, {"w": "and", "b": [0.2652, 0.7678, 0.2946, 0.7827]}, {"w": "Adam.", "b": [0.3008, 0.7678, 0.3535, 0.7827]}, {"w": "These", "b": [0.3617, 0.7678, 0.4084, 0.7827]}, {"w": "algorithms", "b": [0.4146, 0.7678, 0.4989, 0.7827]}, {"w": "update", "b": [0.505, 0.7678, 0.5603, 0.7827]}, {"w": "the", "b": [0.5664, 0.7678, 0.5918, 0.7827]}, {"w": "learning", "b": [0.5979, 0.7678, 0.6619, 0.7827]}, {"w": "rate", "b": [0.668, 0.7678, 0.6995, 0.7827]}, {"w": "automatically,", "b": [0.7056, 0.7678, 0.8182, 0.7827]}, {"w": "based", "b": [0.8243, 0.7678, 0.8691, 0.7827]}, {"w": "on", "b": [0.1312, 0.7857, 0.1503, 0.8007]}, {"w": "the", "b": [0.156, 0.7857, 0.1812, 0.8007]}, {"w": "performance", "b": [0.1868, 0.7857, 0.2844, 0.8007]}, {"w": "of", "b": [0.2901, 0.7857, 0.3047, 0.8007]}, {"w": "the", "b": [0.3104, 0.7857, 0.3355, 0.8007]}, {"w": "learning", "b": [0.3413, 0.7857, 0.4046, 0.8007]}, {"w": "process.", "b": [0.4103, 0.7857, 0.4724, 0.8007]}, {"w": "You", "b": [0.4805, 0.7857, 0.5116, 0.8007]}, {"w": "do", "b": [0.5173, 0.7857, 0.5364, 0.8007]}, {"w": "not", "b": [0.5421, 0.7857, 0.5682, 0.8007]}, {"w": "need", "b": [0.5739, 0.7857, 0.6101, 0.8007]}, {"w": "to", "b": [0.6158, 0.7857, 0.6318, 0.8007]}, {"w": "choose", "b": [0.6375, 0.7857, 0.6889, 0.8007]}, {"w": "the", "b": [0.6946, 0.7857, 0.7197, 0.8007]}, {"w": "initial", "b": [0.7254, 0.7857, 0.7717, 0.8007]}, {"w": "value", "b": [0.7774, 0.7857, 0.818, 0.8007]}, {"w": "of", "b": [0.8237, 0.7857, 0.8383, 0.8007]}, {"w": "the", "b": [0.844, 0.7857, 0.8691, 0.8007]}, {"w": "learning", "b": [0.1312, 0.8037, 0.1971, 0.8186]}, {"w": "rate,", "b": [0.2032, 0.8037, 0.2408, 0.8186]}, {"w": "the", "b": [0.247, 0.8037, 0.2731, 0.8186]}, {"w": "decay", "b": [0.2792, 0.8037, 0.3252, 0.8186]}, {"w": "schedule", "b": [0.3313, 0.8037, 0.3998, 0.8186]}, {"w": "and", "b": [0.406, 0.8037, 0.4362, 0.8186]}, {"w": "rate,", "b": [0.4424, 0.8037, 0.48, 0.8186]}, {"w": "or", "b": [0.4862, 0.8037, 0.5029, 0.8186]}, {"w": "the", "b": [0.509, 0.8037, 0.5351, 0.8186]}, {"w": "values", "b": [0.5413, 0.8037, 0.591, 0.8186]}, {"w": "of", "b": [0.5971, 0.8037, 0.6123, 0.8186]}, {"w": "other", "b": [0.6184, 0.8037, 0.6613, 0.8186]}, {"w": "related", "b": [0.6674, 0.8037, 0.7239, 0.8186]}, {"w": "hyperparameters.", "b": [0.73, 0.8037, 0.8728, 0.8186]}, {"w": "These", "b": [0.1306, 0.8216, 0.1781, 0.8366]}, {"w": "algorithms", "b": [0.1843, 0.8216, 0.2699, 0.8366]}, {"w": "have", "b": [0.2761, 0.8216, 0.3127, 0.8366]}, {"w": "demonstrated", "b": [0.3189, 0.8216, 0.4293, 0.8366]}, {"w": "good", "b": [0.4355, 0.8216, 0.4746, 0.8366]}, {"w": "performance", "b": [0.4808, 0.8216, 0.5808, 0.8366]}, {"w": "in", "b": [0.587, 0.8216, 0.6025, 0.8366]}, {"w": "practice,", "b": [0.6086, 0.8216, 0.6778, 0.8366]}, {"w": "and", "b": [0.6839, 0.8216, 0.7138, 0.8366]}, {"w": "practitioners", "b": [0.72, 0.8216, 0.8222, 0.8366]}, {"w": "often", "b": [0.8284, 0.8216, 0.8691, 0.8366]}, {"w": "use", "b": [0.1312, 0.8396, 0.157, 0.8545]}, {"w": "them", "b": [0.1631, 0.8396, 0.2041, 0.8545]}, {"w": "instead", "b": [0.2103, 0.8396, 0.2678, 0.8545]}, {"w": "of", "b": [0.274, 0.8396, 0.2889, 0.8545]}, {"w": "trying", "b": [0.295, 0.8396, 0.3438, 0.8545]}, {"w": "to", "b": [0.3499, 0.8396, 0.3663, 0.8545]}, {"w": "manually", "b": [0.3725, 0.8396, 0.4463, 0.8545]}, {"w": "tune", "b": [0.4524, 0.8396, 0.4883, 0.8545]}, {"w": "the", "b": [0.4945, 0.8396, 0.5201, 0.8545]}, {"w": "learning", "b": [0.5263, 0.8396, 0.5909, 0.8545]}, {"w": "rate.", "b": [0.5971, 0.8396, 0.634, 0.8545]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 40", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "40", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 216, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "In addition to L1 and L2 regularization, neural networks benefit from neural network-specific regularizers: dropout, early stopping, and batch-normalization. Dropout is a simple but very effective regularization method. Using batch-normalization is a best practice.", "words": [{"w": "In", "b": [0.1312, 0.0881, 0.1478, 0.1031]}, {"w": "addition", "b": [0.1538, 0.0881, 0.2191, 0.1031]}, {"w": "to", "b": [0.2251, 0.0881, 0.2411, 0.1031]}, {"w": "L1", "b": [0.2471, 0.0881, 0.2674, 0.1031]}, {"w": "and", "b": [0.2734, 0.0881, 0.3025, 0.1031]}, {"w": "L2", "b": [0.3085, 0.0881, 0.3288, 0.1031]}, {"w": "regularization,", "b": [0.3348, 0.0881, 0.4485, 0.1031]}, {"w": "neural", "b": [0.4544, 0.0881, 0.5037, 0.1031]}, {"w": "networks", "b": [0.5097, 0.0881, 0.5797, 0.1031]}, {"w": "benefit", "b": [0.5856, 0.0881, 0.6394, 0.1031]}, {"w": "from", "b": [0.6454, 0.0881, 0.6821, 0.1031]}, {"w": "neural", "b": [0.6881, 0.0881, 0.7374, 0.1031]}, {"w": "network-specific", "b": [0.7433, 0.0881, 0.8691, 0.1031]}, {"w": "regularizers:", "b": [0.1312, 0.106, 0.2271, 0.121]}, {"w": "dropout,", "b": [0.2353, 0.106, 0.3032, 0.121]}, {"w": "early", "b": [0.3094, 0.106, 0.3481, 0.121]}, {"w": "stopping,", "b": [0.3543, 0.106, 0.4268, 0.121]}, {"w": "and", "b": [0.4329, 0.106, 0.4621, 0.121]}, {"w": "batch-normalization.", "b": [0.4682, 0.106, 0.6317, 0.121]}, {"w": "Dropout", "b": [0.6399, 0.106, 0.7066, 0.121]}, {"w": "is", "b": [0.7127, 0.106, 0.7249, 0.121]}, {"w": "a", "b": [0.731, 0.106, 0.7401, 0.121]}, {"w": "simple", "b": [0.7462, 0.106, 0.7966, 0.121]}, {"w": "but", "b": [0.8028, 0.106, 0.8299, 0.121]}, {"w": "very", "b": [0.836, 0.106, 0.8698, 0.121]}, {"w": "effective", "b": [0.1312, 0.124, 0.1964, 0.1389]}, {"w": "regularization", "b": [0.2025, 0.124, 0.3134, 0.1389]}, {"w": "method.", "b": [0.3195, 0.124, 0.3856, 0.1389]}, {"w": "Using", "b": [0.3938, 0.124, 0.4396, 0.1389]}, {"w": "batch-normalization", "b": [0.4457, 0.124, 0.6073, 0.1389]}, {"w": "is", "b": [0.6134, 0.124, 0.6258, 0.1389]}, {"w": "a", "b": [0.632, 0.124, 0.6412, 0.1389]}, {"w": "best", "b": [0.6474, 0.124, 0.6808, 0.1389]}, {"w": "practice.", "b": [0.6869, 0.124, 0.7557, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "Ensemble learning is training an ensemble model, which is a combination of several base models, each individually performing worse than the ensemble model. There are ensemble learning algorithms, such as random forest and gradient boosting, that build an ensemble of several hundred to thousands of weak models, and obtain a strong model that has a significantly better performance than the performance of each weak model.", "words": [{"w": "Ensemble", "b": [0.1312, 0.1509, 0.2096, 0.1659]}, {"w": "learning", "b": [0.2165, 0.1509, 0.2824, 0.1659]}, {"w": "is", "b": [0.2894, 0.1509, 0.302, 0.1659]}, {"w": "training", "b": [0.309, 0.1509, 0.3739, 0.1659]}, {"w": "an", "b": [0.3808, 0.1509, 0.4007, 0.1659]}, {"w": "ensemble", "b": [0.4076, 0.1509, 0.4815, 0.1659]}, {"w": "model,", "b": [0.4884, 0.1509, 0.5433, 0.1659]}, {"w": "which", "b": [0.5504, 0.1509, 0.598, 0.1659]}, {"w": "is", "b": [0.605, 0.1509, 0.6176, 0.1659]}, {"w": "a", "b": [0.6246, 0.1509, 0.634, 0.1659]}, {"w": "combination", "b": [0.6409, 0.1509, 0.7418, 0.1659]}, {"w": "of", "b": [0.7488, 0.1509, 0.764, 0.1659]}, {"w": "several", "b": [0.7709, 0.1509, 0.8265, 0.1659]}, {"w": "base", "b": [0.8334, 0.1509, 0.8691, 0.1659]}, {"w": "models,", "b": [0.1312, 0.1689, 0.1933, 0.1838]}, {"w": "each", "b": [0.1994, 0.1689, 0.2354, 0.1838]}, {"w": "individually", "b": [0.2415, 0.1689, 0.3383, 0.1838]}, {"w": "performing", "b": [0.3445, 0.1689, 0.4341, 0.1838]}, {"w": "worse", "b": [0.4403, 0.1689, 0.4857, 0.1838]}, {"w": "than", "b": [0.4919, 0.1689, 0.5294, 0.1838]}, {"w": "the", "b": [0.5355, 0.1689, 0.5616, 0.1838]}, {"w": "ensemble", "b": [0.5677, 0.1689, 0.6413, 0.1838]}, {"w": "model.", "b": [0.6474, 0.1689, 0.7021, 0.1838]}, {"w": "There", "b": [0.7103, 0.1689, 0.7583, 0.1838]}, {"w": "are", "b": [0.7644, 0.1689, 0.7895, 0.1838]}, {"w": "ensemble", "b": [0.7956, 0.1689, 0.8691, 0.1838]}, {"w": "learning", "b": [0.1312, 0.1868, 0.1972, 0.2018]}, {"w": "algorithms,", "b": [0.2034, 0.1868, 0.2956, 0.2018]}, {"w": "such", "b": [0.3019, 0.1868, 0.3381, 0.2018]}, {"w": "as", "b": [0.3443, 0.1868, 0.3612, 0.2018]}, {"w": "random", "b": [0.3674, 0.1868, 0.4302, 0.2018]}, {"w": "forest", "b": [0.4364, 0.1868, 0.4821, 0.2018]}, {"w": "and", "b": [0.4883, 0.1868, 0.5187, 0.2018]}, {"w": "gradient", "b": [0.5249, 0.1868, 0.5924, 0.2018]}, {"w": "boosting,", "b": [0.5987, 0.1868, 0.674, 0.2018]}, {"w": "that", "b": [0.6803, 0.1868, 0.7148, 0.2018]}, {"w": "build", "b": [0.7211, 0.1868, 0.7629, 0.2018]}, {"w": "an", "b": [0.7691, 0.1868, 0.789, 0.2018]}, {"w": "ensemble", "b": [0.7952, 0.1868, 0.8691, 0.2018]}, {"w": "of", "b": [0.1312, 0.2048, 0.1464, 0.2197]}, {"w": "several", "b": [0.1542, 0.2048, 0.2098, 0.2197]}, {"w": "hundred", "b": [0.2176, 0.2048, 0.2851, 0.2197]}, {"w": "to", "b": [0.2929, 0.2048, 0.3097, 0.2197]}, {"w": "thousands", "b": [0.3175, 0.2048, 0.4003, 0.2197]}, {"w": "of", "b": [0.4081, 0.2048, 0.4233, 0.2197]}, {"w": "weak", "b": [0.4311, 0.2048, 0.4719, 0.2197]}, {"w": "models,", "b": [0.4797, 0.2048, 0.542, 0.2197]}, {"w": "and", "b": [0.5502, 0.2048, 0.5805, 0.2197]}, {"w": "obtain", "b": [0.5883, 0.2048, 0.6406, 0.2197]}, {"w": "a", "b": [0.6484, 0.2048, 0.6578, 0.2197]}, {"w": "strong", "b": [0.6656, 0.2048, 0.717, 0.2197]}, {"w": "model", "b": [0.7248, 0.2048, 0.7745, 0.2197]}, {"w": "that", "b": [0.7823, 0.2048, 0.8168, 0.2197]}, {"w": "has", "b": [0.8246, 0.2048, 0.8519, 0.2197]}, {"w": "a", "b": [0.8597, 0.2048, 0.8691, 0.2197]}, {"w": "significantly", "b": [0.1312, 0.2227, 0.2277, 0.2377]}, {"w": "better", "b": [0.2339, 0.2227, 0.2827, 0.2377]}, {"w": "performance", "b": [0.2888, 0.2227, 0.3884, 0.2377]}, {"w": "than", "b": [0.3945, 0.2227, 0.4315, 0.2377]}, {"w": "the", "b": [0.4376, 0.2227, 0.4632, 0.2377]}, {"w": "performance", "b": [0.4694, 0.2227, 0.569, 0.2377]}, {"w": "of", "b": [0.5751, 0.2227, 0.59, 0.2377]}, {"w": "each", "b": [0.5962, 0.2227, 0.6315, 0.2377]}, {"w": "weak", "b": [0.6377, 0.2227, 0.6777, 0.2377]}, {"w": "model.", "b": [0.6838, 0.2227, 0.7376, 0.2377]}]}, {"id": "b_2", "type": "paragraph", "text": "Strong models can be combined into an ensemble model by averaging their outputs (for regression) or by taking a majority vote (for classification). Model stacking, being the most effective of the ensembling methods, consists of training a meta-model that takes the output of base models as input.", "words": [{"w": "Strong", "b": [0.1312, 0.2496, 0.1857, 0.2646]}, {"w": "models", "b": [0.1931, 0.2496, 0.2502, 0.2646]}, {"w": "can", "b": [0.2576, 0.2496, 0.2859, 0.2646]}, {"w": "be", "b": [0.2933, 0.2496, 0.3126, 0.2646]}, {"w": "combined", "b": [0.3201, 0.2496, 0.398, 0.2646]}, {"w": "into", "b": [0.4054, 0.2496, 0.4373, 0.2646]}, {"w": "an", "b": [0.4447, 0.2496, 0.4646, 0.2646]}, {"w": "ensemble", "b": [0.472, 0.2496, 0.5459, 0.2646]}, {"w": "model", "b": [0.5533, 0.2496, 0.603, 0.2646]}, {"w": "by", "b": [0.6104, 0.2496, 0.6303, 0.2646]}, {"w": "averaging", "b": [0.6377, 0.2496, 0.7157, 0.2646]}, {"w": "their", "b": [0.7231, 0.2496, 0.7619, 0.2646]}, {"w": "outputs", "b": [0.7693, 0.2496, 0.8322, 0.2646]}, {"w": "(for", "b": [0.8396, 0.2496, 0.8695, 0.2646]}, {"w": "regression)", "b": [0.1312, 0.2676, 0.2175, 0.2825]}, {"w": "or", "b": [0.2237, 0.2676, 0.2401, 0.2825]}, {"w": "by", "b": [0.2463, 0.2676, 0.2657, 0.2825]}, {"w": "taking", "b": [0.2718, 0.2676, 0.3225, 0.2825]}, {"w": "a", "b": [0.3286, 0.2676, 0.3378, 0.2825]}, {"w": "majority", "b": [0.344, 0.2676, 0.4126, 0.2825]}, {"w": "vote", "b": [0.4187, 0.2676, 0.4525, 0.2825]}, {"w": "(for", "b": [0.4587, 0.2676, 0.4879, 0.2825]}, {"w": "classification).", "b": [0.494, 0.2676, 0.6079, 0.2825]}, {"w": "Model", "b": [0.616, 0.2676, 0.6662, 0.2825]}, {"w": "stacking,", "b": [0.6724, 0.2676, 0.7431, 0.2825]}, {"w": "being", "b": [0.7492, 0.2676, 0.7927, 0.2825]}, {"w": "the", "b": [0.7989, 0.2676, 0.8245, 0.2825]}, {"w": "most", "b": [0.8306, 0.2676, 0.8696, 0.2825]}, {"w": "effective", "b": [0.1312, 0.2855, 0.1955, 0.3005]}, {"w": "of", "b": [0.2016, 0.2855, 0.2163, 0.3005]}, {"w": "the", "b": [0.2225, 0.2855, 0.2478, 0.3005]}, {"w": "ensembling", "b": [0.2539, 0.2855, 0.3416, 0.3005]}, {"w": "methods,", "b": [0.3477, 0.2855, 0.4202, 0.3005]}, {"w": "consists", "b": [0.4263, 0.2855, 0.4874, 0.3005]}, {"w": "of", "b": [0.4935, 0.2855, 0.5082, 0.3005]}, {"w": "training", "b": [0.5143, 0.2855, 0.5771, 0.3005]}, {"w": "a", "b": [0.5833, 0.2855, 0.5924, 0.3005]}, {"w": "meta-model", "b": [0.5985, 0.2855, 0.6921, 0.3005]}, {"w": "that", "b": [0.6982, 0.2855, 0.7316, 0.3005]}, {"w": "takes", "b": [0.7378, 0.2855, 0.7784, 0.3005]}, {"w": "the", "b": [0.7845, 0.2855, 0.8098, 0.3005]}, {"w": "output", "b": [0.8159, 0.2855, 0.8696, 0.3005]}, {"w": "of", "b": [0.1312, 0.3035, 0.1461, 0.3184]}, {"w": "base", "b": [0.1522, 0.3035, 0.1872, 0.3184]}, {"w": "models", "b": [0.1934, 0.3035, 0.2494, 0.3184]}, {"w": "as", "b": [0.2555, 0.3035, 0.272, 0.3184]}, {"w": "input.", "b": [0.2782, 0.3035, 0.3264, 0.3184]}]}, {"id": "b_3", "type": "paragraph", "text": "In addition to using over- and undersampling, imbalanced learning problems can be solved by applying class weighting and ensemble of resampled datasets. If you train your model using stochastic gradient descent, the class imbalance can be tackled in two additional ways: 1) by setting different learning rates for different classes, and 2) by making several consecutive updates of the model parameters each time you encounter an example of a minority class.", "words": [{"w": "In", "b": [0.1312, 0.3304, 0.1483, 0.3453]}, {"w": "addition", "b": [0.1544, 0.3304, 0.2216, 0.3453]}, {"w": "to", "b": [0.2277, 0.3304, 0.2443, 0.3453]}, {"w": "using", "b": [0.2504, 0.3304, 0.2929, 0.3453]}, {"w": "over-", "b": [0.299, 0.3304, 0.3389, 0.3453]}, {"w": "and", "b": [0.345, 0.3304, 0.375, 0.3453]}, {"w": "undersampling,", "b": [0.3811, 0.3304, 0.5053, 0.3453]}, {"w": "imbalanced", "b": [0.5115, 0.3304, 0.6029, 0.3453]}, {"w": "learning", "b": [0.6091, 0.3304, 0.6743, 0.3453]}, {"w": "problems", "b": [0.6804, 0.3304, 0.7539, 0.3453]}, {"w": "can", "b": [0.7601, 0.3304, 0.788, 0.3453]}, {"w": "be", "b": [0.7941, 0.3304, 0.8133, 0.3453]}, {"w": "solved", "b": [0.8194, 0.3304, 0.8691, 0.3453]}, {"w": "by", "b": [0.1312, 0.3483, 0.1511, 0.3633]}, {"w": "applying", "b": [0.1577, 0.3483, 0.2283, 0.3633]}, {"w": "class", "b": [0.2349, 0.3483, 0.2728, 0.3633]}, {"w": "weighting", "b": [0.2794, 0.3483, 0.3578, 0.3633]}, {"w": "and", "b": [0.3644, 0.3483, 0.3947, 0.3633]}, {"w": "ensemble", "b": [0.4013, 0.3483, 0.4752, 0.3633]}, {"w": "of", "b": [0.4818, 0.3483, 0.4969, 0.3633]}, {"w": "resampled", "b": [0.5035, 0.3483, 0.5863, 0.3633]}, {"w": "datasets.", "b": [0.5929, 0.3483, 0.6653, 0.3633]}, {"w": "If", "b": [0.6748, 0.3483, 0.6874, 0.3633]}, {"w": "you", "b": [0.6939, 0.3483, 0.7232, 0.3633]}, {"w": "train", "b": [0.7298, 0.3483, 0.7696, 0.3633]}, {"w": "your", "b": [0.7762, 0.3483, 0.8128, 0.3633]}, {"w": "model", "b": [0.8194, 0.3483, 0.8691, 0.3633]}, {"w": "using", "b": [0.1312, 0.3663, 0.1729, 0.3812]}, {"w": "stochastic", "b": [0.1791, 0.3663, 0.2574, 0.3812]}, {"w": "gradient", "b": [0.2635, 0.3663, 0.329, 0.3812]}, {"w": "descent,", "b": [0.3352, 0.3663, 0.3987, 0.3812]}, {"w": "the", "b": [0.4048, 0.3663, 0.4302, 0.3812]}, {"w": "class", "b": [0.4363, 0.3663, 0.473, 0.3812]}, {"w": "imbalance", "b": [0.4792, 0.3663, 0.5588, 0.3812]}, {"w": "can", "b": [0.5649, 0.3663, 0.5923, 0.3812]}, {"w": "be", "b": [0.5985, 0.3663, 0.6173, 0.3812]}, {"w": "tackled", "b": [0.6234, 0.3663, 0.6802, 0.3812]}, {"w": "in", "b": [0.6864, 0.3663, 0.7016, 0.3812]}, {"w": "two", "b": [0.7077, 0.3663, 0.7361, 0.3812]}, {"w": "additional", "b": [0.7422, 0.3663, 0.8224, 0.3812]}, {"w": "ways:", "b": [0.8285, 0.3663, 0.8717, 0.3812]}, {"w": "1)", "b": [0.1303, 0.3842, 0.1464, 0.3992]}, {"w": "by", "b": [0.1517, 0.3842, 0.1708, 0.3992]}, {"w": "setting", "b": [0.1761, 0.3842, 0.2295, 0.3992]}, {"w": "different", "b": [0.2348, 0.3842, 0.3002, 0.3992]}, {"w": "learning", "b": [0.3055, 0.3842, 0.3688, 0.3992]}, {"w": "rates", "b": [0.3741, 0.3842, 0.4125, 0.3992]}, {"w": "for", "b": [0.4178, 0.3842, 0.4395, 0.3992]}, {"w": "different", "b": [0.4448, 0.3842, 0.5101, 0.3992]}, {"w": "classes,", "b": [0.5155, 0.3842, 0.5721, 0.3992]}, {"w": "and", "b": [0.5775, 0.3842, 0.6067, 0.3992]}, {"w": "2)", "b": [0.612, 0.3842, 0.6281, 0.3992]}, {"w": "by", "b": [0.6334, 0.3842, 0.6525, 0.3992]}, {"w": "making", "b": [0.6578, 0.3842, 0.7156, 0.3992]}, {"w": "several", "b": [0.7209, 0.3842, 0.7743, 0.3992]}, {"w": "consecutive", "b": [0.7796, 0.3842, 0.8692, 0.3992]}, {"w": "updates", "b": [0.1312, 0.4022, 0.1944, 0.4171]}, {"w": "of", "b": [0.2006, 0.4022, 0.2154, 0.4171]}, {"w": "the", "b": [0.2216, 0.4022, 0.2472, 0.4171]}, {"w": "model", "b": [0.2534, 0.4022, 0.3021, 0.4171]}, {"w": "parameters", "b": [0.3082, 0.4022, 0.3976, 0.4171]}, {"w": "each", "b": [0.4038, 0.4022, 0.4392, 0.4171]}, {"w": "time", "b": [0.4453, 0.4022, 0.4812, 0.4171]}, {"w": "you", "b": [0.4874, 0.4022, 0.5161, 0.4171]}, {"w": "encounter", "b": [0.5222, 0.4022, 0.6007, 0.4171]}, {"w": "an", "b": [0.6069, 0.4022, 0.6264, 0.4171]}, {"w": "example", "b": [0.6325, 0.4022, 0.6987, 0.4171]}, {"w": "of", "b": [0.7048, 0.4022, 0.7197, 0.4171]}, {"w": "a", "b": [0.7258, 0.4022, 0.7351, 0.4171]}, {"w": "minority", "b": [0.7412, 0.4022, 0.8099, 0.4171]}, {"w": "class.", "b": [0.8161, 0.4022, 0.8584, 0.4171]}]}, {"id": "b_4", "type": "paragraph", "text": "For imbalanced learning problems, the performance of the model is measured using adapted performance metrics such as per-class accuracy and Cohen’s kappa statistic.", "words": [{"w": "For", "b": [0.1312, 0.4291, 0.1579, 0.444]}, {"w": "imbalanced", "b": [0.1641, 0.4291, 0.254, 0.444]}, {"w": "learning", "b": [0.2602, 0.4291, 0.3242, 0.444]}, {"w": "problems,", "b": [0.3304, 0.4291, 0.4078, 0.444]}, {"w": "the", "b": [0.4139, 0.4291, 0.4394, 0.444]}, {"w": "performance", "b": [0.4455, 0.4291, 0.5442, 0.444]}, {"w": "of", "b": [0.5503, 0.4291, 0.5651, 0.444]}, {"w": "the", "b": [0.5712, 0.4291, 0.5967, 0.444]}, {"w": "model", "b": [0.6028, 0.4291, 0.6511, 0.444]}, {"w": "is", "b": [0.6572, 0.4291, 0.6695, 0.444]}, {"w": "measured", "b": [0.6757, 0.4291, 0.751, 0.444]}, {"w": "using", "b": [0.7572, 0.4291, 0.799, 0.444]}, {"w": "adapted", "b": [0.8051, 0.4291, 0.8691, 0.444]}, {"w": "performance", "b": [0.1312, 0.447, 0.2308, 0.462]}, {"w": "metrics", "b": [0.237, 0.447, 0.2956, 0.462]}, {"w": "such", "b": [0.3017, 0.447, 0.3372, 0.462]}, {"w": "as", "b": [0.3434, 0.447, 0.3599, 0.462]}, {"w": "per-class", "b": [0.366, 0.447, 0.4355, 0.462]}, {"w": "accuracy", "b": [0.4417, 0.447, 0.512, 0.462]}, {"w": "and", "b": [0.5181, 0.447, 0.5479, 0.462]}, {"w": "Cohen’s", "b": [0.554, 0.447, 0.6177, 0.462]}, {"w": "kappa", "b": [0.6238, 0.447, 0.6726, 0.462]}, {"w": "statistic.", "b": [0.6787, 0.447, 0.7476, 0.462]}]}, {"id": "b_5", "type": "paragraph", "text": "Troubleshooting a machine learning pipeline can be hard. Poor performance can be caused by a bug in your code, training data errors, learning algorithm issues, or pipeline design. In addition, learning can be sensitive to small changes in hyperparameters and dataset makeup.", "words": [{"w": "Troubleshooting", "b": [0.1306, 0.474, 0.2615, 0.4889]}, {"w": "a", "b": [0.2676, 0.474, 0.2769, 0.4889]}, {"w": "machine", "b": [0.283, 0.474, 0.3494, 0.4889]}, {"w": "learning", "b": [0.3556, 0.474, 0.4205, 0.4889]}, {"w": "pipeline", "b": [0.4266, 0.474, 0.49, 0.4889]}, {"w": "can", "b": [0.4961, 0.474, 0.5239, 0.4889]}, {"w": "be", "b": [0.5301, 0.474, 0.5491, 0.4889]}, {"w": "hard.", "b": [0.5552, 0.474, 0.5975, 0.4889]}, {"w": "Poor", "b": [0.6057, 0.474, 0.6441, 0.4889]}, {"w": "performance", "b": [0.6502, 0.474, 0.7502, 0.4889]}, {"w": "can", "b": [0.7564, 0.474, 0.7842, 0.4889]}, {"w": "be", "b": [0.7903, 0.474, 0.8093, 0.4889]}, {"w": "caused", "b": [0.8155, 0.474, 0.8692, 0.4889]}, {"w": "by", "b": [0.1312, 0.4919, 0.1506, 0.5069]}, {"w": "a", "b": [0.1567, 0.4919, 0.1659, 0.5069]}, {"w": "bug", "b": [0.1721, 0.4919, 0.2016, 0.5069]}, {"w": "in", "b": [0.2078, 0.4919, 0.2231, 0.5069]}, {"w": "your", "b": [0.2292, 0.4919, 0.2649, 0.5069]}, {"w": "code,", "b": [0.2711, 0.4919, 0.3124, 0.5069]}, {"w": "training", "b": [0.3185, 0.4919, 0.3818, 0.5069]}, {"w": "data", "b": [0.3879, 0.4919, 0.4236, 0.5069]}, {"w": "errors,", "b": [0.4297, 0.4919, 0.481, 0.5069]}, {"w": "learning", "b": [0.4871, 0.4919, 0.5514, 0.5069]}, {"w": "algorithm", "b": [0.5575, 0.4919, 0.635, 0.5069]}, {"w": "issues,", "b": [0.6412, 0.4919, 0.6915, 0.5069]}, {"w": "or", "b": [0.6976, 0.4919, 0.714, 0.5069]}, {"w": "pipeline", "b": [0.7201, 0.4919, 0.7828, 0.5069]}, {"w": "design.", "b": [0.789, 0.4919, 0.8441, 0.5069]}, {"w": "In", "b": [0.8523, 0.4919, 0.8691, 0.5069]}, {"w": "addition,", "b": [0.1312, 0.5098, 0.2019, 0.5248]}, {"w": "learning", "b": [0.2081, 0.5098, 0.2718, 0.5248]}, {"w": "can", "b": [0.2779, 0.5098, 0.3052, 0.5248]}, {"w": "be", "b": [0.3113, 0.5098, 0.33, 0.5248]}, {"w": "sensitive", "b": [0.3361, 0.5098, 0.403, 0.5248]}, {"w": "to", "b": [0.4091, 0.5098, 0.4253, 0.5248]}, {"w": "small", "b": [0.4314, 0.5098, 0.4729, 0.5248]}, {"w": "changes", "b": [0.479, 0.5098, 0.5402, 0.5248]}, {"w": "in", "b": [0.5464, 0.5098, 0.5615, 0.5248]}, {"w": "hyperparameters", "b": [0.5676, 0.5098, 0.7007, 0.5248]}, {"w": "and", "b": [0.7068, 0.5098, 0.7361, 0.5248]}, {"w": "dataset", "b": [0.7423, 0.5098, 0.7999, 0.5248]}, {"w": "makeup.", "b": [0.8061, 0.5098, 0.8727, 0.5248]}]}, {"id": "b_6", "type": "paragraph", "text": "Errors made by a machine learning model can be uniform and appear in all use cases with the same rate, or focused and appear in just certain types of use cases.", "words": [{"w": "Errors", "b": [0.1312, 0.5368, 0.1825, 0.5517]}, {"w": "made", "b": [0.1887, 0.5368, 0.2322, 0.5517]}, {"w": "by", "b": [0.2383, 0.5368, 0.258, 0.5517]}, {"w": "a", "b": [0.2641, 0.5368, 0.2734, 0.5517]}, {"w": "machine", "b": [0.2796, 0.5368, 0.3464, 0.5517]}, {"w": "learning", "b": [0.3525, 0.5368, 0.4179, 0.5517]}, {"w": "model", "b": [0.424, 0.5368, 0.4732, 0.5517]}, {"w": "can", "b": [0.4793, 0.5368, 0.5073, 0.5517]}, {"w": "be", "b": [0.5134, 0.5368, 0.5326, 0.5517]}, {"w": "uniform", "b": [0.5388, 0.5368, 0.6025, 0.5517]}, {"w": "and", "b": [0.6086, 0.5368, 0.6387, 0.5517]}, {"w": "appear", "b": [0.6448, 0.5368, 0.7003, 0.5517]}, {"w": "in", "b": [0.7064, 0.5368, 0.722, 0.5517]}, {"w": "all", "b": [0.7281, 0.5368, 0.7478, 0.5517]}, {"w": "use", "b": [0.7539, 0.5368, 0.7799, 0.5517]}, {"w": "cases", "b": [0.7861, 0.5368, 0.8267, 0.5517]}, {"w": "with", "b": [0.8329, 0.5368, 0.8691, 0.5517]}, {"w": "the", "b": [0.1312, 0.5547, 0.1569, 0.5697]}, {"w": "same", "b": [0.163, 0.5547, 0.2031, 0.5697]}, {"w": "rate,", "b": [0.2093, 0.5547, 0.2462, 0.5697]}, {"w": "or", "b": [0.2524, 0.5547, 0.2688, 0.5697]}, {"w": "focused", "b": [0.275, 0.5547, 0.3346, 0.5697]}, {"w": "and", "b": [0.3407, 0.5547, 0.3705, 0.5697]}, {"w": "appear", "b": [0.3766, 0.5547, 0.4316, 0.5697]}, {"w": "in", "b": [0.4377, 0.5547, 0.4531, 0.5697]}, {"w": "just", "b": [0.4592, 0.5547, 0.4896, 0.5697]}, {"w": "certain", "b": [0.4957, 0.5547, 0.5512, 0.5697]}, {"w": "types", "b": [0.5573, 0.5547, 0.6, 0.5697]}, {"w": "of", "b": [0.6062, 0.5547, 0.621, 0.5697]}, {"w": "use", "b": [0.6272, 0.5547, 0.6529, 0.5697]}, {"w": "cases.", "b": [0.6591, 0.5547, 0.7044, 0.5697]}]}, {"id": "b_7", "type": "paragraph", "text": "Focused errors are those that merit special attention, because by fixing an error pattern, you fix it once for many examples.", "words": [{"w": "Focused", "b": [0.1312, 0.5816, 0.1944, 0.5966]}, {"w": "errors", "b": [0.2005, 0.5816, 0.246, 0.5966]}, {"w": "are", "b": [0.2522, 0.5816, 0.2763, 0.5966]}, {"w": "those", "b": [0.2825, 0.5816, 0.3238, 0.5966]}, {"w": "that", "b": [0.3299, 0.5816, 0.3631, 0.5966]}, {"w": "merit", "b": [0.3692, 0.5816, 0.4115, 0.5966]}, {"w": "special", "b": [0.4176, 0.5816, 0.4705, 0.5966]}, {"w": "attention,", "b": [0.4766, 0.5816, 0.5535, 0.5966]}, {"w": "because", "b": [0.5596, 0.5816, 0.6206, 0.5966]}, {"w": "by", "b": [0.6267, 0.5816, 0.6458, 0.5966]}, {"w": "fixing", "b": [0.6519, 0.5816, 0.6957, 0.5966]}, {"w": "an", "b": [0.7018, 0.5816, 0.7209, 0.5966]}, {"w": "error", "b": [0.727, 0.5816, 0.7654, 0.5966]}, {"w": "pattern,", "b": [0.7715, 0.5816, 0.8349, 0.5966]}, {"w": "you", "b": [0.841, 0.5816, 0.8692, 0.5966]}, {"w": "fix", "b": [0.1312, 0.5996, 0.1512, 0.6145]}, {"w": "it", "b": [0.1574, 0.5996, 0.1697, 0.6145]}, {"w": "once", "b": [0.1758, 0.5996, 0.2117, 0.6145]}, {"w": "for", "b": [0.2179, 0.5996, 0.24, 0.6145]}, {"w": "many", "b": [0.2461, 0.5996, 0.2902, 0.6145]}, {"w": "examples.", "b": [0.2964, 0.5996, 0.3749, 0.6145]}]}, {"id": "b_8", "type": "paragraph", "text": "The performance of the model can be iteratively improved using the following simple process:", "words": [{"w": "The", "b": [0.1306, 0.6265, 0.1617, 0.6415]}, {"w": "performance", "b": [0.1677, 0.6265, 0.2652, 0.6415]}, {"w": "of", "b": [0.2712, 0.6265, 0.2858, 0.6415]}, {"w": "the", "b": [0.2917, 0.6265, 0.3168, 0.6415]}, {"w": "model", "b": [0.3228, 0.6265, 0.3705, 0.6415]}, {"w": "can", "b": [0.3764, 0.6265, 0.4036, 0.6415]}, {"w": "be", "b": [0.4095, 0.6265, 0.4281, 0.6415]}, {"w": "iteratively", "b": [0.434, 0.6265, 0.514, 0.6415]}, {"w": "improved", "b": [0.5199, 0.6265, 0.5928, 0.6415]}, {"w": "using", "b": [0.5987, 0.6265, 0.6401, 0.6415]}, {"w": "the", "b": [0.646, 0.6265, 0.6711, 0.6415]}, {"w": "following", "b": [0.6771, 0.6265, 0.7474, 0.6415]}, {"w": "simple", "b": [0.7533, 0.6265, 0.8037, 0.6415]}, {"w": "process:", "b": [0.8096, 0.6265, 0.8717, 0.6415]}]}, {"id": "b_9", "type": "paragraph", "text": "1. Train the model using the best values of hyperparameters identified so far. 2. Test the model by applying it to a small subset of the validation set (100−300 examples). 3. Find the most frequent error patterns on that small validation set. Remove those examples from the validation set, because your model will now overfit to them. 4. Generate new features, or add more training data to fix the observed error patterns. 5. Repeat until no frequent error patterns are observed (most errors look dissimilar).", "words": [{"w": "1.", "b": [0.1538, 0.6534, 0.1681, 0.6684]}, {"w": "Train", "b": [0.1774, 0.6534, 0.221, 0.6684]}, {"w": "the", "b": [0.2271, 0.6534, 0.2528, 0.6684]}, {"w": "model", "b": [0.2589, 0.6534, 0.3076, 0.6684]}, {"w": "using", "b": [0.3138, 0.6534, 0.3559, 0.6684]}, {"w": "the", "b": [0.3621, 0.6534, 0.3877, 0.6684]}, {"w": "best", "b": [0.3939, 0.6534, 0.4273, 0.6684]}, {"w": "values", "b": [0.4335, 0.6534, 0.4823, 0.6684]}, {"w": "of", "b": [0.4884, 0.6534, 0.5033, 0.6684]}, {"w": "hyperparameters", "b": [0.5094, 0.6534, 0.6446, 0.6684]}, {"w": "identified", "b": [0.6507, 0.6534, 0.7251, 0.6684]}, {"w": "so", "b": [0.7312, 0.6534, 0.7477, 0.6684]}, {"w": "far.", "b": [0.7539, 0.6534, 0.7811, 0.6684]}, {"w": "2.", "b": [0.1538, 0.6714, 0.1681, 0.6863]}, {"w": "Test", "b": [0.1774, 0.6714, 0.2111, 0.6863]}, {"w": "the", "b": [0.2159, 0.6714, 0.241, 0.6863]}, {"w": "model", "b": [0.2458, 0.6714, 0.2935, 0.6863]}, {"w": "by", "b": [0.2983, 0.6714, 0.3174, 0.6863]}, {"w": "applying", "b": [0.3222, 0.6714, 0.39, 0.6863]}, {"w": "it", "b": [0.3948, 0.6714, 0.4068, 0.6863]}, {"w": "to", "b": [0.4116, 0.6714, 0.4277, 0.6863]}, {"w": "a", "b": [0.4325, 0.6714, 0.4415, 0.6863]}, {"w": "small", "b": [0.4463, 0.6714, 0.4876, 0.6863]}, {"w": "subset", "b": [0.4924, 0.6714, 0.5418, 0.6863]}, {"w": "of", "b": [0.5466, 0.6714, 0.5612, 0.6863]}, {"w": "the", "b": [0.5659, 0.6714, 0.5911, 0.6863]}, {"w": "validation", "b": [0.5959, 0.6714, 0.6737, 0.6863]}, {"w": "set", "b": [0.6785, 0.6714, 0.7007, 0.6863]}, {"w": "(100−300", "b": [0.7055, 0.6714, 0.7836, 0.6864]}, {"w": "examples).", "b": [0.7884, 0.6714, 0.8724, 0.6863]}, {"w": "3.", "b": [0.1538, 0.6893, 0.1681, 0.7043]}, {"w": "Find", "b": [0.1774, 0.6893, 0.2158, 0.7043]}, {"w": "the", "b": [0.2235, 0.6893, 0.2496, 0.7043]}, {"w": "most", "b": [0.2573, 0.6893, 0.2972, 0.7043]}, {"w": "frequent", "b": [0.3048, 0.6893, 0.3724, 0.7043]}, {"w": "error", "b": [0.3801, 0.6893, 0.42, 0.7043]}, {"w": "patterns", "b": [0.4277, 0.6893, 0.4958, 0.7043]}, {"w": "on", "b": [0.5035, 0.6893, 0.5234, 0.7043]}, {"w": "that", "b": [0.531, 0.6893, 0.5656, 0.7043]}, {"w": "small", "b": [0.5732, 0.6893, 0.6162, 0.7043]}, {"w": "validation", "b": [0.6239, 0.6893, 0.705, 0.7043]}, {"w": "set.", "b": [0.7126, 0.6893, 0.741, 0.7043]}, {"w": "Remove", "b": [0.7538, 0.6893, 0.8184, 0.7043]}, {"w": "those", "b": [0.8261, 0.6893, 0.8691, 0.7043]}, {"w": "examples", "b": [0.1774, 0.7073, 0.2508, 0.7222]}, {"w": "from", "b": [0.2569, 0.7073, 0.2944, 0.7222]}, {"w": "the", "b": [0.3005, 0.7073, 0.3262, 0.7222]}, {"w": "validation", "b": [0.3323, 0.7073, 0.4118, 0.7222]}, {"w": "set,", "b": [0.418, 0.7073, 0.4458, 0.7222]}, {"w": "because", "b": [0.4519, 0.7073, 0.5141, 0.7222]}, {"w": "your", "b": [0.5202, 0.7073, 0.5562, 0.7222]}, {"w": "model", "b": [0.5623, 0.7073, 0.611, 0.7222]}, {"w": "will", "b": [0.6172, 0.7073, 0.6459, 0.7222]}, {"w": "now", "b": [0.652, 0.7073, 0.6843, 0.7222]}, {"w": "overfit", "b": [0.6905, 0.7073, 0.7413, 0.7222]}, {"w": "to", "b": [0.7474, 0.7073, 0.7638, 0.7222]}, {"w": "them.", "b": [0.77, 0.7073, 0.8161, 0.7222]}, {"w": "4.", "b": [0.1538, 0.7252, 0.1681, 0.7402]}, {"w": "Generate", "b": [0.1774, 0.7252, 0.2504, 0.7402]}, {"w": "new", "b": [0.2565, 0.7252, 0.2883, 0.7402]}, {"w": "features,", "b": [0.2944, 0.7252, 0.3628, 0.7402]}, {"w": "or", "b": [0.369, 0.7252, 0.3854, 0.7402]}, {"w": "add", "b": [0.3916, 0.7252, 0.4213, 0.7402]}, {"w": "more", "b": [0.4275, 0.7252, 0.4675, 0.7402]}, {"w": "training", "b": [0.4736, 0.7252, 0.5373, 0.7402]}, {"w": "data", "b": [0.5434, 0.7252, 0.5793, 0.7402]}, {"w": "to", "b": [0.5855, 0.7252, 0.6019, 0.7402]}, {"w": "fix", "b": [0.608, 0.7252, 0.628, 0.7402]}, {"w": "the", "b": [0.6341, 0.7252, 0.6598, 0.7402]}, {"w": "observed", "b": [0.6659, 0.7252, 0.7358, 0.7402]}, {"w": "error", "b": [0.742, 0.7252, 0.7811, 0.7402]}, {"w": "patterns.", "b": [0.7873, 0.7252, 0.8592, 0.7402]}, {"w": "5.", "b": [0.1538, 0.7432, 0.1681, 0.7581]}, {"w": "Repeat", "b": [0.1774, 0.7432, 0.2345, 0.7581]}, {"w": "until", "b": [0.2407, 0.7432, 0.2781, 0.7581]}, {"w": "no", "b": [0.2843, 0.7432, 0.3037, 0.7581]}, {"w": "frequent", "b": [0.3099, 0.7432, 0.3761, 0.7581]}, {"w": "error", "b": [0.3823, 0.7432, 0.4214, 0.7581]}, {"w": "patterns", "b": [0.4275, 0.7432, 0.4944, 0.7581]}, {"w": "are", "b": [0.5005, 0.7432, 0.5252, 0.7581]}, {"w": "observed", "b": [0.5313, 0.7432, 0.6012, 0.7581]}, {"w": "(most", "b": [0.6074, 0.7432, 0.6536, 0.7581]}, {"w": "errors", "b": [0.6598, 0.7432, 0.7062, 0.7581]}, {"w": "look", "b": [0.7123, 0.7432, 0.7462, 0.7581]}, {"w": "dissimilar).", "b": [0.7523, 0.7432, 0.8418, 0.7581]}]}, {"id": "b_10", "type": "paragraph", "text": "In complex machine learning systems, the error analysis is done by parts. We first substitute the predictions of one model for the perfect labels (such as human-provided labels), and see how the performance of the entire system improves. If it improves significantly, then more effort must be put in improving that specific model.", "words": [{"w": "In", "b": [0.1312, 0.7701, 0.1478, 0.785]}, {"w": "complex", "b": [0.1539, 0.7701, 0.2188, 0.785]}, {"w": "machine", "b": [0.2249, 0.7701, 0.2897, 0.785]}, {"w": "learning", "b": [0.2958, 0.7701, 0.3592, 0.785]}, {"w": "systems,", "b": [0.3653, 0.7701, 0.4315, 0.785]}, {"w": "the", "b": [0.4376, 0.7701, 0.4627, 0.785]}, {"w": "error", "b": [0.4688, 0.7701, 0.5072, 0.785]}, {"w": "analysis", "b": [0.5133, 0.7701, 0.5753, 0.785]}, {"w": "is", "b": [0.5815, 0.7701, 0.5936, 0.785]}, {"w": "done", "b": [0.5998, 0.7701, 0.637, 0.785]}, {"w": "by", "b": [0.6431, 0.7701, 0.6622, 0.785]}, {"w": "parts.", "b": [0.6683, 0.7701, 0.7137, 0.785]}, {"w": "We", "b": [0.7219, 0.7701, 0.747, 0.785]}, {"w": "first", "b": [0.7531, 0.7701, 0.7844, 0.785]}, {"w": "substitute", "b": [0.7905, 0.7701, 0.8692, 0.785]}, {"w": "the", "b": [0.1312, 0.788, 0.1567, 0.803]}, {"w": "predictions", "b": [0.1629, 0.788, 0.2507, 0.803]}, {"w": "of", "b": [0.2569, 0.788, 0.2717, 0.803]}, {"w": "one", "b": [0.2778, 0.788, 0.3053, 0.803]}, {"w": "model", "b": [0.3115, 0.788, 0.3599, 0.803]}, {"w": "for", "b": [0.3661, 0.788, 0.388, 0.803]}, {"w": "the", "b": [0.3942, 0.788, 0.4197, 0.803]}, {"w": "perfect", "b": [0.4258, 0.788, 0.4809, 0.803]}, {"w": "labels", "b": [0.4871, 0.788, 0.5326, 0.803]}, {"w": "(such", "b": [0.5387, 0.788, 0.5812, 0.803]}, {"w": "as", "b": [0.5873, 0.788, 0.6037, 0.803]}, {"w": "human-provided", "b": [0.6099, 0.788, 0.7399, 0.803]}, {"w": "labels),", "b": [0.746, 0.788, 0.8037, 0.803]}, {"w": "and", "b": [0.8099, 0.788, 0.8395, 0.803]}, {"w": "see", "b": [0.8456, 0.788, 0.8692, 0.803]}, {"w": "how", "b": [0.1312, 0.806, 0.164, 0.8209]}, {"w": "the", "b": [0.1701, 0.806, 0.1961, 0.8209]}, {"w": "performance", "b": [0.2022, 0.806, 0.3031, 0.8209]}, {"w": "of", "b": [0.3092, 0.806, 0.3243, 0.8209]}, {"w": "the", "b": [0.3305, 0.806, 0.3564, 0.8209]}, {"w": "entire", "b": [0.3626, 0.806, 0.4089, 0.8209]}, {"w": "system", "b": [0.415, 0.806, 0.4708, 0.8209]}, {"w": "improves.", "b": [0.477, 0.806, 0.5545, 0.8209]}, {"w": "If", "b": [0.5627, 0.806, 0.5752, 0.8209]}, {"w": "it", "b": [0.5813, 0.806, 0.5938, 0.8209]}, {"w": "improves", "b": [0.6, 0.806, 0.6723, 0.8209]}, {"w": "significantly,", "b": [0.6785, 0.806, 0.7799, 0.8209]}, {"w": "then", "b": [0.786, 0.806, 0.8224, 0.8209]}, {"w": "more", "b": [0.8286, 0.806, 0.8691, 0.8209]}, {"w": "effort", "b": [0.1312, 0.8239, 0.1738, 0.8389]}, {"w": "must", "b": [0.18, 0.8239, 0.2195, 0.8389]}, {"w": "be", "b": [0.2257, 0.8239, 0.2447, 0.8389]}, {"w": "put", "b": [0.2508, 0.8239, 0.2785, 0.8389]}, {"w": "in", "b": [0.2847, 0.8239, 0.3001, 0.8389]}, {"w": "improving", "b": [0.3062, 0.8239, 0.3873, 0.8389]}, {"w": "that", "b": [0.3934, 0.8239, 0.4273, 0.8389]}, {"w": "specific", "b": [0.4334, 0.8239, 0.4915, 0.8389]}, {"w": "model.", "b": [0.4976, 0.8239, 0.5514, 0.8389]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 41", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "41", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 217, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "For reproducibility, set the random seed and make sure the model is accompanied by all relevant information.", "words": [{"w": "For", "b": [0.1312, 0.0881, 0.1588, 0.1031]}, {"w": "reproducibility,", "b": [0.1658, 0.0881, 0.2904, 0.1031]}, {"w": "set", "b": [0.2976, 0.0881, 0.3208, 0.1031]}, {"w": "the", "b": [0.3278, 0.0881, 0.3539, 0.1031]}, {"w": "random", "b": [0.3609, 0.0881, 0.4237, 0.1031]}, {"w": "seed", "b": [0.4307, 0.0881, 0.4654, 0.1031]}, {"w": "and", "b": [0.4724, 0.0881, 0.5027, 0.1031]}, {"w": "make", "b": [0.5097, 0.0881, 0.5526, 0.1031]}, {"w": "sure", "b": [0.5596, 0.0881, 0.5932, 0.1031]}, {"w": "the", "b": [0.6002, 0.0881, 0.6264, 0.1031]}, {"w": "model", "b": [0.6334, 0.0881, 0.683, 0.1031]}, {"w": "is", "b": [0.69, 0.0881, 0.7027, 0.1031]}, {"w": "accompanied", "b": [0.7097, 0.0881, 0.8154, 0.1031]}, {"w": "by", "b": [0.8224, 0.0881, 0.8422, 0.1031]}, {"w": "all", "b": [0.8492, 0.0881, 0.8691, 0.1031]}, {"w": "relevant", "b": [0.1312, 0.106, 0.1949, 0.121]}, {"w": "information.", "b": [0.201, 0.106, 0.3, 0.121]}]}, {"id": "b_1", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 42", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "42", "b": [0.8505, 0.9052, 0.869, 0.9202]}]}]}, {"page": 218, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 219, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 220, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "7 Model Evaluation", "words": [{"w": "7", "b": [0.1312, 0.0833, 0.1462, 0.1048]}, {"w": "Model", "b": [0.1761, 0.0833, 0.2588, 0.1048]}, {"w": "Evaluation", "b": [0.2687, 0.0833, 0.408, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "Statistical models play an increasingly important role in the modern organization. When applied in a business context, a model can affect the organization’s financial indicators. However, it may also present a liability risk. Therefore, any model running in production must be carefully and continuously evaluated.", "words": [{"w": "Statistical", "b": [0.1312, 0.13, 0.214, 0.1451]}, {"w": "models", "b": [0.2205, 0.13, 0.2776, 0.1451]}, {"w": "play", "b": [0.2841, 0.13, 0.3186, 0.1451]}, {"w": "an", "b": [0.3251, 0.13, 0.345, 0.1451]}, {"w": "increasingly", "b": [0.3514, 0.13, 0.4484, 0.1451]}, {"w": "important", "b": [0.4549, 0.13, 0.5375, 0.1451]}, {"w": "role", "b": [0.544, 0.13, 0.5744, 0.1451]}, {"w": "in", "b": [0.5809, 0.13, 0.5966, 0.1451]}, {"w": "the", "b": [0.6031, 0.13, 0.6292, 0.1451]}, {"w": "modern", "b": [0.6357, 0.13, 0.698, 0.1451]}, {"w": "organization.", "b": [0.7045, 0.13, 0.8112, 0.1451]}, {"w": "When", "b": [0.8205, 0.13, 0.8691, 0.1451]}, {"w": "applied", "b": [0.1312, 0.148, 0.1909, 0.1631]}, {"w": "in", "b": [0.1989, 0.148, 0.2146, 0.1631]}, {"w": "a", "b": [0.2226, 0.148, 0.232, 0.1631]}, {"w": "business", "b": [0.24, 0.148, 0.3073, 0.1631]}, {"w": "context,", "b": [0.3153, 0.148, 0.3812, 0.1631]}, {"w": "a", "b": [0.3896, 0.148, 0.3991, 0.1631]}, {"w": "model", "b": [0.4071, 0.148, 0.4567, 0.1631]}, {"w": "can", "b": [0.4647, 0.148, 0.493, 0.1631]}, {"w": "affect", "b": [0.501, 0.148, 0.5454, 0.1631]}, {"w": "the", "b": [0.5534, 0.148, 0.5796, 0.1631]}, {"w": "organization’s", "b": [0.5876, 0.148, 0.7017, 0.1631]}, {"w": "financial", "b": [0.7097, 0.148, 0.7788, 0.1631]}, {"w": "indicators.", "b": [0.7868, 0.148, 0.8727, 0.1631]}, {"w": "However,", "b": [0.1312, 0.1659, 0.2061, 0.181]}, {"w": "it", "b": [0.2125, 0.1659, 0.2251, 0.181]}, {"w": "may", "b": [0.2315, 0.1659, 0.266, 0.181]}, {"w": "also", "b": [0.2723, 0.1659, 0.3038, 0.181]}, {"w": "present", "b": [0.3102, 0.1659, 0.3695, 0.181]}, {"w": "a", "b": [0.3759, 0.1659, 0.3853, 0.181]}, {"w": "liability", "b": [0.3916, 0.1659, 0.4544, 0.181]}, {"w": "risk.", "b": [0.4608, 0.1659, 0.496, 0.181]}, {"w": "Therefore,", "b": [0.5049, 0.1659, 0.5892, 0.181]}, {"w": "any", "b": [0.5956, 0.1659, 0.6249, 0.181]}, {"w": "model", "b": [0.6313, 0.1659, 0.681, 0.181]}, {"w": "running", "b": [0.6873, 0.1659, 0.7512, 0.181]}, {"w": "in", "b": [0.7576, 0.1659, 0.7733, 0.181]}, {"w": "production", "b": [0.7796, 0.1659, 0.8691, 0.181]}, {"w": "must", "b": [0.1312, 0.184, 0.1708, 0.1989]}, {"w": "be", "b": [0.177, 0.184, 0.1959, 0.1989]}, {"w": "carefully", "b": [0.2021, 0.184, 0.2709, 0.1989]}, {"w": "and", "b": [0.277, 0.184, 0.3068, 0.1989]}, {"w": "continuously", "b": [0.3129, 0.184, 0.414, 0.1989]}, {"w": "evaluated.", "b": [0.4202, 0.184, 0.5017, 0.1989]}]}, {"id": "b_2", "type": "paragraph", "text": "Model evaluation is the fifth stage in the machine learning project life cycle:", "words": [{"w": "Model", "b": [0.1312, 0.2109, 0.1815, 0.2258]}, {"w": "evaluation", "b": [0.1876, 0.2109, 0.2702, 0.2258]}, {"w": "is", "b": [0.2763, 0.2109, 0.2888, 0.2258]}, {"w": "the", "b": [0.2949, 0.2109, 0.3205, 0.2258]}, {"w": "fifth", "b": [0.3267, 0.2109, 0.36, 0.2258]}, {"w": "stage", "b": [0.3662, 0.2109, 0.4073, 0.2258]}, {"w": "in", "b": [0.4135, 0.2109, 0.4288, 0.2258]}, {"w": "the", "b": [0.435, 0.2109, 0.4606, 0.2258]}, {"w": "machine", "b": [0.4668, 0.2109, 0.5329, 0.2258]}, {"w": "learning", "b": [0.5391, 0.2109, 0.6037, 0.2258]}, {"w": "project", "b": [0.6099, 0.2109, 0.6663, 0.2258]}, {"w": "life", "b": [0.6725, 0.2109, 0.6966, 0.2258]}, {"w": "cycle:", "b": [0.7028, 0.2109, 0.7474, 0.2258]}]}, {"id": "b_3", "type": "paragraph", "text": "Figure 1: Machine learning project life cycle.", "words": [{"w": "Figure", "b": [0.3186, 0.5293, 0.3707, 0.5443]}, {"w": "1:", "b": [0.3769, 0.5293, 0.3912, 0.5443]}, {"w": "Machine", "b": [0.3994, 0.5293, 0.4671, 0.5443]}, {"w": "learning", "b": [0.4733, 0.5293, 0.5379, 0.5443]}, {"w": "project", "b": [0.5441, 0.5293, 0.6006, 0.5443]}, {"w": "life", "b": [0.6067, 0.5293, 0.6308, 0.5443]}, {"w": "cycle.", "b": [0.637, 0.5293, 0.6816, 0.5443]}]}, {"id": "b_4", "type": "paragraph", "text": "Depending on the model’s applicative domain and the organization’s business goals and constraints, model evaluation may include the following tasks:", "words": [{"w": "Depending", "b": [0.1312, 0.5795, 0.2194, 0.5946]}, {"w": "on", "b": [0.2269, 0.5795, 0.2467, 0.5946]}, {"w": "the", "b": [0.2543, 0.5795, 0.2804, 0.5946]}, {"w": "model’s", "b": [0.2879, 0.5795, 0.3503, 0.5946]}, {"w": "applicative", "b": [0.3578, 0.5795, 0.4467, 0.5946]}, {"w": "domain", "b": [0.4542, 0.5795, 0.5149, 0.5946]}, {"w": "and", "b": [0.5224, 0.5795, 0.5527, 0.5946]}, {"w": "the", "b": [0.5602, 0.5795, 0.5864, 0.5946]}, {"w": "organization’s", "b": [0.5939, 0.5795, 0.7081, 0.5946]}, {"w": "business", "b": [0.7156, 0.5795, 0.7829, 0.5946]}, {"w": "goals", "b": [0.7904, 0.5795, 0.8313, 0.5946]}, {"w": "and", "b": [0.8388, 0.5795, 0.8691, 0.5946]}, {"w": "constraints,", "b": [0.1312, 0.5975, 0.2243, 0.6125]}, {"w": "model", "b": [0.2305, 0.5975, 0.2792, 0.6125]}, {"w": "evaluation", "b": [0.2853, 0.5975, 0.3679, 0.6125]}, {"w": "may", "b": [0.374, 0.5975, 0.4078, 0.6125]}, {"w": "include", "b": [0.414, 0.5975, 0.4714, 0.6125]}, {"w": "the", "b": [0.4776, 0.5975, 0.5032, 0.6125]}, {"w": "following", "b": [0.5094, 0.5975, 0.5811, 0.6125]}, {"w": "tasks:", "b": [0.5873, 0.5975, 0.6331, 0.6125]}]}, {"id": "b_5", "type": "paragraph", "text": "• Estimate legal risks of putting the model in production. For example, some model predictions may indirectly communicate confidential information. Cyber attackers or competitors may attempt to reverse engineer the model’s training data. Additionally, when used for prediction, some features, such as age, gender, or race, might result in the organization being considered as biased or even discriminatory. • Study the main properties of distributions of the training data versus the production data. By comparing the statistical distribution of examples, features, and labels, in both train- ing and production data, is how distribution shift is detected. A significant difference between the two indicates a need to update the training data, and retrain the model. • Evaluate the performance of the model. Before the model is deployed in production, its predictive performance must be evaluated on the external data, that is, data not used for training. The external data must include both historical and online examples from the production environment. The context of evaluation on the real-time, online data should closely resemble the production environment.", "words": [{"w": "•", "b": [0.1538, 0.6244, 0.1681, 0.6394]}, {"w": "Estimate", "b": [0.1774, 0.6243, 0.2509, 0.6394]}, {"w": "legal", "b": [0.2581, 0.6243, 0.2957, 0.6394]}, {"w": "risks", "b": [0.3029, 0.6243, 0.3403, 0.6394]}, {"w": "of", "b": [0.3475, 0.6243, 0.3626, 0.6394]}, {"w": "putting", "b": [0.3698, 0.6243, 0.4305, 0.6394]}, {"w": "the", "b": [0.4376, 0.6243, 0.4638, 0.6394]}, {"w": "model", "b": [0.4709, 0.6243, 0.5206, 0.6394]}, {"w": "in", "b": [0.5278, 0.6243, 0.5434, 0.6394]}, {"w": "production.", "b": [0.5506, 0.6243, 0.6453, 0.6394]}, {"w": "For", "b": [0.6565, 0.6243, 0.6841, 0.6394]}, {"w": "example,", "b": [0.6912, 0.6243, 0.7639, 0.6394]}, {"w": "some", "b": [0.7713, 0.6243, 0.8122, 0.6394]}, {"w": "model", "b": [0.8194, 0.6243, 0.8691, 0.6394]}, {"w": "predictions", "b": [0.1774, 0.6423, 0.2666, 0.6574]}, {"w": "may", "b": [0.2727, 0.6423, 0.3069, 0.6574]}, {"w": "indirectly", "b": [0.313, 0.6423, 0.3902, 0.6574]}, {"w": "communicate", "b": [0.3963, 0.6423, 0.5035, 0.6574]}, {"w": "confidential", "b": [0.5096, 0.6423, 0.6034, 0.6574]}, {"w": "information.", "b": [0.6095, 0.6423, 0.7095, 0.6574]}, {"w": "Cyber", "b": [0.7177, 0.6423, 0.7674, 0.6574]}, {"w": "attackers", "b": [0.7735, 0.6423, 0.8467, 0.6574]}, {"w": "or", "b": [0.8528, 0.6423, 0.8695, 0.6574]}, {"w": "competitors", "b": [0.1774, 0.6603, 0.2729, 0.6753]}, {"w": "may", "b": [0.2791, 0.6603, 0.3131, 0.6753]}, {"w": "attempt", "b": [0.3192, 0.6603, 0.3842, 0.6753]}, {"w": "to", "b": [0.3903, 0.6603, 0.4068, 0.6753]}, {"w": "reverse", "b": [0.413, 0.6603, 0.4689, 0.6753]}, {"w": "engineer", "b": [0.475, 0.6603, 0.5422, 0.6753]}, {"w": "the", "b": [0.5483, 0.6603, 0.5741, 0.6753]}, {"w": "model’s", "b": [0.5802, 0.6603, 0.6417, 0.6753]}, {"w": "training", "b": [0.6478, 0.6603, 0.7118, 0.6753]}, {"w": "data.", "b": [0.718, 0.6603, 0.7592, 0.6753]}, {"w": "Additionally,", "b": [0.7674, 0.6603, 0.8716, 0.6753]}, {"w": "when", "b": [0.1767, 0.6782, 0.2192, 0.6933]}, {"w": "used", "b": [0.2254, 0.6782, 0.2618, 0.6933]}, {"w": "for", "b": [0.268, 0.6782, 0.2904, 0.6933]}, {"w": "prediction,", "b": [0.2965, 0.6782, 0.3838, 0.6933]}, {"w": "some", "b": [0.39, 0.6782, 0.4305, 0.6933]}, {"w": "features,", "b": [0.4367, 0.6782, 0.5059, 0.6933]}, {"w": "such", "b": [0.5121, 0.6782, 0.548, 0.6933]}, {"w": "as", "b": [0.5542, 0.6782, 0.5709, 0.6933]}, {"w": "age,", "b": [0.577, 0.6782, 0.6092, 0.6933]}, {"w": "gender,", "b": [0.6154, 0.6782, 0.6746, 0.6933]}, {"w": "or", "b": [0.6808, 0.6782, 0.6974, 0.6933]}, {"w": "race,", "b": [0.7036, 0.6782, 0.742, 0.6933]}, {"w": "might", "b": [0.7482, 0.6782, 0.7954, 0.6933]}, {"w": "result", "b": [0.8016, 0.6782, 0.8474, 0.6933]}, {"w": "in", "b": [0.8536, 0.6782, 0.8692, 0.6933]}, {"w": "the", "b": [0.1774, 0.6962, 0.203, 0.7112]}, {"w": "organization", "b": [0.2091, 0.6962, 0.3087, 0.7112]}, {"w": "being", "b": [0.3148, 0.6962, 0.3584, 0.7112]}, {"w": "considered", "b": [0.3645, 0.6962, 0.4488, 0.7112]}, {"w": "as", "b": [0.455, 0.6962, 0.4715, 0.7112]}, {"w": "biased", "b": [0.4776, 0.6962, 0.528, 0.7112]}, {"w": "or", "b": [0.5341, 0.6962, 0.5506, 0.7112]}, {"w": "even", "b": [0.5567, 0.6962, 0.5927, 0.7112]}, {"w": "discriminatory.", "b": [0.5988, 0.6962, 0.719, 0.7112]}, {"w": "•", "b": [0.1538, 0.7142, 0.1681, 0.7291]}, {"w": "Study", "b": [0.1774, 0.7143, 0.2241, 0.7291]}, {"w": "the", "b": [0.2282, 0.7143, 0.2534, 0.7291]}, {"w": "main", "b": [0.2575, 0.7143, 0.2967, 0.7291]}, {"w": "properties", "b": [0.3008, 0.7143, 0.3799, 0.7291]}, {"w": "of", "b": [0.3841, 0.7143, 0.3987, 0.7291]}, {"w": "distributions", "b": [0.4028, 0.7143, 0.5025, 0.7291]}, {"w": "of", "b": [0.5067, 0.7143, 0.5213, 0.7291]}, {"w": "the", "b": [0.5254, 0.7143, 0.5505, 0.7291]}, {"w": "training", "b": [0.5547, 0.7143, 0.617, 0.7291]}, {"w": "data", "b": [0.6212, 0.7143, 0.6563, 0.7291]}, {"w": "versus", "b": [0.6605, 0.7143, 0.709, 0.7291]}, {"w": "the", "b": [0.7131, 0.7143, 0.7382, 0.7291]}, {"w": "production", "b": [0.7424, 0.7143, 0.8284, 0.7291]}, {"w": "data.", "b": [0.8325, 0.7143, 0.8727, 0.7291]}, {"w": "By", "b": [0.1774, 0.7322, 0.1997, 0.747]}, {"w": "comparing", "b": [0.2048, 0.7322, 0.2873, 0.747]}, {"w": "the", "b": [0.2924, 0.7322, 0.3175, 0.747]}, {"w": "statistical", "b": [0.3227, 0.7322, 0.3992, 0.747]}, {"w": "distribution", "b": [0.4044, 0.7322, 0.497, 0.747]}, {"w": "of", "b": [0.5021, 0.7322, 0.5167, 0.747]}, {"w": "examples,", "b": [0.5218, 0.7322, 0.5988, 0.747]}, {"w": "features,", "b": [0.6041, 0.7322, 0.6711, 0.747]}, {"w": "and", "b": [0.6764, 0.7322, 0.7056, 0.747]}, {"w": "labels,", "b": [0.7107, 0.7322, 0.7606, 0.747]}, {"w": "in", "b": [0.7659, 0.7322, 0.781, 0.747]}, {"w": "both", "b": [0.7861, 0.7322, 0.8228, 0.747]}, {"w": "train-", "b": [0.8279, 0.7322, 0.8722, 0.747]}, {"w": "ing", "b": [0.1774, 0.7501, 0.202, 0.765]}, {"w": "and", "b": [0.2081, 0.7501, 0.2379, 0.765]}, {"w": "production", "b": [0.2441, 0.7501, 0.332, 0.765]}, {"w": "data,", "b": [0.3381, 0.7501, 0.3792, 0.765]}, {"w": "is", "b": [0.3853, 0.7501, 0.3978, 0.765]}, {"w": "how", "b": [0.4039, 0.7501, 0.4362, 0.765]}, {"w": "distribution", "b": [0.4424, 0.7501, 0.5371, 0.765]}, {"w": "shift", "b": [0.5432, 0.7501, 0.5787, 0.765]}, {"w": "is", "b": [0.5849, 0.7501, 0.5973, 0.765]}, {"w": "detected.", "b": [0.6034, 0.7501, 0.6764, 0.765]}, {"w": "A", "b": [0.6846, 0.7501, 0.6985, 0.765]}, {"w": "significant", "b": [0.7046, 0.7501, 0.7864, 0.765]}, {"w": "difference", "b": [0.7925, 0.7501, 0.8691, 0.765]}, {"w": "between", "b": [0.1774, 0.768, 0.2425, 0.783]}, {"w": "the", "b": [0.2486, 0.768, 0.2743, 0.783]}, {"w": "two", "b": [0.2804, 0.768, 0.3091, 0.783]}, {"w": "indicates", "b": [0.3153, 0.768, 0.3861, 0.783]}, {"w": "a", "b": [0.3923, 0.768, 0.4015, 0.783]}, {"w": "need", "b": [0.4077, 0.768, 0.4446, 0.783]}, {"w": "to", "b": [0.4508, 0.768, 0.4672, 0.783]}, {"w": "update", "b": [0.4733, 0.768, 0.5292, 0.783]}, {"w": "the", "b": [0.5353, 0.768, 0.561, 0.783]}, {"w": "training", "b": [0.5671, 0.768, 0.6308, 0.783]}, {"w": "data,", "b": [0.6369, 0.768, 0.6779, 0.783]}, {"w": "and", "b": [0.6841, 0.768, 0.7138, 0.783]}, {"w": "retrain", "b": [0.72, 0.768, 0.7744, 0.783]}, {"w": "the", "b": [0.7806, 0.768, 0.8062, 0.783]}, {"w": "model.", "b": [0.8124, 0.768, 0.8662, 0.783]}, {"w": "•", "b": [0.1538, 0.786, 0.1681, 0.8009]}, {"w": "Evaluate", "b": [0.1774, 0.7861, 0.2464, 0.8009]}, {"w": "the", "b": [0.2522, 0.7861, 0.2774, 0.8009]}, {"w": "performance", "b": [0.2832, 0.7861, 0.3808, 0.8009]}, {"w": "of", "b": [0.3866, 0.7861, 0.4011, 0.8009]}, {"w": "the", "b": [0.4069, 0.7861, 0.4321, 0.8009]}, {"w": "model.", "b": [0.4379, 0.7861, 0.4906, 0.8009]}, {"w": "Before", "b": [0.4987, 0.7861, 0.5493, 0.8009]}, {"w": "the", "b": [0.5551, 0.7861, 0.5802, 0.8009]}, {"w": "model", "b": [0.586, 0.7861, 0.6337, 0.8009]}, {"w": "is", "b": [0.6395, 0.7861, 0.6517, 0.8009]}, {"w": "deployed", "b": [0.6575, 0.7861, 0.7263, 0.8009]}, {"w": "in", "b": [0.7321, 0.7861, 0.7472, 0.8009]}, {"w": "production,", "b": [0.753, 0.7861, 0.844, 0.8009]}, {"w": "its", "b": [0.8499, 0.7861, 0.8691, 0.8009]}, {"w": "predictive", "b": [0.1774, 0.8039, 0.256, 0.8189]}, {"w": "performance", "b": [0.2621, 0.8039, 0.3612, 0.8189]}, {"w": "must", "b": [0.3674, 0.8039, 0.4068, 0.8189]}, {"w": "be", "b": [0.4129, 0.8039, 0.4318, 0.8189]}, {"w": "evaluated", "b": [0.438, 0.8039, 0.514, 0.8189]}, {"w": "on", "b": [0.5201, 0.8039, 0.5395, 0.8189]}, {"w": "the", "b": [0.5457, 0.8039, 0.5712, 0.8189]}, {"w": "external", "b": [0.5773, 0.8039, 0.6422, 0.8189]}, {"w": "data,", "b": [0.6483, 0.8039, 0.6892, 0.8189]}, {"w": "that", "b": [0.6953, 0.8039, 0.729, 0.8189]}, {"w": "is,", "b": [0.7351, 0.8039, 0.7526, 0.8189]}, {"w": "data", "b": [0.7587, 0.8039, 0.7944, 0.8189]}, {"w": "not", "b": [0.8006, 0.8039, 0.8271, 0.8189]}, {"w": "used", "b": [0.8333, 0.8039, 0.8691, 0.8189]}, {"w": "for", "b": [0.1774, 0.8219, 0.1993, 0.8368]}, {"w": "training.", "b": [0.2054, 0.8219, 0.2736, 0.8368]}, {"w": "The", "b": [0.2818, 0.8219, 0.3134, 0.8368]}, {"w": "external", "b": [0.3195, 0.8219, 0.3841, 0.8368]}, {"w": "data", "b": [0.3903, 0.8219, 0.4259, 0.8368]}, {"w": "must", "b": [0.432, 0.8219, 0.4713, 0.8368]}, {"w": "include", "b": [0.4774, 0.8219, 0.5344, 0.8368]}, {"w": "both", "b": [0.5405, 0.8219, 0.5777, 0.8368]}, {"w": "historical", "b": [0.5838, 0.8219, 0.6572, 0.8368]}, {"w": "and", "b": [0.6633, 0.8219, 0.6928, 0.8368]}, {"w": "online", "b": [0.699, 0.8219, 0.7468, 0.8368]}, {"w": "examples", "b": [0.7529, 0.8219, 0.8258, 0.8368]}, {"w": "from", "b": [0.8319, 0.8219, 0.8691, 0.8368]}, {"w": "the", "b": [0.1774, 0.8397, 0.2034, 0.8548]}, {"w": "production", "b": [0.2095, 0.8397, 0.2985, 0.8548]}, {"w": "environment.", "b": [0.3046, 0.8397, 0.4113, 0.8548]}, {"w": "The", "b": [0.4195, 0.8397, 0.4517, 0.8548]}, {"w": "context", "b": [0.4579, 0.8397, 0.5182, 0.8548]}, {"w": "of", "b": [0.5243, 0.8397, 0.5394, 0.8548]}, {"w": "evaluation", "b": [0.5456, 0.8397, 0.6293, 0.8548]}, {"w": "on", "b": [0.6354, 0.8397, 0.6552, 0.8548]}, {"w": "the", "b": [0.6613, 0.8397, 0.6873, 0.8548]}, {"w": "real-time,", "b": [0.6935, 0.8397, 0.7715, 0.8548]}, {"w": "online", "b": [0.7777, 0.8397, 0.8265, 0.8548]}, {"w": "data", "b": [0.8327, 0.8397, 0.8691, 0.8548]}, {"w": "should", "b": [0.1774, 0.8577, 0.2298, 0.8727]}, {"w": "closely", "b": [0.2359, 0.8577, 0.2888, 0.8727]}, {"w": "resemble", "b": [0.295, 0.8577, 0.3644, 0.8727]}, {"w": "the", "b": [0.3705, 0.8577, 0.3962, 0.8727]}, {"w": "production", "b": [0.4023, 0.8577, 0.4901, 0.8727]}, {"w": "environment.", "b": [0.4962, 0.8577, 0.6014, 0.8727]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "3", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 221, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• Monitor the performance of the deployed model. The model’s performance may degrade over time. It is important to be able to detect this and, either upgrade the model by adding new data, or train an entirely different model. Model monitoring must be a carefully designed automated process, and might include a human in the loop. We consider this in more detail in Chapter 9.", "words": [{"w": "•", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "Monitor", "b": [0.1774, 0.0885, 0.2412, 0.1033]}, {"w": "the", "b": [0.2465, 0.0885, 0.2716, 0.1033]}, {"w": "performance", "b": [0.2769, 0.0885, 0.3745, 0.1033]}, {"w": "of", "b": [0.3798, 0.0885, 0.3944, 0.1033]}, {"w": "the", "b": [0.3996, 0.0885, 0.4248, 0.1033]}, {"w": "deployed", "b": [0.43, 0.0885, 0.4989, 0.1033]}, {"w": "model.", "b": [0.5041, 0.0885, 0.5569, 0.1033]}, {"w": "The", "b": [0.5648, 0.0885, 0.596, 0.1033]}, {"w": "model’s", "b": [0.6012, 0.0885, 0.6611, 0.1033]}, {"w": "performance", "b": [0.6664, 0.0885, 0.764, 0.1033]}, {"w": "may", "b": [0.7693, 0.0885, 0.8024, 0.1033]}, {"w": "degrade", "b": [0.8077, 0.0885, 0.8691, 0.1033]}, {"w": "over", "b": [0.1774, 0.1063, 0.2112, 0.1213]}, {"w": "time.", "b": [0.2173, 0.1063, 0.2588, 0.1213]}, {"w": "It", "b": [0.267, 0.1063, 0.281, 0.1213]}, {"w": "is", "b": [0.2872, 0.1063, 0.2997, 0.1213]}, {"w": "important", "b": [0.3059, 0.1063, 0.3879, 0.1213]}, {"w": "to", "b": [0.394, 0.1063, 0.4106, 0.1213]}, {"w": "be", "b": [0.4168, 0.1063, 0.436, 0.1213]}, {"w": "able", "b": [0.4421, 0.1063, 0.4753, 0.1213]}, {"w": "to", "b": [0.4815, 0.1063, 0.4981, 0.1213]}, {"w": "detect", "b": [0.5042, 0.1063, 0.5541, 0.1213]}, {"w": "this", "b": [0.5602, 0.1063, 0.5904, 0.1213]}, {"w": "and,", "b": [0.5966, 0.1063, 0.6319, 0.1213]}, {"w": "either", "b": [0.638, 0.1063, 0.6848, 0.1213]}, {"w": "upgrade", "b": [0.6909, 0.1063, 0.7564, 0.1213]}, {"w": "the", "b": [0.7625, 0.1063, 0.7884, 0.1213]}, {"w": "model", "b": [0.7946, 0.1063, 0.8439, 0.1213]}, {"w": "by", "b": [0.85, 0.1063, 0.8698, 0.1213]}, {"w": "adding", "b": [0.1774, 0.1242, 0.2328, 0.1393]}, {"w": "new", "b": [0.2395, 0.1242, 0.2719, 0.1393]}, {"w": "data,", "b": [0.2786, 0.1242, 0.3205, 0.1393]}, {"w": "or", "b": [0.3273, 0.1242, 0.3441, 0.1393]}, {"w": "train", "b": [0.3508, 0.1242, 0.3906, 0.1393]}, {"w": "an", "b": [0.3973, 0.1242, 0.4172, 0.1393]}, {"w": "entirely", "b": [0.4239, 0.1242, 0.4856, 0.1393]}, {"w": "different", "b": [0.4924, 0.1242, 0.5604, 0.1393]}, {"w": "model.", "b": [0.5671, 0.1242, 0.622, 0.1393]}, {"w": "Model", "b": [0.6319, 0.1242, 0.6831, 0.1393]}, {"w": "monitoring", "b": [0.6898, 0.1242, 0.7798, 0.1393]}, {"w": "must", "b": [0.7865, 0.1242, 0.8269, 0.1393]}, {"w": "be", "b": [0.8336, 0.1242, 0.8529, 0.1393]}, {"w": "a", "b": [0.8596, 0.1242, 0.869, 0.1393]}, {"w": "carefully", "b": [0.1774, 0.1421, 0.2475, 0.1572]}, {"w": "designed", "b": [0.2546, 0.1421, 0.3248, 0.1572]}, {"w": "automated", "b": [0.3318, 0.1421, 0.4197, 0.1572]}, {"w": "process,", "b": [0.4267, 0.1421, 0.4913, 0.1572]}, {"w": "and", "b": [0.4986, 0.1421, 0.5289, 0.1572]}, {"w": "might", "b": [0.536, 0.1421, 0.5836, 0.1572]}, {"w": "include", "b": [0.5906, 0.1421, 0.6492, 0.1572]}, {"w": "a", "b": [0.6563, 0.1421, 0.6657, 0.1572]}, {"w": "human", "b": [0.6728, 0.1421, 0.7287, 0.1572]}, {"w": "in", "b": [0.7358, 0.1421, 0.7515, 0.1572]}, {"w": "the", "b": [0.7585, 0.1421, 0.7847, 0.1572]}, {"w": "loop.", "b": [0.7917, 0.1421, 0.832, 0.1572]}, {"w": "We", "b": [0.8429, 0.1421, 0.8691, 0.1572]}, {"w": "consider", "b": [0.1774, 0.1602, 0.2432, 0.1751]}, {"w": "this", "b": [0.2493, 0.1602, 0.2792, 0.1751]}, {"w": "in", "b": [0.2853, 0.1602, 0.3007, 0.1751]}, {"w": "more", "b": [0.3068, 0.1602, 0.3469, 0.1751]}, {"w": "detail", "b": [0.353, 0.1602, 0.3982, 0.1751]}, {"w": "in", "b": [0.4043, 0.1602, 0.4197, 0.1751]}, {"w": "Chapter", "b": [0.4258, 0.1602, 0.4915, 0.1751]}, {"w": "9.", "b": [0.4975, 0.1602, 0.5119, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "In this chapter, we look at some examples of the kinds of tricks that statisticians use during the model evaluation phase. Machine learning engineering is a developing discipline, and some questions still don’t have well established and easy to apply answers. In particular, the evaluation is presented from the point of view of an engineer, while each business has its own success criteria, which are unique. Before evaluating a machine learning solution, it is very important to ensure that the right people have done the most difficult work in the project: figuring out what success looks like and what are the right questions to ask in the form of business-appropriate metrics and objectives.", "words": [{"w": "In", "b": [0.1312, 0.1872, 0.1479, 0.202]}, {"w": "this", "b": [0.1541, 0.1872, 0.1835, 0.202]}, {"w": "chapter,", "b": [0.1897, 0.1872, 0.254, 0.202]}, {"w": "we", "b": [0.2602, 0.1872, 0.2809, 0.202]}, {"w": "look", "b": [0.2871, 0.1872, 0.3205, 0.202]}, {"w": "at", "b": [0.3266, 0.1872, 0.3428, 0.202]}, {"w": "some", "b": [0.3489, 0.1872, 0.3889, 0.202]}, {"w": "examples", "b": [0.3957, 0.1872, 0.4682, 0.202]}, {"w": "of", "b": [0.4744, 0.1872, 0.489, 0.202]}, {"w": "the", "b": [0.4952, 0.1872, 0.5205, 0.202]}, {"w": "kinds", "b": [0.5267, 0.1872, 0.5688, 0.202]}, {"w": "of", "b": [0.5749, 0.1872, 0.5896, 0.202]}, {"w": "tricks", "b": [0.5958, 0.1872, 0.6395, 0.202]}, {"w": "that", "b": [0.6456, 0.1872, 0.679, 0.202]}, {"w": "statisticians", "b": [0.6852, 0.1872, 0.7796, 0.202]}, {"w": "use", "b": [0.7858, 0.1872, 0.8112, 0.202]}, {"w": "during", "b": [0.8173, 0.1872, 0.869, 0.202]}, {"w": "the", "b": [0.1312, 0.2049, 0.1574, 0.22]}, {"w": "model", "b": [0.1641, 0.2049, 0.2138, 0.22]}, {"w": "evaluation", "b": [0.2205, 0.2049, 0.3047, 0.22]}, {"w": "phase.", "b": [0.3115, 0.2049, 0.3628, 0.22]}, {"w": "Machine", "b": [0.3728, 0.2049, 0.4418, 0.22]}, {"w": "learning", "b": [0.4486, 0.2049, 0.5145, 0.22]}, {"w": "engineering", "b": [0.5212, 0.2049, 0.6144, 0.22]}, {"w": "is", "b": [0.6211, 0.2049, 0.6338, 0.22]}, {"w": "a", "b": [0.6405, 0.2049, 0.6499, 0.22]}, {"w": "developing", "b": [0.6567, 0.2049, 0.7435, 0.22]}, {"w": "discipline,", "b": [0.7502, 0.2049, 0.832, 0.22]}, {"w": "and", "b": [0.8388, 0.2049, 0.8692, 0.22]}, {"w": "some", "b": [0.1312, 0.2231, 0.1706, 0.2379]}, {"w": "questions", "b": [0.1767, 0.2231, 0.2499, 0.2379]}, {"w": "still", "b": [0.256, 0.2231, 0.2853, 0.2379]}, {"w": "don’t", "b": [0.2915, 0.2231, 0.3327, 0.2379]}, {"w": "have", "b": [0.3389, 0.2231, 0.3746, 0.2379]}, {"w": "well", "b": [0.3808, 0.2231, 0.4115, 0.2379]}, {"w": "established", "b": [0.4176, 0.2231, 0.5044, 0.2379]}, {"w": "and", "b": [0.5105, 0.2231, 0.5397, 0.2379]}, {"w": "easy", "b": [0.5459, 0.2231, 0.5797, 0.2379]}, {"w": "to", "b": [0.5859, 0.2231, 0.6019, 0.2379]}, {"w": "apply", "b": [0.6081, 0.2231, 0.6519, 0.2379]}, {"w": "answers.", "b": [0.6581, 0.2231, 0.7242, 0.2379]}, {"w": "In", "b": [0.7325, 0.2231, 0.7491, 0.2379]}, {"w": "particular,", "b": [0.7552, 0.2231, 0.8378, 0.2379]}, {"w": "the", "b": [0.844, 0.2231, 0.8691, 0.2379]}, {"w": "evaluation", "b": [0.1312, 0.2411, 0.2121, 0.2559]}, {"w": "is", "b": [0.218, 0.2411, 0.2302, 0.2559]}, {"w": "presented", "b": [0.2361, 0.2411, 0.3112, 0.2559]}, {"w": "from", "b": [0.3171, 0.2411, 0.3538, 0.2559]}, {"w": "the", "b": [0.3597, 0.2411, 0.3849, 0.2559]}, {"w": "point", "b": [0.3908, 0.2411, 0.432, 0.2559]}, {"w": "of", "b": [0.4379, 0.2411, 0.4525, 0.2559]}, {"w": "view", "b": [0.4584, 0.2411, 0.4941, 0.2559]}, {"w": "of", "b": [0.5, 0.2411, 0.5146, 0.2559]}, {"w": "an", "b": [0.5205, 0.2411, 0.5396, 0.2559]}, {"w": "engineer,", "b": [0.5455, 0.2411, 0.616, 0.2559]}, {"w": "while", "b": [0.6219, 0.2411, 0.6631, 0.2559]}, {"w": "each", "b": [0.6691, 0.2411, 0.7037, 0.2559]}, {"w": "business", "b": [0.7097, 0.2411, 0.7743, 0.2559]}, {"w": "has", "b": [0.7802, 0.2411, 0.8065, 0.2559]}, {"w": "its", "b": [0.8124, 0.2411, 0.8316, 0.2559]}, {"w": "own", "b": [0.8375, 0.2411, 0.8692, 0.2559]}, {"w": "success", "b": [0.1312, 0.2588, 0.1884, 0.2739]}, {"w": "criteria,", "b": [0.1945, 0.2588, 0.2576, 0.2739]}, {"w": "which", "b": [0.2638, 0.2588, 0.3108, 0.2739]}, {"w": "are", "b": [0.317, 0.2588, 0.3418, 0.2739]}, {"w": "unique.", "b": [0.348, 0.2588, 0.4074, 0.2739]}, {"w": "Before", "b": [0.4156, 0.2588, 0.4675, 0.2739]}, {"w": "evaluating", "b": [0.4737, 0.2588, 0.5568, 0.2739]}, {"w": "a", "b": [0.563, 0.2588, 0.5723, 0.2739]}, {"w": "machine", "b": [0.5785, 0.2588, 0.6451, 0.2739]}, {"w": "learning", "b": [0.6512, 0.2588, 0.7163, 0.2739]}, {"w": "solution,", "b": [0.7225, 0.2588, 0.7918, 0.2739]}, {"w": "it", "b": [0.798, 0.2588, 0.8104, 0.2739]}, {"w": "is", "b": [0.8165, 0.2588, 0.829, 0.2739]}, {"w": "very", "b": [0.8352, 0.2588, 0.8699, 0.2739]}, {"w": "important", "b": [0.1312, 0.2768, 0.2132, 0.2918]}, {"w": "to", "b": [0.2193, 0.2768, 0.2359, 0.2918]}, {"w": "ensure", "b": [0.2421, 0.2768, 0.2941, 0.2918]}, {"w": "that", "b": [0.3003, 0.2768, 0.3345, 0.2918]}, {"w": "the", "b": [0.3406, 0.2768, 0.3666, 0.2918]}, {"w": "right", "b": [0.3727, 0.2768, 0.4117, 0.2918]}, {"w": "people", "b": [0.4178, 0.2768, 0.4702, 0.2918]}, {"w": "have", "b": [0.4764, 0.2768, 0.5132, 0.2918]}, {"w": "done", "b": [0.5193, 0.2768, 0.5577, 0.2918]}, {"w": "the", "b": [0.5639, 0.2768, 0.5898, 0.2918]}, {"w": "most", "b": [0.596, 0.2768, 0.6355, 0.2918]}, {"w": "difficult", "b": [0.6416, 0.2768, 0.7038, 0.2918]}, {"w": "work", "b": [0.71, 0.2768, 0.7494, 0.2918]}, {"w": "in", "b": [0.7556, 0.2768, 0.7712, 0.2918]}, {"w": "the", "b": [0.7773, 0.2768, 0.8032, 0.2918]}, {"w": "project:", "b": [0.8094, 0.2768, 0.8717, 0.2918]}, {"w": "figuring", "b": [0.1312, 0.2947, 0.1939, 0.3098]}, {"w": "out", "b": [0.2, 0.2947, 0.2271, 0.3098]}, {"w": "what", "b": [0.2332, 0.2947, 0.2739, 0.3098]}, {"w": "success", "b": [0.28, 0.2947, 0.3378, 0.3098]}, {"w": "looks", "b": [0.3439, 0.2947, 0.3857, 0.3098]}, {"w": "like", "b": [0.3918, 0.2947, 0.42, 0.3098]}, {"w": "and", "b": [0.4262, 0.2947, 0.4564, 0.3098]}, {"w": "what", "b": [0.4625, 0.2947, 0.5032, 0.3098]}, {"w": "are", "b": [0.5093, 0.2947, 0.5344, 0.3098]}, {"w": "the", "b": [0.5406, 0.2947, 0.5666, 0.3098]}, {"w": "right", "b": [0.5728, 0.2947, 0.612, 0.3098]}, {"w": "questions", "b": [0.6181, 0.2947, 0.6939, 0.3098]}, {"w": "to", "b": [0.7001, 0.2947, 0.7167, 0.3098]}, {"w": "ask", "b": [0.7229, 0.2947, 0.7496, 0.3098]}, {"w": "in", "b": [0.7557, 0.2947, 0.7714, 0.3098]}, {"w": "the", "b": [0.7775, 0.2947, 0.8036, 0.3098]}, {"w": "form", "b": [0.8097, 0.2947, 0.8478, 0.3098]}, {"w": "of", "b": [0.854, 0.2947, 0.8691, 0.3098]}, {"w": "business-appropriate", "b": [0.1312, 0.3127, 0.2968, 0.3277]}, {"w": "metrics", "b": [0.3029, 0.3127, 0.3615, 0.3277]}, {"w": "and", "b": [0.3677, 0.3127, 0.3974, 0.3277]}, {"w": "objectives.", "b": [0.4036, 0.3127, 0.4878, 0.3277]}]}, {"id": "b_2", "type": "paragraph", "text": "A common reason for failure is engineers answering convenient questions with basic tools instead of answering the right questions with custom tools — something that may require consultation with a professional statistician after your project’s leaders and stakeholders have completed their part in your project. Note that some methods highlighted in this chapter, specifically those used in A/B testing (Section 7.2), are provided as examples only and might not be appropriate for your specific business problem. On important large-scale projects, it would be a mistake to try to do everything yourself. Timely collaboration with your leadership team and consulting a statistician is essential.", "words": [{"w": "A", "b": [0.1305, 0.3395, 0.1446, 0.3546]}, {"w": "common", "b": [0.1513, 0.3395, 0.2203, 0.3546]}, {"w": "reason", "b": [0.2269, 0.3395, 0.2794, 0.3546]}, {"w": "for", "b": [0.286, 0.3395, 0.3085, 0.3546]}, {"w": "failure", "b": [0.3152, 0.3395, 0.367, 0.3546]}, {"w": "is", "b": [0.3736, 0.3395, 0.3863, 0.3546]}, {"w": "engineers", "b": [0.3929, 0.3395, 0.4684, 0.3546]}, {"w": "answering", "b": [0.475, 0.3395, 0.5563, 0.3546]}, {"w": "convenient", "b": [0.5629, 0.3395, 0.6497, 0.3546]}, {"w": "questions", "b": [0.6564, 0.3395, 0.7324, 0.3546]}, {"w": "with", "b": [0.7391, 0.3395, 0.7757, 0.3546]}, {"w": "basic", "b": [0.7823, 0.3395, 0.8232, 0.3546]}, {"w": "tools", "b": [0.8298, 0.3395, 0.8691, 0.3546]}, {"w": "instead", "b": [0.1312, 0.3575, 0.1898, 0.3726]}, {"w": "of", "b": [0.1959, 0.3575, 0.211, 0.3726]}, {"w": "answering", "b": [0.2172, 0.3575, 0.2981, 0.3726]}, {"w": "the", "b": [0.3043, 0.3575, 0.3304, 0.3726]}, {"w": "right", "b": [0.3365, 0.3575, 0.3757, 0.3726]}, {"w": "questions", "b": [0.3818, 0.3575, 0.4577, 0.3726]}, {"w": "with", "b": [0.4638, 0.3575, 0.5003, 0.3726]}, {"w": "custom", "b": [0.5065, 0.3575, 0.5649, 0.3726]}, {"w": "tools", "b": [0.5711, 0.3575, 0.6103, 0.3726]}, {"w": "—", "b": [0.6164, 0.3575, 0.6352, 0.3726]}, {"w": "something", "b": [0.6413, 0.3575, 0.7249, 0.3726]}, {"w": "that", "b": [0.731, 0.3575, 0.7654, 0.3726]}, {"w": "may", "b": [0.7716, 0.3575, 0.806, 0.3726]}, {"w": "require", "b": [0.8121, 0.3575, 0.8691, 0.3726]}, {"w": "consultation", "b": [0.1312, 0.3757, 0.2278, 0.3905]}, {"w": "with", "b": [0.2335, 0.3757, 0.2687, 0.3905]}, {"w": "a", "b": [0.2744, 0.3757, 0.2835, 0.3905]}, {"w": "professional", "b": [0.2892, 0.3757, 0.3814, 0.3905]}, {"w": "statistician", "b": [0.3871, 0.3757, 0.4737, 0.3905]}, {"w": "after", "b": [0.4794, 0.3757, 0.5162, 0.3905]}, {"w": "your", "b": [0.5219, 0.3757, 0.5571, 0.3905]}, {"w": "project’s", "b": [0.5628, 0.3757, 0.6303, 0.3905]}, {"w": "leaders", "b": [0.6361, 0.3757, 0.6905, 0.3905]}, {"w": "and", "b": [0.6962, 0.3757, 0.7254, 0.3905]}, {"w": "stakeholders", "b": [0.7311, 0.3757, 0.8278, 0.3905]}, {"w": "have", "b": [0.8335, 0.3757, 0.8692, 0.3905]}, {"w": "completed", "b": [0.1312, 0.3934, 0.2147, 0.4085]}, {"w": "their", "b": [0.2208, 0.3934, 0.2594, 0.4085]}, {"w": "part", "b": [0.2656, 0.3934, 0.3, 0.4085]}, {"w": "in", "b": [0.3062, 0.3934, 0.3218, 0.4085]}, {"w": "your", "b": [0.328, 0.3934, 0.3645, 0.4085]}, {"w": "project.", "b": [0.3706, 0.3934, 0.4333, 0.4085]}, {"w": "Note", "b": [0.4415, 0.3934, 0.4806, 0.4085]}, {"w": "that", "b": [0.4867, 0.3934, 0.5211, 0.4085]}, {"w": "some", "b": [0.5272, 0.3934, 0.568, 0.4085]}, {"w": "methods", "b": [0.5742, 0.3934, 0.6436, 0.4085]}, {"w": "highlighted", "b": [0.6497, 0.3934, 0.741, 0.4085]}, {"w": "in", "b": [0.7471, 0.3934, 0.7628, 0.4085]}, {"w": "this", "b": [0.7689, 0.3934, 0.7993, 0.4085]}, {"w": "chapter,", "b": [0.8054, 0.3934, 0.8717, 0.4085]}, {"w": "specifically", "b": [0.1312, 0.4116, 0.2168, 0.4264]}, {"w": "those", "b": [0.2228, 0.4116, 0.2641, 0.4264]}, {"w": "used", "b": [0.2701, 0.4116, 0.3053, 0.4264]}, {"w": "in", "b": [0.3113, 0.4116, 0.3264, 0.4264]}, {"w": "A/B", "b": [0.3324, 0.4116, 0.3678, 0.4264]}, {"w": "testing", "b": [0.3737, 0.4116, 0.4271, 0.4264]}, {"w": "(Section", "b": [0.4331, 0.4116, 0.4974, 0.4264]}, {"w": "7.2),", "b": [0.5034, 0.4116, 0.5385, 0.4264]}, {"w": "are", "b": [0.5446, 0.4116, 0.5687, 0.4264]}, {"w": "provided", "b": [0.5747, 0.4116, 0.6431, 0.4264]}, {"w": "as", "b": [0.6491, 0.4116, 0.6653, 0.4264]}, {"w": "examples", "b": [0.6712, 0.4116, 0.7432, 0.4264]}, {"w": "only", "b": [0.7492, 0.4116, 0.7828, 0.4264]}, {"w": "and", "b": [0.7888, 0.4116, 0.8179, 0.4264]}, {"w": "might", "b": [0.8239, 0.4116, 0.8696, 0.4264]}, {"w": "not", "b": [0.1312, 0.4293, 0.1584, 0.4444]}, {"w": "be", "b": [0.1652, 0.4293, 0.1845, 0.4444]}, {"w": "appropriate", "b": [0.1913, 0.4293, 0.2866, 0.4444]}, {"w": "for", "b": [0.2934, 0.4293, 0.3159, 0.4444]}, {"w": "your", "b": [0.3227, 0.4293, 0.3594, 0.4444]}, {"w": "specific", "b": [0.3661, 0.4293, 0.4254, 0.4444]}, {"w": "business", "b": [0.4321, 0.4293, 0.4994, 0.4444]}, {"w": "problem.", "b": [0.5062, 0.4293, 0.5784, 0.4444]}, {"w": "On", "b": [0.5885, 0.4293, 0.6136, 0.4444]}, {"w": "important", "b": [0.6204, 0.4293, 0.703, 0.4444]}, {"w": "large-scale", "b": [0.7098, 0.4293, 0.7947, 0.4444]}, {"w": "projects,", "b": [0.8015, 0.4293, 0.8717, 0.4444]}, {"w": "it", "b": [0.1312, 0.4472, 0.1438, 0.4623]}, {"w": "would", "b": [0.1515, 0.4472, 0.2002, 0.4623]}, {"w": "be", "b": [0.2079, 0.4472, 0.2273, 0.4623]}, {"w": "a", "b": [0.235, 0.4472, 0.2444, 0.4623]}, {"w": "mistake", "b": [0.2522, 0.4472, 0.315, 0.4623]}, {"w": "to", "b": [0.3228, 0.4472, 0.3395, 0.4623]}, {"w": "try", "b": [0.3473, 0.4472, 0.3719, 0.4623]}, {"w": "to", "b": [0.3797, 0.4472, 0.3964, 0.4623]}, {"w": "do", "b": [0.4042, 0.4472, 0.424, 0.4623]}, {"w": "everything", "b": [0.4318, 0.4472, 0.5181, 0.4623]}, {"w": "yourself.", "b": [0.5259, 0.4472, 0.5946, 0.4623]}, {"w": "Timely", "b": [0.6076, 0.4472, 0.6656, 0.4623]}, {"w": "collaboration", "b": [0.6734, 0.4472, 0.7806, 0.4623]}, {"w": "with", "b": [0.7884, 0.4472, 0.825, 0.4623]}, {"w": "your", "b": [0.8327, 0.4472, 0.8694, 0.4623]}, {"w": "leadership", "b": [0.1312, 0.4653, 0.2124, 0.4802]}, {"w": "team", "b": [0.2186, 0.4653, 0.2586, 0.4802]}, {"w": "and", "b": [0.2647, 0.4653, 0.2944, 0.4802]}, {"w": "consulting", "b": [0.3006, 0.4653, 0.3827, 0.4802]}, {"w": "a", "b": [0.3889, 0.4653, 0.3981, 0.4802]}, {"w": "statistician", "b": [0.4043, 0.4653, 0.4927, 0.4802]}, {"w": "is", "b": [0.4988, 0.4653, 0.5112, 0.4802]}, {"w": "essential.", "b": [0.5174, 0.4653, 0.5899, 0.4802]}]}, {"id": "b_3", "type": "paragraph", "text": "7.1 Offline and Online Evaluation", "words": [{"w": "7.1", "b": [0.1312, 0.5138, 0.1631, 0.5318]}, {"w": "Offline", "b": [0.188, 0.5138, 0.2596, 0.5318]}, {"w": "and", "b": [0.2679, 0.5138, 0.3077, 0.5318]}, {"w": "Online", "b": [0.316, 0.5138, 0.3876, 0.5318]}, {"w": "Evaluation", "b": [0.3959, 0.5138, 0.5119, 0.5318]}]}, {"id": "b_4", "type": "paragraph", "text": "In Section ??, we overviewed the evaluation techniques applied in what’s called offline model evaluation. An offline model evaluation happens when the model is being trained by the analyst. The analyst tries out different features, models, algorithms, and hyperparameters. Tools like confusion matrix and various performance metrics, such as precision, recall, and AUC, allow comparing candidate models, and guide the model training in the right direction.", "words": [{"w": "In", "b": [0.1312, 0.5528, 0.1478, 0.5676]}, {"w": "Section", "b": [0.1526, 0.5528, 0.2099, 0.5676]}, {"w": "??,", "b": [0.2146, 0.5527, 0.2397, 0.5677]}, {"w": "we", "b": [0.2447, 0.5528, 0.2653, 0.5676]}, {"w": "overviewed", "b": [0.27, 0.5528, 0.356, 0.5676]}, {"w": "the", "b": [0.3608, 0.5528, 0.3859, 0.5676]}, {"w": "evaluation", "b": [0.3907, 0.5528, 0.4715, 0.5676]}, {"w": "techniques", "b": [0.4763, 0.5528, 0.5588, 0.5676]}, {"w": "applied", "b": [0.5636, 0.5528, 0.6209, 0.5676]}, {"w": "in", "b": [0.6256, 0.5528, 0.6407, 0.5676]}, {"w": "what’s", "b": [0.6455, 0.5528, 0.6968, 0.5676]}, {"w": "called", "b": [0.7016, 0.5528, 0.7468, 0.5676]}, {"w": "offline", "b": [0.7513, 0.5527, 0.807, 0.5677]}, {"w": "model", "b": [0.8125, 0.5527, 0.8688, 0.5677]}, {"w": "evaluation.", "b": [0.1312, 0.5705, 0.2311, 0.5856]}, {"w": "An", "b": [0.2394, 0.5705, 0.2639, 0.5856]}, {"w": "offline", "b": [0.2701, 0.5705, 0.3193, 0.5856]}, {"w": "model", "b": [0.3254, 0.5705, 0.3751, 0.5856]}, {"w": "evaluation", "b": [0.3813, 0.5705, 0.4655, 0.5856]}, {"w": "happens", "b": [0.4717, 0.5705, 0.5392, 0.5856]}, {"w": "when", "b": [0.5454, 0.5705, 0.5883, 0.5856]}, {"w": "the", "b": [0.5945, 0.5705, 0.6206, 0.5856]}, {"w": "model", "b": [0.6268, 0.5705, 0.6764, 0.5856]}, {"w": "is", "b": [0.6826, 0.5705, 0.6953, 0.5856]}, {"w": "being", "b": [0.7014, 0.5705, 0.7459, 0.5856]}, {"w": "trained", "b": [0.7521, 0.5705, 0.8107, 0.5856]}, {"w": "by", "b": [0.8168, 0.5705, 0.8367, 0.5856]}, {"w": "the", "b": [0.8429, 0.5705, 0.869, 0.5856]}, {"w": "analyst.", "b": [0.1312, 0.5885, 0.195, 0.6036]}, {"w": "The", "b": [0.2032, 0.5885, 0.2353, 0.6036]}, {"w": "analyst", "b": [0.2415, 0.5885, 0.3001, 0.6036]}, {"w": "tries", "b": [0.3062, 0.5885, 0.3416, 0.6036]}, {"w": "out", "b": [0.3478, 0.5885, 0.3747, 0.6036]}, {"w": "different", "b": [0.3809, 0.5885, 0.4482, 0.6036]}, {"w": "features,", "b": [0.4544, 0.5885, 0.5234, 0.6036]}, {"w": "models,", "b": [0.5296, 0.5885, 0.5913, 0.6036]}, {"w": "algorithms,", "b": [0.5975, 0.5885, 0.6887, 0.6036]}, {"w": "and", "b": [0.6949, 0.5885, 0.7249, 0.6036]}, {"w": "hyperparameters.", "b": [0.7311, 0.5885, 0.8727, 0.6036]}, {"w": "Tools", "b": [0.1306, 0.6065, 0.1743, 0.6215]}, {"w": "like", "b": [0.1804, 0.6065, 0.2085, 0.6215]}, {"w": "confusion", "b": [0.2146, 0.6065, 0.2911, 0.6215]}, {"w": "matrix", "b": [0.2972, 0.6065, 0.3518, 0.6215]}, {"w": "and", "b": [0.3579, 0.6065, 0.3881, 0.6215]}, {"w": "various", "b": [0.3942, 0.6065, 0.452, 0.6215]}, {"w": "performance", "b": [0.4582, 0.6065, 0.559, 0.6215]}, {"w": "metrics,", "b": [0.5651, 0.6065, 0.6297, 0.6215]}, {"w": "such", "b": [0.6359, 0.6065, 0.6718, 0.6215]}, {"w": "as", "b": [0.678, 0.6065, 0.6947, 0.6215]}, {"w": "precision,", "b": [0.7008, 0.6065, 0.7779, 0.6215]}, {"w": "recall,", "b": [0.784, 0.6065, 0.8329, 0.6215]}, {"w": "and", "b": [0.839, 0.6065, 0.8691, 0.6215]}, {"w": "AUC,", "b": [0.1305, 0.6246, 0.1752, 0.6394]}, {"w": "allow", "b": [0.1813, 0.6246, 0.222, 0.6394]}, {"w": "comparing", "b": [0.2281, 0.6246, 0.3105, 0.6394]}, {"w": "candidate", "b": [0.3166, 0.6246, 0.393, 0.6394]}, {"w": "models,", "b": [0.399, 0.6246, 0.459, 0.6394]}, {"w": "and", "b": [0.4651, 0.6246, 0.4942, 0.6394]}, {"w": "guide", "b": [0.5003, 0.6246, 0.5425, 0.6394]}, {"w": "the", "b": [0.5486, 0.6246, 0.5737, 0.6394]}, {"w": "model", "b": [0.5798, 0.6246, 0.6275, 0.6394]}, {"w": "training", "b": [0.6336, 0.6246, 0.696, 0.6394]}, {"w": "in", "b": [0.702, 0.6246, 0.7171, 0.6394]}, {"w": "the", "b": [0.7232, 0.6246, 0.7483, 0.6394]}, {"w": "right", "b": [0.7544, 0.6246, 0.7921, 0.6394]}, {"w": "direction.", "b": [0.7982, 0.6246, 0.8727, 0.6394]}]}, {"id": "b_5", "type": "paragraph", "text": "First, validation data is used to assess the chosen performance metric and compare models. Once the best model is identified, the test set is used, also in offline mode, to again assess the best model’s performance. This final offline assessment guarantees post-deployment model performance. In this chapter, we talk, among other topics, about establishing statistical bounds on the offline test performance of the model.", "words": [{"w": "First,", "b": [0.1312, 0.6514, 0.1754, 0.6664]}, {"w": "validation", "b": [0.1816, 0.6514, 0.2614, 0.6664]}, {"w": "data", "b": [0.2675, 0.6514, 0.3035, 0.6664]}, {"w": "is", "b": [0.3097, 0.6514, 0.3222, 0.6664]}, {"w": "used", "b": [0.3283, 0.6514, 0.3645, 0.6664]}, {"w": "to", "b": [0.3706, 0.6514, 0.3871, 0.6664]}, {"w": "assess", "b": [0.3933, 0.6514, 0.44, 0.6664]}, {"w": "the", "b": [0.4462, 0.6514, 0.4719, 0.6664]}, {"w": "chosen", "b": [0.4781, 0.6514, 0.5312, 0.6664]}, {"w": "performance", "b": [0.5374, 0.6514, 0.6374, 0.6664]}, {"w": "metric", "b": [0.6435, 0.6514, 0.695, 0.6664]}, {"w": "and", "b": [0.7012, 0.6514, 0.731, 0.6664]}, {"w": "compare", "b": [0.7372, 0.6514, 0.8052, 0.6664]}, {"w": "models.", "b": [0.8114, 0.6514, 0.8727, 0.6664]}, {"w": "Once", "b": [0.1312, 0.6695, 0.1714, 0.6843]}, {"w": "the", "b": [0.1772, 0.6695, 0.2023, 0.6843]}, {"w": "best", "b": [0.2081, 0.6695, 0.2408, 0.6843]}, {"w": "model", "b": [0.2466, 0.6695, 0.2943, 0.6843]}, {"w": "is", "b": [0.3, 0.6695, 0.3122, 0.6843]}, {"w": "identified,", "b": [0.318, 0.6695, 0.3959, 0.6843]}, {"w": "the", "b": [0.4017, 0.6695, 0.4268, 0.6843]}, {"w": "test", "b": [0.4326, 0.6695, 0.4618, 0.6843]}, {"w": "set", "b": [0.4675, 0.6695, 0.4898, 0.6843]}, {"w": "is", "b": [0.4955, 0.6695, 0.5077, 0.6843]}, {"w": "used,", "b": [0.5134, 0.6695, 0.5537, 0.6843]}, {"w": "also", "b": [0.5596, 0.6695, 0.5898, 0.6843]}, {"w": "in", "b": [0.5956, 0.6695, 0.6106, 0.6843]}, {"w": "offline", "b": [0.6164, 0.6695, 0.6636, 0.6843]}, {"w": "mode,", "b": [0.6693, 0.6695, 0.7171, 0.6843]}, {"w": "to", "b": [0.7229, 0.6695, 0.739, 0.6843]}, {"w": "again", "b": [0.7447, 0.6695, 0.7869, 0.6843]}, {"w": "assess", "b": [0.7926, 0.6695, 0.8383, 0.6843]}, {"w": "the", "b": [0.844, 0.6695, 0.8692, 0.6843]}, {"w": "best", "b": [0.1312, 0.6872, 0.165, 0.7023]}, {"w": "model’s", "b": [0.1712, 0.6872, 0.2329, 0.7023]}, {"w": "performance.", "b": [0.2391, 0.6872, 0.3449, 0.7023]}, {"w": "This", "b": [0.3531, 0.6872, 0.3895, 0.7023]}, {"w": "final", "b": [0.3956, 0.6872, 0.4309, 0.7023]}, {"w": "offline", "b": [0.437, 0.6872, 0.4857, 0.7023]}, {"w": "assessment", "b": [0.4919, 0.6872, 0.5799, 0.7023]}, {"w": "guarantees", "b": [0.586, 0.6872, 0.6728, 0.7023]}, {"w": "post-deployment", "b": [0.6789, 0.6872, 0.8138, 0.7023]}, {"w": "model", "b": [0.8199, 0.6872, 0.8691, 0.7023]}, {"w": "performance.", "b": [0.1312, 0.7051, 0.238, 0.7202]}, {"w": "In", "b": [0.2493, 0.7051, 0.2666, 0.7202]}, {"w": "this", "b": [0.2737, 0.7051, 0.3042, 0.7202]}, {"w": "chapter,", "b": [0.3114, 0.7051, 0.3778, 0.7202]}, {"w": "we", "b": [0.3853, 0.7051, 0.4067, 0.7202]}, {"w": "talk,", "b": [0.4139, 0.7051, 0.451, 0.7202]}, {"w": "among", "b": [0.4585, 0.7051, 0.5128, 0.7202]}, {"w": "other", "b": [0.52, 0.7051, 0.5629, 0.7202]}, {"w": "topics,", "b": [0.5701, 0.7051, 0.6236, 0.7202]}, {"w": "about", "b": [0.631, 0.7051, 0.6786, 0.7202]}, {"w": "establishing", "b": [0.6858, 0.7051, 0.7822, 0.7202]}, {"w": "statistical", "b": [0.7894, 0.7051, 0.8691, 0.7202]}, {"w": "bounds", "b": [0.1312, 0.7232, 0.1893, 0.7381]}, {"w": "on", "b": [0.1954, 0.7232, 0.2149, 0.7381]}, {"w": "the", "b": [0.2211, 0.7232, 0.2467, 0.7381]}, {"w": "offline", "b": [0.2529, 0.7232, 0.301, 0.7381]}, {"w": "test", "b": [0.3072, 0.7232, 0.3371, 0.7381]}, {"w": "performance", "b": [0.3432, 0.7232, 0.4428, 0.7381]}, {"w": "of", "b": [0.4489, 0.7232, 0.4638, 0.7381]}, {"w": "the", "b": [0.4699, 0.7232, 0.4956, 0.7381]}, {"w": "model.", "b": [0.5017, 0.7232, 0.5556, 0.7381]}]}, {"id": "b_6", "type": "paragraph", "text": "A significant part of the chapter is devoted to the online model evaluation, that is, testing and comparing models in production by using online data. The difference between offline and online model evaluation, as well as the placement of each type of evaluation in a machine learning system, is illustrated in Figure 2.", "words": [{"w": "A", "b": [0.1305, 0.7502, 0.1441, 0.765]}, {"w": "significant", "b": [0.1495, 0.7502, 0.2295, 0.765]}, {"w": "part", "b": [0.2349, 0.7502, 0.2681, 0.765]}, {"w": "of", "b": [0.2735, 0.7502, 0.2881, 0.765]}, {"w": "the", "b": [0.2935, 0.7502, 0.3187, 0.765]}, {"w": "chapter", "b": [0.3241, 0.7502, 0.3829, 0.765]}, {"w": "is", "b": [0.3883, 0.7502, 0.4005, 0.765]}, {"w": "devoted", "b": [0.4059, 0.7502, 0.4672, 0.765]}, {"w": "to", "b": [0.4726, 0.7502, 0.4887, 0.765]}, {"w": "the", "b": [0.4941, 0.7502, 0.5192, 0.765]}, {"w": "online", "b": [0.5245, 0.7501, 0.5802, 0.7651]}, {"w": "model", "b": [0.5864, 0.7501, 0.6427, 0.7651]}, {"w": "evaluation,", "b": [0.6489, 0.7501, 0.7486, 0.7651]}, {"w": "that", "b": [0.7541, 0.7502, 0.7873, 0.765]}, {"w": "is,", "b": [0.7927, 0.7502, 0.8099, 0.765]}, {"w": "testing", "b": [0.8155, 0.7502, 0.8688, 0.765]}, {"w": "and", "b": [0.1312, 0.7682, 0.1604, 0.783]}, {"w": "comparing", "b": [0.1661, 0.7682, 0.2485, 0.783]}, {"w": "models", "b": [0.2542, 0.7682, 0.3091, 0.783]}, {"w": "in", "b": [0.3147, 0.7682, 0.3298, 0.783]}, {"w": "production", "b": [0.3355, 0.7682, 0.4215, 0.783]}, {"w": "by", "b": [0.4272, 0.7682, 0.4463, 0.783]}, {"w": "using", "b": [0.452, 0.7682, 0.4933, 0.783]}, {"w": "online", "b": [0.4989, 0.7682, 0.5462, 0.783]}, {"w": "data.", "b": [0.5519, 0.7682, 0.5921, 0.783]}, {"w": "The", "b": [0.6001, 0.7682, 0.6313, 0.783]}, {"w": "difference", "b": [0.6369, 0.7682, 0.7119, 0.783]}, {"w": "between", "b": [0.7176, 0.7682, 0.7814, 0.783]}, {"w": "offline", "b": [0.7871, 0.7682, 0.8343, 0.783]}, {"w": "and", "b": [0.84, 0.7682, 0.8691, 0.783]}, {"w": "online", "b": [0.1312, 0.7859, 0.1804, 0.801]}, {"w": "model", "b": [0.1867, 0.7859, 0.2364, 0.801]}, {"w": "evaluation,", "b": [0.2428, 0.7859, 0.3322, 0.801]}, {"w": "as", "b": [0.3386, 0.7859, 0.3555, 0.801]}, {"w": "well", "b": [0.3618, 0.7859, 0.3937, 0.801]}, {"w": "as", "b": [0.4001, 0.7859, 0.4169, 0.801]}, {"w": "the", "b": [0.4233, 0.7859, 0.4494, 0.801]}, {"w": "placement", "b": [0.4558, 0.7859, 0.5389, 0.801]}, {"w": "of", "b": [0.5453, 0.7859, 0.5605, 0.801]}, {"w": "each", "b": [0.5668, 0.7859, 0.6029, 0.801]}, {"w": "type", "b": [0.6093, 0.7859, 0.6454, 0.801]}, {"w": "of", "b": [0.6517, 0.7859, 0.6669, 0.801]}, {"w": "evaluation", "b": [0.6732, 0.7859, 0.7575, 0.801]}, {"w": "in", "b": [0.7638, 0.7859, 0.7795, 0.801]}, {"w": "a", "b": [0.7859, 0.7859, 0.7953, 0.801]}, {"w": "machine", "b": [0.8016, 0.7859, 0.8691, 0.801]}, {"w": "learning", "b": [0.1312, 0.804, 0.1959, 0.8189]}, {"w": "system,", "b": [0.202, 0.804, 0.2622, 0.8189]}, {"w": "is", "b": [0.2684, 0.804, 0.2808, 0.8189]}, {"w": "illustrated", "b": [0.287, 0.804, 0.3692, 0.8189]}, {"w": "in", "b": [0.3753, 0.804, 0.3907, 0.8189]}, {"w": "Figure", "b": [0.3968, 0.804, 0.4489, 0.8189]}, {"w": "2.", "b": [0.4551, 0.804, 0.4694, 0.8189]}]}, {"id": "b_7", "type": "paragraph", "text": "In Figure 2, the historical data is first used to train a deployment candidate. Then it is evaluated offline, and, if the result is satisfactory, deployment candidate becomes the deployed", "words": [{"w": "In", "b": [0.1312, 0.8308, 0.1485, 0.8459]}, {"w": "Figure", "b": [0.1557, 0.8308, 0.2088, 0.8459]}, {"w": "2,", "b": [0.216, 0.8308, 0.2306, 0.8459]}, {"w": "the", "b": [0.238, 0.8308, 0.2642, 0.8459]}, {"w": "historical", "b": [0.2714, 0.8308, 0.3469, 0.8459]}, {"w": "data", "b": [0.354, 0.8308, 0.3906, 0.8459]}, {"w": "is", "b": [0.3978, 0.8308, 0.4105, 0.8459]}, {"w": "first", "b": [0.4176, 0.8308, 0.4502, 0.8459]}, {"w": "used", "b": [0.4574, 0.8308, 0.4941, 0.8459]}, {"w": "to", "b": [0.5013, 0.8308, 0.5181, 0.8459]}, {"w": "train", "b": [0.5252, 0.8308, 0.565, 0.8459]}, {"w": "a", "b": [0.5722, 0.8308, 0.5816, 0.8459]}, {"w": "deployment", "b": [0.5888, 0.8308, 0.6835, 0.8459]}, {"w": "candidate.", "b": [0.6906, 0.8308, 0.7754, 0.8459]}, {"w": "Then", "b": [0.7867, 0.8308, 0.8295, 0.8459]}, {"w": "it", "b": [0.8367, 0.8308, 0.8493, 0.8459]}, {"w": "is", "b": [0.8565, 0.8308, 0.8691, 0.8459]}, {"w": "evaluated", "b": [0.1312, 0.8489, 0.2061, 0.8637]}, {"w": "offline,", "b": [0.2113, 0.8489, 0.2635, 0.8637]}, {"w": "and,", "b": [0.2689, 0.8489, 0.3031, 0.8637]}, {"w": "if", "b": [0.3085, 0.8489, 0.3191, 0.8637]}, {"w": "the", "b": [0.3243, 0.8489, 0.3494, 0.8637]}, {"w": "result", "b": [0.3546, 0.8489, 0.399, 0.8637]}, {"w": "is", "b": [0.4042, 0.8489, 0.4163, 0.8637]}, {"w": "satisfactory,", "b": [0.4215, 0.8489, 0.5157, 0.8637]}, {"w": "deployment", "b": [0.5211, 0.8489, 0.6121, 0.8637]}, {"w": "candidate", "b": [0.6173, 0.8489, 0.6937, 0.8637]}, {"w": "becomes", "b": [0.6989, 0.8489, 0.7648, 0.8637]}, {"w": "the", "b": [0.77, 0.8489, 0.7951, 0.8637]}, {"w": "deployed", "b": [0.8003, 0.8489, 0.8692, 0.8637]}]}, {"id": "b_8", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "4", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 222, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 2: The placement of offline and online model evaluations in a machine learning system.", "words": [{"w": "Figure", "b": [0.1312, 0.3696, 0.1823, 0.3844]}, {"w": "2:", "b": [0.1873, 0.3696, 0.2014, 0.3844]}, {"w": "The", "b": [0.209, 0.3696, 0.2402, 0.3844]}, {"w": "placement", "b": [0.2452, 0.3696, 0.3251, 0.3844]}, {"w": "of", "b": [0.3301, 0.3696, 0.3447, 0.3844]}, {"w": "offline", "b": [0.3497, 0.3696, 0.3969, 0.3844]}, {"w": "and", "b": [0.4019, 0.3696, 0.4311, 0.3844]}, {"w": "online", "b": [0.4361, 0.3696, 0.4834, 0.3844]}, {"w": "model", "b": [0.4884, 0.3696, 0.5361, 0.3844]}, {"w": "evaluations", "b": [0.5411, 0.3696, 0.6292, 0.3844]}, {"w": "in", "b": [0.6342, 0.3696, 0.6493, 0.3844]}, {"w": "a", "b": [0.6543, 0.3696, 0.6633, 0.3844]}, {"w": "machine", "b": [0.6683, 0.3696, 0.7332, 0.3844]}, {"w": "learning", "b": [0.7379, 0.3695, 0.8026, 0.3845]}, {"w": "system.", "b": [0.8087, 0.3695, 0.8688, 0.3845]}]}, {"id": "b_1", "type": "paragraph", "text": "model, and starts accepting user queries. Then, user queries and the model predictions are used for an online evaluation of the model. The online data is then used to improve the model. To close the loop, the online data is permanently copied to the offline data repository.", "words": [{"w": "model,", "b": [0.1312, 0.4197, 0.1854, 0.4347]}, {"w": "and", "b": [0.1915, 0.4197, 0.2214, 0.4347]}, {"w": "starts", "b": [0.2276, 0.4197, 0.2732, 0.4347]}, {"w": "accepting", "b": [0.2793, 0.4197, 0.3557, 0.4347]}, {"w": "user", "b": [0.3618, 0.4197, 0.395, 0.4347]}, {"w": "queries.", "b": [0.4011, 0.4197, 0.4627, 0.4347]}, {"w": "Then,", "b": [0.4709, 0.4197, 0.5183, 0.4347]}, {"w": "user", "b": [0.5244, 0.4197, 0.5576, 0.4347]}, {"w": "queries", "b": [0.5638, 0.4197, 0.6202, 0.4347]}, {"w": "and", "b": [0.6263, 0.4197, 0.6562, 0.4347]}, {"w": "the", "b": [0.6623, 0.4197, 0.6881, 0.4347]}, {"w": "model", "b": [0.6942, 0.4197, 0.7432, 0.4347]}, {"w": "predictions", "b": [0.7494, 0.4197, 0.8383, 0.4347]}, {"w": "are", "b": [0.8444, 0.4197, 0.8692, 0.4347]}, {"w": "used", "b": [0.1312, 0.4376, 0.168, 0.4527]}, {"w": "for", "b": [0.175, 0.4376, 0.1975, 0.4527]}, {"w": "an", "b": [0.2046, 0.4376, 0.2245, 0.4527]}, {"w": "online", "b": [0.2315, 0.4376, 0.2807, 0.4527]}, {"w": "evaluation", "b": [0.2877, 0.4376, 0.372, 0.4527]}, {"w": "of", "b": [0.379, 0.4376, 0.3942, 0.4527]}, {"w": "the", "b": [0.4012, 0.4376, 0.4274, 0.4527]}, {"w": "model.", "b": [0.4344, 0.4376, 0.4893, 0.4527]}, {"w": "The", "b": [0.5002, 0.4376, 0.5326, 0.4527]}, {"w": "online", "b": [0.5397, 0.4376, 0.5888, 0.4527]}, {"w": "data", "b": [0.5959, 0.4376, 0.6325, 0.4527]}, {"w": "is", "b": [0.6395, 0.4376, 0.6522, 0.4527]}, {"w": "then", "b": [0.6593, 0.4376, 0.6959, 0.4527]}, {"w": "used", "b": [0.7029, 0.4376, 0.7396, 0.4527]}, {"w": "to", "b": [0.7467, 0.4376, 0.7634, 0.4527]}, {"w": "improve", "b": [0.7705, 0.4376, 0.8359, 0.4527]}, {"w": "the", "b": [0.843, 0.4376, 0.8691, 0.4527]}, {"w": "model.", "b": [0.1312, 0.4558, 0.184, 0.4706]}, {"w": "To", "b": [0.1921, 0.4558, 0.2127, 0.4706]}, {"w": "close", "b": [0.2186, 0.4558, 0.2559, 0.4706]}, {"w": "the", "b": [0.2618, 0.4558, 0.287, 0.4706]}, {"w": "loop,", "b": [0.2929, 0.4558, 0.3316, 0.4706]}, {"w": "the", "b": [0.3376, 0.4558, 0.3627, 0.4706]}, {"w": "online", "b": [0.3687, 0.4558, 0.4159, 0.4706]}, {"w": "data", "b": [0.4218, 0.4558, 0.457, 0.4706]}, {"w": "is", "b": [0.463, 0.4558, 0.4751, 0.4706]}, {"w": "permanently", "b": [0.4811, 0.4558, 0.5801, 0.4706]}, {"w": "copied", "b": [0.586, 0.4558, 0.6363, 0.4706]}, {"w": "to", "b": [0.6422, 0.4558, 0.6583, 0.4706]}, {"w": "the", "b": [0.6642, 0.4558, 0.6894, 0.4706]}, {"w": "offline", "b": [0.6953, 0.4558, 0.7425, 0.4706]}, {"w": "data", "b": [0.7485, 0.4558, 0.7836, 0.4706]}, {"w": "repository.", "b": [0.7896, 0.4558, 0.8727, 0.4706]}]}, {"id": "b_2", "type": "paragraph", "text": "Why do we evaluate both offline and online? The offline model evaluation reflects how well", "words": [{"w": "Why", "b": [0.1303, 0.4826, 0.1689, 0.4976]}, {"w": "do", "b": [0.175, 0.4826, 0.1945, 0.4976]}, {"w": "we", "b": [0.2007, 0.4826, 0.2218, 0.4976]}, {"w": "evaluate", "b": [0.2279, 0.4826, 0.2943, 0.4976]}, {"w": "both", "b": [0.3004, 0.4826, 0.338, 0.4976]}, {"w": "offline", "b": [0.3441, 0.4826, 0.3924, 0.4976]}, {"w": "and", "b": [0.3986, 0.4826, 0.4284, 0.4976]}, {"w": "online?", "b": [0.4345, 0.4826, 0.4916, 0.4976]}, {"w": "The", "b": [0.4998, 0.4826, 0.5317, 0.4976]}, {"w": "offline", "b": [0.5379, 0.4826, 0.5862, 0.4976]}, {"w": "model", "b": [0.5923, 0.4826, 0.6412, 0.4976]}, {"w": "evaluation", "b": [0.6473, 0.4826, 0.7301, 0.4976]}, {"w": "reflects", "b": [0.7363, 0.4826, 0.793, 0.4976]}, {"w": "how", "b": [0.7991, 0.4826, 0.8315, 0.4976]}, {"w": "well", "b": [0.8377, 0.4826, 0.8691, 0.4976]}]}, {"id": "b_3", "type": "paragraph", "text": "the analyst succeeded in finding the right features, learning algorithm, model, and values of hyperparameters. In other words, the offline model evaluation reflects how good the model is from an engineering standpoint.", "words": [{"w": "the", "b": [0.1312, 0.5006, 0.1567, 0.5155]}, {"w": "analyst", "b": [0.1629, 0.5006, 0.2207, 0.5155]}, {"w": "succeeded", "b": [0.2268, 0.5006, 0.3055, 0.5155]}, {"w": "in", "b": [0.3117, 0.5006, 0.327, 0.5155]}, {"w": "finding", "b": [0.3332, 0.5006, 0.3883, 0.5155]}, {"w": "the", "b": [0.3944, 0.5006, 0.42, 0.5155]}, {"w": "right", "b": [0.4261, 0.5006, 0.4644, 0.5155]}, {"w": "features,", "b": [0.4706, 0.5006, 0.5386, 0.5155]}, {"w": "learning", "b": [0.5448, 0.5006, 0.6091, 0.5155]}, {"w": "algorithm,", "b": [0.6153, 0.5006, 0.698, 0.5155]}, {"w": "model,", "b": [0.7041, 0.5006, 0.7577, 0.5155]}, {"w": "and", "b": [0.7639, 0.5006, 0.7935, 0.5155]}, {"w": "values", "b": [0.7996, 0.5006, 0.8482, 0.5155]}, {"w": "of", "b": [0.8544, 0.5006, 0.8691, 0.5155]}, {"w": "hyperparameters.", "b": [0.1312, 0.5186, 0.2687, 0.5334]}, {"w": "In", "b": [0.2768, 0.5186, 0.2934, 0.5334]}, {"w": "other", "b": [0.2994, 0.5186, 0.3407, 0.5334]}, {"w": "words,", "b": [0.3467, 0.5186, 0.3976, 0.5334]}, {"w": "the", "b": [0.4036, 0.5186, 0.4288, 0.5334]}, {"w": "offline", "b": [0.4348, 0.5186, 0.482, 0.5334]}, {"w": "model", "b": [0.488, 0.5186, 0.5358, 0.5334]}, {"w": "evaluation", "b": [0.5418, 0.5186, 0.6227, 0.5334]}, {"w": "reflects", "b": [0.6287, 0.5186, 0.6841, 0.5334]}, {"w": "how", "b": [0.6901, 0.5186, 0.7218, 0.5334]}, {"w": "good", "b": [0.7278, 0.5186, 0.766, 0.5334]}, {"w": "the", "b": [0.772, 0.5186, 0.7971, 0.5334]}, {"w": "model", "b": [0.8032, 0.5186, 0.8509, 0.5334]}, {"w": "is", "b": [0.8569, 0.5186, 0.8691, 0.5334]}, {"w": "from", "b": [0.1312, 0.5364, 0.1687, 0.5514]}, {"w": "an", "b": [0.1748, 0.5364, 0.1943, 0.5514]}, {"w": "engineering", "b": [0.2005, 0.5364, 0.2918, 0.5514]}, {"w": "standpoint.", "b": [0.298, 0.5364, 0.3893, 0.5514]}]}, {"id": "b_4", "type": "paragraph", "text": "Online evaluation, on the other hand, focuses on measuring business outcomes, such as customer satisfaction, average online time, open rate, and click-through rate. This informa- tion may not be reflected in historical data, but it’s what the business really cares about. Furthermore, offline evaluation doesn’t allow us to test the model in some conditions that can be observed online, such as connection and data loss, and call delays.", "words": [{"w": "Online", "b": [0.1312, 0.5632, 0.1856, 0.5783]}, {"w": "evaluation,", "b": [0.1935, 0.5632, 0.2829, 0.5783]}, {"w": "on", "b": [0.2912, 0.5632, 0.3111, 0.5783]}, {"w": "the", "b": [0.319, 0.5632, 0.3451, 0.5783]}, {"w": "other", "b": [0.353, 0.5632, 0.3959, 0.5783]}, {"w": "hand,", "b": [0.4038, 0.5632, 0.4498, 0.5783]}, {"w": "focuses", "b": [0.4581, 0.5632, 0.5158, 0.5783]}, {"w": "on", "b": [0.5237, 0.5632, 0.5436, 0.5783]}, {"w": "measuring", "b": [0.5514, 0.5632, 0.6353, 0.5783]}, {"w": "business", "b": [0.6431, 0.5632, 0.7104, 0.5783]}, {"w": "outcomes,", "b": [0.7183, 0.5632, 0.8, 0.5783]}, {"w": "such", "b": [0.8082, 0.5632, 0.8445, 0.5783]}, {"w": "as", "b": [0.8523, 0.5632, 0.8692, 0.5783]}, {"w": "customer", "b": [0.1312, 0.5813, 0.2043, 0.5963]}, {"w": "satisfaction,", "b": [0.2104, 0.5813, 0.3066, 0.5963]}, {"w": "average", "b": [0.3128, 0.5813, 0.3729, 0.5963]}, {"w": "online", "b": [0.3791, 0.5813, 0.4273, 0.5963]}, {"w": "time,", "b": [0.4335, 0.5813, 0.4745, 0.5963]}, {"w": "open", "b": [0.4807, 0.5813, 0.5192, 0.5963]}, {"w": "rate,", "b": [0.5254, 0.5813, 0.5624, 0.5963]}, {"w": "and", "b": [0.5685, 0.5813, 0.5983, 0.5963]}, {"w": "click-through", "b": [0.6045, 0.5813, 0.7103, 0.5963]}, {"w": "rate.", "b": [0.7164, 0.5813, 0.7534, 0.5963]}, {"w": "This", "b": [0.7617, 0.5813, 0.7977, 0.5963]}, {"w": "informa-", "b": [0.8039, 0.5813, 0.8722, 0.5963]}, {"w": "tion", "b": [0.1312, 0.5991, 0.1637, 0.6142]}, {"w": "may", "b": [0.1702, 0.5991, 0.2048, 0.6142]}, {"w": "not", "b": [0.2113, 0.5991, 0.2385, 0.6142]}, {"w": "be", "b": [0.2451, 0.5991, 0.2645, 0.6142]}, {"w": "reflected", "b": [0.2711, 0.5991, 0.3402, 0.6142]}, {"w": "in", "b": [0.3467, 0.5991, 0.3624, 0.6142]}, {"w": "historical", "b": [0.369, 0.5991, 0.4445, 0.6142]}, {"w": "data,", "b": [0.4511, 0.5991, 0.4929, 0.6142]}, {"w": "but", "b": [0.4996, 0.5991, 0.5278, 0.6142]}, {"w": "it’s", "b": [0.5344, 0.5991, 0.5596, 0.6142]}, {"w": "what", "b": [0.5662, 0.5991, 0.607, 0.6142]}, {"w": "the", "b": [0.6136, 0.5991, 0.6398, 0.6142]}, {"w": "business", "b": [0.6463, 0.5991, 0.7136, 0.6142]}, {"w": "really", "b": [0.7202, 0.5991, 0.7658, 0.6142]}, {"w": "cares", "b": [0.7724, 0.5991, 0.8133, 0.6142]}, {"w": "about.", "b": [0.8199, 0.5991, 0.8727, 0.6142]}, {"w": "Furthermore,", "b": [0.1312, 0.6171, 0.2393, 0.6322]}, {"w": "offline", "b": [0.2455, 0.6171, 0.2946, 0.6322]}, {"w": "evaluation", "b": [0.3007, 0.6171, 0.3849, 0.6322]}, {"w": "doesn’t", "b": [0.391, 0.6171, 0.4502, 0.6322]}, {"w": "allow", "b": [0.4563, 0.6171, 0.4987, 0.6322]}, {"w": "us", "b": [0.5048, 0.6171, 0.5227, 0.6322]}, {"w": "to", "b": [0.5288, 0.6171, 0.5456, 0.6322]}, {"w": "test", "b": [0.5517, 0.6171, 0.5821, 0.6322]}, {"w": "the", "b": [0.5883, 0.6171, 0.6144, 0.6322]}, {"w": "model", "b": [0.6206, 0.6171, 0.6702, 0.6322]}, {"w": "in", "b": [0.6764, 0.6171, 0.6921, 0.6322]}, {"w": "some", "b": [0.6982, 0.6171, 0.7391, 0.6322]}, {"w": "conditions", "b": [0.7452, 0.6171, 0.8289, 0.6322]}, {"w": "that", "b": [0.8351, 0.6171, 0.8696, 0.6322]}, {"w": "can", "b": [0.1312, 0.6351, 0.1589, 0.6501]}, {"w": "be", "b": [0.1651, 0.6351, 0.1841, 0.6501]}, {"w": "observed", "b": [0.1902, 0.6351, 0.2601, 0.6501]}, {"w": "online,", "b": [0.2663, 0.6351, 0.3196, 0.6501]}, {"w": "such", "b": [0.3257, 0.6351, 0.3612, 0.6501]}, {"w": "as", "b": [0.3674, 0.6351, 0.3839, 0.6501]}, {"w": "connection", "b": [0.39, 0.6351, 0.4762, 0.6501]}, {"w": "and", "b": [0.4823, 0.6351, 0.5121, 0.6501]}, {"w": "data", "b": [0.5182, 0.6351, 0.5541, 0.6501]}, {"w": "loss,", "b": [0.5603, 0.6351, 0.5943, 0.6501]}, {"w": "and", "b": [0.6005, 0.6351, 0.6302, 0.6501]}, {"w": "call", "b": [0.6364, 0.6351, 0.664, 0.6501]}, {"w": "delays.", "b": [0.6702, 0.6351, 0.7247, 0.6501]}]}, {"id": "b_5", "type": "paragraph", "text": "The performance results obtained on the historical data will hold after deployment only if the distribution of the data remains the same over time. In practice, however, it’s not always the case. Typical examples of a distribution shift include the ever-changing interests of the user of a mobile or online application, instability of financial markets, climate change, or wear of a mechanical system whose properties the model is intended to predict.", "words": [{"w": "The", "b": [0.1306, 0.662, 0.1629, 0.677]}, {"w": "performance", "b": [0.169, 0.662, 0.2703, 0.677]}, {"w": "results", "b": [0.2765, 0.662, 0.3299, 0.677]}, {"w": "obtained", "b": [0.3361, 0.662, 0.407, 0.677]}, {"w": "on", "b": [0.4131, 0.662, 0.4329, 0.677]}, {"w": "the", "b": [0.4391, 0.662, 0.4652, 0.677]}, {"w": "historical", "b": [0.4713, 0.662, 0.5466, 0.677]}, {"w": "data", "b": [0.5527, 0.662, 0.5892, 0.677]}, {"w": "will", "b": [0.5953, 0.662, 0.6245, 0.677]}, {"w": "hold", "b": [0.6307, 0.662, 0.6661, 0.677]}, {"w": "after", "b": [0.6723, 0.662, 0.7104, 0.677]}, {"w": "deployment", "b": [0.7166, 0.662, 0.8109, 0.677]}, {"w": "only", "b": [0.8171, 0.662, 0.852, 0.677]}, {"w": "if", "b": [0.8582, 0.662, 0.8691, 0.677]}, {"w": "the", "b": [0.1312, 0.6801, 0.1564, 0.6949]}, {"w": "distribution", "b": [0.1623, 0.6801, 0.255, 0.6949]}, {"w": "of", "b": [0.2609, 0.6801, 0.2755, 0.6949]}, {"w": "the", "b": [0.2815, 0.6801, 0.3066, 0.6949]}, {"w": "data", "b": [0.3126, 0.6801, 0.3478, 0.6949]}, {"w": "remains", "b": [0.3538, 0.6801, 0.4152, 0.6949]}, {"w": "the", "b": [0.4212, 0.6801, 0.4463, 0.6949]}, {"w": "same", "b": [0.4523, 0.6801, 0.4916, 0.6949]}, {"w": "over", "b": [0.4976, 0.6801, 0.5303, 0.6949]}, {"w": "time.", "b": [0.5363, 0.6801, 0.5765, 0.6949]}, {"w": "In", "b": [0.5846, 0.6801, 0.6012, 0.6949]}, {"w": "practice,", "b": [0.6072, 0.6801, 0.6746, 0.6949]}, {"w": "however,", "b": [0.6806, 0.6801, 0.7489, 0.6949]}, {"w": "it’s", "b": [0.7549, 0.6801, 0.7792, 0.6949]}, {"w": "not", "b": [0.7852, 0.6801, 0.8113, 0.6949]}, {"w": "always", "b": [0.8173, 0.6801, 0.8691, 0.6949]}, {"w": "the", "b": [0.1312, 0.6978, 0.1574, 0.7129]}, {"w": "case.", "b": [0.1638, 0.6978, 0.2026, 0.7129]}, {"w": "Typical", "b": [0.2116, 0.6978, 0.2733, 0.7129]}, {"w": "examples", "b": [0.2797, 0.6978, 0.3546, 0.7129]}, {"w": "of", "b": [0.361, 0.6978, 0.3762, 0.7129]}, {"w": "a", "b": [0.3826, 0.6978, 0.392, 0.7129]}, {"w": "distribution", "b": [0.3985, 0.698, 0.5076, 0.7129]}, {"w": "shift", "b": [0.5149, 0.698, 0.5557, 0.7129]}, {"w": "include", "b": [0.5621, 0.6978, 0.6207, 0.7129]}, {"w": "the", "b": [0.6271, 0.6978, 0.6532, 0.7129]}, {"w": "ever-changing", "b": [0.6597, 0.6978, 0.7722, 0.7129]}, {"w": "interests", "b": [0.7786, 0.6978, 0.8474, 0.7129]}, {"w": "of", "b": [0.8538, 0.6978, 0.869, 0.7129]}, {"w": "the", "b": [0.1312, 0.716, 0.1565, 0.7308]}, {"w": "user", "b": [0.1626, 0.716, 0.1951, 0.7308]}, {"w": "of", "b": [0.2013, 0.716, 0.2159, 0.7308]}, {"w": "a", "b": [0.2221, 0.716, 0.2311, 0.7308]}, {"w": "mobile", "b": [0.2373, 0.716, 0.2898, 0.7308]}, {"w": "or", "b": [0.2959, 0.716, 0.3121, 0.7308]}, {"w": "online", "b": [0.3183, 0.716, 0.3657, 0.7308]}, {"w": "application,", "b": [0.3719, 0.716, 0.4647, 0.7308]}, {"w": "instability", "b": [0.4709, 0.716, 0.5507, 0.7308]}, {"w": "of", "b": [0.5569, 0.716, 0.5715, 0.7308]}, {"w": "financial", "b": [0.5777, 0.716, 0.6443, 0.7308]}, {"w": "markets,", "b": [0.6505, 0.716, 0.7182, 0.7308]}, {"w": "climate", "b": [0.7244, 0.716, 0.7819, 0.7308]}, {"w": "change,", "b": [0.7881, 0.716, 0.8471, 0.7308]}, {"w": "or", "b": [0.8533, 0.716, 0.8695, 0.7308]}, {"w": "wear", "b": [0.1306, 0.7338, 0.168, 0.7488]}, {"w": "of", "b": [0.1742, 0.7338, 0.1891, 0.7488]}, {"w": "a", "b": [0.1952, 0.7338, 0.2044, 0.7488]}, {"w": "mechanical", "b": [0.2106, 0.7338, 0.2993, 0.7488]}, {"w": "system", "b": [0.3054, 0.7338, 0.3605, 0.7488]}, {"w": "whose", "b": [0.3667, 0.7338, 0.415, 0.7488]}, {"w": "properties", "b": [0.4211, 0.7338, 0.5018, 0.7488]}, {"w": "the", "b": [0.508, 0.7338, 0.5336, 0.7488]}, {"w": "model", "b": [0.5398, 0.7338, 0.5885, 0.7488]}, {"w": "is", "b": [0.5946, 0.7338, 0.607, 0.7488]}, {"w": "intended", "b": [0.6132, 0.7338, 0.6824, 0.7488]}, {"w": "to", "b": [0.6886, 0.7338, 0.705, 0.7488]}, {"w": "predict.", "b": [0.7111, 0.7338, 0.7727, 0.7488]}]}, {"id": "b_6", "type": "paragraph", "text": "As a consequence, the model must be continuously monitored once deployed in production. When a distribution shift happens, the model must be updated with new data and re-deployed.", "words": [{"w": "As", "b": [0.1305, 0.7607, 0.1518, 0.7757]}, {"w": "a", "b": [0.1579, 0.7607, 0.1672, 0.7757]}, {"w": "consequence,", "b": [0.1733, 0.7607, 0.2773, 0.7757]}, {"w": "the", "b": [0.2834, 0.7607, 0.3092, 0.7757]}, {"w": "model", "b": [0.3153, 0.7607, 0.3644, 0.7757]}, {"w": "must", "b": [0.3705, 0.7607, 0.4104, 0.7757]}, {"w": "be", "b": [0.4165, 0.7607, 0.4356, 0.7757]}, {"w": "continuously", "b": [0.4417, 0.7607, 0.5435, 0.7757]}, {"w": "monitored", "b": [0.5497, 0.7607, 0.6323, 0.7757]}, {"w": "once", "b": [0.6384, 0.7607, 0.6746, 0.7757]}, {"w": "deployed", "b": [0.6807, 0.7607, 0.7515, 0.7757]}, {"w": "in", "b": [0.7576, 0.7607, 0.7731, 0.7757]}, {"w": "production.", "b": [0.7792, 0.7607, 0.8727, 0.7757]}, {"w": "When", "b": [0.1303, 0.7788, 0.177, 0.7936]}, {"w": "a", "b": [0.1819, 0.7788, 0.191, 0.7936]}, {"w": "distribution", "b": [0.1958, 0.7788, 0.2884, 0.7936]}, {"w": "shift", "b": [0.2933, 0.7788, 0.3281, 0.7936]}, {"w": "happens,", "b": [0.333, 0.7788, 0.403, 0.7936]}, {"w": "the", "b": [0.4081, 0.7788, 0.4332, 0.7936]}, {"w": "model", "b": [0.4381, 0.7788, 0.4858, 0.7936]}, {"w": "must", "b": [0.4907, 0.7788, 0.5295, 0.7936]}, {"w": "be", "b": [0.5344, 0.7788, 0.553, 0.7936]}, {"w": "updated", "b": [0.5579, 0.7788, 0.6227, 0.7936]}, {"w": "with", "b": [0.6276, 0.7788, 0.6627, 0.7936]}, {"w": "new", "b": [0.6676, 0.7788, 0.6988, 0.7936]}, {"w": "data", "b": [0.7036, 0.7788, 0.7388, 0.7936]}, {"w": "and", "b": [0.7437, 0.7788, 0.7728, 0.7936]}, {"w": "re-deployed.", "b": [0.7777, 0.7788, 0.8727, 0.7936]}]}, {"id": "b_7", "type": "paragraph", "text": "One way of doing such monitoring is to compare the performance of the model on online and historical data. If the performance on online data becomes significantly worse, as compared to historical, it’s time to retrain the model.", "words": [{"w": "One", "b": [0.1312, 0.7968, 0.1634, 0.8116]}, {"w": "way", "b": [0.1694, 0.7968, 0.2, 0.8116]}, {"w": "of", "b": [0.206, 0.7968, 0.2206, 0.8116]}, {"w": "doing", "b": [0.2266, 0.7968, 0.2697, 0.8116]}, {"w": "such", "b": [0.2757, 0.7968, 0.3105, 0.8116]}, {"w": "monitoring", "b": [0.3165, 0.7968, 0.403, 0.8116]}, {"w": "is", "b": [0.4089, 0.7968, 0.4211, 0.8116]}, {"w": "to", "b": [0.4271, 0.7968, 0.4432, 0.8116]}, {"w": "compare", "b": [0.4492, 0.7968, 0.5155, 0.8116]}, {"w": "the", "b": [0.5215, 0.7968, 0.5466, 0.8116]}, {"w": "performance", "b": [0.5526, 0.7968, 0.6502, 0.8116]}, {"w": "of", "b": [0.6562, 0.7968, 0.6708, 0.8116]}, {"w": "the", "b": [0.6768, 0.7968, 0.7019, 0.8116]}, {"w": "model", "b": [0.7079, 0.7968, 0.7556, 0.8116]}, {"w": "on", "b": [0.7616, 0.7968, 0.7807, 0.8116]}, {"w": "online", "b": [0.7867, 0.7968, 0.8339, 0.8116]}, {"w": "and", "b": [0.8399, 0.7968, 0.8691, 0.8116]}, {"w": "historical", "b": [0.1312, 0.8146, 0.205, 0.8296]}, {"w": "data.", "b": [0.2111, 0.8146, 0.252, 0.8296]}, {"w": "If", "b": [0.2602, 0.8146, 0.2725, 0.8296]}, {"w": "the", "b": [0.2786, 0.8146, 0.3042, 0.8296]}, {"w": "performance", "b": [0.3103, 0.8146, 0.4096, 0.8296]}, {"w": "on", "b": [0.4157, 0.8146, 0.4351, 0.8296]}, {"w": "online", "b": [0.4413, 0.8146, 0.4893, 0.8296]}, {"w": "data", "b": [0.4955, 0.8146, 0.5312, 0.8296]}, {"w": "becomes", "b": [0.5374, 0.8146, 0.6044, 0.8296]}, {"w": "significantly", "b": [0.6106, 0.8146, 0.7068, 0.8296]}, {"w": "worse,", "b": [0.7129, 0.8146, 0.7626, 0.8296]}, {"w": "as", "b": [0.7688, 0.8146, 0.7852, 0.8296]}, {"w": "compared", "b": [0.7914, 0.8146, 0.8691, 0.8296]}, {"w": "to", "b": [0.1312, 0.8326, 0.1476, 0.8475]}, {"w": "historical,", "b": [0.1538, 0.8326, 0.2329, 0.8475]}, {"w": "it’s", "b": [0.2391, 0.8326, 0.2638, 0.8475]}, {"w": "time", "b": [0.2699, 0.8326, 0.3058, 0.8475]}, {"w": "to", "b": [0.312, 0.8326, 0.3284, 0.8475]}, {"w": "retrain", "b": [0.3345, 0.8326, 0.389, 0.8475]}, {"w": "the", "b": [0.3951, 0.8326, 0.4208, 0.8475]}, {"w": "model.", "b": [0.4269, 0.8326, 0.4807, 0.8475]}]}, {"id": "b_8", "type": "paragraph", "text": "There are different forms of online evaluation, each serving a different purpose. For example,", "words": [{"w": "There", "b": [0.1306, 0.8596, 0.1771, 0.8744]}, {"w": "are", "b": [0.1833, 0.8596, 0.2075, 0.8744]}, {"w": "different", "b": [0.2137, 0.8596, 0.2794, 0.8744]}, {"w": "forms", "b": [0.2856, 0.8596, 0.3296, 0.8744]}, {"w": "of", "b": [0.3358, 0.8596, 0.3505, 0.8744]}, {"w": "online", "b": [0.3566, 0.8596, 0.4041, 0.8744]}, {"w": "evaluation,", "b": [0.4102, 0.8596, 0.4966, 0.8744]}, {"w": "each", "b": [0.5027, 0.8596, 0.5376, 0.8744]}, {"w": "serving", "b": [0.5438, 0.8596, 0.6, 0.8744]}, {"w": "a", "b": [0.6061, 0.8596, 0.6152, 0.8744]}, {"w": "different", "b": [0.6214, 0.8596, 0.6871, 0.8744]}, {"w": "purpose.", "b": [0.6932, 0.8596, 0.7606, 0.8744]}, {"w": "For", "b": [0.7688, 0.8596, 0.7953, 0.8744]}, {"w": "example,", "b": [0.8015, 0.8596, 0.8717, 0.8744]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "5", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 223, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "runtime monitoring is checking whether the running system meets the runtime requirements.", "words": [{"w": "runtime", "b": [0.1312, 0.0885, 0.1934, 0.1033]}, {"w": "monitoring", "b": [0.1995, 0.0885, 0.2864, 0.1033]}, {"w": "is", "b": [0.2926, 0.0885, 0.3048, 0.1033]}, {"w": "checking", "b": [0.311, 0.0885, 0.3781, 0.1033]}, {"w": "whether", "b": [0.3843, 0.0885, 0.448, 0.1033]}, {"w": "the", "b": [0.4541, 0.0885, 0.4794, 0.1033]}, {"w": "running", "b": [0.4855, 0.0885, 0.5472, 0.1033]}, {"w": "system", "b": [0.5534, 0.0885, 0.6076, 0.1033]}, {"w": "meets", "b": [0.6137, 0.0885, 0.6593, 0.1033]}, {"w": "the", "b": [0.6655, 0.0885, 0.6907, 0.1033]}, {"w": "runtime", "b": [0.6969, 0.0885, 0.759, 0.1033]}, {"w": "requirements.", "b": [0.7652, 0.0885, 0.8725, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "Another common scenario is to monitor user behavior in response to different versions of the model. One popular technique used in this scenario is A/B testing. We split the users of a system into two groups, A and B. The two groups are served the old and the new models, respectively. Then we apply a statistical significance test to decide whether the performance of the new model is better than the old one.", "words": [{"w": "Another", "b": [0.1305, 0.1154, 0.1955, 0.1302]}, {"w": "common", "b": [0.2017, 0.1154, 0.2681, 0.1302]}, {"w": "scenario", "b": [0.2742, 0.1154, 0.3378, 0.1302]}, {"w": "is", "b": [0.344, 0.1154, 0.3562, 0.1302]}, {"w": "to", "b": [0.3623, 0.1154, 0.3784, 0.1302]}, {"w": "monitor", "b": [0.3846, 0.1154, 0.447, 0.1302]}, {"w": "user", "b": [0.4532, 0.1154, 0.4856, 0.1302]}, {"w": "behavior", "b": [0.4917, 0.1154, 0.5597, 0.1302]}, {"w": "in", "b": [0.5659, 0.1154, 0.581, 0.1302]}, {"w": "response", "b": [0.5871, 0.1154, 0.6544, 0.1302]}, {"w": "to", "b": [0.6605, 0.1154, 0.6766, 0.1302]}, {"w": "different", "b": [0.6827, 0.1154, 0.7482, 0.1302]}, {"w": "versions", "b": [0.7544, 0.1154, 0.8171, 0.1302]}, {"w": "of", "b": [0.8232, 0.1154, 0.8378, 0.1302]}, {"w": "the", "b": [0.8439, 0.1154, 0.8691, 0.1302]}, {"w": "model.", "b": [0.1312, 0.1332, 0.1855, 0.1482]}, {"w": "One", "b": [0.1937, 0.1332, 0.2268, 0.1482]}, {"w": "popular", "b": [0.2329, 0.1332, 0.2955, 0.1482]}, {"w": "technique", "b": [0.3017, 0.1332, 0.3792, 0.1482]}, {"w": "used", "b": [0.3853, 0.1332, 0.4216, 0.1482]}, {"w": "in", "b": [0.4278, 0.1332, 0.4433, 0.1482]}, {"w": "this", "b": [0.4494, 0.1332, 0.4795, 0.1482]}, {"w": "scenario", "b": [0.4857, 0.1332, 0.551, 0.1482]}, {"w": "is", "b": [0.5571, 0.1332, 0.5696, 0.1482]}, {"w": "A/B", "b": [0.5758, 0.1332, 0.6122, 0.1482]}, {"w": "testing.", "b": [0.6183, 0.1332, 0.6784, 0.1482]}, {"w": "We", "b": [0.6866, 0.1332, 0.7124, 0.1482]}, {"w": "split", "b": [0.7186, 0.1332, 0.7539, 0.1482]}, {"w": "the", "b": [0.76, 0.1332, 0.7858, 0.1482]}, {"w": "users", "b": [0.792, 0.1332, 0.8326, 0.1482]}, {"w": "of", "b": [0.8387, 0.1332, 0.8537, 0.1482]}, {"w": "a", "b": [0.8599, 0.1332, 0.8692, 0.1482]}, {"w": "system", "b": [0.1312, 0.1511, 0.1874, 0.1662]}, {"w": "into", "b": [0.1936, 0.1511, 0.2255, 0.1662]}, {"w": "two", "b": [0.2316, 0.1511, 0.2609, 0.1662]}, {"w": "groups,", "b": [0.2671, 0.1511, 0.3269, 0.1662]}, {"w": "A", "b": [0.3331, 0.1511, 0.3472, 0.1662]}, {"w": "and", "b": [0.3533, 0.1511, 0.3837, 0.1662]}, {"w": "B.", "b": [0.3899, 0.1511, 0.4084, 0.1662]}, {"w": "The", "b": [0.4146, 0.1511, 0.447, 0.1662]}, {"w": "two", "b": [0.4532, 0.1511, 0.4825, 0.1662]}, {"w": "groups", "b": [0.4886, 0.1511, 0.5432, 0.1662]}, {"w": "are", "b": [0.5494, 0.1511, 0.5745, 0.1662]}, {"w": "served", "b": [0.5807, 0.1511, 0.6321, 0.1662]}, {"w": "the", "b": [0.6383, 0.1511, 0.6644, 0.1662]}, {"w": "old", "b": [0.6706, 0.1511, 0.6957, 0.1662]}, {"w": "and", "b": [0.7019, 0.1511, 0.7322, 0.1662]}, {"w": "the", "b": [0.7384, 0.1511, 0.7645, 0.1662]}, {"w": "new", "b": [0.7707, 0.1511, 0.8031, 0.1662]}, {"w": "models,", "b": [0.8093, 0.1511, 0.8716, 0.1662]}, {"w": "respectively.", "b": [0.1312, 0.1692, 0.2281, 0.1841]}, {"w": "Then", "b": [0.2362, 0.1692, 0.2777, 0.1841]}, {"w": "we", "b": [0.2839, 0.1692, 0.3046, 0.1841]}, {"w": "apply", "b": [0.3108, 0.1692, 0.3548, 0.1841]}, {"w": "a", "b": [0.3609, 0.1692, 0.37, 0.1841]}, {"w": "statistical", "b": [0.3762, 0.1692, 0.4533, 0.1841]}, {"w": "significance", "b": [0.4595, 0.1692, 0.5496, 0.1841]}, {"w": "test", "b": [0.5558, 0.1692, 0.5852, 0.1841]}, {"w": "to", "b": [0.5914, 0.1692, 0.6076, 0.1841]}, {"w": "decide", "b": [0.6137, 0.1692, 0.6633, 0.1841]}, {"w": "whether", "b": [0.6695, 0.1692, 0.7333, 0.1841]}, {"w": "the", "b": [0.7394, 0.1692, 0.7648, 0.1841]}, {"w": "performance", "b": [0.7709, 0.1692, 0.8692, 0.1841]}, {"w": "of", "b": [0.1312, 0.1871, 0.1461, 0.2021]}, {"w": "the", "b": [0.1522, 0.1871, 0.1779, 0.2021]}, {"w": "new", "b": [0.1841, 0.1871, 0.2158, 0.2021]}, {"w": "model", "b": [0.222, 0.1871, 0.2707, 0.2021]}, {"w": "is", "b": [0.2768, 0.1871, 0.2893, 0.2021]}, {"w": "better", "b": [0.2954, 0.1871, 0.3442, 0.2021]}, {"w": "than", "b": [0.3503, 0.1871, 0.3872, 0.2021]}, {"w": "the", "b": [0.3934, 0.1871, 0.419, 0.2021]}, {"w": "old", "b": [0.4252, 0.1871, 0.4498, 0.2021]}, {"w": "one.", "b": [0.4559, 0.1871, 0.4888, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "Multi-armed bandit (MAB) is another popular technique of online model evaluation. Similar to A/B testing, it identifies the best performing models by exposing model candidates to a fraction of users. Then it gradually exposes the best model to more users, by keeping gathering performance statistics until it’s reliable.", "words": [{"w": "Multi-armed", "b": [0.1312, 0.2141, 0.2304, 0.2289]}, {"w": "bandit", "b": [0.2365, 0.2141, 0.2878, 0.2289]}, {"w": "(MAB)", "b": [0.294, 0.2141, 0.351, 0.2289]}, {"w": "is", "b": [0.3572, 0.2141, 0.3694, 0.2289]}, {"w": "another", "b": [0.3755, 0.2141, 0.4359, 0.2289]}, {"w": "popular", "b": [0.4421, 0.2141, 0.503, 0.2289]}, {"w": "technique", "b": [0.5092, 0.2141, 0.5846, 0.2289]}, {"w": "of", "b": [0.5908, 0.2141, 0.6053, 0.2289]}, {"w": "online", "b": [0.6115, 0.2141, 0.6588, 0.2289]}, {"w": "model", "b": [0.6649, 0.2141, 0.7127, 0.2289]}, {"w": "evaluation.", "b": [0.7189, 0.2141, 0.8049, 0.2289]}, {"w": "Similar", "b": [0.8131, 0.2141, 0.8694, 0.2289]}, {"w": "to", "b": [0.1312, 0.2319, 0.148, 0.247]}, {"w": "A/B", "b": [0.1546, 0.2319, 0.1914, 0.247]}, {"w": "testing,", "b": [0.1981, 0.2319, 0.2588, 0.247]}, {"w": "it", "b": [0.2656, 0.2319, 0.2781, 0.247]}, {"w": "identifies", "b": [0.2848, 0.2319, 0.3576, 0.247]}, {"w": "the", "b": [0.3642, 0.2319, 0.3904, 0.247]}, {"w": "best", "b": [0.397, 0.2319, 0.4311, 0.247]}, {"w": "performing", "b": [0.4377, 0.2319, 0.5278, 0.247]}, {"w": "models", "b": [0.5344, 0.2319, 0.5915, 0.247]}, {"w": "by", "b": [0.5982, 0.2319, 0.618, 0.247]}, {"w": "exposing", "b": [0.6247, 0.2319, 0.6959, 0.247]}, {"w": "model", "b": [0.7025, 0.2319, 0.7522, 0.247]}, {"w": "candidates", "b": [0.7588, 0.2319, 0.8457, 0.247]}, {"w": "to", "b": [0.8524, 0.2319, 0.8691, 0.247]}, {"w": "a", "b": [0.1312, 0.2498, 0.1406, 0.2649]}, {"w": "fraction", "b": [0.1479, 0.2498, 0.2113, 0.2649]}, {"w": "of", "b": [0.2186, 0.2498, 0.2337, 0.2649]}, {"w": "users.", "b": [0.241, 0.2498, 0.2873, 0.2649]}, {"w": "Then", "b": [0.2989, 0.2498, 0.3418, 0.2649]}, {"w": "it", "b": [0.3491, 0.2498, 0.3617, 0.2649]}, {"w": "gradually", "b": [0.369, 0.2498, 0.4459, 0.2649]}, {"w": "exposes", "b": [0.4532, 0.2498, 0.5151, 0.2649]}, {"w": "the", "b": [0.5224, 0.2498, 0.5486, 0.2649]}, {"w": "best", "b": [0.5558, 0.2498, 0.5899, 0.2649]}, {"w": "model", "b": [0.5972, 0.2498, 0.6469, 0.2649]}, {"w": "to", "b": [0.6542, 0.2498, 0.6709, 0.2649]}, {"w": "more", "b": [0.6782, 0.2498, 0.7191, 0.2649]}, {"w": "users,", "b": [0.7263, 0.2498, 0.7727, 0.2649]}, {"w": "by", "b": [0.7802, 0.2498, 0.8001, 0.2649]}, {"w": "keeping", "b": [0.8074, 0.2498, 0.8691, 0.2649]}, {"w": "gathering", "b": [0.1312, 0.2679, 0.2072, 0.2828]}, {"w": "performance", "b": [0.2133, 0.2679, 0.3129, 0.2828]}, {"w": "statistics", "b": [0.319, 0.2679, 0.3901, 0.2828]}, {"w": "until", "b": [0.3963, 0.2679, 0.4337, 0.2828]}, {"w": "it’s", "b": [0.4399, 0.2679, 0.4646, 0.2828]}, {"w": "reliable.", "b": [0.4707, 0.2679, 0.5344, 0.2828]}]}, {"id": "b_3", "type": "equation", "text": "7.2 A/B Testing", "words": [{"w": "7.2", "b": [0.1312, 0.3164, 0.1631, 0.3343]}, {"w": "A/B", "b": [0.188, 0.3164, 0.237, 0.3343]}, {"w": "Testing", "b": [0.2453, 0.3164, 0.3246, 0.3343]}]}, {"id": "b_4", "type": "paragraph", "text": "A/B testing is one of the most frequently used statistical techniques. When applied to online model evaluation, it allows us to answer such questions as, “Does the new model mB work better in production than the existing model mA?” or, “Which of the two model candidates works better in production?”", "words": [{"w": "A/B", "b": [0.1312, 0.3553, 0.173, 0.3702]}, {"w": "testing", "b": [0.181, 0.3553, 0.2439, 0.3702]}, {"w": "is", "b": [0.2511, 0.3552, 0.2638, 0.3703]}, {"w": "one", "b": [0.2708, 0.3552, 0.299, 0.3703]}, {"w": "of", "b": [0.306, 0.3552, 0.3211, 0.3703]}, {"w": "the", "b": [0.3281, 0.3552, 0.3543, 0.3703]}, {"w": "most", "b": [0.3613, 0.3552, 0.4011, 0.3703]}, {"w": "frequently", "b": [0.4081, 0.3552, 0.4908, 0.3703]}, {"w": "used", "b": [0.4978, 0.3552, 0.5345, 0.3703]}, {"w": "statistical", "b": [0.5415, 0.3552, 0.6213, 0.3703]}, {"w": "techniques.", "b": [0.6282, 0.3552, 0.7194, 0.3703]}, {"w": "When", "b": [0.7301, 0.3552, 0.7788, 0.3703]}, {"w": "applied", "b": [0.7858, 0.3552, 0.8454, 0.3703]}, {"w": "to", "b": [0.8524, 0.3552, 0.8691, 0.3703]}, {"w": "online", "b": [0.1312, 0.3731, 0.1804, 0.3882]}, {"w": "model", "b": [0.1879, 0.3731, 0.2375, 0.3882]}, {"w": "evaluation,", "b": [0.245, 0.3731, 0.3344, 0.3882]}, {"w": "it", "b": [0.3422, 0.3731, 0.3547, 0.3882]}, {"w": "allows", "b": [0.3622, 0.3731, 0.412, 0.3882]}, {"w": "us", "b": [0.4194, 0.3731, 0.4373, 0.3882]}, {"w": "to", "b": [0.4447, 0.3731, 0.4615, 0.3882]}, {"w": "answer", "b": [0.4689, 0.3731, 0.5251, 0.3882]}, {"w": "such", "b": [0.5325, 0.3731, 0.5687, 0.3882]}, {"w": "questions", "b": [0.5762, 0.3731, 0.6522, 0.3882]}, {"w": "as,", "b": [0.6597, 0.3731, 0.6817, 0.3882]}, {"w": "“Does", "b": [0.6895, 0.3731, 0.7385, 0.3882]}, {"w": "the", "b": [0.746, 0.3731, 0.7721, 0.3882]}, {"w": "new", "b": [0.7796, 0.3731, 0.812, 0.3882]}, {"w": "model", "b": [0.8194, 0.3731, 0.8691, 0.3882]}, {"w": "mB", "b": [0.1312, 0.3912, 0.1586, 0.4074]}, {"w": "work", "b": [0.1663, 0.3911, 0.2056, 0.4061]}, {"w": "better", "b": [0.2117, 0.3911, 0.2608, 0.4061]}, {"w": "in", "b": [0.267, 0.3911, 0.2825, 0.4061]}, {"w": "production", "b": [0.2886, 0.3911, 0.377, 0.4061]}, {"w": "than", "b": [0.3831, 0.3911, 0.4203, 0.4061]}, {"w": "the", "b": [0.4265, 0.3911, 0.4523, 0.4061]}, {"w": "existing", "b": [0.4584, 0.3911, 0.521, 0.4061]}, {"w": "model", "b": [0.5272, 0.3911, 0.5762, 0.4061]}, {"w": "mA?”", "b": [0.5822, 0.3911, 0.6279, 0.4074]}, {"w": "or,", "b": [0.6361, 0.3911, 0.6579, 0.4061]}, {"w": "“Which", "b": [0.664, 0.3911, 0.7255, 0.4061]}, {"w": "of", "b": [0.7316, 0.3911, 0.7466, 0.4061]}, {"w": "the", "b": [0.7528, 0.3911, 0.7786, 0.4061]}, {"w": "two", "b": [0.7847, 0.3911, 0.8136, 0.4061]}, {"w": "model", "b": [0.8198, 0.3911, 0.8688, 0.4061]}, {"w": "candidates", "b": [0.1312, 0.4091, 0.2165, 0.4241]}, {"w": "works", "b": [0.2226, 0.4091, 0.2689, 0.4241]}, {"w": "better", "b": [0.2751, 0.4091, 0.3238, 0.4241]}, {"w": "in", "b": [0.33, 0.4091, 0.3454, 0.4241]}, {"w": "production?”", "b": [0.3515, 0.4091, 0.4567, 0.4241]}]}, {"id": "b_5", "type": "paragraph", "text": "A/B testing is often used on websites and mobile applications to test whether a specific change in the design or wording positively affects business metrics such as user engagement, click-through rate, or sales rate.", "words": [{"w": "A/B", "b": [0.1305, 0.4359, 0.1674, 0.451]}, {"w": "testing", "b": [0.1747, 0.4359, 0.2303, 0.451]}, {"w": "is", "b": [0.2376, 0.4359, 0.2503, 0.451]}, {"w": "often", "b": [0.2577, 0.4359, 0.299, 0.451]}, {"w": "used", "b": [0.3064, 0.4359, 0.3431, 0.451]}, {"w": "on", "b": [0.3504, 0.4359, 0.3703, 0.451]}, {"w": "websites", "b": [0.3777, 0.4359, 0.4454, 0.451]}, {"w": "and", "b": [0.4527, 0.4359, 0.4831, 0.451]}, {"w": "mobile", "b": [0.4904, 0.4359, 0.5448, 0.451]}, {"w": "applications", "b": [0.5522, 0.4359, 0.6506, 0.451]}, {"w": "to", "b": [0.6579, 0.4359, 0.6747, 0.451]}, {"w": "test", "b": [0.682, 0.4359, 0.7125, 0.451]}, {"w": "whether", "b": [0.7198, 0.4359, 0.7858, 0.451]}, {"w": "a", "b": [0.7931, 0.4359, 0.8026, 0.451]}, {"w": "specific", "b": [0.8099, 0.4359, 0.8691, 0.451]}, {"w": "change", "b": [0.1312, 0.454, 0.1858, 0.4689]}, {"w": "in", "b": [0.1919, 0.454, 0.2072, 0.4689]}, {"w": "the", "b": [0.2134, 0.454, 0.2389, 0.4689]}, {"w": "design", "b": [0.2451, 0.454, 0.2951, 0.4689]}, {"w": "or", "b": [0.3013, 0.454, 0.3177, 0.4689]}, {"w": "wording", "b": [0.3238, 0.454, 0.3876, 0.4689]}, {"w": "positively", "b": [0.3937, 0.454, 0.4703, 0.4689]}, {"w": "affects", "b": [0.4765, 0.454, 0.527, 0.4689]}, {"w": "business", "b": [0.5332, 0.454, 0.5988, 0.4689]}, {"w": "metrics", "b": [0.6049, 0.454, 0.6632, 0.4689]}, {"w": "such", "b": [0.6694, 0.454, 0.7046, 0.4689]}, {"w": "as", "b": [0.7108, 0.454, 0.7272, 0.4689]}, {"w": "user", "b": [0.7334, 0.454, 0.7662, 0.4689]}, {"w": "engagement,", "b": [0.7724, 0.454, 0.8717, 0.4689]}, {"w": "click-through", "b": [0.1312, 0.4719, 0.2369, 0.4869]}, {"w": "rate,", "b": [0.2431, 0.4719, 0.28, 0.4869]}, {"w": "or", "b": [0.2862, 0.4719, 0.3026, 0.4869]}, {"w": "sales", "b": [0.3088, 0.4719, 0.3459, 0.4869]}, {"w": "rate.", "b": [0.3521, 0.4719, 0.389, 0.4869]}]}, {"id": "b_6", "type": "paragraph", "text": "Imagine we want to decide whether to replace an existing (old) model in production with a new model. The live traffic that contains input data for the model is split into two disjoint groups: A (control) and B (experiment). Group A traffic is routed to the old model, while group B traffic is routed to the new model.", "words": [{"w": "Imagine", "b": [0.1312, 0.4989, 0.1953, 0.5138]}, {"w": "we", "b": [0.2015, 0.4989, 0.2225, 0.5138]}, {"w": "want", "b": [0.2286, 0.4989, 0.2676, 0.5138]}, {"w": "to", "b": [0.2737, 0.4989, 0.2901, 0.5138]}, {"w": "decide", "b": [0.2962, 0.4989, 0.3465, 0.5138]}, {"w": "whether", "b": [0.3526, 0.4989, 0.4173, 0.5138]}, {"w": "to", "b": [0.4234, 0.4989, 0.4398, 0.5138]}, {"w": "replace", "b": [0.446, 0.4989, 0.5025, 0.5138]}, {"w": "an", "b": [0.5086, 0.4989, 0.5281, 0.5138]}, {"w": "existing", "b": [0.5342, 0.4989, 0.5964, 0.5138]}, {"w": "(old)", "b": [0.6025, 0.4989, 0.6414, 0.5138]}, {"w": "model", "b": [0.6476, 0.4989, 0.6963, 0.5138]}, {"w": "in", "b": [0.7024, 0.4989, 0.7178, 0.5138]}, {"w": "production", "b": [0.724, 0.4989, 0.8117, 0.5138]}, {"w": "with", "b": [0.8178, 0.4989, 0.8537, 0.5138]}, {"w": "a", "b": [0.8598, 0.4989, 0.8691, 0.5138]}, {"w": "new", "b": [0.1312, 0.5168, 0.1632, 0.5318]}, {"w": "model.", "b": [0.1693, 0.5168, 0.2234, 0.5318]}, {"w": "The", "b": [0.2316, 0.5168, 0.2636, 0.5318]}, {"w": "live", "b": [0.2697, 0.5168, 0.2976, 0.5318]}, {"w": "traffic", "b": [0.3037, 0.5168, 0.3511, 0.5318]}, {"w": "that", "b": [0.3573, 0.5168, 0.3913, 0.5318]}, {"w": "contains", "b": [0.3974, 0.5168, 0.464, 0.5318]}, {"w": "input", "b": [0.4702, 0.5168, 0.5135, 0.5318]}, {"w": "data", "b": [0.5196, 0.5168, 0.5557, 0.5318]}, {"w": "for", "b": [0.5618, 0.5168, 0.584, 0.5318]}, {"w": "the", "b": [0.5902, 0.5168, 0.6159, 0.5318]}, {"w": "model", "b": [0.6221, 0.5168, 0.671, 0.5318]}, {"w": "is", "b": [0.6772, 0.5168, 0.6896, 0.5318]}, {"w": "split", "b": [0.6958, 0.5168, 0.731, 0.5318]}, {"w": "into", "b": [0.7371, 0.5168, 0.7685, 0.5318]}, {"w": "two", "b": [0.7747, 0.5168, 0.8035, 0.5318]}, {"w": "disjoint", "b": [0.8097, 0.5168, 0.8696, 0.5318]}, {"w": "groups:", "b": [0.1312, 0.5347, 0.1905, 0.5497]}, {"w": "A", "b": [0.1987, 0.5347, 0.2127, 0.5497]}, {"w": "(control)", "b": [0.2188, 0.5347, 0.2899, 0.5497]}, {"w": "and", "b": [0.296, 0.5347, 0.3261, 0.5497]}, {"w": "B", "b": [0.3322, 0.5347, 0.3454, 0.5497]}, {"w": "(experiment).", "b": [0.3516, 0.5347, 0.462, 0.5497]}, {"w": "Group", "b": [0.4703, 0.5347, 0.5223, 0.5497]}, {"w": "A", "b": [0.5284, 0.5347, 0.5424, 0.5497]}, {"w": "traffic", "b": [0.5485, 0.5347, 0.5963, 0.5497]}, {"w": "is", "b": [0.6024, 0.5347, 0.615, 0.5497]}, {"w": "routed", "b": [0.6211, 0.5347, 0.674, 0.5497]}, {"w": "to", "b": [0.6802, 0.5347, 0.6968, 0.5497]}, {"w": "the", "b": [0.7029, 0.5347, 0.7288, 0.5497]}, {"w": "old", "b": [0.735, 0.5347, 0.7598, 0.5497]}, {"w": "model,", "b": [0.766, 0.5347, 0.8204, 0.5497]}, {"w": "while", "b": [0.8266, 0.5347, 0.8691, 0.5497]}, {"w": "group", "b": [0.1312, 0.5527, 0.1774, 0.5677]}, {"w": "B", "b": [0.1836, 0.5527, 0.1966, 0.5677]}, {"w": "traffic", "b": [0.2028, 0.5527, 0.25, 0.5677]}, {"w": "is", "b": [0.2562, 0.5527, 0.2686, 0.5677]}, {"w": "routed", "b": [0.2747, 0.5527, 0.3271, 0.5677]}, {"w": "to", "b": [0.3332, 0.5527, 0.3496, 0.5677]}, {"w": "the", "b": [0.3558, 0.5527, 0.3814, 0.5677]}, {"w": "new", "b": [0.3876, 0.5527, 0.4194, 0.5677]}, {"w": "model.", "b": [0.4255, 0.5527, 0.4793, 0.5677]}]}, {"id": "b_7", "type": "paragraph", "text": "By comparing the performance of the two models, a decision is made about whether the new model performs better than the old model. The performance is compared using statistical hypothesis testing.", "words": [{"w": "By", "b": [0.1312, 0.5797, 0.1536, 0.5945]}, {"w": "comparing", "b": [0.1597, 0.5797, 0.2422, 0.5945]}, {"w": "the", "b": [0.2483, 0.5797, 0.2734, 0.5945]}, {"w": "performance", "b": [0.2796, 0.5797, 0.3772, 0.5945]}, {"w": "of", "b": [0.3833, 0.5797, 0.3979, 0.5945]}, {"w": "the", "b": [0.404, 0.5797, 0.4291, 0.5945]}, {"w": "two", "b": [0.4353, 0.5797, 0.4634, 0.5945]}, {"w": "models,", "b": [0.4695, 0.5797, 0.5294, 0.5945]}, {"w": "a", "b": [0.5356, 0.5797, 0.5446, 0.5945]}, {"w": "decision", "b": [0.5507, 0.5797, 0.6132, 0.5945]}, {"w": "is", "b": [0.6193, 0.5797, 0.6315, 0.5945]}, {"w": "made", "b": [0.6376, 0.5797, 0.6798, 0.5945]}, {"w": "about", "b": [0.6859, 0.5797, 0.7317, 0.5945]}, {"w": "whether", "b": [0.7378, 0.5797, 0.8012, 0.5945]}, {"w": "the", "b": [0.8073, 0.5797, 0.8324, 0.5945]}, {"w": "new", "b": [0.8386, 0.5797, 0.8697, 0.5945]}, {"w": "model", "b": [0.1312, 0.5976, 0.1799, 0.6125]}, {"w": "performs", "b": [0.186, 0.5976, 0.2569, 0.6125]}, {"w": "better", "b": [0.263, 0.5976, 0.3118, 0.6125]}, {"w": "than", "b": [0.3179, 0.5976, 0.3548, 0.6125]}, {"w": "the", "b": [0.3609, 0.5976, 0.3865, 0.6125]}, {"w": "old", "b": [0.3926, 0.5976, 0.4172, 0.6125]}, {"w": "model.", "b": [0.4233, 0.5976, 0.4771, 0.6125]}, {"w": "The", "b": [0.4853, 0.5976, 0.5171, 0.6125]}, {"w": "performance", "b": [0.5232, 0.5976, 0.6227, 0.6125]}, {"w": "is", "b": [0.6288, 0.5976, 0.6412, 0.6125]}, {"w": "compared", "b": [0.6473, 0.5976, 0.7252, 0.6125]}, {"w": "using", "b": [0.7314, 0.5976, 0.7735, 0.6125]}, {"w": "statistical", "b": [0.7795, 0.5976, 0.8688, 0.6125]}, {"w": "hypothesis", "b": [0.1312, 0.6155, 0.229, 0.6305]}, {"w": "testing.", "b": [0.2361, 0.6155, 0.3043, 0.6305]}]}, {"id": "b_8", "type": "paragraph", "text": "In general, statistical hypothesis testing maintains a null hypothesis and an alternative hypothesis. An A/B test is usually formulated to answer the following question: “Does the new model lead to a statistically significant change in this specific business metric?” The null hypothesis states that the new model doesn’t change the average value of the business metric. The alternative hypothesis states that the new model changes the average value of the metric.", "words": [{"w": "In", "b": [0.1312, 0.6424, 0.1483, 0.6574]}, {"w": "general,", "b": [0.1544, 0.6424, 0.2175, 0.6574]}, {"w": "statistical", "b": [0.2236, 0.6424, 0.3023, 0.6574]}, {"w": "hypothesis", "b": [0.3084, 0.6424, 0.3938, 0.6574]}, {"w": "testing", "b": [0.4, 0.6424, 0.4548, 0.6574]}, {"w": "maintains", "b": [0.4609, 0.6424, 0.54, 0.6574]}, {"w": "a", "b": [0.5462, 0.6424, 0.5555, 0.6574]}, {"w": "null", "b": [0.5616, 0.6424, 0.5964, 0.6574]}, {"w": "hypothesis", "b": [0.6034, 0.6424, 0.7012, 0.6574]}, {"w": "and", "b": [0.7073, 0.6424, 0.7373, 0.6574]}, {"w": "an", "b": [0.7434, 0.6424, 0.763, 0.6574]}, {"w": "alternative", "b": [0.7693, 0.6424, 0.8688, 0.6574]}, {"w": "hypothesis.", "b": [0.1312, 0.6604, 0.234, 0.6753]}, {"w": "An", "b": [0.2422, 0.6605, 0.2659, 0.6753]}, {"w": "A/B", "b": [0.272, 0.6605, 0.3075, 0.6753]}, {"w": "test", "b": [0.3136, 0.6605, 0.3429, 0.6753]}, {"w": "is", "b": [0.349, 0.6605, 0.3612, 0.6753]}, {"w": "usually", "b": [0.3674, 0.6605, 0.4233, 0.6753]}, {"w": "formulated", "b": [0.4295, 0.6605, 0.515, 0.6753]}, {"w": "to", "b": [0.5212, 0.6605, 0.5372, 0.6753]}, {"w": "answer", "b": [0.5434, 0.6605, 0.5974, 0.6753]}, {"w": "the", "b": [0.6035, 0.6605, 0.6287, 0.6753]}, {"w": "following", "b": [0.6348, 0.6605, 0.7052, 0.6753]}, {"w": "question:", "b": [0.7114, 0.6605, 0.7824, 0.6753]}, {"w": "“Does", "b": [0.7906, 0.6605, 0.8377, 0.6753]}, {"w": "the", "b": [0.8439, 0.6605, 0.869, 0.6753]}, {"w": "new", "b": [0.1312, 0.6782, 0.1637, 0.6933]}, {"w": "model", "b": [0.1701, 0.6782, 0.2198, 0.6933]}, {"w": "lead", "b": [0.2263, 0.6782, 0.2597, 0.6933]}, {"w": "to", "b": [0.2662, 0.6782, 0.2829, 0.6933]}, {"w": "a", "b": [0.2894, 0.6782, 0.2988, 0.6933]}, {"w": "statistically", "b": [0.3053, 0.6782, 0.4002, 0.6933]}, {"w": "significant", "b": [0.4067, 0.6782, 0.4899, 0.6933]}, {"w": "change", "b": [0.4964, 0.6782, 0.5524, 0.6933]}, {"w": "in", "b": [0.5589, 0.6782, 0.5746, 0.6933]}, {"w": "this", "b": [0.581, 0.6782, 0.6115, 0.6933]}, {"w": "specific", "b": [0.618, 0.6782, 0.6772, 0.6933]}, {"w": "business", "b": [0.6837, 0.6782, 0.751, 0.6933]}, {"w": "metric?”", "b": [0.7574, 0.6782, 0.8275, 0.6933]}, {"w": "The", "b": [0.8367, 0.6782, 0.8691, 0.6933]}, {"w": "null", "b": [0.1312, 0.6962, 0.1617, 0.7112]}, {"w": "hypothesis", "b": [0.1678, 0.6962, 0.2532, 0.7112]}, {"w": "states", "b": [0.2593, 0.6962, 0.3059, 0.7112]}, {"w": "that", "b": [0.3121, 0.6962, 0.3461, 0.7112]}, {"w": "the", "b": [0.3523, 0.6962, 0.3781, 0.7112]}, {"w": "new", "b": [0.3842, 0.6962, 0.4162, 0.7112]}, {"w": "model", "b": [0.4223, 0.6962, 0.4713, 0.7112]}, {"w": "doesn’t", "b": [0.4775, 0.6962, 0.5359, 0.7112]}, {"w": "change", "b": [0.542, 0.6962, 0.5972, 0.7112]}, {"w": "the", "b": [0.6033, 0.6962, 0.6291, 0.7112]}, {"w": "average", "b": [0.6353, 0.6962, 0.6957, 0.7112]}, {"w": "value", "b": [0.7018, 0.6962, 0.7436, 0.7112]}, {"w": "of", "b": [0.7498, 0.6962, 0.7647, 0.7112]}, {"w": "the", "b": [0.7709, 0.6962, 0.7967, 0.7112]}, {"w": "business", "b": [0.8028, 0.6962, 0.8692, 0.7112]}, {"w": "metric.", "b": [0.1312, 0.7142, 0.1882, 0.7292]}, {"w": "The", "b": [0.1964, 0.7142, 0.2285, 0.7292]}, {"w": "alternative", "b": [0.2347, 0.7142, 0.3216, 0.7292]}, {"w": "hypothesis", "b": [0.3278, 0.7142, 0.4134, 0.7292]}, {"w": "states", "b": [0.4195, 0.7142, 0.4663, 0.7292]}, {"w": "that", "b": [0.4725, 0.7142, 0.5066, 0.7292]}, {"w": "the", "b": [0.5128, 0.7142, 0.5387, 0.7292]}, {"w": "new", "b": [0.5448, 0.7142, 0.5769, 0.7292]}, {"w": "model", "b": [0.5831, 0.7142, 0.6322, 0.7292]}, {"w": "changes", "b": [0.6384, 0.7142, 0.7011, 0.7292]}, {"w": "the", "b": [0.7072, 0.7142, 0.7331, 0.7292]}, {"w": "average", "b": [0.7393, 0.7142, 0.7999, 0.7292]}, {"w": "value", "b": [0.806, 0.7142, 0.848, 0.7292]}, {"w": "of", "b": [0.8541, 0.7142, 0.8691, 0.7292]}, {"w": "the", "b": [0.1312, 0.7322, 0.1569, 0.7471]}, {"w": "metric.", "b": [0.163, 0.7322, 0.2195, 0.7471]}]}, {"id": "b_9", "type": "paragraph", "text": "A/B test is not one test, but a family of tests. Depending on the business performance metric, a different statistical toolkit is used. However, the principle of splitting the users into two groups, and measuring the statistical significance of the difference in the metric values between different groups, remains the same.", "words": [{"w": "A/B", "b": [0.1305, 0.759, 0.1674, 0.7741]}, {"w": "test", "b": [0.1749, 0.759, 0.2053, 0.7741]}, {"w": "is", "b": [0.2128, 0.759, 0.2255, 0.7741]}, {"w": "not", "b": [0.2329, 0.759, 0.2601, 0.7741]}, {"w": "one", "b": [0.2676, 0.759, 0.2959, 0.7741]}, {"w": "test,", "b": [0.3034, 0.759, 0.339, 0.7741]}, {"w": "but", "b": [0.3468, 0.759, 0.3751, 0.7741]}, {"w": "a", "b": [0.3826, 0.759, 0.392, 0.7741]}, {"w": "family", "b": [0.3995, 0.759, 0.4507, 0.7741]}, {"w": "of", "b": [0.4582, 0.759, 0.4734, 0.7741]}, {"w": "tests.", "b": [0.4809, 0.759, 0.524, 0.7741]}, {"w": "Depending", "b": [0.5362, 0.759, 0.6243, 0.7741]}, {"w": "on", "b": [0.6318, 0.759, 0.6517, 0.7741]}, {"w": "the", "b": [0.6592, 0.759, 0.6853, 0.7741]}, {"w": "business", "b": [0.6928, 0.759, 0.7601, 0.7741]}, {"w": "performance", "b": [0.7676, 0.759, 0.8691, 0.7741]}, {"w": "metric,", "b": [0.1312, 0.7771, 0.1866, 0.792]}, {"w": "a", "b": [0.1926, 0.7771, 0.2016, 0.792]}, {"w": "different", "b": [0.2076, 0.7771, 0.273, 0.792]}, {"w": "statistical", "b": [0.279, 0.7771, 0.3556, 0.792]}, {"w": "toolkit", "b": [0.3616, 0.7771, 0.4138, 0.792]}, {"w": "is", "b": [0.4198, 0.7771, 0.432, 0.792]}, {"w": "used.", "b": [0.438, 0.7771, 0.4783, 0.792]}, {"w": "However,", "b": [0.4865, 0.7771, 0.5583, 0.792]}, {"w": "the", "b": [0.5644, 0.7771, 0.5895, 0.792]}, {"w": "principle", "b": [0.5955, 0.7771, 0.6639, 0.792]}, {"w": "of", "b": [0.6699, 0.7771, 0.6845, 0.792]}, {"w": "splitting", "b": [0.6905, 0.7771, 0.7559, 0.792]}, {"w": "the", "b": [0.7619, 0.7771, 0.787, 0.792]}, {"w": "users", "b": [0.793, 0.7771, 0.8325, 0.792]}, {"w": "into", "b": [0.8385, 0.7771, 0.8692, 0.792]}, {"w": "two", "b": [0.1312, 0.7949, 0.1602, 0.8099]}, {"w": "groups,", "b": [0.1663, 0.7949, 0.2254, 0.8099]}, {"w": "and", "b": [0.2316, 0.7949, 0.2616, 0.8099]}, {"w": "measuring", "b": [0.2677, 0.7949, 0.3506, 0.8099]}, {"w": "the", "b": [0.3567, 0.7949, 0.3826, 0.8099]}, {"w": "statistical", "b": [0.3887, 0.7949, 0.4675, 0.8099]}, {"w": "significance", "b": [0.4737, 0.7949, 0.5658, 0.8099]}, {"w": "of", "b": [0.5719, 0.7949, 0.5869, 0.8099]}, {"w": "the", "b": [0.5931, 0.7949, 0.619, 0.8099]}, {"w": "difference", "b": [0.6251, 0.7949, 0.7022, 0.8099]}, {"w": "in", "b": [0.7083, 0.7949, 0.7239, 0.8099]}, {"w": "the", "b": [0.73, 0.7949, 0.7559, 0.8099]}, {"w": "metric", "b": [0.762, 0.7949, 0.8138, 0.8099]}, {"w": "values", "b": [0.8199, 0.7949, 0.8692, 0.8099]}, {"w": "between", "b": [0.1312, 0.8129, 0.1964, 0.8279]}, {"w": "different", "b": [0.2025, 0.8129, 0.2692, 0.8279]}, {"w": "groups,", "b": [0.2754, 0.8129, 0.334, 0.8279]}, {"w": "remains", "b": [0.3401, 0.8129, 0.4028, 0.8279]}, {"w": "the", "b": [0.409, 0.8129, 0.4346, 0.8279]}, {"w": "same.", "b": [0.4408, 0.8129, 0.486, 0.8279]}]}, {"id": "b_10", "type": "paragraph", "text": "The description of all formulations of A/B tests is beyond the scope of this book. Here we will consider only two formulations, but they apply to a wide range of practical situations.", "words": [{"w": "The", "b": [0.1306, 0.8398, 0.1627, 0.8548]}, {"w": "description", "b": [0.1689, 0.8398, 0.2583, 0.8548]}, {"w": "of", "b": [0.2644, 0.8398, 0.2795, 0.8548]}, {"w": "all", "b": [0.2856, 0.8398, 0.3053, 0.8548]}, {"w": "formulations", "b": [0.3114, 0.8398, 0.4133, 0.8548]}, {"w": "of", "b": [0.4194, 0.8398, 0.4345, 0.8548]}, {"w": "A/B", "b": [0.4406, 0.8398, 0.4772, 0.8548]}, {"w": "tests", "b": [0.4833, 0.8398, 0.5209, 0.8548]}, {"w": "is", "b": [0.527, 0.8398, 0.5396, 0.8548]}, {"w": "beyond", "b": [0.5457, 0.8398, 0.6044, 0.8548]}, {"w": "the", "b": [0.6105, 0.8398, 0.6365, 0.8548]}, {"w": "scope", "b": [0.6426, 0.8398, 0.6868, 0.8548]}, {"w": "of", "b": [0.6929, 0.8398, 0.708, 0.8548]}, {"w": "this", "b": [0.7141, 0.8398, 0.7443, 0.8548]}, {"w": "book.", "b": [0.7505, 0.8398, 0.7956, 0.8548]}, {"w": "Here", "b": [0.8038, 0.8398, 0.8417, 0.8548]}, {"w": "we", "b": [0.8478, 0.8398, 0.8691, 0.8548]}, {"w": "will", "b": [0.1306, 0.8578, 0.1593, 0.8727]}, {"w": "consider", "b": [0.1654, 0.8578, 0.2312, 0.8727]}, {"w": "only", "b": [0.2374, 0.8578, 0.2717, 0.8727]}, {"w": "two", "b": [0.2779, 0.8578, 0.3066, 0.8727]}, {"w": "formulations,", "b": [0.3127, 0.8578, 0.4185, 0.8727]}, {"w": "but", "b": [0.4246, 0.8578, 0.4523, 0.8727]}, {"w": "they", "b": [0.4585, 0.8578, 0.4939, 0.8727]}, {"w": "apply", "b": [0.5, 0.8578, 0.5446, 0.8727]}, {"w": "to", "b": [0.5508, 0.8578, 0.5672, 0.8727]}, {"w": "a", "b": [0.5733, 0.8578, 0.5826, 0.8727]}, {"w": "wide", "b": [0.5887, 0.8578, 0.6256, 0.8727]}, {"w": "range", "b": [0.6318, 0.8578, 0.6759, 0.8727]}, {"w": "of", "b": [0.6821, 0.8578, 0.6969, 0.8727]}, {"w": "practical", "b": [0.7031, 0.8578, 0.7729, 0.8727]}, {"w": "situations.", "b": [0.779, 0.8578, 0.8623, 0.8727]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "6", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 224, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "7.2.1 G-Test", "words": [{"w": "7.2.1", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "G-Test", "b": [0.1961, 0.0884, 0.2592, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "The first formulation of A/B test is based on the G-test. It is appropriate for a metric that counts the answer to a “yes” or “no” question. An advantage of the G-test is that you can ask any question, as long as only two answers are possible. Examples of questions:", "words": [{"w": "The", "b": [0.1306, 0.1251, 0.1619, 0.1399]}, {"w": "first", "b": [0.1681, 0.1251, 0.1996, 0.1399]}, {"w": "formulation", "b": [0.2057, 0.1251, 0.2978, 0.1399]}, {"w": "of", "b": [0.3039, 0.1251, 0.3186, 0.1399]}, {"w": "A/B", "b": [0.3248, 0.1251, 0.3604, 0.1399]}, {"w": "test", "b": [0.3665, 0.1251, 0.396, 0.1399]}, {"w": "is", "b": [0.4021, 0.1251, 0.4144, 0.1399]}, {"w": "based", "b": [0.4205, 0.1251, 0.4651, 0.1399]}, {"w": "on", "b": [0.4713, 0.1251, 0.4905, 0.1399]}, {"w": "the", "b": [0.4966, 0.1251, 0.5219, 0.1399]}, {"w": "G-test.", "b": [0.5279, 0.125, 0.5913, 0.1399]}, {"w": "It", "b": [0.5996, 0.1251, 0.6132, 0.1399]}, {"w": "is", "b": [0.6194, 0.1251, 0.6316, 0.1399]}, {"w": "appropriate", "b": [0.6378, 0.1251, 0.7299, 0.1399]}, {"w": "for", "b": [0.736, 0.1251, 0.7578, 0.1399]}, {"w": "a", "b": [0.764, 0.1251, 0.7731, 0.1399]}, {"w": "metric", "b": [0.7793, 0.1251, 0.8299, 0.1399]}, {"w": "that", "b": [0.836, 0.1251, 0.8694, 0.1399]}, {"w": "counts", "b": [0.1312, 0.1429, 0.1837, 0.1579]}, {"w": "the", "b": [0.1898, 0.1429, 0.2157, 0.1579]}, {"w": "answer", "b": [0.2219, 0.1429, 0.2774, 0.1579]}, {"w": "to", "b": [0.2836, 0.1429, 0.3002, 0.1579]}, {"w": "a", "b": [0.3063, 0.1429, 0.3156, 0.1579]}, {"w": "“yes”", "b": [0.3218, 0.1429, 0.3644, 0.1579]}, {"w": "or", "b": [0.3705, 0.1429, 0.3871, 0.1579]}, {"w": "“no”", "b": [0.3933, 0.1429, 0.4306, 0.1579]}, {"w": "question.", "b": [0.4367, 0.1429, 0.5099, 0.1579]}, {"w": "An", "b": [0.5181, 0.1429, 0.5424, 0.1579]}, {"w": "advantage", "b": [0.5486, 0.1429, 0.6304, 0.1579]}, {"w": "of", "b": [0.6365, 0.1429, 0.6516, 0.1579]}, {"w": "the", "b": [0.6577, 0.1429, 0.6836, 0.1579]}, {"w": "G-test", "b": [0.6898, 0.1429, 0.7408, 0.1579]}, {"w": "is", "b": [0.7469, 0.1429, 0.7595, 0.1579]}, {"w": "that", "b": [0.7656, 0.1429, 0.7998, 0.1579]}, {"w": "you", "b": [0.8059, 0.1429, 0.8349, 0.1579]}, {"w": "can", "b": [0.8411, 0.1429, 0.8691, 0.1579]}, {"w": "ask", "b": [0.1312, 0.1609, 0.1575, 0.1758]}, {"w": "any", "b": [0.1636, 0.1609, 0.1923, 0.1758]}, {"w": "question,", "b": [0.1985, 0.1609, 0.2709, 0.1758]}, {"w": "as", "b": [0.2771, 0.1609, 0.2936, 0.1758]}, {"w": "long", "b": [0.2997, 0.1609, 0.3335, 0.1758]}, {"w": "as", "b": [0.3397, 0.1609, 0.3562, 0.1758]}, {"w": "only", "b": [0.3624, 0.1609, 0.3967, 0.1758]}, {"w": "two", "b": [0.4029, 0.1609, 0.4316, 0.1758]}, {"w": "answers", "b": [0.4377, 0.1609, 0.5, 0.1758]}, {"w": "are", "b": [0.5062, 0.1609, 0.5308, 0.1758]}, {"w": "possible.", "b": [0.537, 0.1609, 0.6054, 0.1758]}, {"w": "Examples", "b": [0.6136, 0.1609, 0.6914, 0.1758]}, {"w": "of", "b": [0.6975, 0.1609, 0.7124, 0.1758]}, {"w": "questions:", "b": [0.7185, 0.1609, 0.7982, 0.1758]}]}, {"id": "b_2", "type": "paragraph", "text": "• Whether the user bought the recommended article? • Whether the user has spent more than $50 during a month? • Whether the user renewed the subscription?", "words": [{"w": "•", "b": [0.1538, 0.1878, 0.1681, 0.2027]}, {"w": "Whether", "b": [0.1774, 0.1878, 0.2477, 0.2027]}, {"w": "the", "b": [0.2538, 0.1878, 0.2795, 0.2027]}, {"w": "user", "b": [0.2856, 0.1878, 0.3186, 0.2027]}, {"w": "bought", "b": [0.3247, 0.1878, 0.3811, 0.2027]}, {"w": "the", "b": [0.3873, 0.1878, 0.4129, 0.2027]}, {"w": "recommended", "b": [0.4191, 0.1878, 0.5299, 0.2027]}, {"w": "article?", "b": [0.536, 0.1878, 0.595, 0.2027]}, {"w": "•", "b": [0.1538, 0.2057, 0.1681, 0.2207]}, {"w": "Whether", "b": [0.1774, 0.2057, 0.2477, 0.2207]}, {"w": "the", "b": [0.2538, 0.2057, 0.2795, 0.2207]}, {"w": "user", "b": [0.2856, 0.2057, 0.3186, 0.2207]}, {"w": "has", "b": [0.3247, 0.2057, 0.3515, 0.2207]}, {"w": "spent", "b": [0.3577, 0.2057, 0.4009, 0.2207]}, {"w": "more", "b": [0.407, 0.2057, 0.447, 0.2207]}, {"w": "than", "b": [0.4532, 0.2057, 0.4901, 0.2207]}, {"w": "$50", "b": [0.4962, 0.2057, 0.5239, 0.2207]}, {"w": "during", "b": [0.5301, 0.2057, 0.5824, 0.2207]}, {"w": "a", "b": [0.5886, 0.2057, 0.5978, 0.2207]}, {"w": "month?", "b": [0.6039, 0.2057, 0.6644, 0.2207]}, {"w": "•", "b": [0.1538, 0.2237, 0.1681, 0.2386]}, {"w": "Whether", "b": [0.1774, 0.2237, 0.2477, 0.2386]}, {"w": "the", "b": [0.2538, 0.2237, 0.2795, 0.2386]}, {"w": "user", "b": [0.2856, 0.2237, 0.3186, 0.2386]}, {"w": "renewed", "b": [0.3247, 0.2237, 0.3899, 0.2386]}, {"w": "the", "b": [0.3961, 0.2237, 0.4217, 0.2386]}, {"w": "subscription?", "b": [0.4279, 0.2237, 0.5343, 0.2386]}]}, {"id": "b_3", "type": "paragraph", "text": "Let’s see how to apply it. We want to decide whether the new model works better than the old one. To do that, we formulate a yes-or-no question that defines our metric. Then we randomly divide the users into groups A and B. The users of group A are routed to the environment running the old model, while the group’s B traffic is routed to the new model. Observe the actions of each user and record the answer as “yes” or “no.” Fill the following table:", "words": [{"w": "Let’s", "b": [0.1312, 0.2505, 0.1714, 0.2656]}, {"w": "see", "b": [0.1785, 0.2505, 0.2026, 0.2656]}, {"w": "how", "b": [0.2098, 0.2505, 0.2427, 0.2656]}, {"w": "to", "b": [0.2498, 0.2505, 0.2666, 0.2656]}, {"w": "apply", "b": [0.2737, 0.2505, 0.3192, 0.2656]}, {"w": "it.", "b": [0.3263, 0.2505, 0.3441, 0.2656]}, {"w": "We", "b": [0.3552, 0.2505, 0.3813, 0.2656]}, {"w": "want", "b": [0.3885, 0.2505, 0.4282, 0.2656]}, {"w": "to", "b": [0.4353, 0.2505, 0.4521, 0.2656]}, {"w": "decide", "b": [0.4592, 0.2505, 0.5105, 0.2656]}, {"w": "whether", "b": [0.5176, 0.2505, 0.5835, 0.2656]}, {"w": "the", "b": [0.5906, 0.2505, 0.6168, 0.2656]}, {"w": "new", "b": [0.6239, 0.2505, 0.6563, 0.2656]}, {"w": "model", "b": [0.6635, 0.2505, 0.7131, 0.2656]}, {"w": "works", "b": [0.7202, 0.2505, 0.7675, 0.2656]}, {"w": "better", "b": [0.7746, 0.2505, 0.8243, 0.2656]}, {"w": "than", "b": [0.8314, 0.2505, 0.8691, 0.2656]}, {"w": "the", "b": [0.1312, 0.2684, 0.1574, 0.2835]}, {"w": "old", "b": [0.1638, 0.2684, 0.1889, 0.2835]}, {"w": "one.", "b": [0.1954, 0.2684, 0.2288, 0.2835]}, {"w": "To", "b": [0.2379, 0.2684, 0.2593, 0.2835]}, {"w": "do", "b": [0.2658, 0.2684, 0.2857, 0.2835]}, {"w": "that,", "b": [0.2921, 0.2684, 0.3318, 0.2835]}, {"w": "we", "b": [0.3383, 0.2684, 0.3598, 0.2835]}, {"w": "formulate", "b": [0.3662, 0.2684, 0.4447, 0.2835]}, {"w": "a", "b": [0.4512, 0.2684, 0.4606, 0.2835]}, {"w": "yes-or-no", "b": [0.467, 0.2684, 0.5414, 0.2835]}, {"w": "question", "b": [0.5479, 0.2684, 0.6165, 0.2835]}, {"w": "that", "b": [0.6229, 0.2684, 0.6574, 0.2835]}, {"w": "defines", "b": [0.6639, 0.2684, 0.7194, 0.2835]}, {"w": "our", "b": [0.7259, 0.2684, 0.7531, 0.2835]}, {"w": "metric.", "b": [0.7595, 0.2684, 0.8171, 0.2835]}, {"w": "Then", "b": [0.8262, 0.2684, 0.8691, 0.2835]}, {"w": "we", "b": [0.1306, 0.2865, 0.1517, 0.3015]}, {"w": "randomly", "b": [0.1578, 0.2865, 0.2347, 0.3015]}, {"w": "divide", "b": [0.2408, 0.2865, 0.2898, 0.3015]}, {"w": "the", "b": [0.2959, 0.2865, 0.3217, 0.3015]}, {"w": "users", "b": [0.3279, 0.2865, 0.3683, 0.3015]}, {"w": "into", "b": [0.3745, 0.2865, 0.4059, 0.3015]}, {"w": "groups", "b": [0.4121, 0.2865, 0.4658, 0.3015]}, {"w": "A", "b": [0.472, 0.2865, 0.4859, 0.3015]}, {"w": "and", "b": [0.492, 0.2865, 0.5219, 0.3015]}, {"w": "B.", "b": [0.5281, 0.2865, 0.5464, 0.3015]}, {"w": "The", "b": [0.5525, 0.2865, 0.5845, 0.3015]}, {"w": "users", "b": [0.5906, 0.2865, 0.6311, 0.3015]}, {"w": "of", "b": [0.6372, 0.2865, 0.6522, 0.3015]}, {"w": "group", "b": [0.6583, 0.2865, 0.7048, 0.3015]}, {"w": "A", "b": [0.7109, 0.2865, 0.7248, 0.3015]}, {"w": "are", "b": [0.731, 0.2865, 0.7558, 0.3015]}, {"w": "routed", "b": [0.7619, 0.2865, 0.8145, 0.3015]}, {"w": "to", "b": [0.8207, 0.2865, 0.8372, 0.3015]}, {"w": "the", "b": [0.8433, 0.2865, 0.8691, 0.3015]}, {"w": "environment", "b": [0.1312, 0.3044, 0.2318, 0.3194]}, {"w": "running", "b": [0.2379, 0.3044, 0.3009, 0.3194]}, {"w": "the", "b": [0.307, 0.3044, 0.3328, 0.3194]}, {"w": "old", "b": [0.339, 0.3044, 0.3637, 0.3194]}, {"w": "model,", "b": [0.3699, 0.3044, 0.4239, 0.3194]}, {"w": "while", "b": [0.4301, 0.3044, 0.4724, 0.3194]}, {"w": "the", "b": [0.4785, 0.3044, 0.5043, 0.3194]}, {"w": "group’s", "b": [0.5105, 0.3044, 0.5694, 0.3194]}, {"w": "B", "b": [0.5755, 0.3044, 0.5887, 0.3194]}, {"w": "traffic", "b": [0.5948, 0.3044, 0.6423, 0.3194]}, {"w": "is", "b": [0.6484, 0.3044, 0.6609, 0.3194]}, {"w": "routed", "b": [0.6671, 0.3044, 0.7197, 0.3194]}, {"w": "to", "b": [0.7259, 0.3044, 0.7423, 0.3194]}, {"w": "the", "b": [0.7485, 0.3044, 0.7743, 0.3194]}, {"w": "new", "b": [0.7804, 0.3044, 0.8124, 0.3194]}, {"w": "model.", "b": [0.8186, 0.3044, 0.8727, 0.3194]}, {"w": "Observe", "b": [0.1312, 0.3223, 0.1967, 0.3374]}, {"w": "the", "b": [0.2029, 0.3223, 0.2288, 0.3374]}, {"w": "actions", "b": [0.235, 0.3223, 0.2921, 0.3374]}, {"w": "of", "b": [0.2982, 0.3223, 0.3133, 0.3374]}, {"w": "each", "b": [0.3194, 0.3223, 0.3552, 0.3374]}, {"w": "user", "b": [0.3614, 0.3223, 0.3947, 0.3374]}, {"w": "and", "b": [0.4009, 0.3223, 0.431, 0.3374]}, {"w": "record", "b": [0.4371, 0.3223, 0.488, 0.3374]}, {"w": "the", "b": [0.4942, 0.3223, 0.5201, 0.3374]}, {"w": "answer", "b": [0.5262, 0.3223, 0.5819, 0.3374]}, {"w": "as", "b": [0.588, 0.3223, 0.6047, 0.3374]}, {"w": "“yes”", "b": [0.6109, 0.3223, 0.6535, 0.3374]}, {"w": "or", "b": [0.6597, 0.3223, 0.6763, 0.3374]}, {"w": "“no.”", "b": [0.6824, 0.3223, 0.7224, 0.3374]}, {"w": "Fill", "b": [0.7306, 0.3223, 0.7583, 0.3374]}, {"w": "the", "b": [0.7645, 0.3223, 0.7904, 0.3374]}, {"w": "following", "b": [0.7966, 0.3223, 0.8691, 0.3374]}, {"w": "table:", "b": [0.1312, 0.3403, 0.1764, 0.3553]}]}, {"id": "b_4", "type": "paragraph", "text": "Yes No", "words": [{"w": "Yes", "b": [0.4234, 0.3833, 0.4481, 0.3985]}, {"w": "No", "b": [0.5385, 0.3833, 0.5593, 0.3985]}]}, {"id": "b_7", "type": "paragraph", "text": "Figure 3: The counts of answers to the yes-or-no question by users from groups A and B.", "words": [{"w": "Figure", "b": [0.1389, 0.5309, 0.191, 0.5458]}, {"w": "3:", "b": [0.1971, 0.5309, 0.2115, 0.5458]}, {"w": "The", "b": [0.2197, 0.5309, 0.2515, 0.5458]}, {"w": "counts", "b": [0.2576, 0.5309, 0.3095, 0.5458]}, {"w": "of", "b": [0.3157, 0.5309, 0.3306, 0.5458]}, {"w": "answers", "b": [0.3367, 0.5309, 0.399, 0.5458]}, {"w": "to", "b": [0.4052, 0.5309, 0.4216, 0.5458]}, {"w": "the", "b": [0.4277, 0.5309, 0.4534, 0.5458]}, {"w": "yes-or-no", "b": [0.4595, 0.5309, 0.5325, 0.5458]}, {"w": "question", "b": [0.5386, 0.5309, 0.6059, 0.5458]}, {"w": "by", "b": [0.612, 0.5309, 0.6315, 0.5458]}, {"w": "users", "b": [0.6377, 0.5309, 0.6779, 0.5458]}, {"w": "from", "b": [0.6841, 0.5309, 0.7216, 0.5458]}, {"w": "groups", "b": [0.7277, 0.5309, 0.7812, 0.5458]}, {"w": "A", "b": [0.7873, 0.5309, 0.8012, 0.5458]}, {"w": "and", "b": [0.8073, 0.5309, 0.8371, 0.5458]}, {"w": "B.", "b": [0.8432, 0.5309, 0.8614, 0.5458]}]}, {"id": "b_8", "type": "paragraph", "text": "In the above table, ˆayes is the number of users in group A, for which the answer to the question is “yes,” ˆbyes is the number of users in group B, for which the answer to the question is “yes,” ˆano is the number of users in group A, for which the answer to the question is “no,” and so on. Similarly, nyes = ˆayes + ˆbyes, nno = ˆano + ˆbno, na = ˆayes + ˆano, nb = ˆbyes + ˆbno, and, finally ntotal = nyes + nno = na + nb.", "words": [{"w": "In", "b": [0.1312, 0.581, 0.1485, 0.5961]}, {"w": "the", "b": [0.1559, 0.581, 0.1821, 0.5961]}, {"w": "above", "b": [0.1895, 0.581, 0.2366, 0.5961]}, {"w": "table,", "b": [0.244, 0.581, 0.29, 0.5961]}, {"w": "ˆayes", "b": [0.2977, 0.5811, 0.3293, 0.5973]}, {"w": "is", "b": [0.3377, 0.581, 0.3504, 0.5961]}, {"w": "the", "b": [0.3578, 0.581, 0.3839, 0.5961]}, {"w": "number", "b": [0.3914, 0.581, 0.4537, 0.5961]}, {"w": "of", "b": [0.4611, 0.581, 0.4763, 0.5961]}, {"w": "users", "b": [0.4837, 0.581, 0.5247, 0.5961]}, {"w": "in", "b": [0.5322, 0.581, 0.5479, 0.5961]}, {"w": "group", "b": [0.5553, 0.581, 0.6024, 0.5961]}, {"w": "A,", "b": [0.6098, 0.581, 0.6292, 0.5961]}, {"w": "for", "b": [0.6366, 0.581, 0.6591, 0.5961]}, {"w": "which", "b": [0.6666, 0.581, 0.7142, 0.5961]}, {"w": "the", "b": [0.7216, 0.581, 0.7477, 0.5961]}, {"w": "answer", "b": [0.7552, 0.581, 0.8113, 0.5961]}, {"w": "to", "b": [0.8187, 0.581, 0.8354, 0.5961]}, {"w": "the", "b": [0.8429, 0.581, 0.869, 0.5961]}, {"w": "question", "b": [0.1312, 0.6013, 0.1972, 0.6161]}, {"w": "is", "b": [0.2026, 0.6013, 0.2147, 0.6161]}, {"w": "“yes,”", "b": [0.2202, 0.6013, 0.2665, 0.6161]}, {"w": "ˆbyes", "b": [0.2713, 0.5972, 0.3018, 0.6173]}, {"w": "is", "b": [0.3081, 0.6013, 0.3203, 0.6161]}, {"w": "the", "b": [0.3257, 0.6013, 0.3508, 0.6161]}, {"w": "number", "b": [0.3562, 0.6013, 0.4161, 0.6161]}, {"w": "of", "b": [0.4215, 0.6013, 0.4361, 0.6161]}, {"w": "users", "b": [0.4415, 0.6013, 0.4809, 0.6161]}, {"w": "in", "b": [0.4864, 0.6013, 0.5014, 0.6161]}, {"w": "group", "b": [0.5068, 0.6013, 0.5521, 0.6161]}, {"w": "B,", "b": [0.5574, 0.6011, 0.5773, 0.6161]}, {"w": "for", "b": [0.5829, 0.6013, 0.6045, 0.6161]}, {"w": "which", "b": [0.61, 0.6013, 0.6557, 0.6161]}, {"w": "the", "b": [0.6611, 0.6013, 0.6862, 0.6161]}, {"w": "answer", "b": [0.6916, 0.6013, 0.7455, 0.6161]}, {"w": "to", "b": [0.751, 0.6013, 0.767, 0.6161]}, {"w": "the", "b": [0.7724, 0.6013, 0.7976, 0.6161]}, {"w": "question", "b": [0.803, 0.6013, 0.8689, 0.6161]}, {"w": "is", "b": [0.1312, 0.6192, 0.1434, 0.634]}, {"w": "“yes,”", "b": [0.1496, 0.6192, 0.1961, 0.634]}, {"w": "ˆano", "b": [0.2022, 0.6191, 0.2283, 0.6353]}, {"w": "is", "b": [0.2354, 0.6192, 0.2476, 0.634]}, {"w": "the", "b": [0.2538, 0.6192, 0.279, 0.634]}, {"w": "number", "b": [0.2851, 0.6192, 0.3451, 0.634]}, {"w": "of", "b": [0.3513, 0.6192, 0.3659, 0.634]}, {"w": "users", "b": [0.3721, 0.6192, 0.4117, 0.634]}, {"w": "in", "b": [0.4178, 0.6192, 0.4329, 0.634]}, {"w": "group", "b": [0.4391, 0.6192, 0.4845, 0.634]}, {"w": "A,", "b": [0.4907, 0.6192, 0.5093, 0.634]}, {"w": "for", "b": [0.5155, 0.6192, 0.5372, 0.634]}, {"w": "which", "b": [0.5433, 0.6192, 0.5892, 0.634]}, {"w": "the", "b": [0.5954, 0.6192, 0.6206, 0.634]}, {"w": "answer", "b": [0.6267, 0.6192, 0.6808, 0.634]}, {"w": "to", "b": [0.6869, 0.6192, 0.7031, 0.634]}, {"w": "the", "b": [0.7092, 0.6192, 0.7344, 0.634]}, {"w": "question", "b": [0.7406, 0.6192, 0.8067, 0.634]}, {"w": "is", "b": [0.8129, 0.6192, 0.8251, 0.634]}, {"w": "“no,”", "b": [0.8313, 0.6192, 0.8726, 0.634]}, {"w": "and", "b": [0.1312, 0.6369, 0.1616, 0.652]}, {"w": "so", "b": [0.1678, 0.6369, 0.1846, 0.652]}, {"w": "on.", "b": [0.1908, 0.6369, 0.2159, 0.652]}, {"w": "Similarly,", "b": [0.2243, 0.6369, 0.3017, 0.652]}, {"w": "nyes", "b": [0.3079, 0.637, 0.3409, 0.6532]}, {"w": "=", "b": [0.347, 0.6369, 0.3616, 0.652]}, {"w": "ˆayes", "b": [0.3668, 0.637, 0.3985, 0.6532]}, {"w": "+", "b": [0.4036, 0.6369, 0.4182, 0.652]}, {"w": "ˆbyes,", "b": [0.4217, 0.6331, 0.4583, 0.6532]}, {"w": "nno", "b": [0.4645, 0.637, 0.492, 0.6532]}, {"w": "=", "b": [0.4981, 0.6369, 0.5128, 0.652]}, {"w": "ˆano", "b": [0.518, 0.637, 0.5441, 0.6532]}, {"w": "+", "b": [0.5492, 0.6369, 0.5638, 0.652]}, {"w": "ˆbno,", "b": [0.5673, 0.6331, 0.5984, 0.6532]}, {"w": "na", "b": [0.6046, 0.637, 0.6237, 0.6532]}, {"w": "=", "b": [0.6298, 0.6369, 0.6445, 0.652]}, {"w": "ˆayes", "b": [0.6497, 0.637, 0.6813, 0.6532]}, {"w": "+", "b": [0.6864, 0.6369, 0.701, 0.652]}, {"w": "ˆano,", "b": [0.7052, 0.6369, 0.7375, 0.6532]}, {"w": "nb", "b": [0.7437, 0.637, 0.7612, 0.6532]}, {"w": "=", "b": [0.7674, 0.6369, 0.782, 0.652]}, {"w": "ˆbyes", "b": [0.7866, 0.6331, 0.817, 0.6532]}, {"w": "+", "b": [0.8221, 0.6369, 0.8367, 0.652]}, {"w": "ˆbno,", "b": [0.8402, 0.6331, 0.8713, 0.6532]}, {"w": "and,", "b": [0.1312, 0.655, 0.1661, 0.6699]}, {"w": "finally", "b": [0.1722, 0.655, 0.222, 0.6699]}, {"w": "ntotal", "b": [0.2281, 0.655, 0.2703, 0.6712]}, {"w": "=", "b": [0.2764, 0.655, 0.2907, 0.6699]}, {"w": "nyes", "b": [0.2959, 0.655, 0.3288, 0.6712]}, {"w": "+", "b": [0.3339, 0.655, 0.3482, 0.6699]}, {"w": "nno", "b": [0.3523, 0.655, 0.3798, 0.6712]}, {"w": "=", "b": [0.3858, 0.655, 0.4002, 0.6699]}, {"w": "na", "b": [0.4053, 0.655, 0.4244, 0.6712]}, {"w": "+", "b": [0.4294, 0.655, 0.4438, 0.6699]}, {"w": "nb.", "b": [0.4479, 0.655, 0.4715, 0.6712]}]}, {"id": "b_9", "type": "paragraph", "text": "Now, find the expected numbers of “yes” and “no” answers for A and B, i.e. the number of “yes” and “no” we would get if versions A and B were equivalent.", "words": [{"w": "Now,", "b": [0.1312, 0.6819, 0.1724, 0.6969]}, {"w": "find", "b": [0.1785, 0.6819, 0.2094, 0.6969]}, {"w": "the", "b": [0.2155, 0.6819, 0.2412, 0.6969]}, {"w": "expected", "b": [0.2474, 0.6819, 0.3184, 0.6969]}, {"w": "numbers", "b": [0.3245, 0.6819, 0.3931, 0.6969]}, {"w": "of", "b": [0.3992, 0.6819, 0.4141, 0.6969]}, {"w": "“yes”", "b": [0.4203, 0.6819, 0.4625, 0.6969]}, {"w": "and", "b": [0.4687, 0.6819, 0.4985, 0.6969]}, {"w": "“no”", "b": [0.5046, 0.6819, 0.5416, 0.6969]}, {"w": "answers", "b": [0.5478, 0.6819, 0.6103, 0.6969]}, {"w": "for", "b": [0.6164, 0.6819, 0.6386, 0.6969]}, {"w": "A", "b": [0.6447, 0.6819, 0.6586, 0.6969]}, {"w": "and", "b": [0.6648, 0.6819, 0.6946, 0.6969]}, {"w": "B,", "b": [0.7007, 0.6819, 0.719, 0.6969]}, {"w": "i.e.", "b": [0.7251, 0.6819, 0.7488, 0.6969]}, {"w": "the", "b": [0.7549, 0.6819, 0.7807, 0.6969]}, {"w": "number", "b": [0.7868, 0.6819, 0.848, 0.6969]}, {"w": "of", "b": [0.8542, 0.6819, 0.8691, 0.6969]}, {"w": "“yes”", "b": [0.1286, 0.6998, 0.1708, 0.7148]}, {"w": "and", "b": [0.1769, 0.6998, 0.2066, 0.7148]}, {"w": "“no”", "b": [0.2128, 0.6998, 0.2497, 0.7148]}, {"w": "we", "b": [0.2558, 0.6998, 0.2769, 0.7148]}, {"w": "would", "b": [0.283, 0.6998, 0.3307, 0.7148]}, {"w": "get", "b": [0.3368, 0.6998, 0.3614, 0.7148]}, {"w": "if", "b": [0.3676, 0.6998, 0.3784, 0.7148]}, {"w": "versions", "b": [0.3845, 0.6998, 0.4484, 0.7148]}, {"w": "A", "b": [0.4545, 0.6998, 0.4684, 0.7148]}, {"w": "and", "b": [0.4745, 0.6998, 0.5042, 0.7148]}, {"w": "B", "b": [0.5104, 0.6998, 0.5234, 0.7148]}, {"w": "were", "b": [0.5296, 0.6998, 0.5661, 0.7148]}, {"w": "equivalent.", "b": [0.5722, 0.6998, 0.6589, 0.7148]}]}, {"id": "b_10", "type": "paragraph", "text": "ayes", "words": [{"w": "ayes", "b": [0.4305, 0.7456, 0.4622, 0.7619]}]}, {"id": "b_11", "type": "equation", "text": "def = na", "words": [{"w": "def", "b": [0.4682, 0.7405, 0.4875, 0.7509]}, {"w": "=", "b": [0.4707, 0.7457, 0.4851, 0.7606]}, {"w": "na", "b": [0.4926, 0.7456, 0.5117, 0.7619]}]}, {"id": "b_12", "type": "paragraph", "text": "nyes ntotal", "words": [{"w": "nyes", "b": [0.5236, 0.7355, 0.5566, 0.7517]}, {"w": "ntotal", "b": [0.519, 0.7559, 0.5611, 0.7721]}]}, {"id": "b_14", "type": "paragraph", "text": "ano", "words": [{"w": "ano", "b": [0.436, 0.7815, 0.4622, 0.7977]}]}, {"id": "b_15", "type": "equation", "text": "def = na", "words": [{"w": "def", "b": [0.4682, 0.7764, 0.4875, 0.7868]}, {"w": "=", "b": [0.4707, 0.7815, 0.4851, 0.7965]}, {"w": "na", "b": [0.4926, 0.7815, 0.5117, 0.7977]}]}, {"id": "b_16", "type": "paragraph", "text": "nno ntotal", "words": [{"w": "nno", "b": [0.5263, 0.7714, 0.5538, 0.7876]}, {"w": "ntotal", "b": [0.519, 0.7918, 0.5611, 0.808]}]}, {"id": "b_18", "type": "paragraph", "text": "byes", "words": [{"w": "byes", "b": [0.4324, 0.8174, 0.4622, 0.8336]}]}, {"id": "b_19", "type": "equation", "text": "def = nb", "words": [{"w": "def", "b": [0.4682, 0.8122, 0.4875, 0.8227]}, {"w": "=", "b": [0.4707, 0.8174, 0.4851, 0.8324]}, {"w": "nb", "b": [0.4926, 0.8174, 0.5102, 0.8336]}]}, {"id": "b_20", "type": "paragraph", "text": "nyes ntotal", "words": [{"w": "nyes", "b": [0.5221, 0.8073, 0.5551, 0.8235]}, {"w": "ntotal", "b": [0.5174, 0.8277, 0.5596, 0.8439]}]}, {"id": "b_22", "type": "paragraph", "text": "bno", "words": [{"w": "bno", "b": [0.4379, 0.8533, 0.4622, 0.8695]}]}, {"id": "b_23", "type": "equation", "text": "def = nb", "words": [{"w": "def", "b": [0.4682, 0.8481, 0.4875, 0.8586]}, {"w": "=", "b": [0.4707, 0.8533, 0.4851, 0.8683]}, {"w": "nb", "b": [0.4926, 0.8533, 0.5102, 0.8695]}]}, {"id": "b_24", "type": "paragraph", "text": "nno ntotal", "words": [{"w": "nno", "b": [0.5248, 0.8432, 0.5523, 0.8594]}, {"w": "ntotal", "b": [0.5174, 0.8635, 0.5596, 0.8798]}]}, {"id": "b_26", "type": "paragraph", "text": "(1)", "words": [{"w": "(1)", "b": [0.8452, 0.8008, 0.8688, 0.8157]}]}, {"id": "b_27", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "7", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 225, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "Now, find the value of the G-test as,1", "words": [{"w": "Now,", "b": [0.1312, 0.0884, 0.1722, 0.1033]}, {"w": "find", "b": [0.1784, 0.0884, 0.2091, 0.1033]}, {"w": "the", "b": [0.2153, 0.0884, 0.241, 0.1033]}, {"w": "value", "b": [0.2471, 0.0884, 0.2886, 0.1033]}, {"w": "of", "b": [0.2948, 0.0884, 0.3097, 0.1033]}, {"w": "the", "b": [0.3158, 0.0884, 0.3414, 0.1033]}, {"w": "G-test", "b": [0.3475, 0.0884, 0.398, 0.1033]}, {"w": "as,1", "b": [0.4041, 0.0865, 0.4331, 0.1033]}]}, {"id": "b_2", "type": "equation", "text": "def = 2", "words": [{"w": "def", "b": [0.2147, 0.1378, 0.234, 0.1483]}, {"w": "=", "b": [0.2172, 0.143, 0.2316, 0.1579]}, {"w": "2", "b": [0.2391, 0.143, 0.2484, 0.1579]}]}, {"id": "b_4", "type": "paragraph", "text": "ˆayes ln", "words": [{"w": "ˆayes", "b": [0.266, 0.143, 0.2977, 0.1592]}, {"w": "ln", "b": [0.3017, 0.143, 0.3171, 0.1579]}]}, {"id": "b_5", "type": "paragraph", "text": "ˆayes", "words": [{"w": "ˆayes", "b": [0.3361, 0.1328, 0.3677, 0.1491]}]}, {"id": "b_6", "type": "paragraph", "text": "ayes", "words": [{"w": "ayes", "b": [0.3361, 0.1532, 0.3677, 0.1694]}]}, {"id": "b_8", "type": "equation", "text": "+ ˆano ln", "words": [{"w": "+", "b": [0.3886, 0.143, 0.4029, 0.1579]}, {"w": "ˆano", "b": [0.407, 0.143, 0.4332, 0.1592]}, {"w": "ln", "b": [0.4372, 0.143, 0.4525, 0.1579]}]}, {"id": "b_9", "type": "paragraph", "text": "ˆano", "words": [{"w": "ˆano", "b": [0.4715, 0.1328, 0.4977, 0.1491]}]}, {"id": "b_10", "type": "paragraph", "text": "ano", "words": [{"w": "ano", "b": [0.4715, 0.1532, 0.4977, 0.1694]}]}, {"id": "b_12", "type": "equation", "text": "+ ˆbyes ln", "words": [{"w": "+", "b": [0.5185, 0.143, 0.5329, 0.1579]}, {"w": "ˆbyes", "b": [0.5363, 0.139, 0.5668, 0.1592]}, {"w": "ln", "b": [0.5708, 0.143, 0.5862, 0.1579]}]}, {"id": "b_13", "type": "paragraph", "text": "ˆbyes", "words": [{"w": "ˆbyes", "b": [0.6055, 0.1289, 0.636, 0.1491]}]}, {"id": "b_14", "type": "paragraph", "text": "byes", "words": [{"w": "byes", "b": [0.6062, 0.1532, 0.636, 0.1694]}]}, {"id": "b_16", "type": "equation", "text": "+ ˆbno ln", "words": [{"w": "+", "b": [0.6579, 0.143, 0.6722, 0.1579]}, {"w": "ˆbno", "b": [0.6757, 0.139, 0.7006, 0.1592]}, {"w": "ln", "b": [0.7046, 0.143, 0.72, 0.1579]}]}, {"id": "b_17", "type": "paragraph", "text": "ˆbno", "words": [{"w": "ˆbno", "b": [0.7394, 0.1289, 0.7643, 0.1491]}]}, {"id": "b_18", "type": "paragraph", "text": "bno", "words": [{"w": "bno", "b": [0.74, 0.1532, 0.7643, 0.1694]}]}, {"id": "b_21", "type": "paragraph", "text": "G is a measure of how different the samples from A and B are. Statistically speaking, under the null hypothesis (A and B are equal), G follows a chi-square distribution with one degree of freedom:", "words": [{"w": "G", "b": [0.1312, 0.1914, 0.1457, 0.2064]}, {"w": "is", "b": [0.1519, 0.1915, 0.1642, 0.2064]}, {"w": "a", "b": [0.1703, 0.1915, 0.1794, 0.2064]}, {"w": "measure", "b": [0.1856, 0.1915, 0.2506, 0.2064]}, {"w": "of", "b": [0.2567, 0.1915, 0.2714, 0.2064]}, {"w": "how", "b": [0.2776, 0.1915, 0.3095, 0.2064]}, {"w": "different", "b": [0.3156, 0.1915, 0.3815, 0.2064]}, {"w": "the", "b": [0.3877, 0.1915, 0.413, 0.2064]}, {"w": "samples", "b": [0.4192, 0.1915, 0.4812, 0.2064]}, {"w": "from", "b": [0.4873, 0.1915, 0.5243, 0.2064]}, {"w": "A", "b": [0.5305, 0.1915, 0.5442, 0.2064]}, {"w": "and", "b": [0.5503, 0.1915, 0.5797, 0.2064]}, {"w": "B", "b": [0.5859, 0.1915, 0.5988, 0.2064]}, {"w": "are.", "b": [0.6049, 0.1915, 0.6344, 0.2064]}, {"w": "Statistically", "b": [0.6426, 0.1915, 0.7374, 0.2064]}, {"w": "speaking,", "b": [0.7436, 0.1915, 0.8176, 0.2064]}, {"w": "under", "b": [0.8238, 0.1915, 0.8695, 0.2064]}, {"w": "the", "b": [0.1312, 0.2093, 0.1574, 0.2244]}, {"w": "null", "b": [0.1645, 0.2093, 0.1954, 0.2244]}, {"w": "hypothesis", "b": [0.2025, 0.2093, 0.289, 0.2244]}, {"w": "(A", "b": [0.2961, 0.2093, 0.3175, 0.2244]}, {"w": "and", "b": [0.3246, 0.2093, 0.3549, 0.2244]}, {"w": "B", "b": [0.362, 0.2093, 0.3753, 0.2244]}, {"w": "are", "b": [0.3824, 0.2093, 0.4076, 0.2244]}, {"w": "equal),", "b": [0.4147, 0.2093, 0.4707, 0.2244]}, {"w": "G", "b": [0.4778, 0.2094, 0.4923, 0.2243]}, {"w": "follows", "b": [0.4994, 0.2093, 0.555, 0.2244]}, {"w": "a", "b": [0.5621, 0.2093, 0.5715, 0.2244]}, {"w": "chi-square", "b": [0.5788, 0.2094, 0.6725, 0.2243]}, {"w": "distribution", "b": [0.6807, 0.2094, 0.7897, 0.2243]}, {"w": "with", "b": [0.7969, 0.2093, 0.8335, 0.2244]}, {"w": "one", "b": [0.8405, 0.2093, 0.8688, 0.2244]}, {"w": "degree", "b": [0.1312, 0.2273, 0.1826, 0.2423]}, {"w": "of", "b": [0.1887, 0.2273, 0.2036, 0.2423]}, {"w": "freedom:", "b": [0.2097, 0.2273, 0.279, 0.2423]}]}, {"id": "b_22", "type": "paragraph", "text": "G ∼χ2", "words": [{"w": "G", "b": [0.4705, 0.2722, 0.485, 0.2871]}, {"w": "∼χ2", "b": [0.4902, 0.2695, 0.5285, 0.2871]}]}, {"id": "b_24", "type": "paragraph", "text": "In other words, if A and B were equal, we expect G to be small. A large value of G would make us suspicious that one of the models performs better than the other. For example, imagine you calculated G = 3.84. If A and B were equal (i.e. under the null hypothesis) the probability of observing G ≥3.84 is about 5%. We often refer to this probability as the p-value.", "words": [{"w": "In", "b": [0.1312, 0.308, 0.1484, 0.3231]}, {"w": "other", "b": [0.1545, 0.308, 0.1972, 0.3231]}, {"w": "words,", "b": [0.2034, 0.308, 0.2561, 0.3231]}, {"w": "if", "b": [0.2622, 0.308, 0.2731, 0.3231]}, {"w": "A", "b": [0.2793, 0.308, 0.2934, 0.3231]}, {"w": "and", "b": [0.2995, 0.308, 0.3297, 0.3231]}, {"w": "B", "b": [0.3358, 0.308, 0.3491, 0.3231]}, {"w": "were", "b": [0.3552, 0.308, 0.3922, 0.3231]}, {"w": "equal,", "b": [0.3984, 0.308, 0.4467, 0.3231]}, {"w": "we", "b": [0.4529, 0.308, 0.4742, 0.3231]}, {"w": "expect", "b": [0.4804, 0.308, 0.5334, 0.3231]}, {"w": "G", "b": [0.5394, 0.3081, 0.5539, 0.323]}, {"w": "to", "b": [0.5601, 0.308, 0.5767, 0.3231]}, {"w": "be", "b": [0.5828, 0.308, 0.6021, 0.3231]}, {"w": "small.", "b": [0.6082, 0.308, 0.6562, 0.3231]}, {"w": "A", "b": [0.6644, 0.308, 0.6784, 0.3231]}, {"w": "large", "b": [0.6846, 0.308, 0.7242, 0.3231]}, {"w": "value", "b": [0.7303, 0.308, 0.7724, 0.3231]}, {"w": "of", "b": [0.7786, 0.308, 0.7937, 0.3231]}, {"w": "G", "b": [0.7998, 0.3081, 0.8143, 0.323]}, {"w": "would", "b": [0.8204, 0.308, 0.8688, 0.3231]}, {"w": "make", "b": [0.1312, 0.3259, 0.1741, 0.341]}, {"w": "us", "b": [0.1811, 0.3259, 0.199, 0.341]}, {"w": "suspicious", "b": [0.2061, 0.3259, 0.288, 0.341]}, {"w": "that", "b": [0.295, 0.3259, 0.3295, 0.341]}, {"w": "one", "b": [0.3366, 0.3259, 0.3648, 0.341]}, {"w": "of", "b": [0.3718, 0.3259, 0.387, 0.341]}, {"w": "the", "b": [0.394, 0.3259, 0.4202, 0.341]}, {"w": "models", "b": [0.4272, 0.3259, 0.4843, 0.341]}, {"w": "performs", "b": [0.4914, 0.3259, 0.5637, 0.341]}, {"w": "better", "b": [0.5708, 0.3259, 0.6205, 0.341]}, {"w": "than", "b": [0.6275, 0.3259, 0.6652, 0.341]}, {"w": "the", "b": [0.6722, 0.3259, 0.6984, 0.341]}, {"w": "other.", "b": [0.7054, 0.3259, 0.7536, 0.341]}, {"w": "For", "b": [0.7644, 0.3259, 0.792, 0.341]}, {"w": "example,", "b": [0.799, 0.3259, 0.8717, 0.341]}, {"w": "imagine", "b": [0.1312, 0.344, 0.1933, 0.3589]}, {"w": "you", "b": [0.1995, 0.344, 0.228, 0.3589]}, {"w": "calculated", "b": [0.2342, 0.344, 0.3146, 0.3589]}, {"w": "G", "b": [0.3207, 0.344, 0.3352, 0.3589]}, {"w": "=", "b": [0.3403, 0.344, 0.3546, 0.3589]}, {"w": "3.84.", "b": [0.3597, 0.344, 0.3974, 0.3589]}, {"w": "If", "b": [0.4056, 0.344, 0.4178, 0.3589]}, {"w": "A", "b": [0.424, 0.344, 0.4377, 0.3589]}, {"w": "and", "b": [0.4439, 0.344, 0.4734, 0.3589]}, {"w": "B", "b": [0.4796, 0.344, 0.4925, 0.3589]}, {"w": "were", "b": [0.4987, 0.344, 0.5349, 0.3589]}, {"w": "equal", "b": [0.541, 0.344, 0.5833, 0.3589]}, {"w": "(i.e.", "b": [0.5895, 0.344, 0.62, 0.3589]}, {"w": "under", "b": [0.6262, 0.344, 0.6721, 0.3589]}, {"w": "the", "b": [0.6782, 0.344, 0.7037, 0.3589]}, {"w": "null", "b": [0.7098, 0.344, 0.7399, 0.3589]}, {"w": "hypothesis)", "b": [0.746, 0.344, 0.8374, 0.3589]}, {"w": "the", "b": [0.8435, 0.344, 0.869, 0.3589]}, {"w": "probability", "b": [0.1312, 0.3618, 0.2213, 0.3769]}, {"w": "of", "b": [0.2284, 0.3618, 0.2435, 0.3769]}, {"w": "observing", "b": [0.2506, 0.3618, 0.3287, 0.3769]}, {"w": "G", "b": [0.3357, 0.3619, 0.3502, 0.3769]}, {"w": "≥3.84", "b": [0.3569, 0.3617, 0.4114, 0.3769]}, {"w": "is", "b": [0.4185, 0.3618, 0.4311, 0.3769]}, {"w": "about", "b": [0.4382, 0.3618, 0.4858, 0.3769]}, {"w": "5%.", "b": [0.4929, 0.3618, 0.5232, 0.3769]}, {"w": "We", "b": [0.5343, 0.3618, 0.5604, 0.3769]}, {"w": "often", "b": [0.5676, 0.3618, 0.6089, 0.3769]}, {"w": "refer", "b": [0.616, 0.3618, 0.6532, 0.3769]}, {"w": "to", "b": [0.6603, 0.3618, 0.6771, 0.3769]}, {"w": "this", "b": [0.6842, 0.3618, 0.7146, 0.3769]}, {"w": "probability", "b": [0.7217, 0.3618, 0.8117, 0.3769]}, {"w": "as", "b": [0.8188, 0.3618, 0.8357, 0.3769]}, {"w": "the", "b": [0.8428, 0.3618, 0.869, 0.3769]}, {"w": "p-value.", "b": [0.1312, 0.3798, 0.1933, 0.3948]}]}, {"id": "b_25", "type": "paragraph", "text": "If the p-value is small enough (e.g., below 0.05) then the performances of the new and the old model are very likely different (the null hypothesis is rejected). In this case, if byes is higher than ayes, then the new model is very likely to work better than the old model; otherwise, the old model is better.", "words": [{"w": "If", "b": [0.1312, 0.4069, 0.1433, 0.4217]}, {"w": "the", "b": [0.149, 0.4069, 0.1741, 0.4217]}, {"w": "p-value", "b": [0.1798, 0.4068, 0.2358, 0.4217]}, {"w": "is", "b": [0.2415, 0.4069, 0.2536, 0.4217]}, {"w": "small", "b": [0.2593, 0.4069, 0.3006, 0.4217]}, {"w": "enough", "b": [0.3063, 0.4069, 0.3626, 0.4217]}, {"w": "(e.g.,", "b": [0.3683, 0.4069, 0.4075, 0.4217]}, {"w": "below", "b": [0.4133, 0.4069, 0.4585, 0.4217]}, {"w": "0.05)", "b": [0.4641, 0.4068, 0.5034, 0.4217]}, {"w": "then", "b": [0.5091, 0.4069, 0.5443, 0.4217]}, {"w": "the", "b": [0.55, 0.4069, 0.5751, 0.4217]}, {"w": "performances", "b": [0.5808, 0.4069, 0.6855, 0.4217]}, {"w": "of", "b": [0.6912, 0.4069, 0.7058, 0.4217]}, {"w": "the", "b": [0.7115, 0.4069, 0.7366, 0.4217]}, {"w": "new", "b": [0.7423, 0.4069, 0.7735, 0.4217]}, {"w": "and", "b": [0.7792, 0.4069, 0.8083, 0.4217]}, {"w": "the", "b": [0.814, 0.4069, 0.8391, 0.4217]}, {"w": "old", "b": [0.8448, 0.4069, 0.869, 0.4217]}, {"w": "model", "b": [0.1312, 0.4248, 0.1796, 0.4397]}, {"w": "are", "b": [0.1858, 0.4248, 0.2102, 0.4397]}, {"w": "very", "b": [0.2164, 0.4248, 0.2506, 0.4397]}, {"w": "likely", "b": [0.2567, 0.4248, 0.299, 0.4397]}, {"w": "different", "b": [0.3052, 0.4248, 0.3714, 0.4397]}, {"w": "(the", "b": [0.3776, 0.4248, 0.4102, 0.4397]}, {"w": "null", "b": [0.4163, 0.4248, 0.4464, 0.4397]}, {"w": "hypothesis", "b": [0.4525, 0.4248, 0.5368, 0.4397]}, {"w": "is", "b": [0.5429, 0.4248, 0.5553, 0.4397]}, {"w": "rejected).", "b": [0.5614, 0.4248, 0.6364, 0.4397]}, {"w": "In", "b": [0.6446, 0.4248, 0.6614, 0.4397]}, {"w": "this", "b": [0.6676, 0.4248, 0.6972, 0.4397]}, {"w": "case,", "b": [0.7034, 0.4248, 0.7411, 0.4397]}, {"w": "if", "b": [0.7473, 0.4248, 0.758, 0.4397]}, {"w": "byes", "b": [0.7638, 0.4247, 0.7936, 0.4409]}, {"w": "is", "b": [0.8007, 0.4248, 0.8131, 0.4397]}, {"w": "higher", "b": [0.8192, 0.4248, 0.8692, 0.4397]}, {"w": "than", "b": [0.1312, 0.4426, 0.1687, 0.4577]}, {"w": "ayes,", "b": [0.1749, 0.4426, 0.2127, 0.4589]}, {"w": "then", "b": [0.2188, 0.4426, 0.2553, 0.4577]}, {"w": "the", "b": [0.2614, 0.4426, 0.2875, 0.4577]}, {"w": "new", "b": [0.2936, 0.4426, 0.3259, 0.4577]}, {"w": "model", "b": [0.3321, 0.4426, 0.3816, 0.4577]}, {"w": "is", "b": [0.3877, 0.4426, 0.4003, 0.4577]}, {"w": "very", "b": [0.4065, 0.4426, 0.4414, 0.4577]}, {"w": "likely", "b": [0.4476, 0.4426, 0.4909, 0.4577]}, {"w": "to", "b": [0.497, 0.4426, 0.5137, 0.4577]}, {"w": "work", "b": [0.5198, 0.4426, 0.5595, 0.4577]}, {"w": "better", "b": [0.5656, 0.4426, 0.6151, 0.4577]}, {"w": "than", "b": [0.6213, 0.4426, 0.6588, 0.4577]}, {"w": "the", "b": [0.665, 0.4426, 0.691, 0.4577]}, {"w": "old", "b": [0.6972, 0.4426, 0.7222, 0.4577]}, {"w": "model;", "b": [0.7283, 0.4426, 0.783, 0.4577]}, {"w": "otherwise,", "b": [0.7892, 0.4426, 0.8716, 0.4577]}, {"w": "the", "b": [0.1312, 0.4606, 0.1569, 0.4756]}, {"w": "old", "b": [0.163, 0.4606, 0.1876, 0.4756]}, {"w": "model", "b": [0.1938, 0.4606, 0.2425, 0.4756]}, {"w": "is", "b": [0.2486, 0.4606, 0.261, 0.4756]}, {"w": "better.", "b": [0.2672, 0.4606, 0.3211, 0.4756]}]}, {"id": "b_26", "type": "paragraph", "text": "If the p-value corresponding to the value of G is not small enough then the observed difference of performance between the new and the old model is not statistically significant, and you can keep the old model in production.", "words": [{"w": "If", "b": [0.1312, 0.4877, 0.1433, 0.5025]}, {"w": "the", "b": [0.1485, 0.4877, 0.1737, 0.5025]}, {"w": "p-value", "b": [0.1789, 0.4875, 0.2349, 0.5025]}, {"w": "corresponding", "b": [0.2401, 0.4877, 0.3504, 0.5025]}, {"w": "to", "b": [0.3556, 0.4877, 0.3717, 0.5025]}, {"w": "the", "b": [0.3769, 0.4877, 0.4021, 0.5025]}, {"w": "value", "b": [0.4073, 0.4877, 0.448, 0.5025]}, {"w": "of", "b": [0.4532, 0.4877, 0.4678, 0.5025]}, {"w": "G", "b": [0.4729, 0.4875, 0.4874, 0.5025]}, {"w": "is", "b": [0.4927, 0.4877, 0.5048, 0.5025]}, {"w": "not", "b": [0.5101, 0.4877, 0.5362, 0.5025]}, {"w": "small", "b": [0.5414, 0.4877, 0.5827, 0.5025]}, {"w": "enough", "b": [0.588, 0.4877, 0.6443, 0.5025]}, {"w": "then", "b": [0.6495, 0.4877, 0.6847, 0.5025]}, {"w": "the", "b": [0.6899, 0.4877, 0.7151, 0.5025]}, {"w": "observed", "b": [0.7203, 0.4877, 0.7888, 0.5025]}, {"w": "difference", "b": [0.794, 0.4877, 0.869, 0.5025]}, {"w": "of", "b": [0.1312, 0.5054, 0.1463, 0.5205]}, {"w": "performance", "b": [0.1524, 0.5054, 0.2534, 0.5205]}, {"w": "between", "b": [0.2595, 0.5054, 0.3256, 0.5205]}, {"w": "the", "b": [0.3317, 0.5054, 0.3577, 0.5205]}, {"w": "new", "b": [0.3639, 0.5054, 0.3961, 0.5205]}, {"w": "and", "b": [0.4022, 0.5054, 0.4324, 0.5205]}, {"w": "the", "b": [0.4385, 0.5054, 0.4645, 0.5205]}, {"w": "old", "b": [0.4706, 0.5054, 0.4956, 0.5205]}, {"w": "model", "b": [0.5017, 0.5054, 0.5511, 0.5205]}, {"w": "is", "b": [0.5572, 0.5054, 0.5698, 0.5205]}, {"w": "not", "b": [0.576, 0.5054, 0.603, 0.5205]}, {"w": "statistically", "b": [0.6091, 0.5054, 0.7035, 0.5205]}, {"w": "significant,", "b": [0.7096, 0.5054, 0.7976, 0.5205]}, {"w": "and", "b": [0.8037, 0.5054, 0.8339, 0.5205]}, {"w": "you", "b": [0.84, 0.5054, 0.8691, 0.5205]}, {"w": "can", "b": [0.1312, 0.5234, 0.1589, 0.5384]}, {"w": "keep", "b": [0.1651, 0.5234, 0.201, 0.5384]}, {"w": "the", "b": [0.2071, 0.5234, 0.2328, 0.5384]}, {"w": "old", "b": [0.2389, 0.5234, 0.2635, 0.5384]}, {"w": "model", "b": [0.2697, 0.5234, 0.3184, 0.5384]}, {"w": "in", "b": [0.3245, 0.5234, 0.3399, 0.5384]}, {"w": "production.", "b": [0.3461, 0.5234, 0.4389, 0.5384]}]}, {"id": "b_27", "type": "paragraph", "text": "It is convenient to find the p-value of the G-test using a programming language of your choice. In Python, it can be done in the following way:", "words": [{"w": "It", "b": [0.1312, 0.5505, 0.1448, 0.5653]}, {"w": "is", "b": [0.1503, 0.5505, 0.1625, 0.5653]}, {"w": "convenient", "b": [0.168, 0.5505, 0.2514, 0.5653]}, {"w": "to", "b": [0.2569, 0.5505, 0.2729, 0.5653]}, {"w": "find", "b": [0.2784, 0.5505, 0.3086, 0.5653]}, {"w": "the", "b": [0.3141, 0.5505, 0.3392, 0.5653]}, {"w": "p-value", "b": [0.3446, 0.5503, 0.4006, 0.5653]}, {"w": "of", "b": [0.4061, 0.5505, 0.4206, 0.5653]}, {"w": "the", "b": [0.4261, 0.5505, 0.4513, 0.5653]}, {"w": "G-test", "b": [0.4568, 0.5505, 0.5062, 0.5653]}, {"w": "using", "b": [0.5117, 0.5505, 0.553, 0.5653]}, {"w": "a", "b": [0.5585, 0.5505, 0.5676, 0.5653]}, {"w": "programming", "b": [0.5731, 0.5505, 0.6787, 0.5653]}, {"w": "language", "b": [0.6842, 0.5505, 0.7535, 0.5653]}, {"w": "of", "b": [0.759, 0.5505, 0.7736, 0.5653]}, {"w": "your", "b": [0.7791, 0.5505, 0.8143, 0.5653]}, {"w": "choice.", "b": [0.8198, 0.5505, 0.8725, 0.5653]}, {"w": "In", "b": [0.1312, 0.5683, 0.1482, 0.5833]}, {"w": "Python,", "b": [0.1543, 0.5683, 0.2186, 0.5833]}, {"w": "it", "b": [0.2248, 0.5683, 0.2371, 0.5833]}, {"w": "can", "b": [0.2433, 0.5683, 0.2709, 0.5833]}, {"w": "be", "b": [0.2771, 0.5683, 0.2961, 0.5833]}, {"w": "done", "b": [0.3022, 0.5683, 0.3402, 0.5833]}, {"w": "in", "b": [0.3463, 0.5683, 0.3617, 0.5833]}, {"w": "the", "b": [0.3678, 0.5683, 0.3935, 0.5833]}, {"w": "following", "b": [0.3997, 0.5683, 0.4714, 0.5833]}, {"w": "way:", "b": [0.4776, 0.5683, 0.514, 0.5833]}]}, {"id": "b_28", "type": "paragraph", "text": "1 from scipy.stats import chi2", "words": [{"w": "1", "b": [0.1028, 0.6011, 0.1091, 0.6085]}, {"w": "from", "b": [0.1312, 0.596, 0.17, 0.6109]}, {"w": "scipy.stats", "b": [0.1797, 0.596, 0.2862, 0.6109]}, {"w": "import", "b": [0.2959, 0.596, 0.354, 0.6109]}, {"w": "chi2", "b": [0.3637, 0.596, 0.4024, 0.6109]}]}, {"id": "b_29", "type": "equation", "text": "2 def get_p_value(G):", "words": [{"w": "2", "b": [0.1028, 0.619, 0.1091, 0.6265]}, {"w": "def", "b": [0.1312, 0.6139, 0.1603, 0.6288]}, {"w": "get_p_value(G):", "b": [0.17, 0.6139, 0.3153, 0.6289]}]}, {"id": "b_30", "type": "equation", "text": "3 p_value = 1 - chi2.cdf(G, 1)", "words": [{"w": "3", "b": [0.1028, 0.637, 0.1091, 0.6444]}, {"w": "p_value", "b": [0.17, 0.6319, 0.2378, 0.6468]}, {"w": "=", "b": [0.2475, 0.6319, 0.2572, 0.6468]}, {"w": "1", "b": [0.2668, 0.6319, 0.2765, 0.6468]}, {"w": "-", "b": [0.2862, 0.6319, 0.2959, 0.6468]}, {"w": "chi2.cdf(G,", "b": [0.3056, 0.6319, 0.4121, 0.6468]}, {"w": "1)", "b": [0.4218, 0.6319, 0.4412, 0.6468]}]}, {"id": "b_31", "type": "equation", "text": "4 return p_value", "words": [{"w": "4", "b": [0.1028, 0.6549, 0.1091, 0.6624]}, {"w": "return", "b": [0.17, 0.6498, 0.2281, 0.6647]}, {"w": "p_value", "b": [0.2378, 0.6498, 0.3056, 0.6648]}]}, {"id": "b_32", "type": "paragraph", "text": "The following code will work for R:", "words": [{"w": "The", "b": [0.1306, 0.676, 0.1624, 0.6909]}, {"w": "following", "b": [0.1685, 0.676, 0.2403, 0.6909]}, {"w": "code", "b": [0.2464, 0.676, 0.2828, 0.6909]}, {"w": "will", "b": [0.289, 0.676, 0.3177, 0.6909]}, {"w": "work", "b": [0.3238, 0.676, 0.3628, 0.6909]}, {"w": "for", "b": [0.369, 0.676, 0.3911, 0.6909]}, {"w": "R:", "b": [0.3973, 0.676, 0.416, 0.6909]}]}, {"id": "b_33", "type": "equation", "text": "1 get_p_value <- function(G) {", "words": [{"w": "1", "b": [0.1028, 0.7087, 0.1091, 0.7162]}, {"w": "get_p_value", "b": [0.1312, 0.7037, 0.2378, 0.7186]}, {"w": "<-", "b": [0.2475, 0.7037, 0.2668, 0.7186]}, {"w": "function(G)", "b": [0.2765, 0.7036, 0.3831, 0.7186]}, {"w": "{", "b": [0.3928, 0.7037, 0.4024, 0.7186]}]}, {"id": "b_34", "type": "equation", "text": "2 p_value <- pchisq(G, df=1, lower.tail=FALSE)", "words": [{"w": "2", "b": [0.1028, 0.7267, 0.1091, 0.7342]}, {"w": "p_value", "b": [0.1506, 0.7216, 0.2184, 0.7366]}, {"w": "<-", "b": [0.2281, 0.7216, 0.2475, 0.7366]}, {"w": "pchisq(G,", "b": [0.2571, 0.7215, 0.3443, 0.7366]}, {"w": "df=1,", "b": [0.354, 0.7216, 0.4024, 0.7366]}, {"w": "lower.tail=FALSE)", "b": [0.4121, 0.7216, 0.5768, 0.7366]}]}, {"id": "b_35", "type": "equation", "text": "3 return(p_value)", "words": [{"w": "3", "b": [0.1028, 0.7446, 0.1091, 0.7521]}, {"w": "return(p_value)", "b": [0.1506, 0.7395, 0.2959, 0.7545]}]}, {"id": "b_36", "type": "equation", "text": "4 }", "words": [{"w": "4", "b": [0.1028, 0.7626, 0.1091, 0.7701]}, {"w": "}", "b": [0.1312, 0.7575, 0.1409, 0.7725]}]}, {"id": "b_37", "type": "paragraph", "text": "Statistically, the result of the G-test is valid if we have at least 10 “yes” and “no” results in each of the two groups, though this estimate should be taken with a grain of salt. If testing is not too expensive, then having about 1000 “yes” and “no” results in each of the two groups,", "words": [{"w": "Statistically,", "b": [0.1312, 0.7837, 0.2305, 0.7986]}, {"w": "the", "b": [0.2366, 0.7837, 0.2622, 0.7986]}, {"w": "result", "b": [0.2684, 0.7837, 0.3135, 0.7986]}, {"w": "of", "b": [0.3197, 0.7837, 0.3345, 0.7986]}, {"w": "the", "b": [0.3406, 0.7837, 0.3662, 0.7986]}, {"w": "G-test", "b": [0.3723, 0.7837, 0.4227, 0.7986]}, {"w": "is", "b": [0.4288, 0.7837, 0.4412, 0.7986]}, {"w": "valid", "b": [0.4473, 0.7837, 0.4857, 0.7986]}, {"w": "if", "b": [0.4918, 0.7837, 0.5026, 0.7986]}, {"w": "we", "b": [0.5087, 0.7837, 0.5296, 0.7986]}, {"w": "have", "b": [0.5358, 0.7837, 0.5721, 0.7986]}, {"w": "at", "b": [0.5782, 0.7837, 0.5946, 0.7986]}, {"w": "least", "b": [0.6007, 0.7837, 0.6377, 0.7986]}, {"w": "10", "b": [0.6435, 0.7837, 0.6619, 0.7986]}, {"w": "“yes”", "b": [0.6681, 0.7837, 0.7101, 0.7986]}, {"w": "and", "b": [0.7162, 0.7837, 0.7459, 0.7986]}, {"w": "“no”", "b": [0.752, 0.7837, 0.7888, 0.7986]}, {"w": "results", "b": [0.795, 0.7837, 0.8474, 0.7986]}, {"w": "in", "b": [0.8535, 0.7837, 0.8689, 0.7986]}, {"w": "each", "b": [0.1312, 0.8017, 0.1659, 0.8165]}, {"w": "of", "b": [0.1715, 0.8017, 0.1861, 0.8165]}, {"w": "the", "b": [0.1917, 0.8017, 0.2169, 0.8165]}, {"w": "two", "b": [0.2225, 0.8017, 0.2506, 0.8165]}, {"w": "groups,", "b": [0.2563, 0.8017, 0.3137, 0.8165]}, {"w": "though", "b": [0.3194, 0.8017, 0.3747, 0.8165]}, {"w": "this", "b": [0.3803, 0.8017, 0.4096, 0.8165]}, {"w": "estimate", "b": [0.4152, 0.8017, 0.4816, 0.8165]}, {"w": "should", "b": [0.4873, 0.8017, 0.5386, 0.8165]}, {"w": "be", "b": [0.5443, 0.8017, 0.5629, 0.8165]}, {"w": "taken", "b": [0.5685, 0.8017, 0.6117, 0.8165]}, {"w": "with", "b": [0.6174, 0.8017, 0.6525, 0.8165]}, {"w": "a", "b": [0.6582, 0.8017, 0.6672, 0.8165]}, {"w": "grain", "b": [0.6728, 0.8017, 0.7131, 0.8165]}, {"w": "of", "b": [0.7187, 0.8017, 0.7333, 0.8165]}, {"w": "salt.", "b": [0.7389, 0.8017, 0.7722, 0.8165]}, {"w": "If", "b": [0.7802, 0.8017, 0.7923, 0.8165]}, {"w": "testing", "b": [0.7979, 0.8017, 0.8513, 0.8165]}, {"w": "is", "b": [0.8569, 0.8017, 0.8691, 0.8165]}, {"w": "not", "b": [0.1312, 0.8196, 0.1577, 0.8345]}, {"w": "too", "b": [0.1638, 0.8196, 0.1897, 0.8345]}, {"w": "expensive,", "b": [0.1959, 0.8196, 0.2773, 0.8345]}, {"w": "then", "b": [0.2835, 0.8196, 0.3191, 0.8345]}, {"w": "having", "b": [0.3252, 0.8196, 0.3781, 0.8345]}, {"w": "about", "b": [0.3842, 0.8196, 0.4304, 0.8345]}, {"w": "1000", "b": [0.4365, 0.8196, 0.473, 0.8345]}, {"w": "“yes”", "b": [0.4792, 0.8196, 0.521, 0.8345]}, {"w": "and", "b": [0.5271, 0.8196, 0.5566, 0.8345]}, {"w": "“no”", "b": [0.5628, 0.8196, 0.5993, 0.8345]}, {"w": "results", "b": [0.6055, 0.8196, 0.6576, 0.8345]}, {"w": "in", "b": [0.6637, 0.8196, 0.679, 0.8345]}, {"w": "each", "b": [0.6851, 0.8196, 0.7202, 0.8345]}, {"w": "of", "b": [0.7264, 0.8196, 0.7411, 0.8345]}, {"w": "the", "b": [0.7473, 0.8196, 0.7727, 0.8345]}, {"w": "two", "b": [0.7788, 0.8196, 0.8073, 0.8345]}, {"w": "groups,", "b": [0.8134, 0.8196, 0.8715, 0.8345]}]}, {"id": "b_38", "type": "paragraph", "text": "1More details on the derivation of the above formula can be found in a statistics textbook or on Wikipedia.", "words": [{"w": "1More", "b": [0.1518, 0.8463, 0.194, 0.8601]}, {"w": "details", "b": [0.1987, 0.8483, 0.2423, 0.8601]}, {"w": "on", "b": [0.247, 0.8483, 0.2632, 0.8601]}, {"w": "the", "b": [0.2678, 0.8483, 0.2892, 0.8601]}, {"w": "derivation", "b": [0.2938, 0.8483, 0.3608, 0.8601]}, {"w": "of", "b": [0.3655, 0.8483, 0.3779, 0.8601]}, {"w": "the", "b": [0.3826, 0.8483, 0.4039, 0.8601]}, {"w": "above", "b": [0.4085, 0.8483, 0.447, 0.8601]}, {"w": "formula", "b": [0.4516, 0.8483, 0.5028, 0.8601]}, {"w": "can", "b": [0.5075, 0.8483, 0.5305, 0.8601]}, {"w": "be", "b": [0.5352, 0.8483, 0.551, 0.8601]}, {"w": "found", "b": [0.5557, 0.8483, 0.5936, 0.8601]}, {"w": "in", "b": [0.5983, 0.8483, 0.6111, 0.8601]}, {"w": "a", "b": [0.6158, 0.8483, 0.6235, 0.8601]}, {"w": "statistics", "b": [0.6281, 0.8483, 0.6873, 0.8601]}, {"w": "textbook", "b": [0.6919, 0.8483, 0.7517, 0.8601]}, {"w": "or", "b": [0.7564, 0.8483, 0.77, 0.8601]}, {"w": "on", "b": [0.7747, 0.8483, 0.7909, 0.8601]}, {"w": "Wikipedia.", "b": [0.7956, 0.8483, 0.8685, 0.8601]}]}, {"id": "b_39", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "8", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 226, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "with at least 100 answers of each type in each group, should be enough. Note that the total number of answers in the two groups can be different.", "words": [{"w": "with", "b": [0.1306, 0.0884, 0.1662, 0.1033]}, {"w": "at", "b": [0.1723, 0.0884, 0.1886, 0.1033]}, {"w": "least", "b": [0.1948, 0.0884, 0.2315, 0.1033]}, {"w": "100", "b": [0.2376, 0.0884, 0.2651, 0.1033]}, {"w": "answers", "b": [0.2712, 0.0884, 0.333, 0.1033]}, {"w": "of", "b": [0.3392, 0.0884, 0.3539, 0.1033]}, {"w": "each", "b": [0.3601, 0.0884, 0.3952, 0.1033]}, {"w": "type", "b": [0.4013, 0.0884, 0.4364, 0.1033]}, {"w": "in", "b": [0.4426, 0.0884, 0.4579, 0.1033]}, {"w": "each", "b": [0.464, 0.0884, 0.4991, 0.1033]}, {"w": "group,", "b": [0.5053, 0.0884, 0.5562, 0.1033]}, {"w": "should", "b": [0.5624, 0.0884, 0.6144, 0.1033]}, {"w": "be", "b": [0.6205, 0.0884, 0.6394, 0.1033]}, {"w": "enough.", "b": [0.6455, 0.0884, 0.7076, 0.1033]}, {"w": "Note", "b": [0.7158, 0.0884, 0.7539, 0.1033]}, {"w": "that", "b": [0.7601, 0.0884, 0.7937, 0.1033]}, {"w": "the", "b": [0.7998, 0.0884, 0.8253, 0.1033]}, {"w": "total", "b": [0.8314, 0.0884, 0.869, 0.1033]}, {"w": "number", "b": [0.1312, 0.1063, 0.1923, 0.1213]}, {"w": "of", "b": [0.1984, 0.1063, 0.2133, 0.1213]}, {"w": "answers", "b": [0.2195, 0.1063, 0.2818, 0.1213]}, {"w": "in", "b": [0.2879, 0.1063, 0.3033, 0.1213]}, {"w": "the", "b": [0.3095, 0.1063, 0.3351, 0.1213]}, {"w": "two", "b": [0.3412, 0.1063, 0.3699, 0.1213]}, {"w": "groups", "b": [0.3761, 0.1063, 0.4296, 0.1213]}, {"w": "can", "b": [0.4357, 0.1063, 0.4634, 0.1213]}, {"w": "be", "b": [0.4696, 0.1063, 0.4885, 0.1213]}, {"w": "different.", "b": [0.4947, 0.1063, 0.5665, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "If you can’t reach at least 100 answers of each type in each group at a reasonable cost, you can use an approximation of the p-value of a very similar test using Monte-Carlo simulation.", "words": [{"w": "If", "b": [0.1312, 0.1334, 0.1433, 0.1482]}, {"w": "you", "b": [0.1484, 0.1334, 0.1766, 0.1482]}, {"w": "can’t", "b": [0.1817, 0.1334, 0.2209, 0.1482]}, {"w": "reach", "b": [0.2261, 0.1334, 0.2678, 0.1482]}, {"w": "at", "b": [0.273, 0.1334, 0.289, 0.1482]}, {"w": "least", "b": [0.2942, 0.1334, 0.3305, 0.1482]}, {"w": "100", "b": [0.3355, 0.1334, 0.3627, 0.1482]}, {"w": "answers", "b": [0.3678, 0.1334, 0.4288, 0.1482]}, {"w": "of", "b": [0.434, 0.1334, 0.4486, 0.1482]}, {"w": "each", "b": [0.4537, 0.1334, 0.4884, 0.1482]}, {"w": "type", "b": [0.4935, 0.1334, 0.5282, 0.1482]}, {"w": "in", "b": [0.5334, 0.1334, 0.5484, 0.1482]}, {"w": "each", "b": [0.5536, 0.1334, 0.5883, 0.1482]}, {"w": "group", "b": [0.5934, 0.1334, 0.6387, 0.1482]}, {"w": "at", "b": [0.6438, 0.1334, 0.6599, 0.1482]}, {"w": "a", "b": [0.6651, 0.1334, 0.6741, 0.1482]}, {"w": "reasonable", "b": [0.6793, 0.1334, 0.7618, 0.1482]}, {"w": "cost,", "b": [0.767, 0.1334, 0.8033, 0.1482]}, {"w": "you", "b": [0.8086, 0.1334, 0.8367, 0.1482]}, {"w": "can", "b": [0.8419, 0.1334, 0.869, 0.1482]}, {"w": "use", "b": [0.1312, 0.1513, 0.1568, 0.1661]}, {"w": "an", "b": [0.1629, 0.1513, 0.1823, 0.1661]}, {"w": "approximation", "b": [0.1884, 0.1513, 0.3044, 0.1661]}, {"w": "of", "b": [0.3106, 0.1513, 0.3253, 0.1661]}, {"w": "the", "b": [0.3315, 0.1513, 0.3569, 0.1661]}, {"w": "p-value", "b": [0.3629, 0.1512, 0.4195, 0.1661]}, {"w": "of", "b": [0.4257, 0.1513, 0.4404, 0.1661]}, {"w": "a", "b": [0.4466, 0.1513, 0.4557, 0.1661]}, {"w": "very", "b": [0.4619, 0.1513, 0.496, 0.1661]}, {"w": "similar", "b": [0.5021, 0.1513, 0.5562, 0.1661]}, {"w": "test", "b": [0.5624, 0.1513, 0.592, 0.1661]}, {"w": "using", "b": [0.5981, 0.1513, 0.6399, 0.1661]}, {"w": "Monte-Carlo", "b": [0.6462, 0.1512, 0.7641, 0.1662]}, {"w": "simulation.", "b": [0.7712, 0.1512, 0.8722, 0.1662]}]}, {"id": "b_2", "type": "paragraph", "text": "The following code will work for R:", "words": [{"w": "The", "b": [0.1306, 0.1781, 0.1624, 0.1931]}, {"w": "following", "b": [0.1685, 0.1781, 0.2403, 0.1931]}, {"w": "code", "b": [0.2464, 0.1781, 0.2828, 0.1931]}, {"w": "will", "b": [0.289, 0.1781, 0.3177, 0.1931]}, {"w": "work", "b": [0.3238, 0.1781, 0.3628, 0.1931]}, {"w": "for", "b": [0.369, 0.1781, 0.3911, 0.1931]}, {"w": "R:", "b": [0.3973, 0.1781, 0.416, 0.1931]}]}, {"id": "b_3", "type": "equation", "text": "1 p_value <- chisq.test(x,", "words": [{"w": "1", "b": [0.1028, 0.2109, 0.1091, 0.2184]}, {"w": "p_value", "b": [0.1312, 0.2058, 0.199, 0.2208]}, {"w": "<-", "b": [0.2087, 0.2058, 0.2281, 0.2208]}, {"w": "chisq.test(x,", "b": [0.2378, 0.2057, 0.3637, 0.2208]}]}, {"id": "b_4", "type": "equation", "text": "2 simulate.p.value = TRUE)$p.value", "words": [{"w": "2", "b": [0.1028, 0.2288, 0.1091, 0.2363]}, {"w": "simulate.p.value", "b": [0.2378, 0.2238, 0.3928, 0.2387]}, {"w": "=", "b": [0.4024, 0.2238, 0.4121, 0.2387]}, {"w": "TRUE)$p.value", "b": [0.4218, 0.2238, 0.5477, 0.2387]}]}, {"id": "b_5", "type": "equation", "text": "3 }", "words": [{"w": "3", "b": [0.1028, 0.2468, 0.1091, 0.2543]}, {"w": "}", "b": [0.1312, 0.2416, 0.1409, 0.2566]}]}, {"id": "b_6", "type": "paragraph", "text": "Where x is the 2 × 2 contingency table shown in Figure 3.", "words": [{"w": "Where", "b": [0.1303, 0.2679, 0.1832, 0.2828]}, {"w": "x", "b": [0.1893, 0.2678, 0.1998, 0.2828]}, {"w": "is", "b": [0.206, 0.2679, 0.2184, 0.2828]}, {"w": "the", "b": [0.2245, 0.2679, 0.2502, 0.2828]}, {"w": "2", "b": [0.2563, 0.2679, 0.2655, 0.2828]}, {"w": "×", "b": [0.2696, 0.2676, 0.284, 0.2826]}, {"w": "2", "b": [0.2881, 0.2679, 0.2973, 0.2828]}, {"w": "contingency", "b": [0.3034, 0.2679, 0.3988, 0.2828]}, {"w": "table", "b": [0.405, 0.2679, 0.445, 0.2828]}, {"w": "shown", "b": [0.4511, 0.2679, 0.501, 0.2828]}, {"w": "in", "b": [0.5071, 0.2679, 0.5225, 0.2828]}, {"w": "Figure", "b": [0.5286, 0.2679, 0.5807, 0.2828]}, {"w": "3.", "b": [0.5869, 0.2679, 0.6012, 0.2828]}]}, {"id": "b_7", "type": "paragraph", "text": "Note that it is possible to test more than two models (e.g. models A, B, and C) and more than two possible answers to the question that define our metric (e.g., “yes,” “no,” “maybe”). If we want to test k different models and l different possible answers, the G statistic would follow a chi-square distribution with (k −1) × (l −1) degrees of freedom. The problem here is that a test with multiple models and answers will tell you whether there is something different somewhere between your models, but it will not tell you where is the difference. In practice, it is easier to compare your current model with only one new model and to formulate a question metric with a binary answer. More complex experiment testing is outside the scope of this book.", "words": [{"w": "Note", "b": [0.1312, 0.2947, 0.1704, 0.3098]}, {"w": "that", "b": [0.1765, 0.2947, 0.211, 0.3098]}, {"w": "it", "b": [0.2171, 0.2947, 0.2296, 0.3098]}, {"w": "is", "b": [0.2358, 0.2947, 0.2484, 0.3098]}, {"w": "possible", "b": [0.2545, 0.2947, 0.319, 0.3098]}, {"w": "to", "b": [0.3251, 0.2947, 0.3418, 0.3098]}, {"w": "test", "b": [0.3479, 0.2947, 0.3783, 0.3098]}, {"w": "more", "b": [0.3845, 0.2947, 0.4252, 0.3098]}, {"w": "than", "b": [0.4314, 0.2947, 0.4689, 0.3098]}, {"w": "two", "b": [0.4751, 0.2947, 0.5043, 0.3098]}, {"w": "models", "b": [0.5104, 0.2947, 0.5674, 0.3098]}, {"w": "(e.g.", "b": [0.5736, 0.2947, 0.6091, 0.3098]}, {"w": "models", "b": [0.6152, 0.2947, 0.6722, 0.3098]}, {"w": "A,", "b": [0.6783, 0.2947, 0.6976, 0.3098]}, {"w": "B,", "b": [0.7038, 0.2947, 0.7223, 0.3098]}, {"w": "and", "b": [0.7284, 0.2947, 0.7587, 0.3098]}, {"w": "C)", "b": [0.7648, 0.2947, 0.7857, 0.3098]}, {"w": "and", "b": [0.7918, 0.2947, 0.8221, 0.3098]}, {"w": "more", "b": [0.8283, 0.2947, 0.869, 0.3098]}, {"w": "than", "b": [0.1312, 0.3128, 0.1674, 0.3277]}, {"w": "two", "b": [0.1734, 0.3128, 0.2015, 0.3277]}, {"w": "possible", "b": [0.2074, 0.3128, 0.2695, 0.3277]}, {"w": "answers", "b": [0.2754, 0.3128, 0.3365, 0.3277]}, {"w": "to", "b": [0.3424, 0.3128, 0.3585, 0.3277]}, {"w": "the", "b": [0.3645, 0.3128, 0.3896, 0.3277]}, {"w": "question", "b": [0.3955, 0.3128, 0.4615, 0.3277]}, {"w": "that", "b": [0.4674, 0.3128, 0.5006, 0.3277]}, {"w": "define", "b": [0.5065, 0.3128, 0.5528, 0.3277]}, {"w": "our", "b": [0.5587, 0.3128, 0.5849, 0.3277]}, {"w": "metric", "b": [0.5909, 0.3128, 0.6412, 0.3277]}, {"w": "(e.g.,", "b": [0.6471, 0.3128, 0.6863, 0.3277]}, {"w": "“yes,”", "b": [0.6923, 0.3128, 0.7386, 0.3277]}, {"w": "“no,”", "b": [0.7446, 0.3128, 0.7858, 0.3277]}, {"w": "“maybe”).", "b": [0.7918, 0.3128, 0.8727, 0.3277]}, {"w": "If", "b": [0.1312, 0.3306, 0.1436, 0.3456]}, {"w": "we", "b": [0.1497, 0.3306, 0.1709, 0.3456]}, {"w": "want", "b": [0.177, 0.3306, 0.2162, 0.3456]}, {"w": "to", "b": [0.2223, 0.3306, 0.2388, 0.3456]}, {"w": "test", "b": [0.245, 0.3306, 0.275, 0.3456]}, {"w": "k", "b": [0.2811, 0.3307, 0.2907, 0.3456]}, {"w": "different", "b": [0.2974, 0.3306, 0.3645, 0.3456]}, {"w": "models", "b": [0.3707, 0.3306, 0.427, 0.3456]}, {"w": "and", "b": [0.4331, 0.3306, 0.463, 0.3456]}, {"w": "l", "b": [0.4691, 0.3307, 0.4746, 0.3456]}, {"w": "different", "b": [0.4811, 0.3306, 0.5482, 0.3456]}, {"w": "possible", "b": [0.5544, 0.3306, 0.618, 0.3456]}, {"w": "answers,", "b": [0.6241, 0.3306, 0.692, 0.3456]}, {"w": "the", "b": [0.6981, 0.3306, 0.7239, 0.3456]}, {"w": "G", "b": [0.7299, 0.3307, 0.7444, 0.3456]}, {"w": "statistic", "b": [0.7505, 0.3306, 0.8147, 0.3456]}, {"w": "would", "b": [0.8209, 0.3306, 0.8688, 0.3456]}, {"w": "follow", "b": [0.1312, 0.3487, 0.178, 0.3636]}, {"w": "a", "b": [0.1842, 0.3487, 0.1933, 0.3636]}, {"w": "chi-square", "b": [0.1995, 0.3487, 0.28, 0.3636]}, {"w": "distribution", "b": [0.2861, 0.3487, 0.3799, 0.3636]}, {"w": "with", "b": [0.386, 0.3487, 0.4216, 0.3636]}, {"w": "(k", "b": [0.4276, 0.3486, 0.4444, 0.3636]}, {"w": "−1)", "b": [0.449, 0.3484, 0.4837, 0.3636]}, {"w": "×", "b": [0.4878, 0.3484, 0.5022, 0.3634]}, {"w": "(l", "b": [0.5063, 0.3486, 0.5189, 0.3636]}, {"w": "−1)", "b": [0.5233, 0.3484, 0.5581, 0.3636]}, {"w": "degrees", "b": [0.5642, 0.3487, 0.6224, 0.3636]}, {"w": "of", "b": [0.6285, 0.3487, 0.6433, 0.3636]}, {"w": "freedom.", "b": [0.6494, 0.3487, 0.7181, 0.3636]}, {"w": "The", "b": [0.7263, 0.3487, 0.7579, 0.3636]}, {"w": "problem", "b": [0.764, 0.3487, 0.8292, 0.3636]}, {"w": "here", "b": [0.8353, 0.3487, 0.8689, 0.3636]}, {"w": "is", "b": [0.1312, 0.3665, 0.1439, 0.3816]}, {"w": "that", "b": [0.151, 0.3665, 0.1855, 0.3816]}, {"w": "a", "b": [0.1926, 0.3665, 0.202, 0.3816]}, {"w": "test", "b": [0.2092, 0.3665, 0.2396, 0.3816]}, {"w": "with", "b": [0.2467, 0.3665, 0.2833, 0.3816]}, {"w": "multiple", "b": [0.2904, 0.3665, 0.3579, 0.3816]}, {"w": "models", "b": [0.365, 0.3665, 0.4221, 0.3816]}, {"w": "and", "b": [0.4292, 0.3665, 0.4596, 0.3816]}, {"w": "answers", "b": [0.4667, 0.3665, 0.5303, 0.3816]}, {"w": "will", "b": [0.5374, 0.3665, 0.5666, 0.3816]}, {"w": "tell", "b": [0.5738, 0.3665, 0.5999, 0.3816]}, {"w": "you", "b": [0.607, 0.3665, 0.6363, 0.3816]}, {"w": "whether", "b": [0.6434, 0.3665, 0.7094, 0.3816]}, {"w": "there", "b": [0.7165, 0.3665, 0.7584, 0.3816]}, {"w": "is", "b": [0.7655, 0.3665, 0.7782, 0.3816]}, {"w": "something", "b": [0.7853, 0.3665, 0.8691, 0.3816]}, {"w": "different", "b": [0.1312, 0.3846, 0.1973, 0.3995]}, {"w": "somewhere", "b": [0.2035, 0.3846, 0.29, 0.3995]}, {"w": "between", "b": [0.2961, 0.3846, 0.3607, 0.3995]}, {"w": "your", "b": [0.3668, 0.3846, 0.4024, 0.3995]}, {"w": "models,", "b": [0.4085, 0.3846, 0.4691, 0.3995]}, {"w": "but", "b": [0.4753, 0.3846, 0.5027, 0.3995]}, {"w": "it", "b": [0.5088, 0.3846, 0.521, 0.3995]}, {"w": "will", "b": [0.5271, 0.3846, 0.5556, 0.3995]}, {"w": "not", "b": [0.5617, 0.3846, 0.5881, 0.3995]}, {"w": "tell", "b": [0.5943, 0.3846, 0.6197, 0.3995]}, {"w": "you", "b": [0.6258, 0.3846, 0.6543, 0.3995]}, {"w": "where", "b": [0.6604, 0.3846, 0.7072, 0.3995]}, {"w": "is", "b": [0.7133, 0.3846, 0.7256, 0.3995]}, {"w": "the", "b": [0.7318, 0.3846, 0.7572, 0.3995]}, {"w": "difference.", "b": [0.7633, 0.3846, 0.8442, 0.3995]}, {"w": "In", "b": [0.8524, 0.3846, 0.8691, 0.3995]}, {"w": "practice,", "b": [0.1312, 0.4026, 0.1986, 0.4174]}, {"w": "it", "b": [0.2041, 0.4026, 0.2161, 0.4174]}, {"w": "is", "b": [0.2214, 0.4026, 0.2335, 0.4174]}, {"w": "easier", "b": [0.2388, 0.4026, 0.2832, 0.4174]}, {"w": "to", "b": [0.2884, 0.4026, 0.3045, 0.4174]}, {"w": "compare", "b": [0.3097, 0.4026, 0.3761, 0.4174]}, {"w": "your", "b": [0.3813, 0.4026, 0.4165, 0.4174]}, {"w": "current", "b": [0.4218, 0.4026, 0.4787, 0.4174]}, {"w": "model", "b": [0.4839, 0.4026, 0.5317, 0.4174]}, {"w": "with", "b": [0.5369, 0.4026, 0.5721, 0.4174]}, {"w": "only", "b": [0.5773, 0.4026, 0.611, 0.4174]}, {"w": "one", "b": [0.6162, 0.4026, 0.6434, 0.4174]}, {"w": "new", "b": [0.6486, 0.4026, 0.6798, 0.4174]}, {"w": "model", "b": [0.685, 0.4026, 0.7327, 0.4174]}, {"w": "and", "b": [0.738, 0.4026, 0.7671, 0.4174]}, {"w": "to", "b": [0.7724, 0.4026, 0.7884, 0.4174]}, {"w": "formulate", "b": [0.7937, 0.4026, 0.8691, 0.4174]}, {"w": "a", "b": [0.1312, 0.4203, 0.1406, 0.4354]}, {"w": "question", "b": [0.1475, 0.4203, 0.2161, 0.4354]}, {"w": "metric", "b": [0.223, 0.4203, 0.2753, 0.4354]}, {"w": "with", "b": [0.2822, 0.4203, 0.3188, 0.4354]}, {"w": "a", "b": [0.3257, 0.4203, 0.3351, 0.4354]}, {"w": "binary", "b": [0.342, 0.4203, 0.3948, 0.4354]}, {"w": "answer.", "b": [0.4017, 0.4203, 0.4631, 0.4354]}, {"w": "More", "b": [0.4734, 0.4203, 0.5158, 0.4354]}, {"w": "complex", "b": [0.5227, 0.4203, 0.5901, 0.4354]}, {"w": "experiment", "b": [0.597, 0.4203, 0.6886, 0.4354]}, {"w": "testing", "b": [0.6955, 0.4203, 0.751, 0.4354]}, {"w": "is", "b": [0.7579, 0.4203, 0.7705, 0.4354]}, {"w": "outside", "b": [0.7774, 0.4203, 0.8361, 0.4354]}, {"w": "the", "b": [0.843, 0.4203, 0.8691, 0.4354]}, {"w": "scope", "b": [0.1312, 0.4384, 0.1749, 0.4533]}, {"w": "of", "b": [0.1811, 0.4384, 0.196, 0.4533]}, {"w": "this", "b": [0.2021, 0.4384, 0.2319, 0.4533]}, {"w": "book.", "b": [0.2381, 0.4384, 0.2827, 0.4533]}]}, {"id": "b_8", "type": "paragraph", "text": "Note that it could be tempting, when we have more than two models, to do binary comparisons of pairs of models using a test designed for comparing two models. This is not recommended, however, as it could be scientifically wrong. It’s better to consult a statistician.", "words": [{"w": "Note", "b": [0.1312, 0.4654, 0.1689, 0.4802]}, {"w": "that", "b": [0.1735, 0.4654, 0.2067, 0.4802]}, {"w": "it", "b": [0.2113, 0.4654, 0.2233, 0.4802]}, {"w": "could", "b": [0.2279, 0.4654, 0.2701, 0.4802]}, {"w": "be", "b": [0.2747, 0.4654, 0.2933, 0.4802]}, {"w": "tempting,", "b": [0.2979, 0.4654, 0.3743, 0.4802]}, {"w": "when", "b": [0.3792, 0.4654, 0.4204, 0.4802]}, {"w": "we", "b": [0.425, 0.4654, 0.4456, 0.4802]}, {"w": "have", "b": [0.4502, 0.4654, 0.4859, 0.4802]}, {"w": "more", "b": [0.4905, 0.4654, 0.5297, 0.4802]}, {"w": "than", "b": [0.5343, 0.4654, 0.5705, 0.4802]}, {"w": "two", "b": [0.5751, 0.4654, 0.6031, 0.4802]}, {"w": "models,", "b": [0.6078, 0.4654, 0.6677, 0.4802]}, {"w": "to", "b": [0.6726, 0.4654, 0.6886, 0.4802]}, {"w": "do", "b": [0.6932, 0.4654, 0.7123, 0.4802]}, {"w": "binary", "b": [0.7169, 0.4654, 0.7677, 0.4802]}, {"w": "comparisons", "b": [0.7723, 0.4654, 0.869, 0.4802]}, {"w": "of", "b": [0.1312, 0.4833, 0.1458, 0.4981]}, {"w": "pairs", "b": [0.1518, 0.4833, 0.1901, 0.4981]}, {"w": "of", "b": [0.1961, 0.4833, 0.2107, 0.4981]}, {"w": "models", "b": [0.2166, 0.4833, 0.2715, 0.4981]}, {"w": "using", "b": [0.2775, 0.4833, 0.3188, 0.4981]}, {"w": "a", "b": [0.3248, 0.4833, 0.3338, 0.4981]}, {"w": "test", "b": [0.3398, 0.4833, 0.369, 0.4981]}, {"w": "designed", "b": [0.375, 0.4833, 0.4424, 0.4981]}, {"w": "for", "b": [0.4484, 0.4833, 0.4701, 0.4981]}, {"w": "comparing", "b": [0.476, 0.4833, 0.5585, 0.4981]}, {"w": "two", "b": [0.5645, 0.4833, 0.5926, 0.4981]}, {"w": "models.", "b": [0.5985, 0.4833, 0.6584, 0.4981]}, {"w": "This", "b": [0.6666, 0.4833, 0.7018, 0.4981]}, {"w": "is", "b": [0.7078, 0.4833, 0.72, 0.4981]}, {"w": "not", "b": [0.7259, 0.4833, 0.7521, 0.4981]}, {"w": "recommended,", "b": [0.758, 0.4833, 0.8717, 0.4981]}, {"w": "however,", "b": [0.1312, 0.5012, 0.201, 0.5161]}, {"w": "as", "b": [0.2072, 0.5012, 0.2237, 0.5161]}, {"w": "it", "b": [0.2298, 0.5012, 0.2421, 0.5161]}, {"w": "could", "b": [0.2483, 0.5012, 0.2914, 0.5161]}, {"w": "be", "b": [0.2975, 0.5012, 0.3165, 0.5161]}, {"w": "scientifically", "b": [0.3226, 0.5012, 0.4212, 0.5161]}, {"w": "wrong.", "b": [0.4274, 0.5012, 0.4818, 0.5161]}, {"w": "It’s", "b": [0.4899, 0.5012, 0.5162, 0.5161]}, {"w": "better", "b": [0.5223, 0.5012, 0.5711, 0.5161]}, {"w": "to", "b": [0.5773, 0.5012, 0.5937, 0.5161]}, {"w": "consult", "b": [0.5998, 0.5012, 0.6574, 0.5161]}, {"w": "a", "b": [0.6635, 0.5012, 0.6727, 0.5161]}, {"w": "statistician.", "b": [0.6789, 0.5012, 0.7724, 0.5161]}]}, {"id": "b_9", "type": "equation", "text": "7.2.2 Z-Test", "words": [{"w": "7.2.2", "b": [0.1312, 0.549, 0.1749, 0.564]}, {"w": "Z-Test", "b": [0.1961, 0.549, 0.2555, 0.564]}]}, {"id": "b_10", "type": "paragraph", "text": "The second formulation of A/B test applies when the question for each user is, “How many?” or, “How much?” (as opposed to a yes-or-no question considered in the previous subsection). Examples of questions include:", "words": [{"w": "The", "b": [0.1306, 0.5857, 0.1617, 0.6005]}, {"w": "second", "b": [0.1678, 0.5857, 0.2202, 0.6005]}, {"w": "formulation", "b": [0.2263, 0.5857, 0.3178, 0.6005]}, {"w": "of", "b": [0.3238, 0.5857, 0.3384, 0.6005]}, {"w": "A/B", "b": [0.3445, 0.5857, 0.3799, 0.6005]}, {"w": "test", "b": [0.386, 0.5857, 0.4152, 0.6005]}, {"w": "applies", "b": [0.4213, 0.5857, 0.4757, 0.6005]}, {"w": "when", "b": [0.4818, 0.5857, 0.523, 0.6005]}, {"w": "the", "b": [0.5291, 0.5857, 0.5542, 0.6005]}, {"w": "question", "b": [0.5603, 0.5857, 0.6262, 0.6005]}, {"w": "for", "b": [0.6323, 0.5857, 0.654, 0.6005]}, {"w": "each", "b": [0.6601, 0.5857, 0.6947, 0.6005]}, {"w": "user", "b": [0.7008, 0.5857, 0.7332, 0.6005]}, {"w": "is,", "b": [0.7393, 0.5857, 0.7564, 0.6005]}, {"w": "“How", "b": [0.7625, 0.5857, 0.8062, 0.6005]}, {"w": "many?”", "b": [0.8123, 0.5857, 0.8726, 0.6005]}, {"w": "or,", "b": [0.1312, 0.6036, 0.1525, 0.6185]}, {"w": "“How", "b": [0.1586, 0.6036, 0.2025, 0.6185]}, {"w": "much?”", "b": [0.2087, 0.6036, 0.2682, 0.6185]}, {"w": "(as", "b": [0.2764, 0.6036, 0.2998, 0.6185]}, {"w": "opposed", "b": [0.3059, 0.6036, 0.3702, 0.6185]}, {"w": "to", "b": [0.3763, 0.6036, 0.3925, 0.6185]}, {"w": "a", "b": [0.3986, 0.6036, 0.4077, 0.6185]}, {"w": "yes-or-no", "b": [0.4138, 0.6036, 0.4857, 0.6185]}, {"w": "question", "b": [0.4918, 0.6036, 0.5581, 0.6185]}, {"w": "considered", "b": [0.5642, 0.6036, 0.6472, 0.6185]}, {"w": "in", "b": [0.6534, 0.6036, 0.6685, 0.6185]}, {"w": "the", "b": [0.6747, 0.6036, 0.6999, 0.6185]}, {"w": "previous", "b": [0.7061, 0.6036, 0.7724, 0.6185]}, {"w": "subsection).", "b": [0.7785, 0.6036, 0.8727, 0.6185]}, {"w": "Examples", "b": [0.1312, 0.6215, 0.209, 0.6364]}, {"w": "of", "b": [0.2152, 0.6215, 0.23, 0.6364]}, {"w": "questions", "b": [0.2362, 0.6215, 0.3107, 0.6364]}, {"w": "include:", "b": [0.3169, 0.6215, 0.3795, 0.6364]}]}, {"id": "b_11", "type": "paragraph", "text": "1. How much time a user has spent on the website during a session? 2. How much money a user has spent during a month? 3. How many news articles a user has read during a week?", "words": [{"w": "1.", "b": [0.1538, 0.6484, 0.1681, 0.6634]}, {"w": "How", "b": [0.1774, 0.6484, 0.2132, 0.6634]}, {"w": "much", "b": [0.2194, 0.6484, 0.2624, 0.6634]}, {"w": "time", "b": [0.2686, 0.6484, 0.3045, 0.6634]}, {"w": "a", "b": [0.3106, 0.6484, 0.3198, 0.6634]}, {"w": "user", "b": [0.326, 0.6484, 0.359, 0.6634]}, {"w": "has", "b": [0.3651, 0.6484, 0.3919, 0.6634]}, {"w": "spent", "b": [0.3981, 0.6484, 0.4412, 0.6634]}, {"w": "on", "b": [0.4474, 0.6484, 0.4669, 0.6634]}, {"w": "the", "b": [0.473, 0.6484, 0.4987, 0.6634]}, {"w": "website", "b": [0.5048, 0.6484, 0.5639, 0.6634]}, {"w": "during", "b": [0.57, 0.6484, 0.6224, 0.6634]}, {"w": "a", "b": [0.6285, 0.6484, 0.6378, 0.6634]}, {"w": "session?", "b": [0.6439, 0.6484, 0.7073, 0.6634]}, {"w": "2.", "b": [0.1538, 0.6664, 0.1681, 0.6813]}, {"w": "How", "b": [0.1774, 0.6664, 0.2132, 0.6813]}, {"w": "much", "b": [0.2194, 0.6664, 0.2624, 0.6813]}, {"w": "money", "b": [0.2686, 0.6664, 0.3214, 0.6813]}, {"w": "a", "b": [0.3275, 0.6664, 0.3368, 0.6813]}, {"w": "user", "b": [0.3429, 0.6664, 0.3759, 0.6813]}, {"w": "has", "b": [0.3821, 0.6664, 0.4088, 0.6813]}, {"w": "spent", "b": [0.415, 0.6664, 0.4582, 0.6813]}, {"w": "during", "b": [0.4643, 0.6664, 0.5167, 0.6813]}, {"w": "a", "b": [0.5228, 0.6664, 0.532, 0.6813]}, {"w": "month?", "b": [0.5382, 0.6664, 0.5987, 0.6813]}, {"w": "3.", "b": [0.1538, 0.6843, 0.1681, 0.6993]}, {"w": "How", "b": [0.1774, 0.6843, 0.2132, 0.6993]}, {"w": "many", "b": [0.2194, 0.6843, 0.2635, 0.6993]}, {"w": "news", "b": [0.2696, 0.6843, 0.3087, 0.6993]}, {"w": "articles", "b": [0.3148, 0.6843, 0.3724, 0.6993]}, {"w": "a", "b": [0.3786, 0.6843, 0.3878, 0.6993]}, {"w": "user", "b": [0.394, 0.6843, 0.4269, 0.6993]}, {"w": "has", "b": [0.4331, 0.6843, 0.4599, 0.6993]}, {"w": "read", "b": [0.466, 0.6843, 0.5009, 0.6993]}, {"w": "during", "b": [0.5071, 0.6843, 0.5594, 0.6993]}, {"w": "a", "b": [0.5656, 0.6843, 0.5748, 0.6993]}, {"w": "week?", "b": [0.581, 0.6843, 0.6286, 0.6993]}]}, {"id": "b_12", "type": "paragraph", "text": "For simplicity of illustration, let’s measure the time a user spends on a website where our model is deployed. As usual, users are routed to versions A and B of the website, where version A serves the old model and version B serves the new model. The null hypothesis is that users of both versions spend, on average, the same amount of time. The alternative hypothesis is that they spend more time on website B than on website A. Let nA be the number of users routed to version A and nB be the number of users routed to version B. Let i and j denote users from groups A and B respectively.", "words": [{"w": "For", "b": [0.1312, 0.7111, 0.1588, 0.7262]}, {"w": "simplicity", "b": [0.165, 0.7111, 0.2447, 0.7262]}, {"w": "of", "b": [0.2509, 0.7111, 0.2661, 0.7262]}, {"w": "illustration,", "b": [0.2724, 0.7111, 0.3677, 0.7262]}, {"w": "let’s", "b": [0.374, 0.7111, 0.4076, 0.7262]}, {"w": "measure", "b": [0.4138, 0.7111, 0.4809, 0.7262]}, {"w": "the", "b": [0.4872, 0.7111, 0.5134, 0.7262]}, {"w": "time", "b": [0.5196, 0.7111, 0.5562, 0.7262]}, {"w": "a", "b": [0.5625, 0.7111, 0.5719, 0.7262]}, {"w": "user", "b": [0.5782, 0.7111, 0.6118, 0.7262]}, {"w": "spends", "b": [0.6181, 0.7111, 0.6732, 0.7262]}, {"w": "on", "b": [0.6795, 0.7111, 0.6994, 0.7262]}, {"w": "a", "b": [0.7056, 0.7111, 0.715, 0.7262]}, {"w": "website", "b": [0.7213, 0.7111, 0.7816, 0.7262]}, {"w": "where", "b": [0.7878, 0.7111, 0.836, 0.7262]}, {"w": "our", "b": [0.8423, 0.7111, 0.8695, 0.7262]}, {"w": "model", "b": [0.1312, 0.7291, 0.1809, 0.7442]}, {"w": "is", "b": [0.1878, 0.7291, 0.2005, 0.7442]}, {"w": "deployed.", "b": [0.2074, 0.7291, 0.2843, 0.7442]}, {"w": "As", "b": [0.2948, 0.7291, 0.3163, 0.7442]}, {"w": "usual,", "b": [0.3233, 0.7291, 0.3715, 0.7442]}, {"w": "users", "b": [0.3786, 0.7291, 0.4197, 0.7442]}, {"w": "are", "b": [0.4266, 0.7291, 0.4517, 0.7442]}, {"w": "routed", "b": [0.4587, 0.7291, 0.5121, 0.7442]}, {"w": "to", "b": [0.519, 0.7291, 0.5357, 0.7442]}, {"w": "versions", "b": [0.5426, 0.7291, 0.6078, 0.7442]}, {"w": "A", "b": [0.6147, 0.7291, 0.6288, 0.7442]}, {"w": "and", "b": [0.6357, 0.7291, 0.666, 0.7442]}, {"w": "B", "b": [0.673, 0.7291, 0.6863, 0.7442]}, {"w": "of", "b": [0.6932, 0.7291, 0.7084, 0.7442]}, {"w": "the", "b": [0.7153, 0.7291, 0.7414, 0.7442]}, {"w": "website,", "b": [0.7484, 0.7291, 0.8138, 0.7442]}, {"w": "where", "b": [0.821, 0.7291, 0.8691, 0.7442]}, {"w": "version", "b": [0.1308, 0.7471, 0.1877, 0.7621]}, {"w": "A", "b": [0.1938, 0.7471, 0.2077, 0.7621]}, {"w": "serves", "b": [0.2139, 0.7471, 0.2616, 0.7621]}, {"w": "the", "b": [0.2678, 0.7471, 0.2936, 0.7621]}, {"w": "old", "b": [0.2997, 0.7471, 0.3245, 0.7621]}, {"w": "model", "b": [0.3306, 0.7471, 0.3796, 0.7621]}, {"w": "and", "b": [0.3857, 0.7471, 0.4157, 0.7621]}, {"w": "version", "b": [0.4218, 0.7471, 0.4787, 0.7621]}, {"w": "B", "b": [0.4849, 0.7471, 0.498, 0.7621]}, {"w": "serves", "b": [0.5042, 0.7471, 0.5519, 0.7621]}, {"w": "the", "b": [0.558, 0.7471, 0.5838, 0.7621]}, {"w": "new", "b": [0.59, 0.7471, 0.622, 0.7621]}, {"w": "model.", "b": [0.6281, 0.7471, 0.6823, 0.7621]}, {"w": "The", "b": [0.6905, 0.7471, 0.7224, 0.7621]}, {"w": "null", "b": [0.7286, 0.7471, 0.759, 0.7621]}, {"w": "hypothesis", "b": [0.7652, 0.7471, 0.8505, 0.7621]}, {"w": "is", "b": [0.8567, 0.7471, 0.8691, 0.7621]}, {"w": "that", "b": [0.1312, 0.765, 0.1657, 0.7801]}, {"w": "users", "b": [0.1725, 0.765, 0.2136, 0.7801]}, {"w": "of", "b": [0.2203, 0.765, 0.2355, 0.7801]}, {"w": "both", "b": [0.2422, 0.765, 0.2804, 0.7801]}, {"w": "versions", "b": [0.2871, 0.765, 0.3523, 0.7801]}, {"w": "spend,", "b": [0.359, 0.765, 0.4119, 0.7801]}, {"w": "on", "b": [0.4188, 0.765, 0.4387, 0.7801]}, {"w": "average,", "b": [0.4454, 0.765, 0.5119, 0.7801]}, {"w": "the", "b": [0.5188, 0.765, 0.545, 0.7801]}, {"w": "same", "b": [0.5517, 0.765, 0.5926, 0.7801]}, {"w": "amount", "b": [0.5993, 0.765, 0.6616, 0.7801]}, {"w": "of", "b": [0.6683, 0.765, 0.6835, 0.7801]}, {"w": "time.", "b": [0.6902, 0.765, 0.732, 0.7801]}, {"w": "The", "b": [0.742, 0.765, 0.7744, 0.7801]}, {"w": "alternative", "b": [0.7812, 0.765, 0.8691, 0.7801]}, {"w": "hypothesis", "b": [0.1312, 0.7829, 0.2178, 0.798]}, {"w": "is", "b": [0.2246, 0.7829, 0.2373, 0.798]}, {"w": "that", "b": [0.2441, 0.7829, 0.2786, 0.798]}, {"w": "they", "b": [0.2854, 0.7829, 0.3215, 0.798]}, {"w": "spend", "b": [0.3284, 0.7829, 0.3761, 0.798]}, {"w": "more", "b": [0.3829, 0.7829, 0.4238, 0.798]}, {"w": "time", "b": [0.4306, 0.7829, 0.4672, 0.798]}, {"w": "on", "b": [0.474, 0.7829, 0.4939, 0.798]}, {"w": "website", "b": [0.5007, 0.7829, 0.561, 0.798]}, {"w": "B", "b": [0.5679, 0.7829, 0.5812, 0.798]}, {"w": "than", "b": [0.588, 0.7829, 0.6257, 0.798]}, {"w": "on", "b": [0.6325, 0.7829, 0.6524, 0.798]}, {"w": "website", "b": [0.6592, 0.7829, 0.7195, 0.798]}, {"w": "A.", "b": [0.7263, 0.7829, 0.7457, 0.798]}, {"w": "Let", "b": [0.7525, 0.7829, 0.78, 0.798]}, {"w": "nA", "b": [0.7865, 0.783, 0.8087, 0.7992]}, {"w": "be", "b": [0.8165, 0.7829, 0.8358, 0.798]}, {"w": "the", "b": [0.8427, 0.7829, 0.8688, 0.798]}, {"w": "number", "b": [0.1312, 0.8011, 0.1911, 0.8159]}, {"w": "of", "b": [0.1972, 0.8011, 0.2118, 0.8159]}, {"w": "users", "b": [0.2179, 0.8011, 0.2574, 0.8159]}, {"w": "routed", "b": [0.2635, 0.8011, 0.3149, 0.8159]}, {"w": "to", "b": [0.321, 0.8011, 0.3371, 0.8159]}, {"w": "version", "b": [0.3432, 0.8011, 0.3986, 0.8159]}, {"w": "A", "b": [0.4048, 0.8011, 0.4183, 0.8159]}, {"w": "and", "b": [0.4245, 0.8011, 0.4536, 0.8159]}, {"w": "nB", "b": [0.4596, 0.8009, 0.4818, 0.8172]}, {"w": "be", "b": [0.4895, 0.8011, 0.5081, 0.8159]}, {"w": "the", "b": [0.5143, 0.8011, 0.5394, 0.8159]}, {"w": "number", "b": [0.5456, 0.8011, 0.6054, 0.8159]}, {"w": "of", "b": [0.6115, 0.8011, 0.6261, 0.8159]}, {"w": "users", "b": [0.6323, 0.8011, 0.6717, 0.8159]}, {"w": "routed", "b": [0.6779, 0.8011, 0.7292, 0.8159]}, {"w": "to", "b": [0.7353, 0.8011, 0.7514, 0.8159]}, {"w": "version", "b": [0.7575, 0.8011, 0.813, 0.8159]}, {"w": "B.", "b": [0.8191, 0.8011, 0.8369, 0.8159]}, {"w": "Let", "b": [0.8431, 0.8011, 0.8695, 0.8159]}, {"w": "i", "b": [0.1312, 0.8189, 0.1376, 0.8338]}, {"w": "and", "b": [0.1437, 0.8189, 0.1735, 0.8339]}, {"w": "j", "b": [0.1796, 0.8189, 0.1872, 0.8338]}, {"w": "denote", "b": [0.1944, 0.8189, 0.2478, 0.8339]}, {"w": "users", "b": [0.2539, 0.8189, 0.2942, 0.8339]}, {"w": "from", "b": [0.3003, 0.8189, 0.3378, 0.8339]}, {"w": "groups", "b": [0.3439, 0.8189, 0.3974, 0.8339]}, {"w": "A", "b": [0.4036, 0.8189, 0.4174, 0.8339]}, {"w": "and", "b": [0.4236, 0.8189, 0.4533, 0.8339]}, {"w": "B", "b": [0.4594, 0.8189, 0.4725, 0.8339]}, {"w": "respectively.", "b": [0.4787, 0.8189, 0.5768, 0.8339]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "9", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 227, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "To compute the value of the Z-test, we first compute sample mean and sample vari- ance for A and B. The sample mean is given by:", "words": [{"w": "To", "b": [0.1306, 0.0883, 0.152, 0.1034]}, {"w": "compute", "b": [0.1618, 0.0883, 0.2319, 0.1034]}, {"w": "the", "b": [0.2417, 0.0883, 0.2678, 0.1034]}, {"w": "value", "b": [0.2776, 0.0883, 0.32, 0.1034]}, {"w": "of", "b": [0.3298, 0.0883, 0.345, 0.1034]}, {"w": "the", "b": [0.3548, 0.0883, 0.3809, 0.1034]}, {"w": "Z-test,", "b": [0.3907, 0.0883, 0.4442, 0.1034]}, {"w": "we", "b": [0.4548, 0.0883, 0.4763, 0.1034]}, {"w": "first", "b": [0.4861, 0.0883, 0.5187, 0.1034]}, {"w": "compute", "b": [0.5285, 0.0883, 0.5985, 0.1034]}, {"w": "sample", "b": [0.6083, 0.0883, 0.6649, 0.1034]}, {"w": "mean", "b": [0.6747, 0.0883, 0.7186, 0.1034]}, {"w": "and", "b": [0.7284, 0.0883, 0.7587, 0.1034]}, {"w": "sample", "b": [0.7685, 0.0883, 0.8251, 0.1034]}, {"w": "vari-", "b": [0.8349, 0.0883, 0.8721, 0.1034]}, {"w": "ance", "b": [0.1312, 0.1063, 0.1671, 0.1213]}, {"w": "for", "b": [0.1733, 0.1063, 0.1954, 0.1213]}, {"w": "A", "b": [0.2015, 0.1063, 0.2154, 0.1213]}, {"w": "and", "b": [0.2215, 0.1063, 0.2513, 0.1213]}, {"w": "B.", "b": [0.2574, 0.1063, 0.2756, 0.1213]}, {"w": "The", "b": [0.2817, 0.1063, 0.3135, 0.1213]}, {"w": "sample", "b": [0.3197, 0.1063, 0.3752, 0.1213]}, {"w": "mean", "b": [0.3813, 0.1063, 0.4244, 0.1213]}, {"w": "is", "b": [0.4305, 0.1063, 0.4429, 0.1213]}, {"w": "given", "b": [0.4491, 0.1063, 0.4911, 0.1213]}, {"w": "by:", "b": [0.4973, 0.1063, 0.5219, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "ˆµA", "words": [{"w": "ˆµA", "b": [0.4331, 0.1596, 0.4553, 0.1758]}]}, {"id": "b_2", "type": "equation", "text": "def = 1 nA", "words": [{"w": "def", "b": [0.4614, 0.1544, 0.4806, 0.1649]}, {"w": "=", "b": [0.4638, 0.1596, 0.4782, 0.1746]}, {"w": "1", "b": [0.4949, 0.1495, 0.5041, 0.1645]}, {"w": "nA", "b": [0.488, 0.1699, 0.5101, 0.1861]}]}, {"id": "b_3", "type": "paragraph", "text": "nA X", "words": [{"w": "nA", "b": [0.5199, 0.1442, 0.5386, 0.1556]}, {"w": "X", "b": [0.5164, 0.1562, 0.543, 0.1711]}]}, {"id": "b_4", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.5177, 0.1808, 0.5416, 0.1912]}]}, {"id": "b_5", "type": "paragraph", "text": "ai,", "words": [{"w": "ai,", "b": [0.5461, 0.1596, 0.5671, 0.1758]}]}, {"id": "b_6", "type": "paragraph", "text": "ˆµB", "words": [{"w": "ˆµB", "b": [0.4324, 0.2096, 0.4547, 0.2258]}]}, {"id": "b_7", "type": "equation", "text": "def = 1 nB", "words": [{"w": "def", "b": [0.4614, 0.2044, 0.4806, 0.2149]}, {"w": "=", "b": [0.4638, 0.2096, 0.4782, 0.2246]}, {"w": "1", "b": [0.4953, 0.1995, 0.5045, 0.2145]}, {"w": "nB", "b": [0.488, 0.2199, 0.5102, 0.2361]}]}, {"id": "b_8", "type": "paragraph", "text": "nA X", "words": [{"w": "nA", "b": [0.5206, 0.1942, 0.5392, 0.2056]}, {"w": "X", "b": [0.517, 0.2062, 0.5437, 0.2211]}]}, {"id": "b_9", "type": "equation", "text": "j=1", "words": [{"w": "j=1", "b": [0.5176, 0.2308, 0.5431, 0.2412]}]}, {"id": "b_10", "type": "paragraph", "text": "bj,", "words": [{"w": "bj,", "b": [0.5468, 0.2096, 0.5676, 0.2258]}]}, {"id": "b_11", "type": "paragraph", "text": "(2)", "words": [{"w": "(2)", "b": [0.8452, 0.1865, 0.8688, 0.2015]}]}, {"id": "b_12", "type": "paragraph", "text": "where ai and bj is the time spent on the website by, respectively, users i and j.", "words": [{"w": "where", "b": [0.1306, 0.2606, 0.1778, 0.2756]}, {"w": "ai", "b": [0.1839, 0.2606, 0.1989, 0.2768]}, {"w": "and", "b": [0.206, 0.2606, 0.2357, 0.2756]}, {"w": "bj", "b": [0.2418, 0.2606, 0.2559, 0.2768]}, {"w": "is", "b": [0.2637, 0.2606, 0.2761, 0.2756]}, {"w": "the", "b": [0.2822, 0.2606, 0.3079, 0.2756]}, {"w": "time", "b": [0.314, 0.2606, 0.3499, 0.2756]}, {"w": "spent", "b": [0.3561, 0.2606, 0.3993, 0.2756]}, {"w": "on", "b": [0.4054, 0.2606, 0.4249, 0.2756]}, {"w": "the", "b": [0.431, 0.2606, 0.4567, 0.2756]}, {"w": "website", "b": [0.4628, 0.2606, 0.5219, 0.2756]}, {"w": "by,", "b": [0.5281, 0.2606, 0.5511, 0.2756]}, {"w": "respectively,", "b": [0.5573, 0.2606, 0.6554, 0.2756]}, {"w": "users", "b": [0.6616, 0.2606, 0.7018, 0.2756]}, {"w": "i", "b": [0.7077, 0.2606, 0.7141, 0.2756]}, {"w": "and", "b": [0.7202, 0.2606, 0.7499, 0.2756]}, {"w": "j.", "b": [0.7561, 0.2606, 0.7699, 0.2756]}]}, {"id": "b_13", "type": "paragraph", "text": "The sample variance for A and B is given, respectively, by,", "words": [{"w": "The", "b": [0.1306, 0.2875, 0.1624, 0.3025]}, {"w": "sample", "b": [0.1685, 0.2875, 0.224, 0.3025]}, {"w": "variance", "b": [0.2301, 0.2875, 0.2963, 0.3025]}, {"w": "for", "b": [0.3025, 0.2875, 0.3246, 0.3025]}, {"w": "A", "b": [0.3307, 0.2875, 0.3446, 0.3025]}, {"w": "and", "b": [0.3507, 0.2875, 0.3805, 0.3025]}, {"w": "B", "b": [0.3866, 0.2875, 0.3997, 0.3025]}, {"w": "is", "b": [0.4058, 0.2875, 0.4182, 0.3025]}, {"w": "given,", "b": [0.4244, 0.2875, 0.4716, 0.3025]}, {"w": "respectively,", "b": [0.4777, 0.2875, 0.5758, 0.3025]}, {"w": "by,", "b": [0.582, 0.2875, 0.605, 0.3025]}]}, {"id": "b_14", "type": "paragraph", "text": "ˆσ2", "words": [{"w": "ˆσ2", "b": [0.4004, 0.3382, 0.419, 0.3558]}]}, {"id": "b_16", "type": "equation", "text": "def = 1 nA", "words": [{"w": "def", "b": [0.4281, 0.3356, 0.4474, 0.3461]}, {"w": "=", "b": [0.4306, 0.3408, 0.4449, 0.3558]}, {"w": "1", "b": [0.4617, 0.3307, 0.4709, 0.3457]}, {"w": "nA", "b": [0.4547, 0.3511, 0.4769, 0.3673]}]}, {"id": "b_17", "type": "paragraph", "text": "nA X", "words": [{"w": "nA", "b": [0.4866, 0.3255, 0.5053, 0.3368]}, {"w": "X", "b": [0.4831, 0.3374, 0.5098, 0.3523]}]}, {"id": "b_18", "type": "equation", "text": "i=1", "words": [{"w": "i=1", "b": [0.4845, 0.362, 0.5084, 0.3725]}]}, {"id": "b_19", "type": "paragraph", "text": "(ˆµA −ai)2,", "words": [{"w": "(ˆµA", "b": [0.5098, 0.3408, 0.5391, 0.357]}, {"w": "−ai)2,", "b": [0.5442, 0.3382, 0.5991, 0.357]}]}, {"id": "b_20", "type": "paragraph", "text": "ˆσ2", "words": [{"w": "ˆσ2", "b": [0.3997, 0.3882, 0.4183, 0.4058]}]}, {"id": "b_22", "type": "equation", "text": "def = 1 nB", "words": [{"w": "def", "b": [0.4281, 0.3856, 0.4474, 0.3961]}, {"w": "=", "b": [0.4306, 0.3908, 0.4449, 0.4058]}, {"w": "1", "b": [0.462, 0.3807, 0.4712, 0.3957]}, {"w": "nB", "b": [0.4547, 0.4011, 0.477, 0.4173]}]}, {"id": "b_23", "type": "paragraph", "text": "nB X", "words": [{"w": "nB", "b": [0.4871, 0.3755, 0.5058, 0.3868]}, {"w": "X", "b": [0.4838, 0.3874, 0.5105, 0.4023]}]}, {"id": "b_24", "type": "equation", "text": "j=1", "words": [{"w": "j=1", "b": [0.4844, 0.412, 0.5099, 0.4224]}]}, {"id": "b_25", "type": "paragraph", "text": "(ˆµB −bj)2.", "words": [{"w": "(ˆµB", "b": [0.5104, 0.3908, 0.5399, 0.407]}, {"w": "−bj)2.", "b": [0.5455, 0.3882, 0.6003, 0.407]}]}, {"id": "b_26", "type": "paragraph", "text": "(3)", "words": [{"w": "(3)", "b": [0.8452, 0.3677, 0.8688, 0.3827]}]}, {"id": "b_27", "type": "equation", "text": "The value of the Z-test is then given by,", "words": [{"w": "The", "b": [0.1306, 0.4418, 0.1624, 0.4567]}, {"w": "value", "b": [0.1685, 0.4418, 0.21, 0.4567]}, {"w": "of", "b": [0.2162, 0.4418, 0.2311, 0.4567]}, {"w": "the", "b": [0.2372, 0.4418, 0.2629, 0.4567]}, {"w": "Z-test", "b": [0.269, 0.4418, 0.3163, 0.4567]}, {"w": "is", "b": [0.3224, 0.4418, 0.3348, 0.4567]}, {"w": "then", "b": [0.341, 0.4418, 0.3769, 0.4567]}, {"w": "given", "b": [0.383, 0.4418, 0.4251, 0.4567]}, {"w": "by,", "b": [0.4312, 0.4418, 0.4543, 0.4567]}]}, {"id": "b_29", "type": "equation", "text": "def = ˆµB −ˆµA q", "words": [{"w": "def", "b": [0.4478, 0.4854, 0.4671, 0.4959]}, {"w": "=", "b": [0.4503, 0.4906, 0.4646, 0.5055]}, {"w": "ˆµB", "b": [0.4844, 0.4805, 0.5067, 0.4967]}, {"w": "−ˆµA", "b": [0.5123, 0.4803, 0.553, 0.4967]}, {"w": "q", "b": [0.4744, 0.5009, 0.4929, 0.5158]}]}, {"id": "b_30", "type": "paragraph", "text": "ˆσ2", "words": [{"w": "ˆσ2", "b": [0.4954, 0.5025, 0.5107, 0.5142]}]}, {"id": "b_31", "type": "equation", "text": "B nB +", "words": [{"w": "B", "b": [0.5039, 0.51, 0.5135, 0.5174]}, {"w": "nB", "b": [0.4951, 0.5174, 0.5138, 0.5287]}, {"w": "+", "b": [0.5214, 0.5088, 0.5358, 0.5237]}]}, {"id": "b_32", "type": "paragraph", "text": "ˆσ2", "words": [{"w": "ˆσ2", "b": [0.5424, 0.5025, 0.5577, 0.5142]}]}, {"id": "b_33", "type": "paragraph", "text": "A nA", "words": [{"w": "A", "b": [0.5509, 0.51, 0.5605, 0.5174]}, {"w": "nA", "b": [0.5421, 0.5174, 0.5608, 0.5287]}]}, {"id": "b_35", "type": "paragraph", "text": "The larger Z, the more likely the difference between A and B is significant. Under the null hypothesis (i.e. A and B are equivalent), Z approximately follows a standardized normal distribution,", "words": [{"w": "The", "b": [0.1306, 0.5461, 0.163, 0.5612]}, {"w": "larger", "b": [0.1708, 0.5461, 0.218, 0.5612]}, {"w": "Z,", "b": [0.2257, 0.5461, 0.2449, 0.5612]}, {"w": "the", "b": [0.2531, 0.5461, 0.2793, 0.5612]}, {"w": "more", "b": [0.2871, 0.5461, 0.3279, 0.5612]}, {"w": "likely", "b": [0.3357, 0.5461, 0.3791, 0.5612]}, {"w": "the", "b": [0.3869, 0.5461, 0.4131, 0.5612]}, {"w": "difference", "b": [0.4209, 0.5461, 0.4989, 0.5612]}, {"w": "between", "b": [0.5067, 0.5461, 0.5732, 0.5612]}, {"w": "A", "b": [0.581, 0.5461, 0.5951, 0.5612]}, {"w": "and", "b": [0.6029, 0.5461, 0.6332, 0.5612]}, {"w": "B", "b": [0.641, 0.5461, 0.6544, 0.5612]}, {"w": "is", "b": [0.6622, 0.5461, 0.6748, 0.5612]}, {"w": "significant.", "b": [0.6826, 0.5461, 0.7711, 0.5612]}, {"w": "Under", "b": [0.7843, 0.5461, 0.8351, 0.5612]}, {"w": "the", "b": [0.8429, 0.5461, 0.8691, 0.5612]}, {"w": "null", "b": [0.1312, 0.564, 0.1621, 0.5791]}, {"w": "hypothesis", "b": [0.1711, 0.564, 0.2577, 0.5791]}, {"w": "(i.e.", "b": [0.2667, 0.564, 0.2981, 0.5791]}, {"w": "A", "b": [0.3071, 0.564, 0.3212, 0.5791]}, {"w": "and", "b": [0.3302, 0.564, 0.3606, 0.5791]}, {"w": "B", "b": [0.3696, 0.564, 0.3829, 0.5791]}, {"w": "are", "b": [0.3919, 0.564, 0.4171, 0.5791]}, {"w": "equivalent),", "b": [0.4261, 0.564, 0.5219, 0.5791]}, {"w": "Z", "b": [0.5314, 0.5641, 0.544, 0.5791]}, {"w": "approximately", "b": [0.5544, 0.564, 0.6721, 0.5791]}, {"w": "follows", "b": [0.6811, 0.564, 0.7367, 0.5791]}, {"w": "a", "b": [0.7457, 0.564, 0.7551, 0.5791]}, {"w": "standardized", "b": [0.7641, 0.564, 0.8689, 0.5791]}, {"w": "normal", "b": [0.1312, 0.5821, 0.1877, 0.5971]}, {"w": "distribution,", "b": [0.1938, 0.5821, 0.2935, 0.5971]}]}, {"id": "b_36", "type": "paragraph", "text": "Z ≈N(0, 1)", "words": [{"w": "Z", "b": [0.4513, 0.627, 0.4639, 0.6419]}, {"w": "≈N(0,", "b": [0.4704, 0.6268, 0.5292, 0.6419]}, {"w": "1)", "b": [0.5323, 0.627, 0.5487, 0.6419]}]}, {"id": "b_37", "type": "paragraph", "text": "This is true only if the sample size is large and if σ2", "words": [{"w": "This", "b": [0.1306, 0.6629, 0.1662, 0.6778]}, {"w": "is", "b": [0.1723, 0.6629, 0.1846, 0.6778]}, {"w": "true", "b": [0.1907, 0.6629, 0.2233, 0.6778]}, {"w": "only", "b": [0.2294, 0.6629, 0.2634, 0.6778]}, {"w": "if", "b": [0.2696, 0.6629, 0.2802, 0.6778]}, {"w": "the", "b": [0.2864, 0.6629, 0.3117, 0.6778]}, {"w": "sample", "b": [0.3179, 0.6629, 0.3727, 0.6778]}, {"w": "size", "b": [0.3789, 0.6629, 0.4074, 0.6778]}, {"w": "is", "b": [0.4136, 0.6629, 0.4258, 0.6778]}, {"w": "large", "b": [0.432, 0.6629, 0.4706, 0.6778]}, {"w": "and", "b": [0.4767, 0.6629, 0.5062, 0.6778]}, {"w": "if", "b": [0.5123, 0.6629, 0.523, 0.6778]}, {"w": "σ2", "b": [0.5289, 0.6609, 0.5475, 0.6778]}]}, {"id": "b_38", "type": "paragraph", "text": "A ≈σ2", "words": [{"w": "A", "b": [0.5394, 0.6705, 0.5505, 0.6809]}, {"w": "≈σ2", "b": [0.5566, 0.6609, 0.5946, 0.6778]}]}, {"id": "b_39", "type": "paragraph", "text": "B. If not, it is recommended to ask advice from a statistician.", "words": [{"w": "B.", "b": [0.5866, 0.6629, 0.6044, 0.6809]}, {"w": "If", "b": [0.6126, 0.6629, 0.6248, 0.6778]}, {"w": "not,", "b": [0.6309, 0.6629, 0.6624, 0.6778]}, {"w": "it", "b": [0.6685, 0.6629, 0.6807, 0.6778]}, {"w": "is", "b": [0.6868, 0.6629, 0.6991, 0.6778]}, {"w": "recommended", "b": [0.7053, 0.6629, 0.8149, 0.6778]}, {"w": "to", "b": [0.821, 0.6629, 0.8372, 0.6778]}, {"w": "ask", "b": [0.8434, 0.6629, 0.8693, 0.6778]}, {"w": "advice", "b": [0.1312, 0.6808, 0.182, 0.6958]}, {"w": "from", "b": [0.1881, 0.6808, 0.2256, 0.6958]}, {"w": "a", "b": [0.2318, 0.6808, 0.241, 0.6958]}, {"w": "statistician.", "b": [0.2472, 0.6808, 0.3407, 0.6958]}]}, {"id": "b_40", "type": "paragraph", "text": "As for the G-test, we will use the p-value to decide whether or not Z is large enough to think that the time spent on B is really greater than time spent on A. To compute the p-value, you check the probability of getting a Z-value from this distribution that is at least as extreme (out of line with the null hypothesis) as the Z-value you calculated. For example, let’s imagine", "words": [{"w": "As", "b": [0.1305, 0.7078, 0.1512, 0.7227]}, {"w": "for", "b": [0.1572, 0.7078, 0.1788, 0.7227]}, {"w": "the", "b": [0.1847, 0.7078, 0.2099, 0.7227]}, {"w": "G-test,", "b": [0.2158, 0.7078, 0.2703, 0.7227]}, {"w": "we", "b": [0.2763, 0.7078, 0.2969, 0.7227]}, {"w": "will", "b": [0.3028, 0.7078, 0.3309, 0.7227]}, {"w": "use", "b": [0.3368, 0.7078, 0.3621, 0.7227]}, {"w": "the", "b": [0.368, 0.7078, 0.3931, 0.7227]}, {"w": "p-value", "b": [0.3989, 0.7077, 0.4549, 0.7227]}, {"w": "to", "b": [0.4608, 0.7078, 0.4769, 0.7227]}, {"w": "decide", "b": [0.4829, 0.7078, 0.5321, 0.7227]}, {"w": "whether", "b": [0.538, 0.7078, 0.6014, 0.7227]}, {"w": "or", "b": [0.6073, 0.7078, 0.6235, 0.7227]}, {"w": "not", "b": [0.6294, 0.7078, 0.6555, 0.7227]}, {"w": "Z", "b": [0.6613, 0.7077, 0.6739, 0.7227]}, {"w": "is", "b": [0.6812, 0.7078, 0.6933, 0.7227]}, {"w": "large", "b": [0.6993, 0.7078, 0.7375, 0.7227]}, {"w": "enough", "b": [0.7434, 0.7078, 0.7997, 0.7227]}, {"w": "to", "b": [0.8056, 0.7078, 0.8217, 0.7227]}, {"w": "think", "b": [0.8276, 0.7078, 0.8693, 0.7227]}, {"w": "that", "b": [0.1312, 0.7258, 0.1644, 0.7406]}, {"w": "the", "b": [0.1702, 0.7258, 0.1954, 0.7406]}, {"w": "time", "b": [0.2012, 0.7258, 0.2364, 0.7406]}, {"w": "spent", "b": [0.2422, 0.7258, 0.2846, 0.7406]}, {"w": "on", "b": [0.2904, 0.7258, 0.3095, 0.7406]}, {"w": "B", "b": [0.3153, 0.7258, 0.3281, 0.7406]}, {"w": "is", "b": [0.334, 0.7258, 0.3462, 0.7406]}, {"w": "really", "b": [0.352, 0.7258, 0.3958, 0.7406]}, {"w": "greater", "b": [0.4016, 0.7258, 0.457, 0.7406]}, {"w": "than", "b": [0.4629, 0.7258, 0.499, 0.7406]}, {"w": "time", "b": [0.5049, 0.7258, 0.54, 0.7406]}, {"w": "spent", "b": [0.5459, 0.7258, 0.5882, 0.7406]}, {"w": "on", "b": [0.5941, 0.7258, 0.6132, 0.7406]}, {"w": "A.", "b": [0.619, 0.7258, 0.6376, 0.7406]}, {"w": "To", "b": [0.6434, 0.7258, 0.664, 0.7406]}, {"w": "compute", "b": [0.6698, 0.7258, 0.7372, 0.7406]}, {"w": "the", "b": [0.743, 0.7258, 0.7682, 0.7406]}, {"w": "p-value,", "b": [0.7738, 0.7257, 0.8348, 0.7406]}, {"w": "you", "b": [0.8407, 0.7258, 0.8688, 0.7406]}, {"w": "check", "b": [0.1312, 0.7436, 0.1751, 0.7586]}, {"w": "the", "b": [0.1813, 0.7436, 0.2071, 0.7586]}, {"w": "probability", "b": [0.2132, 0.7436, 0.302, 0.7586]}, {"w": "of", "b": [0.3081, 0.7436, 0.3231, 0.7586]}, {"w": "getting", "b": [0.3293, 0.7436, 0.386, 0.7586]}, {"w": "a", "b": [0.3921, 0.7436, 0.4014, 0.7586]}, {"w": "Z-value", "b": [0.4075, 0.7436, 0.4693, 0.7586]}, {"w": "from", "b": [0.4755, 0.7436, 0.5132, 0.7586]}, {"w": "this", "b": [0.5193, 0.7436, 0.5494, 0.7586]}, {"w": "distribution", "b": [0.5555, 0.7436, 0.6506, 0.7586]}, {"w": "that", "b": [0.6568, 0.7436, 0.6908, 0.7586]}, {"w": "is", "b": [0.697, 0.7436, 0.7095, 0.7586]}, {"w": "at", "b": [0.7156, 0.7436, 0.7321, 0.7586]}, {"w": "least", "b": [0.7383, 0.7436, 0.7755, 0.7586]}, {"w": "as", "b": [0.7817, 0.7436, 0.7983, 0.7586]}, {"w": "extreme", "b": [0.8044, 0.7436, 0.869, 0.7586]}, {"w": "(out", "b": [0.1291, 0.7617, 0.1622, 0.7765]}, {"w": "of", "b": [0.1674, 0.7617, 0.1819, 0.7765]}, {"w": "line", "b": [0.187, 0.7617, 0.2152, 0.7765]}, {"w": "with", "b": [0.2203, 0.7617, 0.2555, 0.7765]}, {"w": "the", "b": [0.2606, 0.7617, 0.2857, 0.7765]}, {"w": "null", "b": [0.2909, 0.7617, 0.3205, 0.7765]}, {"w": "hypothesis)", "b": [0.3256, 0.7617, 0.4158, 0.7765]}, {"w": "as", "b": [0.4209, 0.7617, 0.4371, 0.7765]}, {"w": "the", "b": [0.4422, 0.7617, 0.4673, 0.7765]}, {"w": "Z-value", "b": [0.4723, 0.7616, 0.5329, 0.7765]}, {"w": "you", "b": [0.538, 0.7617, 0.5662, 0.7765]}, {"w": "calculated.", "b": [0.5713, 0.7617, 0.6557, 0.7765]}, {"w": "For", "b": [0.6636, 0.7617, 0.69, 0.7765]}, {"w": "example,", "b": [0.6951, 0.7617, 0.7649, 0.7765]}, {"w": "let’s", "b": [0.7702, 0.7617, 0.8025, 0.7765]}, {"w": "imagine", "b": [0.8077, 0.7617, 0.8689, 0.7765]}]}, {"id": "b_41", "type": "paragraph", "text": "your sample gave you Z = 2.64. If A and B were equal, the probability of observing Z ≥2.64 is about 5%.", "words": [{"w": "your", "b": [0.1308, 0.7796, 0.166, 0.7944]}, {"w": "sample", "b": [0.1717, 0.7796, 0.2261, 0.7944]}, {"w": "gave", "b": [0.2319, 0.7796, 0.2665, 0.7944]}, {"w": "you", "b": [0.2723, 0.7796, 0.3005, 0.7944]}, {"w": "Z", "b": [0.3062, 0.7795, 0.3188, 0.7945]}, {"w": "=", "b": [0.3252, 0.7796, 0.3393, 0.7944]}, {"w": "2.64.", "b": [0.3444, 0.7795, 0.3817, 0.7945]}, {"w": "If", "b": [0.3897, 0.7796, 0.4018, 0.7944]}, {"w": "A", "b": [0.4076, 0.7796, 0.4211, 0.7944]}, {"w": "and", "b": [0.4269, 0.7796, 0.4561, 0.7944]}, {"w": "B", "b": [0.4618, 0.7796, 0.4746, 0.7944]}, {"w": "were", "b": [0.4804, 0.7796, 0.5161, 0.7944]}, {"w": "equal,", "b": [0.5219, 0.7796, 0.5687, 0.7944]}, {"w": "the", "b": [0.5745, 0.7796, 0.5996, 0.7944]}, {"w": "probability", "b": [0.6054, 0.7796, 0.6919, 0.7944]}, {"w": "of", "b": [0.6977, 0.7796, 0.7122, 0.7944]}, {"w": "observing", "b": [0.718, 0.7796, 0.7931, 0.7944]}, {"w": "Z", "b": [0.7987, 0.7795, 0.8113, 0.7945]}, {"w": "≥2.64", "b": [0.8177, 0.7793, 0.8694, 0.7945]}, {"w": "is", "b": [0.1312, 0.7975, 0.1436, 0.8124]}, {"w": "about", "b": [0.1498, 0.7975, 0.1965, 0.8124]}, {"w": "5%.", "b": [0.2026, 0.7975, 0.2323, 0.8124]}]}, {"id": "b_42", "type": "paragraph", "text": "To see the result of the test, you compare the p-value with the significance level you chose. If your significance level is 5%, then if the p-value is below 0.05, we reject the null hypothesis", "words": [{"w": "To", "b": [0.1306, 0.8245, 0.1511, 0.8393]}, {"w": "see", "b": [0.1571, 0.8245, 0.1803, 0.8393]}, {"w": "the", "b": [0.1863, 0.8245, 0.2114, 0.8393]}, {"w": "result", "b": [0.2174, 0.8245, 0.2618, 0.8393]}, {"w": "of", "b": [0.2677, 0.8245, 0.2823, 0.8393]}, {"w": "the", "b": [0.2883, 0.8245, 0.3134, 0.8393]}, {"w": "test,", "b": [0.3194, 0.8245, 0.3536, 0.8393]}, {"w": "you", "b": [0.3596, 0.8245, 0.3878, 0.8393]}, {"w": "compare", "b": [0.3937, 0.8245, 0.4601, 0.8393]}, {"w": "the", "b": [0.4661, 0.8245, 0.4912, 0.8393]}, {"w": "p-value", "b": [0.497, 0.8244, 0.553, 0.8393]}, {"w": "with", "b": [0.5589, 0.8245, 0.5941, 0.8393]}, {"w": "the", "b": [0.6001, 0.8245, 0.6252, 0.8393]}, {"w": "significance", "b": [0.6312, 0.8245, 0.7207, 0.8393]}, {"w": "level", "b": [0.7267, 0.8245, 0.7619, 0.8393]}, {"w": "you", "b": [0.7678, 0.8245, 0.796, 0.8393]}, {"w": "chose.", "b": [0.8019, 0.8245, 0.8488, 0.8393]}, {"w": "If", "b": [0.8569, 0.8245, 0.869, 0.8393]}, {"w": "your", "b": [0.1308, 0.8423, 0.1668, 0.8573]}, {"w": "significance", "b": [0.173, 0.8423, 0.2647, 0.8573]}, {"w": "level", "b": [0.2709, 0.8423, 0.3069, 0.8573]}, {"w": "is", "b": [0.3131, 0.8423, 0.3255, 0.8573]}, {"w": "5%,", "b": [0.3316, 0.8423, 0.3614, 0.8573]}, {"w": "then", "b": [0.3676, 0.8423, 0.4036, 0.8573]}, {"w": "if", "b": [0.4097, 0.8423, 0.4206, 0.8573]}, {"w": "the", "b": [0.4267, 0.8423, 0.4525, 0.8573]}, {"w": "p-value", "b": [0.4585, 0.8423, 0.5157, 0.8573]}, {"w": "is", "b": [0.5218, 0.8423, 0.5343, 0.8573]}, {"w": "below", "b": [0.5405, 0.8423, 0.5868, 0.8573]}, {"w": "0.05,", "b": [0.5929, 0.8423, 0.6309, 0.8573]}, {"w": "we", "b": [0.6371, 0.8423, 0.6582, 0.8573]}, {"w": "reject", "b": [0.6643, 0.8423, 0.7092, 0.8573]}, {"w": "the", "b": [0.7153, 0.8423, 0.7411, 0.8573]}, {"w": "null", "b": [0.7472, 0.8423, 0.7776, 0.8573]}, {"w": "hypothesis", "b": [0.7838, 0.8423, 0.8689, 0.8573]}]}, {"id": "b_43", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "10", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 228, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "that says that the difference in performance of the two models is not statistically significant. Thus, the new model works better than the old one.", "words": [{"w": "that", "b": [0.1312, 0.0885, 0.1647, 0.1033]}, {"w": "says", "b": [0.1709, 0.0885, 0.2036, 0.1033]}, {"w": "that", "b": [0.2098, 0.0885, 0.2433, 0.1033]}, {"w": "the", "b": [0.2494, 0.0885, 0.2748, 0.1033]}, {"w": "difference", "b": [0.2809, 0.0885, 0.3567, 0.1033]}, {"w": "in", "b": [0.3628, 0.0885, 0.378, 0.1033]}, {"w": "performance", "b": [0.3842, 0.0885, 0.4828, 0.1033]}, {"w": "of", "b": [0.489, 0.0885, 0.5037, 0.1033]}, {"w": "the", "b": [0.5098, 0.0885, 0.5352, 0.1033]}, {"w": "two", "b": [0.5414, 0.0885, 0.5698, 0.1033]}, {"w": "models", "b": [0.576, 0.0885, 0.6314, 0.1033]}, {"w": "is", "b": [0.6376, 0.0885, 0.6498, 0.1033]}, {"w": "not", "b": [0.656, 0.0885, 0.6824, 0.1033]}, {"w": "statistically", "b": [0.6886, 0.0885, 0.7806, 0.1033]}, {"w": "significant.", "b": [0.7868, 0.0885, 0.8727, 0.1033]}, {"w": "Thus,", "b": [0.1306, 0.1063, 0.1763, 0.1213]}, {"w": "the", "b": [0.1824, 0.1063, 0.2081, 0.1213]}, {"w": "new", "b": [0.2143, 0.1063, 0.246, 0.1213]}, {"w": "model", "b": [0.2522, 0.1063, 0.3009, 0.1213]}, {"w": "works", "b": [0.307, 0.1063, 0.3533, 0.1213]}, {"w": "better", "b": [0.3595, 0.1063, 0.4082, 0.1213]}, {"w": "than", "b": [0.4144, 0.1063, 0.4513, 0.1213]}, {"w": "the", "b": [0.4575, 0.1063, 0.4831, 0.1213]}, {"w": "old", "b": [0.4893, 0.1063, 0.5139, 0.1213]}, {"w": "one.", "b": [0.52, 0.1063, 0.5528, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "If the p-value is above or equal to 0.05, then we do not reject the null hypothesis. Note that this is not the same as accepting the null hypothesis. The two models could still be different, we just didn’t get evidence in support of that. In this case, we will stick with the old model unless evidence changes our mind. No evidence means we keep doing what we were doing. Note also that we cannot simply keep gathering evidence until the p-value goes below 0.05, as it would not be scientifically sound. It’s recommended to consult a statistician and design a different test.", "words": [{"w": "If", "b": [0.1312, 0.1333, 0.1434, 0.1482]}, {"w": "the", "b": [0.1495, 0.1333, 0.1749, 0.1482]}, {"w": "p-value", "b": [0.181, 0.1332, 0.2374, 0.1482]}, {"w": "is", "b": [0.2436, 0.1333, 0.2559, 0.1482]}, {"w": "above", "b": [0.262, 0.1333, 0.3076, 0.1482]}, {"w": "or", "b": [0.3137, 0.1333, 0.33, 0.1482]}, {"w": "equal", "b": [0.3362, 0.1333, 0.3782, 0.1482]}, {"w": "to", "b": [0.3844, 0.1333, 0.4006, 0.1482]}, {"w": "0.05,", "b": [0.4067, 0.1332, 0.4442, 0.1482]}, {"w": "then", "b": [0.4504, 0.1333, 0.4859, 0.1482]}, {"w": "we", "b": [0.492, 0.1333, 0.5128, 0.1482]}, {"w": "do", "b": [0.5189, 0.1333, 0.5382, 0.1482]}, {"w": "not", "b": [0.5443, 0.1333, 0.5707, 0.1482]}, {"w": "reject", "b": [0.5768, 0.1333, 0.621, 0.1482]}, {"w": "the", "b": [0.6271, 0.1333, 0.6525, 0.1482]}, {"w": "null", "b": [0.6586, 0.1333, 0.6886, 0.1482]}, {"w": "hypothesis.", "b": [0.6947, 0.1333, 0.7837, 0.1482]}, {"w": "Note", "b": [0.7919, 0.1333, 0.8299, 0.1482]}, {"w": "that", "b": [0.836, 0.1333, 0.8695, 0.1482]}, {"w": "this", "b": [0.1312, 0.1513, 0.1605, 0.1661]}, {"w": "is", "b": [0.1666, 0.1513, 0.1788, 0.1661]}, {"w": "not", "b": [0.1849, 0.1513, 0.2111, 0.1661]}, {"w": "the", "b": [0.2172, 0.1513, 0.2424, 0.1661]}, {"w": "same", "b": [0.2485, 0.1513, 0.2878, 0.1661]}, {"w": "as", "b": [0.2939, 0.1513, 0.3101, 0.1661]}, {"w": "accepting", "b": [0.3163, 0.1513, 0.3906, 0.1661]}, {"w": "the", "b": [0.3968, 0.1513, 0.4219, 0.1661]}, {"w": "null", "b": [0.4281, 0.1513, 0.4577, 0.1661]}, {"w": "hypothesis.", "b": [0.4639, 0.1513, 0.552, 0.1661]}, {"w": "The", "b": [0.5602, 0.1513, 0.5914, 0.1661]}, {"w": "two", "b": [0.5975, 0.1513, 0.6256, 0.1661]}, {"w": "models", "b": [0.6318, 0.1513, 0.6866, 0.1661]}, {"w": "could", "b": [0.6928, 0.1513, 0.735, 0.1661]}, {"w": "still", "b": [0.7412, 0.1513, 0.7704, 0.1661]}, {"w": "be", "b": [0.7766, 0.1513, 0.7952, 0.1661]}, {"w": "different,", "b": [0.8013, 0.1513, 0.8717, 0.1661]}, {"w": "we", "b": [0.1306, 0.1692, 0.1514, 0.1841]}, {"w": "just", "b": [0.1576, 0.1692, 0.1877, 0.1841]}, {"w": "didn’t", "b": [0.1939, 0.1692, 0.2418, 0.1841]}, {"w": "get", "b": [0.2479, 0.1692, 0.2723, 0.1841]}, {"w": "evidence", "b": [0.2785, 0.1692, 0.3462, 0.1841]}, {"w": "in", "b": [0.3524, 0.1692, 0.3676, 0.1841]}, {"w": "support", "b": [0.3738, 0.1692, 0.4356, 0.1841]}, {"w": "of", "b": [0.4417, 0.1692, 0.4565, 0.1841]}, {"w": "that.", "b": [0.4626, 0.1692, 0.5013, 0.1841]}, {"w": "In", "b": [0.5095, 0.1692, 0.5263, 0.1841]}, {"w": "this", "b": [0.5325, 0.1692, 0.5621, 0.1841]}, {"w": "case,", "b": [0.5683, 0.1692, 0.606, 0.1841]}, {"w": "we", "b": [0.6122, 0.1692, 0.6331, 0.1841]}, {"w": "will", "b": [0.6392, 0.1692, 0.6677, 0.1841]}, {"w": "stick", "b": [0.6739, 0.1692, 0.7106, 0.1841]}, {"w": "with", "b": [0.7168, 0.1692, 0.7524, 0.1841]}, {"w": "the", "b": [0.7586, 0.1692, 0.784, 0.1841]}, {"w": "old", "b": [0.7902, 0.1692, 0.8146, 0.1841]}, {"w": "model", "b": [0.8208, 0.1692, 0.8691, 0.1841]}, {"w": "unless", "b": [0.1312, 0.187, 0.1806, 0.2021]}, {"w": "evidence", "b": [0.1867, 0.187, 0.2563, 0.2021]}, {"w": "changes", "b": [0.2624, 0.187, 0.3258, 0.2021]}, {"w": "our", "b": [0.3319, 0.187, 0.3591, 0.2021]}, {"w": "mind.", "b": [0.3653, 0.187, 0.4123, 0.2021]}, {"w": "No", "b": [0.4205, 0.187, 0.444, 0.2021]}, {"w": "evidence", "b": [0.4502, 0.187, 0.5197, 0.2021]}, {"w": "means", "b": [0.5259, 0.187, 0.5772, 0.2021]}, {"w": "we", "b": [0.5833, 0.187, 0.6048, 0.2021]}, {"w": "keep", "b": [0.6109, 0.187, 0.6475, 0.2021]}, {"w": "doing", "b": [0.6537, 0.187, 0.6986, 0.2021]}, {"w": "what", "b": [0.7048, 0.187, 0.7455, 0.2021]}, {"w": "we", "b": [0.7517, 0.187, 0.7731, 0.2021]}, {"w": "were", "b": [0.7792, 0.187, 0.8164, 0.2021]}, {"w": "doing.", "b": [0.8226, 0.187, 0.8727, 0.2021]}, {"w": "Note", "b": [0.1312, 0.205, 0.17, 0.22]}, {"w": "also", "b": [0.1761, 0.205, 0.2072, 0.22]}, {"w": "that", "b": [0.2133, 0.205, 0.2474, 0.22]}, {"w": "we", "b": [0.2535, 0.205, 0.2747, 0.22]}, {"w": "cannot", "b": [0.2808, 0.205, 0.3355, 0.22]}, {"w": "simply", "b": [0.3417, 0.205, 0.395, 0.22]}, {"w": "keep", "b": [0.4011, 0.205, 0.4373, 0.22]}, {"w": "gathering", "b": [0.4434, 0.205, 0.5199, 0.22]}, {"w": "evidence", "b": [0.526, 0.205, 0.5947, 0.22]}, {"w": "until", "b": [0.6008, 0.205, 0.6385, 0.22]}, {"w": "the", "b": [0.6447, 0.205, 0.6705, 0.22]}, {"w": "p-value", "b": [0.6764, 0.205, 0.7337, 0.22]}, {"w": "goes", "b": [0.7398, 0.205, 0.7745, 0.22]}, {"w": "below", "b": [0.7806, 0.205, 0.8271, 0.22]}, {"w": "0.05,", "b": [0.8332, 0.205, 0.8713, 0.22]}, {"w": "as", "b": [0.1312, 0.2231, 0.1474, 0.2379]}, {"w": "it", "b": [0.1536, 0.2231, 0.1657, 0.2379]}, {"w": "would", "b": [0.1718, 0.2231, 0.2186, 0.2379]}, {"w": "not", "b": [0.2248, 0.2231, 0.2509, 0.2379]}, {"w": "be", "b": [0.2571, 0.2231, 0.2757, 0.2379]}, {"w": "scientifically", "b": [0.2819, 0.2231, 0.3786, 0.2379]}, {"w": "sound.", "b": [0.3848, 0.2231, 0.4363, 0.2379]}, {"w": "It’s", "b": [0.4444, 0.2231, 0.4702, 0.2379]}, {"w": "recommended", "b": [0.4764, 0.2231, 0.5852, 0.2379]}, {"w": "to", "b": [0.5913, 0.2231, 0.6074, 0.2379]}, {"w": "consult", "b": [0.6135, 0.2231, 0.6701, 0.2379]}, {"w": "a", "b": [0.6762, 0.2231, 0.6852, 0.2379]}, {"w": "statistician", "b": [0.6914, 0.2231, 0.7782, 0.2379]}, {"w": "and", "b": [0.7843, 0.2231, 0.8135, 0.2379]}, {"w": "design", "b": [0.8197, 0.2231, 0.8691, 0.2379]}, {"w": "a", "b": [0.1312, 0.2409, 0.1405, 0.2559]}, {"w": "different", "b": [0.1466, 0.2409, 0.2133, 0.2559]}, {"w": "test.", "b": [0.2195, 0.2409, 0.2545, 0.2559]}]}, {"id": "b_2", "type": "paragraph", "text": "As for significance levels, there’s no universal consensus on which threshold is optimal. The values of 0.05 or 0.01 are commonly used in practice. They were favorites of a trendsetting statistician Ronald Fisher in the 1920s. You should select a higher or a lower value if it’s appropriate for your application. The lower the value, the more evidence it takes to change your mind.", "words": [{"w": "As", "b": [0.1305, 0.2679, 0.1516, 0.2828]}, {"w": "for", "b": [0.1577, 0.2679, 0.1798, 0.2828]}, {"w": "significance", "b": [0.1859, 0.2679, 0.2772, 0.2828]}, {"w": "levels,", "b": [0.2833, 0.2679, 0.3315, 0.2828]}, {"w": "there’s", "b": [0.3377, 0.2679, 0.391, 0.2828]}, {"w": "no", "b": [0.3972, 0.2679, 0.4166, 0.2828]}, {"w": "universal", "b": [0.4228, 0.2679, 0.4946, 0.2828]}, {"w": "consensus", "b": [0.5007, 0.2679, 0.5788, 0.2828]}, {"w": "on", "b": [0.585, 0.2679, 0.6044, 0.2828]}, {"w": "which", "b": [0.6105, 0.2679, 0.6571, 0.2828]}, {"w": "threshold", "b": [0.6632, 0.2679, 0.7381, 0.2828]}, {"w": "is", "b": [0.7442, 0.2679, 0.7566, 0.2828]}, {"w": "optimal.", "b": [0.7628, 0.2679, 0.8293, 0.2828]}, {"w": "The", "b": [0.8375, 0.2679, 0.8692, 0.2828]}, {"w": "values", "b": [0.1308, 0.2858, 0.1798, 0.3008]}, {"w": "of", "b": [0.186, 0.2858, 0.2009, 0.3008]}, {"w": "0.05", "b": [0.2071, 0.2858, 0.24, 0.3008]}, {"w": "or", "b": [0.2462, 0.2858, 0.2627, 0.3008]}, {"w": "0.01", "b": [0.2689, 0.2858, 0.3018, 0.3008]}, {"w": "are", "b": [0.308, 0.2858, 0.3327, 0.3008]}, {"w": "commonly", "b": [0.3389, 0.2858, 0.4218, 0.3008]}, {"w": "used", "b": [0.428, 0.2858, 0.4642, 0.3008]}, {"w": "in", "b": [0.4704, 0.2858, 0.4858, 0.3008]}, {"w": "practice.", "b": [0.492, 0.2858, 0.5611, 0.3008]}, {"w": "They", "b": [0.5694, 0.2858, 0.6111, 0.3008]}, {"w": "were", "b": [0.6173, 0.2858, 0.6539, 0.3008]}, {"w": "favorites", "b": [0.6601, 0.2858, 0.7283, 0.3008]}, {"w": "of", "b": [0.7344, 0.2858, 0.7494, 0.3008]}, {"w": "a", "b": [0.7555, 0.2858, 0.7648, 0.3008]}, {"w": "trendsetting", "b": [0.771, 0.2858, 0.869, 0.3008]}, {"w": "statistician", "b": [0.1312, 0.3036, 0.2214, 0.3187]}, {"w": "Ronald", "b": [0.2279, 0.3036, 0.2867, 0.3187]}, {"w": "Fisher", "b": [0.2932, 0.3036, 0.3443, 0.3187]}, {"w": "in", "b": [0.3508, 0.3036, 0.3665, 0.3187]}, {"w": "the", "b": [0.3729, 0.3036, 0.3991, 0.3187]}, {"w": "1920s.", "b": [0.4056, 0.3036, 0.4559, 0.3187]}, {"w": "You", "b": [0.465, 0.3036, 0.4975, 0.3187]}, {"w": "should", "b": [0.5039, 0.3036, 0.5574, 0.3187]}, {"w": "select", "b": [0.5638, 0.3036, 0.6089, 0.3187]}, {"w": "a", "b": [0.6154, 0.3036, 0.6248, 0.3187]}, {"w": "higher", "b": [0.6313, 0.3036, 0.6826, 0.3187]}, {"w": "or", "b": [0.6891, 0.3036, 0.7058, 0.3187]}, {"w": "a", "b": [0.7123, 0.3036, 0.7217, 0.3187]}, {"w": "lower", "b": [0.7282, 0.3036, 0.7711, 0.3187]}, {"w": "value", "b": [0.7776, 0.3036, 0.82, 0.3187]}, {"w": "if", "b": [0.8265, 0.3036, 0.8374, 0.3187]}, {"w": "it’s", "b": [0.8439, 0.3036, 0.8691, 0.3187]}, {"w": "appropriate", "b": [0.1312, 0.3217, 0.2246, 0.3367]}, {"w": "for", "b": [0.2307, 0.3217, 0.2528, 0.3367]}, {"w": "your", "b": [0.2589, 0.3217, 0.2948, 0.3367]}, {"w": "application.", "b": [0.3009, 0.3217, 0.3952, 0.3367]}, {"w": "The", "b": [0.4034, 0.3217, 0.4352, 0.3367]}, {"w": "lower", "b": [0.4413, 0.3217, 0.4833, 0.3367]}, {"w": "the", "b": [0.4895, 0.3217, 0.5151, 0.3367]}, {"w": "value,", "b": [0.5212, 0.3217, 0.5678, 0.3367]}, {"w": "the", "b": [0.574, 0.3217, 0.5996, 0.3367]}, {"w": "more", "b": [0.6057, 0.3217, 0.6457, 0.3367]}, {"w": "evidence", "b": [0.6518, 0.3217, 0.72, 0.3367]}, {"w": "it", "b": [0.7261, 0.3217, 0.7384, 0.3367]}, {"w": "takes", "b": [0.7446, 0.3217, 0.7857, 0.3367]}, {"w": "to", "b": [0.7918, 0.3217, 0.8082, 0.3367]}, {"w": "change", "b": [0.8143, 0.3217, 0.8691, 0.3367]}, {"w": "your", "b": [0.1308, 0.3396, 0.1667, 0.3546]}, {"w": "mind.", "b": [0.1728, 0.3396, 0.219, 0.3546]}]}, {"id": "b_3", "type": "paragraph", "text": "Similar to the G-test, it is convenient to find the p-value of the Z-test using a programming language. In Python, it can be done in the following way:", "words": [{"w": "Similar", "b": [0.1312, 0.3666, 0.1885, 0.3815]}, {"w": "to", "b": [0.1946, 0.3666, 0.211, 0.3815]}, {"w": "the", "b": [0.2171, 0.3666, 0.2427, 0.3815]}, {"w": "G-test,", "b": [0.2489, 0.3666, 0.3042, 0.3815]}, {"w": "it", "b": [0.3104, 0.3666, 0.3227, 0.3815]}, {"w": "is", "b": [0.3288, 0.3666, 0.3412, 0.3815]}, {"w": "convenient", "b": [0.3474, 0.3666, 0.4321, 0.3815]}, {"w": "to", "b": [0.4383, 0.3666, 0.4547, 0.3815]}, {"w": "find", "b": [0.4608, 0.3666, 0.4915, 0.3815]}, {"w": "the", "b": [0.4977, 0.3666, 0.5232, 0.3815]}, {"w": "p-value", "b": [0.5292, 0.3666, 0.5859, 0.3815]}, {"w": "of", "b": [0.5921, 0.3666, 0.6069, 0.3815]}, {"w": "the", "b": [0.6131, 0.3666, 0.6386, 0.3815]}, {"w": "Z-test", "b": [0.6448, 0.3666, 0.6919, 0.3815]}, {"w": "using", "b": [0.6981, 0.3666, 0.74, 0.3815]}, {"w": "a", "b": [0.7462, 0.3666, 0.7554, 0.3815]}, {"w": "programming", "b": [0.7616, 0.3666, 0.8689, 0.3815]}, {"w": "language.", "b": [0.1312, 0.3845, 0.2071, 0.3995]}, {"w": "In", "b": [0.2153, 0.3845, 0.2322, 0.3995]}, {"w": "Python,", "b": [0.2384, 0.3845, 0.3027, 0.3995]}, {"w": "it", "b": [0.3089, 0.3845, 0.3212, 0.3995]}, {"w": "can", "b": [0.3273, 0.3845, 0.355, 0.3995]}, {"w": "be", "b": [0.3612, 0.3845, 0.3802, 0.3995]}, {"w": "done", "b": [0.3863, 0.3845, 0.4242, 0.3995]}, {"w": "in", "b": [0.4304, 0.3845, 0.4458, 0.3995]}, {"w": "the", "b": [0.4519, 0.3845, 0.4776, 0.3995]}, {"w": "following", "b": [0.4837, 0.3845, 0.5555, 0.3995]}, {"w": "way:", "b": [0.5616, 0.3845, 0.598, 0.3995]}]}, {"id": "b_4", "type": "paragraph", "text": "1 from scipy.stats import norm", "words": [{"w": "1", "b": [0.1028, 0.4173, 0.1091, 0.4247]}, {"w": "from", "b": [0.1312, 0.4122, 0.17, 0.4272]}, {"w": "scipy.stats", "b": [0.1797, 0.4122, 0.2862, 0.4272]}, {"w": "import", "b": [0.2959, 0.4122, 0.354, 0.4272]}, {"w": "norm", "b": [0.3637, 0.4122, 0.4024, 0.4272]}]}, {"id": "b_5", "type": "equation", "text": "2 def get_p_value(Z):", "words": [{"w": "2", "b": [0.1028, 0.4352, 0.1091, 0.4427]}, {"w": "def", "b": [0.1312, 0.4301, 0.1603, 0.445]}, {"w": "get_p_value(Z):", "b": [0.17, 0.4301, 0.3153, 0.4451]}]}, {"id": "b_6", "type": "equation", "text": "3 p_value = norm.sf(Z)", "words": [{"w": "3", "b": [0.1028, 0.4532, 0.1091, 0.4606]}, {"w": "p_value", "b": [0.17, 0.4481, 0.2378, 0.463]}, {"w": "=", "b": [0.2475, 0.4481, 0.2572, 0.463]}, {"w": "norm.sf(Z)", "b": [0.2668, 0.4481, 0.3637, 0.463]}]}, {"id": "b_7", "type": "equation", "text": "4 return p_value", "words": [{"w": "4", "b": [0.1028, 0.4711, 0.1091, 0.4786]}, {"w": "return", "b": [0.17, 0.466, 0.2281, 0.4809]}, {"w": "p_value", "b": [0.2378, 0.466, 0.3056, 0.481]}]}, {"id": "b_8", "type": "paragraph", "text": "The following code will work for R:", "words": [{"w": "The", "b": [0.1306, 0.4922, 0.1624, 0.5072]}, {"w": "following", "b": [0.1685, 0.4922, 0.2403, 0.5072]}, {"w": "code", "b": [0.2464, 0.4922, 0.2828, 0.5072]}, {"w": "will", "b": [0.289, 0.4922, 0.3177, 0.5072]}, {"w": "work", "b": [0.3238, 0.4922, 0.3628, 0.5072]}, {"w": "for", "b": [0.369, 0.4922, 0.3911, 0.5072]}, {"w": "R:", "b": [0.3973, 0.4922, 0.416, 0.5072]}]}, {"id": "b_9", "type": "equation", "text": "1 get_p_value <- function(Z) {", "words": [{"w": "1", "b": [0.1028, 0.525, 0.1091, 0.5324]}, {"w": "get_p_value", "b": [0.1312, 0.5199, 0.2378, 0.5348]}, {"w": "<-", "b": [0.2475, 0.5199, 0.2668, 0.5348]}, {"w": "function(Z)", "b": [0.2765, 0.5198, 0.3831, 0.5348]}, {"w": "{", "b": [0.3928, 0.5199, 0.4024, 0.5348]}]}, {"id": "b_10", "type": "equation", "text": "2 p_value <- 1-pnorm(Z)", "words": [{"w": "2", "b": [0.1028, 0.5429, 0.1091, 0.5504]}, {"w": "p_value", "b": [0.1506, 0.5378, 0.2184, 0.5528]}, {"w": "<-", "b": [0.2281, 0.5378, 0.2475, 0.5528]}, {"w": "1-pnorm(Z)", "b": [0.2571, 0.5378, 0.354, 0.5528]}]}, {"id": "b_11", "type": "equation", "text": "3 return(p_value)", "words": [{"w": "3", "b": [0.1028, 0.5608, 0.1091, 0.5683]}, {"w": "return(p_value)", "b": [0.1506, 0.5557, 0.2959, 0.5707]}]}, {"id": "b_12", "type": "equation", "text": "4 }", "words": [{"w": "4", "b": [0.1028, 0.5788, 0.1091, 0.5863]}, {"w": "}", "b": [0.1312, 0.5737, 0.1409, 0.5887]}]}, {"id": "b_13", "type": "paragraph", "text": "For best results, it is recommended to set nA and nB to a value 1000 or higher.", "words": [{"w": "For", "b": [0.1312, 0.5999, 0.1582, 0.6148]}, {"w": "best", "b": [0.1643, 0.5999, 0.1978, 0.6148]}, {"w": "results,", "b": [0.2039, 0.5999, 0.2617, 0.6148]}, {"w": "it", "b": [0.2678, 0.5999, 0.2801, 0.6148]}, {"w": "is", "b": [0.2862, 0.5999, 0.2987, 0.6148]}, {"w": "recommended", "b": [0.3048, 0.5999, 0.4156, 0.6148]}, {"w": "to", "b": [0.4218, 0.5999, 0.4382, 0.6148]}, {"w": "set", "b": [0.4443, 0.5999, 0.467, 0.6148]}, {"w": "nA", "b": [0.473, 0.5999, 0.4951, 0.6161]}, {"w": "and", "b": [0.5022, 0.5999, 0.5319, 0.6148]}, {"w": "nB", "b": [0.5381, 0.5999, 0.5603, 0.6161]}, {"w": "to", "b": [0.568, 0.5999, 0.5844, 0.6148]}, {"w": "a", "b": [0.5905, 0.5999, 0.5998, 0.6148]}, {"w": "value", "b": [0.6059, 0.5999, 0.6475, 0.6148]}, {"w": "1000", "b": [0.6536, 0.5999, 0.6905, 0.6148]}, {"w": "or", "b": [0.6966, 0.5999, 0.7131, 0.6148]}, {"w": "higher.", "b": [0.7192, 0.5999, 0.7747, 0.6148]}]}, {"id": "b_14", "type": "paragraph", "text": "7.2.3 Concluding Remarks and Warnings", "words": [{"w": "7.2.3", "b": [0.1312, 0.6477, 0.1749, 0.6627]}, {"w": "Concluding", "b": [0.1961, 0.6477, 0.301, 0.6627]}, {"w": "Remarks", "b": [0.3081, 0.6477, 0.39, 0.6627]}, {"w": "and", "b": [0.3971, 0.6477, 0.431, 0.6627]}, {"w": "Warnings", "b": [0.4381, 0.6477, 0.5258, 0.6627]}]}, {"id": "b_15", "type": "paragraph", "text": "As mentioned in the beginning of this chapter, some methods highlighted in this chapter are provided as examples only and might not be appropriate for your specific business problem. In particular, the two statistical tests presented above are taught in schools and are indeed often used in practice, but, unfortunately, not all of those uses are appropriate for your business problem. While pointing this out, Cassie Kozyrkov, the Chief Decision Scientist at Google and one of the reviewers of this chapter, emphasized that the above two tests are rarely a good idea to apply in practice because they only show that two models are different, but they don’t show whether the difference is “of at least x.” If replacing the old model with the new one has a significant cost or poses a risk, then just knowing that the new model is “somewhat” better is not enough to make a replacement decision. In this case, an adjusted", "words": [{"w": "As", "b": [0.1305, 0.6844, 0.1513, 0.6992]}, {"w": "mentioned", "b": [0.1575, 0.6844, 0.2398, 0.6992]}, {"w": "in", "b": [0.246, 0.6844, 0.2612, 0.6992]}, {"w": "the", "b": [0.2673, 0.6844, 0.2926, 0.6992]}, {"w": "beginning", "b": [0.2988, 0.6844, 0.376, 0.6992]}, {"w": "of", "b": [0.3822, 0.6844, 0.3969, 0.6992]}, {"w": "this", "b": [0.403, 0.6844, 0.4324, 0.6992]}, {"w": "chapter,", "b": [0.4386, 0.6844, 0.5028, 0.6992]}, {"w": "some", "b": [0.509, 0.6844, 0.5485, 0.6992]}, {"w": "methods", "b": [0.5546, 0.6844, 0.6219, 0.6992]}, {"w": "highlighted", "b": [0.6281, 0.6844, 0.7165, 0.6992]}, {"w": "in", "b": [0.7226, 0.6844, 0.7378, 0.6992]}, {"w": "this", "b": [0.744, 0.6844, 0.7734, 0.6992]}, {"w": "chapter", "b": [0.7795, 0.6844, 0.8387, 0.6992]}, {"w": "are", "b": [0.8448, 0.6844, 0.8691, 0.6992]}, {"w": "provided", "b": [0.1312, 0.7023, 0.201, 0.7172]}, {"w": "as", "b": [0.2071, 0.7023, 0.2236, 0.7172]}, {"w": "examples", "b": [0.2297, 0.7023, 0.3031, 0.7172]}, {"w": "only", "b": [0.3092, 0.7023, 0.3435, 0.7172]}, {"w": "and", "b": [0.3497, 0.7023, 0.3794, 0.7172]}, {"w": "might", "b": [0.3855, 0.7023, 0.4321, 0.7172]}, {"w": "not", "b": [0.4382, 0.7023, 0.4649, 0.7172]}, {"w": "be", "b": [0.471, 0.7023, 0.49, 0.7172]}, {"w": "appropriate", "b": [0.4961, 0.7023, 0.5894, 0.7172]}, {"w": "for", "b": [0.5956, 0.7023, 0.6176, 0.7172]}, {"w": "your", "b": [0.6238, 0.7023, 0.6597, 0.7172]}, {"w": "specific", "b": [0.6658, 0.7023, 0.7238, 0.7172]}, {"w": "business", "b": [0.73, 0.7023, 0.7958, 0.7172]}, {"w": "problem.", "b": [0.802, 0.7023, 0.8727, 0.7172]}, {"w": "In", "b": [0.1312, 0.7202, 0.1482, 0.7352]}, {"w": "particular,", "b": [0.1544, 0.7202, 0.2388, 0.7352]}, {"w": "the", "b": [0.245, 0.7202, 0.2707, 0.7352]}, {"w": "two", "b": [0.2769, 0.7202, 0.3057, 0.7352]}, {"w": "statistical", "b": [0.3118, 0.7202, 0.3902, 0.7352]}, {"w": "tests", "b": [0.3964, 0.7202, 0.4336, 0.7352]}, {"w": "presented", "b": [0.4398, 0.7202, 0.5166, 0.7352]}, {"w": "above", "b": [0.5228, 0.7202, 0.569, 0.7352]}, {"w": "are", "b": [0.5752, 0.7202, 0.5999, 0.7352]}, {"w": "taught", "b": [0.6061, 0.7202, 0.6591, 0.7352]}, {"w": "in", "b": [0.6652, 0.7202, 0.6807, 0.7352]}, {"w": "schools", "b": [0.6868, 0.7202, 0.7436, 0.7352]}, {"w": "and", "b": [0.7498, 0.7202, 0.7796, 0.7352]}, {"w": "are", "b": [0.7858, 0.7202, 0.8105, 0.7352]}, {"w": "indeed", "b": [0.8167, 0.7202, 0.8692, 0.7352]}, {"w": "often", "b": [0.1312, 0.738, 0.1726, 0.7531]}, {"w": "used", "b": [0.1801, 0.738, 0.2168, 0.7531]}, {"w": "in", "b": [0.2244, 0.738, 0.2401, 0.7531]}, {"w": "practice,", "b": [0.2476, 0.738, 0.3178, 0.7531]}, {"w": "but,", "b": [0.3256, 0.738, 0.3591, 0.7531]}, {"w": "unfortunately,", "b": [0.367, 0.738, 0.4827, 0.7531]}, {"w": "not", "b": [0.4906, 0.738, 0.5178, 0.7531]}, {"w": "all", "b": [0.5253, 0.738, 0.5452, 0.7531]}, {"w": "of", "b": [0.5527, 0.738, 0.5679, 0.7531]}, {"w": "those", "b": [0.5755, 0.738, 0.6184, 0.7531]}, {"w": "uses", "b": [0.626, 0.738, 0.6597, 0.7531]}, {"w": "are", "b": [0.6672, 0.738, 0.6924, 0.7531]}, {"w": "appropriate", "b": [0.6999, 0.738, 0.7952, 0.7531]}, {"w": "for", "b": [0.8028, 0.738, 0.8253, 0.7531]}, {"w": "your", "b": [0.8329, 0.738, 0.8695, 0.7531]}, {"w": "business", "b": [0.1312, 0.7561, 0.197, 0.771]}, {"w": "problem.", "b": [0.2031, 0.7561, 0.2737, 0.771]}, {"w": "While", "b": [0.2819, 0.7561, 0.3295, 0.771]}, {"w": "pointing", "b": [0.3356, 0.7561, 0.4021, 0.771]}, {"w": "this", "b": [0.4082, 0.7561, 0.438, 0.771]}, {"w": "out,", "b": [0.4441, 0.7561, 0.4758, 0.771]}, {"w": "Cassie", "b": [0.4819, 0.7561, 0.5322, 0.771]}, {"w": "Kozyrkov,", "b": [0.5384, 0.7561, 0.6192, 0.771]}, {"w": "the", "b": [0.6253, 0.7561, 0.6509, 0.771]}, {"w": "Chief", "b": [0.657, 0.7561, 0.6994, 0.771]}, {"w": "Decision", "b": [0.7056, 0.7561, 0.7729, 0.771]}, {"w": "Scientist", "b": [0.779, 0.7561, 0.8472, 0.771]}, {"w": "at", "b": [0.8533, 0.7561, 0.8697, 0.771]}, {"w": "Google", "b": [0.1312, 0.7739, 0.1883, 0.789]}, {"w": "and", "b": [0.1949, 0.7739, 0.2253, 0.789]}, {"w": "one", "b": [0.2319, 0.7739, 0.2601, 0.789]}, {"w": "of", "b": [0.2667, 0.7739, 0.2819, 0.789]}, {"w": "the", "b": [0.2884, 0.7739, 0.3146, 0.789]}, {"w": "reviewers", "b": [0.3212, 0.7739, 0.3967, 0.789]}, {"w": "of", "b": [0.4033, 0.7739, 0.4185, 0.789]}, {"w": "this", "b": [0.4251, 0.7739, 0.4555, 0.789]}, {"w": "chapter,", "b": [0.4621, 0.7739, 0.5286, 0.789]}, {"w": "emphasized", "b": [0.5353, 0.7739, 0.6295, 0.789]}, {"w": "that", "b": [0.6361, 0.7739, 0.6706, 0.789]}, {"w": "the", "b": [0.6772, 0.7739, 0.7034, 0.789]}, {"w": "above", "b": [0.71, 0.7739, 0.757, 0.789]}, {"w": "two", "b": [0.7636, 0.7739, 0.7929, 0.789]}, {"w": "tests", "b": [0.7995, 0.7739, 0.8374, 0.789]}, {"w": "are", "b": [0.844, 0.7739, 0.8691, 0.789]}, {"w": "rarely", "b": [0.1312, 0.7921, 0.1771, 0.8069]}, {"w": "a", "b": [0.1833, 0.7921, 0.1923, 0.8069]}, {"w": "good", "b": [0.1985, 0.7921, 0.2367, 0.8069]}, {"w": "idea", "b": [0.2429, 0.7921, 0.2751, 0.8069]}, {"w": "to", "b": [0.2812, 0.7921, 0.2973, 0.8069]}, {"w": "apply", "b": [0.3035, 0.7921, 0.3472, 0.8069]}, {"w": "in", "b": [0.3534, 0.7921, 0.3685, 0.8069]}, {"w": "practice", "b": [0.3746, 0.7921, 0.4371, 0.8069]}, {"w": "because", "b": [0.4432, 0.7921, 0.5042, 0.8069]}, {"w": "they", "b": [0.5104, 0.7921, 0.5451, 0.8069]}, {"w": "only", "b": [0.5513, 0.7921, 0.585, 0.8069]}, {"w": "show", "b": [0.5911, 0.7921, 0.6299, 0.8069]}, {"w": "that", "b": [0.6361, 0.7921, 0.6693, 0.8069]}, {"w": "two", "b": [0.6754, 0.7921, 0.7036, 0.8069]}, {"w": "models", "b": [0.7097, 0.7921, 0.7647, 0.8069]}, {"w": "are", "b": [0.7708, 0.7921, 0.795, 0.8069]}, {"w": "different,", "b": [0.8012, 0.7921, 0.8717, 0.8069]}, {"w": "but", "b": [0.1312, 0.81, 0.1585, 0.8249]}, {"w": "they", "b": [0.1646, 0.81, 0.1994, 0.8249]}, {"w": "don’t", "b": [0.2056, 0.81, 0.2469, 0.8249]}, {"w": "show", "b": [0.2531, 0.81, 0.292, 0.8249]}, {"w": "whether", "b": [0.2981, 0.81, 0.3617, 0.8249]}, {"w": "the", "b": [0.3678, 0.81, 0.3931, 0.8249]}, {"w": "difference", "b": [0.3992, 0.81, 0.4744, 0.8249]}, {"w": "is", "b": [0.4806, 0.81, 0.4928, 0.8249]}, {"w": "“of", "b": [0.4989, 0.81, 0.5221, 0.8249]}, {"w": "at", "b": [0.5283, 0.81, 0.5444, 0.8249]}, {"w": "least", "b": [0.5506, 0.81, 0.587, 0.8249]}, {"w": "x.”", "b": [0.5931, 0.81, 0.6137, 0.8249]}, {"w": "If", "b": [0.622, 0.81, 0.6341, 0.8249]}, {"w": "replacing", "b": [0.6402, 0.81, 0.7119, 0.8249]}, {"w": "the", "b": [0.718, 0.81, 0.7433, 0.8249]}, {"w": "old", "b": [0.7494, 0.81, 0.7736, 0.8249]}, {"w": "model", "b": [0.7798, 0.81, 0.8277, 0.8249]}, {"w": "with", "b": [0.8338, 0.81, 0.8691, 0.8249]}, {"w": "the", "b": [0.1312, 0.8278, 0.1571, 0.8428]}, {"w": "new", "b": [0.1632, 0.8278, 0.1952, 0.8428]}, {"w": "one", "b": [0.2013, 0.8278, 0.2292, 0.8428]}, {"w": "has", "b": [0.2354, 0.8278, 0.2623, 0.8428]}, {"w": "a", "b": [0.2685, 0.8278, 0.2778, 0.8428]}, {"w": "significant", "b": [0.2839, 0.8278, 0.3661, 0.8428]}, {"w": "cost", "b": [0.3723, 0.8278, 0.4044, 0.8428]}, {"w": "or", "b": [0.4105, 0.8278, 0.4271, 0.8428]}, {"w": "poses", "b": [0.4333, 0.8278, 0.4763, 0.8428]}, {"w": "a", "b": [0.4825, 0.8278, 0.4918, 0.8428]}, {"w": "risk,", "b": [0.4979, 0.8278, 0.5327, 0.8428]}, {"w": "then", "b": [0.5388, 0.8278, 0.575, 0.8428]}, {"w": "just", "b": [0.5811, 0.8278, 0.6117, 0.8428]}, {"w": "knowing", "b": [0.6178, 0.8278, 0.6849, 0.8428]}, {"w": "that", "b": [0.6911, 0.8278, 0.7252, 0.8428]}, {"w": "the", "b": [0.7313, 0.8278, 0.7571, 0.8428]}, {"w": "new", "b": [0.7633, 0.8278, 0.7953, 0.8428]}, {"w": "model", "b": [0.8014, 0.8278, 0.8505, 0.8428]}, {"w": "is", "b": [0.8566, 0.8278, 0.8691, 0.8428]}, {"w": "“somewhat”", "b": [0.1286, 0.8458, 0.2266, 0.8608]}, {"w": "better", "b": [0.2327, 0.8458, 0.2818, 0.8608]}, {"w": "is", "b": [0.2879, 0.8458, 0.3004, 0.8608]}, {"w": "not", "b": [0.3066, 0.8458, 0.3334, 0.8608]}, {"w": "enough", "b": [0.3395, 0.8458, 0.3972, 0.8608]}, {"w": "to", "b": [0.4034, 0.8458, 0.4199, 0.8608]}, {"w": "make", "b": [0.4261, 0.8458, 0.4683, 0.8608]}, {"w": "a", "b": [0.4745, 0.8458, 0.4838, 0.8608]}, {"w": "replacement", "b": [0.4899, 0.8458, 0.5874, 0.8608]}, {"w": "decision.", "b": [0.5935, 0.8458, 0.6627, 0.8608]}, {"w": "In", "b": [0.671, 0.8458, 0.688, 0.8608]}, {"w": "this", "b": [0.6941, 0.8458, 0.7241, 0.8608]}, {"w": "case,", "b": [0.7303, 0.8458, 0.7685, 0.8608]}, {"w": "an", "b": [0.7747, 0.8458, 0.7943, 0.8608]}, {"w": "adjusted", "b": [0.8005, 0.8458, 0.8691, 0.8608]}]}, {"id": "b_16", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "11", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 229, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "test must be specifically crafted for the problem at hand, and the best way to do is to consult a statistician.2", "words": [{"w": "test", "b": [0.1312, 0.0885, 0.1605, 0.1033]}, {"w": "must", "b": [0.1662, 0.0885, 0.2049, 0.1033]}, {"w": "be", "b": [0.2106, 0.0885, 0.2292, 0.1033]}, {"w": "specifically", "b": [0.2349, 0.0885, 0.3205, 0.1033]}, {"w": "crafted", "b": [0.3262, 0.0885, 0.381, 0.1033]}, {"w": "for", "b": [0.3867, 0.0885, 0.4083, 0.1033]}, {"w": "the", "b": [0.414, 0.0885, 0.4392, 0.1033]}, {"w": "problem", "b": [0.4449, 0.0885, 0.5092, 0.1033]}, {"w": "at", "b": [0.5149, 0.0885, 0.531, 0.1033]}, {"w": "hand,", "b": [0.5367, 0.0885, 0.5809, 0.1033]}, {"w": "and", "b": [0.5867, 0.0885, 0.6158, 0.1033]}, {"w": "the", "b": [0.6215, 0.0885, 0.6466, 0.1033]}, {"w": "best", "b": [0.6523, 0.0885, 0.6851, 0.1033]}, {"w": "way", "b": [0.6908, 0.0885, 0.7214, 0.1033]}, {"w": "to", "b": [0.7271, 0.0885, 0.7432, 0.1033]}, {"w": "do", "b": [0.7488, 0.0885, 0.7679, 0.1033]}, {"w": "is", "b": [0.7736, 0.0885, 0.7858, 0.1033]}, {"w": "to", "b": [0.7915, 0.0885, 0.8075, 0.1033]}, {"w": "consult", "b": [0.8132, 0.0885, 0.8696, 0.1033]}, {"w": "a", "b": [0.1312, 0.1063, 0.1405, 0.1213]}, {"w": "statistician.2", "b": [0.1466, 0.1044, 0.2474, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "Carefully test the programming code of your A/B test. You will only have a valid model evaluation if you implemented everything right. Otherwise, you will not know that something is wrong: your test will not reveal that it’s broken.", "words": [{"w": "Carefully", "b": [0.1312, 0.1331, 0.2066, 0.1482]}, {"w": "test", "b": [0.2132, 0.1331, 0.2437, 0.1482]}, {"w": "the", "b": [0.2503, 0.1331, 0.2764, 0.1482]}, {"w": "programming", "b": [0.283, 0.1331, 0.3929, 0.1482]}, {"w": "code", "b": [0.3995, 0.1331, 0.4367, 0.1482]}, {"w": "of", "b": [0.4433, 0.1331, 0.4585, 0.1482]}, {"w": "your", "b": [0.4651, 0.1331, 0.5017, 0.1482]}, {"w": "A/B", "b": [0.5084, 0.1331, 0.5452, 0.1482]}, {"w": "test.", "b": [0.5518, 0.1331, 0.5875, 0.1482]}, {"w": "You", "b": [0.5971, 0.1331, 0.6295, 0.1482]}, {"w": "will", "b": [0.6362, 0.1331, 0.6654, 0.1482]}, {"w": "only", "b": [0.6721, 0.1331, 0.7071, 0.1482]}, {"w": "have", "b": [0.7137, 0.1331, 0.7509, 0.1482]}, {"w": "a", "b": [0.7575, 0.1331, 0.7669, 0.1482]}, {"w": "valid", "b": [0.7735, 0.1331, 0.8127, 0.1482]}, {"w": "model", "b": [0.8194, 0.1331, 0.869, 0.1482]}, {"w": "evaluation", "b": [0.1312, 0.1513, 0.2121, 0.1661]}, {"w": "if", "b": [0.2177, 0.1513, 0.2283, 0.1661]}, {"w": "you", "b": [0.2339, 0.1513, 0.262, 0.1661]}, {"w": "implemented", "b": [0.2676, 0.1513, 0.3686, 0.1661]}, {"w": "everything", "b": [0.3742, 0.1513, 0.4572, 0.1661]}, {"w": "right.", "b": [0.4628, 0.1513, 0.5055, 0.1661]}, {"w": "Otherwise,", "b": [0.5135, 0.1513, 0.5981, 0.1661]}, {"w": "you", "b": [0.6038, 0.1513, 0.6319, 0.1661]}, {"w": "will", "b": [0.6376, 0.1513, 0.6657, 0.1661]}, {"w": "not", "b": [0.6713, 0.1513, 0.6974, 0.1661]}, {"w": "know", "b": [0.703, 0.1513, 0.7442, 0.1661]}, {"w": "that", "b": [0.7498, 0.1513, 0.783, 0.1661]}, {"w": "something", "b": [0.7886, 0.1513, 0.8691, 0.1661]}, {"w": "is", "b": [0.1312, 0.1692, 0.1436, 0.1841]}, {"w": "wrong:", "b": [0.1498, 0.1692, 0.2042, 0.1841]}, {"w": "your", "b": [0.2124, 0.1692, 0.2483, 0.1841]}, {"w": "test", "b": [0.2545, 0.1692, 0.2843, 0.1841]}, {"w": "will", "b": [0.2905, 0.1692, 0.3192, 0.1841]}, {"w": "not", "b": [0.3253, 0.1692, 0.352, 0.1841]}, {"w": "reveal", "b": [0.3581, 0.1692, 0.4054, 0.1841]}, {"w": "that", "b": [0.4115, 0.1692, 0.4454, 0.1841]}, {"w": "it’s", "b": [0.4515, 0.1692, 0.4762, 0.1841]}, {"w": "broken.", "b": [0.4824, 0.1692, 0.5419, 0.1841]}]}, {"id": "b_2", "type": "paragraph", "text": "Also, make sure to apply measurements in groups A and B at the same time. Remember that traffic on a website behaves differently at different times of the day, or at different days of the week. For the purity of the experiment, avoid comparing measurements from different times. The same reasoning applies to other possible measurable parameters that might significantly affect user behavior, such as country of residence, speed of internet connection, or version of web browser.", "words": [{"w": "Also,", "b": [0.1305, 0.1962, 0.1703, 0.211]}, {"w": "make", "b": [0.1761, 0.1962, 0.2173, 0.211]}, {"w": "sure", "b": [0.2229, 0.1962, 0.2553, 0.211]}, {"w": "to", "b": [0.2609, 0.1962, 0.277, 0.211]}, {"w": "apply", "b": [0.2827, 0.1962, 0.3264, 0.211]}, {"w": "measurements", "b": [0.332, 0.1962, 0.4433, 0.211]}, {"w": "in", "b": [0.449, 0.1962, 0.4641, 0.211]}, {"w": "groups", "b": [0.4697, 0.1962, 0.5221, 0.211]}, {"w": "A", "b": [0.5278, 0.1962, 0.5414, 0.211]}, {"w": "and", "b": [0.547, 0.1962, 0.5762, 0.211]}, {"w": "B", "b": [0.5818, 0.1962, 0.5946, 0.211]}, {"w": "at", "b": [0.6003, 0.1962, 0.6164, 0.211]}, {"w": "the", "b": [0.622, 0.1962, 0.6472, 0.211]}, {"w": "same", "b": [0.6528, 0.1962, 0.6921, 0.211]}, {"w": "time.", "b": [0.6978, 0.1962, 0.738, 0.211]}, {"w": "Remember", "b": [0.746, 0.1962, 0.8307, 0.211]}, {"w": "that", "b": [0.8364, 0.1962, 0.8695, 0.211]}, {"w": "traffic", "b": [0.1312, 0.2141, 0.1775, 0.2289]}, {"w": "on", "b": [0.1832, 0.2141, 0.2023, 0.2289]}, {"w": "a", "b": [0.2079, 0.2141, 0.217, 0.2289]}, {"w": "website", "b": [0.2227, 0.2141, 0.2806, 0.2289]}, {"w": "behaves", "b": [0.2862, 0.2141, 0.3476, 0.2289]}, {"w": "differently", "b": [0.3533, 0.2141, 0.4333, 0.2289]}, {"w": "at", "b": [0.4389, 0.2141, 0.455, 0.2289]}, {"w": "different", "b": [0.4607, 0.2141, 0.5261, 0.2289]}, {"w": "times", "b": [0.5317, 0.2141, 0.574, 0.2289]}, {"w": "of", "b": [0.5797, 0.2141, 0.5943, 0.2289]}, {"w": "the", "b": [0.6, 0.2141, 0.6251, 0.2289]}, {"w": "day,", "b": [0.6308, 0.2141, 0.6624, 0.2289]}, {"w": "or", "b": [0.6682, 0.2141, 0.6843, 0.2289]}, {"w": "at", "b": [0.69, 0.2141, 0.706, 0.2289]}, {"w": "different", "b": [0.7117, 0.2141, 0.7771, 0.2289]}, {"w": "days", "b": [0.7828, 0.2141, 0.818, 0.2289]}, {"w": "of", "b": [0.8237, 0.2141, 0.8383, 0.2289]}, {"w": "the", "b": [0.844, 0.2141, 0.8691, 0.2289]}, {"w": "week.", "b": [0.1306, 0.232, 0.1741, 0.2469]}, {"w": "For", "b": [0.1824, 0.232, 0.209, 0.2469]}, {"w": "the", "b": [0.2152, 0.232, 0.2405, 0.2469]}, {"w": "purity", "b": [0.2467, 0.232, 0.2954, 0.2469]}, {"w": "of", "b": [0.3015, 0.232, 0.3162, 0.2469]}, {"w": "the", "b": [0.3224, 0.232, 0.3477, 0.2469]}, {"w": "experiment,", "b": [0.3539, 0.232, 0.4477, 0.2469]}, {"w": "avoid", "b": [0.4538, 0.232, 0.4959, 0.2469]}, {"w": "comparing", "b": [0.502, 0.232, 0.5852, 0.2469]}, {"w": "measurements", "b": [0.5913, 0.232, 0.7035, 0.2469]}, {"w": "from", "b": [0.7097, 0.232, 0.7467, 0.2469]}, {"w": "different", "b": [0.7529, 0.232, 0.8188, 0.2469]}, {"w": "times.", "b": [0.825, 0.232, 0.8727, 0.2469]}, {"w": "The", "b": [0.1306, 0.25, 0.1619, 0.2648]}, {"w": "same", "b": [0.168, 0.25, 0.2075, 0.2648]}, {"w": "reasoning", "b": [0.2136, 0.25, 0.2885, 0.2648]}, {"w": "applies", "b": [0.2947, 0.25, 0.3493, 0.2648]}, {"w": "to", "b": [0.3555, 0.25, 0.3716, 0.2648]}, {"w": "other", "b": [0.3778, 0.25, 0.4192, 0.2648]}, {"w": "possible", "b": [0.4253, 0.25, 0.4877, 0.2648]}, {"w": "measurable", "b": [0.4938, 0.25, 0.5829, 0.2648]}, {"w": "parameters", "b": [0.589, 0.25, 0.6771, 0.2648]}, {"w": "that", "b": [0.6832, 0.25, 0.7165, 0.2648]}, {"w": "might", "b": [0.7227, 0.25, 0.7686, 0.2648]}, {"w": "significantly", "b": [0.7747, 0.25, 0.8698, 0.2648]}, {"w": "affect", "b": [0.1312, 0.2679, 0.1743, 0.2828]}, {"w": "user", "b": [0.1805, 0.2679, 0.2131, 0.2828]}, {"w": "behavior,", "b": [0.2192, 0.2679, 0.2928, 0.2828]}, {"w": "such", "b": [0.2989, 0.2679, 0.334, 0.2828]}, {"w": "as", "b": [0.3402, 0.2679, 0.3565, 0.2828]}, {"w": "country", "b": [0.3626, 0.2679, 0.4235, 0.2828]}, {"w": "of", "b": [0.4296, 0.2679, 0.4443, 0.2828]}, {"w": "residence,", "b": [0.4505, 0.2679, 0.5277, 0.2828]}, {"w": "speed", "b": [0.5339, 0.2679, 0.5781, 0.2828]}, {"w": "of", "b": [0.5842, 0.2679, 0.5989, 0.2828]}, {"w": "internet", "b": [0.6051, 0.2679, 0.6675, 0.2828]}, {"w": "connection,", "b": [0.6736, 0.2679, 0.7639, 0.2828]}, {"w": "or", "b": [0.77, 0.2679, 0.7863, 0.2828]}, {"w": "version", "b": [0.7924, 0.2679, 0.8484, 0.2828]}, {"w": "of", "b": [0.8545, 0.2679, 0.8692, 0.2828]}, {"w": "web", "b": [0.1306, 0.2858, 0.1618, 0.3008]}, {"w": "browser.", "b": [0.168, 0.2858, 0.2354, 0.3008]}]}, {"id": "b_3", "type": "equation", "text": "7.3 Multi-Armed Bandit", "words": [{"w": "7.3", "b": [0.1312, 0.3338, 0.1631, 0.3518]}, {"w": "Multi-Armed", "b": [0.188, 0.3338, 0.3323, 0.3518]}, {"w": "Bandit", "b": [0.3406, 0.3338, 0.4147, 0.3518]}]}, {"id": "b_4", "type": "paragraph", "text": "A more advanced, and often preferable way of online model evaluation and selection, is multi-armed bandit (MAB). A/B testing has one major drawback. The number of test results in groups A and B you need to calculate the value of the A/B test is high. A significant portion of users routed to a suboptimal model would experience suboptimal behavior for a long time.", "words": [{"w": "A", "b": [0.1305, 0.3726, 0.1446, 0.3877]}, {"w": "more", "b": [0.1524, 0.3726, 0.1932, 0.3877]}, {"w": "advanced,", "b": [0.2009, 0.3726, 0.282, 0.3877]}, {"w": "and", "b": [0.2901, 0.3726, 0.3204, 0.3877]}, {"w": "often", "b": [0.3282, 0.3726, 0.3695, 0.3877]}, {"w": "preferable", "b": [0.3772, 0.3726, 0.4584, 0.3877]}, {"w": "way", "b": [0.4661, 0.3726, 0.498, 0.3877]}, {"w": "of", "b": [0.5058, 0.3726, 0.5209, 0.3877]}, {"w": "online", "b": [0.5286, 0.3726, 0.5778, 0.3877]}, {"w": "model", "b": [0.5855, 0.3726, 0.6352, 0.3877]}, {"w": "evaluation", "b": [0.6429, 0.3726, 0.7271, 0.3877]}, {"w": "and", "b": [0.7348, 0.3726, 0.7652, 0.3877]}, {"w": "selection,", "b": [0.7729, 0.3726, 0.8483, 0.3877]}, {"w": "is", "b": [0.8564, 0.3726, 0.8691, 0.3877]}, {"w": "multi-armed", "b": [0.1312, 0.3907, 0.2455, 0.4056]}, {"w": "bandit", "b": [0.2528, 0.3907, 0.3126, 0.4056]}, {"w": "(MAB).", "b": [0.319, 0.3905, 0.3836, 0.4056]}, {"w": "A/B", "b": [0.3899, 0.3905, 0.4268, 0.4056]}, {"w": "testing", "b": [0.4332, 0.3905, 0.4887, 0.4056]}, {"w": "has", "b": [0.4951, 0.3905, 0.5224, 0.4056]}, {"w": "one", "b": [0.5288, 0.3905, 0.557, 0.4056]}, {"w": "major", "b": [0.5634, 0.3905, 0.6115, 0.4056]}, {"w": "drawback.", "b": [0.6179, 0.3905, 0.7011, 0.4056]}, {"w": "The", "b": [0.71, 0.3905, 0.7424, 0.4056]}, {"w": "number", "b": [0.7488, 0.3905, 0.8111, 0.4056]}, {"w": "of", "b": [0.8175, 0.3905, 0.8326, 0.4056]}, {"w": "test", "b": [0.839, 0.3905, 0.8694, 0.4056]}, {"w": "results", "b": [0.1312, 0.4087, 0.1828, 0.4235]}, {"w": "in", "b": [0.1878, 0.4087, 0.2029, 0.4235]}, {"w": "groups", "b": [0.208, 0.4087, 0.2604, 0.4235]}, {"w": "A", "b": [0.2654, 0.4087, 0.279, 0.4235]}, {"w": "and", "b": [0.2841, 0.4087, 0.3132, 0.4235]}, {"w": "B", "b": [0.3183, 0.4087, 0.3311, 0.4235]}, {"w": "you", "b": [0.3362, 0.4087, 0.3643, 0.4235]}, {"w": "need", "b": [0.3693, 0.4087, 0.4055, 0.4235]}, {"w": "to", "b": [0.4106, 0.4087, 0.4267, 0.4235]}, {"w": "calculate", "b": [0.4317, 0.4087, 0.5011, 0.4235]}, {"w": "the", "b": [0.5062, 0.4087, 0.5313, 0.4235]}, {"w": "value", "b": [0.5364, 0.4087, 0.577, 0.4235]}, {"w": "of", "b": [0.5821, 0.4087, 0.5967, 0.4235]}, {"w": "the", "b": [0.6017, 0.4087, 0.6269, 0.4235]}, {"w": "A/B", "b": [0.6319, 0.4087, 0.6673, 0.4235]}, {"w": "test", "b": [0.6724, 0.4087, 0.7017, 0.4235]}, {"w": "is", "b": [0.7067, 0.4087, 0.7189, 0.4235]}, {"w": "high.", "b": [0.724, 0.4087, 0.7632, 0.4235]}, {"w": "A", "b": [0.771, 0.4087, 0.7845, 0.4235]}, {"w": "significant", "b": [0.7896, 0.4087, 0.8696, 0.4235]}, {"w": "portion", "b": [0.1312, 0.4265, 0.1907, 0.4415]}, {"w": "of", "b": [0.1968, 0.4265, 0.2118, 0.4415]}, {"w": "users", "b": [0.218, 0.4265, 0.2586, 0.4415]}, {"w": "routed", "b": [0.2647, 0.4265, 0.3175, 0.4415]}, {"w": "to", "b": [0.3236, 0.4265, 0.3401, 0.4415]}, {"w": "a", "b": [0.3463, 0.4265, 0.3556, 0.4415]}, {"w": "suboptimal", "b": [0.3617, 0.4265, 0.4522, 0.4415]}, {"w": "model", "b": [0.4584, 0.4265, 0.5074, 0.4415]}, {"w": "would", "b": [0.5136, 0.4265, 0.5617, 0.4415]}, {"w": "experience", "b": [0.5678, 0.4265, 0.6526, 0.4415]}, {"w": "suboptimal", "b": [0.6588, 0.4265, 0.7493, 0.4415]}, {"w": "behavior", "b": [0.7554, 0.4265, 0.8252, 0.4415]}, {"w": "for", "b": [0.8314, 0.4265, 0.8537, 0.4415]}, {"w": "a", "b": [0.8598, 0.4265, 0.8691, 0.4415]}, {"w": "long", "b": [0.1312, 0.4445, 0.1651, 0.4594]}, {"w": "time.", "b": [0.1712, 0.4445, 0.2122, 0.4594]}]}, {"id": "b_5", "type": "paragraph", "text": "Ideally, we would like to expose a user to a suboptimal model as few times as possible. At the same time, we need to expose users to each of the two models a number of times sufficient to get reliable estimates of both models’ performance. This is known as the exploration- exploitation dilemma: on one hand, we want to explore the models’ performance enough to be able to reliably choose the better one. On the other hand, we want to exploit the performance of the better model as much as possible.", "words": [{"w": "Ideally,", "b": [0.1312, 0.4715, 0.188, 0.4863]}, {"w": "we", "b": [0.1936, 0.4715, 0.2142, 0.4863]}, {"w": "would", "b": [0.2198, 0.4715, 0.2665, 0.4863]}, {"w": "like", "b": [0.272, 0.4715, 0.2992, 0.4863]}, {"w": "to", "b": [0.3047, 0.4715, 0.3208, 0.4863]}, {"w": "expose", "b": [0.3263, 0.4715, 0.3787, 0.4863]}, {"w": "a", "b": [0.3843, 0.4715, 0.3933, 0.4863]}, {"w": "user", "b": [0.3988, 0.4715, 0.4312, 0.4863]}, {"w": "to", "b": [0.4367, 0.4715, 0.4528, 0.4863]}, {"w": "a", "b": [0.4583, 0.4715, 0.4674, 0.4863]}, {"w": "suboptimal", "b": [0.4729, 0.4715, 0.5609, 0.4863]}, {"w": "model", "b": [0.5665, 0.4715, 0.6142, 0.4863]}, {"w": "as", "b": [0.6198, 0.4715, 0.636, 0.4863]}, {"w": "few", "b": [0.6415, 0.4715, 0.6681, 0.4863]}, {"w": "times", "b": [0.6737, 0.4715, 0.716, 0.4863]}, {"w": "as", "b": [0.7215, 0.4715, 0.7377, 0.4863]}, {"w": "possible.", "b": [0.7433, 0.4715, 0.8103, 0.4863]}, {"w": "At", "b": [0.8183, 0.4715, 0.8384, 0.4863]}, {"w": "the", "b": [0.8439, 0.4715, 0.8691, 0.4863]}, {"w": "same", "b": [0.1312, 0.4893, 0.1718, 0.5043]}, {"w": "time,", "b": [0.178, 0.4893, 0.2195, 0.5043]}, {"w": "we", "b": [0.2257, 0.4893, 0.247, 0.5043]}, {"w": "need", "b": [0.2531, 0.4893, 0.2905, 0.5043]}, {"w": "to", "b": [0.2967, 0.4893, 0.3133, 0.5043]}, {"w": "expose", "b": [0.3194, 0.4893, 0.3735, 0.5043]}, {"w": "users", "b": [0.3797, 0.4893, 0.4205, 0.5043]}, {"w": "to", "b": [0.4266, 0.4893, 0.4432, 0.5043]}, {"w": "each", "b": [0.4493, 0.4893, 0.4852, 0.5043]}, {"w": "of", "b": [0.4913, 0.4893, 0.5064, 0.5043]}, {"w": "the", "b": [0.5125, 0.4893, 0.5385, 0.5043]}, {"w": "two", "b": [0.5447, 0.4893, 0.5737, 0.5043]}, {"w": "models", "b": [0.5799, 0.4893, 0.6366, 0.5043]}, {"w": "a", "b": [0.6427, 0.4893, 0.6521, 0.5043]}, {"w": "number", "b": [0.6582, 0.4893, 0.7201, 0.5043]}, {"w": "of", "b": [0.7262, 0.4893, 0.7413, 0.5043]}, {"w": "times", "b": [0.7474, 0.4893, 0.7911, 0.5043]}, {"w": "sufficient", "b": [0.7973, 0.4893, 0.8696, 0.5043]}, {"w": "to", "b": [0.1312, 0.5072, 0.1479, 0.5223]}, {"w": "get", "b": [0.154, 0.5072, 0.179, 0.5223]}, {"w": "reliable", "b": [0.1852, 0.5072, 0.2446, 0.5223]}, {"w": "estimates", "b": [0.2508, 0.5072, 0.327, 0.5223]}, {"w": "of", "b": [0.3332, 0.5072, 0.3483, 0.5223]}, {"w": "both", "b": [0.3544, 0.5072, 0.3924, 0.5223]}, {"w": "models’", "b": [0.3986, 0.5072, 0.4606, 0.5223]}, {"w": "performance.", "b": [0.4668, 0.5072, 0.5732, 0.5223]}, {"w": "This", "b": [0.5813, 0.5072, 0.6179, 0.5223]}, {"w": "is", "b": [0.6241, 0.5072, 0.6367, 0.5223]}, {"w": "known", "b": [0.6428, 0.5072, 0.6959, 0.5223]}, {"w": "as", "b": [0.7021, 0.5072, 0.7189, 0.5223]}, {"w": "the", "b": [0.725, 0.5072, 0.751, 0.5223]}, {"w": "exploration-", "b": [0.7569, 0.5073, 0.8688, 0.5223]}, {"w": "exploitation", "b": [0.1312, 0.5253, 0.2415, 0.5402]}, {"w": "dilemma:", "b": [0.2486, 0.5253, 0.333, 0.5402]}, {"w": "on", "b": [0.3412, 0.5253, 0.3605, 0.5402]}, {"w": "one", "b": [0.3667, 0.5253, 0.3941, 0.5402]}, {"w": "hand,", "b": [0.4003, 0.5253, 0.445, 0.5402]}, {"w": "we", "b": [0.4511, 0.5253, 0.472, 0.5402]}, {"w": "want", "b": [0.4781, 0.5253, 0.5167, 0.5402]}, {"w": "to", "b": [0.5229, 0.5253, 0.5391, 0.5402]}, {"w": "explore", "b": [0.5453, 0.5253, 0.6028, 0.5402]}, {"w": "the", "b": [0.6089, 0.5253, 0.6343, 0.5402]}, {"w": "models’", "b": [0.6405, 0.5253, 0.7011, 0.5402]}, {"w": "performance", "b": [0.7072, 0.5253, 0.8059, 0.5402]}, {"w": "enough", "b": [0.8121, 0.5253, 0.869, 0.5402]}, {"w": "to", "b": [0.1312, 0.5431, 0.148, 0.5582]}, {"w": "be", "b": [0.1552, 0.5431, 0.1745, 0.5582]}, {"w": "able", "b": [0.1818, 0.5431, 0.2152, 0.5582]}, {"w": "to", "b": [0.2224, 0.5431, 0.2392, 0.5582]}, {"w": "reliably", "b": [0.2464, 0.5431, 0.3077, 0.5582]}, {"w": "choose", "b": [0.3149, 0.5431, 0.3683, 0.5582]}, {"w": "the", "b": [0.3756, 0.5431, 0.4017, 0.5582]}, {"w": "better", "b": [0.4089, 0.5431, 0.4587, 0.5582]}, {"w": "one.", "b": [0.4659, 0.5431, 0.4994, 0.5582]}, {"w": "On", "b": [0.5108, 0.5431, 0.5359, 0.5582]}, {"w": "the", "b": [0.5431, 0.5431, 0.5693, 0.5582]}, {"w": "other", "b": [0.5765, 0.5431, 0.6194, 0.5582]}, {"w": "hand,", "b": [0.6266, 0.5431, 0.6727, 0.5582]}, {"w": "we", "b": [0.6802, 0.5431, 0.7016, 0.5582]}, {"w": "want", "b": [0.7088, 0.5431, 0.7486, 0.5582]}, {"w": "to", "b": [0.7558, 0.5431, 0.7725, 0.5582]}, {"w": "exploit", "b": [0.7798, 0.5431, 0.8357, 0.5582]}, {"w": "the", "b": [0.8429, 0.5431, 0.8691, 0.5582]}, {"w": "performance", "b": [0.1312, 0.5611, 0.2308, 0.5761]}, {"w": "of", "b": [0.237, 0.5611, 0.2518, 0.5761]}, {"w": "the", "b": [0.258, 0.5611, 0.2836, 0.5761]}, {"w": "better", "b": [0.2898, 0.5611, 0.3385, 0.5761]}, {"w": "model", "b": [0.3447, 0.5611, 0.3934, 0.5761]}, {"w": "as", "b": [0.3995, 0.5611, 0.4161, 0.5761]}, {"w": "much", "b": [0.4222, 0.5611, 0.4653, 0.5761]}, {"w": "as", "b": [0.4714, 0.5611, 0.4879, 0.5761]}, {"w": "possible.", "b": [0.4941, 0.5611, 0.5625, 0.5761]}]}, {"id": "b_6", "type": "paragraph", "text": "In probability theory, the multi-armed bandit problem is a problem in which a fixed and limited set of resources must be allocated between competing choices in a way that maximizes the expected reward. Each choice’s properties are only partially known at the time of allocation, and may become better understood as time passes and we allocate resources to the choice.", "words": [{"w": "In", "b": [0.1312, 0.5882, 0.1478, 0.603]}, {"w": "probability", "b": [0.1521, 0.5882, 0.2386, 0.603]}, {"w": "theory,", "b": [0.2429, 0.5882, 0.2972, 0.603]}, {"w": "the", "b": [0.3019, 0.5882, 0.327, 0.603]}, {"w": "multi-armed", "b": [0.3314, 0.5882, 0.4284, 0.603]}, {"w": "bandit", "b": [0.4327, 0.5882, 0.4839, 0.603]}, {"w": "problem", "b": [0.4883, 0.5882, 0.5526, 0.603]}, {"w": "is", "b": [0.557, 0.5882, 0.5691, 0.603]}, {"w": "a", "b": [0.5735, 0.5882, 0.5825, 0.603]}, {"w": "problem", "b": [0.5868, 0.5882, 0.6512, 0.603]}, {"w": "in", "b": [0.6555, 0.5882, 0.6706, 0.603]}, {"w": "which", "b": [0.6749, 0.5882, 0.7206, 0.603]}, {"w": "a", "b": [0.725, 0.5882, 0.734, 0.603]}, {"w": "fixed", "b": [0.7383, 0.5882, 0.776, 0.603]}, {"w": "and", "b": [0.7803, 0.5882, 0.8095, 0.603]}, {"w": "limited", "b": [0.8138, 0.5882, 0.8691, 0.603]}, {"w": "set", "b": [0.1312, 0.606, 0.1541, 0.621]}, {"w": "of", "b": [0.1603, 0.606, 0.1753, 0.621]}, {"w": "resources", "b": [0.1815, 0.606, 0.2553, 0.621]}, {"w": "must", "b": [0.2615, 0.606, 0.3015, 0.621]}, {"w": "be", "b": [0.3076, 0.606, 0.3268, 0.621]}, {"w": "allocated", "b": [0.3329, 0.606, 0.406, 0.621]}, {"w": "between", "b": [0.4121, 0.606, 0.4779, 0.621]}, {"w": "competing", "b": [0.484, 0.606, 0.5684, 0.621]}, {"w": "choices", "b": [0.5746, 0.606, 0.6312, 0.621]}, {"w": "in", "b": [0.6373, 0.606, 0.6529, 0.621]}, {"w": "a", "b": [0.659, 0.606, 0.6683, 0.621]}, {"w": "way", "b": [0.6745, 0.606, 0.7061, 0.621]}, {"w": "that", "b": [0.7122, 0.606, 0.7464, 0.621]}, {"w": "maximizes", "b": [0.7526, 0.606, 0.8371, 0.621]}, {"w": "the", "b": [0.8432, 0.606, 0.8691, 0.621]}, {"w": "expected", "b": [0.1312, 0.624, 0.201, 0.6389]}, {"w": "reward.", "b": [0.2071, 0.624, 0.2663, 0.6389]}, {"w": "Each", "b": [0.2745, 0.624, 0.3136, 0.6389]}, {"w": "choice’s", "b": [0.3198, 0.624, 0.38, 0.6389]}, {"w": "properties", "b": [0.3862, 0.624, 0.4657, 0.6389]}, {"w": "are", "b": [0.4719, 0.624, 0.4962, 0.6389]}, {"w": "only", "b": [0.5023, 0.624, 0.5362, 0.6389]}, {"w": "partially", "b": [0.5423, 0.624, 0.6095, 0.6389]}, {"w": "known", "b": [0.6157, 0.624, 0.6672, 0.6389]}, {"w": "at", "b": [0.6733, 0.624, 0.6895, 0.6389]}, {"w": "the", "b": [0.6957, 0.624, 0.7209, 0.6389]}, {"w": "time", "b": [0.7271, 0.624, 0.7624, 0.6389]}, {"w": "of", "b": [0.7686, 0.624, 0.7832, 0.6389]}, {"w": "allocation,", "b": [0.7894, 0.624, 0.8717, 0.6389]}, {"w": "and", "b": [0.1312, 0.6419, 0.161, 0.6569]}, {"w": "may", "b": [0.1671, 0.6419, 0.2009, 0.6569]}, {"w": "become", "b": [0.2071, 0.6419, 0.2671, 0.6569]}, {"w": "better", "b": [0.2732, 0.6419, 0.322, 0.6569]}, {"w": "understood", "b": [0.3282, 0.6419, 0.4186, 0.6569]}, {"w": "as", "b": [0.4247, 0.6419, 0.4412, 0.6569]}, {"w": "time", "b": [0.4474, 0.6419, 0.4833, 0.6569]}, {"w": "passes", "b": [0.4894, 0.6419, 0.539, 0.6569]}, {"w": "and", "b": [0.5451, 0.6419, 0.5748, 0.6569]}, {"w": "we", "b": [0.581, 0.6419, 0.602, 0.6569]}, {"w": "allocate", "b": [0.6082, 0.6419, 0.6702, 0.6569]}, {"w": "resources", "b": [0.6764, 0.6419, 0.7495, 0.6569]}, {"w": "to", "b": [0.7556, 0.6419, 0.772, 0.6569]}, {"w": "the", "b": [0.7782, 0.6419, 0.8038, 0.6569]}, {"w": "choice.", "b": [0.81, 0.6419, 0.8638, 0.6569]}]}, {"id": "b_7", "type": "paragraph", "text": "Let’s see how the multi-armed bandit problem applies to an online evaluation of two models. (The approach for more than two models is the same.)", "words": [{"w": "Let’s", "b": [0.1312, 0.6689, 0.17, 0.6838]}, {"w": "see", "b": [0.1762, 0.6689, 0.1995, 0.6838]}, {"w": "how", "b": [0.2057, 0.6689, 0.2375, 0.6838]}, {"w": "the", "b": [0.2437, 0.6689, 0.2689, 0.6838]}, {"w": "multi-armed", "b": [0.2751, 0.6689, 0.3727, 0.6838]}, {"w": "bandit", "b": [0.3788, 0.6689, 0.4304, 0.6838]}, {"w": "problem", "b": [0.4365, 0.6689, 0.5013, 0.6838]}, {"w": "applies", "b": [0.5074, 0.6689, 0.5621, 0.6838]}, {"w": "to", "b": [0.5683, 0.6689, 0.5845, 0.6838]}, {"w": "an", "b": [0.5906, 0.6689, 0.6098, 0.6838]}, {"w": "online", "b": [0.616, 0.6689, 0.6635, 0.6838]}, {"w": "evaluation", "b": [0.6696, 0.6689, 0.751, 0.6838]}, {"w": "of", "b": [0.7571, 0.6689, 0.7718, 0.6838]}, {"w": "two", "b": [0.778, 0.6689, 0.8062, 0.6838]}, {"w": "models.", "b": [0.8124, 0.6689, 0.8726, 0.6838]}, {"w": "(The", "b": [0.1291, 0.6868, 0.168, 0.7017]}, {"w": "approach", "b": [0.1742, 0.6868, 0.2476, 0.7017]}, {"w": "for", "b": [0.2537, 0.6868, 0.2758, 0.7017]}, {"w": "more", "b": [0.282, 0.6868, 0.322, 0.7017]}, {"w": "than", "b": [0.3281, 0.6868, 0.3651, 0.7017]}, {"w": "two", "b": [0.3712, 0.6868, 0.3999, 0.7017]}, {"w": "models", "b": [0.4061, 0.6868, 0.462, 0.7017]}, {"w": "is", "b": [0.4682, 0.6868, 0.4806, 0.7017]}, {"w": "the", "b": [0.4868, 0.6868, 0.5124, 0.7017]}, {"w": "same.)", "b": [0.5186, 0.6868, 0.5709, 0.7017]}]}, {"id": "b_8", "type": "paragraph", "text": "The limited set of resources we have are the users of our system. The competing choices, also called “arms,” are our models. We can allocate a resource to a choice (in other words, we can “play an arm”) by routing a user to a version of the system running a specific model. We want", "words": [{"w": "The", "b": [0.1306, 0.7138, 0.1617, 0.7286]}, {"w": "limited", "b": [0.1676, 0.7138, 0.2228, 0.7286]}, {"w": "set", "b": [0.2287, 0.7138, 0.2509, 0.7286]}, {"w": "of", "b": [0.2567, 0.7138, 0.2713, 0.7286]}, {"w": "resources", "b": [0.2771, 0.7138, 0.3488, 0.7286]}, {"w": "we", "b": [0.3547, 0.7138, 0.3752, 0.7286]}, {"w": "have", "b": [0.3811, 0.7138, 0.4167, 0.7286]}, {"w": "are", "b": [0.4226, 0.7138, 0.4467, 0.7286]}, {"w": "the", "b": [0.4526, 0.7138, 0.4777, 0.7286]}, {"w": "users", "b": [0.4835, 0.7138, 0.523, 0.7286]}, {"w": "of", "b": [0.5288, 0.7138, 0.5434, 0.7286]}, {"w": "our", "b": [0.5493, 0.7138, 0.5754, 0.7286]}, {"w": "system.", "b": [0.5813, 0.7138, 0.6403, 0.7286]}, {"w": "The", "b": [0.6484, 0.7138, 0.6795, 0.7286]}, {"w": "competing", "b": [0.6853, 0.7138, 0.7673, 0.7286]}, {"w": "choices,", "b": [0.7731, 0.7138, 0.833, 0.7286]}, {"w": "also", "b": [0.8389, 0.7138, 0.8691, 0.7286]}, {"w": "called", "b": [0.1312, 0.7318, 0.1765, 0.7466]}, {"w": "“arms,”", "b": [0.1822, 0.7318, 0.2427, 0.7466]}, {"w": "are", "b": [0.2485, 0.7318, 0.2727, 0.7466]}, {"w": "our", "b": [0.2784, 0.7318, 0.3046, 0.7466]}, {"w": "models.", "b": [0.3104, 0.7318, 0.3703, 0.7466]}, {"w": "We", "b": [0.3784, 0.7318, 0.4035, 0.7466]}, {"w": "can", "b": [0.4092, 0.7318, 0.4364, 0.7466]}, {"w": "allocate", "b": [0.4421, 0.7318, 0.5029, 0.7466]}, {"w": "a", "b": [0.5087, 0.7318, 0.5177, 0.7466]}, {"w": "resource", "b": [0.5235, 0.7318, 0.588, 0.7466]}, {"w": "to", "b": [0.5938, 0.7318, 0.6099, 0.7466]}, {"w": "a", "b": [0.6157, 0.7318, 0.6247, 0.7466]}, {"w": "choice", "b": [0.6305, 0.7318, 0.6782, 0.7466]}, {"w": "(in", "b": [0.684, 0.7318, 0.7061, 0.7466]}, {"w": "other", "b": [0.7118, 0.7318, 0.7531, 0.7466]}, {"w": "words,", "b": [0.7589, 0.7318, 0.8098, 0.7466]}, {"w": "we", "b": [0.8156, 0.7318, 0.8362, 0.7466]}, {"w": "can", "b": [0.842, 0.7318, 0.8691, 0.7466]}, {"w": "“play", "b": [0.1286, 0.7497, 0.1703, 0.7645]}, {"w": "an", "b": [0.1756, 0.7497, 0.1947, 0.7645]}, {"w": "arm”)", "b": [0.2, 0.7497, 0.2467, 0.7645]}, {"w": "by", "b": [0.2521, 0.7497, 0.2712, 0.7645]}, {"w": "routing", "b": [0.2765, 0.7497, 0.3338, 0.7645]}, {"w": "a", "b": [0.3391, 0.7497, 0.3481, 0.7645]}, {"w": "user", "b": [0.3534, 0.7497, 0.3858, 0.7645]}, {"w": "to", "b": [0.3911, 0.7497, 0.4071, 0.7645]}, {"w": "a", "b": [0.4124, 0.7497, 0.4215, 0.7645]}, {"w": "version", "b": [0.4268, 0.7497, 0.4822, 0.7645]}, {"w": "of", "b": [0.4875, 0.7497, 0.5021, 0.7645]}, {"w": "the", "b": [0.5074, 0.7497, 0.5325, 0.7645]}, {"w": "system", "b": [0.5378, 0.7497, 0.5918, 0.7645]}, {"w": "running", "b": [0.5971, 0.7497, 0.6585, 0.7645]}, {"w": "a", "b": [0.6638, 0.7497, 0.6728, 0.7645]}, {"w": "specific", "b": [0.6781, 0.7497, 0.735, 0.7645]}, {"w": "model.", "b": [0.7403, 0.7497, 0.7931, 0.7645]}, {"w": "We", "b": [0.801, 0.7497, 0.8261, 0.7645]}, {"w": "want", "b": [0.8314, 0.7497, 0.8696, 0.7645]}]}, {"id": "b_9", "type": "paragraph", "text": "to maximize the expected reward, where the reward is given by the business performance metric. Examples might be the average amount of time spent on the website during a session, the average number of news articles read during a week, the percentage of users who purchased the recommended article, etc.", "words": [{"w": "to", "b": [0.1312, 0.7674, 0.148, 0.7825]}, {"w": "maximize", "b": [0.1543, 0.7674, 0.2322, 0.7825]}, {"w": "the", "b": [0.2386, 0.7674, 0.2647, 0.7825]}, {"w": "expected", "b": [0.2711, 0.7674, 0.3433, 0.7825]}, {"w": "reward,", "b": [0.3497, 0.7674, 0.411, 0.7825]}, {"w": "where", "b": [0.4174, 0.7674, 0.4656, 0.7825]}, {"w": "the", "b": [0.4719, 0.7674, 0.4981, 0.7825]}, {"w": "reward", "b": [0.5044, 0.7674, 0.5605, 0.7825]}, {"w": "is", "b": [0.5669, 0.7674, 0.5795, 0.7825]}, {"w": "given", "b": [0.5859, 0.7674, 0.6288, 0.7825]}, {"w": "by", "b": [0.6352, 0.7674, 0.6551, 0.7825]}, {"w": "the", "b": [0.6614, 0.7674, 0.6876, 0.7825]}, {"w": "business", "b": [0.6939, 0.7674, 0.7612, 0.7825]}, {"w": "performance", "b": [0.7676, 0.7674, 0.8692, 0.7825]}, {"w": "metric.", "b": [0.1312, 0.7854, 0.1888, 0.8005]}, {"w": "Examples", "b": [0.2029, 0.7854, 0.2822, 0.8005]}, {"w": "might", "b": [0.2903, 0.7854, 0.3379, 0.8005]}, {"w": "be", "b": [0.346, 0.7854, 0.3654, 0.8005]}, {"w": "the", "b": [0.3735, 0.7854, 0.3996, 0.8005]}, {"w": "average", "b": [0.4077, 0.7854, 0.469, 0.8005]}, {"w": "amount", "b": [0.4771, 0.7854, 0.5393, 0.8005]}, {"w": "of", "b": [0.5474, 0.7854, 0.5626, 0.8005]}, {"w": "time", "b": [0.5707, 0.7854, 0.6073, 0.8005]}, {"w": "spent", "b": [0.6154, 0.7854, 0.6594, 0.8005]}, {"w": "on", "b": [0.6675, 0.7854, 0.6874, 0.8005]}, {"w": "the", "b": [0.6955, 0.7854, 0.7217, 0.8005]}, {"w": "website", "b": [0.7298, 0.7854, 0.79, 0.8005]}, {"w": "during", "b": [0.7982, 0.7854, 0.8515, 0.8005]}, {"w": "a", "b": [0.8597, 0.7854, 0.8691, 0.8005]}, {"w": "session,", "b": [0.1312, 0.8035, 0.1899, 0.8183]}, {"w": "the", "b": [0.196, 0.8035, 0.2212, 0.8183]}, {"w": "average", "b": [0.2273, 0.8035, 0.2862, 0.8183]}, {"w": "number", "b": [0.2923, 0.8035, 0.3522, 0.8183]}, {"w": "of", "b": [0.3584, 0.8035, 0.373, 0.8183]}, {"w": "news", "b": [0.3791, 0.8035, 0.4174, 0.8183]}, {"w": "articles", "b": [0.4235, 0.8035, 0.48, 0.8183]}, {"w": "read", "b": [0.4862, 0.8035, 0.5204, 0.8183]}, {"w": "during", "b": [0.5266, 0.8035, 0.5779, 0.8183]}, {"w": "a", "b": [0.5841, 0.8035, 0.5931, 0.8183]}, {"w": "week,", "b": [0.5992, 0.8035, 0.6425, 0.8183]}, {"w": "the", "b": [0.6486, 0.8035, 0.6738, 0.8183]}, {"w": "percentage", "b": [0.6799, 0.8035, 0.7645, 0.8183]}, {"w": "of", "b": [0.7706, 0.8035, 0.7852, 0.8183]}, {"w": "users", "b": [0.7913, 0.8035, 0.8309, 0.8183]}, {"w": "who", "b": [0.837, 0.8035, 0.8692, 0.8183]}, {"w": "purchased", "b": [0.1312, 0.8214, 0.2119, 0.8363]}, {"w": "the", "b": [0.2181, 0.8214, 0.2437, 0.8363]}, {"w": "recommended", "b": [0.2498, 0.8214, 0.3606, 0.8363]}, {"w": "article,", "b": [0.3668, 0.8214, 0.4222, 0.8363]}, {"w": "etc.", "b": [0.4284, 0.8214, 0.4571, 0.8363]}]}, {"id": "b_10", "type": "paragraph", "text": "2Unfortunately, in a compact book describing all special cases and tests would be impractical. Please consult the book’s companion wiki from time to time. More statistical tests will be added over time.", "words": [{"w": "2Unfortunately,", "b": [0.1518, 0.8469, 0.2608, 0.8608]}, {"w": "in", "b": [0.2666, 0.8487, 0.2799, 0.8608]}, {"w": "a", "b": [0.2856, 0.8487, 0.2936, 0.8608]}, {"w": "compact", "b": [0.2993, 0.8487, 0.358, 0.8608]}, {"w": "book", "b": [0.3637, 0.8487, 0.3979, 0.8608]}, {"w": "describing", "b": [0.4036, 0.8487, 0.4739, 0.8608]}, {"w": "all", "b": [0.4796, 0.8487, 0.4964, 0.8608]}, {"w": "special", "b": [0.5022, 0.8487, 0.5489, 0.8608]}, {"w": "cases", "b": [0.5546, 0.8487, 0.5894, 0.8608]}, {"w": "and", "b": [0.5951, 0.8487, 0.6209, 0.8608]}, {"w": "tests", "b": [0.6266, 0.8487, 0.6588, 0.8608]}, {"w": "would", "b": [0.6645, 0.8487, 0.7058, 0.8608]}, {"w": "be", "b": [0.7115, 0.8487, 0.7279, 0.8608]}, {"w": "impractical.", "b": [0.7336, 0.8487, 0.8162, 0.8608]}, {"w": "Please", "b": [0.8247, 0.8487, 0.8685, 0.8608]}, {"w": "consult", "b": [0.1312, 0.863, 0.1801, 0.875]}, {"w": "the", "b": [0.1853, 0.863, 0.2071, 0.875]}, {"w": "book’s", "b": [0.2123, 0.863, 0.2564, 0.875]}, {"w": "companion", "b": [0.2616, 0.863, 0.3356, 0.875]}, {"w": "wiki", "b": [0.3409, 0.863, 0.3692, 0.875]}, {"w": "from", "b": [0.3744, 0.863, 0.4062, 0.875]}, {"w": "time", "b": [0.4114, 0.863, 0.4419, 0.875]}, {"w": "to", "b": [0.4471, 0.863, 0.4611, 0.875]}, {"w": "time.", "b": [0.4663, 0.863, 0.5011, 0.875]}, {"w": "More", "b": [0.5081, 0.863, 0.5434, 0.875]}, {"w": "statistical", "b": [0.5486, 0.863, 0.615, 0.875]}, {"w": "tests", "b": [0.6202, 0.863, 0.6517, 0.875]}, {"w": "will", "b": [0.657, 0.863, 0.6813, 0.875]}, {"w": "be", "b": [0.6866, 0.863, 0.7027, 0.875]}, {"w": "added", "b": [0.7079, 0.863, 0.7488, 0.875]}, {"w": "over", "b": [0.7541, 0.863, 0.7824, 0.875]}, {"w": "time.", "b": [0.7876, 0.863, 0.8224, 0.875]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "12", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 230, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "UCB1 (for Upper Confidence Bound) is a popular algorithm for solving the multi-armed bandit problem. The algorithm dynamically chooses an arm, based on the performance of that arm in the past, and how much the algorithm knows about it. In other words, UCB1 routes the user to the best performing model more often when its confidence about the model performance is high. Otherwise, UCB1 might route the user to a suboptimal model so as to get a more confident estimate of that model’s performance. Once the algorithm is confident enough about the performance of each model, it almost always routes users to the best performing model.", "words": [{"w": "UCB1", "b": [0.1312, 0.0884, 0.1886, 0.1034]}, {"w": "(for", "b": [0.1949, 0.0883, 0.2248, 0.1034]}, {"w": "Upper", "b": [0.2311, 0.0883, 0.2824, 0.1034]}, {"w": "Confidence", "b": [0.2888, 0.0883, 0.3787, 0.1034]}, {"w": "Bound)", "b": [0.3851, 0.0883, 0.4465, 0.1034]}, {"w": "is", "b": [0.4529, 0.0883, 0.4656, 0.1034]}, {"w": "a", "b": [0.4719, 0.0883, 0.4813, 0.1034]}, {"w": "popular", "b": [0.4877, 0.0883, 0.551, 0.1034]}, {"w": "algorithm", "b": [0.5573, 0.0883, 0.6369, 0.1034]}, {"w": "for", "b": [0.6432, 0.0883, 0.6657, 0.1034]}, {"w": "solving", "b": [0.6721, 0.0883, 0.7292, 0.1034]}, {"w": "the", "b": [0.7356, 0.0883, 0.7617, 0.1034]}, {"w": "multi-armed", "b": [0.7681, 0.0883, 0.869, 0.1034]}, {"w": "bandit", "b": [0.1312, 0.1065, 0.1825, 0.1213]}, {"w": "problem.", "b": [0.1874, 0.1065, 0.2568, 0.1213]}, {"w": "The", "b": [0.2646, 0.1065, 0.2957, 0.1213]}, {"w": "algorithm", "b": [0.3006, 0.1065, 0.3771, 0.1213]}, {"w": "dynamically", "b": [0.382, 0.1065, 0.4774, 0.1213]}, {"w": "chooses", "b": [0.4823, 0.1065, 0.5408, 0.1213]}, {"w": "an", "b": [0.5457, 0.1065, 0.5648, 0.1213]}, {"w": "arm,", "b": [0.5698, 0.1065, 0.606, 0.1213]}, {"w": "based", "b": [0.6111, 0.1065, 0.6555, 0.1213]}, {"w": "on", "b": [0.6604, 0.1065, 0.6795, 0.1213]}, {"w": "the", "b": [0.6844, 0.1065, 0.7095, 0.1213]}, {"w": "performance", "b": [0.7144, 0.1065, 0.812, 0.1213]}, {"w": "of", "b": [0.8169, 0.1065, 0.8315, 0.1213]}, {"w": "that", "b": [0.8364, 0.1065, 0.8696, 0.1213]}, {"w": "arm", "b": [0.1312, 0.1244, 0.1624, 0.1392]}, {"w": "in", "b": [0.167, 0.1244, 0.1821, 0.1392]}, {"w": "the", "b": [0.1867, 0.1244, 0.2118, 0.1392]}, {"w": "past,", "b": [0.2164, 0.1244, 0.2547, 0.1392]}, {"w": "and", "b": [0.2596, 0.1244, 0.2887, 0.1392]}, {"w": "how", "b": [0.2933, 0.1244, 0.325, 0.1392]}, {"w": "much", "b": [0.3296, 0.1244, 0.3717, 0.1392]}, {"w": "the", "b": [0.3763, 0.1244, 0.4015, 0.1392]}, {"w": "algorithm", "b": [0.4061, 0.1244, 0.4825, 0.1392]}, {"w": "knows", "b": [0.4871, 0.1244, 0.5354, 0.1392]}, {"w": "about", "b": [0.54, 0.1244, 0.5857, 0.1392]}, {"w": "it.", "b": [0.5903, 0.1244, 0.6074, 0.1392]}, {"w": "In", "b": [0.615, 0.1244, 0.6316, 0.1392]}, {"w": "other", "b": [0.6362, 0.1244, 0.6775, 0.1392]}, {"w": "words,", "b": [0.6821, 0.1244, 0.7329, 0.1392]}, {"w": "UCB1", "b": [0.7379, 0.1244, 0.7863, 0.1392]}, {"w": "routes", "b": [0.7909, 0.1244, 0.8393, 0.1392]}, {"w": "the", "b": [0.8439, 0.1244, 0.869, 0.1392]}, {"w": "user", "b": [0.1312, 0.1424, 0.1636, 0.1572]}, {"w": "to", "b": [0.1679, 0.1424, 0.1839, 0.1572]}, {"w": "the", "b": [0.1883, 0.1424, 0.2134, 0.1572]}, {"w": "best", "b": [0.2177, 0.1424, 0.2505, 0.1572]}, {"w": "performing", "b": [0.2548, 0.1424, 0.3413, 0.1572]}, {"w": "model", "b": [0.3456, 0.1424, 0.3934, 0.1572]}, {"w": "more", "b": [0.3977, 0.1424, 0.4369, 0.1572]}, {"w": "often", "b": [0.4412, 0.1424, 0.4809, 0.1572]}, {"w": "when", "b": [0.4852, 0.1424, 0.5265, 0.1572]}, {"w": "its", "b": [0.5308, 0.1424, 0.55, 0.1572]}, {"w": "confidence", "b": [0.5543, 0.1424, 0.6357, 0.1572]}, {"w": "about", "b": [0.64, 0.1424, 0.6857, 0.1572]}, {"w": "the", "b": [0.69, 0.1424, 0.7152, 0.1572]}, {"w": "model", "b": [0.7195, 0.1424, 0.7672, 0.1572]}, {"w": "performance", "b": [0.7715, 0.1424, 0.8691, 0.1572]}, {"w": "is", "b": [0.1312, 0.1601, 0.1438, 0.1752]}, {"w": "high.", "b": [0.15, 0.1601, 0.1905, 0.1752]}, {"w": "Otherwise,", "b": [0.1987, 0.1601, 0.2861, 0.1752]}, {"w": "UCB1", "b": [0.2923, 0.1601, 0.3424, 0.1752]}, {"w": "might", "b": [0.3485, 0.1601, 0.3958, 0.1752]}, {"w": "route", "b": [0.4019, 0.1601, 0.4446, 0.1752]}, {"w": "the", "b": [0.4507, 0.1601, 0.4767, 0.1752]}, {"w": "user", "b": [0.4829, 0.1601, 0.5163, 0.1752]}, {"w": "to", "b": [0.5225, 0.1601, 0.5391, 0.1752]}, {"w": "a", "b": [0.5452, 0.1601, 0.5546, 0.1752]}, {"w": "suboptimal", "b": [0.5607, 0.1601, 0.6517, 0.1752]}, {"w": "model", "b": [0.6579, 0.1601, 0.7072, 0.1752]}, {"w": "so", "b": [0.7133, 0.1601, 0.7301, 0.1752]}, {"w": "as", "b": [0.7362, 0.1601, 0.7529, 0.1752]}, {"w": "to", "b": [0.7591, 0.1601, 0.7757, 0.1752]}, {"w": "get", "b": [0.7819, 0.1601, 0.8068, 0.1752]}, {"w": "a", "b": [0.813, 0.1601, 0.8223, 0.1752]}, {"w": "more", "b": [0.8285, 0.1601, 0.869, 0.1752]}, {"w": "confident", "b": [0.1312, 0.1782, 0.2031, 0.1931]}, {"w": "estimate", "b": [0.208, 0.1782, 0.2744, 0.1931]}, {"w": "of", "b": [0.2794, 0.1782, 0.294, 0.1931]}, {"w": "that", "b": [0.2989, 0.1782, 0.3321, 0.1931]}, {"w": "model’s", "b": [0.337, 0.1782, 0.3969, 0.1931]}, {"w": "performance.", "b": [0.4018, 0.1782, 0.5044, 0.1931]}, {"w": "Once", "b": [0.5122, 0.1782, 0.5524, 0.1931]}, {"w": "the", "b": [0.5574, 0.1782, 0.5825, 0.1931]}, {"w": "algorithm", "b": [0.5874, 0.1782, 0.6638, 0.1931]}, {"w": "is", "b": [0.6688, 0.1782, 0.6809, 0.1931]}, {"w": "confident", "b": [0.6859, 0.1782, 0.7577, 0.1931]}, {"w": "enough", "b": [0.7627, 0.1782, 0.819, 0.1931]}, {"w": "about", "b": [0.8239, 0.1782, 0.8696, 0.1931]}, {"w": "the", "b": [0.1312, 0.1961, 0.1569, 0.211]}, {"w": "performance", "b": [0.163, 0.1961, 0.2626, 0.211]}, {"w": "of", "b": [0.2688, 0.1961, 0.2836, 0.211]}, {"w": "each", "b": [0.2898, 0.1961, 0.3252, 0.211]}, {"w": "model,", "b": [0.3313, 0.1961, 0.3851, 0.211]}, {"w": "it", "b": [0.3913, 0.1961, 0.4036, 0.211]}, {"w": "almost", "b": [0.4097, 0.1961, 0.4632, 0.211]}, {"w": "always", "b": [0.4693, 0.1961, 0.5222, 0.211]}, {"w": "routes", "b": [0.5284, 0.1961, 0.5777, 0.211]}, {"w": "users", "b": [0.5839, 0.1961, 0.6242, 0.211]}, {"w": "to", "b": [0.6303, 0.1961, 0.6467, 0.211]}, {"w": "the", "b": [0.6529, 0.1961, 0.6785, 0.211]}, {"w": "best", "b": [0.6847, 0.1961, 0.7181, 0.211]}, {"w": "performing", "b": [0.7242, 0.1961, 0.8125, 0.211]}, {"w": "model.", "b": [0.8187, 0.1961, 0.8725, 0.211]}]}, {"id": "b_1", "type": "paragraph", "text": "The mathematics of UCB1 works as follows. Let ca denote the number of times the arm a was played since the beginning, and let va denote the average reward obtained from playing that arm. The reward corresponds to the value of the business performance metric. For the purpose of illustration, let the metric be the average time spent by the user in the system during one session. The reward for playing an arm is, thus, a particular session duration.", "words": [{"w": "The", "b": [0.1306, 0.2229, 0.1628, 0.238]}, {"w": "mathematics", "b": [0.1689, 0.2229, 0.2729, 0.238]}, {"w": "of", "b": [0.279, 0.2229, 0.2941, 0.238]}, {"w": "UCB1", "b": [0.3002, 0.2229, 0.3503, 0.238]}, {"w": "works", "b": [0.3564, 0.2229, 0.4034, 0.238]}, {"w": "as", "b": [0.4095, 0.2229, 0.4262, 0.238]}, {"w": "follows.", "b": [0.4324, 0.2229, 0.4927, 0.238]}, {"w": "Let", "b": [0.5009, 0.2229, 0.5282, 0.238]}, {"w": "ca", "b": [0.5342, 0.223, 0.5502, 0.2392]}, {"w": "denote", "b": [0.5573, 0.2229, 0.6113, 0.238]}, {"w": "the", "b": [0.6174, 0.2229, 0.6434, 0.238]}, {"w": "number", "b": [0.6496, 0.2229, 0.7114, 0.238]}, {"w": "of", "b": [0.7176, 0.2229, 0.7326, 0.238]}, {"w": "times", "b": [0.7388, 0.2229, 0.7825, 0.238]}, {"w": "the", "b": [0.7886, 0.2229, 0.8146, 0.238]}, {"w": "arm", "b": [0.8208, 0.2229, 0.853, 0.238]}, {"w": "a", "b": [0.859, 0.223, 0.8688, 0.2379]}, {"w": "was", "b": [0.1306, 0.241, 0.1597, 0.2559]}, {"w": "played", "b": [0.1658, 0.241, 0.2172, 0.2559]}, {"w": "since", "b": [0.2234, 0.241, 0.2622, 0.2559]}, {"w": "the", "b": [0.2683, 0.241, 0.2938, 0.2559]}, {"w": "beginning,", "b": [0.2999, 0.241, 0.3829, 0.2559]}, {"w": "and", "b": [0.389, 0.241, 0.4186, 0.2559]}, {"w": "let", "b": [0.4247, 0.241, 0.4451, 0.2559]}, {"w": "va", "b": [0.451, 0.2409, 0.468, 0.2571]}, {"w": "denote", "b": [0.475, 0.241, 0.528, 0.2559]}, {"w": "the", "b": [0.5341, 0.241, 0.5596, 0.2559]}, {"w": "average", "b": [0.5657, 0.241, 0.6253, 0.2559]}, {"w": "reward", "b": [0.6315, 0.241, 0.6861, 0.2559]}, {"w": "obtained", "b": [0.6922, 0.241, 0.7614, 0.2559]}, {"w": "from", "b": [0.7676, 0.241, 0.8048, 0.2559]}, {"w": "playing", "b": [0.8109, 0.241, 0.8689, 0.2559]}, {"w": "that", "b": [0.1312, 0.2589, 0.1649, 0.2738]}, {"w": "arm.", "b": [0.171, 0.2589, 0.2078, 0.2738]}, {"w": "The", "b": [0.216, 0.2589, 0.2476, 0.2738]}, {"w": "reward", "b": [0.2538, 0.2589, 0.3084, 0.2738]}, {"w": "corresponds", "b": [0.3145, 0.2589, 0.4092, 0.2738]}, {"w": "to", "b": [0.4153, 0.2589, 0.4316, 0.2738]}, {"w": "the", "b": [0.4378, 0.2589, 0.4633, 0.2738]}, {"w": "value", "b": [0.4694, 0.2589, 0.5107, 0.2738]}, {"w": "of", "b": [0.5169, 0.2589, 0.5317, 0.2738]}, {"w": "the", "b": [0.5378, 0.2589, 0.5633, 0.2738]}, {"w": "business", "b": [0.5695, 0.2589, 0.635, 0.2738]}, {"w": "performance", "b": [0.6412, 0.2589, 0.7402, 0.2738]}, {"w": "metric.", "b": [0.7463, 0.2589, 0.8024, 0.2738]}, {"w": "For", "b": [0.8107, 0.2589, 0.8375, 0.2738]}, {"w": "the", "b": [0.8436, 0.2589, 0.8691, 0.2738]}, {"w": "purpose", "b": [0.1312, 0.2767, 0.1957, 0.2918]}, {"w": "of", "b": [0.2019, 0.2767, 0.217, 0.2918]}, {"w": "illustration,", "b": [0.2232, 0.2767, 0.3185, 0.2918]}, {"w": "let", "b": [0.3247, 0.2767, 0.3456, 0.2918]}, {"w": "the", "b": [0.3518, 0.2767, 0.3779, 0.2918]}, {"w": "metric", "b": [0.3841, 0.2767, 0.4364, 0.2918]}, {"w": "be", "b": [0.4426, 0.2767, 0.4619, 0.2918]}, {"w": "the", "b": [0.4681, 0.2767, 0.4942, 0.2918]}, {"w": "average", "b": [0.5004, 0.2767, 0.5616, 0.2918]}, {"w": "time", "b": [0.5678, 0.2767, 0.6044, 0.2918]}, {"w": "spent", "b": [0.6105, 0.2767, 0.6546, 0.2918]}, {"w": "by", "b": [0.6607, 0.2767, 0.6806, 0.2918]}, {"w": "the", "b": [0.6867, 0.2767, 0.7129, 0.2918]}, {"w": "user", "b": [0.7191, 0.2767, 0.7527, 0.2918]}, {"w": "in", "b": [0.7588, 0.2767, 0.7745, 0.2918]}, {"w": "the", "b": [0.7807, 0.2767, 0.8068, 0.2918]}, {"w": "system", "b": [0.813, 0.2767, 0.8692, 0.2918]}, {"w": "during", "b": [0.1312, 0.2948, 0.1836, 0.3097]}, {"w": "one", "b": [0.1897, 0.2948, 0.2174, 0.3097]}, {"w": "session.", "b": [0.2236, 0.2948, 0.2834, 0.3097]}, {"w": "The", "b": [0.2916, 0.2948, 0.3234, 0.3097]}, {"w": "reward", "b": [0.3295, 0.2948, 0.3845, 0.3097]}, {"w": "for", "b": [0.3906, 0.2948, 0.4127, 0.3097]}, {"w": "playing", "b": [0.4189, 0.2948, 0.4773, 0.3097]}, {"w": "an", "b": [0.4835, 0.2948, 0.503, 0.3097]}, {"w": "arm", "b": [0.5091, 0.2948, 0.5409, 0.3097]}, {"w": "is,", "b": [0.5471, 0.2948, 0.5646, 0.3097]}, {"w": "thus,", "b": [0.5708, 0.2948, 0.6104, 0.3097]}, {"w": "a", "b": [0.6165, 0.2948, 0.6257, 0.3097]}, {"w": "particular", "b": [0.6319, 0.2948, 0.711, 0.3097]}, {"w": "session", "b": [0.7171, 0.2948, 0.7718, 0.3097]}, {"w": "duration.", "b": [0.778, 0.2948, 0.8518, 0.3097]}]}, {"id": "b_2", "type": "paragraph", "text": "In the beginning, ca and va are zero for all arms, a = 1, . . . , M. Once an arm a is played, a reward r is observed, and ca is incremented by 1; va is then updated as follows:", "words": [{"w": "In", "b": [0.1312, 0.3217, 0.1482, 0.3367]}, {"w": "the", "b": [0.1543, 0.3217, 0.18, 0.3367]}, {"w": "beginning,", "b": [0.1862, 0.3217, 0.2699, 0.3367]}, {"w": "ca", "b": [0.276, 0.3217, 0.292, 0.3379]}, {"w": "and", "b": [0.299, 0.3217, 0.3288, 0.3367]}, {"w": "va", "b": [0.3349, 0.3217, 0.3519, 0.3379]}, {"w": "are", "b": [0.3589, 0.3217, 0.3836, 0.3367]}, {"w": "zero", "b": [0.3898, 0.3217, 0.4227, 0.3367]}, {"w": "for", "b": [0.4289, 0.3217, 0.451, 0.3367]}, {"w": "all", "b": [0.4571, 0.3217, 0.4766, 0.3367]}, {"w": "arms,", "b": [0.4828, 0.3217, 0.5271, 0.3367]}, {"w": "a", "b": [0.5332, 0.3217, 0.5429, 0.3366]}, {"w": "=", "b": [0.5481, 0.3217, 0.5624, 0.3367]}, {"w": "1,", "b": [0.5676, 0.3217, 0.5819, 0.3367]}, {"w": ".", "b": [0.585, 0.3217, 0.5901, 0.3366]}, {"w": ".", "b": [0.5932, 0.3217, 0.5983, 0.3366]}, {"w": ".", "b": [0.6014, 0.3217, 0.6065, 0.3366]}, {"w": ",", "b": [0.6096, 0.3217, 0.6148, 0.3366]}, {"w": "M.", "b": [0.6178, 0.3217, 0.6429, 0.3367]}, {"w": "Once", "b": [0.651, 0.3217, 0.6922, 0.3367]}, {"w": "an", "b": [0.6983, 0.3217, 0.7178, 0.3367]}, {"w": "arm", "b": [0.724, 0.3217, 0.7558, 0.3367]}, {"w": "a", "b": [0.7619, 0.3217, 0.7717, 0.3366]}, {"w": "is", "b": [0.7778, 0.3217, 0.7903, 0.3367]}, {"w": "played,", "b": [0.7964, 0.3217, 0.8534, 0.3367]}, {"w": "a", "b": [0.8596, 0.3217, 0.8688, 0.3367]}, {"w": "reward", "b": [0.1312, 0.3396, 0.1862, 0.3546]}, {"w": "r", "b": [0.1923, 0.3396, 0.2006, 0.3546]}, {"w": "is", "b": [0.2073, 0.3396, 0.2197, 0.3546]}, {"w": "observed,", "b": [0.2259, 0.3396, 0.3009, 0.3546]}, {"w": "and", "b": [0.307, 0.3396, 0.3368, 0.3546]}, {"w": "ca", "b": [0.3429, 0.3396, 0.3588, 0.3558]}, {"w": "is", "b": [0.3659, 0.3396, 0.3783, 0.3546]}, {"w": "incremented", "b": [0.3845, 0.3396, 0.4825, 0.3546]}, {"w": "by", "b": [0.4886, 0.3396, 0.5081, 0.3546]}, {"w": "1;", "b": [0.5142, 0.3396, 0.5285, 0.3546]}, {"w": "va", "b": [0.5347, 0.3396, 0.5516, 0.3558]}, {"w": "is", "b": [0.5587, 0.3396, 0.5711, 0.3546]}, {"w": "then", "b": [0.5773, 0.3396, 0.6132, 0.3546]}, {"w": "updated", "b": [0.6193, 0.3396, 0.6855, 0.3546]}, {"w": "as", "b": [0.6916, 0.3396, 0.7081, 0.3546]}, {"w": "follows:", "b": [0.7143, 0.3396, 0.7738, 0.3546]}]}, {"id": "b_3", "type": "paragraph", "text": "va ←ca −1", "words": [{"w": "va", "b": [0.4054, 0.3876, 0.4224, 0.4038]}, {"w": "←ca", "b": [0.4284, 0.3775, 0.4702, 0.4023]}, {"w": "−1", "b": [0.4752, 0.3773, 0.5029, 0.3924]}]}, {"id": "b_5", "type": "equation", "text": "× va + r", "words": [{"w": "×", "b": [0.5092, 0.3874, 0.5236, 0.4023]}, {"w": "va", "b": [0.5277, 0.3876, 0.5446, 0.4038]}, {"w": "+", "b": [0.5496, 0.3876, 0.564, 0.4026]}, {"w": "r", "b": [0.5743, 0.3775, 0.5827, 0.3924]}]}, {"id": "b_8", "type": "paragraph", "text": "At each time step (that is, when a new user logs in), the arm to play (that is, the version of the system the user will be routed to) is chosen as follows. If ca = 0 for some arm a, then this arm is played; otherwise, the arm with the greatest UCB value is played. The UCB value of an arm a, denoted as ua, is defined as follows:", "words": [{"w": "At", "b": [0.1305, 0.4308, 0.1508, 0.4457]}, {"w": "each", "b": [0.157, 0.4308, 0.1921, 0.4457]}, {"w": "time", "b": [0.1982, 0.4308, 0.2338, 0.4457]}, {"w": "step", "b": [0.2399, 0.4308, 0.2725, 0.4457]}, {"w": "(that", "b": [0.2787, 0.4308, 0.3193, 0.4457]}, {"w": "is,", "b": [0.3255, 0.4308, 0.3429, 0.4457]}, {"w": "when", "b": [0.349, 0.4308, 0.3907, 0.4457]}, {"w": "a", "b": [0.3968, 0.4308, 0.406, 0.4457]}, {"w": "new", "b": [0.4121, 0.4308, 0.4436, 0.4457]}, {"w": "user", "b": [0.4498, 0.4308, 0.4825, 0.4457]}, {"w": "logs", "b": [0.4886, 0.4308, 0.5192, 0.4457]}, {"w": "in),", "b": [0.5253, 0.4308, 0.5528, 0.4457]}, {"w": "the", "b": [0.5589, 0.4308, 0.5843, 0.4457]}, {"w": "arm", "b": [0.5905, 0.4308, 0.622, 0.4457]}, {"w": "to", "b": [0.6282, 0.4308, 0.6444, 0.4457]}, {"w": "play", "b": [0.6506, 0.4308, 0.6841, 0.4457]}, {"w": "(that", "b": [0.6903, 0.4308, 0.7309, 0.4457]}, {"w": "is,", "b": [0.737, 0.4308, 0.7544, 0.4457]}, {"w": "the", "b": [0.7606, 0.4308, 0.786, 0.4457]}, {"w": "version", "b": [0.7921, 0.4308, 0.8482, 0.4457]}, {"w": "of", "b": [0.8543, 0.4308, 0.8691, 0.4457]}, {"w": "the", "b": [0.1312, 0.4486, 0.1574, 0.4637]}, {"w": "system", "b": [0.1636, 0.4486, 0.2198, 0.4637]}, {"w": "the", "b": [0.226, 0.4486, 0.2521, 0.4637]}, {"w": "user", "b": [0.2583, 0.4486, 0.292, 0.4637]}, {"w": "will", "b": [0.2982, 0.4486, 0.3275, 0.4637]}, {"w": "be", "b": [0.3337, 0.4486, 0.353, 0.4637]}, {"w": "routed", "b": [0.3592, 0.4486, 0.4126, 0.4637]}, {"w": "to)", "b": [0.4188, 0.4486, 0.4429, 0.4637]}, {"w": "is", "b": [0.4491, 0.4486, 0.4618, 0.4637]}, {"w": "chosen", "b": [0.468, 0.4486, 0.522, 0.4637]}, {"w": "as", "b": [0.5282, 0.4486, 0.545, 0.4637]}, {"w": "follows.", "b": [0.5512, 0.4486, 0.612, 0.4637]}, {"w": "If", "b": [0.6204, 0.4486, 0.6329, 0.4637]}, {"w": "ca", "b": [0.6389, 0.4487, 0.6549, 0.4649]}, {"w": "=", "b": [0.661, 0.4486, 0.6756, 0.4637]}, {"w": "0", "b": [0.6809, 0.4486, 0.6903, 0.4637]}, {"w": "for", "b": [0.6965, 0.4486, 0.719, 0.4637]}, {"w": "some", "b": [0.7252, 0.4486, 0.7661, 0.4637]}, {"w": "arm", "b": [0.7723, 0.4486, 0.8048, 0.4637]}, {"w": "a,", "b": [0.811, 0.4486, 0.826, 0.4637]}, {"w": "then", "b": [0.8322, 0.4486, 0.8688, 0.4637]}, {"w": "this", "b": [0.1312, 0.4665, 0.1617, 0.4816]}, {"w": "arm", "b": [0.1686, 0.4665, 0.201, 0.4816]}, {"w": "is", "b": [0.2079, 0.4665, 0.2206, 0.4816]}, {"w": "played;", "b": [0.2275, 0.4665, 0.2855, 0.4816]}, {"w": "otherwise,", "b": [0.2928, 0.4665, 0.3756, 0.4816]}, {"w": "the", "b": [0.3827, 0.4665, 0.4088, 0.4816]}, {"w": "arm", "b": [0.4157, 0.4665, 0.4482, 0.4816]}, {"w": "with", "b": [0.4551, 0.4665, 0.4917, 0.4816]}, {"w": "the", "b": [0.4985, 0.4665, 0.5247, 0.4816]}, {"w": "greatest", "b": [0.5316, 0.4665, 0.5966, 0.4816]}, {"w": "UCB", "b": [0.6035, 0.4665, 0.6445, 0.4816]}, {"w": "value", "b": [0.6514, 0.4665, 0.6938, 0.4816]}, {"w": "is", "b": [0.7007, 0.4665, 0.7133, 0.4816]}, {"w": "played.", "b": [0.7202, 0.4665, 0.7783, 0.4816]}, {"w": "The", "b": [0.7887, 0.4665, 0.8211, 0.4816]}, {"w": "UCB", "b": [0.828, 0.4665, 0.869, 0.4816]}, {"w": "value", "b": [0.1308, 0.4846, 0.1723, 0.4996]}, {"w": "of", "b": [0.1784, 0.4846, 0.1933, 0.4996]}, {"w": "an", "b": [0.1995, 0.4846, 0.2189, 0.4996]}, {"w": "arm", "b": [0.2251, 0.4846, 0.2569, 0.4996]}, {"w": "a,", "b": [0.263, 0.4846, 0.2779, 0.4996]}, {"w": "denoted", "b": [0.2841, 0.4846, 0.3476, 0.4996]}, {"w": "as", "b": [0.3538, 0.4846, 0.3703, 0.4996]}, {"w": "ua,", "b": [0.3764, 0.4846, 0.401, 0.5008]}, {"w": "is", "b": [0.4072, 0.4846, 0.4196, 0.4996]}, {"w": "defined", "b": [0.4257, 0.4846, 0.4832, 0.4996]}, {"w": "as", "b": [0.4893, 0.4846, 0.5058, 0.4996]}, {"w": "follows:", "b": [0.512, 0.4846, 0.5716, 0.4996]}]}, {"id": "b_10", "type": "equation", "text": "def = va +", "words": [{"w": "def", "b": [0.351, 0.5367, 0.3703, 0.5472]}, {"w": "=", "b": [0.3535, 0.5419, 0.3678, 0.5568]}, {"w": "va", "b": [0.3754, 0.5419, 0.3924, 0.5581]}, {"w": "+", "b": [0.3974, 0.5419, 0.4117, 0.5568]}]}, {"id": "b_12", "type": "paragraph", "text": "2 × log(c) ca", "words": [{"w": "2", "b": [0.4365, 0.5318, 0.4457, 0.5467]}, {"w": "×", "b": [0.4498, 0.5315, 0.4642, 0.5465]}, {"w": "log(c)", "b": [0.4683, 0.5317, 0.5144, 0.5467]}, {"w": "ca", "b": [0.467, 0.5521, 0.483, 0.5683]}]}, {"id": "b_13", "type": "paragraph", "text": ", where c", "words": [{"w": ",", "b": [0.5166, 0.5419, 0.5218, 0.5568]}, {"w": "where", "b": [0.531, 0.5419, 0.5782, 0.5568]}, {"w": "c", "b": [0.5843, 0.5419, 0.5923, 0.5568]}]}, {"id": "b_14", "type": "equation", "text": "def =", "words": [{"w": "def", "b": [0.5974, 0.5367, 0.6167, 0.5472]}, {"w": "=", "b": [0.5999, 0.5419, 0.6143, 0.5568]}]}, {"id": "b_15", "type": "paragraph", "text": "M X", "words": [{"w": "M", "b": [0.6274, 0.5267, 0.6415, 0.5371]}, {"w": "X", "b": [0.6218, 0.5384, 0.6485, 0.5534]}]}, {"id": "b_17", "type": "paragraph", "text": "ca.", "words": [{"w": "ca.", "b": [0.6516, 0.5419, 0.6736, 0.5581]}]}, {"id": "b_18", "type": "paragraph", "text": "The algorithm is proven to converge to the optimal solution. That is, UCB1 will end up playing the best performing arm most of the time.", "words": [{"w": "The", "b": [0.1306, 0.5902, 0.163, 0.6053]}, {"w": "algorithm", "b": [0.1699, 0.5902, 0.2494, 0.6053]}, {"w": "is", "b": [0.2563, 0.5902, 0.269, 0.6053]}, {"w": "proven", "b": [0.2758, 0.5902, 0.3308, 0.6053]}, {"w": "to", "b": [0.3377, 0.5902, 0.3544, 0.6053]}, {"w": "converge", "b": [0.3613, 0.5902, 0.432, 0.6053]}, {"w": "to", "b": [0.4389, 0.5902, 0.4556, 0.6053]}, {"w": "the", "b": [0.4625, 0.5902, 0.4887, 0.6053]}, {"w": "optimal", "b": [0.4956, 0.5902, 0.5583, 0.6053]}, {"w": "solution.", "b": [0.5652, 0.5902, 0.6354, 0.6053]}, {"w": "That", "b": [0.6458, 0.5902, 0.6866, 0.6053]}, {"w": "is,", "b": [0.6935, 0.5902, 0.7114, 0.6053]}, {"w": "UCB1", "b": [0.7184, 0.5902, 0.7689, 0.6053]}, {"w": "will", "b": [0.7758, 0.5902, 0.805, 0.6053]}, {"w": "end", "b": [0.8119, 0.5902, 0.8412, 0.6053]}, {"w": "up", "b": [0.8481, 0.5902, 0.869, 0.6053]}, {"w": "playing", "b": [0.1312, 0.6083, 0.1897, 0.6232]}, {"w": "the", "b": [0.1958, 0.6083, 0.2215, 0.6232]}, {"w": "best", "b": [0.2276, 0.6083, 0.2611, 0.6232]}, {"w": "performing", "b": [0.2672, 0.6083, 0.3555, 0.6232]}, {"w": "arm", "b": [0.3616, 0.6083, 0.3935, 0.6232]}, {"w": "most", "b": [0.3996, 0.6083, 0.4387, 0.6232]}, {"w": "of", "b": [0.4448, 0.6083, 0.4597, 0.6232]}, {"w": "the", "b": [0.4658, 0.6083, 0.4915, 0.6232]}, {"w": "time.", "b": [0.4977, 0.6083, 0.5387, 0.6232]}]}, {"id": "b_19", "type": "paragraph", "text": "In Python, the code that implements UCB1, would look as follows:", "words": [{"w": "In", "b": [0.1312, 0.6352, 0.1482, 0.6501]}, {"w": "Python,", "b": [0.1543, 0.6352, 0.2186, 0.6501]}, {"w": "the", "b": [0.2248, 0.6352, 0.2504, 0.6501]}, {"w": "code", "b": [0.2566, 0.6352, 0.293, 0.6501]}, {"w": "that", "b": [0.2992, 0.6352, 0.333, 0.6501]}, {"w": "implements", "b": [0.3391, 0.6352, 0.431, 0.6501]}, {"w": "UCB1,", "b": [0.4372, 0.6352, 0.4917, 0.6501]}, {"w": "would", "b": [0.4979, 0.6352, 0.5456, 0.6501]}, {"w": "look", "b": [0.5517, 0.6352, 0.5855, 0.6501]}, {"w": "as", "b": [0.5917, 0.6352, 0.6082, 0.6501]}, {"w": "follows:", "b": [0.6143, 0.6352, 0.6739, 0.6501]}]}, {"id": "b_20", "type": "paragraph", "text": "1 class UCB1():", "words": [{"w": "1", "b": [0.1028, 0.6679, 0.1091, 0.6754]}, {"w": "class", "b": [0.1312, 0.6628, 0.1797, 0.6777]}, {"w": "UCB1():", "b": [0.1893, 0.6629, 0.2571, 0.6778]}]}, {"id": "b_21", "type": "equation", "text": "2 def __init__(self, n_arms):", "words": [{"w": "2", "b": [0.1028, 0.6859, 0.1091, 0.6934]}, {"w": "def", "b": [0.17, 0.6807, 0.199, 0.6957]}, {"w": "__init__(self,", "b": [0.2087, 0.6808, 0.3443, 0.6958]}, {"w": "n_arms):", "b": [0.354, 0.6808, 0.4315, 0.6958]}]}, {"id": "b_22", "type": "equation", "text": "3 self.c = [0]*n_arms", "words": [{"w": "3", "b": [0.1028, 0.7038, 0.1091, 0.7113]}, {"w": "self.c", "b": [0.2087, 0.6987, 0.2668, 0.7137]}, {"w": "=", "b": [0.2765, 0.6987, 0.2862, 0.7137]}, {"w": "[0]*n_arms", "b": [0.2959, 0.6987, 0.3928, 0.7137]}]}, {"id": "b_23", "type": "equation", "text": "4 self.v = [0.0]*n_arms", "words": [{"w": "4", "b": [0.1028, 0.7218, 0.1091, 0.7293]}, {"w": "self.v", "b": [0.2087, 0.7167, 0.2668, 0.7317]}, {"w": "=", "b": [0.2765, 0.7167, 0.2862, 0.7317]}, {"w": "[0.0]*n_arms", "b": [0.2959, 0.7167, 0.4121, 0.7317]}]}, {"id": "b_24", "type": "equation", "text": "5 self.M = n_arms", "words": [{"w": "5", "b": [0.1028, 0.7397, 0.1091, 0.7472]}, {"w": "self.M", "b": [0.2087, 0.7346, 0.2668, 0.7496]}, {"w": "=", "b": [0.2765, 0.7346, 0.2862, 0.7496]}, {"w": "n_arms", "b": [0.2959, 0.7346, 0.354, 0.7496]}]}, {"id": "b_25", "type": "paragraph", "text": "6 return", "words": [{"w": "6", "b": [0.1028, 0.7577, 0.1091, 0.7651]}, {"w": "return", "b": [0.2087, 0.7525, 0.2668, 0.7675]}]}, {"id": "b_27", "type": "equation", "text": "8 def select_arm(self):", "words": [{"w": "8", "b": [0.1028, 0.7936, 0.1091, 0.801]}, {"w": "def", "b": [0.17, 0.7884, 0.199, 0.8034]}, {"w": "select_arm(self):", "b": [0.2087, 0.7885, 0.3734, 0.8034]}]}, {"id": "b_28", "type": "paragraph", "text": "9 for a in range(self.M):", "words": [{"w": "9", "b": [0.1028, 0.8115, 0.1091, 0.819]}, {"w": "for", "b": [0.2087, 0.8064, 0.2378, 0.8213]}, {"w": "a", "b": [0.2475, 0.8064, 0.2572, 0.8214]}, {"w": "in", "b": [0.2668, 0.8064, 0.2862, 0.8213]}, {"w": "range(self.M):", "b": [0.2959, 0.8064, 0.4315, 0.8214]}]}, {"id": "b_29", "type": "equation", "text": "10 if self.c[a] == 0:", "words": [{"w": "10", "b": [0.0965, 0.8295, 0.1091, 0.8369]}, {"w": "if", "b": [0.2475, 0.8243, 0.2668, 0.8393]}, {"w": "self.c[a]", "b": [0.2765, 0.8244, 0.3637, 0.8393]}, {"w": "==", "b": [0.3734, 0.8244, 0.3928, 0.8393]}, {"w": "0:", "b": [0.4024, 0.8244, 0.4218, 0.8393]}]}, {"id": "b_30", "type": "paragraph", "text": "11 return a", "words": [{"w": "11", "b": [0.0965, 0.8474, 0.1091, 0.8549]}, {"w": "return", "b": [0.2862, 0.8423, 0.3443, 0.8572]}, {"w": "a", "b": [0.354, 0.8423, 0.3637, 0.8573]}]}, {"id": "b_31", "type": "equation", "text": "12 u = [0.0]*self.M", "words": [{"w": "12", "b": [0.0965, 0.8653, 0.1091, 0.8728]}, {"w": "u", "b": [0.2087, 0.8603, 0.2184, 0.8752]}, {"w": "=", "b": [0.2281, 0.8603, 0.2378, 0.8752]}, {"w": "[0.0]*self.M", "b": [0.2475, 0.8603, 0.3637, 0.8752]}]}, {"id": "b_32", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "13", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 231, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "13 c = sum(self.c)", "words": [{"w": "13", "b": [0.0965, 0.0942, 0.1091, 0.1017]}, {"w": "c", "b": [0.2087, 0.0892, 0.2184, 0.1041]}, {"w": "=", "b": [0.2281, 0.0892, 0.2378, 0.1041]}, {"w": "sum(self.c)", "b": [0.2475, 0.0892, 0.354, 0.1041]}]}, {"id": "b_1", "type": "paragraph", "text": "14 for a in range(self.M):", "words": [{"w": "14", "b": [0.0965, 0.1122, 0.1091, 0.1197]}, {"w": "for", "b": [0.2087, 0.107, 0.2378, 0.122]}, {"w": "a", "b": [0.2475, 0.1071, 0.2572, 0.1221]}, {"w": "in", "b": [0.2668, 0.107, 0.2862, 0.122]}, {"w": "range(self.M):", "b": [0.2959, 0.1071, 0.4315, 0.1221]}]}, {"id": "b_2", "type": "equation", "text": "15 bonus = math.sqrt((2 * math.log(c)) / float(self.c[a]))", "words": [{"w": "15", "b": [0.0965, 0.1301, 0.1091, 0.1376]}, {"w": "bonus", "b": [0.2475, 0.125, 0.2959, 0.14]}, {"w": "=", "b": [0.3056, 0.125, 0.3153, 0.14]}, {"w": "math.sqrt((2", "b": [0.325, 0.125, 0.4412, 0.14]}, {"w": "*", "b": [0.4509, 0.125, 0.4606, 0.14]}, {"w": "math.log(c))", "b": [0.4702, 0.125, 0.5865, 0.14]}, {"w": "/", "b": [0.5962, 0.125, 0.6058, 0.14]}, {"w": "float(self.c[a]))", "b": [0.6155, 0.125, 0.7802, 0.14]}]}, {"id": "b_3", "type": "equation", "text": "16 u[a] = self.v[a] + bonus", "words": [{"w": "16", "b": [0.0965, 0.1481, 0.1091, 0.1555]}, {"w": "u[a]", "b": [0.2475, 0.143, 0.2862, 0.1579]}, {"w": "=", "b": [0.2959, 0.143, 0.3056, 0.1579]}, {"w": "self.v[a]", "b": [0.3153, 0.143, 0.4024, 0.1579]}, {"w": "+", "b": [0.4121, 0.143, 0.4218, 0.1579]}, {"w": "bonus", "b": [0.4315, 0.143, 0.4799, 0.1579]}]}, {"id": "b_4", "type": "paragraph", "text": "17 return u.index(max(u))", "words": [{"w": "17", "b": [0.0965, 0.166, 0.1091, 0.1735]}, {"w": "return", "b": [0.2087, 0.1609, 0.2668, 0.1758]}, {"w": "u.index(max(u))", "b": [0.2765, 0.1609, 0.4218, 0.1759]}]}, {"id": "b_6", "type": "paragraph", "text": "19 def update(self, a, r):", "words": [{"w": "19", "b": [0.0965, 0.2019, 0.1091, 0.2094]}, {"w": "def", "b": [0.17, 0.1968, 0.199, 0.2117]}, {"w": "update(self,", "b": [0.2087, 0.1968, 0.325, 0.2118]}, {"w": "a,", "b": [0.3346, 0.1968, 0.354, 0.2118]}, {"w": "r):", "b": [0.3637, 0.1968, 0.3928, 0.2118]}]}, {"id": "b_7", "type": "equation", "text": "20 self.c[a] += 1", "words": [{"w": "20", "b": [0.0965, 0.2199, 0.1091, 0.2273]}, {"w": "self.c[a]", "b": [0.2087, 0.2148, 0.2959, 0.2297]}, {"w": "+=", "b": [0.3056, 0.2148, 0.325, 0.2297]}, {"w": "1", "b": [0.3346, 0.2148, 0.3443, 0.2297]}]}, {"id": "b_8", "type": "equation", "text": "21 v_a = ((self.c[a] - 1) / float(self.c[a])) * self.v[a] \\", "words": [{"w": "21", "b": [0.0965, 0.2378, 0.1091, 0.2453]}, {"w": "v_a", "b": [0.2087, 0.2327, 0.2378, 0.2477]}, {"w": "=", "b": [0.2475, 0.2327, 0.2571, 0.2477]}, {"w": "((self.c[a]", "b": [0.2668, 0.2327, 0.3734, 0.2477]}, {"w": "-", "b": [0.3831, 0.2327, 0.3928, 0.2477]}, {"w": "1)", "b": [0.4024, 0.2327, 0.4218, 0.2477]}, {"w": "/", "b": [0.4315, 0.2327, 0.4412, 0.2477]}, {"w": "float(self.c[a]))", "b": [0.4509, 0.2327, 0.6155, 0.2477]}, {"w": "*", "b": [0.6252, 0.2327, 0.6349, 0.2477]}, {"w": "self.v[a]", "b": [0.6446, 0.2327, 0.7318, 0.2477]}, {"w": "\\", "b": [0.7414, 0.2327, 0.7511, 0.2477]}]}, {"id": "b_9", "type": "equation", "text": "22 + (r / float(self.c[a]))", "words": [{"w": "22", "b": [0.0965, 0.2557, 0.1091, 0.2632]}, {"w": "+", "b": [0.2862, 0.2507, 0.2959, 0.2656]}, {"w": "(r", "b": [0.3056, 0.2507, 0.325, 0.2656]}, {"w": "/", "b": [0.3346, 0.2507, 0.3443, 0.2656]}, {"w": "float(self.c[a]))", "b": [0.354, 0.2507, 0.5187, 0.2656]}]}, {"id": "b_10", "type": "equation", "text": "23 self.v[a] = v_a", "words": [{"w": "23", "b": [0.0965, 0.2737, 0.1091, 0.2812]}, {"w": "self.v[a]", "b": [0.2087, 0.2686, 0.2959, 0.2836]}, {"w": "=", "b": [0.3056, 0.2686, 0.3153, 0.2836]}, {"w": "v_a", "b": [0.325, 0.2686, 0.354, 0.2836]}]}, {"id": "b_11", "type": "paragraph", "text": "24 return", "words": [{"w": "24", "b": [0.0965, 0.2916, 0.1091, 0.2991]}, {"w": "return", "b": [0.2087, 0.2865, 0.2668, 0.3015]}]}, {"id": "b_12", "type": "paragraph", "text": "The corresponding code in R would look as shown below:", "words": [{"w": "The", "b": [0.1306, 0.3127, 0.1624, 0.3277]}, {"w": "corresponding", "b": [0.1685, 0.3127, 0.281, 0.3277]}, {"w": "code", "b": [0.2872, 0.3127, 0.3236, 0.3277]}, {"w": "in", "b": [0.3297, 0.3127, 0.3451, 0.3277]}, {"w": "R", "b": [0.3513, 0.3127, 0.3648, 0.3277]}, {"w": "would", "b": [0.371, 0.3127, 0.4187, 0.3277]}, {"w": "look", "b": [0.4248, 0.3127, 0.4587, 0.3277]}, {"w": "as", "b": [0.4648, 0.3127, 0.4813, 0.3277]}, {"w": "shown", "b": [0.4875, 0.3127, 0.5373, 0.3277]}, {"w": "below:", "b": [0.5434, 0.3127, 0.5947, 0.3277]}]}, {"id": "b_13", "type": "paragraph", "text": "1 setClass(\"UCB1\", representation(count=\"numeric\", value=\"numeric\", M=\"numeric\"))", "words": [{"w": "1", "b": [0.1028, 0.3455, 0.1091, 0.353]}, {"w": "setClass(\"UCB1\",", "b": [0.1312, 0.3403, 0.2862, 0.3554]}, {"w": "representation(count=\"numeric\",", "b": [0.2959, 0.3403, 0.5962, 0.3554]}, {"w": "value=\"numeric\",", "b": [0.6058, 0.3404, 0.7608, 0.3554]}, {"w": "M=\"numeric\"))", "b": [0.7705, 0.3404, 0.8964, 0.3554]}]}, {"id": "b_15", "type": "equation", "text": "3 setGeneric(\"select_arm\", function(x) standardGeneric(\"select_arm\"))", "words": [{"w": "3", "b": [0.1028, 0.3814, 0.1091, 0.3889]}, {"w": "setGeneric(\"select_arm\",", "b": [0.1312, 0.3762, 0.3637, 0.3913]}, {"w": "function(x)", "b": [0.3734, 0.3762, 0.4799, 0.3913]}, {"w": "standardGeneric(\"select_arm\"))", "b": [0.4896, 0.3762, 0.7802, 0.3913]}]}, {"id": "b_16", "type": "equation", "text": "4 setMethod(\"select_arm\", \"UCB1\", function(x) {", "words": [{"w": "4", "b": [0.1028, 0.3993, 0.1091, 0.4068]}, {"w": "setMethod(\"select_arm\",", "b": [0.1312, 0.3942, 0.354, 0.4092]}, {"w": "\"UCB1\",", "b": [0.3637, 0.3942, 0.4315, 0.4092]}, {"w": "function(x)", "b": [0.4412, 0.3942, 0.5477, 0.4092]}, {"w": "{", "b": [0.5574, 0.3942, 0.5671, 0.4092]}]}, {"id": "b_17", "type": "equation", "text": "5 for (a in seq(from = 1, to = x@M, by = 1)) {", "words": [{"w": "5", "b": [0.1028, 0.4173, 0.1091, 0.4247]}, {"w": "for", "b": [0.17, 0.4121, 0.199, 0.4271]}, {"w": "(a", "b": [0.2087, 0.4122, 0.2281, 0.4272]}, {"w": "in", "b": [0.2378, 0.4121, 0.2571, 0.4271]}, {"w": "seq(from", "b": [0.2668, 0.4121, 0.3443, 0.4272]}, {"w": "=", "b": [0.354, 0.4122, 0.3637, 0.4272]}, {"w": "1,", "b": [0.3734, 0.4122, 0.3928, 0.4272]}, {"w": "to", "b": [0.4024, 0.4122, 0.4218, 0.4272]}, {"w": "=", "b": [0.4315, 0.4122, 0.4412, 0.4272]}, {"w": "x@M,", "b": [0.4509, 0.4122, 0.4896, 0.4272]}, {"w": "by", "b": [0.4993, 0.4122, 0.5187, 0.4272]}, {"w": "=", "b": [0.5284, 0.4122, 0.538, 0.4272]}, {"w": "1))", "b": [0.5477, 0.4122, 0.5768, 0.4272]}, {"w": "{", "b": [0.5865, 0.4122, 0.5962, 0.4272]}]}, {"id": "b_18", "type": "equation", "text": "6 if(x@count[a] == 0) {", "words": [{"w": "6", "b": [0.1028, 0.4352, 0.1091, 0.4427]}, {"w": "if(x@count[a]", "b": [0.2087, 0.4301, 0.3346, 0.4451]}, {"w": "==", "b": [0.3443, 0.4301, 0.3637, 0.4451]}, {"w": "0)", "b": [0.3734, 0.4301, 0.3928, 0.4451]}, {"w": "{", "b": [0.4024, 0.4301, 0.4121, 0.4451]}]}, {"id": "b_19", "type": "paragraph", "text": "7 return(a)", "words": [{"w": "7", "b": [0.1028, 0.4532, 0.1091, 0.4606]}, {"w": "return(a)", "b": [0.2475, 0.448, 0.3346, 0.463]}]}, {"id": "b_20", "type": "equation", "text": "8 }", "words": [{"w": "8", "b": [0.1028, 0.4711, 0.1091, 0.4786]}, {"w": "}", "b": [0.2087, 0.466, 0.2184, 0.481]}]}, {"id": "b_21", "type": "equation", "text": "9 }", "words": [{"w": "9", "b": [0.1028, 0.4891, 0.1091, 0.4965]}, {"w": "}", "b": [0.17, 0.484, 0.1797, 0.4989]}]}, {"id": "b_22", "type": "equation", "text": "10 u <- rep(0.0, x@M)", "words": [{"w": "10", "b": [0.0965, 0.507, 0.1091, 0.5145]}, {"w": "u", "b": [0.17, 0.5019, 0.1797, 0.5169]}, {"w": "<-", "b": [0.1893, 0.5019, 0.2087, 0.5169]}, {"w": "rep(0.0,", "b": [0.2184, 0.5019, 0.2959, 0.5169]}, {"w": "x@M)", "b": [0.3056, 0.5019, 0.3443, 0.5169]}]}, {"id": "b_23", "type": "equation", "text": "11 count <- sum(x@count)", "words": [{"w": "11", "b": [0.0965, 0.525, 0.1091, 0.5324]}, {"w": "count", "b": [0.17, 0.5199, 0.2184, 0.5348]}, {"w": "<-", "b": [0.2281, 0.5199, 0.2475, 0.5348]}, {"w": "sum(x@count)", "b": [0.2571, 0.5198, 0.3734, 0.5348]}]}, {"id": "b_24", "type": "equation", "text": "12 for (a in seq(from = 1, to = x@M, by = 1)){", "words": [{"w": "12", "b": [0.0965, 0.5429, 0.1091, 0.5504]}, {"w": "for", "b": [0.17, 0.5378, 0.199, 0.5527]}, {"w": "(a", "b": [0.2087, 0.5378, 0.2281, 0.5528]}, {"w": "in", "b": [0.2378, 0.5378, 0.2571, 0.5527]}, {"w": "seq(from", "b": [0.2668, 0.5378, 0.3443, 0.5528]}, {"w": "=", "b": [0.354, 0.5378, 0.3637, 0.5528]}, {"w": "1,", "b": [0.3734, 0.5378, 0.3928, 0.5528]}, {"w": "to", "b": [0.4024, 0.5378, 0.4218, 0.5528]}, {"w": "=", "b": [0.4315, 0.5378, 0.4412, 0.5528]}, {"w": "x@M,", "b": [0.4509, 0.5378, 0.4896, 0.5528]}, {"w": "by", "b": [0.4993, 0.5378, 0.5187, 0.5528]}, {"w": "=", "b": [0.5284, 0.5378, 0.538, 0.5528]}, {"w": "1)){", "b": [0.5477, 0.5378, 0.5865, 0.5528]}]}, {"id": "b_25", "type": "paragraph", "text": "13 print(a)", "words": [{"w": "13", "b": [0.0965, 0.5608, 0.1091, 0.5683]}, {"w": "print(a)", "b": [0.2087, 0.5557, 0.2862, 0.5707]}]}, {"id": "b_26", "type": "equation", "text": "14 bonus <- sqrt((2 * log(count)) / x@count[a])", "words": [{"w": "14", "b": [0.0965, 0.5788, 0.1091, 0.5863]}, {"w": "bonus", "b": [0.2087, 0.5737, 0.2571, 0.5887]}, {"w": "<-", "b": [0.2668, 0.5737, 0.2862, 0.5887]}, {"w": "sqrt((2", "b": [0.2959, 0.5736, 0.3637, 0.5887]}, {"w": "*", "b": [0.3734, 0.5737, 0.3831, 0.5887]}, {"w": "log(count))", "b": [0.3928, 0.5736, 0.4993, 0.5887]}, {"w": "/", "b": [0.509, 0.5737, 0.5187, 0.5887]}, {"w": "x@count[a])", "b": [0.5284, 0.5737, 0.6349, 0.5887]}]}, {"id": "b_27", "type": "equation", "text": "15 u[a] <- x@value[a] + bonus", "words": [{"w": "15", "b": [0.0965, 0.5967, 0.1091, 0.6042]}, {"w": "u[a]", "b": [0.2087, 0.5917, 0.2475, 0.6066]}, {"w": "<-", "b": [0.2571, 0.5917, 0.2765, 0.6066]}, {"w": "x@value[a]", "b": [0.2862, 0.5917, 0.3831, 0.6066]}, {"w": "+", "b": [0.3928, 0.5917, 0.4024, 0.6066]}, {"w": "bonus", "b": [0.4121, 0.5917, 0.4606, 0.6066]}]}, {"id": "b_28", "type": "equation", "text": "16 }", "words": [{"w": "16", "b": [0.0965, 0.6147, 0.1091, 0.6222]}, {"w": "}", "b": [0.17, 0.6096, 0.1797, 0.6246]}]}, {"id": "b_29", "type": "paragraph", "text": "17 match(c(max(u)),u)", "words": [{"w": "17", "b": [0.0965, 0.6326, 0.1091, 0.6401]}, {"w": "match(c(max(u)),u)", "b": [0.17, 0.6275, 0.3443, 0.6425]}]}, {"id": "b_30", "type": "equation", "text": "18 })", "words": [{"w": "18", "b": [0.0965, 0.6506, 0.1091, 0.6581]}, {"w": "})", "b": [0.1312, 0.6455, 0.1506, 0.6605]}]}, {"id": "b_32", "type": "paragraph", "text": "20 setGeneric(\"update\", function(x, a, r) standardGeneric(\"update\"))", "words": [{"w": "20", "b": [0.0965, 0.6865, 0.1091, 0.694]}, {"w": "setGeneric(\"update\",", "b": [0.1312, 0.6813, 0.325, 0.6964]}, {"w": "function(x,", "b": [0.3346, 0.6813, 0.4412, 0.6964]}, {"w": "a,", "b": [0.4509, 0.6814, 0.4702, 0.6964]}, {"w": "r)", "b": [0.4799, 0.6814, 0.4993, 0.6964]}, {"w": "standardGeneric(\"update\"))", "b": [0.509, 0.6813, 0.7608, 0.6964]}]}, {"id": "b_33", "type": "equation", "text": "21 setMethod(\"update\", \"UCB1\", function(x, a, r) {", "words": [{"w": "21", "b": [0.0965, 0.7044, 0.1091, 0.7119]}, {"w": "setMethod(\"update\",", "b": [0.1312, 0.6993, 0.3153, 0.7143]}, {"w": "\"UCB1\",", "b": [0.3249, 0.6993, 0.3928, 0.7143]}, {"w": "function(x,", "b": [0.4024, 0.6993, 0.509, 0.7143]}, {"w": "a,", "b": [0.5187, 0.6993, 0.538, 0.7143]}, {"w": "r)", "b": [0.5477, 0.6993, 0.5671, 0.7143]}, {"w": "{", "b": [0.5768, 0.6993, 0.5865, 0.7143]}]}, {"id": "b_34", "type": "equation", "text": "22 x@count[a] <- x@count[a] + 1", "words": [{"w": "22", "b": [0.0965, 0.7224, 0.1091, 0.7298]}, {"w": "x@count[a]", "b": [0.17, 0.7173, 0.2668, 0.7322]}, {"w": "<-", "b": [0.2765, 0.7173, 0.2959, 0.7322]}, {"w": "x@count[a]", "b": [0.3056, 0.7173, 0.4024, 0.7322]}, {"w": "+", "b": [0.4121, 0.7173, 0.4218, 0.7322]}, {"w": "1", "b": [0.4315, 0.7173, 0.4412, 0.7322]}]}, {"id": "b_35", "type": "equation", "text": "23 v_a <- ((x@count[a] - 1) / x@count[a]) * x@value[a] + (r / x@count[a])", "words": [{"w": "23", "b": [0.0965, 0.7403, 0.1091, 0.7478]}, {"w": "v_a", "b": [0.17, 0.7352, 0.199, 0.7502]}, {"w": "<-", "b": [0.2087, 0.7352, 0.2281, 0.7502]}, {"w": "((x@count[a]", "b": [0.2378, 0.7352, 0.354, 0.7502]}, {"w": "-", "b": [0.3637, 0.7352, 0.3734, 0.7502]}, {"w": "1)", "b": [0.3831, 0.7352, 0.4024, 0.7502]}, {"w": "/", "b": [0.4121, 0.7352, 0.4218, 0.7502]}, {"w": "x@count[a])", "b": [0.4315, 0.7352, 0.538, 0.7502]}, {"w": "*", "b": [0.5477, 0.7352, 0.5574, 0.7502]}, {"w": "x@value[a]", "b": [0.5671, 0.7352, 0.664, 0.7502]}, {"w": "+", "b": [0.6736, 0.7352, 0.6833, 0.7502]}, {"w": "(r", "b": [0.693, 0.7352, 0.7124, 0.7502]}, {"w": "/", "b": [0.7221, 0.7352, 0.7318, 0.7502]}, {"w": "x@count[a])", "b": [0.7414, 0.7352, 0.848, 0.7502]}]}, {"id": "b_36", "type": "equation", "text": "24 x@value[a] <- v_a", "words": [{"w": "24", "b": [0.0965, 0.7583, 0.1091, 0.7657]}, {"w": "x@value[a]", "b": [0.17, 0.7532, 0.2668, 0.7681]}, {"w": "<-", "b": [0.2765, 0.7532, 0.2959, 0.7681]}, {"w": "v_a", "b": [0.3056, 0.7532, 0.3346, 0.7681]}]}, {"id": "b_37", "type": "equation", "text": "25 })", "words": [{"w": "25", "b": [0.0965, 0.7762, 0.1091, 0.7837]}, {"w": "})", "b": [0.1312, 0.7711, 0.1506, 0.7861]}]}, {"id": "b_39", "type": "equation", "text": "27 UCB1 <- function(M) {", "words": [{"w": "27", "b": [0.0965, 0.8121, 0.1091, 0.8196]}, {"w": "UCB1", "b": [0.1312, 0.807, 0.17, 0.822]}, {"w": "<-", "b": [0.1797, 0.807, 0.199, 0.822]}, {"w": "function(M)", "b": [0.2087, 0.807, 0.3153, 0.822]}, {"w": "{", "b": [0.325, 0.807, 0.3346, 0.822]}]}, {"id": "b_40", "type": "equation", "text": "28 new(\"UCB1\", count = rep(0, M), value = rep(0.0, M), M = M)", "words": [{"w": "28", "b": [0.0965, 0.83, 0.1091, 0.8375]}, {"w": "new(\"UCB1\",", "b": [0.17, 0.8249, 0.2765, 0.8399]}, {"w": "count", "b": [0.2862, 0.825, 0.3346, 0.8399]}, {"w": "=", "b": [0.3443, 0.825, 0.354, 0.8399]}, {"w": "rep(0,", "b": [0.3637, 0.8249, 0.4218, 0.8399]}, {"w": "M),", "b": [0.4315, 0.825, 0.4606, 0.8399]}, {"w": "value", "b": [0.4702, 0.825, 0.5187, 0.8399]}, {"w": "=", "b": [0.5284, 0.825, 0.538, 0.8399]}, {"w": "rep(0.0,", "b": [0.5477, 0.8249, 0.6252, 0.8399]}, {"w": "M),", "b": [0.6349, 0.825, 0.664, 0.8399]}, {"w": "M", "b": [0.6736, 0.825, 0.6833, 0.8399]}, {"w": "=", "b": [0.693, 0.825, 0.7027, 0.8399]}, {"w": "M)", "b": [0.7124, 0.825, 0.7318, 0.8399]}]}, {"id": "b_41", "type": "equation", "text": "29 }", "words": [{"w": "29", "b": [0.0965, 0.848, 0.1091, 0.8555]}, {"w": "}", "b": [0.1312, 0.8429, 0.1409, 0.8579]}]}, {"id": "b_42", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "14", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 232, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "7.4 Statistical Bounds on the Model Performance", "words": [{"w": "7.4", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Statistical", "b": [0.188, 0.0861, 0.2968, 0.104]}, {"w": "Bounds", "b": [0.3051, 0.0861, 0.3867, 0.104]}, {"w": "on", "b": [0.395, 0.0861, 0.4213, 0.104]}, {"w": "the", "b": [0.4296, 0.0861, 0.4645, 0.104]}, {"w": "Model", "b": [0.4728, 0.0861, 0.5417, 0.104]}, {"w": "Performance", "b": [0.55, 0.0861, 0.6872, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "When reporting the model performance, sometimes, besides the value of the metric, it is", "words": [{"w": "When", "b": [0.1303, 0.1249, 0.1789, 0.14]}, {"w": "reporting", "b": [0.1859, 0.1249, 0.2618, 0.14]}, {"w": "the", "b": [0.2687, 0.1249, 0.2949, 0.14]}, {"w": "model", "b": [0.3018, 0.1249, 0.3514, 0.14]}, {"w": "performance,", "b": [0.3584, 0.1249, 0.4652, 0.14]}, {"w": "sometimes,", "b": [0.4723, 0.1249, 0.5624, 0.14]}, {"w": "besides", "b": [0.5695, 0.1249, 0.6278, 0.14]}, {"w": "the", "b": [0.6348, 0.1249, 0.6609, 0.14]}, {"w": "value", "b": [0.6678, 0.1249, 0.7102, 0.14]}, {"w": "of", "b": [0.7171, 0.1249, 0.7323, 0.14]}, {"w": "the", "b": [0.7392, 0.1249, 0.7654, 0.14]}, {"w": "metric,", "b": [0.7723, 0.1249, 0.8299, 0.14]}, {"w": "it", "b": [0.837, 0.1249, 0.8495, 0.14]}, {"w": "is", "b": [0.8565, 0.1249, 0.8691, 0.14]}]}, {"id": "b_2", "type": "paragraph", "text": "required to also provide the statistical bounds, also known as the statistical interval.", "words": [{"w": "required", "b": [0.1312, 0.1429, 0.1975, 0.1579]}, {"w": "to", "b": [0.2036, 0.1429, 0.22, 0.1579]}, {"w": "also", "b": [0.2262, 0.1429, 0.2571, 0.1579]}, {"w": "provide", "b": [0.2632, 0.1429, 0.3228, 0.1579]}, {"w": "the", "b": [0.3289, 0.1429, 0.3545, 0.1579]}, {"w": "statistical", "b": [0.3607, 0.1429, 0.4388, 0.1579]}, {"w": "bounds,", "b": [0.445, 0.1429, 0.5082, 0.1579]}, {"w": "also", "b": [0.5143, 0.1429, 0.5452, 0.1579]}, {"w": "known", "b": [0.5513, 0.1429, 0.6036, 0.1579]}, {"w": "as", "b": [0.6098, 0.1429, 0.6263, 0.1579]}, {"w": "the", "b": [0.6324, 0.1429, 0.6581, 0.1579]}, {"w": "statistical", "b": [0.664, 0.1429, 0.7532, 0.1579]}, {"w": "interval.", "b": [0.7603, 0.1429, 0.8354, 0.1579]}]}, {"id": "b_3", "type": "paragraph", "text": "A reader familiar with other books on machine learning or some popular online blogs might wonder, why we use the term “statistical interval” and not “confidence interval.” The reason is that in some machine learning literature, what the authors call a “confidence interval” is in fact a “credible interval.” The difference between the two is clear and important for a statistician because the two terms have different meanings in frequentist and Bayesian statistics. In this book, I decided not to burden the reader with the subtlety of the difference between the two terms. For a non-expert in statistics, it would be beneficial to think of the statistical interval as follows: a 95% statistical interval indicates that there’s a 95% chance the parameter you’re estimating is between the intervals bounds. Strictly speaking, this is the definition of the credible interval. A confidence interval’s interpretation is subtly different, most newcomers to statistics won’t start to appreciate the difference until they’re a few textbooks in. For our purposes, the above interpretation of a statistical interval will suffice.", "words": [{"w": "A", "b": [0.1305, 0.1699, 0.1443, 0.1848]}, {"w": "reader", "b": [0.1505, 0.1699, 0.2006, 0.1848]}, {"w": "familiar", "b": [0.2068, 0.1699, 0.2685, 0.1848]}, {"w": "with", "b": [0.2747, 0.1699, 0.3104, 0.1848]}, {"w": "other", "b": [0.3166, 0.1699, 0.3585, 0.1848]}, {"w": "books", "b": [0.3646, 0.1699, 0.4112, 0.1848]}, {"w": "on", "b": [0.4173, 0.1699, 0.4367, 0.1848]}, {"w": "machine", "b": [0.4429, 0.1699, 0.5087, 0.1848]}, {"w": "learning", "b": [0.5149, 0.1699, 0.5792, 0.1848]}, {"w": "or", "b": [0.5854, 0.1699, 0.6017, 0.1848]}, {"w": "some", "b": [0.6079, 0.1699, 0.6478, 0.1848]}, {"w": "popular", "b": [0.654, 0.1699, 0.7158, 0.1848]}, {"w": "online", "b": [0.7219, 0.1699, 0.7699, 0.1848]}, {"w": "blogs", "b": [0.7761, 0.1699, 0.817, 0.1848]}, {"w": "might", "b": [0.8231, 0.1699, 0.8695, 0.1848]}, {"w": "wonder,", "b": [0.1306, 0.1879, 0.1928, 0.2027]}, {"w": "why", "b": [0.199, 0.1879, 0.2313, 0.2027]}, {"w": "we", "b": [0.2375, 0.1879, 0.2582, 0.2027]}, {"w": "use", "b": [0.2644, 0.1879, 0.2898, 0.2027]}, {"w": "the", "b": [0.2959, 0.1879, 0.3212, 0.2027]}, {"w": "term", "b": [0.3274, 0.1879, 0.3648, 0.2027]}, {"w": "“statistical", "b": [0.371, 0.1879, 0.4566, 0.2027]}, {"w": "interval”", "b": [0.4628, 0.1879, 0.5311, 0.2027]}, {"w": "and", "b": [0.5372, 0.1879, 0.5666, 0.2027]}, {"w": "not", "b": [0.5727, 0.1879, 0.599, 0.2027]}, {"w": "“confidence", "b": [0.6052, 0.1879, 0.6957, 0.2027]}, {"w": "interval.”", "b": [0.7019, 0.1879, 0.7726, 0.2027]}, {"w": "The", "b": [0.7809, 0.1879, 0.8122, 0.2027]}, {"w": "reason", "b": [0.8184, 0.1879, 0.8691, 0.2027]}, {"w": "is", "b": [0.1312, 0.2056, 0.1439, 0.2207]}, {"w": "that", "b": [0.1509, 0.2056, 0.1854, 0.2207]}, {"w": "in", "b": [0.1925, 0.2056, 0.2082, 0.2207]}, {"w": "some", "b": [0.2152, 0.2056, 0.2561, 0.2207]}, {"w": "machine", "b": [0.2631, 0.2056, 0.3306, 0.2207]}, {"w": "learning", "b": [0.3377, 0.2056, 0.4036, 0.2207]}, {"w": "literature,", "b": [0.4106, 0.2056, 0.4923, 0.2207]}, {"w": "what", "b": [0.4996, 0.2056, 0.5404, 0.2207]}, {"w": "the", "b": [0.5474, 0.2056, 0.5736, 0.2207]}, {"w": "authors", "b": [0.5806, 0.2056, 0.6425, 0.2207]}, {"w": "call", "b": [0.6495, 0.2056, 0.6778, 0.2207]}, {"w": "a", "b": [0.6848, 0.2056, 0.6942, 0.2207]}, {"w": "“confidence", "b": [0.7013, 0.2056, 0.7949, 0.2207]}, {"w": "interval”", "b": [0.8019, 0.2056, 0.8726, 0.2207]}, {"w": "is", "b": [0.1312, 0.2236, 0.1439, 0.2387]}, {"w": "in", "b": [0.1506, 0.2236, 0.1663, 0.2387]}, {"w": "fact", "b": [0.1731, 0.2236, 0.2039, 0.2387]}, {"w": "a", "b": [0.2106, 0.2236, 0.2201, 0.2387]}, {"w": "“credible", "b": [0.2268, 0.2236, 0.2996, 0.2387]}, {"w": "interval.”", "b": [0.3063, 0.2236, 0.3797, 0.2387]}, {"w": "The", "b": [0.3896, 0.2236, 0.422, 0.2387]}, {"w": "difference", "b": [0.4288, 0.2236, 0.5068, 0.2387]}, {"w": "between", "b": [0.5135, 0.2236, 0.5799, 0.2387]}, {"w": "the", "b": [0.5867, 0.2236, 0.6128, 0.2387]}, {"w": "two", "b": [0.6196, 0.2236, 0.6488, 0.2387]}, {"w": "is", "b": [0.6556, 0.2236, 0.6682, 0.2387]}, {"w": "clear", "b": [0.675, 0.2236, 0.7138, 0.2387]}, {"w": "and", "b": [0.7205, 0.2236, 0.7508, 0.2387]}, {"w": "important", "b": [0.7575, 0.2236, 0.8402, 0.2387]}, {"w": "for", "b": [0.8469, 0.2236, 0.8695, 0.2387]}, {"w": "a", "b": [0.1312, 0.2415, 0.1406, 0.2566]}, {"w": "statistician", "b": [0.1478, 0.2415, 0.2379, 0.2566]}, {"w": "because", "b": [0.2451, 0.2415, 0.3085, 0.2566]}, {"w": "the", "b": [0.3156, 0.2415, 0.3418, 0.2566]}, {"w": "two", "b": [0.3489, 0.2415, 0.3782, 0.2566]}, {"w": "terms", "b": [0.3853, 0.2415, 0.4315, 0.2566]}, {"w": "have", "b": [0.4386, 0.2415, 0.4758, 0.2566]}, {"w": "different", "b": [0.4829, 0.2415, 0.5509, 0.2566]}, {"w": "meanings", "b": [0.5581, 0.2415, 0.6345, 0.2566]}, {"w": "in", "b": [0.6416, 0.2415, 0.6573, 0.2566]}, {"w": "frequentist", "b": [0.6644, 0.2415, 0.752, 0.2566]}, {"w": "and", "b": [0.7591, 0.2415, 0.7894, 0.2566]}, {"w": "Bayesian", "b": [0.7966, 0.2415, 0.8691, 0.2566]}, {"w": "statistics.", "b": [0.1312, 0.2597, 0.2059, 0.2745]}, {"w": "In", "b": [0.2141, 0.2597, 0.2306, 0.2745]}, {"w": "this", "b": [0.2366, 0.2597, 0.2658, 0.2745]}, {"w": "book,", "b": [0.2718, 0.2597, 0.3155, 0.2745]}, {"w": "I", "b": [0.3215, 0.2597, 0.328, 0.2745]}, {"w": "decided", "b": [0.334, 0.2597, 0.3933, 0.2745]}, {"w": "not", "b": [0.3993, 0.2597, 0.4254, 0.2745]}, {"w": "to", "b": [0.4313, 0.2597, 0.4474, 0.2745]}, {"w": "burden", "b": [0.4534, 0.2597, 0.5087, 0.2745]}, {"w": "the", "b": [0.5147, 0.2597, 0.5398, 0.2745]}, {"w": "reader", "b": [0.5457, 0.2597, 0.5951, 0.2745]}, {"w": "with", "b": [0.601, 0.2597, 0.6362, 0.2745]}, {"w": "the", "b": [0.6422, 0.2597, 0.6673, 0.2745]}, {"w": "subtlety", "b": [0.6733, 0.2597, 0.7367, 0.2745]}, {"w": "of", "b": [0.7426, 0.2597, 0.7572, 0.2745]}, {"w": "the", "b": [0.7632, 0.2597, 0.7883, 0.2745]}, {"w": "difference", "b": [0.7942, 0.2597, 0.8692, 0.2745]}, {"w": "between", "b": [0.1312, 0.2775, 0.1962, 0.2925]}, {"w": "the", "b": [0.2024, 0.2775, 0.228, 0.2925]}, {"w": "two", "b": [0.2341, 0.2775, 0.2628, 0.2925]}, {"w": "terms.", "b": [0.2689, 0.2775, 0.3192, 0.2925]}, {"w": "For", "b": [0.3274, 0.2775, 0.3543, 0.2925]}, {"w": "a", "b": [0.3605, 0.2775, 0.3697, 0.2925]}, {"w": "non-expert", "b": [0.3758, 0.2775, 0.4629, 0.2925]}, {"w": "in", "b": [0.469, 0.2775, 0.4844, 0.2925]}, {"w": "statistics,", "b": [0.4905, 0.2775, 0.5666, 0.2925]}, {"w": "it", "b": [0.5727, 0.2775, 0.585, 0.2925]}, {"w": "would", "b": [0.5912, 0.2775, 0.6388, 0.2925]}, {"w": "be", "b": [0.6449, 0.2775, 0.6638, 0.2925]}, {"w": "beneficial", "b": [0.67, 0.2775, 0.7452, 0.2925]}, {"w": "to", "b": [0.7514, 0.2775, 0.7677, 0.2925]}, {"w": "think", "b": [0.7739, 0.2775, 0.8164, 0.2925]}, {"w": "of", "b": [0.8225, 0.2775, 0.8374, 0.2925]}, {"w": "the", "b": [0.8435, 0.2775, 0.8691, 0.2925]}, {"w": "statistical", "b": [0.1312, 0.2954, 0.2099, 0.3104]}, {"w": "interval", "b": [0.216, 0.2954, 0.2769, 0.3104]}, {"w": "as", "b": [0.2831, 0.2954, 0.2997, 0.3104]}, {"w": "follows:", "b": [0.3059, 0.2954, 0.3658, 0.3104]}, {"w": "a", "b": [0.3741, 0.2954, 0.3834, 0.3104]}, {"w": "95%", "b": [0.3894, 0.2954, 0.4234, 0.3104]}, {"w": "statistical", "b": [0.4296, 0.2954, 0.5082, 0.3104]}, {"w": "interval", "b": [0.5144, 0.2954, 0.5753, 0.3104]}, {"w": "indicates", "b": [0.5815, 0.2954, 0.6528, 0.3104]}, {"w": "that", "b": [0.659, 0.2954, 0.693, 0.3104]}, {"w": "there’s", "b": [0.6992, 0.2954, 0.753, 0.3104]}, {"w": "a", "b": [0.7592, 0.2954, 0.7684, 0.3104]}, {"w": "95%", "b": [0.7744, 0.2954, 0.8085, 0.3104]}, {"w": "chance", "b": [0.8146, 0.2954, 0.8688, 0.3104]}, {"w": "the", "b": [0.1312, 0.3133, 0.1572, 0.3284]}, {"w": "parameter", "b": [0.1634, 0.3133, 0.2467, 0.3284]}, {"w": "you’re", "b": [0.2529, 0.3133, 0.3028, 0.3284]}, {"w": "estimating", "b": [0.309, 0.3133, 0.3943, 0.3284]}, {"w": "is", "b": [0.4005, 0.3133, 0.4131, 0.3284]}, {"w": "between", "b": [0.4193, 0.3133, 0.4853, 0.3284]}, {"w": "the", "b": [0.4915, 0.3133, 0.5175, 0.3284]}, {"w": "intervals", "b": [0.5236, 0.3133, 0.5924, 0.3284]}, {"w": "bounds.", "b": [0.5986, 0.3133, 0.6627, 0.3284]}, {"w": "Strictly", "b": [0.6709, 0.3133, 0.7318, 0.3284]}, {"w": "speaking,", "b": [0.738, 0.3133, 0.814, 0.3284]}, {"w": "this", "b": [0.8201, 0.3133, 0.8504, 0.3284]}, {"w": "is", "b": [0.8566, 0.3133, 0.8692, 0.3284]}, {"w": "the", "b": [0.1312, 0.3315, 0.1564, 0.3463]}, {"w": "definition", "b": [0.1619, 0.3315, 0.2362, 0.3463]}, {"w": "of", "b": [0.2418, 0.3315, 0.2563, 0.3463]}, {"w": "the", "b": [0.2618, 0.3315, 0.287, 0.3463]}, {"w": "credible", "b": [0.2925, 0.3315, 0.3539, 0.3463]}, {"w": "interval.", "b": [0.3594, 0.3315, 0.4237, 0.3463]}, {"w": "A", "b": [0.4317, 0.3315, 0.4453, 0.3463]}, {"w": "confidence", "b": [0.4508, 0.3315, 0.5322, 0.3463]}, {"w": "interval’s", "b": [0.5377, 0.3315, 0.6092, 0.3463]}, {"w": "interpretation", "b": [0.6147, 0.3315, 0.7238, 0.3463]}, {"w": "is", "b": [0.7293, 0.3315, 0.7415, 0.3463]}, {"w": "subtly", "b": [0.747, 0.3315, 0.7959, 0.3463]}, {"w": "different,", "b": [0.8014, 0.3315, 0.8718, 0.3463]}, {"w": "most", "b": [0.1312, 0.3492, 0.1711, 0.3643]}, {"w": "newcomers", "b": [0.1787, 0.3492, 0.2672, 0.3643]}, {"w": "to", "b": [0.2748, 0.3492, 0.2915, 0.3643]}, {"w": "statistics", "b": [0.2991, 0.3492, 0.3716, 0.3643]}, {"w": "won’t", "b": [0.3792, 0.3492, 0.4246, 0.3643]}, {"w": "start", "b": [0.4322, 0.3492, 0.4711, 0.3643]}, {"w": "to", "b": [0.4787, 0.3492, 0.4954, 0.3643]}, {"w": "appreciate", "b": [0.503, 0.3492, 0.5878, 0.3643]}, {"w": "the", "b": [0.5953, 0.3492, 0.6215, 0.3643]}, {"w": "difference", "b": [0.6291, 0.3492, 0.7071, 0.3643]}, {"w": "until", "b": [0.7146, 0.3492, 0.7528, 0.3643]}, {"w": "they’re", "b": [0.7604, 0.3492, 0.8175, 0.3643]}, {"w": "a", "b": [0.8251, 0.3492, 0.8345, 0.3643]}, {"w": "few", "b": [0.8421, 0.3492, 0.8698, 0.3643]}, {"w": "textbooks", "b": [0.1312, 0.3673, 0.2103, 0.3822]}, {"w": "in.", "b": [0.2165, 0.3673, 0.237, 0.3822]}, {"w": "For", "b": [0.2452, 0.3673, 0.2721, 0.3822]}, {"w": "our", "b": [0.2783, 0.3673, 0.305, 0.3822]}, {"w": "purposes,", "b": [0.3111, 0.3673, 0.3868, 0.3822]}, {"w": "the", "b": [0.3929, 0.3673, 0.4186, 0.3822]}, {"w": "above", "b": [0.4247, 0.3673, 0.4709, 0.3822]}, {"w": "interpretation", "b": [0.477, 0.3673, 0.5884, 0.3822]}, {"w": "of", "b": [0.5945, 0.3673, 0.6094, 0.3822]}, {"w": "a", "b": [0.6156, 0.3673, 0.6248, 0.3822]}, {"w": "statistical", "b": [0.6309, 0.3673, 0.7091, 0.3822]}, {"w": "interval", "b": [0.7152, 0.3673, 0.7758, 0.3822]}, {"w": "will", "b": [0.782, 0.3673, 0.8107, 0.3822]}, {"w": "suffice.", "b": [0.8168, 0.3673, 0.8713, 0.3822]}]}, {"id": "b_4", "type": "paragraph", "text": "There are several techniques that allow establishing statistical bounds for a model. Some techniques apply to classification models, and some can be applied to regression models. We will consider several techniques in this section.", "words": [{"w": "There", "b": [0.1306, 0.3941, 0.1787, 0.4092]}, {"w": "are", "b": [0.1852, 0.3941, 0.2104, 0.4092]}, {"w": "several", "b": [0.2169, 0.3941, 0.2725, 0.4092]}, {"w": "techniques", "b": [0.279, 0.3941, 0.3649, 0.4092]}, {"w": "that", "b": [0.3714, 0.3941, 0.4059, 0.4092]}, {"w": "allow", "b": [0.4124, 0.3941, 0.4548, 0.4092]}, {"w": "establishing", "b": [0.4613, 0.3941, 0.5577, 0.4092]}, {"w": "statistical", "b": [0.5642, 0.3941, 0.6439, 0.4092]}, {"w": "bounds", "b": [0.6504, 0.3941, 0.7096, 0.4092]}, {"w": "for", "b": [0.7161, 0.3941, 0.7387, 0.4092]}, {"w": "a", "b": [0.7452, 0.3941, 0.7546, 0.4092]}, {"w": "model.", "b": [0.7611, 0.3941, 0.816, 0.4092]}, {"w": "Some", "b": [0.8252, 0.3941, 0.8691, 0.4092]}, {"w": "techniques", "b": [0.1312, 0.4122, 0.2143, 0.4271]}, {"w": "apply", "b": [0.2204, 0.4122, 0.2644, 0.4271]}, {"w": "to", "b": [0.2705, 0.4122, 0.2867, 0.4271]}, {"w": "classification", "b": [0.2928, 0.4122, 0.3931, 0.4271]}, {"w": "models,", "b": [0.3993, 0.4122, 0.4595, 0.4271]}, {"w": "and", "b": [0.4657, 0.4122, 0.495, 0.4271]}, {"w": "some", "b": [0.5011, 0.4122, 0.5406, 0.4271]}, {"w": "can", "b": [0.5468, 0.4122, 0.5741, 0.4271]}, {"w": "be", "b": [0.5802, 0.4122, 0.5989, 0.4271]}, {"w": "applied", "b": [0.6051, 0.4122, 0.6627, 0.4271]}, {"w": "to", "b": [0.6688, 0.4122, 0.685, 0.4271]}, {"w": "regression", "b": [0.6911, 0.4122, 0.7693, 0.4271]}, {"w": "models.", "b": [0.7754, 0.4122, 0.8357, 0.4271]}, {"w": "We", "b": [0.8439, 0.4122, 0.8692, 0.4271]}, {"w": "will", "b": [0.1306, 0.4301, 0.1593, 0.445]}, {"w": "consider", "b": [0.1654, 0.4301, 0.2312, 0.445]}, {"w": "several", "b": [0.2374, 0.4301, 0.2919, 0.445]}, {"w": "techniques", "b": [0.2981, 0.4301, 0.3823, 0.445]}, {"w": "in", "b": [0.3884, 0.4301, 0.4038, 0.445]}, {"w": "this", "b": [0.4099, 0.4301, 0.4398, 0.445]}, {"w": "section.", "b": [0.4459, 0.4301, 0.5066, 0.445]}]}, {"id": "b_5", "type": "paragraph", "text": "7.4.1 Statistical Interval for the Classification Error", "words": [{"w": "7.4.1", "b": [0.1312, 0.4779, 0.1749, 0.4929]}, {"w": "Statistical", "b": [0.1961, 0.4779, 0.2888, 0.4929]}, {"w": "Interval", "b": [0.2958, 0.4779, 0.368, 0.4929]}, {"w": "for", "b": [0.3751, 0.4779, 0.4009, 0.4929]}, {"w": "the", "b": [0.408, 0.4779, 0.4377, 0.4929]}, {"w": "Classification", "b": [0.4448, 0.4779, 0.5671, 0.4929]}, {"w": "Error", "b": [0.5742, 0.4779, 0.625, 0.4929]}]}, {"id": "b_6", "type": "paragraph", "text": "If you report the error ratio “err” for a classification model (where err", "words": [{"w": "If", "b": [0.1312, 0.5146, 0.1433, 0.5294]}, {"w": "you", "b": [0.1492, 0.5146, 0.1773, 0.5294]}, {"w": "report", "b": [0.1832, 0.5146, 0.232, 0.5294]}, {"w": "the", "b": [0.2379, 0.5146, 0.2631, 0.5294]}, {"w": "error", "b": [0.269, 0.5146, 0.3073, 0.5294]}, {"w": "ratio", "b": [0.3132, 0.5146, 0.3504, 0.5294]}, {"w": "“err”", "b": [0.3563, 0.5145, 0.3959, 0.5295]}, {"w": "for", "b": [0.4018, 0.5146, 0.4235, 0.5294]}, {"w": "a", "b": [0.4294, 0.5146, 0.4384, 0.5294]}, {"w": "classification", "b": [0.4443, 0.5146, 0.544, 0.5294]}, {"w": "model", "b": [0.5499, 0.5146, 0.5976, 0.5294]}, {"w": "(where", "b": [0.6035, 0.5146, 0.6569, 0.5294]}, {"w": "err", "b": [0.6626, 0.5145, 0.6853, 0.5295]}]}, {"id": "b_7", "type": "paragraph", "text": "def = 1 −accuracy), then the following technique can be used to obtain the statistical interval for “err.”", "words": [{"w": "def", "b": [0.6904, 0.5093, 0.7097, 0.5198]}, {"w": "=", "b": [0.6929, 0.5145, 0.7072, 0.5295]}, {"w": "1", "b": [0.7148, 0.5146, 0.7238, 0.5294]}, {"w": "−accuracy),", "b": [0.7274, 0.5143, 0.8277, 0.5295]}, {"w": "then", "b": [0.8336, 0.5146, 0.8688, 0.5294]}, {"w": "the", "b": [0.1312, 0.5324, 0.1569, 0.5474]}, {"w": "following", "b": [0.163, 0.5324, 0.2348, 0.5474]}, {"w": "technique", "b": [0.241, 0.5324, 0.3179, 0.5474]}, {"w": "can", "b": [0.324, 0.5324, 0.3517, 0.5474]}, {"w": "be", "b": [0.3579, 0.5324, 0.3768, 0.5474]}, {"w": "used", "b": [0.383, 0.5324, 0.419, 0.5474]}, {"w": "to", "b": [0.4251, 0.5324, 0.4415, 0.5474]}, {"w": "obtain", "b": [0.4477, 0.5324, 0.499, 0.5474]}, {"w": "the", "b": [0.5051, 0.5324, 0.5308, 0.5474]}, {"w": "statistical", "b": [0.5369, 0.5324, 0.6151, 0.5474]}, {"w": "interval", "b": [0.6212, 0.5324, 0.6818, 0.5474]}, {"w": "for", "b": [0.6879, 0.5324, 0.71, 0.5474]}, {"w": "“err.”", "b": [0.7162, 0.5324, 0.7588, 0.5474]}]}, {"id": "b_8", "type": "paragraph", "text": "Let N be the size of the test set. Then, with probability 99%, “err” lies in the interval,", "words": [{"w": "Let", "b": [0.1312, 0.5594, 0.1582, 0.5743]}, {"w": "N", "b": [0.1643, 0.5593, 0.1791, 0.5743]}, {"w": "be", "b": [0.1873, 0.5594, 0.2063, 0.5743]}, {"w": "the", "b": [0.2124, 0.5594, 0.238, 0.5743]}, {"w": "size", "b": [0.2442, 0.5594, 0.273, 0.5743]}, {"w": "of", "b": [0.2792, 0.5594, 0.294, 0.5743]}, {"w": "the", "b": [0.3002, 0.5594, 0.3258, 0.5743]}, {"w": "test", "b": [0.332, 0.5594, 0.3618, 0.5743]}, {"w": "set.", "b": [0.368, 0.5594, 0.3958, 0.5743]}, {"w": "Then,", "b": [0.404, 0.5594, 0.4512, 0.5743]}, {"w": "with", "b": [0.4573, 0.5594, 0.4932, 0.5743]}, {"w": "probability", "b": [0.4993, 0.5594, 0.5876, 0.5743]}, {"w": "99%,", "b": [0.5935, 0.5594, 0.6325, 0.5743]}, {"w": "“err”", "b": [0.6386, 0.5594, 0.6787, 0.5743]}, {"w": "lies", "b": [0.6849, 0.5594, 0.7106, 0.5743]}, {"w": "in", "b": [0.7168, 0.5594, 0.7322, 0.5743]}, {"w": "the", "b": [0.7383, 0.5594, 0.7639, 0.5743]}, {"w": "interval,", "b": [0.7701, 0.5594, 0.8358, 0.5743]}]}, {"id": "b_9", "type": "equation", "text": "[err −δ, err + δ],", "words": [{"w": "[err", "b": [0.4346, 0.6042, 0.4625, 0.6192]}, {"w": "−δ,", "b": [0.4665, 0.604, 0.498, 0.6192]}, {"w": "err", "b": [0.5011, 0.6042, 0.5237, 0.6192]}, {"w": "+", "b": [0.5278, 0.6042, 0.5422, 0.6192]}, {"w": "δ],", "b": [0.5463, 0.6042, 0.5654, 0.6192]}]}, {"id": "b_10", "type": "paragraph", "text": "where δ", "words": [{"w": "where", "b": [0.1306, 0.6471, 0.1778, 0.6621]}, {"w": "δ", "b": [0.1839, 0.6471, 0.1921, 0.6621]}]}, {"id": "b_11", "type": "equation", "text": "def = zN", "words": [{"w": "def", "b": [0.1979, 0.6419, 0.2172, 0.6524]}, {"w": "=", "b": [0.2004, 0.6471, 0.2148, 0.6621]}, {"w": "zN", "b": [0.2223, 0.6471, 0.2426, 0.6633]}]}, {"id": "b_13", "type": "paragraph", "text": "err(1−err)", "words": [{"w": "err(1−err)", "b": [0.2656, 0.6432, 0.3322, 0.6538]}]}, {"id": "b_14", "type": "equation", "text": "N , and zN = 2.58.", "words": [{"w": "N", "b": [0.2923, 0.6558, 0.304, 0.6662]}, {"w": ",", "b": [0.3344, 0.6471, 0.3395, 0.6621]}, {"w": "and", "b": [0.3457, 0.6471, 0.3754, 0.6621]}, {"w": "zN", "b": [0.3815, 0.6471, 0.4018, 0.6633]}, {"w": "=", "b": [0.4092, 0.6471, 0.4236, 0.6621]}, {"w": "2.58.", "b": [0.4287, 0.6471, 0.4666, 0.6621]}]}, {"id": "b_15", "type": "paragraph", "text": "The value of zN depends on the required confidence level. For the confidence level of 99%, zN = 2.58. For other confidence level values, the values of zN can be found in the table below:", "words": [{"w": "The", "b": [0.1306, 0.6767, 0.1617, 0.6915]}, {"w": "value", "b": [0.1679, 0.6767, 0.2085, 0.6915]}, {"w": "of", "b": [0.2147, 0.6767, 0.2293, 0.6915]}, {"w": "zN", "b": [0.2354, 0.6766, 0.2556, 0.6928]}, {"w": "depends", "b": [0.2641, 0.6767, 0.328, 0.6915]}, {"w": "on", "b": [0.3342, 0.6767, 0.3533, 0.6915]}, {"w": "the", "b": [0.3594, 0.6767, 0.3846, 0.6915]}, {"w": "required", "b": [0.3907, 0.6767, 0.4556, 0.6915]}, {"w": "confidence", "b": [0.4616, 0.6766, 0.5577, 0.6916]}, {"w": "level.", "b": [0.5648, 0.6766, 0.6117, 0.6916]}, {"w": "For", "b": [0.6199, 0.6767, 0.6463, 0.6915]}, {"w": "the", "b": [0.6524, 0.6767, 0.6775, 0.6915]}, {"w": "confidence", "b": [0.6837, 0.6767, 0.7651, 0.6915]}, {"w": "level", "b": [0.7712, 0.6767, 0.8064, 0.6915]}, {"w": "of", "b": [0.8126, 0.6767, 0.8272, 0.6915]}, {"w": "99%,", "b": [0.8332, 0.6767, 0.8713, 0.6915]}, {"w": "zN", "b": [0.1312, 0.6945, 0.1515, 0.7108]}, {"w": "=", "b": [0.1589, 0.6947, 0.173, 0.7095]}, {"w": "2.58.", "b": [0.1781, 0.6945, 0.2154, 0.7095]}, {"w": "For", "b": [0.2233, 0.6947, 0.2497, 0.7095]}, {"w": "other", "b": [0.2551, 0.6947, 0.2964, 0.7095]}, {"w": "confidence", "b": [0.3018, 0.6947, 0.3832, 0.7095]}, {"w": "level", "b": [0.3886, 0.6947, 0.4238, 0.7095]}, {"w": "values,", "b": [0.4292, 0.6947, 0.482, 0.7095]}, {"w": "the", "b": [0.4876, 0.6947, 0.5127, 0.7095]}, {"w": "values", "b": [0.5181, 0.6947, 0.5659, 0.7095]}, {"w": "of", "b": [0.5713, 0.6947, 0.5859, 0.7095]}, {"w": "zN", "b": [0.591, 0.6945, 0.6113, 0.7108]}, {"w": "can", "b": [0.619, 0.6947, 0.6461, 0.7095]}, {"w": "be", "b": [0.6515, 0.6947, 0.6701, 0.7095]}, {"w": "found", "b": [0.6755, 0.6947, 0.7202, 0.7095]}, {"w": "in", "b": [0.7257, 0.6947, 0.7407, 0.7095]}, {"w": "the", "b": [0.7461, 0.6947, 0.7712, 0.7095]}, {"w": "table", "b": [0.7766, 0.6947, 0.8158, 0.7095]}, {"w": "below:", "b": [0.8212, 0.6947, 0.8715, 0.7095]}]}, {"id": "b_16", "type": "paragraph", "text": "confidence level 80% 90% 95% 98% 99% zN 1.28 1.64 1.96 2.33 2.58", "words": [{"w": "confidence", "b": [0.2976, 0.7295, 0.3807, 0.7444]}, {"w": "level", "b": [0.3868, 0.7295, 0.4227, 0.7444]}, {"w": "80%", "b": [0.4448, 0.7295, 0.4786, 0.7444]}, {"w": "90%", "b": [0.5007, 0.7295, 0.5345, 0.7444]}, {"w": "95%", "b": [0.5567, 0.7295, 0.5905, 0.7444]}, {"w": "98%", "b": [0.6126, 0.7295, 0.6464, 0.7444]}, {"w": "99%", "b": [0.6686, 0.7295, 0.7024, 0.7444]}, {"w": "zN", "b": [0.4, 0.7474, 0.4203, 0.7636]}, {"w": "1.28", "b": [0.4448, 0.7474, 0.4776, 0.7624]}, {"w": "1.64", "b": [0.5007, 0.7474, 0.5335, 0.7624]}, {"w": "1.96", "b": [0.5567, 0.7474, 0.5895, 0.7624]}, {"w": "2.33", "b": [0.6126, 0.7474, 0.6454, 0.7624]}, {"w": "2.58", "b": [0.6686, 0.7474, 0.7014, 0.7624]}]}, {"id": "b_17", "type": "paragraph", "text": "As with p-values, it is convenient to find the value of zN using a programming language. In Python, it can be done in the following way:", "words": [{"w": "As", "b": [0.1305, 0.7977, 0.1516, 0.8126]}, {"w": "with", "b": [0.1577, 0.7977, 0.1935, 0.8126]}, {"w": "p-values,", "b": [0.1996, 0.7977, 0.2688, 0.8126]}, {"w": "it", "b": [0.275, 0.7977, 0.2872, 0.8126]}, {"w": "is", "b": [0.2934, 0.7977, 0.3058, 0.8126]}, {"w": "convenient", "b": [0.3119, 0.7977, 0.3968, 0.8126]}, {"w": "to", "b": [0.4029, 0.7977, 0.4193, 0.8126]}, {"w": "find", "b": [0.4254, 0.7977, 0.4561, 0.8126]}, {"w": "the", "b": [0.4623, 0.7977, 0.4878, 0.8126]}, {"w": "value", "b": [0.494, 0.7977, 0.5354, 0.8126]}, {"w": "of", "b": [0.5415, 0.7977, 0.5564, 0.8126]}, {"w": "zN", "b": [0.5623, 0.7977, 0.5826, 0.8139]}, {"w": "using", "b": [0.591, 0.7977, 0.6331, 0.8126]}, {"w": "a", "b": [0.6392, 0.7977, 0.6484, 0.8126]}, {"w": "programming", "b": [0.6546, 0.7977, 0.762, 0.8126]}, {"w": "language.", "b": [0.7681, 0.7977, 0.8438, 0.8126]}, {"w": "In", "b": [0.852, 0.7977, 0.8689, 0.8126]}, {"w": "Python,", "b": [0.1312, 0.8156, 0.1956, 0.8306]}, {"w": "it", "b": [0.2017, 0.8156, 0.214, 0.8306]}, {"w": "can", "b": [0.2202, 0.8156, 0.2479, 0.8306]}, {"w": "be", "b": [0.254, 0.8156, 0.273, 0.8306]}, {"w": "done", "b": [0.2792, 0.8156, 0.3171, 0.8306]}, {"w": "in", "b": [0.3233, 0.8156, 0.3386, 0.8306]}, {"w": "the", "b": [0.3448, 0.8156, 0.3704, 0.8306]}, {"w": "following", "b": [0.3766, 0.8156, 0.4484, 0.8306]}, {"w": "way:", "b": [0.4545, 0.8156, 0.4909, 0.8306]}]}, {"id": "b_18", "type": "paragraph", "text": "1 from scipy.stats import norm", "words": [{"w": "1", "b": [0.1028, 0.8484, 0.1091, 0.8559]}, {"w": "from", "b": [0.1312, 0.8433, 0.17, 0.8583]}, {"w": "scipy.stats", "b": [0.1797, 0.8433, 0.2862, 0.8583]}, {"w": "import", "b": [0.2959, 0.8433, 0.354, 0.8583]}, {"w": "norm", "b": [0.3637, 0.8433, 0.4024, 0.8583]}]}, {"id": "b_19", "type": "equation", "text": "2 def get_z_N(confidence_level): # a value in (0,100)", "words": [{"w": "2", "b": [0.1028, 0.8663, 0.1091, 0.8738]}, {"w": "def", "b": [0.1312, 0.8612, 0.1603, 0.8761]}, {"w": "get_z_N(confidence_level):", "b": [0.17, 0.8612, 0.4218, 0.8762]}, {"w": "#", "b": [0.4315, 0.8612, 0.4412, 0.8762]}, {"w": "a", "b": [0.4509, 0.8612, 0.4606, 0.8762]}, {"w": "value", "b": [0.4702, 0.8612, 0.5187, 0.8762]}, {"w": "in", "b": [0.5284, 0.8612, 0.5477, 0.8762]}, {"w": "(0,100)", "b": [0.5574, 0.8612, 0.6252, 0.8762]}]}, {"id": "b_20", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 15", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "15", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 233, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "3 z_N = norm.ppf(1-0.5*(1 - confidence_level/100.0))", "words": [{"w": "3", "b": [0.1028, 0.0942, 0.1091, 0.1017]}, {"w": "z_N", "b": [0.17, 0.0892, 0.199, 0.1041]}, {"w": "=", "b": [0.2087, 0.0892, 0.2184, 0.1041]}, {"w": "norm.ppf(1-0.5*(1", "b": [0.2281, 0.0892, 0.3928, 0.1041]}, {"w": "-", "b": [0.4024, 0.0892, 0.4121, 0.1041]}, {"w": "confidence_level/100.0))", "b": [0.4218, 0.0892, 0.6543, 0.1041]}]}, {"id": "b_1", "type": "equation", "text": "4 return z_N", "words": [{"w": "4", "b": [0.1028, 0.1122, 0.1091, 0.1197]}, {"w": "return", "b": [0.17, 0.107, 0.2281, 0.122]}, {"w": "z_N", "b": [0.2378, 0.1071, 0.2668, 0.1221]}]}, {"id": "b_2", "type": "paragraph", "text": "The following code will work for R:", "words": [{"w": "The", "b": [0.1306, 0.1333, 0.1624, 0.1482]}, {"w": "following", "b": [0.1685, 0.1333, 0.2403, 0.1482]}, {"w": "code", "b": [0.2464, 0.1333, 0.2828, 0.1482]}, {"w": "will", "b": [0.289, 0.1333, 0.3177, 0.1482]}, {"w": "work", "b": [0.3238, 0.1333, 0.3628, 0.1482]}, {"w": "for", "b": [0.369, 0.1333, 0.3911, 0.1482]}, {"w": "R:", "b": [0.3973, 0.1333, 0.416, 0.1482]}]}, {"id": "b_3", "type": "equation", "text": "1 get_z_N <- function(confidence_level) {# a value in (0,100)", "words": [{"w": "1", "b": [0.1028, 0.166, 0.1091, 0.1735]}, {"w": "get_z_N", "b": [0.1312, 0.1609, 0.199, 0.1759]}, {"w": "<-", "b": [0.2087, 0.1609, 0.2281, 0.1759]}, {"w": "function(confidence_level)", "b": [0.2378, 0.1609, 0.4896, 0.1759]}, {"w": "{#", "b": [0.4993, 0.1609, 0.5187, 0.1759]}, {"w": "a", "b": [0.5284, 0.1609, 0.538, 0.1759]}, {"w": "value", "b": [0.5477, 0.1609, 0.5962, 0.1759]}, {"w": "in", "b": [0.6058, 0.1609, 0.6252, 0.1759]}, {"w": "(0,100)", "b": [0.6349, 0.1609, 0.7027, 0.1759]}]}, {"id": "b_4", "type": "equation", "text": "2 z_N <- qnorm(1-0.5*(1 - confidence_level/100.0))", "words": [{"w": "2", "b": [0.1028, 0.184, 0.1091, 0.1914]}, {"w": "z_N", "b": [0.1506, 0.1789, 0.1797, 0.1938]}, {"w": "<-", "b": [0.1893, 0.1789, 0.2087, 0.1938]}, {"w": "qnorm(1-0.5*(1", "b": [0.2184, 0.1788, 0.354, 0.1938]}, {"w": "-", "b": [0.3637, 0.1789, 0.3734, 0.1938]}, {"w": "confidence_level/100.0))", "b": [0.3831, 0.1789, 0.6155, 0.1938]}]}, {"id": "b_5", "type": "equation", "text": "3 return(z_N)", "words": [{"w": "3", "b": [0.1028, 0.2019, 0.1091, 0.2094]}, {"w": "return(z_N)", "b": [0.1506, 0.1968, 0.2571, 0.2118]}]}, {"id": "b_6", "type": "equation", "text": "4 }", "words": [{"w": "4", "b": [0.1028, 0.2199, 0.1091, 0.2273]}, {"w": "}", "b": [0.1312, 0.2148, 0.1409, 0.2297]}]}, {"id": "b_7", "type": "paragraph", "text": "In theory, the above technique works even for very tiny test sets with N ≥30. However, a more accurate rule of thumb for obtaining the minimum size N of the test set is as follows: find the value of N such that N × err(1 −err) ≥5. Intuitively, the greater the size of the test set, the lower our uncertainty about the true performance of the model.", "words": [{"w": "In", "b": [0.1312, 0.2409, 0.1484, 0.2559]}, {"w": "theory,", "b": [0.1545, 0.2409, 0.2108, 0.2559]}, {"w": "the", "b": [0.217, 0.2409, 0.243, 0.2559]}, {"w": "above", "b": [0.2491, 0.2409, 0.2959, 0.2559]}, {"w": "technique", "b": [0.3021, 0.2409, 0.3802, 0.2559]}, {"w": "works", "b": [0.3863, 0.2409, 0.4333, 0.2559]}, {"w": "even", "b": [0.4394, 0.2409, 0.4759, 0.2559]}, {"w": "for", "b": [0.482, 0.2409, 0.5044, 0.2559]}, {"w": "very", "b": [0.5106, 0.2409, 0.5455, 0.2559]}, {"w": "tiny", "b": [0.5516, 0.2409, 0.5839, 0.2559]}, {"w": "test", "b": [0.59, 0.2409, 0.6203, 0.2559]}, {"w": "sets", "b": [0.6265, 0.2409, 0.6569, 0.2559]}, {"w": "with", "b": [0.663, 0.2409, 0.6994, 0.2559]}, {"w": "N", "b": [0.7053, 0.2409, 0.7201, 0.2559]}, {"w": "≥30.", "b": [0.7272, 0.2407, 0.7706, 0.2559]}, {"w": "However,", "b": [0.7788, 0.2409, 0.8533, 0.2559]}, {"w": "a", "b": [0.8594, 0.2409, 0.8688, 0.2559]}, {"w": "more", "b": [0.1312, 0.2589, 0.1715, 0.2739]}, {"w": "accurate", "b": [0.1776, 0.2589, 0.2457, 0.2739]}, {"w": "rule", "b": [0.2518, 0.2589, 0.2828, 0.2739]}, {"w": "of", "b": [0.2889, 0.2589, 0.3039, 0.2739]}, {"w": "thumb", "b": [0.31, 0.2589, 0.3626, 0.2739]}, {"w": "for", "b": [0.3687, 0.2589, 0.3909, 0.2739]}, {"w": "obtaining", "b": [0.3971, 0.2589, 0.4733, 0.2739]}, {"w": "the", "b": [0.4795, 0.2589, 0.5053, 0.2739]}, {"w": "minimum", "b": [0.5114, 0.2589, 0.5881, 0.2739]}, {"w": "size", "b": [0.5943, 0.2589, 0.6233, 0.2739]}, {"w": "N", "b": [0.6292, 0.2589, 0.644, 0.2738]}, {"w": "of", "b": [0.6522, 0.2589, 0.6671, 0.2739]}, {"w": "the", "b": [0.6732, 0.2589, 0.699, 0.2739]}, {"w": "test", "b": [0.7052, 0.2589, 0.7352, 0.2739]}, {"w": "set", "b": [0.7413, 0.2589, 0.7641, 0.2739]}, {"w": "is", "b": [0.7702, 0.2589, 0.7827, 0.2739]}, {"w": "as", "b": [0.7888, 0.2589, 0.8054, 0.2739]}, {"w": "follows:", "b": [0.8116, 0.2589, 0.8715, 0.2739]}, {"w": "find", "b": [0.1312, 0.2767, 0.1626, 0.2918]}, {"w": "the", "b": [0.1691, 0.2767, 0.1952, 0.2918]}, {"w": "value", "b": [0.2017, 0.2767, 0.2441, 0.2918]}, {"w": "of", "b": [0.2505, 0.2767, 0.2657, 0.2918]}, {"w": "N", "b": [0.2721, 0.2768, 0.2869, 0.2918]}, {"w": "such", "b": [0.2954, 0.2767, 0.3316, 0.2918]}, {"w": "that", "b": [0.3381, 0.2767, 0.3726, 0.2918]}, {"w": "N", "b": [0.379, 0.2768, 0.3938, 0.2918]}, {"w": "×", "b": [0.4001, 0.2766, 0.4145, 0.2916]}, {"w": "err(1", "b": [0.4188, 0.2767, 0.4582, 0.2918]}, {"w": "−err)", "b": [0.4625, 0.2766, 0.5111, 0.2918]}, {"w": "≥5.", "b": [0.5167, 0.2766, 0.5514, 0.2918]}, {"w": "Intuitively,", "b": [0.5605, 0.2767, 0.6494, 0.2918]}, {"w": "the", "b": [0.656, 0.2767, 0.6821, 0.2918]}, {"w": "greater", "b": [0.6886, 0.2767, 0.7462, 0.2918]}, {"w": "the", "b": [0.7527, 0.2767, 0.7788, 0.2918]}, {"w": "size", "b": [0.7853, 0.2767, 0.8147, 0.2918]}, {"w": "of", "b": [0.8212, 0.2767, 0.8363, 0.2918]}, {"w": "the", "b": [0.8428, 0.2767, 0.8689, 0.2918]}, {"w": "test", "b": [0.1312, 0.2948, 0.1611, 0.3097]}, {"w": "set,", "b": [0.1672, 0.2948, 0.195, 0.3097]}, {"w": "the", "b": [0.2012, 0.2948, 0.2268, 0.3097]}, {"w": "lower", "b": [0.233, 0.2948, 0.2751, 0.3097]}, {"w": "our", "b": [0.2812, 0.2948, 0.3079, 0.3097]}, {"w": "uncertainty", "b": [0.3141, 0.2948, 0.4059, 0.3097]}, {"w": "about", "b": [0.4121, 0.2948, 0.4587, 0.3097]}, {"w": "the", "b": [0.4649, 0.2948, 0.4905, 0.3097]}, {"w": "true", "b": [0.4967, 0.2948, 0.5295, 0.3097]}, {"w": "performance", "b": [0.5357, 0.2948, 0.6353, 0.3097]}, {"w": "of", "b": [0.6414, 0.2948, 0.6563, 0.3097]}, {"w": "the", "b": [0.6624, 0.2948, 0.6881, 0.3097]}, {"w": "model.", "b": [0.6942, 0.2948, 0.7481, 0.3097]}]}, {"id": "b_8", "type": "paragraph", "text": "7.4.2 Bootstrapping Statistical Interval", "words": [{"w": "7.4.2", "b": [0.1312, 0.3426, 0.1749, 0.3576]}, {"w": "Bootstrapping", "b": [0.1961, 0.3426, 0.3288, 0.3576]}, {"w": "Statistical", "b": [0.3359, 0.3426, 0.4285, 0.3576]}, {"w": "Interval", "b": [0.4356, 0.3426, 0.5078, 0.3576]}]}, {"id": "b_9", "type": "paragraph", "text": "A popular technique for reporting the statistical interval for any metric, and which applies to both classification and regression, is based on the idea of bootstrapping. Bootstrapping is a statistical procedure that consists of building B samples of a dataset, and then training a model or computing some statistic using those B samples. In particular, the random forest learning algorithm is based on this idea.", "words": [{"w": "A", "b": [0.1305, 0.3793, 0.1441, 0.3941]}, {"w": "popular", "b": [0.15, 0.3793, 0.2109, 0.3941]}, {"w": "technique", "b": [0.2168, 0.3793, 0.2922, 0.3941]}, {"w": "for", "b": [0.298, 0.3793, 0.3197, 0.3941]}, {"w": "reporting", "b": [0.3256, 0.3793, 0.3986, 0.3941]}, {"w": "the", "b": [0.4045, 0.3793, 0.4296, 0.3941]}, {"w": "statistical", "b": [0.4355, 0.3793, 0.5121, 0.3941]}, {"w": "interval", "b": [0.518, 0.3793, 0.5773, 0.3941]}, {"w": "for", "b": [0.5832, 0.3793, 0.6049, 0.3941]}, {"w": "any", "b": [0.6108, 0.3793, 0.6389, 0.3941]}, {"w": "metric,", "b": [0.6448, 0.3793, 0.7002, 0.3941]}, {"w": "and", "b": [0.7061, 0.3793, 0.7352, 0.3941]}, {"w": "which", "b": [0.7412, 0.3793, 0.7869, 0.3941]}, {"w": "applies", "b": [0.7928, 0.3793, 0.8472, 0.3941]}, {"w": "to", "b": [0.8531, 0.3793, 0.8691, 0.3941]}, {"w": "both", "b": [0.1312, 0.3972, 0.1682, 0.4121]}, {"w": "classification", "b": [0.1744, 0.3972, 0.2749, 0.4121]}, {"w": "and", "b": [0.2811, 0.3972, 0.3104, 0.4121]}, {"w": "regression,", "b": [0.3166, 0.3972, 0.4, 0.4121]}, {"w": "is", "b": [0.4062, 0.3972, 0.4184, 0.4121]}, {"w": "based", "b": [0.4246, 0.3972, 0.4693, 0.4121]}, {"w": "on", "b": [0.4755, 0.3972, 0.4947, 0.4121]}, {"w": "the", "b": [0.5009, 0.3972, 0.5262, 0.4121]}, {"w": "idea", "b": [0.5324, 0.3972, 0.5648, 0.4121]}, {"w": "of", "b": [0.571, 0.3972, 0.5857, 0.4121]}, {"w": "bootstrapping.", "b": [0.593, 0.3972, 0.7283, 0.4121]}, {"w": "Bootstrapping", "b": [0.7365, 0.3972, 0.8504, 0.4121]}, {"w": "is", "b": [0.8565, 0.3972, 0.8688, 0.4121]}, {"w": "a", "b": [0.1312, 0.4151, 0.1404, 0.4301]}, {"w": "statistical", "b": [0.1466, 0.4151, 0.2246, 0.4301]}, {"w": "procedure", "b": [0.2307, 0.4151, 0.3101, 0.4301]}, {"w": "that", "b": [0.3163, 0.4151, 0.35, 0.4301]}, {"w": "consists", "b": [0.3562, 0.4151, 0.4179, 0.4301]}, {"w": "of", "b": [0.424, 0.4151, 0.4389, 0.4301]}, {"w": "building", "b": [0.445, 0.4151, 0.5105, 0.4301]}, {"w": "B", "b": [0.5165, 0.4151, 0.5305, 0.43]}, {"w": "samples", "b": [0.5375, 0.4151, 0.6001, 0.4301]}, {"w": "of", "b": [0.6063, 0.4151, 0.6211, 0.4301]}, {"w": "a", "b": [0.6272, 0.4151, 0.6365, 0.4301]}, {"w": "dataset,", "b": [0.6426, 0.4151, 0.7061, 0.4301]}, {"w": "and", "b": [0.7123, 0.4151, 0.742, 0.4301]}, {"w": "then", "b": [0.7481, 0.4151, 0.7839, 0.4301]}, {"w": "training", "b": [0.7901, 0.4151, 0.8536, 0.4301]}, {"w": "a", "b": [0.8597, 0.4151, 0.8689, 0.4301]}, {"w": "model", "b": [0.1312, 0.4332, 0.179, 0.448]}, {"w": "or", "b": [0.1847, 0.4332, 0.2008, 0.448]}, {"w": "computing", "b": [0.2065, 0.4332, 0.2899, 0.448]}, {"w": "some", "b": [0.2956, 0.4332, 0.3349, 0.448]}, {"w": "statistic", "b": [0.3406, 0.4332, 0.4031, 0.448]}, {"w": "using", "b": [0.4088, 0.4332, 0.4501, 0.448]}, {"w": "those", "b": [0.4558, 0.4332, 0.4971, 0.448]}, {"w": "B", "b": [0.5026, 0.433, 0.5166, 0.448]}, {"w": "samples.", "b": [0.5233, 0.4332, 0.5898, 0.448]}, {"w": "In", "b": [0.5978, 0.4332, 0.6144, 0.448]}, {"w": "particular,", "b": [0.6201, 0.4332, 0.7026, 0.448]}, {"w": "the", "b": [0.7084, 0.4332, 0.7335, 0.448]}, {"w": "random", "b": [0.7391, 0.4331, 0.81, 0.448]}, {"w": "forest", "b": [0.8166, 0.4331, 0.8688, 0.448]}, {"w": "learning", "b": [0.1312, 0.451, 0.1959, 0.466]}, {"w": "algorithm", "b": [0.202, 0.451, 0.28, 0.466]}, {"w": "is", "b": [0.2862, 0.451, 0.2986, 0.466]}, {"w": "based", "b": [0.3047, 0.451, 0.3499, 0.466]}, {"w": "on", "b": [0.3561, 0.451, 0.3756, 0.466]}, {"w": "this", "b": [0.3817, 0.451, 0.4116, 0.466]}, {"w": "idea.", "b": [0.4177, 0.451, 0.4557, 0.466]}]}, {"id": "b_10", "type": "paragraph", "text": "Here’s how bootstrapping applies for building a statistical interval for a metric. Given the test set, we create B random samples Sb, one for each b = 1, . . . , B. To obtain a sample Sb for some b, we use sampling with replacement. Sampling with replacement means that we start with an empty set, and then pick at random an example from the test set and put its exact copy in Sb by keeping the original example in the test set. We keep picking examples at random and putting them to Sb until |Sb| = N.", "words": [{"w": "Here’s", "b": [0.1312, 0.4778, 0.1818, 0.4929]}, {"w": "how", "b": [0.188, 0.4778, 0.2207, 0.4929]}, {"w": "bootstrapping", "b": [0.2268, 0.4778, 0.3414, 0.4929]}, {"w": "applies", "b": [0.3475, 0.4778, 0.4038, 0.4929]}, {"w": "for", "b": [0.4099, 0.4778, 0.4323, 0.4929]}, {"w": "building", "b": [0.4384, 0.4778, 0.505, 0.4929]}, {"w": "a", "b": [0.5111, 0.4778, 0.5205, 0.4929]}, {"w": "statistical", "b": [0.5266, 0.4778, 0.6059, 0.4929]}, {"w": "interval", "b": [0.612, 0.4778, 0.6734, 0.4929]}, {"w": "for", "b": [0.6796, 0.4778, 0.702, 0.4929]}, {"w": "a", "b": [0.7081, 0.4778, 0.7175, 0.4929]}, {"w": "metric.", "b": [0.7236, 0.4778, 0.7808, 0.4929]}, {"w": "Given", "b": [0.789, 0.4778, 0.837, 0.4929]}, {"w": "the", "b": [0.8431, 0.4778, 0.8691, 0.4929]}, {"w": "test", "b": [0.1312, 0.4958, 0.1613, 0.5108]}, {"w": "set,", "b": [0.1675, 0.4958, 0.1955, 0.5108]}, {"w": "we", "b": [0.2016, 0.4958, 0.2228, 0.5108]}, {"w": "create", "b": [0.229, 0.4958, 0.2776, 0.5108]}, {"w": "B", "b": [0.2837, 0.4958, 0.2977, 0.5108]}, {"w": "random", "b": [0.3047, 0.4958, 0.3668, 0.5108]}, {"w": "samples", "b": [0.3729, 0.4958, 0.4362, 0.5108]}, {"w": "Sb,", "b": [0.4423, 0.4957, 0.466, 0.5121]}, {"w": "one", "b": [0.4721, 0.4958, 0.5001, 0.5108]}, {"w": "for", "b": [0.5062, 0.4958, 0.5285, 0.5108]}, {"w": "each", "b": [0.5346, 0.4958, 0.5703, 0.5108]}, {"w": "b", "b": [0.5764, 0.4958, 0.5843, 0.5108]}, {"w": "=", "b": [0.5894, 0.4958, 0.6039, 0.5108]}, {"w": "1,", "b": [0.609, 0.4958, 0.6234, 0.5108]}, {"w": ".", "b": [0.6265, 0.4958, 0.6316, 0.5108]}, {"w": ".", "b": [0.6347, 0.4958, 0.6398, 0.5108]}, {"w": ".", "b": [0.6429, 0.4958, 0.648, 0.5108]}, {"w": ",", "b": [0.6511, 0.4958, 0.6563, 0.5108]}, {"w": "B.", "b": [0.6593, 0.4958, 0.6794, 0.5108]}, {"w": "To", "b": [0.6876, 0.4958, 0.7088, 0.5108]}, {"w": "obtain", "b": [0.7149, 0.4958, 0.7666, 0.5108]}, {"w": "a", "b": [0.7727, 0.4958, 0.782, 0.5108]}, {"w": "sample", "b": [0.7882, 0.4958, 0.8441, 0.5108]}, {"w": "Sb", "b": [0.8502, 0.4957, 0.8678, 0.5121]}, {"w": "for", "b": [0.1312, 0.5137, 0.1536, 0.5288]}, {"w": "some", "b": [0.1598, 0.5137, 0.2004, 0.5288]}, {"w": "b,", "b": [0.2065, 0.5137, 0.2196, 0.5288]}, {"w": "we", "b": [0.2258, 0.5137, 0.2471, 0.5288]}, {"w": "use", "b": [0.2533, 0.5137, 0.2793, 0.5288]}, {"w": "sampling", "b": [0.2855, 0.5138, 0.3678, 0.5288]}, {"w": "with", "b": [0.3749, 0.5138, 0.4162, 0.5288]}, {"w": "replacement.", "b": [0.4232, 0.5137, 0.5409, 0.5288]}, {"w": "Sampling", "b": [0.5491, 0.5137, 0.6249, 0.5288]}, {"w": "with", "b": [0.6311, 0.5137, 0.6674, 0.5288]}, {"w": "replacement", "b": [0.6736, 0.5137, 0.7718, 0.5288]}, {"w": "means", "b": [0.778, 0.5137, 0.829, 0.5288]}, {"w": "that", "b": [0.8351, 0.5137, 0.8694, 0.5288]}, {"w": "we", "b": [0.1306, 0.5319, 0.1512, 0.5467]}, {"w": "start", "b": [0.1566, 0.5319, 0.194, 0.5467]}, {"w": "with", "b": [0.1995, 0.5319, 0.2346, 0.5467]}, {"w": "an", "b": [0.2401, 0.5319, 0.2592, 0.5467]}, {"w": "empty", "b": [0.2647, 0.5319, 0.3139, 0.5467]}, {"w": "set,", "b": [0.3194, 0.5319, 0.3466, 0.5467]}, {"w": "and", "b": [0.3522, 0.5319, 0.3814, 0.5467]}, {"w": "then", "b": [0.3869, 0.5319, 0.422, 0.5467]}, {"w": "pick", "b": [0.4275, 0.5319, 0.4597, 0.5467]}, {"w": "at", "b": [0.4652, 0.5319, 0.4812, 0.5467]}, {"w": "random", "b": [0.4867, 0.5319, 0.547, 0.5467]}, {"w": "an", "b": [0.5525, 0.5319, 0.5716, 0.5467]}, {"w": "example", "b": [0.5771, 0.5319, 0.6419, 0.5467]}, {"w": "from", "b": [0.6474, 0.5319, 0.6841, 0.5467]}, {"w": "the", "b": [0.6896, 0.5319, 0.7147, 0.5467]}, {"w": "test", "b": [0.7202, 0.5319, 0.7495, 0.5467]}, {"w": "set", "b": [0.7549, 0.5319, 0.7772, 0.5467]}, {"w": "and", "b": [0.7826, 0.5319, 0.8118, 0.5467]}, {"w": "put", "b": [0.8173, 0.5319, 0.8444, 0.5467]}, {"w": "its", "b": [0.8499, 0.5319, 0.8691, 0.5467]}, {"w": "exact", "b": [0.1312, 0.5497, 0.1738, 0.5647]}, {"w": "copy", "b": [0.18, 0.5497, 0.2169, 0.5647]}, {"w": "in", "b": [0.2231, 0.5497, 0.2385, 0.5647]}, {"w": "Sb", "b": [0.2446, 0.5495, 0.2622, 0.5659]}, {"w": "by", "b": [0.2693, 0.5497, 0.2888, 0.5647]}, {"w": "keeping", "b": [0.295, 0.5497, 0.3555, 0.5647]}, {"w": "the", "b": [0.3617, 0.5497, 0.3874, 0.5647]}, {"w": "original", "b": [0.3935, 0.5497, 0.4541, 0.5647]}, {"w": "example", "b": [0.4603, 0.5497, 0.5265, 0.5647]}, {"w": "in", "b": [0.5326, 0.5497, 0.548, 0.5647]}, {"w": "the", "b": [0.5542, 0.5497, 0.5798, 0.5647]}, {"w": "test", "b": [0.586, 0.5497, 0.6159, 0.5647]}, {"w": "set.", "b": [0.622, 0.5497, 0.6498, 0.5647]}, {"w": "We", "b": [0.658, 0.5497, 0.6837, 0.5647]}, {"w": "keep", "b": [0.6899, 0.5497, 0.7258, 0.5647]}, {"w": "picking", "b": [0.7319, 0.5497, 0.7894, 0.5647]}, {"w": "examples", "b": [0.7956, 0.5497, 0.8691, 0.5647]}, {"w": "at", "b": [0.1312, 0.5677, 0.1476, 0.5826]}, {"w": "random", "b": [0.1538, 0.5677, 0.2153, 0.5826]}, {"w": "and", "b": [0.2215, 0.5677, 0.2512, 0.5826]}, {"w": "putting", "b": [0.2574, 0.5677, 0.3169, 0.5826]}, {"w": "them", "b": [0.323, 0.5677, 0.364, 0.5826]}, {"w": "to", "b": [0.3702, 0.5677, 0.3866, 0.5826]}, {"w": "Sb", "b": [0.3926, 0.5674, 0.4103, 0.5839]}, {"w": "until", "b": [0.4174, 0.5677, 0.4548, 0.5826]}, {"w": "|Sb|", "b": [0.4609, 0.5674, 0.4898, 0.5839]}, {"w": "=", "b": [0.4949, 0.5677, 0.5093, 0.5826]}, {"w": "N.", "b": [0.5144, 0.5676, 0.5363, 0.5826]}]}, {"id": "b_11", "type": "paragraph", "text": "Once we have B bootstrap samples of the test set, we compute the value of the performance metric mb using each sample Sb as the test set. Sort the B values in ascending order. Then find the value S of the sum of all B values of the metric: S", "words": [{"w": "Once", "b": [0.1312, 0.5947, 0.1716, 0.6095]}, {"w": "we", "b": [0.1778, 0.5947, 0.1984, 0.6095]}, {"w": "have", "b": [0.2046, 0.5947, 0.2404, 0.6095]}, {"w": "B", "b": [0.2465, 0.5946, 0.2605, 0.6095]}, {"w": "bootstrap", "b": [0.2676, 0.5947, 0.3445, 0.6095]}, {"w": "samples", "b": [0.3506, 0.5947, 0.4124, 0.6095]}, {"w": "of", "b": [0.4186, 0.5947, 0.4332, 0.6095]}, {"w": "the", "b": [0.4394, 0.5947, 0.4646, 0.6095]}, {"w": "test", "b": [0.4708, 0.5947, 0.5001, 0.6095]}, {"w": "set,", "b": [0.5063, 0.5947, 0.5337, 0.6095]}, {"w": "we", "b": [0.5398, 0.5947, 0.5605, 0.6095]}, {"w": "compute", "b": [0.5667, 0.5947, 0.6343, 0.6095]}, {"w": "the", "b": [0.6404, 0.5947, 0.6657, 0.6095]}, {"w": "value", "b": [0.6718, 0.5947, 0.7127, 0.6095]}, {"w": "of", "b": [0.7189, 0.5947, 0.7335, 0.6095]}, {"w": "the", "b": [0.7397, 0.5947, 0.7649, 0.6095]}, {"w": "performance", "b": [0.7711, 0.5947, 0.8691, 0.6095]}, {"w": "metric", "b": [0.1312, 0.6125, 0.1823, 0.6275]}, {"w": "mb", "b": [0.1884, 0.6125, 0.2111, 0.6287]}, {"w": "using", "b": [0.2182, 0.6125, 0.2601, 0.6275]}, {"w": "each", "b": [0.2662, 0.6125, 0.3014, 0.6275]}, {"w": "sample", "b": [0.3076, 0.6125, 0.3628, 0.6275]}, {"w": "Sb", "b": [0.3688, 0.6123, 0.3865, 0.6287]}, {"w": "as", "b": [0.3935, 0.6125, 0.41, 0.6275]}, {"w": "the", "b": [0.4161, 0.6125, 0.4416, 0.6275]}, {"w": "test", "b": [0.4478, 0.6125, 0.4775, 0.6275]}, {"w": "set.", "b": [0.4836, 0.6125, 0.5112, 0.6275]}, {"w": "Sort", "b": [0.5195, 0.6125, 0.5532, 0.6275]}, {"w": "the", "b": [0.5593, 0.6125, 0.5848, 0.6275]}, {"w": "B", "b": [0.5908, 0.6125, 0.6048, 0.6275]}, {"w": "values", "b": [0.6119, 0.6125, 0.6605, 0.6275]}, {"w": "in", "b": [0.6666, 0.6125, 0.6819, 0.6275]}, {"w": "ascending", "b": [0.688, 0.6125, 0.7657, 0.6275]}, {"w": "order.", "b": [0.7718, 0.6125, 0.8189, 0.6275]}, {"w": "Then", "b": [0.8271, 0.6125, 0.8689, 0.6275]}, {"w": "find", "b": [0.1312, 0.6342, 0.1626, 0.6493]}, {"w": "the", "b": [0.1699, 0.6342, 0.196, 0.6493]}, {"w": "value", "b": [0.2033, 0.6342, 0.2456, 0.6493]}, {"w": "S", "b": [0.2528, 0.6343, 0.2641, 0.6493]}, {"w": "of", "b": [0.2724, 0.6342, 0.2876, 0.6493]}, {"w": "the", "b": [0.2948, 0.6342, 0.321, 0.6493]}, {"w": "sum", "b": [0.3282, 0.6342, 0.3618, 0.6493]}, {"w": "of", "b": [0.369, 0.6342, 0.3842, 0.6493]}, {"w": "all", "b": [0.3915, 0.6342, 0.4113, 0.6493]}, {"w": "B", "b": [0.4185, 0.6343, 0.4325, 0.6493]}, {"w": "values", "b": [0.4407, 0.6342, 0.4905, 0.6493]}, {"w": "of", "b": [0.4977, 0.6342, 0.5129, 0.6493]}, {"w": "the", "b": [0.5201, 0.6342, 0.5463, 0.6493]}, {"w": "metric:", "b": [0.5536, 0.6342, 0.6111, 0.6493]}, {"w": "S", "b": [0.6214, 0.6343, 0.6327, 0.6493]}]}, {"id": "b_12", "type": "equation", "text": "def = PB", "words": [{"w": "def", "b": [0.6407, 0.6291, 0.66, 0.6396]}, {"w": "=", "b": [0.6432, 0.6343, 0.6576, 0.6493]}, {"w": "PB", "b": [0.667, 0.6303, 0.6976, 0.6488]}]}, {"id": "b_13", "type": "paragraph", "text": "b=1 mb. To obtain a c percent statistical interval for the metric, pick the tightest interval between a minimum a and a maximum b such that the sum of the values mb that lie in that interval accounts for at least c percent of S. Our statistical interval is then given by [a, b].", "words": [{"w": "b=1", "b": [0.6864, 0.6423, 0.7116, 0.6528]}, {"w": "mb.", "b": [0.7156, 0.6342, 0.7444, 0.6505]}, {"w": "To", "b": [0.7559, 0.6342, 0.7774, 0.6493]}, {"w": "obtain", "b": [0.7846, 0.6342, 0.8369, 0.6493]}, {"w": "a", "b": [0.8441, 0.6342, 0.8536, 0.6493]}, {"w": "c", "b": [0.8608, 0.6343, 0.8688, 0.6493]}, {"w": "percent", "b": [0.1312, 0.6521, 0.192, 0.6673]}, {"w": "statistical", "b": [0.1983, 0.6521, 0.278, 0.6673]}, {"w": "interval", "b": [0.2843, 0.6521, 0.3461, 0.6673]}, {"w": "for", "b": [0.3524, 0.6521, 0.3749, 0.6673]}, {"w": "the", "b": [0.3813, 0.6521, 0.4074, 0.6673]}, {"w": "metric,", "b": [0.4137, 0.6521, 0.4713, 0.6673]}, {"w": "pick", "b": [0.4777, 0.6521, 0.5112, 0.6673]}, {"w": "the", "b": [0.5175, 0.6521, 0.5436, 0.6673]}, {"w": "tightest", "b": [0.5499, 0.6521, 0.6123, 0.6673]}, {"w": "interval", "b": [0.6186, 0.6521, 0.6804, 0.6673]}, {"w": "between", "b": [0.6867, 0.6521, 0.7531, 0.6673]}, {"w": "a", "b": [0.7594, 0.6521, 0.7689, 0.6673]}, {"w": "minimum", "b": [0.7752, 0.6521, 0.8531, 0.6673]}, {"w": "a", "b": [0.859, 0.6522, 0.8688, 0.6672]}, {"w": "and", "b": [0.1312, 0.6703, 0.1604, 0.6851]}, {"w": "a", "b": [0.1663, 0.6703, 0.1754, 0.6851]}, {"w": "maximum", "b": [0.1813, 0.6703, 0.2596, 0.6851]}, {"w": "b", "b": [0.2656, 0.6702, 0.2735, 0.6851]}, {"w": "such", "b": [0.2794, 0.6703, 0.3142, 0.6851]}, {"w": "that", "b": [0.3202, 0.6703, 0.3533, 0.6851]}, {"w": "the", "b": [0.3593, 0.6703, 0.3844, 0.6851]}, {"w": "sum", "b": [0.3903, 0.6703, 0.4226, 0.6851]}, {"w": "of", "b": [0.4285, 0.6703, 0.4431, 0.6851]}, {"w": "the", "b": [0.449, 0.6703, 0.4742, 0.6851]}, {"w": "values", "b": [0.4801, 0.6703, 0.5279, 0.6851]}, {"w": "mb", "b": [0.5338, 0.6702, 0.5564, 0.6864]}, {"w": "that", "b": [0.5633, 0.6703, 0.5965, 0.6851]}, {"w": "lie", "b": [0.6024, 0.6703, 0.6205, 0.6851]}, {"w": "in", "b": [0.6265, 0.6703, 0.6415, 0.6851]}, {"w": "that", "b": [0.6475, 0.6703, 0.6806, 0.6851]}, {"w": "interval", "b": [0.6866, 0.6703, 0.7459, 0.6851]}, {"w": "accounts", "b": [0.7519, 0.6703, 0.8198, 0.6851]}, {"w": "for", "b": [0.8257, 0.6703, 0.8474, 0.6851]}, {"w": "at", "b": [0.8533, 0.6703, 0.8694, 0.6851]}, {"w": "least", "b": [0.1312, 0.6882, 0.1683, 0.7031]}, {"w": "c", "b": [0.1744, 0.6881, 0.1824, 0.7031]}, {"w": "percent", "b": [0.1885, 0.6882, 0.2481, 0.7031]}, {"w": "of", "b": [0.2542, 0.6882, 0.2691, 0.7031]}, {"w": "S.", "b": [0.2752, 0.6881, 0.2927, 0.7031]}, {"w": "Our", "b": [0.3009, 0.6882, 0.3327, 0.7031]}, {"w": "statistical", "b": [0.3389, 0.6882, 0.417, 0.7031]}, {"w": "interval", "b": [0.4232, 0.6882, 0.4837, 0.7031]}, {"w": "is", "b": [0.4899, 0.6882, 0.5023, 0.7031]}, {"w": "then", "b": [0.5084, 0.6882, 0.5444, 0.7031]}, {"w": "given", "b": [0.5505, 0.6882, 0.5925, 0.7031]}, {"w": "by", "b": [0.5987, 0.6882, 0.6182, 0.7031]}, {"w": "[a,", "b": [0.6242, 0.6881, 0.6443, 0.7031]}, {"w": "b].", "b": [0.6473, 0.6881, 0.6655, 0.7031]}]}, {"id": "b_14", "type": "paragraph", "text": "The above paragraph might sound vague, so let’s illustrate it with an example. Let’s have B = 10. Let the values of the metric, computed by applying the model to B bootstrap samples, be [9.8, 7.5, 7.9, 10.1, 9.7, 8.4, 7.1, 9.9, 7.7, 8.5]. First, we sort those values in the increasing order: [7.1, 7.5, 7.7, 7.9, 8.4, 8.5, 9.7, 9.8, 9.9, 10.1]. Let our confidence level c be 80%. Then, the minimum a of the statistical interval will be 7.46 and the maximum b will be 9.92. The above two values were found using the percentile function in Python:", "words": [{"w": "The", "b": [0.1306, 0.715, 0.1628, 0.7301]}, {"w": "above", "b": [0.169, 0.715, 0.2158, 0.7301]}, {"w": "paragraph", "b": [0.222, 0.715, 0.3053, 0.7301]}, {"w": "might", "b": [0.3115, 0.715, 0.3588, 0.7301]}, {"w": "sound", "b": [0.365, 0.715, 0.413, 0.7301]}, {"w": "vague,", "b": [0.4191, 0.715, 0.4706, 0.7301]}, {"w": "so", "b": [0.4768, 0.715, 0.4935, 0.7301]}, {"w": "let’s", "b": [0.4997, 0.715, 0.5331, 0.7301]}, {"w": "illustrate", "b": [0.5392, 0.715, 0.6123, 0.7301]}, {"w": "it", "b": [0.6184, 0.715, 0.6309, 0.7301]}, {"w": "with", "b": [0.637, 0.715, 0.6735, 0.7301]}, {"w": "an", "b": [0.6796, 0.715, 0.6994, 0.7301]}, {"w": "example.", "b": [0.7055, 0.715, 0.7779, 0.7301]}, {"w": "Let’s", "b": [0.7861, 0.715, 0.826, 0.7301]}, {"w": "have", "b": [0.8321, 0.715, 0.8691, 0.7301]}, {"w": "B", "b": [0.1312, 0.733, 0.1452, 0.748]}, {"w": "=", "b": [0.1534, 0.7329, 0.1681, 0.748]}, {"w": "10.", "b": [0.1754, 0.7329, 0.1994, 0.748]}, {"w": "Let", "b": [0.2115, 0.7329, 0.2389, 0.748]}, {"w": "the", "b": [0.2464, 0.7329, 0.2726, 0.748]}, {"w": "values", "b": [0.28, 0.7329, 0.3298, 0.748]}, {"w": "of", "b": [0.3372, 0.7329, 0.3524, 0.748]}, {"w": "the", "b": [0.3599, 0.7329, 0.386, 0.748]}, {"w": "metric,", "b": [0.3935, 0.7329, 0.451, 0.748]}, {"w": "computed", "b": [0.4588, 0.7329, 0.5394, 0.748]}, {"w": "by", "b": [0.5468, 0.7329, 0.5667, 0.748]}, {"w": "applying", "b": [0.5741, 0.7329, 0.6447, 0.748]}, {"w": "the", "b": [0.6522, 0.7329, 0.6783, 0.748]}, {"w": "model", "b": [0.6858, 0.7329, 0.7354, 0.748]}, {"w": "to", "b": [0.7429, 0.7329, 0.7596, 0.748]}, {"w": "B", "b": [0.7668, 0.733, 0.7808, 0.748]}, {"w": "bootstrap", "b": [0.7892, 0.7329, 0.8688, 0.748]}, {"w": "samples,", "b": [0.1312, 0.7509, 0.2005, 0.766]}, {"w": "be", "b": [0.2089, 0.7509, 0.2282, 0.766]}, {"w": "[9.8,", "b": [0.2361, 0.7509, 0.2705, 0.766]}, {"w": "7.5,", "b": [0.2736, 0.7509, 0.3027, 0.766]}, {"w": "7.9,", "b": [0.3057, 0.7509, 0.3348, 0.766]}, {"w": "10.1,", "b": [0.3379, 0.7509, 0.3764, 0.766]}, {"w": "9.7,", "b": [0.3794, 0.7509, 0.4085, 0.766]}, {"w": "8.4,", "b": [0.4116, 0.7509, 0.4407, 0.766]}, {"w": "7.1,", "b": [0.4437, 0.7509, 0.4728, 0.766]}, {"w": "9.9,", "b": [0.4759, 0.7509, 0.5049, 0.766]}, {"w": "7.7,", "b": [0.508, 0.7509, 0.5371, 0.766]}, {"w": "8.5].", "b": [0.5402, 0.7509, 0.5746, 0.766]}, {"w": "First,", "b": [0.5882, 0.7509, 0.6331, 0.766]}, {"w": "we", "b": [0.6415, 0.7509, 0.6629, 0.766]}, {"w": "sort", "b": [0.6709, 0.7509, 0.7024, 0.766]}, {"w": "those", "b": [0.7104, 0.7509, 0.7534, 0.766]}, {"w": "values", "b": [0.7613, 0.7509, 0.8111, 0.766]}, {"w": "in", "b": [0.8191, 0.7509, 0.8348, 0.766]}, {"w": "the", "b": [0.8428, 0.7509, 0.8689, 0.766]}, {"w": "increasing", "b": [0.1312, 0.7688, 0.213, 0.7839]}, {"w": "order:", "b": [0.2203, 0.7688, 0.2685, 0.7839]}, {"w": "[7.1,", "b": [0.2789, 0.7688, 0.3133, 0.7839]}, {"w": "7.5,", "b": [0.3164, 0.7688, 0.3455, 0.7839]}, {"w": "7.7,", "b": [0.3485, 0.7688, 0.3776, 0.7839]}, {"w": "7.9,", "b": [0.3807, 0.7688, 0.4098, 0.7839]}, {"w": "8.4,", "b": [0.4128, 0.7688, 0.4419, 0.7839]}, {"w": "8.5,", "b": [0.445, 0.7688, 0.474, 0.7839]}, {"w": "9.7,", "b": [0.4771, 0.7688, 0.5062, 0.7839]}, {"w": "9.8,", "b": [0.5092, 0.7688, 0.5383, 0.7839]}, {"w": "9.9,", "b": [0.5414, 0.7688, 0.5705, 0.7839]}, {"w": "10.1].", "b": [0.5735, 0.7688, 0.6173, 0.7839]}, {"w": "Let", "b": [0.629, 0.7688, 0.6565, 0.7839]}, {"w": "our", "b": [0.6638, 0.7688, 0.691, 0.7839]}, {"w": "confidence", "b": [0.6983, 0.7688, 0.783, 0.7839]}, {"w": "level", "b": [0.7903, 0.7688, 0.827, 0.7839]}, {"w": "c", "b": [0.8342, 0.7689, 0.8421, 0.7839]}, {"w": "be", "b": [0.8494, 0.7688, 0.8688, 0.7839]}, {"w": "80%.", "b": [0.1312, 0.787, 0.1694, 0.8018]}, {"w": "Then,", "b": [0.1775, 0.787, 0.2237, 0.8018]}, {"w": "the", "b": [0.2296, 0.787, 0.2548, 0.8018]}, {"w": "minimum", "b": [0.2606, 0.787, 0.3355, 0.8018]}, {"w": "a", "b": [0.3413, 0.7868, 0.351, 0.8018]}, {"w": "of", "b": [0.3569, 0.787, 0.3714, 0.8018]}, {"w": "the", "b": [0.3773, 0.787, 0.4024, 0.8018]}, {"w": "statistical", "b": [0.4083, 0.787, 0.4849, 0.8018]}, {"w": "interval", "b": [0.4907, 0.787, 0.55, 0.8018]}, {"w": "will", "b": [0.5559, 0.787, 0.584, 0.8018]}, {"w": "be", "b": [0.5899, 0.787, 0.6085, 0.8018]}, {"w": "7.46", "b": [0.6142, 0.7868, 0.6464, 0.8018]}, {"w": "and", "b": [0.6523, 0.787, 0.6814, 0.8018]}, {"w": "the", "b": [0.6873, 0.787, 0.7124, 0.8018]}, {"w": "maximum", "b": [0.7183, 0.787, 0.7966, 0.8018]}, {"w": "b", "b": [0.8024, 0.7868, 0.8103, 0.8018]}, {"w": "will", "b": [0.8162, 0.787, 0.8443, 0.8018]}, {"w": "be", "b": [0.8502, 0.787, 0.8688, 0.8018]}, {"w": "9.92.", "b": [0.1312, 0.8048, 0.1692, 0.8198]}, {"w": "The", "b": [0.1774, 0.8048, 0.2091, 0.8198]}, {"w": "above", "b": [0.2153, 0.8048, 0.2614, 0.8198]}, {"w": "two", "b": [0.2676, 0.8048, 0.2963, 0.8198]}, {"w": "values", "b": [0.3024, 0.8048, 0.3513, 0.8198]}, {"w": "were", "b": [0.3574, 0.8048, 0.3939, 0.8198]}, {"w": "found", "b": [0.4, 0.8048, 0.4457, 0.8198]}, {"w": "using", "b": [0.4518, 0.8048, 0.494, 0.8198]}, {"w": "the", "b": [0.5001, 0.8048, 0.5257, 0.8198]}, {"w": "percentile", "b": [0.5317, 0.8056, 0.6286, 0.8205]}, {"w": "function", "b": [0.6347, 0.8048, 0.7009, 0.8198]}, {"w": "in", "b": [0.707, 0.8048, 0.7224, 0.8198]}, {"w": "Python:", "b": [0.7286, 0.8048, 0.7929, 0.8198]}]}, {"id": "b_15", "type": "paragraph", "text": "1 from numpy import percentile", "words": [{"w": "1", "b": [0.1028, 0.8376, 0.1091, 0.845]}, {"w": "from", "b": [0.1312, 0.8325, 0.17, 0.8474]}, {"w": "numpy", "b": [0.1797, 0.8325, 0.2281, 0.8474]}, {"w": "import", "b": [0.2378, 0.8325, 0.2959, 0.8474]}, {"w": "percentile", "b": [0.3056, 0.8325, 0.4024, 0.8474]}]}, {"id": "b_16", "type": "equation", "text": "2 def get_interval(values, confidence_level):", "words": [{"w": "2", "b": [0.1028, 0.8555, 0.1091, 0.863]}, {"w": "def", "b": [0.1312, 0.8504, 0.1603, 0.8653]}, {"w": "get_interval(values,", "b": [0.17, 0.8504, 0.3637, 0.8654]}, {"w": "confidence_level):", "b": [0.3734, 0.8504, 0.5477, 0.8654]}]}, {"id": "b_17", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 16", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "16", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 234, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "3 # confidence_level is a value in (0,100)", "words": [{"w": "3", "b": [0.1028, 0.0942, 0.1091, 0.1017]}, {"w": "#", "b": [0.17, 0.0892, 0.1797, 0.1041]}, {"w": "confidence_level", "b": [0.1893, 0.0892, 0.3443, 0.1041]}, {"w": "is", "b": [0.354, 0.0892, 0.3734, 0.1041]}, {"w": "a", "b": [0.3831, 0.0892, 0.3928, 0.1041]}, {"w": "value", "b": [0.4024, 0.0892, 0.4509, 0.1041]}, {"w": "in", "b": [0.4606, 0.0892, 0.4799, 0.1041]}, {"w": "(0,100)", "b": [0.4896, 0.0892, 0.5574, 0.1041]}]}, {"id": "b_1", "type": "equation", "text": "4 lower = percentile(values, (100.0-confidence_level)/2.0)", "words": [{"w": "4", "b": [0.1028, 0.1122, 0.1091, 0.1197]}, {"w": "lower", "b": [0.17, 0.1071, 0.2184, 0.1221]}, {"w": "=", "b": [0.2281, 0.1071, 0.2378, 0.1221]}, {"w": "percentile(values,", "b": [0.2475, 0.1071, 0.4218, 0.1221]}, {"w": "(100.0-confidence_level)/2.0)", "b": [0.4315, 0.1071, 0.7124, 0.1221]}]}, {"id": "b_2", "type": "equation", "text": "5 upper = percentile(values, confidence_level+((100.0-confidence_level)/2.0))", "words": [{"w": "5", "b": [0.1028, 0.1301, 0.1091, 0.1376]}, {"w": "upper", "b": [0.17, 0.125, 0.2184, 0.14]}, {"w": "=", "b": [0.2281, 0.125, 0.2378, 0.14]}, {"w": "percentile(values,", "b": [0.2475, 0.125, 0.4218, 0.14]}, {"w": "confidence_level+((100.0-confidence_level)/2.0))", "b": [0.4315, 0.125, 0.8964, 0.14]}]}, {"id": "b_3", "type": "paragraph", "text": "6 return (lower, upper)", "words": [{"w": "6", "b": [0.1028, 0.1481, 0.1091, 0.1555]}, {"w": "return", "b": [0.17, 0.1429, 0.2281, 0.1579]}, {"w": "(lower,", "b": [0.2378, 0.143, 0.3056, 0.1579]}, {"w": "upper)", "b": [0.3153, 0.143, 0.3734, 0.1579]}]}, {"id": "b_4", "type": "paragraph", "text": "The same can be done in R by using the quantile function:", "words": [{"w": "The", "b": [0.1306, 0.1692, 0.1624, 0.1841]}, {"w": "same", "b": [0.1685, 0.1692, 0.2086, 0.1841]}, {"w": "can", "b": [0.2147, 0.1692, 0.2424, 0.1841]}, {"w": "be", "b": [0.2486, 0.1692, 0.2676, 0.1841]}, {"w": "done", "b": [0.2737, 0.1692, 0.3117, 0.1841]}, {"w": "in", "b": [0.3178, 0.1692, 0.3332, 0.1841]}, {"w": "R", "b": [0.3393, 0.1692, 0.3529, 0.1841]}, {"w": "by", "b": [0.3591, 0.1692, 0.3786, 0.1841]}, {"w": "using", "b": [0.3847, 0.1692, 0.4269, 0.1841]}, {"w": "the", "b": [0.433, 0.1692, 0.4587, 0.1841]}, {"w": "quantile", "b": [0.4647, 0.1699, 0.5421, 0.1849]}, {"w": "function:", "b": [0.5483, 0.1692, 0.6196, 0.1841]}]}, {"id": "b_5", "type": "equation", "text": "1 get_interval <- function(values, confidence_level) {", "words": [{"w": "1", "b": [0.1028, 0.2019, 0.1091, 0.2094]}, {"w": "get_interval", "b": [0.1312, 0.1968, 0.2475, 0.2118]}, {"w": "<-", "b": [0.2571, 0.1968, 0.2765, 0.2118]}, {"w": "function(values,", "b": [0.2862, 0.1968, 0.4412, 0.2118]}, {"w": "confidence_level)", "b": [0.4509, 0.1968, 0.6155, 0.2118]}, {"w": "{", "b": [0.6252, 0.1968, 0.6349, 0.2118]}]}, {"id": "b_6", "type": "equation", "text": "2 # confidence_level is a value in (0,100)", "words": [{"w": "2", "b": [0.1028, 0.2199, 0.1091, 0.2273]}, {"w": "#", "b": [0.17, 0.2148, 0.1797, 0.2297]}, {"w": "confidence_level", "b": [0.1893, 0.2148, 0.3443, 0.2297]}, {"w": "is", "b": [0.354, 0.2148, 0.3734, 0.2297]}, {"w": "a", "b": [0.3831, 0.2148, 0.3928, 0.2297]}, {"w": "value", "b": [0.4024, 0.2148, 0.4509, 0.2297]}, {"w": "in", "b": [0.4606, 0.2148, 0.4799, 0.2297]}, {"w": "(0,100)", "b": [0.4896, 0.2148, 0.5574, 0.2297]}]}, {"id": "b_7", "type": "equation", "text": "3 cl <- confidence_level/100.0", "words": [{"w": "3", "b": [0.1028, 0.2378, 0.1091, 0.2453]}, {"w": "cl", "b": [0.17, 0.2327, 0.1893, 0.2477]}, {"w": "<-", "b": [0.199, 0.2327, 0.2184, 0.2477]}, {"w": "confidence_level/100.0", "b": [0.2281, 0.2327, 0.4412, 0.2477]}]}, {"id": "b_8", "type": "equation", "text": "4 quant <- quantile(values, probs = c((1.0-cl)/2.0, cl+((1.0-cl)/2.0)),", "words": [{"w": "4", "b": [0.1028, 0.2557, 0.1091, 0.2632]}, {"w": "quant", "b": [0.17, 0.2507, 0.2184, 0.2656]}, {"w": "<-", "b": [0.2281, 0.2507, 0.2475, 0.2656]}, {"w": "quantile(values,", "b": [0.2572, 0.2506, 0.4121, 0.2656]}, {"w": "probs", "b": [0.4218, 0.2507, 0.4702, 0.2656]}, {"w": "=", "b": [0.4799, 0.2507, 0.4896, 0.2656]}, {"w": "c((1.0-cl)/2.0,", "b": [0.4993, 0.2506, 0.6446, 0.2656]}, {"w": "cl+((1.0-cl)/2.0)),", "b": [0.6543, 0.2507, 0.8383, 0.2656]}]}, {"id": "b_9", "type": "equation", "text": "5 names = FALSE)", "words": [{"w": "5", "b": [0.1028, 0.2737, 0.1091, 0.2812]}, {"w": "names", "b": [0.17, 0.2686, 0.2184, 0.2836]}, {"w": "=", "b": [0.2281, 0.2686, 0.2378, 0.2836]}, {"w": "FALSE)", "b": [0.2475, 0.2686, 0.3056, 0.2836]}]}, {"id": "b_10", "type": "paragraph", "text": "6 return(quant)", "words": [{"w": "6", "b": [0.1028, 0.2916, 0.1091, 0.2991]}, {"w": "return(quant)", "b": [0.1506, 0.2865, 0.2765, 0.3015]}]}, {"id": "b_11", "type": "equation", "text": "7 }", "words": [{"w": "7", "b": [0.1028, 0.3096, 0.1091, 0.3171]}, {"w": "}", "b": [0.1312, 0.3045, 0.1409, 0.3195]}]}, {"id": "b_12", "type": "paragraph", "text": "Once you have the boundaries a = 7.46 and b = 9.92 of the statistical interval, you can report that the value of the metric for your model lies in the interval [7.46, 9.92] with confidence 80%.", "words": [{"w": "Once", "b": [0.1312, 0.3308, 0.1714, 0.3456]}, {"w": "you", "b": [0.177, 0.3308, 0.2052, 0.3456]}, {"w": "have", "b": [0.2108, 0.3308, 0.2464, 0.3456]}, {"w": "the", "b": [0.252, 0.3308, 0.2771, 0.3456]}, {"w": "boundaries", "b": [0.2827, 0.3308, 0.3688, 0.3456]}, {"w": "a", "b": [0.3743, 0.3307, 0.3841, 0.3456]}, {"w": "=", "b": [0.3892, 0.3308, 0.4032, 0.3456]}, {"w": "7.46", "b": [0.4084, 0.3307, 0.4406, 0.3456]}, {"w": "and", "b": [0.4462, 0.3308, 0.4753, 0.3456]}, {"w": "b", "b": [0.4809, 0.3307, 0.4888, 0.3456]}, {"w": "=", "b": [0.494, 0.3308, 0.508, 0.3456]}, {"w": "9.92", "b": [0.5132, 0.3307, 0.5454, 0.3456]}, {"w": "of", "b": [0.551, 0.3308, 0.5656, 0.3456]}, {"w": "the", "b": [0.5712, 0.3308, 0.5963, 0.3456]}, {"w": "statistical", "b": [0.6019, 0.3308, 0.6785, 0.3456]}, {"w": "interval,", "b": [0.6841, 0.3308, 0.7484, 0.3456]}, {"w": "you", "b": [0.7541, 0.3308, 0.7822, 0.3456]}, {"w": "can", "b": [0.7878, 0.3308, 0.815, 0.3456]}, {"w": "report", "b": [0.8206, 0.3308, 0.8694, 0.3456]}, {"w": "that", "b": [0.1312, 0.3487, 0.1644, 0.3635]}, {"w": "the", "b": [0.1697, 0.3487, 0.1949, 0.3635]}, {"w": "value", "b": [0.2002, 0.3487, 0.2409, 0.3635]}, {"w": "of", "b": [0.2462, 0.3487, 0.2608, 0.3635]}, {"w": "the", "b": [0.2661, 0.3487, 0.2913, 0.3635]}, {"w": "metric", "b": [0.2966, 0.3487, 0.3469, 0.3635]}, {"w": "for", "b": [0.3523, 0.3487, 0.3739, 0.3635]}, {"w": "your", "b": [0.3793, 0.3487, 0.4145, 0.3635]}, {"w": "model", "b": [0.4198, 0.3487, 0.4676, 0.3635]}, {"w": "lies", "b": [0.4729, 0.3487, 0.4981, 0.3635]}, {"w": "in", "b": [0.5035, 0.3487, 0.5186, 0.3635]}, {"w": "the", "b": [0.5239, 0.3487, 0.549, 0.3635]}, {"w": "interval", "b": [0.5544, 0.3487, 0.6137, 0.3635]}, {"w": "[7.46,", "b": [0.6188, 0.3486, 0.6613, 0.3636]}, {"w": "9.92]", "b": [0.6644, 0.3486, 0.7016, 0.3636]}, {"w": "with", "b": [0.707, 0.3487, 0.7421, 0.3635]}, {"w": "confidence", "b": [0.7475, 0.3487, 0.8289, 0.3635]}, {"w": "80%.", "b": [0.8342, 0.3487, 0.8724, 0.3635]}]}, {"id": "b_13", "type": "paragraph", "text": "In practice, analysts use confidence levels of either 95% or 99%. The higher the confidence, the wider the interval. The number B of bootstrap samples is usually set to 100.", "words": [{"w": "In", "b": [0.1312, 0.3755, 0.1482, 0.3905]}, {"w": "practice,", "b": [0.1544, 0.3755, 0.2235, 0.3905]}, {"w": "analysts", "b": [0.2296, 0.3755, 0.2953, 0.3905]}, {"w": "use", "b": [0.3014, 0.3755, 0.3273, 0.3905]}, {"w": "confidence", "b": [0.3334, 0.3755, 0.4169, 0.3905]}, {"w": "levels", "b": [0.4231, 0.3755, 0.4665, 0.3905]}, {"w": "of", "b": [0.4726, 0.3755, 0.4875, 0.3905]}, {"w": "either", "b": [0.4937, 0.3755, 0.5401, 0.3905]}, {"w": "95%", "b": [0.546, 0.3755, 0.58, 0.3905]}, {"w": "or", "b": [0.5861, 0.3755, 0.6027, 0.3905]}, {"w": "99%.", "b": [0.6088, 0.3755, 0.6479, 0.3905]}, {"w": "The", "b": [0.6561, 0.3755, 0.6881, 0.3905]}, {"w": "higher", "b": [0.6942, 0.3755, 0.7448, 0.3905]}, {"w": "the", "b": [0.7509, 0.3755, 0.7767, 0.3905]}, {"w": "confidence,", "b": [0.7828, 0.3755, 0.8715, 0.3905]}, {"w": "the", "b": [0.1312, 0.3935, 0.1569, 0.4084]}, {"w": "wider", "b": [0.163, 0.3935, 0.2072, 0.4084]}, {"w": "the", "b": [0.2133, 0.3935, 0.239, 0.4084]}, {"w": "interval.", "b": [0.2451, 0.3935, 0.3108, 0.4084]}, {"w": "The", "b": [0.319, 0.3935, 0.3508, 0.4084]}, {"w": "number", "b": [0.3569, 0.3935, 0.418, 0.4084]}, {"w": "B", "b": [0.424, 0.3935, 0.438, 0.4084]}, {"w": "of", "b": [0.4451, 0.3935, 0.46, 0.4084]}, {"w": "bootstrap", "b": [0.4661, 0.3935, 0.5442, 0.4084]}, {"w": "samples", "b": [0.5503, 0.3935, 0.6131, 0.4084]}, {"w": "is", "b": [0.6192, 0.3935, 0.6317, 0.4084]}, {"w": "usually", "b": [0.6378, 0.3935, 0.6948, 0.4084]}, {"w": "set", "b": [0.701, 0.3935, 0.7236, 0.4084]}, {"w": "to", "b": [0.7298, 0.3935, 0.7462, 0.4084]}, {"w": "100.", "b": [0.7522, 0.3935, 0.785, 0.4084]}]}, {"id": "b_14", "type": "paragraph", "text": "7.4.3 Bootstrapping Prediction Interval for Regression", "words": [{"w": "7.4.3", "b": [0.1312, 0.4413, 0.1749, 0.4563]}, {"w": "Bootstrapping", "b": [0.1961, 0.4413, 0.3288, 0.4563]}, {"w": "Prediction", "b": [0.3359, 0.4413, 0.4325, 0.4563]}, {"w": "Interval", "b": [0.4396, 0.4413, 0.5117, 0.4563]}, {"w": "for", "b": [0.5188, 0.4413, 0.5447, 0.4563]}, {"w": "Regression", "b": [0.5517, 0.4413, 0.6515, 0.4563]}]}, {"id": "b_15", "type": "paragraph", "text": "Until now, we considered the statistical interval for an entire model and a given performance metric. In this section, we will use bootstrapping to compute the prediction interval for a regression model and a given feature vector x, which this model receives as input.", "words": [{"w": "Until", "b": [0.1312, 0.478, 0.1715, 0.4928]}, {"w": "now,", "b": [0.1776, 0.478, 0.2143, 0.4928]}, {"w": "we", "b": [0.2204, 0.478, 0.241, 0.4928]}, {"w": "considered", "b": [0.2472, 0.478, 0.3298, 0.4928]}, {"w": "the", "b": [0.336, 0.478, 0.3611, 0.4928]}, {"w": "statistical", "b": [0.3673, 0.478, 0.4439, 0.4928]}, {"w": "interval", "b": [0.4501, 0.478, 0.5095, 0.4928]}, {"w": "for", "b": [0.5156, 0.478, 0.5373, 0.4928]}, {"w": "an", "b": [0.5434, 0.478, 0.5625, 0.4928]}, {"w": "entire", "b": [0.5687, 0.478, 0.6135, 0.4928]}, {"w": "model", "b": [0.6196, 0.478, 0.6674, 0.4928]}, {"w": "and", "b": [0.6735, 0.478, 0.7027, 0.4928]}, {"w": "a", "b": [0.7089, 0.478, 0.7179, 0.4928]}, {"w": "given", "b": [0.724, 0.478, 0.7653, 0.4928]}, {"w": "performance", "b": [0.7714, 0.478, 0.8691, 0.4928]}, {"w": "metric.", "b": [0.1312, 0.496, 0.1866, 0.5108]}, {"w": "In", "b": [0.1948, 0.496, 0.2114, 0.5108]}, {"w": "this", "b": [0.2175, 0.496, 0.2468, 0.5108]}, {"w": "section,", "b": [0.2529, 0.496, 0.3124, 0.5108]}, {"w": "we", "b": [0.3186, 0.496, 0.3392, 0.5108]}, {"w": "will", "b": [0.3453, 0.496, 0.3735, 0.5108]}, {"w": "use", "b": [0.3796, 0.496, 0.4049, 0.5108]}, {"w": "bootstrapping", "b": [0.411, 0.496, 0.5218, 0.5108]}, {"w": "to", "b": [0.528, 0.496, 0.544, 0.5108]}, {"w": "compute", "b": [0.5502, 0.496, 0.6176, 0.5108]}, {"w": "the", "b": [0.6237, 0.496, 0.6489, 0.5108]}, {"w": "prediction", "b": [0.6548, 0.4959, 0.7487, 0.5108]}, {"w": "interval", "b": [0.7557, 0.4959, 0.8258, 0.5108]}, {"w": "for", "b": [0.8319, 0.496, 0.8536, 0.5108]}, {"w": "a", "b": [0.8597, 0.496, 0.8688, 0.5108]}, {"w": "regression", "b": [0.1312, 0.5138, 0.2105, 0.5288]}, {"w": "model", "b": [0.2167, 0.5138, 0.2654, 0.5288]}, {"w": "and", "b": [0.2715, 0.5138, 0.3013, 0.5288]}, {"w": "a", "b": [0.3074, 0.5138, 0.3166, 0.5288]}, {"w": "given", "b": [0.3228, 0.5138, 0.3648, 0.5288]}, {"w": "feature", "b": [0.371, 0.5138, 0.4269, 0.5288]}, {"w": "vector", "b": [0.4331, 0.5138, 0.4824, 0.5288]}, {"w": "x,", "b": [0.4883, 0.5138, 0.5048, 0.5288]}, {"w": "which", "b": [0.5109, 0.5138, 0.5576, 0.5288]}, {"w": "this", "b": [0.5637, 0.5138, 0.5936, 0.5288]}, {"w": "model", "b": [0.5997, 0.5138, 0.6484, 0.5288]}, {"w": "receives", "b": [0.6546, 0.5138, 0.7163, 0.5288]}, {"w": "as", "b": [0.7224, 0.5138, 0.7389, 0.5288]}, {"w": "input.", "b": [0.7451, 0.5138, 0.7933, 0.5288]}]}, {"id": "b_16", "type": "paragraph", "text": "We want to answer the following question. Given a regression model f and an input feature vector x, what is an interval of values [fmin(x), fmax(x)] such that the prediction f(x) lies inside that interval with confidence c percent?", "words": [{"w": "We", "b": [0.1303, 0.5408, 0.1557, 0.5557]}, {"w": "want", "b": [0.1619, 0.5408, 0.2005, 0.5557]}, {"w": "to", "b": [0.2066, 0.5408, 0.2229, 0.5557]}, {"w": "answer", "b": [0.2291, 0.5408, 0.2836, 0.5557]}, {"w": "the", "b": [0.2898, 0.5408, 0.3152, 0.5557]}, {"w": "following", "b": [0.3214, 0.5408, 0.3926, 0.5557]}, {"w": "question.", "b": [0.3987, 0.5408, 0.4706, 0.5557]}, {"w": "Given", "b": [0.4788, 0.5408, 0.5257, 0.5557]}, {"w": "a", "b": [0.5318, 0.5408, 0.541, 0.5557]}, {"w": "regression", "b": [0.5471, 0.5408, 0.6258, 0.5557]}, {"w": "model", "b": [0.6319, 0.5408, 0.6803, 0.5557]}, {"w": "f", "b": [0.6862, 0.5407, 0.6952, 0.5557]}, {"w": "and", "b": [0.7033, 0.5408, 0.7328, 0.5557]}, {"w": "an", "b": [0.739, 0.5408, 0.7583, 0.5557]}, {"w": "input", "b": [0.7645, 0.5408, 0.8072, 0.5557]}, {"w": "feature", "b": [0.8134, 0.5408, 0.8689, 0.5557]}, {"w": "vector", "b": [0.1308, 0.5586, 0.1805, 0.5736]}, {"w": "x,", "b": [0.1867, 0.5586, 0.2031, 0.5736]}, {"w": "what", "b": [0.2093, 0.5586, 0.2497, 0.5736]}, {"w": "is", "b": [0.2558, 0.5586, 0.2684, 0.5736]}, {"w": "an", "b": [0.2746, 0.5586, 0.2942, 0.5736]}, {"w": "interval", "b": [0.3004, 0.5586, 0.3616, 0.5736]}, {"w": "of", "b": [0.3677, 0.5586, 0.3827, 0.5736]}, {"w": "values", "b": [0.3889, 0.5586, 0.4382, 0.5736]}, {"w": "[fmin(x),", "b": [0.4443, 0.5586, 0.5179, 0.5749]}, {"w": "fmax(x)]", "b": [0.5209, 0.5586, 0.5913, 0.5749]}, {"w": "such", "b": [0.5975, 0.5586, 0.6333, 0.5736]}, {"w": "that", "b": [0.6395, 0.5586, 0.6737, 0.5736]}, {"w": "the", "b": [0.6798, 0.5586, 0.7057, 0.5736]}, {"w": "prediction", "b": [0.7119, 0.5586, 0.7938, 0.5736]}, {"w": "f(x)", "b": [0.7998, 0.5586, 0.8366, 0.5736]}, {"w": "lies", "b": [0.8428, 0.5586, 0.8688, 0.5736]}, {"w": "inside", "b": [0.1312, 0.5766, 0.1775, 0.5916]}, {"w": "that", "b": [0.1836, 0.5766, 0.2175, 0.5916]}, {"w": "interval", "b": [0.2236, 0.5766, 0.2842, 0.5916]}, {"w": "with", "b": [0.2903, 0.5766, 0.3262, 0.5916]}, {"w": "confidence", "b": [0.3324, 0.5766, 0.4155, 0.5916]}, {"w": "c", "b": [0.4215, 0.5766, 0.4294, 0.5916]}, {"w": "percent?", "b": [0.4356, 0.5766, 0.5038, 0.5916]}]}, {"id": "b_17", "type": "paragraph", "text": "The bootstrapping procedure here is similar. The only difference is that now we build B bootstrap samples of the training set (and not the test set). By using B bootstrap samples as B training sets, we build B regression models, one per bootstrap sample. Let the input feature vector be x. Fix a confidence level c. Apply B models to x and obtain B predictions. Now, by using the same technique as above, find the tightest interval between a minimum a and a maximum b such that the sum of the values of predictions that lie in the interval accounts for at least c percent of the sum of B predictions. Then return the prediction f(x), and state that, with confidence c percent, it lies in the interval [a, b].", "words": [{"w": "The", "b": [0.1306, 0.6034, 0.163, 0.6185]}, {"w": "bootstrapping", "b": [0.1697, 0.6034, 0.2849, 0.6185]}, {"w": "procedure", "b": [0.2917, 0.6034, 0.3729, 0.6185]}, {"w": "here", "b": [0.3796, 0.6034, 0.4142, 0.6185]}, {"w": "is", "b": [0.421, 0.6034, 0.4337, 0.6185]}, {"w": "similar.", "b": [0.4404, 0.6034, 0.5012, 0.6185]}, {"w": "The", "b": [0.5112, 0.6034, 0.5437, 0.6185]}, {"w": "only", "b": [0.5504, 0.6034, 0.5855, 0.6185]}, {"w": "difference", "b": [0.5922, 0.6034, 0.6702, 0.6185]}, {"w": "is", "b": [0.677, 0.6034, 0.6896, 0.6185]}, {"w": "that", "b": [0.6964, 0.6034, 0.7309, 0.6185]}, {"w": "now", "b": [0.7377, 0.6034, 0.7706, 0.6185]}, {"w": "we", "b": [0.7774, 0.6034, 0.7988, 0.6185]}, {"w": "build", "b": [0.8056, 0.6034, 0.8474, 0.6185]}, {"w": "B", "b": [0.8538, 0.6035, 0.8678, 0.6185]}, {"w": "bootstrap", "b": [0.1312, 0.6215, 0.2095, 0.6364]}, {"w": "samples", "b": [0.2156, 0.6215, 0.2785, 0.6364]}, {"w": "of", "b": [0.2846, 0.6215, 0.2995, 0.6364]}, {"w": "the", "b": [0.3057, 0.6215, 0.3314, 0.6364]}, {"w": "training", "b": [0.3375, 0.6215, 0.4013, 0.6364]}, {"w": "set", "b": [0.4074, 0.6215, 0.4301, 0.6364]}, {"w": "(and", "b": [0.4363, 0.6215, 0.4733, 0.6364]}, {"w": "not", "b": [0.4794, 0.6215, 0.5061, 0.6364]}, {"w": "the", "b": [0.5123, 0.6215, 0.538, 0.6364]}, {"w": "test", "b": [0.5441, 0.6215, 0.574, 0.6364]}, {"w": "set).", "b": [0.5802, 0.6215, 0.6152, 0.6364]}, {"w": "By", "b": [0.6234, 0.6215, 0.6462, 0.6364]}, {"w": "using", "b": [0.6524, 0.6215, 0.6946, 0.6364]}, {"w": "B", "b": [0.7005, 0.6215, 0.7145, 0.6364]}, {"w": "bootstrap", "b": [0.7216, 0.6215, 0.7998, 0.6364]}, {"w": "samples", "b": [0.806, 0.6215, 0.8688, 0.6364]}, {"w": "as", "b": [0.1312, 0.6394, 0.148, 0.6544]}, {"w": "B", "b": [0.1541, 0.6394, 0.1681, 0.6544]}, {"w": "training", "b": [0.1752, 0.6394, 0.2397, 0.6544]}, {"w": "sets,", "b": [0.2458, 0.6394, 0.2814, 0.6544]}, {"w": "we", "b": [0.2875, 0.6394, 0.3089, 0.6544]}, {"w": "build", "b": [0.315, 0.6394, 0.3566, 0.6544]}, {"w": "B", "b": [0.3627, 0.6394, 0.3767, 0.6544]}, {"w": "regression", "b": [0.3837, 0.6394, 0.4641, 0.6544]}, {"w": "models,", "b": [0.4703, 0.6394, 0.5322, 0.6544]}, {"w": "one", "b": [0.5384, 0.6394, 0.5665, 0.6544]}, {"w": "per", "b": [0.5726, 0.6394, 0.5992, 0.6544]}, {"w": "bootstrap", "b": [0.6053, 0.6394, 0.6845, 0.6544]}, {"w": "sample.", "b": [0.6906, 0.6394, 0.7521, 0.6544]}, {"w": "Let", "b": [0.7602, 0.6394, 0.7875, 0.6544]}, {"w": "the", "b": [0.7937, 0.6394, 0.8197, 0.6544]}, {"w": "input", "b": [0.8258, 0.6394, 0.8695, 0.6544]}, {"w": "feature", "b": [0.1312, 0.6575, 0.1861, 0.6723]}, {"w": "vector", "b": [0.1921, 0.6575, 0.2404, 0.6723]}, {"w": "be", "b": [0.2464, 0.6575, 0.265, 0.6723]}, {"w": "x.", "b": [0.271, 0.6574, 0.2873, 0.6724]}, {"w": "Fix", "b": [0.2955, 0.6575, 0.3219, 0.6723]}, {"w": "a", "b": [0.3279, 0.6575, 0.337, 0.6723]}, {"w": "confidence", "b": [0.343, 0.6575, 0.4244, 0.6723]}, {"w": "level", "b": [0.4305, 0.6575, 0.4657, 0.6723]}, {"w": "c.", "b": [0.4716, 0.6574, 0.4846, 0.6723]}, {"w": "Apply", "b": [0.4928, 0.6575, 0.541, 0.6723]}, {"w": "B", "b": [0.547, 0.6574, 0.561, 0.6723]}, {"w": "models", "b": [0.568, 0.6575, 0.6229, 0.6723]}, {"w": "to", "b": [0.6289, 0.6575, 0.645, 0.6723]}, {"w": "x", "b": [0.651, 0.6574, 0.6622, 0.6724]}, {"w": "and", "b": [0.6684, 0.6575, 0.6975, 0.6723]}, {"w": "obtain", "b": [0.7036, 0.6575, 0.7538, 0.6723]}, {"w": "B", "b": [0.7598, 0.6574, 0.7738, 0.6723]}, {"w": "predictions.", "b": [0.7808, 0.6575, 0.8724, 0.6723]}, {"w": "Now,", "b": [0.1312, 0.6752, 0.1729, 0.6903]}, {"w": "by", "b": [0.179, 0.6752, 0.1988, 0.6903]}, {"w": "using", "b": [0.205, 0.6752, 0.2477, 0.6903]}, {"w": "the", "b": [0.2539, 0.6752, 0.2799, 0.6903]}, {"w": "same", "b": [0.2861, 0.6752, 0.3268, 0.6903]}, {"w": "technique", "b": [0.3329, 0.6752, 0.411, 0.6903]}, {"w": "as", "b": [0.4172, 0.6752, 0.434, 0.6903]}, {"w": "above,", "b": [0.4401, 0.6752, 0.4922, 0.6903]}, {"w": "find", "b": [0.4983, 0.6752, 0.5296, 0.6903]}, {"w": "the", "b": [0.5357, 0.6752, 0.5618, 0.6903]}, {"w": "tightest", "b": [0.5679, 0.6752, 0.63, 0.6903]}, {"w": "interval", "b": [0.6361, 0.6752, 0.6976, 0.6903]}, {"w": "between", "b": [0.7038, 0.6752, 0.7699, 0.6903]}, {"w": "a", "b": [0.776, 0.6752, 0.7854, 0.6903]}, {"w": "minimum", "b": [0.7916, 0.6752, 0.8691, 0.6903]}, {"w": "a", "b": [0.1312, 0.6933, 0.141, 0.7082]}, {"w": "and", "b": [0.1474, 0.6932, 0.1777, 0.7083]}, {"w": "a", "b": [0.1841, 0.6932, 0.1935, 0.7083]}, {"w": "maximum", "b": [0.1999, 0.6932, 0.2815, 0.7083]}, {"w": "b", "b": [0.2878, 0.6933, 0.2957, 0.7082]}, {"w": "such", "b": [0.3021, 0.6932, 0.3384, 0.7083]}, {"w": "that", "b": [0.3447, 0.6932, 0.3792, 0.7083]}, {"w": "the", "b": [0.3856, 0.6932, 0.4118, 0.7083]}, {"w": "sum", "b": [0.4182, 0.6932, 0.4518, 0.7083]}, {"w": "of", "b": [0.4581, 0.6932, 0.4733, 0.7083]}, {"w": "the", "b": [0.4797, 0.6932, 0.5059, 0.7083]}, {"w": "values", "b": [0.5122, 0.6932, 0.562, 0.7083]}, {"w": "of", "b": [0.5684, 0.6932, 0.5836, 0.7083]}, {"w": "predictions", "b": [0.59, 0.6932, 0.6801, 0.7083]}, {"w": "that", "b": [0.6865, 0.6932, 0.721, 0.7083]}, {"w": "lie", "b": [0.7274, 0.6932, 0.7463, 0.7083]}, {"w": "in", "b": [0.7526, 0.6932, 0.7683, 0.7083]}, {"w": "the", "b": [0.7747, 0.6932, 0.8009, 0.7083]}, {"w": "interval", "b": [0.8073, 0.6932, 0.8691, 0.7083]}, {"w": "accounts", "b": [0.1312, 0.7113, 0.1994, 0.7262]}, {"w": "for", "b": [0.2055, 0.7113, 0.2273, 0.7262]}, {"w": "at", "b": [0.2334, 0.7113, 0.2496, 0.7262]}, {"w": "least", "b": [0.2557, 0.7113, 0.2921, 0.7262]}, {"w": "c", "b": [0.2982, 0.7112, 0.3062, 0.7262]}, {"w": "percent", "b": [0.3124, 0.7113, 0.3709, 0.7262]}, {"w": "of", "b": [0.3771, 0.7113, 0.3917, 0.7262]}, {"w": "the", "b": [0.3978, 0.7113, 0.4231, 0.7262]}, {"w": "sum", "b": [0.4292, 0.7113, 0.4616, 0.7262]}, {"w": "of", "b": [0.4677, 0.7113, 0.4823, 0.7262]}, {"w": "B", "b": [0.4884, 0.7112, 0.5024, 0.7262]}, {"w": "predictions.", "b": [0.5095, 0.7113, 0.6014, 0.7262]}, {"w": "Then", "b": [0.6096, 0.7113, 0.651, 0.7262]}, {"w": "return", "b": [0.6571, 0.7113, 0.7067, 0.7262]}, {"w": "the", "b": [0.7128, 0.7113, 0.738, 0.7262]}, {"w": "prediction", "b": [0.7442, 0.7113, 0.8239, 0.7262]}, {"w": "f(x),", "b": [0.8299, 0.7112, 0.8713, 0.7262]}, {"w": "and", "b": [0.1312, 0.7292, 0.161, 0.7441]}, {"w": "state", "b": [0.1671, 0.7292, 0.2062, 0.7441]}, {"w": "that,", "b": [0.2123, 0.7292, 0.2513, 0.7441]}, {"w": "with", "b": [0.2575, 0.7292, 0.2933, 0.7441]}, {"w": "confidence", "b": [0.2995, 0.7292, 0.3826, 0.7441]}, {"w": "c", "b": [0.3886, 0.7292, 0.3966, 0.7441]}, {"w": "percent,", "b": [0.4027, 0.7292, 0.4674, 0.7441]}, {"w": "it", "b": [0.4736, 0.7292, 0.4859, 0.7441]}, {"w": "lies", "b": [0.492, 0.7292, 0.5178, 0.7441]}, {"w": "in", "b": [0.5239, 0.7292, 0.5393, 0.7441]}, {"w": "the", "b": [0.5455, 0.7292, 0.5711, 0.7441]}, {"w": "interval", "b": [0.5772, 0.7292, 0.6378, 0.7441]}, {"w": "[a,", "b": [0.6438, 0.7292, 0.6639, 0.7441]}, {"w": "b].", "b": [0.667, 0.7292, 0.6851, 0.7441]}]}, {"id": "b_18", "type": "paragraph", "text": "As previously, the confidence level usually is either 95% or 99%. The number B of bootstrap samples is set to 100 (or as many as the time allows).", "words": [{"w": "As", "b": [0.1305, 0.7562, 0.1512, 0.771]}, {"w": "previously,", "b": [0.1574, 0.7562, 0.2414, 0.771]}, {"w": "the", "b": [0.2476, 0.7562, 0.2727, 0.771]}, {"w": "confidence", "b": [0.2789, 0.7562, 0.3603, 0.771]}, {"w": "level", "b": [0.3664, 0.7562, 0.4016, 0.771]}, {"w": "usually", "b": [0.4078, 0.7562, 0.4636, 0.771]}, {"w": "is", "b": [0.4698, 0.7562, 0.482, 0.771]}, {"w": "either", "b": [0.4881, 0.7562, 0.5334, 0.771]}, {"w": "95%", "b": [0.5393, 0.7562, 0.5724, 0.771]}, {"w": "or", "b": [0.5786, 0.7562, 0.5947, 0.771]}, {"w": "99%.", "b": [0.6009, 0.7562, 0.639, 0.771]}, {"w": "The", "b": [0.6472, 0.7562, 0.6784, 0.771]}, {"w": "number", "b": [0.6845, 0.7562, 0.7444, 0.771]}, {"w": "B", "b": [0.7505, 0.7561, 0.7645, 0.771]}, {"w": "of", "b": [0.7715, 0.7562, 0.7861, 0.771]}, {"w": "bootstrap", "b": [0.7923, 0.7562, 0.8688, 0.771]}, {"w": "samples", "b": [0.1312, 0.774, 0.194, 0.789]}, {"w": "is", "b": [0.2001, 0.774, 0.2126, 0.789]}, {"w": "set", "b": [0.2187, 0.774, 0.2414, 0.789]}, {"w": "to", "b": [0.2475, 0.774, 0.2639, 0.789]}, {"w": "100", "b": [0.27, 0.774, 0.2977, 0.789]}, {"w": "(or", "b": [0.3038, 0.774, 0.3275, 0.789]}, {"w": "as", "b": [0.3336, 0.774, 0.3501, 0.789]}, {"w": "many", "b": [0.3563, 0.774, 0.4004, 0.789]}, {"w": "as", "b": [0.4065, 0.774, 0.423, 0.789]}, {"w": "the", "b": [0.4292, 0.774, 0.4548, 0.789]}, {"w": "time", "b": [0.461, 0.774, 0.4969, 0.789]}, {"w": "allows).", "b": [0.503, 0.774, 0.5641, 0.789]}]}, {"id": "b_19", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 17", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "17", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 235, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "7.5 Evaluation of Test Set Adequacy", "words": [{"w": "7.5", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Evaluation", "b": [0.188, 0.0861, 0.304, 0.104]}, {"w": "of", "b": [0.3123, 0.0861, 0.3324, 0.104]}, {"w": "Test", "b": [0.3407, 0.0861, 0.3868, 0.104]}, {"w": "Set", "b": [0.3951, 0.0861, 0.43, 0.104]}, {"w": "Adequacy", "b": [0.4383, 0.0861, 0.545, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "In traditional software engineering, tests are used to identify defects in the software. The collection of tests is constructed in such a way that they allow discovery of bugs in the code before the software reaches production. The same approach applies to the testing of all the code developed “around” the statistical model: the code that gets the input from the user, transforms it into features, and the code that interprets the outputs of the model, and serves the result to the user.", "words": [{"w": "In", "b": [0.1312, 0.1249, 0.1485, 0.14]}, {"w": "traditional", "b": [0.1549, 0.1249, 0.2418, 0.14]}, {"w": "software", "b": [0.2482, 0.1249, 0.3158, 0.14]}, {"w": "engineering,", "b": [0.3222, 0.1249, 0.4206, 0.14]}, {"w": "tests", "b": [0.427, 0.1249, 0.4649, 0.14]}, {"w": "are", "b": [0.4713, 0.1249, 0.4965, 0.14]}, {"w": "used", "b": [0.5029, 0.1249, 0.5396, 0.14]}, {"w": "to", "b": [0.546, 0.1249, 0.5627, 0.14]}, {"w": "identify", "b": [0.5691, 0.1249, 0.6314, 0.14]}, {"w": "defects", "b": [0.6378, 0.1249, 0.6939, 0.14]}, {"w": "in", "b": [0.7003, 0.1249, 0.716, 0.14]}, {"w": "the", "b": [0.7224, 0.1249, 0.7485, 0.14]}, {"w": "software.", "b": [0.7549, 0.1249, 0.8278, 0.14]}, {"w": "The", "b": [0.8367, 0.1249, 0.8692, 0.14]}, {"w": "collection", "b": [0.1312, 0.143, 0.2065, 0.1579]}, {"w": "of", "b": [0.2126, 0.143, 0.2273, 0.1579]}, {"w": "tests", "b": [0.2335, 0.143, 0.2703, 0.1579]}, {"w": "is", "b": [0.2764, 0.143, 0.2887, 0.1579]}, {"w": "constructed", "b": [0.2949, 0.143, 0.3875, 0.1579]}, {"w": "in", "b": [0.3937, 0.143, 0.4089, 0.1579]}, {"w": "such", "b": [0.415, 0.143, 0.4502, 0.1579]}, {"w": "a", "b": [0.4564, 0.143, 0.4655, 0.1579]}, {"w": "way", "b": [0.4716, 0.143, 0.5026, 0.1579]}, {"w": "that", "b": [0.5088, 0.143, 0.5423, 0.1579]}, {"w": "they", "b": [0.5484, 0.143, 0.5835, 0.1579]}, {"w": "allow", "b": [0.5896, 0.143, 0.6308, 0.1579]}, {"w": "discovery", "b": [0.6369, 0.143, 0.7103, 0.1579]}, {"w": "of", "b": [0.7164, 0.143, 0.7311, 0.1579]}, {"w": "bugs", "b": [0.7373, 0.143, 0.774, 0.1579]}, {"w": "in", "b": [0.7801, 0.143, 0.7954, 0.1579]}, {"w": "the", "b": [0.8015, 0.143, 0.8269, 0.1579]}, {"w": "code", "b": [0.8331, 0.143, 0.8691, 0.1579]}, {"w": "before", "b": [0.1312, 0.1609, 0.1806, 0.1758]}, {"w": "the", "b": [0.1867, 0.1609, 0.2124, 0.1758]}, {"w": "software", "b": [0.2185, 0.1609, 0.2848, 0.1758]}, {"w": "reaches", "b": [0.291, 0.1609, 0.3492, 0.1758]}, {"w": "production.", "b": [0.3553, 0.1609, 0.4482, 0.1758]}, {"w": "The", "b": [0.4564, 0.1609, 0.4882, 0.1758]}, {"w": "same", "b": [0.4944, 0.1609, 0.5345, 0.1758]}, {"w": "approach", "b": [0.5406, 0.1609, 0.6141, 0.1758]}, {"w": "applies", "b": [0.6202, 0.1609, 0.6757, 0.1758]}, {"w": "to", "b": [0.6819, 0.1609, 0.6983, 0.1758]}, {"w": "the", "b": [0.7044, 0.1609, 0.7301, 0.1758]}, {"w": "testing", "b": [0.7362, 0.1609, 0.7907, 0.1758]}, {"w": "of", "b": [0.7968, 0.1609, 0.8117, 0.1758]}, {"w": "all", "b": [0.8178, 0.1609, 0.8373, 0.1758]}, {"w": "the", "b": [0.8435, 0.1609, 0.8691, 0.1758]}, {"w": "code", "b": [0.1312, 0.1787, 0.168, 0.1938]}, {"w": "developed", "b": [0.1742, 0.1787, 0.2546, 0.1938]}, {"w": "“around”", "b": [0.2607, 0.1787, 0.3354, 0.1938]}, {"w": "the", "b": [0.3416, 0.1787, 0.3675, 0.1938]}, {"w": "statistical", "b": [0.3736, 0.1787, 0.4526, 0.1938]}, {"w": "model:", "b": [0.4588, 0.1787, 0.5132, 0.1938]}, {"w": "the", "b": [0.5214, 0.1787, 0.5474, 0.1938]}, {"w": "code", "b": [0.5535, 0.1787, 0.5903, 0.1938]}, {"w": "that", "b": [0.5965, 0.1787, 0.6307, 0.1938]}, {"w": "gets", "b": [0.6369, 0.1787, 0.6691, 0.1938]}, {"w": "the", "b": [0.6753, 0.1787, 0.7012, 0.1938]}, {"w": "input", "b": [0.7073, 0.1787, 0.7509, 0.1938]}, {"w": "from", "b": [0.7571, 0.1787, 0.7949, 0.1938]}, {"w": "the", "b": [0.8011, 0.1787, 0.827, 0.1938]}, {"w": "user,", "b": [0.8332, 0.1787, 0.8717, 0.1938]}, {"w": "transforms", "b": [0.1312, 0.1969, 0.2155, 0.2117]}, {"w": "it", "b": [0.2215, 0.1969, 0.2336, 0.2117]}, {"w": "into", "b": [0.2397, 0.1969, 0.2703, 0.2117]}, {"w": "features,", "b": [0.2764, 0.1969, 0.3434, 0.2117]}, {"w": "and", "b": [0.3495, 0.1969, 0.3786, 0.2117]}, {"w": "the", "b": [0.3847, 0.1969, 0.4098, 0.2117]}, {"w": "code", "b": [0.4159, 0.1969, 0.4516, 0.2117]}, {"w": "that", "b": [0.4577, 0.1969, 0.4908, 0.2117]}, {"w": "interprets", "b": [0.4969, 0.1969, 0.573, 0.2117]}, {"w": "the", "b": [0.5791, 0.1969, 0.6042, 0.2117]}, {"w": "outputs", "b": [0.6103, 0.1969, 0.6707, 0.2117]}, {"w": "of", "b": [0.6767, 0.1969, 0.6913, 0.2117]}, {"w": "the", "b": [0.6974, 0.1969, 0.7225, 0.2117]}, {"w": "model,", "b": [0.7286, 0.1969, 0.7814, 0.2117]}, {"w": "and", "b": [0.7875, 0.1969, 0.8166, 0.2117]}, {"w": "serves", "b": [0.8227, 0.1969, 0.8692, 0.2117]}, {"w": "the", "b": [0.1312, 0.2147, 0.1569, 0.2297]}, {"w": "result", "b": [0.163, 0.2147, 0.2083, 0.2297]}, {"w": "to", "b": [0.2145, 0.2147, 0.2309, 0.2297]}, {"w": "the", "b": [0.237, 0.2147, 0.2627, 0.2297]}, {"w": "user.", "b": [0.2688, 0.2147, 0.3069, 0.2297]}]}, {"id": "b_2", "type": "paragraph", "text": "However, an additional evaluation must be applied to the model itself. The test examples used to evaluate the model must also be designed in such a way that they allow the discovery of the model’s defective behavior before the model reaches production.", "words": [{"w": "However,", "b": [0.1312, 0.2415, 0.2061, 0.2566]}, {"w": "an", "b": [0.2122, 0.2415, 0.2321, 0.2566]}, {"w": "additional", "b": [0.2383, 0.2415, 0.3209, 0.2566]}, {"w": "evaluation", "b": [0.3271, 0.2415, 0.4113, 0.2566]}, {"w": "must", "b": [0.4174, 0.2415, 0.4578, 0.2566]}, {"w": "be", "b": [0.464, 0.2415, 0.4833, 0.2566]}, {"w": "applied", "b": [0.4895, 0.2415, 0.5491, 0.2566]}, {"w": "to", "b": [0.5552, 0.2415, 0.572, 0.2566]}, {"w": "the", "b": [0.5781, 0.2415, 0.6043, 0.2566]}, {"w": "model", "b": [0.6104, 0.2415, 0.6601, 0.2566]}, {"w": "itself.", "b": [0.6662, 0.2415, 0.7108, 0.2566]}, {"w": "The", "b": [0.719, 0.2415, 0.7514, 0.2566]}, {"w": "test", "b": [0.7576, 0.2415, 0.788, 0.2566]}, {"w": "examples", "b": [0.7942, 0.2415, 0.8691, 0.2566]}, {"w": "used", "b": [0.1312, 0.2597, 0.1665, 0.2745]}, {"w": "to", "b": [0.1723, 0.2597, 0.1884, 0.2745]}, {"w": "evaluate", "b": [0.1942, 0.2597, 0.259, 0.2745]}, {"w": "the", "b": [0.2648, 0.2597, 0.29, 0.2745]}, {"w": "model", "b": [0.2958, 0.2597, 0.3435, 0.2745]}, {"w": "must", "b": [0.3493, 0.2597, 0.3881, 0.2745]}, {"w": "also", "b": [0.3939, 0.2597, 0.4242, 0.2745]}, {"w": "be", "b": [0.43, 0.2597, 0.4486, 0.2745]}, {"w": "designed", "b": [0.4544, 0.2597, 0.5218, 0.2745]}, {"w": "in", "b": [0.5276, 0.2597, 0.5427, 0.2745]}, {"w": "such", "b": [0.5485, 0.2597, 0.5833, 0.2745]}, {"w": "a", "b": [0.5891, 0.2597, 0.5982, 0.2745]}, {"w": "way", "b": [0.604, 0.2597, 0.6346, 0.2745]}, {"w": "that", "b": [0.6404, 0.2597, 0.6736, 0.2745]}, {"w": "they", "b": [0.6794, 0.2597, 0.7141, 0.2745]}, {"w": "allow", "b": [0.7199, 0.2597, 0.7605, 0.2745]}, {"w": "the", "b": [0.7663, 0.2597, 0.7915, 0.2745]}, {"w": "discovery", "b": [0.7973, 0.2597, 0.8698, 0.2745]}, {"w": "of", "b": [0.1312, 0.2775, 0.1461, 0.2925]}, {"w": "the", "b": [0.1522, 0.2775, 0.1779, 0.2925]}, {"w": "model’s", "b": [0.1841, 0.2775, 0.2452, 0.2925]}, {"w": "defective", "b": [0.2513, 0.2775, 0.3216, 0.2925]}, {"w": "behavior", "b": [0.3277, 0.2775, 0.397, 0.2925]}, {"w": "before", "b": [0.4032, 0.2775, 0.4524, 0.2925]}, {"w": "the", "b": [0.4586, 0.2775, 0.4842, 0.2925]}, {"w": "model", "b": [0.4904, 0.2775, 0.5391, 0.2925]}, {"w": "reaches", "b": [0.5452, 0.2775, 0.6033, 0.2925]}, {"w": "production.", "b": [0.6095, 0.2775, 0.7024, 0.2925]}]}, {"id": "b_3", "type": "paragraph", "text": "7.5.1 Neuron Coverage", "words": [{"w": "7.5.1", "b": [0.1312, 0.3254, 0.1749, 0.3403]}, {"w": "Neuron", "b": [0.1961, 0.3254, 0.2653, 0.3403]}, {"w": "Coverage", "b": [0.2724, 0.3254, 0.3575, 0.3403]}]}, {"id": "b_4", "type": "paragraph", "text": "When we evaluate a neural network, especially one to be used in a mission-critical scenario,", "words": [{"w": "When", "b": [0.1303, 0.3619, 0.178, 0.3769]}, {"w": "we", "b": [0.1841, 0.3619, 0.2051, 0.3769]}, {"w": "evaluate", "b": [0.2113, 0.3619, 0.2774, 0.3769]}, {"w": "a", "b": [0.2836, 0.3619, 0.2928, 0.3769]}, {"w": "neural", "b": [0.2989, 0.3619, 0.3492, 0.3769]}, {"w": "network,", "b": [0.3554, 0.3619, 0.4246, 0.3769]}, {"w": "especially", "b": [0.4308, 0.3619, 0.5078, 0.3769]}, {"w": "one", "b": [0.5139, 0.3619, 0.5416, 0.3769]}, {"w": "to", "b": [0.5477, 0.3619, 0.5641, 0.3769]}, {"w": "be", "b": [0.5703, 0.3619, 0.5893, 0.3769]}, {"w": "used", "b": [0.5954, 0.3619, 0.6314, 0.3769]}, {"w": "in", "b": [0.6375, 0.3619, 0.6529, 0.3769]}, {"w": "a", "b": [0.659, 0.3619, 0.6683, 0.3769]}, {"w": "mission-critical", "b": [0.6744, 0.3619, 0.7957, 0.3769]}, {"w": "scenario,", "b": [0.8018, 0.3619, 0.8717, 0.3769]}]}, {"id": "b_5", "type": "paragraph", "text": "such as a self-driving car or a space rocket, our test set must have good coverage. Neuron coverage of a test set for a neural network model is defined as the ratio of the units (neurons) activated by the examples from the test set, to the total number of units. A good test set has close to 100% neuron coverage.", "words": [{"w": "such", "b": [0.1312, 0.3799, 0.1669, 0.3949]}, {"w": "as", "b": [0.173, 0.3799, 0.1896, 0.3949]}, {"w": "a", "b": [0.1957, 0.3799, 0.205, 0.3949]}, {"w": "self-driving", "b": [0.2111, 0.3799, 0.3008, 0.3949]}, {"w": "car", "b": [0.307, 0.3799, 0.3318, 0.3949]}, {"w": "or", "b": [0.3379, 0.3799, 0.3544, 0.3949]}, {"w": "a", "b": [0.3605, 0.3799, 0.3698, 0.3949]}, {"w": "space", "b": [0.3759, 0.3799, 0.4193, 0.3949]}, {"w": "rocket,", "b": [0.4254, 0.3799, 0.4801, 0.3949]}, {"w": "our", "b": [0.4862, 0.3799, 0.513, 0.3949]}, {"w": "test", "b": [0.5192, 0.3799, 0.5491, 0.3949]}, {"w": "set", "b": [0.5553, 0.3799, 0.578, 0.3949]}, {"w": "must", "b": [0.5842, 0.3799, 0.6239, 0.3949]}, {"w": "have", "b": [0.63, 0.3799, 0.6666, 0.3949]}, {"w": "good", "b": [0.6727, 0.3799, 0.7118, 0.3949]}, {"w": "coverage.", "b": [0.718, 0.3799, 0.7917, 0.3949]}, {"w": "Neuron", "b": [0.7995, 0.3799, 0.8688, 0.3949]}, {"w": "coverage", "b": [0.1312, 0.3979, 0.2104, 0.4128]}, {"w": "of", "b": [0.2156, 0.398, 0.2302, 0.4128]}, {"w": "a", "b": [0.2354, 0.398, 0.2444, 0.4128]}, {"w": "test", "b": [0.2496, 0.398, 0.2789, 0.4128]}, {"w": "set", "b": [0.2841, 0.398, 0.3063, 0.4128]}, {"w": "for", "b": [0.3115, 0.398, 0.3332, 0.4128]}, {"w": "a", "b": [0.3384, 0.398, 0.3474, 0.4128]}, {"w": "neural", "b": [0.3526, 0.398, 0.4019, 0.4128]}, {"w": "network", "b": [0.4071, 0.398, 0.4699, 0.4128]}, {"w": "model", "b": [0.4751, 0.398, 0.5229, 0.4128]}, {"w": "is", "b": [0.5281, 0.398, 0.5403, 0.4128]}, {"w": "defined", "b": [0.5455, 0.398, 0.6018, 0.4128]}, {"w": "as", "b": [0.6069, 0.398, 0.6231, 0.4128]}, {"w": "the", "b": [0.6283, 0.398, 0.6535, 0.4128]}, {"w": "ratio", "b": [0.6587, 0.398, 0.6959, 0.4128]}, {"w": "of", "b": [0.7011, 0.398, 0.7157, 0.4128]}, {"w": "the", "b": [0.7209, 0.398, 0.746, 0.4128]}, {"w": "units", "b": [0.7512, 0.398, 0.7905, 0.4128]}, {"w": "(neurons)", "b": [0.7957, 0.398, 0.8713, 0.4128]}, {"w": "activated", "b": [0.1312, 0.4157, 0.206, 0.4308]}, {"w": "by", "b": [0.2122, 0.4157, 0.2321, 0.4308]}, {"w": "the", "b": [0.2383, 0.4157, 0.2644, 0.4308]}, {"w": "examples", "b": [0.2706, 0.4157, 0.3455, 0.4308]}, {"w": "from", "b": [0.3516, 0.4157, 0.3899, 0.4308]}, {"w": "the", "b": [0.396, 0.4157, 0.4222, 0.4308]}, {"w": "test", "b": [0.4283, 0.4157, 0.4588, 0.4308]}, {"w": "set,", "b": [0.4649, 0.4157, 0.4933, 0.4308]}, {"w": "to", "b": [0.4995, 0.4157, 0.5162, 0.4308]}, {"w": "the", "b": [0.5224, 0.4157, 0.5485, 0.4308]}, {"w": "total", "b": [0.5547, 0.4157, 0.5934, 0.4308]}, {"w": "number", "b": [0.5995, 0.4157, 0.6618, 0.4308]}, {"w": "of", "b": [0.668, 0.4157, 0.6832, 0.4308]}, {"w": "units.", "b": [0.6893, 0.4157, 0.7355, 0.4308]}, {"w": "A", "b": [0.7437, 0.4157, 0.7578, 0.4308]}, {"w": "good", "b": [0.764, 0.4157, 0.8037, 0.4308]}, {"w": "test", "b": [0.8099, 0.4157, 0.8403, 0.4308]}, {"w": "set", "b": [0.8465, 0.4157, 0.8696, 0.4308]}, {"w": "has", "b": [0.1312, 0.4337, 0.158, 0.4487]}, {"w": "close", "b": [0.1641, 0.4337, 0.2022, 0.4487]}, {"w": "to", "b": [0.2084, 0.4337, 0.2248, 0.4487]}, {"w": "100%", "b": [0.2309, 0.4337, 0.2739, 0.4487]}, {"w": "neuron", "b": [0.2801, 0.4337, 0.3355, 0.4487]}, {"w": "coverage.", "b": [0.3416, 0.4337, 0.415, 0.4487]}]}, {"id": "b_6", "type": "paragraph", "text": "A technique for building such a test set is to start with a set of unlabeled examples, and all units of the model uncovered. Then, iteratively, we", "words": [{"w": "A", "b": [0.1305, 0.4607, 0.1443, 0.4756]}, {"w": "technique", "b": [0.1505, 0.4607, 0.2271, 0.4756]}, {"w": "for", "b": [0.2332, 0.4607, 0.2552, 0.4756]}, {"w": "building", "b": [0.2614, 0.4607, 0.3268, 0.4756]}, {"w": "such", "b": [0.3329, 0.4607, 0.3683, 0.4756]}, {"w": "a", "b": [0.3744, 0.4607, 0.3836, 0.4756]}, {"w": "test", "b": [0.3897, 0.4607, 0.4195, 0.4756]}, {"w": "set", "b": [0.4256, 0.4607, 0.4482, 0.4756]}, {"w": "is", "b": [0.4543, 0.4607, 0.4667, 0.4756]}, {"w": "to", "b": [0.4728, 0.4607, 0.4892, 0.4756]}, {"w": "start", "b": [0.4953, 0.4607, 0.5333, 0.4756]}, {"w": "with", "b": [0.5394, 0.4607, 0.5751, 0.4756]}, {"w": "a", "b": [0.5813, 0.4607, 0.5905, 0.4756]}, {"w": "set", "b": [0.5966, 0.4607, 0.6192, 0.4756]}, {"w": "of", "b": [0.6253, 0.4607, 0.6402, 0.4756]}, {"w": "unlabeled", "b": [0.6463, 0.4607, 0.7234, 0.4756]}, {"w": "examples,", "b": [0.7296, 0.4607, 0.8078, 0.4756]}, {"w": "and", "b": [0.814, 0.4607, 0.8436, 0.4756]}, {"w": "all", "b": [0.8497, 0.4607, 0.8691, 0.4756]}, {"w": "units", "b": [0.1312, 0.4786, 0.1713, 0.4936]}, {"w": "of", "b": [0.1775, 0.4786, 0.1924, 0.4936]}, {"w": "the", "b": [0.1985, 0.4786, 0.2241, 0.4936]}, {"w": "model", "b": [0.2303, 0.4786, 0.279, 0.4936]}, {"w": "uncovered.", "b": [0.2852, 0.4786, 0.3709, 0.4936]}, {"w": "Then,", "b": [0.379, 0.4786, 0.4262, 0.4936]}, {"w": "iteratively,", "b": [0.4324, 0.4786, 0.5175, 0.4936]}, {"w": "we", "b": [0.5237, 0.4786, 0.5447, 0.4936]}]}, {"id": "b_7", "type": "paragraph", "text": "1) randomly pick an unlabeled example i and label it, 2) send the feature vector xi to the input of the model, 3) observe which units in the model were activated by xi, 4) if the prediction was correct, mark those units as covered, 5) go back to step 1; continue iterating until the neuron coverage becomes close to 100%.", "words": [{"w": "1)", "b": [0.1517, 0.5055, 0.1681, 0.5205]}, {"w": "randomly", "b": [0.1774, 0.5055, 0.2538, 0.5205]}, {"w": "pick", "b": [0.2599, 0.5055, 0.2928, 0.5205]}, {"w": "an", "b": [0.2989, 0.5055, 0.3184, 0.5205]}, {"w": "unlabeled", "b": [0.3245, 0.5055, 0.402, 0.5205]}, {"w": "example", "b": [0.4081, 0.5055, 0.4743, 0.5205]}, {"w": "i", "b": [0.4803, 0.5055, 0.4866, 0.5205]}, {"w": "and", "b": [0.4928, 0.5055, 0.5225, 0.5205]}, {"w": "label", "b": [0.5287, 0.5055, 0.5671, 0.5205]}, {"w": "it,", "b": [0.5733, 0.5055, 0.5907, 0.5205]}, {"w": "2)", "b": [0.1517, 0.5235, 0.1681, 0.5384]}, {"w": "send", "b": [0.1774, 0.5235, 0.2134, 0.5384]}, {"w": "the", "b": [0.2195, 0.5235, 0.2452, 0.5384]}, {"w": "feature", "b": [0.2513, 0.5235, 0.3073, 0.5384]}, {"w": "vector", "b": [0.3134, 0.5235, 0.3627, 0.5384]}, {"w": "xi", "b": [0.3687, 0.5235, 0.3851, 0.5397]}, {"w": "to", "b": [0.3922, 0.5235, 0.4086, 0.5384]}, {"w": "the", "b": [0.4148, 0.5235, 0.4404, 0.5384]}, {"w": "input", "b": [0.4466, 0.5235, 0.4896, 0.5384]}, {"w": "of", "b": [0.4958, 0.5235, 0.5107, 0.5384]}, {"w": "the", "b": [0.5168, 0.5235, 0.5424, 0.5384]}, {"w": "model,", "b": [0.5486, 0.5235, 0.6024, 0.5384]}, {"w": "3)", "b": [0.1517, 0.5414, 0.1681, 0.5564]}, {"w": "observe", "b": [0.1774, 0.5414, 0.237, 0.5564]}, {"w": "which", "b": [0.2431, 0.5414, 0.2898, 0.5564]}, {"w": "units", "b": [0.296, 0.5414, 0.3361, 0.5564]}, {"w": "in", "b": [0.3422, 0.5414, 0.3576, 0.5564]}, {"w": "the", "b": [0.3638, 0.5414, 0.3894, 0.5564]}, {"w": "model", "b": [0.3955, 0.5414, 0.4442, 0.5564]}, {"w": "were", "b": [0.4504, 0.5414, 0.4869, 0.5564]}, {"w": "activated", "b": [0.493, 0.5414, 0.5663, 0.5564]}, {"w": "by", "b": [0.5725, 0.5414, 0.592, 0.5564]}, {"w": "xi,", "b": [0.5979, 0.5414, 0.6204, 0.5576]}, {"w": "4)", "b": [0.1517, 0.5594, 0.1681, 0.5743]}, {"w": "if", "b": [0.1774, 0.5594, 0.1881, 0.5743]}, {"w": "the", "b": [0.1943, 0.5594, 0.2199, 0.5743]}, {"w": "prediction", "b": [0.2261, 0.5594, 0.3071, 0.5743]}, {"w": "was", "b": [0.3133, 0.5594, 0.3426, 0.5743]}, {"w": "correct,", "b": [0.3488, 0.5594, 0.4094, 0.5743]}, {"w": "mark", "b": [0.4155, 0.5594, 0.4571, 0.5743]}, {"w": "those", "b": [0.4632, 0.5594, 0.5054, 0.5743]}, {"w": "units", "b": [0.5116, 0.5594, 0.5517, 0.5743]}, {"w": "as", "b": [0.5578, 0.5594, 0.5743, 0.5743]}, {"w": "covered,", "b": [0.5805, 0.5594, 0.6457, 0.5743]}, {"w": "5)", "b": [0.1517, 0.5773, 0.1681, 0.5923]}, {"w": "go", "b": [0.1774, 0.5774, 0.1954, 0.5922]}, {"w": "back", "b": [0.2015, 0.5774, 0.2376, 0.5922]}, {"w": "to", "b": [0.2437, 0.5774, 0.2597, 0.5922]}, {"w": "step", "b": [0.2658, 0.5774, 0.298, 0.5922]}, {"w": "1;", "b": [0.304, 0.5774, 0.3181, 0.5922]}, {"w": "continue", "b": [0.3241, 0.5773, 0.3918, 0.5923]}, {"w": "iterating", "b": [0.398, 0.5773, 0.4667, 0.5923]}, {"w": "until", "b": [0.4729, 0.5773, 0.5103, 0.5923]}, {"w": "the", "b": [0.5165, 0.5773, 0.5421, 0.5923]}, {"w": "neuron", "b": [0.5483, 0.5773, 0.6037, 0.5923]}, {"w": "coverage", "b": [0.6098, 0.5773, 0.6781, 0.5923]}, {"w": "becomes", "b": [0.6843, 0.5773, 0.7515, 0.5923]}, {"w": "close", "b": [0.7577, 0.5773, 0.7957, 0.5923]}, {"w": "to", "b": [0.8019, 0.5773, 0.8183, 0.5923]}, {"w": "100%.", "b": [0.8242, 0.5773, 0.8723, 0.5923]}]}, {"id": "b_8", "type": "paragraph", "text": "A unit is considered activated when its output is above a certain threshold. For ReLU, it’s usually zero; for a logistic sigmoid, it’s 0.5.", "words": [{"w": "A", "b": [0.1305, 0.6042, 0.1445, 0.6192]}, {"w": "unit", "b": [0.1506, 0.6042, 0.1836, 0.6192]}, {"w": "is", "b": [0.1898, 0.6042, 0.2023, 0.6192]}, {"w": "considered", "b": [0.2084, 0.6042, 0.2933, 0.6192]}, {"w": "activated", "b": [0.2994, 0.6042, 0.3733, 0.6192]}, {"w": "when", "b": [0.3794, 0.6042, 0.4217, 0.6192]}, {"w": "its", "b": [0.4279, 0.6042, 0.4476, 0.6192]}, {"w": "output", "b": [0.4537, 0.6042, 0.5085, 0.6192]}, {"w": "is", "b": [0.5146, 0.6042, 0.5271, 0.6192]}, {"w": "above", "b": [0.5332, 0.6042, 0.5797, 0.6192]}, {"w": "a", "b": [0.5859, 0.6042, 0.5951, 0.6192]}, {"w": "certain", "b": [0.6013, 0.6042, 0.6571, 0.6192]}, {"w": "threshold.", "b": [0.6632, 0.6042, 0.744, 0.6192]}, {"w": "For", "b": [0.7521, 0.6042, 0.7793, 0.6192]}, {"w": "ReLU,", "b": [0.7855, 0.6042, 0.8381, 0.6192]}, {"w": "it’s", "b": [0.8442, 0.6042, 0.8691, 0.6192]}, {"w": "usually", "b": [0.1312, 0.6222, 0.1883, 0.6371]}, {"w": "zero;", "b": [0.1944, 0.6222, 0.2324, 0.6371]}, {"w": "for", "b": [0.2386, 0.6222, 0.2607, 0.6371]}, {"w": "a", "b": [0.2668, 0.6222, 0.276, 0.6371]}, {"w": "logistic", "b": [0.2822, 0.6222, 0.3387, 0.6371]}, {"w": "sigmoid,", "b": [0.3448, 0.6222, 0.4116, 0.6371]}, {"w": "it’s", "b": [0.4177, 0.6222, 0.4425, 0.6371]}, {"w": "0.5.", "b": [0.4485, 0.6222, 0.4772, 0.6371]}]}, {"id": "b_9", "type": "paragraph", "text": "7.5.2 Mutation Testing", "words": [{"w": "7.5.2", "b": [0.1312, 0.67, 0.1749, 0.685]}, {"w": "Mutation", "b": [0.1961, 0.67, 0.2831, 0.685]}, {"w": "Testing", "b": [0.2902, 0.67, 0.3578, 0.685]}]}, {"id": "b_10", "type": "paragraph", "text": "In software engineering, good test coverage for a software under test (SUT) can be determined using the approach known as mutation testing. Let’s have a set of tests designed to test an SUT. We generate several “mutants” of the SUT. A mutant is a version of the SUT in which we randomly make some modifications, such as replacing in the source code, a “+” with a “−”, a “<” with a “>”, delete the else command in an if-else statement, and so on. Then we apply the test set to each mutant, and see if at least one test breaks on that mutant. We say that we kill a mutant if one test breaks on it. We then compute the ratio of killed mutants in the entire collection of mutants. A good test set makes this ratio equal to 100%.", "words": [{"w": "In", "b": [0.1312, 0.7065, 0.1485, 0.7216]}, {"w": "software", "b": [0.1572, 0.7065, 0.2249, 0.7216]}, {"w": "engineering,", "b": [0.2336, 0.7065, 0.332, 0.7216]}, {"w": "good", "b": [0.3414, 0.7065, 0.3812, 0.7216]}, {"w": "test", "b": [0.3899, 0.7065, 0.4204, 0.7216]}, {"w": "coverage", "b": [0.4291, 0.7065, 0.4987, 0.7216]}, {"w": "for", "b": [0.5075, 0.7065, 0.53, 0.7216]}, {"w": "a", "b": [0.5388, 0.7065, 0.5482, 0.7216]}, {"w": "software", "b": [0.557, 0.7066, 0.6336, 0.7216]}, {"w": "under", "b": [0.6437, 0.7066, 0.6975, 0.7216]}, {"w": "test", "b": [0.7076, 0.7066, 0.7422, 0.7216]}, {"w": "(SUT)", "b": [0.7509, 0.7065, 0.8037, 0.7216]}, {"w": "can", "b": [0.8125, 0.7065, 0.8407, 0.7216]}, {"w": "be", "b": [0.8495, 0.7065, 0.8688, 0.7216]}, {"w": "determined", "b": [0.1312, 0.7244, 0.2233, 0.7395]}, {"w": "using", "b": [0.2317, 0.7244, 0.2747, 0.7395]}, {"w": "the", "b": [0.2831, 0.7244, 0.3092, 0.7395]}, {"w": "approach", "b": [0.3176, 0.7244, 0.3924, 0.7395]}, {"w": "known", "b": [0.4008, 0.7244, 0.4541, 0.7395]}, {"w": "as", "b": [0.4625, 0.7244, 0.4793, 0.7395]}, {"w": "mutation", "b": [0.4875, 0.7246, 0.5715, 0.7395]}, {"w": "testing.", "b": [0.5811, 0.7244, 0.6494, 0.7395]}, {"w": "Let’s", "b": [0.6642, 0.7244, 0.7044, 0.7395]}, {"w": "have", "b": [0.7127, 0.7244, 0.7499, 0.7395]}, {"w": "a", "b": [0.7582, 0.7244, 0.7676, 0.7395]}, {"w": "set", "b": [0.776, 0.7244, 0.7991, 0.7395]}, {"w": "of", "b": [0.8075, 0.7244, 0.8226, 0.7395]}, {"w": "tests", "b": [0.831, 0.7244, 0.8689, 0.7395]}, {"w": "designed", "b": [0.1312, 0.7426, 0.1987, 0.7574]}, {"w": "to", "b": [0.2042, 0.7426, 0.2203, 0.7574]}, {"w": "test", "b": [0.2259, 0.7426, 0.2551, 0.7574]}, {"w": "an", "b": [0.2607, 0.7426, 0.2798, 0.7574]}, {"w": "SUT.", "b": [0.2853, 0.7426, 0.327, 0.7574]}, {"w": "We", "b": [0.3326, 0.7426, 0.3577, 0.7574]}, {"w": "generate", "b": [0.3633, 0.7426, 0.4296, 0.7574]}, {"w": "several", "b": [0.4352, 0.7426, 0.4886, 0.7574]}, {"w": "“mutants”", "b": [0.4942, 0.7426, 0.5756, 0.7574]}, {"w": "of", "b": [0.5812, 0.7426, 0.5958, 0.7574]}, {"w": "the", "b": [0.6013, 0.7426, 0.6265, 0.7574]}, {"w": "SUT.", "b": [0.632, 0.7426, 0.6737, 0.7574]}, {"w": "A", "b": [0.6793, 0.7426, 0.6928, 0.7574]}, {"w": "mutant", "b": [0.6984, 0.7426, 0.7556, 0.7574]}, {"w": "is", "b": [0.7612, 0.7426, 0.7734, 0.7574]}, {"w": "a", "b": [0.7789, 0.7426, 0.788, 0.7574]}, {"w": "version", "b": [0.7935, 0.7426, 0.8489, 0.7574]}, {"w": "of", "b": [0.8545, 0.7426, 0.8691, 0.7574]}, {"w": "the", "b": [0.1312, 0.7606, 0.1564, 0.7754]}, {"w": "SUT", "b": [0.1616, 0.7606, 0.1983, 0.7754]}, {"w": "in", "b": [0.2035, 0.7606, 0.2186, 0.7754]}, {"w": "which", "b": [0.2239, 0.7606, 0.2696, 0.7754]}, {"w": "we", "b": [0.2748, 0.7606, 0.2954, 0.7754]}, {"w": "randomly", "b": [0.3007, 0.7606, 0.3756, 0.7754]}, {"w": "make", "b": [0.3808, 0.7606, 0.422, 0.7754]}, {"w": "some", "b": [0.4273, 0.7606, 0.4666, 0.7754]}, {"w": "modifications,", "b": [0.4718, 0.7606, 0.582, 0.7754]}, {"w": "such", "b": [0.5874, 0.7606, 0.6222, 0.7754]}, {"w": "as", "b": [0.6274, 0.7606, 0.6436, 0.7754]}, {"w": "replacing", "b": [0.6489, 0.7606, 0.7203, 0.7754]}, {"w": "in", "b": [0.7256, 0.7606, 0.7406, 0.7754]}, {"w": "the", "b": [0.7459, 0.7606, 0.771, 0.7754]}, {"w": "source", "b": [0.7763, 0.7606, 0.8257, 0.7754]}, {"w": "code,", "b": [0.8309, 0.7606, 0.8717, 0.7754]}, {"w": "a", "b": [0.1312, 0.7783, 0.1406, 0.7934]}, {"w": "“+”", "b": [0.147, 0.7783, 0.1794, 0.7934]}, {"w": "with", "b": [0.1857, 0.7783, 0.2223, 0.7934]}, {"w": "a", "b": [0.2287, 0.7783, 0.2381, 0.7934]}, {"w": "“−”,", "b": [0.2444, 0.7782, 0.2818, 0.7934]}, {"w": "a", "b": [0.2882, 0.7783, 0.2976, 0.7934]}, {"w": "“<”", "b": [0.3039, 0.7783, 0.336, 0.7934]}, {"w": "with", "b": [0.3424, 0.7783, 0.379, 0.7934]}, {"w": "a", "b": [0.3853, 0.7783, 0.3947, 0.7934]}, {"w": "“>”,", "b": [0.4011, 0.7783, 0.4384, 0.7934]}, {"w": "delete", "b": [0.4448, 0.7783, 0.4929, 0.7934]}, {"w": "the", "b": [0.4993, 0.7783, 0.5254, 0.7934]}, {"w": "else", "b": [0.5317, 0.7791, 0.5704, 0.7941]}, {"w": "command", "b": [0.5768, 0.7783, 0.6563, 0.7934]}, {"w": "in", "b": [0.6626, 0.7783, 0.6783, 0.7934]}, {"w": "an", "b": [0.6846, 0.7783, 0.7045, 0.7934]}, {"w": "if-else", "b": [0.7108, 0.7791, 0.7786, 0.7941]}, {"w": "statement,", "b": [0.785, 0.7783, 0.8714, 0.7934]}, {"w": "and", "b": [0.1312, 0.7964, 0.1607, 0.8113]}, {"w": "so", "b": [0.1668, 0.7964, 0.1832, 0.8113]}, {"w": "on.", "b": [0.1893, 0.7964, 0.2137, 0.8113]}, {"w": "Then", "b": [0.2219, 0.7964, 0.2636, 0.8113]}, {"w": "we", "b": [0.2697, 0.7964, 0.2906, 0.8113]}, {"w": "apply", "b": [0.2967, 0.7964, 0.3409, 0.8113]}, {"w": "the", "b": [0.347, 0.7964, 0.3724, 0.8113]}, {"w": "test", "b": [0.3786, 0.7964, 0.4082, 0.8113]}, {"w": "set", "b": [0.4143, 0.7964, 0.4368, 0.8113]}, {"w": "to", "b": [0.4429, 0.7964, 0.4592, 0.8113]}, {"w": "each", "b": [0.4653, 0.7964, 0.5004, 0.8113]}, {"w": "mutant,", "b": [0.5065, 0.7964, 0.5695, 0.8113]}, {"w": "and", "b": [0.5756, 0.7964, 0.6051, 0.8113]}, {"w": "see", "b": [0.6112, 0.7964, 0.6347, 0.8113]}, {"w": "if", "b": [0.6409, 0.7964, 0.6515, 0.8113]}, {"w": "at", "b": [0.6577, 0.7964, 0.6739, 0.8113]}, {"w": "least", "b": [0.6801, 0.7964, 0.7168, 0.8113]}, {"w": "one", "b": [0.7229, 0.7964, 0.7503, 0.8113]}, {"w": "test", "b": [0.7565, 0.7964, 0.786, 0.8113]}, {"w": "breaks", "b": [0.7922, 0.7964, 0.8437, 0.8113]}, {"w": "on", "b": [0.8498, 0.7964, 0.8691, 0.8113]}, {"w": "that", "b": [0.1312, 0.8142, 0.1657, 0.8293]}, {"w": "mutant.", "b": [0.172, 0.8142, 0.2368, 0.8293]}, {"w": "We", "b": [0.2452, 0.8142, 0.2714, 0.8293]}, {"w": "say", "b": [0.2776, 0.8142, 0.3038, 0.8293]}, {"w": "that", "b": [0.31, 0.8142, 0.3445, 0.8293]}, {"w": "we", "b": [0.3507, 0.8142, 0.3722, 0.8293]}, {"w": "kill", "b": [0.3784, 0.8142, 0.404, 0.8293]}, {"w": "a", "b": [0.4102, 0.8142, 0.4196, 0.8293]}, {"w": "mutant", "b": [0.4259, 0.8142, 0.4855, 0.8293]}, {"w": "if", "b": [0.4917, 0.8142, 0.5027, 0.8293]}, {"w": "one", "b": [0.5089, 0.8142, 0.5371, 0.8293]}, {"w": "test", "b": [0.5433, 0.8142, 0.5738, 0.8293]}, {"w": "breaks", "b": [0.58, 0.8142, 0.633, 0.8293]}, {"w": "on", "b": [0.6392, 0.8142, 0.659, 0.8293]}, {"w": "it.", "b": [0.6653, 0.8142, 0.683, 0.8293]}, {"w": "We", "b": [0.6914, 0.8142, 0.7176, 0.8293]}, {"w": "then", "b": [0.7238, 0.8142, 0.7604, 0.8293]}, {"w": "compute", "b": [0.7666, 0.8142, 0.8367, 0.8293]}, {"w": "the", "b": [0.8429, 0.8142, 0.8691, 0.8293]}, {"w": "ratio", "b": [0.1312, 0.8322, 0.1695, 0.8472]}, {"w": "of", "b": [0.1756, 0.8322, 0.1906, 0.8472]}, {"w": "killed", "b": [0.1968, 0.8322, 0.2407, 0.8472]}, {"w": "mutants", "b": [0.2468, 0.8322, 0.313, 0.8472]}, {"w": "in", "b": [0.3191, 0.8322, 0.3346, 0.8472]}, {"w": "the", "b": [0.3408, 0.8322, 0.3666, 0.8472]}, {"w": "entire", "b": [0.3728, 0.8322, 0.4188, 0.8472]}, {"w": "collection", "b": [0.4249, 0.8322, 0.5014, 0.8472]}, {"w": "of", "b": [0.5075, 0.8322, 0.5225, 0.8472]}, {"w": "mutants.", "b": [0.5286, 0.8322, 0.6, 0.8472]}, {"w": "A", "b": [0.6082, 0.8322, 0.6221, 0.8472]}, {"w": "good", "b": [0.6283, 0.8322, 0.6675, 0.8472]}, {"w": "test", "b": [0.6736, 0.8322, 0.7037, 0.8472]}, {"w": "set", "b": [0.7098, 0.8322, 0.7327, 0.8472]}, {"w": "makes", "b": [0.7388, 0.8322, 0.7885, 0.8472]}, {"w": "this", "b": [0.7946, 0.8322, 0.8247, 0.8472]}, {"w": "ratio", "b": [0.8308, 0.8322, 0.8691, 0.8472]}, {"w": "equal", "b": [0.1312, 0.8502, 0.1738, 0.8651]}, {"w": "to", "b": [0.1799, 0.8502, 0.1963, 0.8651]}, {"w": "100%.", "b": [0.2025, 0.8502, 0.2506, 0.8651]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 18", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "18", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 236, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "In machine learning, a similar approach can be followed. However, to create a mutant statistical model, instead of modifying the code, we modify the training data. If the model is deep, we can also randomly remove or add a layer, or remove or replace an activation function. The training data can be modified by,", "words": [{"w": "In", "b": [0.1312, 0.0883, 0.1485, 0.1034]}, {"w": "machine", "b": [0.1567, 0.0883, 0.2241, 0.1034]}, {"w": "learning,", "b": [0.2323, 0.0883, 0.3035, 0.1034]}, {"w": "a", "b": [0.3122, 0.0883, 0.3216, 0.1034]}, {"w": "similar", "b": [0.3298, 0.0883, 0.3854, 0.1034]}, {"w": "approach", "b": [0.3935, 0.0883, 0.4684, 0.1034]}, {"w": "can", "b": [0.4766, 0.0883, 0.5048, 0.1034]}, {"w": "be", "b": [0.513, 0.0883, 0.5323, 0.1034]}, {"w": "followed.", "b": [0.5405, 0.0883, 0.6122, 0.1034]}, {"w": "However,", "b": [0.6265, 0.0883, 0.7013, 0.1034]}, {"w": "to", "b": [0.71, 0.0883, 0.7268, 0.1034]}, {"w": "create", "b": [0.7349, 0.0883, 0.7842, 0.1034]}, {"w": "a", "b": [0.7923, 0.0883, 0.8017, 0.1034]}, {"w": "mutant", "b": [0.8099, 0.0883, 0.8695, 0.1034]}, {"w": "statistical", "b": [0.1312, 0.1063, 0.2099, 0.1213]}, {"w": "model,", "b": [0.216, 0.1063, 0.2701, 0.1213]}, {"w": "instead", "b": [0.2763, 0.1063, 0.3342, 0.1213]}, {"w": "of", "b": [0.3403, 0.1063, 0.3553, 0.1213]}, {"w": "modifying", "b": [0.3614, 0.1063, 0.4424, 0.1213]}, {"w": "the", "b": [0.4485, 0.1063, 0.4743, 0.1213]}, {"w": "code,", "b": [0.4805, 0.1063, 0.5223, 0.1213]}, {"w": "we", "b": [0.5284, 0.1063, 0.5496, 0.1213]}, {"w": "modify", "b": [0.5557, 0.1063, 0.6119, 0.1213]}, {"w": "the", "b": [0.6181, 0.1063, 0.6439, 0.1213]}, {"w": "training", "b": [0.65, 0.1063, 0.714, 0.1213]}, {"w": "data.", "b": [0.7202, 0.1063, 0.7614, 0.1213]}, {"w": "If", "b": [0.7696, 0.1063, 0.782, 0.1213]}, {"w": "the", "b": [0.7881, 0.1063, 0.8139, 0.1213]}, {"w": "model", "b": [0.8201, 0.1063, 0.8691, 0.1213]}, {"w": "is", "b": [0.1312, 0.1242, 0.1439, 0.1393]}, {"w": "deep,", "b": [0.151, 0.1242, 0.1939, 0.1393]}, {"w": "we", "b": [0.2012, 0.1242, 0.2226, 0.1393]}, {"w": "can", "b": [0.2297, 0.1242, 0.258, 0.1393]}, {"w": "also", "b": [0.265, 0.1242, 0.2965, 0.1393]}, {"w": "randomly", "b": [0.3036, 0.1242, 0.3816, 0.1393]}, {"w": "remove", "b": [0.3886, 0.1242, 0.4468, 0.1393]}, {"w": "or", "b": [0.4538, 0.1242, 0.4706, 0.1393]}, {"w": "add", "b": [0.4777, 0.1242, 0.508, 0.1393]}, {"w": "a", "b": [0.5151, 0.1242, 0.5245, 0.1393]}, {"w": "layer,", "b": [0.5316, 0.1242, 0.5761, 0.1393]}, {"w": "or", "b": [0.5834, 0.1242, 0.6002, 0.1393]}, {"w": "remove", "b": [0.6073, 0.1242, 0.6654, 0.1393]}, {"w": "or", "b": [0.6725, 0.1242, 0.6893, 0.1393]}, {"w": "replace", "b": [0.6964, 0.1242, 0.754, 0.1393]}, {"w": "an", "b": [0.761, 0.1242, 0.7809, 0.1393]}, {"w": "activation", "b": [0.788, 0.1242, 0.8691, 0.1393]}, {"w": "function.", "b": [0.1312, 0.1422, 0.2025, 0.1572]}, {"w": "The", "b": [0.2107, 0.1422, 0.2425, 0.1572]}, {"w": "training", "b": [0.2486, 0.1422, 0.3123, 0.1572]}, {"w": "data", "b": [0.3184, 0.1422, 0.3543, 0.1572]}, {"w": "can", "b": [0.3605, 0.1422, 0.3882, 0.1572]}, {"w": "be", "b": [0.3943, 0.1422, 0.4133, 0.1572]}, {"w": "modified", "b": [0.4194, 0.1422, 0.4887, 0.1572]}, {"w": "by,", "b": [0.4948, 0.1422, 0.5179, 0.1572]}]}, {"id": "b_1", "type": "paragraph", "text": "• adding duplicated examples, • falsifying the labels of some examples, • removing some examples, or • adding random noise to the values of some features.", "words": [{"w": "•", "b": [0.1538, 0.1692, 0.1681, 0.1841]}, {"w": "adding", "b": [0.1774, 0.1692, 0.2317, 0.1841]}, {"w": "duplicated", "b": [0.2379, 0.1692, 0.322, 0.1841]}, {"w": "examples,", "b": [0.3281, 0.1692, 0.4067, 0.1841]}, {"w": "•", "b": [0.1538, 0.1871, 0.1681, 0.2021]}, {"w": "falsifying", "b": [0.1774, 0.1871, 0.2498, 0.2021]}, {"w": "the", "b": [0.2559, 0.1871, 0.2816, 0.2021]}, {"w": "labels", "b": [0.2877, 0.1871, 0.3335, 0.2021]}, {"w": "of", "b": [0.3396, 0.1871, 0.3545, 0.2021]}, {"w": "some", "b": [0.3606, 0.1871, 0.4007, 0.2021]}, {"w": "examples,", "b": [0.4069, 0.1871, 0.4854, 0.2021]}, {"w": "•", "b": [0.1538, 0.205, 0.1681, 0.22]}, {"w": "removing", "b": [0.1774, 0.205, 0.2512, 0.22]}, {"w": "some", "b": [0.2574, 0.205, 0.2975, 0.22]}, {"w": "examples,", "b": [0.3036, 0.205, 0.3822, 0.22]}, {"w": "or", "b": [0.3883, 0.205, 0.4048, 0.22]}, {"w": "•", "b": [0.1538, 0.223, 0.1681, 0.238]}, {"w": "adding", "b": [0.1774, 0.223, 0.2317, 0.238]}, {"w": "random", "b": [0.2379, 0.223, 0.2994, 0.238]}, {"w": "noise", "b": [0.3056, 0.223, 0.3457, 0.238]}, {"w": "to", "b": [0.3518, 0.223, 0.3682, 0.238]}, {"w": "the", "b": [0.3744, 0.223, 0.4, 0.238]}, {"w": "values", "b": [0.4062, 0.223, 0.455, 0.238]}, {"w": "of", "b": [0.4611, 0.223, 0.476, 0.238]}, {"w": "some", "b": [0.4822, 0.223, 0.5222, 0.238]}, {"w": "features.", "b": [0.5284, 0.223, 0.5968, 0.238]}]}, {"id": "b_2", "type": "paragraph", "text": "We say that we kill a mutant if at least one test example gets a wrong prediction by that", "words": [{"w": "We", "b": [0.1303, 0.2498, 0.1565, 0.2649]}, {"w": "say", "b": [0.1629, 0.2498, 0.1891, 0.2649]}, {"w": "that", "b": [0.1956, 0.2498, 0.2301, 0.2649]}, {"w": "we", "b": [0.2365, 0.2498, 0.2579, 0.2649]}, {"w": "kill", "b": [0.2643, 0.2498, 0.2899, 0.2649]}, {"w": "a", "b": [0.2963, 0.2498, 0.3058, 0.2649]}, {"w": "mutant", "b": [0.3122, 0.2498, 0.3718, 0.2649]}, {"w": "if", "b": [0.3782, 0.2498, 0.3892, 0.2649]}, {"w": "at", "b": [0.3956, 0.2498, 0.4123, 0.2649]}, {"w": "least", "b": [0.4187, 0.2498, 0.4565, 0.2649]}, {"w": "one", "b": [0.4629, 0.2498, 0.4911, 0.2649]}, {"w": "test", "b": [0.4975, 0.2498, 0.528, 0.2649]}, {"w": "example", "b": [0.5344, 0.2498, 0.6018, 0.2649]}, {"w": "gets", "b": [0.6082, 0.2498, 0.6408, 0.2649]}, {"w": "a", "b": [0.6472, 0.2498, 0.6566, 0.2649]}, {"w": "wrong", "b": [0.663, 0.2498, 0.7132, 0.2649]}, {"w": "prediction", "b": [0.7196, 0.2498, 0.8023, 0.2649]}, {"w": "by", "b": [0.8087, 0.2498, 0.8286, 0.2649]}, {"w": "that", "b": [0.835, 0.2498, 0.8695, 0.2649]}]}, {"id": "b_3", "type": "paragraph", "text": "mutant statistical model.", "words": [{"w": "mutant", "b": [0.1312, 0.2679, 0.1897, 0.2828]}, {"w": "statistical", "b": [0.1958, 0.2679, 0.274, 0.2828]}, {"w": "model.", "b": [0.2801, 0.2679, 0.3339, 0.2828]}]}, {"id": "b_4", "type": "paragraph", "text": "7.6 Evaluation of Model Properties", "words": [{"w": "7.6", "b": [0.1312, 0.3164, 0.1631, 0.3343]}, {"w": "Evaluation", "b": [0.188, 0.3164, 0.304, 0.3343]}, {"w": "of", "b": [0.3123, 0.3164, 0.3324, 0.3343]}, {"w": "Model", "b": [0.3407, 0.3164, 0.4096, 0.3343]}, {"w": "Properties", "b": [0.4179, 0.3164, 0.5315, 0.3343]}]}, {"id": "b_5", "type": "paragraph", "text": "When we measure the quality of the model according to some performance metric, such as", "words": [{"w": "When", "b": [0.1303, 0.3552, 0.1784, 0.3702]}, {"w": "we", "b": [0.1846, 0.3552, 0.2058, 0.3702]}, {"w": "measure", "b": [0.2119, 0.3552, 0.2783, 0.3702]}, {"w": "the", "b": [0.2845, 0.3552, 0.3104, 0.3702]}, {"w": "quality", "b": [0.3165, 0.3552, 0.3729, 0.3702]}, {"w": "of", "b": [0.3791, 0.3552, 0.3941, 0.3702]}, {"w": "the", "b": [0.4002, 0.3552, 0.4261, 0.3702]}, {"w": "model", "b": [0.4323, 0.3552, 0.4814, 0.3702]}, {"w": "according", "b": [0.4876, 0.3552, 0.5652, 0.3702]}, {"w": "to", "b": [0.5714, 0.3552, 0.5879, 0.3702]}, {"w": "some", "b": [0.5941, 0.3552, 0.6345, 0.3702]}, {"w": "performance", "b": [0.6407, 0.3552, 0.7412, 0.3702]}, {"w": "metric,", "b": [0.7473, 0.3552, 0.8043, 0.3702]}, {"w": "such", "b": [0.8105, 0.3552, 0.8463, 0.3702]}, {"w": "as", "b": [0.8524, 0.3552, 0.8691, 0.3702]}]}, {"id": "b_6", "type": "paragraph", "text": "accuracy or AUC, we evaluate its correctness property. Besides this commonly evaluated property of the model, it can be appropriate to evaluate other properties of the model, such as robustness and fairness.", "words": [{"w": "accuracy", "b": [0.1312, 0.3732, 0.2021, 0.3882]}, {"w": "or", "b": [0.2083, 0.3732, 0.2248, 0.3882]}, {"w": "AUC,", "b": [0.231, 0.3732, 0.277, 0.3882]}, {"w": "we", "b": [0.2832, 0.3732, 0.3044, 0.3882]}, {"w": "evaluate", "b": [0.3105, 0.3732, 0.3772, 0.3882]}, {"w": "its", "b": [0.3834, 0.3732, 0.4031, 0.3882]}, {"w": "correctness", "b": [0.4092, 0.3732, 0.5123, 0.3882]}, {"w": "property.", "b": [0.5185, 0.3732, 0.592, 0.3882]}, {"w": "Besides", "b": [0.6002, 0.3732, 0.6602, 0.3882]}, {"w": "this", "b": [0.6663, 0.3732, 0.6964, 0.3882]}, {"w": "commonly", "b": [0.7026, 0.3732, 0.7857, 0.3882]}, {"w": "evaluated", "b": [0.7919, 0.3732, 0.8689, 0.3882]}, {"w": "property", "b": [0.1312, 0.3912, 0.1999, 0.4061]}, {"w": "of", "b": [0.2061, 0.3912, 0.2208, 0.4061]}, {"w": "the", "b": [0.227, 0.3912, 0.2524, 0.4061]}, {"w": "model,", "b": [0.2586, 0.3912, 0.3119, 0.4061]}, {"w": "it", "b": [0.3181, 0.3912, 0.3303, 0.4061]}, {"w": "can", "b": [0.3365, 0.3912, 0.3639, 0.4061]}, {"w": "be", "b": [0.3701, 0.3912, 0.3889, 0.4061]}, {"w": "appropriate", "b": [0.395, 0.3912, 0.4876, 0.4061]}, {"w": "to", "b": [0.4938, 0.3912, 0.51, 0.4061]}, {"w": "evaluate", "b": [0.5162, 0.3912, 0.5818, 0.4061]}, {"w": "other", "b": [0.5879, 0.3912, 0.6296, 0.4061]}, {"w": "properties", "b": [0.6358, 0.3912, 0.7158, 0.4061]}, {"w": "of", "b": [0.722, 0.3912, 0.7367, 0.4061]}, {"w": "the", "b": [0.7429, 0.3912, 0.7683, 0.4061]}, {"w": "model,", "b": [0.7744, 0.3912, 0.8278, 0.4061]}, {"w": "such", "b": [0.834, 0.3912, 0.8691, 0.4061]}, {"w": "as", "b": [0.1312, 0.4091, 0.1477, 0.4241]}, {"w": "robustness", "b": [0.1539, 0.4091, 0.2384, 0.4241]}, {"w": "and", "b": [0.2445, 0.4091, 0.2743, 0.4241]}, {"w": "fairness.", "b": [0.2804, 0.4091, 0.3458, 0.4241]}]}, {"id": "b_7", "type": "paragraph", "text": "7.6.1 Robustness", "words": [{"w": "7.6.1", "b": [0.1312, 0.457, 0.1749, 0.4719]}, {"w": "Robustness", "b": [0.1961, 0.457, 0.3011, 0.4719]}]}, {"id": "b_8", "type": "paragraph", "text": "The robustness of a machine learning model refers to the stability of the model performance after adding some noise to the input data. A robust model would exhibit the following behavior. If the input example is perturbed by adding random noise, the performance of the model would degrade proportionally to the level of noise.", "words": [{"w": "The", "b": [0.1306, 0.4937, 0.1617, 0.5085]}, {"w": "robustness", "b": [0.1672, 0.4936, 0.265, 0.5085]}, {"w": "of", "b": [0.2704, 0.4937, 0.285, 0.5085]}, {"w": "a", "b": [0.2904, 0.4937, 0.2995, 0.5085]}, {"w": "machine", "b": [0.3049, 0.4937, 0.3697, 0.5085]}, {"w": "learning", "b": [0.3752, 0.4937, 0.4386, 0.5085]}, {"w": "model", "b": [0.444, 0.4937, 0.4918, 0.5085]}, {"w": "refers", "b": [0.4972, 0.4937, 0.5402, 0.5085]}, {"w": "to", "b": [0.5456, 0.4937, 0.5617, 0.5085]}, {"w": "the", "b": [0.5672, 0.4937, 0.5923, 0.5085]}, {"w": "stability", "b": [0.5978, 0.4937, 0.6622, 0.5085]}, {"w": "of", "b": [0.6676, 0.4937, 0.6822, 0.5085]}, {"w": "the", "b": [0.6877, 0.4937, 0.7128, 0.5085]}, {"w": "model", "b": [0.7182, 0.4937, 0.766, 0.5085]}, {"w": "performance", "b": [0.7715, 0.4937, 0.8691, 0.5085]}, {"w": "after", "b": [0.1312, 0.5114, 0.1695, 0.5265]}, {"w": "adding", "b": [0.1771, 0.5114, 0.2326, 0.5265]}, {"w": "some", "b": [0.2402, 0.5114, 0.2811, 0.5265]}, {"w": "noise", "b": [0.2888, 0.5114, 0.3297, 0.5265]}, {"w": "to", "b": [0.3374, 0.5114, 0.3541, 0.5265]}, {"w": "the", "b": [0.3618, 0.5114, 0.3879, 0.5265]}, {"w": "input", "b": [0.3956, 0.5114, 0.4395, 0.5265]}, {"w": "data.", "b": [0.4472, 0.5114, 0.489, 0.5265]}, {"w": "A", "b": [0.5018, 0.5114, 0.5159, 0.5265]}, {"w": "robust", "b": [0.5236, 0.5114, 0.576, 0.5265]}, {"w": "model", "b": [0.5837, 0.5114, 0.6334, 0.5265]}, {"w": "would", "b": [0.641, 0.5114, 0.6897, 0.5265]}, {"w": "exhibit", "b": [0.6973, 0.5114, 0.7544, 0.5265]}, {"w": "the", "b": [0.762, 0.5114, 0.7882, 0.5265]}, {"w": "following", "b": [0.7959, 0.5114, 0.8691, 0.5265]}, {"w": "behavior.", "b": [0.1312, 0.5295, 0.2044, 0.5444]}, {"w": "If", "b": [0.2126, 0.5295, 0.2247, 0.5444]}, {"w": "the", "b": [0.2309, 0.5295, 0.2561, 0.5444]}, {"w": "input", "b": [0.2623, 0.5295, 0.3046, 0.5444]}, {"w": "example", "b": [0.3108, 0.5295, 0.3759, 0.5444]}, {"w": "is", "b": [0.382, 0.5295, 0.3942, 0.5444]}, {"w": "perturbed", "b": [0.4003, 0.5295, 0.4792, 0.5444]}, {"w": "by", "b": [0.4853, 0.5295, 0.5045, 0.5444]}, {"w": "adding", "b": [0.5107, 0.5295, 0.5641, 0.5444]}, {"w": "random", "b": [0.5703, 0.5295, 0.6308, 0.5444]}, {"w": "noise,", "b": [0.637, 0.5295, 0.6815, 0.5444]}, {"w": "the", "b": [0.6876, 0.5295, 0.7129, 0.5444]}, {"w": "performance", "b": [0.719, 0.5295, 0.817, 0.5444]}, {"w": "of", "b": [0.8231, 0.5295, 0.8378, 0.5444]}, {"w": "the", "b": [0.8439, 0.5295, 0.8691, 0.5444]}, {"w": "model", "b": [0.1312, 0.5474, 0.1799, 0.5623]}, {"w": "would", "b": [0.1861, 0.5474, 0.2338, 0.5623]}, {"w": "degrade", "b": [0.2399, 0.5474, 0.3025, 0.5623]}, {"w": "proportionally", "b": [0.3087, 0.5474, 0.4236, 0.5623]}, {"w": "to", "b": [0.4298, 0.5474, 0.4462, 0.5623]}, {"w": "the", "b": [0.4523, 0.5474, 0.478, 0.5623]}, {"w": "level", "b": [0.4841, 0.5474, 0.52, 0.5623]}, {"w": "of", "b": [0.5262, 0.5474, 0.541, 0.5623]}, {"w": "noise.", "b": [0.5472, 0.5474, 0.5924, 0.5623]}]}, {"id": "b_9", "type": "paragraph", "text": "Consider an input feature vector x. Let us, before applying a model f to that input example, modify the values of some features, chosen randomly, by replacing them with a zero, to obtain a modified input x′. Continue randomly choosing and replacing values of features in x, as long as the Euclidean distance between x and x′ remains below some δ. Then apply the model f to x and x′ to obtain predictions f(x) and f(x′). Fix values of δ and ϵ. The model f is said to be ϵ-robust to a δ-perturbation of the input, if, for any x and x′, such that ∥x −x′∥≤δ, we have |f(x) −f(x′)| ≤ϵ.", "words": [{"w": "Consider", "b": [0.1312, 0.5744, 0.2007, 0.5892]}, {"w": "an", "b": [0.2066, 0.5744, 0.2257, 0.5892]}, {"w": "input", "b": [0.2316, 0.5744, 0.2738, 0.5892]}, {"w": "feature", "b": [0.2797, 0.5744, 0.3345, 0.5892]}, {"w": "vector", "b": [0.3404, 0.5744, 0.3887, 0.5892]}, {"w": "x.", "b": [0.3944, 0.5743, 0.4107, 0.5893]}, {"w": "Let", "b": [0.4188, 0.5744, 0.4452, 0.5892]}, {"w": "us,", "b": [0.4511, 0.5744, 0.4733, 0.5892]}, {"w": "before", "b": [0.4793, 0.5744, 0.5276, 0.5892]}, {"w": "applying", "b": [0.5335, 0.5744, 0.6013, 0.5892]}, {"w": "a", "b": [0.6072, 0.5744, 0.6162, 0.5892]}, {"w": "model", "b": [0.6221, 0.5744, 0.6698, 0.5892]}, {"w": "f", "b": [0.6756, 0.5743, 0.6846, 0.5892]}, {"w": "to", "b": [0.6925, 0.5744, 0.7085, 0.5892]}, {"w": "that", "b": [0.7144, 0.5744, 0.7476, 0.5892]}, {"w": "input", "b": [0.7535, 0.5744, 0.7957, 0.5892]}, {"w": "example,", "b": [0.8016, 0.5744, 0.8714, 0.5892]}, {"w": "modify", "b": [0.1312, 0.5921, 0.1882, 0.6072]}, {"w": "the", "b": [0.1957, 0.5921, 0.2219, 0.6072]}, {"w": "values", "b": [0.2294, 0.5921, 0.2792, 0.6072]}, {"w": "of", "b": [0.2867, 0.5921, 0.3018, 0.6072]}, {"w": "some", "b": [0.3093, 0.5921, 0.3502, 0.6072]}, {"w": "features,", "b": [0.3577, 0.5921, 0.4275, 0.6072]}, {"w": "chosen", "b": [0.4353, 0.5921, 0.4893, 0.6072]}, {"w": "randomly,", "b": [0.4968, 0.5921, 0.5784, 0.6072]}, {"w": "by", "b": [0.5863, 0.5921, 0.6061, 0.6072]}, {"w": "replacing", "b": [0.6136, 0.5921, 0.688, 0.6072]}, {"w": "them", "b": [0.6954, 0.5921, 0.7373, 0.6072]}, {"w": "with", "b": [0.7448, 0.5921, 0.7814, 0.6072]}, {"w": "a", "b": [0.7889, 0.5921, 0.7983, 0.6072]}, {"w": "zero,", "b": [0.8058, 0.5921, 0.8445, 0.6072]}, {"w": "to", "b": [0.8524, 0.5921, 0.8691, 0.6072]}, {"w": "obtain", "b": [0.1312, 0.6101, 0.1835, 0.6252]}, {"w": "a", "b": [0.1902, 0.6101, 0.1996, 0.6252]}, {"w": "modified", "b": [0.2063, 0.6101, 0.2769, 0.6252]}, {"w": "input", "b": [0.2836, 0.6101, 0.3275, 0.6252]}, {"w": "x′.", "b": [0.3341, 0.6081, 0.3558, 0.6252]}, {"w": "Continue", "b": [0.3656, 0.6101, 0.4399, 0.6252]}, {"w": "randomly", "b": [0.4466, 0.6101, 0.5246, 0.6252]}, {"w": "choosing", "b": [0.5313, 0.6101, 0.6014, 0.6252]}, {"w": "and", "b": [0.6081, 0.6101, 0.6385, 0.6252]}, {"w": "replacing", "b": [0.6451, 0.6101, 0.7195, 0.6252]}, {"w": "values", "b": [0.7262, 0.6101, 0.776, 0.6252]}, {"w": "of", "b": [0.7827, 0.6101, 0.7978, 0.6252]}, {"w": "features", "b": [0.8045, 0.6101, 0.869, 0.6252]}, {"w": "in", "b": [0.1312, 0.628, 0.1469, 0.6431]}, {"w": "x,", "b": [0.1536, 0.628, 0.1702, 0.6431]}, {"w": "as", "b": [0.177, 0.628, 0.1938, 0.6431]}, {"w": "long", "b": [0.2005, 0.628, 0.2351, 0.6431]}, {"w": "as", "b": [0.2418, 0.628, 0.2586, 0.6431]}, {"w": "the", "b": [0.2653, 0.628, 0.2915, 0.6431]}, {"w": "Euclidean", "b": [0.2981, 0.6282, 0.3887, 0.6431]}, {"w": "distance", "b": [0.3964, 0.6282, 0.472, 0.6431]}, {"w": "between", "b": [0.4786, 0.628, 0.5451, 0.6431]}, {"w": "x", "b": [0.5517, 0.6282, 0.5629, 0.6431]}, {"w": "and", "b": [0.5697, 0.628, 0.6001, 0.6431]}, {"w": "x′", "b": [0.6068, 0.6261, 0.6223, 0.6431]}, {"w": "remains", "b": [0.63, 0.628, 0.6939, 0.6431]}, {"w": "below", "b": [0.7006, 0.628, 0.7477, 0.6431]}, {"w": "some", "b": [0.7544, 0.628, 0.7953, 0.6431]}, {"w": "δ.", "b": [0.8019, 0.628, 0.816, 0.6431]}, {"w": "Then", "b": [0.8259, 0.628, 0.8688, 0.6431]}, {"w": "apply", "b": [0.1312, 0.646, 0.1765, 0.6611]}, {"w": "the", "b": [0.1826, 0.646, 0.2086, 0.6611]}, {"w": "model", "b": [0.2148, 0.646, 0.2642, 0.6611]}, {"w": "f", "b": [0.2703, 0.6461, 0.2793, 0.661]}, {"w": "to", "b": [0.2874, 0.646, 0.3041, 0.6611]}, {"w": "x", "b": [0.3102, 0.6461, 0.3214, 0.6611]}, {"w": "and", "b": [0.3277, 0.646, 0.3578, 0.6611]}, {"w": "x′", "b": [0.364, 0.644, 0.3795, 0.6611]}, {"w": "to", "b": [0.3866, 0.646, 0.4032, 0.6611]}, {"w": "obtain", "b": [0.4094, 0.646, 0.4614, 0.6611]}, {"w": "predictions", "b": [0.4675, 0.646, 0.5571, 0.6611]}, {"w": "f(x)", "b": [0.5632, 0.646, 0.6001, 0.6611]}, {"w": "and", "b": [0.6062, 0.646, 0.6364, 0.6611]}, {"w": "f(x′).", "b": [0.6425, 0.644, 0.6898, 0.6611]}, {"w": "Fix", "b": [0.698, 0.646, 0.7253, 0.6611]}, {"w": "values", "b": [0.7315, 0.646, 0.781, 0.6611]}, {"w": "of", "b": [0.7871, 0.646, 0.8022, 0.6611]}, {"w": "δ", "b": [0.8083, 0.6461, 0.8165, 0.661]}, {"w": "and", "b": [0.8234, 0.646, 0.8535, 0.6611]}, {"w": "ϵ.", "b": [0.8597, 0.646, 0.8724, 0.6611]}, {"w": "The", "b": [0.1306, 0.6642, 0.1617, 0.679]}, {"w": "model", "b": [0.1676, 0.6642, 0.2153, 0.679]}, {"w": "f", "b": [0.2211, 0.664, 0.2302, 0.679]}, {"w": "is", "b": [0.238, 0.6642, 0.2502, 0.679]}, {"w": "said", "b": [0.2561, 0.6642, 0.2873, 0.679]}, {"w": "to", "b": [0.2932, 0.6642, 0.3092, 0.679]}, {"w": "be", "b": [0.3151, 0.6642, 0.3337, 0.679]}, {"w": "ϵ-robust", "b": [0.3395, 0.664, 0.4034, 0.679]}, {"w": "to", "b": [0.4093, 0.6642, 0.4254, 0.679]}, {"w": "a", "b": [0.4312, 0.6642, 0.4403, 0.679]}, {"w": "δ-perturbation", "b": [0.4461, 0.664, 0.5611, 0.679]}, {"w": "of", "b": [0.567, 0.6642, 0.5816, 0.679]}, {"w": "the", "b": [0.5874, 0.6642, 0.6126, 0.679]}, {"w": "input,", "b": [0.6184, 0.6642, 0.6657, 0.679]}, {"w": "if,", "b": [0.6716, 0.6642, 0.6872, 0.679]}, {"w": "for", "b": [0.6931, 0.6642, 0.7147, 0.679]}, {"w": "any", "b": [0.7206, 0.6642, 0.7487, 0.679]}, {"w": "x", "b": [0.7544, 0.6641, 0.7656, 0.679]}, {"w": "and", "b": [0.7716, 0.6642, 0.8008, 0.679]}, {"w": "x′,", "b": [0.8066, 0.662, 0.8281, 0.679]}, {"w": "such", "b": [0.834, 0.6642, 0.8688, 0.679]}, {"w": "that", "b": [0.1312, 0.682, 0.1651, 0.6969]}, {"w": "∥x", "b": [0.1712, 0.6818, 0.1916, 0.697]}, {"w": "−x′∥≤δ,", "b": [0.1958, 0.6799, 0.2786, 0.697]}, {"w": "we", "b": [0.2848, 0.682, 0.3058, 0.6969]}, {"w": "have", "b": [0.3119, 0.682, 0.3483, 0.6969]}, {"w": "|f(x)", "b": [0.3545, 0.6818, 0.3963, 0.697]}, {"w": "−f(x′)|", "b": [0.4004, 0.6799, 0.4658, 0.697]}, {"w": "≤ϵ.", "b": [0.4709, 0.6818, 0.503, 0.6969]}]}, {"id": "b_10", "type": "paragraph", "text": "If you have several models that perform similarly according to the performance metric, you would prefer to deploy in production a model that is ϵ-robust, when applied to the test data, with the smallest ϵ. However, in practice, it’s not always clear how to set the appropriate value of δ. A more practical way to identify a robust model among several candidates is as follows.", "words": [{"w": "If", "b": [0.1312, 0.7089, 0.1435, 0.7239]}, {"w": "you", "b": [0.1497, 0.7089, 0.1784, 0.7239]}, {"w": "have", "b": [0.1845, 0.7089, 0.2209, 0.7239]}, {"w": "several", "b": [0.227, 0.7089, 0.2815, 0.7239]}, {"w": "models", "b": [0.2876, 0.7089, 0.3436, 0.7239]}, {"w": "that", "b": [0.3497, 0.7089, 0.3835, 0.7239]}, {"w": "perform", "b": [0.3897, 0.7089, 0.4533, 0.7239]}, {"w": "similarly", "b": [0.4594, 0.7089, 0.5287, 0.7239]}, {"w": "according", "b": [0.5349, 0.7089, 0.6118, 0.7239]}, {"w": "to", "b": [0.6179, 0.7089, 0.6343, 0.7239]}, {"w": "the", "b": [0.6405, 0.7089, 0.6661, 0.7239]}, {"w": "performance", "b": [0.6722, 0.7089, 0.7717, 0.7239]}, {"w": "metric,", "b": [0.7779, 0.7089, 0.8343, 0.7239]}, {"w": "you", "b": [0.8404, 0.7089, 0.8691, 0.7239]}, {"w": "would", "b": [0.1306, 0.727, 0.1774, 0.7418]}, {"w": "prefer", "b": [0.1835, 0.727, 0.2295, 0.7418]}, {"w": "to", "b": [0.2356, 0.727, 0.2518, 0.7418]}, {"w": "deploy", "b": [0.2579, 0.727, 0.3093, 0.7418]}, {"w": "in", "b": [0.3154, 0.727, 0.3305, 0.7418]}, {"w": "production", "b": [0.3367, 0.727, 0.4229, 0.7418]}, {"w": "a", "b": [0.429, 0.727, 0.4381, 0.7418]}, {"w": "model", "b": [0.4443, 0.727, 0.4921, 0.7418]}, {"w": "that", "b": [0.4983, 0.727, 0.5315, 0.7418]}, {"w": "is", "b": [0.5377, 0.727, 0.5499, 0.7418]}, {"w": "ϵ-robust,", "b": [0.5558, 0.7268, 0.6249, 0.7418]}, {"w": "when", "b": [0.6311, 0.727, 0.6724, 0.7418]}, {"w": "applied", "b": [0.6785, 0.727, 0.7359, 0.7418]}, {"w": "to", "b": [0.7421, 0.727, 0.7582, 0.7418]}, {"w": "the", "b": [0.7644, 0.727, 0.7896, 0.7418]}, {"w": "test", "b": [0.7957, 0.727, 0.825, 0.7418]}, {"w": "data,", "b": [0.8312, 0.727, 0.8715, 0.7418]}, {"w": "with", "b": [0.1306, 0.7449, 0.1657, 0.7597]}, {"w": "the", "b": [0.1706, 0.7449, 0.1957, 0.7597]}, {"w": "smallest", "b": [0.2006, 0.7449, 0.2641, 0.7597]}, {"w": "ϵ.", "b": [0.2689, 0.7448, 0.2814, 0.7597]}, {"w": "However,", "b": [0.2892, 0.7449, 0.361, 0.7597]}, {"w": "in", "b": [0.3662, 0.7449, 0.3812, 0.7597]}, {"w": "practice,", "b": [0.3861, 0.7449, 0.4535, 0.7597]}, {"w": "it’s", "b": [0.4586, 0.7449, 0.4828, 0.7597]}, {"w": "not", "b": [0.4877, 0.7449, 0.5138, 0.7597]}, {"w": "always", "b": [0.5187, 0.7449, 0.5705, 0.7597]}, {"w": "clear", "b": [0.5754, 0.7449, 0.6126, 0.7597]}, {"w": "how", "b": [0.6174, 0.7449, 0.6491, 0.7597]}, {"w": "to", "b": [0.654, 0.7449, 0.67, 0.7597]}, {"w": "set", "b": [0.6749, 0.7449, 0.6971, 0.7597]}, {"w": "the", "b": [0.702, 0.7449, 0.7271, 0.7597]}, {"w": "appropriate", "b": [0.732, 0.7449, 0.8235, 0.7597]}, {"w": "value", "b": [0.8284, 0.7449, 0.869, 0.7597]}, {"w": "of", "b": [0.1312, 0.7628, 0.1459, 0.7777]}, {"w": "δ.", "b": [0.152, 0.7627, 0.1659, 0.7777]}, {"w": "A", "b": [0.1741, 0.7628, 0.1877, 0.7777]}, {"w": "more", "b": [0.1938, 0.7628, 0.2332, 0.7777]}, {"w": "practical", "b": [0.2393, 0.7628, 0.3079, 0.7777]}, {"w": "way", "b": [0.3141, 0.7628, 0.3448, 0.7777]}, {"w": "to", "b": [0.3509, 0.7628, 0.367, 0.7777]}, {"w": "identify", "b": [0.3732, 0.7628, 0.4332, 0.7777]}, {"w": "a", "b": [0.4393, 0.7628, 0.4484, 0.7777]}, {"w": "robust", "b": [0.4545, 0.7628, 0.5051, 0.7777]}, {"w": "model", "b": [0.5112, 0.7628, 0.5591, 0.7777]}, {"w": "among", "b": [0.5652, 0.7628, 0.6176, 0.7777]}, {"w": "several", "b": [0.6237, 0.7628, 0.6773, 0.7777]}, {"w": "candidates", "b": [0.6835, 0.7628, 0.7672, 0.7777]}, {"w": "is", "b": [0.7734, 0.7628, 0.7856, 0.7777]}, {"w": "as", "b": [0.7917, 0.7628, 0.8079, 0.7777]}, {"w": "follows.", "b": [0.8141, 0.7628, 0.8726, 0.7777]}]}, {"id": "b_11", "type": "paragraph", "text": "Let us say that a certain test set is δ-perturbed if we obtained it by applying a δ-perturbation to all examples in a certain original test set. Pick the model f you want tested for robustness. Set a reasonable value of ˆϵ such that, if the model prediction in production is not farther from the correct prediction than ˆϵ, you would consider that acceptable. Start with a small value of", "words": [{"w": "Let", "b": [0.1312, 0.7898, 0.1576, 0.8046]}, {"w": "us", "b": [0.1631, 0.7898, 0.1803, 0.8046]}, {"w": "say", "b": [0.1857, 0.7898, 0.2109, 0.8046]}, {"w": "that", "b": [0.2164, 0.7898, 0.2496, 0.8046]}, {"w": "a", "b": [0.255, 0.7898, 0.2641, 0.8046]}, {"w": "certain", "b": [0.2695, 0.7898, 0.3239, 0.8046]}, {"w": "test", "b": [0.3294, 0.7898, 0.3586, 0.8046]}, {"w": "set", "b": [0.3641, 0.7898, 0.3863, 0.8046]}, {"w": "is", "b": [0.3918, 0.7898, 0.4039, 0.8046]}, {"w": "δ-perturbed", "b": [0.4093, 0.7897, 0.5027, 0.8046]}, {"w": "if", "b": [0.5082, 0.7898, 0.5187, 0.8046]}, {"w": "we", "b": [0.5242, 0.7898, 0.5448, 0.8046]}, {"w": "obtained", "b": [0.5502, 0.7898, 0.6186, 0.8046]}, {"w": "it", "b": [0.624, 0.7898, 0.6361, 0.8046]}, {"w": "by", "b": [0.6416, 0.7898, 0.6607, 0.8046]}, {"w": "applying", "b": [0.6661, 0.7898, 0.734, 0.8046]}, {"w": "a", "b": [0.7394, 0.7898, 0.7485, 0.8046]}, {"w": "δ-perturbation", "b": [0.7538, 0.7897, 0.8688, 0.8046]}, {"w": "to", "b": [0.1312, 0.8077, 0.1473, 0.8225]}, {"w": "all", "b": [0.153, 0.8077, 0.1721, 0.8225]}, {"w": "examples", "b": [0.1777, 0.8077, 0.2497, 0.8225]}, {"w": "in", "b": [0.2554, 0.8077, 0.2704, 0.8225]}, {"w": "a", "b": [0.2761, 0.8077, 0.2851, 0.8225]}, {"w": "certain", "b": [0.2908, 0.8077, 0.3451, 0.8225]}, {"w": "original", "b": [0.3508, 0.8077, 0.4101, 0.8225]}, {"w": "test", "b": [0.4158, 0.8077, 0.445, 0.8225]}, {"w": "set.", "b": [0.4507, 0.8077, 0.4779, 0.8225]}, {"w": "Pick", "b": [0.486, 0.8077, 0.5204, 0.8225]}, {"w": "the", "b": [0.5261, 0.8077, 0.5512, 0.8225]}, {"w": "model", "b": [0.5569, 0.8077, 0.6046, 0.8225]}, {"w": "f", "b": [0.61, 0.8076, 0.6191, 0.8226]}, {"w": "you", "b": [0.6267, 0.8077, 0.6549, 0.8225]}, {"w": "want", "b": [0.6605, 0.8077, 0.6987, 0.8225]}, {"w": "tested", "b": [0.7043, 0.8077, 0.7517, 0.8225]}, {"w": "for", "b": [0.7574, 0.8077, 0.779, 0.8225]}, {"w": "robustness.", "b": [0.7847, 0.8077, 0.8725, 0.8225]}, {"w": "Set", "b": [0.1312, 0.8257, 0.1564, 0.8405]}, {"w": "a", "b": [0.1618, 0.8257, 0.1708, 0.8405]}, {"w": "reasonable", "b": [0.1763, 0.8257, 0.2588, 0.8405]}, {"w": "value", "b": [0.2643, 0.8257, 0.305, 0.8405]}, {"w": "of", "b": [0.3104, 0.8257, 0.325, 0.8405]}, {"w": "ˆϵ", "b": [0.3303, 0.8255, 0.3397, 0.8405]}, {"w": "such", "b": [0.3433, 0.8257, 0.378, 0.8405]}, {"w": "that,", "b": [0.3835, 0.8257, 0.4217, 0.8405]}, {"w": "if", "b": [0.4272, 0.8257, 0.4378, 0.8405]}, {"w": "the", "b": [0.4432, 0.8257, 0.4684, 0.8405]}, {"w": "model", "b": [0.4738, 0.8257, 0.5215, 0.8405]}, {"w": "prediction", "b": [0.527, 0.8257, 0.6064, 0.8405]}, {"w": "in", "b": [0.6119, 0.8257, 0.627, 0.8405]}, {"w": "production", "b": [0.6324, 0.8257, 0.7184, 0.8405]}, {"w": "is", "b": [0.7238, 0.8257, 0.736, 0.8405]}, {"w": "not", "b": [0.7414, 0.8257, 0.7676, 0.8405]}, {"w": "farther", "b": [0.773, 0.8257, 0.8269, 0.8405]}, {"w": "from", "b": [0.8323, 0.8257, 0.869, 0.8405]}, {"w": "the", "b": [0.1312, 0.8436, 0.1564, 0.8584]}, {"w": "correct", "b": [0.1621, 0.8436, 0.2165, 0.8584]}, {"w": "prediction", "b": [0.2223, 0.8436, 0.3018, 0.8584]}, {"w": "than", "b": [0.3076, 0.8436, 0.3438, 0.8584]}, {"w": "ˆϵ,", "b": [0.3494, 0.8435, 0.3619, 0.8585]}, {"w": "you", "b": [0.3678, 0.8436, 0.3959, 0.8584]}, {"w": "would", "b": [0.4017, 0.8436, 0.4484, 0.8584]}, {"w": "consider", "b": [0.4542, 0.8436, 0.5187, 0.8584]}, {"w": "that", "b": [0.5245, 0.8436, 0.5577, 0.8584]}, {"w": "acceptable.", "b": [0.5635, 0.8436, 0.6509, 0.8584]}, {"w": "Start", "b": [0.659, 0.8436, 0.6993, 0.8584]}, {"w": "with", "b": [0.705, 0.8436, 0.7402, 0.8584]}, {"w": "a", "b": [0.746, 0.8436, 0.755, 0.8584]}, {"w": "small", "b": [0.7608, 0.8436, 0.8021, 0.8584]}, {"w": "value", "b": [0.8079, 0.8436, 0.8486, 0.8584]}, {"w": "of", "b": [0.8544, 0.8436, 0.869, 0.8584]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 19", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "19", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 237, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "δ and build a δ-perturbed dataset. Find the minimum ϵ such that for each example x from the original test set and its counterpart x′ from the δ-perturbed test set, |f(x) −f(x′)| ≤ϵ.", "words": [{"w": "δ", "b": [0.1312, 0.0884, 0.1394, 0.1033]}, {"w": "and", "b": [0.1463, 0.0884, 0.1761, 0.1034]}, {"w": "build", "b": [0.1822, 0.0884, 0.2233, 0.1034]}, {"w": "a", "b": [0.2294, 0.0884, 0.2387, 0.1034]}, {"w": "δ-perturbed", "b": [0.2448, 0.0884, 0.34, 0.1034]}, {"w": "dataset.", "b": [0.3462, 0.0884, 0.4099, 0.1034]}, {"w": "Find", "b": [0.4182, 0.0884, 0.4559, 0.1034]}, {"w": "the", "b": [0.462, 0.0884, 0.4877, 0.1034]}, {"w": "minimum", "b": [0.4939, 0.0884, 0.5703, 0.1034]}, {"w": "ϵ", "b": [0.5763, 0.0884, 0.5838, 0.1033]}, {"w": "such", "b": [0.59, 0.0884, 0.6255, 0.1034]}, {"w": "that", "b": [0.6317, 0.0884, 0.6655, 0.1034]}, {"w": "for", "b": [0.6717, 0.0884, 0.6938, 0.1034]}, {"w": "each", "b": [0.7, 0.0884, 0.7354, 0.1034]}, {"w": "example", "b": [0.7416, 0.0884, 0.8078, 0.1034]}, {"w": "x", "b": [0.8138, 0.0884, 0.825, 0.1034]}, {"w": "from", "b": [0.8313, 0.0884, 0.8688, 0.1034]}, {"w": "the", "b": [0.1312, 0.1064, 0.1568, 0.1213]}, {"w": "original", "b": [0.1629, 0.1064, 0.2233, 0.1213]}, {"w": "test", "b": [0.2295, 0.1064, 0.2592, 0.1213]}, {"w": "set", "b": [0.2654, 0.1064, 0.288, 0.1213]}, {"w": "and", "b": [0.2941, 0.1064, 0.3238, 0.1213]}, {"w": "its", "b": [0.3299, 0.1064, 0.3495, 0.1213]}, {"w": "counterpart", "b": [0.3556, 0.1064, 0.4493, 0.1213]}, {"w": "x′", "b": [0.4553, 0.1043, 0.4708, 0.1213]}, {"w": "from", "b": [0.4779, 0.1064, 0.5152, 0.1213]}, {"w": "the", "b": [0.5214, 0.1064, 0.547, 0.1213]}, {"w": "δ-perturbed", "b": [0.5531, 0.1063, 0.648, 0.1213]}, {"w": "test", "b": [0.6541, 0.1064, 0.6839, 0.1213]}, {"w": "set,", "b": [0.69, 0.1064, 0.7178, 0.1213]}, {"w": "|f(x)", "b": [0.7238, 0.1061, 0.7656, 0.1213]}, {"w": "−f(x′)|", "b": [0.7697, 0.1043, 0.835, 0.1213]}, {"w": "≤ϵ.", "b": [0.8402, 0.1061, 0.8722, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "If ϵ ≥ˆϵ, you have chosen too high a value for δ; set a lower value and start over.", "words": [{"w": "If", "b": [0.1312, 0.1333, 0.1435, 0.1482]}, {"w": "ϵ", "b": [0.1497, 0.1332, 0.1572, 0.1482]}, {"w": "≥ˆϵ,", "b": [0.1623, 0.133, 0.1944, 0.1482]}, {"w": "you", "b": [0.2005, 0.1333, 0.2293, 0.1482]}, {"w": "have", "b": [0.2354, 0.1333, 0.2718, 0.1482]}, {"w": "chosen", "b": [0.2779, 0.1333, 0.3309, 0.1482]}, {"w": "too", "b": [0.337, 0.1333, 0.3632, 0.1482]}, {"w": "high", "b": [0.3693, 0.1333, 0.4042, 0.1482]}, {"w": "a", "b": [0.4103, 0.1333, 0.4196, 0.1482]}, {"w": "value", "b": [0.4257, 0.1333, 0.4673, 0.1482]}, {"w": "for", "b": [0.4734, 0.1333, 0.4955, 0.1482]}, {"w": "δ;", "b": [0.5015, 0.1332, 0.5155, 0.1482]}, {"w": "set", "b": [0.5217, 0.1333, 0.5444, 0.1482]}, {"w": "a", "b": [0.5505, 0.1333, 0.5597, 0.1482]}, {"w": "lower", "b": [0.5659, 0.1333, 0.608, 0.1482]}, {"w": "value", "b": [0.6141, 0.1333, 0.6557, 0.1482]}, {"w": "and", "b": [0.6618, 0.1333, 0.6915, 0.1482]}, {"w": "start", "b": [0.6977, 0.1333, 0.7358, 0.1482]}, {"w": "over.", "b": [0.742, 0.1333, 0.7805, 0.1482]}]}, {"id": "b_2", "type": "paragraph", "text": "If ϵ < ˆϵ, then slightly increase δ, build a new δ-perturbed test set, find ϵ for this new δ-perturbed test set, and continue increasing δ as long as ϵ remains less than ˆϵ. Once you find the value of δ = ˆδ where ϵ ≥ˆϵ, note that the model f you are testing for robustness is ˆϵ-robust to ˆδ-perturbation of the input. Now pick another model you want to test for robustness, and find its ˆδ; continue like that until all models are tested.", "words": [{"w": "If", "b": [0.1312, 0.1601, 0.1438, 0.1752]}, {"w": "ϵ", "b": [0.1521, 0.1602, 0.1596, 0.1751]}, {"w": "<", "b": [0.1683, 0.1602, 0.1827, 0.1751]}, {"w": "ˆϵ,", "b": [0.1914, 0.1601, 0.2042, 0.1752]}, {"w": "then", "b": [0.213, 0.1601, 0.2496, 0.1752]}, {"w": "slightly", "b": [0.258, 0.1601, 0.3177, 0.1752]}, {"w": "increase", "b": [0.326, 0.1601, 0.3911, 0.1752]}, {"w": "δ,", "b": [0.3993, 0.1601, 0.4134, 0.1752]}, {"w": "build", "b": [0.4223, 0.1601, 0.4641, 0.1752]}, {"w": "a", "b": [0.4724, 0.1601, 0.4818, 0.1752]}, {"w": "new", "b": [0.4901, 0.1601, 0.5226, 0.1752]}, {"w": "δ-perturbed", "b": [0.5309, 0.1601, 0.6277, 0.1752]}, {"w": "test", "b": [0.636, 0.1601, 0.6665, 0.1752]}, {"w": "set,", "b": [0.6748, 0.1601, 0.7032, 0.1752]}, {"w": "find", "b": [0.712, 0.1601, 0.7434, 0.1752]}, {"w": "ϵ", "b": [0.7516, 0.1602, 0.7591, 0.1751]}, {"w": "for", "b": [0.7674, 0.1601, 0.79, 0.1752]}, {"w": "this", "b": [0.7983, 0.1601, 0.8287, 0.1752]}, {"w": "new", "b": [0.837, 0.1601, 0.8695, 0.1752]}, {"w": "δ-perturbed", "b": [0.1312, 0.1781, 0.2264, 0.1931]}, {"w": "test", "b": [0.2327, 0.178, 0.2631, 0.1931]}, {"w": "set,", "b": [0.2695, 0.178, 0.2979, 0.1931]}, {"w": "and", "b": [0.3043, 0.178, 0.3346, 0.1931]}, {"w": "continue", "b": [0.341, 0.178, 0.41, 0.1931]}, {"w": "increasing", "b": [0.4164, 0.178, 0.4981, 0.1931]}, {"w": "δ", "b": [0.5043, 0.1781, 0.5125, 0.1931]}, {"w": "as", "b": [0.5196, 0.178, 0.5364, 0.1931]}, {"w": "long", "b": [0.5428, 0.178, 0.5773, 0.1931]}, {"w": "as", "b": [0.5837, 0.178, 0.6005, 0.1931]}, {"w": "ϵ", "b": [0.6068, 0.1781, 0.6143, 0.1931]}, {"w": "remains", "b": [0.6207, 0.178, 0.6846, 0.1931]}, {"w": "less", "b": [0.691, 0.178, 0.7195, 0.1931]}, {"w": "than", "b": [0.7258, 0.178, 0.7635, 0.1931]}, {"w": "ˆϵ.", "b": [0.7698, 0.178, 0.7825, 0.1931]}, {"w": "Once", "b": [0.7913, 0.178, 0.8332, 0.1931]}, {"w": "you", "b": [0.8395, 0.178, 0.8688, 0.1931]}, {"w": "find", "b": [0.1312, 0.196, 0.1626, 0.2111]}, {"w": "the", "b": [0.1693, 0.196, 0.1955, 0.2111]}, {"w": "value", "b": [0.2022, 0.196, 0.2446, 0.2111]}, {"w": "of", "b": [0.2513, 0.196, 0.2665, 0.2111]}, {"w": "δ", "b": [0.2731, 0.1961, 0.2813, 0.211]}, {"w": "=", "b": [0.2881, 0.196, 0.3027, 0.2111]}, {"w": "ˆδ", "b": [0.3088, 0.1921, 0.3189, 0.211]}, {"w": "where", "b": [0.3244, 0.196, 0.3726, 0.2111]}, {"w": "ϵ", "b": [0.3793, 0.1961, 0.3868, 0.211]}, {"w": "≥ˆϵ,", "b": [0.3929, 0.1959, 0.426, 0.2111]}, {"w": "note", "b": [0.4329, 0.196, 0.4684, 0.2111]}, {"w": "that", "b": [0.4752, 0.196, 0.5097, 0.2111]}, {"w": "the", "b": [0.5164, 0.196, 0.5426, 0.2111]}, {"w": "model", "b": [0.5493, 0.196, 0.5989, 0.2111]}, {"w": "f", "b": [0.6056, 0.1961, 0.6146, 0.211]}, {"w": "you", "b": [0.6233, 0.196, 0.6526, 0.2111]}, {"w": "are", "b": [0.6593, 0.196, 0.6845, 0.2111]}, {"w": "testing", "b": [0.6912, 0.196, 0.7468, 0.2111]}, {"w": "for", "b": [0.7535, 0.196, 0.776, 0.2111]}, {"w": "robustness", "b": [0.7827, 0.196, 0.8689, 0.2111]}, {"w": "is", "b": [0.1312, 0.2139, 0.1439, 0.229]}, {"w": "ˆϵ-robust", "b": [0.151, 0.2139, 0.2173, 0.229]}, {"w": "to", "b": [0.2244, 0.2139, 0.2411, 0.229]}, {"w": "ˆδ-perturbation", "b": [0.2483, 0.2101, 0.3676, 0.229]}, {"w": "of", "b": [0.3748, 0.2139, 0.3899, 0.229]}, {"w": "the", "b": [0.3971, 0.2139, 0.4232, 0.229]}, {"w": "input.", "b": [0.4304, 0.2139, 0.4796, 0.229]}, {"w": "Now", "b": [0.4908, 0.2139, 0.5274, 0.229]}, {"w": "pick", "b": [0.5345, 0.2139, 0.568, 0.229]}, {"w": "another", "b": [0.5752, 0.2139, 0.638, 0.229]}, {"w": "model", "b": [0.6452, 0.2139, 0.6948, 0.229]}, {"w": "you", "b": [0.702, 0.2139, 0.7313, 0.229]}, {"w": "want", "b": [0.7384, 0.2139, 0.7782, 0.229]}, {"w": "to", "b": [0.7853, 0.2139, 0.8021, 0.229]}, {"w": "test", "b": [0.8092, 0.2139, 0.8397, 0.229]}, {"w": "for", "b": [0.8468, 0.2139, 0.8694, 0.229]}, {"w": "robustness,", "b": [0.1312, 0.232, 0.2208, 0.2469]}, {"w": "and", "b": [0.227, 0.232, 0.2567, 0.2469]}, {"w": "find", "b": [0.2629, 0.232, 0.2936, 0.2469]}, {"w": "its", "b": [0.2998, 0.232, 0.3194, 0.2469]}, {"w": "ˆδ;", "b": [0.3254, 0.228, 0.3394, 0.2469]}, {"w": "continue", "b": [0.3456, 0.232, 0.4133, 0.2469]}, {"w": "like", "b": [0.4194, 0.232, 0.4471, 0.2469]}, {"w": "that", "b": [0.4533, 0.232, 0.4871, 0.2469]}, {"w": "until", "b": [0.4933, 0.232, 0.5307, 0.2469]}, {"w": "all", "b": [0.5368, 0.232, 0.5563, 0.2469]}, {"w": "models", "b": [0.5625, 0.232, 0.6185, 0.2469]}, {"w": "are", "b": [0.6246, 0.232, 0.6493, 0.2469]}, {"w": "tested.", "b": [0.6554, 0.232, 0.7089, 0.2469]}]}, {"id": "b_3", "type": "paragraph", "text": "Once you have the value of ˆδ-perturbation for each model, deploy in production the model whose ˆδ is the greatest.", "words": [{"w": "Once", "b": [0.1312, 0.2588, 0.1726, 0.2739]}, {"w": "you", "b": [0.1787, 0.2588, 0.2077, 0.2739]}, {"w": "have", "b": [0.2139, 0.2588, 0.2506, 0.2739]}, {"w": "the", "b": [0.2567, 0.2588, 0.2826, 0.2739]}, {"w": "value", "b": [0.2887, 0.2588, 0.3306, 0.2739]}, {"w": "of", "b": [0.3368, 0.2588, 0.3518, 0.2739]}, {"w": "ˆδ-perturbation", "b": [0.3578, 0.2549, 0.4759, 0.2739]}, {"w": "for", "b": [0.482, 0.2588, 0.5043, 0.2739]}, {"w": "each", "b": [0.5105, 0.2588, 0.5461, 0.2739]}, {"w": "model,", "b": [0.5523, 0.2588, 0.6066, 0.2739]}, {"w": "deploy", "b": [0.6127, 0.2588, 0.6655, 0.2739]}, {"w": "in", "b": [0.6716, 0.2588, 0.6871, 0.2739]}, {"w": "production", "b": [0.6933, 0.2588, 0.7817, 0.2739]}, {"w": "the", "b": [0.7879, 0.2588, 0.8138, 0.2739]}, {"w": "model", "b": [0.8199, 0.2588, 0.869, 0.2739]}, {"w": "whose", "b": [0.1306, 0.2768, 0.1789, 0.2918]}, {"w": "ˆδ", "b": [0.185, 0.2729, 0.1951, 0.2918]}, {"w": "is", "b": [0.2, 0.2768, 0.2125, 0.2918]}, {"w": "the", "b": [0.2186, 0.2768, 0.2442, 0.2918]}, {"w": "greatest.", "b": [0.2504, 0.2768, 0.3193, 0.2918]}]}, {"id": "b_4", "type": "paragraph", "text": "7.6.2 Fairness", "words": [{"w": "7.6.2", "b": [0.1312, 0.3247, 0.1749, 0.3396]}, {"w": "Fairness", "b": [0.1961, 0.3247, 0.2709, 0.3396]}]}, {"id": "b_5", "type": "paragraph", "text": "Machine learning algorithms tend to learn what humans are teaching them. The teaching comes in the form of training examples. Humans have biases which may affect how they collect and label data. Sometimes, bias is present in historical, cultural, or geographical data. This, in turn, as we have seen in Section ?? in Chapter 3, may lead to biased models.", "words": [{"w": "Machine", "b": [0.1312, 0.3611, 0.2003, 0.3762]}, {"w": "learning", "b": [0.2064, 0.3611, 0.2724, 0.3762]}, {"w": "algorithms", "b": [0.2785, 0.3611, 0.3655, 0.3762]}, {"w": "tend", "b": [0.3716, 0.3611, 0.4083, 0.3762]}, {"w": "to", "b": [0.4144, 0.3611, 0.4311, 0.3762]}, {"w": "learn", "b": [0.4373, 0.3611, 0.4781, 0.3762]}, {"w": "what", "b": [0.4843, 0.3611, 0.5251, 0.3762]}, {"w": "humans", "b": [0.5312, 0.3611, 0.5946, 0.3762]}, {"w": "are", "b": [0.6007, 0.3611, 0.6259, 0.3762]}, {"w": "teaching", "b": [0.632, 0.3611, 0.7006, 0.3762]}, {"w": "them.", "b": [0.7067, 0.3611, 0.7538, 0.3762]}, {"w": "The", "b": [0.762, 0.3611, 0.7944, 0.3762]}, {"w": "teaching", "b": [0.8006, 0.3611, 0.8691, 0.3762]}, {"w": "comes", "b": [0.1312, 0.3791, 0.1805, 0.3942]}, {"w": "in", "b": [0.1874, 0.3791, 0.2031, 0.3942]}, {"w": "the", "b": [0.21, 0.3791, 0.2362, 0.3942]}, {"w": "form", "b": [0.2431, 0.3791, 0.2813, 0.3942]}, {"w": "of", "b": [0.2882, 0.3791, 0.3034, 0.3942]}, {"w": "training", "b": [0.3103, 0.3791, 0.3752, 0.3942]}, {"w": "examples.", "b": [0.3821, 0.3791, 0.4622, 0.3942]}, {"w": "Humans", "b": [0.4727, 0.3791, 0.5403, 0.3942]}, {"w": "have", "b": [0.5472, 0.3791, 0.5843, 0.3942]}, {"w": "biases", "b": [0.5912, 0.3791, 0.6396, 0.3942]}, {"w": "which", "b": [0.6465, 0.3791, 0.6941, 0.3942]}, {"w": "may", "b": [0.701, 0.3791, 0.7355, 0.3942]}, {"w": "affect", "b": [0.7424, 0.3791, 0.7869, 0.3942]}, {"w": "how", "b": [0.7938, 0.3791, 0.8267, 0.3942]}, {"w": "they", "b": [0.8336, 0.3791, 0.8697, 0.3942]}, {"w": "collect", "b": [0.1312, 0.3973, 0.1815, 0.4121]}, {"w": "and", "b": [0.1875, 0.3973, 0.2167, 0.4121]}, {"w": "label", "b": [0.2227, 0.3973, 0.2604, 0.4121]}, {"w": "data.", "b": [0.2664, 0.3973, 0.3066, 0.4121]}, {"w": "Sometimes,", "b": [0.3147, 0.3973, 0.4043, 0.4121]}, {"w": "bias", "b": [0.4103, 0.3973, 0.4416, 0.4121]}, {"w": "is", "b": [0.4476, 0.3973, 0.4598, 0.4121]}, {"w": "present", "b": [0.4658, 0.3973, 0.5227, 0.4121]}, {"w": "in", "b": [0.5287, 0.3973, 0.5438, 0.4121]}, {"w": "historical,", "b": [0.5498, 0.3973, 0.6274, 0.4121]}, {"w": "cultural,", "b": [0.6334, 0.3973, 0.6998, 0.4121]}, {"w": "or", "b": [0.7058, 0.3973, 0.722, 0.4121]}, {"w": "geographical", "b": [0.728, 0.3973, 0.8265, 0.4121]}, {"w": "data.", "b": [0.8325, 0.3973, 0.8727, 0.4121]}, {"w": "This,", "b": [0.1306, 0.4151, 0.1717, 0.4301]}, {"w": "in", "b": [0.1778, 0.4151, 0.1932, 0.4301]}, {"w": "turn,", "b": [0.1994, 0.4151, 0.2394, 0.4301]}, {"w": "as", "b": [0.2456, 0.4151, 0.2621, 0.4301]}, {"w": "we", "b": [0.2682, 0.4151, 0.2893, 0.4301]}, {"w": "have", "b": [0.2954, 0.4151, 0.3318, 0.4301]}, {"w": "seen", "b": [0.338, 0.4151, 0.3719, 0.4301]}, {"w": "in", "b": [0.3781, 0.4151, 0.3935, 0.4301]}, {"w": "Section", "b": [0.3996, 0.4151, 0.4581, 0.4301]}, {"w": "??", "b": [0.464, 0.4151, 0.4841, 0.4301]}, {"w": "in", "b": [0.4902, 0.4151, 0.5056, 0.4301]}, {"w": "Chapter", "b": [0.5118, 0.4151, 0.5774, 0.4301]}, {"w": "3,", "b": [0.5836, 0.4151, 0.5979, 0.4301]}, {"w": "may", "b": [0.6041, 0.4151, 0.6379, 0.4301]}, {"w": "lead", "b": [0.6441, 0.4151, 0.6769, 0.4301]}, {"w": "to", "b": [0.683, 0.4151, 0.6994, 0.4301]}, {"w": "biased", "b": [0.7056, 0.4151, 0.756, 0.4301]}, {"w": "models.", "b": [0.7621, 0.4151, 0.8232, 0.4301]}]}, {"id": "b_6", "type": "paragraph", "text": "The attributes that are sensitive and need protection from unfairness are called protected or sensitive attributes. Examples of legally-recognized and protected attributes include race, skin color, gender, religion, national origin, citizenship, age, pregnancy, familial status, disability status, veteran status, and genetic information.", "words": [{"w": "The", "b": [0.1306, 0.442, 0.1624, 0.457]}, {"w": "attributes", "b": [0.1686, 0.442, 0.2479, 0.457]}, {"w": "that", "b": [0.254, 0.442, 0.2879, 0.457]}, {"w": "are", "b": [0.2941, 0.442, 0.3188, 0.457]}, {"w": "sensitive", "b": [0.325, 0.442, 0.393, 0.457]}, {"w": "and", "b": [0.3992, 0.442, 0.429, 0.457]}, {"w": "need", "b": [0.4351, 0.442, 0.4721, 0.457]}, {"w": "protection", "b": [0.4783, 0.442, 0.5606, 0.457]}, {"w": "from", "b": [0.5667, 0.442, 0.6043, 0.457]}, {"w": "unfairness", "b": [0.6104, 0.442, 0.6914, 0.457]}, {"w": "are", "b": [0.6975, 0.442, 0.7223, 0.457]}, {"w": "called", "b": [0.7284, 0.442, 0.7747, 0.457]}, {"w": "protected", "b": [0.7805, 0.442, 0.8688, 0.457]}, {"w": "or", "b": [0.1312, 0.4599, 0.148, 0.475]}, {"w": "sensitive", "b": [0.1543, 0.46, 0.2329, 0.4749]}, {"w": "attributes.", "b": [0.2401, 0.4599, 0.3366, 0.475]}, {"w": "Examples", "b": [0.3451, 0.4599, 0.4244, 0.475]}, {"w": "of", "b": [0.4307, 0.4599, 0.4458, 0.475]}, {"w": "legally-recognized", "b": [0.4521, 0.4599, 0.597, 0.475]}, {"w": "and", "b": [0.6032, 0.4599, 0.6336, 0.475]}, {"w": "protected", "b": [0.6398, 0.4599, 0.7173, 0.475]}, {"w": "attributes", "b": [0.7235, 0.4599, 0.8042, 0.475]}, {"w": "include", "b": [0.8105, 0.4599, 0.8691, 0.475]}, {"w": "race,", "b": [0.1312, 0.478, 0.169, 0.4929]}, {"w": "skin", "b": [0.1752, 0.478, 0.2074, 0.4929]}, {"w": "color,", "b": [0.2136, 0.478, 0.2575, 0.4929]}, {"w": "gender,", "b": [0.2637, 0.478, 0.3218, 0.4929]}, {"w": "religion,", "b": [0.328, 0.478, 0.3923, 0.4929]}, {"w": "national", "b": [0.3985, 0.478, 0.4637, 0.4929]}, {"w": "origin,", "b": [0.4699, 0.478, 0.5209, 0.4929]}, {"w": "citizenship,", "b": [0.5271, 0.478, 0.6169, 0.4929]}, {"w": "age,", "b": [0.6231, 0.478, 0.6547, 0.4929]}, {"w": "pregnancy,", "b": [0.6609, 0.478, 0.7465, 0.4929]}, {"w": "familial", "b": [0.7527, 0.478, 0.8123, 0.4929]}, {"w": "status,", "b": [0.8185, 0.478, 0.8717, 0.4929]}, {"w": "disability", "b": [0.1312, 0.4959, 0.2052, 0.5108]}, {"w": "status,", "b": [0.2113, 0.4959, 0.2649, 0.5108]}, {"w": "veteran", "b": [0.271, 0.4959, 0.3306, 0.5108]}, {"w": "status,", "b": [0.3367, 0.4959, 0.3902, 0.5108]}, {"w": "and", "b": [0.3964, 0.4959, 0.4261, 0.5108]}, {"w": "genetic", "b": [0.4323, 0.4959, 0.4887, 0.5108]}, {"w": "information.", "b": [0.4948, 0.4959, 0.5938, 0.5108]}]}, {"id": "b_7", "type": "paragraph", "text": "Fairness is often domain-specific, and each domain may have its own regulations. Regulated domains include credit, education, employment, housing, and public accommodation.", "words": [{"w": "Fairness", "b": [0.1312, 0.5228, 0.206, 0.5378]}, {"w": "is", "b": [0.2118, 0.5229, 0.224, 0.5377]}, {"w": "often", "b": [0.2298, 0.5229, 0.2695, 0.5377]}, {"w": "domain-specific,", "b": [0.2753, 0.5229, 0.4015, 0.5377]}, {"w": "and", "b": [0.4074, 0.5229, 0.4365, 0.5377]}, {"w": "each", "b": [0.4423, 0.5229, 0.477, 0.5377]}, {"w": "domain", "b": [0.4828, 0.5229, 0.5411, 0.5377]}, {"w": "may", "b": [0.5469, 0.5229, 0.58, 0.5377]}, {"w": "have", "b": [0.5858, 0.5229, 0.6215, 0.5377]}, {"w": "its", "b": [0.6273, 0.5229, 0.6465, 0.5377]}, {"w": "own", "b": [0.6523, 0.5229, 0.6839, 0.5377]}, {"w": "regulations.", "b": [0.6897, 0.5229, 0.7813, 0.5377]}, {"w": "Regulated", "b": [0.7894, 0.5229, 0.869, 0.5377]}, {"w": "domains", "b": [0.1312, 0.5407, 0.198, 0.5557]}, {"w": "include", "b": [0.2041, 0.5407, 0.2616, 0.5557]}, {"w": "credit,", "b": [0.2677, 0.5407, 0.3191, 0.5557]}, {"w": "education,", "b": [0.3252, 0.5407, 0.4083, 0.5557]}, {"w": "employment,", "b": [0.4144, 0.5407, 0.5175, 0.5557]}, {"w": "housing,", "b": [0.5236, 0.5407, 0.5904, 0.5557]}, {"w": "and", "b": [0.5965, 0.5407, 0.6263, 0.5557]}, {"w": "public", "b": [0.6324, 0.5407, 0.6817, 0.5557]}, {"w": "accommodation.", "b": [0.6878, 0.5407, 0.8196, 0.5557]}]}, {"id": "b_8", "type": "paragraph", "text": "The definition of fairness varies greatly, depending on the domain. At the time of writing this book, there is no firm consensus, in the scientific and technical literature, on what is fairness. Most commonly cited concepts are demographic parity and equal opportunity.", "words": [{"w": "The", "b": [0.1306, 0.5675, 0.163, 0.5826]}, {"w": "definition", "b": [0.1693, 0.5675, 0.2467, 0.5826]}, {"w": "of", "b": [0.2531, 0.5675, 0.2682, 0.5826]}, {"w": "fairness", "b": [0.2745, 0.5675, 0.336, 0.5826]}, {"w": "varies", "b": [0.3423, 0.5675, 0.3891, 0.5826]}, {"w": "greatly,", "b": [0.3954, 0.5675, 0.4562, 0.5826]}, {"w": "depending", "b": [0.4625, 0.5675, 0.5467, 0.5826]}, {"w": "on", "b": [0.5531, 0.5675, 0.5729, 0.5826]}, {"w": "the", "b": [0.5793, 0.5675, 0.6054, 0.5826]}, {"w": "domain.", "b": [0.6117, 0.5675, 0.6776, 0.5826]}, {"w": "At", "b": [0.6863, 0.5675, 0.7073, 0.5826]}, {"w": "the", "b": [0.7136, 0.5675, 0.7398, 0.5826]}, {"w": "time", "b": [0.7461, 0.5675, 0.7827, 0.5826]}, {"w": "of", "b": [0.789, 0.5675, 0.8042, 0.5826]}, {"w": "writing", "b": [0.8105, 0.5675, 0.8691, 0.5826]}, {"w": "this", "b": [0.1312, 0.5855, 0.1617, 0.6006]}, {"w": "book,", "b": [0.1682, 0.5855, 0.2137, 0.6006]}, {"w": "there", "b": [0.2203, 0.5855, 0.2622, 0.6006]}, {"w": "is", "b": [0.2688, 0.5855, 0.2814, 0.6006]}, {"w": "no", "b": [0.288, 0.5855, 0.3078, 0.6006]}, {"w": "firm", "b": [0.3144, 0.5855, 0.3479, 0.6006]}, {"w": "consensus,", "b": [0.3544, 0.5855, 0.4395, 0.6006]}, {"w": "in", "b": [0.4461, 0.5855, 0.4618, 0.6006]}, {"w": "the", "b": [0.4683, 0.5855, 0.4945, 0.6006]}, {"w": "scientific", "b": [0.501, 0.5855, 0.5718, 0.6006]}, {"w": "and", "b": [0.5783, 0.5855, 0.6087, 0.6006]}, {"w": "technical", "b": [0.6152, 0.5855, 0.6879, 0.6006]}, {"w": "literature,", "b": [0.6945, 0.5855, 0.7762, 0.6006]}, {"w": "on", "b": [0.7828, 0.5855, 0.8027, 0.6006]}, {"w": "what", "b": [0.8092, 0.5855, 0.85, 0.6006]}, {"w": "is", "b": [0.8565, 0.5855, 0.8692, 0.6006]}, {"w": "fairness.", "b": [0.1312, 0.6035, 0.1966, 0.6185]}, {"w": "Most", "b": [0.2048, 0.6035, 0.2454, 0.6185]}, {"w": "commonly", "b": [0.2516, 0.6035, 0.3341, 0.6185]}, {"w": "cited", "b": [0.3403, 0.6035, 0.3792, 0.6185]}, {"w": "concepts", "b": [0.3854, 0.6035, 0.4542, 0.6185]}, {"w": "are", "b": [0.4604, 0.6035, 0.485, 0.6185]}, {"w": "demographic", "b": [0.4912, 0.6035, 0.5938, 0.6185]}, {"w": "parity", "b": [0.5999, 0.6035, 0.6482, 0.6185]}, {"w": "and", "b": [0.6543, 0.6035, 0.6841, 0.6185]}, {"w": "equal", "b": [0.6902, 0.6035, 0.7328, 0.6185]}, {"w": "opportunity.", "b": [0.7389, 0.6035, 0.8384, 0.6185]}]}, {"id": "b_9", "type": "paragraph", "text": "Demographic parity (also known as statistical parity, or independence parity) means the proportion of each segment of a protected attribute receives a positive prediction from the model at equal rates.", "words": [{"w": "Demographic", "b": [0.1312, 0.6305, 0.2541, 0.6454]}, {"w": "parity", "b": [0.2597, 0.6305, 0.3153, 0.6454]}, {"w": "(also", "b": [0.3201, 0.6306, 0.3574, 0.6454]}, {"w": "known", "b": [0.3622, 0.6306, 0.4135, 0.6454]}, {"w": "as", "b": [0.4183, 0.6306, 0.4345, 0.6454]}, {"w": "statistical", "b": [0.4393, 0.6305, 0.5286, 0.6454]}, {"w": "parity,", "b": [0.5342, 0.6305, 0.5948, 0.6454]}, {"w": "or", "b": [0.5999, 0.6306, 0.616, 0.6454]}, {"w": "independence", "b": [0.6208, 0.6305, 0.7464, 0.6454]}, {"w": "parity)", "b": [0.752, 0.6305, 0.8146, 0.6454]}, {"w": "means", "b": [0.8194, 0.6306, 0.8688, 0.6454]}, {"w": "the", "b": [0.1312, 0.6483, 0.1572, 0.6634]}, {"w": "proportion", "b": [0.1633, 0.6483, 0.2501, 0.6634]}, {"w": "of", "b": [0.2562, 0.6483, 0.2712, 0.6634]}, {"w": "each", "b": [0.2774, 0.6483, 0.3132, 0.6634]}, {"w": "segment", "b": [0.3193, 0.6483, 0.3853, 0.6634]}, {"w": "of", "b": [0.3915, 0.6483, 0.4065, 0.6634]}, {"w": "a", "b": [0.4127, 0.6483, 0.422, 0.6634]}, {"w": "protected", "b": [0.4281, 0.6483, 0.505, 0.6634]}, {"w": "attribute", "b": [0.5111, 0.6483, 0.5838, 0.6634]}, {"w": "receives", "b": [0.59, 0.6483, 0.6524, 0.6634]}, {"w": "a", "b": [0.6585, 0.6483, 0.6679, 0.6634]}, {"w": "positive", "b": [0.674, 0.6483, 0.7369, 0.6634]}, {"w": "prediction", "b": [0.7431, 0.6483, 0.8251, 0.6634]}, {"w": "from", "b": [0.8312, 0.6483, 0.8692, 0.6634]}, {"w": "the", "b": [0.1312, 0.6664, 0.1569, 0.6813]}, {"w": "model", "b": [0.163, 0.6664, 0.2117, 0.6813]}, {"w": "at", "b": [0.2179, 0.6664, 0.2343, 0.6813]}, {"w": "equal", "b": [0.2404, 0.6664, 0.283, 0.6813]}, {"w": "rates.", "b": [0.2891, 0.6664, 0.3334, 0.6813]}]}, {"id": "b_10", "type": "paragraph", "text": "Let a positive prediction mean “acceptance to university,” or “granting a loan.” Mathemati- cally, demographic parity is defined as follows. Let G1 and G2 be the two disjoint groups belonging to the test data, divided by a sensitive attribute j, such as gender. Let x(j) = 1 if x represents a woman, and x(j) = 0 otherwise. A binary model f under test satisfies demographic parity if Pr(f(xi) = 1|xi ∈G1) = Pr(f(xk) = 1|xk ∈G2). That is, as measured on the test data, the chance to predict 1 with the model f for women is the same as the chance to predict 1 for men.", "words": [{"w": "Let", "b": [0.1312, 0.6933, 0.158, 0.7082]}, {"w": "a", "b": [0.1642, 0.6933, 0.1734, 0.7082]}, {"w": "positive", "b": [0.1795, 0.6933, 0.2414, 0.7082]}, {"w": "prediction", "b": [0.2476, 0.6933, 0.3283, 0.7082]}, {"w": "mean", "b": [0.3345, 0.6933, 0.3774, 0.7082]}, {"w": "“acceptance", "b": [0.3835, 0.6933, 0.4791, 0.7082]}, {"w": "to", "b": [0.4852, 0.6933, 0.5016, 0.7082]}, {"w": "university,”", "b": [0.5077, 0.6933, 0.5988, 0.7082]}, {"w": "or", "b": [0.6049, 0.6933, 0.6213, 0.7082]}, {"w": "“granting", "b": [0.6275, 0.6933, 0.7031, 0.7082]}, {"w": "a", "b": [0.7092, 0.6933, 0.7184, 0.7082]}, {"w": "loan.”", "b": [0.7246, 0.6933, 0.7695, 0.7082]}, {"w": "Mathemati-", "b": [0.7777, 0.6933, 0.8722, 0.7082]}, {"w": "cally,", "b": [0.1312, 0.7111, 0.1731, 0.7262]}, {"w": "demographic", "b": [0.1797, 0.7111, 0.2843, 0.7262]}, {"w": "parity", "b": [0.2908, 0.7111, 0.34, 0.7262]}, {"w": "is", "b": [0.3465, 0.7111, 0.3591, 0.7262]}, {"w": "defined", "b": [0.3656, 0.7111, 0.4242, 0.7262]}, {"w": "as", "b": [0.4306, 0.7111, 0.4475, 0.7262]}, {"w": "follows.", "b": [0.4539, 0.7111, 0.5147, 0.7262]}, {"w": "Let", "b": [0.5239, 0.7111, 0.5513, 0.7262]}, {"w": "G1", "b": [0.5576, 0.7112, 0.5794, 0.7274]}, {"w": "and", "b": [0.5868, 0.7111, 0.6172, 0.7262]}, {"w": "G2", "b": [0.6236, 0.7112, 0.6455, 0.7274]}, {"w": "be", "b": [0.6529, 0.7111, 0.6722, 0.7262]}, {"w": "the", "b": [0.6787, 0.7111, 0.7048, 0.7262]}, {"w": "two", "b": [0.7113, 0.7111, 0.7406, 0.7262]}, {"w": "disjoint", "b": [0.7471, 0.7111, 0.8079, 0.7262]}, {"w": "groups", "b": [0.8143, 0.7111, 0.8689, 0.7262]}, {"w": "belonging", "b": [0.1312, 0.7291, 0.2102, 0.7442]}, {"w": "to", "b": [0.2164, 0.7291, 0.2331, 0.7442]}, {"w": "the", "b": [0.2392, 0.7291, 0.2654, 0.7442]}, {"w": "test", "b": [0.2716, 0.7291, 0.302, 0.7442]}, {"w": "data,", "b": [0.3082, 0.7291, 0.35, 0.7442]}, {"w": "divided", "b": [0.3562, 0.7291, 0.4163, 0.7442]}, {"w": "by", "b": [0.4225, 0.7291, 0.4424, 0.7442]}, {"w": "a", "b": [0.4486, 0.7291, 0.458, 0.7442]}, {"w": "sensitive", "b": [0.4641, 0.7291, 0.5334, 0.7442]}, {"w": "attribute", "b": [0.5396, 0.7291, 0.6128, 0.7442]}, {"w": "j,", "b": [0.6188, 0.7291, 0.6327, 0.7442]}, {"w": "such", "b": [0.6388, 0.7291, 0.675, 0.7442]}, {"w": "as", "b": [0.6812, 0.7291, 0.698, 0.7442]}, {"w": "gender.", "b": [0.7042, 0.7291, 0.7639, 0.7442]}, {"w": "Let", "b": [0.7721, 0.7291, 0.7996, 0.7442]}, {"w": "x(j)", "b": [0.8057, 0.7272, 0.8353, 0.7441]}, {"w": "=", "b": [0.8414, 0.7291, 0.8561, 0.7442]}, {"w": "1", "b": [0.8612, 0.7291, 0.8706, 0.7442]}, {"w": "if", "b": [0.1312, 0.747, 0.1422, 0.7621]}, {"w": "x", "b": [0.1497, 0.7471, 0.1609, 0.7621]}, {"w": "represents", "b": [0.1685, 0.747, 0.2509, 0.7621]}, {"w": "a", "b": [0.2584, 0.747, 0.2678, 0.7621]}, {"w": "woman,", "b": [0.2753, 0.747, 0.3385, 0.7621]}, {"w": "and", "b": [0.3463, 0.747, 0.3767, 0.7621]}, {"w": "x(j)", "b": [0.3841, 0.7452, 0.4137, 0.7621]}, {"w": "=", "b": [0.422, 0.747, 0.4366, 0.7621]}, {"w": "0", "b": [0.444, 0.747, 0.4534, 0.7621]}, {"w": "otherwise.", "b": [0.4608, 0.747, 0.5436, 0.7621]}, {"w": "A", "b": [0.5558, 0.747, 0.5699, 0.7621]}, {"w": "binary", "b": [0.5774, 0.747, 0.6303, 0.7621]}, {"w": "model", "b": [0.6377, 0.747, 0.6874, 0.7621]}, {"w": "f", "b": [0.6948, 0.7471, 0.7038, 0.7621]}, {"w": "under", "b": [0.7133, 0.747, 0.7604, 0.7621]}, {"w": "test", "b": [0.7679, 0.747, 0.7983, 0.7621]}, {"w": "satisfies", "b": [0.8058, 0.747, 0.8689, 0.7621]}, {"w": "demographic", "b": [0.1312, 0.7652, 0.2318, 0.78]}, {"w": "parity", "b": [0.2375, 0.7652, 0.2847, 0.78]}, {"w": "if", "b": [0.2904, 0.7652, 0.301, 0.78]}, {"w": "Pr(f(xi)", "b": [0.3066, 0.765, 0.3758, 0.7813]}, {"w": "=", "b": [0.3809, 0.7652, 0.395, 0.78]}, {"w": "1|xi", "b": [0.4001, 0.7649, 0.4307, 0.7813]}, {"w": "∈G1)", "b": [0.4367, 0.7649, 0.484, 0.7813]}, {"w": "=", "b": [0.4891, 0.7652, 0.5032, 0.78]}, {"w": "Pr(f(xk)", "b": [0.5083, 0.765, 0.5805, 0.7813]}, {"w": "=", "b": [0.5856, 0.7652, 0.5996, 0.78]}, {"w": "1|xk", "b": [0.6048, 0.7649, 0.638, 0.7813]}, {"w": "∈G2).", "b": [0.6443, 0.7649, 0.6966, 0.7813]}, {"w": "That", "b": [0.7046, 0.7652, 0.7438, 0.78]}, {"w": "is,", "b": [0.7495, 0.7652, 0.7667, 0.78]}, {"w": "as", "b": [0.7725, 0.7652, 0.7886, 0.78]}, {"w": "measured", "b": [0.7943, 0.7652, 0.8689, 0.78]}, {"w": "on", "b": [0.1312, 0.7829, 0.1511, 0.798]}, {"w": "the", "b": [0.1579, 0.7829, 0.184, 0.798]}, {"w": "test", "b": [0.1908, 0.7829, 0.2213, 0.798]}, {"w": "data,", "b": [0.2281, 0.7829, 0.2699, 0.798]}, {"w": "the", "b": [0.2768, 0.7829, 0.303, 0.798]}, {"w": "chance", "b": [0.3098, 0.7829, 0.3647, 0.798]}, {"w": "to", "b": [0.3715, 0.7829, 0.3882, 0.798]}, {"w": "predict", "b": [0.395, 0.7829, 0.4526, 0.798]}, {"w": "1", "b": [0.4592, 0.7829, 0.4686, 0.798]}, {"w": "with", "b": [0.4754, 0.7829, 0.512, 0.798]}, {"w": "the", "b": [0.5188, 0.7829, 0.5449, 0.798]}, {"w": "model", "b": [0.5517, 0.7829, 0.6014, 0.798]}, {"w": "f", "b": [0.6081, 0.783, 0.6172, 0.798]}, {"w": "for", "b": [0.6259, 0.7829, 0.6485, 0.798]}, {"w": "women", "b": [0.6552, 0.7829, 0.7122, 0.798]}, {"w": "is", "b": [0.719, 0.7829, 0.7317, 0.798]}, {"w": "the", "b": [0.7385, 0.7829, 0.7646, 0.798]}, {"w": "same", "b": [0.7714, 0.7829, 0.8123, 0.798]}, {"w": "as", "b": [0.8191, 0.7829, 0.8359, 0.798]}, {"w": "the", "b": [0.8427, 0.7829, 0.8689, 0.798]}, {"w": "chance", "b": [0.1312, 0.801, 0.1851, 0.8159]}, {"w": "to", "b": [0.1912, 0.801, 0.2076, 0.8159]}, {"w": "predict", "b": [0.2138, 0.801, 0.2702, 0.8159]}, {"w": "1", "b": [0.2763, 0.801, 0.2855, 0.8159]}, {"w": "for", "b": [0.2917, 0.801, 0.3138, 0.8159]}, {"w": "men.", "b": [0.3199, 0.801, 0.3589, 0.8159]}]}, {"id": "b_11", "type": "paragraph", "text": "The exclusion of the protected attributes from the feature vector in the training data doesn’t guarantee that the model will have demographic parity, as some of the remaining features", "words": [{"w": "The", "b": [0.1306, 0.828, 0.1617, 0.8428]}, {"w": "exclusion", "b": [0.1678, 0.828, 0.2397, 0.8428]}, {"w": "of", "b": [0.2458, 0.828, 0.2604, 0.8428]}, {"w": "the", "b": [0.2664, 0.828, 0.2915, 0.8428]}, {"w": "protected", "b": [0.2976, 0.828, 0.372, 0.8428]}, {"w": "attributes", "b": [0.3781, 0.828, 0.4556, 0.8428]}, {"w": "from", "b": [0.4617, 0.828, 0.4984, 0.8428]}, {"w": "the", "b": [0.5044, 0.828, 0.5296, 0.8428]}, {"w": "feature", "b": [0.5356, 0.828, 0.5904, 0.8428]}, {"w": "vector", "b": [0.5965, 0.828, 0.6448, 0.8428]}, {"w": "in", "b": [0.6508, 0.828, 0.6659, 0.8428]}, {"w": "the", "b": [0.6719, 0.828, 0.6971, 0.8428]}, {"w": "training", "b": [0.7031, 0.828, 0.7655, 0.8428]}, {"w": "data", "b": [0.7715, 0.828, 0.8067, 0.8428]}, {"w": "doesn’t", "b": [0.8128, 0.828, 0.8697, 0.8428]}, {"w": "guarantee", "b": [0.1312, 0.8457, 0.2111, 0.8608]}, {"w": "that", "b": [0.2172, 0.8457, 0.2517, 0.8608]}, {"w": "the", "b": [0.2578, 0.8457, 0.2839, 0.8608]}, {"w": "model", "b": [0.2901, 0.8457, 0.3396, 0.8608]}, {"w": "will", "b": [0.3458, 0.8457, 0.375, 0.8608]}, {"w": "have", "b": [0.3811, 0.8457, 0.4182, 0.8608]}, {"w": "demographic", "b": [0.4243, 0.8457, 0.5287, 0.8608]}, {"w": "parity,", "b": [0.5348, 0.8457, 0.5876, 0.8608]}, {"w": "as", "b": [0.5938, 0.8457, 0.6106, 0.8608]}, {"w": "some", "b": [0.6167, 0.8457, 0.6575, 0.8608]}, {"w": "of", "b": [0.6637, 0.8457, 0.6788, 0.8608]}, {"w": "the", "b": [0.685, 0.8457, 0.711, 0.8608]}, {"w": "remaining", "b": [0.7172, 0.8457, 0.7986, 0.8608]}, {"w": "features", "b": [0.8048, 0.8457, 0.8691, 0.8608]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 20", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "20", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 238, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "may be correlated with the excluded ones.", "words": [{"w": "may", "b": [0.1312, 0.0884, 0.1651, 0.1033]}, {"w": "be", "b": [0.1712, 0.0884, 0.1902, 0.1033]}, {"w": "correlated", "b": [0.1963, 0.0884, 0.2895, 0.1034]}, {"w": "with", "b": [0.2957, 0.0884, 0.3316, 0.1033]}, {"w": "the", "b": [0.3377, 0.0884, 0.3633, 0.1033]}, {"w": "excluded", "b": [0.3695, 0.0884, 0.4398, 0.1033]}, {"w": "ones.", "b": [0.4459, 0.0884, 0.486, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "Equal opportunity means each group gets a positive prediction from the model at equal rates, assuming that people in this group qualify for it.", "words": [{"w": "Equal", "b": [0.1312, 0.1153, 0.1844, 0.1303]}, {"w": "opportunity", "b": [0.1915, 0.1153, 0.3022, 0.1303]}, {"w": "means", "b": [0.3083, 0.1152, 0.3593, 0.1303]}, {"w": "each", "b": [0.3654, 0.1152, 0.4012, 0.1303]}, {"w": "group", "b": [0.4074, 0.1152, 0.4542, 0.1303]}, {"w": "gets", "b": [0.4603, 0.1152, 0.4926, 0.1303]}, {"w": "a", "b": [0.4988, 0.1152, 0.5081, 0.1303]}, {"w": "positive", "b": [0.5143, 0.1152, 0.5772, 0.1303]}, {"w": "prediction", "b": [0.5833, 0.1152, 0.6654, 0.1303]}, {"w": "from", "b": [0.6715, 0.1152, 0.7095, 0.1303]}, {"w": "the", "b": [0.7156, 0.1152, 0.7416, 0.1303]}, {"w": "model", "b": [0.7477, 0.1152, 0.797, 0.1303]}, {"w": "at", "b": [0.8032, 0.1152, 0.8198, 0.1303]}, {"w": "equal", "b": [0.826, 0.1152, 0.869, 0.1303]}, {"w": "rates,", "b": [0.1312, 0.1333, 0.1755, 0.1482]}, {"w": "assuming", "b": [0.1816, 0.1333, 0.2557, 0.1482]}, {"w": "that", "b": [0.2618, 0.1333, 0.2957, 0.1482]}, {"w": "people", "b": [0.3018, 0.1333, 0.3536, 0.1482]}, {"w": "in", "b": [0.3598, 0.1333, 0.3751, 0.1482]}, {"w": "this", "b": [0.3813, 0.1333, 0.4111, 0.1482]}, {"w": "group", "b": [0.4173, 0.1333, 0.4635, 0.1482]}, {"w": "qualify", "b": [0.4696, 0.1333, 0.5245, 0.1482]}, {"w": "for", "b": [0.5306, 0.1333, 0.5527, 0.1482]}, {"w": "it.", "b": [0.5589, 0.1333, 0.5763, 0.1482]}]}, {"id": "b_2", "type": "paragraph", "text": "Mathematically, a binary model f under test satisfies equal opportunity if Pr(f(xi) = 1|xi ∈ G1 and yi = 1) = Pr(f(xk) = 1|xk ∈G2 and yk = 1), where yi and yk are the actual labels of the feature vectors xi and xk, respectively. The above equality means that, as measured on the test data, the chance to predict 1 by the model f for women who qualify for that prediction is the same as the chance to predict 1 for men who also qualify. In the terms of the confusion matrix, equal opportunity requires the true positive rate (TPR) to be equal for each value of the protected attribute.", "words": [{"w": "Mathematically,", "b": [0.1312, 0.1603, 0.2584, 0.1751]}, {"w": "a", "b": [0.2646, 0.1603, 0.2737, 0.1751]}, {"w": "binary", "b": [0.2798, 0.1603, 0.3306, 0.1751]}, {"w": "model", "b": [0.3368, 0.1603, 0.3846, 0.1751]}, {"w": "f", "b": [0.3906, 0.1602, 0.3997, 0.1751]}, {"w": "under", "b": [0.4078, 0.1603, 0.4531, 0.1751]}, {"w": "test", "b": [0.4593, 0.1603, 0.4886, 0.1751]}, {"w": "satisfies", "b": [0.4947, 0.1603, 0.5554, 0.1751]}, {"w": "equal", "b": [0.5616, 0.1603, 0.6033, 0.1751]}, {"w": "opportunity", "b": [0.6094, 0.1603, 0.7036, 0.1751]}, {"w": "if", "b": [0.7097, 0.1603, 0.7203, 0.1751]}, {"w": "Pr(f(xi)", "b": [0.7262, 0.1602, 0.7955, 0.1764]}, {"w": "=", "b": [0.8006, 0.1603, 0.8147, 0.1751]}, {"w": "1|xi", "b": [0.8198, 0.16, 0.8504, 0.1764]}, {"w": "∈", "b": [0.8565, 0.16, 0.8688, 0.1749]}, {"w": "G1", "b": [0.1312, 0.1781, 0.1531, 0.1943]}, {"w": "and", "b": [0.1592, 0.1781, 0.1889, 0.1931]}, {"w": "yi", "b": [0.1941, 0.1781, 0.2084, 0.1943]}, {"w": "=", "b": [0.2145, 0.178, 0.2291, 0.1931]}, {"w": "1)", "b": [0.2343, 0.178, 0.251, 0.1931]}, {"w": "=", "b": [0.2562, 0.178, 0.2708, 0.1931]}, {"w": "Pr(f(xk)", "b": [0.276, 0.178, 0.349, 0.1943]}, {"w": "=", "b": [0.3542, 0.178, 0.3689, 0.1931]}, {"w": "1|xk", "b": [0.3741, 0.1779, 0.4076, 0.1943]}, {"w": "∈G2", "b": [0.414, 0.1779, 0.4534, 0.1943]}, {"w": "and", "b": [0.4595, 0.1781, 0.4892, 0.1931]}, {"w": "yk", "b": [0.4944, 0.1781, 0.5113, 0.1943]}, {"w": "=", "b": [0.5177, 0.178, 0.5323, 0.1931]}, {"w": "1),", "b": [0.5375, 0.178, 0.5594, 0.1931]}, {"w": "where", "b": [0.5656, 0.178, 0.6138, 0.1931]}, {"w": "yi", "b": [0.62, 0.1781, 0.6342, 0.1943]}, {"w": "and", "b": [0.6413, 0.178, 0.6717, 0.1931]}, {"w": "yk", "b": [0.6778, 0.1781, 0.6947, 0.1943]}, {"w": "are", "b": [0.7021, 0.178, 0.7273, 0.1931]}, {"w": "the", "b": [0.7335, 0.178, 0.7596, 0.1931]}, {"w": "actual", "b": [0.7658, 0.178, 0.816, 0.1931]}, {"w": "labels", "b": [0.8222, 0.178, 0.8688, 0.1931]}, {"w": "of", "b": [0.1312, 0.1961, 0.1462, 0.211]}, {"w": "the", "b": [0.1523, 0.1961, 0.178, 0.211]}, {"w": "feature", "b": [0.1842, 0.1961, 0.2404, 0.211]}, {"w": "vectors", "b": [0.2465, 0.1961, 0.3033, 0.211]}, {"w": "xi", "b": [0.3093, 0.1961, 0.3257, 0.2123]}, {"w": "and", "b": [0.3328, 0.1961, 0.3626, 0.211]}, {"w": "xk,", "b": [0.3687, 0.1961, 0.3942, 0.2123]}, {"w": "respectively.", "b": [0.4003, 0.1961, 0.4988, 0.211]}, {"w": "The", "b": [0.507, 0.1961, 0.5389, 0.211]}, {"w": "above", "b": [0.5451, 0.1961, 0.5914, 0.211]}, {"w": "equality", "b": [0.5975, 0.1961, 0.6619, 0.211]}, {"w": "means", "b": [0.668, 0.1961, 0.7186, 0.211]}, {"w": "that,", "b": [0.7247, 0.1961, 0.7638, 0.211]}, {"w": "as", "b": [0.77, 0.1961, 0.7865, 0.211]}, {"w": "measured", "b": [0.7927, 0.1961, 0.869, 0.211]}, {"w": "on", "b": [0.1312, 0.2139, 0.1511, 0.229]}, {"w": "the", "b": [0.1579, 0.2139, 0.1841, 0.229]}, {"w": "test", "b": [0.1908, 0.2139, 0.2213, 0.229]}, {"w": "data,", "b": [0.2281, 0.2139, 0.2699, 0.229]}, {"w": "the", "b": [0.2769, 0.2139, 0.303, 0.229]}, {"w": "chance", "b": [0.3098, 0.2139, 0.3648, 0.229]}, {"w": "to", "b": [0.3716, 0.2139, 0.3883, 0.229]}, {"w": "predict", "b": [0.3951, 0.2139, 0.4527, 0.229]}, {"w": "1", "b": [0.4593, 0.2139, 0.4687, 0.229]}, {"w": "by", "b": [0.4755, 0.2139, 0.4954, 0.229]}, {"w": "the", "b": [0.5022, 0.2139, 0.5283, 0.229]}, {"w": "model", "b": [0.5351, 0.2139, 0.5848, 0.229]}, {"w": "f", "b": [0.5915, 0.214, 0.6006, 0.229]}, {"w": "for", "b": [0.6094, 0.2139, 0.6319, 0.229]}, {"w": "women", "b": [0.6387, 0.2139, 0.6957, 0.229]}, {"w": "who", "b": [0.7025, 0.2139, 0.736, 0.229]}, {"w": "qualify", "b": [0.7427, 0.2139, 0.7987, 0.229]}, {"w": "for", "b": [0.8055, 0.2139, 0.828, 0.229]}, {"w": "that", "b": [0.8348, 0.2139, 0.8693, 0.229]}, {"w": "prediction", "b": [0.1312, 0.2319, 0.2132, 0.2469]}, {"w": "is", "b": [0.2194, 0.2319, 0.2319, 0.2469]}, {"w": "the", "b": [0.2381, 0.2319, 0.264, 0.2469]}, {"w": "same", "b": [0.2702, 0.2319, 0.3107, 0.2469]}, {"w": "as", "b": [0.3169, 0.2319, 0.3336, 0.2469]}, {"w": "the", "b": [0.3397, 0.2319, 0.3656, 0.2469]}, {"w": "chance", "b": [0.3718, 0.2319, 0.4262, 0.2469]}, {"w": "to", "b": [0.4324, 0.2319, 0.449, 0.2469]}, {"w": "predict", "b": [0.4551, 0.2319, 0.5122, 0.2469]}, {"w": "1", "b": [0.5182, 0.2319, 0.5275, 0.2469]}, {"w": "for", "b": [0.5337, 0.2319, 0.556, 0.2469]}, {"w": "men", "b": [0.5622, 0.2319, 0.5964, 0.2469]}, {"w": "who", "b": [0.6025, 0.2319, 0.6357, 0.2469]}, {"w": "also", "b": [0.6419, 0.2319, 0.6731, 0.2469]}, {"w": "qualify.", "b": [0.6792, 0.2319, 0.7383, 0.2469]}, {"w": "In", "b": [0.7466, 0.2319, 0.7637, 0.2469]}, {"w": "the", "b": [0.7698, 0.2319, 0.7958, 0.2469]}, {"w": "terms", "b": [0.8019, 0.2319, 0.8477, 0.2469]}, {"w": "of", "b": [0.8539, 0.2319, 0.8689, 0.2469]}, {"w": "the", "b": [0.1312, 0.2498, 0.1574, 0.2649]}, {"w": "confusion", "b": [0.1644, 0.2499, 0.2512, 0.2649]}, {"w": "matrix,", "b": [0.2592, 0.2498, 0.3266, 0.2649]}, {"w": "equal", "b": [0.3338, 0.2498, 0.3773, 0.2649]}, {"w": "opportunity", "b": [0.3843, 0.2498, 0.4821, 0.2649]}, {"w": "requires", "b": [0.4892, 0.2498, 0.5537, 0.2649]}, {"w": "the", "b": [0.5607, 0.2498, 0.5869, 0.2649]}, {"w": "true", "b": [0.5937, 0.2499, 0.6322, 0.2649]}, {"w": "positive", "b": [0.6403, 0.2499, 0.7121, 0.2649]}, {"w": "rate", "b": [0.7201, 0.2499, 0.7572, 0.2649]}, {"w": "(TPR)", "b": [0.7641, 0.2498, 0.8187, 0.2649]}, {"w": "to", "b": [0.8257, 0.2498, 0.8424, 0.2649]}, {"w": "be", "b": [0.8494, 0.2498, 0.8688, 0.2649]}, {"w": "equal", "b": [0.1312, 0.2679, 0.1738, 0.2828]}, {"w": "for", "b": [0.1799, 0.2679, 0.202, 0.2828]}, {"w": "each", "b": [0.2082, 0.2679, 0.2436, 0.2828]}, {"w": "value", "b": [0.2497, 0.2679, 0.2913, 0.2828]}, {"w": "of", "b": [0.2974, 0.2679, 0.3123, 0.2828]}, {"w": "the", "b": [0.3184, 0.2679, 0.3441, 0.2828]}, {"w": "protected", "b": [0.3502, 0.2679, 0.4262, 0.2828]}, {"w": "attribute.", "b": [0.4323, 0.2679, 0.5093, 0.2828]}]}, {"id": "b_3", "type": "paragraph", "text": "7.7 Summary", "words": [{"w": "7.7", "b": [0.1312, 0.3164, 0.1631, 0.3343]}, {"w": "Summary", "b": [0.188, 0.3164, 0.2927, 0.3343]}]}, {"id": "b_4", "type": "paragraph", "text": "All statistical models running in production must be carefully and continuously evaluated.", "words": [{"w": "All", "b": [0.1305, 0.3553, 0.1546, 0.3702]}, {"w": "statistical", "b": [0.1608, 0.3553, 0.2389, 0.3702]}, {"w": "models", "b": [0.2451, 0.3553, 0.3011, 0.3702]}, {"w": "running", "b": [0.3072, 0.3553, 0.3698, 0.3702]}, {"w": "in", "b": [0.376, 0.3553, 0.3914, 0.3702]}, {"w": "production", "b": [0.3975, 0.3553, 0.4852, 0.3702]}, {"w": "must", "b": [0.4914, 0.3553, 0.531, 0.3702]}, {"w": "be", "b": [0.5371, 0.3553, 0.5561, 0.3702]}, {"w": "carefully", "b": [0.5622, 0.3553, 0.631, 0.3702]}, {"w": "and", "b": [0.6372, 0.3553, 0.6669, 0.3702]}, {"w": "continuously", "b": [0.6731, 0.3553, 0.7742, 0.3702]}, {"w": "evaluated.", "b": [0.7803, 0.3553, 0.8619, 0.3702]}]}, {"id": "b_5", "type": "paragraph", "text": "Depending on the model’s applicative domain and the organization’s goals and constraints, model evaluation will include the following tasks:", "words": [{"w": "Depending", "b": [0.1312, 0.3822, 0.2181, 0.3972]}, {"w": "on", "b": [0.2242, 0.3822, 0.2438, 0.3972]}, {"w": "the", "b": [0.2499, 0.3822, 0.2757, 0.3972]}, {"w": "model’s", "b": [0.2819, 0.3822, 0.3433, 0.3972]}, {"w": "applicative", "b": [0.3494, 0.3822, 0.437, 0.3972]}, {"w": "domain", "b": [0.4432, 0.3822, 0.5029, 0.3972]}, {"w": "and", "b": [0.5091, 0.3822, 0.539, 0.3972]}, {"w": "the", "b": [0.5451, 0.3822, 0.5709, 0.3972]}, {"w": "organization’s", "b": [0.577, 0.3822, 0.6895, 0.3972]}, {"w": "goals", "b": [0.6957, 0.3822, 0.7359, 0.3972]}, {"w": "and", "b": [0.7421, 0.3822, 0.772, 0.3972]}, {"w": "constraints,", "b": [0.7781, 0.3822, 0.8717, 0.3972]}, {"w": "model", "b": [0.1312, 0.4001, 0.1799, 0.4151]}, {"w": "evaluation", "b": [0.1861, 0.4001, 0.2686, 0.4151]}, {"w": "will", "b": [0.2748, 0.4001, 0.3035, 0.4151]}, {"w": "include", "b": [0.3096, 0.4001, 0.3671, 0.4151]}, {"w": "the", "b": [0.3732, 0.4001, 0.3989, 0.4151]}, {"w": "following", "b": [0.405, 0.4001, 0.4768, 0.4151]}, {"w": "tasks:", "b": [0.4829, 0.4001, 0.5288, 0.4151]}]}, {"id": "b_6", "type": "paragraph", "text": "• estimate legal risks of putting the model in production, • understand the main properties of the distribution of the data used to train the model, • evaluate the performance of the model prior to deployment, and • monitor the performance of the deployed model.", "words": [{"w": "•", "b": [0.1538, 0.4271, 0.1681, 0.442]}, {"w": "estimate", "b": [0.1774, 0.4271, 0.2451, 0.442]}, {"w": "legal", "b": [0.2513, 0.4271, 0.2882, 0.442]}, {"w": "risks", "b": [0.2943, 0.4271, 0.331, 0.442]}, {"w": "of", "b": [0.3372, 0.4271, 0.3521, 0.442]}, {"w": "putting", "b": [0.3582, 0.4271, 0.4177, 0.442]}, {"w": "the", "b": [0.4238, 0.4271, 0.4495, 0.442]}, {"w": "model", "b": [0.4556, 0.4271, 0.5043, 0.442]}, {"w": "in", "b": [0.5105, 0.4271, 0.5258, 0.442]}, {"w": "production,", "b": [0.532, 0.4271, 0.6249, 0.442]}, {"w": "•", "b": [0.1538, 0.445, 0.1681, 0.46]}, {"w": "understand", "b": [0.1774, 0.4451, 0.2661, 0.4599]}, {"w": "the", "b": [0.2723, 0.4451, 0.2975, 0.4599]}, {"w": "main", "b": [0.3036, 0.4451, 0.3429, 0.4599]}, {"w": "properties", "b": [0.349, 0.4451, 0.4283, 0.4599]}, {"w": "of", "b": [0.4345, 0.4451, 0.4491, 0.4599]}, {"w": "the", "b": [0.4552, 0.4451, 0.4804, 0.4599]}, {"w": "distribution", "b": [0.4865, 0.4451, 0.5794, 0.4599]}, {"w": "of", "b": [0.5855, 0.4451, 0.6001, 0.4599]}, {"w": "the", "b": [0.6062, 0.4451, 0.6314, 0.4599]}, {"w": "data", "b": [0.6376, 0.4451, 0.6728, 0.4599]}, {"w": "used", "b": [0.679, 0.4451, 0.7143, 0.4599]}, {"w": "to", "b": [0.7205, 0.4451, 0.7366, 0.4599]}, {"w": "train", "b": [0.7427, 0.4451, 0.7811, 0.4599]}, {"w": "the", "b": [0.7872, 0.4451, 0.8124, 0.4599]}, {"w": "model,", "b": [0.8185, 0.4451, 0.8714, 0.4599]}, {"w": "•", "b": [0.1538, 0.463, 0.1681, 0.4779]}, {"w": "evaluate", "b": [0.1774, 0.463, 0.2435, 0.4779]}, {"w": "the", "b": [0.2497, 0.463, 0.2753, 0.4779]}, {"w": "performance", "b": [0.2814, 0.463, 0.381, 0.4779]}, {"w": "of", "b": [0.3872, 0.463, 0.4021, 0.4779]}, {"w": "the", "b": [0.4082, 0.463, 0.4338, 0.4779]}, {"w": "model", "b": [0.44, 0.463, 0.4887, 0.4779]}, {"w": "prior", "b": [0.4948, 0.463, 0.5339, 0.4779]}, {"w": "to", "b": [0.5401, 0.463, 0.5565, 0.4779]}, {"w": "deployment,", "b": [0.5626, 0.463, 0.6605, 0.4779]}, {"w": "and", "b": [0.6667, 0.463, 0.6964, 0.4779]}, {"w": "•", "b": [0.1538, 0.4809, 0.1681, 0.4959]}, {"w": "monitor", "b": [0.1774, 0.4809, 0.241, 0.4959]}, {"w": "the", "b": [0.2471, 0.4809, 0.2728, 0.4959]}, {"w": "performance", "b": [0.2789, 0.4809, 0.3785, 0.4959]}, {"w": "of", "b": [0.3846, 0.4809, 0.3995, 0.4959]}, {"w": "the", "b": [0.4057, 0.4809, 0.4313, 0.4959]}, {"w": "deployed", "b": [0.4375, 0.4809, 0.5077, 0.4959]}, {"w": "model.", "b": [0.5139, 0.4809, 0.5677, 0.4959]}]}, {"id": "b_7", "type": "paragraph", "text": "An offline model evaluation happens after the model was trained. It is based on the historical data. The online model evaluation consists of testing and comparing models in the production environment using online data.", "words": [{"w": "An", "b": [0.1305, 0.5079, 0.1541, 0.5228]}, {"w": "offline", "b": [0.1598, 0.5079, 0.207, 0.5228]}, {"w": "model", "b": [0.2127, 0.5079, 0.2605, 0.5228]}, {"w": "evaluation", "b": [0.2662, 0.5079, 0.347, 0.5228]}, {"w": "happens", "b": [0.3527, 0.5079, 0.4177, 0.5228]}, {"w": "after", "b": [0.4234, 0.5079, 0.4601, 0.5228]}, {"w": "the", "b": [0.4658, 0.5079, 0.4909, 0.5228]}, {"w": "model", "b": [0.4966, 0.5079, 0.5444, 0.5228]}, {"w": "was", "b": [0.55, 0.5079, 0.5788, 0.5228]}, {"w": "trained.", "b": [0.5845, 0.5079, 0.6458, 0.5228]}, {"w": "It", "b": [0.6539, 0.5079, 0.6674, 0.5228]}, {"w": "is", "b": [0.6731, 0.5079, 0.6853, 0.5228]}, {"w": "based", "b": [0.691, 0.5079, 0.7353, 0.5228]}, {"w": "on", "b": [0.741, 0.5079, 0.7601, 0.5228]}, {"w": "the", "b": [0.7658, 0.5079, 0.7909, 0.5228]}, {"w": "historical", "b": [0.7966, 0.5079, 0.8691, 0.5228]}, {"w": "data.", "b": [0.1312, 0.5259, 0.1714, 0.5407]}, {"w": "The", "b": [0.1793, 0.5259, 0.2104, 0.5407]}, {"w": "online", "b": [0.2156, 0.5259, 0.2628, 0.5407]}, {"w": "model", "b": [0.2679, 0.5259, 0.3157, 0.5407]}, {"w": "evaluation", "b": [0.3208, 0.5259, 0.4017, 0.5407]}, {"w": "consists", "b": [0.4068, 0.5259, 0.4674, 0.5407]}, {"w": "of", "b": [0.4726, 0.5259, 0.4871, 0.5407]}, {"w": "testing", "b": [0.4923, 0.5259, 0.5457, 0.5407]}, {"w": "and", "b": [0.5508, 0.5259, 0.5799, 0.5407]}, {"w": "comparing", "b": [0.585, 0.5259, 0.6675, 0.5407]}, {"w": "models", "b": [0.6726, 0.5259, 0.7275, 0.5407]}, {"w": "in", "b": [0.7326, 0.5259, 0.7477, 0.5407]}, {"w": "the", "b": [0.7529, 0.5259, 0.778, 0.5407]}, {"w": "production", "b": [0.7831, 0.5259, 0.8691, 0.5407]}, {"w": "environment", "b": [0.1312, 0.5437, 0.2313, 0.5587]}, {"w": "using", "b": [0.2374, 0.5437, 0.2796, 0.5587]}, {"w": "online", "b": [0.2857, 0.5437, 0.3339, 0.5587]}, {"w": "data.", "b": [0.3401, 0.5437, 0.3811, 0.5587]}]}, {"id": "b_8", "type": "paragraph", "text": "A popular technique of online model evaluation is A/B testing. When performing A/B testing, we split users into two groups, A and B. The two groups are served the old and the new models, respectively. Then we apply a statistical significance test to decide whether the new model is statistically different from the old model.", "words": [{"w": "A", "b": [0.1305, 0.5705, 0.1446, 0.5856]}, {"w": "popular", "b": [0.1524, 0.5705, 0.2157, 0.5856]}, {"w": "technique", "b": [0.2235, 0.5705, 0.302, 0.5856]}, {"w": "of", "b": [0.3098, 0.5705, 0.3249, 0.5856]}, {"w": "online", "b": [0.3327, 0.5705, 0.3819, 0.5856]}, {"w": "model", "b": [0.3896, 0.5705, 0.4393, 0.5856]}, {"w": "evaluation", "b": [0.4471, 0.5705, 0.5313, 0.5856]}, {"w": "is", "b": [0.5391, 0.5705, 0.5517, 0.5856]}, {"w": "A/B", "b": [0.5595, 0.5705, 0.5964, 0.5856]}, {"w": "testing.", "b": [0.6041, 0.5705, 0.6649, 0.5856]}, {"w": "When", "b": [0.678, 0.5705, 0.7266, 0.5856]}, {"w": "performing", "b": [0.7344, 0.5705, 0.8244, 0.5856]}, {"w": "A/B", "b": [0.8322, 0.5705, 0.8691, 0.5856]}, {"w": "testing,", "b": [0.1312, 0.5886, 0.1905, 0.6035]}, {"w": "we", "b": [0.1966, 0.5886, 0.2175, 0.6035]}, {"w": "split", "b": [0.2237, 0.5886, 0.2584, 0.6035]}, {"w": "users", "b": [0.2646, 0.5886, 0.3046, 0.6035]}, {"w": "into", "b": [0.3108, 0.5886, 0.3419, 0.6035]}, {"w": "two", "b": [0.348, 0.5886, 0.3765, 0.6035]}, {"w": "groups,", "b": [0.3827, 0.5886, 0.4409, 0.6035]}, {"w": "A", "b": [0.4471, 0.5886, 0.4609, 0.6035]}, {"w": "and", "b": [0.467, 0.5886, 0.4966, 0.6035]}, {"w": "B.", "b": [0.5027, 0.5886, 0.5208, 0.6035]}, {"w": "The", "b": [0.5269, 0.5886, 0.5585, 0.6035]}, {"w": "two", "b": [0.5647, 0.5886, 0.5932, 0.6035]}, {"w": "groups", "b": [0.5994, 0.5886, 0.6525, 0.6035]}, {"w": "are", "b": [0.6587, 0.5886, 0.6832, 0.6035]}, {"w": "served", "b": [0.6893, 0.5886, 0.7395, 0.6035]}, {"w": "the", "b": [0.7456, 0.5886, 0.7711, 0.6035]}, {"w": "old", "b": [0.7773, 0.5886, 0.8017, 0.6035]}, {"w": "and", "b": [0.8079, 0.5886, 0.8375, 0.6035]}, {"w": "the", "b": [0.8436, 0.5886, 0.8691, 0.6035]}, {"w": "new", "b": [0.1312, 0.6066, 0.1626, 0.6215]}, {"w": "models,", "b": [0.1688, 0.6066, 0.2291, 0.6215]}, {"w": "respectively.", "b": [0.2353, 0.6066, 0.3321, 0.6215]}, {"w": "Then", "b": [0.3404, 0.6066, 0.3819, 0.6215]}, {"w": "we", "b": [0.388, 0.6066, 0.4088, 0.6215]}, {"w": "apply", "b": [0.4149, 0.6066, 0.459, 0.6215]}, {"w": "a", "b": [0.4651, 0.6066, 0.4742, 0.6215]}, {"w": "statistical", "b": [0.4804, 0.6066, 0.5576, 0.6215]}, {"w": "significance", "b": [0.5637, 0.6066, 0.6539, 0.6215]}, {"w": "test", "b": [0.6601, 0.6066, 0.6896, 0.6215]}, {"w": "to", "b": [0.6957, 0.6066, 0.7119, 0.6215]}, {"w": "decide", "b": [0.7181, 0.6066, 0.7677, 0.6215]}, {"w": "whether", "b": [0.7739, 0.6066, 0.8377, 0.6215]}, {"w": "the", "b": [0.8439, 0.6066, 0.8692, 0.6215]}, {"w": "new", "b": [0.1312, 0.6245, 0.163, 0.6394]}, {"w": "model", "b": [0.1692, 0.6245, 0.2179, 0.6394]}, {"w": "is", "b": [0.224, 0.6245, 0.2364, 0.6394]}, {"w": "statistically", "b": [0.2426, 0.6245, 0.3356, 0.6394]}, {"w": "different", "b": [0.3418, 0.6245, 0.4085, 0.6394]}, {"w": "from", "b": [0.4146, 0.6245, 0.4521, 0.6394]}, {"w": "the", "b": [0.4582, 0.6245, 0.4839, 0.6394]}, {"w": "old", "b": [0.49, 0.6245, 0.5146, 0.6394]}, {"w": "model.", "b": [0.5208, 0.6245, 0.5746, 0.6394]}]}, {"id": "b_9", "type": "paragraph", "text": "Multi-armed bandit is another popular technique of online model evaluation. We start by randomly exposing all models to the users. Then we gradually reduce the exposure of the least- performing models until only one, the best performing model, gets served most of the time.", "words": [{"w": "Multi-armed", "b": [0.1312, 0.6513, 0.2343, 0.6664]}, {"w": "bandit", "b": [0.2405, 0.6513, 0.2938, 0.6664]}, {"w": "is", "b": [0.3, 0.6513, 0.3127, 0.6664]}, {"w": "another", "b": [0.3189, 0.6513, 0.3817, 0.6664]}, {"w": "popular", "b": [0.3879, 0.6513, 0.4512, 0.6664]}, {"w": "technique", "b": [0.4574, 0.6513, 0.5359, 0.6664]}, {"w": "of", "b": [0.5421, 0.6513, 0.5573, 0.6664]}, {"w": "online", "b": [0.5635, 0.6513, 0.6126, 0.6664]}, {"w": "model", "b": [0.6188, 0.6513, 0.6685, 0.6664]}, {"w": "evaluation.", "b": [0.6747, 0.6513, 0.7641, 0.6664]}, {"w": "We", "b": [0.7725, 0.6513, 0.7987, 0.6664]}, {"w": "start", "b": [0.8049, 0.6513, 0.8437, 0.6664]}, {"w": "by", "b": [0.8499, 0.6513, 0.8698, 0.6664]}, {"w": "randomly", "b": [0.1312, 0.6695, 0.2061, 0.6843]}, {"w": "exposing", "b": [0.2109, 0.6695, 0.2793, 0.6843]}, {"w": "all", "b": [0.2841, 0.6695, 0.3032, 0.6843]}, {"w": "models", "b": [0.3079, 0.6695, 0.3628, 0.6843]}, {"w": "to", "b": [0.3676, 0.6695, 0.3837, 0.6843]}, {"w": "the", "b": [0.3884, 0.6695, 0.4135, 0.6843]}, {"w": "users.", "b": [0.4183, 0.6695, 0.4628, 0.6843]}, {"w": "Then", "b": [0.4705, 0.6695, 0.5117, 0.6843]}, {"w": "we", "b": [0.5165, 0.6695, 0.537, 0.6843]}, {"w": "gradually", "b": [0.5418, 0.6695, 0.6157, 0.6843]}, {"w": "reduce", "b": [0.6205, 0.6695, 0.6718, 0.6843]}, {"w": "the", "b": [0.6766, 0.6695, 0.7017, 0.6843]}, {"w": "exposure", "b": [0.7064, 0.6695, 0.776, 0.6843]}, {"w": "of", "b": [0.7807, 0.6695, 0.7953, 0.6843]}, {"w": "the", "b": [0.8, 0.6695, 0.8252, 0.6843]}, {"w": "least-", "b": [0.8299, 0.6695, 0.8722, 0.6843]}, {"w": "performing", "b": [0.1312, 0.6873, 0.2195, 0.7023]}, {"w": "models", "b": [0.2257, 0.6873, 0.2817, 0.7023]}, {"w": "until", "b": [0.2878, 0.6873, 0.3252, 0.7023]}, {"w": "only", "b": [0.3314, 0.6873, 0.3657, 0.7023]}, {"w": "one,", "b": [0.3719, 0.6873, 0.4047, 0.7023]}, {"w": "the", "b": [0.4109, 0.6873, 0.4365, 0.7023]}, {"w": "best", "b": [0.4427, 0.6873, 0.4761, 0.7023]}, {"w": "performing", "b": [0.4822, 0.6873, 0.5705, 0.7023]}, {"w": "model,", "b": [0.5767, 0.6873, 0.6305, 0.7023]}, {"w": "gets", "b": [0.6367, 0.6873, 0.6686, 0.7023]}, {"w": "served", "b": [0.6747, 0.6873, 0.7251, 0.7023]}, {"w": "most", "b": [0.7313, 0.6873, 0.7703, 0.7023]}, {"w": "of", "b": [0.7765, 0.6873, 0.7914, 0.7023]}, {"w": "the", "b": [0.7975, 0.6873, 0.8232, 0.7023]}, {"w": "time.", "b": [0.8293, 0.6873, 0.8703, 0.7023]}]}, {"id": "b_10", "type": "paragraph", "text": "In addition to reporting training model performance metrics, one may also need to provide the statistical bounds known as the statistical interval.", "words": [{"w": "In", "b": [0.1312, 0.7142, 0.1482, 0.7292]}, {"w": "addition", "b": [0.1544, 0.7142, 0.2213, 0.7292]}, {"w": "to", "b": [0.2274, 0.7142, 0.2439, 0.7292]}, {"w": "reporting", "b": [0.25, 0.7142, 0.3248, 0.7292]}, {"w": "training", "b": [0.3309, 0.7142, 0.3948, 0.7292]}, {"w": "model", "b": [0.401, 0.7142, 0.4499, 0.7292]}, {"w": "performance", "b": [0.456, 0.7142, 0.556, 0.7292]}, {"w": "metrics,", "b": [0.5621, 0.7142, 0.6261, 0.7292]}, {"w": "one", "b": [0.6323, 0.7142, 0.6601, 0.7292]}, {"w": "may", "b": [0.6662, 0.7142, 0.7002, 0.7292]}, {"w": "also", "b": [0.7063, 0.7142, 0.7373, 0.7292]}, {"w": "need", "b": [0.7435, 0.7142, 0.7805, 0.7292]}, {"w": "to", "b": [0.7867, 0.7142, 0.8032, 0.7292]}, {"w": "provide", "b": [0.8093, 0.7142, 0.8691, 0.7292]}, {"w": "the", "b": [0.1312, 0.7322, 0.1569, 0.7471]}, {"w": "statistical", "b": [0.163, 0.7322, 0.2412, 0.7471]}, {"w": "bounds", "b": [0.2473, 0.7322, 0.3054, 0.7471]}, {"w": "known", "b": [0.3115, 0.7322, 0.3638, 0.7471]}, {"w": "as", "b": [0.37, 0.7322, 0.3865, 0.7471]}, {"w": "the", "b": [0.3926, 0.7322, 0.4183, 0.7471]}, {"w": "statistical", "b": [0.4244, 0.7322, 0.5026, 0.7471]}, {"w": "interval.", "b": [0.5087, 0.7322, 0.5744, 0.7471]}]}, {"id": "b_11", "type": "paragraph", "text": "For both classification and regression models, a statistical interval for any metric can be computed using a popular technique called bootstrapping. It is a statistical procedure that consists of building B samples of a dataset, and then training a model and computing some statistic using each of those B samples.", "words": [{"w": "For", "b": [0.1312, 0.759, 0.1588, 0.7741]}, {"w": "both", "b": [0.1658, 0.759, 0.204, 0.7741]}, {"w": "classification", "b": [0.2111, 0.759, 0.3149, 0.7741]}, {"w": "and", "b": [0.3219, 0.759, 0.3523, 0.7741]}, {"w": "regression", "b": [0.3593, 0.759, 0.4402, 0.7741]}, {"w": "models,", "b": [0.4473, 0.759, 0.5096, 0.7741]}, {"w": "a", "b": [0.5169, 0.759, 0.5263, 0.7741]}, {"w": "statistical", "b": [0.5334, 0.759, 0.6131, 0.7741]}, {"w": "interval", "b": [0.6202, 0.759, 0.682, 0.7741]}, {"w": "for", "b": [0.6891, 0.759, 0.7116, 0.7741]}, {"w": "any", "b": [0.7187, 0.759, 0.748, 0.7741]}, {"w": "metric", "b": [0.755, 0.759, 0.8074, 0.7741]}, {"w": "can", "b": [0.8145, 0.759, 0.8427, 0.7741]}, {"w": "be", "b": [0.8498, 0.759, 0.8691, 0.7741]}, {"w": "computed", "b": [0.1312, 0.777, 0.2104, 0.792]}, {"w": "using", "b": [0.2166, 0.777, 0.2589, 0.792]}, {"w": "a", "b": [0.265, 0.777, 0.2743, 0.792]}, {"w": "popular", "b": [0.2804, 0.777, 0.3427, 0.792]}, {"w": "technique", "b": [0.3488, 0.777, 0.426, 0.792]}, {"w": "called", "b": [0.4321, 0.777, 0.4784, 0.792]}, {"w": "bootstrapping.", "b": [0.4846, 0.777, 0.603, 0.792]}, {"w": "It", "b": [0.6112, 0.777, 0.6251, 0.792]}, {"w": "is", "b": [0.6312, 0.777, 0.6437, 0.792]}, {"w": "a", "b": [0.6498, 0.777, 0.6591, 0.792]}, {"w": "statistical", "b": [0.6652, 0.777, 0.7436, 0.792]}, {"w": "procedure", "b": [0.7497, 0.777, 0.8296, 0.792]}, {"w": "that", "b": [0.8357, 0.777, 0.8696, 0.792]}, {"w": "consists", "b": [0.1312, 0.795, 0.1927, 0.8099]}, {"w": "of", "b": [0.1988, 0.795, 0.2136, 0.8099]}, {"w": "building", "b": [0.2197, 0.795, 0.2849, 0.8099]}, {"w": "B", "b": [0.291, 0.795, 0.305, 0.8099]}, {"w": "samples", "b": [0.312, 0.795, 0.3744, 0.8099]}, {"w": "of", "b": [0.3805, 0.795, 0.3953, 0.8099]}, {"w": "a", "b": [0.4015, 0.795, 0.4106, 0.8099]}, {"w": "dataset,", "b": [0.4168, 0.795, 0.48, 0.8099]}, {"w": "and", "b": [0.4862, 0.795, 0.5157, 0.8099]}, {"w": "then", "b": [0.5219, 0.795, 0.5575, 0.8099]}, {"w": "training", "b": [0.5637, 0.795, 0.6268, 0.8099]}, {"w": "a", "b": [0.633, 0.795, 0.6422, 0.8099]}, {"w": "model", "b": [0.6483, 0.795, 0.6967, 0.8099]}, {"w": "and", "b": [0.7028, 0.795, 0.7323, 0.8099]}, {"w": "computing", "b": [0.7385, 0.795, 0.823, 0.8099]}, {"w": "some", "b": [0.8292, 0.795, 0.869, 0.8099]}, {"w": "statistic", "b": [0.1312, 0.8129, 0.195, 0.8279]}, {"w": "using", "b": [0.2012, 0.8129, 0.2433, 0.8279]}, {"w": "each", "b": [0.2495, 0.8129, 0.2849, 0.8279]}, {"w": "of", "b": [0.291, 0.8129, 0.3059, 0.8279]}, {"w": "those", "b": [0.312, 0.8129, 0.3542, 0.8279]}, {"w": "B", "b": [0.3602, 0.8129, 0.3742, 0.8279]}, {"w": "samples.", "b": [0.3813, 0.8129, 0.4492, 0.8279]}]}, {"id": "b_12", "type": "paragraph", "text": "The test examples used to evaluate the model must allow the discovery of defective behavior before the model reaches production. Such techniques as neuron coverage and mutation", "words": [{"w": "The", "b": [0.1306, 0.8399, 0.1618, 0.8548]}, {"w": "test", "b": [0.168, 0.8399, 0.1974, 0.8548]}, {"w": "examples", "b": [0.2036, 0.8399, 0.2758, 0.8548]}, {"w": "used", "b": [0.282, 0.8399, 0.3174, 0.8548]}, {"w": "to", "b": [0.3236, 0.8399, 0.3397, 0.8548]}, {"w": "evaluate", "b": [0.3459, 0.8399, 0.411, 0.8548]}, {"w": "the", "b": [0.4172, 0.8399, 0.4424, 0.8548]}, {"w": "model", "b": [0.4486, 0.8399, 0.4965, 0.8548]}, {"w": "must", "b": [0.5027, 0.8399, 0.5416, 0.8548]}, {"w": "allow", "b": [0.5478, 0.8399, 0.5886, 0.8548]}, {"w": "the", "b": [0.5948, 0.8399, 0.6201, 0.8548]}, {"w": "discovery", "b": [0.6262, 0.8399, 0.699, 0.8548]}, {"w": "of", "b": [0.7052, 0.8399, 0.7198, 0.8548]}, {"w": "defective", "b": [0.726, 0.8399, 0.7952, 0.8548]}, {"w": "behavior", "b": [0.8013, 0.8399, 0.8695, 0.8548]}, {"w": "before", "b": [0.1312, 0.8577, 0.1815, 0.8728]}, {"w": "the", "b": [0.1888, 0.8577, 0.215, 0.8728]}, {"w": "model", "b": [0.2222, 0.8577, 0.2719, 0.8728]}, {"w": "reaches", "b": [0.2792, 0.8577, 0.3385, 0.8728]}, {"w": "production.", "b": [0.3458, 0.8577, 0.4405, 0.8728]}, {"w": "Such", "b": [0.4521, 0.8577, 0.4914, 0.8728]}, {"w": "techniques", "b": [0.4987, 0.8577, 0.5846, 0.8728]}, {"w": "as", "b": [0.5919, 0.8577, 0.6087, 0.8728]}, {"w": "neuron", "b": [0.616, 0.8577, 0.6725, 0.8728]}, {"w": "coverage", "b": [0.6798, 0.8577, 0.7495, 0.8728]}, {"w": "and", "b": [0.7568, 0.8577, 0.7871, 0.8728]}, {"w": "mutation", "b": [0.7944, 0.8577, 0.8692, 0.8728]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 21", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "21", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 239, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "testing can be used to evaluate the test set.", "words": [{"w": "testing", "b": [0.1312, 0.0884, 0.1857, 0.1033]}, {"w": "can", "b": [0.1918, 0.0884, 0.2195, 0.1033]}, {"w": "be", "b": [0.2257, 0.0884, 0.2447, 0.1033]}, {"w": "used", "b": [0.2508, 0.0884, 0.2868, 0.1033]}, {"w": "to", "b": [0.293, 0.0884, 0.3094, 0.1033]}, {"w": "evaluate", "b": [0.3155, 0.0884, 0.3817, 0.1033]}, {"w": "the", "b": [0.3878, 0.0884, 0.4135, 0.1033]}, {"w": "test", "b": [0.4196, 0.0884, 0.4495, 0.1033]}, {"w": "set.", "b": [0.4556, 0.0884, 0.4834, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "When the model is used in a mission-critical system, or in regulated domains (such as credit,", "words": [{"w": "When", "b": [0.1303, 0.1154, 0.1772, 0.1302]}, {"w": "the", "b": [0.1833, 0.1154, 0.2085, 0.1302]}, {"w": "model", "b": [0.2147, 0.1154, 0.2625, 0.1302]}, {"w": "is", "b": [0.2687, 0.1154, 0.2809, 0.1302]}, {"w": "used", "b": [0.287, 0.1154, 0.3224, 0.1302]}, {"w": "in", "b": [0.3286, 0.1154, 0.3437, 0.1302]}, {"w": "a", "b": [0.3498, 0.1154, 0.3589, 0.1302]}, {"w": "mission-critical", "b": [0.365, 0.1154, 0.4842, 0.1302]}, {"w": "system,", "b": [0.4904, 0.1154, 0.5495, 0.1302]}, {"w": "or", "b": [0.5557, 0.1154, 0.5719, 0.1302]}, {"w": "in", "b": [0.578, 0.1154, 0.5931, 0.1302]}, {"w": "regulated", "b": [0.5992, 0.1154, 0.6729, 0.1302]}, {"w": "domains", "b": [0.679, 0.1154, 0.7447, 0.1302]}, {"w": "(such", "b": [0.7508, 0.1154, 0.7927, 0.1302]}, {"w": "as", "b": [0.7989, 0.1154, 0.8151, 0.1302]}, {"w": "credit,", "b": [0.8212, 0.1154, 0.8717, 0.1302]}]}, {"id": "b_2", "type": "paragraph", "text": "education, employment, housing, and public accommodation) accuracy, robustness, and fairness may have to be evaluated.", "words": [{"w": "education,", "b": [0.1312, 0.1331, 0.216, 0.1482]}, {"w": "employment,", "b": [0.2244, 0.1331, 0.3295, 0.1482]}, {"w": "housing,", "b": [0.3379, 0.1331, 0.406, 0.1482]}, {"w": "and", "b": [0.4144, 0.1331, 0.4447, 0.1482]}, {"w": "public", "b": [0.4526, 0.1331, 0.5029, 0.1482]}, {"w": "accommodation)", "b": [0.5108, 0.1331, 0.6472, 0.1482]}, {"w": "accuracy,", "b": [0.6552, 0.1331, 0.7306, 0.1482]}, {"w": "robustness,", "b": [0.739, 0.1331, 0.8304, 0.1482]}, {"w": "and", "b": [0.8388, 0.1331, 0.8691, 0.1482]}, {"w": "fairness", "b": [0.1312, 0.1512, 0.1915, 0.1662]}, {"w": "may", "b": [0.1977, 0.1512, 0.2315, 0.1662]}, {"w": "have", "b": [0.2376, 0.1512, 0.274, 0.1662]}, {"w": "to", "b": [0.2802, 0.1512, 0.2966, 0.1662]}, {"w": "be", "b": [0.3027, 0.1512, 0.3217, 0.1662]}, {"w": "evaluated.", "b": [0.3279, 0.1512, 0.4094, 0.1662]}]}, {"id": "b_3", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 22", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "22", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 240, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 241, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 242, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "8 Model Deployment", "words": [{"w": "8", "b": [0.1312, 0.0833, 0.1462, 0.1048]}, {"w": "Model", "b": [0.1761, 0.0833, 0.2588, 0.1048]}, {"w": "Deployment", "b": [0.2687, 0.0833, 0.426, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "Once the model has been built and thoroughly tested, it can be deployed. Deploying a model means to make it available for accepting queries generated by the users of the production system. Once the production system accepts the query, the latter is transformed into a feature vector. The feature vector is then sent to the model as input for scoring. The result of the scoring then is returned to the user.", "words": [{"w": "Once", "b": [0.1312, 0.1302, 0.1714, 0.145]}, {"w": "the", "b": [0.1773, 0.1302, 0.2024, 0.145]}, {"w": "model", "b": [0.2082, 0.1302, 0.256, 0.145]}, {"w": "has", "b": [0.2618, 0.1302, 0.288, 0.145]}, {"w": "been", "b": [0.2938, 0.1302, 0.3305, 0.145]}, {"w": "built", "b": [0.3364, 0.1302, 0.3735, 0.145]}, {"w": "and", "b": [0.3793, 0.1302, 0.4085, 0.145]}, {"w": "thoroughly", "b": [0.4143, 0.1302, 0.5003, 0.145]}, {"w": "tested,", "b": [0.5061, 0.1302, 0.5585, 0.145]}, {"w": "it", "b": [0.5644, 0.1302, 0.5764, 0.145]}, {"w": "can", "b": [0.5822, 0.1302, 0.6094, 0.145]}, {"w": "be", "b": [0.6152, 0.1302, 0.6338, 0.145]}, {"w": "deployed.", "b": [0.6396, 0.1302, 0.7135, 0.145]}, {"w": "Deploying", "b": [0.7216, 0.1302, 0.8007, 0.145]}, {"w": "a", "b": [0.8065, 0.1302, 0.8156, 0.145]}, {"w": "model", "b": [0.8214, 0.1302, 0.8691, 0.145]}, {"w": "means", "b": [0.1312, 0.148, 0.1826, 0.1631]}, {"w": "to", "b": [0.1889, 0.148, 0.2056, 0.1631]}, {"w": "make", "b": [0.212, 0.148, 0.2549, 0.1631]}, {"w": "it", "b": [0.2612, 0.148, 0.2737, 0.1631]}, {"w": "available", "b": [0.2801, 0.148, 0.3512, 0.1631]}, {"w": "for", "b": [0.3576, 0.148, 0.3801, 0.1631]}, {"w": "accepting", "b": [0.3864, 0.148, 0.4638, 0.1631]}, {"w": "queries", "b": [0.4702, 0.148, 0.5274, 0.1631]}, {"w": "generated", "b": [0.5337, 0.148, 0.6132, 0.1631]}, {"w": "by", "b": [0.6196, 0.148, 0.6395, 0.1631]}, {"w": "the", "b": [0.6458, 0.148, 0.6719, 0.1631]}, {"w": "users", "b": [0.6783, 0.148, 0.7194, 0.1631]}, {"w": "of", "b": [0.7257, 0.148, 0.7409, 0.1631]}, {"w": "the", "b": [0.7472, 0.148, 0.7733, 0.1631]}, {"w": "production", "b": [0.7797, 0.148, 0.8692, 0.1631]}, {"w": "system.", "b": [0.1312, 0.1659, 0.1926, 0.181]}, {"w": "Once", "b": [0.205, 0.1659, 0.2468, 0.181]}, {"w": "the", "b": [0.2543, 0.1659, 0.2805, 0.181]}, {"w": "production", "b": [0.288, 0.1659, 0.3775, 0.181]}, {"w": "system", "b": [0.385, 0.1659, 0.4412, 0.181]}, {"w": "accepts", "b": [0.4487, 0.1659, 0.5084, 0.181]}, {"w": "the", "b": [0.516, 0.1659, 0.5421, 0.181]}, {"w": "query,", "b": [0.5497, 0.1659, 0.5994, 0.181]}, {"w": "the", "b": [0.6073, 0.1659, 0.6335, 0.181]}, {"w": "latter", "b": [0.641, 0.1659, 0.686, 0.181]}, {"w": "is", "b": [0.6935, 0.1659, 0.7062, 0.181]}, {"w": "transformed", "b": [0.7137, 0.1659, 0.8128, 0.181]}, {"w": "into", "b": [0.8203, 0.1659, 0.8522, 0.181]}, {"w": "a", "b": [0.8597, 0.1659, 0.8691, 0.181]}, {"w": "feature", "b": [0.1312, 0.184, 0.1869, 0.1989]}, {"w": "vector.", "b": [0.193, 0.184, 0.2472, 0.1989]}, {"w": "The", "b": [0.2554, 0.184, 0.287, 0.1989]}, {"w": "feature", "b": [0.2931, 0.184, 0.3488, 0.1989]}, {"w": "vector", "b": [0.355, 0.184, 0.404, 0.1989]}, {"w": "is", "b": [0.4101, 0.184, 0.4225, 0.1989]}, {"w": "then", "b": [0.4286, 0.184, 0.4643, 0.1989]}, {"w": "sent", "b": [0.4705, 0.184, 0.5027, 0.1989]}, {"w": "to", "b": [0.5089, 0.184, 0.5252, 0.1989]}, {"w": "the", "b": [0.5313, 0.184, 0.5568, 0.1989]}, {"w": "model", "b": [0.563, 0.184, 0.6114, 0.1989]}, {"w": "as", "b": [0.6176, 0.184, 0.634, 0.1989]}, {"w": "input", "b": [0.6401, 0.184, 0.683, 0.1989]}, {"w": "for", "b": [0.6891, 0.184, 0.7111, 0.1989]}, {"w": "scoring.", "b": [0.7172, 0.184, 0.7786, 0.1989]}, {"w": "The", "b": [0.7868, 0.184, 0.8185, 0.1989]}, {"w": "result", "b": [0.8246, 0.184, 0.8697, 0.1989]}, {"w": "of", "b": [0.1312, 0.2019, 0.1461, 0.2169]}, {"w": "the", "b": [0.1522, 0.2019, 0.1779, 0.2169]}, {"w": "scoring", "b": [0.1841, 0.2019, 0.2406, 0.2169]}, {"w": "then", "b": [0.2468, 0.2019, 0.2827, 0.2169]}, {"w": "is", "b": [0.2888, 0.2019, 0.3012, 0.2169]}, {"w": "returned", "b": [0.3074, 0.2019, 0.3762, 0.2169]}, {"w": "to", "b": [0.3823, 0.2019, 0.3987, 0.2169]}, {"w": "the", "b": [0.4049, 0.2019, 0.4305, 0.2169]}, {"w": "user.", "b": [0.4367, 0.2019, 0.4748, 0.2169]}]}, {"id": "b_2", "type": "paragraph", "text": "Model deployment is the sixth stage in the machine learning project life cycle:", "words": [{"w": "Model", "b": [0.1312, 0.2288, 0.1815, 0.2438]}, {"w": "deployment", "b": [0.1876, 0.2288, 0.2804, 0.2438]}, {"w": "is", "b": [0.2866, 0.2288, 0.299, 0.2438]}, {"w": "the", "b": [0.3052, 0.2288, 0.3308, 0.2438]}, {"w": "sixth", "b": [0.3369, 0.2288, 0.3765, 0.2438]}, {"w": "stage", "b": [0.3827, 0.2288, 0.4238, 0.2438]}, {"w": "in", "b": [0.4299, 0.2288, 0.4453, 0.2438]}, {"w": "the", "b": [0.4515, 0.2288, 0.4771, 0.2438]}, {"w": "machine", "b": [0.4833, 0.2288, 0.5494, 0.2438]}, {"w": "learning", "b": [0.5556, 0.2288, 0.6202, 0.2438]}, {"w": "project", "b": [0.6264, 0.2288, 0.6828, 0.2438]}, {"w": "life", "b": [0.689, 0.2288, 0.7131, 0.2438]}, {"w": "cycle:", "b": [0.7193, 0.2288, 0.7639, 0.2438]}]}, {"id": "b_3", "type": "paragraph", "text": "Figure 1: Machine learning project life cycle.", "words": [{"w": "Figure", "b": [0.3186, 0.5473, 0.3707, 0.5622]}, {"w": "1:", "b": [0.3769, 0.5473, 0.3912, 0.5622]}, {"w": "Machine", "b": [0.3994, 0.5473, 0.4671, 0.5622]}, {"w": "learning", "b": [0.4733, 0.5473, 0.5379, 0.5622]}, {"w": "project", "b": [0.5441, 0.5473, 0.6006, 0.5622]}, {"w": "life", "b": [0.6067, 0.5473, 0.6308, 0.5622]}, {"w": "cycle.", "b": [0.637, 0.5473, 0.6816, 0.5622]}]}, {"id": "b_4", "type": "paragraph", "text": "A trained model can be deployed in various ways. It can be deployed on a server, or on a user’s device. It can be deployed for all users at once, or to a small fraction of users. Below, we consider all the options.", "words": [{"w": "A", "b": [0.1305, 0.5974, 0.1446, 0.6125]}, {"w": "trained", "b": [0.151, 0.5974, 0.2096, 0.6125]}, {"w": "model", "b": [0.2159, 0.5974, 0.2656, 0.6125]}, {"w": "can", "b": [0.2719, 0.5974, 0.3001, 0.6125]}, {"w": "be", "b": [0.3064, 0.5974, 0.3258, 0.6125]}, {"w": "deployed", "b": [0.3321, 0.5974, 0.4038, 0.6125]}, {"w": "in", "b": [0.4101, 0.5974, 0.4258, 0.6125]}, {"w": "various", "b": [0.4321, 0.5974, 0.4903, 0.6125]}, {"w": "ways.", "b": [0.4967, 0.5974, 0.5412, 0.6125]}, {"w": "It", "b": [0.5499, 0.5974, 0.564, 0.6125]}, {"w": "can", "b": [0.5704, 0.5974, 0.5986, 0.6125]}, {"w": "be", "b": [0.6049, 0.5974, 0.6242, 0.6125]}, {"w": "deployed", "b": [0.6306, 0.5974, 0.7023, 0.6125]}, {"w": "on", "b": [0.7086, 0.5974, 0.7284, 0.6125]}, {"w": "a", "b": [0.7347, 0.5974, 0.7442, 0.6125]}, {"w": "server,", "b": [0.7505, 0.5974, 0.8041, 0.6125]}, {"w": "or", "b": [0.8104, 0.5974, 0.8272, 0.6125]}, {"w": "on", "b": [0.8335, 0.5974, 0.8534, 0.6125]}, {"w": "a", "b": [0.8597, 0.5974, 0.8691, 0.6125]}, {"w": "user’s", "b": [0.1312, 0.6155, 0.1763, 0.6304]}, {"w": "device.", "b": [0.1824, 0.6155, 0.2369, 0.6304]}, {"w": "It", "b": [0.2451, 0.6155, 0.2588, 0.6304]}, {"w": "can", "b": [0.265, 0.6155, 0.2925, 0.6304]}, {"w": "be", "b": [0.2986, 0.6155, 0.3175, 0.6304]}, {"w": "deployed", "b": [0.3236, 0.6155, 0.3933, 0.6304]}, {"w": "for", "b": [0.3995, 0.6155, 0.4214, 0.6304]}, {"w": "all", "b": [0.4276, 0.6155, 0.4469, 0.6304]}, {"w": "users", "b": [0.453, 0.6155, 0.493, 0.6304]}, {"w": "at", "b": [0.4992, 0.6155, 0.5154, 0.6304]}, {"w": "once,", "b": [0.5216, 0.6155, 0.5623, 0.6304]}, {"w": "or", "b": [0.5684, 0.6155, 0.5848, 0.6304]}, {"w": "to", "b": [0.5909, 0.6155, 0.6072, 0.6304]}, {"w": "a", "b": [0.6134, 0.6155, 0.6225, 0.6304]}, {"w": "small", "b": [0.6287, 0.6155, 0.6705, 0.6304]}, {"w": "fraction", "b": [0.6766, 0.6155, 0.7382, 0.6304]}, {"w": "of", "b": [0.7444, 0.6155, 0.7591, 0.6304]}, {"w": "users.", "b": [0.7653, 0.6155, 0.8103, 0.6304]}, {"w": "Below,", "b": [0.8186, 0.6155, 0.8717, 0.6304]}, {"w": "we", "b": [0.1306, 0.6334, 0.1516, 0.6484]}, {"w": "consider", "b": [0.1577, 0.6334, 0.2235, 0.6484]}, {"w": "all", "b": [0.2297, 0.6334, 0.2492, 0.6484]}, {"w": "the", "b": [0.2553, 0.6334, 0.281, 0.6484]}, {"w": "options.", "b": [0.2871, 0.6334, 0.3508, 0.6484]}]}, {"id": "b_5", "type": "paragraph", "text": "A model can be deployed following several patterns:", "words": [{"w": "A", "b": [0.1305, 0.6603, 0.1444, 0.6753]}, {"w": "model", "b": [0.1505, 0.6603, 0.1992, 0.6753]}, {"w": "can", "b": [0.2054, 0.6603, 0.2331, 0.6753]}, {"w": "be", "b": [0.2392, 0.6603, 0.2582, 0.6753]}, {"w": "deployed", "b": [0.2643, 0.6603, 0.3346, 0.6753]}, {"w": "following", "b": [0.3407, 0.6603, 0.4125, 0.6753]}, {"w": "several", "b": [0.4187, 0.6603, 0.4732, 0.6753]}, {"w": "patterns:", "b": [0.4793, 0.6603, 0.5616, 0.6753]}]}, {"id": "b_6", "type": "paragraph", "text": "• statically, as a part of an installable software package, • dynamically on the user’s device, • dynamically on a server, or • via model streaming.", "words": [{"w": "•", "b": [0.1538, 0.6873, 0.1681, 0.7022]}, {"w": "statically,", "b": [0.1774, 0.6873, 0.2544, 0.7022]}, {"w": "as", "b": [0.2605, 0.6873, 0.277, 0.7022]}, {"w": "a", "b": [0.2832, 0.6873, 0.2924, 0.7022]}, {"w": "part", "b": [0.2986, 0.6873, 0.3324, 0.7022]}, {"w": "of", "b": [0.3386, 0.6873, 0.3535, 0.7022]}, {"w": "an", "b": [0.3596, 0.6873, 0.3791, 0.7022]}, {"w": "installable", "b": [0.3852, 0.6873, 0.4674, 0.7022]}, {"w": "software", "b": [0.4735, 0.6873, 0.5398, 0.7022]}, {"w": "package,", "b": [0.546, 0.6873, 0.6147, 0.7022]}, {"w": "•", "b": [0.1538, 0.7052, 0.1681, 0.7202]}, {"w": "dynamically", "b": [0.1774, 0.7052, 0.2748, 0.7202]}, {"w": "on", "b": [0.2809, 0.7052, 0.3004, 0.7202]}, {"w": "the", "b": [0.3065, 0.7052, 0.3322, 0.7202]}, {"w": "user’s", "b": [0.3383, 0.7052, 0.3837, 0.7202]}, {"w": "device,", "b": [0.3899, 0.7052, 0.4448, 0.7202]}, {"w": "•", "b": [0.1538, 0.7231, 0.1681, 0.7381]}, {"w": "dynamically", "b": [0.1774, 0.7231, 0.2748, 0.7381]}, {"w": "on", "b": [0.2809, 0.7231, 0.3004, 0.7381]}, {"w": "a", "b": [0.3065, 0.7231, 0.3158, 0.7381]}, {"w": "server,", "b": [0.3219, 0.7231, 0.3745, 0.7381]}, {"w": "or", "b": [0.3806, 0.7231, 0.3971, 0.7381]}, {"w": "•", "b": [0.1538, 0.7411, 0.1681, 0.7561]}, {"w": "via", "b": [0.1774, 0.7411, 0.2015, 0.7561]}, {"w": "model", "b": [0.2076, 0.7411, 0.2563, 0.7561]}, {"w": "streaming.", "b": [0.2624, 0.7411, 0.3467, 0.7561]}]}, {"id": "b_7", "type": "paragraph", "text": "8.1 Static Deployment", "words": [{"w": "8.1", "b": [0.1312, 0.7896, 0.1631, 0.8076]}, {"w": "Static", "b": [0.188, 0.7896, 0.2513, 0.8076]}, {"w": "Deployment", "b": [0.2596, 0.7896, 0.3907, 0.8076]}]}, {"id": "b_8", "type": "paragraph", "text": "The static deployment of a machine learning model is very similar to traditional software deployment: you prepare an installable binary of the entire software. The model is packaged", "words": [{"w": "The", "b": [0.1306, 0.8284, 0.163, 0.8435]}, {"w": "static", "b": [0.1695, 0.8284, 0.2145, 0.8435]}, {"w": "deployment", "b": [0.221, 0.8284, 0.3157, 0.8435]}, {"w": "of", "b": [0.3222, 0.8284, 0.3373, 0.8435]}, {"w": "a", "b": [0.3438, 0.8284, 0.3532, 0.8435]}, {"w": "machine", "b": [0.3597, 0.8284, 0.4271, 0.8435]}, {"w": "learning", "b": [0.4336, 0.8284, 0.4996, 0.8435]}, {"w": "model", "b": [0.506, 0.8284, 0.5557, 0.8435]}, {"w": "is", "b": [0.5621, 0.8284, 0.5748, 0.8435]}, {"w": "very", "b": [0.5813, 0.8284, 0.6164, 0.8435]}, {"w": "similar", "b": [0.6229, 0.8284, 0.6784, 0.8435]}, {"w": "to", "b": [0.6849, 0.8284, 0.7016, 0.8435]}, {"w": "traditional", "b": [0.7081, 0.8284, 0.795, 0.8435]}, {"w": "software", "b": [0.8014, 0.8284, 0.8691, 0.8435]}, {"w": "deployment:", "b": [0.1312, 0.8466, 0.2275, 0.8614]}, {"w": "you", "b": [0.2357, 0.8466, 0.2639, 0.8614]}, {"w": "prepare", "b": [0.2701, 0.8466, 0.3297, 0.8614]}, {"w": "an", "b": [0.3358, 0.8466, 0.355, 0.8614]}, {"w": "installable", "b": [0.3611, 0.8466, 0.4419, 0.8614]}, {"w": "binary", "b": [0.448, 0.8466, 0.499, 0.8614]}, {"w": "of", "b": [0.5051, 0.8466, 0.5198, 0.8614]}, {"w": "the", "b": [0.5259, 0.8466, 0.5511, 0.8614]}, {"w": "entire", "b": [0.5573, 0.8466, 0.6022, 0.8614]}, {"w": "software.", "b": [0.6083, 0.8466, 0.6785, 0.8614]}, {"w": "The", "b": [0.6867, 0.8466, 0.718, 0.8614]}, {"w": "model", "b": [0.7242, 0.8466, 0.772, 0.8614]}, {"w": "is", "b": [0.7782, 0.8466, 0.7904, 0.8614]}, {"w": "packaged", "b": [0.7966, 0.8466, 0.8691, 0.8614]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "3", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 243, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "as a resource available at the runtime. Depending on the operating system and the runtime environment, the objects of both the model and the feature extractor can be packaged as a part of a dynamic-link library (DLL on Windows), Shared Objects (*.so files on Linux), or be serialized and saved in the standard resource location for virtual machine-based systems, such as Java and .Net.", "words": [{"w": "as", "b": [0.1312, 0.0884, 0.1477, 0.1033]}, {"w": "a", "b": [0.1538, 0.0884, 0.163, 0.1033]}, {"w": "resource", "b": [0.1691, 0.0884, 0.2347, 0.1033]}, {"w": "available", "b": [0.2408, 0.0884, 0.3102, 0.1033]}, {"w": "at", "b": [0.3163, 0.0884, 0.3326, 0.1033]}, {"w": "the", "b": [0.3388, 0.0884, 0.3643, 0.1033]}, {"w": "runtime.", "b": [0.3704, 0.0884, 0.4383, 0.1033]}, {"w": "Depending", "b": [0.4465, 0.0884, 0.5325, 0.1033]}, {"w": "on", "b": [0.5386, 0.0884, 0.558, 0.1033]}, {"w": "the", "b": [0.5641, 0.0884, 0.5897, 0.1033]}, {"w": "operating", "b": [0.5958, 0.0884, 0.6719, 0.1033]}, {"w": "system", "b": [0.678, 0.0884, 0.7328, 0.1033]}, {"w": "and", "b": [0.7389, 0.0884, 0.7685, 0.1033]}, {"w": "the", "b": [0.7747, 0.0884, 0.8002, 0.1033]}, {"w": "runtime", "b": [0.8063, 0.0884, 0.8691, 0.1033]}, {"w": "environment,", "b": [0.1312, 0.1063, 0.2365, 0.1213]}, {"w": "the", "b": [0.2426, 0.1063, 0.2683, 0.1213]}, {"w": "objects", "b": [0.2745, 0.1063, 0.3311, 0.1213]}, {"w": "of", "b": [0.3372, 0.1063, 0.3521, 0.1213]}, {"w": "both", "b": [0.3582, 0.1063, 0.3957, 0.1213]}, {"w": "the", "b": [0.4019, 0.1063, 0.4275, 0.1213]}, {"w": "model", "b": [0.4337, 0.1063, 0.4824, 0.1213]}, {"w": "and", "b": [0.4886, 0.1063, 0.5184, 0.1213]}, {"w": "the", "b": [0.5245, 0.1063, 0.5502, 0.1213]}, {"w": "feature", "b": [0.5563, 0.1063, 0.6123, 0.1213]}, {"w": "extractor", "b": [0.6185, 0.1063, 0.692, 0.1213]}, {"w": "can", "b": [0.6981, 0.1063, 0.7259, 0.1213]}, {"w": "be", "b": [0.732, 0.1063, 0.751, 0.1213]}, {"w": "packaged", "b": [0.7572, 0.1063, 0.8311, 0.1213]}, {"w": "as", "b": [0.8372, 0.1063, 0.8537, 0.1213]}, {"w": "a", "b": [0.8599, 0.1063, 0.8691, 0.1213]}, {"w": "part", "b": [0.1312, 0.1242, 0.1654, 0.1393]}, {"w": "of", "b": [0.1715, 0.1242, 0.1865, 0.1393]}, {"w": "a", "b": [0.1926, 0.1242, 0.2019, 0.1393]}, {"w": "dynamic-link", "b": [0.2081, 0.1242, 0.3135, 0.1393]}, {"w": "library", "b": [0.3196, 0.1242, 0.374, 0.1393]}, {"w": "(DLL", "b": [0.3801, 0.1242, 0.4248, 0.1393]}, {"w": "on", "b": [0.4309, 0.1242, 0.4506, 0.1393]}, {"w": "Windows),", "b": [0.4567, 0.1242, 0.5436, 0.1393]}, {"w": "Shared", "b": [0.5498, 0.1242, 0.6056, 0.1393]}, {"w": "Objects", "b": [0.6118, 0.1242, 0.6739, 0.1393]}, {"w": "(*.so", "b": [0.68, 0.1242, 0.7184, 0.1393]}, {"w": "files", "b": [0.7245, 0.1242, 0.7556, 0.1393]}, {"w": "on", "b": [0.7618, 0.1242, 0.7814, 0.1393]}, {"w": "Linux),", "b": [0.7875, 0.1242, 0.8467, 0.1393]}, {"w": "or", "b": [0.8528, 0.1242, 0.8694, 0.1393]}, {"w": "be", "b": [0.1312, 0.1423, 0.1501, 0.1572]}, {"w": "serialized", "b": [0.1563, 0.1423, 0.23, 0.1572]}, {"w": "and", "b": [0.2362, 0.1423, 0.2658, 0.1572]}, {"w": "saved", "b": [0.272, 0.1423, 0.3155, 0.1572]}, {"w": "in", "b": [0.3216, 0.1423, 0.3369, 0.1572]}, {"w": "the", "b": [0.3431, 0.1423, 0.3686, 0.1572]}, {"w": "standard", "b": [0.3748, 0.1423, 0.4454, 0.1572]}, {"w": "resource", "b": [0.4516, 0.1423, 0.5172, 0.1572]}, {"w": "location", "b": [0.5233, 0.1423, 0.5872, 0.1572]}, {"w": "for", "b": [0.5933, 0.1423, 0.6153, 0.1572]}, {"w": "virtual", "b": [0.6215, 0.1423, 0.6752, 0.1572]}, {"w": "machine-based", "b": [0.6813, 0.1423, 0.7984, 0.1572]}, {"w": "systems,", "b": [0.8045, 0.1423, 0.8717, 0.1572]}, {"w": "such", "b": [0.1312, 0.1602, 0.1667, 0.1751]}, {"w": "as", "b": [0.1729, 0.1602, 0.1894, 0.1751]}, {"w": "Java", "b": [0.1955, 0.1602, 0.2317, 0.1751]}, {"w": "and", "b": [0.2378, 0.1602, 0.2676, 0.1751]}, {"w": ".Net.", "b": [0.2737, 0.1602, 0.3132, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "Static deployment has many advantages:", "words": [{"w": "Static", "b": [0.1312, 0.1871, 0.1784, 0.2021]}, {"w": "deployment", "b": [0.1846, 0.1871, 0.2774, 0.2021]}, {"w": "has", "b": [0.2835, 0.1871, 0.3103, 0.2021]}, {"w": "many", "b": [0.3164, 0.1871, 0.3605, 0.2021]}, {"w": "advantages:", "b": [0.3667, 0.1871, 0.4601, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "• the software has direct access to the model, so the execution time is fast for the user, • the user data doesn’t have to be uploaded to the server at the time of prediction; this saves time and preserves privacy, • the model can be called when the user is offline, and • the software vendor doesn’t have to care about keeping the model operational; it becomes the user’s responsibility.", "words": [{"w": "•", "b": [0.1538, 0.214, 0.1681, 0.229]}, {"w": "the", "b": [0.1774, 0.214, 0.203, 0.229]}, {"w": "software", "b": [0.2091, 0.214, 0.2755, 0.229]}, {"w": "has", "b": [0.2816, 0.214, 0.3084, 0.229]}, {"w": "direct", "b": [0.3145, 0.214, 0.3607, 0.229]}, {"w": "access", "b": [0.3669, 0.214, 0.4153, 0.229]}, {"w": "to", "b": [0.4214, 0.214, 0.4378, 0.229]}, {"w": "the", "b": [0.444, 0.214, 0.4696, 0.229]}, {"w": "model,", "b": [0.4758, 0.214, 0.5296, 0.229]}, {"w": "so", "b": [0.5358, 0.214, 0.5523, 0.229]}, {"w": "the", "b": [0.5584, 0.214, 0.5841, 0.229]}, {"w": "execution", "b": [0.5902, 0.214, 0.6666, 0.229]}, {"w": "time", "b": [0.6728, 0.214, 0.7087, 0.229]}, {"w": "is", "b": [0.7148, 0.214, 0.7272, 0.229]}, {"w": "fast", "b": [0.7334, 0.214, 0.7627, 0.229]}, {"w": "for", "b": [0.7689, 0.214, 0.791, 0.229]}, {"w": "the", "b": [0.7971, 0.214, 0.8227, 0.229]}, {"w": "user,", "b": [0.8289, 0.214, 0.867, 0.229]}, {"w": "•", "b": [0.1538, 0.232, 0.1681, 0.2469]}, {"w": "the", "b": [0.1774, 0.232, 0.2029, 0.2469]}, {"w": "user", "b": [0.2091, 0.232, 0.2419, 0.2469]}, {"w": "data", "b": [0.2481, 0.232, 0.2838, 0.2469]}, {"w": "doesn’t", "b": [0.29, 0.232, 0.3478, 0.2469]}, {"w": "have", "b": [0.354, 0.232, 0.3902, 0.2469]}, {"w": "to", "b": [0.3964, 0.232, 0.4127, 0.2469]}, {"w": "be", "b": [0.4189, 0.232, 0.4378, 0.2469]}, {"w": "uploaded", "b": [0.444, 0.232, 0.5165, 0.2469]}, {"w": "to", "b": [0.5227, 0.232, 0.539, 0.2469]}, {"w": "the", "b": [0.5452, 0.232, 0.5707, 0.2469]}, {"w": "server", "b": [0.5769, 0.232, 0.6241, 0.2469]}, {"w": "at", "b": [0.6303, 0.232, 0.6466, 0.2469]}, {"w": "the", "b": [0.6528, 0.232, 0.6783, 0.2469]}, {"w": "time", "b": [0.6845, 0.232, 0.7202, 0.2469]}, {"w": "of", "b": [0.7264, 0.232, 0.7412, 0.2469]}, {"w": "prediction;", "b": [0.7474, 0.232, 0.8332, 0.2469]}, {"w": "this", "b": [0.8394, 0.232, 0.8691, 0.2469]}, {"w": "saves", "b": [0.1774, 0.2499, 0.2181, 0.2649]}, {"w": "time", "b": [0.2242, 0.2499, 0.2601, 0.2649]}, {"w": "and", "b": [0.2663, 0.2499, 0.296, 0.2649]}, {"w": "preserves", "b": [0.3021, 0.2499, 0.3753, 0.2649]}, {"w": "privacy,", "b": [0.3814, 0.2499, 0.4435, 0.2649]}, {"w": "•", "b": [0.1538, 0.2679, 0.1681, 0.2828]}, {"w": "the", "b": [0.1774, 0.2679, 0.203, 0.2828]}, {"w": "model", "b": [0.2091, 0.2679, 0.2579, 0.2828]}, {"w": "can", "b": [0.264, 0.2679, 0.2917, 0.2828]}, {"w": "be", "b": [0.2978, 0.2679, 0.3168, 0.2828]}, {"w": "called", "b": [0.323, 0.2679, 0.3691, 0.2828]}, {"w": "when", "b": [0.3753, 0.2679, 0.4173, 0.2828]}, {"w": "the", "b": [0.4235, 0.2679, 0.4491, 0.2828]}, {"w": "user", "b": [0.4553, 0.2679, 0.4882, 0.2828]}, {"w": "is", "b": [0.4944, 0.2679, 0.5068, 0.2828]}, {"w": "offline,", "b": [0.5129, 0.2679, 0.5663, 0.2828]}, {"w": "and", "b": [0.5724, 0.2679, 0.6022, 0.2828]}, {"w": "•", "b": [0.1538, 0.2858, 0.1681, 0.3008]}, {"w": "the", "b": [0.1774, 0.2857, 0.2035, 0.3008]}, {"w": "software", "b": [0.2118, 0.2857, 0.2795, 0.3008]}, {"w": "vendor", "b": [0.2878, 0.2857, 0.3433, 0.3008]}, {"w": "doesn’t", "b": [0.3516, 0.2857, 0.4108, 0.3008]}, {"w": "have", "b": [0.4191, 0.2857, 0.4562, 0.3008]}, {"w": "to", "b": [0.4646, 0.2857, 0.4813, 0.3008]}, {"w": "care", "b": [0.4896, 0.2857, 0.5231, 0.3008]}, {"w": "about", "b": [0.5314, 0.2857, 0.579, 0.3008]}, {"w": "keeping", "b": [0.5873, 0.2857, 0.6491, 0.3008]}, {"w": "the", "b": [0.6574, 0.2857, 0.6835, 0.3008]}, {"w": "model", "b": [0.6918, 0.2857, 0.7415, 0.3008]}, {"w": "operational;", "b": [0.7498, 0.2857, 0.8476, 0.3008]}, {"w": "it", "b": [0.857, 0.2857, 0.8696, 0.3008]}, {"w": "becomes", "b": [0.1774, 0.3038, 0.2446, 0.3187]}, {"w": "the", "b": [0.2508, 0.3038, 0.2764, 0.3187]}, {"w": "user’s", "b": [0.2826, 0.3038, 0.328, 0.3187]}, {"w": "responsibility.", "b": [0.3341, 0.3038, 0.4451, 0.3187]}]}, {"id": "b_3", "type": "paragraph", "text": "However, a static deployment also has several drawbacks. First and foremost, the separation of concerns between the machine learning code and the application code isn’t always obvious. This makes it harder to upgrade the model without also having to upgrade the entire application. Second, if the model has certain computational requirements for scoring (such as access to an accelerator or a GPU), it may add complexity and confusion as to where the static deployment can or cannot be used.", "words": [{"w": "However,", "b": [0.1312, 0.3308, 0.2034, 0.3456]}, {"w": "a", "b": [0.2096, 0.3308, 0.2186, 0.3456]}, {"w": "static", "b": [0.2248, 0.3308, 0.2683, 0.3456]}, {"w": "deployment", "b": [0.2745, 0.3308, 0.3658, 0.3456]}, {"w": "also", "b": [0.372, 0.3308, 0.4023, 0.3456]}, {"w": "has", "b": [0.4085, 0.3308, 0.4348, 0.3456]}, {"w": "several", "b": [0.441, 0.3308, 0.4946, 0.3456]}, {"w": "drawbacks.", "b": [0.5008, 0.3308, 0.5882, 0.3456]}, {"w": "First", "b": [0.5965, 0.3308, 0.6347, 0.3456]}, {"w": "and", "b": [0.6409, 0.3308, 0.6702, 0.3456]}, {"w": "foremost,", "b": [0.6763, 0.3308, 0.7496, 0.3456]}, {"w": "the", "b": [0.7558, 0.3308, 0.781, 0.3456]}, {"w": "separation", "b": [0.7872, 0.3308, 0.8691, 0.3456]}, {"w": "of", "b": [0.1312, 0.3487, 0.1458, 0.3635]}, {"w": "concerns", "b": [0.1519, 0.3487, 0.2194, 0.3635]}, {"w": "between", "b": [0.2254, 0.3487, 0.2892, 0.3635]}, {"w": "the", "b": [0.2953, 0.3487, 0.3204, 0.3635]}, {"w": "machine", "b": [0.3265, 0.3487, 0.3913, 0.3635]}, {"w": "learning", "b": [0.3973, 0.3487, 0.4607, 0.3635]}, {"w": "code", "b": [0.4667, 0.3487, 0.5024, 0.3635]}, {"w": "and", "b": [0.5085, 0.3487, 0.5376, 0.3635]}, {"w": "the", "b": [0.5437, 0.3487, 0.5688, 0.3635]}, {"w": "application", "b": [0.5749, 0.3487, 0.6623, 0.3635]}, {"w": "code", "b": [0.6684, 0.3487, 0.7041, 0.3635]}, {"w": "isn’t", "b": [0.7101, 0.3487, 0.7444, 0.3635]}, {"w": "always", "b": [0.7504, 0.3487, 0.8023, 0.3635]}, {"w": "obvious.", "b": [0.8083, 0.3487, 0.8727, 0.3635]}, {"w": "This", "b": [0.1306, 0.3665, 0.1673, 0.3816]}, {"w": "makes", "b": [0.176, 0.3665, 0.2263, 0.3816]}, {"w": "it", "b": [0.235, 0.3665, 0.2475, 0.3816]}, {"w": "harder", "b": [0.2563, 0.3665, 0.3097, 0.3816]}, {"w": "to", "b": [0.3184, 0.3665, 0.3351, 0.3816]}, {"w": "upgrade", "b": [0.3438, 0.3665, 0.4098, 0.3816]}, {"w": "the", "b": [0.4185, 0.3665, 0.4447, 0.3816]}, {"w": "model", "b": [0.4534, 0.3665, 0.503, 0.3816]}, {"w": "without", "b": [0.5117, 0.3665, 0.5755, 0.3816]}, {"w": "also", "b": [0.5842, 0.3665, 0.6157, 0.3816]}, {"w": "having", "b": [0.6244, 0.3665, 0.6788, 0.3816]}, {"w": "to", "b": [0.6875, 0.3665, 0.7042, 0.3816]}, {"w": "upgrade", "b": [0.7129, 0.3665, 0.7789, 0.3816]}, {"w": "the", "b": [0.7876, 0.3665, 0.8137, 0.3816]}, {"w": "entire", "b": [0.8224, 0.3665, 0.8691, 0.3816]}, {"w": "application.", "b": [0.1312, 0.3845, 0.2261, 0.3995]}, {"w": "Second,", "b": [0.2344, 0.3845, 0.2963, 0.3995]}, {"w": "if", "b": [0.3024, 0.3845, 0.3133, 0.3995]}, {"w": "the", "b": [0.3194, 0.3845, 0.3452, 0.3995]}, {"w": "model", "b": [0.3514, 0.3845, 0.4003, 0.3995]}, {"w": "has", "b": [0.4065, 0.3845, 0.4334, 0.3995]}, {"w": "certain", "b": [0.4396, 0.3845, 0.4953, 0.3995]}, {"w": "computational", "b": [0.5015, 0.3845, 0.618, 0.3995]}, {"w": "requirements", "b": [0.6242, 0.3845, 0.7286, 0.3995]}, {"w": "for", "b": [0.7348, 0.3845, 0.757, 0.3995]}, {"w": "scoring", "b": [0.7632, 0.3845, 0.8201, 0.3995]}, {"w": "(such", "b": [0.8262, 0.3845, 0.8691, 0.3995]}, {"w": "as", "b": [0.1312, 0.4025, 0.1475, 0.4174]}, {"w": "access", "b": [0.1537, 0.4025, 0.2015, 0.4174]}, {"w": "to", "b": [0.2076, 0.4025, 0.2238, 0.4174]}, {"w": "an", "b": [0.23, 0.4025, 0.2492, 0.4174]}, {"w": "accelerator", "b": [0.2554, 0.4025, 0.3415, 0.4174]}, {"w": "or", "b": [0.3477, 0.4025, 0.3639, 0.4174]}, {"w": "a", "b": [0.3701, 0.4025, 0.3792, 0.4174]}, {"w": "GPU),", "b": [0.3853, 0.4025, 0.4378, 0.4174]}, {"w": "it", "b": [0.444, 0.4025, 0.4561, 0.4174]}, {"w": "may", "b": [0.4623, 0.4025, 0.4957, 0.4174]}, {"w": "add", "b": [0.5018, 0.4025, 0.5312, 0.4174]}, {"w": "complexity", "b": [0.5373, 0.4025, 0.6239, 0.4174]}, {"w": "and", "b": [0.63, 0.4025, 0.6594, 0.4174]}, {"w": "confusion", "b": [0.6655, 0.4025, 0.74, 0.4174]}, {"w": "as", "b": [0.7462, 0.4025, 0.7625, 0.4174]}, {"w": "to", "b": [0.7687, 0.4025, 0.7848, 0.4174]}, {"w": "where", "b": [0.791, 0.4025, 0.8376, 0.4174]}, {"w": "the", "b": [0.8438, 0.4025, 0.8691, 0.4174]}, {"w": "static", "b": [0.1312, 0.4204, 0.1754, 0.4354]}, {"w": "deployment", "b": [0.1816, 0.4204, 0.2744, 0.4354]}, {"w": "can", "b": [0.2805, 0.4204, 0.3082, 0.4354]}, {"w": "or", "b": [0.3144, 0.4204, 0.3308, 0.4354]}, {"w": "cannot", "b": [0.337, 0.4204, 0.3913, 0.4354]}, {"w": "be", "b": [0.3975, 0.4204, 0.4165, 0.4354]}, {"w": "used.", "b": [0.4226, 0.4204, 0.4637, 0.4354]}]}, {"id": "b_4", "type": "paragraph", "text": "8.2 Dynamic Deployment on User’s Device", "words": [{"w": "8.2", "b": [0.1312, 0.4689, 0.1631, 0.4869]}, {"w": "Dynamic", "b": [0.188, 0.4689, 0.2849, 0.4869]}, {"w": "Deployment", "b": [0.2932, 0.4689, 0.4244, 0.4869]}, {"w": "on", "b": [0.4327, 0.4689, 0.459, 0.4869]}, {"w": "User’s", "b": [0.4673, 0.4689, 0.5345, 0.4869]}, {"w": "Device", "b": [0.5428, 0.4689, 0.6158, 0.4869]}]}, {"id": "b_5", "type": "paragraph", "text": "A dynamic deployment on devices is similar to a static deployment, in the sense the user runs a part of the system as a software application on their device. The difference is that in dynamic deployment, the model is not part of the binary code of the application. Thus it achieves better separation of concerns. Pushing model updates is done without updating the whole application running on the user’s device. Moreover, a dynamic deployment may allow the same piece of code to select the right model, based on the available compute resources.", "words": [{"w": "A", "b": [0.1305, 0.5077, 0.1446, 0.5228]}, {"w": "dynamic", "b": [0.1513, 0.5077, 0.2208, 0.5228]}, {"w": "deployment", "b": [0.2274, 0.5077, 0.3221, 0.5228]}, {"w": "on", "b": [0.3287, 0.5077, 0.3486, 0.5228]}, {"w": "devices", "b": [0.3552, 0.5077, 0.4134, 0.5228]}, {"w": "is", "b": [0.4201, 0.5077, 0.4327, 0.5228]}, {"w": "similar", "b": [0.4393, 0.5077, 0.4949, 0.5228]}, {"w": "to", "b": [0.5015, 0.5077, 0.5183, 0.5228]}, {"w": "a", "b": [0.5249, 0.5077, 0.5343, 0.5228]}, {"w": "static", "b": [0.5409, 0.5077, 0.586, 0.5228]}, {"w": "deployment,", "b": [0.5926, 0.5077, 0.6925, 0.5228]}, {"w": "in", "b": [0.6993, 0.5077, 0.715, 0.5228]}, {"w": "the", "b": [0.7216, 0.5077, 0.7478, 0.5228]}, {"w": "sense", "b": [0.7544, 0.5077, 0.7965, 0.5228]}, {"w": "the", "b": [0.8031, 0.5077, 0.8292, 0.5228]}, {"w": "user", "b": [0.8359, 0.5077, 0.8695, 0.5228]}, {"w": "runs", "b": [0.1312, 0.5258, 0.166, 0.5407]}, {"w": "a", "b": [0.1721, 0.5258, 0.1812, 0.5407]}, {"w": "part", "b": [0.1874, 0.5258, 0.2209, 0.5407]}, {"w": "of", "b": [0.2271, 0.5258, 0.2418, 0.5407]}, {"w": "the", "b": [0.248, 0.5258, 0.2734, 0.5407]}, {"w": "system", "b": [0.2795, 0.5258, 0.3341, 0.5407]}, {"w": "as", "b": [0.3402, 0.5258, 0.3566, 0.5407]}, {"w": "a", "b": [0.3627, 0.5258, 0.3719, 0.5407]}, {"w": "software", "b": [0.378, 0.5258, 0.4437, 0.5407]}, {"w": "application", "b": [0.4498, 0.5258, 0.5383, 0.5407]}, {"w": "on", "b": [0.5444, 0.5258, 0.5637, 0.5407]}, {"w": "their", "b": [0.5698, 0.5258, 0.6075, 0.5407]}, {"w": "device.", "b": [0.6136, 0.5258, 0.668, 0.5407]}, {"w": "The", "b": [0.6762, 0.5258, 0.7077, 0.5407]}, {"w": "difference", "b": [0.7138, 0.5258, 0.7896, 0.5407]}, {"w": "is", "b": [0.7958, 0.5258, 0.8081, 0.5407]}, {"w": "that", "b": [0.8142, 0.5258, 0.8477, 0.5407]}, {"w": "in", "b": [0.8539, 0.5258, 0.8691, 0.5407]}, {"w": "dynamic", "b": [0.1312, 0.5436, 0.2008, 0.5587]}, {"w": "deployment,", "b": [0.207, 0.5436, 0.3069, 0.5587]}, {"w": "the", "b": [0.3132, 0.5436, 0.3393, 0.5587]}, {"w": "model", "b": [0.3456, 0.5436, 0.3953, 0.5587]}, {"w": "is", "b": [0.4015, 0.5436, 0.4141, 0.5587]}, {"w": "not", "b": [0.4204, 0.5436, 0.4476, 0.5587]}, {"w": "part", "b": [0.4538, 0.5436, 0.4884, 0.5587]}, {"w": "of", "b": [0.4946, 0.5436, 0.5098, 0.5587]}, {"w": "the", "b": [0.516, 0.5436, 0.5422, 0.5587]}, {"w": "binary", "b": [0.5484, 0.5436, 0.6013, 0.5587]}, {"w": "code", "b": [0.6075, 0.5436, 0.6447, 0.5587]}, {"w": "of", "b": [0.6509, 0.5436, 0.666, 0.5587]}, {"w": "the", "b": [0.6723, 0.5436, 0.6985, 0.5587]}, {"w": "application.", "b": [0.7047, 0.5436, 0.8009, 0.5587]}, {"w": "Thus", "b": [0.8094, 0.5436, 0.8508, 0.5587]}, {"w": "it", "b": [0.857, 0.5436, 0.8696, 0.5587]}, {"w": "achieves", "b": [0.1312, 0.5618, 0.1953, 0.5766]}, {"w": "better", "b": [0.2015, 0.5618, 0.2494, 0.5766]}, {"w": "separation", "b": [0.2556, 0.5618, 0.3374, 0.5766]}, {"w": "of", "b": [0.3435, 0.5618, 0.3581, 0.5766]}, {"w": "concerns.", "b": [0.3642, 0.5618, 0.437, 0.5766]}, {"w": "Pushing", "b": [0.4452, 0.5618, 0.509, 0.5766]}, {"w": "model", "b": [0.5152, 0.5618, 0.563, 0.5766]}, {"w": "updates", "b": [0.5692, 0.5618, 0.6313, 0.5766]}, {"w": "is", "b": [0.6374, 0.5618, 0.6496, 0.5766]}, {"w": "done", "b": [0.6557, 0.5618, 0.693, 0.5766]}, {"w": "without", "b": [0.6992, 0.5618, 0.7606, 0.5766]}, {"w": "updating", "b": [0.7668, 0.5618, 0.8378, 0.5766]}, {"w": "the", "b": [0.844, 0.5618, 0.8692, 0.5766]}, {"w": "whole", "b": [0.1306, 0.5797, 0.1763, 0.5946]}, {"w": "application", "b": [0.1825, 0.5797, 0.271, 0.5946]}, {"w": "running", "b": [0.2771, 0.5797, 0.3392, 0.5946]}, {"w": "on", "b": [0.3453, 0.5797, 0.3646, 0.5946]}, {"w": "the", "b": [0.3708, 0.5797, 0.3962, 0.5946]}, {"w": "user’s", "b": [0.4023, 0.5797, 0.4474, 0.5946]}, {"w": "device.", "b": [0.4535, 0.5797, 0.5079, 0.5946]}, {"w": "Moreover,", "b": [0.5161, 0.5797, 0.5956, 0.5946]}, {"w": "a", "b": [0.6017, 0.5797, 0.6108, 0.5946]}, {"w": "dynamic", "b": [0.617, 0.5797, 0.6846, 0.5946]}, {"w": "deployment", "b": [0.6907, 0.5797, 0.7828, 0.5946]}, {"w": "may", "b": [0.7889, 0.5797, 0.8225, 0.5946]}, {"w": "allow", "b": [0.8286, 0.5797, 0.8698, 0.5946]}, {"w": "the", "b": [0.1312, 0.5976, 0.1569, 0.6125]}, {"w": "same", "b": [0.163, 0.5976, 0.2031, 0.6125]}, {"w": "piece", "b": [0.2093, 0.5976, 0.2493, 0.6125]}, {"w": "of", "b": [0.2554, 0.5976, 0.2703, 0.6125]}, {"w": "code", "b": [0.2764, 0.5976, 0.3129, 0.6125]}, {"w": "to", "b": [0.319, 0.5976, 0.3354, 0.6125]}, {"w": "select", "b": [0.3416, 0.5976, 0.3858, 0.6125]}, {"w": "the", "b": [0.3919, 0.5976, 0.4176, 0.6125]}, {"w": "right", "b": [0.4237, 0.5976, 0.4622, 0.6125]}, {"w": "model,", "b": [0.4684, 0.5976, 0.5222, 0.6125]}, {"w": "based", "b": [0.5284, 0.5976, 0.5736, 0.6125]}, {"w": "on", "b": [0.5797, 0.5976, 0.5992, 0.6125]}, {"w": "the", "b": [0.6054, 0.5976, 0.631, 0.6125]}, {"w": "available", "b": [0.6372, 0.5976, 0.7069, 0.6125]}, {"w": "compute", "b": [0.713, 0.5976, 0.7817, 0.6125]}, {"w": "resources.", "b": [0.7879, 0.5976, 0.8662, 0.6125]}]}, {"id": "b_6", "type": "paragraph", "text": "Dynamic deployment can be achieved in several ways:", "words": [{"w": "Dynamic", "b": [0.1312, 0.6245, 0.2033, 0.6394]}, {"w": "deployment", "b": [0.2094, 0.6245, 0.3022, 0.6394]}, {"w": "can", "b": [0.3084, 0.6245, 0.3361, 0.6394]}, {"w": "be", "b": [0.3422, 0.6245, 0.3612, 0.6394]}, {"w": "achieved", "b": [0.3673, 0.6245, 0.4355, 0.6394]}, {"w": "in", "b": [0.4417, 0.6245, 0.4571, 0.6394]}, {"w": "several", "b": [0.4632, 0.6245, 0.5177, 0.6394]}, {"w": "ways:", "b": [0.5239, 0.6245, 0.5676, 0.6394]}]}, {"id": "b_7", "type": "paragraph", "text": "• by deploying model parameters, • by deploying a serialized object, and • by deploying to the browser.", "words": [{"w": "•", "b": [0.1538, 0.6514, 0.1681, 0.6664]}, {"w": "by", "b": [0.1774, 0.6514, 0.1968, 0.6664]}, {"w": "deploying", "b": [0.203, 0.6514, 0.2799, 0.6664]}, {"w": "model", "b": [0.2861, 0.6514, 0.3347, 0.6664]}, {"w": "parameters,", "b": [0.3409, 0.6514, 0.4355, 0.6664]}, {"w": "•", "b": [0.1538, 0.6694, 0.1681, 0.6843]}, {"w": "by", "b": [0.1774, 0.6694, 0.1968, 0.6843]}, {"w": "deploying", "b": [0.203, 0.6694, 0.2799, 0.6843]}, {"w": "a", "b": [0.2861, 0.6694, 0.2953, 0.6843]}, {"w": "serialized", "b": [0.3014, 0.6694, 0.3754, 0.6843]}, {"w": "object,", "b": [0.3816, 0.6694, 0.436, 0.6843]}, {"w": "and", "b": [0.4421, 0.6694, 0.4718, 0.6843]}, {"w": "•", "b": [0.1538, 0.6873, 0.1681, 0.7023]}, {"w": "by", "b": [0.1774, 0.6873, 0.1968, 0.7023]}, {"w": "deploying", "b": [0.203, 0.6873, 0.2799, 0.7023]}, {"w": "to", "b": [0.2861, 0.6873, 0.3025, 0.7023]}, {"w": "the", "b": [0.3086, 0.6873, 0.3342, 0.7023]}, {"w": "browser.", "b": [0.3404, 0.6873, 0.4078, 0.7023]}]}, {"id": "b_8", "type": "paragraph", "text": "8.2.1 Deployment of Model Parameters", "words": [{"w": "8.2.1", "b": [0.1312, 0.7352, 0.1749, 0.7501]}, {"w": "Deployment", "b": [0.1961, 0.7352, 0.3078, 0.7501]}, {"w": "of", "b": [0.3149, 0.7352, 0.332, 0.7501]}, {"w": "Model", "b": [0.3391, 0.7352, 0.3978, 0.7501]}, {"w": "Parameters", "b": [0.4049, 0.7352, 0.5107, 0.7501]}]}, {"id": "b_9", "type": "paragraph", "text": "In this deployment scenario, the model file only contains the learned parameters, while the user’s device has installed a runtime environment for the model. Some machine learning packages, like TensorFlow, have a lightweight version that can run on mobile devices.", "words": [{"w": "In", "b": [0.1312, 0.7717, 0.1482, 0.7867]}, {"w": "this", "b": [0.1544, 0.7717, 0.1844, 0.7867]}, {"w": "deployment", "b": [0.1906, 0.7717, 0.2838, 0.7867]}, {"w": "scenario,", "b": [0.29, 0.7717, 0.3603, 0.7867]}, {"w": "the", "b": [0.3665, 0.7717, 0.3922, 0.7867]}, {"w": "model", "b": [0.3984, 0.7717, 0.4473, 0.7867]}, {"w": "file", "b": [0.4535, 0.7717, 0.4772, 0.7867]}, {"w": "only", "b": [0.4834, 0.7717, 0.5179, 0.7867]}, {"w": "contains", "b": [0.5241, 0.7717, 0.5907, 0.7867]}, {"w": "the", "b": [0.5968, 0.7717, 0.6226, 0.7867]}, {"w": "learned", "b": [0.6288, 0.7717, 0.6876, 0.7867]}, {"w": "parameters,", "b": [0.6937, 0.7717, 0.7888, 0.7867]}, {"w": "while", "b": [0.7949, 0.7717, 0.8372, 0.7867]}, {"w": "the", "b": [0.8434, 0.7717, 0.8691, 0.7867]}, {"w": "user’s", "b": [0.1312, 0.7896, 0.1775, 0.8047]}, {"w": "device", "b": [0.1845, 0.7896, 0.2353, 0.8047]}, {"w": "has", "b": [0.2423, 0.7896, 0.2696, 0.8047]}, {"w": "installed", "b": [0.2766, 0.7896, 0.3457, 0.8047]}, {"w": "a", "b": [0.3527, 0.7896, 0.3621, 0.8047]}, {"w": "runtime", "b": [0.3691, 0.7896, 0.4335, 0.8047]}, {"w": "environment", "b": [0.4405, 0.7896, 0.5425, 0.8047]}, {"w": "for", "b": [0.5495, 0.7896, 0.5721, 0.8047]}, {"w": "the", "b": [0.5791, 0.7896, 0.6052, 0.8047]}, {"w": "model.", "b": [0.6122, 0.7896, 0.6671, 0.8047]}, {"w": "Some", "b": [0.6778, 0.7896, 0.7217, 0.8047]}, {"w": "machine", "b": [0.7287, 0.7896, 0.7962, 0.8047]}, {"w": "learning", "b": [0.8032, 0.7896, 0.8691, 0.8047]}, {"w": "packages,", "b": [0.1312, 0.8076, 0.2072, 0.8226]}, {"w": "like", "b": [0.2134, 0.8076, 0.2411, 0.8226]}, {"w": "TensorFlow,", "b": [0.2472, 0.8076, 0.3591, 0.8226]}, {"w": "have", "b": [0.3653, 0.8076, 0.4017, 0.8226]}, {"w": "a", "b": [0.4078, 0.8076, 0.4171, 0.8226]}, {"w": "lightweight", "b": [0.4232, 0.8076, 0.5114, 0.8226]}, {"w": "version", "b": [0.5175, 0.8076, 0.5741, 0.8226]}, {"w": "that", "b": [0.5803, 0.8076, 0.6141, 0.8226]}, {"w": "can", "b": [0.6202, 0.8076, 0.6479, 0.8226]}, {"w": "run", "b": [0.6541, 0.8076, 0.6818, 0.8226]}, {"w": "on", "b": [0.688, 0.8076, 0.7075, 0.8226]}, {"w": "mobile", "b": [0.7136, 0.8076, 0.7669, 0.8226]}, {"w": "devices.", "b": [0.7731, 0.8076, 0.8353, 0.8226]}]}, {"id": "b_10", "type": "paragraph", "text": "Alternatively, frameworks such as Apple’s Core ML allow running models created using popular packages, including scikit-learn, Keras, and XGBoost, on Apple devices.", "words": [{"w": "Alternatively,", "b": [0.1305, 0.8344, 0.242, 0.8495]}, {"w": "frameworks", "b": [0.2489, 0.8344, 0.3428, 0.8495]}, {"w": "such", "b": [0.3495, 0.8344, 0.3857, 0.8495]}, {"w": "as", "b": [0.3925, 0.8344, 0.4093, 0.8495]}, {"w": "Apple’s", "b": [0.4161, 0.8344, 0.4774, 0.8495]}, {"w": "Core", "b": [0.484, 0.8345, 0.5284, 0.8495]}, {"w": "ML", "b": [0.5362, 0.8345, 0.5691, 0.8495]}, {"w": "allow", "b": [0.5759, 0.8344, 0.6182, 0.8495]}, {"w": "running", "b": [0.625, 0.8344, 0.6888, 0.8495]}, {"w": "models", "b": [0.6956, 0.8344, 0.7527, 0.8495]}, {"w": "created", "b": [0.7595, 0.8344, 0.8192, 0.8495]}, {"w": "using", "b": [0.8259, 0.8344, 0.8689, 0.8495]}, {"w": "popular", "b": [0.1312, 0.8525, 0.1933, 0.8674]}, {"w": "packages,", "b": [0.1995, 0.8525, 0.2755, 0.8674]}, {"w": "including", "b": [0.2816, 0.8525, 0.3555, 0.8674]}, {"w": "scikit-learn,", "b": [0.3617, 0.8525, 0.4695, 0.8675]}, {"w": "Keras,", "b": [0.4756, 0.8525, 0.5345, 0.8675]}, {"w": "and", "b": [0.5407, 0.8525, 0.5704, 0.8674]}, {"w": "XGBoost,", "b": [0.5766, 0.8525, 0.6673, 0.8675]}, {"w": "on", "b": [0.6735, 0.8525, 0.693, 0.8674]}, {"w": "Apple", "b": [0.6991, 0.8525, 0.7468, 0.8674]}, {"w": "devices.", "b": [0.753, 0.8525, 0.8151, 0.8674]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "4", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 244, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "8.2.2 Deployment of a Serialized Object", "words": [{"w": "8.2.2", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Deployment", "b": [0.1961, 0.0884, 0.3078, 0.1034]}, {"w": "of", "b": [0.3149, 0.0884, 0.332, 0.1034]}, {"w": "a", "b": [0.3391, 0.0884, 0.3494, 0.1034]}, {"w": "Serialized", "b": [0.3564, 0.0884, 0.4457, 0.1034]}, {"w": "Object", "b": [0.4527, 0.0884, 0.5149, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "Here, the model file is a serialized object that the application would deserialize. The advantage of this approach is that you don’t need to have a runtime environment for your model on the user’s device. All needed dependencies will be deserialized with the object of the model.", "words": [{"w": "Here,", "b": [0.1312, 0.1251, 0.173, 0.1399]}, {"w": "the", "b": [0.178, 0.1251, 0.2032, 0.1399]}, {"w": "model", "b": [0.2079, 0.1251, 0.2556, 0.1399]}, {"w": "file", "b": [0.2604, 0.1251, 0.2835, 0.1399]}, {"w": "is", "b": [0.2882, 0.1251, 0.3004, 0.1399]}, {"w": "a", "b": [0.3051, 0.1251, 0.3142, 0.1399]}, {"w": "serialized", "b": [0.3189, 0.1251, 0.3914, 0.1399]}, {"w": "object", "b": [0.3962, 0.1251, 0.4444, 0.1399]}, {"w": "that", "b": [0.4492, 0.1251, 0.4824, 0.1399]}, {"w": "the", "b": [0.4871, 0.1251, 0.5122, 0.1399]}, {"w": "application", "b": [0.517, 0.1251, 0.6044, 0.1399]}, {"w": "would", "b": [0.6091, 0.1251, 0.6558, 0.1399]}, {"w": "deserialize.", "b": [0.6606, 0.1251, 0.7462, 0.1399]}, {"w": "The", "b": [0.7539, 0.1251, 0.7851, 0.1399]}, {"w": "advantage", "b": [0.7898, 0.1251, 0.8692, 0.1399]}, {"w": "of", "b": [0.1312, 0.143, 0.1458, 0.1578]}, {"w": "this", "b": [0.1518, 0.143, 0.181, 0.1578]}, {"w": "approach", "b": [0.187, 0.143, 0.2589, 0.1578]}, {"w": "is", "b": [0.2649, 0.143, 0.2771, 0.1578]}, {"w": "that", "b": [0.2831, 0.143, 0.3162, 0.1578]}, {"w": "you", "b": [0.3222, 0.143, 0.3503, 0.1578]}, {"w": "don’t", "b": [0.3564, 0.143, 0.3975, 0.1578]}, {"w": "need", "b": [0.4035, 0.143, 0.4397, 0.1578]}, {"w": "to", "b": [0.4457, 0.143, 0.4618, 0.1578]}, {"w": "have", "b": [0.4678, 0.143, 0.5034, 0.1578]}, {"w": "a", "b": [0.5094, 0.143, 0.5185, 0.1578]}, {"w": "runtime", "b": [0.5245, 0.143, 0.5863, 0.1578]}, {"w": "environment", "b": [0.5923, 0.143, 0.6903, 0.1578]}, {"w": "for", "b": [0.6963, 0.143, 0.718, 0.1578]}, {"w": "your", "b": [0.7239, 0.143, 0.7592, 0.1578]}, {"w": "model", "b": [0.7651, 0.143, 0.8129, 0.1578]}, {"w": "on", "b": [0.8189, 0.143, 0.838, 0.1578]}, {"w": "the", "b": [0.844, 0.143, 0.8691, 0.1578]}, {"w": "user’s", "b": [0.1312, 0.1609, 0.1766, 0.1758]}, {"w": "device.", "b": [0.1828, 0.1609, 0.2377, 0.1758]}, {"w": "All", "b": [0.2459, 0.1609, 0.27, 0.1758]}, {"w": "needed", "b": [0.2761, 0.1609, 0.3315, 0.1758]}, {"w": "dependencies", "b": [0.3377, 0.1609, 0.4429, 0.1758]}, {"w": "will", "b": [0.4491, 0.1609, 0.4778, 0.1758]}, {"w": "be", "b": [0.4839, 0.1609, 0.5029, 0.1758]}, {"w": "deserialized", "b": [0.509, 0.1609, 0.6015, 0.1758]}, {"w": "with", "b": [0.6077, 0.1609, 0.6436, 0.1758]}, {"w": "the", "b": [0.6497, 0.1609, 0.6754, 0.1758]}, {"w": "object", "b": [0.6815, 0.1609, 0.7307, 0.1758]}, {"w": "of", "b": [0.7369, 0.1609, 0.7518, 0.1758]}, {"w": "the", "b": [0.7579, 0.1609, 0.7835, 0.1758]}, {"w": "model.", "b": [0.7897, 0.1609, 0.8435, 0.1758]}]}, {"id": "b_2", "type": "paragraph", "text": "An evident drawback is that an update might be quite “heavy,” which is a problem if your software system has millions of users.", "words": [{"w": "An", "b": [0.1305, 0.1877, 0.1548, 0.2028]}, {"w": "evident", "b": [0.161, 0.1877, 0.22, 0.2028]}, {"w": "drawback", "b": [0.2261, 0.1877, 0.3032, 0.2028]}, {"w": "is", "b": [0.3094, 0.1877, 0.3219, 0.2028]}, {"w": "that", "b": [0.328, 0.1877, 0.3622, 0.2028]}, {"w": "an", "b": [0.3683, 0.1877, 0.3879, 0.2028]}, {"w": "update", "b": [0.3941, 0.1877, 0.4505, 0.2028]}, {"w": "might", "b": [0.4566, 0.1877, 0.5037, 0.2028]}, {"w": "be", "b": [0.5098, 0.1877, 0.5289, 0.2028]}, {"w": "quite", "b": [0.5351, 0.1877, 0.5759, 0.2028]}, {"w": "“heavy,”", "b": [0.5821, 0.1877, 0.6503, 0.2028]}, {"w": "which", "b": [0.6565, 0.1877, 0.7036, 0.2028]}, {"w": "is", "b": [0.7097, 0.1877, 0.7222, 0.2028]}, {"w": "a", "b": [0.7283, 0.1877, 0.7377, 0.2028]}, {"w": "problem", "b": [0.7438, 0.1877, 0.81, 0.2028]}, {"w": "if", "b": [0.8162, 0.1877, 0.8271, 0.2028]}, {"w": "your", "b": [0.8332, 0.1877, 0.8694, 0.2028]}, {"w": "software", "b": [0.1312, 0.2057, 0.1975, 0.2207]}, {"w": "system", "b": [0.2037, 0.2057, 0.2587, 0.2207]}, {"w": "has", "b": [0.2649, 0.2057, 0.2917, 0.2207]}, {"w": "millions", "b": [0.2978, 0.2057, 0.3605, 0.2207]}, {"w": "of", "b": [0.3666, 0.2057, 0.3815, 0.2207]}, {"w": "users.", "b": [0.3876, 0.2057, 0.433, 0.2207]}]}, {"id": "b_3", "type": "paragraph", "text": "8.2.3 Deploying to Browser", "words": [{"w": "8.2.3", "b": [0.1312, 0.2536, 0.1749, 0.2685]}, {"w": "Deploying", "b": [0.1961, 0.2536, 0.2893, 0.2685]}, {"w": "to", "b": [0.2964, 0.2536, 0.3152, 0.2685]}, {"w": "Browser", "b": [0.3223, 0.2536, 0.3983, 0.2685]}]}, {"id": "b_4", "type": "paragraph", "text": "Most modern devices have access to a browser, either desktop or mobile. Some machine learning frameworks, such as TensorFlow.js, have versions that allow to train and run a model in a browser, by using JavaScript as a runtime.", "words": [{"w": "Most", "b": [0.1312, 0.29, 0.1727, 0.3051]}, {"w": "modern", "b": [0.1797, 0.29, 0.242, 0.3051]}, {"w": "devices", "b": [0.2491, 0.29, 0.3073, 0.3051]}, {"w": "have", "b": [0.3144, 0.29, 0.3515, 0.3051]}, {"w": "access", "b": [0.3586, 0.29, 0.408, 0.3051]}, {"w": "to", "b": [0.4151, 0.29, 0.4318, 0.3051]}, {"w": "a", "b": [0.4389, 0.29, 0.4483, 0.3051]}, {"w": "browser,", "b": [0.4554, 0.29, 0.5241, 0.3051]}, {"w": "either", "b": [0.5314, 0.29, 0.5786, 0.3051]}, {"w": "desktop", "b": [0.5857, 0.29, 0.6491, 0.3051]}, {"w": "or", "b": [0.6561, 0.29, 0.6729, 0.3051]}, {"w": "mobile.", "b": [0.68, 0.29, 0.7396, 0.3051]}, {"w": "Some", "b": [0.7506, 0.29, 0.7946, 0.3051]}, {"w": "machine", "b": [0.8016, 0.29, 0.8691, 0.3051]}, {"w": "learning", "b": [0.1312, 0.308, 0.1972, 0.3231]}, {"w": "frameworks,", "b": [0.2036, 0.308, 0.3026, 0.3231]}, {"w": "such", "b": [0.3091, 0.308, 0.3453, 0.3231]}, {"w": "as", "b": [0.3517, 0.308, 0.3685, 0.3231]}, {"w": "TensorFlow.js,", "b": [0.3748, 0.308, 0.5076, 0.3231]}, {"w": "have", "b": [0.514, 0.308, 0.5512, 0.3231]}, {"w": "versions", "b": [0.5576, 0.308, 0.6227, 0.3231]}, {"w": "that", "b": [0.6291, 0.308, 0.6636, 0.3231]}, {"w": "allow", "b": [0.67, 0.308, 0.7124, 0.3231]}, {"w": "to", "b": [0.7188, 0.308, 0.7355, 0.3231]}, {"w": "train", "b": [0.7419, 0.308, 0.7817, 0.3231]}, {"w": "and", "b": [0.7881, 0.308, 0.8184, 0.3231]}, {"w": "run", "b": [0.8248, 0.308, 0.8531, 0.3231]}, {"w": "a", "b": [0.8595, 0.308, 0.8689, 0.3231]}, {"w": "model", "b": [0.1312, 0.3261, 0.1799, 0.341]}, {"w": "in", "b": [0.1861, 0.3261, 0.2015, 0.341]}, {"w": "a", "b": [0.2076, 0.3261, 0.2168, 0.341]}, {"w": "browser,", "b": [0.223, 0.3261, 0.2904, 0.341]}, {"w": "by", "b": [0.2965, 0.3261, 0.316, 0.341]}, {"w": "using", "b": [0.3221, 0.3261, 0.3643, 0.341]}, {"w": "JavaScript", "b": [0.3705, 0.3261, 0.4549, 0.341]}, {"w": "as", "b": [0.461, 0.3261, 0.4775, 0.341]}, {"w": "a", "b": [0.4837, 0.3261, 0.4929, 0.341]}, {"w": "runtime.", "b": [0.499, 0.3261, 0.5673, 0.341]}]}, {"id": "b_5", "type": "paragraph", "text": "It’s even possible to train a TensorFlow model in Python, and then deploy it to, and run it in the browser’s JavaScript runtime environment. Additionally, if a GPU (graphics processing unit) is available on the client’s device, Tensorflow.js can leverage it.", "words": [{"w": "It’s", "b": [0.1312, 0.3531, 0.157, 0.3679]}, {"w": "even", "b": [0.1626, 0.3531, 0.1978, 0.3679]}, {"w": "possible", "b": [0.2035, 0.3531, 0.2655, 0.3679]}, {"w": "to", "b": [0.2712, 0.3531, 0.2872, 0.3679]}, {"w": "train", "b": [0.2929, 0.3531, 0.3311, 0.3679]}, {"w": "a", "b": [0.3368, 0.3531, 0.3459, 0.3679]}, {"w": "TensorFlow", "b": [0.3515, 0.3531, 0.4428, 0.3679]}, {"w": "model", "b": [0.4485, 0.3531, 0.4962, 0.3679]}, {"w": "in", "b": [0.5019, 0.3531, 0.517, 0.3679]}, {"w": "Python,", "b": [0.5226, 0.3531, 0.5857, 0.3679]}, {"w": "and", "b": [0.5915, 0.3531, 0.6206, 0.3679]}, {"w": "then", "b": [0.6263, 0.3531, 0.6615, 0.3679]}, {"w": "deploy", "b": [0.6671, 0.3531, 0.7184, 0.3679]}, {"w": "it", "b": [0.724, 0.3531, 0.7361, 0.3679]}, {"w": "to,", "b": [0.7418, 0.3531, 0.7629, 0.3679]}, {"w": "and", "b": [0.7686, 0.3531, 0.7978, 0.3679]}, {"w": "run", "b": [0.8034, 0.3531, 0.8306, 0.3679]}, {"w": "it", "b": [0.8363, 0.3531, 0.8484, 0.3679]}, {"w": "in", "b": [0.854, 0.3531, 0.8691, 0.3679]}, {"w": "the", "b": [0.1312, 0.3709, 0.1569, 0.3859]}, {"w": "browser’s", "b": [0.163, 0.3709, 0.2377, 0.3859]}, {"w": "JavaScript", "b": [0.2438, 0.3709, 0.3283, 0.3859]}, {"w": "runtime", "b": [0.3344, 0.3709, 0.3975, 0.3859]}, {"w": "environment.", "b": [0.4037, 0.3709, 0.5089, 0.3859]}, {"w": "Additionally,", "b": [0.5171, 0.3709, 0.6206, 0.3859]}, {"w": "if", "b": [0.6268, 0.3709, 0.6376, 0.3859]}, {"w": "a", "b": [0.6437, 0.3709, 0.653, 0.3859]}, {"w": "GPU", "b": [0.6591, 0.3709, 0.7, 0.3859]}, {"w": "(graphics", "b": [0.7061, 0.3709, 0.7801, 0.3859]}, {"w": "processing", "b": [0.7863, 0.3709, 0.8691, 0.3859]}, {"w": "unit)", "b": [0.1312, 0.3889, 0.1712, 0.4038]}, {"w": "is", "b": [0.1774, 0.3889, 0.1898, 0.4038]}, {"w": "available", "b": [0.1959, 0.3889, 0.2657, 0.4038]}, {"w": "on", "b": [0.2718, 0.3889, 0.2913, 0.4038]}, {"w": "the", "b": [0.2975, 0.3889, 0.3231, 0.4038]}, {"w": "client’s", "b": [0.3292, 0.3889, 0.3853, 0.4038]}, {"w": "device,", "b": [0.3914, 0.3889, 0.4463, 0.4038]}, {"w": "Tensorflow.js", "b": [0.4524, 0.3889, 0.5568, 0.4038]}, {"w": "can", "b": [0.5629, 0.3889, 0.5906, 0.4038]}, {"w": "leverage", "b": [0.5968, 0.3889, 0.6614, 0.4038]}, {"w": "it.", "b": [0.6676, 0.3889, 0.685, 0.4038]}]}, {"id": "b_6", "type": "paragraph", "text": "8.2.4 Advantages and Drawbacks", "words": [{"w": "8.2.4", "b": [0.1312, 0.4367, 0.1749, 0.4517]}, {"w": "Advantages", "b": [0.1961, 0.4367, 0.3021, 0.4517]}, {"w": "and", "b": [0.3092, 0.4367, 0.3431, 0.4517]}, {"w": "Drawbacks", "b": [0.3502, 0.4367, 0.4507, 0.4517]}]}, {"id": "b_7", "type": "paragraph", "text": "The main advantage of dynamic deployment to users’ devices is that the calls to the model will be fast for the user. It also reduces the impact on the organization’s servers, as most computations are performed on the user’s device. Additionally, if the model is deployed to the browser, the organization’s infrastructure only needs to serve a web page that includes the model’s parameters. A downside of the browser-based deployment is that the bandwidth cost and application startup time might increase. The users must download the model’s parameters each time they start the web application, as opposed to doing it only once when they install an application.", "words": [{"w": "The", "b": [0.1306, 0.4733, 0.1624, 0.4883]}, {"w": "main", "b": [0.1686, 0.4733, 0.2086, 0.4883]}, {"w": "advantage", "b": [0.2148, 0.4733, 0.2959, 0.4883]}, {"w": "of", "b": [0.3021, 0.4733, 0.317, 0.4883]}, {"w": "dynamic", "b": [0.3231, 0.4733, 0.3914, 0.4883]}, {"w": "deployment", "b": [0.3976, 0.4733, 0.4906, 0.4883]}, {"w": "to", "b": [0.4967, 0.4733, 0.5132, 0.4883]}, {"w": "users’", "b": [0.5193, 0.4733, 0.5648, 0.4883]}, {"w": "devices", "b": [0.5709, 0.4733, 0.6281, 0.4883]}, {"w": "is", "b": [0.6342, 0.4733, 0.6467, 0.4883]}, {"w": "that", "b": [0.6528, 0.4733, 0.6867, 0.4883]}, {"w": "the", "b": [0.6929, 0.4733, 0.7186, 0.4883]}, {"w": "calls", "b": [0.7247, 0.4733, 0.7597, 0.4883]}, {"w": "to", "b": [0.7659, 0.4733, 0.7823, 0.4883]}, {"w": "the", "b": [0.7885, 0.4733, 0.8142, 0.4883]}, {"w": "model", "b": [0.8203, 0.4733, 0.8691, 0.4883]}, {"w": "will", "b": [0.1306, 0.4911, 0.1598, 0.5062]}, {"w": "be", "b": [0.1663, 0.4911, 0.1856, 0.5062]}, {"w": "fast", "b": [0.1921, 0.4911, 0.222, 0.5062]}, {"w": "for", "b": [0.2285, 0.4911, 0.251, 0.5062]}, {"w": "the", "b": [0.2575, 0.4911, 0.2836, 0.5062]}, {"w": "user.", "b": [0.2901, 0.4911, 0.329, 0.5062]}, {"w": "It", "b": [0.3381, 0.4911, 0.3522, 0.5062]}, {"w": "also", "b": [0.3586, 0.4911, 0.3901, 0.5062]}, {"w": "reduces", "b": [0.3966, 0.4911, 0.4574, 0.5062]}, {"w": "the", "b": [0.4639, 0.4911, 0.49, 0.5062]}, {"w": "impact", "b": [0.4965, 0.4911, 0.5529, 0.5062]}, {"w": "on", "b": [0.5594, 0.4911, 0.5793, 0.5062]}, {"w": "the", "b": [0.5857, 0.4911, 0.6119, 0.5062]}, {"w": "organization’s", "b": [0.6183, 0.4911, 0.7325, 0.5062]}, {"w": "servers,", "b": [0.739, 0.4911, 0.8, 0.5062]}, {"w": "as", "b": [0.8065, 0.4911, 0.8233, 0.5062]}, {"w": "most", "b": [0.8298, 0.4911, 0.8696, 0.5062]}, {"w": "computations", "b": [0.1312, 0.5091, 0.2412, 0.5242]}, {"w": "are", "b": [0.2474, 0.5091, 0.2723, 0.5242]}, {"w": "performed", "b": [0.2785, 0.5091, 0.3615, 0.5242]}, {"w": "on", "b": [0.3677, 0.5091, 0.3873, 0.5242]}, {"w": "the", "b": [0.3935, 0.5091, 0.4194, 0.5242]}, {"w": "user’s", "b": [0.4256, 0.5091, 0.4715, 0.5242]}, {"w": "device.", "b": [0.4776, 0.5091, 0.5331, 0.5242]}, {"w": "Additionally,", "b": [0.5413, 0.5091, 0.646, 0.5242]}, {"w": "if", "b": [0.6522, 0.5091, 0.6631, 0.5242]}, {"w": "the", "b": [0.6692, 0.5091, 0.6951, 0.5242]}, {"w": "model", "b": [0.7013, 0.5091, 0.7505, 0.5242]}, {"w": "is", "b": [0.7567, 0.5091, 0.7692, 0.5242]}, {"w": "deployed", "b": [0.7754, 0.5091, 0.8464, 0.5242]}, {"w": "to", "b": [0.8526, 0.5091, 0.8692, 0.5242]}, {"w": "the", "b": [0.1312, 0.5271, 0.1571, 0.5421]}, {"w": "browser,", "b": [0.1633, 0.5271, 0.2312, 0.5421]}, {"w": "the", "b": [0.2374, 0.5271, 0.2633, 0.5421]}, {"w": "organization’s", "b": [0.2694, 0.5271, 0.3823, 0.5421]}, {"w": "infrastructure", "b": [0.3885, 0.5271, 0.5, 0.5421]}, {"w": "only", "b": [0.5061, 0.5271, 0.5408, 0.5421]}, {"w": "needs", "b": [0.5469, 0.5271, 0.5915, 0.5421]}, {"w": "to", "b": [0.5977, 0.5271, 0.6142, 0.5421]}, {"w": "serve", "b": [0.6204, 0.5271, 0.6609, 0.5421]}, {"w": "a", "b": [0.667, 0.5271, 0.6763, 0.5421]}, {"w": "web", "b": [0.6825, 0.5271, 0.714, 0.5421]}, {"w": "page", "b": [0.7202, 0.5271, 0.7574, 0.5421]}, {"w": "that", "b": [0.7636, 0.5271, 0.7977, 0.5421]}, {"w": "includes", "b": [0.8039, 0.5271, 0.8692, 0.5421]}, {"w": "the", "b": [0.1312, 0.5452, 0.1564, 0.56]}, {"w": "model’s", "b": [0.1626, 0.5452, 0.2227, 0.56]}, {"w": "parameters.", "b": [0.2288, 0.5452, 0.3218, 0.56]}, {"w": "A", "b": [0.33, 0.5452, 0.3436, 0.56]}, {"w": "downside", "b": [0.3497, 0.5452, 0.4219, 0.56]}, {"w": "of", "b": [0.428, 0.5452, 0.4426, 0.56]}, {"w": "the", "b": [0.4488, 0.5452, 0.474, 0.56]}, {"w": "browser-based", "b": [0.4801, 0.5452, 0.5918, 0.56]}, {"w": "deployment", "b": [0.598, 0.5452, 0.6892, 0.56]}, {"w": "is", "b": [0.6953, 0.5452, 0.7075, 0.56]}, {"w": "that", "b": [0.7137, 0.5452, 0.7469, 0.56]}, {"w": "the", "b": [0.7531, 0.5452, 0.7783, 0.56]}, {"w": "bandwidth", "b": [0.7844, 0.5452, 0.8691, 0.56]}, {"w": "cost", "b": [0.1312, 0.5629, 0.1638, 0.578]}, {"w": "and", "b": [0.1709, 0.5629, 0.2012, 0.578]}, {"w": "application", "b": [0.2084, 0.5629, 0.2994, 0.578]}, {"w": "startup", "b": [0.3065, 0.5629, 0.3663, 0.578]}, {"w": "time", "b": [0.3734, 0.5629, 0.41, 0.578]}, {"w": "might", "b": [0.4171, 0.5629, 0.4647, 0.578]}, {"w": "increase.", "b": [0.4718, 0.5629, 0.5421, 0.578]}, {"w": "The", "b": [0.5532, 0.5629, 0.5856, 0.578]}, {"w": "users", "b": [0.5928, 0.5629, 0.6338, 0.578]}, {"w": "must", "b": [0.6409, 0.5629, 0.6813, 0.578]}, {"w": "download", "b": [0.6884, 0.5629, 0.7664, 0.578]}, {"w": "the", "b": [0.7735, 0.5629, 0.7996, 0.578]}, {"w": "model’s", "b": [0.8068, 0.5629, 0.8691, 0.578]}, {"w": "parameters", "b": [0.1312, 0.581, 0.2198, 0.5959]}, {"w": "each", "b": [0.2259, 0.581, 0.2609, 0.5959]}, {"w": "time", "b": [0.2671, 0.581, 0.3026, 0.5959]}, {"w": "they", "b": [0.3087, 0.581, 0.3438, 0.5959]}, {"w": "start", "b": [0.3499, 0.581, 0.3876, 0.5959]}, {"w": "the", "b": [0.3938, 0.581, 0.4192, 0.5959]}, {"w": "web", "b": [0.4253, 0.581, 0.4563, 0.5959]}, {"w": "application,", "b": [0.4624, 0.581, 0.5558, 0.5959]}, {"w": "as", "b": [0.5619, 0.581, 0.5783, 0.5959]}, {"w": "opposed", "b": [0.5844, 0.581, 0.649, 0.5959]}, {"w": "to", "b": [0.6551, 0.581, 0.6714, 0.5959]}, {"w": "doing", "b": [0.6775, 0.581, 0.7212, 0.5959]}, {"w": "it", "b": [0.7273, 0.581, 0.7395, 0.5959]}, {"w": "only", "b": [0.7456, 0.581, 0.7797, 0.5959]}, {"w": "once", "b": [0.7858, 0.581, 0.8213, 0.5959]}, {"w": "when", "b": [0.8275, 0.581, 0.8691, 0.5959]}, {"w": "they", "b": [0.1312, 0.5989, 0.1666, 0.6139]}, {"w": "install", "b": [0.1728, 0.5989, 0.2221, 0.6139]}, {"w": "an", "b": [0.2282, 0.5989, 0.2477, 0.6139]}, {"w": "application.", "b": [0.2539, 0.5989, 0.3482, 0.6139]}]}, {"id": "b_8", "type": "paragraph", "text": "Another drawback occurs during model updates. Recall, a serialized object can be quite voluminous. Some users may be offline during the update, or even turn offall future updates. In that case, you may end up with different users using very different model versions. Now it becomes difficult to upgrade the server-side part of the application.", "words": [{"w": "Another", "b": [0.1305, 0.6257, 0.1981, 0.6408]}, {"w": "drawback", "b": [0.2051, 0.6257, 0.2831, 0.6408]}, {"w": "occurs", "b": [0.2901, 0.6257, 0.3421, 0.6408]}, {"w": "during", "b": [0.3491, 0.6257, 0.4025, 0.6408]}, {"w": "model", "b": [0.4096, 0.6257, 0.4593, 0.6408]}, {"w": "updates.", "b": [0.4663, 0.6257, 0.536, 0.6408]}, {"w": "Recall,", "b": [0.5469, 0.6257, 0.6026, 0.6408]}, {"w": "a", "b": [0.6099, 0.6257, 0.6193, 0.6408]}, {"w": "serialized", "b": [0.6263, 0.6257, 0.7018, 0.6408]}, {"w": "object", "b": [0.7089, 0.6257, 0.7591, 0.6408]}, {"w": "can", "b": [0.7661, 0.6257, 0.7944, 0.6408]}, {"w": "be", "b": [0.8014, 0.6257, 0.8208, 0.6408]}, {"w": "quite", "b": [0.8278, 0.6257, 0.8691, 0.6408]}, {"w": "voluminous.", "b": [0.1308, 0.6439, 0.2253, 0.6587]}, {"w": "Some", "b": [0.2334, 0.6439, 0.2756, 0.6587]}, {"w": "users", "b": [0.2816, 0.6439, 0.321, 0.6587]}, {"w": "may", "b": [0.327, 0.6439, 0.3601, 0.6587]}, {"w": "be", "b": [0.3661, 0.6439, 0.3847, 0.6587]}, {"w": "offline", "b": [0.3907, 0.6439, 0.4379, 0.6587]}, {"w": "during", "b": [0.4438, 0.6439, 0.4952, 0.6587]}, {"w": "the", "b": [0.5011, 0.6439, 0.5262, 0.6587]}, {"w": "update,", "b": [0.5322, 0.6439, 0.592, 0.6587]}, {"w": "or", "b": [0.598, 0.6439, 0.6141, 0.6587]}, {"w": "even", "b": [0.6201, 0.6439, 0.6553, 0.6587]}, {"w": "turn", "b": [0.6612, 0.6439, 0.6954, 0.6587]}, {"w": "offall", "b": [0.7014, 0.6439, 0.746, 0.6587]}, {"w": "future", "b": [0.752, 0.6439, 0.7998, 0.6587]}, {"w": "updates.", "b": [0.8057, 0.6439, 0.8727, 0.6587]}, {"w": "In", "b": [0.1312, 0.6619, 0.1478, 0.6767]}, {"w": "that", "b": [0.1539, 0.6619, 0.187, 0.6767]}, {"w": "case,", "b": [0.1931, 0.6619, 0.2304, 0.6767]}, {"w": "you", "b": [0.2364, 0.6619, 0.2646, 0.6767]}, {"w": "may", "b": [0.2706, 0.6619, 0.3037, 0.6767]}, {"w": "end", "b": [0.3098, 0.6619, 0.3379, 0.6767]}, {"w": "up", "b": [0.344, 0.6619, 0.3641, 0.6767]}, {"w": "with", "b": [0.3701, 0.6619, 0.4053, 0.6767]}, {"w": "different", "b": [0.4114, 0.6619, 0.4767, 0.6767]}, {"w": "users", "b": [0.4828, 0.6619, 0.5222, 0.6767]}, {"w": "using", "b": [0.5283, 0.6619, 0.5696, 0.6767]}, {"w": "very", "b": [0.5756, 0.6619, 0.6093, 0.6767]}, {"w": "different", "b": [0.6154, 0.6619, 0.6808, 0.6767]}, {"w": "model", "b": [0.6868, 0.6619, 0.7346, 0.6767]}, {"w": "versions.", "b": [0.7406, 0.6619, 0.8082, 0.6767]}, {"w": "Now", "b": [0.8163, 0.6619, 0.8515, 0.6767]}, {"w": "it", "b": [0.8575, 0.6619, 0.8696, 0.6767]}, {"w": "becomes", "b": [0.1312, 0.6797, 0.1985, 0.6946]}, {"w": "difficult", "b": [0.2047, 0.6797, 0.2662, 0.6946]}, {"w": "to", "b": [0.2723, 0.6797, 0.2887, 0.6946]}, {"w": "upgrade", "b": [0.2949, 0.6797, 0.3595, 0.6946]}, {"w": "the", "b": [0.3657, 0.6797, 0.3913, 0.6946]}, {"w": "server-side", "b": [0.3975, 0.6797, 0.4819, 0.6946]}, {"w": "part", "b": [0.4881, 0.6797, 0.522, 0.6946]}, {"w": "of", "b": [0.5281, 0.6797, 0.543, 0.6946]}, {"w": "the", "b": [0.5491, 0.6797, 0.5748, 0.6946]}, {"w": "application.", "b": [0.5809, 0.6797, 0.6752, 0.6946]}]}, {"id": "b_9", "type": "paragraph", "text": "Deploying models on the user’s device means that the model easily becomes available for third-party analyses. They may try to reverse-engineer the model to reproduce its behavior. They may search for weaknesses by providing various inputs and observing the output. Or, they may adapt their data so the model predicts what they want.", "words": [{"w": "Deploying", "b": [0.1312, 0.7065, 0.2136, 0.7216]}, {"w": "models", "b": [0.2202, 0.7065, 0.2773, 0.7216]}, {"w": "on", "b": [0.284, 0.7065, 0.3038, 0.7216]}, {"w": "the", "b": [0.3104, 0.7065, 0.3366, 0.7216]}, {"w": "user’s", "b": [0.3432, 0.7065, 0.3895, 0.7216]}, {"w": "device", "b": [0.3962, 0.7065, 0.4469, 0.7216]}, {"w": "means", "b": [0.4535, 0.7065, 0.5049, 0.7216]}, {"w": "that", "b": [0.5115, 0.7065, 0.546, 0.7216]}, {"w": "the", "b": [0.5526, 0.7065, 0.5788, 0.7216]}, {"w": "model", "b": [0.5854, 0.7065, 0.6351, 0.7216]}, {"w": "easily", "b": [0.6417, 0.7065, 0.6873, 0.7216]}, {"w": "becomes", "b": [0.6939, 0.7065, 0.7625, 0.7216]}, {"w": "available", "b": [0.7692, 0.7065, 0.8403, 0.7216]}, {"w": "for", "b": [0.8469, 0.7065, 0.8695, 0.7216]}, {"w": "third-party", "b": [0.1312, 0.7246, 0.22, 0.7395]}, {"w": "analyses.", "b": [0.2262, 0.7246, 0.2972, 0.7395]}, {"w": "They", "b": [0.3054, 0.7246, 0.3467, 0.7395]}, {"w": "may", "b": [0.3529, 0.7246, 0.3865, 0.7395]}, {"w": "try", "b": [0.3927, 0.7246, 0.4167, 0.7395]}, {"w": "to", "b": [0.4228, 0.7246, 0.4391, 0.7395]}, {"w": "reverse-engineer", "b": [0.4453, 0.7246, 0.573, 0.7395]}, {"w": "the", "b": [0.5792, 0.7246, 0.6046, 0.7395]}, {"w": "model", "b": [0.6108, 0.7246, 0.6592, 0.7395]}, {"w": "to", "b": [0.6654, 0.7246, 0.6817, 0.7395]}, {"w": "reproduce", "b": [0.6878, 0.7246, 0.767, 0.7395]}, {"w": "its", "b": [0.7731, 0.7246, 0.7926, 0.7395]}, {"w": "behavior.", "b": [0.7988, 0.7246, 0.8727, 0.7395]}, {"w": "They", "b": [0.1306, 0.7425, 0.1722, 0.7575]}, {"w": "may", "b": [0.1784, 0.7425, 0.2123, 0.7575]}, {"w": "search", "b": [0.2185, 0.7425, 0.2685, 0.7575]}, {"w": "for", "b": [0.2747, 0.7425, 0.2969, 0.7575]}, {"w": "weaknesses", "b": [0.303, 0.7425, 0.3918, 0.7575]}, {"w": "by", "b": [0.398, 0.7425, 0.4175, 0.7575]}, {"w": "providing", "b": [0.4237, 0.7425, 0.4999, 0.7575]}, {"w": "various", "b": [0.506, 0.7425, 0.5633, 0.7575]}, {"w": "inputs", "b": [0.5695, 0.7425, 0.62, 0.7575]}, {"w": "and", "b": [0.6261, 0.7425, 0.656, 0.7575]}, {"w": "observing", "b": [0.6622, 0.7425, 0.7389, 0.7575]}, {"w": "the", "b": [0.7451, 0.7425, 0.7708, 0.7575]}, {"w": "output.", "b": [0.777, 0.7425, 0.8366, 0.7575]}, {"w": "Or,", "b": [0.8449, 0.7425, 0.8717, 0.7575]}, {"w": "they", "b": [0.1312, 0.7604, 0.1666, 0.7754]}, {"w": "may", "b": [0.1728, 0.7604, 0.2066, 0.7754]}, {"w": "adapt", "b": [0.2127, 0.7604, 0.2589, 0.7754]}, {"w": "their", "b": [0.265, 0.7604, 0.303, 0.7754]}, {"w": "data", "b": [0.3092, 0.7604, 0.3451, 0.7754]}, {"w": "so", "b": [0.3512, 0.7604, 0.3677, 0.7754]}, {"w": "the", "b": [0.3739, 0.7604, 0.3995, 0.7754]}, {"w": "model", "b": [0.4057, 0.7604, 0.4544, 0.7754]}, {"w": "predicts", "b": [0.4605, 0.7604, 0.5243, 0.7754]}, {"w": "what", "b": [0.5304, 0.7604, 0.5704, 0.7754]}, {"w": "they", "b": [0.5765, 0.7604, 0.6119, 0.7754]}, {"w": "want.", "b": [0.6181, 0.7604, 0.6622, 0.7754]}]}, {"id": "b_10", "type": "paragraph", "text": "Suppose the mobile application allows the user to read news related to their interests. A content provider might try to reverse engineer the model, so that it now recommends more often the news from that content provider.", "words": [{"w": "Suppose", "b": [0.1312, 0.7872, 0.1988, 0.8024]}, {"w": "the", "b": [0.2076, 0.7872, 0.2338, 0.8024]}, {"w": "mobile", "b": [0.2426, 0.7872, 0.297, 0.8024]}, {"w": "application", "b": [0.3058, 0.7872, 0.3968, 0.8024]}, {"w": "allows", "b": [0.4056, 0.7872, 0.4554, 0.8024]}, {"w": "the", "b": [0.4642, 0.7872, 0.4903, 0.8024]}, {"w": "user", "b": [0.4991, 0.7872, 0.5328, 0.8024]}, {"w": "to", "b": [0.5416, 0.7872, 0.5583, 0.8024]}, {"w": "read", "b": [0.5671, 0.7872, 0.6027, 0.8024]}, {"w": "news", "b": [0.6116, 0.7872, 0.6514, 0.8024]}, {"w": "related", "b": [0.6602, 0.7872, 0.7168, 0.8024]}, {"w": "to", "b": [0.7256, 0.7872, 0.7423, 0.8024]}, {"w": "their", "b": [0.7511, 0.7872, 0.7899, 0.8024]}, {"w": "interests.", "b": [0.7987, 0.7872, 0.8727, 0.8024]}, {"w": "A", "b": [0.1305, 0.8054, 0.1441, 0.8202]}, {"w": "content", "b": [0.15, 0.8054, 0.2082, 0.8202]}, {"w": "provider", "b": [0.2141, 0.8054, 0.2796, 0.8202]}, {"w": "might", "b": [0.2854, 0.8054, 0.3311, 0.8202]}, {"w": "try", "b": [0.337, 0.8054, 0.3607, 0.8202]}, {"w": "to", "b": [0.3665, 0.8054, 0.3826, 0.8202]}, {"w": "reverse", "b": [0.3885, 0.8054, 0.443, 0.8202]}, {"w": "engineer", "b": [0.4488, 0.8054, 0.5142, 0.8202]}, {"w": "the", "b": [0.5201, 0.8054, 0.5452, 0.8202]}, {"w": "model,", "b": [0.5511, 0.8054, 0.6039, 0.8202]}, {"w": "so", "b": [0.6098, 0.8054, 0.626, 0.8202]}, {"w": "that", "b": [0.6319, 0.8054, 0.665, 0.8202]}, {"w": "it", "b": [0.6709, 0.8054, 0.683, 0.8202]}, {"w": "now", "b": [0.6888, 0.8054, 0.7205, 0.8202]}, {"w": "recommends", "b": [0.7264, 0.8054, 0.824, 0.8202]}, {"w": "more", "b": [0.8298, 0.8054, 0.8691, 0.8202]}, {"w": "often", "b": [0.1312, 0.8233, 0.1717, 0.8382]}, {"w": "the", "b": [0.1779, 0.8233, 0.2035, 0.8382]}, {"w": "news", "b": [0.2097, 0.8233, 0.2488, 0.8382]}, {"w": "from", "b": [0.2549, 0.8233, 0.2924, 0.8382]}, {"w": "that", "b": [0.2985, 0.8233, 0.3324, 0.8382]}, {"w": "content", "b": [0.3385, 0.8233, 0.398, 0.8382]}, {"w": "provider.", "b": [0.4042, 0.8233, 0.476, 0.8382]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "5", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 245, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 2: Deploying a machine learning model as a web service on a virtual machine.", "words": [{"w": "Figure", "b": [0.1557, 0.4384, 0.2078, 0.4533]}, {"w": "2:", "b": [0.2139, 0.4384, 0.2283, 0.4533]}, {"w": "Deploying", "b": [0.2365, 0.4384, 0.3172, 0.4533]}, {"w": "a", "b": [0.3234, 0.4384, 0.3326, 0.4533]}, {"w": "machine", "b": [0.3387, 0.4384, 0.4049, 0.4533]}, {"w": "learning", "b": [0.411, 0.4384, 0.4757, 0.4533]}, {"w": "model", "b": [0.4818, 0.4384, 0.5305, 0.4533]}, {"w": "as", "b": [0.5367, 0.4384, 0.5532, 0.4533]}, {"w": "a", "b": [0.5594, 0.4384, 0.5686, 0.4533]}, {"w": "web", "b": [0.5747, 0.4384, 0.606, 0.4533]}, {"w": "service", "b": [0.6122, 0.4384, 0.6662, 0.4533]}, {"w": "on", "b": [0.6723, 0.4384, 0.6918, 0.4533]}, {"w": "a", "b": [0.6979, 0.4384, 0.7072, 0.4533]}, {"w": "virtual", "b": [0.7133, 0.4384, 0.7672, 0.4533]}, {"w": "machine.", "b": [0.7734, 0.4384, 0.8446, 0.4533]}]}, {"id": "b_1", "type": "paragraph", "text": "As with static deployment, deploying to a user’s device makes it difficult to monitor the model performance.", "words": [{"w": "As", "b": [0.1305, 0.4885, 0.1521, 0.5036]}, {"w": "with", "b": [0.1592, 0.4885, 0.1958, 0.5036]}, {"w": "static", "b": [0.203, 0.4885, 0.2481, 0.5036]}, {"w": "deployment,", "b": [0.2552, 0.4885, 0.3551, 0.5036]}, {"w": "deploying", "b": [0.3625, 0.4885, 0.441, 0.5036]}, {"w": "to", "b": [0.4481, 0.4885, 0.4649, 0.5036]}, {"w": "a", "b": [0.472, 0.4885, 0.4814, 0.5036]}, {"w": "user’s", "b": [0.4886, 0.4885, 0.5349, 0.5036]}, {"w": "device", "b": [0.542, 0.4885, 0.5928, 0.5036]}, {"w": "makes", "b": [0.5999, 0.4885, 0.6503, 0.5036]}, {"w": "it", "b": [0.6574, 0.4885, 0.67, 0.5036]}, {"w": "difficult", "b": [0.6771, 0.4885, 0.7398, 0.5036]}, {"w": "to", "b": [0.747, 0.4885, 0.7637, 0.5036]}, {"w": "monitor", "b": [0.7709, 0.4885, 0.8358, 0.5036]}, {"w": "the", "b": [0.8429, 0.4885, 0.8691, 0.5036]}, {"w": "model", "b": [0.1312, 0.5066, 0.1799, 0.5215]}, {"w": "performance.", "b": [0.1861, 0.5066, 0.2908, 0.5215]}]}, {"id": "b_2", "type": "paragraph", "text": "8.3 Dynamic Deployment on a Server", "words": [{"w": "8.3", "b": [0.1312, 0.5551, 0.1631, 0.5731]}, {"w": "Dynamic", "b": [0.188, 0.5551, 0.2849, 0.5731]}, {"w": "Deployment", "b": [0.2932, 0.5551, 0.4244, 0.5731]}, {"w": "on", "b": [0.4327, 0.5551, 0.459, 0.5731]}, {"w": "a", "b": [0.4673, 0.5551, 0.4794, 0.5731]}, {"w": "Server", "b": [0.4877, 0.5551, 0.5571, 0.5731]}]}, {"id": "b_3", "type": "paragraph", "text": "Because of the above complications, and problems with performance monitoring, the most frequent deployment pattern is to place the model on a server (or servers), and make it available as a Representational State Transfer application programming interface (REST API) in the form of a web service, or Google’s Remote Procedure Call (gRPC) service.", "words": [{"w": "Because", "b": [0.1312, 0.5939, 0.1965, 0.609]}, {"w": "of", "b": [0.2027, 0.5939, 0.2177, 0.609]}, {"w": "the", "b": [0.2239, 0.5939, 0.2498, 0.609]}, {"w": "above", "b": [0.256, 0.5939, 0.3027, 0.609]}, {"w": "complications,", "b": [0.3088, 0.5939, 0.4253, 0.609]}, {"w": "and", "b": [0.4314, 0.5939, 0.4615, 0.609]}, {"w": "problems", "b": [0.4677, 0.5939, 0.5416, 0.609]}, {"w": "with", "b": [0.5477, 0.5939, 0.5841, 0.609]}, {"w": "performance", "b": [0.5902, 0.5939, 0.6911, 0.609]}, {"w": "monitoring,", "b": [0.6972, 0.5939, 0.7918, 0.609]}, {"w": "the", "b": [0.7979, 0.5939, 0.8239, 0.609]}, {"w": "most", "b": [0.83, 0.5939, 0.8696, 0.609]}, {"w": "frequent", "b": [0.1312, 0.6118, 0.1988, 0.6269]}, {"w": "deployment", "b": [0.2063, 0.6118, 0.3009, 0.6269]}, {"w": "pattern", "b": [0.3084, 0.6118, 0.3692, 0.6269]}, {"w": "is", "b": [0.3766, 0.6118, 0.3893, 0.6269]}, {"w": "to", "b": [0.3968, 0.6118, 0.4135, 0.6269]}, {"w": "place", "b": [0.421, 0.6118, 0.4628, 0.6269]}, {"w": "the", "b": [0.4703, 0.6118, 0.4965, 0.6269]}, {"w": "model", "b": [0.5039, 0.6118, 0.5536, 0.6269]}, {"w": "on", "b": [0.5611, 0.6118, 0.581, 0.6269]}, {"w": "a", "b": [0.5884, 0.6118, 0.5979, 0.6269]}, {"w": "server", "b": [0.6053, 0.6118, 0.6537, 0.6269]}, {"w": "(or", "b": [0.6612, 0.6118, 0.6853, 0.6269]}, {"w": "servers),", "b": [0.6928, 0.6118, 0.7611, 0.6269]}, {"w": "and", "b": [0.7689, 0.6118, 0.7992, 0.6269]}, {"w": "make", "b": [0.8067, 0.6118, 0.8496, 0.6269]}, {"w": "it", "b": [0.8571, 0.6118, 0.8696, 0.6269]}, {"w": "available", "b": [0.1312, 0.6298, 0.2024, 0.6449]}, {"w": "as", "b": [0.2087, 0.6298, 0.2255, 0.6449]}, {"w": "a", "b": [0.2318, 0.6298, 0.2412, 0.6449]}, {"w": "Representational", "b": [0.2475, 0.6298, 0.3855, 0.6449]}, {"w": "State", "b": [0.3918, 0.6298, 0.4346, 0.6449]}, {"w": "Transfer", "b": [0.4409, 0.6298, 0.5092, 0.6449]}, {"w": "application", "b": [0.5154, 0.6298, 0.6064, 0.6449]}, {"w": "programming", "b": [0.6127, 0.6298, 0.7226, 0.6449]}, {"w": "interface", "b": [0.7289, 0.6298, 0.7991, 0.6449]}, {"w": "(REST", "b": [0.8053, 0.6298, 0.8688, 0.6449]}, {"w": "API)", "b": [0.1312, 0.6478, 0.177, 0.6628]}, {"w": "in", "b": [0.1831, 0.6478, 0.1985, 0.6628]}, {"w": "the", "b": [0.2047, 0.6478, 0.2303, 0.6628]}, {"w": "form", "b": [0.2365, 0.6478, 0.2739, 0.6628]}, {"w": "of", "b": [0.2801, 0.6478, 0.295, 0.6628]}, {"w": "a", "b": [0.3011, 0.6478, 0.3103, 0.6628]}, {"w": "web", "b": [0.3165, 0.6478, 0.3478, 0.6628]}, {"w": "service,", "b": [0.3539, 0.6478, 0.4131, 0.6628]}, {"w": "or", "b": [0.4192, 0.6478, 0.4357, 0.6628]}, {"w": "Google’s", "b": [0.4418, 0.6478, 0.5102, 0.6628]}, {"w": "Remote", "b": [0.5164, 0.6478, 0.5781, 0.6628]}, {"w": "Procedure", "b": [0.5843, 0.6478, 0.6662, 0.6628]}, {"w": "Call", "b": [0.6724, 0.6478, 0.7052, 0.6628]}, {"w": "(gRPC)", "b": [0.7113, 0.6478, 0.7818, 0.6628]}, {"w": "service.", "b": [0.7879, 0.6478, 0.8471, 0.6628]}]}, {"id": "b_4", "type": "paragraph", "text": "8.3.1 Deployment on a Virtual Machine", "words": [{"w": "8.3.1", "b": [0.1312, 0.6957, 0.1749, 0.7107]}, {"w": "Deployment", "b": [0.1961, 0.6957, 0.3078, 0.7107]}, {"w": "on", "b": [0.3149, 0.6957, 0.3373, 0.7107]}, {"w": "a", "b": [0.3444, 0.6957, 0.3547, 0.7107]}, {"w": "Virtual", "b": [0.3618, 0.6957, 0.4287, 0.7107]}, {"w": "Machine", "b": [0.4358, 0.6957, 0.5143, 0.7107]}]}, {"id": "b_5", "type": "paragraph", "text": "In a typical web service architecture deployed in a cloud environment, the predictions are served in response to canonically-formatted HTTP requests. A web service running on a virtual machine receives a user request containing the input data, calls the machine learning system on that input data, and then transforms the output of the machine learning system into the output JavaScript Object Notation (JSON) or Extensible Markup Language (XML) string. To cope with high load, several identical virtual machines are running in parallel.", "words": [{"w": "In", "b": [0.1312, 0.7321, 0.1485, 0.7473]}, {"w": "a", "b": [0.1548, 0.7321, 0.1642, 0.7473]}, {"w": "typical", "b": [0.1704, 0.7321, 0.2259, 0.7473]}, {"w": "web", "b": [0.2321, 0.7321, 0.2641, 0.7473]}, {"w": "service", "b": [0.2703, 0.7321, 0.3254, 0.7473]}, {"w": "architecture", "b": [0.3317, 0.7321, 0.4296, 0.7473]}, {"w": "deployed", "b": [0.4359, 0.7321, 0.5075, 0.7473]}, {"w": "in", "b": [0.5138, 0.7321, 0.5295, 0.7473]}, {"w": "a", "b": [0.5358, 0.7321, 0.5452, 0.7473]}, {"w": "cloud", "b": [0.5514, 0.7321, 0.5954, 0.7473]}, {"w": "environment,", "b": [0.6016, 0.7321, 0.7089, 0.7473]}, {"w": "the", "b": [0.7152, 0.7321, 0.7414, 0.7473]}, {"w": "predictions", "b": [0.7476, 0.7321, 0.8378, 0.7473]}, {"w": "are", "b": [0.844, 0.7321, 0.8692, 0.7473]}, {"w": "served", "b": [0.1312, 0.7501, 0.1827, 0.7652]}, {"w": "in", "b": [0.1895, 0.7501, 0.2052, 0.7652]}, {"w": "response", "b": [0.212, 0.7501, 0.2818, 0.7652]}, {"w": "to", "b": [0.2886, 0.7501, 0.3053, 0.7652]}, {"w": "canonically-formatted", "b": [0.3122, 0.7501, 0.491, 0.7652]}, {"w": "HTTP", "b": [0.4979, 0.7501, 0.552, 0.7652]}, {"w": "requests.", "b": [0.5587, 0.7501, 0.6307, 0.7652]}, {"w": "A", "b": [0.6409, 0.7501, 0.655, 0.7652]}, {"w": "web", "b": [0.6618, 0.7501, 0.6937, 0.7652]}, {"w": "service", "b": [0.7005, 0.7501, 0.7556, 0.7652]}, {"w": "running", "b": [0.7624, 0.7501, 0.8262, 0.7652]}, {"w": "on", "b": [0.833, 0.7501, 0.8529, 0.7652]}, {"w": "a", "b": [0.8597, 0.7501, 0.8691, 0.7652]}, {"w": "virtual", "b": [0.1308, 0.7682, 0.184, 0.7831]}, {"w": "machine", "b": [0.1901, 0.7682, 0.2555, 0.7831]}, {"w": "receives", "b": [0.2616, 0.7682, 0.3225, 0.7831]}, {"w": "a", "b": [0.3287, 0.7682, 0.3378, 0.7831]}, {"w": "user", "b": [0.3439, 0.7682, 0.3765, 0.7831]}, {"w": "request", "b": [0.3826, 0.7682, 0.44, 0.7831]}, {"w": "containing", "b": [0.4462, 0.7682, 0.5287, 0.7831]}, {"w": "the", "b": [0.5349, 0.7682, 0.5602, 0.7831]}, {"w": "input", "b": [0.5663, 0.7682, 0.6089, 0.7831]}, {"w": "data,", "b": [0.615, 0.7682, 0.6555, 0.7831]}, {"w": "calls", "b": [0.6617, 0.7682, 0.6962, 0.7831]}, {"w": "the", "b": [0.7023, 0.7682, 0.7277, 0.7831]}, {"w": "machine", "b": [0.7338, 0.7682, 0.7992, 0.7831]}, {"w": "learning", "b": [0.8053, 0.7682, 0.8692, 0.7831]}, {"w": "system", "b": [0.1312, 0.7861, 0.1864, 0.8011]}, {"w": "on", "b": [0.1926, 0.7861, 0.2121, 0.8011]}, {"w": "that", "b": [0.2182, 0.7861, 0.2522, 0.8011]}, {"w": "input", "b": [0.2583, 0.7861, 0.3015, 0.8011]}, {"w": "data,", "b": [0.3076, 0.7861, 0.3487, 0.8011]}, {"w": "and", "b": [0.3549, 0.7861, 0.3847, 0.8011]}, {"w": "then", "b": [0.3908, 0.7861, 0.4268, 0.8011]}, {"w": "transforms", "b": [0.4329, 0.7861, 0.519, 0.8011]}, {"w": "the", "b": [0.5252, 0.7861, 0.5509, 0.8011]}, {"w": "output", "b": [0.557, 0.7861, 0.6115, 0.8011]}, {"w": "of", "b": [0.6177, 0.7861, 0.6326, 0.8011]}, {"w": "the", "b": [0.6387, 0.7861, 0.6644, 0.8011]}, {"w": "machine", "b": [0.6705, 0.7861, 0.7368, 0.8011]}, {"w": "learning", "b": [0.743, 0.7861, 0.8078, 0.8011]}, {"w": "system", "b": [0.8139, 0.7861, 0.8691, 0.8011]}, {"w": "into", "b": [0.1312, 0.8041, 0.1621, 0.819]}, {"w": "the", "b": [0.1682, 0.8041, 0.1935, 0.819]}, {"w": "output", "b": [0.1997, 0.8041, 0.2533, 0.819]}, {"w": "JavaScript", "b": [0.2594, 0.8041, 0.3427, 0.819]}, {"w": "Object", "b": [0.3489, 0.8041, 0.4025, 0.819]}, {"w": "Notation", "b": [0.4087, 0.8041, 0.479, 0.819]}, {"w": "(JSON)", "b": [0.4851, 0.8041, 0.5466, 0.819]}, {"w": "or", "b": [0.5527, 0.8041, 0.569, 0.819]}, {"w": "Extensible", "b": [0.5751, 0.8041, 0.658, 0.819]}, {"w": "Markup", "b": [0.6641, 0.8041, 0.7269, 0.819]}, {"w": "Language", "b": [0.733, 0.8041, 0.8092, 0.819]}, {"w": "(XML)", "b": [0.8153, 0.8041, 0.8712, 0.819]}, {"w": "string.", "b": [0.1312, 0.822, 0.1827, 0.837]}, {"w": "To", "b": [0.1909, 0.822, 0.2119, 0.837]}, {"w": "cope", "b": [0.218, 0.822, 0.2544, 0.837]}, {"w": "with", "b": [0.2606, 0.822, 0.2965, 0.837]}, {"w": "high", "b": [0.3026, 0.822, 0.3375, 0.837]}, {"w": "load,", "b": [0.3436, 0.822, 0.3826, 0.837]}, {"w": "several", "b": [0.3887, 0.822, 0.4433, 0.837]}, {"w": "identical", "b": [0.4494, 0.822, 0.5176, 0.837]}, {"w": "virtual", "b": [0.5238, 0.822, 0.5777, 0.837]}, {"w": "machines", "b": [0.5838, 0.822, 0.6572, 0.837]}, {"w": "are", "b": [0.6634, 0.822, 0.6881, 0.837]}, {"w": "running", "b": [0.6942, 0.822, 0.7568, 0.837]}, {"w": "in", "b": [0.763, 0.822, 0.7783, 0.837]}, {"w": "parallel.", "b": [0.7845, 0.822, 0.8492, 0.837]}]}, {"id": "b_6", "type": "paragraph", "text": "A load balancer dispatches the incoming requests to a specific virtual machine, depending", "words": [{"w": "A", "b": [0.1305, 0.849, 0.1443, 0.8639]}, {"w": "load", "b": [0.1504, 0.8489, 0.189, 0.8639]}, {"w": "balancer", "b": [0.1961, 0.8489, 0.2741, 0.8639]}, {"w": "dispatches", "b": [0.2802, 0.849, 0.3623, 0.8639]}, {"w": "the", "b": [0.3684, 0.849, 0.3939, 0.8639]}, {"w": "incoming", "b": [0.4, 0.849, 0.4722, 0.8639]}, {"w": "requests", "b": [0.4783, 0.849, 0.5432, 0.8639]}, {"w": "to", "b": [0.5493, 0.849, 0.5656, 0.8639]}, {"w": "a", "b": [0.5718, 0.849, 0.5809, 0.8639]}, {"w": "specific", "b": [0.587, 0.849, 0.6446, 0.8639]}, {"w": "virtual", "b": [0.6508, 0.849, 0.7042, 0.8639]}, {"w": "machine,", "b": [0.7104, 0.849, 0.781, 0.8639]}, {"w": "depending", "b": [0.7872, 0.849, 0.8691, 0.8639]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "6", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 246, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "on its availability. The virtual machines can be added and closed manually, or be a part of an autoscaling group that launches or terminates virtual machines based on their usage. Figure 2 illustrates that deployment pattern. Each instance, denoted as an orange square, contains all the code needed to run the feature extractor and the model. The instance also contains a web service that has access to that code.", "words": [{"w": "on", "b": [0.1312, 0.0884, 0.1508, 0.1034]}, {"w": "its", "b": [0.157, 0.0884, 0.1767, 0.1034]}, {"w": "availability.", "b": [0.1828, 0.0884, 0.2752, 0.1034]}, {"w": "The", "b": [0.2834, 0.0884, 0.3153, 0.1034]}, {"w": "virtual", "b": [0.3215, 0.0884, 0.3757, 0.1034]}, {"w": "machines", "b": [0.3818, 0.0884, 0.4557, 0.1034]}, {"w": "can", "b": [0.4619, 0.0884, 0.4897, 0.1034]}, {"w": "be", "b": [0.4958, 0.0884, 0.5149, 0.1034]}, {"w": "added", "b": [0.5211, 0.0884, 0.5696, 0.1034]}, {"w": "and", "b": [0.5757, 0.0884, 0.6056, 0.1034]}, {"w": "closed", "b": [0.6118, 0.0884, 0.6604, 0.1034]}, {"w": "manually,", "b": [0.6665, 0.0884, 0.7444, 0.1034]}, {"w": "or", "b": [0.7505, 0.0884, 0.7671, 0.1034]}, {"w": "be", "b": [0.7732, 0.0884, 0.7923, 0.1034]}, {"w": "a", "b": [0.7985, 0.0884, 0.8078, 0.1034]}, {"w": "part", "b": [0.8139, 0.0884, 0.848, 0.1034]}, {"w": "of", "b": [0.8541, 0.0884, 0.8691, 0.1034]}, {"w": "an", "b": [0.1312, 0.1063, 0.151, 0.1213]}, {"w": "autoscaling", "b": [0.1573, 0.1064, 0.2605, 0.1213]}, {"w": "group", "b": [0.2676, 0.1064, 0.3211, 0.1213]}, {"w": "that", "b": [0.3273, 0.1063, 0.3616, 0.1213]}, {"w": "launches", "b": [0.3677, 0.1063, 0.437, 0.1213]}, {"w": "or", "b": [0.4432, 0.1063, 0.4598, 0.1213]}, {"w": "terminates", "b": [0.466, 0.1063, 0.5524, 0.1213]}, {"w": "virtual", "b": [0.5586, 0.1063, 0.6132, 0.1213]}, {"w": "machines", "b": [0.6194, 0.1063, 0.6939, 0.1213]}, {"w": "based", "b": [0.7, 0.1063, 0.7459, 0.1213]}, {"w": "on", "b": [0.752, 0.1063, 0.7718, 0.1213]}, {"w": "their", "b": [0.7779, 0.1063, 0.8164, 0.1213]}, {"w": "usage.", "b": [0.8226, 0.1063, 0.8726, 0.1213]}, {"w": "Figure", "b": [0.1312, 0.1242, 0.1843, 0.1393]}, {"w": "2", "b": [0.1905, 0.1242, 0.1999, 0.1393]}, {"w": "illustrates", "b": [0.206, 0.1242, 0.2867, 0.1393]}, {"w": "that", "b": [0.2928, 0.1242, 0.3273, 0.1393]}, {"w": "deployment", "b": [0.3334, 0.1242, 0.428, 0.1393]}, {"w": "pattern.", "b": [0.4341, 0.1242, 0.5, 0.1393]}, {"w": "Each", "b": [0.5082, 0.1242, 0.5487, 0.1393]}, {"w": "instance,", "b": [0.5548, 0.1242, 0.6271, 0.1393]}, {"w": "denoted", "b": [0.6332, 0.1242, 0.698, 0.1393]}, {"w": "as", "b": [0.7041, 0.1242, 0.7209, 0.1393]}, {"w": "an", "b": [0.7271, 0.1242, 0.7469, 0.1393]}, {"w": "orange", "b": [0.753, 0.1242, 0.8074, 0.1393]}, {"w": "square,", "b": [0.8136, 0.1242, 0.8717, 0.1393]}, {"w": "contains", "b": [0.1312, 0.1422, 0.1979, 0.1572]}, {"w": "all", "b": [0.204, 0.1422, 0.2236, 0.1572]}, {"w": "the", "b": [0.2298, 0.1422, 0.2555, 0.1572]}, {"w": "code", "b": [0.2617, 0.1422, 0.2983, 0.1572]}, {"w": "needed", "b": [0.3045, 0.1422, 0.3602, 0.1572]}, {"w": "to", "b": [0.3663, 0.1422, 0.3828, 0.1572]}, {"w": "run", "b": [0.389, 0.1422, 0.4169, 0.1572]}, {"w": "the", "b": [0.423, 0.1422, 0.4488, 0.1572]}, {"w": "feature", "b": [0.4549, 0.1422, 0.5112, 0.1572]}, {"w": "extractor", "b": [0.5174, 0.1422, 0.5912, 0.1572]}, {"w": "and", "b": [0.5974, 0.1422, 0.6273, 0.1572]}, {"w": "the", "b": [0.6334, 0.1422, 0.6592, 0.1572]}, {"w": "model.", "b": [0.6654, 0.1422, 0.7195, 0.1572]}, {"w": "The", "b": [0.7277, 0.1422, 0.7597, 0.1572]}, {"w": "instance", "b": [0.7658, 0.1422, 0.832, 0.1572]}, {"w": "also", "b": [0.8381, 0.1422, 0.8692, 0.1572]}, {"w": "contains", "b": [0.1312, 0.1602, 0.1975, 0.1751]}, {"w": "a", "b": [0.2036, 0.1602, 0.2129, 0.1751]}, {"w": "web", "b": [0.219, 0.1602, 0.2503, 0.1751]}, {"w": "service", "b": [0.2564, 0.1602, 0.3104, 0.1751]}, {"w": "that", "b": [0.3166, 0.1602, 0.3504, 0.1751]}, {"w": "has", "b": [0.3566, 0.1602, 0.3833, 0.1751]}, {"w": "access", "b": [0.3895, 0.1602, 0.4379, 0.1751]}, {"w": "to", "b": [0.4441, 0.1602, 0.4605, 0.1751]}, {"w": "that", "b": [0.4666, 0.1602, 0.5005, 0.1751]}, {"w": "code.", "b": [0.5066, 0.1602, 0.5481, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "In Python, a REST API web service is usually implemented using a web application framework such as Flask or FastAPI. An R equivalent is Plumber.", "words": [{"w": "In", "b": [0.1312, 0.1872, 0.1478, 0.202]}, {"w": "Python,", "b": [0.1524, 0.1872, 0.2155, 0.202]}, {"w": "a", "b": [0.2204, 0.1872, 0.2294, 0.202]}, {"w": "REST", "b": [0.234, 0.1872, 0.2827, 0.202]}, {"w": "API", "b": [0.2873, 0.1872, 0.3197, 0.202]}, {"w": "web", "b": [0.3243, 0.1872, 0.3549, 0.202]}, {"w": "service", "b": [0.3595, 0.1872, 0.4124, 0.202]}, {"w": "is", "b": [0.417, 0.1872, 0.4292, 0.202]}, {"w": "usually", "b": [0.4338, 0.1872, 0.4897, 0.202]}, {"w": "implemented", "b": [0.4942, 0.1872, 0.5952, 0.202]}, {"w": "using", "b": [0.5998, 0.1872, 0.6411, 0.202]}, {"w": "a", "b": [0.6457, 0.1872, 0.6547, 0.202]}, {"w": "web", "b": [0.6593, 0.1872, 0.69, 0.202]}, {"w": "application", "b": [0.6946, 0.1872, 0.782, 0.202]}, {"w": "framework", "b": [0.7866, 0.1872, 0.8696, 0.202]}, {"w": "such", "b": [0.1312, 0.205, 0.1667, 0.22]}, {"w": "as", "b": [0.1729, 0.205, 0.1894, 0.22]}, {"w": "Flask", "b": [0.1955, 0.2051, 0.2446, 0.22]}, {"w": "or", "b": [0.2509, 0.205, 0.2674, 0.22]}, {"w": "FastAPI.", "b": [0.2735, 0.205, 0.3558, 0.22]}, {"w": "An", "b": [0.3619, 0.205, 0.386, 0.22]}, {"w": "R", "b": [0.3922, 0.205, 0.4057, 0.22]}, {"w": "equivalent", "b": [0.4119, 0.205, 0.4934, 0.22]}, {"w": "is", "b": [0.4996, 0.205, 0.512, 0.22]}, {"w": "Plumber.", "b": [0.5181, 0.205, 0.6033, 0.22]}]}, {"id": "b_2", "type": "paragraph", "text": "TensorFlow, a popular framework used to train deep models, comes with TensorFlow Serving, a built-in gRPC service.", "words": [{"w": "TensorFlow,", "b": [0.1306, 0.2321, 0.2269, 0.2469]}, {"w": "a", "b": [0.2327, 0.2321, 0.2417, 0.2469]}, {"w": "popular", "b": [0.2474, 0.2321, 0.3083, 0.2469]}, {"w": "framework", "b": [0.314, 0.2321, 0.3969, 0.2469]}, {"w": "used", "b": [0.4026, 0.2321, 0.4379, 0.2469]}, {"w": "to", "b": [0.4436, 0.2321, 0.4597, 0.2469]}, {"w": "train", "b": [0.4654, 0.2321, 0.5036, 0.2469]}, {"w": "deep", "b": [0.5093, 0.2321, 0.5455, 0.2469]}, {"w": "models,", "b": [0.5512, 0.2321, 0.6111, 0.2469]}, {"w": "comes", "b": [0.6169, 0.2321, 0.6642, 0.2469]}, {"w": "with", "b": [0.6699, 0.2321, 0.7051, 0.2469]}, {"w": "TensorFlow", "b": [0.7108, 0.2321, 0.8021, 0.2469]}, {"w": "Serving,", "b": [0.8078, 0.2321, 0.8716, 0.2469]}, {"w": "a", "b": [0.1312, 0.2499, 0.1405, 0.2649]}, {"w": "built-in", "b": [0.1466, 0.2499, 0.2061, 0.2649]}, {"w": "gRPC", "b": [0.2122, 0.2499, 0.2609, 0.2649]}, {"w": "service.", "b": [0.2671, 0.2499, 0.3262, 0.2649]}]}, {"id": "b_3", "type": "paragraph", "text": "The advantage of deploying on a virtual machine is that the architecture of the software system is conceptually simple: it’s a typical web or gRPC service.", "words": [{"w": "The", "b": [0.1306, 0.2767, 0.163, 0.2918]}, {"w": "advantage", "b": [0.17, 0.2767, 0.2526, 0.2918]}, {"w": "of", "b": [0.2596, 0.2767, 0.2748, 0.2918]}, {"w": "deploying", "b": [0.2818, 0.2767, 0.3602, 0.2918]}, {"w": "on", "b": [0.3672, 0.2767, 0.3871, 0.2918]}, {"w": "a", "b": [0.3941, 0.2767, 0.4035, 0.2918]}, {"w": "virtual", "b": [0.4105, 0.2767, 0.4655, 0.2918]}, {"w": "machine", "b": [0.4725, 0.2767, 0.5399, 0.2918]}, {"w": "is", "b": [0.5469, 0.2767, 0.5596, 0.2918]}, {"w": "that", "b": [0.5666, 0.2767, 0.6011, 0.2918]}, {"w": "the", "b": [0.6081, 0.2767, 0.6342, 0.2918]}, {"w": "architecture", "b": [0.6412, 0.2767, 0.7392, 0.2918]}, {"w": "of", "b": [0.7462, 0.2767, 0.7613, 0.2918]}, {"w": "the", "b": [0.7683, 0.2767, 0.7945, 0.2918]}, {"w": "software", "b": [0.8015, 0.2767, 0.8691, 0.2918]}, {"w": "system", "b": [0.1312, 0.2948, 0.1863, 0.3097]}, {"w": "is", "b": [0.1924, 0.2948, 0.2049, 0.3097]}, {"w": "conceptually", "b": [0.211, 0.2948, 0.312, 0.3097]}, {"w": "simple:", "b": [0.3182, 0.2948, 0.3747, 0.3097]}, {"w": "it’s", "b": [0.3829, 0.2948, 0.4076, 0.3097]}, {"w": "a", "b": [0.4138, 0.2948, 0.423, 0.3097]}, {"w": "typical", "b": [0.4291, 0.2948, 0.4835, 0.3097]}, {"w": "web", "b": [0.4896, 0.2948, 0.5209, 0.3097]}, {"w": "or", "b": [0.5271, 0.2948, 0.5435, 0.3097]}, {"w": "gRPC", "b": [0.5497, 0.2948, 0.5984, 0.3097]}, {"w": "service.", "b": [0.6045, 0.2948, 0.6637, 0.3097]}]}, {"id": "b_4", "type": "paragraph", "text": "Among the downsides, there is a need to maintain servers (physical or virtual). If virtualization is used, then there is an additional computational overhead due to virtualization and running multiple operating systems. Another is network latency, which can be a serious issue, depending on how fast you need to process scoring results. Finally, deploying on a virtual machine has a relatively higher cost, compared to deployment in a container, or a serverless deployment that we consider below.", "words": [{"w": "Among", "b": [0.1305, 0.3218, 0.1873, 0.3366]}, {"w": "the", "b": [0.1917, 0.3218, 0.2169, 0.3366]}, {"w": "downsides,", "b": [0.2213, 0.3218, 0.3054, 0.3366]}, {"w": "there", "b": [0.3102, 0.3218, 0.3505, 0.3366]}, {"w": "is", "b": [0.3549, 0.3218, 0.3671, 0.3366]}, {"w": "a", "b": [0.3716, 0.3218, 0.3806, 0.3366]}, {"w": "need", "b": [0.3851, 0.3218, 0.4213, 0.3366]}, {"w": "to", "b": [0.4257, 0.3218, 0.4418, 0.3366]}, {"w": "maintain", "b": [0.4463, 0.3218, 0.5161, 0.3366]}, {"w": "servers", "b": [0.5205, 0.3218, 0.5741, 0.3366]}, {"w": "(physical", "b": [0.5785, 0.3218, 0.649, 0.3366]}, {"w": "or", "b": [0.6535, 0.3218, 0.6696, 0.3366]}, {"w": "virtual).", "b": [0.674, 0.3218, 0.7389, 0.3366]}, {"w": "If", "b": [0.7465, 0.3218, 0.7586, 0.3366]}, {"w": "virtualization", "b": [0.7631, 0.3218, 0.8691, 0.3366]}, {"w": "is", "b": [0.1312, 0.3398, 0.1434, 0.3546]}, {"w": "used,", "b": [0.1492, 0.3398, 0.1895, 0.3546]}, {"w": "then", "b": [0.1953, 0.3398, 0.2305, 0.3546]}, {"w": "there", "b": [0.2363, 0.3398, 0.2765, 0.3546]}, {"w": "is", "b": [0.2823, 0.3398, 0.2945, 0.3546]}, {"w": "an", "b": [0.3003, 0.3398, 0.3194, 0.3546]}, {"w": "additional", "b": [0.3251, 0.3398, 0.4045, 0.3546]}, {"w": "computational", "b": [0.4103, 0.3398, 0.5238, 0.3546]}, {"w": "overhead", "b": [0.5296, 0.3398, 0.5995, 0.3546]}, {"w": "due", "b": [0.6052, 0.3398, 0.6334, 0.3546]}, {"w": "to", "b": [0.6392, 0.3398, 0.6552, 0.3546]}, {"w": "virtualization", "b": [0.661, 0.3398, 0.7671, 0.3546]}, {"w": "and", "b": [0.7729, 0.3398, 0.802, 0.3546]}, {"w": "running", "b": [0.8078, 0.3398, 0.8691, 0.3546]}, {"w": "multiple", "b": [0.1312, 0.3575, 0.1987, 0.3726]}, {"w": "operating", "b": [0.2075, 0.3575, 0.2854, 0.3726]}, {"w": "systems.", "b": [0.2942, 0.3575, 0.3631, 0.3726]}, {"w": "Another", "b": [0.3791, 0.3575, 0.4467, 0.3726]}, {"w": "is", "b": [0.4554, 0.3575, 0.4681, 0.3726]}, {"w": "network", "b": [0.4769, 0.3575, 0.5423, 0.3726]}, {"w": "latency,", "b": [0.5511, 0.3575, 0.6139, 0.3726]}, {"w": "which", "b": [0.6233, 0.3575, 0.6709, 0.3726]}, {"w": "can", "b": [0.6797, 0.3575, 0.708, 0.3726]}, {"w": "be", "b": [0.7167, 0.3575, 0.7361, 0.3726]}, {"w": "a", "b": [0.7449, 0.3575, 0.7543, 0.3726]}, {"w": "serious", "b": [0.763, 0.3575, 0.8188, 0.3726]}, {"w": "issue,", "b": [0.8275, 0.3575, 0.8717, 0.3726]}, {"w": "depending", "b": [0.1312, 0.3754, 0.2154, 0.3905]}, {"w": "on", "b": [0.2215, 0.3754, 0.2413, 0.3905]}, {"w": "how", "b": [0.2475, 0.3754, 0.2804, 0.3905]}, {"w": "fast", "b": [0.2865, 0.3754, 0.3164, 0.3905]}, {"w": "you", "b": [0.3225, 0.3754, 0.3518, 0.3905]}, {"w": "need", "b": [0.3579, 0.3754, 0.3955, 0.3905]}, {"w": "to", "b": [0.4016, 0.3754, 0.4184, 0.3905]}, {"w": "process", "b": [0.4245, 0.3754, 0.4838, 0.3905]}, {"w": "scoring", "b": [0.4899, 0.3754, 0.5476, 0.3905]}, {"w": "results.", "b": [0.5537, 0.3754, 0.6125, 0.3905]}, {"w": "Finally,", "b": [0.6207, 0.3754, 0.6821, 0.3905]}, {"w": "deploying", "b": [0.6882, 0.3754, 0.7666, 0.3905]}, {"w": "on", "b": [0.7727, 0.3754, 0.7926, 0.3905]}, {"w": "a", "b": [0.7987, 0.3754, 0.8081, 0.3905]}, {"w": "virtual", "b": [0.8142, 0.3754, 0.8691, 0.3905]}, {"w": "machine", "b": [0.1312, 0.3935, 0.1969, 0.4084]}, {"w": "has", "b": [0.2031, 0.3935, 0.2296, 0.4084]}, {"w": "a", "b": [0.2358, 0.3935, 0.245, 0.4084]}, {"w": "relatively", "b": [0.2511, 0.3935, 0.325, 0.4084]}, {"w": "higher", "b": [0.3312, 0.3935, 0.3812, 0.4084]}, {"w": "cost,", "b": [0.3873, 0.3935, 0.4241, 0.4084]}, {"w": "compared", "b": [0.4303, 0.3935, 0.5077, 0.4084]}, {"w": "to", "b": [0.5138, 0.3935, 0.5301, 0.4084]}, {"w": "deployment", "b": [0.5363, 0.3935, 0.6284, 0.4084]}, {"w": "in", "b": [0.6346, 0.3935, 0.6499, 0.4084]}, {"w": "a", "b": [0.656, 0.3935, 0.6652, 0.4084]}, {"w": "container,", "b": [0.6714, 0.3935, 0.7504, 0.4084]}, {"w": "or", "b": [0.7565, 0.3935, 0.7729, 0.4084]}, {"w": "a", "b": [0.779, 0.3935, 0.7882, 0.4084]}, {"w": "serverless", "b": [0.7943, 0.3935, 0.8691, 0.4084]}, {"w": "deployment", "b": [0.1312, 0.4114, 0.224, 0.4264]}, {"w": "that", "b": [0.2302, 0.4114, 0.264, 0.4264]}, {"w": "we", "b": [0.2702, 0.4114, 0.2912, 0.4264]}, {"w": "consider", "b": [0.2973, 0.4114, 0.3631, 0.4264]}, {"w": "below.", "b": [0.3693, 0.4114, 0.4206, 0.4264]}]}, {"id": "b_5", "type": "paragraph", "text": "8.3.2 Deployment in a Container", "words": [{"w": "8.3.2", "b": [0.1312, 0.4593, 0.1749, 0.4743]}, {"w": "Deployment", "b": [0.1961, 0.4593, 0.3078, 0.4743]}, {"w": "in", "b": [0.3149, 0.4593, 0.3326, 0.4743]}, {"w": "a", "b": [0.3397, 0.4593, 0.35, 0.4743]}, {"w": "Container", "b": [0.3571, 0.4593, 0.4489, 0.4743]}]}, {"id": "b_6", "type": "paragraph", "text": "A more modern alternative to a virtual-machine-based deployment is a container-based deployment. Working with containers is typically considered more resource-efficient and flexible than with virtual machines. A container is similar to a virtual machine, in the sense that it is also an isolated runtime environment with its own filesystem, CPU, memory, and process space. The main difference, however, is that all containers are running on the same virtual or physical machine and share the operating system, while each virtual machine runs its own instance of the operating system.", "words": [{"w": "A", "b": [0.1305, 0.4957, 0.1446, 0.5109]}, {"w": "more", "b": [0.1528, 0.4957, 0.1936, 0.5109]}, {"w": "modern", "b": [0.2017, 0.4957, 0.264, 0.5109]}, {"w": "alternative", "b": [0.2721, 0.4957, 0.36, 0.5109]}, {"w": "to", "b": [0.3681, 0.4957, 0.3848, 0.5109]}, {"w": "a", "b": [0.3929, 0.4957, 0.4023, 0.5109]}, {"w": "virtual-machine-based", "b": [0.4105, 0.4957, 0.5916, 0.5109]}, {"w": "deployment", "b": [0.5997, 0.4957, 0.6944, 0.5109]}, {"w": "is", "b": [0.7025, 0.4957, 0.7151, 0.5109]}, {"w": "a", "b": [0.7232, 0.4957, 0.7326, 0.5109]}, {"w": "container-based", "b": [0.7408, 0.4957, 0.8691, 0.5109]}, {"w": "deployment.", "b": [0.1312, 0.5137, 0.2311, 0.5288]}, {"w": "Working", "b": [0.2431, 0.5137, 0.3128, 0.5288]}, {"w": "with", "b": [0.3202, 0.5137, 0.3568, 0.5288]}, {"w": "containers", "b": [0.3642, 0.5137, 0.4475, 0.5288]}, {"w": "is", "b": [0.4549, 0.5137, 0.4676, 0.5288]}, {"w": "typically", "b": [0.475, 0.5137, 0.5456, 0.5288]}, {"w": "considered", "b": [0.553, 0.5137, 0.639, 0.5288]}, {"w": "more", "b": [0.6464, 0.5137, 0.6872, 0.5288]}, {"w": "resource-efficient", "b": [0.6947, 0.5137, 0.8314, 0.5288]}, {"w": "and", "b": [0.8388, 0.5137, 0.8691, 0.5288]}, {"w": "flexible", "b": [0.1312, 0.5318, 0.1876, 0.5467]}, {"w": "than", "b": [0.1937, 0.5318, 0.2303, 0.5467]}, {"w": "with", "b": [0.2364, 0.5318, 0.2719, 0.5467]}, {"w": "virtual", "b": [0.278, 0.5318, 0.3314, 0.5467]}, {"w": "machines.", "b": [0.3375, 0.5318, 0.4153, 0.5467]}, {"w": "A", "b": [0.4235, 0.5318, 0.4372, 0.5467]}, {"w": "container", "b": [0.4433, 0.5318, 0.517, 0.5467]}, {"w": "is", "b": [0.5231, 0.5318, 0.5354, 0.5467]}, {"w": "similar", "b": [0.5415, 0.5318, 0.5955, 0.5467]}, {"w": "to", "b": [0.6016, 0.5318, 0.6178, 0.5467]}, {"w": "a", "b": [0.624, 0.5318, 0.6331, 0.5467]}, {"w": "virtual", "b": [0.6392, 0.5318, 0.6926, 0.5467]}, {"w": "machine,", "b": [0.6987, 0.5318, 0.7693, 0.5467]}, {"w": "in", "b": [0.7754, 0.5318, 0.7906, 0.5467]}, {"w": "the", "b": [0.7968, 0.5318, 0.8222, 0.5467]}, {"w": "sense", "b": [0.8283, 0.5318, 0.8691, 0.5467]}, {"w": "that", "b": [0.1312, 0.5497, 0.1652, 0.5647]}, {"w": "it", "b": [0.1714, 0.5497, 0.1837, 0.5647]}, {"w": "is", "b": [0.1899, 0.5497, 0.2024, 0.5647]}, {"w": "also", "b": [0.2085, 0.5497, 0.2395, 0.5647]}, {"w": "an", "b": [0.2457, 0.5497, 0.2653, 0.5647]}, {"w": "isolated", "b": [0.2714, 0.5497, 0.3333, 0.5647]}, {"w": "runtime", "b": [0.3395, 0.5497, 0.4029, 0.5647]}, {"w": "environment", "b": [0.409, 0.5497, 0.5096, 0.5647]}, {"w": "with", "b": [0.5157, 0.5497, 0.5518, 0.5647]}, {"w": "its", "b": [0.5579, 0.5497, 0.5776, 0.5647]}, {"w": "own", "b": [0.5838, 0.5497, 0.6162, 0.5647]}, {"w": "filesystem,", "b": [0.6224, 0.5497, 0.7066, 0.5647]}, {"w": "CPU,", "b": [0.7127, 0.5497, 0.7578, 0.5647]}, {"w": "memory,", "b": [0.7639, 0.5497, 0.833, 0.5647]}, {"w": "and", "b": [0.8391, 0.5497, 0.869, 0.5647]}, {"w": "process", "b": [0.1312, 0.5677, 0.1895, 0.5826]}, {"w": "space.", "b": [0.1956, 0.5677, 0.2439, 0.5826]}, {"w": "The", "b": [0.2521, 0.5677, 0.2839, 0.5826]}, {"w": "main", "b": [0.2901, 0.5677, 0.3301, 0.5826]}, {"w": "difference,", "b": [0.3362, 0.5677, 0.4178, 0.5826]}, {"w": "however,", "b": [0.424, 0.5677, 0.4938, 0.5826]}, {"w": "is", "b": [0.4999, 0.5677, 0.5124, 0.5826]}, {"w": "that", "b": [0.5185, 0.5677, 0.5524, 0.5826]}, {"w": "all", "b": [0.5585, 0.5677, 0.578, 0.5826]}, {"w": "containers", "b": [0.5842, 0.5677, 0.6659, 0.5826]}, {"w": "are", "b": [0.672, 0.5677, 0.6967, 0.5826]}, {"w": "running", "b": [0.7028, 0.5677, 0.7654, 0.5826]}, {"w": "on", "b": [0.7716, 0.5677, 0.7911, 0.5826]}, {"w": "the", "b": [0.7973, 0.5677, 0.8229, 0.5826]}, {"w": "same", "b": [0.8291, 0.5677, 0.8691, 0.5826]}, {"w": "virtual", "b": [0.1308, 0.5857, 0.1839, 0.6005]}, {"w": "or", "b": [0.19, 0.5857, 0.2062, 0.6005]}, {"w": "physical", "b": [0.2124, 0.5857, 0.2762, 0.6005]}, {"w": "machine", "b": [0.2823, 0.5857, 0.3476, 0.6005]}, {"w": "and", "b": [0.3537, 0.5857, 0.383, 0.6005]}, {"w": "share", "b": [0.3892, 0.5857, 0.4308, 0.6005]}, {"w": "the", "b": [0.4369, 0.5857, 0.4622, 0.6005]}, {"w": "operating", "b": [0.4683, 0.5857, 0.5437, 0.6005]}, {"w": "system,", "b": [0.5499, 0.5857, 0.6092, 0.6005]}, {"w": "while", "b": [0.6153, 0.5857, 0.6568, 0.6005]}, {"w": "each", "b": [0.6629, 0.5857, 0.6978, 0.6005]}, {"w": "virtual", "b": [0.704, 0.5857, 0.7571, 0.6005]}, {"w": "machine", "b": [0.7632, 0.5857, 0.8285, 0.6005]}, {"w": "runs", "b": [0.8346, 0.5857, 0.8691, 0.6005]}, {"w": "its", "b": [0.1312, 0.6035, 0.1508, 0.6185]}, {"w": "own", "b": [0.157, 0.6035, 0.1893, 0.6185]}, {"w": "instance", "b": [0.1954, 0.6035, 0.2612, 0.6185]}, {"w": "of", "b": [0.2673, 0.6035, 0.2822, 0.6185]}, {"w": "the", "b": [0.2883, 0.6035, 0.314, 0.6185]}, {"w": "operating", "b": [0.3201, 0.6035, 0.3966, 0.6185]}, {"w": "system.", "b": [0.4027, 0.6035, 0.4629, 0.6185]}]}, {"id": "b_7", "type": "paragraph", "text": "The deployment process looks as follows. The machine learning system and the web service are installed inside a container. Usually, a container is a Docker container, but there are alternatives. Then a container-orchestration system is used to run the containers on a cluster of physical or virtual servers. A typical choice of a container-orchestration system for running on-premises or in a cloud platform, is Kubernetes. Some cloud platforms provide both their own container-orchestration engine, such as AWS Fargate and Google Kubernetes Engine, and support Kubernetes natively.", "words": [{"w": "The", "b": [0.1306, 0.6305, 0.1623, 0.6454]}, {"w": "deployment", "b": [0.1684, 0.6305, 0.2609, 0.6454]}, {"w": "process", "b": [0.2671, 0.6305, 0.3252, 0.6454]}, {"w": "looks", "b": [0.3313, 0.6305, 0.3723, 0.6454]}, {"w": "as", "b": [0.3785, 0.6305, 0.3949, 0.6454]}, {"w": "follows.", "b": [0.4011, 0.6305, 0.4605, 0.6454]}, {"w": "The", "b": [0.4687, 0.6305, 0.5004, 0.6454]}, {"w": "machine", "b": [0.5066, 0.6305, 0.5725, 0.6454]}, {"w": "learning", "b": [0.5787, 0.6305, 0.6432, 0.6454]}, {"w": "system", "b": [0.6493, 0.6305, 0.7042, 0.6454]}, {"w": "and", "b": [0.7104, 0.6305, 0.74, 0.6454]}, {"w": "the", "b": [0.7462, 0.6305, 0.7718, 0.6454]}, {"w": "web", "b": [0.7779, 0.6305, 0.8091, 0.6454]}, {"w": "service", "b": [0.8153, 0.6305, 0.8691, 0.6454]}, {"w": "are", "b": [0.1312, 0.6483, 0.1564, 0.6634]}, {"w": "installed", "b": [0.1627, 0.6483, 0.2319, 0.6634]}, {"w": "inside", "b": [0.2382, 0.6483, 0.2854, 0.6634]}, {"w": "a", "b": [0.2917, 0.6483, 0.3011, 0.6634]}, {"w": "container.", "b": [0.3074, 0.6483, 0.3886, 0.6634]}, {"w": "Usually,", "b": [0.3973, 0.6483, 0.4628, 0.6634]}, {"w": "a", "b": [0.4691, 0.6483, 0.4785, 0.6634]}, {"w": "container", "b": [0.4848, 0.6483, 0.5608, 0.6634]}, {"w": "is", "b": [0.5671, 0.6483, 0.5797, 0.6634]}, {"w": "a", "b": [0.5861, 0.6483, 0.5955, 0.6634]}, {"w": "Docker", "b": [0.6017, 0.6484, 0.6671, 0.6634]}, {"w": "container,", "b": [0.6734, 0.6483, 0.7546, 0.6634]}, {"w": "but", "b": [0.7609, 0.6483, 0.7892, 0.6634]}, {"w": "there", "b": [0.7955, 0.6483, 0.8374, 0.6634]}, {"w": "are", "b": [0.8437, 0.6483, 0.8689, 0.6634]}, {"w": "alternatives.", "b": [0.1312, 0.6665, 0.2279, 0.6813]}, {"w": "Then", "b": [0.236, 0.6665, 0.2772, 0.6813]}, {"w": "a", "b": [0.2831, 0.6665, 0.2921, 0.6813]}, {"w": "container-orchestration", "b": [0.298, 0.6665, 0.4801, 0.6813]}, {"w": "system", "b": [0.486, 0.6665, 0.54, 0.6813]}, {"w": "is", "b": [0.5459, 0.6665, 0.5581, 0.6813]}, {"w": "used", "b": [0.564, 0.6665, 0.5993, 0.6813]}, {"w": "to", "b": [0.6052, 0.6665, 0.6212, 0.6813]}, {"w": "run", "b": [0.6271, 0.6665, 0.6543, 0.6813]}, {"w": "the", "b": [0.6602, 0.6665, 0.6853, 0.6813]}, {"w": "containers", "b": [0.6912, 0.6665, 0.7713, 0.6813]}, {"w": "on", "b": [0.7772, 0.6665, 0.7963, 0.6813]}, {"w": "a", "b": [0.8022, 0.6665, 0.8112, 0.6813]}, {"w": "cluster", "b": [0.8171, 0.6665, 0.8695, 0.6813]}, {"w": "of", "b": [0.1312, 0.6844, 0.1458, 0.6992]}, {"w": "physical", "b": [0.1514, 0.6844, 0.2148, 0.6992]}, {"w": "or", "b": [0.2204, 0.6844, 0.2365, 0.6992]}, {"w": "virtual", "b": [0.2421, 0.6844, 0.2949, 0.6992]}, {"w": "servers.", "b": [0.3005, 0.6844, 0.3591, 0.6992]}, {"w": "A", "b": [0.3671, 0.6844, 0.3807, 0.6992]}, {"w": "typical", "b": [0.3863, 0.6844, 0.4395, 0.6992]}, {"w": "choice", "b": [0.4451, 0.6844, 0.4929, 0.6992]}, {"w": "of", "b": [0.4985, 0.6844, 0.513, 0.6992]}, {"w": "a", "b": [0.5186, 0.6844, 0.5277, 0.6992]}, {"w": "container-orchestration", "b": [0.5332, 0.6844, 0.7154, 0.6992]}, {"w": "system", "b": [0.721, 0.6844, 0.7749, 0.6992]}, {"w": "for", "b": [0.7806, 0.6844, 0.8022, 0.6992]}, {"w": "running", "b": [0.8078, 0.6844, 0.8691, 0.6992]}, {"w": "on-premises", "b": [0.1312, 0.7021, 0.2277, 0.7172]}, {"w": "or", "b": [0.2348, 0.7021, 0.2516, 0.7172]}, {"w": "in", "b": [0.2588, 0.7021, 0.2745, 0.7172]}, {"w": "a", "b": [0.2816, 0.7021, 0.291, 0.7172]}, {"w": "cloud", "b": [0.2981, 0.7021, 0.3421, 0.7172]}, {"w": "platform,", "b": [0.3492, 0.7021, 0.4251, 0.7172]}, {"w": "is", "b": [0.4324, 0.7021, 0.4451, 0.7172]}, {"w": "Kubernetes.", "b": [0.4521, 0.7021, 0.5644, 0.7172]}, {"w": "Some", "b": [0.5755, 0.7021, 0.6195, 0.7172]}, {"w": "cloud", "b": [0.6266, 0.7021, 0.6705, 0.7172]}, {"w": "platforms", "b": [0.6777, 0.7021, 0.7557, 0.7172]}, {"w": "provide", "b": [0.7629, 0.7021, 0.8236, 0.7172]}, {"w": "both", "b": [0.8307, 0.7021, 0.8689, 0.7172]}, {"w": "their", "b": [0.1312, 0.7203, 0.1685, 0.7351]}, {"w": "own", "b": [0.1746, 0.7203, 0.2062, 0.7351]}, {"w": "container-orchestration", "b": [0.2123, 0.7203, 0.3944, 0.7351]}, {"w": "engine,", "b": [0.4005, 0.7203, 0.4558, 0.7351]}, {"w": "such", "b": [0.4618, 0.7203, 0.4966, 0.7351]}, {"w": "as", "b": [0.5027, 0.7203, 0.5189, 0.7351]}, {"w": "AWS", "b": [0.5247, 0.7202, 0.5721, 0.7352]}, {"w": "Fargate", "b": [0.5791, 0.7202, 0.6487, 0.7352]}, {"w": "and", "b": [0.6547, 0.7203, 0.6839, 0.7351]}, {"w": "Google", "b": [0.69, 0.7202, 0.7547, 0.7352]}, {"w": "Kubernetes", "b": [0.7617, 0.7202, 0.8688, 0.7352]}, {"w": "Engine,", "b": [0.1312, 0.7381, 0.2001, 0.7531]}, {"w": "and", "b": [0.2062, 0.7381, 0.236, 0.7531]}, {"w": "support", "b": [0.2421, 0.7381, 0.3043, 0.7531]}, {"w": "Kubernetes", "b": [0.3105, 0.7381, 0.4025, 0.7531]}, {"w": "natively.", "b": [0.4086, 0.7381, 0.4763, 0.7531]}]}, {"id": "b_8", "type": "paragraph", "text": "Figure 3 illustrates that deployment pattern. Here, the virtual or physical machines are organized into a cluster, whose resources are managed by the container orchestrator. New virtual or physical machines can be manually added to the cluster, or closed. If your software is deployed in a cloud environment, a cluster autoscaler can launch (and add to the cluster) or terminate virtual machines, based on the usage of the cluster.", "words": [{"w": "Figure", "b": [0.1312, 0.765, 0.1844, 0.7801]}, {"w": "3", "b": [0.1917, 0.765, 0.2011, 0.7801]}, {"w": "illustrates", "b": [0.2083, 0.765, 0.2892, 0.7801]}, {"w": "that", "b": [0.2964, 0.765, 0.331, 0.7801]}, {"w": "deployment", "b": [0.3382, 0.765, 0.4329, 0.7801]}, {"w": "pattern.", "b": [0.4402, 0.765, 0.5061, 0.7801]}, {"w": "Here,", "b": [0.5177, 0.765, 0.5612, 0.7801]}, {"w": "the", "b": [0.5687, 0.765, 0.5949, 0.7801]}, {"w": "virtual", "b": [0.6022, 0.765, 0.6571, 0.7801]}, {"w": "or", "b": [0.6644, 0.765, 0.6812, 0.7801]}, {"w": "physical", "b": [0.6885, 0.765, 0.7545, 0.7801]}, {"w": "machines", "b": [0.7618, 0.765, 0.8367, 0.7801]}, {"w": "are", "b": [0.844, 0.765, 0.8691, 0.7801]}, {"w": "organized", "b": [0.1312, 0.7829, 0.2096, 0.798]}, {"w": "into", "b": [0.2157, 0.7829, 0.2476, 0.798]}, {"w": "a", "b": [0.2537, 0.7829, 0.2631, 0.798]}, {"w": "cluster,", "b": [0.2692, 0.7829, 0.3289, 0.798]}, {"w": "whose", "b": [0.335, 0.7829, 0.3842, 0.798]}, {"w": "resources", "b": [0.3903, 0.7829, 0.4648, 0.798]}, {"w": "are", "b": [0.4709, 0.7829, 0.496, 0.798]}, {"w": "managed", "b": [0.5022, 0.7829, 0.5752, 0.798]}, {"w": "by", "b": [0.5813, 0.7829, 0.6012, 0.798]}, {"w": "the", "b": [0.6073, 0.7829, 0.6334, 0.798]}, {"w": "container", "b": [0.6396, 0.7829, 0.7153, 0.798]}, {"w": "orchestrator.", "b": [0.7215, 0.7829, 0.8256, 0.798]}, {"w": "New", "b": [0.8338, 0.7829, 0.8698, 0.798]}, {"w": "virtual", "b": [0.1308, 0.8011, 0.1836, 0.8159]}, {"w": "or", "b": [0.1894, 0.8011, 0.2055, 0.8159]}, {"w": "physical", "b": [0.2113, 0.8011, 0.2747, 0.8159]}, {"w": "machines", "b": [0.2805, 0.8011, 0.3525, 0.8159]}, {"w": "can", "b": [0.3583, 0.8011, 0.3854, 0.8159]}, {"w": "be", "b": [0.3912, 0.8011, 0.4098, 0.8159]}, {"w": "manually", "b": [0.4156, 0.8011, 0.4879, 0.8159]}, {"w": "added", "b": [0.4938, 0.8011, 0.541, 0.8159]}, {"w": "to", "b": [0.5468, 0.8011, 0.5629, 0.8159]}, {"w": "the", "b": [0.5687, 0.8011, 0.5938, 0.8159]}, {"w": "cluster,", "b": [0.5996, 0.8011, 0.6571, 0.8159]}, {"w": "or", "b": [0.6629, 0.8011, 0.6791, 0.8159]}, {"w": "closed.", "b": [0.6848, 0.8011, 0.7372, 0.8159]}, {"w": "If", "b": [0.7453, 0.8011, 0.7574, 0.8159]}, {"w": "your", "b": [0.7632, 0.8011, 0.7984, 0.8159]}, {"w": "software", "b": [0.8042, 0.8011, 0.8691, 0.8159]}, {"w": "is", "b": [0.1312, 0.8189, 0.1436, 0.8339]}, {"w": "deployed", "b": [0.1498, 0.8189, 0.2199, 0.8339]}, {"w": "in", "b": [0.226, 0.8189, 0.2414, 0.8339]}, {"w": "a", "b": [0.2475, 0.8189, 0.2567, 0.8339]}, {"w": "cloud", "b": [0.2629, 0.8189, 0.3059, 0.8339]}, {"w": "environment,", "b": [0.312, 0.8189, 0.4169, 0.8339]}, {"w": "a", "b": [0.4231, 0.8189, 0.4323, 0.8339]}, {"w": "cluster", "b": [0.4384, 0.8189, 0.4918, 0.8339]}, {"w": "autoscaler", "b": [0.498, 0.8189, 0.579, 0.8339]}, {"w": "can", "b": [0.5851, 0.8189, 0.6127, 0.8339]}, {"w": "launch", "b": [0.6189, 0.8189, 0.6716, 0.8339]}, {"w": "(and", "b": [0.6777, 0.8189, 0.7146, 0.8339]}, {"w": "add", "b": [0.7207, 0.8189, 0.7504, 0.8339]}, {"w": "to", "b": [0.7565, 0.8189, 0.7729, 0.8339]}, {"w": "the", "b": [0.779, 0.8189, 0.8046, 0.8339]}, {"w": "cluster)", "b": [0.8108, 0.8189, 0.8713, 0.8339]}, {"w": "or", "b": [0.1312, 0.8369, 0.1477, 0.8518]}, {"w": "terminate", "b": [0.1538, 0.8369, 0.2318, 0.8518]}, {"w": "virtual", "b": [0.238, 0.8369, 0.2919, 0.8518]}, {"w": "machines,", "b": [0.298, 0.8369, 0.3766, 0.8518]}, {"w": "based", "b": [0.3827, 0.8369, 0.428, 0.8518]}, {"w": "on", "b": [0.4341, 0.8369, 0.4536, 0.8518]}, {"w": "the", "b": [0.4597, 0.8369, 0.4854, 0.8518]}, {"w": "usage", "b": [0.4915, 0.8369, 0.5357, 0.8518]}, {"w": "of", "b": [0.5419, 0.8369, 0.5567, 0.8518]}, {"w": "the", "b": [0.5629, 0.8369, 0.5885, 0.8518]}, {"w": "cluster.", "b": [0.5947, 0.8369, 0.6533, 0.8518]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "7", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 247, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 3: Deploying a model as a web service in a container running on a cluster.", "words": [{"w": "Figure", "b": [0.1704, 0.515, 0.2225, 0.53]}, {"w": "3:", "b": [0.2287, 0.515, 0.243, 0.53]}, {"w": "Deploying", "b": [0.2513, 0.515, 0.332, 0.53]}, {"w": "a", "b": [0.3382, 0.515, 0.3474, 0.53]}, {"w": "model", "b": [0.3535, 0.515, 0.4022, 0.53]}, {"w": "as", "b": [0.4084, 0.515, 0.4249, 0.53]}, {"w": "a", "b": [0.431, 0.515, 0.4403, 0.53]}, {"w": "web", "b": [0.4464, 0.515, 0.4777, 0.53]}, {"w": "service", "b": [0.4838, 0.515, 0.5378, 0.53]}, {"w": "in", "b": [0.544, 0.515, 0.5594, 0.53]}, {"w": "a", "b": [0.5655, 0.515, 0.5748, 0.53]}, {"w": "container", "b": [0.5809, 0.515, 0.6553, 0.53]}, {"w": "running", "b": [0.6615, 0.515, 0.7241, 0.53]}, {"w": "on", "b": [0.7302, 0.515, 0.7497, 0.53]}, {"w": "a", "b": [0.7559, 0.515, 0.7651, 0.53]}, {"w": "cluster.", "b": [0.7712, 0.515, 0.8299, 0.53]}]}, {"id": "b_1", "type": "paragraph", "text": "Deployment in a container has the advantage of being more resource-efficient as compared to the deployment on a virtual machine. It allows the possibility to automatically scale with scoring requests. It also allows us to scale-to-zero. The idea of the scale-to-zero is that a container can be reduced down to zero replicas when idle and brought back up if there is a request to serve. As a result, the resource consumption is low compared to always running services. This leads to less power consumption and saves cost of cloud resources.", "words": [{"w": "Deployment", "b": [0.1312, 0.5654, 0.2259, 0.5802]}, {"w": "in", "b": [0.232, 0.5654, 0.2471, 0.5802]}, {"w": "a", "b": [0.2531, 0.5654, 0.2622, 0.5802]}, {"w": "container", "b": [0.2682, 0.5654, 0.3411, 0.5802]}, {"w": "has", "b": [0.3472, 0.5654, 0.3735, 0.5802]}, {"w": "the", "b": [0.3795, 0.5654, 0.4046, 0.5802]}, {"w": "advantage", "b": [0.4107, 0.5654, 0.4901, 0.5802]}, {"w": "of", "b": [0.4961, 0.5654, 0.5107, 0.5802]}, {"w": "being", "b": [0.5168, 0.5654, 0.5595, 0.5802]}, {"w": "more", "b": [0.5656, 0.5654, 0.6048, 0.5802]}, {"w": "resource-efficient", "b": [0.6109, 0.5654, 0.7422, 0.5802]}, {"w": "as", "b": [0.7483, 0.5654, 0.7645, 0.5802]}, {"w": "compared", "b": [0.7705, 0.5654, 0.847, 0.5802]}, {"w": "to", "b": [0.853, 0.5654, 0.8691, 0.5802]}, {"w": "the", "b": [0.1312, 0.5831, 0.1574, 0.5982]}, {"w": "deployment", "b": [0.1635, 0.5831, 0.2582, 0.5982]}, {"w": "on", "b": [0.2644, 0.5831, 0.2842, 0.5982]}, {"w": "a", "b": [0.2904, 0.5831, 0.2998, 0.5982]}, {"w": "virtual", "b": [0.306, 0.5831, 0.3609, 0.5982]}, {"w": "machine.", "b": [0.3671, 0.5831, 0.4398, 0.5982]}, {"w": "It", "b": [0.448, 0.5831, 0.4621, 0.5982]}, {"w": "allows", "b": [0.4682, 0.5831, 0.518, 0.5982]}, {"w": "the", "b": [0.5242, 0.5831, 0.5504, 0.5982]}, {"w": "possibility", "b": [0.5565, 0.5831, 0.6399, 0.5982]}, {"w": "to", "b": [0.646, 0.5831, 0.6628, 0.5982]}, {"w": "automatically", "b": [0.6689, 0.5831, 0.7813, 0.5982]}, {"w": "scale", "b": [0.7875, 0.5831, 0.8263, 0.5982]}, {"w": "with", "b": [0.8325, 0.5831, 0.8691, 0.5982]}, {"w": "scoring", "b": [0.1312, 0.6011, 0.1885, 0.6161]}, {"w": "requests.", "b": [0.1946, 0.6011, 0.266, 0.6161]}, {"w": "It", "b": [0.2742, 0.6011, 0.2882, 0.6161]}, {"w": "also", "b": [0.2944, 0.6011, 0.3256, 0.6161]}, {"w": "allows", "b": [0.3318, 0.6011, 0.3812, 0.6161]}, {"w": "us", "b": [0.3873, 0.6011, 0.4051, 0.6161]}, {"w": "to", "b": [0.4112, 0.6011, 0.4278, 0.6161]}, {"w": "scale-to-zero.", "b": [0.4338, 0.6011, 0.5543, 0.6161]}, {"w": "The", "b": [0.5625, 0.6011, 0.5946, 0.6161]}, {"w": "idea", "b": [0.6008, 0.6011, 0.634, 0.6161]}, {"w": "of", "b": [0.6402, 0.6011, 0.6552, 0.6161]}, {"w": "the", "b": [0.6614, 0.6011, 0.6873, 0.6161]}, {"w": "scale-to-zero", "b": [0.6935, 0.6011, 0.7943, 0.6161]}, {"w": "is", "b": [0.8005, 0.6011, 0.813, 0.6161]}, {"w": "that", "b": [0.8192, 0.6011, 0.8534, 0.6161]}, {"w": "a", "b": [0.8596, 0.6011, 0.8689, 0.6161]}, {"w": "container", "b": [0.1312, 0.6191, 0.2059, 0.6341]}, {"w": "can", "b": [0.2121, 0.6191, 0.2399, 0.6341]}, {"w": "be", "b": [0.2461, 0.6191, 0.2651, 0.6341]}, {"w": "reduced", "b": [0.2713, 0.6191, 0.3341, 0.6341]}, {"w": "down", "b": [0.3403, 0.6191, 0.383, 0.6341]}, {"w": "to", "b": [0.3892, 0.6191, 0.4056, 0.6341]}, {"w": "zero", "b": [0.4118, 0.6191, 0.4448, 0.6341]}, {"w": "replicas", "b": [0.451, 0.6191, 0.5119, 0.6341]}, {"w": "when", "b": [0.518, 0.6191, 0.5602, 0.6341]}, {"w": "idle", "b": [0.5664, 0.6191, 0.5952, 0.6341]}, {"w": "and", "b": [0.6014, 0.6191, 0.6312, 0.6341]}, {"w": "brought", "b": [0.6374, 0.6191, 0.7008, 0.6341]}, {"w": "back", "b": [0.7069, 0.6191, 0.744, 0.6341]}, {"w": "up", "b": [0.7502, 0.6191, 0.7708, 0.6341]}, {"w": "if", "b": [0.7769, 0.6191, 0.7877, 0.6341]}, {"w": "there", "b": [0.7939, 0.6191, 0.8351, 0.6341]}, {"w": "is", "b": [0.8413, 0.6191, 0.8537, 0.6341]}, {"w": "a", "b": [0.8599, 0.6191, 0.8692, 0.6341]}, {"w": "request", "b": [0.1312, 0.637, 0.1899, 0.652]}, {"w": "to", "b": [0.196, 0.637, 0.2125, 0.652]}, {"w": "serve.", "b": [0.2187, 0.637, 0.2644, 0.652]}, {"w": "As", "b": [0.2726, 0.637, 0.2939, 0.652]}, {"w": "a", "b": [0.3, 0.637, 0.3093, 0.652]}, {"w": "result,", "b": [0.3155, 0.637, 0.3663, 0.652]}, {"w": "the", "b": [0.3725, 0.637, 0.3983, 0.652]}, {"w": "resource", "b": [0.4045, 0.637, 0.4709, 0.652]}, {"w": "consumption", "b": [0.477, 0.637, 0.5806, 0.652]}, {"w": "is", "b": [0.5867, 0.637, 0.5993, 0.652]}, {"w": "low", "b": [0.6054, 0.637, 0.6328, 0.652]}, {"w": "compared", "b": [0.6389, 0.637, 0.7176, 0.652]}, {"w": "to", "b": [0.7238, 0.637, 0.7403, 0.652]}, {"w": "always", "b": [0.7464, 0.637, 0.7998, 0.652]}, {"w": "running", "b": [0.8059, 0.637, 0.8691, 0.652]}, {"w": "services.", "b": [0.1312, 0.655, 0.1977, 0.6699]}, {"w": "This", "b": [0.2059, 0.655, 0.2419, 0.6699]}, {"w": "leads", "b": [0.248, 0.655, 0.2881, 0.6699]}, {"w": "to", "b": [0.2943, 0.655, 0.3107, 0.6699]}, {"w": "less", "b": [0.3168, 0.655, 0.3447, 0.6699]}, {"w": "power", "b": [0.3509, 0.655, 0.3986, 0.6699]}, {"w": "consumption", "b": [0.4047, 0.655, 0.5074, 0.6699]}, {"w": "and", "b": [0.5135, 0.655, 0.5433, 0.6699]}, {"w": "saves", "b": [0.5494, 0.655, 0.5902, 0.6699]}, {"w": "cost", "b": [0.5963, 0.655, 0.6282, 0.6699]}, {"w": "of", "b": [0.6344, 0.655, 0.6492, 0.6699]}, {"w": "cloud", "b": [0.6554, 0.655, 0.6985, 0.6699]}, {"w": "resources.", "b": [0.7046, 0.655, 0.7829, 0.6699]}]}, {"id": "b_2", "type": "paragraph", "text": "One drawback is that the containerized deployment is generally seen as more complicated, and requires expertise.", "words": [{"w": "One", "b": [0.1312, 0.6818, 0.1645, 0.6969]}, {"w": "drawback", "b": [0.1707, 0.6818, 0.2483, 0.6969]}, {"w": "is", "b": [0.2544, 0.6818, 0.267, 0.6969]}, {"w": "that", "b": [0.2732, 0.6818, 0.3075, 0.6969]}, {"w": "the", "b": [0.3136, 0.6818, 0.3397, 0.6969]}, {"w": "containerized", "b": [0.3458, 0.6818, 0.4536, 0.6969]}, {"w": "deployment", "b": [0.4597, 0.6818, 0.554, 0.6969]}, {"w": "is", "b": [0.5601, 0.6818, 0.5727, 0.6969]}, {"w": "generally", "b": [0.5788, 0.6818, 0.6523, 0.6969]}, {"w": "seen", "b": [0.6584, 0.6818, 0.6929, 0.6969]}, {"w": "as", "b": [0.699, 0.6818, 0.7158, 0.6969]}, {"w": "more", "b": [0.7219, 0.6818, 0.7625, 0.6969]}, {"w": "complicated,", "b": [0.7687, 0.6818, 0.8717, 0.6969]}, {"w": "and", "b": [0.1312, 0.6999, 0.161, 0.7148]}, {"w": "requires", "b": [0.1671, 0.6999, 0.2304, 0.7148]}, {"w": "expertise.", "b": [0.2366, 0.6999, 0.3137, 0.7148]}]}, {"id": "b_3", "type": "paragraph", "text": "8.3.3 Serverless Deployment", "words": [{"w": "8.3.3", "b": [0.1312, 0.7477, 0.1749, 0.7627]}, {"w": "Serverless", "b": [0.1961, 0.7477, 0.2878, 0.7627]}, {"w": "Deployment", "b": [0.2949, 0.7477, 0.4066, 0.7627]}]}, {"id": "b_4", "type": "paragraph", "text": "Several cloud services providers, including Amazon, Google, and Microsoft, offer so-called serverless computing. It’s known under the name of Lambda-functions on Amazon Web Services, and Functions on Microsoft Azure and Google Cloud Platform.", "words": [{"w": "Several", "b": [0.1312, 0.7842, 0.1899, 0.7993]}, {"w": "cloud", "b": [0.1961, 0.7842, 0.24, 0.7993]}, {"w": "services", "b": [0.2463, 0.7842, 0.3088, 0.7993]}, {"w": "providers,", "b": [0.315, 0.7842, 0.3958, 0.7993]}, {"w": "including", "b": [0.402, 0.7842, 0.4773, 0.7993]}, {"w": "Amazon,", "b": [0.4835, 0.7842, 0.5562, 0.7993]}, {"w": "Google,", "b": [0.5625, 0.7842, 0.6248, 0.7993]}, {"w": "and", "b": [0.631, 0.7842, 0.6614, 0.7993]}, {"w": "Microsoft,", "b": [0.6676, 0.7842, 0.7504, 0.7993]}, {"w": "offer", "b": [0.7566, 0.7842, 0.7928, 0.7993]}, {"w": "so-called", "b": [0.799, 0.7842, 0.8692, 0.7993]}, {"w": "serverless", "b": [0.1312, 0.8022, 0.2195, 0.8172]}, {"w": "computing.", "b": [0.2266, 0.8022, 0.3297, 0.8172]}, {"w": "It’s", "b": [0.3379, 0.8022, 0.3642, 0.8172]}, {"w": "known", "b": [0.3704, 0.8022, 0.4227, 0.8172]}, {"w": "under", "b": [0.4288, 0.8022, 0.4751, 0.8172]}, {"w": "the", "b": [0.4812, 0.8022, 0.5069, 0.8172]}, {"w": "name", "b": [0.5131, 0.8022, 0.5562, 0.8172]}, {"w": "of", "b": [0.5623, 0.8022, 0.5772, 0.8172]}, {"w": "Lambda-functions", "b": [0.5833, 0.8022, 0.7289, 0.8172]}, {"w": "on", "b": [0.7351, 0.8022, 0.7546, 0.8172]}, {"w": "Amazon", "b": [0.7607, 0.8022, 0.8269, 0.8172]}, {"w": "Web", "b": [0.833, 0.8022, 0.869, 0.8172]}, {"w": "Services,", "b": [0.1312, 0.8202, 0.2006, 0.8351]}, {"w": "and", "b": [0.2068, 0.8202, 0.2365, 0.8351]}, {"w": "Functions", "b": [0.2427, 0.8202, 0.321, 0.8351]}, {"w": "on", "b": [0.3271, 0.8202, 0.3466, 0.8351]}, {"w": "Microsoft", "b": [0.3528, 0.8202, 0.4288, 0.8351]}, {"w": "Azure", "b": [0.4349, 0.8202, 0.4827, 0.8351]}, {"w": "and", "b": [0.4889, 0.8202, 0.5186, 0.8351]}, {"w": "Google", "b": [0.5247, 0.8202, 0.5807, 0.8351]}, {"w": "Cloud", "b": [0.5869, 0.8202, 0.6351, 0.8351]}, {"w": "Platform.", "b": [0.6412, 0.8202, 0.7179, 0.8351]}]}, {"id": "b_5", "type": "paragraph", "text": "The serverless deployment consists of preparing a zip archive with all the code needed to run", "words": [{"w": "The", "b": [0.1306, 0.8472, 0.1617, 0.862]}, {"w": "serverless", "b": [0.1678, 0.8472, 0.2416, 0.862]}, {"w": "deployment", "b": [0.2477, 0.8472, 0.3386, 0.862]}, {"w": "consists", "b": [0.3447, 0.8472, 0.4054, 0.862]}, {"w": "of", "b": [0.4114, 0.8472, 0.426, 0.862]}, {"w": "preparing", "b": [0.4321, 0.8472, 0.5076, 0.862]}, {"w": "a", "b": [0.5137, 0.8472, 0.5227, 0.862]}, {"w": "zip", "b": [0.5288, 0.8472, 0.5519, 0.862]}, {"w": "archive", "b": [0.5581, 0.8472, 0.6139, 0.862]}, {"w": "with", "b": [0.62, 0.8472, 0.6551, 0.862]}, {"w": "all", "b": [0.6612, 0.8472, 0.6803, 0.862]}, {"w": "the", "b": [0.6864, 0.8472, 0.7115, 0.862]}, {"w": "code", "b": [0.7176, 0.8472, 0.7533, 0.862]}, {"w": "needed", "b": [0.7594, 0.8472, 0.8137, 0.862]}, {"w": "to", "b": [0.8198, 0.8472, 0.8359, 0.862]}, {"w": "run", "b": [0.842, 0.8472, 0.8692, 0.862]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "8", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 248, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "the machine learning system (model, feature extractor, and scoring code). The zip archive must contain a file with a specific name that contains a specific function, or class-method definition with a specific signature (an entry point function). The zip archive is uploaded to the cloud platform and registered under a unique name.", "words": [{"w": "the", "b": [0.1312, 0.0883, 0.1572, 0.1034]}, {"w": "machine", "b": [0.1633, 0.0883, 0.2303, 0.1034]}, {"w": "learning", "b": [0.2364, 0.0883, 0.3018, 0.1034]}, {"w": "system", "b": [0.308, 0.0883, 0.3637, 0.1034]}, {"w": "(model,", "b": [0.3698, 0.0883, 0.4316, 0.1034]}, {"w": "feature", "b": [0.4377, 0.0883, 0.4943, 0.1034]}, {"w": "extractor,", "b": [0.5004, 0.0883, 0.5799, 0.1034]}, {"w": "and", "b": [0.5861, 0.0883, 0.6162, 0.1034]}, {"w": "scoring", "b": [0.6223, 0.0883, 0.6795, 0.1034]}, {"w": "code).", "b": [0.6857, 0.0883, 0.735, 0.1034]}, {"w": "The", "b": [0.7432, 0.0883, 0.7753, 0.1034]}, {"w": "zip", "b": [0.7815, 0.0883, 0.8053, 0.1034]}, {"w": "archive", "b": [0.8115, 0.0883, 0.8691, 0.1034]}, {"w": "must", "b": [0.1312, 0.1062, 0.1716, 0.1213]}, {"w": "contain", "b": [0.1779, 0.1062, 0.2381, 0.1213]}, {"w": "a", "b": [0.2443, 0.1062, 0.2538, 0.1213]}, {"w": "file", "b": [0.2601, 0.1062, 0.2841, 0.1213]}, {"w": "with", "b": [0.2904, 0.1062, 0.327, 0.1213]}, {"w": "a", "b": [0.3333, 0.1062, 0.3427, 0.1213]}, {"w": "specific", "b": [0.349, 0.1062, 0.4082, 0.1213]}, {"w": "name", "b": [0.4145, 0.1062, 0.4584, 0.1213]}, {"w": "that", "b": [0.4647, 0.1062, 0.4992, 0.1213]}, {"w": "contains", "b": [0.5055, 0.1062, 0.5731, 0.1213]}, {"w": "a", "b": [0.5794, 0.1062, 0.5888, 0.1213]}, {"w": "specific", "b": [0.5951, 0.1062, 0.6543, 0.1213]}, {"w": "function,", "b": [0.6606, 0.1062, 0.7333, 0.1213]}, {"w": "or", "b": [0.7397, 0.1062, 0.7565, 0.1213]}, {"w": "class-method", "b": [0.7628, 0.1062, 0.8691, 0.1213]}, {"w": "definition", "b": [0.1312, 0.1243, 0.2064, 0.1392]}, {"w": "with", "b": [0.2125, 0.1243, 0.2481, 0.1392]}, {"w": "a", "b": [0.2542, 0.1243, 0.2633, 0.1392]}, {"w": "specific", "b": [0.2695, 0.1243, 0.327, 0.1392]}, {"w": "signature", "b": [0.3331, 0.1243, 0.4064, 0.1392]}, {"w": "(an", "b": [0.4125, 0.1243, 0.4389, 0.1392]}, {"w": "entry", "b": [0.4451, 0.1243, 0.4868, 0.1392]}, {"w": "point", "b": [0.4929, 0.1243, 0.5345, 0.1392]}, {"w": "function).", "b": [0.5407, 0.1243, 0.6184, 0.1392]}, {"w": "The", "b": [0.6266, 0.1243, 0.658, 0.1392]}, {"w": "zip", "b": [0.6642, 0.1243, 0.6875, 0.1392]}, {"w": "archive", "b": [0.6937, 0.1243, 0.7501, 0.1392]}, {"w": "is", "b": [0.7562, 0.1243, 0.7685, 0.1392]}, {"w": "uploaded", "b": [0.7747, 0.1243, 0.8468, 0.1392]}, {"w": "to", "b": [0.8529, 0.1243, 0.8691, 0.1392]}, {"w": "the", "b": [0.1312, 0.1422, 0.1569, 0.1572]}, {"w": "cloud", "b": [0.163, 0.1422, 0.2061, 0.1572]}, {"w": "platform", "b": [0.2122, 0.1422, 0.2815, 0.1572]}, {"w": "and", "b": [0.2877, 0.1422, 0.3174, 0.1572]}, {"w": "registered", "b": [0.3235, 0.1422, 0.4017, 0.1572]}, {"w": "under", "b": [0.4079, 0.1422, 0.4541, 0.1572]}, {"w": "a", "b": [0.4602, 0.1422, 0.4694, 0.1572]}, {"w": "unique", "b": [0.4756, 0.1422, 0.5294, 0.1572]}, {"w": "name.", "b": [0.5356, 0.1422, 0.5838, 0.1572]}]}, {"id": "b_1", "type": "paragraph", "text": "The cloud platform provides an API to submit inputs to the serverless function. This specifies its name, provides the payload, and yields the outputs. The cloud platform takes care of deploying the code and the model on an adequate computational resource, executing the code, and routing the output back to the client.", "words": [{"w": "The", "b": [0.1306, 0.1693, 0.1617, 0.1841]}, {"w": "cloud", "b": [0.167, 0.1693, 0.2092, 0.1841]}, {"w": "platform", "b": [0.2145, 0.1693, 0.2824, 0.1841]}, {"w": "provides", "b": [0.2876, 0.1693, 0.3531, 0.1841]}, {"w": "an", "b": [0.3584, 0.1693, 0.3775, 0.1841]}, {"w": "API", "b": [0.3827, 0.1693, 0.4151, 0.1841]}, {"w": "to", "b": [0.4204, 0.1693, 0.4365, 0.1841]}, {"w": "submit", "b": [0.4417, 0.1693, 0.4961, 0.1841]}, {"w": "inputs", "b": [0.5014, 0.1693, 0.5507, 0.1841]}, {"w": "to", "b": [0.556, 0.1693, 0.5721, 0.1841]}, {"w": "the", "b": [0.5773, 0.1693, 0.6025, 0.1841]}, {"w": "serverless", "b": [0.6077, 0.1693, 0.6815, 0.1841]}, {"w": "function.", "b": [0.6868, 0.1693, 0.7567, 0.1841]}, {"w": "This", "b": [0.7646, 0.1693, 0.7998, 0.1841]}, {"w": "specifies", "b": [0.8051, 0.1693, 0.8692, 0.1841]}, {"w": "its", "b": [0.1312, 0.187, 0.1512, 0.2021]}, {"w": "name,", "b": [0.1579, 0.187, 0.207, 0.2021]}, {"w": "provides", "b": [0.2138, 0.187, 0.282, 0.2021]}, {"w": "the", "b": [0.2886, 0.187, 0.3148, 0.2021]}, {"w": "payload,", "b": [0.3214, 0.187, 0.3905, 0.2021]}, {"w": "and", "b": [0.3972, 0.187, 0.4276, 0.2021]}, {"w": "yields", "b": [0.4342, 0.187, 0.4809, 0.2021]}, {"w": "the", "b": [0.4876, 0.187, 0.5137, 0.2021]}, {"w": "outputs.", "b": [0.5204, 0.187, 0.5885, 0.2021]}, {"w": "The", "b": [0.5982, 0.187, 0.6306, 0.2021]}, {"w": "cloud", "b": [0.6373, 0.187, 0.6812, 0.2021]}, {"w": "platform", "b": [0.6879, 0.187, 0.7585, 0.2021]}, {"w": "takes", "b": [0.7651, 0.187, 0.8071, 0.2021]}, {"w": "care", "b": [0.8138, 0.187, 0.8473, 0.2021]}, {"w": "of", "b": [0.8539, 0.187, 0.8691, 0.2021]}, {"w": "deploying", "b": [0.1312, 0.2049, 0.2097, 0.22]}, {"w": "the", "b": [0.2165, 0.2049, 0.2427, 0.22]}, {"w": "code", "b": [0.2495, 0.2049, 0.2866, 0.22]}, {"w": "and", "b": [0.2934, 0.2049, 0.3237, 0.22]}, {"w": "the", "b": [0.3305, 0.2049, 0.3567, 0.22]}, {"w": "model", "b": [0.3635, 0.2049, 0.4132, 0.22]}, {"w": "on", "b": [0.42, 0.2049, 0.4398, 0.22]}, {"w": "an", "b": [0.4466, 0.2049, 0.4665, 0.22]}, {"w": "adequate", "b": [0.4733, 0.2049, 0.5471, 0.22]}, {"w": "computational", "b": [0.5539, 0.2049, 0.6721, 0.22]}, {"w": "resource,", "b": [0.6788, 0.2049, 0.7513, 0.22]}, {"w": "executing", "b": [0.7582, 0.2049, 0.8362, 0.22]}, {"w": "the", "b": [0.843, 0.2049, 0.8691, 0.22]}, {"w": "code,", "b": [0.1312, 0.223, 0.1728, 0.238]}, {"w": "and", "b": [0.1789, 0.223, 0.2087, 0.238]}, {"w": "routing", "b": [0.2148, 0.223, 0.2733, 0.238]}, {"w": "the", "b": [0.2795, 0.223, 0.3051, 0.238]}, {"w": "output", "b": [0.3113, 0.223, 0.3656, 0.238]}, {"w": "back", "b": [0.3718, 0.223, 0.4087, 0.238]}, {"w": "to", "b": [0.4148, 0.223, 0.4312, 0.238]}, {"w": "the", "b": [0.4374, 0.223, 0.463, 0.238]}, {"w": "client.", "b": [0.4692, 0.223, 0.5179, 0.238]}]}, {"id": "b_2", "type": "paragraph", "text": "Usually, the function’s execution time, zip file size, and amount of RAM available on the runtime are limited by the cloud service provider.", "words": [{"w": "Usually,", "b": [0.1312, 0.2498, 0.1967, 0.2649]}, {"w": "the", "b": [0.2035, 0.2498, 0.2297, 0.2649]}, {"w": "function’s", "b": [0.2363, 0.2498, 0.3165, 0.2649]}, {"w": "execution", "b": [0.3231, 0.2498, 0.401, 0.2649]}, {"w": "time,", "b": [0.4077, 0.2498, 0.4495, 0.2649]}, {"w": "zip", "b": [0.4563, 0.2498, 0.4803, 0.2649]}, {"w": "file", "b": [0.487, 0.2498, 0.5111, 0.2649]}, {"w": "size,", "b": [0.5177, 0.2498, 0.5523, 0.2649]}, {"w": "and", "b": [0.5591, 0.2498, 0.5895, 0.2649]}, {"w": "amount", "b": [0.5961, 0.2498, 0.6583, 0.2649]}, {"w": "of", "b": [0.665, 0.2498, 0.6801, 0.2649]}, {"w": "RAM", "b": [0.6868, 0.2498, 0.732, 0.2649]}, {"w": "available", "b": [0.7386, 0.2498, 0.8098, 0.2649]}, {"w": "on", "b": [0.8164, 0.2498, 0.8363, 0.2649]}, {"w": "the", "b": [0.843, 0.2498, 0.8691, 0.2649]}, {"w": "runtime", "b": [0.1312, 0.2679, 0.1943, 0.2828]}, {"w": "are", "b": [0.2005, 0.2679, 0.2252, 0.2828]}, {"w": "limited", "b": [0.2313, 0.2679, 0.2877, 0.2828]}, {"w": "by", "b": [0.2939, 0.2679, 0.3133, 0.2828]}, {"w": "the", "b": [0.3195, 0.2679, 0.3451, 0.2828]}, {"w": "cloud", "b": [0.3513, 0.2679, 0.3944, 0.2828]}, {"w": "service", "b": [0.4005, 0.2679, 0.4545, 0.2828]}, {"w": "provider.", "b": [0.4607, 0.2679, 0.5326, 0.2828]}]}, {"id": "b_3", "type": "paragraph", "text": "The zip file size limit can be a challenge. A typical machine learning model requires multiple heavyweight dependencies. Python’s libraries, to include Numpy, SciPy, and scikit-learn, are often needed for the model to be properly executed. Depending on the cloud platform, other supported programming languages can include Java, Go, PowerShell, Node.js, C#, and Ruby.", "words": [{"w": "The", "b": [0.1306, 0.2949, 0.1617, 0.3097]}, {"w": "zip", "b": [0.1679, 0.2949, 0.191, 0.3097]}, {"w": "file", "b": [0.1972, 0.2949, 0.2203, 0.3097]}, {"w": "size", "b": [0.2264, 0.2949, 0.2547, 0.3097]}, {"w": "limit", "b": [0.2609, 0.2949, 0.298, 0.3097]}, {"w": "can", "b": [0.3042, 0.2949, 0.3314, 0.3097]}, {"w": "be", "b": [0.3375, 0.2949, 0.3561, 0.3097]}, {"w": "a", "b": [0.3623, 0.2949, 0.3713, 0.3097]}, {"w": "challenge.", "b": [0.3775, 0.2949, 0.4544, 0.3097]}, {"w": "A", "b": [0.4626, 0.2949, 0.4762, 0.3097]}, {"w": "typical", "b": [0.4823, 0.2949, 0.5356, 0.3097]}, {"w": "machine", "b": [0.5417, 0.2949, 0.6066, 0.3097]}, {"w": "learning", "b": [0.6127, 0.2949, 0.6761, 0.3097]}, {"w": "model", "b": [0.6822, 0.2949, 0.73, 0.3097]}, {"w": "requires", "b": [0.7361, 0.2949, 0.7982, 0.3097]}, {"w": "multiple", "b": [0.8043, 0.2949, 0.8691, 0.3097]}, {"w": "heavyweight", "b": [0.1312, 0.3128, 0.2286, 0.3277]}, {"w": "dependencies.", "b": [0.2347, 0.3128, 0.3434, 0.3277]}, {"w": "Python’s", "b": [0.3516, 0.3128, 0.4221, 0.3277]}, {"w": "libraries,", "b": [0.4283, 0.3128, 0.4971, 0.3277]}, {"w": "to", "b": [0.5033, 0.3128, 0.5194, 0.3277]}, {"w": "include", "b": [0.5256, 0.3128, 0.5821, 0.3277]}, {"w": "Numpy,", "b": [0.5883, 0.3128, 0.6498, 0.3277]}, {"w": "SciPy,", "b": [0.656, 0.3128, 0.7046, 0.3277]}, {"w": "and", "b": [0.7108, 0.3128, 0.7401, 0.3277]}, {"w": "scikit-learn,", "b": [0.7462, 0.3128, 0.8387, 0.3277]}, {"w": "are", "b": [0.8449, 0.3128, 0.8692, 0.3277]}, {"w": "often", "b": [0.1312, 0.3308, 0.171, 0.3456]}, {"w": "needed", "b": [0.1772, 0.3308, 0.2316, 0.3456]}, {"w": "for", "b": [0.2377, 0.3308, 0.2594, 0.3456]}, {"w": "the", "b": [0.2656, 0.3308, 0.2908, 0.3456]}, {"w": "model", "b": [0.2969, 0.3308, 0.3447, 0.3456]}, {"w": "to", "b": [0.3509, 0.3308, 0.367, 0.3456]}, {"w": "be", "b": [0.3732, 0.3308, 0.3918, 0.3456]}, {"w": "properly", "b": [0.3979, 0.3308, 0.4645, 0.3456]}, {"w": "executed.", "b": [0.4707, 0.3308, 0.5447, 0.3456]}, {"w": "Depending", "b": [0.5529, 0.3308, 0.6378, 0.3456]}, {"w": "on", "b": [0.6439, 0.3308, 0.6631, 0.3456]}, {"w": "the", "b": [0.6692, 0.3308, 0.6944, 0.3456]}, {"w": "cloud", "b": [0.7005, 0.3308, 0.7428, 0.3456]}, {"w": "platform,", "b": [0.749, 0.3308, 0.822, 0.3456]}, {"w": "other", "b": [0.8282, 0.3308, 0.8695, 0.3456]}, {"w": "supported", "b": [0.1312, 0.3487, 0.2103, 0.3635]}, {"w": "programming", "b": [0.2162, 0.3487, 0.3218, 0.3635]}, {"w": "languages", "b": [0.3277, 0.3487, 0.4042, 0.3635]}, {"w": "can", "b": [0.4101, 0.3487, 0.4373, 0.3635]}, {"w": "include", "b": [0.4432, 0.3487, 0.4995, 0.3635]}, {"w": "Java,", "b": [0.5054, 0.3487, 0.5458, 0.3635]}, {"w": "Go,", "b": [0.5518, 0.3487, 0.58, 0.3635]}, {"w": "PowerShell,", "b": [0.586, 0.3487, 0.6772, 0.3635]}, {"w": "Node.js,", "b": [0.6832, 0.3487, 0.7471, 0.3635]}, {"w": "C#,", "b": [0.7531, 0.3487, 0.7862, 0.3635]}, {"w": "and", "b": [0.7922, 0.3487, 0.8213, 0.3635]}, {"w": "Ruby.", "b": [0.8272, 0.3487, 0.8727, 0.3635]}]}, {"id": "b_4", "type": "paragraph", "text": "There are many advantages to relying on serverless deployment. The obvious advantage is that you don’t have to provision resources such as servers or virtual machines. You don’t have to install dependencies, maintain, or upgrade the system. Serverless systems are highly scalable and can easily and effortlessly support thousands of requests per second. Serverless functions support both synchronous and asynchronous modes of operation.", "words": [{"w": "There", "b": [0.1306, 0.3755, 0.1784, 0.3905]}, {"w": "are", "b": [0.1846, 0.3755, 0.2095, 0.3905]}, {"w": "many", "b": [0.2157, 0.3755, 0.2603, 0.3905]}, {"w": "advantages", "b": [0.2665, 0.3755, 0.356, 0.3905]}, {"w": "to", "b": [0.3621, 0.3755, 0.3787, 0.3905]}, {"w": "relying", "b": [0.3849, 0.3755, 0.4405, 0.3905]}, {"w": "on", "b": [0.4467, 0.3755, 0.4664, 0.3905]}, {"w": "serverless", "b": [0.4725, 0.3755, 0.5488, 0.3905]}, {"w": "deployment.", "b": [0.555, 0.3755, 0.6542, 0.3905]}, {"w": "The", "b": [0.6624, 0.3755, 0.6946, 0.3905]}, {"w": "obvious", "b": [0.7008, 0.3755, 0.7621, 0.3905]}, {"w": "advantage", "b": [0.7683, 0.3755, 0.8504, 0.3905]}, {"w": "is", "b": [0.8565, 0.3755, 0.8691, 0.3905]}, {"w": "that", "b": [0.1312, 0.3934, 0.1657, 0.4085]}, {"w": "you", "b": [0.1722, 0.3934, 0.2015, 0.4085]}, {"w": "don’t", "b": [0.2079, 0.3934, 0.2508, 0.4085]}, {"w": "have", "b": [0.2572, 0.3934, 0.2944, 0.4085]}, {"w": "to", "b": [0.3008, 0.3934, 0.3176, 0.4085]}, {"w": "provision", "b": [0.324, 0.3934, 0.3984, 0.4085]}, {"w": "resources", "b": [0.4049, 0.3934, 0.4795, 0.4085]}, {"w": "such", "b": [0.4859, 0.3934, 0.5221, 0.4085]}, {"w": "as", "b": [0.5286, 0.3934, 0.5454, 0.4085]}, {"w": "servers", "b": [0.5518, 0.3934, 0.6076, 0.4085]}, {"w": "or", "b": [0.6141, 0.3934, 0.6308, 0.4085]}, {"w": "virtual", "b": [0.6373, 0.3934, 0.6922, 0.4085]}, {"w": "machines.", "b": [0.6987, 0.3934, 0.7788, 0.4085]}, {"w": "You", "b": [0.7879, 0.3934, 0.8203, 0.4085]}, {"w": "don’t", "b": [0.8268, 0.3934, 0.8696, 0.4085]}, {"w": "have", "b": [0.1312, 0.4115, 0.1672, 0.4264]}, {"w": "to", "b": [0.1733, 0.4115, 0.1895, 0.4264]}, {"w": "install", "b": [0.1957, 0.4115, 0.2444, 0.4264]}, {"w": "dependencies,", "b": [0.2506, 0.4115, 0.3596, 0.4264]}, {"w": "maintain,", "b": [0.3658, 0.4115, 0.4412, 0.4264]}, {"w": "or", "b": [0.4474, 0.4115, 0.4637, 0.4264]}, {"w": "upgrade", "b": [0.4698, 0.4115, 0.5337, 0.4264]}, {"w": "the", "b": [0.5398, 0.4115, 0.5652, 0.4264]}, {"w": "system.", "b": [0.5713, 0.4115, 0.6308, 0.4264]}, {"w": "Serverless", "b": [0.639, 0.4115, 0.7163, 0.4264]}, {"w": "systems", "b": [0.7225, 0.4115, 0.7841, 0.4264]}, {"w": "are", "b": [0.7902, 0.4115, 0.8146, 0.4264]}, {"w": "highly", "b": [0.8207, 0.4115, 0.8699, 0.4264]}, {"w": "scalable", "b": [0.1312, 0.4294, 0.1935, 0.4443]}, {"w": "and", "b": [0.1996, 0.4294, 0.2292, 0.4443]}, {"w": "can", "b": [0.2353, 0.4294, 0.2628, 0.4443]}, {"w": "easily", "b": [0.269, 0.4294, 0.3134, 0.4443]}, {"w": "and", "b": [0.3195, 0.4294, 0.3491, 0.4443]}, {"w": "effortlessly", "b": [0.3552, 0.4294, 0.44, 0.4443]}, {"w": "support", "b": [0.4462, 0.4294, 0.5079, 0.4443]}, {"w": "thousands", "b": [0.5141, 0.4294, 0.5948, 0.4443]}, {"w": "of", "b": [0.6009, 0.4294, 0.6157, 0.4443]}, {"w": "requests", "b": [0.6218, 0.4294, 0.6868, 0.4443]}, {"w": "per", "b": [0.6929, 0.4294, 0.719, 0.4443]}, {"w": "second.", "b": [0.7251, 0.4294, 0.7833, 0.4443]}, {"w": "Serverless", "b": [0.7915, 0.4294, 0.8692, 0.4443]}, {"w": "functions", "b": [0.1312, 0.4473, 0.2047, 0.4623]}, {"w": "support", "b": [0.2108, 0.4473, 0.273, 0.4623]}, {"w": "both", "b": [0.2792, 0.4473, 0.3166, 0.4623]}, {"w": "synchronous", "b": [0.3228, 0.4473, 0.4215, 0.4623]}, {"w": "and", "b": [0.4276, 0.4473, 0.4574, 0.4623]}, {"w": "asynchronous", "b": [0.4635, 0.4473, 0.5715, 0.4623]}, {"w": "modes", "b": [0.5776, 0.4473, 0.6285, 0.4623]}, {"w": "of", "b": [0.6346, 0.4473, 0.6495, 0.4623]}, {"w": "operation.", "b": [0.6556, 0.4473, 0.7372, 0.4623]}]}, {"id": "b_5", "type": "paragraph", "text": "Serverless deployment is also cost-efficient: you only pay for compute-time. This may also be achieved with the previous two deployment patterns using autoscaling, but autoscaling has significant latency. While the demand may drop, excessive virtual machines could still keep running before they are terminated.", "words": [{"w": "Serverless", "b": [0.1312, 0.4744, 0.2079, 0.4892]}, {"w": "deployment", "b": [0.2139, 0.4744, 0.3049, 0.4892]}, {"w": "is", "b": [0.3109, 0.4744, 0.323, 0.4892]}, {"w": "also", "b": [0.329, 0.4744, 0.3593, 0.4892]}, {"w": "cost-efficient:", "b": [0.3653, 0.4744, 0.4684, 0.4892]}, {"w": "you", "b": [0.4765, 0.4744, 0.5046, 0.4892]}, {"w": "only", "b": [0.5106, 0.4744, 0.5443, 0.4892]}, {"w": "pay", "b": [0.5503, 0.4744, 0.5784, 0.4892]}, {"w": "for", "b": [0.5845, 0.4744, 0.6061, 0.4892]}, {"w": "compute-time.", "b": [0.6121, 0.4744, 0.7257, 0.4892]}, {"w": "This", "b": [0.7338, 0.4744, 0.7691, 0.4892]}, {"w": "may", "b": [0.7751, 0.4744, 0.8082, 0.4892]}, {"w": "also", "b": [0.8142, 0.4744, 0.8445, 0.4892]}, {"w": "be", "b": [0.8505, 0.4744, 0.8691, 0.4892]}, {"w": "achieved", "b": [0.1312, 0.4922, 0.1997, 0.5072]}, {"w": "with", "b": [0.2058, 0.4922, 0.2419, 0.5072]}, {"w": "the", "b": [0.248, 0.4922, 0.2737, 0.5072]}, {"w": "previous", "b": [0.2799, 0.4922, 0.3475, 0.5072]}, {"w": "two", "b": [0.3536, 0.4922, 0.3824, 0.5072]}, {"w": "deployment", "b": [0.3885, 0.4922, 0.4817, 0.5072]}, {"w": "patterns", "b": [0.4879, 0.4922, 0.5549, 0.5072]}, {"w": "using", "b": [0.5611, 0.4922, 0.6034, 0.5072]}, {"w": "autoscaling,", "b": [0.6095, 0.4922, 0.7054, 0.5072]}, {"w": "but", "b": [0.7115, 0.4922, 0.7393, 0.5072]}, {"w": "autoscaling", "b": [0.7454, 0.4922, 0.8361, 0.5072]}, {"w": "has", "b": [0.8423, 0.4922, 0.8691, 0.5072]}, {"w": "significant", "b": [0.1312, 0.5102, 0.2127, 0.5251]}, {"w": "latency.", "b": [0.2188, 0.5102, 0.2802, 0.5251]}, {"w": "While", "b": [0.2884, 0.5102, 0.336, 0.5251]}, {"w": "the", "b": [0.3422, 0.5102, 0.3678, 0.5251]}, {"w": "demand", "b": [0.3739, 0.5102, 0.4373, 0.5251]}, {"w": "may", "b": [0.4435, 0.5102, 0.4772, 0.5251]}, {"w": "drop,", "b": [0.4833, 0.5102, 0.5253, 0.5251]}, {"w": "excessive", "b": [0.5315, 0.5102, 0.6028, 0.5251]}, {"w": "virtual", "b": [0.609, 0.5102, 0.6628, 0.5251]}, {"w": "machines", "b": [0.6689, 0.5102, 0.7422, 0.5251]}, {"w": "could", "b": [0.7483, 0.5102, 0.7913, 0.5251]}, {"w": "still", "b": [0.7974, 0.5102, 0.8272, 0.5251]}, {"w": "keep", "b": [0.8333, 0.5102, 0.8692, 0.5251]}, {"w": "running", "b": [0.1312, 0.5281, 0.1939, 0.543]}, {"w": "before", "b": [0.2, 0.5281, 0.2493, 0.543]}, {"w": "they", "b": [0.2554, 0.5281, 0.2908, 0.543]}, {"w": "are", "b": [0.297, 0.5281, 0.3216, 0.543]}, {"w": "terminated.", "b": [0.3278, 0.5281, 0.4211, 0.543]}]}, {"id": "b_6", "type": "paragraph", "text": "Serverless deployment also simplifies canary deployment, or canarying. In software engineering, canarying is a strategy when the updated code is pushed to just a small group of end-users, usually unaware. Because the new version is only distributed to a small number of users, its impact is relatively low, and changes can be reversed quickly, should the new code contain bugs. It is easy to set up two versions of serverless functions in production, and start sending low volume traffic to just one, and test it without affecting many users. We will talk more about canarying in Section 8.4.", "words": [{"w": "Serverless", "b": [0.1312, 0.5549, 0.2111, 0.57]}, {"w": "deployment", "b": [0.2195, 0.5549, 0.3142, 0.57]}, {"w": "also", "b": [0.3227, 0.5549, 0.3542, 0.57]}, {"w": "simplifies", "b": [0.3627, 0.5549, 0.4382, 0.57]}, {"w": "canary", "b": [0.4465, 0.555, 0.5083, 0.57]}, {"w": "deployment,", "b": [0.518, 0.5549, 0.6305, 0.57]}, {"w": "or", "b": [0.6395, 0.5549, 0.6563, 0.57]}, {"w": "canarying.", "b": [0.6648, 0.5549, 0.7603, 0.57]}, {"w": "In", "b": [0.7755, 0.5549, 0.7927, 0.57]}, {"w": "software", "b": [0.8012, 0.5549, 0.8688, 0.57]}, {"w": "engineering,", "b": [0.1312, 0.573, 0.2277, 0.5879]}, {"w": "canarying", "b": [0.2339, 0.573, 0.3124, 0.5879]}, {"w": "is", "b": [0.3185, 0.573, 0.3309, 0.5879]}, {"w": "a", "b": [0.3371, 0.573, 0.3464, 0.5879]}, {"w": "strategy", "b": [0.3525, 0.573, 0.4178, 0.5879]}, {"w": "when", "b": [0.4239, 0.573, 0.466, 0.5879]}, {"w": "the", "b": [0.4722, 0.573, 0.4978, 0.5879]}, {"w": "updated", "b": [0.504, 0.573, 0.5701, 0.5879]}, {"w": "code", "b": [0.5763, 0.573, 0.6127, 0.5879]}, {"w": "is", "b": [0.6189, 0.573, 0.6313, 0.5879]}, {"w": "pushed", "b": [0.6375, 0.573, 0.694, 0.5879]}, {"w": "to", "b": [0.7002, 0.573, 0.7166, 0.5879]}, {"w": "just", "b": [0.7227, 0.573, 0.7531, 0.5879]}, {"w": "a", "b": [0.7592, 0.573, 0.7685, 0.5879]}, {"w": "small", "b": [0.7746, 0.573, 0.8168, 0.5879]}, {"w": "group", "b": [0.823, 0.573, 0.8691, 0.5879]}, {"w": "of", "b": [0.1312, 0.591, 0.1458, 0.6058]}, {"w": "end-users,", "b": [0.1517, 0.591, 0.2304, 0.6058]}, {"w": "usually", "b": [0.2364, 0.591, 0.2923, 0.6058]}, {"w": "unaware.", "b": [0.2982, 0.591, 0.3686, 0.6058]}, {"w": "Because", "b": [0.3767, 0.591, 0.4398, 0.6058]}, {"w": "the", "b": [0.4458, 0.591, 0.4709, 0.6058]}, {"w": "new", "b": [0.4768, 0.591, 0.508, 0.6058]}, {"w": "version", "b": [0.5139, 0.591, 0.5693, 0.6058]}, {"w": "is", "b": [0.5753, 0.591, 0.5874, 0.6058]}, {"w": "only", "b": [0.5934, 0.591, 0.627, 0.6058]}, {"w": "distributed", "b": [0.6329, 0.591, 0.7195, 0.6058]}, {"w": "to", "b": [0.7255, 0.591, 0.7416, 0.6058]}, {"w": "a", "b": [0.7475, 0.591, 0.7565, 0.6058]}, {"w": "small", "b": [0.7625, 0.591, 0.8037, 0.6058]}, {"w": "number", "b": [0.8097, 0.591, 0.8695, 0.6058]}, {"w": "of", "b": [0.1312, 0.6087, 0.1464, 0.6238]}, {"w": "users,", "b": [0.1528, 0.6087, 0.1991, 0.6238]}, {"w": "its", "b": [0.2056, 0.6087, 0.2256, 0.6238]}, {"w": "impact", "b": [0.232, 0.6087, 0.2885, 0.6238]}, {"w": "is", "b": [0.2949, 0.6087, 0.3075, 0.6238]}, {"w": "relatively", "b": [0.3139, 0.6087, 0.3898, 0.6238]}, {"w": "low,", "b": [0.3963, 0.6087, 0.4292, 0.6238]}, {"w": "and", "b": [0.4357, 0.6087, 0.466, 0.6238]}, {"w": "changes", "b": [0.4724, 0.6087, 0.5358, 0.6238]}, {"w": "can", "b": [0.5422, 0.6087, 0.5705, 0.6238]}, {"w": "be", "b": [0.5769, 0.6087, 0.5962, 0.6238]}, {"w": "reversed", "b": [0.6026, 0.6087, 0.6698, 0.6238]}, {"w": "quickly,", "b": [0.6762, 0.6087, 0.7385, 0.6238]}, {"w": "should", "b": [0.745, 0.6087, 0.7985, 0.6238]}, {"w": "the", "b": [0.8049, 0.6087, 0.831, 0.6238]}, {"w": "new", "b": [0.8374, 0.6087, 0.8698, 0.6238]}, {"w": "code", "b": [0.1312, 0.6269, 0.1669, 0.6417]}, {"w": "contain", "b": [0.173, 0.6269, 0.2308, 0.6417]}, {"w": "bugs.", "b": [0.2368, 0.6269, 0.2781, 0.6417]}, {"w": "It", "b": [0.2863, 0.6269, 0.2998, 0.6417]}, {"w": "is", "b": [0.3059, 0.6269, 0.3181, 0.6417]}, {"w": "easy", "b": [0.3241, 0.6269, 0.3579, 0.6417]}, {"w": "to", "b": [0.364, 0.6269, 0.38, 0.6417]}, {"w": "set", "b": [0.3861, 0.6269, 0.4083, 0.6417]}, {"w": "up", "b": [0.4144, 0.6269, 0.4345, 0.6417]}, {"w": "two", "b": [0.4405, 0.6269, 0.4686, 0.6417]}, {"w": "versions", "b": [0.4747, 0.6269, 0.5372, 0.6417]}, {"w": "of", "b": [0.5433, 0.6269, 0.5579, 0.6417]}, {"w": "serverless", "b": [0.5639, 0.6269, 0.6377, 0.6417]}, {"w": "functions", "b": [0.6438, 0.6269, 0.7158, 0.6417]}, {"w": "in", "b": [0.7218, 0.6269, 0.7369, 0.6417]}, {"w": "production,", "b": [0.7429, 0.6269, 0.834, 0.6417]}, {"w": "and", "b": [0.84, 0.6269, 0.8692, 0.6417]}, {"w": "start", "b": [0.1312, 0.6446, 0.1701, 0.6597]}, {"w": "sending", "b": [0.1764, 0.6446, 0.2383, 0.6597]}, {"w": "low", "b": [0.2446, 0.6446, 0.2723, 0.6597]}, {"w": "volume", "b": [0.2786, 0.6446, 0.3372, 0.6597]}, {"w": "traffic", "b": [0.3435, 0.6446, 0.3917, 0.6597]}, {"w": "to", "b": [0.398, 0.6446, 0.4147, 0.6597]}, {"w": "just", "b": [0.4211, 0.6446, 0.452, 0.6597]}, {"w": "one,", "b": [0.4584, 0.6446, 0.4918, 0.6597]}, {"w": "and", "b": [0.4982, 0.6446, 0.5286, 0.6597]}, {"w": "test", "b": [0.5349, 0.6446, 0.5653, 0.6597]}, {"w": "it", "b": [0.5717, 0.6446, 0.5842, 0.6597]}, {"w": "without", "b": [0.5905, 0.6446, 0.6543, 0.6597]}, {"w": "affecting", "b": [0.6607, 0.6446, 0.7302, 0.6597]}, {"w": "many", "b": [0.7365, 0.6446, 0.7815, 0.6597]}, {"w": "users.", "b": [0.7878, 0.6446, 0.8342, 0.6597]}, {"w": "We", "b": [0.8429, 0.6446, 0.8691, 0.6597]}, {"w": "will", "b": [0.1306, 0.6627, 0.1593, 0.6776]}, {"w": "talk", "b": [0.1654, 0.6627, 0.1967, 0.6776]}, {"w": "more", "b": [0.2029, 0.6627, 0.2429, 0.6776]}, {"w": "about", "b": [0.249, 0.6627, 0.2957, 0.6776]}, {"w": "canarying", "b": [0.3018, 0.6627, 0.3803, 0.6776]}, {"w": "in", "b": [0.3865, 0.6627, 0.4019, 0.6776]}, {"w": "Section", "b": [0.408, 0.6627, 0.4665, 0.6776]}, {"w": "8.4.", "b": [0.4726, 0.6627, 0.5013, 0.6776]}]}, {"id": "b_7", "type": "paragraph", "text": "Rollbacks are also very simple in the serverless deployment because it is easy to switch back to the previous version of the function by replacing one zip archive.", "words": [{"w": "Rollbacks", "b": [0.1312, 0.6897, 0.2076, 0.7046]}, {"w": "are", "b": [0.2138, 0.6897, 0.2382, 0.7046]}, {"w": "also", "b": [0.2444, 0.6897, 0.2749, 0.7046]}, {"w": "very", "b": [0.281, 0.6897, 0.3151, 0.7046]}, {"w": "simple", "b": [0.3212, 0.6897, 0.372, 0.7046]}, {"w": "in", "b": [0.3782, 0.6897, 0.3934, 0.7046]}, {"w": "the", "b": [0.3996, 0.6897, 0.4249, 0.7046]}, {"w": "serverless", "b": [0.4311, 0.6897, 0.5056, 0.7046]}, {"w": "deployment", "b": [0.5117, 0.6897, 0.6035, 0.7046]}, {"w": "because", "b": [0.6097, 0.6897, 0.6711, 0.7046]}, {"w": "it", "b": [0.6773, 0.6897, 0.6895, 0.7046]}, {"w": "is", "b": [0.6956, 0.6897, 0.7079, 0.7046]}, {"w": "easy", "b": [0.7141, 0.6897, 0.7481, 0.7046]}, {"w": "to", "b": [0.7543, 0.6897, 0.7705, 0.7046]}, {"w": "switch", "b": [0.7767, 0.6897, 0.827, 0.7046]}, {"w": "back", "b": [0.8331, 0.6897, 0.8696, 0.7046]}, {"w": "to", "b": [0.1312, 0.7076, 0.1476, 0.7225]}, {"w": "the", "b": [0.1538, 0.7076, 0.1794, 0.7225]}, {"w": "previous", "b": [0.1856, 0.7076, 0.2529, 0.7225]}, {"w": "version", "b": [0.2591, 0.7076, 0.3156, 0.7225]}, {"w": "of", "b": [0.3218, 0.7076, 0.3366, 0.7225]}, {"w": "the", "b": [0.3428, 0.7076, 0.3684, 0.7225]}, {"w": "function", "b": [0.3746, 0.7076, 0.4407, 0.7225]}, {"w": "by", "b": [0.4469, 0.7076, 0.4664, 0.7225]}, {"w": "replacing", "b": [0.4725, 0.7076, 0.5454, 0.7225]}, {"w": "one", "b": [0.5515, 0.7076, 0.5792, 0.7225]}, {"w": "zip", "b": [0.5854, 0.7076, 0.609, 0.7225]}, {"w": "archive.", "b": [0.6151, 0.7076, 0.6772, 0.7225]}]}, {"id": "b_8", "type": "paragraph", "text": "We’ve discussed the zip archive size limit, and the RAM available on the runtime. These are", "words": [{"w": "We’ve", "b": [0.1303, 0.7346, 0.1777, 0.7494]}, {"w": "discussed", "b": [0.1838, 0.7346, 0.2568, 0.7494]}, {"w": "the", "b": [0.263, 0.7346, 0.2882, 0.7494]}, {"w": "zip", "b": [0.2943, 0.7346, 0.3176, 0.7494]}, {"w": "archive", "b": [0.3237, 0.7346, 0.3797, 0.7494]}, {"w": "size", "b": [0.3859, 0.7346, 0.4143, 0.7494]}, {"w": "limit,", "b": [0.4204, 0.7346, 0.4628, 0.7494]}, {"w": "and", "b": [0.4689, 0.7346, 0.4982, 0.7494]}, {"w": "the", "b": [0.5043, 0.7346, 0.5296, 0.7494]}, {"w": "RAM", "b": [0.5357, 0.7346, 0.5793, 0.7494]}, {"w": "available", "b": [0.5855, 0.7346, 0.6541, 0.7494]}, {"w": "on", "b": [0.6602, 0.7346, 0.6794, 0.7494]}, {"w": "the", "b": [0.6855, 0.7346, 0.7107, 0.7494]}, {"w": "runtime.", "b": [0.7169, 0.7346, 0.784, 0.7494]}, {"w": "These", "b": [0.7922, 0.7346, 0.8387, 0.7494]}, {"w": "are", "b": [0.8449, 0.7346, 0.8692, 0.7494]}]}, {"id": "b_9", "type": "paragraph", "text": "important drawbacks to serverless deployment. Likewise, the unavailability of GPU access1", "words": [{"w": "important", "b": [0.1312, 0.7524, 0.2123, 0.7674]}, {"w": "drawbacks", "b": [0.2184, 0.7524, 0.3021, 0.7674]}, {"w": "to", "b": [0.3083, 0.7524, 0.3247, 0.7674]}, {"w": "serverless", "b": [0.3309, 0.7524, 0.4061, 0.7674]}, {"w": "deployment.", "b": [0.4123, 0.7524, 0.5102, 0.7674]}, {"w": "Likewise,", "b": [0.5184, 0.7524, 0.5916, 0.7674]}, {"w": "the", "b": [0.5977, 0.7524, 0.6234, 0.7674]}, {"w": "unavailability", "b": [0.6295, 0.7524, 0.7382, 0.7674]}, {"w": "of", "b": [0.7444, 0.7524, 0.7592, 0.7674]}, {"w": "GPU", "b": [0.7654, 0.7524, 0.8063, 0.7674]}, {"w": "access1", "b": [0.8124, 0.7505, 0.8678, 0.7674]}]}, {"id": "b_10", "type": "paragraph", "text": "can be a significant limitation for deploying deep models.", "words": [{"w": "can", "b": [0.1312, 0.7704, 0.1589, 0.7853]}, {"w": "be", "b": [0.1651, 0.7704, 0.1841, 0.7853]}, {"w": "a", "b": [0.1902, 0.7704, 0.1994, 0.7853]}, {"w": "significant", "b": [0.2056, 0.7704, 0.2872, 0.7853]}, {"w": "limitation", "b": [0.2934, 0.7704, 0.3723, 0.7853]}, {"w": "for", "b": [0.3785, 0.7704, 0.4006, 0.7853]}, {"w": "deploying", "b": [0.4067, 0.7704, 0.4836, 0.7853]}, {"w": "deep", "b": [0.4898, 0.7704, 0.5267, 0.7853]}, {"w": "models.", "b": [0.5329, 0.7704, 0.594, 0.7853]}]}, {"id": "b_11", "type": "paragraph", "text": "Of course, complex software systems may combine deployment patterns. A deployment pattern appropriate for one model may be less optimal for another one. A combination of several deployment patterns is called a hybrid deployment pattern. Personal assistants", "words": [{"w": "Of", "b": [0.1312, 0.7972, 0.1516, 0.8123]}, {"w": "course,", "b": [0.1594, 0.7972, 0.2161, 0.8123]}, {"w": "complex", "b": [0.2243, 0.7972, 0.2918, 0.8123]}, {"w": "software", "b": [0.2996, 0.7972, 0.3672, 0.8123]}, {"w": "systems", "b": [0.375, 0.7972, 0.4386, 0.8123]}, {"w": "may", "b": [0.4464, 0.7972, 0.4809, 0.8123]}, {"w": "combine", "b": [0.4887, 0.7972, 0.5562, 0.8123]}, {"w": "deployment", "b": [0.564, 0.7972, 0.6587, 0.8123]}, {"w": "patterns.", "b": [0.6665, 0.7972, 0.7399, 0.8123]}, {"w": "A", "b": [0.753, 0.7972, 0.7671, 0.8123]}, {"w": "deployment", "b": [0.7749, 0.7972, 0.8696, 0.8123]}, {"w": "pattern", "b": [0.1312, 0.8151, 0.1919, 0.8302]}, {"w": "appropriate", "b": [0.198, 0.8151, 0.2932, 0.8302]}, {"w": "for", "b": [0.2994, 0.8151, 0.3219, 0.8302]}, {"w": "one", "b": [0.328, 0.8151, 0.3562, 0.8302]}, {"w": "model", "b": [0.3624, 0.8151, 0.412, 0.8302]}, {"w": "may", "b": [0.4181, 0.8151, 0.4526, 0.8302]}, {"w": "be", "b": [0.4587, 0.8151, 0.478, 0.8302]}, {"w": "less", "b": [0.4842, 0.8151, 0.5126, 0.8302]}, {"w": "optimal", "b": [0.5187, 0.8151, 0.5814, 0.8302]}, {"w": "for", "b": [0.5875, 0.8151, 0.6101, 0.8302]}, {"w": "another", "b": [0.6162, 0.8151, 0.6789, 0.8302]}, {"w": "one.", "b": [0.6851, 0.8151, 0.7185, 0.8302]}, {"w": "A", "b": [0.7267, 0.8151, 0.7408, 0.8302]}, {"w": "combination", "b": [0.7469, 0.8151, 0.8478, 0.8302]}, {"w": "of", "b": [0.8539, 0.8151, 0.8691, 0.8302]}, {"w": "several", "b": [0.1312, 0.8331, 0.1861, 0.8482]}, {"w": "deployment", "b": [0.1923, 0.8331, 0.2857, 0.8482]}, {"w": "patterns", "b": [0.2919, 0.8331, 0.3592, 0.8482]}, {"w": "is", "b": [0.3653, 0.8331, 0.3778, 0.8482]}, {"w": "called", "b": [0.3839, 0.8331, 0.4304, 0.8482]}, {"w": "a", "b": [0.4366, 0.8331, 0.4458, 0.8482]}, {"w": "hybrid", "b": [0.452, 0.8332, 0.5126, 0.8482]}, {"w": "deployment", "b": [0.5197, 0.8332, 0.627, 0.8482]}, {"w": "pattern.", "b": [0.634, 0.8331, 0.7081, 0.8482]}, {"w": "Personal", "b": [0.7163, 0.8331, 0.7854, 0.8482]}, {"w": "assistants", "b": [0.7915, 0.8331, 0.8689, 0.8482]}]}, {"id": "b_12", "type": "paragraph", "text": "1As of July 2020.", "words": [{"w": "1As", "b": [0.1518, 0.8599, 0.1774, 0.8738]}, {"w": "of", "b": [0.1826, 0.8618, 0.1953, 0.8738]}, {"w": "July", "b": [0.2005, 0.8618, 0.2299, 0.8738]}, {"w": "2020.", "b": [0.2351, 0.8618, 0.2708, 0.8738]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "9", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 249, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "like Google Home or Amazon Echo might have a model that recognizes the activation phrase (such as “OK, Google” or “Alexa”) deployed on the client’s device, and more complex models", "words": [{"w": "like", "b": [0.1312, 0.0885, 0.1584, 0.1033]}, {"w": "Google", "b": [0.1644, 0.0885, 0.2193, 0.1033]}, {"w": "Home", "b": [0.2254, 0.0885, 0.2711, 0.1033]}, {"w": "or", "b": [0.2772, 0.0885, 0.2933, 0.1033]}, {"w": "Amazon", "b": [0.2994, 0.0885, 0.3642, 0.1033]}, {"w": "Echo", "b": [0.3702, 0.0885, 0.4092, 0.1033]}, {"w": "might", "b": [0.4152, 0.0885, 0.4609, 0.1033]}, {"w": "have", "b": [0.467, 0.0885, 0.5027, 0.1033]}, {"w": "a", "b": [0.5087, 0.0885, 0.5178, 0.1033]}, {"w": "model", "b": [0.5238, 0.0885, 0.5716, 0.1033]}, {"w": "that", "b": [0.5777, 0.0885, 0.6108, 0.1033]}, {"w": "recognizes", "b": [0.6169, 0.0885, 0.6964, 0.1033]}, {"w": "the", "b": [0.7025, 0.0885, 0.7276, 0.1033]}, {"w": "activation", "b": [0.7337, 0.0885, 0.8116, 0.1033]}, {"w": "phrase", "b": [0.8176, 0.0885, 0.8691, 0.1033]}, {"w": "(such", "b": [0.1291, 0.1065, 0.1709, 0.1213]}, {"w": "as", "b": [0.1767, 0.1065, 0.1929, 0.1213]}, {"w": "“OK,", "b": [0.1987, 0.1065, 0.2404, 0.1213]}, {"w": "Google”", "b": [0.2463, 0.1065, 0.3097, 0.1213]}, {"w": "or", "b": [0.3155, 0.1065, 0.3316, 0.1213]}, {"w": "“Alexa”)", "b": [0.3375, 0.1065, 0.4068, 0.1213]}, {"w": "deployed", "b": [0.4126, 0.1065, 0.4814, 0.1213]}, {"w": "on", "b": [0.4873, 0.1065, 0.5064, 0.1213]}, {"w": "the", "b": [0.5122, 0.1065, 0.5373, 0.1213]}, {"w": "client’s", "b": [0.5432, 0.1065, 0.598, 0.1213]}, {"w": "device,", "b": [0.6039, 0.1065, 0.6577, 0.1213]}, {"w": "and", "b": [0.6635, 0.1065, 0.6927, 0.1213]}, {"w": "more", "b": [0.6985, 0.1065, 0.7377, 0.1213]}, {"w": "complex", "b": [0.7436, 0.1065, 0.8084, 0.1213]}, {"w": "models", "b": [0.8142, 0.1065, 0.8691, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "handle requests like “put song X on device Y” will instead run on the server. Alternatively, the deployment on the user’s mobile device might augment the video and add simple intelligent effects in realtime. Server deployment would be used to apply more complex effects, such as stabilization and super-resolution.", "words": [{"w": "handle", "b": [0.1312, 0.1244, 0.1835, 0.1392]}, {"w": "requests", "b": [0.1883, 0.1244, 0.2524, 0.1392]}, {"w": "like", "b": [0.2572, 0.1244, 0.2844, 0.1392]}, {"w": "“put", "b": [0.2892, 0.1244, 0.3249, 0.1392]}, {"w": "song", "b": [0.3297, 0.1244, 0.365, 0.1392]}, {"w": "X", "b": [0.3698, 0.1244, 0.3834, 0.1392]}, {"w": "on", "b": [0.3882, 0.1244, 0.4073, 0.1392]}, {"w": "device", "b": [0.4121, 0.1244, 0.4609, 0.1392]}, {"w": "Y”", "b": [0.4657, 0.1244, 0.4878, 0.1392]}, {"w": "will", "b": [0.4926, 0.1244, 0.5207, 0.1392]}, {"w": "instead", "b": [0.5256, 0.1244, 0.582, 0.1392]}, {"w": "run", "b": [0.5868, 0.1244, 0.614, 0.1392]}, {"w": "on", "b": [0.6188, 0.1244, 0.6379, 0.1392]}, {"w": "the", "b": [0.6427, 0.1244, 0.6679, 0.1392]}, {"w": "server.", "b": [0.6727, 0.1244, 0.7241, 0.1392]}, {"w": "Alternatively,", "b": [0.7319, 0.1244, 0.8389, 0.1392]}, {"w": "the", "b": [0.844, 0.1244, 0.8692, 0.1392]}, {"w": "deployment", "b": [0.1312, 0.1423, 0.2237, 0.1572]}, {"w": "on", "b": [0.2298, 0.1423, 0.2492, 0.1572]}, {"w": "the", "b": [0.2553, 0.1423, 0.2809, 0.1572]}, {"w": "user’s", "b": [0.287, 0.1423, 0.3322, 0.1572]}, {"w": "mobile", "b": [0.3384, 0.1423, 0.3915, 0.1572]}, {"w": "device", "b": [0.3976, 0.1423, 0.4471, 0.1572]}, {"w": "might", "b": [0.4533, 0.1423, 0.4997, 0.1572]}, {"w": "augment", "b": [0.5059, 0.1423, 0.5748, 0.1572]}, {"w": "the", "b": [0.5809, 0.1423, 0.6065, 0.1572]}, {"w": "video", "b": [0.6126, 0.1423, 0.655, 0.1572]}, {"w": "and", "b": [0.6611, 0.1423, 0.6907, 0.1572]}, {"w": "add", "b": [0.6969, 0.1423, 0.7265, 0.1572]}, {"w": "simple", "b": [0.7326, 0.1423, 0.7838, 0.1572]}, {"w": "intelligent", "b": [0.7899, 0.1423, 0.8696, 0.1572]}, {"w": "effects", "b": [0.1312, 0.1602, 0.1806, 0.1751]}, {"w": "in", "b": [0.1868, 0.1602, 0.202, 0.1751]}, {"w": "realtime.", "b": [0.2081, 0.1602, 0.2782, 0.1751]}, {"w": "Server", "b": [0.2865, 0.1602, 0.3364, 0.1751]}, {"w": "deployment", "b": [0.3425, 0.1602, 0.4344, 0.1751]}, {"w": "would", "b": [0.4406, 0.1602, 0.4877, 0.1751]}, {"w": "be", "b": [0.4939, 0.1602, 0.5127, 0.1751]}, {"w": "used", "b": [0.5189, 0.1602, 0.5545, 0.1751]}, {"w": "to", "b": [0.5607, 0.1602, 0.5769, 0.1751]}, {"w": "apply", "b": [0.5831, 0.1602, 0.6273, 0.1751]}, {"w": "more", "b": [0.6334, 0.1602, 0.6731, 0.1751]}, {"w": "complex", "b": [0.6792, 0.1602, 0.7447, 0.1751]}, {"w": "effects,", "b": [0.7509, 0.1602, 0.8053, 0.1751]}, {"w": "such", "b": [0.8115, 0.1602, 0.8466, 0.1751]}, {"w": "as", "b": [0.8528, 0.1602, 0.8691, 0.1751]}, {"w": "stabilization", "b": [0.1312, 0.1781, 0.2298, 0.1931]}, {"w": "and", "b": [0.2359, 0.1781, 0.2657, 0.1931]}, {"w": "super-resolution.", "b": [0.2718, 0.1781, 0.406, 0.1931]}]}, {"id": "b_2", "type": "paragraph", "text": "8.3.4 Model Streaming", "words": [{"w": "8.3.4", "b": [0.1312, 0.226, 0.1749, 0.2409]}, {"w": "Model", "b": [0.1961, 0.226, 0.2548, 0.2409]}, {"w": "Streaming", "b": [0.2619, 0.226, 0.3567, 0.2409]}]}, {"id": "b_3", "type": "paragraph", "text": "Model streaming is a deployment pattern that can be seen as an inverse to the REST API. In REST API, the client sends a request to the server, and then waits for a response (a prediction).", "words": [{"w": "Model", "b": [0.1312, 0.2626, 0.19, 0.2775]}, {"w": "streaming", "b": [0.1948, 0.2626, 0.2862, 0.2775]}, {"w": "is", "b": [0.2905, 0.2627, 0.3027, 0.2775]}, {"w": "a", "b": [0.3069, 0.2627, 0.3159, 0.2775]}, {"w": "deployment", "b": [0.3201, 0.2627, 0.411, 0.2775]}, {"w": "pattern", "b": [0.4152, 0.2627, 0.4736, 0.2775]}, {"w": "that", "b": [0.4777, 0.2627, 0.5109, 0.2775]}, {"w": "can", "b": [0.5151, 0.2627, 0.5422, 0.2775]}, {"w": "be", "b": [0.5464, 0.2627, 0.565, 0.2775]}, {"w": "seen", "b": [0.5692, 0.2627, 0.6025, 0.2775]}, {"w": "as", "b": [0.6066, 0.2627, 0.6228, 0.2775]}, {"w": "an", "b": [0.627, 0.2627, 0.6461, 0.2775]}, {"w": "inverse", "b": [0.6503, 0.2627, 0.7042, 0.2775]}, {"w": "to", "b": [0.7084, 0.2627, 0.7245, 0.2775]}, {"w": "the", "b": [0.7286, 0.2627, 0.7538, 0.2775]}, {"w": "REST", "b": [0.7579, 0.2627, 0.8067, 0.2775]}, {"w": "API.", "b": [0.8108, 0.2627, 0.8483, 0.2775]}, {"w": "In", "b": [0.8525, 0.2627, 0.869, 0.2775]}, {"w": "REST", "b": [0.1312, 0.2806, 0.18, 0.2954]}, {"w": "API,", "b": [0.1844, 0.2806, 0.2218, 0.2954]}, {"w": "the", "b": [0.2263, 0.2806, 0.2514, 0.2954]}, {"w": "client", "b": [0.2558, 0.2806, 0.2986, 0.2954]}, {"w": "sends", "b": [0.303, 0.2806, 0.3454, 0.2954]}, {"w": "a", "b": [0.3499, 0.2806, 0.3589, 0.2954]}, {"w": "request", "b": [0.3634, 0.2806, 0.4203, 0.2954]}, {"w": "to", "b": [0.4248, 0.2806, 0.4408, 0.2954]}, {"w": "the", "b": [0.4453, 0.2806, 0.4704, 0.2954]}, {"w": "server,", "b": [0.4749, 0.2806, 0.5263, 0.2954]}, {"w": "and", "b": [0.5311, 0.2806, 0.5603, 0.2954]}, {"w": "then", "b": [0.5647, 0.2806, 0.5999, 0.2954]}, {"w": "waits", "b": [0.6043, 0.2806, 0.6451, 0.2954]}, {"w": "for", "b": [0.6496, 0.2806, 0.6712, 0.2954]}, {"w": "a", "b": [0.6757, 0.2806, 0.6847, 0.2954]}, {"w": "response", "b": [0.6892, 0.2806, 0.7563, 0.2954]}, {"w": "(a", "b": [0.7607, 0.2806, 0.7768, 0.2954]}, {"w": "prediction).", "b": [0.7812, 0.2806, 0.8727, 0.2954]}]}, {"id": "b_4", "type": "paragraph", "text": "In complex systems, there can be many models applied to the same input. Or, a model can input a prediction from another model. For example, the input may be a news article. One model can predict the topic of the article, another model can extract named entities, the third model can generate a summarization of the article, and so on.", "words": [{"w": "In", "b": [0.1312, 0.3074, 0.1481, 0.3224]}, {"w": "complex", "b": [0.1542, 0.3074, 0.2202, 0.3224]}, {"w": "systems,", "b": [0.2263, 0.3074, 0.2936, 0.3224]}, {"w": "there", "b": [0.2997, 0.3074, 0.3407, 0.3224]}, {"w": "can", "b": [0.3468, 0.3074, 0.3744, 0.3224]}, {"w": "be", "b": [0.3806, 0.3074, 0.3995, 0.3224]}, {"w": "many", "b": [0.4057, 0.3074, 0.4496, 0.3224]}, {"w": "models", "b": [0.4557, 0.3074, 0.5115, 0.3224]}, {"w": "applied", "b": [0.5177, 0.3074, 0.576, 0.3224]}, {"w": "to", "b": [0.5821, 0.3074, 0.5985, 0.3224]}, {"w": "the", "b": [0.6046, 0.3074, 0.6302, 0.3224]}, {"w": "same", "b": [0.6363, 0.3074, 0.6763, 0.3224]}, {"w": "input.", "b": [0.6824, 0.3074, 0.7305, 0.3224]}, {"w": "Or,", "b": [0.7387, 0.3074, 0.7653, 0.3224]}, {"w": "a", "b": [0.7715, 0.3074, 0.7806, 0.3224]}, {"w": "model", "b": [0.7868, 0.3074, 0.8353, 0.3224]}, {"w": "can", "b": [0.8415, 0.3074, 0.8691, 0.3224]}, {"w": "input", "b": [0.1312, 0.3254, 0.1742, 0.3403]}, {"w": "a", "b": [0.1804, 0.3254, 0.1896, 0.3403]}, {"w": "prediction", "b": [0.1958, 0.3254, 0.2767, 0.3403]}, {"w": "from", "b": [0.2828, 0.3254, 0.3202, 0.3403]}, {"w": "another", "b": [0.3264, 0.3254, 0.3878, 0.3403]}, {"w": "model.", "b": [0.394, 0.3254, 0.4477, 0.3403]}, {"w": "For", "b": [0.456, 0.3254, 0.4829, 0.3403]}, {"w": "example,", "b": [0.489, 0.3254, 0.5602, 0.3403]}, {"w": "the", "b": [0.5663, 0.3254, 0.5919, 0.3403]}, {"w": "input", "b": [0.5981, 0.3254, 0.6411, 0.3403]}, {"w": "may", "b": [0.6472, 0.3254, 0.681, 0.3403]}, {"w": "be", "b": [0.6871, 0.3254, 0.7061, 0.3403]}, {"w": "a", "b": [0.7123, 0.3254, 0.7215, 0.3403]}, {"w": "news", "b": [0.7276, 0.3254, 0.7666, 0.3403]}, {"w": "article.", "b": [0.7728, 0.3254, 0.8281, 0.3403]}, {"w": "One", "b": [0.8363, 0.3254, 0.8691, 0.3403]}, {"w": "model", "b": [0.1312, 0.3432, 0.1809, 0.3583]}, {"w": "can", "b": [0.1876, 0.3432, 0.2158, 0.3583]}, {"w": "predict", "b": [0.2225, 0.3432, 0.2801, 0.3583]}, {"w": "the", "b": [0.2868, 0.3432, 0.3129, 0.3583]}, {"w": "topic", "b": [0.3196, 0.3432, 0.3604, 0.3583]}, {"w": "of", "b": [0.3671, 0.3432, 0.3822, 0.3583]}, {"w": "the", "b": [0.3889, 0.3432, 0.4151, 0.3583]}, {"w": "article,", "b": [0.4217, 0.3432, 0.4783, 0.3583]}, {"w": "another", "b": [0.4851, 0.3432, 0.5479, 0.3583]}, {"w": "model", "b": [0.5546, 0.3432, 0.6043, 0.3583]}, {"w": "can", "b": [0.6109, 0.3432, 0.6392, 0.3583]}, {"w": "extract", "b": [0.6459, 0.3432, 0.704, 0.3583]}, {"w": "named", "b": [0.7106, 0.3432, 0.765, 0.3583]}, {"w": "entities,", "b": [0.7717, 0.3432, 0.8362, 0.3583]}, {"w": "the", "b": [0.843, 0.3432, 0.8691, 0.3583]}, {"w": "third", "b": [0.1312, 0.3613, 0.1713, 0.3762]}, {"w": "model", "b": [0.1774, 0.3613, 0.2261, 0.3762]}, {"w": "can", "b": [0.2323, 0.3613, 0.26, 0.3762]}, {"w": "generate", "b": [0.2661, 0.3613, 0.3339, 0.3762]}, {"w": "a", "b": [0.34, 0.3613, 0.3492, 0.3762]}, {"w": "summarization", "b": [0.3554, 0.3613, 0.4745, 0.3762]}, {"w": "of", "b": [0.4806, 0.3613, 0.4955, 0.3762]}, {"w": "the", "b": [0.5016, 0.3613, 0.5273, 0.3762]}, {"w": "article,", "b": [0.5334, 0.3613, 0.5889, 0.3762]}, {"w": "and", "b": [0.595, 0.3613, 0.6248, 0.3762]}, {"w": "so", "b": [0.6309, 0.3613, 0.6474, 0.3762]}, {"w": "on.", "b": [0.6536, 0.3613, 0.6782, 0.3762]}]}, {"id": "b_5", "type": "paragraph", "text": "According to the REST API deployment pattern, we need one REST API per model. The client would call one API by sending a news article as a part of the request, and get the topic as response. Then the client calls another API by sending a news article, and gets the named entities as response; etc.", "words": [{"w": "According", "b": [0.1305, 0.3881, 0.2125, 0.4032]}, {"w": "to", "b": [0.2186, 0.3881, 0.2352, 0.4032]}, {"w": "the", "b": [0.2413, 0.3881, 0.2673, 0.4032]}, {"w": "REST", "b": [0.2734, 0.3881, 0.3236, 0.4032]}, {"w": "API", "b": [0.3298, 0.3881, 0.3632, 0.4032]}, {"w": "deployment", "b": [0.3693, 0.3881, 0.4632, 0.4032]}, {"w": "pattern,", "b": [0.4693, 0.3881, 0.5347, 0.4032]}, {"w": "we", "b": [0.5408, 0.3881, 0.562, 0.4032]}, {"w": "need", "b": [0.5682, 0.3881, 0.6055, 0.4032]}, {"w": "one", "b": [0.6116, 0.3881, 0.6396, 0.4032]}, {"w": "REST", "b": [0.6457, 0.3881, 0.696, 0.4032]}, {"w": "API", "b": [0.7021, 0.3881, 0.7356, 0.4032]}, {"w": "per", "b": [0.7417, 0.3881, 0.7682, 0.4032]}, {"w": "model.", "b": [0.7743, 0.3881, 0.8287, 0.4032]}, {"w": "The", "b": [0.8369, 0.3881, 0.869, 0.4032]}, {"w": "client", "b": [0.1312, 0.4062, 0.1739, 0.4211]}, {"w": "would", "b": [0.1797, 0.4062, 0.2264, 0.4211]}, {"w": "call", "b": [0.2321, 0.4062, 0.2593, 0.4211]}, {"w": "one", "b": [0.265, 0.4062, 0.2921, 0.4211]}, {"w": "API", "b": [0.2979, 0.4062, 0.3303, 0.4211]}, {"w": "by", "b": [0.336, 0.4062, 0.3551, 0.4211]}, {"w": "sending", "b": [0.3608, 0.4062, 0.4202, 0.4211]}, {"w": "a", "b": [0.4259, 0.4062, 0.435, 0.4211]}, {"w": "news", "b": [0.4407, 0.4062, 0.479, 0.4211]}, {"w": "article", "b": [0.4847, 0.4062, 0.534, 0.4211]}, {"w": "as", "b": [0.5398, 0.4062, 0.5559, 0.4211]}, {"w": "a", "b": [0.5617, 0.4062, 0.5707, 0.4211]}, {"w": "part", "b": [0.5764, 0.4062, 0.6097, 0.4211]}, {"w": "of", "b": [0.6154, 0.4062, 0.63, 0.4211]}, {"w": "the", "b": [0.6357, 0.4062, 0.6608, 0.4211]}, {"w": "request,", "b": [0.6666, 0.4062, 0.7285, 0.4211]}, {"w": "and", "b": [0.7343, 0.4062, 0.7635, 0.4211]}, {"w": "get", "b": [0.7692, 0.4062, 0.7933, 0.4211]}, {"w": "the", "b": [0.7991, 0.4062, 0.8242, 0.4211]}, {"w": "topic", "b": [0.8299, 0.4062, 0.8691, 0.4211]}, {"w": "as", "b": [0.1312, 0.4242, 0.1474, 0.439]}, {"w": "response.", "b": [0.1532, 0.4242, 0.2254, 0.439]}, {"w": "Then", "b": [0.2335, 0.4242, 0.2747, 0.439]}, {"w": "the", "b": [0.2805, 0.4242, 0.3056, 0.439]}, {"w": "client", "b": [0.3115, 0.4242, 0.3542, 0.439]}, {"w": "calls", "b": [0.36, 0.4242, 0.3943, 0.439]}, {"w": "another", "b": [0.4001, 0.4242, 0.4605, 0.439]}, {"w": "API", "b": [0.4663, 0.4242, 0.4987, 0.439]}, {"w": "by", "b": [0.5045, 0.4242, 0.5236, 0.439]}, {"w": "sending", "b": [0.5294, 0.4242, 0.5888, 0.439]}, {"w": "a", "b": [0.5947, 0.4242, 0.6037, 0.439]}, {"w": "news", "b": [0.6095, 0.4242, 0.6478, 0.439]}, {"w": "article,", "b": [0.6537, 0.4242, 0.708, 0.439]}, {"w": "and", "b": [0.7139, 0.4242, 0.743, 0.439]}, {"w": "gets", "b": [0.7489, 0.4242, 0.7801, 0.439]}, {"w": "the", "b": [0.7859, 0.4242, 0.8111, 0.439]}, {"w": "named", "b": [0.8169, 0.4242, 0.8691, 0.439]}, {"w": "entities", "b": [0.1312, 0.442, 0.1893, 0.457]}, {"w": "as", "b": [0.1954, 0.442, 0.2119, 0.457]}, {"w": "response;", "b": [0.2181, 0.442, 0.2917, 0.457]}, {"w": "etc.", "b": [0.2978, 0.442, 0.3266, 0.457]}]}, {"id": "b_6", "type": "paragraph", "text": "Streaming works differently. Instead of having one REST API per model, all models, as well as the code needed to run them, are registered within a stream-processing engine (SPE). Examples are Apache Storm, Apache Spark, and Apache Flink. Or, they are", "words": [{"w": "Streaming", "b": [0.1312, 0.4688, 0.215, 0.4839]}, {"w": "works", "b": [0.2221, 0.4688, 0.2693, 0.4839]}, {"w": "differently.", "b": [0.2764, 0.4688, 0.3633, 0.4839]}, {"w": "Instead", "b": [0.3744, 0.4688, 0.4346, 0.4839]}, {"w": "of", "b": [0.4417, 0.4688, 0.4569, 0.4839]}, {"w": "having", "b": [0.464, 0.4688, 0.5184, 0.4839]}, {"w": "one", "b": [0.5255, 0.4688, 0.5537, 0.4839]}, {"w": "REST", "b": [0.5609, 0.4688, 0.6116, 0.4839]}, {"w": "API", "b": [0.6187, 0.4688, 0.6524, 0.4839]}, {"w": "per", "b": [0.6595, 0.4688, 0.6862, 0.4839]}, {"w": "model,", "b": [0.6933, 0.4688, 0.7482, 0.4839]}, {"w": "all", "b": [0.7556, 0.4688, 0.7754, 0.4839]}, {"w": "models,", "b": [0.7825, 0.4688, 0.8449, 0.4839]}, {"w": "as", "b": [0.8522, 0.4688, 0.869, 0.4839]}, {"w": "well", "b": [0.1306, 0.4868, 0.1625, 0.5019]}, {"w": "as", "b": [0.169, 0.4868, 0.1858, 0.5019]}, {"w": "the", "b": [0.1923, 0.4868, 0.2185, 0.5019]}, {"w": "code", "b": [0.225, 0.4868, 0.2621, 0.5019]}, {"w": "needed", "b": [0.2686, 0.4868, 0.3251, 0.5019]}, {"w": "to", "b": [0.3316, 0.4868, 0.3483, 0.5019]}, {"w": "run", "b": [0.3548, 0.4868, 0.3831, 0.5019]}, {"w": "them,", "b": [0.3896, 0.4868, 0.4366, 0.5019]}, {"w": "are", "b": [0.4432, 0.4868, 0.4684, 0.5019]}, {"w": "registered", "b": [0.4749, 0.4868, 0.5546, 0.5019]}, {"w": "within", "b": [0.5611, 0.4868, 0.6134, 0.5019]}, {"w": "a", "b": [0.6199, 0.4868, 0.6293, 0.5019]}, {"w": "stream-processing", "b": [0.6357, 0.4869, 0.8018, 0.5019]}, {"w": "engine", "b": [0.8093, 0.4869, 0.8688, 0.5019]}, {"w": "(SPE).", "b": [0.1291, 0.5047, 0.185, 0.5198]}, {"w": "Examples", "b": [0.1913, 0.5047, 0.2706, 0.5198]}, {"w": "are", "b": [0.2769, 0.5047, 0.302, 0.5198]}, {"w": "Apache", "b": [0.3082, 0.5048, 0.3767, 0.5198]}, {"w": "Storm,", "b": [0.3838, 0.5047, 0.4462, 0.5198]}, {"w": "Apache", "b": [0.4525, 0.5048, 0.521, 0.5198]}, {"w": "Spark,", "b": [0.5281, 0.5047, 0.5874, 0.5198]}, {"w": "and", "b": [0.5936, 0.5047, 0.624, 0.5198]}, {"w": "Apache", "b": [0.6302, 0.5048, 0.6987, 0.5198]}, {"w": "Flink.", "b": [0.7058, 0.5047, 0.7593, 0.5198]}, {"w": "Or,", "b": [0.7678, 0.5047, 0.7951, 0.5198]}, {"w": "they", "b": [0.8013, 0.5047, 0.8374, 0.5198]}, {"w": "are", "b": [0.8437, 0.5047, 0.8688, 0.5198]}]}, {"id": "b_7", "type": "paragraph", "text": "packaged as an application based on a stream-processing library (SPL), such as Apache Samza, Apache Kafka Streams, and Akka Streams.", "words": [{"w": "packaged", "b": [0.1312, 0.5229, 0.2036, 0.5377]}, {"w": "as", "b": [0.2093, 0.5229, 0.2254, 0.5377]}, {"w": "an", "b": [0.2311, 0.5229, 0.2502, 0.5377]}, {"w": "application", "b": [0.2559, 0.5229, 0.3434, 0.5377]}, {"w": "based", "b": [0.3491, 0.5229, 0.3934, 0.5377]}, {"w": "on", "b": [0.3991, 0.5229, 0.4182, 0.5377]}, {"w": "a", "b": [0.4239, 0.5229, 0.4329, 0.5377]}, {"w": "stream-processing", "b": [0.4387, 0.5228, 0.6048, 0.5378]}, {"w": "library", "b": [0.6113, 0.5228, 0.6739, 0.5378]}, {"w": "(SPL),", "b": [0.6795, 0.5229, 0.7323, 0.5377]}, {"w": "such", "b": [0.738, 0.5229, 0.7728, 0.5377]}, {"w": "as", "b": [0.7785, 0.5229, 0.7946, 0.5377]}, {"w": "Apache", "b": [0.8003, 0.5228, 0.8688, 0.5378]}, {"w": "Samza,", "b": [0.1312, 0.5407, 0.1963, 0.5557]}, {"w": "Apache", "b": [0.2024, 0.5407, 0.2709, 0.5557]}, {"w": "Kafka", "b": [0.278, 0.5407, 0.3329, 0.5557]}, {"w": "Streams,", "b": [0.34, 0.5407, 0.42, 0.5557]}, {"w": "and", "b": [0.4261, 0.5407, 0.4559, 0.5557]}, {"w": "Akka", "b": [0.462, 0.5407, 0.5108, 0.5557]}, {"w": "Streams.", "b": [0.5178, 0.5407, 0.5978, 0.5557]}]}, {"id": "b_8", "type": "paragraph", "text": "The descriptions of these SPEs and SPLs are beyond the scope of this book, but they all share the same property making them different from the REST-API-based applications. In each stream-processing application, there is an implicit or explicit notion of data processing topology. The input data flows in as an infinite stream of data elements sent by the client. Following a predefined topology, each data element in the stream undergoes a transformation in the nodes of the topology. Transformed, the flow continues to other nodes.", "words": [{"w": "The", "b": [0.1306, 0.5678, 0.1617, 0.5826]}, {"w": "descriptions", "b": [0.1669, 0.5678, 0.2606, 0.5826]}, {"w": "of", "b": [0.2658, 0.5678, 0.2804, 0.5826]}, {"w": "these", "b": [0.2856, 0.5678, 0.3259, 0.5826]}, {"w": "SPEs", "b": [0.3311, 0.5678, 0.3729, 0.5826]}, {"w": "and", "b": [0.3781, 0.5678, 0.4072, 0.5826]}, {"w": "SPLs", "b": [0.4124, 0.5678, 0.4532, 0.5826]}, {"w": "are", "b": [0.4584, 0.5678, 0.4826, 0.5826]}, {"w": "beyond", "b": [0.4878, 0.5678, 0.5446, 0.5826]}, {"w": "the", "b": [0.5497, 0.5678, 0.5749, 0.5826]}, {"w": "scope", "b": [0.58, 0.5678, 0.6229, 0.5826]}, {"w": "of", "b": [0.6281, 0.5678, 0.6426, 0.5826]}, {"w": "this", "b": [0.6478, 0.5678, 0.6771, 0.5826]}, {"w": "book,", "b": [0.6823, 0.5678, 0.726, 0.5826]}, {"w": "but", "b": [0.7314, 0.5678, 0.7585, 0.5826]}, {"w": "they", "b": [0.7637, 0.5678, 0.7984, 0.5826]}, {"w": "all", "b": [0.8035, 0.5678, 0.8226, 0.5826]}, {"w": "share", "b": [0.8278, 0.5678, 0.8692, 0.5826]}, {"w": "the", "b": [0.1312, 0.5855, 0.1572, 0.6006]}, {"w": "same", "b": [0.1634, 0.5855, 0.204, 0.6006]}, {"w": "property", "b": [0.2101, 0.5855, 0.2804, 0.6006]}, {"w": "making", "b": [0.2866, 0.5855, 0.3464, 0.6006]}, {"w": "them", "b": [0.3525, 0.5855, 0.3941, 0.6006]}, {"w": "different", "b": [0.4002, 0.5855, 0.4678, 0.6006]}, {"w": "from", "b": [0.474, 0.5855, 0.512, 0.6006]}, {"w": "the", "b": [0.5181, 0.5855, 0.5441, 0.6006]}, {"w": "REST-API-based", "b": [0.5502, 0.5855, 0.6925, 0.6006]}, {"w": "applications.", "b": [0.6986, 0.5855, 0.8017, 0.6006]}, {"w": "In", "b": [0.8099, 0.5855, 0.827, 0.6006]}, {"w": "each", "b": [0.8332, 0.5855, 0.8691, 0.6006]}, {"w": "stream-processing", "b": [0.1312, 0.6034, 0.2776, 0.6185]}, {"w": "application,", "b": [0.2843, 0.6034, 0.3806, 0.6185]}, {"w": "there", "b": [0.3875, 0.6034, 0.4294, 0.6185]}, {"w": "is", "b": [0.4362, 0.6034, 0.4488, 0.6185]}, {"w": "an", "b": [0.4556, 0.6034, 0.4755, 0.6185]}, {"w": "implicit", "b": [0.4822, 0.6034, 0.545, 0.6185]}, {"w": "or", "b": [0.5518, 0.6034, 0.5686, 0.6185]}, {"w": "explicit", "b": [0.5753, 0.6034, 0.6355, 0.6185]}, {"w": "notion", "b": [0.6422, 0.6034, 0.6945, 0.6185]}, {"w": "of", "b": [0.7013, 0.6034, 0.7165, 0.6185]}, {"w": "data", "b": [0.7244, 0.6036, 0.7651, 0.6185]}, {"w": "processing", "b": [0.7729, 0.6036, 0.8688, 0.6185]}, {"w": "topology.", "b": [0.1312, 0.6215, 0.2165, 0.6365]}, {"w": "The", "b": [0.2247, 0.6215, 0.2563, 0.6364]}, {"w": "input", "b": [0.2625, 0.6215, 0.3053, 0.6364]}, {"w": "data", "b": [0.3114, 0.6215, 0.3471, 0.6364]}, {"w": "flows", "b": [0.3533, 0.6215, 0.3926, 0.6364]}, {"w": "in", "b": [0.3988, 0.6215, 0.4141, 0.6364]}, {"w": "as", "b": [0.4202, 0.6215, 0.4366, 0.6364]}, {"w": "an", "b": [0.4428, 0.6215, 0.4621, 0.6364]}, {"w": "infinite", "b": [0.4683, 0.6215, 0.5244, 0.6364]}, {"w": "stream", "b": [0.5305, 0.6215, 0.5847, 0.6364]}, {"w": "of", "b": [0.5909, 0.6215, 0.6056, 0.6364]}, {"w": "data", "b": [0.6118, 0.6215, 0.6475, 0.6364]}, {"w": "elements", "b": [0.6536, 0.6215, 0.7225, 0.6364]}, {"w": "sent", "b": [0.7287, 0.6215, 0.7609, 0.6364]}, {"w": "by", "b": [0.7671, 0.6215, 0.7864, 0.6364]}, {"w": "the", "b": [0.7926, 0.6215, 0.8181, 0.6364]}, {"w": "client.", "b": [0.8242, 0.6215, 0.8727, 0.6364]}, {"w": "Following", "b": [0.1312, 0.6396, 0.2063, 0.6544]}, {"w": "a", "b": [0.2122, 0.6396, 0.2212, 0.6544]}, {"w": "predefined", "b": [0.2271, 0.6396, 0.3086, 0.6544]}, {"w": "topology,", "b": [0.3145, 0.6396, 0.3863, 0.6544]}, {"w": "each", "b": [0.3923, 0.6396, 0.427, 0.6544]}, {"w": "data", "b": [0.4328, 0.6396, 0.468, 0.6544]}, {"w": "element", "b": [0.4739, 0.6396, 0.5347, 0.6544]}, {"w": "in", "b": [0.5406, 0.6396, 0.5557, 0.6544]}, {"w": "the", "b": [0.5616, 0.6396, 0.5867, 0.6544]}, {"w": "stream", "b": [0.5926, 0.6396, 0.646, 0.6544]}, {"w": "undergoes", "b": [0.6519, 0.6396, 0.731, 0.6544]}, {"w": "a", "b": [0.7369, 0.6396, 0.7459, 0.6544]}, {"w": "transformation", "b": [0.7518, 0.6396, 0.8691, 0.6544]}, {"w": "in", "b": [0.1312, 0.6574, 0.1466, 0.6723]}, {"w": "the", "b": [0.1528, 0.6574, 0.1784, 0.6723]}, {"w": "nodes", "b": [0.1846, 0.6574, 0.2303, 0.6723]}, {"w": "of", "b": [0.2364, 0.6574, 0.2513, 0.6723]}, {"w": "the", "b": [0.2575, 0.6574, 0.2831, 0.6723]}, {"w": "topology.", "b": [0.2893, 0.6574, 0.3626, 0.6723]}, {"w": "Transformed,", "b": [0.3708, 0.6574, 0.4776, 0.6723]}, {"w": "the", "b": [0.4838, 0.6574, 0.5094, 0.6723]}, {"w": "flow", "b": [0.5156, 0.6574, 0.5479, 0.6723]}, {"w": "continues", "b": [0.554, 0.6574, 0.629, 0.6723]}, {"w": "to", "b": [0.6351, 0.6574, 0.6515, 0.6723]}, {"w": "other", "b": [0.6577, 0.6574, 0.6998, 0.6723]}, {"w": "nodes.", "b": [0.7059, 0.6574, 0.7568, 0.6723]}]}, {"id": "b_9", "type": "paragraph", "text": "In a stream-processing application, nodes transform their input in some way, and then either,", "words": [{"w": "In", "b": [0.1312, 0.6844, 0.1478, 0.6992]}, {"w": "a", "b": [0.1537, 0.6844, 0.1628, 0.6992]}, {"w": "stream-processing", "b": [0.1687, 0.6844, 0.3093, 0.6992]}, {"w": "application,", "b": [0.3153, 0.6844, 0.4077, 0.6992]}, {"w": "nodes", "b": [0.4137, 0.6844, 0.4586, 0.6992]}, {"w": "transform", "b": [0.4645, 0.6844, 0.5416, 0.6992]}, {"w": "their", "b": [0.5475, 0.6844, 0.5847, 0.6992]}, {"w": "input", "b": [0.5907, 0.6844, 0.6329, 0.6992]}, {"w": "in", "b": [0.6388, 0.6844, 0.6539, 0.6992]}, {"w": "some", "b": [0.6599, 0.6844, 0.6991, 0.6992]}, {"w": "way,", "b": [0.7051, 0.6844, 0.7392, 0.6992]}, {"w": "and", "b": [0.7452, 0.6844, 0.7743, 0.6992]}, {"w": "then", "b": [0.7802, 0.6844, 0.8154, 0.6992]}, {"w": "either,", "b": [0.8214, 0.6844, 0.8717, 0.6992]}]}, {"id": "b_10", "type": "paragraph", "text": "• send the output to other nodes, or • send the output to the client, or • persist the output to the database or a filesystem.", "words": [{"w": "•", "b": [0.1538, 0.7112, 0.1681, 0.7262]}, {"w": "send", "b": [0.1774, 0.7112, 0.2134, 0.7262]}, {"w": "the", "b": [0.2195, 0.7112, 0.2452, 0.7262]}, {"w": "output", "b": [0.2513, 0.7112, 0.3057, 0.7262]}, {"w": "to", "b": [0.3118, 0.7112, 0.3282, 0.7262]}, {"w": "other", "b": [0.3344, 0.7112, 0.3765, 0.7262]}, {"w": "nodes,", "b": [0.3826, 0.7112, 0.4335, 0.7262]}, {"w": "or", "b": [0.4396, 0.7112, 0.4561, 0.7262]}, {"w": "•", "b": [0.1538, 0.7292, 0.1681, 0.7441]}, {"w": "send", "b": [0.1774, 0.7292, 0.2134, 0.7441]}, {"w": "the", "b": [0.2195, 0.7292, 0.2452, 0.7441]}, {"w": "output", "b": [0.2513, 0.7292, 0.3057, 0.7441]}, {"w": "to", "b": [0.3118, 0.7292, 0.3282, 0.7441]}, {"w": "the", "b": [0.3344, 0.7292, 0.36, 0.7441]}, {"w": "client,", "b": [0.3661, 0.7292, 0.4149, 0.7441]}, {"w": "or", "b": [0.421, 0.7292, 0.4375, 0.7441]}, {"w": "•", "b": [0.1538, 0.7471, 0.1681, 0.7621]}, {"w": "persist", "b": [0.1774, 0.7471, 0.2305, 0.7621]}, {"w": "the", "b": [0.2366, 0.7471, 0.2622, 0.7621]}, {"w": "output", "b": [0.2684, 0.7471, 0.3227, 0.7621]}, {"w": "to", "b": [0.3289, 0.7471, 0.3453, 0.7621]}, {"w": "the", "b": [0.3514, 0.7471, 0.3771, 0.7621]}, {"w": "database", "b": [0.3832, 0.7471, 0.4541, 0.7621]}, {"w": "or", "b": [0.4602, 0.7471, 0.4767, 0.7621]}, {"w": "a", "b": [0.4828, 0.7471, 0.4921, 0.7621]}, {"w": "filesystem.", "b": [0.4982, 0.7471, 0.582, 0.7621]}]}, {"id": "b_11", "type": "paragraph", "text": "One node could take a news article and predict its topic; another node could take both the news article and the predicted topic and generate a summary; and so on.", "words": [{"w": "One", "b": [0.1312, 0.774, 0.1642, 0.789]}, {"w": "node", "b": [0.1703, 0.774, 0.2089, 0.789]}, {"w": "could", "b": [0.215, 0.774, 0.2582, 0.789]}, {"w": "take", "b": [0.2644, 0.774, 0.2983, 0.789]}, {"w": "a", "b": [0.3044, 0.774, 0.3137, 0.789]}, {"w": "news", "b": [0.3198, 0.774, 0.359, 0.789]}, {"w": "article", "b": [0.3652, 0.774, 0.4156, 0.789]}, {"w": "and", "b": [0.4218, 0.774, 0.4516, 0.789]}, {"w": "predict", "b": [0.4577, 0.774, 0.5144, 0.789]}, {"w": "its", "b": [0.5205, 0.774, 0.5401, 0.789]}, {"w": "topic;", "b": [0.5463, 0.774, 0.5916, 0.789]}, {"w": "another", "b": [0.5977, 0.774, 0.6595, 0.789]}, {"w": "node", "b": [0.6656, 0.774, 0.7042, 0.789]}, {"w": "could", "b": [0.7103, 0.774, 0.7535, 0.789]}, {"w": "take", "b": [0.7597, 0.774, 0.7936, 0.789]}, {"w": "both", "b": [0.7997, 0.774, 0.8373, 0.789]}, {"w": "the", "b": [0.8434, 0.774, 0.8691, 0.789]}, {"w": "news", "b": [0.1312, 0.792, 0.1703, 0.8069]}, {"w": "article", "b": [0.1765, 0.792, 0.2268, 0.8069]}, {"w": "and", "b": [0.2329, 0.792, 0.2626, 0.8069]}, {"w": "the", "b": [0.2688, 0.792, 0.2945, 0.8069]}, {"w": "predicted", "b": [0.3006, 0.792, 0.3755, 0.8069]}, {"w": "topic", "b": [0.3817, 0.792, 0.4217, 0.8069]}, {"w": "and", "b": [0.4278, 0.792, 0.4576, 0.8069]}, {"w": "generate", "b": [0.4637, 0.792, 0.5315, 0.8069]}, {"w": "a", "b": [0.5376, 0.792, 0.5468, 0.8069]}, {"w": "summary;", "b": [0.553, 0.792, 0.6326, 0.8069]}, {"w": "and", "b": [0.6387, 0.792, 0.6685, 0.8069]}, {"w": "so", "b": [0.6746, 0.792, 0.6911, 0.8069]}, {"w": "on.", "b": [0.6973, 0.792, 0.7219, 0.8069]}]}, {"id": "b_12", "type": "paragraph", "text": "The difference between a REST-API-based application and a streaming-based one is shown in Figure 4. Figure 4a shows a client using a REST API, processing one data element, such as a news article, by sending a series of requests. One by one, various REST APIs receive", "words": [{"w": "The", "b": [0.1306, 0.8189, 0.1623, 0.8339]}, {"w": "difference", "b": [0.1685, 0.8189, 0.2449, 0.8339]}, {"w": "between", "b": [0.251, 0.8189, 0.3161, 0.8339]}, {"w": "a", "b": [0.3222, 0.8189, 0.3314, 0.8339]}, {"w": "REST-API-based", "b": [0.3376, 0.8189, 0.4778, 0.8339]}, {"w": "application", "b": [0.4839, 0.8189, 0.573, 0.8339]}, {"w": "and", "b": [0.5792, 0.8189, 0.6089, 0.8339]}, {"w": "a", "b": [0.6151, 0.8189, 0.6243, 0.8339]}, {"w": "streaming-based", "b": [0.6304, 0.8189, 0.7608, 0.8339]}, {"w": "one", "b": [0.7669, 0.8189, 0.7946, 0.8339]}, {"w": "is", "b": [0.8007, 0.8189, 0.8132, 0.8339]}, {"w": "shown", "b": [0.8193, 0.8189, 0.8691, 0.8339]}, {"w": "in", "b": [0.1312, 0.8369, 0.1465, 0.8518]}, {"w": "Figure", "b": [0.1527, 0.8369, 0.2045, 0.8518]}, {"w": "4.", "b": [0.2107, 0.8369, 0.225, 0.8518]}, {"w": "Figure", "b": [0.2332, 0.8369, 0.285, 0.8518]}, {"w": "4a", "b": [0.2912, 0.8369, 0.3096, 0.8518]}, {"w": "shows", "b": [0.3157, 0.8369, 0.3624, 0.8518]}, {"w": "a", "b": [0.3685, 0.8369, 0.3777, 0.8518]}, {"w": "client", "b": [0.3839, 0.8369, 0.4272, 0.8518]}, {"w": "using", "b": [0.4334, 0.8369, 0.4753, 0.8518]}, {"w": "a", "b": [0.4815, 0.8369, 0.4907, 0.8518]}, {"w": "REST", "b": [0.4968, 0.8369, 0.5463, 0.8518]}, {"w": "API,", "b": [0.5525, 0.8369, 0.5905, 0.8518]}, {"w": "processing", "b": [0.5966, 0.8369, 0.679, 0.8518]}, {"w": "one", "b": [0.6852, 0.8369, 0.7128, 0.8518]}, {"w": "data", "b": [0.7189, 0.8369, 0.7546, 0.8518]}, {"w": "element,", "b": [0.7608, 0.8369, 0.8276, 0.8518]}, {"w": "such", "b": [0.8338, 0.8369, 0.8691, 0.8518]}, {"w": "as", "b": [0.1312, 0.8547, 0.1481, 0.8698]}, {"w": "a", "b": [0.1542, 0.8547, 0.1636, 0.8698]}, {"w": "news", "b": [0.1698, 0.8547, 0.2096, 0.8698]}, {"w": "article,", "b": [0.2158, 0.8547, 0.2723, 0.8698]}, {"w": "by", "b": [0.2785, 0.8547, 0.2984, 0.8698]}, {"w": "sending", "b": [0.3045, 0.8547, 0.3663, 0.8698]}, {"w": "a", "b": [0.3725, 0.8547, 0.3819, 0.8698]}, {"w": "series", "b": [0.388, 0.8547, 0.4322, 0.8698]}, {"w": "of", "b": [0.4384, 0.8547, 0.4536, 0.8698]}, {"w": "requests.", "b": [0.4597, 0.8547, 0.5316, 0.8698]}, {"w": "One", "b": [0.5398, 0.8547, 0.5733, 0.8698]}, {"w": "by", "b": [0.5795, 0.8547, 0.5993, 0.8698]}, {"w": "one,", "b": [0.6055, 0.8547, 0.639, 0.8698]}, {"w": "various", "b": [0.6451, 0.8547, 0.7033, 0.8698]}, {"w": "REST", "b": [0.7095, 0.8547, 0.7602, 0.8698]}, {"w": "APIs", "b": [0.7663, 0.8547, 0.8075, 0.8698]}, {"w": "receive", "b": [0.8136, 0.8547, 0.8692, 0.8698]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "10", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 250, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 4: The difference between a REST API and streaming: (a) to process one data element, a client using a REST API sends a series of requests, one by one, and receives responses synchronously; (b) to process one data element, a client using streaming opens a connection, sends a request, and receives update events as they happen.", "words": [{"w": "Figure", "b": [0.1312, 0.5091, 0.1844, 0.5242]}, {"w": "4:", "b": [0.1923, 0.5091, 0.2069, 0.5242]}, {"w": "The", "b": [0.2186, 0.5091, 0.251, 0.5242]}, {"w": "difference", "b": [0.2589, 0.5091, 0.3369, 0.5242]}, {"w": "between", "b": [0.3448, 0.5091, 0.4112, 0.5242]}, {"w": "a", "b": [0.4191, 0.5091, 0.4285, 0.5242]}, {"w": "REST", "b": [0.4364, 0.5091, 0.4871, 0.5242]}, {"w": "API", "b": [0.495, 0.5091, 0.5288, 0.5242]}, {"w": "and", "b": [0.5367, 0.5091, 0.567, 0.5242]}, {"w": "streaming:", "b": [0.5749, 0.5091, 0.6608, 0.5242]}, {"w": "(a)", "b": [0.6725, 0.5091, 0.6965, 0.5242]}, {"w": "to", "b": [0.7044, 0.5091, 0.7212, 0.5242]}, {"w": "process", "b": [0.7291, 0.5091, 0.7884, 0.5242]}, {"w": "one", "b": [0.7963, 0.5091, 0.8246, 0.5242]}, {"w": "data", "b": [0.8325, 0.5091, 0.8691, 0.5242]}, {"w": "element,", "b": [0.1312, 0.527, 0.1998, 0.5421]}, {"w": "a", "b": [0.2074, 0.527, 0.2169, 0.5421]}, {"w": "client", "b": [0.2242, 0.527, 0.2687, 0.5421]}, {"w": "using", "b": [0.2761, 0.527, 0.3191, 0.5421]}, {"w": "a", "b": [0.3265, 0.527, 0.3359, 0.5421]}, {"w": "REST", "b": [0.3432, 0.527, 0.3939, 0.5421]}, {"w": "API", "b": [0.4013, 0.527, 0.435, 0.5421]}, {"w": "sends", "b": [0.4424, 0.527, 0.4866, 0.5421]}, {"w": "a", "b": [0.4939, 0.527, 0.5033, 0.5421]}, {"w": "series", "b": [0.5107, 0.527, 0.5549, 0.5421]}, {"w": "of", "b": [0.5623, 0.527, 0.5775, 0.5421]}, {"w": "requests,", "b": [0.5848, 0.527, 0.6568, 0.5421]}, {"w": "one", "b": [0.6645, 0.527, 0.6927, 0.5421]}, {"w": "by", "b": [0.7001, 0.527, 0.72, 0.5421]}, {"w": "one,", "b": [0.7274, 0.527, 0.7608, 0.5421]}, {"w": "and", "b": [0.7685, 0.527, 0.7988, 0.5421]}, {"w": "receives", "b": [0.8062, 0.527, 0.8692, 0.5421]}, {"w": "responses", "b": [0.1312, 0.5451, 0.2075, 0.5601]}, {"w": "synchronously;", "b": [0.2137, 0.5451, 0.3332, 0.5601]}, {"w": "(b)", "b": [0.3394, 0.5451, 0.3642, 0.5601]}, {"w": "to", "b": [0.3703, 0.5451, 0.3868, 0.5601]}, {"w": "process", "b": [0.3929, 0.5451, 0.4516, 0.5601]}, {"w": "one", "b": [0.4577, 0.5451, 0.4856, 0.5601]}, {"w": "data", "b": [0.4917, 0.5451, 0.5279, 0.5601]}, {"w": "element,", "b": [0.534, 0.5451, 0.6017, 0.5601]}, {"w": "a", "b": [0.6078, 0.5451, 0.6171, 0.5601]}, {"w": "client", "b": [0.6232, 0.5451, 0.6671, 0.5601]}, {"w": "using", "b": [0.6733, 0.5451, 0.7157, 0.5601]}, {"w": "streaming", "b": [0.7219, 0.5451, 0.8015, 0.5601]}, {"w": "opens", "b": [0.8077, 0.5451, 0.8537, 0.5601]}, {"w": "a", "b": [0.8599, 0.5451, 0.8692, 0.5601]}, {"w": "connection,", "b": [0.1312, 0.563, 0.2225, 0.578]}, {"w": "sends", "b": [0.2287, 0.563, 0.272, 0.578]}, {"w": "a", "b": [0.2781, 0.563, 0.2873, 0.578]}, {"w": "request,", "b": [0.2935, 0.563, 0.3567, 0.578]}, {"w": "and", "b": [0.3629, 0.563, 0.3926, 0.578]}, {"w": "receives", "b": [0.3988, 0.563, 0.4605, 0.578]}, {"w": "update", "b": [0.4666, 0.563, 0.5225, 0.578]}, {"w": "events", "b": [0.5287, 0.563, 0.5785, 0.578]}, {"w": "as", "b": [0.5847, 0.563, 0.6012, 0.578]}, {"w": "they", "b": [0.6073, 0.563, 0.6427, 0.578]}, {"w": "happen.", "b": [0.6489, 0.563, 0.713, 0.578]}]}, {"id": "b_1", "type": "paragraph", "text": "requests and produce responses synchronously. On the other hand, a client using streaming (Figure 4b) opens a connection to the streaming application, sends a request, and receives", "words": [{"w": "requests", "b": [0.1312, 0.6133, 0.1964, 0.6282]}, {"w": "and", "b": [0.2026, 0.6133, 0.2323, 0.6282]}, {"w": "produce", "b": [0.2384, 0.6133, 0.3024, 0.6282]}, {"w": "responses", "b": [0.3086, 0.6133, 0.3841, 0.6282]}, {"w": "synchronously.", "b": [0.3903, 0.6133, 0.5071, 0.6282]}, {"w": "On", "b": [0.5154, 0.6133, 0.5399, 0.6282]}, {"w": "the", "b": [0.5461, 0.6133, 0.5716, 0.6282]}, {"w": "other", "b": [0.5778, 0.6133, 0.6198, 0.6282]}, {"w": "hand,", "b": [0.626, 0.6133, 0.6709, 0.6282]}, {"w": "a", "b": [0.6771, 0.6133, 0.6863, 0.6282]}, {"w": "client", "b": [0.6925, 0.6133, 0.736, 0.6282]}, {"w": "using", "b": [0.7421, 0.6133, 0.7842, 0.6282]}, {"w": "streaming", "b": [0.7903, 0.6133, 0.8692, 0.6282]}, {"w": "(Figure", "b": [0.1291, 0.6311, 0.1893, 0.6462]}, {"w": "4b)", "b": [0.1955, 0.6311, 0.2225, 0.6462]}, {"w": "opens", "b": [0.2287, 0.6311, 0.2752, 0.6462]}, {"w": "a", "b": [0.2813, 0.6311, 0.2907, 0.6462]}, {"w": "connection", "b": [0.2968, 0.6311, 0.3844, 0.6462]}, {"w": "to", "b": [0.3905, 0.6311, 0.4072, 0.6462]}, {"w": "the", "b": [0.4133, 0.6311, 0.4394, 0.6462]}, {"w": "streaming", "b": [0.4455, 0.6311, 0.5259, 0.6462]}, {"w": "application,", "b": [0.532, 0.6311, 0.6279, 0.6462]}, {"w": "sends", "b": [0.634, 0.6311, 0.678, 0.6462]}, {"w": "a", "b": [0.6842, 0.6311, 0.6935, 0.6462]}, {"w": "request,", "b": [0.6997, 0.6311, 0.764, 0.6462]}, {"w": "and", "b": [0.7701, 0.6311, 0.8003, 0.6462]}, {"w": "receives", "b": [0.8065, 0.6311, 0.8692, 0.6462]}]}, {"id": "b_2", "type": "paragraph", "text": "update events as they happen.", "words": [{"w": "update", "b": [0.1312, 0.6492, 0.1871, 0.6641]}, {"w": "events", "b": [0.1933, 0.6492, 0.2431, 0.6641]}, {"w": "as", "b": [0.2493, 0.6492, 0.2658, 0.6641]}, {"w": "they", "b": [0.2719, 0.6492, 0.3073, 0.6641]}, {"w": "happen.", "b": [0.3135, 0.6492, 0.3776, 0.6641]}]}, {"id": "b_3", "type": "paragraph", "text": "On the right-hand side of the streaming-based application in Figure 4b, there’s a topology that defines the data flow in the application. Each input element sent by the client passes through all the nodes of the topology graph. Nodes can send updated events to the client, and/or persist data to the database or a filesystem.", "words": [{"w": "On", "b": [0.1312, 0.676, 0.1561, 0.6911]}, {"w": "the", "b": [0.1623, 0.676, 0.1883, 0.6911]}, {"w": "right-hand", "b": [0.1944, 0.676, 0.2801, 0.6911]}, {"w": "side", "b": [0.2863, 0.676, 0.3175, 0.6911]}, {"w": "of", "b": [0.3237, 0.676, 0.3387, 0.6911]}, {"w": "the", "b": [0.3449, 0.676, 0.3709, 0.6911]}, {"w": "streaming-based", "b": [0.377, 0.676, 0.5091, 0.6911]}, {"w": "application", "b": [0.5153, 0.676, 0.6055, 0.6911]}, {"w": "in", "b": [0.6117, 0.676, 0.6273, 0.6911]}, {"w": "Figure", "b": [0.6335, 0.676, 0.6862, 0.6911]}, {"w": "4b,", "b": [0.6923, 0.676, 0.7172, 0.6911]}, {"w": "there’s", "b": [0.7234, 0.676, 0.7776, 0.6911]}, {"w": "a", "b": [0.7837, 0.676, 0.7931, 0.6911]}, {"w": "topology", "b": [0.7993, 0.676, 0.8698, 0.6911]}, {"w": "that", "b": [0.1312, 0.694, 0.1656, 0.709]}, {"w": "defines", "b": [0.1718, 0.694, 0.2272, 0.709]}, {"w": "the", "b": [0.2333, 0.694, 0.2594, 0.709]}, {"w": "data", "b": [0.2655, 0.694, 0.302, 0.709]}, {"w": "flow", "b": [0.3081, 0.694, 0.341, 0.709]}, {"w": "in", "b": [0.3471, 0.694, 0.3628, 0.709]}, {"w": "the", "b": [0.3689, 0.694, 0.395, 0.709]}, {"w": "application.", "b": [0.4011, 0.694, 0.4971, 0.709]}, {"w": "Each", "b": [0.5053, 0.694, 0.5457, 0.709]}, {"w": "input", "b": [0.5518, 0.694, 0.5956, 0.709]}, {"w": "element", "b": [0.6018, 0.694, 0.6649, 0.709]}, {"w": "sent", "b": [0.671, 0.694, 0.704, 0.709]}, {"w": "by", "b": [0.7101, 0.694, 0.7299, 0.709]}, {"w": "the", "b": [0.7361, 0.694, 0.7622, 0.709]}, {"w": "client", "b": [0.7683, 0.694, 0.8126, 0.709]}, {"w": "passes", "b": [0.8188, 0.694, 0.8692, 0.709]}, {"w": "through", "b": [0.1312, 0.7121, 0.1938, 0.7269]}, {"w": "all", "b": [0.2, 0.7121, 0.2192, 0.7269]}, {"w": "the", "b": [0.2253, 0.7121, 0.2506, 0.7269]}, {"w": "nodes", "b": [0.2567, 0.7121, 0.3017, 0.7269]}, {"w": "of", "b": [0.3079, 0.7121, 0.3225, 0.7269]}, {"w": "the", "b": [0.3287, 0.7121, 0.3539, 0.7269]}, {"w": "topology", "b": [0.36, 0.712, 0.4401, 0.727]}, {"w": "graph.", "b": [0.4472, 0.712, 0.5055, 0.727]}, {"w": "Nodes", "b": [0.5138, 0.7121, 0.5623, 0.7269]}, {"w": "can", "b": [0.5685, 0.7121, 0.5957, 0.7269]}, {"w": "send", "b": [0.6019, 0.7121, 0.6373, 0.7269]}, {"w": "updated", "b": [0.6435, 0.7121, 0.7086, 0.7269]}, {"w": "events", "b": [0.7147, 0.7121, 0.7638, 0.7269]}, {"w": "to", "b": [0.7699, 0.7121, 0.7861, 0.7269]}, {"w": "the", "b": [0.7922, 0.7121, 0.8175, 0.7269]}, {"w": "client,", "b": [0.8236, 0.7121, 0.8716, 0.7269]}, {"w": "and/or", "b": [0.1312, 0.7299, 0.1867, 0.7449]}, {"w": "persist", "b": [0.1928, 0.7299, 0.2459, 0.7449]}, {"w": "data", "b": [0.252, 0.7299, 0.2879, 0.7449]}, {"w": "to", "b": [0.2941, 0.7299, 0.3105, 0.7449]}, {"w": "the", "b": [0.3166, 0.7299, 0.3423, 0.7449]}, {"w": "database", "b": [0.3484, 0.7299, 0.4193, 0.7449]}, {"w": "or", "b": [0.4254, 0.7299, 0.4419, 0.7449]}, {"w": "a", "b": [0.448, 0.7299, 0.4573, 0.7449]}, {"w": "filesystem.", "b": [0.4634, 0.7299, 0.5472, 0.7449]}]}, {"id": "b_4", "type": "paragraph", "text": "An SPE-based streaming application runs on its own cluster of virtual or physical machines, and takes care of distributing the data processing load among the available resources. An SPL- based streaming application doesn’t need a dedicated cluster for data processing. It can be integrated with available resources, such as virtual or physical machines, or a container orchestrator (such as Kubernetes).", "words": [{"w": "An", "b": [0.1305, 0.7569, 0.1544, 0.7718]}, {"w": "SPE-based", "b": [0.1606, 0.7569, 0.2465, 0.7718]}, {"w": "streaming", "b": [0.2526, 0.7569, 0.331, 0.7718]}, {"w": "application", "b": [0.3371, 0.7569, 0.4255, 0.7718]}, {"w": "runs", "b": [0.4316, 0.7569, 0.4663, 0.7718]}, {"w": "on", "b": [0.4725, 0.7569, 0.4918, 0.7718]}, {"w": "its", "b": [0.4979, 0.7569, 0.5173, 0.7718]}, {"w": "own", "b": [0.5235, 0.7569, 0.5555, 0.7718]}, {"w": "cluster", "b": [0.5617, 0.7569, 0.6146, 0.7718]}, {"w": "of", "b": [0.6208, 0.7569, 0.6355, 0.7718]}, {"w": "virtual", "b": [0.6417, 0.7569, 0.695, 0.7718]}, {"w": "or", "b": [0.7012, 0.7569, 0.7175, 0.7718]}, {"w": "physical", "b": [0.7237, 0.7569, 0.7878, 0.7718]}, {"w": "machines,", "b": [0.7939, 0.7569, 0.8717, 0.7718]}, {"w": "and", "b": [0.1312, 0.7749, 0.1604, 0.7897]}, {"w": "takes", "b": [0.1653, 0.7749, 0.2056, 0.7897]}, {"w": "care", "b": [0.2105, 0.7749, 0.2427, 0.7897]}, {"w": "of", "b": [0.2477, 0.7749, 0.2622, 0.7897]}, {"w": "distributing", "b": [0.2672, 0.7749, 0.3598, 0.7897]}, {"w": "the", "b": [0.3647, 0.7749, 0.3898, 0.7897]}, {"w": "data", "b": [0.3948, 0.7749, 0.4299, 0.7897]}, {"w": "processing", "b": [0.4349, 0.7749, 0.516, 0.7897]}, {"w": "load", "b": [0.521, 0.7749, 0.5541, 0.7897]}, {"w": "among", "b": [0.559, 0.7749, 0.6113, 0.7897]}, {"w": "the", "b": [0.6162, 0.7749, 0.6413, 0.7897]}, {"w": "available", "b": [0.6463, 0.7749, 0.7146, 0.7897]}, {"w": "resources.", "b": [0.7195, 0.7749, 0.7962, 0.7897]}, {"w": "An", "b": [0.804, 0.7749, 0.8276, 0.7897]}, {"w": "SPL-", "b": [0.8325, 0.7749, 0.8722, 0.7897]}, {"w": "based", "b": [0.1312, 0.7926, 0.1774, 0.8077]}, {"w": "streaming", "b": [0.1845, 0.7926, 0.2652, 0.8077]}, {"w": "application", "b": [0.2723, 0.7926, 0.3633, 0.8077]}, {"w": "doesn’t", "b": [0.3705, 0.7926, 0.4297, 0.8077]}, {"w": "need", "b": [0.4368, 0.7926, 0.4745, 0.8077]}, {"w": "a", "b": [0.4816, 0.7926, 0.491, 0.8077]}, {"w": "dedicated", "b": [0.4981, 0.7926, 0.5766, 0.8077]}, {"w": "cluster", "b": [0.5837, 0.7926, 0.6383, 0.8077]}, {"w": "for", "b": [0.6454, 0.7926, 0.668, 0.8077]}, {"w": "data", "b": [0.6751, 0.7926, 0.7117, 0.8077]}, {"w": "processing.", "b": [0.7188, 0.7926, 0.8085, 0.8077]}, {"w": "It", "b": [0.8197, 0.7926, 0.8338, 0.8077]}, {"w": "can", "b": [0.8409, 0.7926, 0.8692, 0.8077]}, {"w": "be", "b": [0.1312, 0.8106, 0.1504, 0.8257]}, {"w": "integrated", "b": [0.1566, 0.8106, 0.2392, 0.8257]}, {"w": "with", "b": [0.2453, 0.8106, 0.2817, 0.8257]}, {"w": "available", "b": [0.2878, 0.8106, 0.3585, 0.8257]}, {"w": "resources,", "b": [0.3646, 0.8106, 0.4439, 0.8257]}, {"w": "such", "b": [0.45, 0.8106, 0.486, 0.8257]}, {"w": "as", "b": [0.4921, 0.8106, 0.5088, 0.8257]}, {"w": "virtual", "b": [0.515, 0.8106, 0.5695, 0.8257]}, {"w": "or", "b": [0.5757, 0.8106, 0.5923, 0.8257]}, {"w": "physical", "b": [0.5985, 0.8106, 0.664, 0.8257]}, {"w": "machines,", "b": [0.6702, 0.8106, 0.7497, 0.8257]}, {"w": "or", "b": [0.7559, 0.8106, 0.7725, 0.8257]}, {"w": "a", "b": [0.7787, 0.8106, 0.788, 0.8257]}, {"w": "container", "b": [0.7941, 0.8106, 0.8695, 0.8257]}, {"w": "orchestrator", "b": [0.1312, 0.8287, 0.2284, 0.8436]}, {"w": "(such", "b": [0.2345, 0.8287, 0.2772, 0.8436]}, {"w": "as", "b": [0.2834, 0.8287, 0.2999, 0.8436]}, {"w": "Kubernetes).", "b": [0.306, 0.8287, 0.4103, 0.8436]}]}, {"id": "b_5", "type": "paragraph", "text": "REST APIs are usually employed to let clients send ad-hoc requests that don’t follow a", "words": [{"w": "REST", "b": [0.1312, 0.8555, 0.1819, 0.8706]}, {"w": "APIs", "b": [0.1893, 0.8555, 0.2305, 0.8706]}, {"w": "are", "b": [0.2378, 0.8555, 0.263, 0.8706]}, {"w": "usually", "b": [0.2703, 0.8555, 0.3285, 0.8706]}, {"w": "employed", "b": [0.3358, 0.8555, 0.4127, 0.8706]}, {"w": "to", "b": [0.4201, 0.8555, 0.4368, 0.8706]}, {"w": "let", "b": [0.4442, 0.8555, 0.4651, 0.8706]}, {"w": "clients", "b": [0.4724, 0.8555, 0.5244, 0.8706]}, {"w": "send", "b": [0.5317, 0.8555, 0.5685, 0.8706]}, {"w": "ad-hoc", "b": [0.5758, 0.8555, 0.6307, 0.8706]}, {"w": "requests", "b": [0.638, 0.8555, 0.7048, 0.8706]}, {"w": "that", "b": [0.7121, 0.8555, 0.7466, 0.8706]}, {"w": "don’t", "b": [0.754, 0.8555, 0.7969, 0.8706]}, {"w": "follow", "b": [0.8042, 0.8555, 0.8523, 0.8706]}, {"w": "a", "b": [0.8597, 0.8555, 0.8691, 0.8706]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "11", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 251, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "certain frequently-repeated pattern. It’s the best choice when the client wants the liberty of deciding what to do with the API response. On the other hand, if each request of the client is:", "words": [{"w": "certain", "b": [0.1312, 0.0884, 0.1862, 0.1033]}, {"w": "frequently-repeated", "b": [0.1923, 0.0884, 0.3475, 0.1033]}, {"w": "pattern.", "b": [0.3536, 0.0884, 0.4177, 0.1033]}, {"w": "It’s", "b": [0.426, 0.0884, 0.452, 0.1033]}, {"w": "the", "b": [0.4582, 0.0884, 0.4836, 0.1033]}, {"w": "best", "b": [0.4897, 0.0884, 0.5229, 0.1033]}, {"w": "choice", "b": [0.5291, 0.0884, 0.5773, 0.1033]}, {"w": "when", "b": [0.5835, 0.0884, 0.6252, 0.1033]}, {"w": "the", "b": [0.6314, 0.0884, 0.6568, 0.1033]}, {"w": "client", "b": [0.6629, 0.0884, 0.7061, 0.1033]}, {"w": "wants", "b": [0.7123, 0.0884, 0.7581, 0.1033]}, {"w": "the", "b": [0.7643, 0.0884, 0.7897, 0.1033]}, {"w": "liberty", "b": [0.7959, 0.0884, 0.8483, 0.1033]}, {"w": "of", "b": [0.8544, 0.0884, 0.8692, 0.1033]}, {"w": "deciding", "b": [0.1312, 0.1064, 0.1974, 0.1213]}, {"w": "what", "b": [0.2036, 0.1064, 0.2433, 0.1213]}, {"w": "to", "b": [0.2494, 0.1064, 0.2657, 0.1213]}, {"w": "do", "b": [0.2718, 0.1064, 0.2912, 0.1213]}, {"w": "with", "b": [0.2973, 0.1064, 0.3329, 0.1213]}, {"w": "the", "b": [0.3391, 0.1064, 0.3645, 0.1213]}, {"w": "API", "b": [0.3706, 0.1064, 0.4035, 0.1213]}, {"w": "response.", "b": [0.4096, 0.1064, 0.4827, 0.1213]}, {"w": "On", "b": [0.4909, 0.1064, 0.5153, 0.1213]}, {"w": "the", "b": [0.5215, 0.1064, 0.5469, 0.1213]}, {"w": "other", "b": [0.5531, 0.1064, 0.5949, 0.1213]}, {"w": "hand,", "b": [0.601, 0.1064, 0.6458, 0.1213]}, {"w": "if", "b": [0.6519, 0.1064, 0.6626, 0.1213]}, {"w": "each", "b": [0.6688, 0.1064, 0.7039, 0.1213]}, {"w": "request", "b": [0.71, 0.1064, 0.7677, 0.1213]}, {"w": "of", "b": [0.7739, 0.1064, 0.7886, 0.1213]}, {"w": "the", "b": [0.7948, 0.1064, 0.8202, 0.1213]}, {"w": "client", "b": [0.8264, 0.1064, 0.8696, 0.1213]}, {"w": "is:", "b": [0.1312, 0.1243, 0.1488, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "• typical, • undergoes a certain pattern of transformations, especially multiple intermediate trans- formations, and • always results in the same actions, such as persistence of specific data elements to the filesystem or database, then streaming-based applications provide better resource- efficiency, lower latency, security, and fault-tolerance.", "words": [{"w": "•", "b": [0.1538, 0.1512, 0.1681, 0.1662]}, {"w": "typical,", "b": [0.1774, 0.1512, 0.2368, 0.1662]}, {"w": "•", "b": [0.1538, 0.1692, 0.1681, 0.1841]}, {"w": "undergoes", "b": [0.1774, 0.1692, 0.2576, 0.1841]}, {"w": "a", "b": [0.2637, 0.1692, 0.2729, 0.1841]}, {"w": "certain", "b": [0.279, 0.1692, 0.3341, 0.1841]}, {"w": "pattern", "b": [0.3403, 0.1692, 0.3994, 0.1841]}, {"w": "of", "b": [0.4056, 0.1692, 0.4204, 0.1841]}, {"w": "transformations,", "b": [0.4265, 0.1692, 0.5578, 0.1841]}, {"w": "especially", "b": [0.564, 0.1692, 0.6405, 0.1841]}, {"w": "multiple", "b": [0.6467, 0.1692, 0.7124, 0.1841]}, {"w": "intermediate", "b": [0.7186, 0.1692, 0.819, 0.1841]}, {"w": "trans-", "b": [0.8252, 0.1692, 0.8722, 0.1841]}, {"w": "formations,", "b": [0.1774, 0.1871, 0.2683, 0.2021]}, {"w": "and", "b": [0.2744, 0.1871, 0.3041, 0.2021]}, {"w": "•", "b": [0.1538, 0.205, 0.1681, 0.22]}, {"w": "always", "b": [0.1774, 0.2049, 0.2313, 0.22]}, {"w": "results", "b": [0.2388, 0.2049, 0.2924, 0.22]}, {"w": "in", "b": [0.2999, 0.2049, 0.3156, 0.22]}, {"w": "the", "b": [0.323, 0.2049, 0.3492, 0.22]}, {"w": "same", "b": [0.3567, 0.2049, 0.3975, 0.22]}, {"w": "actions,", "b": [0.405, 0.2049, 0.4679, 0.22]}, {"w": "such", "b": [0.4757, 0.2049, 0.5119, 0.22]}, {"w": "as", "b": [0.5194, 0.2049, 0.5362, 0.22]}, {"w": "persistence", "b": [0.5437, 0.2049, 0.6334, 0.22]}, {"w": "of", "b": [0.6409, 0.2049, 0.656, 0.22]}, {"w": "specific", "b": [0.6635, 0.2049, 0.7227, 0.22]}, {"w": "data", "b": [0.7302, 0.2049, 0.7668, 0.22]}, {"w": "elements", "b": [0.7742, 0.2049, 0.845, 0.22]}, {"w": "to", "b": [0.8524, 0.2049, 0.8692, 0.22]}, {"w": "the", "b": [0.1774, 0.223, 0.203, 0.2379]}, {"w": "filesystem", "b": [0.2092, 0.223, 0.2877, 0.2379]}, {"w": "or", "b": [0.2939, 0.223, 0.3103, 0.2379]}, {"w": "database,", "b": [0.3165, 0.223, 0.3924, 0.2379]}, {"w": "then", "b": [0.3986, 0.223, 0.4345, 0.2379]}, {"w": "streaming-based", "b": [0.4406, 0.223, 0.571, 0.2379]}, {"w": "applications", "b": [0.5772, 0.223, 0.6736, 0.2379]}, {"w": "provide", "b": [0.6797, 0.223, 0.7392, 0.2379]}, {"w": "better", "b": [0.7454, 0.223, 0.7941, 0.2379]}, {"w": "resource-", "b": [0.8003, 0.223, 0.8722, 0.2379]}, {"w": "efficiency,", "b": [0.1774, 0.2409, 0.2543, 0.2559]}, {"w": "lower", "b": [0.2604, 0.2409, 0.3025, 0.2559]}, {"w": "latency,", "b": [0.3087, 0.2409, 0.3702, 0.2559]}, {"w": "security,", "b": [0.3764, 0.2409, 0.4427, 0.2559]}, {"w": "and", "b": [0.4488, 0.2409, 0.4786, 0.2559]}, {"w": "fault-tolerance.", "b": [0.4847, 0.2409, 0.6063, 0.2559]}]}, {"id": "b_2", "type": "paragraph", "text": "8.4 Deployment Strategies", "words": [{"w": "8.4", "b": [0.1312, 0.2895, 0.1631, 0.3074]}, {"w": "Deployment", "b": [0.188, 0.2895, 0.3191, 0.3074]}, {"w": "Strategies", "b": [0.3274, 0.2895, 0.4349, 0.3074]}]}, {"id": "b_3", "type": "paragraph", "text": "Typical deployment strategies are:", "words": [{"w": "Typical", "b": [0.1306, 0.3284, 0.1911, 0.3433]}, {"w": "deployment", "b": [0.1972, 0.3284, 0.29, 0.3433]}, {"w": "strategies", "b": [0.2962, 0.3284, 0.3723, 0.3433]}, {"w": "are:", "b": [0.3785, 0.3284, 0.4083, 0.3433]}]}, {"id": "b_4", "type": "paragraph", "text": "• single deployment, • silent deployment, • canary deployment, and • multi-armed bandit.", "words": [{"w": "•", "b": [0.1538, 0.3553, 0.1681, 0.3702]}, {"w": "single", "b": [0.1774, 0.3553, 0.2226, 0.3702]}, {"w": "deployment,", "b": [0.2287, 0.3553, 0.3267, 0.3702]}, {"w": "•", "b": [0.1538, 0.3732, 0.1681, 0.3882]}, {"w": "silent", "b": [0.1774, 0.3732, 0.22, 0.3882]}, {"w": "deployment,", "b": [0.2262, 0.3732, 0.3241, 0.3882]}, {"w": "•", "b": [0.1538, 0.3912, 0.1681, 0.4061]}, {"w": "canary", "b": [0.1774, 0.3912, 0.2312, 0.4061]}, {"w": "deployment,", "b": [0.2374, 0.3912, 0.3353, 0.4061]}, {"w": "and", "b": [0.3415, 0.3912, 0.3712, 0.4061]}, {"w": "•", "b": [0.1538, 0.4091, 0.1681, 0.4241]}, {"w": "multi-armed", "b": [0.1774, 0.4091, 0.2763, 0.4241]}, {"w": "bandit.", "b": [0.2825, 0.4091, 0.3399, 0.4241]}]}, {"id": "b_5", "type": "paragraph", "text": "Let’s consider each of them.", "words": [{"w": "Let’s", "b": [0.1312, 0.436, 0.1706, 0.451]}, {"w": "consider", "b": [0.1767, 0.436, 0.2425, 0.451]}, {"w": "each", "b": [0.2487, 0.436, 0.284, 0.451]}, {"w": "of", "b": [0.2902, 0.436, 0.3051, 0.451]}, {"w": "them.", "b": [0.3112, 0.436, 0.3574, 0.451]}]}, {"id": "b_6", "type": "paragraph", "text": "8.4.1 Single Deployment", "words": [{"w": "8.4.1", "b": [0.1312, 0.4839, 0.1749, 0.4989]}, {"w": "Single", "b": [0.1961, 0.4839, 0.2518, 0.4989]}, {"w": "Deployment", "b": [0.2589, 0.4839, 0.3706, 0.4989]}]}, {"id": "b_7", "type": "paragraph", "text": "Single deployment is the simplest one. Conceptually, once you have a new model, you serialize it into a file, and then replace the old file with the new one. You also replace the feature extractor, if needed.", "words": [{"w": "Single", "b": [0.1312, 0.5205, 0.187, 0.5354]}, {"w": "deployment", "b": [0.1949, 0.5205, 0.3021, 0.5354]}, {"w": "is", "b": [0.309, 0.5204, 0.3216, 0.5355]}, {"w": "the", "b": [0.3285, 0.5204, 0.3547, 0.5355]}, {"w": "simplest", "b": [0.3616, 0.5204, 0.4287, 0.5355]}, {"w": "one.", "b": [0.4356, 0.5204, 0.4691, 0.5355]}, {"w": "Conceptually,", "b": [0.4795, 0.5204, 0.5914, 0.5355]}, {"w": "once", "b": [0.5985, 0.5204, 0.6351, 0.5355]}, {"w": "you", "b": [0.642, 0.5204, 0.6713, 0.5355]}, {"w": "have", "b": [0.6781, 0.5204, 0.7153, 0.5355]}, {"w": "a", "b": [0.7222, 0.5204, 0.7316, 0.5355]}, {"w": "new", "b": [0.7385, 0.5204, 0.7709, 0.5355]}, {"w": "model,", "b": [0.7778, 0.5204, 0.8327, 0.5355]}, {"w": "you", "b": [0.8397, 0.5204, 0.869, 0.5355]}, {"w": "serialize", "b": [0.1312, 0.5383, 0.1963, 0.5534]}, {"w": "it", "b": [0.2025, 0.5383, 0.215, 0.5534]}, {"w": "into", "b": [0.2212, 0.5383, 0.2531, 0.5534]}, {"w": "a", "b": [0.2593, 0.5383, 0.2687, 0.5534]}, {"w": "file,", "b": [0.2749, 0.5383, 0.3042, 0.5534]}, {"w": "and", "b": [0.3104, 0.5383, 0.3407, 0.5534]}, {"w": "then", "b": [0.3469, 0.5383, 0.3835, 0.5534]}, {"w": "replace", "b": [0.3897, 0.5383, 0.4473, 0.5534]}, {"w": "the", "b": [0.4535, 0.5383, 0.4797, 0.5534]}, {"w": "old", "b": [0.4858, 0.5383, 0.5109, 0.5534]}, {"w": "file", "b": [0.5171, 0.5383, 0.5412, 0.5534]}, {"w": "with", "b": [0.5474, 0.5383, 0.584, 0.5534]}, {"w": "the", "b": [0.5902, 0.5383, 0.6163, 0.5534]}, {"w": "new", "b": [0.6225, 0.5383, 0.6549, 0.5534]}, {"w": "one.", "b": [0.6611, 0.5383, 0.6946, 0.5534]}, {"w": "You", "b": [0.7029, 0.5383, 0.7354, 0.5534]}, {"w": "also", "b": [0.7415, 0.5383, 0.773, 0.5534]}, {"w": "replace", "b": [0.7792, 0.5383, 0.8368, 0.5534]}, {"w": "the", "b": [0.843, 0.5383, 0.8692, 0.5534]}, {"w": "feature", "b": [0.1312, 0.5564, 0.1872, 0.5713]}, {"w": "extractor,", "b": [0.1933, 0.5564, 0.2719, 0.5713]}, {"w": "if", "b": [0.278, 0.5564, 0.2888, 0.5713]}, {"w": "needed.", "b": [0.295, 0.5564, 0.3555, 0.5713]}]}, {"id": "b_8", "type": "paragraph", "text": "To deploy on a server in a cloud environment, you prepare a new virtual machine, or a container running the new version of the model. Then you replace the virtual machine image or that of the container. Finally, you gradually close the old machines or containers, and let the autoscaler start the new ones.", "words": [{"w": "To", "b": [0.1306, 0.5832, 0.152, 0.5983]}, {"w": "deploy", "b": [0.1597, 0.5832, 0.213, 0.5983]}, {"w": "on", "b": [0.2207, 0.5832, 0.2405, 0.5983]}, {"w": "a", "b": [0.2482, 0.5832, 0.2576, 0.5983]}, {"w": "server", "b": [0.2652, 0.5832, 0.3136, 0.5983]}, {"w": "in", "b": [0.3212, 0.5832, 0.3369, 0.5983]}, {"w": "a", "b": [0.3445, 0.5832, 0.3539, 0.5983]}, {"w": "cloud", "b": [0.3616, 0.5832, 0.4055, 0.5983]}, {"w": "environment,", "b": [0.4131, 0.5832, 0.5204, 0.5983]}, {"w": "you", "b": [0.5284, 0.5832, 0.5577, 0.5983]}, {"w": "prepare", "b": [0.5654, 0.5832, 0.6272, 0.5983]}, {"w": "a", "b": [0.6348, 0.5832, 0.6443, 0.5983]}, {"w": "new", "b": [0.6519, 0.5832, 0.6843, 0.5983]}, {"w": "virtual", "b": [0.6919, 0.5832, 0.7469, 0.5983]}, {"w": "machine,", "b": [0.7545, 0.5832, 0.8272, 0.5983]}, {"w": "or", "b": [0.8353, 0.5832, 0.852, 0.5983]}, {"w": "a", "b": [0.8597, 0.5832, 0.8691, 0.5983]}, {"w": "container", "b": [0.1312, 0.6013, 0.2041, 0.6162]}, {"w": "running", "b": [0.2101, 0.6013, 0.2715, 0.6162]}, {"w": "the", "b": [0.2774, 0.6013, 0.3026, 0.6162]}, {"w": "new", "b": [0.3086, 0.6013, 0.3397, 0.6162]}, {"w": "version", "b": [0.3457, 0.6013, 0.4011, 0.6162]}, {"w": "of", "b": [0.4071, 0.6013, 0.4217, 0.6162]}, {"w": "the", "b": [0.4276, 0.6013, 0.4528, 0.6162]}, {"w": "model.", "b": [0.4587, 0.6013, 0.5115, 0.6162]}, {"w": "Then", "b": [0.5196, 0.6013, 0.5608, 0.6162]}, {"w": "you", "b": [0.5668, 0.6013, 0.5949, 0.6162]}, {"w": "replace", "b": [0.6009, 0.6013, 0.6562, 0.6162]}, {"w": "the", "b": [0.6622, 0.6013, 0.6874, 0.6162]}, {"w": "virtual", "b": [0.6933, 0.6013, 0.7461, 0.6162]}, {"w": "machine", "b": [0.7521, 0.6013, 0.8169, 0.6162]}, {"w": "image", "b": [0.8229, 0.6013, 0.8691, 0.6162]}, {"w": "or", "b": [0.1312, 0.6192, 0.1475, 0.6341]}, {"w": "that", "b": [0.1537, 0.6192, 0.1872, 0.6341]}, {"w": "of", "b": [0.1934, 0.6192, 0.2081, 0.6341]}, {"w": "the", "b": [0.2143, 0.6192, 0.2397, 0.6341]}, {"w": "container.", "b": [0.2458, 0.6192, 0.3246, 0.6341]}, {"w": "Finally,", "b": [0.3328, 0.6192, 0.3925, 0.6341]}, {"w": "you", "b": [0.3987, 0.6192, 0.4271, 0.6341]}, {"w": "gradually", "b": [0.4333, 0.6192, 0.508, 0.6341]}, {"w": "close", "b": [0.5142, 0.6192, 0.5519, 0.6341]}, {"w": "the", "b": [0.558, 0.6192, 0.5834, 0.6341]}, {"w": "old", "b": [0.5896, 0.6192, 0.614, 0.6341]}, {"w": "machines", "b": [0.6201, 0.6192, 0.6929, 0.6341]}, {"w": "or", "b": [0.699, 0.6192, 0.7153, 0.6341]}, {"w": "containers,", "b": [0.7215, 0.6192, 0.8075, 0.6341]}, {"w": "and", "b": [0.8137, 0.6192, 0.8431, 0.6341]}, {"w": "let", "b": [0.8493, 0.6192, 0.8696, 0.6341]}, {"w": "the", "b": [0.1312, 0.6371, 0.1569, 0.6521]}, {"w": "autoscaler", "b": [0.163, 0.6371, 0.2442, 0.6521]}, {"w": "start", "b": [0.2503, 0.6371, 0.2884, 0.6521]}, {"w": "the", "b": [0.2946, 0.6371, 0.3202, 0.6521]}, {"w": "new", "b": [0.3264, 0.6371, 0.3582, 0.6521]}, {"w": "ones.", "b": [0.3643, 0.6371, 0.4044, 0.6521]}]}, {"id": "b_9", "type": "paragraph", "text": "To deploy on a physical server, you will upload a new model file (and the feature extraction object, if needed) on the server. Then you replace old files and old code with the new versions, and restart the web service.", "words": [{"w": "To", "b": [0.1306, 0.6641, 0.1514, 0.679]}, {"w": "deploy", "b": [0.1576, 0.6641, 0.2095, 0.679]}, {"w": "on", "b": [0.2157, 0.6641, 0.235, 0.679]}, {"w": "a", "b": [0.2412, 0.6641, 0.2503, 0.679]}, {"w": "physical", "b": [0.2565, 0.6641, 0.3208, 0.679]}, {"w": "server,", "b": [0.3269, 0.6641, 0.3791, 0.679]}, {"w": "you", "b": [0.3853, 0.6641, 0.4138, 0.679]}, {"w": "will", "b": [0.4199, 0.6641, 0.4484, 0.679]}, {"w": "upload", "b": [0.4546, 0.6641, 0.5086, 0.679]}, {"w": "a", "b": [0.5147, 0.6641, 0.5239, 0.679]}, {"w": "new", "b": [0.5301, 0.6641, 0.5616, 0.679]}, {"w": "model", "b": [0.5678, 0.6641, 0.6162, 0.679]}, {"w": "file", "b": [0.6223, 0.6641, 0.6457, 0.679]}, {"w": "(and", "b": [0.6519, 0.6641, 0.6886, 0.679]}, {"w": "the", "b": [0.6947, 0.6641, 0.7202, 0.679]}, {"w": "feature", "b": [0.7264, 0.6641, 0.7819, 0.679]}, {"w": "extraction", "b": [0.7881, 0.6641, 0.8691, 0.679]}, {"w": "object,", "b": [0.1312, 0.6821, 0.1845, 0.6969]}, {"w": "if", "b": [0.19, 0.6821, 0.2005, 0.6969]}, {"w": "needed)", "b": [0.2058, 0.6821, 0.2671, 0.6969]}, {"w": "on", "b": [0.2724, 0.6821, 0.2915, 0.6969]}, {"w": "the", "b": [0.2968, 0.6821, 0.3219, 0.6969]}, {"w": "server.", "b": [0.3272, 0.6821, 0.3787, 0.6969]}, {"w": "Then", "b": [0.3866, 0.6821, 0.4278, 0.6969]}, {"w": "you", "b": [0.4331, 0.6821, 0.4612, 0.6969]}, {"w": "replace", "b": [0.4665, 0.6821, 0.5218, 0.6969]}, {"w": "old", "b": [0.5271, 0.6821, 0.5512, 0.6969]}, {"w": "files", "b": [0.5565, 0.6821, 0.5868, 0.6969]}, {"w": "and", "b": [0.5921, 0.6821, 0.6212, 0.6969]}, {"w": "old", "b": [0.6265, 0.6821, 0.6506, 0.6969]}, {"w": "code", "b": [0.6559, 0.6821, 0.6916, 0.6969]}, {"w": "with", "b": [0.6969, 0.6821, 0.732, 0.6969]}, {"w": "the", "b": [0.7373, 0.6821, 0.7625, 0.6969]}, {"w": "new", "b": [0.7677, 0.6821, 0.7989, 0.6969]}, {"w": "versions,", "b": [0.8042, 0.6821, 0.8717, 0.6969]}, {"w": "and", "b": [0.1312, 0.6999, 0.161, 0.7149]}, {"w": "restart", "b": [0.1671, 0.6999, 0.2207, 0.7149]}, {"w": "the", "b": [0.2268, 0.6999, 0.2524, 0.7149]}, {"w": "web", "b": [0.2586, 0.6999, 0.2899, 0.7149]}, {"w": "service.", "b": [0.296, 0.6999, 0.3552, 0.7149]}]}, {"id": "b_10", "type": "paragraph", "text": "To deploy on the user’s device, you push the new model file to the user’s device, along with any needed feature extraction object, and restart the software.", "words": [{"w": "To", "b": [0.1306, 0.7269, 0.1515, 0.7418]}, {"w": "deploy", "b": [0.1576, 0.7269, 0.2097, 0.7418]}, {"w": "on", "b": [0.2159, 0.7269, 0.2353, 0.7418]}, {"w": "the", "b": [0.2414, 0.7269, 0.267, 0.7418]}, {"w": "user’s", "b": [0.2731, 0.7269, 0.3184, 0.7418]}, {"w": "device,", "b": [0.3245, 0.7269, 0.3792, 0.7418]}, {"w": "you", "b": [0.3853, 0.7269, 0.4139, 0.7418]}, {"w": "push", "b": [0.4201, 0.7269, 0.458, 0.7418]}, {"w": "the", "b": [0.4642, 0.7269, 0.4897, 0.7418]}, {"w": "new", "b": [0.4959, 0.7269, 0.5275, 0.7418]}, {"w": "model", "b": [0.5337, 0.7269, 0.5822, 0.7418]}, {"w": "file", "b": [0.5883, 0.7269, 0.6118, 0.7418]}, {"w": "to", "b": [0.618, 0.7269, 0.6343, 0.7418]}, {"w": "the", "b": [0.6405, 0.7269, 0.666, 0.7418]}, {"w": "user’s", "b": [0.6722, 0.7269, 0.7174, 0.7418]}, {"w": "device,", "b": [0.7235, 0.7269, 0.7782, 0.7418]}, {"w": "along", "b": [0.7844, 0.7269, 0.8273, 0.7418]}, {"w": "with", "b": [0.8334, 0.7269, 0.8692, 0.7418]}, {"w": "any", "b": [0.1312, 0.7448, 0.1599, 0.7598]}, {"w": "needed", "b": [0.1661, 0.7448, 0.2215, 0.7598]}, {"w": "feature", "b": [0.2276, 0.7448, 0.2836, 0.7598]}, {"w": "extraction", "b": [0.2897, 0.7448, 0.3713, 0.7598]}, {"w": "object,", "b": [0.3775, 0.7448, 0.4318, 0.7598]}, {"w": "and", "b": [0.438, 0.7448, 0.4677, 0.7598]}, {"w": "restart", "b": [0.4739, 0.7448, 0.5274, 0.7598]}, {"w": "the", "b": [0.5336, 0.7448, 0.5592, 0.7598]}, {"w": "software.", "b": [0.5653, 0.7448, 0.6368, 0.7598]}]}, {"id": "b_11", "type": "paragraph", "text": "If you use interpretable code, the feature extractor object can be deployed by replacing one source code file with another one. To avoid redeploying the entire software appli- cation, on either the server or the user’s device, the feature extractor’s object can be serialized into a file. Then, on each startup, the software running the model would deserialize the feature extractor object.", "words": [{"w": "If", "b": [0.1312, 0.7716, 0.1438, 0.7867]}, {"w": "you", "b": [0.1515, 0.7716, 0.1808, 0.7867]}, {"w": "use", "b": [0.1885, 0.7716, 0.2147, 0.7867]}, {"w": "interpretable", "b": [0.2224, 0.7716, 0.3277, 0.7867]}, {"w": "code,", "b": [0.3354, 0.7716, 0.3777, 0.7867]}, {"w": "the", "b": [0.3858, 0.7716, 0.412, 0.7867]}, {"w": "feature", "b": [0.4197, 0.7716, 0.4767, 0.7867]}, {"w": "extractor", "b": [0.4844, 0.7716, 0.5593, 0.7867]}, {"w": "object", "b": [0.567, 0.7716, 0.6172, 0.7867]}, {"w": "can", "b": [0.6249, 0.7716, 0.6532, 0.7867]}, {"w": "be", "b": [0.6609, 0.7716, 0.6802, 0.7867]}, {"w": "deployed", "b": [0.6879, 0.7716, 0.7596, 0.7867]}, {"w": "by", "b": [0.7673, 0.7716, 0.7872, 0.7867]}, {"w": "replacing", "b": [0.7949, 0.7716, 0.8692, 0.7867]}, {"w": "one", "b": [0.1312, 0.7896, 0.1595, 0.8047]}, {"w": "source", "b": [0.1682, 0.7896, 0.2196, 0.8047]}, {"w": "code", "b": [0.2284, 0.7896, 0.2655, 0.8047]}, {"w": "file", "b": [0.2742, 0.7896, 0.2983, 0.8047]}, {"w": "with", "b": [0.307, 0.7896, 0.3436, 0.8047]}, {"w": "another", "b": [0.3523, 0.7896, 0.4151, 0.8047]}, {"w": "one.", "b": [0.4239, 0.7896, 0.4573, 0.8047]}, {"w": "To", "b": [0.4733, 0.7896, 0.4947, 0.8047]}, {"w": "avoid", "b": [0.5034, 0.7896, 0.5469, 0.8047]}, {"w": "redeploying", "b": [0.5556, 0.7896, 0.6498, 0.8047]}, {"w": "the", "b": [0.6585, 0.7896, 0.6847, 0.8047]}, {"w": "entire", "b": [0.6934, 0.7896, 0.74, 0.8047]}, {"w": "software", "b": [0.7488, 0.7896, 0.8164, 0.8047]}, {"w": "appli-", "b": [0.8251, 0.7896, 0.8722, 0.8047]}, {"w": "cation,", "b": [0.1312, 0.8075, 0.1867, 0.8226]}, {"w": "on", "b": [0.1964, 0.8075, 0.2162, 0.8226]}, {"w": "either", "b": [0.2252, 0.8075, 0.2724, 0.8226]}, {"w": "the", "b": [0.2813, 0.8075, 0.3075, 0.8226]}, {"w": "server", "b": [0.3165, 0.8075, 0.3648, 0.8226]}, {"w": "or", "b": [0.3738, 0.8075, 0.3906, 0.8226]}, {"w": "the", "b": [0.3996, 0.8075, 0.4257, 0.8226]}, {"w": "user’s", "b": [0.4347, 0.8075, 0.481, 0.8226]}, {"w": "device,", "b": [0.49, 0.8075, 0.546, 0.8226]}, {"w": "the", "b": [0.5557, 0.8075, 0.5819, 0.8226]}, {"w": "feature", "b": [0.5908, 0.8075, 0.6479, 0.8226]}, {"w": "extractor’s", "b": [0.6569, 0.8075, 0.7444, 0.8226]}, {"w": "object", "b": [0.7534, 0.8075, 0.8036, 0.8226]}, {"w": "can", "b": [0.8126, 0.8075, 0.8409, 0.8226]}, {"w": "be", "b": [0.8498, 0.8075, 0.8692, 0.8226]}, {"w": "serialized", "b": [0.1312, 0.8257, 0.2038, 0.8405]}, {"w": "into", "b": [0.2096, 0.8257, 0.2402, 0.8405]}, {"w": "a", "b": [0.246, 0.8257, 0.255, 0.8405]}, {"w": "file.", "b": [0.2608, 0.8257, 0.289, 0.8405]}, {"w": "Then,", "b": [0.297, 0.8257, 0.3433, 0.8405]}, {"w": "on", "b": [0.3491, 0.8257, 0.3682, 0.8405]}, {"w": "each", "b": [0.374, 0.8257, 0.4087, 0.8405]}, {"w": "startup,", "b": [0.4145, 0.8257, 0.4769, 0.8405]}, {"w": "the", "b": [0.4828, 0.8257, 0.5079, 0.8405]}, {"w": "software", "b": [0.5137, 0.8257, 0.5787, 0.8405]}, {"w": "running", "b": [0.5845, 0.8257, 0.6458, 0.8405]}, {"w": "the", "b": [0.6516, 0.8257, 0.6768, 0.8405]}, {"w": "model", "b": [0.6826, 0.8257, 0.7303, 0.8405]}, {"w": "would", "b": [0.7361, 0.8257, 0.7828, 0.8405]}, {"w": "deserialize", "b": [0.7886, 0.8257, 0.8692, 0.8405]}, {"w": "the", "b": [0.1312, 0.8435, 0.1569, 0.8585]}, {"w": "feature", "b": [0.163, 0.8435, 0.219, 0.8585]}, {"w": "extractor", "b": [0.2251, 0.8435, 0.2985, 0.8585]}, {"w": "object.", "b": [0.3047, 0.8435, 0.3591, 0.8585]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "12", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 252, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Single deployment has the advantage of being simple; however, it’s also the riskiest strategy. If the new model or the feature extractor contains a bug, all users will be affected.", "words": [{"w": "Single", "b": [0.1312, 0.0884, 0.1791, 0.1033]}, {"w": "deployment", "b": [0.1852, 0.0884, 0.2774, 0.1033]}, {"w": "has", "b": [0.2835, 0.0884, 0.3101, 0.1033]}, {"w": "the", "b": [0.3162, 0.0884, 0.3417, 0.1033]}, {"w": "advantage", "b": [0.3478, 0.0884, 0.4282, 0.1033]}, {"w": "of", "b": [0.4344, 0.0884, 0.4491, 0.1033]}, {"w": "being", "b": [0.4553, 0.0884, 0.4986, 0.1033]}, {"w": "simple;", "b": [0.5047, 0.0884, 0.5608, 0.1033]}, {"w": "however,", "b": [0.5669, 0.0884, 0.6362, 0.1033]}, {"w": "it’s", "b": [0.6424, 0.0884, 0.6669, 0.1033]}, {"w": "also", "b": [0.6731, 0.0884, 0.7037, 0.1033]}, {"w": "the", "b": [0.7098, 0.0884, 0.7353, 0.1033]}, {"w": "riskiest", "b": [0.7414, 0.0884, 0.7982, 0.1033]}, {"w": "strategy.", "b": [0.8044, 0.0884, 0.8727, 0.1033]}, {"w": "If", "b": [0.1312, 0.1063, 0.1435, 0.1213]}, {"w": "the", "b": [0.1497, 0.1063, 0.1753, 0.1213]}, {"w": "new", "b": [0.1815, 0.1063, 0.2133, 0.1213]}, {"w": "model", "b": [0.2194, 0.1063, 0.2681, 0.1213]}, {"w": "or", "b": [0.2743, 0.1063, 0.2907, 0.1213]}, {"w": "the", "b": [0.2969, 0.1063, 0.3225, 0.1213]}, {"w": "feature", "b": [0.3287, 0.1063, 0.3846, 0.1213]}, {"w": "extractor", "b": [0.3908, 0.1063, 0.4642, 0.1213]}, {"w": "contains", "b": [0.4703, 0.1063, 0.5366, 0.1213]}, {"w": "a", "b": [0.5427, 0.1063, 0.552, 0.1213]}, {"w": "bug,", "b": [0.5581, 0.1063, 0.593, 0.1213]}, {"w": "all", "b": [0.5991, 0.1063, 0.6186, 0.1213]}, {"w": "users", "b": [0.6248, 0.1063, 0.665, 0.1213]}, {"w": "will", "b": [0.6712, 0.1063, 0.6999, 0.1213]}, {"w": "be", "b": [0.706, 0.1063, 0.725, 0.1213]}, {"w": "affected.", "b": [0.7312, 0.1063, 0.7983, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "8.4.2 Silent Deployment", "words": [{"w": "8.4.2", "b": [0.1312, 0.1542, 0.1749, 0.1692]}, {"w": "Silent", "b": [0.1961, 0.1542, 0.2488, 0.1692]}, {"w": "Deployment", "b": [0.2559, 0.1542, 0.3677, 0.1692]}]}, {"id": "b_2", "type": "paragraph", "text": "A counterpart of the single deployment is silent deployment. It deploys the new model version and new feature extractor, and keeps the old ones. Both versions run in parallel. However, the user will not be exposed to the new version until the switch is done. The predictions made by the new version are only logged. After some time, they are analyzed to detect possible bugs.", "words": [{"w": "A", "b": [0.1305, 0.1906, 0.1446, 0.2058]}, {"w": "counterpart", "b": [0.1512, 0.1906, 0.247, 0.2058]}, {"w": "of", "b": [0.2535, 0.1906, 0.2687, 0.2058]}, {"w": "the", "b": [0.2752, 0.1906, 0.3014, 0.2058]}, {"w": "single", "b": [0.308, 0.1906, 0.3541, 0.2058]}, {"w": "deployment", "b": [0.3606, 0.1906, 0.4553, 0.2058]}, {"w": "is", "b": [0.4618, 0.1906, 0.4745, 0.2058]}, {"w": "silent", "b": [0.4809, 0.1908, 0.5302, 0.2057]}, {"w": "deployment.", "b": [0.5377, 0.1906, 0.6502, 0.2058]}, {"w": "It", "b": [0.6596, 0.1906, 0.6737, 0.2058]}, {"w": "deploys", "b": [0.6802, 0.1906, 0.741, 0.2058]}, {"w": "the", "b": [0.7476, 0.1906, 0.7737, 0.2058]}, {"w": "new", "b": [0.7802, 0.1906, 0.8127, 0.2058]}, {"w": "model", "b": [0.8192, 0.1906, 0.8689, 0.2058]}, {"w": "version", "b": [0.1308, 0.2086, 0.1885, 0.2237]}, {"w": "and", "b": [0.1955, 0.2086, 0.2258, 0.2237]}, {"w": "new", "b": [0.2328, 0.2086, 0.2652, 0.2237]}, {"w": "feature", "b": [0.2722, 0.2086, 0.3293, 0.2237]}, {"w": "extractor,", "b": [0.3363, 0.2086, 0.4165, 0.2237]}, {"w": "and", "b": [0.4237, 0.2086, 0.454, 0.2237]}, {"w": "keeps", "b": [0.461, 0.2086, 0.5051, 0.2237]}, {"w": "the", "b": [0.5121, 0.2086, 0.5383, 0.2237]}, {"w": "old", "b": [0.5453, 0.2086, 0.5704, 0.2237]}, {"w": "ones.", "b": [0.5774, 0.2086, 0.6183, 0.2237]}, {"w": "Both", "b": [0.6291, 0.2086, 0.6696, 0.2237]}, {"w": "versions", "b": [0.6766, 0.2086, 0.7417, 0.2237]}, {"w": "run", "b": [0.7488, 0.2086, 0.7771, 0.2237]}, {"w": "in", "b": [0.7841, 0.2086, 0.7998, 0.2237]}, {"w": "parallel.", "b": [0.8068, 0.2086, 0.8727, 0.2237]}, {"w": "However,", "b": [0.1312, 0.2265, 0.2061, 0.2416]}, {"w": "the", "b": [0.2139, 0.2265, 0.24, 0.2416]}, {"w": "user", "b": [0.2475, 0.2265, 0.2811, 0.2416]}, {"w": "will", "b": [0.2886, 0.2265, 0.3179, 0.2416]}, {"w": "not", "b": [0.3253, 0.2265, 0.3525, 0.2416]}, {"w": "be", "b": [0.3599, 0.2265, 0.3793, 0.2416]}, {"w": "exposed", "b": [0.3867, 0.2265, 0.4517, 0.2416]}, {"w": "to", "b": [0.4591, 0.2265, 0.4759, 0.2416]}, {"w": "the", "b": [0.4833, 0.2265, 0.5095, 0.2416]}, {"w": "new", "b": [0.5169, 0.2265, 0.5494, 0.2416]}, {"w": "version", "b": [0.5568, 0.2265, 0.6145, 0.2416]}, {"w": "until", "b": [0.622, 0.2265, 0.6602, 0.2416]}, {"w": "the", "b": [0.6676, 0.2265, 0.6938, 0.2416]}, {"w": "switch", "b": [0.7012, 0.2265, 0.7531, 0.2416]}, {"w": "is", "b": [0.7606, 0.2265, 0.7732, 0.2416]}, {"w": "done.", "b": [0.7807, 0.2265, 0.8246, 0.2416]}, {"w": "The", "b": [0.8367, 0.2265, 0.8691, 0.2416]}, {"w": "predictions", "b": [0.1312, 0.2447, 0.2187, 0.2595]}, {"w": "made", "b": [0.2249, 0.2447, 0.2675, 0.2595]}, {"w": "by", "b": [0.2736, 0.2447, 0.2929, 0.2595]}, {"w": "the", "b": [0.299, 0.2447, 0.3244, 0.2595]}, {"w": "new", "b": [0.3306, 0.2447, 0.362, 0.2595]}, {"w": "version", "b": [0.3682, 0.2447, 0.4242, 0.2595]}, {"w": "are", "b": [0.4303, 0.2447, 0.4547, 0.2595]}, {"w": "only", "b": [0.4609, 0.2447, 0.4949, 0.2595]}, {"w": "logged.", "b": [0.501, 0.2447, 0.5569, 0.2595]}, {"w": "After", "b": [0.5651, 0.2447, 0.6067, 0.2595]}, {"w": "some", "b": [0.6129, 0.2447, 0.6526, 0.2595]}, {"w": "time,", "b": [0.6587, 0.2447, 0.6993, 0.2595]}, {"w": "they", "b": [0.7054, 0.2447, 0.7405, 0.2595]}, {"w": "are", "b": [0.7466, 0.2447, 0.771, 0.2595]}, {"w": "analyzed", "b": [0.7772, 0.2447, 0.8467, 0.2595]}, {"w": "to", "b": [0.8529, 0.2447, 0.8691, 0.2595]}, {"w": "detect", "b": [0.1312, 0.2626, 0.1805, 0.2775]}, {"w": "possible", "b": [0.1866, 0.2626, 0.2499, 0.2775]}, {"w": "bugs.", "b": [0.2561, 0.2626, 0.2982, 0.2775]}]}, {"id": "b_3", "type": "paragraph", "text": "Silent deployment has the benefit of providing enough time to ensure the new model works as expected, without adversely affecting any users. The drawback is the need to run twice as many models, which consumes more resources. Furthermore, for many applications, it’s impossible to evaluate the new model without exposing its predictions to the user.", "words": [{"w": "Silent", "b": [0.1312, 0.2895, 0.177, 0.3044]}, {"w": "deployment", "b": [0.1831, 0.2895, 0.2762, 0.3044]}, {"w": "has", "b": [0.2824, 0.2895, 0.3092, 0.3044]}, {"w": "the", "b": [0.3153, 0.2895, 0.3411, 0.3044]}, {"w": "benefit", "b": [0.3472, 0.2895, 0.4022, 0.3044]}, {"w": "of", "b": [0.4084, 0.2895, 0.4233, 0.3044]}, {"w": "providing", "b": [0.4294, 0.2895, 0.5056, 0.3044]}, {"w": "enough", "b": [0.5117, 0.2895, 0.5693, 0.3044]}, {"w": "time", "b": [0.5754, 0.2895, 0.6114, 0.3044]}, {"w": "to", "b": [0.6175, 0.2895, 0.634, 0.3044]}, {"w": "ensure", "b": [0.6401, 0.2895, 0.6917, 0.3044]}, {"w": "the", "b": [0.6979, 0.2895, 0.7236, 0.3044]}, {"w": "new", "b": [0.7297, 0.2895, 0.7616, 0.3044]}, {"w": "model", "b": [0.7677, 0.2895, 0.8166, 0.3044]}, {"w": "works", "b": [0.8227, 0.2895, 0.8691, 0.3044]}, {"w": "as", "b": [0.1312, 0.3073, 0.148, 0.3224]}, {"w": "expected,", "b": [0.1541, 0.3073, 0.2311, 0.3224]}, {"w": "without", "b": [0.2372, 0.3073, 0.3007, 0.3224]}, {"w": "adversely", "b": [0.3068, 0.3073, 0.3824, 0.3224]}, {"w": "affecting", "b": [0.3886, 0.3073, 0.4577, 0.3224]}, {"w": "any", "b": [0.4638, 0.3073, 0.493, 0.3224]}, {"w": "users.", "b": [0.4991, 0.3073, 0.5452, 0.3224]}, {"w": "The", "b": [0.5534, 0.3073, 0.5856, 0.3224]}, {"w": "drawback", "b": [0.5918, 0.3073, 0.6693, 0.3224]}, {"w": "is", "b": [0.6754, 0.3073, 0.688, 0.3224]}, {"w": "the", "b": [0.6942, 0.3073, 0.7202, 0.3224]}, {"w": "need", "b": [0.7263, 0.3073, 0.7638, 0.3224]}, {"w": "to", "b": [0.7699, 0.3073, 0.7866, 0.3224]}, {"w": "run", "b": [0.7927, 0.3073, 0.8209, 0.3224]}, {"w": "twice", "b": [0.827, 0.3073, 0.8691, 0.3224]}, {"w": "as", "b": [0.1312, 0.3253, 0.1479, 0.3403]}, {"w": "many", "b": [0.1541, 0.3253, 0.1986, 0.3403]}, {"w": "models,", "b": [0.2048, 0.3253, 0.2665, 0.3403]}, {"w": "which", "b": [0.2726, 0.3253, 0.3198, 0.3403]}, {"w": "consumes", "b": [0.326, 0.3253, 0.4028, 0.3403]}, {"w": "more", "b": [0.409, 0.3253, 0.4494, 0.3403]}, {"w": "resources.", "b": [0.4556, 0.3253, 0.5346, 0.3403]}, {"w": "Furthermore,", "b": [0.5429, 0.3253, 0.65, 0.3403]}, {"w": "for", "b": [0.6561, 0.3253, 0.6785, 0.3403]}, {"w": "many", "b": [0.6846, 0.3253, 0.7292, 0.3403]}, {"w": "applications,", "b": [0.7353, 0.3253, 0.838, 0.3403]}, {"w": "it’s", "b": [0.8441, 0.3253, 0.8691, 0.3403]}, {"w": "impossible", "b": [0.1312, 0.3433, 0.215, 0.3583]}, {"w": "to", "b": [0.2212, 0.3433, 0.2376, 0.3583]}, {"w": "evaluate", "b": [0.2437, 0.3433, 0.3099, 0.3583]}, {"w": "the", "b": [0.316, 0.3433, 0.3417, 0.3583]}, {"w": "new", "b": [0.3478, 0.3433, 0.3796, 0.3583]}, {"w": "model", "b": [0.3857, 0.3433, 0.4344, 0.3583]}, {"w": "without", "b": [0.4406, 0.3433, 0.5031, 0.3583]}, {"w": "exposing", "b": [0.5093, 0.3433, 0.5791, 0.3583]}, {"w": "its", "b": [0.5853, 0.3433, 0.6049, 0.3583]}, {"w": "predictions", "b": [0.611, 0.3433, 0.6994, 0.3583]}, {"w": "to", "b": [0.7055, 0.3433, 0.7219, 0.3583]}, {"w": "the", "b": [0.7281, 0.3433, 0.7537, 0.3583]}, {"w": "user.", "b": [0.7599, 0.3433, 0.798, 0.3583]}]}, {"id": "b_4", "type": "paragraph", "text": "8.4.3 Canary Deployment", "words": [{"w": "8.4.3", "b": [0.1312, 0.3912, 0.1749, 0.4061]}, {"w": "Canary", "b": [0.1961, 0.3912, 0.2638, 0.4061]}, {"w": "Deployment", "b": [0.2708, 0.3912, 0.3826, 0.4061]}]}, {"id": "b_5", "type": "paragraph", "text": "Recall, canary deployment, or canarying, pushes the new model version and code to a small fraction of users, while keeping the old version running for most users. Contrary to the silent deployment, canary deployment allows validating the new model’s performance, and its predictions’ effects. Contrary to the single deployment, canary deployment doesn’t affect lots of users in case of possible bugs.", "words": [{"w": "Recall,", "b": [0.1312, 0.4276, 0.1869, 0.4427]}, {"w": "canary", "b": [0.1931, 0.4278, 0.2549, 0.4427]}, {"w": "deployment,", "b": [0.262, 0.4276, 0.3745, 0.4427]}, {"w": "or", "b": [0.3807, 0.4276, 0.3975, 0.4427]}, {"w": "canarying,", "b": [0.4036, 0.4276, 0.4991, 0.4427]}, {"w": "pushes", "b": [0.5053, 0.4276, 0.5599, 0.4427]}, {"w": "the", "b": [0.5661, 0.4276, 0.5923, 0.4427]}, {"w": "new", "b": [0.5985, 0.4276, 0.6309, 0.4427]}, {"w": "model", "b": [0.6371, 0.4276, 0.6867, 0.4427]}, {"w": "version", "b": [0.6929, 0.4276, 0.7506, 0.4427]}, {"w": "and", "b": [0.7568, 0.4276, 0.7871, 0.4427]}, {"w": "code", "b": [0.7933, 0.4276, 0.8304, 0.4427]}, {"w": "to", "b": [0.8366, 0.4276, 0.8534, 0.4427]}, {"w": "a", "b": [0.8595, 0.4276, 0.8689, 0.4427]}, {"w": "small", "b": [0.1312, 0.4458, 0.1725, 0.4606]}, {"w": "fraction", "b": [0.1786, 0.4458, 0.2394, 0.4606]}, {"w": "of", "b": [0.2455, 0.4458, 0.2601, 0.4606]}, {"w": "users,", "b": [0.2661, 0.4458, 0.3106, 0.4606]}, {"w": "while", "b": [0.3167, 0.4458, 0.3579, 0.4606]}, {"w": "keeping", "b": [0.364, 0.4458, 0.4233, 0.4606]}, {"w": "the", "b": [0.4293, 0.4458, 0.4545, 0.4606]}, {"w": "old", "b": [0.4605, 0.4458, 0.4847, 0.4606]}, {"w": "version", "b": [0.4907, 0.4458, 0.5462, 0.4606]}, {"w": "running", "b": [0.5522, 0.4458, 0.6136, 0.4606]}, {"w": "for", "b": [0.6196, 0.4458, 0.6413, 0.4606]}, {"w": "most", "b": [0.6474, 0.4458, 0.6856, 0.4606]}, {"w": "users.", "b": [0.6917, 0.4458, 0.7362, 0.4606]}, {"w": "Contrary", "b": [0.7444, 0.4458, 0.8158, 0.4606]}, {"w": "to", "b": [0.8219, 0.4458, 0.8379, 0.4606]}, {"w": "the", "b": [0.844, 0.4458, 0.8691, 0.4606]}, {"w": "silent", "b": [0.1312, 0.4636, 0.1744, 0.4786]}, {"w": "deployment,", "b": [0.1805, 0.4636, 0.2797, 0.4786]}, {"w": "canary", "b": [0.2858, 0.4636, 0.3403, 0.4786]}, {"w": "deployment", "b": [0.3464, 0.4636, 0.4404, 0.4786]}, {"w": "allows", "b": [0.4465, 0.4636, 0.4959, 0.4786]}, {"w": "validating", "b": [0.502, 0.4636, 0.5825, 0.4786]}, {"w": "the", "b": [0.5886, 0.4636, 0.6145, 0.4786]}, {"w": "new", "b": [0.6207, 0.4636, 0.6528, 0.4786]}, {"w": "model’s", "b": [0.659, 0.4636, 0.7208, 0.4786]}, {"w": "performance,", "b": [0.7269, 0.4636, 0.8329, 0.4786]}, {"w": "and", "b": [0.839, 0.4636, 0.8691, 0.4786]}, {"w": "its", "b": [0.1312, 0.4816, 0.1507, 0.4965]}, {"w": "predictions’", "b": [0.1568, 0.4816, 0.2495, 0.4965]}, {"w": "effects.", "b": [0.2557, 0.4816, 0.3101, 0.4965]}, {"w": "Contrary", "b": [0.3184, 0.4816, 0.3906, 0.4965]}, {"w": "to", "b": [0.3968, 0.4816, 0.4131, 0.4965]}, {"w": "the", "b": [0.4192, 0.4816, 0.4446, 0.4965]}, {"w": "single", "b": [0.4508, 0.4816, 0.4956, 0.4965]}, {"w": "deployment,", "b": [0.5018, 0.4816, 0.5988, 0.4965]}, {"w": "canary", "b": [0.605, 0.4816, 0.6584, 0.4965]}, {"w": "deployment", "b": [0.6646, 0.4816, 0.7566, 0.4965]}, {"w": "doesn’t", "b": [0.7627, 0.4816, 0.8203, 0.4965]}, {"w": "affect", "b": [0.8264, 0.4816, 0.8696, 0.4965]}, {"w": "lots", "b": [0.1312, 0.4995, 0.1601, 0.5145]}, {"w": "of", "b": [0.1662, 0.4995, 0.1811, 0.5145]}, {"w": "users", "b": [0.1872, 0.4995, 0.2275, 0.5145]}, {"w": "in", "b": [0.2336, 0.4995, 0.249, 0.5145]}, {"w": "case", "b": [0.2552, 0.4995, 0.2881, 0.5145]}, {"w": "of", "b": [0.2943, 0.4995, 0.3091, 0.5145]}, {"w": "possible", "b": [0.3153, 0.4995, 0.3786, 0.5145]}, {"w": "bugs.", "b": [0.3847, 0.4995, 0.4269, 0.5145]}]}, {"id": "b_6", "type": "paragraph", "text": "By opting for the canary deployment, you accept the additional complexity of having and maintaining several versions of the model deployed simultaneously.", "words": [{"w": "By", "b": [0.1312, 0.5263, 0.1545, 0.5414]}, {"w": "opting", "b": [0.1606, 0.5263, 0.2128, 0.5414]}, {"w": "for", "b": [0.219, 0.5263, 0.2415, 0.5414]}, {"w": "the", "b": [0.2476, 0.5263, 0.2737, 0.5414]}, {"w": "canary", "b": [0.2799, 0.5263, 0.3348, 0.5414]}, {"w": "deployment,", "b": [0.3409, 0.5263, 0.4407, 0.5414]}, {"w": "you", "b": [0.4468, 0.5263, 0.4761, 0.5414]}, {"w": "accept", "b": [0.4822, 0.5263, 0.5345, 0.5414]}, {"w": "the", "b": [0.5406, 0.5263, 0.5667, 0.5414]}, {"w": "additional", "b": [0.5729, 0.5263, 0.6554, 0.5414]}, {"w": "complexity", "b": [0.6616, 0.5263, 0.7509, 0.5414]}, {"w": "of", "b": [0.757, 0.5263, 0.7722, 0.5414]}, {"w": "having", "b": [0.7783, 0.5263, 0.8327, 0.5414]}, {"w": "and", "b": [0.8388, 0.5263, 0.8691, 0.5414]}, {"w": "maintaining", "b": [0.1312, 0.5444, 0.2271, 0.5594]}, {"w": "several", "b": [0.2332, 0.5444, 0.2878, 0.5594]}, {"w": "versions", "b": [0.2939, 0.5444, 0.3578, 0.5594]}, {"w": "of", "b": [0.3639, 0.5444, 0.3788, 0.5594]}, {"w": "the", "b": [0.3849, 0.5444, 0.4106, 0.5594]}, {"w": "model", "b": [0.4167, 0.5444, 0.4654, 0.5594]}, {"w": "deployed", "b": [0.4716, 0.5444, 0.5418, 0.5594]}, {"w": "simultaneously.", "b": [0.548, 0.5444, 0.6707, 0.5594]}]}, {"id": "b_7", "type": "paragraph", "text": "An obvious drawback of the canary deployment is that it’s impossible for engineers to spot rare errors. If you deploy the new version to 5% of users, and a bug affects 2% of users, then you have only 0.1% chance that the bug will be discovered.", "words": [{"w": "An", "b": [0.1305, 0.5713, 0.1547, 0.5863]}, {"w": "obvious", "b": [0.1609, 0.5713, 0.2217, 0.5863]}, {"w": "drawback", "b": [0.2279, 0.5713, 0.3047, 0.5863]}, {"w": "of", "b": [0.3108, 0.5713, 0.3258, 0.5863]}, {"w": "the", "b": [0.3319, 0.5713, 0.3577, 0.5863]}, {"w": "canary", "b": [0.3638, 0.5713, 0.418, 0.5863]}, {"w": "deployment", "b": [0.4241, 0.5713, 0.5173, 0.5863]}, {"w": "is", "b": [0.5235, 0.5713, 0.5359, 0.5863]}, {"w": "that", "b": [0.5421, 0.5713, 0.5761, 0.5863]}, {"w": "it’s", "b": [0.5823, 0.5713, 0.6071, 0.5863]}, {"w": "impossible", "b": [0.6132, 0.5713, 0.6974, 0.5863]}, {"w": "for", "b": [0.7035, 0.5713, 0.7257, 0.5863]}, {"w": "engineers", "b": [0.7319, 0.5713, 0.8062, 0.5863]}, {"w": "to", "b": [0.8124, 0.5713, 0.8289, 0.5863]}, {"w": "spot", "b": [0.835, 0.5713, 0.8696, 0.5863]}, {"w": "rare", "b": [0.1312, 0.5894, 0.1625, 0.6042]}, {"w": "errors.", "b": [0.1686, 0.5894, 0.2191, 0.6042]}, {"w": "If", "b": [0.2273, 0.5894, 0.2394, 0.6042]}, {"w": "you", "b": [0.2455, 0.5894, 0.2736, 0.6042]}, {"w": "deploy", "b": [0.2797, 0.5894, 0.331, 0.6042]}, {"w": "the", "b": [0.3371, 0.5894, 0.3622, 0.6042]}, {"w": "new", "b": [0.3683, 0.5894, 0.3995, 0.6042]}, {"w": "version", "b": [0.4056, 0.5894, 0.461, 0.6042]}, {"w": "to", "b": [0.4671, 0.5894, 0.4832, 0.6042]}, {"w": "5%", "b": [0.4891, 0.5894, 0.5132, 0.6042]}, {"w": "of", "b": [0.5193, 0.5894, 0.5339, 0.6042]}, {"w": "users,", "b": [0.54, 0.5894, 0.5845, 0.6042]}, {"w": "and", "b": [0.5906, 0.5894, 0.6198, 0.6042]}, {"w": "a", "b": [0.6259, 0.5894, 0.6349, 0.6042]}, {"w": "bug", "b": [0.641, 0.5894, 0.6702, 0.6042]}, {"w": "affects", "b": [0.6763, 0.5894, 0.7261, 0.6042]}, {"w": "2%", "b": [0.7321, 0.5894, 0.7562, 0.6042]}, {"w": "of", "b": [0.7624, 0.5894, 0.7769, 0.6042]}, {"w": "users,", "b": [0.783, 0.5894, 0.8275, 0.6042]}, {"w": "then", "b": [0.8337, 0.5894, 0.8688, 0.6042]}, {"w": "you", "b": [0.1308, 0.6072, 0.1595, 0.6222]}, {"w": "have", "b": [0.1656, 0.6072, 0.202, 0.6222]}, {"w": "only", "b": [0.2082, 0.6072, 0.2425, 0.6222]}, {"w": "0.1%", "b": [0.2486, 0.6072, 0.2876, 0.6222]}, {"w": "chance", "b": [0.2937, 0.6072, 0.3476, 0.6222]}, {"w": "that", "b": [0.3537, 0.6072, 0.3876, 0.6222]}, {"w": "the", "b": [0.3937, 0.6072, 0.4194, 0.6222]}, {"w": "bug", "b": [0.4255, 0.6072, 0.4552, 0.6222]}, {"w": "will", "b": [0.4614, 0.6072, 0.4901, 0.6222]}, {"w": "be", "b": [0.4962, 0.6072, 0.5152, 0.6222]}, {"w": "discovered.", "b": [0.5214, 0.6072, 0.6092, 0.6222]}]}, {"id": "b_8", "type": "equation", "text": "8.4.4 Multi-Armed Bandits", "words": [{"w": "8.4.4", "b": [0.1312, 0.6551, 0.1749, 0.67]}, {"w": "Multi-Armed", "b": [0.1961, 0.6551, 0.3191, 0.67]}, {"w": "Bandits", "b": [0.3262, 0.6551, 0.3977, 0.67]}]}, {"id": "b_9", "type": "paragraph", "text": "As seen in Section ?? of Chapter 7, multi-armed bandits (MAB) are a way to compare one or more versions of the model in the production environment, and select the best performing one. MABs have an interesting property: after an initial exploration period, during which the MAB algorithm gathers enough evidence to evaluate the performance of each model (arm), the best arm is eventually played all the time. It means that after the convergence of the MAB algorithm, most of the time, all users are routed to the software version running the best model.", "words": [{"w": "As", "b": [0.1305, 0.6915, 0.1521, 0.7066]}, {"w": "seen", "b": [0.1584, 0.6915, 0.193, 0.7066]}, {"w": "in", "b": [0.1994, 0.6915, 0.2151, 0.7066]}, {"w": "Section", "b": [0.2214, 0.6915, 0.2811, 0.7066]}, {"w": "??", "b": [0.2873, 0.6916, 0.3073, 0.7066]}, {"w": "of", "b": [0.3137, 0.6915, 0.3288, 0.7066]}, {"w": "Chapter", "b": [0.3352, 0.6915, 0.4022, 0.7066]}, {"w": "7,", "b": [0.4085, 0.6915, 0.4231, 0.7066]}, {"w": "multi-armed", "b": [0.4295, 0.6916, 0.5437, 0.7066]}, {"w": "bandits", "b": [0.551, 0.6916, 0.6192, 0.7066]}, {"w": "(MAB)", "b": [0.6255, 0.6915, 0.6849, 0.7066]}, {"w": "are", "b": [0.6912, 0.6915, 0.7164, 0.7066]}, {"w": "a", "b": [0.7227, 0.6915, 0.7321, 0.7066]}, {"w": "way", "b": [0.7384, 0.6915, 0.7703, 0.7066]}, {"w": "to", "b": [0.7767, 0.6915, 0.7934, 0.7066]}, {"w": "compare", "b": [0.7997, 0.6915, 0.8688, 0.7066]}, {"w": "one", "b": [0.1312, 0.7095, 0.1595, 0.7246]}, {"w": "or", "b": [0.1682, 0.7095, 0.1849, 0.7246]}, {"w": "more", "b": [0.1936, 0.7095, 0.2345, 0.7246]}, {"w": "versions", "b": [0.2431, 0.7095, 0.3083, 0.7246]}, {"w": "of", "b": [0.317, 0.7095, 0.3321, 0.7246]}, {"w": "the", "b": [0.3408, 0.7095, 0.3669, 0.7246]}, {"w": "model", "b": [0.3756, 0.7095, 0.4253, 0.7246]}, {"w": "in", "b": [0.434, 0.7095, 0.4497, 0.7246]}, {"w": "the", "b": [0.4583, 0.7095, 0.4845, 0.7246]}, {"w": "production", "b": [0.4932, 0.7095, 0.5826, 0.7246]}, {"w": "environment,", "b": [0.5913, 0.7095, 0.6986, 0.7246]}, {"w": "and", "b": [0.7079, 0.7095, 0.7382, 0.7246]}, {"w": "select", "b": [0.7469, 0.7095, 0.792, 0.7246]}, {"w": "the", "b": [0.8007, 0.7095, 0.8269, 0.7246]}, {"w": "best", "b": [0.8355, 0.7095, 0.8696, 0.7246]}, {"w": "performing", "b": [0.1312, 0.7274, 0.2213, 0.7425]}, {"w": "one.", "b": [0.2287, 0.7274, 0.2621, 0.7425]}, {"w": "MABs", "b": [0.274, 0.7274, 0.3261, 0.7425]}, {"w": "have", "b": [0.3335, 0.7274, 0.3707, 0.7425]}, {"w": "an", "b": [0.3781, 0.7274, 0.3979, 0.7425]}, {"w": "interesting", "b": [0.4053, 0.7274, 0.4918, 0.7425]}, {"w": "property:", "b": [0.4991, 0.7274, 0.5751, 0.7425]}, {"w": "after", "b": [0.5858, 0.7274, 0.624, 0.7425]}, {"w": "an", "b": [0.6314, 0.7274, 0.6512, 0.7425]}, {"w": "initial", "b": [0.6586, 0.7274, 0.7067, 0.7425]}, {"w": "exploration", "b": [0.7141, 0.7274, 0.8067, 0.7425]}, {"w": "period,", "b": [0.8141, 0.7274, 0.8717, 0.7425]}, {"w": "during", "b": [0.1312, 0.7454, 0.1846, 0.7605]}, {"w": "which", "b": [0.1925, 0.7454, 0.2401, 0.7605]}, {"w": "the", "b": [0.248, 0.7454, 0.2741, 0.7605]}, {"w": "MAB", "b": [0.282, 0.7454, 0.3267, 0.7605]}, {"w": "algorithm", "b": [0.3346, 0.7454, 0.4141, 0.7605]}, {"w": "gathers", "b": [0.422, 0.7454, 0.4818, 0.7605]}, {"w": "enough", "b": [0.4896, 0.7454, 0.5482, 0.7605]}, {"w": "evidence", "b": [0.5561, 0.7454, 0.6257, 0.7605]}, {"w": "to", "b": [0.6335, 0.7454, 0.6503, 0.7605]}, {"w": "evaluate", "b": [0.6581, 0.7454, 0.7256, 0.7605]}, {"w": "the", "b": [0.7335, 0.7454, 0.7597, 0.7605]}, {"w": "performance", "b": [0.7675, 0.7454, 0.8691, 0.7605]}, {"w": "of", "b": [0.1312, 0.7633, 0.1464, 0.7784]}, {"w": "each", "b": [0.1535, 0.7633, 0.1896, 0.7784]}, {"w": "model", "b": [0.1966, 0.7633, 0.2463, 0.7784]}, {"w": "(arm),", "b": [0.2533, 0.7633, 0.3057, 0.7784]}, {"w": "the", "b": [0.3129, 0.7633, 0.3391, 0.7784]}, {"w": "best", "b": [0.3461, 0.7633, 0.3802, 0.7784]}, {"w": "arm", "b": [0.3873, 0.7633, 0.4198, 0.7784]}, {"w": "is", "b": [0.4268, 0.7633, 0.4395, 0.7784]}, {"w": "eventually", "b": [0.4465, 0.7633, 0.5302, 0.7784]}, {"w": "played", "b": [0.5373, 0.7633, 0.5901, 0.7784]}, {"w": "all", "b": [0.5972, 0.7633, 0.6171, 0.7784]}, {"w": "the", "b": [0.6241, 0.7633, 0.6503, 0.7784]}, {"w": "time.", "b": [0.6573, 0.7633, 0.6991, 0.7784]}, {"w": "It", "b": [0.7101, 0.7633, 0.7242, 0.7784]}, {"w": "means", "b": [0.7312, 0.7633, 0.7826, 0.7784]}, {"w": "that", "b": [0.7896, 0.7633, 0.8241, 0.7784]}, {"w": "after", "b": [0.8312, 0.7633, 0.8694, 0.7784]}, {"w": "the", "b": [0.1312, 0.7813, 0.1574, 0.7964]}, {"w": "convergence", "b": [0.1665, 0.7813, 0.2644, 0.7964]}, {"w": "of", "b": [0.2734, 0.7813, 0.2886, 0.7964]}, {"w": "the", "b": [0.2977, 0.7813, 0.3238, 0.7964]}, {"w": "MAB", "b": [0.3329, 0.7813, 0.3776, 0.7964]}, {"w": "algorithm,", "b": [0.3867, 0.7813, 0.4714, 0.7964]}, {"w": "most", "b": [0.4813, 0.7813, 0.5211, 0.7964]}, {"w": "of", "b": [0.5302, 0.7813, 0.5453, 0.7964]}, {"w": "the", "b": [0.5544, 0.7813, 0.5806, 0.7964]}, {"w": "time,", "b": [0.5896, 0.7813, 0.6315, 0.7964]}, {"w": "all", "b": [0.6413, 0.7813, 0.6612, 0.7964]}, {"w": "users", "b": [0.6702, 0.7813, 0.7113, 0.7964]}, {"w": "are", "b": [0.7204, 0.7813, 0.7455, 0.7964]}, {"w": "routed", "b": [0.7546, 0.7813, 0.808, 0.7964]}, {"w": "to", "b": [0.8171, 0.7813, 0.8338, 0.7964]}, {"w": "the", "b": [0.8429, 0.7813, 0.8691, 0.7964]}, {"w": "software", "b": [0.1312, 0.7993, 0.1975, 0.8143]}, {"w": "version", "b": [0.2037, 0.7993, 0.2602, 0.8143]}, {"w": "running", "b": [0.2664, 0.7993, 0.329, 0.8143]}, {"w": "the", "b": [0.3352, 0.7993, 0.3608, 0.8143]}, {"w": "best", "b": [0.3669, 0.7993, 0.4004, 0.8143]}, {"w": "model.", "b": [0.4065, 0.7993, 0.4604, 0.8143]}]}, {"id": "b_10", "type": "paragraph", "text": "The MAB algorithm, thus, solves two problems — online model evaluation and model deployment — simultaneously.", "words": [{"w": "The", "b": [0.1306, 0.8261, 0.163, 0.8412]}, {"w": "MAB", "b": [0.1715, 0.8261, 0.2162, 0.8412]}, {"w": "algorithm,", "b": [0.2247, 0.8261, 0.3095, 0.8412]}, {"w": "thus,", "b": [0.3186, 0.8261, 0.3589, 0.8412]}, {"w": "solves", "b": [0.3681, 0.8261, 0.4154, 0.8412]}, {"w": "two", "b": [0.4239, 0.8261, 0.4532, 0.8412]}, {"w": "problems", "b": [0.4617, 0.8261, 0.5361, 0.8412]}, {"w": "—", "b": [0.5446, 0.8261, 0.5634, 0.8412]}, {"w": "online", "b": [0.5719, 0.8261, 0.6211, 0.8412]}, {"w": "model", "b": [0.6296, 0.8261, 0.6793, 0.8412]}, {"w": "evaluation", "b": [0.6878, 0.8261, 0.772, 0.8412]}, {"w": "and", "b": [0.7805, 0.8261, 0.8108, 0.8412]}, {"w": "model", "b": [0.8194, 0.8261, 0.869, 0.8412]}, {"w": "deployment", "b": [0.1312, 0.8442, 0.224, 0.8591]}, {"w": "—", "b": [0.2302, 0.8442, 0.2486, 0.8591]}, {"w": "simultaneously.", "b": [0.2548, 0.8442, 0.3775, 0.8591]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "13", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 253, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "8.5 Automated Deployment, Versioning, and Metadata", "words": [{"w": "8.5", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Automated", "b": [0.188, 0.0861, 0.3099, 0.104]}, {"w": "Deployment,", "b": [0.3182, 0.0861, 0.4562, 0.104]}, {"w": "Versioning,", "b": [0.4645, 0.0861, 0.586, 0.104]}, {"w": "and", "b": [0.5943, 0.0861, 0.6341, 0.104]}, {"w": "Metadata", "b": [0.6424, 0.0861, 0.747, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "The model is an important asset, but it’s never delivered alone. There are additional assets for production model testing that ensure the model is not broken.", "words": [{"w": "The", "b": [0.1306, 0.125, 0.1623, 0.1399]}, {"w": "model", "b": [0.1684, 0.125, 0.2171, 0.1399]}, {"w": "is", "b": [0.2232, 0.125, 0.2356, 0.1399]}, {"w": "an", "b": [0.2417, 0.125, 0.2612, 0.1399]}, {"w": "important", "b": [0.2673, 0.125, 0.3482, 0.1399]}, {"w": "asset,", "b": [0.3544, 0.125, 0.3986, 0.1399]}, {"w": "but", "b": [0.4047, 0.125, 0.4324, 0.1399]}, {"w": "it’s", "b": [0.4385, 0.125, 0.4632, 0.1399]}, {"w": "never", "b": [0.4694, 0.125, 0.5124, 0.1399]}, {"w": "delivered", "b": [0.5186, 0.125, 0.5903, 0.1399]}, {"w": "alone.", "b": [0.5964, 0.125, 0.6435, 0.1399]}, {"w": "There", "b": [0.6517, 0.125, 0.6988, 0.1399]}, {"w": "are", "b": [0.705, 0.125, 0.7296, 0.1399]}, {"w": "additional", "b": [0.7358, 0.125, 0.8166, 0.1399]}, {"w": "assets", "b": [0.8228, 0.125, 0.8691, 0.1399]}, {"w": "for", "b": [0.1312, 0.1429, 0.1533, 0.1579]}, {"w": "production", "b": [0.1595, 0.1429, 0.2472, 0.1579]}, {"w": "model", "b": [0.2534, 0.1429, 0.3021, 0.1579]}, {"w": "testing", "b": [0.3082, 0.1429, 0.3627, 0.1579]}, {"w": "that", "b": [0.3688, 0.1429, 0.4027, 0.1579]}, {"w": "ensure", "b": [0.4088, 0.1429, 0.4603, 0.1579]}, {"w": "the", "b": [0.4664, 0.1429, 0.4921, 0.1579]}, {"w": "model", "b": [0.4982, 0.1429, 0.5469, 0.1579]}, {"w": "is", "b": [0.5531, 0.1429, 0.5655, 0.1579]}, {"w": "not", "b": [0.5716, 0.1429, 0.5983, 0.1579]}, {"w": "broken.", "b": [0.6044, 0.1429, 0.664, 0.1579]}]}, {"id": "b_2", "type": "paragraph", "text": "8.5.1 Model Accompanying Assets", "words": [{"w": "8.5.1", "b": [0.1312, 0.1908, 0.1749, 0.2057]}, {"w": "Model", "b": [0.1961, 0.1908, 0.2548, 0.2057]}, {"w": "Accompanying", "b": [0.2619, 0.1908, 0.3973, 0.2057]}, {"w": "Assets", "b": [0.4044, 0.1908, 0.4635, 0.2057]}]}, {"id": "b_3", "type": "paragraph", "text": "Only deploy a model in production when it’s accompanied with the following assets:", "words": [{"w": "Only", "b": [0.1312, 0.2273, 0.1707, 0.2423]}, {"w": "deploy", "b": [0.1769, 0.2273, 0.2292, 0.2423]}, {"w": "a", "b": [0.2353, 0.2273, 0.2445, 0.2423]}, {"w": "model", "b": [0.2507, 0.2273, 0.2994, 0.2423]}, {"w": "in", "b": [0.3055, 0.2273, 0.3209, 0.2423]}, {"w": "production", "b": [0.3271, 0.2273, 0.4148, 0.2423]}, {"w": "when", "b": [0.421, 0.2273, 0.463, 0.2423]}, {"w": "it’s", "b": [0.4691, 0.2273, 0.4939, 0.2423]}, {"w": "accompanied", "b": [0.5, 0.2273, 0.6036, 0.2423]}, {"w": "with", "b": [0.6098, 0.2273, 0.6456, 0.2423]}, {"w": "the", "b": [0.6518, 0.2273, 0.6774, 0.2423]}, {"w": "following", "b": [0.6836, 0.2273, 0.7553, 0.2423]}, {"w": "assets:", "b": [0.7615, 0.2273, 0.8131, 0.2423]}]}, {"id": "b_4", "type": "paragraph", "text": "• an end-to-end set that defines model inputs and outputs that must always work, • a confidence test set that correctly defines model inputs and outputs, and is used to compute the value of the metric, • a performance metric whose value will be calculated on the confidence test set by applying the model to it, and • the range of acceptable values of the performance metric.", "words": [{"w": "•", "b": [0.1538, 0.2543, 0.1681, 0.2692]}, {"w": "an", "b": [0.1774, 0.2543, 0.1968, 0.2692]}, {"w": "end-to-end", "b": [0.2031, 0.2543, 0.3027, 0.2692]}, {"w": "set", "b": [0.3098, 0.2543, 0.3361, 0.2692]}, {"w": "that", "b": [0.3423, 0.2543, 0.3761, 0.2692]}, {"w": "defines", "b": [0.3823, 0.2543, 0.4367, 0.2692]}, {"w": "model", "b": [0.4429, 0.2543, 0.4916, 0.2692]}, {"w": "inputs", "b": [0.4977, 0.2543, 0.5481, 0.2692]}, {"w": "and", "b": [0.5542, 0.2543, 0.584, 0.2692]}, {"w": "outputs", "b": [0.5901, 0.2543, 0.6518, 0.2692]}, {"w": "that", "b": [0.6579, 0.2543, 0.6918, 0.2692]}, {"w": "must", "b": [0.6979, 0.2543, 0.7375, 0.2692]}, {"w": "always", "b": [0.7436, 0.2543, 0.7965, 0.2692]}, {"w": "work,", "b": [0.8027, 0.2543, 0.8468, 0.2692]}, {"w": "•", "b": [0.1538, 0.2722, 0.1681, 0.2872]}, {"w": "a", "b": [0.1774, 0.2723, 0.1864, 0.2871]}, {"w": "confidence", "b": [0.1926, 0.2722, 0.2886, 0.2872]}, {"w": "test", "b": [0.2955, 0.2722, 0.3301, 0.2872]}, {"w": "set", "b": [0.337, 0.2722, 0.3633, 0.2872]}, {"w": "that", "b": [0.3693, 0.2723, 0.4025, 0.2871]}, {"w": "correctly", "b": [0.4085, 0.2723, 0.4774, 0.2871]}, {"w": "defines", "b": [0.4834, 0.2723, 0.5368, 0.2871]}, {"w": "model", "b": [0.5428, 0.2723, 0.5905, 0.2871]}, {"w": "inputs", "b": [0.5965, 0.2723, 0.6458, 0.2871]}, {"w": "and", "b": [0.6518, 0.2723, 0.681, 0.2871]}, {"w": "outputs,", "b": [0.687, 0.2723, 0.7524, 0.2871]}, {"w": "and", "b": [0.7584, 0.2723, 0.7876, 0.2871]}, {"w": "is", "b": [0.7935, 0.2723, 0.8057, 0.2871]}, {"w": "used", "b": [0.8117, 0.2723, 0.847, 0.2871]}, {"w": "to", "b": [0.853, 0.2723, 0.869, 0.2871]}, {"w": "compute", "b": [0.1774, 0.2902, 0.2461, 0.3051]}, {"w": "the", "b": [0.2522, 0.2902, 0.2779, 0.3051]}, {"w": "value", "b": [0.284, 0.2902, 0.3255, 0.3051]}, {"w": "of", "b": [0.3317, 0.2902, 0.3466, 0.3051]}, {"w": "the", "b": [0.3527, 0.2902, 0.3783, 0.3051]}, {"w": "metric,", "b": [0.3845, 0.2902, 0.4409, 0.3051]}, {"w": "•", "b": [0.1538, 0.3081, 0.1681, 0.3231]}, {"w": "a", "b": [0.1774, 0.308, 0.1868, 0.3231]}, {"w": "performance", "b": [0.1931, 0.3081, 0.3087, 0.3231]}, {"w": "metric", "b": [0.3158, 0.3081, 0.3755, 0.3231]}, {"w": "whose", "b": [0.3816, 0.308, 0.4308, 0.3231]}, {"w": "value", "b": [0.437, 0.308, 0.4793, 0.3231]}, {"w": "will", "b": [0.4854, 0.308, 0.5147, 0.3231]}, {"w": "be", "b": [0.5208, 0.308, 0.5402, 0.3231]}, {"w": "calculated", "b": [0.5463, 0.308, 0.6289, 0.3231]}, {"w": "on", "b": [0.635, 0.308, 0.6548, 0.3231]}, {"w": "the", "b": [0.661, 0.308, 0.6871, 0.3231]}, {"w": "confidence", "b": [0.6933, 0.308, 0.7779, 0.3231]}, {"w": "test", "b": [0.7841, 0.308, 0.8145, 0.3231]}, {"w": "set", "b": [0.8206, 0.308, 0.8437, 0.3231]}, {"w": "by", "b": [0.8499, 0.308, 0.8697, 0.3231]}, {"w": "applying", "b": [0.1774, 0.3261, 0.2466, 0.341]}, {"w": "the", "b": [0.2527, 0.3261, 0.2784, 0.341]}, {"w": "model", "b": [0.2845, 0.3261, 0.3332, 0.341]}, {"w": "to", "b": [0.3394, 0.3261, 0.3558, 0.341]}, {"w": "it,", "b": [0.3619, 0.3261, 0.3794, 0.341]}, {"w": "and", "b": [0.3855, 0.3261, 0.4152, 0.341]}, {"w": "•", "b": [0.1538, 0.344, 0.1681, 0.359]}, {"w": "the", "b": [0.1774, 0.344, 0.203, 0.359]}, {"w": "range", "b": [0.2091, 0.344, 0.2603, 0.359]}, {"w": "of", "b": [0.2674, 0.344, 0.2845, 0.359]}, {"w": "acceptable", "b": [0.2915, 0.344, 0.3882, 0.359]}, {"w": "values", "b": [0.3953, 0.344, 0.4514, 0.359]}, {"w": "of", "b": [0.4575, 0.344, 0.4724, 0.359]}, {"w": "the", "b": [0.4785, 0.344, 0.5042, 0.359]}, {"w": "performance", "b": [0.5103, 0.344, 0.6099, 0.359]}, {"w": "metric.", "b": [0.6161, 0.344, 0.6725, 0.359]}]}, {"id": "b_5", "type": "paragraph", "text": "Once the system using the model is initially evoked on an instance of a server or client’s device, an external process must call the model on the end-to-end test data and validate that all predictions are correct. Furthermore, the same external process must validate that the value of the performance metric computed by applying the model to the confidence test set is within the range of acceptable values. If either of two evaluations fails, the model should not be served to the client.", "words": [{"w": "Once", "b": [0.1312, 0.3708, 0.1731, 0.3859]}, {"w": "the", "b": [0.18, 0.3708, 0.2061, 0.3859]}, {"w": "system", "b": [0.213, 0.3708, 0.2691, 0.3859]}, {"w": "using", "b": [0.276, 0.3708, 0.319, 0.3859]}, {"w": "the", "b": [0.3259, 0.3708, 0.352, 0.3859]}, {"w": "model", "b": [0.3589, 0.3708, 0.4086, 0.3859]}, {"w": "is", "b": [0.4154, 0.3708, 0.4281, 0.3859]}, {"w": "initially", "b": [0.4349, 0.3708, 0.4982, 0.3859]}, {"w": "evoked", "b": [0.5051, 0.3708, 0.5606, 0.3859]}, {"w": "on", "b": [0.5674, 0.3708, 0.5873, 0.3859]}, {"w": "an", "b": [0.5942, 0.3708, 0.614, 0.3859]}, {"w": "instance", "b": [0.6209, 0.3708, 0.688, 0.3859]}, {"w": "of", "b": [0.6948, 0.3708, 0.71, 0.3859]}, {"w": "a", "b": [0.7169, 0.3708, 0.7263, 0.3859]}, {"w": "server", "b": [0.7331, 0.3708, 0.7815, 0.3859]}, {"w": "or", "b": [0.7884, 0.3708, 0.8052, 0.3859]}, {"w": "client’s", "b": [0.812, 0.3708, 0.8692, 0.3859]}, {"w": "device,", "b": [0.1312, 0.389, 0.185, 0.4038]}, {"w": "an", "b": [0.191, 0.389, 0.2101, 0.4038]}, {"w": "external", "b": [0.216, 0.389, 0.2799, 0.4038]}, {"w": "process", "b": [0.2857, 0.389, 0.3428, 0.4038]}, {"w": "must", "b": [0.3487, 0.389, 0.3875, 0.4038]}, {"w": "call", "b": [0.3934, 0.389, 0.4205, 0.4038]}, {"w": "the", "b": [0.4264, 0.389, 0.4516, 0.4038]}, {"w": "model", "b": [0.4575, 0.389, 0.5052, 0.4038]}, {"w": "on", "b": [0.5111, 0.389, 0.5302, 0.4038]}, {"w": "the", "b": [0.5361, 0.389, 0.5613, 0.4038]}, {"w": "end-to-end", "b": [0.5672, 0.389, 0.6516, 0.4038]}, {"w": "test", "b": [0.6575, 0.389, 0.6867, 0.4038]}, {"w": "data", "b": [0.6926, 0.389, 0.7278, 0.4038]}, {"w": "and", "b": [0.7337, 0.389, 0.7629, 0.4038]}, {"w": "validate", "b": [0.7688, 0.389, 0.8305, 0.4038]}, {"w": "that", "b": [0.8365, 0.389, 0.8696, 0.4038]}, {"w": "all", "b": [0.1312, 0.4067, 0.1511, 0.4218]}, {"w": "predictions", "b": [0.1572, 0.4067, 0.2472, 0.4218]}, {"w": "are", "b": [0.2533, 0.4067, 0.2784, 0.4218]}, {"w": "correct.", "b": [0.2845, 0.4067, 0.3463, 0.4218]}, {"w": "Furthermore,", "b": [0.3545, 0.4067, 0.4624, 0.4218]}, {"w": "the", "b": [0.4686, 0.4067, 0.4947, 0.4218]}, {"w": "same", "b": [0.5008, 0.4067, 0.5416, 0.4218]}, {"w": "external", "b": [0.5478, 0.4067, 0.6141, 0.4218]}, {"w": "process", "b": [0.6203, 0.4067, 0.6795, 0.4218]}, {"w": "must", "b": [0.6857, 0.4067, 0.726, 0.4218]}, {"w": "validate", "b": [0.7321, 0.4067, 0.7963, 0.4218]}, {"w": "that", "b": [0.8025, 0.4067, 0.8369, 0.4218]}, {"w": "the", "b": [0.843, 0.4067, 0.8692, 0.4218]}, {"w": "value", "b": [0.1308, 0.4248, 0.1723, 0.4397]}, {"w": "of", "b": [0.1784, 0.4248, 0.1933, 0.4397]}, {"w": "the", "b": [0.1995, 0.4248, 0.2251, 0.4397]}, {"w": "performance", "b": [0.2313, 0.4248, 0.3309, 0.4397]}, {"w": "metric", "b": [0.337, 0.4248, 0.3884, 0.4397]}, {"w": "computed", "b": [0.3945, 0.4248, 0.4735, 0.4397]}, {"w": "by", "b": [0.4796, 0.4248, 0.4991, 0.4397]}, {"w": "applying", "b": [0.5053, 0.4248, 0.5745, 0.4397]}, {"w": "the", "b": [0.5807, 0.4248, 0.6063, 0.4397]}, {"w": "model", "b": [0.6125, 0.4248, 0.6612, 0.4397]}, {"w": "to", "b": [0.6673, 0.4248, 0.6837, 0.4397]}, {"w": "the", "b": [0.6899, 0.4248, 0.7155, 0.4397]}, {"w": "confidence", "b": [0.7217, 0.4248, 0.8048, 0.4397]}, {"w": "test", "b": [0.811, 0.4248, 0.8408, 0.4397]}, {"w": "set", "b": [0.847, 0.4248, 0.8696, 0.4397]}, {"w": "is", "b": [0.1312, 0.4427, 0.1437, 0.4577]}, {"w": "within", "b": [0.1498, 0.4427, 0.2012, 0.4577]}, {"w": "the", "b": [0.2073, 0.4427, 0.233, 0.4577]}, {"w": "range", "b": [0.2391, 0.4427, 0.2834, 0.4577]}, {"w": "of", "b": [0.2895, 0.4427, 0.3044, 0.4577]}, {"w": "acceptable", "b": [0.3105, 0.4427, 0.3948, 0.4577]}, {"w": "values.", "b": [0.4009, 0.4427, 0.455, 0.4577]}, {"w": "If", "b": [0.4632, 0.4427, 0.4755, 0.4577]}, {"w": "either", "b": [0.4816, 0.4427, 0.5279, 0.4577]}, {"w": "of", "b": [0.5341, 0.4427, 0.549, 0.4577]}, {"w": "two", "b": [0.5551, 0.4427, 0.5838, 0.4577]}, {"w": "evaluations", "b": [0.59, 0.4427, 0.68, 0.4577]}, {"w": "fails,", "b": [0.6861, 0.4427, 0.7237, 0.4577]}, {"w": "the", "b": [0.7299, 0.4427, 0.7556, 0.4577]}, {"w": "model", "b": [0.7617, 0.4427, 0.8105, 0.4577]}, {"w": "should", "b": [0.8166, 0.4427, 0.8691, 0.4577]}, {"w": "not", "b": [0.1312, 0.4607, 0.1579, 0.4756]}, {"w": "be", "b": [0.164, 0.4607, 0.183, 0.4756]}, {"w": "served", "b": [0.1892, 0.4607, 0.2396, 0.4756]}, {"w": "to", "b": [0.2457, 0.4607, 0.2621, 0.4756]}, {"w": "the", "b": [0.2683, 0.4607, 0.2939, 0.4756]}, {"w": "client.", "b": [0.3001, 0.4607, 0.3488, 0.4756]}]}, {"id": "b_6", "type": "paragraph", "text": "8.5.2 Version Sync", "words": [{"w": "8.5.2", "b": [0.1312, 0.5085, 0.1749, 0.5235]}, {"w": "Version", "b": [0.1961, 0.5085, 0.2655, 0.5235]}, {"w": "Sync", "b": [0.2726, 0.5085, 0.3168, 0.5235]}]}, {"id": "b_7", "type": "paragraph", "text": "The versions of the following three elements must always be in sync:", "words": [{"w": "The", "b": [0.1306, 0.5451, 0.1624, 0.56]}, {"w": "versions", "b": [0.1685, 0.5451, 0.2324, 0.56]}, {"w": "of", "b": [0.2385, 0.5451, 0.2534, 0.56]}, {"w": "the", "b": [0.2595, 0.5451, 0.2852, 0.56]}, {"w": "following", "b": [0.2913, 0.5451, 0.3631, 0.56]}, {"w": "three", "b": [0.3692, 0.5451, 0.4103, 0.56]}, {"w": "elements", "b": [0.4165, 0.5451, 0.4858, 0.56]}, {"w": "must", "b": [0.492, 0.5451, 0.5315, 0.56]}, {"w": "always", "b": [0.5377, 0.5451, 0.5906, 0.56]}, {"w": "be", "b": [0.5967, 0.5451, 0.6157, 0.56]}, {"w": "in", "b": [0.6219, 0.5451, 0.6372, 0.56]}, {"w": "sync:", "b": [0.6434, 0.5451, 0.684, 0.56]}]}, {"id": "b_8", "type": "paragraph", "text": "1) training data, 2) feature extractor, and 3) model.", "words": [{"w": "1)", "b": [0.1517, 0.572, 0.1681, 0.587]}, {"w": "training", "b": [0.1774, 0.572, 0.241, 0.587]}, {"w": "data,", "b": [0.2471, 0.572, 0.2881, 0.587]}, {"w": "2)", "b": [0.1517, 0.5899, 0.1681, 0.6049]}, {"w": "feature", "b": [0.1774, 0.5899, 0.2333, 0.6049]}, {"w": "extractor,", "b": [0.2395, 0.5899, 0.318, 0.6049]}, {"w": "and", "b": [0.3242, 0.5899, 0.3539, 0.6049]}, {"w": "3)", "b": [0.1517, 0.6079, 0.1681, 0.6229]}, {"w": "model.", "b": [0.1774, 0.6079, 0.2312, 0.6229]}]}, {"id": "b_9", "type": "paragraph", "text": "Each update to the data must produce a new version in the data repository. The model trained using a specific version of the data must be put into the model repository with the same version number as that of the data used to train the model.", "words": [{"w": "Each", "b": [0.1312, 0.6347, 0.1718, 0.6498]}, {"w": "update", "b": [0.1788, 0.6347, 0.2358, 0.6498]}, {"w": "to", "b": [0.2427, 0.6347, 0.2595, 0.6498]}, {"w": "the", "b": [0.2664, 0.6347, 0.2926, 0.6498]}, {"w": "data", "b": [0.2996, 0.6347, 0.3362, 0.6498]}, {"w": "must", "b": [0.3432, 0.6347, 0.3835, 0.6498]}, {"w": "produce", "b": [0.3905, 0.6347, 0.456, 0.6498]}, {"w": "a", "b": [0.4629, 0.6347, 0.4723, 0.6498]}, {"w": "new", "b": [0.4793, 0.6347, 0.5117, 0.6498]}, {"w": "version", "b": [0.5187, 0.6347, 0.5764, 0.6498]}, {"w": "in", "b": [0.5834, 0.6347, 0.5991, 0.6498]}, {"w": "the", "b": [0.6061, 0.6347, 0.6322, 0.6498]}, {"w": "data", "b": [0.6392, 0.6347, 0.6758, 0.6498]}, {"w": "repository.", "b": [0.6828, 0.6347, 0.7693, 0.6498]}, {"w": "The", "b": [0.78, 0.6347, 0.8124, 0.6498]}, {"w": "model", "b": [0.8194, 0.6347, 0.8691, 0.6498]}, {"w": "trained", "b": [0.1312, 0.6527, 0.1892, 0.6677]}, {"w": "using", "b": [0.1953, 0.6527, 0.2378, 0.6677]}, {"w": "a", "b": [0.244, 0.6527, 0.2533, 0.6677]}, {"w": "specific", "b": [0.2594, 0.6527, 0.3179, 0.6677]}, {"w": "version", "b": [0.3241, 0.6527, 0.3811, 0.6677]}, {"w": "of", "b": [0.3872, 0.6527, 0.4022, 0.6677]}, {"w": "the", "b": [0.4084, 0.6527, 0.4342, 0.6677]}, {"w": "data", "b": [0.4404, 0.6527, 0.4765, 0.6677]}, {"w": "must", "b": [0.4827, 0.6527, 0.5226, 0.6677]}, {"w": "be", "b": [0.5287, 0.6527, 0.5479, 0.6677]}, {"w": "put", "b": [0.554, 0.6527, 0.5819, 0.6677]}, {"w": "into", "b": [0.588, 0.6527, 0.6196, 0.6677]}, {"w": "the", "b": [0.6257, 0.6527, 0.6516, 0.6677]}, {"w": "model", "b": [0.6577, 0.6527, 0.7068, 0.6677]}, {"w": "repository", "b": [0.7129, 0.6527, 0.7948, 0.6677]}, {"w": "with", "b": [0.801, 0.6527, 0.8371, 0.6677]}, {"w": "the", "b": [0.8433, 0.6527, 0.8691, 0.6677]}, {"w": "same", "b": [0.1312, 0.6707, 0.1713, 0.6857]}, {"w": "version", "b": [0.1775, 0.6707, 0.234, 0.6857]}, {"w": "number", "b": [0.2402, 0.6707, 0.3013, 0.6857]}, {"w": "as", "b": [0.3074, 0.6707, 0.3239, 0.6857]}, {"w": "that", "b": [0.3301, 0.6707, 0.3639, 0.6857]}, {"w": "of", "b": [0.3701, 0.6707, 0.3849, 0.6857]}, {"w": "the", "b": [0.3911, 0.6707, 0.4167, 0.6857]}, {"w": "data", "b": [0.4229, 0.6707, 0.4587, 0.6857]}, {"w": "used", "b": [0.4649, 0.6707, 0.5009, 0.6857]}, {"w": "to", "b": [0.507, 0.6707, 0.5234, 0.6857]}, {"w": "train", "b": [0.5296, 0.6707, 0.5686, 0.6857]}, {"w": "the", "b": [0.5748, 0.6707, 0.6004, 0.6857]}, {"w": "model.", "b": [0.6066, 0.6707, 0.6604, 0.6857]}]}, {"id": "b_10", "type": "paragraph", "text": "If the feature extractor was not changed, its version still must be updated to be in sync with the data and the model. If the feature extractor was updated, then a new model must be built using an updated feature extractor, and the versions are incremented for the feature extractor, the model, and the training data (even if the latter wasn’t changed).", "words": [{"w": "If", "b": [0.1312, 0.6977, 0.1433, 0.7126]}, {"w": "the", "b": [0.1494, 0.6977, 0.1746, 0.7126]}, {"w": "feature", "b": [0.1807, 0.6977, 0.2355, 0.7126]}, {"w": "extractor", "b": [0.2417, 0.6977, 0.3136, 0.7126]}, {"w": "was", "b": [0.3198, 0.6977, 0.3485, 0.7126]}, {"w": "not", "b": [0.3547, 0.6977, 0.3808, 0.7126]}, {"w": "changed,", "b": [0.3869, 0.6977, 0.4558, 0.7126]}, {"w": "its", "b": [0.4619, 0.6977, 0.4811, 0.7126]}, {"w": "version", "b": [0.4872, 0.6977, 0.5427, 0.7126]}, {"w": "still", "b": [0.5488, 0.6977, 0.5781, 0.7126]}, {"w": "must", "b": [0.5842, 0.6977, 0.623, 0.7126]}, {"w": "be", "b": [0.6291, 0.6977, 0.6477, 0.7126]}, {"w": "updated", "b": [0.6539, 0.6977, 0.7187, 0.7126]}, {"w": "to", "b": [0.7248, 0.6977, 0.7409, 0.7126]}, {"w": "be", "b": [0.7471, 0.6977, 0.7657, 0.7126]}, {"w": "in", "b": [0.7718, 0.6977, 0.7869, 0.7126]}, {"w": "sync", "b": [0.793, 0.6977, 0.8278, 0.7126]}, {"w": "with", "b": [0.834, 0.6977, 0.8691, 0.7126]}, {"w": "the", "b": [0.1312, 0.7155, 0.1574, 0.7306]}, {"w": "data", "b": [0.1637, 0.7155, 0.2003, 0.7306]}, {"w": "and", "b": [0.2065, 0.7155, 0.2369, 0.7306]}, {"w": "the", "b": [0.2431, 0.7155, 0.2693, 0.7306]}, {"w": "model.", "b": [0.2756, 0.7155, 0.3304, 0.7306]}, {"w": "If", "b": [0.339, 0.7155, 0.3515, 0.7306]}, {"w": "the", "b": [0.3578, 0.7155, 0.384, 0.7306]}, {"w": "feature", "b": [0.3902, 0.7155, 0.4473, 0.7306]}, {"w": "extractor", "b": [0.4536, 0.7155, 0.5285, 0.7306]}, {"w": "was", "b": [0.5347, 0.7155, 0.5647, 0.7306]}, {"w": "updated,", "b": [0.5709, 0.7155, 0.6436, 0.7306]}, {"w": "then", "b": [0.6499, 0.7155, 0.6865, 0.7306]}, {"w": "a", "b": [0.6928, 0.7155, 0.7022, 0.7306]}, {"w": "new", "b": [0.7085, 0.7155, 0.7409, 0.7306]}, {"w": "model", "b": [0.7472, 0.7155, 0.7968, 0.7306]}, {"w": "must", "b": [0.8031, 0.7155, 0.8435, 0.7306]}, {"w": "be", "b": [0.8497, 0.7155, 0.8691, 0.7306]}, {"w": "built", "b": [0.1312, 0.7334, 0.1699, 0.7485]}, {"w": "using", "b": [0.1761, 0.7334, 0.219, 0.7485]}, {"w": "an", "b": [0.2251, 0.7334, 0.245, 0.7485]}, {"w": "updated", "b": [0.2511, 0.7334, 0.3185, 0.7485]}, {"w": "feature", "b": [0.3247, 0.7334, 0.3817, 0.7485]}, {"w": "extractor,", "b": [0.3878, 0.7334, 0.4679, 0.7485]}, {"w": "and", "b": [0.474, 0.7334, 0.5043, 0.7485]}, {"w": "the", "b": [0.5105, 0.7334, 0.5366, 0.7485]}, {"w": "versions", "b": [0.5427, 0.7334, 0.6078, 0.7485]}, {"w": "are", "b": [0.614, 0.7334, 0.6391, 0.7485]}, {"w": "incremented", "b": [0.6452, 0.7334, 0.7451, 0.7485]}, {"w": "for", "b": [0.7512, 0.7334, 0.7738, 0.7485]}, {"w": "the", "b": [0.7799, 0.7334, 0.806, 0.7485]}, {"w": "feature", "b": [0.8122, 0.7334, 0.8692, 0.7485]}, {"w": "extractor,", "b": [0.1312, 0.7515, 0.2098, 0.7664]}, {"w": "the", "b": [0.2159, 0.7515, 0.2416, 0.7664]}, {"w": "model,", "b": [0.2477, 0.7515, 0.3016, 0.7664]}, {"w": "and", "b": [0.3077, 0.7515, 0.3374, 0.7664]}, {"w": "the", "b": [0.3436, 0.7515, 0.3692, 0.7664]}, {"w": "training", "b": [0.3754, 0.7515, 0.439, 0.7664]}, {"w": "data", "b": [0.4452, 0.7515, 0.481, 0.7664]}, {"w": "(even", "b": [0.4872, 0.7515, 0.5303, 0.7664]}, {"w": "if", "b": [0.5364, 0.7515, 0.5472, 0.7664]}, {"w": "the", "b": [0.5534, 0.7515, 0.579, 0.7664]}, {"w": "latter", "b": [0.5851, 0.7515, 0.6293, 0.7664]}, {"w": "wasn’t", "b": [0.6354, 0.7515, 0.6873, 0.7664]}, {"w": "changed).", "b": [0.6935, 0.7515, 0.7709, 0.7664]}]}, {"id": "b_11", "type": "paragraph", "text": "The deployment of a new model version must be automated by a script in a transactional way. Given a version of the model to deploy, the deployment script will fetch the model and the feature extraction object from the respective repositories and copy them to the production environment. The model must be applied to the end-to-end and confidence test data by simulating a regular call from the outside. If there’s a prediction error for the end-to-end", "words": [{"w": "The", "b": [0.1306, 0.7785, 0.1617, 0.7933]}, {"w": "deployment", "b": [0.1671, 0.7785, 0.2581, 0.7933]}, {"w": "of", "b": [0.2635, 0.7785, 0.2781, 0.7933]}, {"w": "a", "b": [0.2835, 0.7785, 0.2925, 0.7933]}, {"w": "new", "b": [0.298, 0.7785, 0.3291, 0.7933]}, {"w": "model", "b": [0.3346, 0.7785, 0.3823, 0.7933]}, {"w": "version", "b": [0.3877, 0.7785, 0.4432, 0.7933]}, {"w": "must", "b": [0.4486, 0.7785, 0.4874, 0.7933]}, {"w": "be", "b": [0.4928, 0.7785, 0.5114, 0.7933]}, {"w": "automated", "b": [0.5168, 0.7785, 0.6012, 0.7933]}, {"w": "by", "b": [0.6067, 0.7785, 0.6258, 0.7933]}, {"w": "a", "b": [0.6312, 0.7785, 0.6402, 0.7933]}, {"w": "script", "b": [0.6457, 0.7785, 0.69, 0.7933]}, {"w": "in", "b": [0.6955, 0.7785, 0.7105, 0.7933]}, {"w": "a", "b": [0.716, 0.7785, 0.725, 0.7933]}, {"w": "transactional", "b": [0.7304, 0.7785, 0.8331, 0.7933]}, {"w": "way.", "b": [0.8385, 0.7785, 0.8726, 0.7933]}, {"w": "Given", "b": [0.1312, 0.7963, 0.1788, 0.8113]}, {"w": "a", "b": [0.185, 0.7963, 0.1942, 0.8113]}, {"w": "version", "b": [0.2004, 0.7963, 0.2573, 0.8113]}, {"w": "of", "b": [0.2635, 0.7963, 0.2784, 0.8113]}, {"w": "the", "b": [0.2845, 0.7963, 0.3103, 0.8113]}, {"w": "model", "b": [0.3165, 0.7963, 0.3655, 0.8113]}, {"w": "to", "b": [0.3716, 0.7963, 0.3881, 0.8113]}, {"w": "deploy,", "b": [0.3943, 0.7963, 0.4505, 0.8113]}, {"w": "the", "b": [0.4566, 0.7963, 0.4824, 0.8113]}, {"w": "deployment", "b": [0.4886, 0.7963, 0.582, 0.8113]}, {"w": "script", "b": [0.5881, 0.7963, 0.6337, 0.8113]}, {"w": "will", "b": [0.6398, 0.7963, 0.6687, 0.8113]}, {"w": "fetch", "b": [0.6748, 0.7963, 0.7141, 0.8113]}, {"w": "the", "b": [0.7202, 0.7963, 0.746, 0.8113]}, {"w": "model", "b": [0.7521, 0.7963, 0.8011, 0.8113]}, {"w": "and", "b": [0.8073, 0.7963, 0.8372, 0.8113]}, {"w": "the", "b": [0.8433, 0.7963, 0.8691, 0.8113]}, {"w": "feature", "b": [0.1312, 0.8142, 0.1876, 0.8293]}, {"w": "extraction", "b": [0.1938, 0.8142, 0.276, 0.8293]}, {"w": "object", "b": [0.2821, 0.8142, 0.3317, 0.8293]}, {"w": "from", "b": [0.3379, 0.8142, 0.3757, 0.8293]}, {"w": "the", "b": [0.3818, 0.8142, 0.4076, 0.8293]}, {"w": "respective", "b": [0.4138, 0.8142, 0.4941, 0.8293]}, {"w": "repositories", "b": [0.5002, 0.8142, 0.593, 0.8293]}, {"w": "and", "b": [0.5992, 0.8142, 0.6291, 0.8293]}, {"w": "copy", "b": [0.6353, 0.8142, 0.6725, 0.8293]}, {"w": "them", "b": [0.6786, 0.8142, 0.72, 0.8293]}, {"w": "to", "b": [0.7261, 0.8142, 0.7426, 0.8293]}, {"w": "the", "b": [0.7488, 0.8142, 0.7746, 0.8293]}, {"w": "production", "b": [0.7807, 0.8142, 0.8692, 0.8293]}, {"w": "environment.", "b": [0.1312, 0.8321, 0.2385, 0.8472]}, {"w": "The", "b": [0.2497, 0.8321, 0.2822, 0.8472]}, {"w": "model", "b": [0.2893, 0.8321, 0.339, 0.8472]}, {"w": "must", "b": [0.3461, 0.8321, 0.3865, 0.8472]}, {"w": "be", "b": [0.3937, 0.8321, 0.413, 0.8472]}, {"w": "applied", "b": [0.4202, 0.8321, 0.4798, 0.8472]}, {"w": "to", "b": [0.487, 0.8321, 0.5037, 0.8472]}, {"w": "the", "b": [0.5108, 0.8321, 0.537, 0.8472]}, {"w": "end-to-end", "b": [0.5441, 0.8321, 0.632, 0.8472]}, {"w": "and", "b": [0.6392, 0.8321, 0.6695, 0.8472]}, {"w": "confidence", "b": [0.6766, 0.8321, 0.7614, 0.8472]}, {"w": "test", "b": [0.7686, 0.8321, 0.799, 0.8472]}, {"w": "data", "b": [0.8062, 0.8321, 0.8428, 0.8472]}, {"w": "by", "b": [0.8499, 0.8321, 0.8698, 0.8472]}, {"w": "simulating", "b": [0.1312, 0.8501, 0.2166, 0.8652]}, {"w": "a", "b": [0.223, 0.8501, 0.2325, 0.8652]}, {"w": "regular", "b": [0.2389, 0.8501, 0.2966, 0.8652]}, {"w": "call", "b": [0.303, 0.8501, 0.3313, 0.8652]}, {"w": "from", "b": [0.3377, 0.8501, 0.376, 0.8652]}, {"w": "the", "b": [0.3824, 0.8501, 0.4086, 0.8652]}, {"w": "outside.", "b": [0.4151, 0.8501, 0.479, 0.8652]}, {"w": "If", "b": [0.4881, 0.8501, 0.5007, 0.8652]}, {"w": "there’s", "b": [0.5072, 0.8501, 0.5617, 0.8652]}, {"w": "a", "b": [0.5682, 0.8501, 0.5776, 0.8652]}, {"w": "prediction", "b": [0.5841, 0.8501, 0.6668, 0.8652]}, {"w": "error", "b": [0.6733, 0.8501, 0.7132, 0.8652]}, {"w": "for", "b": [0.7196, 0.8501, 0.7422, 0.8652]}, {"w": "the", "b": [0.7486, 0.8501, 0.7748, 0.8652]}, {"w": "end-to-end", "b": [0.7813, 0.8501, 0.8691, 0.8652]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "14", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 254, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "test data, or the value of the metric is not within the range of acceptable values, the entire deployment has to be rolled back.", "words": [{"w": "test", "b": [0.1312, 0.0884, 0.1612, 0.1034]}, {"w": "data,", "b": [0.1674, 0.0884, 0.2085, 0.1034]}, {"w": "or", "b": [0.2147, 0.0884, 0.2312, 0.1034]}, {"w": "the", "b": [0.2374, 0.0884, 0.2631, 0.1034]}, {"w": "value", "b": [0.2693, 0.0884, 0.311, 0.1034]}, {"w": "of", "b": [0.3171, 0.0884, 0.3321, 0.1034]}, {"w": "the", "b": [0.3382, 0.0884, 0.364, 0.1034]}, {"w": "metric", "b": [0.3701, 0.0884, 0.4216, 0.1034]}, {"w": "is", "b": [0.4278, 0.0884, 0.4403, 0.1034]}, {"w": "not", "b": [0.4464, 0.0884, 0.4732, 0.1034]}, {"w": "within", "b": [0.4793, 0.0884, 0.5308, 0.1034]}, {"w": "the", "b": [0.537, 0.0884, 0.5627, 0.1034]}, {"w": "range", "b": [0.5689, 0.0884, 0.6132, 0.1034]}, {"w": "of", "b": [0.6194, 0.0884, 0.6343, 0.1034]}, {"w": "acceptable", "b": [0.6404, 0.0884, 0.7249, 0.1034]}, {"w": "values,", "b": [0.731, 0.0884, 0.7852, 0.1034]}, {"w": "the", "b": [0.7914, 0.0884, 0.8171, 0.1034]}, {"w": "entire", "b": [0.8233, 0.0884, 0.8691, 0.1034]}, {"w": "deployment", "b": [0.1312, 0.1063, 0.224, 0.1213]}, {"w": "has", "b": [0.2302, 0.1063, 0.2569, 0.1213]}, {"w": "to", "b": [0.2631, 0.1063, 0.2795, 0.1213]}, {"w": "be", "b": [0.2857, 0.1063, 0.3046, 0.1213]}, {"w": "rolled", "b": [0.3108, 0.1063, 0.356, 0.1213]}, {"w": "back.", "b": [0.3621, 0.1063, 0.4042, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "8.5.3 Model Version Metadata", "words": [{"w": "8.5.3", "b": [0.1312, 0.1542, 0.1749, 0.1692]}, {"w": "Model", "b": [0.1961, 0.1542, 0.2548, 0.1692]}, {"w": "Version", "b": [0.2619, 0.1542, 0.3313, 0.1692]}, {"w": "Metadata", "b": [0.3384, 0.1542, 0.4275, 0.1692]}]}, {"id": "b_2", "type": "paragraph", "text": "Each model version must be accompanied with the following code and metadata:", "words": [{"w": "Each", "b": [0.1312, 0.1908, 0.171, 0.2057]}, {"w": "model", "b": [0.1771, 0.1908, 0.2258, 0.2057]}, {"w": "version", "b": [0.232, 0.1908, 0.2885, 0.2057]}, {"w": "must", "b": [0.2947, 0.1908, 0.3343, 0.2057]}, {"w": "be", "b": [0.3404, 0.1908, 0.3594, 0.2057]}, {"w": "accompanied", "b": [0.3655, 0.1908, 0.4691, 0.2057]}, {"w": "with", "b": [0.4753, 0.1908, 0.5111, 0.2057]}, {"w": "the", "b": [0.5173, 0.1908, 0.5429, 0.2057]}, {"w": "following", "b": [0.5491, 0.1908, 0.6209, 0.2057]}, {"w": "code", "b": [0.627, 0.1908, 0.6634, 0.2057]}, {"w": "and", "b": [0.6696, 0.1908, 0.6993, 0.2057]}, {"w": "metadata:", "b": [0.7054, 0.1908, 0.7864, 0.2057]}]}, {"id": "b_3", "type": "paragraph", "text": "• the name and the version of the library or package used to train the model, • if Python was used to build the model, then requirements.txt of the virtual environment used to build the model (or, alternatively, a Docker image name pointing to a specific path on Docker Hub or in your Docker registry), • the name of the learning algorithm, and names and values of the hyperparameters, • the list of features required by the model, • the list of outputs, their types, and how the outputs should be consumed, • the version and location of the data used to train the model, • the version and location of the validation data used to tune model’s hyperparameters, • the model scoring code that runs the model on new data and outputs the prediction.", "words": [{"w": "•", "b": [0.1538, 0.2177, 0.1681, 0.2326]}, {"w": "the", "b": [0.1774, 0.2177, 0.203, 0.2326]}, {"w": "name", "b": [0.2091, 0.2177, 0.2522, 0.2326]}, {"w": "and", "b": [0.2583, 0.2177, 0.2881, 0.2326]}, {"w": "the", "b": [0.2943, 0.2177, 0.3199, 0.2326]}, {"w": "version", "b": [0.326, 0.2177, 0.3826, 0.2326]}, {"w": "of", "b": [0.3887, 0.2177, 0.4036, 0.2326]}, {"w": "the", "b": [0.4098, 0.2177, 0.4354, 0.2326]}, {"w": "library", "b": [0.4416, 0.2177, 0.4955, 0.2326]}, {"w": "or", "b": [0.5017, 0.2177, 0.5181, 0.2326]}, {"w": "package", "b": [0.5243, 0.2177, 0.5878, 0.2326]}, {"w": "used", "b": [0.594, 0.2177, 0.63, 0.2326]}, {"w": "to", "b": [0.6362, 0.2177, 0.6526, 0.2326]}, {"w": "train", "b": [0.6587, 0.2177, 0.6977, 0.2326]}, {"w": "the", "b": [0.7039, 0.2177, 0.7295, 0.2326]}, {"w": "model,", "b": [0.7357, 0.2177, 0.7895, 0.2326]}, {"w": "•", "b": [0.1538, 0.2356, 0.1681, 0.2506]}, {"w": "if", "b": [0.1774, 0.2358, 0.1879, 0.2506]}, {"w": "Python", "b": [0.1932, 0.2358, 0.2513, 0.2506]}, {"w": "was", "b": [0.2566, 0.2358, 0.2853, 0.2506]}, {"w": "used", "b": [0.2906, 0.2358, 0.3259, 0.2506]}, {"w": "to", "b": [0.3313, 0.2358, 0.3473, 0.2506]}, {"w": "build", "b": [0.3527, 0.2358, 0.3929, 0.2506]}, {"w": "the", "b": [0.3982, 0.2358, 0.4233, 0.2506]}, {"w": "model,", "b": [0.4287, 0.2358, 0.4814, 0.2506]}, {"w": "then", "b": [0.4869, 0.2358, 0.5221, 0.2506]}, {"w": "requirements.txt", "b": [0.5274, 0.2358, 0.6578, 0.2506]}, {"w": "of", "b": [0.6631, 0.2358, 0.6777, 0.2506]}, {"w": "the", "b": [0.683, 0.2358, 0.7081, 0.2506]}, {"w": "virtual", "b": [0.7135, 0.2358, 0.7663, 0.2506]}, {"w": "environment", "b": [0.7716, 0.2358, 0.8696, 0.2506]}, {"w": "used", "b": [0.1774, 0.2536, 0.2133, 0.2685]}, {"w": "to", "b": [0.2194, 0.2536, 0.2358, 0.2685]}, {"w": "build", "b": [0.2419, 0.2536, 0.2828, 0.2685]}, {"w": "the", "b": [0.289, 0.2536, 0.3146, 0.2685]}, {"w": "model", "b": [0.3208, 0.2536, 0.3693, 0.2685]}, {"w": "(or,", "b": [0.3755, 0.2536, 0.4042, 0.2685]}, {"w": "alternatively,", "b": [0.4103, 0.2536, 0.5147, 0.2685]}, {"w": "a", "b": [0.5208, 0.2536, 0.53, 0.2685]}, {"w": "Docker", "b": [0.5362, 0.2536, 0.5922, 0.2685]}, {"w": "image", "b": [0.5984, 0.2536, 0.6454, 0.2685]}, {"w": "name", "b": [0.6516, 0.2536, 0.6945, 0.2685]}, {"w": "pointing", "b": [0.7007, 0.2536, 0.7671, 0.2685]}, {"w": "to", "b": [0.7733, 0.2536, 0.7896, 0.2685]}, {"w": "a", "b": [0.7958, 0.2536, 0.805, 0.2685]}, {"w": "specific", "b": [0.8112, 0.2536, 0.8691, 0.2685]}, {"w": "path", "b": [0.1774, 0.2715, 0.2143, 0.2865]}, {"w": "on", "b": [0.2204, 0.2715, 0.2399, 0.2865]}, {"w": "Docker", "b": [0.2461, 0.2715, 0.3023, 0.2865]}, {"w": "Hub", "b": [0.3084, 0.2715, 0.3428, 0.2865]}, {"w": "or", "b": [0.3489, 0.2715, 0.3654, 0.2865]}, {"w": "in", "b": [0.3715, 0.2715, 0.3869, 0.2865]}, {"w": "your", "b": [0.393, 0.2715, 0.429, 0.2865]}, {"w": "Docker", "b": [0.4351, 0.2715, 0.4913, 0.2865]}, {"w": "registry),", "b": [0.4975, 0.2715, 0.571, 0.2865]}, {"w": "•", "b": [0.1538, 0.2895, 0.1681, 0.3044]}, {"w": "the", "b": [0.1774, 0.2895, 0.203, 0.3044]}, {"w": "name", "b": [0.2091, 0.2895, 0.2522, 0.3044]}, {"w": "of", "b": [0.2583, 0.2895, 0.2732, 0.3044]}, {"w": "the", "b": [0.2794, 0.2895, 0.305, 0.3044]}, {"w": "learning", "b": [0.3112, 0.2895, 0.3758, 0.3044]}, {"w": "algorithm,", "b": [0.382, 0.2895, 0.4651, 0.3044]}, {"w": "and", "b": [0.4712, 0.2895, 0.501, 0.3044]}, {"w": "names", "b": [0.5071, 0.2895, 0.5574, 0.3044]}, {"w": "and", "b": [0.5636, 0.2895, 0.5934, 0.3044]}, {"w": "values", "b": [0.5995, 0.2895, 0.6483, 0.3044]}, {"w": "of", "b": [0.6545, 0.2895, 0.6693, 0.3044]}, {"w": "the", "b": [0.6755, 0.2895, 0.7011, 0.3044]}, {"w": "hyperparameters,", "b": [0.7073, 0.2895, 0.8475, 0.3044]}, {"w": "•", "b": [0.1538, 0.3074, 0.1681, 0.3224]}, {"w": "the", "b": [0.1774, 0.3074, 0.203, 0.3224]}, {"w": "list", "b": [0.2091, 0.3074, 0.2339, 0.3224]}, {"w": "of", "b": [0.24, 0.3074, 0.2549, 0.3224]}, {"w": "features", "b": [0.261, 0.3074, 0.3243, 0.3224]}, {"w": "required", "b": [0.3304, 0.3074, 0.3967, 0.3224]}, {"w": "by", "b": [0.4028, 0.3074, 0.4223, 0.3224]}, {"w": "the", "b": [0.4285, 0.3074, 0.4541, 0.3224]}, {"w": "model,", "b": [0.4603, 0.3074, 0.5141, 0.3224]}, {"w": "•", "b": [0.1538, 0.3254, 0.1681, 0.3403]}, {"w": "the", "b": [0.1774, 0.3254, 0.203, 0.3403]}, {"w": "list", "b": [0.2091, 0.3254, 0.2339, 0.3403]}, {"w": "of", "b": [0.24, 0.3254, 0.2549, 0.3403]}, {"w": "outputs,", "b": [0.261, 0.3254, 0.3278, 0.3403]}, {"w": "their", "b": [0.334, 0.3254, 0.372, 0.3403]}, {"w": "types,", "b": [0.3781, 0.3254, 0.4259, 0.3403]}, {"w": "and", "b": [0.432, 0.3254, 0.4618, 0.3403]}, {"w": "how", "b": [0.4679, 0.3254, 0.5002, 0.3403]}, {"w": "the", "b": [0.5064, 0.3254, 0.532, 0.3403]}, {"w": "outputs", "b": [0.5382, 0.3254, 0.5998, 0.3403]}, {"w": "should", "b": [0.606, 0.3254, 0.6584, 0.3403]}, {"w": "be", "b": [0.6645, 0.3254, 0.6835, 0.3403]}, {"w": "consumed,", "b": [0.6897, 0.3254, 0.7738, 0.3403]}, {"w": "•", "b": [0.1538, 0.3433, 0.1681, 0.3583]}, {"w": "the", "b": [0.1774, 0.3433, 0.203, 0.3583]}, {"w": "version", "b": [0.2091, 0.3433, 0.2657, 0.3583]}, {"w": "and", "b": [0.2719, 0.3433, 0.3016, 0.3583]}, {"w": "location", "b": [0.3078, 0.3433, 0.3718, 0.3583]}, {"w": "of", "b": [0.378, 0.3433, 0.3929, 0.3583]}, {"w": "the", "b": [0.399, 0.3433, 0.4247, 0.3583]}, {"w": "data", "b": [0.4308, 0.3433, 0.4667, 0.3583]}, {"w": "used", "b": [0.4728, 0.3433, 0.5088, 0.3583]}, {"w": "to", "b": [0.515, 0.3433, 0.5314, 0.3583]}, {"w": "train", "b": [0.5375, 0.3433, 0.5766, 0.3583]}, {"w": "the", "b": [0.5827, 0.3433, 0.6084, 0.3583]}, {"w": "model,", "b": [0.6145, 0.3433, 0.6683, 0.3583]}, {"w": "•", "b": [0.1538, 0.3613, 0.1681, 0.3762]}, {"w": "the", "b": [0.1774, 0.3613, 0.203, 0.3762]}, {"w": "version", "b": [0.2091, 0.3613, 0.2656, 0.3762]}, {"w": "and", "b": [0.2717, 0.3613, 0.3014, 0.3762]}, {"w": "location", "b": [0.3075, 0.3613, 0.3715, 0.3762]}, {"w": "of", "b": [0.3776, 0.3613, 0.3925, 0.3762]}, {"w": "the", "b": [0.3986, 0.3613, 0.4242, 0.3762]}, {"w": "validation", "b": [0.4304, 0.3613, 0.5097, 0.3762]}, {"w": "data", "b": [0.5158, 0.3613, 0.5516, 0.3762]}, {"w": "used", "b": [0.5578, 0.3613, 0.5937, 0.3762]}, {"w": "to", "b": [0.5999, 0.3613, 0.6162, 0.3762]}, {"w": "tune", "b": [0.6224, 0.3613, 0.6582, 0.3762]}, {"w": "model’s", "b": [0.6644, 0.3613, 0.7254, 0.3762]}, {"w": "hyperparameters,", "b": [0.7315, 0.3613, 0.8715, 0.3762]}, {"w": "•", "b": [0.1538, 0.3792, 0.1681, 0.3942]}, {"w": "the", "b": [0.1774, 0.3792, 0.203, 0.3942]}, {"w": "model", "b": [0.2091, 0.3792, 0.2579, 0.3942]}, {"w": "scoring", "b": [0.264, 0.3792, 0.3206, 0.3942]}, {"w": "code", "b": [0.3267, 0.3792, 0.3631, 0.3942]}, {"w": "that", "b": [0.3693, 0.3792, 0.4031, 0.3942]}, {"w": "runs", "b": [0.4093, 0.3792, 0.4443, 0.3942]}, {"w": "the", "b": [0.4504, 0.3792, 0.4761, 0.3942]}, {"w": "model", "b": [0.4822, 0.3792, 0.5309, 0.3942]}, {"w": "on", "b": [0.5371, 0.3792, 0.5566, 0.3942]}, {"w": "new", "b": [0.5627, 0.3792, 0.5945, 0.3942]}, {"w": "data", "b": [0.6007, 0.3792, 0.6365, 0.3942]}, {"w": "and", "b": [0.6427, 0.3792, 0.6724, 0.3942]}, {"w": "outputs", "b": [0.6786, 0.3792, 0.7402, 0.3942]}, {"w": "the", "b": [0.7464, 0.3792, 0.772, 0.3942]}, {"w": "prediction.", "b": [0.7781, 0.3792, 0.8644, 0.3942]}]}, {"id": "b_4", "type": "paragraph", "text": "The metadata and the scoring code may be saved to a database or to a JSON/XML text file.", "words": [{"w": "The", "b": [0.1306, 0.4062, 0.1617, 0.4211]}, {"w": "metadata", "b": [0.1678, 0.4062, 0.2422, 0.4211]}, {"w": "and", "b": [0.2483, 0.4062, 0.2774, 0.4211]}, {"w": "the", "b": [0.2835, 0.4062, 0.3086, 0.4211]}, {"w": "scoring", "b": [0.3147, 0.4062, 0.3701, 0.4211]}, {"w": "code", "b": [0.3762, 0.4062, 0.4119, 0.4211]}, {"w": "may", "b": [0.418, 0.4062, 0.4511, 0.4211]}, {"w": "be", "b": [0.4572, 0.4062, 0.4758, 0.4211]}, {"w": "saved", "b": [0.4819, 0.4062, 0.5247, 0.4211]}, {"w": "to", "b": [0.5308, 0.4062, 0.5469, 0.4211]}, {"w": "a", "b": [0.553, 0.4062, 0.562, 0.4211]}, {"w": "database", "b": [0.5681, 0.4062, 0.6376, 0.4211]}, {"w": "or", "b": [0.6437, 0.4062, 0.6598, 0.4211]}, {"w": "to", "b": [0.6659, 0.4062, 0.6819, 0.4211]}, {"w": "a", "b": [0.688, 0.4062, 0.6971, 0.4211]}, {"w": "JSON/XML", "b": [0.7032, 0.4062, 0.8006, 0.4211]}, {"w": "text", "b": [0.8067, 0.4062, 0.8384, 0.4211]}, {"w": "file.", "b": [0.8445, 0.4062, 0.8726, 0.4211]}]}, {"id": "b_5", "type": "paragraph", "text": "For audit purposes, the following information must also accompany each deployment:", "words": [{"w": "For", "b": [0.1312, 0.433, 0.1582, 0.448]}, {"w": "audit", "b": [0.1643, 0.433, 0.2064, 0.448]}, {"w": "purposes,", "b": [0.2125, 0.433, 0.2882, 0.448]}, {"w": "the", "b": [0.2943, 0.433, 0.32, 0.448]}, {"w": "following", "b": [0.3261, 0.433, 0.3979, 0.448]}, {"w": "information", "b": [0.4041, 0.433, 0.4979, 0.448]}, {"w": "must", "b": [0.5041, 0.433, 0.5436, 0.448]}, {"w": "also", "b": [0.5498, 0.433, 0.5807, 0.448]}, {"w": "accompany", "b": [0.5868, 0.433, 0.676, 0.448]}, {"w": "each", "b": [0.6822, 0.433, 0.7176, 0.448]}, {"w": "deployment:", "b": [0.7237, 0.433, 0.8216, 0.448]}]}, {"id": "b_6", "type": "paragraph", "text": "• who built the model and when, • who and when made the decision of deploying that model, and based on what grounds, • who reviewed the model for privacy and security compliance purposes.", "words": [{"w": "•", "b": [0.1538, 0.46, 0.1681, 0.4749]}, {"w": "who", "b": [0.1774, 0.46, 0.2102, 0.4749]}, {"w": "built", "b": [0.2163, 0.46, 0.2543, 0.4749]}, {"w": "the", "b": [0.2604, 0.46, 0.286, 0.4749]}, {"w": "model", "b": [0.2922, 0.46, 0.3409, 0.4749]}, {"w": "and", "b": [0.3471, 0.46, 0.3768, 0.4749]}, {"w": "when,", "b": [0.3829, 0.46, 0.4301, 0.4749]}, {"w": "•", "b": [0.1538, 0.4779, 0.1681, 0.4929]}, {"w": "who", "b": [0.1774, 0.478, 0.2095, 0.4928]}, {"w": "and", "b": [0.2157, 0.478, 0.2449, 0.4928]}, {"w": "when", "b": [0.251, 0.478, 0.2922, 0.4928]}, {"w": "made", "b": [0.2984, 0.478, 0.3406, 0.4928]}, {"w": "the", "b": [0.3468, 0.478, 0.372, 0.4928]}, {"w": "decision", "b": [0.3781, 0.478, 0.4406, 0.4928]}, {"w": "of", "b": [0.4467, 0.478, 0.4613, 0.4928]}, {"w": "deploying", "b": [0.4675, 0.478, 0.5429, 0.4928]}, {"w": "that", "b": [0.5491, 0.478, 0.5823, 0.4928]}, {"w": "model,", "b": [0.5884, 0.478, 0.6412, 0.4928]}, {"w": "and", "b": [0.6474, 0.478, 0.6766, 0.4928]}, {"w": "based", "b": [0.6827, 0.478, 0.7271, 0.4928]}, {"w": "on", "b": [0.7332, 0.478, 0.7523, 0.4928]}, {"w": "what", "b": [0.7585, 0.478, 0.7977, 0.4928]}, {"w": "grounds,", "b": [0.8038, 0.478, 0.8714, 0.4928]}, {"w": "•", "b": [0.1538, 0.4959, 0.1681, 0.5108]}, {"w": "who", "b": [0.1774, 0.4959, 0.2102, 0.5108]}, {"w": "reviewed", "b": [0.2163, 0.4959, 0.2861, 0.5108]}, {"w": "the", "b": [0.2923, 0.4959, 0.3179, 0.5108]}, {"w": "model", "b": [0.324, 0.4959, 0.3728, 0.5108]}, {"w": "for", "b": [0.3789, 0.4959, 0.401, 0.5108]}, {"w": "privacy", "b": [0.4071, 0.4959, 0.4656, 0.5108]}, {"w": "and", "b": [0.4718, 0.4959, 0.5015, 0.5108]}, {"w": "security", "b": [0.5077, 0.4959, 0.5704, 0.5108]}, {"w": "compliance", "b": [0.5766, 0.4959, 0.6658, 0.5108]}, {"w": "purposes.", "b": [0.6719, 0.4959, 0.7476, 0.5108]}]}, {"id": "b_7", "type": "paragraph", "text": "8.6 Model Deployment Best Practices", "words": [{"w": "8.6", "b": [0.1312, 0.5444, 0.1631, 0.5623]}, {"w": "Model", "b": [0.188, 0.5444, 0.2569, 0.5623]}, {"w": "Deployment", "b": [0.2652, 0.5444, 0.3963, 0.5623]}, {"w": "Best", "b": [0.4046, 0.5444, 0.4532, 0.5623]}, {"w": "Practices", "b": [0.4615, 0.5444, 0.5608, 0.5623]}]}, {"id": "b_8", "type": "paragraph", "text": "In this section, we discuss practical aspects of deploying machine learning systems in produc- tion. We also outline several useful and practical tips for model deployment.", "words": [{"w": "In", "b": [0.1312, 0.5834, 0.1478, 0.5982]}, {"w": "this", "b": [0.154, 0.5834, 0.1832, 0.5982]}, {"w": "section,", "b": [0.1894, 0.5834, 0.2488, 0.5982]}, {"w": "we", "b": [0.2549, 0.5834, 0.2755, 0.5982]}, {"w": "discuss", "b": [0.2817, 0.5834, 0.3363, 0.5982]}, {"w": "practical", "b": [0.3424, 0.5834, 0.4108, 0.5982]}, {"w": "aspects", "b": [0.417, 0.5834, 0.474, 0.5982]}, {"w": "of", "b": [0.4802, 0.5834, 0.4947, 0.5982]}, {"w": "deploying", "b": [0.5009, 0.5834, 0.5762, 0.5982]}, {"w": "machine", "b": [0.5824, 0.5834, 0.6472, 0.5982]}, {"w": "learning", "b": [0.6534, 0.5834, 0.7167, 0.5982]}, {"w": "systems", "b": [0.7229, 0.5834, 0.784, 0.5982]}, {"w": "in", "b": [0.7902, 0.5834, 0.8052, 0.5982]}, {"w": "produc-", "b": [0.8114, 0.5834, 0.8723, 0.5982]}, {"w": "tion.", "b": [0.1312, 0.6012, 0.1682, 0.6162]}, {"w": "We", "b": [0.1763, 0.6012, 0.202, 0.6162]}, {"w": "also", "b": [0.2081, 0.6012, 0.239, 0.6162]}, {"w": "outline", "b": [0.2452, 0.6012, 0.3005, 0.6162]}, {"w": "several", "b": [0.3067, 0.6012, 0.3612, 0.6162]}, {"w": "useful", "b": [0.3673, 0.6012, 0.4141, 0.6162]}, {"w": "and", "b": [0.4203, 0.6012, 0.45, 0.6162]}, {"w": "practical", "b": [0.4562, 0.6012, 0.526, 0.6162]}, {"w": "tips", "b": [0.5321, 0.6012, 0.5619, 0.6162]}, {"w": "for", "b": [0.5681, 0.6012, 0.5902, 0.6162]}, {"w": "model", "b": [0.5964, 0.6012, 0.6451, 0.6162]}, {"w": "deployment.", "b": [0.6512, 0.6012, 0.7491, 0.6162]}]}, {"id": "b_9", "type": "paragraph", "text": "8.6.1 Algorithmic Efficiency", "words": [{"w": "8.6.1", "b": [0.1312, 0.6491, 0.1749, 0.664]}, {"w": "Algorithmic", "b": [0.1961, 0.6491, 0.3069, 0.664]}, {"w": "Efficiency", "b": [0.314, 0.6491, 0.4031, 0.664]}]}, {"id": "b_10", "type": "paragraph", "text": "Most data analysts work in Python or R. While there are web frameworks that allow building web services in those two languages, they are not considered the most efficient languages.", "words": [{"w": "Most", "b": [0.1312, 0.6858, 0.171, 0.7006]}, {"w": "data", "b": [0.1766, 0.6858, 0.2117, 0.7006]}, {"w": "analysts", "b": [0.2173, 0.6858, 0.2813, 0.7006]}, {"w": "work", "b": [0.2868, 0.6858, 0.325, 0.7006]}, {"w": "in", "b": [0.3306, 0.6858, 0.3456, 0.7006]}, {"w": "Python", "b": [0.3512, 0.6858, 0.4092, 0.7006]}, {"w": "or", "b": [0.4147, 0.6858, 0.4309, 0.7006]}, {"w": "R.", "b": [0.4364, 0.6858, 0.4547, 0.7006]}, {"w": "While", "b": [0.4602, 0.6858, 0.507, 0.7006]}, {"w": "there", "b": [0.5125, 0.6858, 0.5528, 0.7006]}, {"w": "are", "b": [0.5583, 0.6858, 0.5825, 0.7006]}, {"w": "web", "b": [0.588, 0.6858, 0.6186, 0.7006]}, {"w": "frameworks", "b": [0.6242, 0.6858, 0.7143, 0.7006]}, {"w": "that", "b": [0.7198, 0.6858, 0.753, 0.7006]}, {"w": "allow", "b": [0.7585, 0.6858, 0.7992, 0.7006]}, {"w": "building", "b": [0.8047, 0.6858, 0.8691, 0.7006]}, {"w": "web", "b": [0.1306, 0.7036, 0.1618, 0.7186]}, {"w": "services", "b": [0.168, 0.7036, 0.2293, 0.7186]}, {"w": "in", "b": [0.2355, 0.7036, 0.2508, 0.7186]}, {"w": "those", "b": [0.257, 0.7036, 0.2991, 0.7186]}, {"w": "two", "b": [0.3053, 0.7036, 0.334, 0.7186]}, {"w": "languages,", "b": [0.3401, 0.7036, 0.4233, 0.7186]}, {"w": "they", "b": [0.4294, 0.7036, 0.4648, 0.7186]}, {"w": "are", "b": [0.471, 0.7036, 0.4956, 0.7186]}, {"w": "not", "b": [0.5018, 0.7036, 0.5284, 0.7186]}, {"w": "considered", "b": [0.5346, 0.7036, 0.6189, 0.7186]}, {"w": "the", "b": [0.625, 0.7036, 0.6507, 0.7186]}, {"w": "most", "b": [0.6568, 0.7036, 0.6959, 0.7186]}, {"w": "efficient", "b": [0.702, 0.7036, 0.7641, 0.7186]}, {"w": "languages.", "b": [0.7702, 0.7036, 0.8534, 0.7186]}]}, {"id": "b_11", "type": "paragraph", "text": "Indeed, when you use scientific packages in Python, much of their code was written in efficient C or C++, and then compiled for your specific operating system. However, your own data preprocessing, feature extraction, and scoring code may not be as efficient.", "words": [{"w": "Indeed,", "b": [0.1312, 0.7306, 0.189, 0.7454]}, {"w": "when", "b": [0.1944, 0.7306, 0.2356, 0.7454]}, {"w": "you", "b": [0.2409, 0.7306, 0.269, 0.7454]}, {"w": "use", "b": [0.2742, 0.7306, 0.2995, 0.7454]}, {"w": "scientific", "b": [0.3047, 0.7306, 0.3727, 0.7454]}, {"w": "packages", "b": [0.3779, 0.7306, 0.4473, 0.7454]}, {"w": "in", "b": [0.4526, 0.7306, 0.4677, 0.7454]}, {"w": "Python,", "b": [0.4729, 0.7306, 0.536, 0.7454]}, {"w": "much", "b": [0.5414, 0.7306, 0.5836, 0.7454]}, {"w": "of", "b": [0.5888, 0.7306, 0.6034, 0.7454]}, {"w": "their", "b": [0.6086, 0.7306, 0.6459, 0.7454]}, {"w": "code", "b": [0.6511, 0.7306, 0.6868, 0.7454]}, {"w": "was", "b": [0.692, 0.7306, 0.7207, 0.7454]}, {"w": "written", "b": [0.726, 0.7306, 0.7833, 0.7454]}, {"w": "in", "b": [0.7885, 0.7306, 0.8036, 0.7454]}, {"w": "efficient", "b": [0.8089, 0.7306, 0.8697, 0.7454]}, {"w": "C", "b": [0.1312, 0.7484, 0.1447, 0.7634]}, {"w": "or", "b": [0.1508, 0.7484, 0.1674, 0.7634]}, {"w": "C++,", "b": [0.1735, 0.7484, 0.2211, 0.7634]}, {"w": "and", "b": [0.2272, 0.7484, 0.2572, 0.7634]}, {"w": "then", "b": [0.2633, 0.7484, 0.2995, 0.7634]}, {"w": "compiled", "b": [0.3057, 0.7484, 0.378, 0.7634]}, {"w": "for", "b": [0.3842, 0.7484, 0.4064, 0.7634]}, {"w": "your", "b": [0.4126, 0.7484, 0.4488, 0.7634]}, {"w": "specific", "b": [0.455, 0.7484, 0.5135, 0.7634]}, {"w": "operating", "b": [0.5196, 0.7484, 0.5967, 0.7634]}, {"w": "system.", "b": [0.6028, 0.7484, 0.6635, 0.7634]}, {"w": "However,", "b": [0.6717, 0.7484, 0.7457, 0.7634]}, {"w": "your", "b": [0.7518, 0.7484, 0.7881, 0.7634]}, {"w": "own", "b": [0.7942, 0.7484, 0.8268, 0.7634]}, {"w": "data", "b": [0.8329, 0.7484, 0.8691, 0.7634]}, {"w": "preprocessing,", "b": [0.1312, 0.7664, 0.2449, 0.7814]}, {"w": "feature", "b": [0.251, 0.7664, 0.307, 0.7814]}, {"w": "extraction,", "b": [0.3131, 0.7664, 0.3999, 0.7814]}, {"w": "and", "b": [0.406, 0.7664, 0.4357, 0.7814]}, {"w": "scoring", "b": [0.4419, 0.7664, 0.4984, 0.7814]}, {"w": "code", "b": [0.5046, 0.7664, 0.541, 0.7814]}, {"w": "may", "b": [0.5472, 0.7664, 0.581, 0.7814]}, {"w": "not", "b": [0.5871, 0.7664, 0.6138, 0.7814]}, {"w": "be", "b": [0.6199, 0.7664, 0.6389, 0.7814]}, {"w": "as", "b": [0.6451, 0.7664, 0.6616, 0.7814]}, {"w": "efficient.", "b": [0.6677, 0.7664, 0.7349, 0.7814]}]}, {"id": "b_12", "type": "paragraph", "text": "Furthermore, not all algorithms are practical. While some algorithms can quickly solve the problem, others are too slow. For some problems, no fast algorithms can exist.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.7933, 0.2376, 0.8083]}, {"w": "not", "b": [0.2438, 0.7933, 0.2705, 0.8083]}, {"w": "all", "b": [0.2766, 0.7933, 0.2962, 0.8083]}, {"w": "algorithms", "b": [0.3023, 0.7933, 0.3879, 0.8083]}, {"w": "are", "b": [0.394, 0.7933, 0.4188, 0.8083]}, {"w": "practical.", "b": [0.4249, 0.7933, 0.5, 0.8083]}, {"w": "While", "b": [0.5083, 0.7933, 0.5561, 0.8083]}, {"w": "some", "b": [0.5623, 0.7933, 0.6025, 0.8083]}, {"w": "algorithms", "b": [0.6087, 0.7933, 0.6941, 0.8083]}, {"w": "can", "b": [0.7003, 0.7933, 0.7281, 0.8083]}, {"w": "quickly", "b": [0.7342, 0.7933, 0.7918, 0.8083]}, {"w": "solve", "b": [0.798, 0.7933, 0.8372, 0.8083]}, {"w": "the", "b": [0.8434, 0.7933, 0.8691, 0.8083]}, {"w": "problem,", "b": [0.1312, 0.8113, 0.202, 0.8262]}, {"w": "others", "b": [0.2082, 0.8113, 0.2576, 0.8262]}, {"w": "are", "b": [0.2637, 0.8113, 0.2884, 0.8262]}, {"w": "too", "b": [0.2945, 0.8113, 0.3207, 0.8262]}, {"w": "slow.", "b": [0.3268, 0.8113, 0.3664, 0.8262]}, {"w": "For", "b": [0.3746, 0.8113, 0.4016, 0.8262]}, {"w": "some", "b": [0.4077, 0.8113, 0.4478, 0.8262]}, {"w": "problems,", "b": [0.4539, 0.8113, 0.532, 0.8262]}, {"w": "no", "b": [0.5382, 0.8113, 0.5577, 0.8262]}, {"w": "fast", "b": [0.5638, 0.8113, 0.5932, 0.8262]}, {"w": "algorithms", "b": [0.5993, 0.8113, 0.6846, 0.8262]}, {"w": "can", "b": [0.6907, 0.8113, 0.7184, 0.8262]}, {"w": "exist.", "b": [0.7245, 0.8113, 0.7672, 0.8262]}]}, {"id": "b_13", "type": "paragraph", "text": "The subfield of computer science called analysis of algorithms is concerned with determining and comparing the complexity of algorithms. The big O notation is used to classify", "words": [{"w": "The", "b": [0.1306, 0.8383, 0.1617, 0.8531]}, {"w": "subfield", "b": [0.1658, 0.8383, 0.2262, 0.8531]}, {"w": "of", "b": [0.2304, 0.8383, 0.2449, 0.8531]}, {"w": "computer", "b": [0.2491, 0.8383, 0.3235, 0.8531]}, {"w": "science", "b": [0.3276, 0.8383, 0.382, 0.8531]}, {"w": "called", "b": [0.3861, 0.8383, 0.4314, 0.8531]}, {"w": "analysis", "b": [0.4353, 0.8382, 0.5074, 0.8532]}, {"w": "of", "b": [0.5122, 0.8382, 0.5293, 0.8532]}, {"w": "algorithms", "b": [0.534, 0.8382, 0.6322, 0.8532]}, {"w": "is", "b": [0.6362, 0.8383, 0.6484, 0.8531]}, {"w": "concerned", "b": [0.6525, 0.8383, 0.731, 0.8531]}, {"w": "with", "b": [0.7351, 0.8383, 0.7703, 0.8531]}, {"w": "determining", "b": [0.7744, 0.8383, 0.8689, 0.8531]}, {"w": "and", "b": [0.1312, 0.856, 0.1616, 0.8711]}, {"w": "comparing", "b": [0.1701, 0.856, 0.2559, 0.8711]}, {"w": "the", "b": [0.2644, 0.856, 0.2906, 0.8711]}, {"w": "complexity", "b": [0.2991, 0.856, 0.3886, 0.8711]}, {"w": "of", "b": [0.3971, 0.856, 0.4122, 0.8711]}, {"w": "algorithms.", "b": [0.4208, 0.856, 0.513, 0.8711]}, {"w": "The", "b": [0.5283, 0.856, 0.5607, 0.8711]}, {"w": "big", "b": [0.5691, 0.8562, 0.5974, 0.8711]}, {"w": "O", "b": [0.6072, 0.8562, 0.6232, 0.8711]}, {"w": "notation", "b": [0.6329, 0.8562, 0.7105, 0.8711]}, {"w": "is", "b": [0.719, 0.856, 0.7317, 0.8711]}, {"w": "used", "b": [0.7402, 0.856, 0.777, 0.8711]}, {"w": "to", "b": [0.7855, 0.856, 0.8022, 0.8711]}, {"w": "classify", "b": [0.8107, 0.856, 0.8695, 0.8711]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 15", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "15", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 255, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "algorithms, according to how their running time or space requirements grow, as the input size grows.", "words": [{"w": "algorithms,", "b": [0.1312, 0.0883, 0.2234, 0.1034]}, {"w": "according", "b": [0.2296, 0.0883, 0.3081, 0.1034]}, {"w": "to", "b": [0.3143, 0.0883, 0.3311, 0.1034]}, {"w": "how", "b": [0.3373, 0.0883, 0.3702, 0.1034]}, {"w": "their", "b": [0.3764, 0.0883, 0.4152, 0.1034]}, {"w": "running", "b": [0.4214, 0.0883, 0.4852, 0.1034]}, {"w": "time", "b": [0.4914, 0.0883, 0.528, 0.1034]}, {"w": "or", "b": [0.5342, 0.0883, 0.551, 0.1034]}, {"w": "space", "b": [0.5572, 0.0883, 0.6013, 0.1034]}, {"w": "requirements", "b": [0.6075, 0.0883, 0.7134, 0.1034]}, {"w": "grow,", "b": [0.7195, 0.0883, 0.7641, 0.1034]}, {"w": "as", "b": [0.7703, 0.0883, 0.7871, 0.1034]}, {"w": "the", "b": [0.7933, 0.0883, 0.8195, 0.1034]}, {"w": "input", "b": [0.8256, 0.0883, 0.8696, 0.1034]}, {"w": "size", "b": [0.1312, 0.1063, 0.1601, 0.1213]}, {"w": "grows.", "b": [0.1662, 0.1063, 0.2171, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "For example, let’s say we have the problem of finding the two most distant one-dimensional examples in the set of examples S of size N. One Python algorithm we could craft would look like this:", "words": [{"w": "For", "b": [0.1312, 0.1333, 0.1581, 0.1482]}, {"w": "example,", "b": [0.1642, 0.1333, 0.2352, 0.1482]}, {"w": "let’s", "b": [0.2413, 0.1333, 0.2741, 0.1482]}, {"w": "say", "b": [0.2803, 0.1333, 0.3059, 0.1482]}, {"w": "we", "b": [0.312, 0.1333, 0.333, 0.1482]}, {"w": "have", "b": [0.3391, 0.1333, 0.3754, 0.1482]}, {"w": "the", "b": [0.3815, 0.1333, 0.407, 0.1482]}, {"w": "problem", "b": [0.4132, 0.1333, 0.4786, 0.1482]}, {"w": "of", "b": [0.4847, 0.1333, 0.4995, 0.1482]}, {"w": "finding", "b": [0.5057, 0.1333, 0.5608, 0.1482]}, {"w": "the", "b": [0.567, 0.1333, 0.5925, 0.1482]}, {"w": "two", "b": [0.5986, 0.1333, 0.6272, 0.1482]}, {"w": "most", "b": [0.6333, 0.1333, 0.6722, 0.1482]}, {"w": "distant", "b": [0.6784, 0.1333, 0.7342, 0.1482]}, {"w": "one-dimensional", "b": [0.7403, 0.1333, 0.8691, 0.1482]}, {"w": "examples", "b": [0.1312, 0.1511, 0.2061, 0.1662]}, {"w": "in", "b": [0.2124, 0.1511, 0.2281, 0.1662]}, {"w": "the", "b": [0.2344, 0.1511, 0.2606, 0.1662]}, {"w": "set", "b": [0.2669, 0.1511, 0.29, 0.1662]}, {"w": "of", "b": [0.2963, 0.1511, 0.3115, 0.1662]}, {"w": "examples", "b": [0.3177, 0.1511, 0.3926, 0.1662]}, {"w": "S", "b": [0.3988, 0.151, 0.41, 0.166]}, {"w": "of", "b": [0.4176, 0.1511, 0.4328, 0.1662]}, {"w": "size", "b": [0.4391, 0.1511, 0.4685, 0.1662]}, {"w": "N.", "b": [0.4748, 0.1511, 0.4968, 0.1662]}, {"w": "One", "b": [0.5055, 0.1511, 0.539, 0.1662]}, {"w": "Python", "b": [0.5452, 0.1511, 0.6056, 0.1662]}, {"w": "algorithm", "b": [0.612, 0.1511, 0.6915, 0.1662]}, {"w": "we", "b": [0.6978, 0.1511, 0.7192, 0.1662]}, {"w": "could", "b": [0.7255, 0.1511, 0.7694, 0.1662]}, {"w": "craft", "b": [0.7757, 0.1511, 0.814, 0.1662]}, {"w": "would", "b": [0.8203, 0.1511, 0.8689, 0.1662]}, {"w": "look", "b": [0.1312, 0.1692, 0.1651, 0.1841]}, {"w": "like", "b": [0.1712, 0.1692, 0.1989, 0.1841]}, {"w": "this:", "b": [0.2051, 0.1692, 0.24, 0.1841]}]}, {"id": "b_2", "type": "equation", "text": "1 def find_max_distance(S):", "words": [{"w": "1", "b": [0.1028, 0.2019, 0.1091, 0.2094]}, {"w": "def", "b": [0.1312, 0.1968, 0.1603, 0.2117]}, {"w": "find_max_distance(S):", "b": [0.17, 0.1958, 0.3734, 0.2107]}]}, {"id": "b_3", "type": "equation", "text": "2 result = None", "words": [{"w": "2", "b": [0.1028, 0.2199, 0.1091, 0.2273]}, {"w": "result", "b": [0.17, 0.2137, 0.2281, 0.2287]}, {"w": "=", "b": [0.2378, 0.2137, 0.2475, 0.2287]}, {"w": "None", "b": [0.2572, 0.2137, 0.2959, 0.2287]}]}, {"id": "b_4", "type": "equation", "text": "3 max_distance = 0", "words": [{"w": "3", "b": [0.1028, 0.2378, 0.1091, 0.2453]}, {"w": "max_distance", "b": [0.17, 0.2317, 0.2862, 0.2466]}, {"w": "=", "b": [0.2959, 0.2317, 0.3056, 0.2466]}, {"w": "0", "b": [0.3153, 0.2317, 0.325, 0.2466]}]}, {"id": "b_5", "type": "paragraph", "text": "4 for x1 in S:", "words": [{"w": "4", "b": [0.1028, 0.2557, 0.1091, 0.2632]}, {"w": "for", "b": [0.17, 0.2506, 0.199, 0.2656]}, {"w": "x1", "b": [0.2087, 0.2496, 0.2281, 0.2646]}, {"w": "in", "b": [0.2378, 0.2506, 0.2571, 0.2656]}, {"w": "S:", "b": [0.2668, 0.2496, 0.2862, 0.2646]}]}, {"id": "b_6", "type": "paragraph", "text": "5 for x2 in S:", "words": [{"w": "5", "b": [0.1028, 0.2737, 0.1091, 0.2812]}, {"w": "for", "b": [0.2087, 0.2685, 0.2378, 0.2835]}, {"w": "x2", "b": [0.2475, 0.2676, 0.2668, 0.2825]}, {"w": "in", "b": [0.2765, 0.2685, 0.2959, 0.2835]}, {"w": "S:", "b": [0.3056, 0.2676, 0.325, 0.2825]}]}, {"id": "b_7", "type": "equation", "text": "6 if abs(x1 - x2) >= max_distance:", "words": [{"w": "6", "b": [0.1028, 0.2916, 0.1091, 0.2991]}, {"w": "if", "b": [0.2475, 0.2865, 0.2668, 0.3015]}, {"w": "abs(x1", "b": [0.2765, 0.2855, 0.3346, 0.3005]}, {"w": "-", "b": [0.3443, 0.2855, 0.354, 0.3005]}, {"w": "x2)", "b": [0.3637, 0.2855, 0.3928, 0.3005]}, {"w": ">=", "b": [0.4024, 0.2855, 0.4218, 0.3005]}, {"w": "max_distance:", "b": [0.4315, 0.2855, 0.5574, 0.3005]}]}, {"id": "b_8", "type": "equation", "text": "7 max_distance = abs(x1 - x2)", "words": [{"w": "7", "b": [0.1028, 0.3096, 0.1091, 0.3171]}, {"w": "max_distance", "b": [0.2862, 0.3035, 0.4024, 0.3184]}, {"w": "=", "b": [0.4121, 0.3035, 0.4218, 0.3184]}, {"w": "abs(x1", "b": [0.4315, 0.3035, 0.4896, 0.3184]}, {"w": "-", "b": [0.4993, 0.3035, 0.509, 0.3184]}, {"w": "x2)", "b": [0.5187, 0.3035, 0.5477, 0.3184]}]}, {"id": "b_9", "type": "equation", "text": "8 result = (x1, x2)", "words": [{"w": "8", "b": [0.1028, 0.3275, 0.1091, 0.335]}, {"w": "result", "b": [0.2862, 0.3214, 0.3443, 0.3364]}, {"w": "=", "b": [0.354, 0.3214, 0.3637, 0.3364]}, {"w": "(x1,", "b": [0.3734, 0.3214, 0.4121, 0.3364]}, {"w": "x2)", "b": [0.4218, 0.3214, 0.4509, 0.3364]}]}, {"id": "b_10", "type": "paragraph", "text": "9 return result", "words": [{"w": "9", "b": [0.1028, 0.3455, 0.1091, 0.353]}, {"w": "return", "b": [0.17, 0.3403, 0.2281, 0.3553]}, {"w": "result", "b": [0.2378, 0.3394, 0.2959, 0.3543]}]}, {"id": "b_11", "type": "paragraph", "text": "or, like this in R:", "words": [{"w": "or,", "b": [0.1312, 0.3666, 0.1528, 0.3815]}, {"w": "like", "b": [0.159, 0.3666, 0.1867, 0.3815]}, {"w": "this", "b": [0.1928, 0.3666, 0.2227, 0.3815]}, {"w": "in", "b": [0.2288, 0.3666, 0.2442, 0.3815]}, {"w": "R:", "b": [0.2503, 0.3666, 0.269, 0.3815]}]}, {"id": "b_12", "type": "equation", "text": "1 find_max_distance <- function(S) {", "words": [{"w": "1", "b": [0.1028, 0.3993, 0.1091, 0.4068]}, {"w": "find_max_distance", "b": [0.1312, 0.3932, 0.2959, 0.4082]}, {"w": "<-", "b": [0.3056, 0.3932, 0.325, 0.4082]}, {"w": "function(S)", "b": [0.3346, 0.3932, 0.4412, 0.4091]}, {"w": "{", "b": [0.4509, 0.3932, 0.4606, 0.4082]}]}, {"id": "b_13", "type": "equation", "text": "2 result <- NULL", "words": [{"w": "2", "b": [0.1028, 0.4173, 0.1091, 0.4247]}, {"w": "result", "b": [0.17, 0.4111, 0.2281, 0.4261]}, {"w": "<-", "b": [0.2378, 0.4111, 0.2572, 0.4261]}, {"w": "NULL", "b": [0.2668, 0.4111, 0.3056, 0.4261]}]}, {"id": "b_14", "type": "equation", "text": "3 max_distance <- 0", "words": [{"w": "3", "b": [0.1028, 0.4352, 0.1091, 0.4427]}, {"w": "max_distance", "b": [0.17, 0.4291, 0.2862, 0.444]}, {"w": "<-", "b": [0.2959, 0.4291, 0.3153, 0.444]}, {"w": "0", "b": [0.325, 0.4291, 0.3346, 0.444]}]}, {"id": "b_15", "type": "equation", "text": "4 for (x1 in S) {", "words": [{"w": "4", "b": [0.1028, 0.4532, 0.1091, 0.4606]}, {"w": "for", "b": [0.17, 0.448, 0.199, 0.463]}, {"w": "(x1", "b": [0.2087, 0.447, 0.2378, 0.462]}, {"w": "in", "b": [0.2475, 0.448, 0.2668, 0.463]}, {"w": "S)", "b": [0.2765, 0.447, 0.2959, 0.462]}, {"w": "{", "b": [0.3056, 0.447, 0.3153, 0.462]}]}, {"id": "b_16", "type": "equation", "text": "5 for (x2 in S) {", "words": [{"w": "5", "b": [0.1028, 0.4711, 0.1091, 0.4786]}, {"w": "for", "b": [0.2087, 0.466, 0.2378, 0.4809]}, {"w": "(x2", "b": [0.2475, 0.465, 0.2765, 0.4799]}, {"w": "in", "b": [0.2862, 0.466, 0.3056, 0.4809]}, {"w": "S)", "b": [0.3153, 0.465, 0.3346, 0.4799]}, {"w": "{", "b": [0.3443, 0.465, 0.354, 0.4799]}]}, {"id": "b_17", "type": "equation", "text": "6 if (abs(x1 - x2) >= max_distance) {", "words": [{"w": "6", "b": [0.1028, 0.4891, 0.1091, 0.4965]}, {"w": "if", "b": [0.2475, 0.4839, 0.2668, 0.4989]}, {"w": "(abs(x1", "b": [0.2765, 0.4829, 0.3443, 0.4989]}, {"w": "-", "b": [0.354, 0.4829, 0.3637, 0.4979]}, {"w": "x2)", "b": [0.3734, 0.4829, 0.4024, 0.4979]}, {"w": ">=", "b": [0.4121, 0.4829, 0.4315, 0.4979]}, {"w": "max_distance)", "b": [0.4412, 0.4829, 0.5671, 0.4979]}, {"w": "{", "b": [0.5768, 0.4829, 0.5865, 0.4979]}]}, {"id": "b_18", "type": "equation", "text": "7 max_distance <- abs(x1 - x2)", "words": [{"w": "7", "b": [0.1028, 0.507, 0.1091, 0.5145]}, {"w": "max_distance", "b": [0.2862, 0.5009, 0.4024, 0.5158]}, {"w": "<-", "b": [0.4121, 0.5009, 0.4315, 0.5158]}, {"w": "abs(x1", "b": [0.4412, 0.5009, 0.4993, 0.5168]}, {"w": "-", "b": [0.509, 0.5009, 0.5187, 0.5158]}, {"w": "x2)", "b": [0.5284, 0.5009, 0.5574, 0.5158]}]}, {"id": "b_19", "type": "equation", "text": "8 result <- c(x1, x2)", "words": [{"w": "8", "b": [0.1028, 0.525, 0.1091, 0.5324]}, {"w": "result", "b": [0.2862, 0.5188, 0.3443, 0.5338]}, {"w": "<-", "b": [0.354, 0.5188, 0.3734, 0.5338]}, {"w": "c(x1,", "b": [0.3831, 0.5188, 0.4315, 0.5348]}, {"w": "x2)", "b": [0.4412, 0.5188, 0.4702, 0.5338]}]}, {"id": "b_20", "type": "equation", "text": "9 }", "words": [{"w": "9", "b": [0.1028, 0.5429, 0.1091, 0.5504]}, {"w": "}", "b": [0.2475, 0.5368, 0.2572, 0.5517]}]}, {"id": "b_21", "type": "equation", "text": "10 }", "words": [{"w": "10", "b": [0.0965, 0.5608, 0.1091, 0.5683]}, {"w": "}", "b": [0.2087, 0.5547, 0.2184, 0.5697]}]}, {"id": "b_22", "type": "equation", "text": "11 }", "words": [{"w": "11", "b": [0.0965, 0.5788, 0.1091, 0.5863]}, {"w": "}", "b": [0.17, 0.5727, 0.1797, 0.5876]}]}, {"id": "b_23", "type": "paragraph", "text": "12 result", "words": [{"w": "12", "b": [0.0965, 0.5967, 0.1091, 0.6042]}, {"w": "result", "b": [0.17, 0.5906, 0.2281, 0.6056]}]}, {"id": "b_24", "type": "equation", "text": "13 }", "words": [{"w": "13", "b": [0.0965, 0.6147, 0.1091, 0.6222]}, {"w": "}", "b": [0.1312, 0.6086, 0.1409, 0.6235]}]}, {"id": "b_25", "type": "paragraph", "text": "In the above algorithms, we loop over all values in S, and, at every iteration of the first loop, we loop over all values in S once again. Therefore, the above algorithm makes N 2", "words": [{"w": "In", "b": [0.1312, 0.6357, 0.1485, 0.6508]}, {"w": "the", "b": [0.1556, 0.6357, 0.1818, 0.6508]}, {"w": "above", "b": [0.1889, 0.6357, 0.236, 0.6508]}, {"w": "algorithms,", "b": [0.2431, 0.6357, 0.3353, 0.6508]}, {"w": "we", "b": [0.3427, 0.6357, 0.3642, 0.6508]}, {"w": "loop", "b": [0.3713, 0.6357, 0.4063, 0.6508]}, {"w": "over", "b": [0.4135, 0.6357, 0.4475, 0.6508]}, {"w": "all", "b": [0.4547, 0.6357, 0.4746, 0.6508]}, {"w": "values", "b": [0.4817, 0.6357, 0.5315, 0.6508]}, {"w": "in", "b": [0.5386, 0.6357, 0.5543, 0.6508]}, {"w": "S,", "b": [0.5613, 0.6356, 0.5791, 0.6508]}, {"w": "and,", "b": [0.5865, 0.6357, 0.6221, 0.6508]}, {"w": "at", "b": [0.6294, 0.6357, 0.6462, 0.6508]}, {"w": "every", "b": [0.6533, 0.6357, 0.6968, 0.6508]}, {"w": "iteration", "b": [0.7039, 0.6357, 0.7741, 0.6508]}, {"w": "of", "b": [0.7812, 0.6357, 0.7964, 0.6508]}, {"w": "the", "b": [0.8035, 0.6357, 0.8297, 0.6508]}, {"w": "first", "b": [0.8368, 0.6357, 0.8694, 0.6508]}, {"w": "loop,", "b": [0.1312, 0.6536, 0.1715, 0.6687]}, {"w": "we", "b": [0.1788, 0.6536, 0.2003, 0.6687]}, {"w": "loop", "b": [0.2074, 0.6536, 0.2424, 0.6687]}, {"w": "over", "b": [0.2495, 0.6536, 0.2835, 0.6687]}, {"w": "all", "b": [0.2906, 0.6536, 0.3105, 0.6687]}, {"w": "values", "b": [0.3176, 0.6536, 0.3674, 0.6687]}, {"w": "in", "b": [0.3745, 0.6536, 0.3902, 0.6687]}, {"w": "S", "b": [0.3972, 0.6535, 0.4084, 0.6685]}, {"w": "once", "b": [0.4168, 0.6536, 0.4535, 0.6687]}, {"w": "again.", "b": [0.4606, 0.6536, 0.5097, 0.6687]}, {"w": "Therefore,", "b": [0.5207, 0.6536, 0.605, 0.6687]}, {"w": "the", "b": [0.6124, 0.6536, 0.6385, 0.6687]}, {"w": "above", "b": [0.6456, 0.6536, 0.6927, 0.6687]}, {"w": "algorithm", "b": [0.6998, 0.6536, 0.7793, 0.6687]}, {"w": "makes", "b": [0.7864, 0.6536, 0.8367, 0.6687]}, {"w": "N", "b": [0.8437, 0.6537, 0.8585, 0.6687]}, {"w": "2", "b": [0.8605, 0.6518, 0.8678, 0.6623]}]}, {"id": "b_26", "type": "paragraph", "text": "comparisons of numbers. If we take the time the comparison, abs, and assignment operations take as a unit time, then the time complexity (or, simply, complexity) of this algorithm is at most 5N 2. At each iteration, we have one comparison, two abs, and two assignment operations (1 + 2 + 2 = 5). When the complexity of an algorithm is measured in the worst case, the big O notation is used. For the above algorithm, using big O notation, we say that the algorithm’s complexity is O(N 2); the constants, like 5, are ignored.", "words": [{"w": "comparisons", "b": [0.1312, 0.6718, 0.228, 0.6866]}, {"w": "of", "b": [0.2336, 0.6718, 0.2482, 0.6866]}, {"w": "numbers.", "b": [0.2539, 0.6718, 0.3259, 0.6866]}, {"w": "If", "b": [0.3339, 0.6718, 0.346, 0.6866]}, {"w": "we", "b": [0.3516, 0.6718, 0.3722, 0.6866]}, {"w": "take", "b": [0.3779, 0.6718, 0.4111, 0.6866]}, {"w": "the", "b": [0.4167, 0.6718, 0.4419, 0.6866]}, {"w": "time", "b": [0.4475, 0.6718, 0.4827, 0.6866]}, {"w": "the", "b": [0.4884, 0.6718, 0.5135, 0.6866]}, {"w": "comparison,", "b": [0.5192, 0.6718, 0.6138, 0.6866]}, {"w": "abs,", "b": [0.6193, 0.6714, 0.6534, 0.6866]}, {"w": "and", "b": [0.6592, 0.6718, 0.6883, 0.6866]}, {"w": "assignment", "b": [0.694, 0.6718, 0.7811, 0.6866]}, {"w": "operations", "b": [0.7868, 0.6718, 0.8689, 0.6866]}, {"w": "take", "b": [0.1312, 0.6895, 0.1658, 0.7046]}, {"w": "as", "b": [0.1731, 0.6895, 0.19, 0.7046]}, {"w": "a", "b": [0.1973, 0.6895, 0.2067, 0.7046]}, {"w": "unit", "b": [0.2141, 0.6895, 0.2476, 0.7046]}, {"w": "time,", "b": [0.2549, 0.6895, 0.2968, 0.7046]}, {"w": "then", "b": [0.3045, 0.6895, 0.3411, 0.7046]}, {"w": "the", "b": [0.3484, 0.6895, 0.3746, 0.7046]}, {"w": "time", "b": [0.3819, 0.6895, 0.4186, 0.7046]}, {"w": "complexity", "b": [0.4259, 0.6895, 0.5154, 0.7046]}, {"w": "(or,", "b": [0.5227, 0.6895, 0.552, 0.7046]}, {"w": "simply,", "b": [0.5597, 0.6895, 0.6174, 0.7046]}, {"w": "complexity)", "b": [0.6251, 0.6895, 0.7218, 0.7046]}, {"w": "of", "b": [0.7292, 0.6895, 0.7444, 0.7046]}, {"w": "this", "b": [0.7517, 0.6895, 0.7822, 0.7046]}, {"w": "algorithm", "b": [0.7895, 0.6895, 0.869, 0.7046]}, {"w": "is", "b": [0.1312, 0.7074, 0.1439, 0.7225]}, {"w": "at", "b": [0.1502, 0.7074, 0.167, 0.7225]}, {"w": "most", "b": [0.1733, 0.7074, 0.2131, 0.7225]}, {"w": "5N", "b": [0.2195, 0.7074, 0.2437, 0.7225]}, {"w": "2.", "b": [0.2457, 0.7056, 0.2592, 0.7225]}, {"w": "At", "b": [0.268, 0.7074, 0.2889, 0.7225]}, {"w": "each", "b": [0.2953, 0.7074, 0.3313, 0.7225]}, {"w": "iteration,", "b": [0.3377, 0.7074, 0.4131, 0.7225]}, {"w": "we", "b": [0.4195, 0.7074, 0.4409, 0.7225]}, {"w": "have", "b": [0.4472, 0.7074, 0.4844, 0.7225]}, {"w": "one", "b": [0.4907, 0.7074, 0.519, 0.7225]}, {"w": "comparison,", "b": [0.5253, 0.7074, 0.6238, 0.7225]}, {"w": "two", "b": [0.6302, 0.7074, 0.6595, 0.7225]}, {"w": "abs,", "b": [0.6656, 0.7073, 0.6999, 0.7225]}, {"w": "and", "b": [0.7063, 0.7074, 0.7367, 0.7225]}, {"w": "two", "b": [0.743, 0.7074, 0.7723, 0.7225]}, {"w": "assignment", "b": [0.7786, 0.7074, 0.8693, 0.7225]}, {"w": "operations", "b": [0.1312, 0.7254, 0.2158, 0.7405]}, {"w": "(1", "b": [0.2219, 0.7254, 0.2385, 0.7405]}, {"w": "+", "b": [0.2425, 0.7254, 0.257, 0.7405]}, {"w": "2", "b": [0.2611, 0.7254, 0.2704, 0.7405]}, {"w": "+", "b": [0.2745, 0.7254, 0.289, 0.7405]}, {"w": "2", "b": [0.2931, 0.7254, 0.3024, 0.7405]}, {"w": "=", "b": [0.3075, 0.7254, 0.322, 0.7405]}, {"w": "5).", "b": [0.3272, 0.7254, 0.3489, 0.7405]}, {"w": "When", "b": [0.3571, 0.7254, 0.4053, 0.7405]}, {"w": "the", "b": [0.4114, 0.7254, 0.4373, 0.7405]}, {"w": "complexity", "b": [0.4434, 0.7254, 0.532, 0.7405]}, {"w": "of", "b": [0.5381, 0.7254, 0.5531, 0.7405]}, {"w": "an", "b": [0.5593, 0.7254, 0.579, 0.7405]}, {"w": "algorithm", "b": [0.5851, 0.7254, 0.6638, 0.7405]}, {"w": "is", "b": [0.67, 0.7254, 0.6825, 0.7405]}, {"w": "measured", "b": [0.6887, 0.7254, 0.7655, 0.7405]}, {"w": "in", "b": [0.7716, 0.7254, 0.7871, 0.7405]}, {"w": "the", "b": [0.7933, 0.7254, 0.8192, 0.7405]}, {"w": "worst", "b": [0.8253, 0.7254, 0.8695, 0.7405]}, {"w": "case,", "b": [0.1312, 0.7435, 0.1688, 0.7584]}, {"w": "the", "b": [0.1749, 0.7435, 0.2002, 0.7584]}, {"w": "big", "b": [0.2064, 0.7435, 0.2307, 0.7584]}, {"w": "O", "b": [0.2368, 0.7435, 0.251, 0.7584]}, {"w": "notation", "b": [0.2571, 0.7435, 0.3239, 0.7584]}, {"w": "is", "b": [0.3301, 0.7435, 0.3423, 0.7584]}, {"w": "used.", "b": [0.3485, 0.7435, 0.3891, 0.7584]}, {"w": "For", "b": [0.3973, 0.7435, 0.4238, 0.7584]}, {"w": "the", "b": [0.43, 0.7435, 0.4553, 0.7584]}, {"w": "above", "b": [0.4614, 0.7435, 0.507, 0.7584]}, {"w": "algorithm,", "b": [0.5131, 0.7435, 0.5951, 0.7584]}, {"w": "using", "b": [0.6013, 0.7435, 0.6429, 0.7584]}, {"w": "big", "b": [0.649, 0.7435, 0.6733, 0.7584]}, {"w": "O", "b": [0.6794, 0.7435, 0.6936, 0.7584]}, {"w": "notation,", "b": [0.6997, 0.7435, 0.7716, 0.7584]}, {"w": "we", "b": [0.7778, 0.7435, 0.7985, 0.7584]}, {"w": "say", "b": [0.8046, 0.7435, 0.83, 0.7584]}, {"w": "that", "b": [0.8362, 0.7435, 0.8696, 0.7584]}, {"w": "the", "b": [0.1312, 0.7614, 0.1569, 0.7764]}, {"w": "algorithm’s", "b": [0.163, 0.7614, 0.2534, 0.7764]}, {"w": "complexity", "b": [0.2595, 0.7614, 0.3472, 0.7764]}, {"w": "is", "b": [0.3534, 0.7614, 0.3658, 0.7764]}, {"w": "O(N", "b": [0.3718, 0.7614, 0.4082, 0.7764]}, {"w": "2);", "b": [0.4102, 0.7595, 0.4308, 0.7764]}, {"w": "the", "b": [0.4369, 0.7614, 0.4626, 0.7764]}, {"w": "constants,", "b": [0.4687, 0.7614, 0.5494, 0.7764]}, {"w": "like", "b": [0.5556, 0.7614, 0.5833, 0.7764]}, {"w": "5,", "b": [0.5893, 0.7614, 0.6037, 0.7764]}, {"w": "are", "b": [0.6098, 0.7614, 0.6345, 0.7764]}, {"w": "ignored.", "b": [0.6407, 0.7614, 0.7053, 0.7764]}]}, {"id": "b_27", "type": "paragraph", "text": "For the same problem, we can craft another Python algorithm like this:", "words": [{"w": "For", "b": [0.1312, 0.7883, 0.1582, 0.8033]}, {"w": "the", "b": [0.1643, 0.7883, 0.19, 0.8033]}, {"w": "same", "b": [0.1961, 0.7883, 0.2362, 0.8033]}, {"w": "problem,", "b": [0.2424, 0.7883, 0.3132, 0.8033]}, {"w": "we", "b": [0.3193, 0.7883, 0.3404, 0.8033]}, {"w": "can", "b": [0.3465, 0.7883, 0.3742, 0.8033]}, {"w": "craft", "b": [0.3803, 0.7883, 0.4178, 0.8033]}, {"w": "another", "b": [0.424, 0.7883, 0.4856, 0.8033]}, {"w": "Python", "b": [0.4917, 0.7883, 0.5509, 0.8033]}, {"w": "algorithm", "b": [0.5571, 0.7883, 0.635, 0.8033]}, {"w": "like", "b": [0.6412, 0.7883, 0.6689, 0.8033]}, {"w": "this:", "b": [0.675, 0.7883, 0.71, 0.8033]}]}, {"id": "b_28", "type": "equation", "text": "1 def find_max_distance(S):", "words": [{"w": "1", "b": [0.1028, 0.8211, 0.1091, 0.8286]}, {"w": "def", "b": [0.1312, 0.8159, 0.1603, 0.8309]}, {"w": "find_max_distance(S):", "b": [0.17, 0.8149, 0.3734, 0.8299]}]}, {"id": "b_29", "type": "equation", "text": "2 result = None", "words": [{"w": "2", "b": [0.1028, 0.839, 0.1091, 0.8465]}, {"w": "result", "b": [0.17, 0.8329, 0.2281, 0.8478]}, {"w": "=", "b": [0.2378, 0.8329, 0.2475, 0.8478]}, {"w": "None", "b": [0.2572, 0.8329, 0.2959, 0.8478]}]}, {"id": "b_30", "type": "equation", "text": "3 min_x = float(\"inf\")", "words": [{"w": "3", "b": [0.1028, 0.857, 0.1091, 0.8644]}, {"w": "min_x", "b": [0.17, 0.8508, 0.2184, 0.8658]}, {"w": "=", "b": [0.2281, 0.8508, 0.2378, 0.8658]}, {"w": "float(\"inf\")", "b": [0.2475, 0.8508, 0.3637, 0.8658]}]}, {"id": "b_31", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 16", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "16", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 256, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "4 max_x = float(\"-inf\")", "words": [{"w": "4", "b": [0.1028, 0.0942, 0.1091, 0.1017]}, {"w": "max_x", "b": [0.17, 0.0881, 0.2184, 0.1031]}, {"w": "=", "b": [0.2281, 0.0881, 0.2378, 0.1031]}, {"w": "float(\"-inf\")", "b": [0.2475, 0.0881, 0.3734, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "5 for x in S:", "words": [{"w": "5", "b": [0.1028, 0.1122, 0.1091, 0.1197]}, {"w": "for", "b": [0.17, 0.107, 0.199, 0.122]}, {"w": "x", "b": [0.2087, 0.106, 0.2184, 0.121]}, {"w": "in", "b": [0.2281, 0.107, 0.2475, 0.122]}, {"w": "S:", "b": [0.2571, 0.106, 0.2765, 0.121]}]}, {"id": "b_2", "type": "equation", "text": "6 if x < min_x:", "words": [{"w": "6", "b": [0.1028, 0.1301, 0.1091, 0.1376]}, {"w": "if", "b": [0.2087, 0.125, 0.2281, 0.1399]}, {"w": "x", "b": [0.2378, 0.124, 0.2475, 0.1389]}, {"w": "<", "b": [0.2571, 0.124, 0.2668, 0.1389]}, {"w": "min_x:", "b": [0.2765, 0.124, 0.3346, 0.1389]}]}, {"id": "b_3", "type": "equation", "text": "7 min_x = x", "words": [{"w": "7", "b": [0.1028, 0.1481, 0.1091, 0.1555]}, {"w": "min_x", "b": [0.2475, 0.1419, 0.2959, 0.1569]}, {"w": "=", "b": [0.3056, 0.1419, 0.3153, 0.1569]}, {"w": "x", "b": [0.325, 0.1419, 0.3346, 0.1569]}]}, {"id": "b_4", "type": "equation", "text": "8 if x > max_x:", "words": [{"w": "8", "b": [0.1028, 0.166, 0.1091, 0.1735]}, {"w": "if", "b": [0.2087, 0.1609, 0.2281, 0.1758]}, {"w": "x", "b": [0.2378, 0.1599, 0.2475, 0.1748]}, {"w": ">", "b": [0.2571, 0.1599, 0.2668, 0.1748]}, {"w": "max_x:", "b": [0.2765, 0.1599, 0.3346, 0.1748]}]}, {"id": "b_5", "type": "equation", "text": "9 max_x = x", "words": [{"w": "9", "b": [0.1028, 0.184, 0.1091, 0.1914]}, {"w": "max_x", "b": [0.2475, 0.1778, 0.2959, 0.1928]}, {"w": "=", "b": [0.3056, 0.1778, 0.3153, 0.1928]}, {"w": "x", "b": [0.325, 0.1778, 0.3346, 0.1928]}]}, {"id": "b_6", "type": "equation", "text": "10 result = (max_x, min_x)", "words": [{"w": "10", "b": [0.0965, 0.2019, 0.1091, 0.2094]}, {"w": "result", "b": [0.17, 0.1958, 0.2281, 0.2107]}, {"w": "=", "b": [0.2378, 0.1958, 0.2475, 0.2107]}, {"w": "(max_x,", "b": [0.2572, 0.1958, 0.325, 0.2107]}, {"w": "min_x)", "b": [0.3346, 0.1958, 0.3928, 0.2107]}]}, {"id": "b_7", "type": "paragraph", "text": "11 return result", "words": [{"w": "11", "b": [0.0965, 0.2199, 0.1091, 0.2273]}, {"w": "return", "b": [0.17, 0.2147, 0.2281, 0.2297]}, {"w": "result", "b": [0.2378, 0.2137, 0.2959, 0.2287]}]}, {"id": "b_8", "type": "paragraph", "text": "or in R, like this:", "words": [{"w": "or", "b": [0.1312, 0.2409, 0.1477, 0.2559]}, {"w": "in", "b": [0.1538, 0.2409, 0.1692, 0.2559]}, {"w": "R,", "b": [0.1754, 0.2409, 0.1941, 0.2559]}, {"w": "like", "b": [0.2002, 0.2409, 0.2279, 0.2559]}, {"w": "this:", "b": [0.2341, 0.2409, 0.269, 0.2559]}]}, {"id": "b_9", "type": "equation", "text": "10 find_max_distance <- function(S):", "words": [{"w": "10", "b": [0.0965, 0.2737, 0.1091, 0.2812]}, {"w": "find_max_distance", "b": [0.1312, 0.2676, 0.2959, 0.2825]}, {"w": "<-", "b": [0.3056, 0.2676, 0.325, 0.2825]}, {"w": "function(S):", "b": [0.3346, 0.2676, 0.4509, 0.2835]}]}, {"id": "b_10", "type": "equation", "text": "11 result <- NULL", "words": [{"w": "11", "b": [0.0965, 0.2916, 0.1091, 0.2991]}, {"w": "result", "b": [0.17, 0.2855, 0.2281, 0.3005]}, {"w": "<-", "b": [0.2378, 0.2855, 0.2572, 0.3005]}, {"w": "NULL", "b": [0.2668, 0.2855, 0.3056, 0.3005]}]}, {"id": "b_11", "type": "equation", "text": "12 min_x <- Inf", "words": [{"w": "12", "b": [0.0965, 0.3096, 0.1091, 0.3171]}, {"w": "min_x", "b": [0.17, 0.3035, 0.2184, 0.3184]}, {"w": "<-", "b": [0.2281, 0.3035, 0.2475, 0.3184]}, {"w": "Inf", "b": [0.2572, 0.3035, 0.2862, 0.3184]}]}, {"id": "b_12", "type": "equation", "text": "13 max_x <- -Inf", "words": [{"w": "13", "b": [0.0965, 0.3275, 0.1091, 0.335]}, {"w": "max_x", "b": [0.17, 0.3214, 0.2184, 0.3364]}, {"w": "<-", "b": [0.2281, 0.3214, 0.2475, 0.3364]}, {"w": "-Inf", "b": [0.2572, 0.3214, 0.2959, 0.3364]}]}, {"id": "b_13", "type": "equation", "text": "14 for (x in S) {", "words": [{"w": "14", "b": [0.0965, 0.3455, 0.1091, 0.353]}, {"w": "for", "b": [0.17, 0.3403, 0.199, 0.3553]}, {"w": "(x", "b": [0.2087, 0.3394, 0.2281, 0.3543]}, {"w": "in", "b": [0.2378, 0.3403, 0.2571, 0.3553]}, {"w": "S)", "b": [0.2668, 0.3394, 0.2862, 0.3543]}, {"w": "{", "b": [0.2959, 0.3394, 0.3056, 0.3543]}]}, {"id": "b_14", "type": "equation", "text": "15 if (x < min_x) {", "words": [{"w": "15", "b": [0.0965, 0.3634, 0.1091, 0.3709]}, {"w": "if", "b": [0.2087, 0.3583, 0.2281, 0.3732]}, {"w": "(x", "b": [0.2378, 0.3573, 0.2571, 0.3723]}, {"w": "<", "b": [0.2668, 0.3573, 0.2765, 0.3723]}, {"w": "min_x)", "b": [0.2862, 0.3573, 0.3443, 0.3723]}, {"w": "{", "b": [0.354, 0.3573, 0.3637, 0.3723]}]}, {"id": "b_15", "type": "equation", "text": "16 min_x <- x", "words": [{"w": "16", "b": [0.0965, 0.3814, 0.1091, 0.3889]}, {"w": "min_x", "b": [0.2475, 0.3752, 0.2959, 0.3902]}, {"w": "<-", "b": [0.3056, 0.3752, 0.325, 0.3902]}, {"w": "x", "b": [0.3346, 0.3752, 0.3443, 0.3902]}]}, {"id": "b_16", "type": "equation", "text": "17 }", "words": [{"w": "17", "b": [0.0965, 0.3993, 0.1091, 0.4068]}, {"w": "}", "b": [0.2087, 0.3932, 0.2184, 0.4082]}]}, {"id": "b_17", "type": "equation", "text": "18 if (x > max_x) {", "words": [{"w": "18", "b": [0.0965, 0.4173, 0.1091, 0.4247]}, {"w": "if", "b": [0.2087, 0.4121, 0.2281, 0.4271]}, {"w": "(x", "b": [0.2378, 0.4111, 0.2571, 0.4261]}, {"w": ">", "b": [0.2668, 0.4111, 0.2765, 0.4261]}, {"w": "max_x)", "b": [0.2862, 0.4111, 0.3443, 0.4261]}, {"w": "{", "b": [0.354, 0.4111, 0.3637, 0.4261]}]}, {"id": "b_18", "type": "equation", "text": "19 max_x = x", "words": [{"w": "19", "b": [0.0965, 0.4352, 0.1091, 0.4427]}, {"w": "max_x", "b": [0.2475, 0.4291, 0.2959, 0.444]}, {"w": "=", "b": [0.3056, 0.4291, 0.3153, 0.444]}, {"w": "x", "b": [0.3249, 0.4291, 0.3346, 0.444]}]}, {"id": "b_19", "type": "equation", "text": "20 }", "words": [{"w": "20", "b": [0.0965, 0.4532, 0.1091, 0.4606]}, {"w": "}", "b": [0.2087, 0.447, 0.2184, 0.462]}]}, {"id": "b_20", "type": "equation", "text": "21 result <- c(max_x, min_x)", "words": [{"w": "21", "b": [0.0965, 0.4711, 0.1091, 0.4786]}, {"w": "result", "b": [0.17, 0.465, 0.2281, 0.4799]}, {"w": "<-", "b": [0.2378, 0.465, 0.2571, 0.4799]}, {"w": "c(max_x,", "b": [0.2668, 0.465, 0.3443, 0.4809]}, {"w": "min_x)", "b": [0.354, 0.465, 0.4121, 0.4799]}]}, {"id": "b_21", "type": "paragraph", "text": "22 result", "words": [{"w": "22", "b": [0.0965, 0.4891, 0.1091, 0.4965]}, {"w": "result", "b": [0.17, 0.4829, 0.2281, 0.4979]}]}, {"id": "b_22", "type": "paragraph", "text": "In the above algorithms, we loop over all values in S only once, so the algorithm’s complexity is O(N). In this case, we say that the latter algorithm is more efficient than the former.", "words": [{"w": "In", "b": [0.1312, 0.5103, 0.1478, 0.5251]}, {"w": "the", "b": [0.1535, 0.5103, 0.1787, 0.5251]}, {"w": "above", "b": [0.1844, 0.5103, 0.2296, 0.5251]}, {"w": "algorithms,", "b": [0.2353, 0.5103, 0.3239, 0.5251]}, {"w": "we", "b": [0.3297, 0.5103, 0.3503, 0.5251]}, {"w": "loop", "b": [0.356, 0.5103, 0.3897, 0.5251]}, {"w": "over", "b": [0.3954, 0.5103, 0.4281, 0.5251]}, {"w": "all", "b": [0.4339, 0.5103, 0.453, 0.5251]}, {"w": "values", "b": [0.4587, 0.5103, 0.5065, 0.5251]}, {"w": "in", "b": [0.5123, 0.5103, 0.5273, 0.5251]}, {"w": "S", "b": [0.5329, 0.5099, 0.5441, 0.5249]}, {"w": "only", "b": [0.5512, 0.5103, 0.5849, 0.5251]}, {"w": "once,", "b": [0.5906, 0.5103, 0.6308, 0.5251]}, {"w": "so", "b": [0.6366, 0.5103, 0.6528, 0.5251]}, {"w": "the", "b": [0.6585, 0.5103, 0.6836, 0.5251]}, {"w": "algorithm’s", "b": [0.6894, 0.5103, 0.778, 0.5251]}, {"w": "complexity", "b": [0.7837, 0.5103, 0.8696, 0.5251]}, {"w": "is", "b": [0.1312, 0.5281, 0.1436, 0.543]}, {"w": "O(N).", "b": [0.1498, 0.5281, 0.2004, 0.543]}, {"w": "In", "b": [0.2086, 0.5281, 0.2256, 0.543]}, {"w": "this", "b": [0.2317, 0.5281, 0.2616, 0.543]}, {"w": "case,", "b": [0.2677, 0.5281, 0.3058, 0.543]}, {"w": "we", "b": [0.3119, 0.5281, 0.3329, 0.543]}, {"w": "say", "b": [0.3391, 0.5281, 0.3648, 0.543]}, {"w": "that", "b": [0.371, 0.5281, 0.4048, 0.543]}, {"w": "the", "b": [0.411, 0.5281, 0.4366, 0.543]}, {"w": "latter", "b": [0.4428, 0.5281, 0.4869, 0.543]}, {"w": "algorithm", "b": [0.4931, 0.5281, 0.571, 0.543]}, {"w": "is", "b": [0.5772, 0.5281, 0.5896, 0.543]}, {"w": "more", "b": [0.5957, 0.5281, 0.6358, 0.543]}, {"w": "efficient", "b": [0.6419, 0.5281, 0.704, 0.543]}, {"w": "than", "b": [0.7101, 0.5281, 0.747, 0.543]}, {"w": "the", "b": [0.7532, 0.5281, 0.7788, 0.543]}, {"w": "former.", "b": [0.785, 0.5281, 0.843, 0.543]}]}, {"id": "b_23", "type": "paragraph", "text": "An algorithm is called efficient when its complexity is polynomial in the input size. Therefore both O(N) and O(N 2) are efficient because N is a polynomial of degree 1, while N 2 is a polynomial of degree 2. However, for very large inputs, an O(N 2) algorithm can still be slow. In the big data era, scientists and engineers often look for O(log N) algorithms.", "words": [{"w": "An", "b": [0.1305, 0.5551, 0.1541, 0.5699]}, {"w": "algorithm", "b": [0.1591, 0.5551, 0.2355, 0.5699]}, {"w": "is", "b": [0.2404, 0.5551, 0.2525, 0.5699]}, {"w": "called", "b": [0.2575, 0.5551, 0.3027, 0.5699]}, {"w": "efficient", "b": [0.3075, 0.555, 0.3794, 0.57]}, {"w": "when", "b": [0.3843, 0.5551, 0.4255, 0.5699]}, {"w": "its", "b": [0.4305, 0.5551, 0.4497, 0.5699]}, {"w": "complexity", "b": [0.4546, 0.5551, 0.5405, 0.5699]}, {"w": "is", "b": [0.5454, 0.5551, 0.5575, 0.5699]}, {"w": "polynomial", "b": [0.5625, 0.5551, 0.6499, 0.5699]}, {"w": "in", "b": [0.6548, 0.5551, 0.6699, 0.5699]}, {"w": "the", "b": [0.6748, 0.5551, 0.6999, 0.5699]}, {"w": "input", "b": [0.7048, 0.5551, 0.747, 0.5699]}, {"w": "size.", "b": [0.7519, 0.5551, 0.7852, 0.5699]}, {"w": "Therefore", "b": [0.793, 0.5551, 0.869, 0.5699]}, {"w": "both", "b": [0.1312, 0.5728, 0.1694, 0.5879]}, {"w": "O(N)", "b": [0.1762, 0.5728, 0.222, 0.5879]}, {"w": "and", "b": [0.2288, 0.5728, 0.2591, 0.5879]}, {"w": "O(N", "b": [0.2659, 0.5728, 0.3024, 0.5879]}, {"w": "2)", "b": [0.3044, 0.571, 0.32, 0.5879]}, {"w": "are", "b": [0.3267, 0.5728, 0.3519, 0.5879]}, {"w": "efficient", "b": [0.3587, 0.5728, 0.422, 0.5879]}, {"w": "because", "b": [0.4288, 0.5728, 0.4921, 0.5879]}, {"w": "N", "b": [0.4988, 0.5729, 0.5137, 0.5879]}, {"w": "is", "b": [0.5224, 0.5728, 0.5351, 0.5879]}, {"w": "a", "b": [0.5419, 0.5728, 0.5513, 0.5879]}, {"w": "polynomial", "b": [0.5581, 0.5728, 0.649, 0.5879]}, {"w": "of", "b": [0.6558, 0.5728, 0.671, 0.5879]}, {"w": "degree", "b": [0.6778, 0.5728, 0.7301, 0.5879]}, {"w": "1,", "b": [0.7368, 0.5728, 0.7515, 0.5879]}, {"w": "while", "b": [0.7584, 0.5728, 0.8013, 0.5879]}, {"w": "N", "b": [0.808, 0.5729, 0.8229, 0.5879]}, {"w": "2", "b": [0.8249, 0.571, 0.8322, 0.5815]}, {"w": "is", "b": [0.8399, 0.5728, 0.8526, 0.5879]}, {"w": "a", "b": [0.8594, 0.5728, 0.8688, 0.5879]}, {"w": "polynomial", "b": [0.1312, 0.591, 0.2187, 0.6058]}, {"w": "of", "b": [0.2247, 0.591, 0.2392, 0.6058]}, {"w": "degree", "b": [0.2452, 0.591, 0.2956, 0.6058]}, {"w": "2.", "b": [0.3015, 0.591, 0.3156, 0.6058]}, {"w": "However,", "b": [0.3237, 0.591, 0.3956, 0.6058]}, {"w": "for", "b": [0.4016, 0.591, 0.4233, 0.6058]}, {"w": "very", "b": [0.4293, 0.591, 0.463, 0.6058]}, {"w": "large", "b": [0.469, 0.591, 0.5073, 0.6058]}, {"w": "inputs,", "b": [0.5133, 0.591, 0.5676, 0.6058]}, {"w": "an", "b": [0.5737, 0.591, 0.5928, 0.6058]}, {"w": "O(N", "b": [0.5987, 0.5909, 0.6349, 0.6059]}, {"w": "2)", "b": [0.6369, 0.589, 0.6522, 0.6058]}, {"w": "algorithm", "b": [0.6582, 0.591, 0.7346, 0.6058]}, {"w": "can", "b": [0.7406, 0.591, 0.7678, 0.6058]}, {"w": "still", "b": [0.7738, 0.591, 0.803, 0.6058]}, {"w": "be", "b": [0.809, 0.591, 0.8277, 0.6058]}, {"w": "slow.", "b": [0.8337, 0.591, 0.8724, 0.6058]}, {"w": "In", "b": [0.1312, 0.6089, 0.1482, 0.6238]}, {"w": "the", "b": [0.1543, 0.6089, 0.1799, 0.6238]}, {"w": "big", "b": [0.1861, 0.6089, 0.2107, 0.6238]}, {"w": "data", "b": [0.2169, 0.6089, 0.2527, 0.6238]}, {"w": "era,", "b": [0.2589, 0.6089, 0.2887, 0.6238]}, {"w": "scientists", "b": [0.2948, 0.6089, 0.3675, 0.6238]}, {"w": "and", "b": [0.3736, 0.6089, 0.4034, 0.6238]}, {"w": "engineers", "b": [0.4095, 0.6089, 0.4835, 0.6238]}, {"w": "often", "b": [0.4897, 0.6089, 0.5302, 0.6238]}, {"w": "look", "b": [0.5363, 0.6089, 0.5702, 0.6238]}, {"w": "for", "b": [0.5763, 0.6089, 0.5984, 0.6238]}, {"w": "O(log", "b": [0.6043, 0.6089, 0.6494, 0.6238]}, {"w": "N)", "b": [0.6527, 0.6088, 0.6767, 0.6238]}, {"w": "algorithms.", "b": [0.6829, 0.6089, 0.7733, 0.6238]}]}, {"id": "b_24", "type": "paragraph", "text": "From a practical standpoint, when implementing an algorithm, you should avoid using loops whenever possible, and implement vectorization using NumPy or similar tools. For example, you should use operations on matrices and vectors, instead of loops. In Python, to compute w · x (a dot product of two vectors), you should type,", "words": [{"w": "From", "b": [0.1312, 0.6359, 0.1729, 0.6507]}, {"w": "a", "b": [0.1791, 0.6359, 0.1882, 0.6507]}, {"w": "practical", "b": [0.1943, 0.6359, 0.2631, 0.6507]}, {"w": "standpoint,", "b": [0.2692, 0.6359, 0.3592, 0.6507]}, {"w": "when", "b": [0.3654, 0.6359, 0.4068, 0.6507]}, {"w": "implementing", "b": [0.413, 0.6359, 0.5205, 0.6507]}, {"w": "an", "b": [0.5267, 0.6359, 0.5459, 0.6507]}, {"w": "algorithm,", "b": [0.5521, 0.6359, 0.6339, 0.6507]}, {"w": "you", "b": [0.6401, 0.6359, 0.6683, 0.6507]}, {"w": "should", "b": [0.6745, 0.6359, 0.7261, 0.6507]}, {"w": "avoid", "b": [0.7323, 0.6359, 0.7742, 0.6507]}, {"w": "using", "b": [0.7804, 0.6359, 0.8219, 0.6507]}, {"w": "loops", "b": [0.828, 0.6359, 0.8691, 0.6507]}, {"w": "whenever", "b": [0.1306, 0.6538, 0.2047, 0.6687]}, {"w": "possible,", "b": [0.2109, 0.6538, 0.2786, 0.6687]}, {"w": "and", "b": [0.2848, 0.6538, 0.3142, 0.6687]}, {"w": "implement", "b": [0.3204, 0.6538, 0.4041, 0.6687]}, {"w": "vectorization", "b": [0.4103, 0.6538, 0.5129, 0.6687]}, {"w": "using", "b": [0.519, 0.6538, 0.5608, 0.6687]}, {"w": "NumPy", "b": [0.5669, 0.6538, 0.6281, 0.6687]}, {"w": "or", "b": [0.6342, 0.6538, 0.6505, 0.6687]}, {"w": "similar", "b": [0.6567, 0.6538, 0.7106, 0.6687]}, {"w": "tools.", "b": [0.7168, 0.6538, 0.76, 0.6687]}, {"w": "For", "b": [0.7683, 0.6538, 0.7949, 0.6687]}, {"w": "example,", "b": [0.8011, 0.6538, 0.8717, 0.6687]}, {"w": "you", "b": [0.1308, 0.6717, 0.1593, 0.6866]}, {"w": "should", "b": [0.1654, 0.6717, 0.2174, 0.6866]}, {"w": "use", "b": [0.2236, 0.6717, 0.2492, 0.6866]}, {"w": "operations", "b": [0.2553, 0.6717, 0.3384, 0.6866]}, {"w": "on", "b": [0.3446, 0.6717, 0.364, 0.6866]}, {"w": "matrices", "b": [0.3701, 0.6717, 0.4375, 0.6866]}, {"w": "and", "b": [0.4436, 0.6717, 0.4731, 0.6866]}, {"w": "vectors,", "b": [0.4793, 0.6717, 0.5405, 0.6866]}, {"w": "instead", "b": [0.5467, 0.6717, 0.6038, 0.6866]}, {"w": "of", "b": [0.6099, 0.6717, 0.6247, 0.6866]}, {"w": "loops.", "b": [0.6309, 0.6717, 0.6773, 0.6866]}, {"w": "In", "b": [0.6855, 0.6717, 0.7023, 0.6866]}, {"w": "Python,", "b": [0.7084, 0.6717, 0.7723, 0.6866]}, {"w": "to", "b": [0.7785, 0.6717, 0.7947, 0.6866]}, {"w": "compute", "b": [0.8009, 0.6717, 0.8691, 0.6866]}, {"w": "w", "b": [0.1312, 0.6896, 0.1466, 0.7046]}, {"w": "·", "b": [0.1507, 0.6894, 0.1558, 0.7044]}, {"w": "x", "b": [0.1599, 0.6896, 0.1711, 0.7046]}, {"w": "(a", "b": [0.1774, 0.6896, 0.1938, 0.7046]}, {"w": "dot", "b": [0.1999, 0.6896, 0.2266, 0.7046]}, {"w": "product", "b": [0.2327, 0.6896, 0.2959, 0.7046]}, {"w": "of", "b": [0.302, 0.6896, 0.3169, 0.7046]}, {"w": "two", "b": [0.323, 0.6896, 0.3517, 0.7046]}, {"w": "vectors),", "b": [0.3579, 0.6896, 0.4268, 0.7046]}, {"w": "you", "b": [0.4329, 0.6896, 0.4616, 0.7046]}, {"w": "should", "b": [0.4678, 0.6896, 0.5202, 0.7046]}, {"w": "type,", "b": [0.5263, 0.6896, 0.5668, 0.7046]}]}, {"id": "b_25", "type": "paragraph", "text": "1 import numpy", "words": [{"w": "1", "b": [0.1028, 0.7224, 0.1091, 0.7298]}, {"w": "import", "b": [0.1312, 0.7162, 0.1893, 0.7312]}, {"w": "numpy", "b": [0.199, 0.7162, 0.2475, 0.7312]}]}, {"id": "b_26", "type": "equation", "text": "2 wx = numpy.dot(w,x)", "words": [{"w": "2", "b": [0.1028, 0.7403, 0.1091, 0.7478]}, {"w": "wx", "b": [0.1312, 0.7342, 0.1506, 0.7491]}, {"w": "=", "b": [0.1603, 0.7342, 0.17, 0.7491]}, {"w": "numpy.dot(w,x)", "b": [0.1797, 0.7342, 0.3153, 0.7491]}]}, {"id": "b_27", "type": "paragraph", "text": "and not,", "words": [{"w": "and", "b": [0.1312, 0.7614, 0.161, 0.7764]}, {"w": "not,", "b": [0.1671, 0.7614, 0.1989, 0.7764]}]}, {"id": "b_28", "type": "equation", "text": "1 wx = 0", "words": [{"w": "1", "b": [0.1028, 0.7942, 0.1091, 0.8016]}, {"w": "wx", "b": [0.1312, 0.788, 0.1506, 0.803]}, {"w": "=", "b": [0.1603, 0.788, 0.17, 0.803]}, {"w": "0", "b": [0.1797, 0.788, 0.1893, 0.803]}]}, {"id": "b_29", "type": "paragraph", "text": "2 for i in range(N):", "words": [{"w": "2", "b": [0.1028, 0.8121, 0.1091, 0.8196]}, {"w": "for", "b": [0.1312, 0.807, 0.1603, 0.8219]}, {"w": "i", "b": [0.17, 0.806, 0.1797, 0.8209]}, {"w": "in", "b": [0.1893, 0.807, 0.2087, 0.8219]}, {"w": "range(N):", "b": [0.2184, 0.806, 0.3056, 0.8209]}]}, {"id": "b_30", "type": "equation", "text": "3 wx += w[i]*x[i]", "words": [{"w": "3", "b": [0.1028, 0.83, 0.1091, 0.8375]}, {"w": "wx", "b": [0.17, 0.8239, 0.1893, 0.8389]}, {"w": "+=", "b": [0.199, 0.8239, 0.2184, 0.8389]}, {"w": "w[i]*x[i]", "b": [0.2281, 0.8239, 0.3153, 0.8389]}]}, {"id": "b_31", "type": "paragraph", "text": "Similarly, in R, you should type,", "words": [{"w": "Similarly,", "b": [0.1312, 0.8511, 0.2072, 0.8661]}, {"w": "in", "b": [0.2133, 0.8511, 0.2287, 0.8661]}, {"w": "R,", "b": [0.2348, 0.8511, 0.2536, 0.8661]}, {"w": "you", "b": [0.2597, 0.8511, 0.2884, 0.8661]}, {"w": "should", "b": [0.2946, 0.8511, 0.347, 0.8661]}, {"w": "type,", "b": [0.3531, 0.8511, 0.3936, 0.8661]}]}, {"id": "b_32", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 17", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "17", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 257, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "1 wx = w %*% x", "words": [{"w": "1", "b": [0.1028, 0.0942, 0.1091, 0.1017]}, {"w": "wx", "b": [0.1312, 0.0881, 0.1506, 0.1031]}, {"w": "=", "b": [0.1603, 0.0881, 0.17, 0.1031]}, {"w": "w", "b": [0.1797, 0.0881, 0.1893, 0.1031]}, {"w": "%*%", "b": [0.199, 0.0881, 0.2281, 0.1031]}, {"w": "x", "b": [0.2378, 0.0881, 0.2475, 0.1031]}]}, {"id": "b_1", "type": "paragraph", "text": "and not,", "words": [{"w": "and", "b": [0.1312, 0.1153, 0.161, 0.1303]}, {"w": "not,", "b": [0.1671, 0.1153, 0.1989, 0.1303]}]}, {"id": "b_2", "type": "equation", "text": "23 wx <- 0", "words": [{"w": "23", "b": [0.0965, 0.1481, 0.1091, 0.1555]}, {"w": "wx", "b": [0.1312, 0.1419, 0.1506, 0.1569]}, {"w": "<-", "b": [0.1603, 0.1419, 0.1797, 0.1569]}, {"w": "0", "b": [0.1893, 0.1419, 0.199, 0.1569]}]}, {"id": "b_3", "type": "paragraph", "text": "24 for (i in seq(N)):", "words": [{"w": "24", "b": [0.0965, 0.166, 0.1091, 0.1735]}, {"w": "for", "b": [0.1312, 0.1609, 0.1603, 0.1758]}, {"w": "(i", "b": [0.17, 0.1599, 0.1893, 0.1748]}, {"w": "in", "b": [0.199, 0.1609, 0.2184, 0.1758]}, {"w": "seq(N)):", "b": [0.2281, 0.1599, 0.3056, 0.1758]}]}, {"id": "b_4", "type": "equation", "text": "25 wx <- wx + w[i]*x[i]", "words": [{"w": "25", "b": [0.0965, 0.184, 0.1091, 0.1914]}, {"w": "wx", "b": [0.17, 0.1778, 0.1893, 0.1928]}, {"w": "<-", "b": [0.199, 0.1778, 0.2184, 0.1928]}, {"w": "wx", "b": [0.2281, 0.1778, 0.2475, 0.1928]}, {"w": "+", "b": [0.2572, 0.1778, 0.2668, 0.1928]}, {"w": "w[i]*x[i]", "b": [0.2765, 0.1778, 0.3637, 0.1928]}]}, {"id": "b_5", "type": "paragraph", "text": "Use appropriate data structures. If the order of elements in a collection doesn’t matter, use set instead of list. In Python, the operation of verifying whether a specific example belongs to S is fast when S is a set, and is slow when S is a list.", "words": [{"w": "Use", "b": [0.1312, 0.2049, 0.1612, 0.22]}, {"w": "appropriate", "b": [0.1675, 0.2049, 0.2628, 0.22]}, {"w": "data", "b": [0.2691, 0.2051, 0.3097, 0.22]}, {"w": "structures.", "b": [0.317, 0.2049, 0.4157, 0.22]}, {"w": "If", "b": [0.4245, 0.2049, 0.437, 0.22]}, {"w": "the", "b": [0.4434, 0.2049, 0.4695, 0.22]}, {"w": "order", "b": [0.4759, 0.2049, 0.5189, 0.22]}, {"w": "of", "b": [0.5252, 0.2049, 0.5404, 0.22]}, {"w": "elements", "b": [0.5467, 0.2049, 0.6174, 0.22]}, {"w": "in", "b": [0.6238, 0.2049, 0.6395, 0.22]}, {"w": "a", "b": [0.6458, 0.2049, 0.6552, 0.22]}, {"w": "collection", "b": [0.6615, 0.2049, 0.739, 0.22]}, {"w": "doesn’t", "b": [0.7453, 0.2049, 0.8045, 0.22]}, {"w": "matter,", "b": [0.8109, 0.2049, 0.8716, 0.22]}, {"w": "use", "b": [0.1312, 0.2229, 0.1575, 0.238]}, {"w": "set", "b": [0.1637, 0.2227, 0.1928, 0.2377]}, {"w": "instead", "b": [0.199, 0.2229, 0.2577, 0.238]}, {"w": "of", "b": [0.2639, 0.2229, 0.279, 0.238]}, {"w": "list.", "b": [0.2852, 0.2227, 0.3292, 0.238]}, {"w": "In", "b": [0.3376, 0.2229, 0.3549, 0.238]}, {"w": "Python,", "b": [0.3611, 0.2229, 0.4267, 0.238]}, {"w": "the", "b": [0.433, 0.2229, 0.4591, 0.238]}, {"w": "operation", "b": [0.4653, 0.2229, 0.5433, 0.238]}, {"w": "of", "b": [0.5495, 0.2229, 0.5647, 0.238]}, {"w": "verifying", "b": [0.5709, 0.2229, 0.6421, 0.238]}, {"w": "whether", "b": [0.6483, 0.2229, 0.7143, 0.238]}, {"w": "a", "b": [0.7205, 0.2229, 0.7299, 0.238]}, {"w": "specific", "b": [0.7361, 0.2229, 0.7954, 0.238]}, {"w": "example", "b": [0.8016, 0.2229, 0.869, 0.238]}, {"w": "belongs", "b": [0.1312, 0.2409, 0.1913, 0.2559]}, {"w": "to", "b": [0.1975, 0.2409, 0.2139, 0.2559]}, {"w": "S", "b": [0.22, 0.2407, 0.2312, 0.2557]}, {"w": "is", "b": [0.2387, 0.2409, 0.2511, 0.2559]}, {"w": "fast", "b": [0.2573, 0.2409, 0.2866, 0.2559]}, {"w": "when", "b": [0.2927, 0.2409, 0.3348, 0.2559]}, {"w": "S", "b": [0.3409, 0.2407, 0.3521, 0.2557]}, {"w": "is", "b": [0.3596, 0.2409, 0.372, 0.2559]}, {"w": "a", "b": [0.3782, 0.2409, 0.3874, 0.2559]}, {"w": "set,", "b": [0.3935, 0.2406, 0.4277, 0.2559]}, {"w": "and", "b": [0.4339, 0.2409, 0.4636, 0.2559]}, {"w": "is", "b": [0.4698, 0.2409, 0.4822, 0.2559]}, {"w": "slow", "b": [0.4883, 0.2409, 0.5228, 0.2559]}, {"w": "when", "b": [0.5289, 0.2409, 0.5709, 0.2559]}, {"w": "S", "b": [0.577, 0.2407, 0.5882, 0.2557]}, {"w": "is", "b": [0.5957, 0.2409, 0.6082, 0.2559]}, {"w": "a", "b": [0.6143, 0.2409, 0.6235, 0.2559]}, {"w": "list.", "b": [0.6297, 0.2406, 0.6735, 0.2559]}]}, {"id": "b_6", "type": "paragraph", "text": "Another important data structure to make your Python code more efficient is dict. It is called a dictionary or a hash table in other languages. It allows you to define a collection of key-value pairs with very fast lookups for keys.", "words": [{"w": "Another", "b": [0.1305, 0.2677, 0.1981, 0.2829]}, {"w": "important", "b": [0.2047, 0.2677, 0.2873, 0.2829]}, {"w": "data", "b": [0.294, 0.2677, 0.3306, 0.2829]}, {"w": "structure", "b": [0.3372, 0.2677, 0.4117, 0.2829]}, {"w": "to", "b": [0.4183, 0.2677, 0.4351, 0.2829]}, {"w": "make", "b": [0.4417, 0.2677, 0.4846, 0.2829]}, {"w": "your", "b": [0.4912, 0.2677, 0.5279, 0.2829]}, {"w": "Python", "b": [0.5345, 0.2677, 0.5949, 0.2829]}, {"w": "code", "b": [0.6016, 0.2677, 0.6387, 0.2829]}, {"w": "more", "b": [0.6453, 0.2677, 0.6862, 0.2829]}, {"w": "efficient", "b": [0.6928, 0.2677, 0.7561, 0.2829]}, {"w": "is", "b": [0.7627, 0.2677, 0.7754, 0.2829]}, {"w": "dict.", "b": [0.7818, 0.2676, 0.8257, 0.2829]}, {"w": "It", "b": [0.8354, 0.2677, 0.8495, 0.2829]}, {"w": "is", "b": [0.8561, 0.2677, 0.8688, 0.2829]}, {"w": "called", "b": [0.1312, 0.2859, 0.1766, 0.3007]}, {"w": "a", "b": [0.1828, 0.2859, 0.1918, 0.3007]}, {"w": "dictionary", "b": [0.1981, 0.2858, 0.2921, 0.3008]}, {"w": "or", "b": [0.2982, 0.2859, 0.3144, 0.3007]}, {"w": "a", "b": [0.3205, 0.2859, 0.3296, 0.3007]}, {"w": "hash", "b": [0.3359, 0.2858, 0.3782, 0.3008]}, {"w": "table", "b": [0.3853, 0.2858, 0.4312, 0.3008]}, {"w": "in", "b": [0.4374, 0.2859, 0.4525, 0.3007]}, {"w": "other", "b": [0.4586, 0.2859, 0.5, 0.3007]}, {"w": "languages.", "b": [0.5062, 0.2859, 0.5879, 0.3007]}, {"w": "It", "b": [0.5961, 0.2859, 0.6097, 0.3007]}, {"w": "allows", "b": [0.6159, 0.2859, 0.6638, 0.3007]}, {"w": "you", "b": [0.67, 0.2859, 0.6982, 0.3007]}, {"w": "to", "b": [0.7043, 0.2859, 0.7205, 0.3007]}, {"w": "define", "b": [0.7266, 0.2859, 0.773, 0.3007]}, {"w": "a", "b": [0.7791, 0.2859, 0.7882, 0.3007]}, {"w": "collection", "b": [0.7943, 0.2859, 0.869, 0.3007]}, {"w": "of", "b": [0.1312, 0.3038, 0.1461, 0.3187]}, {"w": "key-value", "b": [0.1522, 0.3038, 0.2271, 0.3187]}, {"w": "pairs", "b": [0.2333, 0.3038, 0.2724, 0.3187]}, {"w": "with", "b": [0.2785, 0.3038, 0.3144, 0.3187]}, {"w": "very", "b": [0.3206, 0.3038, 0.355, 0.3187]}, {"w": "fast", "b": [0.3611, 0.3038, 0.3905, 0.3187]}, {"w": "lookups", "b": [0.3966, 0.3038, 0.4582, 0.3187]}, {"w": "for", "b": [0.4644, 0.3038, 0.4865, 0.3187]}, {"w": "keys.", "b": [0.4927, 0.3038, 0.5322, 0.3187]}]}, {"id": "b_7", "type": "paragraph", "text": "Using libraries is generally more reliable — you should only write your own code when you are a researcher, or when it’s truly needed. Scientific Python packages like NumPy, SciPy, and scikit-learn were built by experienced scientists and engineers with efficiency in mind. They have many methods implemented compiled C and C++ for maximum performance.", "words": [{"w": "Using", "b": [0.1312, 0.3307, 0.1771, 0.3456]}, {"w": "libraries", "b": [0.1832, 0.3307, 0.2482, 0.3456]}, {"w": "is", "b": [0.2543, 0.3307, 0.2668, 0.3456]}, {"w": "generally", "b": [0.2729, 0.3307, 0.3454, 0.3456]}, {"w": "more", "b": [0.3516, 0.3307, 0.3917, 0.3456]}, {"w": "reliable", "b": [0.3978, 0.3307, 0.4565, 0.3456]}, {"w": "—", "b": [0.4626, 0.3307, 0.4811, 0.3456]}, {"w": "you", "b": [0.4873, 0.3307, 0.516, 0.3456]}, {"w": "should", "b": [0.5222, 0.3307, 0.5747, 0.3456]}, {"w": "only", "b": [0.5809, 0.3307, 0.6153, 0.3456]}, {"w": "write", "b": [0.6214, 0.3307, 0.6626, 0.3456]}, {"w": "your", "b": [0.6687, 0.3307, 0.7047, 0.3456]}, {"w": "own", "b": [0.7109, 0.3307, 0.7433, 0.3456]}, {"w": "code", "b": [0.7494, 0.3307, 0.7859, 0.3456]}, {"w": "when", "b": [0.792, 0.3307, 0.8342, 0.3456]}, {"w": "you", "b": [0.8403, 0.3307, 0.8691, 0.3456]}, {"w": "are", "b": [0.1312, 0.3485, 0.1563, 0.3636]}, {"w": "a", "b": [0.1624, 0.3485, 0.1718, 0.3636]}, {"w": "researcher,", "b": [0.178, 0.3485, 0.2653, 0.3636]}, {"w": "or", "b": [0.2714, 0.3485, 0.2881, 0.3636]}, {"w": "when", "b": [0.2943, 0.3485, 0.337, 0.3636]}, {"w": "it’s", "b": [0.3432, 0.3485, 0.3683, 0.3636]}, {"w": "truly", "b": [0.3744, 0.3485, 0.4146, 0.3636]}, {"w": "needed.", "b": [0.4207, 0.3485, 0.4822, 0.3636]}, {"w": "Scientific", "b": [0.4905, 0.3485, 0.5639, 0.3636]}, {"w": "Python", "b": [0.5701, 0.3485, 0.6302, 0.3636]}, {"w": "packages", "b": [0.6364, 0.3485, 0.7084, 0.3636]}, {"w": "like", "b": [0.7146, 0.3485, 0.7427, 0.3636]}, {"w": "NumPy,", "b": [0.7489, 0.3485, 0.8153, 0.3636]}, {"w": "SciPy,", "b": [0.8214, 0.3485, 0.8718, 0.3636]}, {"w": "and", "b": [0.1312, 0.3665, 0.1616, 0.3816]}, {"w": "scikit-learn", "b": [0.1678, 0.3665, 0.2584, 0.3816]}, {"w": "were", "b": [0.2646, 0.3665, 0.3018, 0.3816]}, {"w": "built", "b": [0.308, 0.3665, 0.3467, 0.3816]}, {"w": "by", "b": [0.3529, 0.3665, 0.3728, 0.3816]}, {"w": "experienced", "b": [0.379, 0.3665, 0.4753, 0.3816]}, {"w": "scientists", "b": [0.4815, 0.3665, 0.5556, 0.3816]}, {"w": "and", "b": [0.5618, 0.3665, 0.5921, 0.3816]}, {"w": "engineers", "b": [0.5983, 0.3665, 0.6738, 0.3816]}, {"w": "with", "b": [0.68, 0.3665, 0.7166, 0.3816]}, {"w": "efficiency", "b": [0.7228, 0.3665, 0.7976, 0.3816]}, {"w": "in", "b": [0.8038, 0.3665, 0.8195, 0.3816]}, {"w": "mind.", "b": [0.8257, 0.3665, 0.8728, 0.3816]}, {"w": "They", "b": [0.1306, 0.3845, 0.1721, 0.3995]}, {"w": "have", "b": [0.1782, 0.3845, 0.2147, 0.3995]}, {"w": "many", "b": [0.2208, 0.3845, 0.2649, 0.3995]}, {"w": "methods", "b": [0.271, 0.3845, 0.3393, 0.3995]}, {"w": "implemented", "b": [0.3455, 0.3845, 0.4485, 0.3995]}, {"w": "compiled", "b": [0.4547, 0.3845, 0.5265, 0.3995]}, {"w": "C", "b": [0.5326, 0.3845, 0.5459, 0.3995]}, {"w": "and", "b": [0.5521, 0.3845, 0.5818, 0.3995]}, {"w": "C++", "b": [0.588, 0.3845, 0.63, 0.3995]}, {"w": "for", "b": [0.6362, 0.3845, 0.6583, 0.3995]}, {"w": "maximum", "b": [0.6644, 0.3845, 0.7443, 0.3995]}, {"w": "performance.", "b": [0.7505, 0.3845, 0.8552, 0.3995]}]}, {"id": "b_8", "type": "paragraph", "text": "If you need to iterate over a vast collection of elements, use Python generators (or their R alternative in the iterators package) that create a function returning one element at a time, rather than all elements at once.", "words": [{"w": "If", "b": [0.1312, 0.4115, 0.1434, 0.4264]}, {"w": "you", "b": [0.1496, 0.4115, 0.178, 0.4264]}, {"w": "need", "b": [0.1842, 0.4115, 0.2208, 0.4264]}, {"w": "to", "b": [0.227, 0.4115, 0.2432, 0.4264]}, {"w": "iterate", "b": [0.2494, 0.4115, 0.3013, 0.4264]}, {"w": "over", "b": [0.3074, 0.4115, 0.3405, 0.4264]}, {"w": "a", "b": [0.3467, 0.4115, 0.3558, 0.4264]}, {"w": "vast", "b": [0.362, 0.4115, 0.3941, 0.4264]}, {"w": "collection", "b": [0.4003, 0.4115, 0.4755, 0.4264]}, {"w": "of", "b": [0.4816, 0.4115, 0.4964, 0.4264]}, {"w": "elements,", "b": [0.5025, 0.4115, 0.5763, 0.4264]}, {"w": "use", "b": [0.5825, 0.4115, 0.608, 0.4264]}, {"w": "Python", "b": [0.6142, 0.4115, 0.6729, 0.4264]}, {"w": "generators", "b": [0.6789, 0.4114, 0.7758, 0.4264]}, {"w": "(or", "b": [0.7819, 0.4115, 0.8054, 0.4264]}, {"w": "their", "b": [0.8115, 0.4115, 0.8492, 0.4264]}, {"w": "R", "b": [0.8553, 0.4115, 0.8688, 0.4264]}, {"w": "alternative", "b": [0.1312, 0.4295, 0.2158, 0.4443]}, {"w": "in", "b": [0.2219, 0.4295, 0.237, 0.4443]}, {"w": "the", "b": [0.2431, 0.4295, 0.2683, 0.4443]}, {"w": "iterators", "b": [0.2744, 0.4294, 0.3533, 0.4444]}, {"w": "package)", "b": [0.3594, 0.4295, 0.4288, 0.4443]}, {"w": "that", "b": [0.4349, 0.4295, 0.4681, 0.4443]}, {"w": "create", "b": [0.4743, 0.4295, 0.5216, 0.4443]}, {"w": "a", "b": [0.5277, 0.4295, 0.5368, 0.4443]}, {"w": "function", "b": [0.5429, 0.4295, 0.6078, 0.4443]}, {"w": "returning", "b": [0.6139, 0.4295, 0.6875, 0.4443]}, {"w": "one", "b": [0.6936, 0.4295, 0.7208, 0.4443]}, {"w": "element", "b": [0.7269, 0.4295, 0.7878, 0.4443]}, {"w": "at", "b": [0.7939, 0.4295, 0.81, 0.4443]}, {"w": "a", "b": [0.8161, 0.4295, 0.8252, 0.4443]}, {"w": "time,", "b": [0.8313, 0.4295, 0.8716, 0.4443]}, {"w": "rather", "b": [0.1312, 0.4473, 0.1806, 0.4623]}, {"w": "than", "b": [0.1867, 0.4473, 0.2236, 0.4623]}, {"w": "all", "b": [0.2298, 0.4473, 0.2493, 0.4623]}, {"w": "elements", "b": [0.2554, 0.4473, 0.3247, 0.4623]}, {"w": "at", "b": [0.3309, 0.4473, 0.3473, 0.4623]}, {"w": "once.", "b": [0.3534, 0.4473, 0.3945, 0.4623]}]}, {"id": "b_9", "type": "paragraph", "text": "Use the cProfile package in Python (or its R counterpart, lineprof) to find code inefficiencies.", "words": [{"w": "Use", "b": [0.1312, 0.4744, 0.16, 0.4892]}, {"w": "the", "b": [0.1645, 0.4744, 0.1897, 0.4892]}, {"w": "cProfile", "b": [0.1942, 0.4743, 0.2649, 0.4892]}, {"w": "package", "b": [0.2694, 0.4744, 0.3317, 0.4892]}, {"w": "in", "b": [0.3363, 0.4744, 0.3513, 0.4892]}, {"w": "Python", "b": [0.3559, 0.4744, 0.4139, 0.4892]}, {"w": "(or", "b": [0.4185, 0.4744, 0.4417, 0.4892]}, {"w": "its", "b": [0.4462, 0.4744, 0.4654, 0.4892]}, {"w": "R", "b": [0.47, 0.4744, 0.4833, 0.4892]}, {"w": "counterpart,", "b": [0.4878, 0.4744, 0.5849, 0.4892]}, {"w": "lineprof)", "b": [0.5897, 0.4743, 0.6697, 0.4892]}, {"w": "to", "b": [0.6742, 0.4744, 0.6903, 0.4892]}, {"w": "find", "b": [0.6949, 0.4744, 0.725, 0.4892]}, {"w": "code", "b": [0.7296, 0.4744, 0.7653, 0.4892]}, {"w": "inefficiencies.", "b": [0.7698, 0.4744, 0.8725, 0.4892]}]}, {"id": "b_10", "type": "paragraph", "text": "Finally, when nothing can be improved in your code from the algorithmic perspective, you can further boost the speed by using:", "words": [{"w": "Finally,", "b": [0.1312, 0.5011, 0.1921, 0.5161]}, {"w": "when", "b": [0.1983, 0.5011, 0.2407, 0.5161]}, {"w": "nothing", "b": [0.2469, 0.5011, 0.309, 0.5161]}, {"w": "can", "b": [0.3152, 0.5011, 0.3431, 0.5161]}, {"w": "be", "b": [0.3493, 0.5011, 0.3685, 0.5161]}, {"w": "improved", "b": [0.3746, 0.5011, 0.4498, 0.5161]}, {"w": "in", "b": [0.4559, 0.5011, 0.4715, 0.5161]}, {"w": "your", "b": [0.4776, 0.5011, 0.5139, 0.5161]}, {"w": "code", "b": [0.5201, 0.5011, 0.5569, 0.5161]}, {"w": "from", "b": [0.563, 0.5011, 0.6009, 0.5161]}, {"w": "the", "b": [0.607, 0.5011, 0.6329, 0.5161]}, {"w": "algorithmic", "b": [0.6391, 0.5011, 0.7313, 0.5161]}, {"w": "perspective,", "b": [0.7374, 0.5011, 0.8339, 0.5161]}, {"w": "you", "b": [0.8401, 0.5011, 0.8691, 0.5161]}, {"w": "can", "b": [0.1312, 0.5191, 0.1589, 0.5341]}, {"w": "further", "b": [0.1651, 0.5191, 0.2211, 0.5341]}, {"w": "boost", "b": [0.2272, 0.5191, 0.2714, 0.5341]}, {"w": "the", "b": [0.2776, 0.5191, 0.3032, 0.5341]}, {"w": "speed", "b": [0.3094, 0.5191, 0.3541, 0.5341]}, {"w": "by", "b": [0.3602, 0.5191, 0.3797, 0.5341]}, {"w": "using:", "b": [0.3859, 0.5191, 0.4332, 0.5341]}]}, {"id": "b_11", "type": "paragraph", "text": "• the multiprocessing package in Python, or its R counterpart parallel, to run com- putations in parallel; or use a distributed processing framework such as Apache Spark, and", "words": [{"w": "•", "b": [0.1538, 0.546, 0.1681, 0.561]}, {"w": "the", "b": [0.1774, 0.5459, 0.2034, 0.561]}, {"w": "multiprocessing", "b": [0.2095, 0.546, 0.3544, 0.561]}, {"w": "package", "b": [0.3607, 0.5459, 0.4253, 0.561]}, {"w": "in", "b": [0.4315, 0.5459, 0.4471, 0.561]}, {"w": "Python,", "b": [0.4533, 0.5459, 0.5186, 0.561]}, {"w": "or", "b": [0.5248, 0.5459, 0.5415, 0.561]}, {"w": "its", "b": [0.5477, 0.5459, 0.5676, 0.561]}, {"w": "R", "b": [0.5738, 0.5459, 0.5876, 0.561]}, {"w": "counterpart", "b": [0.5937, 0.5459, 0.6892, 0.561]}, {"w": "parallel,", "b": [0.6952, 0.5459, 0.769, 0.561]}, {"w": "to", "b": [0.7751, 0.5459, 0.7918, 0.561]}, {"w": "run", "b": [0.798, 0.5459, 0.8261, 0.561]}, {"w": "com-", "b": [0.8323, 0.5459, 0.8719, 0.561]}, {"w": "putations", "b": [0.1774, 0.5639, 0.2549, 0.579]}, {"w": "in", "b": [0.2636, 0.5639, 0.2793, 0.579]}, {"w": "parallel;", "b": [0.2881, 0.5639, 0.354, 0.579]}, {"w": "or", "b": [0.3641, 0.5639, 0.3809, 0.579]}, {"w": "use", "b": [0.3896, 0.5639, 0.4159, 0.579]}, {"w": "a", "b": [0.4246, 0.5639, 0.434, 0.579]}, {"w": "distributed", "b": [0.4428, 0.5639, 0.5329, 0.579]}, {"w": "processing", "b": [0.5417, 0.5639, 0.6261, 0.579]}, {"w": "framework", "b": [0.6349, 0.5639, 0.7213, 0.579]}, {"w": "such", "b": [0.73, 0.5639, 0.7662, 0.579]}, {"w": "as", "b": [0.775, 0.5639, 0.7918, 0.579]}, {"w": "Apache", "b": [0.8003, 0.564, 0.8688, 0.579]}, {"w": "Spark,", "b": [0.1774, 0.5819, 0.2365, 0.5969]}, {"w": "and", "b": [0.2426, 0.5819, 0.2723, 0.5969]}]}, {"id": "b_12", "type": "paragraph", "text": "• PyPy, Numba or similar tools to compile your Python code (or the compiler package for R) into fast, optimized machine code.", "words": [{"w": "•", "b": [0.1538, 0.6089, 0.1681, 0.6238]}, {"w": "PyPy,", "b": [0.1774, 0.6089, 0.2338, 0.6238]}, {"w": "Numba", "b": [0.239, 0.6089, 0.3065, 0.6238]}, {"w": "or", "b": [0.3119, 0.609, 0.328, 0.6238]}, {"w": "similar", "b": [0.3329, 0.609, 0.3863, 0.6238]}, {"w": "tools", "b": [0.3912, 0.609, 0.429, 0.6238]}, {"w": "to", "b": [0.4339, 0.609, 0.45, 0.6238]}, {"w": "compile", "b": [0.4549, 0.609, 0.5152, 0.6238]}, {"w": "your", "b": [0.5202, 0.609, 0.5554, 0.6238]}, {"w": "Python", "b": [0.5603, 0.609, 0.6183, 0.6238]}, {"w": "code", "b": [0.6232, 0.609, 0.6589, 0.6238]}, {"w": "(or", "b": [0.6639, 0.609, 0.687, 0.6238]}, {"w": "the", "b": [0.6919, 0.609, 0.7171, 0.6238]}, {"w": "compiler", "b": [0.7218, 0.6089, 0.8016, 0.6238]}, {"w": "package", "b": [0.8065, 0.609, 0.8688, 0.6238]}, {"w": "for", "b": [0.1774, 0.6268, 0.1995, 0.6418]}, {"w": "R)", "b": [0.2056, 0.6268, 0.2264, 0.6418]}, {"w": "into", "b": [0.2325, 0.6268, 0.2638, 0.6418]}, {"w": "fast,", "b": [0.2699, 0.6268, 0.3044, 0.6418]}, {"w": "optimized", "b": [0.3105, 0.6268, 0.3895, 0.6418]}, {"w": "machine", "b": [0.3956, 0.6268, 0.4618, 0.6418]}, {"w": "code.", "b": [0.468, 0.6268, 0.5095, 0.6418]}]}, {"id": "b_13", "type": "paragraph", "text": "8.6.2 Deployment of Deep Models", "words": [{"w": "8.6.2", "b": [0.1312, 0.6747, 0.1749, 0.6896]}, {"w": "Deployment", "b": [0.1961, 0.6747, 0.3078, 0.6896]}, {"w": "of", "b": [0.3149, 0.6747, 0.332, 0.6896]}, {"w": "Deep", "b": [0.3391, 0.6747, 0.3866, 0.6896]}, {"w": "Models", "b": [0.3936, 0.6747, 0.4608, 0.6896]}]}, {"id": "b_14", "type": "paragraph", "text": "Sometimes, to achieve the required speed, it might be necessary to do the scoring on a graphics processing unit (GPU). The cost of a GPU instance in a cloud environment is typically much higher than the cost of a “normal” instance. So only the model could be deployed in an environment with one or several GPUs optimized for fast scoring. The remainder of the application could be deployed separately in a CPU environment. This approach allows reducing the cost, but, at the same time, it might add a communication overhead between two parts of the application.", "words": [{"w": "Sometimes,", "b": [0.1312, 0.7111, 0.2244, 0.7262]}, {"w": "to", "b": [0.232, 0.7111, 0.2487, 0.7262]}, {"w": "achieve", "b": [0.256, 0.7111, 0.3151, 0.7262]}, {"w": "the", "b": [0.3224, 0.7111, 0.3486, 0.7262]}, {"w": "required", "b": [0.3559, 0.7111, 0.4235, 0.7262]}, {"w": "speed,", "b": [0.4307, 0.7111, 0.4816, 0.7262]}, {"w": "it", "b": [0.4892, 0.7111, 0.5017, 0.7262]}, {"w": "might", "b": [0.509, 0.7111, 0.5566, 0.7262]}, {"w": "be", "b": [0.5639, 0.7111, 0.5832, 0.7262]}, {"w": "necessary", "b": [0.5905, 0.7111, 0.6677, 0.7262]}, {"w": "to", "b": [0.675, 0.7111, 0.6917, 0.7262]}, {"w": "do", "b": [0.699, 0.7111, 0.7189, 0.7262]}, {"w": "the", "b": [0.7262, 0.7111, 0.7523, 0.7262]}, {"w": "scoring", "b": [0.7593, 0.7112, 0.8247, 0.7262]}, {"w": "on", "b": [0.8322, 0.7111, 0.8521, 0.7262]}, {"w": "a", "b": [0.8594, 0.7111, 0.8688, 0.7262]}, {"w": "graphics", "b": [0.1312, 0.7291, 0.1994, 0.7442]}, {"w": "processing", "b": [0.2071, 0.7291, 0.2916, 0.7442]}, {"w": "unit", "b": [0.2993, 0.7291, 0.3328, 0.7442]}, {"w": "(GPU).", "b": [0.3405, 0.7291, 0.4021, 0.7442]}, {"w": "The", "b": [0.4098, 0.7291, 0.4422, 0.7442]}, {"w": "cost", "b": [0.45, 0.7291, 0.4825, 0.7442]}, {"w": "of", "b": [0.4902, 0.7291, 0.5054, 0.7442]}, {"w": "a", "b": [0.5131, 0.7291, 0.5225, 0.7442]}, {"w": "GPU", "b": [0.5302, 0.7291, 0.5719, 0.7442]}, {"w": "instance", "b": [0.5797, 0.7291, 0.6467, 0.7442]}, {"w": "in", "b": [0.6545, 0.7291, 0.6702, 0.7442]}, {"w": "a", "b": [0.6779, 0.7291, 0.6873, 0.7442]}, {"w": "cloud", "b": [0.695, 0.7291, 0.7389, 0.7442]}, {"w": "environment", "b": [0.7467, 0.7291, 0.8487, 0.7442]}, {"w": "is", "b": [0.8565, 0.7291, 0.8691, 0.7442]}, {"w": "typically", "b": [0.1312, 0.747, 0.2019, 0.7621]}, {"w": "much", "b": [0.2089, 0.747, 0.2528, 0.7621]}, {"w": "higher", "b": [0.2599, 0.747, 0.3112, 0.7621]}, {"w": "than", "b": [0.3182, 0.747, 0.3559, 0.7621]}, {"w": "the", "b": [0.3629, 0.747, 0.3891, 0.7621]}, {"w": "cost", "b": [0.3961, 0.747, 0.4287, 0.7621]}, {"w": "of", "b": [0.4357, 0.747, 0.4509, 0.7621]}, {"w": "a", "b": [0.4579, 0.747, 0.4673, 0.7621]}, {"w": "“normal”", "b": [0.4743, 0.747, 0.5497, 0.7621]}, {"w": "instance.", "b": [0.5567, 0.747, 0.629, 0.7621]}, {"w": "So", "b": [0.6399, 0.747, 0.6597, 0.7621]}, {"w": "only", "b": [0.6668, 0.747, 0.7018, 0.7621]}, {"w": "the", "b": [0.7089, 0.747, 0.735, 0.7621]}, {"w": "model", "b": [0.7421, 0.747, 0.7917, 0.7621]}, {"w": "could", "b": [0.7988, 0.747, 0.8427, 0.7621]}, {"w": "be", "b": [0.8497, 0.747, 0.8691, 0.7621]}, {"w": "deployed", "b": [0.1312, 0.765, 0.2029, 0.7801]}, {"w": "in", "b": [0.2112, 0.765, 0.2269, 0.7801]}, {"w": "an", "b": [0.2351, 0.765, 0.255, 0.7801]}, {"w": "environment", "b": [0.2633, 0.765, 0.3654, 0.7801]}, {"w": "with", "b": [0.3736, 0.765, 0.4102, 0.7801]}, {"w": "one", "b": [0.4185, 0.765, 0.4467, 0.7801]}, {"w": "or", "b": [0.455, 0.765, 0.4718, 0.7801]}, {"w": "several", "b": [0.4801, 0.765, 0.5357, 0.7801]}, {"w": "GPUs", "b": [0.544, 0.765, 0.5931, 0.7801]}, {"w": "optimized", "b": [0.6014, 0.765, 0.6819, 0.7801]}, {"w": "for", "b": [0.6902, 0.765, 0.7127, 0.7801]}, {"w": "fast", "b": [0.721, 0.765, 0.7509, 0.7801]}, {"w": "scoring.", "b": [0.7592, 0.765, 0.8221, 0.7801]}, {"w": "The", "b": [0.8367, 0.765, 0.8691, 0.7801]}, {"w": "remainder", "b": [0.1312, 0.7829, 0.214, 0.798]}, {"w": "of", "b": [0.2215, 0.7829, 0.2367, 0.798]}, {"w": "the", "b": [0.2442, 0.7829, 0.2703, 0.798]}, {"w": "application", "b": [0.2778, 0.7829, 0.3688, 0.798]}, {"w": "could", "b": [0.3763, 0.7829, 0.4203, 0.798]}, {"w": "be", "b": [0.4278, 0.7829, 0.4471, 0.798]}, {"w": "deployed", "b": [0.4546, 0.7829, 0.5263, 0.798]}, {"w": "separately", "b": [0.5338, 0.7829, 0.6172, 0.798]}, {"w": "in", "b": [0.6247, 0.7829, 0.6404, 0.798]}, {"w": "a", "b": [0.6479, 0.7829, 0.6573, 0.798]}, {"w": "CPU", "b": [0.6648, 0.7829, 0.7053, 0.798]}, {"w": "environment.", "b": [0.7128, 0.7829, 0.8201, 0.798]}, {"w": "This", "b": [0.8324, 0.7829, 0.8691, 0.798]}, {"w": "approach", "b": [0.1312, 0.8008, 0.2061, 0.8159]}, {"w": "allows", "b": [0.2128, 0.8008, 0.2626, 0.8159]}, {"w": "reducing", "b": [0.2694, 0.8008, 0.3396, 0.8159]}, {"w": "the", "b": [0.3463, 0.8008, 0.3725, 0.8159]}, {"w": "cost,", "b": [0.3792, 0.8008, 0.417, 0.8159]}, {"w": "but,", "b": [0.4239, 0.8008, 0.4574, 0.8159]}, {"w": "at", "b": [0.4643, 0.8008, 0.481, 0.8159]}, {"w": "the", "b": [0.4878, 0.8008, 0.514, 0.8159]}, {"w": "same", "b": [0.5207, 0.8008, 0.5616, 0.8159]}, {"w": "time,", "b": [0.5684, 0.8008, 0.6102, 0.8159]}, {"w": "it", "b": [0.6171, 0.8008, 0.6297, 0.8159]}, {"w": "might", "b": [0.6364, 0.8008, 0.684, 0.8159]}, {"w": "add", "b": [0.6908, 0.8008, 0.7211, 0.8159]}, {"w": "a", "b": [0.7279, 0.8008, 0.7373, 0.8159]}, {"w": "communication", "b": [0.7441, 0.8008, 0.869, 0.8159]}, {"w": "overhead", "b": [0.1312, 0.8189, 0.2026, 0.8339]}, {"w": "between", "b": [0.2087, 0.8189, 0.2738, 0.8339]}, {"w": "two", "b": [0.28, 0.8189, 0.3087, 0.8339]}, {"w": "parts", "b": [0.3148, 0.8189, 0.356, 0.8339]}, {"w": "of", "b": [0.3622, 0.8189, 0.377, 0.8339]}, {"w": "the", "b": [0.3832, 0.8189, 0.4088, 0.8339]}, {"w": "application.", "b": [0.415, 0.8189, 0.5093, 0.8339]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 18", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "18", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 258, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "8.6.3 Caching", "words": [{"w": "8.6.3", "b": [0.1312, 0.0884, 0.1749, 0.1034]}, {"w": "Caching", "b": [0.1961, 0.0884, 0.2707, 0.1034]}]}, {"id": "b_1", "type": "paragraph", "text": "Caching is a standard practice in software engineering. Memory cache is used to store the result of a function call, so the next time that function is called with the same values of parameters, the result is read from the cache.", "words": [{"w": "Caching", "b": [0.1312, 0.125, 0.2058, 0.1399]}, {"w": "is", "b": [0.2121, 0.125, 0.2246, 0.1399]}, {"w": "a", "b": [0.2307, 0.125, 0.24, 0.1399]}, {"w": "standard", "b": [0.2461, 0.125, 0.3171, 0.1399]}, {"w": "practice", "b": [0.3233, 0.125, 0.387, 0.1399]}, {"w": "in", "b": [0.3931, 0.125, 0.4086, 0.1399]}, {"w": "software", "b": [0.4147, 0.125, 0.4811, 0.1399]}, {"w": "engineering.", "b": [0.4872, 0.125, 0.5838, 0.1399]}, {"w": "Memory", "b": [0.592, 0.125, 0.6588, 0.1399]}, {"w": "cache", "b": [0.6649, 0.125, 0.7086, 0.1399]}, {"w": "is", "b": [0.7147, 0.125, 0.7272, 0.1399]}, {"w": "used", "b": [0.7333, 0.125, 0.7694, 0.1399]}, {"w": "to", "b": [0.7755, 0.125, 0.792, 0.1399]}, {"w": "store", "b": [0.7981, 0.125, 0.8373, 0.1399]}, {"w": "the", "b": [0.8434, 0.125, 0.8691, 0.1399]}, {"w": "result", "b": [0.1312, 0.1428, 0.1774, 0.1579]}, {"w": "of", "b": [0.1845, 0.1428, 0.1997, 0.1579]}, {"w": "a", "b": [0.2067, 0.1428, 0.2161, 0.1579]}, {"w": "function", "b": [0.2232, 0.1428, 0.2906, 0.1579]}, {"w": "call,", "b": [0.2977, 0.1428, 0.3312, 0.1579]}, {"w": "so", "b": [0.3384, 0.1428, 0.3553, 0.1579]}, {"w": "the", "b": [0.3623, 0.1428, 0.3885, 0.1579]}, {"w": "next", "b": [0.3956, 0.1428, 0.4316, 0.1579]}, {"w": "time", "b": [0.4387, 0.1428, 0.4753, 0.1579]}, {"w": "that", "b": [0.4823, 0.1428, 0.5169, 0.1579]}, {"w": "function", "b": [0.5239, 0.1428, 0.5914, 0.1579]}, {"w": "is", "b": [0.5984, 0.1428, 0.6111, 0.1579]}, {"w": "called", "b": [0.6182, 0.1428, 0.6652, 0.1579]}, {"w": "with", "b": [0.6723, 0.1428, 0.7089, 0.1579]}, {"w": "the", "b": [0.7159, 0.1428, 0.7421, 0.1579]}, {"w": "same", "b": [0.7491, 0.1428, 0.79, 0.1579]}, {"w": "values", "b": [0.7971, 0.1428, 0.8469, 0.1579]}, {"w": "of", "b": [0.8539, 0.1428, 0.8691, 0.1579]}, {"w": "parameters,", "b": [0.1312, 0.1609, 0.2258, 0.1758]}, {"w": "the", "b": [0.2319, 0.1609, 0.2576, 0.1758]}, {"w": "result", "b": [0.2637, 0.1609, 0.309, 0.1758]}, {"w": "is", "b": [0.3152, 0.1609, 0.3276, 0.1758]}, {"w": "read", "b": [0.3337, 0.1609, 0.3687, 0.1758]}, {"w": "from", "b": [0.3748, 0.1609, 0.4123, 0.1758]}, {"w": "the", "b": [0.4184, 0.1609, 0.4441, 0.1758]}, {"w": "cache.", "b": [0.4502, 0.1609, 0.4989, 0.1758]}]}, {"id": "b_2", "type": "paragraph", "text": "Caching helps speed up the application when it contains resource-consuming functions that take time to process, or are frequently called with the same parameter values. In machine learning, such resource-consuming functions are models, especially when they run on GPUs.", "words": [{"w": "Caching", "b": [0.1312, 0.1878, 0.1963, 0.2027]}, {"w": "helps", "b": [0.2024, 0.1878, 0.2435, 0.2027]}, {"w": "speed", "b": [0.2497, 0.1878, 0.2944, 0.2027]}, {"w": "up", "b": [0.3005, 0.1878, 0.321, 0.2027]}, {"w": "the", "b": [0.3272, 0.1878, 0.3528, 0.2027]}, {"w": "application", "b": [0.3589, 0.1878, 0.4481, 0.2027]}, {"w": "when", "b": [0.4542, 0.1878, 0.4962, 0.2027]}, {"w": "it", "b": [0.5024, 0.1878, 0.5146, 0.2027]}, {"w": "contains", "b": [0.5208, 0.1878, 0.587, 0.2027]}, {"w": "resource-consuming", "b": [0.5931, 0.1878, 0.7502, 0.2027]}, {"w": "functions", "b": [0.7564, 0.1878, 0.8297, 0.2027]}, {"w": "that", "b": [0.8359, 0.1878, 0.8697, 0.2027]}, {"w": "take", "b": [0.1312, 0.2056, 0.1657, 0.2207]}, {"w": "time", "b": [0.1718, 0.2056, 0.2083, 0.2207]}, {"w": "to", "b": [0.2145, 0.2056, 0.2312, 0.2207]}, {"w": "process,", "b": [0.2373, 0.2056, 0.3017, 0.2207]}, {"w": "or", "b": [0.3079, 0.2056, 0.3246, 0.2207]}, {"w": "are", "b": [0.3308, 0.2056, 0.3559, 0.2207]}, {"w": "frequently", "b": [0.3621, 0.2056, 0.4445, 0.2207]}, {"w": "called", "b": [0.4507, 0.2056, 0.4976, 0.2207]}, {"w": "with", "b": [0.5038, 0.2056, 0.5403, 0.2207]}, {"w": "the", "b": [0.5465, 0.2056, 0.5725, 0.2207]}, {"w": "same", "b": [0.5787, 0.2056, 0.6195, 0.2207]}, {"w": "parameter", "b": [0.6256, 0.2056, 0.7092, 0.2207]}, {"w": "values.", "b": [0.7153, 0.2056, 0.7702, 0.2207]}, {"w": "In", "b": [0.7785, 0.2056, 0.7957, 0.2207]}, {"w": "machine", "b": [0.8018, 0.2056, 0.8691, 0.2207]}, {"w": "learning,", "b": [0.1312, 0.2237, 0.2007, 0.2386]}, {"w": "such", "b": [0.2069, 0.2237, 0.2422, 0.2386]}, {"w": "resource-consuming", "b": [0.2484, 0.2237, 0.405, 0.2386]}, {"w": "functions", "b": [0.4111, 0.2237, 0.4842, 0.2386]}, {"w": "are", "b": [0.4904, 0.2237, 0.5149, 0.2386]}, {"w": "models,", "b": [0.5211, 0.2237, 0.582, 0.2386]}, {"w": "especially", "b": [0.5881, 0.2237, 0.6648, 0.2386]}, {"w": "when", "b": [0.671, 0.2237, 0.7128, 0.2386]}, {"w": "they", "b": [0.719, 0.2237, 0.7542, 0.2386]}, {"w": "run", "b": [0.7604, 0.2237, 0.788, 0.2386]}, {"w": "on", "b": [0.7941, 0.2237, 0.8135, 0.2386]}, {"w": "GPUs.", "b": [0.8197, 0.2237, 0.8728, 0.2386]}]}, {"id": "b_3", "type": "paragraph", "text": "The simplest cache may be implemented in the application itself. For example, in Python, the lru_cache decorator can wrap a function with a memoizing callable that saves up to the maxsize most recent calls:", "words": [{"w": "The", "b": [0.1306, 0.2505, 0.1629, 0.2656]}, {"w": "simplest", "b": [0.169, 0.2505, 0.2359, 0.2656]}, {"w": "cache", "b": [0.242, 0.2505, 0.2863, 0.2656]}, {"w": "may", "b": [0.2924, 0.2505, 0.3268, 0.2656]}, {"w": "be", "b": [0.3329, 0.2505, 0.3522, 0.2656]}, {"w": "implemented", "b": [0.3583, 0.2505, 0.463, 0.2656]}, {"w": "in", "b": [0.4692, 0.2505, 0.4848, 0.2656]}, {"w": "the", "b": [0.4909, 0.2505, 0.517, 0.2656]}, {"w": "application", "b": [0.5231, 0.2505, 0.6137, 0.2656]}, {"w": "itself.", "b": [0.6199, 0.2505, 0.6643, 0.2656]}, {"w": "For", "b": [0.6725, 0.2505, 0.6999, 0.2656]}, {"w": "example,", "b": [0.706, 0.2505, 0.7784, 0.2656]}, {"w": "in", "b": [0.7845, 0.2505, 0.8002, 0.2656]}, {"w": "Python,", "b": [0.8063, 0.2505, 0.8717, 0.2656]}, {"w": "the", "b": [0.1312, 0.2685, 0.157, 0.2835]}, {"w": "lru_cache", "b": [0.1632, 0.2683, 0.2503, 0.2832]}, {"w": "decorator", "b": [0.2565, 0.2685, 0.333, 0.2835]}, {"w": "can", "b": [0.3391, 0.2685, 0.367, 0.2835]}, {"w": "wrap", "b": [0.3731, 0.2685, 0.4134, 0.2835]}, {"w": "a", "b": [0.4196, 0.2685, 0.4289, 0.2835]}, {"w": "function", "b": [0.435, 0.2685, 0.5016, 0.2835]}, {"w": "with", "b": [0.5077, 0.2685, 0.5438, 0.2835]}, {"w": "a", "b": [0.55, 0.2685, 0.5593, 0.2835]}, {"w": "memoizing", "b": [0.5655, 0.2686, 0.6648, 0.2835]}, {"w": "callable", "b": [0.6712, 0.2685, 0.7321, 0.2835]}, {"w": "that", "b": [0.7382, 0.2685, 0.7723, 0.2835]}, {"w": "saves", "b": [0.7784, 0.2685, 0.8194, 0.2835]}, {"w": "up", "b": [0.8256, 0.2685, 0.8462, 0.2835]}, {"w": "to", "b": [0.8524, 0.2685, 0.8689, 0.2835]}, {"w": "the", "b": [0.1312, 0.2865, 0.1569, 0.3014]}, {"w": "maxsize", "b": [0.163, 0.2862, 0.2308, 0.3012]}, {"w": "most", "b": [0.237, 0.2865, 0.276, 0.3014]}, {"w": "recent", "b": [0.2822, 0.2865, 0.3309, 0.3014]}, {"w": "calls:", "b": [0.3371, 0.2865, 0.3772, 0.3014]}]}, {"id": "b_4", "type": "equation", "text": "1 from functools import lru_cache", "words": [{"w": "1", "b": [0.1028, 0.3192, 0.1091, 0.3267]}, {"w": "from", "b": [0.1312, 0.3131, 0.17, 0.3281]}, {"w": "functools", "b": [0.1797, 0.3131, 0.2668, 0.3281]}, {"w": "import", "b": [0.2765, 0.3131, 0.3346, 0.3281]}, {"w": "lru_cache", "b": [0.3443, 0.3131, 0.4315, 0.3281]}]}, {"id": "b_6", "type": "paragraph", "text": "3 # Read the model from file", "words": [{"w": "3", "b": [0.1028, 0.3551, 0.1091, 0.3626]}, {"w": "#", "b": [0.1312, 0.3501, 0.1409, 0.365]}, {"w": "Read", "b": [0.1506, 0.3501, 0.1893, 0.365]}, {"w": "the", "b": [0.199, 0.3501, 0.2281, 0.365]}, {"w": "model", "b": [0.2378, 0.3501, 0.2862, 0.365]}, {"w": "from", "b": [0.2959, 0.3501, 0.3346, 0.365]}, {"w": "file", "b": [0.3443, 0.3501, 0.3831, 0.365]}]}, {"id": "b_7", "type": "equation", "text": "4 model = pickle.load(open(\"model_file.pkl\", \"rb\"))", "words": [{"w": "4", "b": [0.1028, 0.3731, 0.1091, 0.3806]}, {"w": "model", "b": [0.1312, 0.367, 0.1797, 0.3819]}, {"w": "=", "b": [0.1893, 0.367, 0.199, 0.3819]}, {"w": "pickle.load(open(\"model_file.pkl\",", "b": [0.2087, 0.367, 0.538, 0.3819]}, {"w": "\"rb\"))", "b": [0.5477, 0.367, 0.6058, 0.3819]}]}, {"id": "b_9", "type": "equation", "text": "6 @lru_cache(maxsize=500)", "words": [{"w": "6", "b": [0.1028, 0.409, 0.1091, 0.4165]}, {"w": "@lru_cache(maxsize=500)", "b": [0.1312, 0.4029, 0.354, 0.4178]}]}, {"id": "b_10", "type": "equation", "text": "7 def run_model(input_example):", "words": [{"w": "7", "b": [0.1028, 0.4269, 0.1091, 0.4344]}, {"w": "def", "b": [0.1312, 0.4218, 0.1603, 0.4367]}, {"w": "run_model(input_example):", "b": [0.17, 0.4208, 0.4121, 0.4358]}]}, {"id": "b_11", "type": "equation", "text": "8 return model.predict(input_example)", "words": [{"w": "8", "b": [0.1028, 0.4449, 0.1091, 0.4524]}, {"w": "return", "b": [0.17, 0.4397, 0.2281, 0.4547]}, {"w": "model.predict(input_example)", "b": [0.2378, 0.4387, 0.509, 0.4537]}]}, {"id": "b_13", "type": "equation", "text": "10 # Now you can call run_model", "words": [{"w": "10", "b": [0.0965, 0.4808, 0.1091, 0.4882]}, {"w": "#", "b": [0.1312, 0.4757, 0.1409, 0.4906]}, {"w": "Now", "b": [0.1506, 0.4757, 0.1797, 0.4906]}, {"w": "you", "b": [0.1893, 0.4757, 0.2184, 0.4906]}, {"w": "can", "b": [0.2281, 0.4757, 0.2571, 0.4906]}, {"w": "call", "b": [0.2668, 0.4757, 0.3056, 0.4906]}, {"w": "run_model", "b": [0.3153, 0.4757, 0.4024, 0.4906]}]}, {"id": "b_14", "type": "paragraph", "text": "11 # on new data", "words": [{"w": "11", "b": [0.0965, 0.4987, 0.1091, 0.5062]}, {"w": "#", "b": [0.1312, 0.4936, 0.1409, 0.5086]}, {"w": "on", "b": [0.1506, 0.4936, 0.17, 0.5086]}, {"w": "new", "b": [0.1797, 0.4936, 0.2087, 0.5086]}, {"w": "data", "b": [0.2184, 0.4936, 0.2571, 0.5086]}]}, {"id": "b_15", "type": "paragraph", "text": "The first time the function run_model is called for some input, model.predict will be called. For the subsequent calls of run_model with the same value of the input, the output will be read from cache that memorizes the result of maxsize most recent calls of model.predict.", "words": [{"w": "The", "b": [0.1306, 0.5199, 0.1617, 0.5347]}, {"w": "first", "b": [0.1673, 0.5199, 0.1987, 0.5347]}, {"w": "time", "b": [0.2043, 0.5199, 0.2394, 0.5347]}, {"w": "the", "b": [0.2451, 0.5199, 0.2702, 0.5347]}, {"w": "function", "b": [0.2758, 0.5199, 0.3406, 0.5347]}, {"w": "run_model", "b": [0.3462, 0.5195, 0.4333, 0.5345]}, {"w": "is", "b": [0.4389, 0.5199, 0.4511, 0.5347]}, {"w": "called", "b": [0.4567, 0.5199, 0.502, 0.5347]}, {"w": "for", "b": [0.5076, 0.5199, 0.5292, 0.5347]}, {"w": "some", "b": [0.5349, 0.5199, 0.5741, 0.5347]}, {"w": "input,", "b": [0.5798, 0.5199, 0.627, 0.5347]}, {"w": "model.predict", "b": [0.6326, 0.5195, 0.7585, 0.5345]}, {"w": "will", "b": [0.7642, 0.5199, 0.7923, 0.5347]}, {"w": "be", "b": [0.7979, 0.5199, 0.8165, 0.5347]}, {"w": "called.", "b": [0.8222, 0.5199, 0.8724, 0.5347]}, {"w": "For", "b": [0.1312, 0.5377, 0.1583, 0.5527]}, {"w": "the", "b": [0.1644, 0.5377, 0.1902, 0.5527]}, {"w": "subsequent", "b": [0.1963, 0.5377, 0.285, 0.5527]}, {"w": "calls", "b": [0.2912, 0.5377, 0.3263, 0.5527]}, {"w": "of", "b": [0.3324, 0.5377, 0.3473, 0.5527]}, {"w": "run_model", "b": [0.3534, 0.5375, 0.4405, 0.5524]}, {"w": "with", "b": [0.4467, 0.5377, 0.4827, 0.5527]}, {"w": "the", "b": [0.4889, 0.5377, 0.5146, 0.5527]}, {"w": "same", "b": [0.5207, 0.5377, 0.561, 0.5527]}, {"w": "value", "b": [0.5671, 0.5377, 0.6088, 0.5527]}, {"w": "of", "b": [0.6149, 0.5377, 0.6298, 0.5527]}, {"w": "the", "b": [0.636, 0.5377, 0.6617, 0.5527]}, {"w": "input,", "b": [0.6679, 0.5377, 0.7162, 0.5527]}, {"w": "the", "b": [0.7224, 0.5377, 0.7481, 0.5527]}, {"w": "output", "b": [0.7543, 0.5377, 0.8088, 0.5527]}, {"w": "will", "b": [0.815, 0.5377, 0.8438, 0.5527]}, {"w": "be", "b": [0.8499, 0.5377, 0.869, 0.5527]}, {"w": "read", "b": [0.1312, 0.5557, 0.1662, 0.5707]}, {"w": "from", "b": [0.1723, 0.5557, 0.2098, 0.5707]}, {"w": "cache", "b": [0.2159, 0.5557, 0.2595, 0.5707]}, {"w": "that", "b": [0.2657, 0.5557, 0.2995, 0.5707]}, {"w": "memorizes", "b": [0.3057, 0.5557, 0.3899, 0.5707]}, {"w": "the", "b": [0.396, 0.5557, 0.4217, 0.5707]}, {"w": "result", "b": [0.4278, 0.5557, 0.4731, 0.5707]}, {"w": "of", "b": [0.4793, 0.5557, 0.4941, 0.5707]}, {"w": "maxsize", "b": [0.5001, 0.5554, 0.5679, 0.5704]}, {"w": "most", "b": [0.5741, 0.5557, 0.6131, 0.5707]}, {"w": "recent", "b": [0.6193, 0.5557, 0.668, 0.5707]}, {"w": "calls", "b": [0.6742, 0.5557, 0.7092, 0.5707]}, {"w": "of", "b": [0.7153, 0.5557, 0.7302, 0.5707]}, {"w": "model.predict.", "b": [0.7363, 0.5554, 0.8673, 0.5707]}]}, {"id": "b_16", "type": "paragraph", "text": "In R, a similar result can be obtained using the memo function:", "words": [{"w": "In", "b": [0.1312, 0.5826, 0.1482, 0.5976]}, {"w": "R,", "b": [0.1543, 0.5826, 0.173, 0.5976]}, {"w": "a", "b": [0.1792, 0.5826, 0.1884, 0.5976]}, {"w": "similar", "b": [0.1945, 0.5826, 0.249, 0.5976]}, {"w": "result", "b": [0.2552, 0.5826, 0.3005, 0.5976]}, {"w": "can", "b": [0.3066, 0.5826, 0.3343, 0.5976]}, {"w": "be", "b": [0.3405, 0.5826, 0.3594, 0.5976]}, {"w": "obtained", "b": [0.3656, 0.5826, 0.4353, 0.5976]}, {"w": "using", "b": [0.4415, 0.5826, 0.4836, 0.5976]}, {"w": "the", "b": [0.4898, 0.5826, 0.5154, 0.5976]}, {"w": "memo", "b": [0.5214, 0.5823, 0.5601, 0.5973]}, {"w": "function:", "b": [0.5663, 0.5826, 0.6376, 0.5976]}]}, {"id": "b_17", "type": "paragraph", "text": "1 library(memo)", "words": [{"w": "1", "b": [0.1028, 0.6154, 0.1091, 0.6228]}, {"w": "library(memo)", "b": [0.1312, 0.6092, 0.2572, 0.6252]}]}, {"id": "b_19", "type": "equation", "text": "3 model <- readRDS(\"./model_file.rds\")", "words": [{"w": "3", "b": [0.1028, 0.6513, 0.1091, 0.6587]}, {"w": "model", "b": [0.1312, 0.6451, 0.1797, 0.6601]}, {"w": "<-", "b": [0.1893, 0.6451, 0.2087, 0.6601]}, {"w": "readRDS(\"./model_file.rds\")", "b": [0.2184, 0.6451, 0.4799, 0.6611]}]}, {"id": "b_21", "type": "equation", "text": "5 run_model <- function(input_example) {", "words": [{"w": "5", "b": [0.1028, 0.6872, 0.1091, 0.6946]}, {"w": "run_model", "b": [0.1312, 0.681, 0.2184, 0.696]}, {"w": "<-", "b": [0.2281, 0.681, 0.2475, 0.696]}, {"w": "function(input_example)", "b": [0.2571, 0.681, 0.4799, 0.697]}, {"w": "{", "b": [0.4896, 0.681, 0.4993, 0.696]}]}, {"id": "b_22", "type": "equation", "text": "6 result <- predict(model, input_example)", "words": [{"w": "6", "b": [0.1028, 0.7051, 0.1091, 0.7126]}, {"w": "result", "b": [0.17, 0.699, 0.2281, 0.7139]}, {"w": "<-", "b": [0.2378, 0.699, 0.2572, 0.7139]}, {"w": "predict(model,", "b": [0.2668, 0.699, 0.4024, 0.7149]}, {"w": "input_example)", "b": [0.4121, 0.699, 0.5477, 0.7139]}]}, {"id": "b_23", "type": "paragraph", "text": "7 result", "words": [{"w": "7", "b": [0.1028, 0.7231, 0.1091, 0.7305]}, {"w": "result", "b": [0.17, 0.7169, 0.2281, 0.7319]}]}, {"id": "b_24", "type": "equation", "text": "8 }", "words": [{"w": "8", "b": [0.1028, 0.741, 0.1091, 0.7485]}, {"w": "}", "b": [0.1312, 0.7349, 0.1409, 0.7498]}]}, {"id": "b_26", "type": "equation", "text": "10 # Create a memoized version of run_model", "words": [{"w": "10", "b": [0.0965, 0.7769, 0.1091, 0.7844]}, {"w": "#", "b": [0.1312, 0.7718, 0.1409, 0.7868]}, {"w": "Create", "b": [0.1506, 0.7718, 0.2087, 0.7868]}, {"w": "a", "b": [0.2184, 0.7718, 0.2281, 0.7868]}, {"w": "memoized", "b": [0.2378, 0.7718, 0.3153, 0.7868]}, {"w": "version", "b": [0.325, 0.7718, 0.3928, 0.7868]}, {"w": "of", "b": [0.4024, 0.7718, 0.4218, 0.7868]}, {"w": "run_model", "b": [0.4315, 0.7718, 0.5187, 0.7868]}]}, {"id": "b_27", "type": "equation", "text": "11 run_model_memo <- memo(run_model, cache = lru_cache(500))", "words": [{"w": "11", "b": [0.0965, 0.7948, 0.1091, 0.8023]}, {"w": "run_model_memo", "b": [0.1312, 0.7887, 0.2668, 0.8037]}, {"w": "<-", "b": [0.2765, 0.7887, 0.2959, 0.8037]}, {"w": "memo(run_model,", "b": [0.3056, 0.7887, 0.4509, 0.8046]}, {"w": "cache", "b": [0.4606, 0.7887, 0.509, 0.8037]}, {"w": "=", "b": [0.5187, 0.7887, 0.5284, 0.8037]}, {"w": "lru_cache(500))", "b": [0.538, 0.7887, 0.6833, 0.8046]}]}, {"id": "b_29", "type": "equation", "text": "13 # Now you can use run_model_memo", "words": [{"w": "13", "b": [0.0965, 0.8307, 0.1091, 0.8382]}, {"w": "#", "b": [0.1312, 0.8257, 0.1409, 0.8406]}, {"w": "Now", "b": [0.1506, 0.8257, 0.1797, 0.8406]}, {"w": "you", "b": [0.1893, 0.8257, 0.2184, 0.8406]}, {"w": "can", "b": [0.2281, 0.8257, 0.2571, 0.8406]}, {"w": "use", "b": [0.2668, 0.8257, 0.2959, 0.8406]}, {"w": "run_model_memo", "b": [0.3056, 0.8257, 0.4412, 0.8406]}]}, {"id": "b_30", "type": "equation", "text": "14 # instead of run_model on new data", "words": [{"w": "14", "b": [0.0965, 0.8487, 0.1091, 0.8562]}, {"w": "#", "b": [0.1312, 0.8436, 0.1409, 0.8586]}, {"w": "instead", "b": [0.1506, 0.8436, 0.2184, 0.8586]}, {"w": "of", "b": [0.2281, 0.8436, 0.2475, 0.8586]}, {"w": "run_model", "b": [0.2571, 0.8436, 0.3443, 0.8586]}, {"w": "on", "b": [0.354, 0.8436, 0.3734, 0.8586]}, {"w": "new", "b": [0.3831, 0.8436, 0.4121, 0.8586]}, {"w": "data", "b": [0.4218, 0.8436, 0.4606, 0.8586]}]}, {"id": "b_31", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 19", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "19", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 259, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Although using lru_cache and similar approaches is very convenient for an analyst, typically, in large scale production systems, engineers employ general purpose scalable and configurable cache solutions such as Redis or Memcached.", "words": [{"w": "Although", "b": [0.1305, 0.0885, 0.2044, 0.1033]}, {"w": "using", "b": [0.2099, 0.0885, 0.2512, 0.1033]}, {"w": "lru_cache", "b": [0.2566, 0.0881, 0.3438, 0.1031]}, {"w": "and", "b": [0.3493, 0.0885, 0.3784, 0.1033]}, {"w": "similar", "b": [0.3839, 0.0885, 0.4373, 0.1033]}, {"w": "approaches", "b": [0.4428, 0.0885, 0.5298, 0.1033]}, {"w": "is", "b": [0.5353, 0.0885, 0.5475, 0.1033]}, {"w": "very", "b": [0.553, 0.0885, 0.5867, 0.1033]}, {"w": "convenient", "b": [0.5922, 0.0885, 0.6756, 0.1033]}, {"w": "for", "b": [0.6811, 0.0885, 0.7027, 0.1033]}, {"w": "an", "b": [0.7082, 0.0885, 0.7273, 0.1033]}, {"w": "analyst,", "b": [0.7328, 0.0885, 0.7947, 0.1033]}, {"w": "typically,", "b": [0.8003, 0.0885, 0.8716, 0.1033]}, {"w": "in", "b": [0.1312, 0.1065, 0.1463, 0.1213]}, {"w": "large", "b": [0.1519, 0.1065, 0.1902, 0.1213]}, {"w": "scale", "b": [0.1958, 0.1065, 0.2331, 0.1213]}, {"w": "production", "b": [0.2387, 0.1065, 0.3247, 0.1213]}, {"w": "systems,", "b": [0.3304, 0.1065, 0.3965, 0.1213]}, {"w": "engineers", "b": [0.4022, 0.1065, 0.4748, 0.1213]}, {"w": "employ", "b": [0.4804, 0.1065, 0.5366, 0.1213]}, {"w": "general", "b": [0.5423, 0.1065, 0.5986, 0.1213]}, {"w": "purpose", "b": [0.6042, 0.1065, 0.6662, 0.1213]}, {"w": "scalable", "b": [0.6718, 0.1065, 0.7333, 0.1213]}, {"w": "and", "b": [0.7389, 0.1065, 0.768, 0.1213]}, {"w": "configurable", "b": [0.7737, 0.1065, 0.8692, 0.1213]}, {"w": "cache", "b": [0.1312, 0.1243, 0.1748, 0.1392]}, {"w": "solutions", "b": [0.181, 0.1243, 0.2519, 0.1392]}, {"w": "such", "b": [0.2581, 0.1243, 0.2936, 0.1392]}, {"w": "as", "b": [0.2997, 0.1243, 0.3163, 0.1392]}, {"w": "Redis", "b": [0.3223, 0.1243, 0.374, 0.1393]}, {"w": "or", "b": [0.3801, 0.1243, 0.3966, 0.1392]}, {"w": "Memcached.", "b": [0.4027, 0.1243, 0.5173, 0.1393]}]}, {"id": "b_1", "type": "paragraph", "text": "8.6.4 Delivery Format for Model and Code", "words": [{"w": "8.6.4", "b": [0.1312, 0.1721, 0.1749, 0.1871]}, {"w": "Delivery", "b": [0.1961, 0.1721, 0.2742, 0.1871]}, {"w": "Format", "b": [0.2812, 0.1721, 0.3484, 0.1871]}, {"w": "for", "b": [0.3555, 0.1721, 0.3813, 0.1871]}, {"w": "Model", "b": [0.3884, 0.1721, 0.4471, 0.1871]}, {"w": "and", "b": [0.4542, 0.1721, 0.4881, 0.1871]}, {"w": "Code", "b": [0.4952, 0.1721, 0.5432, 0.1871]}]}, {"id": "b_2", "type": "paragraph", "text": "Recall, serialization is the most straightforward way to deliver the model and the feature extractor code to the production environment.", "words": [{"w": "Recall,", "b": [0.1312, 0.2086, 0.1869, 0.2237]}, {"w": "serialization", "b": [0.1937, 0.2086, 0.2922, 0.2237]}, {"w": "is", "b": [0.2988, 0.2086, 0.3115, 0.2237]}, {"w": "the", "b": [0.3181, 0.2086, 0.3442, 0.2237]}, {"w": "most", "b": [0.3509, 0.2086, 0.3907, 0.2237]}, {"w": "straightforward", "b": [0.3973, 0.2086, 0.5236, 0.2237]}, {"w": "way", "b": [0.5303, 0.2086, 0.5622, 0.2237]}, {"w": "to", "b": [0.5688, 0.2086, 0.5855, 0.2237]}, {"w": "deliver", "b": [0.5921, 0.2086, 0.6466, 0.2237]}, {"w": "the", "b": [0.6532, 0.2086, 0.6794, 0.2237]}, {"w": "model", "b": [0.686, 0.2086, 0.7357, 0.2237]}, {"w": "and", "b": [0.7423, 0.2086, 0.7726, 0.2237]}, {"w": "the", "b": [0.7792, 0.2086, 0.8054, 0.2237]}, {"w": "feature", "b": [0.812, 0.2086, 0.8691, 0.2237]}, {"w": "extractor", "b": [0.1312, 0.2267, 0.2047, 0.2416]}, {"w": "code", "b": [0.2108, 0.2267, 0.2472, 0.2416]}, {"w": "to", "b": [0.2534, 0.2267, 0.2698, 0.2416]}, {"w": "the", "b": [0.2759, 0.2267, 0.3016, 0.2416]}, {"w": "production", "b": [0.3077, 0.2267, 0.3954, 0.2416]}, {"w": "environment.", "b": [0.4016, 0.2267, 0.5068, 0.2416]}]}, {"id": "b_3", "type": "paragraph", "text": "Every modern programming language has serialization tools. In Python, it’s pickle:", "words": [{"w": "Every", "b": [0.1312, 0.2536, 0.1782, 0.2685]}, {"w": "modern", "b": [0.1843, 0.2536, 0.2454, 0.2685]}, {"w": "programming", "b": [0.2516, 0.2536, 0.3593, 0.2685]}, {"w": "language", "b": [0.3655, 0.2536, 0.4362, 0.2685]}, {"w": "has", "b": [0.4424, 0.2536, 0.4691, 0.2685]}, {"w": "serialization", "b": [0.4753, 0.2536, 0.5718, 0.2685]}, {"w": "tools.", "b": [0.578, 0.2536, 0.6217, 0.2685]}, {"w": "In", "b": [0.6299, 0.2536, 0.6468, 0.2685]}, {"w": "Python,", "b": [0.6529, 0.2536, 0.7173, 0.2685]}, {"w": "it’s", "b": [0.7234, 0.2536, 0.7482, 0.2685]}, {"w": "pickle:", "b": [0.7541, 0.2536, 0.8125, 0.2685]}]}, {"id": "b_4", "type": "paragraph", "text": "1 import pickle", "words": [{"w": "1", "b": [0.1028, 0.2863, 0.1091, 0.2938]}, {"w": "import", "b": [0.1312, 0.2802, 0.1893, 0.2952]}, {"w": "pickle", "b": [0.199, 0.2802, 0.2571, 0.2952]}]}, {"id": "b_5", "type": "paragraph", "text": "2 from sklearn import svm, datasets", "words": [{"w": "2", "b": [0.1028, 0.3043, 0.1091, 0.3118]}, {"w": "from", "b": [0.1312, 0.2982, 0.17, 0.3131]}, {"w": "sklearn", "b": [0.1797, 0.2982, 0.2475, 0.3131]}, {"w": "import", "b": [0.2571, 0.2982, 0.3153, 0.3131]}, {"w": "svm,", "b": [0.325, 0.2982, 0.3637, 0.3131]}, {"w": "datasets", "b": [0.3734, 0.2982, 0.4509, 0.3131]}]}, {"id": "b_7", "type": "equation", "text": "4 classifier = svm.SVC()", "words": [{"w": "4", "b": [0.1028, 0.3402, 0.1091, 0.3477]}, {"w": "classifier", "b": [0.1312, 0.334, 0.2281, 0.349]}, {"w": "=", "b": [0.2378, 0.334, 0.2475, 0.349]}, {"w": "svm.SVC()", "b": [0.2571, 0.334, 0.3443, 0.349]}]}, {"id": "b_8", "type": "equation", "text": "5 X, y = datasets.load_iris(return_X_y=True)", "words": [{"w": "5", "b": [0.1028, 0.3581, 0.1091, 0.3656]}, {"w": "X,", "b": [0.1312, 0.352, 0.1506, 0.3669]}, {"w": "y", "b": [0.1603, 0.352, 0.17, 0.3669]}, {"w": "=", "b": [0.1797, 0.352, 0.1893, 0.3669]}, {"w": "datasets.load_iris(return_X_y=True)", "b": [0.199, 0.352, 0.538, 0.3669]}]}, {"id": "b_9", "type": "paragraph", "text": "6 classifier.fit(X, y)", "words": [{"w": "6", "b": [0.1028, 0.3761, 0.1091, 0.3835]}, {"w": "classifier.fit(X,", "b": [0.1312, 0.3699, 0.2959, 0.3849]}, {"w": "y)", "b": [0.3056, 0.3699, 0.325, 0.3849]}]}, {"id": "b_11", "type": "paragraph", "text": "8 # Save model to file", "words": [{"w": "8", "b": [0.1028, 0.412, 0.1091, 0.4194]}, {"w": "#", "b": [0.1312, 0.4069, 0.1409, 0.4218]}, {"w": "Save", "b": [0.1506, 0.4069, 0.1893, 0.4218]}, {"w": "model", "b": [0.199, 0.4069, 0.2475, 0.4218]}, {"w": "to", "b": [0.2571, 0.4069, 0.2765, 0.4218]}, {"w": "file", "b": [0.2862, 0.4069, 0.325, 0.4218]}]}, {"id": "b_12", "type": "paragraph", "text": "9 with open(\"model.pickle\",\"wb\") as outfile:", "words": [{"w": "9", "b": [0.1028, 0.4299, 0.1091, 0.4374]}, {"w": "with", "b": [0.1312, 0.4248, 0.17, 0.4397]}, {"w": "open(\"model.pickle\",\"wb\")", "b": [0.1797, 0.4238, 0.4218, 0.4387]}, {"w": "as", "b": [0.4315, 0.4238, 0.4509, 0.4387]}, {"w": "outfile:", "b": [0.4606, 0.4238, 0.538, 0.4387]}]}, {"id": "b_13", "type": "paragraph", "text": "10 pickle.dump(classifier, outfile)", "words": [{"w": "10", "b": [0.0965, 0.4479, 0.1091, 0.4553]}, {"w": "pickle.dump(classifier,", "b": [0.17, 0.4417, 0.3928, 0.4567]}, {"w": "outfile)", "b": [0.4024, 0.4417, 0.4799, 0.4567]}]}, {"id": "b_15", "type": "paragraph", "text": "12 # Read model from file", "words": [{"w": "12", "b": [0.0965, 0.4838, 0.1091, 0.4912]}, {"w": "#", "b": [0.1312, 0.4787, 0.1409, 0.4936]}, {"w": "Read", "b": [0.1506, 0.4787, 0.1893, 0.4936]}, {"w": "model", "b": [0.199, 0.4787, 0.2475, 0.4936]}, {"w": "from", "b": [0.2571, 0.4787, 0.2959, 0.4936]}, {"w": "file", "b": [0.3056, 0.4787, 0.3443, 0.4936]}]}, {"id": "b_16", "type": "equation", "text": "13 classifier2 = None", "words": [{"w": "13", "b": [0.0965, 0.5017, 0.1091, 0.5092]}, {"w": "classifier2", "b": [0.1312, 0.4956, 0.2378, 0.5105]}, {"w": "=", "b": [0.2475, 0.4956, 0.2571, 0.5105]}, {"w": "None", "b": [0.2668, 0.4956, 0.3056, 0.5105]}]}, {"id": "b_17", "type": "paragraph", "text": "14 with open(\"model.pickle\",\"rb\") as infile:", "words": [{"w": "14", "b": [0.0965, 0.5196, 0.1091, 0.5271]}, {"w": "with", "b": [0.1312, 0.5145, 0.17, 0.5295]}, {"w": "open(\"model.pickle\",\"rb\")", "b": [0.1797, 0.5135, 0.4218, 0.5285]}, {"w": "as", "b": [0.4315, 0.5135, 0.4509, 0.5285]}, {"w": "infile:", "b": [0.4606, 0.5135, 0.5284, 0.5285]}]}, {"id": "b_18", "type": "equation", "text": "15 classifier2 = pickle.load(infile)", "words": [{"w": "15", "b": [0.0965, 0.5376, 0.1091, 0.5451]}, {"w": "classifier2", "b": [0.17, 0.5315, 0.2765, 0.5464]}, {"w": "=", "b": [0.2862, 0.5315, 0.2959, 0.5464]}, {"w": "pickle.load(infile)", "b": [0.3056, 0.5315, 0.4896, 0.5464]}]}, {"id": "b_19", "type": "paragraph", "text": "16 if classifier2:", "words": [{"w": "16", "b": [0.0965, 0.5555, 0.1091, 0.563]}, {"w": "if", "b": [0.1312, 0.5504, 0.1506, 0.5653]}, {"w": "classifier2:", "b": [0.1603, 0.5494, 0.2765, 0.5644]}]}, {"id": "b_20", "type": "equation", "text": "17 prediction = classifier2.predict(X[0:1])", "words": [{"w": "17", "b": [0.0965, 0.5735, 0.1091, 0.581]}, {"w": "prediction", "b": [0.17, 0.5674, 0.2668, 0.5823]}, {"w": "=", "b": [0.2765, 0.5674, 0.2862, 0.5823]}, {"w": "classifier2.predict(X[0:1])", "b": [0.2959, 0.5674, 0.5574, 0.5823]}]}, {"id": "b_21", "type": "paragraph", "text": "while in R, it’s RDS:", "words": [{"w": "while", "b": [0.1306, 0.5946, 0.1726, 0.6095]}, {"w": "in", "b": [0.1788, 0.5946, 0.1941, 0.6095]}, {"w": "R,", "b": [0.2003, 0.5946, 0.219, 0.6095]}, {"w": "it’s", "b": [0.2252, 0.5946, 0.2499, 0.6095]}, {"w": "RDS:", "b": [0.256, 0.5946, 0.2991, 0.6095]}]}, {"id": "b_22", "type": "paragraph", "text": "1 library(\"e1071\")", "words": [{"w": "1", "b": [0.1028, 0.6273, 0.1091, 0.6348]}, {"w": "library(\"e1071\")", "b": [0.1312, 0.6212, 0.2862, 0.6371]}]}, {"id": "b_24", "type": "equation", "text": "3 classifier <- svm(Species ~ ., data = iris, kernel = 'linear')", "words": [{"w": "3", "b": [0.1028, 0.6632, 0.1091, 0.6707]}, {"w": "classifier", "b": [0.1312, 0.6571, 0.2281, 0.672]}, {"w": "<-", "b": [0.2378, 0.6571, 0.2571, 0.672]}, {"w": "svm(Species", "b": [0.2668, 0.6571, 0.3734, 0.673]}, {"w": "~", "b": [0.3831, 0.6571, 0.3928, 0.672]}, {"w": ".,", "b": [0.4024, 0.6571, 0.4218, 0.672]}, {"w": "data", "b": [0.4315, 0.6571, 0.4702, 0.672]}, {"w": "=", "b": [0.4799, 0.6571, 0.4896, 0.672]}, {"w": "iris,", "b": [0.4993, 0.6571, 0.5477, 0.672]}, {"w": "kernel", "b": [0.5574, 0.6571, 0.6155, 0.672]}, {"w": "=", "b": [0.6252, 0.6571, 0.6349, 0.672]}, {"w": "'linear')", "b": [0.6446, 0.6571, 0.7318, 0.672]}]}, {"id": "b_26", "type": "paragraph", "text": "5 # Save model to file", "words": [{"w": "5", "b": [0.1028, 0.6991, 0.1091, 0.7066]}, {"w": "#", "b": [0.1312, 0.694, 0.1409, 0.709]}, {"w": "Save", "b": [0.1506, 0.694, 0.1893, 0.709]}, {"w": "model", "b": [0.199, 0.694, 0.2475, 0.709]}, {"w": "to", "b": [0.2571, 0.694, 0.2765, 0.709]}, {"w": "file", "b": [0.2862, 0.694, 0.325, 0.709]}]}, {"id": "b_27", "type": "equation", "text": "6 saveRDS(classifier, \"./model.rds\")", "words": [{"w": "6", "b": [0.1028, 0.7171, 0.1091, 0.7245]}, {"w": "saveRDS(classifier,", "b": [0.1312, 0.7109, 0.3153, 0.7269]}, {"w": "\"./model.rds\")", "b": [0.325, 0.7109, 0.4606, 0.7259]}]}, {"id": "b_29", "type": "paragraph", "text": "8 # Read model from file", "words": [{"w": "8", "b": [0.1028, 0.753, 0.1091, 0.7604]}, {"w": "#", "b": [0.1312, 0.7479, 0.1409, 0.7628]}, {"w": "Read", "b": [0.1506, 0.7479, 0.1893, 0.7628]}, {"w": "model", "b": [0.199, 0.7479, 0.2475, 0.7628]}, {"w": "from", "b": [0.2571, 0.7479, 0.2959, 0.7628]}, {"w": "file", "b": [0.3056, 0.7479, 0.3443, 0.7628]}]}, {"id": "b_30", "type": "equation", "text": "9 classifier2 <- readRDS(\"./model.rds\")", "words": [{"w": "9", "b": [0.1028, 0.7709, 0.1091, 0.7784]}, {"w": "classifier2", "b": [0.1312, 0.7648, 0.2378, 0.7797]}, {"w": "<-", "b": [0.2475, 0.7648, 0.2668, 0.7797]}, {"w": "readRDS(\"./model.rds\")", "b": [0.2765, 0.7648, 0.4896, 0.7807]}]}, {"id": "b_32", "type": "equation", "text": "11 prediction <- predict(classifier2, iris[1,])", "words": [{"w": "11", "b": [0.0965, 0.8068, 0.1091, 0.8143]}, {"w": "prediction", "b": [0.1312, 0.8007, 0.2281, 0.8156]}, {"w": "<-", "b": [0.2378, 0.8007, 0.2571, 0.8156]}, {"w": "predict(classifier2,", "b": [0.2668, 0.8007, 0.4606, 0.8166]}, {"w": "iris[1,])", "b": [0.4702, 0.8007, 0.5574, 0.8156]}]}, {"id": "b_33", "type": "paragraph", "text": "In scikit-learn, it may be better to use joblib’s replacement of pickle, which is more efficient on objects that carry large NumPy arrays:", "words": [{"w": "In", "b": [0.1312, 0.828, 0.1479, 0.8428]}, {"w": "scikit-learn,", "b": [0.154, 0.828, 0.2464, 0.8428]}, {"w": "it", "b": [0.2526, 0.828, 0.2647, 0.8428]}, {"w": "may", "b": [0.2709, 0.828, 0.3041, 0.8428]}, {"w": "be", "b": [0.3103, 0.828, 0.3289, 0.8428]}, {"w": "better", "b": [0.3351, 0.828, 0.3831, 0.8428]}, {"w": "to", "b": [0.3892, 0.828, 0.4054, 0.8428]}, {"w": "use", "b": [0.4115, 0.828, 0.4369, 0.8428]}, {"w": "joblib’s", "b": [0.4429, 0.8279, 0.5075, 0.8428]}, {"w": "replacement", "b": [0.5137, 0.828, 0.609, 0.8428]}, {"w": "of", "b": [0.6152, 0.828, 0.6298, 0.8428]}, {"w": "pickle,", "b": [0.636, 0.828, 0.6864, 0.8428]}, {"w": "which", "b": [0.6926, 0.828, 0.7384, 0.8428]}, {"w": "is", "b": [0.7446, 0.828, 0.7568, 0.8428]}, {"w": "more", "b": [0.763, 0.828, 0.8023, 0.8428]}, {"w": "efficient", "b": [0.8085, 0.828, 0.8695, 0.8428]}, {"w": "on", "b": [0.1312, 0.8458, 0.1507, 0.8608]}, {"w": "objects", "b": [0.1569, 0.8458, 0.2134, 0.8608]}, {"w": "that", "b": [0.2195, 0.8458, 0.2534, 0.8608]}, {"w": "carry", "b": [0.2595, 0.8458, 0.3012, 0.8608]}, {"w": "large", "b": [0.3073, 0.8458, 0.3463, 0.8608]}, {"w": "NumPy", "b": [0.3524, 0.8458, 0.4241, 0.8608]}, {"w": "arrays:", "b": [0.4303, 0.8458, 0.4849, 0.8608]}]}, {"id": "b_34", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 20", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "20", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 260, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "1 from joblib import dump, load", "words": [{"w": "1", "b": [0.1028, 0.0942, 0.1091, 0.1017]}, {"w": "from", "b": [0.1312, 0.0881, 0.17, 0.1031]}, {"w": "joblib", "b": [0.1797, 0.0881, 0.2378, 0.1031]}, {"w": "import", "b": [0.2475, 0.0881, 0.3056, 0.1031]}, {"w": "dump,", "b": [0.3153, 0.0881, 0.3637, 0.1031]}, {"w": "load", "b": [0.3734, 0.0881, 0.4121, 0.1031]}]}, {"id": "b_2", "type": "paragraph", "text": "3 # Save model to file", "words": [{"w": "3", "b": [0.1028, 0.1301, 0.1091, 0.1376]}, {"w": "#", "b": [0.1312, 0.125, 0.1409, 0.14]}, {"w": "Save", "b": [0.1506, 0.125, 0.1893, 0.14]}, {"w": "model", "b": [0.199, 0.125, 0.2475, 0.14]}, {"w": "to", "b": [0.2571, 0.125, 0.2765, 0.14]}, {"w": "file", "b": [0.2862, 0.125, 0.325, 0.14]}]}, {"id": "b_3", "type": "paragraph", "text": "4 dump(classifier, \"model.joblib\")", "words": [{"w": "4", "b": [0.1028, 0.1481, 0.1091, 0.1555]}, {"w": "dump(classifier,", "b": [0.1312, 0.1419, 0.2862, 0.1569]}, {"w": "\"model.joblib\")", "b": [0.2959, 0.1419, 0.4412, 0.1569]}]}, {"id": "b_5", "type": "paragraph", "text": "6 # Read model from file", "words": [{"w": "6", "b": [0.1028, 0.184, 0.1091, 0.1914]}, {"w": "#", "b": [0.1312, 0.1789, 0.1409, 0.1938]}, {"w": "Read", "b": [0.1506, 0.1789, 0.1893, 0.1938]}, {"w": "model", "b": [0.199, 0.1789, 0.2475, 0.1938]}, {"w": "from", "b": [0.2571, 0.1789, 0.2959, 0.1938]}, {"w": "file", "b": [0.3056, 0.1789, 0.3443, 0.1938]}]}, {"id": "b_6", "type": "equation", "text": "7 classifier2 = load(\"model.joblib\")", "words": [{"w": "7", "b": [0.1028, 0.2019, 0.1091, 0.2094]}, {"w": "classifier2", "b": [0.1312, 0.1958, 0.2378, 0.2107]}, {"w": "=", "b": [0.2475, 0.1958, 0.2571, 0.2107]}, {"w": "load(\"model.joblib\")", "b": [0.2668, 0.1958, 0.4606, 0.2107]}]}, {"id": "b_7", "type": "paragraph", "text": "The same approach can be applied to save the serialized object of the feature extractor to a file, copy it to the production environment, and then read it from the file.", "words": [{"w": "The", "b": [0.1306, 0.223, 0.1621, 0.2379]}, {"w": "same", "b": [0.1683, 0.223, 0.2081, 0.2379]}, {"w": "approach", "b": [0.2143, 0.223, 0.2871, 0.2379]}, {"w": "can", "b": [0.2933, 0.223, 0.3207, 0.2379]}, {"w": "be", "b": [0.3269, 0.223, 0.3458, 0.2379]}, {"w": "applied", "b": [0.3519, 0.223, 0.41, 0.2379]}, {"w": "to", "b": [0.4161, 0.223, 0.4324, 0.2379]}, {"w": "save", "b": [0.4386, 0.223, 0.4718, 0.2379]}, {"w": "the", "b": [0.4779, 0.223, 0.5034, 0.2379]}, {"w": "serialized", "b": [0.5095, 0.223, 0.583, 0.2379]}, {"w": "object", "b": [0.5892, 0.223, 0.6381, 0.2379]}, {"w": "of", "b": [0.6442, 0.223, 0.659, 0.2379]}, {"w": "the", "b": [0.6651, 0.223, 0.6906, 0.2379]}, {"w": "feature", "b": [0.6968, 0.223, 0.7523, 0.2379]}, {"w": "extractor", "b": [0.7585, 0.223, 0.8314, 0.2379]}, {"w": "to", "b": [0.8375, 0.223, 0.8538, 0.2379]}, {"w": "a", "b": [0.86, 0.223, 0.8691, 0.2379]}, {"w": "file,", "b": [0.1312, 0.2409, 0.16, 0.2559]}, {"w": "copy", "b": [0.1661, 0.2409, 0.203, 0.2559]}, {"w": "it", "b": [0.2092, 0.2409, 0.2215, 0.2559]}, {"w": "to", "b": [0.2276, 0.2409, 0.244, 0.2559]}, {"w": "the", "b": [0.2502, 0.2409, 0.2758, 0.2559]}, {"w": "production", "b": [0.282, 0.2409, 0.3697, 0.2559]}, {"w": "environment,", "b": [0.3759, 0.2409, 0.481, 0.2559]}, {"w": "and", "b": [0.4872, 0.2409, 0.5169, 0.2559]}, {"w": "then", "b": [0.5231, 0.2409, 0.559, 0.2559]}, {"w": "read", "b": [0.5651, 0.2409, 0.6, 0.2559]}, {"w": "it", "b": [0.6062, 0.2409, 0.6185, 0.2559]}, {"w": "from", "b": [0.6246, 0.2409, 0.6621, 0.2559]}, {"w": "the", "b": [0.6683, 0.2409, 0.6939, 0.2559]}, {"w": "file.", "b": [0.7, 0.2409, 0.7288, 0.2559]}]}, {"id": "b_8", "type": "paragraph", "text": "For some applications, the prediction speed is critical. In such cases, the production code is written in a compiled language, such as Java or C/C++. If a data analyst has built a model using Python or R, there are three options to deploy for production:", "words": [{"w": "For", "b": [0.1312, 0.2679, 0.1581, 0.2828]}, {"w": "some", "b": [0.1642, 0.2679, 0.2041, 0.2828]}, {"w": "applications,", "b": [0.2102, 0.2679, 0.3114, 0.2828]}, {"w": "the", "b": [0.3175, 0.2679, 0.343, 0.2828]}, {"w": "prediction", "b": [0.3492, 0.2679, 0.4299, 0.2828]}, {"w": "speed", "b": [0.436, 0.2679, 0.4805, 0.2828]}, {"w": "is", "b": [0.4867, 0.2679, 0.499, 0.2828]}, {"w": "critical.", "b": [0.5052, 0.2679, 0.5654, 0.2828]}, {"w": "In", "b": [0.5736, 0.2679, 0.5905, 0.2828]}, {"w": "such", "b": [0.5966, 0.2679, 0.6319, 0.2828]}, {"w": "cases,", "b": [0.6381, 0.2679, 0.6832, 0.2828]}, {"w": "the", "b": [0.6893, 0.2679, 0.7149, 0.2828]}, {"w": "production", "b": [0.721, 0.2679, 0.8083, 0.2828]}, {"w": "code", "b": [0.8145, 0.2679, 0.8507, 0.2828]}, {"w": "is", "b": [0.8568, 0.2679, 0.8692, 0.2828]}, {"w": "written", "b": [0.1306, 0.2859, 0.188, 0.3007]}, {"w": "in", "b": [0.1942, 0.2859, 0.2093, 0.3007]}, {"w": "a", "b": [0.2154, 0.2859, 0.2245, 0.3007]}, {"w": "compiled", "b": [0.2307, 0.2859, 0.3012, 0.3007]}, {"w": "language,", "b": [0.3073, 0.2859, 0.3819, 0.3007]}, {"w": "such", "b": [0.388, 0.2859, 0.4229, 0.3007]}, {"w": "as", "b": [0.429, 0.2859, 0.4452, 0.3007]}, {"w": "Java", "b": [0.4514, 0.2859, 0.4869, 0.3007]}, {"w": "or", "b": [0.493, 0.2859, 0.5092, 0.3007]}, {"w": "C/C++.", "b": [0.5154, 0.2859, 0.5838, 0.3007]}, {"w": "If", "b": [0.592, 0.2859, 0.6041, 0.3007]}, {"w": "a", "b": [0.6103, 0.2859, 0.6194, 0.3007]}, {"w": "data", "b": [0.6255, 0.2859, 0.6607, 0.3007]}, {"w": "analyst", "b": [0.6669, 0.2859, 0.7239, 0.3007]}, {"w": "has", "b": [0.7301, 0.2859, 0.7564, 0.3007]}, {"w": "built", "b": [0.7625, 0.2859, 0.7998, 0.3007]}, {"w": "a", "b": [0.806, 0.2859, 0.815, 0.3007]}, {"w": "model", "b": [0.8212, 0.2859, 0.869, 0.3007]}, {"w": "using", "b": [0.1312, 0.3038, 0.1734, 0.3187]}, {"w": "Python", "b": [0.1795, 0.3038, 0.2388, 0.3187]}, {"w": "or", "b": [0.2449, 0.3038, 0.2614, 0.3187]}, {"w": "R,", "b": [0.2675, 0.3038, 0.2862, 0.3187]}, {"w": "there", "b": [0.2924, 0.3038, 0.3335, 0.3187]}, {"w": "are", "b": [0.3396, 0.3038, 0.3643, 0.3187]}, {"w": "three", "b": [0.3704, 0.3038, 0.4115, 0.3187]}, {"w": "options", "b": [0.4177, 0.3038, 0.4762, 0.3187]}, {"w": "to", "b": [0.4824, 0.3038, 0.4988, 0.3187]}, {"w": "deploy", "b": [0.5049, 0.3038, 0.5572, 0.3187]}, {"w": "for", "b": [0.5634, 0.3038, 0.5855, 0.3187]}, {"w": "production:", "b": [0.5916, 0.3038, 0.6845, 0.3187]}]}, {"id": "b_9", "type": "paragraph", "text": "• rewrite the code in a compiled, production-environment programming language, • use a model representation standard such as PMML or PFA, or • use a specialized execution engine such as MLeap.", "words": [{"w": "•", "b": [0.1538, 0.3307, 0.1681, 0.3456]}, {"w": "rewrite", "b": [0.1774, 0.3307, 0.2339, 0.3456]}, {"w": "the", "b": [0.24, 0.3307, 0.2657, 0.3456]}, {"w": "code", "b": [0.2718, 0.3307, 0.3082, 0.3456]}, {"w": "in", "b": [0.3144, 0.3307, 0.3297, 0.3456]}, {"w": "a", "b": [0.3359, 0.3307, 0.3451, 0.3456]}, {"w": "compiled,", "b": [0.3513, 0.3307, 0.4282, 0.3456]}, {"w": "production-environment", "b": [0.4343, 0.3307, 0.6283, 0.3456]}, {"w": "programming", "b": [0.6344, 0.3307, 0.7421, 0.3456]}, {"w": "language,", "b": [0.7483, 0.3307, 0.8242, 0.3456]}, {"w": "•", "b": [0.1538, 0.3486, 0.1681, 0.3636]}, {"w": "use", "b": [0.1774, 0.3486, 0.2031, 0.3636]}, {"w": "a", "b": [0.2093, 0.3486, 0.2185, 0.3636]}, {"w": "model", "b": [0.2246, 0.3486, 0.2733, 0.3636]}, {"w": "representation", "b": [0.2795, 0.3486, 0.394, 0.3636]}, {"w": "standard", "b": [0.4002, 0.3486, 0.4711, 0.3636]}, {"w": "such", "b": [0.4773, 0.3486, 0.5128, 0.3636]}, {"w": "as", "b": [0.5189, 0.3486, 0.5354, 0.3636]}, {"w": "PMML", "b": [0.5416, 0.3486, 0.5995, 0.3636]}, {"w": "or", "b": [0.6057, 0.3486, 0.6221, 0.3636]}, {"w": "PFA,", "b": [0.6283, 0.3486, 0.6698, 0.3636]}, {"w": "or", "b": [0.6759, 0.3486, 0.6924, 0.3636]}, {"w": "•", "b": [0.1538, 0.3666, 0.1681, 0.3815]}, {"w": "use", "b": [0.1774, 0.3666, 0.2031, 0.3815]}, {"w": "a", "b": [0.2093, 0.3666, 0.2185, 0.3815]}, {"w": "specialized", "b": [0.2246, 0.3666, 0.3104, 0.3815]}, {"w": "execution", "b": [0.3165, 0.3666, 0.393, 0.3815]}, {"w": "engine", "b": [0.3991, 0.3666, 0.4504, 0.3815]}, {"w": "such", "b": [0.4565, 0.3666, 0.492, 0.3815]}, {"w": "as", "b": [0.4982, 0.3666, 0.5147, 0.3815]}, {"w": "MLeap.", "b": [0.5208, 0.3666, 0.5821, 0.3815]}]}, {"id": "b_10", "type": "paragraph", "text": "The Predictive Model Markup Language (PMML) is an XML-based predictive model interchange format that provides a way for data analysts to save and share models between PMML-compliant applications. PMML allows analysts to develop models within one vendor’s application, and then use them within other vendors’ applications, so that proprietary issues and incompatibilities are no longer a barrier to the model exchanges between applications.", "words": [{"w": "The", "b": [0.1306, 0.3934, 0.163, 0.4085]}, {"w": "Predictive", "b": [0.1718, 0.3934, 0.2547, 0.4085]}, {"w": "Model", "b": [0.2635, 0.3934, 0.3148, 0.4085]}, {"w": "Markup", "b": [0.3235, 0.3934, 0.3884, 0.4085]}, {"w": "Language", "b": [0.3972, 0.3934, 0.4759, 0.4085]}, {"w": "(PMML)", "b": [0.4847, 0.3934, 0.5667, 0.4085]}, {"w": "is", "b": [0.5755, 0.3934, 0.5881, 0.4085]}, {"w": "an", "b": [0.5969, 0.3934, 0.6168, 0.4085]}, {"w": "XML-based", "b": [0.6255, 0.3934, 0.7211, 0.4085]}, {"w": "predictive", "b": [0.7298, 0.3934, 0.8105, 0.4085]}, {"w": "model", "b": [0.8192, 0.3934, 0.8689, 0.4085]}, {"w": "interchange", "b": [0.1312, 0.4115, 0.2233, 0.4264]}, {"w": "format", "b": [0.2295, 0.4115, 0.2832, 0.4264]}, {"w": "that", "b": [0.2893, 0.4115, 0.3231, 0.4264]}, {"w": "provides", "b": [0.3292, 0.4115, 0.3958, 0.4264]}, {"w": "a", "b": [0.402, 0.4115, 0.4112, 0.4264]}, {"w": "way", "b": [0.4174, 0.4115, 0.4485, 0.4264]}, {"w": "for", "b": [0.4547, 0.4115, 0.4767, 0.4264]}, {"w": "data", "b": [0.4829, 0.4115, 0.5187, 0.4264]}, {"w": "analysts", "b": [0.5248, 0.4115, 0.59, 0.4264]}, {"w": "to", "b": [0.5961, 0.4115, 0.6125, 0.4264]}, {"w": "save", "b": [0.6186, 0.4115, 0.652, 0.4264]}, {"w": "and", "b": [0.6581, 0.4115, 0.6878, 0.4264]}, {"w": "share", "b": [0.6939, 0.4115, 0.736, 0.4264]}, {"w": "models", "b": [0.7422, 0.4115, 0.798, 0.4264]}, {"w": "between", "b": [0.8042, 0.4115, 0.8691, 0.4264]}, {"w": "PMML-compliant", "b": [0.1312, 0.4295, 0.2719, 0.4443]}, {"w": "applications.", "b": [0.2772, 0.4295, 0.3768, 0.4443]}, {"w": "PMML", "b": [0.3847, 0.4295, 0.4415, 0.4443]}, {"w": "allows", "b": [0.4468, 0.4295, 0.4946, 0.4443]}, {"w": "analysts", "b": [0.5, 0.4295, 0.564, 0.4443]}, {"w": "to", "b": [0.5693, 0.4295, 0.5854, 0.4443]}, {"w": "develop", "b": [0.5907, 0.4295, 0.65, 0.4443]}, {"w": "models", "b": [0.6554, 0.4295, 0.7102, 0.4443]}, {"w": "within", "b": [0.7156, 0.4295, 0.7658, 0.4443]}, {"w": "one", "b": [0.7711, 0.4295, 0.7983, 0.4443]}, {"w": "vendor’s", "b": [0.8036, 0.4295, 0.8691, 0.4443]}, {"w": "application,", "b": [0.1312, 0.4474, 0.224, 0.4623]}, {"w": "and", "b": [0.2302, 0.4474, 0.2594, 0.4623]}, {"w": "then", "b": [0.2656, 0.4474, 0.3009, 0.4623]}, {"w": "use", "b": [0.307, 0.4474, 0.3323, 0.4623]}, {"w": "them", "b": [0.3385, 0.4474, 0.3788, 0.4623]}, {"w": "within", "b": [0.385, 0.4474, 0.4354, 0.4623]}, {"w": "other", "b": [0.4416, 0.4474, 0.483, 0.4623]}, {"w": "vendors’", "b": [0.4891, 0.4474, 0.5548, 0.4623]}, {"w": "applications,", "b": [0.561, 0.4474, 0.6609, 0.4623]}, {"w": "so", "b": [0.6671, 0.4474, 0.6833, 0.4623]}, {"w": "that", "b": [0.6895, 0.4474, 0.7227, 0.4623]}, {"w": "proprietary", "b": [0.7289, 0.4474, 0.8183, 0.4623]}, {"w": "issues", "b": [0.8245, 0.4474, 0.8692, 0.4623]}, {"w": "and", "b": [0.1312, 0.4653, 0.161, 0.4802]}, {"w": "incompatibilities", "b": [0.1671, 0.4653, 0.3005, 0.4802]}, {"w": "are", "b": [0.3067, 0.4653, 0.3314, 0.4802]}, {"w": "no", "b": [0.3375, 0.4653, 0.357, 0.4802]}, {"w": "longer", "b": [0.3631, 0.4653, 0.4124, 0.4802]}, {"w": "a", "b": [0.4186, 0.4653, 0.4278, 0.4802]}, {"w": "barrier", "b": [0.4339, 0.4653, 0.4884, 0.4802]}, {"w": "to", "b": [0.4946, 0.4653, 0.511, 0.4802]}, {"w": "the", "b": [0.5172, 0.4653, 0.5428, 0.4802]}, {"w": "model", "b": [0.5489, 0.4653, 0.5976, 0.4802]}, {"w": "exchanges", "b": [0.6038, 0.4653, 0.6839, 0.4802]}, {"w": "between", "b": [0.69, 0.4653, 0.7552, 0.4802]}, {"w": "applications.", "b": [0.7613, 0.4653, 0.8629, 0.4802]}]}, {"id": "b_11", "type": "paragraph", "text": "For example, imagine you use Python to build an SVM model, and then save the model as a PMML file. Let the production runtime environment be a Java Virtual Machine (JVM). As long as PMML is supported by a machine learning library for JVM, and that library has an implementation of SVM, your model can be used in production directly. You don’t need to rewrite your code or retrain the model in a JVM language.", "words": [{"w": "For", "b": [0.1312, 0.4923, 0.1577, 0.5071]}, {"w": "example,", "b": [0.1638, 0.4923, 0.2337, 0.5071]}, {"w": "imagine", "b": [0.2399, 0.4923, 0.3013, 0.5071]}, {"w": "you", "b": [0.3074, 0.4923, 0.3356, 0.5071]}, {"w": "use", "b": [0.3417, 0.4923, 0.367, 0.5071]}, {"w": "Python", "b": [0.3732, 0.4923, 0.4313, 0.5071]}, {"w": "to", "b": [0.4374, 0.4923, 0.4535, 0.5071]}, {"w": "build", "b": [0.4597, 0.4923, 0.4999, 0.5071]}, {"w": "an", "b": [0.5061, 0.4923, 0.5252, 0.5071]}, {"w": "SVM", "b": [0.5313, 0.4923, 0.5716, 0.5071]}, {"w": "model,", "b": [0.5777, 0.4923, 0.6306, 0.5071]}, {"w": "and", "b": [0.6367, 0.4923, 0.6659, 0.5071]}, {"w": "then", "b": [0.6721, 0.4923, 0.7073, 0.5071]}, {"w": "save", "b": [0.7134, 0.4923, 0.7462, 0.5071]}, {"w": "the", "b": [0.7524, 0.4923, 0.7775, 0.5071]}, {"w": "model", "b": [0.7837, 0.4923, 0.8315, 0.5071]}, {"w": "as", "b": [0.8376, 0.4923, 0.8538, 0.5071]}, {"w": "a", "b": [0.86, 0.4923, 0.8691, 0.5071]}, {"w": "PMML", "b": [0.1312, 0.5102, 0.1887, 0.5251]}, {"w": "file.", "b": [0.1949, 0.5102, 0.2234, 0.5251]}, {"w": "Let", "b": [0.2316, 0.5102, 0.2583, 0.5251]}, {"w": "the", "b": [0.2645, 0.5102, 0.2899, 0.5251]}, {"w": "production", "b": [0.2961, 0.5102, 0.3831, 0.5251]}, {"w": "runtime", "b": [0.3893, 0.5102, 0.4519, 0.5251]}, {"w": "environment", "b": [0.458, 0.5102, 0.5573, 0.5251]}, {"w": "be", "b": [0.5634, 0.5102, 0.5823, 0.5251]}, {"w": "a", "b": [0.5884, 0.5102, 0.5976, 0.5251]}, {"w": "Java", "b": [0.6037, 0.5102, 0.6396, 0.5251]}, {"w": "Virtual", "b": [0.6457, 0.5102, 0.7033, 0.5251]}, {"w": "Machine", "b": [0.7094, 0.5102, 0.7765, 0.5251]}, {"w": "(JVM).", "b": [0.7827, 0.5102, 0.842, 0.5251]}, {"w": "As", "b": [0.8481, 0.5102, 0.8691, 0.5251]}, {"w": "long", "b": [0.1312, 0.5281, 0.1647, 0.543]}, {"w": "as", "b": [0.1709, 0.5281, 0.1872, 0.543]}, {"w": "PMML", "b": [0.1934, 0.5281, 0.2507, 0.543]}, {"w": "is", "b": [0.2569, 0.5281, 0.2692, 0.543]}, {"w": "supported", "b": [0.2753, 0.5281, 0.3552, 0.543]}, {"w": "by", "b": [0.3613, 0.5281, 0.3806, 0.543]}, {"w": "a", "b": [0.3867, 0.5281, 0.3959, 0.543]}, {"w": "machine", "b": [0.402, 0.5281, 0.4675, 0.543]}, {"w": "learning", "b": [0.4736, 0.5281, 0.5376, 0.543]}, {"w": "library", "b": [0.5438, 0.5281, 0.5972, 0.543]}, {"w": "for", "b": [0.6033, 0.5281, 0.6252, 0.543]}, {"w": "JVM,", "b": [0.6313, 0.5281, 0.6763, 0.543]}, {"w": "and", "b": [0.6824, 0.5281, 0.7118, 0.543]}, {"w": "that", "b": [0.718, 0.5281, 0.7515, 0.543]}, {"w": "library", "b": [0.7576, 0.5281, 0.811, 0.543]}, {"w": "has", "b": [0.8171, 0.5281, 0.8437, 0.543]}, {"w": "an", "b": [0.8498, 0.5281, 0.8691, 0.543]}, {"w": "implementation", "b": [0.1312, 0.546, 0.257, 0.561]}, {"w": "of", "b": [0.2631, 0.546, 0.278, 0.561]}, {"w": "SVM,", "b": [0.2842, 0.546, 0.3304, 0.561]}, {"w": "your", "b": [0.3365, 0.546, 0.3725, 0.561]}, {"w": "model", "b": [0.3787, 0.546, 0.4274, 0.561]}, {"w": "can", "b": [0.4336, 0.546, 0.4613, 0.561]}, {"w": "be", "b": [0.4674, 0.546, 0.4864, 0.561]}, {"w": "used", "b": [0.4926, 0.546, 0.5287, 0.561]}, {"w": "in", "b": [0.5348, 0.546, 0.5502, 0.561]}, {"w": "production", "b": [0.5564, 0.546, 0.6442, 0.561]}, {"w": "directly.", "b": [0.6504, 0.546, 0.7151, 0.561]}, {"w": "You", "b": [0.7233, 0.546, 0.7551, 0.561]}, {"w": "don’t", "b": [0.7613, 0.546, 0.8034, 0.561]}, {"w": "need", "b": [0.8096, 0.546, 0.8465, 0.561]}, {"w": "to", "b": [0.8527, 0.546, 0.8691, 0.561]}, {"w": "rewrite", "b": [0.1312, 0.564, 0.1877, 0.5789]}, {"w": "your", "b": [0.1939, 0.564, 0.2298, 0.5789]}, {"w": "code", "b": [0.236, 0.564, 0.2724, 0.5789]}, {"w": "or", "b": [0.2786, 0.564, 0.295, 0.5789]}, {"w": "retrain", "b": [0.3012, 0.564, 0.3556, 0.5789]}, {"w": "the", "b": [0.3618, 0.564, 0.3874, 0.5789]}, {"w": "model", "b": [0.3935, 0.564, 0.4423, 0.5789]}, {"w": "in", "b": [0.4484, 0.564, 0.4638, 0.5789]}, {"w": "a", "b": [0.4699, 0.564, 0.4792, 0.5789]}, {"w": "JVM", "b": [0.4853, 0.564, 0.5255, 0.5789]}, {"w": "language.", "b": [0.5317, 0.564, 0.6076, 0.5789]}]}, {"id": "b_12", "type": "paragraph", "text": "The Portable Format for Analytics (PFA) is a more recent standard for representing both statistical models and data transformation engines. PFA allows us to easily share models and machine learning pipelines across heterogeneous systems and provides algorithmic flexibility. Models, pre- and post-processing transformations are all functions that can be arbitrarily composed, chained, or built into complex workflows. PFA has a form of a JavaScript Object Notation (JSON) or a YAML Ain’t Markup Language (YAML) configuration file.", "words": [{"w": "The", "b": [0.1306, 0.5908, 0.1627, 0.6059]}, {"w": "Portable", "b": [0.1688, 0.5908, 0.2381, 0.6059]}, {"w": "Format", "b": [0.2442, 0.5908, 0.3036, 0.6059]}, {"w": "for", "b": [0.3098, 0.5908, 0.3321, 0.6059]}, {"w": "Analytics", "b": [0.3382, 0.5908, 0.4151, 0.6059]}, {"w": "(PFA)", "b": [0.4212, 0.5908, 0.4771, 0.6059]}, {"w": "is", "b": [0.4833, 0.5908, 0.4958, 0.6059]}, {"w": "a", "b": [0.5019, 0.5908, 0.5113, 0.6059]}, {"w": "more", "b": [0.5174, 0.5908, 0.5579, 0.6059]}, {"w": "recent", "b": [0.564, 0.5908, 0.6133, 0.6059]}, {"w": "standard", "b": [0.6195, 0.5908, 0.6912, 0.6059]}, {"w": "for", "b": [0.6973, 0.5908, 0.7196, 0.6059]}, {"w": "representing", "b": [0.7258, 0.5908, 0.825, 0.6059]}, {"w": "both", "b": [0.8312, 0.5908, 0.869, 0.6059]}, {"w": "statistical", "b": [0.1312, 0.609, 0.2078, 0.6238]}, {"w": "models", "b": [0.2135, 0.609, 0.2684, 0.6238]}, {"w": "and", "b": [0.2741, 0.609, 0.3032, 0.6238]}, {"w": "data", "b": [0.3089, 0.609, 0.3441, 0.6238]}, {"w": "transformation", "b": [0.3498, 0.609, 0.4671, 0.6238]}, {"w": "engines.", "b": [0.4728, 0.609, 0.5352, 0.6238]}, {"w": "PFA", "b": [0.5432, 0.609, 0.5789, 0.6238]}, {"w": "allows", "b": [0.5846, 0.609, 0.6324, 0.6238]}, {"w": "us", "b": [0.6381, 0.609, 0.6553, 0.6238]}, {"w": "to", "b": [0.661, 0.609, 0.6771, 0.6238]}, {"w": "easily", "b": [0.6828, 0.609, 0.7266, 0.6238]}, {"w": "share", "b": [0.7323, 0.609, 0.7737, 0.6238]}, {"w": "models", "b": [0.7794, 0.609, 0.8342, 0.6238]}, {"w": "and", "b": [0.8399, 0.609, 0.8691, 0.6238]}, {"w": "machine", "b": [0.1312, 0.6268, 0.1968, 0.6417]}, {"w": "learning", "b": [0.203, 0.6268, 0.2671, 0.6417]}, {"w": "pipelines", "b": [0.2733, 0.6268, 0.3431, 0.6417]}, {"w": "across", "b": [0.3492, 0.6268, 0.3973, 0.6417]}, {"w": "heterogeneous", "b": [0.4034, 0.6268, 0.5155, 0.6417]}, {"w": "systems", "b": [0.5216, 0.6268, 0.5835, 0.6417]}, {"w": "and", "b": [0.5897, 0.6268, 0.6192, 0.6417]}, {"w": "provides", "b": [0.6253, 0.6268, 0.6916, 0.6417]}, {"w": "algorithmic", "b": [0.6977, 0.6268, 0.7883, 0.6417]}, {"w": "flexibility.", "b": [0.7944, 0.6268, 0.8728, 0.6417]}, {"w": "Models,", "b": [0.1312, 0.6446, 0.1951, 0.6597]}, {"w": "pre-", "b": [0.2016, 0.6446, 0.234, 0.6597]}, {"w": "and", "b": [0.2404, 0.6446, 0.2708, 0.6597]}, {"w": "post-processing", "b": [0.2771, 0.6446, 0.403, 0.6597]}, {"w": "transformations", "b": [0.4093, 0.6446, 0.5388, 0.6597]}, {"w": "are", "b": [0.5452, 0.6446, 0.5704, 0.6597]}, {"w": "all", "b": [0.5767, 0.6446, 0.5966, 0.6597]}, {"w": "functions", "b": [0.603, 0.6446, 0.6779, 0.6597]}, {"w": "that", "b": [0.6842, 0.6446, 0.7188, 0.6597]}, {"w": "can", "b": [0.7251, 0.6446, 0.7534, 0.6597]}, {"w": "be", "b": [0.7597, 0.6446, 0.7791, 0.6597]}, {"w": "arbitrarily", "b": [0.7854, 0.6446, 0.8698, 0.6597]}, {"w": "composed,", "b": [0.1312, 0.6628, 0.2139, 0.6776]}, {"w": "chained,", "b": [0.2201, 0.6628, 0.2854, 0.6776]}, {"w": "or", "b": [0.2916, 0.6628, 0.3078, 0.6776]}, {"w": "built", "b": [0.314, 0.6628, 0.3515, 0.6776]}, {"w": "into", "b": [0.3576, 0.6628, 0.3885, 0.6776]}, {"w": "complex", "b": [0.3947, 0.6628, 0.46, 0.6776]}, {"w": "workflows.", "b": [0.4662, 0.6628, 0.5489, 0.6776]}, {"w": "PFA", "b": [0.5571, 0.6628, 0.593, 0.6776]}, {"w": "has", "b": [0.5992, 0.6628, 0.6256, 0.6776]}, {"w": "a", "b": [0.6318, 0.6628, 0.6409, 0.6776]}, {"w": "form", "b": [0.647, 0.6628, 0.6841, 0.6776]}, {"w": "of", "b": [0.6902, 0.6628, 0.7049, 0.6776]}, {"w": "a", "b": [0.7111, 0.6628, 0.7202, 0.6776]}, {"w": "JavaScript", "b": [0.7263, 0.6628, 0.8097, 0.6776]}, {"w": "Object", "b": [0.8159, 0.6628, 0.8696, 0.6776]}, {"w": "Notation", "b": [0.1312, 0.6806, 0.2025, 0.6956]}, {"w": "(JSON)", "b": [0.2086, 0.6806, 0.2709, 0.6956]}, {"w": "or", "b": [0.2771, 0.6806, 0.2935, 0.6956]}, {"w": "a", "b": [0.2997, 0.6806, 0.3089, 0.6956]}, {"w": "YAML", "b": [0.315, 0.6806, 0.3696, 0.6956]}, {"w": "Ain’t", "b": [0.3758, 0.6806, 0.4173, 0.6956]}, {"w": "Markup", "b": [0.4235, 0.6806, 0.4871, 0.6956]}, {"w": "Language", "b": [0.4932, 0.6806, 0.5704, 0.6956]}, {"w": "(YAML)", "b": [0.5765, 0.6806, 0.6455, 0.6956]}, {"w": "configuration", "b": [0.6516, 0.6806, 0.7573, 0.6956]}, {"w": "file.", "b": [0.7635, 0.6806, 0.7922, 0.6956]}]}, {"id": "b_13", "type": "paragraph", "text": "There are open source generic “evaluators” for models or pipelines saved as PMML or PFA formatted files. JPMML (for Java PMML) and Hadrian are two of the most widely adopted. Evaluators read the model or the pipeline from a file, execute it by applying it to the input data, and output the prediction.", "words": [{"w": "There", "b": [0.1306, 0.7076, 0.1778, 0.7225]}, {"w": "are", "b": [0.184, 0.7076, 0.2087, 0.7225]}, {"w": "open", "b": [0.2149, 0.7076, 0.2534, 0.7225]}, {"w": "source", "b": [0.2595, 0.7076, 0.31, 0.7225]}, {"w": "generic", "b": [0.3162, 0.7076, 0.3727, 0.7225]}, {"w": "“evaluators”", "b": [0.3789, 0.7076, 0.4781, 0.7225]}, {"w": "for", "b": [0.4842, 0.7076, 0.5064, 0.7225]}, {"w": "models", "b": [0.5125, 0.7076, 0.5686, 0.7225]}, {"w": "or", "b": [0.5747, 0.7076, 0.5912, 0.7225]}, {"w": "pipelines", "b": [0.5974, 0.7076, 0.6678, 0.7225]}, {"w": "saved", "b": [0.674, 0.7076, 0.7177, 0.7225]}, {"w": "as", "b": [0.7239, 0.7076, 0.7404, 0.7225]}, {"w": "PMML", "b": [0.7466, 0.7076, 0.8046, 0.7225]}, {"w": "or", "b": [0.8108, 0.7076, 0.8272, 0.7225]}, {"w": "PFA", "b": [0.8334, 0.7076, 0.8698, 0.7225]}, {"w": "formatted", "b": [0.1312, 0.7254, 0.2123, 0.7405]}, {"w": "files.", "b": [0.2207, 0.7254, 0.2574, 0.7405]}, {"w": "JPMML", "b": [0.2721, 0.7255, 0.3506, 0.7405]}, {"w": "(for", "b": [0.3589, 0.7254, 0.3888, 0.7405]}, {"w": "Java", "b": [0.3971, 0.7254, 0.434, 0.7405]}, {"w": "PMML)", "b": [0.4423, 0.7254, 0.5087, 0.7405]}, {"w": "and", "b": [0.517, 0.7254, 0.5474, 0.7405]}, {"w": "Hadrian", "b": [0.5556, 0.7255, 0.6311, 0.7405]}, {"w": "are", "b": [0.6395, 0.7254, 0.6646, 0.7405]}, {"w": "two", "b": [0.6729, 0.7254, 0.7022, 0.7405]}, {"w": "of", "b": [0.7106, 0.7254, 0.7257, 0.7405]}, {"w": "the", "b": [0.7341, 0.7254, 0.7602, 0.7405]}, {"w": "most", "b": [0.7685, 0.7254, 0.8084, 0.7405]}, {"w": "widely", "b": [0.8167, 0.7254, 0.8695, 0.7405]}, {"w": "adopted.", "b": [0.1312, 0.7434, 0.2012, 0.7584]}, {"w": "Evaluators", "b": [0.2094, 0.7434, 0.2957, 0.7584]}, {"w": "read", "b": [0.3019, 0.7434, 0.3369, 0.7584]}, {"w": "the", "b": [0.343, 0.7434, 0.3688, 0.7584]}, {"w": "model", "b": [0.3749, 0.7434, 0.4238, 0.7584]}, {"w": "or", "b": [0.4299, 0.7434, 0.4464, 0.7584]}, {"w": "the", "b": [0.4526, 0.7434, 0.4783, 0.7584]}, {"w": "pipeline", "b": [0.4845, 0.7434, 0.5477, 0.7584]}, {"w": "from", "b": [0.5539, 0.7434, 0.5915, 0.7584]}, {"w": "a", "b": [0.5976, 0.7434, 0.6069, 0.7584]}, {"w": "file,", "b": [0.6131, 0.7434, 0.6419, 0.7584]}, {"w": "execute", "b": [0.648, 0.7434, 0.7082, 0.7584]}, {"w": "it", "b": [0.7144, 0.7434, 0.7267, 0.7584]}, {"w": "by", "b": [0.7329, 0.7434, 0.7524, 0.7584]}, {"w": "applying", "b": [0.7586, 0.7434, 0.828, 0.7584]}, {"w": "it", "b": [0.8342, 0.7434, 0.8465, 0.7584]}, {"w": "to", "b": [0.8527, 0.7434, 0.8691, 0.7584]}, {"w": "the", "b": [0.1312, 0.7614, 0.1569, 0.7764]}, {"w": "input", "b": [0.163, 0.7614, 0.2061, 0.7764]}, {"w": "data,", "b": [0.2122, 0.7614, 0.2533, 0.7764]}, {"w": "and", "b": [0.2594, 0.7614, 0.2892, 0.7764]}, {"w": "output", "b": [0.2953, 0.7614, 0.3497, 0.7764]}, {"w": "the", "b": [0.3558, 0.7614, 0.3814, 0.7764]}, {"w": "prediction.", "b": [0.3876, 0.7614, 0.4738, 0.7764]}]}, {"id": "b_14", "type": "paragraph", "text": "Unfortunately, PMML and PFA are not widely supported by the popular machine learning libraries and frameworks.2 For example, scikit-learn doesn’t support those standards, though side-projects such as SkLearn2PMML can convert scikit-learn objects to PMML.", "words": [{"w": "Unfortunately,", "b": [0.1312, 0.7883, 0.2484, 0.8033]}, {"w": "PMML", "b": [0.2546, 0.7883, 0.3126, 0.8033]}, {"w": "and", "b": [0.3188, 0.7883, 0.3486, 0.8033]}, {"w": "PFA", "b": [0.3547, 0.7883, 0.3912, 0.8033]}, {"w": "are", "b": [0.3973, 0.7883, 0.422, 0.8033]}, {"w": "not", "b": [0.4282, 0.7883, 0.4549, 0.8033]}, {"w": "widely", "b": [0.461, 0.7883, 0.5129, 0.8033]}, {"w": "supported", "b": [0.5191, 0.7883, 0.5999, 0.8033]}, {"w": "by", "b": [0.606, 0.7883, 0.6256, 0.8033]}, {"w": "the", "b": [0.6317, 0.7883, 0.6574, 0.8033]}, {"w": "popular", "b": [0.6635, 0.7883, 0.7257, 0.8033]}, {"w": "machine", "b": [0.7319, 0.7883, 0.7982, 0.8033]}, {"w": "learning", "b": [0.8043, 0.7883, 0.8691, 0.8033]}, {"w": "libraries", "b": [0.1312, 0.8064, 0.1948, 0.8212]}, {"w": "and", "b": [0.2008, 0.8064, 0.2299, 0.8212]}, {"w": "frameworks.2", "b": [0.2359, 0.8043, 0.3383, 0.8212]}, {"w": "For", "b": [0.3474, 0.8064, 0.3738, 0.8212]}, {"w": "example,", "b": [0.3798, 0.8064, 0.4497, 0.8212]}, {"w": "scikit-learn", "b": [0.4557, 0.8064, 0.5428, 0.8212]}, {"w": "doesn’t", "b": [0.5488, 0.8064, 0.6057, 0.8212]}, {"w": "support", "b": [0.6117, 0.8064, 0.6727, 0.8212]}, {"w": "those", "b": [0.6787, 0.8064, 0.72, 0.8212]}, {"w": "standards,", "b": [0.7261, 0.8064, 0.8077, 0.8212]}, {"w": "though", "b": [0.8138, 0.8064, 0.869, 0.8212]}, {"w": "side-projects", "b": [0.1312, 0.8242, 0.232, 0.8392]}, {"w": "such", "b": [0.2382, 0.8242, 0.2737, 0.8392]}, {"w": "as", "b": [0.2798, 0.8242, 0.2963, 0.8392]}, {"w": "SkLearn2PMML", "b": [0.3024, 0.8242, 0.4568, 0.8392]}, {"w": "can", "b": [0.463, 0.8242, 0.4907, 0.8392]}, {"w": "convert", "b": [0.4968, 0.8242, 0.5558, 0.8392]}, {"w": "scikit-learn", "b": [0.562, 0.8242, 0.6509, 0.8392]}, {"w": "objects", "b": [0.657, 0.8242, 0.7135, 0.8392]}, {"w": "to", "b": [0.7197, 0.8242, 0.7361, 0.8392]}, {"w": "PMML.", "b": [0.7422, 0.8242, 0.8053, 0.8392]}]}, {"id": "b_15", "type": "paragraph", "text": "2As of July 2020.", "words": [{"w": "2As", "b": [0.1518, 0.851, 0.1774, 0.8648]}, {"w": "of", "b": [0.1826, 0.8529, 0.1953, 0.8648]}, {"w": "July", "b": [0.2005, 0.8529, 0.2299, 0.8648]}, {"w": "2020.", "b": [0.2351, 0.8529, 0.2708, 0.8648]}]}, {"id": "b_16", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 21", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "21", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 261, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Alternatively, such execution engines as MLeap can execute machine learning models and pipelines fast in a JVM environment. At the time of the writing of this book, MLeap could execute models and pipelines created in Apache Spark and scikit-learn.", "words": [{"w": "Alternatively,", "b": [0.1305, 0.0883, 0.2409, 0.1034]}, {"w": "such", "b": [0.2471, 0.0883, 0.2829, 0.1034]}, {"w": "execution", "b": [0.289, 0.0883, 0.3662, 0.1034]}, {"w": "engines", "b": [0.3723, 0.0883, 0.4315, 0.1034]}, {"w": "as", "b": [0.4376, 0.0883, 0.4543, 0.1034]}, {"w": "MLeap", "b": [0.4602, 0.0884, 0.5249, 0.1034]}, {"w": "can", "b": [0.5311, 0.0883, 0.559, 0.1034]}, {"w": "execute", "b": [0.5652, 0.0883, 0.6258, 0.1034]}, {"w": "machine", "b": [0.6319, 0.0883, 0.6987, 0.1034]}, {"w": "learning", "b": [0.7048, 0.0883, 0.7701, 0.1034]}, {"w": "models", "b": [0.7762, 0.0883, 0.8328, 0.1034]}, {"w": "and", "b": [0.8389, 0.0883, 0.8689, 0.1034]}, {"w": "pipelines", "b": [0.1312, 0.1063, 0.2015, 0.1213]}, {"w": "fast", "b": [0.2077, 0.1063, 0.237, 0.1213]}, {"w": "in", "b": [0.2431, 0.1063, 0.2585, 0.1213]}, {"w": "a", "b": [0.2646, 0.1063, 0.2738, 0.1213]}, {"w": "JVM", "b": [0.28, 0.1063, 0.3202, 0.1213]}, {"w": "environment.", "b": [0.3263, 0.1063, 0.4314, 0.1213]}, {"w": "At", "b": [0.4396, 0.1063, 0.46, 0.1213]}, {"w": "the", "b": [0.4662, 0.1063, 0.4918, 0.1213]}, {"w": "time", "b": [0.4979, 0.1063, 0.5338, 0.1213]}, {"w": "of", "b": [0.5399, 0.1063, 0.5548, 0.1213]}, {"w": "the", "b": [0.5609, 0.1063, 0.5865, 0.1213]}, {"w": "writing", "b": [0.5926, 0.1063, 0.6501, 0.1213]}, {"w": "of", "b": [0.6562, 0.1063, 0.6711, 0.1213]}, {"w": "this", "b": [0.6772, 0.1063, 0.707, 0.1213]}, {"w": "book,", "b": [0.7131, 0.1063, 0.7577, 0.1213]}, {"w": "MLeap", "b": [0.7638, 0.1063, 0.8199, 0.1213]}, {"w": "could", "b": [0.8261, 0.1063, 0.8691, 0.1213]}, {"w": "execute", "b": [0.1312, 0.1243, 0.1912, 0.1392]}, {"w": "models", "b": [0.1974, 0.1243, 0.2534, 0.1392]}, {"w": "and", "b": [0.2595, 0.1243, 0.2893, 0.1392]}, {"w": "pipelines", "b": [0.2954, 0.1243, 0.3658, 0.1392]}, {"w": "created", "b": [0.3719, 0.1243, 0.4305, 0.1392]}, {"w": "in", "b": [0.4366, 0.1243, 0.452, 0.1392]}, {"w": "Apache", "b": [0.4581, 0.1243, 0.5176, 0.1392]}, {"w": "Spark", "b": [0.5238, 0.1243, 0.5705, 0.1392]}, {"w": "and", "b": [0.5766, 0.1243, 0.6064, 0.1392]}, {"w": "scikit-learn.", "b": [0.6125, 0.1243, 0.7065, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "Now, let us briefly outline several useful and practical tips for model deployment.", "words": [{"w": "Now,", "b": [0.1312, 0.1512, 0.1722, 0.1662]}, {"w": "let", "b": [0.1784, 0.1512, 0.1989, 0.1662]}, {"w": "us", "b": [0.205, 0.1512, 0.2226, 0.1662]}, {"w": "briefly", "b": [0.2287, 0.1512, 0.2796, 0.1662]}, {"w": "outline", "b": [0.2857, 0.1512, 0.3411, 0.1662]}, {"w": "several", "b": [0.3472, 0.1512, 0.4018, 0.1662]}, {"w": "useful", "b": [0.4079, 0.1512, 0.4547, 0.1662]}, {"w": "and", "b": [0.4608, 0.1512, 0.4906, 0.1662]}, {"w": "practical", "b": [0.4967, 0.1512, 0.5665, 0.1662]}, {"w": "tips", "b": [0.5727, 0.1512, 0.6025, 0.1662]}, {"w": "for", "b": [0.6087, 0.1512, 0.6308, 0.1662]}, {"w": "model", "b": [0.6369, 0.1512, 0.6856, 0.1662]}, {"w": "deployment.", "b": [0.6918, 0.1512, 0.7897, 0.1662]}]}, {"id": "b_2", "type": "paragraph", "text": "8.6.5 Start With a Simple Model", "words": [{"w": "8.6.5", "b": [0.1312, 0.1991, 0.1749, 0.214]}, {"w": "Start", "b": [0.1961, 0.1991, 0.2434, 0.214]}, {"w": "With", "b": [0.2505, 0.1991, 0.2984, 0.214]}, {"w": "a", "b": [0.3054, 0.1991, 0.3158, 0.214]}, {"w": "Simple", "b": [0.3228, 0.1991, 0.3856, 0.214]}, {"w": "Model", "b": [0.3927, 0.1991, 0.4514, 0.214]}]}, {"id": "b_3", "type": "paragraph", "text": "Deploying and applying the model in production can be more complex than it might seem. Once the infrastructure to serve a simple model is solid, a more complex model can then be trained and deployed.", "words": [{"w": "Deploying", "b": [0.1312, 0.2356, 0.2126, 0.2506]}, {"w": "and", "b": [0.2188, 0.2356, 0.2488, 0.2506]}, {"w": "applying", "b": [0.2549, 0.2356, 0.3247, 0.2506]}, {"w": "the", "b": [0.3309, 0.2356, 0.3567, 0.2506]}, {"w": "model", "b": [0.3628, 0.2356, 0.4119, 0.2506]}, {"w": "in", "b": [0.4181, 0.2356, 0.4336, 0.2506]}, {"w": "production", "b": [0.4398, 0.2356, 0.5282, 0.2506]}, {"w": "can", "b": [0.5343, 0.2356, 0.5623, 0.2506]}, {"w": "be", "b": [0.5684, 0.2356, 0.5875, 0.2506]}, {"w": "more", "b": [0.5937, 0.2356, 0.634, 0.2506]}, {"w": "complex", "b": [0.6402, 0.2356, 0.7068, 0.2506]}, {"w": "than", "b": [0.713, 0.2356, 0.7502, 0.2506]}, {"w": "it", "b": [0.7564, 0.2356, 0.7688, 0.2506]}, {"w": "might", "b": [0.7749, 0.2356, 0.8219, 0.2506]}, {"w": "seem.", "b": [0.8281, 0.2356, 0.8727, 0.2506]}, {"w": "Once", "b": [0.1312, 0.2536, 0.172, 0.2685]}, {"w": "the", "b": [0.1781, 0.2536, 0.2036, 0.2685]}, {"w": "infrastructure", "b": [0.2097, 0.2536, 0.3195, 0.2685]}, {"w": "to", "b": [0.3256, 0.2536, 0.3419, 0.2685]}, {"w": "serve", "b": [0.348, 0.2536, 0.3879, 0.2685]}, {"w": "a", "b": [0.394, 0.2536, 0.4032, 0.2685]}, {"w": "simple", "b": [0.4093, 0.2536, 0.4603, 0.2685]}, {"w": "model", "b": [0.4665, 0.2536, 0.5148, 0.2685]}, {"w": "is", "b": [0.5209, 0.2536, 0.5333, 0.2685]}, {"w": "solid,", "b": [0.5394, 0.2536, 0.5813, 0.2685]}, {"w": "a", "b": [0.5874, 0.2536, 0.5965, 0.2685]}, {"w": "more", "b": [0.6027, 0.2536, 0.6424, 0.2685]}, {"w": "complex", "b": [0.6486, 0.2536, 0.7143, 0.2685]}, {"w": "model", "b": [0.7204, 0.2536, 0.7687, 0.2685]}, {"w": "can", "b": [0.7749, 0.2536, 0.8024, 0.2685]}, {"w": "then", "b": [0.8085, 0.2536, 0.8441, 0.2685]}, {"w": "be", "b": [0.8503, 0.2536, 0.8691, 0.2685]}, {"w": "trained", "b": [0.1312, 0.2715, 0.1887, 0.2865]}, {"w": "and", "b": [0.1949, 0.2715, 0.2246, 0.2865]}, {"w": "deployed.", "b": [0.2307, 0.2715, 0.3062, 0.2865]}]}, {"id": "b_4", "type": "paragraph", "text": "A simple interpretable model is easier to debug, especially for feature extractors and entire machine learning pipelines. Complex models and pipelines have many dependencies and large numbers of hyperparameters to tune, and are more prone to implementation and deployment errors.", "words": [{"w": "A", "b": [0.1305, 0.2984, 0.1444, 0.3134]}, {"w": "simple", "b": [0.1506, 0.2984, 0.2022, 0.3134]}, {"w": "interpretable", "b": [0.2083, 0.2984, 0.3119, 0.3134]}, {"w": "model", "b": [0.3181, 0.2984, 0.367, 0.3134]}, {"w": "is", "b": [0.3732, 0.2984, 0.3857, 0.3134]}, {"w": "easier", "b": [0.3918, 0.2984, 0.4373, 0.3134]}, {"w": "to", "b": [0.4435, 0.2984, 0.4599, 0.3134]}, {"w": "debug,", "b": [0.4661, 0.2984, 0.5196, 0.3134]}, {"w": "especially", "b": [0.5258, 0.2984, 0.6032, 0.3134]}, {"w": "for", "b": [0.6094, 0.2984, 0.6315, 0.3134]}, {"w": "feature", "b": [0.6377, 0.2984, 0.6939, 0.3134]}, {"w": "extractors", "b": [0.7001, 0.2984, 0.7811, 0.3134]}, {"w": "and", "b": [0.7873, 0.2984, 0.8171, 0.3134]}, {"w": "entire", "b": [0.8233, 0.2984, 0.8692, 0.3134]}, {"w": "machine", "b": [0.1312, 0.3165, 0.196, 0.3313]}, {"w": "learning", "b": [0.2016, 0.3165, 0.265, 0.3313]}, {"w": "pipelines.", "b": [0.2705, 0.3165, 0.3445, 0.3313]}, {"w": "Complex", "b": [0.3525, 0.3165, 0.4223, 0.3313]}, {"w": "models", "b": [0.4279, 0.3165, 0.4828, 0.3313]}, {"w": "and", "b": [0.4883, 0.3165, 0.5175, 0.3313]}, {"w": "pipelines", "b": [0.523, 0.3165, 0.592, 0.3313]}, {"w": "have", "b": [0.5976, 0.3165, 0.6332, 0.3313]}, {"w": "many", "b": [0.6388, 0.3165, 0.682, 0.3313]}, {"w": "dependencies", "b": [0.6875, 0.3165, 0.7907, 0.3313]}, {"w": "and", "b": [0.7962, 0.3165, 0.8254, 0.3313]}, {"w": "large", "b": [0.8309, 0.3165, 0.8692, 0.3313]}, {"w": "numbers", "b": [0.1312, 0.3345, 0.1982, 0.3493]}, {"w": "of", "b": [0.2042, 0.3345, 0.2188, 0.3493]}, {"w": "hyperparameters", "b": [0.2248, 0.3345, 0.3572, 0.3493]}, {"w": "to", "b": [0.3632, 0.3345, 0.3793, 0.3493]}, {"w": "tune,", "b": [0.3853, 0.3345, 0.4255, 0.3493]}, {"w": "and", "b": [0.4315, 0.3345, 0.4607, 0.3493]}, {"w": "are", "b": [0.4667, 0.3345, 0.4908, 0.3493]}, {"w": "more", "b": [0.4968, 0.3345, 0.5361, 0.3493]}, {"w": "prone", "b": [0.5421, 0.3345, 0.5864, 0.3493]}, {"w": "to", "b": [0.5924, 0.3345, 0.6084, 0.3493]}, {"w": "implementation", "b": [0.6144, 0.3345, 0.7375, 0.3493]}, {"w": "and", "b": [0.7435, 0.3345, 0.7726, 0.3493]}, {"w": "deployment", "b": [0.7787, 0.3345, 0.8696, 0.3493]}, {"w": "errors.", "b": [0.1312, 0.3523, 0.1828, 0.3672]}]}, {"id": "b_5", "type": "paragraph", "text": "8.6.6 Test on Outsiders", "words": [{"w": "8.6.6", "b": [0.1312, 0.4001, 0.1749, 0.4151]}, {"w": "Test", "b": [0.1961, 0.4001, 0.2354, 0.4151]}, {"w": "on", "b": [0.2425, 0.4001, 0.2649, 0.4151]}, {"w": "Outsiders", "b": [0.272, 0.4001, 0.3609, 0.4151]}]}, {"id": "b_6", "type": "paragraph", "text": "Before putting your model in production, test your model on outsiders, and not just on the test data. Outsiders could be other team members or company employees. Alternatively, you can use crowdsourcing or a subset of your real customers who agreed to participate in experiments with new product features.", "words": [{"w": "Before", "b": [0.1312, 0.4367, 0.1827, 0.4517]}, {"w": "putting", "b": [0.1889, 0.4367, 0.2482, 0.4517]}, {"w": "your", "b": [0.2544, 0.4367, 0.2902, 0.4517]}, {"w": "model", "b": [0.2964, 0.4367, 0.345, 0.4517]}, {"w": "in", "b": [0.3511, 0.4367, 0.3665, 0.4517]}, {"w": "production,", "b": [0.3726, 0.4367, 0.4653, 0.4517]}, {"w": "test", "b": [0.4714, 0.4367, 0.5012, 0.4517]}, {"w": "your", "b": [0.5074, 0.4367, 0.5432, 0.4517]}, {"w": "model", "b": [0.5494, 0.4367, 0.598, 0.4517]}, {"w": "on", "b": [0.6041, 0.4367, 0.6236, 0.4517]}, {"w": "outsiders,", "b": [0.6297, 0.4367, 0.7068, 0.4517]}, {"w": "and", "b": [0.7129, 0.4367, 0.7426, 0.4517]}, {"w": "not", "b": [0.7487, 0.4367, 0.7753, 0.4517]}, {"w": "just", "b": [0.7815, 0.4367, 0.8118, 0.4517]}, {"w": "on", "b": [0.8179, 0.4367, 0.8374, 0.4517]}, {"w": "the", "b": [0.8435, 0.4367, 0.8691, 0.4517]}, {"w": "test", "b": [0.1312, 0.4545, 0.1617, 0.4697]}, {"w": "data.", "b": [0.1684, 0.4545, 0.2102, 0.4697]}, {"w": "Outsiders", "b": [0.2201, 0.4545, 0.2988, 0.4697]}, {"w": "could", "b": [0.3055, 0.4545, 0.3494, 0.4697]}, {"w": "be", "b": [0.3562, 0.4545, 0.3755, 0.4697]}, {"w": "other", "b": [0.3822, 0.4545, 0.4252, 0.4697]}, {"w": "team", "b": [0.4319, 0.4545, 0.4726, 0.4697]}, {"w": "members", "b": [0.4794, 0.4545, 0.5527, 0.4697]}, {"w": "or", "b": [0.5594, 0.4545, 0.5762, 0.4697]}, {"w": "company", "b": [0.5829, 0.4545, 0.6561, 0.4697]}, {"w": "employees.", "b": [0.6628, 0.4545, 0.7503, 0.4697]}, {"w": "Alternatively,", "b": [0.7602, 0.4545, 0.8717, 0.4697]}, {"w": "you", "b": [0.1308, 0.4725, 0.1599, 0.4876]}, {"w": "can", "b": [0.166, 0.4725, 0.194, 0.4876]}, {"w": "use", "b": [0.2002, 0.4725, 0.2263, 0.4876]}, {"w": "crowdsourcing", "b": [0.2324, 0.4725, 0.3485, 0.4876]}, {"w": "or", "b": [0.3546, 0.4725, 0.3713, 0.4876]}, {"w": "a", "b": [0.3774, 0.4725, 0.3868, 0.4876]}, {"w": "subset", "b": [0.3929, 0.4725, 0.444, 0.4876]}, {"w": "of", "b": [0.4502, 0.4725, 0.4653, 0.4876]}, {"w": "your", "b": [0.4714, 0.4725, 0.5078, 0.4876]}, {"w": "real", "b": [0.514, 0.4725, 0.5441, 0.4876]}, {"w": "customers", "b": [0.5503, 0.4725, 0.6316, 0.4876]}, {"w": "who", "b": [0.6377, 0.4725, 0.6709, 0.4876]}, {"w": "agreed", "b": [0.6771, 0.4725, 0.7301, 0.4876]}, {"w": "to", "b": [0.7363, 0.4725, 0.7529, 0.4876]}, {"w": "participate", "b": [0.759, 0.4725, 0.8474, 0.4876]}, {"w": "in", "b": [0.8535, 0.4725, 0.8691, 0.4876]}, {"w": "experiments", "b": [0.1312, 0.4906, 0.2283, 0.5055]}, {"w": "with", "b": [0.2345, 0.4906, 0.2703, 0.5055]}, {"w": "new", "b": [0.2765, 0.4906, 0.3083, 0.5055]}, {"w": "product", "b": [0.3144, 0.4906, 0.3775, 0.5055]}, {"w": "features.", "b": [0.3837, 0.4906, 0.4521, 0.5055]}]}, {"id": "b_7", "type": "paragraph", "text": "Testing on outsiders will help you avoid personal bias, because you, as the creator of the model, are emotionally involved. It will also give your model an exposure to different users (in cases when, for example, your whole team is male or Caucasian).", "words": [{"w": "Testing", "b": [0.1306, 0.5174, 0.1908, 0.5325]}, {"w": "on", "b": [0.1976, 0.5174, 0.2175, 0.5325]}, {"w": "outsiders", "b": [0.2243, 0.5174, 0.2978, 0.5325]}, {"w": "will", "b": [0.3046, 0.5174, 0.3338, 0.5325]}, {"w": "help", "b": [0.3406, 0.5174, 0.3752, 0.5325]}, {"w": "you", "b": [0.3819, 0.5174, 0.4112, 0.5325]}, {"w": "avoid", "b": [0.418, 0.5174, 0.4614, 0.5325]}, {"w": "personal", "b": [0.4682, 0.5174, 0.5369, 0.5325]}, {"w": "bias,", "b": [0.5437, 0.5174, 0.5815, 0.5325]}, {"w": "because", "b": [0.5884, 0.5174, 0.6518, 0.5325]}, {"w": "you,", "b": [0.6586, 0.5174, 0.6931, 0.5325]}, {"w": "as", "b": [0.7, 0.5174, 0.7169, 0.5325]}, {"w": "the", "b": [0.7237, 0.5174, 0.7498, 0.5325]}, {"w": "creator", "b": [0.7566, 0.5174, 0.8143, 0.5325]}, {"w": "of", "b": [0.821, 0.5174, 0.8362, 0.5325]}, {"w": "the", "b": [0.843, 0.5174, 0.8691, 0.5325]}, {"w": "model,", "b": [0.1312, 0.5354, 0.1853, 0.5504]}, {"w": "are", "b": [0.1914, 0.5354, 0.2162, 0.5504]}, {"w": "emotionally", "b": [0.2223, 0.5354, 0.3165, 0.5504]}, {"w": "involved.", "b": [0.3227, 0.5354, 0.3942, 0.5504]}, {"w": "It", "b": [0.4024, 0.5354, 0.4163, 0.5504]}, {"w": "will", "b": [0.4225, 0.5354, 0.4513, 0.5504]}, {"w": "also", "b": [0.4574, 0.5354, 0.4884, 0.5504]}, {"w": "give", "b": [0.4945, 0.5354, 0.5265, 0.5504]}, {"w": "your", "b": [0.5326, 0.5354, 0.5687, 0.5504]}, {"w": "model", "b": [0.5748, 0.5354, 0.6237, 0.5504]}, {"w": "an", "b": [0.6299, 0.5354, 0.6494, 0.5504]}, {"w": "exposure", "b": [0.6556, 0.5354, 0.7268, 0.5504]}, {"w": "to", "b": [0.7329, 0.5354, 0.7494, 0.5504]}, {"w": "different", "b": [0.7555, 0.5354, 0.8225, 0.5504]}, {"w": "users", "b": [0.8286, 0.5354, 0.8691, 0.5504]}, {"w": "(in", "b": [0.1291, 0.5534, 0.1516, 0.5683]}, {"w": "cases", "b": [0.1578, 0.5534, 0.198, 0.5683]}, {"w": "when,", "b": [0.2041, 0.5534, 0.2513, 0.5683]}, {"w": "for", "b": [0.2575, 0.5534, 0.2796, 0.5683]}, {"w": "example,", "b": [0.2857, 0.5534, 0.357, 0.5683]}, {"w": "your", "b": [0.3631, 0.5534, 0.3991, 0.5683]}, {"w": "whole", "b": [0.4052, 0.5534, 0.4514, 0.5683]}, {"w": "team", "b": [0.4575, 0.5534, 0.4975, 0.5683]}, {"w": "is", "b": [0.5037, 0.5534, 0.5161, 0.5683]}, {"w": "male", "b": [0.5222, 0.5534, 0.5601, 0.5683]}, {"w": "or", "b": [0.5663, 0.5534, 0.5827, 0.5683]}, {"w": "Caucasian).", "b": [0.5889, 0.5534, 0.6833, 0.5683]}]}, {"id": "b_8", "type": "paragraph", "text": "8.7 Summary", "words": [{"w": "8.7", "b": [0.1312, 0.6019, 0.1631, 0.6198]}, {"w": "Summary", "b": [0.188, 0.6019, 0.2927, 0.6198]}]}, {"id": "b_9", "type": "paragraph", "text": "A model can be deployed following several patterns: statically, as a part of installable software, dynamically on the user’s device, dynamically on a server, or via model streaming.", "words": [{"w": "A", "b": [0.1305, 0.6409, 0.1441, 0.6557]}, {"w": "model", "b": [0.149, 0.6409, 0.1968, 0.6557]}, {"w": "can", "b": [0.2017, 0.6409, 0.2289, 0.6557]}, {"w": "be", "b": [0.2338, 0.6409, 0.2524, 0.6557]}, {"w": "deployed", "b": [0.2573, 0.6409, 0.3262, 0.6557]}, {"w": "following", "b": [0.3311, 0.6409, 0.4014, 0.6557]}, {"w": "several", "b": [0.4064, 0.6409, 0.4598, 0.6557]}, {"w": "patterns:", "b": [0.4647, 0.6409, 0.5353, 0.6557]}, {"w": "statically,", "b": [0.5429, 0.6409, 0.6183, 0.6557]}, {"w": "as", "b": [0.6235, 0.6409, 0.6397, 0.6557]}, {"w": "a", "b": [0.6446, 0.6409, 0.6537, 0.6557]}, {"w": "part", "b": [0.6586, 0.6409, 0.6918, 0.6557]}, {"w": "of", "b": [0.6968, 0.6409, 0.7113, 0.6557]}, {"w": "installable", "b": [0.7163, 0.6409, 0.7968, 0.6557]}, {"w": "software,", "b": [0.8017, 0.6409, 0.8717, 0.6557]}, {"w": "dynamically", "b": [0.1312, 0.6587, 0.2286, 0.6737]}, {"w": "on", "b": [0.2348, 0.6587, 0.2543, 0.6737]}, {"w": "the", "b": [0.2604, 0.6587, 0.2861, 0.6737]}, {"w": "user’s", "b": [0.2922, 0.6587, 0.3376, 0.6737]}, {"w": "device,", "b": [0.3438, 0.6587, 0.3987, 0.6737]}, {"w": "dynamically", "b": [0.4048, 0.6587, 0.5022, 0.6737]}, {"w": "on", "b": [0.5084, 0.6587, 0.5278, 0.6737]}, {"w": "a", "b": [0.534, 0.6587, 0.5432, 0.6737]}, {"w": "server,", "b": [0.5494, 0.6587, 0.6019, 0.6737]}, {"w": "or", "b": [0.608, 0.6587, 0.6245, 0.6737]}, {"w": "via", "b": [0.6306, 0.6587, 0.6547, 0.6737]}, {"w": "model", "b": [0.6609, 0.6587, 0.7096, 0.6737]}, {"w": "streaming.", "b": [0.7157, 0.6587, 0.8, 0.6737]}]}, {"id": "b_10", "type": "paragraph", "text": "The static deployment has many advantages, such as fast execution time, preserved user privacy, and the ability to call the model when the user is offline. There are also a drawback: it’s harder to upgrade the model without also having to upgrade the entire application.", "words": [{"w": "The", "b": [0.1306, 0.6855, 0.163, 0.7006]}, {"w": "static", "b": [0.17, 0.6855, 0.2151, 0.7006]}, {"w": "deployment", "b": [0.2222, 0.6855, 0.3169, 0.7006]}, {"w": "has", "b": [0.3239, 0.6855, 0.3512, 0.7006]}, {"w": "many", "b": [0.3583, 0.6855, 0.4032, 0.7006]}, {"w": "advantages,", "b": [0.4103, 0.6855, 0.5056, 0.7006]}, {"w": "such", "b": [0.5129, 0.6855, 0.5491, 0.7006]}, {"w": "as", "b": [0.5562, 0.6855, 0.573, 0.7006]}, {"w": "fast", "b": [0.5801, 0.6855, 0.61, 0.7006]}, {"w": "execution", "b": [0.6171, 0.6855, 0.695, 0.7006]}, {"w": "time,", "b": [0.702, 0.6855, 0.7439, 0.7006]}, {"w": "preserved", "b": [0.7512, 0.6855, 0.8288, 0.7006]}, {"w": "user", "b": [0.8359, 0.6855, 0.8695, 0.7006]}, {"w": "privacy,", "b": [0.1312, 0.7037, 0.192, 0.7185]}, {"w": "and", "b": [0.1982, 0.7037, 0.2273, 0.7185]}, {"w": "the", "b": [0.2334, 0.7037, 0.2586, 0.7185]}, {"w": "ability", "b": [0.2647, 0.7037, 0.3149, 0.7185]}, {"w": "to", "b": [0.3211, 0.7037, 0.3371, 0.7185]}, {"w": "call", "b": [0.3433, 0.7037, 0.3704, 0.7185]}, {"w": "the", "b": [0.3765, 0.7037, 0.4017, 0.7185]}, {"w": "model", "b": [0.4078, 0.7037, 0.4556, 0.7185]}, {"w": "when", "b": [0.4617, 0.7037, 0.5029, 0.7185]}, {"w": "the", "b": [0.509, 0.7037, 0.5342, 0.7185]}, {"w": "user", "b": [0.5403, 0.7037, 0.5726, 0.7185]}, {"w": "is", "b": [0.5787, 0.7037, 0.5909, 0.7185]}, {"w": "offline.", "b": [0.597, 0.7037, 0.6493, 0.7185]}, {"w": "There", "b": [0.6575, 0.7037, 0.7038, 0.7185]}, {"w": "are", "b": [0.7099, 0.7037, 0.7341, 0.7185]}, {"w": "also", "b": [0.7402, 0.7037, 0.7704, 0.7185]}, {"w": "a", "b": [0.7766, 0.7037, 0.7856, 0.7185]}, {"w": "drawback:", "b": [0.7917, 0.7037, 0.8717, 0.7185]}, {"w": "it’s", "b": [0.1312, 0.7215, 0.156, 0.7365]}, {"w": "harder", "b": [0.1621, 0.7215, 0.2145, 0.7365]}, {"w": "to", "b": [0.2207, 0.7215, 0.2371, 0.7365]}, {"w": "upgrade", "b": [0.2432, 0.7215, 0.3079, 0.7365]}, {"w": "the", "b": [0.314, 0.7215, 0.3397, 0.7365]}, {"w": "model", "b": [0.3458, 0.7215, 0.3945, 0.7365]}, {"w": "without", "b": [0.4007, 0.7215, 0.4632, 0.7365]}, {"w": "also", "b": [0.4694, 0.7215, 0.5002, 0.7365]}, {"w": "having", "b": [0.5064, 0.7215, 0.5597, 0.7365]}, {"w": "to", "b": [0.5658, 0.7215, 0.5822, 0.7365]}, {"w": "upgrade", "b": [0.5884, 0.7215, 0.6531, 0.7365]}, {"w": "the", "b": [0.6592, 0.7215, 0.6848, 0.7365]}, {"w": "entire", "b": [0.691, 0.7215, 0.7367, 0.7365]}, {"w": "application.", "b": [0.7428, 0.7215, 0.8372, 0.7365]}]}, {"id": "b_11", "type": "paragraph", "text": "The principal advantage of the dynamic deployment on the users’ devices is that the calls to the model will be fast for the user. It also reduces the charge on the organization’s servers. Downsides include the difficulty to deliver updates to all users and the availability of the model for third-party analyses.", "words": [{"w": "The", "b": [0.1306, 0.7486, 0.1619, 0.7634]}, {"w": "principal", "b": [0.168, 0.7486, 0.2378, 0.7634]}, {"w": "advantage", "b": [0.244, 0.7486, 0.3237, 0.7634]}, {"w": "of", "b": [0.3299, 0.7486, 0.3445, 0.7634]}, {"w": "the", "b": [0.3507, 0.7486, 0.376, 0.7634]}, {"w": "dynamic", "b": [0.3821, 0.7486, 0.4493, 0.7634]}, {"w": "deployment", "b": [0.4555, 0.7486, 0.5469, 0.7634]}, {"w": "on", "b": [0.553, 0.7486, 0.5722, 0.7634]}, {"w": "the", "b": [0.5784, 0.7486, 0.6037, 0.7634]}, {"w": "users’", "b": [0.6098, 0.7486, 0.6545, 0.7634]}, {"w": "devices", "b": [0.6607, 0.7486, 0.7169, 0.7634]}, {"w": "is", "b": [0.723, 0.7486, 0.7353, 0.7634]}, {"w": "that", "b": [0.7414, 0.7486, 0.7748, 0.7634]}, {"w": "the", "b": [0.7809, 0.7486, 0.8062, 0.7634]}, {"w": "calls", "b": [0.8124, 0.7486, 0.8468, 0.7634]}, {"w": "to", "b": [0.853, 0.7486, 0.8691, 0.7634]}, {"w": "the", "b": [0.1312, 0.7664, 0.1571, 0.7814]}, {"w": "model", "b": [0.1632, 0.7664, 0.2123, 0.7814]}, {"w": "will", "b": [0.2185, 0.7664, 0.2474, 0.7814]}, {"w": "be", "b": [0.2536, 0.7664, 0.2727, 0.7814]}, {"w": "fast", "b": [0.2788, 0.7664, 0.3084, 0.7814]}, {"w": "for", "b": [0.3146, 0.7664, 0.3368, 0.7814]}, {"w": "the", "b": [0.343, 0.7664, 0.3688, 0.7814]}, {"w": "user.", "b": [0.375, 0.7664, 0.4134, 0.7814]}, {"w": "It", "b": [0.4216, 0.7664, 0.4356, 0.7814]}, {"w": "also", "b": [0.4417, 0.7664, 0.4728, 0.7814]}, {"w": "reduces", "b": [0.479, 0.7664, 0.5391, 0.7814]}, {"w": "the", "b": [0.5453, 0.7664, 0.5711, 0.7814]}, {"w": "charge", "b": [0.5773, 0.7664, 0.6295, 0.7814]}, {"w": "on", "b": [0.6357, 0.7664, 0.6553, 0.7814]}, {"w": "the", "b": [0.6615, 0.7664, 0.6873, 0.7814]}, {"w": "organization’s", "b": [0.6935, 0.7664, 0.8063, 0.7814]}, {"w": "servers.", "b": [0.8125, 0.7664, 0.8727, 0.7814]}, {"w": "Downsides", "b": [0.1312, 0.7842, 0.2175, 0.7994]}, {"w": "include", "b": [0.2242, 0.7842, 0.2828, 0.7994]}, {"w": "the", "b": [0.2895, 0.7842, 0.3156, 0.7994]}, {"w": "difficulty", "b": [0.3223, 0.7842, 0.3945, 0.7994]}, {"w": "to", "b": [0.4012, 0.7842, 0.4179, 0.7994]}, {"w": "deliver", "b": [0.4246, 0.7842, 0.4791, 0.7994]}, {"w": "updates", "b": [0.4857, 0.7842, 0.5502, 0.7994]}, {"w": "to", "b": [0.5569, 0.7842, 0.5736, 0.7994]}, {"w": "all", "b": [0.5803, 0.7842, 0.6001, 0.7994]}, {"w": "users", "b": [0.6068, 0.7842, 0.6479, 0.7994]}, {"w": "and", "b": [0.6546, 0.7842, 0.6849, 0.7994]}, {"w": "the", "b": [0.6916, 0.7842, 0.7178, 0.7994]}, {"w": "availability", "b": [0.7245, 0.7842, 0.8144, 0.7994]}, {"w": "of", "b": [0.8211, 0.7842, 0.8363, 0.7994]}, {"w": "the", "b": [0.843, 0.7842, 0.8692, 0.7994]}, {"w": "model", "b": [0.1312, 0.8023, 0.1799, 0.8173]}, {"w": "for", "b": [0.1861, 0.8023, 0.2082, 0.8173]}, {"w": "third-party", "b": [0.2143, 0.8023, 0.3036, 0.8173]}, {"w": "analyses.", "b": [0.3098, 0.8023, 0.3813, 0.8173]}]}, {"id": "b_12", "type": "paragraph", "text": "As with the static deployment, deploying the model on a user’s device makes it difficult to monitor the performance of the model.", "words": [{"w": "As", "b": [0.1305, 0.8292, 0.1519, 0.8442]}, {"w": "with", "b": [0.158, 0.8292, 0.1943, 0.8442]}, {"w": "the", "b": [0.2004, 0.8292, 0.2264, 0.8442]}, {"w": "static", "b": [0.2325, 0.8292, 0.2772, 0.8442]}, {"w": "deployment,", "b": [0.2833, 0.8292, 0.3824, 0.8442]}, {"w": "deploying", "b": [0.3885, 0.8292, 0.4663, 0.8442]}, {"w": "the", "b": [0.4724, 0.8292, 0.4983, 0.8442]}, {"w": "model", "b": [0.5045, 0.8292, 0.5537, 0.8442]}, {"w": "on", "b": [0.5598, 0.8292, 0.5795, 0.8442]}, {"w": "a", "b": [0.5857, 0.8292, 0.595, 0.8442]}, {"w": "user’s", "b": [0.6011, 0.8292, 0.647, 0.8442]}, {"w": "device", "b": [0.6532, 0.8292, 0.7035, 0.8442]}, {"w": "makes", "b": [0.7096, 0.8292, 0.7595, 0.8442]}, {"w": "it", "b": [0.7656, 0.8292, 0.778, 0.8442]}, {"w": "difficult", "b": [0.7842, 0.8292, 0.8464, 0.8442]}, {"w": "to", "b": [0.8525, 0.8292, 0.8691, 0.8442]}, {"w": "monitor", "b": [0.1312, 0.8472, 0.1948, 0.8621]}, {"w": "the", "b": [0.201, 0.8472, 0.2266, 0.8621]}, {"w": "performance", "b": [0.2328, 0.8472, 0.3324, 0.8621]}, {"w": "of", "b": [0.3385, 0.8472, 0.3534, 0.8621]}, {"w": "the", "b": [0.3595, 0.8472, 0.3852, 0.8621]}, {"w": "model.", "b": [0.3913, 0.8472, 0.4451, 0.8621]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 22", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "22", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 262, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Dynamic deployment on a server can have one of the following forms: deployment on a virtual machine, deployment in a container, and serverless deployment.", "words": [{"w": "Dynamic", "b": [0.1312, 0.0885, 0.2018, 0.1033]}, {"w": "deployment", "b": [0.207, 0.0885, 0.298, 0.1033]}, {"w": "on", "b": [0.3032, 0.0885, 0.3223, 0.1033]}, {"w": "a", "b": [0.3275, 0.0885, 0.3366, 0.1033]}, {"w": "server", "b": [0.3418, 0.0885, 0.3883, 0.1033]}, {"w": "can", "b": [0.3935, 0.0885, 0.4206, 0.1033]}, {"w": "have", "b": [0.4259, 0.0885, 0.4615, 0.1033]}, {"w": "one", "b": [0.4668, 0.0885, 0.4939, 0.1033]}, {"w": "of", "b": [0.4991, 0.0885, 0.5137, 0.1033]}, {"w": "the", "b": [0.5189, 0.0885, 0.5441, 0.1033]}, {"w": "following", "b": [0.5493, 0.0885, 0.6196, 0.1033]}, {"w": "forms:", "b": [0.6249, 0.0885, 0.6738, 0.1033]}, {"w": "deployment", "b": [0.6815, 0.0885, 0.7724, 0.1033]}, {"w": "on", "b": [0.7777, 0.0885, 0.7968, 0.1033]}, {"w": "a", "b": [0.802, 0.0885, 0.811, 0.1033]}, {"w": "virtual", "b": [0.8163, 0.0885, 0.8691, 0.1033]}, {"w": "machine,", "b": [0.1312, 0.1063, 0.2025, 0.1213]}, {"w": "deployment", "b": [0.2086, 0.1063, 0.3015, 0.1213]}, {"w": "in", "b": [0.3076, 0.1063, 0.323, 0.1213]}, {"w": "a", "b": [0.3291, 0.1063, 0.3384, 0.1213]}, {"w": "container,", "b": [0.3445, 0.1063, 0.424, 0.1213]}, {"w": "and", "b": [0.4302, 0.1063, 0.4599, 0.1213]}, {"w": "serverless", "b": [0.4661, 0.1063, 0.5414, 0.1213]}, {"w": "deployment.", "b": [0.5475, 0.1063, 0.6455, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "The most popular deployment pattern is to deploy the model on a server and make it available as a REST API in the form of a web or a gRPC service. Here, the client sends a request to the server, and then waits for a response before sending another request.", "words": [{"w": "The", "b": [0.1306, 0.1334, 0.1617, 0.1482]}, {"w": "most", "b": [0.1668, 0.1334, 0.2051, 0.1482]}, {"w": "popular", "b": [0.2102, 0.1334, 0.271, 0.1482]}, {"w": "deployment", "b": [0.2761, 0.1334, 0.367, 0.1482]}, {"w": "pattern", "b": [0.3721, 0.1334, 0.4305, 0.1482]}, {"w": "is", "b": [0.4355, 0.1334, 0.4477, 0.1482]}, {"w": "to", "b": [0.4528, 0.1334, 0.4689, 0.1482]}, {"w": "deploy", "b": [0.4739, 0.1334, 0.5252, 0.1482]}, {"w": "the", "b": [0.5303, 0.1334, 0.5554, 0.1482]}, {"w": "model", "b": [0.5605, 0.1334, 0.6082, 0.1482]}, {"w": "on", "b": [0.6133, 0.1334, 0.6324, 0.1482]}, {"w": "a", "b": [0.6375, 0.1334, 0.6465, 0.1482]}, {"w": "server", "b": [0.6516, 0.1334, 0.6981, 0.1482]}, {"w": "and", "b": [0.7031, 0.1334, 0.7323, 0.1482]}, {"w": "make", "b": [0.7374, 0.1334, 0.7785, 0.1482]}, {"w": "it", "b": [0.7836, 0.1334, 0.7957, 0.1482]}, {"w": "available", "b": [0.8008, 0.1334, 0.8691, 0.1482]}, {"w": "as", "b": [0.1312, 0.1512, 0.1477, 0.1662]}, {"w": "a", "b": [0.1538, 0.1512, 0.163, 0.1662]}, {"w": "REST", "b": [0.1692, 0.1512, 0.2188, 0.1662]}, {"w": "API", "b": [0.2249, 0.1512, 0.2579, 0.1662]}, {"w": "in", "b": [0.264, 0.1512, 0.2793, 0.1662]}, {"w": "the", "b": [0.2855, 0.1512, 0.3111, 0.1662]}, {"w": "form", "b": [0.3172, 0.1512, 0.3545, 0.1662]}, {"w": "of", "b": [0.3607, 0.1512, 0.3755, 0.1662]}, {"w": "a", "b": [0.3816, 0.1512, 0.3908, 0.1662]}, {"w": "web", "b": [0.397, 0.1512, 0.4282, 0.1662]}, {"w": "or", "b": [0.4343, 0.1512, 0.4507, 0.1662]}, {"w": "a", "b": [0.4569, 0.1512, 0.4661, 0.1662]}, {"w": "gRPC", "b": [0.4722, 0.1512, 0.5207, 0.1662]}, {"w": "service.", "b": [0.5269, 0.1512, 0.5859, 0.1662]}, {"w": "Here,", "b": [0.594, 0.1512, 0.6365, 0.1662]}, {"w": "the", "b": [0.6427, 0.1512, 0.6682, 0.1662]}, {"w": "client", "b": [0.6744, 0.1512, 0.7179, 0.1662]}, {"w": "sends", "b": [0.724, 0.1512, 0.7672, 0.1662]}, {"w": "a", "b": [0.7733, 0.1512, 0.7825, 0.1662]}, {"w": "request", "b": [0.7886, 0.1512, 0.8466, 0.1662]}, {"w": "to", "b": [0.8527, 0.1512, 0.8691, 0.1662]}, {"w": "the", "b": [0.1312, 0.1692, 0.1569, 0.1841]}, {"w": "server,", "b": [0.163, 0.1692, 0.2155, 0.1841]}, {"w": "and", "b": [0.2217, 0.1692, 0.2514, 0.1841]}, {"w": "then", "b": [0.2576, 0.1692, 0.2935, 0.1841]}, {"w": "waits", "b": [0.2996, 0.1692, 0.3413, 0.1841]}, {"w": "for", "b": [0.3474, 0.1692, 0.3695, 0.1841]}, {"w": "a", "b": [0.3757, 0.1692, 0.3849, 0.1841]}, {"w": "response", "b": [0.391, 0.1692, 0.4595, 0.1841]}, {"w": "before", "b": [0.4657, 0.1692, 0.5149, 0.1841]}, {"w": "sending", "b": [0.5211, 0.1692, 0.5817, 0.1841]}, {"w": "another", "b": [0.5879, 0.1692, 0.6495, 0.1841]}, {"w": "request.", "b": [0.6556, 0.1692, 0.7188, 0.1841]}]}, {"id": "b_2", "type": "paragraph", "text": "Model streaming is different. All models are registered within a stream-processing engine or are packaged as an application based on a stream-processing library. Here, the client sends one request and receives updates as they happen.", "words": [{"w": "Model", "b": [0.1312, 0.1961, 0.181, 0.211]}, {"w": "streaming", "b": [0.1872, 0.1961, 0.2656, 0.211]}, {"w": "is", "b": [0.2718, 0.1961, 0.2841, 0.211]}, {"w": "different.", "b": [0.2902, 0.1961, 0.3614, 0.211]}, {"w": "All", "b": [0.3696, 0.1961, 0.3935, 0.211]}, {"w": "models", "b": [0.3997, 0.1961, 0.4552, 0.211]}, {"w": "are", "b": [0.4613, 0.1961, 0.4858, 0.211]}, {"w": "registered", "b": [0.4919, 0.1961, 0.5694, 0.211]}, {"w": "within", "b": [0.5756, 0.1961, 0.6264, 0.211]}, {"w": "a", "b": [0.6325, 0.1961, 0.6417, 0.211]}, {"w": "stream-processing", "b": [0.6478, 0.1961, 0.79, 0.211]}, {"w": "engine", "b": [0.7962, 0.1961, 0.847, 0.211]}, {"w": "or", "b": [0.8532, 0.1961, 0.8695, 0.211]}, {"w": "are", "b": [0.1312, 0.214, 0.156, 0.229]}, {"w": "packaged", "b": [0.1621, 0.214, 0.2362, 0.229]}, {"w": "as", "b": [0.2424, 0.214, 0.2589, 0.229]}, {"w": "an", "b": [0.2651, 0.214, 0.2846, 0.229]}, {"w": "application", "b": [0.2908, 0.214, 0.3802, 0.229]}, {"w": "based", "b": [0.3864, 0.214, 0.4318, 0.229]}, {"w": "on", "b": [0.4379, 0.214, 0.4575, 0.229]}, {"w": "a", "b": [0.4637, 0.214, 0.4729, 0.229]}, {"w": "stream-processing", "b": [0.4791, 0.214, 0.623, 0.229]}, {"w": "library.", "b": [0.6291, 0.214, 0.6868, 0.229]}, {"w": "Here,", "b": [0.6951, 0.214, 0.7378, 0.229]}, {"w": "the", "b": [0.744, 0.214, 0.7697, 0.229]}, {"w": "client", "b": [0.7758, 0.214, 0.8196, 0.229]}, {"w": "sends", "b": [0.8257, 0.214, 0.8692, 0.229]}, {"w": "one", "b": [0.1312, 0.232, 0.1589, 0.2469]}, {"w": "request", "b": [0.1651, 0.232, 0.2232, 0.2469]}, {"w": "and", "b": [0.2293, 0.232, 0.2591, 0.2469]}, {"w": "receives", "b": [0.2652, 0.232, 0.3269, 0.2469]}, {"w": "updates", "b": [0.3331, 0.232, 0.3963, 0.2469]}, {"w": "as", "b": [0.4024, 0.232, 0.4189, 0.2469]}, {"w": "they", "b": [0.4251, 0.232, 0.4605, 0.2469]}, {"w": "happen.", "b": [0.4666, 0.232, 0.5307, 0.2469]}]}, {"id": "b_3", "type": "paragraph", "text": "Typical deployment strategies are single deployment, silent deployment, canary deployment, and multi-armed bandit.", "words": [{"w": "Typical", "b": [0.1306, 0.2589, 0.1907, 0.2738]}, {"w": "deployment", "b": [0.1969, 0.2589, 0.2891, 0.2738]}, {"w": "strategies", "b": [0.2953, 0.2589, 0.371, 0.2738]}, {"w": "are", "b": [0.3772, 0.2589, 0.4017, 0.2738]}, {"w": "single", "b": [0.4078, 0.2589, 0.4528, 0.2738]}, {"w": "deployment,", "b": [0.459, 0.2589, 0.5563, 0.2738]}, {"w": "silent", "b": [0.5625, 0.2589, 0.6049, 0.2738]}, {"w": "deployment,", "b": [0.6111, 0.2589, 0.7084, 0.2738]}, {"w": "canary", "b": [0.7146, 0.2589, 0.7682, 0.2738]}, {"w": "deployment,", "b": [0.7744, 0.2589, 0.8717, 0.2738]}, {"w": "and", "b": [0.1312, 0.2768, 0.161, 0.2918]}, {"w": "multi-armed", "b": [0.1671, 0.2768, 0.2661, 0.2918]}, {"w": "bandit.", "b": [0.2723, 0.2768, 0.3297, 0.2918]}]}, {"id": "b_4", "type": "paragraph", "text": "In single deployment, you serialize the new model into a file, and then replace the old one.", "words": [{"w": "In", "b": [0.1312, 0.3038, 0.1482, 0.3187]}, {"w": "single", "b": [0.1543, 0.3038, 0.1995, 0.3187]}, {"w": "deployment,", "b": [0.2057, 0.3038, 0.3036, 0.3187]}, {"w": "you", "b": [0.3098, 0.3038, 0.3385, 0.3187]}, {"w": "serialize", "b": [0.3446, 0.3038, 0.4084, 0.3187]}, {"w": "the", "b": [0.4145, 0.3038, 0.4402, 0.3187]}, {"w": "new", "b": [0.4463, 0.3038, 0.4781, 0.3187]}, {"w": "model", "b": [0.4843, 0.3038, 0.533, 0.3187]}, {"w": "into", "b": [0.5391, 0.3038, 0.5704, 0.3187]}, {"w": "a", "b": [0.5765, 0.3038, 0.5857, 0.3187]}, {"w": "file,", "b": [0.5919, 0.3038, 0.6206, 0.3187]}, {"w": "and", "b": [0.6268, 0.3038, 0.6565, 0.3187]}, {"w": "then", "b": [0.6627, 0.3038, 0.6986, 0.3187]}, {"w": "replace", "b": [0.7047, 0.3038, 0.7612, 0.3187]}, {"w": "the", "b": [0.7673, 0.3038, 0.793, 0.3187]}, {"w": "old", "b": [0.7991, 0.3038, 0.8237, 0.3187]}, {"w": "one.", "b": [0.8299, 0.3038, 0.8627, 0.3187]}]}, {"id": "b_5", "type": "paragraph", "text": "Silent deployment consists of deploying the old and new versions, and running them in parallel. The user will not be exposed to the new version until the switch is done. The predictions made by the new version are only logged and analyzed. Thus, there is enough time to make sure that the new model works as expected without affecting any user. A drawback is the need to run more models, which consumes more resources.", "words": [{"w": "Silent", "b": [0.1312, 0.3308, 0.1759, 0.3456]}, {"w": "deployment", "b": [0.1809, 0.3308, 0.2718, 0.3456]}, {"w": "consists", "b": [0.2767, 0.3308, 0.3373, 0.3456]}, {"w": "of", "b": [0.3422, 0.3308, 0.3568, 0.3456]}, {"w": "deploying", "b": [0.3617, 0.3308, 0.4371, 0.3456]}, {"w": "the", "b": [0.442, 0.3308, 0.4671, 0.3456]}, {"w": "old", "b": [0.472, 0.3308, 0.4962, 0.3456]}, {"w": "and", "b": [0.5011, 0.3308, 0.5302, 0.3456]}, {"w": "new", "b": [0.5351, 0.3308, 0.5663, 0.3456]}, {"w": "versions,", "b": [0.5712, 0.3308, 0.6388, 0.3456]}, {"w": "and", "b": [0.644, 0.3308, 0.6731, 0.3456]}, {"w": "running", "b": [0.678, 0.3308, 0.7394, 0.3456]}, {"w": "them", "b": [0.7443, 0.3308, 0.7845, 0.3456]}, {"w": "in", "b": [0.7894, 0.3308, 0.8045, 0.3456]}, {"w": "parallel.", "b": [0.8094, 0.3308, 0.8727, 0.3456]}, {"w": "The", "b": [0.1306, 0.3485, 0.163, 0.3636]}, {"w": "user", "b": [0.1693, 0.3485, 0.2029, 0.3636]}, {"w": "will", "b": [0.2092, 0.3485, 0.2385, 0.3636]}, {"w": "not", "b": [0.2449, 0.3485, 0.272, 0.3636]}, {"w": "be", "b": [0.2783, 0.3485, 0.2977, 0.3636]}, {"w": "exposed", "b": [0.304, 0.3485, 0.369, 0.3636]}, {"w": "to", "b": [0.3753, 0.3485, 0.392, 0.3636]}, {"w": "the", "b": [0.3983, 0.3485, 0.4245, 0.3636]}, {"w": "new", "b": [0.4308, 0.3485, 0.4632, 0.3636]}, {"w": "version", "b": [0.4695, 0.3485, 0.5272, 0.3636]}, {"w": "until", "b": [0.5335, 0.3485, 0.5717, 0.3636]}, {"w": "the", "b": [0.578, 0.3485, 0.6042, 0.3636]}, {"w": "switch", "b": [0.6105, 0.3485, 0.6624, 0.3636]}, {"w": "is", "b": [0.6687, 0.3485, 0.6814, 0.3636]}, {"w": "done.", "b": [0.6877, 0.3485, 0.7316, 0.3636]}, {"w": "The", "b": [0.7403, 0.3485, 0.7727, 0.3636]}, {"w": "predictions", "b": [0.779, 0.3485, 0.8692, 0.3636]}, {"w": "made", "b": [0.1312, 0.3666, 0.1739, 0.3815]}, {"w": "by", "b": [0.1801, 0.3666, 0.1994, 0.3815]}, {"w": "the", "b": [0.2055, 0.3666, 0.231, 0.3815]}, {"w": "new", "b": [0.2371, 0.3666, 0.2686, 0.3815]}, {"w": "version", "b": [0.2748, 0.3666, 0.3308, 0.3815]}, {"w": "are", "b": [0.337, 0.3666, 0.3615, 0.3815]}, {"w": "only", "b": [0.3676, 0.3666, 0.4017, 0.3815]}, {"w": "logged", "b": [0.4078, 0.3666, 0.4586, 0.3815]}, {"w": "and", "b": [0.4648, 0.3666, 0.4943, 0.3815]}, {"w": "analyzed.", "b": [0.5004, 0.3666, 0.5751, 0.3815]}, {"w": "Thus,", "b": [0.5834, 0.3666, 0.6287, 0.3815]}, {"w": "there", "b": [0.6349, 0.3666, 0.6756, 0.3815]}, {"w": "is", "b": [0.6817, 0.3666, 0.694, 0.3815]}, {"w": "enough", "b": [0.7002, 0.3666, 0.7571, 0.3815]}, {"w": "time", "b": [0.7633, 0.3666, 0.7988, 0.3815]}, {"w": "to", "b": [0.805, 0.3666, 0.8213, 0.3815]}, {"w": "make", "b": [0.8274, 0.3666, 0.8691, 0.3815]}, {"w": "sure", "b": [0.1312, 0.3844, 0.1648, 0.3995]}, {"w": "that", "b": [0.1709, 0.3844, 0.2054, 0.3995]}, {"w": "the", "b": [0.2115, 0.3844, 0.2376, 0.3995]}, {"w": "new", "b": [0.2438, 0.3844, 0.2761, 0.3995]}, {"w": "model", "b": [0.2823, 0.3844, 0.3318, 0.3995]}, {"w": "works", "b": [0.3379, 0.3844, 0.3851, 0.3995]}, {"w": "as", "b": [0.3912, 0.3844, 0.408, 0.3995]}, {"w": "expected", "b": [0.4142, 0.3844, 0.4862, 0.3995]}, {"w": "without", "b": [0.4923, 0.3844, 0.556, 0.3995]}, {"w": "affecting", "b": [0.5621, 0.3844, 0.6315, 0.3995]}, {"w": "any", "b": [0.6377, 0.3844, 0.6669, 0.3995]}, {"w": "user.", "b": [0.673, 0.3844, 0.7118, 0.3995]}, {"w": "A", "b": [0.72, 0.3844, 0.7341, 0.3995]}, {"w": "drawback", "b": [0.7403, 0.3844, 0.8181, 0.3995]}, {"w": "is", "b": [0.8242, 0.3844, 0.8368, 0.3995]}, {"w": "the", "b": [0.843, 0.3844, 0.8691, 0.3995]}, {"w": "need", "b": [0.1312, 0.4025, 0.1682, 0.4174]}, {"w": "to", "b": [0.1743, 0.4025, 0.1907, 0.4174]}, {"w": "run", "b": [0.1969, 0.4025, 0.2246, 0.4174]}, {"w": "more", "b": [0.2308, 0.4025, 0.2708, 0.4174]}, {"w": "models,", "b": [0.2769, 0.4025, 0.3381, 0.4174]}, {"w": "which", "b": [0.3442, 0.4025, 0.3909, 0.4174]}, {"w": "consumes", "b": [0.397, 0.4025, 0.4731, 0.4174]}, {"w": "more", "b": [0.4793, 0.4025, 0.5193, 0.4174]}, {"w": "resources.", "b": [0.5255, 0.4025, 0.6037, 0.4174]}]}, {"id": "b_6", "type": "paragraph", "text": "Canary deployment consists of pushing the new version to a small fraction of the users, while keeping the old version running for most users. Canary deployment allows model performance validation and evaluating the users’ experience. It won’t affect lots of users in case of possible bugs.", "words": [{"w": "Canary", "b": [0.1312, 0.4295, 0.1891, 0.4443]}, {"w": "deployment", "b": [0.1949, 0.4295, 0.2859, 0.4443]}, {"w": "consists", "b": [0.2917, 0.4295, 0.3524, 0.4443]}, {"w": "of", "b": [0.3582, 0.4295, 0.3728, 0.4443]}, {"w": "pushing", "b": [0.3787, 0.4295, 0.4401, 0.4443]}, {"w": "the", "b": [0.446, 0.4295, 0.4711, 0.4443]}, {"w": "new", "b": [0.477, 0.4295, 0.5081, 0.4443]}, {"w": "version", "b": [0.514, 0.4295, 0.5694, 0.4443]}, {"w": "to", "b": [0.5753, 0.4295, 0.5914, 0.4443]}, {"w": "a", "b": [0.5972, 0.4295, 0.6063, 0.4443]}, {"w": "small", "b": [0.6122, 0.4295, 0.6534, 0.4443]}, {"w": "fraction", "b": [0.6593, 0.4295, 0.7202, 0.4443]}, {"w": "of", "b": [0.7261, 0.4295, 0.7406, 0.4443]}, {"w": "the", "b": [0.7465, 0.4295, 0.7716, 0.4443]}, {"w": "users,", "b": [0.7775, 0.4295, 0.822, 0.4443]}, {"w": "while", "b": [0.8279, 0.4295, 0.8691, 0.4443]}, {"w": "keeping", "b": [0.1312, 0.4474, 0.1905, 0.4623]}, {"w": "the", "b": [0.1958, 0.4474, 0.221, 0.4623]}, {"w": "old", "b": [0.2263, 0.4474, 0.2504, 0.4623]}, {"w": "version", "b": [0.2557, 0.4474, 0.3111, 0.4623]}, {"w": "running", "b": [0.3164, 0.4474, 0.3778, 0.4623]}, {"w": "for", "b": [0.3831, 0.4474, 0.4047, 0.4623]}, {"w": "most", "b": [0.41, 0.4474, 0.4483, 0.4623]}, {"w": "users.", "b": [0.4536, 0.4474, 0.4981, 0.4623]}, {"w": "Canary", "b": [0.506, 0.4474, 0.5638, 0.4623]}, {"w": "deployment", "b": [0.5691, 0.4474, 0.6601, 0.4623]}, {"w": "allows", "b": [0.6654, 0.4474, 0.7132, 0.4623]}, {"w": "model", "b": [0.7185, 0.4474, 0.7662, 0.4623]}, {"w": "performance", "b": [0.7715, 0.4474, 0.8691, 0.4623]}, {"w": "validation", "b": [0.1308, 0.4654, 0.2086, 0.4802]}, {"w": "and", "b": [0.2143, 0.4654, 0.2434, 0.4802]}, {"w": "evaluating", "b": [0.2491, 0.4654, 0.3299, 0.4802]}, {"w": "the", "b": [0.3356, 0.4654, 0.3607, 0.4802]}, {"w": "users’", "b": [0.3664, 0.4654, 0.4109, 0.4802]}, {"w": "experience.", "b": [0.4165, 0.4654, 0.5041, 0.4802]}, {"w": "It", "b": [0.5121, 0.4654, 0.5256, 0.4802]}, {"w": "won’t", "b": [0.5313, 0.4654, 0.575, 0.4802]}, {"w": "affect", "b": [0.5806, 0.4654, 0.6234, 0.4802]}, {"w": "lots", "b": [0.629, 0.4654, 0.6573, 0.4802]}, {"w": "of", "b": [0.6629, 0.4654, 0.6775, 0.4802]}, {"w": "users", "b": [0.6831, 0.4654, 0.7226, 0.4802]}, {"w": "in", "b": [0.7283, 0.4654, 0.7433, 0.4802]}, {"w": "case", "b": [0.749, 0.4654, 0.7812, 0.4802]}, {"w": "of", "b": [0.7869, 0.4654, 0.8015, 0.4802]}, {"w": "possible", "b": [0.8071, 0.4654, 0.8692, 0.4802]}, {"w": "bugs.", "b": [0.1312, 0.4832, 0.1734, 0.4982]}]}, {"id": "b_7", "type": "paragraph", "text": "Multi-armed bandits allow us to deploy the new model while keeping the old one. The algo- rithm replaces the old model with the new one only when it is certain that it performs better.", "words": [{"w": "Multi-armed", "b": [0.1312, 0.5102, 0.2316, 0.5251]}, {"w": "bandits", "b": [0.2377, 0.5102, 0.2969, 0.5251]}, {"w": "allow", "b": [0.3031, 0.5102, 0.3443, 0.5251]}, {"w": "us", "b": [0.3505, 0.5102, 0.3679, 0.5251]}, {"w": "to", "b": [0.374, 0.5102, 0.3903, 0.5251]}, {"w": "deploy", "b": [0.3965, 0.5102, 0.4484, 0.5251]}, {"w": "the", "b": [0.4546, 0.5102, 0.4801, 0.5251]}, {"w": "new", "b": [0.4862, 0.5102, 0.5178, 0.5251]}, {"w": "model", "b": [0.524, 0.5102, 0.5723, 0.5251]}, {"w": "while", "b": [0.5785, 0.5102, 0.6202, 0.5251]}, {"w": "keeping", "b": [0.6264, 0.5102, 0.6865, 0.5251]}, {"w": "the", "b": [0.6927, 0.5102, 0.7181, 0.5251]}, {"w": "old", "b": [0.7243, 0.5102, 0.7487, 0.5251]}, {"w": "one.", "b": [0.7549, 0.5102, 0.7875, 0.5251]}, {"w": "The", "b": [0.7957, 0.5102, 0.8273, 0.5251]}, {"w": "algo-", "b": [0.8335, 0.5102, 0.8721, 0.5251]}, {"w": "rithm", "b": [0.1312, 0.5282, 0.1755, 0.543]}, {"w": "replaces", "b": [0.1804, 0.5282, 0.2429, 0.543]}, {"w": "the", "b": [0.2478, 0.5282, 0.2729, 0.543]}, {"w": "old", "b": [0.2779, 0.5282, 0.302, 0.543]}, {"w": "model", "b": [0.3069, 0.5282, 0.3547, 0.543]}, {"w": "with", "b": [0.3596, 0.5282, 0.3947, 0.543]}, {"w": "the", "b": [0.3997, 0.5282, 0.4248, 0.543]}, {"w": "new", "b": [0.4297, 0.5282, 0.4609, 0.543]}, {"w": "one", "b": [0.4658, 0.5282, 0.4929, 0.543]}, {"w": "only", "b": [0.4978, 0.5282, 0.5315, 0.543]}, {"w": "when", "b": [0.5363, 0.5281, 0.5783, 0.543]}, {"w": "it", "b": [0.5844, 0.5281, 0.5968, 0.543]}, {"w": "is", "b": [0.6029, 0.5281, 0.6153, 0.543]}, {"w": "certain", "b": [0.6215, 0.5281, 0.6769, 0.543]}, {"w": "that", "b": [0.6831, 0.5281, 0.7169, 0.543]}, {"w": "it", "b": [0.723, 0.5281, 0.7353, 0.543]}, {"w": "performs", "b": [0.7415, 0.5281, 0.8125, 0.543]}, {"w": "better.", "b": [0.8186, 0.5281, 0.8725, 0.543]}]}, {"id": "b_8", "type": "paragraph", "text": "The deployment of a new model version must be automated by a script in a transactional way. Given a version of the model to deploy, the deployment script will fetch the model and the feature extraction object from the respective repositories and copy them to the production environment. The model must be applied to the end-to-end and confidence test data by simulating a regular call from the outside. If there’s a prediction error for the end-to-end test data, or the value of the metric is not within the range of acceptable values, the entire deployment has to be rolled back.", "words": [{"w": "The", "b": [0.1306, 0.5551, 0.1617, 0.5699]}, {"w": "deployment", "b": [0.1671, 0.5551, 0.2581, 0.5699]}, {"w": "of", "b": [0.2635, 0.5551, 0.2781, 0.5699]}, {"w": "a", "b": [0.2835, 0.5551, 0.2925, 0.5699]}, {"w": "new", "b": [0.298, 0.5551, 0.3291, 0.5699]}, {"w": "model", "b": [0.3346, 0.5551, 0.3823, 0.5699]}, {"w": "version", "b": [0.3877, 0.5551, 0.4432, 0.5699]}, {"w": "must", "b": [0.4486, 0.5551, 0.4874, 0.5699]}, {"w": "be", "b": [0.4928, 0.5551, 0.5114, 0.5699]}, {"w": "automated", "b": [0.5168, 0.5551, 0.6012, 0.5699]}, {"w": "by", "b": [0.6067, 0.5551, 0.6258, 0.5699]}, {"w": "a", "b": [0.6312, 0.5551, 0.6402, 0.5699]}, {"w": "script", "b": [0.6457, 0.5551, 0.69, 0.5699]}, {"w": "in", "b": [0.6955, 0.5551, 0.7105, 0.5699]}, {"w": "a", "b": [0.716, 0.5551, 0.725, 0.5699]}, {"w": "transactional", "b": [0.7304, 0.5551, 0.8331, 0.5699]}, {"w": "way.", "b": [0.8385, 0.5551, 0.8726, 0.5699]}, {"w": "Given", "b": [0.1312, 0.5729, 0.1788, 0.5879]}, {"w": "a", "b": [0.185, 0.5729, 0.1942, 0.5879]}, {"w": "version", "b": [0.2004, 0.5729, 0.2573, 0.5879]}, {"w": "of", "b": [0.2635, 0.5729, 0.2784, 0.5879]}, {"w": "the", "b": [0.2845, 0.5729, 0.3103, 0.5879]}, {"w": "model", "b": [0.3165, 0.5729, 0.3655, 0.5879]}, {"w": "to", "b": [0.3716, 0.5729, 0.3881, 0.5879]}, {"w": "deploy,", "b": [0.3943, 0.5729, 0.4505, 0.5879]}, {"w": "the", "b": [0.4566, 0.5729, 0.4824, 0.5879]}, {"w": "deployment", "b": [0.4886, 0.5729, 0.582, 0.5879]}, {"w": "script", "b": [0.5881, 0.5729, 0.6337, 0.5879]}, {"w": "will", "b": [0.6398, 0.5729, 0.6687, 0.5879]}, {"w": "fetch", "b": [0.6748, 0.5729, 0.7141, 0.5879]}, {"w": "the", "b": [0.7202, 0.5729, 0.746, 0.5879]}, {"w": "model", "b": [0.7521, 0.5729, 0.8011, 0.5879]}, {"w": "and", "b": [0.8073, 0.5729, 0.8372, 0.5879]}, {"w": "the", "b": [0.8433, 0.5729, 0.8691, 0.5879]}, {"w": "feature", "b": [0.1312, 0.5909, 0.1876, 0.6059]}, {"w": "extraction", "b": [0.1938, 0.5909, 0.276, 0.6059]}, {"w": "object", "b": [0.2821, 0.5909, 0.3317, 0.6059]}, {"w": "from", "b": [0.3379, 0.5909, 0.3757, 0.6059]}, {"w": "the", "b": [0.3818, 0.5909, 0.4076, 0.6059]}, {"w": "respective", "b": [0.4138, 0.5909, 0.4941, 0.6059]}, {"w": "repositories", "b": [0.5002, 0.5909, 0.593, 0.6059]}, {"w": "and", "b": [0.5992, 0.5909, 0.6291, 0.6059]}, {"w": "copy", "b": [0.6353, 0.5909, 0.6725, 0.6059]}, {"w": "them", "b": [0.6786, 0.5909, 0.72, 0.6059]}, {"w": "to", "b": [0.7261, 0.5909, 0.7426, 0.6059]}, {"w": "the", "b": [0.7488, 0.5909, 0.7746, 0.6059]}, {"w": "production", "b": [0.7807, 0.5909, 0.8692, 0.6059]}, {"w": "environment.", "b": [0.1312, 0.6087, 0.2385, 0.6238]}, {"w": "The", "b": [0.2497, 0.6087, 0.2822, 0.6238]}, {"w": "model", "b": [0.2893, 0.6087, 0.339, 0.6238]}, {"w": "must", "b": [0.3461, 0.6087, 0.3865, 0.6238]}, {"w": "be", "b": [0.3937, 0.6087, 0.413, 0.6238]}, {"w": "applied", "b": [0.4202, 0.6087, 0.4798, 0.6238]}, {"w": "to", "b": [0.487, 0.6087, 0.5037, 0.6238]}, {"w": "the", "b": [0.5108, 0.6087, 0.537, 0.6238]}, {"w": "end-to-end", "b": [0.5441, 0.6087, 0.632, 0.6238]}, {"w": "and", "b": [0.6392, 0.6087, 0.6695, 0.6238]}, {"w": "confidence", "b": [0.6766, 0.6087, 0.7614, 0.6238]}, {"w": "test", "b": [0.7686, 0.6087, 0.799, 0.6238]}, {"w": "data", "b": [0.8062, 0.6087, 0.8428, 0.6238]}, {"w": "by", "b": [0.8499, 0.6087, 0.8698, 0.6238]}, {"w": "simulating", "b": [0.1312, 0.6267, 0.2166, 0.6418]}, {"w": "a", "b": [0.223, 0.6267, 0.2325, 0.6418]}, {"w": "regular", "b": [0.2389, 0.6267, 0.2966, 0.6418]}, {"w": "call", "b": [0.303, 0.6267, 0.3313, 0.6418]}, {"w": "from", "b": [0.3377, 0.6267, 0.376, 0.6418]}, {"w": "the", "b": [0.3824, 0.6267, 0.4086, 0.6418]}, {"w": "outside.", "b": [0.4151, 0.6267, 0.479, 0.6418]}, {"w": "If", "b": [0.4881, 0.6267, 0.5007, 0.6418]}, {"w": "there’s", "b": [0.5072, 0.6267, 0.5617, 0.6418]}, {"w": "a", "b": [0.5682, 0.6267, 0.5776, 0.6418]}, {"w": "prediction", "b": [0.5841, 0.6267, 0.6668, 0.6418]}, {"w": "error", "b": [0.6733, 0.6267, 0.7132, 0.6418]}, {"w": "for", "b": [0.7196, 0.6267, 0.7422, 0.6418]}, {"w": "the", "b": [0.7486, 0.6267, 0.7748, 0.6418]}, {"w": "end-to-end", "b": [0.7813, 0.6267, 0.8691, 0.6418]}, {"w": "test", "b": [0.1312, 0.6447, 0.1612, 0.6597]}, {"w": "data,", "b": [0.1674, 0.6447, 0.2085, 0.6597]}, {"w": "or", "b": [0.2147, 0.6447, 0.2312, 0.6597]}, {"w": "the", "b": [0.2374, 0.6447, 0.2631, 0.6597]}, {"w": "value", "b": [0.2693, 0.6447, 0.311, 0.6597]}, {"w": "of", "b": [0.3171, 0.6447, 0.3321, 0.6597]}, {"w": "the", "b": [0.3382, 0.6447, 0.364, 0.6597]}, {"w": "metric", "b": [0.3701, 0.6447, 0.4216, 0.6597]}, {"w": "is", "b": [0.4278, 0.6447, 0.4403, 0.6597]}, {"w": "not", "b": [0.4464, 0.6447, 0.4732, 0.6597]}, {"w": "within", "b": [0.4793, 0.6447, 0.5308, 0.6597]}, {"w": "the", "b": [0.537, 0.6447, 0.5627, 0.6597]}, {"w": "range", "b": [0.5689, 0.6447, 0.6132, 0.6597]}, {"w": "of", "b": [0.6194, 0.6447, 0.6343, 0.6597]}, {"w": "acceptable", "b": [0.6404, 0.6447, 0.7249, 0.6597]}, {"w": "values,", "b": [0.731, 0.6447, 0.7852, 0.6597]}, {"w": "the", "b": [0.7914, 0.6447, 0.8171, 0.6597]}, {"w": "entire", "b": [0.8233, 0.6447, 0.8691, 0.6597]}, {"w": "deployment", "b": [0.1312, 0.6627, 0.224, 0.6776]}, {"w": "has", "b": [0.2302, 0.6627, 0.2569, 0.6776]}, {"w": "to", "b": [0.2631, 0.6627, 0.2795, 0.6776]}, {"w": "be", "b": [0.2857, 0.6627, 0.3046, 0.6776]}, {"w": "rolled", "b": [0.3108, 0.6627, 0.356, 0.6776]}, {"w": "back.", "b": [0.3621, 0.6627, 0.4042, 0.6776]}]}, {"id": "b_9", "type": "paragraph", "text": "The versions of training data, feature extractor, and model must always be in sync.", "words": [{"w": "The", "b": [0.1306, 0.6896, 0.1624, 0.7046]}, {"w": "versions", "b": [0.1685, 0.6896, 0.2324, 0.7046]}, {"w": "of", "b": [0.2385, 0.6896, 0.2534, 0.7046]}, {"w": "training", "b": [0.2595, 0.6896, 0.3232, 0.7046]}, {"w": "data,", "b": [0.3293, 0.6896, 0.3703, 0.7046]}, {"w": "feature", "b": [0.3765, 0.6896, 0.4324, 0.7046]}, {"w": "extractor,", "b": [0.4386, 0.6896, 0.5171, 0.7046]}, {"w": "and", "b": [0.5233, 0.6896, 0.553, 0.7046]}, {"w": "model", "b": [0.5592, 0.6896, 0.6079, 0.7046]}, {"w": "must", "b": [0.614, 0.6896, 0.6536, 0.7046]}, {"w": "always", "b": [0.6597, 0.6896, 0.7126, 0.7046]}, {"w": "be", "b": [0.7188, 0.6896, 0.7378, 0.7046]}, {"w": "in", "b": [0.7439, 0.6896, 0.7593, 0.7046]}, {"w": "sync.", "b": [0.7654, 0.6896, 0.8061, 0.7046]}]}, {"id": "b_10", "type": "paragraph", "text": "Algorithmic efficiency is an important consideration in model deployment. Experienced scientists and engineers built Python packages like NumPy, SciPy, and scikit-learn with efficiency in mind. Your own code may not be as reliable or efficient. You should only write your own code when it’s absolutely necessary.", "words": [{"w": "Algorithmic", "b": [0.1305, 0.7164, 0.2284, 0.7315]}, {"w": "efficiency", "b": [0.2362, 0.7164, 0.311, 0.7315]}, {"w": "is", "b": [0.3188, 0.7164, 0.3315, 0.7315]}, {"w": "an", "b": [0.3393, 0.7164, 0.3592, 0.7315]}, {"w": "important", "b": [0.367, 0.7164, 0.4497, 0.7315]}, {"w": "consideration", "b": [0.4575, 0.7164, 0.5664, 0.7315]}, {"w": "in", "b": [0.5742, 0.7164, 0.5899, 0.7315]}, {"w": "model", "b": [0.5978, 0.7164, 0.6474, 0.7315]}, {"w": "deployment.", "b": [0.6552, 0.7164, 0.7551, 0.7315]}, {"w": "Experienced", "b": [0.7684, 0.7164, 0.8691, 0.7315]}, {"w": "scientists", "b": [0.1312, 0.7344, 0.2053, 0.7495]}, {"w": "and", "b": [0.2129, 0.7344, 0.2432, 0.7495]}, {"w": "engineers", "b": [0.2507, 0.7344, 0.3262, 0.7495]}, {"w": "built", "b": [0.3338, 0.7344, 0.3725, 0.7495]}, {"w": "Python", "b": [0.38, 0.7344, 0.4404, 0.7495]}, {"w": "packages", "b": [0.4479, 0.7344, 0.5202, 0.7495]}, {"w": "like", "b": [0.5278, 0.7344, 0.556, 0.7495]}, {"w": "NumPy,", "b": [0.5635, 0.7344, 0.6302, 0.7495]}, {"w": "SciPy,", "b": [0.6381, 0.7344, 0.6886, 0.7495]}, {"w": "and", "b": [0.6965, 0.7344, 0.7268, 0.7495]}, {"w": "scikit-learn", "b": [0.7344, 0.7344, 0.825, 0.7495]}, {"w": "with", "b": [0.8326, 0.7344, 0.8692, 0.7495]}, {"w": "efficiency", "b": [0.1312, 0.7525, 0.204, 0.7674]}, {"w": "in", "b": [0.2101, 0.7525, 0.2254, 0.7674]}, {"w": "mind.", "b": [0.2316, 0.7525, 0.2773, 0.7674]}, {"w": "Your", "b": [0.2856, 0.7525, 0.3242, 0.7674]}, {"w": "own", "b": [0.3304, 0.7525, 0.3624, 0.7674]}, {"w": "code", "b": [0.3686, 0.7525, 0.4047, 0.7674]}, {"w": "may", "b": [0.4109, 0.7525, 0.4444, 0.7674]}, {"w": "not", "b": [0.4506, 0.7525, 0.477, 0.7674]}, {"w": "be", "b": [0.4832, 0.7525, 0.502, 0.7674]}, {"w": "as", "b": [0.5082, 0.7525, 0.5246, 0.7674]}, {"w": "reliable", "b": [0.5307, 0.7525, 0.5888, 0.7674]}, {"w": "or", "b": [0.5949, 0.7525, 0.6112, 0.7674]}, {"w": "efficient.", "b": [0.6174, 0.7525, 0.6841, 0.7674]}, {"w": "You", "b": [0.6923, 0.7525, 0.7238, 0.7674]}, {"w": "should", "b": [0.73, 0.7525, 0.7819, 0.7674]}, {"w": "only", "b": [0.7881, 0.7525, 0.8222, 0.7674]}, {"w": "write", "b": [0.8283, 0.7525, 0.8691, 0.7674]}, {"w": "your", "b": [0.1308, 0.7704, 0.1667, 0.7853]}, {"w": "own", "b": [0.1728, 0.7704, 0.2051, 0.7853]}, {"w": "code", "b": [0.2113, 0.7704, 0.2477, 0.7853]}, {"w": "when", "b": [0.2538, 0.7704, 0.2959, 0.7853]}, {"w": "it’s", "b": [0.302, 0.7704, 0.3268, 0.7853]}, {"w": "absolutely", "b": [0.3329, 0.7704, 0.4145, 0.7853]}, {"w": "necessary.", "b": [0.4207, 0.7704, 0.4999, 0.7853]}]}, {"id": "b_11", "type": "paragraph", "text": "If you implement your own algorithmic code, avoid loops. Implement vectorization with NumPy or similar tools. Use appropriate data structures. If the order of elements in a collection doesn’t matter, use a set instead of a list. Using dictionaries (or hash tables) allows you to define a collection of key-value pairs with very fast lookups for keys.", "words": [{"w": "If", "b": [0.1312, 0.7972, 0.1438, 0.8123]}, {"w": "you", "b": [0.151, 0.7972, 0.1803, 0.8123]}, {"w": "implement", "b": [0.1874, 0.7972, 0.2737, 0.8123]}, {"w": "your", "b": [0.2809, 0.7972, 0.3176, 0.8123]}, {"w": "own", "b": [0.3247, 0.7972, 0.3577, 0.8123]}, {"w": "algorithmic", "b": [0.3649, 0.7972, 0.458, 0.8123]}, {"w": "code,", "b": [0.4652, 0.7972, 0.5075, 0.8123]}, {"w": "avoid", "b": [0.515, 0.7972, 0.5584, 0.8123]}, {"w": "loops.", "b": [0.5656, 0.7972, 0.6132, 0.8123]}, {"w": "Implement", "b": [0.6245, 0.7972, 0.7124, 0.8123]}, {"w": "vectorization", "b": [0.7195, 0.7972, 0.8253, 0.8123]}, {"w": "with", "b": [0.8324, 0.7972, 0.869, 0.8123]}, {"w": "NumPy", "b": [0.1312, 0.8151, 0.1942, 0.8302]}, {"w": "or", "b": [0.2018, 0.8151, 0.2186, 0.8302]}, {"w": "similar", "b": [0.2262, 0.8151, 0.2818, 0.8302]}, {"w": "tools.", "b": [0.2894, 0.8151, 0.3339, 0.8302]}, {"w": "Use", "b": [0.3465, 0.8151, 0.3764, 0.8302]}, {"w": "appropriate", "b": [0.384, 0.8151, 0.4793, 0.8302]}, {"w": "data", "b": [0.4869, 0.8151, 0.5235, 0.8302]}, {"w": "structures.", "b": [0.5311, 0.8151, 0.6182, 0.8302]}, {"w": "If", "b": [0.6308, 0.8151, 0.6434, 0.8302]}, {"w": "the", "b": [0.651, 0.8151, 0.6771, 0.8302]}, {"w": "order", "b": [0.6847, 0.8151, 0.7277, 0.8302]}, {"w": "of", "b": [0.7353, 0.8151, 0.7505, 0.8302]}, {"w": "elements", "b": [0.7581, 0.8151, 0.8288, 0.8302]}, {"w": "in", "b": [0.8364, 0.8151, 0.8521, 0.8302]}, {"w": "a", "b": [0.8597, 0.8151, 0.8691, 0.8302]}, {"w": "collection", "b": [0.1312, 0.8331, 0.2087, 0.8482]}, {"w": "doesn’t", "b": [0.215, 0.8331, 0.2742, 0.8482]}, {"w": "matter,", "b": [0.2806, 0.8331, 0.3413, 0.8482]}, {"w": "use", "b": [0.3478, 0.8331, 0.374, 0.8482]}, {"w": "a", "b": [0.3804, 0.8331, 0.3898, 0.8482]}, {"w": "set", "b": [0.3963, 0.8329, 0.4253, 0.8478]}, {"w": "instead", "b": [0.4317, 0.8331, 0.4904, 0.8482]}, {"w": "of", "b": [0.4968, 0.8331, 0.512, 0.8482]}, {"w": "a", "b": [0.5183, 0.8331, 0.5277, 0.8482]}, {"w": "list.", "b": [0.5343, 0.8329, 0.5783, 0.8482]}, {"w": "Using", "b": [0.5872, 0.8331, 0.6338, 0.8482]}, {"w": "dictionaries", "b": [0.6402, 0.8331, 0.7345, 0.8482]}, {"w": "(or", "b": [0.7409, 0.8331, 0.765, 0.8482]}, {"w": "hash", "b": [0.7714, 0.8331, 0.8091, 0.8482]}, {"w": "tables)", "b": [0.8155, 0.8331, 0.8711, 0.8482]}, {"w": "allows", "b": [0.1312, 0.8511, 0.18, 0.8661]}, {"w": "you", "b": [0.1862, 0.8511, 0.2149, 0.8661]}, {"w": "to", "b": [0.221, 0.8511, 0.2374, 0.8661]}, {"w": "define", "b": [0.2436, 0.8511, 0.2908, 0.8661]}, {"w": "a", "b": [0.2969, 0.8511, 0.3062, 0.8661]}, {"w": "collection", "b": [0.3123, 0.8511, 0.3882, 0.8661]}, {"w": "of", "b": [0.3944, 0.8511, 0.4092, 0.8661]}, {"w": "key-value", "b": [0.4154, 0.8511, 0.4902, 0.8661]}, {"w": "pairs", "b": [0.4964, 0.8511, 0.5355, 0.8661]}, {"w": "with", "b": [0.5417, 0.8511, 0.5775, 0.8661]}, {"w": "very", "b": [0.5837, 0.8511, 0.6181, 0.8661]}, {"w": "fast", "b": [0.6243, 0.8511, 0.6536, 0.8661]}, {"w": "lookups", "b": [0.6597, 0.8511, 0.7214, 0.8661]}, {"w": "for", "b": [0.7275, 0.8511, 0.7496, 0.8661]}, {"w": "keys.", "b": [0.7558, 0.8511, 0.7954, 0.8661]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 23", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "23", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 263, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Caching speeds up the application when it contains resource-consuming functions frequently called with the same parameter values. In machine learning, such resource-consuming functions are models, especially when they run on GPUs.", "words": [{"w": "Caching", "b": [0.1312, 0.0885, 0.1956, 0.1033]}, {"w": "speeds", "b": [0.2018, 0.0885, 0.2532, 0.1033]}, {"w": "up", "b": [0.2593, 0.0885, 0.2796, 0.1033]}, {"w": "the", "b": [0.2858, 0.0885, 0.3111, 0.1033]}, {"w": "application", "b": [0.3173, 0.0885, 0.4055, 0.1033]}, {"w": "when", "b": [0.4116, 0.0885, 0.4532, 0.1033]}, {"w": "it", "b": [0.4593, 0.0885, 0.4715, 0.1033]}, {"w": "contains", "b": [0.4776, 0.0885, 0.5432, 0.1033]}, {"w": "resource-consuming", "b": [0.5493, 0.0885, 0.7048, 0.1033]}, {"w": "functions", "b": [0.7109, 0.0885, 0.7835, 0.1033]}, {"w": "frequently", "b": [0.7897, 0.0885, 0.8699, 0.1033]}, {"w": "called", "b": [0.1312, 0.1062, 0.1783, 0.1213]}, {"w": "with", "b": [0.1871, 0.1062, 0.2237, 0.1213]}, {"w": "the", "b": [0.2325, 0.1062, 0.2586, 0.1213]}, {"w": "same", "b": [0.2674, 0.1062, 0.3083, 0.1213]}, {"w": "parameter", "b": [0.3171, 0.1062, 0.4009, 0.1213]}, {"w": "values.", "b": [0.4097, 0.1062, 0.4647, 0.1213]}, {"w": "In", "b": [0.4808, 0.1062, 0.4981, 0.1213]}, {"w": "machine", "b": [0.5069, 0.1062, 0.5743, 0.1213]}, {"w": "learning,", "b": [0.5831, 0.1062, 0.6543, 0.1213]}, {"w": "such", "b": [0.6638, 0.1062, 0.7, 0.1213]}, {"w": "resource-consuming", "b": [0.7088, 0.1062, 0.8691, 0.1213]}, {"w": "functions", "b": [0.1312, 0.1243, 0.2047, 0.1392]}, {"w": "are", "b": [0.2108, 0.1243, 0.2355, 0.1392]}, {"w": "models,", "b": [0.2416, 0.1243, 0.3028, 0.1392]}, {"w": "especially", "b": [0.3089, 0.1243, 0.3859, 0.1392]}, {"w": "when", "b": [0.3921, 0.1243, 0.4341, 0.1392]}, {"w": "they", "b": [0.4403, 0.1243, 0.4757, 0.1392]}, {"w": "run", "b": [0.4818, 0.1243, 0.5096, 0.1392]}, {"w": "on", "b": [0.5157, 0.1243, 0.5352, 0.1392]}, {"w": "GPUs.", "b": [0.5413, 0.1243, 0.5946, 0.1392]}]}, {"id": "b_1", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 24", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "24", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 264, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 265, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 266, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "9 Model Serving, Monitoring, and Maintenance", "words": [{"w": "9", "b": [0.1312, 0.0833, 0.1462, 0.1048]}, {"w": "Model", "b": [0.1761, 0.0833, 0.2588, 0.1048]}, {"w": "Serving,", "b": [0.2687, 0.0833, 0.3751, 0.1048]}, {"w": "Monitoring,", "b": [0.3851, 0.0833, 0.5403, 0.1048]}, {"w": "and", "b": [0.5503, 0.0833, 0.598, 0.1048]}, {"w": "Maintenance", "b": [0.608, 0.0833, 0.7749, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "In this chapter, we consider the best practices of serving, monitoring, and maintaining models in production. These are the last three stages in the machine learning project life cycle:", "words": [{"w": "In", "b": [0.1312, 0.1302, 0.1478, 0.145]}, {"w": "this", "b": [0.1532, 0.1302, 0.1825, 0.145]}, {"w": "chapter,", "b": [0.1879, 0.1302, 0.2517, 0.145]}, {"w": "we", "b": [0.2573, 0.1302, 0.2779, 0.145]}, {"w": "consider", "b": [0.2833, 0.1302, 0.3478, 0.145]}, {"w": "the", "b": [0.3532, 0.1302, 0.3783, 0.145]}, {"w": "best", "b": [0.3837, 0.1302, 0.4165, 0.145]}, {"w": "practices", "b": [0.4219, 0.1302, 0.4914, 0.145]}, {"w": "of", "b": [0.4968, 0.1302, 0.5114, 0.145]}, {"w": "serving,", "b": [0.5168, 0.1302, 0.5778, 0.145]}, {"w": "monitoring,", "b": [0.5833, 0.1302, 0.6748, 0.145]}, {"w": "and", "b": [0.6804, 0.1302, 0.7095, 0.145]}, {"w": "maintaining", "b": [0.7149, 0.1302, 0.8088, 0.145]}, {"w": "models", "b": [0.8143, 0.1302, 0.8691, 0.145]}, {"w": "in", "b": [0.1312, 0.1481, 0.1466, 0.163]}, {"w": "production.", "b": [0.1528, 0.1481, 0.2456, 0.163]}, {"w": "These", "b": [0.2538, 0.1481, 0.3011, 0.163]}, {"w": "are", "b": [0.3073, 0.1481, 0.3319, 0.163]}, {"w": "the", "b": [0.3381, 0.1481, 0.3637, 0.163]}, {"w": "last", "b": [0.3699, 0.1481, 0.3987, 0.163]}, {"w": "three", "b": [0.4048, 0.1481, 0.4459, 0.163]}, {"w": "stages", "b": [0.4521, 0.1481, 0.5005, 0.163]}, {"w": "in", "b": [0.5066, 0.1481, 0.522, 0.163]}, {"w": "the", "b": [0.5282, 0.1481, 0.5538, 0.163]}, {"w": "machine", "b": [0.56, 0.1481, 0.6261, 0.163]}, {"w": "learning", "b": [0.6322, 0.1481, 0.6969, 0.163]}, {"w": "project", "b": [0.703, 0.1481, 0.7595, 0.163]}, {"w": "life", "b": [0.7657, 0.1481, 0.7898, 0.163]}, {"w": "cycle:", "b": [0.7959, 0.1481, 0.8406, 0.163]}]}, {"id": "b_2", "type": "paragraph", "text": "Figure 1: Machine learning project life cycle.", "words": [{"w": "Figure", "b": [0.3186, 0.4661, 0.3707, 0.481]}, {"w": "1:", "b": [0.3769, 0.4661, 0.3912, 0.481]}, {"w": "Machine", "b": [0.3994, 0.4661, 0.4671, 0.481]}, {"w": "learning", "b": [0.4733, 0.4661, 0.5379, 0.481]}, {"w": "project", "b": [0.5441, 0.4661, 0.6006, 0.481]}, {"w": "life", "b": [0.6067, 0.4661, 0.6308, 0.481]}, {"w": "cycle.", "b": [0.637, 0.4661, 0.6816, 0.481]}]}, {"id": "b_3", "type": "paragraph", "text": "In particular, we characterize the properties of a machine learning runtime, the environment in which the input data is applied to the model, and the modes of model serving, such as batch and on demand. Furthermore, we consider three major challenges of serving a model in real world: errors, change, and human nature. We describe what should be monitored in the production environment, and when and how update the model.", "words": [{"w": "In", "b": [0.1312, 0.5164, 0.1479, 0.5313]}, {"w": "particular,", "b": [0.1541, 0.5164, 0.2372, 0.5313]}, {"w": "we", "b": [0.2433, 0.5164, 0.2641, 0.5313]}, {"w": "characterize", "b": [0.2702, 0.5164, 0.365, 0.5313]}, {"w": "the", "b": [0.3711, 0.5164, 0.3965, 0.5313]}, {"w": "properties", "b": [0.4026, 0.5164, 0.4823, 0.5313]}, {"w": "of", "b": [0.4884, 0.5164, 0.5031, 0.5313]}, {"w": "a", "b": [0.5093, 0.5164, 0.5184, 0.5313]}, {"w": "machine", "b": [0.5245, 0.5164, 0.5898, 0.5313]}, {"w": "learning", "b": [0.596, 0.5164, 0.6598, 0.5313]}, {"w": "runtime,", "b": [0.666, 0.5164, 0.7333, 0.5313]}, {"w": "the", "b": [0.7395, 0.5164, 0.7648, 0.5313]}, {"w": "environment", "b": [0.7709, 0.5164, 0.8696, 0.5313]}, {"w": "in", "b": [0.1312, 0.5342, 0.1469, 0.5493]}, {"w": "which", "b": [0.1533, 0.5342, 0.2009, 0.5493]}, {"w": "the", "b": [0.2072, 0.5342, 0.2334, 0.5493]}, {"w": "input", "b": [0.2397, 0.5342, 0.2837, 0.5493]}, {"w": "data", "b": [0.29, 0.5342, 0.3266, 0.5493]}, {"w": "is", "b": [0.333, 0.5342, 0.3457, 0.5493]}, {"w": "applied", "b": [0.352, 0.5342, 0.4116, 0.5493]}, {"w": "to", "b": [0.418, 0.5342, 0.4347, 0.5493]}, {"w": "the", "b": [0.4411, 0.5342, 0.4672, 0.5493]}, {"w": "model,", "b": [0.4736, 0.5342, 0.5285, 0.5493]}, {"w": "and", "b": [0.5349, 0.5342, 0.5652, 0.5493]}, {"w": "the", "b": [0.5716, 0.5342, 0.5977, 0.5493]}, {"w": "modes", "b": [0.6041, 0.5342, 0.656, 0.5493]}, {"w": "of", "b": [0.6623, 0.5342, 0.6775, 0.5493]}, {"w": "model", "b": [0.6838, 0.5342, 0.7335, 0.5493]}, {"w": "serving,", "b": [0.7399, 0.5342, 0.8033, 0.5493]}, {"w": "such", "b": [0.8097, 0.5342, 0.8459, 0.5493]}, {"w": "as", "b": [0.8523, 0.5342, 0.8691, 0.5493]}, {"w": "batch", "b": [0.1312, 0.5522, 0.176, 0.5672]}, {"w": "and", "b": [0.1821, 0.5522, 0.2119, 0.5672]}, {"w": "on", "b": [0.2181, 0.5522, 0.2376, 0.5672]}, {"w": "demand.", "b": [0.2437, 0.5522, 0.3126, 0.5672]}, {"w": "Furthermore,", "b": [0.3208, 0.5522, 0.4272, 0.5672]}, {"w": "we", "b": [0.4333, 0.5522, 0.4544, 0.5672]}, {"w": "consider", "b": [0.4605, 0.5522, 0.5265, 0.5672]}, {"w": "three", "b": [0.5327, 0.5522, 0.5739, 0.5672]}, {"w": "major", "b": [0.58, 0.5522, 0.6273, 0.5672]}, {"w": "challenges", "b": [0.6335, 0.5522, 0.7143, 0.5672]}, {"w": "of", "b": [0.7205, 0.5522, 0.7354, 0.5672]}, {"w": "serving", "b": [0.7415, 0.5522, 0.7988, 0.5672]}, {"w": "a", "b": [0.8049, 0.5522, 0.8141, 0.5672]}, {"w": "model", "b": [0.8203, 0.5522, 0.8691, 0.5672]}, {"w": "in", "b": [0.1312, 0.5702, 0.1466, 0.5851]}, {"w": "real", "b": [0.1528, 0.5702, 0.1825, 0.5851]}, {"w": "world:", "b": [0.1887, 0.5702, 0.2384, 0.5851]}, {"w": "errors,", "b": [0.2466, 0.5702, 0.2981, 0.5851]}, {"w": "change,", "b": [0.3042, 0.5702, 0.3642, 0.5851]}, {"w": "and", "b": [0.3703, 0.5702, 0.4, 0.5851]}, {"w": "human", "b": [0.4062, 0.5702, 0.461, 0.5851]}, {"w": "nature.", "b": [0.4671, 0.5702, 0.5246, 0.5851]}, {"w": "We", "b": [0.5327, 0.5702, 0.5584, 0.5851]}, {"w": "describe", "b": [0.5645, 0.5702, 0.6297, 0.5851]}, {"w": "what", "b": [0.6359, 0.5702, 0.6758, 0.5851]}, {"w": "should", "b": [0.682, 0.5702, 0.7343, 0.5851]}, {"w": "be", "b": [0.7405, 0.5702, 0.7595, 0.5851]}, {"w": "monitored", "b": [0.7656, 0.5702, 0.8476, 0.5851]}, {"w": "in", "b": [0.8538, 0.5702, 0.8691, 0.5851]}, {"w": "the", "b": [0.1312, 0.5881, 0.1569, 0.6031]}, {"w": "production", "b": [0.163, 0.5881, 0.2508, 0.6031]}, {"w": "environment,", "b": [0.2569, 0.5881, 0.3621, 0.6031]}, {"w": "and", "b": [0.3682, 0.5881, 0.398, 0.6031]}, {"w": "when", "b": [0.4041, 0.5881, 0.4462, 0.6031]}, {"w": "and", "b": [0.4523, 0.5881, 0.482, 0.6031]}, {"w": "how", "b": [0.4882, 0.5881, 0.5205, 0.6031]}, {"w": "update", "b": [0.5266, 0.5881, 0.5825, 0.6031]}, {"w": "the", "b": [0.5887, 0.5881, 0.6143, 0.6031]}, {"w": "model.", "b": [0.6205, 0.5881, 0.6743, 0.6031]}]}, {"id": "b_4", "type": "paragraph", "text": "9.1 Properties of the Model Serving Runtime", "words": [{"w": "9.1", "b": [0.1312, 0.6366, 0.1631, 0.6546]}, {"w": "Properties", "b": [0.188, 0.6366, 0.3016, 0.6546]}, {"w": "of", "b": [0.3099, 0.6366, 0.3299, 0.6546]}, {"w": "the", "b": [0.3382, 0.6366, 0.3731, 0.6546]}, {"w": "Model", "b": [0.3814, 0.6366, 0.4503, 0.6546]}, {"w": "Serving", "b": [0.4587, 0.6366, 0.5404, 0.6546]}, {"w": "Runtime", "b": [0.5487, 0.6366, 0.6423, 0.6546]}]}, {"id": "b_5", "type": "paragraph", "text": "The model serving runtime is the environment in which the model is applied to the input data. The runtime properties are dictated by the model deployment pattern. However, an effective runtime will have several additional properties that we discuss here.", "words": [{"w": "The", "b": [0.1306, 0.6754, 0.163, 0.6905]}, {"w": "model", "b": [0.1693, 0.6754, 0.219, 0.6905]}, {"w": "serving", "b": [0.2254, 0.6754, 0.2836, 0.6905]}, {"w": "runtime", "b": [0.2899, 0.6754, 0.3543, 0.6905]}, {"w": "is", "b": [0.3607, 0.6754, 0.3733, 0.6905]}, {"w": "the", "b": [0.3797, 0.6754, 0.4058, 0.6905]}, {"w": "environment", "b": [0.4122, 0.6754, 0.5142, 0.6905]}, {"w": "in", "b": [0.5206, 0.6754, 0.5363, 0.6905]}, {"w": "which", "b": [0.5426, 0.6754, 0.5902, 0.6905]}, {"w": "the", "b": [0.5966, 0.6754, 0.6227, 0.6905]}, {"w": "model", "b": [0.6291, 0.6754, 0.6787, 0.6905]}, {"w": "is", "b": [0.6851, 0.6754, 0.6978, 0.6905]}, {"w": "applied", "b": [0.7041, 0.6754, 0.7637, 0.6905]}, {"w": "to", "b": [0.7701, 0.6754, 0.7868, 0.6905]}, {"w": "the", "b": [0.7932, 0.6754, 0.8193, 0.6905]}, {"w": "input", "b": [0.8257, 0.6754, 0.8696, 0.6905]}, {"w": "data.", "b": [0.1312, 0.6934, 0.1731, 0.7085]}, {"w": "The", "b": [0.1818, 0.6934, 0.2142, 0.7085]}, {"w": "runtime", "b": [0.2205, 0.6934, 0.2849, 0.7085]}, {"w": "properties", "b": [0.2912, 0.6934, 0.3735, 0.7085]}, {"w": "are", "b": [0.3799, 0.6934, 0.405, 0.7085]}, {"w": "dictated", "b": [0.4113, 0.6934, 0.4783, 0.7085]}, {"w": "by", "b": [0.4846, 0.6934, 0.5045, 0.7085]}, {"w": "the", "b": [0.5108, 0.6934, 0.537, 0.7085]}, {"w": "model", "b": [0.5433, 0.6934, 0.5929, 0.7085]}, {"w": "deployment", "b": [0.5991, 0.6934, 0.7064, 0.7084]}, {"w": "pattern.", "b": [0.7137, 0.6934, 0.7878, 0.7085]}, {"w": "However,", "b": [0.7965, 0.6934, 0.8714, 0.7085]}, {"w": "an", "b": [0.1312, 0.7114, 0.1507, 0.7264]}, {"w": "effective", "b": [0.1569, 0.7114, 0.222, 0.7264]}, {"w": "runtime", "b": [0.2281, 0.7114, 0.2913, 0.7264]}, {"w": "will", "b": [0.2974, 0.7114, 0.3261, 0.7264]}, {"w": "have", "b": [0.3323, 0.7114, 0.3687, 0.7264]}, {"w": "several", "b": [0.3748, 0.7114, 0.4293, 0.7264]}, {"w": "additional", "b": [0.4355, 0.7114, 0.5165, 0.7264]}, {"w": "properties", "b": [0.5226, 0.7114, 0.6034, 0.7264]}, {"w": "that", "b": [0.6095, 0.7114, 0.6433, 0.7264]}, {"w": "we", "b": [0.6495, 0.7114, 0.6705, 0.7264]}, {"w": "discuss", "b": [0.6767, 0.7114, 0.7324, 0.7264]}, {"w": "here.", "b": [0.7385, 0.7114, 0.7776, 0.7264]}]}, {"id": "b_6", "type": "paragraph", "text": "9.1.1 Security and Correctness", "words": [{"w": "9.1.1", "b": [0.1312, 0.7592, 0.1749, 0.7742]}, {"w": "Security", "b": [0.1961, 0.7592, 0.2723, 0.7742]}, {"w": "and", "b": [0.2794, 0.7592, 0.3133, 0.7742]}, {"w": "Correctness", "b": [0.3204, 0.7592, 0.4294, 0.7742]}]}, {"id": "b_7", "type": "paragraph", "text": "The runtime is responsible for authenticating the user’s identity, and authorizing their requests.", "words": [{"w": "The", "b": [0.1306, 0.796, 0.1617, 0.8108]}, {"w": "runtime", "b": [0.1663, 0.796, 0.2281, 0.8108]}, {"w": "is", "b": [0.2327, 0.796, 0.2449, 0.8108]}, {"w": "responsible", "b": [0.2495, 0.796, 0.3367, 0.8108]}, {"w": "for", "b": [0.3413, 0.796, 0.3629, 0.8108]}, {"w": "authenticating", "b": [0.3675, 0.796, 0.4815, 0.8108]}, {"w": "the", "b": [0.4861, 0.796, 0.5112, 0.8108]}, {"w": "user’s", "b": [0.5158, 0.796, 0.5603, 0.8108]}, {"w": "identity,", "b": [0.5649, 0.796, 0.6292, 0.8108]}, {"w": "and", "b": [0.6341, 0.796, 0.6632, 0.8108]}, {"w": "authorizing", "b": [0.6678, 0.796, 0.7573, 0.8108]}, {"w": "their", "b": [0.7619, 0.796, 0.7991, 0.8108]}, {"w": "requests.", "b": [0.8037, 0.796, 0.8728, 0.8108]}]}, {"id": "b_8", "type": "paragraph", "text": "Things to check are:", "words": [{"w": "Things", "b": [0.1306, 0.8228, 0.186, 0.8377]}, {"w": "to", "b": [0.1922, 0.8228, 0.2086, 0.8377]}, {"w": "check", "b": [0.2148, 0.8228, 0.2583, 0.8377]}, {"w": "are:", "b": [0.2645, 0.8228, 0.2943, 0.8377]}]}, {"id": "b_9", "type": "paragraph", "text": "• whether a specific user has authorized access to the models they want to run,", "words": [{"w": "•", "b": [0.1538, 0.8497, 0.1681, 0.8647]}, {"w": "whether", "b": [0.1774, 0.8497, 0.242, 0.8647]}, {"w": "a", "b": [0.2482, 0.8497, 0.2574, 0.8647]}, {"w": "specific", "b": [0.2635, 0.8497, 0.3216, 0.8647]}, {"w": "user", "b": [0.3278, 0.8497, 0.3607, 0.8647]}, {"w": "has", "b": [0.3669, 0.8497, 0.3937, 0.8647]}, {"w": "authorized", "b": [0.3998, 0.8497, 0.485, 0.8647]}, {"w": "access", "b": [0.4911, 0.8497, 0.5396, 0.8647]}, {"w": "to", "b": [0.5457, 0.8497, 0.5621, 0.8647]}, {"w": "the", "b": [0.5683, 0.8497, 0.5939, 0.8647]}, {"w": "models", "b": [0.6, 0.8497, 0.656, 0.8647]}, {"w": "they", "b": [0.6622, 0.8497, 0.6976, 0.8647]}, {"w": "want", "b": [0.7037, 0.8497, 0.7427, 0.8647]}, {"w": "to", "b": [0.7488, 0.8497, 0.7652, 0.8647]}, {"w": "run,", "b": [0.7714, 0.8497, 0.8042, 0.8647]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "3", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 267, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• whether the names and the values of parameters passed correspond to the model’s specification, and • whether those parameters and their values are currently available to the user.", "words": [{"w": "•", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "whether", "b": [0.1774, 0.0883, 0.2433, 0.1034]}, {"w": "the", "b": [0.2506, 0.0883, 0.2767, 0.1034]}, {"w": "names", "b": [0.284, 0.0883, 0.3354, 0.1034]}, {"w": "and", "b": [0.3426, 0.0883, 0.373, 0.1034]}, {"w": "the", "b": [0.3802, 0.0883, 0.4064, 0.1034]}, {"w": "values", "b": [0.4136, 0.0883, 0.4635, 0.1034]}, {"w": "of", "b": [0.4707, 0.0883, 0.4859, 0.1034]}, {"w": "parameters", "b": [0.4931, 0.0883, 0.5844, 0.1034]}, {"w": "passed", "b": [0.5916, 0.0883, 0.6452, 0.1034]}, {"w": "correspond", "b": [0.6525, 0.0883, 0.7421, 0.1034]}, {"w": "to", "b": [0.7494, 0.0883, 0.7661, 0.1034]}, {"w": "the", "b": [0.7734, 0.0883, 0.7995, 0.1034]}, {"w": "model’s", "b": [0.8068, 0.0883, 0.8691, 0.1034]}, {"w": "specification,", "b": [0.1774, 0.1063, 0.2816, 0.1213]}, {"w": "and", "b": [0.2877, 0.1063, 0.3175, 0.1213]}, {"w": "•", "b": [0.1538, 0.1243, 0.1681, 0.1392]}, {"w": "whether", "b": [0.1774, 0.1243, 0.242, 0.1392]}, {"w": "those", "b": [0.2482, 0.1243, 0.2903, 0.1392]}, {"w": "parameters", "b": [0.2965, 0.1243, 0.3859, 0.1392]}, {"w": "and", "b": [0.392, 0.1243, 0.4218, 0.1392]}, {"w": "their", "b": [0.4279, 0.1243, 0.4659, 0.1392]}, {"w": "values", "b": [0.4721, 0.1243, 0.5209, 0.1392]}, {"w": "are", "b": [0.527, 0.1243, 0.5517, 0.1392]}, {"w": "currently", "b": [0.5579, 0.1243, 0.6308, 0.1392]}, {"w": "available", "b": [0.6369, 0.1243, 0.7067, 0.1392]}, {"w": "to", "b": [0.7128, 0.1243, 0.7292, 0.1392]}, {"w": "the", "b": [0.7354, 0.1243, 0.761, 0.1392]}, {"w": "user.", "b": [0.7672, 0.1243, 0.8053, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "9.1.2 Ease of Deployment", "words": [{"w": "9.1.2", "b": [0.1312, 0.1721, 0.1749, 0.1871]}, {"w": "Ease", "b": [0.1961, 0.1721, 0.2384, 0.1871]}, {"w": "of", "b": [0.2455, 0.1721, 0.2626, 0.1871]}, {"w": "Deployment", "b": [0.2697, 0.1721, 0.3814, 0.1871]}]}, {"id": "b_2", "type": "paragraph", "text": "The runtime must allow the model to be updated with minimal effort and, ideally, without affecting the entire application. If the model was deployed as a web service on a physical server, then a model update must be as simple as replacing one model file with another, and restarting the web service.", "words": [{"w": "The", "b": [0.1306, 0.2087, 0.1625, 0.2237]}, {"w": "runtime", "b": [0.1687, 0.2087, 0.2321, 0.2237]}, {"w": "must", "b": [0.2382, 0.2087, 0.278, 0.2237]}, {"w": "allow", "b": [0.2841, 0.2087, 0.3259, 0.2237]}, {"w": "the", "b": [0.332, 0.2087, 0.3578, 0.2237]}, {"w": "model", "b": [0.3639, 0.2087, 0.4128, 0.2237]}, {"w": "to", "b": [0.419, 0.2087, 0.4355, 0.2237]}, {"w": "be", "b": [0.4416, 0.2087, 0.4607, 0.2237]}, {"w": "updated", "b": [0.4668, 0.2087, 0.5333, 0.2237]}, {"w": "with", "b": [0.5394, 0.2087, 0.5755, 0.2237]}, {"w": "minimal", "b": [0.5816, 0.2087, 0.6476, 0.2237]}, {"w": "effort", "b": [0.6537, 0.2087, 0.6965, 0.2237]}, {"w": "and,", "b": [0.7026, 0.2087, 0.7377, 0.2237]}, {"w": "ideally,", "b": [0.7438, 0.2087, 0.8005, 0.2237]}, {"w": "without", "b": [0.8067, 0.2087, 0.8695, 0.2237]}, {"w": "affecting", "b": [0.1312, 0.2265, 0.2008, 0.2416]}, {"w": "the", "b": [0.2073, 0.2265, 0.2335, 0.2416]}, {"w": "entire", "b": [0.24, 0.2265, 0.2866, 0.2416]}, {"w": "application.", "b": [0.2932, 0.2265, 0.3894, 0.2416]}, {"w": "If", "b": [0.3987, 0.2265, 0.4113, 0.2416]}, {"w": "the", "b": [0.4178, 0.2265, 0.444, 0.2416]}, {"w": "model", "b": [0.4505, 0.2265, 0.5002, 0.2416]}, {"w": "was", "b": [0.5067, 0.2265, 0.5366, 0.2416]}, {"w": "deployed", "b": [0.5431, 0.2265, 0.6148, 0.2416]}, {"w": "as", "b": [0.6214, 0.2265, 0.6382, 0.2416]}, {"w": "a", "b": [0.6447, 0.2265, 0.6542, 0.2416]}, {"w": "web", "b": [0.6607, 0.2265, 0.6926, 0.2416]}, {"w": "service", "b": [0.6991, 0.2265, 0.7542, 0.2416]}, {"w": "on", "b": [0.7607, 0.2265, 0.7806, 0.2416]}, {"w": "a", "b": [0.7871, 0.2265, 0.7966, 0.2416]}, {"w": "physical", "b": [0.8031, 0.2265, 0.8691, 0.2416]}, {"w": "server,", "b": [0.1312, 0.2447, 0.1829, 0.2595]}, {"w": "then", "b": [0.189, 0.2447, 0.2243, 0.2595]}, {"w": "a", "b": [0.2305, 0.2447, 0.2395, 0.2595]}, {"w": "model", "b": [0.2457, 0.2447, 0.2936, 0.2595]}, {"w": "update", "b": [0.2997, 0.2447, 0.3547, 0.2595]}, {"w": "must", "b": [0.3608, 0.2447, 0.3997, 0.2595]}, {"w": "be", "b": [0.4059, 0.2447, 0.4246, 0.2595]}, {"w": "as", "b": [0.4307, 0.2447, 0.4469, 0.2595]}, {"w": "simple", "b": [0.4531, 0.2447, 0.5036, 0.2595]}, {"w": "as", "b": [0.5098, 0.2447, 0.526, 0.2595]}, {"w": "replacing", "b": [0.5322, 0.2447, 0.6038, 0.2595]}, {"w": "one", "b": [0.6099, 0.2447, 0.6372, 0.2595]}, {"w": "model", "b": [0.6433, 0.2447, 0.6912, 0.2595]}, {"w": "file", "b": [0.6974, 0.2447, 0.7206, 0.2595]}, {"w": "with", "b": [0.7267, 0.2447, 0.762, 0.2595]}, {"w": "another,", "b": [0.7681, 0.2447, 0.8337, 0.2595]}, {"w": "and", "b": [0.8399, 0.2447, 0.8691, 0.2595]}, {"w": "restarting", "b": [0.1312, 0.2626, 0.2094, 0.2775]}, {"w": "the", "b": [0.2155, 0.2626, 0.2412, 0.2775]}, {"w": "web", "b": [0.2473, 0.2626, 0.2786, 0.2775]}, {"w": "service.", "b": [0.2847, 0.2626, 0.3439, 0.2775]}]}, {"id": "b_3", "type": "paragraph", "text": "If the model was deployed as a virtual machine instance or container, then the instances or containers running the old version of the model should be replaceable by gradually stopping the running instances and starting new instances from a new image. The same principle applies to the orchestrated containers.", "words": [{"w": "If", "b": [0.1312, 0.2895, 0.1436, 0.3044]}, {"w": "the", "b": [0.1497, 0.2895, 0.1754, 0.3044]}, {"w": "model", "b": [0.1816, 0.2895, 0.2304, 0.3044]}, {"w": "was", "b": [0.2365, 0.2895, 0.2659, 0.3044]}, {"w": "deployed", "b": [0.272, 0.2895, 0.3424, 0.3044]}, {"w": "as", "b": [0.3486, 0.2895, 0.3651, 0.3044]}, {"w": "a", "b": [0.3713, 0.2895, 0.3805, 0.3044]}, {"w": "virtual", "b": [0.3867, 0.2895, 0.4407, 0.3044]}, {"w": "machine", "b": [0.4468, 0.2895, 0.5131, 0.3044]}, {"w": "instance", "b": [0.5192, 0.2895, 0.5851, 0.3044]}, {"w": "or", "b": [0.5912, 0.2895, 0.6077, 0.3044]}, {"w": "container,", "b": [0.6139, 0.2895, 0.6936, 0.3044]}, {"w": "then", "b": [0.6997, 0.2895, 0.7357, 0.3044]}, {"w": "the", "b": [0.7418, 0.2895, 0.7675, 0.3044]}, {"w": "instances", "b": [0.7737, 0.2895, 0.8469, 0.3044]}, {"w": "or", "b": [0.853, 0.2895, 0.8695, 0.3044]}, {"w": "containers", "b": [0.1312, 0.3075, 0.2121, 0.3224]}, {"w": "running", "b": [0.2182, 0.3075, 0.2802, 0.3224]}, {"w": "the", "b": [0.2864, 0.3075, 0.3118, 0.3224]}, {"w": "old", "b": [0.3179, 0.3075, 0.3423, 0.3224]}, {"w": "version", "b": [0.3484, 0.3075, 0.4044, 0.3224]}, {"w": "of", "b": [0.4105, 0.3075, 0.4253, 0.3224]}, {"w": "the", "b": [0.4314, 0.3075, 0.4568, 0.3224]}, {"w": "model", "b": [0.4629, 0.3075, 0.5112, 0.3224]}, {"w": "should", "b": [0.5173, 0.3075, 0.5692, 0.3224]}, {"w": "be", "b": [0.5753, 0.3075, 0.5941, 0.3224]}, {"w": "replaceable", "b": [0.6003, 0.3075, 0.6887, 0.3224]}, {"w": "by", "b": [0.6948, 0.3075, 0.7141, 0.3224]}, {"w": "gradually", "b": [0.7202, 0.3075, 0.7949, 0.3224]}, {"w": "stopping", "b": [0.801, 0.3075, 0.8692, 0.3224]}, {"w": "the", "b": [0.1312, 0.3253, 0.1574, 0.3404]}, {"w": "running", "b": [0.1644, 0.3253, 0.2282, 0.3404]}, {"w": "instances", "b": [0.2352, 0.3253, 0.3097, 0.3404]}, {"w": "and", "b": [0.3166, 0.3253, 0.347, 0.3404]}, {"w": "starting", "b": [0.3539, 0.3253, 0.4179, 0.3404]}, {"w": "new", "b": [0.4249, 0.3253, 0.4573, 0.3404]}, {"w": "instances", "b": [0.4643, 0.3253, 0.5388, 0.3404]}, {"w": "from", "b": [0.5457, 0.3253, 0.5839, 0.3404]}, {"w": "a", "b": [0.5909, 0.3253, 0.6003, 0.3404]}, {"w": "new", "b": [0.6073, 0.3253, 0.6397, 0.3404]}, {"w": "image.", "b": [0.6467, 0.3253, 0.7, 0.3404]}, {"w": "The", "b": [0.7107, 0.3253, 0.7431, 0.3404]}, {"w": "same", "b": [0.7501, 0.3253, 0.7909, 0.3404]}, {"w": "principle", "b": [0.7979, 0.3253, 0.8691, 0.3404]}, {"w": "applies", "b": [0.1312, 0.3433, 0.1867, 0.3583]}, {"w": "to", "b": [0.1929, 0.3433, 0.2093, 0.3583]}, {"w": "the", "b": [0.2154, 0.3433, 0.2411, 0.3583]}, {"w": "orchestrated", "b": [0.2472, 0.3433, 0.3464, 0.3583]}, {"w": "containers.", "b": [0.3526, 0.3433, 0.4394, 0.3583]}]}, {"id": "b_4", "type": "paragraph", "text": "Typically, a model streaming-based application is updated by streaming the new version of the model. To enable this, the streaming application must be stateful. Once a new version and the related components (such as feature extractor and scoring code) are streamed into the application, the state of the application changes, and now contains the new version of these assets. Modern stream-processing engines support stateful applications. The described architecture is schematically shown in Figure 2.", "words": [{"w": "Typically,", "b": [0.1306, 0.3702, 0.2098, 0.3852]}, {"w": "a", "b": [0.2159, 0.3702, 0.2252, 0.3852]}, {"w": "model", "b": [0.2313, 0.3702, 0.2802, 0.3852]}, {"w": "streaming-based", "b": [0.2864, 0.3702, 0.4172, 0.3852]}, {"w": "application", "b": [0.4234, 0.3702, 0.5129, 0.3852]}, {"w": "is", "b": [0.519, 0.3702, 0.5315, 0.3852]}, {"w": "updated", "b": [0.5377, 0.3702, 0.604, 0.3852]}, {"w": "by", "b": [0.6102, 0.3702, 0.6297, 0.3852]}, {"w": "streaming", "b": [0.6359, 0.3702, 0.7152, 0.3852]}, {"w": "the", "b": [0.7214, 0.3702, 0.7471, 0.3852]}, {"w": "new", "b": [0.7532, 0.3702, 0.7851, 0.3852]}, {"w": "version", "b": [0.7913, 0.3702, 0.848, 0.3852]}, {"w": "of", "b": [0.8542, 0.3702, 0.8691, 0.3852]}, {"w": "the", "b": [0.1312, 0.3881, 0.1571, 0.4031]}, {"w": "model.", "b": [0.1632, 0.3881, 0.2174, 0.4031]}, {"w": "To", "b": [0.2256, 0.3881, 0.2468, 0.4031]}, {"w": "enable", "b": [0.2529, 0.3881, 0.3046, 0.4031]}, {"w": "this,", "b": [0.3107, 0.3881, 0.346, 0.4031]}, {"w": "the", "b": [0.3521, 0.3881, 0.3779, 0.4031]}, {"w": "streaming", "b": [0.3841, 0.3881, 0.4637, 0.4031]}, {"w": "application", "b": [0.4699, 0.3881, 0.5597, 0.4031]}, {"w": "must", "b": [0.5659, 0.3881, 0.6058, 0.4031]}, {"w": "be", "b": [0.6119, 0.3881, 0.631, 0.4031]}, {"w": "stateful.", "b": [0.6372, 0.3881, 0.7029, 0.4031]}, {"w": "Once", "b": [0.7111, 0.3881, 0.7524, 0.4031]}, {"w": "a", "b": [0.7586, 0.3881, 0.7678, 0.4031]}, {"w": "new", "b": [0.774, 0.3881, 0.806, 0.4031]}, {"w": "version", "b": [0.8122, 0.3881, 0.8691, 0.4031]}, {"w": "and", "b": [0.1312, 0.4062, 0.1604, 0.4211]}, {"w": "the", "b": [0.1655, 0.4062, 0.1907, 0.4211]}, {"w": "related", "b": [0.1958, 0.4062, 0.2501, 0.4211]}, {"w": "components", "b": [0.2553, 0.4062, 0.3489, 0.4211]}, {"w": "(such", "b": [0.354, 0.4062, 0.3958, 0.4211]}, {"w": "as", "b": [0.401, 0.4062, 0.4172, 0.4211]}, {"w": "feature", "b": [0.4223, 0.4062, 0.4772, 0.4211]}, {"w": "extractor", "b": [0.4823, 0.4062, 0.5543, 0.4211]}, {"w": "and", "b": [0.5594, 0.4062, 0.5886, 0.4211]}, {"w": "scoring", "b": [0.5938, 0.4062, 0.6492, 0.4211]}, {"w": "code)", "b": [0.6544, 0.4062, 0.6971, 0.4211]}, {"w": "are", "b": [0.7022, 0.4062, 0.7264, 0.4211]}, {"w": "streamed", "b": [0.7316, 0.4062, 0.8031, 0.4211]}, {"w": "into", "b": [0.8082, 0.4062, 0.8389, 0.4211]}, {"w": "the", "b": [0.844, 0.4062, 0.8692, 0.4211]}, {"w": "application,", "b": [0.1312, 0.4241, 0.2252, 0.439]}, {"w": "the", "b": [0.2314, 0.4241, 0.2569, 0.439]}, {"w": "state", "b": [0.2631, 0.4241, 0.302, 0.439]}, {"w": "of", "b": [0.3081, 0.4241, 0.3229, 0.439]}, {"w": "the", "b": [0.3291, 0.4241, 0.3546, 0.439]}, {"w": "application", "b": [0.3608, 0.4241, 0.4496, 0.439]}, {"w": "changes,", "b": [0.4558, 0.4241, 0.5228, 0.439]}, {"w": "and", "b": [0.529, 0.4241, 0.5586, 0.439]}, {"w": "now", "b": [0.5647, 0.4241, 0.5969, 0.439]}, {"w": "contains", "b": [0.6031, 0.4241, 0.669, 0.439]}, {"w": "the", "b": [0.6752, 0.4241, 0.7007, 0.439]}, {"w": "new", "b": [0.7069, 0.4241, 0.7386, 0.439]}, {"w": "version", "b": [0.7447, 0.4241, 0.8011, 0.439]}, {"w": "of", "b": [0.8072, 0.4241, 0.822, 0.439]}, {"w": "these", "b": [0.8282, 0.4241, 0.8691, 0.439]}, {"w": "assets.", "b": [0.1312, 0.442, 0.1833, 0.457]}, {"w": "Modern", "b": [0.1915, 0.442, 0.2547, 0.457]}, {"w": "stream-processing", "b": [0.2609, 0.442, 0.427, 0.4569]}, {"w": "engines", "b": [0.4341, 0.442, 0.5019, 0.4569]}, {"w": "support", "b": [0.5081, 0.442, 0.5708, 0.457]}, {"w": "stateful", "b": [0.577, 0.442, 0.6376, 0.457]}, {"w": "applications.", "b": [0.6438, 0.442, 0.7463, 0.457]}, {"w": "The", "b": [0.7545, 0.442, 0.7866, 0.457]}, {"w": "described", "b": [0.7927, 0.442, 0.869, 0.457]}, {"w": "architecture", "b": [0.1312, 0.46, 0.2272, 0.4749]}, {"w": "is", "b": [0.2334, 0.46, 0.2458, 0.4749]}, {"w": "schematically", "b": [0.2519, 0.46, 0.3597, 0.4749]}, {"w": "shown", "b": [0.3659, 0.46, 0.4157, 0.4749]}, {"w": "in", "b": [0.4219, 0.46, 0.4373, 0.4749]}, {"w": "Figure", "b": [0.4434, 0.46, 0.4955, 0.4749]}, {"w": "2.", "b": [0.5017, 0.46, 0.516, 0.4749]}]}, {"id": "b_5", "type": "equation", "text": "Figure 2: Model streaming high-level architecture.", "words": [{"w": "Figure", "b": [0.2968, 0.7677, 0.3489, 0.7827]}, {"w": "2:", "b": [0.355, 0.7677, 0.3694, 0.7827]}, {"w": "Model", "b": [0.3776, 0.7677, 0.4278, 0.7827]}, {"w": "streaming", "b": [0.434, 0.7677, 0.5131, 0.7827]}, {"w": "high-level", "b": [0.5192, 0.7677, 0.5962, 0.7827]}, {"w": "architecture.", "b": [0.6023, 0.7677, 0.7034, 0.7827]}]}, {"id": "b_6", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "4", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 268, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "9.1.3 Guarantees of Model Validity", "words": [{"w": "9.1.3", "b": [0.1312, 0.0884, 0.1749, 0.1033]}, {"w": "Guarantees", "b": [0.1961, 0.0884, 0.3012, 0.1033]}, {"w": "of", "b": [0.3083, 0.0884, 0.3253, 0.1033]}, {"w": "Model", "b": [0.3324, 0.0884, 0.3912, 0.1033]}, {"w": "Validity", "b": [0.3982, 0.0884, 0.4712, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "An effective runtime will automatically make sure that the model it executes is valid. Furthermore, it makes sure the model, the feature extractor, and other components are in sync. It must be validated on each startup of the web service or the streaming application, and periodically during the runtime. As discussed in Section ?? of Chapter 8, each model should be deployed accompanied by the following four assets: an end-to-end set, a confidence test set, a performance metric, and its range of acceptable values.", "words": [{"w": "An", "b": [0.1305, 0.1249, 0.1551, 0.14]}, {"w": "effective", "b": [0.1643, 0.1249, 0.2308, 0.14]}, {"w": "runtime", "b": [0.24, 0.1249, 0.3044, 0.14]}, {"w": "will", "b": [0.3136, 0.1249, 0.3429, 0.14]}, {"w": "automatically", "b": [0.3521, 0.1249, 0.4645, 0.14]}, {"w": "make", "b": [0.4737, 0.1249, 0.5166, 0.14]}, {"w": "sure", "b": [0.5258, 0.1249, 0.5595, 0.14]}, {"w": "that", "b": [0.5687, 0.1249, 0.6032, 0.14]}, {"w": "the", "b": [0.6124, 0.1249, 0.6386, 0.14]}, {"w": "model", "b": [0.6478, 0.1249, 0.6975, 0.14]}, {"w": "it", "b": [0.7067, 0.1249, 0.7192, 0.14]}, {"w": "executes", "b": [0.7284, 0.1249, 0.7971, 0.14]}, {"w": "is", "b": [0.8063, 0.1249, 0.819, 0.14]}, {"w": "valid.", "b": [0.8282, 0.1249, 0.8726, 0.14]}, {"w": "Furthermore,", "b": [0.1312, 0.1428, 0.239, 0.1579]}, {"w": "it", "b": [0.2451, 0.1428, 0.2576, 0.1579]}, {"w": "makes", "b": [0.2638, 0.1428, 0.3139, 0.1579]}, {"w": "sure", "b": [0.32, 0.1428, 0.3536, 0.1579]}, {"w": "the", "b": [0.3597, 0.1428, 0.3857, 0.1579]}, {"w": "model,", "b": [0.3919, 0.1428, 0.4466, 0.1579]}, {"w": "the", "b": [0.4527, 0.1428, 0.4788, 0.1579]}, {"w": "feature", "b": [0.4849, 0.1428, 0.5418, 0.1579]}, {"w": "extractor,", "b": [0.5479, 0.1428, 0.6277, 0.1579]}, {"w": "and", "b": [0.6339, 0.1428, 0.6641, 0.1579]}, {"w": "other", "b": [0.6702, 0.1428, 0.713, 0.1579]}, {"w": "components", "b": [0.7192, 0.1428, 0.8161, 0.1579]}, {"w": "are", "b": [0.8223, 0.1428, 0.8473, 0.1579]}, {"w": "in", "b": [0.8535, 0.1428, 0.8691, 0.1579]}, {"w": "sync.", "b": [0.1312, 0.161, 0.171, 0.1758]}, {"w": "It", "b": [0.1788, 0.161, 0.1924, 0.1758]}, {"w": "must", "b": [0.1972, 0.161, 0.236, 0.1758]}, {"w": "be", "b": [0.2408, 0.161, 0.2594, 0.1758]}, {"w": "validated", "b": [0.2642, 0.161, 0.3361, 0.1758]}, {"w": "on", "b": [0.3409, 0.161, 0.36, 0.1758]}, {"w": "each", "b": [0.3648, 0.161, 0.3995, 0.1758]}, {"w": "startup", "b": [0.4043, 0.161, 0.4618, 0.1758]}, {"w": "of", "b": [0.4666, 0.161, 0.4812, 0.1758]}, {"w": "the", "b": [0.486, 0.161, 0.5111, 0.1758]}, {"w": "web", "b": [0.5159, 0.161, 0.5466, 0.1758]}, {"w": "service", "b": [0.5514, 0.161, 0.6043, 0.1758]}, {"w": "or", "b": [0.6092, 0.161, 0.6253, 0.1758]}, {"w": "the", "b": [0.6301, 0.161, 0.6553, 0.1758]}, {"w": "streaming", "b": [0.6601, 0.161, 0.7376, 0.1758]}, {"w": "application,", "b": [0.7424, 0.161, 0.8349, 0.1758]}, {"w": "and", "b": [0.84, 0.161, 0.8691, 0.1758]}, {"w": "periodically", "b": [0.1312, 0.1789, 0.2235, 0.1937]}, {"w": "during", "b": [0.2297, 0.1789, 0.2812, 0.1937]}, {"w": "the", "b": [0.2873, 0.1789, 0.3125, 0.1937]}, {"w": "runtime.", "b": [0.3186, 0.1789, 0.3857, 0.1937]}, {"w": "As", "b": [0.3939, 0.1789, 0.4147, 0.1937]}, {"w": "discussed", "b": [0.4208, 0.1789, 0.4937, 0.1937]}, {"w": "in", "b": [0.4999, 0.1789, 0.515, 0.1937]}, {"w": "Section", "b": [0.5212, 0.1789, 0.5786, 0.1937]}, {"w": "??", "b": [0.5845, 0.1788, 0.6045, 0.1937]}, {"w": "of", "b": [0.6107, 0.1789, 0.6253, 0.1937]}, {"w": "Chapter", "b": [0.6315, 0.1789, 0.696, 0.1937]}, {"w": "8,", "b": [0.7022, 0.1789, 0.7163, 0.1937]}, {"w": "each", "b": [0.7224, 0.1789, 0.7572, 0.1937]}, {"w": "model", "b": [0.7633, 0.1789, 0.8112, 0.1937]}, {"w": "should", "b": [0.8174, 0.1789, 0.8689, 0.1937]}, {"w": "be", "b": [0.1312, 0.1966, 0.1506, 0.2117]}, {"w": "deployed", "b": [0.1569, 0.1966, 0.2286, 0.2117]}, {"w": "accompanied", "b": [0.235, 0.1966, 0.3406, 0.2117]}, {"w": "by", "b": [0.3469, 0.1966, 0.3668, 0.2117]}, {"w": "the", "b": [0.3732, 0.1966, 0.3993, 0.2117]}, {"w": "following", "b": [0.4057, 0.1966, 0.4789, 0.2117]}, {"w": "four", "b": [0.4852, 0.1966, 0.5182, 0.2117]}, {"w": "assets:", "b": [0.5246, 0.1966, 0.5772, 0.2117]}, {"w": "an", "b": [0.5858, 0.1966, 0.6057, 0.2117]}, {"w": "end-to-end", "b": [0.6119, 0.1967, 0.7115, 0.2117]}, {"w": "set,", "b": [0.7188, 0.1966, 0.7504, 0.2117]}, {"w": "a", "b": [0.7568, 0.1966, 0.7662, 0.2117]}, {"w": "confidence", "b": [0.7727, 0.1967, 0.8688, 0.2117]}, {"w": "test", "b": [0.1312, 0.2147, 0.1658, 0.2296]}, {"w": "set,", "b": [0.1729, 0.2147, 0.2044, 0.2297]}, {"w": "a", "b": [0.2105, 0.2147, 0.2197, 0.2297]}, {"w": "performance", "b": [0.2261, 0.2147, 0.3417, 0.2296]}, {"w": "metric,", "b": [0.3488, 0.2147, 0.4136, 0.2297]}, {"w": "and", "b": [0.4198, 0.2147, 0.4495, 0.2297]}, {"w": "its", "b": [0.4557, 0.2147, 0.4752, 0.2297]}, {"w": "range", "b": [0.4814, 0.2147, 0.5325, 0.2296]}, {"w": "of", "b": [0.5396, 0.2147, 0.5567, 0.2296]}, {"w": "acceptable", "b": [0.5638, 0.2147, 0.6604, 0.2296]}, {"w": "values.", "b": [0.6675, 0.2147, 0.7287, 0.2297]}]}, {"id": "b_2", "type": "paragraph", "text": "The model should not be served in production (and must be immediately stopped if it is running) in either of the two conditions:", "words": [{"w": "The", "b": [0.1306, 0.2415, 0.163, 0.2566]}, {"w": "model", "b": [0.1697, 0.2415, 0.2194, 0.2566]}, {"w": "should", "b": [0.2261, 0.2415, 0.2796, 0.2566]}, {"w": "not", "b": [0.2863, 0.2415, 0.3135, 0.2566]}, {"w": "be", "b": [0.3202, 0.2415, 0.3396, 0.2566]}, {"w": "served", "b": [0.3463, 0.2415, 0.3977, 0.2566]}, {"w": "in", "b": [0.4045, 0.2415, 0.4202, 0.2566]}, {"w": "production", "b": [0.4269, 0.2415, 0.5164, 0.2566]}, {"w": "(and", "b": [0.5231, 0.2415, 0.5607, 0.2566]}, {"w": "must", "b": [0.5675, 0.2415, 0.6079, 0.2566]}, {"w": "be", "b": [0.6146, 0.2415, 0.6339, 0.2566]}, {"w": "immediately", "b": [0.6407, 0.2415, 0.7416, 0.2566]}, {"w": "stopped", "b": [0.7483, 0.2415, 0.8127, 0.2566]}, {"w": "if", "b": [0.8194, 0.2415, 0.8304, 0.2566]}, {"w": "it", "b": [0.8372, 0.2415, 0.8497, 0.2566]}, {"w": "is", "b": [0.8564, 0.2415, 0.8691, 0.2566]}, {"w": "running)", "b": [0.1312, 0.2596, 0.201, 0.2745]}, {"w": "in", "b": [0.2072, 0.2596, 0.2226, 0.2745]}, {"w": "either", "b": [0.2287, 0.2596, 0.2749, 0.2745]}, {"w": "of", "b": [0.2811, 0.2596, 0.2959, 0.2745]}, {"w": "the", "b": [0.3021, 0.2596, 0.3277, 0.2745]}, {"w": "two", "b": [0.3339, 0.2596, 0.3626, 0.2745]}, {"w": "conditions:", "b": [0.3687, 0.2596, 0.456, 0.2745]}]}, {"id": "b_3", "type": "paragraph", "text": "• at least one of the end-to-end test examples was not scored correctly, or • the value of the metric, calculated on the confidence test set examples, is not within the acceptable range.", "words": [{"w": "•", "b": [0.1538, 0.2865, 0.1681, 0.3014]}, {"w": "at", "b": [0.1774, 0.2865, 0.1938, 0.3014]}, {"w": "least", "b": [0.1999, 0.2865, 0.2369, 0.3014]}, {"w": "one", "b": [0.2431, 0.2865, 0.2708, 0.3014]}, {"w": "of", "b": [0.2769, 0.2865, 0.2918, 0.3014]}, {"w": "the", "b": [0.2979, 0.2865, 0.3236, 0.3014]}, {"w": "end-to-end", "b": [0.3297, 0.2865, 0.4159, 0.3014]}, {"w": "test", "b": [0.422, 0.2865, 0.4519, 0.3014]}, {"w": "examples", "b": [0.458, 0.2865, 0.5314, 0.3014]}, {"w": "was", "b": [0.5376, 0.2865, 0.5669, 0.3014]}, {"w": "not", "b": [0.5731, 0.2865, 0.5997, 0.3014]}, {"w": "scored", "b": [0.6059, 0.2865, 0.6563, 0.3014]}, {"w": "correctly,", "b": [0.6624, 0.2865, 0.7364, 0.3014]}, {"w": "or", "b": [0.7425, 0.2865, 0.759, 0.3014]}, {"w": "•", "b": [0.1538, 0.3044, 0.1681, 0.3194]}, {"w": "the", "b": [0.1774, 0.3043, 0.2035, 0.3194]}, {"w": "value", "b": [0.2096, 0.3043, 0.2519, 0.3194]}, {"w": "of", "b": [0.2581, 0.3043, 0.2732, 0.3194]}, {"w": "the", "b": [0.2794, 0.3043, 0.3055, 0.3194]}, {"w": "metric,", "b": [0.3116, 0.3043, 0.3691, 0.3194]}, {"w": "calculated", "b": [0.3753, 0.3043, 0.4578, 0.3194]}, {"w": "on", "b": [0.4639, 0.3043, 0.4838, 0.3194]}, {"w": "the", "b": [0.4899, 0.3043, 0.516, 0.3194]}, {"w": "confidence", "b": [0.5222, 0.3043, 0.6068, 0.3194]}, {"w": "test", "b": [0.6129, 0.3043, 0.6433, 0.3194]}, {"w": "set", "b": [0.6495, 0.3043, 0.6726, 0.3194]}, {"w": "examples,", "b": [0.6787, 0.3043, 0.7587, 0.3194]}, {"w": "is", "b": [0.7649, 0.3043, 0.7775, 0.3194]}, {"w": "not", "b": [0.7836, 0.3043, 0.8108, 0.3194]}, {"w": "within", "b": [0.817, 0.3043, 0.8691, 0.3194]}, {"w": "the", "b": [0.1774, 0.3224, 0.203, 0.3373]}, {"w": "acceptable", "b": [0.2091, 0.3224, 0.2933, 0.3373]}, {"w": "range.", "b": [0.2994, 0.3224, 0.3487, 0.3373]}]}, {"id": "b_4", "type": "paragraph", "text": "9.1.4 Ease of Recovery", "words": [{"w": "9.1.4", "b": [0.1312, 0.3702, 0.1749, 0.3852]}, {"w": "Ease", "b": [0.1961, 0.3702, 0.2384, 0.3852]}, {"w": "of", "b": [0.2455, 0.3702, 0.2626, 0.3852]}, {"w": "Recovery", "b": [0.2697, 0.3702, 0.355, 0.3852]}]}, {"id": "b_5", "type": "paragraph", "text": "An effective runtime allows easy recovery from errors by rolling back to previous versions.", "words": [{"w": "An", "b": [0.1305, 0.4068, 0.1546, 0.4218]}, {"w": "effective", "b": [0.1608, 0.4068, 0.2259, 0.4218]}, {"w": "runtime", "b": [0.2321, 0.4068, 0.2952, 0.4218]}, {"w": "allows", "b": [0.3013, 0.4068, 0.3501, 0.4218]}, {"w": "easy", "b": [0.3563, 0.4068, 0.3907, 0.4218]}, {"w": "recovery", "b": [0.3969, 0.4068, 0.4637, 0.4218]}, {"w": "from", "b": [0.4698, 0.4068, 0.5073, 0.4218]}, {"w": "errors", "b": [0.5134, 0.4068, 0.5598, 0.4218]}, {"w": "by", "b": [0.566, 0.4068, 0.5855, 0.4218]}, {"w": "rolling", "b": [0.5916, 0.4068, 0.6429, 0.4218]}, {"w": "back", "b": [0.6491, 0.4068, 0.686, 0.4218]}, {"w": "to", "b": [0.6922, 0.4068, 0.7086, 0.4218]}, {"w": "previous", "b": [0.7147, 0.4068, 0.7821, 0.4218]}, {"w": "versions.", "b": [0.7882, 0.4068, 0.8572, 0.4218]}]}, {"id": "b_6", "type": "paragraph", "text": "The recovery from an unsuccessful deployment should be produced in the same way, and with the same ease, as the deployment of an updated model. The only difference is that, instead of the new model, the previous working version will be deployed.", "words": [{"w": "The", "b": [0.1306, 0.4336, 0.163, 0.4487]}, {"w": "recovery", "b": [0.1697, 0.4336, 0.2379, 0.4487]}, {"w": "from", "b": [0.2446, 0.4336, 0.2828, 0.4487]}, {"w": "an", "b": [0.2895, 0.4336, 0.3094, 0.4487]}, {"w": "unsuccessful", "b": [0.3161, 0.4336, 0.4164, 0.4487]}, {"w": "deployment", "b": [0.4231, 0.4336, 0.5178, 0.4487]}, {"w": "should", "b": [0.5245, 0.4336, 0.578, 0.4487]}, {"w": "be", "b": [0.5847, 0.4336, 0.6041, 0.4487]}, {"w": "produced", "b": [0.6108, 0.4336, 0.6867, 0.4487]}, {"w": "in", "b": [0.6934, 0.4336, 0.7091, 0.4487]}, {"w": "the", "b": [0.7158, 0.4336, 0.742, 0.4487]}, {"w": "same", "b": [0.7487, 0.4336, 0.7896, 0.4487]}, {"w": "way,", "b": [0.7963, 0.4336, 0.8319, 0.4487]}, {"w": "and", "b": [0.8388, 0.4336, 0.8691, 0.4487]}, {"w": "with", "b": [0.1306, 0.4516, 0.1672, 0.4667]}, {"w": "the", "b": [0.174, 0.4516, 0.2001, 0.4667]}, {"w": "same", "b": [0.207, 0.4516, 0.2478, 0.4667]}, {"w": "ease,", "b": [0.2547, 0.4516, 0.2935, 0.4667]}, {"w": "as", "b": [0.3004, 0.4516, 0.3173, 0.4667]}, {"w": "the", "b": [0.3241, 0.4516, 0.3503, 0.4667]}, {"w": "deployment", "b": [0.3571, 0.4516, 0.4517, 0.4667]}, {"w": "of", "b": [0.4586, 0.4516, 0.4737, 0.4667]}, {"w": "an", "b": [0.4805, 0.4516, 0.5004, 0.4667]}, {"w": "updated", "b": [0.5072, 0.4516, 0.5747, 0.4667]}, {"w": "model.", "b": [0.5815, 0.4516, 0.6364, 0.4667]}, {"w": "The", "b": [0.6466, 0.4516, 0.679, 0.4667]}, {"w": "only", "b": [0.6858, 0.4516, 0.7208, 0.4667]}, {"w": "difference", "b": [0.7276, 0.4516, 0.8056, 0.4667]}, {"w": "is", "b": [0.8124, 0.4516, 0.8251, 0.4667]}, {"w": "that,", "b": [0.8319, 0.4516, 0.8717, 0.4667]}, {"w": "instead", "b": [0.1312, 0.4696, 0.1888, 0.4846]}, {"w": "of", "b": [0.1949, 0.4696, 0.2098, 0.4846]}, {"w": "the", "b": [0.2159, 0.4696, 0.2416, 0.4846]}, {"w": "new", "b": [0.2477, 0.4696, 0.2795, 0.4846]}, {"w": "model,", "b": [0.2857, 0.4696, 0.3395, 0.4846]}, {"w": "the", "b": [0.3457, 0.4696, 0.3713, 0.4846]}, {"w": "previous", "b": [0.3774, 0.4696, 0.4448, 0.4846]}, {"w": "working", "b": [0.4509, 0.4696, 0.5145, 0.4846]}, {"w": "version", "b": [0.5207, 0.4696, 0.5773, 0.4846]}, {"w": "will", "b": [0.5834, 0.4696, 0.6121, 0.4846]}, {"w": "be", "b": [0.6183, 0.4696, 0.6372, 0.4846]}, {"w": "deployed.", "b": [0.6434, 0.4696, 0.7188, 0.4846]}]}, {"id": "b_7", "type": "equation", "text": "9.1.5 Avoidance of Training/Serving Skew", "words": [{"w": "9.1.5", "b": [0.1312, 0.5174, 0.1749, 0.5324]}, {"w": "Avoidance", "b": [0.1961, 0.5174, 0.2899, 0.5324]}, {"w": "of", "b": [0.297, 0.5174, 0.3141, 0.5324]}, {"w": "Training/Serving", "b": [0.3211, 0.5174, 0.4796, 0.5324]}, {"w": "Skew", "b": [0.4866, 0.5174, 0.5341, 0.5324]}]}, {"id": "b_8", "type": "paragraph", "text": "It is strongly recommended to avoid using two different codebases, one for training the model, and one for scoring in production. When it concerns feature extraction, even a tiny difference between two versions of feature extractor code may lead to suboptimal or incorrect model performance.", "words": [{"w": "It", "b": [0.1312, 0.5539, 0.1453, 0.569]}, {"w": "is", "b": [0.1533, 0.5539, 0.166, 0.569]}, {"w": "strongly", "b": [0.1739, 0.5539, 0.2405, 0.569]}, {"w": "recommended", "b": [0.2484, 0.5539, 0.3614, 0.569]}, {"w": "to", "b": [0.3694, 0.5539, 0.3861, 0.569]}, {"w": "avoid", "b": [0.394, 0.5539, 0.4375, 0.569]}, {"w": "using", "b": [0.4454, 0.5539, 0.4884, 0.569]}, {"w": "two", "b": [0.4963, 0.5539, 0.5256, 0.569]}, {"w": "different", "b": [0.5336, 0.5539, 0.6016, 0.569]}, {"w": "codebases,", "b": [0.6096, 0.5539, 0.695, 0.569]}, {"w": "one", "b": [0.7034, 0.5539, 0.7317, 0.569]}, {"w": "for", "b": [0.7396, 0.5539, 0.7622, 0.569]}, {"w": "training", "b": [0.7701, 0.5539, 0.835, 0.569]}, {"w": "the", "b": [0.8429, 0.5539, 0.8691, 0.569]}, {"w": "model,", "b": [0.1312, 0.5719, 0.1861, 0.587]}, {"w": "and", "b": [0.193, 0.5719, 0.2233, 0.587]}, {"w": "one", "b": [0.23, 0.5719, 0.2583, 0.587]}, {"w": "for", "b": [0.265, 0.5719, 0.2875, 0.587]}, {"w": "scoring", "b": [0.2942, 0.5719, 0.3519, 0.587]}, {"w": "in", "b": [0.3586, 0.5719, 0.3743, 0.587]}, {"w": "production.", "b": [0.381, 0.5719, 0.4758, 0.587]}, {"w": "When", "b": [0.4856, 0.5719, 0.5343, 0.587]}, {"w": "it", "b": [0.541, 0.5719, 0.5535, 0.587]}, {"w": "concerns", "b": [0.5603, 0.5719, 0.6305, 0.587]}, {"w": "feature", "b": [0.637, 0.572, 0.702, 0.5869]}, {"w": "extraction,", "b": [0.7097, 0.5719, 0.8092, 0.587]}, {"w": "even", "b": [0.816, 0.5719, 0.8527, 0.587]}, {"w": "a", "b": [0.8594, 0.5719, 0.8688, 0.587]}, {"w": "tiny", "b": [0.1312, 0.5898, 0.1637, 0.6049]}, {"w": "difference", "b": [0.1706, 0.5898, 0.2486, 0.6049]}, {"w": "between", "b": [0.2555, 0.5898, 0.3219, 0.6049]}, {"w": "two", "b": [0.3288, 0.5898, 0.3581, 0.6049]}, {"w": "versions", "b": [0.365, 0.5898, 0.4301, 0.6049]}, {"w": "of", "b": [0.437, 0.5898, 0.4522, 0.6049]}, {"w": "feature", "b": [0.459, 0.5898, 0.5161, 0.6049]}, {"w": "extractor", "b": [0.523, 0.5898, 0.5979, 0.6049]}, {"w": "code", "b": [0.6048, 0.5898, 0.6419, 0.6049]}, {"w": "may", "b": [0.6488, 0.5898, 0.6833, 0.6049]}, {"w": "lead", "b": [0.6902, 0.5898, 0.7237, 0.6049]}, {"w": "to", "b": [0.7306, 0.5898, 0.7473, 0.6049]}, {"w": "suboptimal", "b": [0.7542, 0.5898, 0.8458, 0.6049]}, {"w": "or", "b": [0.8527, 0.5898, 0.8695, 0.6049]}, {"w": "incorrect", "b": [0.1312, 0.6079, 0.2021, 0.6229]}, {"w": "model", "b": [0.2083, 0.6079, 0.257, 0.6229]}, {"w": "performance.", "b": [0.2631, 0.6079, 0.3678, 0.6229]}]}, {"id": "b_9", "type": "paragraph", "text": "The engineering team may reimplement the feature extractor code for production for many reasons. The most common is that the data analyst’s code is inefficient or incompatible with the production ecosystem.", "words": [{"w": "The", "b": [0.1306, 0.6348, 0.1624, 0.6498]}, {"w": "engineering", "b": [0.1685, 0.6348, 0.2601, 0.6498]}, {"w": "team", "b": [0.2662, 0.6348, 0.3062, 0.6498]}, {"w": "may", "b": [0.3124, 0.6348, 0.3463, 0.6498]}, {"w": "reimplement", "b": [0.3524, 0.6348, 0.4526, 0.6498]}, {"w": "the", "b": [0.4587, 0.6348, 0.4844, 0.6498]}, {"w": "feature", "b": [0.4905, 0.6348, 0.5466, 0.6498]}, {"w": "extractor", "b": [0.5527, 0.6348, 0.6263, 0.6498]}, {"w": "code", "b": [0.6324, 0.6348, 0.6689, 0.6498]}, {"w": "for", "b": [0.675, 0.6348, 0.6972, 0.6498]}, {"w": "production", "b": [0.7033, 0.6348, 0.7912, 0.6498]}, {"w": "for", "b": [0.7973, 0.6348, 0.8195, 0.6498]}, {"w": "many", "b": [0.8256, 0.6348, 0.8698, 0.6498]}, {"w": "reasons.", "b": [0.1312, 0.6529, 0.1938, 0.6677]}, {"w": "The", "b": [0.202, 0.6529, 0.2332, 0.6677]}, {"w": "most", "b": [0.2394, 0.6529, 0.2776, 0.6677]}, {"w": "common", "b": [0.2838, 0.6529, 0.3501, 0.6677]}, {"w": "is", "b": [0.3563, 0.6529, 0.3684, 0.6677]}, {"w": "that", "b": [0.3746, 0.6529, 0.4077, 0.6677]}, {"w": "the", "b": [0.4139, 0.6529, 0.439, 0.6677]}, {"w": "data", "b": [0.4452, 0.6529, 0.4804, 0.6677]}, {"w": "analyst’s", "b": [0.4865, 0.6529, 0.5556, 0.6677]}, {"w": "code", "b": [0.5617, 0.6529, 0.5974, 0.6677]}, {"w": "is", "b": [0.6036, 0.6529, 0.6157, 0.6677]}, {"w": "inefficient", "b": [0.6219, 0.6529, 0.6978, 0.6677]}, {"w": "or", "b": [0.7039, 0.6529, 0.7201, 0.6677]}, {"w": "incompatible", "b": [0.7262, 0.6529, 0.8277, 0.6677]}, {"w": "with", "b": [0.8339, 0.6529, 0.8691, 0.6677]}, {"w": "the", "b": [0.1312, 0.6707, 0.1569, 0.6857]}, {"w": "production", "b": [0.163, 0.6707, 0.2508, 0.6857]}, {"w": "ecosystem.", "b": [0.2569, 0.6707, 0.3428, 0.6857]}]}, {"id": "b_10", "type": "paragraph", "text": "Thus, the runtime should allow easy access to the feature extraction code for various needs, including model retraining, ad-hoc model calls, and production. One way to implement it is by wrapping the feature extraction object into a separate web service.", "words": [{"w": "Thus,", "b": [0.1306, 0.6976, 0.1763, 0.7126]}, {"w": "the", "b": [0.1824, 0.6976, 0.208, 0.7126]}, {"w": "runtime", "b": [0.2142, 0.6976, 0.2772, 0.7126]}, {"w": "should", "b": [0.2834, 0.6976, 0.3357, 0.7126]}, {"w": "allow", "b": [0.3419, 0.6976, 0.3833, 0.7126]}, {"w": "easy", "b": [0.3895, 0.6976, 0.4239, 0.7126]}, {"w": "access", "b": [0.4301, 0.6976, 0.4784, 0.7126]}, {"w": "to", "b": [0.4846, 0.6976, 0.501, 0.7126]}, {"w": "the", "b": [0.5071, 0.6976, 0.5327, 0.7126]}, {"w": "feature", "b": [0.5388, 0.6976, 0.5947, 0.7126]}, {"w": "extraction", "b": [0.6009, 0.6976, 0.6824, 0.7126]}, {"w": "code", "b": [0.6885, 0.6976, 0.7249, 0.7126]}, {"w": "for", "b": [0.731, 0.6976, 0.7531, 0.7126]}, {"w": "various", "b": [0.7593, 0.6976, 0.8163, 0.7126]}, {"w": "needs,", "b": [0.8224, 0.6976, 0.8717, 0.7126]}, {"w": "including", "b": [0.1312, 0.7156, 0.2044, 0.7305]}, {"w": "model", "b": [0.2106, 0.7156, 0.2588, 0.7305]}, {"w": "retraining,", "b": [0.265, 0.7156, 0.3484, 0.7305]}, {"w": "ad-hoc", "b": [0.3546, 0.7156, 0.4079, 0.7305]}, {"w": "model", "b": [0.4141, 0.7156, 0.4623, 0.7305]}, {"w": "calls,", "b": [0.4685, 0.7156, 0.5082, 0.7305]}, {"w": "and", "b": [0.5144, 0.7156, 0.5439, 0.7305]}, {"w": "production.", "b": [0.55, 0.7156, 0.642, 0.7305]}, {"w": "One", "b": [0.6503, 0.7156, 0.6828, 0.7305]}, {"w": "way", "b": [0.6889, 0.7156, 0.7199, 0.7305]}, {"w": "to", "b": [0.726, 0.7156, 0.7423, 0.7305]}, {"w": "implement", "b": [0.7485, 0.7156, 0.8323, 0.7305]}, {"w": "it", "b": [0.8384, 0.7156, 0.8506, 0.7305]}, {"w": "is", "b": [0.8568, 0.7156, 0.8691, 0.7305]}, {"w": "by", "b": [0.1312, 0.7335, 0.1507, 0.7485]}, {"w": "wrapping", "b": [0.1569, 0.7335, 0.2318, 0.7485]}, {"w": "the", "b": [0.2379, 0.7335, 0.2636, 0.7485]}, {"w": "feature", "b": [0.2697, 0.7335, 0.3257, 0.7485]}, {"w": "extraction", "b": [0.3318, 0.7335, 0.4134, 0.7485]}, {"w": "object", "b": [0.4195, 0.7335, 0.4688, 0.7485]}, {"w": "into", "b": [0.4749, 0.7335, 0.5062, 0.7485]}, {"w": "a", "b": [0.5124, 0.7335, 0.5216, 0.7485]}, {"w": "separate", "b": [0.5277, 0.7335, 0.5945, 0.7485]}, {"w": "web", "b": [0.6007, 0.7335, 0.632, 0.7485]}, {"w": "service.", "b": [0.6381, 0.7335, 0.6973, 0.7485]}]}, {"id": "b_11", "type": "paragraph", "text": "If you cannot avoid using two different codebases to generate features for training and production, then the runtime should allow for the logging of feature values generated in the production environment. Those values should then be used as training values.", "words": [{"w": "If", "b": [0.1312, 0.7603, 0.1438, 0.7754]}, {"w": "you", "b": [0.1521, 0.7603, 0.1814, 0.7754]}, {"w": "cannot", "b": [0.1898, 0.7603, 0.2452, 0.7754]}, {"w": "avoid", "b": [0.2536, 0.7603, 0.297, 0.7754]}, {"w": "using", "b": [0.3053, 0.7603, 0.3483, 0.7754]}, {"w": "two", "b": [0.3567, 0.7603, 0.386, 0.7754]}, {"w": "different", "b": [0.3943, 0.7603, 0.4623, 0.7754]}, {"w": "codebases", "b": [0.4707, 0.7603, 0.5509, 0.7754]}, {"w": "to", "b": [0.5593, 0.7603, 0.576, 0.7754]}, {"w": "generate", "b": [0.5844, 0.7603, 0.6534, 0.7754]}, {"w": "features", "b": [0.6618, 0.7603, 0.7263, 0.7754]}, {"w": "for", "b": [0.7346, 0.7603, 0.7572, 0.7754]}, {"w": "training", "b": [0.7655, 0.7603, 0.8304, 0.7754]}, {"w": "and", "b": [0.8388, 0.7603, 0.8691, 0.7754]}, {"w": "production,", "b": [0.1312, 0.7784, 0.2236, 0.7933]}, {"w": "then", "b": [0.2298, 0.7784, 0.2655, 0.7933]}, {"w": "the", "b": [0.2716, 0.7784, 0.2971, 0.7933]}, {"w": "runtime", "b": [0.3033, 0.7784, 0.3661, 0.7933]}, {"w": "should", "b": [0.3722, 0.7784, 0.4244, 0.7933]}, {"w": "allow", "b": [0.4305, 0.7784, 0.4718, 0.7933]}, {"w": "for", "b": [0.4779, 0.7784, 0.4999, 0.7933]}, {"w": "the", "b": [0.5061, 0.7784, 0.5316, 0.7933]}, {"w": "logging", "b": [0.5377, 0.7784, 0.5948, 0.7933]}, {"w": "of", "b": [0.601, 0.7784, 0.6158, 0.7933]}, {"w": "feature", "b": [0.6219, 0.7784, 0.6776, 0.7933]}, {"w": "values", "b": [0.6837, 0.7784, 0.7323, 0.7933]}, {"w": "generated", "b": [0.7384, 0.7784, 0.816, 0.7933]}, {"w": "in", "b": [0.8222, 0.7784, 0.8375, 0.7933]}, {"w": "the", "b": [0.8436, 0.7784, 0.8691, 0.7933]}, {"w": "production", "b": [0.1312, 0.7963, 0.219, 0.8113]}, {"w": "environment.", "b": [0.2251, 0.7963, 0.3303, 0.8113]}, {"w": "Those", "b": [0.3385, 0.7963, 0.3868, 0.8113]}, {"w": "values", "b": [0.3929, 0.7963, 0.4418, 0.8113]}, {"w": "should", "b": [0.4479, 0.7963, 0.5003, 0.8113]}, {"w": "then", "b": [0.5065, 0.7963, 0.5424, 0.8113]}, {"w": "be", "b": [0.5485, 0.7963, 0.5675, 0.8113]}, {"w": "used", "b": [0.5736, 0.7963, 0.6096, 0.8113]}, {"w": "as", "b": [0.6158, 0.7963, 0.6323, 0.8113]}, {"w": "training", "b": [0.6385, 0.7963, 0.7021, 0.8113]}, {"w": "values.", "b": [0.7082, 0.7963, 0.7622, 0.8113]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "5", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 269, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "9.1.6 Avoidance of Hidden Feedback Loops", "words": [{"w": "9.1.6", "b": [0.1312, 0.0884, 0.1749, 0.1033]}, {"w": "Avoidance", "b": [0.1961, 0.0884, 0.2899, 0.1033]}, {"w": "of", "b": [0.297, 0.0884, 0.3141, 0.1033]}, {"w": "Hidden", "b": [0.3211, 0.0884, 0.3887, 0.1033]}, {"w": "Feedback", "b": [0.3958, 0.0884, 0.4808, 0.1033]}, {"w": "Loops", "b": [0.4879, 0.0884, 0.5426, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "In Section ?? of Chapter 4, we saw one example of a hidden feedback loop. Model mB used the output of model mA as a feature, without knowing that model mA also used the output of model mB as its feature.", "words": [{"w": "In", "b": [0.1312, 0.1249, 0.1485, 0.14]}, {"w": "Section", "b": [0.1548, 0.1249, 0.2144, 0.14]}, {"w": "??", "b": [0.2206, 0.1249, 0.2407, 0.1399]}, {"w": "of", "b": [0.2469, 0.1249, 0.2621, 0.14]}, {"w": "Chapter", "b": [0.2684, 0.1249, 0.3354, 0.14]}, {"w": "4,", "b": [0.3417, 0.1249, 0.3563, 0.14]}, {"w": "we", "b": [0.3626, 0.1249, 0.3841, 0.14]}, {"w": "saw", "b": [0.3903, 0.1249, 0.4202, 0.14]}, {"w": "one", "b": [0.4265, 0.1249, 0.4548, 0.14]}, {"w": "example", "b": [0.461, 0.1249, 0.5285, 0.14]}, {"w": "of", "b": [0.5348, 0.1249, 0.55, 0.14]}, {"w": "a", "b": [0.5562, 0.1249, 0.5656, 0.14]}, {"w": "hidden", "b": [0.572, 0.1249, 0.6348, 0.1399]}, {"w": "feedback", "b": [0.642, 0.1249, 0.7219, 0.1399]}, {"w": "loop.", "b": [0.7291, 0.1249, 0.7738, 0.14]}, {"w": "Model", "b": [0.7824, 0.1249, 0.8336, 0.14]}, {"w": "mB", "b": [0.8399, 0.125, 0.8672, 0.1412]}, {"w": "used", "b": [0.1312, 0.1428, 0.168, 0.1579]}, {"w": "the", "b": [0.1742, 0.1428, 0.2003, 0.1579]}, {"w": "output", "b": [0.2065, 0.1428, 0.262, 0.1579]}, {"w": "of", "b": [0.2682, 0.1428, 0.2833, 0.1579]}, {"w": "model", "b": [0.2896, 0.1428, 0.3392, 0.1579]}, {"w": "mA", "b": [0.3453, 0.1429, 0.3726, 0.1591]}, {"w": "as", "b": [0.3798, 0.1428, 0.3966, 0.1579]}, {"w": "a", "b": [0.4028, 0.1428, 0.4122, 0.1579]}, {"w": "feature,", "b": [0.4184, 0.1428, 0.4807, 0.1579]}, {"w": "without", "b": [0.4869, 0.1428, 0.5507, 0.1579]}, {"w": "knowing", "b": [0.5569, 0.1428, 0.6249, 0.1579]}, {"w": "that", "b": [0.6311, 0.1428, 0.6657, 0.1579]}, {"w": "model", "b": [0.6719, 0.1428, 0.7215, 0.1579]}, {"w": "mA", "b": [0.7276, 0.1429, 0.7549, 0.1591]}, {"w": "also", "b": [0.762, 0.1428, 0.7935, 0.1579]}, {"w": "used", "b": [0.7997, 0.1428, 0.8365, 0.1579]}, {"w": "the", "b": [0.8427, 0.1428, 0.8688, 0.1579]}, {"w": "output", "b": [0.1312, 0.1609, 0.1856, 0.1758]}, {"w": "of", "b": [0.1917, 0.1609, 0.2066, 0.1758]}, {"w": "model", "b": [0.2127, 0.1609, 0.2614, 0.1758]}, {"w": "mB", "b": [0.2676, 0.1608, 0.2949, 0.1771]}, {"w": "as", "b": [0.3026, 0.1609, 0.3191, 0.1758]}, {"w": "its", "b": [0.3253, 0.1609, 0.3448, 0.1758]}, {"w": "feature.", "b": [0.351, 0.1609, 0.4121, 0.1758]}]}, {"id": "b_2", "type": "paragraph", "text": "Another kind of hidden feedback loop only involves one model. Let’s say we have a model that classifies incoming email messages as spam or not spam. Let the user interface allow the user to mark messages as spam or not spam. Obviously, we want to use those marked messages to improve our model. However, by so doing, we risk creating a hidden feedback loop, and here is why.", "words": [{"w": "Another", "b": [0.1305, 0.1877, 0.1978, 0.2028]}, {"w": "kind", "b": [0.204, 0.1877, 0.2399, 0.2028]}, {"w": "of", "b": [0.2461, 0.1877, 0.2612, 0.2028]}, {"w": "hidden", "b": [0.2673, 0.1877, 0.3226, 0.2028]}, {"w": "feedback", "b": [0.3287, 0.1877, 0.3991, 0.2028]}, {"w": "loop", "b": [0.4053, 0.1877, 0.4401, 0.2028]}, {"w": "only", "b": [0.4463, 0.1877, 0.4812, 0.2028]}, {"w": "involves", "b": [0.4874, 0.1877, 0.5516, 0.2028]}, {"w": "one", "b": [0.5577, 0.1877, 0.5859, 0.2028]}, {"w": "model.", "b": [0.592, 0.1877, 0.6467, 0.2028]}, {"w": "Let’s", "b": [0.655, 0.1877, 0.6949, 0.2028]}, {"w": "say", "b": [0.7011, 0.1877, 0.7272, 0.2028]}, {"w": "we", "b": [0.7334, 0.1877, 0.7548, 0.2028]}, {"w": "have", "b": [0.7609, 0.1877, 0.7979, 0.2028]}, {"w": "a", "b": [0.8041, 0.1877, 0.8135, 0.2028]}, {"w": "model", "b": [0.8196, 0.1877, 0.8691, 0.2028]}, {"w": "that", "b": [0.1312, 0.2056, 0.1657, 0.2207]}, {"w": "classifies", "b": [0.1721, 0.2056, 0.2415, 0.2207]}, {"w": "incoming", "b": [0.2478, 0.2056, 0.3221, 0.2207]}, {"w": "email", "b": [0.3284, 0.2056, 0.3723, 0.2207]}, {"w": "messages", "b": [0.3786, 0.2056, 0.4522, 0.2207]}, {"w": "as", "b": [0.4585, 0.2056, 0.4754, 0.2207]}, {"w": "spam", "b": [0.4817, 0.2056, 0.5247, 0.2207]}, {"w": "or", "b": [0.531, 0.2056, 0.5478, 0.2207]}, {"w": "not", "b": [0.5541, 0.2056, 0.5813, 0.2207]}, {"w": "spam.", "b": [0.5877, 0.2056, 0.6359, 0.2207]}, {"w": "Let", "b": [0.6446, 0.2056, 0.6721, 0.2207]}, {"w": "the", "b": [0.6784, 0.2056, 0.7046, 0.2207]}, {"w": "user", "b": [0.7109, 0.2056, 0.7446, 0.2207]}, {"w": "interface", "b": [0.7509, 0.2056, 0.8211, 0.2207]}, {"w": "allow", "b": [0.8274, 0.2056, 0.8698, 0.2207]}, {"w": "the", "b": [0.1312, 0.2236, 0.1574, 0.2387]}, {"w": "user", "b": [0.1635, 0.2236, 0.1971, 0.2387]}, {"w": "to", "b": [0.2032, 0.2236, 0.2199, 0.2387]}, {"w": "mark", "b": [0.2261, 0.2236, 0.2684, 0.2387]}, {"w": "messages", "b": [0.2746, 0.2236, 0.348, 0.2387]}, {"w": "as", "b": [0.3542, 0.2236, 0.371, 0.2387]}, {"w": "spam", "b": [0.3771, 0.2236, 0.4201, 0.2387]}, {"w": "or", "b": [0.4262, 0.2236, 0.443, 0.2387]}, {"w": "not", "b": [0.4491, 0.2236, 0.4762, 0.2387]}, {"w": "spam.", "b": [0.4824, 0.2236, 0.5305, 0.2387]}, {"w": "Obviously,", "b": [0.5387, 0.2236, 0.6246, 0.2387]}, {"w": "we", "b": [0.6307, 0.2236, 0.6521, 0.2387]}, {"w": "want", "b": [0.6582, 0.2236, 0.698, 0.2387]}, {"w": "to", "b": [0.7041, 0.2236, 0.7208, 0.2387]}, {"w": "use", "b": [0.7269, 0.2236, 0.7532, 0.2387]}, {"w": "those", "b": [0.7593, 0.2236, 0.8023, 0.2387]}, {"w": "marked", "b": [0.8084, 0.2236, 0.869, 0.2387]}, {"w": "messages", "b": [0.1312, 0.2415, 0.2046, 0.2566]}, {"w": "to", "b": [0.2107, 0.2415, 0.2274, 0.2566]}, {"w": "improve", "b": [0.2335, 0.2415, 0.2987, 0.2566]}, {"w": "our", "b": [0.3048, 0.2415, 0.332, 0.2566]}, {"w": "model.", "b": [0.3381, 0.2415, 0.3929, 0.2566]}, {"w": "However,", "b": [0.401, 0.2415, 0.4757, 0.2566]}, {"w": "by", "b": [0.4818, 0.2415, 0.5016, 0.2566]}, {"w": "so", "b": [0.5078, 0.2415, 0.5245, 0.2566]}, {"w": "doing,", "b": [0.5307, 0.2415, 0.5807, 0.2566]}, {"w": "we", "b": [0.5869, 0.2415, 0.6082, 0.2566]}, {"w": "risk", "b": [0.6144, 0.2415, 0.6442, 0.2566]}, {"w": "creating", "b": [0.6504, 0.2415, 0.7161, 0.2566]}, {"w": "a", "b": [0.7222, 0.2415, 0.7316, 0.2566]}, {"w": "hidden", "b": [0.7377, 0.2415, 0.793, 0.2566]}, {"w": "feedback", "b": [0.7992, 0.2415, 0.8696, 0.2566]}, {"w": "loop,", "b": [0.1312, 0.2596, 0.1707, 0.2745]}, {"w": "and", "b": [0.1769, 0.2596, 0.2066, 0.2745]}, {"w": "here", "b": [0.2127, 0.2596, 0.2467, 0.2745]}, {"w": "is", "b": [0.2528, 0.2596, 0.2652, 0.2745]}, {"w": "why.", "b": [0.2714, 0.2596, 0.3078, 0.2745]}]}, {"id": "b_3", "type": "paragraph", "text": "In our application, the user will only mark a message as spam when they see it. However, users only see the messages that our model classified as not spam. Also, it is unlikely that the user will regularly go to the spam folder and mark some messages as not spam. So, the action of the user is significantly affected by our model, which makes the data we get from the user skewed: we influence the phenomenon from which we learn.", "words": [{"w": "In", "b": [0.1312, 0.2864, 0.1485, 0.3015]}, {"w": "our", "b": [0.1547, 0.2864, 0.182, 0.3015]}, {"w": "application,", "b": [0.1882, 0.2864, 0.2844, 0.3015]}, {"w": "the", "b": [0.2907, 0.2864, 0.3169, 0.3015]}, {"w": "user", "b": [0.3231, 0.2864, 0.3567, 0.3015]}, {"w": "will", "b": [0.363, 0.2864, 0.3922, 0.3015]}, {"w": "only", "b": [0.3985, 0.2864, 0.4335, 0.3015]}, {"w": "mark", "b": [0.4398, 0.2864, 0.4822, 0.3015]}, {"w": "a", "b": [0.4884, 0.2864, 0.4978, 0.3015]}, {"w": "message", "b": [0.504, 0.2864, 0.5702, 0.3015]}, {"w": "as", "b": [0.5764, 0.2864, 0.5932, 0.3015]}, {"w": "spam", "b": [0.5995, 0.2864, 0.6424, 0.3015]}, {"w": "when", "b": [0.6487, 0.2864, 0.6916, 0.3015]}, {"w": "they", "b": [0.6978, 0.2864, 0.7339, 0.3015]}, {"w": "see", "b": [0.7401, 0.2864, 0.7643, 0.3015]}, {"w": "it.", "b": [0.7705, 0.2864, 0.7883, 0.3015]}, {"w": "However,", "b": [0.7968, 0.2864, 0.8716, 0.3015]}, {"w": "users", "b": [0.1312, 0.3044, 0.1721, 0.3194]}, {"w": "only", "b": [0.1782, 0.3044, 0.2131, 0.3194]}, {"w": "see", "b": [0.2192, 0.3044, 0.2433, 0.3194]}, {"w": "the", "b": [0.2494, 0.3044, 0.2754, 0.3194]}, {"w": "messages", "b": [0.2816, 0.3044, 0.3547, 0.3194]}, {"w": "that", "b": [0.3608, 0.3044, 0.3951, 0.3194]}, {"w": "our", "b": [0.4013, 0.3044, 0.4284, 0.3194]}, {"w": "model", "b": [0.4346, 0.3044, 0.4839, 0.3194]}, {"w": "classified", "b": [0.4901, 0.3044, 0.5621, 0.3194]}, {"w": "as", "b": [0.5682, 0.3044, 0.585, 0.3194]}, {"w": "not", "b": [0.5911, 0.3044, 0.6182, 0.3194]}, {"w": "spam.", "b": [0.6243, 0.3044, 0.6722, 0.3194]}, {"w": "Also,", "b": [0.6805, 0.3044, 0.7216, 0.3194]}, {"w": "it", "b": [0.7278, 0.3044, 0.7403, 0.3194]}, {"w": "is", "b": [0.7464, 0.3044, 0.759, 0.3194]}, {"w": "unlikely", "b": [0.7652, 0.3044, 0.8292, 0.3194]}, {"w": "that", "b": [0.8353, 0.3044, 0.8696, 0.3194]}, {"w": "the", "b": [0.1312, 0.3224, 0.1569, 0.3373]}, {"w": "user", "b": [0.163, 0.3224, 0.196, 0.3373]}, {"w": "will", "b": [0.2022, 0.3224, 0.2309, 0.3373]}, {"w": "regularly", "b": [0.237, 0.3224, 0.3084, 0.3373]}, {"w": "go", "b": [0.3145, 0.3224, 0.333, 0.3373]}, {"w": "to", "b": [0.3391, 0.3224, 0.3555, 0.3373]}, {"w": "the", "b": [0.3617, 0.3224, 0.3873, 0.3373]}, {"w": "spam", "b": [0.3935, 0.3224, 0.4356, 0.3373]}, {"w": "folder", "b": [0.4418, 0.3224, 0.4875, 0.3373]}, {"w": "and", "b": [0.4936, 0.3224, 0.5234, 0.3373]}, {"w": "mark", "b": [0.5295, 0.3224, 0.5711, 0.3373]}, {"w": "some", "b": [0.5772, 0.3224, 0.6173, 0.3373]}, {"w": "messages", "b": [0.6235, 0.3224, 0.6956, 0.3373]}, {"w": "as", "b": [0.7017, 0.3224, 0.7182, 0.3373]}, {"w": "not", "b": [0.7244, 0.3224, 0.751, 0.3373]}, {"w": "spam.", "b": [0.7572, 0.3224, 0.8044, 0.3373]}, {"w": "So,", "b": [0.8127, 0.3224, 0.8373, 0.3373]}, {"w": "the", "b": [0.8434, 0.3224, 0.8691, 0.3373]}, {"w": "action", "b": [0.1312, 0.3403, 0.1808, 0.3553]}, {"w": "of", "b": [0.187, 0.3403, 0.202, 0.3553]}, {"w": "the", "b": [0.2081, 0.3403, 0.234, 0.3553]}, {"w": "user", "b": [0.2401, 0.3403, 0.2734, 0.3553]}, {"w": "is", "b": [0.2795, 0.3403, 0.2921, 0.3553]}, {"w": "significantly", "b": [0.2982, 0.3403, 0.3955, 0.3553]}, {"w": "affected", "b": [0.4017, 0.3403, 0.4642, 0.3553]}, {"w": "by", "b": [0.4703, 0.3403, 0.49, 0.3553]}, {"w": "our", "b": [0.4961, 0.3403, 0.5231, 0.3553]}, {"w": "model,", "b": [0.5292, 0.3403, 0.5835, 0.3553]}, {"w": "which", "b": [0.5896, 0.3403, 0.6367, 0.3553]}, {"w": "makes", "b": [0.6428, 0.3403, 0.6925, 0.3553]}, {"w": "the", "b": [0.6987, 0.3403, 0.7245, 0.3553]}, {"w": "data", "b": [0.7307, 0.3403, 0.7669, 0.3553]}, {"w": "we", "b": [0.773, 0.3403, 0.7942, 0.3553]}, {"w": "get", "b": [0.8003, 0.3403, 0.8252, 0.3553]}, {"w": "from", "b": [0.8313, 0.3403, 0.8691, 0.3553]}, {"w": "the", "b": [0.1312, 0.3583, 0.1569, 0.3732]}, {"w": "user", "b": [0.163, 0.3583, 0.196, 0.3732]}, {"w": "skewed:", "b": [0.2022, 0.3583, 0.2633, 0.3732]}, {"w": "we", "b": [0.2715, 0.3583, 0.2925, 0.3732]}, {"w": "influence", "b": [0.2987, 0.3583, 0.3694, 0.3732]}, {"w": "the", "b": [0.3756, 0.3583, 0.4012, 0.3732]}, {"w": "phenomenon", "b": [0.4074, 0.3583, 0.5089, 0.3732]}, {"w": "from", "b": [0.5151, 0.3583, 0.5525, 0.3732]}, {"w": "which", "b": [0.5587, 0.3583, 0.6053, 0.3732]}, {"w": "we", "b": [0.6115, 0.3583, 0.6325, 0.3732]}, {"w": "learn.", "b": [0.6386, 0.3583, 0.6838, 0.3732]}]}, {"id": "b_4", "type": "paragraph", "text": "To avoid the skew, mark a small percentage of examples as “held-out,” and show all of them to the user without pre-applying the model. Then use only these held-out examples as additional training examples, including those to which the user didn’t react.", "words": [{"w": "To", "b": [0.1306, 0.3851, 0.152, 0.4002]}, {"w": "avoid", "b": [0.1598, 0.3851, 0.2032, 0.4002]}, {"w": "the", "b": [0.2109, 0.3851, 0.2371, 0.4002]}, {"w": "skew,", "b": [0.2449, 0.3851, 0.2889, 0.4002]}, {"w": "mark", "b": [0.2971, 0.3851, 0.3395, 0.4002]}, {"w": "a", "b": [0.3472, 0.3851, 0.3566, 0.4002]}, {"w": "small", "b": [0.3643, 0.3851, 0.4073, 0.4002]}, {"w": "percentage", "b": [0.4151, 0.3851, 0.503, 0.4002]}, {"w": "of", "b": [0.5108, 0.3851, 0.5259, 0.4002]}, {"w": "examples", "b": [0.5337, 0.3851, 0.6086, 0.4002]}, {"w": "as", "b": [0.6163, 0.3851, 0.6331, 0.4002]}, {"w": "“held-out,”", "b": [0.6409, 0.3851, 0.7319, 0.4002]}, {"w": "and", "b": [0.74, 0.3851, 0.7704, 0.4002]}, {"w": "show", "b": [0.7781, 0.3851, 0.8185, 0.4002]}, {"w": "all", "b": [0.8262, 0.3851, 0.8461, 0.4002]}, {"w": "of", "b": [0.8539, 0.3851, 0.869, 0.4002]}, {"w": "them", "b": [0.1312, 0.4032, 0.1717, 0.4181]}, {"w": "to", "b": [0.1778, 0.4032, 0.194, 0.4181]}, {"w": "the", "b": [0.2001, 0.4032, 0.2254, 0.4181]}, {"w": "user", "b": [0.2316, 0.4032, 0.2641, 0.4181]}, {"w": "without", "b": [0.2702, 0.4032, 0.3319, 0.4181]}, {"w": "pre-applying", "b": [0.338, 0.4032, 0.4377, 0.4181]}, {"w": "the", "b": [0.4438, 0.4032, 0.4691, 0.4181]}, {"w": "model.", "b": [0.4753, 0.4032, 0.5284, 0.4181]}, {"w": "Then", "b": [0.5365, 0.4032, 0.578, 0.4181]}, {"w": "use", "b": [0.5842, 0.4032, 0.6095, 0.4181]}, {"w": "only", "b": [0.6157, 0.4032, 0.6496, 0.4181]}, {"w": "these", "b": [0.6557, 0.4032, 0.6963, 0.4181]}, {"w": "held-out", "b": [0.7024, 0.4032, 0.7681, 0.4181]}, {"w": "examples", "b": [0.7743, 0.4032, 0.8467, 0.4181]}, {"w": "as", "b": [0.8528, 0.4032, 0.8691, 0.4181]}, {"w": "additional", "b": [0.1312, 0.4211, 0.2122, 0.4361]}, {"w": "training", "b": [0.2184, 0.4211, 0.282, 0.4361]}, {"w": "examples,", "b": [0.2882, 0.4211, 0.3667, 0.4361]}, {"w": "including", "b": [0.3729, 0.4211, 0.4467, 0.4361]}, {"w": "those", "b": [0.4529, 0.4211, 0.495, 0.4361]}, {"w": "to", "b": [0.5012, 0.4211, 0.5176, 0.4361]}, {"w": "which", "b": [0.5237, 0.4211, 0.5704, 0.4361]}, {"w": "the", "b": [0.5765, 0.4211, 0.6022, 0.4361]}, {"w": "user", "b": [0.6083, 0.4211, 0.6413, 0.4361]}, {"w": "didn’t", "b": [0.6475, 0.4211, 0.6957, 0.4361]}, {"w": "react.", "b": [0.7018, 0.4211, 0.747, 0.4361]}]}, {"id": "b_5", "type": "paragraph", "text": "In a more general scenario, one model can indirectly affect the data used to train another model. Let one model decide the order of books to display, while the other decides which reviews to display near each book. If the first model puts a review of a certain book at the bottom of the list, the absence of a user’s response to the second model’s review may be caused by its low position on the page, and not by the quality of the review.", "words": [{"w": "In", "b": [0.1312, 0.4479, 0.1485, 0.463]}, {"w": "a", "b": [0.1547, 0.4479, 0.1641, 0.463]}, {"w": "more", "b": [0.1703, 0.4479, 0.2112, 0.463]}, {"w": "general", "b": [0.2174, 0.4479, 0.276, 0.463]}, {"w": "scenario,", "b": [0.2823, 0.4479, 0.3536, 0.463]}, {"w": "one", "b": [0.3598, 0.4479, 0.388, 0.463]}, {"w": "model", "b": [0.3943, 0.4479, 0.4439, 0.463]}, {"w": "can", "b": [0.4502, 0.4479, 0.4784, 0.463]}, {"w": "indirectly", "b": [0.4846, 0.4479, 0.5626, 0.463]}, {"w": "affect", "b": [0.5689, 0.4479, 0.6133, 0.463]}, {"w": "the", "b": [0.6195, 0.4479, 0.6457, 0.463]}, {"w": "data", "b": [0.6519, 0.4479, 0.6885, 0.463]}, {"w": "used", "b": [0.6947, 0.4479, 0.7315, 0.463]}, {"w": "to", "b": [0.7377, 0.4479, 0.7544, 0.463]}, {"w": "train", "b": [0.7606, 0.4479, 0.8004, 0.463]}, {"w": "another", "b": [0.8067, 0.4479, 0.8695, 0.463]}, {"w": "model.", "b": [0.1312, 0.4658, 0.1861, 0.481]}, {"w": "Let", "b": [0.195, 0.4658, 0.2224, 0.481]}, {"w": "one", "b": [0.2288, 0.4658, 0.257, 0.481]}, {"w": "model", "b": [0.2634, 0.4658, 0.3131, 0.481]}, {"w": "decide", "b": [0.3194, 0.4658, 0.3707, 0.481]}, {"w": "the", "b": [0.3771, 0.4658, 0.4032, 0.481]}, {"w": "order", "b": [0.4096, 0.4658, 0.4526, 0.481]}, {"w": "of", "b": [0.459, 0.4658, 0.4741, 0.481]}, {"w": "books", "b": [0.4805, 0.4658, 0.5282, 0.481]}, {"w": "to", "b": [0.5345, 0.4658, 0.5513, 0.481]}, {"w": "display,", "b": [0.5576, 0.4658, 0.619, 0.481]}, {"w": "while", "b": [0.6254, 0.4658, 0.6683, 0.481]}, {"w": "the", "b": [0.6746, 0.4658, 0.7008, 0.481]}, {"w": "other", "b": [0.7071, 0.4658, 0.7501, 0.481]}, {"w": "decides", "b": [0.7565, 0.4658, 0.8152, 0.481]}, {"w": "which", "b": [0.8215, 0.4658, 0.8691, 0.481]}, {"w": "reviews", "b": [0.1312, 0.4839, 0.1906, 0.4989]}, {"w": "to", "b": [0.1967, 0.4839, 0.2132, 0.4989]}, {"w": "display", "b": [0.2194, 0.4839, 0.2761, 0.4989]}, {"w": "near", "b": [0.2823, 0.4839, 0.3173, 0.4989]}, {"w": "each", "b": [0.3235, 0.4839, 0.359, 0.4989]}, {"w": "book.", "b": [0.3651, 0.4839, 0.4099, 0.4989]}, {"w": "If", "b": [0.4181, 0.4839, 0.4305, 0.4989]}, {"w": "the", "b": [0.4366, 0.4839, 0.4624, 0.4989]}, {"w": "first", "b": [0.4685, 0.4839, 0.5006, 0.4989]}, {"w": "model", "b": [0.5068, 0.4839, 0.5556, 0.4989]}, {"w": "puts", "b": [0.5618, 0.4839, 0.5969, 0.4989]}, {"w": "a", "b": [0.6031, 0.4839, 0.6123, 0.4989]}, {"w": "review", "b": [0.6185, 0.4839, 0.6705, 0.4989]}, {"w": "of", "b": [0.6767, 0.4839, 0.6916, 0.4989]}, {"w": "a", "b": [0.6977, 0.4839, 0.707, 0.4989]}, {"w": "certain", "b": [0.7132, 0.4839, 0.7688, 0.4989]}, {"w": "book", "b": [0.775, 0.4839, 0.8146, 0.4989]}, {"w": "at", "b": [0.8207, 0.4839, 0.8372, 0.4989]}, {"w": "the", "b": [0.8434, 0.4839, 0.8691, 0.4989]}, {"w": "bottom", "b": [0.1312, 0.5017, 0.1913, 0.5168]}, {"w": "of", "b": [0.1982, 0.5017, 0.2134, 0.5168]}, {"w": "the", "b": [0.2202, 0.5017, 0.2464, 0.5168]}, {"w": "list,", "b": [0.2532, 0.5017, 0.2837, 0.5168]}, {"w": "the", "b": [0.2907, 0.5017, 0.3169, 0.5168]}, {"w": "absence", "b": [0.3237, 0.5017, 0.3866, 0.5168]}, {"w": "of", "b": [0.3934, 0.5017, 0.4086, 0.5168]}, {"w": "a", "b": [0.4155, 0.5017, 0.4249, 0.5168]}, {"w": "user’s", "b": [0.4317, 0.5017, 0.478, 0.5168]}, {"w": "response", "b": [0.4849, 0.5017, 0.5547, 0.5168]}, {"w": "to", "b": [0.5616, 0.5017, 0.5783, 0.5168]}, {"w": "the", "b": [0.5851, 0.5017, 0.6113, 0.5168]}, {"w": "second", "b": [0.6182, 0.5017, 0.6727, 0.5168]}, {"w": "model’s", "b": [0.6795, 0.5017, 0.7418, 0.5168]}, {"w": "review", "b": [0.7487, 0.5017, 0.8016, 0.5168]}, {"w": "may", "b": [0.8084, 0.5017, 0.8429, 0.5168]}, {"w": "be", "b": [0.8498, 0.5017, 0.8691, 0.5168]}, {"w": "caused", "b": [0.1312, 0.5198, 0.1847, 0.5348]}, {"w": "by", "b": [0.1908, 0.5198, 0.2103, 0.5348]}, {"w": "its", "b": [0.2165, 0.5198, 0.2361, 0.5348]}, {"w": "low", "b": [0.2422, 0.5198, 0.2694, 0.5348]}, {"w": "position", "b": [0.2755, 0.5198, 0.3397, 0.5348]}, {"w": "on", "b": [0.3459, 0.5198, 0.3653, 0.5348]}, {"w": "the", "b": [0.3715, 0.5198, 0.3971, 0.5348]}, {"w": "page,", "b": [0.4033, 0.5198, 0.4453, 0.5348]}, {"w": "and", "b": [0.4515, 0.5198, 0.4812, 0.5348]}, {"w": "not", "b": [0.4874, 0.5198, 0.514, 0.5348]}, {"w": "by", "b": [0.5202, 0.5198, 0.5397, 0.5348]}, {"w": "the", "b": [0.5458, 0.5198, 0.5715, 0.5348]}, {"w": "quality", "b": [0.5776, 0.5198, 0.6335, 0.5348]}, {"w": "of", "b": [0.6396, 0.5198, 0.6545, 0.5348]}, {"w": "the", "b": [0.6607, 0.5198, 0.6863, 0.5348]}, {"w": "review.", "b": [0.6924, 0.5198, 0.7494, 0.5348]}]}, {"id": "b_6", "type": "paragraph", "text": "9.2 Modes of Model Serving", "words": [{"w": "9.2", "b": [0.1312, 0.5683, 0.1631, 0.5863]}, {"w": "Modes", "b": [0.188, 0.5683, 0.2598, 0.5863]}, {"w": "of", "b": [0.2681, 0.5683, 0.2882, 0.5863]}, {"w": "Model", "b": [0.2965, 0.5683, 0.3654, 0.5863]}, {"w": "Serving", "b": [0.3737, 0.5683, 0.4555, 0.5863]}]}, {"id": "b_7", "type": "paragraph", "text": "Machine learning models are served in either batch or on-demand mode. On-demand, a model can be served to either a human client or a machine.", "words": [{"w": "Machine", "b": [0.1312, 0.6071, 0.2003, 0.6222]}, {"w": "learning", "b": [0.2076, 0.6071, 0.2736, 0.6222]}, {"w": "models", "b": [0.2809, 0.6071, 0.338, 0.6222]}, {"w": "are", "b": [0.3453, 0.6071, 0.3705, 0.6222]}, {"w": "served", "b": [0.3778, 0.6071, 0.4292, 0.6222]}, {"w": "in", "b": [0.4365, 0.6071, 0.4522, 0.6222]}, {"w": "either", "b": [0.4596, 0.6071, 0.5067, 0.6222]}, {"w": "batch", "b": [0.514, 0.6071, 0.5595, 0.6222]}, {"w": "or", "b": [0.5668, 0.6071, 0.5836, 0.6222]}, {"w": "on-demand", "b": [0.5909, 0.6071, 0.6819, 0.6222]}, {"w": "mode.", "b": [0.6893, 0.6071, 0.7389, 0.6222]}, {"w": "On-demand,", "b": [0.7506, 0.6071, 0.8521, 0.6222]}, {"w": "a", "b": [0.8597, 0.6071, 0.8691, 0.6222]}, {"w": "model", "b": [0.1312, 0.6252, 0.1799, 0.6401]}, {"w": "can", "b": [0.1861, 0.6252, 0.2138, 0.6401]}, {"w": "be", "b": [0.2199, 0.6252, 0.2389, 0.6401]}, {"w": "served", "b": [0.245, 0.6252, 0.2955, 0.6401]}, {"w": "to", "b": [0.3016, 0.6252, 0.318, 0.6401]}, {"w": "either", "b": [0.3242, 0.6252, 0.3704, 0.6401]}, {"w": "a", "b": [0.3765, 0.6252, 0.3858, 0.6401]}, {"w": "human", "b": [0.3919, 0.6252, 0.4468, 0.6401]}, {"w": "client", "b": [0.4529, 0.6252, 0.4965, 0.6401]}, {"w": "or", "b": [0.5027, 0.6252, 0.5191, 0.6401]}, {"w": "a", "b": [0.5253, 0.6252, 0.5345, 0.6401]}, {"w": "machine.", "b": [0.5406, 0.6252, 0.6119, 0.6401]}]}, {"id": "b_8", "type": "paragraph", "text": "9.2.1 Serving in Batch Mode", "words": [{"w": "9.2.1", "b": [0.1312, 0.673, 0.1749, 0.6879]}, {"w": "Serving", "b": [0.1961, 0.673, 0.2658, 0.6879]}, {"w": "in", "b": [0.2729, 0.673, 0.2906, 0.6879]}, {"w": "Batch", "b": [0.2977, 0.673, 0.3519, 0.6879]}, {"w": "Mode", "b": [0.359, 0.673, 0.4119, 0.6879]}]}, {"id": "b_9", "type": "paragraph", "text": "A model is usually served in batch mode when it is applied to large quantities of input data. One example could be when the model is used to exhaustively process the data of all users of a product or service. Or, when it systematically applies to all incoming events, such as tweets, or comments to online publications. Batch mode is more resource-efficient compared to an on-demand mode, and is employed when some latency can be tolerated.", "words": [{"w": "A", "b": [0.1305, 0.7097, 0.1442, 0.7245]}, {"w": "model", "b": [0.1504, 0.7097, 0.1985, 0.7245]}, {"w": "is", "b": [0.2047, 0.7097, 0.217, 0.7245]}, {"w": "usually", "b": [0.2231, 0.7097, 0.2795, 0.7245]}, {"w": "served", "b": [0.2857, 0.7097, 0.3355, 0.7245]}, {"w": "in", "b": [0.3417, 0.7097, 0.3569, 0.7245]}, {"w": "batch", "b": [0.3631, 0.7097, 0.4072, 0.7245]}, {"w": "mode", "b": [0.4133, 0.7097, 0.4564, 0.7245]}, {"w": "when", "b": [0.4626, 0.7097, 0.5042, 0.7245]}, {"w": "it", "b": [0.5103, 0.7097, 0.5225, 0.7245]}, {"w": "is", "b": [0.5286, 0.7097, 0.5409, 0.7245]}, {"w": "applied", "b": [0.5471, 0.7097, 0.6049, 0.7245]}, {"w": "to", "b": [0.6111, 0.7097, 0.6273, 0.7245]}, {"w": "large", "b": [0.6334, 0.7097, 0.672, 0.7245]}, {"w": "quantities", "b": [0.6782, 0.7097, 0.7564, 0.7245]}, {"w": "of", "b": [0.7625, 0.7097, 0.7772, 0.7245]}, {"w": "input", "b": [0.7834, 0.7097, 0.826, 0.7245]}, {"w": "data.", "b": [0.8321, 0.7097, 0.8727, 0.7245]}, {"w": "One", "b": [0.1312, 0.7275, 0.1642, 0.7425]}, {"w": "example", "b": [0.1704, 0.7275, 0.2368, 0.7425]}, {"w": "could", "b": [0.243, 0.7275, 0.2863, 0.7425]}, {"w": "be", "b": [0.2925, 0.7275, 0.3115, 0.7425]}, {"w": "when", "b": [0.3177, 0.7275, 0.3599, 0.7425]}, {"w": "the", "b": [0.3661, 0.7275, 0.3919, 0.7425]}, {"w": "model", "b": [0.398, 0.7275, 0.447, 0.7425]}, {"w": "is", "b": [0.4531, 0.7275, 0.4656, 0.7425]}, {"w": "used", "b": [0.4718, 0.7275, 0.508, 0.7425]}, {"w": "to", "b": [0.5141, 0.7275, 0.5306, 0.7425]}, {"w": "exhaustively", "b": [0.5368, 0.7275, 0.6369, 0.7425]}, {"w": "process", "b": [0.643, 0.7275, 0.7015, 0.7425]}, {"w": "the", "b": [0.7077, 0.7275, 0.7335, 0.7425]}, {"w": "data", "b": [0.7396, 0.7275, 0.7757, 0.7425]}, {"w": "of", "b": [0.7818, 0.7275, 0.7968, 0.7425]}, {"w": "all", "b": [0.8029, 0.7275, 0.8225, 0.7425]}, {"w": "users", "b": [0.8287, 0.7275, 0.8692, 0.7425]}, {"w": "of", "b": [0.1312, 0.7454, 0.1464, 0.7605]}, {"w": "a", "b": [0.1527, 0.7454, 0.1621, 0.7605]}, {"w": "product", "b": [0.1683, 0.7454, 0.2327, 0.7605]}, {"w": "or", "b": [0.239, 0.7454, 0.2558, 0.7605]}, {"w": "service.", "b": [0.262, 0.7454, 0.3223, 0.7605]}, {"w": "Or,", "b": [0.3309, 0.7454, 0.3581, 0.7605]}, {"w": "when", "b": [0.3644, 0.7454, 0.4073, 0.7605]}, {"w": "it", "b": [0.4135, 0.7454, 0.4261, 0.7605]}, {"w": "systematically", "b": [0.4324, 0.7454, 0.5487, 0.7605]}, {"w": "applies", "b": [0.5549, 0.7454, 0.6115, 0.7605]}, {"w": "to", "b": [0.6178, 0.7454, 0.6345, 0.7605]}, {"w": "all", "b": [0.6408, 0.7454, 0.6606, 0.7605]}, {"w": "incoming", "b": [0.6669, 0.7454, 0.7412, 0.7605]}, {"w": "events,", "b": [0.7474, 0.7454, 0.8035, 0.7605]}, {"w": "such", "b": [0.8098, 0.7454, 0.846, 0.7605]}, {"w": "as", "b": [0.8523, 0.7454, 0.8691, 0.7605]}, {"w": "tweets,", "b": [0.1312, 0.7635, 0.1861, 0.7784]}, {"w": "or", "b": [0.1923, 0.7635, 0.2086, 0.7784]}, {"w": "comments", "b": [0.2147, 0.7635, 0.2944, 0.7784]}, {"w": "to", "b": [0.3006, 0.7635, 0.3168, 0.7784]}, {"w": "online", "b": [0.323, 0.7635, 0.3707, 0.7784]}, {"w": "publications.", "b": [0.3768, 0.7635, 0.4784, 0.7784]}, {"w": "Batch", "b": [0.4867, 0.7635, 0.5335, 0.7784]}, {"w": "mode", "b": [0.5397, 0.7635, 0.5828, 0.7784]}, {"w": "is", "b": [0.589, 0.7635, 0.6013, 0.7784]}, {"w": "more", "b": [0.6074, 0.7635, 0.647, 0.7784]}, {"w": "resource-efficient", "b": [0.6532, 0.7635, 0.7858, 0.7784]}, {"w": "compared", "b": [0.792, 0.7635, 0.8691, 0.7784]}, {"w": "to", "b": [0.1312, 0.7814, 0.1476, 0.7963]}, {"w": "an", "b": [0.1538, 0.7814, 0.1733, 0.7963]}, {"w": "on-demand", "b": [0.1794, 0.7814, 0.2686, 0.7963]}, {"w": "mode,", "b": [0.2748, 0.7814, 0.3235, 0.7963]}, {"w": "and", "b": [0.3296, 0.7814, 0.3594, 0.7963]}, {"w": "is", "b": [0.3655, 0.7814, 0.3779, 0.7963]}, {"w": "employed", "b": [0.3841, 0.7814, 0.4594, 0.7963]}, {"w": "when", "b": [0.4656, 0.7814, 0.5076, 0.7963]}, {"w": "some", "b": [0.5138, 0.7814, 0.5539, 0.7963]}, {"w": "latency", "b": [0.56, 0.7814, 0.618, 0.7963]}, {"w": "can", "b": [0.6241, 0.7814, 0.6518, 0.7963]}, {"w": "be", "b": [0.658, 0.7814, 0.6769, 0.7963]}, {"w": "tolerated.", "b": [0.6831, 0.7814, 0.7601, 0.7963]}]}, {"id": "b_10", "type": "paragraph", "text": "When served in batch mode, the model usually accepts between a hundred and a thousand", "words": [{"w": "When", "b": [0.1303, 0.8083, 0.1782, 0.8233]}, {"w": "served", "b": [0.1843, 0.8083, 0.2349, 0.8233]}, {"w": "in", "b": [0.2411, 0.8083, 0.2565, 0.8233]}, {"w": "batch", "b": [0.2627, 0.8083, 0.3075, 0.8233]}, {"w": "mode,", "b": [0.3136, 0.8083, 0.3625, 0.8233]}, {"w": "the", "b": [0.3687, 0.8083, 0.3944, 0.8233]}, {"w": "model", "b": [0.4005, 0.8083, 0.4494, 0.8233]}, {"w": "usually", "b": [0.4556, 0.8083, 0.5128, 0.8233]}, {"w": "accepts", "b": [0.519, 0.8083, 0.5778, 0.8233]}, {"w": "between", "b": [0.5839, 0.8083, 0.6493, 0.8233]}, {"w": "a", "b": [0.6555, 0.8083, 0.6647, 0.8233]}, {"w": "hundred", "b": [0.6709, 0.8083, 0.7374, 0.8233]}, {"w": "and", "b": [0.7435, 0.8083, 0.7734, 0.8233]}, {"w": "a", "b": [0.7795, 0.8083, 0.7888, 0.8233]}, {"w": "thousand", "b": [0.7949, 0.8083, 0.8692, 0.8233]}]}, {"id": "b_11", "type": "paragraph", "text": "feature vectors at once. Experiment to find the optimal batch size for speed. Typical sizes are powers of two: 32, 64, 128, etc.", "words": [{"w": "feature", "b": [0.1312, 0.8262, 0.1878, 0.8412]}, {"w": "vectors", "b": [0.194, 0.8262, 0.2512, 0.8412]}, {"w": "at", "b": [0.2573, 0.8262, 0.2739, 0.8412]}, {"w": "once.", "b": [0.2801, 0.8262, 0.3215, 0.8412]}, {"w": "Experiment", "b": [0.3298, 0.8262, 0.425, 0.8412]}, {"w": "to", "b": [0.4311, 0.8262, 0.4477, 0.8412]}, {"w": "find", "b": [0.4539, 0.8262, 0.485, 0.8412]}, {"w": "the", "b": [0.4911, 0.8262, 0.5171, 0.8412]}, {"w": "optimal", "b": [0.5232, 0.8262, 0.5854, 0.8412]}, {"w": "batch", "b": [0.5916, 0.8262, 0.6367, 0.8412]}, {"w": "size", "b": [0.6428, 0.8262, 0.672, 0.8412]}, {"w": "for", "b": [0.6782, 0.8262, 0.7005, 0.8412]}, {"w": "speed.", "b": [0.7067, 0.8262, 0.7571, 0.8412]}, {"w": "Typical", "b": [0.7653, 0.8262, 0.8265, 0.8412]}, {"w": "sizes", "b": [0.8326, 0.8262, 0.8692, 0.8412]}, {"w": "are", "b": [0.1312, 0.8442, 0.1559, 0.8592]}, {"w": "powers", "b": [0.162, 0.8442, 0.2171, 0.8592]}, {"w": "of", "b": [0.2232, 0.8442, 0.2381, 0.8592]}, {"w": "two:", "b": [0.2442, 0.8442, 0.2781, 0.8592]}, {"w": "32,", "b": [0.2862, 0.8442, 0.3098, 0.8592]}, {"w": "64,", "b": [0.3159, 0.8442, 0.3395, 0.8592]}, {"w": "128,", "b": [0.3457, 0.8442, 0.3785, 0.8592]}, {"w": "etc.", "b": [0.3846, 0.8442, 0.4133, 0.8592]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "6", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 270, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "The outputs for the batch are usually saved to the database, as opposed to sending them to specific consumers. You would use the batch mode to:", "words": [{"w": "The", "b": [0.1306, 0.0884, 0.1621, 0.1033]}, {"w": "outputs", "b": [0.1683, 0.0884, 0.2294, 0.1033]}, {"w": "for", "b": [0.2355, 0.0884, 0.2575, 0.1033]}, {"w": "the", "b": [0.2636, 0.0884, 0.289, 0.1033]}, {"w": "batch", "b": [0.2952, 0.0884, 0.3394, 0.1033]}, {"w": "are", "b": [0.3456, 0.0884, 0.3701, 0.1033]}, {"w": "usually", "b": [0.3762, 0.0884, 0.4328, 0.1033]}, {"w": "saved", "b": [0.4389, 0.0884, 0.4823, 0.1033]}, {"w": "to", "b": [0.4884, 0.0884, 0.5047, 0.1033]}, {"w": "the", "b": [0.5108, 0.0884, 0.5363, 0.1033]}, {"w": "database,", "b": [0.5424, 0.0884, 0.6178, 0.1033]}, {"w": "as", "b": [0.6239, 0.0884, 0.6403, 0.1033]}, {"w": "opposed", "b": [0.6465, 0.0884, 0.7112, 0.1033]}, {"w": "to", "b": [0.7173, 0.0884, 0.7336, 0.1033]}, {"w": "sending", "b": [0.7397, 0.0884, 0.7999, 0.1033]}, {"w": "them", "b": [0.806, 0.0884, 0.8467, 0.1033]}, {"w": "to", "b": [0.8528, 0.0884, 0.8691, 0.1033]}, {"w": "specific", "b": [0.1312, 0.1063, 0.1893, 0.1213]}, {"w": "consumers.", "b": [0.1955, 0.1063, 0.2839, 0.1213]}, {"w": "You", "b": [0.2921, 0.1063, 0.3239, 0.1213]}, {"w": "would", "b": [0.33, 0.1063, 0.3777, 0.1213]}, {"w": "use", "b": [0.3839, 0.1063, 0.4096, 0.1213]}, {"w": "the", "b": [0.4158, 0.1063, 0.4414, 0.1213]}, {"w": "batch", "b": [0.4476, 0.1063, 0.4922, 0.1213]}, {"w": "mode", "b": [0.4983, 0.1063, 0.5419, 0.1213]}, {"w": "to:", "b": [0.548, 0.1063, 0.5696, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "• generate the list of weekly recommendations of new songs to all users of a music streaming service, • classify the flow of incoming comments to online news articles and blog posts as spam or not spam, • extract named entities from documents indexed by a search engine, and so on.", "words": [{"w": "•", "b": [0.1538, 0.1333, 0.1681, 0.1482]}, {"w": "generate", "b": [0.1774, 0.1331, 0.2465, 0.1482]}, {"w": "the", "b": [0.2548, 0.1331, 0.281, 0.1482]}, {"w": "list", "b": [0.2893, 0.1331, 0.3145, 0.1482]}, {"w": "of", "b": [0.3229, 0.1331, 0.3381, 0.1482]}, {"w": "weekly", "b": [0.3464, 0.1331, 0.4014, 0.1482]}, {"w": "recommendations", "b": [0.4097, 0.1331, 0.5532, 0.1482]}, {"w": "of", "b": [0.5615, 0.1331, 0.5767, 0.1482]}, {"w": "new", "b": [0.5851, 0.1331, 0.6175, 0.1482]}, {"w": "songs", "b": [0.6258, 0.1331, 0.67, 0.1482]}, {"w": "to", "b": [0.6784, 0.1331, 0.6951, 0.1482]}, {"w": "all", "b": [0.7034, 0.1331, 0.7233, 0.1482]}, {"w": "users", "b": [0.7317, 0.1331, 0.7727, 0.1482]}, {"w": "of", "b": [0.7811, 0.1331, 0.7963, 0.1482]}, {"w": "a", "b": [0.8046, 0.1331, 0.8141, 0.1482]}, {"w": "music", "b": [0.8224, 0.1331, 0.8691, 0.1482]}, {"w": "streaming", "b": [0.1774, 0.1512, 0.2565, 0.1662]}, {"w": "service,", "b": [0.2626, 0.1512, 0.3218, 0.1662]}, {"w": "•", "b": [0.1538, 0.1692, 0.1681, 0.1841]}, {"w": "classify", "b": [0.1774, 0.1692, 0.2347, 0.1841]}, {"w": "the", "b": [0.2408, 0.1692, 0.2663, 0.1841]}, {"w": "flow", "b": [0.2725, 0.1692, 0.3046, 0.1841]}, {"w": "of", "b": [0.3107, 0.1692, 0.3255, 0.1841]}, {"w": "incoming", "b": [0.3317, 0.1692, 0.404, 0.1841]}, {"w": "comments", "b": [0.4102, 0.1692, 0.4903, 0.1841]}, {"w": "to", "b": [0.4965, 0.1692, 0.5128, 0.1841]}, {"w": "online", "b": [0.5189, 0.1692, 0.5669, 0.1841]}, {"w": "news", "b": [0.573, 0.1692, 0.6119, 0.1841]}, {"w": "articles", "b": [0.618, 0.1692, 0.6753, 0.1841]}, {"w": "and", "b": [0.6814, 0.1692, 0.711, 0.1841]}, {"w": "blog", "b": [0.7172, 0.1692, 0.7508, 0.1841]}, {"w": "posts", "b": [0.7569, 0.1692, 0.7984, 0.1841]}, {"w": "as", "b": [0.8046, 0.1692, 0.821, 0.1841]}, {"w": "spam", "b": [0.8272, 0.1692, 0.8691, 0.1841]}, {"w": "or", "b": [0.1774, 0.1871, 0.1938, 0.2021]}, {"w": "not", "b": [0.2, 0.1871, 0.2266, 0.2021]}, {"w": "spam,", "b": [0.2328, 0.1871, 0.28, 0.2021]}, {"w": "•", "b": [0.1538, 0.205, 0.1681, 0.22]}, {"w": "extract", "b": [0.1774, 0.205, 0.2343, 0.22]}, {"w": "named", "b": [0.2405, 0.205, 0.2938, 0.22]}, {"w": "entities", "b": [0.2999, 0.205, 0.358, 0.22]}, {"w": "from", "b": [0.3642, 0.205, 0.4016, 0.22]}, {"w": "documents", "b": [0.4078, 0.205, 0.494, 0.22]}, {"w": "indexed", "b": [0.5002, 0.205, 0.5622, 0.22]}, {"w": "by", "b": [0.5684, 0.205, 0.5879, 0.22]}, {"w": "a", "b": [0.594, 0.205, 0.6032, 0.22]}, {"w": "search", "b": [0.6094, 0.205, 0.6593, 0.22]}, {"w": "engine,", "b": [0.6654, 0.205, 0.7219, 0.22]}, {"w": "and", "b": [0.728, 0.205, 0.7577, 0.22]}, {"w": "so", "b": [0.7639, 0.205, 0.7804, 0.22]}, {"w": "on.", "b": [0.7866, 0.205, 0.8112, 0.22]}]}, {"id": "b_2", "type": "paragraph", "text": "9.2.2 Serving on Demand to a Human", "words": [{"w": "9.2.2", "b": [0.1312, 0.2529, 0.1749, 0.2678]}, {"w": "Serving", "b": [0.1961, 0.2529, 0.2658, 0.2678]}, {"w": "on", "b": [0.2729, 0.2529, 0.2953, 0.2678]}, {"w": "Demand", "b": [0.3024, 0.2529, 0.3799, 0.2678]}, {"w": "to", "b": [0.387, 0.2529, 0.4059, 0.2678]}, {"w": "a", "b": [0.4129, 0.2529, 0.4232, 0.2678]}, {"w": "Human", "b": [0.4303, 0.2529, 0.4985, 0.2678]}]}, {"id": "b_3", "type": "paragraph", "text": "The six steps of serving the model on demand to a human are as follows:", "words": [{"w": "The", "b": [0.1306, 0.2895, 0.1624, 0.3044]}, {"w": "six", "b": [0.1685, 0.2895, 0.1907, 0.3044]}, {"w": "steps", "b": [0.1968, 0.2895, 0.237, 0.3044]}, {"w": "of", "b": [0.2432, 0.2895, 0.2581, 0.3044]}, {"w": "serving", "b": [0.2642, 0.2895, 0.3213, 0.3044]}, {"w": "the", "b": [0.3274, 0.2895, 0.3531, 0.3044]}, {"w": "model", "b": [0.3592, 0.2895, 0.4079, 0.3044]}, {"w": "on", "b": [0.414, 0.2894, 0.4364, 0.3044]}, {"w": "demand", "b": [0.4435, 0.2894, 0.5166, 0.3044]}, {"w": "to", "b": [0.5227, 0.2895, 0.5391, 0.3044]}, {"w": "a", "b": [0.5453, 0.2895, 0.5545, 0.3044]}, {"w": "human", "b": [0.5606, 0.2895, 0.6155, 0.3044]}, {"w": "are", "b": [0.6216, 0.2895, 0.6463, 0.3044]}, {"w": "as", "b": [0.6524, 0.2895, 0.669, 0.3044]}, {"w": "follows:", "b": [0.6751, 0.2895, 0.7347, 0.3044]}]}, {"id": "b_4", "type": "paragraph", "text": "1) validate the request, 2) gather the context, 3) transform the context into model input, 4) apply the model to the input, and get the output, 5) make sure that the output makes sense, 6) present the output to the user.", "words": [{"w": "1)", "b": [0.1517, 0.3164, 0.1681, 0.3313]}, {"w": "validate", "b": [0.1774, 0.3164, 0.2404, 0.3313]}, {"w": "the", "b": [0.2466, 0.3164, 0.2722, 0.3313]}, {"w": "request,", "b": [0.2784, 0.3164, 0.3416, 0.3313]}, {"w": "2)", "b": [0.1517, 0.3343, 0.1681, 0.3493]}, {"w": "gather", "b": [0.1774, 0.3343, 0.2287, 0.3493]}, {"w": "the", "b": [0.2348, 0.3343, 0.2605, 0.3493]}, {"w": "context,", "b": [0.2666, 0.3343, 0.3312, 0.3493]}, {"w": "3)", "b": [0.1517, 0.3523, 0.1681, 0.3672]}, {"w": "transform", "b": [0.1774, 0.3523, 0.256, 0.3672]}, {"w": "the", "b": [0.2622, 0.3523, 0.2878, 0.3672]}, {"w": "context", "b": [0.2939, 0.3523, 0.3534, 0.3672]}, {"w": "into", "b": [0.3596, 0.3523, 0.3909, 0.3672]}, {"w": "model", "b": [0.397, 0.3523, 0.4457, 0.3672]}, {"w": "input,", "b": [0.4518, 0.3523, 0.5001, 0.3672]}, {"w": "4)", "b": [0.1517, 0.3702, 0.1681, 0.3852]}, {"w": "apply", "b": [0.1774, 0.3702, 0.222, 0.3852]}, {"w": "the", "b": [0.2281, 0.3702, 0.2538, 0.3852]}, {"w": "model", "b": [0.2599, 0.3702, 0.3086, 0.3852]}, {"w": "to", "b": [0.3148, 0.3702, 0.3312, 0.3852]}, {"w": "the", "b": [0.3373, 0.3702, 0.363, 0.3852]}, {"w": "input,", "b": [0.3691, 0.3702, 0.4173, 0.3852]}, {"w": "and", "b": [0.4235, 0.3702, 0.4532, 0.3852]}, {"w": "get", "b": [0.4593, 0.3702, 0.4839, 0.3852]}, {"w": "the", "b": [0.4901, 0.3702, 0.5158, 0.3852]}, {"w": "output,", "b": [0.5219, 0.3702, 0.5814, 0.3852]}, {"w": "5)", "b": [0.1517, 0.3882, 0.1681, 0.4031]}, {"w": "make", "b": [0.1774, 0.3882, 0.2194, 0.4031]}, {"w": "sure", "b": [0.2255, 0.3882, 0.2585, 0.4031]}, {"w": "that", "b": [0.2647, 0.3882, 0.2985, 0.4031]}, {"w": "the", "b": [0.3047, 0.3882, 0.3303, 0.4031]}, {"w": "output", "b": [0.3364, 0.3882, 0.3908, 0.4031]}, {"w": "makes", "b": [0.3969, 0.3882, 0.4463, 0.4031]}, {"w": "sense,", "b": [0.4524, 0.3882, 0.4988, 0.4031]}, {"w": "6)", "b": [0.1517, 0.4061, 0.1681, 0.4211]}, {"w": "present", "b": [0.1774, 0.4061, 0.2355, 0.4211]}, {"w": "the", "b": [0.2416, 0.4061, 0.2673, 0.4211]}, {"w": "output", "b": [0.2734, 0.4061, 0.3278, 0.4211]}, {"w": "to", "b": [0.3339, 0.4061, 0.3503, 0.4211]}, {"w": "the", "b": [0.3565, 0.4061, 0.3821, 0.4211]}, {"w": "user.", "b": [0.3883, 0.4061, 0.4264, 0.4211]}]}, {"id": "b_5", "type": "paragraph", "text": "Before running a model in production for a request coming from a user, it might be necessary to verify whether that user has the correct permissions for this model.", "words": [{"w": "Before", "b": [0.1312, 0.4332, 0.1818, 0.448]}, {"w": "running", "b": [0.1875, 0.4332, 0.2488, 0.448]}, {"w": "a", "b": [0.2545, 0.4332, 0.2636, 0.448]}, {"w": "model", "b": [0.2693, 0.4332, 0.317, 0.448]}, {"w": "in", "b": [0.3227, 0.4332, 0.3378, 0.448]}, {"w": "production", "b": [0.3435, 0.4332, 0.4295, 0.448]}, {"w": "for", "b": [0.4352, 0.4332, 0.4568, 0.448]}, {"w": "a", "b": [0.4625, 0.4332, 0.4716, 0.448]}, {"w": "request", "b": [0.4773, 0.4332, 0.5342, 0.448]}, {"w": "coming", "b": [0.5399, 0.4332, 0.5962, 0.448]}, {"w": "from", "b": [0.6019, 0.4332, 0.6386, 0.448]}, {"w": "a", "b": [0.6443, 0.4332, 0.6533, 0.448]}, {"w": "user,", "b": [0.6591, 0.4332, 0.6964, 0.448]}, {"w": "it", "b": [0.7022, 0.4332, 0.7143, 0.448]}, {"w": "might", "b": [0.7199, 0.4332, 0.7656, 0.448]}, {"w": "be", "b": [0.7713, 0.4332, 0.79, 0.448]}, {"w": "necessary", "b": [0.7956, 0.4332, 0.8698, 0.448]}, {"w": "to", "b": [0.1312, 0.451, 0.1476, 0.466]}, {"w": "verify", "b": [0.1538, 0.451, 0.199, 0.466]}, {"w": "whether", "b": [0.2051, 0.451, 0.2698, 0.466]}, {"w": "that", "b": [0.2759, 0.451, 0.3098, 0.466]}, {"w": "user", "b": [0.3159, 0.451, 0.3489, 0.466]}, {"w": "has", "b": [0.355, 0.451, 0.3818, 0.466]}, {"w": "the", "b": [0.388, 0.451, 0.4136, 0.466]}, {"w": "correct", "b": [0.4198, 0.451, 0.4753, 0.466]}, {"w": "permissions", "b": [0.4814, 0.451, 0.5746, 0.466]}, {"w": "for", "b": [0.5807, 0.451, 0.6028, 0.466]}, {"w": "this", "b": [0.609, 0.451, 0.6388, 0.466]}, {"w": "model.", "b": [0.645, 0.451, 0.6988, 0.466]}]}, {"id": "b_6", "type": "paragraph", "text": "The context represents the user’s situation when they send a request to the machine learning system, and in which the user will receive the system’s response.", "words": [{"w": "The", "b": [0.1306, 0.478, 0.1617, 0.4928]}, {"w": "context", "b": [0.167, 0.4779, 0.2356, 0.4928]}, {"w": "represents", "b": [0.2409, 0.478, 0.3201, 0.4928]}, {"w": "the", "b": [0.3254, 0.478, 0.3506, 0.4928]}, {"w": "user’s", "b": [0.3558, 0.478, 0.4003, 0.4928]}, {"w": "situation", "b": [0.4056, 0.478, 0.4751, 0.4928]}, {"w": "when", "b": [0.4804, 0.478, 0.5215, 0.4928]}, {"w": "they", "b": [0.5268, 0.478, 0.5615, 0.4928]}, {"w": "send", "b": [0.5668, 0.478, 0.6021, 0.4928]}, {"w": "a", "b": [0.6074, 0.478, 0.6164, 0.4928]}, {"w": "request", "b": [0.6217, 0.478, 0.6786, 0.4928]}, {"w": "to", "b": [0.6839, 0.478, 0.7, 0.4928]}, {"w": "the", "b": [0.7053, 0.478, 0.7304, 0.4928]}, {"w": "machine", "b": [0.7357, 0.478, 0.8005, 0.4928]}, {"w": "learning", "b": [0.8058, 0.478, 0.8691, 0.4928]}, {"w": "system,", "b": [0.1312, 0.4959, 0.1914, 0.5108]}, {"w": "and", "b": [0.1976, 0.4959, 0.2273, 0.5108]}, {"w": "in", "b": [0.2335, 0.4959, 0.2488, 0.5108]}, {"w": "which", "b": [0.255, 0.4959, 0.3017, 0.5108]}, {"w": "the", "b": [0.3078, 0.4959, 0.3335, 0.5108]}, {"w": "user", "b": [0.3396, 0.4959, 0.3726, 0.5108]}, {"w": "will", "b": [0.3787, 0.4959, 0.4074, 0.5108]}, {"w": "receive", "b": [0.4136, 0.4959, 0.468, 0.5108]}, {"w": "the", "b": [0.4742, 0.4959, 0.4998, 0.5108]}, {"w": "system’s", "b": [0.506, 0.4959, 0.5734, 0.5108]}, {"w": "response.", "b": [0.5796, 0.4959, 0.6532, 0.5108]}]}, {"id": "b_7", "type": "paragraph", "text": "The user can send the request to the machine learning system explicitly or implicitly. An exam- ple of an explicit request is when a music-streaming service’s user requests recommendations for similar songs to a given song. On the other hand, an implicit request is sent by a direct messenger application for suggested replies to the most recent message received by the user.", "words": [{"w": "The", "b": [0.1306, 0.5229, 0.1617, 0.5377]}, {"w": "user", "b": [0.1663, 0.5229, 0.1986, 0.5377]}, {"w": "can", "b": [0.2033, 0.5229, 0.2304, 0.5377]}, {"w": "send", "b": [0.235, 0.5229, 0.2703, 0.5377]}, {"w": "the", "b": [0.2749, 0.5229, 0.3, 0.5377]}, {"w": "request", "b": [0.3046, 0.5229, 0.3616, 0.5377]}, {"w": "to", "b": [0.3662, 0.5229, 0.3822, 0.5377]}, {"w": "the", "b": [0.3869, 0.5229, 0.412, 0.5377]}, {"w": "machine", "b": [0.4166, 0.5229, 0.4814, 0.5377]}, {"w": "learning", "b": [0.486, 0.5229, 0.5494, 0.5377]}, {"w": "system", "b": [0.554, 0.5229, 0.6079, 0.5377]}, {"w": "explicitly", "b": [0.6125, 0.5229, 0.6849, 0.5377]}, {"w": "or", "b": [0.6895, 0.5229, 0.7056, 0.5377]}, {"w": "implicitly.", "b": [0.7102, 0.5229, 0.7886, 0.5377]}, {"w": "An", "b": [0.7963, 0.5229, 0.8199, 0.5377]}, {"w": "exam-", "b": [0.8245, 0.5229, 0.8722, 0.5377]}, {"w": "ple", "b": [0.1312, 0.5408, 0.1545, 0.5557]}, {"w": "of", "b": [0.1606, 0.5408, 0.1752, 0.5557]}, {"w": "an", "b": [0.1814, 0.5408, 0.2005, 0.5557]}, {"w": "explicit", "b": [0.2066, 0.5408, 0.2647, 0.5557]}, {"w": "request", "b": [0.2708, 0.5408, 0.328, 0.5557]}, {"w": "is", "b": [0.3341, 0.5408, 0.3464, 0.5557]}, {"w": "when", "b": [0.3525, 0.5408, 0.3939, 0.5557]}, {"w": "a", "b": [0.4, 0.5408, 0.4091, 0.5557]}, {"w": "music-streaming", "b": [0.4152, 0.5408, 0.5441, 0.5557]}, {"w": "service’s", "b": [0.5502, 0.5408, 0.6156, 0.5557]}, {"w": "user", "b": [0.6217, 0.5408, 0.6542, 0.5557]}, {"w": "requests", "b": [0.6603, 0.5408, 0.7247, 0.5557]}, {"w": "recommendations", "b": [0.7308, 0.5408, 0.8692, 0.5557]}, {"w": "for", "b": [0.1312, 0.5587, 0.1534, 0.5736]}, {"w": "similar", "b": [0.1595, 0.5587, 0.2141, 0.5736]}, {"w": "songs", "b": [0.2202, 0.5587, 0.2635, 0.5736]}, {"w": "to", "b": [0.2697, 0.5587, 0.2861, 0.5736]}, {"w": "a", "b": [0.2923, 0.5587, 0.3015, 0.5736]}, {"w": "given", "b": [0.3076, 0.5587, 0.3497, 0.5736]}, {"w": "song.", "b": [0.3559, 0.5587, 0.397, 0.5736]}, {"w": "On", "b": [0.4052, 0.5587, 0.4299, 0.5736]}, {"w": "the", "b": [0.436, 0.5587, 0.4617, 0.5736]}, {"w": "other", "b": [0.4678, 0.5587, 0.51, 0.5736]}, {"w": "hand,", "b": [0.5161, 0.5587, 0.5613, 0.5736]}, {"w": "an", "b": [0.5674, 0.5587, 0.5869, 0.5736]}, {"w": "implicit", "b": [0.5931, 0.5587, 0.6547, 0.5736]}, {"w": "request", "b": [0.6608, 0.5587, 0.719, 0.5736]}, {"w": "is", "b": [0.7252, 0.5587, 0.7376, 0.5736]}, {"w": "sent", "b": [0.7437, 0.5587, 0.7762, 0.5736]}, {"w": "by", "b": [0.7823, 0.5587, 0.8018, 0.5736]}, {"w": "a", "b": [0.808, 0.5587, 0.8172, 0.5736]}, {"w": "direct", "b": [0.8234, 0.5587, 0.8696, 0.5736]}, {"w": "messenger", "b": [0.1312, 0.5766, 0.2123, 0.5916]}, {"w": "application", "b": [0.2184, 0.5766, 0.3074, 0.5916]}, {"w": "for", "b": [0.3135, 0.5766, 0.3355, 0.5916]}, {"w": "suggested", "b": [0.3417, 0.5766, 0.4186, 0.5916]}, {"w": "replies", "b": [0.4247, 0.5766, 0.476, 0.5916]}, {"w": "to", "b": [0.4821, 0.5766, 0.4985, 0.5916]}, {"w": "the", "b": [0.5046, 0.5766, 0.5302, 0.5916]}, {"w": "most", "b": [0.5363, 0.5766, 0.5752, 0.5916]}, {"w": "recent", "b": [0.5814, 0.5766, 0.63, 0.5916]}, {"w": "message", "b": [0.6361, 0.5766, 0.7008, 0.5916]}, {"w": "received", "b": [0.7069, 0.5766, 0.7714, 0.5916]}, {"w": "by", "b": [0.7775, 0.5766, 0.7969, 0.5916]}, {"w": "the", "b": [0.8031, 0.5766, 0.8286, 0.5916]}, {"w": "user.", "b": [0.8348, 0.5766, 0.8728, 0.5916]}]}, {"id": "b_8", "type": "paragraph", "text": "A good context may be collected in real or near-real time. It will contain the information needed by the feature extractor to generate all the feature values the model expects. It also contains enough information for debugging, is compact enough to be saved in a log, and contains information that will be used to improve the model over time.", "words": [{"w": "A", "b": [0.1305, 0.6034, 0.1446, 0.6185]}, {"w": "good", "b": [0.1509, 0.6034, 0.1906, 0.6185]}, {"w": "context", "b": [0.1969, 0.6034, 0.2576, 0.6185]}, {"w": "may", "b": [0.2639, 0.6034, 0.2984, 0.6185]}, {"w": "be", "b": [0.3047, 0.6034, 0.324, 0.6185]}, {"w": "collected", "b": [0.3303, 0.6034, 0.4015, 0.6185]}, {"w": "in", "b": [0.4077, 0.6034, 0.4234, 0.6185]}, {"w": "real", "b": [0.4297, 0.6034, 0.4601, 0.6185]}, {"w": "or", "b": [0.4664, 0.6034, 0.4832, 0.6185]}, {"w": "near-real", "b": [0.4895, 0.6034, 0.5618, 0.6185]}, {"w": "time.", "b": [0.568, 0.6034, 0.6099, 0.6185]}, {"w": "It", "b": [0.6185, 0.6034, 0.6326, 0.6185]}, {"w": "will", "b": [0.6389, 0.6034, 0.6682, 0.6185]}, {"w": "contain", "b": [0.6744, 0.6034, 0.7346, 0.6185]}, {"w": "the", "b": [0.7409, 0.6034, 0.767, 0.6185]}, {"w": "information", "b": [0.7733, 0.6034, 0.8691, 0.6185]}, {"w": "needed", "b": [0.1312, 0.6215, 0.1863, 0.6364]}, {"w": "by", "b": [0.1924, 0.6215, 0.2118, 0.6364]}, {"w": "the", "b": [0.2179, 0.6215, 0.2434, 0.6364]}, {"w": "feature", "b": [0.2496, 0.6215, 0.3052, 0.6364]}, {"w": "extractor", "b": [0.3113, 0.6215, 0.3843, 0.6364]}, {"w": "to", "b": [0.3904, 0.6215, 0.4067, 0.6364]}, {"w": "generate", "b": [0.4129, 0.6215, 0.4802, 0.6364]}, {"w": "all", "b": [0.4863, 0.6215, 0.5057, 0.6364]}, {"w": "the", "b": [0.5119, 0.6215, 0.5373, 0.6364]}, {"w": "feature", "b": [0.5435, 0.6215, 0.5991, 0.6364]}, {"w": "values", "b": [0.6052, 0.6215, 0.6538, 0.6364]}, {"w": "the", "b": [0.6599, 0.6215, 0.6854, 0.6364]}, {"w": "model", "b": [0.6915, 0.6215, 0.7399, 0.6364]}, {"w": "expects.", "b": [0.7461, 0.6215, 0.8104, 0.6364]}, {"w": "It", "b": [0.8186, 0.6215, 0.8324, 0.6364]}, {"w": "also", "b": [0.8385, 0.6215, 0.8692, 0.6364]}, {"w": "contains", "b": [0.1312, 0.6393, 0.1988, 0.6544]}, {"w": "enough", "b": [0.2058, 0.6393, 0.2644, 0.6544]}, {"w": "information", "b": [0.2714, 0.6393, 0.3672, 0.6544]}, {"w": "for", "b": [0.3742, 0.6393, 0.3968, 0.6544]}, {"w": "debugging,", "b": [0.4038, 0.6393, 0.4927, 0.6544]}, {"w": "is", "b": [0.5, 0.6393, 0.5126, 0.6544]}, {"w": "compact", "b": [0.5196, 0.6393, 0.5887, 0.6544]}, {"w": "enough", "b": [0.5957, 0.6393, 0.6543, 0.6544]}, {"w": "to", "b": [0.6613, 0.6393, 0.678, 0.6544]}, {"w": "be", "b": [0.6851, 0.6393, 0.7044, 0.6544]}, {"w": "saved", "b": [0.7114, 0.6393, 0.756, 0.6544]}, {"w": "in", "b": [0.7631, 0.6393, 0.7788, 0.6544]}, {"w": "a", "b": [0.7858, 0.6393, 0.7952, 0.6544]}, {"w": "log,", "b": [0.8022, 0.6393, 0.8315, 0.6544]}, {"w": "and", "b": [0.8387, 0.6393, 0.8691, 0.6544]}, {"w": "contains", "b": [0.1312, 0.6574, 0.1975, 0.6723]}, {"w": "information", "b": [0.2036, 0.6574, 0.2975, 0.6723]}, {"w": "that", "b": [0.3036, 0.6574, 0.3375, 0.6723]}, {"w": "will", "b": [0.3436, 0.6574, 0.3723, 0.6723]}, {"w": "be", "b": [0.3785, 0.6574, 0.3975, 0.6723]}, {"w": "used", "b": [0.4036, 0.6574, 0.4396, 0.6723]}, {"w": "to", "b": [0.4458, 0.6574, 0.4622, 0.6723]}, {"w": "improve", "b": [0.4683, 0.6574, 0.5325, 0.6723]}, {"w": "the", "b": [0.5386, 0.6574, 0.5643, 0.6723]}, {"w": "model", "b": [0.5704, 0.6574, 0.6191, 0.6723]}, {"w": "over", "b": [0.6252, 0.6574, 0.6586, 0.6723]}, {"w": "time.", "b": [0.6648, 0.6574, 0.7058, 0.6723]}]}, {"id": "b_9", "type": "paragraph", "text": "Let’s see examples of a good context for several problems.", "words": [{"w": "Let’s", "b": [0.1312, 0.6843, 0.1706, 0.6993]}, {"w": "see", "b": [0.1767, 0.6843, 0.2004, 0.6993]}, {"w": "examples", "b": [0.2066, 0.6843, 0.28, 0.6993]}, {"w": "of", "b": [0.2862, 0.6843, 0.301, 0.6993]}, {"w": "a", "b": [0.3072, 0.6843, 0.3164, 0.6993]}, {"w": "good", "b": [0.3225, 0.6843, 0.3615, 0.6993]}, {"w": "context", "b": [0.3676, 0.6843, 0.4271, 0.6993]}, {"w": "for", "b": [0.4333, 0.6843, 0.4554, 0.6993]}, {"w": "several", "b": [0.4615, 0.6843, 0.516, 0.6993]}, {"w": "problems.", "b": [0.5222, 0.6843, 0.6003, 0.6993]}]}, {"id": "b_10", "type": "paragraph", "text": "Device malfunctioning", "words": [{"w": "Device", "b": [0.1312, 0.7112, 0.1935, 0.7261]}, {"w": "malfunctioning", "b": [0.2005, 0.7112, 0.3388, 0.7261]}]}, {"id": "b_11", "type": "paragraph", "text": "When detecting device malfunction, a good context contains vibration and noise levels,", "words": [{"w": "When", "b": [0.1764, 0.7293, 0.2233, 0.7441]}, {"w": "detecting", "b": [0.2295, 0.7293, 0.3022, 0.7441]}, {"w": "device", "b": [0.3083, 0.7293, 0.3573, 0.7441]}, {"w": "malfunction,", "b": [0.3634, 0.7293, 0.4628, 0.7441]}, {"w": "a", "b": [0.469, 0.7293, 0.4781, 0.7441]}, {"w": "good", "b": [0.4842, 0.7293, 0.5226, 0.7441]}, {"w": "context", "b": [0.5287, 0.7293, 0.5873, 0.7441]}, {"w": "contains", "b": [0.5934, 0.7293, 0.6586, 0.7441]}, {"w": "vibration", "b": [0.6648, 0.7293, 0.737, 0.7441]}, {"w": "and", "b": [0.7431, 0.7293, 0.7724, 0.7441]}, {"w": "noise", "b": [0.7785, 0.7293, 0.818, 0.7441]}, {"w": "levels,", "b": [0.8242, 0.7293, 0.8717, 0.7441]}]}, {"id": "b_12", "type": "paragraph", "text": "the task executed by the device, the user ID, the firmware version, the time passed since manufacturing and the last maintenance, and the number of uses since manufacturing and the last maintenance.", "words": [{"w": "the", "b": [0.1774, 0.7472, 0.2025, 0.762]}, {"w": "task", "b": [0.2078, 0.7472, 0.2406, 0.762]}, {"w": "executed", "b": [0.2459, 0.7472, 0.3147, 0.762]}, {"w": "by", "b": [0.3201, 0.7472, 0.3392, 0.762]}, {"w": "the", "b": [0.3445, 0.7472, 0.3696, 0.762]}, {"w": "device,", "b": [0.3749, 0.7472, 0.4287, 0.762]}, {"w": "the", "b": [0.4342, 0.7472, 0.4593, 0.762]}, {"w": "user", "b": [0.4647, 0.7472, 0.497, 0.762]}, {"w": "ID,", "b": [0.5023, 0.7472, 0.5277, 0.762]}, {"w": "the", "b": [0.533, 0.7472, 0.5581, 0.762]}, {"w": "firmware", "b": [0.5635, 0.7472, 0.6319, 0.762]}, {"w": "version,", "b": [0.6372, 0.7472, 0.6976, 0.762]}, {"w": "the", "b": [0.7031, 0.7472, 0.7282, 0.762]}, {"w": "time", "b": [0.7336, 0.7472, 0.7687, 0.762]}, {"w": "passed", "b": [0.7741, 0.7472, 0.8255, 0.762]}, {"w": "since", "b": [0.8309, 0.7472, 0.8692, 0.762]}, {"w": "manufacturing", "b": [0.1774, 0.7651, 0.2936, 0.78]}, {"w": "and", "b": [0.2998, 0.7651, 0.3293, 0.78]}, {"w": "the", "b": [0.3355, 0.7651, 0.361, 0.78]}, {"w": "last", "b": [0.3672, 0.7651, 0.3958, 0.78]}, {"w": "maintenance,", "b": [0.402, 0.7651, 0.5075, 0.78]}, {"w": "and", "b": [0.5136, 0.7651, 0.5432, 0.78]}, {"w": "the", "b": [0.5494, 0.7651, 0.5749, 0.78]}, {"w": "number", "b": [0.581, 0.7651, 0.6417, 0.78]}, {"w": "of", "b": [0.6479, 0.7651, 0.6627, 0.78]}, {"w": "uses", "b": [0.6688, 0.7651, 0.7017, 0.78]}, {"w": "since", "b": [0.7079, 0.7651, 0.7467, 0.78]}, {"w": "manufacturing", "b": [0.7529, 0.7651, 0.8691, 0.78]}, {"w": "and", "b": [0.1774, 0.783, 0.2071, 0.798]}, {"w": "the", "b": [0.2132, 0.783, 0.2389, 0.798]}, {"w": "last", "b": [0.245, 0.783, 0.2738, 0.798]}, {"w": "maintenance.", "b": [0.28, 0.783, 0.3861, 0.798]}]}, {"id": "b_13", "type": "paragraph", "text": "Emergency room hospitalization", "words": [{"w": "Emergency", "b": [0.1312, 0.8099, 0.2341, 0.8249]}, {"w": "room", "b": [0.2411, 0.8099, 0.2894, 0.8249]}, {"w": "hospitalization", "b": [0.2964, 0.8099, 0.4316, 0.8249]}]}, {"id": "b_14", "type": "paragraph", "text": "To decide whether the new patient should be admitted to an intensive care unit, a good context would include age, blood pressure, temperature, heart rate, pulse oximetry", "words": [{"w": "To", "b": [0.1767, 0.828, 0.1972, 0.8428]}, {"w": "decide", "b": [0.2029, 0.828, 0.2522, 0.8428]}, {"w": "whether", "b": [0.2579, 0.828, 0.3212, 0.8428]}, {"w": "the", "b": [0.3269, 0.828, 0.352, 0.8428]}, {"w": "new", "b": [0.3577, 0.828, 0.3888, 0.8428]}, {"w": "patient", "b": [0.3945, 0.828, 0.4503, 0.8428]}, {"w": "should", "b": [0.4559, 0.828, 0.5073, 0.8428]}, {"w": "be", "b": [0.513, 0.828, 0.5316, 0.8428]}, {"w": "admitted", "b": [0.5372, 0.828, 0.6086, 0.8428]}, {"w": "to", "b": [0.6143, 0.828, 0.6303, 0.8428]}, {"w": "an", "b": [0.636, 0.828, 0.6551, 0.8428]}, {"w": "intensive", "b": [0.6608, 0.828, 0.7297, 0.8428]}, {"w": "care", "b": [0.7354, 0.828, 0.7676, 0.8428]}, {"w": "unit,", "b": [0.7732, 0.828, 0.8104, 0.8428]}, {"w": "a", "b": [0.8162, 0.828, 0.8252, 0.8428]}, {"w": "good", "b": [0.8309, 0.828, 0.8691, 0.8428]}, {"w": "context", "b": [0.1774, 0.8457, 0.238, 0.8608]}, {"w": "would", "b": [0.2451, 0.8457, 0.2938, 0.8608]}, {"w": "include", "b": [0.3009, 0.8457, 0.3595, 0.8608]}, {"w": "age,", "b": [0.3666, 0.8457, 0.399, 0.8608]}, {"w": "blood", "b": [0.4063, 0.8457, 0.4523, 0.8608]}, {"w": "pressure,", "b": [0.4594, 0.8457, 0.532, 0.8608]}, {"w": "temperature,", "b": [0.5393, 0.8457, 0.6456, 0.8608]}, {"w": "heart", "b": [0.6529, 0.8457, 0.6959, 0.8608]}, {"w": "rate,", "b": [0.703, 0.8457, 0.7407, 0.8608]}, {"w": "pulse", "b": [0.748, 0.8457, 0.79, 0.8608]}, {"w": "oximetry", "b": [0.7971, 0.8457, 0.8698, 0.8608]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "7", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 271, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "level, complete blood count, chemistry profile, arterial blood gas test, blood alcohol level, medical history, and pregnancy.", "words": [{"w": "level,", "b": [0.1774, 0.0883, 0.2192, 0.1034]}, {"w": "complete", "b": [0.2259, 0.0883, 0.2991, 0.1034]}, {"w": "blood", "b": [0.3057, 0.0883, 0.3517, 0.1034]}, {"w": "count,", "b": [0.3582, 0.0883, 0.409, 0.1034]}, {"w": "chemistry", "b": [0.4156, 0.0883, 0.4953, 0.1034]}, {"w": "profile,", "b": [0.5018, 0.0883, 0.5584, 0.1034]}, {"w": "arterial", "b": [0.565, 0.0883, 0.6248, 0.1034]}, {"w": "blood", "b": [0.6313, 0.0883, 0.6773, 0.1034]}, {"w": "gas", "b": [0.6839, 0.0883, 0.7101, 0.1034]}, {"w": "test,", "b": [0.7167, 0.0883, 0.7523, 0.1034]}, {"w": "blood", "b": [0.759, 0.0883, 0.805, 0.1034]}, {"w": "alcohol", "b": [0.8116, 0.0883, 0.8691, 0.1034]}, {"w": "level,", "b": [0.1774, 0.1063, 0.2184, 0.1213]}, {"w": "medical", "b": [0.2245, 0.1063, 0.2861, 0.1213]}, {"w": "history,", "b": [0.2922, 0.1063, 0.3519, 0.1213]}, {"w": "and", "b": [0.358, 0.1063, 0.3877, 0.1213]}, {"w": "pregnancy.", "b": [0.3939, 0.1063, 0.4801, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "Credit risk assessment", "words": [{"w": "Credit", "b": [0.1312, 0.1332, 0.191, 0.1482]}, {"w": "risk", "b": [0.198, 0.1332, 0.2323, 0.1482]}, {"w": "assessment", "b": [0.2393, 0.1332, 0.3397, 0.1482]}]}, {"id": "b_2", "type": "paragraph", "text": "To make an approval/rejection decision for a credit card application, a good context would include age, education, employment status, country residency status, annual salary, family status, outstanding debts, availability of other credit cards, whether the person is a homeowner or tenant, whether the person has declared bankruptcy, and whether, and how many times, the person missed past credit payments. Even if certain information is not needed for feature extraction, it is still pertinent for logging and debugging: client’s ID, date, and time of the day.", "words": [{"w": "To", "b": [0.1767, 0.1511, 0.1981, 0.1662]}, {"w": "make", "b": [0.2043, 0.1511, 0.2471, 0.1662]}, {"w": "an", "b": [0.2532, 0.1511, 0.2731, 0.1662]}, {"w": "approval/rejection", "b": [0.2792, 0.1511, 0.4292, 0.1662]}, {"w": "decision", "b": [0.4353, 0.1511, 0.5002, 0.1662]}, {"w": "for", "b": [0.5063, 0.1511, 0.5288, 0.1662]}, {"w": "a", "b": [0.535, 0.1511, 0.5444, 0.1662]}, {"w": "credit", "b": [0.5505, 0.1511, 0.5976, 0.1662]}, {"w": "card", "b": [0.6037, 0.1511, 0.6393, 0.1662]}, {"w": "application,", "b": [0.6455, 0.1511, 0.7415, 0.1662]}, {"w": "a", "b": [0.7477, 0.1511, 0.7571, 0.1662]}, {"w": "good", "b": [0.7632, 0.1511, 0.8028, 0.1662]}, {"w": "context", "b": [0.809, 0.1511, 0.8696, 0.1662]}, {"w": "would", "b": [0.1767, 0.169, 0.2253, 0.1841]}, {"w": "include", "b": [0.2325, 0.169, 0.2911, 0.1841]}, {"w": "age,", "b": [0.2982, 0.169, 0.3306, 0.1841]}, {"w": "education,", "b": [0.338, 0.169, 0.4227, 0.1841]}, {"w": "employment", "b": [0.4301, 0.169, 0.53, 0.1841]}, {"w": "status,", "b": [0.5371, 0.169, 0.5917, 0.1841]}, {"w": "country", "b": [0.5991, 0.169, 0.6619, 0.1841]}, {"w": "residency", "b": [0.6691, 0.169, 0.7451, 0.1841]}, {"w": "status,", "b": [0.7522, 0.169, 0.8068, 0.1841]}, {"w": "annual", "b": [0.8142, 0.169, 0.8691, 0.1841]}, {"w": "salary,", "b": [0.1774, 0.1871, 0.2285, 0.202]}, {"w": "family", "b": [0.2346, 0.1871, 0.2845, 0.202]}, {"w": "status,", "b": [0.2907, 0.1871, 0.3439, 0.202]}, {"w": "outstanding", "b": [0.3501, 0.1871, 0.4449, 0.202]}, {"w": "debts,", "b": [0.4511, 0.1871, 0.4991, 0.202]}, {"w": "availability", "b": [0.5053, 0.1871, 0.5929, 0.202]}, {"w": "of", "b": [0.599, 0.1871, 0.6138, 0.202]}, {"w": "other", "b": [0.62, 0.1871, 0.6618, 0.202]}, {"w": "credit", "b": [0.6679, 0.1871, 0.7139, 0.202]}, {"w": "cards,", "b": [0.72, 0.1871, 0.7671, 0.202]}, {"w": "whether", "b": [0.7732, 0.1871, 0.8375, 0.202]}, {"w": "the", "b": [0.8436, 0.1871, 0.8691, 0.202]}, {"w": "person", "b": [0.1774, 0.2049, 0.2314, 0.22]}, {"w": "is", "b": [0.2379, 0.2049, 0.2506, 0.22]}, {"w": "a", "b": [0.2571, 0.2049, 0.2665, 0.22]}, {"w": "homeowner", "b": [0.273, 0.2049, 0.3657, 0.22]}, {"w": "or", "b": [0.3722, 0.2049, 0.3889, 0.22]}, {"w": "tenant,", "b": [0.3955, 0.2049, 0.4536, 0.22]}, {"w": "whether", "b": [0.4602, 0.2049, 0.5261, 0.22]}, {"w": "the", "b": [0.5326, 0.2049, 0.5588, 0.22]}, {"w": "person", "b": [0.5653, 0.2049, 0.6193, 0.22]}, {"w": "has", "b": [0.6259, 0.2049, 0.6532, 0.22]}, {"w": "declared", "b": [0.6597, 0.2049, 0.7278, 0.22]}, {"w": "bankruptcy,", "b": [0.7343, 0.2049, 0.8322, 0.22]}, {"w": "and", "b": [0.8388, 0.2049, 0.8691, 0.22]}, {"w": "whether,", "b": [0.1767, 0.2231, 0.2451, 0.2379]}, {"w": "and", "b": [0.2511, 0.2231, 0.2803, 0.2379]}, {"w": "how", "b": [0.2863, 0.2231, 0.3179, 0.2379]}, {"w": "many", "b": [0.3239, 0.2231, 0.3671, 0.2379]}, {"w": "times,", "b": [0.3731, 0.2231, 0.4205, 0.2379]}, {"w": "the", "b": [0.4265, 0.2231, 0.4516, 0.2379]}, {"w": "person", "b": [0.4576, 0.2231, 0.5096, 0.2379]}, {"w": "missed", "b": [0.5156, 0.2231, 0.568, 0.2379]}, {"w": "past", "b": [0.5741, 0.2231, 0.6073, 0.2379]}, {"w": "credit", "b": [0.6133, 0.2231, 0.6586, 0.2379]}, {"w": "payments.", "b": [0.6646, 0.2231, 0.7446, 0.2379]}, {"w": "Even", "b": [0.7527, 0.2231, 0.7922, 0.2379]}, {"w": "if", "b": [0.7982, 0.2231, 0.8088, 0.2379]}, {"w": "certain", "b": [0.8148, 0.2231, 0.8691, 0.2379]}, {"w": "information", "b": [0.1774, 0.2408, 0.2731, 0.2559]}, {"w": "is", "b": [0.2799, 0.2408, 0.2926, 0.2559]}, {"w": "not", "b": [0.2995, 0.2408, 0.3266, 0.2559]}, {"w": "needed", "b": [0.3335, 0.2408, 0.39, 0.2559]}, {"w": "for", "b": [0.3968, 0.2408, 0.4194, 0.2559]}, {"w": "feature", "b": [0.4262, 0.2408, 0.4833, 0.2559]}, {"w": "extraction,", "b": [0.4901, 0.2408, 0.5786, 0.2559]}, {"w": "it", "b": [0.5856, 0.2408, 0.5981, 0.2559]}, {"w": "is", "b": [0.605, 0.2408, 0.6176, 0.2559]}, {"w": "still", "b": [0.6245, 0.2408, 0.6549, 0.2559]}, {"w": "pertinent", "b": [0.6618, 0.2408, 0.7371, 0.2559]}, {"w": "for", "b": [0.744, 0.2408, 0.7665, 0.2559]}, {"w": "logging", "b": [0.7734, 0.2408, 0.8319, 0.2559]}, {"w": "and", "b": [0.8388, 0.2408, 0.8691, 0.2559]}, {"w": "debugging:", "b": [0.1774, 0.2589, 0.2645, 0.2738]}, {"w": "client’s", "b": [0.2727, 0.2589, 0.3287, 0.2738]}, {"w": "ID,", "b": [0.3349, 0.2589, 0.3608, 0.2738]}, {"w": "date,", "b": [0.3669, 0.2589, 0.4069, 0.2738]}, {"w": "and", "b": [0.4131, 0.2589, 0.4428, 0.2738]}, {"w": "time", "b": [0.4489, 0.2589, 0.4848, 0.2738]}, {"w": "of", "b": [0.491, 0.2589, 0.5058, 0.2738]}, {"w": "the", "b": [0.512, 0.2589, 0.5377, 0.2738]}, {"w": "day.", "b": [0.5438, 0.2589, 0.5761, 0.2738]}]}, {"id": "b_3", "type": "paragraph", "text": "Advertisement display", "words": [{"w": "Advertisement", "b": [0.1312, 0.2858, 0.2666, 0.3007]}, {"w": "display", "b": [0.2737, 0.2858, 0.3384, 0.3007]}]}, {"id": "b_4", "type": "paragraph", "text": "To decide whether a specific advertisement should be displayed to a website user, a good context would include the webpage title, the user’s position on the web page, the screen resolution, the text on the webpage and the text visible to the user, how the user reached the webpage, and the time spent on it. For logging and debugging purposes, the context might include the browser version, operating system version, connection information, and date and time.", "words": [{"w": "To", "b": [0.1767, 0.3036, 0.1981, 0.3187]}, {"w": "decide", "b": [0.2048, 0.3036, 0.2561, 0.3187]}, {"w": "whether", "b": [0.2628, 0.3036, 0.3287, 0.3187]}, {"w": "a", "b": [0.3354, 0.3036, 0.3448, 0.3187]}, {"w": "specific", "b": [0.3515, 0.3036, 0.4107, 0.3187]}, {"w": "advertisement", "b": [0.4174, 0.3036, 0.5321, 0.3187]}, {"w": "should", "b": [0.5388, 0.3036, 0.5923, 0.3187]}, {"w": "be", "b": [0.5989, 0.3036, 0.6183, 0.3187]}, {"w": "displayed", "b": [0.625, 0.3036, 0.7009, 0.3187]}, {"w": "to", "b": [0.7076, 0.3036, 0.7243, 0.3187]}, {"w": "a", "b": [0.731, 0.3036, 0.7404, 0.3187]}, {"w": "website", "b": [0.7471, 0.3036, 0.8074, 0.3187]}, {"w": "user,", "b": [0.814, 0.3036, 0.8529, 0.3187]}, {"w": "a", "b": [0.8597, 0.3036, 0.8691, 0.3187]}, {"w": "good", "b": [0.1774, 0.3218, 0.2157, 0.3366]}, {"w": "context", "b": [0.2219, 0.3218, 0.2805, 0.3366]}, {"w": "would", "b": [0.2867, 0.3218, 0.3336, 0.3366]}, {"w": "include", "b": [0.3398, 0.3218, 0.3964, 0.3366]}, {"w": "the", "b": [0.4025, 0.3218, 0.4278, 0.3366]}, {"w": "webpage", "b": [0.434, 0.3218, 0.5011, 0.3366]}, {"w": "title,", "b": [0.5073, 0.3218, 0.5446, 0.3366]}, {"w": "the", "b": [0.5508, 0.3218, 0.5761, 0.3366]}, {"w": "user’s", "b": [0.5822, 0.3218, 0.627, 0.3366]}, {"w": "position", "b": [0.6331, 0.3218, 0.6964, 0.3366]}, {"w": "on", "b": [0.7025, 0.3218, 0.7217, 0.3366]}, {"w": "the", "b": [0.7279, 0.3218, 0.7531, 0.3366]}, {"w": "web", "b": [0.7593, 0.3218, 0.7901, 0.3366]}, {"w": "page,", "b": [0.7963, 0.3218, 0.8377, 0.3366]}, {"w": "the", "b": [0.8439, 0.3218, 0.8691, 0.3366]}, {"w": "screen", "b": [0.1774, 0.3398, 0.2258, 0.3546]}, {"w": "resolution,", "b": [0.2314, 0.3398, 0.314, 0.3546]}, {"w": "the", "b": [0.3197, 0.3398, 0.3448, 0.3546]}, {"w": "text", "b": [0.3504, 0.3398, 0.3821, 0.3546]}, {"w": "on", "b": [0.3877, 0.3398, 0.4068, 0.3546]}, {"w": "the", "b": [0.4124, 0.3398, 0.4375, 0.3546]}, {"w": "webpage", "b": [0.4431, 0.3398, 0.5099, 0.3546]}, {"w": "and", "b": [0.5155, 0.3398, 0.5447, 0.3546]}, {"w": "the", "b": [0.5503, 0.3398, 0.5754, 0.3546]}, {"w": "text", "b": [0.581, 0.3398, 0.6127, 0.3546]}, {"w": "visible", "b": [0.6183, 0.3398, 0.6681, 0.3546]}, {"w": "to", "b": [0.6737, 0.3398, 0.6898, 0.3546]}, {"w": "the", "b": [0.6954, 0.3398, 0.7205, 0.3546]}, {"w": "user,", "b": [0.7261, 0.3398, 0.7635, 0.3546]}, {"w": "how", "b": [0.7692, 0.3398, 0.8009, 0.3546]}, {"w": "the", "b": [0.8065, 0.3398, 0.8316, 0.3546]}, {"w": "user", "b": [0.8372, 0.3398, 0.8695, 0.3546]}, {"w": "reached", "b": [0.1774, 0.3575, 0.2394, 0.3726]}, {"w": "the", "b": [0.2455, 0.3575, 0.2715, 0.3726]}, {"w": "webpage,", "b": [0.2777, 0.3575, 0.3521, 0.3726]}, {"w": "and", "b": [0.3583, 0.3575, 0.3885, 0.3726]}, {"w": "the", "b": [0.3946, 0.3575, 0.4206, 0.3726]}, {"w": "time", "b": [0.4268, 0.3575, 0.4632, 0.3726]}, {"w": "spent", "b": [0.4694, 0.3575, 0.5132, 0.3726]}, {"w": "on", "b": [0.5194, 0.3575, 0.5391, 0.3726]}, {"w": "it.", "b": [0.5453, 0.3575, 0.563, 0.3726]}, {"w": "For", "b": [0.5712, 0.3575, 0.5986, 0.3726]}, {"w": "logging", "b": [0.6047, 0.3575, 0.663, 0.3726]}, {"w": "and", "b": [0.6691, 0.3575, 0.6993, 0.3726]}, {"w": "debugging", "b": [0.7055, 0.3575, 0.7887, 0.3726]}, {"w": "purposes,", "b": [0.7949, 0.3575, 0.8717, 0.3726]}, {"w": "the", "b": [0.1774, 0.3754, 0.2035, 0.3905]}, {"w": "context", "b": [0.2096, 0.3754, 0.2703, 0.3905]}, {"w": "might", "b": [0.2764, 0.3754, 0.324, 0.3905]}, {"w": "include", "b": [0.3301, 0.3754, 0.3887, 0.3905]}, {"w": "the", "b": [0.3949, 0.3754, 0.421, 0.3905]}, {"w": "browser", "b": [0.4271, 0.3754, 0.4906, 0.3905]}, {"w": "version,", "b": [0.4968, 0.3754, 0.5597, 0.3905]}, {"w": "operating", "b": [0.5658, 0.3754, 0.6438, 0.3905]}, {"w": "system", "b": [0.6499, 0.3754, 0.7061, 0.3905]}, {"w": "version,", "b": [0.7122, 0.3754, 0.7751, 0.3905]}, {"w": "connection", "b": [0.7813, 0.3754, 0.8691, 0.3905]}, {"w": "information,", "b": [0.1774, 0.3935, 0.2764, 0.4084]}, {"w": "and", "b": [0.2825, 0.3935, 0.3122, 0.4084]}, {"w": "date", "b": [0.3184, 0.3935, 0.3533, 0.4084]}, {"w": "and", "b": [0.3594, 0.3935, 0.3892, 0.4084]}, {"w": "time.", "b": [0.3953, 0.3935, 0.4363, 0.4084]}]}, {"id": "b_5", "type": "paragraph", "text": "A feature extractor transforms the context into the model input. Sometimes, the feature extractor is a part of the machine learning pipeline, as we discussed in Section ?? of Chapter 5. However, it’s common to build the feature extractor as a separate object.", "words": [{"w": "A", "b": [0.1305, 0.4204, 0.1444, 0.4354]}, {"w": "feature", "b": [0.1505, 0.4204, 0.2155, 0.4353]}, {"w": "extractor", "b": [0.2226, 0.4204, 0.3078, 0.4353]}, {"w": "transforms", "b": [0.314, 0.4204, 0.3999, 0.4354]}, {"w": "the", "b": [0.406, 0.4204, 0.4317, 0.4354]}, {"w": "context", "b": [0.4378, 0.4204, 0.4973, 0.4354]}, {"w": "into", "b": [0.5034, 0.4204, 0.5347, 0.4354]}, {"w": "the", "b": [0.5408, 0.4204, 0.5665, 0.4354]}, {"w": "model", "b": [0.5726, 0.4204, 0.6213, 0.4354]}, {"w": "input.", "b": [0.6274, 0.4204, 0.6756, 0.4354]}, {"w": "Sometimes,", "b": [0.6838, 0.4204, 0.7752, 0.4354]}, {"w": "the", "b": [0.7813, 0.4204, 0.807, 0.4354]}, {"w": "feature", "b": [0.8131, 0.4204, 0.869, 0.4354]}, {"w": "extractor", "b": [0.1312, 0.4382, 0.2061, 0.4533]}, {"w": "is", "b": [0.2147, 0.4382, 0.2273, 0.4533]}, {"w": "a", "b": [0.2358, 0.4382, 0.2453, 0.4533]}, {"w": "part", "b": [0.2538, 0.4382, 0.2883, 0.4533]}, {"w": "of", "b": [0.2969, 0.4382, 0.3121, 0.4533]}, {"w": "the", "b": [0.3206, 0.4382, 0.3467, 0.4533]}, {"w": "machine", "b": [0.3553, 0.4382, 0.4227, 0.4533]}, {"w": "learning", "b": [0.4313, 0.4382, 0.4972, 0.4533]}, {"w": "pipeline,", "b": [0.5058, 0.4382, 0.5841, 0.4533]}, {"w": "as", "b": [0.5933, 0.4382, 0.6101, 0.4533]}, {"w": "we", "b": [0.6186, 0.4382, 0.6401, 0.4533]}, {"w": "discussed", "b": [0.6486, 0.4382, 0.7243, 0.4533]}, {"w": "in", "b": [0.7328, 0.4382, 0.7485, 0.4533]}, {"w": "Section", "b": [0.757, 0.4382, 0.8167, 0.4533]}, {"w": "??", "b": [0.825, 0.4383, 0.8451, 0.4533]}, {"w": "of", "b": [0.8536, 0.4382, 0.8688, 0.4533]}, {"w": "Chapter", "b": [0.1312, 0.4563, 0.1969, 0.4713]}, {"w": "5.", "b": [0.2031, 0.4563, 0.2174, 0.4713]}, {"w": "However,", "b": [0.2256, 0.4563, 0.299, 0.4713]}, {"w": "it’s", "b": [0.3051, 0.4563, 0.3298, 0.4713]}, {"w": "common", "b": [0.336, 0.4563, 0.4037, 0.4713]}, {"w": "to", "b": [0.4098, 0.4563, 0.4262, 0.4713]}, {"w": "build", "b": [0.4323, 0.4563, 0.4734, 0.4713]}, {"w": "the", "b": [0.4795, 0.4563, 0.5052, 0.4713]}, {"w": "feature", "b": [0.5113, 0.4563, 0.5673, 0.4713]}, {"w": "extractor", "b": [0.5734, 0.4563, 0.6469, 0.4713]}, {"w": "as", "b": [0.653, 0.4563, 0.6695, 0.4713]}, {"w": "a", "b": [0.6757, 0.4563, 0.6849, 0.4713]}, {"w": "separate", "b": [0.691, 0.4563, 0.7578, 0.4713]}, {"w": "object.", "b": [0.764, 0.4563, 0.8184, 0.4713]}]}, {"id": "b_6", "type": "paragraph", "text": "When the result of the scoring is to be served to a human client, it’s rarely presented directly.", "words": [{"w": "When", "b": [0.1303, 0.4833, 0.177, 0.4981]}, {"w": "the", "b": [0.1829, 0.4833, 0.208, 0.4981]}, {"w": "result", "b": [0.2139, 0.4833, 0.2583, 0.4981]}, {"w": "of", "b": [0.2641, 0.4833, 0.2787, 0.4981]}, {"w": "the", "b": [0.2846, 0.4833, 0.3097, 0.4981]}, {"w": "scoring", "b": [0.3156, 0.4833, 0.371, 0.4981]}, {"w": "is", "b": [0.3769, 0.4833, 0.389, 0.4981]}, {"w": "to", "b": [0.3949, 0.4833, 0.411, 0.4981]}, {"w": "be", "b": [0.4168, 0.4833, 0.4355, 0.4981]}, {"w": "served", "b": [0.4413, 0.4833, 0.4907, 0.4981]}, {"w": "to", "b": [0.4966, 0.4833, 0.5127, 0.4981]}, {"w": "a", "b": [0.5185, 0.4833, 0.5276, 0.4981]}, {"w": "human", "b": [0.5334, 0.4833, 0.5872, 0.4981]}, {"w": "client,", "b": [0.5931, 0.4833, 0.6408, 0.4981]}, {"w": "it’s", "b": [0.6467, 0.4833, 0.6709, 0.4981]}, {"w": "rarely", "b": [0.6768, 0.4833, 0.7227, 0.4981]}, {"w": "presented", "b": [0.7285, 0.4833, 0.8036, 0.4981]}, {"w": "directly.", "b": [0.8094, 0.4833, 0.8728, 0.4981]}]}, {"id": "b_7", "type": "paragraph", "text": "Usually, the scoring code transforms the model’s prediction into a form more easily interpreted, and that adds value to the client.", "words": [{"w": "Usually,", "b": [0.1312, 0.5013, 0.1941, 0.5161]}, {"w": "the", "b": [0.1991, 0.5013, 0.2242, 0.5161]}, {"w": "scoring", "b": [0.2289, 0.5013, 0.2843, 0.5161]}, {"w": "code", "b": [0.289, 0.5013, 0.3247, 0.5161]}, {"w": "transforms", "b": [0.3294, 0.5013, 0.4136, 0.5161]}, {"w": "the", "b": [0.4183, 0.5013, 0.4434, 0.5161]}, {"w": "model’s", "b": [0.4481, 0.5013, 0.508, 0.5161]}, {"w": "prediction", "b": [0.5127, 0.5013, 0.5921, 0.5161]}, {"w": "into", "b": [0.5968, 0.5013, 0.6274, 0.5161]}, {"w": "a", "b": [0.6321, 0.5013, 0.6412, 0.5161]}, {"w": "form", "b": [0.6458, 0.5013, 0.6825, 0.5161]}, {"w": "more", "b": [0.6872, 0.5013, 0.7265, 0.5161]}, {"w": "easily", "b": [0.7311, 0.5013, 0.775, 0.5161]}, {"w": "interpreted,", "b": [0.7796, 0.5013, 0.8717, 0.5161]}, {"w": "and", "b": [0.1312, 0.5191, 0.161, 0.5341]}, {"w": "that", "b": [0.1671, 0.5191, 0.201, 0.5341]}, {"w": "adds", "b": [0.2071, 0.5191, 0.2441, 0.5341]}, {"w": "value", "b": [0.2503, 0.5191, 0.2918, 0.5341]}, {"w": "to", "b": [0.298, 0.5191, 0.3144, 0.5341]}, {"w": "the", "b": [0.3205, 0.5191, 0.3462, 0.5341]}, {"w": "client.", "b": [0.3523, 0.5191, 0.401, 0.5341]}]}, {"id": "b_8", "type": "paragraph", "text": "Before serving the model to a human, it’s common to measure the prediction confidence score. If the confidence is low, you can decide to not present anything: users tend to complain less about the errors they don’t see. Or, if the user expects an output, inform them about the low confidence. Then prompt, “Are you sure?”", "words": [{"w": "Before", "b": [0.1312, 0.5462, 0.1818, 0.561]}, {"w": "serving", "b": [0.1873, 0.5462, 0.2432, 0.561]}, {"w": "the", "b": [0.2487, 0.5462, 0.2738, 0.561]}, {"w": "model", "b": [0.2793, 0.5462, 0.327, 0.561]}, {"w": "to", "b": [0.3325, 0.5462, 0.3486, 0.561]}, {"w": "a", "b": [0.354, 0.5462, 0.3631, 0.561]}, {"w": "human,", "b": [0.3685, 0.5462, 0.4273, 0.561]}, {"w": "it’s", "b": [0.4329, 0.5462, 0.4571, 0.561]}, {"w": "common", "b": [0.4626, 0.5462, 0.5289, 0.561]}, {"w": "to", "b": [0.5344, 0.5462, 0.5505, 0.561]}, {"w": "measure", "b": [0.5559, 0.5462, 0.6204, 0.561]}, {"w": "the", "b": [0.6259, 0.5462, 0.651, 0.561]}, {"w": "prediction", "b": [0.6565, 0.5462, 0.7359, 0.561]}, {"w": "confidence", "b": [0.7414, 0.5462, 0.8228, 0.561]}, {"w": "score.", "b": [0.8283, 0.5462, 0.8727, 0.561]}, {"w": "If", "b": [0.1312, 0.564, 0.1434, 0.5789]}, {"w": "the", "b": [0.1496, 0.564, 0.175, 0.5789]}, {"w": "confidence", "b": [0.1812, 0.564, 0.2636, 0.5789]}, {"w": "is", "b": [0.2697, 0.564, 0.282, 0.5789]}, {"w": "low,", "b": [0.2882, 0.564, 0.3202, 0.5789]}, {"w": "you", "b": [0.3264, 0.564, 0.3548, 0.5789]}, {"w": "can", "b": [0.361, 0.564, 0.3884, 0.5789]}, {"w": "decide", "b": [0.3946, 0.564, 0.4445, 0.5789]}, {"w": "to", "b": [0.4506, 0.564, 0.4669, 0.5789]}, {"w": "not", "b": [0.473, 0.564, 0.4995, 0.5789]}, {"w": "present", "b": [0.5056, 0.564, 0.5632, 0.5789]}, {"w": "anything:", "b": [0.5694, 0.564, 0.6447, 0.5789]}, {"w": "users", "b": [0.6529, 0.564, 0.6928, 0.5789]}, {"w": "tend", "b": [0.699, 0.564, 0.7346, 0.5789]}, {"w": "to", "b": [0.7407, 0.564, 0.757, 0.5789]}, {"w": "complain", "b": [0.7631, 0.564, 0.8353, 0.5789]}, {"w": "less", "b": [0.8415, 0.564, 0.8692, 0.5789]}, {"w": "about", "b": [0.1312, 0.5818, 0.1788, 0.5969]}, {"w": "the", "b": [0.1849, 0.5818, 0.211, 0.5969]}, {"w": "errors", "b": [0.2172, 0.5818, 0.2645, 0.5969]}, {"w": "they", "b": [0.2706, 0.5818, 0.3067, 0.5969]}, {"w": "don’t", "b": [0.3128, 0.5818, 0.3556, 0.5969]}, {"w": "see.", "b": [0.3618, 0.5818, 0.3912, 0.5969]}, {"w": "Or,", "b": [0.3993, 0.5818, 0.4266, 0.5969]}, {"w": "if", "b": [0.4327, 0.5818, 0.4437, 0.5969]}, {"w": "the", "b": [0.4498, 0.5818, 0.4759, 0.5969]}, {"w": "user", "b": [0.4821, 0.5818, 0.5157, 0.5969]}, {"w": "expects", "b": [0.5218, 0.5818, 0.5826, 0.5969]}, {"w": "an", "b": [0.5887, 0.5818, 0.6085, 0.5969]}, {"w": "output,", "b": [0.6147, 0.5818, 0.6753, 0.5969]}, {"w": "inform", "b": [0.6814, 0.5818, 0.7353, 0.5969]}, {"w": "them", "b": [0.7414, 0.5818, 0.7832, 0.5969]}, {"w": "about", "b": [0.7893, 0.5818, 0.8369, 0.5969]}, {"w": "the", "b": [0.843, 0.5818, 0.8691, 0.5969]}, {"w": "low", "b": [0.1312, 0.5999, 0.1584, 0.6148]}, {"w": "confidence.", "b": [0.1646, 0.5999, 0.2528, 0.6148]}, {"w": "Then", "b": [0.261, 0.5999, 0.303, 0.6148]}, {"w": "prompt,", "b": [0.3092, 0.5999, 0.3738, 0.6148]}, {"w": "“Are", "b": [0.3799, 0.5999, 0.4179, 0.6148]}, {"w": "you", "b": [0.4241, 0.5999, 0.4528, 0.6148]}, {"w": "sure?”", "b": [0.4589, 0.5999, 0.5094, 0.6148]}]}, {"id": "b_9", "type": "paragraph", "text": "Prompting is especially important when the system might initiate an action based on the prediction. If you are able to estimate the error’s possible cost and if the prediction confidence is bounded by (0, 1), then multiply (1 — confidence) by the cost to see the possible impact of making a wrong action. For example, let the cost of making an error is estimated as 1000 dollars and the model outputs the confidence score equal to 0.95, then the expected error cost value is (1 −0.95) × 1000 = 50 dollars. You might put a threshold on the expected cost value for different actions recommended by the model, and prompt the user if the expected cost is above the threshold.", "words": [{"w": "Prompting", "b": [0.1312, 0.6267, 0.2194, 0.6418]}, {"w": "is", "b": [0.2257, 0.6267, 0.2384, 0.6418]}, {"w": "especially", "b": [0.2447, 0.6267, 0.3233, 0.6418]}, {"w": "important", "b": [0.3296, 0.6267, 0.4122, 0.6418]}, {"w": "when", "b": [0.4186, 0.6267, 0.4615, 0.6418]}, {"w": "the", "b": [0.4678, 0.6267, 0.4939, 0.6418]}, {"w": "system", "b": [0.5003, 0.6267, 0.5564, 0.6418]}, {"w": "might", "b": [0.5628, 0.6267, 0.6103, 0.6418]}, {"w": "initiate", "b": [0.6166, 0.6267, 0.6752, 0.6418]}, {"w": "an", "b": [0.6816, 0.6267, 0.7014, 0.6418]}, {"w": "action", "b": [0.7077, 0.6267, 0.758, 0.6418]}, {"w": "based", "b": [0.7643, 0.6267, 0.8104, 0.6418]}, {"w": "on", "b": [0.8167, 0.6267, 0.8366, 0.6418]}, {"w": "the", "b": [0.8429, 0.6267, 0.8691, 0.6418]}, {"w": "prediction.", "b": [0.1312, 0.6449, 0.2157, 0.6597]}, {"w": "If", "b": [0.2236, 0.6449, 0.2356, 0.6597]}, {"w": "you", "b": [0.2408, 0.6449, 0.2689, 0.6597]}, {"w": "are", "b": [0.274, 0.6449, 0.2982, 0.6597]}, {"w": "able", "b": [0.3034, 0.6449, 0.3355, 0.6597]}, {"w": "to", "b": [0.3407, 0.6449, 0.3567, 0.6597]}, {"w": "estimate", "b": [0.3619, 0.6449, 0.4283, 0.6597]}, {"w": "the", "b": [0.4334, 0.6449, 0.4586, 0.6597]}, {"w": "error’s", "b": [0.4637, 0.6449, 0.5142, 0.6597]}, {"w": "possible", "b": [0.5193, 0.6449, 0.5814, 0.6597]}, {"w": "cost", "b": [0.5865, 0.6449, 0.6178, 0.6597]}, {"w": "and", "b": [0.6229, 0.6449, 0.6521, 0.6597]}, {"w": "if", "b": [0.6572, 0.6449, 0.6678, 0.6597]}, {"w": "the", "b": [0.6729, 0.6449, 0.698, 0.6597]}, {"w": "prediction", "b": [0.7032, 0.6449, 0.7826, 0.6597]}, {"w": "confidence", "b": [0.7878, 0.6449, 0.8692, 0.6597]}, {"w": "is", "b": [0.1312, 0.6627, 0.1437, 0.6777]}, {"w": "bounded", "b": [0.1498, 0.6627, 0.2194, 0.6777]}, {"w": "by", "b": [0.2255, 0.6627, 0.2451, 0.6777]}, {"w": "(0,", "b": [0.2512, 0.6627, 0.2728, 0.6777]}, {"w": "1),", "b": [0.2758, 0.6627, 0.2974, 0.6777]}, {"w": "then", "b": [0.3036, 0.6627, 0.3396, 0.6777]}, {"w": "multiply", "b": [0.3458, 0.6627, 0.4138, 0.6777]}, {"w": "(1", "b": [0.4199, 0.6627, 0.4363, 0.6777]}, {"w": "—", "b": [0.4425, 0.6627, 0.461, 0.6777]}, {"w": "confidence)", "b": [0.4671, 0.6627, 0.5578, 0.6777]}, {"w": "by", "b": [0.5639, 0.6627, 0.5835, 0.6777]}, {"w": "the", "b": [0.5897, 0.6627, 0.6154, 0.6777]}, {"w": "cost", "b": [0.6216, 0.6627, 0.6536, 0.6777]}, {"w": "to", "b": [0.6597, 0.6627, 0.6762, 0.6777]}, {"w": "see", "b": [0.6824, 0.6627, 0.7062, 0.6777]}, {"w": "the", "b": [0.7123, 0.6627, 0.7381, 0.6777]}, {"w": "possible", "b": [0.7442, 0.6627, 0.8078, 0.6777]}, {"w": "impact", "b": [0.8139, 0.6627, 0.8695, 0.6777]}, {"w": "of", "b": [0.1312, 0.6807, 0.1459, 0.6956]}, {"w": "making", "b": [0.1521, 0.6807, 0.2103, 0.6956]}, {"w": "a", "b": [0.2165, 0.6807, 0.2256, 0.6956]}, {"w": "wrong", "b": [0.2317, 0.6807, 0.2804, 0.6956]}, {"w": "action.", "b": [0.2866, 0.6807, 0.3403, 0.6956]}, {"w": "For", "b": [0.3485, 0.6807, 0.3751, 0.6956]}, {"w": "example,", "b": [0.3813, 0.6807, 0.4517, 0.6956]}, {"w": "let", "b": [0.4578, 0.6807, 0.4781, 0.6956]}, {"w": "the", "b": [0.4843, 0.6807, 0.5096, 0.6956]}, {"w": "cost", "b": [0.5158, 0.6807, 0.5473, 0.6956]}, {"w": "of", "b": [0.5534, 0.6807, 0.5681, 0.6956]}, {"w": "making", "b": [0.5743, 0.6807, 0.6325, 0.6956]}, {"w": "an", "b": [0.6387, 0.6807, 0.6579, 0.6956]}, {"w": "error", "b": [0.6641, 0.6807, 0.7027, 0.6956]}, {"w": "is", "b": [0.7089, 0.6807, 0.7211, 0.6956]}, {"w": "estimated", "b": [0.7273, 0.6807, 0.8044, 0.6956]}, {"w": "as", "b": [0.8105, 0.6807, 0.8269, 0.6956]}, {"w": "1000", "b": [0.8328, 0.6807, 0.8692, 0.6956]}, {"w": "dollars", "b": [0.1312, 0.6986, 0.1842, 0.7135]}, {"w": "and", "b": [0.1904, 0.6986, 0.2199, 0.7135]}, {"w": "the", "b": [0.226, 0.6986, 0.2514, 0.7135]}, {"w": "model", "b": [0.2576, 0.6986, 0.3059, 0.7135]}, {"w": "outputs", "b": [0.312, 0.6986, 0.3731, 0.7135]}, {"w": "the", "b": [0.3793, 0.6986, 0.4047, 0.7135]}, {"w": "confidence", "b": [0.4109, 0.6986, 0.4932, 0.7135]}, {"w": "score", "b": [0.4994, 0.6986, 0.5392, 0.7135]}, {"w": "equal", "b": [0.5453, 0.6986, 0.5875, 0.7135]}, {"w": "to", "b": [0.5937, 0.6986, 0.6099, 0.7135]}, {"w": "0.95,", "b": [0.6158, 0.6986, 0.6535, 0.7135]}, {"w": "then", "b": [0.6596, 0.6986, 0.6952, 0.7135]}, {"w": "the", "b": [0.7014, 0.6986, 0.7268, 0.7135]}, {"w": "expected", "b": [0.7329, 0.6986, 0.8151, 0.7135]}, {"w": "error", "b": [0.8222, 0.6986, 0.8688, 0.7135]}, {"w": "cost", "b": [0.1312, 0.7165, 0.1679, 0.7315]}, {"w": "value", "b": [0.174, 0.7167, 0.2147, 0.7315]}, {"w": "is", "b": [0.2208, 0.7167, 0.2329, 0.7315]}, {"w": "(1", "b": [0.239, 0.7167, 0.2551, 0.7315]}, {"w": "−0.95)", "b": [0.2591, 0.7163, 0.3167, 0.7315]}, {"w": "×", "b": [0.3207, 0.7163, 0.335, 0.7313]}, {"w": "1000", "b": [0.339, 0.7167, 0.3752, 0.7315]}, {"w": "=", "b": [0.3803, 0.7167, 0.3944, 0.7315]}, {"w": "50", "b": [0.3995, 0.7167, 0.4176, 0.7315]}, {"w": "dollars.", "b": [0.4237, 0.7167, 0.4811, 0.7315]}, {"w": "You", "b": [0.4893, 0.7167, 0.5204, 0.7315]}, {"w": "might", "b": [0.5265, 0.7167, 0.5722, 0.7315]}, {"w": "put", "b": [0.5783, 0.7167, 0.6055, 0.7315]}, {"w": "a", "b": [0.6116, 0.7167, 0.6206, 0.7315]}, {"w": "threshold", "b": [0.6267, 0.7167, 0.7002, 0.7315]}, {"w": "on", "b": [0.7063, 0.7167, 0.7254, 0.7315]}, {"w": "the", "b": [0.7315, 0.7167, 0.7566, 0.7315]}, {"w": "expected", "b": [0.7628, 0.7167, 0.8321, 0.7315]}, {"w": "cost", "b": [0.8382, 0.7167, 0.8695, 0.7315]}, {"w": "value", "b": [0.1308, 0.7345, 0.1723, 0.7494]}, {"w": "for", "b": [0.1785, 0.7345, 0.2006, 0.7494]}, {"w": "different", "b": [0.2067, 0.7345, 0.2735, 0.7494]}, {"w": "actions", "b": [0.2797, 0.7345, 0.3362, 0.7494]}, {"w": "recommended", "b": [0.3424, 0.7345, 0.4533, 0.7494]}, {"w": "by", "b": [0.4594, 0.7345, 0.4789, 0.7494]}, {"w": "the", "b": [0.4851, 0.7345, 0.5108, 0.7494]}, {"w": "model,", "b": [0.5169, 0.7345, 0.5708, 0.7494]}, {"w": "and", "b": [0.5769, 0.7345, 0.6067, 0.7494]}, {"w": "prompt", "b": [0.6129, 0.7345, 0.6724, 0.7494]}, {"w": "the", "b": [0.6786, 0.7345, 0.7042, 0.7494]}, {"w": "user", "b": [0.7104, 0.7345, 0.7434, 0.7494]}, {"w": "if", "b": [0.7496, 0.7345, 0.7603, 0.7494]}, {"w": "the", "b": [0.7665, 0.7345, 0.7921, 0.7494]}, {"w": "expected", "b": [0.7983, 0.7345, 0.8691, 0.7494]}, {"w": "cost", "b": [0.1312, 0.7524, 0.1631, 0.7674]}, {"w": "is", "b": [0.1693, 0.7524, 0.1817, 0.7674]}, {"w": "above", "b": [0.1879, 0.7524, 0.234, 0.7674]}, {"w": "the", "b": [0.2401, 0.7524, 0.2658, 0.7674]}, {"w": "threshold.", "b": [0.2719, 0.7524, 0.3521, 0.7674]}]}, {"id": "b_10", "type": "paragraph", "text": "In addition to measuring the model’s confidence, calculate whether the value of the prediction makes sense. In Section 9.3, we will further detail what to check, and what the system’s reaction should be, if the output doesn’t make sense.", "words": [{"w": "In", "b": [0.1312, 0.7795, 0.1478, 0.7943]}, {"w": "addition", "b": [0.1532, 0.7795, 0.2185, 0.7943]}, {"w": "to", "b": [0.2239, 0.7795, 0.24, 0.7943]}, {"w": "measuring", "b": [0.2454, 0.7795, 0.3259, 0.7943]}, {"w": "the", "b": [0.3313, 0.7795, 0.3564, 0.7943]}, {"w": "model’s", "b": [0.3618, 0.7795, 0.4217, 0.7943]}, {"w": "confidence,", "b": [0.4271, 0.7795, 0.5136, 0.7943]}, {"w": "calculate", "b": [0.5191, 0.7795, 0.5885, 0.7943]}, {"w": "whether", "b": [0.5939, 0.7795, 0.6572, 0.7943]}, {"w": "the", "b": [0.6626, 0.7795, 0.6877, 0.7943]}, {"w": "value", "b": [0.6931, 0.7795, 0.7338, 0.7943]}, {"w": "of", "b": [0.7392, 0.7795, 0.7538, 0.7943]}, {"w": "the", "b": [0.7592, 0.7795, 0.7843, 0.7943]}, {"w": "prediction", "b": [0.7897, 0.7795, 0.8692, 0.7943]}, {"w": "makes", "b": [0.1312, 0.7972, 0.1816, 0.8123]}, {"w": "sense.", "b": [0.1884, 0.7972, 0.2357, 0.8123]}, {"w": "In", "b": [0.2461, 0.7972, 0.2633, 0.8123]}, {"w": "Section", "b": [0.2702, 0.7972, 0.3298, 0.8123]}, {"w": "9.3,", "b": [0.3367, 0.7972, 0.366, 0.8123]}, {"w": "we", "b": [0.373, 0.7972, 0.3945, 0.8123]}, {"w": "will", "b": [0.4014, 0.7972, 0.4306, 0.8123]}, {"w": "further", "b": [0.4375, 0.7972, 0.4946, 0.8123]}, {"w": "detail", "b": [0.5015, 0.7972, 0.5475, 0.8123]}, {"w": "what", "b": [0.5544, 0.7972, 0.5952, 0.8123]}, {"w": "to", "b": [0.602, 0.7972, 0.6188, 0.8123]}, {"w": "check,", "b": [0.6256, 0.7972, 0.6753, 0.8123]}, {"w": "and", "b": [0.6824, 0.7972, 0.7127, 0.8123]}, {"w": "what", "b": [0.7196, 0.7972, 0.7604, 0.8123]}, {"w": "the", "b": [0.7673, 0.7972, 0.7934, 0.8123]}, {"w": "system’s", "b": [0.8003, 0.7972, 0.8691, 0.8123]}, {"w": "reaction", "b": [0.1312, 0.8152, 0.1959, 0.8302]}, {"w": "should", "b": [0.202, 0.8152, 0.2545, 0.8302]}, {"w": "be,", "b": [0.2606, 0.8152, 0.2847, 0.8302]}, {"w": "if", "b": [0.2909, 0.8152, 0.3016, 0.8302]}, {"w": "the", "b": [0.3078, 0.8152, 0.3334, 0.8302]}, {"w": "output", "b": [0.3396, 0.8152, 0.3939, 0.8302]}, {"w": "doesn’t", "b": [0.4001, 0.8152, 0.4581, 0.8302]}, {"w": "make", "b": [0.4643, 0.8152, 0.5063, 0.8302]}, {"w": "sense.", "b": [0.5125, 0.8152, 0.5588, 0.8302]}]}, {"id": "b_11", "type": "paragraph", "text": "It is convenient to log the context in which the model was served, as well as the reaction of the user. This can help both to debug eventual problems, and improve the model by creating", "words": [{"w": "It", "b": [0.1312, 0.8422, 0.1451, 0.8571]}, {"w": "is", "b": [0.1512, 0.8422, 0.1636, 0.8571]}, {"w": "convenient", "b": [0.1698, 0.8422, 0.2549, 0.8571]}, {"w": "to", "b": [0.2611, 0.8422, 0.2775, 0.8571]}, {"w": "log", "b": [0.2836, 0.8422, 0.3072, 0.8571]}, {"w": "the", "b": [0.3133, 0.8422, 0.339, 0.8571]}, {"w": "context", "b": [0.3451, 0.8422, 0.4046, 0.8571]}, {"w": "in", "b": [0.4108, 0.8422, 0.4261, 0.8571]}, {"w": "which", "b": [0.4323, 0.8422, 0.4789, 0.8571]}, {"w": "the", "b": [0.4851, 0.8422, 0.5107, 0.8571]}, {"w": "model", "b": [0.5169, 0.8422, 0.5656, 0.8571]}, {"w": "was", "b": [0.5717, 0.8422, 0.6011, 0.8571]}, {"w": "served,", "b": [0.6072, 0.8422, 0.6628, 0.8571]}, {"w": "as", "b": [0.6689, 0.8422, 0.6854, 0.8571]}, {"w": "well", "b": [0.6916, 0.8422, 0.7228, 0.8571]}, {"w": "as", "b": [0.729, 0.8422, 0.7455, 0.8571]}, {"w": "the", "b": [0.7516, 0.8422, 0.7773, 0.8571]}, {"w": "reaction", "b": [0.7834, 0.8422, 0.8481, 0.8571]}, {"w": "of", "b": [0.8542, 0.8422, 0.8691, 0.8571]}, {"w": "the", "b": [0.1312, 0.8602, 0.1564, 0.875]}, {"w": "user.", "b": [0.1622, 0.8602, 0.1996, 0.875]}, {"w": "This", "b": [0.2077, 0.8602, 0.243, 0.875]}, {"w": "can", "b": [0.2488, 0.8602, 0.2759, 0.875]}, {"w": "help", "b": [0.2818, 0.8602, 0.315, 0.875]}, {"w": "both", "b": [0.3208, 0.8602, 0.3575, 0.875]}, {"w": "to", "b": [0.3634, 0.8602, 0.3795, 0.875]}, {"w": "debug", "b": [0.3853, 0.8602, 0.4326, 0.875]}, {"w": "eventual", "b": [0.4384, 0.8602, 0.5042, 0.875]}, {"w": "problems,", "b": [0.5101, 0.8602, 0.5866, 0.875]}, {"w": "and", "b": [0.5925, 0.8602, 0.6217, 0.875]}, {"w": "improve", "b": [0.6275, 0.8602, 0.6904, 0.875]}, {"w": "the", "b": [0.6962, 0.8602, 0.7214, 0.875]}, {"w": "model", "b": [0.7272, 0.8602, 0.7749, 0.875]}, {"w": "by", "b": [0.7808, 0.8602, 0.7999, 0.875]}, {"w": "creating", "b": [0.8058, 0.8602, 0.8691, 0.875]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "8", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 272, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "equation", "text": "Figure 3: On-demand model serving with a message broker.", "words": [{"w": "Figure", "b": [0.258, 0.3227, 0.3101, 0.3377]}, {"w": "3:", "b": [0.3162, 0.3227, 0.3306, 0.3377]}, {"w": "On-demand", "b": [0.3388, 0.3227, 0.4331, 0.3377]}, {"w": "model", "b": [0.4393, 0.3227, 0.488, 0.3377]}, {"w": "serving", "b": [0.4941, 0.3227, 0.5512, 0.3377]}, {"w": "with", "b": [0.5573, 0.3227, 0.5932, 0.3377]}, {"w": "a", "b": [0.5994, 0.3227, 0.6086, 0.3377]}, {"w": "message", "b": [0.6147, 0.3227, 0.6795, 0.3377]}, {"w": "broker.", "b": [0.6857, 0.3227, 0.7422, 0.3377]}]}, {"id": "b_1", "type": "paragraph", "text": "new training examples.", "words": [{"w": "new", "b": [0.1312, 0.373, 0.163, 0.3879]}, {"w": "training", "b": [0.1692, 0.373, 0.2328, 0.3879]}, {"w": "examples.", "b": [0.2389, 0.373, 0.3175, 0.3879]}]}, {"id": "b_2", "type": "paragraph", "text": "9.2.3 Serving on Demand to a Machine", "words": [{"w": "9.2.3", "b": [0.1312, 0.4208, 0.1749, 0.4357]}, {"w": "Serving", "b": [0.1961, 0.4208, 0.2658, 0.4357]}, {"w": "on", "b": [0.2729, 0.4208, 0.2953, 0.4357]}, {"w": "Demand", "b": [0.3024, 0.4208, 0.3799, 0.4357]}, {"w": "to", "b": [0.387, 0.4208, 0.4059, 0.4357]}, {"w": "a", "b": [0.4129, 0.4208, 0.4232, 0.4357]}, {"w": "Machine", "b": [0.4303, 0.4208, 0.5088, 0.4357]}]}, {"id": "b_3", "type": "paragraph", "text": "While building a REST API is appropriate for many cases, we often serve a machine", "words": [{"w": "While", "b": [0.1303, 0.4573, 0.1789, 0.4724]}, {"w": "building", "b": [0.188, 0.4573, 0.2549, 0.4724]}, {"w": "a", "b": [0.2639, 0.4573, 0.2733, 0.4724]}, {"w": "REST", "b": [0.2824, 0.4573, 0.3331, 0.4724]}, {"w": "API", "b": [0.3421, 0.4573, 0.3758, 0.4724]}, {"w": "is", "b": [0.3848, 0.4573, 0.3975, 0.4724]}, {"w": "appropriate", "b": [0.4065, 0.4573, 0.5018, 0.4724]}, {"w": "for", "b": [0.5108, 0.4573, 0.5334, 0.4724]}, {"w": "many", "b": [0.5424, 0.4573, 0.5874, 0.4724]}, {"w": "cases,", "b": [0.5964, 0.4573, 0.6426, 0.4724]}, {"w": "we", "b": [0.6524, 0.4573, 0.6738, 0.4724]}, {"w": "often", "b": [0.6828, 0.4573, 0.7242, 0.4724]}, {"w": "serve", "b": [0.7332, 0.4573, 0.7742, 0.4724]}, {"w": "a", "b": [0.7832, 0.4573, 0.7926, 0.4724]}, {"w": "machine", "b": [0.8016, 0.4573, 0.8691, 0.4724]}]}, {"id": "b_4", "type": "paragraph", "text": "by streaming. Indeed, a machine’s data requirements are usually standard and pre- determined. A well-designed, fixed topology of a streaming application allows an efficient use of available resources.", "words": [{"w": "by", "b": [0.1312, 0.4752, 0.1511, 0.4903]}, {"w": "streaming.", "b": [0.1614, 0.4752, 0.2473, 0.4903]}, {"w": "Indeed,", "b": [0.2679, 0.4752, 0.3281, 0.4903]}, {"w": "a", "b": [0.3394, 0.4752, 0.3488, 0.4903]}, {"w": "machine’s", "b": [0.3591, 0.4752, 0.4392, 0.4903]}, {"w": "data", "b": [0.4495, 0.4752, 0.4861, 0.4903]}, {"w": "requirements", "b": [0.4964, 0.4752, 0.6023, 0.4903]}, {"w": "are", "b": [0.6126, 0.4752, 0.6377, 0.4903]}, {"w": "usually", "b": [0.648, 0.4752, 0.7062, 0.4903]}, {"w": "standard", "b": [0.7165, 0.4752, 0.7888, 0.4903]}, {"w": "and", "b": [0.7991, 0.4752, 0.8294, 0.4903]}, {"w": "pre-", "b": [0.8397, 0.4752, 0.8722, 0.4903]}, {"w": "determined.", "b": [0.1312, 0.4932, 0.2286, 0.5083]}, {"w": "A", "b": [0.2377, 0.4932, 0.2518, 0.5083]}, {"w": "well-designed,", "b": [0.2583, 0.4932, 0.3719, 0.5083]}, {"w": "fixed", "b": [0.3784, 0.4932, 0.4176, 0.5083]}, {"w": "topology", "b": [0.4241, 0.4932, 0.4952, 0.5083]}, {"w": "of", "b": [0.5016, 0.4932, 0.5168, 0.5083]}, {"w": "a", "b": [0.5233, 0.4932, 0.5327, 0.5083]}, {"w": "streaming", "b": [0.5391, 0.4932, 0.6198, 0.5083]}, {"w": "application", "b": [0.6263, 0.4932, 0.7173, 0.5083]}, {"w": "allows", "b": [0.7237, 0.4932, 0.7735, 0.5083]}, {"w": "an", "b": [0.78, 0.4932, 0.7998, 0.5083]}, {"w": "efficient", "b": [0.8063, 0.4932, 0.8696, 0.5083]}, {"w": "use", "b": [0.1312, 0.5112, 0.157, 0.5262]}, {"w": "of", "b": [0.1631, 0.5112, 0.178, 0.5262]}, {"w": "available", "b": [0.1841, 0.5112, 0.2539, 0.5262]}, {"w": "resources.", "b": [0.26, 0.5112, 0.3383, 0.5262]}]}, {"id": "b_5", "type": "paragraph", "text": "Serving on demand, to either machine or human, can be tricky. The demand may vary, from very high during the day, to very low during the night. If you use virtual resources in the cloud, autoscaling can help with adding more resources when needed, and then freeing them when demand decreases. However, autoscaling is not nimble enough to cope with accidental spikes.", "words": [{"w": "Serving", "b": [0.1312, 0.5383, 0.1902, 0.5531]}, {"w": "on", "b": [0.1963, 0.5383, 0.2155, 0.5531]}, {"w": "demand,", "b": [0.2216, 0.5383, 0.2891, 0.5531]}, {"w": "to", "b": [0.2952, 0.5383, 0.3113, 0.5531]}, {"w": "either", "b": [0.3175, 0.5383, 0.3628, 0.5531]}, {"w": "machine", "b": [0.369, 0.5383, 0.4339, 0.5531]}, {"w": "or", "b": [0.4401, 0.5383, 0.4562, 0.5531]}, {"w": "human,", "b": [0.4624, 0.5383, 0.5213, 0.5531]}, {"w": "can", "b": [0.5274, 0.5383, 0.5546, 0.5531]}, {"w": "be", "b": [0.5607, 0.5383, 0.5794, 0.5531]}, {"w": "tricky.", "b": [0.5855, 0.5383, 0.6349, 0.5531]}, {"w": "The", "b": [0.6431, 0.5383, 0.6743, 0.5531]}, {"w": "demand", "b": [0.6804, 0.5383, 0.7429, 0.5531]}, {"w": "may", "b": [0.749, 0.5383, 0.7822, 0.5531]}, {"w": "vary,", "b": [0.7884, 0.5383, 0.8261, 0.5531]}, {"w": "from", "b": [0.8323, 0.5383, 0.8691, 0.5531]}, {"w": "very", "b": [0.1308, 0.5562, 0.1645, 0.571]}, {"w": "high", "b": [0.1692, 0.5562, 0.2034, 0.571]}, {"w": "during", "b": [0.2082, 0.5562, 0.2595, 0.571]}, {"w": "the", "b": [0.2643, 0.5562, 0.2894, 0.571]}, {"w": "day,", "b": [0.2942, 0.5562, 0.3258, 0.571]}, {"w": "to", "b": [0.3308, 0.5562, 0.3469, 0.571]}, {"w": "very", "b": [0.3517, 0.5562, 0.3854, 0.571]}, {"w": "low", "b": [0.3902, 0.5562, 0.4167, 0.571]}, {"w": "during", "b": [0.4215, 0.5562, 0.4728, 0.571]}, {"w": "the", "b": [0.4776, 0.5562, 0.5027, 0.571]}, {"w": "night.", "b": [0.5075, 0.5562, 0.5532, 0.571]}, {"w": "If", "b": [0.561, 0.5562, 0.573, 0.571]}, {"w": "you", "b": [0.5778, 0.5562, 0.6059, 0.571]}, {"w": "use", "b": [0.6107, 0.5562, 0.6359, 0.571]}, {"w": "virtual", "b": [0.6407, 0.5562, 0.6935, 0.571]}, {"w": "resources", "b": [0.6983, 0.5562, 0.77, 0.571]}, {"w": "in", "b": [0.7747, 0.5562, 0.7898, 0.571]}, {"w": "the", "b": [0.7946, 0.5562, 0.8197, 0.571]}, {"w": "cloud,", "b": [0.8245, 0.5562, 0.8717, 0.571]}, {"w": "autoscaling", "b": [0.1312, 0.574, 0.2345, 0.589]}, {"w": "can", "b": [0.2405, 0.5742, 0.2676, 0.589]}, {"w": "help", "b": [0.2735, 0.5742, 0.3066, 0.589]}, {"w": "with", "b": [0.3124, 0.5742, 0.3476, 0.589]}, {"w": "adding", "b": [0.3534, 0.5742, 0.4067, 0.589]}, {"w": "more", "b": [0.4125, 0.5742, 0.4518, 0.589]}, {"w": "resources", "b": [0.4576, 0.5742, 0.5292, 0.589]}, {"w": "when", "b": [0.5351, 0.5742, 0.5763, 0.589]}, {"w": "needed,", "b": [0.5821, 0.5742, 0.6414, 0.589]}, {"w": "and", "b": [0.6473, 0.5742, 0.6764, 0.589]}, {"w": "then", "b": [0.6822, 0.5742, 0.7174, 0.589]}, {"w": "freeing", "b": [0.7232, 0.5742, 0.7761, 0.589]}, {"w": "them", "b": [0.7819, 0.5742, 0.8221, 0.589]}, {"w": "when", "b": [0.8279, 0.5742, 0.8691, 0.589]}, {"w": "demand", "b": [0.1312, 0.5921, 0.1935, 0.6069]}, {"w": "decreases.", "b": [0.1993, 0.5921, 0.2769, 0.6069]}, {"w": "However,", "b": [0.285, 0.5921, 0.3569, 0.6069]}, {"w": "autoscaling", "b": [0.3627, 0.5921, 0.4512, 0.6069]}, {"w": "is", "b": [0.4569, 0.5921, 0.4691, 0.6069]}, {"w": "not", "b": [0.4748, 0.5921, 0.5009, 0.6069]}, {"w": "nimble", "b": [0.5067, 0.5921, 0.5594, 0.6069]}, {"w": "enough", "b": [0.5651, 0.5921, 0.6214, 0.6069]}, {"w": "to", "b": [0.6271, 0.5921, 0.6432, 0.6069]}, {"w": "cope", "b": [0.6487, 0.592, 0.6851, 0.607]}, {"w": "with", "b": [0.6913, 0.592, 0.7271, 0.607]}, {"w": "accidental", "b": [0.7333, 0.592, 0.8138, 0.607]}, {"w": "spikes.", "b": [0.82, 0.592, 0.8725, 0.607]}]}, {"id": "b_6", "type": "paragraph", "text": "To deal with such situations, on-demand architectures include a message broker, such as RabbitMQ or Apache Kafka. A message broker allows one process to write messages in a queue, and another to read from that queue. On-demand requests are placed in the input queue. The model runtime process periodically connects to the broker. It reads a batch of input data elements from the input queue and generates predictions for each element in batch mode. It then writes the predictions to the output queue. Another process periodically connects to the broker, reads the predictions from the output queue, and pushes them to users who sent the requests (Figure 3). In addition to allowing us to cope with demand spikes, such an approach is more resource-efficient.", "words": [{"w": "To", "b": [0.1306, 0.6189, 0.1517, 0.6339]}, {"w": "deal", "b": [0.1579, 0.6189, 0.1909, 0.6339]}, {"w": "with", "b": [0.1971, 0.6189, 0.2332, 0.6339]}, {"w": "such", "b": [0.2394, 0.6189, 0.2751, 0.6339]}, {"w": "situations,", "b": [0.2813, 0.6189, 0.3652, 0.6339]}, {"w": "on-demand", "b": [0.3713, 0.6189, 0.4612, 0.6339]}, {"w": "architectures", "b": [0.4673, 0.6189, 0.5713, 0.6339]}, {"w": "include", "b": [0.5775, 0.6189, 0.6353, 0.6339]}, {"w": "a", "b": [0.6415, 0.6189, 0.6508, 0.6339]}, {"w": "message", "b": [0.6569, 0.6189, 0.7317, 0.6338]}, {"w": "broker,", "b": [0.7388, 0.6189, 0.8041, 0.6339]}, {"w": "such", "b": [0.8103, 0.6189, 0.846, 0.6339]}, {"w": "as", "b": [0.8522, 0.6189, 0.8688, 0.6339]}, {"w": "RabbitMQ", "b": [0.1312, 0.6368, 0.2313, 0.6518]}, {"w": "or", "b": [0.2374, 0.6369, 0.2539, 0.6518]}, {"w": "Apache", "b": [0.26, 0.6368, 0.3285, 0.6518]}, {"w": "Kafka.", "b": [0.3356, 0.6368, 0.396, 0.6518]}, {"w": "A", "b": [0.4043, 0.6369, 0.4181, 0.6518]}, {"w": "message", "b": [0.4243, 0.6369, 0.489, 0.6518]}, {"w": "broker", "b": [0.4952, 0.6369, 0.5465, 0.6518]}, {"w": "allows", "b": [0.5527, 0.6369, 0.6014, 0.6518]}, {"w": "one", "b": [0.6076, 0.6369, 0.6352, 0.6518]}, {"w": "process", "b": [0.6414, 0.6369, 0.6995, 0.6518]}, {"w": "to", "b": [0.7057, 0.6369, 0.7221, 0.6518]}, {"w": "write", "b": [0.7282, 0.6369, 0.7693, 0.6518]}, {"w": "messages", "b": [0.7754, 0.6369, 0.8475, 0.6518]}, {"w": "in", "b": [0.8536, 0.6369, 0.869, 0.6518]}, {"w": "a", "b": [0.1312, 0.6548, 0.1404, 0.6698]}, {"w": "queue,", "b": [0.1466, 0.6548, 0.1982, 0.6698]}, {"w": "and", "b": [0.2043, 0.6548, 0.234, 0.6698]}, {"w": "another", "b": [0.2401, 0.6548, 0.3014, 0.6698]}, {"w": "to", "b": [0.3076, 0.6548, 0.3239, 0.6698]}, {"w": "read", "b": [0.3301, 0.6548, 0.3649, 0.6698]}, {"w": "from", "b": [0.371, 0.6548, 0.4084, 0.6698]}, {"w": "that", "b": [0.4145, 0.6548, 0.4482, 0.6698]}, {"w": "queue.", "b": [0.4544, 0.6548, 0.506, 0.6698]}, {"w": "On-demand", "b": [0.5142, 0.6548, 0.6081, 0.6698]}, {"w": "requests", "b": [0.6143, 0.6548, 0.6794, 0.6698]}, {"w": "are", "b": [0.6856, 0.6548, 0.7102, 0.6698]}, {"w": "placed", "b": [0.7163, 0.6548, 0.7674, 0.6698]}, {"w": "in", "b": [0.7735, 0.6548, 0.7889, 0.6698]}, {"w": "the", "b": [0.795, 0.6548, 0.8206, 0.6698]}, {"w": "input", "b": [0.8267, 0.6548, 0.8696, 0.6698]}, {"w": "queue.", "b": [0.1312, 0.6726, 0.1841, 0.6877]}, {"w": "The", "b": [0.1952, 0.6726, 0.2276, 0.6877]}, {"w": "model", "b": [0.2348, 0.6726, 0.2844, 0.6877]}, {"w": "runtime", "b": [0.2915, 0.6726, 0.3559, 0.6877]}, {"w": "process", "b": [0.3631, 0.6726, 0.4224, 0.6877]}, {"w": "periodically", "b": [0.4295, 0.6726, 0.5253, 0.6877]}, {"w": "connects", "b": [0.5324, 0.6726, 0.6026, 0.6877]}, {"w": "to", "b": [0.6098, 0.6726, 0.6265, 0.6877]}, {"w": "the", "b": [0.6336, 0.6726, 0.6598, 0.6877]}, {"w": "broker.", "b": [0.6669, 0.6726, 0.7246, 0.6877]}, {"w": "It", "b": [0.7357, 0.6726, 0.7498, 0.6877]}, {"w": "reads", "b": [0.7569, 0.6726, 0.8, 0.6877]}, {"w": "a", "b": [0.8071, 0.6726, 0.8165, 0.6877]}, {"w": "batch", "b": [0.8236, 0.6726, 0.8692, 0.6877]}, {"w": "of", "b": [0.1312, 0.6906, 0.1463, 0.7057]}, {"w": "input", "b": [0.1524, 0.6906, 0.196, 0.7057]}, {"w": "data", "b": [0.2022, 0.6906, 0.2385, 0.7057]}, {"w": "elements", "b": [0.2446, 0.6906, 0.3148, 0.7057]}, {"w": "from", "b": [0.321, 0.6906, 0.3589, 0.7057]}, {"w": "the", "b": [0.365, 0.6906, 0.391, 0.7057]}, {"w": "input", "b": [0.3971, 0.6906, 0.4407, 0.7057]}, {"w": "queue", "b": [0.4469, 0.6906, 0.4941, 0.7057]}, {"w": "and", "b": [0.5003, 0.6906, 0.5304, 0.7057]}, {"w": "generates", "b": [0.5365, 0.6906, 0.6124, 0.7057]}, {"w": "predictions", "b": [0.6186, 0.6906, 0.708, 0.7057]}, {"w": "for", "b": [0.7142, 0.6906, 0.7365, 0.7057]}, {"w": "each", "b": [0.7427, 0.6906, 0.7785, 0.7057]}, {"w": "element", "b": [0.7847, 0.6906, 0.8474, 0.7057]}, {"w": "in", "b": [0.8536, 0.6906, 0.8692, 0.7057]}, {"w": "batch", "b": [0.1312, 0.7088, 0.175, 0.7236]}, {"w": "mode.", "b": [0.1808, 0.7088, 0.2285, 0.7236]}, {"w": "It", "b": [0.2366, 0.7088, 0.2501, 0.7236]}, {"w": "then", "b": [0.256, 0.7088, 0.2911, 0.7236]}, {"w": "writes", "b": [0.2969, 0.7088, 0.3443, 0.7236]}, {"w": "the", "b": [0.3501, 0.7088, 0.3753, 0.7236]}, {"w": "predictions", "b": [0.3811, 0.7088, 0.4677, 0.7236]}, {"w": "to", "b": [0.4735, 0.7088, 0.4896, 0.7236]}, {"w": "the", "b": [0.4954, 0.7088, 0.5205, 0.7236]}, {"w": "output", "b": [0.5263, 0.7088, 0.5796, 0.7236]}, {"w": "queue.", "b": [0.5854, 0.7088, 0.6362, 0.7236]}, {"w": "Another", "b": [0.6442, 0.7088, 0.7091, 0.7236]}, {"w": "process", "b": [0.7149, 0.7088, 0.772, 0.7236]}, {"w": "periodically", "b": [0.7778, 0.7088, 0.8698, 0.7236]}, {"w": "connects", "b": [0.1312, 0.7265, 0.2014, 0.7416]}, {"w": "to", "b": [0.208, 0.7265, 0.2247, 0.7416]}, {"w": "the", "b": [0.2312, 0.7265, 0.2574, 0.7416]}, {"w": "broker,", "b": [0.2639, 0.7265, 0.3216, 0.7416]}, {"w": "reads", "b": [0.3282, 0.7265, 0.3713, 0.7416]}, {"w": "the", "b": [0.3778, 0.7265, 0.404, 0.7416]}, {"w": "predictions", "b": [0.4105, 0.7265, 0.5006, 0.7416]}, {"w": "from", "b": [0.5072, 0.7265, 0.5454, 0.7416]}, {"w": "the", "b": [0.5519, 0.7265, 0.5781, 0.7416]}, {"w": "output", "b": [0.5846, 0.7265, 0.64, 0.7416]}, {"w": "queue,", "b": [0.6466, 0.7265, 0.6994, 0.7416]}, {"w": "and", "b": [0.706, 0.7265, 0.7364, 0.7416]}, {"w": "pushes", "b": [0.7429, 0.7265, 0.7975, 0.7416]}, {"w": "them", "b": [0.8041, 0.7265, 0.8459, 0.7416]}, {"w": "to", "b": [0.8524, 0.7265, 0.8692, 0.7416]}, {"w": "users", "b": [0.1312, 0.7444, 0.1723, 0.7595]}, {"w": "who", "b": [0.1795, 0.7444, 0.213, 0.7595]}, {"w": "sent", "b": [0.2202, 0.7444, 0.2533, 0.7595]}, {"w": "the", "b": [0.2605, 0.7444, 0.2866, 0.7595]}, {"w": "requests", "b": [0.2938, 0.7444, 0.3606, 0.7595]}, {"w": "(Figure", "b": [0.3678, 0.7444, 0.4282, 0.7595]}, {"w": "3).", "b": [0.4354, 0.7444, 0.4574, 0.7595]}, {"w": "In", "b": [0.4688, 0.7444, 0.486, 0.7595]}, {"w": "addition", "b": [0.4932, 0.7444, 0.5612, 0.7595]}, {"w": "to", "b": [0.5684, 0.7444, 0.5852, 0.7595]}, {"w": "allowing", "b": [0.5924, 0.7444, 0.6598, 0.7595]}, {"w": "us", "b": [0.667, 0.7444, 0.6849, 0.7595]}, {"w": "to", "b": [0.6921, 0.7444, 0.7089, 0.7595]}, {"w": "cope", "b": [0.7161, 0.7444, 0.7532, 0.7595]}, {"w": "with", "b": [0.7604, 0.7444, 0.797, 0.7595]}, {"w": "demand", "b": [0.8042, 0.7444, 0.8691, 0.7595]}, {"w": "spikes,", "b": [0.1312, 0.7625, 0.1838, 0.7775]}, {"w": "such", "b": [0.1899, 0.7625, 0.2254, 0.7775]}, {"w": "an", "b": [0.2316, 0.7625, 0.251, 0.7775]}, {"w": "approach", "b": [0.2572, 0.7625, 0.3306, 0.7775]}, {"w": "is", "b": [0.3367, 0.7625, 0.3491, 0.7775]}, {"w": "more", "b": [0.3553, 0.7625, 0.3953, 0.7775]}, {"w": "resource-efficient.", "b": [0.4015, 0.7625, 0.5406, 0.7775]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 9", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "9", "b": [0.8597, 0.9055, 0.869, 0.9205]}]}]}, {"page": 273, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "9.3 Model Serving in Real World", "words": [{"w": "9.3", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Model", "b": [0.188, 0.0861, 0.2569, 0.104]}, {"w": "Serving", "b": [0.2652, 0.0861, 0.347, 0.104]}, {"w": "in", "b": [0.3553, 0.0861, 0.376, 0.104]}, {"w": "Real", "b": [0.3843, 0.0861, 0.4333, 0.104]}, {"w": "World", "b": [0.4416, 0.0861, 0.5087, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "When real people interact with a software system in the real world, serving the model gets", "words": [{"w": "When", "b": [0.1303, 0.1249, 0.1784, 0.1399]}, {"w": "real", "b": [0.1845, 0.1249, 0.2145, 0.1399]}, {"w": "people", "b": [0.2207, 0.1249, 0.2729, 0.1399]}, {"w": "interact", "b": [0.279, 0.1249, 0.3416, 0.1399]}, {"w": "with", "b": [0.3477, 0.1249, 0.3839, 0.1399]}, {"w": "a", "b": [0.39, 0.1249, 0.3993, 0.1399]}, {"w": "software", "b": [0.4054, 0.1249, 0.4723, 0.1399]}, {"w": "system", "b": [0.4784, 0.1249, 0.5339, 0.1399]}, {"w": "in", "b": [0.54, 0.1249, 0.5555, 0.1399]}, {"w": "the", "b": [0.5617, 0.1249, 0.5875, 0.1399]}, {"w": "real", "b": [0.5936, 0.1249, 0.6237, 0.1399]}, {"w": "world,", "b": [0.6298, 0.1249, 0.68, 0.1399]}, {"w": "serving", "b": [0.6861, 0.1249, 0.7437, 0.1399]}, {"w": "the", "b": [0.7498, 0.1249, 0.7756, 0.1399]}, {"w": "model", "b": [0.7817, 0.1249, 0.8308, 0.1399]}, {"w": "gets", "b": [0.837, 0.1249, 0.8691, 0.1399]}]}, {"id": "b_2", "type": "paragraph", "text": "complicated. It’s usually impossible to predict all user actions and reactions. The architecture of a software system intended for the real world must be ready for three phenomena: errors, change, and human nature.", "words": [{"w": "complicated.", "b": [0.1312, 0.143, 0.2307, 0.1578]}, {"w": "It’s", "b": [0.2386, 0.143, 0.2643, 0.1578]}, {"w": "usually", "b": [0.2694, 0.143, 0.3253, 0.1578]}, {"w": "impossible", "b": [0.3304, 0.143, 0.4125, 0.1578]}, {"w": "to", "b": [0.4176, 0.143, 0.4336, 0.1578]}, {"w": "predict", "b": [0.4387, 0.143, 0.4941, 0.1578]}, {"w": "all", "b": [0.4992, 0.143, 0.5183, 0.1578]}, {"w": "user", "b": [0.5234, 0.143, 0.5557, 0.1578]}, {"w": "actions", "b": [0.5608, 0.143, 0.6161, 0.1578]}, {"w": "and", "b": [0.6212, 0.143, 0.6504, 0.1578]}, {"w": "reactions.", "b": [0.6555, 0.143, 0.731, 0.1578]}, {"w": "The", "b": [0.7389, 0.143, 0.77, 0.1578]}, {"w": "architecture", "b": [0.7751, 0.143, 0.8692, 0.1578]}, {"w": "of", "b": [0.1312, 0.1609, 0.146, 0.1758]}, {"w": "a", "b": [0.1522, 0.1609, 0.1613, 0.1758]}, {"w": "software", "b": [0.1675, 0.1609, 0.2332, 0.1758]}, {"w": "system", "b": [0.2394, 0.1609, 0.294, 0.1758]}, {"w": "intended", "b": [0.3002, 0.1609, 0.3688, 0.1758]}, {"w": "for", "b": [0.375, 0.1609, 0.3969, 0.1758]}, {"w": "the", "b": [0.4031, 0.1609, 0.4285, 0.1758]}, {"w": "real", "b": [0.4347, 0.1609, 0.4642, 0.1758]}, {"w": "world", "b": [0.4704, 0.1609, 0.5147, 0.1758]}, {"w": "must", "b": [0.5208, 0.1609, 0.5601, 0.1758]}, {"w": "be", "b": [0.5663, 0.1609, 0.5851, 0.1758]}, {"w": "ready", "b": [0.5913, 0.1609, 0.6356, 0.1758]}, {"w": "for", "b": [0.6417, 0.1609, 0.6636, 0.1758]}, {"w": "three", "b": [0.6698, 0.1609, 0.7106, 0.1758]}, {"w": "phenomena:", "b": [0.7167, 0.1609, 0.8123, 0.1758]}, {"w": "errors,", "b": [0.8206, 0.1609, 0.8717, 0.1758]}, {"w": "change,", "b": [0.1312, 0.1788, 0.1912, 0.1938]}, {"w": "and", "b": [0.1974, 0.1788, 0.2271, 0.1938]}, {"w": "human", "b": [0.2333, 0.1788, 0.2881, 0.1938]}, {"w": "nature.", "b": [0.2943, 0.1788, 0.3518, 0.1938]}]}, {"id": "b_3", "type": "paragraph", "text": "9.3.1 Being Ready for Errors", "words": [{"w": "9.3.1", "b": [0.1312, 0.2266, 0.1749, 0.2416]}, {"w": "Being", "b": [0.1961, 0.2266, 0.2492, 0.2416]}, {"w": "Ready", "b": [0.2563, 0.2266, 0.3152, 0.2416]}, {"w": "for", "b": [0.3223, 0.2266, 0.3481, 0.2416]}, {"w": "Errors", "b": [0.3552, 0.2266, 0.4144, 0.2416]}]}, {"id": "b_4", "type": "paragraph", "text": "Errors are inevitable in any software. In machine-learning-based software, errors are an integral part of the solution: no model is perfect. Because we cannot fix all errors, the only option is to embrace them.", "words": [{"w": "Errors", "b": [0.1312, 0.2631, 0.183, 0.2782]}, {"w": "are", "b": [0.1906, 0.2631, 0.2157, 0.2782]}, {"w": "inevitable", "b": [0.2233, 0.2631, 0.3033, 0.2782]}, {"w": "in", "b": [0.3109, 0.2631, 0.3266, 0.2782]}, {"w": "any", "b": [0.3342, 0.2631, 0.3635, 0.2782]}, {"w": "software.", "b": [0.371, 0.2631, 0.4439, 0.2782]}, {"w": "In", "b": [0.4563, 0.2631, 0.4736, 0.2782]}, {"w": "machine-learning-based", "b": [0.4812, 0.2631, 0.6733, 0.2782]}, {"w": "software,", "b": [0.6808, 0.2631, 0.7537, 0.2782]}, {"w": "errors", "b": [0.7616, 0.2631, 0.809, 0.2782]}, {"w": "are", "b": [0.8165, 0.2631, 0.8417, 0.2782]}, {"w": "an", "b": [0.8492, 0.2631, 0.8691, 0.2782]}, {"w": "integral", "b": [0.1312, 0.2812, 0.1923, 0.2961]}, {"w": "part", "b": [0.1984, 0.2812, 0.2323, 0.2961]}, {"w": "of", "b": [0.2385, 0.2812, 0.2533, 0.2961]}, {"w": "the", "b": [0.2595, 0.2812, 0.2851, 0.2961]}, {"w": "solution:", "b": [0.2912, 0.2812, 0.3601, 0.2961]}, {"w": "no", "b": [0.3683, 0.2812, 0.3877, 0.2961]}, {"w": "model", "b": [0.3939, 0.2812, 0.4426, 0.2961]}, {"w": "is", "b": [0.4487, 0.2812, 0.4611, 0.2961]}, {"w": "perfect.", "b": [0.4672, 0.2812, 0.5278, 0.2961]}, {"w": "Because", "b": [0.536, 0.2812, 0.6005, 0.2961]}, {"w": "we", "b": [0.6066, 0.2812, 0.6276, 0.2961]}, {"w": "cannot", "b": [0.6338, 0.2812, 0.6881, 0.2961]}, {"w": "fix", "b": [0.6942, 0.2812, 0.7142, 0.2961]}, {"w": "all", "b": [0.7204, 0.2812, 0.7399, 0.2961]}, {"w": "errors,", "b": [0.746, 0.2812, 0.7975, 0.2961]}, {"w": "the", "b": [0.8037, 0.2812, 0.8293, 0.2961]}, {"w": "only", "b": [0.8355, 0.2812, 0.8698, 0.2961]}, {"w": "option", "b": [0.1312, 0.2991, 0.1825, 0.3141]}, {"w": "is", "b": [0.1886, 0.2991, 0.2011, 0.3141]}, {"w": "to", "b": [0.2072, 0.2991, 0.2236, 0.3141]}, {"w": "embrace", "b": [0.2298, 0.2991, 0.296, 0.3141]}, {"w": "them.", "b": [0.3021, 0.2991, 0.3483, 0.3141]}]}, {"id": "b_5", "type": "paragraph", "text": "Embracing errors means designing the software system in such a way that when an error happens, the system continues operating normally.", "words": [{"w": "Embracing", "b": [0.1312, 0.3259, 0.2199, 0.341]}, {"w": "errors", "b": [0.2266, 0.3259, 0.274, 0.341]}, {"w": "means", "b": [0.2807, 0.3259, 0.3321, 0.341]}, {"w": "designing", "b": [0.3388, 0.3259, 0.4152, 0.341]}, {"w": "the", "b": [0.422, 0.3259, 0.4481, 0.341]}, {"w": "software", "b": [0.4548, 0.3259, 0.5225, 0.341]}, {"w": "system", "b": [0.5292, 0.3259, 0.5854, 0.341]}, {"w": "in", "b": [0.5921, 0.3259, 0.6077, 0.341]}, {"w": "such", "b": [0.6145, 0.3259, 0.6507, 0.341]}, {"w": "a", "b": [0.6574, 0.3259, 0.6668, 0.341]}, {"w": "way", "b": [0.6735, 0.3259, 0.7054, 0.341]}, {"w": "that", "b": [0.7122, 0.3259, 0.7467, 0.341]}, {"w": "when", "b": [0.7534, 0.3259, 0.7963, 0.341]}, {"w": "an", "b": [0.803, 0.3259, 0.8228, 0.341]}, {"w": "error", "b": [0.8296, 0.3259, 0.8695, 0.341]}, {"w": "happens,", "b": [0.1312, 0.344, 0.2026, 0.359]}, {"w": "the", "b": [0.2088, 0.344, 0.2344, 0.359]}, {"w": "system", "b": [0.2406, 0.344, 0.2956, 0.359]}, {"w": "continues", "b": [0.3018, 0.344, 0.3768, 0.359]}, {"w": "operating", "b": [0.3829, 0.344, 0.4594, 0.359]}, {"w": "normally.", "b": [0.4655, 0.344, 0.5404, 0.359]}]}, {"id": "b_6", "type": "paragraph", "text": "There are three “cannots” we must accept and embrace:", "words": [{"w": "There", "b": [0.1306, 0.3709, 0.1778, 0.3859]}, {"w": "are", "b": [0.1839, 0.3709, 0.2086, 0.3859]}, {"w": "three", "b": [0.2148, 0.3709, 0.2558, 0.3859]}, {"w": "“cannots”", "b": [0.262, 0.3709, 0.341, 0.3859]}, {"w": "we", "b": [0.3472, 0.3709, 0.3682, 0.3859]}, {"w": "must", "b": [0.3744, 0.3709, 0.4139, 0.3859]}, {"w": "accept", "b": [0.4201, 0.3709, 0.4714, 0.3859]}, {"w": "and", "b": [0.4775, 0.3709, 0.5073, 0.3859]}, {"w": "embrace:", "b": [0.5134, 0.3709, 0.5847, 0.3859]}]}, {"id": "b_7", "type": "paragraph", "text": "1. We cannot always explain why an error happened. 2. We cannot reliably predict when it will happen, and even a high confidence prediction can be false. 3. We cannot always know how to fix a specific error. If it’s fixable, what kind and how much training data is needed?", "words": [{"w": "1.", "b": [0.1538, 0.3978, 0.1681, 0.4128]}, {"w": "We", "b": [0.1774, 0.3978, 0.203, 0.4128]}, {"w": "cannot", "b": [0.2091, 0.3978, 0.2635, 0.4128]}, {"w": "always", "b": [0.2696, 0.3978, 0.3226, 0.4128]}, {"w": "explain", "b": [0.3287, 0.3978, 0.3866, 0.4128]}, {"w": "why", "b": [0.3928, 0.3978, 0.4256, 0.4128]}, {"w": "an", "b": [0.4317, 0.3978, 0.4512, 0.4128]}, {"w": "error", "b": [0.4574, 0.3978, 0.4965, 0.4128]}, {"w": "happened.", "b": [0.5027, 0.3978, 0.5852, 0.4128]}, {"w": "2.", "b": [0.1538, 0.4158, 0.1681, 0.4307]}, {"w": "We", "b": [0.1774, 0.4158, 0.2028, 0.4307]}, {"w": "cannot", "b": [0.2089, 0.4158, 0.2627, 0.4307]}, {"w": "reliably", "b": [0.2689, 0.4158, 0.3284, 0.4307]}, {"w": "predict", "b": [0.3345, 0.4158, 0.3905, 0.4307]}, {"w": "when", "b": [0.3966, 0.4158, 0.4383, 0.4307]}, {"w": "it", "b": [0.4444, 0.4158, 0.4566, 0.4307]}, {"w": "will", "b": [0.4628, 0.4158, 0.4912, 0.4307]}, {"w": "happen,", "b": [0.4974, 0.4158, 0.5609, 0.4307]}, {"w": "and", "b": [0.567, 0.4158, 0.5965, 0.4307]}, {"w": "even", "b": [0.6026, 0.4158, 0.6382, 0.4307]}, {"w": "a", "b": [0.6443, 0.4158, 0.6535, 0.4307]}, {"w": "high", "b": [0.6596, 0.4158, 0.6942, 0.4307]}, {"w": "confidence", "b": [0.7003, 0.4158, 0.7827, 0.4307]}, {"w": "prediction", "b": [0.7888, 0.4158, 0.8691, 0.4307]}, {"w": "can", "b": [0.1774, 0.4337, 0.205, 0.4487]}, {"w": "be", "b": [0.2112, 0.4337, 0.2302, 0.4487]}, {"w": "false.", "b": [0.2363, 0.4337, 0.2769, 0.4487]}, {"w": "3.", "b": [0.1538, 0.4517, 0.1681, 0.4666]}, {"w": "We", "b": [0.1774, 0.4516, 0.2032, 0.4666]}, {"w": "cannot", "b": [0.2093, 0.4516, 0.2641, 0.4666]}, {"w": "always", "b": [0.2702, 0.4516, 0.3235, 0.4666]}, {"w": "know", "b": [0.3297, 0.4516, 0.372, 0.4666]}, {"w": "how", "b": [0.3782, 0.4516, 0.4107, 0.4666]}, {"w": "to", "b": [0.4169, 0.4516, 0.4334, 0.4666]}, {"w": "fix", "b": [0.4395, 0.4516, 0.4597, 0.4666]}, {"w": "a", "b": [0.4658, 0.4516, 0.4751, 0.4666]}, {"w": "specific", "b": [0.4813, 0.4516, 0.5398, 0.4666]}, {"w": "error.", "b": [0.5459, 0.4516, 0.5905, 0.4666]}, {"w": "If", "b": [0.5987, 0.4516, 0.6111, 0.4666]}, {"w": "it’s", "b": [0.6173, 0.4516, 0.6422, 0.4666]}, {"w": "fixable,", "b": [0.6483, 0.4516, 0.7067, 0.4666]}, {"w": "what", "b": [0.7129, 0.4516, 0.7531, 0.4666]}, {"w": "kind", "b": [0.7593, 0.4516, 0.7949, 0.4666]}, {"w": "and", "b": [0.8011, 0.4516, 0.831, 0.4666]}, {"w": "how", "b": [0.8372, 0.4516, 0.8697, 0.4666]}, {"w": "much", "b": [0.1774, 0.4696, 0.2204, 0.4846]}, {"w": "training", "b": [0.2266, 0.4696, 0.2902, 0.4846]}, {"w": "data", "b": [0.2964, 0.4696, 0.3322, 0.4846]}, {"w": "is", "b": [0.3384, 0.4696, 0.3508, 0.4846]}, {"w": "needed?", "b": [0.3569, 0.4696, 0.4211, 0.4846]}]}, {"id": "b_8", "type": "paragraph", "text": "Furthermore, when an error happens, we cannot always expect that the incorrect prediction will at least be close or similar to the correct prediction. An error can be arbitrarily “crazy.” For example, a model for a self-driving car, at the speed of 120 km/h (~74 mph) with no obstacles, may predict that the best action is to stop and drive backward.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.4966, 0.2363, 0.5115]}, {"w": "when", "b": [0.2425, 0.4966, 0.2841, 0.5115]}, {"w": "an", "b": [0.2903, 0.4966, 0.3096, 0.5115]}, {"w": "error", "b": [0.3157, 0.4966, 0.3545, 0.5115]}, {"w": "happens,", "b": [0.3607, 0.4966, 0.4314, 0.5115]}, {"w": "we", "b": [0.4376, 0.4966, 0.4584, 0.5115]}, {"w": "cannot", "b": [0.4646, 0.4966, 0.5184, 0.5115]}, {"w": "always", "b": [0.5246, 0.4966, 0.577, 0.5115]}, {"w": "expect", "b": [0.5831, 0.4966, 0.635, 0.5115]}, {"w": "that", "b": [0.6412, 0.4966, 0.6747, 0.5115]}, {"w": "the", "b": [0.6808, 0.4966, 0.7062, 0.5115]}, {"w": "incorrect", "b": [0.7124, 0.4966, 0.7826, 0.5115]}, {"w": "prediction", "b": [0.7888, 0.4966, 0.8691, 0.5115]}, {"w": "will", "b": [0.1306, 0.5145, 0.159, 0.5294]}, {"w": "at", "b": [0.1652, 0.5145, 0.1814, 0.5294]}, {"w": "least", "b": [0.1876, 0.5145, 0.2243, 0.5294]}, {"w": "be", "b": [0.2304, 0.5145, 0.2492, 0.5294]}, {"w": "close", "b": [0.2554, 0.5145, 0.2931, 0.5294]}, {"w": "or", "b": [0.2992, 0.5145, 0.3155, 0.5294]}, {"w": "similar", "b": [0.3217, 0.5145, 0.3757, 0.5294]}, {"w": "to", "b": [0.3818, 0.5145, 0.3981, 0.5294]}, {"w": "the", "b": [0.4042, 0.5145, 0.4296, 0.5294]}, {"w": "correct", "b": [0.4358, 0.5145, 0.4908, 0.5294]}, {"w": "prediction.", "b": [0.4969, 0.5145, 0.5823, 0.5294]}, {"w": "An", "b": [0.5906, 0.5145, 0.6144, 0.5294]}, {"w": "error", "b": [0.6206, 0.5145, 0.6593, 0.5294]}, {"w": "can", "b": [0.6655, 0.5145, 0.6929, 0.5294]}, {"w": "be", "b": [0.6991, 0.5145, 0.7179, 0.5294]}, {"w": "arbitrarily", "b": [0.724, 0.5145, 0.806, 0.5294]}, {"w": "“crazy.”", "b": [0.8121, 0.5145, 0.8726, 0.5294]}, {"w": "For", "b": [0.1312, 0.5323, 0.1588, 0.5474]}, {"w": "example,", "b": [0.1653, 0.5323, 0.238, 0.5474]}, {"w": "a", "b": [0.2445, 0.5323, 0.2539, 0.5474]}, {"w": "model", "b": [0.2604, 0.5323, 0.3101, 0.5474]}, {"w": "for", "b": [0.3166, 0.5323, 0.3392, 0.5474]}, {"w": "a", "b": [0.3456, 0.5323, 0.3551, 0.5474]}, {"w": "self-driving", "b": [0.3615, 0.5323, 0.4527, 0.5474]}, {"w": "car,", "b": [0.4592, 0.5323, 0.4896, 0.5474]}, {"w": "at", "b": [0.4962, 0.5323, 0.5129, 0.5474]}, {"w": "the", "b": [0.5194, 0.5323, 0.5456, 0.5474]}, {"w": "speed", "b": [0.5521, 0.5323, 0.5977, 0.5474]}, {"w": "of", "b": [0.6042, 0.5323, 0.6193, 0.5474]}, {"w": "120", "b": [0.6256, 0.5323, 0.6539, 0.5474]}, {"w": "km/h", "b": [0.6603, 0.5323, 0.7058, 0.5474]}, {"w": "(~74", "b": [0.7123, 0.5323, 0.7489, 0.5474]}, {"w": "mph)", "b": [0.7554, 0.5323, 0.7993, 0.5474]}, {"w": "with", "b": [0.8058, 0.5323, 0.8424, 0.5474]}, {"w": "no", "b": [0.8489, 0.5323, 0.8688, 0.5474]}, {"w": "obstacles,", "b": [0.1312, 0.5504, 0.2084, 0.5653]}, {"w": "may", "b": [0.2145, 0.5504, 0.2483, 0.5653]}, {"w": "predict", "b": [0.2545, 0.5504, 0.3109, 0.5653]}, {"w": "that", "b": [0.3171, 0.5504, 0.3509, 0.5653]}, {"w": "the", "b": [0.3571, 0.5504, 0.3827, 0.5653]}, {"w": "best", "b": [0.3889, 0.5504, 0.4223, 0.5653]}, {"w": "action", "b": [0.4285, 0.5504, 0.4777, 0.5653]}, {"w": "is", "b": [0.4838, 0.5504, 0.4963, 0.5653]}, {"w": "to", "b": [0.5024, 0.5504, 0.5188, 0.5653]}, {"w": "stop", "b": [0.525, 0.5504, 0.5589, 0.5653]}, {"w": "and", "b": [0.565, 0.5504, 0.5948, 0.5653]}, {"w": "drive", "b": [0.601, 0.5504, 0.641, 0.5653]}, {"w": "backward.", "b": [0.6471, 0.5504, 0.7287, 0.5653]}]}, {"id": "b_9", "type": "paragraph", "text": "Tiny changes in the context may result in unexpected error patterns. For example, the model that recognizes dangerous situations on the factory floor may start making errors after the lightbulb near the camera is replaced. The previous lightbulb was incandescent, and the new one is fluorescent.", "words": [{"w": "Tiny", "b": [0.1306, 0.5774, 0.1677, 0.5922]}, {"w": "changes", "b": [0.1734, 0.5774, 0.2343, 0.5922]}, {"w": "in", "b": [0.24, 0.5774, 0.2551, 0.5922]}, {"w": "the", "b": [0.2607, 0.5774, 0.2859, 0.5922]}, {"w": "context", "b": [0.2916, 0.5774, 0.3498, 0.5922]}, {"w": "may", "b": [0.3555, 0.5774, 0.3887, 0.5922]}, {"w": "result", "b": [0.3943, 0.5774, 0.4387, 0.5922]}, {"w": "in", "b": [0.4444, 0.5774, 0.4595, 0.5922]}, {"w": "unexpected", "b": [0.4652, 0.5774, 0.5546, 0.5922]}, {"w": "error", "b": [0.5603, 0.5774, 0.5987, 0.5922]}, {"w": "patterns.", "b": [0.6043, 0.5774, 0.6749, 0.5922]}, {"w": "For", "b": [0.6829, 0.5774, 0.7093, 0.5922]}, {"w": "example,", "b": [0.715, 0.5774, 0.7848, 0.5922]}, {"w": "the", "b": [0.7906, 0.5774, 0.8157, 0.5922]}, {"w": "model", "b": [0.8214, 0.5774, 0.8691, 0.5922]}, {"w": "that", "b": [0.1312, 0.5952, 0.1653, 0.6102]}, {"w": "recognizes", "b": [0.1715, 0.5952, 0.2533, 0.6102]}, {"w": "dangerous", "b": [0.2595, 0.5952, 0.3413, 0.6102]}, {"w": "situations", "b": [0.3474, 0.5952, 0.4262, 0.6102]}, {"w": "on", "b": [0.4324, 0.5952, 0.452, 0.6102]}, {"w": "the", "b": [0.4581, 0.5952, 0.484, 0.6102]}, {"w": "factory", "b": [0.4901, 0.5952, 0.547, 0.6102]}, {"w": "floor", "b": [0.5532, 0.5952, 0.5899, 0.6102]}, {"w": "may", "b": [0.596, 0.5952, 0.6301, 0.6102]}, {"w": "start", "b": [0.6363, 0.5952, 0.6747, 0.6102]}, {"w": "making", "b": [0.6808, 0.5952, 0.7402, 0.6102]}, {"w": "errors", "b": [0.7464, 0.5952, 0.7932, 0.6102]}, {"w": "after", "b": [0.7993, 0.5952, 0.8371, 0.6102]}, {"w": "the", "b": [0.8433, 0.5952, 0.8691, 0.6102]}, {"w": "lightbulb", "b": [0.1312, 0.6133, 0.2021, 0.6281]}, {"w": "near", "b": [0.2082, 0.6133, 0.2425, 0.6281]}, {"w": "the", "b": [0.2486, 0.6133, 0.2738, 0.6281]}, {"w": "camera", "b": [0.2799, 0.6133, 0.3362, 0.6281]}, {"w": "is", "b": [0.3424, 0.6133, 0.3546, 0.6281]}, {"w": "replaced.", "b": [0.3607, 0.6133, 0.4311, 0.6281]}, {"w": "The", "b": [0.4394, 0.6133, 0.4705, 0.6281]}, {"w": "previous", "b": [0.4767, 0.6133, 0.5427, 0.6281]}, {"w": "lightbulb", "b": [0.5489, 0.6133, 0.6197, 0.6281]}, {"w": "was", "b": [0.6259, 0.6133, 0.6546, 0.6281]}, {"w": "incandescent,", "b": [0.6608, 0.6133, 0.7659, 0.6281]}, {"w": "and", "b": [0.7721, 0.6133, 0.8012, 0.6281]}, {"w": "the", "b": [0.8074, 0.6133, 0.8325, 0.6281]}, {"w": "new", "b": [0.8387, 0.6133, 0.8698, 0.6281]}, {"w": "one", "b": [0.1312, 0.6311, 0.1589, 0.6461]}, {"w": "is", "b": [0.1651, 0.6311, 0.1775, 0.6461]}, {"w": "fluorescent.", "b": [0.1836, 0.6311, 0.2746, 0.6461]}]}, {"id": "b_10", "type": "paragraph", "text": "Even rare errors may impact users, if the number of users is large. Let the model have a 99% accuracy. If you have a million users, one percent of prediction errors will affect thousands.", "words": [{"w": "Even", "b": [0.1312, 0.6582, 0.1707, 0.673]}, {"w": "rare", "b": [0.1766, 0.6582, 0.2078, 0.673]}, {"w": "errors", "b": [0.2137, 0.6582, 0.2592, 0.673]}, {"w": "may", "b": [0.2651, 0.6582, 0.2983, 0.673]}, {"w": "impact", "b": [0.3042, 0.6582, 0.3584, 0.673]}, {"w": "users,", "b": [0.3643, 0.6582, 0.4088, 0.673]}, {"w": "if", "b": [0.4148, 0.6582, 0.4253, 0.673]}, {"w": "the", "b": [0.4312, 0.6582, 0.4564, 0.673]}, {"w": "number", "b": [0.4623, 0.6582, 0.5221, 0.673]}, {"w": "of", "b": [0.528, 0.6582, 0.5426, 0.673]}, {"w": "users", "b": [0.5485, 0.6582, 0.5879, 0.673]}, {"w": "is", "b": [0.5938, 0.6582, 0.606, 0.673]}, {"w": "large.", "b": [0.6119, 0.6582, 0.6552, 0.673]}, {"w": "Let", "b": [0.6633, 0.6582, 0.6897, 0.673]}, {"w": "the", "b": [0.6956, 0.6582, 0.7207, 0.673]}, {"w": "model", "b": [0.7266, 0.6582, 0.7743, 0.673]}, {"w": "have", "b": [0.7802, 0.6582, 0.8159, 0.673]}, {"w": "a", "b": [0.8218, 0.6582, 0.8308, 0.673]}, {"w": "99%", "b": [0.8364, 0.6582, 0.8695, 0.673]}, {"w": "accuracy.", "b": [0.1312, 0.676, 0.2051, 0.691]}, {"w": "If", "b": [0.2133, 0.676, 0.2256, 0.691]}, {"w": "you", "b": [0.2318, 0.676, 0.2605, 0.691]}, {"w": "have", "b": [0.2667, 0.676, 0.3031, 0.691]}, {"w": "a", "b": [0.3092, 0.676, 0.3184, 0.691]}, {"w": "million", "b": [0.3246, 0.676, 0.3799, 0.691]}, {"w": "users,", "b": [0.3861, 0.676, 0.4315, 0.691]}, {"w": "one", "b": [0.4376, 0.676, 0.4653, 0.691]}, {"w": "percent", "b": [0.4715, 0.676, 0.531, 0.691]}, {"w": "of", "b": [0.5372, 0.676, 0.552, 0.691]}, {"w": "prediction", "b": [0.5582, 0.676, 0.6393, 0.691]}, {"w": "errors", "b": [0.6454, 0.676, 0.6918, 0.691]}, {"w": "will", "b": [0.698, 0.676, 0.7267, 0.691]}, {"w": "affect", "b": [0.7328, 0.676, 0.7764, 0.691]}, {"w": "thousands.", "b": [0.7826, 0.676, 0.8689, 0.691]}]}, {"id": "b_11", "type": "paragraph", "text": "It’s rare that fixing one error in a model results in new errors. However, there’s no guarantee.", "words": [{"w": "It’s", "b": [0.1312, 0.7031, 0.157, 0.7179]}, {"w": "rare", "b": [0.1629, 0.7031, 0.1941, 0.7179]}, {"w": "that", "b": [0.2, 0.7031, 0.2332, 0.7179]}, {"w": "fixing", "b": [0.2391, 0.7031, 0.2828, 0.7179]}, {"w": "one", "b": [0.2887, 0.7031, 0.3158, 0.7179]}, {"w": "error", "b": [0.3217, 0.7031, 0.3601, 0.7179]}, {"w": "in", "b": [0.366, 0.7031, 0.3811, 0.7179]}, {"w": "a", "b": [0.387, 0.7031, 0.396, 0.7179]}, {"w": "model", "b": [0.4019, 0.7031, 0.4496, 0.7179]}, {"w": "results", "b": [0.4555, 0.7031, 0.5071, 0.7179]}, {"w": "in", "b": [0.513, 0.7031, 0.528, 0.7179]}, {"w": "new", "b": [0.5339, 0.7031, 0.5651, 0.7179]}, {"w": "errors.", "b": [0.571, 0.7031, 0.6215, 0.7179]}, {"w": "However,", "b": [0.6296, 0.7031, 0.7015, 0.7179]}, {"w": "there’s", "b": [0.7074, 0.7031, 0.7599, 0.7179]}, {"w": "no", "b": [0.7658, 0.7031, 0.7849, 0.7179]}, {"w": "guarantee.", "b": [0.7908, 0.7031, 0.8727, 0.7179]}]}, {"id": "b_12", "type": "paragraph", "text": "How to design a system in the presence of inevitable errors?", "words": [{"w": "How", "b": [0.1312, 0.7299, 0.1671, 0.7448]}, {"w": "to", "b": [0.1733, 0.7299, 0.1897, 0.7448]}, {"w": "design", "b": [0.1958, 0.7299, 0.2462, 0.7448]}, {"w": "a", "b": [0.2523, 0.7299, 0.2615, 0.7448]}, {"w": "system", "b": [0.2677, 0.7299, 0.3228, 0.7448]}, {"w": "in", "b": [0.3289, 0.7299, 0.3443, 0.7448]}, {"w": "the", "b": [0.3504, 0.7299, 0.3761, 0.7448]}, {"w": "presence", "b": [0.3822, 0.7299, 0.4501, 0.7448]}, {"w": "of", "b": [0.4563, 0.7299, 0.4711, 0.7448]}, {"w": "inevitable", "b": [0.4773, 0.7299, 0.5557, 0.7448]}, {"w": "errors?", "b": [0.5619, 0.7299, 0.617, 0.7448]}]}, {"id": "b_13", "type": "paragraph", "text": "9.3.2 Dealing With Errors", "words": [{"w": "9.3.2", "b": [0.1312, 0.7777, 0.1749, 0.7926]}, {"w": "Dealing", "b": [0.1961, 0.7777, 0.2666, 0.7926]}, {"w": "With", "b": [0.2737, 0.7777, 0.3215, 0.7926]}, {"w": "Errors", "b": [0.3286, 0.7777, 0.3878, 0.7926]}]}, {"id": "b_14", "type": "paragraph", "text": "First of all, have a strategy that mitigates, at least, partially, a situation in which your system looks or acts “stupid.” For example, if your system talks to the user, like a personal assistant or a chatbot, it’s better to say, “I don’t know,” than to say something random. If the error", "words": [{"w": "First", "b": [0.1312, 0.8144, 0.1693, 0.8292]}, {"w": "of", "b": [0.1746, 0.8144, 0.1892, 0.8292]}, {"w": "all,", "b": [0.1945, 0.8144, 0.2186, 0.8292]}, {"w": "have", "b": [0.2241, 0.8144, 0.2598, 0.8292]}, {"w": "a", "b": [0.2651, 0.8144, 0.2741, 0.8292]}, {"w": "strategy", "b": [0.2794, 0.8144, 0.3434, 0.8292]}, {"w": "that", "b": [0.3487, 0.8144, 0.3818, 0.8292]}, {"w": "mitigates,", "b": [0.3871, 0.8144, 0.4646, 0.8292]}, {"w": "at", "b": [0.4701, 0.8144, 0.4862, 0.8292]}, {"w": "least,", "b": [0.4915, 0.8144, 0.5328, 0.8292]}, {"w": "partially,", "b": [0.5383, 0.8144, 0.6086, 0.8292]}, {"w": "a", "b": [0.6141, 0.8144, 0.6231, 0.8292]}, {"w": "situation", "b": [0.6284, 0.8144, 0.6979, 0.8292]}, {"w": "in", "b": [0.7032, 0.8144, 0.7183, 0.8292]}, {"w": "which", "b": [0.7236, 0.8144, 0.7693, 0.8292]}, {"w": "your", "b": [0.7746, 0.8144, 0.8098, 0.8292]}, {"w": "system", "b": [0.8151, 0.8144, 0.8691, 0.8292]}, {"w": "looks", "b": [0.1312, 0.8323, 0.1715, 0.8472]}, {"w": "or", "b": [0.1776, 0.8323, 0.1937, 0.8472]}, {"w": "acts", "b": [0.1998, 0.8323, 0.2311, 0.8472]}, {"w": "“stupid.”", "b": [0.2371, 0.8323, 0.306, 0.8472]}, {"w": "For", "b": [0.3142, 0.8323, 0.3406, 0.8472]}, {"w": "example,", "b": [0.3466, 0.8323, 0.4165, 0.8472]}, {"w": "if", "b": [0.4226, 0.8323, 0.4331, 0.8472]}, {"w": "your", "b": [0.4392, 0.8323, 0.4744, 0.8472]}, {"w": "system", "b": [0.4805, 0.8323, 0.5344, 0.8472]}, {"w": "talks", "b": [0.5405, 0.8323, 0.5783, 0.8472]}, {"w": "to", "b": [0.5843, 0.8323, 0.6004, 0.8472]}, {"w": "the", "b": [0.6065, 0.8323, 0.6316, 0.8472]}, {"w": "user,", "b": [0.6377, 0.8323, 0.675, 0.8472]}, {"w": "like", "b": [0.6811, 0.8323, 0.7082, 0.8472]}, {"w": "a", "b": [0.7143, 0.8323, 0.7234, 0.8472]}, {"w": "personal", "b": [0.7294, 0.8323, 0.7954, 0.8472]}, {"w": "assistant", "b": [0.8015, 0.8323, 0.8696, 0.8472]}, {"w": "or", "b": [0.1312, 0.8502, 0.1477, 0.8651]}, {"w": "a", "b": [0.1539, 0.8502, 0.1631, 0.8651]}, {"w": "chatbot,", "b": [0.1693, 0.8502, 0.2361, 0.8651]}, {"w": "it’s", "b": [0.2423, 0.8502, 0.2671, 0.8651]}, {"w": "better", "b": [0.2732, 0.8502, 0.3221, 0.8651]}, {"w": "to", "b": [0.3283, 0.8502, 0.3447, 0.8651]}, {"w": "say,", "b": [0.3509, 0.8502, 0.3803, 0.8651]}, {"w": "“I", "b": [0.3864, 0.8502, 0.4018, 0.8651]}, {"w": "don’t", "b": [0.408, 0.8502, 0.4502, 0.8651]}, {"w": "know,”", "b": [0.4563, 0.8502, 0.5123, 0.8651]}, {"w": "than", "b": [0.5185, 0.8502, 0.5555, 0.8651]}, {"w": "to", "b": [0.5617, 0.8502, 0.5781, 0.8651]}, {"w": "say", "b": [0.5842, 0.8502, 0.6101, 0.8651]}, {"w": "something", "b": [0.6162, 0.8502, 0.6986, 0.8651]}, {"w": "random.", "b": [0.7047, 0.8502, 0.7716, 0.8651]}, {"w": "If", "b": [0.7798, 0.8502, 0.7922, 0.8651]}, {"w": "the", "b": [0.7983, 0.8502, 0.824, 0.8651]}, {"w": "error", "b": [0.8302, 0.8502, 0.8694, 0.8651]}]}, {"id": "b_15", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 10", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "10", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 274, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "will be directly visible to the user, calculate the expected cost of the error, as discussed above, and do not display the prediction to the user if the cost is above a threshold.", "words": [{"w": "will", "b": [0.1306, 0.0884, 0.1592, 0.1033]}, {"w": "be", "b": [0.1653, 0.0884, 0.1842, 0.1033]}, {"w": "directly", "b": [0.1904, 0.0884, 0.2512, 0.1033]}, {"w": "visible", "b": [0.2574, 0.0884, 0.308, 0.1033]}, {"w": "to", "b": [0.3142, 0.0884, 0.3305, 0.1033]}, {"w": "the", "b": [0.3367, 0.0884, 0.3622, 0.1033]}, {"w": "user,", "b": [0.3683, 0.0884, 0.4063, 0.1033]}, {"w": "calculate", "b": [0.4125, 0.0884, 0.4829, 0.1033]}, {"w": "the", "b": [0.4891, 0.0884, 0.5146, 0.1033]}, {"w": "expected", "b": [0.5206, 0.0884, 0.6028, 0.1033]}, {"w": "cost", "b": [0.6098, 0.0884, 0.6465, 0.1033]}, {"w": "of", "b": [0.6536, 0.0884, 0.6706, 0.1033]}, {"w": "the", "b": [0.6777, 0.0884, 0.7075, 0.1033]}, {"w": "error,", "b": [0.7146, 0.0884, 0.7662, 0.1033]}, {"w": "as", "b": [0.7724, 0.0884, 0.7888, 0.1033]}, {"w": "discussed", "b": [0.795, 0.0884, 0.8689, 0.1033]}, {"w": "above,", "b": [0.1312, 0.1063, 0.1825, 0.1213]}, {"w": "and", "b": [0.1886, 0.1063, 0.2184, 0.1213]}, {"w": "do", "b": [0.2245, 0.1063, 0.244, 0.1213]}, {"w": "not", "b": [0.2502, 0.1063, 0.2768, 0.1213]}, {"w": "display", "b": [0.283, 0.1063, 0.3395, 0.1213]}, {"w": "the", "b": [0.3457, 0.1063, 0.3713, 0.1213]}, {"w": "prediction", "b": [0.3774, 0.1063, 0.4585, 0.1213]}, {"w": "to", "b": [0.4647, 0.1063, 0.4811, 0.1213]}, {"w": "the", "b": [0.4872, 0.1063, 0.5129, 0.1213]}, {"w": "user", "b": [0.519, 0.1063, 0.552, 0.1213]}, {"w": "if", "b": [0.5581, 0.1063, 0.5689, 0.1213]}, {"w": "the", "b": [0.5751, 0.1063, 0.6007, 0.1213]}, {"w": "cost", "b": [0.6069, 0.1063, 0.6388, 0.1213]}, {"w": "is", "b": [0.6449, 0.1063, 0.6573, 0.1213]}, {"w": "above", "b": [0.6635, 0.1063, 0.7096, 0.1213]}, {"w": "a", "b": [0.7158, 0.1063, 0.725, 0.1213]}, {"w": "threshold.", "b": [0.7311, 0.1063, 0.8113, 0.1213]}]}, {"id": "b_1", "type": "paragraph", "text": "Alternatively, train a second model mB that predicts, for an input, that the first model mA is likely to make an error on that input. The presence of a “safeguard” model mB is especially relevant if model mA is used in a mission critical system.", "words": [{"w": "Alternatively,", "b": [0.1305, 0.1334, 0.2376, 0.1482]}, {"w": "train", "b": [0.2432, 0.1334, 0.2815, 0.1482]}, {"w": "a", "b": [0.287, 0.1334, 0.296, 0.1482]}, {"w": "second", "b": [0.3016, 0.1334, 0.3539, 0.1482]}, {"w": "model", "b": [0.3595, 0.1334, 0.4072, 0.1482]}, {"w": "mB", "b": [0.4126, 0.1332, 0.44, 0.1495]}, {"w": "that", "b": [0.447, 0.1334, 0.4802, 0.1482]}, {"w": "predicts,", "b": [0.4857, 0.1334, 0.5532, 0.1482]}, {"w": "for", "b": [0.5589, 0.1334, 0.5805, 0.1482]}, {"w": "an", "b": [0.5861, 0.1334, 0.6052, 0.1482]}, {"w": "input,", "b": [0.6107, 0.1334, 0.6579, 0.1482]}, {"w": "that", "b": [0.6636, 0.1334, 0.6967, 0.1482]}, {"w": "the", "b": [0.7023, 0.1334, 0.7274, 0.1482]}, {"w": "first", "b": [0.7329, 0.1334, 0.7643, 0.1482]}, {"w": "model", "b": [0.7698, 0.1334, 0.8175, 0.1482]}, {"w": "mA", "b": [0.8229, 0.1332, 0.8502, 0.1495]}, {"w": "is", "b": [0.8566, 0.1334, 0.8688, 0.1482]}, {"w": "likely", "b": [0.1312, 0.1513, 0.1732, 0.1661]}, {"w": "to", "b": [0.1794, 0.1513, 0.1956, 0.1661]}, {"w": "make", "b": [0.2018, 0.1513, 0.2432, 0.1661]}, {"w": "an", "b": [0.2494, 0.1513, 0.2686, 0.1661]}, {"w": "error", "b": [0.2748, 0.1513, 0.3134, 0.1661]}, {"w": "on", "b": [0.3196, 0.1513, 0.3388, 0.1661]}, {"w": "that", "b": [0.345, 0.1513, 0.3784, 0.1661]}, {"w": "input.", "b": [0.3845, 0.1513, 0.4321, 0.1661]}, {"w": "The", "b": [0.4403, 0.1513, 0.4717, 0.1661]}, {"w": "presence", "b": [0.4779, 0.1513, 0.5448, 0.1661]}, {"w": "of", "b": [0.551, 0.1513, 0.5657, 0.1661]}, {"w": "a", "b": [0.5718, 0.1513, 0.581, 0.1661]}, {"w": "“safeguard”", "b": [0.5871, 0.1513, 0.6799, 0.1661]}, {"w": "model", "b": [0.686, 0.1513, 0.7341, 0.1661]}, {"w": "mB", "b": [0.74, 0.1512, 0.7673, 0.1674]}, {"w": "is", "b": [0.7751, 0.1513, 0.7873, 0.1661]}, {"w": "especially", "b": [0.7935, 0.1513, 0.8695, 0.1661]}, {"w": "relevant", "b": [0.1312, 0.1692, 0.1949, 0.1841]}, {"w": "if", "b": [0.201, 0.1692, 0.2118, 0.1841]}, {"w": "model", "b": [0.2179, 0.1692, 0.2667, 0.1841]}, {"w": "mA", "b": [0.2727, 0.1691, 0.3, 0.1854]}, {"w": "is", "b": [0.3071, 0.1692, 0.3195, 0.1841]}, {"w": "used", "b": [0.3257, 0.1692, 0.3617, 0.1841]}, {"w": "in", "b": [0.3678, 0.1692, 0.3832, 0.1841]}, {"w": "a", "b": [0.3894, 0.1692, 0.3986, 0.1841]}, {"w": "mission", "b": [0.4047, 0.1692, 0.4644, 0.1841]}, {"w": "critical", "b": [0.4706, 0.1692, 0.526, 0.1841]}, {"w": "system.", "b": [0.5321, 0.1692, 0.5923, 0.1841]}]}, {"id": "b_2", "type": "paragraph", "text": "The error’s visibility is an important factor in deciding whether and how to hide it. For example, consider a system that downloads web pages from the internet and extracts some entities from them. Let the user be interested in being alerted when a kind of entity is detected. The model can make two kinds of errors: 1) extract an entity even if the document doesn’t contain it (false positive, FP), and 2) not extract an entity that is present in the document (false negative, FN). When the former error happens, the user receives an irrelevant alert and gets frustrated. If the latter, the user doesn’t receive any alert, remains unaware of the error, and avoids frustration. In this situation, you might prefer to optimize the model for precision, by keeping recall reasonably high.", "words": [{"w": "The", "b": [0.1306, 0.196, 0.163, 0.2111]}, {"w": "error’s", "b": [0.1701, 0.196, 0.2227, 0.2111]}, {"w": "visibility", "b": [0.2298, 0.196, 0.3005, 0.2111]}, {"w": "is", "b": [0.3077, 0.196, 0.3203, 0.2111]}, {"w": "an", "b": [0.3274, 0.196, 0.3473, 0.2111]}, {"w": "important", "b": [0.3544, 0.196, 0.4371, 0.2111]}, {"w": "factor", "b": [0.4442, 0.196, 0.4919, 0.2111]}, {"w": "in", "b": [0.499, 0.196, 0.5147, 0.2111]}, {"w": "deciding", "b": [0.5218, 0.196, 0.5898, 0.2111]}, {"w": "whether", "b": [0.5969, 0.196, 0.6629, 0.2111]}, {"w": "and", "b": [0.67, 0.196, 0.7003, 0.2111]}, {"w": "how", "b": [0.7075, 0.196, 0.7404, 0.2111]}, {"w": "to", "b": [0.7475, 0.196, 0.7643, 0.2111]}, {"w": "hide", "b": [0.7714, 0.196, 0.8059, 0.2111]}, {"w": "it.", "b": [0.813, 0.196, 0.8308, 0.2111]}, {"w": "For", "b": [0.8419, 0.196, 0.8695, 0.2111]}, {"w": "example,", "b": [0.1312, 0.214, 0.2029, 0.229]}, {"w": "consider", "b": [0.209, 0.214, 0.2751, 0.229]}, {"w": "a", "b": [0.2813, 0.214, 0.2906, 0.229]}, {"w": "system", "b": [0.2967, 0.214, 0.352, 0.229]}, {"w": "that", "b": [0.3582, 0.214, 0.3922, 0.229]}, {"w": "downloads", "b": [0.3983, 0.214, 0.4824, 0.229]}, {"w": "web", "b": [0.4886, 0.214, 0.52, 0.229]}, {"w": "pages", "b": [0.5262, 0.214, 0.5706, 0.229]}, {"w": "from", "b": [0.5767, 0.214, 0.6144, 0.229]}, {"w": "the", "b": [0.6205, 0.214, 0.6463, 0.229]}, {"w": "internet", "b": [0.6525, 0.214, 0.7159, 0.229]}, {"w": "and", "b": [0.7221, 0.214, 0.7519, 0.229]}, {"w": "extracts", "b": [0.7581, 0.214, 0.8227, 0.229]}, {"w": "some", "b": [0.8288, 0.214, 0.8691, 0.229]}, {"w": "entities", "b": [0.1312, 0.2319, 0.1905, 0.247]}, {"w": "from", "b": [0.198, 0.2319, 0.2363, 0.247]}, {"w": "them.", "b": [0.2438, 0.2319, 0.2909, 0.247]}, {"w": "Let", "b": [0.3034, 0.2319, 0.3308, 0.247]}, {"w": "the", "b": [0.3384, 0.2319, 0.3645, 0.247]}, {"w": "user", "b": [0.3721, 0.2319, 0.4058, 0.247]}, {"w": "be", "b": [0.4133, 0.2319, 0.4327, 0.247]}, {"w": "interested", "b": [0.4403, 0.2319, 0.5205, 0.247]}, {"w": "in", "b": [0.528, 0.2319, 0.5437, 0.247]}, {"w": "being", "b": [0.5513, 0.2319, 0.5958, 0.247]}, {"w": "alerted", "b": [0.6033, 0.2319, 0.6599, 0.247]}, {"w": "when", "b": [0.6675, 0.2319, 0.7103, 0.247]}, {"w": "a", "b": [0.7179, 0.2319, 0.7273, 0.247]}, {"w": "kind", "b": [0.7349, 0.2319, 0.771, 0.247]}, {"w": "of", "b": [0.7786, 0.2319, 0.7937, 0.247]}, {"w": "entity", "b": [0.8013, 0.2319, 0.8489, 0.247]}, {"w": "is", "b": [0.8565, 0.2319, 0.8692, 0.247]}, {"w": "detected.", "b": [0.1312, 0.25, 0.2026, 0.2648]}, {"w": "The", "b": [0.2108, 0.25, 0.2419, 0.2648]}, {"w": "model", "b": [0.2479, 0.25, 0.2956, 0.2648]}, {"w": "can", "b": [0.3016, 0.25, 0.3287, 0.2648]}, {"w": "make", "b": [0.3347, 0.25, 0.3759, 0.2648]}, {"w": "two", "b": [0.3818, 0.25, 0.4099, 0.2648]}, {"w": "kinds", "b": [0.4159, 0.25, 0.4577, 0.2648]}, {"w": "of", "b": [0.4637, 0.25, 0.4783, 0.2648]}, {"w": "errors:", "b": [0.4842, 0.25, 0.5347, 0.2648]}, {"w": "1)", "b": [0.5429, 0.25, 0.5589, 0.2648]}, {"w": "extract", "b": [0.5649, 0.25, 0.6207, 0.2648]}, {"w": "an", "b": [0.6267, 0.25, 0.6458, 0.2648]}, {"w": "entity", "b": [0.6518, 0.25, 0.6975, 0.2648]}, {"w": "even", "b": [0.7035, 0.25, 0.7386, 0.2648]}, {"w": "if", "b": [0.7446, 0.25, 0.7552, 0.2648]}, {"w": "the", "b": [0.7611, 0.25, 0.7863, 0.2648]}, {"w": "document", "b": [0.7922, 0.25, 0.8696, 0.2648]}, {"w": "doesn’t", "b": [0.1312, 0.2677, 0.1904, 0.2829]}, {"w": "contain", "b": [0.1972, 0.2677, 0.2574, 0.2829]}, {"w": "it", "b": [0.2641, 0.2677, 0.2767, 0.2829]}, {"w": "(false", "b": [0.2834, 0.2677, 0.327, 0.2829]}, {"w": "positive,", "b": [0.3337, 0.2677, 0.4023, 0.2829]}, {"w": "FP),", "b": [0.4091, 0.2677, 0.4463, 0.2829]}, {"w": "and", "b": [0.4532, 0.2677, 0.4835, 0.2829]}, {"w": "2)", "b": [0.4903, 0.2677, 0.507, 0.2829]}, {"w": "not", "b": [0.5138, 0.2677, 0.541, 0.2829]}, {"w": "extract", "b": [0.5477, 0.2677, 0.6058, 0.2829]}, {"w": "an", "b": [0.6126, 0.2677, 0.6325, 0.2829]}, {"w": "entity", "b": [0.6392, 0.2677, 0.6869, 0.2829]}, {"w": "that", "b": [0.6936, 0.2677, 0.7281, 0.2829]}, {"w": "is", "b": [0.7349, 0.2677, 0.7475, 0.2829]}, {"w": "present", "b": [0.7543, 0.2677, 0.8136, 0.2829]}, {"w": "in", "b": [0.8204, 0.2677, 0.8361, 0.2829]}, {"w": "the", "b": [0.8428, 0.2677, 0.869, 0.2829]}, {"w": "document", "b": [0.1312, 0.2859, 0.2086, 0.3007]}, {"w": "(false", "b": [0.2136, 0.2859, 0.2554, 0.3007]}, {"w": "negative,", "b": [0.2603, 0.2859, 0.3306, 0.3007]}, {"w": "FN).", "b": [0.3357, 0.2858, 0.3736, 0.3008]}, {"w": "When", "b": [0.3814, 0.2859, 0.4282, 0.3007]}, {"w": "the", "b": [0.4331, 0.2859, 0.4582, 0.3007]}, {"w": "former", "b": [0.4632, 0.2859, 0.515, 0.3007]}, {"w": "error", "b": [0.52, 0.2859, 0.5583, 0.3007]}, {"w": "happens,", "b": [0.5632, 0.2859, 0.6332, 0.3007]}, {"w": "the", "b": [0.6384, 0.2859, 0.6635, 0.3007]}, {"w": "user", "b": [0.6684, 0.2859, 0.7008, 0.3007]}, {"w": "receives", "b": [0.7057, 0.2859, 0.7662, 0.3007]}, {"w": "an", "b": [0.7711, 0.2859, 0.7902, 0.3007]}, {"w": "irrelevant", "b": [0.7951, 0.2859, 0.8696, 0.3007]}, {"w": "alert", "b": [0.1312, 0.3039, 0.1675, 0.3187]}, {"w": "and", "b": [0.1736, 0.3039, 0.2028, 0.3187]}, {"w": "gets", "b": [0.2089, 0.3039, 0.2402, 0.3187]}, {"w": "frustrated.", "b": [0.2463, 0.3039, 0.3294, 0.3187]}, {"w": "If", "b": [0.3376, 0.3039, 0.3497, 0.3187]}, {"w": "the", "b": [0.3558, 0.3039, 0.381, 0.3187]}, {"w": "latter,", "b": [0.3871, 0.3039, 0.4354, 0.3187]}, {"w": "the", "b": [0.4415, 0.3039, 0.4667, 0.3187]}, {"w": "user", "b": [0.4728, 0.3039, 0.5052, 0.3187]}, {"w": "doesn’t", "b": [0.5113, 0.3039, 0.5682, 0.3187]}, {"w": "receive", "b": [0.5743, 0.3039, 0.6277, 0.3187]}, {"w": "any", "b": [0.6338, 0.3039, 0.6619, 0.3187]}, {"w": "alert,", "b": [0.6681, 0.3039, 0.7093, 0.3187]}, {"w": "remains", "b": [0.7155, 0.3039, 0.777, 0.3187]}, {"w": "unaware", "b": [0.7831, 0.3039, 0.8484, 0.3187]}, {"w": "of", "b": [0.8546, 0.3039, 0.8692, 0.3187]}, {"w": "the", "b": [0.1312, 0.3217, 0.1571, 0.3367]}, {"w": "error,", "b": [0.1632, 0.3217, 0.2078, 0.3367]}, {"w": "and", "b": [0.214, 0.3217, 0.2439, 0.3367]}, {"w": "avoids", "b": [0.2501, 0.3217, 0.3003, 0.3367]}, {"w": "frustration.", "b": [0.3065, 0.3217, 0.3981, 0.3367]}, {"w": "In", "b": [0.4063, 0.3217, 0.4234, 0.3367]}, {"w": "this", "b": [0.4295, 0.3217, 0.4596, 0.3367]}, {"w": "situation,", "b": [0.4657, 0.3217, 0.5423, 0.3367]}, {"w": "you", "b": [0.5485, 0.3217, 0.5774, 0.3367]}, {"w": "might", "b": [0.5835, 0.3217, 0.6306, 0.3367]}, {"w": "prefer", "b": [0.6367, 0.3217, 0.6839, 0.3367]}, {"w": "to", "b": [0.69, 0.3217, 0.7065, 0.3367]}, {"w": "optimize", "b": [0.7126, 0.3217, 0.7819, 0.3367]}, {"w": "the", "b": [0.788, 0.3217, 0.8139, 0.3367]}, {"w": "model", "b": [0.82, 0.3217, 0.8691, 0.3367]}, {"w": "for", "b": [0.1312, 0.3396, 0.1533, 0.3546]}, {"w": "precision,", "b": [0.1595, 0.3396, 0.2469, 0.3546]}, {"w": "by", "b": [0.253, 0.3396, 0.2725, 0.3546]}, {"w": "keeping", "b": [0.2787, 0.3396, 0.3392, 0.3546]}, {"w": "recall", "b": [0.3455, 0.3396, 0.3955, 0.3546]}, {"w": "reasonably", "b": [0.4017, 0.3396, 0.4875, 0.3546]}, {"w": "high.", "b": [0.4936, 0.3396, 0.5336, 0.3546]}]}, {"id": "b_3", "type": "paragraph", "text": "When you train a model, decide which kind of errors you would most like to avoid, and then", "words": [{"w": "When", "b": [0.1303, 0.3667, 0.1772, 0.3815]}, {"w": "you", "b": [0.1833, 0.3667, 0.2116, 0.3815]}, {"w": "train", "b": [0.2177, 0.3667, 0.2561, 0.3815]}, {"w": "a", "b": [0.2622, 0.3667, 0.2713, 0.3815]}, {"w": "model,", "b": [0.2775, 0.3667, 0.3304, 0.3815]}, {"w": "decide", "b": [0.3366, 0.3667, 0.386, 0.3815]}, {"w": "which", "b": [0.3922, 0.3667, 0.438, 0.3815]}, {"w": "kind", "b": [0.4442, 0.3667, 0.479, 0.3815]}, {"w": "of", "b": [0.4851, 0.3667, 0.4998, 0.3815]}, {"w": "errors", "b": [0.5059, 0.3667, 0.5515, 0.3815]}, {"w": "you", "b": [0.5577, 0.3667, 0.5859, 0.3815]}, {"w": "would", "b": [0.5921, 0.3667, 0.639, 0.3815]}, {"w": "most", "b": [0.6451, 0.3667, 0.6835, 0.3815]}, {"w": "like", "b": [0.6897, 0.3667, 0.7169, 0.3815]}, {"w": "to", "b": [0.7231, 0.3667, 0.7392, 0.3815]}, {"w": "avoid,", "b": [0.7454, 0.3667, 0.7922, 0.3815]}, {"w": "and", "b": [0.7984, 0.3667, 0.8276, 0.3815]}, {"w": "then", "b": [0.8338, 0.3667, 0.8691, 0.3815]}]}, {"id": "b_4", "type": "paragraph", "text": "optimize your hyperparameters, including the prediction threshold, accordingly.", "words": [{"w": "optimize", "b": [0.1312, 0.3845, 0.1999, 0.3995]}, {"w": "your", "b": [0.2061, 0.3845, 0.242, 0.3995]}, {"w": "hyperparameters,", "b": [0.2482, 0.3845, 0.3884, 0.3995]}, {"w": "including", "b": [0.3946, 0.3845, 0.4684, 0.3995]}, {"w": "the", "b": [0.4746, 0.3845, 0.5002, 0.3995]}, {"w": "prediction", "b": [0.5064, 0.3845, 0.5874, 0.3995]}, {"w": "threshold,", "b": [0.5936, 0.3845, 0.6738, 0.3995]}, {"w": "accordingly.", "b": [0.6799, 0.3845, 0.7753, 0.3995]}]}, {"id": "b_5", "type": "paragraph", "text": "When your confidence for the best prediction is low, consider presenting several options. This", "words": [{"w": "When", "b": [0.1303, 0.4116, 0.177, 0.4264]}, {"w": "your", "b": [0.1827, 0.4116, 0.2179, 0.4264]}, {"w": "confidence", "b": [0.2236, 0.4116, 0.305, 0.4264]}, {"w": "for", "b": [0.3106, 0.4116, 0.3323, 0.4264]}, {"w": "the", "b": [0.338, 0.4116, 0.3631, 0.4264]}, {"w": "best", "b": [0.3688, 0.4116, 0.4015, 0.4264]}, {"w": "prediction", "b": [0.4072, 0.4116, 0.4867, 0.4264]}, {"w": "is", "b": [0.4923, 0.4116, 0.5045, 0.4264]}, {"w": "low,", "b": [0.5101, 0.4116, 0.5418, 0.4264]}, {"w": "consider", "b": [0.5475, 0.4116, 0.612, 0.4264]}, {"w": "presenting", "b": [0.6177, 0.4116, 0.6987, 0.4264]}, {"w": "several", "b": [0.7044, 0.4116, 0.7578, 0.4264]}, {"w": "options.", "b": [0.7635, 0.4116, 0.8259, 0.4264]}, {"w": "This", "b": [0.8339, 0.4116, 0.8692, 0.4264]}]}, {"id": "b_6", "type": "paragraph", "text": "is why Google presents 10 search results at once. There are much higher chances for the most relevant link to be among those 10 search results, than for it to be in the first position.", "words": [{"w": "is", "b": [0.1312, 0.4295, 0.1434, 0.4443]}, {"w": "why", "b": [0.1491, 0.4295, 0.1812, 0.4443]}, {"w": "Google", "b": [0.1869, 0.4295, 0.2418, 0.4443]}, {"w": "presents", "b": [0.2475, 0.4295, 0.3116, 0.4443]}, {"w": "10", "b": [0.3172, 0.4295, 0.3353, 0.4443]}, {"w": "search", "b": [0.341, 0.4295, 0.3899, 0.4443]}, {"w": "results", "b": [0.3956, 0.4295, 0.4471, 0.4443]}, {"w": "at", "b": [0.4528, 0.4295, 0.4688, 0.4443]}, {"w": "once.", "b": [0.4745, 0.4295, 0.5148, 0.4443]}, {"w": "There", "b": [0.5228, 0.4295, 0.5691, 0.4443]}, {"w": "are", "b": [0.5748, 0.4295, 0.5989, 0.4443]}, {"w": "much", "b": [0.6046, 0.4295, 0.6468, 0.4443]}, {"w": "higher", "b": [0.6525, 0.4295, 0.7018, 0.4443]}, {"w": "chances", "b": [0.7075, 0.4295, 0.7674, 0.4443]}, {"w": "for", "b": [0.7731, 0.4295, 0.7948, 0.4443]}, {"w": "the", "b": [0.8005, 0.4295, 0.8256, 0.4443]}, {"w": "most", "b": [0.8313, 0.4295, 0.8696, 0.4443]}, {"w": "relevant", "b": [0.1312, 0.4473, 0.1949, 0.4623]}, {"w": "link", "b": [0.201, 0.4473, 0.2313, 0.4623]}, {"w": "to", "b": [0.2374, 0.4473, 0.2538, 0.4623]}, {"w": "be", "b": [0.26, 0.4473, 0.279, 0.4623]}, {"w": "among", "b": [0.2851, 0.4473, 0.3384, 0.4623]}, {"w": "those", "b": [0.3446, 0.4473, 0.3867, 0.4623]}, {"w": "10", "b": [0.3928, 0.4473, 0.4112, 0.4623]}, {"w": "search", "b": [0.4174, 0.4473, 0.4673, 0.4623]}, {"w": "results,", "b": [0.4734, 0.4473, 0.5311, 0.4623]}, {"w": "than", "b": [0.5373, 0.4473, 0.5742, 0.4623]}, {"w": "for", "b": [0.5803, 0.4473, 0.6024, 0.4623]}, {"w": "it", "b": [0.6086, 0.4473, 0.6209, 0.4623]}, {"w": "to", "b": [0.627, 0.4473, 0.6434, 0.4623]}, {"w": "be", "b": [0.6496, 0.4473, 0.6686, 0.4623]}, {"w": "in", "b": [0.6747, 0.4473, 0.6901, 0.4623]}, {"w": "the", "b": [0.6962, 0.4473, 0.7219, 0.4623]}, {"w": "first", "b": [0.728, 0.4473, 0.76, 0.4623]}, {"w": "position.", "b": [0.7661, 0.4473, 0.8355, 0.4623]}]}, {"id": "b_7", "type": "paragraph", "text": "Another way to avoid user’s frustration with model errors is to dose the user’s exposure to the model. Measure the number of errors your model makes, and estimate how many errors per minute (day, week, or month) a user is ready to tolerate. Then limit the interactions the user will have with the model to keep the number of perceived errors below that level.", "words": [{"w": "Another", "b": [0.1305, 0.4742, 0.1973, 0.4892]}, {"w": "way", "b": [0.2034, 0.4742, 0.235, 0.4892]}, {"w": "to", "b": [0.2411, 0.4742, 0.2577, 0.4892]}, {"w": "avoid", "b": [0.2638, 0.4742, 0.3068, 0.4892]}, {"w": "user’s", "b": [0.3129, 0.4742, 0.3587, 0.4892]}, {"w": "frustration", "b": [0.3648, 0.4742, 0.4515, 0.4892]}, {"w": "with", "b": [0.4576, 0.4742, 0.4938, 0.4892]}, {"w": "model", "b": [0.4999, 0.4742, 0.5491, 0.4892]}, {"w": "errors", "b": [0.5552, 0.4742, 0.602, 0.4892]}, {"w": "is", "b": [0.6082, 0.4742, 0.6207, 0.4892]}, {"w": "to", "b": [0.6268, 0.4742, 0.6434, 0.4892]}, {"w": "dose", "b": [0.6495, 0.4742, 0.6848, 0.4892]}, {"w": "the", "b": [0.6909, 0.4742, 0.7168, 0.4892]}, {"w": "user’s", "b": [0.7229, 0.4742, 0.7687, 0.4892]}, {"w": "exposure", "b": [0.7749, 0.4742, 0.8464, 0.4892]}, {"w": "to", "b": [0.8526, 0.4742, 0.8691, 0.4892]}, {"w": "the", "b": [0.1312, 0.4922, 0.1567, 0.5071]}, {"w": "model.", "b": [0.1629, 0.4922, 0.2163, 0.5071]}, {"w": "Measure", "b": [0.2245, 0.4922, 0.2914, 0.5071]}, {"w": "the", "b": [0.2975, 0.4922, 0.323, 0.5071]}, {"w": "number", "b": [0.3292, 0.4922, 0.3898, 0.5071]}, {"w": "of", "b": [0.396, 0.4922, 0.4107, 0.5071]}, {"w": "errors", "b": [0.4169, 0.4922, 0.463, 0.5071]}, {"w": "your", "b": [0.4691, 0.4922, 0.5048, 0.5071]}, {"w": "model", "b": [0.511, 0.4922, 0.5593, 0.5071]}, {"w": "makes,", "b": [0.5655, 0.4922, 0.6195, 0.5071]}, {"w": "and", "b": [0.6257, 0.4922, 0.6552, 0.5071]}, {"w": "estimate", "b": [0.6614, 0.4922, 0.7287, 0.5071]}, {"w": "how", "b": [0.7348, 0.4922, 0.7669, 0.5071]}, {"w": "many", "b": [0.7731, 0.4922, 0.8168, 0.5071]}, {"w": "errors", "b": [0.823, 0.4922, 0.8691, 0.5071]}, {"w": "per", "b": [0.1312, 0.5102, 0.157, 0.5251]}, {"w": "minute", "b": [0.1631, 0.5102, 0.2181, 0.5251]}, {"w": "(day,", "b": [0.2242, 0.5102, 0.263, 0.5251]}, {"w": "week,", "b": [0.2691, 0.5102, 0.3124, 0.5251]}, {"w": "or", "b": [0.3186, 0.5102, 0.3348, 0.5251]}, {"w": "month)", "b": [0.3409, 0.5102, 0.3988, 0.5251]}, {"w": "a", "b": [0.405, 0.5102, 0.414, 0.5251]}, {"w": "user", "b": [0.4202, 0.5102, 0.4526, 0.5251]}, {"w": "is", "b": [0.4587, 0.5102, 0.4709, 0.5251]}, {"w": "ready", "b": [0.4771, 0.5102, 0.521, 0.5251]}, {"w": "to", "b": [0.5271, 0.5102, 0.5432, 0.5251]}, {"w": "tolerate.", "b": [0.5494, 0.5102, 0.6149, 0.5251]}, {"w": "Then", "b": [0.6231, 0.5102, 0.6645, 0.5251]}, {"w": "limit", "b": [0.6706, 0.5102, 0.7079, 0.5251]}, {"w": "the", "b": [0.714, 0.5102, 0.7392, 0.5251]}, {"w": "interactions", "b": [0.7454, 0.5102, 0.8378, 0.5251]}, {"w": "the", "b": [0.8439, 0.5102, 0.8691, 0.5251]}, {"w": "user", "b": [0.1312, 0.5281, 0.1642, 0.543]}, {"w": "will", "b": [0.1704, 0.5281, 0.1991, 0.543]}, {"w": "have", "b": [0.2052, 0.5281, 0.2416, 0.543]}, {"w": "with", "b": [0.2478, 0.5281, 0.2837, 0.543]}, {"w": "the", "b": [0.2898, 0.5281, 0.3154, 0.543]}, {"w": "model", "b": [0.3216, 0.5281, 0.3703, 0.543]}, {"w": "to", "b": [0.3765, 0.5281, 0.3929, 0.543]}, {"w": "keep", "b": [0.399, 0.5281, 0.4349, 0.543]}, {"w": "the", "b": [0.4411, 0.5281, 0.4667, 0.543]}, {"w": "number", "b": [0.4729, 0.5281, 0.5339, 0.543]}, {"w": "of", "b": [0.5401, 0.5281, 0.5549, 0.543]}, {"w": "perceived", "b": [0.5611, 0.5281, 0.6365, 0.543]}, {"w": "errors", "b": [0.6427, 0.5281, 0.6891, 0.543]}, {"w": "below", "b": [0.6952, 0.5281, 0.7414, 0.543]}, {"w": "that", "b": [0.7475, 0.5281, 0.7814, 0.543]}, {"w": "level.", "b": [0.7875, 0.5281, 0.8286, 0.543]}]}, {"id": "b_8", "type": "paragraph", "text": "For situations when an error happened and might have been perceived, add a possibility for the user to report the error. Once the report is received, log the context in which the model was used, as well as the prediction of the model. Explain to the user what actions will be taken to prevent a similar error from happening in the future.", "words": [{"w": "For", "b": [0.1312, 0.5551, 0.158, 0.57]}, {"w": "situations", "b": [0.1642, 0.5551, 0.2417, 0.57]}, {"w": "when", "b": [0.2479, 0.5551, 0.2896, 0.57]}, {"w": "an", "b": [0.2958, 0.5551, 0.3151, 0.57]}, {"w": "error", "b": [0.3213, 0.5551, 0.3601, 0.57]}, {"w": "happened", "b": [0.3663, 0.5551, 0.4432, 0.57]}, {"w": "and", "b": [0.4493, 0.5551, 0.4789, 0.57]}, {"w": "might", "b": [0.485, 0.5551, 0.5313, 0.57]}, {"w": "have", "b": [0.5375, 0.5551, 0.5736, 0.57]}, {"w": "been", "b": [0.5798, 0.5551, 0.617, 0.57]}, {"w": "perceived,", "b": [0.6231, 0.5551, 0.7031, 0.57]}, {"w": "add", "b": [0.7093, 0.5551, 0.7388, 0.57]}, {"w": "a", "b": [0.7449, 0.5551, 0.7541, 0.57]}, {"w": "possibility", "b": [0.7603, 0.5551, 0.8414, 0.57]}, {"w": "for", "b": [0.8476, 0.5551, 0.8695, 0.57]}, {"w": "the", "b": [0.1312, 0.573, 0.1566, 0.5879]}, {"w": "user", "b": [0.1627, 0.573, 0.1954, 0.5879]}, {"w": "to", "b": [0.2015, 0.573, 0.2177, 0.5879]}, {"w": "report", "b": [0.2238, 0.573, 0.2731, 0.5879]}, {"w": "the", "b": [0.2793, 0.573, 0.3046, 0.5879]}, {"w": "error.", "b": [0.3108, 0.573, 0.3546, 0.5879]}, {"w": "Once", "b": [0.3627, 0.573, 0.4033, 0.5879]}, {"w": "the", "b": [0.4095, 0.573, 0.4348, 0.5879]}, {"w": "report", "b": [0.4409, 0.573, 0.4902, 0.5879]}, {"w": "is", "b": [0.4964, 0.573, 0.5087, 0.5879]}, {"w": "received,", "b": [0.5148, 0.573, 0.5838, 0.5879]}, {"w": "log", "b": [0.59, 0.573, 0.6133, 0.5879]}, {"w": "the", "b": [0.6194, 0.573, 0.6448, 0.5879]}, {"w": "context", "b": [0.6509, 0.573, 0.7097, 0.5879]}, {"w": "in", "b": [0.7159, 0.573, 0.7311, 0.5879]}, {"w": "which", "b": [0.7372, 0.573, 0.7834, 0.5879]}, {"w": "the", "b": [0.7895, 0.573, 0.8149, 0.5879]}, {"w": "model", "b": [0.821, 0.573, 0.8692, 0.5879]}, {"w": "was", "b": [0.1306, 0.5908, 0.1605, 0.6059]}, {"w": "used,", "b": [0.1668, 0.5908, 0.2087, 0.6059]}, {"w": "as", "b": [0.215, 0.5908, 0.2318, 0.6059]}, {"w": "well", "b": [0.2381, 0.5908, 0.27, 0.6059]}, {"w": "as", "b": [0.2763, 0.5908, 0.2931, 0.6059]}, {"w": "the", "b": [0.2994, 0.5908, 0.3256, 0.6059]}, {"w": "prediction", "b": [0.3318, 0.5908, 0.4145, 0.6059]}, {"w": "of", "b": [0.4208, 0.5908, 0.436, 0.6059]}, {"w": "the", "b": [0.4422, 0.5908, 0.4684, 0.6059]}, {"w": "model.", "b": [0.4747, 0.5908, 0.5296, 0.6059]}, {"w": "Explain", "b": [0.5381, 0.5908, 0.6017, 0.6059]}, {"w": "to", "b": [0.6079, 0.5908, 0.6247, 0.6059]}, {"w": "the", "b": [0.6309, 0.5908, 0.6571, 0.6059]}, {"w": "user", "b": [0.6634, 0.5908, 0.697, 0.6059]}, {"w": "what", "b": [0.7033, 0.5908, 0.744, 0.6059]}, {"w": "actions", "b": [0.7503, 0.5908, 0.808, 0.6059]}, {"w": "will", "b": [0.8142, 0.5908, 0.8435, 0.6059]}, {"w": "be", "b": [0.8498, 0.5908, 0.8691, 0.6059]}, {"w": "taken", "b": [0.1312, 0.6089, 0.1753, 0.6238]}, {"w": "to", "b": [0.1815, 0.6089, 0.1979, 0.6238]}, {"w": "prevent", "b": [0.204, 0.6089, 0.2641, 0.6238]}, {"w": "a", "b": [0.2702, 0.6089, 0.2795, 0.6238]}, {"w": "similar", "b": [0.2856, 0.6089, 0.3401, 0.6238]}, {"w": "error", "b": [0.3463, 0.6089, 0.3854, 0.6238]}, {"w": "from", "b": [0.3915, 0.6089, 0.429, 0.6238]}, {"w": "happening", "b": [0.4351, 0.6089, 0.5187, 0.6238]}, {"w": "in", "b": [0.5249, 0.6089, 0.5403, 0.6238]}, {"w": "the", "b": [0.5464, 0.6089, 0.5721, 0.6238]}, {"w": "future.", "b": [0.5782, 0.6089, 0.6321, 0.6238]}]}, {"id": "b_9", "type": "paragraph", "text": "It’s appropriate to measure the user’s engagement with the system, log all interactions, and then analyze suspicious interactions offline. This includes:", "words": [{"w": "It’s", "b": [0.1312, 0.6358, 0.1574, 0.6507]}, {"w": "appropriate", "b": [0.1635, 0.6358, 0.2564, 0.6507]}, {"w": "to", "b": [0.2626, 0.6358, 0.2789, 0.6507]}, {"w": "measure", "b": [0.285, 0.6358, 0.3505, 0.6507]}, {"w": "the", "b": [0.3566, 0.6358, 0.3822, 0.6507]}, {"w": "user’s", "b": [0.3883, 0.6358, 0.4335, 0.6507]}, {"w": "engagement", "b": [0.4396, 0.6358, 0.534, 0.6507]}, {"w": "with", "b": [0.5401, 0.6358, 0.5758, 0.6507]}, {"w": "the", "b": [0.582, 0.6358, 0.6075, 0.6507]}, {"w": "system,", "b": [0.6136, 0.6358, 0.6735, 0.6507]}, {"w": "log", "b": [0.6796, 0.6358, 0.7031, 0.6507]}, {"w": "all", "b": [0.7092, 0.6358, 0.7286, 0.6507]}, {"w": "interactions,", "b": [0.7348, 0.6358, 0.8334, 0.6507]}, {"w": "and", "b": [0.8395, 0.6358, 0.8691, 0.6507]}, {"w": "then", "b": [0.1312, 0.6537, 0.1671, 0.6687]}, {"w": "analyze", "b": [0.1733, 0.6537, 0.2333, 0.6687]}, {"w": "suspicious", "b": [0.2394, 0.6537, 0.3197, 0.6687]}, {"w": "interactions", "b": [0.3259, 0.6537, 0.4199, 0.6687]}, {"w": "offline.", "b": [0.4261, 0.6537, 0.4794, 0.6687]}, {"w": "This", "b": [0.4876, 0.6537, 0.5236, 0.6687]}, {"w": "includes:", "b": [0.5297, 0.6537, 0.5996, 0.6687]}]}, {"id": "b_10", "type": "paragraph", "text": "• whether the user interacts with the system less than before, • whether the user ignored certain recommendations, and • whether the user spent adequate time in various settings.", "words": [{"w": "•", "b": [0.1538, 0.6806, 0.1681, 0.6956]}, {"w": "whether", "b": [0.1774, 0.6806, 0.242, 0.6956]}, {"w": "the", "b": [0.2482, 0.6806, 0.2738, 0.6956]}, {"w": "user", "b": [0.28, 0.6806, 0.3129, 0.6956]}, {"w": "interacts", "b": [0.3191, 0.6806, 0.3885, 0.6956]}, {"w": "with", "b": [0.3946, 0.6806, 0.4305, 0.6956]}, {"w": "the", "b": [0.4367, 0.6806, 0.4623, 0.6956]}, {"w": "system", "b": [0.4684, 0.6806, 0.5235, 0.6956]}, {"w": "less", "b": [0.5297, 0.6806, 0.5576, 0.6956]}, {"w": "than", "b": [0.5637, 0.6806, 0.6007, 0.6956]}, {"w": "before,", "b": [0.6068, 0.6806, 0.6612, 0.6956]}, {"w": "•", "b": [0.1538, 0.6986, 0.1681, 0.7135]}, {"w": "whether", "b": [0.1774, 0.6986, 0.242, 0.7135]}, {"w": "the", "b": [0.2482, 0.6986, 0.2738, 0.7135]}, {"w": "user", "b": [0.28, 0.6986, 0.3129, 0.7135]}, {"w": "ignored", "b": [0.3191, 0.6986, 0.3786, 0.7135]}, {"w": "certain", "b": [0.3848, 0.6986, 0.4402, 0.7135]}, {"w": "recommendations,", "b": [0.4464, 0.6986, 0.5921, 0.7135]}, {"w": "and", "b": [0.5983, 0.6986, 0.628, 0.7135]}, {"w": "•", "b": [0.1538, 0.7165, 0.1681, 0.7315]}, {"w": "whether", "b": [0.1774, 0.7165, 0.242, 0.7315]}, {"w": "the", "b": [0.2482, 0.7165, 0.2738, 0.7315]}, {"w": "user", "b": [0.28, 0.7165, 0.3129, 0.7315]}, {"w": "spent", "b": [0.3191, 0.7165, 0.3623, 0.7315]}, {"w": "adequate", "b": [0.3684, 0.7165, 0.4407, 0.7315]}, {"w": "time", "b": [0.4469, 0.7165, 0.4828, 0.7315]}, {"w": "in", "b": [0.4889, 0.7165, 0.5043, 0.7315]}, {"w": "various", "b": [0.5104, 0.7165, 0.5675, 0.7315]}, {"w": "settings.", "b": [0.5737, 0.7165, 0.6405, 0.7315]}]}, {"id": "b_11", "type": "paragraph", "text": "To reduce an error’s negative impact even further, if the system allows it, give the user an option to undo an action recommended by the system. Extend this, if possible, to any automated action executed by the system on the user’s behalf.", "words": [{"w": "To", "b": [0.1306, 0.7433, 0.152, 0.7584]}, {"w": "reduce", "b": [0.1596, 0.7433, 0.2131, 0.7584]}, {"w": "an", "b": [0.2207, 0.7433, 0.2406, 0.7584]}, {"w": "error’s", "b": [0.2482, 0.7433, 0.3008, 0.7584]}, {"w": "negative", "b": [0.3084, 0.7433, 0.3764, 0.7584]}, {"w": "impact", "b": [0.384, 0.7433, 0.4405, 0.7584]}, {"w": "even", "b": [0.4481, 0.7433, 0.4847, 0.7584]}, {"w": "further,", "b": [0.4923, 0.7433, 0.5547, 0.7584]}, {"w": "if", "b": [0.5627, 0.7433, 0.5737, 0.7584]}, {"w": "the", "b": [0.5813, 0.7433, 0.6074, 0.7584]}, {"w": "system", "b": [0.6151, 0.7433, 0.6712, 0.7584]}, {"w": "allows", "b": [0.6789, 0.7433, 0.7287, 0.7584]}, {"w": "it,", "b": [0.7363, 0.7433, 0.754, 0.7584]}, {"w": "give", "b": [0.762, 0.7433, 0.7945, 0.7584]}, {"w": "the", "b": [0.8021, 0.7433, 0.8282, 0.7584]}, {"w": "user", "b": [0.8359, 0.7433, 0.8695, 0.7584]}, {"w": "an", "b": [0.1312, 0.7613, 0.1511, 0.7764]}, {"w": "option", "b": [0.1574, 0.7613, 0.2097, 0.7764]}, {"w": "to", "b": [0.216, 0.7613, 0.2327, 0.7764]}, {"w": "undo", "b": [0.2389, 0.7613, 0.2797, 0.7764]}, {"w": "an", "b": [0.286, 0.7613, 0.3059, 0.7764]}, {"w": "action", "b": [0.3122, 0.7613, 0.3624, 0.7764]}, {"w": "recommended", "b": [0.3686, 0.7613, 0.4817, 0.7764]}, {"w": "by", "b": [0.488, 0.7613, 0.5078, 0.7764]}, {"w": "the", "b": [0.5141, 0.7613, 0.5403, 0.7764]}, {"w": "system.", "b": [0.5465, 0.7613, 0.6079, 0.7764]}, {"w": "Extend", "b": [0.6165, 0.7613, 0.6759, 0.7764]}, {"w": "this,", "b": [0.6822, 0.7613, 0.7178, 0.7764]}, {"w": "if", "b": [0.7241, 0.7613, 0.7351, 0.7764]}, {"w": "possible,", "b": [0.7414, 0.7613, 0.8112, 0.7764]}, {"w": "to", "b": [0.8175, 0.7613, 0.8342, 0.7764]}, {"w": "any", "b": [0.8405, 0.7613, 0.8698, 0.7764]}, {"w": "automated", "b": [0.1312, 0.7793, 0.2174, 0.7943]}, {"w": "action", "b": [0.2235, 0.7793, 0.2727, 0.7943]}, {"w": "executed", "b": [0.2789, 0.7793, 0.3491, 0.7943]}, {"w": "by", "b": [0.3553, 0.7793, 0.3748, 0.7943]}, {"w": "the", "b": [0.3809, 0.7793, 0.4066, 0.7943]}, {"w": "system", "b": [0.4127, 0.7793, 0.4678, 0.7943]}, {"w": "on", "b": [0.4739, 0.7793, 0.4934, 0.7943]}, {"w": "the", "b": [0.4996, 0.7793, 0.5252, 0.7943]}, {"w": "user’s", "b": [0.5314, 0.7793, 0.5768, 0.7943]}, {"w": "behalf.", "b": [0.5829, 0.7793, 0.6373, 0.7943]}]}, {"id": "b_12", "type": "paragraph", "text": "Software applications that act on their user’s behalf must be especially limited in their possible actions. Recall that machine-learning models’ errors can be arbitrarily “crazy” like in the example of a self-driving car that can suddenly decide to drive backward. Caution must be exercised in other critical scenarios involving health, safety, or money, such as bidding in", "words": [{"w": "Software", "b": [0.1312, 0.8062, 0.2019, 0.8213]}, {"w": "applications", "b": [0.2099, 0.8062, 0.3084, 0.8213]}, {"w": "that", "b": [0.3163, 0.8062, 0.3509, 0.8213]}, {"w": "act", "b": [0.3589, 0.8062, 0.384, 0.8213]}, {"w": "on", "b": [0.392, 0.8062, 0.4119, 0.8213]}, {"w": "their", "b": [0.4199, 0.8062, 0.4586, 0.8213]}, {"w": "user’s", "b": [0.4666, 0.8062, 0.513, 0.8213]}, {"w": "behalf", "b": [0.521, 0.8062, 0.5712, 0.8213]}, {"w": "must", "b": [0.5792, 0.8062, 0.6196, 0.8213]}, {"w": "be", "b": [0.6276, 0.8062, 0.6469, 0.8213]}, {"w": "especially", "b": [0.6549, 0.8062, 0.7335, 0.8213]}, {"w": "limited", "b": [0.7415, 0.8062, 0.799, 0.8213]}, {"w": "in", "b": [0.8071, 0.8062, 0.8227, 0.8213]}, {"w": "their", "b": [0.8307, 0.8062, 0.8695, 0.8213]}, {"w": "possible", "b": [0.1312, 0.8243, 0.1933, 0.8391]}, {"w": "actions.", "b": [0.1986, 0.8243, 0.259, 0.8391]}, {"w": "Recall", "b": [0.2669, 0.8243, 0.3154, 0.8391]}, {"w": "that", "b": [0.3207, 0.8243, 0.3539, 0.8391]}, {"w": "machine-learning", "b": [0.3592, 0.8243, 0.4934, 0.8391]}, {"w": "models’", "b": [0.4987, 0.8243, 0.5586, 0.8391]}, {"w": "errors", "b": [0.5639, 0.8243, 0.6094, 0.8391]}, {"w": "can", "b": [0.6147, 0.8243, 0.6419, 0.8391]}, {"w": "be", "b": [0.6472, 0.8243, 0.6658, 0.8391]}, {"w": "arbitrarily", "b": [0.6711, 0.8243, 0.7521, 0.8391]}, {"w": "“crazy”", "b": [0.7575, 0.8243, 0.8163, 0.8391]}, {"w": "like", "b": [0.8216, 0.8243, 0.8487, 0.8391]}, {"w": "in", "b": [0.8541, 0.8243, 0.8691, 0.8391]}, {"w": "the", "b": [0.1312, 0.8422, 0.1567, 0.8571]}, {"w": "example", "b": [0.1628, 0.8422, 0.2284, 0.8571]}, {"w": "of", "b": [0.2346, 0.8422, 0.2494, 0.8571]}, {"w": "a", "b": [0.2555, 0.8422, 0.2647, 0.8571]}, {"w": "self-driving", "b": [0.2708, 0.8422, 0.3595, 0.8571]}, {"w": "car", "b": [0.3657, 0.8422, 0.3901, 0.8571]}, {"w": "that", "b": [0.3963, 0.8422, 0.4298, 0.8571]}, {"w": "can", "b": [0.436, 0.8422, 0.4635, 0.8571]}, {"w": "suddenly", "b": [0.4696, 0.8422, 0.5405, 0.8571]}, {"w": "decide", "b": [0.5466, 0.8422, 0.5965, 0.8571]}, {"w": "to", "b": [0.6026, 0.8422, 0.6189, 0.8571]}, {"w": "drive", "b": [0.6251, 0.8422, 0.6648, 0.8571]}, {"w": "backward.", "b": [0.671, 0.8422, 0.7519, 0.8571]}, {"w": "Caution", "b": [0.7601, 0.8422, 0.8242, 0.8571]}, {"w": "must", "b": [0.8304, 0.8422, 0.8696, 0.8571]}, {"w": "be", "b": [0.1312, 0.8601, 0.1501, 0.8751]}, {"w": "exercised", "b": [0.1563, 0.8601, 0.2283, 0.8751]}, {"w": "in", "b": [0.2345, 0.8601, 0.2498, 0.8751]}, {"w": "other", "b": [0.2559, 0.8601, 0.2977, 0.8751]}, {"w": "critical", "b": [0.3039, 0.8601, 0.359, 0.8751]}, {"w": "scenarios", "b": [0.3652, 0.8601, 0.4368, 0.8751]}, {"w": "involving", "b": [0.443, 0.8601, 0.5153, 0.8751]}, {"w": "health,", "b": [0.5215, 0.8601, 0.5765, 0.8751]}, {"w": "safety,", "b": [0.5827, 0.8601, 0.6327, 0.8751]}, {"w": "or", "b": [0.6389, 0.8601, 0.6552, 0.8751]}, {"w": "money,", "b": [0.6614, 0.8601, 0.7174, 0.8751]}, {"w": "such", "b": [0.7236, 0.8601, 0.7589, 0.8751]}, {"w": "as", "b": [0.765, 0.8601, 0.7814, 0.8751]}, {"w": "bidding", "b": [0.7876, 0.8601, 0.8477, 0.8751]}, {"w": "in", "b": [0.8539, 0.8601, 0.8692, 0.8751]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 11", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "11", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 275, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "auctions or prescribing medication. If the model predicts to buy or sell more stocks than the moving average plus one standard deviations, it’s a good idea to send an alert and put an otherwise “automatic” action on hold. The same logic should apply if the model predicts to serve an unreasonably high dose of a drug to a patient, or change the speed of the car to a value substantially above or below usual.", "words": [{"w": "auctions", "b": [0.1312, 0.0885, 0.1967, 0.1033]}, {"w": "or", "b": [0.2029, 0.0885, 0.219, 0.1033]}, {"w": "prescribing", "b": [0.2252, 0.0885, 0.3119, 0.1033]}, {"w": "medication.", "b": [0.3181, 0.0885, 0.4097, 0.1033]}, {"w": "If", "b": [0.4179, 0.0885, 0.43, 0.1033]}, {"w": "the", "b": [0.4361, 0.0885, 0.4613, 0.1033]}, {"w": "model", "b": [0.4675, 0.0885, 0.5153, 0.1033]}, {"w": "predicts", "b": [0.5214, 0.0885, 0.584, 0.1033]}, {"w": "to", "b": [0.5901, 0.0885, 0.6062, 0.1033]}, {"w": "buy", "b": [0.6124, 0.0885, 0.6421, 0.1033]}, {"w": "or", "b": [0.6482, 0.0885, 0.6644, 0.1033]}, {"w": "sell", "b": [0.6706, 0.0885, 0.6958, 0.1033]}, {"w": "more", "b": [0.702, 0.0885, 0.7413, 0.1033]}, {"w": "stocks", "b": [0.7474, 0.0885, 0.7954, 0.1033]}, {"w": "than", "b": [0.8016, 0.0885, 0.8378, 0.1033]}, {"w": "the", "b": [0.844, 0.0885, 0.8691, 0.1033]}, {"w": "moving", "b": [0.1312, 0.1062, 0.1907, 0.1213]}, {"w": "average", "b": [0.1969, 0.1062, 0.258, 0.1213]}, {"w": "plus", "b": [0.2641, 0.1062, 0.2977, 0.1213]}, {"w": "one", "b": [0.3038, 0.1062, 0.332, 0.1213]}, {"w": "standard", "b": [0.3381, 0.1062, 0.4103, 0.1213]}, {"w": "deviations,", "b": [0.4165, 0.1062, 0.5048, 0.1213]}, {"w": "it’s", "b": [0.511, 0.1062, 0.5361, 0.1213]}, {"w": "a", "b": [0.5422, 0.1062, 0.5516, 0.1213]}, {"w": "good", "b": [0.5578, 0.1062, 0.5974, 0.1213]}, {"w": "idea", "b": [0.6036, 0.1062, 0.637, 0.1213]}, {"w": "to", "b": [0.6431, 0.1062, 0.6598, 0.1213]}, {"w": "send", "b": [0.666, 0.1062, 0.7026, 0.1213]}, {"w": "an", "b": [0.7088, 0.1062, 0.7286, 0.1213]}, {"w": "alert", "b": [0.7347, 0.1062, 0.7724, 0.1213]}, {"w": "and", "b": [0.7785, 0.1062, 0.8088, 0.1213]}, {"w": "put", "b": [0.8149, 0.1062, 0.8431, 0.1213]}, {"w": "an", "b": [0.8493, 0.1062, 0.8691, 0.1213]}, {"w": "otherwise", "b": [0.1312, 0.1243, 0.2067, 0.1392]}, {"w": "“automatic”", "b": [0.2129, 0.1243, 0.3106, 0.1392]}, {"w": "action", "b": [0.3168, 0.1243, 0.3656, 0.1392]}, {"w": "on", "b": [0.3718, 0.1243, 0.3911, 0.1392]}, {"w": "hold.", "b": [0.3973, 0.1243, 0.437, 0.1392]}, {"w": "The", "b": [0.4452, 0.1243, 0.4768, 0.1392]}, {"w": "same", "b": [0.4829, 0.1243, 0.5227, 0.1392]}, {"w": "logic", "b": [0.5289, 0.1243, 0.5655, 0.1392]}, {"w": "should", "b": [0.5717, 0.1243, 0.6238, 0.1392]}, {"w": "apply", "b": [0.6299, 0.1243, 0.6742, 0.1392]}, {"w": "if", "b": [0.6803, 0.1243, 0.691, 0.1392]}, {"w": "the", "b": [0.6972, 0.1243, 0.7227, 0.1392]}, {"w": "model", "b": [0.7288, 0.1243, 0.7772, 0.1392]}, {"w": "predicts", "b": [0.7833, 0.1243, 0.8466, 0.1392]}, {"w": "to", "b": [0.8528, 0.1243, 0.8691, 0.1392]}, {"w": "serve", "b": [0.1312, 0.1422, 0.1717, 0.1572]}, {"w": "an", "b": [0.1778, 0.1422, 0.1974, 0.1572]}, {"w": "unreasonably", "b": [0.2036, 0.1422, 0.3106, 0.1572]}, {"w": "high", "b": [0.3167, 0.1422, 0.3519, 0.1572]}, {"w": "dose", "b": [0.358, 0.1422, 0.3932, 0.1572]}, {"w": "of", "b": [0.3993, 0.1422, 0.4143, 0.1572]}, {"w": "a", "b": [0.4204, 0.1422, 0.4297, 0.1572]}, {"w": "drug", "b": [0.4359, 0.1422, 0.4731, 0.1572]}, {"w": "to", "b": [0.4792, 0.1422, 0.4958, 0.1572]}, {"w": "a", "b": [0.5019, 0.1422, 0.5112, 0.1572]}, {"w": "patient,", "b": [0.5173, 0.1422, 0.5798, 0.1572]}, {"w": "or", "b": [0.5859, 0.1422, 0.6025, 0.1572]}, {"w": "change", "b": [0.6086, 0.1422, 0.6639, 0.1572]}, {"w": "the", "b": [0.67, 0.1422, 0.6958, 0.1572]}, {"w": "speed", "b": [0.702, 0.1422, 0.747, 0.1572]}, {"w": "of", "b": [0.7531, 0.1422, 0.7681, 0.1572]}, {"w": "the", "b": [0.7743, 0.1422, 0.8001, 0.1572]}, {"w": "car", "b": [0.8062, 0.1422, 0.831, 0.1572]}, {"w": "to", "b": [0.8372, 0.1422, 0.8537, 0.1572]}, {"w": "a", "b": [0.8598, 0.1422, 0.8691, 0.1572]}, {"w": "value", "b": [0.1308, 0.1602, 0.1723, 0.1751]}, {"w": "substantially", "b": [0.1784, 0.1602, 0.2812, 0.1751]}, {"w": "above", "b": [0.2874, 0.1602, 0.3335, 0.1751]}, {"w": "or", "b": [0.3396, 0.1602, 0.3561, 0.1751]}, {"w": "below", "b": [0.3623, 0.1602, 0.4084, 0.1751]}, {"w": "usual.", "b": [0.4145, 0.1602, 0.4618, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "If your system can automatically reject the model prediction, it’s best to implement some fallback strategy, in addition to informing the user about a failure (Figure 4). A less sophisticated model or a handcrafted heuristic may be used as a fallback. Of course, the output of the fallback strategy should also be validated, and also rejected if it seems unreasonable. In this case, an error message should be sent to the user.", "words": [{"w": "If", "b": [0.1312, 0.187, 0.1438, 0.2021]}, {"w": "your", "b": [0.1499, 0.187, 0.1866, 0.2021]}, {"w": "system", "b": [0.1927, 0.187, 0.2488, 0.2021]}, {"w": "can", "b": [0.255, 0.187, 0.2832, 0.2021]}, {"w": "automatically", "b": [0.2893, 0.187, 0.4016, 0.2021]}, {"w": "reject", "b": [0.4078, 0.187, 0.4533, 0.2021]}, {"w": "the", "b": [0.4595, 0.187, 0.4856, 0.2021]}, {"w": "model", "b": [0.4917, 0.187, 0.5414, 0.2021]}, {"w": "prediction,", "b": [0.5475, 0.187, 0.6353, 0.2021]}, {"w": "it’s", "b": [0.6415, 0.187, 0.6667, 0.2021]}, {"w": "best", "b": [0.6728, 0.187, 0.7069, 0.2021]}, {"w": "to", "b": [0.713, 0.187, 0.7297, 0.2021]}, {"w": "implement", "b": [0.7359, 0.187, 0.8221, 0.2021]}, {"w": "some", "b": [0.8282, 0.187, 0.8691, 0.2021]}, {"w": "fallback", "b": [0.1312, 0.2049, 0.1945, 0.22]}, {"w": "strategy,", "b": [0.2033, 0.2049, 0.2736, 0.22]}, {"w": "in", "b": [0.2831, 0.2049, 0.2988, 0.22]}, {"w": "addition", "b": [0.3076, 0.2049, 0.3756, 0.22]}, {"w": "to", "b": [0.3844, 0.2049, 0.4011, 0.22]}, {"w": "informing", "b": [0.4099, 0.2049, 0.4889, 0.22]}, {"w": "the", "b": [0.4977, 0.2049, 0.5239, 0.22]}, {"w": "user", "b": [0.5326, 0.2049, 0.5663, 0.22]}, {"w": "about", "b": [0.5751, 0.2049, 0.6227, 0.22]}, {"w": "a", "b": [0.6315, 0.2049, 0.6409, 0.22]}, {"w": "failure", "b": [0.6497, 0.2049, 0.7015, 0.22]}, {"w": "(Figure", "b": [0.7103, 0.2049, 0.7708, 0.22]}, {"w": "4).", "b": [0.7796, 0.2049, 0.8016, 0.22]}, {"w": "A", "b": [0.8177, 0.2049, 0.8318, 0.22]}, {"w": "less", "b": [0.8406, 0.2049, 0.8691, 0.22]}, {"w": "sophisticated", "b": [0.1312, 0.2229, 0.2382, 0.238]}, {"w": "model", "b": [0.2473, 0.2229, 0.297, 0.238]}, {"w": "or", "b": [0.3061, 0.2229, 0.3229, 0.238]}, {"w": "a", "b": [0.3321, 0.2229, 0.3415, 0.238]}, {"w": "handcrafted", "b": [0.3507, 0.2229, 0.4485, 0.238]}, {"w": "heuristic", "b": [0.4577, 0.2229, 0.5279, 0.238]}, {"w": "may", "b": [0.5371, 0.2229, 0.5716, 0.238]}, {"w": "be", "b": [0.5808, 0.2229, 0.6001, 0.238]}, {"w": "used", "b": [0.6093, 0.2229, 0.646, 0.238]}, {"w": "as", "b": [0.6552, 0.2229, 0.672, 0.238]}, {"w": "a", "b": [0.6812, 0.2229, 0.6906, 0.238]}, {"w": "fallback.", "b": [0.6997, 0.2229, 0.7682, 0.238]}, {"w": "Of", "b": [0.7855, 0.2229, 0.8059, 0.238]}, {"w": "course,", "b": [0.8151, 0.2229, 0.8717, 0.238]}, {"w": "the", "b": [0.1312, 0.2408, 0.1574, 0.2559]}, {"w": "output", "b": [0.1643, 0.2408, 0.2197, 0.2559]}, {"w": "of", "b": [0.2266, 0.2408, 0.2418, 0.2559]}, {"w": "the", "b": [0.2487, 0.2408, 0.2749, 0.2559]}, {"w": "fallback", "b": [0.2818, 0.2408, 0.3451, 0.2559]}, {"w": "strategy", "b": [0.352, 0.2408, 0.4186, 0.2559]}, {"w": "should", "b": [0.4254, 0.2408, 0.4789, 0.2559]}, {"w": "also", "b": [0.4858, 0.2408, 0.5173, 0.2559]}, {"w": "be", "b": [0.5242, 0.2408, 0.5435, 0.2559]}, {"w": "validated,", "b": [0.5504, 0.2408, 0.6305, 0.2559]}, {"w": "and", "b": [0.6376, 0.2408, 0.6679, 0.2559]}, {"w": "also", "b": [0.6748, 0.2408, 0.7063, 0.2559]}, {"w": "rejected", "b": [0.7132, 0.2408, 0.7776, 0.2559]}, {"w": "if", "b": [0.7845, 0.2408, 0.7955, 0.2559]}, {"w": "it", "b": [0.8024, 0.2408, 0.815, 0.2559]}, {"w": "seems", "b": [0.8219, 0.2408, 0.8692, 0.2559]}, {"w": "unreasonable.", "b": [0.1312, 0.2589, 0.2411, 0.2738]}, {"w": "In", "b": [0.2493, 0.2589, 0.2662, 0.2738]}, {"w": "this", "b": [0.2724, 0.2589, 0.3022, 0.2738]}, {"w": "case,", "b": [0.3084, 0.2589, 0.3464, 0.2738]}, {"w": "an", "b": [0.3526, 0.2589, 0.3721, 0.2738]}, {"w": "error", "b": [0.3782, 0.2589, 0.4174, 0.2738]}, {"w": "message", "b": [0.4235, 0.2589, 0.4883, 0.2738]}, {"w": "should", "b": [0.4945, 0.2589, 0.5469, 0.2738]}, {"w": "be", "b": [0.553, 0.2589, 0.572, 0.2738]}, {"w": "sent", "b": [0.5781, 0.2589, 0.6106, 0.2738]}, {"w": "to", "b": [0.6167, 0.2589, 0.6331, 0.2738]}, {"w": "the", "b": [0.6393, 0.2589, 0.6649, 0.2738]}, {"w": "user.", "b": [0.6711, 0.2589, 0.7092, 0.2738]}]}, {"id": "b_2", "type": "equation", "text": "Figure 4: Real-world model serving flowchart.", "words": [{"w": "Figure", "b": [0.3148, 0.6926, 0.3669, 0.7076]}, {"w": "4:", "b": [0.3731, 0.6926, 0.3874, 0.7076]}, {"w": "Real-world", "b": [0.3956, 0.6926, 0.4826, 0.7076]}, {"w": "model", "b": [0.4887, 0.6926, 0.5374, 0.7076]}, {"w": "serving", "b": [0.5436, 0.6926, 0.6007, 0.7076]}, {"w": "flowchart.", "b": [0.6068, 0.6926, 0.6853, 0.7076]}]}, {"id": "b_3", "type": "paragraph", "text": "9.3.3 Being Ready for, and Dealing With, Change", "words": [{"w": "9.3.3", "b": [0.1312, 0.7519, 0.1749, 0.7668]}, {"w": "Being", "b": [0.1961, 0.7519, 0.2492, 0.7668]}, {"w": "Ready", "b": [0.2563, 0.7519, 0.3152, 0.7668]}, {"w": "for,", "b": [0.3223, 0.7519, 0.354, 0.7668]}, {"w": "and", "b": [0.3611, 0.7519, 0.395, 0.7668]}, {"w": "Dealing", "b": [0.4021, 0.7519, 0.4726, 0.7668]}, {"w": "With,", "b": [0.4796, 0.7519, 0.5334, 0.7668]}, {"w": "Change", "b": [0.5405, 0.7519, 0.61, 0.7668]}]}, {"id": "b_4", "type": "paragraph", "text": "The performance of a system based on machine learning usually changes over time. In some applications, it can change in near-real-time.", "words": [{"w": "The", "b": [0.1306, 0.7885, 0.162, 0.8034]}, {"w": "performance", "b": [0.1682, 0.7885, 0.2668, 0.8034]}, {"w": "of", "b": [0.273, 0.7885, 0.2877, 0.8034]}, {"w": "a", "b": [0.2939, 0.7885, 0.303, 0.8034]}, {"w": "system", "b": [0.3092, 0.7885, 0.3637, 0.8034]}, {"w": "based", "b": [0.3699, 0.7885, 0.4146, 0.8034]}, {"w": "on", "b": [0.4208, 0.7885, 0.4401, 0.8034]}, {"w": "machine", "b": [0.4463, 0.7885, 0.5117, 0.8034]}, {"w": "learning", "b": [0.5179, 0.7885, 0.5819, 0.8034]}, {"w": "usually", "b": [0.5881, 0.7885, 0.6446, 0.8034]}, {"w": "changes", "b": [0.6507, 0.7885, 0.7122, 0.8034]}, {"w": "over", "b": [0.7184, 0.7885, 0.7515, 0.8034]}, {"w": "time.", "b": [0.7576, 0.7885, 0.7982, 0.8034]}, {"w": "In", "b": [0.8065, 0.7885, 0.8232, 0.8034]}, {"w": "some", "b": [0.8294, 0.7885, 0.8691, 0.8034]}, {"w": "applications,", "b": [0.1312, 0.8064, 0.2329, 0.8214]}, {"w": "it", "b": [0.239, 0.8064, 0.2513, 0.8214]}, {"w": "can", "b": [0.2575, 0.8064, 0.2852, 0.8214]}, {"w": "change", "b": [0.2913, 0.8064, 0.3462, 0.8214]}, {"w": "in", "b": [0.3523, 0.8064, 0.3677, 0.8214]}, {"w": "near-real-time.", "b": [0.3739, 0.8064, 0.4919, 0.8214]}]}, {"id": "b_5", "type": "paragraph", "text": "There are two types of model change:", "words": [{"w": "There", "b": [0.1306, 0.8334, 0.1778, 0.8483]}, {"w": "are", "b": [0.1839, 0.8334, 0.2086, 0.8483]}, {"w": "two", "b": [0.2148, 0.8334, 0.2435, 0.8483]}, {"w": "types", "b": [0.2496, 0.8334, 0.2923, 0.8483]}, {"w": "of", "b": [0.2984, 0.8334, 0.3133, 0.8483]}, {"w": "model", "b": [0.3195, 0.8334, 0.3681, 0.8483]}, {"w": "change:", "b": [0.3743, 0.8334, 0.4343, 0.8483]}]}, {"id": "b_6", "type": "paragraph", "text": "1. Its quality could become better or worse.", "words": [{"w": "1.", "b": [0.1538, 0.8603, 0.1681, 0.8752]}, {"w": "Its", "b": [0.1774, 0.8603, 0.1985, 0.8752]}, {"w": "quality", "b": [0.2046, 0.8603, 0.2605, 0.8752]}, {"w": "could", "b": [0.2667, 0.8603, 0.3098, 0.8752]}, {"w": "become", "b": [0.3159, 0.8603, 0.3759, 0.8752]}, {"w": "better", "b": [0.382, 0.8603, 0.4308, 0.8752]}, {"w": "or", "b": [0.437, 0.8603, 0.4534, 0.8752]}, {"w": "worse.", "b": [0.4596, 0.8603, 0.5094, 0.8752]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 12", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "12", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 276, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "2. The predictions for some inputs can become different.", "words": [{"w": "2.", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "The", "b": [0.1774, 0.0884, 0.2091, 0.1033]}, {"w": "predictions", "b": [0.2153, 0.0884, 0.3037, 0.1033]}, {"w": "for", "b": [0.3098, 0.0884, 0.3319, 0.1033]}, {"w": "some", "b": [0.3381, 0.0884, 0.3781, 0.1033]}, {"w": "inputs", "b": [0.3843, 0.0884, 0.4347, 0.1033]}, {"w": "can", "b": [0.4408, 0.0884, 0.4685, 0.1033]}, {"w": "become", "b": [0.4747, 0.0884, 0.5346, 0.1033]}, {"w": "different.", "b": [0.5408, 0.0884, 0.6126, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "A typical reason for the model performance degradation over time is concept drift that we already considered in Section ?? of Chapter 3. The notion of what is a correct prediction may change because of the users’ preferences and interests. This would require retraining the model, using more recently labeled data.", "words": [{"w": "A", "b": [0.1305, 0.1154, 0.1442, 0.1302]}, {"w": "typical", "b": [0.1503, 0.1154, 0.2038, 0.1302]}, {"w": "reason", "b": [0.21, 0.1154, 0.2606, 0.1302]}, {"w": "for", "b": [0.2668, 0.1154, 0.2886, 0.1302]}, {"w": "the", "b": [0.2947, 0.1154, 0.32, 0.1302]}, {"w": "model", "b": [0.3261, 0.1154, 0.3741, 0.1302]}, {"w": "performance", "b": [0.3802, 0.1154, 0.4783, 0.1302]}, {"w": "degradation", "b": [0.4845, 0.1154, 0.5784, 0.1302]}, {"w": "over", "b": [0.5846, 0.1154, 0.6175, 0.1302]}, {"w": "time", "b": [0.6236, 0.1154, 0.659, 0.1302]}, {"w": "is", "b": [0.6651, 0.1154, 0.6773, 0.1302]}, {"w": "concept", "b": [0.6832, 0.1153, 0.7542, 0.1302]}, {"w": "drift", "b": [0.7613, 0.1153, 0.8025, 0.1302]}, {"w": "that", "b": [0.8086, 0.1154, 0.8419, 0.1302]}, {"w": "we", "b": [0.8481, 0.1154, 0.8688, 0.1302]}, {"w": "already", "b": [0.1312, 0.1331, 0.1914, 0.1482]}, {"w": "considered", "b": [0.1978, 0.1331, 0.2837, 0.1482]}, {"w": "in", "b": [0.2901, 0.1331, 0.3058, 0.1482]}, {"w": "Section", "b": [0.3121, 0.1331, 0.3717, 0.1482]}, {"w": "??", "b": [0.3779, 0.1332, 0.398, 0.1482]}, {"w": "of", "b": [0.4043, 0.1331, 0.4195, 0.1482]}, {"w": "Chapter", "b": [0.4258, 0.1331, 0.4928, 0.1482]}, {"w": "3.", "b": [0.4991, 0.1331, 0.5138, 0.1482]}, {"w": "The", "b": [0.5226, 0.1331, 0.555, 0.1482]}, {"w": "notion", "b": [0.5613, 0.1331, 0.6136, 0.1482]}, {"w": "of", "b": [0.6199, 0.1331, 0.6351, 0.1482]}, {"w": "what", "b": [0.6414, 0.1331, 0.6822, 0.1482]}, {"w": "is", "b": [0.6886, 0.1331, 0.7012, 0.1482]}, {"w": "a", "b": [0.7076, 0.1331, 0.717, 0.1482]}, {"w": "correct", "b": [0.7233, 0.1331, 0.7799, 0.1482]}, {"w": "prediction", "b": [0.7863, 0.1331, 0.869, 0.1482]}, {"w": "may", "b": [0.1312, 0.1513, 0.1644, 0.1661]}, {"w": "change", "b": [0.1703, 0.1513, 0.224, 0.1661]}, {"w": "because", "b": [0.23, 0.1513, 0.2909, 0.1661]}, {"w": "of", "b": [0.2968, 0.1513, 0.3114, 0.1661]}, {"w": "the", "b": [0.3173, 0.1513, 0.3424, 0.1661]}, {"w": "users’", "b": [0.3483, 0.1513, 0.3928, 0.1661]}, {"w": "preferences", "b": [0.3987, 0.1513, 0.4859, 0.1661]}, {"w": "and", "b": [0.4918, 0.1513, 0.5209, 0.1661]}, {"w": "interests.", "b": [0.5268, 0.1513, 0.598, 0.1661]}, {"w": "This", "b": [0.6061, 0.1513, 0.6414, 0.1661]}, {"w": "would", "b": [0.6473, 0.1513, 0.694, 0.1661]}, {"w": "require", "b": [0.6999, 0.1513, 0.7548, 0.1661]}, {"w": "retraining", "b": [0.7607, 0.1513, 0.8382, 0.1661]}, {"w": "the", "b": [0.8441, 0.1513, 0.8692, 0.1661]}, {"w": "model,", "b": [0.1312, 0.1692, 0.1851, 0.1841]}, {"w": "using", "b": [0.1912, 0.1692, 0.2334, 0.1841]}, {"w": "more", "b": [0.2395, 0.1692, 0.2795, 0.1841]}, {"w": "recently", "b": [0.2857, 0.1692, 0.3493, 0.1841]}, {"w": "labeled", "b": [0.3555, 0.1692, 0.4124, 0.1841]}, {"w": "data.", "b": [0.4186, 0.1692, 0.4596, 0.1841]}]}, {"id": "b_2", "type": "paragraph", "text": "Some change can be perceived by the user as positive. Sometimes, the change can be negatively perceived, even if the system’s performance improved, from the engineering point of view. You might have added training examples, retrained the model and observed a better performance metric value. However, by adding new data, you involuntarily induced a data imbalance. Some classes are now underrepresented. Users interested in those classes’ predictions see decreased performance, and complain or even abandon your system.", "words": [{"w": "Some", "b": [0.1312, 0.196, 0.1752, 0.2111]}, {"w": "change", "b": [0.1836, 0.196, 0.2396, 0.2111]}, {"w": "can", "b": [0.248, 0.196, 0.2763, 0.2111]}, {"w": "be", "b": [0.2847, 0.196, 0.304, 0.2111]}, {"w": "perceived", "b": [0.3125, 0.196, 0.3895, 0.2111]}, {"w": "by", "b": [0.3979, 0.196, 0.4178, 0.2111]}, {"w": "the", "b": [0.4262, 0.196, 0.4524, 0.2111]}, {"w": "user", "b": [0.4608, 0.196, 0.4945, 0.2111]}, {"w": "as", "b": [0.5029, 0.196, 0.5198, 0.2111]}, {"w": "positive.", "b": [0.5282, 0.196, 0.5968, 0.2111]}, {"w": "Sometimes,", "b": [0.6119, 0.196, 0.7051, 0.2111]}, {"w": "the", "b": [0.7141, 0.196, 0.7402, 0.2111]}, {"w": "change", "b": [0.7487, 0.196, 0.8047, 0.2111]}, {"w": "can", "b": [0.8131, 0.196, 0.8414, 0.2111]}, {"w": "be", "b": [0.8498, 0.196, 0.8692, 0.2111]}, {"w": "negatively", "b": [0.1312, 0.2141, 0.2119, 0.229]}, {"w": "perceived,", "b": [0.2181, 0.2141, 0.2979, 0.229]}, {"w": "even", "b": [0.304, 0.2141, 0.3396, 0.229]}, {"w": "if", "b": [0.3457, 0.2141, 0.3564, 0.229]}, {"w": "the", "b": [0.3626, 0.2141, 0.3879, 0.229]}, {"w": "system’s", "b": [0.3941, 0.2141, 0.4609, 0.229]}, {"w": "performance", "b": [0.467, 0.2141, 0.5656, 0.229]}, {"w": "improved,", "b": [0.5718, 0.2141, 0.6505, 0.229]}, {"w": "from", "b": [0.6567, 0.2141, 0.6938, 0.229]}, {"w": "the", "b": [0.6999, 0.2141, 0.7253, 0.229]}, {"w": "engineering", "b": [0.7315, 0.2141, 0.8219, 0.229]}, {"w": "point", "b": [0.8281, 0.2141, 0.8697, 0.229]}, {"w": "of", "b": [0.1312, 0.2319, 0.1464, 0.247]}, {"w": "view.", "b": [0.1542, 0.2319, 0.1966, 0.247]}, {"w": "You", "b": [0.2098, 0.2319, 0.2423, 0.247]}, {"w": "might", "b": [0.2501, 0.2319, 0.2977, 0.247]}, {"w": "have", "b": [0.3055, 0.2319, 0.3427, 0.247]}, {"w": "added", "b": [0.3505, 0.2319, 0.3997, 0.247]}, {"w": "training", "b": [0.4075, 0.2319, 0.4724, 0.247]}, {"w": "examples,", "b": [0.4803, 0.2319, 0.5604, 0.247]}, {"w": "retrained", "b": [0.5687, 0.2319, 0.643, 0.247]}, {"w": "the", "b": [0.6509, 0.2319, 0.677, 0.247]}, {"w": "model", "b": [0.6849, 0.2319, 0.7345, 0.247]}, {"w": "and", "b": [0.7424, 0.2319, 0.7727, 0.247]}, {"w": "observed", "b": [0.7805, 0.2319, 0.8518, 0.247]}, {"w": "a", "b": [0.8597, 0.2319, 0.8691, 0.247]}, {"w": "better", "b": [0.1312, 0.25, 0.1795, 0.2649]}, {"w": "performance", "b": [0.1857, 0.25, 0.2842, 0.2649]}, {"w": "metric", "b": [0.2904, 0.25, 0.3412, 0.2649]}, {"w": "value.", "b": [0.3473, 0.25, 0.3935, 0.2649]}, {"w": "However,", "b": [0.4017, 0.25, 0.4743, 0.2649]}, {"w": "by", "b": [0.4805, 0.25, 0.4997, 0.2649]}, {"w": "adding", "b": [0.5059, 0.25, 0.5597, 0.2649]}, {"w": "new", "b": [0.5658, 0.25, 0.5973, 0.2649]}, {"w": "data,", "b": [0.6034, 0.25, 0.644, 0.2649]}, {"w": "you", "b": [0.6502, 0.25, 0.6786, 0.2649]}, {"w": "involuntarily", "b": [0.6847, 0.25, 0.7858, 0.2649]}, {"w": "induced", "b": [0.7919, 0.25, 0.8538, 0.2649]}, {"w": "a", "b": [0.86, 0.25, 0.8691, 0.2649]}, {"w": "data", "b": [0.1312, 0.2677, 0.1678, 0.2829]}, {"w": "imbalance.", "b": [0.174, 0.2677, 0.2614, 0.2829]}, {"w": "Some", "b": [0.2698, 0.2677, 0.3137, 0.2829]}, {"w": "classes", "b": [0.3199, 0.2677, 0.3736, 0.2829]}, {"w": "are", "b": [0.3798, 0.2677, 0.4049, 0.2829]}, {"w": "now", "b": [0.4112, 0.2677, 0.4441, 0.2829]}, {"w": "underrepresented.", "b": [0.4503, 0.2677, 0.5965, 0.2829]}, {"w": "Users", "b": [0.6049, 0.2677, 0.6496, 0.2829]}, {"w": "interested", "b": [0.6558, 0.2677, 0.7361, 0.2829]}, {"w": "in", "b": [0.7423, 0.2677, 0.758, 0.2829]}, {"w": "those", "b": [0.7642, 0.2677, 0.8072, 0.2829]}, {"w": "classes’", "b": [0.8134, 0.2677, 0.8723, 0.2829]}, {"w": "predictions", "b": [0.1312, 0.2858, 0.2196, 0.3008]}, {"w": "see", "b": [0.2257, 0.2858, 0.2495, 0.3008]}, {"w": "decreased", "b": [0.2556, 0.2858, 0.3327, 0.3008]}, {"w": "performance,", "b": [0.3388, 0.2858, 0.4436, 0.3008]}, {"w": "and", "b": [0.4497, 0.2858, 0.4794, 0.3008]}, {"w": "complain", "b": [0.4856, 0.2858, 0.5584, 0.3008]}, {"w": "or", "b": [0.5645, 0.2858, 0.581, 0.3008]}, {"w": "even", "b": [0.5872, 0.2858, 0.6231, 0.3008]}, {"w": "abandon", "b": [0.6292, 0.2858, 0.6979, 0.3008]}, {"w": "your", "b": [0.704, 0.2858, 0.74, 0.3008]}, {"w": "system.", "b": [0.7461, 0.2858, 0.8063, 0.3008]}]}, {"id": "b_3", "type": "paragraph", "text": "Users become accustomed to certain behaviors. They might know what query to submit to the search engine to get an often-used document or a web application. That query was not necessarily the most optimal for the purpose, but it worked. Suppose you improved the relevancy of your search-result ranking algorithm. Now that query doesn’t return that specific document or application, or it puts it on the second page of the search results. The user can no longer find the resource they once found easily, and get frustrated.", "words": [{"w": "Users", "b": [0.1312, 0.3126, 0.176, 0.3277]}, {"w": "become", "b": [0.1829, 0.3126, 0.2441, 0.3277]}, {"w": "accustomed", "b": [0.2511, 0.3126, 0.3464, 0.3277]}, {"w": "to", "b": [0.3534, 0.3126, 0.3701, 0.3277]}, {"w": "certain", "b": [0.3771, 0.3126, 0.4336, 0.3277]}, {"w": "behaviors.", "b": [0.4406, 0.3126, 0.524, 0.3277]}, {"w": "They", "b": [0.5347, 0.3126, 0.577, 0.3277]}, {"w": "might", "b": [0.584, 0.3126, 0.6316, 0.3277]}, {"w": "know", "b": [0.6386, 0.3126, 0.6814, 0.3277]}, {"w": "what", "b": [0.6884, 0.3126, 0.7292, 0.3277]}, {"w": "query", "b": [0.7362, 0.3126, 0.7823, 0.3277]}, {"w": "to", "b": [0.7893, 0.3126, 0.806, 0.3277]}, {"w": "submit", "b": [0.813, 0.3126, 0.8696, 0.3277]}, {"w": "to", "b": [0.1312, 0.3306, 0.148, 0.3457]}, {"w": "the", "b": [0.1541, 0.3306, 0.1803, 0.3457]}, {"w": "search", "b": [0.1864, 0.3306, 0.2373, 0.3457]}, {"w": "engine", "b": [0.2434, 0.3306, 0.2957, 0.3457]}, {"w": "to", "b": [0.3019, 0.3306, 0.3186, 0.3457]}, {"w": "get", "b": [0.3247, 0.3306, 0.3498, 0.3457]}, {"w": "an", "b": [0.356, 0.3306, 0.3759, 0.3457]}, {"w": "often-used", "b": [0.382, 0.3306, 0.4663, 0.3457]}, {"w": "document", "b": [0.4724, 0.3306, 0.553, 0.3457]}, {"w": "or", "b": [0.5591, 0.3306, 0.5759, 0.3457]}, {"w": "a", "b": [0.582, 0.3306, 0.5914, 0.3457]}, {"w": "web", "b": [0.5976, 0.3306, 0.6295, 0.3457]}, {"w": "application.", "b": [0.6356, 0.3306, 0.7319, 0.3457]}, {"w": "That", "b": [0.74, 0.3306, 0.7808, 0.3457]}, {"w": "query", "b": [0.787, 0.3306, 0.833, 0.3457]}, {"w": "was", "b": [0.8392, 0.3306, 0.8691, 0.3457]}, {"w": "not", "b": [0.1312, 0.3485, 0.1584, 0.3636]}, {"w": "necessarily", "b": [0.1657, 0.3485, 0.2533, 0.3636]}, {"w": "the", "b": [0.2606, 0.3485, 0.2867, 0.3636]}, {"w": "most", "b": [0.294, 0.3485, 0.3338, 0.3636]}, {"w": "optimal", "b": [0.3411, 0.3485, 0.4038, 0.3636]}, {"w": "for", "b": [0.4111, 0.3485, 0.4336, 0.3636]}, {"w": "the", "b": [0.4409, 0.3485, 0.4671, 0.3636]}, {"w": "purpose,", "b": [0.4743, 0.3485, 0.544, 0.3636]}, {"w": "but", "b": [0.5516, 0.3485, 0.5798, 0.3636]}, {"w": "it", "b": [0.5871, 0.3485, 0.5997, 0.3636]}, {"w": "worked.", "b": [0.6069, 0.3485, 0.6703, 0.3636]}, {"w": "Suppose", "b": [0.6818, 0.3485, 0.7494, 0.3636]}, {"w": "you", "b": [0.7566, 0.3485, 0.7859, 0.3636]}, {"w": "improved", "b": [0.7932, 0.3485, 0.8691, 0.3636]}, {"w": "the", "b": [0.1312, 0.3665, 0.1572, 0.3815]}, {"w": "relevancy", "b": [0.1634, 0.3665, 0.2393, 0.3815]}, {"w": "of", "b": [0.2454, 0.3665, 0.2605, 0.3815]}, {"w": "your", "b": [0.2666, 0.3665, 0.303, 0.3815]}, {"w": "search-result", "b": [0.3092, 0.3665, 0.4119, 0.3815]}, {"w": "ranking", "b": [0.418, 0.3665, 0.4799, 0.3815]}, {"w": "algorithm.", "b": [0.486, 0.3665, 0.5702, 0.3815]}, {"w": "Now", "b": [0.5784, 0.3665, 0.6147, 0.3815]}, {"w": "that", "b": [0.6209, 0.3665, 0.6551, 0.3815]}, {"w": "query", "b": [0.6613, 0.3665, 0.7071, 0.3815]}, {"w": "doesn’t", "b": [0.7132, 0.3665, 0.772, 0.3815]}, {"w": "return", "b": [0.7782, 0.3665, 0.8292, 0.3815]}, {"w": "that", "b": [0.8353, 0.3665, 0.8696, 0.3815]}, {"w": "specific", "b": [0.1312, 0.3845, 0.1891, 0.3995]}, {"w": "document", "b": [0.1953, 0.3845, 0.274, 0.3995]}, {"w": "or", "b": [0.2802, 0.3845, 0.2966, 0.3995]}, {"w": "application,", "b": [0.3027, 0.3845, 0.3968, 0.3995]}, {"w": "or", "b": [0.4029, 0.3845, 0.4194, 0.3995]}, {"w": "it", "b": [0.4255, 0.3845, 0.4378, 0.3995]}, {"w": "puts", "b": [0.4439, 0.3845, 0.4788, 0.3995]}, {"w": "it", "b": [0.485, 0.3845, 0.4972, 0.3995]}, {"w": "on", "b": [0.5034, 0.3845, 0.5228, 0.3995]}, {"w": "the", "b": [0.529, 0.3845, 0.5546, 0.3995]}, {"w": "second", "b": [0.5607, 0.3845, 0.614, 0.3995]}, {"w": "page", "b": [0.6201, 0.3845, 0.6569, 0.3995]}, {"w": "of", "b": [0.6631, 0.3845, 0.6779, 0.3995]}, {"w": "the", "b": [0.6841, 0.3845, 0.7096, 0.3995]}, {"w": "search", "b": [0.7158, 0.3845, 0.7656, 0.3995]}, {"w": "results.", "b": [0.7717, 0.3845, 0.8292, 0.3995]}, {"w": "The", "b": [0.8375, 0.3845, 0.8692, 0.3995]}, {"w": "user", "b": [0.1312, 0.4025, 0.1642, 0.4174]}, {"w": "can", "b": [0.1704, 0.4025, 0.1981, 0.4174]}, {"w": "no", "b": [0.2042, 0.4025, 0.2237, 0.4174]}, {"w": "longer", "b": [0.2298, 0.4025, 0.2791, 0.4174]}, {"w": "find", "b": [0.2853, 0.4025, 0.316, 0.4174]}, {"w": "the", "b": [0.3222, 0.4025, 0.3478, 0.4174]}, {"w": "resource", "b": [0.354, 0.4025, 0.4198, 0.4174]}, {"w": "they", "b": [0.426, 0.4025, 0.4614, 0.4174]}, {"w": "once", "b": [0.4675, 0.4025, 0.5034, 0.4174]}, {"w": "found", "b": [0.5096, 0.4025, 0.5552, 0.4174]}, {"w": "easily,", "b": [0.5614, 0.4025, 0.6097, 0.4174]}, {"w": "and", "b": [0.6158, 0.4025, 0.6456, 0.4174]}, {"w": "get", "b": [0.6517, 0.4025, 0.6763, 0.4174]}, {"w": "frustrated.", "b": [0.6825, 0.4025, 0.7673, 0.4174]}]}, {"id": "b_4", "type": "paragraph", "text": "If you expect that the user might negatively perceive the change, give them time to adapt. Educate the user about the changes and what to expect from the new model. Or, it can be done by gradually introducing the changes. You might mix the predictions of the old model and the new model, and slowly decrease the proportion for the old model. Alternatively, you can run both the new and the old model in parallel, and let the user switch to the old model for some time before sunsetting it.", "words": [{"w": "If", "b": [0.1312, 0.4293, 0.1437, 0.4444]}, {"w": "you", "b": [0.1498, 0.4293, 0.1789, 0.4444]}, {"w": "expect", "b": [0.185, 0.4293, 0.238, 0.4444]}, {"w": "that", "b": [0.2442, 0.4293, 0.2784, 0.4444]}, {"w": "the", "b": [0.2846, 0.4293, 0.3106, 0.4444]}, {"w": "user", "b": [0.3167, 0.4293, 0.3501, 0.4444]}, {"w": "might", "b": [0.3562, 0.4293, 0.4035, 0.4444]}, {"w": "negatively", "b": [0.4096, 0.4293, 0.4922, 0.4444]}, {"w": "perceive", "b": [0.4983, 0.4293, 0.5644, 0.4444]}, {"w": "the", "b": [0.5705, 0.4293, 0.5965, 0.4444]}, {"w": "change,", "b": [0.6026, 0.4293, 0.6634, 0.4444]}, {"w": "give", "b": [0.6695, 0.4293, 0.7017, 0.4444]}, {"w": "them", "b": [0.7079, 0.4293, 0.7494, 0.4444]}, {"w": "time", "b": [0.7555, 0.4293, 0.7919, 0.4444]}, {"w": "to", "b": [0.798, 0.4293, 0.8146, 0.4444]}, {"w": "adapt.", "b": [0.8207, 0.4293, 0.8727, 0.4444]}, {"w": "Educate", "b": [0.1312, 0.4473, 0.1971, 0.4623]}, {"w": "the", "b": [0.2032, 0.4473, 0.2288, 0.4623]}, {"w": "user", "b": [0.235, 0.4473, 0.2679, 0.4623]}, {"w": "about", "b": [0.2741, 0.4473, 0.3207, 0.4623]}, {"w": "the", "b": [0.3269, 0.4473, 0.3525, 0.4623]}, {"w": "changes", "b": [0.3586, 0.4473, 0.4207, 0.4623]}, {"w": "and", "b": [0.4269, 0.4473, 0.4566, 0.4623]}, {"w": "what", "b": [0.4627, 0.4473, 0.5027, 0.4623]}, {"w": "to", "b": [0.5088, 0.4473, 0.5252, 0.4623]}, {"w": "expect", "b": [0.5314, 0.4473, 0.5836, 0.4623]}, {"w": "from", "b": [0.5898, 0.4473, 0.6272, 0.4623]}, {"w": "the", "b": [0.6334, 0.4473, 0.659, 0.4623]}, {"w": "new", "b": [0.6651, 0.4473, 0.6969, 0.4623]}, {"w": "model.", "b": [0.703, 0.4473, 0.7568, 0.4623]}, {"w": "Or,", "b": [0.765, 0.4473, 0.7917, 0.4623]}, {"w": "it", "b": [0.7979, 0.4473, 0.8102, 0.4623]}, {"w": "can", "b": [0.8163, 0.4473, 0.844, 0.4623]}, {"w": "be", "b": [0.8501, 0.4473, 0.8691, 0.4623]}, {"w": "done", "b": [0.1312, 0.4653, 0.1689, 0.4802]}, {"w": "by", "b": [0.175, 0.4653, 0.1944, 0.4802]}, {"w": "gradually", "b": [0.2005, 0.4653, 0.2754, 0.4802]}, {"w": "introducing", "b": [0.2815, 0.4653, 0.3732, 0.4802]}, {"w": "the", "b": [0.3794, 0.4653, 0.4048, 0.4802]}, {"w": "changes.", "b": [0.411, 0.4653, 0.4778, 0.4802]}, {"w": "You", "b": [0.4859, 0.4653, 0.5175, 0.4802]}, {"w": "might", "b": [0.5236, 0.4653, 0.5699, 0.4802]}, {"w": "mix", "b": [0.5761, 0.4653, 0.6061, 0.4802]}, {"w": "the", "b": [0.6122, 0.4653, 0.6377, 0.4802]}, {"w": "predictions", "b": [0.6438, 0.4653, 0.7316, 0.4802]}, {"w": "of", "b": [0.7377, 0.4653, 0.7525, 0.4802]}, {"w": "the", "b": [0.7586, 0.4653, 0.7841, 0.4802]}, {"w": "old", "b": [0.7902, 0.4653, 0.8146, 0.4802]}, {"w": "model", "b": [0.8207, 0.4653, 0.8691, 0.4802]}, {"w": "and", "b": [0.1312, 0.4833, 0.1604, 0.4981]}, {"w": "the", "b": [0.1665, 0.4833, 0.1917, 0.4981]}, {"w": "new", "b": [0.1979, 0.4833, 0.229, 0.4981]}, {"w": "model,", "b": [0.2352, 0.4833, 0.288, 0.4981]}, {"w": "and", "b": [0.2941, 0.4833, 0.3233, 0.4981]}, {"w": "slowly", "b": [0.3295, 0.4833, 0.3778, 0.4981]}, {"w": "decrease", "b": [0.384, 0.4833, 0.4495, 0.4981]}, {"w": "the", "b": [0.4557, 0.4833, 0.4808, 0.4981]}, {"w": "proportion", "b": [0.487, 0.4833, 0.5711, 0.4981]}, {"w": "for", "b": [0.5772, 0.4833, 0.5989, 0.4981]}, {"w": "the", "b": [0.6051, 0.4833, 0.6302, 0.4981]}, {"w": "old", "b": [0.6364, 0.4833, 0.6605, 0.4981]}, {"w": "model.", "b": [0.6666, 0.4833, 0.7194, 0.4981]}, {"w": "Alternatively,", "b": [0.7276, 0.4833, 0.8348, 0.4981]}, {"w": "you", "b": [0.8409, 0.4833, 0.8691, 0.4981]}, {"w": "can", "b": [0.1312, 0.5013, 0.1584, 0.5161]}, {"w": "run", "b": [0.1645, 0.5013, 0.1917, 0.5161]}, {"w": "both", "b": [0.1978, 0.5013, 0.2345, 0.5161]}, {"w": "the", "b": [0.2406, 0.5013, 0.2658, 0.5161]}, {"w": "new", "b": [0.2719, 0.5013, 0.303, 0.5161]}, {"w": "and", "b": [0.3092, 0.5013, 0.3383, 0.5161]}, {"w": "the", "b": [0.3444, 0.5013, 0.3696, 0.5161]}, {"w": "old", "b": [0.3757, 0.5013, 0.3998, 0.5161]}, {"w": "model", "b": [0.4059, 0.5013, 0.4537, 0.5161]}, {"w": "in", "b": [0.4598, 0.5013, 0.4749, 0.5161]}, {"w": "parallel,", "b": [0.481, 0.5013, 0.5444, 0.5161]}, {"w": "and", "b": [0.5505, 0.5013, 0.5796, 0.5161]}, {"w": "let", "b": [0.5858, 0.5013, 0.6059, 0.5161]}, {"w": "the", "b": [0.612, 0.5013, 0.6371, 0.5161]}, {"w": "user", "b": [0.6432, 0.5013, 0.6756, 0.5161]}, {"w": "switch", "b": [0.6817, 0.5013, 0.7315, 0.5161]}, {"w": "to", "b": [0.7377, 0.5013, 0.7537, 0.5161]}, {"w": "the", "b": [0.7599, 0.5013, 0.785, 0.5161]}, {"w": "old", "b": [0.7911, 0.5013, 0.8152, 0.5161]}, {"w": "model", "b": [0.8214, 0.5013, 0.8691, 0.5161]}, {"w": "for", "b": [0.1312, 0.5191, 0.1533, 0.5341]}, {"w": "some", "b": [0.1595, 0.5191, 0.1996, 0.5341]}, {"w": "time", "b": [0.2057, 0.5191, 0.2416, 0.5341]}, {"w": "before", "b": [0.2478, 0.5191, 0.297, 0.5341]}, {"w": "sunsetting", "b": [0.3032, 0.5191, 0.3854, 0.5341]}, {"w": "it.", "b": [0.3916, 0.5191, 0.409, 0.5341]}]}, {"id": "b_5", "type": "paragraph", "text": "9.3.4 Being Ready for, and Dealing With, Human Nature", "words": [{"w": "9.3.4", "b": [0.1312, 0.5669, 0.1749, 0.5819]}, {"w": "Being", "b": [0.1961, 0.5669, 0.2492, 0.5819]}, {"w": "Ready", "b": [0.2563, 0.5669, 0.3152, 0.5819]}, {"w": "for,", "b": [0.3223, 0.5669, 0.354, 0.5819]}, {"w": "and", "b": [0.3611, 0.5669, 0.395, 0.5819]}, {"w": "Dealing", "b": [0.4021, 0.5669, 0.4726, 0.5819]}, {"w": "With,", "b": [0.4796, 0.5669, 0.5334, 0.5819]}, {"w": "Human", "b": [0.5405, 0.5669, 0.6087, 0.5819]}, {"w": "Nature", "b": [0.6157, 0.5669, 0.6812, 0.5819]}]}, {"id": "b_6", "type": "paragraph", "text": "Human nature is what makes effective system engineering such a hard endeavor. Humans are unpredictable, often irrational, inconsistent, and have unclear expectations. A solid software system must anticipate that.", "words": [{"w": "Human", "b": [0.1312, 0.6037, 0.189, 0.6185]}, {"w": "nature", "b": [0.1948, 0.6037, 0.2461, 0.6185]}, {"w": "is", "b": [0.2519, 0.6037, 0.2641, 0.6185]}, {"w": "what", "b": [0.2699, 0.6037, 0.3091, 0.6185]}, {"w": "makes", "b": [0.3149, 0.6037, 0.3632, 0.6185]}, {"w": "effective", "b": [0.369, 0.6037, 0.4328, 0.6185]}, {"w": "system", "b": [0.4387, 0.6037, 0.4926, 0.6185]}, {"w": "engineering", "b": [0.4984, 0.6037, 0.5879, 0.6185]}, {"w": "such", "b": [0.5937, 0.6037, 0.6285, 0.6185]}, {"w": "a", "b": [0.6343, 0.6037, 0.6434, 0.6185]}, {"w": "hard", "b": [0.6492, 0.6037, 0.6854, 0.6185]}, {"w": "endeavor.", "b": [0.6912, 0.6037, 0.7661, 0.6185]}, {"w": "Humans", "b": [0.7742, 0.6037, 0.8391, 0.6185]}, {"w": "are", "b": [0.8449, 0.6037, 0.8691, 0.6185]}, {"w": "unpredictable,", "b": [0.1312, 0.6216, 0.2447, 0.6364]}, {"w": "often", "b": [0.2508, 0.6216, 0.2908, 0.6364]}, {"w": "irrational,", "b": [0.297, 0.6216, 0.376, 0.6364]}, {"w": "inconsistent,", "b": [0.3821, 0.6216, 0.4811, 0.6364]}, {"w": "and", "b": [0.4872, 0.6216, 0.5166, 0.6364]}, {"w": "have", "b": [0.5227, 0.6216, 0.5586, 0.6364]}, {"w": "unclear", "b": [0.5648, 0.6216, 0.6225, 0.6364]}, {"w": "expectations.", "b": [0.6287, 0.6216, 0.7331, 0.6364]}, {"w": "A", "b": [0.7412, 0.6216, 0.7549, 0.6364]}, {"w": "solid", "b": [0.7611, 0.6216, 0.7976, 0.6364]}, {"w": "software", "b": [0.8038, 0.6216, 0.8692, 0.6364]}, {"w": "system", "b": [0.1312, 0.6394, 0.1863, 0.6544]}, {"w": "must", "b": [0.1924, 0.6394, 0.232, 0.6544]}, {"w": "anticipate", "b": [0.2382, 0.6394, 0.3177, 0.6544]}, {"w": "that.", "b": [0.3238, 0.6394, 0.3628, 0.6544]}]}, {"id": "b_7", "type": "paragraph", "text": "Avoid Confusion", "words": [{"w": "Avoid", "b": [0.1312, 0.664, 0.193, 0.682]}, {"w": "Confusion", "b": [0.2013, 0.664, 0.3101, 0.682]}]}, {"id": "b_8", "type": "paragraph", "text": "The system must be designed in such a way that the user doesn’t feel confused interacting with it. A model’s output must be served in an intuitive way, without assuming that the user knows anything about machine learning and AI. In fact, many users will assume that they work with typical software and will be surprised to see errors.", "words": [{"w": "The", "b": [0.1306, 0.6932, 0.1627, 0.7083]}, {"w": "system", "b": [0.1688, 0.6932, 0.2245, 0.7083]}, {"w": "must", "b": [0.2307, 0.6932, 0.2707, 0.7083]}, {"w": "be", "b": [0.2768, 0.6932, 0.296, 0.7083]}, {"w": "designed", "b": [0.3022, 0.6932, 0.3717, 0.7083]}, {"w": "in", "b": [0.3779, 0.6932, 0.3935, 0.7083]}, {"w": "such", "b": [0.3996, 0.6932, 0.4355, 0.7083]}, {"w": "a", "b": [0.4416, 0.6932, 0.451, 0.7083]}, {"w": "way", "b": [0.4571, 0.6932, 0.4887, 0.7083]}, {"w": "that", "b": [0.4949, 0.6932, 0.5291, 0.7083]}, {"w": "the", "b": [0.5352, 0.6932, 0.5612, 0.7083]}, {"w": "user", "b": [0.5673, 0.6932, 0.6006, 0.7083]}, {"w": "doesn’t", "b": [0.6068, 0.6932, 0.6655, 0.7083]}, {"w": "feel", "b": [0.6716, 0.6932, 0.6991, 0.7083]}, {"w": "confused", "b": [0.7052, 0.6932, 0.7754, 0.7083]}, {"w": "interacting", "b": [0.7815, 0.6932, 0.8692, 0.7083]}, {"w": "with", "b": [0.1306, 0.7111, 0.1672, 0.7262]}, {"w": "it.", "b": [0.1737, 0.7111, 0.1915, 0.7262]}, {"w": "A", "b": [0.2009, 0.7111, 0.2151, 0.7262]}, {"w": "model’s", "b": [0.2216, 0.7111, 0.284, 0.7262]}, {"w": "output", "b": [0.2905, 0.7111, 0.3459, 0.7262]}, {"w": "must", "b": [0.3525, 0.7111, 0.3929, 0.7262]}, {"w": "be", "b": [0.3994, 0.7111, 0.4188, 0.7262]}, {"w": "served", "b": [0.4254, 0.7111, 0.4768, 0.7262]}, {"w": "in", "b": [0.4834, 0.7111, 0.499, 0.7262]}, {"w": "an", "b": [0.5056, 0.7111, 0.5255, 0.7262]}, {"w": "intuitive", "b": [0.532, 0.7111, 0.6006, 0.7262]}, {"w": "way,", "b": [0.6071, 0.7111, 0.6427, 0.7262]}, {"w": "without", "b": [0.6494, 0.7111, 0.7132, 0.7262]}, {"w": "assuming", "b": [0.7198, 0.7111, 0.7953, 0.7262]}, {"w": "that", "b": [0.8018, 0.7111, 0.8363, 0.7262]}, {"w": "the", "b": [0.8429, 0.7111, 0.8691, 0.7262]}, {"w": "user", "b": [0.1312, 0.7291, 0.1647, 0.7442]}, {"w": "knows", "b": [0.1709, 0.7291, 0.2209, 0.7442]}, {"w": "anything", "b": [0.2271, 0.7291, 0.2989, 0.7442]}, {"w": "about", "b": [0.305, 0.7291, 0.3524, 0.7442]}, {"w": "machine", "b": [0.3585, 0.7291, 0.4256, 0.7442]}, {"w": "learning", "b": [0.4318, 0.7291, 0.4974, 0.7442]}, {"w": "and", "b": [0.5036, 0.7291, 0.5337, 0.7442]}, {"w": "AI.", "b": [0.5399, 0.7291, 0.5659, 0.7442]}, {"w": "In", "b": [0.572, 0.7291, 0.5892, 0.7442]}, {"w": "fact,", "b": [0.5954, 0.7291, 0.6313, 0.7442]}, {"w": "many", "b": [0.6374, 0.7291, 0.6822, 0.7442]}, {"w": "users", "b": [0.6883, 0.7291, 0.7292, 0.7442]}, {"w": "will", "b": [0.7353, 0.7291, 0.7645, 0.7442]}, {"w": "assume", "b": [0.7706, 0.7291, 0.8291, 0.7442]}, {"w": "that", "b": [0.8352, 0.7291, 0.8696, 0.7442]}, {"w": "they", "b": [0.1312, 0.7471, 0.1666, 0.7621]}, {"w": "work", "b": [0.1728, 0.7471, 0.2118, 0.7621]}, {"w": "with", "b": [0.2179, 0.7471, 0.2538, 0.7621]}, {"w": "typical", "b": [0.26, 0.7471, 0.3143, 0.7621]}, {"w": "software", "b": [0.3204, 0.7471, 0.3868, 0.7621]}, {"w": "and", "b": [0.3929, 0.7471, 0.4226, 0.7621]}, {"w": "will", "b": [0.4288, 0.7471, 0.4575, 0.7621]}, {"w": "be", "b": [0.4637, 0.7471, 0.4826, 0.7621]}, {"w": "surprised", "b": [0.4888, 0.7471, 0.5619, 0.7621]}, {"w": "to", "b": [0.5681, 0.7471, 0.5845, 0.7621]}, {"w": "see", "b": [0.5906, 0.7471, 0.6143, 0.7621]}, {"w": "errors.", "b": [0.6205, 0.7471, 0.672, 0.7621]}]}, {"id": "b_9", "type": "paragraph", "text": "Manage Expectations", "words": [{"w": "Manage", "b": [0.1312, 0.7717, 0.2167, 0.7897]}, {"w": "Expectations", "b": [0.225, 0.7717, 0.366, 0.7897]}]}, {"id": "b_10", "type": "paragraph", "text": "On the other hand, some users will have too high expectations. The main reason for that is advertisement. To attract attention, a product or a system based on machine learning is often displayed in advertisements as being “intelligent.” For example, personal assistants such as Apple Siri, Google Home, and Amazon Alexa are often shown in advertisements as having", "words": [{"w": "On", "b": [0.1312, 0.8008, 0.1563, 0.8159]}, {"w": "the", "b": [0.1626, 0.8008, 0.1888, 0.8159]}, {"w": "other", "b": [0.1951, 0.8008, 0.238, 0.8159]}, {"w": "hand,", "b": [0.2443, 0.8008, 0.2904, 0.8159]}, {"w": "some", "b": [0.2967, 0.8008, 0.3376, 0.8159]}, {"w": "users", "b": [0.3439, 0.8008, 0.385, 0.8159]}, {"w": "will", "b": [0.3913, 0.8008, 0.4206, 0.8159]}, {"w": "have", "b": [0.4269, 0.8008, 0.464, 0.8159]}, {"w": "too", "b": [0.4703, 0.8008, 0.497, 0.8159]}, {"w": "high", "b": [0.5033, 0.8008, 0.5389, 0.8159]}, {"w": "expectations.", "b": [0.5452, 0.8008, 0.653, 0.8159]}, {"w": "The", "b": [0.6617, 0.8008, 0.6941, 0.8159]}, {"w": "main", "b": [0.7004, 0.8008, 0.7412, 0.8159]}, {"w": "reason", "b": [0.7475, 0.8008, 0.7999, 0.8159]}, {"w": "for", "b": [0.8062, 0.8008, 0.8288, 0.8159]}, {"w": "that", "b": [0.8351, 0.8008, 0.8696, 0.8159]}, {"w": "is", "b": [0.1312, 0.8189, 0.1437, 0.8339]}, {"w": "advertisement.", "b": [0.1499, 0.8189, 0.2682, 0.8339]}, {"w": "To", "b": [0.2764, 0.8189, 0.2975, 0.8339]}, {"w": "attract", "b": [0.3036, 0.8189, 0.3594, 0.8339]}, {"w": "attention,", "b": [0.3655, 0.8189, 0.4445, 0.8339]}, {"w": "a", "b": [0.4506, 0.8189, 0.4599, 0.8339]}, {"w": "product", "b": [0.466, 0.8189, 0.5295, 0.8339]}, {"w": "or", "b": [0.5357, 0.8189, 0.5522, 0.8339]}, {"w": "a", "b": [0.5584, 0.8189, 0.5677, 0.8339]}, {"w": "system", "b": [0.5738, 0.8189, 0.6292, 0.8339]}, {"w": "based", "b": [0.6353, 0.8189, 0.6808, 0.8339]}, {"w": "on", "b": [0.687, 0.8189, 0.7066, 0.8339]}, {"w": "machine", "b": [0.7127, 0.8189, 0.7793, 0.8339]}, {"w": "learning", "b": [0.7854, 0.8189, 0.8505, 0.8339]}, {"w": "is", "b": [0.8566, 0.8189, 0.8691, 0.8339]}, {"w": "often", "b": [0.1312, 0.837, 0.1709, 0.8518]}, {"w": "displayed", "b": [0.1765, 0.837, 0.2495, 0.8518]}, {"w": "in", "b": [0.255, 0.837, 0.2701, 0.8518]}, {"w": "advertisements", "b": [0.2757, 0.837, 0.393, 0.8518]}, {"w": "as", "b": [0.3986, 0.837, 0.4147, 0.8518]}, {"w": "being", "b": [0.4203, 0.837, 0.463, 0.8518]}, {"w": "“intelligent.”", "b": [0.4686, 0.837, 0.5665, 0.8518]}, {"w": "For", "b": [0.5745, 0.837, 0.6009, 0.8518]}, {"w": "example,", "b": [0.6065, 0.837, 0.6763, 0.8518]}, {"w": "personal", "b": [0.682, 0.837, 0.748, 0.8518]}, {"w": "assistants", "b": [0.7536, 0.837, 0.8288, 0.8518]}, {"w": "such", "b": [0.8344, 0.837, 0.8692, 0.8518]}, {"w": "as", "b": [0.1312, 0.8549, 0.1474, 0.8697]}, {"w": "Apple", "b": [0.1534, 0.8549, 0.2002, 0.8697]}, {"w": "Siri,", "b": [0.2062, 0.8549, 0.2384, 0.8697]}, {"w": "Google", "b": [0.2445, 0.8549, 0.2994, 0.8697]}, {"w": "Home,", "b": [0.3054, 0.8549, 0.3561, 0.8697]}, {"w": "and", "b": [0.3622, 0.8549, 0.3913, 0.8697]}, {"w": "Amazon", "b": [0.3973, 0.8549, 0.4621, 0.8697]}, {"w": "Alexa", "b": [0.4682, 0.8549, 0.5134, 0.8697]}, {"w": "are", "b": [0.5194, 0.8549, 0.5436, 0.8697]}, {"w": "often", "b": [0.5496, 0.8549, 0.5893, 0.8697]}, {"w": "shown", "b": [0.5953, 0.8549, 0.6442, 0.8697]}, {"w": "in", "b": [0.6502, 0.8549, 0.6653, 0.8697]}, {"w": "advertisements", "b": [0.6713, 0.8549, 0.7886, 0.8697]}, {"w": "as", "b": [0.7946, 0.8549, 0.8108, 0.8697]}, {"w": "having", "b": [0.8168, 0.8549, 0.8691, 0.8697]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 13", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "13", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 277, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "human intelligence. Indeed, any machine-learning-based system might look very intelligent when inputs are carefully selected. Users can look at such advertisements and extrapolate what they see to situations in which the system isn’t designed to operate effectively.", "words": [{"w": "human", "b": [0.1312, 0.0883, 0.1865, 0.1034]}, {"w": "intelligence.", "b": [0.1927, 0.0883, 0.2883, 0.1034]}, {"w": "Indeed,", "b": [0.2965, 0.0883, 0.3559, 0.1034]}, {"w": "any", "b": [0.3621, 0.0883, 0.391, 0.1034]}, {"w": "machine-learning-based", "b": [0.3971, 0.0883, 0.587, 0.1034]}, {"w": "system", "b": [0.5931, 0.0883, 0.6486, 0.1034]}, {"w": "might", "b": [0.6548, 0.0883, 0.7018, 0.1034]}, {"w": "look", "b": [0.7079, 0.0883, 0.742, 0.1034]}, {"w": "very", "b": [0.7481, 0.0883, 0.7828, 0.1034]}, {"w": "intelligent", "b": [0.789, 0.0883, 0.8696, 0.1034]}, {"w": "when", "b": [0.1306, 0.1062, 0.1733, 0.1213]}, {"w": "inputs", "b": [0.1795, 0.1062, 0.2307, 0.1213]}, {"w": "are", "b": [0.2368, 0.1062, 0.2619, 0.1213]}, {"w": "carefully", "b": [0.2681, 0.1062, 0.338, 0.1213]}, {"w": "selected.", "b": [0.3442, 0.1062, 0.4131, 0.1213]}, {"w": "Users", "b": [0.4213, 0.1062, 0.4659, 0.1213]}, {"w": "can", "b": [0.4721, 0.1062, 0.5002, 0.1213]}, {"w": "look", "b": [0.5064, 0.1062, 0.5408, 0.1213]}, {"w": "at", "b": [0.5469, 0.1062, 0.5636, 0.1213]}, {"w": "such", "b": [0.5697, 0.1062, 0.6059, 0.1213]}, {"w": "advertisements", "b": [0.612, 0.1062, 0.7338, 0.1213]}, {"w": "and", "b": [0.7399, 0.1062, 0.7702, 0.1213]}, {"w": "extrapolate", "b": [0.7763, 0.1062, 0.8692, 0.1213]}, {"w": "what", "b": [0.1306, 0.1243, 0.1705, 0.1392]}, {"w": "they", "b": [0.1767, 0.1243, 0.2121, 0.1392]}, {"w": "see", "b": [0.2182, 0.1243, 0.2419, 0.1392]}, {"w": "to", "b": [0.2481, 0.1243, 0.2645, 0.1392]}, {"w": "situations", "b": [0.2706, 0.1243, 0.3488, 0.1392]}, {"w": "in", "b": [0.3549, 0.1243, 0.3703, 0.1392]}, {"w": "which", "b": [0.3765, 0.1243, 0.4231, 0.1392]}, {"w": "the", "b": [0.4293, 0.1243, 0.4549, 0.1392]}, {"w": "system", "b": [0.4611, 0.1243, 0.5161, 0.1392]}, {"w": "isn’t", "b": [0.5223, 0.1243, 0.5573, 0.1392]}, {"w": "designed", "b": [0.5634, 0.1243, 0.6322, 0.1392]}, {"w": "to", "b": [0.6384, 0.1243, 0.6548, 0.1392]}, {"w": "operate", "b": [0.6609, 0.1243, 0.721, 0.1392]}, {"w": "effectively.", "b": [0.7271, 0.1243, 0.8107, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "Another common reason users expect something spectacular (even without being promised) is that they worked with a similar (in their understanding) system that looked “very intelligent” to them. Such users would expect the same level of “intelligence” from your system.", "words": [{"w": "Another", "b": [0.1305, 0.1513, 0.1954, 0.1661]}, {"w": "common", "b": [0.2008, 0.1513, 0.2671, 0.1661]}, {"w": "reason", "b": [0.2726, 0.1513, 0.323, 0.1661]}, {"w": "users", "b": [0.3284, 0.1513, 0.3679, 0.1661]}, {"w": "expect", "b": [0.3733, 0.1513, 0.4246, 0.1661]}, {"w": "something", "b": [0.43, 0.1513, 0.5105, 0.1661]}, {"w": "spectacular", "b": [0.5159, 0.1513, 0.6051, 0.1661]}, {"w": "(even", "b": [0.6105, 0.1513, 0.6527, 0.1661]}, {"w": "without", "b": [0.6581, 0.1513, 0.7194, 0.1661]}, {"w": "being", "b": [0.7248, 0.1513, 0.7676, 0.1661]}, {"w": "promised)", "b": [0.773, 0.1513, 0.8515, 0.1661]}, {"w": "is", "b": [0.857, 0.1513, 0.8691, 0.1661]}, {"w": "that", "b": [0.1312, 0.1693, 0.1644, 0.1841]}, {"w": "they", "b": [0.1701, 0.1693, 0.2048, 0.1841]}, {"w": "worked", "b": [0.2104, 0.1693, 0.2662, 0.1841]}, {"w": "with", "b": [0.2719, 0.1693, 0.3071, 0.1841]}, {"w": "a", "b": [0.3128, 0.1693, 0.3218, 0.1841]}, {"w": "similar", "b": [0.3275, 0.1693, 0.3809, 0.1841]}, {"w": "(in", "b": [0.3866, 0.1693, 0.4087, 0.1841]}, {"w": "their", "b": [0.4144, 0.1693, 0.4517, 0.1841]}, {"w": "understanding)", "b": [0.4573, 0.1693, 0.5771, 0.1841]}, {"w": "system", "b": [0.5828, 0.1693, 0.6368, 0.1841]}, {"w": "that", "b": [0.6425, 0.1693, 0.6756, 0.1841]}, {"w": "looked", "b": [0.6813, 0.1693, 0.732, 0.1841]}, {"w": "“very", "b": [0.7377, 0.1693, 0.78, 0.1841]}, {"w": "intelligent”", "b": [0.7857, 0.1693, 0.8726, 0.1841]}, {"w": "to", "b": [0.1312, 0.1871, 0.1476, 0.2021]}, {"w": "them.", "b": [0.1538, 0.1871, 0.1999, 0.2021]}, {"w": "Such", "b": [0.2081, 0.1871, 0.2466, 0.2021]}, {"w": "users", "b": [0.2527, 0.1871, 0.293, 0.2021]}, {"w": "would", "b": [0.2992, 0.1871, 0.3468, 0.2021]}, {"w": "expect", "b": [0.353, 0.1871, 0.4053, 0.2021]}, {"w": "the", "b": [0.4115, 0.1871, 0.4371, 0.2021]}, {"w": "same", "b": [0.4432, 0.1871, 0.4833, 0.2021]}, {"w": "level", "b": [0.4895, 0.1871, 0.5254, 0.2021]}, {"w": "of", "b": [0.5315, 0.1871, 0.5464, 0.2021]}, {"w": "“intelligence”", "b": [0.5526, 0.1871, 0.6597, 0.2021]}, {"w": "from", "b": [0.6659, 0.1871, 0.7033, 0.2021]}, {"w": "your", "b": [0.7095, 0.1871, 0.7454, 0.2021]}, {"w": "system.", "b": [0.7516, 0.1871, 0.8118, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "Gain Trust", "words": [{"w": "Gain", "b": [0.1312, 0.2117, 0.1837, 0.2297]}, {"w": "Trust", "b": [0.192, 0.2117, 0.2508, 0.2297]}]}, {"id": "b_3", "type": "paragraph", "text": "Some users, especially experienced ones, will mistrust any system if they know it contains some “intelligence.” The main reason for that mistrust is past experience. Most so-called intelligent systems fail to deliver, and, because of that, some users expect failure when they first encounter your system.", "words": [{"w": "Some", "b": [0.1312, 0.2408, 0.1751, 0.2559]}, {"w": "users,", "b": [0.1812, 0.2408, 0.2275, 0.2559]}, {"w": "especially", "b": [0.2336, 0.2408, 0.312, 0.2559]}, {"w": "experienced", "b": [0.3182, 0.2408, 0.4143, 0.2559]}, {"w": "ones,", "b": [0.4205, 0.2408, 0.4613, 0.2559]}, {"w": "will", "b": [0.4675, 0.2408, 0.4967, 0.2559]}, {"w": "mistrust", "b": [0.5028, 0.2408, 0.571, 0.2559]}, {"w": "any", "b": [0.5771, 0.2408, 0.6064, 0.2559]}, {"w": "system", "b": [0.6125, 0.2408, 0.6686, 0.2559]}, {"w": "if", "b": [0.6747, 0.2408, 0.6857, 0.2559]}, {"w": "they", "b": [0.6919, 0.2408, 0.7279, 0.2559]}, {"w": "know", "b": [0.7341, 0.2408, 0.7769, 0.2559]}, {"w": "it", "b": [0.783, 0.2408, 0.7955, 0.2559]}, {"w": "contains", "b": [0.8017, 0.2408, 0.8692, 0.2559]}, {"w": "some", "b": [0.1312, 0.2588, 0.1721, 0.2739]}, {"w": "“intelligence.”", "b": [0.1787, 0.2588, 0.2906, 0.2739]}, {"w": "The", "b": [0.3, 0.2588, 0.3324, 0.2739]}, {"w": "main", "b": [0.339, 0.2588, 0.3797, 0.2739]}, {"w": "reason", "b": [0.3863, 0.2588, 0.4387, 0.2739]}, {"w": "for", "b": [0.4453, 0.2588, 0.4678, 0.2739]}, {"w": "that", "b": [0.4744, 0.2588, 0.5089, 0.2739]}, {"w": "mistrust", "b": [0.5154, 0.2588, 0.5837, 0.2739]}, {"w": "is", "b": [0.5902, 0.2588, 0.6029, 0.2739]}, {"w": "past", "b": [0.6094, 0.2588, 0.644, 0.2739]}, {"w": "experience.", "b": [0.6505, 0.2588, 0.7416, 0.2739]}, {"w": "Most", "b": [0.751, 0.2588, 0.7924, 0.2739]}, {"w": "so-called", "b": [0.7989, 0.2588, 0.8691, 0.2739]}, {"w": "intelligent", "b": [0.1312, 0.2769, 0.211, 0.2918]}, {"w": "systems", "b": [0.2172, 0.2769, 0.2793, 0.2918]}, {"w": "fail", "b": [0.2855, 0.2769, 0.3106, 0.2918]}, {"w": "to", "b": [0.3167, 0.2769, 0.3331, 0.2918]}, {"w": "deliver,", "b": [0.3393, 0.2769, 0.3976, 0.2918]}, {"w": "and,", "b": [0.4038, 0.2769, 0.4385, 0.2918]}, {"w": "because", "b": [0.4447, 0.2769, 0.5067, 0.2918]}, {"w": "of", "b": [0.5129, 0.2769, 0.5277, 0.2918]}, {"w": "that,", "b": [0.5338, 0.2769, 0.5727, 0.2918]}, {"w": "some", "b": [0.5789, 0.2769, 0.6188, 0.2918]}, {"w": "users", "b": [0.625, 0.2769, 0.6652, 0.2918]}, {"w": "expect", "b": [0.6713, 0.2769, 0.7235, 0.2918]}, {"w": "failure", "b": [0.7297, 0.2769, 0.7803, 0.2918]}, {"w": "when", "b": [0.7865, 0.2769, 0.8284, 0.2918]}, {"w": "they", "b": [0.8346, 0.2769, 0.8699, 0.2918]}, {"w": "first", "b": [0.1312, 0.2948, 0.1632, 0.3097]}, {"w": "encounter", "b": [0.1693, 0.2948, 0.2479, 0.3097]}, {"w": "your", "b": [0.254, 0.2948, 0.29, 0.3097]}, {"w": "system.", "b": [0.2961, 0.2948, 0.3563, 0.3097]}]}, {"id": "b_4", "type": "paragraph", "text": "As a consequence, your system must gain each user’s confidence, and this must be done early.", "words": [{"w": "As", "b": [0.1305, 0.3218, 0.1512, 0.3366]}, {"w": "a", "b": [0.1572, 0.3218, 0.1662, 0.3366]}, {"w": "consequence,", "b": [0.1722, 0.3218, 0.2733, 0.3366]}, {"w": "your", "b": [0.2793, 0.3218, 0.3145, 0.3366]}, {"w": "system", "b": [0.3205, 0.3218, 0.3745, 0.3366]}, {"w": "must", "b": [0.3804, 0.3218, 0.4192, 0.3366]}, {"w": "gain", "b": [0.4251, 0.3218, 0.4583, 0.3366]}, {"w": "each", "b": [0.4643, 0.3218, 0.4989, 0.3366]}, {"w": "user’s", "b": [0.5049, 0.3218, 0.5494, 0.3366]}, {"w": "confidence,", "b": [0.5553, 0.3218, 0.6418, 0.3366]}, {"w": "and", "b": [0.6478, 0.3218, 0.6769, 0.3366]}, {"w": "this", "b": [0.6829, 0.3218, 0.7121, 0.3366]}, {"w": "must", "b": [0.7181, 0.3218, 0.7569, 0.3366]}, {"w": "be", "b": [0.7628, 0.3218, 0.7814, 0.3366]}, {"w": "done", "b": [0.7874, 0.3218, 0.8246, 0.3366]}, {"w": "early.", "b": [0.8305, 0.3218, 0.8727, 0.3366]}]}, {"id": "b_5", "type": "paragraph", "text": "A user experienced with “intelligent” systems will most likely make several simple tests of your system’s abilities. If your system fails, the user will not trust it. For example, if your system is a search engine, then a user would query their name or a document they authored to test your system. Or, if your system provides intelligence on organizations to corporate customers, a user will check how much your system knows about their organization, and whether the intelligence makes sense. A driver of a self-driving car will most likely test commands like “start the engine,” “follow that car,” “keep the current speed,” or “park on that street.” Depending on the nature of the service, you should anticipate such simple tests and make sure that your system passes them.", "words": [{"w": "A", "b": [0.1305, 0.3485, 0.1446, 0.3636]}, {"w": "user", "b": [0.1508, 0.3485, 0.1843, 0.3636]}, {"w": "experienced", "b": [0.1905, 0.3485, 0.2866, 0.3636]}, {"w": "with", "b": [0.2927, 0.3485, 0.3293, 0.3636]}, {"w": "“intelligent”", "b": [0.3354, 0.3485, 0.4346, 0.3636]}, {"w": "systems", "b": [0.4407, 0.3485, 0.5042, 0.3636]}, {"w": "will", "b": [0.5103, 0.3485, 0.5395, 0.3636]}, {"w": "most", "b": [0.5457, 0.3485, 0.5854, 0.3636]}, {"w": "likely", "b": [0.5916, 0.3485, 0.6349, 0.3636]}, {"w": "make", "b": [0.641, 0.3485, 0.6839, 0.3636]}, {"w": "several", "b": [0.69, 0.3485, 0.7455, 0.3636]}, {"w": "simple", "b": [0.7516, 0.3485, 0.8039, 0.3636]}, {"w": "tests", "b": [0.8101, 0.3485, 0.8479, 0.3636]}, {"w": "of", "b": [0.854, 0.3485, 0.8691, 0.3636]}, {"w": "your", "b": [0.1308, 0.3665, 0.1672, 0.3815]}, {"w": "system’s", "b": [0.1734, 0.3665, 0.2418, 0.3815]}, {"w": "abilities.", "b": [0.2479, 0.3665, 0.3167, 0.3815]}, {"w": "If", "b": [0.3248, 0.3665, 0.3373, 0.3815]}, {"w": "your", "b": [0.3435, 0.3665, 0.3799, 0.3815]}, {"w": "system", "b": [0.3861, 0.3665, 0.4419, 0.3815]}, {"w": "fails,", "b": [0.448, 0.3665, 0.4861, 0.3815]}, {"w": "the", "b": [0.4922, 0.3665, 0.5182, 0.3815]}, {"w": "user", "b": [0.5244, 0.3665, 0.5578, 0.3815]}, {"w": "will", "b": [0.564, 0.3665, 0.5931, 0.3815]}, {"w": "not", "b": [0.5992, 0.3665, 0.6262, 0.3815]}, {"w": "trust", "b": [0.6324, 0.3665, 0.6721, 0.3815]}, {"w": "it.", "b": [0.6782, 0.3665, 0.6959, 0.3815]}, {"w": "For", "b": [0.7041, 0.3665, 0.7314, 0.3815]}, {"w": "example,", "b": [0.7376, 0.3665, 0.8098, 0.3815]}, {"w": "if", "b": [0.816, 0.3665, 0.8269, 0.3815]}, {"w": "your", "b": [0.833, 0.3665, 0.8695, 0.3815]}, {"w": "system", "b": [0.1312, 0.3846, 0.1857, 0.3995]}, {"w": "is", "b": [0.1918, 0.3846, 0.2041, 0.3995]}, {"w": "a", "b": [0.2102, 0.3846, 0.2194, 0.3995]}, {"w": "search", "b": [0.2255, 0.3846, 0.2749, 0.3995]}, {"w": "engine,", "b": [0.281, 0.3846, 0.3368, 0.3995]}, {"w": "then", "b": [0.3429, 0.3846, 0.3784, 0.3995]}, {"w": "a", "b": [0.3845, 0.3846, 0.3937, 0.3995]}, {"w": "user", "b": [0.3998, 0.3846, 0.4324, 0.3995]}, {"w": "would", "b": [0.4385, 0.3846, 0.4857, 0.3995]}, {"w": "query", "b": [0.4918, 0.3846, 0.5365, 0.3995]}, {"w": "their", "b": [0.5426, 0.3846, 0.5802, 0.3995]}, {"w": "name", "b": [0.5864, 0.3846, 0.6289, 0.3995]}, {"w": "or", "b": [0.6351, 0.3846, 0.6513, 0.3995]}, {"w": "a", "b": [0.6575, 0.3846, 0.6666, 0.3995]}, {"w": "document", "b": [0.6727, 0.3846, 0.7508, 0.3995]}, {"w": "they", "b": [0.757, 0.3846, 0.792, 0.3995]}, {"w": "authored", "b": [0.7981, 0.3846, 0.8691, 0.3995]}, {"w": "to", "b": [0.1312, 0.4024, 0.1479, 0.4174]}, {"w": "test", "b": [0.154, 0.4024, 0.1843, 0.4174]}, {"w": "your", "b": [0.1905, 0.4024, 0.2269, 0.4174]}, {"w": "system.", "b": [0.2331, 0.4024, 0.2941, 0.4174]}, {"w": "Or,", "b": [0.3023, 0.4024, 0.3294, 0.4174]}, {"w": "if", "b": [0.3356, 0.4024, 0.3465, 0.4174]}, {"w": "your", "b": [0.3527, 0.4024, 0.3891, 0.4174]}, {"w": "system", "b": [0.3953, 0.4024, 0.4511, 0.4174]}, {"w": "provides", "b": [0.4573, 0.4024, 0.5251, 0.4174]}, {"w": "intelligence", "b": [0.5312, 0.4024, 0.6222, 0.4174]}, {"w": "on", "b": [0.6284, 0.4024, 0.6481, 0.4174]}, {"w": "organizations", "b": [0.6543, 0.4024, 0.7626, 0.4174]}, {"w": "to", "b": [0.7688, 0.4024, 0.7854, 0.4174]}, {"w": "corporate", "b": [0.7916, 0.4024, 0.8691, 0.4174]}, {"w": "customers,", "b": [0.1312, 0.4203, 0.2183, 0.4354]}, {"w": "a", "b": [0.2254, 0.4203, 0.2348, 0.4354]}, {"w": "user", "b": [0.2418, 0.4203, 0.2754, 0.4354]}, {"w": "will", "b": [0.2824, 0.4203, 0.3116, 0.4354]}, {"w": "check", "b": [0.3186, 0.4203, 0.3631, 0.4354]}, {"w": "how", "b": [0.37, 0.4203, 0.4029, 0.4354]}, {"w": "much", "b": [0.4099, 0.4203, 0.4538, 0.4354]}, {"w": "your", "b": [0.4607, 0.4203, 0.4974, 0.4354]}, {"w": "system", "b": [0.5043, 0.4203, 0.5605, 0.4354]}, {"w": "knows", "b": [0.5674, 0.4203, 0.6178, 0.4354]}, {"w": "about", "b": [0.6247, 0.4203, 0.6723, 0.4354]}, {"w": "their", "b": [0.6792, 0.4203, 0.718, 0.4354]}, {"w": "organization,", "b": [0.7249, 0.4203, 0.8316, 0.4354]}, {"w": "and", "b": [0.8387, 0.4203, 0.8691, 0.4354]}, {"w": "whether", "b": [0.1306, 0.4382, 0.1965, 0.4533]}, {"w": "the", "b": [0.2041, 0.4382, 0.2303, 0.4533]}, {"w": "intelligence", "b": [0.2379, 0.4382, 0.3295, 0.4533]}, {"w": "makes", "b": [0.3371, 0.4382, 0.3874, 0.4533]}, {"w": "sense.", "b": [0.395, 0.4382, 0.4423, 0.4533]}, {"w": "A", "b": [0.4549, 0.4382, 0.469, 0.4533]}, {"w": "driver", "b": [0.4766, 0.4382, 0.5248, 0.4533]}, {"w": "of", "b": [0.5325, 0.4382, 0.5476, 0.4533]}, {"w": "a", "b": [0.5552, 0.4382, 0.5646, 0.4533]}, {"w": "self-driving", "b": [0.5723, 0.4382, 0.6634, 0.4533]}, {"w": "car", "b": [0.671, 0.4382, 0.6962, 0.4533]}, {"w": "will", "b": [0.7038, 0.4382, 0.7331, 0.4533]}, {"w": "most", "b": [0.7407, 0.4382, 0.7805, 0.4533]}, {"w": "likely", "b": [0.7882, 0.4382, 0.8316, 0.4533]}, {"w": "test", "b": [0.8392, 0.4382, 0.8696, 0.4533]}, {"w": "commands", "b": [0.1312, 0.4563, 0.2171, 0.4713]}, {"w": "like", "b": [0.2233, 0.4563, 0.2512, 0.4713]}, {"w": "“start", "b": [0.2573, 0.4563, 0.3045, 0.4713]}, {"w": "the", "b": [0.3106, 0.4563, 0.3365, 0.4713]}, {"w": "engine,”", "b": [0.3426, 0.4563, 0.4083, 0.4713]}, {"w": "“follow", "b": [0.4144, 0.4563, 0.4707, 0.4713]}, {"w": "that", "b": [0.4769, 0.4563, 0.511, 0.4713]}, {"w": "car,”", "b": [0.5171, 0.4563, 0.5559, 0.4713]}, {"w": "“keep", "b": [0.5621, 0.4563, 0.6071, 0.4713]}, {"w": "the", "b": [0.6132, 0.4563, 0.6391, 0.4713]}, {"w": "current", "b": [0.6452, 0.4563, 0.7037, 0.4713]}, {"w": "speed,”", "b": [0.7099, 0.4563, 0.7689, 0.4713]}, {"w": "or", "b": [0.7751, 0.4563, 0.7916, 0.4713]}, {"w": "“park", "b": [0.7978, 0.4563, 0.8433, 0.4713]}, {"w": "on", "b": [0.8495, 0.4563, 0.8691, 0.4713]}, {"w": "that", "b": [0.1312, 0.4743, 0.1646, 0.4892]}, {"w": "street.”", "b": [0.1708, 0.4743, 0.2266, 0.4892]}, {"w": "Depending", "b": [0.2348, 0.4743, 0.32, 0.4892]}, {"w": "on", "b": [0.3262, 0.4743, 0.3454, 0.4892]}, {"w": "the", "b": [0.3515, 0.4743, 0.3769, 0.4892]}, {"w": "nature", "b": [0.383, 0.4743, 0.4347, 0.4892]}, {"w": "of", "b": [0.4408, 0.4743, 0.4555, 0.4892]}, {"w": "the", "b": [0.4616, 0.4743, 0.4869, 0.4892]}, {"w": "service,", "b": [0.4931, 0.4743, 0.5515, 0.4892]}, {"w": "you", "b": [0.5576, 0.4743, 0.5859, 0.4892]}, {"w": "should", "b": [0.5921, 0.4743, 0.6438, 0.4892]}, {"w": "anticipate", "b": [0.6499, 0.4743, 0.7284, 0.4892]}, {"w": "such", "b": [0.7345, 0.4743, 0.7695, 0.4892]}, {"w": "simple", "b": [0.7757, 0.4743, 0.8264, 0.4892]}, {"w": "tests", "b": [0.8325, 0.4743, 0.8692, 0.4892]}, {"w": "and", "b": [0.1312, 0.4922, 0.161, 0.5072]}, {"w": "make", "b": [0.1671, 0.4922, 0.2091, 0.5072]}, {"w": "sure", "b": [0.2153, 0.4922, 0.2483, 0.5072]}, {"w": "that", "b": [0.2544, 0.4922, 0.2883, 0.5072]}, {"w": "your", "b": [0.2944, 0.4922, 0.3304, 0.5072]}, {"w": "system", "b": [0.3365, 0.4922, 0.3916, 0.5072]}, {"w": "passes", "b": [0.3977, 0.4922, 0.4473, 0.5072]}, {"w": "them.", "b": [0.4534, 0.4922, 0.4996, 0.5072]}]}, {"id": "b_6", "type": "paragraph", "text": "Manage User Fatigue", "words": [{"w": "Manage", "b": [0.1312, 0.5168, 0.2167, 0.5348]}, {"w": "User", "b": [0.225, 0.5168, 0.2756, 0.5348]}, {"w": "Fatigue", "b": [0.2839, 0.5168, 0.3638, 0.5348]}]}, {"id": "b_7", "type": "paragraph", "text": "User fatigue can be another reason why you see decreasing interest in your system. Make sure that the system doesn’t excessively interrupt user experience with recommendations or requests for approval. Avoid showing everything you have to show in one shot. Whenever possible, let the user explicitly express their interest.", "words": [{"w": "User", "b": [0.1312, 0.546, 0.1744, 0.561]}, {"w": "fatigue", "b": [0.1815, 0.546, 0.2445, 0.561]}, {"w": "can", "b": [0.2507, 0.5461, 0.2783, 0.561]}, {"w": "be", "b": [0.2845, 0.5461, 0.3035, 0.561]}, {"w": "another", "b": [0.3096, 0.5461, 0.3711, 0.561]}, {"w": "reason", "b": [0.3772, 0.5461, 0.4286, 0.561]}, {"w": "why", "b": [0.4347, 0.5461, 0.4675, 0.561]}, {"w": "you", "b": [0.4736, 0.5461, 0.5023, 0.561]}, {"w": "see", "b": [0.5085, 0.5461, 0.5321, 0.561]}, {"w": "decreasing", "b": [0.5383, 0.5461, 0.6213, 0.561]}, {"w": "interest", "b": [0.6275, 0.5461, 0.6876, 0.561]}, {"w": "in", "b": [0.6937, 0.5461, 0.7091, 0.561]}, {"w": "your", "b": [0.7152, 0.5461, 0.7511, 0.561]}, {"w": "system.", "b": [0.7573, 0.5461, 0.8174, 0.561]}, {"w": "Make", "b": [0.8256, 0.5461, 0.8691, 0.561]}, {"w": "sure", "b": [0.1312, 0.564, 0.164, 0.5789]}, {"w": "that", "b": [0.1702, 0.564, 0.2038, 0.5789]}, {"w": "the", "b": [0.21, 0.564, 0.2355, 0.5789]}, {"w": "system", "b": [0.2416, 0.564, 0.2964, 0.5789]}, {"w": "doesn’t", "b": [0.3026, 0.564, 0.3603, 0.5789]}, {"w": "excessively", "b": [0.3664, 0.564, 0.4523, 0.5789]}, {"w": "interrupt", "b": [0.4585, 0.564, 0.5304, 0.5789]}, {"w": "user", "b": [0.5366, 0.564, 0.5694, 0.5789]}, {"w": "experience", "b": [0.5756, 0.564, 0.6592, 0.5789]}, {"w": "with", "b": [0.6654, 0.564, 0.7011, 0.5789]}, {"w": "recommendations", "b": [0.7072, 0.564, 0.847, 0.5789]}, {"w": "or", "b": [0.8532, 0.564, 0.8696, 0.5789]}, {"w": "requests", "b": [0.1312, 0.5818, 0.1979, 0.5969]}, {"w": "for", "b": [0.2042, 0.5818, 0.2267, 0.5969]}, {"w": "approval.", "b": [0.233, 0.5818, 0.3084, 0.5969]}, {"w": "Avoid", "b": [0.3168, 0.5818, 0.3634, 0.5969]}, {"w": "showing", "b": [0.3697, 0.5818, 0.4351, 0.5969]}, {"w": "everything", "b": [0.4414, 0.5818, 0.5278, 0.5969]}, {"w": "you", "b": [0.534, 0.5818, 0.5633, 0.5969]}, {"w": "have", "b": [0.5695, 0.5818, 0.6067, 0.5969]}, {"w": "to", "b": [0.6129, 0.5818, 0.6297, 0.5969]}, {"w": "show", "b": [0.6359, 0.5818, 0.6763, 0.5969]}, {"w": "in", "b": [0.6825, 0.5818, 0.6982, 0.5969]}, {"w": "one", "b": [0.7045, 0.5818, 0.7327, 0.5969]}, {"w": "shot.", "b": [0.739, 0.5818, 0.7788, 0.5969]}, {"w": "Whenever", "b": [0.7873, 0.5818, 0.8695, 0.5969]}, {"w": "possible,", "b": [0.1312, 0.5999, 0.1997, 0.6148]}, {"w": "let", "b": [0.2058, 0.5999, 0.2263, 0.6148]}, {"w": "the", "b": [0.2325, 0.5999, 0.2581, 0.6148]}, {"w": "user", "b": [0.2643, 0.5999, 0.2972, 0.6148]}, {"w": "explicitly", "b": [0.3034, 0.5999, 0.3772, 0.6148]}, {"w": "express", "b": [0.3834, 0.5999, 0.4416, 0.6148]}, {"w": "their", "b": [0.4478, 0.5999, 0.4858, 0.6148]}, {"w": "interest.", "b": [0.4919, 0.5999, 0.5572, 0.6148]}]}, {"id": "b_8", "type": "paragraph", "text": "Furthermore, not all actions that the system can handle automatically have to be handled this way. For example, if the system automates user’s interactions with other people, it might send private or restricted data as an email reply, or post it to an open forum. Before sharing on a user’s behalf, it makes sense to evaluate the information’s sensitivity. Use a model trained to detect such potentially sensitive texts and images. On the other extreme, a system can be too conservative and automatically filter out relevant information or ask the user to confirm too many decisions which might result in user fatigue.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.6267, 0.2386, 0.6418]}, {"w": "not", "b": [0.2447, 0.6267, 0.2717, 0.6418]}, {"w": "all", "b": [0.2779, 0.6267, 0.2976, 0.6418]}, {"w": "actions", "b": [0.3038, 0.6267, 0.361, 0.6418]}, {"w": "that", "b": [0.3671, 0.6267, 0.4014, 0.6418]}, {"w": "the", "b": [0.4075, 0.6267, 0.4335, 0.6418]}, {"w": "system", "b": [0.4396, 0.6267, 0.4954, 0.6418]}, {"w": "can", "b": [0.5015, 0.6267, 0.5296, 0.6418]}, {"w": "handle", "b": [0.5357, 0.6267, 0.5897, 0.6418]}, {"w": "automatically", "b": [0.5959, 0.6267, 0.7074, 0.6418]}, {"w": "have", "b": [0.7136, 0.6267, 0.7504, 0.6418]}, {"w": "to", "b": [0.7566, 0.6267, 0.7732, 0.6418]}, {"w": "be", "b": [0.7794, 0.6267, 0.7986, 0.6418]}, {"w": "handled", "b": [0.8047, 0.6267, 0.8691, 0.6418]}, {"w": "this", "b": [0.1312, 0.6449, 0.1605, 0.6597]}, {"w": "way.", "b": [0.1661, 0.6449, 0.2002, 0.6597]}, {"w": "For", "b": [0.2082, 0.6449, 0.2346, 0.6597]}, {"w": "example,", "b": [0.2402, 0.6449, 0.31, 0.6597]}, {"w": "if", "b": [0.3158, 0.6449, 0.3263, 0.6597]}, {"w": "the", "b": [0.3319, 0.6449, 0.357, 0.6597]}, {"w": "system", "b": [0.3626, 0.6449, 0.4166, 0.6597]}, {"w": "automates", "b": [0.4222, 0.6449, 0.5037, 0.6597]}, {"w": "user’s", "b": [0.5093, 0.6449, 0.5538, 0.6597]}, {"w": "interactions", "b": [0.5594, 0.6449, 0.6515, 0.6597]}, {"w": "with", "b": [0.6571, 0.6449, 0.6923, 0.6597]}, {"w": "other", "b": [0.6979, 0.6449, 0.7391, 0.6597]}, {"w": "people,", "b": [0.7447, 0.6449, 0.8005, 0.6597]}, {"w": "it", "b": [0.8062, 0.6449, 0.8183, 0.6597]}, {"w": "might", "b": [0.8239, 0.6449, 0.8696, 0.6597]}, {"w": "send", "b": [0.1312, 0.6628, 0.1665, 0.6776]}, {"w": "private", "b": [0.1727, 0.6628, 0.2275, 0.6776]}, {"w": "or", "b": [0.2336, 0.6628, 0.2497, 0.6776]}, {"w": "restricted", "b": [0.2559, 0.6628, 0.3305, 0.6776]}, {"w": "data", "b": [0.3366, 0.6628, 0.3718, 0.6776]}, {"w": "as", "b": [0.378, 0.6628, 0.3941, 0.6776]}, {"w": "an", "b": [0.4003, 0.6628, 0.4194, 0.6776]}, {"w": "email", "b": [0.4255, 0.6628, 0.4677, 0.6776]}, {"w": "reply,", "b": [0.4739, 0.6628, 0.5171, 0.6776]}, {"w": "or", "b": [0.5232, 0.6628, 0.5394, 0.6776]}, {"w": "post", "b": [0.5455, 0.6628, 0.5793, 0.6776]}, {"w": "it", "b": [0.5855, 0.6628, 0.5975, 0.6776]}, {"w": "to", "b": [0.6037, 0.6628, 0.6197, 0.6776]}, {"w": "an", "b": [0.6259, 0.6628, 0.645, 0.6776]}, {"w": "open", "b": [0.6511, 0.6628, 0.6888, 0.6776]}, {"w": "forum.", "b": [0.695, 0.6628, 0.7468, 0.6776]}, {"w": "Before", "b": [0.755, 0.6628, 0.8055, 0.6776]}, {"w": "sharing", "b": [0.8117, 0.6628, 0.8691, 0.6776]}, {"w": "on", "b": [0.1312, 0.6805, 0.1511, 0.6956]}, {"w": "a", "b": [0.1584, 0.6805, 0.1678, 0.6956]}, {"w": "user’s", "b": [0.1751, 0.6805, 0.2214, 0.6956]}, {"w": "behalf,", "b": [0.2288, 0.6805, 0.2842, 0.6956]}, {"w": "it", "b": [0.2918, 0.6805, 0.3044, 0.6956]}, {"w": "makes", "b": [0.3117, 0.6805, 0.362, 0.6956]}, {"w": "sense", "b": [0.3693, 0.6805, 0.4114, 0.6956]}, {"w": "to", "b": [0.4187, 0.6805, 0.4354, 0.6956]}, {"w": "evaluate", "b": [0.4427, 0.6805, 0.5102, 0.6956]}, {"w": "the", "b": [0.5175, 0.6805, 0.5437, 0.6956]}, {"w": "information’s", "b": [0.551, 0.6805, 0.6594, 0.6956]}, {"w": "sensitivity.", "b": [0.6667, 0.6805, 0.7538, 0.6956]}, {"w": "Use", "b": [0.7655, 0.6805, 0.7954, 0.6956]}, {"w": "a", "b": [0.8027, 0.6805, 0.8122, 0.6956]}, {"w": "model", "b": [0.8195, 0.6805, 0.8691, 0.6956]}, {"w": "trained", "b": [0.1312, 0.6987, 0.1876, 0.7135]}, {"w": "to", "b": [0.1934, 0.6987, 0.2094, 0.7135]}, {"w": "detect", "b": [0.2152, 0.6987, 0.2635, 0.7135]}, {"w": "such", "b": [0.2692, 0.6987, 0.304, 0.7135]}, {"w": "potentially", "b": [0.3098, 0.6987, 0.3947, 0.7135]}, {"w": "sensitive", "b": [0.4005, 0.6987, 0.467, 0.7135]}, {"w": "texts", "b": [0.4728, 0.6987, 0.5116, 0.7135]}, {"w": "and", "b": [0.5174, 0.6987, 0.5465, 0.7135]}, {"w": "images.", "b": [0.5523, 0.6987, 0.6107, 0.7135]}, {"w": "On", "b": [0.6188, 0.6987, 0.6429, 0.7135]}, {"w": "the", "b": [0.6487, 0.6987, 0.6738, 0.7135]}, {"w": "other", "b": [0.6796, 0.6987, 0.7208, 0.7135]}, {"w": "extreme,", "b": [0.7266, 0.6987, 0.7945, 0.7135]}, {"w": "a", "b": [0.8004, 0.6987, 0.8094, 0.7135]}, {"w": "system", "b": [0.8152, 0.6987, 0.8691, 0.7135]}, {"w": "can", "b": [0.1312, 0.7165, 0.159, 0.7315]}, {"w": "be", "b": [0.1651, 0.7165, 0.1841, 0.7315]}, {"w": "too", "b": [0.1902, 0.7165, 0.2164, 0.7315]}, {"w": "conservative", "b": [0.2226, 0.7165, 0.3209, 0.7315]}, {"w": "and", "b": [0.327, 0.7165, 0.3568, 0.7315]}, {"w": "automatically", "b": [0.3629, 0.7165, 0.4734, 0.7315]}, {"w": "filter", "b": [0.4795, 0.7165, 0.5176, 0.7315]}, {"w": "out", "b": [0.5237, 0.7165, 0.5504, 0.7315]}, {"w": "relevant", "b": [0.5565, 0.7165, 0.6203, 0.7315]}, {"w": "information", "b": [0.6264, 0.7165, 0.7205, 0.7315]}, {"w": "or", "b": [0.7266, 0.7165, 0.7431, 0.7315]}, {"w": "ask", "b": [0.7492, 0.7165, 0.7755, 0.7315]}, {"w": "the", "b": [0.7817, 0.7165, 0.8073, 0.7315]}, {"w": "user", "b": [0.8135, 0.7165, 0.8465, 0.7315]}, {"w": "to", "b": [0.8527, 0.7165, 0.8691, 0.7315]}, {"w": "confirm", "b": [0.1312, 0.7345, 0.1918, 0.7494]}, {"w": "too", "b": [0.1979, 0.7345, 0.2241, 0.7494]}, {"w": "many", "b": [0.2302, 0.7345, 0.2743, 0.7494]}, {"w": "decisions", "b": [0.2805, 0.7345, 0.3514, 0.7494]}, {"w": "which", "b": [0.3576, 0.7345, 0.4042, 0.7494]}, {"w": "might", "b": [0.4104, 0.7345, 0.457, 0.7494]}, {"w": "result", "b": [0.4632, 0.7345, 0.5085, 0.7494]}, {"w": "in", "b": [0.5146, 0.7345, 0.53, 0.7494]}, {"w": "user", "b": [0.5362, 0.7345, 0.5691, 0.7494]}, {"w": "fatigue.", "b": [0.5753, 0.7345, 0.6353, 0.7494]}]}, {"id": "b_9", "type": "paragraph", "text": "Beware of the Creep Factor", "words": [{"w": "Beware", "b": [0.1312, 0.7591, 0.2113, 0.777]}, {"w": "of", "b": [0.2196, 0.7591, 0.2396, 0.777]}, {"w": "the", "b": [0.248, 0.7591, 0.2828, 0.777]}, {"w": "Creep", "b": [0.2911, 0.7591, 0.3559, 0.777]}, {"w": "Factor", "b": [0.3642, 0.7591, 0.4333, 0.777]}]}, {"id": "b_10", "type": "paragraph", "text": "When users interact with a learning system, there’s a phenomenon known as creep factor.", "words": [{"w": "When", "b": [0.1303, 0.7883, 0.178, 0.8033]}, {"w": "users", "b": [0.1841, 0.7883, 0.2244, 0.8033]}, {"w": "interact", "b": [0.2306, 0.7883, 0.2927, 0.8033]}, {"w": "with", "b": [0.2988, 0.7883, 0.3347, 0.8033]}, {"w": "a", "b": [0.3409, 0.7883, 0.3501, 0.8033]}, {"w": "learning", "b": [0.3562, 0.7883, 0.4209, 0.8033]}, {"w": "system,", "b": [0.427, 0.7883, 0.4872, 0.8033]}, {"w": "there’s", "b": [0.4934, 0.7883, 0.5469, 0.8033]}, {"w": "a", "b": [0.5531, 0.7883, 0.5623, 0.8033]}, {"w": "phenomenon", "b": [0.5684, 0.7883, 0.67, 0.8033]}, {"w": "known", "b": [0.6761, 0.7883, 0.7284, 0.8033]}, {"w": "as", "b": [0.7346, 0.7883, 0.7511, 0.8033]}, {"w": "creep", "b": [0.7569, 0.7883, 0.8063, 0.8032]}, {"w": "factor.", "b": [0.8134, 0.7883, 0.8723, 0.8033]}]}, {"id": "b_11", "type": "paragraph", "text": "It means that the user perceives the model’s predictive capacity as too high. The user feels uncomfortable, especially when a prediction concerns their very private details. Make sure that the system doesn’t feel like “Big Brother” and doesn’t take too much responsibility.", "words": [{"w": "It", "b": [0.1312, 0.8063, 0.1451, 0.8212]}, {"w": "means", "b": [0.1512, 0.8063, 0.2016, 0.8212]}, {"w": "that", "b": [0.2077, 0.8063, 0.2416, 0.8212]}, {"w": "the", "b": [0.2477, 0.8063, 0.2734, 0.8212]}, {"w": "user", "b": [0.2795, 0.8063, 0.3125, 0.8212]}, {"w": "perceives", "b": [0.3187, 0.8063, 0.3912, 0.8212]}, {"w": "the", "b": [0.3973, 0.8063, 0.423, 0.8212]}, {"w": "model’s", "b": [0.4291, 0.8063, 0.4902, 0.8212]}, {"w": "predictive", "b": [0.4964, 0.8063, 0.5754, 0.8212]}, {"w": "capacity", "b": [0.5816, 0.8063, 0.6483, 0.8212]}, {"w": "as", "b": [0.6544, 0.8063, 0.6709, 0.8212]}, {"w": "too", "b": [0.6771, 0.8063, 0.7032, 0.8212]}, {"w": "high.", "b": [0.7094, 0.8063, 0.7494, 0.8212]}, {"w": "The", "b": [0.7576, 0.8063, 0.7894, 0.8212]}, {"w": "user", "b": [0.7956, 0.8063, 0.8285, 0.8212]}, {"w": "feels", "b": [0.8347, 0.8063, 0.8692, 0.8212]}, {"w": "uncomfortable,", "b": [0.1312, 0.8242, 0.2531, 0.8392]}, {"w": "especially", "b": [0.2592, 0.8242, 0.3371, 0.8392]}, {"w": "when", "b": [0.3432, 0.8242, 0.3857, 0.8392]}, {"w": "a", "b": [0.3918, 0.8242, 0.4012, 0.8392]}, {"w": "prediction", "b": [0.4073, 0.8242, 0.4893, 0.8392]}, {"w": "concerns", "b": [0.4954, 0.8242, 0.565, 0.8392]}, {"w": "their", "b": [0.5711, 0.8242, 0.6096, 0.8392]}, {"w": "very", "b": [0.6157, 0.8242, 0.6505, 0.8392]}, {"w": "private", "b": [0.6566, 0.8242, 0.7132, 0.8392]}, {"w": "details.", "b": [0.7193, 0.8242, 0.7775, 0.8392]}, {"w": "Make", "b": [0.7857, 0.8242, 0.8297, 0.8392]}, {"w": "sure", "b": [0.8358, 0.8242, 0.8692, 0.8392]}, {"w": "that", "b": [0.1312, 0.8422, 0.1651, 0.8571]}, {"w": "the", "b": [0.1712, 0.8422, 0.1969, 0.8571]}, {"w": "system", "b": [0.203, 0.8422, 0.2581, 0.8571]}, {"w": "doesn’t", "b": [0.2642, 0.8422, 0.3223, 0.8571]}, {"w": "feel", "b": [0.3284, 0.8422, 0.3556, 0.8571]}, {"w": "like", "b": [0.3618, 0.8422, 0.3895, 0.8571]}, {"w": "“Big", "b": [0.3956, 0.8422, 0.4317, 0.8571]}, {"w": "Brother”", "b": [0.4379, 0.8422, 0.509, 0.8571]}, {"w": "and", "b": [0.5151, 0.8422, 0.5449, 0.8571]}, {"w": "doesn’t", "b": [0.551, 0.8422, 0.6091, 0.8571]}, {"w": "take", "b": [0.6152, 0.8422, 0.6491, 0.8571]}, {"w": "too", "b": [0.6552, 0.8422, 0.6814, 0.8571]}, {"w": "much", "b": [0.6875, 0.8422, 0.7306, 0.8571]}, {"w": "responsibility.", "b": [0.7367, 0.8422, 0.8477, 0.8571]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 14", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "14", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 278, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "9.4 Model Monitoring", "words": [{"w": "9.4", "b": [0.1312, 0.0861, 0.1631, 0.104]}, {"w": "Model", "b": [0.188, 0.0861, 0.2569, 0.104]}, {"w": "Monitoring", "b": [0.2652, 0.0861, 0.3876, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "A deployed model must be constantly monitored. Monitoring helps make sure that,", "words": [{"w": "A", "b": [0.1305, 0.125, 0.1444, 0.1399]}, {"w": "deployed", "b": [0.1505, 0.125, 0.2208, 0.1399]}, {"w": "model", "b": [0.2269, 0.125, 0.2756, 0.1399]}, {"w": "must", "b": [0.2818, 0.125, 0.3214, 0.1399]}, {"w": "be", "b": [0.3275, 0.125, 0.3465, 0.1399]}, {"w": "constantly", "b": [0.3526, 0.125, 0.4358, 0.1399]}, {"w": "monitored.", "b": [0.442, 0.125, 0.5291, 0.1399]}, {"w": "Monitoring", "b": [0.5374, 0.125, 0.6271, 0.1399]}, {"w": "helps", "b": [0.6333, 0.125, 0.6744, 0.1399]}, {"w": "make", "b": [0.6806, 0.125, 0.7226, 0.1399]}, {"w": "sure", "b": [0.7288, 0.125, 0.7617, 0.1399]}, {"w": "that,", "b": [0.7679, 0.125, 0.8068, 0.1399]}]}, {"id": "b_2", "type": "paragraph", "text": "• the model is served correctly, and • the performance of the model remains within acceptable limits.", "words": [{"w": "•", "b": [0.1538, 0.1519, 0.1681, 0.1668]}, {"w": "the", "b": [0.1774, 0.1519, 0.203, 0.1668]}, {"w": "model", "b": [0.2091, 0.1519, 0.2579, 0.1668]}, {"w": "is", "b": [0.264, 0.1519, 0.2764, 0.1668]}, {"w": "served", "b": [0.2826, 0.1519, 0.333, 0.1668]}, {"w": "correctly,", "b": [0.3391, 0.1519, 0.4131, 0.1668]}, {"w": "and", "b": [0.4192, 0.1519, 0.449, 0.1668]}, {"w": "•", "b": [0.1538, 0.1698, 0.1681, 0.1848]}, {"w": "the", "b": [0.1774, 0.1698, 0.203, 0.1848]}, {"w": "performance", "b": [0.2091, 0.1698, 0.3087, 0.1848]}, {"w": "of", "b": [0.3149, 0.1698, 0.3297, 0.1848]}, {"w": "the", "b": [0.3359, 0.1698, 0.3615, 0.1848]}, {"w": "model", "b": [0.3677, 0.1698, 0.4164, 0.1848]}, {"w": "remains", "b": [0.4225, 0.1698, 0.4852, 0.1848]}, {"w": "within", "b": [0.4914, 0.1698, 0.5427, 0.1848]}, {"w": "acceptable", "b": [0.5488, 0.1698, 0.6329, 0.1848]}, {"w": "limits.", "b": [0.6391, 0.1698, 0.6894, 0.1848]}]}, {"id": "b_3", "type": "paragraph", "text": "9.4.1 What Can Go Wrong?", "words": [{"w": "9.4.1", "b": [0.1312, 0.2176, 0.1749, 0.2326]}, {"w": "What", "b": [0.1961, 0.2176, 0.2484, 0.2326]}, {"w": "Can", "b": [0.2554, 0.2176, 0.2929, 0.2326]}, {"w": "Go", "b": [0.3, 0.2176, 0.3272, 0.2326]}, {"w": "Wrong?", "b": [0.3343, 0.2176, 0.4062, 0.2326]}]}, {"id": "b_4", "type": "paragraph", "text": "Monitoring should be designed to provide early warnings about issues with the model in production. More specifically, this includes:", "words": [{"w": "Monitoring", "b": [0.1312, 0.2541, 0.2228, 0.2693]}, {"w": "should", "b": [0.2298, 0.2541, 0.2832, 0.2693]}, {"w": "be", "b": [0.2902, 0.2541, 0.3096, 0.2693]}, {"w": "designed", "b": [0.3165, 0.2541, 0.3867, 0.2693]}, {"w": "to", "b": [0.3937, 0.2541, 0.4104, 0.2693]}, {"w": "provide", "b": [0.4174, 0.2541, 0.4781, 0.2693]}, {"w": "early", "b": [0.4851, 0.2541, 0.5254, 0.2693]}, {"w": "warnings", "b": [0.5324, 0.2541, 0.6052, 0.2693]}, {"w": "about", "b": [0.6122, 0.2541, 0.6598, 0.2693]}, {"w": "issues", "b": [0.6668, 0.2541, 0.7131, 0.2693]}, {"w": "with", "b": [0.7201, 0.2541, 0.7567, 0.2693]}, {"w": "the", "b": [0.7637, 0.2541, 0.7898, 0.2693]}, {"w": "model", "b": [0.7968, 0.2541, 0.8465, 0.2693]}, {"w": "in", "b": [0.8534, 0.2541, 0.8691, 0.2693]}, {"w": "production.", "b": [0.1312, 0.2722, 0.2241, 0.2872]}, {"w": "More", "b": [0.2323, 0.2722, 0.2739, 0.2872]}, {"w": "specifically,", "b": [0.28, 0.2722, 0.3709, 0.2872]}, {"w": "this", "b": [0.3771, 0.2722, 0.4069, 0.2872]}, {"w": "includes:", "b": [0.4131, 0.2722, 0.4829, 0.2872]}]}, {"id": "b_5", "type": "paragraph", "text": "• new training data used to update the model made it perform worse; • the live data in production changed, but the model didn’t; • the feature extraction code was significantly updated, but the model didn’t adapt; • a resource needed to generate a feature changed or became unavailable; • the model is being abused or under an adversarial attack.", "words": [{"w": "•", "b": [0.1538, 0.2991, 0.1681, 0.3141]}, {"w": "new", "b": [0.1774, 0.2991, 0.2091, 0.3141]}, {"w": "training", "b": [0.2153, 0.2991, 0.2789, 0.3141]}, {"w": "data", "b": [0.2851, 0.2991, 0.3209, 0.3141]}, {"w": "used", "b": [0.3271, 0.2991, 0.3631, 0.3141]}, {"w": "to", "b": [0.3693, 0.2991, 0.3857, 0.3141]}, {"w": "update", "b": [0.3918, 0.2991, 0.4477, 0.3141]}, {"w": "the", "b": [0.4539, 0.2991, 0.4795, 0.3141]}, {"w": "model", "b": [0.4856, 0.2991, 0.5344, 0.3141]}, {"w": "made", "b": [0.5405, 0.2991, 0.5836, 0.3141]}, {"w": "it", "b": [0.5897, 0.2991, 0.602, 0.3141]}, {"w": "perform", "b": [0.6082, 0.2991, 0.6718, 0.3141]}, {"w": "worse;", "b": [0.678, 0.2991, 0.7279, 0.3141]}, {"w": "•", "b": [0.1538, 0.3171, 0.1681, 0.332]}, {"w": "the", "b": [0.1774, 0.3171, 0.203, 0.332]}, {"w": "live", "b": [0.2091, 0.3171, 0.2368, 0.332]}, {"w": "data", "b": [0.243, 0.3171, 0.2789, 0.332]}, {"w": "in", "b": [0.285, 0.3171, 0.3004, 0.332]}, {"w": "production", "b": [0.3066, 0.3171, 0.3943, 0.332]}, {"w": "changed,", "b": [0.4004, 0.3171, 0.4707, 0.332]}, {"w": "but", "b": [0.4768, 0.3171, 0.5045, 0.332]}, {"w": "the", "b": [0.5107, 0.3171, 0.5363, 0.332]}, {"w": "model", "b": [0.5425, 0.3171, 0.5912, 0.332]}, {"w": "didn’t;", "b": [0.5973, 0.3171, 0.6507, 0.332]}, {"w": "•", "b": [0.1538, 0.335, 0.1681, 0.35]}, {"w": "the", "b": [0.1774, 0.335, 0.203, 0.35]}, {"w": "feature", "b": [0.2091, 0.335, 0.2651, 0.35]}, {"w": "extraction", "b": [0.2712, 0.335, 0.3528, 0.35]}, {"w": "code", "b": [0.359, 0.335, 0.3954, 0.35]}, {"w": "was", "b": [0.4015, 0.335, 0.4309, 0.35]}, {"w": "significantly", "b": [0.437, 0.335, 0.5335, 0.35]}, {"w": "updated,", "b": [0.5397, 0.335, 0.611, 0.35]}, {"w": "but", "b": [0.6171, 0.335, 0.6448, 0.35]}, {"w": "the", "b": [0.6509, 0.335, 0.6766, 0.35]}, {"w": "model", "b": [0.6827, 0.335, 0.7314, 0.35]}, {"w": "didn’t", "b": [0.7376, 0.335, 0.7858, 0.35]}, {"w": "adapt;", "b": [0.7919, 0.335, 0.8432, 0.35]}, {"w": "•", "b": [0.1538, 0.353, 0.1681, 0.3679]}, {"w": "a", "b": [0.1774, 0.353, 0.1866, 0.3679]}, {"w": "resource", "b": [0.1927, 0.353, 0.2586, 0.3679]}, {"w": "needed", "b": [0.2647, 0.353, 0.3201, 0.3679]}, {"w": "to", "b": [0.3263, 0.353, 0.3427, 0.3679]}, {"w": "generate", "b": [0.3488, 0.353, 0.4166, 0.3679]}, {"w": "a", "b": [0.4227, 0.353, 0.432, 0.3679]}, {"w": "feature", "b": [0.4381, 0.353, 0.4941, 0.3679]}, {"w": "changed", "b": [0.5002, 0.353, 0.5653, 0.3679]}, {"w": "or", "b": [0.5715, 0.353, 0.5879, 0.3679]}, {"w": "became", "b": [0.5941, 0.353, 0.6541, 0.3679]}, {"w": "unavailable;", "b": [0.6602, 0.353, 0.7556, 0.3679]}, {"w": "•", "b": [0.1538, 0.3709, 0.1681, 0.3859]}, {"w": "the", "b": [0.1774, 0.3709, 0.203, 0.3859]}, {"w": "model", "b": [0.2091, 0.3709, 0.2579, 0.3859]}, {"w": "is", "b": [0.264, 0.3709, 0.2764, 0.3859]}, {"w": "being", "b": [0.2826, 0.3709, 0.3262, 0.3859]}, {"w": "abused", "b": [0.3323, 0.3709, 0.3878, 0.3859]}, {"w": "or", "b": [0.394, 0.3709, 0.4104, 0.3859]}, {"w": "under", "b": [0.4166, 0.3709, 0.4628, 0.3859]}, {"w": "an", "b": [0.4689, 0.3709, 0.4884, 0.3859]}, {"w": "adversarial", "b": [0.4945, 0.3709, 0.5819, 0.3859]}, {"w": "attack.", "b": [0.5881, 0.3709, 0.6434, 0.3859]}]}, {"id": "b_6", "type": "paragraph", "text": "Additional training data is not always good. A labeler may have incorrectly interpreted the labeling instructions. Or, one labeler’s decisions might be in contradiction with another labeler. Data automatically gathered to improve the model may be biased. Reasons for that could be, for example, a hidden feedback loop considered in Section 9.1.6 or a systematic value distortion discussed in Section ?? of Chapter 3.", "words": [{"w": "Additional", "b": [0.1305, 0.3977, 0.2174, 0.4128]}, {"w": "training", "b": [0.2242, 0.3977, 0.289, 0.4128]}, {"w": "data", "b": [0.2959, 0.3977, 0.3325, 0.4128]}, {"w": "is", "b": [0.3392, 0.3977, 0.3519, 0.4128]}, {"w": "not", "b": [0.3587, 0.3977, 0.3859, 0.4128]}, {"w": "always", "b": [0.3927, 0.3977, 0.4467, 0.4128]}, {"w": "good.", "b": [0.4535, 0.3977, 0.4984, 0.4128]}, {"w": "A", "b": [0.5085, 0.3977, 0.5226, 0.4128]}, {"w": "labeler", "b": [0.5293, 0.3978, 0.592, 0.4128]}, {"w": "may", "b": [0.5988, 0.3977, 0.6333, 0.4128]}, {"w": "have", "b": [0.6401, 0.3977, 0.6772, 0.4128]}, {"w": "incorrectly", "b": [0.684, 0.3977, 0.7715, 0.4128]}, {"w": "interpreted", "b": [0.7783, 0.3977, 0.8689, 0.4128]}, {"w": "the", "b": [0.1312, 0.4158, 0.1568, 0.4307]}, {"w": "labeling", "b": [0.1629, 0.4158, 0.2258, 0.4307]}, {"w": "instructions.", "b": [0.2319, 0.4158, 0.3313, 0.4307]}, {"w": "Or,", "b": [0.3395, 0.4158, 0.3661, 0.4307]}, {"w": "one", "b": [0.3723, 0.4158, 0.3999, 0.4307]}, {"w": "labeler’s", "b": [0.4061, 0.4158, 0.4721, 0.4307]}, {"w": "decisions", "b": [0.4783, 0.4158, 0.549, 0.4307]}, {"w": "might", "b": [0.5552, 0.4158, 0.6016, 0.4307]}, {"w": "be", "b": [0.6078, 0.4158, 0.6267, 0.4307]}, {"w": "in", "b": [0.6329, 0.4158, 0.6482, 0.4307]}, {"w": "contradiction", "b": [0.6543, 0.4158, 0.7601, 0.4307]}, {"w": "with", "b": [0.7663, 0.4158, 0.802, 0.4307]}, {"w": "another", "b": [0.8082, 0.4158, 0.8695, 0.4307]}, {"w": "labeler.", "b": [0.1312, 0.4338, 0.1895, 0.4487]}, {"w": "Data", "b": [0.1977, 0.4338, 0.2369, 0.4487]}, {"w": "automatically", "b": [0.2431, 0.4338, 0.3518, 0.4487]}, {"w": "gathered", "b": [0.358, 0.4338, 0.4269, 0.4487]}, {"w": "to", "b": [0.433, 0.4338, 0.4492, 0.4487]}, {"w": "improve", "b": [0.4553, 0.4338, 0.5186, 0.4487]}, {"w": "the", "b": [0.5248, 0.4338, 0.5501, 0.4487]}, {"w": "model", "b": [0.5562, 0.4338, 0.6043, 0.4487]}, {"w": "may", "b": [0.6105, 0.4338, 0.6438, 0.4487]}, {"w": "be", "b": [0.65, 0.4338, 0.6687, 0.4487]}, {"w": "biased.", "b": [0.6749, 0.4338, 0.7296, 0.4487]}, {"w": "Reasons", "b": [0.7378, 0.4338, 0.8021, 0.4487]}, {"w": "for", "b": [0.8082, 0.4338, 0.83, 0.4487]}, {"w": "that", "b": [0.8362, 0.4338, 0.8696, 0.4487]}, {"w": "could", "b": [0.1312, 0.4518, 0.1735, 0.4666]}, {"w": "be,", "b": [0.1786, 0.4518, 0.2022, 0.4666]}, {"w": "for", "b": [0.2076, 0.4518, 0.2292, 0.4666]}, {"w": "example,", "b": [0.2344, 0.4518, 0.3042, 0.4666]}, {"w": "a", "b": [0.3096, 0.4518, 0.3186, 0.4666]}, {"w": "hidden", "b": [0.3239, 0.4516, 0.3867, 0.4666]}, {"w": "feedback", "b": [0.3926, 0.4516, 0.4724, 0.4666]}, {"w": "loop", "b": [0.4784, 0.4516, 0.5179, 0.4666]}, {"w": "considered", "b": [0.523, 0.4518, 0.6056, 0.4666]}, {"w": "in", "b": [0.6108, 0.4518, 0.6258, 0.4666]}, {"w": "Section", "b": [0.631, 0.4518, 0.6883, 0.4666]}, {"w": "9.1.6", "b": [0.6934, 0.4518, 0.7306, 0.4666]}, {"w": "or", "b": [0.7357, 0.4518, 0.7519, 0.4666]}, {"w": "a", "b": [0.757, 0.4518, 0.7661, 0.4666]}, {"w": "systematic", "b": [0.7713, 0.4516, 0.8688, 0.4666]}, {"w": "value", "b": [0.1312, 0.4696, 0.179, 0.4845]}, {"w": "distortion", "b": [0.186, 0.4696, 0.2763, 0.4845]}, {"w": "discussed", "b": [0.2825, 0.4696, 0.3566, 0.4846]}, {"w": "in", "b": [0.3628, 0.4696, 0.3782, 0.4846]}, {"w": "Section", "b": [0.3843, 0.4696, 0.4428, 0.4846]}, {"w": "??", "b": [0.4488, 0.4696, 0.4688, 0.4845]}, {"w": "of", "b": [0.475, 0.4696, 0.4899, 0.4846]}, {"w": "Chapter", "b": [0.496, 0.4696, 0.5617, 0.4846]}, {"w": "3.", "b": [0.5678, 0.4696, 0.5822, 0.4846]}]}, {"id": "b_7", "type": "paragraph", "text": "Sometimes, the properties of the data in production gradually change, but the model doesn’t adapt. It remains based on older data, which is no longer representative. One reason for this is concept drift that we discussed in Section 9.3.", "words": [{"w": "Sometimes,", "b": [0.1312, 0.4967, 0.2208, 0.5115]}, {"w": "the", "b": [0.2269, 0.4967, 0.252, 0.5115]}, {"w": "properties", "b": [0.2581, 0.4967, 0.3372, 0.5115]}, {"w": "of", "b": [0.3433, 0.4967, 0.3578, 0.5115]}, {"w": "the", "b": [0.3639, 0.4967, 0.3891, 0.5115]}, {"w": "data", "b": [0.3951, 0.4967, 0.4303, 0.5115]}, {"w": "in", "b": [0.4364, 0.4967, 0.4515, 0.5115]}, {"w": "production", "b": [0.4575, 0.4967, 0.5435, 0.5115]}, {"w": "gradually", "b": [0.5496, 0.4967, 0.6235, 0.5115]}, {"w": "change,", "b": [0.6296, 0.4967, 0.6884, 0.5115]}, {"w": "but", "b": [0.6945, 0.4967, 0.7216, 0.5115]}, {"w": "the", "b": [0.7277, 0.4967, 0.7528, 0.5115]}, {"w": "model", "b": [0.7589, 0.4967, 0.8066, 0.5115]}, {"w": "doesn’t", "b": [0.8127, 0.4967, 0.8696, 0.5115]}, {"w": "adapt.", "b": [0.1312, 0.5146, 0.1815, 0.5294]}, {"w": "It", "b": [0.1897, 0.5146, 0.2032, 0.5294]}, {"w": "remains", "b": [0.2093, 0.5146, 0.2708, 0.5294]}, {"w": "based", "b": [0.2769, 0.5146, 0.3212, 0.5294]}, {"w": "on", "b": [0.3273, 0.5146, 0.3464, 0.5294]}, {"w": "older", "b": [0.3525, 0.5146, 0.3918, 0.5294]}, {"w": "data,", "b": [0.3979, 0.5146, 0.4381, 0.5294]}, {"w": "which", "b": [0.4442, 0.5146, 0.4899, 0.5294]}, {"w": "is", "b": [0.496, 0.5146, 0.5082, 0.5294]}, {"w": "no", "b": [0.5143, 0.5146, 0.5334, 0.5294]}, {"w": "longer", "b": [0.5395, 0.5146, 0.5878, 0.5294]}, {"w": "representative.", "b": [0.5939, 0.5146, 0.7092, 0.5294]}, {"w": "One", "b": [0.7173, 0.5146, 0.7495, 0.5294]}, {"w": "reason", "b": [0.7556, 0.5146, 0.806, 0.5294]}, {"w": "for", "b": [0.8121, 0.5146, 0.8338, 0.5294]}, {"w": "this", "b": [0.8399, 0.5146, 0.8691, 0.5294]}, {"w": "is", "b": [0.1312, 0.5324, 0.1436, 0.5474]}, {"w": "concept", "b": [0.1498, 0.5324, 0.2208, 0.5474]}, {"w": "drift", "b": [0.2279, 0.5324, 0.269, 0.5474]}, {"w": "that", "b": [0.2752, 0.5324, 0.309, 0.5474]}, {"w": "we", "b": [0.3152, 0.5324, 0.3362, 0.5474]}, {"w": "discussed", "b": [0.3423, 0.5324, 0.4165, 0.5474]}, {"w": "in", "b": [0.4227, 0.5324, 0.438, 0.5474]}, {"w": "Section", "b": [0.4442, 0.5324, 0.5027, 0.5474]}, {"w": "9.3.", "b": [0.5088, 0.5324, 0.5375, 0.5474]}]}, {"id": "b_8", "type": "paragraph", "text": "A software engineer could fix a bug in the feature extraction code, and update the feature extractor in production. But if the engineer fails to also update the production model, the performance may change in an unpredictable manner.", "words": [{"w": "A", "b": [0.1305, 0.5593, 0.1446, 0.5743]}, {"w": "software", "b": [0.1507, 0.5593, 0.2181, 0.5743]}, {"w": "engineer", "b": [0.2243, 0.5593, 0.2921, 0.5743]}, {"w": "could", "b": [0.2982, 0.5593, 0.342, 0.5743]}, {"w": "fix", "b": [0.3481, 0.5593, 0.3684, 0.5743]}, {"w": "a", "b": [0.3746, 0.5593, 0.384, 0.5743]}, {"w": "bug", "b": [0.3901, 0.5593, 0.4203, 0.5743]}, {"w": "in", "b": [0.4265, 0.5593, 0.4421, 0.5743]}, {"w": "the", "b": [0.4482, 0.5593, 0.4743, 0.5743]}, {"w": "feature", "b": [0.4804, 0.5593, 0.5373, 0.5743]}, {"w": "extraction", "b": [0.5434, 0.5593, 0.6263, 0.5743]}, {"w": "code,", "b": [0.6325, 0.5593, 0.6747, 0.5743]}, {"w": "and", "b": [0.6808, 0.5593, 0.711, 0.5743]}, {"w": "update", "b": [0.7172, 0.5593, 0.774, 0.5743]}, {"w": "the", "b": [0.7801, 0.5593, 0.8062, 0.5743]}, {"w": "feature", "b": [0.8123, 0.5593, 0.8692, 0.5743]}, {"w": "extractor", "b": [0.1312, 0.5773, 0.2053, 0.5923]}, {"w": "in", "b": [0.2115, 0.5773, 0.227, 0.5923]}, {"w": "production.", "b": [0.2332, 0.5773, 0.3269, 0.5923]}, {"w": "But", "b": [0.3351, 0.5773, 0.3659, 0.5923]}, {"w": "if", "b": [0.372, 0.5773, 0.3829, 0.5923]}, {"w": "the", "b": [0.3891, 0.5773, 0.4149, 0.5923]}, {"w": "engineer", "b": [0.4211, 0.5773, 0.4884, 0.5923]}, {"w": "fails", "b": [0.4946, 0.5773, 0.5273, 0.5923]}, {"w": "to", "b": [0.5335, 0.5773, 0.55, 0.5923]}, {"w": "also", "b": [0.5562, 0.5773, 0.5873, 0.5923]}, {"w": "update", "b": [0.5935, 0.5773, 0.6499, 0.5923]}, {"w": "the", "b": [0.6561, 0.5773, 0.6819, 0.5923]}, {"w": "production", "b": [0.6881, 0.5773, 0.7766, 0.5923]}, {"w": "model,", "b": [0.7828, 0.5773, 0.8371, 0.5923]}, {"w": "the", "b": [0.8432, 0.5773, 0.8691, 0.5923]}, {"w": "performance", "b": [0.1312, 0.5953, 0.2308, 0.6102]}, {"w": "may", "b": [0.237, 0.5953, 0.2708, 0.6102]}, {"w": "change", "b": [0.2769, 0.5953, 0.3318, 0.6102]}, {"w": "in", "b": [0.338, 0.5953, 0.3533, 0.6102]}, {"w": "an", "b": [0.3595, 0.5953, 0.379, 0.6102]}, {"w": "unpredictable", "b": [0.3851, 0.5953, 0.4949, 0.6102]}, {"w": "manner.", "b": [0.5011, 0.5953, 0.5667, 0.6102]}]}, {"id": "b_9", "type": "paragraph", "text": "Even if the feature extraction and the model are in sync, a disappearance or a change of some resource (database connection, database table, or external API) may affect some of the features generated by that feature extractor.", "words": [{"w": "Even", "b": [0.1312, 0.6221, 0.1723, 0.6372]}, {"w": "if", "b": [0.1791, 0.6221, 0.1901, 0.6372]}, {"w": "the", "b": [0.1968, 0.6221, 0.223, 0.6372]}, {"w": "feature", "b": [0.2298, 0.6221, 0.2868, 0.6372]}, {"w": "extraction", "b": [0.2936, 0.6221, 0.3768, 0.6372]}, {"w": "and", "b": [0.3836, 0.6221, 0.4139, 0.6372]}, {"w": "the", "b": [0.4207, 0.6221, 0.4468, 0.6372]}, {"w": "model", "b": [0.4536, 0.6221, 0.5033, 0.6372]}, {"w": "are", "b": [0.51, 0.6221, 0.5352, 0.6372]}, {"w": "in", "b": [0.542, 0.6221, 0.5577, 0.6372]}, {"w": "sync,", "b": [0.5644, 0.6221, 0.6059, 0.6372]}, {"w": "a", "b": [0.6128, 0.6221, 0.6222, 0.6372]}, {"w": "disappearance", "b": [0.629, 0.6221, 0.7447, 0.6372]}, {"w": "or", "b": [0.7515, 0.6221, 0.7683, 0.6372]}, {"w": "a", "b": [0.775, 0.6221, 0.7845, 0.6372]}, {"w": "change", "b": [0.7912, 0.6221, 0.8472, 0.6372]}, {"w": "of", "b": [0.854, 0.6221, 0.8691, 0.6372]}, {"w": "some", "b": [0.1312, 0.6402, 0.1705, 0.655]}, {"w": "resource", "b": [0.1767, 0.6402, 0.2412, 0.655]}, {"w": "(database", "b": [0.2474, 0.6402, 0.3239, 0.655]}, {"w": "connection,", "b": [0.33, 0.6402, 0.4195, 0.655]}, {"w": "database", "b": [0.4257, 0.6402, 0.4951, 0.655]}, {"w": "table,", "b": [0.5013, 0.6402, 0.5455, 0.655]}, {"w": "or", "b": [0.5517, 0.6402, 0.5678, 0.655]}, {"w": "external", "b": [0.574, 0.6402, 0.6378, 0.655]}, {"w": "API)", "b": [0.644, 0.6402, 0.6834, 0.655]}, {"w": "may", "b": [0.6896, 0.6402, 0.7227, 0.655]}, {"w": "affect", "b": [0.7289, 0.6402, 0.7716, 0.655]}, {"w": "some", "b": [0.7778, 0.6402, 0.8171, 0.655]}, {"w": "of", "b": [0.8232, 0.6402, 0.8378, 0.655]}, {"w": "the", "b": [0.844, 0.6402, 0.8691, 0.655]}, {"w": "features", "b": [0.1312, 0.6581, 0.1945, 0.673]}, {"w": "generated", "b": [0.2006, 0.6581, 0.2786, 0.673]}, {"w": "by", "b": [0.2848, 0.6581, 0.3043, 0.673]}, {"w": "that", "b": [0.3104, 0.6581, 0.3442, 0.673]}, {"w": "feature", "b": [0.3504, 0.6581, 0.4063, 0.673]}, {"w": "extractor.", "b": [0.4125, 0.6581, 0.491, 0.673]}]}, {"id": "b_10", "type": "paragraph", "text": "Some models, especially those deployed in e-commerce and media platforms, often become targets of adversarial attacks. Bad actors, such as unfair competitors, fraudsters, criminals, and foreign governments, may actively seek out weaknesses in a model and adjust their attacks accordingly. If your machine learning system learns from the user’s actions, then some may act to change the model behavior in their favor.", "words": [{"w": "Some", "b": [0.1312, 0.6849, 0.1747, 0.7]}, {"w": "models,", "b": [0.1809, 0.6849, 0.2426, 0.7]}, {"w": "especially", "b": [0.2488, 0.6849, 0.3266, 0.7]}, {"w": "those", "b": [0.3327, 0.6849, 0.3753, 0.7]}, {"w": "deployed", "b": [0.3815, 0.6849, 0.4524, 0.7]}, {"w": "in", "b": [0.4586, 0.6849, 0.4741, 0.7]}, {"w": "e-commerce", "b": [0.4803, 0.6849, 0.5756, 0.7]}, {"w": "and", "b": [0.5818, 0.6849, 0.6118, 0.7]}, {"w": "media", "b": [0.618, 0.6849, 0.6666, 0.7]}, {"w": "platforms,", "b": [0.6728, 0.6849, 0.7553, 0.7]}, {"w": "often", "b": [0.7614, 0.6849, 0.8024, 0.7]}, {"w": "become", "b": [0.8085, 0.6849, 0.8691, 0.7]}, {"w": "targets", "b": [0.1312, 0.7029, 0.1869, 0.7179]}, {"w": "of", "b": [0.193, 0.7029, 0.2079, 0.7179]}, {"w": "adversarial", "b": [0.2141, 0.7029, 0.3016, 0.7179]}, {"w": "attacks.", "b": [0.3078, 0.7029, 0.3706, 0.7179]}, {"w": "Bad", "b": [0.3788, 0.7029, 0.4114, 0.7179]}, {"w": "actors,", "b": [0.4175, 0.7029, 0.4711, 0.7179]}, {"w": "such", "b": [0.4773, 0.7029, 0.5129, 0.7179]}, {"w": "as", "b": [0.519, 0.7029, 0.5356, 0.7179]}, {"w": "unfair", "b": [0.5417, 0.7029, 0.5896, 0.7179]}, {"w": "competitors,", "b": [0.5957, 0.7029, 0.696, 0.7179]}, {"w": "fraudsters,", "b": [0.7022, 0.7029, 0.7873, 0.7179]}, {"w": "criminals,", "b": [0.7935, 0.7029, 0.8717, 0.7179]}, {"w": "and", "b": [0.1312, 0.7208, 0.1616, 0.7359]}, {"w": "foreign", "b": [0.1692, 0.7208, 0.2252, 0.7359]}, {"w": "governments,", "b": [0.2329, 0.7208, 0.3408, 0.7359]}, {"w": "may", "b": [0.3488, 0.7208, 0.3833, 0.7359]}, {"w": "actively", "b": [0.391, 0.7208, 0.4543, 0.7359]}, {"w": "seek", "b": [0.4619, 0.7208, 0.4961, 0.7359]}, {"w": "out", "b": [0.5037, 0.7208, 0.5309, 0.7359]}, {"w": "weaknesses", "b": [0.5386, 0.7208, 0.6289, 0.7359]}, {"w": "in", "b": [0.6365, 0.7208, 0.6522, 0.7359]}, {"w": "a", "b": [0.6599, 0.7208, 0.6693, 0.7359]}, {"w": "model", "b": [0.6769, 0.7208, 0.7266, 0.7359]}, {"w": "and", "b": [0.7342, 0.7208, 0.7646, 0.7359]}, {"w": "adjust", "b": [0.7722, 0.7208, 0.8231, 0.7359]}, {"w": "their", "b": [0.8307, 0.7208, 0.8695, 0.7359]}, {"w": "attacks", "b": [0.1312, 0.7387, 0.1899, 0.7538]}, {"w": "accordingly.", "b": [0.1967, 0.7387, 0.294, 0.7538]}, {"w": "If", "b": [0.3041, 0.7387, 0.3166, 0.7538]}, {"w": "your", "b": [0.3234, 0.7387, 0.3601, 0.7538]}, {"w": "machine", "b": [0.3668, 0.7387, 0.4343, 0.7538]}, {"w": "learning", "b": [0.4411, 0.7387, 0.507, 0.7538]}, {"w": "system", "b": [0.5138, 0.7387, 0.57, 0.7538]}, {"w": "learns", "b": [0.5767, 0.7387, 0.625, 0.7538]}, {"w": "from", "b": [0.6318, 0.7387, 0.67, 0.7538]}, {"w": "the", "b": [0.6768, 0.7387, 0.7029, 0.7538]}, {"w": "user’s", "b": [0.7097, 0.7387, 0.756, 0.7538]}, {"w": "actions,", "b": [0.7627, 0.7387, 0.8256, 0.7538]}, {"w": "then", "b": [0.8325, 0.7387, 0.8691, 0.7538]}, {"w": "some", "b": [0.1312, 0.7568, 0.1713, 0.7717]}, {"w": "may", "b": [0.1775, 0.7568, 0.2113, 0.7717]}, {"w": "act", "b": [0.2174, 0.7568, 0.2421, 0.7717]}, {"w": "to", "b": [0.2482, 0.7568, 0.2646, 0.7717]}, {"w": "change", "b": [0.2707, 0.7568, 0.3256, 0.7717]}, {"w": "the", "b": [0.3318, 0.7568, 0.3574, 0.7717]}, {"w": "model", "b": [0.3636, 0.7568, 0.4123, 0.7717]}, {"w": "behavior", "b": [0.4184, 0.7568, 0.4877, 0.7717]}, {"w": "in", "b": [0.4938, 0.7568, 0.5092, 0.7717]}, {"w": "their", "b": [0.5154, 0.7568, 0.5534, 0.7717]}, {"w": "favor.", "b": [0.5595, 0.7568, 0.6047, 0.7717]}]}, {"id": "b_11", "type": "paragraph", "text": "Furthermore, attackers may want to examine the trained model in order to obtain information about the model’s training data. That training data might contain confidential information about people and organizations.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.7838, 0.2351, 0.7986]}, {"w": "attackers", "b": [0.2405, 0.7838, 0.3114, 0.7986]}, {"w": "may", "b": [0.3166, 0.7838, 0.3497, 0.7986]}, {"w": "want", "b": [0.3548, 0.7838, 0.393, 0.7986]}, {"w": "to", "b": [0.3981, 0.7838, 0.4142, 0.7986]}, {"w": "examine", "b": [0.4193, 0.7838, 0.4841, 0.7986]}, {"w": "the", "b": [0.4893, 0.7838, 0.5144, 0.7986]}, {"w": "trained", "b": [0.5195, 0.7838, 0.5758, 0.7986]}, {"w": "model", "b": [0.581, 0.7838, 0.6287, 0.7986]}, {"w": "in", "b": [0.6338, 0.7838, 0.6489, 0.7986]}, {"w": "order", "b": [0.654, 0.7838, 0.6954, 0.7986]}, {"w": "to", "b": [0.7005, 0.7838, 0.7166, 0.7986]}, {"w": "obtain", "b": [0.7217, 0.7838, 0.7719, 0.7986]}, {"w": "information", "b": [0.7771, 0.7838, 0.8691, 0.7986]}, {"w": "about", "b": [0.1312, 0.8017, 0.1778, 0.8166]}, {"w": "the", "b": [0.1839, 0.8017, 0.2095, 0.8166]}, {"w": "model’s", "b": [0.2157, 0.8017, 0.2766, 0.8166]}, {"w": "training", "b": [0.2828, 0.8017, 0.3462, 0.8166]}, {"w": "data.", "b": [0.3524, 0.8017, 0.3933, 0.8166]}, {"w": "That", "b": [0.4015, 0.8017, 0.4414, 0.8166]}, {"w": "training", "b": [0.4476, 0.8017, 0.511, 0.8166]}, {"w": "data", "b": [0.5172, 0.8017, 0.553, 0.8166]}, {"w": "might", "b": [0.5591, 0.8017, 0.6056, 0.8166]}, {"w": "contain", "b": [0.6118, 0.8017, 0.6706, 0.8166]}, {"w": "confidential", "b": [0.6767, 0.8017, 0.7693, 0.8166]}, {"w": "information", "b": [0.7755, 0.8017, 0.869, 0.8166]}, {"w": "about", "b": [0.1312, 0.8196, 0.1779, 0.8345]}, {"w": "people", "b": [0.184, 0.8196, 0.2358, 0.8345]}, {"w": "and", "b": [0.242, 0.8196, 0.2717, 0.8345]}, {"w": "organizations.", "b": [0.2779, 0.8196, 0.3898, 0.8345]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 15", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "15", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 279, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Another form of abuse, which may be the hardest to prevent, is model dual use. As any software, a machine learning model can be used for good (as you intended) or for bad (often without your consent). For example, you might create and publicly release a model that makes one’s voice sound like a cartoon character. Fraudsters may adapt your result to fake the voice of a bank client, and execute a phone transaction on their behalf. Alternatively, you might create a model that recognizes pedestrians on the street. An automatic weapon manufacturer could use your model to detect people on the battlefield.", "words": [{"w": "Another", "b": [0.1305, 0.0883, 0.1981, 0.1034]}, {"w": "form", "b": [0.2045, 0.0883, 0.2427, 0.1034]}, {"w": "of", "b": [0.2492, 0.0883, 0.2643, 0.1034]}, {"w": "abuse,", "b": [0.2708, 0.0883, 0.3222, 0.1034]}, {"w": "which", "b": [0.3287, 0.0883, 0.3763, 0.1034]}, {"w": "may", "b": [0.3828, 0.0883, 0.4173, 0.1034]}, {"w": "be", "b": [0.4237, 0.0883, 0.4431, 0.1034]}, {"w": "the", "b": [0.4495, 0.0883, 0.4757, 0.1034]}, {"w": "hardest", "b": [0.4822, 0.0883, 0.543, 0.1034]}, {"w": "to", "b": [0.5494, 0.0883, 0.5662, 0.1034]}, {"w": "prevent,", "b": [0.5726, 0.0883, 0.6391, 0.1034]}, {"w": "is", "b": [0.6457, 0.0883, 0.6583, 0.1034]}, {"w": "model", "b": [0.6648, 0.0883, 0.7144, 0.1034]}, {"w": "dual", "b": [0.7207, 0.0884, 0.7605, 0.1033]}, {"w": "use.", "b": [0.7679, 0.0883, 0.8031, 0.1034]}, {"w": "As", "b": [0.8122, 0.0883, 0.8337, 0.1034]}, {"w": "any", "b": [0.8402, 0.0883, 0.8695, 0.1034]}, {"w": "software,", "b": [0.1312, 0.1064, 0.2016, 0.1213]}, {"w": "a", "b": [0.2078, 0.1064, 0.2169, 0.1213]}, {"w": "machine", "b": [0.223, 0.1064, 0.2882, 0.1213]}, {"w": "learning", "b": [0.2944, 0.1064, 0.3581, 0.1213]}, {"w": "model", "b": [0.3643, 0.1064, 0.4123, 0.1213]}, {"w": "can", "b": [0.4184, 0.1064, 0.4457, 0.1213]}, {"w": "be", "b": [0.4519, 0.1064, 0.4706, 0.1213]}, {"w": "used", "b": [0.4768, 0.1064, 0.5122, 0.1213]}, {"w": "for", "b": [0.5184, 0.1064, 0.5402, 0.1213]}, {"w": "good", "b": [0.5463, 0.1064, 0.5848, 0.1213]}, {"w": "(as", "b": [0.5909, 0.1064, 0.6143, 0.1213]}, {"w": "you", "b": [0.6204, 0.1064, 0.6487, 0.1213]}, {"w": "intended)", "b": [0.6548, 0.1064, 0.7302, 0.1213]}, {"w": "or", "b": [0.7363, 0.1064, 0.7525, 0.1213]}, {"w": "for", "b": [0.7587, 0.1064, 0.7805, 0.1213]}, {"w": "bad", "b": [0.7866, 0.1064, 0.8159, 0.1213]}, {"w": "(often", "b": [0.8221, 0.1064, 0.8691, 0.1213]}, {"w": "without", "b": [0.1306, 0.1242, 0.1944, 0.1393]}, {"w": "your", "b": [0.2013, 0.1242, 0.238, 0.1393]}, {"w": "consent).", "b": [0.245, 0.1242, 0.3188, 0.1393]}, {"w": "For", "b": [0.3295, 0.1242, 0.357, 0.1393]}, {"w": "example,", "b": [0.364, 0.1242, 0.4367, 0.1393]}, {"w": "you", "b": [0.4439, 0.1242, 0.4732, 0.1393]}, {"w": "might", "b": [0.4801, 0.1242, 0.5277, 0.1393]}, {"w": "create", "b": [0.5347, 0.1242, 0.5839, 0.1393]}, {"w": "and", "b": [0.5909, 0.1242, 0.6212, 0.1393]}, {"w": "publicly", "b": [0.6282, 0.1242, 0.6936, 0.1393]}, {"w": "release", "b": [0.7005, 0.1242, 0.7551, 0.1393]}, {"w": "a", "b": [0.7621, 0.1242, 0.7715, 0.1393]}, {"w": "model", "b": [0.7784, 0.1242, 0.8281, 0.1393]}, {"w": "that", "b": [0.8351, 0.1242, 0.8696, 0.1393]}, {"w": "makes", "b": [0.1312, 0.1422, 0.1806, 0.1572]}, {"w": "one’s", "b": [0.1868, 0.1422, 0.2269, 0.1572]}, {"w": "voice", "b": [0.2331, 0.1422, 0.2731, 0.1572]}, {"w": "sound", "b": [0.2793, 0.1422, 0.3266, 0.1572]}, {"w": "like", "b": [0.3328, 0.1422, 0.3605, 0.1572]}, {"w": "a", "b": [0.3667, 0.1422, 0.3759, 0.1572]}, {"w": "cartoon", "b": [0.3821, 0.1422, 0.4432, 0.1572]}, {"w": "character.", "b": [0.4493, 0.1422, 0.529, 0.1572]}, {"w": "Fraudsters", "b": [0.5373, 0.1422, 0.622, 0.1572]}, {"w": "may", "b": [0.6282, 0.1422, 0.662, 0.1572]}, {"w": "adapt", "b": [0.6682, 0.1422, 0.7144, 0.1572]}, {"w": "your", "b": [0.7206, 0.1422, 0.7565, 0.1572]}, {"w": "result", "b": [0.7627, 0.1422, 0.808, 0.1572]}, {"w": "to", "b": [0.8142, 0.1422, 0.8306, 0.1572]}, {"w": "fake", "b": [0.8368, 0.1422, 0.8691, 0.1572]}, {"w": "the", "b": [0.1312, 0.1601, 0.1574, 0.1752]}, {"w": "voice", "b": [0.1637, 0.1601, 0.2045, 0.1752]}, {"w": "of", "b": [0.2109, 0.1601, 0.226, 0.1752]}, {"w": "a", "b": [0.2324, 0.1601, 0.2418, 0.1752]}, {"w": "bank", "b": [0.2481, 0.1601, 0.2884, 0.1752]}, {"w": "client,", "b": [0.2947, 0.1601, 0.3444, 0.1752]}, {"w": "and", "b": [0.3508, 0.1601, 0.3811, 0.1752]}, {"w": "execute", "b": [0.3874, 0.1601, 0.4487, 0.1752]}, {"w": "a", "b": [0.455, 0.1601, 0.4644, 0.1752]}, {"w": "phone", "b": [0.4707, 0.1601, 0.5199, 0.1752]}, {"w": "transaction", "b": [0.5262, 0.1601, 0.6184, 0.1752]}, {"w": "on", "b": [0.6248, 0.1601, 0.6446, 0.1752]}, {"w": "their", "b": [0.651, 0.1601, 0.6897, 0.1752]}, {"w": "behalf.", "b": [0.696, 0.1601, 0.7515, 0.1752]}, {"w": "Alternatively,", "b": [0.7602, 0.1601, 0.8717, 0.1752]}, {"w": "you", "b": [0.1308, 0.1781, 0.1598, 0.1931]}, {"w": "might", "b": [0.1659, 0.1781, 0.2132, 0.1931]}, {"w": "create", "b": [0.2193, 0.1781, 0.2681, 0.1931]}, {"w": "a", "b": [0.2743, 0.1781, 0.2836, 0.1931]}, {"w": "model", "b": [0.2898, 0.1781, 0.339, 0.1931]}, {"w": "that", "b": [0.3452, 0.1781, 0.3794, 0.1931]}, {"w": "recognizes", "b": [0.3855, 0.1781, 0.4677, 0.1931]}, {"w": "pedestrians", "b": [0.4738, 0.1781, 0.566, 0.1931]}, {"w": "on", "b": [0.5721, 0.1781, 0.5918, 0.1931]}, {"w": "the", "b": [0.5979, 0.1781, 0.6239, 0.1931]}, {"w": "street.", "b": [0.63, 0.1781, 0.6811, 0.1931]}, {"w": "An", "b": [0.6892, 0.1781, 0.7136, 0.1931]}, {"w": "automatic", "b": [0.7198, 0.1781, 0.8017, 0.1931]}, {"w": "weapon", "b": [0.8079, 0.1781, 0.8691, 0.1931]}, {"w": "manufacturer", "b": [0.1312, 0.1961, 0.239, 0.211]}, {"w": "could", "b": [0.2452, 0.1961, 0.2882, 0.211]}, {"w": "use", "b": [0.2944, 0.1961, 0.3201, 0.211]}, {"w": "your", "b": [0.3263, 0.1961, 0.3622, 0.211]}, {"w": "model", "b": [0.3684, 0.1961, 0.4171, 0.211]}, {"w": "to", "b": [0.4232, 0.1961, 0.4396, 0.211]}, {"w": "detect", "b": [0.4458, 0.1961, 0.495, 0.211]}, {"w": "people", "b": [0.5012, 0.1961, 0.553, 0.211]}, {"w": "on", "b": [0.5591, 0.1961, 0.5786, 0.211]}, {"w": "the", "b": [0.5848, 0.1961, 0.6104, 0.211]}, {"w": "battlefield.", "b": [0.6165, 0.1961, 0.7027, 0.211]}]}, {"id": "b_1", "type": "paragraph", "text": "9.4.2 What and How to Monitor", "words": [{"w": "9.4.2", "b": [0.1312, 0.2439, 0.1749, 0.2588]}, {"w": "What", "b": [0.1961, 0.2439, 0.2484, 0.2588]}, {"w": "and", "b": [0.2554, 0.2439, 0.2893, 0.2588]}, {"w": "How", "b": [0.2964, 0.2439, 0.3384, 0.2588]}, {"w": "to", "b": [0.3454, 0.2439, 0.3643, 0.2588]}, {"w": "Monitor", "b": [0.3714, 0.2439, 0.4474, 0.2588]}]}, {"id": "b_2", "type": "paragraph", "text": "Monitoring must allow us to make sure that the model generates reasonable performance metrics when applied to the confidence test set. This set should be regularly updated with new data to avoid possible distribution shift. Additionally, the model must be regularly tested on the examples from the end-to-end set.", "words": [{"w": "Monitoring", "b": [0.1312, 0.2804, 0.2228, 0.2955]}, {"w": "must", "b": [0.2293, 0.2804, 0.2697, 0.2955]}, {"w": "allow", "b": [0.2762, 0.2804, 0.3185, 0.2955]}, {"w": "us", "b": [0.325, 0.2804, 0.3429, 0.2955]}, {"w": "to", "b": [0.3494, 0.2804, 0.3662, 0.2955]}, {"w": "make", "b": [0.3727, 0.2804, 0.4156, 0.2955]}, {"w": "sure", "b": [0.4221, 0.2804, 0.4557, 0.2955]}, {"w": "that", "b": [0.4622, 0.2804, 0.4967, 0.2955]}, {"w": "the", "b": [0.5032, 0.2804, 0.5294, 0.2955]}, {"w": "model", "b": [0.5359, 0.2804, 0.5855, 0.2955]}, {"w": "generates", "b": [0.5921, 0.2804, 0.6686, 0.2955]}, {"w": "reasonable", "b": [0.6751, 0.2804, 0.761, 0.2955]}, {"w": "performance", "b": [0.7675, 0.2804, 0.8691, 0.2955]}, {"w": "metrics", "b": [0.1312, 0.2986, 0.1887, 0.3134]}, {"w": "when", "b": [0.1942, 0.2986, 0.2354, 0.3134]}, {"w": "applied", "b": [0.2409, 0.2986, 0.2982, 0.3134]}, {"w": "to", "b": [0.3037, 0.2986, 0.3198, 0.3134]}, {"w": "the", "b": [0.3253, 0.2986, 0.3504, 0.3134]}, {"w": "confidence", "b": [0.3558, 0.2984, 0.4519, 0.3134]}, {"w": "test", "b": [0.4582, 0.2984, 0.4928, 0.3134]}, {"w": "set.", "b": [0.4991, 0.2984, 0.5305, 0.3134]}, {"w": "This", "b": [0.5385, 0.2986, 0.5738, 0.3134]}, {"w": "set", "b": [0.5793, 0.2986, 0.6015, 0.3134]}, {"w": "should", "b": [0.607, 0.2986, 0.6584, 0.3134]}, {"w": "be", "b": [0.6639, 0.2986, 0.6825, 0.3134]}, {"w": "regularly", "b": [0.688, 0.2986, 0.7579, 0.3134]}, {"w": "updated", "b": [0.7634, 0.2986, 0.8283, 0.3134]}, {"w": "with", "b": [0.8338, 0.2986, 0.8689, 0.3134]}, {"w": "new", "b": [0.1312, 0.3163, 0.1636, 0.3314]}, {"w": "data", "b": [0.1697, 0.3163, 0.2063, 0.3314]}, {"w": "to", "b": [0.2124, 0.3163, 0.2291, 0.3314]}, {"w": "avoid", "b": [0.2352, 0.3163, 0.2786, 0.3314]}, {"w": "possible", "b": [0.2847, 0.3163, 0.3491, 0.3314]}, {"w": "distribution", "b": [0.3552, 0.3164, 0.4643, 0.3313]}, {"w": "shift.", "b": [0.4713, 0.3163, 0.5173, 0.3314]}, {"w": "Additionally,", "b": [0.5255, 0.3163, 0.631, 0.3314]}, {"w": "the", "b": [0.6371, 0.3163, 0.6632, 0.3314]}, {"w": "model", "b": [0.6693, 0.3163, 0.7189, 0.3314]}, {"w": "must", "b": [0.7251, 0.3163, 0.7654, 0.3314]}, {"w": "be", "b": [0.7715, 0.3163, 0.7908, 0.3314]}, {"w": "regularly", "b": [0.7969, 0.3163, 0.8696, 0.3314]}, {"w": "tested", "b": [0.1312, 0.3343, 0.1796, 0.3493]}, {"w": "on", "b": [0.1857, 0.3343, 0.2052, 0.3493]}, {"w": "the", "b": [0.2113, 0.3343, 0.237, 0.3493]}, {"w": "examples", "b": [0.2431, 0.3343, 0.3166, 0.3493]}, {"w": "from", "b": [0.3227, 0.3343, 0.3602, 0.3493]}, {"w": "the", "b": [0.3663, 0.3343, 0.392, 0.3493]}, {"w": "end-to-end", "b": [0.398, 0.3343, 0.4976, 0.3493]}, {"w": "set.", "b": [0.5046, 0.3343, 0.5361, 0.3493]}]}, {"id": "b_3", "type": "paragraph", "text": "While it’s obvious that accuracy, precision, and recall are good candidates for monitoring,", "words": [{"w": "While", "b": [0.1303, 0.3611, 0.1789, 0.3762]}, {"w": "it’s", "b": [0.1851, 0.3611, 0.2103, 0.3762]}, {"w": "obvious", "b": [0.2165, 0.3611, 0.2784, 0.3762]}, {"w": "that", "b": [0.2845, 0.3611, 0.3191, 0.3762]}, {"w": "accuracy,", "b": [0.3252, 0.3611, 0.4007, 0.3762]}, {"w": "precision,", "b": [0.4069, 0.3611, 0.4845, 0.3762]}, {"w": "and", "b": [0.4906, 0.3611, 0.521, 0.3762]}, {"w": "recall", "b": [0.5272, 0.3611, 0.5712, 0.3762]}, {"w": "are", "b": [0.5774, 0.3611, 0.6025, 0.3762]}, {"w": "good", "b": [0.6087, 0.3611, 0.6484, 0.3762]}, {"w": "candidates", "b": [0.6546, 0.3611, 0.7415, 0.3762]}, {"w": "for", "b": [0.7477, 0.3611, 0.7703, 0.3762]}, {"w": "monitoring,", "b": [0.7765, 0.3611, 0.8717, 0.3762]}]}, {"id": "b_4", "type": "paragraph", "text": "one metric is especially useful for measuring the change over time: prediction bias.", "words": [{"w": "one", "b": [0.1312, 0.3792, 0.1589, 0.3942]}, {"w": "metric", "b": [0.1651, 0.3792, 0.2164, 0.3942]}, {"w": "is", "b": [0.2225, 0.3792, 0.235, 0.3942]}, {"w": "especially", "b": [0.2411, 0.3792, 0.3181, 0.3942]}, {"w": "useful", "b": [0.3243, 0.3792, 0.3711, 0.3942]}, {"w": "for", "b": [0.3772, 0.3792, 0.3993, 0.3942]}, {"w": "measuring", "b": [0.4055, 0.3792, 0.4877, 0.3942]}, {"w": "the", "b": [0.4938, 0.3792, 0.5195, 0.3942]}, {"w": "change", "b": [0.5256, 0.3792, 0.5805, 0.3942]}, {"w": "over", "b": [0.5866, 0.3792, 0.62, 0.3942]}, {"w": "time:", "b": [0.6262, 0.3792, 0.6672, 0.3942]}, {"w": "prediction", "b": [0.6751, 0.3792, 0.769, 0.3941]}, {"w": "bias.", "b": [0.7761, 0.3792, 0.8175, 0.3942]}]}, {"id": "b_5", "type": "paragraph", "text": "In a static world where nothing changes, the distribution of predicted classes would roughly equal the distribution of observed classes. This is especially true when the model is well- calibrated. If you observe otherwise, the model is exhibiting prediction bias. The latter might mean that the distribution of the training data labels and the production’s current class distribution are now different. You must investigate the reasons for this change and make the necessary adjustments.", "words": [{"w": "In", "b": [0.1312, 0.4062, 0.148, 0.4211]}, {"w": "a", "b": [0.1542, 0.4062, 0.1634, 0.4211]}, {"w": "static", "b": [0.1696, 0.4062, 0.2135, 0.4211]}, {"w": "world", "b": [0.2197, 0.4062, 0.264, 0.4211]}, {"w": "where", "b": [0.2702, 0.4062, 0.3172, 0.4211]}, {"w": "nothing", "b": [0.3233, 0.4062, 0.3845, 0.4211]}, {"w": "changes,", "b": [0.3907, 0.4062, 0.4575, 0.4211]}, {"w": "the", "b": [0.4637, 0.4062, 0.4892, 0.4211]}, {"w": "distribution", "b": [0.4954, 0.4062, 0.5893, 0.4211]}, {"w": "of", "b": [0.5955, 0.4062, 0.6103, 0.4211]}, {"w": "predicted", "b": [0.6164, 0.4062, 0.6909, 0.4211]}, {"w": "classes", "b": [0.6971, 0.4062, 0.7494, 0.4211]}, {"w": "would", "b": [0.7556, 0.4062, 0.803, 0.4211]}, {"w": "roughly", "b": [0.8091, 0.4062, 0.8698, 0.4211]}, {"w": "equal", "b": [0.1312, 0.424, 0.1746, 0.4391]}, {"w": "the", "b": [0.1809, 0.424, 0.2071, 0.4391]}, {"w": "distribution", "b": [0.2134, 0.424, 0.3098, 0.4391]}, {"w": "of", "b": [0.3161, 0.424, 0.3312, 0.4391]}, {"w": "observed", "b": [0.3375, 0.424, 0.4088, 0.4391]}, {"w": "classes.", "b": [0.4151, 0.424, 0.474, 0.4391]}, {"w": "This", "b": [0.4827, 0.424, 0.5194, 0.4391]}, {"w": "is", "b": [0.5257, 0.424, 0.5383, 0.4391]}, {"w": "especially", "b": [0.5446, 0.424, 0.6232, 0.4391]}, {"w": "true", "b": [0.6295, 0.424, 0.663, 0.4391]}, {"w": "when", "b": [0.6693, 0.424, 0.7122, 0.4391]}, {"w": "the", "b": [0.7185, 0.424, 0.7447, 0.4391]}, {"w": "model", "b": [0.7509, 0.424, 0.8006, 0.4391]}, {"w": "is", "b": [0.8069, 0.424, 0.8195, 0.4391]}, {"w": "well-", "b": [0.8254, 0.424, 0.8688, 0.439]}, {"w": "calibrated.", "b": [0.1312, 0.4419, 0.2286, 0.457]}, {"w": "If", "b": [0.2385, 0.4419, 0.251, 0.457]}, {"w": "you", "b": [0.2577, 0.4419, 0.287, 0.457]}, {"w": "observe", "b": [0.2937, 0.4419, 0.3545, 0.457]}, {"w": "otherwise,", "b": [0.3612, 0.4419, 0.444, 0.457]}, {"w": "the", "b": [0.4509, 0.4419, 0.477, 0.457]}, {"w": "model", "b": [0.4837, 0.4419, 0.5334, 0.457]}, {"w": "is", "b": [0.5401, 0.4419, 0.5528, 0.457]}, {"w": "exhibiting", "b": [0.5595, 0.4419, 0.6416, 0.457]}, {"w": "prediction", "b": [0.6483, 0.4419, 0.731, 0.457]}, {"w": "bias.", "b": [0.7377, 0.4419, 0.7755, 0.457]}, {"w": "The", "b": [0.7853, 0.4419, 0.8177, 0.457]}, {"w": "latter", "b": [0.8244, 0.4419, 0.8695, 0.457]}, {"w": "might", "b": [0.1312, 0.4599, 0.1788, 0.475]}, {"w": "mean", "b": [0.1852, 0.4599, 0.2291, 0.475]}, {"w": "that", "b": [0.2354, 0.4599, 0.2699, 0.475]}, {"w": "the", "b": [0.2763, 0.4599, 0.3024, 0.475]}, {"w": "distribution", "b": [0.3088, 0.4599, 0.4052, 0.475]}, {"w": "of", "b": [0.4115, 0.4599, 0.4267, 0.475]}, {"w": "the", "b": [0.433, 0.4599, 0.4592, 0.475]}, {"w": "training", "b": [0.4655, 0.4599, 0.5304, 0.475]}, {"w": "data", "b": [0.5368, 0.4599, 0.5734, 0.475]}, {"w": "labels", "b": [0.5797, 0.4599, 0.6264, 0.475]}, {"w": "and", "b": [0.6327, 0.4599, 0.6631, 0.475]}, {"w": "the", "b": [0.6694, 0.4599, 0.6956, 0.475]}, {"w": "production’s", "b": [0.7019, 0.4599, 0.804, 0.475]}, {"w": "current", "b": [0.8104, 0.4599, 0.8696, 0.475]}, {"w": "class", "b": [0.1312, 0.4778, 0.1691, 0.4929]}, {"w": "distribution", "b": [0.1756, 0.4778, 0.272, 0.4929]}, {"w": "are", "b": [0.2784, 0.4778, 0.3036, 0.4929]}, {"w": "now", "b": [0.31, 0.4778, 0.343, 0.4929]}, {"w": "different.", "b": [0.3494, 0.4778, 0.4227, 0.4929]}, {"w": "You", "b": [0.4318, 0.4778, 0.4643, 0.4929]}, {"w": "must", "b": [0.4708, 0.4778, 0.5111, 0.4929]}, {"w": "investigate", "b": [0.5176, 0.4778, 0.6051, 0.4929]}, {"w": "the", "b": [0.6115, 0.4778, 0.6377, 0.4929]}, {"w": "reasons", "b": [0.6441, 0.4778, 0.704, 0.4929]}, {"w": "for", "b": [0.7105, 0.4778, 0.733, 0.4929]}, {"w": "this", "b": [0.7395, 0.4778, 0.7699, 0.4929]}, {"w": "change", "b": [0.7764, 0.4778, 0.8323, 0.4929]}, {"w": "and", "b": [0.8388, 0.4778, 0.8691, 0.4929]}, {"w": "make", "b": [0.1312, 0.4959, 0.1733, 0.5108]}, {"w": "the", "b": [0.1794, 0.4959, 0.205, 0.5108]}, {"w": "necessary", "b": [0.2112, 0.4959, 0.2869, 0.5108]}, {"w": "adjustments.", "b": [0.293, 0.4959, 0.3958, 0.5108]}]}, {"id": "b_6", "type": "paragraph", "text": "Monitoring allows us to stay alert of abandoned or repurposed data sources. Some database columns might stop being populated. The definition or format of the data in some columns might change, while the unadapted models still assume the previous definitions and formats. To avoid that, the distribution of the values of every feature extracted from a database table must be monitored for a significant shift. A shift of the distribution of both feature values and predictions can be detected by applying statistical tests such as the Chi-square independence test and Kolmogorov–Smirnov test. If a significant distribution shift is detected, an alert must be sent to the stakeholders.", "words": [{"w": "Monitoring", "b": [0.1312, 0.5228, 0.2201, 0.5377]}, {"w": "allows", "b": [0.2263, 0.5228, 0.2746, 0.5377]}, {"w": "us", "b": [0.2807, 0.5228, 0.2981, 0.5377]}, {"w": "to", "b": [0.3042, 0.5228, 0.3205, 0.5377]}, {"w": "stay", "b": [0.3266, 0.5228, 0.3592, 0.5377]}, {"w": "alert", "b": [0.3654, 0.5228, 0.402, 0.5377]}, {"w": "of", "b": [0.4081, 0.5228, 0.4228, 0.5377]}, {"w": "abandoned", "b": [0.429, 0.5228, 0.5153, 0.5377]}, {"w": "or", "b": [0.5214, 0.5228, 0.5377, 0.5377]}, {"w": "repurposed", "b": [0.5439, 0.5228, 0.6319, 0.5377]}, {"w": "data", "b": [0.6381, 0.5228, 0.6736, 0.5377]}, {"w": "sources.", "b": [0.6798, 0.5228, 0.742, 0.5377]}, {"w": "Some", "b": [0.7502, 0.5228, 0.7928, 0.5377]}, {"w": "database", "b": [0.799, 0.5228, 0.8691, 0.5377]}, {"w": "columns", "b": [0.1312, 0.5407, 0.1968, 0.5557]}, {"w": "might", "b": [0.203, 0.5407, 0.2495, 0.5557]}, {"w": "stop", "b": [0.2557, 0.5407, 0.2895, 0.5557]}, {"w": "being", "b": [0.2957, 0.5407, 0.3392, 0.5557]}, {"w": "populated.", "b": [0.3453, 0.5407, 0.4308, 0.5557]}, {"w": "The", "b": [0.439, 0.5407, 0.4707, 0.5557]}, {"w": "definition", "b": [0.4768, 0.5407, 0.5526, 0.5557]}, {"w": "or", "b": [0.5587, 0.5407, 0.5751, 0.5557]}, {"w": "format", "b": [0.5813, 0.5407, 0.635, 0.5557]}, {"w": "of", "b": [0.6412, 0.5407, 0.656, 0.5557]}, {"w": "the", "b": [0.6622, 0.5407, 0.6877, 0.5557]}, {"w": "data", "b": [0.6939, 0.5407, 0.7297, 0.5557]}, {"w": "in", "b": [0.7358, 0.5407, 0.7512, 0.5557]}, {"w": "some", "b": [0.7573, 0.5407, 0.7973, 0.5557]}, {"w": "columns", "b": [0.8035, 0.5407, 0.8691, 0.5557]}, {"w": "might", "b": [0.1312, 0.5587, 0.1774, 0.5736]}, {"w": "change,", "b": [0.1835, 0.5587, 0.2428, 0.5736]}, {"w": "while", "b": [0.249, 0.5587, 0.2906, 0.5736]}, {"w": "the", "b": [0.2967, 0.5587, 0.3221, 0.5736]}, {"w": "unadapted", "b": [0.3282, 0.5587, 0.4124, 0.5736]}, {"w": "models", "b": [0.4186, 0.5587, 0.4739, 0.5736]}, {"w": "still", "b": [0.4801, 0.5587, 0.5096, 0.5736]}, {"w": "assume", "b": [0.5158, 0.5587, 0.5728, 0.5736]}, {"w": "the", "b": [0.5789, 0.5587, 0.6043, 0.5736]}, {"w": "previous", "b": [0.6104, 0.5587, 0.677, 0.5736]}, {"w": "definitions", "b": [0.6832, 0.5587, 0.7654, 0.5736]}, {"w": "and", "b": [0.7716, 0.5587, 0.801, 0.5736]}, {"w": "formats.", "b": [0.8071, 0.5587, 0.8727, 0.5736]}, {"w": "To", "b": [0.1306, 0.5765, 0.152, 0.5916]}, {"w": "avoid", "b": [0.1597, 0.5765, 0.2031, 0.5916]}, {"w": "that,", "b": [0.2108, 0.5765, 0.2505, 0.5916]}, {"w": "the", "b": [0.2586, 0.5765, 0.2847, 0.5916]}, {"w": "distribution", "b": [0.2924, 0.5765, 0.3888, 0.5916]}, {"w": "of", "b": [0.3964, 0.5765, 0.4116, 0.5916]}, {"w": "the", "b": [0.4193, 0.5765, 0.4454, 0.5916]}, {"w": "values", "b": [0.4531, 0.5765, 0.5029, 0.5916]}, {"w": "of", "b": [0.5106, 0.5765, 0.5257, 0.5916]}, {"w": "every", "b": [0.5334, 0.5765, 0.5769, 0.5916]}, {"w": "feature", "b": [0.5845, 0.5765, 0.6416, 0.5916]}, {"w": "extracted", "b": [0.6493, 0.5765, 0.7262, 0.5916]}, {"w": "from", "b": [0.7339, 0.5765, 0.7721, 0.5916]}, {"w": "a", "b": [0.7798, 0.5765, 0.7892, 0.5916]}, {"w": "database", "b": [0.7968, 0.5765, 0.8691, 0.5916]}, {"w": "table", "b": [0.1312, 0.5945, 0.172, 0.6096]}, {"w": "must", "b": [0.1784, 0.5945, 0.2188, 0.6096]}, {"w": "be", "b": [0.2252, 0.5945, 0.2446, 0.6096]}, {"w": "monitored", "b": [0.251, 0.5945, 0.3347, 0.6096]}, {"w": "for", "b": [0.3411, 0.5945, 0.3636, 0.6096]}, {"w": "a", "b": [0.37, 0.5945, 0.3794, 0.6096]}, {"w": "significant", "b": [0.3858, 0.5945, 0.4691, 0.6096]}, {"w": "shift.", "b": [0.4755, 0.5945, 0.5169, 0.6096]}, {"w": "A", "b": [0.5259, 0.5945, 0.54, 0.6096]}, {"w": "shift", "b": [0.5464, 0.5945, 0.5826, 0.6096]}, {"w": "of", "b": [0.589, 0.5945, 0.6042, 0.6096]}, {"w": "the", "b": [0.6106, 0.5945, 0.6367, 0.6096]}, {"w": "distribution", "b": [0.6431, 0.5945, 0.7395, 0.6096]}, {"w": "of", "b": [0.7459, 0.5945, 0.7611, 0.6096]}, {"w": "both", "b": [0.7675, 0.5945, 0.8057, 0.6096]}, {"w": "feature", "b": [0.8121, 0.5945, 0.8691, 0.6096]}, {"w": "values", "b": [0.1308, 0.6126, 0.1792, 0.6275]}, {"w": "and", "b": [0.1853, 0.6126, 0.2148, 0.6275]}, {"w": "predictions", "b": [0.2209, 0.6126, 0.3086, 0.6275]}, {"w": "can", "b": [0.3147, 0.6126, 0.3422, 0.6275]}, {"w": "be", "b": [0.3483, 0.6126, 0.3672, 0.6275]}, {"w": "detected", "b": [0.3733, 0.6126, 0.4405, 0.6275]}, {"w": "by", "b": [0.4466, 0.6126, 0.4659, 0.6275]}, {"w": "applying", "b": [0.4721, 0.6126, 0.5407, 0.6275]}, {"w": "statistical", "b": [0.5469, 0.6126, 0.6244, 0.6275]}, {"w": "tests", "b": [0.6305, 0.6126, 0.6674, 0.6275]}, {"w": "such", "b": [0.6735, 0.6126, 0.7087, 0.6275]}, {"w": "as", "b": [0.7149, 0.6126, 0.7312, 0.6275]}, {"w": "the", "b": [0.7374, 0.6126, 0.7628, 0.6275]}, {"w": "Chi-square", "b": [0.7686, 0.6125, 0.8688, 0.6274]}, {"w": "independence", "b": [0.1312, 0.6304, 0.2568, 0.6454]}, {"w": "test", "b": [0.2638, 0.6304, 0.2984, 0.6454]}, {"w": "and", "b": [0.3046, 0.6305, 0.334, 0.6454]}, {"w": "Kolmogorov–Smirnov", "b": [0.3402, 0.6304, 0.5399, 0.6454]}, {"w": "test.", "b": [0.547, 0.6304, 0.5866, 0.6454]}, {"w": "If", "b": [0.5948, 0.6305, 0.607, 0.6454]}, {"w": "a", "b": [0.6132, 0.6305, 0.6223, 0.6454]}, {"w": "significant", "b": [0.6285, 0.6305, 0.7093, 0.6454]}, {"w": "distribution", "b": [0.7155, 0.6305, 0.8092, 0.6454]}, {"w": "shift", "b": [0.8153, 0.6305, 0.8505, 0.6454]}, {"w": "is", "b": [0.8566, 0.6305, 0.8689, 0.6454]}, {"w": "detected,", "b": [0.1312, 0.6484, 0.2041, 0.6634]}, {"w": "an", "b": [0.2102, 0.6484, 0.2297, 0.6634]}, {"w": "alert", "b": [0.2358, 0.6484, 0.2728, 0.6634]}, {"w": "must", "b": [0.279, 0.6484, 0.3185, 0.6634]}, {"w": "be", "b": [0.3247, 0.6484, 0.3437, 0.6634]}, {"w": "sent", "b": [0.3498, 0.6484, 0.3822, 0.6634]}, {"w": "to", "b": [0.3884, 0.6484, 0.4048, 0.6634]}, {"w": "the", "b": [0.4109, 0.6484, 0.4366, 0.6634]}, {"w": "stakeholders.", "b": [0.4427, 0.6484, 0.5466, 0.6634]}]}, {"id": "b_7", "type": "paragraph", "text": "The numerical stability of the model should also be monitored. An alert should be triggered if NaNs (not-a-numbers) or an infinity is observed.", "words": [{"w": "The", "b": [0.1306, 0.6754, 0.1617, 0.6903]}, {"w": "numerical", "b": [0.1663, 0.6753, 0.257, 0.6903]}, {"w": "stability", "b": [0.2622, 0.6753, 0.3375, 0.6903]}, {"w": "of", "b": [0.3421, 0.6754, 0.3567, 0.6903]}, {"w": "the", "b": [0.3613, 0.6754, 0.3864, 0.6903]}, {"w": "model", "b": [0.391, 0.6754, 0.4387, 0.6903]}, {"w": "should", "b": [0.4433, 0.6754, 0.4947, 0.6903]}, {"w": "also", "b": [0.4992, 0.6754, 0.5295, 0.6903]}, {"w": "be", "b": [0.5341, 0.6754, 0.5527, 0.6903]}, {"w": "monitored.", "b": [0.5573, 0.6754, 0.6427, 0.6903]}, {"w": "An", "b": [0.6504, 0.6754, 0.674, 0.6903]}, {"w": "alert", "b": [0.6786, 0.6754, 0.7148, 0.6903]}, {"w": "should", "b": [0.7194, 0.6754, 0.7708, 0.6903]}, {"w": "be", "b": [0.7754, 0.6754, 0.794, 0.6903]}, {"w": "triggered", "b": [0.7986, 0.6754, 0.869, 0.6903]}, {"w": "if", "b": [0.1312, 0.6933, 0.142, 0.7082]}, {"w": "NaNs", "b": [0.1482, 0.6933, 0.1923, 0.7082]}, {"w": "(not-a-numbers)", "b": [0.1985, 0.6933, 0.3294, 0.7082]}, {"w": "or", "b": [0.3355, 0.6933, 0.352, 0.7082]}, {"w": "an", "b": [0.3581, 0.6933, 0.3776, 0.7082]}, {"w": "infinity", "b": [0.3837, 0.6933, 0.4412, 0.7082]}, {"w": "is", "b": [0.4473, 0.6933, 0.4598, 0.7082]}, {"w": "observed.", "b": [0.4659, 0.6933, 0.5409, 0.7082]}]}, {"id": "b_8", "type": "paragraph", "text": "It’s important to monitor computational performance of a machine learning system. Both dramatic and slow-leak regression should be detected, and warnings must be sent.", "words": [{"w": "It’s", "b": [0.1312, 0.7201, 0.1579, 0.7352]}, {"w": "important", "b": [0.1641, 0.7201, 0.2464, 0.7352]}, {"w": "to", "b": [0.2525, 0.7201, 0.2692, 0.7352]}, {"w": "monitor", "b": [0.2754, 0.7201, 0.34, 0.7352]}, {"w": "computational", "b": [0.3461, 0.7201, 0.4639, 0.7352]}, {"w": "performance", "b": [0.47, 0.7201, 0.5712, 0.7352]}, {"w": "of", "b": [0.5773, 0.7201, 0.5924, 0.7352]}, {"w": "a", "b": [0.5986, 0.7201, 0.6079, 0.7352]}, {"w": "machine", "b": [0.6141, 0.7201, 0.6813, 0.7352]}, {"w": "learning", "b": [0.6875, 0.7201, 0.7532, 0.7352]}, {"w": "system.", "b": [0.7593, 0.7201, 0.8205, 0.7352]}, {"w": "Both", "b": [0.8287, 0.7201, 0.869, 0.7352]}, {"w": "dramatic", "b": [0.1312, 0.7381, 0.2031, 0.7531]}, {"w": "and", "b": [0.2092, 0.7381, 0.2389, 0.7531]}, {"w": "slow-leak", "b": [0.2451, 0.7381, 0.318, 0.7531]}, {"w": "regression", "b": [0.3241, 0.7381, 0.4034, 0.7531]}, {"w": "should", "b": [0.4096, 0.7381, 0.462, 0.7531]}, {"w": "be", "b": [0.4681, 0.7381, 0.4871, 0.7531]}, {"w": "detected,", "b": [0.4933, 0.7381, 0.5661, 0.7531]}, {"w": "and", "b": [0.5722, 0.7381, 0.602, 0.7531]}, {"w": "warnings", "b": [0.6081, 0.7381, 0.6795, 0.7531]}, {"w": "must", "b": [0.6857, 0.7381, 0.7253, 0.7531]}, {"w": "be", "b": [0.7314, 0.7381, 0.7504, 0.7531]}, {"w": "sent.", "b": [0.7566, 0.7381, 0.7941, 0.7531]}]}, {"id": "b_9", "type": "paragraph", "text": "Monitor and send alerts when the usage fluctuations look suspicious. In particular:", "words": [{"w": "Monitor", "b": [0.1312, 0.7651, 0.1964, 0.78]}, {"w": "and", "b": [0.2025, 0.7651, 0.2323, 0.78]}, {"w": "send", "b": [0.2384, 0.7651, 0.2744, 0.78]}, {"w": "alerts", "b": [0.2806, 0.7651, 0.3249, 0.78]}, {"w": "when", "b": [0.331, 0.7651, 0.373, 0.78]}, {"w": "the", "b": [0.3792, 0.7651, 0.4048, 0.78]}, {"w": "usage", "b": [0.411, 0.7651, 0.4552, 0.78]}, {"w": "fluctuations", "b": [0.4613, 0.7651, 0.5558, 0.78]}, {"w": "look", "b": [0.5619, 0.7651, 0.5958, 0.78]}, {"w": "suspicious.", "b": [0.6019, 0.7651, 0.6874, 0.78]}, {"w": "In", "b": [0.6956, 0.7651, 0.7125, 0.78]}, {"w": "particular:", "b": [0.7186, 0.7651, 0.8028, 0.78]}]}, {"id": "b_10", "type": "paragraph", "text": "• monitor the number of model servings during an hour, and compare it to the corre- sponding value calculated one day earlier. Send a warning alert to the stakeholders if the number has changed by 30% or more. This threshold must be tuned for your use case to avoid generating excessive warnings;", "words": [{"w": "•", "b": [0.1538, 0.792, 0.1681, 0.8069]}, {"w": "monitor", "b": [0.1774, 0.7919, 0.2422, 0.807]}, {"w": "the", "b": [0.2488, 0.7919, 0.275, 0.807]}, {"w": "number", "b": [0.2816, 0.7919, 0.3439, 0.807]}, {"w": "of", "b": [0.3505, 0.7919, 0.3657, 0.807]}, {"w": "model", "b": [0.3723, 0.7919, 0.422, 0.807]}, {"w": "servings", "b": [0.4286, 0.7919, 0.4943, 0.807]}, {"w": "during", "b": [0.5009, 0.7919, 0.5543, 0.807]}, {"w": "an", "b": [0.5609, 0.7919, 0.5808, 0.807]}, {"w": "hour,", "b": [0.5874, 0.7919, 0.6303, 0.807]}, {"w": "and", "b": [0.637, 0.7919, 0.6674, 0.807]}, {"w": "compare", "b": [0.674, 0.7919, 0.7431, 0.807]}, {"w": "it", "b": [0.7497, 0.7919, 0.7622, 0.807]}, {"w": "to", "b": [0.7689, 0.7919, 0.7856, 0.807]}, {"w": "the", "b": [0.7922, 0.7919, 0.8183, 0.807]}, {"w": "corre-", "b": [0.825, 0.7919, 0.8721, 0.807]}, {"w": "sponding", "b": [0.1774, 0.8099, 0.25, 0.8249]}, {"w": "value", "b": [0.2562, 0.8099, 0.2978, 0.8249]}, {"w": "calculated", "b": [0.304, 0.8099, 0.3852, 0.8249]}, {"w": "one", "b": [0.3914, 0.8099, 0.4192, 0.8249]}, {"w": "day", "b": [0.4253, 0.8099, 0.4541, 0.8249]}, {"w": "earlier.", "b": [0.4603, 0.8099, 0.516, 0.8249]}, {"w": "Send", "b": [0.5242, 0.8099, 0.5633, 0.8249]}, {"w": "a", "b": [0.5695, 0.8099, 0.5787, 0.8249]}, {"w": "warning", "b": [0.5849, 0.8099, 0.6492, 0.8249]}, {"w": "alert", "b": [0.6554, 0.8099, 0.6925, 0.8249]}, {"w": "to", "b": [0.6986, 0.8099, 0.7151, 0.8249]}, {"w": "the", "b": [0.7212, 0.8099, 0.747, 0.8249]}, {"w": "stakeholders", "b": [0.7531, 0.8099, 0.8521, 0.8249]}, {"w": "if", "b": [0.8583, 0.8099, 0.8691, 0.8249]}, {"w": "the", "b": [0.1774, 0.8278, 0.2032, 0.8428]}, {"w": "number", "b": [0.2093, 0.8278, 0.2708, 0.8428]}, {"w": "has", "b": [0.277, 0.8278, 0.304, 0.8428]}, {"w": "changed", "b": [0.3101, 0.8278, 0.3757, 0.8428]}, {"w": "by", "b": [0.3819, 0.8278, 0.4015, 0.8428]}, {"w": "30%", "b": [0.4075, 0.8278, 0.4416, 0.8428]}, {"w": "or", "b": [0.4478, 0.8278, 0.4643, 0.8428]}, {"w": "more.", "b": [0.4705, 0.8278, 0.516, 0.8428]}, {"w": "This", "b": [0.5242, 0.8278, 0.5605, 0.8428]}, {"w": "threshold", "b": [0.5666, 0.8278, 0.6422, 0.8428]}, {"w": "must", "b": [0.6483, 0.8278, 0.6882, 0.8428]}, {"w": "be", "b": [0.6944, 0.8278, 0.7135, 0.8428]}, {"w": "tuned", "b": [0.7196, 0.8278, 0.7661, 0.8428]}, {"w": "for", "b": [0.7723, 0.8278, 0.7945, 0.8428]}, {"w": "your", "b": [0.8007, 0.8278, 0.8369, 0.8428]}, {"w": "use", "b": [0.843, 0.8278, 0.869, 0.8428]}, {"w": "case", "b": [0.1774, 0.8458, 0.2103, 0.8608]}, {"w": "to", "b": [0.2164, 0.8458, 0.2328, 0.8608]}, {"w": "avoid", "b": [0.239, 0.8458, 0.2815, 0.8608]}, {"w": "generating", "b": [0.2877, 0.8458, 0.3718, 0.8608]}, {"w": "excessive", "b": [0.378, 0.8458, 0.4495, 0.8608]}, {"w": "warnings;", "b": [0.4556, 0.8458, 0.5322, 0.8608]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 16", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "16", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 280, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• monitor the daily number of model servings and compare it to the corresponding value calculated one week earlier. Send a warning alert to the stakeholders if the number has changed by 15% or more. Tune the value for your use case.", "words": [{"w": "•", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "monitor", "b": [0.1774, 0.0885, 0.2398, 0.1033]}, {"w": "the", "b": [0.2459, 0.0885, 0.2711, 0.1033]}, {"w": "daily", "b": [0.2772, 0.0885, 0.316, 0.1033]}, {"w": "number", "b": [0.3221, 0.0885, 0.382, 0.1033]}, {"w": "of", "b": [0.3882, 0.0885, 0.4027, 0.1033]}, {"w": "model", "b": [0.4089, 0.0885, 0.4567, 0.1033]}, {"w": "servings", "b": [0.4628, 0.0885, 0.526, 0.1033]}, {"w": "and", "b": [0.5321, 0.0885, 0.5613, 0.1033]}, {"w": "compare", "b": [0.5674, 0.0885, 0.6339, 0.1033]}, {"w": "it", "b": [0.64, 0.0885, 0.6521, 0.1033]}, {"w": "to", "b": [0.6583, 0.0885, 0.6743, 0.1033]}, {"w": "the", "b": [0.6805, 0.0885, 0.7057, 0.1033]}, {"w": "corresponding", "b": [0.7118, 0.0885, 0.8222, 0.1033]}, {"w": "value", "b": [0.8284, 0.0885, 0.8691, 0.1033]}, {"w": "calculated", "b": [0.1774, 0.1065, 0.2568, 0.1213]}, {"w": "one", "b": [0.2628, 0.1065, 0.2899, 0.1213]}, {"w": "week", "b": [0.296, 0.1065, 0.3341, 0.1213]}, {"w": "earlier.", "b": [0.3402, 0.1065, 0.3946, 0.1213]}, {"w": "Send", "b": [0.4027, 0.1065, 0.4409, 0.1213]}, {"w": "a", "b": [0.447, 0.1065, 0.456, 0.1213]}, {"w": "warning", "b": [0.462, 0.1065, 0.5249, 0.1213]}, {"w": "alert", "b": [0.5309, 0.1065, 0.5672, 0.1213]}, {"w": "to", "b": [0.5732, 0.1065, 0.5893, 0.1213]}, {"w": "the", "b": [0.5953, 0.1065, 0.6204, 0.1213]}, {"w": "stakeholders", "b": [0.6265, 0.1065, 0.7232, 0.1213]}, {"w": "if", "b": [0.7293, 0.1065, 0.7398, 0.1213]}, {"w": "the", "b": [0.7459, 0.1065, 0.771, 0.1213]}, {"w": "number", "b": [0.777, 0.1065, 0.8369, 0.1213]}, {"w": "has", "b": [0.8429, 0.1065, 0.8691, 0.1213]}, {"w": "changed", "b": [0.1774, 0.1243, 0.2425, 0.1392]}, {"w": "by", "b": [0.2486, 0.1243, 0.2681, 0.1392]}, {"w": "15%", "b": [0.2742, 0.1243, 0.308, 0.1392]}, {"w": "or", "b": [0.3142, 0.1243, 0.3306, 0.1392]}, {"w": "more.", "b": [0.3368, 0.1243, 0.382, 0.1392]}, {"w": "Tune", "b": [0.3902, 0.1243, 0.4307, 0.1392]}, {"w": "the", "b": [0.4368, 0.1243, 0.4624, 0.1392]}, {"w": "value", "b": [0.4686, 0.1243, 0.5101, 0.1392]}, {"w": "for", "b": [0.5163, 0.1243, 0.5384, 0.1392]}, {"w": "your", "b": [0.5445, 0.1243, 0.5805, 0.1392]}, {"w": "use", "b": [0.5866, 0.1243, 0.6124, 0.1392]}, {"w": "case.", "b": [0.6185, 0.1243, 0.6566, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "Monitoring these numbers helps detect undesirable change:", "words": [{"w": "Monitoring", "b": [0.1312, 0.1512, 0.221, 0.1662]}, {"w": "these", "b": [0.2272, 0.1512, 0.2683, 0.1662]}, {"w": "numbers", "b": [0.2744, 0.1512, 0.3428, 0.1662]}, {"w": "helps", "b": [0.349, 0.1512, 0.3901, 0.1662]}, {"w": "detect", "b": [0.3962, 0.1512, 0.4455, 0.1662]}, {"w": "undesirable", "b": [0.4516, 0.1512, 0.5431, 0.1662]}, {"w": "change:", "b": [0.5492, 0.1512, 0.6092, 0.1662]}]}, {"id": "b_2", "type": "paragraph", "text": "• minimal and maximal prediction values, • median, mean, and standard deviation prediction values over a given timeframe, • latency when calling the model API, and • memory consumption and CPU usage when performing predictions.", "words": [{"w": "•", "b": [0.1538, 0.1781, 0.1681, 0.1931]}, {"w": "minimal", "b": [0.1774, 0.1781, 0.243, 0.1931]}, {"w": "and", "b": [0.2491, 0.1781, 0.2788, 0.1931]}, {"w": "maximal", "b": [0.285, 0.1781, 0.3542, 0.1931]}, {"w": "prediction", "b": [0.3603, 0.1781, 0.4414, 0.1931]}, {"w": "values,", "b": [0.4476, 0.1781, 0.5015, 0.1931]}, {"w": "•", "b": [0.1538, 0.1961, 0.1681, 0.211]}, {"w": "median,", "b": [0.1774, 0.1961, 0.2409, 0.211]}, {"w": "mean,", "b": [0.2471, 0.1961, 0.2953, 0.211]}, {"w": "and", "b": [0.3014, 0.1961, 0.3312, 0.211]}, {"w": "standard", "b": [0.3373, 0.1961, 0.4082, 0.211]}, {"w": "deviation", "b": [0.4144, 0.1961, 0.4887, 0.211]}, {"w": "prediction", "b": [0.4949, 0.1961, 0.576, 0.211]}, {"w": "values", "b": [0.5821, 0.1961, 0.6309, 0.211]}, {"w": "over", "b": [0.6371, 0.1961, 0.6705, 0.211]}, {"w": "a", "b": [0.6766, 0.1961, 0.6858, 0.211]}, {"w": "given", "b": [0.692, 0.1961, 0.734, 0.211]}, {"w": "timeframe,", "b": [0.7402, 0.1961, 0.8269, 0.211]}, {"w": "•", "b": [0.1538, 0.214, 0.1681, 0.229]}, {"w": "latency", "b": [0.1774, 0.214, 0.2353, 0.229]}, {"w": "when", "b": [0.2415, 0.214, 0.2835, 0.229]}, {"w": "calling", "b": [0.2896, 0.214, 0.3419, 0.229]}, {"w": "the", "b": [0.3481, 0.214, 0.3737, 0.229]}, {"w": "model", "b": [0.3799, 0.214, 0.4286, 0.229]}, {"w": "API,", "b": [0.4347, 0.214, 0.4729, 0.229]}, {"w": "and", "b": [0.4791, 0.214, 0.5088, 0.229]}, {"w": "•", "b": [0.1538, 0.232, 0.1681, 0.2469]}, {"w": "memory", "b": [0.1774, 0.232, 0.2425, 0.2469]}, {"w": "consumption", "b": [0.2486, 0.232, 0.3513, 0.2469]}, {"w": "and", "b": [0.3574, 0.232, 0.3872, 0.2469]}, {"w": "CPU", "b": [0.3933, 0.232, 0.433, 0.2469]}, {"w": "usage", "b": [0.4392, 0.232, 0.4834, 0.2469]}, {"w": "when", "b": [0.4896, 0.232, 0.5316, 0.2469]}, {"w": "performing", "b": [0.5377, 0.232, 0.626, 0.2469]}, {"w": "predictions.", "b": [0.6322, 0.232, 0.7257, 0.2469]}]}, {"id": "b_3", "type": "paragraph", "text": "Additionally, to prevent distribution shift, the monitoring automation must:", "words": [{"w": "Additionally,", "b": [0.1305, 0.2589, 0.2341, 0.2738]}, {"w": "to", "b": [0.2403, 0.2589, 0.2567, 0.2738]}, {"w": "prevent", "b": [0.2628, 0.2589, 0.3228, 0.2738]}, {"w": "distribution", "b": [0.329, 0.2589, 0.4235, 0.2738]}, {"w": "shift,", "b": [0.4297, 0.2589, 0.4703, 0.2738]}, {"w": "the", "b": [0.4764, 0.2589, 0.5021, 0.2738]}, {"w": "monitoring", "b": [0.5082, 0.2589, 0.5965, 0.2738]}, {"w": "automation", "b": [0.6026, 0.2589, 0.6949, 0.2738]}, {"w": "must:", "b": [0.701, 0.2589, 0.7457, 0.2738]}]}, {"id": "b_4", "type": "paragraph", "text": "1) accumulate inputs by randomly putting some aside during a certain time period, 2) send those inputs for labeling, 3) run the model, and calculate the value of the performance metric, 4) alert the stakeholders if there is significant performance degradation.", "words": [{"w": "1)", "b": [0.1517, 0.2858, 0.1681, 0.3008]}, {"w": "accumulate", "b": [0.1774, 0.2858, 0.2681, 0.3008]}, {"w": "inputs", "b": [0.2743, 0.2858, 0.3246, 0.3008]}, {"w": "by", "b": [0.3308, 0.2858, 0.3503, 0.3008]}, {"w": "randomly", "b": [0.3564, 0.2858, 0.4328, 0.3008]}, {"w": "putting", "b": [0.439, 0.2858, 0.4985, 0.3008]}, {"w": "some", "b": [0.5046, 0.2858, 0.5447, 0.3008]}, {"w": "aside", "b": [0.5509, 0.2858, 0.591, 0.3008]}, {"w": "during", "b": [0.5971, 0.2858, 0.6495, 0.3008]}, {"w": "a", "b": [0.6556, 0.2858, 0.6648, 0.3008]}, {"w": "certain", "b": [0.671, 0.2858, 0.7264, 0.3008]}, {"w": "time", "b": [0.7326, 0.2858, 0.7685, 0.3008]}, {"w": "period,", "b": [0.7746, 0.2858, 0.8311, 0.3008]}, {"w": "2)", "b": [0.1517, 0.3038, 0.1681, 0.3187]}, {"w": "send", "b": [0.1774, 0.3038, 0.2134, 0.3187]}, {"w": "those", "b": [0.2195, 0.3038, 0.2617, 0.3187]}, {"w": "inputs", "b": [0.2678, 0.3038, 0.3182, 0.3187]}, {"w": "for", "b": [0.3243, 0.3038, 0.3464, 0.3187]}, {"w": "labeling,", "b": [0.3526, 0.3038, 0.4208, 0.3187]}, {"w": "3)", "b": [0.1517, 0.3217, 0.1681, 0.3367]}, {"w": "run", "b": [0.1774, 0.3217, 0.2051, 0.3367]}, {"w": "the", "b": [0.2113, 0.3217, 0.2369, 0.3367]}, {"w": "model,", "b": [0.243, 0.3217, 0.2969, 0.3367]}, {"w": "and", "b": [0.303, 0.3217, 0.3328, 0.3367]}, {"w": "calculate", "b": [0.3389, 0.3217, 0.4097, 0.3367]}, {"w": "the", "b": [0.4158, 0.3217, 0.4415, 0.3367]}, {"w": "value", "b": [0.4476, 0.3217, 0.4892, 0.3367]}, {"w": "of", "b": [0.4953, 0.3217, 0.5102, 0.3367]}, {"w": "the", "b": [0.5163, 0.3217, 0.542, 0.3367]}, {"w": "performance", "b": [0.5481, 0.3217, 0.6477, 0.3367]}, {"w": "metric,", "b": [0.6538, 0.3217, 0.7103, 0.3367]}, {"w": "4)", "b": [0.1517, 0.3396, 0.1681, 0.3546]}, {"w": "alert", "b": [0.1774, 0.3396, 0.2143, 0.3546]}, {"w": "the", "b": [0.2205, 0.3396, 0.2461, 0.3546]}, {"w": "stakeholders", "b": [0.2523, 0.3396, 0.351, 0.3546]}, {"w": "if", "b": [0.3571, 0.3396, 0.3679, 0.3546]}, {"w": "there", "b": [0.3741, 0.3396, 0.4152, 0.3546]}, {"w": "is", "b": [0.4213, 0.3396, 0.4337, 0.3546]}, {"w": "significant", "b": [0.4399, 0.3396, 0.5215, 0.3546]}, {"w": "performance", "b": [0.5277, 0.3396, 0.6272, 0.3546]}, {"w": "degradation.", "b": [0.6334, 0.3396, 0.7339, 0.3546]}]}, {"id": "b_5", "type": "paragraph", "text": "Recommender systems need additional monitoring. These models offer recommendations to website or application users. It can be useful to monitor click-though rate (CTR), that is, ratio of users who clicked on a recommendation to the number of total users who received recommendations from that model. If CTR is decreasing, the model must be updated.", "words": [{"w": "Recommender", "b": [0.1312, 0.3665, 0.264, 0.3815]}, {"w": "systems", "b": [0.2711, 0.3665, 0.3431, 0.3815]}, {"w": "need", "b": [0.3492, 0.3667, 0.3854, 0.3815]}, {"w": "additional", "b": [0.3916, 0.3667, 0.4709, 0.3815]}, {"w": "monitoring.", "b": [0.4771, 0.3667, 0.5686, 0.3815]}, {"w": "These", "b": [0.5768, 0.3667, 0.6231, 0.3815]}, {"w": "models", "b": [0.6293, 0.3667, 0.6842, 0.3815]}, {"w": "offer", "b": [0.6903, 0.3667, 0.725, 0.3815]}, {"w": "recommendations", "b": [0.7312, 0.3667, 0.869, 0.3815]}, {"w": "to", "b": [0.1312, 0.3846, 0.1474, 0.3994]}, {"w": "website", "b": [0.1536, 0.3846, 0.2118, 0.3994]}, {"w": "or", "b": [0.2179, 0.3846, 0.2342, 0.3994]}, {"w": "application", "b": [0.2403, 0.3846, 0.3283, 0.3994]}, {"w": "users.", "b": [0.3345, 0.3846, 0.3792, 0.3994]}, {"w": "It", "b": [0.3874, 0.3846, 0.4011, 0.3994]}, {"w": "can", "b": [0.4072, 0.3846, 0.4345, 0.3994]}, {"w": "be", "b": [0.4407, 0.3846, 0.4594, 0.3994]}, {"w": "useful", "b": [0.4656, 0.3846, 0.5117, 0.3994]}, {"w": "to", "b": [0.5178, 0.3846, 0.534, 0.3994]}, {"w": "monitor", "b": [0.5402, 0.3846, 0.6029, 0.3994]}, {"w": "click-though", "b": [0.609, 0.3846, 0.7061, 0.3994]}, {"w": "rate", "b": [0.7123, 0.3846, 0.7437, 0.3994]}, {"w": "(CTR),", "b": [0.7498, 0.3846, 0.8087, 0.3994]}, {"w": "that", "b": [0.8148, 0.3846, 0.8482, 0.3994]}, {"w": "is,", "b": [0.8543, 0.3846, 0.8716, 0.3994]}, {"w": "ratio", "b": [0.1312, 0.4024, 0.1698, 0.4174]}, {"w": "of", "b": [0.176, 0.4024, 0.1911, 0.4174]}, {"w": "users", "b": [0.1972, 0.4024, 0.2381, 0.4174]}, {"w": "who", "b": [0.2443, 0.4024, 0.2776, 0.4174]}, {"w": "clicked", "b": [0.2838, 0.4024, 0.3385, 0.4174]}, {"w": "on", "b": [0.3446, 0.4024, 0.3644, 0.4174]}, {"w": "a", "b": [0.3706, 0.4024, 0.38, 0.4174]}, {"w": "recommendation", "b": [0.3861, 0.4024, 0.5216, 0.4174]}, {"w": "to", "b": [0.5277, 0.4024, 0.5444, 0.4174]}, {"w": "the", "b": [0.5505, 0.4024, 0.5766, 0.4174]}, {"w": "number", "b": [0.5827, 0.4024, 0.6448, 0.4174]}, {"w": "of", "b": [0.6509, 0.4024, 0.666, 0.4174]}, {"w": "total", "b": [0.6722, 0.4024, 0.7107, 0.4174]}, {"w": "users", "b": [0.7168, 0.4024, 0.7578, 0.4174]}, {"w": "who", "b": [0.7639, 0.4024, 0.7972, 0.4174]}, {"w": "received", "b": [0.8034, 0.4024, 0.8691, 0.4174]}, {"w": "recommendations", "b": [0.1312, 0.4204, 0.2719, 0.4354]}, {"w": "from", "b": [0.278, 0.4204, 0.3155, 0.4354]}, {"w": "that", "b": [0.3216, 0.4204, 0.3555, 0.4354]}, {"w": "model.", "b": [0.3616, 0.4204, 0.4154, 0.4354]}, {"w": "If", "b": [0.4237, 0.4204, 0.436, 0.4354]}, {"w": "CTR", "b": [0.4421, 0.4204, 0.4823, 0.4354]}, {"w": "is", "b": [0.4885, 0.4204, 0.5009, 0.4354]}, {"w": "decreasing,", "b": [0.507, 0.4204, 0.5954, 0.4354]}, {"w": "the", "b": [0.6015, 0.4204, 0.6272, 0.4354]}, {"w": "model", "b": [0.6333, 0.4204, 0.682, 0.4354]}, {"w": "must", "b": [0.6882, 0.4204, 0.7278, 0.4354]}, {"w": "be", "b": [0.7339, 0.4204, 0.7529, 0.4354]}, {"w": "updated.", "b": [0.759, 0.4204, 0.8303, 0.4354]}]}, {"id": "b_6", "type": "paragraph", "text": "It’s important to note that there is a tricky tradeoffbetween being too conservative versus frequently alerting stakeholders about small changes in the metrics. If you alert too often, people might become tired of receiving alerts and eventually will start ignoring them. In non-mission-critical cases, it can be appropriate to allow the stakeholders to define their own thresholds that trigger alerts.", "words": [{"w": "It’s", "b": [0.1312, 0.4473, 0.1577, 0.4623]}, {"w": "important", "b": [0.1639, 0.4473, 0.2455, 0.4623]}, {"w": "to", "b": [0.2517, 0.4473, 0.2683, 0.4623]}, {"w": "note", "b": [0.2744, 0.4473, 0.3096, 0.4623]}, {"w": "that", "b": [0.3157, 0.4473, 0.3498, 0.4623]}, {"w": "there", "b": [0.356, 0.4473, 0.3974, 0.4623]}, {"w": "is", "b": [0.4036, 0.4473, 0.4161, 0.4623]}, {"w": "a", "b": [0.4223, 0.4473, 0.4316, 0.4623]}, {"w": "tricky", "b": [0.4377, 0.4473, 0.4848, 0.4623]}, {"w": "tradeoffbetween", "b": [0.491, 0.4473, 0.6254, 0.4623]}, {"w": "being", "b": [0.6315, 0.4473, 0.6755, 0.4623]}, {"w": "too", "b": [0.6816, 0.4473, 0.708, 0.4623]}, {"w": "conservative", "b": [0.7141, 0.4473, 0.813, 0.4623]}, {"w": "versus", "b": [0.8192, 0.4473, 0.8691, 0.4623]}, {"w": "frequently", "b": [0.1312, 0.4652, 0.2138, 0.4803]}, {"w": "alerting", "b": [0.2199, 0.4652, 0.2826, 0.4803]}, {"w": "stakeholders", "b": [0.2888, 0.4652, 0.3893, 0.4803]}, {"w": "about", "b": [0.3954, 0.4652, 0.4429, 0.4803]}, {"w": "small", "b": [0.4491, 0.4652, 0.4919, 0.4803]}, {"w": "changes", "b": [0.4981, 0.4652, 0.5614, 0.4803]}, {"w": "in", "b": [0.5675, 0.4652, 0.5832, 0.4803]}, {"w": "the", "b": [0.5893, 0.4652, 0.6154, 0.4803]}, {"w": "metrics.", "b": [0.6216, 0.4652, 0.6865, 0.4803]}, {"w": "If", "b": [0.6947, 0.4652, 0.7072, 0.4803]}, {"w": "you", "b": [0.7133, 0.4652, 0.7426, 0.4803]}, {"w": "alert", "b": [0.7487, 0.4652, 0.7863, 0.4803]}, {"w": "too", "b": [0.7925, 0.4652, 0.8191, 0.4803]}, {"w": "often,", "b": [0.8252, 0.4652, 0.8717, 0.4803]}, {"w": "people", "b": [0.1312, 0.4831, 0.1841, 0.4982]}, {"w": "might", "b": [0.1908, 0.4831, 0.2384, 0.4982]}, {"w": "become", "b": [0.2451, 0.4831, 0.3063, 0.4982]}, {"w": "tired", "b": [0.3131, 0.4831, 0.3518, 0.4982]}, {"w": "of", "b": [0.3586, 0.4831, 0.3737, 0.4982]}, {"w": "receiving", "b": [0.3805, 0.4831, 0.4533, 0.4982]}, {"w": "alerts", "b": [0.46, 0.4831, 0.5051, 0.4982]}, {"w": "and", "b": [0.5119, 0.4831, 0.5422, 0.4982]}, {"w": "eventually", "b": [0.549, 0.4831, 0.6327, 0.4982]}, {"w": "will", "b": [0.6394, 0.4831, 0.6687, 0.4982]}, {"w": "start", "b": [0.6755, 0.4831, 0.7143, 0.4982]}, {"w": "ignoring", "b": [0.7211, 0.4831, 0.788, 0.4982]}, {"w": "them.", "b": [0.7948, 0.4831, 0.8418, 0.4982]}, {"w": "In", "b": [0.8518, 0.4831, 0.8691, 0.4982]}, {"w": "non-mission-critical", "b": [0.1312, 0.5013, 0.2852, 0.5161]}, {"w": "cases,", "b": [0.2914, 0.5013, 0.3358, 0.5161]}, {"w": "it", "b": [0.342, 0.5013, 0.3541, 0.5161]}, {"w": "can", "b": [0.3603, 0.5013, 0.3874, 0.5161]}, {"w": "be", "b": [0.3936, 0.5013, 0.4122, 0.5161]}, {"w": "appropriate", "b": [0.4184, 0.5013, 0.5099, 0.5161]}, {"w": "to", "b": [0.5161, 0.5013, 0.5322, 0.5161]}, {"w": "allow", "b": [0.5383, 0.5013, 0.579, 0.5161]}, {"w": "the", "b": [0.5852, 0.5013, 0.6103, 0.5161]}, {"w": "stakeholders", "b": [0.6165, 0.5013, 0.7132, 0.5161]}, {"w": "to", "b": [0.7194, 0.5013, 0.7355, 0.5161]}, {"w": "define", "b": [0.7416, 0.5013, 0.7879, 0.5161]}, {"w": "their", "b": [0.7941, 0.5013, 0.8313, 0.5161]}, {"w": "own", "b": [0.8375, 0.5013, 0.8691, 0.5161]}, {"w": "thresholds", "b": [0.1312, 0.5191, 0.2136, 0.5341]}, {"w": "that", "b": [0.2197, 0.5191, 0.2535, 0.5341]}, {"w": "trigger", "b": [0.2597, 0.5191, 0.3131, 0.5341]}, {"w": "alerts.", "b": [0.3193, 0.5191, 0.3686, 0.5341]}]}, {"id": "b_7", "type": "paragraph", "text": "Log monitoring events so the entire process is traceable. For visual model performance analysis, the monitoring tool’s user interface should provide trend charts showing how the model degradation evolves over time.", "words": [{"w": "Log", "b": [0.1312, 0.5459, 0.1618, 0.561]}, {"w": "monitoring", "b": [0.1696, 0.5459, 0.2596, 0.561]}, {"w": "events", "b": [0.2674, 0.5459, 0.3182, 0.561]}, {"w": "so", "b": [0.326, 0.5459, 0.3429, 0.561]}, {"w": "the", "b": [0.3507, 0.5459, 0.3768, 0.561]}, {"w": "entire", "b": [0.3846, 0.5459, 0.4312, 0.561]}, {"w": "process", "b": [0.439, 0.5459, 0.4984, 0.561]}, {"w": "is", "b": [0.5062, 0.5459, 0.5188, 0.561]}, {"w": "traceable.", "b": [0.5266, 0.5459, 0.6062, 0.561]}, {"w": "For", "b": [0.6193, 0.5459, 0.6468, 0.561]}, {"w": "visual", "b": [0.6546, 0.5459, 0.7023, 0.561]}, {"w": "model", "b": [0.7101, 0.5459, 0.7598, 0.561]}, {"w": "performance", "b": [0.7676, 0.5459, 0.8691, 0.561]}, {"w": "analysis,", "b": [0.1312, 0.5639, 0.2007, 0.579]}, {"w": "the", "b": [0.2069, 0.5639, 0.2329, 0.579]}, {"w": "monitoring", "b": [0.2391, 0.5639, 0.3287, 0.579]}, {"w": "tool’s", "b": [0.3348, 0.5639, 0.3792, 0.579]}, {"w": "user", "b": [0.3853, 0.5639, 0.4188, 0.579]}, {"w": "interface", "b": [0.425, 0.5639, 0.4949, 0.579]}, {"w": "should", "b": [0.501, 0.5639, 0.5543, 0.579]}, {"w": "provide", "b": [0.5604, 0.5639, 0.6209, 0.579]}, {"w": "trend", "b": [0.627, 0.5639, 0.6708, 0.579]}, {"w": "charts", "b": [0.677, 0.5639, 0.7267, 0.579]}, {"w": "showing", "b": [0.7328, 0.5639, 0.798, 0.579]}, {"w": "how", "b": [0.8041, 0.5639, 0.8369, 0.579]}, {"w": "the", "b": [0.8431, 0.5639, 0.8691, 0.579]}, {"w": "model", "b": [0.1312, 0.5819, 0.1799, 0.5969]}, {"w": "degradation", "b": [0.1861, 0.5819, 0.2815, 0.5969]}, {"w": "evolves", "b": [0.2876, 0.5819, 0.3442, 0.5969]}, {"w": "over", "b": [0.3503, 0.5819, 0.3837, 0.5969]}, {"w": "time.", "b": [0.3898, 0.5819, 0.4308, 0.5969]}]}, {"id": "b_8", "type": "paragraph", "text": "One of the monitoring tool’s properties should be the ability to compute and visualize metrics on slices of data. A slice is a subset of the data that includes only such examples in which a specific attribute has a certain value. For example, one slice could contain only the examples where the state attribute is Florida; another slice might contain only the data for women, and so on. The degradation of the model might only be observed in some slices, yet remain insignificant in others.", "words": [{"w": "One", "b": [0.1312, 0.609, 0.1634, 0.6238]}, {"w": "of", "b": [0.1688, 0.609, 0.1834, 0.6238]}, {"w": "the", "b": [0.1887, 0.609, 0.2139, 0.6238]}, {"w": "monitoring", "b": [0.2192, 0.609, 0.3057, 0.6238]}, {"w": "tool’s", "b": [0.3111, 0.609, 0.3539, 0.6238]}, {"w": "properties", "b": [0.3593, 0.609, 0.4384, 0.6238]}, {"w": "should", "b": [0.4438, 0.609, 0.4952, 0.6238]}, {"w": "be", "b": [0.5005, 0.609, 0.5191, 0.6238]}, {"w": "the", "b": [0.5245, 0.609, 0.5497, 0.6238]}, {"w": "ability", "b": [0.5551, 0.609, 0.6053, 0.6238]}, {"w": "to", "b": [0.6107, 0.609, 0.6267, 0.6238]}, {"w": "compute", "b": [0.6321, 0.609, 0.6995, 0.6238]}, {"w": "and", "b": [0.7048, 0.609, 0.734, 0.6238]}, {"w": "visualize", "b": [0.7394, 0.609, 0.8063, 0.6238]}, {"w": "metrics", "b": [0.8117, 0.609, 0.8691, 0.6238]}, {"w": "on", "b": [0.1312, 0.6269, 0.1505, 0.6417]}, {"w": "slices", "b": [0.1567, 0.6269, 0.1974, 0.6417]}, {"w": "of", "b": [0.2036, 0.6269, 0.2183, 0.6417]}, {"w": "data.", "b": [0.2244, 0.6269, 0.265, 0.6417]}, {"w": "A", "b": [0.2732, 0.6269, 0.2869, 0.6417]}, {"w": "slice", "b": [0.293, 0.6269, 0.3266, 0.6417]}, {"w": "is", "b": [0.3327, 0.6269, 0.345, 0.6417]}, {"w": "a", "b": [0.3512, 0.6269, 0.3603, 0.6417]}, {"w": "subset", "b": [0.3664, 0.6269, 0.4164, 0.6417]}, {"w": "of", "b": [0.4225, 0.6269, 0.4372, 0.6417]}, {"w": "the", "b": [0.4434, 0.6269, 0.4687, 0.6417]}, {"w": "data", "b": [0.4748, 0.6269, 0.5103, 0.6417]}, {"w": "that", "b": [0.5165, 0.6269, 0.5499, 0.6417]}, {"w": "includes", "b": [0.5561, 0.6269, 0.6201, 0.6417]}, {"w": "only", "b": [0.6263, 0.6269, 0.6602, 0.6417]}, {"w": "such", "b": [0.6664, 0.6269, 0.7015, 0.6417]}, {"w": "examples", "b": [0.7076, 0.6269, 0.7802, 0.6417]}, {"w": "in", "b": [0.7864, 0.6269, 0.8016, 0.6417]}, {"w": "which", "b": [0.8077, 0.6269, 0.8539, 0.6417]}, {"w": "a", "b": [0.86, 0.6269, 0.8692, 0.6417]}, {"w": "specific", "b": [0.1312, 0.6449, 0.1882, 0.6597]}, {"w": "attribute", "b": [0.1943, 0.6449, 0.2647, 0.6597]}, {"w": "has", "b": [0.2708, 0.6449, 0.297, 0.6597]}, {"w": "a", "b": [0.3032, 0.6449, 0.3122, 0.6597]}, {"w": "certain", "b": [0.3183, 0.6449, 0.3727, 0.6597]}, {"w": "value.", "b": [0.3788, 0.6449, 0.4245, 0.6597]}, {"w": "For", "b": [0.4327, 0.6449, 0.4591, 0.6597]}, {"w": "example,", "b": [0.4652, 0.6449, 0.5351, 0.6597]}, {"w": "one", "b": [0.5412, 0.6449, 0.5683, 0.6597]}, {"w": "slice", "b": [0.5745, 0.6449, 0.6078, 0.6597]}, {"w": "could", "b": [0.6139, 0.6449, 0.6561, 0.6597]}, {"w": "contain", "b": [0.6622, 0.6449, 0.72, 0.6597]}, {"w": "only", "b": [0.7261, 0.6449, 0.7598, 0.6597]}, {"w": "the", "b": [0.7659, 0.6449, 0.7911, 0.6597]}, {"w": "examples", "b": [0.7972, 0.6449, 0.8692, 0.6597]}, {"w": "where", "b": [0.1306, 0.6626, 0.1787, 0.6777]}, {"w": "the", "b": [0.1851, 0.6626, 0.2112, 0.6777]}, {"w": "state", "b": [0.2175, 0.6626, 0.2574, 0.6777]}, {"w": "attribute", "b": [0.2637, 0.6626, 0.337, 0.6777]}, {"w": "is", "b": [0.3433, 0.6626, 0.356, 0.6777]}, {"w": "Florida;", "b": [0.3623, 0.6626, 0.4269, 0.6777]}, {"w": "another", "b": [0.4333, 0.6626, 0.4962, 0.6777]}, {"w": "slice", "b": [0.5025, 0.6626, 0.5371, 0.6777]}, {"w": "might", "b": [0.5434, 0.6626, 0.591, 0.6777]}, {"w": "contain", "b": [0.5973, 0.6626, 0.6575, 0.6777]}, {"w": "only", "b": [0.6638, 0.6626, 0.6988, 0.6777]}, {"w": "the", "b": [0.7052, 0.6626, 0.7313, 0.6777]}, {"w": "data", "b": [0.7376, 0.6626, 0.7742, 0.6777]}, {"w": "for", "b": [0.7806, 0.6626, 0.8031, 0.6777]}, {"w": "women,", "b": [0.8094, 0.6626, 0.8716, 0.6777]}, {"w": "and", "b": [0.1312, 0.6807, 0.1609, 0.6956]}, {"w": "so", "b": [0.167, 0.6807, 0.1835, 0.6956]}, {"w": "on.", "b": [0.1897, 0.6807, 0.2142, 0.6956]}, {"w": "The", "b": [0.2225, 0.6807, 0.2542, 0.6956]}, {"w": "degradation", "b": [0.2603, 0.6807, 0.3555, 0.6956]}, {"w": "of", "b": [0.3616, 0.6807, 0.3764, 0.6956]}, {"w": "the", "b": [0.3826, 0.6807, 0.4082, 0.6956]}, {"w": "model", "b": [0.4143, 0.6807, 0.4629, 0.6956]}, {"w": "might", "b": [0.4691, 0.6807, 0.5156, 0.6956]}, {"w": "only", "b": [0.5217, 0.6807, 0.556, 0.6956]}, {"w": "be", "b": [0.5621, 0.6807, 0.5811, 0.6956]}, {"w": "observed", "b": [0.5872, 0.6807, 0.6569, 0.6956]}, {"w": "in", "b": [0.6631, 0.6807, 0.6784, 0.6956]}, {"w": "some", "b": [0.6846, 0.6807, 0.7246, 0.6956]}, {"w": "slices,", "b": [0.7307, 0.6807, 0.777, 0.6956]}, {"w": "yet", "b": [0.7831, 0.6807, 0.8077, 0.6956]}, {"w": "remain", "b": [0.8138, 0.6807, 0.8691, 0.6956]}, {"w": "insignificant", "b": [0.1312, 0.6986, 0.2283, 0.7135]}, {"w": "in", "b": [0.2344, 0.6986, 0.2498, 0.7135]}, {"w": "others.", "b": [0.2559, 0.6986, 0.3104, 0.7135]}]}, {"id": "b_9", "type": "equation", "text": "Besides real-time monitoring, it’s important to also log data that:", "words": [{"w": "Besides", "b": [0.1312, 0.7255, 0.1907, 0.7405]}, {"w": "real-time", "b": [0.1968, 0.7255, 0.2686, 0.7405]}, {"w": "monitoring,", "b": [0.2748, 0.7255, 0.3681, 0.7405]}, {"w": "it’s", "b": [0.3743, 0.7255, 0.399, 0.7405]}, {"w": "important", "b": [0.4052, 0.7255, 0.4862, 0.7405]}, {"w": "to", "b": [0.4924, 0.7255, 0.5088, 0.7405]}, {"w": "also", "b": [0.5149, 0.7255, 0.5458, 0.7405]}, {"w": "log", "b": [0.5519, 0.7255, 0.5755, 0.7405]}, {"w": "data", "b": [0.5817, 0.7255, 0.6175, 0.7405]}, {"w": "that:", "b": [0.6237, 0.7255, 0.6626, 0.7405]}]}, {"id": "b_10", "type": "paragraph", "text": "• might help find a problem’s source, • is impossible to analyze in real-time, or • is helpful for improving existing models or training new ones.", "words": [{"w": "•", "b": [0.1538, 0.7524, 0.1681, 0.7674]}, {"w": "might", "b": [0.1774, 0.7524, 0.224, 0.7674]}, {"w": "help", "b": [0.2301, 0.7524, 0.264, 0.7674]}, {"w": "find", "b": [0.2702, 0.7524, 0.3009, 0.7674]}, {"w": "a", "b": [0.3071, 0.7524, 0.3163, 0.7674]}, {"w": "problem’s", "b": [0.3224, 0.7524, 0.4005, 0.7674]}, {"w": "source,", "b": [0.4067, 0.7524, 0.4622, 0.7674]}, {"w": "•", "b": [0.1538, 0.7704, 0.1681, 0.7853]}, {"w": "is", "b": [0.1774, 0.7704, 0.1898, 0.7853]}, {"w": "impossible", "b": [0.1959, 0.7704, 0.2797, 0.7853]}, {"w": "to", "b": [0.2859, 0.7704, 0.3023, 0.7853]}, {"w": "analyze", "b": [0.3084, 0.7704, 0.3684, 0.7853]}, {"w": "in", "b": [0.3746, 0.7704, 0.3899, 0.7853]}, {"w": "real-time,", "b": [0.3961, 0.7704, 0.473, 0.7853]}, {"w": "or", "b": [0.4792, 0.7704, 0.4956, 0.7853]}, {"w": "•", "b": [0.1538, 0.7883, 0.1681, 0.8033]}, {"w": "is", "b": [0.1774, 0.7883, 0.1898, 0.8033]}, {"w": "helpful", "b": [0.1959, 0.7883, 0.2508, 0.8033]}, {"w": "for", "b": [0.2569, 0.7883, 0.279, 0.8033]}, {"w": "improving", "b": [0.2852, 0.7883, 0.3663, 0.8033]}, {"w": "existing", "b": [0.3724, 0.7883, 0.4346, 0.8033]}, {"w": "models", "b": [0.4407, 0.7883, 0.4967, 0.8033]}, {"w": "or", "b": [0.5028, 0.7883, 0.5193, 0.8033]}, {"w": "training", "b": [0.5254, 0.7883, 0.5891, 0.8033]}, {"w": "new", "b": [0.5952, 0.7883, 0.627, 0.8033]}, {"w": "ones.", "b": [0.6332, 0.7883, 0.6733, 0.8033]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 17", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "17", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 281, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "9.4.3 What to Log", "words": [{"w": "9.4.3", "b": [0.1312, 0.0884, 0.1749, 0.1033]}, {"w": "What", "b": [0.1961, 0.0884, 0.2484, 0.1033]}, {"w": "to", "b": [0.2554, 0.0884, 0.2743, 0.1033]}, {"w": "Log", "b": [0.2814, 0.0884, 0.3154, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "It is important to log enough information to reproduce any erratic system behavior during a future analysis. If the model is served to a front-end user, such as a website visitor or a mobile application user, it’s worth saving the user’s context at the moment of the model serving. As discussed in Section 9.2, the context might include: the content of the webpage (or the state of the application), the user’s position on the web page, time of the day, where", "words": [{"w": "It", "b": [0.1312, 0.1249, 0.1452, 0.1399]}, {"w": "is", "b": [0.1514, 0.1249, 0.1639, 0.1399]}, {"w": "important", "b": [0.17, 0.1249, 0.2517, 0.1399]}, {"w": "to", "b": [0.2579, 0.1249, 0.2744, 0.1399]}, {"w": "log", "b": [0.2806, 0.1249, 0.3044, 0.1399]}, {"w": "enough", "b": [0.3105, 0.1249, 0.3684, 0.1399]}, {"w": "information", "b": [0.3746, 0.1249, 0.4692, 0.1399]}, {"w": "to", "b": [0.4754, 0.1249, 0.4919, 0.1399]}, {"w": "reproduce", "b": [0.4981, 0.1249, 0.5783, 0.1399]}, {"w": "any", "b": [0.5845, 0.1249, 0.6134, 0.1399]}, {"w": "erratic", "b": [0.6196, 0.1249, 0.6725, 0.1399]}, {"w": "system", "b": [0.6786, 0.1249, 0.7341, 0.1399]}, {"w": "behavior", "b": [0.7403, 0.1249, 0.8101, 0.1399]}, {"w": "during", "b": [0.8163, 0.1249, 0.8691, 0.1399]}, {"w": "a", "b": [0.1312, 0.1428, 0.1406, 0.1579]}, {"w": "future", "b": [0.1469, 0.1428, 0.1967, 0.1579]}, {"w": "analysis.", "b": [0.2029, 0.1428, 0.2727, 0.1579]}, {"w": "If", "b": [0.2813, 0.1428, 0.2938, 0.1579]}, {"w": "the", "b": [0.3001, 0.1428, 0.3263, 0.1579]}, {"w": "model", "b": [0.3325, 0.1428, 0.3822, 0.1579]}, {"w": "is", "b": [0.3885, 0.1428, 0.4011, 0.1579]}, {"w": "served", "b": [0.4074, 0.1428, 0.4589, 0.1579]}, {"w": "to", "b": [0.4651, 0.1428, 0.4819, 0.1579]}, {"w": "a", "b": [0.4881, 0.1428, 0.4975, 0.1579]}, {"w": "front-end", "b": [0.5038, 0.1428, 0.5792, 0.1579]}, {"w": "user,", "b": [0.5854, 0.1428, 0.6243, 0.1579]}, {"w": "such", "b": [0.6306, 0.1428, 0.6669, 0.1579]}, {"w": "as", "b": [0.6731, 0.1428, 0.69, 0.1579]}, {"w": "a", "b": [0.6962, 0.1428, 0.7056, 0.1579]}, {"w": "website", "b": [0.7119, 0.1428, 0.7722, 0.1579]}, {"w": "visitor", "b": [0.7785, 0.1428, 0.8304, 0.1579]}, {"w": "or", "b": [0.8367, 0.1428, 0.8535, 0.1579]}, {"w": "a", "b": [0.8597, 0.1428, 0.8691, 0.1579]}, {"w": "mobile", "b": [0.1312, 0.1607, 0.1856, 0.1759]}, {"w": "application", "b": [0.1919, 0.1607, 0.2829, 0.1759]}, {"w": "user,", "b": [0.2892, 0.1607, 0.3281, 0.1759]}, {"w": "it’s", "b": [0.3344, 0.1607, 0.3596, 0.1759]}, {"w": "worth", "b": [0.3659, 0.1607, 0.4135, 0.1759]}, {"w": "saving", "b": [0.4198, 0.1607, 0.4711, 0.1759]}, {"w": "the", "b": [0.4774, 0.1607, 0.5036, 0.1759]}, {"w": "user’s", "b": [0.5099, 0.1607, 0.5562, 0.1759]}, {"w": "context", "b": [0.5622, 0.1608, 0.6309, 0.1758]}, {"w": "at", "b": [0.6372, 0.1607, 0.6539, 0.1759]}, {"w": "the", "b": [0.6602, 0.1607, 0.6863, 0.1759]}, {"w": "moment", "b": [0.6926, 0.1607, 0.759, 0.1759]}, {"w": "of", "b": [0.7653, 0.1607, 0.7805, 0.1759]}, {"w": "the", "b": [0.7867, 0.1607, 0.8129, 0.1759]}, {"w": "model", "b": [0.8192, 0.1607, 0.8688, 0.1759]}, {"w": "serving.", "b": [0.1312, 0.1788, 0.1934, 0.1938]}, {"w": "As", "b": [0.2016, 0.1788, 0.2227, 0.1938]}, {"w": "discussed", "b": [0.2289, 0.1788, 0.303, 0.1938]}, {"w": "in", "b": [0.3091, 0.1788, 0.3245, 0.1938]}, {"w": "Section", "b": [0.3307, 0.1788, 0.3891, 0.1938]}, {"w": "9.2,", "b": [0.3952, 0.1788, 0.4239, 0.1938]}, {"w": "the", "b": [0.4301, 0.1788, 0.4557, 0.1938]}, {"w": "context", "b": [0.4618, 0.1788, 0.5212, 0.1938]}, {"w": "might", "b": [0.5274, 0.1788, 0.574, 0.1938]}, {"w": "include:", "b": [0.5802, 0.1788, 0.6427, 0.1938]}, {"w": "the", "b": [0.6509, 0.1788, 0.6765, 0.1938]}, {"w": "content", "b": [0.6827, 0.1788, 0.7421, 0.1938]}, {"w": "of", "b": [0.7483, 0.1788, 0.7631, 0.1938]}, {"w": "the", "b": [0.7693, 0.1788, 0.7949, 0.1938]}, {"w": "webpage", "b": [0.801, 0.1788, 0.8692, 0.1938]}, {"w": "(or", "b": [0.1291, 0.1968, 0.1525, 0.2117]}, {"w": "the", "b": [0.1587, 0.1968, 0.1842, 0.2117]}, {"w": "state", "b": [0.1903, 0.1968, 0.2291, 0.2117]}, {"w": "of", "b": [0.2353, 0.1968, 0.25, 0.2117]}, {"w": "the", "b": [0.2562, 0.1968, 0.2816, 0.2117]}, {"w": "application),", "b": [0.2878, 0.1968, 0.3886, 0.2117]}, {"w": "the", "b": [0.3948, 0.1968, 0.4202, 0.2117]}, {"w": "user’s", "b": [0.4264, 0.1968, 0.4714, 0.2117]}, {"w": "position", "b": [0.4776, 0.1968, 0.5413, 0.2117]}, {"w": "on", "b": [0.5475, 0.1968, 0.5668, 0.2117]}, {"w": "the", "b": [0.573, 0.1968, 0.5985, 0.2117]}, {"w": "web", "b": [0.6046, 0.1968, 0.6356, 0.2117]}, {"w": "page,", "b": [0.6418, 0.1968, 0.6836, 0.2117]}, {"w": "time", "b": [0.6897, 0.1968, 0.7253, 0.2117]}, {"w": "of", "b": [0.7315, 0.1968, 0.7462, 0.2117]}, {"w": "the", "b": [0.7524, 0.1968, 0.7779, 0.2117]}, {"w": "day,", "b": [0.784, 0.1968, 0.8161, 0.2117]}, {"w": "where", "b": [0.8222, 0.1968, 0.8691, 0.2117]}]}, {"id": "b_2", "type": "paragraph", "text": "the user came from, and what they clicked before the model prediction was served.", "words": [{"w": "the", "b": [0.1312, 0.2147, 0.1569, 0.2297]}, {"w": "user", "b": [0.163, 0.2147, 0.196, 0.2297]}, {"w": "came", "b": [0.2022, 0.2147, 0.2432, 0.2297]}, {"w": "from,", "b": [0.2493, 0.2147, 0.2919, 0.2297]}, {"w": "and", "b": [0.2981, 0.2147, 0.3278, 0.2297]}, {"w": "what", "b": [0.334, 0.2147, 0.3739, 0.2297]}, {"w": "they", "b": [0.3801, 0.2147, 0.4155, 0.2297]}, {"w": "clicked", "b": [0.4216, 0.2147, 0.4755, 0.2297]}, {"w": "before", "b": [0.4816, 0.2147, 0.5309, 0.2297]}, {"w": "the", "b": [0.5371, 0.2147, 0.5627, 0.2297]}, {"w": "model", "b": [0.5688, 0.2147, 0.6176, 0.2297]}, {"w": "prediction", "b": [0.6237, 0.2147, 0.7048, 0.2297]}, {"w": "was", "b": [0.7109, 0.2147, 0.7403, 0.2297]}, {"w": "served.", "b": [0.7464, 0.2147, 0.802, 0.2297]}]}, {"id": "b_3", "type": "paragraph", "text": "Additionally, it is useful to include the model input, that is, the features extracted from the context, and the time it took to generate those features.", "words": [{"w": "Additionally,", "b": [0.1305, 0.2417, 0.2335, 0.2566]}, {"w": "it", "b": [0.2396, 0.2417, 0.2518, 0.2566]}, {"w": "is", "b": [0.258, 0.2417, 0.2703, 0.2566]}, {"w": "useful", "b": [0.2765, 0.2417, 0.323, 0.2566]}, {"w": "to", "b": [0.3291, 0.2417, 0.3454, 0.2566]}, {"w": "include", "b": [0.3516, 0.2417, 0.4087, 0.2566]}, {"w": "the", "b": [0.4149, 0.2417, 0.4403, 0.2566]}, {"w": "model", "b": [0.4465, 0.2417, 0.4949, 0.2566]}, {"w": "input,", "b": [0.501, 0.2417, 0.549, 0.2566]}, {"w": "that", "b": [0.5551, 0.2417, 0.5887, 0.2566]}, {"w": "is,", "b": [0.5949, 0.2417, 0.6123, 0.2566]}, {"w": "the", "b": [0.6185, 0.2417, 0.644, 0.2566]}, {"w": "features", "b": [0.6501, 0.2417, 0.713, 0.2566]}, {"w": "extracted", "b": [0.7191, 0.2417, 0.7941, 0.2566]}, {"w": "from", "b": [0.8003, 0.2417, 0.8375, 0.2566]}, {"w": "the", "b": [0.8437, 0.2417, 0.8692, 0.2566]}, {"w": "context,", "b": [0.1312, 0.2596, 0.1958, 0.2745]}, {"w": "and", "b": [0.202, 0.2596, 0.2317, 0.2745]}, {"w": "the", "b": [0.2379, 0.2596, 0.2635, 0.2745]}, {"w": "time", "b": [0.2697, 0.2596, 0.3056, 0.2745]}, {"w": "it", "b": [0.3117, 0.2596, 0.324, 0.2745]}, {"w": "took", "b": [0.3302, 0.2596, 0.366, 0.2745]}, {"w": "to", "b": [0.3722, 0.2596, 0.3886, 0.2745]}, {"w": "generate", "b": [0.3947, 0.2596, 0.4625, 0.2745]}, {"w": "those", "b": [0.4686, 0.2596, 0.5108, 0.2745]}, {"w": "features.", "b": [0.5169, 0.2596, 0.5853, 0.2745]}]}, {"id": "b_4", "type": "paragraph", "text": "The log could also include:", "words": [{"w": "The", "b": [0.1306, 0.2865, 0.1624, 0.3014]}, {"w": "log", "b": [0.1685, 0.2865, 0.1921, 0.3014]}, {"w": "could", "b": [0.1982, 0.2865, 0.2413, 0.3014]}, {"w": "also", "b": [0.2475, 0.2865, 0.2783, 0.3014]}, {"w": "include:", "b": [0.2845, 0.2865, 0.3471, 0.3014]}]}, {"id": "b_5", "type": "paragraph", "text": "• the model’s output, and time it took to generate it, • the new context of the user, once they observed the model’s output, • the user’s reaction to the output.", "words": [{"w": "•", "b": [0.1538, 0.3134, 0.1681, 0.3284]}, {"w": "the", "b": [0.1774, 0.3134, 0.203, 0.3284]}, {"w": "model’s", "b": [0.2091, 0.3134, 0.2703, 0.3284]}, {"w": "output,", "b": [0.2764, 0.3134, 0.3359, 0.3284]}, {"w": "and", "b": [0.342, 0.3134, 0.3718, 0.3284]}, {"w": "time", "b": [0.3779, 0.3134, 0.4138, 0.3284]}, {"w": "it", "b": [0.42, 0.3134, 0.4323, 0.3284]}, {"w": "took", "b": [0.4384, 0.3134, 0.4743, 0.3284]}, {"w": "to", "b": [0.4804, 0.3134, 0.4968, 0.3284]}, {"w": "generate", "b": [0.503, 0.3134, 0.5707, 0.3284]}, {"w": "it,", "b": [0.5769, 0.3134, 0.5943, 0.3284]}, {"w": "•", "b": [0.1538, 0.3314, 0.1681, 0.3463]}, {"w": "the", "b": [0.1774, 0.3314, 0.203, 0.3463]}, {"w": "new", "b": [0.2091, 0.3314, 0.2409, 0.3463]}, {"w": "context", "b": [0.2471, 0.3314, 0.3066, 0.3463]}, {"w": "of", "b": [0.3127, 0.3314, 0.3276, 0.3463]}, {"w": "the", "b": [0.3337, 0.3314, 0.3594, 0.3463]}, {"w": "user,", "b": [0.3655, 0.3314, 0.4036, 0.3463]}, {"w": "once", "b": [0.4098, 0.3314, 0.4457, 0.3463]}, {"w": "they", "b": [0.4518, 0.3314, 0.4872, 0.3463]}, {"w": "observed", "b": [0.4934, 0.3314, 0.5633, 0.3463]}, {"w": "the", "b": [0.5694, 0.3314, 0.5951, 0.3463]}, {"w": "model’s", "b": [0.6012, 0.3314, 0.6623, 0.3463]}, {"w": "output,", "b": [0.6685, 0.3314, 0.728, 0.3463]}, {"w": "•", "b": [0.1538, 0.3493, 0.1681, 0.3643]}, {"w": "the", "b": [0.1774, 0.3493, 0.203, 0.3643]}, {"w": "user’s", "b": [0.2091, 0.3493, 0.2545, 0.3643]}, {"w": "reaction", "b": [0.2607, 0.3493, 0.3254, 0.3643]}, {"w": "to", "b": [0.3315, 0.3493, 0.3479, 0.3643]}, {"w": "the", "b": [0.3541, 0.3493, 0.3797, 0.3643]}, {"w": "output.", "b": [0.3859, 0.3493, 0.4453, 0.3643]}]}, {"id": "b_6", "type": "paragraph", "text": "The user’s reaction is the immediate action that followed the observation of the model output: what was clicked, and how much time after the output was served.", "words": [{"w": "The", "b": [0.1306, 0.3763, 0.1617, 0.3912]}, {"w": "user’s", "b": [0.1672, 0.3763, 0.2117, 0.3912]}, {"w": "reaction", "b": [0.2171, 0.3763, 0.2805, 0.3912]}, {"w": "is", "b": [0.2859, 0.3763, 0.2981, 0.3912]}, {"w": "the", "b": [0.3035, 0.3763, 0.3287, 0.3912]}, {"w": "immediate", "b": [0.3341, 0.3763, 0.4165, 0.3912]}, {"w": "action", "b": [0.422, 0.3763, 0.4702, 0.3912]}, {"w": "that", "b": [0.4756, 0.3763, 0.5088, 0.3912]}, {"w": "followed", "b": [0.5143, 0.3763, 0.578, 0.3912]}, {"w": "the", "b": [0.5835, 0.3763, 0.6086, 0.3912]}, {"w": "observation", "b": [0.6141, 0.3763, 0.7041, 0.3912]}, {"w": "of", "b": [0.7096, 0.3763, 0.7242, 0.3912]}, {"w": "the", "b": [0.7296, 0.3763, 0.7548, 0.3912]}, {"w": "model", "b": [0.7602, 0.3763, 0.8079, 0.3912]}, {"w": "output:", "b": [0.8134, 0.3763, 0.8717, 0.3912]}, {"w": "what", "b": [0.1306, 0.3942, 0.1705, 0.4091]}, {"w": "was", "b": [0.1767, 0.3942, 0.206, 0.4091]}, {"w": "clicked,", "b": [0.2122, 0.3942, 0.2712, 0.4091]}, {"w": "and", "b": [0.2773, 0.3942, 0.307, 0.4091]}, {"w": "how", "b": [0.3132, 0.3942, 0.3455, 0.4091]}, {"w": "much", "b": [0.3516, 0.3942, 0.3947, 0.4091]}, {"w": "time", "b": [0.4009, 0.3942, 0.4367, 0.4091]}, {"w": "after", "b": [0.4429, 0.3942, 0.4804, 0.4091]}, {"w": "the", "b": [0.4865, 0.3942, 0.5122, 0.4091]}, {"w": "output", "b": [0.5183, 0.3942, 0.5726, 0.4091]}, {"w": "was", "b": [0.5788, 0.3942, 0.6081, 0.4091]}, {"w": "served.", "b": [0.6143, 0.3942, 0.6698, 0.4091]}]}, {"id": "b_7", "type": "paragraph", "text": "In large systems with thousands of users, where the model is served to each user hundreds of times a day, it can be prohibitive to log every event. It would be more practical to do stratified sampling. You first decide which groups of events you want to log, and then you log only a certain percentage of events in each group. The groups can be groups of users or groups of contexts. Users can be grouped by age, gender, or seniority with the service (new clients vs. long-time clients). The groups of contexts could be early-morning, business-day, and late-night interactions.", "words": [{"w": "In", "b": [0.1312, 0.421, 0.1484, 0.4361]}, {"w": "large", "b": [0.1545, 0.421, 0.194, 0.4361]}, {"w": "systems", "b": [0.2001, 0.421, 0.2632, 0.4361]}, {"w": "with", "b": [0.2693, 0.421, 0.3056, 0.4361]}, {"w": "thousands", "b": [0.3118, 0.421, 0.394, 0.4361]}, {"w": "of", "b": [0.4001, 0.421, 0.4151, 0.4361]}, {"w": "users,", "b": [0.4213, 0.421, 0.4672, 0.4361]}, {"w": "where", "b": [0.4734, 0.421, 0.5212, 0.4361]}, {"w": "the", "b": [0.5273, 0.421, 0.5532, 0.4361]}, {"w": "model", "b": [0.5594, 0.421, 0.6086, 0.4361]}, {"w": "is", "b": [0.6148, 0.421, 0.6273, 0.4361]}, {"w": "served", "b": [0.6335, 0.421, 0.6845, 0.4361]}, {"w": "to", "b": [0.6906, 0.421, 0.7072, 0.4361]}, {"w": "each", "b": [0.7133, 0.421, 0.7492, 0.4361]}, {"w": "user", "b": [0.7553, 0.421, 0.7887, 0.4361]}, {"w": "hundreds", "b": [0.7948, 0.421, 0.8692, 0.4361]}, {"w": "of", "b": [0.1312, 0.4389, 0.1464, 0.454]}, {"w": "times", "b": [0.1531, 0.4389, 0.1971, 0.454]}, {"w": "a", "b": [0.2038, 0.4389, 0.2132, 0.454]}, {"w": "day,", "b": [0.2199, 0.4389, 0.2529, 0.454]}, {"w": "it", "b": [0.2597, 0.4389, 0.2722, 0.454]}, {"w": "can", "b": [0.2789, 0.4389, 0.3071, 0.454]}, {"w": "be", "b": [0.3138, 0.4389, 0.3332, 0.454]}, {"w": "prohibitive", "b": [0.3399, 0.4389, 0.4288, 0.454]}, {"w": "to", "b": [0.4355, 0.4389, 0.4523, 0.454]}, {"w": "log", "b": [0.4589, 0.4389, 0.483, 0.454]}, {"w": "every", "b": [0.4896, 0.4389, 0.5331, 0.454]}, {"w": "event.", "b": [0.5398, 0.4389, 0.5885, 0.454]}, {"w": "It", "b": [0.5983, 0.4389, 0.6124, 0.454]}, {"w": "would", "b": [0.6191, 0.4389, 0.6677, 0.454]}, {"w": "be", "b": [0.6744, 0.4389, 0.6937, 0.454]}, {"w": "more", "b": [0.7004, 0.4389, 0.7412, 0.454]}, {"w": "practical", "b": [0.7479, 0.4389, 0.8191, 0.454]}, {"w": "to", "b": [0.8258, 0.4389, 0.8425, 0.454]}, {"w": "do", "b": [0.8492, 0.4389, 0.8691, 0.454]}, {"w": "stratified", "b": [0.1312, 0.457, 0.2144, 0.4719]}, {"w": "sampling.", "b": [0.2211, 0.457, 0.3086, 0.4719]}, {"w": "You", "b": [0.3167, 0.4571, 0.3478, 0.4719]}, {"w": "first", "b": [0.3537, 0.4571, 0.385, 0.4719]}, {"w": "decide", "b": [0.3909, 0.4571, 0.4401, 0.4719]}, {"w": "which", "b": [0.446, 0.4571, 0.4917, 0.4719]}, {"w": "groups", "b": [0.4976, 0.4571, 0.5499, 0.4719]}, {"w": "of", "b": [0.5558, 0.4571, 0.5704, 0.4719]}, {"w": "events", "b": [0.5762, 0.4571, 0.6251, 0.4719]}, {"w": "you", "b": [0.6309, 0.4571, 0.659, 0.4719]}, {"w": "want", "b": [0.6649, 0.4571, 0.7031, 0.4719]}, {"w": "to", "b": [0.7089, 0.4571, 0.725, 0.4719]}, {"w": "log,", "b": [0.7308, 0.4571, 0.759, 0.4719]}, {"w": "and", "b": [0.7649, 0.4571, 0.794, 0.4719]}, {"w": "then", "b": [0.7999, 0.4571, 0.835, 0.4719]}, {"w": "you", "b": [0.8409, 0.4571, 0.869, 0.4719]}, {"w": "log", "b": [0.1312, 0.4749, 0.1548, 0.4899]}, {"w": "only", "b": [0.1609, 0.4749, 0.1952, 0.4899]}, {"w": "a", "b": [0.2014, 0.4749, 0.2106, 0.4899]}, {"w": "certain", "b": [0.2168, 0.4749, 0.2721, 0.4899]}, {"w": "percentage", "b": [0.2782, 0.4749, 0.3643, 0.4899]}, {"w": "of", "b": [0.3704, 0.4749, 0.3853, 0.4899]}, {"w": "events", "b": [0.3915, 0.4749, 0.4412, 0.4899]}, {"w": "in", "b": [0.4474, 0.4749, 0.4627, 0.4899]}, {"w": "each", "b": [0.4689, 0.4749, 0.5042, 0.4899]}, {"w": "group.", "b": [0.5104, 0.4749, 0.5616, 0.4899]}, {"w": "The", "b": [0.5699, 0.4749, 0.6016, 0.4899]}, {"w": "groups", "b": [0.6077, 0.4749, 0.6611, 0.4899]}, {"w": "can", "b": [0.6673, 0.4749, 0.6949, 0.4899]}, {"w": "be", "b": [0.7011, 0.4749, 0.72, 0.4899]}, {"w": "groups", "b": [0.7262, 0.4749, 0.7796, 0.4899]}, {"w": "of", "b": [0.7857, 0.4749, 0.8006, 0.4899]}, {"w": "users", "b": [0.8067, 0.4749, 0.8469, 0.4899]}, {"w": "or", "b": [0.8531, 0.4749, 0.8695, 0.4899]}, {"w": "groups", "b": [0.1312, 0.4929, 0.1846, 0.5078]}, {"w": "of", "b": [0.1908, 0.4929, 0.2056, 0.5078]}, {"w": "contexts.", "b": [0.2118, 0.4929, 0.2835, 0.5078]}, {"w": "Users", "b": [0.2917, 0.4929, 0.3355, 0.5078]}, {"w": "can", "b": [0.3416, 0.4929, 0.3692, 0.5078]}, {"w": "be", "b": [0.3754, 0.4929, 0.3943, 0.5078]}, {"w": "grouped", "b": [0.4005, 0.4929, 0.4655, 0.5078]}, {"w": "by", "b": [0.4717, 0.4929, 0.4911, 0.5078]}, {"w": "age,", "b": [0.4973, 0.4929, 0.529, 0.5078]}, {"w": "gender,", "b": [0.5352, 0.4929, 0.5936, 0.5078]}, {"w": "or", "b": [0.5997, 0.4929, 0.6161, 0.5078]}, {"w": "seniority", "b": [0.6223, 0.4929, 0.691, 0.5078]}, {"w": "with", "b": [0.6972, 0.4929, 0.733, 0.5078]}, {"w": "the", "b": [0.7391, 0.4929, 0.7647, 0.5078]}, {"w": "service", "b": [0.7709, 0.4929, 0.8248, 0.5078]}, {"w": "(new", "b": [0.8309, 0.4929, 0.8698, 0.5078]}, {"w": "clients", "b": [0.1312, 0.5108, 0.1827, 0.5258]}, {"w": "vs.", "b": [0.1889, 0.5108, 0.2113, 0.5258]}, {"w": "long-time", "b": [0.2174, 0.5108, 0.2942, 0.5258]}, {"w": "clients).", "b": [0.3003, 0.5108, 0.3643, 0.5258]}, {"w": "The", "b": [0.3725, 0.5108, 0.4046, 0.5258]}, {"w": "groups", "b": [0.4108, 0.5108, 0.4649, 0.5258]}, {"w": "of", "b": [0.471, 0.5108, 0.4861, 0.5258]}, {"w": "contexts", "b": [0.4922, 0.5108, 0.5598, 0.5258]}, {"w": "could", "b": [0.5659, 0.5108, 0.6095, 0.5258]}, {"w": "be", "b": [0.6156, 0.5108, 0.6348, 0.5258]}, {"w": "early-morning,", "b": [0.641, 0.5108, 0.7599, 0.5258]}, {"w": "business-day,", "b": [0.766, 0.5108, 0.8717, 0.5258]}, {"w": "and", "b": [0.1312, 0.5288, 0.161, 0.5437]}, {"w": "late-night", "b": [0.1671, 0.5288, 0.2445, 0.5437]}, {"w": "interactions.", "b": [0.2507, 0.5288, 0.3498, 0.5437]}]}, {"id": "b_8", "type": "paragraph", "text": "When you store users’ activity data in logs, the users should know what, when, and how it", "words": [{"w": "When", "b": [0.1303, 0.5557, 0.1783, 0.5707]}, {"w": "you", "b": [0.1845, 0.5557, 0.2134, 0.5707]}, {"w": "store", "b": [0.2196, 0.5557, 0.259, 0.5707]}, {"w": "users’", "b": [0.2651, 0.5557, 0.3109, 0.5707]}, {"w": "activity", "b": [0.317, 0.5557, 0.3785, 0.5707]}, {"w": "data", "b": [0.3846, 0.5557, 0.4208, 0.5707]}, {"w": "in", "b": [0.4269, 0.5557, 0.4424, 0.5707]}, {"w": "logs,", "b": [0.4486, 0.5557, 0.4848, 0.5707]}, {"w": "the", "b": [0.491, 0.5557, 0.5168, 0.5707]}, {"w": "users", "b": [0.523, 0.5557, 0.5635, 0.5707]}, {"w": "should", "b": [0.5697, 0.5557, 0.6225, 0.5707]}, {"w": "know", "b": [0.6287, 0.5557, 0.671, 0.5707]}, {"w": "what,", "b": [0.6771, 0.5557, 0.7226, 0.5707]}, {"w": "when,", "b": [0.7287, 0.5557, 0.7762, 0.5707]}, {"w": "and", "b": [0.7824, 0.5557, 0.8124, 0.5707]}, {"w": "how", "b": [0.8185, 0.5557, 0.851, 0.5707]}, {"w": "it", "b": [0.8572, 0.5557, 0.8696, 0.5707]}]}, {"id": "b_9", "type": "paragraph", "text": "is stored, and for how long. If possible, data should be anonymized or aggregated without loss of utility. Access to sensitive data must be restricted only to those assigned to solve a specific problem during a specific time period. Avoid letting any analyst access sensitive data to solve unrelated business problems. It could lead to legal problems.", "words": [{"w": "is", "b": [0.1312, 0.5735, 0.1439, 0.5886]}, {"w": "stored,", "b": [0.15, 0.5735, 0.2054, 0.5886]}, {"w": "and", "b": [0.2116, 0.5735, 0.2418, 0.5886]}, {"w": "for", "b": [0.2479, 0.5735, 0.2704, 0.5886]}, {"w": "how", "b": [0.2766, 0.5735, 0.3094, 0.5886]}, {"w": "long.", "b": [0.3155, 0.5735, 0.3551, 0.5886]}, {"w": "If", "b": [0.3633, 0.5735, 0.3759, 0.5886]}, {"w": "possible,", "b": [0.382, 0.5735, 0.4516, 0.5886]}, {"w": "data", "b": [0.4577, 0.5735, 0.4942, 0.5886]}, {"w": "should", "b": [0.5003, 0.5735, 0.5536, 0.5886]}, {"w": "be", "b": [0.5597, 0.5735, 0.579, 0.5886]}, {"w": "anonymized", "b": [0.5852, 0.5735, 0.6822, 0.5886]}, {"w": "or", "b": [0.6883, 0.5735, 0.705, 0.5886]}, {"w": "aggregated", "b": [0.7112, 0.5735, 0.7998, 0.5886]}, {"w": "without", "b": [0.806, 0.5735, 0.8696, 0.5886]}, {"w": "loss", "b": [0.1312, 0.5915, 0.1606, 0.6066]}, {"w": "of", "b": [0.1667, 0.5915, 0.1818, 0.6066]}, {"w": "utility.", "b": [0.188, 0.5915, 0.2415, 0.6066]}, {"w": "Access", "b": [0.2498, 0.5915, 0.303, 0.6066]}, {"w": "to", "b": [0.3092, 0.5915, 0.3258, 0.6066]}, {"w": "sensitive", "b": [0.332, 0.5915, 0.4008, 0.6066]}, {"w": "data", "b": [0.407, 0.5915, 0.4434, 0.6066]}, {"w": "must", "b": [0.4495, 0.5915, 0.4897, 0.6066]}, {"w": "be", "b": [0.4958, 0.5915, 0.5151, 0.6066]}, {"w": "restricted", "b": [0.5212, 0.5915, 0.5984, 0.6066]}, {"w": "only", "b": [0.6046, 0.5915, 0.6394, 0.6066]}, {"w": "to", "b": [0.6456, 0.5915, 0.6622, 0.6066]}, {"w": "those", "b": [0.6683, 0.5915, 0.7111, 0.6066]}, {"w": "assigned", "b": [0.7172, 0.5915, 0.7851, 0.6066]}, {"w": "to", "b": [0.7912, 0.5915, 0.8078, 0.6066]}, {"w": "solve", "b": [0.814, 0.5915, 0.8536, 0.6066]}, {"w": "a", "b": [0.8598, 0.5915, 0.8692, 0.6066]}, {"w": "specific", "b": [0.1312, 0.6097, 0.1882, 0.6245]}, {"w": "problem", "b": [0.194, 0.6097, 0.2584, 0.6245]}, {"w": "during", "b": [0.2643, 0.6097, 0.3156, 0.6245]}, {"w": "a", "b": [0.3215, 0.6097, 0.3305, 0.6245]}, {"w": "specific", "b": [0.3364, 0.6097, 0.3933, 0.6245]}, {"w": "time", "b": [0.3992, 0.6097, 0.4344, 0.6245]}, {"w": "period.", "b": [0.4403, 0.6097, 0.4956, 0.6245]}, {"w": "Avoid", "b": [0.5037, 0.6097, 0.5484, 0.6245]}, {"w": "letting", "b": [0.5543, 0.6097, 0.6056, 0.6245]}, {"w": "any", "b": [0.6114, 0.6097, 0.6396, 0.6245]}, {"w": "analyst", "b": [0.6455, 0.6097, 0.7023, 0.6245]}, {"w": "access", "b": [0.7082, 0.6097, 0.7557, 0.6245]}, {"w": "sensitive", "b": [0.7616, 0.6097, 0.8281, 0.6245]}, {"w": "data", "b": [0.834, 0.6097, 0.8692, 0.6245]}, {"w": "to", "b": [0.1312, 0.6275, 0.1476, 0.6424]}, {"w": "solve", "b": [0.1538, 0.6275, 0.1929, 0.6424]}, {"w": "unrelated", "b": [0.199, 0.6275, 0.275, 0.6424]}, {"w": "business", "b": [0.2811, 0.6275, 0.3471, 0.6424]}, {"w": "problems.", "b": [0.3532, 0.6275, 0.4313, 0.6424]}, {"w": "It", "b": [0.4395, 0.6275, 0.4534, 0.6424]}, {"w": "could", "b": [0.4595, 0.6275, 0.5026, 0.6424]}, {"w": "lead", "b": [0.5087, 0.6275, 0.5415, 0.6424]}, {"w": "to", "b": [0.5477, 0.6275, 0.5641, 0.6424]}, {"w": "legal", "b": [0.5703, 0.6275, 0.6072, 0.6424]}, {"w": "problems.", "b": [0.6133, 0.6275, 0.6914, 0.6424]}]}, {"id": "b_10", "type": "paragraph", "text": "Make sure users may opt-out from logging and analysis of their activity data. Different data retention policies will apply to different countries. Each country imposes its own restrictions on what can and cannot be stored about their citizens, or used for analysis.", "words": [{"w": "Make", "b": [0.1312, 0.6545, 0.1742, 0.6693]}, {"w": "sure", "b": [0.1803, 0.6545, 0.2128, 0.6693]}, {"w": "users", "b": [0.219, 0.6545, 0.2586, 0.6693]}, {"w": "may", "b": [0.2648, 0.6545, 0.2981, 0.6693]}, {"w": "opt-out", "b": [0.3043, 0.6545, 0.3628, 0.6693]}, {"w": "from", "b": [0.369, 0.6545, 0.4059, 0.6693]}, {"w": "logging", "b": [0.4121, 0.6545, 0.4686, 0.6693]}, {"w": "and", "b": [0.4748, 0.6545, 0.5041, 0.6693]}, {"w": "analysis", "b": [0.5103, 0.6545, 0.5726, 0.6693]}, {"w": "of", "b": [0.5787, 0.6545, 0.5934, 0.6693]}, {"w": "their", "b": [0.5996, 0.6545, 0.637, 0.6693]}, {"w": "activity", "b": [0.6432, 0.6545, 0.7032, 0.6693]}, {"w": "data.", "b": [0.7094, 0.6545, 0.7498, 0.6693]}, {"w": "Different", "b": [0.7581, 0.6545, 0.8275, 0.6693]}, {"w": "data", "b": [0.8337, 0.6545, 0.8691, 0.6693]}, {"w": "retention", "b": [0.1312, 0.6724, 0.2026, 0.6873]}, {"w": "policies", "b": [0.2087, 0.6724, 0.267, 0.6873]}, {"w": "will", "b": [0.2731, 0.6724, 0.3014, 0.6873]}, {"w": "apply", "b": [0.3076, 0.6724, 0.3516, 0.6873]}, {"w": "to", "b": [0.3577, 0.6724, 0.3739, 0.6873]}, {"w": "different", "b": [0.38, 0.6724, 0.4458, 0.6873]}, {"w": "countries.", "b": [0.452, 0.6724, 0.5285, 0.6873]}, {"w": "Each", "b": [0.5367, 0.6724, 0.5759, 0.6873]}, {"w": "country", "b": [0.582, 0.6724, 0.6427, 0.6873]}, {"w": "imposes", "b": [0.6489, 0.6724, 0.7113, 0.6873]}, {"w": "its", "b": [0.7174, 0.6724, 0.7367, 0.6873]}, {"w": "own", "b": [0.7429, 0.6724, 0.7747, 0.6873]}, {"w": "restrictions", "b": [0.7809, 0.6724, 0.8692, 0.6873]}, {"w": "on", "b": [0.1312, 0.6903, 0.1507, 0.7053]}, {"w": "what", "b": [0.1569, 0.6903, 0.1968, 0.7053]}, {"w": "can", "b": [0.203, 0.6903, 0.2307, 0.7053]}, {"w": "and", "b": [0.2368, 0.6903, 0.2666, 0.7053]}, {"w": "cannot", "b": [0.2727, 0.6903, 0.3271, 0.7053]}, {"w": "be", "b": [0.3332, 0.6903, 0.3522, 0.7053]}, {"w": "stored", "b": [0.3583, 0.6903, 0.4077, 0.7053]}, {"w": "about", "b": [0.4139, 0.6903, 0.4605, 0.7053]}, {"w": "their", "b": [0.4667, 0.6903, 0.5047, 0.7053]}, {"w": "citizens,", "b": [0.5108, 0.6903, 0.5756, 0.7053]}, {"w": "or", "b": [0.5817, 0.6903, 0.5982, 0.7053]}, {"w": "used", "b": [0.6043, 0.6903, 0.6403, 0.7053]}, {"w": "for", "b": [0.6465, 0.6903, 0.6686, 0.7053]}, {"w": "analysis.", "b": [0.6747, 0.6903, 0.7431, 0.7053]}]}, {"id": "b_11", "type": "paragraph", "text": "9.4.4 Monitor for Abuse", "words": [{"w": "9.4.4", "b": [0.1312, 0.7381, 0.1749, 0.7531]}, {"w": "Monitor", "b": [0.1961, 0.7381, 0.2721, 0.7531]}, {"w": "for", "b": [0.2792, 0.7381, 0.305, 0.7531]}, {"w": "Abuse", "b": [0.3121, 0.7381, 0.3698, 0.7531]}]}, {"id": "b_12", "type": "paragraph", "text": "Some people or organizations may use your model for their own business. Such users might send millions of daily requests, while a typical user would only send a dozen. Alternatively, some users might want to reverse-engineer the training data, or learn how to make the model produce a desired output.", "words": [{"w": "Some", "b": [0.1312, 0.7747, 0.1743, 0.7897]}, {"w": "people", "b": [0.1804, 0.7747, 0.2321, 0.7897]}, {"w": "or", "b": [0.2382, 0.7747, 0.2547, 0.7897]}, {"w": "organizations", "b": [0.2608, 0.7747, 0.3675, 0.7897]}, {"w": "may", "b": [0.3736, 0.7747, 0.4074, 0.7897]}, {"w": "use", "b": [0.4135, 0.7747, 0.4393, 0.7897]}, {"w": "your", "b": [0.4454, 0.7747, 0.4813, 0.7897]}, {"w": "model", "b": [0.4874, 0.7747, 0.5361, 0.7897]}, {"w": "for", "b": [0.5422, 0.7747, 0.5643, 0.7897]}, {"w": "their", "b": [0.5704, 0.7747, 0.6084, 0.7897]}, {"w": "own", "b": [0.6145, 0.7747, 0.6468, 0.7897]}, {"w": "business.", "b": [0.6529, 0.7747, 0.7239, 0.7897]}, {"w": "Such", "b": [0.7321, 0.7747, 0.7705, 0.7897]}, {"w": "users", "b": [0.7767, 0.7747, 0.8169, 0.7897]}, {"w": "might", "b": [0.823, 0.7747, 0.8696, 0.7897]}, {"w": "send", "b": [0.1312, 0.7926, 0.1674, 0.8076]}, {"w": "millions", "b": [0.1735, 0.7926, 0.2364, 0.8076]}, {"w": "of", "b": [0.2426, 0.7926, 0.2575, 0.8076]}, {"w": "daily", "b": [0.2636, 0.7926, 0.3033, 0.8076]}, {"w": "requests,", "b": [0.3094, 0.7926, 0.3802, 0.8076]}, {"w": "while", "b": [0.3863, 0.7926, 0.4285, 0.8076]}, {"w": "a", "b": [0.4347, 0.7926, 0.4439, 0.8076]}, {"w": "typical", "b": [0.4501, 0.7926, 0.5046, 0.8076]}, {"w": "user", "b": [0.5108, 0.7926, 0.5439, 0.8076]}, {"w": "would", "b": [0.55, 0.7926, 0.5979, 0.8076]}, {"w": "only", "b": [0.604, 0.7926, 0.6385, 0.8076]}, {"w": "send", "b": [0.6446, 0.7926, 0.6808, 0.8076]}, {"w": "a", "b": [0.6869, 0.7926, 0.6962, 0.8076]}, {"w": "dozen.", "b": [0.7023, 0.7926, 0.7538, 0.8076]}, {"w": "Alternatively,", "b": [0.762, 0.7926, 0.8717, 0.8076]}, {"w": "some", "b": [0.1312, 0.8107, 0.1705, 0.8255]}, {"w": "users", "b": [0.1764, 0.8107, 0.2159, 0.8255]}, {"w": "might", "b": [0.2218, 0.8107, 0.2675, 0.8255]}, {"w": "want", "b": [0.2734, 0.8107, 0.3115, 0.8255]}, {"w": "to", "b": [0.3174, 0.8107, 0.3335, 0.8255]}, {"w": "reverse-engineer", "b": [0.3394, 0.8107, 0.4653, 0.8255]}, {"w": "the", "b": [0.4712, 0.8107, 0.4963, 0.8255]}, {"w": "training", "b": [0.5022, 0.8107, 0.5645, 0.8255]}, {"w": "data,", "b": [0.5704, 0.8107, 0.6106, 0.8255]}, {"w": "or", "b": [0.6166, 0.8107, 0.6327, 0.8255]}, {"w": "learn", "b": [0.6386, 0.8107, 0.6779, 0.8255]}, {"w": "how", "b": [0.6837, 0.8107, 0.7154, 0.8255]}, {"w": "to", "b": [0.7213, 0.8107, 0.7373, 0.8255]}, {"w": "make", "b": [0.7432, 0.8107, 0.7844, 0.8255]}, {"w": "the", "b": [0.7903, 0.8107, 0.8154, 0.8255]}, {"w": "model", "b": [0.8213, 0.8107, 0.8691, 0.8255]}, {"w": "produce", "b": [0.1312, 0.8286, 0.1954, 0.8435]}, {"w": "a", "b": [0.2015, 0.8286, 0.2108, 0.8435]}, {"w": "desired", "b": [0.2169, 0.8286, 0.2735, 0.8435]}, {"w": "output.", "b": [0.2796, 0.8286, 0.3391, 0.8435]}]}, {"id": "b_13", "type": "paragraph", "text": "Ways to prevent such abuse include,", "words": [{"w": "Ways", "b": [0.1303, 0.8555, 0.1735, 0.8704]}, {"w": "to", "b": [0.1796, 0.8555, 0.196, 0.8704]}, {"w": "prevent", "b": [0.2022, 0.8555, 0.2622, 0.8704]}, {"w": "such", "b": [0.2684, 0.8555, 0.3039, 0.8704]}, {"w": "abuse", "b": [0.31, 0.8555, 0.3552, 0.8704]}, {"w": "include,", "b": [0.3614, 0.8555, 0.424, 0.8704]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 18", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "18", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 282, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "• making users pay per request, • creating progressively longer pauses before responding to requests, or even • blocking some users.", "words": [{"w": "•", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "making", "b": [0.1774, 0.0884, 0.2363, 0.1033]}, {"w": "users", "b": [0.2424, 0.0884, 0.2827, 0.1033]}, {"w": "pay", "b": [0.2889, 0.0884, 0.3176, 0.1033]}, {"w": "per", "b": [0.3237, 0.0884, 0.35, 0.1033]}, {"w": "request,", "b": [0.3561, 0.0884, 0.4193, 0.1033]}, {"w": "•", "b": [0.1538, 0.1063, 0.1681, 0.1213]}, {"w": "creating", "b": [0.1774, 0.1063, 0.242, 0.1213]}, {"w": "progressively", "b": [0.2482, 0.1063, 0.3516, 0.1213]}, {"w": "longer", "b": [0.3577, 0.1063, 0.407, 0.1213]}, {"w": "pauses", "b": [0.4131, 0.1063, 0.4656, 0.1213]}, {"w": "before", "b": [0.4718, 0.1063, 0.5211, 0.1213]}, {"w": "responding", "b": [0.5272, 0.1063, 0.6151, 0.1213]}, {"w": "to", "b": [0.6212, 0.1063, 0.6376, 0.1213]}, {"w": "requests,", "b": [0.6438, 0.1063, 0.7143, 0.1213]}, {"w": "or", "b": [0.7205, 0.1063, 0.7369, 0.1213]}, {"w": "even", "b": [0.7431, 0.1063, 0.779, 0.1213]}, {"w": "•", "b": [0.1538, 0.1243, 0.1681, 0.1392]}, {"w": "blocking", "b": [0.1774, 0.1243, 0.2445, 0.1392]}, {"w": "some", "b": [0.2507, 0.1243, 0.2908, 0.1392]}, {"w": "users.", "b": [0.2969, 0.1243, 0.3423, 0.1392]}]}, {"id": "b_1", "type": "paragraph", "text": "To reach their own business goals, some attackers might try to manipulate your model. An attacker might submit data that changes the model in a way that only benefits the attacker. As a result, the overall quality of the model might degrade.", "words": [{"w": "To", "b": [0.1306, 0.1512, 0.1516, 0.1662]}, {"w": "reach", "b": [0.1578, 0.1512, 0.2005, 0.1662]}, {"w": "their", "b": [0.2066, 0.1512, 0.2447, 0.1662]}, {"w": "own", "b": [0.2509, 0.1512, 0.2832, 0.1662]}, {"w": "business", "b": [0.2894, 0.1512, 0.3555, 0.1662]}, {"w": "goals,", "b": [0.3616, 0.1512, 0.407, 0.1662]}, {"w": "some", "b": [0.4131, 0.1512, 0.4533, 0.1662]}, {"w": "attackers", "b": [0.4594, 0.1512, 0.532, 0.1662]}, {"w": "might", "b": [0.5382, 0.1512, 0.5849, 0.1662]}, {"w": "try", "b": [0.5911, 0.1512, 0.6153, 0.1662]}, {"w": "to", "b": [0.6214, 0.1512, 0.6379, 0.1662]}, {"w": "manipulate", "b": [0.644, 0.1512, 0.7344, 0.1662]}, {"w": "your", "b": [0.7406, 0.1512, 0.7766, 0.1662]}, {"w": "model.", "b": [0.7828, 0.1512, 0.8367, 0.1662]}, {"w": "An", "b": [0.8449, 0.1512, 0.8691, 0.1662]}, {"w": "attacker", "b": [0.1312, 0.1692, 0.1957, 0.1841]}, {"w": "might", "b": [0.2019, 0.1692, 0.2481, 0.1841]}, {"w": "submit", "b": [0.2542, 0.1692, 0.3092, 0.1841]}, {"w": "data", "b": [0.3153, 0.1692, 0.3508, 0.1841]}, {"w": "that", "b": [0.357, 0.1692, 0.3905, 0.1841]}, {"w": "changes", "b": [0.3966, 0.1692, 0.4582, 0.1841]}, {"w": "the", "b": [0.4643, 0.1692, 0.4897, 0.1841]}, {"w": "model", "b": [0.4959, 0.1692, 0.5441, 0.1841]}, {"w": "in", "b": [0.5502, 0.1692, 0.5655, 0.1841]}, {"w": "a", "b": [0.5716, 0.1692, 0.5807, 0.1841]}, {"w": "way", "b": [0.5869, 0.1692, 0.6178, 0.1841]}, {"w": "that", "b": [0.624, 0.1692, 0.6575, 0.1841]}, {"w": "only", "b": [0.6637, 0.1692, 0.6977, 0.1841]}, {"w": "benefits", "b": [0.7038, 0.1692, 0.7654, 0.1841]}, {"w": "the", "b": [0.7715, 0.1692, 0.7969, 0.1841]}, {"w": "attacker.", "b": [0.8031, 0.1692, 0.8726, 0.1841]}, {"w": "As", "b": [0.1305, 0.1871, 0.1517, 0.2021]}, {"w": "a", "b": [0.1578, 0.1871, 0.167, 0.2021]}, {"w": "result,", "b": [0.1732, 0.1871, 0.2236, 0.2021]}, {"w": "the", "b": [0.2298, 0.1871, 0.2554, 0.2021]}, {"w": "overall", "b": [0.2615, 0.1871, 0.3144, 0.2021]}, {"w": "quality", "b": [0.3206, 0.1871, 0.3764, 0.2021]}, {"w": "of", "b": [0.3826, 0.1871, 0.3975, 0.2021]}, {"w": "the", "b": [0.4036, 0.1871, 0.4292, 0.2021]}, {"w": "model", "b": [0.4354, 0.1871, 0.4841, 0.2021]}, {"w": "might", "b": [0.4903, 0.1871, 0.5369, 0.2021]}, {"w": "degrade.", "b": [0.543, 0.1871, 0.6108, 0.2021]}]}, {"id": "b_2", "type": "paragraph", "text": "Ways to prevent such abuse include,", "words": [{"w": "Ways", "b": [0.1303, 0.214, 0.1735, 0.229]}, {"w": "to", "b": [0.1796, 0.214, 0.196, 0.229]}, {"w": "prevent", "b": [0.2022, 0.214, 0.2622, 0.229]}, {"w": "such", "b": [0.2684, 0.214, 0.3039, 0.229]}, {"w": "abuse", "b": [0.31, 0.214, 0.3552, 0.229]}, {"w": "include,", "b": [0.3614, 0.214, 0.424, 0.229]}]}, {"id": "b_3", "type": "paragraph", "text": "• not trusting the data from a user unless similar data comes from multiple users, • assigning a reputation score to each user, and not trusting the data obtained from users with low reputations, and • classifying user behavior as either normal or abnormal, and not accepting the data coming from users demonstrating abnormal behavior.", "words": [{"w": "•", "b": [0.1538, 0.2409, 0.1681, 0.2559]}, {"w": "not", "b": [0.1774, 0.2409, 0.204, 0.2559]}, {"w": "trusting", "b": [0.2102, 0.2409, 0.2739, 0.2559]}, {"w": "the", "b": [0.28, 0.2409, 0.3057, 0.2559]}, {"w": "data", "b": [0.3119, 0.2409, 0.3477, 0.2559]}, {"w": "from", "b": [0.3539, 0.2409, 0.3914, 0.2559]}, {"w": "a", "b": [0.3975, 0.2409, 0.4067, 0.2559]}, {"w": "user", "b": [0.4129, 0.2409, 0.4458, 0.2559]}, {"w": "unless", "b": [0.452, 0.2409, 0.5004, 0.2559]}, {"w": "similar", "b": [0.5066, 0.2409, 0.5611, 0.2559]}, {"w": "data", "b": [0.5672, 0.2409, 0.6031, 0.2559]}, {"w": "comes", "b": [0.6093, 0.2409, 0.6576, 0.2559]}, {"w": "from", "b": [0.6637, 0.2409, 0.7012, 0.2559]}, {"w": "multiple", "b": [0.7073, 0.2409, 0.7735, 0.2559]}, {"w": "users,", "b": [0.7796, 0.2409, 0.825, 0.2559]}, {"w": "•", "b": [0.1538, 0.2589, 0.1681, 0.2738]}, {"w": "assigning", "b": [0.1774, 0.259, 0.2489, 0.2738]}, {"w": "a", "b": [0.2545, 0.259, 0.2636, 0.2738]}, {"w": "reputation", "b": [0.2692, 0.259, 0.3516, 0.2738]}, {"w": "score", "b": [0.3573, 0.259, 0.3966, 0.2738]}, {"w": "to", "b": [0.4022, 0.259, 0.4183, 0.2738]}, {"w": "each", "b": [0.4239, 0.259, 0.4586, 0.2738]}, {"w": "user,", "b": [0.4642, 0.259, 0.5016, 0.2738]}, {"w": "and", "b": [0.5073, 0.259, 0.5364, 0.2738]}, {"w": "not", "b": [0.542, 0.259, 0.5681, 0.2738]}, {"w": "trusting", "b": [0.5738, 0.259, 0.6362, 0.2738]}, {"w": "the", "b": [0.6418, 0.259, 0.667, 0.2738]}, {"w": "data", "b": [0.6726, 0.259, 0.7077, 0.2738]}, {"w": "obtained", "b": [0.7134, 0.259, 0.7817, 0.2738]}, {"w": "from", "b": [0.7873, 0.259, 0.824, 0.2738]}, {"w": "users", "b": [0.8296, 0.259, 0.8691, 0.2738]}, {"w": "with", "b": [0.1767, 0.2768, 0.2126, 0.2918]}, {"w": "low", "b": [0.2187, 0.2768, 0.2459, 0.2918]}, {"w": "reputations,", "b": [0.252, 0.2768, 0.3486, 0.2918]}, {"w": "and", "b": [0.3547, 0.2768, 0.3845, 0.2918]}, {"w": "•", "b": [0.1538, 0.2948, 0.1681, 0.3097]}, {"w": "classifying", "b": [0.1774, 0.2947, 0.2613, 0.3098]}, {"w": "user", "b": [0.2683, 0.2947, 0.302, 0.3098]}, {"w": "behavior", "b": [0.309, 0.2947, 0.3797, 0.3098]}, {"w": "as", "b": [0.3867, 0.2947, 0.4036, 0.3098]}, {"w": "either", "b": [0.4106, 0.2947, 0.4577, 0.3098]}, {"w": "normal", "b": [0.4648, 0.2947, 0.5224, 0.3098]}, {"w": "or", "b": [0.5294, 0.2947, 0.5462, 0.3098]}, {"w": "abnormal,", "b": [0.5533, 0.2947, 0.6359, 0.3098]}, {"w": "and", "b": [0.6432, 0.2947, 0.6735, 0.3098]}, {"w": "not", "b": [0.6806, 0.2947, 0.7078, 0.3098]}, {"w": "accepting", "b": [0.7148, 0.2947, 0.7922, 0.3098]}, {"w": "the", "b": [0.7993, 0.2947, 0.8254, 0.3098]}, {"w": "data", "b": [0.8325, 0.2947, 0.8691, 0.3098]}, {"w": "coming", "b": [0.1774, 0.3127, 0.2348, 0.3277]}, {"w": "from", "b": [0.2409, 0.3127, 0.2784, 0.3277]}, {"w": "users", "b": [0.2845, 0.3127, 0.3248, 0.3277]}, {"w": "demonstrating", "b": [0.331, 0.3127, 0.447, 0.3277]}, {"w": "abnormal", "b": [0.4531, 0.3127, 0.529, 0.3277]}, {"w": "behavior.", "b": [0.5352, 0.3127, 0.6096, 0.3277]}]}, {"id": "b_4", "type": "paragraph", "text": "The attackers will try to bypass your defence by adapting their behavior. To effectively defend your system, update your models regularly. Add both new data and new features that detect fraudulent transactions.", "words": [{"w": "The", "b": [0.1306, 0.3395, 0.163, 0.3546]}, {"w": "attackers", "b": [0.1704, 0.3395, 0.2443, 0.3546]}, {"w": "will", "b": [0.2518, 0.3395, 0.281, 0.3546]}, {"w": "try", "b": [0.2885, 0.3395, 0.3131, 0.3546]}, {"w": "to", "b": [0.3205, 0.3395, 0.3372, 0.3546]}, {"w": "bypass", "b": [0.3446, 0.3395, 0.3993, 0.3546]}, {"w": "your", "b": [0.4067, 0.3395, 0.4433, 0.3546]}, {"w": "defence", "b": [0.4508, 0.3395, 0.5109, 0.3546]}, {"w": "by", "b": [0.5184, 0.3395, 0.5382, 0.3546]}, {"w": "adapting", "b": [0.5457, 0.3395, 0.6178, 0.3546]}, {"w": "their", "b": [0.6252, 0.3395, 0.664, 0.3546]}, {"w": "behavior.", "b": [0.6714, 0.3395, 0.7473, 0.3546]}, {"w": "To", "b": [0.7593, 0.3395, 0.7808, 0.3546]}, {"w": "effectively", "b": [0.7882, 0.3395, 0.8698, 0.3546]}, {"w": "defend", "b": [0.1312, 0.3575, 0.1851, 0.3726]}, {"w": "your", "b": [0.1918, 0.3575, 0.2284, 0.3726]}, {"w": "system,", "b": [0.2351, 0.3575, 0.2965, 0.3726]}, {"w": "update", "b": [0.3033, 0.3575, 0.3603, 0.3726]}, {"w": "your", "b": [0.3669, 0.3575, 0.4036, 0.3726]}, {"w": "models", "b": [0.4103, 0.3575, 0.4674, 0.3726]}, {"w": "regularly.", "b": [0.474, 0.3575, 0.5505, 0.3726]}, {"w": "Add", "b": [0.5602, 0.3575, 0.5947, 0.3726]}, {"w": "both", "b": [0.6014, 0.3575, 0.6396, 0.3726]}, {"w": "new", "b": [0.6462, 0.3575, 0.6786, 0.3726]}, {"w": "data", "b": [0.6853, 0.3575, 0.7219, 0.3726]}, {"w": "and", "b": [0.7285, 0.3575, 0.7589, 0.3726]}, {"w": "new", "b": [0.7655, 0.3575, 0.798, 0.3726]}, {"w": "features", "b": [0.8046, 0.3575, 0.8691, 0.3726]}, {"w": "that", "b": [0.1312, 0.3755, 0.1651, 0.3905]}, {"w": "detect", "b": [0.1712, 0.3755, 0.2205, 0.3905]}, {"w": "fraudulent", "b": [0.2266, 0.3755, 0.3097, 0.3905]}, {"w": "transactions.", "b": [0.3159, 0.3755, 0.4187, 0.3905]}]}, {"id": "b_5", "type": "paragraph", "text": "9.5 Model Maintenance", "words": [{"w": "9.5", "b": [0.1312, 0.4237, 0.1631, 0.4416]}, {"w": "Model", "b": [0.188, 0.4237, 0.2569, 0.4416]}, {"w": "Maintenance", "b": [0.2652, 0.4237, 0.4043, 0.4416]}]}, {"id": "b_6", "type": "paragraph", "text": "Most production models must be regularly updated. The rate depends on several factors:", "words": [{"w": "Most", "b": [0.1312, 0.4626, 0.1718, 0.4775]}, {"w": "production", "b": [0.178, 0.4626, 0.2657, 0.4775]}, {"w": "models", "b": [0.2719, 0.4626, 0.3279, 0.4775]}, {"w": "must", "b": [0.334, 0.4626, 0.3736, 0.4775]}, {"w": "be", "b": [0.3797, 0.4626, 0.3987, 0.4775]}, {"w": "regularly", "b": [0.4049, 0.4626, 0.4762, 0.4775]}, {"w": "updated.", "b": [0.4824, 0.4626, 0.5537, 0.4775]}, {"w": "The", "b": [0.5619, 0.4626, 0.5937, 0.4775]}, {"w": "rate", "b": [0.5998, 0.4626, 0.6317, 0.4775]}, {"w": "depends", "b": [0.6378, 0.4626, 0.703, 0.4775]}, {"w": "on", "b": [0.7092, 0.4626, 0.7287, 0.4775]}, {"w": "several", "b": [0.7348, 0.4626, 0.7893, 0.4775]}, {"w": "factors:", "b": [0.7955, 0.4626, 0.8546, 0.4775]}]}, {"id": "b_7", "type": "paragraph", "text": "• how often it makes errors and how critical they are, • how “fresh” the model should be, so as to be useful, • how fast new training data becomes available, • how much time it takes to retrain a model, • how costly it is to deploy the model, and • how much a model update contributes to the product and the achievement of user goals.", "words": [{"w": "•", "b": [0.1538, 0.4895, 0.1681, 0.5044]}, {"w": "how", "b": [0.1774, 0.4895, 0.2096, 0.5044]}, {"w": "often", "b": [0.2158, 0.4895, 0.2563, 0.5044]}, {"w": "it", "b": [0.2625, 0.4895, 0.2748, 0.5044]}, {"w": "makes", "b": [0.2809, 0.4895, 0.3302, 0.5044]}, {"w": "errors", "b": [0.3364, 0.4895, 0.3828, 0.5044]}, {"w": "and", "b": [0.389, 0.4895, 0.4187, 0.5044]}, {"w": "how", "b": [0.4248, 0.4895, 0.4571, 0.5044]}, {"w": "critical", "b": [0.4633, 0.4895, 0.5187, 0.5044]}, {"w": "they", "b": [0.5248, 0.4895, 0.5602, 0.5044]}, {"w": "are,", "b": [0.5664, 0.4895, 0.5962, 0.5044]}, {"w": "•", "b": [0.1538, 0.5074, 0.1681, 0.5224]}, {"w": "how", "b": [0.1774, 0.5074, 0.2096, 0.5224]}, {"w": "“fresh”", "b": [0.2158, 0.5074, 0.2718, 0.5224]}, {"w": "the", "b": [0.278, 0.5074, 0.3036, 0.5224]}, {"w": "model", "b": [0.3098, 0.5074, 0.3585, 0.5224]}, {"w": "should", "b": [0.3646, 0.5074, 0.4171, 0.5224]}, {"w": "be,", "b": [0.4232, 0.5074, 0.4473, 0.5224]}, {"w": "so", "b": [0.4535, 0.5074, 0.47, 0.5224]}, {"w": "as", "b": [0.4761, 0.5074, 0.4926, 0.5224]}, {"w": "to", "b": [0.4988, 0.5074, 0.5152, 0.5224]}, {"w": "be", "b": [0.5213, 0.5074, 0.5403, 0.5224]}, {"w": "useful,", "b": [0.5465, 0.5074, 0.5984, 0.5224]}, {"w": "•", "b": [0.1538, 0.5254, 0.1681, 0.5403]}, {"w": "how", "b": [0.1774, 0.5254, 0.2096, 0.5403]}, {"w": "fast", "b": [0.2158, 0.5254, 0.2451, 0.5403]}, {"w": "new", "b": [0.2513, 0.5254, 0.2831, 0.5403]}, {"w": "training", "b": [0.2892, 0.5254, 0.3528, 0.5403]}, {"w": "data", "b": [0.359, 0.5254, 0.3949, 0.5403]}, {"w": "becomes", "b": [0.401, 0.5254, 0.4683, 0.5403]}, {"w": "available,", "b": [0.4744, 0.5254, 0.5493, 0.5403]}, {"w": "•", "b": [0.1538, 0.5433, 0.1681, 0.5583]}, {"w": "how", "b": [0.1774, 0.5433, 0.2096, 0.5583]}, {"w": "much", "b": [0.2158, 0.5433, 0.2589, 0.5583]}, {"w": "time", "b": [0.265, 0.5433, 0.3009, 0.5583]}, {"w": "it", "b": [0.307, 0.5433, 0.3193, 0.5583]}, {"w": "takes", "b": [0.3255, 0.5433, 0.3666, 0.5583]}, {"w": "to", "b": [0.3728, 0.5433, 0.3892, 0.5583]}, {"w": "retrain", "b": [0.3953, 0.5433, 0.4498, 0.5583]}, {"w": "a", "b": [0.4559, 0.5433, 0.4652, 0.5583]}, {"w": "model,", "b": [0.4713, 0.5433, 0.5251, 0.5583]}, {"w": "•", "b": [0.1538, 0.5613, 0.1681, 0.5762]}, {"w": "how", "b": [0.1774, 0.5613, 0.2096, 0.5762]}, {"w": "costly", "b": [0.2158, 0.5613, 0.2626, 0.5762]}, {"w": "it", "b": [0.2687, 0.5613, 0.281, 0.5762]}, {"w": "is", "b": [0.2872, 0.5613, 0.2996, 0.5762]}, {"w": "to", "b": [0.3057, 0.5613, 0.3221, 0.5762]}, {"w": "deploy", "b": [0.3283, 0.5613, 0.3806, 0.5762]}, {"w": "the", "b": [0.3867, 0.5613, 0.4124, 0.5762]}, {"w": "model,", "b": [0.4185, 0.5613, 0.4724, 0.5762]}, {"w": "and", "b": [0.4785, 0.5613, 0.5082, 0.5762]}, {"w": "•", "b": [0.1538, 0.5792, 0.1681, 0.5942]}, {"w": "how", "b": [0.1774, 0.5793, 0.209, 0.5941]}, {"w": "much", "b": [0.2145, 0.5793, 0.2567, 0.5941]}, {"w": "a", "b": [0.2622, 0.5793, 0.2712, 0.5941]}, {"w": "model", "b": [0.2767, 0.5793, 0.3244, 0.5941]}, {"w": "update", "b": [0.3299, 0.5793, 0.3847, 0.5941]}, {"w": "contributes", "b": [0.3902, 0.5793, 0.4783, 0.5941]}, {"w": "to", "b": [0.4838, 0.5793, 0.4998, 0.5941]}, {"w": "the", "b": [0.5053, 0.5793, 0.5304, 0.5941]}, {"w": "product", "b": [0.5359, 0.5793, 0.5978, 0.5941]}, {"w": "and", "b": [0.6033, 0.5793, 0.6324, 0.5941]}, {"w": "the", "b": [0.6379, 0.5793, 0.6631, 0.5941]}, {"w": "achievement", "b": [0.6685, 0.5793, 0.765, 0.5941]}, {"w": "of", "b": [0.7705, 0.5793, 0.7851, 0.5941]}, {"w": "user", "b": [0.7906, 0.5793, 0.8229, 0.5941]}, {"w": "goals.", "b": [0.8284, 0.5793, 0.8727, 0.5941]}]}, {"id": "b_8", "type": "paragraph", "text": "In this section, we talk about model maintenance: when and how to update the model after it’s deployed in production.", "words": [{"w": "In", "b": [0.1312, 0.6062, 0.148, 0.6211]}, {"w": "this", "b": [0.1541, 0.6062, 0.1838, 0.6211]}, {"w": "section,", "b": [0.1899, 0.6062, 0.25, 0.6211]}, {"w": "we", "b": [0.2562, 0.6062, 0.277, 0.6211]}, {"w": "talk", "b": [0.2831, 0.6062, 0.3142, 0.6211]}, {"w": "about", "b": [0.3203, 0.6062, 0.3666, 0.6211]}, {"w": "model", "b": [0.3727, 0.6062, 0.421, 0.6211]}, {"w": "maintenance:", "b": [0.4272, 0.6062, 0.5324, 0.6211]}, {"w": "when", "b": [0.5406, 0.6062, 0.5823, 0.6211]}, {"w": "and", "b": [0.5885, 0.6062, 0.618, 0.6211]}, {"w": "how", "b": [0.6241, 0.6062, 0.6561, 0.6211]}, {"w": "to", "b": [0.6623, 0.6062, 0.6785, 0.6211]}, {"w": "update", "b": [0.6847, 0.6062, 0.7401, 0.6211]}, {"w": "the", "b": [0.7462, 0.6062, 0.7717, 0.6211]}, {"w": "model", "b": [0.7778, 0.6062, 0.8261, 0.6211]}, {"w": "after", "b": [0.8322, 0.6062, 0.8694, 0.6211]}, {"w": "it’s", "b": [0.1312, 0.6241, 0.156, 0.639]}, {"w": "deployed", "b": [0.1621, 0.6241, 0.2324, 0.639]}, {"w": "in", "b": [0.2385, 0.6241, 0.2539, 0.639]}, {"w": "production.", "b": [0.26, 0.6241, 0.3529, 0.639]}]}, {"id": "b_9", "type": "paragraph", "text": "9.5.1 When to Update", "words": [{"w": "9.5.1", "b": [0.1312, 0.6715, 0.1749, 0.6865]}, {"w": "When", "b": [0.1961, 0.6715, 0.2513, 0.6865]}, {"w": "to", "b": [0.2584, 0.6715, 0.2772, 0.6865]}, {"w": "Update", "b": [0.2843, 0.6715, 0.3531, 0.6865]}]}, {"id": "b_10", "type": "paragraph", "text": "When a model is deployed in production for the first time, it’s often far from perfect.", "words": [{"w": "When", "b": [0.1303, 0.708, 0.1789, 0.7231]}, {"w": "a", "b": [0.1878, 0.708, 0.1972, 0.7231]}, {"w": "model", "b": [0.206, 0.708, 0.2556, 0.7231]}, {"w": "is", "b": [0.2645, 0.708, 0.2771, 0.7231]}, {"w": "deployed", "b": [0.286, 0.708, 0.3576, 0.7231]}, {"w": "in", "b": [0.3665, 0.708, 0.3822, 0.7231]}, {"w": "production", "b": [0.391, 0.708, 0.4804, 0.7231]}, {"w": "for", "b": [0.4893, 0.708, 0.5118, 0.7231]}, {"w": "the", "b": [0.5206, 0.708, 0.5468, 0.7231]}, {"w": "first", "b": [0.5556, 0.708, 0.5882, 0.7231]}, {"w": "time,", "b": [0.597, 0.708, 0.6389, 0.7231]}, {"w": "it’s", "b": [0.6483, 0.708, 0.6736, 0.7231]}, {"w": "often", "b": [0.6824, 0.708, 0.7237, 0.7231]}, {"w": "far", "b": [0.7325, 0.708, 0.7551, 0.7231]}, {"w": "from", "b": [0.7639, 0.708, 0.8021, 0.7231]}, {"w": "perfect.", "b": [0.8109, 0.708, 0.8727, 0.7231]}]}, {"id": "b_11", "type": "paragraph", "text": "Inevitably, the model makes prediction errors. Some of them could be critical, so the model needs an update. Over time, a model could become more solid, and require fewer updates. However, some models should be constantly updated, so to speak, always be “fresh.”", "words": [{"w": "Inevitably,", "b": [0.1312, 0.7261, 0.2158, 0.741]}, {"w": "the", "b": [0.222, 0.7261, 0.2475, 0.741]}, {"w": "model", "b": [0.2536, 0.7261, 0.302, 0.741]}, {"w": "makes", "b": [0.3081, 0.7261, 0.3572, 0.741]}, {"w": "prediction", "b": [0.3633, 0.7261, 0.4439, 0.741]}, {"w": "errors.", "b": [0.45, 0.7261, 0.5013, 0.741]}, {"w": "Some", "b": [0.5095, 0.7261, 0.5523, 0.741]}, {"w": "of", "b": [0.5584, 0.7261, 0.5732, 0.741]}, {"w": "them", "b": [0.5793, 0.7261, 0.6201, 0.741]}, {"w": "could", "b": [0.6262, 0.7261, 0.669, 0.741]}, {"w": "be", "b": [0.6752, 0.7261, 0.694, 0.741]}, {"w": "critical,", "b": [0.7002, 0.7261, 0.7604, 0.741]}, {"w": "so", "b": [0.7665, 0.7261, 0.7829, 0.741]}, {"w": "the", "b": [0.7891, 0.7261, 0.8146, 0.741]}, {"w": "model", "b": [0.8207, 0.7261, 0.8691, 0.741]}, {"w": "needs", "b": [0.1312, 0.7439, 0.1761, 0.759]}, {"w": "an", "b": [0.1822, 0.7439, 0.202, 0.759]}, {"w": "update.", "b": [0.2082, 0.7439, 0.27, 0.759]}, {"w": "Over", "b": [0.2783, 0.7439, 0.3178, 0.759]}, {"w": "time,", "b": [0.324, 0.7439, 0.3656, 0.759]}, {"w": "a", "b": [0.3718, 0.7439, 0.3811, 0.759]}, {"w": "model", "b": [0.3873, 0.7439, 0.4367, 0.759]}, {"w": "could", "b": [0.4428, 0.7439, 0.4865, 0.759]}, {"w": "become", "b": [0.4927, 0.7439, 0.5535, 0.759]}, {"w": "more", "b": [0.5597, 0.7439, 0.6003, 0.759]}, {"w": "solid,", "b": [0.6064, 0.7439, 0.6492, 0.759]}, {"w": "and", "b": [0.6553, 0.7439, 0.6855, 0.759]}, {"w": "require", "b": [0.6916, 0.7439, 0.7484, 0.759]}, {"w": "fewer", "b": [0.7546, 0.7439, 0.7973, 0.759]}, {"w": "updates.", "b": [0.8035, 0.7439, 0.8727, 0.759]}, {"w": "However,", "b": [0.1312, 0.762, 0.2046, 0.7769]}, {"w": "some", "b": [0.2107, 0.762, 0.2508, 0.7769]}, {"w": "models", "b": [0.257, 0.762, 0.313, 0.7769]}, {"w": "should", "b": [0.3191, 0.762, 0.3715, 0.7769]}, {"w": "be", "b": [0.3777, 0.762, 0.3967, 0.7769]}, {"w": "constantly", "b": [0.4028, 0.762, 0.486, 0.7769]}, {"w": "updated,", "b": [0.4921, 0.762, 0.5634, 0.7769]}, {"w": "so", "b": [0.5696, 0.762, 0.5861, 0.7769]}, {"w": "to", "b": [0.5922, 0.762, 0.6086, 0.7769]}, {"w": "speak,", "b": [0.6148, 0.762, 0.6651, 0.7769]}, {"w": "always", "b": [0.6713, 0.762, 0.7242, 0.7769]}, {"w": "be", "b": [0.7303, 0.762, 0.7493, 0.7769]}, {"w": "“fresh.”", "b": [0.7555, 0.762, 0.8141, 0.7769]}]}, {"id": "b_12", "type": "paragraph", "text": "Model freshness depends on the business needs and the needs of the user. The recommender model on an e-commerce website must be updated after each purchase. If the user utilizes a model to get recommended content on a news website, the model might need to be updated weekly. On the other hand, a voice recognition/synthesis or a machine translation model could be updated less frequently.", "words": [{"w": "Model", "b": [0.1312, 0.7888, 0.19, 0.8038]}, {"w": "freshness", "b": [0.1953, 0.7888, 0.2787, 0.8038]}, {"w": "depends", "b": [0.2833, 0.789, 0.3472, 0.8038]}, {"w": "on", "b": [0.3519, 0.789, 0.371, 0.8038]}, {"w": "the", "b": [0.3756, 0.789, 0.4007, 0.8038]}, {"w": "business", "b": [0.4053, 0.789, 0.47, 0.8038]}, {"w": "needs", "b": [0.4746, 0.789, 0.518, 0.8038]}, {"w": "and", "b": [0.5226, 0.789, 0.5517, 0.8038]}, {"w": "the", "b": [0.5564, 0.789, 0.5815, 0.8038]}, {"w": "needs", "b": [0.5861, 0.789, 0.6295, 0.8038]}, {"w": "of", "b": [0.6341, 0.789, 0.6487, 0.8038]}, {"w": "the", "b": [0.6533, 0.789, 0.6784, 0.8038]}, {"w": "user.", "b": [0.6831, 0.789, 0.7204, 0.8038]}, {"w": "The", "b": [0.7281, 0.789, 0.7593, 0.8038]}, {"w": "recommender", "b": [0.7639, 0.789, 0.8695, 0.8038]}, {"w": "model", "b": [0.1312, 0.8069, 0.1794, 0.8218]}, {"w": "on", "b": [0.1855, 0.8069, 0.2048, 0.8218]}, {"w": "an", "b": [0.211, 0.8069, 0.2302, 0.8218]}, {"w": "e-commerce", "b": [0.2364, 0.8069, 0.3297, 0.8218]}, {"w": "website", "b": [0.3358, 0.8069, 0.3943, 0.8218]}, {"w": "must", "b": [0.4004, 0.8069, 0.4395, 0.8218]}, {"w": "be", "b": [0.4457, 0.8069, 0.4644, 0.8218]}, {"w": "updated", "b": [0.4706, 0.8069, 0.536, 0.8218]}, {"w": "after", "b": [0.5422, 0.8069, 0.5792, 0.8218]}, {"w": "each", "b": [0.5854, 0.8069, 0.6204, 0.8218]}, {"w": "purchase.", "b": [0.6265, 0.8069, 0.7012, 0.8218]}, {"w": "If", "b": [0.7094, 0.8069, 0.7216, 0.8218]}, {"w": "the", "b": [0.7277, 0.8069, 0.7531, 0.8218]}, {"w": "user", "b": [0.7592, 0.8069, 0.7918, 0.8218]}, {"w": "utilizes", "b": [0.798, 0.8069, 0.8539, 0.8218]}, {"w": "a", "b": [0.86, 0.8069, 0.8692, 0.8218]}, {"w": "model", "b": [0.1312, 0.8248, 0.1795, 0.8397]}, {"w": "to", "b": [0.1856, 0.8248, 0.2019, 0.8397]}, {"w": "get", "b": [0.2081, 0.8248, 0.2324, 0.8397]}, {"w": "recommended", "b": [0.2386, 0.8248, 0.3484, 0.8397]}, {"w": "content", "b": [0.3546, 0.8248, 0.4135, 0.8397]}, {"w": "on", "b": [0.4197, 0.8248, 0.439, 0.8397]}, {"w": "a", "b": [0.4451, 0.8248, 0.4542, 0.8397]}, {"w": "news", "b": [0.4604, 0.8248, 0.4991, 0.8397]}, {"w": "website,", "b": [0.5053, 0.8248, 0.5689, 0.8397]}, {"w": "the", "b": [0.575, 0.8248, 0.6005, 0.8397]}, {"w": "model", "b": [0.6066, 0.8248, 0.6549, 0.8397]}, {"w": "might", "b": [0.661, 0.8248, 0.7072, 0.8397]}, {"w": "need", "b": [0.7134, 0.8248, 0.75, 0.8397]}, {"w": "to", "b": [0.7562, 0.8248, 0.7724, 0.8397]}, {"w": "be", "b": [0.7786, 0.8248, 0.7974, 0.8397]}, {"w": "updated", "b": [0.8035, 0.8248, 0.8691, 0.8397]}, {"w": "weekly.", "b": [0.1306, 0.8426, 0.1892, 0.8577]}, {"w": "On", "b": [0.1989, 0.8426, 0.224, 0.8577]}, {"w": "the", "b": [0.2307, 0.8426, 0.2568, 0.8577]}, {"w": "other", "b": [0.2635, 0.8426, 0.3064, 0.8577]}, {"w": "hand,", "b": [0.3131, 0.8426, 0.3591, 0.8577]}, {"w": "a", "b": [0.3659, 0.8426, 0.3753, 0.8577]}, {"w": "voice", "b": [0.3819, 0.8426, 0.4227, 0.8577]}, {"w": "recognition/synthesis", "b": [0.4294, 0.8426, 0.6034, 0.8577]}, {"w": "or", "b": [0.6101, 0.8426, 0.6269, 0.8577]}, {"w": "a", "b": [0.6335, 0.8426, 0.643, 0.8577]}, {"w": "machine", "b": [0.6496, 0.8426, 0.7171, 0.8577]}, {"w": "translation", "b": [0.7237, 0.8426, 0.8128, 0.8577]}, {"w": "model", "b": [0.8194, 0.8426, 0.8691, 0.8577]}, {"w": "could", "b": [0.1312, 0.8607, 0.1743, 0.8756]}, {"w": "be", "b": [0.1805, 0.8607, 0.1994, 0.8756]}, {"w": "updated", "b": [0.2056, 0.8607, 0.2717, 0.8756]}, {"w": "less", "b": [0.2779, 0.8607, 0.3058, 0.8756]}, {"w": "frequently.", "b": [0.3119, 0.8607, 0.3966, 0.8756]}]}, {"id": "b_13", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 19", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "19", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 283, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "The speed of availability of new training data also affects the rate of model updates. Even if new data comes in fast, such as the stream of comments on a popular website, it may take time and require significant investment to get labeled data. Sometimes, labeling is automated but delayed, as in churn prediction, where the user’s decision to stay with or leave the service happens far in the future.", "words": [{"w": "The", "b": [0.1306, 0.0885, 0.1619, 0.1033]}, {"w": "speed", "b": [0.168, 0.0885, 0.2121, 0.1033]}, {"w": "of", "b": [0.2182, 0.0885, 0.2329, 0.1033]}, {"w": "availability", "b": [0.239, 0.0885, 0.3259, 0.1033]}, {"w": "of", "b": [0.332, 0.0885, 0.3467, 0.1033]}, {"w": "new", "b": [0.3528, 0.0885, 0.3841, 0.1033]}, {"w": "training", "b": [0.3903, 0.0885, 0.4529, 0.1033]}, {"w": "data", "b": [0.4591, 0.0885, 0.4944, 0.1033]}, {"w": "also", "b": [0.5006, 0.0885, 0.531, 0.1033]}, {"w": "affects", "b": [0.5371, 0.0885, 0.5872, 0.1033]}, {"w": "the", "b": [0.5934, 0.0885, 0.6186, 0.1033]}, {"w": "rate", "b": [0.6248, 0.0885, 0.6561, 0.1033]}, {"w": "of", "b": [0.6623, 0.0885, 0.6769, 0.1033]}, {"w": "model", "b": [0.6831, 0.0885, 0.7311, 0.1033]}, {"w": "updates.", "b": [0.7372, 0.0885, 0.8045, 0.1033]}, {"w": "Even", "b": [0.8127, 0.0885, 0.8523, 0.1033]}, {"w": "if", "b": [0.8585, 0.0885, 0.8691, 0.1033]}, {"w": "new", "b": [0.1312, 0.1063, 0.1633, 0.1213]}, {"w": "data", "b": [0.1694, 0.1063, 0.2056, 0.1213]}, {"w": "comes", "b": [0.2117, 0.1063, 0.2604, 0.1213]}, {"w": "in", "b": [0.2665, 0.1063, 0.2821, 0.1213]}, {"w": "fast,", "b": [0.2882, 0.1063, 0.3229, 0.1213]}, {"w": "such", "b": [0.3291, 0.1063, 0.3649, 0.1213]}, {"w": "as", "b": [0.371, 0.1063, 0.3876, 0.1213]}, {"w": "the", "b": [0.3938, 0.1063, 0.4196, 0.1213]}, {"w": "stream", "b": [0.4258, 0.1063, 0.4807, 0.1213]}, {"w": "of", "b": [0.4868, 0.1063, 0.5018, 0.1213]}, {"w": "comments", "b": [0.508, 0.1063, 0.5892, 0.1213]}, {"w": "on", "b": [0.5954, 0.1063, 0.615, 0.1213]}, {"w": "a", "b": [0.6211, 0.1063, 0.6304, 0.1213]}, {"w": "popular", "b": [0.6366, 0.1063, 0.6992, 0.1213]}, {"w": "website,", "b": [0.7053, 0.1063, 0.77, 0.1213]}, {"w": "it", "b": [0.7762, 0.1063, 0.7886, 0.1213]}, {"w": "may", "b": [0.7947, 0.1063, 0.8288, 0.1213]}, {"w": "take", "b": [0.8349, 0.1063, 0.8691, 0.1213]}, {"w": "time", "b": [0.1312, 0.1244, 0.1664, 0.1392]}, {"w": "and", "b": [0.1719, 0.1244, 0.2011, 0.1392]}, {"w": "require", "b": [0.2066, 0.1244, 0.2615, 0.1392]}, {"w": "significant", "b": [0.2671, 0.1244, 0.3471, 0.1392]}, {"w": "investment", "b": [0.3526, 0.1244, 0.4381, 0.1392]}, {"w": "to", "b": [0.4436, 0.1244, 0.4597, 0.1392]}, {"w": "get", "b": [0.4652, 0.1244, 0.4894, 0.1392]}, {"w": "labeled", "b": [0.4949, 0.1244, 0.5507, 0.1392]}, {"w": "data.", "b": [0.5562, 0.1244, 0.5964, 0.1392]}, {"w": "Sometimes,", "b": [0.6044, 0.1244, 0.694, 0.1392]}, {"w": "labeling", "b": [0.6996, 0.1244, 0.7614, 0.1392]}, {"w": "is", "b": [0.767, 0.1244, 0.7792, 0.1392]}, {"w": "automated", "b": [0.7847, 0.1244, 0.8691, 0.1392]}, {"w": "but", "b": [0.1312, 0.1421, 0.1595, 0.1572]}, {"w": "delayed,", "b": [0.1663, 0.1421, 0.2327, 0.1572]}, {"w": "as", "b": [0.2397, 0.1421, 0.2565, 0.1572]}, {"w": "in", "b": [0.2633, 0.1421, 0.279, 0.1572]}, {"w": "churn", "b": [0.2858, 0.1422, 0.3382, 0.1572]}, {"w": "prediction,", "b": [0.346, 0.1421, 0.4452, 0.1572]}, {"w": "where", "b": [0.4521, 0.1421, 0.5003, 0.1572]}, {"w": "the", "b": [0.5071, 0.1421, 0.5333, 0.1572]}, {"w": "user’s", "b": [0.54, 0.1421, 0.5863, 0.1572]}, {"w": "decision", "b": [0.5931, 0.1421, 0.6581, 0.1572]}, {"w": "to", "b": [0.6649, 0.1421, 0.6816, 0.1572]}, {"w": "stay", "b": [0.6884, 0.1421, 0.722, 0.1572]}, {"w": "with", "b": [0.7288, 0.1421, 0.7654, 0.1572]}, {"w": "or", "b": [0.7722, 0.1421, 0.789, 0.1572]}, {"w": "leave", "b": [0.7958, 0.1421, 0.836, 0.1572]}, {"w": "the", "b": [0.8428, 0.1421, 0.869, 0.1572]}, {"w": "service", "b": [0.1312, 0.1602, 0.1853, 0.1751]}, {"w": "happens", "b": [0.1914, 0.1602, 0.2577, 0.1751]}, {"w": "far", "b": [0.2638, 0.1602, 0.2859, 0.1751]}, {"w": "in", "b": [0.2921, 0.1602, 0.3074, 0.1751]}, {"w": "the", "b": [0.3136, 0.1602, 0.3392, 0.1751]}, {"w": "future.", "b": [0.3454, 0.1602, 0.3993, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "Some models take significant time to build, especially if the hyperparameter search is needed. It’s not uncommon to wait for days or even weeks to get a new version of the model. Use parallelizable machine learning algorithms and graphical processing units (GPU) to speed up the training. Modern libraries, such as thundersvm and cuML, allow the analyst to run shallow learning algorithms on GPUs, with a significant gain in training time. If you cannot afford to wait for days or weeks to get an updated model, using a less complex (and, therefore, less accurate) model might be your only choice.", "words": [{"w": "Some", "b": [0.1312, 0.187, 0.1752, 0.2021]}, {"w": "models", "b": [0.182, 0.187, 0.2391, 0.2021]}, {"w": "take", "b": [0.246, 0.187, 0.2805, 0.2021]}, {"w": "significant", "b": [0.2874, 0.187, 0.3707, 0.2021]}, {"w": "time", "b": [0.3776, 0.187, 0.4142, 0.2021]}, {"w": "to", "b": [0.4211, 0.187, 0.4378, 0.2021]}, {"w": "build,", "b": [0.4447, 0.187, 0.4918, 0.2021]}, {"w": "especially", "b": [0.4988, 0.187, 0.5774, 0.2021]}, {"w": "if", "b": [0.5843, 0.187, 0.5953, 0.2021]}, {"w": "the", "b": [0.6022, 0.187, 0.6283, 0.2021]}, {"w": "hyperparameter", "b": [0.635, 0.1871, 0.7835, 0.202]}, {"w": "search", "b": [0.7914, 0.1871, 0.8492, 0.202]}, {"w": "is", "b": [0.8561, 0.187, 0.8688, 0.2021]}, {"w": "needed.", "b": [0.1312, 0.2052, 0.1906, 0.22]}, {"w": "It’s", "b": [0.1987, 0.2052, 0.2245, 0.22]}, {"w": "not", "b": [0.2306, 0.2052, 0.2567, 0.22]}, {"w": "uncommon", "b": [0.2628, 0.2052, 0.3492, 0.22]}, {"w": "to", "b": [0.3554, 0.2052, 0.3714, 0.22]}, {"w": "wait", "b": [0.3776, 0.2052, 0.4112, 0.22]}, {"w": "for", "b": [0.4173, 0.2052, 0.439, 0.22]}, {"w": "days", "b": [0.4451, 0.2052, 0.4804, 0.22]}, {"w": "or", "b": [0.4865, 0.2052, 0.5026, 0.22]}, {"w": "even", "b": [0.5087, 0.2052, 0.5439, 0.22]}, {"w": "weeks", "b": [0.5501, 0.2052, 0.5954, 0.22]}, {"w": "to", "b": [0.6015, 0.2052, 0.6176, 0.22]}, {"w": "get", "b": [0.6237, 0.2052, 0.6478, 0.22]}, {"w": "a", "b": [0.6539, 0.2052, 0.663, 0.22]}, {"w": "new", "b": [0.6691, 0.2052, 0.7003, 0.22]}, {"w": "version", "b": [0.7064, 0.2052, 0.7618, 0.22]}, {"w": "of", "b": [0.7679, 0.2052, 0.7825, 0.22]}, {"w": "the", "b": [0.7886, 0.2052, 0.8138, 0.22]}, {"w": "model.", "b": [0.8199, 0.2052, 0.8727, 0.22]}, {"w": "Use", "b": [0.1312, 0.2231, 0.16, 0.2379]}, {"w": "parallelizable", "b": [0.1652, 0.2231, 0.2688, 0.2379]}, {"w": "machine", "b": [0.2741, 0.2231, 0.3389, 0.2379]}, {"w": "learning", "b": [0.3441, 0.2231, 0.4075, 0.2379]}, {"w": "algorithms", "b": [0.4127, 0.2231, 0.4963, 0.2379]}, {"w": "and", "b": [0.5015, 0.2231, 0.5307, 0.2379]}, {"w": "graphical", "b": [0.5359, 0.2231, 0.6083, 0.2379]}, {"w": "processing", "b": [0.6136, 0.2231, 0.6948, 0.2379]}, {"w": "units", "b": [0.7, 0.2231, 0.7393, 0.2379]}, {"w": "(GPU)", "b": [0.7446, 0.2231, 0.7987, 0.2379]}, {"w": "to", "b": [0.804, 0.2231, 0.82, 0.2379]}, {"w": "speed", "b": [0.8253, 0.2231, 0.8691, 0.2379]}, {"w": "up", "b": [0.1312, 0.2408, 0.1522, 0.2559]}, {"w": "the", "b": [0.1587, 0.2408, 0.1848, 0.2559]}, {"w": "training.", "b": [0.1913, 0.2408, 0.2615, 0.2559]}, {"w": "Modern", "b": [0.2708, 0.2408, 0.3346, 0.2559]}, {"w": "libraries,", "b": [0.3412, 0.2408, 0.4125, 0.2559]}, {"w": "such", "b": [0.4191, 0.2408, 0.4553, 0.2559]}, {"w": "as", "b": [0.4619, 0.2408, 0.4787, 0.2559]}, {"w": "thundersvm", "b": [0.485, 0.2409, 0.5955, 0.2559]}, {"w": "and", "b": [0.6021, 0.2408, 0.6325, 0.2559]}, {"w": "cuML,", "b": [0.639, 0.2408, 0.6983, 0.2559]}, {"w": "allow", "b": [0.7048, 0.2408, 0.7472, 0.2559]}, {"w": "the", "b": [0.7537, 0.2408, 0.7799, 0.2559]}, {"w": "analyst", "b": [0.7864, 0.2408, 0.8456, 0.2559]}, {"w": "to", "b": [0.8521, 0.2408, 0.8688, 0.2559]}, {"w": "run", "b": [0.1312, 0.2588, 0.1595, 0.2739]}, {"w": "shallow", "b": [0.166, 0.2588, 0.2263, 0.2739]}, {"w": "learning", "b": [0.2328, 0.2588, 0.2988, 0.2739]}, {"w": "algorithms", "b": [0.3053, 0.2588, 0.3922, 0.2739]}, {"w": "on", "b": [0.3988, 0.2588, 0.4186, 0.2739]}, {"w": "GPUs,", "b": [0.4251, 0.2588, 0.4795, 0.2739]}, {"w": "with", "b": [0.4861, 0.2588, 0.5227, 0.2739]}, {"w": "a", "b": [0.5292, 0.2588, 0.5386, 0.2739]}, {"w": "significant", "b": [0.5451, 0.2588, 0.6284, 0.2739]}, {"w": "gain", "b": [0.6349, 0.2588, 0.6694, 0.2739]}, {"w": "in", "b": [0.6759, 0.2588, 0.6916, 0.2739]}, {"w": "training", "b": [0.6982, 0.2588, 0.7631, 0.2739]}, {"w": "time.", "b": [0.7696, 0.2588, 0.8114, 0.2739]}, {"w": "If", "b": [0.8207, 0.2588, 0.8332, 0.2739]}, {"w": "you", "b": [0.8398, 0.2588, 0.869, 0.2739]}, {"w": "cannot", "b": [0.1312, 0.2769, 0.1852, 0.2918]}, {"w": "afford", "b": [0.1913, 0.2769, 0.2377, 0.2918]}, {"w": "to", "b": [0.2438, 0.2769, 0.2601, 0.2918]}, {"w": "wait", "b": [0.2663, 0.2769, 0.3004, 0.2918]}, {"w": "for", "b": [0.3065, 0.2769, 0.3284, 0.2918]}, {"w": "days", "b": [0.3346, 0.2769, 0.3703, 0.2918]}, {"w": "or", "b": [0.3765, 0.2769, 0.3928, 0.2918]}, {"w": "weeks", "b": [0.3989, 0.2769, 0.4449, 0.2918]}, {"w": "to", "b": [0.451, 0.2769, 0.4673, 0.2918]}, {"w": "get", "b": [0.4734, 0.2769, 0.4979, 0.2918]}, {"w": "an", "b": [0.504, 0.2769, 0.5234, 0.2918]}, {"w": "updated", "b": [0.5295, 0.2769, 0.5952, 0.2918]}, {"w": "model,", "b": [0.6013, 0.2769, 0.6548, 0.2918]}, {"w": "using", "b": [0.6609, 0.2769, 0.7028, 0.2918]}, {"w": "a", "b": [0.7089, 0.2769, 0.7181, 0.2918]}, {"w": "less", "b": [0.7242, 0.2769, 0.7519, 0.2918]}, {"w": "complex", "b": [0.7581, 0.2769, 0.8237, 0.2918]}, {"w": "(and,", "b": [0.8299, 0.2769, 0.8716, 0.2918]}, {"w": "therefore,", "b": [0.1312, 0.2948, 0.2078, 0.3097]}, {"w": "less", "b": [0.2139, 0.2948, 0.2418, 0.3097]}, {"w": "accurate)", "b": [0.248, 0.2948, 0.3229, 0.3097]}, {"w": "model", "b": [0.329, 0.2948, 0.3777, 0.3097]}, {"w": "might", "b": [0.3839, 0.2948, 0.4305, 0.3097]}, {"w": "be", "b": [0.4367, 0.2948, 0.4557, 0.3097]}, {"w": "your", "b": [0.4618, 0.2948, 0.4977, 0.3097]}, {"w": "only", "b": [0.5039, 0.2948, 0.5382, 0.3097]}, {"w": "choice.", "b": [0.5444, 0.2948, 0.5983, 0.3097]}]}, {"id": "b_2", "type": "paragraph", "text": "You might decide to update the model less often if an update is costly. For example, in healthcare, getting labeled examples is complicated and expensive, due to regulations, privacy concerns, and expensive medical experts.", "words": [{"w": "You", "b": [0.1305, 0.3216, 0.163, 0.3367]}, {"w": "might", "b": [0.1702, 0.3216, 0.2178, 0.3367]}, {"w": "decide", "b": [0.225, 0.3216, 0.2763, 0.3367]}, {"w": "to", "b": [0.2835, 0.3216, 0.3003, 0.3367]}, {"w": "update", "b": [0.3075, 0.3216, 0.3645, 0.3367]}, {"w": "the", "b": [0.3717, 0.3216, 0.3979, 0.3367]}, {"w": "model", "b": [0.4051, 0.3216, 0.4548, 0.3367]}, {"w": "less", "b": [0.462, 0.3216, 0.4904, 0.3367]}, {"w": "often", "b": [0.4977, 0.3216, 0.539, 0.3367]}, {"w": "if", "b": [0.5462, 0.3216, 0.5572, 0.3367]}, {"w": "an", "b": [0.5644, 0.3216, 0.5843, 0.3367]}, {"w": "update", "b": [0.5915, 0.3216, 0.6485, 0.3367]}, {"w": "is", "b": [0.6558, 0.3216, 0.6684, 0.3367]}, {"w": "costly.", "b": [0.6756, 0.3216, 0.727, 0.3367]}, {"w": "For", "b": [0.7385, 0.3216, 0.766, 0.3367]}, {"w": "example,", "b": [0.7732, 0.3216, 0.8459, 0.3367]}, {"w": "in", "b": [0.8534, 0.3216, 0.8691, 0.3367]}, {"w": "healthcare,", "b": [0.1312, 0.3398, 0.2177, 0.3546]}, {"w": "getting", "b": [0.2233, 0.3398, 0.2785, 0.3546]}, {"w": "labeled", "b": [0.2839, 0.3398, 0.3397, 0.3546]}, {"w": "examples", "b": [0.3451, 0.3398, 0.417, 0.3546]}, {"w": "is", "b": [0.4224, 0.3398, 0.4346, 0.3546]}, {"w": "complicated", "b": [0.44, 0.3398, 0.5344, 0.3546]}, {"w": "and", "b": [0.5398, 0.3398, 0.569, 0.3546]}, {"w": "expensive,", "b": [0.5743, 0.3398, 0.6549, 0.3546]}, {"w": "due", "b": [0.6604, 0.3398, 0.6886, 0.3546]}, {"w": "to", "b": [0.6939, 0.3398, 0.71, 0.3546]}, {"w": "regulations,", "b": [0.7154, 0.3398, 0.807, 0.3546]}, {"w": "privacy", "b": [0.8125, 0.3398, 0.8698, 0.3546]}, {"w": "concerns,", "b": [0.1312, 0.3576, 0.2053, 0.3726]}, {"w": "and", "b": [0.2114, 0.3576, 0.2411, 0.3726]}, {"w": "expensive", "b": [0.2473, 0.3576, 0.3243, 0.3726]}, {"w": "medical", "b": [0.3305, 0.3576, 0.392, 0.3726]}, {"w": "experts.", "b": [0.3981, 0.3576, 0.4619, 0.3726]}]}, {"id": "b_3", "type": "paragraph", "text": "Not all models are worth deploying. Sometimes the potential performance gain is not worth the user’s possible frustration. However, if the user disturbance is manageable, and the deployment is not costly, even a small improvement may result in a significant business outcome in the long run.", "words": [{"w": "Not", "b": [0.1312, 0.3846, 0.1612, 0.3995]}, {"w": "all", "b": [0.1673, 0.3846, 0.1866, 0.3995]}, {"w": "models", "b": [0.1928, 0.3846, 0.2483, 0.3995]}, {"w": "are", "b": [0.2544, 0.3846, 0.2789, 0.3995]}, {"w": "worth", "b": [0.285, 0.3846, 0.3313, 0.3995]}, {"w": "deploying.", "b": [0.3374, 0.3846, 0.4187, 0.3995]}, {"w": "Sometimes", "b": [0.4269, 0.3846, 0.5123, 0.3995]}, {"w": "the", "b": [0.5185, 0.3846, 0.5439, 0.3995]}, {"w": "potential", "b": [0.55, 0.3846, 0.6212, 0.3995]}, {"w": "performance", "b": [0.6273, 0.3846, 0.726, 0.3995]}, {"w": "gain", "b": [0.7321, 0.3846, 0.7656, 0.3995]}, {"w": "is", "b": [0.7718, 0.3846, 0.7841, 0.3995]}, {"w": "not", "b": [0.7902, 0.3846, 0.8166, 0.3995]}, {"w": "worth", "b": [0.8228, 0.3846, 0.8691, 0.3995]}, {"w": "the", "b": [0.1312, 0.4023, 0.1574, 0.4175]}, {"w": "user’s", "b": [0.165, 0.4023, 0.2113, 0.4175]}, {"w": "possible", "b": [0.2189, 0.4023, 0.2834, 0.4175]}, {"w": "frustration.", "b": [0.291, 0.4023, 0.3838, 0.4175]}, {"w": "However,", "b": [0.3962, 0.4023, 0.4711, 0.4175]}, {"w": "if", "b": [0.479, 0.4023, 0.49, 0.4175]}, {"w": "the", "b": [0.4976, 0.4023, 0.5238, 0.4175]}, {"w": "user", "b": [0.5313, 0.4023, 0.565, 0.4175]}, {"w": "disturbance", "b": [0.5726, 0.4023, 0.6679, 0.4175]}, {"w": "is", "b": [0.6755, 0.4023, 0.6882, 0.4175]}, {"w": "manageable,", "b": [0.6957, 0.4023, 0.7972, 0.4175]}, {"w": "and", "b": [0.8051, 0.4023, 0.8354, 0.4175]}, {"w": "the", "b": [0.843, 0.4023, 0.8692, 0.4175]}, {"w": "deployment", "b": [0.1312, 0.4203, 0.2259, 0.4354]}, {"w": "is", "b": [0.2336, 0.4203, 0.2462, 0.4354]}, {"w": "not", "b": [0.2539, 0.4203, 0.2811, 0.4354]}, {"w": "costly,", "b": [0.2887, 0.4203, 0.3401, 0.4354]}, {"w": "even", "b": [0.3481, 0.4203, 0.3848, 0.4354]}, {"w": "a", "b": [0.3924, 0.4203, 0.4018, 0.4354]}, {"w": "small", "b": [0.4095, 0.4203, 0.4524, 0.4354]}, {"w": "improvement", "b": [0.4601, 0.4203, 0.5669, 0.4354]}, {"w": "may", "b": [0.5745, 0.4203, 0.609, 0.4354]}, {"w": "result", "b": [0.6166, 0.4203, 0.6628, 0.4354]}, {"w": "in", "b": [0.6705, 0.4203, 0.6862, 0.4354]}, {"w": "a", "b": [0.6938, 0.4203, 0.7033, 0.4354]}, {"w": "significant", "b": [0.7109, 0.4203, 0.7942, 0.4354]}, {"w": "business", "b": [0.8018, 0.4203, 0.8691, 0.4354]}, {"w": "outcome", "b": [0.1312, 0.4384, 0.1989, 0.4533]}, {"w": "in", "b": [0.205, 0.4384, 0.2204, 0.4533]}, {"w": "the", "b": [0.2266, 0.4384, 0.2522, 0.4533]}, {"w": "long", "b": [0.2584, 0.4384, 0.2922, 0.4533]}, {"w": "run.", "b": [0.2984, 0.4384, 0.3312, 0.4533]}]}, {"id": "b_4", "type": "paragraph", "text": "9.5.2 How to Update", "words": [{"w": "9.5.2", "b": [0.1312, 0.4862, 0.1749, 0.5011]}, {"w": "How", "b": [0.1961, 0.4862, 0.238, 0.5011]}, {"w": "to", "b": [0.2451, 0.4862, 0.264, 0.5011]}, {"w": "Update", "b": [0.271, 0.4862, 0.3398, 0.5011]}]}, {"id": "b_5", "type": "paragraph", "text": "As discussed, your software ideally allows the new model version to be deployed with- out stopping the entire system. In virtual or containerized infrastructure, this can be done by replacing the image of a virtual machine (VM) or a container in the repository, gradually closing VMs/containers, and letting the autoscaler instantiate a VM/container from an updated image.", "words": [{"w": "As", "b": [0.1305, 0.5227, 0.1521, 0.5378]}, {"w": "discussed,", "b": [0.1608, 0.5227, 0.2417, 0.5378]}, {"w": "your", "b": [0.2512, 0.5227, 0.2878, 0.5378]}, {"w": "software", "b": [0.2966, 0.5227, 0.3642, 0.5378]}, {"w": "ideally", "b": [0.373, 0.5227, 0.4269, 0.5378]}, {"w": "allows", "b": [0.4357, 0.5227, 0.4854, 0.5378]}, {"w": "the", "b": [0.4942, 0.5227, 0.5204, 0.5378]}, {"w": "new", "b": [0.5291, 0.5227, 0.5616, 0.5378]}, {"w": "model", "b": [0.5703, 0.5227, 0.62, 0.5378]}, {"w": "version", "b": [0.6288, 0.5227, 0.6865, 0.5378]}, {"w": "to", "b": [0.6953, 0.5227, 0.712, 0.5378]}, {"w": "be", "b": [0.7207, 0.5227, 0.7401, 0.5378]}, {"w": "deployed", "b": [0.7489, 0.5227, 0.8205, 0.5378]}, {"w": "with-", "b": [0.8293, 0.5227, 0.8722, 0.5378]}, {"w": "out", "b": [0.1312, 0.5406, 0.1584, 0.5557]}, {"w": "stopping", "b": [0.1672, 0.5406, 0.2374, 0.5557]}, {"w": "the", "b": [0.2461, 0.5406, 0.2723, 0.5557]}, {"w": "entire", "b": [0.281, 0.5406, 0.3277, 0.5557]}, {"w": "system.", "b": [0.3364, 0.5406, 0.3978, 0.5557]}, {"w": "In", "b": [0.4138, 0.5406, 0.4311, 0.5557]}, {"w": "virtual", "b": [0.4399, 0.5406, 0.4948, 0.5557]}, {"w": "or", "b": [0.5036, 0.5406, 0.5204, 0.5557]}, {"w": "containerized", "b": [0.5291, 0.5406, 0.6375, 0.5557]}, {"w": "infrastructure,", "b": [0.6462, 0.5406, 0.7642, 0.5557]}, {"w": "this", "b": [0.7736, 0.5406, 0.804, 0.5557]}, {"w": "can", "b": [0.8128, 0.5406, 0.8411, 0.5557]}, {"w": "be", "b": [0.8498, 0.5406, 0.8692, 0.5557]}, {"w": "done", "b": [0.1312, 0.5586, 0.1699, 0.5737]}, {"w": "by", "b": [0.1773, 0.5586, 0.1971, 0.5737]}, {"w": "replacing", "b": [0.2045, 0.5586, 0.2788, 0.5737]}, {"w": "the", "b": [0.2861, 0.5586, 0.3123, 0.5737]}, {"w": "image", "b": [0.3196, 0.5586, 0.3677, 0.5737]}, {"w": "of", "b": [0.375, 0.5586, 0.3902, 0.5737]}, {"w": "a", "b": [0.3975, 0.5586, 0.4069, 0.5737]}, {"w": "virtual", "b": [0.4142, 0.5586, 0.4692, 0.5737]}, {"w": "machine", "b": [0.4765, 0.5586, 0.544, 0.5737]}, {"w": "(VM)", "b": [0.5513, 0.5586, 0.5973, 0.5737]}, {"w": "or", "b": [0.6046, 0.5586, 0.6214, 0.5737]}, {"w": "a", "b": [0.6287, 0.5586, 0.6381, 0.5737]}, {"w": "container", "b": [0.6454, 0.5586, 0.7213, 0.5737]}, {"w": "in", "b": [0.7286, 0.5586, 0.7443, 0.5737]}, {"w": "the", "b": [0.7517, 0.5586, 0.7778, 0.5737]}, {"w": "repository,", "b": [0.7851, 0.5586, 0.8717, 0.5737]}, {"w": "gradually", "b": [0.1312, 0.5765, 0.2082, 0.5916]}, {"w": "closing", "b": [0.2151, 0.5765, 0.2707, 0.5916]}, {"w": "VMs/containers,", "b": [0.2776, 0.5765, 0.4144, 0.5916]}, {"w": "and", "b": [0.4216, 0.5765, 0.4519, 0.5916]}, {"w": "letting", "b": [0.4588, 0.5765, 0.5122, 0.5916]}, {"w": "the", "b": [0.5192, 0.5765, 0.5453, 0.5916]}, {"w": "autoscaler", "b": [0.5523, 0.5765, 0.6351, 0.5916]}, {"w": "instantiate", "b": [0.642, 0.5765, 0.7295, 0.5916]}, {"w": "a", "b": [0.7364, 0.5765, 0.7458, 0.5916]}, {"w": "VM/container", "b": [0.7528, 0.5765, 0.8695, 0.5916]}, {"w": "from", "b": [0.1312, 0.5946, 0.1687, 0.6095]}, {"w": "an", "b": [0.1748, 0.5946, 0.1943, 0.6095]}, {"w": "updated", "b": [0.2005, 0.5946, 0.2666, 0.6095]}, {"w": "image.", "b": [0.2728, 0.5946, 0.3251, 0.6095]}]}, {"id": "b_6", "type": "paragraph", "text": "An architecture of machine learning deployment and maintenance automation is schematically shown in Figure 5. Here, we have three repositories: data, code, and model; all three repositories are versioned. We also have two runtimes: model training and production. The model runs in the production runtime, which is load-balanced and auto-scaled. When an update of the model is needed, the model training runtime pulls the training data, as well as the model training code, from the data and code repositories, respectively. It then trains the new model and saves it in the model repository.", "words": [{"w": "An", "b": [0.1305, 0.6216, 0.1541, 0.6364]}, {"w": "architecture", "b": [0.1593, 0.6216, 0.2534, 0.6364]}, {"w": "of", "b": [0.2585, 0.6216, 0.2731, 0.6364]}, {"w": "machine", "b": [0.2783, 0.6216, 0.3431, 0.6364]}, {"w": "learning", "b": [0.3482, 0.6216, 0.4116, 0.6364]}, {"w": "deployment", "b": [0.4168, 0.6216, 0.5077, 0.6364]}, {"w": "and", "b": [0.5128, 0.6216, 0.542, 0.6364]}, {"w": "maintenance", "b": [0.5471, 0.6216, 0.6461, 0.6364]}, {"w": "automation", "b": [0.6513, 0.6216, 0.7417, 0.6364]}, {"w": "is", "b": [0.7469, 0.6216, 0.759, 0.6364]}, {"w": "schematically", "b": [0.7642, 0.6216, 0.8698, 0.6364]}, {"w": "shown", "b": [0.1312, 0.6393, 0.1821, 0.6544]}, {"w": "in", "b": [0.1904, 0.6393, 0.2061, 0.6544]}, {"w": "Figure", "b": [0.2143, 0.6393, 0.2675, 0.6544]}, {"w": "5.", "b": [0.2758, 0.6393, 0.2904, 0.6544]}, {"w": "Here,", "b": [0.305, 0.6393, 0.3485, 0.6544]}, {"w": "we", "b": [0.3573, 0.6393, 0.3788, 0.6544]}, {"w": "have", "b": [0.387, 0.6393, 0.4242, 0.6544]}, {"w": "three", "b": [0.4325, 0.6393, 0.4744, 0.6544]}, {"w": "repositories:", "b": [0.4827, 0.6393, 0.5819, 0.6544]}, {"w": "data,", "b": [0.5943, 0.6393, 0.6362, 0.6544]}, {"w": "code,", "b": [0.645, 0.6393, 0.6874, 0.6544]}, {"w": "and", "b": [0.6962, 0.6393, 0.7265, 0.6544]}, {"w": "model;", "b": [0.7348, 0.6393, 0.7897, 0.6544]}, {"w": "all", "b": [0.799, 0.6393, 0.8189, 0.6544]}, {"w": "three", "b": [0.8272, 0.6393, 0.8691, 0.6544]}, {"w": "repositories", "b": [0.1312, 0.6574, 0.223, 0.6723]}, {"w": "are", "b": [0.2291, 0.6574, 0.2537, 0.6723]}, {"w": "versioned.", "b": [0.2598, 0.6574, 0.3396, 0.6723]}, {"w": "We", "b": [0.3478, 0.6574, 0.3734, 0.6723]}, {"w": "also", "b": [0.3795, 0.6574, 0.4102, 0.6723]}, {"w": "have", "b": [0.4164, 0.6574, 0.4526, 0.6723]}, {"w": "two", "b": [0.4588, 0.6574, 0.4873, 0.6723]}, {"w": "runtimes:", "b": [0.4935, 0.6574, 0.5687, 0.6723]}, {"w": "model", "b": [0.5769, 0.6574, 0.6254, 0.6723]}, {"w": "training", "b": [0.6315, 0.6574, 0.6949, 0.6723]}, {"w": "and", "b": [0.701, 0.6574, 0.7306, 0.6723]}, {"w": "production.", "b": [0.7368, 0.6574, 0.8293, 0.6723]}, {"w": "The", "b": [0.8375, 0.6574, 0.8691, 0.6723]}, {"w": "model", "b": [0.1312, 0.6752, 0.1809, 0.6903]}, {"w": "runs", "b": [0.1875, 0.6752, 0.2232, 0.6903]}, {"w": "in", "b": [0.2298, 0.6752, 0.2455, 0.6903]}, {"w": "the", "b": [0.2521, 0.6752, 0.2782, 0.6903]}, {"w": "production", "b": [0.2848, 0.6752, 0.3743, 0.6903]}, {"w": "runtime,", "b": [0.3809, 0.6752, 0.4505, 0.6903]}, {"w": "which", "b": [0.4572, 0.6752, 0.5048, 0.6903]}, {"w": "is", "b": [0.5114, 0.6752, 0.5241, 0.6903]}, {"w": "load-balanced", "b": [0.5307, 0.6752, 0.6436, 0.6903]}, {"w": "and", "b": [0.6502, 0.6752, 0.6805, 0.6903]}, {"w": "auto-scaled.", "b": [0.6871, 0.6752, 0.7845, 0.6903]}, {"w": "When", "b": [0.794, 0.6752, 0.8427, 0.6903]}, {"w": "an", "b": [0.8492, 0.6752, 0.8691, 0.6903]}, {"w": "update", "b": [0.1312, 0.6934, 0.1861, 0.7082]}, {"w": "of", "b": [0.1922, 0.6934, 0.2068, 0.7082]}, {"w": "the", "b": [0.213, 0.6934, 0.2381, 0.7082]}, {"w": "model", "b": [0.2443, 0.6934, 0.2921, 0.7082]}, {"w": "is", "b": [0.2982, 0.6934, 0.3104, 0.7082]}, {"w": "needed,", "b": [0.3166, 0.6934, 0.3759, 0.7082]}, {"w": "the", "b": [0.3821, 0.6934, 0.4072, 0.7082]}, {"w": "model", "b": [0.4134, 0.6934, 0.4612, 0.7082]}, {"w": "training", "b": [0.4673, 0.6934, 0.5298, 0.7082]}, {"w": "runtime", "b": [0.5359, 0.6934, 0.5978, 0.7082]}, {"w": "pulls", "b": [0.604, 0.6934, 0.6413, 0.7082]}, {"w": "the", "b": [0.6475, 0.6934, 0.6726, 0.7082]}, {"w": "training", "b": [0.6788, 0.6934, 0.7412, 0.7082]}, {"w": "data,", "b": [0.7474, 0.6934, 0.7876, 0.7082]}, {"w": "as", "b": [0.7937, 0.6934, 0.8099, 0.7082]}, {"w": "well", "b": [0.8161, 0.6934, 0.8468, 0.7082]}, {"w": "as", "b": [0.8529, 0.6934, 0.8691, 0.7082]}, {"w": "the", "b": [0.1312, 0.7113, 0.1564, 0.7262]}, {"w": "model", "b": [0.1626, 0.7113, 0.2104, 0.7262]}, {"w": "training", "b": [0.2165, 0.7113, 0.279, 0.7262]}, {"w": "code,", "b": [0.2852, 0.7113, 0.326, 0.7262]}, {"w": "from", "b": [0.3321, 0.7113, 0.3689, 0.7262]}, {"w": "the", "b": [0.3751, 0.7113, 0.4003, 0.7262]}, {"w": "data", "b": [0.4064, 0.7113, 0.4416, 0.7262]}, {"w": "and", "b": [0.4478, 0.7113, 0.477, 0.7262]}, {"w": "code", "b": [0.4831, 0.7113, 0.5189, 0.7262]}, {"w": "repositories,", "b": [0.525, 0.7113, 0.6205, 0.7262]}, {"w": "respectively.", "b": [0.6267, 0.7113, 0.723, 0.7262]}, {"w": "It", "b": [0.7312, 0.7113, 0.7448, 0.7262]}, {"w": "then", "b": [0.7509, 0.7113, 0.7862, 0.7262]}, {"w": "trains", "b": [0.7923, 0.7113, 0.8378, 0.7262]}, {"w": "the", "b": [0.844, 0.7113, 0.8691, 0.7262]}, {"w": "new", "b": [0.1312, 0.7292, 0.163, 0.7441]}, {"w": "model", "b": [0.1692, 0.7292, 0.2179, 0.7441]}, {"w": "and", "b": [0.224, 0.7292, 0.2538, 0.7441]}, {"w": "saves", "b": [0.2599, 0.7292, 0.3006, 0.7441]}, {"w": "it", "b": [0.3068, 0.7292, 0.3191, 0.7441]}, {"w": "in", "b": [0.3252, 0.7292, 0.3406, 0.7441]}, {"w": "the", "b": [0.3468, 0.7292, 0.3724, 0.7441]}, {"w": "model", "b": [0.3786, 0.7292, 0.4273, 0.7441]}, {"w": "repository.", "b": [0.4334, 0.7292, 0.5182, 0.7441]}]}, {"id": "b_7", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 20", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "20", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 284, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Figure 5: A machine learning deployment and maintenance automation architecture.", "words": [{"w": "Figure", "b": [0.1574, 0.4232, 0.2095, 0.4382]}, {"w": "5:", "b": [0.2157, 0.4232, 0.23, 0.4382]}, {"w": "A", "b": [0.2382, 0.4232, 0.2521, 0.4382]}, {"w": "machine", "b": [0.2582, 0.4232, 0.3244, 0.4382]}, {"w": "learning", "b": [0.3305, 0.4232, 0.3952, 0.4382]}, {"w": "deployment", "b": [0.4013, 0.4232, 0.4941, 0.4382]}, {"w": "and", "b": [0.5003, 0.4232, 0.53, 0.4382]}, {"w": "maintenance", "b": [0.5362, 0.4232, 0.6372, 0.4382]}, {"w": "automation", "b": [0.6433, 0.4232, 0.7356, 0.4382]}, {"w": "architecture.", "b": [0.7417, 0.4232, 0.8429, 0.4382]}]}, {"id": "b_1", "type": "equation", "text": "Figure 6: On-demand model serving and update with a message broker.", "words": [{"w": "Figure", "b": [0.209, 0.8224, 0.2611, 0.8373]}, {"w": "6:", "b": [0.2673, 0.8224, 0.2816, 0.8373]}, {"w": "On-demand", "b": [0.2898, 0.8224, 0.3842, 0.8373]}, {"w": "model", "b": [0.3903, 0.8224, 0.439, 0.8373]}, {"w": "serving", "b": [0.4452, 0.8224, 0.5023, 0.8373]}, {"w": "and", "b": [0.5084, 0.8224, 0.5381, 0.8373]}, {"w": "update", "b": [0.5443, 0.8224, 0.6002, 0.8373]}, {"w": "with", "b": [0.6063, 0.8224, 0.6422, 0.8373]}, {"w": "a", "b": [0.6484, 0.8224, 0.6576, 0.8373]}, {"w": "message", "b": [0.6637, 0.8224, 0.7286, 0.8373]}, {"w": "broker.", "b": [0.7347, 0.8224, 0.7912, 0.8373]}]}, {"id": "b_2", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 21", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "21", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 285, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Once a new version of the model is placed in the repository, the production runtime pulls,", "words": [{"w": "Once", "b": [0.1312, 0.0884, 0.1723, 0.1033]}, {"w": "a", "b": [0.1784, 0.0884, 0.1876, 0.1033]}, {"w": "new", "b": [0.1938, 0.0884, 0.2256, 0.1033]}, {"w": "version", "b": [0.2317, 0.0884, 0.2883, 0.1033]}, {"w": "of", "b": [0.2944, 0.0884, 0.3093, 0.1033]}, {"w": "the", "b": [0.3154, 0.0884, 0.3411, 0.1033]}, {"w": "model", "b": [0.3473, 0.0884, 0.3959, 0.1033]}, {"w": "is", "b": [0.4021, 0.0884, 0.4145, 0.1033]}, {"w": "placed", "b": [0.4207, 0.0884, 0.472, 0.1033]}, {"w": "in", "b": [0.4781, 0.0884, 0.4935, 0.1033]}, {"w": "the", "b": [0.4996, 0.0884, 0.5253, 0.1033]}, {"w": "repository,", "b": [0.5314, 0.0884, 0.6162, 0.1033]}, {"w": "the", "b": [0.6224, 0.0884, 0.648, 0.1033]}, {"w": "production", "b": [0.6542, 0.0884, 0.7419, 0.1033]}, {"w": "runtime", "b": [0.7481, 0.0884, 0.8112, 0.1033]}, {"w": "pulls,", "b": [0.8173, 0.0884, 0.8605, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "• the new model, from the model repository; • the test data, from the data repository; and, • the code that applies the model to the test data, from the code repository.", "words": [{"w": "•", "b": [0.1538, 0.1153, 0.1681, 0.1303]}, {"w": "the", "b": [0.1774, 0.1153, 0.203, 0.1303]}, {"w": "new", "b": [0.2091, 0.1153, 0.2409, 0.1303]}, {"w": "model,", "b": [0.2471, 0.1153, 0.3009, 0.1303]}, {"w": "from", "b": [0.3071, 0.1153, 0.3445, 0.1303]}, {"w": "the", "b": [0.3507, 0.1153, 0.3763, 0.1303]}, {"w": "model", "b": [0.3825, 0.1153, 0.4312, 0.1303]}, {"w": "repository;", "b": [0.4373, 0.1153, 0.5237, 0.1303]}, {"w": "•", "b": [0.1538, 0.1333, 0.1681, 0.1482]}, {"w": "the", "b": [0.1774, 0.1333, 0.203, 0.1482]}, {"w": "test", "b": [0.2091, 0.1333, 0.239, 0.1482]}, {"w": "data,", "b": [0.2451, 0.1333, 0.2862, 0.1482]}, {"w": "from", "b": [0.2923, 0.1333, 0.3298, 0.1482]}, {"w": "the", "b": [0.3359, 0.1333, 0.3616, 0.1482]}, {"w": "data", "b": [0.3677, 0.1333, 0.4036, 0.1482]}, {"w": "repository;", "b": [0.4098, 0.1333, 0.4961, 0.1482]}, {"w": "and,", "b": [0.5022, 0.1333, 0.5371, 0.1482]}, {"w": "•", "b": [0.1538, 0.1512, 0.1681, 0.1662]}, {"w": "the", "b": [0.1774, 0.1512, 0.203, 0.1662]}, {"w": "code", "b": [0.2091, 0.1512, 0.2456, 0.1662]}, {"w": "that", "b": [0.2517, 0.1512, 0.2855, 0.1662]}, {"w": "applies", "b": [0.2917, 0.1512, 0.3472, 0.1662]}, {"w": "the", "b": [0.3533, 0.1512, 0.379, 0.1662]}, {"w": "model", "b": [0.3851, 0.1512, 0.4338, 0.1662]}, {"w": "to", "b": [0.44, 0.1512, 0.4564, 0.1662]}, {"w": "the", "b": [0.4625, 0.1512, 0.4882, 0.1662]}, {"w": "test", "b": [0.4943, 0.1512, 0.5242, 0.1662]}, {"w": "data,", "b": [0.5303, 0.1512, 0.5713, 0.1662]}, {"w": "from", "b": [0.5775, 0.1512, 0.615, 0.1662]}, {"w": "the", "b": [0.6211, 0.1512, 0.6467, 0.1662]}, {"w": "code", "b": [0.6529, 0.1512, 0.6893, 0.1662]}, {"w": "repository.", "b": [0.6954, 0.1512, 0.7803, 0.1662]}]}, {"id": "b_2", "type": "paragraph", "text": "If the new model passes the test, the old model is withdrawn from production. It is replaced with the new one with the appropriate deployment strategy, as discussed in Section ??. A/B testing or a multi-armed bandit algorithm can help make the replacement decision.", "words": [{"w": "If", "b": [0.1312, 0.1782, 0.1433, 0.1931]}, {"w": "the", "b": [0.1495, 0.1782, 0.1747, 0.1931]}, {"w": "new", "b": [0.1808, 0.1782, 0.212, 0.1931]}, {"w": "model", "b": [0.2182, 0.1782, 0.266, 0.1931]}, {"w": "passes", "b": [0.2722, 0.1782, 0.3208, 0.1931]}, {"w": "the", "b": [0.327, 0.1782, 0.3522, 0.1931]}, {"w": "test,", "b": [0.3583, 0.1782, 0.3927, 0.1931]}, {"w": "the", "b": [0.3988, 0.1782, 0.424, 0.1931]}, {"w": "old", "b": [0.4302, 0.1782, 0.4544, 0.1931]}, {"w": "model", "b": [0.4605, 0.1782, 0.5083, 0.1931]}, {"w": "is", "b": [0.5145, 0.1782, 0.5267, 0.1931]}, {"w": "withdrawn", "b": [0.5328, 0.1782, 0.617, 0.1931]}, {"w": "from", "b": [0.6231, 0.1782, 0.6599, 0.1931]}, {"w": "production.", "b": [0.6661, 0.1782, 0.7573, 0.1931]}, {"w": "It", "b": [0.7655, 0.1782, 0.7791, 0.1931]}, {"w": "is", "b": [0.7852, 0.1782, 0.7974, 0.1931]}, {"w": "replaced", "b": [0.8036, 0.1782, 0.8691, 0.1931]}, {"w": "with", "b": [0.1306, 0.196, 0.1672, 0.2111]}, {"w": "the", "b": [0.175, 0.196, 0.2012, 0.2111]}, {"w": "new", "b": [0.209, 0.196, 0.2415, 0.2111]}, {"w": "one", "b": [0.2493, 0.196, 0.2776, 0.2111]}, {"w": "with", "b": [0.2854, 0.196, 0.322, 0.2111]}, {"w": "the", "b": [0.3299, 0.196, 0.356, 0.2111]}, {"w": "appropriate", "b": [0.3639, 0.196, 0.4592, 0.2111]}, {"w": "deployment", "b": [0.4671, 0.196, 0.5618, 0.2111]}, {"w": "strategy,", "b": [0.5696, 0.196, 0.6399, 0.2111]}, {"w": "as", "b": [0.6482, 0.196, 0.665, 0.2111]}, {"w": "discussed", "b": [0.6729, 0.196, 0.7485, 0.2111]}, {"w": "in", "b": [0.7564, 0.196, 0.7721, 0.2111]}, {"w": "Section", "b": [0.7799, 0.196, 0.8396, 0.2111]}, {"w": "??.", "b": [0.8471, 0.196, 0.8723, 0.2111]}, {"w": "A/B", "b": [0.1312, 0.214, 0.173, 0.2289]}, {"w": "testing", "b": [0.1797, 0.214, 0.2426, 0.2289]}, {"w": "or", "b": [0.2486, 0.2141, 0.2647, 0.2289]}, {"w": "a", "b": [0.2705, 0.2141, 0.2796, 0.2289]}, {"w": "multi-armed", "b": [0.2856, 0.214, 0.3998, 0.2289]}, {"w": "bandit", "b": [0.4065, 0.214, 0.4663, 0.2289]}, {"w": "algorithm", "b": [0.4721, 0.2141, 0.5485, 0.2289]}, {"w": "can", "b": [0.5544, 0.2141, 0.5815, 0.2289]}, {"w": "help", "b": [0.5873, 0.2141, 0.6205, 0.2289]}, {"w": "make", "b": [0.6263, 0.2141, 0.6675, 0.2289]}, {"w": "the", "b": [0.6733, 0.2141, 0.6984, 0.2289]}, {"w": "replacement", "b": [0.7042, 0.2141, 0.7993, 0.2289]}, {"w": "decision.", "b": [0.8051, 0.2141, 0.8725, 0.2289]}]}, {"id": "b_3", "type": "paragraph", "text": "The distribution shift control database accumulates the inputs received by the model, as well as their scoring results. Once a sufficient number of examples is accumulated, that data is sent for validation to a human1 with the goal of detecting distribution shift.", "words": [{"w": "The", "b": [0.1306, 0.2409, 0.1624, 0.2559]}, {"w": "distribution", "b": [0.1686, 0.2409, 0.2777, 0.2559]}, {"w": "shift", "b": [0.2847, 0.2409, 0.3255, 0.2559]}, {"w": "control", "b": [0.3316, 0.2409, 0.3877, 0.2559]}, {"w": "database", "b": [0.3938, 0.2409, 0.4649, 0.2559]}, {"w": "accumulates", "b": [0.471, 0.2409, 0.5692, 0.2559]}, {"w": "the", "b": [0.5754, 0.2409, 0.6011, 0.2559]}, {"w": "inputs", "b": [0.6073, 0.2409, 0.6577, 0.2559]}, {"w": "received", "b": [0.6639, 0.2409, 0.7287, 0.2559]}, {"w": "by", "b": [0.7349, 0.2409, 0.7544, 0.2559]}, {"w": "the", "b": [0.7606, 0.2409, 0.7863, 0.2559]}, {"w": "model,", "b": [0.7924, 0.2409, 0.8463, 0.2559]}, {"w": "as", "b": [0.8525, 0.2409, 0.8691, 0.2559]}, {"w": "well", "b": [0.1306, 0.259, 0.1614, 0.2738]}, {"w": "as", "b": [0.1676, 0.259, 0.1838, 0.2738]}, {"w": "their", "b": [0.19, 0.259, 0.2275, 0.2738]}, {"w": "scoring", "b": [0.2337, 0.259, 0.2894, 0.2738]}, {"w": "results.", "b": [0.2956, 0.259, 0.3525, 0.2738]}, {"w": "Once", "b": [0.3608, 0.259, 0.4012, 0.2738]}, {"w": "a", "b": [0.4074, 0.259, 0.4165, 0.2738]}, {"w": "sufficient", "b": [0.4227, 0.259, 0.493, 0.2738]}, {"w": "number", "b": [0.4992, 0.259, 0.5594, 0.2738]}, {"w": "of", "b": [0.5656, 0.259, 0.5802, 0.2738]}, {"w": "examples", "b": [0.5864, 0.259, 0.6588, 0.2738]}, {"w": "is", "b": [0.665, 0.259, 0.6772, 0.2738]}, {"w": "accumulated,", "b": [0.6834, 0.259, 0.788, 0.2738]}, {"w": "that", "b": [0.7942, 0.259, 0.8276, 0.2738]}, {"w": "data", "b": [0.8337, 0.259, 0.8691, 0.2738]}, {"w": "is", "b": [0.1312, 0.2768, 0.1436, 0.2918]}, {"w": "sent", "b": [0.1498, 0.2768, 0.1822, 0.2918]}, {"w": "for", "b": [0.1884, 0.2768, 0.2105, 0.2918]}, {"w": "validation", "b": [0.2166, 0.2768, 0.2961, 0.2918]}, {"w": "to", "b": [0.3022, 0.2768, 0.3186, 0.2918]}, {"w": "a", "b": [0.3248, 0.2768, 0.334, 0.2918]}, {"w": "human1", "b": [0.3402, 0.2749, 0.4023, 0.2918]}, {"w": "with", "b": [0.4093, 0.2768, 0.4452, 0.2918]}, {"w": "the", "b": [0.4514, 0.2768, 0.477, 0.2918]}, {"w": "goal", "b": [0.4831, 0.2768, 0.5159, 0.2918]}, {"w": "of", "b": [0.5221, 0.2768, 0.537, 0.2918]}, {"w": "detecting", "b": [0.5431, 0.2768, 0.617, 0.2918]}, {"w": "distribution", "b": [0.6231, 0.2768, 0.7176, 0.2918]}, {"w": "shift.", "b": [0.7238, 0.2768, 0.7644, 0.2918]}]}, {"id": "b_4", "type": "paragraph", "text": "In the model streaming scenario, the model update happens when the stream processor’s state is updated (see Section 9.1.2 and Figure 2).", "words": [{"w": "In", "b": [0.1312, 0.3038, 0.148, 0.3187]}, {"w": "the", "b": [0.1542, 0.3038, 0.1797, 0.3187]}, {"w": "model", "b": [0.1858, 0.3037, 0.2421, 0.3187]}, {"w": "streaming", "b": [0.2492, 0.3037, 0.3406, 0.3187]}, {"w": "scenario,", "b": [0.3469, 0.3038, 0.4164, 0.3187]}, {"w": "the", "b": [0.4226, 0.3038, 0.4481, 0.3187]}, {"w": "model", "b": [0.4542, 0.3038, 0.5026, 0.3187]}, {"w": "update", "b": [0.5088, 0.3038, 0.5644, 0.3187]}, {"w": "happens", "b": [0.5705, 0.3038, 0.6364, 0.3187]}, {"w": "when", "b": [0.6425, 0.3038, 0.6843, 0.3187]}, {"w": "the", "b": [0.6905, 0.3038, 0.716, 0.3187]}, {"w": "stream", "b": [0.7222, 0.3038, 0.7763, 0.3187]}, {"w": "processor’s", "b": [0.7825, 0.3038, 0.869, 0.3187]}, {"w": "state", "b": [0.1312, 0.3217, 0.1703, 0.3367]}, {"w": "is", "b": [0.1765, 0.3217, 0.1889, 0.3367]}, {"w": "updated", "b": [0.195, 0.3217, 0.2612, 0.3367]}, {"w": "(see", "b": [0.2673, 0.3217, 0.2982, 0.3367]}, {"w": "Section", "b": [0.3044, 0.3217, 0.3628, 0.3367]}, {"w": "9.1.2", "b": [0.369, 0.3217, 0.4069, 0.3367]}, {"w": "and", "b": [0.413, 0.3217, 0.4428, 0.3367]}, {"w": "Figure", "b": [0.4489, 0.3217, 0.501, 0.3367]}, {"w": "2).", "b": [0.5072, 0.3217, 0.5287, 0.3367]}]}, {"id": "b_5", "type": "paragraph", "text": "Model update in on-demand model serving with a message broker architecture is similar to that of model streaming (see Section 9.2.3 and Figure 3).", "words": [{"w": "Model", "b": [0.1312, 0.3485, 0.1825, 0.3636]}, {"w": "update", "b": [0.1909, 0.3485, 0.2479, 0.3636]}, {"w": "in", "b": [0.2563, 0.3485, 0.272, 0.3636]}, {"w": "on-demand", "b": [0.2805, 0.3486, 0.3831, 0.3635]}, {"w": "model", "b": [0.3927, 0.3486, 0.449, 0.3635]}, {"w": "serving", "b": [0.4587, 0.3486, 0.5251, 0.3635]}, {"w": "with", "b": [0.5337, 0.3485, 0.5703, 0.3636]}, {"w": "a", "b": [0.5787, 0.3485, 0.5881, 0.3636]}, {"w": "message", "b": [0.5967, 0.3486, 0.6715, 0.3635]}, {"w": "broker", "b": [0.6812, 0.3486, 0.7414, 0.3635]}, {"w": "architecture", "b": [0.7498, 0.3485, 0.8478, 0.3636]}, {"w": "is", "b": [0.8562, 0.3485, 0.8688, 0.3636]}, {"w": "similar", "b": [0.1312, 0.3666, 0.1857, 0.3815]}, {"w": "to", "b": [0.1919, 0.3666, 0.2083, 0.3815]}, {"w": "that", "b": [0.2144, 0.3666, 0.2483, 0.3815]}, {"w": "of", "b": [0.2544, 0.3666, 0.2693, 0.3815]}, {"w": "model", "b": [0.2754, 0.3666, 0.3241, 0.3815]}, {"w": "streaming", "b": [0.3303, 0.3666, 0.4094, 0.3815]}, {"w": "(see", "b": [0.4155, 0.3666, 0.4464, 0.3815]}, {"w": "Section", "b": [0.4526, 0.3666, 0.511, 0.3815]}, {"w": "9.2.3", "b": [0.5172, 0.3666, 0.5551, 0.3815]}, {"w": "and", "b": [0.5613, 0.3666, 0.591, 0.3815]}, {"w": "Figure", "b": [0.5972, 0.3666, 0.6493, 0.3815]}, {"w": "3).", "b": [0.6554, 0.3666, 0.6769, 0.3815]}]}, {"id": "b_6", "type": "paragraph", "text": "Figure 6 illustrates a message-broker-based architecture that allows not just serving the model and updating it, but also contains a human labeler in the loop. The labeler receives unlabeled examples, samples some of them, assigns labels to sampled examples, and sends the annotated examples back to the message broker. The model training module reads the labeled examples from a queue. When their quantity is sufficient to significantly update the model, it trains a new model, saves it in the model repository, and sends the “model ready” message to the broker. A model-serving process pulls the new model version from the repository, and discards the current model.", "words": [{"w": "Figure", "b": [0.1312, 0.3934, 0.1844, 0.4085]}, {"w": "6", "b": [0.1919, 0.3934, 0.2014, 0.4085]}, {"w": "illustrates", "b": [0.2089, 0.3934, 0.2897, 0.4085]}, {"w": "a", "b": [0.2973, 0.3934, 0.3067, 0.4085]}, {"w": "message-broker-based", "b": [0.3142, 0.3934, 0.4915, 0.4085]}, {"w": "architecture", "b": [0.499, 0.3934, 0.5969, 0.4085]}, {"w": "that", "b": [0.6045, 0.3934, 0.639, 0.4085]}, {"w": "allows", "b": [0.6466, 0.3934, 0.6964, 0.4085]}, {"w": "not", "b": [0.7039, 0.3934, 0.7311, 0.4085]}, {"w": "just", "b": [0.7387, 0.3934, 0.7696, 0.4085]}, {"w": "serving", "b": [0.7772, 0.3934, 0.8354, 0.4085]}, {"w": "the", "b": [0.843, 0.3934, 0.8691, 0.4085]}, {"w": "model", "b": [0.1312, 0.4115, 0.1796, 0.4264]}, {"w": "and", "b": [0.1857, 0.4115, 0.2153, 0.4264]}, {"w": "updating", "b": [0.2214, 0.4115, 0.2932, 0.4264]}, {"w": "it,", "b": [0.2993, 0.4115, 0.3167, 0.4264]}, {"w": "but", "b": [0.3228, 0.4115, 0.3503, 0.4264]}, {"w": "also", "b": [0.3564, 0.4115, 0.3871, 0.4264]}, {"w": "contains", "b": [0.3932, 0.4115, 0.459, 0.4264]}, {"w": "a", "b": [0.4652, 0.4115, 0.4743, 0.4264]}, {"w": "human", "b": [0.4805, 0.4115, 0.5349, 0.4264]}, {"w": "labeler", "b": [0.541, 0.4114, 0.6037, 0.4264]}, {"w": "in", "b": [0.6098, 0.4115, 0.6251, 0.4264]}, {"w": "the", "b": [0.6313, 0.4115, 0.6567, 0.4264]}, {"w": "loop.", "b": [0.6629, 0.4115, 0.7021, 0.4264]}, {"w": "The", "b": [0.7103, 0.4115, 0.7418, 0.4264]}, {"w": "labeler", "b": [0.748, 0.4115, 0.8015, 0.4264]}, {"w": "receives", "b": [0.8076, 0.4115, 0.8689, 0.4264]}, {"w": "unlabeled", "b": [0.1312, 0.4293, 0.2097, 0.4444]}, {"w": "examples,", "b": [0.2159, 0.4293, 0.2955, 0.4444]}, {"w": "samples", "b": [0.3017, 0.4293, 0.3653, 0.4444]}, {"w": "some", "b": [0.3715, 0.4293, 0.4121, 0.4444]}, {"w": "of", "b": [0.4183, 0.4293, 0.4333, 0.4444]}, {"w": "them,", "b": [0.4395, 0.4293, 0.4863, 0.4444]}, {"w": "assigns", "b": [0.4924, 0.4293, 0.5489, 0.4444]}, {"w": "labels", "b": [0.555, 0.4293, 0.6014, 0.4444]}, {"w": "to", "b": [0.6076, 0.4293, 0.6242, 0.4444]}, {"w": "sampled", "b": [0.6304, 0.4293, 0.697, 0.4444]}, {"w": "examples,", "b": [0.7031, 0.4293, 0.7828, 0.4444]}, {"w": "and", "b": [0.7889, 0.4293, 0.8191, 0.4444]}, {"w": "sends", "b": [0.8252, 0.4293, 0.8691, 0.4444]}, {"w": "the", "b": [0.1312, 0.4473, 0.1571, 0.4623]}, {"w": "annotated", "b": [0.1632, 0.4473, 0.2448, 0.4623]}, {"w": "examples", "b": [0.2509, 0.4473, 0.3249, 0.4623]}, {"w": "back", "b": [0.331, 0.4473, 0.3682, 0.4623]}, {"w": "to", "b": [0.3744, 0.4473, 0.3909, 0.4623]}, {"w": "the", "b": [0.397, 0.4473, 0.4228, 0.4623]}, {"w": "message", "b": [0.429, 0.4473, 0.4943, 0.4623]}, {"w": "broker.", "b": [0.5004, 0.4473, 0.5573, 0.4623]}, {"w": "The", "b": [0.5655, 0.4473, 0.5975, 0.4623]}, {"w": "model", "b": [0.6037, 0.4473, 0.6527, 0.4623]}, {"w": "training", "b": [0.6589, 0.4473, 0.723, 0.4623]}, {"w": "module", "b": [0.7291, 0.4473, 0.7885, 0.4623]}, {"w": "reads", "b": [0.7946, 0.4473, 0.8371, 0.4623]}, {"w": "the", "b": [0.8433, 0.4473, 0.8691, 0.4623]}, {"w": "labeled", "b": [0.1312, 0.4652, 0.1893, 0.4803]}, {"w": "examples", "b": [0.1965, 0.4652, 0.2714, 0.4803]}, {"w": "from", "b": [0.2786, 0.4652, 0.3168, 0.4803]}, {"w": "a", "b": [0.324, 0.4652, 0.3334, 0.4803]}, {"w": "queue.", "b": [0.3405, 0.4652, 0.3934, 0.4803]}, {"w": "When", "b": [0.4047, 0.4652, 0.4533, 0.4803]}, {"w": "their", "b": [0.4605, 0.4652, 0.4993, 0.4803]}, {"w": "quantity", "b": [0.5065, 0.4652, 0.5755, 0.4803]}, {"w": "is", "b": [0.5827, 0.4652, 0.5954, 0.4803]}, {"w": "sufficient", "b": [0.6026, 0.4652, 0.6754, 0.4803]}, {"w": "to", "b": [0.6826, 0.4652, 0.6993, 0.4803]}, {"w": "significantly", "b": [0.7065, 0.4652, 0.8049, 0.4803]}, {"w": "update", "b": [0.8121, 0.4652, 0.8691, 0.4803]}, {"w": "the", "b": [0.1312, 0.4831, 0.1574, 0.4982]}, {"w": "model,", "b": [0.1642, 0.4831, 0.2191, 0.4982]}, {"w": "it", "b": [0.226, 0.4831, 0.2386, 0.4982]}, {"w": "trains", "b": [0.2453, 0.4831, 0.2926, 0.4982]}, {"w": "a", "b": [0.2993, 0.4831, 0.3087, 0.4982]}, {"w": "new", "b": [0.3155, 0.4831, 0.348, 0.4982]}, {"w": "model,", "b": [0.3547, 0.4831, 0.4096, 0.4982]}, {"w": "saves", "b": [0.4166, 0.4831, 0.4581, 0.4982]}, {"w": "it", "b": [0.4649, 0.4831, 0.4775, 0.4982]}, {"w": "in", "b": [0.4842, 0.4831, 0.4999, 0.4982]}, {"w": "the", "b": [0.5067, 0.4831, 0.5329, 0.4982]}, {"w": "model", "b": [0.5396, 0.4831, 0.5893, 0.4982]}, {"w": "repository,", "b": [0.5961, 0.4831, 0.6826, 0.4982]}, {"w": "and", "b": [0.6896, 0.4831, 0.7199, 0.4982]}, {"w": "sends", "b": [0.7267, 0.4831, 0.7708, 0.4982]}, {"w": "the", "b": [0.7776, 0.4831, 0.8038, 0.4982]}, {"w": "“model", "b": [0.8106, 0.4831, 0.8691, 0.4982]}, {"w": "ready”", "b": [0.1312, 0.5013, 0.1835, 0.5161]}, {"w": "message", "b": [0.1896, 0.5013, 0.2531, 0.5161]}, {"w": "to", "b": [0.2591, 0.5013, 0.2752, 0.5161]}, {"w": "the", "b": [0.2812, 0.5013, 0.3064, 0.5161]}, {"w": "broker.", "b": [0.3124, 0.5013, 0.3678, 0.5161]}, {"w": "A", "b": [0.3759, 0.5013, 0.3895, 0.5161]}, {"w": "model-serving", "b": [0.3955, 0.5013, 0.5052, 0.5161]}, {"w": "process", "b": [0.5112, 0.5013, 0.5683, 0.5161]}, {"w": "pulls", "b": [0.5743, 0.5013, 0.6116, 0.5161]}, {"w": "the", "b": [0.6177, 0.5013, 0.6428, 0.5161]}, {"w": "new", "b": [0.6488, 0.5013, 0.68, 0.5161]}, {"w": "model", "b": [0.686, 0.5013, 0.7337, 0.5161]}, {"w": "version", "b": [0.7398, 0.5013, 0.7952, 0.5161]}, {"w": "from", "b": [0.8012, 0.5013, 0.838, 0.5161]}, {"w": "the", "b": [0.844, 0.5013, 0.8691, 0.5161]}, {"w": "repository,", "b": [0.1312, 0.5191, 0.216, 0.5341]}, {"w": "and", "b": [0.2222, 0.5191, 0.2519, 0.5341]}, {"w": "discards", "b": [0.2581, 0.5191, 0.323, 0.5341]}, {"w": "the", "b": [0.3291, 0.5191, 0.3548, 0.5341]}, {"w": "current", "b": [0.3609, 0.5191, 0.419, 0.5341]}, {"w": "model.", "b": [0.4251, 0.5191, 0.4789, 0.5341]}]}, {"id": "b_7", "type": "paragraph", "text": "Let’s outline a few additional considerations for successful model maintenance.", "words": [{"w": "Let’s", "b": [0.1312, 0.546, 0.1706, 0.561]}, {"w": "outline", "b": [0.1767, 0.546, 0.2321, 0.561]}, {"w": "a", "b": [0.2382, 0.546, 0.2475, 0.561]}, {"w": "few", "b": [0.2536, 0.546, 0.2808, 0.561]}, {"w": "additional", "b": [0.2869, 0.546, 0.368, 0.561]}, {"w": "considerations", "b": [0.3741, 0.546, 0.4882, 0.561]}, {"w": "for", "b": [0.4944, 0.546, 0.5165, 0.561]}, {"w": "successful", "b": [0.5226, 0.546, 0.6004, 0.561]}, {"w": "model", "b": [0.6065, 0.546, 0.6552, 0.561]}, {"w": "maintenance.", "b": [0.6614, 0.546, 0.7675, 0.561]}]}, {"id": "b_8", "type": "paragraph", "text": "Many companies use a continuous integration workflow in which the models are trained automatically as soon as new training data becomes available. It is recommended to retrain the model from scratch, by using the entire training data, instead of fine-tuning an existing model on the new examples only.", "words": [{"w": "Many", "b": [0.1312, 0.5728, 0.1778, 0.5879]}, {"w": "companies", "b": [0.1853, 0.5728, 0.2701, 0.5879]}, {"w": "use", "b": [0.2777, 0.5728, 0.3039, 0.5879]}, {"w": "a", "b": [0.3114, 0.5728, 0.3208, 0.5879]}, {"w": "continuous", "b": [0.3284, 0.5728, 0.4164, 0.5879]}, {"w": "integration", "b": [0.4239, 0.5728, 0.5134, 0.5879]}, {"w": "workflow", "b": [0.5209, 0.5728, 0.5936, 0.5879]}, {"w": "in", "b": [0.6011, 0.5728, 0.6168, 0.5879]}, {"w": "which", "b": [0.6244, 0.5728, 0.672, 0.5879]}, {"w": "the", "b": [0.6795, 0.5728, 0.7056, 0.5879]}, {"w": "models", "b": [0.7132, 0.5728, 0.7703, 0.5879]}, {"w": "are", "b": [0.7778, 0.5728, 0.8029, 0.5879]}, {"w": "trained", "b": [0.8105, 0.5728, 0.8691, 0.5879]}, {"w": "automatically", "b": [0.1312, 0.591, 0.2406, 0.6058]}, {"w": "as", "b": [0.2467, 0.591, 0.2631, 0.6058]}, {"w": "soon", "b": [0.2692, 0.591, 0.3055, 0.6058]}, {"w": "as", "b": [0.3116, 0.591, 0.328, 0.6058]}, {"w": "new", "b": [0.3341, 0.591, 0.3657, 0.6058]}, {"w": "training", "b": [0.3718, 0.591, 0.4349, 0.6058]}, {"w": "data", "b": [0.4411, 0.591, 0.4767, 0.6058]}, {"w": "becomes", "b": [0.4828, 0.591, 0.5496, 0.6058]}, {"w": "available.", "b": [0.5557, 0.591, 0.63, 0.6058]}, {"w": "It", "b": [0.6382, 0.591, 0.6519, 0.6058]}, {"w": "is", "b": [0.6581, 0.591, 0.6704, 0.6058]}, {"w": "recommended", "b": [0.6765, 0.591, 0.7865, 0.6058]}, {"w": "to", "b": [0.7926, 0.591, 0.8089, 0.6058]}, {"w": "retrain", "b": [0.815, 0.591, 0.869, 0.6058]}, {"w": "the", "b": [0.1312, 0.6089, 0.1568, 0.6238]}, {"w": "model", "b": [0.163, 0.6089, 0.2116, 0.6238]}, {"w": "from", "b": [0.2178, 0.6089, 0.2551, 0.6238]}, {"w": "scratch,", "b": [0.2613, 0.6089, 0.3234, 0.6238]}, {"w": "by", "b": [0.3296, 0.6089, 0.349, 0.6238]}, {"w": "using", "b": [0.3552, 0.6089, 0.3973, 0.6238]}, {"w": "the", "b": [0.4034, 0.6089, 0.429, 0.6238]}, {"w": "entire", "b": [0.4352, 0.6089, 0.4808, 0.6238]}, {"w": "training", "b": [0.487, 0.6089, 0.5505, 0.6238]}, {"w": "data,", "b": [0.5566, 0.6089, 0.5976, 0.6238]}, {"w": "instead", "b": [0.6037, 0.6089, 0.6612, 0.6238]}, {"w": "of", "b": [0.6673, 0.6089, 0.6822, 0.6238]}, {"w": "fine-tuning", "b": [0.6883, 0.6089, 0.7753, 0.6238]}, {"w": "an", "b": [0.7815, 0.6089, 0.8009, 0.6238]}, {"w": "existing", "b": [0.8071, 0.6089, 0.8691, 0.6238]}, {"w": "model", "b": [0.1312, 0.6268, 0.1799, 0.6418]}, {"w": "on", "b": [0.1861, 0.6268, 0.2056, 0.6418]}, {"w": "the", "b": [0.2117, 0.6268, 0.2374, 0.6418]}, {"w": "new", "b": [0.2435, 0.6268, 0.2753, 0.6418]}, {"w": "examples", "b": [0.2814, 0.6268, 0.3549, 0.6418]}, {"w": "only.", "b": [0.361, 0.6268, 0.399, 0.6418]}]}, {"id": "b_9", "type": "paragraph", "text": "For each training example, it’s recommended to store the labeler’s identity. Furthermore, attach the model version used to generate a specific value in the production database, to that value. Should a problem with the version model be discovered, knowing which database values it generated will allow reprocessing of those specific values only.", "words": [{"w": "For", "b": [0.1312, 0.6536, 0.1588, 0.6687]}, {"w": "each", "b": [0.1654, 0.6536, 0.2015, 0.6687]}, {"w": "training", "b": [0.208, 0.6536, 0.2729, 0.6687]}, {"w": "example,", "b": [0.2795, 0.6536, 0.3522, 0.6687]}, {"w": "it’s", "b": [0.3589, 0.6536, 0.3841, 0.6687]}, {"w": "recommended", "b": [0.3907, 0.6536, 0.5037, 0.6687]}, {"w": "to", "b": [0.5103, 0.6536, 0.527, 0.6687]}, {"w": "store", "b": [0.5336, 0.6536, 0.5735, 0.6687]}, {"w": "the", "b": [0.5801, 0.6536, 0.6062, 0.6687]}, {"w": "labeler’s", "b": [0.6128, 0.6536, 0.6804, 0.6687]}, {"w": "identity.", "b": [0.687, 0.6536, 0.754, 0.6687]}, {"w": "Furthermore,", "b": [0.7635, 0.6536, 0.8717, 0.6687]}, {"w": "attach", "b": [0.1312, 0.6716, 0.183, 0.6867]}, {"w": "the", "b": [0.1897, 0.6716, 0.2158, 0.6867]}, {"w": "model", "b": [0.2225, 0.6716, 0.2722, 0.6867]}, {"w": "version", "b": [0.2788, 0.6716, 0.3365, 0.6867]}, {"w": "used", "b": [0.3432, 0.6716, 0.3799, 0.6867]}, {"w": "to", "b": [0.3866, 0.6716, 0.4033, 0.6867]}, {"w": "generate", "b": [0.41, 0.6716, 0.4791, 0.6867]}, {"w": "a", "b": [0.4858, 0.6716, 0.4952, 0.6867]}, {"w": "specific", "b": [0.5018, 0.6716, 0.5611, 0.6867]}, {"w": "value", "b": [0.5677, 0.6716, 0.6101, 0.6867]}, {"w": "in", "b": [0.6168, 0.6716, 0.6325, 0.6867]}, {"w": "the", "b": [0.6391, 0.6716, 0.6653, 0.6867]}, {"w": "production", "b": [0.672, 0.6716, 0.7614, 0.6867]}, {"w": "database,", "b": [0.7681, 0.6716, 0.8456, 0.6867]}, {"w": "to", "b": [0.8524, 0.6716, 0.8691, 0.6867]}, {"w": "that", "b": [0.1312, 0.6897, 0.1644, 0.7045]}, {"w": "value.", "b": [0.1706, 0.6897, 0.2163, 0.7045]}, {"w": "Should", "b": [0.2246, 0.6897, 0.2789, 0.7045]}, {"w": "a", "b": [0.285, 0.6897, 0.2941, 0.7045]}, {"w": "problem", "b": [0.3002, 0.6897, 0.3647, 0.7045]}, {"w": "with", "b": [0.3708, 0.6897, 0.406, 0.7045]}, {"w": "the", "b": [0.4122, 0.6897, 0.4373, 0.7045]}, {"w": "version", "b": [0.4435, 0.6897, 0.499, 0.7045]}, {"w": "model", "b": [0.5051, 0.6897, 0.5529, 0.7045]}, {"w": "be", "b": [0.5591, 0.6897, 0.5777, 0.7045]}, {"w": "discovered,", "b": [0.5838, 0.6897, 0.67, 0.7045]}, {"w": "knowing", "b": [0.6761, 0.6897, 0.7415, 0.7045]}, {"w": "which", "b": [0.7477, 0.6897, 0.7934, 0.7045]}, {"w": "database", "b": [0.7996, 0.6897, 0.8691, 0.7045]}, {"w": "values", "b": [0.1308, 0.7076, 0.1796, 0.7225]}, {"w": "it", "b": [0.1857, 0.7076, 0.198, 0.7225]}, {"w": "generated", "b": [0.2042, 0.7076, 0.2822, 0.7225]}, {"w": "will", "b": [0.2883, 0.7076, 0.317, 0.7225]}, {"w": "allow", "b": [0.3232, 0.7076, 0.3647, 0.7225]}, {"w": "reprocessing", "b": [0.3709, 0.7076, 0.4691, 0.7225]}, {"w": "of", "b": [0.4753, 0.7076, 0.4901, 0.7225]}, {"w": "those", "b": [0.4963, 0.7076, 0.5384, 0.7225]}, {"w": "specific", "b": [0.5446, 0.7076, 0.6026, 0.7225]}, {"w": "values", "b": [0.6088, 0.7076, 0.6576, 0.7225]}, {"w": "only.", "b": [0.6638, 0.7076, 0.7017, 0.7225]}]}, {"id": "b_10", "type": "paragraph", "text": "If a model is frequently re-trained, it is convenient to store pipeline’s hyperparameters in a configuration system. Google recommends2 the following for a good configuration system:", "words": [{"w": "If", "b": [0.1312, 0.7345, 0.1436, 0.7494]}, {"w": "a", "b": [0.1498, 0.7345, 0.159, 0.7494]}, {"w": "model", "b": [0.1652, 0.7345, 0.2141, 0.7494]}, {"w": "is", "b": [0.2203, 0.7345, 0.2327, 0.7494]}, {"w": "frequently", "b": [0.2389, 0.7345, 0.3204, 0.7494]}, {"w": "re-trained,", "b": [0.3265, 0.7345, 0.4112, 0.7494]}, {"w": "it", "b": [0.4173, 0.7345, 0.4297, 0.7494]}, {"w": "is", "b": [0.4358, 0.7345, 0.4483, 0.7494]}, {"w": "convenient", "b": [0.4545, 0.7345, 0.54, 0.7494]}, {"w": "to", "b": [0.5462, 0.7345, 0.5627, 0.7494]}, {"w": "store", "b": [0.5688, 0.7345, 0.6082, 0.7494]}, {"w": "pipeline’s", "b": [0.6143, 0.7345, 0.6902, 0.7494]}, {"w": "hyperparameters", "b": [0.6963, 0.7345, 0.8321, 0.7494]}, {"w": "in", "b": [0.8383, 0.7345, 0.8537, 0.7494]}, {"w": "a", "b": [0.8599, 0.7345, 0.8692, 0.7494]}, {"w": "configuration", "b": [0.1312, 0.7524, 0.2369, 0.7674]}, {"w": "system.", "b": [0.2431, 0.7524, 0.3033, 0.7674]}, {"w": "Google", "b": [0.3114, 0.7524, 0.3675, 0.7674]}, {"w": "recommends2", "b": [0.3736, 0.7505, 0.4804, 0.7674]}, {"w": "the", "b": [0.4875, 0.7524, 0.5132, 0.7674]}, {"w": "following", "b": [0.5193, 0.7524, 0.5911, 0.7674]}, {"w": "for", "b": [0.5972, 0.7524, 0.6193, 0.7674]}, {"w": "a", "b": [0.6255, 0.7524, 0.6347, 0.7674]}, {"w": "good", "b": [0.6408, 0.7524, 0.6798, 0.7674]}, {"w": "configuration", "b": [0.6859, 0.7524, 0.7916, 0.7674]}, {"w": "system:", "b": [0.7978, 0.7524, 0.858, 0.7674]}]}, {"id": "b_11", "type": "paragraph", "text": "1. It should be easy to specify a configuration as a change from a previous configuration. 2. It should be hard to make manual errors, omissions, or oversights.", "words": [{"w": "1.", "b": [0.1538, 0.7793, 0.1681, 0.7943]}, {"w": "It", "b": [0.1774, 0.7794, 0.1911, 0.7943]}, {"w": "should", "b": [0.1973, 0.7794, 0.2495, 0.7943]}, {"w": "be", "b": [0.2556, 0.7794, 0.2745, 0.7943]}, {"w": "easy", "b": [0.2807, 0.7794, 0.315, 0.7943]}, {"w": "to", "b": [0.3212, 0.7794, 0.3375, 0.7943]}, {"w": "specify", "b": [0.3437, 0.7794, 0.3984, 0.7943]}, {"w": "a", "b": [0.4046, 0.7794, 0.4138, 0.7943]}, {"w": "configuration", "b": [0.4199, 0.7794, 0.5252, 0.7943]}, {"w": "as", "b": [0.5313, 0.7794, 0.5478, 0.7943]}, {"w": "a", "b": [0.5539, 0.7794, 0.5631, 0.7943]}, {"w": "change", "b": [0.5692, 0.7794, 0.6239, 0.7943]}, {"w": "from", "b": [0.63, 0.7794, 0.6674, 0.7943]}, {"w": "a", "b": [0.6735, 0.7794, 0.6827, 0.7943]}, {"w": "previous", "b": [0.6888, 0.7794, 0.7559, 0.7943]}, {"w": "configuration.", "b": [0.7621, 0.7794, 0.8724, 0.7943]}, {"w": "2.", "b": [0.1538, 0.7973, 0.1681, 0.8122]}, {"w": "It", "b": [0.1774, 0.7973, 0.1912, 0.8122]}, {"w": "should", "b": [0.1973, 0.7973, 0.2498, 0.8122]}, {"w": "be", "b": [0.2559, 0.7973, 0.2749, 0.8122]}, {"w": "hard", "b": [0.281, 0.7973, 0.318, 0.8122]}, {"w": "to", "b": [0.3242, 0.7973, 0.3406, 0.8122]}, {"w": "make", "b": [0.3467, 0.7973, 0.3887, 0.8122]}, {"w": "manual", "b": [0.3949, 0.7973, 0.4538, 0.8122]}, {"w": "errors,", "b": [0.46, 0.7973, 0.5115, 0.8122]}, {"w": "omissions,", "b": [0.5177, 0.7973, 0.599, 0.8122]}, {"w": "or", "b": [0.6051, 0.7973, 0.6216, 0.8122]}, {"w": "oversights.", "b": [0.6277, 0.7973, 0.7121, 0.8122]}]}, {"id": "b_12", "type": "paragraph", "text": "1Or to an automated tool, more accurate than the model, that cannot be deployed in production (e.g., too fragile, costly, or slow).", "words": [{"w": "1Or", "b": [0.1518, 0.8241, 0.1774, 0.8379]}, {"w": "to", "b": [0.1823, 0.826, 0.196, 0.8379]}, {"w": "an", "b": [0.2009, 0.826, 0.2172, 0.8379]}, {"w": "automated", "b": [0.2221, 0.826, 0.2938, 0.8379]}, {"w": "tool,", "b": [0.2987, 0.826, 0.329, 0.8379]}, {"w": "more", "b": [0.334, 0.826, 0.3673, 0.8379]}, {"w": "accurate", "b": [0.3723, 0.826, 0.4286, 0.8379]}, {"w": "than", "b": [0.4336, 0.826, 0.4643, 0.8379]}, {"w": "the", "b": [0.4692, 0.826, 0.4906, 0.8379]}, {"w": "model,", "b": [0.4955, 0.826, 0.5403, 0.8379]}, {"w": "that", "b": [0.5453, 0.826, 0.5735, 0.8379]}, {"w": "cannot", "b": [0.5784, 0.826, 0.6237, 0.8379]}, {"w": "be", "b": [0.6286, 0.826, 0.6444, 0.8379]}, {"w": "deployed", "b": [0.6494, 0.826, 0.7078, 0.8379]}, {"w": "in", "b": [0.7127, 0.826, 0.7255, 0.8379]}, {"w": "production", "b": [0.7305, 0.826, 0.8035, 0.8379]}, {"w": "(e.g.,", "b": [0.8084, 0.826, 0.8417, 0.8379]}, {"w": "too", "b": [0.8467, 0.826, 0.8685, 0.8379]}, {"w": "fragile,", "b": [0.1312, 0.8401, 0.1778, 0.8521]}, {"w": "costly,", "b": [0.1831, 0.8401, 0.2258, 0.8521]}, {"w": "or", "b": [0.2311, 0.8401, 0.245, 0.8521]}, {"w": "slow).", "b": [0.2502, 0.8401, 0.29, 0.8521]}]}, {"id": "b_13", "type": "paragraph", "text": "2“Hidden Technical Debt in Machine Learning Systems” by Sculley et al. (2015).", "words": [{"w": "2“Hidden", "b": [0.1518, 0.8525, 0.2161, 0.8663]}, {"w": "Technical", "b": [0.2213, 0.8544, 0.2857, 0.8663]}, {"w": "Debt", "b": [0.291, 0.8544, 0.3247, 0.8663]}, {"w": "in", "b": [0.3299, 0.8544, 0.343, 0.8663]}, {"w": "Machine", "b": [0.3482, 0.8544, 0.4057, 0.8663]}, {"w": "Learning", "b": [0.4109, 0.8544, 0.4712, 0.8663]}, {"w": "Systems”", "b": [0.4765, 0.8544, 0.5394, 0.8663]}, {"w": "by", "b": [0.5446, 0.8544, 0.5611, 0.8663]}, {"w": "Sculley", "b": [0.5664, 0.8544, 0.6147, 0.8663]}, {"w": "et", "b": [0.6199, 0.8544, 0.633, 0.8663]}, {"w": "al.", "b": [0.6382, 0.8544, 0.6548, 0.8663]}, {"w": "(2015).", "b": [0.66, 0.8544, 0.7079, 0.8663]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 22", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "22", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 286, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "3. It should be easy to see, visually, the difference in configuration between two models. 4. It should be easy to automatically assert and verify basic facts about a configuration: number of features used, data dependencies, etc. 5. It should be possible to detect unused or redundant settings. 6. Configurations should undergo a full code review and be checked into a repository.", "words": [{"w": "3.", "b": [0.1538, 0.0884, 0.1681, 0.1033]}, {"w": "It", "b": [0.1774, 0.0884, 0.1912, 0.1033]}, {"w": "should", "b": [0.1973, 0.0884, 0.2498, 0.1033]}, {"w": "be", "b": [0.2559, 0.0884, 0.2749, 0.1033]}, {"w": "easy", "b": [0.281, 0.0884, 0.3155, 0.1033]}, {"w": "to", "b": [0.3217, 0.0884, 0.3381, 0.1033]}, {"w": "see,", "b": [0.3442, 0.0884, 0.373, 0.1033]}, {"w": "visually,", "b": [0.3792, 0.0884, 0.4444, 0.1033]}, {"w": "the", "b": [0.4506, 0.0884, 0.4762, 0.1033]}, {"w": "difference", "b": [0.4823, 0.0884, 0.5588, 0.1033]}, {"w": "in", "b": [0.565, 0.0884, 0.5803, 0.1033]}, {"w": "configuration", "b": [0.5865, 0.0884, 0.6922, 0.1033]}, {"w": "between", "b": [0.6983, 0.0884, 0.7635, 0.1033]}, {"w": "two", "b": [0.7696, 0.0884, 0.7983, 0.1033]}, {"w": "models.", "b": [0.8045, 0.0884, 0.8656, 0.1033]}, {"w": "4.", "b": [0.1538, 0.1063, 0.1681, 0.1213]}, {"w": "It", "b": [0.1774, 0.1063, 0.1912, 0.1213]}, {"w": "should", "b": [0.1974, 0.1063, 0.25, 0.1213]}, {"w": "be", "b": [0.2562, 0.1063, 0.2752, 0.1213]}, {"w": "easy", "b": [0.2814, 0.1063, 0.3159, 0.1213]}, {"w": "to", "b": [0.3221, 0.1063, 0.3386, 0.1213]}, {"w": "automatically", "b": [0.3447, 0.1063, 0.4554, 0.1213]}, {"w": "assert", "b": [0.4615, 0.1063, 0.5081, 0.1213]}, {"w": "and", "b": [0.5143, 0.1063, 0.5441, 0.1213]}, {"w": "verify", "b": [0.5503, 0.1063, 0.5956, 0.1213]}, {"w": "basic", "b": [0.6018, 0.1063, 0.642, 0.1213]}, {"w": "facts", "b": [0.6482, 0.1063, 0.6859, 0.1213]}, {"w": "about", "b": [0.692, 0.1063, 0.7388, 0.1213]}, {"w": "a", "b": [0.745, 0.1063, 0.7543, 0.1213]}, {"w": "configuration:", "b": [0.7604, 0.1063, 0.8716, 0.1213]}, {"w": "number", "b": [0.1774, 0.1243, 0.2384, 0.1392]}, {"w": "of", "b": [0.2446, 0.1243, 0.2594, 0.1392]}, {"w": "features", "b": [0.2656, 0.1243, 0.3288, 0.1392]}, {"w": "used,", "b": [0.335, 0.1243, 0.3761, 0.1392]}, {"w": "data", "b": [0.3823, 0.1243, 0.4182, 0.1392]}, {"w": "dependencies,", "b": [0.4243, 0.1243, 0.5347, 0.1392]}, {"w": "etc.", "b": [0.5408, 0.1243, 0.5696, 0.1392]}, {"w": "5.", "b": [0.1538, 0.1422, 0.1681, 0.1572]}, {"w": "It", "b": [0.1774, 0.1422, 0.1912, 0.1572]}, {"w": "should", "b": [0.1973, 0.1422, 0.2498, 0.1572]}, {"w": "be", "b": [0.2559, 0.1422, 0.2749, 0.1572]}, {"w": "possible", "b": [0.281, 0.1422, 0.3443, 0.1572]}, {"w": "to", "b": [0.3505, 0.1422, 0.3669, 0.1572]}, {"w": "detect", "b": [0.373, 0.1422, 0.4223, 0.1572]}, {"w": "unused", "b": [0.4284, 0.1422, 0.4844, 0.1572]}, {"w": "or", "b": [0.4906, 0.1422, 0.507, 0.1572]}, {"w": "redundant", "b": [0.5132, 0.1422, 0.5958, 0.1572]}, {"w": "settings.", "b": [0.602, 0.1422, 0.6688, 0.1572]}, {"w": "6.", "b": [0.1538, 0.1602, 0.1681, 0.1751]}, {"w": "Configurations", "b": [0.1774, 0.1602, 0.2954, 0.1751]}, {"w": "should", "b": [0.3016, 0.1602, 0.354, 0.1751]}, {"w": "undergo", "b": [0.3601, 0.1602, 0.4248, 0.1751]}, {"w": "a", "b": [0.4309, 0.1602, 0.4402, 0.1751]}, {"w": "full", "b": [0.4463, 0.1602, 0.4725, 0.1751]}, {"w": "code", "b": [0.4786, 0.1602, 0.515, 0.1751]}, {"w": "review", "b": [0.5212, 0.1602, 0.573, 0.1751]}, {"w": "and", "b": [0.5792, 0.1602, 0.6089, 0.1751]}, {"w": "be", "b": [0.6151, 0.1602, 0.6341, 0.1751]}, {"w": "checked", "b": [0.6402, 0.1602, 0.7018, 0.1751]}, {"w": "into", "b": [0.7079, 0.1602, 0.7392, 0.1751]}, {"w": "a", "b": [0.7453, 0.1602, 0.7545, 0.1751]}, {"w": "repository.", "b": [0.7607, 0.1602, 0.8455, 0.1751]}]}, {"id": "b_1", "type": "paragraph", "text": "Make sure that the runtime environment has enough hard drive space and RAM for the updated model. Do not expect that the old version of the model and the new one will only differ in performance. Be ready for the situation where the new model is much larger than the previous one. Similarly, do not expect that the new model will run as fast as the previous one. Inefficiency in the feature extraction code, an additional stage in the pipeline, or a different choice of the algorithm may significantly affect the prediction speed.", "words": [{"w": "Make", "b": [0.1312, 0.187, 0.1757, 0.2021]}, {"w": "sure", "b": [0.1828, 0.187, 0.2165, 0.2021]}, {"w": "that", "b": [0.2236, 0.187, 0.2581, 0.2021]}, {"w": "the", "b": [0.2653, 0.187, 0.2914, 0.2021]}, {"w": "runtime", "b": [0.2985, 0.187, 0.3629, 0.2021]}, {"w": "environment", "b": [0.3701, 0.187, 0.4721, 0.2021]}, {"w": "has", "b": [0.4793, 0.187, 0.5066, 0.2021]}, {"w": "enough", "b": [0.5137, 0.187, 0.5723, 0.2021]}, {"w": "hard", "b": [0.5794, 0.187, 0.6171, 0.2021]}, {"w": "drive", "b": [0.6243, 0.187, 0.6651, 0.2021]}, {"w": "space", "b": [0.6723, 0.187, 0.7163, 0.2021]}, {"w": "and", "b": [0.7235, 0.187, 0.7538, 0.2021]}, {"w": "RAM", "b": [0.7609, 0.187, 0.8062, 0.2021]}, {"w": "for", "b": [0.8133, 0.187, 0.8358, 0.2021]}, {"w": "the", "b": [0.843, 0.187, 0.8691, 0.2021]}, {"w": "updated", "b": [0.1312, 0.205, 0.1976, 0.22]}, {"w": "model.", "b": [0.2037, 0.205, 0.2577, 0.22]}, {"w": "Do", "b": [0.2659, 0.205, 0.2893, 0.22]}, {"w": "not", "b": [0.2955, 0.205, 0.3222, 0.22]}, {"w": "expect", "b": [0.3283, 0.205, 0.3808, 0.22]}, {"w": "that", "b": [0.387, 0.205, 0.4209, 0.22]}, {"w": "the", "b": [0.427, 0.205, 0.4528, 0.22]}, {"w": "old", "b": [0.4589, 0.205, 0.4836, 0.22]}, {"w": "version", "b": [0.4898, 0.205, 0.5465, 0.22]}, {"w": "of", "b": [0.5526, 0.205, 0.5676, 0.22]}, {"w": "the", "b": [0.5737, 0.205, 0.5994, 0.22]}, {"w": "model", "b": [0.6056, 0.205, 0.6544, 0.22]}, {"w": "and", "b": [0.6606, 0.205, 0.6904, 0.22]}, {"w": "the", "b": [0.6965, 0.205, 0.7223, 0.22]}, {"w": "new", "b": [0.7284, 0.205, 0.7603, 0.22]}, {"w": "one", "b": [0.7664, 0.205, 0.7942, 0.22]}, {"w": "will", "b": [0.8004, 0.205, 0.8292, 0.22]}, {"w": "only", "b": [0.8353, 0.205, 0.8698, 0.22]}, {"w": "differ", "b": [0.1312, 0.2229, 0.1732, 0.238]}, {"w": "in", "b": [0.1793, 0.2229, 0.1948, 0.238]}, {"w": "performance.", "b": [0.201, 0.2229, 0.3065, 0.238]}, {"w": "Be", "b": [0.3148, 0.2229, 0.3362, 0.238]}, {"w": "ready", "b": [0.3424, 0.2229, 0.3874, 0.238]}, {"w": "for", "b": [0.3936, 0.2229, 0.4158, 0.238]}, {"w": "the", "b": [0.422, 0.2229, 0.4478, 0.238]}, {"w": "situation", "b": [0.454, 0.2229, 0.5254, 0.238]}, {"w": "where", "b": [0.5316, 0.2229, 0.5792, 0.238]}, {"w": "the", "b": [0.5854, 0.2229, 0.6112, 0.238]}, {"w": "new", "b": [0.6174, 0.2229, 0.6494, 0.238]}, {"w": "model", "b": [0.6556, 0.2229, 0.7047, 0.238]}, {"w": "is", "b": [0.7108, 0.2229, 0.7234, 0.238]}, {"w": "much", "b": [0.7295, 0.2229, 0.7729, 0.238]}, {"w": "larger", "b": [0.7791, 0.2229, 0.8257, 0.238]}, {"w": "than", "b": [0.8319, 0.2229, 0.8691, 0.238]}, {"w": "the", "b": [0.1312, 0.2411, 0.1564, 0.2559]}, {"w": "previous", "b": [0.162, 0.2411, 0.228, 0.2559]}, {"w": "one.", "b": [0.2337, 0.2411, 0.2659, 0.2559]}, {"w": "Similarly,", "b": [0.2739, 0.2411, 0.3483, 0.2559]}, {"w": "do", "b": [0.3541, 0.2411, 0.3732, 0.2559]}, {"w": "not", "b": [0.3788, 0.2411, 0.405, 0.2559]}, {"w": "expect", "b": [0.4106, 0.2411, 0.4619, 0.2559]}, {"w": "that", "b": [0.4676, 0.2411, 0.5008, 0.2559]}, {"w": "the", "b": [0.5064, 0.2411, 0.5316, 0.2559]}, {"w": "new", "b": [0.5372, 0.2411, 0.5684, 0.2559]}, {"w": "model", "b": [0.5741, 0.2411, 0.6218, 0.2559]}, {"w": "will", "b": [0.6275, 0.2411, 0.6556, 0.2559]}, {"w": "run", "b": [0.6613, 0.2411, 0.6885, 0.2559]}, {"w": "as", "b": [0.6942, 0.2411, 0.7104, 0.2559]}, {"w": "fast", "b": [0.716, 0.2411, 0.7448, 0.2559]}, {"w": "as", "b": [0.7505, 0.2411, 0.7666, 0.2559]}, {"w": "the", "b": [0.7723, 0.2411, 0.7975, 0.2559]}, {"w": "previous", "b": [0.8031, 0.2411, 0.8691, 0.2559]}, {"w": "one.", "b": [0.1312, 0.2588, 0.1647, 0.2739]}, {"w": "Inefficiency", "b": [0.1761, 0.2588, 0.2682, 0.2739]}, {"w": "in", "b": [0.2754, 0.2588, 0.2911, 0.2739]}, {"w": "the", "b": [0.2983, 0.2588, 0.3245, 0.2739]}, {"w": "feature", "b": [0.3317, 0.2588, 0.3888, 0.2739]}, {"w": "extraction", "b": [0.396, 0.2588, 0.4792, 0.2739]}, {"w": "code,", "b": [0.4864, 0.2588, 0.5288, 0.2739]}, {"w": "an", "b": [0.5363, 0.2588, 0.5561, 0.2739]}, {"w": "additional", "b": [0.5634, 0.2588, 0.646, 0.2739]}, {"w": "stage", "b": [0.6532, 0.2588, 0.6952, 0.2739]}, {"w": "in", "b": [0.7024, 0.2588, 0.7181, 0.2739]}, {"w": "the", "b": [0.7253, 0.2588, 0.7514, 0.2739]}, {"w": "pipeline,", "b": [0.7587, 0.2588, 0.8282, 0.2739]}, {"w": "or", "b": [0.8357, 0.2588, 0.8525, 0.2739]}, {"w": "a", "b": [0.8597, 0.2588, 0.8691, 0.2739]}, {"w": "different", "b": [0.1312, 0.2768, 0.1979, 0.2918]}, {"w": "choice", "b": [0.2041, 0.2768, 0.2528, 0.2918]}, {"w": "of", "b": [0.259, 0.2768, 0.2738, 0.2918]}, {"w": "the", "b": [0.28, 0.2768, 0.3056, 0.2918]}, {"w": "algorithm", "b": [0.3118, 0.2768, 0.3897, 0.2918]}, {"w": "may", "b": [0.3959, 0.2768, 0.4297, 0.2918]}, {"w": "significantly", "b": [0.4359, 0.2768, 0.5324, 0.2918]}, {"w": "affect", "b": [0.5385, 0.2768, 0.5821, 0.2918]}, {"w": "the", "b": [0.5882, 0.2768, 0.6139, 0.2918]}, {"w": "prediction", "b": [0.62, 0.2768, 0.7011, 0.2918]}, {"w": "speed.", "b": [0.7073, 0.2768, 0.7571, 0.2918]}]}, {"id": "b_2", "type": "paragraph", "text": "Models will inevitably make prediction errors. However, to the business or client, some errors are more costly than others. Once a new model version is deployed, validate it doesn’t make significantly more costly errors than the previous model.", "words": [{"w": "Models", "b": [0.1312, 0.3039, 0.1876, 0.3187]}, {"w": "will", "b": [0.1934, 0.3039, 0.2215, 0.3187]}, {"w": "inevitably", "b": [0.2273, 0.3039, 0.3057, 0.3187]}, {"w": "make", "b": [0.3115, 0.3039, 0.3526, 0.3187]}, {"w": "prediction", "b": [0.3584, 0.3039, 0.4379, 0.3187]}, {"w": "errors.", "b": [0.4436, 0.3039, 0.4942, 0.3187]}, {"w": "However,", "b": [0.5022, 0.3039, 0.5741, 0.3187]}, {"w": "to", "b": [0.5799, 0.3039, 0.596, 0.3187]}, {"w": "the", "b": [0.6018, 0.3039, 0.6269, 0.3187]}, {"w": "business", "b": [0.6327, 0.3039, 0.6973, 0.3187]}, {"w": "or", "b": [0.7031, 0.3039, 0.7192, 0.3187]}, {"w": "client,", "b": [0.725, 0.3039, 0.7728, 0.3187]}, {"w": "some", "b": [0.7786, 0.3039, 0.8179, 0.3187]}, {"w": "errors", "b": [0.8237, 0.3039, 0.8691, 0.3187]}, {"w": "are", "b": [0.1312, 0.3218, 0.1555, 0.3366]}, {"w": "more", "b": [0.1617, 0.3218, 0.2011, 0.3366]}, {"w": "costly", "b": [0.2072, 0.3218, 0.2533, 0.3366]}, {"w": "than", "b": [0.2595, 0.3218, 0.2958, 0.3366]}, {"w": "others.", "b": [0.302, 0.3218, 0.3557, 0.3366]}, {"w": "Once", "b": [0.3639, 0.3218, 0.4043, 0.3366]}, {"w": "a", "b": [0.4104, 0.3218, 0.4195, 0.3366]}, {"w": "new", "b": [0.4257, 0.3218, 0.457, 0.3366]}, {"w": "model", "b": [0.4631, 0.3218, 0.5111, 0.3366]}, {"w": "version", "b": [0.5172, 0.3218, 0.573, 0.3366]}, {"w": "is", "b": [0.5791, 0.3218, 0.5913, 0.3366]}, {"w": "deployed,", "b": [0.5975, 0.3218, 0.6717, 0.3366]}, {"w": "validate", "b": [0.6779, 0.3218, 0.74, 0.3366]}, {"w": "it", "b": [0.7461, 0.3218, 0.7582, 0.3366]}, {"w": "doesn’t", "b": [0.7644, 0.3218, 0.8216, 0.3366]}, {"w": "make", "b": [0.8277, 0.3218, 0.8691, 0.3366]}, {"w": "significantly", "b": [0.1312, 0.3396, 0.2277, 0.3546]}, {"w": "more", "b": [0.2339, 0.3396, 0.2739, 0.3546]}, {"w": "costly", "b": [0.2801, 0.3396, 0.3268, 0.3546]}, {"w": "errors", "b": [0.333, 0.3396, 0.3794, 0.3546]}, {"w": "than", "b": [0.3856, 0.3396, 0.4225, 0.3546]}, {"w": "the", "b": [0.4286, 0.3396, 0.4543, 0.3546]}, {"w": "previous", "b": [0.4604, 0.3396, 0.5277, 0.3546]}, {"w": "model.", "b": [0.5339, 0.3396, 0.5877, 0.3546]}]}, {"id": "b_3", "type": "paragraph", "text": "Check that the errors are distributed uniformly across the user categories. It’s undesirable if the new model negatively affects more users from a minority or specific location.", "words": [{"w": "Check", "b": [0.1312, 0.3667, 0.1797, 0.3815]}, {"w": "that", "b": [0.1859, 0.3667, 0.2192, 0.3815]}, {"w": "the", "b": [0.2253, 0.3667, 0.2506, 0.3815]}, {"w": "errors", "b": [0.2568, 0.3667, 0.3025, 0.3815]}, {"w": "are", "b": [0.3086, 0.3667, 0.3329, 0.3815]}, {"w": "distributed", "b": [0.3391, 0.3667, 0.4261, 0.3815]}, {"w": "uniformly", "b": [0.4323, 0.3667, 0.5091, 0.3815]}, {"w": "across", "b": [0.5152, 0.3667, 0.563, 0.3815]}, {"w": "the", "b": [0.5691, 0.3667, 0.5944, 0.3815]}, {"w": "user", "b": [0.6005, 0.3667, 0.633, 0.3815]}, {"w": "categories.", "b": [0.6392, 0.3667, 0.7221, 0.3815]}, {"w": "It’s", "b": [0.7303, 0.3667, 0.7562, 0.3815]}, {"w": "undesirable", "b": [0.7623, 0.3667, 0.8524, 0.3815]}, {"w": "if", "b": [0.8586, 0.3667, 0.8692, 0.3815]}, {"w": "the", "b": [0.1312, 0.3845, 0.1569, 0.3995]}, {"w": "new", "b": [0.163, 0.3845, 0.1948, 0.3995]}, {"w": "model", "b": [0.201, 0.3845, 0.2497, 0.3995]}, {"w": "negatively", "b": [0.2558, 0.3845, 0.3373, 0.3995]}, {"w": "affects", "b": [0.3435, 0.3845, 0.3944, 0.3995]}, {"w": "more", "b": [0.4005, 0.3845, 0.4405, 0.3995]}, {"w": "users", "b": [0.4467, 0.3845, 0.487, 0.3995]}, {"w": "from", "b": [0.4931, 0.3845, 0.5306, 0.3995]}, {"w": "a", "b": [0.5367, 0.3845, 0.546, 0.3995]}, {"w": "minority", "b": [0.5521, 0.3845, 0.6208, 0.3995]}, {"w": "or", "b": [0.627, 0.3845, 0.6434, 0.3995]}, {"w": "specific", "b": [0.6496, 0.3845, 0.7077, 0.3995]}, {"w": "location.", "b": [0.7138, 0.3845, 0.783, 0.3995]}]}, {"id": "b_4", "type": "paragraph", "text": "If any of the above validations fail, it is not recommended to deploy the new model. Roll it back if the failure is detected after deployment and initiate an investigation. As discussed in Section 9.1, rolling back to the previous model must be as easy as deploying the new model.", "words": [{"w": "If", "b": [0.1312, 0.4114, 0.1435, 0.4264]}, {"w": "any", "b": [0.1497, 0.4114, 0.1784, 0.4264]}, {"w": "of", "b": [0.1845, 0.4114, 0.1994, 0.4264]}, {"w": "the", "b": [0.2055, 0.4114, 0.2312, 0.4264]}, {"w": "above", "b": [0.2373, 0.4114, 0.2834, 0.4264]}, {"w": "validations", "b": [0.2896, 0.4114, 0.3762, 0.4264]}, {"w": "fail,", "b": [0.3824, 0.4114, 0.4126, 0.4264]}, {"w": "it", "b": [0.4188, 0.4114, 0.4311, 0.4264]}, {"w": "is", "b": [0.4372, 0.4114, 0.4496, 0.4264]}, {"w": "not", "b": [0.4558, 0.4114, 0.4824, 0.4264]}, {"w": "recommended", "b": [0.4886, 0.4114, 0.5993, 0.4264]}, {"w": "to", "b": [0.6054, 0.4114, 0.6218, 0.4264]}, {"w": "deploy", "b": [0.628, 0.4114, 0.6802, 0.4264]}, {"w": "the", "b": [0.6864, 0.4114, 0.712, 0.4264]}, {"w": "new", "b": [0.7182, 0.4114, 0.7499, 0.4264]}, {"w": "model.", "b": [0.7561, 0.4114, 0.8099, 0.4264]}, {"w": "Roll", "b": [0.8181, 0.4114, 0.8511, 0.4264]}, {"w": "it", "b": [0.8573, 0.4114, 0.8696, 0.4264]}, {"w": "back", "b": [0.1312, 0.4295, 0.1676, 0.4443]}, {"w": "if", "b": [0.1738, 0.4295, 0.1844, 0.4443]}, {"w": "the", "b": [0.1905, 0.4295, 0.2158, 0.4443]}, {"w": "failure", "b": [0.222, 0.4295, 0.2721, 0.4443]}, {"w": "is", "b": [0.2782, 0.4295, 0.2905, 0.4443]}, {"w": "detected", "b": [0.2966, 0.4295, 0.3634, 0.4443]}, {"w": "after", "b": [0.3695, 0.4295, 0.4065, 0.4443]}, {"w": "deployment", "b": [0.4126, 0.4295, 0.5041, 0.4443]}, {"w": "and", "b": [0.5102, 0.4295, 0.5395, 0.4443]}, {"w": "initiate", "b": [0.5457, 0.4295, 0.6023, 0.4443]}, {"w": "an", "b": [0.6085, 0.4295, 0.6277, 0.4443]}, {"w": "investigation.", "b": [0.6338, 0.4295, 0.7396, 0.4443]}, {"w": "As", "b": [0.7478, 0.4295, 0.7686, 0.4443]}, {"w": "discussed", "b": [0.7747, 0.4295, 0.8479, 0.4443]}, {"w": "in", "b": [0.854, 0.4295, 0.8692, 0.4443]}, {"w": "Section", "b": [0.1312, 0.4474, 0.1893, 0.4623]}, {"w": "9.1,", "b": [0.1954, 0.4474, 0.2239, 0.4623]}, {"w": "rolling", "b": [0.2301, 0.4474, 0.281, 0.4623]}, {"w": "back", "b": [0.2872, 0.4474, 0.3238, 0.4623]}, {"w": "to", "b": [0.33, 0.4474, 0.3463, 0.4623]}, {"w": "the", "b": [0.3524, 0.4474, 0.3779, 0.4623]}, {"w": "previous", "b": [0.384, 0.4474, 0.4509, 0.4623]}, {"w": "model", "b": [0.457, 0.4474, 0.5054, 0.4623]}, {"w": "must", "b": [0.5115, 0.4474, 0.5508, 0.4623]}, {"w": "be", "b": [0.557, 0.4474, 0.5758, 0.4623]}, {"w": "as", "b": [0.582, 0.4474, 0.5984, 0.4623]}, {"w": "easy", "b": [0.6045, 0.4474, 0.6387, 0.4623]}, {"w": "as", "b": [0.6449, 0.4474, 0.6613, 0.4623]}, {"w": "deploying", "b": [0.6674, 0.4474, 0.7438, 0.4623]}, {"w": "the", "b": [0.7499, 0.4474, 0.7754, 0.4623]}, {"w": "new", "b": [0.7815, 0.4474, 0.8131, 0.4623]}, {"w": "model.", "b": [0.8192, 0.4474, 0.8727, 0.4623]}]}, {"id": "b_5", "type": "paragraph", "text": "Beware of model cascading. As discussed in Section ?? of Chapter 6, if the one model’s outputs become inputs for another model, changing one model will affect the performance the other. If your system is using model cascading, be sure to update all models in the cascade.", "words": [{"w": "Beware", "b": [0.1312, 0.4741, 0.1911, 0.4892]}, {"w": "of", "b": [0.1972, 0.4741, 0.2124, 0.4892]}, {"w": "model", "b": [0.22, 0.4742, 0.2763, 0.4892]}, {"w": "cascading.", "b": [0.2833, 0.4741, 0.3767, 0.4892]}, {"w": "As", "b": [0.3849, 0.4741, 0.4064, 0.4892]}, {"w": "discussed", "b": [0.4125, 0.4741, 0.4881, 0.4892]}, {"w": "in", "b": [0.4942, 0.4741, 0.5099, 0.4892]}, {"w": "Section", "b": [0.516, 0.4741, 0.5756, 0.4892]}, {"w": "??", "b": [0.5816, 0.4742, 0.6016, 0.4892]}, {"w": "of", "b": [0.6078, 0.4741, 0.6229, 0.4892]}, {"w": "Chapter", "b": [0.6291, 0.4741, 0.696, 0.4892]}, {"w": "6,", "b": [0.7021, 0.4741, 0.7167, 0.4892]}, {"w": "if", "b": [0.7229, 0.4741, 0.7339, 0.4892]}, {"w": "the", "b": [0.74, 0.4741, 0.7661, 0.4892]}, {"w": "one", "b": [0.7723, 0.4741, 0.8005, 0.4892]}, {"w": "model’s", "b": [0.8066, 0.4741, 0.8689, 0.4892]}, {"w": "outputs", "b": [0.1312, 0.4923, 0.1916, 0.5071]}, {"w": "become", "b": [0.1971, 0.4923, 0.2559, 0.5071]}, {"w": "inputs", "b": [0.2614, 0.4923, 0.3107, 0.5071]}, {"w": "for", "b": [0.3162, 0.4923, 0.3378, 0.5071]}, {"w": "another", "b": [0.3433, 0.4923, 0.4036, 0.5071]}, {"w": "model,", "b": [0.4091, 0.4923, 0.4619, 0.5071]}, {"w": "changing", "b": [0.4675, 0.4923, 0.5373, 0.5071]}, {"w": "one", "b": [0.5428, 0.4923, 0.5699, 0.5071]}, {"w": "model", "b": [0.5754, 0.4923, 0.6231, 0.5071]}, {"w": "will", "b": [0.6286, 0.4923, 0.6567, 0.5071]}, {"w": "affect", "b": [0.6622, 0.4923, 0.7049, 0.5071]}, {"w": "the", "b": [0.7103, 0.4923, 0.7355, 0.5071]}, {"w": "performance", "b": [0.7409, 0.4923, 0.8385, 0.5071]}, {"w": "the", "b": [0.844, 0.4923, 0.8691, 0.5071]}, {"w": "other.", "b": [0.1312, 0.5102, 0.1784, 0.5251]}, {"w": "If", "b": [0.1866, 0.5102, 0.1988, 0.5251]}, {"w": "your", "b": [0.205, 0.5102, 0.2409, 0.5251]}, {"w": "system", "b": [0.247, 0.5102, 0.302, 0.5251]}, {"w": "is", "b": [0.3081, 0.5102, 0.3205, 0.5251]}, {"w": "using", "b": [0.3266, 0.5102, 0.3687, 0.5251]}, {"w": "model", "b": [0.3748, 0.5102, 0.4234, 0.5251]}, {"w": "cascading,", "b": [0.4296, 0.5102, 0.5116, 0.5251]}, {"w": "be", "b": [0.5177, 0.5102, 0.5366, 0.5251]}, {"w": "sure", "b": [0.5428, 0.5102, 0.5757, 0.5251]}, {"w": "to", "b": [0.5818, 0.5102, 0.5982, 0.5251]}, {"w": "update", "b": [0.6044, 0.5102, 0.6601, 0.5251]}, {"w": "all", "b": [0.6663, 0.5102, 0.6857, 0.5251]}, {"w": "models", "b": [0.6919, 0.5102, 0.7477, 0.5251]}, {"w": "in", "b": [0.7539, 0.5102, 0.7692, 0.5251]}, {"w": "the", "b": [0.7754, 0.5102, 0.801, 0.5251]}, {"w": "cascade.", "b": [0.8071, 0.5102, 0.8727, 0.5251]}]}, {"id": "b_6", "type": "paragraph", "text": "9.6 Summary", "words": [{"w": "9.6", "b": [0.1312, 0.5587, 0.1631, 0.5766]}, {"w": "Summary", "b": [0.188, 0.5587, 0.2927, 0.5766]}]}, {"id": "b_7", "type": "paragraph", "text": "An effective runtime has the following properties. It is secure and correct, ensures ease of deployment and recovery, and provides guarantees of model validity. Furthermore, it avoids training/serving skew and hidden feedback loops.", "words": [{"w": "An", "b": [0.1305, 0.5974, 0.1551, 0.6126]}, {"w": "effective", "b": [0.1614, 0.5974, 0.2279, 0.6126]}, {"w": "runtime", "b": [0.2342, 0.5974, 0.2986, 0.6126]}, {"w": "has", "b": [0.3049, 0.5974, 0.3322, 0.6126]}, {"w": "the", "b": [0.3386, 0.5974, 0.3647, 0.6126]}, {"w": "following", "b": [0.371, 0.5974, 0.4442, 0.6126]}, {"w": "properties.", "b": [0.4506, 0.5974, 0.5381, 0.6126]}, {"w": "It", "b": [0.5468, 0.5974, 0.561, 0.6126]}, {"w": "is", "b": [0.5673, 0.5974, 0.58, 0.6126]}, {"w": "secure", "b": [0.5863, 0.5974, 0.6367, 0.6126]}, {"w": "and", "b": [0.643, 0.5974, 0.6733, 0.6126]}, {"w": "correct,", "b": [0.6797, 0.5974, 0.7415, 0.6126]}, {"w": "ensures", "b": [0.7479, 0.5974, 0.8078, 0.6126]}, {"w": "ease", "b": [0.8141, 0.5974, 0.8477, 0.6126]}, {"w": "of", "b": [0.854, 0.5974, 0.8692, 0.6126]}, {"w": "deployment", "b": [0.1312, 0.6155, 0.2237, 0.6305]}, {"w": "and", "b": [0.2298, 0.6155, 0.2595, 0.6305]}, {"w": "recovery,", "b": [0.2656, 0.6155, 0.3357, 0.6305]}, {"w": "and", "b": [0.3419, 0.6155, 0.3715, 0.6305]}, {"w": "provides", "b": [0.3777, 0.6155, 0.4442, 0.6305]}, {"w": "guarantees", "b": [0.4504, 0.6155, 0.5358, 0.6305]}, {"w": "of", "b": [0.542, 0.6155, 0.5568, 0.6305]}, {"w": "model", "b": [0.563, 0.6155, 0.6115, 0.6305]}, {"w": "validity.", "b": [0.6177, 0.6155, 0.681, 0.6305]}, {"w": "Furthermore,", "b": [0.6893, 0.6155, 0.7949, 0.6305]}, {"w": "it", "b": [0.8011, 0.6155, 0.8133, 0.6305]}, {"w": "avoids", "b": [0.8195, 0.6155, 0.8691, 0.6305]}, {"w": "training/serving", "b": [0.1312, 0.6335, 0.2612, 0.6484]}, {"w": "skew", "b": [0.2673, 0.6335, 0.3054, 0.6484]}, {"w": "and", "b": [0.3115, 0.6335, 0.3412, 0.6484]}, {"w": "hidden", "b": [0.3474, 0.6335, 0.4018, 0.6484]}, {"w": "feedback", "b": [0.4079, 0.6335, 0.4772, 0.6484]}, {"w": "loops.", "b": [0.4833, 0.6335, 0.5301, 0.6484]}]}, {"id": "b_8", "type": "paragraph", "text": "Machine learning models are served in either batch or on-demand mode. In on-demand mode, a model can be served to either a human client or a machine. A model is usually served in batch mode when it will be applied to big data and some latency is tolerable.", "words": [{"w": "Machine", "b": [0.1312, 0.6605, 0.1976, 0.6753]}, {"w": "learning", "b": [0.2032, 0.6605, 0.2665, 0.6753]}, {"w": "models", "b": [0.2721, 0.6605, 0.327, 0.6753]}, {"w": "are", "b": [0.3326, 0.6605, 0.3568, 0.6753]}, {"w": "served", "b": [0.3624, 0.6605, 0.4118, 0.6753]}, {"w": "in", "b": [0.4174, 0.6605, 0.4325, 0.6753]}, {"w": "either", "b": [0.438, 0.6605, 0.4833, 0.6753]}, {"w": "batch", "b": [0.4889, 0.6605, 0.5326, 0.6753]}, {"w": "or", "b": [0.5382, 0.6605, 0.5544, 0.6753]}, {"w": "on-demand", "b": [0.56, 0.6605, 0.6474, 0.6753]}, {"w": "mode.", "b": [0.653, 0.6605, 0.7007, 0.6753]}, {"w": "In", "b": [0.7087, 0.6605, 0.7253, 0.6753]}, {"w": "on-demand", "b": [0.7309, 0.6605, 0.8183, 0.6753]}, {"w": "mode,", "b": [0.8239, 0.6605, 0.8717, 0.6753]}, {"w": "a", "b": [0.1312, 0.6783, 0.1405, 0.6933]}, {"w": "model", "b": [0.1467, 0.6783, 0.1958, 0.6933]}, {"w": "can", "b": [0.2019, 0.6783, 0.2298, 0.6933]}, {"w": "be", "b": [0.236, 0.6783, 0.2551, 0.6933]}, {"w": "served", "b": [0.2613, 0.6783, 0.3121, 0.6933]}, {"w": "to", "b": [0.3183, 0.6783, 0.3348, 0.6933]}, {"w": "either", "b": [0.341, 0.6783, 0.3875, 0.6933]}, {"w": "a", "b": [0.3937, 0.6783, 0.403, 0.6933]}, {"w": "human", "b": [0.4091, 0.6783, 0.4645, 0.6933]}, {"w": "client", "b": [0.4706, 0.6783, 0.5146, 0.6933]}, {"w": "or", "b": [0.5207, 0.6783, 0.5373, 0.6933]}, {"w": "a", "b": [0.5435, 0.6783, 0.5527, 0.6933]}, {"w": "machine.", "b": [0.5589, 0.6783, 0.6307, 0.6933]}, {"w": "A", "b": [0.639, 0.6783, 0.6529, 0.6933]}, {"w": "model", "b": [0.6591, 0.6783, 0.7082, 0.6933]}, {"w": "is", "b": [0.7143, 0.6783, 0.7268, 0.6933]}, {"w": "usually", "b": [0.733, 0.6783, 0.7905, 0.6933]}, {"w": "served", "b": [0.7966, 0.6783, 0.8475, 0.6933]}, {"w": "in", "b": [0.8536, 0.6783, 0.8691, 0.6933]}, {"w": "batch", "b": [0.1312, 0.6963, 0.1758, 0.7112]}, {"w": "mode", "b": [0.182, 0.6963, 0.2256, 0.7112]}, {"w": "when", "b": [0.2317, 0.6963, 0.2738, 0.7112]}, {"w": "it", "b": [0.2799, 0.6963, 0.2922, 0.7112]}, {"w": "will", "b": [0.2984, 0.6963, 0.3271, 0.7112]}, {"w": "be", "b": [0.3332, 0.6963, 0.3522, 0.7112]}, {"w": "applied", "b": [0.3583, 0.6963, 0.4168, 0.7112]}, {"w": "to", "b": [0.423, 0.6963, 0.4394, 0.7112]}, {"w": "big", "b": [0.4455, 0.6963, 0.4701, 0.7112]}, {"w": "data", "b": [0.4763, 0.6963, 0.5122, 0.7112]}, {"w": "and", "b": [0.5183, 0.6963, 0.548, 0.7112]}, {"w": "some", "b": [0.5542, 0.6963, 0.5943, 0.7112]}, {"w": "latency", "b": [0.6004, 0.6963, 0.6584, 0.7112]}, {"w": "is", "b": [0.6645, 0.6963, 0.6769, 0.7112]}, {"w": "tolerable.", "b": [0.6831, 0.6963, 0.758, 0.7112]}]}, {"id": "b_9", "type": "paragraph", "text": "When served on-demand to a human, a model is usually wrapped into a REST API. A machine’s data requirements are usually standard and pre-determined, so we often serve it by streaming.", "words": [{"w": "When", "b": [0.1303, 0.7231, 0.1789, 0.7382]}, {"w": "served", "b": [0.1883, 0.7231, 0.2398, 0.7382]}, {"w": "on-demand", "b": [0.2492, 0.7231, 0.3402, 0.7382]}, {"w": "to", "b": [0.3495, 0.7231, 0.3663, 0.7382]}, {"w": "a", "b": [0.3757, 0.7231, 0.3851, 0.7382]}, {"w": "human,", "b": [0.3945, 0.7231, 0.4557, 0.7382]}, {"w": "a", "b": [0.4659, 0.7231, 0.4753, 0.7382]}, {"w": "model", "b": [0.4847, 0.7231, 0.5344, 0.7382]}, {"w": "is", "b": [0.5437, 0.7231, 0.5564, 0.7382]}, {"w": "usually", "b": [0.5658, 0.7231, 0.624, 0.7382]}, {"w": "wrapped", "b": [0.6334, 0.7231, 0.704, 0.7382]}, {"w": "into", "b": [0.7134, 0.7231, 0.7453, 0.7382]}, {"w": "a", "b": [0.7547, 0.7231, 0.7641, 0.7382]}, {"w": "REST", "b": [0.7735, 0.7231, 0.8243, 0.7382]}, {"w": "API.", "b": [0.8336, 0.7231, 0.8726, 0.7382]}, {"w": "A", "b": [0.1305, 0.741, 0.1446, 0.7561]}, {"w": "machine’s", "b": [0.1542, 0.741, 0.2344, 0.7561]}, {"w": "data", "b": [0.244, 0.741, 0.2806, 0.7561]}, {"w": "requirements", "b": [0.2902, 0.741, 0.3961, 0.7561]}, {"w": "are", "b": [0.4057, 0.741, 0.4308, 0.7561]}, {"w": "usually", "b": [0.4404, 0.741, 0.4986, 0.7561]}, {"w": "standard", "b": [0.5082, 0.741, 0.5805, 0.7561]}, {"w": "and", "b": [0.5901, 0.741, 0.6204, 0.7561]}, {"w": "pre-determined,", "b": [0.63, 0.741, 0.7599, 0.7561]}, {"w": "so", "b": [0.7703, 0.741, 0.7871, 0.7561]}, {"w": "we", "b": [0.7967, 0.741, 0.8182, 0.7561]}, {"w": "often", "b": [0.8278, 0.741, 0.8691, 0.7561]}, {"w": "serve", "b": [0.1312, 0.7591, 0.1714, 0.774]}, {"w": "it", "b": [0.1775, 0.7591, 0.1898, 0.774]}, {"w": "by", "b": [0.196, 0.7591, 0.2155, 0.774]}, {"w": "streaming.", "b": [0.2216, 0.7591, 0.3059, 0.774]}]}, {"id": "b_10", "type": "paragraph", "text": "The architecture of a software system intended for the real world must be ready for three phenomena: errors, change, and human nature.", "words": [{"w": "The", "b": [0.1306, 0.7859, 0.163, 0.801]}, {"w": "architecture", "b": [0.1693, 0.7859, 0.2672, 0.801]}, {"w": "of", "b": [0.2736, 0.7859, 0.2887, 0.801]}, {"w": "a", "b": [0.2951, 0.7859, 0.3045, 0.801]}, {"w": "software", "b": [0.3108, 0.7859, 0.3784, 0.801]}, {"w": "system", "b": [0.3847, 0.7859, 0.4409, 0.801]}, {"w": "intended", "b": [0.4472, 0.7859, 0.5179, 0.801]}, {"w": "for", "b": [0.5242, 0.7859, 0.5467, 0.801]}, {"w": "the", "b": [0.5531, 0.7859, 0.5792, 0.801]}, {"w": "real", "b": [0.5855, 0.7859, 0.6159, 0.801]}, {"w": "world", "b": [0.6223, 0.7859, 0.6678, 0.801]}, {"w": "must", "b": [0.6741, 0.7859, 0.7145, 0.801]}, {"w": "be", "b": [0.7208, 0.7859, 0.7402, 0.801]}, {"w": "ready", "b": [0.7465, 0.7859, 0.792, 0.801]}, {"w": "for", "b": [0.7984, 0.7859, 0.8209, 0.801]}, {"w": "three", "b": [0.8272, 0.7859, 0.8691, 0.801]}, {"w": "phenomena:", "b": [0.1312, 0.804, 0.2276, 0.8189]}, {"w": "errors,", "b": [0.2358, 0.804, 0.2874, 0.8189]}, {"w": "change,", "b": [0.2935, 0.804, 0.3535, 0.8189]}, {"w": "and", "b": [0.3597, 0.804, 0.3894, 0.8189]}, {"w": "human", "b": [0.3956, 0.804, 0.4504, 0.8189]}, {"w": "nature.", "b": [0.4565, 0.804, 0.514, 0.8189]}]}, {"id": "b_11", "type": "paragraph", "text": "The model deployed in production must be constantly monitored. The goals of monitoring are to make sure that the model is served correctly, and that the performance of the model", "words": [{"w": "The", "b": [0.1306, 0.8308, 0.1626, 0.8458]}, {"w": "model", "b": [0.1687, 0.8308, 0.2178, 0.8458]}, {"w": "deployed", "b": [0.224, 0.8308, 0.2947, 0.8458]}, {"w": "in", "b": [0.3009, 0.8308, 0.3164, 0.8458]}, {"w": "production", "b": [0.3225, 0.8308, 0.4109, 0.8458]}, {"w": "must", "b": [0.4171, 0.8308, 0.4569, 0.8458]}, {"w": "be", "b": [0.4631, 0.8308, 0.4822, 0.8458]}, {"w": "constantly", "b": [0.4884, 0.8308, 0.5721, 0.8458]}, {"w": "monitored.", "b": [0.5783, 0.8308, 0.6661, 0.8458]}, {"w": "The", "b": [0.6744, 0.8308, 0.7064, 0.8458]}, {"w": "goals", "b": [0.7126, 0.8308, 0.7529, 0.8458]}, {"w": "of", "b": [0.7591, 0.8308, 0.7741, 0.8458]}, {"w": "monitoring", "b": [0.7802, 0.8308, 0.8691, 0.8458]}, {"w": "are", "b": [0.1312, 0.8488, 0.1559, 0.8638]}, {"w": "to", "b": [0.1621, 0.8488, 0.1785, 0.8638]}, {"w": "make", "b": [0.1846, 0.8488, 0.2267, 0.8638]}, {"w": "sure", "b": [0.2328, 0.8488, 0.2658, 0.8638]}, {"w": "that", "b": [0.272, 0.8488, 0.3058, 0.8638]}, {"w": "the", "b": [0.312, 0.8488, 0.3376, 0.8638]}, {"w": "model", "b": [0.3438, 0.8488, 0.3925, 0.8638]}, {"w": "is", "b": [0.3987, 0.8488, 0.4111, 0.8638]}, {"w": "served", "b": [0.4172, 0.8488, 0.4677, 0.8638]}, {"w": "correctly,", "b": [0.4738, 0.8488, 0.5479, 0.8638]}, {"w": "and", "b": [0.554, 0.8488, 0.5838, 0.8638]}, {"w": "that", "b": [0.5899, 0.8488, 0.6238, 0.8638]}, {"w": "the", "b": [0.6299, 0.8488, 0.6556, 0.8638]}, {"w": "performance", "b": [0.6617, 0.8488, 0.7614, 0.8638]}, {"w": "of", "b": [0.7675, 0.8488, 0.7824, 0.8638]}, {"w": "the", "b": [0.7886, 0.8488, 0.8142, 0.8638]}, {"w": "model", "b": [0.8204, 0.8488, 0.8691, 0.8638]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 23", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "23", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 287, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "remains within acceptable limits.", "words": [{"w": "remains", "b": [0.1312, 0.0884, 0.1939, 0.1033]}, {"w": "within", "b": [0.2001, 0.0884, 0.2514, 0.1033]}, {"w": "acceptable", "b": [0.2575, 0.0884, 0.3416, 0.1033]}, {"w": "limits.", "b": [0.3478, 0.0884, 0.3981, 0.1033]}]}, {"id": "b_1", "type": "paragraph", "text": "A variety of things might go wrong with the model in production, in particular:", "words": [{"w": "A", "b": [0.1305, 0.1153, 0.1444, 0.1303]}, {"w": "variety", "b": [0.1505, 0.1153, 0.2054, 0.1303]}, {"w": "of", "b": [0.2116, 0.1153, 0.2265, 0.1303]}, {"w": "things", "b": [0.2326, 0.1153, 0.2819, 0.1303]}, {"w": "might", "b": [0.2881, 0.1153, 0.3347, 0.1303]}, {"w": "go", "b": [0.3409, 0.1153, 0.3593, 0.1303]}, {"w": "wrong", "b": [0.3655, 0.1153, 0.4147, 0.1303]}, {"w": "with", "b": [0.4209, 0.1153, 0.4568, 0.1303]}, {"w": "the", "b": [0.4629, 0.1153, 0.4886, 0.1303]}, {"w": "model", "b": [0.4947, 0.1153, 0.5434, 0.1303]}, {"w": "in", "b": [0.5496, 0.1153, 0.5649, 0.1303]}, {"w": "production,", "b": [0.5711, 0.1153, 0.664, 0.1303]}, {"w": "in", "b": [0.6701, 0.1153, 0.6855, 0.1303]}, {"w": "particular:", "b": [0.6916, 0.1153, 0.7758, 0.1303]}]}, {"id": "b_2", "type": "paragraph", "text": "• additional training data made the model perform worse; • the properties of the production data changed, but the model didn’t; • the feature extraction code was significantly updated, but the model didn’t adapt; • a resource needed to generate a feature changed or became unavailable; • the model is abused or is under an adversarial attack.", "words": [{"w": "•", "b": [0.1538, 0.1422, 0.1681, 0.1572]}, {"w": "additional", "b": [0.1774, 0.1422, 0.2584, 0.1572]}, {"w": "training", "b": [0.2645, 0.1422, 0.3281, 0.1572]}, {"w": "data", "b": [0.3343, 0.1422, 0.3702, 0.1572]}, {"w": "made", "b": [0.3763, 0.1422, 0.4194, 0.1572]}, {"w": "the", "b": [0.4255, 0.1422, 0.4512, 0.1572]}, {"w": "model", "b": [0.4573, 0.1422, 0.506, 0.1572]}, {"w": "perform", "b": [0.5122, 0.1422, 0.5759, 0.1572]}, {"w": "worse;", "b": [0.582, 0.1422, 0.6319, 0.1572]}, {"w": "•", "b": [0.1538, 0.1602, 0.1681, 0.1751]}, {"w": "the", "b": [0.1774, 0.1602, 0.203, 0.1751]}, {"w": "properties", "b": [0.2091, 0.1602, 0.2899, 0.1751]}, {"w": "of", "b": [0.296, 0.1602, 0.3109, 0.1751]}, {"w": "the", "b": [0.317, 0.1602, 0.3427, 0.1751]}, {"w": "production", "b": [0.3488, 0.1602, 0.4366, 0.1751]}, {"w": "data", "b": [0.4427, 0.1602, 0.4786, 0.1751]}, {"w": "changed,", "b": [0.4848, 0.1602, 0.555, 0.1751]}, {"w": "but", "b": [0.5612, 0.1602, 0.5888, 0.1751]}, {"w": "the", "b": [0.595, 0.1602, 0.6206, 0.1751]}, {"w": "model", "b": [0.6268, 0.1602, 0.6755, 0.1751]}, {"w": "didn’t;", "b": [0.6816, 0.1602, 0.735, 0.1751]}, {"w": "•", "b": [0.1538, 0.1781, 0.1681, 0.1931]}, {"w": "the", "b": [0.1774, 0.1781, 0.203, 0.1931]}, {"w": "feature", "b": [0.2091, 0.1781, 0.2651, 0.1931]}, {"w": "extraction", "b": [0.2712, 0.1781, 0.3528, 0.1931]}, {"w": "code", "b": [0.359, 0.1781, 0.3954, 0.1931]}, {"w": "was", "b": [0.4015, 0.1781, 0.4309, 0.1931]}, {"w": "significantly", "b": [0.437, 0.1781, 0.5335, 0.1931]}, {"w": "updated,", "b": [0.5397, 0.1781, 0.611, 0.1931]}, {"w": "but", "b": [0.6171, 0.1781, 0.6448, 0.1931]}, {"w": "the", "b": [0.6509, 0.1781, 0.6766, 0.1931]}, {"w": "model", "b": [0.6827, 0.1781, 0.7314, 0.1931]}, {"w": "didn’t", "b": [0.7376, 0.1781, 0.7858, 0.1931]}, {"w": "adapt;", "b": [0.7919, 0.1781, 0.8432, 0.1931]}, {"w": "•", "b": [0.1538, 0.1961, 0.1681, 0.211]}, {"w": "a", "b": [0.1774, 0.1961, 0.1866, 0.211]}, {"w": "resource", "b": [0.1927, 0.1961, 0.2586, 0.211]}, {"w": "needed", "b": [0.2647, 0.1961, 0.3201, 0.211]}, {"w": "to", "b": [0.3263, 0.1961, 0.3427, 0.211]}, {"w": "generate", "b": [0.3488, 0.1961, 0.4166, 0.211]}, {"w": "a", "b": [0.4227, 0.1961, 0.432, 0.211]}, {"w": "feature", "b": [0.4381, 0.1961, 0.4941, 0.211]}, {"w": "changed", "b": [0.5002, 0.1961, 0.5653, 0.211]}, {"w": "or", "b": [0.5715, 0.1961, 0.5879, 0.211]}, {"w": "became", "b": [0.5941, 0.1961, 0.6541, 0.211]}, {"w": "unavailable;", "b": [0.6602, 0.1961, 0.7556, 0.211]}, {"w": "•", "b": [0.1538, 0.214, 0.1681, 0.229]}, {"w": "the", "b": [0.1774, 0.214, 0.203, 0.229]}, {"w": "model", "b": [0.2091, 0.214, 0.2579, 0.229]}, {"w": "is", "b": [0.264, 0.214, 0.2764, 0.229]}, {"w": "abused", "b": [0.2826, 0.214, 0.3381, 0.229]}, {"w": "or", "b": [0.3442, 0.214, 0.3607, 0.229]}, {"w": "is", "b": [0.3668, 0.214, 0.3792, 0.229]}, {"w": "under", "b": [0.3854, 0.214, 0.4316, 0.229]}, {"w": "an", "b": [0.4377, 0.214, 0.4572, 0.229]}, {"w": "adversarial", "b": [0.4634, 0.214, 0.5508, 0.229]}, {"w": "attack.", "b": [0.5569, 0.214, 0.6123, 0.229]}]}, {"id": "b_3", "type": "paragraph", "text": "An automation must calculate values of the performance metrics critical for the business, and send alerts to the appropriate stakeholders if the values of those metrics change significantly or fall below a threshold. In addition, the monitoring must reveal the distribution shift, numerical instability, and a decreasing computational performance.", "words": [{"w": "An", "b": [0.1305, 0.2411, 0.1541, 0.2559]}, {"w": "automation", "b": [0.1598, 0.2411, 0.2502, 0.2559]}, {"w": "must", "b": [0.2559, 0.2411, 0.2947, 0.2559]}, {"w": "calculate", "b": [0.3004, 0.2411, 0.3697, 0.2559]}, {"w": "values", "b": [0.3754, 0.2411, 0.4232, 0.2559]}, {"w": "of", "b": [0.4289, 0.2411, 0.4435, 0.2559]}, {"w": "the", "b": [0.4492, 0.2411, 0.4743, 0.2559]}, {"w": "performance", "b": [0.48, 0.2411, 0.5776, 0.2559]}, {"w": "metrics", "b": [0.5833, 0.2411, 0.6407, 0.2559]}, {"w": "critical", "b": [0.6464, 0.2411, 0.7007, 0.2559]}, {"w": "for", "b": [0.7064, 0.2411, 0.7281, 0.2559]}, {"w": "the", "b": [0.7337, 0.2411, 0.7589, 0.2559]}, {"w": "business,", "b": [0.7645, 0.2411, 0.8342, 0.2559]}, {"w": "and", "b": [0.84, 0.2411, 0.8691, 0.2559]}, {"w": "send", "b": [0.1312, 0.259, 0.1668, 0.2738]}, {"w": "alerts", "b": [0.173, 0.259, 0.2167, 0.2738]}, {"w": "to", "b": [0.2228, 0.259, 0.2391, 0.2738]}, {"w": "the", "b": [0.2452, 0.259, 0.2705, 0.2738]}, {"w": "appropriate", "b": [0.2767, 0.259, 0.369, 0.2738]}, {"w": "stakeholders", "b": [0.3751, 0.259, 0.4727, 0.2738]}, {"w": "if", "b": [0.4788, 0.259, 0.4894, 0.2738]}, {"w": "the", "b": [0.4956, 0.259, 0.5209, 0.2738]}, {"w": "values", "b": [0.5271, 0.259, 0.5753, 0.2738]}, {"w": "of", "b": [0.5815, 0.259, 0.5962, 0.2738]}, {"w": "those", "b": [0.6023, 0.259, 0.644, 0.2738]}, {"w": "metrics", "b": [0.6501, 0.259, 0.708, 0.2738]}, {"w": "change", "b": [0.7142, 0.259, 0.7684, 0.2738]}, {"w": "significantly", "b": [0.7745, 0.259, 0.8699, 0.2738]}, {"w": "or", "b": [0.1312, 0.2767, 0.148, 0.2918]}, {"w": "fall", "b": [0.1554, 0.2767, 0.181, 0.2918]}, {"w": "below", "b": [0.1884, 0.2767, 0.2354, 0.2918]}, {"w": "a", "b": [0.2428, 0.2767, 0.2522, 0.2918]}, {"w": "threshold.", "b": [0.2596, 0.2767, 0.3414, 0.2918]}, {"w": "In", "b": [0.3532, 0.2767, 0.3705, 0.2918]}, {"w": "addition,", "b": [0.3778, 0.2767, 0.4511, 0.2918]}, {"w": "the", "b": [0.4587, 0.2767, 0.4849, 0.2918]}, {"w": "monitoring", "b": [0.4923, 0.2767, 0.5823, 0.2918]}, {"w": "must", "b": [0.5896, 0.2767, 0.63, 0.2918]}, {"w": "reveal", "b": [0.6374, 0.2767, 0.6856, 0.2918]}, {"w": "the", "b": [0.6929, 0.2767, 0.7191, 0.2918]}, {"w": "distribution", "b": [0.7265, 0.2767, 0.8229, 0.2918]}, {"w": "shift,", "b": [0.8302, 0.2767, 0.8717, 0.2918]}, {"w": "numerical", "b": [0.1312, 0.2948, 0.2097, 0.3097]}, {"w": "instability,", "b": [0.2159, 0.2948, 0.3006, 0.3097]}, {"w": "and", "b": [0.3067, 0.2948, 0.3365, 0.3097]}, {"w": "a", "b": [0.3426, 0.2948, 0.3519, 0.3097]}, {"w": "decreasing", "b": [0.358, 0.2948, 0.4413, 0.3097]}, {"w": "computational", "b": [0.4474, 0.2948, 0.5633, 0.3097]}, {"w": "performance.", "b": [0.5694, 0.2948, 0.6741, 0.3097]}]}, {"id": "b_4", "type": "paragraph", "text": "It is important to log enough information to reproduce any erratic system behavior during an analysis in the future. If the model is served to a front-end user, it’s important to log the user’s context at the moment of the model serving. Additionally, it is useful to include the model input, that is, the features extracted from the context, and the time it took to generate those features. The log could also include the outputs obtained from the model, and time it took to generate it, the new context of the user once they observed the output of the model, and the reaction of the user to the output.", "words": [{"w": "It", "b": [0.1312, 0.3217, 0.1452, 0.3367]}, {"w": "is", "b": [0.1514, 0.3217, 0.1639, 0.3367]}, {"w": "important", "b": [0.17, 0.3217, 0.2517, 0.3367]}, {"w": "to", "b": [0.2579, 0.3217, 0.2744, 0.3367]}, {"w": "log", "b": [0.2806, 0.3217, 0.3044, 0.3367]}, {"w": "enough", "b": [0.3105, 0.3217, 0.3684, 0.3367]}, {"w": "information", "b": [0.3746, 0.3217, 0.4692, 0.3367]}, {"w": "to", "b": [0.4754, 0.3217, 0.4919, 0.3367]}, {"w": "reproduce", "b": [0.4981, 0.3217, 0.5783, 0.3367]}, {"w": "any", "b": [0.5845, 0.3217, 0.6134, 0.3367]}, {"w": "erratic", "b": [0.6196, 0.3217, 0.6725, 0.3367]}, {"w": "system", "b": [0.6786, 0.3217, 0.7341, 0.3367]}, {"w": "behavior", "b": [0.7403, 0.3217, 0.8101, 0.3367]}, {"w": "during", "b": [0.8163, 0.3217, 0.8691, 0.3367]}, {"w": "an", "b": [0.1312, 0.3395, 0.1511, 0.3546]}, {"w": "analysis", "b": [0.1577, 0.3395, 0.2222, 0.3546]}, {"w": "in", "b": [0.2288, 0.3395, 0.2445, 0.3546]}, {"w": "the", "b": [0.2511, 0.3395, 0.2773, 0.3546]}, {"w": "future.", "b": [0.2839, 0.3395, 0.3389, 0.3546]}, {"w": "If", "b": [0.3484, 0.3395, 0.3609, 0.3546]}, {"w": "the", "b": [0.3675, 0.3395, 0.3937, 0.3546]}, {"w": "model", "b": [0.4003, 0.3395, 0.4499, 0.3546]}, {"w": "is", "b": [0.4565, 0.3395, 0.4692, 0.3546]}, {"w": "served", "b": [0.4758, 0.3395, 0.5272, 0.3546]}, {"w": "to", "b": [0.5338, 0.3395, 0.5505, 0.3546]}, {"w": "a", "b": [0.5571, 0.3395, 0.5665, 0.3546]}, {"w": "front-end", "b": [0.5731, 0.3395, 0.6485, 0.3546]}, {"w": "user,", "b": [0.6551, 0.3395, 0.694, 0.3546]}, {"w": "it’s", "b": [0.7007, 0.3395, 0.7259, 0.3546]}, {"w": "important", "b": [0.7325, 0.3395, 0.8151, 0.3546]}, {"w": "to", "b": [0.8217, 0.3395, 0.8385, 0.3546]}, {"w": "log", "b": [0.8451, 0.3395, 0.8691, 0.3546]}, {"w": "the", "b": [0.1312, 0.3575, 0.1571, 0.3726]}, {"w": "user’s", "b": [0.1633, 0.3575, 0.209, 0.3726]}, {"w": "context", "b": [0.2152, 0.3575, 0.2752, 0.3726]}, {"w": "at", "b": [0.2813, 0.3575, 0.2979, 0.3726]}, {"w": "the", "b": [0.304, 0.3575, 0.3299, 0.3726]}, {"w": "moment", "b": [0.3361, 0.3575, 0.4017, 0.3726]}, {"w": "of", "b": [0.4079, 0.3575, 0.4229, 0.3726]}, {"w": "the", "b": [0.429, 0.3575, 0.4549, 0.3726]}, {"w": "model", "b": [0.461, 0.3575, 0.5102, 0.3726]}, {"w": "serving.", "b": [0.5163, 0.3575, 0.5791, 0.3726]}, {"w": "Additionally,", "b": [0.5873, 0.3575, 0.6918, 0.3726]}, {"w": "it", "b": [0.6979, 0.3575, 0.7103, 0.3726]}, {"w": "is", "b": [0.7165, 0.3575, 0.729, 0.3726]}, {"w": "useful", "b": [0.7351, 0.3575, 0.7823, 0.3726]}, {"w": "to", "b": [0.7885, 0.3575, 0.805, 0.3726]}, {"w": "include", "b": [0.8112, 0.3575, 0.8691, 0.3726]}, {"w": "the", "b": [0.1312, 0.3754, 0.1574, 0.3905]}, {"w": "model", "b": [0.1638, 0.3754, 0.2135, 0.3905]}, {"w": "input,", "b": [0.22, 0.3754, 0.2692, 0.3905]}, {"w": "that", "b": [0.2757, 0.3754, 0.3102, 0.3905]}, {"w": "is,", "b": [0.3166, 0.3754, 0.3345, 0.3905]}, {"w": "the", "b": [0.3411, 0.3754, 0.3673, 0.3905]}, {"w": "features", "b": [0.3737, 0.3754, 0.4382, 0.3905]}, {"w": "extracted", "b": [0.4447, 0.3754, 0.5216, 0.3905]}, {"w": "from", "b": [0.5281, 0.3754, 0.5663, 0.3905]}, {"w": "the", "b": [0.5728, 0.3754, 0.5989, 0.3905]}, {"w": "context,", "b": [0.6054, 0.3754, 0.6713, 0.3905]}, {"w": "and", "b": [0.6778, 0.3754, 0.7082, 0.3905]}, {"w": "the", "b": [0.7146, 0.3754, 0.7408, 0.3905]}, {"w": "time", "b": [0.7472, 0.3754, 0.7839, 0.3905]}, {"w": "it", "b": [0.7903, 0.3754, 0.8029, 0.3905]}, {"w": "took", "b": [0.8093, 0.3754, 0.8459, 0.3905]}, {"w": "to", "b": [0.8524, 0.3754, 0.8691, 0.3905]}, {"w": "generate", "b": [0.1312, 0.3934, 0.2003, 0.4085]}, {"w": "those", "b": [0.2069, 0.3934, 0.2499, 0.4085]}, {"w": "features.", "b": [0.2565, 0.3934, 0.3263, 0.4085]}, {"w": "The", "b": [0.3358, 0.3934, 0.3682, 0.4085]}, {"w": "log", "b": [0.3748, 0.3934, 0.3989, 0.4085]}, {"w": "could", "b": [0.4055, 0.3934, 0.4494, 0.4085]}, {"w": "also", "b": [0.456, 0.3934, 0.4875, 0.4085]}, {"w": "include", "b": [0.4941, 0.3934, 0.5527, 0.4085]}, {"w": "the", "b": [0.5593, 0.3934, 0.5854, 0.4085]}, {"w": "outputs", "b": [0.592, 0.3934, 0.6549, 0.4085]}, {"w": "obtained", "b": [0.6615, 0.3934, 0.7326, 0.4085]}, {"w": "from", "b": [0.7392, 0.3934, 0.7775, 0.4085]}, {"w": "the", "b": [0.7841, 0.3934, 0.8102, 0.4085]}, {"w": "model,", "b": [0.8168, 0.3934, 0.8717, 0.4085]}, {"w": "and", "b": [0.1312, 0.4116, 0.1604, 0.4264]}, {"w": "time", "b": [0.1664, 0.4116, 0.2016, 0.4264]}, {"w": "it", "b": [0.2076, 0.4116, 0.2197, 0.4264]}, {"w": "took", "b": [0.2257, 0.4116, 0.2609, 0.4264]}, {"w": "to", "b": [0.267, 0.4116, 0.283, 0.4264]}, {"w": "generate", "b": [0.2891, 0.4116, 0.3555, 0.4264]}, {"w": "it,", "b": [0.3615, 0.4116, 0.3786, 0.4264]}, {"w": "the", "b": [0.3847, 0.4116, 0.4098, 0.4264]}, {"w": "new", "b": [0.4159, 0.4116, 0.447, 0.4264]}, {"w": "context", "b": [0.4531, 0.4116, 0.5113, 0.4264]}, {"w": "of", "b": [0.5174, 0.4116, 0.532, 0.4264]}, {"w": "the", "b": [0.538, 0.4116, 0.5631, 0.4264]}, {"w": "user", "b": [0.5692, 0.4116, 0.6015, 0.4264]}, {"w": "once", "b": [0.6076, 0.4116, 0.6427, 0.4264]}, {"w": "they", "b": [0.6488, 0.4116, 0.6835, 0.4264]}, {"w": "observed", "b": [0.6895, 0.4116, 0.758, 0.4264]}, {"w": "the", "b": [0.7641, 0.4116, 0.7892, 0.4264]}, {"w": "output", "b": [0.7952, 0.4116, 0.8485, 0.4264]}, {"w": "of", "b": [0.8546, 0.4116, 0.8691, 0.4264]}, {"w": "the", "b": [0.1312, 0.4294, 0.1569, 0.4443]}, {"w": "model,", "b": [0.163, 0.4294, 0.2169, 0.4443]}, {"w": "and", "b": [0.223, 0.4294, 0.2527, 0.4443]}, {"w": "the", "b": [0.2589, 0.4294, 0.2845, 0.4443]}, {"w": "reaction", "b": [0.2907, 0.4294, 0.3554, 0.4443]}, {"w": "of", "b": [0.3615, 0.4294, 0.3764, 0.4443]}, {"w": "the", "b": [0.3825, 0.4294, 0.4082, 0.4443]}, {"w": "user", "b": [0.4143, 0.4294, 0.4473, 0.4443]}, {"w": "to", "b": [0.4534, 0.4294, 0.4699, 0.4443]}, {"w": "the", "b": [0.476, 0.4294, 0.5016, 0.4443]}, {"w": "output.", "b": [0.5078, 0.4294, 0.5673, 0.4443]}]}, {"id": "b_5", "type": "paragraph", "text": "Some users can utilize your model as a basis for their own business. They might reverse- engineer the training data, or learn how to “trick” your model. To prevent abuse:", "words": [{"w": "Some", "b": [0.1312, 0.4562, 0.1752, 0.4713]}, {"w": "users", "b": [0.1819, 0.4562, 0.223, 0.4713]}, {"w": "can", "b": [0.2298, 0.4562, 0.2581, 0.4713]}, {"w": "utilize", "b": [0.2649, 0.4562, 0.3151, 0.4713]}, {"w": "your", "b": [0.3219, 0.4562, 0.3585, 0.4713]}, {"w": "model", "b": [0.3653, 0.4562, 0.415, 0.4713]}, {"w": "as", "b": [0.4218, 0.4562, 0.4386, 0.4713]}, {"w": "a", "b": [0.4454, 0.4562, 0.4549, 0.4713]}, {"w": "basis", "b": [0.4616, 0.4562, 0.5016, 0.4713]}, {"w": "for", "b": [0.5084, 0.4562, 0.5309, 0.4713]}, {"w": "their", "b": [0.5377, 0.4562, 0.5765, 0.4713]}, {"w": "own", "b": [0.5833, 0.4562, 0.6162, 0.4713]}, {"w": "business.", "b": [0.623, 0.4562, 0.6956, 0.4713]}, {"w": "They", "b": [0.7057, 0.4562, 0.748, 0.4713]}, {"w": "might", "b": [0.7548, 0.4562, 0.8024, 0.4713]}, {"w": "reverse-", "b": [0.8092, 0.4562, 0.8722, 0.4713]}, {"w": "engineer", "b": [0.1312, 0.4743, 0.198, 0.4892]}, {"w": "the", "b": [0.2041, 0.4743, 0.2298, 0.4892]}, {"w": "training", "b": [0.2359, 0.4743, 0.2995, 0.4892]}, {"w": "data,", "b": [0.3057, 0.4743, 0.3467, 0.4892]}, {"w": "or", "b": [0.3528, 0.4743, 0.3693, 0.4892]}, {"w": "learn", "b": [0.3754, 0.4743, 0.4155, 0.4892]}, {"w": "how", "b": [0.4216, 0.4743, 0.4539, 0.4892]}, {"w": "to", "b": [0.4601, 0.4743, 0.4765, 0.4892]}, {"w": "“trick”", "b": [0.4826, 0.4743, 0.537, 0.4892]}, {"w": "your", "b": [0.5432, 0.4743, 0.5791, 0.4892]}, {"w": "model.", "b": [0.5853, 0.4743, 0.6391, 0.4892]}, {"w": "To", "b": [0.6473, 0.4743, 0.6683, 0.4892]}, {"w": "prevent", "b": [0.6745, 0.4743, 0.7345, 0.4892]}, {"w": "abuse:", "b": [0.7407, 0.4743, 0.791, 0.4892]}]}, {"id": "b_6", "type": "paragraph", "text": "• don’t trust the data from a user unless similar data comes from multiple users, • assign a reputation score to each user and don’t trust the data obtained from users with low reputations, • classify user behavior as normal or abnormal, • make users pay per request, • make progressively longer pauses, and • block some users.", "words": [{"w": "•", "b": [0.1538, 0.5012, 0.1681, 0.5161]}, {"w": "don’t", "b": [0.1774, 0.5012, 0.2194, 0.5161]}, {"w": "trust", "b": [0.2255, 0.5012, 0.2647, 0.5161]}, {"w": "the", "b": [0.2708, 0.5012, 0.2965, 0.5161]}, {"w": "data", "b": [0.3026, 0.5012, 0.3385, 0.5161]}, {"w": "from", "b": [0.3447, 0.5012, 0.3821, 0.5161]}, {"w": "a", "b": [0.3883, 0.5012, 0.3975, 0.5161]}, {"w": "user", "b": [0.4037, 0.5012, 0.4366, 0.5161]}, {"w": "unless", "b": [0.4428, 0.5012, 0.4912, 0.5161]}, {"w": "similar", "b": [0.4974, 0.5012, 0.5519, 0.5161]}, {"w": "data", "b": [0.558, 0.5012, 0.5939, 0.5161]}, {"w": "comes", "b": [0.6, 0.5012, 0.6483, 0.5161]}, {"w": "from", "b": [0.6545, 0.5012, 0.6919, 0.5161]}, {"w": "multiple", "b": [0.6981, 0.5012, 0.7642, 0.5161]}, {"w": "users,", "b": [0.7704, 0.5012, 0.8158, 0.5161]}, {"w": "•", "b": [0.1538, 0.5191, 0.1681, 0.5341]}, {"w": "assign", "b": [0.1774, 0.519, 0.2267, 0.5341]}, {"w": "a", "b": [0.2334, 0.519, 0.2428, 0.5341]}, {"w": "reputation", "b": [0.2495, 0.519, 0.3353, 0.5341]}, {"w": "score", "b": [0.342, 0.519, 0.3829, 0.5341]}, {"w": "to", "b": [0.3896, 0.519, 0.4063, 0.5341]}, {"w": "each", "b": [0.413, 0.519, 0.4491, 0.5341]}, {"w": "user", "b": [0.4558, 0.519, 0.4894, 0.5341]}, {"w": "and", "b": [0.4961, 0.519, 0.5264, 0.5341]}, {"w": "don’t", "b": [0.5331, 0.519, 0.576, 0.5341]}, {"w": "trust", "b": [0.5827, 0.519, 0.6226, 0.5341]}, {"w": "the", "b": [0.6292, 0.519, 0.6554, 0.5341]}, {"w": "data", "b": [0.6621, 0.519, 0.6987, 0.5341]}, {"w": "obtained", "b": [0.7053, 0.519, 0.7765, 0.5341]}, {"w": "from", "b": [0.7832, 0.519, 0.8214, 0.5341]}, {"w": "users", "b": [0.828, 0.519, 0.8691, 0.5341]}, {"w": "with", "b": [0.1767, 0.5371, 0.2126, 0.552]}, {"w": "low", "b": [0.2187, 0.5371, 0.2459, 0.552]}, {"w": "reputations,", "b": [0.252, 0.5371, 0.3486, 0.552]}, {"w": "•", "b": [0.1538, 0.555, 0.1681, 0.57]}, {"w": "classify", "b": [0.1774, 0.555, 0.235, 0.57]}, {"w": "user", "b": [0.2412, 0.555, 0.2741, 0.57]}, {"w": "behavior", "b": [0.2803, 0.555, 0.3496, 0.57]}, {"w": "as", "b": [0.3557, 0.555, 0.3722, 0.57]}, {"w": "normal", "b": [0.3784, 0.555, 0.4348, 0.57]}, {"w": "or", "b": [0.441, 0.555, 0.4574, 0.57]}, {"w": "abnormal,", "b": [0.4636, 0.555, 0.5446, 0.57]}, {"w": "•", "b": [0.1538, 0.573, 0.1681, 0.5879]}, {"w": "make", "b": [0.1774, 0.573, 0.2194, 0.5879]}, {"w": "users", "b": [0.2255, 0.573, 0.2658, 0.5879]}, {"w": "pay", "b": [0.272, 0.573, 0.3007, 0.5879]}, {"w": "per", "b": [0.3068, 0.573, 0.333, 0.5879]}, {"w": "request,", "b": [0.3392, 0.573, 0.4024, 0.5879]}, {"w": "•", "b": [0.1538, 0.5909, 0.1681, 0.6059]}, {"w": "make", "b": [0.1774, 0.5909, 0.2194, 0.6059]}, {"w": "progressively", "b": [0.2255, 0.5909, 0.3289, 0.6059]}, {"w": "longer", "b": [0.3351, 0.5909, 0.3844, 0.6059]}, {"w": "pauses,", "b": [0.3905, 0.5909, 0.4482, 0.6059]}, {"w": "and", "b": [0.4543, 0.5909, 0.484, 0.6059]}, {"w": "•", "b": [0.1538, 0.6089, 0.1681, 0.6238]}, {"w": "block", "b": [0.1774, 0.6089, 0.2199, 0.6238]}, {"w": "some", "b": [0.2261, 0.6089, 0.2662, 0.6238]}, {"w": "users.", "b": [0.2723, 0.6089, 0.3177, 0.6238]}]}, {"id": "b_7", "type": "paragraph", "text": "Most machine learning models must be regularly or occasionally updated. The rate of updates depends on several factors:", "words": [{"w": "Most", "b": [0.1312, 0.6359, 0.171, 0.6507]}, {"w": "machine", "b": [0.1761, 0.6359, 0.2409, 0.6507]}, {"w": "learning", "b": [0.2459, 0.6359, 0.3093, 0.6507]}, {"w": "models", "b": [0.3143, 0.6359, 0.3692, 0.6507]}, {"w": "must", "b": [0.3742, 0.6359, 0.413, 0.6507]}, {"w": "be", "b": [0.418, 0.6359, 0.4366, 0.6507]}, {"w": "regularly", "b": [0.4417, 0.6359, 0.5116, 0.6507]}, {"w": "or", "b": [0.5167, 0.6359, 0.5328, 0.6507]}, {"w": "occasionally", "b": [0.5378, 0.6359, 0.6324, 0.6507]}, {"w": "updated.", "b": [0.6375, 0.6359, 0.7073, 0.6507]}, {"w": "The", "b": [0.7152, 0.6359, 0.7463, 0.6507]}, {"w": "rate", "b": [0.7513, 0.6359, 0.7825, 0.6507]}, {"w": "of", "b": [0.7876, 0.6359, 0.8022, 0.6507]}, {"w": "updates", "b": [0.8072, 0.6359, 0.8691, 0.6507]}, {"w": "depends", "b": [0.1312, 0.6537, 0.1965, 0.6687]}, {"w": "on", "b": [0.2026, 0.6537, 0.2221, 0.6687]}, {"w": "several", "b": [0.2283, 0.6537, 0.2828, 0.6687]}, {"w": "factors:", "b": [0.2889, 0.6537, 0.348, 0.6687]}]}, {"id": "b_8", "type": "paragraph", "text": "• how often it makes errors and how critical they are, • how “fresh” the model should be to be useful, • how fast new training data becomes available, • how much time it takes to retrain a model, • how costly it is to train and deploy the model, and • how much a model update contributes to the achievement of user goals.", "words": [{"w": "•", "b": [0.1538, 0.6806, 0.1681, 0.6956]}, {"w": "how", "b": [0.1774, 0.6806, 0.2096, 0.6956]}, {"w": "often", "b": [0.2158, 0.6806, 0.2563, 0.6956]}, {"w": "it", "b": [0.2625, 0.6806, 0.2748, 0.6956]}, {"w": "makes", "b": [0.2809, 0.6806, 0.3302, 0.6956]}, {"w": "errors", "b": [0.3364, 0.6806, 0.3828, 0.6956]}, {"w": "and", "b": [0.389, 0.6806, 0.4187, 0.6956]}, {"w": "how", "b": [0.4248, 0.6806, 0.4571, 0.6956]}, {"w": "critical", "b": [0.4633, 0.6806, 0.5187, 0.6956]}, {"w": "they", "b": [0.5248, 0.6806, 0.5602, 0.6956]}, {"w": "are,", "b": [0.5664, 0.6806, 0.5962, 0.6956]}, {"w": "•", "b": [0.1538, 0.6986, 0.1681, 0.7135]}, {"w": "how", "b": [0.1774, 0.6986, 0.2096, 0.7135]}, {"w": "“fresh”", "b": [0.2158, 0.6986, 0.2718, 0.7135]}, {"w": "the", "b": [0.278, 0.6986, 0.3036, 0.7135]}, {"w": "model", "b": [0.3098, 0.6986, 0.3585, 0.7135]}, {"w": "should", "b": [0.3646, 0.6986, 0.4171, 0.7135]}, {"w": "be", "b": [0.4232, 0.6986, 0.4422, 0.7135]}, {"w": "to", "b": [0.4483, 0.6986, 0.4647, 0.7135]}, {"w": "be", "b": [0.4709, 0.6986, 0.4899, 0.7135]}, {"w": "useful,", "b": [0.496, 0.6986, 0.5479, 0.7135]}, {"w": "•", "b": [0.1538, 0.7165, 0.1681, 0.7315]}, {"w": "how", "b": [0.1774, 0.7165, 0.2096, 0.7315]}, {"w": "fast", "b": [0.2158, 0.7165, 0.2451, 0.7315]}, {"w": "new", "b": [0.2513, 0.7165, 0.2831, 0.7315]}, {"w": "training", "b": [0.2892, 0.7165, 0.3528, 0.7315]}, {"w": "data", "b": [0.359, 0.7165, 0.3949, 0.7315]}, {"w": "becomes", "b": [0.401, 0.7165, 0.4683, 0.7315]}, {"w": "available,", "b": [0.4744, 0.7165, 0.5493, 0.7315]}, {"w": "•", "b": [0.1538, 0.7345, 0.1681, 0.7494]}, {"w": "how", "b": [0.1774, 0.7345, 0.2096, 0.7494]}, {"w": "much", "b": [0.2158, 0.7345, 0.2589, 0.7494]}, {"w": "time", "b": [0.265, 0.7345, 0.3009, 0.7494]}, {"w": "it", "b": [0.307, 0.7345, 0.3193, 0.7494]}, {"w": "takes", "b": [0.3255, 0.7345, 0.3666, 0.7494]}, {"w": "to", "b": [0.3728, 0.7345, 0.3892, 0.7494]}, {"w": "retrain", "b": [0.3953, 0.7345, 0.4498, 0.7494]}, {"w": "a", "b": [0.4559, 0.7345, 0.4652, 0.7494]}, {"w": "model,", "b": [0.4713, 0.7345, 0.5251, 0.7494]}, {"w": "•", "b": [0.1538, 0.7524, 0.1681, 0.7674]}, {"w": "how", "b": [0.1774, 0.7524, 0.2096, 0.7674]}, {"w": "costly", "b": [0.2158, 0.7524, 0.2626, 0.7674]}, {"w": "it", "b": [0.2687, 0.7524, 0.281, 0.7674]}, {"w": "is", "b": [0.2872, 0.7524, 0.2996, 0.7674]}, {"w": "to", "b": [0.3057, 0.7524, 0.3221, 0.7674]}, {"w": "train", "b": [0.3283, 0.7524, 0.3673, 0.7674]}, {"w": "and", "b": [0.3735, 0.7524, 0.4032, 0.7674]}, {"w": "deploy", "b": [0.4093, 0.7524, 0.4616, 0.7674]}, {"w": "the", "b": [0.4678, 0.7524, 0.4934, 0.7674]}, {"w": "model,", "b": [0.4996, 0.7524, 0.5534, 0.7674]}, {"w": "and", "b": [0.5596, 0.7524, 0.5893, 0.7674]}, {"w": "•", "b": [0.1538, 0.7704, 0.1681, 0.7853]}, {"w": "how", "b": [0.1774, 0.7704, 0.2096, 0.7853]}, {"w": "much", "b": [0.2158, 0.7704, 0.2589, 0.7853]}, {"w": "a", "b": [0.265, 0.7704, 0.2742, 0.7853]}, {"w": "model", "b": [0.2804, 0.7704, 0.3291, 0.7853]}, {"w": "update", "b": [0.3352, 0.7704, 0.3911, 0.7853]}, {"w": "contributes", "b": [0.3973, 0.7704, 0.4872, 0.7853]}, {"w": "to", "b": [0.4933, 0.7704, 0.5097, 0.7853]}, {"w": "the", "b": [0.5159, 0.7704, 0.5415, 0.7853]}, {"w": "achievement", "b": [0.5477, 0.7704, 0.6461, 0.7853]}, {"w": "of", "b": [0.6523, 0.7704, 0.6671, 0.7853]}, {"w": "user", "b": [0.6733, 0.7704, 0.7063, 0.7853]}, {"w": "goals.", "b": [0.7124, 0.7704, 0.7576, 0.7853]}]}, {"id": "b_9", "type": "paragraph", "text": "After a model update, a good practice is to run the model against the examples in the end-to-end and confidence test sets. It’s important to make sure that the outputs are either the same as before, or that the changes are as expected. It’s also important to validate that the new model doesn’t make significantly more costly errors than the previous model.", "words": [{"w": "After", "b": [0.1305, 0.7972, 0.1735, 0.8123]}, {"w": "a", "b": [0.1813, 0.7972, 0.1907, 0.8123]}, {"w": "model", "b": [0.1985, 0.7972, 0.2481, 0.8123]}, {"w": "update,", "b": [0.2559, 0.7972, 0.3182, 0.8123]}, {"w": "a", "b": [0.3264, 0.7972, 0.3358, 0.8123]}, {"w": "good", "b": [0.3436, 0.7972, 0.3833, 0.8123]}, {"w": "practice", "b": [0.3911, 0.7972, 0.456, 0.8123]}, {"w": "is", "b": [0.4638, 0.7972, 0.4765, 0.8123]}, {"w": "to", "b": [0.4843, 0.7972, 0.501, 0.8123]}, {"w": "run", "b": [0.5088, 0.7972, 0.5371, 0.8123]}, {"w": "the", "b": [0.5449, 0.7972, 0.571, 0.8123]}, {"w": "model", "b": [0.5789, 0.7972, 0.6285, 0.8123]}, {"w": "against", "b": [0.6363, 0.7972, 0.695, 0.8123]}, {"w": "the", "b": [0.7028, 0.7972, 0.7289, 0.8123]}, {"w": "examples", "b": [0.7367, 0.7972, 0.8116, 0.8123]}, {"w": "in", "b": [0.8194, 0.7972, 0.8351, 0.8123]}, {"w": "the", "b": [0.8429, 0.7972, 0.8691, 0.8123]}, {"w": "end-to-end", "b": [0.1312, 0.8153, 0.2168, 0.8302]}, {"w": "and", "b": [0.2229, 0.8153, 0.2525, 0.8302]}, {"w": "confidence", "b": [0.2586, 0.8153, 0.3411, 0.8302]}, {"w": "test", "b": [0.3473, 0.8153, 0.3769, 0.8302]}, {"w": "sets.", "b": [0.3831, 0.8153, 0.4179, 0.8302]}, {"w": "It’s", "b": [0.4261, 0.8153, 0.4522, 0.8302]}, {"w": "important", "b": [0.4584, 0.8153, 0.5388, 0.8302]}, {"w": "to", "b": [0.545, 0.8153, 0.5613, 0.8302]}, {"w": "make", "b": [0.5674, 0.8153, 0.6092, 0.8302]}, {"w": "sure", "b": [0.6153, 0.8153, 0.6481, 0.8302]}, {"w": "that", "b": [0.6542, 0.8153, 0.6878, 0.8302]}, {"w": "the", "b": [0.694, 0.8153, 0.7195, 0.8302]}, {"w": "outputs", "b": [0.7256, 0.8153, 0.7868, 0.8302]}, {"w": "are", "b": [0.793, 0.8153, 0.8175, 0.8302]}, {"w": "either", "b": [0.8236, 0.8153, 0.8695, 0.8302]}, {"w": "the", "b": [0.1312, 0.8332, 0.1567, 0.8481]}, {"w": "same", "b": [0.1628, 0.8332, 0.2026, 0.8481]}, {"w": "as", "b": [0.2087, 0.8332, 0.2251, 0.8481]}, {"w": "before,", "b": [0.2312, 0.8332, 0.2852, 0.8481]}, {"w": "or", "b": [0.2913, 0.8332, 0.3077, 0.8481]}, {"w": "that", "b": [0.3138, 0.8332, 0.3474, 0.8481]}, {"w": "the", "b": [0.3535, 0.8332, 0.3789, 0.8481]}, {"w": "changes", "b": [0.3851, 0.8332, 0.4467, 0.8481]}, {"w": "are", "b": [0.4529, 0.8332, 0.4773, 0.8481]}, {"w": "as", "b": [0.4835, 0.8332, 0.4998, 0.8481]}, {"w": "expected.", "b": [0.506, 0.8332, 0.5813, 0.8481]}, {"w": "It’s", "b": [0.5895, 0.8332, 0.6155, 0.8481]}, {"w": "also", "b": [0.6217, 0.8332, 0.6523, 0.8481]}, {"w": "important", "b": [0.6584, 0.8332, 0.7388, 0.8481]}, {"w": "to", "b": [0.7449, 0.8332, 0.7612, 0.8481]}, {"w": "validate", "b": [0.7673, 0.8332, 0.8299, 0.8481]}, {"w": "that", "b": [0.836, 0.8332, 0.8696, 0.8481]}, {"w": "the", "b": [0.1312, 0.8511, 0.1569, 0.8661]}, {"w": "new", "b": [0.163, 0.8511, 0.1948, 0.8661]}, {"w": "model", "b": [0.201, 0.8511, 0.2497, 0.8661]}, {"w": "doesn’t", "b": [0.2558, 0.8511, 0.3139, 0.8661]}, {"w": "make", "b": [0.32, 0.8511, 0.3621, 0.8661]}, {"w": "significantly", "b": [0.3682, 0.8511, 0.4647, 0.8661]}, {"w": "more", "b": [0.4708, 0.8511, 0.5109, 0.8661]}, {"w": "costly", "b": [0.517, 0.8511, 0.5638, 0.8661]}, {"w": "errors", "b": [0.57, 0.8511, 0.6164, 0.8661]}, {"w": "than", "b": [0.6225, 0.8511, 0.6594, 0.8661]}, {"w": "the", "b": [0.6656, 0.8511, 0.6912, 0.8661]}, {"w": "previous", "b": [0.6974, 0.8511, 0.7647, 0.8661]}, {"w": "model.", "b": [0.7709, 0.8511, 0.8247, 0.8661]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 24", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "24", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 288, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Check also that the errors are distributed uniformly across the user categories. It’s undesirable if the new model negatively affects users from a minority or specific location.", "words": [{"w": "Check", "b": [0.1312, 0.0885, 0.1795, 0.1033]}, {"w": "also", "b": [0.1843, 0.0885, 0.2145, 0.1033]}, {"w": "that", "b": [0.2194, 0.0885, 0.2525, 0.1033]}, {"w": "the", "b": [0.2573, 0.0885, 0.2825, 0.1033]}, {"w": "errors", "b": [0.2873, 0.0885, 0.3328, 0.1033]}, {"w": "are", "b": [0.3376, 0.0885, 0.3618, 0.1033]}, {"w": "distributed", "b": [0.3666, 0.0885, 0.4532, 0.1033]}, {"w": "uniformly", "b": [0.458, 0.0885, 0.5344, 0.1033]}, {"w": "across", "b": [0.5393, 0.0885, 0.5868, 0.1033]}, {"w": "the", "b": [0.5916, 0.0885, 0.6167, 0.1033]}, {"w": "user", "b": [0.6216, 0.0885, 0.6539, 0.1033]}, {"w": "categories.", "b": [0.6587, 0.0885, 0.7413, 0.1033]}, {"w": "It’s", "b": [0.749, 0.0885, 0.7747, 0.1033]}, {"w": "undesirable", "b": [0.7796, 0.0885, 0.8692, 0.1033]}, {"w": "if", "b": [0.1312, 0.1063, 0.142, 0.1213]}, {"w": "the", "b": [0.1482, 0.1063, 0.1738, 0.1213]}, {"w": "new", "b": [0.18, 0.1063, 0.2117, 0.1213]}, {"w": "model", "b": [0.2179, 0.1063, 0.2666, 0.1213]}, {"w": "negatively", "b": [0.2727, 0.1063, 0.3543, 0.1213]}, {"w": "affects", "b": [0.3604, 0.1063, 0.4113, 0.1213]}, {"w": "users", "b": [0.4174, 0.1063, 0.4577, 0.1213]}, {"w": "from", "b": [0.4638, 0.1063, 0.5013, 0.1213]}, {"w": "a", "b": [0.5075, 0.1063, 0.5167, 0.1213]}, {"w": "minority", "b": [0.5228, 0.1063, 0.5916, 0.1213]}, {"w": "or", "b": [0.5977, 0.1063, 0.6142, 0.1213]}, {"w": "specific", "b": [0.6203, 0.1063, 0.6784, 0.1213]}, {"w": "location.", "b": [0.6846, 0.1063, 0.7538, 0.1213]}]}, {"id": "b_1", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 25", "words": [{"w": "Andriy", "b": [0.1305, 0.9055, 0.187, 0.9205]}, {"w": "Burkov", "b": [0.1931, 0.9055, 0.2514, 0.9205]}, {"w": "Machine", "b": [0.3458, 0.9055, 0.4135, 0.9205]}, {"w": "Learning", "b": [0.4197, 0.9055, 0.4907, 0.9205]}, {"w": "Engineering", "b": [0.4969, 0.9055, 0.5926, 0.9205]}, {"w": "-", "b": [0.5987, 0.9055, 0.6049, 0.9205]}, {"w": "Draft", "b": [0.611, 0.9055, 0.6544, 0.9205]}, {"w": "25", "b": [0.8505, 0.9055, 0.869, 0.9205]}]}]}, {"page": 289, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": []}, {"page": 290, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "“In theory, there is no difference between theory and practice. But in", "words": [{"w": "“In", "b": [0.3409, 0.0814, 0.3642, 0.0996]}, {"w": "theory,", "b": [0.3694, 0.0814, 0.4227, 0.0996]}, {"w": "there", "b": [0.4279, 0.0814, 0.467, 0.0996]}, {"w": "is", "b": [0.4722, 0.0814, 0.4843, 0.0996]}, {"w": "no", "b": [0.4894, 0.0814, 0.5088, 0.0996]}, {"w": "difference", "b": [0.514, 0.0814, 0.5878, 0.0996]}, {"w": "between", "b": [0.5929, 0.0814, 0.6551, 0.0996]}, {"w": "theory", "b": [0.6603, 0.0814, 0.7096, 0.0996]}, {"w": "and", "b": [0.7147, 0.0814, 0.7443, 0.0996]}, {"w": "practice.", "b": [0.7494, 0.0814, 0.8147, 0.0996]}, {"w": "But", "b": [0.821, 0.0814, 0.8481, 0.0996]}, {"w": "in", "b": [0.8533, 0.0814, 0.8688, 0.0996]}]}, {"id": "b_1", "type": "paragraph", "text": "practice, there is.”", "words": [{"w": "practice,", "b": [0.3438, 0.0994, 0.4093, 0.1176]}, {"w": "there", "b": [0.4144, 0.0994, 0.4537, 0.1176]}, {"w": "is.”", "b": [0.4589, 0.0994, 0.4835, 0.1176]}]}, {"id": "b_2", "type": "paragraph", "text": "— Benjamin Brewster", "words": [{"w": "—", "b": [0.6986, 0.1176, 0.717, 0.1355]}, {"w": "Benjamin", "b": [0.7221, 0.1173, 0.7963, 0.1355]}, {"w": "Brewster", "b": [0.8014, 0.1173, 0.8688, 0.1355]}]}, {"id": "b_3", "type": "paragraph", "text": "“The perfect project plan is possible if one first documents a list of all", "words": [{"w": "“The", "b": [0.3409, 0.1778, 0.3764, 0.196]}, {"w": "perfect", "b": [0.3815, 0.1778, 0.4324, 0.196]}, {"w": "project", "b": [0.4376, 0.1778, 0.4895, 0.196]}, {"w": "plan", "b": [0.4946, 0.1778, 0.5289, 0.196]}, {"w": "is", "b": [0.534, 0.1778, 0.546, 0.196]}, {"w": "possible", "b": [0.5511, 0.1778, 0.6106, 0.196]}, {"w": "if", "b": [0.6158, 0.1778, 0.6264, 0.196]}, {"w": "one", "b": [0.6315, 0.1778, 0.6586, 0.196]}, {"w": "first", "b": [0.6637, 0.1778, 0.6944, 0.196]}, {"w": "documents", "b": [0.6995, 0.1778, 0.7813, 0.196]}, {"w": "a", "b": [0.7865, 0.1778, 0.7961, 0.196]}, {"w": "list", "b": [0.8012, 0.1778, 0.8243, 0.196]}, {"w": "of", "b": [0.8295, 0.1778, 0.844, 0.196]}, {"w": "all", "b": [0.8491, 0.1778, 0.8688, 0.196]}]}, {"id": "b_4", "type": "paragraph", "text": "the unknowns.”", "words": [{"w": "the", "b": [0.3438, 0.1958, 0.368, 0.214]}, {"w": "unknowns.”", "b": [0.3731, 0.1958, 0.4654, 0.214]}]}, {"id": "b_5", "type": "paragraph", "text": "— Bill Langley", "words": [{"w": "—", "b": [0.7539, 0.214, 0.7724, 0.2319]}, {"w": "Bill", "b": [0.7775, 0.2137, 0.8038, 0.2319]}, {"w": "Langley", "b": [0.8089, 0.2137, 0.8686, 0.2319]}]}, {"id": "b_6", "type": "paragraph", "text": "“When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When", "words": [{"w": "“When", "b": [0.3409, 0.2742, 0.3929, 0.2924]}, {"w": "you’re", "b": [0.398, 0.2742, 0.445, 0.2924]}, {"w": "fundraising,", "b": [0.4501, 0.2742, 0.5439, 0.2924]}, {"w": "it’s", "b": [0.5491, 0.2742, 0.5709, 0.2924]}, {"w": "AI.", "b": [0.5761, 0.2742, 0.5981, 0.2924]}, {"w": "When", "b": [0.6032, 0.2742, 0.6478, 0.2924]}, {"w": "you’re", "b": [0.653, 0.2742, 0.6999, 0.2924]}, {"w": "hiring,", "b": [0.705, 0.2742, 0.7572, 0.2924]}, {"w": "it’s", "b": [0.7623, 0.2742, 0.7842, 0.2924]}, {"w": "ML.", "b": [0.7893, 0.2742, 0.819, 0.2924]}, {"w": "When", "b": [0.8242, 0.2742, 0.8688, 0.2924]}]}, {"id": "b_7", "type": "paragraph", "text": "you’re implementing, it’s linear regression. When you’re debugging, it’s printf().”", "words": [{"w": "you’re", "b": [0.3438, 0.2922, 0.3915, 0.3104]}, {"w": "implementing,", "b": [0.3966, 0.2922, 0.5095, 0.3104]}, {"w": "it’s", "b": [0.5146, 0.2922, 0.5369, 0.3104]}, {"w": "linear", "b": [0.542, 0.2922, 0.588, 0.3104]}, {"w": "regression.", "b": [0.5931, 0.2922, 0.6769, 0.3104]}, {"w": "When", "b": [0.6833, 0.2922, 0.7286, 0.3104]}, {"w": "you’re", "b": [0.7337, 0.2922, 0.7814, 0.3104]}, {"w": "debugging,", "b": [0.7865, 0.2922, 0.8719, 0.3104]}, {"w": "it’s", "b": [0.3438, 0.3101, 0.3658, 0.3283]}, {"w": "printf().”", "b": [0.3709, 0.3101, 0.4429, 0.3283]}]}, {"id": "b_8", "type": "paragraph", "text": "— Baron Schwartz", "words": [{"w": "—", "b": [0.7209, 0.3283, 0.7393, 0.3462]}, {"w": "Baron", "b": [0.7445, 0.3281, 0.7919, 0.3462]}, {"w": "Schwartz", "b": [0.797, 0.3281, 0.8688, 0.3462]}]}, {"id": "b_9", "type": "paragraph", "text": "The book is distributed on the “read first, buy later” principle.", "words": [{"w": "The", "b": [0.253, 0.4577, 0.2835, 0.4756]}, {"w": "book", "b": [0.2886, 0.4577, 0.328, 0.4756]}, {"w": "is", "b": [0.3331, 0.4577, 0.3457, 0.4756]}, {"w": "distributed", "b": [0.3508, 0.4577, 0.4383, 0.4756]}, {"w": "on", "b": [0.4434, 0.4577, 0.4638, 0.4756]}, {"w": "the", "b": [0.4689, 0.4577, 0.4946, 0.4756]}, {"w": "“read", "b": [0.4997, 0.4577, 0.543, 0.4756]}, {"w": "first,", "b": [0.5481, 0.4577, 0.5845, 0.4756]}, {"w": "buy", "b": [0.5896, 0.4577, 0.6192, 0.4756]}, {"w": "later”", "b": [0.6243, 0.4577, 0.6686, 0.4756]}, {"w": "principle.", "b": [0.6737, 0.4577, 0.7495, 0.4756]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft", "words": [{"w": "Andriy", "b": [0.1306, 0.9028, 0.1847, 0.9208]}, {"w": "Burkov", "b": [0.1898, 0.9028, 0.2471, 0.9208]}, {"w": "Machine", "b": [0.348, 0.9028, 0.4167, 0.9208]}, {"w": "Learning", "b": [0.4218, 0.9028, 0.4926, 0.9208]}, {"w": "Engineering", "b": [0.4977, 0.9028, 0.5946, 0.9208]}, {"w": "-", "b": [0.5997, 0.9028, 0.6056, 0.9208]}, {"w": "Draft", "b": [0.6108, 0.9028, 0.652, 0.9208]}]}]}, {"page": 291, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "10 Conclusion", "words": [{"w": "10", "b": [0.1312, 0.0833, 0.1611, 0.1048]}, {"w": "Conclusion", "b": [0.191, 0.0833, 0.3341, 0.1048]}]}, {"id": "b_1", "type": "paragraph", "text": "In 2020, machine learning has become a mature and popular tool for solving business problems. What previously was available only to a handful of organizations, and considered “magic” by", "words": [{"w": "In", "b": [0.1312, 0.1298, 0.1478, 0.1448]}, {"w": "2020,", "b": [0.1526, 0.1298, 0.1938, 0.1448]}, {"w": "machine", "b": [0.1988, 0.1298, 0.2636, 0.1448]}, {"w": "learning", "b": [0.2683, 0.1298, 0.3317, 0.1448]}, {"w": "has", "b": [0.3364, 0.1298, 0.3627, 0.1448]}, {"w": "become", "b": [0.3674, 0.1298, 0.4262, 0.1448]}, {"w": "a", "b": [0.431, 0.1298, 0.44, 0.1448]}, {"w": "mature", "b": [0.4448, 0.1298, 0.5011, 0.1448]}, {"w": "and", "b": [0.5058, 0.1298, 0.535, 0.1448]}, {"w": "popular", "b": [0.5397, 0.1298, 0.6006, 0.1448]}, {"w": "tool", "b": [0.6053, 0.1298, 0.636, 0.1448]}, {"w": "for", "b": [0.6407, 0.1298, 0.6624, 0.1448]}, {"w": "solving", "b": [0.6671, 0.1298, 0.722, 0.1448]}, {"w": "business", "b": [0.7267, 0.1298, 0.7914, 0.1448]}, {"w": "problems.", "b": [0.7962, 0.1298, 0.8727, 0.1448]}, {"w": "What", "b": [0.1303, 0.1478, 0.175, 0.1627]}, {"w": "previously", "b": [0.1812, 0.1478, 0.2617, 0.1627]}, {"w": "was", "b": [0.2679, 0.1478, 0.2966, 0.1627]}, {"w": "available", "b": [0.3028, 0.1478, 0.3711, 0.1627]}, {"w": "only", "b": [0.3773, 0.1478, 0.4109, 0.1627]}, {"w": "to", "b": [0.4171, 0.1478, 0.4332, 0.1627]}, {"w": "a", "b": [0.4394, 0.1478, 0.4484, 0.1627]}, {"w": "handful", "b": [0.4546, 0.1478, 0.5144, 0.1627]}, {"w": "of", "b": [0.5206, 0.1478, 0.5351, 0.1627]}, {"w": "organizations,", "b": [0.5413, 0.1478, 0.651, 0.1627]}, {"w": "and", "b": [0.6572, 0.1478, 0.6863, 0.1627]}, {"w": "considered", "b": [0.6925, 0.1478, 0.7751, 0.1627]}, {"w": "“magic”", "b": [0.7812, 0.1478, 0.8445, 0.1627]}, {"w": "by", "b": [0.8507, 0.1478, 0.8698, 0.1627]}]}, {"id": "b_2", "type": "paragraph", "text": "others, can today be created and used by a typical organization.", "words": [{"w": "others,", "b": [0.1312, 0.1657, 0.1858, 0.1807]}, {"w": "can", "b": [0.1919, 0.1657, 0.2196, 0.1807]}, {"w": "today", "b": [0.2257, 0.1657, 0.2714, 0.1807]}, {"w": "be", "b": [0.2775, 0.1657, 0.2965, 0.1807]}, {"w": "created", "b": [0.3026, 0.1657, 0.3612, 0.1807]}, {"w": "and", "b": [0.3673, 0.1657, 0.3971, 0.1807]}, {"w": "used", "b": [0.4032, 0.1657, 0.4392, 0.1807]}, {"w": "by", "b": [0.4454, 0.1657, 0.4648, 0.1807]}, {"w": "a", "b": [0.471, 0.1657, 0.4802, 0.1807]}, {"w": "typical", "b": [0.4864, 0.1657, 0.5407, 0.1807]}, {"w": "organization.", "b": [0.5469, 0.1657, 0.6515, 0.1807]}]}, {"id": "b_3", "type": "paragraph", "text": "Thanks to open-source code, crowdsourcing, easily accessible books, online courses, and publicly available datasets, many scientists, engineers, and even home enthusiasts may now train machine learning models. If you are lucky, your problem can be solved by writing several lines of code, as demonstrated in many online tutorials.", "words": [{"w": "Thanks", "b": [0.1306, 0.1926, 0.1919, 0.2076]}, {"w": "to", "b": [0.1996, 0.1926, 0.2163, 0.2076]}, {"w": "open-source", "b": [0.224, 0.1926, 0.3209, 0.2076]}, {"w": "code,", "b": [0.3286, 0.1926, 0.3709, 0.2076]}, {"w": "crowdsourcing,", "b": [0.379, 0.1926, 0.5011, 0.2076]}, {"w": "easily", "b": [0.5092, 0.1926, 0.5548, 0.2076]}, {"w": "accessible", "b": [0.5625, 0.1926, 0.6411, 0.2076]}, {"w": "books,", "b": [0.6488, 0.1926, 0.7017, 0.2076]}, {"w": "online", "b": [0.7098, 0.1926, 0.759, 0.2076]}, {"w": "courses,", "b": [0.7667, 0.1926, 0.8308, 0.2076]}, {"w": "and", "b": [0.8388, 0.1926, 0.8692, 0.2076]}, {"w": "publicly", "b": [0.1312, 0.2106, 0.1955, 0.2255]}, {"w": "available", "b": [0.2017, 0.2106, 0.2716, 0.2255]}, {"w": "datasets,", "b": [0.2777, 0.2106, 0.3489, 0.2255]}, {"w": "many", "b": [0.355, 0.2106, 0.3993, 0.2255]}, {"w": "scientists,", "b": [0.4054, 0.2106, 0.4834, 0.2255]}, {"w": "engineers,", "b": [0.4895, 0.2106, 0.5689, 0.2255]}, {"w": "and", "b": [0.575, 0.2106, 0.6049, 0.2255]}, {"w": "even", "b": [0.611, 0.2106, 0.647, 0.2255]}, {"w": "home", "b": [0.6531, 0.2106, 0.6963, 0.2255]}, {"w": "enthusiasts", "b": [0.7025, 0.2106, 0.7912, 0.2255]}, {"w": "may", "b": [0.7974, 0.2106, 0.8313, 0.2255]}, {"w": "now", "b": [0.8374, 0.2106, 0.8698, 0.2255]}, {"w": "train", "b": [0.1312, 0.2285, 0.171, 0.2435]}, {"w": "machine", "b": [0.1784, 0.2285, 0.2459, 0.2435]}, {"w": "learning", "b": [0.2533, 0.2285, 0.3192, 0.2435]}, {"w": "models.", "b": [0.3266, 0.2285, 0.3889, 0.2435]}, {"w": "If", "b": [0.4008, 0.2285, 0.4134, 0.2435]}, {"w": "you", "b": [0.4207, 0.2285, 0.45, 0.2435]}, {"w": "are", "b": [0.4574, 0.2285, 0.4826, 0.2435]}, {"w": "lucky,", "b": [0.4899, 0.2285, 0.537, 0.2435]}, {"w": "your", "b": [0.5447, 0.2285, 0.5814, 0.2435]}, {"w": "problem", "b": [0.5888, 0.2285, 0.6558, 0.2435]}, {"w": "can", "b": [0.6631, 0.2285, 0.6914, 0.2435]}, {"w": "be", "b": [0.6988, 0.2285, 0.7181, 0.2435]}, {"w": "solved", "b": [0.7255, 0.2285, 0.7758, 0.2435]}, {"w": "by", "b": [0.7832, 0.2285, 0.8031, 0.2435]}, {"w": "writing", "b": [0.8105, 0.2285, 0.8691, 0.2435]}, {"w": "several", "b": [0.1312, 0.2465, 0.1858, 0.2614]}, {"w": "lines", "b": [0.1919, 0.2465, 0.2279, 0.2614]}, {"w": "of", "b": [0.2341, 0.2465, 0.2489, 0.2614]}, {"w": "code,", "b": [0.2551, 0.2465, 0.2966, 0.2614]}, {"w": "as", "b": [0.3028, 0.2465, 0.3193, 0.2614]}, {"w": "demonstrated", "b": [0.3254, 0.2465, 0.4353, 0.2614]}, {"w": "in", "b": [0.4415, 0.2465, 0.4568, 0.2614]}, {"w": "many", "b": [0.463, 0.2465, 0.5071, 0.2614]}, {"w": "online", "b": [0.5132, 0.2465, 0.5614, 0.2614]}, {"w": "tutorials.", "b": [0.5676, 0.2465, 0.6405, 0.2614]}]}, {"id": "b_4", "type": "paragraph", "text": "However, many things can go wrong in a machine learning project. Most are independent of the technology’s maturity or the analyst’s understanding of the machine learning algorithm.", "words": [{"w": "However,", "b": [0.1312, 0.2734, 0.2037, 0.2884]}, {"w": "many", "b": [0.2098, 0.2734, 0.2534, 0.2884]}, {"w": "things", "b": [0.2595, 0.2734, 0.3083, 0.2884]}, {"w": "can", "b": [0.3144, 0.2734, 0.3417, 0.2884]}, {"w": "go", "b": [0.3479, 0.2734, 0.3661, 0.2884]}, {"w": "wrong", "b": [0.3723, 0.2734, 0.4209, 0.2884]}, {"w": "in", "b": [0.4271, 0.2734, 0.4423, 0.2884]}, {"w": "a", "b": [0.4484, 0.2734, 0.4575, 0.2884]}, {"w": "machine", "b": [0.4637, 0.2734, 0.529, 0.2884]}, {"w": "learning", "b": [0.5351, 0.2734, 0.599, 0.2884]}, {"w": "project.", "b": [0.6052, 0.2734, 0.666, 0.2884]}, {"w": "Most", "b": [0.6742, 0.2734, 0.7143, 0.2884]}, {"w": "are", "b": [0.7205, 0.2734, 0.7448, 0.2884]}, {"w": "independent", "b": [0.751, 0.2734, 0.8483, 0.2884]}, {"w": "of", "b": [0.8544, 0.2734, 0.8691, 0.2884]}, {"w": "the", "b": [0.1312, 0.2914, 0.1567, 0.3063]}, {"w": "technology’s", "b": [0.1629, 0.2914, 0.261, 0.3063]}, {"w": "maturity", "b": [0.2671, 0.2914, 0.3375, 0.3063]}, {"w": "or", "b": [0.3437, 0.2914, 0.3601, 0.3063]}, {"w": "the", "b": [0.3662, 0.2914, 0.3917, 0.3063]}, {"w": "analyst’s", "b": [0.3979, 0.2914, 0.468, 0.3063]}, {"w": "understanding", "b": [0.4741, 0.2914, 0.5886, 0.3063]}, {"w": "of", "b": [0.5947, 0.2914, 0.6095, 0.3063]}, {"w": "the", "b": [0.6157, 0.2914, 0.6412, 0.3063]}, {"w": "machine", "b": [0.6473, 0.2914, 0.7132, 0.3063]}, {"w": "learning", "b": [0.7193, 0.2914, 0.7836, 0.3063]}, {"w": "algorithm.", "b": [0.7898, 0.2914, 0.8725, 0.3063]}]}, {"id": "b_5", "type": "paragraph", "text": "Machine learning texts, online tutorials, and courses are devoted to explaining how machine learning algorithms work and how to apply them to a dataset. Your success will probably depend on other factors. What data you can get and whether you can get enough of it, how you prepare it for learning, what features you engineer, whether your solution is scalable, maintainable, cannot be manipulated by attackers, and doesn’t make costly errors — these factors are much more important for an applied machine learning project.", "words": [{"w": "Machine", "b": [0.1312, 0.3183, 0.1983, 0.3332]}, {"w": "learning", "b": [0.2044, 0.3183, 0.2685, 0.3332]}, {"w": "texts,", "b": [0.2747, 0.3183, 0.319, 0.3332]}, {"w": "online", "b": [0.3251, 0.3183, 0.3729, 0.3332]}, {"w": "tutorials,", "b": [0.379, 0.3183, 0.4513, 0.3332]}, {"w": "and", "b": [0.4575, 0.3183, 0.487, 0.3332]}, {"w": "courses", "b": [0.4931, 0.3183, 0.5503, 0.3332]}, {"w": "are", "b": [0.5564, 0.3183, 0.5809, 0.3332]}, {"w": "devoted", "b": [0.587, 0.3183, 0.649, 0.3332]}, {"w": "to", "b": [0.6551, 0.3183, 0.6714, 0.3332]}, {"w": "explaining", "b": [0.6775, 0.3183, 0.7593, 0.3332]}, {"w": "how", "b": [0.7655, 0.3183, 0.7975, 0.3332]}, {"w": "machine", "b": [0.8036, 0.3183, 0.8691, 0.3332]}, {"w": "learning", "b": [0.1312, 0.3362, 0.1971, 0.3512]}, {"w": "algorithms", "b": [0.2033, 0.3362, 0.2901, 0.3512]}, {"w": "work", "b": [0.2963, 0.3362, 0.3361, 0.3512]}, {"w": "and", "b": [0.3422, 0.3362, 0.3725, 0.3512]}, {"w": "how", "b": [0.3787, 0.3362, 0.4116, 0.3512]}, {"w": "to", "b": [0.4178, 0.3362, 0.4345, 0.3512]}, {"w": "apply", "b": [0.4406, 0.3362, 0.4861, 0.3512]}, {"w": "them", "b": [0.4922, 0.3362, 0.534, 0.3512]}, {"w": "to", "b": [0.5402, 0.3362, 0.5569, 0.3512]}, {"w": "a", "b": [0.563, 0.3362, 0.5724, 0.3512]}, {"w": "dataset.", "b": [0.5786, 0.3362, 0.6435, 0.3512]}, {"w": "Your", "b": [0.6517, 0.3362, 0.6915, 0.3512]}, {"w": "success", "b": [0.6977, 0.3362, 0.7555, 0.3512]}, {"w": "will", "b": [0.7616, 0.3362, 0.7909, 0.3512]}, {"w": "probably", "b": [0.797, 0.3362, 0.8697, 0.3512]}, {"w": "depend", "b": [0.1312, 0.3542, 0.1886, 0.3691]}, {"w": "on", "b": [0.1947, 0.3542, 0.214, 0.3691]}, {"w": "other", "b": [0.2202, 0.3542, 0.2618, 0.3691]}, {"w": "factors.", "b": [0.268, 0.3542, 0.3265, 0.3691]}, {"w": "What", "b": [0.3347, 0.3542, 0.3799, 0.3691]}, {"w": "data", "b": [0.386, 0.3542, 0.4215, 0.3691]}, {"w": "you", "b": [0.4277, 0.3542, 0.4561, 0.3691]}, {"w": "can", "b": [0.4622, 0.3542, 0.4896, 0.3691]}, {"w": "get", "b": [0.4957, 0.3542, 0.5201, 0.3691]}, {"w": "and", "b": [0.5262, 0.3542, 0.5557, 0.3691]}, {"w": "whether", "b": [0.5618, 0.3542, 0.6258, 0.3691]}, {"w": "you", "b": [0.632, 0.3542, 0.6604, 0.3691]}, {"w": "can", "b": [0.6665, 0.3542, 0.6939, 0.3691]}, {"w": "get", "b": [0.7001, 0.3542, 0.7244, 0.3691]}, {"w": "enough", "b": [0.7306, 0.3542, 0.7874, 0.3691]}, {"w": "of", "b": [0.7935, 0.3542, 0.8083, 0.3691]}, {"w": "it,", "b": [0.8144, 0.3542, 0.8317, 0.3691]}, {"w": "how", "b": [0.8378, 0.3542, 0.8698, 0.3691]}, {"w": "you", "b": [0.1308, 0.3721, 0.1601, 0.3871]}, {"w": "prepare", "b": [0.1667, 0.3721, 0.2285, 0.3871]}, {"w": "it", "b": [0.2351, 0.3721, 0.2477, 0.3871]}, {"w": "for", "b": [0.2543, 0.3721, 0.2768, 0.3871]}, {"w": "learning,", "b": [0.2835, 0.3721, 0.3546, 0.3871]}, {"w": "what", "b": [0.3614, 0.3721, 0.4022, 0.3871]}, {"w": "features", "b": [0.4088, 0.3721, 0.4733, 0.3871]}, {"w": "you", "b": [0.4799, 0.3721, 0.5092, 0.3871]}, {"w": "engineer,", "b": [0.5158, 0.3721, 0.5891, 0.3871]}, {"w": "whether", "b": [0.5958, 0.3721, 0.6618, 0.3871]}, {"w": "your", "b": [0.6684, 0.3721, 0.7051, 0.3871]}, {"w": "solution", "b": [0.7117, 0.3721, 0.7767, 0.3871]}, {"w": "is", "b": [0.7833, 0.3721, 0.7959, 0.3871]}, {"w": "scalable,", "b": [0.8026, 0.3721, 0.8717, 0.3871]}, {"w": "maintainable,", "b": [0.1312, 0.3901, 0.2407, 0.405]}, {"w": "cannot", "b": [0.2468, 0.3901, 0.3013, 0.405]}, {"w": "be", "b": [0.3074, 0.3901, 0.3264, 0.405]}, {"w": "manipulated", "b": [0.3326, 0.3901, 0.4333, 0.405]}, {"w": "by", "b": [0.4394, 0.3901, 0.459, 0.405]}, {"w": "attackers,", "b": [0.4651, 0.3901, 0.5429, 0.405]}, {"w": "and", "b": [0.549, 0.3901, 0.5788, 0.405]}, {"w": "doesn’t", "b": [0.585, 0.3901, 0.6431, 0.405]}, {"w": "make", "b": [0.6493, 0.3901, 0.6914, 0.405]}, {"w": "costly", "b": [0.6976, 0.3901, 0.7444, 0.405]}, {"w": "errors", "b": [0.7506, 0.3901, 0.7971, 0.405]}, {"w": "—", "b": [0.8032, 0.3901, 0.8217, 0.405]}, {"w": "these", "b": [0.8279, 0.3901, 0.8691, 0.405]}, {"w": "factors", "b": [0.1312, 0.408, 0.1852, 0.423]}, {"w": "are", "b": [0.1914, 0.408, 0.216, 0.423]}, {"w": "much", "b": [0.2222, 0.408, 0.2653, 0.423]}, {"w": "more", "b": [0.2714, 0.408, 0.3114, 0.423]}, {"w": "important", "b": [0.3176, 0.408, 0.3986, 0.423]}, {"w": "for", "b": [0.4048, 0.408, 0.4269, 0.423]}, {"w": "an", "b": [0.433, 0.408, 0.4525, 0.423]}, {"w": "applied", "b": [0.4587, 0.408, 0.5171, 0.423]}, {"w": "machine", "b": [0.5233, 0.408, 0.5894, 0.423]}, {"w": "learning", "b": [0.5956, 0.408, 0.6602, 0.423]}, {"w": "project.", "b": [0.6664, 0.408, 0.728, 0.423]}]}, {"id": "b_6", "type": "paragraph", "text": "Yet despite their magnitude, most modern machine learning books and courses often leave these aspects for self-study. Some provide only partial coverage, with just an application to solving a specific illustrative problem.", "words": [{"w": "Yet", "b": [0.1305, 0.4349, 0.1585, 0.4499]}, {"w": "despite", "b": [0.1647, 0.4349, 0.2218, 0.4499]}, {"w": "their", "b": [0.228, 0.4349, 0.2664, 0.4499]}, {"w": "magnitude,", "b": [0.2726, 0.4349, 0.3638, 0.4499]}, {"w": "most", "b": [0.3699, 0.4349, 0.4094, 0.4499]}, {"w": "modern", "b": [0.4156, 0.4349, 0.4773, 0.4499]}, {"w": "machine", "b": [0.4834, 0.4349, 0.5503, 0.4499]}, {"w": "learning", "b": [0.5565, 0.4349, 0.6218, 0.4499]}, {"w": "books", "b": [0.628, 0.4349, 0.6752, 0.4499]}, {"w": "and", "b": [0.6814, 0.4349, 0.7115, 0.4499]}, {"w": "courses", "b": [0.7176, 0.4349, 0.7759, 0.4499]}, {"w": "often", "b": [0.7821, 0.4349, 0.8231, 0.4499]}, {"w": "leave", "b": [0.8292, 0.4349, 0.8691, 0.4499]}, {"w": "these", "b": [0.1312, 0.4529, 0.1723, 0.4678]}, {"w": "aspects", "b": [0.1784, 0.4529, 0.2365, 0.4678]}, {"w": "for", "b": [0.2426, 0.4529, 0.2647, 0.4678]}, {"w": "self-study.", "b": [0.2709, 0.4529, 0.3514, 0.4678]}, {"w": "Some", "b": [0.3596, 0.4529, 0.4026, 0.4678]}, {"w": "provide", "b": [0.4087, 0.4529, 0.4682, 0.4678]}, {"w": "only", "b": [0.4743, 0.4529, 0.5086, 0.4678]}, {"w": "partial", "b": [0.5147, 0.4529, 0.568, 0.4678]}, {"w": "coverage,", "b": [0.5742, 0.4529, 0.6474, 0.4678]}, {"w": "with", "b": [0.6536, 0.4529, 0.6894, 0.4678]}, {"w": "just", "b": [0.6955, 0.4529, 0.7258, 0.4678]}, {"w": "an", "b": [0.732, 0.4529, 0.7514, 0.4678]}, {"w": "application", "b": [0.7576, 0.4529, 0.8466, 0.4678]}, {"w": "to", "b": [0.8528, 0.4529, 0.8691, 0.4678]}, {"w": "solving", "b": [0.1312, 0.4708, 0.1872, 0.4858]}, {"w": "a", "b": [0.1934, 0.4708, 0.2026, 0.4858]}, {"w": "specific", "b": [0.2088, 0.4708, 0.2668, 0.4858]}, {"w": "illustrative", "b": [0.273, 0.4708, 0.3593, 0.4858]}, {"w": "problem.", "b": [0.3654, 0.4708, 0.4362, 0.4858]}]}, {"id": "b_7", "type": "paragraph", "text": "It’s a significant gap in knowledge, and I tried to fill it with this book.", "words": [{"w": "It’s", "b": [0.1312, 0.4977, 0.1575, 0.5127]}, {"w": "a", "b": [0.1636, 0.4977, 0.1729, 0.5127]}, {"w": "significant", "b": [0.179, 0.4977, 0.2607, 0.5127]}, {"w": "gap", "b": [0.2668, 0.4977, 0.2955, 0.5127]}, {"w": "in", "b": [0.3016, 0.4977, 0.317, 0.5127]}, {"w": "knowledge,", "b": [0.3232, 0.4977, 0.4114, 0.5127]}, {"w": "and", "b": [0.4175, 0.4977, 0.4473, 0.5127]}, {"w": "I", "b": [0.4534, 0.4977, 0.4601, 0.5127]}, {"w": "tried", "b": [0.4662, 0.4977, 0.5042, 0.5127]}, {"w": "to", "b": [0.5104, 0.4977, 0.5268, 0.5127]}, {"w": "fill", "b": [0.5329, 0.4977, 0.5534, 0.5127]}, {"w": "it", "b": [0.5596, 0.4977, 0.5719, 0.5127]}, {"w": "with", "b": [0.578, 0.4977, 0.6139, 0.5127]}, {"w": "this", "b": [0.6201, 0.4977, 0.6499, 0.5127]}, {"w": "book.", "b": [0.6561, 0.4977, 0.7007, 0.5127]}]}, {"id": "b_8", "type": "paragraph", "text": "10.1 Takeaways", "words": [{"w": "10.1", "b": [0.1312, 0.5466, 0.1756, 0.5645]}, {"w": "Takeaways", "b": [0.2005, 0.5466, 0.3147, 0.5645]}]}, {"id": "b_9", "type": "paragraph", "text": "What do I hope the reader takes away after reading this book?", "words": [{"w": "What", "b": [0.1303, 0.5852, 0.1759, 0.6001]}, {"w": "do", "b": [0.1821, 0.5852, 0.2015, 0.6001]}, {"w": "I", "b": [0.2077, 0.5852, 0.2144, 0.6001]}, {"w": "hope", "b": [0.2205, 0.5852, 0.259, 0.6001]}, {"w": "the", "b": [0.2651, 0.5852, 0.2908, 0.6001]}, {"w": "reader", "b": [0.2969, 0.5852, 0.3473, 0.6001]}, {"w": "takes", "b": [0.3534, 0.5852, 0.3945, 0.6001]}, {"w": "away", "b": [0.4007, 0.5852, 0.4407, 0.6001]}, {"w": "after", "b": [0.4468, 0.5852, 0.4843, 0.6001]}, {"w": "reading", "b": [0.4905, 0.5852, 0.55, 0.6001]}, {"w": "this", "b": [0.5561, 0.5852, 0.586, 0.6001]}, {"w": "book?", "b": [0.5921, 0.5852, 0.6403, 0.6001]}]}, {"id": "b_10", "type": "paragraph", "text": "First of all, a strong understanding that all machine learning projects are unique. There’s no single recipe that will always work. Most of the time, the greatest challenges must be solved before you type from sklearn.linear_model import LogisticRegression: you must define your goal, select a baseline, gather relevant data, get it labeled with quality labels, and transform labeled data into training, validation, and test sets. The rest of the problem is solved after you type model.fit(X,y), by applying error analysis, evaluating the model, verifying it solves the problem, and works better than the existing solution.", "words": [{"w": "First", "b": [0.1312, 0.6121, 0.1708, 0.627]}, {"w": "of", "b": [0.177, 0.6121, 0.1921, 0.627]}, {"w": "all,", "b": [0.1983, 0.6121, 0.2233, 0.627]}, {"w": "a", "b": [0.2295, 0.6121, 0.2389, 0.627]}, {"w": "strong", "b": [0.245, 0.6121, 0.2963, 0.627]}, {"w": "understanding", "b": [0.3025, 0.6121, 0.4196, 0.627]}, {"w": "that", "b": [0.4258, 0.6121, 0.4602, 0.627]}, {"w": "all", "b": [0.4664, 0.6121, 0.4862, 0.627]}, {"w": "machine", "b": [0.4924, 0.6121, 0.5597, 0.627]}, {"w": "learning", "b": [0.5659, 0.6121, 0.6317, 0.627]}, {"w": "projects", "b": [0.6378, 0.6121, 0.7027, 0.627]}, {"w": "are", "b": [0.7089, 0.6121, 0.734, 0.627]}, {"w": "unique.", "b": [0.7402, 0.6121, 0.8002, 0.627]}, {"w": "There’s", "b": [0.8084, 0.6121, 0.8692, 0.627]}, {"w": "no", "b": [0.1312, 0.63, 0.1511, 0.645]}, {"w": "single", "b": [0.1577, 0.63, 0.2039, 0.645]}, {"w": "recipe", "b": [0.2105, 0.63, 0.2592, 0.645]}, {"w": "that", "b": [0.2658, 0.63, 0.3004, 0.645]}, {"w": "will", "b": [0.307, 0.63, 0.3363, 0.645]}, {"w": "always", "b": [0.3429, 0.63, 0.3969, 0.645]}, {"w": "work.", "b": [0.4035, 0.63, 0.4485, 0.645]}, {"w": "Most", "b": [0.4582, 0.63, 0.4996, 0.645]}, {"w": "of", "b": [0.5062, 0.63, 0.5214, 0.645]}, {"w": "the", "b": [0.5281, 0.63, 0.5542, 0.645]}, {"w": "time,", "b": [0.5608, 0.63, 0.6027, 0.645]}, {"w": "the", "b": [0.6094, 0.63, 0.6356, 0.645]}, {"w": "greatest", "b": [0.6422, 0.63, 0.7072, 0.645]}, {"w": "challenges", "b": [0.7139, 0.63, 0.7961, 0.645]}, {"w": "must", "b": [0.8027, 0.63, 0.8431, 0.645]}, {"w": "be", "b": [0.8498, 0.63, 0.8691, 0.645]}, {"w": "solved", "b": [0.1312, 0.648, 0.1816, 0.6629]}, {"w": "before", "b": [0.1894, 0.648, 0.2397, 0.6629]}, {"w": "you", "b": [0.2476, 0.648, 0.2769, 0.6629]}, {"w": "type", "b": [0.2848, 0.648, 0.3208, 0.6629]}, {"w": "from", "b": [0.3286, 0.649, 0.3674, 0.664]}, {"w": "sklearn.linear_model", "b": [0.377, 0.649, 0.5708, 0.664]}, {"w": "import", "b": [0.5805, 0.649, 0.6386, 0.664]}, {"w": "LogisticRegression:", "b": [0.6483, 0.648, 0.8278, 0.664]}, {"w": "you", "b": [0.8395, 0.648, 0.8688, 0.6629]}, {"w": "must", "b": [0.1312, 0.6659, 0.1716, 0.6809]}, {"w": "define", "b": [0.1788, 0.6659, 0.2269, 0.6809]}, {"w": "your", "b": [0.2341, 0.6659, 0.2708, 0.6809]}, {"w": "goal,", "b": [0.278, 0.6659, 0.3167, 0.6809]}, {"w": "select", "b": [0.3242, 0.6659, 0.3692, 0.6809]}, {"w": "a", "b": [0.3765, 0.6659, 0.3859, 0.6809]}, {"w": "baseline,", "b": [0.3931, 0.6659, 0.4633, 0.6809]}, {"w": "gather", "b": [0.4707, 0.6659, 0.5231, 0.6809]}, {"w": "relevant", "b": [0.5303, 0.6659, 0.5952, 0.6809]}, {"w": "data,", "b": [0.6024, 0.6659, 0.6442, 0.6809]}, {"w": "get", "b": [0.6517, 0.6659, 0.6768, 0.6809]}, {"w": "it", "b": [0.684, 0.6659, 0.6965, 0.6809]}, {"w": "labeled", "b": [0.7037, 0.6659, 0.7618, 0.6809]}, {"w": "with", "b": [0.769, 0.6659, 0.8056, 0.6809]}, {"w": "quality", "b": [0.8128, 0.6659, 0.8698, 0.6809]}, {"w": "labels,", "b": [0.1312, 0.6839, 0.1831, 0.6988]}, {"w": "and", "b": [0.1895, 0.6839, 0.2199, 0.6988]}, {"w": "transform", "b": [0.2262, 0.6839, 0.3064, 0.6988]}, {"w": "labeled", "b": [0.3128, 0.6839, 0.3708, 0.6988]}, {"w": "data", "b": [0.3772, 0.6839, 0.4138, 0.6988]}, {"w": "into", "b": [0.4202, 0.6839, 0.4521, 0.6988]}, {"w": "training,", "b": [0.4584, 0.6839, 0.5286, 0.6988]}, {"w": "validation,", "b": [0.535, 0.6839, 0.6213, 0.6988]}, {"w": "and", "b": [0.6277, 0.6839, 0.658, 0.6988]}, {"w": "test", "b": [0.6644, 0.6839, 0.6948, 0.6988]}, {"w": "sets.", "b": [0.7012, 0.6839, 0.737, 0.6988]}, {"w": "The", "b": [0.7458, 0.6839, 0.7782, 0.6988]}, {"w": "rest", "b": [0.7846, 0.6839, 0.8151, 0.6988]}, {"w": "of", "b": [0.8214, 0.6839, 0.8366, 0.6988]}, {"w": "the", "b": [0.843, 0.6839, 0.8691, 0.6988]}, {"w": "problem", "b": [0.1312, 0.7018, 0.1957, 0.7168]}, {"w": "is", "b": [0.2018, 0.7018, 0.214, 0.7168]}, {"w": "solved", "b": [0.2202, 0.7018, 0.2685, 0.7168]}, {"w": "after", "b": [0.2747, 0.7018, 0.3115, 0.7168]}, {"w": "you", "b": [0.3177, 0.7018, 0.3458, 0.7168]}, {"w": "type", "b": [0.352, 0.7018, 0.3867, 0.7168]}, {"w": "model.fit(X,y),", "b": [0.3927, 0.7018, 0.5333, 0.7178]}, {"w": "by", "b": [0.5395, 0.7018, 0.5586, 0.7168]}, {"w": "applying", "b": [0.5648, 0.7018, 0.6327, 0.7168]}, {"w": "error", "b": [0.6388, 0.7018, 0.6772, 0.7168]}, {"w": "analysis,", "b": [0.6834, 0.7018, 0.7505, 0.7168]}, {"w": "evaluating", "b": [0.7567, 0.7018, 0.8376, 0.7168]}, {"w": "the", "b": [0.8438, 0.7018, 0.8689, 0.7168]}, {"w": "model,", "b": [0.1312, 0.7198, 0.1851, 0.7347]}, {"w": "verifying", "b": [0.1912, 0.7198, 0.261, 0.7347]}, {"w": "it", "b": [0.2671, 0.7198, 0.2795, 0.7347]}, {"w": "solves", "b": [0.2856, 0.7198, 0.332, 0.7347]}, {"w": "the", "b": [0.3381, 0.7198, 0.3638, 0.7347]}, {"w": "problem,", "b": [0.3699, 0.7198, 0.4407, 0.7347]}, {"w": "and", "b": [0.4469, 0.7198, 0.4766, 0.7347]}, {"w": "works", "b": [0.4828, 0.7198, 0.5291, 0.7347]}, {"w": "better", "b": [0.5352, 0.7198, 0.584, 0.7347]}, {"w": "than", "b": [0.5901, 0.7198, 0.627, 0.7347]}, {"w": "the", "b": [0.6332, 0.7198, 0.6588, 0.7347]}, {"w": "existing", "b": [0.665, 0.7198, 0.7271, 0.7347]}, {"w": "solution.", "b": [0.7333, 0.7198, 0.8021, 0.7347]}]}, {"id": "b_11", "type": "paragraph", "text": "The seasoned analyst or machine learning engineer understands that not all problems, business or otherwise, will be solved with machine learning. In fact, many problems can be solved more easily using a heuristic, a lookup in a database, or traditional software development. You probably should not use machine learning if the system’s every action, decision, or behavior, must be explained. With rare exceptions, machine learning models are blackboxes. They will not tell you why they predicted what they predicted, nor why they didn’t predict today what they predicted yesterday, nor how to fix these issues.", "words": [{"w": "The", "b": [0.1306, 0.7467, 0.1617, 0.7616]}, {"w": "seasoned", "b": [0.1665, 0.7467, 0.235, 0.7616]}, {"w": "analyst", "b": [0.2397, 0.7467, 0.2966, 0.7616]}, {"w": "or", "b": [0.3013, 0.7467, 0.3175, 0.7616]}, {"w": "machine", "b": [0.3222, 0.7467, 0.387, 0.7616]}, {"w": "learning", "b": [0.3917, 0.7467, 0.4551, 0.7616]}, {"w": "engineer", "b": [0.4598, 0.7467, 0.5252, 0.7616]}, {"w": "understands", "b": [0.5299, 0.7467, 0.6257, 0.7616]}, {"w": "that", "b": [0.6304, 0.7467, 0.6636, 0.7616]}, {"w": "not", "b": [0.6683, 0.7467, 0.6944, 0.7616]}, {"w": "all", "b": [0.6992, 0.7467, 0.7183, 0.7616]}, {"w": "problems,", "b": [0.723, 0.7467, 0.7995, 0.7616]}, {"w": "business", "b": [0.8045, 0.7467, 0.8692, 0.7616]}, {"w": "or", "b": [0.1312, 0.7646, 0.1474, 0.7796]}, {"w": "otherwise,", "b": [0.1524, 0.7646, 0.232, 0.7796]}, {"w": "will", "b": [0.2373, 0.7646, 0.2654, 0.7796]}, {"w": "be", "b": [0.2705, 0.7646, 0.2891, 0.7796]}, {"w": "solved", "b": [0.2942, 0.7646, 0.3425, 0.7796]}, {"w": "with", "b": [0.3476, 0.7646, 0.3828, 0.7796]}, {"w": "machine", "b": [0.3879, 0.7646, 0.4527, 0.7796]}, {"w": "learning.", "b": [0.4578, 0.7646, 0.5262, 0.7796]}, {"w": "In", "b": [0.534, 0.7646, 0.5506, 0.7796]}, {"w": "fact,", "b": [0.5557, 0.7646, 0.5904, 0.7796]}, {"w": "many", "b": [0.5957, 0.7646, 0.6388, 0.7796]}, {"w": "problems", "b": [0.6439, 0.7646, 0.7154, 0.7796]}, {"w": "can", "b": [0.7205, 0.7646, 0.7477, 0.7796]}, {"w": "be", "b": [0.7527, 0.7646, 0.7713, 0.7796]}, {"w": "solved", "b": [0.7764, 0.7646, 0.8248, 0.7796]}, {"w": "more", "b": [0.8299, 0.7646, 0.8691, 0.7796]}, {"w": "easily", "b": [0.1312, 0.7826, 0.1768, 0.7975]}, {"w": "using", "b": [0.1832, 0.7826, 0.2262, 0.7975]}, {"w": "a", "b": [0.2325, 0.7826, 0.2419, 0.7975]}, {"w": "heuristic,", "b": [0.2483, 0.7826, 0.3238, 0.7975]}, {"w": "a", "b": [0.3301, 0.7826, 0.3396, 0.7975]}, {"w": "lookup", "b": [0.3459, 0.7826, 0.4013, 0.7975]}, {"w": "in", "b": [0.4076, 0.7826, 0.4233, 0.7975]}, {"w": "a", "b": [0.4297, 0.7826, 0.4391, 0.7975]}, {"w": "database,", "b": [0.4454, 0.7826, 0.5229, 0.7975]}, {"w": "or", "b": [0.5293, 0.7826, 0.5461, 0.7975]}, {"w": "traditional", "b": [0.5524, 0.7826, 0.6393, 0.7975]}, {"w": "software", "b": [0.6456, 0.7826, 0.7133, 0.7975]}, {"w": "development.", "b": [0.7196, 0.7826, 0.8279, 0.7975]}, {"w": "You", "b": [0.8367, 0.7826, 0.8691, 0.7975]}, {"w": "probably", "b": [0.1312, 0.8005, 0.2018, 0.8155]}, {"w": "should", "b": [0.208, 0.8005, 0.2599, 0.8155]}, {"w": "not", "b": [0.266, 0.8005, 0.2924, 0.8155]}, {"w": "use", "b": [0.2985, 0.8005, 0.324, 0.8155]}, {"w": "machine", "b": [0.3301, 0.8005, 0.3956, 0.8155]}, {"w": "learning", "b": [0.4017, 0.8005, 0.4658, 0.8155]}, {"w": "if", "b": [0.4719, 0.8005, 0.4825, 0.8155]}, {"w": "the", "b": [0.4887, 0.8005, 0.5141, 0.8155]}, {"w": "system’s", "b": [0.5202, 0.8005, 0.587, 0.8155]}, {"w": "every", "b": [0.5931, 0.8005, 0.6353, 0.8155]}, {"w": "action,", "b": [0.6414, 0.8005, 0.6952, 0.8155]}, {"w": "decision,", "b": [0.7014, 0.8005, 0.7695, 0.8155]}, {"w": "or", "b": [0.7757, 0.8005, 0.7919, 0.8155]}, {"w": "behavior,", "b": [0.7981, 0.8005, 0.8717, 0.8155]}, {"w": "must", "b": [0.1312, 0.8185, 0.1716, 0.8334]}, {"w": "be", "b": [0.1782, 0.8185, 0.1975, 0.8334]}, {"w": "explained.", "b": [0.2041, 0.8185, 0.2873, 0.8334]}, {"w": "With", "b": [0.2968, 0.8185, 0.3392, 0.8334]}, {"w": "rare", "b": [0.3458, 0.8185, 0.3783, 0.8334]}, {"w": "exceptions,", "b": [0.3849, 0.8185, 0.4755, 0.8334]}, {"w": "machine", "b": [0.4822, 0.8185, 0.5497, 0.8334]}, {"w": "learning", "b": [0.5562, 0.8185, 0.6222, 0.8334]}, {"w": "models", "b": [0.6288, 0.8185, 0.6859, 0.8334]}, {"w": "are", "b": [0.6925, 0.8185, 0.7176, 0.8334]}, {"w": "blackboxes.", "b": [0.7242, 0.8185, 0.8179, 0.8334]}, {"w": "They", "b": [0.8275, 0.8185, 0.8698, 0.8334]}, {"w": "will", "b": [0.1306, 0.8364, 0.159, 0.8514]}, {"w": "not", "b": [0.1651, 0.8364, 0.1915, 0.8514]}, {"w": "tell", "b": [0.1977, 0.8364, 0.2231, 0.8514]}, {"w": "you", "b": [0.2292, 0.8364, 0.2577, 0.8514]}, {"w": "why", "b": [0.2638, 0.8364, 0.2963, 0.8514]}, {"w": "they", "b": [0.3024, 0.8364, 0.3375, 0.8514]}, {"w": "predicted", "b": [0.3436, 0.8364, 0.4178, 0.8514]}, {"w": "what", "b": [0.424, 0.8364, 0.4635, 0.8514]}, {"w": "they", "b": [0.4697, 0.8364, 0.5047, 0.8514]}, {"w": "predicted,", "b": [0.5109, 0.8364, 0.5901, 0.8514]}, {"w": "nor", "b": [0.5963, 0.8364, 0.6227, 0.8514]}, {"w": "why", "b": [0.6289, 0.8364, 0.6614, 0.8514]}, {"w": "they", "b": [0.6675, 0.8364, 0.7025, 0.8514]}, {"w": "didn’t", "b": [0.7087, 0.8364, 0.7564, 0.8514]}, {"w": "predict", "b": [0.7626, 0.8364, 0.8185, 0.8514]}, {"w": "today", "b": [0.8246, 0.8364, 0.8698, 0.8514]}, {"w": "what", "b": [0.1306, 0.8544, 0.1705, 0.8693]}, {"w": "they", "b": [0.1767, 0.8544, 0.2121, 0.8693]}, {"w": "predicted", "b": [0.2182, 0.8544, 0.2932, 0.8693]}, {"w": "yesterday,", "b": [0.2993, 0.8544, 0.379, 0.8693]}, {"w": "nor", "b": [0.3851, 0.8544, 0.4118, 0.8693]}, {"w": "how", "b": [0.418, 0.8544, 0.4503, 0.8693]}, {"w": "to", "b": [0.4564, 0.8544, 0.4728, 0.8693]}, {"w": "fix", "b": [0.479, 0.8544, 0.499, 0.8693]}, {"w": "these", "b": [0.5051, 0.8544, 0.5462, 0.8693]}, {"w": "issues.", "b": [0.5524, 0.8544, 0.603, 0.8693]}]}, {"id": "b_12", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 3", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "3", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 292, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Furthermore, unless you can find a public dataset and an open-source solution providing exactly what you need, machine learning is not the right approach for the shortest time to market. Sometimes the data needed to train and maintain a model is too hard or even impossible to get.", "words": [{"w": "Furthermore,", "b": [0.1312, 0.0881, 0.2394, 0.1031]}, {"w": "unless", "b": [0.2465, 0.0881, 0.2959, 0.1031]}, {"w": "you", "b": [0.3027, 0.0881, 0.332, 0.1031]}, {"w": "can", "b": [0.3389, 0.0881, 0.3671, 0.1031]}, {"w": "find", "b": [0.374, 0.0881, 0.4054, 0.1031]}, {"w": "a", "b": [0.4122, 0.0881, 0.4216, 0.1031]}, {"w": "public", "b": [0.4285, 0.0881, 0.4787, 0.1031]}, {"w": "dataset", "b": [0.4856, 0.0881, 0.5453, 0.1031]}, {"w": "and", "b": [0.5522, 0.0881, 0.5825, 0.1031]}, {"w": "an", "b": [0.5894, 0.0881, 0.6092, 0.1031]}, {"w": "open-source", "b": [0.6161, 0.0881, 0.713, 0.1031]}, {"w": "solution", "b": [0.7199, 0.0881, 0.7848, 0.1031]}, {"w": "providing", "b": [0.7917, 0.0881, 0.8692, 0.1031]}, {"w": "exactly", "b": [0.1312, 0.106, 0.1898, 0.121]}, {"w": "what", "b": [0.1971, 0.106, 0.2379, 0.121]}, {"w": "you", "b": [0.2452, 0.106, 0.2745, 0.121]}, {"w": "need,", "b": [0.2817, 0.106, 0.3246, 0.121]}, {"w": "machine", "b": [0.3322, 0.106, 0.3997, 0.121]}, {"w": "learning", "b": [0.407, 0.106, 0.4729, 0.121]}, {"w": "is", "b": [0.4802, 0.106, 0.4929, 0.121]}, {"w": "not", "b": [0.5002, 0.106, 0.5274, 0.121]}, {"w": "the", "b": [0.5347, 0.106, 0.5608, 0.121]}, {"w": "right", "b": [0.5681, 0.106, 0.6074, 0.121]}, {"w": "approach", "b": [0.6147, 0.106, 0.6895, 0.121]}, {"w": "for", "b": [0.6968, 0.106, 0.7194, 0.121]}, {"w": "the", "b": [0.7266, 0.106, 0.7528, 0.121]}, {"w": "shortest", "b": [0.7601, 0.106, 0.8252, 0.121]}, {"w": "time", "b": [0.8325, 0.106, 0.8691, 0.121]}, {"w": "to", "b": [0.1312, 0.124, 0.148, 0.1389]}, {"w": "market.", "b": [0.1542, 0.124, 0.217, 0.1389]}, {"w": "Sometimes", "b": [0.2255, 0.124, 0.3134, 0.1389]}, {"w": "the", "b": [0.3197, 0.124, 0.3458, 0.1389]}, {"w": "data", "b": [0.352, 0.124, 0.3886, 0.1389]}, {"w": "needed", "b": [0.3949, 0.124, 0.4514, 0.1389]}, {"w": "to", "b": [0.4576, 0.124, 0.4743, 0.1389]}, {"w": "train", "b": [0.4806, 0.124, 0.5204, 0.1389]}, {"w": "and", "b": [0.5266, 0.124, 0.557, 0.1389]}, {"w": "maintain", "b": [0.5632, 0.124, 0.6359, 0.1389]}, {"w": "a", "b": [0.6421, 0.124, 0.6515, 0.1389]}, {"w": "model", "b": [0.6577, 0.124, 0.7074, 0.1389]}, {"w": "is", "b": [0.7137, 0.124, 0.7263, 0.1389]}, {"w": "too", "b": [0.7326, 0.124, 0.7592, 0.1389]}, {"w": "hard", "b": [0.7654, 0.124, 0.8032, 0.1389]}, {"w": "or", "b": [0.8094, 0.124, 0.8262, 0.1389]}, {"w": "even", "b": [0.8324, 0.124, 0.869, 0.1389]}, {"w": "impossible", "b": [0.1312, 0.1419, 0.215, 0.1569]}, {"w": "to", "b": [0.2212, 0.1419, 0.2376, 0.1569]}, {"w": "get.", "b": [0.2437, 0.1419, 0.2735, 0.1569]}]}, {"id": "b_1", "type": "paragraph", "text": "On the other hand, training data may be synthetically generated by using oversampling and data augmentation. These techniques are often applied when the data exhibits imbalance.", "words": [{"w": "On", "b": [0.1312, 0.1689, 0.1555, 0.1838]}, {"w": "the", "b": [0.1617, 0.1689, 0.187, 0.1838]}, {"w": "other", "b": [0.1931, 0.1689, 0.2347, 0.1838]}, {"w": "hand,", "b": [0.2408, 0.1689, 0.2854, 0.1838]}, {"w": "training", "b": [0.2915, 0.1689, 0.3543, 0.1838]}, {"w": "data", "b": [0.3605, 0.1689, 0.3959, 0.1838]}, {"w": "may", "b": [0.4021, 0.1689, 0.4354, 0.1838]}, {"w": "be", "b": [0.4416, 0.1689, 0.4603, 0.1838]}, {"w": "synthetically", "b": [0.4665, 0.1689, 0.5673, 0.1838]}, {"w": "generated", "b": [0.5734, 0.1689, 0.6504, 0.1838]}, {"w": "by", "b": [0.6566, 0.1689, 0.6758, 0.1838]}, {"w": "using", "b": [0.682, 0.1689, 0.7236, 0.1838]}, {"w": "oversampling", "b": [0.7297, 0.1689, 0.8336, 0.1838]}, {"w": "and", "b": [0.8398, 0.1689, 0.8691, 0.1838]}, {"w": "data", "b": [0.1312, 0.1868, 0.1671, 0.2018]}, {"w": "augmentation.", "b": [0.1733, 0.1868, 0.2886, 0.2018]}, {"w": "These", "b": [0.2968, 0.1868, 0.3441, 0.2018]}, {"w": "techniques", "b": [0.3502, 0.1868, 0.4345, 0.2018]}, {"w": "are", "b": [0.4406, 0.1868, 0.4653, 0.2018]}, {"w": "often", "b": [0.4714, 0.1868, 0.5119, 0.2018]}, {"w": "applied", "b": [0.5181, 0.1868, 0.5765, 0.2018]}, {"w": "when", "b": [0.5827, 0.1868, 0.6248, 0.2018]}, {"w": "the", "b": [0.6309, 0.1868, 0.6565, 0.2018]}, {"w": "data", "b": [0.6627, 0.1868, 0.6986, 0.2018]}, {"w": "exhibits", "b": [0.7047, 0.1868, 0.7679, 0.2018]}, {"w": "imbalance.", "b": [0.774, 0.1868, 0.8597, 0.2018]}]}, {"id": "b_2", "type": "paragraph", "text": "Before you start collecting data, ask these questions: is your data accessible, sizeable, usable, understandable, and reliable? Good data contains enough information for modeling, has good coverage of production use cases and few biases, is big enough to allow generalization, and not a result of the model itself.", "words": [{"w": "Before", "b": [0.1312, 0.2137, 0.1818, 0.2287]}, {"w": "you", "b": [0.188, 0.2137, 0.2162, 0.2287]}, {"w": "start", "b": [0.2223, 0.2137, 0.2597, 0.2287]}, {"w": "collecting", "b": [0.2658, 0.2137, 0.3403, 0.2287]}, {"w": "data,", "b": [0.3464, 0.2137, 0.3867, 0.2287]}, {"w": "ask", "b": [0.3928, 0.2137, 0.4186, 0.2287]}, {"w": "these", "b": [0.4248, 0.2137, 0.4651, 0.2287]}, {"w": "questions:", "b": [0.4713, 0.2137, 0.5494, 0.2287]}, {"w": "is", "b": [0.5577, 0.2137, 0.5698, 0.2287]}, {"w": "your", "b": [0.576, 0.2137, 0.6112, 0.2287]}, {"w": "data", "b": [0.6174, 0.2137, 0.6526, 0.2287]}, {"w": "accessible,", "b": [0.6588, 0.2137, 0.7395, 0.2287]}, {"w": "sizeable,", "b": [0.7456, 0.2137, 0.8111, 0.2287]}, {"w": "usable,", "b": [0.8173, 0.2137, 0.8718, 0.2287]}, {"w": "understandable,", "b": [0.1312, 0.2317, 0.2622, 0.2466]}, {"w": "and", "b": [0.2694, 0.2317, 0.2998, 0.2466]}, {"w": "reliable?", "b": [0.3068, 0.2317, 0.3754, 0.2466]}, {"w": "Good", "b": [0.3862, 0.2317, 0.4313, 0.2466]}, {"w": "data", "b": [0.4383, 0.2317, 0.4749, 0.2466]}, {"w": "contains", "b": [0.4819, 0.2317, 0.5495, 0.2466]}, {"w": "enough", "b": [0.5566, 0.2317, 0.6151, 0.2466]}, {"w": "information", "b": [0.6222, 0.2317, 0.7179, 0.2466]}, {"w": "for", "b": [0.725, 0.2317, 0.7475, 0.2466]}, {"w": "modeling,", "b": [0.7545, 0.2317, 0.8345, 0.2466]}, {"w": "has", "b": [0.8418, 0.2317, 0.8691, 0.2466]}, {"w": "good", "b": [0.1312, 0.2496, 0.1702, 0.2646]}, {"w": "coverage", "b": [0.1763, 0.2496, 0.2446, 0.2646]}, {"w": "of", "b": [0.2507, 0.2496, 0.2656, 0.2646]}, {"w": "production", "b": [0.2717, 0.2496, 0.3595, 0.2646]}, {"w": "use", "b": [0.3656, 0.2496, 0.3913, 0.2646]}, {"w": "cases", "b": [0.3975, 0.2496, 0.4377, 0.2646]}, {"w": "and", "b": [0.4438, 0.2496, 0.4736, 0.2646]}, {"w": "few", "b": [0.4797, 0.2496, 0.5069, 0.2646]}, {"w": "biases,", "b": [0.513, 0.2496, 0.5655, 0.2646]}, {"w": "is", "b": [0.5717, 0.2496, 0.5841, 0.2646]}, {"w": "big", "b": [0.5902, 0.2496, 0.6148, 0.2646]}, {"w": "enough", "b": [0.621, 0.2496, 0.6784, 0.2646]}, {"w": "to", "b": [0.6845, 0.2496, 0.7009, 0.2646]}, {"w": "allow", "b": [0.7071, 0.2496, 0.7486, 0.2646]}, {"w": "generalization,", "b": [0.7547, 0.2496, 0.8717, 0.2646]}, {"w": "and", "b": [0.1312, 0.2676, 0.161, 0.2825]}, {"w": "not", "b": [0.1671, 0.2676, 0.1938, 0.2825]}, {"w": "a", "b": [0.1999, 0.2676, 0.2092, 0.2825]}, {"w": "result", "b": [0.2153, 0.2676, 0.2606, 0.2825]}, {"w": "of", "b": [0.2667, 0.2676, 0.2816, 0.2825]}, {"w": "the", "b": [0.2878, 0.2676, 0.3134, 0.2825]}, {"w": "model", "b": [0.3196, 0.2676, 0.3683, 0.2825]}, {"w": "itself.", "b": [0.3744, 0.2676, 0.4181, 0.2825]}]}, {"id": "b_3", "type": "paragraph", "text": "Or does your data come with high cost, bias, imbalance, missing attributes, and/or noisy labels? Data quality must be ensured before it’s used for training.", "words": [{"w": "Or", "b": [0.1312, 0.2945, 0.1533, 0.3094]}, {"w": "does", "b": [0.1597, 0.2945, 0.1959, 0.3094]}, {"w": "your", "b": [0.2024, 0.2945, 0.239, 0.3094]}, {"w": "data", "b": [0.2455, 0.2945, 0.2821, 0.3094]}, {"w": "come", "b": [0.2886, 0.2945, 0.3304, 0.3094]}, {"w": "with", "b": [0.3369, 0.2945, 0.3735, 0.3094]}, {"w": "high", "b": [0.3799, 0.2945, 0.4155, 0.3094]}, {"w": "cost,", "b": [0.422, 0.2945, 0.4597, 0.3094]}, {"w": "bias,", "b": [0.4663, 0.2945, 0.504, 0.3094]}, {"w": "imbalance,", "b": [0.5106, 0.2945, 0.5979, 0.3094]}, {"w": "missing", "b": [0.6045, 0.2945, 0.6654, 0.3094]}, {"w": "attributes,", "b": [0.6718, 0.2945, 0.7577, 0.3094]}, {"w": "and/or", "b": [0.7643, 0.2945, 0.8208, 0.3094]}, {"w": "noisy", "b": [0.8273, 0.2945, 0.8698, 0.3094]}, {"w": "labels?", "b": [0.1312, 0.3124, 0.1857, 0.3274]}, {"w": "Data", "b": [0.1939, 0.3124, 0.2336, 0.3274]}, {"w": "quality", "b": [0.2398, 0.3124, 0.2957, 0.3274]}, {"w": "must", "b": [0.3018, 0.3124, 0.3414, 0.3274]}, {"w": "be", "b": [0.3475, 0.3124, 0.3665, 0.3274]}, {"w": "ensured", "b": [0.3726, 0.3124, 0.4344, 0.3274]}, {"w": "before", "b": [0.4405, 0.3124, 0.4898, 0.3274]}, {"w": "it’s", "b": [0.4959, 0.3124, 0.5207, 0.3274]}, {"w": "used", "b": [0.5268, 0.3124, 0.5628, 0.3274]}, {"w": "for", "b": [0.569, 0.3124, 0.5911, 0.3274]}, {"w": "training.", "b": [0.5972, 0.3124, 0.666, 0.3274]}]}, {"id": "b_4", "type": "paragraph", "text": "The machine learning project life cycle consists of the following stages: goal definition, data collection and preparation, feature engineering, model training, evaluation, deployment, serving, monitoring, and maintenance. At most stages, data leakage may arise. The analyst must be able to anticipate and prevent it.", "words": [{"w": "The", "b": [0.1306, 0.3394, 0.1622, 0.3543]}, {"w": "machine", "b": [0.1683, 0.3394, 0.2341, 0.3543]}, {"w": "learning", "b": [0.2403, 0.3394, 0.3046, 0.3543]}, {"w": "project", "b": [0.3107, 0.3394, 0.3669, 0.3543]}, {"w": "life", "b": [0.3731, 0.3394, 0.3971, 0.3543]}, {"w": "cycle", "b": [0.4032, 0.3394, 0.4425, 0.3543]}, {"w": "consists", "b": [0.4486, 0.3394, 0.5102, 0.3543]}, {"w": "of", "b": [0.5163, 0.3394, 0.5311, 0.3543]}, {"w": "the", "b": [0.5372, 0.3394, 0.5628, 0.3543]}, {"w": "following", "b": [0.5689, 0.3394, 0.6403, 0.3543]}, {"w": "stages:", "b": [0.6464, 0.3394, 0.6997, 0.3543]}, {"w": "goal", "b": [0.7079, 0.3394, 0.7405, 0.3543]}, {"w": "definition,", "b": [0.7467, 0.3394, 0.8273, 0.3543]}, {"w": "data", "b": [0.8334, 0.3394, 0.8691, 0.3543]}, {"w": "collection", "b": [0.1312, 0.3573, 0.2087, 0.3723]}, {"w": "and", "b": [0.2168, 0.3573, 0.2472, 0.3723]}, {"w": "preparation,", "b": [0.2554, 0.3573, 0.3559, 0.3723]}, {"w": "feature", "b": [0.3646, 0.3573, 0.4217, 0.3723]}, {"w": "engineering,", "b": [0.4298, 0.3573, 0.5282, 0.3723]}, {"w": "model", "b": [0.5369, 0.3573, 0.5866, 0.3723]}, {"w": "training,", "b": [0.5948, 0.3573, 0.6649, 0.3723]}, {"w": "evaluation,", "b": [0.6736, 0.3573, 0.7631, 0.3723]}, {"w": "deployment,", "b": [0.7718, 0.3573, 0.8717, 0.3723]}, {"w": "serving,", "b": [0.1312, 0.3752, 0.193, 0.3902]}, {"w": "monitoring,", "b": [0.1991, 0.3752, 0.2918, 0.3902]}, {"w": "and", "b": [0.298, 0.3752, 0.3275, 0.3902]}, {"w": "maintenance.", "b": [0.3337, 0.3752, 0.439, 0.3902]}, {"w": "At", "b": [0.4472, 0.3752, 0.4676, 0.3902]}, {"w": "most", "b": [0.4737, 0.3752, 0.5125, 0.3902]}, {"w": "stages,", "b": [0.5186, 0.3752, 0.5718, 0.3902]}, {"w": "data", "b": [0.5779, 0.3752, 0.6136, 0.3902]}, {"w": "leakage", "b": [0.6197, 0.3752, 0.6783, 0.3902]}, {"w": "may", "b": [0.6844, 0.3752, 0.718, 0.3902]}, {"w": "arise.", "b": [0.7241, 0.3752, 0.766, 0.3902]}, {"w": "The", "b": [0.7742, 0.3752, 0.8058, 0.3902]}, {"w": "analyst", "b": [0.8119, 0.3752, 0.8696, 0.3902]}, {"w": "must", "b": [0.1312, 0.3932, 0.1708, 0.4082]}, {"w": "be", "b": [0.177, 0.3932, 0.1959, 0.4082]}, {"w": "able", "b": [0.2021, 0.3932, 0.2349, 0.4082]}, {"w": "to", "b": [0.2411, 0.3932, 0.2575, 0.4082]}, {"w": "anticipate", "b": [0.2636, 0.3932, 0.3431, 0.4082]}, {"w": "and", "b": [0.3492, 0.3932, 0.379, 0.4082]}, {"w": "prevent", "b": [0.3851, 0.3932, 0.4452, 0.4082]}, {"w": "it.", "b": [0.4513, 0.3932, 0.4688, 0.4082]}]}, {"id": "b_5", "type": "paragraph", "text": "After data preparation, feature engineering is the second most important stage. For some data, such as natural language text, features may be generated in bulk by using techniques like bag-of-words. However, the most useful features are often handcrafted by the analyst domain knowledge. Put yourself into the “model’s shoes.”", "words": [{"w": "After", "b": [0.1305, 0.4201, 0.1735, 0.4351]}, {"w": "data", "b": [0.1797, 0.4201, 0.2163, 0.4351]}, {"w": "preparation,", "b": [0.2225, 0.4201, 0.323, 0.4351]}, {"w": "feature", "b": [0.3293, 0.4201, 0.3863, 0.4351]}, {"w": "engineering", "b": [0.3926, 0.4201, 0.4857, 0.4351]}, {"w": "is", "b": [0.4919, 0.4201, 0.5046, 0.4351]}, {"w": "the", "b": [0.5108, 0.4201, 0.537, 0.4351]}, {"w": "second", "b": [0.5432, 0.4201, 0.5977, 0.4351]}, {"w": "most", "b": [0.6039, 0.4201, 0.6438, 0.4351]}, {"w": "important", "b": [0.65, 0.4201, 0.7327, 0.4351]}, {"w": "stage.", "b": [0.7389, 0.4201, 0.786, 0.4351]}, {"w": "For", "b": [0.7945, 0.4201, 0.822, 0.4351]}, {"w": "some", "b": [0.8282, 0.4201, 0.8691, 0.4351]}, {"w": "data,", "b": [0.1312, 0.4381, 0.1723, 0.453]}, {"w": "such", "b": [0.1785, 0.4381, 0.2141, 0.453]}, {"w": "as", "b": [0.2202, 0.4381, 0.2368, 0.453]}, {"w": "natural", "b": [0.2429, 0.4381, 0.3015, 0.453]}, {"w": "language", "b": [0.3077, 0.4381, 0.3786, 0.453]}, {"w": "text,", "b": [0.3848, 0.4381, 0.4223, 0.453]}, {"w": "features", "b": [0.4284, 0.4381, 0.4918, 0.453]}, {"w": "may", "b": [0.4979, 0.4381, 0.5318, 0.453]}, {"w": "be", "b": [0.538, 0.4381, 0.557, 0.453]}, {"w": "generated", "b": [0.5632, 0.4381, 0.6413, 0.453]}, {"w": "in", "b": [0.6475, 0.4381, 0.6629, 0.453]}, {"w": "bulk", "b": [0.6691, 0.4381, 0.7045, 0.453]}, {"w": "by", "b": [0.7107, 0.4381, 0.7302, 0.453]}, {"w": "using", "b": [0.7364, 0.4381, 0.7786, 0.453]}, {"w": "techniques", "b": [0.7848, 0.4381, 0.8691, 0.453]}, {"w": "like", "b": [0.1312, 0.456, 0.1595, 0.471]}, {"w": "bag-of-words.", "b": [0.1658, 0.456, 0.2757, 0.471]}, {"w": "However,", "b": [0.2843, 0.456, 0.3591, 0.471]}, {"w": "the", "b": [0.3654, 0.456, 0.3916, 0.471]}, {"w": "most", "b": [0.3979, 0.456, 0.4377, 0.471]}, {"w": "useful", "b": [0.444, 0.456, 0.4917, 0.471]}, {"w": "features", "b": [0.4979, 0.456, 0.5624, 0.471]}, {"w": "are", "b": [0.5687, 0.456, 0.5939, 0.471]}, {"w": "often", "b": [0.6001, 0.456, 0.6415, 0.471]}, {"w": "handcrafted", "b": [0.6477, 0.456, 0.7456, 0.471]}, {"w": "by", "b": [0.7518, 0.456, 0.7717, 0.471]}, {"w": "the", "b": [0.778, 0.456, 0.8042, 0.471]}, {"w": "analyst", "b": [0.8104, 0.456, 0.8696, 0.471]}, {"w": "domain", "b": [0.1312, 0.474, 0.1907, 0.4889]}, {"w": "knowledge.", "b": [0.1968, 0.474, 0.285, 0.4889]}, {"w": "Put", "b": [0.2932, 0.474, 0.3232, 0.4889]}, {"w": "yourself", "b": [0.3294, 0.474, 0.3916, 0.4889]}, {"w": "into", "b": [0.3977, 0.474, 0.429, 0.4889]}, {"w": "the", "b": [0.4352, 0.474, 0.4608, 0.4889]}, {"w": "“model’s", "b": [0.467, 0.474, 0.5368, 0.4889]}, {"w": "shoes.”", "b": [0.5429, 0.474, 0.597, 0.4889]}]}, {"id": "b_6", "type": "paragraph", "text": "Good features have high predictive power, can be computed fast, are reliable and uncor- related. They are unitary, easy to understand and maintain. Feature extraction code is one of the most important parts of a machine learning system. It must be extensively and systematically tested.", "words": [{"w": "Good", "b": [0.1312, 0.5009, 0.1763, 0.5158]}, {"w": "features", "b": [0.1835, 0.5009, 0.248, 0.5158]}, {"w": "have", "b": [0.2551, 0.5009, 0.2923, 0.5158]}, {"w": "high", "b": [0.2994, 0.5009, 0.335, 0.5158]}, {"w": "predictive", "b": [0.3421, 0.5009, 0.4227, 0.5158]}, {"w": "power,", "b": [0.4299, 0.5009, 0.4838, 0.5158]}, {"w": "can", "b": [0.4912, 0.5009, 0.5194, 0.5158]}, {"w": "be", "b": [0.5266, 0.5009, 0.5459, 0.5158]}, {"w": "computed", "b": [0.5531, 0.5009, 0.6336, 0.5158]}, {"w": "fast,", "b": [0.6407, 0.5009, 0.6759, 0.5158]}, {"w": "are", "b": [0.6833, 0.5009, 0.7084, 0.5158]}, {"w": "reliable", "b": [0.7156, 0.5009, 0.7753, 0.5158]}, {"w": "and", "b": [0.7824, 0.5009, 0.8127, 0.5158]}, {"w": "uncor-", "b": [0.8199, 0.5009, 0.8722, 0.5158]}, {"w": "related.", "b": [0.1312, 0.5188, 0.193, 0.5338]}, {"w": "They", "b": [0.2048, 0.5188, 0.2472, 0.5338]}, {"w": "are", "b": [0.2545, 0.5188, 0.2797, 0.5338]}, {"w": "unitary,", "b": [0.287, 0.5188, 0.3509, 0.5338]}, {"w": "easy", "b": [0.3585, 0.5188, 0.3937, 0.5338]}, {"w": "to", "b": [0.401, 0.5188, 0.4177, 0.5338]}, {"w": "understand", "b": [0.4251, 0.5188, 0.5173, 0.5338]}, {"w": "and", "b": [0.5246, 0.5188, 0.555, 0.5338]}, {"w": "maintain.", "b": [0.5623, 0.5188, 0.6402, 0.5338]}, {"w": "Feature", "b": [0.652, 0.5188, 0.7141, 0.5338]}, {"w": "extraction", "b": [0.7214, 0.5188, 0.8046, 0.5338]}, {"w": "code", "b": [0.812, 0.5188, 0.8491, 0.5338]}, {"w": "is", "b": [0.8565, 0.5188, 0.8691, 0.5338]}, {"w": "one", "b": [0.1312, 0.5368, 0.1593, 0.5517]}, {"w": "of", "b": [0.1655, 0.5368, 0.1805, 0.5517]}, {"w": "the", "b": [0.1867, 0.5368, 0.2127, 0.5517]}, {"w": "most", "b": [0.2188, 0.5368, 0.2584, 0.5517]}, {"w": "important", "b": [0.2645, 0.5368, 0.3466, 0.5517]}, {"w": "parts", "b": [0.3528, 0.5368, 0.3945, 0.5517]}, {"w": "of", "b": [0.4007, 0.5368, 0.4158, 0.5517]}, {"w": "a", "b": [0.4219, 0.5368, 0.4313, 0.5517]}, {"w": "machine", "b": [0.4374, 0.5368, 0.5044, 0.5517]}, {"w": "learning", "b": [0.5106, 0.5368, 0.5761, 0.5517]}, {"w": "system.", "b": [0.5823, 0.5368, 0.6432, 0.5517]}, {"w": "It", "b": [0.6515, 0.5368, 0.6655, 0.5517]}, {"w": "must", "b": [0.6717, 0.5368, 0.7118, 0.5517]}, {"w": "be", "b": [0.7179, 0.5368, 0.7372, 0.5517]}, {"w": "extensively", "b": [0.7433, 0.5368, 0.8328, 0.5517]}, {"w": "and", "b": [0.839, 0.5368, 0.8691, 0.5517]}, {"w": "systematically", "b": [0.1312, 0.5547, 0.2453, 0.5697]}, {"w": "tested.", "b": [0.2514, 0.5547, 0.3049, 0.5697]}]}, {"id": "b_7", "type": "paragraph", "text": "Best practices are to scale features, store and document them in schema files or feature stores, and keep code, model, and training data in sync.", "words": [{"w": "Best", "b": [0.1312, 0.5816, 0.1663, 0.5966]}, {"w": "practices", "b": [0.1718, 0.5816, 0.2413, 0.5966]}, {"w": "are", "b": [0.2468, 0.5816, 0.2709, 0.5966]}, {"w": "to", "b": [0.2765, 0.5816, 0.2925, 0.5966]}, {"w": "scale", "b": [0.298, 0.5816, 0.3353, 0.5966]}, {"w": "features,", "b": [0.3408, 0.5816, 0.4078, 0.5966]}, {"w": "store", "b": [0.4135, 0.5816, 0.4518, 0.5966]}, {"w": "and", "b": [0.4573, 0.5816, 0.4865, 0.5966]}, {"w": "document", "b": [0.492, 0.5816, 0.5693, 0.5966]}, {"w": "them", "b": [0.5748, 0.5816, 0.615, 0.5966]}, {"w": "in", "b": [0.6205, 0.5816, 0.6356, 0.5966]}, {"w": "schema", "b": [0.6411, 0.5816, 0.698, 0.5966]}, {"w": "files", "b": [0.7035, 0.5816, 0.7338, 0.5966]}, {"w": "or", "b": [0.7393, 0.5816, 0.7554, 0.5966]}, {"w": "feature", "b": [0.7609, 0.5816, 0.8157, 0.5966]}, {"w": "stores,", "b": [0.8212, 0.5816, 0.8717, 0.5966]}, {"w": "and", "b": [0.1312, 0.5996, 0.161, 0.6145]}, {"w": "keep", "b": [0.1671, 0.5996, 0.203, 0.6145]}, {"w": "code,", "b": [0.2092, 0.5996, 0.2507, 0.6145]}, {"w": "model,", "b": [0.2569, 0.5996, 0.3107, 0.6145]}, {"w": "and", "b": [0.3169, 0.5996, 0.3466, 0.6145]}, {"w": "training", "b": [0.3527, 0.5996, 0.4164, 0.6145]}, {"w": "data", "b": [0.4225, 0.5996, 0.4584, 0.6145]}, {"w": "in", "b": [0.4645, 0.5996, 0.4799, 0.6145]}, {"w": "sync.", "b": [0.4861, 0.5996, 0.5267, 0.6145]}]}, {"id": "b_8", "type": "paragraph", "text": "You can synthesize new features by discretizing existing features, clustering training examples, and applying simple transformations to existing features, or combining pairs of them.", "words": [{"w": "You", "b": [0.1305, 0.6265, 0.1616, 0.6415]}, {"w": "can", "b": [0.1669, 0.6265, 0.194, 0.6415]}, {"w": "synthesize", "b": [0.1993, 0.6265, 0.2789, 0.6415]}, {"w": "new", "b": [0.2841, 0.6265, 0.3153, 0.6415]}, {"w": "features", "b": [0.3205, 0.6265, 0.3825, 0.6415]}, {"w": "by", "b": [0.3877, 0.6265, 0.4068, 0.6415]}, {"w": "discretizing", "b": [0.412, 0.6265, 0.5016, 0.6415]}, {"w": "existing", "b": [0.5069, 0.6265, 0.5678, 0.6415]}, {"w": "features,", "b": [0.573, 0.6265, 0.64, 0.6415]}, {"w": "clustering", "b": [0.6454, 0.6265, 0.722, 0.6415]}, {"w": "training", "b": [0.7272, 0.6265, 0.7896, 0.6415]}, {"w": "examples,", "b": [0.7948, 0.6265, 0.8718, 0.6415]}, {"w": "and", "b": [0.1312, 0.6445, 0.161, 0.6594]}, {"w": "applying", "b": [0.1671, 0.6445, 0.2363, 0.6594]}, {"w": "simple", "b": [0.2425, 0.6445, 0.2939, 0.6594]}, {"w": "transformations", "b": [0.3, 0.6445, 0.427, 0.6594]}, {"w": "to", "b": [0.4331, 0.6445, 0.4495, 0.6594]}, {"w": "existing", "b": [0.4557, 0.6445, 0.5178, 0.6594]}, {"w": "features,", "b": [0.524, 0.6445, 0.5923, 0.6594]}, {"w": "or", "b": [0.5985, 0.6445, 0.6149, 0.6594]}, {"w": "combining", "b": [0.6211, 0.6445, 0.7036, 0.6594]}, {"w": "pairs", "b": [0.7098, 0.6445, 0.7489, 0.6594]}, {"w": "of", "b": [0.7551, 0.6445, 0.7699, 0.6594]}, {"w": "them.", "b": [0.7761, 0.6445, 0.8222, 0.6594]}]}, {"id": "b_9", "type": "paragraph", "text": "Before starting to work on a model, make sure that data conforms to the schema, then split it into three sets: training, validation, and test. Define an achievable level of performance, and choose a performance metric. It should reduce the model performance to a single number.", "words": [{"w": "Before", "b": [0.1312, 0.6714, 0.1818, 0.6863]}, {"w": "starting", "b": [0.1873, 0.6714, 0.2487, 0.6863]}, {"w": "to", "b": [0.2542, 0.6714, 0.2703, 0.6863]}, {"w": "work", "b": [0.2758, 0.6714, 0.314, 0.6863]}, {"w": "on", "b": [0.3195, 0.6714, 0.3386, 0.6863]}, {"w": "a", "b": [0.3441, 0.6714, 0.3531, 0.6863]}, {"w": "model,", "b": [0.3586, 0.6714, 0.4114, 0.6863]}, {"w": "make", "b": [0.417, 0.6714, 0.4582, 0.6863]}, {"w": "sure", "b": [0.4637, 0.6714, 0.496, 0.6863]}, {"w": "that", "b": [0.5015, 0.6714, 0.5347, 0.6863]}, {"w": "data", "b": [0.5402, 0.6714, 0.5753, 0.6863]}, {"w": "conforms", "b": [0.5808, 0.6714, 0.6518, 0.6863]}, {"w": "to", "b": [0.6573, 0.6714, 0.6734, 0.6863]}, {"w": "the", "b": [0.6789, 0.6714, 0.704, 0.6863]}, {"w": "schema,", "b": [0.7095, 0.6714, 0.7714, 0.6863]}, {"w": "then", "b": [0.777, 0.6714, 0.8122, 0.6863]}, {"w": "split", "b": [0.8177, 0.6714, 0.852, 0.6863]}, {"w": "it", "b": [0.8575, 0.6714, 0.8695, 0.6863]}, {"w": "into", "b": [0.1312, 0.6893, 0.1621, 0.7043]}, {"w": "three", "b": [0.1682, 0.6893, 0.2087, 0.7043]}, {"w": "sets:", "b": [0.2149, 0.6893, 0.2495, 0.7043]}, {"w": "training,", "b": [0.2576, 0.6893, 0.3254, 0.7043]}, {"w": "validation,", "b": [0.3316, 0.6893, 0.415, 0.7043]}, {"w": "and", "b": [0.4211, 0.6893, 0.4504, 0.7043]}, {"w": "test.", "b": [0.4566, 0.6893, 0.4911, 0.7043]}, {"w": "Define", "b": [0.4993, 0.6893, 0.5496, 0.7043]}, {"w": "an", "b": [0.5557, 0.6893, 0.5749, 0.7043]}, {"w": "achievable", "b": [0.5811, 0.6893, 0.662, 0.7043]}, {"w": "level", "b": [0.6681, 0.6893, 0.7035, 0.7043]}, {"w": "of", "b": [0.7096, 0.6893, 0.7243, 0.7043]}, {"w": "performance,", "b": [0.7304, 0.6893, 0.8337, 0.7043]}, {"w": "and", "b": [0.8398, 0.6893, 0.8692, 0.7043]}, {"w": "choose", "b": [0.1312, 0.7073, 0.1836, 0.7222]}, {"w": "a", "b": [0.1898, 0.7073, 0.199, 0.7222]}, {"w": "performance", "b": [0.2052, 0.7073, 0.3047, 0.7222]}, {"w": "metric.", "b": [0.3109, 0.7073, 0.3673, 0.7222]}, {"w": "It", "b": [0.3756, 0.7073, 0.3894, 0.7222]}, {"w": "should", "b": [0.3955, 0.7073, 0.448, 0.7222]}, {"w": "reduce", "b": [0.4541, 0.7073, 0.5065, 0.7222]}, {"w": "the", "b": [0.5126, 0.7073, 0.5383, 0.7222]}, {"w": "model", "b": [0.5444, 0.7073, 0.5931, 0.7222]}, {"w": "performance", "b": [0.5993, 0.7073, 0.6988, 0.7222]}, {"w": "to", "b": [0.705, 0.7073, 0.7214, 0.7222]}, {"w": "a", "b": [0.7275, 0.7073, 0.7368, 0.7222]}, {"w": "single", "b": [0.7429, 0.7073, 0.7882, 0.7222]}, {"w": "number.", "b": [0.7943, 0.7073, 0.8605, 0.7222]}]}, {"id": "b_10", "type": "paragraph", "text": "Most machine learning algorithms, models, and pipelines have hyperparameters. They can significantly influence the result of learning. However, these are not learned from data. The analyst sets their values during the hyperparameter tuning. In particular, tweaking these values controls two important tradeoffs: precision-recall and bias-variance. By varying the complexity of the model, you can reach the so-called “zone of solutions,” a situation where both bias and variance are relatively low. The solution that optimizes the performance metric is usually found in the neighborhood of the zone of solutions. Grid search is the simplest and most widely-used hyperparameter-tuning technique.", "words": [{"w": "Most", "b": [0.1312, 0.7342, 0.1722, 0.7491]}, {"w": "machine", "b": [0.1783, 0.7342, 0.245, 0.7491]}, {"w": "learning", "b": [0.2511, 0.7342, 0.3163, 0.7491]}, {"w": "algorithms,", "b": [0.3225, 0.7342, 0.4136, 0.7491]}, {"w": "models,", "b": [0.4197, 0.7342, 0.4814, 0.7491]}, {"w": "and", "b": [0.4875, 0.7342, 0.5175, 0.7491]}, {"w": "pipelines", "b": [0.5236, 0.7342, 0.5946, 0.7491]}, {"w": "have", "b": [0.6007, 0.7342, 0.6374, 0.7491]}, {"w": "hyperparameters.", "b": [0.6436, 0.7342, 0.785, 0.7491]}, {"w": "They", "b": [0.7932, 0.7342, 0.835, 0.7491]}, {"w": "can", "b": [0.8412, 0.7342, 0.8691, 0.7491]}, {"w": "significantly", "b": [0.1312, 0.7521, 0.2272, 0.7671]}, {"w": "influence", "b": [0.2333, 0.7521, 0.3037, 0.7671]}, {"w": "the", "b": [0.3099, 0.7521, 0.3353, 0.7671]}, {"w": "result", "b": [0.3415, 0.7521, 0.3865, 0.7671]}, {"w": "of", "b": [0.3927, 0.7521, 0.4075, 0.7671]}, {"w": "learning.", "b": [0.4136, 0.7521, 0.483, 0.7671]}, {"w": "However,", "b": [0.4913, 0.7521, 0.5642, 0.7671]}, {"w": "these", "b": [0.5704, 0.7521, 0.6113, 0.7671]}, {"w": "are", "b": [0.6174, 0.7521, 0.6419, 0.7671]}, {"w": "not", "b": [0.6481, 0.7521, 0.6746, 0.7671]}, {"w": "learned", "b": [0.6808, 0.7521, 0.739, 0.7671]}, {"w": "from", "b": [0.7451, 0.7521, 0.7824, 0.7671]}, {"w": "data.", "b": [0.7885, 0.7521, 0.8293, 0.7671]}, {"w": "The", "b": [0.8376, 0.7521, 0.8692, 0.7671]}, {"w": "analyst", "b": [0.1312, 0.7701, 0.1904, 0.785]}, {"w": "sets", "b": [0.1969, 0.7701, 0.2274, 0.785]}, {"w": "their", "b": [0.2338, 0.7701, 0.2726, 0.785]}, {"w": "values", "b": [0.279, 0.7701, 0.3288, 0.785]}, {"w": "during", "b": [0.3352, 0.7701, 0.3886, 0.785]}, {"w": "the", "b": [0.3951, 0.7701, 0.4212, 0.785]}, {"w": "hyperparameter", "b": [0.4276, 0.7701, 0.558, 0.785]}, {"w": "tuning.", "b": [0.5644, 0.7701, 0.623, 0.785]}, {"w": "In", "b": [0.632, 0.7701, 0.6493, 0.785]}, {"w": "particular,", "b": [0.6557, 0.7701, 0.7416, 0.785]}, {"w": "tweaking", "b": [0.7481, 0.7701, 0.8208, 0.785]}, {"w": "these", "b": [0.8272, 0.7701, 0.8692, 0.785]}, {"w": "values", "b": [0.1308, 0.788, 0.1803, 0.803]}, {"w": "controls", "b": [0.1864, 0.788, 0.2505, 0.803]}, {"w": "two", "b": [0.2567, 0.788, 0.2858, 0.803]}, {"w": "important", "b": [0.2919, 0.788, 0.3741, 0.803]}, {"w": "tradeoffs:", "b": [0.3802, 0.788, 0.4557, 0.803]}, {"w": "precision-recall", "b": [0.4639, 0.788, 0.5858, 0.803]}, {"w": "and", "b": [0.592, 0.788, 0.6221, 0.803]}, {"w": "bias-variance.", "b": [0.6282, 0.788, 0.7391, 0.803]}, {"w": "By", "b": [0.7473, 0.788, 0.7705, 0.803]}, {"w": "varying", "b": [0.7766, 0.788, 0.837, 0.803]}, {"w": "the", "b": [0.8431, 0.788, 0.8691, 0.803]}, {"w": "complexity", "b": [0.1312, 0.806, 0.2195, 0.8209]}, {"w": "of", "b": [0.2257, 0.806, 0.2407, 0.8209]}, {"w": "the", "b": [0.2468, 0.806, 0.2726, 0.8209]}, {"w": "model,", "b": [0.2788, 0.806, 0.333, 0.8209]}, {"w": "you", "b": [0.3392, 0.806, 0.3681, 0.8209]}, {"w": "can", "b": [0.3742, 0.806, 0.4021, 0.8209]}, {"w": "reach", "b": [0.4083, 0.806, 0.4512, 0.8209]}, {"w": "the", "b": [0.4574, 0.806, 0.4832, 0.8209]}, {"w": "so-called", "b": [0.4894, 0.806, 0.5586, 0.8209]}, {"w": "“zone", "b": [0.5648, 0.806, 0.6097, 0.8209]}, {"w": "of", "b": [0.6159, 0.806, 0.6309, 0.8209]}, {"w": "solutions,”", "b": [0.637, 0.806, 0.7224, 0.8209]}, {"w": "a", "b": [0.7286, 0.806, 0.7379, 0.8209]}, {"w": "situation", "b": [0.744, 0.806, 0.8154, 0.8209]}, {"w": "where", "b": [0.8216, 0.806, 0.8691, 0.8209]}, {"w": "both", "b": [0.1312, 0.8239, 0.1679, 0.8389]}, {"w": "bias", "b": [0.1733, 0.8239, 0.2046, 0.8389]}, {"w": "and", "b": [0.21, 0.8239, 0.2392, 0.8389]}, {"w": "variance", "b": [0.2446, 0.8239, 0.3095, 0.8389]}, {"w": "are", "b": [0.3149, 0.8239, 0.339, 0.8389]}, {"w": "relatively", "b": [0.3445, 0.8239, 0.4174, 0.8389]}, {"w": "low.", "b": [0.4228, 0.8239, 0.4544, 0.8389]}, {"w": "The", "b": [0.4624, 0.8239, 0.4935, 0.8389]}, {"w": "solution", "b": [0.499, 0.8239, 0.5614, 0.8389]}, {"w": "that", "b": [0.5668, 0.8239, 0.5999, 0.8389]}, {"w": "optimizes", "b": [0.6054, 0.8239, 0.6798, 0.8389]}, {"w": "the", "b": [0.6852, 0.8239, 0.7104, 0.8389]}, {"w": "performance", "b": [0.7158, 0.8239, 0.8134, 0.8389]}, {"w": "metric", "b": [0.8188, 0.8239, 0.8691, 0.8389]}, {"w": "is", "b": [0.1312, 0.8419, 0.1434, 0.8568]}, {"w": "usually", "b": [0.1493, 0.8419, 0.2052, 0.8568]}, {"w": "found", "b": [0.2111, 0.8419, 0.2559, 0.8568]}, {"w": "in", "b": [0.2618, 0.8419, 0.2769, 0.8568]}, {"w": "the", "b": [0.2828, 0.8419, 0.3079, 0.8568]}, {"w": "neighborhood", "b": [0.3139, 0.8419, 0.4215, 0.8568]}, {"w": "of", "b": [0.4274, 0.8419, 0.442, 0.8568]}, {"w": "the", "b": [0.4479, 0.8419, 0.473, 0.8568]}, {"w": "zone", "b": [0.479, 0.8419, 0.5142, 0.8568]}, {"w": "of", "b": [0.5201, 0.8419, 0.5347, 0.8568]}, {"w": "solutions.", "b": [0.5406, 0.8419, 0.6152, 0.8568]}, {"w": "Grid", "b": [0.6233, 0.8419, 0.6596, 0.8568]}, {"w": "search", "b": [0.6656, 0.8419, 0.7145, 0.8568]}, {"w": "is", "b": [0.7204, 0.8419, 0.7326, 0.8568]}, {"w": "the", "b": [0.7385, 0.8419, 0.7636, 0.8568]}, {"w": "simplest", "b": [0.7696, 0.8419, 0.8341, 0.8568]}, {"w": "and", "b": [0.84, 0.8419, 0.8692, 0.8568]}, {"w": "most", "b": [0.1312, 0.8598, 0.1703, 0.8748]}, {"w": "widely-used", "b": [0.1764, 0.8598, 0.2704, 0.8748]}, {"w": "hyperparameter-tuning", "b": [0.2765, 0.8598, 0.4628, 0.8748]}, {"w": "technique.", "b": [0.4689, 0.8598, 0.551, 0.8748]}]}, {"id": "b_11", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 4", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "4", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 293, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Instead of training a deep model from scratch, it can be useful to start with a pre-trained model. Using a pre-trained model to build your own is called transfer learning. The fact that deep models allow for transfer learning is one of its most important properties.", "words": [{"w": "Instead", "b": [0.1312, 0.0881, 0.1915, 0.1031]}, {"w": "of", "b": [0.1976, 0.0881, 0.2128, 0.1031]}, {"w": "training", "b": [0.219, 0.0881, 0.2839, 0.1031]}, {"w": "a", "b": [0.29, 0.0881, 0.2994, 0.1031]}, {"w": "deep", "b": [0.3056, 0.0881, 0.3433, 0.1031]}, {"w": "model", "b": [0.3494, 0.0881, 0.3991, 0.1031]}, {"w": "from", "b": [0.4052, 0.0881, 0.4435, 0.1031]}, {"w": "scratch,", "b": [0.4496, 0.0881, 0.5131, 0.1031]}, {"w": "it", "b": [0.5193, 0.0881, 0.5318, 0.1031]}, {"w": "can", "b": [0.538, 0.0881, 0.5662, 0.1031]}, {"w": "be", "b": [0.5724, 0.0881, 0.5917, 0.1031]}, {"w": "useful", "b": [0.5979, 0.0881, 0.6456, 0.1031]}, {"w": "to", "b": [0.6518, 0.0881, 0.6685, 0.1031]}, {"w": "start", "b": [0.6746, 0.0881, 0.7135, 0.1031]}, {"w": "with", "b": [0.7197, 0.0881, 0.7563, 0.1031]}, {"w": "a", "b": [0.7624, 0.0881, 0.7718, 0.1031]}, {"w": "pre-trained", "b": [0.778, 0.0881, 0.8691, 0.1031]}, {"w": "model.", "b": [0.1312, 0.106, 0.184, 0.121]}, {"w": "Using", "b": [0.1921, 0.106, 0.2369, 0.121]}, {"w": "a", "b": [0.2428, 0.106, 0.2518, 0.121]}, {"w": "pre-trained", "b": [0.2577, 0.106, 0.3452, 0.121]}, {"w": "model", "b": [0.3511, 0.106, 0.3989, 0.121]}, {"w": "to", "b": [0.4047, 0.106, 0.4208, 0.121]}, {"w": "build", "b": [0.4267, 0.106, 0.4669, 0.121]}, {"w": "your", "b": [0.4728, 0.106, 0.508, 0.121]}, {"w": "own", "b": [0.5138, 0.106, 0.5455, 0.121]}, {"w": "is", "b": [0.5513, 0.106, 0.5635, 0.121]}, {"w": "called", "b": [0.5694, 0.106, 0.6146, 0.121]}, {"w": "transfer", "b": [0.6205, 0.106, 0.6815, 0.121]}, {"w": "learning.", "b": [0.6874, 0.106, 0.7558, 0.121]}, {"w": "The", "b": [0.7639, 0.106, 0.795, 0.121]}, {"w": "fact", "b": [0.8009, 0.106, 0.8306, 0.121]}, {"w": "that", "b": [0.8364, 0.106, 0.8696, 0.121]}, {"w": "deep", "b": [0.1312, 0.124, 0.1682, 0.1389]}, {"w": "models", "b": [0.1743, 0.124, 0.2303, 0.1389]}, {"w": "allow", "b": [0.2364, 0.124, 0.278, 0.1389]}, {"w": "for", "b": [0.2841, 0.124, 0.3062, 0.1389]}, {"w": "transfer", "b": [0.3124, 0.124, 0.3746, 0.1389]}, {"w": "learning", "b": [0.3808, 0.124, 0.4454, 0.1389]}, {"w": "is", "b": [0.4516, 0.124, 0.464, 0.1389]}, {"w": "one", "b": [0.4701, 0.124, 0.4978, 0.1389]}, {"w": "of", "b": [0.504, 0.124, 0.5189, 0.1389]}, {"w": "its", "b": [0.525, 0.124, 0.5446, 0.1389]}, {"w": "most", "b": [0.5508, 0.124, 0.5898, 0.1389]}, {"w": "important", "b": [0.596, 0.124, 0.677, 0.1389]}, {"w": "properties.", "b": [0.6832, 0.124, 0.769, 0.1389]}]}, {"id": "b_1", "type": "paragraph", "text": "Training deep models can be tricky. Implementation errors can happen at many stages, from data preparation, to defining a neural network topology. It’s recommended to start small. For example, implement a simple model using a high-level library. Apply the default hyperparameter values to a small normalized dataset fitting in memory. Once you have your first simplistic model architecture and dataset, temporarily reduce your training dataset even further, to the size of one minibatch. Then start the training. Make sure that your simple model is capable of overfitting this training minibatch.", "words": [{"w": "Training", "b": [0.1306, 0.1509, 0.2002, 0.1659]}, {"w": "deep", "b": [0.2078, 0.1509, 0.2455, 0.1659]}, {"w": "models", "b": [0.2531, 0.1509, 0.3102, 0.1659]}, {"w": "can", "b": [0.3177, 0.1509, 0.346, 0.1659]}, {"w": "be", "b": [0.3536, 0.1509, 0.3729, 0.1659]}, {"w": "tricky.", "b": [0.3805, 0.1509, 0.4319, 0.1659]}, {"w": "Implementation", "b": [0.4444, 0.1509, 0.5741, 0.1659]}, {"w": "errors", "b": [0.5817, 0.1509, 0.629, 0.1659]}, {"w": "can", "b": [0.6366, 0.1509, 0.6648, 0.1659]}, {"w": "happen", "b": [0.6724, 0.1509, 0.7326, 0.1659]}, {"w": "at", "b": [0.7402, 0.1509, 0.7569, 0.1659]}, {"w": "many", "b": [0.7645, 0.1509, 0.8095, 0.1659]}, {"w": "stages,", "b": [0.817, 0.1509, 0.8717, 0.1659]}, {"w": "from", "b": [0.1312, 0.1689, 0.1695, 0.1838]}, {"w": "data", "b": [0.1762, 0.1689, 0.2128, 0.1838]}, {"w": "preparation,", "b": [0.2196, 0.1689, 0.3202, 0.1838]}, {"w": "to", "b": [0.3271, 0.1689, 0.3438, 0.1838]}, {"w": "defining", "b": [0.3507, 0.1689, 0.4155, 0.1838]}, {"w": "a", "b": [0.4223, 0.1689, 0.4317, 0.1838]}, {"w": "neural", "b": [0.4385, 0.1689, 0.4898, 0.1838]}, {"w": "network", "b": [0.4966, 0.1689, 0.5621, 0.1838]}, {"w": "topology.", "b": [0.5689, 0.1689, 0.6436, 0.1838]}, {"w": "It’s", "b": [0.6538, 0.1689, 0.6806, 0.1838]}, {"w": "recommended", "b": [0.6874, 0.1689, 0.8004, 0.1838]}, {"w": "to", "b": [0.8072, 0.1689, 0.8239, 0.1838]}, {"w": "start", "b": [0.8307, 0.1689, 0.8695, 0.1838]}, {"w": "small.", "b": [0.1312, 0.1868, 0.1784, 0.2018]}, {"w": "For", "b": [0.1866, 0.1868, 0.2135, 0.2018]}, {"w": "example,", "b": [0.2197, 0.1868, 0.2907, 0.2018]}, {"w": "implement", "b": [0.2969, 0.1868, 0.3812, 0.2018]}, {"w": "a", "b": [0.3874, 0.1868, 0.3966, 0.2018]}, {"w": "simple", "b": [0.4027, 0.1868, 0.454, 0.2018]}, {"w": "model", "b": [0.4601, 0.1868, 0.5087, 0.2018]}, {"w": "using", "b": [0.5149, 0.1868, 0.5569, 0.2018]}, {"w": "a", "b": [0.563, 0.1868, 0.5722, 0.2018]}, {"w": "high-level", "b": [0.5784, 0.1868, 0.6551, 0.2018]}, {"w": "library.", "b": [0.6613, 0.1868, 0.7186, 0.2018]}, {"w": "Apply", "b": [0.7269, 0.1868, 0.7759, 0.2018]}, {"w": "the", "b": [0.7821, 0.1868, 0.8077, 0.2018]}, {"w": "default", "b": [0.8138, 0.1868, 0.8696, 0.2018]}, {"w": "hyperparameter", "b": [0.1312, 0.2048, 0.257, 0.2197]}, {"w": "values", "b": [0.2632, 0.2048, 0.3112, 0.2197]}, {"w": "to", "b": [0.3174, 0.2048, 0.3335, 0.2197]}, {"w": "a", "b": [0.3397, 0.2048, 0.3488, 0.2197]}, {"w": "small", "b": [0.3549, 0.2048, 0.3964, 0.2197]}, {"w": "normalized", "b": [0.4026, 0.2048, 0.4894, 0.2197]}, {"w": "dataset", "b": [0.4956, 0.2048, 0.5532, 0.2197]}, {"w": "fitting", "b": [0.5594, 0.2048, 0.6078, 0.2197]}, {"w": "in", "b": [0.614, 0.2048, 0.6291, 0.2197]}, {"w": "memory.", "b": [0.6353, 0.2048, 0.7029, 0.2197]}, {"w": "Once", "b": [0.7111, 0.2048, 0.7515, 0.2197]}, {"w": "you", "b": [0.7577, 0.2048, 0.7859, 0.2197]}, {"w": "have", "b": [0.7921, 0.2048, 0.8279, 0.2197]}, {"w": "your", "b": [0.8341, 0.2048, 0.8694, 0.2197]}, {"w": "first", "b": [0.1312, 0.2227, 0.1625, 0.2377]}, {"w": "simplistic", "b": [0.1684, 0.2227, 0.243, 0.2377]}, {"w": "model", "b": [0.2489, 0.2227, 0.2966, 0.2377]}, {"w": "architecture", "b": [0.3025, 0.2227, 0.3966, 0.2377]}, {"w": "and", "b": [0.4024, 0.2227, 0.4316, 0.2377]}, {"w": "dataset,", "b": [0.4374, 0.2227, 0.4999, 0.2377]}, {"w": "temporarily", "b": [0.5058, 0.2227, 0.5983, 0.2377]}, {"w": "reduce", "b": [0.6042, 0.2227, 0.6555, 0.2377]}, {"w": "your", "b": [0.6614, 0.2227, 0.6966, 0.2377]}, {"w": "training", "b": [0.7025, 0.2227, 0.7648, 0.2377]}, {"w": "dataset", "b": [0.7707, 0.2227, 0.8281, 0.2377]}, {"w": "even", "b": [0.834, 0.2227, 0.8691, 0.2377]}, {"w": "further,", "b": [0.1312, 0.2406, 0.1932, 0.2556]}, {"w": "to", "b": [0.1994, 0.2406, 0.216, 0.2556]}, {"w": "the", "b": [0.2222, 0.2406, 0.2482, 0.2556]}, {"w": "size", "b": [0.2543, 0.2406, 0.2836, 0.2556]}, {"w": "of", "b": [0.2897, 0.2406, 0.3048, 0.2556]}, {"w": "one", "b": [0.311, 0.2406, 0.3391, 0.2556]}, {"w": "minibatch.", "b": [0.3452, 0.2406, 0.4321, 0.2556]}, {"w": "Then", "b": [0.4403, 0.2406, 0.4829, 0.2556]}, {"w": "start", "b": [0.4891, 0.2406, 0.5277, 0.2556]}, {"w": "the", "b": [0.5339, 0.2406, 0.5599, 0.2556]}, {"w": "training.", "b": [0.566, 0.2406, 0.6358, 0.2556]}, {"w": "Make", "b": [0.644, 0.2406, 0.6882, 0.2556]}, {"w": "sure", "b": [0.6943, 0.2406, 0.7278, 0.2556]}, {"w": "that", "b": [0.734, 0.2406, 0.7683, 0.2556]}, {"w": "your", "b": [0.7744, 0.2406, 0.8109, 0.2556]}, {"w": "simple", "b": [0.817, 0.2406, 0.8691, 0.2556]}, {"w": "model", "b": [0.1312, 0.2586, 0.1799, 0.2735]}, {"w": "is", "b": [0.1861, 0.2586, 0.1985, 0.2735]}, {"w": "capable", "b": [0.2046, 0.2586, 0.2652, 0.2735]}, {"w": "of", "b": [0.2713, 0.2586, 0.2862, 0.2735]}, {"w": "overfitting", "b": [0.2923, 0.2586, 0.3749, 0.2735]}, {"w": "this", "b": [0.3811, 0.2586, 0.4109, 0.2735]}, {"w": "training", "b": [0.4171, 0.2586, 0.4807, 0.2735]}, {"w": "minibatch.", "b": [0.4869, 0.2586, 0.5725, 0.2735]}]}, {"id": "b_2", "type": "paragraph", "text": "Your machine learning system’s performance may benefit from model stacking. Ideally, base models used for stacking are obtained from algorithms or models of a different nature, such as random forests, gradient boosting, support vector machines, and deep models. Many real-world production systems are based on stacked models.", "words": [{"w": "Your", "b": [0.1305, 0.2855, 0.1691, 0.3005]}, {"w": "machine", "b": [0.1753, 0.2855, 0.2408, 0.3005]}, {"w": "learning", "b": [0.2469, 0.2855, 0.311, 0.3005]}, {"w": "system’s", "b": [0.3171, 0.2855, 0.3839, 0.3005]}, {"w": "performance", "b": [0.3901, 0.2855, 0.4887, 0.3005]}, {"w": "may", "b": [0.4948, 0.2855, 0.5283, 0.3005]}, {"w": "benefit", "b": [0.5345, 0.2855, 0.5888, 0.3005]}, {"w": "from", "b": [0.595, 0.2855, 0.632, 0.3005]}, {"w": "model", "b": [0.6382, 0.2855, 0.6864, 0.3005]}, {"w": "stacking.", "b": [0.6926, 0.2855, 0.7627, 0.3005]}, {"w": "Ideally,", "b": [0.771, 0.2855, 0.8283, 0.3005]}, {"w": "base", "b": [0.8345, 0.2855, 0.8691, 0.3005]}, {"w": "models", "b": [0.1312, 0.3035, 0.1871, 0.3184]}, {"w": "used", "b": [0.1932, 0.3035, 0.2292, 0.3184]}, {"w": "for", "b": [0.2353, 0.3035, 0.2574, 0.3184]}, {"w": "stacking", "b": [0.2635, 0.3035, 0.3291, 0.3184]}, {"w": "are", "b": [0.3353, 0.3035, 0.3599, 0.3184]}, {"w": "obtained", "b": [0.366, 0.3035, 0.4356, 0.3184]}, {"w": "from", "b": [0.4418, 0.3035, 0.4792, 0.3184]}, {"w": "algorithms", "b": [0.4853, 0.3035, 0.5704, 0.3184]}, {"w": "or", "b": [0.5765, 0.3035, 0.593, 0.3184]}, {"w": "models", "b": [0.5991, 0.3035, 0.655, 0.3184]}, {"w": "of", "b": [0.6611, 0.3035, 0.6759, 0.3184]}, {"w": "a", "b": [0.6821, 0.3035, 0.6913, 0.3184]}, {"w": "different", "b": [0.6975, 0.3035, 0.764, 0.3184]}, {"w": "nature,", "b": [0.7702, 0.3035, 0.8275, 0.3184]}, {"w": "such", "b": [0.8337, 0.3035, 0.8691, 0.3184]}, {"w": "as", "b": [0.1312, 0.3214, 0.1481, 0.3364]}, {"w": "random", "b": [0.1555, 0.3214, 0.2183, 0.3364]}, {"w": "forests,", "b": [0.2257, 0.3214, 0.284, 0.3364]}, {"w": "gradient", "b": [0.2917, 0.3214, 0.3593, 0.3364]}, {"w": "boosting,", "b": [0.3667, 0.3214, 0.4421, 0.3364]}, {"w": "support", "b": [0.4498, 0.3214, 0.5132, 0.3364]}, {"w": "vector", "b": [0.5206, 0.3214, 0.5709, 0.3364]}, {"w": "machines,", "b": [0.5783, 0.3214, 0.6584, 0.3364]}, {"w": "and", "b": [0.6661, 0.3214, 0.6965, 0.3364]}, {"w": "deep", "b": [0.7039, 0.3214, 0.7415, 0.3364]}, {"w": "models.", "b": [0.749, 0.3214, 0.8113, 0.3364]}, {"w": "Many", "b": [0.8233, 0.3214, 0.8698, 0.3364]}, {"w": "real-world", "b": [0.1312, 0.3394, 0.2118, 0.3543]}, {"w": "production", "b": [0.218, 0.3394, 0.3057, 0.3543]}, {"w": "systems", "b": [0.3119, 0.3394, 0.3742, 0.3543]}, {"w": "are", "b": [0.3804, 0.3394, 0.405, 0.3543]}, {"w": "based", "b": [0.4112, 0.3394, 0.4564, 0.3543]}, {"w": "on", "b": [0.4626, 0.3394, 0.482, 0.3543]}, {"w": "stacked", "b": [0.4882, 0.3394, 0.5473, 0.3543]}, {"w": "models.", "b": [0.5534, 0.3394, 0.6145, 0.3543]}]}, {"id": "b_3", "type": "paragraph", "text": "Machine learning model errors can be either uniform, and apply to all use cases with the same rate, or focused, and apply to certain use cases more frequently. By fixing a focused error, you fix it once for many examples.", "words": [{"w": "Machine", "b": [0.1312, 0.3663, 0.2003, 0.3812]}, {"w": "learning", "b": [0.2069, 0.3663, 0.2728, 0.3812]}, {"w": "model", "b": [0.2794, 0.3663, 0.3291, 0.3812]}, {"w": "errors", "b": [0.3357, 0.3663, 0.383, 0.3812]}, {"w": "can", "b": [0.3896, 0.3663, 0.4179, 0.3812]}, {"w": "be", "b": [0.4245, 0.3663, 0.4438, 0.3812]}, {"w": "either", "b": [0.4504, 0.3663, 0.4976, 0.3812]}, {"w": "uniform,", "b": [0.5042, 0.3663, 0.5738, 0.3812]}, {"w": "and", "b": [0.5805, 0.3663, 0.6108, 0.3812]}, {"w": "apply", "b": [0.6174, 0.3663, 0.6629, 0.3812]}, {"w": "to", "b": [0.6695, 0.3663, 0.6862, 0.3812]}, {"w": "all", "b": [0.6928, 0.3663, 0.7127, 0.3812]}, {"w": "use", "b": [0.7193, 0.3663, 0.7456, 0.3812]}, {"w": "cases", "b": [0.7522, 0.3663, 0.7932, 0.3812]}, {"w": "with", "b": [0.7998, 0.3663, 0.8364, 0.3812]}, {"w": "the", "b": [0.843, 0.3663, 0.8691, 0.3812]}, {"w": "same", "b": [0.1312, 0.3842, 0.1721, 0.3992]}, {"w": "rate,", "b": [0.1783, 0.3842, 0.2159, 0.3992]}, {"w": "or", "b": [0.2221, 0.3842, 0.2389, 0.3992]}, {"w": "focused,", "b": [0.245, 0.3842, 0.311, 0.3992]}, {"w": "and", "b": [0.3171, 0.3842, 0.3474, 0.3992]}, {"w": "apply", "b": [0.3536, 0.3842, 0.3991, 0.3992]}, {"w": "to", "b": [0.4052, 0.3842, 0.4219, 0.3992]}, {"w": "certain", "b": [0.4281, 0.3842, 0.4846, 0.3992]}, {"w": "use", "b": [0.4908, 0.3842, 0.517, 0.3992]}, {"w": "cases", "b": [0.5232, 0.3842, 0.5642, 0.3992]}, {"w": "more", "b": [0.5703, 0.3842, 0.6111, 0.3992]}, {"w": "frequently.", "b": [0.6173, 0.3842, 0.7036, 0.3992]}, {"w": "By", "b": [0.7118, 0.3842, 0.7351, 0.3992]}, {"w": "fixing", "b": [0.7412, 0.3842, 0.7867, 0.3992]}, {"w": "a", "b": [0.7929, 0.3842, 0.8023, 0.3992]}, {"w": "focused", "b": [0.8084, 0.3842, 0.8691, 0.3992]}, {"w": "error,", "b": [0.1312, 0.4022, 0.1755, 0.4171]}, {"w": "you", "b": [0.1816, 0.4022, 0.2103, 0.4171]}, {"w": "fix", "b": [0.2165, 0.4022, 0.2365, 0.4171]}, {"w": "it", "b": [0.2426, 0.4022, 0.255, 0.4171]}, {"w": "once", "b": [0.2611, 0.4022, 0.297, 0.4171]}, {"w": "for", "b": [0.3031, 0.4022, 0.3252, 0.4171]}, {"w": "many", "b": [0.3314, 0.4022, 0.3755, 0.4171]}, {"w": "examples.", "b": [0.3816, 0.4022, 0.4602, 0.4171]}]}, {"id": "b_4", "type": "paragraph", "text": "Model performance can be improved using the following simple, iterative process:", "words": [{"w": "Model", "b": [0.1312, 0.4291, 0.1815, 0.444]}, {"w": "performance", "b": [0.1876, 0.4291, 0.2872, 0.444]}, {"w": "can", "b": [0.2934, 0.4291, 0.3211, 0.444]}, {"w": "be", "b": [0.3272, 0.4291, 0.3462, 0.444]}, {"w": "improved", "b": [0.3523, 0.4291, 0.4267, 0.444]}, {"w": "using", "b": [0.4329, 0.4291, 0.475, 0.444]}, {"w": "the", "b": [0.4812, 0.4291, 0.5068, 0.444]}, {"w": "following", "b": [0.513, 0.4291, 0.5847, 0.444]}, {"w": "simple,", "b": [0.5909, 0.4291, 0.6474, 0.444]}, {"w": "iterative", "b": [0.6536, 0.4291, 0.7203, 0.444]}, {"w": "process:", "b": [0.7264, 0.4291, 0.7897, 0.444]}]}, {"id": "b_5", "type": "paragraph", "text": "1. Build the model using the best values of hyperparameters identified so far. 2. Test the model by applying it to a small subset of the validation set. 3. Find the most frequent error patterns on that small validation set. 4. Generate new features, or add more training data to fix the observed error patterns. 5. Repeat until no frequent error patterns are observed.", "words": [{"w": "1.", "b": [0.1538, 0.456, 0.1681, 0.471]}, {"w": "Build", "b": [0.1774, 0.456, 0.2212, 0.471]}, {"w": "the", "b": [0.2273, 0.456, 0.253, 0.471]}, {"w": "model", "b": [0.2591, 0.456, 0.3078, 0.471]}, {"w": "using", "b": [0.314, 0.456, 0.3561, 0.471]}, {"w": "the", "b": [0.3623, 0.456, 0.3879, 0.471]}, {"w": "best", "b": [0.3941, 0.456, 0.4275, 0.471]}, {"w": "values", "b": [0.4337, 0.456, 0.4825, 0.471]}, {"w": "of", "b": [0.4886, 0.456, 0.5035, 0.471]}, {"w": "hyperparameters", "b": [0.5097, 0.456, 0.6448, 0.471]}, {"w": "identified", "b": [0.6509, 0.456, 0.7253, 0.471]}, {"w": "so", "b": [0.7314, 0.456, 0.748, 0.471]}, {"w": "far.", "b": [0.7541, 0.456, 0.7813, 0.471]}, {"w": "2.", "b": [0.1538, 0.474, 0.1681, 0.4889]}, {"w": "Test", "b": [0.1774, 0.474, 0.2118, 0.4889]}, {"w": "the", "b": [0.218, 0.474, 0.2436, 0.4889]}, {"w": "model", "b": [0.2498, 0.474, 0.2985, 0.4889]}, {"w": "by", "b": [0.3046, 0.474, 0.3241, 0.4889]}, {"w": "applying", "b": [0.3303, 0.474, 0.3995, 0.4889]}, {"w": "it", "b": [0.4056, 0.474, 0.4179, 0.4889]}, {"w": "to", "b": [0.4241, 0.474, 0.4405, 0.4889]}, {"w": "a", "b": [0.4466, 0.474, 0.4558, 0.4889]}, {"w": "small", "b": [0.462, 0.474, 0.5041, 0.4889]}, {"w": "subset", "b": [0.5103, 0.474, 0.5608, 0.4889]}, {"w": "of", "b": [0.5669, 0.474, 0.5818, 0.4889]}, {"w": "the", "b": [0.5879, 0.474, 0.6136, 0.4889]}, {"w": "validation", "b": [0.6197, 0.474, 0.6992, 0.4889]}, {"w": "set.", "b": [0.7053, 0.474, 0.7331, 0.4889]}, {"w": "3.", "b": [0.1538, 0.4919, 0.1681, 0.5069]}, {"w": "Find", "b": [0.1774, 0.4919, 0.2151, 0.5069]}, {"w": "the", "b": [0.2212, 0.4919, 0.2468, 0.5069]}, {"w": "most", "b": [0.253, 0.4919, 0.292, 0.5069]}, {"w": "frequent", "b": [0.2982, 0.4919, 0.3644, 0.5069]}, {"w": "error", "b": [0.3706, 0.4919, 0.4097, 0.5069]}, {"w": "patterns", "b": [0.4158, 0.4919, 0.4827, 0.5069]}, {"w": "on", "b": [0.4888, 0.4919, 0.5083, 0.5069]}, {"w": "that", "b": [0.5144, 0.4919, 0.5483, 0.5069]}, {"w": "small", "b": [0.5544, 0.4919, 0.5966, 0.5069]}, {"w": "validation", "b": [0.6027, 0.4919, 0.6822, 0.5069]}, {"w": "set.", "b": [0.6883, 0.4919, 0.7161, 0.5069]}, {"w": "4.", "b": [0.1538, 0.5098, 0.1681, 0.5248]}, {"w": "Generate", "b": [0.1774, 0.5098, 0.2504, 0.5248]}, {"w": "new", "b": [0.2565, 0.5098, 0.2883, 0.5248]}, {"w": "features,", "b": [0.2944, 0.5098, 0.3628, 0.5248]}, {"w": "or", "b": [0.369, 0.5098, 0.3854, 0.5248]}, {"w": "add", "b": [0.3916, 0.5098, 0.4213, 0.5248]}, {"w": "more", "b": [0.4275, 0.5098, 0.4675, 0.5248]}, {"w": "training", "b": [0.4736, 0.5098, 0.5373, 0.5248]}, {"w": "data", "b": [0.5434, 0.5098, 0.5793, 0.5248]}, {"w": "to", "b": [0.5855, 0.5098, 0.6019, 0.5248]}, {"w": "fix", "b": [0.608, 0.5098, 0.628, 0.5248]}, {"w": "the", "b": [0.6341, 0.5098, 0.6598, 0.5248]}, {"w": "observed", "b": [0.6659, 0.5098, 0.7358, 0.5248]}, {"w": "error", "b": [0.742, 0.5098, 0.7811, 0.5248]}, {"w": "patterns.", "b": [0.7873, 0.5098, 0.8592, 0.5248]}, {"w": "5.", "b": [0.1538, 0.5278, 0.1681, 0.5428]}, {"w": "Repeat", "b": [0.1774, 0.5278, 0.2345, 0.5428]}, {"w": "until", "b": [0.2407, 0.5278, 0.2781, 0.5428]}, {"w": "no", "b": [0.2843, 0.5278, 0.3037, 0.5428]}, {"w": "frequent", "b": [0.3099, 0.5278, 0.3761, 0.5428]}, {"w": "error", "b": [0.3823, 0.5278, 0.4214, 0.5428]}, {"w": "patterns", "b": [0.4275, 0.5278, 0.4944, 0.5428]}, {"w": "are", "b": [0.5005, 0.5278, 0.5252, 0.5428]}, {"w": "observed.", "b": [0.5313, 0.5278, 0.6063, 0.5428]}]}, {"id": "b_6", "type": "paragraph", "text": "The model must be carefully evaluated before deployment, and continuously afterwards. Perform an offline model evaluation when the model is initially trained, based on the historical data. An online model evaluation consists of testing and comparing models in the production environment, using online data. Two popular techniques of online model evaluation are A/B testing and multi-armed bandit. They allow us to determine whether the new model is better than the old one.", "words": [{"w": "The", "b": [0.1306, 0.5547, 0.163, 0.5697]}, {"w": "model", "b": [0.1707, 0.5547, 0.2204, 0.5697]}, {"w": "must", "b": [0.228, 0.5547, 0.2684, 0.5697]}, {"w": "be", "b": [0.2761, 0.5547, 0.2955, 0.5697]}, {"w": "carefully", "b": [0.3032, 0.5547, 0.3733, 0.5697]}, {"w": "evaluated", "b": [0.381, 0.5547, 0.4589, 0.5697]}, {"w": "before", "b": [0.4666, 0.5547, 0.5169, 0.5697]}, {"w": "deployment,", "b": [0.5246, 0.5547, 0.6245, 0.5697]}, {"w": "and", "b": [0.6326, 0.5547, 0.6629, 0.5697]}, {"w": "continuously", "b": [0.6706, 0.5547, 0.7738, 0.5697]}, {"w": "afterwards.", "b": [0.7815, 0.5547, 0.8727, 0.5697]}, {"w": "Perform", "b": [0.1312, 0.5727, 0.1975, 0.5876]}, {"w": "an", "b": [0.2065, 0.5727, 0.2264, 0.5876]}, {"w": "offline", "b": [0.2354, 0.5727, 0.2846, 0.5876]}, {"w": "model", "b": [0.2936, 0.5727, 0.3433, 0.5876]}, {"w": "evaluation", "b": [0.3523, 0.5727, 0.4365, 0.5876]}, {"w": "when", "b": [0.4455, 0.5727, 0.4884, 0.5876]}, {"w": "the", "b": [0.4974, 0.5727, 0.5236, 0.5876]}, {"w": "model", "b": [0.5326, 0.5727, 0.5823, 0.5876]}, {"w": "is", "b": [0.5913, 0.5727, 0.6039, 0.5876]}, {"w": "initially", "b": [0.613, 0.5727, 0.6762, 0.5876]}, {"w": "trained,", "b": [0.6853, 0.5727, 0.7491, 0.5876]}, {"w": "based", "b": [0.7589, 0.5727, 0.805, 0.5876]}, {"w": "on", "b": [0.814, 0.5727, 0.8339, 0.5876]}, {"w": "the", "b": [0.8429, 0.5727, 0.8691, 0.5876]}, {"w": "historical", "b": [0.1312, 0.5906, 0.2067, 0.6056]}, {"w": "data.", "b": [0.2139, 0.5906, 0.2557, 0.6056]}, {"w": "An", "b": [0.267, 0.5906, 0.2916, 0.6056]}, {"w": "online", "b": [0.2987, 0.5906, 0.3479, 0.6056]}, {"w": "model", "b": [0.3551, 0.5906, 0.4047, 0.6056]}, {"w": "evaluation", "b": [0.4119, 0.5906, 0.4961, 0.6056]}, {"w": "consists", "b": [0.5033, 0.5906, 0.5664, 0.6056]}, {"w": "of", "b": [0.5736, 0.5906, 0.5887, 0.6056]}, {"w": "testing", "b": [0.5959, 0.5906, 0.6515, 0.6056]}, {"w": "and", "b": [0.6586, 0.5906, 0.689, 0.6056]}, {"w": "comparing", "b": [0.6961, 0.5906, 0.7819, 0.6056]}, {"w": "models", "b": [0.7891, 0.5906, 0.8462, 0.6056]}, {"w": "in", "b": [0.8534, 0.5906, 0.8691, 0.6056]}, {"w": "the", "b": [0.1312, 0.6086, 0.1574, 0.6235]}, {"w": "production", "b": [0.1646, 0.6086, 0.254, 0.6235]}, {"w": "environment,", "b": [0.2612, 0.6086, 0.3685, 0.6235]}, {"w": "using", "b": [0.3759, 0.6086, 0.4189, 0.6235]}, {"w": "online", "b": [0.4261, 0.6086, 0.4752, 0.6235]}, {"w": "data.", "b": [0.4824, 0.6086, 0.5243, 0.6235]}, {"w": "Two", "b": [0.5355, 0.6086, 0.57, 0.6235]}, {"w": "popular", "b": [0.5772, 0.6086, 0.6405, 0.6235]}, {"w": "techniques", "b": [0.6477, 0.6086, 0.7336, 0.6235]}, {"w": "of", "b": [0.7408, 0.6086, 0.7559, 0.6235]}, {"w": "online", "b": [0.7631, 0.6086, 0.8123, 0.6235]}, {"w": "model", "b": [0.8195, 0.6086, 0.8691, 0.6235]}, {"w": "evaluation", "b": [0.1312, 0.6265, 0.2121, 0.6415]}, {"w": "are", "b": [0.2181, 0.6265, 0.2423, 0.6415]}, {"w": "A/B", "b": [0.2482, 0.6265, 0.2837, 0.6415]}, {"w": "testing", "b": [0.2897, 0.6265, 0.343, 0.6415]}, {"w": "and", "b": [0.349, 0.6265, 0.3782, 0.6415]}, {"w": "multi-armed", "b": [0.3841, 0.6265, 0.4811, 0.6415]}, {"w": "bandit.", "b": [0.4871, 0.6265, 0.5434, 0.6415]}, {"w": "They", "b": [0.5515, 0.6265, 0.5922, 0.6415]}, {"w": "allow", "b": [0.5982, 0.6265, 0.6389, 0.6415]}, {"w": "us", "b": [0.6449, 0.6265, 0.6621, 0.6415]}, {"w": "to", "b": [0.6681, 0.6265, 0.6841, 0.6415]}, {"w": "determine", "b": [0.6901, 0.6265, 0.7686, 0.6415]}, {"w": "whether", "b": [0.7746, 0.6265, 0.8379, 0.6415]}, {"w": "the", "b": [0.8439, 0.6265, 0.8691, 0.6415]}, {"w": "new", "b": [0.1312, 0.6445, 0.163, 0.6594]}, {"w": "model", "b": [0.1692, 0.6445, 0.2179, 0.6594]}, {"w": "is", "b": [0.224, 0.6445, 0.2364, 0.6594]}, {"w": "better", "b": [0.2426, 0.6445, 0.2914, 0.6594]}, {"w": "than", "b": [0.2975, 0.6445, 0.3344, 0.6594]}, {"w": "the", "b": [0.3406, 0.6445, 0.3662, 0.6594]}, {"w": "old", "b": [0.3724, 0.6445, 0.397, 0.6594]}, {"w": "one.", "b": [0.4031, 0.6445, 0.4359, 0.6594]}]}, {"id": "b_7", "type": "paragraph", "text": "A model may be deployed following several patterns: statically (as a part of an installable software package), dynamically on the user’s device or a server, or via model streaming. In addition, choose among strategies such as single deployment, silent deployment, canary deployment, and multi-armed bandit. Each pattern and strategy has its pros and cons, and should be chosen depending on your business application.", "words": [{"w": "A", "b": [0.1305, 0.6714, 0.1446, 0.6863]}, {"w": "model", "b": [0.1507, 0.6714, 0.2002, 0.6863]}, {"w": "may", "b": [0.2063, 0.6714, 0.2407, 0.6863]}, {"w": "be", "b": [0.2468, 0.6714, 0.2661, 0.6863]}, {"w": "deployed", "b": [0.2723, 0.6714, 0.3436, 0.6863]}, {"w": "following", "b": [0.3497, 0.6714, 0.4226, 0.6863]}, {"w": "several", "b": [0.4288, 0.6714, 0.4841, 0.6863]}, {"w": "patterns:", "b": [0.4903, 0.6714, 0.5633, 0.6863]}, {"w": "statically", "b": [0.5715, 0.6714, 0.646, 0.6863]}, {"w": "(as", "b": [0.6522, 0.6714, 0.6762, 0.6863]}, {"w": "a", "b": [0.6824, 0.6714, 0.6918, 0.6863]}, {"w": "part", "b": [0.698, 0.6714, 0.7323, 0.6863]}, {"w": "of", "b": [0.7385, 0.6714, 0.7536, 0.6863]}, {"w": "an", "b": [0.7598, 0.6714, 0.7795, 0.6863]}, {"w": "installable", "b": [0.7857, 0.6714, 0.8691, 0.6863]}, {"w": "software", "b": [0.1312, 0.6893, 0.1989, 0.7043]}, {"w": "package),", "b": [0.2063, 0.6893, 0.2837, 0.7043]}, {"w": "dynamically", "b": [0.2915, 0.6893, 0.3908, 0.7043]}, {"w": "on", "b": [0.3982, 0.6893, 0.4181, 0.7043]}, {"w": "the", "b": [0.4256, 0.6893, 0.4517, 0.7043]}, {"w": "user’s", "b": [0.4591, 0.6893, 0.5055, 0.7043]}, {"w": "device", "b": [0.5129, 0.6893, 0.5636, 0.7043]}, {"w": "or", "b": [0.5711, 0.6893, 0.5878, 0.7043]}, {"w": "a", "b": [0.5953, 0.6893, 0.6047, 0.7043]}, {"w": "server,", "b": [0.6121, 0.6893, 0.6657, 0.7043]}, {"w": "or", "b": [0.6734, 0.6893, 0.6902, 0.7043]}, {"w": "via", "b": [0.6977, 0.6893, 0.7222, 0.7043]}, {"w": "model", "b": [0.7297, 0.6893, 0.7793, 0.7043]}, {"w": "streaming.", "b": [0.7868, 0.6893, 0.8727, 0.7043]}, {"w": "In", "b": [0.1312, 0.7073, 0.1484, 0.7222]}, {"w": "addition,", "b": [0.1546, 0.7073, 0.2275, 0.7222]}, {"w": "choose", "b": [0.2337, 0.7073, 0.2869, 0.7222]}, {"w": "among", "b": [0.2931, 0.7073, 0.3472, 0.7222]}, {"w": "strategies", "b": [0.3534, 0.7073, 0.4308, 0.7222]}, {"w": "such", "b": [0.4369, 0.7073, 0.473, 0.7222]}, {"w": "as", "b": [0.4791, 0.7073, 0.4959, 0.7222]}, {"w": "single", "b": [0.5021, 0.7073, 0.548, 0.7222]}, {"w": "deployment,", "b": [0.5542, 0.7073, 0.6537, 0.7222]}, {"w": "silent", "b": [0.6599, 0.7073, 0.7032, 0.7222]}, {"w": "deployment,", "b": [0.7094, 0.7073, 0.8089, 0.7222]}, {"w": "canary", "b": [0.8151, 0.7073, 0.8698, 0.7222]}, {"w": "deployment,", "b": [0.1312, 0.7252, 0.2288, 0.7402]}, {"w": "and", "b": [0.2349, 0.7252, 0.2645, 0.7402]}, {"w": "multi-armed", "b": [0.2707, 0.7252, 0.3693, 0.7402]}, {"w": "bandit.", "b": [0.3755, 0.7252, 0.4327, 0.7402]}, {"w": "Each", "b": [0.4409, 0.7252, 0.4805, 0.7402]}, {"w": "pattern", "b": [0.4867, 0.7252, 0.5459, 0.7402]}, {"w": "and", "b": [0.5521, 0.7252, 0.5817, 0.7402]}, {"w": "strategy", "b": [0.5879, 0.7252, 0.6529, 0.7402]}, {"w": "has", "b": [0.6591, 0.7252, 0.6857, 0.7402]}, {"w": "its", "b": [0.6919, 0.7252, 0.7114, 0.7402]}, {"w": "pros", "b": [0.7176, 0.7252, 0.7514, 0.7402]}, {"w": "and", "b": [0.7576, 0.7252, 0.7872, 0.7402]}, {"w": "cons,", "b": [0.7934, 0.7252, 0.8333, 0.7402]}, {"w": "and", "b": [0.8395, 0.7252, 0.8691, 0.7402]}, {"w": "should", "b": [0.1312, 0.7432, 0.1836, 0.7581]}, {"w": "be", "b": [0.1898, 0.7432, 0.2088, 0.7581]}, {"w": "chosen", "b": [0.2149, 0.7432, 0.2679, 0.7581]}, {"w": "depending", "b": [0.274, 0.7432, 0.3566, 0.7581]}, {"w": "on", "b": [0.3627, 0.7432, 0.3822, 0.7581]}, {"w": "your", "b": [0.3884, 0.7432, 0.4243, 0.7581]}, {"w": "business", "b": [0.4304, 0.7432, 0.4964, 0.7581]}, {"w": "application.", "b": [0.5026, 0.7432, 0.5969, 0.7581]}]}, {"id": "b_8", "type": "paragraph", "text": "Algorithmic efficiency is also an important consideration for model deployment. Scientific Python packages like NumPy, SciPy, and scikit-learn were built by experienced scientists and engineers with efficiency in mind. They have many methods implemented in C for maximum efficiency. Avoid writing your own production code, when you can reuse a popular and mature library or package. For high efficiency, choose appropriate data structures and caching.", "words": [{"w": "Algorithmic", "b": [0.1305, 0.7701, 0.2284, 0.785]}, {"w": "efficiency", "b": [0.2346, 0.7701, 0.3094, 0.785]}, {"w": "is", "b": [0.3156, 0.7701, 0.3283, 0.785]}, {"w": "also", "b": [0.3345, 0.7701, 0.366, 0.785]}, {"w": "an", "b": [0.3722, 0.7701, 0.3921, 0.785]}, {"w": "important", "b": [0.3983, 0.7701, 0.4809, 0.785]}, {"w": "consideration", "b": [0.4872, 0.7701, 0.5961, 0.785]}, {"w": "for", "b": [0.6023, 0.7701, 0.6249, 0.785]}, {"w": "model", "b": [0.6311, 0.7701, 0.6808, 0.785]}, {"w": "deployment.", "b": [0.687, 0.7701, 0.7869, 0.785]}, {"w": "Scientific", "b": [0.7953, 0.7701, 0.8691, 0.785]}, {"w": "Python", "b": [0.1312, 0.788, 0.1893, 0.803]}, {"w": "packages", "b": [0.1951, 0.788, 0.2645, 0.803]}, {"w": "like", "b": [0.2703, 0.788, 0.2974, 0.803]}, {"w": "NumPy,", "b": [0.3032, 0.788, 0.3673, 0.803]}, {"w": "SciPy,", "b": [0.3731, 0.788, 0.4216, 0.803]}, {"w": "and", "b": [0.4275, 0.788, 0.4566, 0.803]}, {"w": "scikit-learn", "b": [0.4624, 0.788, 0.5495, 0.803]}, {"w": "were", "b": [0.5553, 0.788, 0.591, 0.803]}, {"w": "built", "b": [0.5968, 0.788, 0.634, 0.803]}, {"w": "by", "b": [0.6398, 0.788, 0.6589, 0.803]}, {"w": "experienced", "b": [0.6647, 0.788, 0.7573, 0.803]}, {"w": "scientists", "b": [0.7631, 0.788, 0.8342, 0.803]}, {"w": "and", "b": [0.84, 0.788, 0.8692, 0.803]}, {"w": "engineers", "b": [0.1312, 0.806, 0.2038, 0.8209]}, {"w": "with", "b": [0.2099, 0.806, 0.2451, 0.8209]}, {"w": "efficiency", "b": [0.2513, 0.806, 0.3231, 0.8209]}, {"w": "in", "b": [0.3293, 0.806, 0.3444, 0.8209]}, {"w": "mind.", "b": [0.3506, 0.806, 0.3958, 0.8209]}, {"w": "They", "b": [0.4041, 0.806, 0.4448, 0.8209]}, {"w": "have", "b": [0.4509, 0.806, 0.4866, 0.8209]}, {"w": "many", "b": [0.4928, 0.806, 0.5359, 0.8209]}, {"w": "methods", "b": [0.5421, 0.806, 0.6091, 0.8209]}, {"w": "implemented", "b": [0.6152, 0.806, 0.7162, 0.8209]}, {"w": "in", "b": [0.7224, 0.806, 0.7375, 0.8209]}, {"w": "C", "b": [0.7436, 0.806, 0.7567, 0.8209]}, {"w": "for", "b": [0.7629, 0.806, 0.7845, 0.8209]}, {"w": "maximum", "b": [0.7907, 0.806, 0.869, 0.8209]}, {"w": "efficiency.", "b": [0.1312, 0.8239, 0.2066, 0.8389]}, {"w": "Avoid", "b": [0.2145, 0.8239, 0.2591, 0.8389]}, {"w": "writing", "b": [0.2643, 0.8239, 0.3207, 0.8389]}, {"w": "your", "b": [0.3259, 0.8239, 0.3611, 0.8389]}, {"w": "own", "b": [0.3663, 0.8239, 0.3979, 0.8389]}, {"w": "production", "b": [0.4031, 0.8239, 0.4891, 0.8389]}, {"w": "code,", "b": [0.4943, 0.8239, 0.5351, 0.8389]}, {"w": "when", "b": [0.5404, 0.8239, 0.5816, 0.8389]}, {"w": "you", "b": [0.5869, 0.8239, 0.615, 0.8389]}, {"w": "can", "b": [0.6202, 0.8239, 0.6473, 0.8389]}, {"w": "reuse", "b": [0.6525, 0.8239, 0.6929, 0.8389]}, {"w": "a", "b": [0.6981, 0.8239, 0.7071, 0.8389]}, {"w": "popular", "b": [0.7124, 0.8239, 0.7732, 0.8389]}, {"w": "and", "b": [0.7784, 0.8239, 0.8076, 0.8389]}, {"w": "mature", "b": [0.8128, 0.8239, 0.8691, 0.8389]}, {"w": "library", "b": [0.1312, 0.8419, 0.1852, 0.8568]}, {"w": "or", "b": [0.1913, 0.8419, 0.2078, 0.8568]}, {"w": "package.", "b": [0.2139, 0.8419, 0.2826, 0.8568]}, {"w": "For", "b": [0.2908, 0.8419, 0.3178, 0.8568]}, {"w": "high", "b": [0.324, 0.8419, 0.3588, 0.8568]}, {"w": "efficiency,", "b": [0.365, 0.8419, 0.4419, 0.8568]}, {"w": "choose", "b": [0.448, 0.8419, 0.5005, 0.8568]}, {"w": "appropriate", "b": [0.5066, 0.8419, 0.6, 0.8568]}, {"w": "data", "b": [0.6062, 0.8419, 0.6421, 0.8568]}, {"w": "structures", "b": [0.6482, 0.8419, 0.7285, 0.8568]}, {"w": "and", "b": [0.7347, 0.8419, 0.7644, 0.8568]}, {"w": "caching.", "b": [0.7706, 0.8419, 0.8357, 0.8568]}]}, {"id": "b_9", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 5", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "5", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 294, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "For some applications, the prediction speed is critical. In such cases, the production code is written in a compiled language, such as Java or C/C++. If a data analyst has built a model in Python or R, there are several options for production deployment: rewrite the code in a compiled programming language of the production environment, use a model representation standard such as PMML or PFA, or use a specialized execution engine such as MLeap.", "words": [{"w": "For", "b": [0.1312, 0.0881, 0.1581, 0.1031]}, {"w": "some", "b": [0.1642, 0.0881, 0.2041, 0.1031]}, {"w": "applications,", "b": [0.2102, 0.0881, 0.3114, 0.1031]}, {"w": "the", "b": [0.3175, 0.0881, 0.343, 0.1031]}, {"w": "prediction", "b": [0.3492, 0.0881, 0.4299, 0.1031]}, {"w": "speed", "b": [0.436, 0.0881, 0.4805, 0.1031]}, {"w": "is", "b": [0.4867, 0.0881, 0.499, 0.1031]}, {"w": "critical.", "b": [0.5052, 0.0881, 0.5654, 0.1031]}, {"w": "In", "b": [0.5736, 0.0881, 0.5905, 0.1031]}, {"w": "such", "b": [0.5966, 0.0881, 0.6319, 0.1031]}, {"w": "cases,", "b": [0.6381, 0.0881, 0.6832, 0.1031]}, {"w": "the", "b": [0.6893, 0.0881, 0.7149, 0.1031]}, {"w": "production", "b": [0.721, 0.0881, 0.8083, 0.1031]}, {"w": "code", "b": [0.8145, 0.0881, 0.8507, 0.1031]}, {"w": "is", "b": [0.8568, 0.0881, 0.8692, 0.1031]}, {"w": "written", "b": [0.1306, 0.106, 0.188, 0.121]}, {"w": "in", "b": [0.1942, 0.106, 0.2093, 0.121]}, {"w": "a", "b": [0.2154, 0.106, 0.2245, 0.121]}, {"w": "compiled", "b": [0.2307, 0.106, 0.3012, 0.121]}, {"w": "language,", "b": [0.3073, 0.106, 0.3819, 0.121]}, {"w": "such", "b": [0.388, 0.106, 0.4229, 0.121]}, {"w": "as", "b": [0.429, 0.106, 0.4452, 0.121]}, {"w": "Java", "b": [0.4514, 0.106, 0.4869, 0.121]}, {"w": "or", "b": [0.493, 0.106, 0.5092, 0.121]}, {"w": "C/C++.", "b": [0.5154, 0.106, 0.5838, 0.121]}, {"w": "If", "b": [0.592, 0.106, 0.6041, 0.121]}, {"w": "a", "b": [0.6103, 0.106, 0.6194, 0.121]}, {"w": "data", "b": [0.6255, 0.106, 0.6607, 0.121]}, {"w": "analyst", "b": [0.6669, 0.106, 0.7239, 0.121]}, {"w": "has", "b": [0.7301, 0.106, 0.7564, 0.121]}, {"w": "built", "b": [0.7625, 0.106, 0.7998, 0.121]}, {"w": "a", "b": [0.806, 0.106, 0.815, 0.121]}, {"w": "model", "b": [0.8212, 0.106, 0.869, 0.121]}, {"w": "in", "b": [0.1312, 0.124, 0.1467, 0.1389]}, {"w": "Python", "b": [0.1529, 0.124, 0.2125, 0.1389]}, {"w": "or", "b": [0.2186, 0.124, 0.2352, 0.1389]}, {"w": "R,", "b": [0.2413, 0.124, 0.2602, 0.1389]}, {"w": "there", "b": [0.2663, 0.124, 0.3076, 0.1389]}, {"w": "are", "b": [0.3138, 0.124, 0.3386, 0.1389]}, {"w": "several", "b": [0.3448, 0.124, 0.3996, 0.1389]}, {"w": "options", "b": [0.4058, 0.124, 0.4647, 0.1389]}, {"w": "for", "b": [0.4709, 0.124, 0.4931, 0.1389]}, {"w": "production", "b": [0.4993, 0.124, 0.5875, 0.1389]}, {"w": "deployment:", "b": [0.5937, 0.124, 0.6922, 0.1389]}, {"w": "rewrite", "b": [0.7004, 0.124, 0.7573, 0.1389]}, {"w": "the", "b": [0.7635, 0.124, 0.7893, 0.1389]}, {"w": "code", "b": [0.7954, 0.124, 0.832, 0.1389]}, {"w": "in", "b": [0.8382, 0.124, 0.8537, 0.1389]}, {"w": "a", "b": [0.8598, 0.124, 0.8691, 0.1389]}, {"w": "compiled", "b": [0.1312, 0.1419, 0.2024, 0.1569]}, {"w": "programming", "b": [0.2086, 0.1419, 0.3155, 0.1569]}, {"w": "language", "b": [0.3216, 0.1419, 0.3918, 0.1569]}, {"w": "of", "b": [0.3979, 0.1419, 0.4127, 0.1569]}, {"w": "the", "b": [0.4188, 0.1419, 0.4442, 0.1569]}, {"w": "production", "b": [0.4504, 0.1419, 0.5374, 0.1569]}, {"w": "environment,", "b": [0.5436, 0.1419, 0.6479, 0.1569]}, {"w": "use", "b": [0.654, 0.1419, 0.6796, 0.1569]}, {"w": "a", "b": [0.6857, 0.1419, 0.6949, 0.1569]}, {"w": "model", "b": [0.701, 0.1419, 0.7493, 0.1569]}, {"w": "representation", "b": [0.7554, 0.1419, 0.8691, 0.1569]}, {"w": "standard", "b": [0.1312, 0.1599, 0.2022, 0.1748]}, {"w": "such", "b": [0.2083, 0.1599, 0.2438, 0.1748]}, {"w": "as", "b": [0.2499, 0.1599, 0.2664, 0.1748]}, {"w": "PMML", "b": [0.2726, 0.1599, 0.3305, 0.1748]}, {"w": "or", "b": [0.3367, 0.1599, 0.3531, 0.1748]}, {"w": "PFA,", "b": [0.3593, 0.1599, 0.4008, 0.1748]}, {"w": "or", "b": [0.407, 0.1599, 0.4234, 0.1748]}, {"w": "use", "b": [0.4296, 0.1599, 0.4553, 0.1748]}, {"w": "a", "b": [0.4615, 0.1599, 0.4707, 0.1748]}, {"w": "specialized", "b": [0.4768, 0.1599, 0.5626, 0.1748]}, {"w": "execution", "b": [0.5688, 0.1599, 0.6452, 0.1748]}, {"w": "engine", "b": [0.6513, 0.1599, 0.7026, 0.1748]}, {"w": "such", "b": [0.7088, 0.1599, 0.7442, 0.1748]}, {"w": "as", "b": [0.7504, 0.1599, 0.7669, 0.1748]}, {"w": "MLeap.", "b": [0.7731, 0.1599, 0.8343, 0.1748]}]}, {"id": "b_1", "type": "paragraph", "text": "Machine learning models are served in either batch or on-demand mode. When served on-demand, a model is usually wrapped into a REST API. Serving a machine is often done by using a streaming architecture.", "words": [{"w": "Machine", "b": [0.1312, 0.1868, 0.2003, 0.2018]}, {"w": "learning", "b": [0.2084, 0.1868, 0.2743, 0.2018]}, {"w": "models", "b": [0.2825, 0.1868, 0.3396, 0.2018]}, {"w": "are", "b": [0.3477, 0.1868, 0.3728, 0.2018]}, {"w": "served", "b": [0.381, 0.1868, 0.4324, 0.2018]}, {"w": "in", "b": [0.4405, 0.1868, 0.4562, 0.2018]}, {"w": "either", "b": [0.4643, 0.1868, 0.5114, 0.2018]}, {"w": "batch", "b": [0.5196, 0.1868, 0.5651, 0.2018]}, {"w": "or", "b": [0.5732, 0.1868, 0.59, 0.2018]}, {"w": "on-demand", "b": [0.5981, 0.1868, 0.6891, 0.2018]}, {"w": "mode.", "b": [0.6972, 0.1868, 0.7468, 0.2018]}, {"w": "When", "b": [0.7609, 0.1868, 0.8096, 0.2018]}, {"w": "served", "b": [0.8177, 0.1868, 0.8691, 0.2018]}, {"w": "on-demand,", "b": [0.1312, 0.2048, 0.2256, 0.2197]}, {"w": "a", "b": [0.2317, 0.2048, 0.2409, 0.2197]}, {"w": "model", "b": [0.2471, 0.2048, 0.2958, 0.2197]}, {"w": "is", "b": [0.3019, 0.2048, 0.3143, 0.2197]}, {"w": "usually", "b": [0.3205, 0.2048, 0.3775, 0.2197]}, {"w": "wrapped", "b": [0.3836, 0.2048, 0.4529, 0.2197]}, {"w": "into", "b": [0.4591, 0.2048, 0.4903, 0.2197]}, {"w": "a", "b": [0.4965, 0.2048, 0.5057, 0.2197]}, {"w": "REST", "b": [0.5118, 0.2048, 0.5616, 0.2197]}, {"w": "API.", "b": [0.5677, 0.2048, 0.6059, 0.2197]}, {"w": "Serving", "b": [0.612, 0.2048, 0.6721, 0.2197]}, {"w": "a", "b": [0.6782, 0.2048, 0.6875, 0.2197]}, {"w": "machine", "b": [0.6936, 0.2048, 0.7597, 0.2197]}, {"w": "is", "b": [0.7659, 0.2048, 0.7783, 0.2197]}, {"w": "often", "b": [0.7844, 0.2048, 0.825, 0.2197]}, {"w": "done", "b": [0.8311, 0.2048, 0.8691, 0.2197]}, {"w": "by", "b": [0.1312, 0.2227, 0.1507, 0.2377]}, {"w": "using", "b": [0.1569, 0.2227, 0.199, 0.2377]}, {"w": "a", "b": [0.2052, 0.2227, 0.2144, 0.2377]}, {"w": "streaming", "b": [0.2205, 0.2227, 0.2997, 0.2377]}, {"w": "architecture.", "b": [0.3058, 0.2227, 0.4069, 0.2377]}]}, {"id": "b_2", "type": "paragraph", "text": "When a software system is exposed to the real world, its architecture must be ready to", "words": [{"w": "When", "b": [0.1303, 0.2496, 0.1789, 0.2646]}, {"w": "a", "b": [0.1866, 0.2496, 0.196, 0.2646]}, {"w": "software", "b": [0.2037, 0.2496, 0.2713, 0.2646]}, {"w": "system", "b": [0.279, 0.2496, 0.3351, 0.2646]}, {"w": "is", "b": [0.3428, 0.2496, 0.3555, 0.2646]}, {"w": "exposed", "b": [0.3631, 0.2496, 0.4281, 0.2646]}, {"w": "to", "b": [0.4358, 0.2496, 0.4525, 0.2646]}, {"w": "the", "b": [0.4602, 0.2496, 0.4863, 0.2646]}, {"w": "real", "b": [0.494, 0.2496, 0.5244, 0.2646]}, {"w": "world,", "b": [0.532, 0.2496, 0.5828, 0.2646]}, {"w": "its", "b": [0.5909, 0.2496, 0.6108, 0.2646]}, {"w": "architecture", "b": [0.6185, 0.2496, 0.7164, 0.2646]}, {"w": "must", "b": [0.7241, 0.2496, 0.7645, 0.2646]}, {"w": "be", "b": [0.7721, 0.2496, 0.7915, 0.2646]}, {"w": "ready", "b": [0.7992, 0.2496, 0.8447, 0.2646]}, {"w": "to", "b": [0.8524, 0.2496, 0.8691, 0.2646]}]}, {"id": "b_3", "type": "paragraph", "text": "effectively react to errors, change, and human nature. A model must be constantly monitored. Monitoring must allow us to make sure that the model is served correctly and its performance remains within acceptable limits.", "words": [{"w": "effectively", "b": [0.1312, 0.2676, 0.2096, 0.2825]}, {"w": "react", "b": [0.2151, 0.2676, 0.2543, 0.2825]}, {"w": "to", "b": [0.2598, 0.2676, 0.2758, 0.2825]}, {"w": "errors,", "b": [0.2813, 0.2676, 0.3318, 0.2825]}, {"w": "change,", "b": [0.3374, 0.2676, 0.3962, 0.2825]}, {"w": "and", "b": [0.4018, 0.2676, 0.4309, 0.2825]}, {"w": "human", "b": [0.4363, 0.2676, 0.4901, 0.2825]}, {"w": "nature.", "b": [0.4955, 0.2676, 0.5519, 0.2825]}, {"w": "A", "b": [0.5598, 0.2676, 0.5734, 0.2825]}, {"w": "model", "b": [0.5788, 0.2676, 0.6266, 0.2825]}, {"w": "must", "b": [0.632, 0.2676, 0.6708, 0.2825]}, {"w": "be", "b": [0.6762, 0.2676, 0.6948, 0.2825]}, {"w": "constantly", "b": [0.7003, 0.2676, 0.7818, 0.2825]}, {"w": "monitored.", "b": [0.7872, 0.2676, 0.8727, 0.2825]}, {"w": "Monitoring", "b": [0.1312, 0.2855, 0.2192, 0.3005]}, {"w": "must", "b": [0.2246, 0.2855, 0.2634, 0.3005]}, {"w": "allow", "b": [0.2688, 0.2855, 0.3095, 0.3005]}, {"w": "us", "b": [0.3149, 0.2855, 0.3321, 0.3005]}, {"w": "to", "b": [0.3375, 0.2855, 0.3536, 0.3005]}, {"w": "make", "b": [0.359, 0.2855, 0.4002, 0.3005]}, {"w": "sure", "b": [0.4056, 0.2855, 0.4379, 0.3005]}, {"w": "that", "b": [0.4433, 0.2855, 0.4765, 0.3005]}, {"w": "the", "b": [0.4819, 0.2855, 0.507, 0.3005]}, {"w": "model", "b": [0.5124, 0.2855, 0.5602, 0.3005]}, {"w": "is", "b": [0.5656, 0.2855, 0.5777, 0.3005]}, {"w": "served", "b": [0.5831, 0.2855, 0.6326, 0.3005]}, {"w": "correctly", "b": [0.638, 0.2855, 0.7069, 0.3005]}, {"w": "and", "b": [0.7123, 0.2855, 0.7415, 0.3005]}, {"w": "its", "b": [0.7469, 0.2855, 0.7661, 0.3005]}, {"w": "performance", "b": [0.7715, 0.2855, 0.8691, 0.3005]}, {"w": "remains", "b": [0.1312, 0.3035, 0.1939, 0.3184]}, {"w": "within", "b": [0.2001, 0.3035, 0.2514, 0.3184]}, {"w": "acceptable", "b": [0.2575, 0.3035, 0.3416, 0.3184]}, {"w": "limits.", "b": [0.3478, 0.3035, 0.3981, 0.3184]}]}, {"id": "b_4", "type": "paragraph", "text": "It is important to log enough information to reproduce any erratic system behavior during future analysis. If the model is served to a front-end user, it’s important to save the user’s context at the moment of the model serving.", "words": [{"w": "It", "b": [0.1312, 0.3304, 0.1452, 0.3453]}, {"w": "is", "b": [0.1514, 0.3304, 0.1639, 0.3453]}, {"w": "important", "b": [0.17, 0.3304, 0.2517, 0.3453]}, {"w": "to", "b": [0.2579, 0.3304, 0.2744, 0.3453]}, {"w": "log", "b": [0.2806, 0.3304, 0.3044, 0.3453]}, {"w": "enough", "b": [0.3105, 0.3304, 0.3684, 0.3453]}, {"w": "information", "b": [0.3746, 0.3304, 0.4692, 0.3453]}, {"w": "to", "b": [0.4754, 0.3304, 0.4919, 0.3453]}, {"w": "reproduce", "b": [0.4981, 0.3304, 0.5783, 0.3453]}, {"w": "any", "b": [0.5845, 0.3304, 0.6134, 0.3453]}, {"w": "erratic", "b": [0.6196, 0.3304, 0.6725, 0.3453]}, {"w": "system", "b": [0.6786, 0.3304, 0.7341, 0.3453]}, {"w": "behavior", "b": [0.7403, 0.3304, 0.8101, 0.3453]}, {"w": "during", "b": [0.8163, 0.3304, 0.8691, 0.3453]}, {"w": "future", "b": [0.1312, 0.3483, 0.1805, 0.3633]}, {"w": "analysis.", "b": [0.1867, 0.3483, 0.2557, 0.3633]}, {"w": "If", "b": [0.264, 0.3483, 0.2764, 0.3633]}, {"w": "the", "b": [0.2826, 0.3483, 0.3085, 0.3633]}, {"w": "model", "b": [0.3146, 0.3483, 0.3638, 0.3633]}, {"w": "is", "b": [0.37, 0.3483, 0.3825, 0.3633]}, {"w": "served", "b": [0.3887, 0.3483, 0.4396, 0.3633]}, {"w": "to", "b": [0.4458, 0.3483, 0.4623, 0.3633]}, {"w": "a", "b": [0.4685, 0.3483, 0.4778, 0.3633]}, {"w": "front-end", "b": [0.484, 0.3483, 0.5586, 0.3633]}, {"w": "user,", "b": [0.5648, 0.3483, 0.6033, 0.3633]}, {"w": "it’s", "b": [0.6094, 0.3483, 0.6344, 0.3633]}, {"w": "important", "b": [0.6405, 0.3483, 0.7224, 0.3633]}, {"w": "to", "b": [0.7286, 0.3483, 0.7451, 0.3633]}, {"w": "save", "b": [0.7513, 0.3483, 0.7851, 0.3633]}, {"w": "the", "b": [0.7912, 0.3483, 0.8171, 0.3633]}, {"w": "user’s", "b": [0.8233, 0.3483, 0.8691, 0.3633]}, {"w": "context", "b": [0.1312, 0.3663, 0.1907, 0.3812]}, {"w": "at", "b": [0.1969, 0.3663, 0.2133, 0.3812]}, {"w": "the", "b": [0.2194, 0.3663, 0.2451, 0.3812]}, {"w": "moment", "b": [0.2512, 0.3663, 0.3163, 0.3812]}, {"w": "of", "b": [0.3224, 0.3663, 0.3373, 0.3812]}, {"w": "the", "b": [0.3435, 0.3663, 0.3691, 0.3812]}, {"w": "model", "b": [0.3753, 0.3663, 0.424, 0.3812]}, {"w": "serving.", "b": [0.4301, 0.3663, 0.4923, 0.3812]}]}, {"id": "b_5", "type": "paragraph", "text": "Some users can try to abuse your model to reach their own business goals. To prevent abuse, don’t trust the data coming from a user, unless similar data comes from multiple users. Assign a reputation score to each user and don’t trust the data obtained from users with low reputations. Classify user behavior as normal or abnormal, and make progressively longer pauses or block some users, if necessary.", "words": [{"w": "Some", "b": [0.1312, 0.3932, 0.1734, 0.4082]}, {"w": "users", "b": [0.1796, 0.3932, 0.219, 0.4082]}, {"w": "can", "b": [0.2252, 0.3932, 0.2523, 0.4082]}, {"w": "try", "b": [0.2584, 0.3932, 0.2821, 0.4082]}, {"w": "to", "b": [0.2882, 0.3932, 0.3043, 0.4082]}, {"w": "abuse", "b": [0.3104, 0.3932, 0.3548, 0.4082]}, {"w": "your", "b": [0.3609, 0.3932, 0.3961, 0.4082]}, {"w": "model", "b": [0.4023, 0.3932, 0.45, 0.4082]}, {"w": "to", "b": [0.4561, 0.3932, 0.4722, 0.4082]}, {"w": "reach", "b": [0.4783, 0.3932, 0.5201, 0.4082]}, {"w": "their", "b": [0.5262, 0.3932, 0.5635, 0.4082]}, {"w": "own", "b": [0.5696, 0.3932, 0.6012, 0.4082]}, {"w": "business", "b": [0.6074, 0.3932, 0.672, 0.4082]}, {"w": "goals.", "b": [0.6782, 0.3932, 0.7225, 0.4082]}, {"w": "To", "b": [0.7307, 0.3932, 0.7512, 0.4082]}, {"w": "prevent", "b": [0.7574, 0.3932, 0.8162, 0.4082]}, {"w": "abuse,", "b": [0.8223, 0.3932, 0.8717, 0.4082]}, {"w": "don’t", "b": [0.1312, 0.4111, 0.1741, 0.4261]}, {"w": "trust", "b": [0.1818, 0.4111, 0.2217, 0.4261]}, {"w": "the", "b": [0.2294, 0.4111, 0.2555, 0.4261]}, {"w": "data", "b": [0.2632, 0.4111, 0.2998, 0.4261]}, {"w": "coming", "b": [0.3075, 0.4111, 0.3661, 0.4261]}, {"w": "from", "b": [0.3738, 0.4111, 0.412, 0.4261]}, {"w": "a", "b": [0.4197, 0.4111, 0.4291, 0.4261]}, {"w": "user,", "b": [0.4368, 0.4111, 0.4756, 0.4261]}, {"w": "unless", "b": [0.4837, 0.4111, 0.5331, 0.4261]}, {"w": "similar", "b": [0.5408, 0.4111, 0.5964, 0.4261]}, {"w": "data", "b": [0.6041, 0.4111, 0.6407, 0.4261]}, {"w": "comes", "b": [0.6483, 0.4111, 0.6976, 0.4261]}, {"w": "from", "b": [0.7053, 0.4111, 0.7435, 0.4261]}, {"w": "multiple", "b": [0.7512, 0.4111, 0.8187, 0.4261]}, {"w": "users.", "b": [0.8264, 0.4111, 0.8727, 0.4261]}, {"w": "Assign", "b": [0.1305, 0.4291, 0.1825, 0.444]}, {"w": "a", "b": [0.1886, 0.4291, 0.1977, 0.444]}, {"w": "reputation", "b": [0.2038, 0.4291, 0.2863, 0.444]}, {"w": "score", "b": [0.2924, 0.4291, 0.3317, 0.444]}, {"w": "to", "b": [0.3379, 0.4291, 0.3539, 0.444]}, {"w": "each", "b": [0.3601, 0.4291, 0.3947, 0.444]}, {"w": "user", "b": [0.4009, 0.4291, 0.4332, 0.444]}, {"w": "and", "b": [0.4393, 0.4291, 0.4685, 0.444]}, {"w": "don’t", "b": [0.4746, 0.4291, 0.5158, 0.444]}, {"w": "trust", "b": [0.5219, 0.4291, 0.5603, 0.444]}, {"w": "the", "b": [0.5664, 0.4291, 0.5915, 0.444]}, {"w": "data", "b": [0.5977, 0.4291, 0.6328, 0.444]}, {"w": "obtained", "b": [0.639, 0.4291, 0.7073, 0.444]}, {"w": "from", "b": [0.7134, 0.4291, 0.7501, 0.444]}, {"w": "users", "b": [0.7563, 0.4291, 0.7957, 0.444]}, {"w": "with", "b": [0.8019, 0.4291, 0.837, 0.444]}, {"w": "low", "b": [0.8432, 0.4291, 0.8698, 0.444]}, {"w": "reputations.", "b": [0.1312, 0.447, 0.2295, 0.462]}, {"w": "Classify", "b": [0.2378, 0.447, 0.3017, 0.462]}, {"w": "user", "b": [0.3078, 0.447, 0.3414, 0.462]}, {"w": "behavior", "b": [0.3476, 0.447, 0.4181, 0.462]}, {"w": "as", "b": [0.4243, 0.447, 0.4411, 0.462]}, {"w": "normal", "b": [0.4472, 0.447, 0.5047, 0.462]}, {"w": "or", "b": [0.5109, 0.447, 0.5276, 0.462]}, {"w": "abnormal,", "b": [0.5338, 0.447, 0.6163, 0.462]}, {"w": "and", "b": [0.6225, 0.447, 0.6528, 0.462]}, {"w": "make", "b": [0.6589, 0.447, 0.7017, 0.462]}, {"w": "progressively", "b": [0.7079, 0.447, 0.8131, 0.462]}, {"w": "longer", "b": [0.8193, 0.447, 0.8695, 0.462]}, {"w": "pauses", "b": [0.1312, 0.465, 0.1838, 0.4799]}, {"w": "or", "b": [0.1899, 0.465, 0.2064, 0.4799]}, {"w": "block", "b": [0.2125, 0.465, 0.2551, 0.4799]}, {"w": "some", "b": [0.2612, 0.465, 0.3013, 0.4799]}, {"w": "users,", "b": [0.3075, 0.465, 0.3529, 0.4799]}, {"w": "if", "b": [0.359, 0.465, 0.3698, 0.4799]}, {"w": "necessary.", "b": [0.3759, 0.465, 0.4552, 0.4799]}]}, {"id": "b_6", "type": "paragraph", "text": "Regularly update your model by analyzing users’ behavior and input data, to make it more robust. Afterwards, run the new model against the end-to-end and confidence test sets. Make sure that the outputs are as before, or that the changes are as expected. Validate that the new model doesn’t make significantly more costly errors. Ensure errors are distributed uniformly across user categories. It’s undesirable if the new model affects negatively most users from a minority or specific location.", "words": [{"w": "Regularly", "b": [0.1312, 0.4919, 0.2087, 0.5069]}, {"w": "update", "b": [0.2149, 0.4919, 0.2706, 0.5069]}, {"w": "your", "b": [0.2768, 0.4919, 0.3126, 0.5069]}, {"w": "model", "b": [0.3188, 0.4919, 0.3674, 0.5069]}, {"w": "by", "b": [0.3735, 0.4919, 0.3929, 0.5069]}, {"w": "analyzing", "b": [0.3991, 0.4919, 0.4753, 0.5069]}, {"w": "users’", "b": [0.4815, 0.4919, 0.5267, 0.5069]}, {"w": "behavior", "b": [0.5329, 0.4919, 0.602, 0.5069]}, {"w": "and", "b": [0.6081, 0.4919, 0.6378, 0.5069]}, {"w": "input", "b": [0.6439, 0.4919, 0.6869, 0.5069]}, {"w": "data,", "b": [0.6931, 0.4919, 0.7339, 0.5069]}, {"w": "to", "b": [0.7401, 0.4919, 0.7565, 0.5069]}, {"w": "make", "b": [0.7626, 0.4919, 0.8045, 0.5069]}, {"w": "it", "b": [0.8107, 0.4919, 0.823, 0.5069]}, {"w": "more", "b": [0.8292, 0.4919, 0.8691, 0.5069]}, {"w": "robust.", "b": [0.1312, 0.5098, 0.1889, 0.5248]}, {"w": "Afterwards,", "b": [0.2017, 0.5098, 0.2976, 0.5248]}, {"w": "run", "b": [0.3056, 0.5098, 0.3339, 0.5248]}, {"w": "the", "b": [0.3416, 0.5098, 0.3677, 0.5248]}, {"w": "new", "b": [0.3754, 0.5098, 0.4078, 0.5248]}, {"w": "model", "b": [0.4154, 0.5098, 0.4651, 0.5248]}, {"w": "against", "b": [0.4728, 0.5098, 0.5314, 0.5248]}, {"w": "the", "b": [0.5391, 0.5098, 0.5653, 0.5248]}, {"w": "end-to-end", "b": [0.5729, 0.5098, 0.6608, 0.5248]}, {"w": "and", "b": [0.6684, 0.5098, 0.6988, 0.5248]}, {"w": "confidence", "b": [0.7064, 0.5098, 0.7912, 0.5248]}, {"w": "test", "b": [0.7988, 0.5098, 0.8293, 0.5248]}, {"w": "sets.", "b": [0.8369, 0.5098, 0.8727, 0.5248]}, {"w": "Make", "b": [0.1312, 0.5278, 0.1741, 0.5428]}, {"w": "sure", "b": [0.1802, 0.5278, 0.2126, 0.5428]}, {"w": "that", "b": [0.2188, 0.5278, 0.2521, 0.5428]}, {"w": "the", "b": [0.2582, 0.5278, 0.2834, 0.5428]}, {"w": "outputs", "b": [0.2896, 0.5278, 0.3502, 0.5428]}, {"w": "are", "b": [0.3563, 0.5278, 0.3806, 0.5428]}, {"w": "as", "b": [0.3867, 0.5278, 0.4029, 0.5428]}, {"w": "before,", "b": [0.4091, 0.5278, 0.4626, 0.5428]}, {"w": "or", "b": [0.4688, 0.5278, 0.4849, 0.5428]}, {"w": "that", "b": [0.4911, 0.5278, 0.5243, 0.5428]}, {"w": "the", "b": [0.5305, 0.5278, 0.5557, 0.5428]}, {"w": "changes", "b": [0.5619, 0.5278, 0.623, 0.5428]}, {"w": "are", "b": [0.6291, 0.5278, 0.6534, 0.5428]}, {"w": "as", "b": [0.6595, 0.5278, 0.6757, 0.5428]}, {"w": "expected.", "b": [0.6819, 0.5278, 0.7565, 0.5428]}, {"w": "Validate", "b": [0.7647, 0.5278, 0.8302, 0.5428]}, {"w": "that", "b": [0.8364, 0.5278, 0.8696, 0.5428]}, {"w": "the", "b": [0.1312, 0.5457, 0.1571, 0.5607]}, {"w": "new", "b": [0.1633, 0.5457, 0.1953, 0.5607]}, {"w": "model", "b": [0.2015, 0.5457, 0.2506, 0.5607]}, {"w": "doesn’t", "b": [0.2567, 0.5457, 0.3153, 0.5607]}, {"w": "make", "b": [0.3214, 0.5457, 0.3639, 0.5607]}, {"w": "significantly", "b": [0.37, 0.5457, 0.4674, 0.5607]}, {"w": "more", "b": [0.4735, 0.5457, 0.5139, 0.5607]}, {"w": "costly", "b": [0.52, 0.5457, 0.5672, 0.5607]}, {"w": "errors.", "b": [0.5733, 0.5457, 0.6254, 0.5607]}, {"w": "Ensure", "b": [0.6335, 0.5457, 0.6899, 0.5607]}, {"w": "errors", "b": [0.696, 0.5457, 0.7428, 0.5607]}, {"w": "are", "b": [0.749, 0.5457, 0.7739, 0.5607]}, {"w": "distributed", "b": [0.78, 0.5457, 0.8692, 0.5607]}, {"w": "uniformly", "b": [0.1312, 0.5637, 0.2108, 0.5786]}, {"w": "across", "b": [0.2169, 0.5637, 0.2663, 0.5786]}, {"w": "user", "b": [0.2725, 0.5637, 0.3061, 0.5786]}, {"w": "categories.", "b": [0.3122, 0.5637, 0.3982, 0.5786]}, {"w": "It’s", "b": [0.4064, 0.5637, 0.4332, 0.5786]}, {"w": "undesirable", "b": [0.4393, 0.5637, 0.5326, 0.5786]}, {"w": "if", "b": [0.5387, 0.5637, 0.5497, 0.5786]}, {"w": "the", "b": [0.5558, 0.5637, 0.582, 0.5786]}, {"w": "new", "b": [0.5881, 0.5637, 0.6205, 0.5786]}, {"w": "model", "b": [0.6267, 0.5637, 0.6763, 0.5786]}, {"w": "affects", "b": [0.6825, 0.5637, 0.7344, 0.5786]}, {"w": "negatively", "b": [0.7405, 0.5637, 0.8237, 0.5786]}, {"w": "most", "b": [0.8298, 0.5637, 0.8696, 0.5786]}, {"w": "users", "b": [0.1312, 0.5816, 0.1715, 0.5966]}, {"w": "from", "b": [0.1777, 0.5816, 0.2151, 0.5966]}, {"w": "a", "b": [0.2213, 0.5816, 0.2305, 0.5966]}, {"w": "minority", "b": [0.2367, 0.5816, 0.3054, 0.5966]}, {"w": "or", "b": [0.3115, 0.5816, 0.328, 0.5966]}, {"w": "specific", "b": [0.3341, 0.5816, 0.3922, 0.5966]}, {"w": "location.", "b": [0.3984, 0.5816, 0.4676, 0.5966]}]}, {"id": "b_7", "type": "paragraph", "text": "∗∗∗", "words": [{"w": "∗∗∗", "b": [0.48, 0.6086, 0.52, 0.6236]}]}, {"id": "b_8", "type": "paragraph", "text": "The book stops here, but your learning doesn’t. Machine learning engineering is a relatively new field of software engineering. Thanks to online publications and open source, I’m sure that new best practices, libraries, and frameworks simplifying or solidifying the stages of data preparation, model evaluation, deployment, serving, and monitoring, will appear during the upcoming years. Subscribe to my mailing list on this book’s companion website http://www.mlebook.com. You will regularly receive relevant links.", "words": [{"w": "The", "b": [0.1306, 0.6355, 0.1621, 0.6504]}, {"w": "book", "b": [0.1682, 0.6355, 0.2074, 0.6504]}, {"w": "stops", "b": [0.2135, 0.6355, 0.2544, 0.6504]}, {"w": "here,", "b": [0.2606, 0.6355, 0.2993, 0.6504]}, {"w": "but", "b": [0.3054, 0.6355, 0.3329, 0.6504]}, {"w": "your", "b": [0.339, 0.6355, 0.3747, 0.6504]}, {"w": "learning", "b": [0.3808, 0.6355, 0.445, 0.6504]}, {"w": "doesn’t.", "b": [0.4511, 0.6355, 0.5138, 0.6504]}, {"w": "Machine", "b": [0.522, 0.6355, 0.5891, 0.6504]}, {"w": "learning", "b": [0.5953, 0.6355, 0.6594, 0.6504]}, {"w": "engineering", "b": [0.6655, 0.6355, 0.7562, 0.6504]}, {"w": "is", "b": [0.7623, 0.6355, 0.7746, 0.6504]}, {"w": "a", "b": [0.7808, 0.6355, 0.7899, 0.6504]}, {"w": "relatively", "b": [0.796, 0.6355, 0.8698, 0.6504]}, {"w": "new", "b": [0.1312, 0.6534, 0.1637, 0.6684]}, {"w": "field", "b": [0.1721, 0.6534, 0.2067, 0.6684]}, {"w": "of", "b": [0.2152, 0.6534, 0.2303, 0.6684]}, {"w": "software", "b": [0.2388, 0.6534, 0.3065, 0.6684]}, {"w": "engineering.", "b": [0.3149, 0.6534, 0.4133, 0.6684]}, {"w": "Thanks", "b": [0.4285, 0.6534, 0.4898, 0.6684]}, {"w": "to", "b": [0.4983, 0.6534, 0.5151, 0.6684]}, {"w": "online", "b": [0.5235, 0.6534, 0.5727, 0.6684]}, {"w": "publications", "b": [0.5812, 0.6534, 0.6807, 0.6684]}, {"w": "and", "b": [0.6892, 0.6534, 0.7195, 0.6684]}, {"w": "open", "b": [0.728, 0.6534, 0.7672, 0.6684]}, {"w": "source,", "b": [0.7757, 0.6534, 0.8323, 0.6684]}, {"w": "I’m", "b": [0.8414, 0.6534, 0.8691, 0.6684]}, {"w": "sure", "b": [0.1312, 0.6714, 0.1644, 0.6863]}, {"w": "that", "b": [0.1705, 0.6714, 0.2045, 0.6863]}, {"w": "new", "b": [0.2107, 0.6714, 0.2426, 0.6863]}, {"w": "best", "b": [0.2488, 0.6714, 0.2824, 0.6863]}, {"w": "practices,", "b": [0.2886, 0.6714, 0.365, 0.6863]}, {"w": "libraries,", "b": [0.3712, 0.6714, 0.4415, 0.6863]}, {"w": "and", "b": [0.4476, 0.6714, 0.4775, 0.6863]}, {"w": "frameworks", "b": [0.4837, 0.6714, 0.5761, 0.6863]}, {"w": "simplifying", "b": [0.5823, 0.6714, 0.671, 0.6863]}, {"w": "or", "b": [0.6772, 0.6714, 0.6937, 0.6863]}, {"w": "solidifying", "b": [0.6999, 0.6714, 0.7824, 0.6863]}, {"w": "the", "b": [0.7886, 0.6714, 0.8143, 0.6863]}, {"w": "stages", "b": [0.8205, 0.6714, 0.8691, 0.6863]}, {"w": "of", "b": [0.1312, 0.6893, 0.1464, 0.7043]}, {"w": "data", "b": [0.1535, 0.6893, 0.1901, 0.7043]}, {"w": "preparation,", "b": [0.1973, 0.6893, 0.2978, 0.7043]}, {"w": "model", "b": [0.3052, 0.6893, 0.3549, 0.7043]}, {"w": "evaluation,", "b": [0.362, 0.6893, 0.4514, 0.7043]}, {"w": "deployment,", "b": [0.4588, 0.6893, 0.5587, 0.7043]}, {"w": "serving,", "b": [0.5661, 0.6893, 0.6296, 0.7043]}, {"w": "and", "b": [0.6369, 0.6893, 0.6673, 0.7043]}, {"w": "monitoring,", "b": [0.6744, 0.6893, 0.7696, 0.7043]}, {"w": "will", "b": [0.777, 0.6893, 0.8063, 0.7043]}, {"w": "appear", "b": [0.8134, 0.6893, 0.8694, 0.7043]}, {"w": "during", "b": [0.1312, 0.7073, 0.1838, 0.7222]}, {"w": "the", "b": [0.19, 0.7073, 0.2157, 0.7222]}, {"w": "upcoming", "b": [0.2219, 0.7073, 0.3006, 0.7222]}, {"w": "years.", "b": [0.3068, 0.7073, 0.3533, 0.7222]}, {"w": "Subscribe", "b": [0.3615, 0.7073, 0.4395, 0.7222]}, {"w": "to", "b": [0.4456, 0.7073, 0.4621, 0.7222]}, {"w": "my", "b": [0.4683, 0.7073, 0.493, 0.7222]}, {"w": "mailing", "b": [0.4991, 0.7073, 0.5588, 0.7222]}, {"w": "list", "b": [0.565, 0.7073, 0.5898, 0.7222]}, {"w": "on", "b": [0.596, 0.7073, 0.6156, 0.7222]}, {"w": "this", "b": [0.6217, 0.7073, 0.6517, 0.7222]}, {"w": "book’s", "b": [0.6579, 0.7073, 0.7099, 0.7222]}, {"w": "companion", "b": [0.7161, 0.7073, 0.8036, 0.7222]}, {"w": "website", "b": [0.8098, 0.7073, 0.8691, 0.7222]}, {"w": "http://www.mlebook.com.", "b": [0.1312, 0.7252, 0.3454, 0.7402]}, {"w": "You", "b": [0.3536, 0.7252, 0.3854, 0.7402]}, {"w": "will", "b": [0.3915, 0.7252, 0.4202, 0.7402]}, {"w": "regularly", "b": [0.4263, 0.7252, 0.4977, 0.7402]}, {"w": "receive", "b": [0.5039, 0.7252, 0.5583, 0.7402]}, {"w": "relevant", "b": [0.5645, 0.7252, 0.6281, 0.7402]}, {"w": "links.", "b": [0.6343, 0.7252, 0.6769, 0.7402]}]}, {"id": "b_9", "type": "paragraph", "text": "Please keep in mind that, like its predecessor The Hundred-Page Machine Learning Book, this book is distributed on the “read-first, buy-later” principle. This means that you may download the entire text of the book from its companion website and read before buying. If you’re reading these concluding words from a PDF file, and cannot remember having paid for it, please consider buying the book. You may buy it from Amazon, Leanpub, and other major online book sellers.", "words": [{"w": "Please", "b": [0.1312, 0.7521, 0.1829, 0.7671]}, {"w": "keep", "b": [0.189, 0.7521, 0.2257, 0.7671]}, {"w": "in", "b": [0.2318, 0.7521, 0.2475, 0.7671]}, {"w": "mind", "b": [0.2537, 0.7521, 0.2955, 0.7671]}, {"w": "that,", "b": [0.3017, 0.7521, 0.3414, 0.7671]}, {"w": "like", "b": [0.3476, 0.7521, 0.3759, 0.7671]}, {"w": "its", "b": [0.382, 0.7521, 0.402, 0.7671]}, {"w": "predecessor", "b": [0.4082, 0.7521, 0.5016, 0.7671]}, {"w": "The", "b": [0.5078, 0.7521, 0.5402, 0.7671]}, {"w": "Hundred-Page", "b": [0.5464, 0.7521, 0.6638, 0.7671]}, {"w": "Machine", "b": [0.67, 0.7521, 0.7391, 0.7671]}, {"w": "Learning", "b": [0.7452, 0.7521, 0.8177, 0.7671]}, {"w": "Book,", "b": [0.8239, 0.7521, 0.8717, 0.7671]}, {"w": "this", "b": [0.1312, 0.7701, 0.1617, 0.785]}, {"w": "book", "b": [0.1679, 0.7701, 0.2082, 0.785]}, {"w": "is", "b": [0.2145, 0.7701, 0.2271, 0.785]}, {"w": "distributed", "b": [0.2334, 0.7701, 0.3235, 0.785]}, {"w": "on", "b": [0.3298, 0.7701, 0.3497, 0.785]}, {"w": "the", "b": [0.356, 0.7701, 0.3821, 0.785]}, {"w": "“read-first,", "b": [0.3884, 0.7701, 0.477, 0.785]}, {"w": "buy-later”", "b": [0.4833, 0.7701, 0.567, 0.785]}, {"w": "principle.", "b": [0.5733, 0.7701, 0.6497, 0.785]}, {"w": "This", "b": [0.6583, 0.7701, 0.695, 0.785]}, {"w": "means", "b": [0.7013, 0.7701, 0.7526, 0.785]}, {"w": "that", "b": [0.7589, 0.7701, 0.7934, 0.785]}, {"w": "you", "b": [0.7997, 0.7701, 0.829, 0.785]}, {"w": "may", "b": [0.8353, 0.7701, 0.8698, 0.785]}, {"w": "download", "b": [0.1312, 0.788, 0.2069, 0.803]}, {"w": "the", "b": [0.2131, 0.788, 0.2385, 0.803]}, {"w": "entire", "b": [0.2446, 0.788, 0.2899, 0.803]}, {"w": "text", "b": [0.296, 0.788, 0.3281, 0.803]}, {"w": "of", "b": [0.3342, 0.788, 0.3489, 0.803]}, {"w": "the", "b": [0.3551, 0.788, 0.3805, 0.803]}, {"w": "book", "b": [0.3866, 0.788, 0.4257, 0.803]}, {"w": "from", "b": [0.4319, 0.788, 0.469, 0.803]}, {"w": "its", "b": [0.4752, 0.788, 0.4946, 0.803]}, {"w": "companion", "b": [0.5007, 0.788, 0.5871, 0.803]}, {"w": "website", "b": [0.5932, 0.788, 0.6518, 0.803]}, {"w": "and", "b": [0.6579, 0.788, 0.6874, 0.803]}, {"w": "read", "b": [0.6935, 0.788, 0.7281, 0.803]}, {"w": "before", "b": [0.7343, 0.788, 0.7831, 0.803]}, {"w": "buying.", "b": [0.7892, 0.788, 0.8487, 0.803]}, {"w": "If", "b": [0.8569, 0.788, 0.8691, 0.803]}, {"w": "you’re", "b": [0.1308, 0.806, 0.1807, 0.8209]}, {"w": "reading", "b": [0.1869, 0.806, 0.2472, 0.8209]}, {"w": "these", "b": [0.2534, 0.806, 0.2951, 0.8209]}, {"w": "concluding", "b": [0.3012, 0.806, 0.3886, 0.8209]}, {"w": "words", "b": [0.3947, 0.806, 0.4422, 0.8209]}, {"w": "from", "b": [0.4484, 0.806, 0.4863, 0.8209]}, {"w": "a", "b": [0.4925, 0.806, 0.5018, 0.8209]}, {"w": "PDF", "b": [0.508, 0.806, 0.5472, 0.8209]}, {"w": "file,", "b": [0.5534, 0.806, 0.5825, 0.8209]}, {"w": "and", "b": [0.5886, 0.806, 0.6188, 0.8209]}, {"w": "cannot", "b": [0.6249, 0.806, 0.68, 0.8209]}, {"w": "remember", "b": [0.6862, 0.806, 0.7674, 0.8209]}, {"w": "having", "b": [0.7735, 0.806, 0.8276, 0.8209]}, {"w": "paid", "b": [0.8337, 0.806, 0.8691, 0.8209]}, {"w": "for", "b": [0.1312, 0.8239, 0.1534, 0.8389]}, {"w": "it,", "b": [0.1595, 0.8239, 0.177, 0.8389]}, {"w": "please", "b": [0.1831, 0.8239, 0.2316, 0.8389]}, {"w": "consider", "b": [0.2377, 0.8239, 0.3037, 0.8389]}, {"w": "buying", "b": [0.3098, 0.8239, 0.3648, 0.8389]}, {"w": "the", "b": [0.3709, 0.8239, 0.3966, 0.8389]}, {"w": "book.", "b": [0.4028, 0.8239, 0.4475, 0.8389]}, {"w": "You", "b": [0.4557, 0.8239, 0.4875, 0.8389]}, {"w": "may", "b": [0.4937, 0.8239, 0.5276, 0.8389]}, {"w": "buy", "b": [0.5337, 0.8239, 0.564, 0.8389]}, {"w": "it", "b": [0.5702, 0.8239, 0.5825, 0.8389]}, {"w": "from", "b": [0.5887, 0.8239, 0.6262, 0.8389]}, {"w": "Amazon,", "b": [0.6323, 0.8239, 0.7037, 0.8389]}, {"w": "Leanpub,", "b": [0.7099, 0.8239, 0.7852, 0.8389]}, {"w": "and", "b": [0.7913, 0.8239, 0.8211, 0.8389]}, {"w": "other", "b": [0.8273, 0.8239, 0.8694, 0.8389]}, {"w": "major", "b": [0.1312, 0.8419, 0.1784, 0.8568]}, {"w": "online", "b": [0.1846, 0.8419, 0.2328, 0.8568]}, {"w": "book", "b": [0.2389, 0.8419, 0.2784, 0.8568]}, {"w": "sellers.", "b": [0.2846, 0.8419, 0.3382, 0.8568]}]}, {"id": "b_10", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 6", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "6", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 295, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "10.2 What to Read Next", "words": [{"w": "10.2", "b": [0.1312, 0.0861, 0.1756, 0.104]}, {"w": "What", "b": [0.2005, 0.0861, 0.2618, 0.104]}, {"w": "to", "b": [0.2701, 0.0861, 0.2923, 0.104]}, {"w": "Read", "b": [0.3006, 0.0861, 0.3565, 0.104]}, {"w": "Next", "b": [0.3648, 0.0861, 0.4185, 0.104]}]}, {"id": "b_1", "type": "paragraph", "text": "There are many great books on machine learning and artificial intelligence. Here, I will give you only several recommendations.", "words": [{"w": "There", "b": [0.1306, 0.1247, 0.1775, 0.1396]}, {"w": "are", "b": [0.1836, 0.1247, 0.2081, 0.1396]}, {"w": "many", "b": [0.2142, 0.1247, 0.258, 0.1396]}, {"w": "great", "b": [0.2641, 0.1247, 0.3049, 0.1396]}, {"w": "books", "b": [0.311, 0.1247, 0.3575, 0.1396]}, {"w": "on", "b": [0.3636, 0.1247, 0.383, 0.1396]}, {"w": "machine", "b": [0.3891, 0.1247, 0.4548, 0.1396]}, {"w": "learning", "b": [0.4609, 0.1247, 0.5251, 0.1396]}, {"w": "and", "b": [0.5312, 0.1247, 0.5608, 0.1396]}, {"w": "artificial", "b": [0.5669, 0.1247, 0.6331, 0.1396]}, {"w": "intelligence.", "b": [0.6393, 0.1247, 0.7335, 0.1396]}, {"w": "Here,", "b": [0.7417, 0.1247, 0.784, 0.1396]}, {"w": "I", "b": [0.7901, 0.1247, 0.7968, 0.1396]}, {"w": "will", "b": [0.8029, 0.1247, 0.8314, 0.1396]}, {"w": "give", "b": [0.8375, 0.1247, 0.8691, 0.1396]}, {"w": "you", "b": [0.1308, 0.1426, 0.1595, 0.1576]}, {"w": "only", "b": [0.1656, 0.1426, 0.2, 0.1576]}, {"w": "several", "b": [0.2061, 0.1426, 0.2606, 0.1576]}, {"w": "recommendations.", "b": [0.2668, 0.1426, 0.4125, 0.1576]}]}, {"id": "b_2", "type": "paragraph", "text": "If you would like to get hands-on experience with practical machine learning in Python, there are two books:", "words": [{"w": "If", "b": [0.1312, 0.1695, 0.1433, 0.1845]}, {"w": "you", "b": [0.149, 0.1695, 0.1771, 0.1845]}, {"w": "would", "b": [0.1828, 0.1695, 0.2295, 0.1845]}, {"w": "like", "b": [0.2352, 0.1695, 0.2623, 0.1845]}, {"w": "to", "b": [0.268, 0.1695, 0.284, 0.1845]}, {"w": "get", "b": [0.2897, 0.1695, 0.3138, 0.1845]}, {"w": "hands-on", "b": [0.3195, 0.1695, 0.391, 0.1845]}, {"w": "experience", "b": [0.3967, 0.1695, 0.4792, 0.1845]}, {"w": "with", "b": [0.4848, 0.1695, 0.52, 0.1845]}, {"w": "practical", "b": [0.5257, 0.1695, 0.5941, 0.1845]}, {"w": "machine", "b": [0.5997, 0.1695, 0.6645, 0.1845]}, {"w": "learning", "b": [0.6702, 0.1695, 0.7336, 0.1845]}, {"w": "in", "b": [0.7393, 0.1695, 0.7544, 0.1845]}, {"w": "Python,", "b": [0.76, 0.1695, 0.8231, 0.1845]}, {"w": "there", "b": [0.8289, 0.1695, 0.8691, 0.1845]}, {"w": "are", "b": [0.1312, 0.1875, 0.1559, 0.2024]}, {"w": "two", "b": [0.162, 0.1875, 0.1908, 0.2024]}, {"w": "books:", "b": [0.1969, 0.1875, 0.2488, 0.2024]}]}, {"id": "b_3", "type": "paragraph", "text": "• “Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow” (2nd edition) by Aurélien Géron (O’Reilly Media, 2019), and • “Python Machine Learning” (3rd edition) by Sebastian Raschka (Packt Publishing, 2019).", "words": [{"w": "•", "b": [0.1538, 0.2144, 0.1681, 0.2294]}, {"w": "“Hands-On", "b": [0.1774, 0.2144, 0.2664, 0.2294]}, {"w": "Machine", "b": [0.2725, 0.2144, 0.3393, 0.2294]}, {"w": "Learning", "b": [0.3454, 0.2144, 0.4155, 0.2294]}, {"w": "with", "b": [0.4216, 0.2144, 0.457, 0.2294]}, {"w": "Scikit-Learn,", "b": [0.4631, 0.2144, 0.565, 0.2294]}, {"w": "Keras,", "b": [0.5711, 0.2144, 0.6219, 0.2294]}, {"w": "and", "b": [0.628, 0.2144, 0.6573, 0.2294]}, {"w": "TensorFlow”", "b": [0.6634, 0.2144, 0.7639, 0.2294]}, {"w": "(2nd", "b": [0.77, 0.2128, 0.8022, 0.2294]}, {"w": "edition)", "b": [0.8093, 0.2144, 0.871, 0.2294]}, {"w": "by", "b": [0.1774, 0.2324, 0.1968, 0.2473]}, {"w": "Aurélien", "b": [0.203, 0.2324, 0.2707, 0.2473]}, {"w": "Géron", "b": [0.2769, 0.2324, 0.3263, 0.2473]}, {"w": "(O’Reilly", "b": [0.3324, 0.2324, 0.406, 0.2473]}, {"w": "Media,", "b": [0.4122, 0.2324, 0.467, 0.2473]}, {"w": "2019),", "b": [0.4732, 0.2324, 0.5224, 0.2473]}, {"w": "and", "b": [0.5285, 0.2324, 0.5583, 0.2473]}, {"w": "•", "b": [0.1538, 0.2503, 0.1681, 0.2653]}, {"w": "“Python", "b": [0.1774, 0.2503, 0.2466, 0.2653]}, {"w": "Machine", "b": [0.2539, 0.2503, 0.323, 0.2653]}, {"w": "Learning”", "b": [0.3303, 0.2503, 0.4117, 0.2653]}, {"w": "(3rd", "b": [0.419, 0.2487, 0.4495, 0.2653]}, {"w": "edition)", "b": [0.4578, 0.2503, 0.5216, 0.2653]}, {"w": "by", "b": [0.5289, 0.2503, 0.5488, 0.2653]}, {"w": "Sebastian", "b": [0.5561, 0.2503, 0.6347, 0.2653]}, {"w": "Raschka", "b": [0.642, 0.2503, 0.7103, 0.2653]}, {"w": "(Packt", "b": [0.7177, 0.2503, 0.7718, 0.2653]}, {"w": "Publishing,", "b": [0.7791, 0.2503, 0.8715, 0.2653]}, {"w": "2019).", "b": [0.1769, 0.2683, 0.2261, 0.2832]}]}, {"id": "b_4", "type": "paragraph", "text": "For R, the best choice is “Machine Learning with R” by Brett Lantz (Packt Publishing, 2019).", "words": [{"w": "For", "b": [0.1312, 0.2952, 0.1576, 0.3101]}, {"w": "R,", "b": [0.1631, 0.2952, 0.1814, 0.3101]}, {"w": "the", "b": [0.1869, 0.2952, 0.2121, 0.3101]}, {"w": "best", "b": [0.2175, 0.2952, 0.2503, 0.3101]}, {"w": "choice", "b": [0.2558, 0.2952, 0.3036, 0.3101]}, {"w": "is", "b": [0.3091, 0.2952, 0.3212, 0.3101]}, {"w": "“Machine", "b": [0.3267, 0.2952, 0.4016, 0.3101]}, {"w": "Learning", "b": [0.4071, 0.2952, 0.4767, 0.3101]}, {"w": "with", "b": [0.4822, 0.2952, 0.5174, 0.3101]}, {"w": "R”", "b": [0.5228, 0.2952, 0.5447, 0.3101]}, {"w": "by", "b": [0.5502, 0.2952, 0.5693, 0.3101]}, {"w": "Brett", "b": [0.5747, 0.2952, 0.6167, 0.3101]}, {"w": "Lantz", "b": [0.6222, 0.2952, 0.6672, 0.3101]}, {"w": "(Packt", "b": [0.6727, 0.2952, 0.7247, 0.3101]}, {"w": "Publishing,", "b": [0.7302, 0.2952, 0.819, 0.3101]}, {"w": "2019).", "b": [0.8244, 0.2952, 0.8727, 0.3101]}]}, {"id": "b_5", "type": "paragraph", "text": "To get a deeper understanding of the underlying math behind various machine learning algorithms, I recommend,", "words": [{"w": "To", "b": [0.1306, 0.3221, 0.152, 0.337]}, {"w": "get", "b": [0.1597, 0.3221, 0.1848, 0.337]}, {"w": "a", "b": [0.1925, 0.3221, 0.2019, 0.337]}, {"w": "deeper", "b": [0.2096, 0.3221, 0.2635, 0.337]}, {"w": "understanding", "b": [0.2712, 0.3221, 0.3885, 0.337]}, {"w": "of", "b": [0.3962, 0.3221, 0.4113, 0.337]}, {"w": "the", "b": [0.419, 0.3221, 0.4452, 0.337]}, {"w": "underlying", "b": [0.4528, 0.3221, 0.5403, 0.337]}, {"w": "math", "b": [0.5479, 0.3221, 0.5908, 0.337]}, {"w": "behind", "b": [0.5985, 0.3221, 0.6544, 0.337]}, {"w": "various", "b": [0.6621, 0.3221, 0.7204, 0.337]}, {"w": "machine", "b": [0.728, 0.3221, 0.7955, 0.337]}, {"w": "learning", "b": [0.8032, 0.3221, 0.8691, 0.337]}, {"w": "algorithms,", "b": [0.1312, 0.34, 0.2216, 0.355]}, {"w": "I", "b": [0.2278, 0.34, 0.2344, 0.355]}, {"w": "recommend,", "b": [0.2406, 0.34, 0.338, 0.355]}]}, {"id": "b_6", "type": "paragraph", "text": "• “Pattern Recognition and Machine Learning” by Christopher Bishop (Springer, 2006), and • “An Introduction to Statistical Learning” by Gareth James et al. (Springer, 2013).", "words": [{"w": "•", "b": [0.1538, 0.367, 0.1681, 0.3819]}, {"w": "“Pattern", "b": [0.1774, 0.367, 0.247, 0.3819]}, {"w": "Recognition", "b": [0.2532, 0.367, 0.3483, 0.3819]}, {"w": "and", "b": [0.3544, 0.367, 0.384, 0.3819]}, {"w": "Machine", "b": [0.3901, 0.367, 0.4575, 0.3819]}, {"w": "Learning”", "b": [0.4636, 0.367, 0.543, 0.3819]}, {"w": "by", "b": [0.5491, 0.367, 0.5685, 0.3819]}, {"w": "Christopher", "b": [0.5746, 0.367, 0.6697, 0.3819]}, {"w": "Bishop", "b": [0.6758, 0.367, 0.7307, 0.3819]}, {"w": "(Springer,", "b": [0.7369, 0.367, 0.8165, 0.3819]}, {"w": "2006),", "b": [0.8227, 0.367, 0.8716, 0.3819]}, {"w": "and", "b": [0.1774, 0.3849, 0.2071, 0.3999]}, {"w": "•", "b": [0.1538, 0.4029, 0.1681, 0.4178]}, {"w": "“An", "b": [0.1774, 0.4029, 0.2102, 0.4178]}, {"w": "Introduction", "b": [0.2163, 0.4029, 0.3174, 0.4178]}, {"w": "to", "b": [0.3235, 0.4029, 0.3399, 0.4178]}, {"w": "Statistical", "b": [0.3461, 0.4029, 0.4272, 0.4178]}, {"w": "Learning”", "b": [0.4333, 0.4029, 0.5131, 0.4178]}, {"w": "by", "b": [0.5193, 0.4029, 0.5387, 0.4178]}, {"w": "Gareth", "b": [0.5449, 0.4029, 0.6015, 0.4178]}, {"w": "James", "b": [0.6076, 0.4029, 0.6572, 0.4178]}, {"w": "et", "b": [0.6633, 0.4029, 0.6787, 0.4178]}, {"w": "al.", "b": [0.6849, 0.4029, 0.7044, 0.4178]}, {"w": "(Springer,", "b": [0.7105, 0.4029, 0.7906, 0.4178]}, {"w": "2013).", "b": [0.7968, 0.4029, 0.846, 0.4178]}]}, {"id": "b_7", "type": "paragraph", "text": "To get more detailed understanding of deep learning, I recommend,", "words": [{"w": "To", "b": [0.1306, 0.4298, 0.1516, 0.4447]}, {"w": "get", "b": [0.1577, 0.4298, 0.1823, 0.4447]}, {"w": "more", "b": [0.1885, 0.4298, 0.2285, 0.4447]}, {"w": "detailed", "b": [0.2347, 0.4298, 0.2983, 0.4447]}, {"w": "understanding", "b": [0.3044, 0.4298, 0.4194, 0.4447]}, {"w": "of", "b": [0.4256, 0.4298, 0.4405, 0.4447]}, {"w": "deep", "b": [0.4466, 0.4298, 0.4835, 0.4447]}, {"w": "learning,", "b": [0.4897, 0.4298, 0.5595, 0.4447]}, {"w": "I", "b": [0.5656, 0.4298, 0.5723, 0.4447]}, {"w": "recommend,", "b": [0.5784, 0.4298, 0.6759, 0.4447]}]}, {"id": "b_8", "type": "paragraph", "text": "• “Neural Networks and Deep Learning” by Michael Nielsen (online, 2005), and • “Generative Deep Learning” by David Foster (O’Reilly Media, 2019).", "words": [{"w": "•", "b": [0.1538, 0.4567, 0.1681, 0.4716]}, {"w": "“Neural", "b": [0.1774, 0.4567, 0.24, 0.4716]}, {"w": "Networks", "b": [0.2461, 0.4567, 0.3211, 0.4716]}, {"w": "and", "b": [0.3273, 0.4567, 0.357, 0.4716]}, {"w": "Deep", "b": [0.3631, 0.4567, 0.4039, 0.4716]}, {"w": "Learning”", "b": [0.4101, 0.4567, 0.4898, 0.4716]}, {"w": "by", "b": [0.496, 0.4567, 0.5155, 0.4716]}, {"w": "Michael", "b": [0.5216, 0.4567, 0.5842, 0.4716]}, {"w": "Nielsen", "b": [0.5903, 0.4567, 0.6484, 0.4716]}, {"w": "(online,", "b": [0.6545, 0.4567, 0.715, 0.4716]}, {"w": "2005),", "b": [0.7212, 0.4567, 0.7704, 0.4716]}, {"w": "and", "b": [0.7766, 0.4567, 0.8063, 0.4716]}, {"w": "•", "b": [0.1538, 0.4746, 0.1681, 0.4896]}, {"w": "“Generative", "b": [0.1774, 0.4746, 0.2734, 0.4896]}, {"w": "Deep", "b": [0.2796, 0.4746, 0.3203, 0.4896]}, {"w": "Learning”", "b": [0.3265, 0.4746, 0.4063, 0.4896]}, {"w": "by", "b": [0.4124, 0.4746, 0.4319, 0.4896]}, {"w": "David", "b": [0.438, 0.4746, 0.486, 0.4896]}, {"w": "Foster", "b": [0.4921, 0.4746, 0.5418, 0.4896]}, {"w": "(O’Reilly", "b": [0.5479, 0.4746, 0.6215, 0.4896]}, {"w": "Media,", "b": [0.6276, 0.4746, 0.6825, 0.4896]}, {"w": "2019).", "b": [0.6887, 0.4746, 0.7379, 0.4896]}]}, {"id": "b_9", "type": "paragraph", "text": "If your ambitions go far beyond machine learning and you want to sweep the whole field of artificial intelligence, then “Artificial Intelligence: A Modern Approach” (4th Edition) by Stuart Russell and Peter Norvig (Pearson, 2020), known as AIMA, is your best book.", "words": [{"w": "If", "b": [0.1312, 0.5016, 0.1436, 0.5165]}, {"w": "your", "b": [0.1497, 0.5016, 0.1858, 0.5165]}, {"w": "ambitions", "b": [0.1919, 0.5016, 0.2708, 0.5165]}, {"w": "go", "b": [0.2769, 0.5016, 0.2955, 0.5165]}, {"w": "far", "b": [0.3016, 0.5016, 0.3238, 0.5165]}, {"w": "beyond", "b": [0.3299, 0.5016, 0.3881, 0.5165]}, {"w": "machine", "b": [0.3942, 0.5016, 0.4606, 0.5165]}, {"w": "learning", "b": [0.4668, 0.5016, 0.5317, 0.5165]}, {"w": "and", "b": [0.5378, 0.5016, 0.5677, 0.5165]}, {"w": "you", "b": [0.5738, 0.5016, 0.6026, 0.5165]}, {"w": "want", "b": [0.6088, 0.5016, 0.6479, 0.5165]}, {"w": "to", "b": [0.654, 0.5016, 0.6705, 0.5165]}, {"w": "sweep", "b": [0.6766, 0.5016, 0.7236, 0.5165]}, {"w": "the", "b": [0.7297, 0.5016, 0.7554, 0.5165]}, {"w": "whole", "b": [0.7616, 0.5016, 0.8079, 0.5165]}, {"w": "field", "b": [0.814, 0.5016, 0.848, 0.5165]}, {"w": "of", "b": [0.8541, 0.5016, 0.8691, 0.5165]}, {"w": "artificial", "b": [0.1312, 0.5195, 0.1993, 0.5345]}, {"w": "intelligence,", "b": [0.2061, 0.5195, 0.3029, 0.5345]}, {"w": "then", "b": [0.3099, 0.5195, 0.3465, 0.5345]}, {"w": "“Artificial", "b": [0.3533, 0.5195, 0.4349, 0.5345]}, {"w": "Intelligence:", "b": [0.4417, 0.5195, 0.5401, 0.5345]}, {"w": "A", "b": [0.5496, 0.5195, 0.5637, 0.5345]}, {"w": "Modern", "b": [0.5706, 0.5195, 0.6344, 0.5345]}, {"w": "Approach”", "b": [0.6412, 0.5195, 0.7297, 0.5345]}, {"w": "(4th", "b": [0.7365, 0.5179, 0.7668, 0.5345]}, {"w": "Edition)", "b": [0.7745, 0.5195, 0.8428, 0.5345]}, {"w": "by", "b": [0.8496, 0.5195, 0.8695, 0.5345]}, {"w": "Stuart", "b": [0.1312, 0.5375, 0.1826, 0.5524]}, {"w": "Russell", "b": [0.1887, 0.5375, 0.2451, 0.5524]}, {"w": "and", "b": [0.2512, 0.5375, 0.2809, 0.5524]}, {"w": "Peter", "b": [0.2871, 0.5375, 0.33, 0.5524]}, {"w": "Norvig", "b": [0.3361, 0.5375, 0.3905, 0.5524]}, {"w": "(Pearson,", "b": [0.3967, 0.5375, 0.4725, 0.5524]}, {"w": "2020),", "b": [0.4786, 0.5375, 0.5278, 0.5524]}, {"w": "known", "b": [0.534, 0.5375, 0.5862, 0.5524]}, {"w": "as", "b": [0.5924, 0.5375, 0.6089, 0.5524]}, {"w": "AIMA,", "b": [0.6151, 0.5375, 0.6714, 0.5524]}, {"w": "is", "b": [0.6776, 0.5375, 0.69, 0.5524]}, {"w": "your", "b": [0.6961, 0.5375, 0.7321, 0.5524]}, {"w": "best", "b": [0.7383, 0.5375, 0.7717, 0.5524]}, {"w": "book.", "b": [0.7778, 0.5375, 0.8224, 0.5524]}]}, {"id": "b_10", "type": "paragraph", "text": "10.3 Acknowledgements", "words": [{"w": "10.3", "b": [0.1312, 0.5863, 0.1756, 0.6042]}, {"w": "Acknowledgements", "b": [0.2005, 0.5863, 0.4065, 0.6042]}]}, {"id": "b_11", "type": "paragraph", "text": "The high quality of this book would be impossible without volunteering editors. I especially thank the following readers for their systematic contributions: Alexander Sack, Ana Fotina, Francesco Rinarelli, Yonas Mitike Kassa, Kelvin Sundli, Idris Aleem, and Tim Flocke.", "words": [{"w": "The", "b": [0.1306, 0.6249, 0.1621, 0.6398]}, {"w": "high", "b": [0.1683, 0.6249, 0.2029, 0.6398]}, {"w": "quality", "b": [0.209, 0.6249, 0.2645, 0.6398]}, {"w": "of", "b": [0.2706, 0.6249, 0.2854, 0.6398]}, {"w": "this", "b": [0.2915, 0.6249, 0.3212, 0.6398]}, {"w": "book", "b": [0.3273, 0.6249, 0.3665, 0.6398]}, {"w": "would", "b": [0.3727, 0.6249, 0.42, 0.6398]}, {"w": "be", "b": [0.4261, 0.6249, 0.445, 0.6398]}, {"w": "impossible", "b": [0.4511, 0.6249, 0.5343, 0.6398]}, {"w": "without", "b": [0.5404, 0.6249, 0.6025, 0.6398]}, {"w": "volunteering", "b": [0.6087, 0.6249, 0.707, 0.6398]}, {"w": "editors.", "b": [0.7131, 0.6249, 0.7724, 0.6398]}, {"w": "I", "b": [0.7805, 0.6249, 0.7872, 0.6398]}, {"w": "especially", "b": [0.7933, 0.6249, 0.8698, 0.6398]}, {"w": "thank", "b": [0.1312, 0.6428, 0.1778, 0.6578]}, {"w": "the", "b": [0.1839, 0.6428, 0.2095, 0.6578]}, {"w": "following", "b": [0.2157, 0.6428, 0.2873, 0.6578]}, {"w": "readers", "b": [0.2934, 0.6428, 0.351, 0.6578]}, {"w": "for", "b": [0.3571, 0.6428, 0.3792, 0.6578]}, {"w": "their", "b": [0.3853, 0.6428, 0.4233, 0.6578]}, {"w": "systematic", "b": [0.4294, 0.6428, 0.514, 0.6578]}, {"w": "contributions:", "b": [0.5202, 0.6428, 0.6314, 0.6578]}, {"w": "Alexander", "b": [0.6396, 0.6428, 0.7215, 0.6578]}, {"w": "Sack,", "b": [0.7276, 0.6428, 0.7696, 0.6578]}, {"w": "Ana", "b": [0.7758, 0.6428, 0.809, 0.6578]}, {"w": "Fotina,", "b": [0.8152, 0.6428, 0.8717, 0.6578]}, {"w": "Francesco", "b": [0.1312, 0.6608, 0.2096, 0.6757]}, {"w": "Rinarelli,", "b": [0.2157, 0.6608, 0.2899, 0.6757]}, {"w": "Yonas", "b": [0.296, 0.6608, 0.3443, 0.6757]}, {"w": "Mitike", "b": [0.3505, 0.6608, 0.4023, 0.6757]}, {"w": "Kassa,", "b": [0.4084, 0.6608, 0.4609, 0.6757]}, {"w": "Kelvin", "b": [0.4671, 0.6608, 0.5199, 0.6757]}, {"w": "Sundli,", "b": [0.526, 0.6608, 0.5824, 0.6757]}, {"w": "Idris", "b": [0.5886, 0.6608, 0.6252, 0.6757]}, {"w": "Aleem,", "b": [0.6313, 0.6608, 0.6872, 0.6757]}, {"w": "and", "b": [0.6933, 0.6608, 0.7231, 0.6757]}, {"w": "Tim", "b": [0.7292, 0.6608, 0.763, 0.6757]}, {"w": "Flocke.", "b": [0.7692, 0.6608, 0.8264, 0.6757]}]}, {"id": "b_12", "type": "paragraph", "text": "I thank scientific advisors, Veronique Tremblay and Maximilian Hudlberger, for the review and correction of the Model Evaluation chapter. I’m also grateful to Cassie Kozyrkov for her attentive and critical eye that allowed solidifying the section on statistical tests.", "words": [{"w": "I", "b": [0.1312, 0.6877, 0.1379, 0.7026]}, {"w": "thank", "b": [0.1441, 0.6877, 0.1911, 0.7026]}, {"w": "scientific", "b": [0.1973, 0.6877, 0.2672, 0.7026]}, {"w": "advisors,", "b": [0.2733, 0.6877, 0.3444, 0.7026]}, {"w": "Veronique", "b": [0.3505, 0.6877, 0.4317, 0.7026]}, {"w": "Tremblay", "b": [0.4378, 0.6877, 0.5144, 0.7026]}, {"w": "and", "b": [0.5205, 0.6877, 0.5505, 0.7026]}, {"w": "Maximilian", "b": [0.5566, 0.6877, 0.6486, 0.7026]}, {"w": "Hudlberger,", "b": [0.6548, 0.6877, 0.751, 0.7026]}, {"w": "for", "b": [0.7571, 0.6877, 0.7794, 0.7026]}, {"w": "the", "b": [0.7855, 0.6877, 0.8114, 0.7026]}, {"w": "review", "b": [0.8175, 0.6877, 0.8698, 0.7026]}, {"w": "and", "b": [0.1312, 0.7056, 0.1604, 0.7206]}, {"w": "correction", "b": [0.1665, 0.7056, 0.245, 0.7206]}, {"w": "of", "b": [0.2512, 0.7056, 0.2658, 0.7206]}, {"w": "the", "b": [0.2719, 0.7056, 0.297, 0.7206]}, {"w": "Model", "b": [0.3032, 0.7056, 0.3524, 0.7206]}, {"w": "Evaluation", "b": [0.3586, 0.7056, 0.4437, 0.7206]}, {"w": "chapter.", "b": [0.4499, 0.7056, 0.5137, 0.7206]}, {"w": "I’m", "b": [0.5219, 0.7056, 0.5486, 0.7206]}, {"w": "also", "b": [0.5547, 0.7056, 0.585, 0.7206]}, {"w": "grateful", "b": [0.5911, 0.7056, 0.652, 0.7206]}, {"w": "to", "b": [0.6581, 0.7056, 0.6742, 0.7206]}, {"w": "Cassie", "b": [0.6803, 0.7056, 0.7298, 0.7206]}, {"w": "Kozyrkov", "b": [0.7359, 0.7056, 0.8103, 0.7206]}, {"w": "for", "b": [0.8165, 0.7056, 0.8381, 0.7206]}, {"w": "her", "b": [0.8443, 0.7056, 0.8695, 0.7206]}, {"w": "attentive", "b": [0.1312, 0.7236, 0.2025, 0.7385]}, {"w": "and", "b": [0.2087, 0.7236, 0.2384, 0.7385]}, {"w": "critical", "b": [0.2445, 0.7236, 0.3, 0.7385]}, {"w": "eye", "b": [0.3061, 0.7236, 0.3318, 0.7385]}, {"w": "that", "b": [0.3379, 0.7236, 0.3718, 0.7385]}, {"w": "allowed", "b": [0.3779, 0.7236, 0.4374, 0.7385]}, {"w": "solidifying", "b": [0.4435, 0.7236, 0.5257, 0.7385]}, {"w": "the", "b": [0.5318, 0.7236, 0.5575, 0.7385]}, {"w": "section", "b": [0.5636, 0.7236, 0.6191, 0.7385]}, {"w": "on", "b": [0.6253, 0.7236, 0.6448, 0.7385]}, {"w": "statistical", "b": [0.6509, 0.7236, 0.729, 0.7385]}, {"w": "tests.", "b": [0.7352, 0.7236, 0.7775, 0.7385]}]}, {"id": "b_13", "type": "paragraph", "text": "Other wonderful people to whom I am grateful for their help are Jean Santos, Carlos Azevedo, Zakarie Hashi, Tridib Dutta, Zakariya Abu-Grin, Suhel Khan, Brad Ezard, Cole Holcomb, Oliver Proud, Michael Schock, Fernando Hannaka, Ayla Khan, Varuna Eswer, Stephen Fox, Brad Klassen, Felipe Duque, Alexandre Mundim, John Hill, Ryan Volpi, Gaurish Katlana, Harsha Srivatsa, Agrita Garnizone, Shyambhu Mukherjee, Christopher Thompson, Sylvain Truong, Niklas Hansson, Zhihao Wu, Max Schumacher, Piers Casimir, Harry Ritchie, Marko Peltojoki, Gregory V., Win Pet, Yihwa Kim, Timothée Bernard, Marwen Sallem, Daniel", "words": [{"w": "Other", "b": [0.1312, 0.7505, 0.1775, 0.7655]}, {"w": "wonderful", "b": [0.1829, 0.7505, 0.2603, 0.7655]}, {"w": "people", "b": [0.2656, 0.7505, 0.3164, 0.7655]}, {"w": "to", "b": [0.3218, 0.7505, 0.3378, 0.7655]}, {"w": "whom", "b": [0.3432, 0.7505, 0.3904, 0.7655]}, {"w": "I", "b": [0.3957, 0.7505, 0.4023, 0.7655]}, {"w": "am", "b": [0.4076, 0.7505, 0.4317, 0.7655]}, {"w": "grateful", "b": [0.4371, 0.7505, 0.4979, 0.7655]}, {"w": "for", "b": [0.5033, 0.7505, 0.5249, 0.7655]}, {"w": "their", "b": [0.5303, 0.7505, 0.5675, 0.7655]}, {"w": "help", "b": [0.5729, 0.7505, 0.606, 0.7655]}, {"w": "are", "b": [0.6114, 0.7505, 0.6356, 0.7655]}, {"w": "Jean", "b": [0.6409, 0.7505, 0.6773, 0.7655]}, {"w": "Santos,", "b": [0.6827, 0.7505, 0.7396, 0.7655]}, {"w": "Carlos", "b": [0.7451, 0.7505, 0.7954, 0.7655]}, {"w": "Azevedo,", "b": [0.8008, 0.7505, 0.8717, 0.7655]}, {"w": "Zakarie", "b": [0.1312, 0.7684, 0.192, 0.7834]}, {"w": "Hashi,", "b": [0.1982, 0.7684, 0.2497, 0.7834]}, {"w": "Tridib", "b": [0.2558, 0.7684, 0.3063, 0.7834]}, {"w": "Dutta,", "b": [0.3124, 0.7684, 0.3662, 0.7834]}, {"w": "Zakariya", "b": [0.3723, 0.7684, 0.4435, 0.7834]}, {"w": "Abu-Grin,", "b": [0.4496, 0.7684, 0.5334, 0.7834]}, {"w": "Suhel", "b": [0.5396, 0.7684, 0.5843, 0.7834]}, {"w": "Khan,", "b": [0.5904, 0.7684, 0.6402, 0.7834]}, {"w": "Brad", "b": [0.6464, 0.7684, 0.6867, 0.7834]}, {"w": "Ezard,", "b": [0.6928, 0.7684, 0.7461, 0.7834]}, {"w": "Cole", "b": [0.7523, 0.7684, 0.7886, 0.7834]}, {"w": "Holcomb,", "b": [0.7947, 0.7684, 0.8716, 0.7834]}, {"w": "Oliver", "b": [0.1312, 0.7864, 0.1804, 0.8014]}, {"w": "Proud,", "b": [0.1865, 0.7864, 0.241, 0.8014]}, {"w": "Michael", "b": [0.2471, 0.7864, 0.3095, 0.8014]}, {"w": "Schock,", "b": [0.3156, 0.7864, 0.3759, 0.8014]}, {"w": "Fernando", "b": [0.3821, 0.7864, 0.457, 0.8014]}, {"w": "Hannaka,", "b": [0.4631, 0.7864, 0.5398, 0.8014]}, {"w": "Ayla", "b": [0.5459, 0.7864, 0.5822, 0.8014]}, {"w": "Khan,", "b": [0.5883, 0.7864, 0.6374, 0.8014]}, {"w": "Varuna", "b": [0.6435, 0.7864, 0.7018, 0.8014]}, {"w": "Eswer,", "b": [0.708, 0.7864, 0.761, 0.8014]}, {"w": "Stephen", "b": [0.7671, 0.7864, 0.8316, 0.8014]}, {"w": "Fox,", "b": [0.8377, 0.7864, 0.8717, 0.8014]}, {"w": "Brad", "b": [0.1312, 0.8043, 0.1716, 0.8193]}, {"w": "Klassen,", "b": [0.1777, 0.8043, 0.2455, 0.8193]}, {"w": "Felipe", "b": [0.2516, 0.8043, 0.3003, 0.8193]}, {"w": "Duque,", "b": [0.3064, 0.8043, 0.3649, 0.8193]}, {"w": "Alexandre", "b": [0.371, 0.8043, 0.4542, 0.8193]}, {"w": "Mundim,", "b": [0.4603, 0.8043, 0.5347, 0.8193]}, {"w": "John", "b": [0.5408, 0.8043, 0.5806, 0.8193]}, {"w": "Hill,", "b": [0.5867, 0.8043, 0.6215, 0.8193]}, {"w": "Ryan", "b": [0.6276, 0.8043, 0.67, 0.8193]}, {"w": "Volpi,", "b": [0.6761, 0.8043, 0.724, 0.8193]}, {"w": "Gaurish", "b": [0.7301, 0.8043, 0.7948, 0.8193]}, {"w": "Katlana,", "b": [0.801, 0.8043, 0.8717, 0.8193]}, {"w": "Harsha", "b": [0.1312, 0.8223, 0.1888, 0.8372]}, {"w": "Srivatsa,", "b": [0.1949, 0.8223, 0.2648, 0.8372]}, {"w": "Agrita", "b": [0.271, 0.8223, 0.3232, 0.8372]}, {"w": "Garnizone,", "b": [0.3293, 0.8223, 0.4174, 0.8372]}, {"w": "Shyambhu", "b": [0.4235, 0.8223, 0.5077, 0.8372]}, {"w": "Mukherjee,", "b": [0.5139, 0.8223, 0.6044, 0.8372]}, {"w": "Christopher", "b": [0.6105, 0.8223, 0.7069, 0.8372]}, {"w": "Thompson,", "b": [0.713, 0.8223, 0.804, 0.8372]}, {"w": "Sylvain", "b": [0.8102, 0.8223, 0.8691, 0.8372]}, {"w": "Truong,", "b": [0.1306, 0.8402, 0.1927, 0.8552]}, {"w": "Niklas", "b": [0.1989, 0.8402, 0.2485, 0.8552]}, {"w": "Hansson,", "b": [0.2547, 0.8402, 0.3261, 0.8552]}, {"w": "Zhihao", "b": [0.3323, 0.8402, 0.3868, 0.8552]}, {"w": "Wu,", "b": [0.393, 0.8402, 0.4253, 0.8552]}, {"w": "Max", "b": [0.4315, 0.8402, 0.4668, 0.8552]}, {"w": "Schumacher,", "b": [0.473, 0.8402, 0.5725, 0.8552]}, {"w": "Piers", "b": [0.5787, 0.8402, 0.6186, 0.8552]}, {"w": "Casimir,", "b": [0.6247, 0.8402, 0.6915, 0.8552]}, {"w": "Harry", "b": [0.6977, 0.8402, 0.7443, 0.8552]}, {"w": "Ritchie,", "b": [0.7505, 0.8402, 0.8118, 0.8552]}, {"w": "Marko", "b": [0.818, 0.8402, 0.8691, 0.8552]}, {"w": "Peltojoki,", "b": [0.1312, 0.8582, 0.21, 0.8731]}, {"w": "Gregory", "b": [0.2171, 0.8582, 0.2838, 0.8731]}, {"w": "V.,", "b": [0.2908, 0.8582, 0.3153, 0.8731]}, {"w": "Win", "b": [0.3225, 0.8582, 0.3575, 0.8731]}, {"w": "Pet,", "b": [0.3645, 0.8582, 0.3977, 0.8731]}, {"w": "Yihwa", "b": [0.4049, 0.8582, 0.4567, 0.8731]}, {"w": "Kim,", "b": [0.4637, 0.8582, 0.5045, 0.8731]}, {"w": "Timothée", "b": [0.5116, 0.8582, 0.5901, 0.8731]}, {"w": "Bernard,", "b": [0.597, 0.8582, 0.669, 0.8731]}, {"w": "Marwen", "b": [0.6762, 0.8582, 0.7422, 0.8731]}, {"w": "Sallem,", "b": [0.7491, 0.8582, 0.8088, 0.8731]}, {"w": "Daniel", "b": [0.8159, 0.8582, 0.869, 0.8731]}]}, {"id": "b_14", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 7", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "7", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}, {"page": 296, "dimensions": {"width": 540.0, "height": 666.1}, "blocks": [{"id": "b_0", "type": "paragraph", "text": "Bourguet, Aliza Rubenstein, Alice O., Juan Carlo Rebanal, Haider Al-Tahan, Josh Cooper, Venkata Yerubandi, Mahendren S., Abhijit Kumar, Mathieu Bouchard, Yacin Bahi, Samir Char, Luis Leopoldo Perez, Mitchell DeHaven, Martin Gubri, Guillermo Santamaría, Mustafa Murat Arat, Rex Donahey, Nathaniel Netirungroj, Aliza Rubenstein , Rahima Karimova, Darwin Brochero, Vaheid Wallets, Bharat Raghunathan, Carlos Salas, Ji Hui Yang, Jonas Atarust, Siddarth Sampangi, Utkarsh Mittal, Felipe Antunes, Larysa Visengeriyeva, Sorin Gatea, Mattia Pancerasa, Victor Zabalza, Dibyendu Mandal, and James Hoover.", "words": [{"w": "Bourguet,", "b": [0.1312, 0.0881, 0.2112, 0.1031]}, {"w": "Aliza", "b": [0.2173, 0.0881, 0.2589, 0.1031]}, {"w": "Rubenstein,", "b": [0.2651, 0.0881, 0.361, 0.1031]}, {"w": "Alice", "b": [0.3672, 0.0881, 0.4078, 0.1031]}, {"w": "O.,", "b": [0.4139, 0.0881, 0.4386, 0.1031]}, {"w": "Juan", "b": [0.4448, 0.0881, 0.4841, 0.1031]}, {"w": "Carlo", "b": [0.4902, 0.0881, 0.5345, 0.1031]}, {"w": "Rebanal,", "b": [0.5406, 0.0881, 0.6118, 0.1031]}, {"w": "Haider", "b": [0.6179, 0.0881, 0.6719, 0.1031]}, {"w": "Al-Tahan,", "b": [0.6781, 0.0881, 0.7592, 0.1031]}, {"w": "Josh", "b": [0.7654, 0.0881, 0.8017, 0.1031]}, {"w": "Cooper,", "b": [0.8079, 0.0881, 0.8716, 0.1031]}, {"w": "Venkata", "b": [0.1305, 0.106, 0.1975, 0.121]}, {"w": "Yerubandi,", "b": [0.2036, 0.106, 0.2929, 0.121]}, {"w": "Mahendren", "b": [0.2991, 0.106, 0.391, 0.121]}, {"w": "S.,", "b": [0.3972, 0.106, 0.4179, 0.121]}, {"w": "Abhijit", "b": [0.4241, 0.106, 0.4822, 0.121]}, {"w": "Kumar,", "b": [0.4883, 0.106, 0.5506, 0.121]}, {"w": "Mathieu", "b": [0.5568, 0.106, 0.6247, 0.121]}, {"w": "Bouchard,", "b": [0.6309, 0.106, 0.7142, 0.121]}, {"w": "Yacin", "b": [0.7204, 0.106, 0.7661, 0.121]}, {"w": "Bahi,", "b": [0.7722, 0.106, 0.8155, 0.121]}, {"w": "Samir", "b": [0.8217, 0.106, 0.8694, 0.121]}, {"w": "Char,", "b": [0.1312, 0.124, 0.1755, 0.1389]}, {"w": "Luis", "b": [0.1811, 0.124, 0.2146, 0.1389]}, {"w": "Leopoldo", "b": [0.2201, 0.124, 0.2922, 0.1389]}, {"w": "Perez,", "b": [0.2976, 0.124, 0.3457, 0.1389]}, {"w": "Mitchell", "b": [0.3513, 0.124, 0.4156, 0.1389]}, {"w": "DeHaven,", "b": [0.4211, 0.124, 0.4972, 0.1389]}, {"w": "Martin", "b": [0.5028, 0.124, 0.5576, 0.1389]}, {"w": "Gubri,", "b": [0.563, 0.124, 0.6145, 0.1389]}, {"w": "Guillermo", "b": [0.6201, 0.124, 0.6986, 0.1389]}, {"w": "Santamaría,", "b": [0.7041, 0.124, 0.7991, 0.1389]}, {"w": "Mustafa", "b": [0.8047, 0.124, 0.8691, 0.1389]}, {"w": "Murat", "b": [0.1312, 0.1419, 0.1831, 0.1569]}, {"w": "Arat,", "b": [0.1897, 0.1419, 0.2332, 0.1569]}, {"w": "Rex", "b": [0.2399, 0.1419, 0.2721, 0.1569]}, {"w": "Donahey,", "b": [0.2787, 0.1419, 0.3549, 0.1569]}, {"w": "Nathaniel", "b": [0.3616, 0.1419, 0.4416, 0.1569]}, {"w": "Netirungroj,", "b": [0.4483, 0.1419, 0.5493, 0.1569]}, {"w": "Aliza", "b": [0.5561, 0.1419, 0.5984, 0.1569]}, {"w": "Rubenstein", "b": [0.6051, 0.1419, 0.6975, 0.1569]}, {"w": ",", "b": [0.7041, 0.1419, 0.7094, 0.1569]}, {"w": "Rahima", "b": [0.7161, 0.1419, 0.7802, 0.1569]}, {"w": "Karimova,", "b": [0.7868, 0.1419, 0.8716, 0.1569]}, {"w": "Darwin", "b": [0.1312, 0.1599, 0.1914, 0.1748]}, {"w": "Brochero,", "b": [0.1975, 0.1599, 0.2765, 0.1748]}, {"w": "Vaheid", "b": [0.2827, 0.1599, 0.3389, 0.1748]}, {"w": "Wallets,", "b": [0.345, 0.1599, 0.4108, 0.1748]}, {"w": "Bharat", "b": [0.4169, 0.1599, 0.474, 0.1748]}, {"w": "Raghunathan,", "b": [0.4801, 0.1599, 0.5954, 0.1748]}, {"w": "Carlos", "b": [0.6016, 0.1599, 0.6537, 0.1748]}, {"w": "Salas,", "b": [0.6599, 0.1599, 0.7069, 0.1748]}, {"w": "Ji", "b": [0.713, 0.1599, 0.7278, 0.1748]}, {"w": "Hui", "b": [0.734, 0.1599, 0.7637, 0.1748]}, {"w": "Yang,", "b": [0.7698, 0.1599, 0.8167, 0.1748]}, {"w": "Jonas", "b": [0.8229, 0.1599, 0.869, 0.1748]}, {"w": "Atarust,", "b": [0.1305, 0.1778, 0.1984, 0.1928]}, {"w": "Siddarth", "b": [0.2046, 0.1778, 0.2755, 0.1928]}, {"w": "Sampangi,", "b": [0.2816, 0.1778, 0.367, 0.1928]}, {"w": "Utkarsh", "b": [0.3732, 0.1778, 0.4389, 0.1928]}, {"w": "Mittal,", "b": [0.4451, 0.1778, 0.5019, 0.1928]}, {"w": "Felipe", "b": [0.508, 0.1778, 0.5567, 0.1928]}, {"w": "Antunes,", "b": [0.5629, 0.1778, 0.6359, 0.1928]}, {"w": "Larysa", "b": [0.6421, 0.1778, 0.6972, 0.1928]}, {"w": "Visengeriyeva,", "b": [0.7033, 0.1778, 0.8202, 0.1928]}, {"w": "Sorin", "b": [0.8263, 0.1778, 0.8691, 0.1928]}, {"w": "Gatea,", "b": [0.1312, 0.1958, 0.1847, 0.2107]}, {"w": "Mattia", "b": [0.1908, 0.1958, 0.2457, 0.2107]}, {"w": "Pancerasa,", "b": [0.2518, 0.1958, 0.3379, 0.2107]}, {"w": "Victor", "b": [0.344, 0.1958, 0.3948, 0.2107]}, {"w": "Zabalza,", "b": [0.401, 0.1958, 0.4687, 0.2107]}, {"w": "Dibyendu", "b": [0.4748, 0.1958, 0.552, 0.2107]}, {"w": "Mandal,", "b": [0.5581, 0.1958, 0.6243, 0.2107]}, {"w": "and", "b": [0.6304, 0.1958, 0.6602, 0.2107]}, {"w": "James", "b": [0.6663, 0.1958, 0.7159, 0.2107]}, {"w": "Hoover.", "b": [0.722, 0.1958, 0.7841, 0.2107]}]}, {"id": "b_1", "type": "equation", "text": "Andriy Burkov Machine Learning Engineering - Draft 8", "words": [{"w": "Andriy", "b": [0.1305, 0.9052, 0.187, 0.9202]}, {"w": "Burkov", "b": [0.1931, 0.9052, 0.2514, 0.9202]}, {"w": "Machine", "b": [0.3458, 0.9052, 0.4135, 0.9202]}, {"w": "Learning", "b": [0.4197, 0.9052, 0.4907, 0.9202]}, {"w": "Engineering", "b": [0.4969, 0.9052, 0.5926, 0.9202]}, {"w": "-", "b": [0.5987, 0.9052, 0.6049, 0.9202]}, {"w": "Draft", "b": [0.611, 0.9052, 0.6544, 0.9202]}, {"w": "8", "b": [0.8597, 0.9052, 0.869, 0.9202]}]}]}]} \ No newline at end of file